l3lab/ntp-mathlib huggingface dataset:
lemma baseChange_variableChange (C : VariableChange R) :
    (W.baseChange A).variableChange (C.baseChange A) = (W.variableChange C).baseChange A := by
  simp only [baseChange, variableChange, VariableChange.baseChange]
  ext <;> 

Proof state:
case a₁
R : Type u
inst✝⁶ : CommRing R
W : WeierstrassCurve R
A : Type v
inst✝⁵ : CommRing A
inst✝⁴ : Algebra R A
B : Type w
inst✝³ : CommRing B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
C : VariableChange R
⊢ { a₁ := ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ * ((algebraMap R A) W.a₁ + 2 * (algebraMap R A) C.s),
        a₂ :=
          ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 2 *
            ((algebraMap R A) W.a₂ - (algebraMap R A) C.s * (algebraMap R A) W.a₁ + 3 * (algebraMap R A) C.r -
              (algebraMap R A) C.s ^ 2),
        a₃ :=
          ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 3 *
            ((algebraMap R A) W.a₃ + (algebraMap R A) C.r * (algebraMap R A) W.a₁ + 2 * (algebraMap R A) C.t),
        a₄ :=
          ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 4 *
            ((algebraMap R A) W.a₄ - (algebraMap R A) C.s * (algebraMap R A) W.a₃ +
                    2 * (algebraMap R A) C.r * (algebraMap R A) W.a₂ -
                  ((algebraMap R A) C.t + (algebraMap R A) C.r * (algebraMap R A) C.s) * (algebraMap R A) W.a₁ +
                3 * (algebraMap R A) C.r ^ 2 -
              2 * (algebraMap R A) C.s * (algebraMap R A) C.t),
        a₆ :=
          ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 6 *
            ((algebraMap R A) W.a₆ + (algebraMap R A) C.r * (algebraMap R A) W.a₄ +
                      (algebraMap R A) C.r ^ 2 * (algebraMap R A) W.a₂ +
                    (algebraMap R A) C.r ^ 3 -
                  (algebraMap R A) C.t * (algebraMap R A) W.a₃ -
                (algebraMap R A) C.t ^ 2 -
              (algebraMap R A) C.r * (algebraMap R A) C.t * (algebraMap R A) W.a₁) }.a₁ =
    { a₁ := (algebraMap R A) (↑C.u⁻¹ * (W.a₁ + 2 * C.s)),
        a₂ := (algebraMap R A) (↑C.u⁻¹ ^ 2 * (W.a₂ - C.s * W.a₁ + 3 * C.r - C.s ^ 2)),
        a₃ := (algebraMap R A) (↑C.u⁻¹ ^ 3 * (W.a₃ + C.r * W.a₁ + 2 * C.t)),
        a₄ :=
          (algebraMap R A)
            (↑C.u⁻¹ ^ 4 *
              (W.a₄ - C.s * W.a₃ + 2 * C.r * W.a₂ - (C.t + C.r * C.s) * W.a₁ + 3 * C.r ^ 2 - 2 * C.s * C.t)),
        a₆ :=
          (algebraMap R A)
            (↑C.u⁻¹ ^ 6 * (W.a₆ + C.r * W.a₄ + C.r ^ 2 * W.a₂ + C.r ^ 3 - C.t * W.a₃ - C.t ^ 2 - C.r * C.t * W.a₁)) }.a₁

Next tactic:
map_simp
lemma baseChange_variableChange (C : VariableChange R) :
    (W.baseChange A).variableChange (C.baseChange A) = (W.variableChange C).baseChange A := by
  simp only [baseChange, variableChange, VariableChange.baseChange]
  ext <;> 

Proof state:
case a₂
R : Type u
inst✝⁶ : CommRing R
W : WeierstrassCurve R
A : Type v
inst✝⁵ : CommRing A
inst✝⁴ : Algebra R A
B : Type w
inst✝³ : CommRing B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
C : VariableChange R
⊢ { a₁ := ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ * ((algebraMap R A) W.a₁ + 2 * (algebraMap R A) C.s),
        a₂ :=
          ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 2 *
            ((algebraMap R A) W.a₂ - (algebraMap R A) C.s * (algebraMap R A) W.a₁ + 3 * (algebraMap R A) C.r -
              (algebraMap R A) C.s ^ 2),
        a₃ :=
          ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 3 *
            ((algebraMap R A) W.a₃ + (algebraMap R A) C.r * (algebraMap R A) W.a₁ + 2 * (algebraMap R A) C.t),
        a₄ :=
          ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 4 *
            ((algebraMap R A) W.a₄ - (algebraMap R A) C.s * (algebraMap R A) W.a₃ +
                    2 * (algebraMap R A) C.r * (algebraMap R A) W.a₂ -
                  ((algebraMap R A) C.t + (algebraMap R A) C.r * (algebraMap R A) C.s) * (algebraMap R A) W.a₁ +
                3 * (algebraMap R A) C.r ^ 2 -
              2 * (algebraMap R A) C.s * (algebraMap R A) C.t),
        a₆ :=
          ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 6 *
            ((algebraMap R A) W.a₆ + (algebraMap R A) C.r * (algebraMap R A) W.a₄ +
                      (algebraMap R A) C.r ^ 2 * (algebraMap R A) W.a₂ +
                    (algebraMap R A) C.r ^ 3 -
                  (algebraMap R A) C.t * (algebraMap R A) W.a₃ -
                (algebraMap R A) C.t ^ 2 -
              (algebraMap R A) C.r * (algebraMap R A) C.t * (algebraMap R A) W.a₁) }.a₂ =
    { a₁ := (algebraMap R A) (↑C.u⁻¹ * (W.a₁ + 2 * C.s)),
        a₂ := (algebraMap R A) (↑C.u⁻¹ ^ 2 * (W.a₂ - C.s * W.a₁ + 3 * C.r - C.s ^ 2)),
        a₃ := (algebraMap R A) (↑C.u⁻¹ ^ 3 * (W.a₃ + C.r * W.a₁ + 2 * C.t)),
        a₄ :=
          (algebraMap R A)
            (↑C.u⁻¹ ^ 4 *
              (W.a₄ - C.s * W.a₃ + 2 * C.r * W.a₂ - (C.t + C.r * C.s) * W.a₁ + 3 * C.r ^ 2 - 2 * C.s * C.t)),
        a₆ :=
          (algebraMap R A)
            (↑C.u⁻¹ ^ 6 * (W.a₆ + C.r * W.a₄ + C.r ^ 2 * W.a₂ + C.r ^ 3 - C.t * W.a₃ - C.t ^ 2 - C.r * C.t * W.a₁)) }.a₂

Next tactic:
map_simp
lemma baseChange_variableChange (C : VariableChange R) :
    (W.baseChange A).variableChange (C.baseChange A) = (W.variableChange C).baseChange A := by
  simp only [baseChange, variableChange, VariableChange.baseChange]
  ext <;> 

Proof state:
case a₃
R : Type u
inst✝⁶ : CommRing R
W : WeierstrassCurve R
A : Type v
inst✝⁵ : CommRing A
inst✝⁴ : Algebra R A
B : Type w
inst✝³ : CommRing B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
C : VariableChange R
⊢ { a₁ := ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ * ((algebraMap R A) W.a₁ + 2 * (algebraMap R A) C.s),
        a₂ :=
          ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 2 *
            ((algebraMap R A) W.a₂ - (algebraMap R A) C.s * (algebraMap R A) W.a₁ + 3 * (algebraMap R A) C.r -
              (algebraMap R A) C.s ^ 2),
        a₃ :=
          ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 3 *
            ((algebraMap R A) W.a₃ + (algebraMap R A) C.r * (algebraMap R A) W.a₁ + 2 * (algebraMap R A) C.t),
        a₄ :=
          ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 4 *
            ((algebraMap R A) W.a₄ - (algebraMap R A) C.s * (algebraMap R A) W.a₃ +
                    2 * (algebraMap R A) C.r * (algebraMap R A) W.a₂ -
                  ((algebraMap R A) C.t + (algebraMap R A) C.r * (algebraMap R A) C.s) * (algebraMap R A) W.a₁ +
                3 * (algebraMap R A) C.r ^ 2 -
              2 * (algebraMap R A) C.s * (algebraMap R A) C.t),
        a₆ :=
          ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 6 *
            ((algebraMap R A) W.a₆ + (algebraMap R A) C.r * (algebraMap R A) W.a₄ +
                      (algebraMap R A) C.r ^ 2 * (algebraMap R A) W.a₂ +
                    (algebraMap R A) C.r ^ 3 -
                  (algebraMap R A) C.t * (algebraMap R A) W.a₃ -
                (algebraMap R A) C.t ^ 2 -
              (algebraMap R A) C.r * (algebraMap R A) C.t * (algebraMap R A) W.a₁) }.a₃ =
    { a₁ := (algebraMap R A) (↑C.u⁻¹ * (W.a₁ + 2 * C.s)),
        a₂ := (algebraMap R A) (↑C.u⁻¹ ^ 2 * (W.a₂ - C.s * W.a₁ + 3 * C.r - C.s ^ 2)),
        a₃ := (algebraMap R A) (↑C.u⁻¹ ^ 3 * (W.a₃ + C.r * W.a₁ + 2 * C.t)),
        a₄ :=
          (algebraMap R A)
            (↑C.u⁻¹ ^ 4 *
              (W.a₄ - C.s * W.a₃ + 2 * C.r * W.a₂ - (C.t + C.r * C.s) * W.a₁ + 3 * C.r ^ 2 - 2 * C.s * C.t)),
        a₆ :=
          (algebraMap R A)
            (↑C.u⁻¹ ^ 6 * (W.a₆ + C.r * W.a₄ + C.r ^ 2 * W.a₂ + C.r ^ 3 - C.t * W.a₃ - C.t ^ 2 - C.r * C.t * W.a₁)) }.a₃

Next tactic:
map_simp
lemma baseChange_variableChange (C : VariableChange R) :
    (W.baseChange A).variableChange (C.baseChange A) = (W.variableChange C).baseChange A := by
  simp only [baseChange, variableChange, VariableChange.baseChange]
  ext <;> 

Proof state:
case a₄
R : Type u
inst✝⁶ : CommRing R
W : WeierstrassCurve R
A : Type v
inst✝⁵ : CommRing A
inst✝⁴ : Algebra R A
B : Type w
inst✝³ : CommRing B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
C : VariableChange R
⊢ { a₁ := ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ * ((algebraMap R A) W.a₁ + 2 * (algebraMap R A) C.s),
        a₂ :=
          ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 2 *
            ((algebraMap R A) W.a₂ - (algebraMap R A) C.s * (algebraMap R A) W.a₁ + 3 * (algebraMap R A) C.r -
              (algebraMap R A) C.s ^ 2),
        a₃ :=
          ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 3 *
            ((algebraMap R A) W.a₃ + (algebraMap R A) C.r * (algebraMap R A) W.a₁ + 2 * (algebraMap R A) C.t),
        a₄ :=
          ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 4 *
            ((algebraMap R A) W.a₄ - (algebraMap R A) C.s * (algebraMap R A) W.a₃ +
                    2 * (algebraMap R A) C.r * (algebraMap R A) W.a₂ -
                  ((algebraMap R A) C.t + (algebraMap R A) C.r * (algebraMap R A) C.s) * (algebraMap R A) W.a₁ +
                3 * (algebraMap R A) C.r ^ 2 -
              2 * (algebraMap R A) C.s * (algebraMap R A) C.t),
        a₆ :=
          ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 6 *
            ((algebraMap R A) W.a₆ + (algebraMap R A) C.r * (algebraMap R A) W.a₄ +
                      (algebraMap R A) C.r ^ 2 * (algebraMap R A) W.a₂ +
                    (algebraMap R A) C.r ^ 3 -
                  (algebraMap R A) C.t * (algebraMap R A) W.a₃ -
                (algebraMap R A) C.t ^ 2 -
              (algebraMap R A) C.r * (algebraMap R A) C.t * (algebraMap R A) W.a₁) }.a₄ =
    { a₁ := (algebraMap R A) (↑C.u⁻¹ * (W.a₁ + 2 * C.s)),
        a₂ := (algebraMap R A) (↑C.u⁻¹ ^ 2 * (W.a₂ - C.s * W.a₁ + 3 * C.r - C.s ^ 2)),
        a₃ := (algebraMap R A) (↑C.u⁻¹ ^ 3 * (W.a₃ + C.r * W.a₁ + 2 * C.t)),
        a₄ :=
          (algebraMap R A)
            (↑C.u⁻¹ ^ 4 *
              (W.a₄ - C.s * W.a₃ + 2 * C.r * W.a₂ - (C.t + C.r * C.s) * W.a₁ + 3 * C.r ^ 2 - 2 * C.s * C.t)),
        a₆ :=
          (algebraMap R A)
            (↑C.u⁻¹ ^ 6 * (W.a₆ + C.r * W.a₄ + C.r ^ 2 * W.a₂ + C.r ^ 3 - C.t * W.a₃ - C.t ^ 2 - C.r * C.t * W.a₁)) }.a₄

Next tactic:
map_simp
lemma baseChange_variableChange (C : VariableChange R) :
    (W.baseChange A).variableChange (C.baseChange A) = (W.variableChange C).baseChange A := by
  simp only [baseChange, variableChange, VariableChange.baseChange]
  ext <;> 

Proof state:
case a₆
R : Type u
inst✝⁶ : CommRing R
W : WeierstrassCurve R
A : Type v
inst✝⁵ : CommRing A
inst✝⁴ : Algebra R A
B : Type w
inst✝³ : CommRing B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
C : VariableChange R
⊢ { a₁ := ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ * ((algebraMap R A) W.a₁ + 2 * (algebraMap R A) C.s),
        a₂ :=
          ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 2 *
            ((algebraMap R A) W.a₂ - (algebraMap R A) C.s * (algebraMap R A) W.a₁ + 3 * (algebraMap R A) C.r -
              (algebraMap R A) C.s ^ 2),
        a₃ :=
          ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 3 *
            ((algebraMap R A) W.a₃ + (algebraMap R A) C.r * (algebraMap R A) W.a₁ + 2 * (algebraMap R A) C.t),
        a₄ :=
          ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 4 *
            ((algebraMap R A) W.a₄ - (algebraMap R A) C.s * (algebraMap R A) W.a₃ +
                    2 * (algebraMap R A) C.r * (algebraMap R A) W.a₂ -
                  ((algebraMap R A) C.t + (algebraMap R A) C.r * (algebraMap R A) C.s) * (algebraMap R A) W.a₁ +
                3 * (algebraMap R A) C.r ^ 2 -
              2 * (algebraMap R A) C.s * (algebraMap R A) C.t),
        a₆ :=
          ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 6 *
            ((algebraMap R A) W.a₆ + (algebraMap R A) C.r * (algebraMap R A) W.a₄ +
                      (algebraMap R A) C.r ^ 2 * (algebraMap R A) W.a₂ +
                    (algebraMap R A) C.r ^ 3 -
                  (algebraMap R A) C.t * (algebraMap R A) W.a₃ -
                (algebraMap R A) C.t ^ 2 -
              (algebraMap R A) C.r * (algebraMap R A) C.t * (algebraMap R A) W.a₁) }.a₆ =
    { a₁ := (algebraMap R A) (↑C.u⁻¹ * (W.a₁ + 2 * C.s)),
        a₂ := (algebraMap R A) (↑C.u⁻¹ ^ 2 * (W.a₂ - C.s * W.a₁ + 3 * C.r - C.s ^ 2)),
        a₃ := (algebraMap R A) (↑C.u⁻¹ ^ 3 * (W.a₃ + C.r * W.a₁ + 2 * C.t)),
        a₄ :=
          (algebraMap R A)
            (↑C.u⁻¹ ^ 4 *
              (W.a₄ - C.s * W.a₃ + 2 * C.r * W.a₂ - (C.t + C.r * C.s) * W.a₁ + 3 * C.r ^ 2 - 2 * C.s * C.t)),
        a₆ :=
          (algebraMap R A)
            (↑C.u⁻¹ ^ 6 * (W.a₆ + C.r * W.a₄ + C.r ^ 2 * W.a₂ + C.r ^ 3 - C.t * W.a₃ - C.t ^ 2 - C.r * C.t * W.a₁)) }.a₆

Next tactic:
map_simp
lemma baseChange_variableChange (C : VariableChange R) :
    (W.baseChange A).variableChange (C.baseChange A) = (W.variableChange C).baseChange A := by
  simp only [baseChange, variableChange, VariableChange.baseChange]
  ext <;> map_simp <;> 

Proof state:
case a₁
R : Type u
inst✝⁶ : CommRing R
W : WeierstrassCurve R
A : Type v
inst✝⁵ : CommRing A
inst✝⁴ : Algebra R A
B : Type w
inst✝³ : CommRing B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
C : VariableChange R
⊢ ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ * ((algebraMap R A) W.a₁ + 2 * (algebraMap R A) C.s) =
    (algebraMap R A) ↑C.u⁻¹ * ((algebraMap R A) W.a₁ + 2 * (algebraMap R A) C.s)

Next tactic:
simp only [Units.coe_map, Units.coe_map_inv, MonoidHom.coe_coe]
lemma baseChange_variableChange (C : VariableChange R) :
    (W.baseChange A).variableChange (C.baseChange A) = (W.variableChange C).baseChange A := by
  simp only [baseChange, variableChange, VariableChange.baseChange]
  ext <;> map_simp <;> 

Proof state:
case a₂
R : Type u
inst✝⁶ : CommRing R
W : WeierstrassCurve R
A : Type v
inst✝⁵ : CommRing A
inst✝⁴ : Algebra R A
B : Type w
inst✝³ : CommRing B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
C : VariableChange R
⊢ ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 2 *
      ((algebraMap R A) W.a₂ - (algebraMap R A) C.s * (algebraMap R A) W.a₁ + 3 * (algebraMap R A) C.r -
        (algebraMap R A) C.s ^ 2) =
    (algebraMap R A) ↑C.u⁻¹ ^ 2 *
      ((algebraMap R A) W.a₂ - (algebraMap R A) C.s * (algebraMap R A) W.a₁ + 3 * (algebraMap R A) C.r -
        (algebraMap R A) C.s ^ 2)

Next tactic:
simp only [Units.coe_map, Units.coe_map_inv, MonoidHom.coe_coe]
lemma baseChange_variableChange (C : VariableChange R) :
    (W.baseChange A).variableChange (C.baseChange A) = (W.variableChange C).baseChange A := by
  simp only [baseChange, variableChange, VariableChange.baseChange]
  ext <;> map_simp <;> 

Proof state:
case a₃
R : Type u
inst✝⁶ : CommRing R
W : WeierstrassCurve R
A : Type v
inst✝⁵ : CommRing A
inst✝⁴ : Algebra R A
B : Type w
inst✝³ : CommRing B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
C : VariableChange R
⊢ ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 3 *
      ((algebraMap R A) W.a₃ + (algebraMap R A) C.r * (algebraMap R A) W.a₁ + 2 * (algebraMap R A) C.t) =
    (algebraMap R A) ↑C.u⁻¹ ^ 3 *
      ((algebraMap R A) W.a₃ + (algebraMap R A) C.r * (algebraMap R A) W.a₁ + 2 * (algebraMap R A) C.t)

Next tactic:
simp only [Units.coe_map, Units.coe_map_inv, MonoidHom.coe_coe]
lemma baseChange_variableChange (C : VariableChange R) :
    (W.baseChange A).variableChange (C.baseChange A) = (W.variableChange C).baseChange A := by
  simp only [baseChange, variableChange, VariableChange.baseChange]
  ext <;> map_simp <;> 

Proof state:
case a₄
R : Type u
inst✝⁶ : CommRing R
W : WeierstrassCurve R
A : Type v
inst✝⁵ : CommRing A
inst✝⁴ : Algebra R A
B : Type w
inst✝³ : CommRing B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
C : VariableChange R
⊢ ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 4 *
      ((algebraMap R A) W.a₄ - (algebraMap R A) C.s * (algebraMap R A) W.a₃ +
              2 * (algebraMap R A) C.r * (algebraMap R A) W.a₂ -
            ((algebraMap R A) C.t + (algebraMap R A) C.r * (algebraMap R A) C.s) * (algebraMap R A) W.a₁ +
          3 * (algebraMap R A) C.r ^ 2 -
        2 * (algebraMap R A) C.s * (algebraMap R A) C.t) =
    (algebraMap R A) ↑C.u⁻¹ ^ 4 *
      ((algebraMap R A) W.a₄ - (algebraMap R A) C.s * (algebraMap R A) W.a₃ +
              2 * (algebraMap R A) C.r * (algebraMap R A) W.a₂ -
            ((algebraMap R A) C.t + (algebraMap R A) C.r * (algebraMap R A) C.s) * (algebraMap R A) W.a₁ +
          3 * (algebraMap R A) C.r ^ 2 -
        2 * (algebraMap R A) C.s * (algebraMap R A) C.t)

Next tactic:
simp only [Units.coe_map, Units.coe_map_inv, MonoidHom.coe_coe]
lemma baseChange_variableChange (C : VariableChange R) :
    (W.baseChange A).variableChange (C.baseChange A) = (W.variableChange C).baseChange A := by
  simp only [baseChange, variableChange, VariableChange.baseChange]
  ext <;> map_simp <;> 

Proof state:
case a₆
R : Type u
inst✝⁶ : CommRing R
W : WeierstrassCurve R
A : Type v
inst✝⁵ : CommRing A
inst✝⁴ : Algebra R A
B : Type w
inst✝³ : CommRing B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
C : VariableChange R
⊢ ↑((Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 6 *
      ((algebraMap R A) W.a₆ + (algebraMap R A) C.r * (algebraMap R A) W.a₄ +
                (algebraMap R A) C.r ^ 2 * (algebraMap R A) W.a₂ +
              (algebraMap R A) C.r ^ 3 -
            (algebraMap R A) C.t * (algebraMap R A) W.a₃ -
          (algebraMap R A) C.t ^ 2 -
        (algebraMap R A) C.r * (algebraMap R A) C.t * (algebraMap R A) W.a₁) =
    (algebraMap R A) ↑C.u⁻¹ ^ 6 *
      ((algebraMap R A) W.a₆ + (algebraMap R A) C.r * (algebraMap R A) W.a₄ +
                (algebraMap R A) C.r ^ 2 * (algebraMap R A) W.a₂ +
              (algebraMap R A) C.r ^ 3 -
            (algebraMap R A) C.t * (algebraMap R A) W.a₃ -
          (algebraMap R A) C.t ^ 2 -
        (algebraMap R A) C.r * (algebraMap R A) C.t * (algebraMap R A) W.a₁)

Next tactic:
simp only [Units.coe_map, Units.coe_map_inv, MonoidHom.coe_coe]
lemma twoTorsionPolynomial_disc : W.twoTorsionPolynomial.disc = 16 * W.Δ := by
  

Proof state:
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
⊢ Cubic.disc W.twoTorsionPolynomial = 16 * W.Δ

Next tactic:
simp only [b₂, b₄, b₆, b₈, Δ, twoTorsionPolynomial, Cubic.disc]
lemma twoTorsionPolynomial_disc : W.twoTorsionPolynomial.disc = 16 * W.Δ := by
  simp only [b₂, b₄, b₆, b₈, Δ, twoTorsionPolynomial, Cubic.disc]
  

Proof state:
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
⊢ (W.a₁ ^ 2 + 4 * W.a₂) ^ 2 * (2 * (2 * W.a₄ + W.a₁ * W.a₃)) ^ 2 - 4 * 4 * (2 * (2 * W.a₄ + W.a₁ * W.a₃)) ^ 3 -
          4 * (W.a₁ ^ 2 + 4 * W.a₂) ^ 3 * (W.a₃ ^ 2 + 4 * W.a₆) -
        27 * 4 ^ 2 * (W.a₃ ^ 2 + 4 * W.a₆) ^ 2 +
      18 * 4 * (W.a₁ ^ 2 + 4 * W.a₂) * (2 * (2 * W.a₄ + W.a₁ * W.a₃)) * (W.a₃ ^ 2 + 4 * W.a₆) =
    16 *
      (-(W.a₁ ^ 2 + 4 * W.a₂) ^ 2 *
              (W.a₁ ^ 2 * W.a₆ + 4 * W.a₂ * W.a₆ - W.a₁ * W.a₃ * W.a₄ + W.a₂ * W.a₃ ^ 2 - W.a₄ ^ 2) -
            8 * (2 * W.a₄ + W.a₁ * W.a₃) ^ 3 -
          27 * (W.a₃ ^ 2 + 4 * W.a₆) ^ 2 +
        9 * (W.a₁ ^ 2 + 4 * W.a₂) * (2 * W.a₄ + W.a₁ * W.a₃) * (W.a₃ ^ 2 + 4 * W.a₆))

Next tactic:
ring1
lemma twoTorsionPolynomial_disc_isUnit [Invertible (2 : R)] :
    IsUnit W.twoTorsionPolynomial.disc ↔ IsUnit W.Δ := by
  

Proof state:
R : Type u
inst✝¹ : CommRing R
W : WeierstrassCurve R
inst✝ : Invertible 2
⊢ IsUnit (Cubic.disc W.twoTorsionPolynomial) ↔ IsUnit W.Δ

Next tactic:
rw [twoTorsionPolynomial_disc, IsUnit.mul_iff, show (16 : R) = 2 ^ 4 by norm_num1]
lemma twoTorsionPolynomial_disc_isUnit [Invertible (2 : R)] :
    IsUnit W.twoTorsionPolynomial.disc ↔ IsUnit W.Δ := by
  rw [twoTorsionPolynomial_disc, IsUnit.mul_iff, show (16 : R) = 2 ^ 4 by 

Proof state:
R : Type u
inst✝¹ : CommRing R
W : WeierstrassCurve R
inst✝ : Invertible 2
⊢ 16 = 2 ^ 4

Next tactic:
norm_num1
lemma twoTorsionPolynomial_disc_isUnit [Invertible (2 : R)] :
    IsUnit W.twoTorsionPolynomial.disc ↔ IsUnit W.Δ := by
  rw [twoTorsionPolynomial_disc, IsUnit.mul_iff, show (16 : R) = 2 ^ 4 by norm_num1]
  

Proof state:
R : Type u
inst✝¹ : CommRing R
W : WeierstrassCurve R
inst✝ : Invertible 2
⊢ IsUnit (2 ^ 4) ∧ IsUnit W.Δ ↔ IsUnit W.Δ

Next tactic:
exact and_iff_right <| isUnit_of_invertible <| 2 ^ 4
lemma ofJ0_c₄ : (ofJ0 R).c₄ = 0 := by
  

Proof state:
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
⊢ (ofJ0 R).c₄ = 0

Next tactic:
rw [ofJ0, c₄, b₂, b₄]
lemma ofJ0_c₄ : (ofJ0 R).c₄ = 0 := by
  rw [ofJ0, c₄, b₂, b₄]
  

Proof state:
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
⊢ ({ a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₁ ^ 2 + 4 * { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₂) ^
        2 -
      24 *
        (2 * { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₄ +
          { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₁ * { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₃) =
    0

Next tactic:
norm_num1
lemma ofJ0_Δ : (ofJ0 R).Δ = -27 := by
  

Proof state:
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
⊢ (ofJ0 R).Δ = -27

Next tactic:
rw [ofJ0, Δ, b₂, b₄, b₆, b₈]
lemma ofJ0_Δ : (ofJ0 R).Δ = -27 := by
  rw [ofJ0, Δ, b₂, b₄, b₆, b₈]
  

Proof state:
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
⊢ -({ a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₁ ^ 2 + 4 * { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₂) ^
                2 *
            ({ a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₁ ^ 2 *
                      { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₆ +
                    4 * { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₂ *
                      { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₆ -
                  { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₁ *
                      { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₃ *
                    { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₄ +
                { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₂ *
                  { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₃ ^ 2 -
              { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₄ ^ 2) -
          8 *
            (2 * { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₄ +
                { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₁ *
                  { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₃) ^
              3 -
        27 *
          ({ a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₃ ^ 2 +
              4 * { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₆) ^
            2 +
      9 *
            ({ a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₁ ^ 2 +
              4 * { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₂) *
          (2 * { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₄ +
            { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₁ * { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₃) *
        ({ a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₃ ^ 2 +
          4 * { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₆) =
    -27

Next tactic:
norm_num1
lemma ofJ1728_c₄ : (ofJ1728 R).c₄ = -48 := by
  

Proof state:
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
⊢ (ofJ1728 R).c₄ = -48

Next tactic:
rw [ofJ1728, c₄, b₂, b₄]
lemma ofJ1728_c₄ : (ofJ1728 R).c₄ = -48 := by
  rw [ofJ1728, c₄, b₂, b₄]
  

Proof state:
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
⊢ ({ a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₁ ^ 2 + 4 * { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₂) ^
        2 -
      24 *
        (2 * { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₄ +
          { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₁ * { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₃) =
    -48

Next tactic:
norm_num1
lemma ofJ1728_Δ : (ofJ1728 R).Δ = -64 := by
  

Proof state:
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
⊢ (ofJ1728 R).Δ = -64

Next tactic:
rw [ofJ1728, Δ, b₂, b₄, b₆, b₈]