Long horizon. An answer would show whether the points needed to force a subset with all distances distinct grow slower than exponentially in dimension. Knowledge itself.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230import FormalConjectures.ErdosProblems.«1088»
namespace Submission
open scoped EuclideanGeometry
variable {d : ℕ}
/-- The coefficient space: `(a, b, c)` encodes `x ↦ ⟪a, x⟫ + b ‖x‖² + c`. -/abbrev Coef (d : ℕ) := EuclideanSpace ℝ (Fin d) × ℝ × ℝ
noncomputabledef ev (v : Coef d) (x : EuclideanSpace ℝ (Fin d)) : ℝ :=
inner ℝ v.1 x + v.2.1 * ‖x‖ ^ 2 + v.2.2
noncomputabledef ann (T : Finset (EuclideanSpace ℝ (Fin d))) : Submodule ℝ (Coef d) where
carrier := {v | ∀ x ∈ T, ev v x = 0}
add_mem' := by
intro a b ha hb x hx
have h1 := ha x hx
have h2 := hb x hx
simp only [ev, Prod.fst_add, Prod.snd_add, inner_add_left] at *
linarith
zero_mem' := by
intro x _
simp [ev]
smul_mem' := by
intro c a ha x hx
have h1 := ha x hx
simp only [ev, Prod.smul_fst, Prod.smul_snd, smul_eq_mul, inner_smul_left] at *
simp only [RCLike.conj_to_real]
have : c * inner ℝ a.1 x + c * a.2.1 * ‖x‖ ^ 2 + c * a.2.2
= c * (inner ℝ a.1 x + a.2.1 * ‖x‖ ^ 2 + a.2.2) := by ring
rw [this, h1, mul_zero]
def Rep (f : EuclideanSpace ℝ (Fin d) → ℝ) : Prop := ∃ v : Coef d, ∀ x, ev v x = f x
lemma rep_sphere (p : EuclideanSpace ℝ (Fin d)) (c : ℝ) :
Rep (fun x => dist x p ^ 2 + c) := by
refine ⟨((-2 : ℝ) • p, 1, ‖p‖ ^ 2 + c), fun x => ?_⟩
simp only [ev, inner_smul_left, RCLike.conj_to_real]
rw [dist_eq_norm, @norm_sub_sq_real, real_inner_comm]
ring
lemma rep_sub {f g : EuclideanSpace ℝ (Fin d) → ℝ} (hf : Rep f) (hg : Rep g) :
Rep (fun x => f x - g x) := by
obtain ⟨v, hv⟩ := hf
obtain ⟨w, hw⟩ := hg
refine ⟨v - w, fun x => ?_⟩
show ev (v - w) x = f x - g x
rw [← hv x, ← hw x]
simp only [ev, Prod.fst_sub, Prod.snd_sub, inner_sub_left]
ring
lemma mem_distanceSet {S : Finset (EuclideanSpace ℝ (Fin d))} {r : ℝ} :
r ∈ distanceSet S ↔ ∃ a ∈ S, ∃ b ∈ S, a ≠ b ∧ dist a b = r := by
simp only [distanceSet, Finset.mem_image, Finset.mem_offDiag, Prod.exists]
constructor
· rintro ⟨a, b, ⟨ha, hb, hab⟩, rfl⟩
exact ⟨a, ha, b, hb, hab, rfl⟩
· rintro ⟨a, ha, b, hb, hab, rfl⟩
exact ⟨a, b, ⟨ha, hb, hab⟩, rfl⟩
lemma distanceSet_insert {S : Finset (EuclideanSpace ℝ (Fin d))} {x : EuclideanSpace ℝ (Fin d)}
(hx : x ∉ S) :
distanceSet (insert x S) = distanceSet S ∪ S.image (fun p => dist x p) := by
ext r
simp only [Finset.mem_union, mem_distanceSet, Finset.mem_insert, Finset.mem_image]
constructor
· rintro ⟨a, ha, b, hb, hab, rfl⟩
rcases ha with rfl | ha <;> rcases hb with rfl | hb
· exact absurd rfl hab
· exact Or.inr ⟨b, hb, rfl⟩
· exact Or.inr ⟨a, ha, dist_comm _ _⟩
· exact Or.inl ⟨a, ha, b, hb, hab, rfl⟩
· rintro (⟨a, ha, b, hb, hab, rfl⟩ | ⟨p, hp, rfl⟩)
· exact ⟨a, Or.inr ha, b, Or.inr hb, hab, rfl⟩
· exact ⟨x, Or.inl rfl, p, Or.inr hp, fun h => hx (h ▸ hp), rfl⟩
lemma card_distanceSet_le (S : Finset (EuclideanSpace ℝ (Fin d))) :
(distanceSet S).card ≤ S.card * S.card := by
unfold distanceSet
calc _ ≤ S.offDiag.card := Finset.card_image_le
_ ≤ (S ×ˢ S).card := Finset.card_le_card (fun p hp => by
simp only [Finset.mem_offDiag] at hp
exact Finset.mem_product.mpr ⟨hp.1, hp.2.1⟩)
_ = _ := Finset.card_product _ _
/-- The bound. -/def N (n : ℕ) : ℕ → ℕ
| 0 => n + 1
| k + 1 => n + (n * n + n * (n * n)) * N n k + 1
lemma le_N (n k : ℕ) : n ≤ N n k := by
cases k <;> simp [N] <;> omega
lemma greedy (n k : ℕ) (T : Finset (EuclideanSpace ℝ (Fin d)))
(hT : N n (k + 1) ≤ T.card)
(hB : ∀ f : EuclideanSpace ℝ (Fin d) → ℝ, Rep f → (∃ x ∈ T, f x ≠ 0) →
(T.filter (fun x => f x = 0)).card ≤ N n k) :
∀ j ≤ n, ∃ A ⊆ T, A.card = j ∧ (distanceSet A).card = A.card.choose 2 := by
intro j
induction j with
| zero => intro _; exact ⟨∅, Finset.empty_subset _, rfl, by simp [distanceSet]⟩
| succ j ih =>
intro hj
obtain ⟨A, hAT, hAc, hAd⟩ := ih (by omega)
-- bad set
let B1 : Finset (EuclideanSpace ℝ (Fin d)) := A.offDiag.biUnion
(fun pq => T.filter (fun x => dist x pq.1 ^ 2 + 0 - (dist x pq.2 ^ 2 + 0) = 0))
let B2 : Finset (EuclideanSpace ℝ (Fin d)) := (A ×ˢ distanceSet A).biUnion
(fun pr => T.filter (fun x => dist x pr.1 ^ 2 + (-(pr.2 ^ 2)) = 0))
have hB1 : B1.card ≤ A.offDiag.card * N n k := by
apply Finset.card_biUnion_le_card_mul
intro pq hpq
simp only [Finset.mem_offDiag] at hpq
apply hB _ (rep_sub (rep_sphere _ _) (rep_sphere _ _))
refine ⟨pq.1, hAT hpq.1, ?_⟩
simp only [dist_self, add_zero]
have : 0 < dist pq.1 pq.2 := dist_pos.mpr hpq.2.2
nlinarith
have hB2 : B2.card ≤ (A ×ˢ distanceSet A).card * N n k := by
apply Finset.card_biUnion_le_card_mul
intro pr hpr
simp only [Finset.mem_product] at hpr
apply hB _ (rep_sphere _ _)
refine ⟨pr.1, hAT hpr.1, ?_⟩
obtain ⟨a, _, b, _, hab, hr⟩ := mem_distanceSet.mp hpr.2
have : 0 < pr.2 := hr ▸ dist_pos.mpr hab
simp only [dist_self]
nlinarith
have hoff : A.offDiag.card ≤ n * n := by
rw [Finset.offDiag_card]
have : A.card * A.card ≤ n * n := Nat.mul_le_mul (by omega) (by omega)
omega
have hprod : (A ×ˢ distanceSet A).card ≤ n * (n * n) := by
rw [Finset.card_product]
have := card_distanceSet_le A
have h2 : A.card * A.card ≤ n * n := Nat.mul_le_mul (by omega) (by omega)
exact Nat.mul_le_mul (by omega) (le_trans this h2)
have hbad : (A ∪ B1 ∪ B2).card < T.card := by
have h1 := Finset.card_union_le (A ∪ B1) B2
have h2 := Finset.card_union_le A B1
have e1 : A.offDiag.card * N n k ≤ n * n * N n k := Nat.mul_le_mul_right _ hoff
have e2 : (A ×ˢ distanceSet A).card * N n k ≤ n * (n * n) * N n k :=
Nat.mul_le_mul_right _ hprod
have : N n (k + 1) = n + (n * n + n * (n * n)) * N n k + 1 := rfl
rw [add_mul] at this
omega
obtain ⟨x, hxT, hxB⟩ : ∃ x ∈ T, x ∉ A ∪ B1 ∪ B2 := by
by_contra h
push Not at h
exact absurd (Finset.card_le_card (fun x hx => h x hx)) (not_le.mpr hbad)
simp only [Finset.mem_union, not_or] at hxB
obtain ⟨⟨hxA, hx1⟩, hx2⟩ := hxB
have hd1 : ∀ p ∈ A, ∀ q ∈ A, p ≠ q → dist x p ≠ dist x q := by
intro p hp q hq hpq h
apply hx1
simp only [B1, Finset.mem_biUnion, Finset.mem_filter, Finset.mem_offDiag]
exact ⟨(p, q), ⟨hp, hq, hpq⟩, hxT, by simp [h]⟩
have hd2 : ∀ p ∈ A, ∀ r ∈ distanceSet A, dist x p ≠ r := by
intro p hp r hr h
apply hx2
simp only [B2, Finset.mem_biUnion, Finset.mem_filter, Finset.mem_product]
exact ⟨(p, r), ⟨hp, hr⟩, hxT, by simp [h]⟩
refine ⟨insert x A, Finset.insert_subset hxT hAT, by rw [Finset.card_insert_of_notMem hxA, hAc], ?_⟩
rw [distanceSet_insert hxA, Finset.card_insert_of_notMem hxA, Finset.card_union_of_disjoint,
Finset.card_image_of_injOn, hAd, Nat.choose_succ_succ, Nat.choose_one_right]
· ring
· intro p hp q hq h
by_contra hne
exact hd1 p hp q hq hne h
· rw [Finset.disjoint_left]
intro r hr hr'
obtain ⟨p, hp, rfl⟩ := Finset.mem_image.mp hr'
exact hd2 p hp _ hr rfl
lemma main (n : ℕ) : ∀ k, ∀ T : Finset (EuclideanSpace ℝ (Fin d)),
Module.finrank ℝ (Coef d) - Module.finrank ℝ (ann T) ≤ k → N n k ≤ T.card →
∃ A ⊆ T, A.card = n ∧ (distanceSet A).card = A.card.choose 2 := by
intro k
induction k with
| zero =>
intro T hk hc
exfalso
have hle : Module.finrank ℝ (ann T) ≤ Module.finrank ℝ (Coef d) :=
Submodule.finrank_le _
have htop : ann T = ⊤ := Submodule.eq_top_of_finrank_eq (by omega)
have hmem : ((0 : EuclideanSpace ℝ (Fin d)), (0 : ℝ), (1 : ℝ)) ∈ ann T := htop ▸ Submodule.mem_top
have : T.card ≠ 0 := by simp only [N] at hc; omega
obtain ⟨x, hx⟩ := Finset.card_pos.mp (Nat.pos_of_ne_zero this)
have := hmem x hx
simp [ev] at this
| succ k ih =>
intro T hk hc
by_cases hcase : ∃ f : EuclideanSpace ℝ (Fin d) → ℝ, Rep f ∧ (∃ x ∈ T, f x ≠ 0) ∧
N n k ≤ (T.filter (fun x => f x = 0)).card
· obtain ⟨f, ⟨v, hv⟩, ⟨x0, hx0, hfx0⟩, hcard⟩ := hcase
set T' := T.filter (fun x => f x = 0)
have hsub : ann T ≤ ann T' := by
intro w hw x hx
exact hw x (Finset.mem_filter.mp hx).1
have hvT' : v ∈ ann T' := by
intro x hx
rw [hv x]; exact (Finset.mem_filter.mp hx).2
have hvT : v ∉ ann T := by
intro h
exact hfx0 (by rw [← hv x0]; exact h x0 hx0)
have hlt : ann T < ann T' := lt_of_le_of_ne hsub (fun h => hvT (h ▸ hvT'))
have := Submodule.finrank_lt_finrank_of_lt hlt
obtain ⟨A, hA, hAc, hAd⟩ := ih T' (by omega) hcard
exact ⟨A, hA.trans (Finset.filter_subset _ _), hAc, hAd⟩
· push Not at hcase
have hB : ∀ f : EuclideanSpace ℝ (Fin d) → ℝ, Rep f → (∃ x ∈ T, f x ≠ 0) →
(T.filter (fun x => f x = 0)).card ≤ N n k := fun f hf hx =>
le_of_lt (hcase f hf hx)
exact greedy n k T hc hB n le_rfl
theorem solution : type_of% @Erdos1088.f_isLeast := by
intro d n
have hne : (Erdos1088.cardSet d n).Nonempty := by
refine ⟨N n (Module.finrank ℝ (Coef d)), le_N _ _, ?_⟩
intro S hS
obtain ⟨A, hA, hAc, hAd⟩ := main n _ S (Nat.sub_le _ _) hS.ge
refine ⟨A, hA, hAc, ?_⟩
unfold Erdos1088.PairwiseDistancesDistinct distinctDistances
rw [hAd]
exact ⟨Nat.sInf_mem hne, fun m hm => Nat.sInf_le hm⟩
end Submission
Check it yourself
Project
formal-conjectures
Commit
f606af160664c5a10952e9a957b100a1cd45bbeb
Lean
leanprover/lean4:v4.33.1
Mathlib
0df444a360eaa60ab8c11dca51a86af692955474
With Git and Elan installed, put the download in a fresh working directory and run this there. Use a disposable environment. Lean prints the axioms at the end. The checker allows propext, Classical.choice, and Quot.sound.
(
set -eu
proof="$PWD/a6d5ae0f-c67e-4459-9ce5-5754ca0bd8cf.lean"
git clone https://github.com/google-deepmind/formal-conjectures.git formal-conjectures
git -C formal-conjectures checkout --detach f606af160664c5a10952e9a957b100a1cd45bbeb
cd formal-conjectures
elan toolchain install leanprover/lean4:v4.33.1
lake +leanprover/lean4:v4.33.1 exe cache get
lake +leanprover/lean4:v4.33.1 build '+FormalConjectures.ErdosProblems.«1088»'
check_dir="$(mktemp -d)"
trap 'rm -f "$check_dir/Check.lean"; rmdir "$check_dir"' EXIT
printf "%s\n" "import Lean" > "$check_dir/Check.lean"
cat "$proof" >> "$check_dir/Check.lean"
cat >> "$check_dir/Check.lean" <<'SOLVE_CHECK'
example : type_of% @_root_.Erdos1088.f_isLeast := @_root_.Submission.solution
#print axioms Submission.solution
SOLVE_CHECK
lake +leanprover/lean4:v4.33.1 env lean "$check_dir/Check.lean"
)
Download the receipt verifier and public key. Run python3 verify-proof.py certificate.json a6d5ae0f-c67e-4459-9ce5-5754ca0bd8cf.lean proof-key.pem with OpenSSL 3.