(** Given a map f from natural numbers to objects of a category C and a map from (f (S n) –≻ f n), we construct a functor from ωᵒᵖ to C. *)
(** This is the arrow map of the functor being constructed. *)
Local Fixpoint FA_fx {C : Category}
(OOF_O : nat → C)
(OOF_A : ∀ n, ((OOF_O (S n)) –≻ (OOF_O n))%morphism)
(n m : nat) (h : Tle n m)
{struct h} : (OOF_O m –≻ OOF_O n)%morphism
:=
match h in _ ≤ w return
(OOF_O w –≻ OOF_O n)%morphism
with
| Tle_n _ =>
id (OOF_O n)
| Tle_S _ m' H' =>
((FA_fx OOF_O OOF_A _ _ H') ∘ (OOF_A m'))%morphism
end
.
(** This is the the functor described above. *)
Program Definition OmegaCat_Op_Func {C : Category}
(OOF_O : nat → C)
(OOF_A : ∀ n, ((OOF_O (S n)) –≻ (OOF_O n))%morphism)
: ((ω^op) –≻ C)%functor :=
{|
FO := OOF_O;
FA := fun m n h => FA_fx OOF_O OOF_A _ _ h
|}
.
Next Obligation.
(** Similar functor from ω to C. *)
Definition OmegaCat_Func {C : Category}
(OMF_O : nat → C)
(OMF_A : ∀ n, ((OMF_O n) –≻ (OMF_O (S n)))%morphism)
: (OmegaCat –≻ C)%functor
:= (@OmegaCat_Op_Func (C^op) OMF_O OMF_A)^op.

(* Specifications: *)
(** Any functor from ωᵒᵖ to C is freely generated by its object map and the image of the arrow map under (le_S _ _ (le_n n)) (proof of (le n (S n))). *)
Lemma OmegaCat_Op_Func_unique {C : Category} (F : ((ω^op) –≻ C)%functor) :
F = OmegaCat_Op_Func (FO F) (fun n => FA F (Tle_S _ _ (Tle_n n))).
(** Any functor from ω to C is freely generated by its object map and the image of the arrow map under (le_S _ _ (le_n n)) (proof of (le n (S n))). *)
Lemma OmegaCat_Func_unique {C : Category} (F : (ω –≻ C)%functor) :
F = OmegaCat_Func (FO F) (fun n => FA F (Tle_S _ _ (Tle_n n))).