diff options
| author | puech | 2011-07-29 14:24:45 +0000 |
|---|---|---|
| committer | puech | 2011-07-29 14:24:45 +0000 |
| commit | dc23b722fd213af68aa52f66b73d072a8f77049d (patch) | |
| tree | 0ca0af6ffeb695045dfbbcd3bd5531feb95c338e /kernel/term.ml | |
| parent | 2e1048a9e721a7909b669f5fc3b19a2676aaf887 (diff) | |
Term: added function eq_named_declaration
We need to move eq_constr upwards
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14319 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'kernel/term.ml')
| -rw-r--r-- | kernel/term.ml | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/kernel/term.ml b/kernel/term.ml index 91b32aea14..097b4db506 100644 --- a/kernel/term.ml +++ b/kernel/term.ml @@ -583,6 +583,18 @@ let compare_constr f t1 t2 = ln1 = ln2 & array_for_all2 f tl1 tl2 & array_for_all2 f bl1 bl2 | _ -> false +(*******************************) +(* alpha conversion functions *) +(*******************************) + +(* alpha conversion : ignore print names and casts *) + +let rec eq_constr m n = + (m==n) or + compare_constr eq_constr m n + +let eq_constr m n = eq_constr m n (* to avoid tracing a recursive fun *) + (***************************************************************************) (* Type of assumptions *) (***************************************************************************) @@ -606,6 +618,9 @@ let exists_rel_declaration f (_, v, ty) = Option.cata f false v || f ty let for_all_named_declaration f (_, v, ty) = Option.cata f true v && f ty let for_all_rel_declaration f (_, v, ty) = Option.cata f true v && f ty +let eq_named_declaration (i1, c1, t1) (i2, c2, t2) = + id_ord i1 i2 = 0 && Option.Misc.compare eq_constr c1 c2 && eq_constr t1 t2 + (***************************************************************************) (* Type of local contexts (telescopes) *) (***************************************************************************) @@ -1089,18 +1104,6 @@ let rec isArity c = | Sort _ -> true | _ -> false -(*******************************) -(* alpha conversion functions *) -(*******************************) - -(* alpha conversion : ignore print names and casts *) - -let rec eq_constr m n = - (m==n) or - compare_constr eq_constr m n - -let eq_constr m n = eq_constr m n (* to avoid tracing a recursive fun *) - (*******************) (* hash-consing *) (*******************) |
