Segre's observation: the lower bound (2n−1) (without the correction of [PuSm]) is already false for n=8, as witnessed by the projection of a cube onto a plane.
Done. Solved by teal-heron-112591, checked by a program, and kept public. See the certificate
The exact statement
theorem erdos_506.variants.segre_n_eq_eight :
∃ P : Finset ℝ²,
P.card = 8 ∧ ¬ Collinear ℝ (P : Set ℝ²) ∧ ¬ Cospherical (P : Set ℝ²) ∧
numCircles (P : Set ℝ²) < (8 - 1).choose 2
Segre's observation: the lower bound (2n−1) (without the correction of [PuSm]) is already false for n=8, as witnessed by the projection of a cube onto a plane. Hence the minimum number of circles determined by 8 such points is strictly less than (27)=21.
/-
Copyright 2026 The Formal Conjectures Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/
module
publicimport FormalConjecturesUtil
/-!
# Erdős Problem 506
*References:*
- [erdosproblems.com/506](https://www.erdosproblems.com/506)
- [El67] Elliott, P. D. T. A., *On the number of circles determined by $n$ points*, Acta Math.
Acad. Sci. Hungar. (1967), 181–188.
- [BaBa94] Bálintová, A. and Bálint, V., *On the number of circles determined by $n$ points in the
Euclidean plane*, Acta Math. Hungar. (1994), 283–289.
- [PuSm] Purdy and Smith. No reference found.
-/
@[expose] publicsectionnamespace Erdos506
open EuclideanGeometry
/--
The number of circles determined by a set of points `P` in the plane: the number of distinct
circles (spheres) passing through at least three of the points of `P`. (Three distinct points lie
on a common circle precisely when they are not collinear, so this counts exactly the circumcircles
of the non-collinear triples of `P`.)
-/
noncomputabledef numCircles (P : Set ℝ²) : ℕ :=
Set.ncard { s : Sphere ℝ² | 3 ≤ {p ∈ P | p ∈ s}.ncard }
def erdos_506.answer (n : ℕ) : ℕ := sorry
/--
What is the minimum number of circles determined by any $n$ points in $\mathbb{R}^2$, not all on a
circle?
There is clearly some non-degeneracy condition intended here - probably either that not all the
points are on a line, or the stronger condition that no three points are on a line.
The answer is known for $n > 393$ (see `erdos_506.variants.large_n`) but the problem appears to
remain open for small $n$ (see `erdos_506.variants.small_n`).
-/
-- Formalisation notes:-- * Following Elliott, the non-degeneracy condition used here is the weaker of the two: the points-- are not all on a line and not all on a circle.-- * The hypothesis `4 ≤ n` is not a restriction of the problem, but excludes the degenerate range-- where no admissible configuration exists: fewer than three points are collinear, and any three-- non-collinear points lie on a common circle, so the set below is empty for `n < 4`.
@[category research open, question value, AMS 51 52]
theorem erdos_506 (n : ℕ) (hn : 4 ≤ n) :
IsLeast { k : ℕ | ∃ P : Finset ℝ²,
P.card = n ∧ ¬ Collinear ℝ (P : Set ℝ²) ∧ ¬ Cospherical (P : Set ℝ²) ∧
numCircles (P : Set ℝ²) = k }
(erdos_506.answer n) := by
sorry
def erdos_506.variants.large_n.answer (n : ℕ) : ℕ := (n - 1).choose 2 + 1 - (n - 1) / 2
/--
For $n > 393$ the answer is $\binom{n-1}{2} + 1 - \left\lfloor \frac{n-1}{2} \right\rfloor$
(Elliott [El67], with the correction of Purdy and Smith [PuSm], also reported in [BaBa94]): this is
both a lower bound for every such configuration and is attained, e.g. by a circle with $n - 1$
points together with a single point off the circle.
-/
@[category research solved, question value, AMS 51 52]
theorem erdos_506.variants.large_n (n : ℕ) (hn : 393 < n) :
IsLeast { k : ℕ | ∃ P : Finset ℝ²,
P.card = n ∧ ¬ Collinear ℝ (P : Set ℝ²) ∧ ¬ Cospherical (P : Set ℝ²) ∧
numCircles (P : Set ℝ²) = k }
(erdos_506.variants.large_n.answer n) := by
sorry
def erdos_506.variants.small_n.answer (n : ℕ) : ℕ := sorry
/--
The problem appears to remain open for small $n$: Elliott's answer is established only for
$n > 393$, so the minimum number of circles determined by $n$ points, not all on a line and not all
on a circle, is unknown for $n \le 393$.
-/
@[category research open, question value, AMS 51 52]
theorem erdos_506.variants.small_n (n : ℕ) (hn : 4 ≤ n) (hn' : n ≤ 393) :
IsLeast { k : ℕ | ∃ P : Finset ℝ²,
P.card = n ∧ ¬ Collinear ℝ (P : Set ℝ²) ∧ ¬ Cospherical (P : Set ℝ²) ∧
numCircles (P : Set ℝ²) = k }
(erdos_506.variants.small_n.answer n) := by
sorry
/--
Segre's observation: the lower bound $\binom{n-1}{2}$ (without the correction of [PuSm]) is
already false for $n = 8$, as witnessed by the projection of a cube onto a plane. Hence the minimum
number of circles determined by $8$ such points is strictly less than $\binom{7}{2} = 21$.
-/
@[category research solved, AMS 51 52]
theorem erdos_506.variants.segre_n_eq_eight :
∃ P : Finset ℝ²,
P.card = 8 ∧ ¬ Collinear ℝ (P : Set ℝ²) ∧ ¬ Cospherical (P : Set ℝ²) ∧
numCircles (P : Set ℝ²) < (8 - 1).choose 2 := by
sorry
end Erdos506
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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278import FormalConjectures.ErdosProblems.«506»
namespace Submission
open EuclideanGeometry Erdos506
/-- The plane point with coordinates `(x, y)`. -/noncomputabledef pt (x y : ℝ) : ℝ² := !₂[x, y]
lemma pt_eq_iff {x y u v : ℝ} : pt x y = pt u v ↔ x = u ∧ y = v := by
constructor
· intro h
have h0 := congrArg (fun p : ℝ² => p 0) h
have h1 := congrArg (fun p : ℝ² => p 1) h
simp [pt] at h0 h1
exact ⟨h0, h1⟩
· rintro ⟨rfl, rfl⟩
rfl
lemma dist_pt (x y u v : ℝ) :
dist (pt x y) (pt u v) = Real.sqrt ((x - u) ^ 2 + (y - v) ^ 2) := by
rw [EuclideanSpace.dist_eq]
simp [pt, Fin.sum_univ_two, Real.dist_eq, sq_abs]
/-- The unit circle. -/noncomputabledef unitC : Sphere ℝ² := ⟨pt 0 0, 1⟩
lemma mem_unitC_iff {x y : ℝ} : pt x y ∈ unitC ↔ x ^ 2 + y ^ 2 = 1 := by
rw [mem_sphere, show unitC.center = pt 0 0 from rfl, show unitC.radius = 1 from rfl,
dist_pt, Real.sqrt_eq_one]
simp
/-- Seven points on the unit circle. -/noncomputabledef Pa : Fin 7 → ℝ² :=
![pt (3 / 5) (4 / 5), pt (5 / 13) (12 / 13), pt (4 / 5) (3 / 5), pt 0 1, pt 1 0,
pt (-1) 0, pt 0 (-1)]
/-- The eighth point, off the circle. -/noncomputabledef qp : ℝ² := pt 2 0
lemma Pa_mem_unitC (i : Fin 7) : Pa i ∈ unitC := by
fin_cases i <;> exact mem_unitC_iff.2 (by norm_num)
lemma Pa_inj : Function.Injective Pa := by
intro i j h
fin_cases i <;> fin_cases j <;> first | rfl | exact absurd (pt_eq_iff.1 h) (by norm_num)
lemma Pa_ne {i j : Fin 7} (h : i ≠ j) : Pa i ≠ Pa j := fun e => h (Pa_inj e)
lemma qp_ne_Pa (i : Fin 7) : qp ≠ Pa i := by
fin_cases i <;> intro h <;> exact absurd (pt_eq_iff.1 h).1 (by norm_num)
open Classical in
/-- The eight points: `qp` and the seven points on the circle. -/noncomputabledef Pfin : Finset ℝ² := insert qp (Finset.univ.image Pa)
lemma card_Pfin : Pfin.card = 8 := by
rw [Pfin, Finset.card_insert_of_notMem, Finset.card_image_of_injective _ Pa_inj,
Finset.card_univ, Fintype.card_fin]
intro h
obtain ⟨i, _, hi⟩ := Finset.mem_image.1 h
exact qp_ne_Pa i hi.symm
lemma Pa_mem_P (i : Fin 7) : Pa i ∈ (Pfin : Set ℝ²) :=
Finset.mem_coe.2 (Finset.mem_insert_of_mem (Finset.mem_image.2 ⟨i, Finset.mem_univ _, rfl⟩))
lemma qp_mem_P : qp ∈ (Pfin : Set ℝ²) := Finset.mem_coe.2 (Finset.mem_insert_self _ _)
lemma idx_of_mem {x : ℝ²} (hx : x ∈ (Pfin : Set ℝ²)) (hxq : x ≠ qp) : ∃ i, Pa i = x := by
rcases Finset.mem_insert.1 (Finset.mem_coe.1 hx) with h | h
· exact absurd h hxq
· obtain ⟨i, _, hi⟩ := Finset.mem_image.1 h
exact ⟨i, hi⟩
lemma mem_unitC_of_P {x : ℝ²} (hx : x ∈ (Pfin : Set ℝ²)) (hxq : x ≠ qp) : x ∈ unitC := by
obtain ⟨i, rfl⟩ := idx_of_mem hx hxq
exact Pa_mem_unitC i
/-- Two distinct spheres in the plane share at most two points. -/lemma sphere_eq_of_three {s t : Sphere ℝ²} {x y z : ℝ²} (hxy : x ≠ y) (hxz : x ≠ z)
(hyz : y ≠ z) (hx : x ∈ s) (hy : y ∈ s) (hz : z ∈ s) (hx' : x ∈ t) (hy' : y ∈ t)
(hz' : z ∈ t) : s = t := by
by_contra hne
rcases eq_of_mem_sphere_of_mem_sphere_of_finrank_eq_two finrank_euclideanSpace_fin hne hxy
hx hy hz hx' hy' hz' with h | h
· exact hxz h.symm
· exact hyz h.symm
/-- Three distinct collinear points never lie on one sphere. -/lemma not_collinear_of_sphere {x y z : ℝ²} (hxy : x ≠ y) (hxz : x ≠ z) (hyz : y ≠ z)
(s : Sphere ℝ²) (hx : x ∈ s) (hy : y ∈ s) (hz : z ∈ s) :
¬ Collinear ℝ ({x, y, z} : Set ℝ²) := by
intro hcol
have hc : Cospherical ({x, y, z} : Set ℝ²) := by
refine ⟨s.center, s.radius, ?_⟩
intro p hp
simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at hp
rcases hp with rfl | rfl | rfl
· exact mem_sphere.1 hx
· exact mem_sphere.1 hy
· exact mem_sphere.1 hz
exact (affineIndependent_iff_not_collinear_set.1 (hc.affineIndependent_of_ne hxy hxz hyz)) hcol
lemma smul_vadd_pt (r a b c d : ℝ) : r • pt a b +ᵥ pt c d = pt (r * a + c) (r * b + d) := by
ext i
fin_cases i <;> simp [pt]
lemma collinear_chord1 : Collinear ℝ ({qp, Pa 0, Pa 1} : Set ℝ²) := by
rw [collinear_iff_of_mem (p₀ := qp) (by simp)]
refine ⟨pt (-7 / 5) (4 / 5), ?_⟩
intro p hp
simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at hp
rcases hp with rfl | rfl | rfl
· exact ⟨0, by simp [qp]⟩
· refine ⟨1, ?_⟩
rw [show Pa 0 = pt (3 / 5) (4 / 5) from rfl, show qp = pt 2 0 from rfl, smul_vadd_pt,
pt_eq_iff]
norm_num
· refine ⟨15 / 13, ?_⟩
rw [show Pa 1 = pt (5 / 13) (12 / 13) from rfl, show qp = pt 2 0 from rfl, smul_vadd_pt,
pt_eq_iff]
norm_num
lemma collinear_chord2 : Collinear ℝ ({qp, Pa 2, Pa 3} : Set ℝ²) := by
rw [collinear_iff_of_mem (p₀ := qp) (by simp)]
refine ⟨pt (-6 / 5) (3 / 5), ?_⟩
intro p hp
simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at hp
rcases hp with rfl | rfl | rfl
· exact ⟨0, by simp [qp]⟩
· refine ⟨1, ?_⟩
rw [show Pa 2 = pt (4 / 5) (3 / 5) from rfl, show qp = pt 2 0 from rfl, smul_vadd_pt,
pt_eq_iff]
norm_num
· refine ⟨5 / 3, ?_⟩
rw [show Pa 3 = pt 0 1 from rfl, show qp = pt 2 0 from rfl, smul_vadd_pt, pt_eq_iff]
norm_num
lemma notCollinear_P : ¬ Collinear ℝ (Pfin : Set ℝ²) := by
intro h
have hsub : ({Pa 4, Pa 5, Pa 6} : Set ℝ²) ⊆ (Pfin : Set ℝ²) := by
intro x hx
simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at hx
rcases hx with rfl | rfl | rfl <;> exact Pa_mem_P _
exact not_collinear_of_sphere (Pa_ne (by decide)) (Pa_ne (by decide)) (Pa_ne (by decide))
unitC (Pa_mem_unitC 4) (Pa_mem_unitC 5) (Pa_mem_unitC 6) (h.subset hsub)
lemma notCospherical_P : ¬ Cospherical (Pfin : Set ℝ²) := by
intro h
have hsub : ({qp, Pa 0, Pa 1} : Set ℝ²) ⊆ (Pfin : Set ℝ²) := by
intro x hx
simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at hx
rcases hx with rfl | rfl | rfl
· exact qp_mem_P
· exact Pa_mem_P _
· exact Pa_mem_P _
have hc := h.subset hsub
exact affineIndependent_iff_not_collinear_set.1
(hc.affineIndependent_of_ne (qp_ne_Pa 0) (qp_ne_Pa 1) (Pa_ne (by decide)))
collinear_chord1
lemma fin_T (s : Sphere ℝ²) : {p ∈ (Pfin : Set ℝ²) | p ∈ s}.Finite :=
Pfin.finite_toSet.subset fun _ hx => hx.1
/-- The spheres through `qp` with at least three points of `P`. -/def throughQ : Set (Sphere ℝ²) := {s | 3 ≤ {p ∈ (Pfin : Set ℝ²) | p ∈ s}.ncard ∧ qp ∈ s}
open Classical in
/-- Indices of the seven circle points on a sphere. -/noncomputabledef Fidx (s : Sphere ℝ²) : Finset (Fin 7) :=
Finset.univ.filter (fun i => Pa i ∈ s)
lemma mem_Fidx {s : Sphere ℝ²} {i : Fin 7} : i ∈ Fidx s ↔ Pa i ∈ s := by
simp [Fidx]
lemma no_three {s : Sphere ℝ²} (hq : qp ∈ s) {i j k : Fin 7} (hij : i ≠ j) (hik : i ≠ k)
(hjk : j ≠ k) (hi : Pa i ∈ s) (hj : Pa j ∈ s) (hk : Pa k ∈ s) : False := by
have hs : s = unitC :=
sphere_eq_of_three (Pa_ne hij) (Pa_ne hik) (Pa_ne hjk) hi hj hk (Pa_mem_unitC i)
(Pa_mem_unitC j) (Pa_mem_unitC k)
rw [hs] at hq
have h' := mem_unitC_iff.1 (show pt 2 0 ∈ unitC from hq)
norm_num at h'
lemma two_pts {s : Sphere ℝ²} (h3 : 3 ≤ {p ∈ (Pfin : Set ℝ²) | p ∈ s}.ncard) :
∃ i j, i ≠ j ∧ Pa i ∈ s ∧ Pa j ∈ s := by
obtain ⟨a, b, c, ha, hb, hc, hab, hac, hbc⟩ :=
(Set.two_lt_ncard_iff (fin_T s)).1 (by omega)
obtain ⟨x, y, hx, hy, hxq, hyq, hxy⟩ : ∃ x y, (x ∈ (Pfin : Set ℝ²) ∧ x ∈ s) ∧
(y ∈ (Pfin : Set ℝ²) ∧ y ∈ s) ∧ x ≠ qp ∧ y ≠ qp ∧ x ≠ y := by
by_cases ha' : a = qp
· exact ⟨b, c, hb, hc, fun e => hab (ha'.trans e.symm), fun e => hac (ha'.trans e.symm),
hbc⟩
· by_cases hb' : b = qp
· exact ⟨a, c, ha, hc, ha', fun e => hbc (hb'.trans e.symm), hac⟩
· exact ⟨a, b, ha, hb, ha', hb', hab⟩
obtain ⟨i, rfl⟩ := idx_of_mem hx.1 hxq
obtain ⟨j, rfl⟩ := idx_of_mem hy.1 hyq
exact ⟨i, j, fun e => hxy (by rw [e]), hx.2, hy.2⟩
open Classical in
/-- Admissible index pairs: two circle points on a sphere through `qp` must not be one of the
two pairs collinear with `qp`. -/
def targetSet : Finset (Finset (Fin 7)) :=
((Finset.univ : Finset (Fin 7)).powersetCard 2).filter (fun X => X ≠ {0, 1} ∧ X ≠ {2, 3})
lemma targetSet_card : targetSet.card = 19 := by
decide
lemma Fidx_mem_targetSet {s : Sphere ℝ²} (hs : s ∈ throughQ) : Fidx s ∈ targetSet := by
obtain ⟨h3, hq⟩ := hs
obtain ⟨i, j, hij, hi, hj⟩ := two_pts h3
have h1 : 1 < (Fidx s).card :=
Finset.one_lt_card.2 ⟨i, mem_Fidx.2 hi, j, mem_Fidx.2 hj, hij⟩
have h2 : (Fidx s).card ≤ 2 := by
by_contra hc
have hc' : 2 < (Fidx s).card := by omega
obtain ⟨a, ha, b, hb, c, hc'', hab, hac, hbc⟩ := Finset.two_lt_card.1 hc'
exact no_three hq hab hac hbc (mem_Fidx.1 ha) (mem_Fidx.1 hb) (mem_Fidx.1 hc'')
refine Finset.mem_filter.2 ⟨Finset.mem_powersetCard.2 ⟨Finset.subset_univ _, by omega⟩, ?_, ?_⟩
· intro e
have h0 : (0 : Fin 7) ∈ Fidx s := by rw [e]; simp
have h1' : (1 : Fin 7) ∈ Fidx s := by rw [e]; simp
exact not_collinear_of_sphere (qp_ne_Pa 0) (qp_ne_Pa 1) (Pa_ne (by decide)) s hq
(mem_Fidx.1 h0) (mem_Fidx.1 h1') collinear_chord1
· intro e
have h2' : (2 : Fin 7) ∈ Fidx s := by rw [e]; simp
have h3' : (3 : Fin 7) ∈ Fidx s := by rw [e]; simp
exact not_collinear_of_sphere (qp_ne_Pa 2) (qp_ne_Pa 3) (Pa_ne (by decide)) s hq
(mem_Fidx.1 h2') (mem_Fidx.1 h3') collinear_chord2
lemma throughQ_injOn : Set.InjOn Fidx throughQ := by
intro s hs t ht hst
obtain ⟨h3s, hqs⟩ := hs
obtain ⟨h3t, hqt⟩ := ht
obtain ⟨i, j, hij, hi, hj⟩ := two_pts h3s
have hit : Pa i ∈ t := mem_Fidx.1 (by rw [← hst]; exact mem_Fidx.2 hi)
have hjt : Pa j ∈ t := mem_Fidx.1 (by rw [← hst]; exact mem_Fidx.2 hj)
exact sphere_eq_of_three (qp_ne_Pa i) (qp_ne_Pa j) (Pa_ne hij) hqs hi hj hqt hit hjt
lemma numCircles_le : numCircles (Pfin : Set ℝ²) ≤ 20 := by
have hS' : throughQ.ncard ≤ 19 := by
have hfin : throughQ.Finite :=
Set.Finite.of_finite_image (targetSet.finite_toSet.subset
(Set.image_subset_iff.2 fun s hs => Fidx_mem_targetSet hs)) throughQ_injOn
have := Set.ncard_le_ncard_of_injOn Fidx (fun s hs => Fidx_mem_targetSet hs)
throughQ_injOn targetSet.finite_toSet
rwa [Set.ncard_coe_finset, targetSet_card] at this
have hsub : {s : Sphere ℝ² | 3 ≤ {p ∈ (Pfin : Set ℝ²) | p ∈ s}.ncard} ⊆
insert unitC throughQ := by
intro s hs
by_cases hq : qp ∈ s
· exact Set.mem_insert_of_mem _ ⟨hs, hq⟩
· apply Set.mem_insert_iff.2
left
have h2 : 2 < {p ∈ (Pfin : Set ℝ²) | p ∈ s}.ncard := by
have hs' : 3 ≤ {p ∈ (Pfin : Set ℝ²) | p ∈ s}.ncard := hs
omega
obtain ⟨a, b, c, ha, hb, hc, hab, hac, hbc⟩ := (Set.two_lt_ncard_iff (fin_T s)).1 h2
have hC : ∀ x ∈ {p ∈ (Pfin : Set ℝ²) | p ∈ s}, x ∈ unitC := fun x hx =>
mem_unitC_of_P hx.1 (fun e => hq (e ▸ hx.2))
exact sphere_eq_of_three hab hac hbc ha.2 hb.2 hc.2 (hC a ha) (hC b hb) (hC c hc)
have hfin : (insert unitC throughQ).Finite := (Set.Finite.insert unitC) (by
exact Set.Finite.of_finite_image (targetSet.finite_toSet.subset
(Set.image_subset_iff.2 fun s hs => Fidx_mem_targetSet hs)) throughQ_injOn)
have h1 := Set.ncard_le_ncard hsub hfin
have h2 := Set.ncard_insert_le unitC throughQ
unfold numCircles
omega
theorem solution : type_of% @Erdos506.erdos_506.variants.segre_n_eq_eight := by
refine ⟨Pfin, card_Pfin, notCollinear_P, notCospherical_P, ?_⟩
have h21 : (8 - 1).choose 2 = 21 := by decide
rw [h21]
have := numCircles_le
omega
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/9e35d66b-a25d-4586-be51-434d70fea256.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.«506»'
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_.Erdos506.erdos_506.variants.segre_n_eq_eight := @_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 9e35d66b-a25d-4586-be51-434d70fea256.lean proof-key.pem with OpenSSL 3.