Maximum length of any line of an STV (i.e., how many phases we are going to simulate.
Function:
(defun stv-number-of-phases (stv) (declare (xargs :guard (stvdata-p stv))) (let ((__function__ 'stv-number-of-phases)) (declare (ignorable __function__)) (b* (((stvdata stv) stv)) (max (stv-max-phases-in-lines stv.inputs) (max (stv-max-phases-in-lines stv.outputs) (max (stv-max-phases-in-lines stv.internals) (stv-max-phases-in-lines stv.overrides)))))))
Theorem:
(defthm natp-of-stv-number-of-phases (b* ((num-phases (stv-number-of-phases stv))) (natp num-phases)) :rule-classes :type-prescription)