diff options
author | 2005-05-19 13:03:45 +0000 | |
---|---|---|
committer | 2005-05-19 13:03:45 +0000 | |
commit | d55637238606e1f3eba48219266782d691e021ad (patch) | |
tree | 52b19334d9a3ddc666dcc013fca0d1fe969a286d /tactics | |
parent | b19ad7d1dbd431975c1718c08f8ebd38c5b5f376 (diff) |
A wish by Bas Spitters granted: a little more of unification up to
convertibility is now tried in setoid_rewrite. As a consequence it is now
possible to declare relations over the function space (fun A B: Type => A -> B).
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@7039 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'tactics')
-rw-r--r-- | tactics/setoid_replace.ml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tactics/setoid_replace.ml b/tactics/setoid_replace.ml index 07e1c7dc1..11e1545a5 100644 --- a/tactics/setoid_replace.ml +++ b/tactics/setoid_replace.ml @@ -728,7 +728,26 @@ let unify_relation_carrier_with_type env rel t = if rel.rel_quantifiers_no = 0 && is_conv env Evd.empty rel.rel_a t then [||] else +(* raise_error rel.rel_quantifiers_no +*) + begin + let evars,args,instantiated_rel_a = + let ty = Typing.type_of env Evd.empty rel.rel_a in + let evd = Evd.create_evar_defs Evd.empty in + let env,args,concl = + Clenv.clenv_environments evd (Some rel.rel_quantifiers_no) ty + in + env, args, + nf_betaiota + (match args with [] -> rel.rel_a | _ -> applist (rel.rel_a,args)) + in + let evars' = + w_unify true (*??? or false? *) env Reduction.CONV (*??? or cumul? *) + ~mod_delta:true (*??? or true? *) t instantiated_rel_a evars in + let args' = List.map (Reductionops.nf_meta evars') args in + Array.of_list args' + end in apply_to_relation args rel |