Documentation

CslibFrontier.Computability.Communication.Lifting.SafeParities

Parity criteria for safe values #

The output law on a coordinate set makes the pointwise Vazirani estimates applicable to gadget fibers. Conditional estimates retain the size of the conditioning slice, including rare slices. The integer threshold is explicit: this avoids rounding and sign ambiguities when specializing the high-order parity criterion in CFKMP Claim 3.14. No rare-dangerous-values estimate is assumed or proved here.

Main results #

noncomputable def Cslib.Communication.Lifting.gadgetOutputLaw {n m : ℕ} (g : Fin m → Fin m → Bool) (Y : Finset (Fin n → Fin m)) (hY : Y.Nonempty) (I : Finset (Fin n)) (x : Fin n → Fin m) :
PMF (↥I → Bool)

The gadget outputs on I when Bob's input is uniform on a nonempty finite set.

theorem Cslib.Communication.Lifting.bias_gadgetOutputLaw {n m : ℕ} (g : Fin m → Fin m → Bool) (Y : Finset (Fin n → Fin m)) (hY : Y.Nonempty) (I : Finset (Fin n)) (x : Fin n → Fin m) (S : Finset ↥I) :
BitString.bias (gadgetOutputLaw g Y hY I x) S = ∑ y : Fin n → Fin m, ((Probability.PMF.uniformOfFinset Y hY) y).toReal * BitString.chi ℝ (Finset.map (Function.Embedding.subtype fun (x : Fin n) => x ∈ I) S) fun (i : Fin n) => g (x i) (y i)

Output parity tests are ambient-coordinate parity tests; their description does not depend on the larger output set containing the tested coordinates.

theorem Cslib.Communication.Lifting.gadgetOutputLaw_apply {n m : ℕ} (g : Fin m → Fin m → Bool) (Y : Finset (Fin n → Fin m)) (hY : Y.Nonempty) (I : Finset (Fin n)) (x : Fin n → Fin m) (β : Fin n → Bool) :
((gadgetOutputLaw g Y hY I x) (I.restrict β)).toReal = ↑(gadgetFiber g Y I x β).card / ↑Y.card

An output atom is the cardinality ratio of its gadget fiber.

theorem Cslib.Communication.Lifting.nonleaking_of_parity_bias_le {n m : ℕ} (g : Fin m → Fin m → Bool) (Y : Finset (Fin n → Fin m)) (hY : Y.Nonempty) (I : Finset (Fin n)) (x : Fin n → Fin m) (hbias : ∀ (S : Finset ↥I), S.Nonempty → |BitString.bias (gadgetOutputLaw g Y hY I x) S| ≤ 1 / 2 * (1 / (2 * ↑I.card)) ^ S.card) (β : Fin n → Bool) :
↑Y.card ≤ 2 ^ (I.card + 1) * ↑(gadgetFiber g Y I x β).card

Pointwise parity bounds prevent leaking, including empty output sets.

theorem Cslib.Communication.Lifting.gadgetFiber_card_le_of_high_order_bias_le {n m : ℕ} (g : Fin m → Fin m → Bool) (Y : Finset (Fin n → Fin m)) (hY : Y.Nonempty) (I : Finset (Fin n)) (x : Fin n → Fin m) {t : ℕ} (ht : 1 ≤ t) (hbias : ∀ (S : Finset ↥I), t ≤ S.card → |BitString.bias (gadgetOutputLaw g Y hY I x) S| ≤ (1 / (2 * ↑I.card)) ^ S.card) (β : Fin n → Bool) :
2 ^ I.card * ↑(gadgetFiber g Y I x β).card ≤ (↑{S : Finset ↥I | S.card < t}.card + 1) * ↑Y.card

High-order parity estimates bound a fiber, with the exact low-order subset count retained. This applies even when I has zero or one coordinate.

theorem Cslib.Communication.Lifting.isSafe_of_parity_bias_le {n m : ℕ} (g : Fin m → Fin m → Bool) (σ : ℝ) (F : Finset (Fin n)) (Y : Finset (Fin n → Fin m)) (hY : Y.Nonempty) (x : Fin n → Fin m) (hσ : 0 ≤ σ) (hunconditional : ∀ I ⊆ F, ∀ (S : Finset ↥I), S.Nonempty → |BitString.bias (gadgetOutputLaw g Y hY I x) S| ≤ 1 / 2 * (1 / (2 * ↑I.card)) ^ S.card) (hconditional : ∀ I ⊆ F, ∀ J ⊆ F \ I, J.Nonempty → ∀ (α : Fin n → Fin m) (hA : (agreeOn Y J α).Nonempty), ∃ (t : ℕ), 1 ≤ t ∧ (∀ (S : Finset ↥I), t ≤ S.card → |BitString.bias (gadgetOutputLaw g (agreeOn Y J α) hA I x) S| ≤ (1 / (2 * ↑I.card)) ^ S.card) ∧ 2 * (↑{S : Finset ↥I | S.card < t}.card + 1) * σ ^ J.card * ↑(agreeOn Y J α).card ≤ ↑Y.card) :
IsSafe g σ F Y x

A sufficient parity criterion for safety. Conditional high-order estimates are required only above an explicit positive integer threshold; the exact number of lower-order parities is paid for by the slice-size inequality. This is the finite-threshold form of the mechanism in CFKMP Claim 3.14, keeping its numerical specialization separate.