@@ -45,6 +45,7 @@ def dual := P
45
45
46
46
instance [this : inhabited P] : inhabited (dual P) := this
47
47
48
+ instance [finite P] : finite (dual P) := ‹finite P›
48
49
instance [this : fintype P] : fintype (dual P) := this
49
50
50
51
instance : has_mem (dual L) (dual P) :=
@@ -166,11 +167,12 @@ end
166
167
variables {P L}
167
168
168
169
lemma has_lines.point_count_le_line_count [has_lines P L] {p : P} {l : L} (h : p ∉ l)
169
- [fintype {l : L // p ∈ l}] : point_count P l ≤ line_count L p :=
170
+ [finite {l : L // p ∈ l}] : point_count P l ≤ line_count L p :=
170
171
begin
171
172
by_cases hf : infinite {p : P // p ∈ l},
172
173
{ exactI (le_of_eq nat.card_eq_zero_of_infinite).trans (zero_le (line_count L p)) },
173
174
haveI := fintype_of_not_infinite hf,
175
+ casesI nonempty_fintype {l : L // p ∈ l},
174
176
rw [line_count, point_count, nat.card_eq_fintype_card, nat.card_eq_fintype_card],
175
177
have : ∀ p' : {p // p ∈ l}, p ≠ p' := λ p' hp', h ((congr_arg (∈ l) hp').mpr p'.2 ),
176
178
exact fintype.card_le_of_injective (λ p', ⟨mk_line (this p'), (mk_line_ax (this p')).1 ⟩)
@@ -180,7 +182,7 @@ begin
180
182
end
181
183
182
184
lemma has_points.line_count_le_point_count [has_points P L] {p : P} {l : L} (h : p ∉ l)
183
- [hf : fintype {p : P // p ∈ l}] : line_count L p ≤ point_count P l :=
185
+ [hf : finite {p : P // p ∈ l}] : line_count L p ≤ point_count P l :=
184
186
@has_lines.point_count_le_line_count (dual L) (dual P) _ _ l p h hf
185
187
186
188
variables (P L)
@@ -323,7 +325,9 @@ instance has_points [h : projective_plane P L] : has_points P L := { .. h }
323
325
@[priority 100 ] -- see Note [lower instance priority]
324
326
instance has_lines [h : projective_plane P L] : has_lines P L := { .. h }
325
327
326
- instance [projective_plane P L] : projective_plane (dual L) (dual P) :=
328
+ variables [projective_plane P L]
329
+
330
+ instance : projective_plane (dual L) (dual P) :=
327
331
{ mk_line := @mk_point P L _ _,
328
332
mk_line_ax := λ _ _, mk_point_ax,
329
333
mk_point := @mk_line P L _ _,
@@ -336,19 +340,19 @@ instance [projective_plane P L] : projective_plane (dual L) (dual P) :=
336
340
337
341
/-- The order of a projective plane is one less than the number of lines through an arbitrary point.
338
342
Equivalently, it is one less than the number of points on an arbitrary line. -/
339
- noncomputable def order [projective_plane P L] : ℕ :=
343
+ noncomputable def order : ℕ :=
340
344
line_count L (classical.some (@exists_config P L _ _)) - 1
341
345
342
- variables [fintype P] [fintype L]
343
-
344
- lemma card_points_eq_card_lines [projective_plane P L] : fintype.card P = fintype.card L :=
346
+ lemma card_points_eq_card_lines [fintype P] [fintype L] : fintype.card P = fintype.card L :=
345
347
le_antisymm (has_lines.card_le P L) (has_points.card_le P L)
346
348
347
349
variables {P} (L)
348
350
349
- lemma line_count_eq_line_count [projective_plane P L] (p q : P) :
351
+ lemma line_count_eq_line_count [finite P] [finite L] (p q : P) :
350
352
line_count L p = line_count L q :=
351
353
begin
354
+ casesI nonempty_fintype P,
355
+ casesI nonempty_fintype L,
352
356
obtain ⟨p₁, p₂, p₃, l₁, l₂, l₃, h₁₂, h₁₃, h₂₁, h₂₂, h₂₃, h₃₁, h₃₂, h₃₃⟩ := exists_config,
353
357
have h := card_points_eq_card_lines P L,
354
358
let n := line_count L p₂,
@@ -366,45 +370,48 @@ end
366
370
367
371
variables (P) {L}
368
372
369
- lemma point_count_eq_point_count [projective_plane P L] (l m : L) :
373
+ lemma point_count_eq_point_count [finite P] [finite L] (l m : L) :
370
374
point_count P l = point_count P m :=
371
375
line_count_eq_line_count (dual P) l m
372
376
373
377
variables {P L}
374
378
375
- lemma line_count_eq_point_count [projective_plane P L] (p : P) (l : L) :
379
+ lemma line_count_eq_point_count [finite P] [finite L] (p : P) (l : L) :
376
380
line_count L p = point_count P l :=
377
- exists.elim (exists_point l) (λ q hq, (line_count_eq_line_count L p q).trans
378
- (has_lines.line_count_eq_point_count (card_points_eq_card_lines P L) hq))
381
+ exists.elim (exists_point l) $ λ q hq, (line_count_eq_line_count L p q).trans $
382
+ by { casesI nonempty_fintype P, casesI nonempty_fintype L,
383
+ exact has_lines.line_count_eq_point_count (card_points_eq_card_lines P L) hq }
379
384
380
385
variables (P L)
381
386
382
- lemma dual.order [projective_plane P L] : order (dual L) (dual P) = order P L :=
387
+ lemma dual.order [finite P] [finite L] : order (dual L) (dual P) = order P L :=
383
388
congr_arg (λ n, n - 1 ) (line_count_eq_point_count _ _)
384
389
385
390
variables {P} (L)
386
391
387
- lemma line_count_eq [projective_plane P L] (p : P) : line_count L p = order P L + 1 :=
392
+ lemma line_count_eq [finite P] [finite L] (p : P) : line_count L p = order P L + 1 :=
388
393
begin
389
394
classical,
390
395
obtain ⟨q, -, -, l, -, -, -, -, h, -⟩ := classical.some_spec (@exists_config P L _ _),
396
+ casesI nonempty_fintype {l : L // q ∈ l},
391
397
rw [order, line_count_eq_line_count L p q, line_count_eq_line_count L (classical.some _) q,
392
398
line_count, nat.card_eq_fintype_card, nat.sub_add_cancel],
393
399
exact fintype.card_pos_iff.mpr ⟨⟨l, h⟩⟩,
394
400
end
395
401
396
402
variables (P) {L}
397
403
398
- lemma point_count_eq [projective_plane P L] (l : L) : point_count P l = order P L + 1 :=
404
+ lemma point_count_eq [finite P] [finite L] (l : L) : point_count P l = order P L + 1 :=
399
405
(line_count_eq (dual P) l).trans (congr_arg (λ n, n + 1 ) (dual.order P L))
400
406
401
407
variables (P L)
402
408
403
- lemma one_lt_order [projective_plane P L] : 1 < order P L :=
409
+ lemma one_lt_order [finite P] [finite L] : 1 < order P L :=
404
410
begin
405
411
obtain ⟨p₁, p₂, p₃, l₁, l₂, l₃, -, -, h₂₁, h₂₂, h₂₃, h₃₁, h₃₂, h₃₃⟩ := @exists_config P L _ _,
406
412
classical,
407
- rw [←add_lt_add_iff_right, ←point_count_eq, point_count, nat.card_eq_fintype_card],
413
+ casesI nonempty_fintype {p : P // p ∈ l₂},
414
+ rw [←add_lt_add_iff_right, ←point_count_eq _ l₂, point_count, nat.card_eq_fintype_card],
408
415
simp_rw [fintype.two_lt_card_iff, ne, subtype.ext_iff],
409
416
have h := mk_point_ax (λ h, h₂₁ ((congr_arg _ h).mpr h₂₂)),
410
417
exact ⟨⟨mk_point _, h.2 ⟩, ⟨p₂, h₂₂⟩, ⟨p₃, h₃₂⟩,
@@ -413,18 +420,19 @@ end
413
420
414
421
variables {P} (L)
415
422
416
- lemma two_lt_line_count [projective_plane P L] (p : P) : 2 < line_count L p :=
423
+ lemma two_lt_line_count [finite P] [finite L] (p : P) : 2 < line_count L p :=
417
424
by simpa only [line_count_eq L p, nat.succ_lt_succ_iff] using one_lt_order P L
418
425
419
426
variables (P) {L}
420
427
421
- lemma two_lt_point_count [projective_plane P L] (l : L) : 2 < point_count P l :=
428
+ lemma two_lt_point_count [finite P] [finite L] (l : L) : 2 < point_count P l :=
422
429
by simpa only [point_count_eq P l, nat.succ_lt_succ_iff] using one_lt_order P L
423
430
424
431
variables (P) (L)
425
432
426
- lemma card_points [projective_plane P L] : fintype.card P = order P L ^ 2 + order P L + 1 :=
433
+ lemma card_points [fintype P] [finite L] : fintype.card P = order P L ^ 2 + order P L + 1 :=
427
434
begin
435
+ casesI nonempty_fintype L,
428
436
obtain ⟨p, -⟩ := @exists_config P L _ _,
429
437
let ϕ : {q // q ≠ p} ≃ Σ (l : {l : L // p ∈ l}), {q // q ∈ l.1 ∧ q ≠ p} :=
430
438
{ to_fun := λ q, ⟨⟨mk_line q.2 , (mk_line_ax q.2 ).2 ⟩, q, (mk_line_ax q.2 ).1 , q.2 ⟩,
@@ -447,7 +455,8 @@ begin
447
455
rw [←nat.card_eq_fintype_card, ←line_count, line_count_eq, smul_eq_mul, nat.succ_mul, sq],
448
456
end
449
457
450
- lemma card_lines [projective_plane P L] : fintype.card L = order P L ^ 2 + order P L + 1 :=
458
+ lemma card_lines [finite P] [fintype L] :
459
+ fintype.card L = order P L ^ 2 + order P L + 1 :=
451
460
(card_points (dual L) (dual P)).trans (congr_arg (λ n, n ^ 2 + n + 1 ) (dual.order P L))
452
461
453
462
end projective_plane
0 commit comments