Skip to content

Add directed partial-permutation table foundation for sponge proofs #469

Done

Description

@MarcIlunga

Background

How can proofs for permutation-based sponge constructions reason about directed partial-permutation query transcripts, capacity collision avoidance, and rooted-path uniqueness without duplicating the table bookkeeping per concrete hash function?

The Commons.Schemes layer currently includes concrete Keccak-f[1600] evaluation (Commons.Schemes.Hash.Keccak), but does not yet provide a reusable abstract directed partial-permutation edge table parameterized over an arbitrary state type State.

Proposed change

Add Commons.Schemes.Sponge.Table (src/Commons/Schemes/Sponge/Table.lean):

  • Directed partial-permutation edges and constraints:
    • PermutationEdge State (input, output, inverse, freshEndpoint), forwardOutputs, inverseInputs, permutation agreement AgreesWith, deduplicating insertion (queryEdge, insertEdge), distinct constraint pairs recordedPairs, and occupiedCapacities.
    • Exact constraint equivalences: insertEdge_agrees_iff, insertEdge_query_agrees_iff, recordedPairs_agrees_iff, and cardinality bounds (occupiedCapacities_card_le, recordedPairs_card_le).
  • Decoupled capacity collision-freeness and orthogonal digest injectivity:
    • CapacityCollisionFree capacity zeroCap table and AvoidsOccupiedCapacity capacity zeroCap table edge (capacity edge.freshEndpoint ∉ occupiedCapacities capacity zeroCap table), with rooted_edge_forward, capacityCollisionFree_append, capacityCollisionFree_insertEdge, and reached_capacity_injective.
    • Orthogonal digest injectivity helpers digest_injOn_append and digest_injOn_insertEdge.
  • Abstract absorption path recording and path uniqueness:
    • absorbBlocks, absorptionCalls, and recordAbsorption, with recordAbsorption_local (locality to covered edges) and blocks_eq_of_absorbBlocks_eq (unique recovery of covered rooted paths from their final state).

Acceptance criteria

  • Tests.SpongeTable verifies:
    • Preserving CapacityCollisionFree under forward insertion, inverse insertion, and duplicate-input replay via capacityCollisionFree_insertEdge.
    • Preserving orthogonal digest injectivity via digest_injOn_insertEdge.
    • Exact forward and inverse query constraint equivalence via insertEdge_query_agrees_iff and recordedPairs_agrees_iff.
    • Polymorphic absorption locality (recordAbsorption_local) and rooted-path uniqueness on a product state (blocks_eq_of_absorbBlocks_eq).
    • #print axioms on key exported theorems confirming dependence only on propext, Classical.choice, and Quot.sound.
  • lake build --wfail, scripts/check-sources.sh, scripts/check-axioms.sh, and lake env lean -Dweak.linter.mathlibStandardSet=true pass with zero warnings.

Activity

  1. changed the title [-]Add generic sponge construction and partial-permutation table foundation[/-] [+]Add directed partial-permutation table foundation for sponge proofs[/+] on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions