From d619a834de7548649f53d59ec4fc9e892b33d24c Mon Sep 17 00:00:00 2001 From: msozeau Date: Tue, 22 Jul 2008 14:35:51 +0000 Subject: 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 --- tactics/tauto.ml4 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tactics') 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> else <:tactic> + +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> else <:tactic> -- cgit v1.2.3