New state resulting from a
(timer-expires-next val systate) → new-systate
The timer state is set to expired. Recall that we do not model real time here, just the sequences of events that may happen in the system.
Function:
(defun timer-expires-next-val (vstate) (declare (xargs :guard (validator-statep vstate))) (let ((__function__ 'timer-expires-next-val)) (declare (ignorable __function__)) (change-validator-state vstate :timer (timer-expired))))
Theorem:
(defthm validator-statep-of-timer-expires-next-val (b* ((new-vstate (timer-expires-next-val vstate))) (validator-statep new-vstate)) :rule-classes :rewrite)
Function:
(defun timer-expires-next (val systate) (declare (xargs :guard (and (addressp val) (system-statep systate)))) (declare (xargs :guard (timer-expires-possiblep val systate))) (let ((__function__ 'timer-expires-next)) (declare (ignorable __function__)) (b* ((vstate (get-validator-state val systate)) (new-vstate (timer-expires-next-val vstate))) (update-validator-state val new-vstate systate))))
Theorem:
(defthm system-statep-of-timer-expires-next (b* ((new-systate (timer-expires-next val systate))) (system-statep new-systate)) :rule-classes :rewrite)
Theorem:
(defthm timer-expires-next-of-system-state-fix-systate (equal (timer-expires-next val (system-state-fix systate)) (timer-expires-next val systate)))
Theorem:
(defthm timer-expires-next-system-state-equiv-congruence-on-systate (implies (system-state-equiv systate systate-equiv) (equal (timer-expires-next val systate) (timer-expires-next val systate-equiv))) :rule-classes :congruence)
Theorem:
(defthm validator-state->round-of-timer-expires-next (implies (and (in val (correct-addresses systate)) (timer-expires-possiblep val1 systate)) (equal (validator-state->round (get-validator-state val (timer-expires-next val1 systate))) (validator-state->round (get-validator-state val systate)))))
Theorem:
(defthm validator-state->dag-of-timer-expires-next (implies (and (in val (correct-addresses systate)) (timer-expires-possiblep val1 systate)) (equal (validator-state->dag (get-validator-state val (timer-expires-next val1 systate))) (validator-state->dag (get-validator-state val systate)))))
Theorem:
(defthm validator-state->last-of-timer-expires-next (implies (and (in val (correct-addresses systate)) (timer-expires-possiblep val1 systate)) (equal (validator-state->last (get-validator-state val (timer-expires-next val1 systate))) (validator-state->last (get-validator-state val systate)))))
Theorem:
(defthm validator-state->blockchain-of-timer-expires-next (implies (and (in val (correct-addresses systate)) (timer-expires-possiblep val1 systate)) (equal (validator-state->blockchain (get-validator-state val (timer-expires-next val1 systate))) (validator-state->blockchain (get-validator-state val systate)))))
Theorem:
(defthm validator-state->committed-of-timer-expires-next (implies (and (in val (correct-addresses systate)) (timer-expires-possiblep val1 systate)) (equal (validator-state->committed (get-validator-state val (timer-expires-next val1 systate))) (validator-state->committed (get-validator-state val systate)))))