|
| 1 | +/- |
| 2 | +Copyright (c) 2026 Christian Merten. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Christian Merten |
| 5 | +-/ |
| 6 | +module |
| 7 | + |
| 8 | +public import Mathlib.CategoryTheory.Limits.Final |
| 9 | +public import Mathlib.CategoryTheory.Limits.VanKampen |
| 10 | +public import Mathlib.CategoryTheory.Sites.Hypercover.SheafOfTypes |
| 11 | + |
| 12 | +/-! |
| 13 | +# The sheaf condition and universal coproducts |
| 14 | +
|
| 15 | +In this file we show that if `{ fᵢ : Yᵢ ⟶ X }` is a family of morphisms and `∐ᵢ Yᵢ` is a universal |
| 16 | +coproduct, then any presheaf `F` that preserves products is a sheaf for the single object covering |
| 17 | +`{ ∐ᵢ Yᵢ ⟶ X }` if and only if it is a sheaf for `{ fᵢ : Yᵢ ⟶ X }ᵢ`. |
| 18 | +
|
| 19 | +We provide both a version for a general coefficient category and one for type values presheafs. |
| 20 | +-/ |
| 21 | + |
| 22 | +universe w |
| 23 | + |
| 24 | +@[expose] public section |
| 25 | + |
| 26 | +namespace CategoryTheory |
| 27 | + |
| 28 | +open Limits Opposite |
| 29 | + |
| 30 | +variable {C : Type*} [Category* C] {A : Type*} [Category* A] {S : C} |
| 31 | + |
| 32 | +set_option backward.isDefEq.respectTransparency false in |
| 33 | +/-- |
| 34 | +Let `E` be a pre-`0`-hypercover with pairwise pullbacks. If `∐ᵢ Eᵢ` is a universal coproduct |
| 35 | +and the presheaf `F` preserves products, then the multifork associated to the single object |
| 36 | +`0`-hypercover `{ ∐ᵢ Eᵢ ⟶ S }` is exact if and only if the multifork for `E` is exact. |
| 37 | +-/ |
| 38 | +noncomputable |
| 39 | +def PreZeroHypercover.isLimitSigmaOfIsColimitEquiv (E : PreZeroHypercover.{w} S) |
| 40 | + [E.HasPullbacks] {c : Cofan E.X} (hc : IsColimit c) (huniv : IsUniversalColimit c) |
| 41 | + [(E.sigmaOfIsColimit hc).HasPullbacks] |
| 42 | + [∀ i, HasPullback (E.f i) ((E.sigmaOfIsColimit hc).f PUnit.unit)] |
| 43 | + (F : Cᵒᵖ ⥤ A) |
| 44 | + [PreservesLimit (Discrete.functor fun i ↦ op (E.toPreOneHypercover.X i)) F] |
| 45 | + [PreservesLimit (Discrete.functor fun i ↦ op (E.toPreOneHypercover.Y' i)) F] : |
| 46 | + IsLimit ((E.sigmaOfIsColimit hc).toPreOneHypercover.multifork F) ≃ |
| 47 | + IsLimit (E.toPreOneHypercover.multifork F) := by |
| 48 | + have : HasPullback (Cofan.IsColimit.desc hc E.f) (Cofan.IsColimit.desc hc E.f) := |
| 49 | + inferInstanceAs <| HasPullback |
| 50 | + ((E.sigmaOfIsColimit hc).f ⟨⟩) ((E.sigmaOfIsColimit hc).f ⟨⟩) |
| 51 | + let c' : Cofan E.toPreOneHypercover.Y' := |
| 52 | + Cofan.mk |
| 53 | + ((E.sigmaOfIsColimit hc).toPreOneHypercover.Y (i₁ := ⟨⟩) (i₂ := ⟨⟩) ⟨⟩) |
| 54 | + fun b ↦ pullback.map _ _ _ _ (c.inj _) (c.inj _) (𝟙 _) (by simp) (by simp) |
| 55 | + let equiv : E.toPreOneHypercover.I₁' ≃ E.I₀ × E.I₀ := |
| 56 | + Equiv.sigmaPUnit (E.toPreOneHypercover.I₀ × E.toPreOneHypercover.I₀) |
| 57 | + have hc' : IsColimit c' := by |
| 58 | + refine (c'.isColimitEquivOfEquiv equiv.symm).symm (Nonempty.some ?_) |
| 59 | + exact IsUniversalColimit.nonempty_isColimit_prod_of_isPullback |
| 60 | + huniv huniv E.f E.f ((E.sigmaOfIsColimit hc).f ⟨⟩) ((E.sigmaOfIsColimit hc).f ⟨⟩) |
| 61 | + (fun i j ↦ .of_hasPullback _ _) (.of_hasPullback _ _) (.refl _) (by simp) (by simp) |
| 62 | + (by simp [c', equiv, Equiv.sigmaPUnit]) (by simp [c', equiv, Equiv.sigmaPUnit]) |
| 63 | + refine .trans ?_ (E.toPreOneHypercover.isLimitSigmaOfIsColimitEquiv hc hc' F) |
| 64 | + apply PreOneHypercover.isLimitEquivOfIso |
| 65 | + refine PreOneHypercover.isoMk (.refl _) (fun _ ↦ .refl _) (fun _ _ ↦ .refl _) |
| 66 | + (fun _ _ _ ↦ Iso.refl _) (by cat_disch) ?_ ?_ |
| 67 | + · intro ⟨⟩ ⟨⟩ k |
| 68 | + refine Cofan.IsColimit.hom_ext hc' _ _ fun k ↦ ?_ |
| 69 | + congr 1 |
| 70 | + exact Cofan.IsColimit.hom_ext hc' _ _ fun a ↦ by simp; simp [c'] |
| 71 | + · intro ⟨⟩ ⟨⟩ k |
| 72 | + exact Cofan.IsColimit.hom_ext hc' _ _ fun a ↦ by simp; simp [c'] |
| 73 | + |
| 74 | +set_option backward.isDefEq.respectTransparency false in |
| 75 | +open PreZeroHypercover in |
| 76 | +/-- |
| 77 | +Let `{ fᵢ : Xᵢ ⟶ S }` be a family of morphisms. If `∐ᵢ Xᵢ` is a universal coproduct |
| 78 | +and the presheaf `F` preserves products, then `F` is a sheaf for the single object covering |
| 79 | +`{ ∐ᵢ Xᵢ ⟶ S }` if and only if it is a sheaf for `{ fᵢ : Xᵢ ⟶ S }ᵢ`. |
| 80 | +-/ |
| 81 | +lemma Presieve.isSheafFor_sigmaDesc_iff {ι : Type*} {X : ι → C} (f : ∀ i, X i ⟶ S) |
| 82 | + [(ofArrows X f).HasPairwisePullbacks] {c : Cofan X} (hc : IsColimit c) |
| 83 | + (hc' : IsUniversalColimit c) |
| 84 | + [HasPullback (Cofan.IsColimit.desc hc f) (Cofan.IsColimit.desc hc f)] |
| 85 | + [∀ i, HasPullback (f i) (Cofan.IsColimit.desc hc f)] |
| 86 | + (F : Cᵒᵖ ⥤ Type*) |
| 87 | + [PreservesLimit (Discrete.functor <| fun i ↦ op (X i)) F] |
| 88 | + [PreservesLimit (Discrete.functor fun (ij : ι × ι) ↦ op (pullback (f ij.1) (f ij.2))) F] : |
| 89 | + Presieve.IsSheafFor F (.singleton <| Cofan.IsColimit.desc hc f) ↔ |
| 90 | + Presieve.IsSheafFor F (.ofArrows X f) := by |
| 91 | + let E := PreZeroHypercover.mk _ _ f |
| 92 | + have : (E.sigmaOfIsColimit hc).HasPullbacks := |
| 93 | + fun i j ↦ by dsimp [sigmaOfIsColimit]; infer_instance |
| 94 | + have (i : E.I₀) : HasPullback (E.f i) ((E.sigmaOfIsColimit hc).f PUnit.unit) := by |
| 95 | + dsimp [sigmaOfIsColimit_f]; infer_instance |
| 96 | + have : PreservesLimit (Discrete.functor fun i ↦ op (E.toPreOneHypercover.X i)) F := by |
| 97 | + dsimp [E]; infer_instance |
| 98 | + have : PreservesLimit (Discrete.functor fun i ↦ op (E.toPreOneHypercover.Y' i)) F := by |
| 99 | + convert Functor.Initial.preservesLimit_of_comp (Discrete.equivalence <| .sigmaPUnit _).inverse |
| 100 | + assumption |
| 101 | + let equiv := (E.isLimitSigmaOfIsColimitEquiv hc hc' F).nonempty_congr |
| 102 | + rwa [isLimit_toPreOneHypercover_type_iff, isLimit_toPreOneHypercover_type_iff, |
| 103 | + presieve₀_sigmaOfIsColimit] at equiv |
| 104 | + |
| 105 | +end CategoryTheory |
0 commit comments