File: Mathlib/CategoryTheory/Functor/Flat.lean

full_name: CategoryTheory.RepresentablyFlat
code: /-- A functor `F : C ⥤ D` is representably-flat functor if the comma category `(X/F)`
is cofiltered for each `X : C`.
-/
class RepresentablyFlat (F : C ⥤ D) : Prop where
  cofiltered : ∀ X : D, IsCofiltered (StructuredArrow X F)
goal: Prop

full_name: CategoryTheory.RepresentablyFlat.cofiltered
code: /-- A functor `F : C ⥤ D` is representably-flat functor if the comma category `(X/F)`
is cofiltered for each `X : C`.
-/
class RepresentablyFlat (F : C ⥤ D) : Prop where
  cofiltered : ∀ X : D, IsCofiltered (StructuredArrow X F)
goal: CategoryTheory.IsCofiltered (CategoryTheory.StructuredArrow X F)

full_name: CategoryTheory.RepresentablyFlat.of_isRightAdjoint
code: instance RepresentablyFlat.of_isRightAdjoint (F : C ⥤ D) [F.IsRightAdjoint] :
    RepresentablyFlat F 
goal: CategoryTheory.RepresentablyFlat F

full_name: CategoryTheory.RepresentablyFlat.id
code: theorem RepresentablyFlat.id : RepresentablyFlat (𝟭 C) 
goal: CategoryTheory.RepresentablyFlat (𝟭 C)

full_name: CategoryTheory.RepresentablyFlat.comp
code: instance RepresentablyFlat.comp (F : C ⥤ D) (G : D ⥤ E) [RepresentablyFlat F]
    [RepresentablyFlat G] : RepresentablyFlat (F ⋙ G) 
goal: CategoryTheory.RepresentablyFlat (F ⋙ G)

full_name: CategoryTheory.flat_of_preservesFiniteLimits
code: theorem flat_of_preservesFiniteLimits [HasFiniteLimits C] (F : C ⥤ D) [PreservesFiniteLimits F] :
    RepresentablyFlat F 
goal: CategoryTheory.RepresentablyFlat F

full_name: CategoryTheory.PreservesFiniteLimitsOfFlat.lift
code: /-- (Implementation).
Given a limit cone `c : cone K` and a cone `s : cone (K ⋙ F)` with `F` representably flat,
`s` can factor through `F.mapCone c`.
-/
noncomputable def lift : s.pt ⟶ F.obj c.pt 
goal: s.pt ⟶ F.obj c.pt

full_name: CategoryTheory.PreservesFiniteLimitsOfFlat.fac
code: theorem fac (x : J) : lift F hc s ≫ (F.mapCone c).π.app x = s.π.app x 
goal: CategoryTheory.PreservesFiniteLimitsOfFlat.lift F hc s ≫ (F.mapCone c).π.app x = s.π.app x

full_name: CategoryTheory.PreservesFiniteLimitsOfFlat.uniq
code: theorem uniq {K : J ⥤ C} {c : Cone K} (hc : IsLimit c) (s : Cone (K ⋙ F))
    (f₁ f₂ : s.pt ⟶ F.obj c.pt) (h₁ : ∀ j : J, f₁ ≫ (F.mapCone c).π.app j = s.π.app j)
    (h₂ : ∀ j : J, f₂ ≫ (F.mapCone c).π.app j = s.π.app j) : f₁ = f₂ 
goal: f₁ = f₂

full_name: CategoryTheory.preservesFiniteLimitsOfFlat
code: /-- Representably flat functors preserve finite limits. -/
noncomputable def preservesFiniteLimitsOfFlat (F : C ⥤ D) [RepresentablyFlat F] :
    PreservesFiniteLimits F 
goal: CategoryTheory.Limits.PreservesFiniteLimits F

full_name: CategoryTheory.preservesFiniteLimitsIffFlat
code: /-- If `C` is finitely cocomplete, then `F : C ⥤ D` is representably flat iff it preserves
finite limits.
-/
noncomputable def preservesFiniteLimitsIffFlat [HasFiniteLimits C] (F : C ⥤ D) :
    RepresentablyFlat F ≃ PreservesFiniteLimits F 
goal: CategoryTheory.RepresentablyFlat F ≃ CategoryTheory.Limits.PreservesFiniteLimits F

full_name: CategoryTheory.lanEvaluationIsoColim
code: /-- (Implementation)
The evaluation of `F.lan` at `X` is the colimit over the costructured arrows over `X`.
-/
noncomputable def lanEvaluationIsoColim (F : C ⥤ D) (X : D)
    [∀ X : D, HasColimitsOfShape (CostructuredArrow F X) E] :
    F.lan ⋙ (evaluation D E).obj X ≅
      (whiskeringLeft _ _ E).obj (CostructuredArrow.proj F X) ⋙ colim 
goal: F.lan ⋙ (CategoryTheory.evaluation D E).obj X ≅
  (CategoryTheory.whiskeringLeft (CategoryTheory.CostructuredArrow F X) C E).obj
      (CategoryTheory.CostructuredArrow.proj F X) ⋙
    CategoryTheory.Limits.colim

full_name: CategoryTheory.lanPreservesFiniteLimitsOfFlat
code: /-- If `F : C ⥤ D` is a representably flat functor between small categories, then the functor
`Lan F.op` that takes presheaves over `C` to presheaves over `D` preserves finite limits.
-/
noncomputable instance lanPreservesFiniteLimitsOfFlat (F : C ⥤ D) [RepresentablyFlat F] :
    PreservesFiniteLimits (F.op.lan : _ ⥤ Dᵒᵖ ⥤ E) 
goal: CategoryTheory.Limits.PreservesFiniteLimits F.op.lan

full_name: CategoryTheory.lan_flat_of_flat
code: instance lan_flat_of_flat (F : C ⥤ D) [RepresentablyFlat F] :
    RepresentablyFlat (F.op.lan : _ ⥤ Dᵒᵖ ⥤ E) 
goal: CategoryTheory.RepresentablyFlat F.op.lan

full_name: CategoryTheory.lanPreservesFiniteLimitsOfPreservesFiniteLimits
code: noncomputable instance lanPreservesFiniteLimitsOfPreservesFiniteLimits (F : C ⥤ D)
    [PreservesFiniteLimits F] : PreservesFiniteLimits (F.op.lan : _ ⥤ Dᵒᵖ ⥤ E) 
goal: CategoryTheory.Limits.PreservesFiniteLimits F.op.lan

full_name: CategoryTheory.flat_iff_lan_flat
code: theorem flat_iff_lan_flat (F : C ⥤ D) :
    RepresentablyFlat F ↔ RepresentablyFlat (F.op.lan : _ ⥤ Dᵒᵖ ⥤ Type u₁) 
goal: CategoryTheory.RepresentablyFlat F ↔ CategoryTheory.RepresentablyFlat F.op.lan

full_name: CategoryTheory.preservesFiniteLimitsIffLanPreservesFiniteLimits
code: /-- If `C` is finitely complete, then `F : C ⥤ D` preserves finite limits iff
`Lan F.op : (Cᵒᵖ ⥤ Type*) ⥤ (Dᵒᵖ ⥤ Type*)` preserves finite limits.
-/
noncomputable def preservesFiniteLimitsIffLanPreservesFiniteLimits (F : C ⥤ D) :
    PreservesFiniteLimits F ≃ PreservesFiniteLimits (F.op.lan : _ ⥤ Dᵒᵖ ⥤ Type u₁) 
goal: CategoryTheory.Limits.PreservesFiniteLimits F ≃ CategoryTheory.Limits.PreservesFiniteLimits F.op.lan