2 ||M|| This file is part of HELM, an Hypertextual, Electronic
3 ||A|| Library of Mathematics, developed at the Computer Science
4 ||T|| Department, University of Bologna, Italy.
6 ||T|| HELM is free software; you can redistribute it and/or
7 ||A|| modify it under the terms of the GNU General Public License
8 \ / version 2 or (at your option) any later version.
9 \ / This software is distributed as is, NO WARRANTY.
10 V_______________________________________________________________ *)
14 val lift_from : #NCic.status -> ?no_implicit:bool -> int -> int -> NCic.term -> NCic.term
17 (* lifts [t] of [n] *)
18 (* [from] default 1, lifts only indexes >= [from] *)
19 (* NOTE: the opposite function (delift_rels) is defined in CicMetaSubst *)
20 (* since it needs to restrict the metavariables in case of failure *)
21 val lift : #NCic.status -> ?from:int -> ?no_implicit:bool -> int -> NCic.term -> NCic.term
24 (* substitutes [t1] for [Rel 1] in [t2] *)
25 (* if avoid_beta_redexes is true (default: false) no new beta redexes *)
26 (* are generated. WARNING: the substitution can diverge when t2 is not *)
27 (* well typed and avoid_beta_redexes is true. *)
29 #NCic.status -> ?avoid_beta_redexes:bool -> ?no_implicit:bool ->
30 NCic.term -> NCic.term -> NCic.term
32 (* psubst [avoid] [map_arg] [args] [t]
33 * [avoid] : do not leave newly created beta-redexes, default false
34 * [t] : term to fill in
35 * [args] : stuff to substitute
36 * [map_arg] : map the argument to obtain a term
37 * the function is ReductionStrategy.from_env_for_unwind when psubst is
38 * used to implement nCicReduction.unwind' *)
40 #NCic.status -> ?avoid_beta_redexes:bool -> ?no_implicit:bool ->
41 ('a -> NCic.term) -> 'a list -> NCic.term ->
44 (* subst_meta (n, Ctx [t_1 ; ... ; t_n]) t *)
45 (* returns the term [t] where [Rel i] is substituted with [t_i] lifted by n *)
46 (* [t_i] is lifted as usual when it crosses an abstraction *)
47 (* subst_meta (n, Irl _) t -> lift n t *)
48 val subst_meta : #NCic.status -> NCic.local_context -> NCic.term -> NCic.term