Documentation

CslibFrontier.Foundations.Algebra.Group.HomomorphismTesting

Homomorphism testing on finite abelian groups #

Uniform rejection of the additive consistency test and plurality correction by the votes f (x + y) - f y. The domain and codomain may be trivial. For rejection ε < 1/6, every plurality correction is a homomorphism within normalized Hamming distance 2ε. The minimum over homomorphisms is attained and gives the unconditional source bound.

The proof uses a collision lower bound from two failing additive equations, then a union bound on three correction failures to prove additivity. A differing value of f forces at least half its votes to reject, giving the distance bound by averaging.

Main definitions #

Main results #

These are finite probability statements; no running time or representation is specified.

References #

noncomputable def Cslib.HomomorphismTesting.rejection {G : Type u_1} {H : Type u_2} [AddCommGroup G] [AddCommGroup H] [Fintype G] (f : G → H) :

Uniform independent rejection probability of the additive consistency test.

def Cslib.HomomorphismTesting.vote {G : Type u_1} {H : Type u_2} [AddCommGroup G] [AddCommGroup H] (f : G → H) (x y : G) :
H

A two-query vote for the value at x.

def Cslib.HomomorphismTesting.IsPlurality {G : Type u_1} {H : Type u_2} [AddCommGroup G] [AddCommGroup H] [Fintype G] (f φ : G → H) :

Every value has at most as many votes as the selected value. Ties are allowed.

theorem Cslib.HomomorphismTesting.exists_plurality {G : Type u_1} {H : Type u_2} [AddCommGroup G] [AddCommGroup H] [Fintype G] (f : G → H) :
∃ (φ : G → H), IsPlurality f φ

Plurality corrections exist without a tie-breaking convention.

@[simp]
theorem Cslib.HomomorphismTesting.rejection_hom {G : Type u_1} {H : Type u_2} [AddCommGroup G] [AddCommGroup H] [Fintype G] (f : G →+ H) :
rejection ⇑f = 0

An actual homomorphism passes every test.

theorem Cslib.HomomorphismTesting.collision_lower {G : Type u_1} {H : Type u_2} [AddCommGroup G] [AddCommGroup H] [Fintype G] (f : G → H) (x : G) :
1 - 2 * rejection f ≤ Finset.univ.expect fun (a : G) => Finset.univ.expect fun (b : G) => if vote f x a = vote f x b then 1 else 0

Independent votes for a fixed point agree with probability at least 1 - 2ε.

theorem Cslib.HomomorphismTesting.concentration {G : Type u_1} {H : Type u_2} [AddCommGroup G] [AddCommGroup H] [Fintype G] (f : G → H) {φ : G → H} (hφ : IsPlurality f φ) (x : G) :
1 - 2 * rejection f ≤ Finset.univ.expect fun (y : G) => if vote f x y = φ x then 1 else 0

Every plurality value carries mass at least 1 - 2ε.

theorem Cslib.HomomorphismTesting.correction_error {G : Type u_1} {H : Type u_2} [AddCommGroup G] [AddCommGroup H] [Fintype G] (f : G → H) {φ : G → H} (hφ : IsPlurality f φ) (x : G) :
(Finset.univ.expect fun (y : G) => if φ x ≠ vote f x y then 1 else 0) ≤ 2 * rejection f

The error probability of the correction at each point is at most 2ε.

theorem Cslib.HomomorphismTesting.plurality_add {G : Type u_1} {H : Type u_2} [AddCommGroup G] [AddCommGroup H] [Fintype G] (f : G → H) {φ : G → H} (hφ : IsPlurality f φ) (hε : rejection f < 1 / 6) (x y : G) :
φ (x + y) = φ x + φ y

Below rejection 1/6, every plurality correction preserves addition.

noncomputable def Cslib.HomomorphismTesting.correction {G : Type u_1} {H : Type u_2} [AddCommGroup G] [AddCommGroup H] [Fintype G] (f : G → H) {φ : G → H} (hφ : IsPlurality f φ) (hε : rejection f < 1 / 6) :
G →+ H

The plurality correction bundled as an additive homomorphism.

theorem Cslib.HomomorphismTesting.closeness {G : Type u_1} {H : Type u_2} [AddCommGroup G] [AddCommGroup H] [Fintype G] (f : G → H) {φ : G → H} (hφ : IsPlurality f φ) (hε : rejection f < 1 / 6) :
↑(hammingDist f φ) / ↑(Fintype.card G) ≤ 2 * rejection f

Below rejection 1/6, the plurality correction differs on at most 2ε of the domain.

def Cslib.HomomorphismTesting.OnlyFirstDisagreement {G : Type u_1} {H : Type u_2} [AddCommGroup G] [AddCommGroup H] (f : G → H) (h : G →+ H) (x y : G) :

Disagreement only at the first query, among x, y, and x + y.

theorem Cslib.HomomorphismTesting.disagreement_sub_two_sq_le_onlyFirst {G : Type u_1} {H : Type u_2} [AddCommGroup G] [AddCommGroup H] [Fintype G] (f : G → H) (h : G →+ H) :
have d := ↑(hammingDist f ⇑h) / ↑(Fintype.card G); d - 2 * d ^ 2 ≤ Finset.univ.expect fun (x : G) => Finset.univ.expect fun (y : G) => if OnlyFirstDisagreement f h x y then 1 else 0

Goldreich r5 Exercise 9.20(2), for any supplied homomorphism, not just a closest one.

theorem Cslib.HomomorphismTesting.three_mul_onlyFirst_le_rejection {G : Type u_1} {H : Type u_2} [AddCommGroup G] [AddCommGroup H] [Fintype G] (f : G → H) (h : G →+ H) :
(3 * Finset.univ.expect fun (x : G) => Finset.univ.expect fun (y : G) => if OnlyFirstDisagreement f h x y then 1 else 0) ≤ rejection f

Goldreich r5 Exercise 9.20(1): rejection dominates three times the first-only event. Nearestness is unnecessary: all three exactly-one events have the same probability, since individual disagreement means are d, pairwise means are d², and the triple term is shared.

theorem Cslib.HomomorphismTesting.three_mul_disagreement_sub_six_sq_le_rejection {G : Type u_1} {H : Type u_2} [AddCommGroup G] [AddCommGroup H] [Fintype G] (f : G → H) (h : G →+ H) :
have d := ↑(hammingDist f ⇑h) / ↑(Fintype.card G); 3 * d - 6 * d ^ 2 ≤ rejection f

The quadratic rejection bound at the actual disagreement with any homomorphism.

theorem Cslib.HomomorphismTesting.exists_closest {G : Type u_1} {H : Type u_2} [AddCommGroup G] [AddCommGroup H] [Fintype G] [Finite H] (f : G → H) :
∃ (h : G →+ H), ∀ (k : G →+ H), hammingDist f ⇑h ≤ hammingDist f ⇑k

A closest additive homomorphism exists, including for trivial groups.

noncomputable def Cslib.HomomorphismTesting.distance {G : Type u_1} {H : Type u_2} [AddCommGroup G] [AddCommGroup H] [Fintype G] [Fintype H] (f : G → H) :

Minimum normalized disagreement with an additive homomorphism.

theorem Cslib.HomomorphismTesting.distance_attained {G : Type u_1} {H : Type u_2} [AddCommGroup G] [AddCommGroup H] [Fintype G] [Fintype H] (f : G → H) :
∃ (h : G →+ H), distance f = ↑(hammingDist f ⇑h) / ↑(Fintype.card G)

The minimum distance is attained by a bundled homomorphism.

theorem Cslib.HomomorphismTesting.distance_le {G : Type u_1} {H : Type u_2} [AddCommGroup G] [AddCommGroup H] [Fintype G] [Fintype H] (f : G → H) (h : G →+ H) :
distance f ≤ ↑(hammingDist f ⇑h) / ↑(Fintype.card G)

The minimum distance is bounded by disagreement with any homomorphism.

theorem Cslib.HomomorphismTesting.min_le_rejection {G : Type u_1} {H : Type u_2} [AddCommGroup G] [AddCommGroup H] [Fintype G] [Fintype H] (f : G → H) :
min (1 / 6) (distance f / 2) ≤ rejection f

Goldreich Exercise 9.21: rejection is at least min (1/6) (δ/2).

Goldreich r5 Exercise 9.20: the unconditional quadratic bound at minimum distance.