Cube layer¶
All cubes live in CUBE
universe.
There are two built-in cubes:
1
cube is a unit cube with a single point*_1
2
cube is a directed interval cube with points0_2
and1_2
It is also possible to have CUBE
variables and make products of cubes:
I * J
is a product of cubesI
andJ
(t, s)
is a point inI * J
ift : I
ands : J
- if
ts : I * J
, thenfirst ts : I
andsecond ts : J
You can usually use (t, s)
both as a pattern, and a construction of a pair of points:
-- Swap point components of a point in a cube I × I
#define swap
( I : CUBE)
: ( I × I) → I × I
:= \ ( t , s) → (s , t)