Validation client 1: schema_inner_equation, relationally #
A relational re-proof of schema_inner_equation
(PlonkLean/RO/OneWayness_GameHop/GuessExperiment.lean), the per-σ', t
correspondence between the match-tracking game (set a target, flag matches
on the fly) and the recording game (record all queries, compare at the
end).
The unary original needs ≈950 lines (state-alignment via wp_shift_input,
three EquivModuloLens chains, a bespoke invariant-agreement loop
induction, maxHeartbeats 1600000). Relationally it is one synchronized
loop invariant:
Inv σ₁ σ₂ := ∃ l, σ₂ = qs.set l (matched.set m₀ (target.set tv₀ σ₁))
∧ matched.get σ₁ = decide (t ∈ l)
("the recording state is the matching state with the three bookkeeping
lenses overwritten, and the matched flag agrees with membership in the
recorded list"), threaded through relE.loop_n and relE.bind. The shared
query q relates to itself across the lens overwrite by self_lens_set
(× 3, composed with relE.trans), framed by the matched-flag value.
Note the statement is more general than the original: generic in the
state type, and no Fintype/Nonempty assumptions on T.
schema_inner_equation, relationally. Same statement as the unary
original, but generic in the state type, without Fintype/Nonempty
assumptions on T, and needing only two of the original's three
disjointness assumptions.