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

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 : R
h : a ≠ 0
⊢ (of ![![a, b], ![0, a⁻¹]]).det = 1
state_after: no goals

tactic: induction' g using Matrix.SpecialLinearGroup.fin_two_induction with a b c d h_det
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 = ⟨of ![![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 : ↑⟨of ![![a, b], ![c, d]], ⋯⟩ 1 0 = 0
⊢ ∃ a_1 b_1, ∃ (h : a_1 ≠ 0), ⟨of ![![a, b], ![c, d]], ⋯⟩ = ⟨of ![![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 : ↑⟨of ![![a, b], ![c, d]], ⋯⟩ 1 0 = 0
⊢ ∃ a_1 b_1, ∃ (h : a_1 ≠ 0), ⟨of ![![a, b], ![c, d]], ⋯⟩ = ⟨of ![![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), ⟨of ![![a, b], ![c, d]], ⋯⟩ = ⟨of ![![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
⊢ ∃ a_1 b_1, ∃ (h : a_1 ≠ 0), ⟨of ![![a, b], ![c, d]], ⋯⟩ = ⟨of ![![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), ⟨of ![![a, b], ![c, d]], ⋯⟩ = ⟨of ![![a_1, b_1], ![0, a_1⁻¹]], ⋯⟩

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_1 b_1, ∃ (h : a_1 ≠ 0), ⟨of ![![a, b], ![c, d]], ⋯⟩ = ⟨of ![![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
⊢ ⟨of ![![a, b], ![c, d]], ⋯⟩ = ⟨of ![![a, b], ![0, a⁻¹]], ⋯⟩

tactic: simp_rw [eq_inv_of_mul_eq_one_right had, 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
had : a * d = 1
⊢ ⟨of ![![a, b], ![c, d]], ⋯⟩ = ⟨of ![![a, b], ![0, a⁻¹]], ⋯⟩
state_after: no goals

tactic: simpa using hg
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
a b c d : R
h_det : a * d - b * c = 1
hg : ↑⟨of ![![a, b], ![c, d]], ⋯⟩ 1 0 = 0
⊢ c = 0
state_after: no goals

tactic: rwa [hg, mul_zero, sub_zero] at h_det
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
a b c d : R
h_det : a * d - b * c = 1
hg : c = 0
⊢ a * d = 1
state_after: no goals