The Fano plane as a Steiner triple system on points
DefinitionRolesForceSeven_fanoFor let , with addition modulo . The Fano plane is the Steiner triple system on whose lines are the seven sets
Every line has three points, and every two distinct points lie on exactly one line.
Formalization Note fanoLine i is in Finset (Fin 7), and fano : STS 7 has lines Finset.univ.image fanoLine. The two structure properties are checked by finite computation (decide).
import Mathlib
import Definitions.Def_RolesForceSeven_sts
namespace RolesForceSeven
/-- The Fano plane: lines {i, i+1, i+3} mod 7. -/
def fanoLine (i : Fin 7) : Finset (Fin 7) := {i, i + 1, i + 3}
set_option maxRecDepth 100000 in
def fano : STS 7 where
lines := Finset.univ.image fanoLine
card_three := by decide
pair_unique := by
have hex : ∀ x y : Fin 7, x ≠ y → ∃ i, x ∈ fanoLine i ∧ y ∈ fanoLine i := by decide
have huniq : ∀ x y : Fin 7, x ≠ y → ∀ i j, x ∈ fanoLine i → y ∈ fanoLine i →
x ∈ fanoLine j → y ∈ fanoLine j → fanoLine i = fanoLine j := by decide
intro x y hxy
obtain ⟨i, hxi, hyi⟩ := hex x y hxy
refine ⟨fanoLine i, ⟨Finset.mem_image_of_mem _ (Finset.mem_univ i), hxi, hyi⟩, ?_⟩
rintro l ⟨hl, hxl, hyl⟩
obtain ⟨j, -, rfl⟩ := Finset.mem_image.1 hl
exact huniq x y hxy j i hxl hyl hxi hyi
end RolesForceSeven
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Background: the structure being built. In the imported file, a Steiner-triple-system object on points () has point set and is a bundle of three things:
- a finite set of subsets of the points (the "lines");
- a proof that every has exactly elements;
- a proof that for every two points there is exactly one set with , and .
Nothing else is required: the object does not record or require a particular number of lines. (The imported file also defines a "role colouring" predicate, but the file under review does not use it.)
fanoLine. For each in the points of , the set is
where addition is modulo (it wraps around, e.g. ). Written out, the seven sets are
These are the translates modulo of the difference set . They are pairwise distinct and each has three distinct elements.
fano. This is a Steiner-triple-system object on points whose line set is the image of the map over all :
Because the seven are pairwise distinct, has members. This count is not stated or proved in the file, but it follows from the explicit list above. The file proves the two required properties:
-
Every line has 3 points. For each , . This is checked by exhaustive computation.
-
Every pair of distinct points lies on exactly one line. The file first uses exhaustive computation to check two facts over all points:
- (a) for all in there is an with ;
- (b) for all and all , if and , then .
From (a) and (b) it concludes that for all there is a unique with , and . Existence comes from (a) with . For uniqueness, any such equals some , because it belongs to , and then (b) gives .
The object is therefore a concrete, fully specified line system on with exactly the seven lines listed above. It carries no further data or properties.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.