File: Mathlib/Analysis/Complex/UpperHalfPlane/Basic.lean

full_name: _aux_Mathlib_Analysis_Complex_UpperHalfPlane_Basic___unexpand_Matrix_GLPos_1
code: local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_Mathlib_Analysis_Complex_UpperHalfPlane_Basic___macroRules_termGL(_,_)⁺_1»
code: local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R
goal: Lean.Macro

full_name: «_aux_Mathlib_Analysis_Complex_UpperHalfPlane_Basic___macroRules_term↑ₘ__1»
code: local notation:1024 "↑ₘ" A:1024 =>
  (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _)
goal: Lean.Macro

full_name: «_aux_Mathlib_Analysis_Complex_UpperHalfPlane_Basic___macroRules_term↑ₘ[_]__1»
code: local notation:1024 "↑ₘ[" R "]" A:1024 =>
  ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R)
goal: Lean.Macro

full_name: UpperHalfPlane
code: /-- The open upper half plane -/
def UpperHalfPlane 
goal: Type

full_name: UpperHalfPlane._aux_Mathlib_Analysis_Complex_UpperHalfPlane_Basic___macroRules_UpperHalfPlane_termℍ_1
code: @[inherit_doc] scoped[UpperHalfPlane] notation "ℍ" => UpperHalfPlane
goal: Lean.Macro

full_name: UpperHalfPlane._aux_Mathlib_Analysis_Complex_UpperHalfPlane_Basic___unexpand_UpperHalfPlane_1
code: @[inherit_doc] scoped[UpperHalfPlane] notation "ℍ" => UpperHalfPlane
goal: Lean.PrettyPrinter.Unexpander

full_name: UpperHalfPlane.coe
code: /-- Canonical embedding of the upper half-plane into `ℂ`. -/
@[coe] protected def coe (z : ℍ) : ℂ 
goal: ℂ

full_name: UpperHalfPlane.instCoeOutComplex
code: instance : CoeOut ℍ ℂ 
goal: CoeOut ℍ ℂ

full_name: UpperHalfPlane.instInhabited
code: instance : Inhabited ℍ 
goal: Inhabited ℍ

full_name: UpperHalfPlane.ext
code: @[ext] theorem ext {a b : ℍ} (h : (a : ℂ) = b) : a = b 
goal: a = b

full_name: UpperHalfPlane.ext_iff
code: protected theorem ext_iff {a b : ℍ} : a = b ↔ (a : ℂ) = b 
goal: a = b ↔ ↑a = ↑b

full_name: UpperHalfPlane.ext_iff'
code: @[simp, norm_cast] theorem ext_iff' {a b : ℍ} : (a : ℂ) = b ↔ a = b 
goal: ↑a = ↑b ↔ a = b

full_name: UpperHalfPlane.canLift
code: instance canLift : CanLift ℂ ℍ ((↑) : ℍ → ℂ) fun z => 0 < z.im 
goal: CanLift ℂ ℍ UpperHalfPlane.coe fun z => 0 < z.im

full_name: UpperHalfPlane.im
code: /-- Imaginary part -/
def im (z : ℍ) 
goal: ℝ

full_name: UpperHalfPlane.re
code: /-- Real part -/
def re (z : ℍ) 
goal: ℝ

full_name: UpperHalfPlane.ext'
code: /-- Extensionality lemma in terms of `UpperHalfPlane.re` and `UpperHalfPlane.im`. -/
theorem ext' {a b : ℍ} (hre : a.re = b.re) (him : a.im = b.im) : a = b 
goal: a = b

full_name: UpperHalfPlane.mk
code: /-- Constructor for `UpperHalfPlane`. It is useful if `⟨z, h⟩` makes Lean use a wrong
typeclass instance. -/
def mk (z : ℂ) (h : 0 < z.im) : ℍ 
goal: ℍ

full_name: UpperHalfPlane.coe_im
code: @[simp]
theorem coe_im (z : ℍ) : (z : ℂ).im = z.im 
goal: (↑z).im = z.im

full_name: UpperHalfPlane.coe_re
code: @[simp]
theorem coe_re (z : ℍ) : (z : ℂ).re = z.re 
goal: (↑z).re = z.re

full_name: UpperHalfPlane.mk_re
code: @[simp]
theorem mk_re (z : ℂ) (h : 0 < z.im) : (mk z h).re = z.re 
goal: (UpperHalfPlane.mk z h).re = z.re

full_name: UpperHalfPlane.mk_im
code: @[simp]
theorem mk_im (z : ℂ) (h : 0 < z.im) : (mk z h).im = z.im 
goal: (UpperHalfPlane.mk z h).im = z.im

full_name: UpperHalfPlane.coe_mk
code: @[simp]
theorem coe_mk (z : ℂ) (h : 0 < z.im) : (mk z h : ℂ) = z 
goal: ↑(UpperHalfPlane.mk z h) = z

full_name: UpperHalfPlane.mk_coe
code: @[simp]
theorem mk_coe (z : ℍ) (h : 0 < (z : ℂ).im := z.2) : mk z h = z 
goal: UpperHalfPlane.mk (↑z) h = z

full_name: UpperHalfPlane.re_add_im
code: theorem re_add_im (z : ℍ) : (z.re + z.im * Complex.I : ℂ) = z 
goal: ↑z.re + ↑z.im * Complex.I = ↑z

full_name: UpperHalfPlane.im_pos
code: theorem im_pos (z : ℍ) : 0 < z.im 
goal: 0 < z.im

full_name: UpperHalfPlane.im_ne_zero
code: theorem im_ne_zero (z : ℍ) : z.im ≠ 0 
goal: z.im ≠ 0

full_name: UpperHalfPlane.ne_zero
code: theorem ne_zero (z : ℍ) : (z : ℂ) ≠ 0 
goal: ↑z ≠ 0

full_name: UpperHalfPlane.I
code: /-- Define I := √-1 as an element on the upper half plane. -/
def I : ℍ 
goal: ℍ

full_name: UpperHalfPlane.I_im
code: @[simp]
lemma I_im : I.im = 1 
goal: UpperHalfPlane.I.im = 1

full_name: UpperHalfPlane.I_re
code: @[simp]
lemma I_re : I.re = 0 
goal: UpperHalfPlane.I.re = 0

full_name: UpperHalfPlane.coe_I
code: @[simp, norm_cast]
lemma coe_I : I = Complex.I 
goal: ↑UpperHalfPlane.I = Complex.I

full_name: Mathlib.Meta.Positivity.evalUpperHalfPlaneIm
code: /-- Extension for the `positivity` tactic: `UpperHalfPlane.im`. -/
@[positivity UpperHalfPlane.im _]
def evalUpperHalfPlaneIm : PositivityExt 
goal: Mathlib.Meta.Positivity.PositivityExt

full_name: Mathlib.Meta.Positivity.evalUpperHalfPlaneCoe
code: /-- Extension for the `positivity` tactic: `UpperHalfPlane.coe`. -/
@[positivity UpperHalfPlane.coe _]
def evalUpperHalfPlaneCoe : PositivityExt 
goal: Mathlib.Meta.Positivity.PositivityExt

full_name: UpperHalfPlane.normSq_pos
code: theorem normSq_pos (z : ℍ) : 0 < Complex.normSq (z : ℂ) 
goal: 0 < Complex.normSq ↑z

full_name: UpperHalfPlane.normSq_ne_zero
code: theorem normSq_ne_zero (z : ℍ) : Complex.normSq (z : ℂ) ≠ 0 
goal: Complex.normSq ↑z ≠ 0

full_name: UpperHalfPlane.im_inv_neg_coe_pos
code: theorem im_inv_neg_coe_pos (z : ℍ) : 0 < (-z : ℂ)⁻¹.im 
goal: 0 < (-↑z)⁻¹.im

full_name: UpperHalfPlane.num
code: /-- Numerator of the formula for a fractional linear transformation -/
def num (g : GL(2, ℝ)⁺) (z : ℍ) : ℂ 
goal: ℂ

full_name: UpperHalfPlane.denom
code: /-- Denominator of the formula for a fractional linear transformation -/
def denom (g : GL(2, ℝ)⁺) (z : ℍ) : ℂ 
goal: ℂ

full_name: UpperHalfPlane.linear_ne_zero
code: theorem linear_ne_zero (cd : Fin 2 → ℝ) (z : ℍ) (h : cd ≠ 0) : (cd 0 : ℂ) * z + cd 1 ≠ 0 
goal: ↑(cd 0) * ↑z + ↑(cd 1) ≠ 0

full_name: UpperHalfPlane.denom_ne_zero
code: theorem denom_ne_zero (g : GL(2, ℝ)⁺) (z : ℍ) : denom g z ≠ 0 
goal: UpperHalfPlane.denom g z ≠ 0

full_name: UpperHalfPlane.normSq_denom_pos
code: theorem normSq_denom_pos (g : GL(2, ℝ)⁺) (z : ℍ) : 0 < Complex.normSq (denom g z) 
goal: 0 < Complex.normSq (UpperHalfPlane.denom g z)

full_name: UpperHalfPlane.normSq_denom_ne_zero
code: theorem normSq_denom_ne_zero (g : GL(2, ℝ)⁺) (z : ℍ) : Complex.normSq (denom g z) ≠ 0 
goal: Complex.normSq (UpperHalfPlane.denom g z) ≠ 0

full_name: UpperHalfPlane.smulAux'
code: /-- Fractional linear transformation, also known as the Moebius transformation -/
def smulAux' (g : GL(2, ℝ)⁺) (z : ℍ) : ℂ 
goal: ℂ

full_name: UpperHalfPlane.smulAux'_im
code: theorem smulAux'_im (g : GL(2, ℝ)⁺) (z : ℍ) :
    (smulAux' g z).im = det ↑ₘg * z.im / Complex.normSq (denom g z) 
goal: (UpperHalfPlane.smulAux' g z).im = (↑↑g).det * z.im / Complex.normSq (UpperHalfPlane.denom g z)

full_name: UpperHalfPlane.smulAux
code: /-- Fractional linear transformation, also known as the Moebius transformation -/
def smulAux (g : GL(2, ℝ)⁺) (z : ℍ) : ℍ 
goal: ℍ

full_name: UpperHalfPlane.denom_cocycle
code: theorem denom_cocycle (x y : GL(2, ℝ)⁺) (z : ℍ) :
    denom (x * y) z = denom x (smulAux y z) * denom y z 
goal: UpperHalfPlane.denom (x * y) z = UpperHalfPlane.denom x (UpperHalfPlane.smulAux y z) * UpperHalfPlane.denom y z

full_name: UpperHalfPlane.mul_smul'
code: theorem mul_smul' (x y : GL(2, ℝ)⁺) (z : ℍ) : smulAux (x * y) z = smulAux x (smulAux y z) 
goal: UpperHalfPlane.smulAux (x * y) z = UpperHalfPlane.smulAux x (UpperHalfPlane.smulAux y z)

full_name: UpperHalfPlane.instMulActionSubtypeGeneralLinearGroupFinOfNatNatRealMemSubgroupGLPos
code: /-- The action of `GLPos 2 ℝ` on the upper half-plane by fractional linear transformations. -/
instance : MulAction GL(2, ℝ)⁺ ℍ 
goal: MulAction ↥GL(2, ℝ)⁺ ℍ

full_name: UpperHalfPlane.SLAction
code: instance SLAction {R : Type*} [CommRing R] [Algebra R ℝ] : MulAction SL(2, R) ℍ 
goal: MulAction SL(2, R) ℍ

full_name: UpperHalfPlane.ModularGroup.coe'
code: /-- Canonical embedding of `SL(2, ℤ)` into `GL(2, ℝ)⁺`. -/
@[coe]
def coe' : SL(2, ℤ) → GL(2, ℝ)⁺ 
goal: SL(2, ℤ) → ↥GL(2, ℝ)⁺

full_name: UpperHalfPlane.ModularGroup.instCoeSpecialLinearGroupFinOfNatNatIntSubtypeGeneralLinearGroupRealMemSubgroupGLPos
code: instance : Coe SL(2, ℤ) GL(2, ℝ)⁺ 
goal: Coe SL(2, ℤ) ↥GL(2, ℝ)⁺

full_name: UpperHalfPlane.ModularGroup.coe'_apply_complex
code: @[simp]
theorem coe'_apply_complex {g : SL(2, ℤ)} {i j : Fin 2} :
    (Units.val <| Subtype.val <| coe' g) i j = (Subtype.val g i j : ℂ) 
goal: ↑(↑↑↑g i j) = ↑(↑g i j)

full_name: UpperHalfPlane.ModularGroup.det_coe'
code: @[simp]
theorem det_coe' {g : SL(2, ℤ)} : det (Units.val <| Subtype.val <| coe' g) = 1 
goal: (↑↑↑g).det = 1

full_name: UpperHalfPlane.ModularGroup.SLOnGLPos
code: instance SLOnGLPos : SMul SL(2, ℤ) GL(2, ℝ)⁺ 
goal: SMul SL(2, ℤ) ↥GL(2, ℝ)⁺

full_name: UpperHalfPlane.ModularGroup.SLOnGLPos_smul_apply
code: theorem SLOnGLPos_smul_apply (s : SL(2, ℤ)) (g : GL(2, ℝ)⁺) (z : ℍ) :
    (s • g) • z = ((s : GL(2, ℝ)⁺) * g) • z 
goal: (s • g) • z = (↑s * g) • z

full_name: UpperHalfPlane.ModularGroup.SL_to_GL_tower
code: instance SL_to_GL_tower : IsScalarTower SL(2, ℤ) GL(2, ℝ)⁺ ℍ 
goal: IsScalarTower SL(2, ℤ) ↥GL(2, ℝ)⁺ ℍ

full_name: UpperHalfPlane.ModularGroup.subgroupGLPos
code: instance subgroupGLPos : SMul Γ GL(2, ℝ)⁺ 
goal: SMul ↥Γ ↥GL(2, ℝ)⁺

full_name: UpperHalfPlane.ModularGroup.subgroup_on_glpos_smul_apply
code: theorem subgroup_on_glpos_smul_apply (s : Γ) (g : GL(2, ℝ)⁺) (z : ℍ) :
    (s • g) • z = ((s : GL(2, ℝ)⁺) * g) • z 
goal: (s • g) • z = (↑↑s * g) • z

full_name: UpperHalfPlane.ModularGroup.subgroup_on_glpos
code: instance subgroup_on_glpos : IsScalarTower Γ GL(2, ℝ)⁺ ℍ 
goal: IsScalarTower ↥Γ ↥GL(2, ℝ)⁺ ℍ

full_name: UpperHalfPlane.ModularGroup.subgroupSL
code: instance subgroupSL : SMul Γ SL(2, ℤ) 
goal: SMul ↥Γ SL(2, ℤ)

full_name: UpperHalfPlane.ModularGroup.subgroup_on_SL_apply
code: theorem subgroup_on_SL_apply (s : Γ) (g : SL(2, ℤ)) (z : ℍ) :
    (s • g) • z = ((s : SL(2, ℤ)) * g) • z 
goal: (s • g) • z = (↑s * g) • z

full_name: UpperHalfPlane.ModularGroup.subgroup_to_SL_tower
code: instance subgroup_to_SL_tower : IsScalarTower Γ SL(2, ℤ) ℍ 
goal: IsScalarTower ↥Γ SL(2, ℤ) ℍ

full_name: UpperHalfPlane.specialLinearGroup_apply
code: theorem specialLinearGroup_apply {R : Type*} [CommRing R] [Algebra R ℝ] (g : SL(2, R)) (z : ℍ) :
    g • z =
      mk
        (((algebraMap R ℝ (↑ₘ[R] g 0 0) : ℂ) * z + (algebraMap R ℝ (↑ₘ[R] g 0 1) : ℂ)) /
          ((algebraMap R ℝ (↑ₘ[R] g 1 0) : ℂ) * z + (algebraMap R ℝ (↑ₘ[R] g 1 1) : ℂ)))
        (g • z).property 
goal: g • z =
  UpperHalfPlane.mk
    ((↑((algebraMap R ℝ) (↑↑g 0 0)) * ↑z + ↑((algebraMap R ℝ) (↑↑g 0 1))) /
      (↑((algebraMap R ℝ) (↑↑g 1 0)) * ↑z + ↑((algebraMap R ℝ) (↑↑g 1 1))))
    ⋯

full_name: UpperHalfPlane.coe_smul
code: @[simp]
theorem coe_smul (g : GL(2, ℝ)⁺) (z : ℍ) : ↑(g • z) = num g z / denom g z 
goal: ↑(g • z) = UpperHalfPlane.num g z / UpperHalfPlane.denom g z

full_name: UpperHalfPlane.re_smul
code: @[simp]
theorem re_smul (g : GL(2, ℝ)⁺) (z : ℍ) : (g • z).re = (num g z / denom g z).re 
goal: (g • z).re = (UpperHalfPlane.num g z / UpperHalfPlane.denom g z).re

full_name: UpperHalfPlane.im_smul
code: theorem im_smul (g : GL(2, ℝ)⁺) (z : ℍ) : (g • z).im = (num g z / denom g z).im 
goal: (g • z).im = (UpperHalfPlane.num g z / UpperHalfPlane.denom g z).im

full_name: UpperHalfPlane.im_smul_eq_div_normSq
code: theorem im_smul_eq_div_normSq (g : GL(2, ℝ)⁺) (z : ℍ) :
    (g • z).im = det ↑ₘg * z.im / Complex.normSq (denom g z) 
goal: (g • z).im = (↑↑g).det * z.im / Complex.normSq (UpperHalfPlane.denom g z)

full_name: UpperHalfPlane.c_mul_im_sq_le_normSq_denom
code: theorem c_mul_im_sq_le_normSq_denom (z : ℍ) (g : SL(2, ℝ)) :
    ((↑ₘg 1 0 : ℝ) * z.im) ^ 2 ≤ Complex.normSq (denom g z) 
goal: (↑↑(Matrix.SpecialLinearGroup.toGLPos g) 1 0 * z.im) ^ 2 ≤
  Complex.normSq (UpperHalfPlane.denom (Matrix.SpecialLinearGroup.toGLPos g) z)

full_name: UpperHalfPlane.neg_smul
code: @[simp]
theorem neg_smul (g : GL(2, ℝ)⁺) (z : ℍ) : -g • z = g • z 
goal: -g • z = g • z

full_name: UpperHalfPlane.ModularGroup.sl_moeb
code: @[simp]
theorem sl_moeb (A : SL(2, ℤ)) (z : ℍ) : A • z = (A : GL(2, ℝ)⁺) • z 
goal: A • z = ↑A • z

full_name: UpperHalfPlane.ModularGroup.subgroup_moeb
code: theorem subgroup_moeb (A : Γ) (z : ℍ) : A • z = (A : GL(2, ℝ)⁺) • z 
goal: A • z = ↑↑A • z

full_name: UpperHalfPlane.ModularGroup.subgroup_to_sl_moeb
code: @[simp]
theorem subgroup_to_sl_moeb (A : Γ) (z : ℍ) : A • z = (A : SL(2, ℤ)) • z 
goal: A • z = ↑A • z

full_name: UpperHalfPlane.ModularGroup.SL_neg_smul
code: @[simp high]
theorem SL_neg_smul (g : SL(2, ℤ)) (z : ℍ) : -g • z = g • z 
goal: -g • z = g • z

full_name: UpperHalfPlane.ModularGroup.im_smul_eq_div_normSq
code: nonrec theorem im_smul_eq_div_normSq :
    (g • z).im = z.im / Complex.normSq (denom g z) 
goal: (g • z).im = z.im / Complex.normSq (UpperHalfPlane.denom (↑g) z)

full_name: UpperHalfPlane.ModularGroup.denom_apply
code: theorem denom_apply (g : SL(2, ℤ)) (z : ℍ) :
    denom g z = (↑g : Matrix (Fin 2) (Fin 2) ℤ) 1 0 * z + (↑g : Matrix (Fin 2) (Fin 2) ℤ) 1 1 
goal: UpperHalfPlane.denom (↑g) z = ↑(↑g 1 0) * ↑z + ↑(↑g 1 1)

full_name: UpperHalfPlane.posRealAction
code: instance posRealAction : MulAction { x : ℝ // 0 < x } ℍ 
goal: MulAction { x // 0 < x } ℍ

full_name: UpperHalfPlane.coe_pos_real_smul
code: @[simp]
theorem coe_pos_real_smul : ↑(x • z) = (x : ℝ) • (z : ℂ) 
goal: ↑(x • z) = ↑x • ↑z

full_name: UpperHalfPlane.pos_real_im
code: @[simp]
theorem pos_real_im : (x • z).im = x * z.im 
goal: (x • z).im = ↑x * z.im

full_name: UpperHalfPlane.pos_real_re
code: @[simp]
theorem pos_real_re : (x • z).re = x * z.re 
goal: (x • z).re = ↑x * z.re

full_name: UpperHalfPlane.instAddActionReal
code: instance : AddAction ℝ ℍ 
goal: AddAction ℝ ℍ

full_name: UpperHalfPlane.coe_vadd
code: @[simp]
theorem coe_vadd : ↑(x +ᵥ z) = (x + z : ℂ) 
goal: ↑(x +ᵥ z) = ↑x + ↑z

full_name: UpperHalfPlane.vadd_re
code: @[simp]
theorem vadd_re : (x +ᵥ z).re = x + z.re 
goal: (x +ᵥ z).re = x + z.re

full_name: UpperHalfPlane.vadd_im
code: @[simp]
theorem vadd_im : (x +ᵥ z).im = z.im 
goal: (x +ᵥ z).im = z.im

full_name: UpperHalfPlane.modular_S_smul
code: theorem modular_S_smul (z : ℍ) : ModularGroup.S • z = mk (-z : ℂ)⁻¹ z.im_inv_neg_coe_pos 
goal: ModularGroup.S • z = UpperHalfPlane.mk (-↑z)⁻¹ ⋯

full_name: UpperHalfPlane.modular_T_zpow_smul
code: theorem modular_T_zpow_smul (z : ℍ) (n : ℤ) : ModularGroup.T ^ n • z = (n : ℝ) +ᵥ z 
goal: ModularGroup.T ^ n • z = ↑n +ᵥ z

full_name: UpperHalfPlane.modular_T_smul
code: theorem modular_T_smul (z : ℍ) : ModularGroup.T • z = (1 : ℝ) +ᵥ z 
goal: ModularGroup.T • z = 1 +ᵥ z

full_name: UpperHalfPlane.exists_SL2_smul_eq_of_apply_zero_one_eq_zero
code: theorem exists_SL2_smul_eq_of_apply_zero_one_eq_zero (g : SL(2, ℝ)) (hc : ↑ₘ[ℝ] g 1 0 = 0) :
    ∃ (u : { x : ℝ // 0 < x }) (v : ℝ), (g • · : ℍ → ℍ) = (v +ᵥ ·) ∘ (u • ·) 
goal: ∃ u v, (fun x => g • x) = (fun x => v +ᵥ x) ∘ fun x => u • x

full_name: UpperHalfPlane.exists_SL2_smul_eq_of_apply_zero_one_ne_zero
code: theorem exists_SL2_smul_eq_of_apply_zero_one_ne_zero (g : SL(2, ℝ)) (hc : ↑ₘ[ℝ] g 1 0 ≠ 0) :
    ∃ (u : { x : ℝ // 0 < x }) (v w : ℝ),
      (g • · : ℍ → ℍ) =
        (w +ᵥ ·) ∘ (ModularGroup.S • · : ℍ → ℍ) ∘ (v +ᵥ · : ℍ → ℍ) ∘ (u • · : ℍ → ℍ) 
goal: ∃ u v w, (fun x => g • x) = (fun x => w +ᵥ x) ∘ (fun x => ModularGroup.S • x) ∘ (fun x => v +ᵥ x) ∘ fun x => u • x