• 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->mds

    Get the mds field from a param.

    Signature
    (param->mds x) → fty::x.name
    Arguments
    x — Guard (paramp x).

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

    Definitions and Theorems

    Function: param->mds$inline

    (defun param->mds$inline (x)
     (declare (xargs :guard (paramp x)))
     (declare (xargs :guard t))
     (let ((__function__ 'param->mds))
      (declare (ignorable __function__))
      (mbe
       :logic
       (b*
        ((x (and t x))
         (prime (prime-fix (cdr (std::da-nth 0 x))))
         (rate (acl2::pos-fix (cdr (std::da-nth 1 x))))
         (capacity (acl2::pos-fix (cdr (std::da-nth 2 x))))
         (alpha (ifix (cdr (std::da-nth 3 x))))
         (full-rounds-half (nfix (cdr (std::da-nth 4 x))))
         (partial-rounds (nfix (cdr (std::da-nth 5 x))))
         (constants (cdr (std::da-nth 6 x)))
         (mds (cdr (std::da-nth 7 x)))
         (rate-then-capacity-p (acl2::bool-fix (cdr (std::da-nth 8 x))))
         (ascending-p (acl2::bool-fix (cdr (std::da-nth 9 x))))
         (partial-first-p (acl2::bool-fix (cdr (std::da-nth 10 x)))))
        (if (and (fe-list-listp mds prime)
                 (all-len-equal-p mds (+ rate capacity))
                 (equal (len mds) (+ rate capacity)))
            mds
          (repeat (+ rate capacity)
                  (repeat (+ rate capacity) 0))))
       :exec (cdr (std::da-nth 7 x)))))

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

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

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

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