• 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

    Paramp

    Recognizer for param structures.

    Signature
    (paramp x) → *

    Definitions and Theorems

    Function: paramp

    (defun paramp (x)
     (declare (xargs :guard t))
     (let ((__function__ 'paramp))
      (declare (ignorable __function__))
      (and
       (mbe
        :logic (and (alistp x)
                    (equal (strip-cars x)
                           '(prime rate capacity
                                   alpha full-rounds-half partial-rounds
                                   constants mds rate-then-capacity-p
                                   ascending-p partial-first-p)))
        :exec (fty::alist-with-carsp
                   x
                   '(prime rate capacity
                           alpha full-rounds-half partial-rounds
                           constants mds rate-then-capacity-p
                           ascending-p partial-first-p)))
       (b* ((prime (cdr (std::da-nth 0 x)))
            (rate (cdr (std::da-nth 1 x)))
            (capacity (cdr (std::da-nth 2 x)))
            (alpha (cdr (std::da-nth 3 x)))
            (full-rounds-half (cdr (std::da-nth 4 x)))
            (partial-rounds (cdr (std::da-nth 5 x)))
            (?constants (cdr (std::da-nth 6 x)))
            (?mds (cdr (std::da-nth 7 x)))
            (rate-then-capacity-p (cdr (std::da-nth 8 x)))
            (ascending-p (cdr (std::da-nth 9 x)))
            (partial-first-p (cdr (std::da-nth 10 x))))
         (and (primep prime)
              (posp rate)
              (posp capacity)
              (integerp alpha)
              (natp full-rounds-half)
              (natp partial-rounds)
              (booleanp rate-then-capacity-p)
              (booleanp ascending-p)
              (booleanp partial-first-p)
              (fe-list-listp constants prime)
              (all-len-equal-p constants (+ rate capacity))
              (equal (len constants)
                     (+ (* 2 full-rounds-half)
                        partial-rounds))
              (fe-list-listp mds prime)
              (all-len-equal-p mds (+ rate capacity))
              (equal (len mds) (+ rate capacity)))))))

    Theorem: consp-when-paramp

    (defthm consp-when-paramp
      (implies (paramp x) (consp x))
      :rule-classes :compound-recognizer)