diff options
author | msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2006-12-23 18:11:18 +0000 |
---|---|---|
committer | msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2006-12-23 18:11:18 +0000 |
commit | 03eaad01a90813c8656b0306888644106939f537 (patch) | |
tree | 45304597a0a7c0dad50366adb4b90e932610ad67 /parsing | |
parent | 1f578ef558355e48db8ae15e6ccad1a2f5d089f9 (diff) |
Addition of a "Combined Scheme" vernacular command for building the conjunction of mutual inductions principles.
e.g: Combined Scheme mutind from tree_ind, forest_ind gives a conclusion (forall t : tree, P t) /\ (forall f : forest, P0 f).
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9461 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'parsing')
-rw-r--r-- | parsing/g_vernac.ml4 | 4 | ||||
-rw-r--r-- | parsing/ppvernac.ml | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/parsing/g_vernac.ml4 b/parsing/g_vernac.ml4 index ad42304ce..356c05e8f 100644 --- a/parsing/g_vernac.ml4 +++ b/parsing/g_vernac.ml4 @@ -143,7 +143,9 @@ GEXTEND Gram VernacFixpoint (recs,Options.boxed_definitions()) | "CoFixpoint"; corecs = LIST1 corec_definition SEP "with" -> VernacCoFixpoint (corecs,false) - | IDENT "Scheme"; l = LIST1 scheme SEP "with" -> VernacScheme l ] ] + | IDENT "Scheme"; l = LIST1 scheme SEP "with" -> VernacScheme l + | IDENT "Combined"; IDENT "Scheme"; id = identref; IDENT "from"; + l = LIST1 identref SEP "," -> VernacCombinedScheme (id, l) ] ] ; gallina_ext: [ [ b = record_token; oc = opt_coercion; name = identref; diff --git a/parsing/ppvernac.ml b/parsing/ppvernac.ml index c74922351..6213e4fda 100644 --- a/parsing/ppvernac.ml +++ b/parsing/ppvernac.ml @@ -602,6 +602,11 @@ let rec pr_vernac = function | VernacScheme l -> hov 2 (str"Scheme" ++ spc() ++ prlist_with_sep (fun _ -> fnl() ++ str"with ") pr_onescheme l) + | VernacCombinedScheme (id, l) -> + hov 2 (str"Combined Scheme" ++ spc() ++ + pr_lident id ++ spc() ++ str"from" ++ spc() ++ + prlist_with_sep (fun _ -> fnl() ++ str", ") pr_lident l) + (* Gallina extensions *) | VernacRecord (b,(oc,name),ps,s,c,fs) -> |