src/Pure/Isar/isar_syn.ML
changeset 6878 1e97e7fbcca5
parent 6869 850812ed9976
child 6886 7d0f7ad5a35f
equal deleted inserted replaced
6877:3d5e5e6f9e20 6878:1e97e7fbcca5
   278 
   278 
   279 val fromP =
   279 val fromP =
   280   OuterSyntax.command "from" "forward chaining from given facts" K.prf_chain
   280   OuterSyntax.command "from" "forward chaining from given facts" K.prf_chain
   281     (P.xthms1 -- P.marg_comment >> (Toplevel.print oo (Toplevel.proof o IsarThy.from_facts)));
   281     (P.xthms1 -- P.marg_comment >> (Toplevel.print oo (Toplevel.proof o IsarThy.from_facts)));
   282 
   282 
       
   283 val withP =
       
   284   OuterSyntax.command "with" "forward chaining from given and current facts" K.prf_chain
       
   285     (P.xthms1 -- P.marg_comment >> (Toplevel.print oo (Toplevel.proof o IsarThy.with_facts)));
       
   286 
   283 val noteP =
   287 val noteP =
   284   OuterSyntax.command "note" "define facts" K.prf_decl
   288   OuterSyntax.command "note" "define facts" K.prf_decl
   285     (facts -- P.marg_comment >> (Toplevel.print oo (Toplevel.proof o IsarThy.have_facts)));
   289     (facts -- P.marg_comment >> (Toplevel.print oo (Toplevel.proof o IsarThy.have_facts)));
   286 
   290 
   287 
   291 
   364       >> (Toplevel.print oo (Toplevel.proof o IsarThy.proof)));
   368       >> (Toplevel.print oo (Toplevel.proof o IsarThy.proof)));
   365 
   369 
   366 
   370 
   367 (* calculational proof commands *)
   371 (* calculational proof commands *)
   368 
   372 
       
   373 val calc_args =
       
   374   Scan.option (P.$$$ "(" |-- P.!!! ((P.xthms1 --| P.$$$ ")") -- P.interest));
       
   375 
   369 val alsoP =
   376 val alsoP =
   370   OuterSyntax.command "also" "intermediate calculational proof step" K.prf_decl
   377   OuterSyntax.command "also" "intermediate calculational proof step" K.prf_decl
   371     (P.marg_comment >> IsarThy.also);
   378     (calc_args -- P.marg_comment >> IsarThy.also);
   372 
   379 
   373 val finallyP =
   380 val finallyP =
   374   OuterSyntax.command "finally" "terminal calculational proof step" K.prf_chain
   381   OuterSyntax.command "finally" "terminal calculational proof step" K.prf_chain
   375     (P.marg_comment >> IsarThy.finally);
   382     (calc_args -- P.marg_comment >> IsarThy.finally);
   376 
   383 
   377 
   384 
   378 (* proof navigation *)
   385 (* proof navigation *)
   379 
   386 
   380 val backP =
   387 val backP =
   545   setupP, parse_ast_translationP, parse_translationP,
   552   setupP, parse_ast_translationP, parse_translationP,
   546   print_translationP, typed_print_translationP,
   553   print_translationP, typed_print_translationP,
   547   print_ast_translationP, token_translationP, oracleP,
   554   print_ast_translationP, token_translationP, oracleP,
   548   (*proof commands*)
   555   (*proof commands*)
   549   theoremP, lemmaP, showP, haveP, thusP, henceP, assumeP, presumeP,
   556   theoremP, lemmaP, showP, haveP, thusP, henceP, assumeP, presumeP,
   550   fixP, letP, thenP, fromP, noteP, beginP, endP, nextP, qed_withP,
   557   fixP, letP, thenP, fromP, withP, noteP, beginP, endP, nextP,
   551   qedP, terminal_proofP, immediate_proofP, default_proofP, applyP,
   558   qed_withP, qedP, terminal_proofP, immediate_proofP, default_proofP,
   552   then_applyP, proofP, alsoP, finallyP, backP, prevP, upP, topP,
   559   applyP, then_applyP, proofP, alsoP, finallyP, backP, prevP, upP,
   553   cannot_undoP, clear_undoP, redoP, undos_proofP, kill_proofP, undoP,
   560   topP, cannot_undoP, clear_undoP, redoP, undos_proofP, kill_proofP,
       
   561   undoP,
   554   (*diagnostic commands*)
   562   (*diagnostic commands*)
   555   print_commandsP, print_theoryP, print_syntaxP, print_attributesP,
   563   print_commandsP, print_theoryP, print_syntaxP, print_attributesP,
   556   print_methodsP, print_theoremsP, print_bindsP, print_lthmsP,
   564   print_methodsP, print_theoremsP, print_bindsP, print_lthmsP,
   557   print_thmsP, print_propP, print_termP, print_typeP,
   565   print_thmsP, print_propP, print_termP, print_typeP,
   558   (*system commands*)
   566   (*system commands*)