Skip to content

Commit 4b51706

Browse files
committed
feat: fun_prop lemmas for GL n R and SL n R
1 parent fb17c7c commit 4b51706

2 files changed

Lines changed: 35 additions & 20 deletions

File tree

Mathlib/Analysis/Complex/UpperHalfPlane/ProperAction.lean

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,30 @@ public section
2626

2727
namespace UpperHalfPlane
2828

29+
@[fun_prop]
30+
theorem num_continuous : Continuous ↿num := by unfold num; fun_prop
31+
32+
@[fun_prop]
33+
theorem denom_continuous : Continuous ↿denom := by unfold denom; fun_prop
34+
2935
lemma continuous_toSL2R : Continuous toSL2R := by
3036
refine continuous_induced_rng.mpr (continuous_matrix fun i j ↦ ?_)
3137
fin_cases i <;> fin_cases j
32-
· exact Real.continuous_sqrt.comp continuous_im
33-
· exact continuous_re.div₀ (by fun_prop) (fun τ : ℍ ↦ Real.sqrt_ne_zero'.mpr τ.im_pos)
34-
· exact continuous_const
35-
· simpa using .inv₀ (by fun_prop) (fun τ : ℍ ↦ Real.sqrt_ne_zero'.mpr τ.im_pos)
38+
all_goals
39+
simp only [Fin.zero_eta, Fin.isValue, Function.comp_apply, coe_toSL2R, one_div,
40+
Matrix.of_apply, Matrix.cons_val', Matrix.cons_val_zero, Matrix.cons_val_fin_one, Fin.mk_one,
41+
Matrix.cons_val_one]
42+
fun_prop (disch := grind [im_pos])
3643

3744
/-- The action of `SL(2, ℝ)` on `ℍ` is jointly continuous. -/
38-
instance instContinuousSMulSL2R : ContinuousSMul SL(2, ℝ) ℍ := by
39-
constructor
40-
suffices ∀ (g : SL(2, ℝ)) (τ : ℍ),
41-
ContinuousAt (fun ⟨h, z⟩ ↦ (h 0 0 * (z : ℂ) + h 0 1) / (h 1 0 * z + h 1 1)) (g, τ) by
42-
simpa [continuous_induced_rng, continuous_iff_continuousAt, Function.comp_def,
43-
coe_specialLinearGroup_apply]
44-
refine fun g τ ↦ .div ?_ ?_ (denom_ne_zero g τ) <;>
45-
refine .add (.mul ?_ (by fun_prop)) ?_ <;>
46-
· refine (Complex.continuous_ofReal.comp ?_).continuousAt
47-
exact (continuous_subtype_val.matrix_elem _ _).comp continuous_fst
45+
instance instContinuousSMulSL2R : ContinuousSMul SL(2, ℝ) ℍ where
46+
continuous_smul := by
47+
suffices ∀ (g : SL(2, ℝ)) (τ : ℍ),
48+
ContinuousAt (fun ⟨h, z⟩ ↦ (h 0 0 * (z : ℂ) + h 0 1) / (h 1 0 * z + h 1 1)) (g, τ) by
49+
simpa [continuous_induced_rng, continuous_iff_continuousAt, Function.comp_def,
50+
coe_specialLinearGroup_apply]
51+
refine fun g τ ↦ ?_
52+
fun_prop (disch := exact denom_ne_zero g τ)
4853

4954
open Topology in
5055
lemma σ_eventuallyEq (g : GL (Fin 2) ℝ) : σ =ᶠ[𝓝 g] fun _ ↦ σ g := by
@@ -63,12 +68,8 @@ instance instContinuousSMulGL2R : ContinuousSMul (GL (Fin 2) ℝ) ℍ := by
6368
simp only [continuous_induced_rng, Function.comp_def, coe_smul, continuous_iff_continuousAt,
6469
Prod.forall]
6570
refine fun g τ ↦ .congr ?_ (f := fun x ↦ (σ g) (num x.1 x.2 / denom x.1 x.2))
66-
(by filter_upwards [(σ_eventuallyEq g).prod_inl_nhds _] using by simp +contextual)
67-
refine ContinuousAt.comp (by fun_prop) (.div₀ ?_ ?_ (denom_ne_zero _ _)) <;>
68-
· refine .add (.mul ?_ (by fun_prop)) ?_ <;>
69-
· refine (Complex.continuous_ofReal.comp ?_).continuousAt
70-
refine Continuous.comp (g := fun g : GL (Fin 2) ℝ ↦ g _ _) ?_ continuous_fst
71-
exact (continuous_id.matrix_elem _ _).comp Units.continuous_val
71+
(by filter_upwards [(σ_eventuallyEq g).prod_inl_nhds _] using by simp +contextual)
72+
fun_prop (disch := apply denom_ne_zero)
7273

7374
section proper_orbit_map
7475

Mathlib/Topology/Algebra/Group/Matrix.lean

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ variable [Fintype n] [DecidableEq n] [CommRing R] [TopologicalSpace R] [IsTopolo
3131

3232
namespace Matrix.GeneralLinearGroup
3333

34+
omit [IsTopologicalRing R] in
35+
@[fun_prop]
36+
theorem continuous_apply {α : Type*} [TopologicalSpace α]
37+
(f : α → GL n R) (hf : Continuous f) (i : n) :
38+
Continuous (fun x => f x i) :=
39+
(by fun_prop : Continuous fun A : Matrix n n R ↦ A i).comp <| by fun_prop
40+
3441
/-- The determinant is continuous as a map from the general linear group to the units. -/
3542
@[continuity, fun_prop] protected lemma continuous_det :
3643
Continuous (det : GL n R → Rˣ) := by
@@ -56,6 +63,13 @@ omit [IsTopologicalRing R] in
5663
instance : TopologicalSpace (SL n R) :=
5764
inferInstanceAs <| TopologicalSpace (Subtype _)
5865

66+
omit [IsTopologicalRing R] in
67+
@[fun_prop]
68+
theorem Matrix.SpecialLinearGroup.continuous_apply {α : Type*} [TopologicalSpace α]
69+
(f : α → SL n R) (hf : Continuous f) (i) :
70+
Continuous (fun x => f x i) :=
71+
(by fun_prop : Continuous fun A : Matrix n n R ↦ A i).comp <| by fun_prop
72+
5973
/-- If `R` is a commutative ring with the discrete topology, then `SL(n, R)` has the discrete
6074
topology. -/
6175
instance [DiscreteTopology R] : DiscreteTopology (SL n R) :=

0 commit comments

Comments
 (0)