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

Commit 07d8ca6

Browse files
tb65536jcommelin
andcommitted
feat(combinatorics/configuration): Formula for cardinality of a projective plane (#11462)
This PR proves the formula for the cardinality of a projective plane in terms of the order. Co-authored-by: Johan Commelin <johan@commelin.net>
1 parent 7f0f3f1 commit 07d8ca6

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

src/combinatorics/configuration.lean

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,35 @@ variables (P) {L}
418418
lemma two_lt_point_count [projective_plane P L] (l : L) : 2 < point_count P l :=
419419
by simpa only [point_count_eq P l, nat.succ_lt_succ_iff] using one_lt_order P L
420420

421+
variables (P) (L)
422+
423+
lemma card_points [projective_plane P L] : fintype.card P = order P L ^ 2 + order P L + 1 :=
424+
begin
425+
let p : P := (classical.some (@exists_config P L _ _)),
426+
let ϕ : {q // q ≠ p} ≃ Σ (l : {l : L // p ∈ l}), {q // q ∈ l.1 ∧ q ≠ p} :=
427+
{ to_fun := λ q, ⟨⟨mk_line q.2, (mk_line_ax q.2).2⟩, q, (mk_line_ax q.2).1, q.2⟩,
428+
inv_fun := λ lq, ⟨lq.2, lq.2.2.2⟩,
429+
left_inv := λ q, subtype.ext rfl,
430+
right_inv := λ lq, sigma.subtype_ext (subtype.ext ((eq_or_eq (mk_line_ax lq.2.2.2).1
431+
(mk_line_ax lq.2.2.2).2 lq.2.2.1 lq.1.2).resolve_left lq.2.2.2)) rfl },
432+
classical,
433+
have h1 : fintype.card {q // q ≠ p} + 1 = fintype.card P,
434+
{ apply (eq_tsub_iff_add_eq_of_le (nat.succ_le_of_lt (fintype.card_pos_iff.mpr ⟨p⟩))).mp,
435+
convert (fintype.card_subtype_compl).trans (congr_arg _ (fintype.card_subtype_eq p)) },
436+
have h2 : ∀ l : {l : L // p ∈ l}, fintype.card {q // q ∈ l.1 ∧ q ≠ p} = order P L,
437+
{ intro l,
438+
rw [←fintype.card_congr (equiv.subtype_subtype_equiv_subtype_inter _ _),
439+
fintype.card_subtype_compl, ←nat.card_eq_fintype_card],
440+
refine tsub_eq_of_eq_add ((point_count_eq P l.1).trans _),
441+
rw ← fintype.card_subtype_eq (⟨p, l.2⟩ : {q : P // q ∈ l.1}),
442+
simp_rw subtype.ext_iff_val },
443+
simp_rw [←h1, fintype.card_congr ϕ, fintype.card_sigma, h2, finset.sum_const, finset.card_univ],
444+
rw [←nat.card_eq_fintype_card, ←line_count, line_count_eq, smul_eq_mul, nat.succ_mul, sq],
445+
end
446+
447+
lemma card_lines [projective_plane P L] : fintype.card L = order P L ^ 2 + order P L + 1 :=
448+
(card_points (dual L) (dual P)).trans (congr_arg (λ n, n ^ 2 + n + 1) (dual.order P L))
449+
421450
end projective_plane
422451

423452
end configuration

0 commit comments

Comments
 (0)