• 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

    Change-param

    Modifying constructor for param structures.

    Syntax
    (change-param x 
                  [:prime <prime>] 
                  [:rate <rate>] 
                  [:capacity <capacity>] 
                  [:alpha <alpha>] 
                  [:full-rounds-half <full-rounds-half>] 
                  [:partial-rounds <partial-rounds>] 
                  [:constants <constants>] 
                  [:mds <mds>] 
                  [:rate-then-capacity-p <rate-then-capacity-p>] 
                  [:ascending-p <ascending-p>] 
                  [:partial-first-p <partial-first-p>]) 
    

    This is an often useful alternative to make-param.

    We construct a new param structure that is a copy of x, except that you can explicitly change some particular fields. Any fields you don't mention just keep their values from x.

    Definition

    This is an ordinary change- macro introduced by fty::defprod.

    Macro: change-param

    (defmacro change-param (x &rest args)
      (std::change-aggregate
           'param
           x args
           '((:prime . param->prime)
             (:rate . param->rate)
             (:capacity . param->capacity)
             (:alpha . param->alpha)
             (:full-rounds-half . param->full-rounds-half)
             (:partial-rounds . param->partial-rounds)
             (:constants . param->constants)
             (:mds . param->mds)
             (:rate-then-capacity-p . param->rate-then-capacity-p)
             (:ascending-p . param->ascending-p)
             (:partial-first-p . param->partial-first-p))
           'change-param
           'nil))