File: Mathlib/CategoryTheory/Monad/Equalizer.lean

full_name: CategoryTheory.Comonad.CofreeEqualizer.topMap
code: /-- The top map in the equalizer diagram we will construct. -/
@[simps!]
def CofreeEqualizer.topMap :  (Comonad.cofree T).obj X.A ⟶ (Comonad.cofree T).obj (T.obj X.A) 
goal: T.cofree.obj X.A ⟶ T.cofree.obj (T.obj X.A)

full_name: CategoryTheory.Comonad.CofreeEqualizer.topMap_f
code: /-- The top map in the equalizer diagram we will construct. -/
@[simps!]
def CofreeEqualizer.topMap :  (Comonad.cofree T).obj X.A ⟶ (Comonad.cofree T).obj (T.obj X.A) 
goal: (CategoryTheory.Comonad.CofreeEqualizer.topMap X).f = T.map X.a

full_name: CategoryTheory.Comonad.CofreeEqualizer.bottomMap
code: /-- The bottom map in the equalizer diagram we will construct. -/
@[simps]
def CofreeEqualizer.bottomMap :
    (Comonad.cofree T).obj X.A ⟶ (Comonad.cofree T).obj (T.obj X.A) 
goal: T.cofree.obj X.A ⟶ T.cofree.obj (T.obj X.A)

full_name: CategoryTheory.Comonad.CofreeEqualizer.bottomMap_f
code: /-- The bottom map in the equalizer diagram we will construct. -/
@[simps]
def CofreeEqualizer.bottomMap :
    (Comonad.cofree T).obj X.A ⟶ (Comonad.cofree T).obj (T.obj X.A) 
goal: (CategoryTheory.Comonad.CofreeEqualizer.bottomMap X).f = T.δ.app X.A

full_name: CategoryTheory.Comonad.CofreeEqualizer.ι_f
code: /-- The fork map in the equalizer diagram we will construct. -/
@[simps]
def CofreeEqualizer.ι : X ⟶ (Comonad.cofree T).obj X.A 
goal: (CategoryTheory.Comonad.CofreeEqualizer.ι X).f = X.a

full_name: CategoryTheory.Comonad.CofreeEqualizer.ι
code: /-- The fork map in the equalizer diagram we will construct. -/
@[simps]
def CofreeEqualizer.ι : X ⟶ (Comonad.cofree T).obj X.A 
goal: X ⟶ T.cofree.obj X.A

full_name: CategoryTheory.Comonad.CofreeEqualizer.condition
code: theorem CofreeEqualizer.condition :
    CofreeEqualizer.ι X ≫ CofreeEqualizer.topMap X =
      CofreeEqualizer.ι X ≫ CofreeEqualizer.bottomMap X 
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.Comonad.CofreeEqualizer.ι X)
    (CategoryTheory.Comonad.CofreeEqualizer.topMap X) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Comonad.CofreeEqualizer.ι X)
    (CategoryTheory.Comonad.CofreeEqualizer.bottomMap X)

full_name: CategoryTheory.Comonad.instIsCoreflexivePairCoalgebraTopMapBottomMap
code: instance : IsCoreflexivePair (CofreeEqualizer.topMap X) (CofreeEqualizer.bottomMap X) 
goal: CategoryTheory.IsCoreflexivePair (CategoryTheory.Comonad.CofreeEqualizer.topMap X)
  (CategoryTheory.Comonad.CofreeEqualizer.bottomMap X)

full_name: CategoryTheory.Comonad.beckCoalgebraFork_π_app
code: /-- Construct the Beck fork in the category of coalgebras. This fork is coreflexive as well as an
equalizer.
-/
@[simps!]
def beckCoalgebraFork : Fork (CofreeEqualizer.topMap X) (CofreeEqualizer.bottomMap X) 
goal: ∀ (X_1 : CategoryTheory.Limits.WalkingParallelPair),
  (CategoryTheory.Comonad.beckCoalgebraFork X).π.app X_1 =
    CategoryTheory.Limits.WalkingParallelPair.rec (motive := fun t =>
      X_1 = t →
        (X ⟶
          (CategoryTheory.Limits.parallelPair (CategoryTheory.Comonad.CofreeEqualizer.topMap X)
                (CategoryTheory.Comonad.CofreeEqualizer.bottomMap X)).obj
            X_1))
      (fun h => ⋯ ▸ CategoryTheory.Comonad.CofreeEqualizer.ι X)
      (fun h =>
        ⋯ ▸
          CategoryTheory.CategoryStruct.comp (CategoryTheory.Comonad.CofreeEqualizer.ι X)
            (CategoryTheory.Comonad.CofreeEqualizer.topMap X))
      X_1 ⋯

full_name: CategoryTheory.Comonad.beckCoalgebraFork_pt
code: /-- Construct the Beck fork in the category of coalgebras. This fork is coreflexive as well as an
equalizer.
-/
@[simps!]
def beckCoalgebraFork : Fork (CofreeEqualizer.topMap X) (CofreeEqualizer.bottomMap X) 
goal: (CategoryTheory.Comonad.beckCoalgebraFork X).pt = X

full_name: CategoryTheory.Comonad.beckCoalgebraFork
code: /-- Construct the Beck fork in the category of coalgebras. This fork is coreflexive as well as an
equalizer.
-/
@[simps!]
def beckCoalgebraFork : Fork (CofreeEqualizer.topMap X) (CofreeEqualizer.bottomMap X) 
goal: CategoryTheory.Limits.Fork (CategoryTheory.Comonad.CofreeEqualizer.topMap X)
  (CategoryTheory.Comonad.CofreeEqualizer.bottomMap X)

full_name: CategoryTheory.Comonad.beckCoalgebraEqualizer
code: /-- The fork constructed is a limit. This shows that any coalgebra is a (coreflexive) equalizer of
cofree coalgebras.
-/
def beckCoalgebraEqualizer : IsLimit (beckCoalgebraFork X) 
goal: CategoryTheory.Limits.IsLimit (CategoryTheory.Comonad.beckCoalgebraFork X)

full_name: CategoryTheory.Comonad.beckSplitEqualizer
code: /-- The Beck fork is a split equalizer. -/
def beckSplitEqualizer : IsSplitEqualizer (T.map X.a) (T.δ.app _) X.a 
goal: CategoryTheory.IsSplitEqualizer (T.map X.a) (T.δ.app X.A) X.a

full_name: CategoryTheory.Comonad.beckFork_pt
code: /-- This is the Beck fork. It is a split equalizer, in particular a equalizer. -/
@[simps! pt]
def beckFork : Fork (T.map X.a) (T.δ.app _) 
goal: (CategoryTheory.Comonad.beckFork X).pt = X.A

full_name: CategoryTheory.Comonad.beckFork
code: /-- This is the Beck fork. It is a split equalizer, in particular a equalizer. -/
@[simps! pt]
def beckFork : Fork (T.map X.a) (T.δ.app _) 
goal: CategoryTheory.Limits.Fork (T.map X.a) (T.δ.app X.A)

full_name: CategoryTheory.Comonad.beckFork_ι
code: @[simp]
theorem beckFork_ι : (beckFork X).ι = X.a 
goal: (CategoryTheory.Comonad.beckFork X).ι = X.a

full_name: CategoryTheory.Comonad.beckEqualizer
code: /-- The Beck fork is a equalizer. -/
def beckEqualizer : IsLimit (beckFork X) 
goal: CategoryTheory.Limits.IsLimit (CategoryTheory.Comonad.beckFork X)

full_name: CategoryTheory.Comonad.beckEqualizer_lift
code: @[simp]
theorem beckEqualizer_lift (s : Fork (T.toFunctor.map X.a) (T.δ.app X.A)) :
    (beckEqualizer X).lift s = s.ι ≫ T.ε.app _ 
goal: (CategoryTheory.Comonad.beckEqualizer X).lift s = CategoryTheory.CategoryStruct.comp s.ι (T.ε.app X.A)