Documentation

CslibFrontier.Computability.Communication.Lifting.UnsafeWitness

Unsafe values have conditional parity witnesses #

Supported conditioning assignments are represented canonically by their values on the conditioned coordinates and zero elsewhere. Thus counting witnesses need not pay for irrelevant coordinates. The witness conversion below joins the pointwise safety criterion to the sampling-tail API.

def Cslib.Communication.Lifting.ParityTest.extendAssignment {n m : ℕ} [NeZero m] (J : Finset (Fin n)) (a : ↥J → Fin m) :
Fin n → Fin m

Extend a partial conditioning assignment by zero outside its domain.

Canonical witnesses carry no arbitrary data on unconditioned coordinates.

theorem Cslib.Communication.Lifting.ParityTest.agreeOn_extend_restrict {n m : ℕ} [NeZero m] (Y : Finset (Fin n → Fin m)) (J : Finset (Fin n)) (α : Fin n → Fin m) :
agreeOn Y J (extendAssignment J (J.restrict α)) = agreeOn Y J α

Canonically extending the restriction of an assignment does not change its conditioning slice.

def Cslib.Communication.Lifting.ParityTest.ofPartial {n m : ℕ} [NeZero m] {F : Finset (Fin n)} {Y : Finset (Fin n → Fin m)} (S J : Finset (Fin n)) (a : ↥J → Fin m) (hS : S ⊆ F) (hJ : J ⊆ F) (hd : Disjoint J S) (ha : (agreeOn Y J (extendAssignment J a)).Nonempty) :

Construct a supported parity test from a partial conditioning assignment.

theorem Cslib.Communication.Lifting.ParityTest.ofPartial_isCanonical {n m : ℕ} [NeZero m] {F : Finset (Fin n)} {Y : Finset (Fin n → Fin m)} (S J : Finset (Fin n)) (a : ↥J → Fin m) (hS : S ⊆ F) (hJ : J ⊆ F) (hd : Disjoint J S) (ha : (agreeOn Y J (extendAssignment J a)).Nonempty) :
(ofPartial S J a hS hJ hd ha).IsCanonical

Partial-assignment witnesses are canonical.

theorem Cslib.Communication.Lifting.ParityTest.bias_eq_sum {n m : ℕ} {F : Finset (Fin n)} {Y : Finset (Fin n → Fin m)} (w : ParityTest F Y) (g : Fin m → Fin m → Bool) (x : Fin n → Fin m) :
w.bias g x = |∑ y : Fin n → Fin m, ((Probability.PMF.uniformOfFinset (agreeOn Y w.conditioned w.assignment) ⋯) y).toReal * BitString.chi ℝ w.parity fun (i : Fin n) => g (x i) (y i)|

Evaluate a conditional parity test directly on the original source.

theorem Cslib.Communication.Lifting.ParityTest.bias_eq_outputLaw {n m : ℕ} {F I J : Finset (Fin n)} {Y : Finset (Fin n → Fin m)} (w : ParityTest F Y) (g : Fin m → Fin m → Bool) (x : Fin n → Fin m) (S : Finset ↥I) (α : Fin n → Fin m) (hA : (agreeOn Y J α).Nonempty) (hp : w.parity = Finset.map (Function.Embedding.subtype fun (x : Fin n) => x ∈ I) S) (ha : agreeOn Y w.conditioned w.assignment = agreeOn Y J α) :
w.bias g x = |BitString.bias (gadgetOutputLaw g (agreeOn Y J α) hA I x) S|

A parity of a gadget output law is exactly the corresponding conditional parity test.

theorem Cslib.Communication.Lifting.exists_canonical_parityTest {n m : ℕ} [NeZero m] {F I J : Finset (Fin n)} {Y : Finset (Fin n → Fin m)} (hI : I ⊆ F) (hJ : J ⊆ F \ I) (S : Finset ↥I) (α : Fin n → Fin m) (hA : (agreeOn Y J α).Nonempty) (g : Fin m → Fin m → Bool) (x : Fin n → Fin m) :

A conditional parity on an output subset has a canonical supported test with the same bias. The larger output set I is absent from the test itself.

theorem Cslib.Communication.Lifting.exists_parityTest_of_not_isSafe {n m : ℕ} [NeZero m] (g : Fin m → Fin m → Bool) (σ : ℝ) (F : Finset (Fin n)) (Y : Finset (Fin n → Fin m)) (hY : Y.Nonempty) (hσ : 0 ≤ σ) (order : Finset (Fin n) → (J : Finset (Fin n)) → (↥J → Fin m) → ℕ) (horder : ∀ I ⊆ F, ∀ J ⊆ F \ I, J.Nonempty → ∀ (a : ↥J → Fin m), (agreeOn Y J (ParityTest.extendAssignment J a)).Nonempty → 1 ≤ order I J a ∧ 2 * (↑{S : Finset ↥I | S.card < order I J a}.card + 1) * σ ^ J.card * ↑(agreeOn Y J (ParityTest.extendAssignment J a)).card ≤ ↑Y.card) (x : Fin n → Fin m) (hunsafe : ¬IsSafe g σ F Y x) :
∃ (I : Finset (Fin n)) (w : ParityTest F Y), I ⊆ F ∧ w.IsCanonical ∧ w.parity ⊆ I ∧ w.parity.Nonempty ∧ (w.conditioned = ∅ ∨ w.conditioned.Nonempty ∧ w.conditioned ⊆ F \ I ∧ order I w.conditioned (w.conditioned.restrict w.assignment) ≤ w.parity.card) ∧ 1 / 2 * (1 / (2 * ↑n)) ^ w.parity.card < w.bias g x

Every unsafe value has a canonical conditional parity witness. The integer order assigned to each conditioning slice must satisfy the explicit low-order-count budget. The witness is unconditional, or has at least that many parity coordinates. Its bias exceeds the uniform ambient threshold 1/2 * (2n)^(-|S|), independently of the larger output set used to find it.

This is a explicit witness reduction, not a bound on the number of eligible witnesses.