Retrieve the state of a correct validator from the system.
(get-validator-state val systate) → vstate
Function:
(defun get-validator-state (val systate) (declare (xargs :guard (and (addressp val) (system-statep systate)))) (declare (xargs :guard (in val (correct-addresses systate)))) (let ((__function__ 'get-validator-state)) (declare (ignorable __function__)) (validator-state-fix (omap::lookup (address-fix val) (system-state->validators systate)))))
Theorem:
(defthm validator-statep-of-get-validator-state (b* ((vstate (get-validator-state val systate))) (validator-statep vstate)) :rule-classes :rewrite)
Theorem:
(defthm get-validator-state-of-address-fix-val (equal (get-validator-state (address-fix val) systate) (get-validator-state val systate)))
Theorem:
(defthm get-validator-state-address-equiv-congruence-on-val (implies (address-equiv val val-equiv) (equal (get-validator-state val systate) (get-validator-state val-equiv systate))) :rule-classes :congruence)
Theorem:
(defthm get-validator-state-of-system-state-fix-systate (equal (get-validator-state val (system-state-fix systate)) (get-validator-state val systate)))
Theorem:
(defthm get-validator-state-system-state-equiv-congruence-on-systate (implies (system-state-equiv systate systate-equiv) (equal (get-validator-state val systate) (get-validator-state val systate-equiv))) :rule-classes :congruence)