• 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
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Riscv
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Poseidon
        • Poseidon-main-definition
          • Param
            • Param-fix
            • Paramp
            • Make-param
            • Param->prime
            • Param-equiv
            • Param->rate-then-capacity-p
            • Param->partial-first-p
            • Change-param
            • Param->full-rounds-half
            • Param->constants
            • Param->ascending-p
            • Param->partial-rounds
            • Param->mds
            • Param->capacity
              • Param->rate
              • Param->alpha
            • Hashp
            • Absorb1
            • Sponge
            • Hash
            • All-rounds
            • Sponge-validp
            • Squeeze1
            • Sub-words-partial
            • Squeeze
            • Round
            • Partial-rounds
            • Mode
            • Full-rounds
            • Permute
            • Sub-words
            • Add-round-constants
            • Mix-layer
            • Dot-product
            • Absorb
            • Pow-by-alpha
            • Param->size
            • Sub-words-full
            • Param->capacity-then-rate-p
            • Param->partial-last-p
            • Param-additional-theorems
            • Param->rounds
            • Param->descending-p
            • Init-sponge
          • Poseidon-instantiations
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Param

    Param->capacity

    Get the capacity field from a param.

    Signature
    (param->capacity x) → capacity
    Arguments
    x — Guard (paramp x).
    Returns
    capacity — Type (posp capacity).

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

    Definitions and Theorems

    Function: param->capacity$inline

    (defun param->capacity$inline (x)
      (declare (xargs :guard (paramp x)))
      (declare (xargs :guard t))
      (let ((__function__ 'param->capacity))
        (declare (ignorable __function__))
        (mbe :logic
             (b* ((x (and t x)))
               (acl2::pos-fix (cdr (std::da-nth 2 x))))
             :exec (cdr (std::da-nth 2 x)))))

    Theorem: posp-of-param->capacity

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

    Theorem: param->capacity$inline-of-param-fix-x

    (defthm param->capacity$inline-of-param-fix-x
      (equal (param->capacity$inline (param-fix x))
             (param->capacity$inline x)))

    Theorem: param->capacity$inline-param-equiv-congruence-on-x

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