Theorem: WeierstrassCurve.Affine.CoordinateRing.smul_basis_mul_Y
File: Mathlib/AlgebraicGeometry/EllipticCurve/Group.lean

tactic: have Y_sq : mk W Y ^ 2 =
    mk W (C (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆) - C (C W.a₁ * X + C W.a₃) * Y) := by
  exact AdjoinRoot.mk_eq_mk.mpr ⟨1, by rw [polynomial]; ring1⟩
state_before: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : Affine R
f : R →+* S
p q : R[X]
⊢ (p • 1 + q • (mk W) Y) * (mk W) Y =
    (q * (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆)) • 1 + (p - q * (C W.a₁ * X + C W.a₃)) • (mk W) Y
state_after: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : Affine R
f : R →+* S
p q : R[X]
Y_sq : (mk W) Y ^ 2 = (mk W) (C (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆) - C (C W.a₁ * X + C W.a₃) * Y)
⊢ (p • 1 + q • (mk W) Y) * (mk W) Y =
    (q * (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆)) • 1 + (p - q * (C W.a₁ * X + C W.a₃)) • (mk W) Y

tactic: simp only [smul, add_mul, mul_assoc, ← sq, Y_sq, C_sub, map_sub, C_mul, _root_.map_mul]
state_before: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : Affine R
f : R →+* S
p q : R[X]
Y_sq : (mk W) Y ^ 2 = (mk W) (C (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆) - C (C W.a₁ * X + C W.a₃) * Y)
⊢ (p • 1 + q • (mk W) Y) * (mk W) Y =
    (q * (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆)) • 1 + (p - q * (C W.a₁ * X + C W.a₃)) • (mk W) Y
state_after: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : Affine R
f : R →+* S
p q : R[X]
Y_sq : (mk W) Y ^ 2 = (mk W) (C (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆) - C (C W.a₁ * X + C W.a₃) * Y)
⊢ (mk W) (C p) * (1 * (mk W) Y) +
      (mk W) (C q) *
        ((mk W) (C (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆)) - (mk W) (C (C W.a₁ * X + C W.a₃)) * (mk W) Y) =
    (mk W) (C q) * ((mk W) (C (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆)) * 1) +
      ((mk W) (C p) - (mk W) (C q) * (mk W) (C (C W.a₁ * X + C W.a₃))) * (mk W) Y

tactic: ring1
state_before: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : Affine R
f : R →+* S
p q : R[X]
Y_sq : (mk W) Y ^ 2 = (mk W) (C (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆) - C (C W.a₁ * X + C W.a₃) * Y)
⊢ (mk W) (C p) * (1 * (mk W) Y) +
      (mk W) (C q) *
        ((mk W) (C (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆)) - (mk W) (C (C W.a₁ * X + C W.a₃)) * (mk W) Y) =
    (mk W) (C q) * ((mk W) (C (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆)) * 1) +
      ((mk W) (C p) - (mk W) (C q) * (mk W) (C (C W.a₁ * X + C W.a₃))) * (mk W) Y
state_after: no goals

tactic: exact AdjoinRoot.mk_eq_mk.mpr ⟨1, by rw [polynomial]; ring1⟩
state_before: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : Affine R
f : R →+* S
p q : R[X]
⊢ (mk W) Y ^ 2 = (mk W) (C (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆) - C (C W.a₁ * X + C W.a₃) * Y)
state_after: no goals

tactic: rw [polynomial]
state_before: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : Affine R
f : R →+* S
p q : R[X]
⊢ (fun x => x ^ 2) Y - (C (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆) - C (C W.a₁ * X + C W.a₃) * Y) =
    W.polynomial * 1
state_after: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : Affine R
f : R →+* S
p q : R[X]
⊢ (fun x => x ^ 2) Y - (C (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆) - C (C W.a₁ * X + C W.a₃) * Y) =
    (Y ^ 2 + C (C W.a₁ * X + C W.a₃) * Y - C (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆)) * 1

tactic: ring1
state_before: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : Affine R
f : R →+* S
p q : R[X]
⊢ (fun x => x ^ 2) Y - (C (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆) - C (C W.a₁ * X + C W.a₃) * Y) =
    (Y ^ 2 + C (C W.a₁ * X + C W.a₃) * Y - C (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆)) * 1
state_after: no goals