• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Pfcs
      • Wp-gen
      • Dimacs-reader
      • 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
          • Definition
            • Initialization
            • Transitions
            • States
              • Committees
              • System-states
              • Certificates
              • Messages
              • Transactions
              • Proposals
              • Validator-states
              • Blocks
                • Blocks-last-round
                • Blocks-orderedp
                • Block
                  • Block-fix
                  • Block-equiv
                  • Make-block
                  • Block->transactions
                  • Change-block
                  • Block->round
                    • Blockp
                  • Block-list
                • Addresses
              • Events
              • Reachability
            • 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
    • Block

    Block->round

    Get the round field from a block.

    Signature
    (block->round x) → round
    Arguments
    x — Guard (blockp x).
    Returns
    round — Type (posp round).

    This is an ordinary field accessor created by fty::defprod.

    Definitions and Theorems

    Function: block->round$inline

    (defun block->round$inline (x)
     (declare (xargs :guard (blockp x)))
     (declare (xargs :guard t))
     (let ((__function__ 'block->round))
      (declare (ignorable __function__))
      (mbe
        :logic
        (b*
          ((x (and t x))
           (transactions (transaction-list-fix (cdr (std::da-nth 0 x))))
           (round (pos-fix (cdr (std::da-nth 1 x)))))
          (if (evenp round) round 2))
        :exec (cdr (std::da-nth 1 x)))))

    Theorem: posp-of-block->round

    (defthm posp-of-block->round
      (b* ((round (block->round$inline x)))
        (posp round))
      :rule-classes :rewrite)

    Theorem: block->round$inline-of-block-fix-x

    (defthm block->round$inline-of-block-fix-x
      (equal (block->round$inline (block-fix x))
             (block->round$inline x)))

    Theorem: block->round$inline-block-equiv-congruence-on-x

    (defthm block->round$inline-block-equiv-congruence-on-x
      (implies (block-equiv x x-equiv)
               (equal (block->round$inline x)
                      (block->round$inline x-equiv)))
      :rule-classes :congruence)