File: Mathlib/CategoryTheory/CofilteredSystem.lean

full_name: nonempty_sections_of_finite_cofiltered_system.init
code: /-- This bootstraps `nonempty_sections_of_finite_inverse_system`. In this version,
the `F` functor is between categories of the same universe, and it is an easy
corollary to `TopCat.nonempty_limitCone_of_compact_t2_cofiltered_system`. -/
theorem nonempty_sections_of_finite_cofiltered_system.init {J : Type u} [SmallCategory J]
    [IsCofilteredOrEmpty J] (F : J ⥤ Type u) [hf : ∀ j, Finite (F.obj j)]
    [hne : ∀ j, Nonempty (F.obj j)] : F.sections.Nonempty 
goal: F.sections.Nonempty

full_name: nonempty_sections_of_finite_cofiltered_system
code: /-- The cofiltered limit of nonempty finite types is nonempty.

See `nonempty_sections_of_finite_inverse_system` for a specialization to inverse limits. -/
theorem nonempty_sections_of_finite_cofiltered_system {J : Type u} [Category.{w} J]
    [IsCofilteredOrEmpty J] (F : J ⥤ Type v) [∀ j : J, Finite (F.obj j)]
    [∀ j : J, Nonempty (F.obj j)] : F.sections.Nonempty 
goal: F.sections.Nonempty

full_name: nonempty_sections_of_finite_inverse_system
code: /-- The inverse limit of nonempty finite types is nonempty.

See `nonempty_sections_of_finite_cofiltered_system` for a generalization to cofiltered limits.
That version applies in almost all cases, and the only difference is that this version
allows `J` to be empty.

This may be regarded as a generalization of Kőnig's lemma.
To specialize: given a locally finite connected graph, take `Jᵒᵖ` to be `ℕ` and
`F j` to be length-`j` paths that start from an arbitrary fixed vertex.
Elements of `F.sections` can be read off as infinite rays in the graph. -/
theorem nonempty_sections_of_finite_inverse_system {J : Type u} [Preorder J] [IsDirected J (· ≤ ·)]
    (F : Jᵒᵖ ⥤ Type v) [∀ j : Jᵒᵖ, Finite (F.obj j)] [∀ j : Jᵒᵖ, Nonempty (F.obj j)] :
    F.sections.Nonempty 
goal: F.sections.Nonempty

full_name: CategoryTheory.Functor.eventualRange
code: /-- The eventual range of the functor `F : J ⥤ Type v` at index `j : J` is the intersection
of the ranges of all maps `F.map f` with `i : J` and `f : i ⟶ j`. -/
def eventualRange (j : J) 
goal: Set (F.obj j)

full_name: CategoryTheory.Functor.mem_eventualRange_iff
code: theorem mem_eventualRange_iff {x : F.obj j} :
    x ∈ F.eventualRange j ↔ ∀ ⦃i⦄ (f : i ⟶ j), x ∈ range (F.map f) 
goal: x ∈ F.eventualRange j ↔ ∀ ⦃i : J⦄ (f : i ⟶ j), x ∈ Set.range (F.map f)

full_name: CategoryTheory.Functor.IsMittagLeffler
code: /-- The functor `F : J ⥤ Type v` satisfies the Mittag-Leffler condition if for all `j : J`,
there exists some `i : J` and `f : i ⟶ j` such that for all `k : J` and `g : k ⟶ j`, the range
of `F.map f` is contained in that of `F.map g`;
in other words (see `isMittagLeffler_iff_eventualRange`), the eventual range at `j` is attained
by some `f : i ⟶ j`. -/
def IsMittagLeffler : Prop 
goal: Prop

full_name: CategoryTheory.Functor.isMittagLeffler_iff_eventualRange
code: theorem isMittagLeffler_iff_eventualRange :
    F.IsMittagLeffler ↔ ∀ j : J, ∃ (i : _) (f : i ⟶ j), F.eventualRange j = range (F.map f) 
goal: F.IsMittagLeffler ↔ ∀ (j : J), ∃ i f, F.eventualRange j = Set.range (F.map f)

full_name: CategoryTheory.Functor.IsMittagLeffler.subset_image_eventualRange
code: theorem IsMittagLeffler.subset_image_eventualRange (h : F.IsMittagLeffler) (f : j ⟶ i) :
    F.eventualRange i ⊆ F.map f '' F.eventualRange j 
goal: F.eventualRange i ⊆ F.map f '' F.eventualRange j

full_name: CategoryTheory.Functor.eventualRange_eq_range_precomp
code: theorem eventualRange_eq_range_precomp (f : i ⟶ j) (g : j ⟶ k)
    (h : F.eventualRange k = range (F.map g)) : F.eventualRange k = range (F.map <| f ≫ g) 
goal: F.eventualRange k = Set.range (F.map (f ≫ g))

full_name: CategoryTheory.Functor.isMittagLeffler_of_surjective
code: theorem isMittagLeffler_of_surjective (h : ∀ ⦃i j : J⦄ (f : i ⟶ j), (F.map f).Surjective) :
    F.IsMittagLeffler 
goal: F.IsMittagLeffler

full_name: CategoryTheory.Functor.toPreimages
code: /-- The subfunctor of `F` obtained by restricting to the preimages of a set `s ∈ F.obj i`. -/
@[simps]
def toPreimages : J ⥤ Type v 
goal: J ⥤ Type v

full_name: CategoryTheory.Functor.toPreimages_obj
code: /-- The subfunctor of `F` obtained by restricting to the preimages of a set `s ∈ F.obj i`. -/
@[simps]
def toPreimages : J ⥤ Type v 
goal: (F.toPreimages s).obj j = ↑(⋂ f, F.map f ⁻¹' s)

full_name: CategoryTheory.Functor.toPreimages_map
code: /-- The subfunctor of `F` obtained by restricting to the preimages of a set `s ∈ F.obj i`. -/
@[simps]
def toPreimages : J ⥤ Type v 
goal: ∀ {X Y : J} (g : X ⟶ Y) (a : ↑(⋂ f, F.map f ⁻¹' s)),
  (F.toPreimages s).map g a = Set.MapsTo.restrict (F.map g) (⋂ f, F.map f ⁻¹' s) (⋂ f, F.map f ⁻¹' s) ⋯ a

full_name: CategoryTheory.Functor.toPreimages_finite
code: instance toPreimages_finite [∀ j, Finite (F.obj j)] : ∀ j, Finite ((F.toPreimages s).obj j) 
goal: Finite ((F.toPreimages s).obj j)

full_name: CategoryTheory.Functor.eventualRange_mapsTo
code: theorem eventualRange_mapsTo (f : j ⟶ i) :
    (F.eventualRange j).MapsTo (F.map f) (F.eventualRange i) 
goal: Set.MapsTo (F.map f) (F.eventualRange j) (F.eventualRange i)

full_name: CategoryTheory.Functor.IsMittagLeffler.eq_image_eventualRange
code: theorem IsMittagLeffler.eq_image_eventualRange (h : F.IsMittagLeffler) (f : j ⟶ i) :
    F.eventualRange i = F.map f '' F.eventualRange j 
goal: F.eventualRange i = F.map f '' F.eventualRange j

full_name: CategoryTheory.Functor.eventualRange_eq_iff
code: theorem eventualRange_eq_iff {f : i ⟶ j} :
    F.eventualRange j = range (F.map f) ↔
      ∀ ⦃k⦄ (g : k ⟶ i), range (F.map f) ⊆ range (F.map <| g ≫ f) 
goal: F.eventualRange j = Set.range (F.map f) ↔ ∀ ⦃k : J⦄ (g : k ⟶ i), Set.range (F.map f) ⊆ Set.range (F.map (g ≫ f))

full_name: CategoryTheory.Functor.isMittagLeffler_iff_subset_range_comp
code: theorem isMittagLeffler_iff_subset_range_comp : F.IsMittagLeffler ↔ ∀ j : J, ∃ (i : _) (f : i ⟶ j),
    ∀ ⦃k⦄ (g : k ⟶ i), range (F.map f) ⊆ range (F.map <| g ≫ f) 
goal: F.IsMittagLeffler ↔ ∀ (j : J), ∃ i f, ∀ ⦃k : J⦄ (g : k ⟶ i), Set.range (F.map f) ⊆ Set.range (F.map (g ≫ f))

full_name: CategoryTheory.Functor.IsMittagLeffler.toPreimages
code: theorem IsMittagLeffler.toPreimages (h : F.IsMittagLeffler) : (F.toPreimages s).IsMittagLeffler 
goal: (F.toPreimages s).IsMittagLeffler

full_name: CategoryTheory.Functor.isMittagLeffler_of_exists_finite_range
code: theorem isMittagLeffler_of_exists_finite_range
    (h : ∀ j : J, ∃ (i : _) (f : i ⟶ j), (range <| F.map f).Finite) : F.IsMittagLeffler 
goal: F.IsMittagLeffler

full_name: CategoryTheory.Functor.toEventualRanges_obj
code: /-- The subfunctor of `F` obtained by restricting to the eventual range at each index. -/
@[simps]
def toEventualRanges : J ⥤ Type v 
goal: F.toEventualRanges.obj j = ↑(F.eventualRange j)

full_name: CategoryTheory.Functor.toEventualRanges_map
code: /-- The subfunctor of `F` obtained by restricting to the eventual range at each index. -/
@[simps]
def toEventualRanges : J ⥤ Type v 
goal: ∀ {X Y : J} (f : X ⟶ Y) (a : ↑(F.eventualRange X)),
  F.toEventualRanges.map f a = Set.MapsTo.restrict (F.map f) (F.eventualRange X) (F.eventualRange Y) ⋯ a

full_name: CategoryTheory.Functor.toEventualRanges
code: /-- The subfunctor of `F` obtained by restricting to the eventual range at each index. -/
@[simps]
def toEventualRanges : J ⥤ Type v 
goal: J ⥤ Type v

full_name: CategoryTheory.Functor.toEventualRanges_finite
code: instance toEventualRanges_finite [∀ j, Finite (F.obj j)] : ∀ j, Finite (F.toEventualRanges.obj j) 
goal: Finite (F.toEventualRanges.obj j)

full_name: CategoryTheory.Functor.toEventualRangesSectionsEquiv
code: /-- The sections of the functor `F : J ⥤ Type v` are in bijection with the sections of
`F.toEventualRanges`. -/
def toEventualRangesSectionsEquiv : F.toEventualRanges.sections ≃ F.sections 
goal: ↑F.toEventualRanges.sections ≃ ↑F.sections

full_name: CategoryTheory.Functor.surjective_toEventualRanges
code: /-- If `F` satisfies the Mittag-Leffler condition, its restriction to eventual ranges is a
surjective functor. -/
theorem surjective_toEventualRanges (h : F.IsMittagLeffler) ⦃i j⦄ (f : i ⟶ j) :
    (F.toEventualRanges.map f).Surjective 
goal: Function.Surjective (F.toEventualRanges.map f)

full_name: CategoryTheory.Functor.toEventualRanges_nonempty
code: /-- If `F` is nonempty at each index and Mittag-Leffler, then so is `F.toEventualRanges`. -/
theorem toEventualRanges_nonempty (h : F.IsMittagLeffler) [∀ j : J, Nonempty (F.obj j)] (j : J) :
    Nonempty (F.toEventualRanges.obj j) 
goal: Nonempty (F.toEventualRanges.obj j)

full_name: CategoryTheory.Functor.thin_diagram_of_surjective
code: /-- If `F` has all arrows surjective, then it "factors through a poset". -/
theorem thin_diagram_of_surjective (Fsur : ∀ ⦃i j : J⦄ (f : i ⟶ j), (F.map f).Surjective) {i j}
    (f g : i ⟶ j) : F.map f = F.map g 
goal: F.map f = F.map g

full_name: CategoryTheory.Functor.toPreimages_nonempty_of_surjective
code: theorem toPreimages_nonempty_of_surjective [hFn : ∀ j : J, Nonempty (F.obj j)]
    (Fsur : ∀ ⦃i j : J⦄ (f : i ⟶ j), (F.map f).Surjective) (hs : s.Nonempty) (j) :
    Nonempty ((F.toPreimages s).obj j) 
goal: Nonempty ((F.toPreimages s).obj j)

full_name: CategoryTheory.Functor.eval_section_injective_of_eventually_injective
code: theorem eval_section_injective_of_eventually_injective {j}
    (Finj : ∀ (i) (f : i ⟶ j), (F.map f).Injective) (i) (f : i ⟶ j) :
    (fun s : F.sections => s.val j).Injective 
goal: Function.Injective fun s => ↑s j

full_name: CategoryTheory.Functor.eval_section_surjective_of_surjective
code: theorem eval_section_surjective_of_surjective (i : J) :
    (fun s : F.sections => s.val i).Surjective 
goal: Function.Surjective fun s => ↑s i

full_name: CategoryTheory.Functor.eventually_injective
code: theorem eventually_injective [Nonempty J] [Finite F.sections] :
    ∃ j, ∀ (i) (f : i ⟶ j), (F.map f).Injective 
goal: ∃ j, ∀ (i : J) (f : i ⟶ j), Function.Injective (F.map f)