[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.611, u_1} C
inst✝ : Precoherent C
⊢ ∀ ⦃X Y : C⦄ (f : Y ⟶ X) (S : Presieve X),
    S ∈ (fun B => {S | ∃ α x X π, S = Presieve.ofArrows X π ∧ EffectiveEpiFamily X π}) X →
      ∃ T,
        T ∈ (fun B => {S | ∃ α x X π, S = Presieve.ofArrows X π ∧ EffectiveEpiFamily X π}) Y ∧
          Presieve.FactorsThruAlong T S f
[PROOFSTEP]
rintro B₁ B₂ f S ⟨α, _, X₁, π₁, rfl, hS⟩
[GOAL]
case intro.intro.intro.intro.intro
C : Type u_1
inst✝¹ : Category.{?u.611, u_1} C
inst✝ : Precoherent C
B₁ B₂ : C
f : B₂ ⟶ B₁
α : Type
w✝ : Fintype α
X₁ : α → C
π₁ : (a : α) → X₁ a ⟶ B₁
hS : EffectiveEpiFamily X₁ π₁
⊢ ∃ T,
    T ∈ (fun B => {S | ∃ α x X π, S = Presieve.ofArrows X π ∧ EffectiveEpiFamily X π}) B₂ ∧
      Presieve.FactorsThruAlong T (Presieve.ofArrows X₁ π₁) f
[PROOFSTEP]
obtain ⟨β, _, X₂, π₂, h, i, ι, hh⟩ := Precoherent.pullback f α X₁ π₁ hS
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
C : Type u_1
inst✝¹ : Category.{?u.611, u_1} C
inst✝ : Precoherent C
B₁ B₂ : C
f : B₂ ⟶ B₁
α : Type
w✝¹ : Fintype α
X₁ : α → C
π₁ : (a : α) → X₁ a ⟶ B₁
hS : EffectiveEpiFamily X₁ π₁
β : Type
w✝ : Fintype β
X₂ : β → C
π₂ : (b : β) → X₂ b ⟶ B₂
h : EffectiveEpiFamily X₂ π₂
i : β → α
ι : (b : β) → X₂ b ⟶ X₁ (i b)
hh : ∀ (b : β), ι b ≫ π₁ (i b) = π₂ b ≫ f
⊢ ∃ T,
    T ∈ (fun B => {S | ∃ α x X π, S = Presieve.ofArrows X π ∧ EffectiveEpiFamily X π}) B₂ ∧
      Presieve.FactorsThruAlong T (Presieve.ofArrows X₁ π₁) f
[PROOFSTEP]
refine ⟨Presieve.ofArrows X₂ π₂, ⟨β, inferInstance, X₂, π₂, rfl, h⟩, ?_⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
C : Type u_1
inst✝¹ : Category.{?u.611, u_1} C
inst✝ : Precoherent C
B₁ B₂ : C
f : B₂ ⟶ B₁
α : Type
w✝¹ : Fintype α
X₁ : α → C
π₁ : (a : α) → X₁ a ⟶ B₁
hS : EffectiveEpiFamily X₁ π₁
β : Type
w✝ : Fintype β
X₂ : β → C
π₂ : (b : β) → X₂ b ⟶ B₂
h : EffectiveEpiFamily X₂ π₂
i : β → α
ι : (b : β) → X₂ b ⟶ X₁ (i b)
hh : ∀ (b : β), ι b ≫ π₁ (i b) = π₂ b ≫ f
⊢ Presieve.FactorsThruAlong (Presieve.ofArrows X₂ π₂) (Presieve.ofArrows X₁ π₁) f
[PROOFSTEP]
rintro _ _ ⟨b⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.mk
C : Type u_1
inst✝¹ : Category.{?u.611, u_1} C
inst✝ : Precoherent C
B₁ B₂ : C
f : B₂ ⟶ B₁
α : Type
w✝¹ : Fintype α
X₁ : α → C
π₁ : (a : α) → X₁ a ⟶ B₁
hS : EffectiveEpiFamily X₁ π₁
β : Type
w✝ : Fintype β
X₂ : β → C
π₂ : (b : β) → X₂ b ⟶ B₂
h : EffectiveEpiFamily X₂ π₂
i : β → α
ι : (b : β) → X₂ b ⟶ X₁ (i b)
hh : ∀ (b : β), ι b ≫ π₁ (i b) = π₂ b ≫ f
Y : C
b : β
⊢ ∃ W i e, Presieve.ofArrows X₁ π₁ e ∧ i ≫ e = π₂ b ≫ f
[PROOFSTEP]
refine ⟨(X₁ (i b)), ι _, π₁ _, ⟨_⟩, hh _⟩
[GOAL]
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Precoherent C
P : Cᵒᵖ ⥤ Type w
⊢ Presieve.IsSheaf (coherentTopology C) P ↔
    ∀ (B : C) (α : Type) [inst : Fintype α] (X : α → C) (π : (a : α) → X a ⟶ B),
      EffectiveEpiFamily X π → Presieve.IsSheafFor P (Presieve.ofArrows X π)
[PROOFSTEP]
constructor
[GOAL]
case mp
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Precoherent C
P : Cᵒᵖ ⥤ Type w
⊢ Presieve.IsSheaf (coherentTopology C) P →
    ∀ (B : C) (α : Type) [inst : Fintype α] (X : α → C) (π : (a : α) → X a ⟶ B),
      EffectiveEpiFamily X π → Presieve.IsSheafFor P (Presieve.ofArrows X π)
[PROOFSTEP]
intro hP B α _ X π h
[GOAL]
case mp
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Precoherent C
P : Cᵒᵖ ⥤ Type w
hP : Presieve.IsSheaf (coherentTopology C) P
B : C
α : Type
inst✝ : Fintype α
X : α → C
π : (a : α) → X a ⟶ B
h : EffectiveEpiFamily X π
⊢ Presieve.IsSheafFor P (Presieve.ofArrows X π)
[PROOFSTEP]
simp only [coherentTopology, Presieve.isSheaf_coverage] at hP
[GOAL]
case mp
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Precoherent C
P : Cᵒᵖ ⥤ Type w
B : C
α : Type
inst✝ : Fintype α
X : α → C
π : (a : α) → X a ⟶ B
h : EffectiveEpiFamily X π
hP : ∀ {X : C} (R : Presieve X), R ∈ Coverage.covering (coherentCoverage C) X → Presieve.IsSheafFor P R
⊢ Presieve.IsSheafFor P (Presieve.ofArrows X π)
[PROOFSTEP]
apply hP
[GOAL]
case mp.a
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Precoherent C
P : Cᵒᵖ ⥤ Type w
B : C
α : Type
inst✝ : Fintype α
X : α → C
π : (a : α) → X a ⟶ B
h : EffectiveEpiFamily X π
hP : ∀ {X : C} (R : Presieve X), R ∈ Coverage.covering (coherentCoverage C) X → Presieve.IsSheafFor P R
⊢ Presieve.ofArrows X π ∈ Coverage.covering (coherentCoverage C) B
[PROOFSTEP]
refine ⟨α, inferInstance, X, π, rfl, h⟩
[GOAL]
case mpr
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Precoherent C
P : Cᵒᵖ ⥤ Type w
⊢ (∀ (B : C) (α : Type) [inst : Fintype α] (X : α → C) (π : (a : α) → X a ⟶ B),
      EffectiveEpiFamily X π → Presieve.IsSheafFor P (Presieve.ofArrows X π)) →
    Presieve.IsSheaf (coherentTopology C) P
[PROOFSTEP]
intro h
[GOAL]
case mpr
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Precoherent C
P : Cᵒᵖ ⥤ Type w
h :
  ∀ (B : C) (α : Type) [inst : Fintype α] (X : α → C) (π : (a : α) → X a ⟶ B),
    EffectiveEpiFamily X π → Presieve.IsSheafFor P (Presieve.ofArrows X π)
⊢ Presieve.IsSheaf (coherentTopology C) P
[PROOFSTEP]
simp only [coherentTopology, Presieve.isSheaf_coverage]
[GOAL]
case mpr
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Precoherent C
P : Cᵒᵖ ⥤ Type w
h :
  ∀ (B : C) (α : Type) [inst : Fintype α] (X : α → C) (π : (a : α) → X a ⟶ B),
    EffectiveEpiFamily X π → Presieve.IsSheafFor P (Presieve.ofArrows X π)
⊢ ∀ {X : C} (R : Presieve X), R ∈ Coverage.covering (coherentCoverage C) X → Presieve.IsSheafFor P R
[PROOFSTEP]
rintro B S ⟨α, _, X, π, rfl, hS⟩
[GOAL]
case mpr.intro.intro.intro.intro.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Precoherent C
P : Cᵒᵖ ⥤ Type w
h :
  ∀ (B : C) (α : Type) [inst : Fintype α] (X : α → C) (π : (a : α) → X a ⟶ B),
    EffectiveEpiFamily X π → Presieve.IsSheafFor P (Presieve.ofArrows X π)
B : C
α : Type
w✝ : Fintype α
X : α → C
π : (a : α) → X a ⟶ B
hS : EffectiveEpiFamily X π
⊢ Presieve.IsSheafFor P (Presieve.ofArrows X π)
[PROOFSTEP]
exact h _ _ _ _ hS
[GOAL]
C✝ : Type u_1
inst✝² : Category.{?u.3154, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S : Sieve X
⊢ (∃ α x Y π, EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)) →
    S ∈ GrothendieckTopology.sieves (coherentTopology C) X
[PROOFSTEP]
rintro ⟨α, ⟨h, ⟨Y, ⟨π, hπ⟩⟩⟩⟩
[GOAL]
case intro.intro.intro.intro
C✝ : Type u_1
inst✝² : Category.{?u.3154, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S : Sieve X
α : Type
h : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
hπ : EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)
⊢ S ∈ GrothendieckTopology.sieves (coherentTopology C) X
[PROOFSTEP]
have h_le : Sieve.generate (Presieve.ofArrows _ π) ≤ S :=
  by
  rw [Sieve.sets_iff_generate (Presieve.ofArrows _ π) S]
  apply Presieve.le_of_factorsThru_sieve (Presieve.ofArrows (fun i => Y i) π) S _
  intro W g f
  use W, 𝟙 W
  rcases f with ⟨i⟩
  exact ⟨π i, ⟨hπ.2 i, Category.id_comp (π i)⟩⟩
[GOAL]
C✝ : Type u_1
inst✝² : Category.{?u.3154, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S : Sieve X
α : Type
h : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
hπ : EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)
⊢ Sieve.generate (Presieve.ofArrows (fun i => Y i) π) ≤ S
[PROOFSTEP]
rw [Sieve.sets_iff_generate (Presieve.ofArrows _ π) S]
[GOAL]
C✝ : Type u_1
inst✝² : Category.{?u.3154, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S : Sieve X
α : Type
h : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
hπ : EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)
⊢ Presieve.ofArrows (fun i => Y i) π ≤ S.arrows
[PROOFSTEP]
apply Presieve.le_of_factorsThru_sieve (Presieve.ofArrows (fun i => Y i) π) S _
[GOAL]
C✝ : Type u_1
inst✝² : Category.{?u.3154, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S : Sieve X
α : Type
h : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
hπ : EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)
⊢ Presieve.FactorsThru (Presieve.ofArrows (fun i => Y i) π) S.arrows
[PROOFSTEP]
intro W g f
[GOAL]
C✝ : Type u_1
inst✝² : Category.{?u.3154, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S : Sieve X
α : Type
h : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
hπ : EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)
W : C
g : W ⟶ X
f : Presieve.ofArrows (fun i => Y i) π g
⊢ ∃ W_1 i e, S.arrows e ∧ i ≫ e = g
[PROOFSTEP]
use W, 𝟙 W
[GOAL]
case h
C✝ : Type u_1
inst✝² : Category.{?u.3154, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S : Sieve X
α : Type
h : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
hπ : EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)
W : C
g : W ⟶ X
f : Presieve.ofArrows (fun i => Y i) π g
⊢ ∃ e, S.arrows e ∧ 𝟙 W ≫ e = g
[PROOFSTEP]
rcases f with ⟨i⟩
[GOAL]
case h.mk
C✝ : Type u_1
inst✝² : Category.{?u.3154, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S : Sieve X
α : Type
h : Fintype α
Y✝ : α → C
π : (a : α) → Y✝ a ⟶ X
hπ : EffectiveEpiFamily Y✝ π ∧ ∀ (a : α), S.arrows (π a)
Y : C
i : α
⊢ ∃ e, S.arrows e ∧ 𝟙 (Y✝ i) ≫ e = π i
[PROOFSTEP]
exact ⟨π i, ⟨hπ.2 i, Category.id_comp (π i)⟩⟩
[GOAL]
case intro.intro.intro.intro
C✝ : Type u_1
inst✝² : Category.{?u.3154, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S : Sieve X
α : Type
h : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
hπ : EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)
h_le : Sieve.generate (Presieve.ofArrows (fun i => Y i) π) ≤ S
⊢ S ∈ GrothendieckTopology.sieves (coherentTopology C) X
[PROOFSTEP]
apply Coverage.saturate_of_superset (coherentCoverage C) h_le
[GOAL]
case intro.intro.intro.intro
C✝ : Type u_1
inst✝² : Category.{?u.3154, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S : Sieve X
α : Type
h : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
hπ : EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)
h_le : Sieve.generate (Presieve.ofArrows (fun i => Y i) π) ≤ S
⊢ Coverage.saturate (coherentCoverage C) X (Sieve.generate (Presieve.ofArrows (fun i => Y i) π))
[PROOFSTEP]
exact Coverage.saturate.of X _ ⟨α, inferInstance, Y, π, ⟨rfl, hπ.1⟩⟩
[GOAL]
C✝ : Type u_1
inst✝² : Category.{?u.4892, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X W : C
⊢ Presieve.IsSheaf (coherentTopology C) (yoneda.obj W)
[PROOFSTEP]
rw [isSheaf_coherent]
[GOAL]
C✝ : Type u_1
inst✝² : Category.{?u.4892, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X W : C
⊢ ∀ (B : C) (α : Type) [inst : Fintype α] (X : α → C) (π : (a : α) → X a ⟶ B),
    EffectiveEpiFamily X π → Presieve.IsSheafFor (yoneda.obj W) (Presieve.ofArrows X π)
[PROOFSTEP]
intro X α _ Y π H
[GOAL]
C✝ : Type u_1
inst✝³ : Category.{?u.4892, u_1} C✝
C : Type u_2
inst✝² : Category.{u_3, u_2} C
inst✝¹ : Precoherent C
X✝ W X : C
α : Type
inst✝ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
H : EffectiveEpiFamily Y π
⊢ Presieve.IsSheafFor (yoneda.obj W) (Presieve.ofArrows Y π)
[PROOFSTEP]
have h_colim := isColimitOfEffectiveEpiFamilyStruct Y π H.effectiveEpiFamily.some
[GOAL]
C✝ : Type u_1
inst✝³ : Category.{?u.4892, u_1} C✝
C : Type u_2
inst✝² : Category.{u_3, u_2} C
inst✝¹ : Precoherent C
X✝ W X : C
α : Type
inst✝ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
H : EffectiveEpiFamily Y π
h_colim : IsColimit (Presieve.cocone (Sieve.generateFamily Y π).arrows)
⊢ Presieve.IsSheafFor (yoneda.obj W) (Presieve.ofArrows Y π)
[PROOFSTEP]
rw [← Sieve.generateFamily_eq] at h_colim
[GOAL]
C✝ : Type u_1
inst✝³ : Category.{?u.4892, u_1} C✝
C : Type u_2
inst✝² : Category.{u_3, u_2} C
inst✝¹ : Precoherent C
X✝ W X : C
α : Type
inst✝ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
H : EffectiveEpiFamily Y π
h_colim : IsColimit (Presieve.cocone (Sieve.generate (Presieve.ofArrows Y π)).arrows)
⊢ Presieve.IsSheafFor (yoneda.obj W) (Presieve.ofArrows Y π)
[PROOFSTEP]
intro x hx
[GOAL]
C✝ : Type u_1
inst✝³ : Category.{?u.4892, u_1} C✝
C : Type u_2
inst✝² : Category.{u_3, u_2} C
inst✝¹ : Precoherent C
X✝ W X : C
α : Type
inst✝ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
H : EffectiveEpiFamily Y π
h_colim : IsColimit (Presieve.cocone (Sieve.generate (Presieve.ofArrows Y π)).arrows)
x : Presieve.FamilyOfElements (yoneda.obj W) (Presieve.ofArrows Y π)
hx : Presieve.FamilyOfElements.Compatible x
⊢ ∃! t, Presieve.FamilyOfElements.IsAmalgamation x t
[PROOFSTEP]
let x_ext := Presieve.FamilyOfElements.sieveExtend x
[GOAL]
C✝ : Type u_1
inst✝³ : Category.{?u.4892, u_1} C✝
C : Type u_2
inst✝² : Category.{u_3, u_2} C
inst✝¹ : Precoherent C
X✝ W X : C
α : Type
inst✝ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
H : EffectiveEpiFamily Y π
h_colim : IsColimit (Presieve.cocone (Sieve.generate (Presieve.ofArrows Y π)).arrows)
x : Presieve.FamilyOfElements (yoneda.obj W) (Presieve.ofArrows Y π)
hx : Presieve.FamilyOfElements.Compatible x
x_ext : Presieve.FamilyOfElements (yoneda.obj W) (Sieve.generate (Presieve.ofArrows Y π)).arrows :=
  Presieve.FamilyOfElements.sieveExtend x
⊢ ∃! t, Presieve.FamilyOfElements.IsAmalgamation x t
[PROOFSTEP]
have hx_ext := Presieve.FamilyOfElements.Compatible.sieveExtend hx
[GOAL]
C✝ : Type u_1
inst✝³ : Category.{?u.4892, u_1} C✝
C : Type u_2
inst✝² : Category.{u_3, u_2} C
inst✝¹ : Precoherent C
X✝ W X : C
α : Type
inst✝ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
H : EffectiveEpiFamily Y π
h_colim : IsColimit (Presieve.cocone (Sieve.generate (Presieve.ofArrows Y π)).arrows)
x : Presieve.FamilyOfElements (yoneda.obj W) (Presieve.ofArrows Y π)
hx : Presieve.FamilyOfElements.Compatible x
x_ext : Presieve.FamilyOfElements (yoneda.obj W) (Sieve.generate (Presieve.ofArrows Y π)).arrows :=
  Presieve.FamilyOfElements.sieveExtend x
hx_ext : Presieve.FamilyOfElements.Compatible (Presieve.FamilyOfElements.sieveExtend x)
⊢ ∃! t, Presieve.FamilyOfElements.IsAmalgamation x t
[PROOFSTEP]
let S := Sieve.generate (Presieve.ofArrows Y π)
[GOAL]
C✝ : Type u_1
inst✝³ : Category.{?u.4892, u_1} C✝
C : Type u_2
inst✝² : Category.{u_3, u_2} C
inst✝¹ : Precoherent C
X✝ W X : C
α : Type
inst✝ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
H : EffectiveEpiFamily Y π
h_colim : IsColimit (Presieve.cocone (Sieve.generate (Presieve.ofArrows Y π)).arrows)
x : Presieve.FamilyOfElements (yoneda.obj W) (Presieve.ofArrows Y π)
hx : Presieve.FamilyOfElements.Compatible x
x_ext : Presieve.FamilyOfElements (yoneda.obj W) (Sieve.generate (Presieve.ofArrows Y π)).arrows :=
  Presieve.FamilyOfElements.sieveExtend x
hx_ext : Presieve.FamilyOfElements.Compatible (Presieve.FamilyOfElements.sieveExtend x)
S : Sieve X := Sieve.generate (Presieve.ofArrows Y π)
⊢ ∃! t, Presieve.FamilyOfElements.IsAmalgamation x t
[PROOFSTEP]
obtain ⟨t, t_amalg, t_uniq⟩ : ∃! t, x_ext.IsAmalgamation t :=
  (Sieve.forallYonedaIsSheaf_iff_colimit S).mpr ⟨h_colim⟩ W x_ext hx_ext
[GOAL]
case intro.intro
C✝ : Type u_1
inst✝³ : Category.{?u.4892, u_1} C✝
C : Type u_2
inst✝² : Category.{u_3, u_2} C
inst✝¹ : Precoherent C
X✝ W X : C
α : Type
inst✝ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
H : EffectiveEpiFamily Y π
h_colim : IsColimit (Presieve.cocone (Sieve.generate (Presieve.ofArrows Y π)).arrows)
x : Presieve.FamilyOfElements (yoneda.obj W) (Presieve.ofArrows Y π)
hx : Presieve.FamilyOfElements.Compatible x
x_ext : Presieve.FamilyOfElements (yoneda.obj W) (Sieve.generate (Presieve.ofArrows Y π)).arrows :=
  Presieve.FamilyOfElements.sieveExtend x
hx_ext : Presieve.FamilyOfElements.Compatible (Presieve.FamilyOfElements.sieveExtend x)
S : Sieve X := Sieve.generate (Presieve.ofArrows Y π)
t : (yoneda.obj W).obj (Opposite.op X)
t_amalg : Presieve.FamilyOfElements.IsAmalgamation x_ext t
t_uniq :
  ∀ (y : (yoneda.obj W).obj (Opposite.op X)), (fun t => Presieve.FamilyOfElements.IsAmalgamation x_ext t) y → y = t
⊢ ∃! t, Presieve.FamilyOfElements.IsAmalgamation x t
[PROOFSTEP]
refine ⟨t, ?_, ?_⟩
[GOAL]
case intro.intro.refine_1
C✝ : Type u_1
inst✝³ : Category.{?u.4892, u_1} C✝
C : Type u_2
inst✝² : Category.{u_3, u_2} C
inst✝¹ : Precoherent C
X✝ W X : C
α : Type
inst✝ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
H : EffectiveEpiFamily Y π
h_colim : IsColimit (Presieve.cocone (Sieve.generate (Presieve.ofArrows Y π)).arrows)
x : Presieve.FamilyOfElements (yoneda.obj W) (Presieve.ofArrows Y π)
hx : Presieve.FamilyOfElements.Compatible x
x_ext : Presieve.FamilyOfElements (yoneda.obj W) (Sieve.generate (Presieve.ofArrows Y π)).arrows :=
  Presieve.FamilyOfElements.sieveExtend x
hx_ext : Presieve.FamilyOfElements.Compatible (Presieve.FamilyOfElements.sieveExtend x)
S : Sieve X := Sieve.generate (Presieve.ofArrows Y π)
t : (yoneda.obj W).obj (Opposite.op X)
t_amalg : Presieve.FamilyOfElements.IsAmalgamation x_ext t
t_uniq :
  ∀ (y : (yoneda.obj W).obj (Opposite.op X)), (fun t => Presieve.FamilyOfElements.IsAmalgamation x_ext t) y → y = t
⊢ (fun t => Presieve.FamilyOfElements.IsAmalgamation x t) t
[PROOFSTEP]
convert Presieve.isAmalgamation_restrict (Sieve.le_generate (Presieve.ofArrows Y π)) _ _ t_amalg
[GOAL]
case h.e.h.e'_6.h.h.h
C✝ : Type u_1
inst✝³ : Category.{?u.4892, u_1} C✝
C : Type u_2
inst✝² : Category.{u_3, u_2} C
inst✝¹ : Precoherent C
X✝ W X : C
α : Type
inst✝ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
H : EffectiveEpiFamily Y π
h_colim : IsColimit (Presieve.cocone (Sieve.generate (Presieve.ofArrows Y π)).arrows)
x : Presieve.FamilyOfElements (yoneda.obj W) (Presieve.ofArrows Y π)
hx : Presieve.FamilyOfElements.Compatible x
x_ext : Presieve.FamilyOfElements (yoneda.obj W) (Sieve.generate (Presieve.ofArrows Y π)).arrows :=
  Presieve.FamilyOfElements.sieveExtend x
hx_ext : Presieve.FamilyOfElements.Compatible (Presieve.FamilyOfElements.sieveExtend x)
S : Sieve X := Sieve.generate (Presieve.ofArrows Y π)
t : (yoneda.obj W).obj (Opposite.op X)
t_amalg : Presieve.FamilyOfElements.IsAmalgamation x_ext t
t_uniq :
  ∀ (y : (yoneda.obj W).obj (Opposite.op X)), (fun t => Presieve.FamilyOfElements.IsAmalgamation x_ext t) y → y = t
⊢ x =
    Presieve.FamilyOfElements.restrict (_ : Presieve.ofArrows Y π ≤ (Sieve.generate (Presieve.ofArrows Y π)).arrows)
      x_ext
[PROOFSTEP]
exact (Presieve.restrict_extend hx).symm
[GOAL]
case intro.intro.refine_2
C✝ : Type u_1
inst✝³ : Category.{?u.4892, u_1} C✝
C : Type u_2
inst✝² : Category.{u_3, u_2} C
inst✝¹ : Precoherent C
X✝ W X : C
α : Type
inst✝ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
H : EffectiveEpiFamily Y π
h_colim : IsColimit (Presieve.cocone (Sieve.generate (Presieve.ofArrows Y π)).arrows)
x : Presieve.FamilyOfElements (yoneda.obj W) (Presieve.ofArrows Y π)
hx : Presieve.FamilyOfElements.Compatible x
x_ext : Presieve.FamilyOfElements (yoneda.obj W) (Sieve.generate (Presieve.ofArrows Y π)).arrows :=
  Presieve.FamilyOfElements.sieveExtend x
hx_ext : Presieve.FamilyOfElements.Compatible (Presieve.FamilyOfElements.sieveExtend x)
S : Sieve X := Sieve.generate (Presieve.ofArrows Y π)
t : (yoneda.obj W).obj (Opposite.op X)
t_amalg : Presieve.FamilyOfElements.IsAmalgamation x_ext t
t_uniq :
  ∀ (y : (yoneda.obj W).obj (Opposite.op X)), (fun t => Presieve.FamilyOfElements.IsAmalgamation x_ext t) y → y = t
⊢ ∀ (y : (yoneda.obj W).obj (Opposite.op X)), (fun t => Presieve.FamilyOfElements.IsAmalgamation x t) y → y = t
[PROOFSTEP]
exact fun y hy ↦ t_uniq y <| Presieve.isAmalgamation_sieveExtend x y hy
[GOAL]
C✝ : Type u_1
inst✝⁴ : Category.{?u.13158, u_1} C✝
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Precoherent C
X : C
α : Type
inst✝¹ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
h : EffectiveEpiFamily Y π
β : α → Type
inst✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
⊢ EffectiveEpiFamily (fun c => Y_n c.fst c.snd) fun c => π_n c.fst c.snd ≫ π c.fst
[PROOFSTEP]
rw [← Sieve.effectiveEpimorphic_family]
[GOAL]
C✝ : Type u_1
inst✝⁴ : Category.{?u.13158, u_1} C✝
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Precoherent C
X : C
α : Type
inst✝¹ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
h : EffectiveEpiFamily Y π
β : α → Type
inst✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
⊢ Presieve.EffectiveEpimorphic (Presieve.ofArrows (fun c => Y_n c.fst c.snd) fun c => π_n c.fst c.snd ≫ π c.fst)
[PROOFSTEP]
suffices h₂ :
  (Sieve.generate (Presieve.ofArrows (fun (⟨a, b⟩ : Σ _, β _) => Y_n a b) (fun ⟨a, b⟩ => π_n a b ≫ π a))) ∈
    GrothendieckTopology.sieves (coherentTopology C) X
  by
  change Nonempty _
  rw [← Sieve.forallYonedaIsSheaf_iff_colimit]
  exact fun W => coherentTopology.isSheaf_yoneda_obj W _ h₂
[GOAL]
C✝ : Type u_1
inst✝⁴ : Category.{?u.13158, u_1} C✝
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Precoherent C
X : C
α : Type
inst✝¹ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
h : EffectiveEpiFamily Y π
β : α → Type
inst✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
h₂ :
  Sieve.generate
      (Presieve.ofArrows
        (fun x =>
          match x with
          | { fst := a, snd := b } => Y_n a b)
        fun x =>
        match x with
        | { fst := a, snd := b } => π_n a b ≫ π a) ∈
    GrothendieckTopology.sieves (coherentTopology C) X
⊢ Presieve.EffectiveEpimorphic (Presieve.ofArrows (fun c => Y_n c.fst c.snd) fun c => π_n c.fst c.snd ≫ π c.fst)
[PROOFSTEP]
change Nonempty _
[GOAL]
C✝ : Type u_1
inst✝⁴ : Category.{?u.13158, u_1} C✝
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Precoherent C
X : C
α : Type
inst✝¹ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
h : EffectiveEpiFamily Y π
β : α → Type
inst✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
h₂ :
  Sieve.generate
      (Presieve.ofArrows
        (fun x =>
          match x with
          | { fst := a, snd := b } => Y_n a b)
        fun x =>
        match x with
        | { fst := a, snd := b } => π_n a b ≫ π a) ∈
    GrothendieckTopology.sieves (coherentTopology C) X
⊢ Nonempty
    (IsColimit
      (Presieve.cocone
        (Sieve.generate (Presieve.ofArrows (fun c => Y_n c.fst c.snd) fun c => π_n c.fst c.snd ≫ π c.fst)).arrows))
[PROOFSTEP]
rw [← Sieve.forallYonedaIsSheaf_iff_colimit]
[GOAL]
C✝ : Type u_1
inst✝⁴ : Category.{?u.13158, u_1} C✝
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Precoherent C
X : C
α : Type
inst✝¹ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
h : EffectiveEpiFamily Y π
β : α → Type
inst✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
h₂ :
  Sieve.generate
      (Presieve.ofArrows
        (fun x =>
          match x with
          | { fst := a, snd := b } => Y_n a b)
        fun x =>
        match x with
        | { fst := a, snd := b } => π_n a b ≫ π a) ∈
    GrothendieckTopology.sieves (coherentTopology C) X
⊢ ∀ (W : C),
    Presieve.IsSheafFor (yoneda.obj W)
      (Sieve.generate (Presieve.ofArrows (fun c => Y_n c.fst c.snd) fun c => π_n c.fst c.snd ≫ π c.fst)).arrows
[PROOFSTEP]
exact fun W => coherentTopology.isSheaf_yoneda_obj W _ h₂
[GOAL]
C✝ : Type u_1
inst✝⁴ : Category.{?u.13158, u_1} C✝
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Precoherent C
X : C
α : Type
inst✝¹ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
h : EffectiveEpiFamily Y π
β : α → Type
inst✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
⊢ Sieve.generate
      (Presieve.ofArrows
        (fun x =>
          match x with
          | { fst := a, snd := b } => Y_n a b)
        fun x =>
        match x with
        | { fst := a, snd := b } => π_n a b ≫ π a) ∈
    GrothendieckTopology.sieves (coherentTopology C) X
[PROOFSTEP]
let h' := h
[GOAL]
C✝ : Type u_1
inst✝⁴ : Category.{?u.13158, u_1} C✝
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Precoherent C
X : C
α : Type
inst✝¹ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
h : EffectiveEpiFamily Y π
β : α → Type
inst✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
h' : EffectiveEpiFamily Y π := h
⊢ Sieve.generate
      (Presieve.ofArrows
        (fun x =>
          match x with
          | { fst := a, snd := b } => Y_n a b)
        fun x =>
        match x with
        | { fst := a, snd := b } => π_n a b ≫ π a) ∈
    GrothendieckTopology.sieves (coherentTopology C) X
[PROOFSTEP]
rw [← Sieve.effectiveEpimorphic_family] at h'
[GOAL]
C✝ : Type u_1
inst✝⁴ : Category.{?u.13158, u_1} C✝
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Precoherent C
X : C
α : Type
inst✝¹ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
h : EffectiveEpiFamily Y π
β : α → Type
inst✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
h' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)
⊢ Sieve.generate
      (Presieve.ofArrows
        (fun x =>
          match x with
          | { fst := a, snd := b } => Y_n a b)
        fun x =>
        match x with
        | { fst := a, snd := b } => π_n a b ≫ π a) ∈
    GrothendieckTopology.sieves (coherentTopology C) X
[PROOFSTEP]
let H' := H
[GOAL]
C✝ : Type u_1
inst✝⁴ : Category.{?u.13158, u_1} C✝
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Precoherent C
X : C
α : Type
inst✝¹ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
h : EffectiveEpiFamily Y π
β : α → Type
inst✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
h' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)
H' : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a) := H
⊢ Sieve.generate
      (Presieve.ofArrows
        (fun x =>
          match x with
          | { fst := a, snd := b } => Y_n a b)
        fun x =>
        match x with
        | { fst := a, snd := b } => π_n a b ≫ π a) ∈
    GrothendieckTopology.sieves (coherentTopology C) X
[PROOFSTEP]
conv at H' =>
  intro a
  rw [← Sieve.effectiveEpimorphic_family]
    -- Show that a covering sieve is a colimit, which implies the original set of arrows is regular
      -- epimorphic. We use the transitivity property of saturation
[GOAL]
C✝ : Type u_1
inst✝⁴ : Category.{?u.13158, u_1} C✝
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Precoherent C
X : C
α : Type
inst✝¹ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
h : EffectiveEpiFamily Y π
β : α → Type
inst✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
h' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)
H' : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a) := H
| ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
[PROOFSTEP]
  intro a
  rw [← Sieve.effectiveEpimorphic_family]
    -- Show that a covering sieve is a colimit, which implies the original set of arrows is regular
      -- epimorphic. We use the transitivity property of saturation
[GOAL]
C✝ : Type u_1
inst✝⁴ : Category.{?u.13158, u_1} C✝
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Precoherent C
X : C
α : Type
inst✝¹ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
h : EffectiveEpiFamily Y π
β : α → Type
inst✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
h' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)
H' : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a) := H
| ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
[PROOFSTEP]
  intro a
  rw [← Sieve.effectiveEpimorphic_family]
    -- Show that a covering sieve is a colimit, which implies the original set of arrows is regular
      -- epimorphic. We use the transitivity property of saturation
[GOAL]
C✝ : Type u_1
inst✝⁴ : Category.{?u.13158, u_1} C✝
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Precoherent C
X : C
α : Type
inst✝¹ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
h : EffectiveEpiFamily Y π
β : α → Type
inst✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
h' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)
H' : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a) := H
| ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
[PROOFSTEP]
intro a
[GOAL]
C✝ : Type u_1
inst✝⁴ : Category.{?u.13158, u_1} C✝
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Precoherent C
X : C
α : Type
inst✝¹ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
h : EffectiveEpiFamily Y π
β : α → Type
inst✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
h' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)
H' : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a) := H
a : α
| EffectiveEpiFamily (Y_n a) (π_n a)
[PROOFSTEP]
rw [← Sieve.effectiveEpimorphic_family]
  -- Show that a covering sieve is a colimit, which implies the original set of arrows is regular
    -- epimorphic. We use the transitivity property of saturation
[GOAL]
C✝ : Type u_1
inst✝⁴ : Category.{?u.13158, u_1} C✝
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Precoherent C
X : C
α : Type
inst✝¹ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
h : EffectiveEpiFamily Y π
β : α → Type
inst✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
h' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)
H' : ∀ (a : α), Presieve.EffectiveEpimorphic (Presieve.ofArrows (Y_n a) (π_n a))
⊢ Sieve.generate
      (Presieve.ofArrows
        (fun x =>
          match x with
          | { fst := a, snd := b } => Y_n a b)
        fun x =>
        match x with
        | { fst := a, snd := b } => π_n a b ≫ π a) ∈
    GrothendieckTopology.sieves (coherentTopology C) X
[PROOFSTEP]
apply Coverage.saturate.transitive X (Sieve.generate (Presieve.ofArrows Y π))
[GOAL]
case a
C✝ : Type u_1
inst✝⁴ : Category.{?u.13158, u_1} C✝
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Precoherent C
X : C
α : Type
inst✝¹ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
h : EffectiveEpiFamily Y π
β : α → Type
inst✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
h' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)
H' : ∀ (a : α), Presieve.EffectiveEpimorphic (Presieve.ofArrows (Y_n a) (π_n a))
⊢ Coverage.saturate (coherentCoverage C) X (Sieve.generate (Presieve.ofArrows Y π))
[PROOFSTEP]
apply Coverage.saturate.of
[GOAL]
case a.hS
C✝ : Type u_1
inst✝⁴ : Category.{?u.13158, u_1} C✝
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Precoherent C
X : C
α : Type
inst✝¹ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
h : EffectiveEpiFamily Y π
β : α → Type
inst✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
h' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)
H' : ∀ (a : α), Presieve.EffectiveEpimorphic (Presieve.ofArrows (Y_n a) (π_n a))
⊢ Presieve.ofArrows Y π ∈ Coverage.covering (coherentCoverage C) X
[PROOFSTEP]
use α, inferInstance, Y, π
[GOAL]
case a
C✝ : Type u_1
inst✝⁴ : Category.{?u.13158, u_1} C✝
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Precoherent C
X : C
α : Type
inst✝¹ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
h : EffectiveEpiFamily Y π
β : α → Type
inst✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
h' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)
H' : ∀ (a : α), Presieve.EffectiveEpimorphic (Presieve.ofArrows (Y_n a) (π_n a))
⊢ ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ X⦄,
    (Sieve.generate (Presieve.ofArrows Y π)).arrows f →
      Coverage.saturate (coherentCoverage C) Y_1
        (Sieve.pullback f
          (Sieve.generate
            (Presieve.ofArrows
              (fun x =>
                match x with
                | { fst := a, snd := b } => Y_n a b)
              fun x =>
              match x with
              | { fst := a, snd := b } => π_n a b ≫ π a)))
[PROOFSTEP]
intro V f ⟨Y₁, h, g, ⟨hY, hf⟩⟩
[GOAL]
case a
C✝ : Type u_1
inst✝⁴ : Category.{?u.13158, u_1} C✝
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Precoherent C
X : C
α : Type
inst✝¹ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
h✝ : EffectiveEpiFamily Y π
β : α → Type
inst✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
h' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)
H' : ∀ (a : α), Presieve.EffectiveEpimorphic (Presieve.ofArrows (Y_n a) (π_n a))
V : C
f : V ⟶ X
Y₁ : C
h : V ⟶ Y₁
g : Y₁ ⟶ X
hY : Presieve.ofArrows Y π g
hf : h ≫ g = f
⊢ Coverage.saturate (coherentCoverage C) V
    (Sieve.pullback f
      (Sieve.generate
        (Presieve.ofArrows
          (fun x =>
            match x with
            | { fst := a, snd := b } => Y_n a b)
          fun x =>
          match x with
          | { fst := a, snd := b } => π_n a b ≫ π a)))
[PROOFSTEP]
rw [← hf, Sieve.pullback_comp]
[GOAL]
case a
C✝ : Type u_1
inst✝⁴ : Category.{?u.13158, u_1} C✝
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Precoherent C
X : C
α : Type
inst✝¹ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
h✝ : EffectiveEpiFamily Y π
β : α → Type
inst✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
h' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)
H' : ∀ (a : α), Presieve.EffectiveEpimorphic (Presieve.ofArrows (Y_n a) (π_n a))
V : C
f : V ⟶ X
Y₁ : C
h : V ⟶ Y₁
g : Y₁ ⟶ X
hY : Presieve.ofArrows Y π g
hf : h ≫ g = f
⊢ Coverage.saturate (coherentCoverage C) V
    (Sieve.pullback h
      (Sieve.pullback g
        (Sieve.generate
          (Presieve.ofArrows
            (fun x =>
              match x with
              | { fst := a, snd := b } => Y_n a b)
            fun x =>
            match x with
            | { fst := a, snd := b } => π_n a b ≫ π a))))
[PROOFSTEP]
apply (coherentTopology C).pullback_stable'
[GOAL]
case a.a
C✝ : Type u_1
inst✝⁴ : Category.{?u.13158, u_1} C✝
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Precoherent C
X : C
α : Type
inst✝¹ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
h✝ : EffectiveEpiFamily Y π
β : α → Type
inst✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
h' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)
H' : ∀ (a : α), Presieve.EffectiveEpimorphic (Presieve.ofArrows (Y_n a) (π_n a))
V : C
f : V ⟶ X
Y₁ : C
h : V ⟶ Y₁
g : Y₁ ⟶ X
hY : Presieve.ofArrows Y π g
hf : h ≫ g = f
⊢ Sieve.pullback g
      (Sieve.generate
        (Presieve.ofArrows
          (fun x =>
            match x with
            | { fst := a, snd := b } => Y_n a b)
          fun x =>
          match x with
          | { fst := a, snd := b } => π_n a b ≫ π a)) ∈
    GrothendieckTopology.sieves (coherentTopology C) Y₁
[PROOFSTEP]
apply coherentTopology.mem_sieves_of_hasEffectiveEpiFamily
[GOAL]
case a.a.a
C✝ : Type u_1
inst✝⁴ : Category.{?u.13158, u_1} C✝
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Precoherent C
X : C
α : Type
inst✝¹ : Fintype α
Y : α → C
π : (a : α) → Y a ⟶ X
h✝ : EffectiveEpiFamily Y π
β : α → Type
inst✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
h' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)
H' : ∀ (a : α), Presieve.EffectiveEpimorphic (Presieve.ofArrows (Y_n a) (π_n a))
V : C
f : V ⟶ X
Y₁ : C
h : V ⟶ Y₁
g : Y₁ ⟶ X
hY : Presieve.ofArrows Y π g
hf : h ≫ g = f
⊢ ∃ α_1 x Y_1 π_1,
    EffectiveEpiFamily Y_1 π_1 ∧
      ∀ (a : α_1),
        (Sieve.pullback g
              (Sieve.generate
                (Presieve.ofArrows
                  (fun x =>
                    match x with
                    | { fst := a, snd := b } => Y_n a b)
                  fun x =>
                  match x with
                  | { fst := a, snd := b } => π_n a b ≫ π a))).arrows
          (π_1 a)
[PROOFSTEP]
rcases hY with ⟨i⟩
[GOAL]
case a.a.a.mk
C✝ : Type u_1
inst✝⁴ : Category.{?u.13158, u_1} C✝
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Precoherent C
X : C
α : Type
inst✝¹ : Fintype α
Y✝ : α → C
π : (a : α) → Y✝ a ⟶ X
h✝ : EffectiveEpiFamily Y✝ π
β : α → Type
inst✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y✝ a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
h' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y✝ π)
H' : ∀ (a : α), Presieve.EffectiveEpimorphic (Presieve.ofArrows (Y_n a) (π_n a))
V : C
f : V ⟶ X
Y : C
i : α
h : V ⟶ Y✝ i
hf : h ≫ π i = f
⊢ ∃ α_1 x Y π_1,
    EffectiveEpiFamily Y π_1 ∧
      ∀ (a : α_1),
        (Sieve.pullback (π i)
              (Sieve.generate
                (Presieve.ofArrows
                  (fun x =>
                    match x with
                    | { fst := a, snd := b } => Y_n a b)
                  fun x =>
                  match x with
                  | { fst := a, snd := b } => π_n a b ≫ π a))).arrows
          (π_1 a)
[PROOFSTEP]
use β i, inferInstance, Y_n i, π_n i, H i
[GOAL]
case right
C✝ : Type u_1
inst✝⁴ : Category.{?u.13158, u_1} C✝
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Precoherent C
X : C
α : Type
inst✝¹ : Fintype α
Y✝ : α → C
π : (a : α) → Y✝ a ⟶ X
h✝ : EffectiveEpiFamily Y✝ π
β : α → Type
inst✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y✝ a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
h' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y✝ π)
H' : ∀ (a : α), Presieve.EffectiveEpimorphic (Presieve.ofArrows (Y_n a) (π_n a))
V : C
f : V ⟶ X
Y : C
i : α
h : V ⟶ Y✝ i
hf : h ≫ π i = f
⊢ ∀ (a : β i),
    (Sieve.pullback (π i)
          (Sieve.generate
            (Presieve.ofArrows
              (fun x =>
                match x with
                | { fst := a, snd := b } => Y_n a b)
              fun x =>
              match x with
              | { fst := a, snd := b } => π_n a b ≫ π a))).arrows
      (π_n i a)
[PROOFSTEP]
intro b
[GOAL]
case right
C✝ : Type u_1
inst✝⁴ : Category.{?u.13158, u_1} C✝
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Precoherent C
X : C
α : Type
inst✝¹ : Fintype α
Y✝ : α → C
π : (a : α) → Y✝ a ⟶ X
h✝ : EffectiveEpiFamily Y✝ π
β : α → Type
inst✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y✝ a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
h' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y✝ π)
H' : ∀ (a : α), Presieve.EffectiveEpimorphic (Presieve.ofArrows (Y_n a) (π_n a))
V : C
f : V ⟶ X
Y : C
i : α
h : V ⟶ Y✝ i
hf : h ≫ π i = f
b : β i
⊢ (Sieve.pullback (π i)
        (Sieve.generate
          (Presieve.ofArrows
            (fun x =>
              match x with
              | { fst := a, snd := b } => Y_n a b)
            fun x =>
            match x with
            | { fst := a, snd := b } => π_n a b ≫ π a))).arrows
    (π_n i b)
[PROOFSTEP]
use Y_n i b, (𝟙 _), π_n i b ≫ π i, ⟨(⟨i, b⟩ : Σ (i : α), β i)⟩
[GOAL]
case right
C✝ : Type u_1
inst✝⁴ : Category.{?u.13158, u_1} C✝
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Precoherent C
X : C
α : Type
inst✝¹ : Fintype α
Y✝ : α → C
π : (a : α) → Y✝ a ⟶ X
h✝ : EffectiveEpiFamily Y✝ π
β : α → Type
inst✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y✝ a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)
h' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y✝ π)
H' : ∀ (a : α), Presieve.EffectiveEpimorphic (Presieve.ofArrows (Y_n a) (π_n a))
V : C
f : V ⟶ X
Y : C
i : α
h : V ⟶ Y✝ i
hf : h ≫ π i = f
b : β i
⊢ 𝟙 (Y_n i b) ≫ π_n i b ≫ π i = π_n i b ≫ π i
[PROOFSTEP]
exact Category.id_comp (π_n i b ≫ π i)
[GOAL]
C✝ : Type u_1
inst✝² : Category.{?u.18072, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S : Sieve X
⊢ S ∈ GrothendieckTopology.sieves (coherentTopology C) X ↔ ∃ α x Y π, EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)
[PROOFSTEP]
constructor
[GOAL]
case mp
C✝ : Type u_1
inst✝² : Category.{?u.18072, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S : Sieve X
⊢ S ∈ GrothendieckTopology.sieves (coherentTopology C) X → ∃ α x Y π, EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)
[PROOFSTEP]
intro h
[GOAL]
case mp
C✝ : Type u_1
inst✝² : Category.{?u.18072, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S : Sieve X
h : S ∈ GrothendieckTopology.sieves (coherentTopology C) X
⊢ ∃ α x Y π, EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)
[PROOFSTEP]
induction' h with Y T hS Y Y R S _ _ a b
[GOAL]
case mp.of
C✝ : Type u_1
inst✝² : Category.{?u.18072, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S : Sieve X
Y : C
T : Presieve Y
hS : T ∈ Coverage.covering (coherentCoverage C) Y
⊢ ∃ α x Y_1 π, EffectiveEpiFamily Y_1 π ∧ ∀ (a : α), (Sieve.generate T).arrows (π a)
[PROOFSTEP]
rcases hS with ⟨a, h, Y', π, h'⟩
[GOAL]
case mp.of.intro.intro.intro.intro
C✝ : Type u_1
inst✝² : Category.{?u.18072, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S : Sieve X
Y : C
T : Presieve Y
a : Type
h : Fintype a
Y' : a → C
π : (a : a) → Y' a ⟶ Y
h' : T = Presieve.ofArrows Y' π ∧ EffectiveEpiFamily Y' π
⊢ ∃ α x Y_1 π, EffectiveEpiFamily Y_1 π ∧ ∀ (a : α), (Sieve.generate T).arrows (π a)
[PROOFSTEP]
use a, h, Y', π, by tauto
[GOAL]
C✝ : Type u_1
inst✝² : Category.{?u.18072, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S : Sieve X
Y : C
T : Presieve Y
a : Type
h : Fintype a
Y' : a → C
π : (a : a) → Y' a ⟶ Y
h' : T = Presieve.ofArrows Y' π ∧ EffectiveEpiFamily Y' π
⊢ EffectiveEpiFamily Y' π
[PROOFSTEP]
tauto
[GOAL]
case right
C✝ : Type u_1
inst✝² : Category.{?u.18072, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S : Sieve X
Y : C
T : Presieve Y
a : Type
h : Fintype a
Y' : a → C
π : (a : a) → Y' a ⟶ Y
h' : T = Presieve.ofArrows Y' π ∧ EffectiveEpiFamily Y' π
⊢ ∀ (a : a), (Sieve.generate T).arrows (π a)
[PROOFSTEP]
intro a'
[GOAL]
case right
C✝ : Type u_1
inst✝² : Category.{?u.18072, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S : Sieve X
Y : C
T : Presieve Y
a : Type
h : Fintype a
Y' : a → C
π : (a : a) → Y' a ⟶ Y
h' : T = Presieve.ofArrows Y' π ∧ EffectiveEpiFamily Y' π
a' : a
⊢ (Sieve.generate T).arrows (π a')
[PROOFSTEP]
rcases h' with ⟨rfl, _⟩
[GOAL]
case right.intro
C✝ : Type u_1
inst✝² : Category.{?u.18072, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S : Sieve X
Y : C
a : Type
h : Fintype a
Y' : a → C
π : (a : a) → Y' a ⟶ Y
a' : a
right✝ : EffectiveEpiFamily Y' π
⊢ (Sieve.generate (Presieve.ofArrows Y' π)).arrows (π a')
[PROOFSTEP]
simp only [Sieve.generate_apply]
[GOAL]
case right.intro
C✝ : Type u_1
inst✝² : Category.{?u.18072, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S : Sieve X
Y : C
a : Type
h : Fintype a
Y' : a → C
π : (a : a) → Y' a ⟶ Y
a' : a
right✝ : EffectiveEpiFamily Y' π
⊢ ∃ Y_1 h g, Presieve.ofArrows Y' π g ∧ h ≫ g = π a'
[PROOFSTEP]
use Y' a', 𝟙 Y' a', π a', Presieve.ofArrows.mk a'
[GOAL]
case right
C✝ : Type u_1
inst✝² : Category.{?u.18072, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S : Sieve X
Y : C
a : Type
h : Fintype a
Y' : a → C
π : (a : a) → Y' a ⟶ Y
a' : a
right✝ : EffectiveEpiFamily Y' π
⊢ 𝟙 Y' a' ≫ π a' = π a'
[PROOFSTEP]
apply Category.id_comp
[GOAL]
case mp.top
C✝ : Type u_1
inst✝² : Category.{?u.18072, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S : Sieve X
Y : C
⊢ ∃ α x Y_1 π, EffectiveEpiFamily Y_1 π ∧ ∀ (a : α), ⊤.arrows (π a)
[PROOFSTEP]
use Unit, Unit.fintype, fun _ => Y, fun _ => (𝟙 Y)
[GOAL]
case h
C✝ : Type u_1
inst✝² : Category.{?u.18072, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S : Sieve X
Y : C
⊢ (EffectiveEpiFamily (fun x => Y) fun x => 𝟙 Y) ∧ (Unit → ⊤.arrows (𝟙 Y))
[PROOFSTEP]
cases' S with arrows downward_closed
[GOAL]
case h.mk
C✝ : Type u_1
inst✝² : Category.{?u.18072, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X Y : C
arrows : Presieve X
downward_closed : ∀ {Y Z : C} {f : Y ⟶ X}, arrows f → ∀ (g : Z ⟶ Y), arrows (g ≫ f)
⊢ (EffectiveEpiFamily (fun x => Y) fun x => 𝟙 Y) ∧ ∀ (a : Unit), ⊤.arrows ((fun x => 𝟙 Y) a)
[PROOFSTEP]
exact ⟨inferInstance, by simp only [Sieve.top_apply, forall_const]⟩
[GOAL]
C✝ : Type u_1
inst✝² : Category.{?u.18072, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X Y : C
arrows : Presieve X
downward_closed : ∀ {Y Z : C} {f : Y ⟶ X}, arrows f → ∀ (g : Z ⟶ Y), arrows (g ≫ f)
⊢ ∀ (a : Unit), ⊤.arrows ((fun x => 𝟙 Y) a)
[PROOFSTEP]
simp only [Sieve.top_apply, forall_const]
[GOAL]
case mp.transitive
C✝ : Type u_1
inst✝² : Category.{?u.18072, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S✝ : Sieve X
Y : C
R S : Sieve Y
a✝¹ : Coverage.saturate (coherentCoverage C) Y R
a✝ : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → Coverage.saturate (coherentCoverage C) Y_1 (Sieve.pullback f S)
a : ∃ α x Y_1 π, EffectiveEpiFamily Y_1 π ∧ ∀ (a : α), R.arrows (π a)
b :
  ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄,
    R.arrows f → ∃ α x Y_2 π, EffectiveEpiFamily Y_2 π ∧ ∀ (a : α), (Sieve.pullback f S).arrows (π a)
⊢ ∃ α x Y_1 π, EffectiveEpiFamily Y_1 π ∧ ∀ (a : α), S.arrows (π a)
[PROOFSTEP]
rcases a with ⟨α, w, Y₁, π, ⟨h₁, h₂⟩⟩
[GOAL]
case mp.transitive.intro.intro.intro.intro.intro
C✝ : Type u_1
inst✝² : Category.{?u.18072, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S✝ : Sieve X
Y : C
R S : Sieve Y
a✝¹ : Coverage.saturate (coherentCoverage C) Y R
a✝ : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → Coverage.saturate (coherentCoverage C) Y_1 (Sieve.pullback f S)
b :
  ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄,
    R.arrows f → ∃ α x Y_2 π, EffectiveEpiFamily Y_2 π ∧ ∀ (a : α), (Sieve.pullback f S).arrows (π a)
α : Type
w : Fintype α
Y₁ : α → C
π : (a : α) → Y₁ a ⟶ Y
h₁ : EffectiveEpiFamily Y₁ π
h₂ : ∀ (a : α), R.arrows (π a)
⊢ ∃ α x Y_1 π, EffectiveEpiFamily Y_1 π ∧ ∀ (a : α), S.arrows (π a)
[PROOFSTEP]
choose β _ Y_n π_n H using fun a => b (h₂ a)
[GOAL]
case mp.transitive.intro.intro.intro.intro.intro
C✝ : Type u_1
inst✝² : Category.{?u.18072, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S✝ : Sieve X
Y : C
R S : Sieve Y
a✝¹ : Coverage.saturate (coherentCoverage C) Y R
a✝ : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → Coverage.saturate (coherentCoverage C) Y_1 (Sieve.pullback f S)
b :
  ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄,
    R.arrows f → ∃ α x Y_2 π, EffectiveEpiFamily Y_2 π ∧ ∀ (a : α), (Sieve.pullback f S).arrows (π a)
α : Type
w : Fintype α
Y₁ : α → C
π : (a : α) → Y₁ a ⟶ Y
h₁ : EffectiveEpiFamily Y₁ π
h₂ : ∀ (a : α), R.arrows (π a)
β : α → Type
x✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (a_1 : β a) → Y_n a a_1 ⟶ Y₁ a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a) ∧ ∀ (a_1 : β a), (Sieve.pullback (π a) S).arrows (π_n a a_1)
⊢ ∃ α x Y_1 π, EffectiveEpiFamily Y_1 π ∧ ∀ (a : α), S.arrows (π a)
[PROOFSTEP]
use(Σ a, β a), inferInstance, fun ⟨a, b⟩ => Y_n a b, fun ⟨a, b⟩ => (π_n a b) ≫ (π a)
[GOAL]
case h
C✝ : Type u_1
inst✝² : Category.{?u.18072, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S✝ : Sieve X
Y : C
R S : Sieve Y
a✝¹ : Coverage.saturate (coherentCoverage C) Y R
a✝ : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → Coverage.saturate (coherentCoverage C) Y_1 (Sieve.pullback f S)
b :
  ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄,
    R.arrows f → ∃ α x Y_2 π, EffectiveEpiFamily Y_2 π ∧ ∀ (a : α), (Sieve.pullback f S).arrows (π a)
α : Type
w : Fintype α
Y₁ : α → C
π : (a : α) → Y₁ a ⟶ Y
h₁ : EffectiveEpiFamily Y₁ π
h₂ : ∀ (a : α), R.arrows (π a)
β : α → Type
x✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (a_1 : β a) → Y_n a a_1 ⟶ Y₁ a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a) ∧ ∀ (a_1 : β a), (Sieve.pullback (π a) S).arrows (π_n a a_1)
⊢ (EffectiveEpiFamily
      (fun x =>
        match x with
        | { fst := a, snd := b } => Y_n a b)
      fun x =>
      match x with
      | { fst := a, snd := b } => π_n a b ≫ π a) ∧
    ∀ (a : (a : α) × β a),
      S.arrows
        (match a with
        | { fst := a, snd := b } => π_n a b ≫ π a)
[PROOFSTEP]
constructor
[GOAL]
case h.left
C✝ : Type u_1
inst✝² : Category.{?u.18072, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S✝ : Sieve X
Y : C
R S : Sieve Y
a✝¹ : Coverage.saturate (coherentCoverage C) Y R
a✝ : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → Coverage.saturate (coherentCoverage C) Y_1 (Sieve.pullback f S)
b :
  ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄,
    R.arrows f → ∃ α x Y_2 π, EffectiveEpiFamily Y_2 π ∧ ∀ (a : α), (Sieve.pullback f S).arrows (π a)
α : Type
w : Fintype α
Y₁ : α → C
π : (a : α) → Y₁ a ⟶ Y
h₁ : EffectiveEpiFamily Y₁ π
h₂ : ∀ (a : α), R.arrows (π a)
β : α → Type
x✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (a_1 : β a) → Y_n a a_1 ⟶ Y₁ a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a) ∧ ∀ (a_1 : β a), (Sieve.pullback (π a) S).arrows (π_n a a_1)
⊢ EffectiveEpiFamily
    (fun x =>
      match x with
      | { fst := a, snd := b } => Y_n a b)
    fun x =>
    match x with
    | { fst := a, snd := b } => π_n a b ≫ π a
[PROOFSTEP]
exact EffectiveEpiFamily.transitive_of_finite _ h₁ _ (fun a => (H a).1)
[GOAL]
case h.right
C✝ : Type u_1
inst✝² : Category.{?u.18072, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S✝ : Sieve X
Y : C
R S : Sieve Y
a✝¹ : Coverage.saturate (coherentCoverage C) Y R
a✝ : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → Coverage.saturate (coherentCoverage C) Y_1 (Sieve.pullback f S)
b :
  ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄,
    R.arrows f → ∃ α x Y_2 π, EffectiveEpiFamily Y_2 π ∧ ∀ (a : α), (Sieve.pullback f S).arrows (π a)
α : Type
w : Fintype α
Y₁ : α → C
π : (a : α) → Y₁ a ⟶ Y
h₁ : EffectiveEpiFamily Y₁ π
h₂ : ∀ (a : α), R.arrows (π a)
β : α → Type
x✝ : (a : α) → Fintype (β a)
Y_n : (a : α) → β a → C
π_n : (a : α) → (a_1 : β a) → Y_n a a_1 ⟶ Y₁ a
H : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a) ∧ ∀ (a_1 : β a), (Sieve.pullback (π a) S).arrows (π_n a a_1)
⊢ ∀ (a : (a : α) × β a),
    S.arrows
      (match a with
      | { fst := a, snd := b } => π_n a b ≫ π a)
[PROOFSTEP]
exact fun c => (H c.fst).2 c.snd
[GOAL]
case mpr
C✝ : Type u_1
inst✝² : Category.{?u.18072, u_1} C✝
C : Type u_2
inst✝¹ : Category.{u_3, u_2} C
inst✝ : Precoherent C
X : C
S : Sieve X
⊢ (∃ α x Y π, EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)) →
    S ∈ GrothendieckTopology.sieves (coherentTopology C) X
[PROOFSTEP]
exact coherentTopology.mem_sieves_of_hasEffectiveEpiFamily S


[GOAL]
X : Type u_1
M : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝³ : TopologicalSpace X
inst✝² : Monoid M
inst✝¹ : TopologicalSpace M
inst✝ : ContinuousMul M
f : C(X, Mˣ)
⊢ (fun f =>
        mk fun x =>
          { val := ↑↑f x, inv := ↑↑f⁻¹ x, val_inv := (_ : ↑(↑f * ↑f⁻¹) x = ↑1 x),
            inv_val := (_ : ↑(↑f⁻¹ * ↑f) x = ↑1 x) })
      ((fun f =>
          { val := mk fun x => ↑(↑f x), inv := mk fun x => ↑(↑f x)⁻¹,
            val_inv := (_ : ((mk fun x => ↑(↑f x)) * mk fun x => ↑(↑f x)⁻¹) = 1),
            inv_val := (_ : ((mk fun x => ↑(↑f x)⁻¹) * mk fun x => ↑(↑f x)) = 1) })
        f) =
    f
[PROOFSTEP]
ext
[GOAL]
case h.a
X : Type u_1
M : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝³ : TopologicalSpace X
inst✝² : Monoid M
inst✝¹ : TopologicalSpace M
inst✝ : ContinuousMul M
f : C(X, Mˣ)
a✝ : X
⊢ ↑(↑((fun f =>
              mk fun x =>
                { val := ↑↑f x, inv := ↑↑f⁻¹ x, val_inv := (_ : ↑(↑f * ↑f⁻¹) x = ↑1 x),
                  inv_val := (_ : ↑(↑f⁻¹ * ↑f) x = ↑1 x) })
            ((fun f =>
                { val := mk fun x => ↑(↑f x), inv := mk fun x => ↑(↑f x)⁻¹,
                  val_inv := (_ : ((mk fun x => ↑(↑f x)) * mk fun x => ↑(↑f x)⁻¹) = 1),
                  inv_val := (_ : ((mk fun x => ↑(↑f x)⁻¹) * mk fun x => ↑(↑f x)) = 1) })
              f))
        a✝) =
    ↑(↑f a✝)
[PROOFSTEP]
rfl
[GOAL]
X : Type u_1
M : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝³ : TopologicalSpace X
inst✝² : Monoid M
inst✝¹ : TopologicalSpace M
inst✝ : ContinuousMul M
f : C(X, M)ˣ
⊢ (fun f =>
        { val := mk fun x => ↑(↑f x), inv := mk fun x => ↑(↑f x)⁻¹,
          val_inv := (_ : ((mk fun x => ↑(↑f x)) * mk fun x => ↑(↑f x)⁻¹) = 1),
          inv_val := (_ : ((mk fun x => ↑(↑f x)⁻¹) * mk fun x => ↑(↑f x)) = 1) })
      ((fun f =>
          mk fun x =>
            { val := ↑↑f x, inv := ↑↑f⁻¹ x, val_inv := (_ : ↑(↑f * ↑f⁻¹) x = ↑1 x),
              inv_val := (_ : ↑(↑f⁻¹ * ↑f) x = ↑1 x) })
        f) =
    f
[PROOFSTEP]
ext
[GOAL]
case a.h
X : Type u_1
M : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝³ : TopologicalSpace X
inst✝² : Monoid M
inst✝¹ : TopologicalSpace M
inst✝ : ContinuousMul M
f : C(X, M)ˣ
a✝ : X
⊢ ↑↑((fun f =>
              { val := mk fun x => ↑(↑f x), inv := mk fun x => ↑(↑f x)⁻¹,
                val_inv := (_ : ((mk fun x => ↑(↑f x)) * mk fun x => ↑(↑f x)⁻¹) = 1),
                inv_val := (_ : ((mk fun x => ↑(↑f x)⁻¹) * mk fun x => ↑(↑f x)) = 1) })
            ((fun f =>
                mk fun x =>
                  { val := ↑↑f x, inv := ↑↑f⁻¹ x, val_inv := (_ : ↑(↑f * ↑f⁻¹) x = ↑1 x),
                    inv_val := (_ : ↑(↑f⁻¹ * ↑f) x = ↑1 x) })
              f))
      a✝ =
    ↑↑f a✝
[PROOFSTEP]
rfl
[GOAL]
X : Type u_1
M : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝³ : TopologicalSpace X
inst✝² : Monoid M
inst✝¹ : TopologicalSpace M
inst✝ : ContinuousMul M
f : C(X, M)ˣ
x : X
⊢ ↑(↑(↑unitsLift.symm f) x)⁻¹ = ↑↑f⁻¹ x
[PROOFSTEP]
rfl
[GOAL]
X : Type u_1
M : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
f : C(X, R)
h : ∀ (x : X), IsUnit (↑f x)
⊢ Continuous fun x => IsUnit.unit (_ : IsUnit (↑f x))
[PROOFSTEP]
refine'
  continuous_induced_rng.2
    (Continuous.prod_mk f.continuous (MulOpposite.continuous_op.comp (continuous_iff_continuousAt.mpr fun x => _)))
[GOAL]
X : Type u_1
M : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
f : C(X, R)
h : ∀ (x : X), IsUnit (↑f x)
x : X
⊢ ContinuousAt (fun x => ↑((fun x => IsUnit.unit (_ : IsUnit (↑f x))) x)⁻¹) x
[PROOFSTEP]
have := NormedRing.inverse_continuousAt (h x).unit
[GOAL]
X : Type u_1
M : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
f : C(X, R)
h : ∀ (x : X), IsUnit (↑f x)
x : X
this : ContinuousAt Ring.inverse ↑(IsUnit.unit (_ : IsUnit (↑f x)))
⊢ ContinuousAt (fun x => ↑((fun x => IsUnit.unit (_ : IsUnit (↑f x))) x)⁻¹) x
[PROOFSTEP]
simp only
[GOAL]
X : Type u_1
M : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
f : C(X, R)
h : ∀ (x : X), IsUnit (↑f x)
x : X
this : ContinuousAt Ring.inverse ↑(IsUnit.unit (_ : IsUnit (↑f x)))
⊢ ContinuousAt (fun x => ↑(IsUnit.unit (_ : IsUnit (↑f x)))⁻¹) x
[PROOFSTEP]
simp only [← Ring.inverse_unit, IsUnit.unit_spec] at this ⊢
[GOAL]
X : Type u_1
M : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
f : C(X, R)
h : ∀ (x : X), IsUnit (↑f x)
x : X
this : ContinuousAt Ring.inverse (↑f x)
⊢ ContinuousAt (fun x => Ring.inverse (↑f x)) x
[PROOFSTEP]
exact this.comp (f.continuousAt x)
[GOAL]
X : Type u_1
M : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
f : C(X, R)
h : ∀ (x : X), IsUnit (↑f x)
⊢ (mk fun x => ↑(↑(unitsOfForallIsUnit h) x)) = f
[PROOFSTEP]
ext
[GOAL]
case h
X : Type u_1
M : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
f : C(X, R)
h : ∀ (x : X), IsUnit (↑f x)
a✝ : X
⊢ ↑(mk fun x => ↑(↑(unitsOfForallIsUnit h) x)) a✝ = ↑f a✝
[PROOFSTEP]
rfl
[GOAL]
X : Type u_1
M : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
f : C(X, R)
h : ∀ (x : X), IsUnit (↑f x)
⊢ ↑(↑unitsLift (unitsOfForallIsUnit h)) = f
[PROOFSTEP]
ext
[GOAL]
case h
X : Type u_1
M : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
f : C(X, R)
h : ∀ (x : X), IsUnit (↑f x)
a✝ : X
⊢ ↑↑(↑unitsLift (unitsOfForallIsUnit h)) a✝ = ↑f a✝
[PROOFSTEP]
rfl
[GOAL]
X : Type u_1
M : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : NormedField 𝕜
inst✝ : CompleteSpace 𝕜
f : C(X, 𝕜)
⊢ IsUnit f ↔ ∀ (x : X), ↑f x ≠ 0
[PROOFSTEP]
simp_rw [f.isUnit_iff_forall_isUnit, isUnit_iff_ne_zero]
[GOAL]
X : Type u_1
M : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : NormedField 𝕜
inst✝ : CompleteSpace 𝕜
f : C(X, 𝕜)
⊢ spectrum 𝕜 f = Set.range ↑f
[PROOFSTEP]
ext x
[GOAL]
case h
X : Type u_1
M : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : NormedField 𝕜
inst✝ : CompleteSpace 𝕜
f : C(X, 𝕜)
x : 𝕜
⊢ x ∈ spectrum 𝕜 f ↔ x ∈ Set.range ↑f
[PROOFSTEP]
simp only [spectrum.mem_iff, isUnit_iff_forall_ne_zero, not_forall, coe_sub, Pi.sub_apply, algebraMap_apply,
  Algebra.id.smul_eq_mul, mul_one, Classical.not_not, Set.mem_range, sub_eq_zero, @eq_comm _ x _]