l3lab/ntp-mathlib huggingface dataset:
lemma baseChange_comp (C' : VariableChange R) :
    baseChange A (C.comp C') = (baseChange A C).comp (baseChange A C') := by
  

Proof state:
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 C' : VariableChange R
⊢ baseChange A (comp C C') = comp (baseChange A C) (baseChange A C')

Next tactic:
simp only [comp, baseChange]
lemma baseChange_comp (C' : VariableChange R) :
    baseChange A (C.comp C') = (baseChange A C).comp (baseChange A C') := by
  simp only [comp, baseChange]
  

Proof state:
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 C' : VariableChange R
⊢ { u := (Units.map ↑(algebraMap R A)) (C.u * C'.u), r := (algebraMap R A) (C.r * ↑C'.u ^ 2 + C'.r),
      s := (algebraMap R A) (↑C'.u * C.s + C'.s),
      t := (algebraMap R A) (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) } =
    { u := (Units.map ↑(algebraMap R A)) C.u * (Units.map ↑(algebraMap R A)) C'.u,
      r := (algebraMap R A) C.r * ↑((Units.map ↑(algebraMap R A)) C'.u) ^ 2 + (algebraMap R A) C'.r,
      s := ↑((Units.map ↑(algebraMap R A)) C'.u) * (algebraMap R A) C.s + (algebraMap R A) C'.s,
      t :=
        (algebraMap R A) C.t * ↑((Units.map ↑(algebraMap R A)) C'.u) ^ 3 +
            (algebraMap R A) C.r * (algebraMap R A) C'.s * ↑((Units.map ↑(algebraMap R A)) C'.u) ^ 2 +
          (algebraMap R A) C'.t }

Next tactic:
ext
lemma baseChange_comp (C' : VariableChange R) :
    baseChange A (C.comp C') = (baseChange A C).comp (baseChange A C') := by
  simp only [comp, baseChange]
  ext <;> 

Proof state:
case u.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 C' : VariableChange R
⊢ ↑{ u := (Units.map ↑(algebraMap R A)) (C.u * C'.u), r := (algebraMap R A) (C.r * ↑C'.u ^ 2 + C'.r),
          s := (algebraMap R A) (↑C'.u * C.s + C'.s),
          t := (algebraMap R A) (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) }.u =
    ↑{ u := (Units.map ↑(algebraMap R A)) C.u * (Units.map ↑(algebraMap R A)) C'.u,
          r := (algebraMap R A) C.r * ↑((Units.map ↑(algebraMap R A)) C'.u) ^ 2 + (algebraMap R A) C'.r,
          s := ↑((Units.map ↑(algebraMap R A)) C'.u) * (algebraMap R A) C.s + (algebraMap R A) C'.s,
          t :=
            (algebraMap R A) C.t * ↑((Units.map ↑(algebraMap R A)) C'.u) ^ 3 +
                (algebraMap R A) C.r * (algebraMap R A) C'.s * ↑((Units.map ↑(algebraMap R A)) C'.u) ^ 2 +
              (algebraMap R A) C'.t }.u

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

Proof state:
case r
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 C' : VariableChange R
⊢ { u := (Units.map ↑(algebraMap R A)) (C.u * C'.u), r := (algebraMap R A) (C.r * ↑C'.u ^ 2 + C'.r),
        s := (algebraMap R A) (↑C'.u * C.s + C'.s),
        t := (algebraMap R A) (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) }.r =
    { u := (Units.map ↑(algebraMap R A)) C.u * (Units.map ↑(algebraMap R A)) C'.u,
        r := (algebraMap R A) C.r * ↑((Units.map ↑(algebraMap R A)) C'.u) ^ 2 + (algebraMap R A) C'.r,
        s := ↑((Units.map ↑(algebraMap R A)) C'.u) * (algebraMap R A) C.s + (algebraMap R A) C'.s,
        t :=
          (algebraMap R A) C.t * ↑((Units.map ↑(algebraMap R A)) C'.u) ^ 3 +
              (algebraMap R A) C.r * (algebraMap R A) C'.s * ↑((Units.map ↑(algebraMap R A)) C'.u) ^ 2 +
            (algebraMap R A) C'.t }.r

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

Proof state:
case s
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 C' : VariableChange R
⊢ { u := (Units.map ↑(algebraMap R A)) (C.u * C'.u), r := (algebraMap R A) (C.r * ↑C'.u ^ 2 + C'.r),
        s := (algebraMap R A) (↑C'.u * C.s + C'.s),
        t := (algebraMap R A) (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) }.s =
    { u := (Units.map ↑(algebraMap R A)) C.u * (Units.map ↑(algebraMap R A)) C'.u,
        r := (algebraMap R A) C.r * ↑((Units.map ↑(algebraMap R A)) C'.u) ^ 2 + (algebraMap R A) C'.r,
        s := ↑((Units.map ↑(algebraMap R A)) C'.u) * (algebraMap R A) C.s + (algebraMap R A) C'.s,
        t :=
          (algebraMap R A) C.t * ↑((Units.map ↑(algebraMap R A)) C'.u) ^ 3 +
              (algebraMap R A) C.r * (algebraMap R A) C'.s * ↑((Units.map ↑(algebraMap R A)) C'.u) ^ 2 +
            (algebraMap R A) C'.t }.s

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

Proof state:
case t
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 C' : VariableChange R
⊢ { u := (Units.map ↑(algebraMap R A)) (C.u * C'.u), r := (algebraMap R A) (C.r * ↑C'.u ^ 2 + C'.r),
        s := (algebraMap R A) (↑C'.u * C.s + C'.s),
        t := (algebraMap R A) (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) }.t =
    { u := (Units.map ↑(algebraMap R A)) C.u * (Units.map ↑(algebraMap R A)) C'.u,
        r := (algebraMap R A) C.r * ↑((Units.map ↑(algebraMap R A)) C'.u) ^ 2 + (algebraMap R A) C'.r,
        s := ↑((Units.map ↑(algebraMap R A)) C'.u) * (algebraMap R A) C.s + (algebraMap R A) C'.s,
        t :=
          (algebraMap R A) C.t * ↑((Units.map ↑(algebraMap R A)) C'.u) ^ 3 +
              (algebraMap R A) C.r * (algebraMap R A) C'.s * ↑((Units.map ↑(algebraMap R A)) C'.u) ^ 2 +
            (algebraMap R A) C'.t }.t

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

Proof state:
case r
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 C' : VariableChange R
⊢ (algebraMap R A) C.r * (algebraMap R A) ↑C'.u ^ 2 + (algebraMap R A) C'.r =
    (algebraMap R A) C.r * ↑((Units.map ↑(algebraMap R A)) C'.u) ^ 2 + (algebraMap R A) C'.r

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

Proof state:
case s
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 C' : VariableChange R
⊢ (algebraMap R A) ↑C'.u * (algebraMap R A) C.s + (algebraMap R A) C'.s =
    ↑((Units.map ↑(algebraMap R A)) C'.u) * (algebraMap R A) C.s + (algebraMap R A) C'.s

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

Proof state:
case t
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 C' : VariableChange R
⊢ (algebraMap R A) C.t * (algebraMap R A) ↑C'.u ^ 3 +
        (algebraMap R A) C.r * (algebraMap R A) C'.s * (algebraMap R A) ↑C'.u ^ 2 +
      (algebraMap R A) C'.t =
    (algebraMap R A) C.t * ↑((Units.map ↑(algebraMap R A)) C'.u) ^ 3 +
        (algebraMap R A) C.r * (algebraMap R A) C'.s * ↑((Units.map ↑(algebraMap R A)) C'.u) ^ 2 +
      (algebraMap R A) C'.t

Next tactic:
simp only [Units.coe_map, Units.coe_map_inv, MonoidHom.coe_coe]
lemma baseChange_baseChange : (C.baseChange A).baseChange B = C.baseChange B := by
  

Proof state:
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
⊢ baseChange B (baseChange A C) = baseChange B C

Next tactic:
ext
lemma baseChange_baseChange : (C.baseChange A).baseChange B = C.baseChange B := by
  ext <;> 

Proof state:
case u.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
⊢ ↑(baseChange B (baseChange A C)).u = ↑(baseChange B C).u

Next tactic:
exact (IsScalarTower.algebraMap_apply R A B _).symm
lemma baseChange_baseChange : (C.baseChange A).baseChange B = C.baseChange B := by
  ext <;> 

Proof state:
case r
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
⊢ (baseChange B (baseChange A C)).r = (baseChange B C).r

Next tactic:
exact (IsScalarTower.algebraMap_apply R A B _).symm
lemma baseChange_baseChange : (C.baseChange A).baseChange B = C.baseChange B := by
  ext <;> 

Proof state:
case s
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
⊢ (baseChange B (baseChange A C)).s = (baseChange B C).s

Next tactic:
exact (IsScalarTower.algebraMap_apply R A B _).symm
lemma baseChange_baseChange : (C.baseChange A).baseChange B = C.baseChange B := by
  ext <;> 

Proof state:
case t
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
⊢ (baseChange B (baseChange A C)).t = (baseChange B C).t

Next tactic:
exact (IsScalarTower.algebraMap_apply R A B _).symm
lemma baseChange_injective (h : Function.Injective <| algebraMap R A) :
    Function.Injective <| baseChange (R := R) A := fun C C' h1 => by
  

Proof state:
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
h : Function.Injective ⇑(algebraMap R A)
C C' : VariableChange R
h1 : baseChange A C = baseChange A C'
⊢ C = C'

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

Proof state:
case intro.intro.intro
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
h : Function.Injective ⇑(algebraMap R A)
C C' : VariableChange R
h1✝ : baseChange A C = baseChange A C'
h1 : (Units.map ↑(algebraMap R A)) C.u = (Units.map ↑(algebraMap R A)) C'.u
left✝¹ : (algebraMap R A) C.r = (algebraMap R A) C'.r
left✝ : (algebraMap R A) C.s = (algebraMap R A) C'.s
right✝ : (algebraMap R A) C.t = (algebraMap R A) C'.t
⊢ C = C'

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

Proof state:
case intro.intro.intro
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
h : Function.Injective ⇑(algebraMap R A)
C C' : VariableChange R
h1✝ : baseChange A C = baseChange A C'
left✝¹ : (algebraMap R A) C.r = (algebraMap R A) C'.r
left✝ : (algebraMap R A) C.s = (algebraMap R A) C'.s
right✝ : (algebraMap R A) C.t = (algebraMap R A) C'.t
h1 : ↑(algebraMap R A) ↑C.u = ↑(algebraMap R A) ↑C'.u
⊢ C = C'

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

Proof state:
case intro.intro.intro.u.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
h : Function.Injective ⇑(algebraMap R A)
C C' : VariableChange R
h1✝ : baseChange A C = baseChange A C'
left✝¹ : (algebraMap R A) C.r = (algebraMap R A) C'.r
left✝ : (algebraMap R A) C.s = (algebraMap R A) C'.s
right✝ : (algebraMap R A) C.t = (algebraMap R A) C'.t
h1 : ↑(algebraMap R A) ↑C.u = ↑(algebraMap R A) ↑C'.u
⊢ ↑C.u = ↑C'.u

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

Proof state:
case intro.intro.intro.r
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
h : Function.Injective ⇑(algebraMap R A)
C C' : VariableChange R
h1✝ : baseChange A C = baseChange A C'
left✝¹ : (algebraMap R A) C.r = (algebraMap R A) C'.r
left✝ : (algebraMap R A) C.s = (algebraMap R A) C'.s
right✝ : (algebraMap R A) C.t = (algebraMap R A) C'.t
h1 : ↑(algebraMap R A) ↑C.u = ↑(algebraMap R A) ↑C'.u
⊢ C.r = C'.r

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

Proof state:
case intro.intro.intro.s
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
h : Function.Injective ⇑(algebraMap R A)
C C' : VariableChange R
h1✝ : baseChange A C = baseChange A C'
left✝¹ : (algebraMap R A) C.r = (algebraMap R A) C'.r
left✝ : (algebraMap R A) C.s = (algebraMap R A) C'.s
right✝ : (algebraMap R A) C.t = (algebraMap R A) C'.t
h1 : ↑(algebraMap R A) ↑C.u = ↑(algebraMap R A) ↑C'.u
⊢ C.s = C'.s

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

Proof state:
case intro.intro.intro.t
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
h : Function.Injective ⇑(algebraMap R A)
C C' : VariableChange R
h1✝ : baseChange A C = baseChange A C'
left✝¹ : (algebraMap R A) C.r = (algebraMap R A) C'.r
left✝ : (algebraMap R A) C.s = (algebraMap R A) C'.s
right✝ : (algebraMap R A) C.t = (algebraMap R A) C'.t
h1 : ↑(algebraMap R A) ↑C.u = ↑(algebraMap R A) ↑C'.u
⊢ C.t = C'.t

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

Proof state:
case intro.intro.intro.u.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
h : Function.Injective ⇑(algebraMap R A)
C C' : VariableChange R
h1✝ : baseChange A C = baseChange A C'
left✝¹ : (algebraMap R A) C.r = (algebraMap R A) C'.r
left✝ : (algebraMap R A) C.s = (algebraMap R A) C'.s
right✝ : (algebraMap R A) C.t = (algebraMap R A) C'.t
h1 : ↑(algebraMap R A) ↑C.u = ↑(algebraMap R A) ↑C'.u
⊢ (algebraMap R A) ↑C.u = (algebraMap R A) ↑C'.u

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

Proof state:
case intro.intro.intro.r
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
h : Function.Injective ⇑(algebraMap R A)
C C' : VariableChange R
h1✝ : baseChange A C = baseChange A C'
left✝¹ : (algebraMap R A) C.r = (algebraMap R A) C'.r
left✝ : (algebraMap R A) C.s = (algebraMap R A) C'.s
right✝ : (algebraMap R A) C.t = (algebraMap R A) C'.t
h1 : ↑(algebraMap R A) ↑C.u = ↑(algebraMap R A) ↑C'.u
⊢ (algebraMap R A) C.r = (algebraMap R A) C'.r

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

Proof state:
case intro.intro.intro.s
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
h : Function.Injective ⇑(algebraMap R A)
C C' : VariableChange R
h1✝ : baseChange A C = baseChange A C'
left✝¹ : (algebraMap R A) C.r = (algebraMap R A) C'.r
left✝ : (algebraMap R A) C.s = (algebraMap R A) C'.s
right✝ : (algebraMap R A) C.t = (algebraMap R A) C'.t
h1 : ↑(algebraMap R A) ↑C.u = ↑(algebraMap R A) ↑C'.u
⊢ (algebraMap R A) C.s = (algebraMap R A) C'.s

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

Proof state:
case intro.intro.intro.t
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
h : Function.Injective ⇑(algebraMap R A)
C C' : VariableChange R
h1✝ : baseChange A C = baseChange A C'
left✝¹ : (algebraMap R A) C.r = (algebraMap R A) C'.r
left✝ : (algebraMap R A) C.s = (algebraMap R A) C'.s
right✝ : (algebraMap R A) C.t = (algebraMap R A) C'.t
h1 : ↑(algebraMap R A) ↑C.u = ↑(algebraMap R A) ↑C'.u
⊢ (algebraMap R A) C.t = (algebraMap R A) C'.t

Next tactic:
assumption
lemma baseChange_variableChange (C : VariableChange R) :
    (W.baseChange A).variableChange (C.baseChange A) = (W.variableChange C).baseChange A := by
  

Proof state:
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
⊢ (W.baseChange A).variableChange (VariableChange.baseChange A C) = (W.variableChange C).baseChange A

Next tactic:
simp only [baseChange, variableChange, VariableChange.baseChange]
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]
  

Proof state:
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₁ := (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₁)) }

Next tactic:
ext