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