aboutsummaryrefslogtreecommitdiff
path: root/kernel/term.ml
diff options
context:
space:
mode:
authorherbelin2000-10-03 18:10:47 +0000
committerherbelin2000-10-03 18:10:47 +0000
commit7c9ee80ea7f6beeddbf922b46f8436d92c0b27ce (patch)
tree8a87902ccd6f3c0663d915fb43288fd6762637b5 /kernel/term.ml
parent33d14679b922ae0a15c10e788335f23a3a64c643 (diff)
Rebranchement de la tactique Let
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@638 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'kernel/term.ml')
-rw-r--r--kernel/term.ml11
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/term.ml b/kernel/term.ml
index 9829c1154f..9e3ed34797 100644
--- a/kernel/term.ml
+++ b/kernel/term.ml
@@ -957,6 +957,12 @@ let substl laml =
substn_many (Array.map make_substituend (Array.of_list laml)) 0
let subst1 lam = substl [lam]
+let substl_decl laml (id,bodyopt,typ as d) =
+ match bodyopt with
+ | None -> (id,None,substl laml typ)
+ | Some body -> (id, Some (substl laml body), typed_app (substl laml) typ)
+let subst1_decl lam = substl_decl [lam]
+
(* (thin_val sigma) removes identity substitutions from sigma *)
let rec thin_val = function
@@ -1425,6 +1431,11 @@ let occur_var s c =
in
try occur_rec c; false with Occur -> true
+let occur_var_in_decl hyp (_,c,typ) =
+ match c with
+ | None -> occur_var hyp (body_of_type typ)
+ | Some body -> occur_var hyp (body_of_type typ) || occur_var hyp body
+
(***************************************)
(* alpha and eta conversion functions *)
(***************************************)