@@ -93,6 +93,13 @@ def FamilyOfElements (P : Cᵒᵖ ⥤ Type w) (R : Presieve X) :=
9393instance : Inhabited (FamilyOfElements P (⊥ : Presieve X)) :=
9494 ⟨fun _ _ => False.elim⟩
9595
96+ @[ext]
97+ lemma FamilyOfElements.ext {R : Presieve X} {x y : R.FamilyOfElements P}
98+ (H : ∀ {Y : C} (f : Y ⟶ X) (hf : R f), x f hf = y f hf) :
99+ x = y := by
100+ funext Z f hf
101+ exact H f hf
102+
96103/-- A family of elements for a presheaf on the presieve `R₂` can be restricted to a smaller presieve
97104`R₁`.
98105-/
@@ -113,6 +120,21 @@ lemma FamilyOfElements.restrict_map
113120 (p : FamilyOfElements P R) (φ : P ⟶ Q) {R' : Presieve X} (h : R' ≤ R) :
114121 (p.restrict h).map φ = (p.map φ).restrict h := rfl
115122
123+ variable (P) in
124+ /-- A family of elements on `{ f : X ⟶ Y }` is an element of `F(X)`. -/
125+ @ [simps apply, simps -isSimp symm_apply]
126+ def FamilyOfElements.singletonEquiv {X Y : C} (f : X ⟶ Y) :
127+ (singleton f).FamilyOfElements P ≃ P.obj (op X) where
128+ toFun x := x f (by simp)
129+ invFun x Z g hg := P.map (eqToHom <| by cases hg; rfl).op x
130+ left_inv x := by ext _ _ ⟨rfl⟩; simp
131+ right_inv x := by simp
132+
133+ @[simp]
134+ lemma FamilyOfElements.singletonEquiv_symm_apply_self {X Y : C} (f : X ⟶ Y) (x : P.obj (op X)) :
135+ (singletonEquiv P f).symm x f ⟨⟩ = x := by
136+ simp [singletonEquiv_symm_apply]
137+
116138/-- A family of elements for the arrow set `R` is *compatible* if for any `f₁ : Y₁ ⟶ X` and
117139`f₂ : Y₂ ⟶ X` in `R`, and any `g₁ : Z ⟶ Y₁` and `g₂ : Z ⟶ Y₂`, if the square `g₁ ≫ f₁ = g₂ ≫ f₂`
118140commutes then the elements of `P Z` obtained by restricting the element of `P Y₁` along `g₁` and
@@ -267,6 +289,14 @@ theorem FamilyOfElements.comp_of_compatible (S : Sieve X) {x : FamilyOfElements
267289 x (g ≫ f) (S.downward_closed hf g) = P.map g.op (x f hf) := by
268290 simpa using t (𝟙 _) g (S.downward_closed hf g) hf (id_comp _)
269291
292+ lemma FamilyOfElements.compatible_singleton_iff
293+ {X Y : C} (f : X ⟶ Y) (x : (singleton f).FamilyOfElements P) :
294+ x.Compatible ↔ ∀ {Z : C} (p₁ p₂ : Z ⟶ X), p₁ ≫ f = p₂ ≫ f →
295+ P.map p₁.op (x f ⟨⟩) = P.map p₂.op (x f ⟨⟩) := by
296+ refine ⟨fun H Z p₁ p₂ h ↦ H _ _ _ _ h, fun H Y₁ Y₂ Z g₁ g₂ f₁ f₂ ↦ ?_⟩
297+ rintro ⟨rfl⟩ ⟨rfl⟩ h
298+ exact H _ _ h
299+
270300section FunctorPullback
271301
272302variable {D : Type u₂} [Category.{v₂} D] (F : D ⥤ C) {Z : D}
@@ -372,6 +402,14 @@ theorem isAmalgamation_sieveExtend {R : Presieve X} (x : FamilyOfElements P R) (
372402 dsimp [FamilyOfElements.sieveExtend]
373403 rw [← ht _, ← FunctorToTypes.map_comp_apply, ← op_comp, hf.choose_spec.choose_spec.choose_spec.2 ]
374404
405+ @[simp]
406+ lemma FamilyOfElements.isAmalgamation_singleton_iff {X Y : C} (f : X ⟶ Y)
407+ (x : (singleton f).FamilyOfElements P) (y : P.obj (op Y)) :
408+ x.IsAmalgamation y ↔ P.map f.op y = x f ⟨⟩ := by
409+ refine ⟨fun H ↦ H _ _, ?_⟩
410+ rintro H Y g ⟨rfl⟩
411+ exact H
412+
375413/-- A presheaf is separated for a presieve if there is at most one amalgamation. -/
376414def IsSeparatedFor (P : Cᵒᵖ ⥤ Type w) (R : Presieve X) : Prop :=
377415 ∀ (x : FamilyOfElements P R) (t₁ t₂), x.IsAmalgamation t₁ → x.IsAmalgamation t₂ → t₁ = t₂
@@ -757,6 +795,24 @@ theorem isSheafFor_arrows_iff_pullbacks : (ofArrows X π).IsSheafFor P ↔
757795
758796end Arrows
759797
798+ @[simp]
799+ lemma isSeparatedFor_singleton {X Y : C} {f : X ⟶ Y} :
800+ Presieve.IsSeparatedFor P (.singleton f) ↔
801+ Function.Injective (P.map f.op) := by
802+ rw [IsSeparatedFor, Equiv.forall_congr_left (Presieve.FamilyOfElements.singletonEquiv P f)]
803+ simp_rw [FamilyOfElements.isAmalgamation_singleton_iff,
804+ FamilyOfElements.singletonEquiv_symm_apply_self, Function.Injective]
805+ aesop
806+
807+ lemma isSheafFor_singleton {X Y : C} {f : X ⟶ Y} :
808+ Presieve.IsSheafFor P (.singleton f) ↔
809+ ∀ (x : P.obj (op X)),
810+ (∀ {Z : C} (p₁ p₂ : Z ⟶ X), p₁ ≫ f = p₂ ≫ f → P.map p₁.op x = P.map p₂.op x) →
811+ ∃! y, P.map f.op y = x := by
812+ rw [IsSheafFor, Equiv.forall_congr_left (Presieve.FamilyOfElements.singletonEquiv P f)]
813+ simp_rw [FamilyOfElements.compatible_singleton_iff,
814+ FamilyOfElements.isAmalgamation_singleton_iff, FamilyOfElements.singletonEquiv_symm_apply_self]
815+
760816end Presieve
761817
762818end CategoryTheory
0 commit comments