• 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

    Sub-words-full

    Apply the full S-box substitution to the state vector.

    Signature
    (sub-words-full stat alpha prime) → new-stat
    Arguments
    stat — Guard (fe-listp stat prime).
    alpha — Guard (integerp alpha).
    prime — Guard (primep prime).
    Returns
    new-stat — Type (fe-listp new-stat prime), given (primep prime).

    We raise to the \alpha power every element of the state vector.

    Definitions and Theorems

    Function: sub-words-full

    (defun sub-words-full (stat alpha prime)
      (declare (xargs :guard (and (integerp alpha)
                                  (primep prime)
                                  (fe-listp stat prime))))
      (let ((__function__ 'sub-words-full))
        (declare (ignorable __function__))
        (cond ((endp stat) nil)
              (t (cons (pow-by-alpha (car stat) alpha prime)
                       (sub-words-full (cdr stat)
                                       alpha prime))))))

    Theorem: fe-listp-of-sub-wordsfull

    (defthm fe-listp-of-sub-wordsfull
      (implies (primep prime)
               (b* ((new-stat (sub-words-full stat alpha prime)))
                 (fe-listp new-stat prime)))
      :rule-classes :rewrite)

    Theorem: len-of-sub-words-full

    (defthm len-of-sub-words-full
      (b* ((?new-stat (sub-words-full stat alpha prime)))
        (equal (len new-stat) (len stat))))