-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdproduct.hs
27 lines (23 loc) · 966 Bytes
/
dproduct.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
-- projections of a dependent product
fstD = \ (a : Set) (b : (forall (_ : a). Set)) (p : (exists (x : a) . b x)) ->
elim
(exists (x : a) . b x)
(\ (_ : exists (x : a) . b x) -> a)
(\(x : a) (y : b x) -> x)
p;
sndD = \ (a : Set) (b : (forall (_ : a). Set)) (p : (exists (x : a) . b x)) ->
elim
(exists (x : a) . b x)
(\ (p : (exists (x : a) . b x)) -> b (fstD a b p))
(\(x : a) (y : b x) -> y)
p;
dproduct_id :
forall
(a : Set) (b : (forall (_ : a). Set)) (p : (exists (x : a) . b x)) . exists (x : a) . b x;
dproduct_id =
\ (a : Set) (b : (forall (_ : a). Set)) (p : (exists (x : a) . b x)) ->
elim
(exists (x : a) . b x)
(\ (_ : exists (x : a) . b x) -> exists (x : a) . b x)
(\(x : a) (y : b x) -> dpair (exists (x : a) . b x) x y)
p;