Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 9830a30

Browse files
committed
chore(combinatorics/configuration): Generalize universes (#18039)
This PR generalizes the universes, allowing the `P` (points) and `L` (lines) to have different universe levels. I also switched from forall to Pi for data fields, as suggested by @alreadydone.
1 parent c3442db commit 9830a30

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

src/combinatorics/configuration.lean

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ open_locale big_operators
3636

3737
namespace configuration
3838

39-
universe u
40-
41-
variables (P L : Type u) [has_mem P L]
39+
variables (P L : Type*) [has_mem P L]
4240

4341
/-- A type synonym. -/
4442
def dual := P
@@ -63,13 +61,13 @@ class nondegenerate : Prop :=
6361
(eq_or_eq : ∀ {p₁ p₂ : P} {l₁ l₂ : L}, p₁ ∈ l₁ → p₂ ∈ l₁ → p₁ ∈ l₂ → p₂ ∈ l₂ → p₁ = p₂ ∨ l₁ = l₂)
6462

6563
/-- A nondegenerate configuration in which every pair of lines has an intersection point. -/
66-
class has_points extends nondegenerate P L : Type u :=
67-
(mk_point : {l₁ l₂ : L} (h : l₁ ≠ l₂), P)
64+
class has_points extends nondegenerate P L :=
65+
(mk_point : Π {l₁ l₂ : L} (h : l₁ ≠ l₂), P)
6866
(mk_point_ax : ∀ {l₁ l₂ : L} (h : l₁ ≠ l₂), mk_point h ∈ l₁ ∧ mk_point h ∈ l₂)
6967

7068
/-- A nondegenerate configuration in which every pair of points has a line through them. -/
71-
class has_lines extends nondegenerate P L : Type u :=
72-
(mk_line : {p₁ p₂ : P} (h : p₁ ≠ p₂), L)
69+
class has_lines extends nondegenerate P L :=
70+
(mk_line : Π {p₁ p₂ : P} (h : p₁ ≠ p₂), L)
7371
(mk_line_ax : ∀ {p₁ p₂ : P} (h : p₁ ≠ p₂), p₁ ∈ mk_line h ∧ p₂ ∈ mk_line h)
7472

7573
open nondegenerate has_points has_lines
@@ -309,10 +307,10 @@ variables (P L)
309307
/-- A projective plane is a nondegenerate configuration in which every pair of lines has
310308
an intersection point, every pair of points has a line through them,
311309
and which has three points in general position. -/
312-
class projective_plane extends nondegenerate P L : Type u :=
313-
(mk_point : {l₁ l₂ : L} (h : l₁ ≠ l₂), P)
310+
class projective_plane extends nondegenerate P L :=
311+
(mk_point : Π {l₁ l₂ : L} (h : l₁ ≠ l₂), P)
314312
(mk_point_ax : ∀ {l₁ l₂ : L} (h : l₁ ≠ l₂), mk_point h ∈ l₁ ∧ mk_point h ∈ l₂)
315-
(mk_line : {p₁ p₂ : P} (h : p₁ ≠ p₂), L)
313+
(mk_line : Π {p₁ p₂ : P} (h : p₁ ≠ p₂), L)
316314
(mk_line_ax : ∀ {p₁ p₂ : P} (h : p₁ ≠ p₂), p₁ ∈ mk_line h ∧ p₂ ∈ mk_line h)
317315
(exists_config : ∃ (p₁ p₂ p₃ : P) (l₁ l₂ l₃ : L), p₁ ∉ l₂ ∧ p₁ ∉ l₃ ∧
318316
p₂ ∉ l₁ ∧ p₂ ∈ l₂ ∧ p₂ ∈ l₃ ∧ p₃ ∉ l₁ ∧ p₃ ∈ l₂ ∧ p₃ ∉ l₃)

0 commit comments

Comments
 (0)