diff options
| author | corbinea | 2003-04-25 19:55:41 +0000 |
|---|---|---|
| committer | corbinea | 2003-04-25 19:55:41 +0000 |
| commit | e12ff90edcc4af4eb0998f11186e998b23ada15d (patch) | |
| tree | 8d9f1939569005ea89a2e69bab1557ec1f601886 /tactics | |
| parent | b8f8a4fc5636d7751cf58c01044e8da56e92b074 (diff) | |
Added the Ground tactic.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3955 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'tactics')
| -rw-r--r-- | tactics/hipattern.ml | 15 | ||||
| -rw-r--r-- | tactics/hipattern.mli | 5 |
2 files changed, 17 insertions, 3 deletions
diff --git a/tactics/hipattern.ml b/tactics/hipattern.ml index c11fd1699b..ff735c9cd5 100644 --- a/tactics/hipattern.ml +++ b/tactics/hipattern.ml @@ -176,10 +176,19 @@ let match_with_nottype t = let is_nottype t = op2bool (match_with_nottype t) -let is_imp_term c = +let match_with_forall_term c= match kind_of_term c with - | Prod (_,_,b) -> not (dependent (mkRel 1) b) - | _ -> false + | Prod (nam,a,b) -> Some (nam,a,b) + | _ -> None + +let is_forall_term c = op2bool (match_with_forall_term c) + +let match_with_imp_term c= + match kind_of_term c with + | Prod (_,a,b) when not (dependent (mkRel 1) b) ->Some (a,b) + | _ -> None + +let is_imp_term c = op2bool (match_with_imp_term c) let rec has_nodep_prod_after n c = match kind_of_term c with diff --git a/tactics/hipattern.mli b/tactics/hipattern.mli index 053175269c..8beaaf65e9 100644 --- a/tactics/hipattern.mli +++ b/tactics/hipattern.mli @@ -74,6 +74,11 @@ val is_equation : testing_function val match_with_nottype : (constr * constr) matching_function val is_nottype : testing_function +val match_with_forall_term : (name * constr * constr) matching_function +val is_forall_term : testing_function + +val match_with_imp_term : (constr * constr) matching_function +val is_imp_term : testing_function (* I added these functions to test whether a type contains dependent products or not, and if an inductive has constructors with dependent types |
