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 may change the DAG
are
For
For
DAGs do not change for the other kinds of events,
so the proofs for them always rely on the preservaton of the properties.
For each kind of event,
we prove a lemma about validator-dag-previous-quorum-p
and then a theorem about dag-previous-quorum-p.
For
Theorem:
(defthm validator-dag-previous-quorum-p-of-create-next-old (implies (validator-dag-previous-quorum-p cert1 (get-validator-state val systate)) (validator-dag-previous-quorum-p cert1 (get-validator-state val (create-next cert systate)))))
Theorem:
(defthm validator-dag-previous-quorum-p-of-create-next-new (implies (and (create-possiblep cert systate) (in (certificate->author cert) (correct-addresses systate))) (validator-dag-previous-quorum-p cert (get-validator-state (certificate->author cert) (create-next cert systate)))))
Theorem:
(defthm dag-previous-quorum-p-of-create-next (implies (and (dag-previous-quorum-p systate) (create-possiblep cert systate)) (dag-previous-quorum-p (create-next cert systate))))
Theorem:
(defthm validator-dag-previous-quorum-p-of-accept-next-old (implies (and (validator-dag-previous-quorum-p cert (get-validator-state val systate)) (accept-possiblep msg systate)) (validator-dag-previous-quorum-p cert (get-validator-state val (accept-next msg systate)))))
Theorem:
(defthm validator-dag-previous-quorum-p-of-accept-next-new (implies (and (system-committees-fault-tolerant-p systate) (signed-previous-quorum-p systate) (same-committees-p systate) (accept-possiblep msg systate) (messagep msg)) (validator-dag-previous-quorum-p (message->certificate msg) (get-validator-state (message->destination msg) (accept-next msg systate)))))
Theorem:
(defthm dag-previous-quorum-p-of-accept-next (implies (and (dag-previous-quorum-p systate) (system-committees-fault-tolerant-p systate) (signed-previous-quorum-p systate) (same-committees-p systate) (accept-possiblep msg systate) (messagep msg)) (dag-previous-quorum-p (accept-next msg systate))))
Theorem:
(defthm validator-dag-previous-quorum-p-of-advance-next (implies (and (validator-dag-previous-quorum-p cert (get-validator-state val1 systate)) (advance-possiblep val systate)) (validator-dag-previous-quorum-p cert (get-validator-state val1 (advance-next val systate)))))
Theorem:
(defthm dag-previous-quorum-p-of-advance-next (implies (and (dag-previous-quorum-p systate) (advance-possiblep val systate)) (dag-previous-quorum-p (advance-next val systate))))
Theorem:
(defthm validator-dag-previous-quorum-p-of-commit-next (implies (and (last-blockchain-round-p systate) (ordered-blockchain-p systate) (signer-quorum-p systate) (in val1 (correct-addresses systate)) (in cert (validator-state->dag (get-validator-state val1 systate))) (validator-dag-previous-quorum-p cert (get-validator-state val1 systate)) (commit-possiblep val systate) (addressp val)) (validator-dag-previous-quorum-p cert (get-validator-state val1 (commit-next val systate)))))
Theorem:
(defthm dag-previous-quorum-p-of-commit-next (implies (and (dag-previous-quorum-p systate) (last-blockchain-round-p systate) (ordered-blockchain-p systate) (signer-quorum-p systate) (commit-possiblep val systate) (addressp val)) (dag-previous-quorum-p (commit-next val systate))))
Theorem:
(defthm dag-previous-quorum-p-of-event-next (implies (and (dag-previous-quorum-p systate) (system-committees-fault-tolerant-p systate) (last-blockchain-round-p systate) (ordered-blockchain-p systate) (signed-previous-quorum-p systate) (signer-quorum-p systate) (same-committees-p systate) (event-possiblep event systate)) (dag-previous-quorum-p (event-next event systate))))