Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


Quelle  Elements.lean   Sprache: Lean

 

/-
Copyright (c) 2024 Markus Himmel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Markus Himmel, Emily Riehl
-/

module

public import Mathlib.CategoryTheory.ConcreteCategory.Elementwise
public import Mathlib.CategoryTheory.Elements
public import Mathlib.CategoryTheory.Limits.Creates
public import Mathlib.CategoryTheory.Limits.Preserves.Limits
public import Mathlib.CategoryTheory.Limits.Types.Limits

/-!
# Limits in the category of elements

We show that if `C` has limits of shape `I` and `A : C ⥤ Type w` preserves limits of shape `I`, then
the category of elements of `A` has limits of shape `I` and the forgetful functor
`π : A.Elements ⥤ C` creates them.

## Further results

- If `A` is (co)representable, then `A.Elements` has an initial object.
-/


@[expose] public section

universe w v₁ v u₁ u

namespace CategoryTheory

open Limits Opposite ConcreteCategory

variable {C : Type u} [Category.{v} C]

namespace Functor.Elements

section

variable {A : C ⥤ Type w} {I : Type u₁} [Category.{v₁} I] [Small.{w} I]

namespace CreatesLimitsAux

variable (F : I ⥤ A.Elements)

/-- (implementation) A system `(Fi, fi)_i` of elements induces an element in `lim_i A(Fi)`. -/
noncomputable def liftedConeElement' : limit ((F ⋙ π A) ⋙ A) :=
  Types.Limit.mk _ (fun i => (F.obj i).2) (by simp)

@[simp]
lemma π_liftedConeElement' (i : I) :
    dsimp% limit.π ((F ⋙ π A) ⋙ A) i (liftedConeElement' F) = (F.obj i).2 :=
  Types.Limit.π_mk _ _ _ _

variable [HasLimitsOfShape I C] [PreservesLimitsOfShape I A]

/-- (implementation) A system `(Fi, fi)_i` of elements induces an element in `A(lim_i Fi)`. -/
noncomputable def liftedConeElement : A.obj (limit (F ⋙ π A)) :=
  (preservesLimitIso A (F ⋙ π A)).inv (liftedConeElement' F)

@[simp]
lemma map_lift_mapCone (c : Cone F) :
    dsimp% A.map (limit.lift (F ⋙ π A) ((π A).mapCone c)) c.pt.val = liftedConeElement F := by
  apply (preservesLimitIso A (F ⋙ π A)).toEquiv.injective
  ext i
  have h₂ := (c.π.app i).map_val
  simpa [-Functor.comp_obj, ← comp_apply, ← Functor.map_comp, liftedConeElement, liftedConeElement']

@[simp]
lemma map_π_liftedConeElement (i : I) :
    dsimp% A.map (limit.π (F ⋙ π A) i) (liftedConeElement F) = (F.obj i).val := by
  have := ConcreteCategory.congr_hom
    (preservesLimitIso_inv_π A (F ⋙ π A) i) (liftedConeElement' F)
  simp [liftedConeElement, ← comp_apply]

/-- (implementation) The constructed limit cone. -/
@[implicit_reducible, simps]
noncomputable def liftedCone : Cone F where
  pt := .mk (liftedConeElement F)
  π :=
    { app := fun i => ⟨limit.π (F ⋙ π A) i, by simp⟩
      naturality := fun i i' f => by ext; simpa using! (limit.w _ _).symm }

/-- (implementation) The constructed limit cone is a lift of the limit cone in `C`. -/
noncomputable def isValidLift : (π A).mapCone (liftedCone F) ≅ limit.cone (F ⋙ π A) :=
  Iso.refl _

/-- (implementation) The constructed limit cone is a limit cone. -/
noncomputable def isLimit : IsLimit (liftedCone F) where
  lift s := homMk (limit.lift (F ⋙ π A) ((π A).mapCone s))
  uniq s m h := hom_ext <| limit.hom_ext (by simp [← h])

end CreatesLimitsAux

variable [HasLimitsOfShape I C] [PreservesLimitsOfShape I A]

section

open CreatesLimitsAux

noncomputable instance (F : I ⥤ A.Elements) : CreatesLimit F (π A) :=
  createsLimitOfReflectsIso' (limit.isLimit _) ⟨⟨liftedCone F, isValidLift F⟩, isLimit F⟩

end

noncomputable instance : CreatesLimitsOfShape I (π A) where

instance : HasLimitsOfShape I A.Elements :=
  hasLimitsOfShape_of_hasLimitsOfShape_createsLimitsOfShape (π A)

section Initial

instance {F : Cᵒᵖ ⥤ Type*} [F.IsRepresentable] : HasInitial F.Elements :=
  (Functor.Elements.isInitialOfRepresentableBy F.representableBy).hasInitial

instance {F : C ⥤ Type*} [F.IsCorepresentable] : HasInitial F.Elements :=
  (Functor.Elements.isInitialOfCorepresentableBy F.corepresentableBy).hasInitial

end Initial

end

/-- An initial object in the category `F.Elements` of a covariant functor defines a
corepresentation for that functor. -/

def corepresentableByOfIsInitial {F : C ⥤ Type w} {E : Elements F} (he : IsInitial E) :
    CorepresentableBy F E.obj where
  homEquiv :=
    { toFun f := F.map f E.val
      invFun y := (he.to (.mk y)).hom
      left_inv f := congr_arg Hom.hom (he.hom_ext (he.to (.mk (F.map f E.val))) ⟨f, rfl⟩)
      right_inv y := (he.to (.mk y)).map_val }

lemma isCorepresentable_of_hasInitial (F : C ⥤ Type w) [HasInitial (Elements F)] :
    IsCorepresentable F where
  has_corepresentation := ⟨_, ⟨corepresentableByOfIsInitial initialIsInitial⟩⟩

theorem hasInitial_iff_isCorepresentable (F : C ⥤ Type w) :
    HasInitial (Elements F) ↔ IsCorepresentable F where
  mp _ := isCorepresentable_of_hasInitial F
  mpr _ := inferInstance

/-- An initial object in the category `F.Elements` of a contravariant functor defines a
representation for that functor. -/

def representableByOfIsInitial {F : Cᵒᵖ ⥤ Type w} {E : Elements F} (he : IsInitial E) :
    RepresentableBy F (E.obj.unop) where
  homEquiv :=
    { toFun f := F.map f.op E.val
      invFun y := (he.to (.mk y)).hom.unop
      left_inv f := Quiver.Hom.op_inj
        (congr_arg Hom.hom (he.hom_ext (he.to (.mk (F.map f.op E.val))) (homMk f.op)))
      right_inv y := (he.to (.mk y)).map_val }

lemma isRepresentable_of_hasInitial (F : Cᵒᵖ ⥤ Type w) [HasInitial (Elements F)] :
    IsRepresentable F where
  has_representation := ⟨_, ⟨(representableByOfIsInitial initialIsInitial)⟩⟩

theorem hasInitial_iff_isRepresentable (F : Cᵒᵖ ⥤ Type w) :
    HasInitial (Elements F) ↔ IsRepresentable F where
  mp _ := isRepresentable_of_hasInitial F
  mpr _ := inferInstance

end Functor.Elements

namespace CategoryOfElements.CreatesLimitsAux

@[deprecated (since := "2026-08-30")] alias liftedConeElement' :=
  Functor.Elements.CreatesLimitsAux.liftedConeElement'
@[deprecated (since := "2026-08-30")] alias π_liftedConeElement' :=
  Functor.Elements.CreatesLimitsAux.π_liftedConeElement'
@[deprecated (since := "2026-08-30")] alias liftedConeElement :=
  Functor.Elements.CreatesLimitsAux.liftedConeElement
@[deprecated (since := "2026-08-30")] alias map_lift_mapCone :=
  Functor.Elements.CreatesLimitsAux.map_lift_mapCone
@[deprecated (since := "2026-08-30")] alias map_π_liftedConeElement :=
  Functor.Elements.CreatesLimitsAux.map_π_liftedConeElement
@[deprecated (since := "2026-08-30")] alias liftedCone :=
  Functor.Elements.CreatesLimitsAux.liftedCone
@[deprecated (since := "2026-08-30")] alias isValidLift :=
  Functor.Elements.CreatesLimitsAux.isValidLift
@[deprecated (since := "2026-08-30")] alias isLimit :=
  Functor.Elements.CreatesLimitsAux.isLimit

end CategoryOfElements.CreatesLimitsAux

end CategoryTheory

Messung
CHZG
9010010096

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,097
#Domains=862,629