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

Proof steps:
state_before: R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
W✝ : Affine R
f : R →+* S
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
h₁ : W.Equation x₁ y₁
h₂ : W.Equation x₂ y₂
hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂
hy₂ : y₂ = eval x₂ (linePolynomial x₁ y₁ (W.slope x₁ x₂ y₁ y₂))
⊢ XYIdeal W x₂ (C y₂) = XYIdeal W x₂ (linePolynomial x₁ y₁ (W.slope x₁ x₂ y₁ y₂))
state_after: R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
W✝ : Affine R
f : R →+* S
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
h₁ : W.Equation x₁ y₁
h₂ : W.Equation x₂ y₂
hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂
hy₂ : y₂ = eval x₂ (linePolynomial x₁ y₁ (W.slope x₁ x₂ y₁ y₂))
⊢ XYIdeal W x₂ (C (eval x₂ (linePolynomial x₁ y₁ (W.slope x₁ x₂ y₁ y₂)))) =
    XYIdeal W x₂ (linePolynomial x₁ y₁ (W.slope x₁ x₂ y₁ y₂))
tactic: nth_rw 1 [hy₂]
state_before: R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
W✝ : Affine R
f : R →+* S
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
h₁ : W.Equation x₁ y₁
h₂ : W.Equation x₂ y₂
hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂
hy₂ : y₂ = eval x₂ (linePolynomial x₁ y₁ (W.slope x₁ x₂ y₁ y₂))
⊢ XYIdeal W x₂ (C (eval x₂ (linePolynomial x₁ y₁ (W.slope x₁ x₂ y₁ y₂)))) =
    XYIdeal W x₂ (linePolynomial x₁ y₁ (W.slope x₁ x₂ y₁ y₂))
state_after: R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
W✝ : Affine R
f : R →+* S
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
h₁ : W.Equation x₁ y₁
h₂ : W.Equation x₂ y₂
hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂
hy₂ : y₂ = eval x₂ (linePolynomial x₁ y₁ (W.slope x₁ x₂ y₁ y₂))
⊢ span {(mk W) (C (X - C x₂)), (mk W) (Y - C (C (eval x₂ (C (W.slope x₁ x₂ y₁ y₂) * (X - C x₁) + C y₁))))} =
    span {(mk W) (C (X - C x₂)), (mk W) (Y - C (C (W.slope x₁ x₂ y₁ y₂) * (X - C x₁) + C y₁))}
tactic: simp only [XYIdeal, XClass, YClass, linePolynomial]
state_before: R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
W✝ : Affine R
f : R →+* S
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
h₁ : W.Equation x₁ y₁
h₂ : W.Equation x₂ y₂
hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂
hy₂ : y₂ = eval x₂ (linePolynomial x₁ y₁ (W.slope x₁ x₂ y₁ y₂))
⊢ span {(mk W) (C (X - C x₂)), (mk W) (Y - C (C (eval x₂ (C (W.slope x₁ x₂ y₁ y₂) * (X - C x₁) + C y₁))))} =
    span {(mk W) (C (X - C x₂)), (mk W) (Y - C (C (W.slope x₁ x₂ y₁ y₂) * (X - C x₁) + C y₁))}
state_after: R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
W✝ : Affine R
f : R →+* S
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
h₁ : W.Equation x₁ y₁
h₂ : W.Equation x₂ y₂
hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂
hy₂ : y₂ = eval x₂ (linePolynomial x₁ y₁ (W.slope x₁ x₂ y₁ y₂))
⊢ span
      {(mk W) (C (X - C x₂)),
        (mk W)
          (Y - C (C (eval x₂ (C (W.slope x₁ x₂ y₁ y₂) * (X - C x₁) + C y₁))) +
            C (X - C x₂) * C (C (-W.slope x₁ x₂ y₁ y₂)))} =
    span {(mk W) (C (X - C x₂)), (mk W) (Y - C (C (W.slope x₁ x₂ y₁ y₂) * (X - C x₁) + C y₁))}
tactic: rw [← span_pair_add_mul_right <| mk W <| C <| C <| -W.slope x₁ x₂ y₁ y₂, ← _root_.map_mul,
    ← map_add]
state_before: R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
W✝ : Affine R
f : R →+* S
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
h₁ : W.Equation x₁ y₁
h₂ : W.Equation x₂ y₂
hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂
hy₂ : y₂ = eval x₂ (linePolynomial x₁ y₁ (W.slope x₁ x₂ y₁ y₂))
⊢ span
      {(mk W) (C (X - C x₂)),
        (mk W)
          (Y - C (C (eval x₂ (C (W.slope x₁ x₂ y₁ y₂) * (X - C x₁) + C y₁))) +
            C (X - C x₂) * C (C (-W.slope x₁ x₂ y₁ y₂)))} =
    span {(mk W) (C (X - C x₂)), (mk W) (Y - C (C (W.slope x₁ x₂ y₁ y₂) * (X - C x₁) + C y₁))}
state_after: R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
W✝ : Affine R
f : R →+* S
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
h₁ : W.Equation x₁ y₁
h₂ : W.Equation x₂ y₂
hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂
hy₂ : y₂ = eval x₂ (linePolynomial x₁ y₁ (W.slope x₁ x₂ y₁ y₂))
⊢ Y - C (C (eval x₂ (C (W.slope x₁ x₂ y₁ y₂) * (X - C x₁) + C y₁))) + C (X - C x₂) * C (C (-W.slope x₁ x₂ y₁ y₂)) =
    Y - C (C (W.slope x₁ x₂ y₁ y₂) * (X - C x₁) + C y₁)
tactic: apply congr_arg (_ ∘ _ ∘ _ ∘ _)
state_before: R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
W✝ : Affine R
f : R →+* S
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
h₁ : W.Equation x₁ y₁
h₂ : W.Equation x₂ y₂
hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂
hy₂ : y₂ = eval x₂ (linePolynomial x₁ y₁ (W.slope x₁ x₂ y₁ y₂))
⊢ Y - C (C (eval x₂ (C (W.slope x₁ x₂ y₁ y₂) * (X - C x₁) + C y₁))) + C (X - C x₂) * C (C (-W.slope x₁ x₂ y₁ y₂)) =
    Y - C (C (W.slope x₁ x₂ y₁ y₂) * (X - C x₁) + C y₁)
state_after: R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
W✝ : Affine R
f : R →+* S
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
h₁ : W.Equation x₁ y₁
h₂ : W.Equation x₂ y₂
hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂
hy₂ : y₂ = eval x₂ (linePolynomial x₁ y₁ (W.slope x₁ x₂ y₁ y₂))
⊢ Y - C (C (W.slope x₁ x₂ y₁ y₂ * (x₂ - x₁) + y₁)) + C (X - C x₂) * C (C (-W.slope x₁ x₂ y₁ y₂)) =
    Y - C (C (W.slope x₁ x₂ y₁ y₂) * (X - C x₁) + C y₁)
tactic: eval_simp
state_before: R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
W✝ : Affine R
f : R →+* S
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
h₁ : W.Equation x₁ y₁
h₂ : W.Equation x₂ y₂
hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂
hy₂ : y₂ = eval x₂ (linePolynomial x₁ y₁ (W.slope x₁ x₂ y₁ y₂))
⊢ Y - C (C (W.slope x₁ x₂ y₁ y₂ * (x₂ - x₁) + y₁)) + C (X - C x₂) * C (C (-W.slope x₁ x₂ y₁ y₂)) =
    Y - C (C (W.slope x₁ x₂ y₁ y₂) * (X - C x₁) + C y₁)
state_after: R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
W✝ : Affine R
f : R →+* S
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
h₁ : W.Equation x₁ y₁
h₂ : W.Equation x₂ y₂
hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂
hy₂ : y₂ = eval x₂ (linePolynomial x₁ y₁ (W.slope x₁ x₂ y₁ y₂))
⊢ Y - (C (C (W.slope x₁ x₂ y₁ y₂)) * (C (C x₂) - C (C x₁)) + C (C y₁)) +
      (C X - C (C x₂)) * -C (C (W.slope x₁ x₂ y₁ y₂)) =
    Y - (C (C (W.slope x₁ x₂ y₁ y₂)) * (C X - C (C x₁)) + C (C y₁))
tactic: C_simp
state_before: R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
W✝ : Affine R
f : R →+* S
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
h₁ : W.Equation x₁ y₁
h₂ : W.Equation x₂ y₂
hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂
hy₂ : y₂ = eval x₂ (linePolynomial x₁ y₁ (W.slope x₁ x₂ y₁ y₂))
⊢ Y - (C (C (W.slope x₁ x₂ y₁ y₂)) * (C (C x₂) - C (C x₁)) + C (C y₁)) +
      (C X - C (C x₂)) * -C (C (W.slope x₁ x₂ y₁ y₂)) =
    Y - (C (C (W.slope x₁ x₂ y₁ y₂)) * (C X - C (C x₁)) + C (C y₁))
state_after: no goals
tactic: ring1