New system state resulting from an
(advance-next val systate) → new-systate
The
We increment the validator's round by one.
Function:
(defun advance-next (val systate) (declare (xargs :guard (and (addressp val) (system-statep systate)))) (declare (xargs :guard (advance-possiblep val systate))) (let ((__function__ 'advance-next)) (declare (ignorable __function__)) (b* (((validator-state vstate) (get-validator-state val systate)) (new-round (1+ vstate.round)) (new-vstate (change-validator-state vstate :round new-round)) (systate (update-validator-state val new-vstate systate))) systate)))
Theorem:
(defthm system-statep-of-advance-next (b* ((new-systate (advance-next val systate))) (system-statep new-systate)) :rule-classes :rewrite)
Theorem:
(defthm advance-next-of-address-fix-val (equal (advance-next (address-fix val) systate) (advance-next val systate)))
Theorem:
(defthm advance-next-address-equiv-congruence-on-val (implies (address-equiv val val-equiv) (equal (advance-next val systate) (advance-next val-equiv systate))) :rule-classes :congruence)
Theorem:
(defthm advance-next-of-system-state-fix-systate (equal (advance-next val (system-state-fix systate)) (advance-next val systate)))
Theorem:
(defthm advance-next-system-state-equiv-congruence-on-systate (implies (system-state-equiv systate systate-equiv) (equal (advance-next val systate) (advance-next val systate-equiv))) :rule-classes :congruence)