Eine aufbereitete Darstellung der Quelle

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


Quelle  Finite.lean   Sprache: Lean

 

/-
Copyright (c) 2025 Joël Riou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joël Riou
-/

module

public import Mathlib.CategoryTheory.Subfunctor.OfSection

/-!
# Subpresheaves that are generated by finitely many sections

Given `F : Cᵒᵖ ⥤ Type w`, `G : Subfunctor F`, objects `X : ι → Cᵒᵖ` and sections
`x : (i : ι) → F.obj (X i)`, we define a predicate `G.IsGeneratedBy x` saying
that `G` is the subpresheaf generated by the sections `x i`. If this holds for
a finite index type `ι`, we say that `G` is "finite", and this gives a type
class `G.IsFinite`.
-/


@[expose] public section

universe w'' w' w v u

namespace CategoryTheory

open Opposite

variable {C : Type u} [Category.{v} C] {F : Cᵒᵖ ⥤ Type w}

namespace Subfunctor

variable (G : Subfunctor F)

section

variable {ι : Type w'} {X : ι → Cᵒᵖ} (x : (i : ι) → F.obj (X i))

/-- A subpresheaf `G : Subfunctor F` is generated by sections `x i : F.obj (X i)`
if `⨆ (i : ι), ofSection (x i) = G`. -/

def IsGeneratedBy : Prop := ⨆ (i : ι), ofSection (x i) = G

lemma isGeneratedBy_iff : G.IsGeneratedBy x ↔ ⨆ (i : ι), ofSection (x i) = G := Iff.rfl

namespace IsGeneratedBy

variable {G x} (h : G.IsGeneratedBy x)
include h

lemma iSup_eq : ⨆ (i : ι), ofSection (x i) = G := h

lemma ofSection_le (i : ι) : ofSection (x i) ≤ G := by
  rw [← h.iSup_eq]
  exact le_iSup (fun i ↦ ofSection (x i)) i

lemma mem (i : ι) : x i ∈ G.obj (X i) := by
  rw [← ofSection_le_iff]
  exact h.ofSection_le i

lemma of_equiv {ι' : Type w''} (e : ι' ≃ ι) :
    G.IsGeneratedBy (fun i' ↦ x (e i')) := by
  rw [isGeneratedBy_iff, ← h.iSup_eq]
  exact Equiv.iSup_congr e (congrFun rfl)

lemma image {F' : Cᵒᵖ ⥤ Type w} (f : F ⟶ F') :
    (G.image f).IsGeneratedBy (fun i ↦ f.app _ (x i)) := by
  simp only [isGeneratedBy_iff, ← h.iSup_eq, image_iSup, ofSection_image]

end IsGeneratedBy

end

/-- A subpresheaf of types is "finite" if it is generated by finitely many sections. -/
class IsFinite : Prop where
  exists_isGeneratedBy :
    ∃ (ι : Type) (_ : Finite ι) (X : ι → Cᵒᵖ) (x : (i : ι) → F.obj (X i)),
      Nonempty (G.IsGeneratedBy x)

namespace IsFinite

variable [hG : G.IsFinite]

/-- A choice of index type for the generating sections of a finitely generated subpresheaf. -/
def Index : Type := hG.exists_isGeneratedBy.choose

instance : Finite (Index G) := hG.exists_isGeneratedBy.choose_spec.choose

variable {G}

/-- Objects on which a choice of generating sections of a finitely generated subpresheaf
are defined. -/

noncomputable def X : Index G → Cᵒᵖ :=
  hG.exists_isGeneratedBy.choose_spec.choose_spec.choose

/-- A choice of generating sections of a finitely generated subpresheaf. -/
noncomputable def x : (i : Index G) → F.obj (X i) :=
  hG.exists_isGeneratedBy.choose_spec.choose_spec.choose_spec.choose

end IsFinite

lemma isGeneratedBy_of_isFinite [hG : G.IsFinite] :
    G.IsGeneratedBy (IsFinite.x (G := G)) :=
  hG.exists_isGeneratedBy.choose_spec.choose_spec.choose_spec.choose_spec.some

lemma IsGeneratedBy.isFinite
    {ι : Type w'} [Finite ι] {X : ι → Cᵒᵖ} {x : (i : ι) → F.obj (X i)}
    (h : G.IsGeneratedBy x) : G.IsFinite := by
  obtain ⟨n, ⟨e⟩⟩ := Finite.exists_equiv_fin ι
  exact ⟨Fin n, inferInstance, _, _, ⟨h.of_equiv e.symm⟩⟩

lemma image_isFinite [G.IsFinite] {F' : Cᵒᵖ ⥤ Type w} (f : F ⟶ F') :
    (G.image f).IsFinite :=
  ((isGeneratedBy_of_isFinite G).image f).isFinite

end Subfunctor

variable (F)

section

variable {ι : Type w'} {X : ι → Cᵒᵖ} (x : (i : ι) → F.obj (X i))

/-- The condition that a presheaf of types `F : Cᵒᵖ ⥤ Type w` is generated by
a family of sections. -/

abbrev PresheafIsGeneratedBy : Prop := (⊤ : Subfunctor F).IsGeneratedBy x

namespace PresheafIsGeneratedBy

variable {F x} (h : PresheafIsGeneratedBy F x) {F' : Cᵒᵖ ⥤ Type w} (f : F ⟶ F')

include h

lemma range : (Subfunctor.range f).IsGeneratedBy (fun i ↦ f.app _ (x i)) := by
  simpa only [← Subfunctor.image_top] using h.image f

lemma of_epi [Epi f] : PresheafIsGeneratedBy F' (fun i ↦ f.app _ (x i)) := by
  simpa only [Subfunctor.range_eq_top f] using h.range f

end PresheafIsGeneratedBy

end

/-- A presheaf is "finite" if it is generated by finitely many sections. -/
abbrev PresheafIsFinite : Prop := (⊤ : Subfunctor F).IsFinite

lemma presheafIsGeneratedBy_of_isFinite [PresheafIsFinite F] :
    PresheafIsGeneratedBy F (Subfunctor.IsFinite.x (G := ⊤)) :=
  (Subfunctor.isGeneratedBy_of_isFinite (⊤ : Subfunctor F))

lemma Subfunctor.range_isFinite [PresheafIsFinite F] {F' : Cᵒᵖ ⥤ Type w} (f : F ⟶ F') :
    (Subfunctor.range f).IsFinite :=
  ((presheafIsGeneratedBy_of_isFinite F).range f).isFinite

lemma presheafIsFinite_of_epi [PresheafIsFinite F] {F' : Cᵒᵖ ⥤ Type w} (f : F ⟶ F') [Epi f] :
    PresheafIsFinite F' :=
  ((presheafIsGeneratedBy_of_isFinite F).of_epi f).isFinite

lemma yoneda_obj_isGeneratedBy (X : C) :
    PresheafIsGeneratedBy (yoneda.obj X) (fun (_ : Unit) ↦ �� X) := by
  simp only [Subfunctor.isGeneratedBy_iff]
  ext U u
  simp only [Subfunctor.iSup_obj, Set.mem_iUnion,
    exists_const, Subfunctor.top_obj, Set.mem_univ, iff_true]
  exact ⟨u.op, by simp⟩

instance (X : C) : PresheafIsFinite (yoneda.obj X) :=
  (yoneda_obj_isGeneratedBy X).isFinite

end CategoryTheory

Messung
CHZG
9210010097

¤ Dauer der Verarbeitung: 0.5 Sekunden  ¤

*© Formatika GbR, Deutschland







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,113
#Domains=863,226