New correct author state
resulting from a
(create-author-next cert vstate) → new-vstate
The input
The certificate is added to the DAG.
Function:
(defun create-author-next (cert vstate) (declare (xargs :guard (and (certificatep cert) (validator-statep vstate)))) (let ((__function__ 'create-author-next)) (declare (ignorable __function__)) (b* ((dag (validator-state->dag vstate)) (new-dag (insert (certificate-fix cert) dag))) (change-validator-state vstate :dag new-dag))))
Theorem:
(defthm validator-statep-of-create-author-next (b* ((new-vstate (create-author-next cert vstate))) (validator-statep new-vstate)) :rule-classes :rewrite)
Theorem:
(defthm validator-state->round-of-create-author-next (b* ((?new-vstate (create-author-next cert vstate))) (equal (validator-state->round new-vstate) (validator-state->round vstate))))
Theorem:
(defthm validator-state->dag-of-create-author-next (b* ((?new-vstate (create-author-next cert vstate))) (equal (validator-state->dag new-vstate) (insert (certificate-fix cert) (validator-state->dag vstate)))))
Theorem:
(defthm validator-state->endorsed-of-create-author-next (b* ((?new-vstate (create-author-next cert vstate))) (equal (validator-state->endorsed new-vstate) (validator-state->endorsed vstate))))
Theorem:
(defthm validator-state->last-of-create-author-next (b* ((?new-vstate (create-author-next cert vstate))) (equal (validator-state->last new-vstate) (validator-state->last vstate))))
Theorem:
(defthm validator-state->blockchain-of-create-author-next (b* ((?new-vstate (create-author-next cert vstate))) (equal (validator-state->blockchain new-vstate) (validator-state->blockchain vstate))))
Theorem:
(defthm validator-state->committed-of-create-author-next (b* ((?new-vstate (create-author-next cert vstate))) (equal (validator-state->committed new-vstate) (validator-state->committed vstate))))
Theorem:
(defthm create-author-next-of-certificate-fix-cert (equal (create-author-next (certificate-fix cert) vstate) (create-author-next cert vstate)))
Theorem:
(defthm create-author-next-certificate-equiv-congruence-on-cert (implies (certificate-equiv cert cert-equiv) (equal (create-author-next cert vstate) (create-author-next cert-equiv vstate))) :rule-classes :congruence)
Theorem:
(defthm create-author-next-of-validator-state-fix-vstate (equal (create-author-next cert (validator-state-fix vstate)) (create-author-next cert vstate)))
Theorem:
(defthm create-author-next-validator-state-equiv-congruence-on-vstate (implies (validator-state-equiv vstate vstate-equiv) (equal (create-author-next cert vstate) (create-author-next cert vstate-equiv))) :rule-classes :congruence)