mirror of
https://github.com/HigherOrderCO/Kind.git
synced 2024-09-11 16:36:13 +03:00
25 lines
1.3 KiB
Plaintext
25 lines
1.3 KiB
Plaintext
Kind.if.ann
|
|
: ∀(term: Kind.Term)
|
|
∀(P: *)
|
|
∀(Y: ∀(val: Kind.Term) ∀(typ: Kind.Term) P)
|
|
∀(N: ∀(val: Kind.Term) P)
|
|
P
|
|
= λterm λP λY λN
|
|
let P = λx ∀(Y: ∀(val: Kind.Term) ∀(typ: Kind.Term) P) ∀(N: ∀(val: Kind.Term) P) P
|
|
let all = λnam λinp λbod λY λN (N (Kind.all nam inp bod))
|
|
let lam = λnam λbod λY λN (N (Kind.lam nam bod))
|
|
let app = λfun λarg λY λN (N (Kind.app fun arg))
|
|
let ann = λval λtyp λY λN (Y val typ)
|
|
let slf = λnam λbod λY λN (N (Kind.slf nam bod))
|
|
let ins = λval λY λN (N (Kind.ins val))
|
|
let ref = λnam λval λY λN (N (Kind.ref nam val))
|
|
let def = λnam λval λbod λY λN (N (Kind.def nam val bod))
|
|
let set = λY λN (N Kind.set)
|
|
let u60 = λY λN (N Kind.u60)
|
|
let num = λval λY λN (N (Kind.num val))
|
|
let op2 = λopr λfst λsnd λY λN (N (Kind.op2 opr fst snd))
|
|
let mat = λnam λx λz λs λp λY λN (N (Kind.mat nam x z s p))
|
|
let txt = λlit λY λN (N (Kind.txt lit))
|
|
let hol = λnam λctx λY λN (N (Kind.hol nam ctx))
|
|
let var = λnam λidx λY λN (N (Kind.var nam idx))
|
|
(~term P all lam app ann slf ins ref def set u60 num op2 mat txt hol var Y N) |