New state resulting from a
(timer-expires-next val systate) → new-systate
The
The timer state is set to expired.
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* (((validator-state vstate) (get-validator-state val systate)) (new-timer (timer-expired)) (new-vstate (change-validator-state vstate :timer new-timer)) (systate (update-validator-state val new-vstate systate))) 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 all-addresses-of-timer-expires-next (implies (timer-expires-possiblep val systate) (b* ((?new-systate (timer-expires-next val systate))) (equal (all-addresses new-systate) (all-addresses systate)))))
Theorem:
(defthm correct-addresses-of-timer-expires-next (implies (timer-expires-possiblep val systate) (b* ((?new-systate (timer-expires-next val systate))) (equal (correct-addresses new-systate) (correct-addresses systate)))))
Theorem:
(defthm faulty-addresses-of-timer-expires-next (implies (timer-expires-possiblep val systate) (b* ((?new-systate (timer-expires-next val systate))) (equal (faulty-addresses new-systate) (faulty-addresses systate)))))
Theorem:
(defthm validator-state->dag-of-timer-expires-next (implies (timer-expires-possiblep val systate) (b* ((?new-systate (timer-expires-next val systate))) (equal (validator-state->dag (get-validator-state val1 new-systate)) (validator-state->dag (get-validator-state val1 systate))))))
Theorem:
(defthm validator-state->buffer-of-timer-expires-next (implies (timer-expires-possiblep val systate) (b* ((?new-systate (timer-expires-next val systate))) (equal (validator-state->buffer (get-validator-state val1 new-systate)) (validator-state->buffer (get-validator-state val1 systate))))))
Theorem:
(defthm validator-state->endorsed-of-timer-expires-next (implies (timer-expires-possiblep val systate) (b* ((?new-systate (timer-expires-next val systate))) (equal (validator-state->endorsed (get-validator-state val1 new-systate)) (validator-state->endorsed (get-validator-state val1 systate))))))
Theorem:
(defthm validator-state->last-of-timer-expires-next (implies (timer-expires-possiblep val systate) (b* ((?new-systate (timer-expires-next val systate))) (equal (validator-state->last (get-validator-state val1 new-systate)) (validator-state->last (get-validator-state val1 systate))))))
Theorem:
(defthm validator-state->blockchain-of-timer-expires-next (implies (timer-expires-possiblep val systate) (b* ((?new-systate (timer-expires-next val systate))) (equal (validator-state->blockchain (get-validator-state val1 new-systate)) (validator-state->blockchain (get-validator-state val1 systate))))))
Theorem:
(defthm validator-state->committed-of-timer-expires-next (implies (timer-expires-possiblep val systate) (b* ((?new-systate (timer-expires-next val systate))) (equal (validator-state->committed (get-validator-state val1 new-systate)) (validator-state->committed (get-validator-state val1 systate))))))
Theorem:
(defthm get-network-state-of-timer-expires-next (b* ((?new-systate (timer-expires-next val systate))) (equal (get-network-state new-systate) (get-network-state systate))))
Theorem:
(defthm timer-expires-next-of-address-fix-val (equal (timer-expires-next (address-fix val) systate) (timer-expires-next val systate)))
Theorem:
(defthm timer-expires-next-address-equiv-congruence-on-val (implies (address-equiv val val-equiv) (equal (timer-expires-next val systate) (timer-expires-next val-equiv systate))) :rule-classes :congruence)
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)