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

Proof steps:
state_before: g : SL(2, ℝ)
hc : ↑↑g 1 0 ≠ 0
⊢ ∃ u v w, (fun x => g • x) = (fun x => w +ᵥ x) ∘ (fun x => ModularGroup.S • x) ∘ (fun x => v +ᵥ x) ∘ fun x => u • x
state_after: g : SL(2, ℝ)
hc : ↑↑g 1 0 ≠ 0
h_denom : ∀ (z : ℍ), denom (toGLPos g) z ≠ 0
⊢ ∃ u v w, (fun x => g • x) = (fun x => w +ᵥ x) ∘ (fun x => ModularGroup.S • x) ∘ (fun x => v +ᵥ x) ∘ fun x => u • x
tactic: have h_denom := denom_ne_zero g
state_before: g : SL(2, ℝ)
hc : ↑↑g 1 0 ≠ 0
h_denom : ∀ (z : ℍ), denom (toGLPos g) z ≠ 0
⊢ ∃ u v w, (fun x => g • x) = (fun x => w +ᵥ x) ∘ (fun x => ModularGroup.S • x) ∘ (fun x => v +ᵥ x) ∘ fun x => u • x
state_after: case h
a b c d : ℝ
h : a * d - b * c = 1
hc : ↑↑⟨!![a, b; c, d], ⋯⟩ 1 0 ≠ 0
h_denom : ∀ (z : ℍ), denom (toGLPos ⟨!![a, b; c, d], ⋯⟩) z ≠ 0
⊢ ∃ u v w,
    (fun x => ⟨!![a, b; c, d], ⋯⟩ • x) =
      (fun x => w +ᵥ x) ∘ (fun x => ModularGroup.S • x) ∘ (fun x => v +ᵥ x) ∘ fun x => u • x
tactic: induction' g using Matrix.SpecialLinearGroup.fin_two_induction with a b c d h
state_before: case h
a b c d : ℝ
h : a * d - b * c = 1
hc : ↑↑⟨!![a, b; c, d], ⋯⟩ 1 0 ≠ 0
h_denom : ∀ (z : ℍ), denom (toGLPos ⟨!![a, b; c, d], ⋯⟩) z ≠ 0
⊢ ∃ u v w,
    (fun x => ⟨!![a, b; c, d], ⋯⟩ • x) =
      (fun x => w +ᵥ x) ∘ (fun x => ModularGroup.S • x) ∘ (fun x => v +ᵥ x) ∘ fun x => u • x
state_after: case h
a b c d : ℝ
h : a * d - b * c = 1
h_denom : ∀ (z : ℍ), denom (toGLPos ⟨!![a, b; c, d], ⋯⟩) z ≠ 0
hc : c ≠ 0
⊢ ∃ u v w,
    (fun x => ⟨!![a, b; c, d], ⋯⟩ • x) =
      (fun x => w +ᵥ x) ∘ (fun x => ModularGroup.S • x) ∘ (fun x => v +ᵥ x) ∘ fun x => u • x
tactic: replace hc : c ≠ 0 := by simpa using hc
state_before: case h
a b c d : ℝ
h : a * d - b * c = 1
h_denom : ∀ (z : ℍ), denom (toGLPos ⟨!![a, b; c, d], ⋯⟩) z ≠ 0
hc : c ≠ 0
⊢ ∃ u v w,
    (fun x => ⟨!![a, b; c, d], ⋯⟩ • x) =
      (fun x => w +ᵥ x) ∘ (fun x => ModularGroup.S • x) ∘ (fun x => v +ᵥ x) ∘ fun x => u • x
state_after: case h
a b c d : ℝ
h : a * d - b * c = 1
h_denom : ∀ (z : ℍ), denom (toGLPos ⟨!![a, b; c, d], ⋯⟩) z ≠ 0
hc : c ≠ 0
⊢ (fun x => ⟨!![a, b; c, d], ⋯⟩ • x) =
    (fun x => a / c +ᵥ x) ∘ (fun x => ModularGroup.S • x) ∘ (fun x => c * d +ᵥ x) ∘ fun x => ⟨c * c, ⋯⟩ • x
tactic: refine ⟨⟨_, mul_self_pos.mpr hc⟩, c * d, a / c, ?_⟩
state_before: case h
a b c d : ℝ
h : a * d - b * c = 1
h_denom : ∀ (z : ℍ), denom (toGLPos ⟨!![a, b; c, d], ⋯⟩) z ≠ 0
hc : c ≠ 0
⊢ (fun x => ⟨!![a, b; c, d], ⋯⟩ • x) =
    (fun x => a / c +ᵥ x) ∘ (fun x => ModularGroup.S • x) ∘ (fun x => c * d +ᵥ x) ∘ fun x => ⟨c * c, ⋯⟩ • x
state_after: case h.h.mk
a b c d : ℝ
h : a * d - b * c = 1
h_denom : ∀ (z : ℍ), denom (toGLPos ⟨!![a, b; c, d], ⋯⟩) z ≠ 0
hc : c ≠ 0
z : ℂ
hz : 0 < z.im
⊢ ⟨!![a, b; c, d], ⋯⟩ • ⟨z, hz⟩ =
    ((fun x => a / c +ᵥ x) ∘ (fun x => ModularGroup.S • x) ∘ (fun x => c * d +ᵥ x) ∘ fun x => ⟨c * c, ⋯⟩ • x) ⟨z, hz⟩
tactic: ext1 ⟨z, hz⟩
state_before: case h.h.mk
a b c d : ℝ
h : a * d - b * c = 1
h_denom : ∀ (z : ℍ), denom (toGLPos ⟨!![a, b; c, d], ⋯⟩) z ≠ 0
hc : c ≠ 0
z : ℂ
hz : 0 < z.im
⊢ ⟨!![a, b; c, d], ⋯⟩ • ⟨z, hz⟩ =
    ((fun x => a / c +ᵥ x) ∘ (fun x => ModularGroup.S • x) ∘ (fun x => c * d +ᵥ x) ∘ fun x => ⟨c * c, ⋯⟩ • x) ⟨z, hz⟩
state_after: case h.h.mk.h
a b c d : ℝ
h : a * d - b * c = 1
h_denom : ∀ (z : ℍ), denom (toGLPos ⟨!![a, b; c, d], ⋯⟩) z ≠ 0
hc : c ≠ 0
z : ℂ
hz : 0 < z.im
⊢ ↑(⟨!![a, b; c, d], ⋯⟩ • ⟨z, hz⟩) =
    ↑(((fun x => a / c +ᵥ x) ∘ (fun x => ModularGroup.S • x) ∘ (fun x => c * d +ᵥ x) ∘ fun x => ⟨c * c, ⋯⟩ • x) ⟨z, hz⟩)
tactic: ext1
state_before: case h.h.mk.h
a b c d : ℝ
h : a * d - b * c = 1
h_denom : ∀ (z : ℍ), denom (toGLPos ⟨!![a, b; c, d], ⋯⟩) z ≠ 0
hc : c ≠ 0
z : ℂ
hz : 0 < z.im
⊢ ↑(⟨!![a, b; c, d], ⋯⟩ • ⟨z, hz⟩) =
    ↑(((fun x => a / c +ᵥ x) ∘ (fun x => ModularGroup.S • x) ∘ (fun x => c * d +ᵥ x) ∘ fun x => ⟨c * c, ⋯⟩ • x) ⟨z, hz⟩)
state_after: case h.h.mk.h
a b c d : ℝ
h : a * d - b * c = 1
h_denom : ∀ (z : ℍ), denom (toGLPos ⟨!![a, b; c, d], ⋯⟩) z ≠ 0
hc : c ≠ 0
z : ℂ
hz : 0 < z.im
⊢ (↑a * z + ↑b) / (↑c * z + ↑d) = ↑a / ↑c - (↑c * ↑d + ↑c * ↑c * z)⁻¹
tactic: suffices (↑a * z + b) / (↑c * z + d) = a / c - (c * d + ↑c * ↑c * z)⁻¹ by
    -- Porting note: golfed broken proof
    simpa only [modular_S_smul, inv_neg, Function.comp_apply, coe_vadd, Complex.ofReal_mul,
      coe_pos_real_smul, Complex.real_smul, Complex.ofReal_div, coe_mk]
state_before: case h.h.mk.h
a b c d : ℝ
h : a * d - b * c = 1
h_denom : ∀ (z : ℍ), denom (toGLPos ⟨!![a, b; c, d], ⋯⟩) z ≠ 0
hc : c ≠ 0
z : ℂ
hz : 0 < z.im
⊢ (↑a * z + ↑b) / (↑c * z + ↑d) = ↑a / ↑c - (↑c * ↑d + ↑c * ↑c * z)⁻¹
state_after: case h.h.mk.h
a b c d : ℝ
h : a * d - b * c = 1
h_denom : ∀ (z : ℍ), denom (toGLPos ⟨!![a, b; c, d], ⋯⟩) z ≠ 0
z : ℂ
hz : 0 < z.im
hc : ↑c ≠ 0
⊢ (↑a * z + ↑b) / (↑c * z + ↑d) = ↑a / ↑c - (↑c * ↑d + ↑c * ↑c * z)⁻¹
tactic: replace hc : (c : ℂ) ≠ 0 := by norm_cast
state_before: case h.h.mk.h
a b c d : ℝ
h : a * d - b * c = 1
h_denom : ∀ (z : ℍ), denom (toGLPos ⟨!![a, b; c, d], ⋯⟩) z ≠ 0
z : ℂ
hz : 0 < z.im
hc : ↑c ≠ 0
⊢ (↑a * z + ↑b) / (↑c * z + ↑d) = ↑a / ↑c - (↑c * ↑d + ↑c * ↑c * z)⁻¹
state_after: case h.h.mk.h
a b c d : ℝ
h : a * d - b * c = 1
z : ℂ
hz : 0 < z.im
hc : ↑c ≠ 0
h_denom : ↑c * z + ↑d ≠ 0
⊢ (↑a * z + ↑b) / (↑c * z + ↑d) = ↑a / ↑c - (↑c * ↑d + ↑c * ↑c * z)⁻¹
tactic: replace h_denom : ↑c * z + d ≠ 0 := by simpa using h_denom ⟨z, hz⟩
state_before: case h.h.mk.h
a b c d : ℝ
h : a * d - b * c = 1
z : ℂ
hz : 0 < z.im
hc : ↑c ≠ 0
h_denom : ↑c * z + ↑d ≠ 0
⊢ (↑a * z + ↑b) / (↑c * z + ↑d) = ↑a / ↑c - (↑c * ↑d + ↑c * ↑c * z)⁻¹
state_after: case h.h.mk.h
a b c d : ℝ
h : a * d - b * c = 1
z : ℂ
hz : 0 < z.im
hc : ↑c ≠ 0
h_denom : ↑c * z + ↑d ≠ 0
h_aux : ↑c * ↑d + ↑c * ↑c * z ≠ 0
⊢ (↑a * z + ↑b) / (↑c * z + ↑d) = ↑a / ↑c - (↑c * ↑d + ↑c * ↑c * z)⁻¹
tactic: have h_aux : (c : ℂ) * d + ↑c * ↑c * z ≠ 0 := by
    rw [mul_assoc, ← mul_add, add_comm]
    exact mul_ne_zero hc h_denom
state_before: case h.h.mk.h
a b c d : ℝ
h : a * d - b * c = 1
z : ℂ
hz : 0 < z.im
hc : ↑c ≠ 0
h_denom : ↑c * z + ↑d ≠ 0
h_aux : ↑c * ↑d + ↑c * ↑c * z ≠ 0
⊢ (↑a * z + ↑b) / (↑c * z + ↑d) = ↑a / ↑c - (↑c * ↑d + ↑c * ↑c * z)⁻¹
state_after: case h.h.mk.h
a b c d : ℝ
z : ℂ
hz : 0 < z.im
hc : ↑c ≠ 0
h_denom : ↑c * z + ↑d ≠ 0
h_aux : ↑c * ↑d + ↑c * ↑c * z ≠ 0
h : ↑a * ↑d - ↑b * ↑c = 1
⊢ (↑a * z + ↑b) / (↑c * z + ↑d) = ↑a / ↑c - (↑c * ↑d + ↑c * ↑c * z)⁻¹
tactic: replace h : (a * d - b * c : ℂ) = (1 : ℂ) := by norm_cast
state_before: case h.h.mk.h
a b c d : ℝ
z : ℂ
hz : 0 < z.im
hc : ↑c ≠ 0
h_denom : ↑c * z + ↑d ≠ 0
h_aux : ↑c * ↑d + ↑c * ↑c * z ≠ 0
h : ↑a * ↑d - ↑b * ↑c = 1
⊢ (↑a * z + ↑b) / (↑c * z + ↑d) = ↑a / ↑c - (↑c * ↑d + ↑c * ↑c * z)⁻¹
state_after: case h.h.mk.h
a b c d : ℝ
z : ℂ
hz : 0 < z.im
hc : ↑c ≠ 0
h_denom : ↑c * z + ↑d ≠ 0
h_aux : ↑c * ↑d + ↑c * ↑c * z ≠ 0
h : ↑a * ↑d - ↑b * ↑c = 1
⊢ (↑a * z + ↑b) * (↑c * (↑c * ↑d + ↑c * ↑c * z)) = (↑a * (↑c * ↑d + ↑c * ↑c * z) - ↑c) * (↑c * z + ↑d)
tactic: field_simp
state_before: case h.h.mk.h
a b c d : ℝ
z : ℂ
hz : 0 < z.im
hc : ↑c ≠ 0
h_denom : ↑c * z + ↑d ≠ 0
h_aux : ↑c * ↑d + ↑c * ↑c * z ≠ 0
h : ↑a * ↑d - ↑b * ↑c = 1
⊢ (↑a * z + ↑b) * (↑c * (↑c * ↑d + ↑c * ↑c * z)) = (↑a * (↑c * ↑d + ↑c * ↑c * z) - ↑c) * (↑c * z + ↑d)
state_after: no goals
tactic: linear_combination (-(z * (c : ℂ) ^ 2) - c * d) * h