The areas / V30. Combinatorics
Mathlib.Combinatorics.Configuration
66 declarations. Mathlib docs · Source
Configurations of Points and lines
This file introduces abstract configurations of points and lines, and proves some basic properties.
Main definitions
Configuration.Nondegenerate: Excludes certain degenerate configurations, and imposes uniqueness of intersection points.Configuration.HasPoints: A nondegenerate configuration in which every pair of lines has an intersection point.Configuration.HasLines: A nondegenerate configuration in which every pair of points has a line through them.Configuration.lineCount: The number of lines through a given point.Configuration.pointCount: The number of lines through a given line.
Main statements
Configuration.HasLines.card_le:HasLinesimplies|P| ≤ |L|.Configuration.HasPoints.card_le:HasPointsimplies|L| ≤ |P|.Configuration.HasLines.hasPoints:HasLinesand|P| = |L|impliesHasPoints.Configuration.HasPoints.hasLines:HasPointsand|P| = |L|impliesHasLines.
Together, these four statements say that any two of the following properties imply the third:
(a) HasLines, (b) HasPoints, (c) |P| = |L|.
def Configuration.ProjectivePlane.ctorIdx E1 #
{P : Type u_1} → {L : Type u_2} → {inst : Membership P L} → Configuration.ProjectivePlane P L → ℕ
def Configuration.HasLines.ctorIdx E1 #
{P : Type u_1} → {L : Type u_2} → {inst : Membership P L} → Configuration.HasLines P L → ℕ
def Configuration.HasPoints.ctorIdx E1 #
{P : Type u_1} → {L : Type u_2} → {inst : Membership P L} → Configuration.HasPoints P L → ℕ
def Configuration.Dual E1 #
Type u_1 → Type u_1
A type synonym.
instance Configuration.instInhabitedDual E0 #
(P : Type u_1) → [h : Inhabited P] → Inhabited (Configuration.Dual P)
instance Configuration.instFiniteDual E0 #
∀ (P : Type u_1) [Finite P], Finite (Configuration.Dual P)
instance Configuration.instFintypeDual E0 #
(P : Type u_1) → [h : Fintype P] → Fintype (Configuration.Dual P)
instance Configuration.instMembershipDual E0 #
(P : Type u_1) → (L : Type u_2) → [Membership P L] → Membership (Configuration.Dual L) (Configuration.Dual P)
class Configuration.Nondegenerate E3 #
(P : Type u_1) → (L : Type u_2) → [Membership P L] → Prop
A configuration is nondegenerate if:
- there does not exist a line that passes through all of the points,
- there does not exist a point that is on all of the lines,
- there is at most one line through any two points,
- any two lines have at most one intersection point.
Conditions 3 and 4 are equivalent.
ctor Configuration.Nondegenerate.mk E0 #
∀ {P : Type u_1} {L : Type u_2} [inst : Membership P L],
(∀ (l : L), ∃ p, p ∉ l) →
(∀ (p : P), ∃ l, p ∉ l) →
(∀ {p₁ p₂ : P} {l₁ l₂ : L}, p₁ ∈ l₁ → p₂ ∈ l₁ → p₁ ∈ l₂ → p₂ ∈ l₂ → p₁ = p₂ ∨ l₁ = l₂) →
Configuration.Nondegenerate P L
theorem Configuration.Nondegenerate.exists_point E1 #
∀ {P : Type u_1} {L : Type u_2} {inst : Membership P L} [self : Configuration.Nondegenerate P L] (l : L), ∃ p, p ∉ l
theorem Configuration.Nondegenerate.exists_line E1 #
∀ {P : Type u_1} {L : Type u_2} {inst : Membership P L} [self : Configuration.Nondegenerate P L] (p : P), ∃ l, p ∉ l
class Configuration.HasPoints E3 #
(P : Type u_1) → (L : Type u_2) → [Membership P L] → Type (max u_1 u_2)
A nondegenerate configuration in which every pair of lines has an intersection point.
instance Configuration.HasPoints.toNondegenerate E0 #
∀ {P : Type u_1} {L : Type u_2} {inst : Membership P L} [self : Configuration.HasPoints P L],
Configuration.Nondegenerate P L
ctor Configuration.HasPoints.mk E0 #
{P : Type u_1} →
{L : Type u_2} →
[inst : Membership P L] →
[toNondegenerate : Configuration.Nondegenerate P L] →
(mkPoint : {l₁ l₂ : L} → l₁ ≠ l₂ → P) →
(∀ {l₁ l₂ : L} (h : l₁ ≠ l₂), mkPoint h ∈ l₁ ∧ mkPoint h ∈ l₂) → Configuration.HasPoints P L
abbrev Configuration.HasPoints.mkPoint E1 #
{P : Type u_1} →
{L : Type u_2} → {inst : Membership P L} → [self : Configuration.HasPoints P L] → {l₁ l₂ : L} → l₁ ≠ l₂ → P
Intersection of two lines
theorem Configuration.HasPoints.mkPoint_ax E1 #
∀ {P : Type u_1} {L : Type u_2} {inst : Membership P L} [self : Configuration.HasPoints P L] {l₁ l₂ : L} (h : l₁ ≠ l₂),
Configuration.HasPoints.mkPoint h ∈ l₁ ∧ Configuration.HasPoints.mkPoint h ∈ l₂
class Configuration.HasLines E3 #
(P : Type u_1) → (L : Type u_2) → [Membership P L] → Type (max u_1 u_2)
A nondegenerate configuration in which every pair of points has a line through them.
instance Configuration.HasLines.toNondegenerate E0 #
∀ {P : Type u_1} {L : Type u_2} {inst : Membership P L} [self : Configuration.HasLines P L],
Configuration.Nondegenerate P L
ctor Configuration.HasLines.mk E0 #
{P : Type u_1} →
{L : Type u_2} →
[inst : Membership P L] →
[toNondegenerate : Configuration.Nondegenerate P L] →
(mkLine : {p₁ p₂ : P} → p₁ ≠ p₂ → L) →
(∀ {p₁ p₂ : P} (h : p₁ ≠ p₂), p₁ ∈ mkLine h ∧ p₂ ∈ mkLine h) → Configuration.HasLines P L
abbrev Configuration.HasLines.mkLine E1 #
{P : Type u_1} →
{L : Type u_2} → {inst : Membership P L} → [self : Configuration.HasLines P L] → {p₁ p₂ : P} → p₁ ≠ p₂ → L
Line through two points
theorem Configuration.HasLines.mkLine_ax E1 #
∀ {P : Type u_1} {L : Type u_2} {inst : Membership P L} [self : Configuration.HasLines P L] {p₁ p₂ : P} (h : p₁ ≠ p₂),
p₁ ∈ Configuration.HasLines.mkLine h ∧ p₂ ∈ Configuration.HasLines.mkLine h
instance Configuration.Dual.Nondegenerate E0 #
∀ (P : Type u_1) (L : Type u_2) [inst : Membership P L] [Configuration.Nondegenerate P L],
Configuration.Nondegenerate (Configuration.Dual L) (Configuration.Dual P)
instance Configuration.Dual.hasLines E0 #
(P : Type u_1) →
(L : Type u_2) →
[inst : Membership P L] →
[Configuration.HasPoints P L] → Configuration.HasLines (Configuration.Dual L) (Configuration.Dual P)
instance Configuration.Dual.hasPoints E0 #
(P : Type u_1) →
(L : Type u_2) →
[inst : Membership P L] →
[Configuration.HasLines P L] → Configuration.HasPoints (Configuration.Dual L) (Configuration.Dual P)
theorem Configuration.HasPoints.existsUnique_point E1 #
∀ (P : Type u_1) (L : Type u_2) [inst : Membership P L] [Configuration.HasPoints P L] (l₁ l₂ : L),
l₁ ≠ l₂ → ∃! p, p ∈ l₁ ∧ p ∈ l₂
theorem Configuration.HasLines.existsUnique_line E1 #
∀ (P : Type u_1) (L : Type u_2) [inst : Membership P L] [Configuration.HasLines P L] (p₁ p₂ : P),
p₁ ≠ p₂ → ∃! l, p₁ ∈ l ∧ p₂ ∈ l
theorem Configuration.Nondegenerate.exists_injective_of_card_le E1 #
∀ {P : Type u_1} {L : Type u_2} [inst : Membership P L] [Configuration.Nondegenerate P L] [inst_2 : Fintype P]
[inst_3 : Fintype L], Fintype.card L ≤ Fintype.card P → ∃ f, Function.Injective f ∧ ∀ (l : L), f l ∉ l
If a nondegenerate configuration has at least as many points as lines, then there exists
an injective function f from lines to points, such that f l does not lie on l.
def Configuration.lineCount E3 #
{P : Type u_1} → (L : Type u_2) → [Membership P L] → P → ℕ
Number of points on a given line.
def Configuration.pointCount E3 #
(P : Type u_1) → {L : Type u_2} → [Membership P L] → L → ℕ
Number of lines through a given point.
theorem Configuration.sum_lineCount_eq_sum_pointCount E1 #
∀ (P : Type u_1) (L : Type u_2) [inst : Membership P L] [inst_1 : Fintype P] [inst_2 : Fintype L],
∑ p, Configuration.lineCount L p = ∑ l, Configuration.pointCount P l
theorem Configuration.HasLines.pointCount_le_lineCount E1 #
∀ {P : Type u_1} {L : Type u_2} [inst : Membership P L] [Configuration.HasLines P L] {p : P} {l : L},
p ∉ l → ∀ [Finite { l // p ∈ l }], Configuration.pointCount P l ≤ Configuration.lineCount L p
theorem Configuration.HasPoints.lineCount_le_pointCount E1 #
∀ {P : Type u_1} {L : Type u_2} [inst : Membership P L] [Configuration.HasPoints P L] {p : P} {l : L},
p ∉ l → ∀ [hf : Finite { p // p ∈ l }], Configuration.lineCount L p ≤ Configuration.pointCount P l
theorem Configuration.HasLines.card_le E3 #
∀ (P : Type u_1) (L : Type u_2) [inst : Membership P L] [Configuration.HasLines P L] [inst : Fintype P]
[inst_1 : Fintype L], Fintype.card P ≤ Fintype.card L
If a nondegenerate configuration has a unique line through any two points, then |P| ≤ |L|.
theorem Configuration.HasPoints.card_le E3 #
∀ (P : Type u_1) (L : Type u_2) [inst : Membership P L] [Configuration.HasPoints P L] [inst : Fintype P]
[inst_1 : Fintype L], Fintype.card L ≤ Fintype.card P
If a nondegenerate configuration has a unique point on any two lines, then |L| ≤ |P|.
theorem Configuration.HasLines.exists_bijective_of_card_eq E0 #
∀ {P : Type u_1} {L : Type u_2} [inst : Membership P L] [Configuration.HasLines P L] [inst_2 : Fintype P]
[inst_3 : Fintype L],
Fintype.card P = Fintype.card L →
∃ f, Function.Bijective f ∧ ∀ (l : L), Configuration.pointCount P l = Configuration.lineCount L (f l)
theorem Configuration.HasLines.lineCount_eq_pointCount E1 #
∀ {P : Type u_1} {L : Type u_2} [inst : Membership P L] [Configuration.HasLines P L] [inst_2 : Fintype P]
[inst_3 : Fintype L],
Fintype.card P = Fintype.card L →
∀ {p : P} {l : L}, p ∉ l → Configuration.lineCount L p = Configuration.pointCount P l
theorem Configuration.HasPoints.lineCount_eq_pointCount E1 #
∀ {P : Type u_1} {L : Type u_2} [inst : Membership P L] [Configuration.HasPoints P L] [inst_2 : Fintype P]
[inst_3 : Fintype L],
Fintype.card P = Fintype.card L →
∀ {p : P} {l : L}, p ∉ l → Configuration.lineCount L p = Configuration.pointCount P l
def Configuration.HasLines.hasPoints E3 #
{P : Type u_1} →
{L : Type u_2} →
[inst : Membership P L] →
[Configuration.HasLines P L] →
[inst_2 : Fintype P] → [inst_3 : Fintype L] → Fintype.card P = Fintype.card L → Configuration.HasPoints P L
If a nondegenerate configuration has a unique line through any two points, and if |P| = |L|,
then there is a unique point on any two lines.
def Configuration.HasPoints.hasLines E3 #
{P : Type u_1} →
{L : Type u_2} →
[inst : Membership P L] →
[Configuration.HasPoints P L] →
[inst_2 : Fintype P] → [inst_3 : Fintype L] → Fintype.card P = Fintype.card L → Configuration.HasLines P L
If a nondegenerate configuration has a unique point on any two lines, and if |P| = |L|,
then there is a unique line through any two points.
class Configuration.ProjectivePlane E1 #
(P : Type u_1) → (L : Type u_2) → [Membership P L] → Type (max u_1 u_2)
A projective plane is a nondegenerate configuration in which every pair of lines has an intersection point, every pair of points has a line through them, and which has three points in general position.
abbrev Configuration.ProjectivePlane.mkLine E1 #
{P : Type u_1} →
{L : Type u_2} → {inst : Membership P L} → [self : Configuration.ProjectivePlane P L] → {p₁ p₂ : P} → p₁ ≠ p₂ → L
Line through two points
theorem Configuration.ProjectivePlane.mkLine_ax E1 #
∀ {P : Type u_1} {L : Type u_2} {inst : Membership P L} [self : Configuration.ProjectivePlane P L] {p₁ p₂ : P}
(h : p₁ ≠ p₂), p₁ ∈ Configuration.ProjectivePlane.mkLine h ∧ p₂ ∈ Configuration.ProjectivePlane.mkLine h
instance Configuration.ProjectivePlane.toHasPoints E0 #
{P : Type u_1} →
{L : Type u_2} → {inst : Membership P L} → [self : Configuration.ProjectivePlane P L] → Configuration.HasPoints P L
ctor Configuration.ProjectivePlane.mk E0 #
{P : Type u_1} →
{L : Type u_2} →
[inst : Membership P L] →
[toHasPoints : Configuration.HasPoints P L] →
(mkLine : {p₁ p₂ : P} → p₁ ≠ p₂ → L) →
(∀ {p₁ p₂ : P} (h : p₁ ≠ p₂), p₁ ∈ mkLine h ∧ p₂ ∈ mkLine h) →
(∃ p₁ p₂ p₃ l₁ l₂ l₃, p₁ ∉ l₂ ∧ p₁ ∉ l₃ ∧ p₂ ∉ l₁ ∧ p₂ ∈ l₂ ∧ p₂ ∈ l₃ ∧ p₃ ∉ l₁ ∧ p₃ ∈ l₂ ∧ p₃ ∉ l₃) →
Configuration.ProjectivePlane P L
instance Configuration.ProjectivePlane.toHasLines E0 #
{P : Type u_1} →
{L : Type u_2} → [inst : Membership P L] → [self : Configuration.ProjectivePlane P L] → Configuration.HasLines P L
theorem Configuration.ProjectivePlane.exists_config E1 #
∀ {P : Type u_1} {L : Type u_2} {inst : Membership P L} [self : Configuration.ProjectivePlane P L],
∃ p₁ p₂ p₃ l₁ l₂ l₃, p₁ ∉ l₂ ∧ p₁ ∉ l₃ ∧ p₂ ∉ l₁ ∧ p₂ ∈ l₂ ∧ p₂ ∈ l₃ ∧ p₃ ∉ l₁ ∧ p₃ ∈ l₂ ∧ p₃ ∉ l₃
instance Configuration.ProjectivePlane.instDual E0 #
(P : Type u_1) →
(L : Type u_2) →
[inst : Membership P L] →
[Configuration.ProjectivePlane P L] → Configuration.ProjectivePlane (Configuration.Dual L) (Configuration.Dual P)
def Configuration.ProjectivePlane.order E1 #
(P : Type u_1) → (L : Type u_2) → [inst : Membership P L] → [Configuration.ProjectivePlane P L] → ℕ
The order of a projective plane is one less than the number of lines through an arbitrary point. Equivalently, it is one less than the number of points on an arbitrary line.
theorem Configuration.ProjectivePlane.card_points_eq_card_lines E1 #
∀ (P : Type u_1) (L : Type u_2) [inst : Membership P L] [Configuration.ProjectivePlane P L] [inst : Fintype P]
[inst_1 : Fintype L], Fintype.card P = Fintype.card L
theorem Configuration.ProjectivePlane.lineCount_eq_lineCount E1 #
∀ {P : Type u_1} (L : Type u_2) [inst : Membership P L] [Configuration.ProjectivePlane P L] [Finite P] [Finite L]
(p q : P), Configuration.lineCount L p = Configuration.lineCount L q
theorem Configuration.ProjectivePlane.pointCount_eq_pointCount E1 #
∀ (P : Type u_1) {L : Type u_2} [inst : Membership P L] [Configuration.ProjectivePlane P L] [Finite P] [Finite L]
(l m : L), Configuration.pointCount P l = Configuration.pointCount P m
theorem Configuration.ProjectivePlane.lineCount_eq_pointCount E1 #
∀ {P : Type u_1} {L : Type u_2} [inst : Membership P L] [Configuration.ProjectivePlane P L] [Finite P] [Finite L]
(p : P) (l : L), Configuration.lineCount L p = Configuration.pointCount P l
theorem Configuration.ProjectivePlane.Dual.order E1 #
∀ (P : Type u_1) (L : Type u_2) [inst : Membership P L] [inst_1 : Configuration.ProjectivePlane P L] [Finite P]
[Finite L],
Configuration.ProjectivePlane.order (Configuration.Dual L) (Configuration.Dual P) =
Configuration.ProjectivePlane.order P L
theorem Configuration.ProjectivePlane.lineCount_eq E0 #
∀ {P : Type u_1} (L : Type u_2) [inst : Membership P L] [inst_1 : Configuration.ProjectivePlane P L] [Finite P]
[Finite L] (p : P), Configuration.lineCount L p = Configuration.ProjectivePlane.order P L + 1
theorem Configuration.ProjectivePlane.pointCount_eq E0 #
∀ (P : Type u_1) {L : Type u_2} [inst : Membership P L] [inst_1 : Configuration.ProjectivePlane P L] [Finite P]
[Finite L] (l : L), Configuration.pointCount P l = Configuration.ProjectivePlane.order P L + 1
theorem Configuration.ProjectivePlane.one_lt_order E1 #
∀ (P : Type u_1) (L : Type u_2) [inst : Membership P L] [inst_1 : Configuration.ProjectivePlane P L] [Finite P]
[Finite L], 1 < Configuration.ProjectivePlane.order P L
theorem Configuration.ProjectivePlane.two_lt_lineCount E1 #
∀ {P : Type u_1} (L : Type u_2) [inst : Membership P L] [Configuration.ProjectivePlane P L] [Finite P] [Finite L]
(p : P), 2 < Configuration.lineCount L p
theorem Configuration.ProjectivePlane.two_lt_pointCount E1 #
∀ (P : Type u_1) {L : Type u_2} [inst : Membership P L] [Configuration.ProjectivePlane P L] [Finite P] [Finite L]
(l : L), 2 < Configuration.pointCount P l
theorem Configuration.ProjectivePlane.card_points E1 #
∀ (P : Type u_1) (L : Type u_2) [inst : Membership P L] [inst_1 : Configuration.ProjectivePlane P L]
[inst_2 : Fintype P] [Finite L],
Fintype.card P = Configuration.ProjectivePlane.order P L ^ 2 + Configuration.ProjectivePlane.order P L + 1
theorem Configuration.ProjectivePlane.card_lines E1 #
∀ (P : Type u_1) (L : Type u_2) [inst : Membership P L] [inst_1 : Configuration.ProjectivePlane P L] [Finite P]
[inst_3 : Fintype L],
Fintype.card L = Configuration.ProjectivePlane.order P L ^ 2 + Configuration.ProjectivePlane.order P L + 1
instance Configuration.ofField.instMembershipProjectivizationForallFinOfNatNat E0 #
{K : Type u_3} → [inst : Field K] → Membership (Projectivization K (Fin 3 → K)) (Projectivization K (Fin 3 → K))
theorem Configuration.ofField.mem_iff E0 #
∀ {K : Type u_3} [inst : Field K] (v w : Projectivization K (Fin 3 → K)), v ∈ w ↔ v.orthogonal w
theorem Configuration.ofField.crossProduct_eq_zero_of_dotProduct_eq_zero E1 #
∀ {K : Type u_3} [inst : Field K] {a b c d : Fin 3 → K},
a ⬝ᵥ c = 0 → b ⬝ᵥ c = 0 → a ⬝ᵥ d = 0 → b ⬝ᵥ d = 0 → (crossProduct a) b = 0 ∨ (crossProduct c) d = 0
instance Configuration.ofField.instNondegenerateProjectivizationForallFinOfNatNat E0 #
∀ {K : Type u_3} [inst : Field K],
Configuration.Nondegenerate (Projectivization K (Fin 3 → K)) (Projectivization K (Fin 3 → K))
instance Configuration.ofField.instProjectivePlaneProjectivizationForallFinOfNatNatOfDecidableEq E0 #
{K : Type u_3} →
[inst : Field K] →
[DecidableEq K] → Configuration.ProjectivePlane (Projectivization K (Fin 3 → K)) (Projectivization K (Fin 3 → K))