mathlib-initiative/mathlib-tactics huggingface dataset:
Module: Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Formula

Goal state before:
pp: case pos.c
F : Type u
inst✝¹ : Field F
W : Affine F
inst✝ : DecidableEq F
x₁ y₁ : F
h₁ h₂ : y₁ ^ 2 + W.a₁ * x₁ * y₁ + W.a₃ * y₁ = x₁ ^ 3 + W.a₂ * x₁ ^ 2 + W.a₄ * x₁ + W.a₆
hxy : ¬(x₁ = x₁ ∧ y₁ = W.negY x₁ y₁)
hy : y₁ - (-y₁ - x₁ * W.a₁ - W.a₃) ≠ 0
⊢ { a := 1,
        b :=
          -((3 * x₁ ^ 2 + 2 * W.a₂ * x₁ + W.a₄ - W.a₁ * y₁) / (y₁ - W.negY x₁ y₁)) ^ 2 -
              W.a₁ * ((3 * x₁ ^ 2 + 2 * W.a₂ * x₁ + W.a₄ - W.a₁ * y₁) / (y₁ - W.negY x₁ y₁)) +
            W.a₂,
        c :=
          2 * x₁ * ((3 * x₁ ^ 2 + 2 * W.a₂ * x₁ + W.a₄ - W.a₁ * y₁) / (y₁ - W.negY x₁ y₁)) ^ 2 +
              (W.a₁ * x₁ - 2 * y₁ - W.a₃) * ((3 * x₁ ^ 2 + 2 * W.a₂ * x₁ + W.a₄ - W.a₁ * y₁) / (y₁ - W.negY x₁ y₁)) +
            (-W.a₁ * y₁ + W.a₄),
        d :=
          -x₁ ^ 2 * ((3 * x₁ ^ 2 + 2 * W.a₂ * x₁ + W.a₄ - W.a₁ * y₁) / (y₁ - W.negY x₁ y₁)) ^ 2 +
              (2 * x₁ * y₁ + W.a₃ * x₁) * ((3 * x₁ ^ 2 + 2 * W.a₂ * x₁ + W.a₄ - W.a₁ * y₁) / (y₁ - W.negY x₁ y₁)) -
            (y₁ ^ 2 + W.a₃ * y₁ - W.a₆) }.c =
    { a := 1, b := -(x₁ + x₁ + W.addX x₁ x₁ ((3 * x₁ ^ 2 + 2 * W.a₂ * x₁ + W.a₄ - W.a₁ * y₁) / (y₁ - W.negY x₁ y₁))),
        c :=
          x₁ * x₁ + x₁ * W.addX x₁ x₁ ((3 * x₁ ^ 2 + 2 * W.a₂ * x₁ + W.a₄ - W.a₁ * y₁) / (y₁ - W.negY x₁ y₁)) +
            x₁ * W.addX x₁ x₁ ((3 * x₁ ^ 2 + 2 * W.a₂ * x₁ + W.a₄ - W.a₁ * y₁) / (y₁ - W.negY x₁ y₁)),
        d := -(x₁ * x₁ * W.addX x₁ x₁ ((3 * x₁ ^ 2 + 2 * W.a₂ * x₁ + W.a₄ - W.a₁ * y₁) / (y₁ - W.negY x₁ y₁))) }.c

Tactic:
simp [field]

Goal state after:
case pos.c
F : Type u
inst✝¹ : Field F
W : Affine F
inst✝ : DecidableEq F
x₁ y₁ : F
h₁ h₂ : y₁ ^ 2 + W.a₁ * x₁ * y₁ + W.a₃ * y₁ = x₁ ^ 3 + W.a₂ * x₁ ^ 2 + W.a₄ * x₁ + W.a₆
hxy : ¬(x₁ = x₁ ∧ y₁ = W.negY x₁ y₁)
hy : y₁ - (-y₁ - x₁ * W.a₁ - W.a₃) ≠ 0
⊢ (x₁ * (x₁ * 3 + 2 * W.a₂) + W.a₄ - W.a₁ * y₁) *
        (x₁ * 2 * (x₁ * (x₁ * 3 + 2 * W.a₂) + W.a₄ - W.a₁ * y₁) +
          (y₁ - (-y₁ - x₁ * W.a₁ - W.a₃)) * (x₁ * W.a₁ - 2 * y₁ - W.a₃)) +
      (y₁ - (-y₁ - x₁ * W.a₁ - W.a₃)) ^ 2 * (-(W.a₁ * y₁) + W.a₄) =
    x₁ *
      ((x₁ * (x₁ * 3 + 2 * W.a₂) + W.a₄ - W.a₁ * y₁) *
              (x₁ * (x₁ * 3 + 2 * W.a₂) + W.a₄ - W.a₁ * y₁ + W.a₁ * (y₁ - (-y₁ - x₁ * W.a₁ - W.a₃))) -
            W.a₂ * (y₁ - (-y₁ - x₁ * W.a₁ - W.a₃)) ^ 2 -
          x₁ * (y₁ - (-y₁ - x₁ * W.a₁ - W.a₃)) ^ 2 +
        ((x₁ * (x₁ * 3 + 2 * W.a₂) + W.a₄ - W.a₁ * y₁) *
                (x₁ * (x₁ * 3 + 2 * W.a₂) + W.a₄ - W.a₁ * y₁ + W.a₁ * (y₁ - (-y₁ - x₁ * W.a₁ - W.a₃))) -
              W.a₂ * (y₁ - (-y₁ - x₁ * W.a₁ - W.a₃)) ^ 2 -
            x₁ * (y₁ - (-y₁ - x₁ * W.a₁ - W.a₃)) ^ 2 -
          x₁ * (y₁ - (-y₁ - x₁ * W.a₁ - W.a₃)) ^ 2))
Module: Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Formula

Goal state before:
pp: case a
F : Type u
inst✝¹ : Field F
W : Affine F
inst✝ : DecidableEq F
x₁ y₁ : F
h₁ h₂ : y₁ ^ 2 + W.a₁ * x₁ * y₁ + W.a₃ * y₁ = x₁ ^ 3 + W.a₂ * x₁ ^ 2 + W.a₄ * x₁ + W.a₆
hxy : ¬(x₁ = x₁ ∧ y₁ = W.negY x₁ y₁)
hy : y₁ - (-y₁ - x₁ * W.a₁ - W.a₃) ≠ 0
⊢ { a := 1,
            b :=
              -((3 * x₁ ^ 2 + 2 * W.a₂ * x₁ + W.a₄ - W.a₁ * y₁) / (y₁ - W.negY x₁ y₁)) ^ 2 -
                  W.a₁ * ((3 * x₁ ^ 2 + 2 * W.a₂ * x₁ + W.a₄ - W.a₁ * y₁) / (y₁ - W.negY x₁ y₁)) +
                W.a₂,
            c :=
              2 * x₁ * ((3 * x₁ ^ 2 + 2 * W.a₂ * x₁ + W.a₄ - W.a₁ * y₁) / (y₁ - W.negY x₁ y₁)) ^ 2 +
                  (W.a₁ * x₁ - 2 * y₁ - W.a₃) *
                    ((3 * x₁ ^ 2 + 2 * W.a₂ * x₁ + W.a₄ - W.a₁ * y₁) / (y₁ - W.negY x₁ y₁)) +
                (-W.a₁ * y₁ + W.a₄),
            d :=
              -x₁ ^ 2 * ((3 * x₁ ^ 2 + 2 * W.a₂ * x₁ + W.a₄ - W.a₁ * y₁) / (y₁ - W.negY x₁ y₁)) ^ 2 +
                  (2 * x₁ * y₁ + W.a₃ * x₁) * ((3 * x₁ ^ 2 + 2 * W.a₂ * x₁ + W.a₄ - W.a₁ * y₁) / (y₁ - W.negY x₁ y₁)) -
                (y₁ ^ 2 + W.a₃ * y₁ - W.a₆) }.d +
        (y₁ ^ 2 + W.a₁ * x₁ * y₁ + W.a₃ * y₁) -
      ({ a := 1, b := -(x₁ + x₁ + W.addX x₁ x₁ ((3 * x₁ ^ 2 + 2 * W.a₂ * x₁ + W.a₄ - W.a₁ * y₁) / (y₁ - W.negY x₁ y₁))),
            c :=
              x₁ * x₁ + x₁ * W.addX x₁ x₁ ((3 * x₁ ^ 2 + 2 * W.a₂ * x₁ + W.a₄ - W.a₁ * y₁) / (y₁ - W.negY x₁ y₁)) +
                x₁ * W.addX x₁ x₁ ((3 * x₁ ^ 2 + 2 * W.a₂ * x₁ + W.a₄ - W.a₁ * y₁) / (y₁ - W.negY x₁ y₁)),
            d := -(x₁ * x₁ * W.addX x₁ x₁ ((3 * x₁ ^ 2 + 2 * W.a₂ * x₁ + W.a₄ - W.a₁ * y₁) / (y₁ - W.negY x₁ y₁))) }.d +
        (x₁ ^ 3 + W.a₂ * x₁ ^ 2 + W.a₄ * x₁ + W.a₆)) =
    0

Tactic:
simp [field]

Goal state after:
case a
F : Type u
inst✝¹ : Field F
W : Affine F
inst✝ : DecidableEq F
x₁ y₁ : F
h₁ h₂ : y₁ ^ 2 + W.a₁ * x₁ * y₁ + W.a₃ * y₁ = x₁ ^ 3 + W.a₂ * x₁ ^ 2 + W.a₄ * x₁ + W.a₆
hxy : ¬(x₁ = x₁ ∧ y₁ = W.negY x₁ y₁)
hy : y₁ - (-y₁ - x₁ * W.a₁ - W.a₃) ≠ 0
⊢ x₁ * (x₁ * (x₁ * 3 + 2 * W.a₂) + W.a₄ - W.a₁ * y₁) *
            (-(x₁ * (x₁ * (x₁ * 3 + 2 * W.a₂) + W.a₄ - W.a₁ * y₁)) +
              (y₁ - (-y₁ - x₁ * W.a₁ - W.a₃)) * (2 * y₁ + W.a₃)) -
          (y₁ - (-y₁ - x₁ * W.a₁ - W.a₃)) ^ 2 * (y₁ * (y₁ + W.a₃) - W.a₆) +
        y₁ * (y₁ - (-y₁ - x₁ * W.a₁ - W.a₃)) ^ 2 * (y₁ + x₁ * W.a₁ + W.a₃) -
      (-(x₁ ^ 2 *
            ((x₁ * (x₁ * 3 + 2 * W.a₂) + W.a₄ - W.a₁ * y₁) *
                    (x₁ * (x₁ * 3 + 2 * W.a₂) + W.a₄ - W.a₁ * y₁ + W.a₁ * (y₁ - (-y₁ - x₁ * W.a₁ - W.a₃))) -
                  W.a₂ * (y₁ - (-y₁ - x₁ * W.a₁ - W.a₃)) ^ 2 -
                x₁ * (y₁ - (-y₁ - x₁ * W.a₁ - W.a₃)) ^ 2 -
              x₁ * (y₁ - (-y₁ - x₁ * W.a₁ - W.a₃)) ^ 2)) +
        (y₁ - (-y₁ - x₁ * W.a₁ - W.a₃)) ^ 2 * (x₁ * (x₁ * (x₁ + W.a₂) + W.a₄) + W.a₆)) =
    0
Module: Mathlib.AlgebraicGeometry.EllipticCurve.VariableChange

Goal state before:
pp: R : Type u
inst✝¹ : CommRing R
W : WeierstrassCurve R
C : VariableChange R
inst✝ : W.IsElliptic
⊢ (C • W).Δ'⁻¹ = C.u ^ 12 * W.Δ'⁻¹

Tactic:
rw [variableChange_Δ', mul_inv, inv_pow, inv_inv]

Goal state after:
Module: Mathlib.LinearAlgebra.FreeModule.IdealQuotient

Goal state before:
pp: R : Type u_2
S : Type u_3
inst✝¹³ : CommRing R
inst✝¹² : CommRing S
inst✝¹¹ : Algebra R S
inst✝¹⁰ : IsDomain R
inst✝⁹ : IsPrincipalIdealRing R
inst✝⁸ : IsDomain S
F : Type u_4
inst✝⁷ : CommRing F
inst✝⁶ : Algebra F R
inst✝⁵ : Algebra F S
inst✝⁴ : IsScalarTower F R S
I : Ideal S
hI : I ≠ ⊥
ι : Type u_5
inst✝³ : Fintype ι
b : Basis ι R S
inst✝² : Nontrivial F
inst✝¹ : ∀ (i : ι), Free F (R ⧸ span {smithCoeffs b I hI i})
inst✝ : ∀ (i : ι), Module.Finite F (R ⧸ span {smithCoeffs b I hI i})
⊢ finrank F (S ⧸ I) = ∑ i, finrank F (R ⧸ span {smithCoeffs b I hI i})

Tactic:
LinearEquiv.finrank_eq <| quotientEquivDirectSum F b hI,

Goal state after:
R : Type u_2
S : Type u_3
inst✝¹³ : CommRing R
inst✝¹² : CommRing S
inst✝¹¹ : Algebra R S
inst✝¹⁰ : IsDomain R
inst✝⁹ : IsPrincipalIdealRing R
inst✝⁸ : IsDomain S
F : Type u_4
inst✝⁷ : CommRing F
inst✝⁶ : Algebra F R
inst✝⁵ : Algebra F S
inst✝⁴ : IsScalarTower F R S
I : Ideal S
hI : I ≠ ⊥
ι : Type u_5
inst✝³ : Fintype ι
b : Basis ι R S
inst✝² : Nontrivial F
inst✝¹ : ∀ (i : ι), Free F (R ⧸ span {smithCoeffs b I hI i})
inst✝ : ∀ (i : ι), Module.Finite F (R ⧸ span {smithCoeffs b I hI i})
⊢ finrank F (⨁ (i : ι), R ⧸ span {smithCoeffs b I hI i}) = ∑ i, finrank F (R ⧸ span {smithCoeffs b I hI i})
Module: Mathlib.LinearAlgebra.FreeModule.Norm

Goal state before:
pp: R : Type u_1
S : Type u_2
ι : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : IsDomain R
inst✝⁴ : IsPrincipalIdealRing R
inst✝³ : CommRing S
inst✝² : IsDomain S
inst✝¹ : Algebra R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
hI : ¬span {f} = ⊥
⊢ Associated ((Algebra.norm R) f) (∏ i, smithCoeffs b (span {f}) ⋯ i)

Tactic:
let b' := ringBasis b (span {f}) hI

Goal state after:
R : Type u_1
S : Type u_2
ι : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : IsDomain R
inst✝⁴ : IsPrincipalIdealRing R
inst✝³ : CommRing S
inst✝² : IsDomain S
inst✝¹ : Algebra R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
hI : ¬span {f} = ⊥
b' : Basis ι R S := ringBasis b (span {f}) hI
⊢ Associated ((Algebra.norm R) f) (∏ i, smithCoeffs b (span {f}) ⋯ i)
Module: Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Formula

Goal state before:
pp: F : Type u
inst✝¹ : Field F
W : Affine F
inst✝ : DecidableEq F
x₁ x₂ y₁ y₂ : F
hx : x₁ ≠ x₂
⊢ -(x₁ - (((y₁ - y₂) / (x₁ - x₂)) ^ 2 + W.a₁ * ((y₁ - y₂) / (x₁ - x₂)) - W.a₂)) - x₂ =
    -(x₁ -
            (((y₁ - (-y₂ - W.a₁ * x₂ - W.a₃)) / (x₁ - x₂)) ^ 2 + W.a₁ * ((y₁ - (-y₂ - W.a₁ * x₂ - W.a₃)) / (x₁ - x₂)) -
              W.a₂)) -
        x₂ -
      (y₁ - (-y₁ - W.a₁ * x₁ - W.a₃)) * (y₂ - (-y₂ - W.a₁ * x₂ - W.a₃)) / (x₁ - x₂) ^ 2

Tactic:
simp [field]

Goal state after:
F : Type u
inst✝¹ : Field F
W : Affine F
inst✝ : DecidableEq F
x₁ x₂ y₁ y₂ : F
hx : x₁ ≠ x₂
⊢ (y₁ - y₂) * (y₁ - y₂ + (x₁ - x₂) * W.a₁) - (x₁ - x₂) ^ 2 * W.a₂ - x₁ * (x₁ - x₂) ^ 2 - x₂ * (x₁ - x₂) ^ 2 =
    (y₁ - (-y₂ - x₂ * W.a₁ - W.a₃)) * (y₁ - (-y₂ - x₂ * W.a₁ - W.a₃) + (x₁ - x₂) * W.a₁) - (x₁ - x₂) ^ 2 * W.a₂ -
          x₁ * (x₁ - x₂) ^ 2 -
        x₂ * (x₁ - x₂) ^ 2 -
      (y₁ - (-y₁ - x₁ * W.a₁ - W.a₃)) * (y₂ - (-y₂ - x₂ * W.a₁ - W.a₃))
Module: Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Formula

Goal state before:
pp: F : Type u
inst✝¹ : Field F
W : Affine F
inst✝ : DecidableEq F
x₁ x₂ y₁ y₂ : F
hx : x₁ ≠ x₂
⊢ y₁ * (x₂ - (((y₁ - y₂) / (x₁ - x₂)) ^ 2 + W.a₁ * ((y₁ - y₂) / (x₁ - x₂)) - W.a₂ - x₁ - x₂)) +
        y₂ * (((y₁ - y₂) / (x₁ - x₂)) ^ 2 + W.a₁ * ((y₁ - y₂) / (x₁ - x₂)) - W.a₂ - x₁ - x₂ - x₁) +
      ((y₁ - y₂) / (x₁ - x₂) * (((y₁ - y₂) / (x₁ - x₂)) ^ 2 + W.a₁ * ((y₁ - y₂) / (x₁ - x₂)) - W.a₂ - x₁ - x₂ - x₁) +
          y₁) *
        (x₁ - x₂) =
    0

Tactic:
simp [field]

Goal state after:
F : Type u
inst✝¹ : Field F
W : Affine F
inst✝ : DecidableEq F
x₁ x₂ y₁ y₂ : F
hx : x₁ ≠ x₂
⊢ y₁ *
          (x₂ * (x₁ - x₂) ^ 2 -
            ((y₁ - y₂) * (y₁ - y₂ + (x₁ - x₂) * W.a₁) - (x₁ - x₂) ^ 2 * W.a₂ - x₁ * (x₁ - x₂) ^ 2 -
              x₂ * (x₁ - x₂) ^ 2)) +
        y₂ *
          ((y₁ - y₂) * (y₁ - y₂ + (x₁ - x₂) * W.a₁) - (x₁ - x₂) ^ 2 * W.a₂ - x₁ * (x₁ - x₂) ^ 2 - x₂ * (x₁ - x₂) ^ 2 -
            x₁ * (x₁ - x₂) ^ 2) +
      ((y₁ - y₂) *
          ((y₁ - y₂) * (y₁ - y₂ + (x₁ - x₂) * W.a₁) - (x₁ - x₂) ^ 2 * W.a₂ - x₁ * (x₁ - x₂) ^ 2 - x₂ * (x₁ - x₂) ^ 2 -
            x₁ * (x₁ - x₂) ^ 2) +
        y₁ * (x₁ - x₂) ^ 3) =
    0
Module: Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Formula

Goal state before:
pp: R : Type r
S : Type s
inst✝¹ : CommRing R
inst✝ : CommRing S
W' : Affine R
f : R →+* S
⊢ (W'.map f).negPolynomial = Polynomial.map (mapRingHom f) W'.negPolynomial

Tactic:
by
  simp only [negPolynomial]
  map_simp

Goal state after:
Module: Mathlib.NumberTheory.EllipticDivisibilitySequence

Goal state before:
pp: R : Type u_1
inst✝ : CommRing R
W : ℤ → R
odd : Function.Odd W
a b c d : ℤ
⊢ atomRel W (-a) b c d = atomRel W a b c d

Tactic:
by
  simp_rw [atomRel, atom_neg_left odd]

Goal state after:
Module: Mathlib.NumberTheory.EllipticDivisibilitySequence

Goal state before:
pp: R : Type u_1
inst✝ : CommRing R
W : ℤ → R
a b c d : ℤ
parity : d % 2 = a % 2 ∧ d % 2 = b % 2 ∧ d % 2 = c % 2
⊢ W ((2 * ((a + b + (c + d)) / 2) - (d + c)).tdiv 2) *
            W (((a + b + (c + d)) / 2 - d - ((a + b + (c + d)) / 2 - c)).tdiv 2) *
          (W ((2 * ((a + b + (c + d)) / 2) - (b + a)).tdiv 2) *
            W (((a + b + (c + d)) / 2 - b - ((a + b + (c + d)) / 2 - a)).tdiv 2)) -
        W ((2 * ((a + b + (c + d)) / 2) - (d + b)).tdiv 2) *
            W (((a + b + (c + d)) / 2 - d - ((a + b + (c + d)) / 2 - b)).tdiv 2) *
          (W ((2 * ((a + b + (c + d)) / 2) - (c + a)).tdiv 2) *
            W (((a + b + (c + d)) / 2 - c - ((a + b + (c + d)) / 2 - a)).tdiv 2)) +
      W ((2 * ((a + b + (c + d)) / 2) - (d + a)).tdiv 2) *
          W (((a + b + (c + d)) / 2 - d - ((a + b + (c + d)) / 2 - a)).tdiv 2) *
        (W ((2 * ((a + b + (c + d)) / 2) - (c + b)).tdiv 2) *
          W (((a + b + (c + d)) / 2 - c - ((a + b + (c + d)) / 2 - b)).tdiv 2)) =
    W ((a + b).tdiv 2) * W ((a - b).tdiv 2) * (W ((c + d).tdiv 2) * W ((c - d).tdiv 2)) -
        W ((a + c).tdiv 2) * W ((a - c).tdiv 2) * (W ((b + d).tdiv 2) * W ((b - d).tdiv 2)) +
      W ((a + d).tdiv 2) * W ((a - d).tdiv 2) * (W ((b + c).tdiv 2) * W ((b - c).tdiv 2))

Tactic:
rw [Int.mul_ediv_cancel']

Goal state after:
R : Type u_1
inst✝ : CommRing R
W : ℤ → R
a b c d : ℤ
parity : d % 2 = a % 2 ∧ d % 2 = b % 2 ∧ d % 2 = c % 2
⊢ W ((a + b + (c + d) - (d + c)).tdiv 2) * W (((a + b + (c + d)) / 2 - d - ((a + b + (c + d)) / 2 - c)).tdiv 2) *
          (W ((a + b + (c + d) - (b + a)).tdiv 2) *
            W (((a + b + (c + d)) / 2 - b - ((a + b + (c + d)) / 2 - a)).tdiv 2)) -
        W ((a + b + (c + d) - (d + b)).tdiv 2) * W (((a + b + (c + d)) / 2 - d - ((a + b + (c + d)) / 2 - b)).tdiv 2) *
          (W ((a + b + (c + d) - (c + a)).tdiv 2) *
            W (((a + b + (c + d)) / 2 - c - ((a + b + (c + d)) / 2 - a)).tdiv 2)) +
      W ((a + b + (c + d) - (d + a)).tdiv 2) * W (((a + b + (c + d)) / 2 - d - ((a + b + (c + d)) / 2 - a)).tdiv 2) *
        (W ((a + b + (c + d) - (c + b)).tdiv 2) *
          W (((a + b + (c + d)) / 2 - c - ((a + b + (c + d)) / 2 - b)).tdiv 2)) =
    W ((a + b).tdiv 2) * W ((a - b).tdiv 2) * (W ((c + d).tdiv 2) * W ((c - d).tdiv 2)) -
        W ((a + c).tdiv 2) * W ((a - c).tdiv 2) * (W ((b + d).tdiv 2) * W ((b - d).tdiv 2)) +
      W ((a + d).tdiv 2) * W ((a - d).tdiv 2) * (W ((b + c).tdiv 2) * W ((b - c).tdiv 2))

R : Type u_1
inst✝ : CommRing R
W : ℤ → R
a b c d : ℤ
parity : d % 2 = a % 2 ∧ d % 2 = b % 2 ∧ d % 2 = c % 2
⊢ 2 ∣ a + b + (c + d)
Module: Mathlib.NumberTheory.EllipticDivisibilitySequence

Goal state before:
pp: R : Type u_1
inst✝ : CommRing R
b c d : R
m : ℕ
⊢ preNormEDS' b c d (2 * (m + 2) + 1) =
    (preNormEDS' b c d (m + 4) * preNormEDS' b c d (m + 2) ^ 3 * if Even m then b else 1) -
      preNormEDS' b c d (m + 1) * preNormEDS' b c d (m + 3) ^ 3 * if Even m then 1 else b

Tactic:
rw [show 2 * (m + 2) + 1 = 2 * m + 5 by rfl, preNormEDS', dif_pos <| even_two_mul m,
    m.mul_div_cancel_left two_pos]

Goal state after:
Module: Mathlib.NumberTheory.EllipticDivisibilitySequence

Goal state before:
pp: R : Type u_1
inst✝ : CommRing R
b c d : R
⊢ normEDS b c d 3 = c

Tactic:
simp [normEDS, show ¬Even (3 : ℤ) by decide]

Goal state after:
Module: Mathlib.NumberTheory.EllipticDivisibilitySequence

Goal state before:
pp: R : Type u_1
inst✝ : CommRing R
b c d : R
k : ℤ
⊢ preNormEDS (b ^ 4) c d (2 * k) * ((if Even k then 1 else b) * if Even k then b else 1) =
    preNormEDS (b ^ 4) c d (2 * k) * if Even (2 * k) then b else 1

Tactic:
apply_ite₂,

Goal state after:
R : Type u_1
inst✝ : CommRing R
b c d : R
k : ℤ
⊢ (preNormEDS (b ^ 4) c d (2 * k) * if Even k then 1 * b else b * 1) =
    preNormEDS (b ^ 4) c d (2 * k) * if Even (2 * k) then b else 1
Module: Mathlib.AlgebraicGeometry.AffineTransitionLimit

Goal state before:
pp: I : Type u
inst✝⁵ : Category.{u, u} I
D : I ⥤ Scheme
c : Cone D
hc : IsLimit c
inst✝⁴ : IsCofiltered I
inst✝³ : ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D.map f)
inst✝² : ∀ (i : I), CompactSpace ↥(D.obj i)
inst✝¹ : ∀ (i : I), QuasiSeparatedSpace ↥(D.obj i)
inst✝ : c.pt.IsQuasiAffine
i : ↥c.pt → I
f : (x : ↥c.pt) → ↑Γ(D.obj (i x), ⊤)
hf : ∀ (x : ↥c.pt), IsAffineOpen ((D.obj (i x)).basicOpen (f x))
hi : ∀ (x : ↥c.pt), (c.π.app (i x)) x ∈ (D.obj (i x)).basicOpen (f x)
σ : Finset ↥c.pt
hσ : ⋃ x ∈ σ, (c.π.app (i x) ⁻¹ᵁ (D.obj (i x)).basicOpen (f x)).carrier = ⊤
σi : ↥c.pt → ↥c.pt
hσiσ : ∀ (x : ↥c.pt), σi x ∈ σ
hσi : ∀ (x : ↥c.pt), x ∈ (c.π.app (i (σi x)) ⁻¹ᵁ (D.obj (i (σi x))).basicOpen (f (σi x))).carrier
j : I
fj : (i_1 : I) → i_1 ∈ Finset.image i σ → (j ⟶ i_1)
⊢ ∃ i, (D.obj i).IsQuasiAffine

Tactic:
obtain ⟨k, fkj, hk⟩ := exists_map_eq_top D c hc
    (⨆ k, D.map (fj _ (Finset.mem_image_of_mem i (hσiσ k))) ⁻¹ᵁ (D.obj (i _)).basicOpen (f _)) (by
      refine top_le_iff.mp fun x _ ↦ TopologicalSpace.Opens.mem_iSup.mpr ⟨x, ?_⟩
      change (c.π.app j ≫ D.map _).base x ∈ (D.obj (i (σi x))).basicOpen (f (σi x))
      rw [Cone.w]
      exact hσi _)

Goal state after:
I : Type u
inst✝⁵ : Category.{u, u} I
D : I ⥤ Scheme
c : Cone D
hc : IsLimit c
inst✝⁴ : IsCofiltered I
inst✝³ : ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D.map f)
inst✝² : ∀ (i : I), CompactSpace ↥(D.obj i)
inst✝¹ : ∀ (i : I), QuasiSeparatedSpace ↥(D.obj i)
inst✝ : c.pt.IsQuasiAffine
i : ↥c.pt → I
f : (x : ↥c.pt) → ↑Γ(D.obj (i x), ⊤)
hf : ∀ (x : ↥c.pt), IsAffineOpen ((D.obj (i x)).basicOpen (f x))
hi : ∀ (x : ↥c.pt), (c.π.app (i x)) x ∈ (D.obj (i x)).basicOpen (f x)
σ : Finset ↥c.pt
hσ : ⋃ x ∈ σ, (c.π.app (i x) ⁻¹ᵁ (D.obj (i x)).basicOpen (f x)).carrier = ⊤
σi : ↥c.pt → ↥c.pt
hσiσ : ∀ (x : ↥c.pt), σi x ∈ σ
hσi : ∀ (x : ↥c.pt), x ∈ (c.π.app (i (σi x)) ⁻¹ᵁ (D.obj (i (σi x))).basicOpen (f (σi x))).carrier
j : I
fj : (i_1 : I) → i_1 ∈ Finset.image i σ → (j ⟶ i_1)
k : I
fkj : k ⟶ j
hk : D.map fkj ⁻¹ᵁ ⨆ k, D.map (fj (i (σi k)) ⋯) ⁻¹ᵁ (D.obj (i (σi k))).basicOpen (f (σi k)) = ⊤
⊢ ∃ i, (D.obj i).IsQuasiAffine
Module: Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Point

Goal state before:
pp: R : Type r
inst✝¹ : CommRing R
W' : Affine R
inst✝ : IsDomain R
p q : R[X]
hdp : (p ^ 2).degree = 2 • p.degree
hdpq : (p * q * (C W'.a₁ * X + C W'.a₃)).degree ≤ p.degree + q.degree + 1
⊢ 2 • q.degree + (X ^ 3 + C W'.a₂ * X ^ 2 + C W'.a₄ * X + C W'.a₆).degree = 2 • q.degree + 3

Tactic:
← one_mul <| X ^ 3,

Goal state after:
R : Type r
inst✝¹ : CommRing R
W' : Affine R
inst✝ : IsDomain R
p q : R[X]
hdp : (p ^ 2).degree = 2 • p.degree
hdpq : (p * q * (C W'.a₁ * X + C W'.a₃)).degree ≤ p.degree + q.degree + 1
⊢ 2 • q.degree + (1 * X ^ 3 + C W'.a₂ * X ^ 2 + C W'.a₄ * X + C W'.a₆).degree = 2 • q.degree + 3
Module: Mathlib.NumberTheory.EllipticDivisibilitySequence

Goal state before:
pp: case even
R : Type u_1
S : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing S
F : Type u_3
inst✝¹ : FunLike F R S
inst✝ : RingHomClass F R S
f : F
b c d : R
m✝ : ℕ
ih : ∀ k < 2 * (m✝ + 3), f (preNormEDS' b c d k) = preNormEDS' (f b) (f c) (f d) k
⊢ f (preNormEDS' b c d (m✝ + 2)) ^ 2 * f (preNormEDS' b c d (m✝ + 3)) * f (preNormEDS' b c d (m✝ + 5)) -
      f (preNormEDS' b c d (m✝ + 1)) * f (preNormEDS' b c d (m✝ + 3)) * f (preNormEDS' b c d (m✝ + 4)) ^ 2 =
    preNormEDS' (f b) (f c) (f d) (m✝ + 2) ^ 2 * preNormEDS' (f b) (f c) (f d) (m✝ + 3) *
        preNormEDS' (f b) (f c) (f d) (m✝ + 5) -
      preNormEDS' (f b) (f c) (f d) (m✝ + 1) * preNormEDS' (f b) (f c) (f d) (m✝ + 3) *
        preNormEDS' (f b) (f c) (f d) (m✝ + 4) ^ 2

Tactic:
ih _ <| by linarith only

Goal state after:
case even
R : Type u_1
S : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing S
F : Type u_3
inst✝¹ : FunLike F R S
inst✝ : RingHomClass F R S
f : F
b c d : R
m✝ : ℕ
ih : ∀ k < 2 * (m✝ + 3), f (preNormEDS' b c d k) = preNormEDS' (f b) (f c) (f d) k
⊢ preNormEDS' (f b) (f c) (f d) (m✝ + 2) ^ 2 * f (preNormEDS' b c d (m✝ + 3)) * f (preNormEDS' b c d (m✝ + 5)) -
      f (preNormEDS' b c d (m✝ + 1)) * f (preNormEDS' b c d (m✝ + 3)) * f (preNormEDS' b c d (m✝ + 4)) ^ 2 =
    preNormEDS' (f b) (f c) (f d) (m✝ + 2) ^ 2 * preNormEDS' (f b) (f c) (f d) (m✝ + 3) *
        preNormEDS' (f b) (f c) (f d) (m✝ + 5) -
      preNormEDS' (f b) (f c) (f d) (m✝ + 1) * preNormEDS' (f b) (f c) (f d) (m✝ + 3) *
        preNormEDS' (f b) (f c) (f d) (m✝ + 4) ^ 2
Module: Mathlib.NumberTheory.EllipticDivisibilitySequence

Goal state before:
pp: case even
R : Type u_1
S : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing S
F : Type u_3
inst✝¹ : FunLike F R S
inst✝ : RingHomClass F R S
f : F
b c d : R
m✝ : ℕ
ih : ∀ k < 2 * (m✝ + 3), f (preNormEDS' b c d k) = preNormEDS' (f b) (f c) (f d) k
⊢ preNormEDS' (f b) (f c) (f d) (m✝ + 2) ^ 2 * f (preNormEDS' b c d (m✝ + 3)) * f (preNormEDS' b c d (m✝ + 5)) -
      f (preNormEDS' b c d (m✝ + 1)) * f (preNormEDS' b c d (m✝ + 3)) * f (preNormEDS' b c d (m✝ + 4)) ^ 2 =
    preNormEDS' (f b) (f c) (f d) (m✝ + 2) ^ 2 * preNormEDS' (f b) (f c) (f d) (m✝ + 3) *
        preNormEDS' (f b) (f c) (f d) (m✝ + 5) -
      preNormEDS' (f b) (f c) (f d) (m✝ + 1) * preNormEDS' (f b) (f c) (f d) (m✝ + 3) *
        preNormEDS' (f b) (f c) (f d) (m✝ + 4) ^ 2

Tactic:
ih _ <| by linarith only

Goal state after:
case even
R : Type u_1
S : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing S
F : Type u_3
inst✝¹ : FunLike F R S
inst✝ : RingHomClass F R S
f : F
b c d : R
m✝ : ℕ
ih : ∀ k < 2 * (m✝ + 3), f (preNormEDS' b c d k) = preNormEDS' (f b) (f c) (f d) k
⊢ preNormEDS' (f b) (f c) (f d) (m✝ + 2) ^ 2 * preNormEDS' (f b) (f c) (f d) (m✝ + 3) * f (preNormEDS' b c d (m✝ + 5)) -
      f (preNormEDS' b c d (m✝ + 1)) * preNormEDS' (f b) (f c) (f d) (m✝ + 3) * f (preNormEDS' b c d (m✝ + 4)) ^ 2 =
    preNormEDS' (f b) (f c) (f d) (m✝ + 2) ^ 2 * preNormEDS' (f b) (f c) (f d) (m✝ + 3) *
        preNormEDS' (f b) (f c) (f d) (m✝ + 5) -
      preNormEDS' (f b) (f c) (f d) (m✝ + 1) * preNormEDS' (f b) (f c) (f d) (m✝ + 3) *
        preNormEDS' (f b) (f c) (f d) (m✝ + 4) ^ 2
Module: Mathlib.NumberTheory.EllipticDivisibilitySequence

Goal state before:
pp: case even
R : Type u_1
S : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing S
F : Type u_3
inst✝¹ : FunLike F R S
inst✝ : RingHomClass F R S
f : F
b c d : R
m✝ : ℕ
ih : ∀ k < 2 * (m✝ + 3), f (preNormEDS' b c d k) = preNormEDS' (f b) (f c) (f d) k
⊢ preNormEDS' (f b) (f c) (f d) (m✝ + 2) ^ 2 * preNormEDS' (f b) (f c) (f d) (m✝ + 3) * f (preNormEDS' b c d (m✝ + 5)) -
      f (preNormEDS' b c d (m✝ + 1)) * preNormEDS' (f b) (f c) (f d) (m✝ + 3) * f (preNormEDS' b c d (m✝ + 4)) ^ 2 =
    preNormEDS' (f b) (f c) (f d) (m✝ + 2) ^ 2 * preNormEDS' (f b) (f c) (f d) (m✝ + 3) *
        preNormEDS' (f b) (f c) (f d) (m✝ + 5) -
      preNormEDS' (f b) (f c) (f d) (m✝ + 1) * preNormEDS' (f b) (f c) (f d) (m✝ + 3) *
        preNormEDS' (f b) (f c) (f d) (m✝ + 4) ^ 2

Tactic:
ih _ <| by linarith only

Goal state after:
case even
R : Type u_1
S : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing S
F : Type u_3
inst✝¹ : FunLike F R S
inst✝ : RingHomClass F R S
f : F
b c d : R
m✝ : ℕ
ih : ∀ k < 2 * (m✝ + 3), f (preNormEDS' b c d k) = preNormEDS' (f b) (f c) (f d) k
⊢ preNormEDS' (f b) (f c) (f d) (m✝ + 2) ^ 2 * preNormEDS' (f b) (f c) (f d) (m✝ + 3) *
        preNormEDS' (f b) (f c) (f d) (m✝ + 5) -
      f (preNormEDS' b c d (m✝ + 1)) * preNormEDS' (f b) (f c) (f d) (m✝ + 3) * f (preNormEDS' b c d (m✝ + 4)) ^ 2 =
    preNormEDS' (f b) (f c) (f d) (m✝ + 2) ^ 2 * preNormEDS' (f b) (f c) (f d) (m✝ + 3) *
        preNormEDS' (f b) (f c) (f d) (m✝ + 5) -
      preNormEDS' (f b) (f c) (f d) (m✝ + 1) * preNormEDS' (f b) (f c) (f d) (m✝ + 3) *
        preNormEDS' (f b) (f c) (f d) (m✝ + 4) ^ 2
Module: Mathlib.NumberTheory.EllipticDivisibilitySequence

Goal state before:
pp: case even
R : Type u_1
S : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing S
F : Type u_3
inst✝¹ : FunLike F R S
inst✝ : RingHomClass F R S
f : F
b c d : R
m✝ : ℕ
ih : ∀ k < 2 * (m✝ + 3), f (preNormEDS' b c d k) = preNormEDS' (f b) (f c) (f d) k
⊢ preNormEDS' (f b) (f c) (f d) (m✝ + 2) ^ 2 * preNormEDS' (f b) (f c) (f d) (m✝ + 3) *
        preNormEDS' (f b) (f c) (f d) (m✝ + 5) -
      f (preNormEDS' b c d (m✝ + 1)) * preNormEDS' (f b) (f c) (f d) (m✝ + 3) * f (preNormEDS' b c d (m✝ + 4)) ^ 2 =
    preNormEDS' (f b) (f c) (f d) (m✝ + 2) ^ 2 * preNormEDS' (f b) (f c) (f d) (m✝ + 3) *
        preNormEDS' (f b) (f c) (f d) (m✝ + 5) -
      preNormEDS' (f b) (f c) (f d) (m✝ + 1) * preNormEDS' (f b) (f c) (f d) (m✝ + 3) *
        preNormEDS' (f b) (f c) (f d) (m✝ + 4) ^ 2

Tactic:
ih _ <| by linarith only

Goal state after:
case even
R : Type u_1
S : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing S
F : Type u_3
inst✝¹ : FunLike F R S
inst✝ : RingHomClass F R S
f : F
b c d : R
m✝ : ℕ
ih : ∀ k < 2 * (m✝ + 3), f (preNormEDS' b c d k) = preNormEDS' (f b) (f c) (f d) k
⊢ preNormEDS' (f b) (f c) (f d) (m✝ + 2) ^ 2 * preNormEDS' (f b) (f c) (f d) (m✝ + 3) *
        preNormEDS' (f b) (f c) (f d) (m✝ + 5) -
      preNormEDS' (f b) (f c) (f d) (m✝ + 1) * preNormEDS' (f b) (f c) (f d) (m✝ + 3) *
        f (preNormEDS' b c d (m✝ + 4)) ^ 2 =
    preNormEDS' (f b) (f c) (f d) (m✝ + 2) ^ 2 * preNormEDS' (f b) (f c) (f d) (m✝ + 3) *
        preNormEDS' (f b) (f c) (f d) (m✝ + 5) -
      preNormEDS' (f b) (f c) (f d) (m✝ + 1) * preNormEDS' (f b) (f c) (f d) (m✝ + 3) *
        preNormEDS' (f b) (f c) (f d) (m✝ + 4) ^ 2