implicitt/lib/Core/Term.ml

39 lines
657 B
OCaml
Raw Normal View History

2023-01-31 19:51:46 +01:00
module C = Common
2022-08-25 20:29:55 +02:00
type var = Ix of int
type 'a binder = B of 'a
type term
= Var of var
2023-01-31 19:51:46 +01:00
| Meta of C.meta
2022-08-25 20:29:55 +02:00
| Type
| T0
| Ind0 of term binder * term
| T1
2022-08-30 16:12:47 +02:00
| T1tr (* Unit eta rule instead of elimination principle *)
2022-08-25 20:29:55 +02:00
| TNat
| Zero
| Suc of term
| IndN of term binder * term * term binder binder * term
| TBool
| True
| False
2023-01-23 18:04:26 +01:00
| IndB of term binder * term * term * term (* ordered true, false *)
2022-08-25 20:29:55 +02:00
| Pi of term * term binder
| Lam of term binder
| App of term * term
| Sg of term * term binder
| Pair of term * term
| Fst of term
| Snd of term
2022-09-03 11:06:12 +02:00
| Let of term * term * term binder (* tr : ty in sc *)