mirror of
https://github.com/HigherOrderCO/Kind.git
synced 2024-09-11 20:40:38 +03:00
71 lines
1.3 KiB
Plaintext
71 lines
1.3 KiB
Plaintext
QBool.match
|
|
: ∀(a: QBool)
|
|
∀(P: ∀(x: QBool) *)
|
|
∀(t: (P QBool.true))
|
|
∀(f: (P QBool.false))
|
|
(P a)
|
|
= λa λP λt λf
|
|
(~(~a P)
|
|
λx (P a)
|
|
λtag
|
|
#match tag = tag {
|
|
#0: λx (x t)
|
|
#+: λx
|
|
(#match tag_1 = tag-1 {
|
|
#0: λx (x f)
|
|
#+: λx (x λe (Empty.absurd e *))
|
|
}: ∀(x:
|
|
∀(x:
|
|
#match tag_1 = tag_1 {
|
|
#0: (P QBool.false)
|
|
#+: ∀(x: Empty) *
|
|
}: *
|
|
)
|
|
(P a)
|
|
)
|
|
(P a)
|
|
x
|
|
)
|
|
}: ∀(x:
|
|
∀(x:
|
|
#match tag = tag {
|
|
#0: (P QBool.true)
|
|
#+: #match tag_1 = tag-1 {
|
|
#0: (P QBool.false)
|
|
#+: ∀(x: Empty) *
|
|
}: *
|
|
}: *
|
|
)
|
|
(P a)
|
|
)
|
|
(P a)
|
|
)
|
|
|
|
QBool2.match
|
|
: ∀(a: QBool2)
|
|
∀(P: ∀(x: QBool2) *)
|
|
∀(t: (P QBool2.true))
|
|
∀(f: (P QBool2.false))
|
|
(P a)
|
|
= λa λP λt λf
|
|
(~a
|
|
P
|
|
λtag
|
|
#match tag = tag {
|
|
#0: t
|
|
#+: #match tag_1 = tag-1 {
|
|
#0: f
|
|
#+: λe (~e λx *)
|
|
}: #match tag_1 = tag_1 {
|
|
#0: (P QBool2.false)
|
|
#+: ∀(e: Empty) *
|
|
}: *
|
|
}: #match tag = tag {
|
|
#0: (P QBool2.true)
|
|
#+: #match tag_1 = tag-1 {
|
|
#0: (P QBool2.false)
|
|
#+: ∀(e: Empty) *
|
|
}: *
|
|
}: *
|
|
)
|