Quotients of Polynomial Functors #
We assume the following:
P: a polynomial functorW: its W-typeM: its M-typeF: a functor
We define:
The main goal is to construct:
Fix: the initial algebra with structure mapF Fix → Fix.Cofix: the final coalgebra with structure mapCofix → F Cofix
We also show that the composition of qpfs is a qpf, and that the quotient of a qpf is a qpf.
The present theory focuses on the univariate case for qpfs
References #
- [Jeremy Avigad, Mario M. Carneiro and Simon Hudon, Data Types as Quotients of Polynomial Functors][avigad-carneiro-hudon2019]
Quotients of polynomial functors.
Roughly speaking, saying that F is a quotient of a polynomial functor means that for each α,
elements of F α are represented by pairs ⟨a, f⟩, where a is the shape of the object and
f indexes the relevant elements of α, in a suitably natural manner.
- P : PFunctor.{u, u'}
Instances
two trees are equivalent if their F-abstractions are
- ind {F : Type u → Type v} [q : QPF F] (a : (P F).A) (f f' : (P F).B a → (P F).W) : (∀ (x : (P F).B a), Wequiv (f x) (f' x)) → Wequiv (WType.mk a f) (WType.mk a f')
- abs {F : Type u → Type v} [q : QPF F] (a : (P F).A) (f : (P F).B a → (P F).W) (a' : (P F).A) (f' : (P F).B a' → (P F).W) : QPF.abs ⟨a, f⟩ = QPF.abs ⟨a', f'⟩ → Wequiv (WType.mk a f) (WType.mk a' f')
- trans {F : Type u → Type v} [q : QPF F] (u v w : (P F).W) : Wequiv u v → Wequiv v w → Wequiv u w
Instances For
Given a qpf F and a well-behaved surjection FG_abs from F α to
functor G α, G is a qpf. We can consider G a quotient on F where
elements x y : F α are in the same equivalence class if
FG_abs x = FG_abs y.