Theorem: WeierstrassCurve.Affine.nonsingular_negAdd_of_eval_derivative_ne_zero
File: Mathlib/AlgebraicGeometry/EllipticCurve/Affine.lean

tactic: rw [Nonsingular, and_iff_right hx', negAddY, polynomialX, polynomialY]
state_before: R : Type u
inst✝ : CommRing R
W : Affine R
x₁ x₂ y₁ L : R
hx' : W.Equation (W.addX x₁ x₂ L) (W.negAddY x₁ x₂ y₁ L)
hx : eval (W.addX x₁ x₂ L) (derivative (W.addPolynomial x₁ y₁ L)) ≠ 0
⊢ W.Nonsingular (W.addX x₁ x₂ L) (W.negAddY x₁ x₂ y₁ L)
state_after: R : Type u
inst✝ : CommRing R
W : Affine R
x₁ x₂ y₁ L : R
hx' : W.Equation (W.addX x₁ x₂ L) (W.negAddY x₁ x₂ y₁ L)
hx : eval (W.addX x₁ x₂ L) (derivative (W.addPolynomial x₁ y₁ L)) ≠ 0
⊢ evalEval (W.addX x₁ x₂ L) (L * (W.addX x₁ x₂ L - x₁) + y₁)
        (C (C W.a₁) * Y - C (C 3 * X ^ 2 + C (2 * W.a₂) * X + C W.a₄)) ≠
      0 ∨
    evalEval (W.addX x₁ x₂ L) (L * (W.addX x₁ x₂ L - x₁) + y₁) (C (C 2) * Y + C (C W.a₁ * X + C W.a₃)) ≠ 0

tactic: eval_simp
state_before: R : Type u
inst✝ : CommRing R
W : Affine R
x₁ x₂ y₁ L : R
hx' : W.Equation (W.addX x₁ x₂ L) (W.negAddY x₁ x₂ y₁ L)
hx : eval (W.addX x₁ x₂ L) (derivative (W.addPolynomial x₁ y₁ L)) ≠ 0
⊢ evalEval (W.addX x₁ x₂ L) (L * (W.addX x₁ x₂ L - x₁) + y₁)
        (C (C W.a₁) * Y - C (C 3 * X ^ 2 + C (2 * W.a₂) * X + C W.a₄)) ≠
      0 ∨
    evalEval (W.addX x₁ x₂ L) (L * (W.addX x₁ x₂ L - x₁) + y₁) (C (C 2) * Y + C (C W.a₁ * X + C W.a₃)) ≠ 0
state_after: R : Type u
inst✝ : CommRing R
W : Affine R
x₁ x₂ y₁ L : R
hx' : W.Equation (W.addX x₁ x₂ L) (W.negAddY x₁ x₂ y₁ L)
hx : eval (W.addX x₁ x₂ L) (derivative (W.addPolynomial x₁ y₁ L)) ≠ 0
⊢ W.a₁ * (L * (W.addX x₁ x₂ L - x₁) + y₁) - (3 * W.addX x₁ x₂ L ^ 2 + 2 * W.a₂ * W.addX x₁ x₂ L + W.a₄) ≠ 0 ∨
    2 * (L * (W.addX x₁ x₂ L - x₁) + y₁) + (W.a₁ * W.addX x₁ x₂ L + W.a₃) ≠ 0

tactic: contrapose! hx
state_before: R : Type u
inst✝ : CommRing R
W : Affine R
x₁ x₂ y₁ L : R
hx' : W.Equation (W.addX x₁ x₂ L) (W.negAddY x₁ x₂ y₁ L)
hx : eval (W.addX x₁ x₂ L) (derivative (W.addPolynomial x₁ y₁ L)) ≠ 0
⊢ W.a₁ * (L * (W.addX x₁ x₂ L - x₁) + y₁) - (3 * W.addX x₁ x₂ L ^ 2 + 2 * W.a₂ * W.addX x₁ x₂ L + W.a₄) ≠ 0 ∨
    2 * (L * (W.addX x₁ x₂ L - x₁) + y₁) + (W.a₁ * W.addX x₁ x₂ L + W.a₃) ≠ 0
state_after: R : Type u
inst✝ : CommRing R
W : Affine R
x₁ x₂ y₁ L : R
hx' : W.Equation (W.addX x₁ x₂ L) (W.negAddY x₁ x₂ y₁ L)
hx :
  W.a₁ * (L * (W.addX x₁ x₂ L - x₁) + y₁) - (3 * W.addX x₁ x₂ L ^ 2 + 2 * W.a₂ * W.addX x₁ x₂ L + W.a₄) = 0 ∧
    2 * (L * (W.addX x₁ x₂ L - x₁) + y₁) + (W.a₁ * W.addX x₁ x₂ L + W.a₃) = 0
⊢ eval (W.addX x₁ x₂ L) (derivative (W.addPolynomial x₁ y₁ L)) = 0

tactic: rw [addPolynomial, linePolynomial, polynomial]
state_before: R : Type u
inst✝ : CommRing R
W : Affine R
x₁ x₂ y₁ L : R
hx' : W.Equation (W.addX x₁ x₂ L) (W.negAddY x₁ x₂ y₁ L)
hx :
  W.a₁ * (L * (W.addX x₁ x₂ L - x₁) + y₁) - (3 * W.addX x₁ x₂ L ^ 2 + 2 * W.a₂ * W.addX x₁ x₂ L + W.a₄) = 0 ∧
    2 * (L * (W.addX x₁ x₂ L - x₁) + y₁) + (W.a₁ * W.addX x₁ x₂ L + W.a₃) = 0
⊢ eval (W.addX x₁ x₂ L) (derivative (W.addPolynomial x₁ y₁ L)) = 0
state_after: R : Type u
inst✝ : CommRing R
W : Affine R
x₁ x₂ y₁ L : R
hx' : W.Equation (W.addX x₁ x₂ L) (W.negAddY x₁ x₂ y₁ L)
hx :
  W.a₁ * (L * (W.addX x₁ x₂ L - x₁) + y₁) - (3 * W.addX x₁ x₂ L ^ 2 + 2 * W.a₂ * W.addX x₁ x₂ L + W.a₄) = 0 ∧
    2 * (L * (W.addX x₁ x₂ L - x₁) + y₁) + (W.a₁ * W.addX x₁ x₂ L + W.a₃) = 0
⊢ eval (W.addX x₁ x₂ L)
      (derivative
        (eval (C L * (X - C x₁) + C 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₆)))) =
    0

tactic: eval_simp
state_before: R : Type u
inst✝ : CommRing R
W : Affine R
x₁ x₂ y₁ L : R
hx' : W.Equation (W.addX x₁ x₂ L) (W.negAddY x₁ x₂ y₁ L)
hx :
  W.a₁ * (L * (W.addX x₁ x₂ L - x₁) + y₁) - (3 * W.addX x₁ x₂ L ^ 2 + 2 * W.a₂ * W.addX x₁ x₂ L + W.a₄) = 0 ∧
    2 * (L * (W.addX x₁ x₂ L - x₁) + y₁) + (W.a₁ * W.addX x₁ x₂ L + W.a₃) = 0
⊢ eval (W.addX x₁ x₂ L)
      (derivative
        (eval (C L * (X - C x₁) + C 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₆)))) =
    0
state_after: R : Type u
inst✝ : CommRing R
W : Affine R
x₁ x₂ y₁ L : R
hx' : W.Equation (W.addX x₁ x₂ L) (W.negAddY x₁ x₂ y₁ L)
hx :
  W.a₁ * (L * (W.addX x₁ x₂ L - x₁) + y₁) - (3 * W.addX x₁ x₂ L ^ 2 + 2 * W.a₂ * W.addX x₁ x₂ L + W.a₄) = 0 ∧
    2 * (L * (W.addX x₁ x₂ L - x₁) + y₁) + (W.a₁ * W.addX x₁ x₂ L + W.a₃) = 0
⊢ eval (W.addX x₁ x₂ L)
      (derivative
        ((C L * (X - C x₁) + C y₁) ^ 2 + (C W.a₁ * X + C W.a₃) * (C L * (X - C x₁) + C y₁) -
          (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆))) =
    0

tactic: derivative_simp
state_before: R : Type u
inst✝ : CommRing R
W : Affine R
x₁ x₂ y₁ L : R
hx' : W.Equation (W.addX x₁ x₂ L) (W.negAddY x₁ x₂ y₁ L)
hx :
  W.a₁ * (L * (W.addX x₁ x₂ L - x₁) + y₁) - (3 * W.addX x₁ x₂ L ^ 2 + 2 * W.a₂ * W.addX x₁ x₂ L + W.a₄) = 0 ∧
    2 * (L * (W.addX x₁ x₂ L - x₁) + y₁) + (W.a₁ * W.addX x₁ x₂ L + W.a₃) = 0
⊢ eval (W.addX x₁ x₂ L)
      (derivative
        ((C L * (X - C x₁) + C y₁) ^ 2 + (C W.a₁ * X + C W.a₃) * (C L * (X - C x₁) + C y₁) -
          (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆))) =
    0
state_after: R : Type u
inst✝ : CommRing R
W : Affine R
x₁ x₂ y₁ L : R
hx' : W.Equation (W.addX x₁ x₂ L) (W.negAddY x₁ x₂ y₁ L)
hx :
  W.a₁ * (L * (W.addX x₁ x₂ L - x₁) + y₁) - (3 * W.addX x₁ x₂ L ^ 2 + 2 * W.a₂ * W.addX x₁ x₂ L + W.a₄) = 0 ∧
    2 * (L * (W.addX x₁ x₂ L - x₁) + y₁) + (W.a₁ * W.addX x₁ x₂ L + W.a₃) = 0
⊢ eval (W.addX x₁ x₂ L)
      (C 2 * (C L * (X - C x₁) + C y₁) * (0 * (X - C x₁) + C L * (1 - 0) + 0) +
          ((0 * X + C W.a₁ * 1 + 0) * (C L * (X - C x₁) + C y₁) +
            (C W.a₁ * X + C W.a₃) * (0 * (X - C x₁) + C L * (1 - 0) + 0)) -
        (C ↑3 * X ^ (3 - 1) + (0 * X ^ 2 + C W.a₂ * (C 2 * X * 1)) + (0 * X + C W.a₄ * 1) + 0)) =
    0

tactic: simp only [zero_add, add_zero, sub_zero, zero_mul, mul_one]
state_before: R : Type u
inst✝ : CommRing R
W : Affine R
x₁ x₂ y₁ L : R
hx' : W.Equation (W.addX x₁ x₂ L) (W.negAddY x₁ x₂ y₁ L)
hx :
  W.a₁ * (L * (W.addX x₁ x₂ L - x₁) + y₁) - (3 * W.addX x₁ x₂ L ^ 2 + 2 * W.a₂ * W.addX x₁ x₂ L + W.a₄) = 0 ∧
    2 * (L * (W.addX x₁ x₂ L - x₁) + y₁) + (W.a₁ * W.addX x₁ x₂ L + W.a₃) = 0
⊢ eval (W.addX x₁ x₂ L)
      (C 2 * (C L * (X - C x₁) + C y₁) * (0 * (X - C x₁) + C L * (1 - 0) + 0) +
          ((0 * X + C W.a₁ * 1 + 0) * (C L * (X - C x₁) + C y₁) +
            (C W.a₁ * X + C W.a₃) * (0 * (X - C x₁) + C L * (1 - 0) + 0)) -
        (C ↑3 * X ^ (3 - 1) + (0 * X ^ 2 + C W.a₂ * (C 2 * X * 1)) + (0 * X + C W.a₄ * 1) + 0)) =
    0
state_after: R : Type u
inst✝ : CommRing R
W : Affine R
x₁ x₂ y₁ L : R
hx' : W.Equation (W.addX x₁ x₂ L) (W.negAddY x₁ x₂ y₁ L)
hx :
  W.a₁ * (L * (W.addX x₁ x₂ L - x₁) + y₁) - (3 * W.addX x₁ x₂ L ^ 2 + 2 * W.a₂ * W.addX x₁ x₂ L + W.a₄) = 0 ∧
    2 * (L * (W.addX x₁ x₂ L - x₁) + y₁) + (W.a₁ * W.addX x₁ x₂ L + W.a₃) = 0
⊢ eval (W.addX x₁ x₂ L)
      (C 2 * (C L * (X - C x₁) + C y₁) * C L + (C W.a₁ * (C L * (X - C x₁) + C y₁) + (C W.a₁ * X + C W.a₃) * C L) -
        (C ↑3 * X ^ (3 - 1) + C W.a₂ * (C 2 * X) + C W.a₄)) =
    0

tactic: eval_simp
state_before: R : Type u
inst✝ : CommRing R
W : Affine R
x₁ x₂ y₁ L : R
hx' : W.Equation (W.addX x₁ x₂ L) (W.negAddY x₁ x₂ y₁ L)
hx :
  W.a₁ * (L * (W.addX x₁ x₂ L - x₁) + y₁) - (3 * W.addX x₁ x₂ L ^ 2 + 2 * W.a₂ * W.addX x₁ x₂ L + W.a₄) = 0 ∧
    2 * (L * (W.addX x₁ x₂ L - x₁) + y₁) + (W.a₁ * W.addX x₁ x₂ L + W.a₃) = 0
⊢ eval (W.addX x₁ x₂ L)
      (C 2 * (C L * (X - C x₁) + C y₁) * C L + (C W.a₁ * (C L * (X - C x₁) + C y₁) + (C W.a₁ * X + C W.a₃) * C L) -
        (C ↑3 * X ^ (3 - 1) + C W.a₂ * (C 2 * X) + C W.a₄)) =
    0
state_after: R : Type u
inst✝ : CommRing R
W : Affine R
x₁ x₂ y₁ L : R
hx' : W.Equation (W.addX x₁ x₂ L) (W.negAddY x₁ x₂ y₁ L)
hx :
  W.a₁ * (L * (W.addX x₁ x₂ L - x₁) + y₁) - (3 * W.addX x₁ x₂ L ^ 2 + 2 * W.a₂ * W.addX x₁ x₂ L + W.a₄) = 0 ∧
    2 * (L * (W.addX x₁ x₂ L - x₁) + y₁) + (W.a₁ * W.addX x₁ x₂ L + W.a₃) = 0
⊢ 2 * (L * (W.addX x₁ x₂ L - x₁) + y₁) * L +
        (W.a₁ * (L * (W.addX x₁ x₂ L - x₁) + y₁) + (W.a₁ * W.addX x₁ x₂ L + W.a₃) * L) -
      (↑3 * W.addX x₁ x₂ L ^ (3 - 1) + W.a₂ * (2 * W.addX x₁ x₂ L) + W.a₄) =
    0

tactic: linear_combination (norm := (norm_num1; ring1)) hx.left + L * hx.right
state_before: R : Type u
inst✝ : CommRing R
W : Affine R
x₁ x₂ y₁ L : R
hx' : W.Equation (W.addX x₁ x₂ L) (W.negAddY x₁ x₂ y₁ L)
hx :
  W.a₁ * (L * (W.addX x₁ x₂ L - x₁) + y₁) - (3 * W.addX x₁ x₂ L ^ 2 + 2 * W.a₂ * W.addX x₁ x₂ L + W.a₄) = 0 ∧
    2 * (L * (W.addX x₁ x₂ L - x₁) + y₁) + (W.a₁ * W.addX x₁ x₂ L + W.a₃) = 0
⊢ 2 * (L * (W.addX x₁ x₂ L - x₁) + y₁) * L +
        (W.a₁ * (L * (W.addX x₁ x₂ L - x₁) + y₁) + (W.a₁ * W.addX x₁ x₂ L + W.a₃) * L) -
      (↑3 * W.addX x₁ x₂ L ^ (3 - 1) + W.a₂ * (2 * W.addX x₁ x₂ L) + W.a₄) =
    0
state_after: no goals

tactic: norm_num1
state_before: case a
R : Type u
inst✝ : CommRing R
W : Affine R
x₁ x₂ y₁ L : R
hx' : W.Equation (W.addX x₁ x₂ L) (W.negAddY x₁ x₂ y₁ L)
hx :
  W.a₁ * (L * (W.addX x₁ x₂ L - x₁) + y₁) - (3 * W.addX x₁ x₂ L ^ 2 + 2 * W.a₂ * W.addX x₁ x₂ L + W.a₄) = 0 ∧
    2 * (L * (W.addX x₁ x₂ L - x₁) + y₁) + (W.a₁ * W.addX x₁ x₂ L + W.a₃) = 0
⊢ 2 * (L * (W.addX x₁ x₂ L - x₁) + y₁) * L +
            (W.a₁ * (L * (W.addX x₁ x₂ L - x₁) + y₁) + (W.a₁ * W.addX x₁ x₂ L + W.a₃) * L) -
          (↑3 * W.addX x₁ x₂ L ^ (3 - 1) + W.a₂ * (2 * W.addX x₁ x₂ L) + W.a₄) -
        0 -
      (W.a₁ * (L * (W.addX x₁ x₂ L - x₁) + y₁) - (3 * W.addX x₁ x₂ L ^ 2 + 2 * W.a₂ * W.addX x₁ x₂ L + W.a₄) +
          L * (2 * (L * (W.addX x₁ x₂ L - x₁) + y₁) + (W.a₁ * W.addX x₁ x₂ L + W.a₃)) -
        (0 + L * 0)) =
    0
state_after: case a
R : Type u
inst✝ : CommRing R
W : Affine R
x₁ x₂ y₁ L : R
hx' : W.Equation (W.addX x₁ x₂ L) (W.negAddY x₁ x₂ y₁ L)
hx :
  W.a₁ * (L * (W.addX x₁ x₂ L - x₁) + y₁) - (3 * W.addX x₁ x₂ L ^ 2 + 2 * W.a₂ * W.addX x₁ x₂ L + W.a₄) = 0 ∧
    2 * (L * (W.addX x₁ x₂ L - x₁) + y₁) + (W.a₁ * W.addX x₁ x₂ L + W.a₃) = 0
⊢ 2 * (L * (W.addX x₁ x₂ L - x₁) + y₁) * L +
            (W.a₁ * (L * (W.addX x₁ x₂ L - x₁) + y₁) + (W.a₁ * W.addX x₁ x₂ L + W.a₃) * L) -
          (3 * W.addX x₁ x₂ L ^ 2 + W.a₂ * (2 * W.addX x₁ x₂ L) + W.a₄) -
        0 -
      (W.a₁ * (L * (W.addX x₁ x₂ L - x₁) + y₁) - (3 * W.addX x₁ x₂ L ^ 2 + 2 * W.a₂ * W.addX x₁ x₂ L + W.a₄) +
          L * (2 * (L * (W.addX x₁ x₂ L - x₁) + y₁) + (W.a₁ * W.addX x₁ x₂ L + W.a₃)) -
        (0 + L * 0)) =
    0

tactic: ring1
state_before: case a
R : Type u
inst✝ : CommRing R
W : Affine R
x₁ x₂ y₁ L : R
hx' : W.Equation (W.addX x₁ x₂ L) (W.negAddY x₁ x₂ y₁ L)
hx :
  W.a₁ * (L * (W.addX x₁ x₂ L - x₁) + y₁) - (3 * W.addX x₁ x₂ L ^ 2 + 2 * W.a₂ * W.addX x₁ x₂ L + W.a₄) = 0 ∧
    2 * (L * (W.addX x₁ x₂ L - x₁) + y₁) + (W.a₁ * W.addX x₁ x₂ L + W.a₃) = 0
⊢ 2 * (L * (W.addX x₁ x₂ L - x₁) + y₁) * L +
            (W.a₁ * (L * (W.addX x₁ x₂ L - x₁) + y₁) + (W.a₁ * W.addX x₁ x₂ L + W.a₃) * L) -
          (3 * W.addX x₁ x₂ L ^ 2 + W.a₂ * (2 * W.addX x₁ x₂ L) + W.a₄) -
        0 -
      (W.a₁ * (L * (W.addX x₁ x₂ L - x₁) + y₁) - (3 * W.addX x₁ x₂ L ^ 2 + 2 * W.a₂ * W.addX x₁ x₂ L + W.a₄) +
          L * (2 * (L * (W.addX x₁ x₂ L - x₁) + y₁) + (W.a₁ * W.addX x₁ x₂ L + W.a₃)) -
        (0 + L * 0)) =
    0
state_after: no goals