Skip to content

Commit ad4a3f3

Browse files
committed
refactor(OnePoint/ProjectiveLine): use Pi instead of Prod
1 parent 29f21b6 commit ad4a3f3

2 files changed

Lines changed: 74 additions & 38 deletions

File tree

Mathlib/LinearAlgebra/Projectivization/Action.lean

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ Authors: David Loeffler
55
-/
66
module
77

8+
public import Mathlib.Data.Matrix.Action
9+
public import Mathlib.LinearAlgebra.Eigenspace.Basic
10+
public import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup.Defs
811
public import Mathlib.LinearAlgebra.Projectivization.Basic
9-
public import Mathlib.GroupTheory.GroupAction.Ring
1012

1113
/-!
1214
# Group actions on projectivization
@@ -16,7 +18,7 @@ Show that (among other groups), the general linear group of `V` acts on `ℙ K V
1618

1719
@[expose] public section
1820

19-
open scoped LinearAlgebra.Projectivization Matrix
21+
open LinearAlgebra.Projectivization Matrix
2022

2123
namespace Projectivization
2224

@@ -46,4 +48,32 @@ lemma smul_mk (g : G) {v : V} (hv : v ≠ 0) :
4648

4749
end DivisionRing
4850

51+
section Field
52+
53+
variable {K : Type*} [Field K]
54+
55+
/-- The fixed points of an invertible linear map acting on the projectivization of a vector
56+
space are precisely the eigenspaces. -/
57+
theorem smul_eq_self_iff' {M : Type*} [AddCommGroup M] [Module K M]
58+
{g : LinearMap.GeneralLinearGroup K M} {y : Projectivization K M} :
59+
g • y = y ↔ ∃ a, y.submodule ≤ Module.End.eigenspace g a := by
60+
induction y with | h y hy =>
61+
simp only [Projectivization.smul_mk, Projectivization.mk_eq_mk_iff,
62+
SetLike.le_def, Module.End.mem_eigenspace_iff, Projectivization.submodule_mk,
63+
Submodule.mem_span_singleton, forall_exists_index]
64+
constructor
65+
· refine fun ⟨a, hay⟩ ↦ ⟨a, fun x b hxb ↦ ?_⟩
66+
simp [← hxb, smul_comm _ b, ← a.smul_def, g.smul_def, hay]
67+
· rintro ⟨a, ha⟩
68+
refine ⟨.mk0 a (fun ha' ↦ hy ?_), (ha 1 (one_smul ..)).symm⟩
69+
specialize ha 1 rfl
70+
exact (smul_eq_zero_iff_eq g).mp (by aesop)
71+
72+
theorem smul_eq_self_iff {ι : Type*} [Fintype ι] [DecidableEq ι]
73+
{g : GL ι K} {y : Projectivization K (ι → K)} :
74+
g • y = y ↔ ∃ a, y.submodule ≤ Module.End.eigenspace g.toLin a :=
75+
smul_eq_self_iff' (g := g.toLin)
76+
77+
end Field
78+
4979
end Projectivization

Mathlib/Topology/Compactification/OnePoint/ProjectiveLine.lean

Lines changed: 42 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ public import Mathlib.Topology.Compactification.OnePoint.Basic
1515
# One-point compactification and projectivization
1616
1717
We construct a set-theoretic equivalence between
18-
`OnePoint K` and the projectivization `ℙ K (K × K)` for an arbitrary division ring `K`.
18+
`OnePoint K` and the projectivization `ℙ K (Fin 2 → K)` for an arbitrary division ring `K`.
1919
2020
TODO: Add the extension of this equivalence to a homeomorphism in the case `K = ℝ`,
2121
where `OnePoint ℝ` gets the topology of one-point compactification.
2222
2323
2424
## Main definitions and results
2525
26-
* `OnePoint.equivProjectivization` : the equivalence `OnePoint K ≃ ℙ K (K × K)`.
26+
* `OnePoint.equivProjectivization` : the equivalence `OnePoint K ≃ ℙ K (Fin 2 → K)`.
2727
2828
## Tags
2929
@@ -40,20 +40,15 @@ section MatrixProdAction
4040

4141
variable {R n : Type*} [Semiring R] [Fintype n] [DecidableEq n]
4242

43-
instance : Module (Matrix (Fin 2) (Fin 2) R) (R × R) :=
44-
(LinearEquiv.finTwoArrow R R).symm.toAddEquiv.module _
43+
@[simp] lemma Matrix.mulVec_fin_two (m : Matrix (Fin 2) (Fin 2) R) (v : Fin 2 → R) :
44+
m *ᵥ v = ![m 0 0 * v 0 + m 0 1 * v 1, m 1 0 * v 0 + m 1 1 * v 1] := by
45+
ext i
46+
fin_cases i <;>
47+
simp [mulVec_eq_sum]
4548

46-
instance {S} [DistribSMul S R] [SMulCommClass R S R] :
47-
SMulCommClass (Matrix (Fin 2) (Fin 2) R) S (R × R) :=
48-
(LinearEquiv.finTwoArrow R R).symm.smulCommClass _ _
49-
50-
@[simp] lemma Matrix.fin_two_smul_prod (g : Matrix (Fin 2) (Fin 2) R) (v : R × R) :
51-
g • v = (g 0 0 * v.1 + g 0 1 * v.2, g 1 0 * v.1 + g 1 1 * v.2) := by
52-
simp [Equiv.smul_def, smul_eq_mulVec, Matrix.mulVec_eq_sum]
53-
54-
@[simp] lemma Matrix.GeneralLinearGroup.fin_two_smul_prod {R : Type*} [CommRing R]
55-
(g : GL (Fin 2) R) (v : R × R) :
56-
g • v = (g 0 0 * v.1 + g 0 1 * v.2, g 1 0 * v.1 + g 1 1 * v.2) := by
49+
@[simp] lemma Matrix.GeneralLinearGroup.fin_two_smul {R : Type*} [CommRing R]
50+
(g : GL (Fin 2) R) (v : Fin 2 → R) :
51+
g • v = ![g 0 0 * v 0 + g 0 1 * v 1, g 1 0 * v 0 + g 1 1 * v 1] := by
5752
simp [Units.smul_def]
5853

5954
end MatrixProdAction
@@ -65,40 +60,39 @@ section DivisionRing
6560
variable (K : Type*) [DivisionRing K] [DecidableEq K]
6661

6762
/-- The one-point compactification of a division ring `K` is equivalent to
68-
the projectivization `ℙ K (K × K)`. -/
69-
def equivProjectivization :
70-
OnePoint K ≃ ℙ K (K × K) where
71-
toFun p := p.elim (mk K (1, 0) (by simp)) (fun t ↦ mk K (t, 1) (by simp))
63+
the projectivization `ℙ K (Fin 2 → K)`. -/
64+
def equivProjectivization : OnePoint K ≃ ℙ K (Fin 2 → K) where
65+
toFun p := p.elim (mk K ![1, 0] (by simp)) (fun t ↦ mk K ![t, 1] (by simp))
7266
invFun p := by
7367
refine Projectivization.lift
74-
(fun u : {v : K × K // v ≠ 0} ↦ if u.1.2 = 0 thenelse ((u.1.2)⁻¹ * u.1.1)) ?_ p
75-
rintro ⟨-, hv⟩ ⟨⟨x, y⟩, hw⟩ t rfl
68+
(fun u : {v : Fin 2K // v ≠ 0} ↦ if u.1 1 = 0 thenelse ((u.1 1)⁻¹ * u.1 0)) ?_ p
69+
rintro ⟨-, hv⟩ ⟨w, hw⟩ t rfl
7670
have ht : t ≠ 0 := by rintro rfl; simp at hv
77-
by_cases h₀ : y = 0 <;> simp [h₀, ht, mul_assoc]
71+
by_cases h₀ : w 1 = 0 <;> simp [h₀, ht, mul_assoc]
7872
left_inv p := by cases p <;> simp
7973
right_inv p := by
80-
induction p using ind with | h p hp =>
81-
obtain ⟨x, y⟩ := p
82-
by_cases h₀ : y = 0 <;> simp only [mk_eq_mk_iff', h₀, Projectivization.lift_mk, if_true,
83-
if_false, OnePoint.elim_infty, OnePoint.elim_some, Prod.smul_mk, Prod.mk.injEq, smul_eq_mul,
84-
mul_zero, and_true]
85-
· use x⁻¹
86-
simp_all
87-
· exact ⟨y⁻¹, rfl, inv_mul_cancel₀ h₀⟩
74+
induction p using ind with | h w hw =>
75+
by_cases h₀ : w 1 = 0 <;> simp only [mk_eq_mk_iff', h₀, Projectivization.lift_mk, if_true,
76+
if_false, OnePoint.elim_infty, OnePoint.elim_some]
77+
· have : w 00 := fun h ↦ hw <| funext <| by simp_all
78+
use (w 0)⁻¹
79+
ext i
80+
fin_cases i <;> simp_all
81+
· exact ⟨(w 1)⁻¹, funext <| by simp [inv_mul_cancel₀ h₀]
8882

8983
@[simp]
9084
lemma equivProjectivization_apply_infinity :
91-
equivProjectivization K ∞ = mk K 1, 0 (by simp) :=
85+
equivProjectivization K ∞ = mk K ![1, 0] (by simp) :=
9286
rfl
9387

9488
@[simp]
9589
lemma equivProjectivization_apply_coe (t : K) :
96-
equivProjectivization K t = mk K t, 1 (by simp) :=
90+
equivProjectivization K t = mk K ![t, 1] (by simp) :=
9791
rfl
9892

9993
@[simp]
100-
lemma equivProjectivization_symm_apply_mk (x y : K) (h : (x, y)0) :
101-
(equivProjectivization K).symm (mk K ⟨x, y⟩ h) = if y = 0 thenelse y⁻¹ * x := by
94+
lemma equivProjectivization_symm_apply_mk (v : Fin 2K) (h : v0) :
95+
(equivProjectivization K).symm (mk K v h) = if v 1 = 0 thenelse (v 1)⁻¹ * v 0 := by
10296
simp [equivProjectivization]
10397

10498
end DivisionRing
@@ -112,9 +106,14 @@ with the `ℙ¹(K)` (which is given explicitly by Möbius transformations). -/
112106
instance instGLAction : MulAction (GL (Fin 2) K) (OnePoint K) :=
113107
(equivProjectivization K).mulAction (GL (Fin 2) K)
114108

109+
lemma equivProjectivization_smul {g : GL (Fin 2) K} (x : OnePoint K) :
110+
equivProjectivization K (g • x) = g • equivProjectivization K x := by
111+
rw [Equiv.smul_def, Equiv.apply_symm_apply]
112+
115113
lemma smul_infty_def {g : GL (Fin 2) K} :
116-
g • ∞ = (equivProjectivization K).symm (.mk K (g 0 0, g 1 0) (fun h ↦ by
117-
simpa [det_fin_two, Prod.mk_eq_zero.mp h] using g.det_ne_zero)) := by
114+
g • ∞ = (equivProjectivization K).symm (.mk K ![g 0 0, g 1 0] (fun h ↦ by
115+
simpa [det_fin_two, show g 0 0 = 0 from congr_fun h 0, show g 1 0 = 0 from congr_fun h 1]
116+
using g.det_ne_zero)) := by
118117
simp [Equiv.smul_def, mulVec_eq_sum, Units.smul_def]
119118

120119
lemma smul_infty_eq_ite (g : GL (Fin 2) K) :
@@ -146,6 +145,13 @@ namespace Matrix.GeneralLinearGroup
146145

147146
variable {K : Type*} [Field K] [DecidableEq K]
148147

148+
lemma smul_eq_self_iff {g : GL (Fin 2) K} {x : OnePoint K} :
149+
g • x = x ↔ ∃ a : K,
150+
(equivProjectivization K x).submodule ≤ Module.End.eigenspace (toLin g).val a := by
151+
set y := equivProjectivization K x
152+
rw [show g • x = x ↔ g • y = y by rw [← equivProjectivization_smul, (Equiv.injective _).eq_iff]]
153+
apply Projectivization.smul_eq_self_iff
154+
149155
/-- The roots of `g.fixpointPolynomial` are the fixed points of `g ∈ GL(2, K)` acting on the finite
150156
part of `OnePoint K`. -/
151157
lemma fixpointPolynomial_aeval_eq_zero_iff {c : K} {g : GL (Fin 2) K} :

0 commit comments

Comments
 (0)