Papers
Topics
Authors
Recent
Search
2000 character limit reached

Guarded Behavioural Functor in Type Theory

Updated 7 July 2026
  • Guarded behavioural functor is a contractive endofunctor that delays recursive occurrences via the later modality to ensure productive coinductive definitions.
  • It forms final guarded coalgebras by safely instantiating recursion under delays, aligning abstract bisimilarity with intrinsic path equality.
  • The concept underpins practical examples like streams and labelled transition systems, bridging coalgebraic reasoning with type-theoretic productivity.

A guarded behavioural functor is an endofunctor whose recursive argument is delayed by the later modality \triangleright, so that guarded fixed points, final guarded coalgebras, and productive coinductive definitions can be formed inside a type-theoretic or categorical setting. In the guarded λ\lambda-calculus, this means that every recursive occurrence of a type variable appears under at least one \triangleright; in Ticked Cubical Type Theory (TCTT), it means that a functor F:UUF:U\to U preserves delay in a path-theoretic sense and can therefore be instantiated safely under ticks. The notion is central to two linked goals: encoding productivity in types and aligning behavioural equivalence with the internal equality notion. For guarded recursive types in TCTT, the main result is that the abstract bisimilarity of the final guarded coalgebra coincides with path equality, while earlier guarded-recursion work used the same contractive structure to obtain productive coinductive programs, adequacy in the topos of trees, and solutions to Rutten’s behavioural differential equations (Møgelberg et al., 2018).

1. Typed delay, ticks, and guarded recursion

TCTT extends Cubical Type Theory with a sort TT of ticks and a corresponding later, or tick, modality A\triangleright A. Contexts may be extended by a tick variable α:T\alpha:T, and the modality behaves like a dependent function space over ticks: (-Intro)Γ,α:Tt:A    Γλα.t:A(\triangleright\text{-Intro})\quad \Gamma,\alpha:T \vdash t:A \;\Rightarrow\; \Gamma \vdash \lambda \alpha.\, t : \triangleright A

(-Elim)Γt:A    Γ,α:Tt[α]:A(\triangleright\text{-Elim})\quad \Gamma \vdash t:\triangleright A \;\Rightarrow\; \Gamma,\alpha:T \vdash t[\alpha]:A

with the usual β\beta- and λ\lambda0-equalities

λ\lambda1

In this setting one has a guarded fixed-point operator λ\lambda2 under the assumption λ\lambda3, and from it one derives λ\lambda4, satisfying

λ\lambda5

up to a path. TCTT also proves that λ\lambda6 commutes with path types, in the sense that for λ\lambda7,

λ\lambda8

so delay is extensional (Møgelberg et al., 2018).

The guarded λ\lambda9-calculus presents the same discipline syntactically. Guarded recursive types are formed by requiring that every recursive occurrence of a variable \triangleright0 be under at least one \triangleright1: \triangleright2 with the side condition that \triangleright3 is guarded in \triangleright4. Ordinary coinductive types are then recovered by modal quantification or the constant modality: \triangleright5 This arrangement separates guarded or step-indexed recursion from fully coinductive types, and it is precisely the guard imposed by \triangleright6 that enforces productivity of well-typed programs (Clouston et al., 2016).

2. Definition of the guarded behavioural functor

In TCTT, a guarded behavioural functor is a small endofunctor

\triangleright7

equipped with functorial action on maps

\triangleright8

satisfying the identity and composition laws up to path equality, and crucially contractive in the sense that \triangleright9 preserves delay. Equivalently, one requires a specified natural path

F:UUF:U\to U0

for each F:UUF:U\to U1. Concretely, this yields maps

F:UUF:U\to U2

and back up to path equality, so that F:UUF:U\to U3 may be used safely under F:UUF:U\to U4 in guarded definitions. The paper’s summary states the point directly: a guarded behavioural functor is “simply a contractive endofunctor F:UUF:U\to U5 which you can safely instantiate under the tick F:UUF:U\to U6 to form a final guarded coalgebra” (Møgelberg et al., 2018).

In the guarded F:UUF:U\to U7-calculus, the same idea appears as an endo-type-operator

F:UUF:U\to U8

whose recursive occurrence is F:UUF:U\to U9-guarded. Equivalently,

TT0

where TT1 may be any polynomial type-operator built from sums, products, arrows, and box. On the categorical side, in the topos of trees TT2, a guarded behavioural functor is an endofunctor TT3 fitting into a factorisation

TT4

with TT5 itself a strong polynomial functor. In practice, this means that every recursive occurrence of TT6 is shifted back one time-step (Clouston et al., 2015).

A common misconception is to treat the notion as if it were merely an arbitrary endofunctor used in coalgebra. The guarded setting is stricter. The endofunctor must be contractive, either by explicit preservation of delay in TCTT or by a syntactic/categorical factorisation through TT7 in the guarded TT8-calculus. That contractiveness is the condition that supports both productivity and guarded coinduction.

3. Final guarded coalgebras and recovery of coinduction

Given a guarded behavioural functor TT9 in TCTT, its final guarded coalgebra is formed as the guarded-recursive type

A\triangleright A0

The unfolding path of the fixed point supplies an equivalence

A\triangleright A1

with inverse

A\triangleright A2

Up to definitional unfolding, one has judgmental equalities

A\triangleright A3

witnessed by paths from the fixed-point constructor. Thus the guarded recursive type is not only defined but carries the expected coalgebraic structure (Møgelberg et al., 2018).

In the guarded A\triangleright A4-calculus and its semantics in the topos of trees, local contractiveness yields a unique guarded fixed point. For the stream-shape endofunctor

A\triangleright A5

one obtains

A\triangleright A6

and concretely

A\triangleright A7

with restriction by dropping the last component. This object is the final A\triangleright A8-coalgebra, so at stage A\triangleright A9 it represents streams of length α:T\alpha:T0 (Clouston et al., 2016).

To recover a true coinductive datatype from the guarded one, the clock is quantified away: α:T\alpha:T1 In the topos of trees, the corresponding operation is the constant-object comonad α:T\alpha:T2, concretely

α:T\alpha:T3

for all α:T\alpha:T4. This means that guarded fixed points and ordinary coinductive types are related but not identical: the former are step-indexed objects, while the latter arise by clock quantification or boxing (Clouston et al., 2015).

4. Relation lifting and the bisimilarity theorem

For a guarded α:T\alpha:T5-coalgebra

α:T\alpha:T6

TCTT defines the relation lifting of α:T\alpha:T7 on a relation α:T\alpha:T8 by

α:T\alpha:T9

where

(-Intro)Γ,α:Tt:A    Γλα.t:A(\triangleright\text{-Intro})\quad \Gamma,\alpha:T \vdash t:A \;\Rightarrow\; \Gamma \vdash \lambda \alpha.\, t : \triangleright A0

Then (-Intro)Γ,α:Tt:A    Γλα.t:A(\triangleright\text{-Intro})\quad \Gamma,\alpha:T \vdash t:A \;\Rightarrow\; \Gamma \vdash \lambda \alpha.\, t : \triangleright A1 is an (-Intro)Γ,α:Tt:A    Γλα.t:A(\triangleright\text{-Intro})\quad \Gamma,\alpha:T \vdash t:A \;\Rightarrow\; \Gamma \vdash \lambda \alpha.\, t : \triangleright A2-bisimulation if

(-Intro)Γ,α:Tt:A    Γλα.t:A(\triangleright\text{-Intro})\quad \Gamma,\alpha:T \vdash t:A \;\Rightarrow\; \Gamma \vdash \lambda \alpha.\, t : \triangleright A3

The greatest bisimulation is defined guarded-recursively by

(-Intro)Γ,α:Tt:A    Γλα.t:A(\triangleright\text{-Intro})\quad \Gamma,\alpha:T \vdash t:A \;\Rightarrow\; \Gamma \vdash \lambda \alpha.\, t : \triangleright A4

The construction follows the standard coalgebraic pattern, but here it is internalized in guarded type theory (Møgelberg et al., 2018).

The main theorem identifies this abstract bisimilarity with the primitive equality notion of cubical type theory on the final guarded coalgebra. Its proof proceeds through three key facts. First, for every (-Intro)Γ,α:Tt:A    Γλα.t:A(\triangleright\text{-Intro})\quad \Gamma,\alpha:T \vdash t:A \;\Rightarrow\; \Gamma \vdash \lambda \alpha.\, t : \triangleright A5 and (-Intro)Γ,α:Tt:A    Γλα.t:A(\triangleright\text{-Intro})\quad \Gamma,\alpha:T \vdash t:A \;\Rightarrow\; \Gamma \vdash \lambda \alpha.\, t : \triangleright A6,

(-Intro)Γ,α:Tt:A    Γλα.t:A(\triangleright\text{-Intro})\quad \Gamma,\alpha:T \vdash t:A \;\Rightarrow\; \Gamma \vdash \lambda \alpha.\, t : \triangleright A7

Second, relation lifting commutes with delay: (-Intro)Γ,α:Tt:A    Γλα.t:A(\triangleright\text{-Intro})\quad \Gamma,\alpha:T \vdash t:A \;\Rightarrow\; \Gamma \vdash \lambda \alpha.\, t : \triangleright A8 for (-Intro)Γ,α:Tt:A    Γλα.t:A(\triangleright\text{-Intro})\quad \Gamma,\alpha:T \vdash t:A \;\Rightarrow\; \Gamma \vdash \lambda \alpha.\, t : \triangleright A9. Third, the coalgebra structure

(-Elim)Γt:A    Γ,α:Tt[α]:A(\triangleright\text{-Elim})\quad \Gamma \vdash t:\triangleright A \;\Rightarrow\; \Gamma,\alpha:T \vdash t[\alpha]:A0

is an embedding, indeed an equivalence. Combining these facts by guarded recursion yields

(-Elim)Γt:A    Γ,α:Tt[α]:A(\triangleright\text{-Elim})\quad \Gamma \vdash t:\triangleright A \;\Rightarrow\; \Gamma,\alpha:T \vdash t[\alpha]:A1

In particular, on the final process type, the coinduction principle holds in its strongest form: to prove (-Elim)Γt:A    Γ,α:Tt[α]:A(\triangleright\text{-Elim})\quad \Gamma \vdash t:\triangleright A \;\Rightarrow\; \Gamma,\alpha:T \vdash t[\alpha]:A2, it suffices to exhibit (-Elim)Γt:A    Γ,α:Tt[α]:A(\triangleright\text{-Elim})\quad \Gamma \vdash t:\triangleright A \;\Rightarrow\; \Gamma,\alpha:T \vdash t[\alpha]:A3 and (-Elim)Γt:A    Γ,α:Tt[α]:A(\triangleright\text{-Elim})\quad \Gamma \vdash t:\triangleright A \;\Rightarrow\; \Gamma,\alpha:T \vdash t[\alpha]:A4 in some guarded bisimulation (Møgelberg et al., 2018).

This theorem addresses a central difficulty emphasized in the paper’s abstract: in proof assistants based on type theory, reasoning about coinductive types is hindered both by productivity constraints and by the lack of coincidence between built-in identity types and bisimilarity. For guarded recursive types in TCTT, the theorem removes the second obstacle by showing that the abstract behavioural equivalence collapses to identity.

5. Canonical examples: streams, labelled transition systems, and behavioural differential equations

The basic stream example is the guarded behavioural functor

(-Elim)Γt:A    Γ,α:Tt[α]:A(\triangleright\text{-Elim})\quad \Gamma \vdash t:\triangleright A \;\Rightarrow\; \Gamma,\alpha:T \vdash t[\alpha]:A5

In the topos of trees, it is defined levelwise by

(-Elim)Γt:A    Γ,α:Tt[α]:A(\triangleright\text{-Elim})\quad \Gamma \vdash t:\triangleright A \;\Rightarrow\; \Gamma,\alpha:T \vdash t[\alpha]:A6

with restriction maps

(-Elim)Γt:A    Γ,α:Tt[α]:A(\triangleright\text{-Elim})\quad \Gamma \vdash t:\triangleright A \;\Rightarrow\; \Gamma,\alpha:T \vdash t[\alpha]:A7

Its unique fixed point (-Elim)Γt:A    Γ,α:Tt[α]:A(\triangleright\text{-Elim})\quad \Gamma \vdash t:\triangleright A \;\Rightarrow\; \Gamma,\alpha:T \vdash t[\alpha]:A8 is the stream object, and the final coalgebra semantics models infinite streams through their finite approximations. This is the prototypical case in which guardedness is visible both syntactically and semantically: the recursive occurrence of (-Elim)Γt:A    Γ,α:Tt[α]:A(\triangleright\text{-Elim})\quad \Gamma \vdash t:\triangleright A \;\Rightarrow\; \Gamma,\alpha:T \vdash t[\alpha]:A9 appears only under one time-step of delay (Clouston et al., 2016).

A second canonical example, developed in TCTT, is the guarded labelled transition system functor. For a small set of labels β\beta0,

β\beta1

where β\beta2 is the finite-powerset HIT. One checks that β\beta3 is small, functorial, and commutes with delay. The resulting guarded process type is

β\beta4

Its unfold map

β\beta5

is the usual one-step observation of a process. Specializing the abstract definition of bisimulation yields the familiar guarded bisimulation condition for labelled transition systems: β\beta6 together with the symmetric clause. Proposition 5.2 shows that this concretely truncated notion agrees with the relation-lifting version after propositional truncation, and Theorem 4.6 implies

β\beta7

Thus two processes are path-equal exactly when they are guardedly bisimilar (Møgelberg et al., 2018).

Earlier guarded-recursion work also uses guarded behavioural functors to solve Rutten’s behavioural differential equations. A β\beta8-ary stream function is specified by

β\beta9

with desired equations for head and tail. In the guarded λ\lambda00-calculus one first defines a guarded solution λ\lambda01 by a fixed point whose tail is pushed under one λ\lambda02, and then lifts it to a fully coinductive solution

λ\lambda03

via the constant modality, equivalently clock quantification. The result is a unique productive stream solution of the behavioural differential equation, and adequacy transfers the semantic uniqueness claim back to operational contextual equivalence (Clouston et al., 2016).

6. Logical and semantic significance

Guarded behavioural functors organize a convergence of three themes. First, they provide a type-theoretic productivity discipline: recursive definitions are accepted only when every self-reference is delayed by λ\lambda04. Second, they admit denotational semantics in the topos of trees, where objects are sequences

λ\lambda05

and λ\lambda06 is the shift functor

λ\lambda07

Third, they support proof principles internal to the logic, notably L\"ob induction: λ\lambda08 which mirrors the fixed-point principle for guarded recursion (Clouston et al., 2015).

The semantic consequences are equally concrete. The guarded λ\lambda09-calculus has a call-by-name operational semantics, adequate denotational semantics in the topos of trees, and an adequacy proof that entails that the evaluation of a program always terminates. In this setting, one proves contextual equivalence via the internal logic and L\"ob reasoning, while guarded behavioural functors provide the coalgebraic shapes that make productive coinduction possible (Clouston et al., 2016).

Within TCTT, the significance is more specific: final guarded coalgebras enjoy an identification of bisimilarity with path equality. This implies that guarded recursion can be used to give simple equational reasoning proofs of bisimilarity, and the paper explicitly presents the result as “a step towards obtaining bisimilarity as path equality for coinductive types using the encodings mentioned above” (Møgelberg et al., 2018). A plausible implication is that guarded behavioural functors serve not only as a productivity device but also as a bridge between coalgebraic behavioural reasoning and the intrinsic equality structure of cubical type theory.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Guarded Behavioural Functor.