p/x,y. f(x;y)
which evaluates thus:
<a,b>/x,y. f(x;y) * f(a;b)
The projection functions are special cases:
p.1 isp/x,y. x p.2 isp/x,y. y
<a,b>.1 * a
<a,b>.2 * b
The "cartesian product" type B
A
B
B(u)
B(u)
A
B(a)
B(u)
B(u)
This type constructor is often called the "general sum" of a family of types, and indeed the most common notation for it is u:A. B(u)"
Here's a theorem about pairing projections, complementing the above computational facts about projecting off of pairs:
Thm* B:(A
Type), p:(u:A
B(u)). p = <p.1,p.2>
a:A
B(a)
Tupling.
We adopt the convention for forming standard tuples by iterating through the second component, so the triple
a:A, b:B, c:C. <a,b,c>
A
B
C
or more generally,
A:Type, B:(A
Type), C:(x:A
B(x)
Type), a:A, b:B(a), c:C(a,b).
<a,b,c>u:A
v:B(u)
C(u,v)
The notation for spreading tuples is extended as well:
t/x,y,z. f(x,y,z) abbreviatest/x,#. #/y,z. f(x,y,z) hence
<a,b,c>/x,y,z. f(x,y,z) * .<b,c>/y,z. f(a,y,z) *
f(a,b,c)
About:
![]() | ![]() | ![]() | ![]() | ![]() | ![]() |