All proofs
Project-declaredLean 4.33.0-rc1 · mathlib@79d0395a1825

Card of dual constrained

card_of_dual_constrained

Plain-language statement

In the ambient finite F2\mathbb F_2-vector space, exactly half of the additive homomorphisms φ:GF2\varphi:G\to\mathbb F_2 take a fixed nonzero vector xx to 11: 2{φ:φ(x)=1}=G2\,|\{\varphi:\varphi(x)=1\}|=|G|.

Exact Lean statement

theorem card_of_dual_constrained [Finite G] (x : G) (hx : x ≠ 0) :
    2 * Nat.card { φ: G →+ ZMod 2 | φ x = 1 } = Nat.card G

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
theorem card_of_dual_constrained [Finite G] (x : G) (hx : x  0) :    2 * Nat.card { φ: G →+ ZMod 2 | φ x = 1 } = Nat.card G := by  suffices h_eq_card :      Nat.card {φ : G →+ ZMod 2 | φ x = 1} = Nat.card {φ : G →+ ZMod 2 | φ x = 0} by    have h_eq_card :        Nat.card {φ : G →+ ZMod 2 | φ x = 1} + Nat.card {φ : G →+ ZMod 2 | φ x = 0} =          Nat.card (G →+ ZMod 2) := by      -- These two sets partition the set of all homomorphisms from $G$ to $\mathbb{Z}/2\mathbb{Z}$.      trans Nat.card (Set.univ : Set (G →+ ZMod 2))      · -- Since these two sets partition the set of all homomorphisms from $G$ to        -- $\mathbb{Z}/2\mathbb{Z}$, their cardinalities add up to the cardinality of the whole set.        have h_partition : {φ : G →+ ZMod 2 | φ x = 1} ∪ {φ : G →+ ZMod 2 | φ x = 0} = .univ := by          ext f          simp only [Set.mem_union, Set.mem_setOf_eq, Set.mem_univ, iff_true]          set y := f x          clear_value y          fin_cases y          all_goals simp; tauto        have _ := DFunLike.finite (G →+ ZMod 2)        rw [ h_partition, Nat.card_congr <| Equiv.Set.union <| Set.disjoint_left.mpr <| by          simp +contextual]        simp [Nat.card, Cardinal.toNat_add]      · simp    -- Since there are $|G|$ homomorphisms in total, we have $|G| = |H_1| + |H_0|$.    simp_all only [ne_eq, Set.coe_setOf, card_of_dual]    rw [ h_eq_card]; ring  -- Let $y$ be an additive character of $G$ such that $y(x) = 1$.  obtain y, hy :  (y : G →+ ZMod 2), y x = 1 := by    -- Since $G$ is finite, there exists $y : G →+ ZMod 2$ such that    -- $\forall z, y z = \sum_{z \in \{x\}} z$. Let's choose any such $y$.    set y := (Basis.ofVectorSpace (ZMod 2) G).equivFun.toLinearMap.toAddMonoidHom;    -- Since $x \neq 0$, there exists an index $i$ such that $y(x)(i) = 1$ by definition of $y$.    -- In particular, there exists an index $i$ such that $repr x i = 1$.    obtain i, hi :  i : Basis.ofVectorSpaceIndex (ZMod 2) G, (y x : _) i = 1 := by      have h_exists_i :  i, (Basis.ofVectorSpace (ZMod 2) G).repr x i  0 := by        contrapose! hx        apply Basis.ofVectorSpace (ZMod 2) G |> Basis.ext_elem        simp [hx]      exact h_exists_i.imp fun _ hi  (Fin.exists_fin_two.mp _, rfl).resolve_left hi    -- Define $f : G →+ ZMod 2$ by $f(z) = y(z)(i)$ for all $z \in G$.    set f : G →+ ZMod 2 := (Pi.evalAddMonoidHom (fun _ => ZMod 2) i).comp y    exact f, hi  -- By definition of $y$, we know that $y$ is a bijection between the set of additive characters  -- that map $x$ to 1 and the set of additive characters that map $x$ to 0.  apply Nat.card_congr  refine Equiv.ofBijective (⟨· - y, by aesop) fun _  by grind, fun b, hb  ?_;  rw [Subtype.exists]  use b + y  aesop
Project
Polynomial Freiman-Ruzsa project
License
Apache-2.0
Commit
a177b2e4abe4
Source
PFR/ApproxHomPFR.lean:197-245

Reuse this declaration

Bring the exact result into your workflow

The import identifies the source module. Your project still needs the pinned package dependency shown on this page.

What this badge means

This completion status comes from the project or community source. It has not yet been represented here as an independent rebuild and axiom audit.

Continue in this project

Related declarations

Project-declaredLean 4.33.0-rc1

Approx hom pfr

approx_hom_pfr

Project documentation

An approximate-homomorphism theorem for finite elementary abelian 22-groups. Let f:GGf:G\to G' and K>0K>0. If at least a proportion K1K^{-1} of pairs (x,y)G2(x,y)\in G^2 satisfy f(x+y)=f(x)+f(y)f(x+y)=f(x)+f(y), then there are an additive homomorphism φ:GG\varphi:G\to G' and a constant cGc\in G' such that f(x)=φ(x)+cf(x)=\varphi(x)+c for at least G/(2144K122)|G|/(2^{144}K^{122}) values of xx.

additive combinatoricsentropyprobability

Source project: Polynomial Freiman-Ruzsa project

Person-level attribution pending.

View proof record
Project-declaredLean 4.33.0-rc1

Better PFR conjecture

better_PFR_conjecture

Plain-language statement

If AF2nA \subset {\bf F}_2^n is finite non-empty with A+AKA|A+A| \leq K|A|, then there exists a subgroup HH of F2n{\bf F}_2^n with HA|H| \leq |A| such that AA can be covered by at most 2K92K^9 translates of HH.

additive combinatoricsentropyprobability

Source project: Polynomial Freiman-Ruzsa project

Person-level attribution pending.

View proof record
Project-declaredLean 4.33.0-rc1

Better PFR conjecture

better_PFR_conjecture'

Project documentation

Polynomial Freiman-Ruzsa theorem with exponent 99, without a finite ambient-group assumption. Let AA be a nonempty finite subset of an elementary abelian 22-group. If A+AKA|A+A|\le K|A|, then there are a finite subspace HH and a finite set cc such that Ac+HA\subseteq c+H, c<2K9|c|<2K^9, and HA|H|\le|A|.

additive combinatoricsentropyprobability

Source project: Polynomial Freiman-Ruzsa project

Person-level attribution pending.

View proof record