• 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
            • Sponge-fix
            • Sponge-equiv
            • Spongep
            • Make-sponge
            • Change-sponge
            • Sponge->stat
            • Sponge->mode
            • Sponge->index
            • 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
    • Sponge

    Sponge->index

    Get the index field from a sponge.

    Signature
    (sponge->index x) → index
    Arguments
    x — Guard (spongep x).
    Returns
    index — Type (natp index).

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

    Definitions and Theorems

    Function: sponge->index$inline

    (defun sponge->index$inline (x)
      (declare (xargs :guard (spongep x)))
      (declare (xargs :guard t))
      (let ((__function__ 'sponge->index))
        (declare (ignorable __function__))
        (mbe :logic
             (b* ((x (and t x)))
               (nfix (cdr (std::da-nth 2 x))))
             :exec (cdr (std::da-nth 2 x)))))

    Theorem: natp-of-sponge->index

    (defthm natp-of-sponge->index
      (b* ((index (sponge->index$inline x)))
        (natp index))
      :rule-classes :rewrite)

    Theorem: sponge->index$inline-of-sponge-fix-x

    (defthm sponge->index$inline-of-sponge-fix-x
      (equal (sponge->index$inline (sponge-fix x))
             (sponge->index$inline x)))

    Theorem: sponge->index$inline-sponge-equiv-congruence-on-x

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