New state resulting from an
(advance-round-next val systate) → new-systate
The round number is incremented by 1.
The timer is restarted, i.e. it is set to running.
Function:
(defun advance-round-next-val (round vstate) (declare (xargs :guard (and (posp round) (validator-statep vstate)))) (let ((__function__ 'advance-round-next-val)) (declare (ignorable __function__)) (change-validator-state vstate :round (1+ round) :timer (timer-running))))
Theorem:
(defthm validator-statep-of-advance-round-next-val (b* ((new-vstate (advance-round-next-val round vstate))) (validator-statep new-vstate)) :rule-classes :rewrite)
Function:
(defun advance-round-next (val systate) (declare (xargs :guard (and (addressp val) (system-statep systate)))) (declare (xargs :guard (advance-round-possiblep val systate))) (let ((__function__ 'advance-round-next)) (declare (ignorable __function__)) (b* ((vstate (get-validator-state val systate)) (round (validator-state->round vstate)) (new-vstate (advance-round-next-val round vstate))) (update-validator-state val new-vstate systate))))
Theorem:
(defthm system-statep-of-advance-round-next (b* ((new-systate (advance-round-next val systate))) (system-statep new-systate)) :rule-classes :rewrite)
Theorem:
(defthm advance-round-next-of-system-state-fix-systate (equal (advance-round-next val (system-state-fix systate)) (advance-round-next val systate)))
Theorem:
(defthm advance-round-next-system-state-equiv-congruence-on-systate (implies (system-state-equiv systate systate-equiv) (equal (advance-round-next val systate) (advance-round-next val systate-equiv))) :rule-classes :congruence)
Theorem:
(defthm validator-state->round-of-advance-round-next (implies (and (in val (correct-addresses systate)) (advance-round-possiblep val1 systate)) (equal (validator-state->round (get-validator-state val (advance-round-next val1 systate))) (if (equal val val1) (1+ (validator-state->round (get-validator-state val systate))) (validator-state->round (get-validator-state val systate))))))
Theorem:
(defthm validator-state->dag-of-advance-round-next (implies (and (in val (correct-addresses systate)) (advance-round-possiblep val1 systate)) (equal (validator-state->dag (get-validator-state val (advance-round-next val1 systate))) (validator-state->dag (get-validator-state val systate)))))
Theorem:
(defthm validator-state->last-of-advance-round-next (implies (and (in val (correct-addresses systate)) (advance-round-possiblep val1 systate)) (equal (validator-state->last (get-validator-state val (advance-round-next val1 systate))) (validator-state->last (get-validator-state val systate)))))
Theorem:
(defthm validator-state->blockchain-of-advance-round-next (implies (and (in val (correct-addresses systate)) (advance-round-possiblep val1 systate)) (equal (validator-state->blockchain (get-validator-state val (advance-round-next val1 systate))) (validator-state->blockchain (get-validator-state val systate)))))
Theorem:
(defthm validator-state->committed-of-advance-round-next (implies (and (in val (correct-addresses systate)) (advance-round-possiblep val1 systate)) (equal (validator-state->committed (get-validator-state val (advance-round-next val1 systate))) (validator-state->committed (get-validator-state val systate)))))