Preservation of the invariant: if the invariant holds in a system state, it also holds in the next system state.
A
For all other kinds of events, we prove two theorems: one is for each generic validator, and one is for the whole system.
An
For the other kinds of events, nothing changes for any certificate in terms of its records.
Theorem:
(defthm signer-record-p-of-create-next-new (implies (and (in signer (certificate->signers cert)) (in signer (correct-addresses systate))) (signer-record-p (certificate->author cert) (certificate->round cert) (get-validator-state signer (create-next cert systate)))))
Theorem:
(defthm signer-record-p-of-create-next-old (implies (and (in signer (correct-addresses systate)) (signer-record-p (certificate->author cert1) (certificate->round cert1) (get-validator-state signer systate))) (signer-record-p (certificate->author cert1) (certificate->round cert1) (get-validator-state signer (create-next cert systate)))))
Theorem:
(defthm signer-records-p-of-create-next (implies (signer-records-p systate) (signer-records-p (create-next cert systate))))
Theorem:
(defthm signer-record-p-of-accept-next (implies (and (in signer (correct-addresses systate)) (signer-record-p (certificate->author cert) (certificate->round cert) (get-validator-state signer systate)) (accept-possiblep msg systate)) (signer-record-p (certificate->author cert) (certificate->round cert) (get-validator-state signer (accept-next msg systate)))))
Theorem:
(defthm signer-records-p-of-accept-next (implies (and (signer-records-p systate) (accept-possiblep msg systate)) (signer-records-p (accept-next msg systate))))
Theorem:
(defthm signer-record-p-of-advance-next (implies (and (in signer (correct-addresses systate)) (signer-record-p (certificate->author cert) (certificate->round cert) (get-validator-state signer systate)) (advance-possiblep val systate)) (signer-record-p (certificate->author cert) (certificate->round cert) (get-validator-state signer (advance-next val systate)))))
Theorem:
(defthm signer-records-p-of-advance-next (implies (and (signer-records-p systate) (advance-possiblep val systate)) (signer-records-p (advance-next val systate))))
Theorem:
(defthm signer-record-p-of-commit-next (implies (and (in signer (correct-addresses systate)) (signer-record-p (certificate->author cert) (certificate->round cert) (get-validator-state signer systate)) (commit-possiblep val systate)) (signer-record-p (certificate->author cert) (certificate->round cert) (get-validator-state signer (commit-next val systate)))))
Theorem:
(defthm signer-records-p-of-commit-next (implies (and (signer-records-p systate) (commit-possiblep val systate)) (signer-records-p (commit-next val systate))))
Theorem:
(defthm signer-records-p-of-event-next (implies (and (signer-records-p systate) (event-possiblep event systate)) (signer-records-p (event-next event systate))))