• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Riscv
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Poseidon
      • Where-do-i-place-my-book
      • Axe
      • Aleo
        • Aleobft
          • Correctness
            • Unequivocal-dags-def-and-init
            • Same-committees-def-and-implied
            • Dag-omni-paths
            • Signer-records
              • Signer-records-p-of-next
              • Signer-record-p
                • Signer-records-p
                • Signer-records-p-when-init
                • Signer-records-p-when-reachable
                • Signer-records-p-of-events-next
              • Unequivocal-dags-next
              • Quorum-intersection
              • Dag-previous-quorum-def-and-init-and-next
              • Unequivocal-signed-certificates
              • Signed-previous-quorum
              • Nonforking-anchors-def-and-init-and-next
              • Successor-predecessor-intersection
              • Fault-tolerance
              • Last-anchor-voters-def-and-init-and-next
              • Signer-quorum
              • Committed-redundant-def-and-init-and-next
              • Nonforking-blockchains-def-and-init
              • Blockchain-redundant-def-and-init-and-next
              • No-self-endorsed
              • Last-anchor-present
              • Anchors-extension
              • Nonforking-blockchains-next
              • Backward-closure
              • Last-blockchain-round
              • Dag-certificate-next
              • Omni-paths-def-and-implied
              • Ordered-blockchain
              • Simultaneous-induction
              • System-certificates
              • Last-anchor-def-and-init
              • Last-anchor-next
              • Dag-previous-quorum
              • Signed-certificates
              • Committed-anchor-sequences
              • Omni-paths
              • Last-anchor-voters
              • Unequivocal-dags
              • Nonforking-blockchains
              • Nonforking-anchors
              • Committed-redundant
              • Same-committees
              • Blockchain-redundant
            • Definition
            • Library-extensions
          • Aleovm
          • Leo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Community
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Signer-records

    Signer-record-p

    Check if (the state of) a signer has a record of a certificate author and round.

    Signature
    (signer-record-p author round vstate) → yes/no
    Arguments
    author — Guard (addressp author).
    round — Guard (posp round).
    vstate — Guard (validator-statep vstate).
    Returns
    yes/no — Type (booleanp yes/no).

    This is the case if the DAG has some certificate with the given author and round, or the given author and round are in the set of endorsed pairs. We express the first condition by saying that cert-with-author+round does not return nil. The signer is represented by its state vstate here.

    Definitions and Theorems

    Function: signer-record-p

    (defun signer-record-p (author round vstate)
      (declare (xargs :guard (and (addressp author)
                                  (posp round)
                                  (validator-statep vstate))))
      (let ((__function__ 'signer-record-p))
        (declare (ignorable __function__))
        (b* (((validator-state vstate) vstate)
             (author (address-fix author))
             (round (pos-fix round)))
          (or (and (cert-with-author+round author round vstate.dag)
                   t)
              (in (make-address+pos :address author
                                    :pos round)
                  vstate.endorsed)))))

    Theorem: booleanp-of-signer-record-p

    (defthm booleanp-of-signer-record-p
      (b* ((yes/no (signer-record-p author round vstate)))
        (booleanp yes/no))
      :rule-classes :rewrite)

    Theorem: signer-record-p-of-address-fix-author

    (defthm signer-record-p-of-address-fix-author
      (equal (signer-record-p (address-fix author)
                              round vstate)
             (signer-record-p author round vstate)))

    Theorem: signer-record-p-address-equiv-congruence-on-author

    (defthm signer-record-p-address-equiv-congruence-on-author
      (implies (address-equiv author author-equiv)
               (equal (signer-record-p author round vstate)
                      (signer-record-p author-equiv round vstate)))
      :rule-classes :congruence)

    Theorem: signer-record-p-of-pos-fix-round

    (defthm signer-record-p-of-pos-fix-round
      (equal (signer-record-p author (pos-fix round)
                              vstate)
             (signer-record-p author round vstate)))

    Theorem: signer-record-p-pos-equiv-congruence-on-round

    (defthm signer-record-p-pos-equiv-congruence-on-round
      (implies (acl2::pos-equiv round round-equiv)
               (equal (signer-record-p author round vstate)
                      (signer-record-p author round-equiv vstate)))
      :rule-classes :congruence)

    Theorem: signer-record-p-of-validator-state-fix-vstate

    (defthm signer-record-p-of-validator-state-fix-vstate
      (equal (signer-record-p author
                              round (validator-state-fix vstate))
             (signer-record-p author round vstate)))

    Theorem: signer-record-p-validator-state-equiv-congruence-on-vstate

    (defthm signer-record-p-validator-state-equiv-congruence-on-vstate
      (implies (validator-state-equiv vstate vstate-equiv)
               (equal (signer-record-p author round vstate)
                      (signer-record-p author round vstate-equiv)))
      :rule-classes :congruence)