-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdebruijn.mli
71 lines (55 loc) · 1.49 KB
/
debruijn.mli
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
(*
* Debruijn managenent
*)
open Constr
open Environ
(* --- Numbers --- *)
(*
* Shifting and unshifting by an amount
*)
val unshift_i_by : int -> int -> int
val shift_i_by : int -> int -> int
(*
* Shifting and unshifting
*)
val unshift_i : int -> int
val shift_i : int -> int
(* --- Terms --- *)
(*
* Shifting and unshifting all indices greater than some amount by an amount
*)
val unshift_local : int -> int -> types -> types
val shift_local : int -> int -> types -> types
(*
* Shifting and unshifting all indices greater than 0 by an amount
*)
val unshift_by : int -> types -> types
val shift_by : int -> types -> types
(*
* Shifting and unshifting all indices greater than 0
*)
val shift : types -> types
val unshift : types -> types
(* --- Lists --- *)
(*
* Shifting and unshifting a list
*)
val shift_all : types list -> types list
val unshift_all : types list -> types list
(*
* Shifting and unshifting a list by an amount
*)
val shift_all_by : int -> types list -> types list
val unshift_all_by : int -> types list -> types list
(* --- Substitutions --- *)
(*
* Shifting a list of substitutions or its projections
*)
val shift_subs : (types * types) list -> (types * types) list
val shift_from : (types * types) list -> (types * types) list
val shift_to : (types * types) list -> (types * types) list
(* --- Adjusting to new environments --- *)
(*
* Shift a term from the old (first) environment to the new (second) environment
*)
val shift_to_env : (env * env) -> types -> types