[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.725, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
j : ℕ
⊢ ¬ComplexShape.Rel c 0 j
[PROOFSTEP]
intro hj
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.725, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
j : ℕ
hj : ComplexShape.Rel c 0 j
⊢ False
[PROOFSTEP]
dsimp at hj
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.725, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
j : ℕ
hj : j + 1 = 0
⊢ False
[PROOFSTEP]
apply Nat.not_succ_le_zero j
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.725, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
j : ℕ
hj : j + 1 = 0
⊢ Nat.succ j ≤ 0
[PROOFSTEP]
rw [Nat.succ_eq_add_one, hj]
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.35594, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q n m : ℕ
hnm : ComplexShape.Rel c m n
⊢ X.obj (op [n + 1]) = HomologicalComplex.X K[X] m
[PROOFSTEP]
congr
[GOAL]
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q n m : ℕ
hnq : n < q
hnm : ComplexShape.Rel c m n
⊢ hσ' q n m hnm = 0
[PROOFSTEP]
simp only [hσ', hσ]
[GOAL]
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q n m : ℕ
hnq : n < q
hnm : ComplexShape.Rel c m n
⊢ (if n < q then 0 else (-1) ^ (n - q) • σ X { val := n - q, isLt := (_ : n - q < Nat.succ n) }) ≫
      eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m])) =
    0
[PROOFSTEP]
split_ifs
[GOAL]
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q n m : ℕ
hnq : n < q
hnm : ComplexShape.Rel c m n
⊢ 0 ≫ eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m])) = 0
[PROOFSTEP]
exact zero_comp
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.71579, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q n a m : ℕ
ha : n = a + q
hnm : ComplexShape.Rel c m n
⊢ X.obj (op [n + 1]) = HomologicalComplex.X K[X] m
[PROOFSTEP]
congr
[GOAL]
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q n a m : ℕ
ha : n = a + q
hnm : ComplexShape.Rel c m n
⊢ hσ' q n m hnm =
    ((-1) ^ a • σ X { val := a, isLt := (_ : a < Nat.succ n) }) ≫ eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m]))
[PROOFSTEP]
simp only [hσ', hσ]
[GOAL]
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q n a m : ℕ
ha : n = a + q
hnm : ComplexShape.Rel c m n
⊢ (if n < q then 0 else (-1) ^ (n - q) • σ X { val := n - q, isLt := (_ : n - q < Nat.succ n) }) ≫
      eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m])) =
    ((-1) ^ a • σ X { val := a, isLt := (_ : a < Nat.succ n) }) ≫ eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m]))
[PROOFSTEP]
split_ifs
[GOAL]
case pos
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q n a m : ℕ
ha : n = a + q
hnm : ComplexShape.Rel c m n
h✝ : n < q
⊢ 0 ≫ eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m])) =
    ((-1) ^ a • σ X { val := a, isLt := (_ : a < Nat.succ n) }) ≫ eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m]))
[PROOFSTEP]
exfalso
[GOAL]
case pos.h
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q n a m : ℕ
ha : n = a + q
hnm : ComplexShape.Rel c m n
h✝ : n < q
⊢ False
[PROOFSTEP]
linarith
[GOAL]
case neg
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q n a m : ℕ
ha : n = a + q
hnm : ComplexShape.Rel c m n
h✝ : ¬n < q
⊢ ((-1) ^ (n - q) • σ X { val := n - q, isLt := (_ : n - q < Nat.succ n) }) ≫
      eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m])) =
    ((-1) ^ a • σ X { val := a, isLt := (_ : a < Nat.succ n) }) ≫ eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m]))
[PROOFSTEP]
have h' := tsub_eq_of_eq_add ha
[GOAL]
case neg
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q n a m : ℕ
ha : n = a + q
hnm : ComplexShape.Rel c m n
h✝ : ¬n < q
h' : n - q = a
⊢ ((-1) ^ (n - q) • σ X { val := n - q, isLt := (_ : n - q < Nat.succ n) }) ≫
      eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m])) =
    ((-1) ^ a • σ X { val := a, isLt := (_ : a < Nat.succ n) }) ≫ eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m]))
[PROOFSTEP]
congr
[GOAL]
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q n a : ℕ
ha : n = a + q
⊢ hσ' q n (n + 1) (_ : n + 1 = n + 1) = (-1) ^ a • σ X { val := a, isLt := (_ : a < Nat.succ n) }
[PROOFSTEP]
rw [hσ'_eq ha rfl, eqToHom_refl, comp_id]
[GOAL]
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q : ℕ
⊢ HomologicalComplex.Hom.f (Hσ q) 0 = 0
[PROOFSTEP]
unfold Hσ
[GOAL]
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q : ℕ
⊢ HomologicalComplex.Hom.f (nullHomotopicMap' (hσ' q)) 0 = 0
[PROOFSTEP]
rw [nullHomotopicMap'_f_of_not_rel_left (c_mk 1 0 rfl) cs_down_0_not_rel_left]
[GOAL]
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q : ℕ
⊢ hσ' q 0 1 (_ : ComplexShape.Rel c 1 0) ≫ HomologicalComplex.d K[X] 1 0 = 0
[PROOFSTEP]
rcases q with (_ | q)
[GOAL]
case zero
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
⊢ hσ' Nat.zero 0 1 (_ : ComplexShape.Rel c 1 0) ≫ HomologicalComplex.d K[X] 1 0 = 0
[PROOFSTEP]
rw [hσ'_eq (show 0 = 0 + 0 by rfl) (c_mk 1 0 rfl)]
[GOAL]
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
⊢ 0 = 0 + 0
[PROOFSTEP]
rfl
[GOAL]
case zero
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
⊢ (((-1) ^ 0 • σ X { val := 0, isLt := (_ : 0 < Nat.succ 0) }) ≫ eqToHom (_ : X.obj (op [0 + 1]) = X.obj (op [1]))) ≫
      HomologicalComplex.d K[X] 1 0 =
    0
[PROOFSTEP]
simp only [pow_zero, Fin.mk_zero, one_zsmul, eqToHom_refl, Category.comp_id]
[GOAL]
case zero
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
⊢ σ X 0 ≫ HomologicalComplex.d K[X] 1 0 = 0
[PROOFSTEP]
erw [ChainComplex.of_d]
[GOAL]
case zero
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
⊢ σ X 0 ≫ AlternatingFaceMapComplex.objD X 0 = 0
[PROOFSTEP]
rw [AlternatingFaceMapComplex.objD, Fin.sum_univ_two, Fin.val_zero, Fin.val_one, pow_zero, pow_one, one_smul, neg_smul,
  one_smul, comp_add, comp_neg, add_neg_eq_zero]
[GOAL]
case zero
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
⊢ σ X 0 ≫ δ X 0 = σ X 0 ≫ δ X 1
[PROOFSTEP]
erw [δ_comp_σ_self, δ_comp_σ_succ]
[GOAL]
case succ
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q : ℕ
⊢ hσ' (Nat.succ q) 0 1 (_ : ComplexShape.Rel c 1 0) ≫ HomologicalComplex.d K[X] 1 0 = 0
[PROOFSTEP]
rw [hσ'_eq_zero (Nat.succ_pos q) (c_mk 1 0 rfl), zero_comp]
[GOAL]
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n m : ℕ
hnm : ComplexShape.Rel c m n
X Y : SimplicialObject C
f : X ⟶ Y
⊢ NatTrans.app f (op [n]) ≫ hσ' q n m hnm = hσ' q n m hnm ≫ NatTrans.app f (op [m])
[PROOFSTEP]
have h : n + 1 = m := hnm
[GOAL]
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n m : ℕ
hnm : ComplexShape.Rel c m n
X Y : SimplicialObject C
f : X ⟶ Y
h : n + 1 = m
⊢ NatTrans.app f (op [n]) ≫ hσ' q n m hnm = hσ' q n m hnm ≫ NatTrans.app f (op [m])
[PROOFSTEP]
subst h
[GOAL]
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n : ℕ
X Y : SimplicialObject C
f : X ⟶ Y
hnm : ComplexShape.Rel c (n + 1) n
⊢ NatTrans.app f (op [n]) ≫ hσ' q n (n + 1) hnm = hσ' q n (n + 1) hnm ≫ NatTrans.app f (op [n + 1])
[PROOFSTEP]
simp only [hσ', eqToHom_refl, comp_id]
[GOAL]
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n : ℕ
X Y : SimplicialObject C
f : X ⟶ Y
hnm : ComplexShape.Rel c (n + 1) n
⊢ NatTrans.app f (op [n]) ≫ hσ q n = hσ q n ≫ NatTrans.app f (op [n + 1])
[PROOFSTEP]
unfold hσ
[GOAL]
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n : ℕ
X Y : SimplicialObject C
f : X ⟶ Y
hnm : ComplexShape.Rel c (n + 1) n
⊢ (NatTrans.app f (op [n]) ≫
      if n < q then 0 else (-1) ^ (n - q) • σ Y { val := n - q, isLt := (_ : n - q < Nat.succ n) }) =
    (if n < q then 0 else (-1) ^ (n - q) • σ X { val := n - q, isLt := (_ : n - q < Nat.succ n) }) ≫
      NatTrans.app f (op [n + 1])
[PROOFSTEP]
split_ifs
[GOAL]
case pos
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n : ℕ
X Y : SimplicialObject C
f : X ⟶ Y
hnm : ComplexShape.Rel c (n + 1) n
h✝ : n < q
⊢ NatTrans.app f (op [n]) ≫ 0 = 0 ≫ NatTrans.app f (op [n + 1])
[PROOFSTEP]
rw [zero_comp, comp_zero]
[GOAL]
case neg
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n : ℕ
X Y : SimplicialObject C
f : X ⟶ Y
hnm : ComplexShape.Rel c (n + 1) n
h✝ : ¬n < q
⊢ NatTrans.app f (op [n]) ≫ ((-1) ^ (n - q) • σ Y { val := n - q, isLt := (_ : n - q < Nat.succ n) }) =
    ((-1) ^ (n - q) • σ X { val := n - q, isLt := (_ : n - q < Nat.succ n) }) ≫ NatTrans.app f (op [n + 1])
[PROOFSTEP]
simp only [zsmul_comp, comp_zsmul]
[GOAL]
case neg
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n : ℕ
X Y : SimplicialObject C
f : X ⟶ Y
hnm : ComplexShape.Rel c (n + 1) n
h✝ : ¬n < q
⊢ (-1) ^ (n - q) • NatTrans.app f (op [n]) ≫ σ Y { val := n - q, isLt := (_ : n - q < Nat.succ n) } =
    (-1) ^ (n - q) • σ X { val := n - q, isLt := (_ : n - q < Nat.succ n) } ≫ NatTrans.app f (op [n + 1])
[PROOFSTEP]
erw [f.naturality]
[GOAL]
case neg
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n : ℕ
X Y : SimplicialObject C
f : X ⟶ Y
hnm : ComplexShape.Rel c (n + 1) n
h✝ : ¬n < q
⊢ (-1) ^ (n - q) • NatTrans.app f (op [n]) ≫ σ Y { val := n - q, isLt := (_ : n - q < Nat.succ n) } =
    (-1) ^ (n - q) •
      NatTrans.app f (op [n]) ≫ Y.map (SimplexCategory.σ { val := n - q, isLt := (_ : n - q < Nat.succ n) }).op
[PROOFSTEP]
rfl
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.259122, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q : ℕ
x✝¹ x✝ : SimplicialObject C
f : x✝¹ ⟶ x✝
⊢ (alternatingFaceMapComplex C).map f ≫ (fun X => Hσ q) x✝ = (fun X => Hσ q) x✝¹ ≫ (alternatingFaceMapComplex C).map f
[PROOFSTEP]
unfold Hσ
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.259122, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q : ℕ
x✝¹ x✝ : SimplicialObject C
f : x✝¹ ⟶ x✝
⊢ (alternatingFaceMapComplex C).map f ≫ (fun X => nullHomotopicMap' (hσ' q)) x✝ =
    (fun X => nullHomotopicMap' (hσ' q)) x✝¹ ≫ (alternatingFaceMapComplex C).map f
[PROOFSTEP]
rw [nullHomotopicMap'_comp, comp_nullHomotopicMap']
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.259122, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q : ℕ
x✝¹ x✝ : SimplicialObject C
f : x✝¹ ⟶ x✝
⊢ (nullHomotopicMap' fun i j hij => HomologicalComplex.Hom.f ((alternatingFaceMapComplex C).map f) i ≫ hσ' q i j hij) =
    nullHomotopicMap' fun i j hij => hσ' q i j hij ≫ HomologicalComplex.Hom.f ((alternatingFaceMapComplex C).map f) j
[PROOFSTEP]
congr
[GOAL]
case e_h
C : Type u_1
inst✝¹ : Category.{?u.259122, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q : ℕ
x✝¹ x✝ : SimplicialObject C
f : x✝¹ ⟶ x✝
⊢ (fun i j hij => HomologicalComplex.Hom.f ((alternatingFaceMapComplex C).map f) i ≫ hσ' q i j hij) = fun i j hij =>
    hσ' q i j hij ≫ HomologicalComplex.Hom.f ((alternatingFaceMapComplex C).map f) j
[PROOFSTEP]
ext n m hnm
[GOAL]
case e_h.h.h.h
C : Type u_1
inst✝¹ : Category.{?u.259122, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q : ℕ
x✝¹ x✝ : SimplicialObject C
f : x✝¹ ⟶ x✝
n m : ℕ
hnm : ComplexShape.Rel (ComplexShape.down ℕ) m n
⊢ HomologicalComplex.Hom.f ((alternatingFaceMapComplex C).map f) n ≫ hσ' q n m hnm =
    hσ' q n m hnm ≫ HomologicalComplex.Hom.f ((alternatingFaceMapComplex C).map f) m
[PROOFSTEP]
simp only [alternatingFaceMapComplex_map_f, hσ'_naturality]
[GOAL]
C : Type u_1
inst✝⁴ : Category.{u_4, u_1} C
inst✝³ : Preadditive C
X✝ : SimplicialObject C
D : Type u_2
inst✝² : Category.{u_3, u_2} D
inst✝¹ : Preadditive D
G : C ⥤ D
inst✝ : Functor.Additive G
X : SimplicialObject C
q n m : ℕ
hnm : ComplexShape.Rel c m n
⊢ hσ' q n m hnm = G.map (hσ' q n m hnm)
[PROOFSTEP]
unfold hσ' hσ
[GOAL]
C : Type u_1
inst✝⁴ : Category.{u_4, u_1} C
inst✝³ : Preadditive C
X✝ : SimplicialObject C
D : Type u_2
inst✝² : Category.{u_3, u_2} D
inst✝¹ : Preadditive D
G : C ⥤ D
inst✝ : Functor.Additive G
X : SimplicialObject C
q n m : ℕ
hnm : ComplexShape.Rel c m n
⊢ (if n < q then 0
      else (-1) ^ (n - q) • σ (((whiskering C D).obj G).obj X) { val := n - q, isLt := (_ : n - q < Nat.succ n) }) ≫
      eqToHom (_ : (((whiskering C D).obj G).obj X).obj (op [n + 1]) = (((whiskering C D).obj G).obj X).obj (op [m])) =
    G.map
      ((if n < q then 0 else (-1) ^ (n - q) • σ X { val := n - q, isLt := (_ : n - q < Nat.succ n) }) ≫
        eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m])))
[PROOFSTEP]
split_ifs
[GOAL]
case pos
C : Type u_1
inst✝⁴ : Category.{u_4, u_1} C
inst✝³ : Preadditive C
X✝ : SimplicialObject C
D : Type u_2
inst✝² : Category.{u_3, u_2} D
inst✝¹ : Preadditive D
G : C ⥤ D
inst✝ : Functor.Additive G
X : SimplicialObject C
q n m : ℕ
hnm : ComplexShape.Rel c m n
h✝ : n < q
⊢ 0 ≫ eqToHom (_ : (((whiskering C D).obj G).obj X).obj (op [n + 1]) = (((whiskering C D).obj G).obj X).obj (op [m])) =
    G.map (0 ≫ eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m])))
[PROOFSTEP]
simp only [Functor.map_zero, zero_comp]
[GOAL]
case neg
C : Type u_1
inst✝⁴ : Category.{u_4, u_1} C
inst✝³ : Preadditive C
X✝ : SimplicialObject C
D : Type u_2
inst✝² : Category.{u_3, u_2} D
inst✝¹ : Preadditive D
G : C ⥤ D
inst✝ : Functor.Additive G
X : SimplicialObject C
q n m : ℕ
hnm : ComplexShape.Rel c m n
h✝ : ¬n < q
⊢ ((-1) ^ (n - q) • σ (((whiskering C D).obj G).obj X) { val := n - q, isLt := (_ : n - q < Nat.succ n) }) ≫
      eqToHom (_ : (((whiskering C D).obj G).obj X).obj (op [n + 1]) = (((whiskering C D).obj G).obj X).obj (op [m])) =
    G.map
      (((-1) ^ (n - q) • σ X { val := n - q, isLt := (_ : n - q < Nat.succ n) }) ≫
        eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m])))
[PROOFSTEP]
simp only [eqToHom_map, Functor.map_comp, Functor.map_zsmul]
[GOAL]
case neg
C : Type u_1
inst✝⁴ : Category.{u_4, u_1} C
inst✝³ : Preadditive C
X✝ : SimplicialObject C
D : Type u_2
inst✝² : Category.{u_3, u_2} D
inst✝¹ : Preadditive D
G : C ⥤ D
inst✝ : Functor.Additive G
X : SimplicialObject C
q n m : ℕ
hnm : ComplexShape.Rel c m n
h✝ : ¬n < q
⊢ ((-1) ^ (n - q) • σ (((whiskering C D).obj G).obj X) { val := n - q, isLt := (_ : n - q < Nat.succ n) }) ≫
      eqToHom (_ : (((whiskering C D).obj G).obj X).obj (op [n + 1]) = (((whiskering C D).obj G).obj X).obj (op [m])) =
    ((-1) ^ (n - q) • G.map (σ X { val := n - q, isLt := (_ : n - q < Nat.succ n) })) ≫
      eqToHom (_ : G.obj (X.obj (op [n + 1])) = G.obj (HomologicalComplex.X K[X] m))
[PROOFSTEP]
rfl
[GOAL]
C : Type u_1
inst✝⁴ : Category.{u_4, u_1} C
inst✝³ : Preadditive C
X✝ : SimplicialObject C
D : Type u_2
inst✝² : Category.{u_3, u_2} D
inst✝¹ : Preadditive D
G : C ⥤ D
inst✝ : Functor.Additive G
X : SimplicialObject C
q n : ℕ
⊢ HomologicalComplex.Hom.f (Hσ q) n = G.map (HomologicalComplex.Hom.f (Hσ q) n)
[PROOFSTEP]
unfold Hσ
[GOAL]
C : Type u_1
inst✝⁴ : Category.{u_4, u_1} C
inst✝³ : Preadditive C
X✝ : SimplicialObject C
D : Type u_2
inst✝² : Category.{u_3, u_2} D
inst✝¹ : Preadditive D
G : C ⥤ D
inst✝ : Functor.Additive G
X : SimplicialObject C
q n : ℕ
⊢ HomologicalComplex.Hom.f (nullHomotopicMap' (hσ' q)) n =
    G.map (HomologicalComplex.Hom.f (nullHomotopicMap' (hσ' q)) n)
[PROOFSTEP]
have eq := HomologicalComplex.congr_hom (map_nullHomotopicMap' G (@hσ' _ _ _ X q)) n
[GOAL]
C : Type u_1
inst✝⁴ : Category.{u_4, u_1} C
inst✝³ : Preadditive C
X✝ : SimplicialObject C
D : Type u_2
inst✝² : Category.{u_3, u_2} D
inst✝¹ : Preadditive D
G : C ⥤ D
inst✝ : Functor.Additive G
X : SimplicialObject C
q n : ℕ
eq :
  HomologicalComplex.Hom.f ((Functor.mapHomologicalComplex G c).map (nullHomotopicMap' (hσ' q))) n =
    HomologicalComplex.Hom.f (nullHomotopicMap' fun i j hij => G.map (hσ' q i j hij)) n
⊢ HomologicalComplex.Hom.f (nullHomotopicMap' (hσ' q)) n =
    G.map (HomologicalComplex.Hom.f (nullHomotopicMap' (hσ' q)) n)
[PROOFSTEP]
simp only [Functor.mapHomologicalComplex_map_f, ← map_hσ'] at eq
[GOAL]
C : Type u_1
inst✝⁴ : Category.{u_4, u_1} C
inst✝³ : Preadditive C
X✝ : SimplicialObject C
D : Type u_2
inst✝² : Category.{u_3, u_2} D
inst✝¹ : Preadditive D
G : C ⥤ D
inst✝ : Functor.Additive G
X : SimplicialObject C
q n : ℕ
eq :
  G.map (HomologicalComplex.Hom.f (nullHomotopicMap' (hσ' q)) n) =
    HomologicalComplex.Hom.f (nullHomotopicMap' fun i j hij => hσ' q i j hij) n
⊢ HomologicalComplex.Hom.f (nullHomotopicMap' (hσ' q)) n =
    G.map (HomologicalComplex.Hom.f (nullHomotopicMap' (hσ' q)) n)
[PROOFSTEP]
rw [eq]
[GOAL]
C : Type u_1
inst✝⁴ : Category.{u_4, u_1} C
inst✝³ : Preadditive C
X✝ : SimplicialObject C
D : Type u_2
inst✝² : Category.{u_3, u_2} D
inst✝¹ : Preadditive D
G : C ⥤ D
inst✝ : Functor.Additive G
X : SimplicialObject C
q n : ℕ
eq :
  G.map (HomologicalComplex.Hom.f (nullHomotopicMap' (hσ' q)) n) =
    HomologicalComplex.Hom.f (nullHomotopicMap' fun i j hij => hσ' q i j hij) n
⊢ HomologicalComplex.Hom.f (nullHomotopicMap' (hσ' q)) n =
    HomologicalComplex.Hom.f (nullHomotopicMap' fun i j hij => hσ' q i j hij) n
[PROOFSTEP]
let h := (Functor.congr_obj (map_alternatingFaceMapComplex G) X).symm
[GOAL]
C : Type u_1
inst✝⁴ : Category.{u_4, u_1} C
inst✝³ : Preadditive C
X✝ : SimplicialObject C
D : Type u_2
inst✝² : Category.{u_3, u_2} D
inst✝¹ : Preadditive D
G : C ⥤ D
inst✝ : Functor.Additive G
X : SimplicialObject C
q n : ℕ
eq :
  G.map (HomologicalComplex.Hom.f (nullHomotopicMap' (hσ' q)) n) =
    HomologicalComplex.Hom.f (nullHomotopicMap' fun i j hij => hσ' q i j hij) n
h : ((whiskering C D).obj G ⋙ alternatingFaceMapComplex D).obj X =
  (alternatingFaceMapComplex C ⋙ Functor.mapHomologicalComplex G (ComplexShape.down ℕ)).obj X :=
  Eq.symm (Functor.congr_obj (map_alternatingFaceMapComplex G) X)
⊢ HomologicalComplex.Hom.f (nullHomotopicMap' (hσ' q)) n =
    HomologicalComplex.Hom.f (nullHomotopicMap' fun i j hij => hσ' q i j hij) n
[PROOFSTEP]
congr


[GOAL]
X : Scheme
inst✝ : IrreducibleSpace ↑↑X.toPresheafedSpace
U : Opens ↑↑X.toPresheafedSpace
h : Nonempty { x // x ∈ U }
⊢ Set.Nonempty (⊤ ∩ ↑U)
[PROOFSTEP]
simpa using h
[GOAL]
X : Scheme
inst✝ : IsIntegral X
⊢ Field ↑(Scheme.functionField X)
[PROOFSTEP]
apply fieldOfIsUnitOrEqZero
[GOAL]
case h
X : Scheme
inst✝ : IsIntegral X
⊢ ∀ (a : ↑(Scheme.functionField X)), IsUnit a ∨ a = 0
[PROOFSTEP]
intro a
[GOAL]
case h
X : Scheme
inst✝ : IsIntegral X
a : ↑(Scheme.functionField X)
⊢ IsUnit a ∨ a = 0
[PROOFSTEP]
obtain ⟨U, m, s, rfl⟩ := TopCat.Presheaf.germ_exist _ _ a
[GOAL]
case h.intro.intro.intro
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
m : genericPoint ↑↑X.toPresheafedSpace ∈ U
s : (forget CommRingCat).obj (X.presheaf.obj (op U))
⊢ IsUnit (↑(Presheaf.germ X.presheaf { val := genericPoint ↑↑X.toPresheafedSpace, property := m }) s) ∨
    ↑(Presheaf.germ X.presheaf { val := genericPoint ↑↑X.toPresheafedSpace, property := m }) s = 0
[PROOFSTEP]
rw [or_iff_not_imp_right, ← (X.presheaf.germ ⟨_, m⟩).map_zero]
[GOAL]
case h.intro.intro.intro
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
m : genericPoint ↑↑X.toPresheafedSpace ∈ U
s : (forget CommRingCat).obj (X.presheaf.obj (op U))
⊢ ¬↑(Presheaf.germ X.presheaf { val := genericPoint ↑↑X.toPresheafedSpace, property := m }) s =
        ↑(Presheaf.germ X.presheaf { val := genericPoint ↑↑X.toPresheafedSpace, property := m }) 0 →
    IsUnit (↑(Presheaf.germ X.presheaf { val := genericPoint ↑↑X.toPresheafedSpace, property := m }) s)
[PROOFSTEP]
intro ha
[GOAL]
case h.intro.intro.intro
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
m : genericPoint ↑↑X.toPresheafedSpace ∈ U
s : (forget CommRingCat).obj (X.presheaf.obj (op U))
ha :
  ¬↑(Presheaf.germ X.presheaf { val := genericPoint ↑↑X.toPresheafedSpace, property := m }) s =
      ↑(Presheaf.germ X.presheaf { val := genericPoint ↑↑X.toPresheafedSpace, property := m }) 0
⊢ IsUnit (↑(Presheaf.germ X.presheaf { val := genericPoint ↑↑X.toPresheafedSpace, property := m }) s)
[PROOFSTEP]
replace ha := ne_of_apply_ne _ ha
[GOAL]
case h.intro.intro.intro
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
m : genericPoint ↑↑X.toPresheafedSpace ∈ U
s : (forget CommRingCat).obj (X.presheaf.obj (op U))
ha : s ≠ 0
⊢ IsUnit (↑(Presheaf.germ X.presheaf { val := genericPoint ↑↑X.toPresheafedSpace, property := m }) s)
[PROOFSTEP]
have hs : genericPoint X.carrier ∈ RingedSpace.basicOpen _ s :=
  by
  rw [← SetLike.mem_coe, (genericPoint_spec X.carrier).mem_open_set_iff, Set.top_eq_univ, Set.univ_inter,
    Set.nonempty_iff_ne_empty, Ne.def, ← Opens.coe_bot, ← SetLike.ext'_iff]
  erw [basicOpen_eq_bot_iff]
  exacts [ha, (RingedSpace.basicOpen _ _).isOpen]
[GOAL]
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
m : genericPoint ↑↑X.toPresheafedSpace ∈ U
s : (forget CommRingCat).obj (X.presheaf.obj (op U))
ha : s ≠ 0
⊢ genericPoint ↑↑X.toPresheafedSpace ∈ RingedSpace.basicOpen X.toSheafedSpace s
[PROOFSTEP]
rw [← SetLike.mem_coe, (genericPoint_spec X.carrier).mem_open_set_iff, Set.top_eq_univ, Set.univ_inter,
  Set.nonempty_iff_ne_empty, Ne.def, ← Opens.coe_bot, ← SetLike.ext'_iff]
[GOAL]
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
m : genericPoint ↑↑X.toPresheafedSpace ∈ U
s : (forget CommRingCat).obj (X.presheaf.obj (op U))
ha : s ≠ 0
⊢ ¬RingedSpace.basicOpen X.toSheafedSpace s = ⊥
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
m : genericPoint ↑↑X.toPresheafedSpace ∈ U
s : (forget CommRingCat).obj (X.presheaf.obj (op U))
ha : s ≠ 0
⊢ IsOpen ↑(RingedSpace.basicOpen X.toSheafedSpace s)
[PROOFSTEP]
erw [basicOpen_eq_bot_iff]
[GOAL]
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
m : genericPoint ↑↑X.toPresheafedSpace ∈ U
s : (forget CommRingCat).obj (X.presheaf.obj (op U))
ha : s ≠ 0
⊢ ¬s = 0
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
m : genericPoint ↑↑X.toPresheafedSpace ∈ U
s : (forget CommRingCat).obj (X.presheaf.obj (op U))
ha : s ≠ 0
⊢ IsOpen ↑(RingedSpace.basicOpen X.toSheafedSpace s)
[PROOFSTEP]
exacts [ha, (RingedSpace.basicOpen _ _).isOpen]
[GOAL]
case h.intro.intro.intro
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
m : genericPoint ↑↑X.toPresheafedSpace ∈ U
s : (forget CommRingCat).obj (X.presheaf.obj (op U))
ha : s ≠ 0
hs : genericPoint ↑↑X.toPresheafedSpace ∈ RingedSpace.basicOpen X.toSheafedSpace s
⊢ IsUnit (↑(Presheaf.germ X.presheaf { val := genericPoint ↑↑X.toPresheafedSpace, property := m }) s)
[PROOFSTEP]
have := (X.presheaf.germ ⟨_, hs⟩).isUnit_map (RingedSpace.isUnit_res_basicOpen _ s)
[GOAL]
case h.intro.intro.intro
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
m : genericPoint ↑↑X.toPresheafedSpace ∈ U
s : (forget CommRingCat).obj (X.presheaf.obj (op U))
ha : s ≠ 0
hs : genericPoint ↑↑X.toPresheafedSpace ∈ RingedSpace.basicOpen X.toSheafedSpace s
this :
  IsUnit
    (↑(Presheaf.germ X.presheaf { val := genericPoint ↑↑X.toPresheafedSpace, property := hs })
      (↑(X.presheaf.map (homOfLE (_ : RingedSpace.basicOpen X.toSheafedSpace s ≤ U)).op) s))
⊢ IsUnit (↑(Presheaf.germ X.presheaf { val := genericPoint ↑↑X.toPresheafedSpace, property := m }) s)
[PROOFSTEP]
rwa [TopCat.Presheaf.germ_res_apply] at this
[GOAL]
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
x : { x // x ∈ U }
⊢ Function.Injective ↑(Presheaf.germ X.presheaf x)
[PROOFSTEP]
rw [injective_iff_map_eq_zero]
[GOAL]
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
x : { x // x ∈ U }
⊢ ∀ (a : (forget CommRingCat).obj (X.presheaf.obj (op U))), ↑(Presheaf.germ X.presheaf x) a = 0 → a = 0
[PROOFSTEP]
intro y hy
[GOAL]
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
x : { x // x ∈ U }
y : (forget CommRingCat).obj (X.presheaf.obj (op U))
hy : ↑(Presheaf.germ X.presheaf x) y = 0
⊢ y = 0
[PROOFSTEP]
rw [← (X.presheaf.germ x).map_zero] at hy
[GOAL]
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
x : { x // x ∈ U }
y : (forget CommRingCat).obj (X.presheaf.obj (op U))
hy : ↑(Presheaf.germ X.presheaf x) y = ↑(Presheaf.germ X.presheaf x) 0
⊢ y = 0
[PROOFSTEP]
obtain ⟨W, hW, iU, iV, e⟩ := X.presheaf.germ_eq _ x.prop x.prop _ _ hy
[GOAL]
case intro.intro.intro.intro
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
x : { x // x ∈ U }
y : (forget CommRingCat).obj (X.presheaf.obj (op U))
hy : ↑(Presheaf.germ X.presheaf x) y = ↑(Presheaf.germ X.presheaf x) 0
W : Opens ↑↑X.toPresheafedSpace
hW : ↑x ∈ W
iU iV : W ⟶ U
e : ↑(X.presheaf.map iU.op) y = ↑(X.presheaf.map iV.op) 0
⊢ y = 0
[PROOFSTEP]
cases show iU = iV from Subsingleton.elim _ _
[GOAL]
case intro.intro.intro.intro.refl
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
x : { x // x ∈ U }
y : (forget CommRingCat).obj (X.presheaf.obj (op U))
hy : ↑(Presheaf.germ X.presheaf x) y = ↑(Presheaf.germ X.presheaf x) 0
W : Opens ↑↑X.toPresheafedSpace
hW : ↑x ∈ W
iU : W ⟶ U
e : ↑(X.presheaf.map iU.op) y = ↑(X.presheaf.map iU.op) 0
⊢ y = 0
[PROOFSTEP]
haveI : Nonempty W := ⟨⟨_, hW⟩⟩
[GOAL]
case intro.intro.intro.intro.refl
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
x : { x // x ∈ U }
y : (forget CommRingCat).obj (X.presheaf.obj (op U))
hy : ↑(Presheaf.germ X.presheaf x) y = ↑(Presheaf.germ X.presheaf x) 0
W : Opens ↑↑X.toPresheafedSpace
hW : ↑x ∈ W
iU : W ⟶ U
e : ↑(X.presheaf.map iU.op) y = ↑(X.presheaf.map iU.op) 0
this : Nonempty { x // x ∈ W }
⊢ y = 0
[PROOFSTEP]
exact map_injective_of_isIntegral X iU e
[GOAL]
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
hX : IrreducibleSpace ↑↑X.toPresheafedSpace
inst✝ : IrreducibleSpace ↑↑Y.toPresheafedSpace
⊢ ↑f.val.base (genericPoint ↑↑X.toPresheafedSpace) = genericPoint ↑↑Y.toPresheafedSpace
[PROOFSTEP]
apply ((genericPoint_spec Y).eq _).symm
[GOAL]
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
hX : IrreducibleSpace ↑↑X.toPresheafedSpace
inst✝ : IrreducibleSpace ↑↑Y.toPresheafedSpace
⊢ IsGenericPoint (↑f.val.base (genericPoint ↑↑X.toPresheafedSpace)) ⊤
[PROOFSTEP]
convert (genericPoint_spec X.carrier).image (show Continuous f.1.base from ContinuousMap.continuous_toFun _)
[GOAL]
case h.e'_4.h
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
hX : IrreducibleSpace ↑↑X.toPresheafedSpace
inst✝ : IrreducibleSpace ↑↑Y.toPresheafedSpace
e_1✝ : ↑↑Y.toPresheafedSpace = (forget TopCat).obj ↑Y.toPresheafedSpace
⊢ ⊤ = closure (↑f.val.base '' ⊤)
[PROOFSTEP]
symm
[GOAL]
case h.e'_4.h
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
hX : IrreducibleSpace ↑↑X.toPresheafedSpace
inst✝ : IrreducibleSpace ↑↑Y.toPresheafedSpace
e_1✝ : ↑↑Y.toPresheafedSpace = (forget TopCat).obj ↑Y.toPresheafedSpace
⊢ closure (↑f.val.base '' ⊤) = ⊤
[PROOFSTEP]
rw [eq_top_iff, Set.top_eq_univ, Set.top_eq_univ]
[GOAL]
case h.e'_4.h
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
hX : IrreducibleSpace ↑↑X.toPresheafedSpace
inst✝ : IrreducibleSpace ↑↑Y.toPresheafedSpace
e_1✝ : ↑↑Y.toPresheafedSpace = (forget TopCat).obj ↑Y.toPresheafedSpace
⊢ Set.univ ≤ closure (↑f.val.base '' Set.univ)
[PROOFSTEP]
convert subset_closure_inter_of_isPreirreducible_of_isOpen _ H.base_open.open_range _
[GOAL]
case h.e'_2.h.e'_3
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
hX : IrreducibleSpace ↑↑X.toPresheafedSpace
inst✝ : IrreducibleSpace ↑↑Y.toPresheafedSpace
e_1✝ : ↑↑Y.toPresheafedSpace = (forget TopCat).obj ↑Y.toPresheafedSpace
⊢ ↑f.val.base '' Set.univ = Set.univ ∩ Set.range ↑f.val.base
case h.e'_4.h.convert_2
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
hX : IrreducibleSpace ↑↑X.toPresheafedSpace
inst✝ : IrreducibleSpace ↑↑Y.toPresheafedSpace
e_1✝ : ↑↑Y.toPresheafedSpace = (forget TopCat).obj ↑Y.toPresheafedSpace
⊢ IsPreirreducible Set.univ
case h.e'_4.h.convert_3
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
hX : IrreducibleSpace ↑↑X.toPresheafedSpace
inst✝ : IrreducibleSpace ↑↑Y.toPresheafedSpace
e_1✝ : ↑↑Y.toPresheafedSpace = (forget TopCat).obj ↑Y.toPresheafedSpace
⊢ Set.Nonempty (Set.univ ∩ Set.range ↑f.val.base)
[PROOFSTEP]
rw [Set.univ_inter, Set.image_univ]
[GOAL]
case h.e'_4.h.convert_2
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
hX : IrreducibleSpace ↑↑X.toPresheafedSpace
inst✝ : IrreducibleSpace ↑↑Y.toPresheafedSpace
e_1✝ : ↑↑Y.toPresheafedSpace = (forget TopCat).obj ↑Y.toPresheafedSpace
⊢ IsPreirreducible Set.univ
case h.e'_4.h.convert_3
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
hX : IrreducibleSpace ↑↑X.toPresheafedSpace
inst✝ : IrreducibleSpace ↑↑Y.toPresheafedSpace
e_1✝ : ↑↑Y.toPresheafedSpace = (forget TopCat).obj ↑Y.toPresheafedSpace
⊢ Set.Nonempty (Set.univ ∩ Set.range ↑f.val.base)
[PROOFSTEP]
apply PreirreducibleSpace.isPreirreducible_univ (α := Y.carrier)
[GOAL]
case h.e'_4.h.convert_3
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
hX : IrreducibleSpace ↑↑X.toPresheafedSpace
inst✝ : IrreducibleSpace ↑↑Y.toPresheafedSpace
e_1✝ : ↑↑Y.toPresheafedSpace = (forget TopCat).obj ↑Y.toPresheafedSpace
⊢ Set.Nonempty (Set.univ ∩ Set.range ↑f.val.base)
[PROOFSTEP]
exact ⟨_, trivial, Set.mem_range_self hX.2.some⟩
[GOAL]
X : Scheme
inst✝ : IrreducibleSpace ↑↑X.toPresheafedSpace
x : ↑↑X.toPresheafedSpace
⊢ Algebra ↑(Presheaf.stalk X.presheaf x) ↑(Scheme.functionField X)
[PROOFSTEP]
apply RingHom.toAlgebra
[GOAL]
case i
X : Scheme
inst✝ : IrreducibleSpace ↑↑X.toPresheafedSpace
x : ↑↑X.toPresheafedSpace
⊢ ↑(Presheaf.stalk X.presheaf x) →+* ↑(Scheme.functionField X)
[PROOFSTEP]
exact X.presheaf.stalkSpecializes ((genericPoint_spec X.carrier).specializes trivial)
[GOAL]
X : Scheme
inst✝¹ : IrreducibleSpace ↑↑X.toPresheafedSpace
U : Opens ↑↑X.toPresheafedSpace
x : { x // x ∈ U }
inst✝ : Nonempty { x // x ∈ U }
⊢ IsScalarTower ↑(X.presheaf.obj (op U)) ↑(Presheaf.stalk X.presheaf ↑x) ↑(Scheme.functionField X)
[PROOFSTEP]
apply IsScalarTower.of_algebraMap_eq'
[GOAL]
case h
X : Scheme
inst✝¹ : IrreducibleSpace ↑↑X.toPresheafedSpace
U : Opens ↑↑X.toPresheafedSpace
x : { x // x ∈ U }
inst✝ : Nonempty { x // x ∈ U }
⊢ algebraMap ↑(X.presheaf.obj (op U)) ↑(Scheme.functionField X) =
    RingHom.comp (algebraMap ↑(Presheaf.stalk X.presheaf ↑x) ↑(Scheme.functionField X))
      (algebraMap ↑(X.presheaf.obj (op U)) ↑(Presheaf.stalk X.presheaf ↑x))
[PROOFSTEP]
simp_rw [RingHom.algebraMap_toAlgebra]
[GOAL]
case h
X : Scheme
inst✝¹ : IrreducibleSpace ↑↑X.toPresheafedSpace
U : Opens ↑↑X.toPresheafedSpace
x : { x // x ∈ U }
inst✝ : Nonempty { x // x ∈ U }
⊢ Scheme.germToFunctionField X U =
    RingHom.comp (Presheaf.stalkSpecializes X.presheaf (_ : genericPoint ↑↑X.toPresheafedSpace ⤳ ↑x))
      (Presheaf.germ X.presheaf x)
[PROOFSTEP]
change _ = X.presheaf.germ x ≫ _
[GOAL]
case h
X : Scheme
inst✝¹ : IrreducibleSpace ↑↑X.toPresheafedSpace
U : Opens ↑↑X.toPresheafedSpace
x : { x // x ∈ U }
inst✝ : Nonempty { x // x ∈ U }
⊢ Scheme.germToFunctionField X U =
    Presheaf.germ X.presheaf x ≫ Presheaf.stalkSpecializes X.presheaf (_ : genericPoint ↑↑X.toPresheafedSpace ⤳ ↑x)
[PROOFSTEP]
rw [X.presheaf.germ_stalkSpecializes]
[GOAL]
X : Scheme
R : CommRingCat
inst✝ : IsDomain ↑R
⊢ ↑R →+* ↑(Scheme.functionField (Scheme.Spec.obj (op R)))
[PROOFSTEP]
change CommRingCat.of R ⟶ _
[GOAL]
X : Scheme
R : CommRingCat
inst✝ : IsDomain ↑R
⊢ CommRingCat.of ↑R ⟶ Scheme.functionField (Scheme.Spec.obj (op R))
[PROOFSTEP]
apply StructureSheaf.toStalk
[GOAL]
X : Scheme
R : CommRingCat
inst✝ : IsDomain ↑R
⊢ genericPoint ↑↑(Scheme.Spec.obj (op R)).toPresheafedSpace = { asIdeal := 0, IsPrime := (_ : Ideal.IsPrime ⊥) }
[PROOFSTEP]
apply (genericPoint_spec (Scheme.Spec.obj <| op R).carrier).eq
[GOAL]
X : Scheme
R : CommRingCat
inst✝ : IsDomain ↑R
⊢ IsGenericPoint { asIdeal := 0, IsPrime := (_ : Ideal.IsPrime ⊥) } ⊤
[PROOFSTEP]
rw [isGenericPoint_def]
[GOAL]
X : Scheme
R : CommRingCat
inst✝ : IsDomain ↑R
⊢ closure {{ asIdeal := 0, IsPrime := (_ : Ideal.IsPrime ⊥) }} = ⊤
[PROOFSTEP]
rw [← PrimeSpectrum.zeroLocus_vanishingIdeal_eq_closure, PrimeSpectrum.vanishingIdeal_singleton]
[GOAL]
X : Scheme
R : CommRingCat
inst✝ : IsDomain ↑R
⊢ PrimeSpectrum.zeroLocus ↑{ asIdeal := 0, IsPrime := (_ : Ideal.IsPrime ⊥) }.asIdeal = ⊤
[PROOFSTEP]
rw [Set.top_eq_univ, ← PrimeSpectrum.zeroLocus_singleton_zero]
[GOAL]
X : Scheme
R : CommRingCat
inst✝ : IsDomain ↑R
⊢ PrimeSpectrum.zeroLocus ↑{ asIdeal := 0, IsPrime := (_ : Ideal.IsPrime ⊥) }.asIdeal = PrimeSpectrum.zeroLocus {0}
[PROOFSTEP]
rfl
[GOAL]
X : Scheme
R : CommRingCat
inst✝ : IsDomain ↑R
⊢ IsFractionRing ↑R ↑(Scheme.functionField (Scheme.Spec.obj (op R)))
[PROOFSTEP]
convert StructureSheaf.IsLocalization.to_stalk R (genericPoint _)
[GOAL]
case a
X : Scheme
R : CommRingCat
inst✝ : IsDomain ↑R
⊢ IsFractionRing ↑R ↑(Scheme.functionField (Scheme.Spec.obj (op R))) ↔
    IsLocalization.AtPrime
      (↑(Presheaf.stalk (Sheaf.presheaf (Spec.structureSheaf ↑R))
          (genericPoint ↑↑(Scheme.Spec.obj (op R)).toPresheafedSpace)))
      (genericPoint ↑↑(Scheme.Spec.obj (op R)).toPresheafedSpace).asIdeal
[PROOFSTEP]
delta IsFractionRing IsLocalization.AtPrime
[GOAL]
case a
X : Scheme
R : CommRingCat
inst✝ : IsDomain ↑R
⊢ IsLocalization (nonZeroDivisors ↑R) ↑(Scheme.functionField (Scheme.Spec.obj (op R))) ↔
    IsLocalization (Ideal.primeCompl (genericPoint ↑↑(Scheme.Spec.obj (op R)).toPresheafedSpace).asIdeal)
      ↑(Presheaf.stalk (Sheaf.presheaf (Spec.structureSheaf ↑R))
          (genericPoint ↑↑(Scheme.Spec.obj (op R)).toPresheafedSpace))
[PROOFSTEP]
apply Eq.to_iff
[GOAL]
case a.a
X : Scheme
R : CommRingCat
inst✝ : IsDomain ↑R
⊢ IsLocalization (nonZeroDivisors ↑R) ↑(Scheme.functionField (Scheme.Spec.obj (op R))) =
    IsLocalization (Ideal.primeCompl (genericPoint ↑↑(Scheme.Spec.obj (op R)).toPresheafedSpace).asIdeal)
      ↑(Presheaf.stalk (Sheaf.presheaf (Spec.structureSheaf ↑R))
          (genericPoint ↑↑(Scheme.Spec.obj (op R)).toPresheafedSpace))
[PROOFSTEP]
congr 1
[GOAL]
case a.a.e_M
X : Scheme
R : CommRingCat
inst✝ : IsDomain ↑R
⊢ nonZeroDivisors ↑R = Ideal.primeCompl (genericPoint ↑↑(Scheme.Spec.obj (op R)).toPresheafedSpace).asIdeal
[PROOFSTEP]
rw [genericPoint_eq_bot_of_affine]
[GOAL]
case a.a.e_M
X : Scheme
R : CommRingCat
inst✝ : IsDomain ↑R
⊢ nonZeroDivisors ↑R = Ideal.primeCompl { asIdeal := 0, IsPrime := (_ : Ideal.IsPrime ⊥) }.asIdeal
[PROOFSTEP]
ext
[GOAL]
case a.a.e_M.h
X : Scheme
R : CommRingCat
inst✝ : IsDomain ↑R
x✝ : ↑R
⊢ x✝ ∈ nonZeroDivisors ↑R ↔ x✝ ∈ Ideal.primeCompl { asIdeal := 0, IsPrime := (_ : Ideal.IsPrime ⊥) }.asIdeal
[PROOFSTEP]
exact mem_nonZeroDivisors_iff_ne_zero
[GOAL]
X✝ : Scheme
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
h : Nonempty { x // x ∈ U }
⊢ Set.Nonempty (⊤ ∩ ↑U)
[PROOFSTEP]
simpa using h
[GOAL]
X✝ : Scheme
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
h : Nonempty { x // x ∈ U }
⊢ primeIdealOf hU
      { val := genericPoint ↑↑X.toPresheafedSpace, property := (_ : genericPoint ↑↑X.toPresheafedSpace ∈ ↑U) } =
    genericPoint ↑↑(Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace
[PROOFSTEP]
haveI : IsAffine _ := hU
[GOAL]
X✝ : Scheme
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
h : Nonempty { x // x ∈ U }
this : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))
⊢ primeIdealOf hU
      { val := genericPoint ↑↑X.toPresheafedSpace, property := (_ : genericPoint ↑↑X.toPresheafedSpace ∈ ↑U) } =
    genericPoint ↑↑(Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace
[PROOFSTEP]
have e : U.openEmbedding.isOpenMap.functor.obj ⊤ = U := by ext1; exact Set.image_univ.trans Subtype.range_coe
[GOAL]
X✝ : Scheme
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
h : Nonempty { x // x ∈ U }
this : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))
⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U
[PROOFSTEP]
ext1
[GOAL]
case h
X✝ : Scheme
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
h : Nonempty { x // x ∈ U }
this : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))
⊢ ↑((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤) = ↑U
[PROOFSTEP]
exact Set.image_univ.trans Subtype.range_coe
[GOAL]
X✝ : Scheme
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
h : Nonempty { x // x ∈ U }
this : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))
e : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U
⊢ primeIdealOf hU
      { val := genericPoint ↑↑X.toPresheafedSpace, property := (_ : genericPoint ↑↑X.toPresheafedSpace ∈ ↑U) } =
    genericPoint ↑↑(Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace
[PROOFSTEP]
delta IsAffineOpen.primeIdealOf
[GOAL]
X✝ : Scheme
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
h : Nonempty { x // x ∈ U }
this : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))
e : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U
⊢ ↑(Scheme.Spec.map
              (X.presheaf.map
                  (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.base
      (↑(Scheme.isoSpec (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom.val.base
        { val := genericPoint ↑↑X.toPresheafedSpace, property := (_ : genericPoint ↑↑X.toPresheafedSpace ∈ ↑U) }) =
    genericPoint ↑↑(Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace
[PROOFSTEP]
erw [← Scheme.comp_val_base_apply]
[GOAL]
X✝ : Scheme
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
h : Nonempty { x // x ∈ U }
this : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))
e : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U
⊢ ↑((Scheme.isoSpec (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom ≫
              Scheme.Spec.map
                (X.presheaf.map
                    (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.base
      { val := genericPoint ↑↑X.toPresheafedSpace, property := (_ : genericPoint ↑↑X.toPresheafedSpace ∈ ↑U) } =
    genericPoint ↑↑(Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace
[PROOFSTEP]
convert
  genericPoint_eq_of_isOpenImmersion
    ((X.restrict U.openEmbedding).isoSpec.hom ≫ Scheme.Spec.map (X.presheaf.map (eqToHom e).op).op)
      -- Porting note: this was `ext1`
[GOAL]
case h.e'_2.h.h.e'_6
X✝ : Scheme
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
h : Nonempty { x // x ∈ U }
this : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))
e : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U
e_1✝ :
  PrimeSpectrum ↑(X.presheaf.obj (op U)) =
    (fun x => (forget TopCat).obj ↑(Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace)
      (genericPoint
        ↑↑(Scheme.restrict X
                    (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)
⊢ { val := genericPoint ↑↑X.toPresheafedSpace, property := (_ : genericPoint ↑↑X.toPresheafedSpace ∈ ↑U) } =
    genericPoint
      ↑↑(Scheme.restrict X
                  (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace
[PROOFSTEP]
apply Subtype.ext
[GOAL]
case h.e'_2.h.h.e'_6.a
X✝ : Scheme
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
h : Nonempty { x // x ∈ U }
this : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))
e : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U
e_1✝ :
  PrimeSpectrum ↑(X.presheaf.obj (op U)) =
    (fun x => (forget TopCat).obj ↑(Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace)
      (genericPoint
        ↑↑(Scheme.restrict X
                    (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)
⊢ ↑{ val := genericPoint ↑↑X.toPresheafedSpace, property := (_ : genericPoint ↑↑X.toPresheafedSpace ∈ ↑U) } =
    ↑(genericPoint
        ↑↑(Scheme.restrict X
                    (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)
[PROOFSTEP]
exact (genericPoint_eq_of_isOpenImmersion (X.ofRestrict U.openEmbedding)).symm
[GOAL]
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty { x // x ∈ U }
⊢ IsFractionRing ↑(X.presheaf.obj (op U)) ↑(Scheme.functionField X)
[PROOFSTEP]
haveI : IsAffine _ := hU
[GOAL]
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty { x // x ∈ U }
this : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))
⊢ IsFractionRing ↑(X.presheaf.obj (op U)) ↑(Scheme.functionField X)
[PROOFSTEP]
haveI : Nonempty (X.restrict U.openEmbedding).carrier := hU'
[GOAL]
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty { x // x ∈ U }
this✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))
this :
  Nonempty
    ↑↑(Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace
⊢ IsFractionRing ↑(X.presheaf.obj (op U)) ↑(Scheme.functionField X)
[PROOFSTEP]
haveI : IsIntegral (X.restrict U.openEmbedding) :=
  @isIntegralOfIsAffineIsDomain _ _ _ (by dsimp; rw [Opens.openEmbedding_obj_top]; infer_instance)
[GOAL]
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty { x // x ∈ U }
this✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))
this :
  Nonempty
    ↑↑(Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace
⊢ IsDomain
    ↑((Scheme.restrict X
                    (_ :
                      OpenEmbedding
                        ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj
        (op ⊤))
[PROOFSTEP]
dsimp
[GOAL]
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty { x // x ∈ U }
this✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))
this :
  Nonempty
    ↑↑(Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace
⊢ IsDomain ↑(X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)))
[PROOFSTEP]
rw [Opens.openEmbedding_obj_top]
[GOAL]
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty { x // x ∈ U }
this✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))
this :
  Nonempty
    ↑↑(Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace
⊢ IsDomain ↑(X.presheaf.obj (op U))
[PROOFSTEP]
infer_instance
[GOAL]
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty { x // x ∈ U }
this✝¹ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))
this✝ :
  Nonempty
    ↑↑(Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace
this : IsIntegral (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))
⊢ IsFractionRing ↑(X.presheaf.obj (op U)) ↑(Scheme.functionField X)
[PROOFSTEP]
delta IsFractionRing Scheme.functionField
[GOAL]
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty { x // x ∈ U }
this✝¹ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))
this✝ :
  Nonempty
    ↑↑(Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace
this : IsIntegral (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))
⊢ IsLocalization (nonZeroDivisors ↑(X.presheaf.obj (op U)))
    ↑(Presheaf.stalk X.presheaf (genericPoint ↑↑X.toPresheafedSpace))
[PROOFSTEP]
convert hU.isLocalization_stalk ⟨genericPoint X.carrier, _⟩ using 1
[GOAL]
case h.e'_3.h
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty { x // x ∈ U }
this✝¹ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))
this✝ :
  Nonempty
    ↑↑(Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace
this : IsIntegral (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))
⊢ nonZeroDivisors ↑(X.presheaf.obj (op U)) =
    Ideal.primeCompl
      (IsAffineOpen.primeIdealOf hU
          { val := genericPoint ↑↑X.toPresheafedSpace,
            property := (_ : genericPoint ↑↑X.toPresheafedSpace ∈ ↑U) }).asIdeal
[PROOFSTEP]
rw [hU.primeIdealOf_genericPoint, genericPoint_eq_bot_of_affine]
[GOAL]
case h.e'_3.h
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty { x // x ∈ U }
this✝¹ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))
this✝ :
  Nonempty
    ↑↑(Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace
this : IsIntegral (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))
⊢ nonZeroDivisors ↑(X.presheaf.obj (op U)) = Ideal.primeCompl { asIdeal := 0, IsPrime := (_ : Ideal.IsPrime ⊥) }.asIdeal
[PROOFSTEP]
ext
[GOAL]
case h.e'_3.h.h
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty { x // x ∈ U }
this✝¹ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))
this✝ :
  Nonempty
    ↑↑(Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace
this : IsIntegral (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))
x✝ : ↑(X.presheaf.obj (op U))
⊢ x✝ ∈ nonZeroDivisors ↑(X.presheaf.obj (op U)) ↔
    x✝ ∈ Ideal.primeCompl { asIdeal := 0, IsPrime := (_ : Ideal.IsPrime ⊥) }.asIdeal
[PROOFSTEP]
exact mem_nonZeroDivisors_iff_ne_zero


[GOAL]
A : Type u_1
K : Type u_2
R : Type u_3
S : Type u_4
inst✝⁷ : CommRing A
inst✝⁶ : Field K
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
M : Submonoid A
inst✝³ : Algebra A S
inst✝² : IsLocalization M S
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : A
s : { x // x ∈ M }
hr : ↑(aeval (mk' S r s)) p = 0
⊢ ↑(aeval (↑(algebraMap A S) r)) (scaleRoots p ↑s) = 0
[PROOFSTEP]
convert scaleRoots_eval₂_eq_zero (algebraMap A S) hr
[GOAL]
case h.e'_2.h.e
A : Type u_1
K : Type u_2
R : Type u_3
S : Type u_4
inst✝⁷ : CommRing A
inst✝⁶ : Field K
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
M : Submonoid A
inst✝³ : Algebra A S
inst✝² : IsLocalization M S
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : A
s : { x // x ∈ M }
hr : ↑(aeval (mk' S r s)) p = 0
⊢ ↑(aeval (↑(algebraMap A S) r)) = eval₂ (algebraMap A S) (↑(algebraMap A S) ↑s * mk' S r s)
[PROOFSTEP]
funext
[GOAL]
case h.e'_2.h.e.h
A : Type u_1
K : Type u_2
R : Type u_3
S : Type u_4
inst✝⁷ : CommRing A
inst✝⁶ : Field K
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
M : Submonoid A
inst✝³ : Algebra A S
inst✝² : IsLocalization M S
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : A
s : { x // x ∈ M }
hr : ↑(aeval (mk' S r s)) p = 0
x✝ : A[X]
⊢ ↑(aeval (↑(algebraMap A S) r)) x✝ = eval₂ (algebraMap A S) (↑(algebraMap A S) ↑s * mk' S r s) x✝
[PROOFSTEP]
rw [aeval_def, mk'_spec' _ r s]
[GOAL]
A : Type u_1
K : Type u_2
R : Type u_3
S : Type u_4
inst✝⁹ : CommRing A
inst✝⁸ : Field K
inst✝⁷ : CommRing R
inst✝⁶ : CommRing S
M : Submonoid A
inst✝⁵ : Algebra A S
inst✝⁴ : IsLocalization M S
inst✝³ : Algebra A K
inst✝² : IsFractionRing A K
inst✝¹ : IsDomain A
inst✝ : UniqueFactorizationMonoid A
p : A[X]
x : K
hr : ↑(aeval x) p = 0
⊢ IsRoot (scaleRoots p ↑(den A x)) (num A x)
[PROOFSTEP]
apply isRoot_of_eval₂_map_eq_zero (IsFractionRing.injective A K)
[GOAL]
A : Type u_1
K : Type u_2
R : Type u_3
S : Type u_4
inst✝⁹ : CommRing A
inst✝⁸ : Field K
inst✝⁷ : CommRing R
inst✝⁶ : CommRing S
M : Submonoid A
inst✝⁵ : Algebra A S
inst✝⁴ : IsLocalization M S
inst✝³ : Algebra A K
inst✝² : IsFractionRing A K
inst✝¹ : IsDomain A
inst✝ : UniqueFactorizationMonoid A
p : A[X]
x : K
hr : ↑(aeval x) p = 0
⊢ eval₂ (algebraMap A K) (↑(algebraMap A K) (num A x)) (scaleRoots p ↑(den A x)) = 0
[PROOFSTEP]
refine' scaleRoots_aeval_eq_zero_of_aeval_mk'_eq_zero _
[GOAL]
A : Type u_1
K : Type u_2
R : Type u_3
S : Type u_4
inst✝⁹ : CommRing A
inst✝⁸ : Field K
inst✝⁷ : CommRing R
inst✝⁶ : CommRing S
M : Submonoid A
inst✝⁵ : Algebra A S
inst✝⁴ : IsLocalization M S
inst✝³ : Algebra A K
inst✝² : IsFractionRing A K
inst✝¹ : IsDomain A
inst✝ : UniqueFactorizationMonoid A
p : A[X]
x : K
hr : ↑(aeval x) p = 0
⊢ ↑(aeval (mk' K (num A x) (den A x))) p = 0
[PROOFSTEP]
rw [mk'_num_den]
[GOAL]
A : Type u_1
K : Type u_2
R : Type u_3
S : Type u_4
inst✝⁹ : CommRing A
inst✝⁸ : Field K
inst✝⁷ : CommRing R
inst✝⁶ : CommRing S
M : Submonoid A
inst✝⁵ : Algebra A S
inst✝⁴ : IsLocalization M S
inst✝³ : Algebra A K
inst✝² : IsFractionRing A K
inst✝¹ : IsDomain A
inst✝ : UniqueFactorizationMonoid A
p : A[X]
x : K
hr : ↑(aeval x) p = 0
⊢ ↑(aeval x) p = 0
[PROOFSTEP]
exact hr
[GOAL]
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
⊢ num A r ∣ coeff p 0
[PROOFSTEP]
suffices num A r ∣ (scaleRoots p (den A r)).coeff 0
  by
  simp only [coeff_scaleRoots, tsub_zero] at this
  haveI inst := Classical.propDecidable
  by_cases hr : num A r = 0
  · obtain ⟨u, hu⟩ := (isUnit_den_of_num_eq_zero hr).pow p.natDegree
    rw [← hu] at this
    exact Units.dvd_mul_right.mp this
  · refine' dvd_of_dvd_mul_left_of_no_prime_factors hr _ this
    intro q dvd_num dvd_denom_pow hq
    apply hq.not_unit
    exact num_den_reduced A r dvd_num (hq.dvd_of_dvd_pow dvd_denom_pow)
[GOAL]
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
this : num A r ∣ coeff (scaleRoots p ↑(den A r)) 0
⊢ num A r ∣ coeff p 0
[PROOFSTEP]
simp only [coeff_scaleRoots, tsub_zero] at this
[GOAL]
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
this : num A r ∣ coeff p 0 * ↑(den A r) ^ natDegree p
⊢ num A r ∣ coeff p 0
[PROOFSTEP]
haveI inst := Classical.propDecidable
[GOAL]
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
this : num A r ∣ coeff p 0 * ↑(den A r) ^ natDegree p
inst : (a : Prop) → Decidable a
⊢ num A r ∣ coeff p 0
[PROOFSTEP]
by_cases hr : num A r = 0
[GOAL]
case pos
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr✝ : ↑(aeval r) p = 0
this : num A r ∣ coeff p 0 * ↑(den A r) ^ natDegree p
inst : (a : Prop) → Decidable a
hr : num A r = 0
⊢ num A r ∣ coeff p 0
[PROOFSTEP]
obtain ⟨u, hu⟩ := (isUnit_den_of_num_eq_zero hr).pow p.natDegree
[GOAL]
case pos.intro
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr✝ : ↑(aeval r) p = 0
this : num A r ∣ coeff p 0 * ↑(den A r) ^ natDegree p
inst : (a : Prop) → Decidable a
hr : num A r = 0
u : Aˣ
hu : ↑u = ↑(den A r) ^ natDegree p
⊢ num A r ∣ coeff p 0
[PROOFSTEP]
rw [← hu] at this
[GOAL]
case pos.intro
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr✝ : ↑(aeval r) p = 0
inst : (a : Prop) → Decidable a
hr : num A r = 0
u : Aˣ
this : num A r ∣ coeff p 0 * ↑u
hu : ↑u = ↑(den A r) ^ natDegree p
⊢ num A r ∣ coeff p 0
[PROOFSTEP]
exact Units.dvd_mul_right.mp this
[GOAL]
case neg
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr✝ : ↑(aeval r) p = 0
this : num A r ∣ coeff p 0 * ↑(den A r) ^ natDegree p
inst : (a : Prop) → Decidable a
hr : ¬num A r = 0
⊢ num A r ∣ coeff p 0
[PROOFSTEP]
refine' dvd_of_dvd_mul_left_of_no_prime_factors hr _ this
[GOAL]
case neg
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr✝ : ↑(aeval r) p = 0
this : num A r ∣ coeff p 0 * ↑(den A r) ^ natDegree p
inst : (a : Prop) → Decidable a
hr : ¬num A r = 0
⊢ ∀ {d : A}, d ∣ num A r → d ∣ ↑(den A r) ^ natDegree p → ¬Prime d
[PROOFSTEP]
intro q dvd_num dvd_denom_pow hq
[GOAL]
case neg
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr✝ : ↑(aeval r) p = 0
this : num A r ∣ coeff p 0 * ↑(den A r) ^ natDegree p
inst : (a : Prop) → Decidable a
hr : ¬num A r = 0
q : A
dvd_num : q ∣ num A r
dvd_denom_pow : q ∣ ↑(den A r) ^ natDegree p
hq : Prime q
⊢ False
[PROOFSTEP]
apply hq.not_unit
[GOAL]
case neg
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr✝ : ↑(aeval r) p = 0
this : num A r ∣ coeff p 0 * ↑(den A r) ^ natDegree p
inst : (a : Prop) → Decidable a
hr : ¬num A r = 0
q : A
dvd_num : q ∣ num A r
dvd_denom_pow : q ∣ ↑(den A r) ^ natDegree p
hq : Prime q
⊢ IsUnit q
[PROOFSTEP]
exact num_den_reduced A r dvd_num (hq.dvd_of_dvd_pow dvd_denom_pow)
[GOAL]
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
⊢ num A r ∣ coeff (scaleRoots p ↑(den A r)) 0
[PROOFSTEP]
convert dvd_term_of_isRoot_of_dvd_terms 0 (num_isRoot_scaleRoots_of_aeval_eq_zero hr) _
[GOAL]
case h.e'_4
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
⊢ coeff (scaleRoots p ↑(den A r)) 0 = coeff (scaleRoots p ↑(den A r)) 0 * num A r ^ 0
[PROOFSTEP]
rw [pow_zero, mul_one]
[GOAL]
case convert_2
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
⊢ ∀ (j : ℕ), j ≠ 0 → num A r ∣ coeff (scaleRoots p ↑(den A r)) j * num A r ^ j
[PROOFSTEP]
intro j hj
[GOAL]
case convert_2
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
j : ℕ
hj : j ≠ 0
⊢ num A r ∣ coeff (scaleRoots p ↑(den A r)) j * num A r ^ j
[PROOFSTEP]
apply dvd_mul_of_dvd_right
[GOAL]
case convert_2.h
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
j : ℕ
hj : j ≠ 0
⊢ num A r ∣ num A r ^ j
[PROOFSTEP]
convert pow_dvd_pow (num A r) (Nat.succ_le_of_lt (bot_lt_iff_ne_bot.mpr hj))
[GOAL]
case h.e'_3
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
j : ℕ
hj : j ≠ 0
⊢ num A r = num A r ^ Nat.succ ⊥
[PROOFSTEP]
exact (pow_one _).symm
[GOAL]
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
⊢ ↑(den A r) ∣ leadingCoeff p
[PROOFSTEP]
suffices (den A r : A) ∣ p.leadingCoeff * num A r ^ p.natDegree
  by
  refine' dvd_of_dvd_mul_left_of_no_prime_factors (mem_nonZeroDivisors_iff_ne_zero.mp (den A r).2) _ this
  intro q dvd_den dvd_num_pow hq
  apply hq.not_unit
  exact num_den_reduced A r (hq.dvd_of_dvd_pow dvd_num_pow) dvd_den
[GOAL]
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
this : ↑(den A r) ∣ leadingCoeff p * num A r ^ natDegree p
⊢ ↑(den A r) ∣ leadingCoeff p
[PROOFSTEP]
refine' dvd_of_dvd_mul_left_of_no_prime_factors (mem_nonZeroDivisors_iff_ne_zero.mp (den A r).2) _ this
[GOAL]
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
this : ↑(den A r) ∣ leadingCoeff p * num A r ^ natDegree p
⊢ ∀ {d : A}, d ∣ ↑(den A r) → d ∣ num A r ^ natDegree p → ¬Prime d
[PROOFSTEP]
intro q dvd_den dvd_num_pow hq
[GOAL]
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
this : ↑(den A r) ∣ leadingCoeff p * num A r ^ natDegree p
q : A
dvd_den : q ∣ ↑(den A r)
dvd_num_pow : q ∣ num A r ^ natDegree p
hq : Prime q
⊢ False
[PROOFSTEP]
apply hq.not_unit
[GOAL]
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
this : ↑(den A r) ∣ leadingCoeff p * num A r ^ natDegree p
q : A
dvd_den : q ∣ ↑(den A r)
dvd_num_pow : q ∣ num A r ^ natDegree p
hq : Prime q
⊢ IsUnit q
[PROOFSTEP]
exact num_den_reduced A r (hq.dvd_of_dvd_pow dvd_num_pow) dvd_den
[GOAL]
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
⊢ ↑(den A r) ∣ leadingCoeff p * num A r ^ natDegree p
[PROOFSTEP]
rw [← coeff_scaleRoots_natDegree]
[GOAL]
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
⊢ ↑(den A r) ∣ coeff (scaleRoots p ?s) (natDegree p) * num A r ^ natDegree p
case s
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
⊢ A
[PROOFSTEP]
apply dvd_term_of_isRoot_of_dvd_terms _ (num_isRoot_scaleRoots_of_aeval_eq_zero hr)
[GOAL]
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
⊢ ∀ (j : ℕ), j ≠ natDegree p → ↑(den A r) ∣ coeff (scaleRoots p ↑(den A r)) j * num A r ^ j
[PROOFSTEP]
intro j hj
[GOAL]
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
j : ℕ
hj : j ≠ natDegree p
⊢ ↑(den A r) ∣ coeff (scaleRoots p ↑(den A r)) j * num A r ^ j
[PROOFSTEP]
by_cases h : j < p.natDegree
[GOAL]
case pos
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
j : ℕ
hj : j ≠ natDegree p
h : j < natDegree p
⊢ ↑(den A r) ∣ coeff (scaleRoots p ↑(den A r)) j * num A r ^ j
[PROOFSTEP]
rw [coeff_scaleRoots]
[GOAL]
case pos
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
j : ℕ
hj : j ≠ natDegree p
h : j < natDegree p
⊢ ↑(den A r) ∣ coeff p j * ↑(den A r) ^ (natDegree p - j) * num A r ^ j
[PROOFSTEP]
refine' (dvd_mul_of_dvd_right _ _).mul_right _
[GOAL]
case pos
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
j : ℕ
hj : j ≠ natDegree p
h : j < natDegree p
⊢ ↑(den A r) ∣ ↑(den A r) ^ (natDegree p - j)
[PROOFSTEP]
convert pow_dvd_pow (den A r : A) (Nat.succ_le_iff.mpr (lt_tsub_iff_left.mpr _))
[GOAL]
case h.e'_3
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
j : ℕ
hj : j ≠ natDegree p
h : j < natDegree p
⊢ ↑(den A r) = ↑(den A r) ^ Nat.succ ?pos.convert_1✝
[PROOFSTEP]
exact (pow_one _).symm
[GOAL]
case pos.convert_4
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
j : ℕ
hj : j ≠ natDegree p
h : j < natDegree p
⊢ j + 0 < natDegree p
[PROOFSTEP]
simpa using h
[GOAL]
case neg
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
j : ℕ
hj : j ≠ natDegree p
h : ¬j < natDegree p
⊢ ↑(den A r) ∣ coeff (scaleRoots p ↑(den A r)) j * num A r ^ j
[PROOFSTEP]
rw [← natDegree_scaleRoots p (den A r)] at *
[GOAL]
case neg
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
j : ℕ
hj : j ≠ natDegree (scaleRoots p ↑(den A r))
h : ¬j < natDegree (scaleRoots p ↑(den A r))
⊢ ↑(den A r) ∣ coeff (scaleRoots p ↑(den A r)) j * num A r ^ j
[PROOFSTEP]
rw [coeff_eq_zero_of_natDegree_lt (lt_of_le_of_ne (le_of_not_gt h) hj.symm), zero_mul]
[GOAL]
case neg
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
p : A[X]
r : K
hr : ↑(aeval r) p = 0
j : ℕ
hj : j ≠ natDegree (scaleRoots p ↑(den A r))
h : ¬j < natDegree (scaleRoots p ↑(den A r))
⊢ ↑(den A r) ∣ 0
[PROOFSTEP]
exact dvd_zero _


[GOAL]
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsRefl α r
inst✝ : IsAntisymm α r
a b : α
⊢ a = b → r a b ∧ r b a
[PROOFSTEP]
rintro rfl
[GOAL]
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsRefl α r
inst✝ : IsAntisymm α r
a : α
⊢ r a a ∧ r a a
[PROOFSTEP]
exact ⟨refl _, refl _⟩
[GOAL]
α : Type u
β : Type v
r✝ : α → α → Prop
s : β → β → Prop
r : α → α → Prop
inst✝ : IsTrichotomous α r
a b : α
⊢ Function.swap r a b ∨ a = b ∨ Function.swap r b a
[PROOFSTEP]
simpa [Function.swap, or_comm, or_left_comm] using trichotomous_of r a b
[GOAL]
α : Type u
β : Type v
r✝ : α → α → Prop
s : β → β → Prop
r : α → α → Prop
inst✝¹ : IsIrrefl α r
inst✝ : Subsingleton α
⊢ ∀ (a b : α), r a b = EmptyRelation a b
[PROOFSTEP]
simpa using not_rel_of_subsingleton r
[GOAL]
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsTrans α r
inst✝ : IsTrichotomous α r
a b c : α
⊢ ¬r b a → r b c → r a c
[PROOFSTEP]
intro h₁ h₂
[GOAL]
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsTrans α r
inst✝ : IsTrichotomous α r
a b c : α
h₁ : ¬r b a
h₂ : r b c
⊢ r a c
[PROOFSTEP]
rcases trichotomous_of r a b with (h₃ | rfl | h₃)
[GOAL]
case inl
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsTrans α r
inst✝ : IsTrichotomous α r
a b c : α
h₁ : ¬r b a
h₂ : r b c
h₃ : r a b
⊢ r a c
case inr.inl
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsTrans α r
inst✝ : IsTrichotomous α r
a c : α
h₁ : ¬r a a
h₂ : r a c
⊢ r a c
case inr.inr
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsTrans α r
inst✝ : IsTrichotomous α r
a b c : α
h₁ : ¬r b a
h₂ : r b c
h₃ : r b a
⊢ r a c
[PROOFSTEP]
exacts [_root_.trans h₃ h₂, h₂, absurd h₃ h₁]
[GOAL]
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsTrans α r
inst✝ : IsTrichotomous α r
a b c : α
⊢ r a b → ¬r c b → r a c
[PROOFSTEP]
intro h₁ h₂
[GOAL]
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsTrans α r
inst✝ : IsTrichotomous α r
a b c : α
h₁ : r a b
h₂ : ¬r c b
⊢ r a c
[PROOFSTEP]
rcases trichotomous_of r b c with (h₃ | rfl | h₃)
[GOAL]
case inl
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsTrans α r
inst✝ : IsTrichotomous α r
a b c : α
h₁ : r a b
h₂ : ¬r c b
h₃ : r b c
⊢ r a c
case inr.inl
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsTrans α r
inst✝ : IsTrichotomous α r
a b : α
h₁ : r a b
h₂ : ¬r b b
⊢ r a b
case inr.inr
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsTrans α r
inst✝ : IsTrichotomous α r
a b c : α
h₁ : r a b
h₂ : ¬r c b
h₃ : r c b
⊢ r a c
[PROOFSTEP]
exacts [_root_.trans h₁ h₃, h₁, absurd h₃ h₂]
[GOAL]
α : Type u
β : Type v
r✝ : α → α → Prop
s : β → β → Prop
r : α → α → Prop
inst✝ : IsStrictOrder α r
x y : α
h : x < y
e : y = x
⊢ False
[PROOFSTEP]
rw [e] at h
[GOAL]
α : Type u
β : Type v
r✝ : α → α → Prop
s : β → β → Prop
r : α → α → Prop
inst✝ : IsStrictOrder α r
x y : α
h : x < x
e : y = x
⊢ False
[PROOFSTEP]
exact irrefl _ h
[GOAL]
α : Type u
β : Type v
r✝ : α → α → Prop
s : β → β → Prop
r : α → α → Prop
inst✝ : IsOrderConnected α r
a b c : α
h₁ : ¬r a b
h₂ : ¬r b c
⊢ ¬(r a b ∨ r b c)
[PROOFSTEP]
simp [h₁, h₂]
[GOAL]
α✝ : Type u
β : Type v
r✝ : α✝ → α✝ → Prop
s : β → β → Prop
α : Type ?u.14854
r : α → α → Prop
inst✝ : IsWellOrder α r
⊢ IsTrichotomous α r
[PROOFSTEP]
infer_instance
  -- see Note [lower instance priority]
[GOAL]
α✝ : Type u
β : Type v
r✝ : α✝ → α✝ → Prop
s : β → β → Prop
α : Type ?u.14937
r : α → α → Prop
inst✝ : IsWellOrder α r
⊢ IsTrans α r
[PROOFSTEP]
infer_instance
  -- see Note [lower instance priority]
[GOAL]
α✝ : Type u
β : Type v
r✝ : α✝ → α✝ → Prop
s : β → β → Prop
α : Type ?u.15023
r : α → α → Prop
inst✝ : IsWellOrder α r
⊢ IsIrrefl α r
[PROOFSTEP]
infer_instance
  -- see Note [lower instance priority]
[GOAL]
α✝ : Type u
β : Type v
r✝ : α✝ → α✝ → Prop
s : β → β → Prop
α : Type ?u.15135
r : α → α → Prop
inst✝ : IsWellOrder α r
⊢ IsAsymm α r
[PROOFSTEP]
infer_instance
[GOAL]
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
a b c : α × β
h₁ : Prod.Lex r s a b
h₂ : Prod.Lex r s b c
⊢ Prod.Lex r s a c
[PROOFSTEP]
cases' h₁ with a₁ a₂ b₁ b₂ ab a₁ b₁ b₂ ab
[GOAL]
case left
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : α × β
a₁ : α
a₂ : β
b₁ : α
b₂ : β
ab : r a₁ b₁
h₂ : Prod.Lex r s (b₁, b₂) c
⊢ Prod.Lex r s (a₁, a₂) c
[PROOFSTEP]
cases' h₂ with _ _ c₁ c₂ bc _ _ c₂ bc
[GOAL]
case right
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : α × β
a₁ : α
b₁ b₂ : β
ab : s b₁ b₂
h₂ : Prod.Lex r s (a₁, b₂) c
⊢ Prod.Lex r s (a₁, b₁) c
[PROOFSTEP]
cases' h₂ with _ _ c₁ c₂ bc _ _ c₂ bc
[GOAL]
case left.left
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
a₁ : α
a₂ : β
b₁ : α
b₂ : β
ab : r a₁ b₁
c₁ : α
c₂ : β
bc : r b₁ c₁
⊢ Prod.Lex r s (a₁, a₂) (c₁, c₂)
case left.right
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
a₁ : α
a₂ : β
b₁ : α
b₂ : β
ab : r a₁ b₁
c₂ : β
bc : s b₂ c₂
⊢ Prod.Lex r s (a₁, a₂) (b₁, c₂)
case right.left
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
a₁ : α
b₁ b₂ : β
ab : s b₁ b₂
c₁ : α
c₂ : β
bc : r a₁ c₁
⊢ Prod.Lex r s (a₁, b₁) (c₁, c₂)
case right.right
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
a₁ : α
b₁ b₂ : β
ab : s b₁ b₂
c₂ : β
bc : s b₂ c₂
⊢ Prod.Lex r s (a₁, b₁) (a₁, c₂)
[PROOFSTEP]
exacts [.left _ _ (_root_.trans ab bc), .left _ _ ab, .left _ _ bc, .right _ (_root_.trans ab bc)]
[GOAL]
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝³ : PartialOrder α
inst✝² : WellFoundedLT α
inst✝¹ : Preorder β
inst✝ : WellFoundedLT β
⊢ WellFounded fun x x_1 => x < x_1
[PROOFSTEP]
refine @Subrelation.wf (α × β) (Prod.Lex (· < ·) (· < ·)) (· < ·) ?_ IsWellFounded.wf
[GOAL]
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝³ : PartialOrder α
inst✝² : WellFoundedLT α
inst✝¹ : Preorder β
inst✝ : WellFoundedLT β
⊢ Subrelation (fun x x_1 => x < x_1) (Prod.Lex (fun x x_1 => x < x_1) fun x x_1 => x < x_1)
[PROOFSTEP]
rintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩ w
[GOAL]
case mk.mk
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝³ : PartialOrder α
inst✝² : WellFoundedLT α
inst✝¹ : Preorder β
inst✝ : WellFoundedLT β
a₁ : α
b₁ : β
a₂ : α
b₂ : β
w : (a₁, b₁) < (a₂, b₂)
⊢ Prod.Lex (fun x x_1 => x < x_1) (fun x x_1 => x < x_1) (a₁, b₁) (a₂, b₂)
[PROOFSTEP]
simp only [Prod.mk_lt_mk] at w
[GOAL]
case mk.mk
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝³ : PartialOrder α
inst✝² : WellFoundedLT α
inst✝¹ : Preorder β
inst✝ : WellFoundedLT β
a₁ : α
b₁ : β
a₂ : α
b₂ : β
w : a₁ < a₂ ∧ b₁ ≤ b₂ ∨ a₁ ≤ a₂ ∧ b₁ < b₂
⊢ Prod.Lex (fun x x_1 => x < x_1) (fun x x_1 => x < x_1) (a₁, b₁) (a₂, b₂)
[PROOFSTEP]
rcases eq_or_ne a₁ a₂ with rfl | ha
[GOAL]
case mk.mk.inl
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝³ : PartialOrder α
inst✝² : WellFoundedLT α
inst✝¹ : Preorder β
inst✝ : WellFoundedLT β
a₁ : α
b₁ b₂ : β
w : a₁ < a₁ ∧ b₁ ≤ b₂ ∨ a₁ ≤ a₁ ∧ b₁ < b₂
⊢ Prod.Lex (fun x x_1 => x < x_1) (fun x x_1 => x < x_1) (a₁, b₁) (a₁, b₂)
[PROOFSTEP]
right
[GOAL]
case mk.mk.inl.h
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝³ : PartialOrder α
inst✝² : WellFoundedLT α
inst✝¹ : Preorder β
inst✝ : WellFoundedLT β
a₁ : α
b₁ b₂ : β
w : a₁ < a₁ ∧ b₁ ≤ b₂ ∨ a₁ ≤ a₁ ∧ b₁ < b₂
⊢ b₁ < b₂
[PROOFSTEP]
simpa using w
[GOAL]
case mk.mk.inr
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝³ : PartialOrder α
inst✝² : WellFoundedLT α
inst✝¹ : Preorder β
inst✝ : WellFoundedLT β
a₁ : α
b₁ : β
a₂ : α
b₂ : β
w : a₁ < a₂ ∧ b₁ ≤ b₂ ∨ a₁ ≤ a₂ ∧ b₁ < b₂
ha : a₁ ≠ a₂
⊢ Prod.Lex (fun x x_1 => x < x_1) (fun x x_1 => x < x_1) (a₁, b₁) (a₂, b₂)
[PROOFSTEP]
left
[GOAL]
case mk.mk.inr.h
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝³ : PartialOrder α
inst✝² : WellFoundedLT α
inst✝¹ : Preorder β
inst✝ : WellFoundedLT β
a₁ : α
b₁ : β
a₂ : α
b₂ : β
w : a₁ < a₂ ∧ b₁ ≤ b₂ ∨ a₁ ≤ a₂ ∧ b₁ < b₂
ha : a₁ ≠ a₂
⊢ a₁ < a₂
[PROOFSTEP]
rcases w with ⟨a_lt, _⟩ | ⟨a_le, _⟩
[GOAL]
case mk.mk.inr.h.inl.intro
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝³ : PartialOrder α
inst✝² : WellFoundedLT α
inst✝¹ : Preorder β
inst✝ : WellFoundedLT β
a₁ : α
b₁ : β
a₂ : α
b₂ : β
ha : a₁ ≠ a₂
a_lt : a₁ < a₂
right✝ : b₁ ≤ b₂
⊢ a₁ < a₂
[PROOFSTEP]
assumption
[GOAL]
case mk.mk.inr.h.inr.intro
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝³ : PartialOrder α
inst✝² : WellFoundedLT α
inst✝¹ : Preorder β
inst✝ : WellFoundedLT β
a₁ : α
b₁ : β
a₂ : α
b₂ : β
ha : a₁ ≠ a₂
a_le : a₁ ≤ a₂
right✝ : b₁ < b₂
⊢ a₁ < a₂
[PROOFSTEP]
exact Ne.lt_of_le ha a_le
[GOAL]
α : Type u
β : Type v
r✝ : α → α → Prop
s✝ : β → β → Prop
r : α → α → Prop
s : Set α
⊢ ¬Bounded r s ↔ Unbounded r s
[PROOFSTEP]
simp only [Bounded, Unbounded, not_forall, not_exists, exists_prop, not_and, not_not]
[GOAL]
α : Type u
β : Type v
r✝ : α → α → Prop
s✝ : β → β → Prop
r : α → α → Prop
s : Set α
⊢ ¬Unbounded r s ↔ Bounded r s
[PROOFSTEP]
rw [not_iff_comm, not_bounded_iff]
[GOAL]
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝ : HasSubset α
a b c : α
hab : a = b
hbc : b ⊆ c
⊢ a ⊆ c
[PROOFSTEP]
rwa [hab]
[GOAL]
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝ : HasSubset α
a b c : α
hab : a ⊆ b
hbc : b = c
⊢ a ⊆ c
[PROOFSTEP]
rwa [← hbc]
[GOAL]
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝ : HasSSubset α
a b c : α
hab : a = b
hbc : b ⊂ c
⊢ a ⊂ c
[PROOFSTEP]
rwa [hab]
[GOAL]
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝ : HasSSubset α
a b c : α
hab : a ⊂ b
hbc : b = c
⊢ a ⊂ c
[PROOFSTEP]
rwa [← hbc]
[GOAL]
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝ : LinearOrder α
⊢ IsOrderConnected α fun x x_1 => x < x_1
[PROOFSTEP]
infer_instance
[GOAL]
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝ : LinearOrder α
⊢ IsIncompTrans α fun x x_1 => x < x_1
[PROOFSTEP]
infer_instance
[GOAL]
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝ : LinearOrder α
⊢ IsStrictWeakOrder α fun x x_1 => x < x_1
[PROOFSTEP]
infer_instance