Theorem: WeierstrassCurve.VariableChange.comp_left_inv
File: Mathlib/AlgebraicGeometry/EllipticCurve/Weierstrass.lean

tactic: rw [comp, id, inv]
state_before: R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C' C'' C : VariableChange R
⊢ C.inv.comp C = id
state_after: R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C' C'' C : VariableChange R
⊢ { u := { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.u * C.u,
      r :=
        { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.r * ↑C.u ^ 2 +
          C.r,
      s :=
        ↑C.u * { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.s + C.s,
      t :=
        { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.t * ↑C.u ^ 3 +
            { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.r * C.s *
              ↑C.u ^ 2 +
          C.t } =
    { u := 1, r := 0, s := 0, t := 0 }

tactic: ext <;> dsimp only
state_before: R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C' C'' C : VariableChange R
⊢ { u := { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.u * C.u,
      r :=
        { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.r * ↑C.u ^ 2 +
          C.r,
      s :=
        ↑C.u * { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.s + C.s,
      t :=
        { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.t * ↑C.u ^ 3 +
            { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.r * C.s *
              ↑C.u ^ 2 +
          C.t } =
    { u := 1, r := 0, s := 0, t := 0 }
state_after: case u.a
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C' C'' C : VariableChange R
⊢ ↑(C.u⁻¹ * C.u) = ↑1

case r
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C' C'' C : VariableChange R
⊢ -C.r * ↑C.u⁻¹ ^ 2 * ↑C.u ^ 2 + C.r = 0

case s
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C' C'' C : VariableChange R
⊢ ↑C.u * (-C.s * ↑C.u⁻¹) + C.s = 0

case t
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C' C'' C : VariableChange R
⊢ (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 * ↑C.u ^ 3 + -C.r * ↑C.u⁻¹ ^ 2 * C.s * ↑C.u ^ 2 + C.t = 0

tactic: exact C.u.inv_mul
state_before: case u.a
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C' C'' C : VariableChange R
⊢ ↑(C.u⁻¹ * C.u) = ↑1
state_after: no goals

tactic: linear_combination (norm := ring1) -C.r * pow_mul_pow_eq_one 2 C.u.inv_mul
state_before: case r
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C' C'' C : VariableChange R
⊢ -C.r * ↑C.u⁻¹ ^ 2 * ↑C.u ^ 2 + C.r = 0
state_after: no goals

tactic: linear_combination (norm := ring1) -C.s * C.u.inv_mul
state_before: case s
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C' C'' C : VariableChange R
⊢ ↑C.u * (-C.s * ↑C.u⁻¹) + C.s = 0
state_after: no goals

tactic: linear_combination (norm := ring1) (C.r * C.s - C.t) * pow_mul_pow_eq_one 3 C.u.inv_mul
  + -C.r * C.s * pow_mul_pow_eq_one 2 C.u.inv_mul
state_before: case t
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C' C'' C : VariableChange R
⊢ (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 * ↑C.u ^ 3 + -C.r * ↑C.u⁻¹ ^ 2 * C.s * ↑C.u ^ 2 + C.t = 0
state_after: no goals