l3lab/ntp-mathlib huggingface dataset:
/-- The group homomorphism from `W⟮F⟯` to `W⟮K⟯` induced by a base change from `F` to `K`. -/
@[simps]
def ofBaseChange : W⟮F⟯ →+ W⟮K⟯ where
  toFun := ofBaseChangeFun W F K
  map_zero' := rfl
  map_add' := by
    rintro (_ | @⟨x₁, y₁, _⟩) (_ | @⟨x₂, y₂, _⟩)
    any_goals rfl
    by_cases hx : x₁ = x₂
    · by_cases hy : y₁ = (W.baseChange F).toAffine.negY x₂ y₂
      · simp only [some_add_some_of_Yeq hx hy, ofBaseChangeFun]
        rw [some_add_some_of_Yeq <| congr_arg _ hx]
        · rw [hy, baseChange_negY_of_baseChange]
      · simp only [some_add_some_of_Yne hx hy, ofBaseChangeFun]
        rw [some_add_some_of_Yne <| congr_arg _ hx]
        · simp only [baseChange_addX_of_baseChange, baseChange_addY_of_baseChange,
            baseChange_slope_of_baseChange]
        · 

Proof state:
case neg
R✝ : Type u
inst✝¹³ : CommRing R✝
W✝ : Affine 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
R : Type u
inst✝⁶ : CommRing R
W : Affine R
F : Type v
inst✝⁵ : Field F
inst✝⁴ : Algebra R F
K : Type w
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : Algebra F K
inst✝ : IsScalarTower R F K
x₁ y₁ : F
h✝¹ : (W.baseChange F).nonsingular x₁ y₁
x₂ y₂ : F
h✝ : (W.baseChange F).nonsingular x₂ y₂
hx : x₁ = x₂
hy : ¬y₁ = (W.baseChange F).toAffine.negY x₂ y₂
⊢ (algebraMap F K) y₁ ≠ (W.baseChange K).negY ((algebraMap F K) x₂) ((algebraMap F K) y₂)

Next tactic:
rw [baseChange_negY_of_baseChange]
/-- The group homomorphism from `W⟮F⟯` to `W⟮K⟯` induced by a base change from `F` to `K`. -/
@[simps]
def ofBaseChange : W⟮F⟯ →+ W⟮K⟯ where
  toFun := ofBaseChangeFun W F K
  map_zero' := rfl
  map_add' := by
    rintro (_ | @⟨x₁, y₁, _⟩) (_ | @⟨x₂, y₂, _⟩)
    any_goals rfl
    by_cases hx : x₁ = x₂
    · by_cases hy : y₁ = (W.baseChange F).toAffine.negY x₂ y₂
      · simp only [some_add_some_of_Yeq hx hy, ofBaseChangeFun]
        rw [some_add_some_of_Yeq <| congr_arg _ hx]
        · rw [hy, baseChange_negY_of_baseChange]
      · simp only [some_add_some_of_Yne hx hy, ofBaseChangeFun]
        rw [some_add_some_of_Yne <| congr_arg _ hx]
        · simp only [baseChange_addX_of_baseChange, baseChange_addY_of_baseChange,
            baseChange_slope_of_baseChange]
        · rw [baseChange_negY_of_baseChange]
          

Proof state:
case neg
R✝ : Type u
inst✝¹³ : CommRing R✝
W✝ : Affine 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
R : Type u
inst✝⁶ : CommRing R
W : Affine R
F : Type v
inst✝⁵ : Field F
inst✝⁴ : Algebra R F
K : Type w
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : Algebra F K
inst✝ : IsScalarTower R F K
x₁ y₁ : F
h✝¹ : (W.baseChange F).nonsingular x₁ y₁
x₂ y₂ : F
h✝ : (W.baseChange F).nonsingular x₂ y₂
hx : x₁ = x₂
hy : ¬y₁ = (W.baseChange F).toAffine.negY x₂ y₂
⊢ (algebraMap F K) y₁ ≠ (algebraMap F K) ((W.baseChange F).toAffine.negY x₂ y₂)

Next tactic:
contrapose! hy
/-- The group homomorphism from `W⟮F⟯` to `W⟮K⟯` induced by a base change from `F` to `K`. -/
@[simps]
def ofBaseChange : W⟮F⟯ →+ W⟮K⟯ where
  toFun := ofBaseChangeFun W F K
  map_zero' := rfl
  map_add' := by
    rintro (_ | @⟨x₁, y₁, _⟩) (_ | @⟨x₂, y₂, _⟩)
    any_goals rfl
    by_cases hx : x₁ = x₂
    · by_cases hy : y₁ = (W.baseChange F).toAffine.negY x₂ y₂
      · simp only [some_add_some_of_Yeq hx hy, ofBaseChangeFun]
        rw [some_add_some_of_Yeq <| congr_arg _ hx]
        · rw [hy, baseChange_negY_of_baseChange]
      · simp only [some_add_some_of_Yne hx hy, ofBaseChangeFun]
        rw [some_add_some_of_Yne <| congr_arg _ hx]
        · simp only [baseChange_addX_of_baseChange, baseChange_addY_of_baseChange,
            baseChange_slope_of_baseChange]
        · rw [baseChange_negY_of_baseChange]
          contrapose! hy
          

Proof state:
case neg
R✝ : Type u
inst✝¹³ : CommRing R✝
W✝ : Affine 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
R : Type u
inst✝⁶ : CommRing R
W : Affine R
F : Type v
inst✝⁵ : Field F
inst✝⁴ : Algebra R F
K : Type w
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : Algebra F K
inst✝ : IsScalarTower R F K
x₁ y₁ : F
h✝¹ : (W.baseChange F).nonsingular x₁ y₁
x₂ y₂ : F
h✝ : (W.baseChange F).nonsingular x₂ y₂
hx : x₁ = x₂
hy : (algebraMap F K) y₁ = (algebraMap F K) ((W.baseChange F).toAffine.negY x₂ y₂)
⊢ y₁ = (W.baseChange F).toAffine.negY x₂ y₂

Next tactic:
exact NoZeroSMulDivisors.algebraMap_injective F K hy
/-- The group homomorphism from `W⟮F⟯` to `W⟮K⟯` induced by a base change from `F` to `K`. -/
@[simps]
def ofBaseChange : W⟮F⟯ →+ W⟮K⟯ where
  toFun := ofBaseChangeFun W F K
  map_zero' := rfl
  map_add' := by
    rintro (_ | @⟨x₁, y₁, _⟩) (_ | @⟨x₂, y₂, _⟩)
    any_goals rfl
    by_cases hx : x₁ = x₂
    · by_cases hy : y₁ = (W.baseChange F).toAffine.negY x₂ y₂
      · simp only [some_add_some_of_Yeq hx hy, ofBaseChangeFun]
        rw [some_add_some_of_Yeq <| congr_arg _ hx]
        · rw [hy, baseChange_negY_of_baseChange]
      · simp only [some_add_some_of_Yne hx hy, ofBaseChangeFun]
        rw [some_add_some_of_Yne <| congr_arg _ hx]
        · simp only [baseChange_addX_of_baseChange, baseChange_addY_of_baseChange,
            baseChange_slope_of_baseChange]
        · rw [baseChange_negY_of_baseChange]
          contrapose! hy
          exact NoZeroSMulDivisors.algebraMap_injective F K hy
    · 

Proof state:
case neg
R✝ : Type u
inst✝¹³ : CommRing R✝
W✝ : Affine 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
R : Type u
inst✝⁶ : CommRing R
W : Affine R
F : Type v
inst✝⁵ : Field F
inst✝⁴ : Algebra R F
K : Type w
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : Algebra F K
inst✝ : IsScalarTower R F K
x₁ y₁ : F
h✝¹ : (W.baseChange F).nonsingular x₁ y₁
x₂ y₂ : F
h✝ : (W.baseChange F).nonsingular x₂ y₂
hx : ¬x₁ = x₂
⊢ ZeroHom.toFun { toFun := ofBaseChangeFun W F K, map_zero' := (_ : ofBaseChangeFun W F K 0 = ofBaseChangeFun W F K 0) }
      (some h✝¹ + some h✝) =
    ZeroHom.toFun
        { toFun := ofBaseChangeFun W F K, map_zero' := (_ : ofBaseChangeFun W F K 0 = ofBaseChangeFun W F K 0) }
        (some h✝¹) +
      ZeroHom.toFun
        { toFun := ofBaseChangeFun W F K, map_zero' := (_ : ofBaseChangeFun W F K 0 = ofBaseChangeFun W F K 0) }
        (some h✝)

Next tactic:
simp only [some_add_some_of_Xne hx, ofBaseChangeFun]
/-- The group homomorphism from `W⟮F⟯` to `W⟮K⟯` induced by a base change from `F` to `K`. -/
@[simps]
def ofBaseChange : W⟮F⟯ →+ W⟮K⟯ where
  toFun := ofBaseChangeFun W F K
  map_zero' := rfl
  map_add' := by
    rintro (_ | @⟨x₁, y₁, _⟩) (_ | @⟨x₂, y₂, _⟩)
    any_goals rfl
    by_cases hx : x₁ = x₂
    · by_cases hy : y₁ = (W.baseChange F).toAffine.negY x₂ y₂
      · simp only [some_add_some_of_Yeq hx hy, ofBaseChangeFun]
        rw [some_add_some_of_Yeq <| congr_arg _ hx]
        · rw [hy, baseChange_negY_of_baseChange]
      · simp only [some_add_some_of_Yne hx hy, ofBaseChangeFun]
        rw [some_add_some_of_Yne <| congr_arg _ hx]
        · simp only [baseChange_addX_of_baseChange, baseChange_addY_of_baseChange,
            baseChange_slope_of_baseChange]
        · rw [baseChange_negY_of_baseChange]
          contrapose! hy
          exact NoZeroSMulDivisors.algebraMap_injective F K hy
    · simp only [some_add_some_of_Xne hx, ofBaseChangeFun]
      

Proof state:
case neg
R✝ : Type u
inst✝¹³ : CommRing R✝
W✝ : Affine 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
R : Type u
inst✝⁶ : CommRing R
W : Affine R
F : Type v
inst✝⁵ : Field F
inst✝⁴ : Algebra R F
K : Type w
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : Algebra F K
inst✝ : IsScalarTower R F K
x₁ y₁ : F
h✝¹ : (W.baseChange F).nonsingular x₁ y₁
x₂ y₂ : F
h✝ : (W.baseChange F).nonsingular x₂ y₂
hx : ¬x₁ = x₂
⊢ some
      (_ :
        (W.baseChange K).toAffine.nonsingular
          ((algebraMap F K) ((W.baseChange F).addX x₁ x₂ ((W.baseChange F).slope x₁ x₂ y₁ y₂)))
          ((algebraMap F K) ((W.baseChange F).addY x₁ x₂ y₁ ((W.baseChange F).slope x₁ x₂ y₁ y₂)))) =
    some (_ : (W.baseChange K).toAffine.nonsingular ((algebraMap F K) x₁) ((algebraMap F K) y₁)) +
      some (_ : (W.baseChange K).toAffine.nonsingular ((algebraMap F K) x₂) ((algebraMap F K) y₂))

Next tactic:
rw [some_add_some_of_Xne]
/-- The group homomorphism from `W⟮F⟯` to `W⟮K⟯` induced by a base change from `F` to `K`. -/
@[simps]
def ofBaseChange : W⟮F⟯ →+ W⟮K⟯ where
  toFun := ofBaseChangeFun W F K
  map_zero' := rfl
  map_add' := by
    rintro (_ | @⟨x₁, y₁, _⟩) (_ | @⟨x₂, y₂, _⟩)
    any_goals rfl
    by_cases hx : x₁ = x₂
    · by_cases hy : y₁ = (W.baseChange F).toAffine.negY x₂ y₂
      · simp only [some_add_some_of_Yeq hx hy, ofBaseChangeFun]
        rw [some_add_some_of_Yeq <| congr_arg _ hx]
        · rw [hy, baseChange_negY_of_baseChange]
      · simp only [some_add_some_of_Yne hx hy, ofBaseChangeFun]
        rw [some_add_some_of_Yne <| congr_arg _ hx]
        · simp only [baseChange_addX_of_baseChange, baseChange_addY_of_baseChange,
            baseChange_slope_of_baseChange]
        · rw [baseChange_negY_of_baseChange]
          contrapose! hy
          exact NoZeroSMulDivisors.algebraMap_injective F K hy
    · simp only [some_add_some_of_Xne hx, ofBaseChangeFun]
      rw [some_add_some_of_Xne]
      · 

Proof state:
case neg
R✝ : Type u
inst✝¹³ : CommRing R✝
W✝ : Affine 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
R : Type u
inst✝⁶ : CommRing R
W : Affine R
F : Type v
inst✝⁵ : Field F
inst✝⁴ : Algebra R F
K : Type w
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : Algebra F K
inst✝ : IsScalarTower R F K
x₁ y₁ : F
h✝¹ : (W.baseChange F).nonsingular x₁ y₁
x₂ y₂ : F
h✝ : (W.baseChange F).nonsingular x₂ y₂
hx : ¬x₁ = x₂
⊢ some
      (_ :
        (W.baseChange K).toAffine.nonsingular
          ((algebraMap F K) ((W.baseChange F).addX x₁ x₂ ((W.baseChange F).slope x₁ x₂ y₁ y₂)))
          ((algebraMap F K) ((W.baseChange F).addY x₁ x₂ y₁ ((W.baseChange F).slope x₁ x₂ y₁ y₂)))) =
    some
      (_ :
        (W.baseChange K).nonsingular
          ((W.baseChange K).addX ((algebraMap F K) x₁) ((algebraMap F K) x₂)
            ((W.baseChange K).slope ((algebraMap F K) x₁) ((algebraMap F K) x₂) ((algebraMap F K) y₁)
              ((algebraMap F K) y₂)))
          ((W.baseChange K).addY ((algebraMap F K) x₁) ((algebraMap F K) x₂) ((algebraMap F K) y₁)
            ((W.baseChange K).slope ((algebraMap F K) x₁) ((algebraMap F K) x₂) ((algebraMap F K) y₁)
              ((algebraMap F K) y₂))))

Next tactic:
simp only [baseChange_addX_of_baseChange, baseChange_addY_of_baseChange,
          baseChange_slope_of_baseChange]
/-- The group homomorphism from `W⟮F⟯` to `W⟮K⟯` induced by a base change from `F` to `K`. -/
@[simps]
def ofBaseChange : W⟮F⟯ →+ W⟮K⟯ where
  toFun := ofBaseChangeFun W F K
  map_zero' := rfl
  map_add' := by
    rintro (_ | @⟨x₁, y₁, _⟩) (_ | @⟨x₂, y₂, _⟩)
    any_goals rfl
    by_cases hx : x₁ = x₂
    · by_cases hy : y₁ = (W.baseChange F).toAffine.negY x₂ y₂
      · simp only [some_add_some_of_Yeq hx hy, ofBaseChangeFun]
        rw [some_add_some_of_Yeq <| congr_arg _ hx]
        · rw [hy, baseChange_negY_of_baseChange]
      · simp only [some_add_some_of_Yne hx hy, ofBaseChangeFun]
        rw [some_add_some_of_Yne <| congr_arg _ hx]
        · simp only [baseChange_addX_of_baseChange, baseChange_addY_of_baseChange,
            baseChange_slope_of_baseChange]
        · rw [baseChange_negY_of_baseChange]
          contrapose! hy
          exact NoZeroSMulDivisors.algebraMap_injective F K hy
    · simp only [some_add_some_of_Xne hx, ofBaseChangeFun]
      rw [some_add_some_of_Xne]
      · simp only [baseChange_addX_of_baseChange, baseChange_addY_of_baseChange,
          baseChange_slope_of_baseChange]
      · 

Proof state:
case neg
R✝ : Type u
inst✝¹³ : CommRing R✝
W✝ : Affine 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
R : Type u
inst✝⁶ : CommRing R
W : Affine R
F : Type v
inst✝⁵ : Field F
inst✝⁴ : Algebra R F
K : Type w
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : Algebra F K
inst✝ : IsScalarTower R F K
x₁ y₁ : F
h✝¹ : (W.baseChange F).nonsingular x₁ y₁
x₂ y₂ : F
h✝ : (W.baseChange F).nonsingular x₂ y₂
hx : ¬x₁ = x₂
⊢ (algebraMap F K) x₁ ≠ (algebraMap F K) x₂

Next tactic:
contrapose! hx
/-- The group homomorphism from `W⟮F⟯` to `W⟮K⟯` induced by a base change from `F` to `K`. -/
@[simps]
def ofBaseChange : W⟮F⟯ →+ W⟮K⟯ where
  toFun := ofBaseChangeFun W F K
  map_zero' := rfl
  map_add' := by
    rintro (_ | @⟨x₁, y₁, _⟩) (_ | @⟨x₂, y₂, _⟩)
    any_goals rfl
    by_cases hx : x₁ = x₂
    · by_cases hy : y₁ = (W.baseChange F).toAffine.negY x₂ y₂
      · simp only [some_add_some_of_Yeq hx hy, ofBaseChangeFun]
        rw [some_add_some_of_Yeq <| congr_arg _ hx]
        · rw [hy, baseChange_negY_of_baseChange]
      · simp only [some_add_some_of_Yne hx hy, ofBaseChangeFun]
        rw [some_add_some_of_Yne <| congr_arg _ hx]
        · simp only [baseChange_addX_of_baseChange, baseChange_addY_of_baseChange,
            baseChange_slope_of_baseChange]
        · rw [baseChange_negY_of_baseChange]
          contrapose! hy
          exact NoZeroSMulDivisors.algebraMap_injective F K hy
    · simp only [some_add_some_of_Xne hx, ofBaseChangeFun]
      rw [some_add_some_of_Xne]
      · simp only [baseChange_addX_of_baseChange, baseChange_addY_of_baseChange,
          baseChange_slope_of_baseChange]
      · contrapose! hx
        

Proof state:
case neg
R✝ : Type u
inst✝¹³ : CommRing R✝
W✝ : Affine 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
R : Type u
inst✝⁶ : CommRing R
W : Affine R
F : Type v
inst✝⁵ : Field F
inst✝⁴ : Algebra R F
K : Type w
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : Algebra F K
inst✝ : IsScalarTower R F K
x₁ y₁ : F
h✝¹ : (W.baseChange F).nonsingular x₁ y₁
x₂ y₂ : F
h✝ : (W.baseChange F).nonsingular x₂ y₂
hx : (algebraMap F K) x₁ = (algebraMap F K) x₂
⊢ x₁ = x₂

Next tactic:
exact NoZeroSMulDivisors.algebraMap_injective F K hx
lemma ofBaseChange_injective : Function.Injective <| ofBaseChange W F K := by
  

Proof state:
R✝ : Type u
inst✝¹³ : CommRing R✝
W✝ : Affine 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
R : Type u
inst✝⁶ : CommRing R
W : Affine R
F : Type v
inst✝⁵ : Field F
inst✝⁴ : Algebra R F
K : Type w
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : Algebra F K
inst✝ : IsScalarTower R F K
⊢ Function.Injective ⇑(ofBaseChange W F K)

Next tactic:
rintro (_ | _) (_ | _) h
lemma ofBaseChange_injective : Function.Injective <| ofBaseChange W F K := by
  rintro (_ | _) (_ | _) h
  

Proof state:
case zero.zero
R✝ : Type u
inst✝¹³ : CommRing R✝
W✝ : Affine 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
R : Type u
inst✝⁶ : CommRing R
W : Affine R
F : Type v
inst✝⁵ : Field F
inst✝⁴ : Algebra R F
K : Type w
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : Algebra F K
inst✝ : IsScalarTower R F K
h : (ofBaseChange W F K) zero = (ofBaseChange W F K) zero
⊢ zero = zero
case zero.some
R✝ : Type u
inst✝¹³ : CommRing R✝
W✝ : Affine 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
R : Type u
inst✝⁶ : CommRing R
W : Affine R
F : Type v
inst✝⁵ : Field F
inst✝⁴ : Algebra R F
K : Type w
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : Algebra F K
inst✝ : IsScalarTower R F K
x✝ y✝ : F
h✝ : (W.baseChange F).nonsingular x✝ y✝
h : (ofBaseChange W F K) zero = (ofBaseChange W F K) (some h✝)
⊢ zero = some h✝
case some.zero
R✝ : Type u
inst✝¹³ : CommRing R✝
W✝ : Affine 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
R : Type u
inst✝⁶ : CommRing R
W : Affine R
F : Type v
inst✝⁵ : Field F
inst✝⁴ : Algebra R F
K : Type w
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : Algebra F K
inst✝ : IsScalarTower R F K
x✝ y✝ : F
h✝ : (W.baseChange F).nonsingular x✝ y✝
h : (ofBaseChange W F K) (some h✝) = (ofBaseChange W F K) zero
⊢ some h✝ = zero
case some.some
R✝ : Type u
inst✝¹³ : CommRing R✝
W✝ : Affine 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
R : Type u
inst✝⁶ : CommRing R
W : Affine R
F : Type v
inst✝⁵ : Field F
inst✝⁴ : Algebra R F
K : Type w
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : Algebra F K
inst✝ : IsScalarTower R F K
x✝¹ y✝¹ : F
h✝¹ : (W.baseChange F).nonsingular x✝¹ y✝¹
x✝ y✝ : F
h✝ : (W.baseChange F).nonsingular x✝ y✝
h : (ofBaseChange W F K) (some h✝¹) = (ofBaseChange W F K) (some h✝)
⊢ some h✝¹ = some h✝

Next tactic:
any_goals contradiction
lemma ofBaseChange_injective : Function.Injective <| ofBaseChange W F K := by
  rintro (_ | _) (_ | _) h
  any_goals 

Proof state:
case zero.zero
R✝ : Type u
inst✝¹³ : CommRing R✝
W✝ : Affine 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
R : Type u
inst✝⁶ : CommRing R
W : Affine R
F : Type v
inst✝⁵ : Field F
inst✝⁴ : Algebra R F
K : Type w
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : Algebra F K
inst✝ : IsScalarTower R F K
h : (ofBaseChange W F K) zero = (ofBaseChange W F K) zero
⊢ zero = zero

Next tactic:
contradiction
lemma ofBaseChange_injective : Function.Injective <| ofBaseChange W F K := by
  rintro (_ | _) (_ | _) h
  any_goals 

Proof state:
case zero.some
R✝ : Type u
inst✝¹³ : CommRing R✝
W✝ : Affine 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
R : Type u
inst✝⁶ : CommRing R
W : Affine R
F : Type v
inst✝⁵ : Field F
inst✝⁴ : Algebra R F
K : Type w
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : Algebra F K
inst✝ : IsScalarTower R F K
x✝ y✝ : F
h✝ : (W.baseChange F).nonsingular x✝ y✝
h : (ofBaseChange W F K) zero = (ofBaseChange W F K) (some h✝)
⊢ zero = some h✝

Next tactic:
contradiction
lemma ofBaseChange_injective : Function.Injective <| ofBaseChange W F K := by
  rintro (_ | _) (_ | _) h
  any_goals 

Proof state:
case some.zero
R✝ : Type u
inst✝¹³ : CommRing R✝
W✝ : Affine 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
R : Type u
inst✝⁶ : CommRing R
W : Affine R
F : Type v
inst✝⁵ : Field F
inst✝⁴ : Algebra R F
K : Type w
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : Algebra F K
inst✝ : IsScalarTower R F K
x✝ y✝ : F
h✝ : (W.baseChange F).nonsingular x✝ y✝
h : (ofBaseChange W F K) (some h✝) = (ofBaseChange W F K) zero
⊢ some h✝ = zero

Next tactic:
contradiction
lemma ofBaseChange_injective : Function.Injective <| ofBaseChange W F K := by
  rintro (_ | _) (_ | _) h
  any_goals 

Proof state:
case some.some
R✝ : Type u
inst✝¹³ : CommRing R✝
W✝ : Affine 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
R : Type u
inst✝⁶ : CommRing R
W : Affine R
F : Type v
inst✝⁵ : Field F
inst✝⁴ : Algebra R F
K : Type w
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : Algebra F K
inst✝ : IsScalarTower R F K
x✝¹ y✝¹ : F
h✝¹ : (W.baseChange F).nonsingular x✝¹ y✝¹
x✝ y✝ : F
h✝ : (W.baseChange F).nonsingular x✝ y✝
h : (ofBaseChange W F K) (some h✝¹) = (ofBaseChange W F K) (some h✝)
⊢ some h✝¹ = some h✝

Next tactic:
contradiction
lemma ofBaseChange_injective : Function.Injective <| ofBaseChange W F K := by
  rintro (_ | _) (_ | _) h
  any_goals contradiction
  · 

Proof state:
case zero.zero
R✝ : Type u
inst✝¹³ : CommRing R✝
W✝ : Affine 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
R : Type u
inst✝⁶ : CommRing R
W : Affine R
F : Type v
inst✝⁵ : Field F
inst✝⁴ : Algebra R F
K : Type w
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : Algebra F K
inst✝ : IsScalarTower R F K
h : (ofBaseChange W F K) zero = (ofBaseChange W F K) zero
⊢ zero = zero

Next tactic:
rfl
lemma ofBaseChange_injective : Function.Injective <| ofBaseChange W F K := by
  rintro (_ | _) (_ | _) h
  any_goals contradiction
  · rfl
  · 

Proof state:
case some.some
R✝ : Type u
inst✝¹³ : CommRing R✝
W✝ : Affine 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
R : Type u
inst✝⁶ : CommRing R
W : Affine R
F : Type v
inst✝⁵ : Field F
inst✝⁴ : Algebra R F
K : Type w
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : Algebra F K
inst✝ : IsScalarTower R F K
x✝¹ y✝¹ : F
h✝¹ : (W.baseChange F).nonsingular x✝¹ y✝¹
x✝ y✝ : F
h✝ : (W.baseChange F).nonsingular x✝ y✝
h : (ofBaseChange W F K) (some h✝¹) = (ofBaseChange W F K) (some h✝)
⊢ some h✝¹ = some h✝

Next tactic:
simpa only [some.injEq] using ⟨NoZeroSMulDivisors.algebraMap_injective F K (some.inj h).left,
      NoZeroSMulDivisors.algebraMap_injective F K (some.inj h).right⟩
theorem nfpFamily_le_apply [Nonempty ι] (H : ∀ i, IsNormal (f i)) {a b} :
    (∃ i, nfpFamily.{u, v} f a ≤ f i b) ↔ nfpFamily.{u, v} f a ≤ b := by
  

Proof state:
ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
inst✝ : Nonempty ι
H : ∀ (i : ι), IsNormal (f i)
a b : Ordinal.{max u v}
⊢ (∃ i, nfpFamily f a ≤ f i b) ↔ nfpFamily f a ≤ b

Next tactic:
rw [← not_iff_not]
theorem nfpFamily_le_apply [Nonempty ι] (H : ∀ i, IsNormal (f i)) {a b} :
    (∃ i, nfpFamily.{u, v} f a ≤ f i b) ↔ nfpFamily.{u, v} f a ≤ b := by
  rw [← not_iff_not]
  

Proof state:
ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
inst✝ : Nonempty ι
H : ∀ (i : ι), IsNormal (f i)
a b : Ordinal.{max u v}
⊢ (¬∃ i, nfpFamily f a ≤ f i b) ↔ ¬nfpFamily f a ≤ b

Next tactic:
push_neg
theorem nfpFamily_le_apply [Nonempty ι] (H : ∀ i, IsNormal (f i)) {a b} :
    (∃ i, nfpFamily.{u, v} f a ≤ f i b) ↔ nfpFamily.{u, v} f a ≤ b := by
  rw [← not_iff_not]
  push_neg
  

Proof state:
ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
inst✝ : Nonempty ι
H : ∀ (i : ι), IsNormal (f i)
a b : Ordinal.{max u v}
⊢ (∀ (i : ι), f i b < nfpFamily f a) ↔ b < nfpFamily f a

Next tactic:
exact apply_lt_nfpFamily_iff H
theorem nfpFamily_le_fp (H : ∀ i, Monotone (f i)) {a b} (ab : a ≤ b) (h : ∀ i, f i b ≤ b) :
    nfpFamily.{u, v} f a ≤ b :=
  sup_le fun l => by
    

Proof state:
ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
H : ∀ (i : ι), Monotone (f i)
a b : Ordinal.{max u v}
ab : a ≤ b
h : ∀ (i : ι), f i b ≤ b
l : List ι
⊢ List.foldr f a l ≤ b

Next tactic:
by_cases hι : IsEmpty ι
theorem nfpFamily_le_fp (H : ∀ i, Monotone (f i)) {a b} (ab : a ≤ b) (h : ∀ i, f i b ≤ b) :
    nfpFamily.{u, v} f a ≤ b :=
  sup_le fun l => by
    by_cases hι : IsEmpty ι
    · 

Proof state:
case pos
ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
H : ∀ (i : ι), Monotone (f i)
a b : Ordinal.{max u v}
ab : a ≤ b
h : ∀ (i : ι), f i b ≤ b
l : List ι
hι : IsEmpty ι
⊢ List.foldr f a l ≤ b

Next tactic:
rwa [Unique.eq_default l]
theorem nfpFamily_le_fp (H : ∀ i, Monotone (f i)) {a b} (ab : a ≤ b) (h : ∀ i, f i b ≤ b) :
    nfpFamily.{u, v} f a ≤ b :=
  sup_le fun l => by
    by_cases hι : IsEmpty ι
    · rwa [Unique.eq_default l]
    · 

Proof state:
case neg
ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
H : ∀ (i : ι), Monotone (f i)
a b : Ordinal.{max u v}
ab : a ≤ b
h : ∀ (i : ι), f i b ≤ b
l : List ι
hι : ¬IsEmpty ι
⊢ List.foldr f a l ≤ b

Next tactic:
induction' l with i l IH generalizing a