Theorem: Matrix.SpecialLinearGroup.fin_two_exists_eq_mk_of_apply_zero_one_eq_zero
File: Mathlib/LinearAlgebra/Matrix/SpecialLinearGroup.lean

Proof steps:
state_before: n : Type u
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
R✝ : Type v
inst✝² : CommRing R✝
S : Type u_1
inst✝¹ : CommRing S
R : Type u_2
inst✝ : Field R
g : SL(2, R)
hg : ↑g 1 0 = 0
a b : R
h : a ≠ 0
⊢ !![a, b; 0, a⁻¹].det = 1
state_after: no goals
tactic: simp [h]
state_before: n : Type u
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
R✝ : Type v
inst✝² : CommRing R✝
S : Type u_1
inst✝¹ : CommRing S
R : Type u_2
inst✝ : Field R
g : SL(2, R)
hg : ↑g 1 0 = 0
⊢ ∃ a b, ∃ (h : a ≠ 0), g = ⟨!![a, b; 0, a⁻¹], ⋯⟩
state_after: case h
n : Type u
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
R✝ : Type v
inst✝² : CommRing R✝
S : Type u_1
inst✝¹ : CommRing S
R : Type u_2
inst✝ : Field R
a b c d : R
h_det : a * d - b * c = 1
hg : ↑⟨!![a, b; c, d], ⋯⟩ 1 0 = 0
⊢ ∃ a_1 b_1, ∃ (h : a_1 ≠ 0), ⟨!![a, b; c, d], ⋯⟩ = ⟨!![a_1, b_1; 0, a_1⁻¹], ⋯⟩
tactic: induction' g using Matrix.SpecialLinearGroup.fin_two_induction with a b c d h_det
state_before: case h
n : Type u
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
R✝ : Type v
inst✝² : CommRing R✝
S : Type u_1
inst✝¹ : CommRing S
R : Type u_2
inst✝ : Field R
a b c d : R
h_det : a * d - b * c = 1
hg : ↑⟨!![a, b; c, d], ⋯⟩ 1 0 = 0
⊢ ∃ a_1 b_1, ∃ (h : a_1 ≠ 0), ⟨!![a, b; c, d], ⋯⟩ = ⟨!![a_1, b_1; 0, a_1⁻¹], ⋯⟩
state_after: case h
n : Type u
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
R✝ : Type v
inst✝² : CommRing R✝
S : Type u_1
inst✝¹ : CommRing S
R : Type u_2
inst✝ : Field R
a b c d : R
h_det : a * d - b * c = 1
hg : c = 0
⊢ ∃ a_1 b_1, ∃ (h : a_1 ≠ 0), ⟨!![a, b; c, d], ⋯⟩ = ⟨!![a_1, b_1; 0, a_1⁻¹], ⋯⟩
tactic: replace hg : c = 0 := by simpa using hg
state_before: case h
n : Type u
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
R✝ : Type v
inst✝² : CommRing R✝
S : Type u_1
inst✝¹ : CommRing S
R : Type u_2
inst✝ : Field R
a b c d : R
h_det : a * d - b * c = 1
hg : c = 0
⊢ ∃ a_1 b_1, ∃ (h : a_1 ≠ 0), ⟨!![a, b; c, d], ⋯⟩ = ⟨!![a_1, b_1; 0, a_1⁻¹], ⋯⟩
state_after: case h
n : Type u
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
R✝ : Type v
inst✝² : CommRing R✝
S : Type u_1
inst✝¹ : CommRing S
R : Type u_2
inst✝ : Field R
a b c d : R
h_det : a * d - b * c = 1
hg : c = 0
had : a * d = 1
⊢ ∃ a_1 b_1, ∃ (h : a_1 ≠ 0), ⟨!![a, b; c, d], ⋯⟩ = ⟨!![a_1, b_1; 0, a_1⁻¹], ⋯⟩
tactic: have had : a * d = 1 := by rwa [hg, mul_zero, sub_zero] at h_det
state_before: case h
n : Type u
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
R✝ : Type v
inst✝² : CommRing R✝
S : Type u_1
inst✝¹ : CommRing S
R : Type u_2
inst✝ : Field R
a b c d : R
h_det : a * d - b * c = 1
hg : c = 0
had : a * d = 1
⊢ ∃ a_1 b_1, ∃ (h : a_1 ≠ 0), ⟨!![a, b; c, d], ⋯⟩ = ⟨!![a_1, b_1; 0, a_1⁻¹], ⋯⟩
state_after: case h
n : Type u
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
R✝ : Type v
inst✝² : CommRing R✝
S : Type u_1
inst✝¹ : CommRing S
R : Type u_2
inst✝ : Field R
a b c d : R
h_det : a * d - b * c = 1
hg : c = 0
had : a * d = 1
⊢ ⟨!![a, b; c, d], ⋯⟩ = ⟨!![a, b; 0, a⁻¹], ⋯⟩
tactic: refine ⟨a, b, left_ne_zero_of_mul_eq_one had, ?_⟩
state_before: case h
n : Type u
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
R✝ : Type v
inst✝² : CommRing R✝
S : Type u_1
inst✝¹ : CommRing S
R : Type u_2
inst✝ : Field R
a b c d : R
h_det : a * d - b * c = 1
hg : c = 0
had : a * d = 1
⊢ ⟨!![a, b; c, d], ⋯⟩ = ⟨!![a, b; 0, a⁻¹], ⋯⟩
state_after: no goals
tactic: simp_rw [eq_inv_of_mul_eq_one_right had, hg]