{-# OPTIONS --guardedness --safe #-}

module Cubical.Codata.M.AsLimit.Coalg.Base where

open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function using ( _∘_ )
open import Cubical.Foundations.Transport
open import Cubical.Foundations.Univalence
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.GroupoidLaws

open import Cubical.Data.Unit
open import Cubical.Data.Nat
open import Cubical.Data.Prod
open import Cubical.Data.Sigma

open import Cubical.Codata.M.AsLimit.Container
open import Cubical.Codata.M.AsLimit.helper

-------------------------------
-- Definition of a Coalgebra --
-------------------------------

Coalg₀ :  {} {S : Container } -> Type (ℓ-suc )
Coalg₀ {} {S = S} = Σ[ C  Type  ] (C  P₀ S C)

--------------------------
-- Definition of a Cone --
--------------------------

Cone₀ :  {} {S : Container } {C,γ : Coalg₀ {S = S}} -> Type 
Cone₀ {S = S} {C , _} = (n : )  C  X (sequence S) n

Cone₁ :  {} {S : Container } {C,γ : Coalg₀ {S = S}} -> (f : Cone₀ {C,γ = C,γ}) -> Type 
Cone₁ {S = S} {C , _} f = (n : )  π (sequence S)  (f (suc n))  f n

Cone :  {} {S : Container } (C,γ : Coalg₀ {S = S}) -> Type 
Cone {S = S} C,γ = Σ[ Cone  (Cone₀ {C,γ = C,γ}) ] (Cone₁{C,γ = C,γ} Cone)