]> matita.cs.unibo.it Git - helm.git/blob - helm/software/components/ng_kernel/nCicSubstitution.mli
Release 0.5.9.
[helm.git] / helm / software / components / ng_kernel / nCicSubstitution.mli
1 (*
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.                     
5     ||I||                                                                
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_______________________________________________________________ *)
11
12 (* $Id$ *)
13
14 val set_ppterm : (context:NCic.context -> 
15   subst:NCic.substitution -> 
16   metasenv:NCic.metasenv ->
17   ?inside_fix:bool ->
18    NCic.term -> string) -> unit
19
20 (* lift n t                                                              *)
21 (*  lifts [t] of [n]                                                     *)
22 (*  [from] default 1, lifts only indexes >= [from]                       *)
23 (*  NOTE: the opposite function (delift_rels) is defined in CicMetaSubst *)
24 (*  since it needs to restrict the metavariables in case of failure      *)
25 val lift : ?from:int -> int -> NCic.term -> NCic.term
26
27 (* subst t1 t2                                                          *)
28 (*  substitutes [t1] for [Rel 1] in [t2]                                *)
29 (*  if avoid_beta_redexes is true (default: false) no new beta redexes  *)
30 (*  are generated. WARNING: the substitution can diverge when t2 is not *)
31 (*  well typed and avoid_beta_redexes is true.                          *)
32 val subst : ?avoid_beta_redexes:bool -> NCic.term -> NCic.term -> NCic.term
33
34 (* psubst [avoid] [map_arg] [args] [t]            
35  *  [avoid] : do not leave newly created beta-redexes, default false
36  *  [t] : term to fill in
37  *  [args] : stuff to substitute
38  *  [map_arg] : map the argument to obtain a term
39  *    the function is ReductionStrategy.from_env_for_unwind when psubst is
40  *    used to implement nCicReduction.unwind'                              *)
41 val psubst : 
42   ?avoid_beta_redexes:bool ->  
43   ('a -> NCic.term) -> 'a list -> NCic.term -> 
44     NCic.term
45
46 (* subst_meta (n, Ctx [t_1 ; ... ; t_n]) t                                  *)
47 (*  returns the term [t] where [Rel i] is substituted with [t_i] lifted by n *)
48 (*  [t_i] is lifted as usual when it crosses an abstraction                  *)
49 (* subst_meta (n, Irl _) t -> lift n t                                        *)
50 val subst_meta : NCic.local_context -> NCic.term -> NCic.term
51