Bounded repetition of Imp steps.
This function repeats the step function at most
This bounded-repetition-step function is executable.
Function:
(defun stepn (cfg n) (declare (xargs :guard (and (configp cfg) (natp n)))) (b* (((when (zp n)) (config-fix cfg)) ((unless (consp (config->comms cfg))) (config-fix cfg))) (stepn (step cfg) (1- n))))
Theorem:
(defthm configp-of-stepn (b* ((new-config (stepn cfg n))) (configp new-config)) :rule-classes :rewrite)
Theorem:
(defthm stepn-of-config-fix-cfg (equal (stepn (config-fix cfg) n) (stepn cfg n)))
Theorem:
(defthm stepn-config-equiv-congruence-on-cfg (implies (config-equiv cfg cfg-equiv) (equal (stepn cfg n) (stepn cfg-equiv n))) :rule-classes :congruence)
Theorem:
(defthm stepn-of-nfix-n (equal (stepn cfg (nfix n)) (stepn cfg n)))
Theorem:
(defthm stepn-nat-equiv-congruence-on-n (implies (acl2::nat-equiv n n-equiv) (equal (stepn cfg n) (stepn cfg n-equiv))) :rule-classes :congruence)