not_straight_line_inter_unit_sphere_card_le_two
The statement straight_line_inter_unit_sphere_card_le_two is false: In Lean, Metric.sphere (0 : ℝ × ℝ) 1 is the sphere for the default product metric on ℝ × ℝ, whose norm is the sup norm ‖(x,y)‖ = max |x| |y| (this is Prod.norm_def / Prod.dist_eq; there is no InnerProductSpace ℝ (ℝ × ℝ) instance). Hence the "unit sphere" is the boundary of the square max(|x|,|y|) = 1, not the Euclidean circle. The point (1,1) satisfies max 1 1 = 1 so lies on it, and the straight line y = 1 (given by the affine functional p ↦ p.2 - 1, whose linear part is nonzero) meets it in the whole segment {(x,1) : |x| ≤ 1}, which is infinite. Concretely the three distinct points (0,1), (1,1), (-1,1) all lie on both the line and the "unit sphere", so no finite set of cardinality ≤ 2 contains all intersection points. The theorem would be true for the Euclidean circle, e.g. stated for EuclideanSpace ℝ (Fin 2).
Statement
theorem not_straight_line_inter_unit_sphere_card_le_two : ¬ (∀ (L : StraightLine), ∃ (s : Finset (ℝ × ℝ)), s.card ≤ 2 ∧
∀ p ∈ Metric.sphere (0 : ℝ × ℝ) 1, L.cut p = 0 → p ∈ s)- Related work
- refutes `straight_line_inter_unit_sphere_card_le_two`
- Verified
- 22 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 1
- StraightLineA straight line in the plane ℝ², given by an affine functional with nonzero linear part.
The proof, explained
The proof proceeds by contradiction: suppose every straight line intersects the unit sphere in ℝ × ℝ in at most two points. In Lean, the default metric on ℝ × ℝ is the product metric (sup norm ‖(x, y)‖ = max(|x|, |y|)), meaning the unit sphere is the boundary of the square [-1, 1] × [-1, 1]. The horizontal line y = 1 contains the square's entire top edge, and in particular the three distinct points (0, 1), (1, 1), and (-1, 1) all lie on both the line and the sphere. This forces any set containing their intersection to have cardinality at least 3, contradicting the assumption that at most 2 points suffice.
Assume for contradiction that every straight line intersects the unit sphere in at most 2 points, and apply this assumption to the horizontal line L given by y = 1 to obtain a finite set s with |s| ≤ 2 containing all its intersection points.
Suppose the universal claim holds, with hypothesis h. We construct the straight line L corresponding to y = 1 by defining its affine functional p ↦ p.2 - 1 via AffineMap.mk' at base point 0 with linear part LinearMap.snd. The defining affine identity holds by rewriting subtraction as addition of the negation (sub_eq_add_neg). To satisfy the StraightLine requirement that the linear part is non-zero, we note that if it were zero, applying it to (0, 1) via congrArg would force 1 = 0 (simplified by LinearMap.snd). Specializing h to L yields a finite set s with |s| ≤ 2 that contains all points on the unit sphere where L.cut vanishes.
uses
AffineMap.mk',LinearMap.snd,sub_eq_add_neg,congrArgintro h let L : StraightLine := { cut := AffineMap.mk' (fun p : ℝ × ℝ => p.2 - 1) (LinearMap.snd ℝ ℝ ℝ) 0 (by intro p; simp [sub_eq_add_neg]) linear_ne_zero := by intro hh have := congrArg (fun f : (ℝ × ℝ) →ₗ[ℝ] ℝ => f (0, 1)) hh simp [LinearMap.snd] at this } obtain ⟨s, hcard, hmem⟩ := h L
The points (0, 1), (1, 1), and (-1, 1) all lie on the unit sphere Metric.sphere (0 : ℝ × ℝ) 1.
In the product metric space ℝ × ℝ, the distance from (0, 0) to (x, y) is max(|x|, |y|) by Prod.dist_eq. A point is on the unit sphere if and only if this distance is 1 (Metric.mem_sphere). For each of (0, 1), (1, 1), and (-1, 1), the y-coordinate has distance 1 from 0 while the x-coordinate has distance ≤ 1, so the maximum distance is 1.
uses
Metric.mem_sphere,Prod.dist_eqhave hp0 : ((0:ℝ), (1:ℝ)) ∈ Metric.sphere (0 : ℝ × ℝ) 1 := by rw [Metric.mem_sphere, Prod.dist_eq]; norm_num have hp1 : ((1:ℝ), (1:ℝ)) ∈ Metric.sphere (0 : ℝ × ℝ) 1 := by rw [Metric.mem_sphere, Prod.dist_eq]; norm_num have hpm : ((-1:ℝ), (1:ℝ)) ∈ Metric.sphere (0 : ℝ × ℝ) 1 := by rw [Metric.mem_sphere, Prod.dist_eq]; norm_num
The points (0, 1), (1, 1), and (-1, 1) all belong to the candidate set s.
We verify that L.cut p = p.2 - 1 for all p. For each of the three points (0, 1), (1, 1), and (-1, 1), the second coordinate is 1, so L.cut evaluates to 1 - 1 = 0. Since each point is both on the unit sphere and in the zero locus of L, the defining property hmem of s implies that all three points belong to s.
have hc : ∀ p : ℝ × ℝ, L.cut p = p.2 - 1 := by intro p; simp [L] have h0 : ((0:ℝ), (1:ℝ)) ∈ s := hmem _ hp0 (by rw [hc]; norm_num) have h1 : ((1:ℝ), (1:ℝ)) ∈ s := hmem _ hp1 (by rw [hc]; norm_num) have hm : ((-1:ℝ), (1:ℝ)) ∈ s := hmem _ hpm (by rw [hc]; norm_num)
The three-element set {(0, 1), (1, 1), (-1, 1)} is a subset of s.
For any element p of {(0, 1), (1, 1), (-1, 1)}, unfolding finite set membership (Finset.mem_insert, Finset.mem_singleton) shows that p must be (0, 1), (1, 1), or (-1, 1). Since all three points were shown to belong to s, every element of the set belongs to s.
uses
Finset.mem_insert,Finset.mem_singletonhave hsub : ({((0:ℝ), (1:ℝ)), ((1:ℝ), (1:ℝ)), ((-1:ℝ), (1:ℝ))} : Finset (ℝ × ℝ)) ⊆ s := by intro p hp simp only [Finset.mem_insert, Finset.mem_singleton] at hp rcases hp with rfl | rfl | rfl · exact h0 · exact h1 · exact hm
The cardinality of the set {(0, 1), (1, 1), (-1, 1)} is 3.
The singleton {(-1, 1)} has cardinality 1 by Finset.card_singleton. Because (1, 1) ≠ (-1, 1) and (0, 1) is not in {(1, 1), (-1, 1)}, successive insertions increase the cardinality by 1 at each step using Finset.card_insert_of_notMem, with the coordinate distinctness checks discharged by norm_num.
uses
Finset.card_insert_of_notMem,Finset.card_singletonhave hc3 : ({((0:ℝ), (1:ℝ)), ((1:ℝ), (1:ℝ)), ((-1:ℝ), (1:ℝ))} : Finset (ℝ × ℝ)).card = 3 := by rw [Finset.card_insert_of_notMem, Finset.card_insert_of_notMem, Finset.card_singleton] all_goals norm_num
A contradiction 3 ≤ |s| ≤ 2 is reached, completing the proof.
Since {(0, 1), (1, 1), (-1, 1)} ⊆ s, the subset cardinality monotonicity lemma Finset.card_le_card implies that 3 ≤ |s|. Combined with the hypothesis |s| ≤ 2, this produces the integer arithmetic contradiction 3 ≤ 2, which omega detects to close the proof.
uses
Finset.card_le_cardhave := Finset.card_le_card hsub omega
AffineMap.mk'- Constructs an affine map from an underlying function, a candidate linear map, a base point, and a proof that the function satisfies the affine relation at all points.
LinearMap.snd- The linear projection map from a product module to its second factor, sending (x, y) to y.
sub_eq_add_neg- In an additive group, subtraction equals addition of the negation: a - b = a + (-b).
congrArg- Equality of arguments implies equality of function values: if a₁ = a₂, then f(a₁) = f(a₂).
Metric.mem_sphere- A point y belongs to the metric sphere centered at x with radius ε if and only if dist(y, x) = ε.
Prod.dist_eq- The distance between two points in a product metric space is the maximum of the distances between their corresponding coordinates.
Finset.mem_insert- An element a belongs to insert b s if and only if a = b or a ∈ s.
Finset.mem_singleton- An element b belongs to the singleton set {a} if and only if b = a.
Finset.card_insert_of_notMem- Inserting an element a into a finite set s of which it is not already a member increases the set's cardinality by 1.
Finset.card_singleton- The cardinality of any singleton finite set {a} is 1.
Finset.card_le_card- If a finite set s is a subset of a finite set t, then the cardinality of s is at most the cardinality of t.
- In standard Euclidean geometry, a line intersects a circle in at most two points. In Lean, however, the default metric space structure on ℝ × ℝ is the product metric induced by the sup norm ‖(x, y)‖ = max(|x|, |y|) rather than the Euclidean metric (ℓ₂). Consequently, the unit sphere is the boundary of the square [-1, 1] × [-1, 1] rather than a circle, so a line can intersect it in an entire line segment.
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
theorem not_straight_line_inter_unit_sphere_card_le_two : ¬ (∀ (L : StraightLine), ∃ (s : Finset (ℝ × ℝ)), s.card ≤ 2 ∧ ∀ p ∈ Metric.sphere (0 : ℝ × ℝ) 1, L.cut p = 0 → p ∈ s) := by intro h let L : StraightLine := { cut := AffineMap.mk' (fun p : ℝ × ℝ => p.2 - 1) (LinearMap.snd ℝ ℝ ℝ) 0 (by intro p; simp [sub_eq_add_neg]) linear_ne_zero := by intro hh have := congrArg (fun f : (ℝ × ℝ) →ₗ[ℝ] ℝ => f (0, 1)) hh simp [LinearMap.snd] at this } obtain ⟨s, hcard, hmem⟩ := h L have hp0 : ((0:ℝ), (1:ℝ)) ∈ Metric.sphere (0 : ℝ × ℝ) 1 := by rw [Metric.mem_sphere, Prod.dist_eq]; norm_num have hp1 : ((1:ℝ), (1:ℝ)) ∈ Metric.sphere (0 : ℝ × ℝ) 1 := by rw [Metric.mem_sphere, Prod.dist_eq]; norm_num have hpm : ((-1:ℝ), (1:ℝ)) ∈ Metric.sphere (0 : ℝ × ℝ) 1 := by rw [Metric.mem_sphere, Prod.dist_eq]; norm_num have hc : ∀ p : ℝ × ℝ, L.cut p = p.2 - 1 := by intro p; simp [L] have h0 : ((0:ℝ), (1:ℝ)) ∈ s := hmem _ hp0 (by rw [hc]; norm_num) have h1 : ((1:ℝ), (1:ℝ)) ∈ s := hmem _ hp1 (by rw [hc]; norm_num) have hm : ((-1:ℝ), (1:ℝ)) ∈ s := hmem _ hpm (by rw [hc]; norm_num) have hsub : ({((0:ℝ), (1:ℝ)), ((1:ℝ), (1:ℝ)), ((-1:ℝ), (1:ℝ))} : Finset (ℝ × ℝ)) ⊆ s := by intro p hp simp only [Finset.mem_insert, Finset.mem_singleton] at hp rcases hp with rfl | rfl | rfl · exact h0 · exact h1 · exact hm have hc3 : ({((0:ℝ), (1:ℝ)), ((1:ℝ), (1:ℝ)), ((-1:ℝ), (1:ℝ))} : Finset (ℝ × ℝ)).card = 3 := by rw [Finset.card_insert_of_notMem, Finset.card_insert_of_notMem, Finset.card_singleton] all_goals norm_num have := Finset.card_le_card hsub omega