l3lab/ntp-mathlib huggingface dataset:
lemma ofJ1728_Δ : (ofJ1728 R).Δ = -64 := by
  rw [ofJ1728, Δ, b₂, b₄, 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 *
            ({ a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₁ ^ 2 *
                      { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₆ +
                    4 * { 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₁ *
                      { 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₂ *
                  { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₃ ^ 2 -
              { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₄ ^ 2) -
          8 *
            (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₃) ^
              3 -
        27 *
          ({ 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 +
      9 *
            ({ 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 * { 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₃) *
        ({ a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₃ ^ 2 +
          4 * { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₆) =
    -64

Next tactic:
norm_num1
lemma ofJ_c₄ : (ofJ j).c₄ = j * (j - 1728) ^ 3 := by
  

Proof state:
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
j : R
⊢ (ofJ j).c₄ = j * (j - 1728) ^ 3

Next tactic:
simp only [ofJ, c₄, b₂, b₄]
lemma ofJ_c₄ : (ofJ j).c₄ = j * (j - 1728) ^ 3 := by
  simp only [ofJ, c₄, b₂, b₄]
  

Proof state:
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
j : R
⊢ ((j - 1728) ^ 2 + 4 * 0) ^ 2 - 24 * (2 * (-36 * (j - 1728) ^ 3) + (j - 1728) * 0) = j * (j - 1728) ^ 3

Next tactic:
ring1
lemma ofJ_Δ : (ofJ j).Δ = j ^ 2 * (j - 1728) ^ 9 := by
  

Proof state:
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
j : R
⊢ (ofJ j).Δ = j ^ 2 * (j - 1728) ^ 9

Next tactic:
simp only [ofJ, Δ, b₂, b₄, b₆, b₈]
lemma ofJ_Δ : (ofJ j).Δ = j ^ 2 * (j - 1728) ^ 9 := by
  simp only [ofJ, Δ, b₂, b₄, b₆, b₈]
  

Proof state:
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
j : R
⊢ -((j - 1728) ^ 2 + 4 * 0) ^ 2 *
            ((j - 1728) ^ 2 * -(j - 1728) ^ 5 + 4 * 0 * -(j - 1728) ^ 5 - (j - 1728) * 0 * (-36 * (j - 1728) ^ 3) +
                0 * 0 ^ 2 -
              (-36 * (j - 1728) ^ 3) ^ 2) -
          8 * (2 * (-36 * (j - 1728) ^ 3) + (j - 1728) * 0) ^ 3 -
        27 * (0 ^ 2 + 4 * -(j - 1728) ^ 5) ^ 2 +
      9 * ((j - 1728) ^ 2 + 4 * 0) * (2 * (-36 * (j - 1728) ^ 3) + (j - 1728) * 0) * (0 ^ 2 + 4 * -(j - 1728) ^ 5) =
    j ^ 2 * (j - 1728) ^ 9

Next tactic:
ring1
/-- The elliptic curve over `R` induced by an admissible linear change of variables
$(X, Y) \mapsto (u^2X + r, u^3Y + u^2sX + t)$ for some $u \in R^\times$ and some $r, s, t \in R$.
When `R` is a field, any two Weierstrass equations isomorphic to `E` are related by this. -/
@[pp_dot, simps (config := { rhsMd := .default }) a₁ a₂ a₃ a₄ a₆ Δ' toWeierstrassCurve]
def variableChange : EllipticCurve R :=
  ⟨E.toWeierstrassCurve.variableChange C, C.u⁻¹ ^ 12 * E.Δ', by
    

Proof state:
R : Type u
inst✝ : CommRing R
E : EllipticCurve R
C : WeierstrassCurve.VariableChange R
⊢ ↑(C.u⁻¹ ^ 12 * E.Δ') = (E.variableChange C).Δ

Next tactic:
rw [Units.val_mul, Units.val_pow_eq_pow_val, coe_Δ', E.variableChange_Δ]
lemma variableChange_id : E.variableChange WeierstrassCurve.VariableChange.id = E := by
  

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

Next tactic:
simp only [variableChange, WeierstrassCurve.variableChange_id]
lemma variableChange_id : E.variableChange WeierstrassCurve.VariableChange.id = E := by
  simp only [variableChange, WeierstrassCurve.variableChange_id]
  

Proof state:
R : Type u
inst✝ : CommRing R
E : EllipticCurve R
C : WeierstrassCurve.VariableChange R
⊢ { toWeierstrassCurve := E.toWeierstrassCurve, Δ' := WeierstrassCurve.VariableChange.id.u⁻¹ ^ 12 * E.Δ',
      coe_Δ' := (_ : ↑(WeierstrassCurve.VariableChange.id.u⁻¹ ^ 12 * E.Δ') = E.Δ) } =
    E

Next tactic:
simp only [WeierstrassCurve.VariableChange.id, inv_one, one_pow, one_mul]
lemma variableChange_comp (C C' : WeierstrassCurve.VariableChange R) (E : EllipticCurve R) :
    E.variableChange (C.comp C') = (E.variableChange C').variableChange C := by
  

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

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

Proof state:
R : Type u
inst✝ : CommRing R
E✝ : EllipticCurve R
C✝ C C' : WeierstrassCurve.VariableChange R
E : EllipticCurve R
⊢ { toWeierstrassCurve := (E.variableChange C').variableChange C,
      Δ' := (WeierstrassCurve.VariableChange.comp C C').u⁻¹ ^ 12 * E.Δ',
      coe_Δ' :=
        (_ :
          ↑((WeierstrassCurve.VariableChange.comp C C').u⁻¹ ^ 12 * E.Δ') =
            ((E.variableChange C').variableChange C).Δ) } =
    { toWeierstrassCurve := (E.variableChange C').variableChange C, Δ' := C.u⁻¹ ^ 12 * (C'.u⁻¹ ^ 12 * E.Δ'),
      coe_Δ' := (_ : ↑(C.u⁻¹ ^ 12 * (C'.u⁻¹ ^ 12 * E.Δ')) = ((E.variableChange C').variableChange C).Δ) }

Next tactic:
simp only [WeierstrassCurve.VariableChange.comp, mul_inv, mul_pow, ← mul_assoc]
lemma coe_variableChange_Δ' : (↑(E.variableChange C).Δ' : R) = (↑C.u⁻¹ : R) ^ 12 * E.Δ' := by
  

Proof state:
R : Type u
inst✝ : CommRing R
E : EllipticCurve R
C : WeierstrassCurve.VariableChange R
⊢ ↑(E.variableChange C).Δ' = ↑C.u⁻¹ ^ 12 * ↑E.Δ'

Next tactic:
rw [variableChange_Δ', Units.val_mul, Units.val_pow_eq_pow_val]
lemma coe_inv_variableChange_Δ' :
    (↑(E.variableChange C).Δ'⁻¹ : R) = (C.u : R) ^ 12 * ↑E.Δ'⁻¹ := by
  

Proof state:
R : Type u
inst✝ : CommRing R
E : EllipticCurve R
C : WeierstrassCurve.VariableChange R
⊢ ↑(E.variableChange C).Δ'⁻¹ = ↑C.u ^ 12 * ↑E.Δ'⁻¹

Next tactic:
rw [variableChange_Δ', mul_inv, inv_pow, inv_inv, Units.val_mul, Units.val_pow_eq_pow_val]
@[simp]
lemma variableChange_j : (E.variableChange C).j = E.j := by
  

Proof state:
R : Type u
inst✝ : CommRing R
E : EllipticCurve R
C : WeierstrassCurve.VariableChange R
⊢ (E.variableChange C).j = E.j

Next tactic:
rw [j, coe_inv_variableChange_Δ']
@[simp]
lemma variableChange_j : (E.variableChange C).j = E.j := by
  rw [j, coe_inv_variableChange_Δ']
  

Proof state:
R : Type u
inst✝ : CommRing R
E : EllipticCurve R
C : WeierstrassCurve.VariableChange R
⊢ ↑C.u ^ 12 * ↑E.Δ'⁻¹ * (E.variableChange C).c₄ ^ 3 = E.j

Next tactic:
have hu : (C.u * ↑C.u⁻¹ : R) ^ 12 = 1 := by rw [C.u.mul_inv, one_pow]
@[simp]
lemma variableChange_j : (E.variableChange C).j = E.j := by
  rw [j, coe_inv_variableChange_Δ']
  have hu : (C.u * ↑C.u⁻¹ : R) ^ 12 = 1 := by 

Proof state:
R : Type u
inst✝ : CommRing R
E : EllipticCurve R
C : WeierstrassCurve.VariableChange R
⊢ (↑C.u * ↑C.u⁻¹) ^ 12 = 1

Next tactic:
rw [C.u.mul_inv, one_pow]
@[simp]
lemma variableChange_j : (E.variableChange C).j = E.j := by
  rw [j, coe_inv_variableChange_Δ']
  have hu : (C.u * ↑C.u⁻¹ : R) ^ 12 = 1 := by rw [C.u.mul_inv, one_pow]
  

Proof state:
R : Type u
inst✝ : CommRing R
E : EllipticCurve R
C : WeierstrassCurve.VariableChange R
hu : (↑C.u * ↑C.u⁻¹) ^ 12 = 1
⊢ ↑C.u ^ 12 * ↑E.Δ'⁻¹ * (E.variableChange C).c₄ ^ 3 = E.j

Next tactic:
linear_combination (norm := (rw [variableChange_toWeierstrassCurve,
    WeierstrassCurve.variableChange_c₄, j]; ring1)) E.j * hu
@[simp]
lemma variableChange_j : (E.variableChange C).j = E.j := by
  rw [j, coe_inv_variableChange_Δ']
  have hu : (C.u * ↑C.u⁻¹ : R) ^ 12 = 1 := by rw [C.u.mul_inv, one_pow]
  linear_combination (norm := (

Proof state:
case a
R : Type u
inst✝ : CommRing R
E : EllipticCurve R
C : WeierstrassCurve.VariableChange R
hu : (↑C.u * ↑C.u⁻¹) ^ 12 = 1
⊢ ↑C.u ^ 12 * ↑E.Δ'⁻¹ * (E.variableChange C).c₄ ^ 3 - E.j - (E.j * (↑C.u * ↑C.u⁻¹) ^ 12 - E.j * 1) = 0

Next tactic:
rw [variableChange_toWeierstrassCurve,
    WeierstrassCurve.variableChange_c₄, j]
@[simp]
lemma variableChange_j : (E.variableChange C).j = E.j := by
  rw [j, coe_inv_variableChange_Δ']
  have hu : (C.u * ↑C.u⁻¹ : R) ^ 12 = 1 := by rw [C.u.mul_inv, one_pow]
  linear_combination (norm := (rw [variableChange_toWeierstrassCurve,
    WeierstrassCurve.variableChange_c₄, j]; 

Proof state:
case a
R : Type u
inst✝ : CommRing R
E : EllipticCurve R
C : WeierstrassCurve.VariableChange R
hu : (↑C.u * ↑C.u⁻¹) ^ 12 = 1
⊢ ↑C.u ^ 12 * ↑E.Δ'⁻¹ * (↑C.u⁻¹ ^ 4 * E.c₄) ^ 3 - ↑E.Δ'⁻¹ * E.c₄ ^ 3 -
      (↑E.Δ'⁻¹ * E.c₄ ^ 3 * (↑C.u * ↑C.u⁻¹) ^ 12 - ↑E.Δ'⁻¹ * E.c₄ ^ 3 * 1) =
    0

Next tactic:
ring1
/-- The elliptic curve over `R` base changed to `A`. -/
@[pp_dot, simps (config := { rhsMd := .default }) a₁ a₂ a₃ a₄ a₆ Δ' toWeierstrassCurve]
def baseChange : EllipticCurve A :=
  ⟨E.toWeierstrassCurve.baseChange A, Units.map (↑(algebraMap R A)) E.Δ',
    by 

Proof state:
R : Type u
inst✝² : CommRing R
E : EllipticCurve R
A : Type v
inst✝¹ : CommRing A
inst✝ : Algebra R A
⊢ ↑((Units.map ↑(algebraMap R A)) E.Δ') = (E.baseChange A).Δ

Next tactic:
simp only [Units.coe_map, coe_Δ', E.baseChange_Δ]
/-- The elliptic curve over `R` base changed to `A`. -/
@[pp_dot, simps (config := { rhsMd := .default }) a₁ a₂ a₃ a₄ a₆ Δ' toWeierstrassCurve]
def baseChange : EllipticCurve A :=
  ⟨E.toWeierstrassCurve.baseChange A, Units.map (↑(algebraMap R A)) E.Δ',
    by simp only [Units.coe_map, coe_Δ', E.baseChange_Δ]; 

Proof state:
R : Type u
inst✝² : CommRing R
E : EllipticCurve R
A : Type v
inst✝¹ : CommRing A
inst✝ : Algebra R A
⊢ ↑(algebraMap R A) E.Δ = (algebraMap R A) E.Δ

Next tactic:
rfl
@[simp]
lemma baseChange_j : (E.baseChange A).j = algebraMap R A E.j := by
  

Proof state:
R : Type u
inst✝² : CommRing R
E : EllipticCurve R
A : Type v
inst✝¹ : CommRing A
inst✝ : Algebra R A
⊢ (E.baseChange A).j = (algebraMap R A) E.j

Next tactic:
simp only [j, baseChange, E.baseChange_c₄]
@[simp]
lemma baseChange_j : (E.baseChange A).j = algebraMap R A E.j := by
  simp only [j, baseChange, E.baseChange_c₄]
  

Proof state:
R : Type u
inst✝² : CommRing R
E : EllipticCurve R
A : Type v
inst✝¹ : CommRing A
inst✝ : Algebra R A
⊢ ↑((Units.map ↑(algebraMap R A)) E.Δ')⁻¹ * (algebraMap R A) E.c₄ ^ 3 = (algebraMap R A) (↑E.Δ'⁻¹ * E.c₄ ^ 3)

Next tactic:
map_simp
@[simp]
lemma baseChange_j : (E.baseChange A).j = algebraMap R A E.j := by
  simp only [j, baseChange, E.baseChange_c₄]
  map_simp
  

Proof state:
R : Type u
inst✝² : CommRing R
E : EllipticCurve R
A : Type v
inst✝¹ : CommRing A
inst✝ : Algebra R A
⊢ ↑((Units.map ↑(algebraMap R A)) E.Δ')⁻¹ * (algebraMap R A) E.c₄ ^ 3 =
    (algebraMap R A) ↑E.Δ'⁻¹ * (algebraMap R A) E.c₄ ^ 3

Next tactic:
rfl
lemma baseChange_injective (h : Function.Injective <| algebraMap R A) :
    Function.Injective <| baseChange (R := R) (A := A) := fun E E' h1 => by
  

Proof state:
R : Type u
inst✝² : CommRing R
E✝ : EllipticCurve R
A : Type v
inst✝¹ : CommRing A
inst✝ : Algebra R A
h : Function.Injective ⇑(algebraMap R A)
E E' : EllipticCurve R
h1 : (fun E => E.baseChange A) E = (fun E => E.baseChange A) E'
⊢ E = E'

Next tactic:
rcases mk.inj h1 with ⟨h1, h2⟩
lemma baseChange_injective (h : Function.Injective <| algebraMap R A) :
    Function.Injective <| baseChange (R := R) (A := A) := fun E E' h1 => by
  rcases mk.inj h1 with ⟨h1, h2⟩
  

Proof state:
case intro
R : Type u
inst✝² : CommRing R
E✝ : EllipticCurve R
A : Type v
inst✝¹ : CommRing A
inst✝ : Algebra R A
h : Function.Injective ⇑(algebraMap R A)
E E' : EllipticCurve R
h1✝ : (fun E => E.baseChange A) E = (fun E => E.baseChange A) E'
h1 : E.baseChange A = E'.baseChange A
h2 : (Units.map ↑(algebraMap R A)) E.Δ' = (Units.map ↑(algebraMap R A)) E'.Δ'
⊢ E = E'

Next tactic:
replace h2 := (Units.mk.inj h2).left
lemma baseChange_injective (h : Function.Injective <| algebraMap R A) :
    Function.Injective <| baseChange (R := R) (A := A) := fun E E' h1 => by
  rcases mk.inj h1 with ⟨h1, h2⟩
  replace h2 := (Units.mk.inj h2).left
  

Proof state:
case intro
R : Type u
inst✝² : CommRing R
E✝ : EllipticCurve R
A : Type v
inst✝¹ : CommRing A
inst✝ : Algebra R A
h : Function.Injective ⇑(algebraMap R A)
E E' : EllipticCurve R
h1✝ : (fun E => E.baseChange A) E = (fun E => E.baseChange A) E'
h1 : E.baseChange A = E'.baseChange A
h2 : ↑(algebraMap R A) ↑E.Δ' = ↑(algebraMap R A) ↑E'.Δ'
⊢ E = E'

Next tactic:
rcases WeierstrassCurve.mk.inj h1 with ⟨_, _, _, _, _⟩
lemma baseChange_injective (h : Function.Injective <| algebraMap R A) :
    Function.Injective <| baseChange (R := R) (A := A) := fun E E' h1 => by
  rcases mk.inj h1 with ⟨h1, h2⟩
  replace h2 := (Units.mk.inj h2).left
  rcases WeierstrassCurve.mk.inj h1 with ⟨_, _, _, _, _⟩
  

Proof state:
case intro.intro.intro.intro.intro
R : Type u
inst✝² : CommRing R
E✝ : EllipticCurve R
A : Type v
inst✝¹ : CommRing A
inst✝ : Algebra R A
h : Function.Injective ⇑(algebraMap R A)
E E' : EllipticCurve R
h1✝ : (fun E => E.baseChange A) E = (fun E => E.baseChange A) E'
h1 : E.baseChange A = E'.baseChange A
h2 : ↑(algebraMap R A) ↑E.Δ' = ↑(algebraMap R A) ↑E'.Δ'
left✝³ : (algebraMap R A) E.a₁ = (algebraMap R A) E'.a₁
left✝² : (algebraMap R A) E.a₂ = (algebraMap R A) E'.a₂
left✝¹ : (algebraMap R A) E.a₃ = (algebraMap R A) E'.a₃
left✝ : (algebraMap R A) E.a₄ = (algebraMap R A) E'.a₄
right✝ : (algebraMap R A) E.a₆ = (algebraMap R A) E'.a₆
⊢ E = E'

Next tactic:
ext
lemma baseChange_injective (h : Function.Injective <| algebraMap R A) :
    Function.Injective <| baseChange (R := R) (A := A) := fun E E' h1 => by
  rcases mk.inj h1 with ⟨h1, h2⟩
  replace h2 := (Units.mk.inj h2).left
  rcases WeierstrassCurve.mk.inj h1 with ⟨_, _, _, _, _⟩
  ext <;> 

Proof state:
case intro.intro.intro.intro.intro.a₁
R : Type u
inst✝² : CommRing R
E✝ : EllipticCurve R
A : Type v
inst✝¹ : CommRing A
inst✝ : Algebra R A
h : Function.Injective ⇑(algebraMap R A)
E E' : EllipticCurve R
h1✝ : (fun E => E.baseChange A) E = (fun E => E.baseChange A) E'
h1 : E.baseChange A = E'.baseChange A
h2 : ↑(algebraMap R A) ↑E.Δ' = ↑(algebraMap R A) ↑E'.Δ'
left✝³ : (algebraMap R A) E.a₁ = (algebraMap R A) E'.a₁
left✝² : (algebraMap R A) E.a₂ = (algebraMap R A) E'.a₂
left✝¹ : (algebraMap R A) E.a₃ = (algebraMap R A) E'.a₃
left✝ : (algebraMap R A) E.a₄ = (algebraMap R A) E'.a₄
right✝ : (algebraMap R A) E.a₆ = (algebraMap R A) E'.a₆
⊢ E.a₁ = E'.a₁

Next tactic:
apply_fun _ using h
lemma baseChange_injective (h : Function.Injective <| algebraMap R A) :
    Function.Injective <| baseChange (R := R) (A := A) := fun E E' h1 => by
  rcases mk.inj h1 with ⟨h1, h2⟩
  replace h2 := (Units.mk.inj h2).left
  rcases WeierstrassCurve.mk.inj h1 with ⟨_, _, _, _, _⟩
  ext <;> 

Proof state:
case intro.intro.intro.intro.intro.a₂
R : Type u
inst✝² : CommRing R
E✝ : EllipticCurve R
A : Type v
inst✝¹ : CommRing A
inst✝ : Algebra R A
h : Function.Injective ⇑(algebraMap R A)
E E' : EllipticCurve R
h1✝ : (fun E => E.baseChange A) E = (fun E => E.baseChange A) E'
h1 : E.baseChange A = E'.baseChange A
h2 : ↑(algebraMap R A) ↑E.Δ' = ↑(algebraMap R A) ↑E'.Δ'
left✝³ : (algebraMap R A) E.a₁ = (algebraMap R A) E'.a₁
left✝² : (algebraMap R A) E.a₂ = (algebraMap R A) E'.a₂
left✝¹ : (algebraMap R A) E.a₃ = (algebraMap R A) E'.a₃
left✝ : (algebraMap R A) E.a₄ = (algebraMap R A) E'.a₄
right✝ : (algebraMap R A) E.a₆ = (algebraMap R A) E'.a₆
⊢ E.a₂ = E'.a₂

Next tactic:
apply_fun _ using h
lemma baseChange_injective (h : Function.Injective <| algebraMap R A) :
    Function.Injective <| baseChange (R := R) (A := A) := fun E E' h1 => by
  rcases mk.inj h1 with ⟨h1, h2⟩
  replace h2 := (Units.mk.inj h2).left
  rcases WeierstrassCurve.mk.inj h1 with ⟨_, _, _, _, _⟩
  ext <;> 

Proof state:
case intro.intro.intro.intro.intro.a₃
R : Type u
inst✝² : CommRing R
E✝ : EllipticCurve R
A : Type v
inst✝¹ : CommRing A
inst✝ : Algebra R A
h : Function.Injective ⇑(algebraMap R A)
E E' : EllipticCurve R
h1✝ : (fun E => E.baseChange A) E = (fun E => E.baseChange A) E'
h1 : E.baseChange A = E'.baseChange A
h2 : ↑(algebraMap R A) ↑E.Δ' = ↑(algebraMap R A) ↑E'.Δ'
left✝³ : (algebraMap R A) E.a₁ = (algebraMap R A) E'.a₁
left✝² : (algebraMap R A) E.a₂ = (algebraMap R A) E'.a₂
left✝¹ : (algebraMap R A) E.a₃ = (algebraMap R A) E'.a₃
left✝ : (algebraMap R A) E.a₄ = (algebraMap R A) E'.a₄
right✝ : (algebraMap R A) E.a₆ = (algebraMap R A) E'.a₆
⊢ E.a₃ = E'.a₃

Next tactic:
apply_fun _ using h
lemma baseChange_injective (h : Function.Injective <| algebraMap R A) :
    Function.Injective <| baseChange (R := R) (A := A) := fun E E' h1 => by
  rcases mk.inj h1 with ⟨h1, h2⟩
  replace h2 := (Units.mk.inj h2).left
  rcases WeierstrassCurve.mk.inj h1 with ⟨_, _, _, _, _⟩
  ext <;> 

Proof state:
case intro.intro.intro.intro.intro.a₄
R : Type u
inst✝² : CommRing R
E✝ : EllipticCurve R
A : Type v
inst✝¹ : CommRing A
inst✝ : Algebra R A
h : Function.Injective ⇑(algebraMap R A)
E E' : EllipticCurve R
h1✝ : (fun E => E.baseChange A) E = (fun E => E.baseChange A) E'
h1 : E.baseChange A = E'.baseChange A
h2 : ↑(algebraMap R A) ↑E.Δ' = ↑(algebraMap R A) ↑E'.Δ'
left✝³ : (algebraMap R A) E.a₁ = (algebraMap R A) E'.a₁
left✝² : (algebraMap R A) E.a₂ = (algebraMap R A) E'.a₂
left✝¹ : (algebraMap R A) E.a₃ = (algebraMap R A) E'.a₃
left✝ : (algebraMap R A) E.a₄ = (algebraMap R A) E'.a₄
right✝ : (algebraMap R A) E.a₆ = (algebraMap R A) E'.a₆
⊢ E.a₄ = E'.a₄

Next tactic:
apply_fun _ using h
lemma baseChange_injective (h : Function.Injective <| algebraMap R A) :
    Function.Injective <| baseChange (R := R) (A := A) := fun E E' h1 => by
  rcases mk.inj h1 with ⟨h1, h2⟩
  replace h2 := (Units.mk.inj h2).left
  rcases WeierstrassCurve.mk.inj h1 with ⟨_, _, _, _, _⟩
  ext <;> 

Proof state:
case intro.intro.intro.intro.intro.a₆
R : Type u
inst✝² : CommRing R
E✝ : EllipticCurve R
A : Type v
inst✝¹ : CommRing A
inst✝ : Algebra R A
h : Function.Injective ⇑(algebraMap R A)
E E' : EllipticCurve R
h1✝ : (fun E => E.baseChange A) E = (fun E => E.baseChange A) E'
h1 : E.baseChange A = E'.baseChange A
h2 : ↑(algebraMap R A) ↑E.Δ' = ↑(algebraMap R A) ↑E'.Δ'
left✝³ : (algebraMap R A) E.a₁ = (algebraMap R A) E'.a₁
left✝² : (algebraMap R A) E.a₂ = (algebraMap R A) E'.a₂
left✝¹ : (algebraMap R A) E.a₃ = (algebraMap R A) E'.a₃
left✝ : (algebraMap R A) E.a₄ = (algebraMap R A) E'.a₄
right✝ : (algebraMap R A) E.a₆ = (algebraMap R A) E'.a₆
⊢ E.a₆ = E'.a₆

Next tactic:
apply_fun _ using h
lemma baseChange_injective (h : Function.Injective <| algebraMap R A) :
    Function.Injective <| baseChange (R := R) (A := A) := fun E E' h1 => by
  rcases mk.inj h1 with ⟨h1, h2⟩
  replace h2 := (Units.mk.inj h2).left
  rcases WeierstrassCurve.mk.inj h1 with ⟨_, _, _, _, _⟩
  ext <;> 

Proof state:
case intro.intro.intro.intro.intro.Δ'.a
R : Type u
inst✝² : CommRing R
E✝ : EllipticCurve R
A : Type v
inst✝¹ : CommRing A
inst✝ : Algebra R A
h : Function.Injective ⇑(algebraMap R A)
E E' : EllipticCurve R
h1✝ : (fun E => E.baseChange A) E = (fun E => E.baseChange A) E'
h1 : E.baseChange A = E'.baseChange A
h2 : ↑(algebraMap R A) ↑E.Δ' = ↑(algebraMap R A) ↑E'.Δ'
left✝³ : (algebraMap R A) E.a₁ = (algebraMap R A) E'.a₁
left✝² : (algebraMap R A) E.a₂ = (algebraMap R A) E'.a₂
left✝¹ : (algebraMap R A) E.a₃ = (algebraMap R A) E'.a₃
left✝ : (algebraMap R A) E.a₄ = (algebraMap R A) E'.a₄
right✝ : (algebraMap R A) E.a₆ = (algebraMap R A) E'.a₆
⊢ ↑E.Δ' = ↑E'.Δ'

Next tactic:
apply_fun _ using h
lemma baseChange_injective (h : Function.Injective <| algebraMap R A) :
    Function.Injective <| baseChange (R := R) (A := A) := fun E E' h1 => by
  rcases mk.inj h1 with ⟨h1, h2⟩
  replace h2 := (Units.mk.inj h2).left
  rcases WeierstrassCurve.mk.inj h1 with ⟨_, _, _, _, _⟩
  ext <;> apply_fun _ using h <;> 

Proof state:
case intro.intro.intro.intro.intro.a₁
R : Type u
inst✝² : CommRing R
E✝ : EllipticCurve R
A : Type v
inst✝¹ : CommRing A
inst✝ : Algebra R A
h : Function.Injective ⇑(algebraMap R A)
E E' : EllipticCurve R
h1✝ : (fun E => E.baseChange A) E = (fun E => E.baseChange A) E'
h1 : E.baseChange A = E'.baseChange A
h2 : ↑(algebraMap R A) ↑E.Δ' = ↑(algebraMap R A) ↑E'.Δ'
left✝³ : (algebraMap R A) E.a₁ = (algebraMap R A) E'.a₁
left✝² : (algebraMap R A) E.a₂ = (algebraMap R A) E'.a₂
left✝¹ : (algebraMap R A) E.a₃ = (algebraMap R A) E'.a₃
left✝ : (algebraMap R A) E.a₄ = (algebraMap R A) E'.a₄
right✝ : (algebraMap R A) E.a₆ = (algebraMap R A) E'.a₆
⊢ (algebraMap R A) E.a₁ = (algebraMap R A) E'.a₁

Next tactic:
assumption
lemma baseChange_injective (h : Function.Injective <| algebraMap R A) :
    Function.Injective <| baseChange (R := R) (A := A) := fun E E' h1 => by
  rcases mk.inj h1 with ⟨h1, h2⟩
  replace h2 := (Units.mk.inj h2).left
  rcases WeierstrassCurve.mk.inj h1 with ⟨_, _, _, _, _⟩
  ext <;> apply_fun _ using h <;> 

Proof state:
case intro.intro.intro.intro.intro.a₂
R : Type u
inst✝² : CommRing R
E✝ : EllipticCurve R
A : Type v
inst✝¹ : CommRing A
inst✝ : Algebra R A
h : Function.Injective ⇑(algebraMap R A)
E E' : EllipticCurve R
h1✝ : (fun E => E.baseChange A) E = (fun E => E.baseChange A) E'
h1 : E.baseChange A = E'.baseChange A
h2 : ↑(algebraMap R A) ↑E.Δ' = ↑(algebraMap R A) ↑E'.Δ'
left✝³ : (algebraMap R A) E.a₁ = (algebraMap R A) E'.a₁
left✝² : (algebraMap R A) E.a₂ = (algebraMap R A) E'.a₂
left✝¹ : (algebraMap R A) E.a₃ = (algebraMap R A) E'.a₃
left✝ : (algebraMap R A) E.a₄ = (algebraMap R A) E'.a₄
right✝ : (algebraMap R A) E.a₆ = (algebraMap R A) E'.a₆
⊢ (algebraMap R A) E.a₂ = (algebraMap R A) E'.a₂

Next tactic:
assumption
lemma baseChange_injective (h : Function.Injective <| algebraMap R A) :
    Function.Injective <| baseChange (R := R) (A := A) := fun E E' h1 => by
  rcases mk.inj h1 with ⟨h1, h2⟩
  replace h2 := (Units.mk.inj h2).left
  rcases WeierstrassCurve.mk.inj h1 with ⟨_, _, _, _, _⟩
  ext <;> apply_fun _ using h <;> 

Proof state:
case intro.intro.intro.intro.intro.a₃
R : Type u
inst✝² : CommRing R
E✝ : EllipticCurve R
A : Type v
inst✝¹ : CommRing A
inst✝ : Algebra R A
h : Function.Injective ⇑(algebraMap R A)
E E' : EllipticCurve R
h1✝ : (fun E => E.baseChange A) E = (fun E => E.baseChange A) E'
h1 : E.baseChange A = E'.baseChange A
h2 : ↑(algebraMap R A) ↑E.Δ' = ↑(algebraMap R A) ↑E'.Δ'
left✝³ : (algebraMap R A) E.a₁ = (algebraMap R A) E'.a₁
left✝² : (algebraMap R A) E.a₂ = (algebraMap R A) E'.a₂
left✝¹ : (algebraMap R A) E.a₃ = (algebraMap R A) E'.a₃
left✝ : (algebraMap R A) E.a₄ = (algebraMap R A) E'.a₄
right✝ : (algebraMap R A) E.a₆ = (algebraMap R A) E'.a₆
⊢ (algebraMap R A) E.a₃ = (algebraMap R A) E'.a₃

Next tactic:
assumption