Preservation of the invariant: if the invariant holds in a system state, it also holds in the next system state.
The only two kinds of events that extend DAGs are
For the other four kinds of events, the proof is easy.
Theorem:
(defthm certificate-previous-in-dag-p-when-create-possiblep (implies (and (create-possiblep cert systate) (in (certificate->author cert) (correct-addresses systate))) (certificate-previous-in-dag-p cert (validator-state->dag (get-validator-state (certificate->author cert) systate)))))
Theorem:
(defthm backward-closed-p-of-create-next (implies (and (backward-closed-p systate) (create-possiblep cert systate) (certificatep cert)) (backward-closed-p (create-next cert systate))))
Theorem:
(defthm certificate-previous-in-dag-p-when-accept-possiblep (implies (accept-possiblep msg systate) (certificate-previous-in-dag-p (message->certificate msg) (validator-state->dag (get-validator-state (message->destination msg) systate)))))
Theorem:
(defthm backward-closed-p-of-accept-next (implies (and (backward-closed-p systate) (accept-possiblep msg systate)) (backward-closed-p (accept-next msg systate))))
Theorem:
(defthm backward-closed-p-of-advance-next (implies (and (backward-closed-p systate) (advance-possiblep val systate)) (backward-closed-p (advance-next val systate))))
Theorem:
(defthm backward-closed-p-of-commit-next (implies (and (backward-closed-p systate) (commit-possiblep val systate)) (backward-closed-p (commit-next val systate))))
Theorem:
(defthm backward-closed-p-of-event-next (implies (and (backward-closed-p systate) (event-possiblep event systate)) (backward-closed-p (event-next event systate))))