10 | {-------------------------------------------------------------------------------
11 | This file defines a number of different containers
12 | Some of them are possible to express in terms of each other, but we opt to define all of them directly
13 | -------------------------------------------------------------------------------}
15 | ||| Constant (non-dependent) container: positions do not depend on shapes
16 | ||| As a polynomial functor: F(X) = aX^b
21 | ||| Constant container whose shapes and positions coincide
22 | ||| As a polynomial functor: F(X) = aX^a
27 | ||| Naperian container: a constant container with a single shape
28 | ||| As a polynomial functor: F(X) = X^b
33 | ||| Flat container: a constant container with a single position
34 | ||| As a polynomial functor: F(X) = aX
39 | ||| Sharp container: a constant container without any positions
40 | ||| As a polynomial functor: F(X) = a
45 | ||| Empty container, isomorphic to Void
46 | ||| As a polynomial functor: F(X) = 0
47 | ||| Initial container
52 | ||| Container of a single thing
53 | ||| As a polynomial functor: F(X) = X
54 | ||| Unit of the tensor and composition product
59 | ||| Container with a single shape, but no positions. Isomorphic to Unit : Type
60 | ||| As a polynomial functor: F(X) = 1
61 | ||| Terminal container
66 | ||| Product, container of two things
67 | ||| Isomorphic to Scalar >*< Scalar
68 | ||| As a polynomial functor: F(X) = X^2
73 | ||| Coproduct, container of either one of two things
74 | ||| Isomorphic to Scalar >+< Scalar
75 | ||| As a polynomial functor: F(X) = X + X
80 | ||| Container of either one thing, or nothing
81 | ||| Isomorphic to Scalar >+< UnitCont
82 | ||| Initial algebra is Nat
83 | ||| As a polynomial functor: F(X) = 1 + X
88 | ||| Container of either two things, or nothing
89 | ||| Isomorphic to Pair >+< UnitCont
90 | ||| Initial algebra is BinTreeShape
91 | ||| As a polynomial functor: F(X) = 1 + X^2
96 | ||| List, container with an arbitrary number of things
97 | ||| As a polynomial functor: F(X) = 1 + X + X^2 + X^3 + ...
102 | ||| Vect, container of a fixed/known number of things
103 | ||| As a polynomial functor: F(X) = X^n
108 | ||| Grid, container of things arranged along two axes
109 | ||| As a polynomial functor: F(X) = X^(hw)
114 | ||| Container of an infinite number of things
115 | ||| As a polynomial functor: F(X) = X^Nat
120 | ||| Container of things stored at nodes and leaves of a binary tree
121 | ||| As a polynomial functor: F(X) = 1 + 2X + 3X^2 + 7X^3 + ...
126 | ||| Container of things stored at nodes of a binary tree
127 | ||| As a polynomial functor: F(X) = 1 + X + 2X^2 + 5X^3 +
132 | ||| Container of things stored at leaves of a binary tree
133 | ||| As a polynomial functor: F(X) = X + X^2 + 2X^3 + 5X^4 +
138 | ||| Tensors are containers
139 | ||| As a polynomial functor: F(X) = ?
156 | ||| Ignoring universe levels here
157 | ||| This should be the analogue of `Type : Type`
162 | ||| Basically an alias for `Nap`