diff options
author | Arnaud Spiwack <arnaud@spiwack.net> | 2015-02-19 16:41:51 +0100 |
---|---|---|
committer | Arnaud Spiwack <arnaud@spiwack.net> | 2015-02-24 18:50:33 +0100 |
commit | fc6d0fb650f57a764af6fe9be44677a69be11980 (patch) | |
tree | 1842169af1723d2abe3eeaf3d2bd429bfe0f3638 /kernel/constr.mli | |
parent | 2f41d8e976621b907925546a192e90e60f0e580b (diff) |
New function [Constr.equal_with] to compare terms up to variants of [kind_of_term].
To be able to write equality up to evar instantiation instantiation.
Generalises the main function of [eq] constr over the variant of [kind_of_term] it uses. It prevents some optimisation of [Array.equal] where two physically equal arrays are considered (less or) equal. But it does not seem to have appreciable effects on efficiency.
Diffstat (limited to 'kernel/constr.mli')
-rw-r--r-- | kernel/constr.mli | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/constr.mli b/kernel/constr.mli index 622b33c71..67d1adedf 100644 --- a/kernel/constr.mli +++ b/kernel/constr.mli @@ -203,6 +203,14 @@ val kind : constr -> (constr, types) kind_of_term and application grouping *) val equal : constr -> constr -> bool +(** [equal_with_evars k1 k2 a b] is true when [a] equals [b] modulo + alpha, casts, application grouping, and using [k1] to expose the + head of [a] and [k2] to expose the head of [b]. *) +val equal_with : + (constr -> (constr,types) kind_of_term) -> + (constr -> (constr,types) kind_of_term) -> + constr -> constr -> bool + (** [eq_constr_univs u a b] is [true] if [a] equals [b] modulo alpha, casts, application grouping and the universe equalities in [u]. *) val eq_constr_univs : constr Univ.check_function |