• 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
          • 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
    • Poseidon-main-definition

    Param->rounds

    Total number of rounds, i.e. 2 R_f + R_P = R_F + R_P.

    Signature
    (param->rounds param) → rounds
    Arguments
    param — Guard (paramp param).
    Returns
    rounds — Type (natp rounds).

    Definitions and Theorems

    Function: param->rounds

    (defun param->rounds (param)
      (declare (xargs :guard (paramp param)))
      (let ((__function__ 'param->rounds))
        (declare (ignorable __function__))
        (+ (param->full-rounds-half param)
           (param->partial-rounds param)
           (param->full-rounds-half param))))

    Theorem: natp-of-param->rounds

    (defthm natp-of-param->rounds
      (b* ((rounds (param->rounds param)))
        (natp rounds))
      :rule-classes :rewrite)

    Theorem: param->rounds-of-param-fix-param

    (defthm param->rounds-of-param-fix-param
      (equal (param->rounds (param-fix param))
             (param->rounds param)))

    Theorem: param->rounds-param-equiv-congruence-on-param

    (defthm param->rounds-param-equiv-congruence-on-param
      (implies (param-equiv param param-equiv)
               (equal (param->rounds param)
                      (param->rounds param-equiv)))
      :rule-classes :congruence)