aboutsummaryrefslogtreecommitdiff
path: root/tactics
diff options
context:
space:
mode:
authormsozeau2008-07-22 14:35:51 +0000
committermsozeau2008-07-22 14:35:51 +0000
commitd619a834de7548649f53d59ec4fc9e892b33d24c (patch)
tree10bb2d3e30caeccfada2e2d812a56cf416e8d89a /tactics
parent2debc4ab0b171963afff40cc3183e4e92cca9a0e (diff)
A try at allowing matching on applications as a binary syntax node by default.
It breaks tauto as [?X _ _] matches much more terms. It is mostly fixed by not destructing objects of record types. The new [intuition] was also pulling an unneeded dependency in Field_theory which can be cleared easily. Zis_gcd_bezout is also considered a conjunction now, which seems correct(?). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11243 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'tactics')
-rw-r--r--tactics/tauto.ml411
1 files changed, 10 insertions, 1 deletions
diff --git a/tactics/tauto.ml4 b/tactics/tauto.ml4
index 4af760ed8c..ad6d022306 100644
--- a/tactics/tauto.ml4
+++ b/tactics/tauto.ml4
@@ -10,6 +10,7 @@
(*i $Id$ i*)
+open Term
open Hipattern
open Names
open Libnames
@@ -36,10 +37,18 @@ let is_unit ist =
<:tactic<idtac>>
else
<:tactic<fail>>
+
+let is_record t =
+ let (hdapp,args) = decompose_app t in
+ match (kind_of_term hdapp) with
+ | Ind ind ->
+ let (mib,mip) = Global.lookup_inductive ind in
+ mib.Declarations.mind_record
+ | _ -> false
let is_conj ist =
let ind = assoc_last ist in
- if (is_conjunction ind) && (is_nodep_ind ind) then
+ if (is_conjunction ind) && (is_nodep_ind ind) && not (is_record ind) then
<:tactic<idtac>>
else
<:tactic<fail>>