Update the state of the network in the system.
(update-network-state network systate) → new-systate
This is a thin layer, but it provides more abstraction.
Function:
(defun update-network-state (network systate) (declare (xargs :guard (and (message-setp network) (system-statep systate)))) (let ((__function__ 'update-network-state)) (declare (ignorable __function__)) (change-system-state systate :network network)))
Theorem:
(defthm system-statep-of-update-network-state (b* ((new-systate (update-network-state network systate))) (system-statep new-systate)) :rule-classes :rewrite)
Theorem:
(defthm all-addresses-of-update-network-state (b* ((?new-systate (update-network-state network systate))) (equal (all-addresses new-systate) (all-addresses systate))))
Theorem:
(defthm correct-addresses-of-update-network-state (b* ((?new-systate (update-network-state network systate))) (equal (correct-addresses new-systate) (correct-addresses systate))))
Theorem:
(defthm faulty-addresses-of-update-network-state (b* ((?new-systate (update-network-state network systate))) (equal (faulty-addresses new-systate) (faulty-addresses systate))))
Theorem:
(defthm get-network-state-of-update-network-state (equal (get-network-state (update-network-state network systate)) (message-set-fix network)))
Theorem:
(defthm get-validator-state-of-update-network-state (equal (get-validator-state val (update-network-state network systate)) (get-validator-state val systate)))
Theorem:
(defthm update-network-state-of-message-set-fix-network (equal (update-network-state (message-set-fix network) systate) (update-network-state network systate)))
Theorem:
(defthm update-network-state-message-set-equiv-congruence-on-network (implies (message-set-equiv network network-equiv) (equal (update-network-state network systate) (update-network-state network-equiv systate))) :rule-classes :congruence)
Theorem:
(defthm update-network-state-of-system-state-fix-systate (equal (update-network-state network (system-state-fix systate)) (update-network-state network systate)))
Theorem:
(defthm update-network-state-system-state-equiv-congruence-on-systate (implies (system-state-equiv systate systate-equiv) (equal (update-network-state network systate) (update-network-state network systate-equiv))) :rule-classes :congruence)