Linear equations #
This file defines the LINEQ language, its executable LPCP verifier, and the linear PCP theorem for LINEQ.
theorem
LINEQ.coordinate_zero_card_div_le
{F : Type}
[Field F]
[Fintype F]
[DecidableEq F]
{m : ℕ}
(k : Fin m)
:
theorem
LINEQ.uniform_coordinate_zero_prob_mul_card_le_one
{F : Type}
[Field F]
[Fintype F]
[DecidableEq F]
[Inhabited F]
[SampleableType F]
{m : ℕ}
(k : Fin m)
:
def
LINEQ.decodeUniformFin
(α : Type)
[Fintype α]
[Encodable α]
[Nonempty α]
:
Fin (Fintype.card α - 1 + 1) → α
Equations
Instances For
def
LINEQ.sampleRandomVector
(m n : ℕ)
(F : Type)
[Field F]
[Fintype F]
[Encodable F]
[DecidableEq F]
[Inhabited F]
:
OracleComp (LPCPOracleSpec F n) (Fin m → F)
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
LINEQ.verifier
{F : Type}
[Field F]
[Fintype F]
[DecidableEq F]
[Inhabited F]
{m n : ℕ}
[Encodable F]
:
Equations
- LINEQ.verifier x = do let r ← LINEQ.sampleRandomVector m n F have u : Fin n → F := x.1.transpose.mulVec r let y ← liftM (OracleQuery.query (Sum.inr u)) pure (decide (y = x.2 ⬝ᵥ r))
Instances For
theorem
LINEQ.verifier_queryBound
{F : Type}
[Field F]
[Fintype F]
[DecidableEq F]
[Inhabited F]
{m n : ℕ}
[Encodable F]
(x : Matrix (Fin m) (Fin n) F × (Fin m → F))
:
QueryBound (verifier x) 1 (m * Nat.clog 2 (Fintype.card F))
theorem
LINEQ_LPCP
{F : Type}
[Field F]
[Fintype F]
[DecidableEq F]
[Inhabited F]
[SampleableType F]
{m n : ℕ}
:
LINEQ F m n ∈ LPCP LINEQ.size 0 (1 / ↑(Fintype.card F)) F (fun (x : ℕ) => n) (fun (x : ℕ) => 1) fun (x : ℕ) =>
m * Nat.clog 2 (Fintype.card F)