184 |
184 |
185 val constdecl = |
185 val constdecl = |
186 (P.name --| P.$$$ "where") >> (fn x => (x, NONE, Syntax.NoSyn)) || |
186 (P.name --| P.$$$ "where") >> (fn x => (x, NONE, Syntax.NoSyn)) || |
187 P.name -- (P.$$$ "::" |-- P.!!! P.typ >> SOME) -- P.opt_mixfix' >> P.triple1 || |
187 P.name -- (P.$$$ "::" |-- P.!!! P.typ >> SOME) -- P.opt_mixfix' >> P.triple1 || |
188 P.name -- (P.mixfix' >> pair NONE) >> P.triple2; |
188 P.name -- (P.mixfix' >> pair NONE) >> P.triple2; |
189 |
|
190 val constdef = Scan.option constdecl -- (P.opt_thm_name ":" -- P.prop); |
189 val constdef = Scan.option constdecl -- (P.opt_thm_name ":" -- P.prop); |
191 |
190 |
192 val constdefsP = |
191 val constdefsP = |
193 OuterSyntax.command "constdefs" "standard constant definitions" K.thy_decl |
192 OuterSyntax.command "constdefs" "standard constant definitions" K.thy_decl |
194 (structs -- Scan.repeat1 constdef >> (Toplevel.theory o Constdefs.add_constdefs)); |
193 (structs -- Scan.repeat1 constdef >> (Toplevel.theory o Constdefs.add_constdefs)); |
|
194 |
|
195 |
|
196 (* constant specifications *) |
|
197 |
|
198 val axiomatizationP = |
|
199 OuterSyntax.command "axiomatization" "axiomatic constant specification" K.thy_decl |
|
200 (P.and_list1 P.param -- Scan.optional (P.$$$ "where" |-- P.!!! (P.and_list1 P.named_spec)) [] |
|
201 >> (Toplevel.theory o (#2 oo Specification.axiomatize))); |
195 |
202 |
196 |
203 |
197 (* theorems *) |
204 (* theorems *) |
198 |
205 |
199 fun theorems kind = P.opt_locale_target -- P.name_facts |
206 fun theorems kind = P.opt_locale_target -- P.name_facts |
849 headerP, chapterP, sectionP, subsectionP, subsubsectionP, textP, |
856 headerP, chapterP, sectionP, subsectionP, subsubsectionP, textP, |
850 text_rawP, sectP, subsectP, subsubsectP, txtP, txt_rawP, |
857 text_rawP, sectP, subsectP, subsubsectP, txtP, txt_rawP, |
851 (*theory sections*) |
858 (*theory sections*) |
852 classesP, classrelP, defaultsortP, typedeclP, typeabbrP, nontermP, |
859 classesP, classrelP, defaultsortP, typedeclP, typeabbrP, nontermP, |
853 aritiesP, judgmentP, constsP, finalconstsP, syntaxP, no_syntaxP, |
860 aritiesP, judgmentP, constsP, finalconstsP, syntaxP, no_syntaxP, |
854 translationsP, axiomsP, defsP, constdefsP, theoremsP, lemmasP, |
861 translationsP, axiomsP, defsP, constdefsP, axiomatizationP, |
855 declareP, globalP, localP, hideP, useP, mlP, ml_commandP, ml_setupP, |
862 theoremsP, lemmasP, declareP, globalP, localP, hideP, useP, mlP, |
856 setupP, method_setupP, parse_ast_translationP, parse_translationP, |
863 ml_commandP, ml_setupP, setupP, method_setupP, |
857 print_translationP, typed_print_translationP, |
864 parse_ast_translationP, parse_translationP, print_translationP, |
858 print_ast_translationP, token_translationP, oracleP, localeP, |
865 typed_print_translationP, print_ast_translationP, |
|
866 token_translationP, oracleP, localeP, |
859 (*proof commands*) |
867 (*proof commands*) |
860 theoremP, lemmaP, corollaryP, haveP, henceP, showP, thusP, fixP, |
868 theoremP, lemmaP, corollaryP, haveP, henceP, showP, thusP, fixP, |
861 assumeP, presumeP, defP, obtainP, guessP, letP, caseP, thenP, fromP, |
869 assumeP, presumeP, defP, obtainP, guessP, letP, caseP, thenP, fromP, |
862 withP, noteP, usingP, unfoldingP, beginP, endP, nextP, qedP, |
870 withP, noteP, usingP, unfoldingP, beginP, endP, nextP, qedP, |
863 terminal_proofP, default_proofP, immediate_proofP, done_proofP, |
871 terminal_proofP, default_proofP, immediate_proofP, done_proofP, |