While this submission is a draft, it cannot be used by other submissions.

A fixed tester for all relations on the powered alphabet

Lax956329.UniversalTester · concepts/Lax956329/UniversalTester.lean · lax-956329

proven

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Lemma

    The same 22 query addresses work for every binary relation on a fixed finite alphabet. Each address names a shared endpoint bit, a hardwired relation bit, or a private proof bit. A rejected decoded pair fails on at least 1/321/32 of the random strings for every private proof.

    Concept map
    2 concepts; 2 descendants hidden
    100%
    Proven claimThis conceptRelated conceptA → B: B builds on A
    Evidence

    Each proof establishes this claim relative to its assumptions.

    Lean source view on GitHub

    1import Lax956329.TesterDistance
    2import Mathlib.Data.ZMod.Basic
    3
    4/-!
    5---
    6title: A fixed tester for all relations on the powered alphabet
    7type: lemma
    8---
    9The same 22 query addresses work for every binary relation on a fixed finite
    10alphabet. Each address names a shared endpoint bit, a hardwired relation
    11bit, or a private proof bit. A rejected decoded pair fails on at least
    121/321/32 of the random strings for every private proof.
    13-/
    14
    15namespace Lax956329.UniversalTester
    16
    17abbrev Bit := ZMod 2
    18abbrev Rel (a : ℕ) := Fin a → Fin a → Bool
    19
    20inductive Site (I V : Type)
    21 | left : I → Site I V
    22 | right : I → Site I V
    23 | relation : I → Site I V
    24 | aux : V → Site I V
    25
    26def Site.read {I V : Type} (x y r : I → Bit) (p : V → Bit) : Site I V → Bit
    27 | .left i => x i
    28 | .right i => y i
    29 | .relation i => r i
    30 | .aux v => p v
    31
    32structure Gadget (a : ℕ) where
    33 Index : Type
    34 Private : Type
    35 Coin : Type
    36 indices : Fintype Index
    37 privateIndices : Fintype Private
    38 coins : Fintype Coin
    39 positive : Nonempty Coin
    40 query : Coin → Fin 22 → Site Index Private
    41 verdict : Coin → (Fin 22 → Bit) → Bool
    42 code : Fin a → Index → Bit
    43 decode : (Index → Bit) → Fin a
    44 relation : Rel a → Index → Bit
    45
    46attribute [instance] Gadget.indices Gadget.privateIndices Gadget.coins Gadget.positive
    47
    48def Gadget.check {a : ℕ} (G : Gadget a) (r : Rel a) (x y : G.Index → Bit)
    49 (p : G.Private → Bit) (z : G.Coin) : Bool :=
    50 G.verdict z (fun i => (G.query z i).read x y (G.relation r) p)
    51
    52axiom universal (a : ℕ) (ha : 0 < a) : ∃ G : Gadget a,
    53 (∀ r u v, r u v = true → ∃ p, ∀ z, G.check r (G.code u) (G.code v) p z = true) ∧
    54 (∀ r x y, r (G.decode x) (G.decode y) = false → ∀ p,
    55 Fintype.card G.Coin ≤ 32*(Finset.univ.filter (fun z => G.check r x y p z = false)).card)
    56
    57end Lax956329.UniversalTester
    58
    Show Proof

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…