l3lab/ntp-mathlib huggingface dataset:
lemma comp_left_inv (C : VariableChange R) : comp (inv C) C = id := by
  rw [comp, id, inv]
  ext <;> 

Proof state:
case r
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C' C'' C : VariableChange R
⊢ { u := { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.u * C.u,
        r :=
          { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.r * ↑C.u ^ 2 +
            C.r,
        s :=
          ↑C.u * { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.s +
            C.s,
        t :=
          { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.t * ↑C.u ^ 3 +
              { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.r * C.s *
                ↑C.u ^ 2 +
            C.t }.r =
    { u := 1, r := 0, s := 0, t := 0 }.r

Next tactic:
dsimp only
lemma comp_left_inv (C : VariableChange R) : comp (inv C) C = id := by
  rw [comp, id, inv]
  ext <;> 

Proof state:
case s
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C' C'' C : VariableChange R
⊢ { u := { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.u * C.u,
        r :=
          { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.r * ↑C.u ^ 2 +
            C.r,
        s :=
          ↑C.u * { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.s +
            C.s,
        t :=
          { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.t * ↑C.u ^ 3 +
              { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.r * C.s *
                ↑C.u ^ 2 +
            C.t }.s =
    { u := 1, r := 0, s := 0, t := 0 }.s

Next tactic:
dsimp only
lemma comp_left_inv (C : VariableChange R) : comp (inv C) C = id := by
  rw [comp, id, inv]
  ext <;> 

Proof state:
case t
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C' C'' C : VariableChange R
⊢ { u := { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.u * C.u,
        r :=
          { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.r * ↑C.u ^ 2 +
            C.r,
        s :=
          ↑C.u * { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.s +
            C.s,
        t :=
          { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.t * ↑C.u ^ 3 +
              { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.r * C.s *
                ↑C.u ^ 2 +
            C.t }.t =
    { u := 1, r := 0, s := 0, t := 0 }.t

Next tactic:
dsimp only
lemma comp_left_inv (C : VariableChange R) : comp (inv C) C = id := by
  rw [comp, id, inv]
  ext <;> dsimp only
  · 

Proof state:
case u.a
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C' C'' C : VariableChange R
⊢ ↑(C.u⁻¹ * C.u) = ↑1

Next tactic:
exact C.u.inv_mul
lemma comp_left_inv (C : VariableChange R) : comp (inv C) C = id := by
  rw [comp, id, inv]
  ext <;> dsimp only
  · exact C.u.inv_mul
  · 

Proof state:
case r
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C' C'' C : VariableChange R
⊢ -C.r * ↑C.u⁻¹ ^ 2 * ↑C.u ^ 2 + C.r = 0

Next tactic:
linear_combination (norm := ring1) -C.r * pow_mul_pow_eq_one 2 C.u.inv_mul
lemma comp_left_inv (C : VariableChange R) : comp (inv C) C = id := by
  rw [comp, id, inv]
  ext <;> dsimp only
  · exact C.u.inv_mul
  · linear_combination (norm := 

Proof state:
case a
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C' C'' C : VariableChange R
⊢ -C.r * ↑C.u⁻¹ ^ 2 * ↑C.u ^ 2 + C.r - 0 - (-C.r * (↑C.u⁻¹ ^ 2 * ↑C.u ^ 2) - -C.r * 1) = 0

Next tactic:
ring1
lemma comp_left_inv (C : VariableChange R) : comp (inv C) C = id := by
  rw [comp, id, inv]
  ext <;> dsimp only
  · exact C.u.inv_mul
  · linear_combination (norm := ring1) -C.r * pow_mul_pow_eq_one 2 C.u.inv_mul
  · 

Proof state:
case s
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C' C'' C : VariableChange R
⊢ ↑C.u * (-C.s * ↑C.u⁻¹) + C.s = 0

Next tactic:
linear_combination (norm := ring1) -C.s * C.u.inv_mul
lemma comp_left_inv (C : VariableChange R) : comp (inv C) C = id := by
  rw [comp, id, inv]
  ext <;> dsimp only
  · exact C.u.inv_mul
  · linear_combination (norm := ring1) -C.r * pow_mul_pow_eq_one 2 C.u.inv_mul
  · linear_combination (norm := 

Proof state:
case a
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C' C'' C : VariableChange R
⊢ ↑C.u * (-C.s * ↑C.u⁻¹) + C.s - 0 - (-C.s * (↑C.u⁻¹ * ↑C.u) - -C.s * 1) = 0

Next tactic:
ring1
lemma comp_left_inv (C : VariableChange R) : comp (inv C) C = id := by
  rw [comp, id, inv]
  ext <;> dsimp only
  · exact C.u.inv_mul
  · linear_combination (norm := ring1) -C.r * pow_mul_pow_eq_one 2 C.u.inv_mul
  · linear_combination (norm := ring1) -C.s * C.u.inv_mul
  · 

Proof state:
case t
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C' C'' C : VariableChange R
⊢ (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 * ↑C.u ^ 3 + -C.r * ↑C.u⁻¹ ^ 2 * C.s * ↑C.u ^ 2 + C.t = 0

Next tactic:
linear_combination (norm := ring1) (C.r * C.s - C.t) * pow_mul_pow_eq_one 3 C.u.inv_mul
      + -C.r * C.s * pow_mul_pow_eq_one 2 C.u.inv_mul
lemma comp_left_inv (C : VariableChange R) : comp (inv C) C = id := by
  rw [comp, id, inv]
  ext <;> dsimp only
  · exact C.u.inv_mul
  · linear_combination (norm := ring1) -C.r * pow_mul_pow_eq_one 2 C.u.inv_mul
  · linear_combination (norm := ring1) -C.s * C.u.inv_mul
  · linear_combination (norm := 

Proof state:
case a
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C' C'' C : VariableChange R
⊢ (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 * ↑C.u ^ 3 + -C.r * ↑C.u⁻¹ ^ 2 * C.s * ↑C.u ^ 2 + C.t - 0 -
      ((C.r * C.s - C.t) * (↑C.u⁻¹ ^ 3 * ↑C.u ^ 3) + -C.r * C.s * (↑C.u⁻¹ ^ 2 * ↑C.u ^ 2) -
        ((C.r * C.s - C.t) * 1 + -C.r * C.s * 1)) =
    0

Next tactic:
ring1
lemma comp_assoc (C C' C'' : VariableChange R) : comp (comp C C') C'' = comp C (comp C' C'') := by
  

Proof state:
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C'✝ C''✝ C C' C'' : VariableChange R
⊢ comp (comp C C') C'' = comp C (comp C' C'')

Next tactic:
ext
lemma comp_assoc (C C' C'' : VariableChange R) : comp (comp C C') C'' = comp C (comp C' C'') := by
  ext <;> 

Proof state:
case u.a
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C'✝ C''✝ C C' C'' : VariableChange R
⊢ ↑(comp (comp C C') C'').u = ↑(comp C (comp C' C'')).u

Next tactic:
simp only [comp, Units.val_mul]
lemma comp_assoc (C C' C'' : VariableChange R) : comp (comp C C') C'' = comp C (comp C' C'') := by
  ext <;> 

Proof state:
case r
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C'✝ C''✝ C C' C'' : VariableChange R
⊢ (comp (comp C C') C'').r = (comp C (comp C' C'')).r

Next tactic:
simp only [comp, Units.val_mul]
lemma comp_assoc (C C' C'' : VariableChange R) : comp (comp C C') C'' = comp C (comp C' C'') := by
  ext <;> 

Proof state:
case s
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C'✝ C''✝ C C' C'' : VariableChange R
⊢ (comp (comp C C') C'').s = (comp C (comp C' C'')).s

Next tactic:
simp only [comp, Units.val_mul]
lemma comp_assoc (C C' C'' : VariableChange R) : comp (comp C C') C'' = comp C (comp C' C'') := by
  ext <;> 

Proof state:
case t
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C'✝ C''✝ C C' C'' : VariableChange R
⊢ (comp (comp C C') C'').t = (comp C (comp C' C'')).t

Next tactic:
simp only [comp, Units.val_mul]
lemma comp_assoc (C C' C'' : VariableChange R) : comp (comp C C') C'' = comp C (comp C' C'') := by
  ext <;> simp only [comp, Units.val_mul] <;> 

Proof state:
case u.a
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C'✝ C''✝ C C' C'' : VariableChange R
⊢ ↑C.u * ↑C'.u * ↑C''.u = ↑C.u * (↑C'.u * ↑C''.u)

Next tactic:
ring1
lemma comp_assoc (C C' C'' : VariableChange R) : comp (comp C C') C'' = comp C (comp C' C'') := by
  ext <;> simp only [comp, Units.val_mul] <;> 

Proof state:
case r
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C'✝ C''✝ C C' C'' : VariableChange R
⊢ (C.r * ↑C'.u ^ 2 + C'.r) * ↑C''.u ^ 2 + C''.r = C.r * (↑C'.u * ↑C''.u) ^ 2 + (C'.r * ↑C''.u ^ 2 + C''.r)

Next tactic:
ring1
lemma comp_assoc (C C' C'' : VariableChange R) : comp (comp C C') C'' = comp C (comp C' C'') := by
  ext <;> simp only [comp, Units.val_mul] <;> 

Proof state:
case s
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C'✝ C''✝ C C' C'' : VariableChange R
⊢ ↑C''.u * (↑C'.u * C.s + C'.s) + C''.s = ↑C'.u * ↑C''.u * C.s + (↑C''.u * C'.s + C''.s)

Next tactic:
ring1
lemma comp_assoc (C C' C'' : VariableChange R) : comp (comp C C') C'' = comp C (comp C' C'') := by
  ext <;> simp only [comp, Units.val_mul] <;> 

Proof state:
case t
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C✝ C'✝ C''✝ C C' C'' : VariableChange R
⊢ (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) * ↑C''.u ^ 3 + (C.r * ↑C'.u ^ 2 + C'.r) * C''.s * ↑C''.u ^ 2 +
      C''.t =
    C.t * (↑C'.u * ↑C''.u) ^ 3 + C.r * (↑C''.u * C'.s + C''.s) * (↑C'.u * ↑C''.u) ^ 2 +
      (C'.t * ↑C''.u ^ 3 + C'.r * C''.s * ↑C''.u ^ 2 + C''.t)

Next tactic:
ring1
lemma variableChange_id : W.variableChange VariableChange.id = W := by
  

Proof state:
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C : VariableChange R
⊢ W.variableChange VariableChange.id = W

Next tactic:
rw [VariableChange.id, variableChange, inv_one, Units.val_one]
lemma variableChange_id : W.variableChange VariableChange.id = W := by
  rw [VariableChange.id, variableChange, inv_one, Units.val_one]
  

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

Next tactic:
ext
lemma variableChange_id : W.variableChange VariableChange.id = W := by
  rw [VariableChange.id, variableChange, inv_one, Units.val_one]
  ext <;> (

Proof state:
case a₁
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C : VariableChange R
⊢ { a₁ := 1 * (W.a₁ + 2 * { u := 1, r := 0, s := 0, t := 0 }.s),
        a₂ :=
          1 ^ 2 *
            (W.a₂ - { u := 1, r := 0, s := 0, t := 0 }.s * W.a₁ + 3 * { u := 1, r := 0, s := 0, t := 0 }.r -
              { u := 1, r := 0, s := 0, t := 0 }.s ^ 2),
        a₃ := 1 ^ 3 * (W.a₃ + { u := 1, r := 0, s := 0, t := 0 }.r * W.a₁ + 2 * { u := 1, r := 0, s := 0, t := 0 }.t),
        a₄ :=
          1 ^ 4 *
            (W.a₄ - { u := 1, r := 0, s := 0, t := 0 }.s * W.a₃ + 2 * { u := 1, r := 0, s := 0, t := 0 }.r * W.a₂ -
                  ({ u := 1, r := 0, s := 0, t := 0 }.t +
                      { u := 1, r := 0, s := 0, t := 0 }.r * { u := 1, r := 0, s := 0, t := 0 }.s) *
                    W.a₁ +
                3 * { u := 1, r := 0, s := 0, t := 0 }.r ^ 2 -
              2 * { u := 1, r := 0, s := 0, t := 0 }.s * { u := 1, r := 0, s := 0, t := 0 }.t),
        a₆ :=
          1 ^ 6 *
            (W.a₆ + { u := 1, r := 0, s := 0, t := 0 }.r * W.a₄ + { u := 1, r := 0, s := 0, t := 0 }.r ^ 2 * W.a₂ +
                    { u := 1, r := 0, s := 0, t := 0 }.r ^ 3 -
                  { u := 1, r := 0, s := 0, t := 0 }.t * W.a₃ -
                { u := 1, r := 0, s := 0, t := 0 }.t ^ 2 -
              { u := 1, r := 0, s := 0, t := 0 }.r * { u := 1, r := 0, s := 0, t := 0 }.t * W.a₁) }.a₁ =
    W.a₁

Next tactic:
dsimp only
lemma variableChange_id : W.variableChange VariableChange.id = W := by
  rw [VariableChange.id, variableChange, inv_one, Units.val_one]
  ext <;> (dsimp only; 

Proof state:
case a₁
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C : VariableChange R
⊢ 1 * (W.a₁ + 2 * 0) = W.a₁

Next tactic:
ring1
lemma variableChange_id : W.variableChange VariableChange.id = W := by
  rw [VariableChange.id, variableChange, inv_one, Units.val_one]
  ext <;> (

Proof state:
case a₂
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C : VariableChange R
⊢ { a₁ := 1 * (W.a₁ + 2 * { u := 1, r := 0, s := 0, t := 0 }.s),
        a₂ :=
          1 ^ 2 *
            (W.a₂ - { u := 1, r := 0, s := 0, t := 0 }.s * W.a₁ + 3 * { u := 1, r := 0, s := 0, t := 0 }.r -
              { u := 1, r := 0, s := 0, t := 0 }.s ^ 2),
        a₃ := 1 ^ 3 * (W.a₃ + { u := 1, r := 0, s := 0, t := 0 }.r * W.a₁ + 2 * { u := 1, r := 0, s := 0, t := 0 }.t),
        a₄ :=
          1 ^ 4 *
            (W.a₄ - { u := 1, r := 0, s := 0, t := 0 }.s * W.a₃ + 2 * { u := 1, r := 0, s := 0, t := 0 }.r * W.a₂ -
                  ({ u := 1, r := 0, s := 0, t := 0 }.t +
                      { u := 1, r := 0, s := 0, t := 0 }.r * { u := 1, r := 0, s := 0, t := 0 }.s) *
                    W.a₁ +
                3 * { u := 1, r := 0, s := 0, t := 0 }.r ^ 2 -
              2 * { u := 1, r := 0, s := 0, t := 0 }.s * { u := 1, r := 0, s := 0, t := 0 }.t),
        a₆ :=
          1 ^ 6 *
            (W.a₆ + { u := 1, r := 0, s := 0, t := 0 }.r * W.a₄ + { u := 1, r := 0, s := 0, t := 0 }.r ^ 2 * W.a₂ +
                    { u := 1, r := 0, s := 0, t := 0 }.r ^ 3 -
                  { u := 1, r := 0, s := 0, t := 0 }.t * W.a₃ -
                { u := 1, r := 0, s := 0, t := 0 }.t ^ 2 -
              { u := 1, r := 0, s := 0, t := 0 }.r * { u := 1, r := 0, s := 0, t := 0 }.t * W.a₁) }.a₂ =
    W.a₂

Next tactic:
dsimp only
lemma variableChange_id : W.variableChange VariableChange.id = W := by
  rw [VariableChange.id, variableChange, inv_one, Units.val_one]
  ext <;> (dsimp only; 

Proof state:
case a₂
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C : VariableChange R
⊢ 1 ^ 2 * (W.a₂ - 0 * W.a₁ + 3 * 0 - 0 ^ 2) = W.a₂

Next tactic:
ring1
lemma variableChange_id : W.variableChange VariableChange.id = W := by
  rw [VariableChange.id, variableChange, inv_one, Units.val_one]
  ext <;> (

Proof state:
case a₃
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C : VariableChange R
⊢ { a₁ := 1 * (W.a₁ + 2 * { u := 1, r := 0, s := 0, t := 0 }.s),
        a₂ :=
          1 ^ 2 *
            (W.a₂ - { u := 1, r := 0, s := 0, t := 0 }.s * W.a₁ + 3 * { u := 1, r := 0, s := 0, t := 0 }.r -
              { u := 1, r := 0, s := 0, t := 0 }.s ^ 2),
        a₃ := 1 ^ 3 * (W.a₃ + { u := 1, r := 0, s := 0, t := 0 }.r * W.a₁ + 2 * { u := 1, r := 0, s := 0, t := 0 }.t),
        a₄ :=
          1 ^ 4 *
            (W.a₄ - { u := 1, r := 0, s := 0, t := 0 }.s * W.a₃ + 2 * { u := 1, r := 0, s := 0, t := 0 }.r * W.a₂ -
                  ({ u := 1, r := 0, s := 0, t := 0 }.t +
                      { u := 1, r := 0, s := 0, t := 0 }.r * { u := 1, r := 0, s := 0, t := 0 }.s) *
                    W.a₁ +
                3 * { u := 1, r := 0, s := 0, t := 0 }.r ^ 2 -
              2 * { u := 1, r := 0, s := 0, t := 0 }.s * { u := 1, r := 0, s := 0, t := 0 }.t),
        a₆ :=
          1 ^ 6 *
            (W.a₆ + { u := 1, r := 0, s := 0, t := 0 }.r * W.a₄ + { u := 1, r := 0, s := 0, t := 0 }.r ^ 2 * W.a₂ +
                    { u := 1, r := 0, s := 0, t := 0 }.r ^ 3 -
                  { u := 1, r := 0, s := 0, t := 0 }.t * W.a₃ -
                { u := 1, r := 0, s := 0, t := 0 }.t ^ 2 -
              { u := 1, r := 0, s := 0, t := 0 }.r * { u := 1, r := 0, s := 0, t := 0 }.t * W.a₁) }.a₃ =
    W.a₃

Next tactic:
dsimp only
lemma variableChange_id : W.variableChange VariableChange.id = W := by
  rw [VariableChange.id, variableChange, inv_one, Units.val_one]
  ext <;> (dsimp only; 

Proof state:
case a₃
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C : VariableChange R
⊢ 1 ^ 3 * (W.a₃ + 0 * W.a₁ + 2 * 0) = W.a₃

Next tactic:
ring1
lemma variableChange_id : W.variableChange VariableChange.id = W := by
  rw [VariableChange.id, variableChange, inv_one, Units.val_one]
  ext <;> (

Proof state:
case a₄
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C : VariableChange R
⊢ { a₁ := 1 * (W.a₁ + 2 * { u := 1, r := 0, s := 0, t := 0 }.s),
        a₂ :=
          1 ^ 2 *
            (W.a₂ - { u := 1, r := 0, s := 0, t := 0 }.s * W.a₁ + 3 * { u := 1, r := 0, s := 0, t := 0 }.r -
              { u := 1, r := 0, s := 0, t := 0 }.s ^ 2),
        a₃ := 1 ^ 3 * (W.a₃ + { u := 1, r := 0, s := 0, t := 0 }.r * W.a₁ + 2 * { u := 1, r := 0, s := 0, t := 0 }.t),
        a₄ :=
          1 ^ 4 *
            (W.a₄ - { u := 1, r := 0, s := 0, t := 0 }.s * W.a₃ + 2 * { u := 1, r := 0, s := 0, t := 0 }.r * W.a₂ -
                  ({ u := 1, r := 0, s := 0, t := 0 }.t +
                      { u := 1, r := 0, s := 0, t := 0 }.r * { u := 1, r := 0, s := 0, t := 0 }.s) *
                    W.a₁ +
                3 * { u := 1, r := 0, s := 0, t := 0 }.r ^ 2 -
              2 * { u := 1, r := 0, s := 0, t := 0 }.s * { u := 1, r := 0, s := 0, t := 0 }.t),
        a₆ :=
          1 ^ 6 *
            (W.a₆ + { u := 1, r := 0, s := 0, t := 0 }.r * W.a₄ + { u := 1, r := 0, s := 0, t := 0 }.r ^ 2 * W.a₂ +
                    { u := 1, r := 0, s := 0, t := 0 }.r ^ 3 -
                  { u := 1, r := 0, s := 0, t := 0 }.t * W.a₃ -
                { u := 1, r := 0, s := 0, t := 0 }.t ^ 2 -
              { u := 1, r := 0, s := 0, t := 0 }.r * { u := 1, r := 0, s := 0, t := 0 }.t * W.a₁) }.a₄ =
    W.a₄

Next tactic:
dsimp only
lemma variableChange_id : W.variableChange VariableChange.id = W := by
  rw [VariableChange.id, variableChange, inv_one, Units.val_one]
  ext <;> (dsimp only; 

Proof state:
case a₄
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C : VariableChange R
⊢ 1 ^ 4 * (W.a₄ - 0 * W.a₃ + 2 * 0 * W.a₂ - (0 + 0 * 0) * W.a₁ + 3 * 0 ^ 2 - 2 * 0 * 0) = W.a₄

Next tactic:
ring1
lemma variableChange_id : W.variableChange VariableChange.id = W := by
  rw [VariableChange.id, variableChange, inv_one, Units.val_one]
  ext <;> (

Proof state:
case a₆
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C : VariableChange R
⊢ { a₁ := 1 * (W.a₁ + 2 * { u := 1, r := 0, s := 0, t := 0 }.s),
        a₂ :=
          1 ^ 2 *
            (W.a₂ - { u := 1, r := 0, s := 0, t := 0 }.s * W.a₁ + 3 * { u := 1, r := 0, s := 0, t := 0 }.r -
              { u := 1, r := 0, s := 0, t := 0 }.s ^ 2),
        a₃ := 1 ^ 3 * (W.a₃ + { u := 1, r := 0, s := 0, t := 0 }.r * W.a₁ + 2 * { u := 1, r := 0, s := 0, t := 0 }.t),
        a₄ :=
          1 ^ 4 *
            (W.a₄ - { u := 1, r := 0, s := 0, t := 0 }.s * W.a₃ + 2 * { u := 1, r := 0, s := 0, t := 0 }.r * W.a₂ -
                  ({ u := 1, r := 0, s := 0, t := 0 }.t +
                      { u := 1, r := 0, s := 0, t := 0 }.r * { u := 1, r := 0, s := 0, t := 0 }.s) *
                    W.a₁ +
                3 * { u := 1, r := 0, s := 0, t := 0 }.r ^ 2 -
              2 * { u := 1, r := 0, s := 0, t := 0 }.s * { u := 1, r := 0, s := 0, t := 0 }.t),
        a₆ :=
          1 ^ 6 *
            (W.a₆ + { u := 1, r := 0, s := 0, t := 0 }.r * W.a₄ + { u := 1, r := 0, s := 0, t := 0 }.r ^ 2 * W.a₂ +
                    { u := 1, r := 0, s := 0, t := 0 }.r ^ 3 -
                  { u := 1, r := 0, s := 0, t := 0 }.t * W.a₃ -
                { u := 1, r := 0, s := 0, t := 0 }.t ^ 2 -
              { u := 1, r := 0, s := 0, t := 0 }.r * { u := 1, r := 0, s := 0, t := 0 }.t * W.a₁) }.a₆ =
    W.a₆

Next tactic:
dsimp only
lemma variableChange_id : W.variableChange VariableChange.id = W := by
  rw [VariableChange.id, variableChange, inv_one, Units.val_one]
  ext <;> (dsimp only; 

Proof state:
case a₆
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C : VariableChange R
⊢ 1 ^ 6 * (W.a₆ + 0 * W.a₄ + 0 ^ 2 * W.a₂ + 0 ^ 3 - 0 * W.a₃ - 0 ^ 2 - 0 * 0 * W.a₁) = W.a₆

Next tactic:
ring1
lemma variableChange_comp (C C' : VariableChange R) (W : WeierstrassCurve R) :
    W.variableChange (C.comp C') = (W.variableChange C').variableChange C := by
  

Proof state:
R : Type u
inst✝ : CommRing R
W✝ : WeierstrassCurve R
C✝ C C' : VariableChange R
W : WeierstrassCurve R
⊢ W.variableChange (VariableChange.comp C C') = (W.variableChange C').variableChange C

Next tactic:
simp only [VariableChange.comp, variableChange]
lemma variableChange_comp (C C' : VariableChange R) (W : WeierstrassCurve R) :
    W.variableChange (C.comp C') = (W.variableChange C').variableChange C := by
  simp only [VariableChange.comp, variableChange]
  

Proof state:
R : Type u
inst✝ : CommRing R
W✝ : WeierstrassCurve R
C✝ C C' : VariableChange R
W : WeierstrassCurve R
⊢ { a₁ := ↑(C.u * C'.u)⁻¹ * (W.a₁ + 2 * (↑C'.u * C.s + C'.s)),
      a₂ :=
        ↑(C.u * C'.u)⁻¹ ^ 2 *
          (W.a₂ - (↑C'.u * C.s + C'.s) * W.a₁ + 3 * (C.r * ↑C'.u ^ 2 + C'.r) - (↑C'.u * C.s + C'.s) ^ 2),
      a₃ :=
        ↑(C.u * C'.u)⁻¹ ^ 3 *
          (W.a₃ + (C.r * ↑C'.u ^ 2 + C'.r) * W.a₁ + 2 * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t)),
      a₄ :=
        ↑(C.u * C'.u)⁻¹ ^ 4 *
          (W.a₄ - (↑C'.u * C.s + C'.s) * W.a₃ + 2 * (C.r * ↑C'.u ^ 2 + C'.r) * W.a₂ -
                (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t + (C.r * ↑C'.u ^ 2 + C'.r) * (↑C'.u * C.s + C'.s)) *
                  W.a₁ +
              3 * (C.r * ↑C'.u ^ 2 + C'.r) ^ 2 -
            2 * (↑C'.u * C.s + C'.s) * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t)),
      a₆ :=
        ↑(C.u * C'.u)⁻¹ ^ 6 *
          (W.a₆ + (C.r * ↑C'.u ^ 2 + C'.r) * W.a₄ + (C.r * ↑C'.u ^ 2 + C'.r) ^ 2 * W.a₂ + (C.r * ↑C'.u ^ 2 + C'.r) ^ 3 -
                (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) * W.a₃ -
              (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) ^ 2 -
            (C.r * ↑C'.u ^ 2 + C'.r) * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) * W.a₁) } =
    { a₁ := ↑C.u⁻¹ * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s) + 2 * C.s),
      a₂ :=
        ↑C.u⁻¹ ^ 2 *
          (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2) - C.s * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) + 3 * C.r -
            C.s ^ 2),
      a₃ :=
        ↑C.u⁻¹ ^ 3 * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t) + C.r * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) + 2 * C.t),
      a₄ :=
        ↑C.u⁻¹ ^ 4 *
          (↑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) -
                    C.s * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t)) +
                  2 * C.r * (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2)) -
                (C.t + C.r * C.s) * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) +
              3 * C.r ^ 2 -
            2 * C.s * C.t),
      a₆ :=
        ↑C.u⁻¹ ^ 6 *
          (↑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₁) +
                      C.r *
                        (↑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)) +
                    C.r ^ 2 * (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2)) +
                  C.r ^ 3 -
                C.t * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t)) -
              C.t ^ 2 -
            C.r * C.t * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s))) }

Next tactic:
ext