295 |
297 |
296 (* proof context *) |
298 (* proof context *) |
297 |
299 |
298 val assumeP = |
300 val assumeP = |
299 OuterSyntax.command "assume" "assume propositions" K.prf_asm |
301 OuterSyntax.command "assume" "assume propositions" K.prf_asm |
300 ((P.opt_thm_name ":" -- Scan.repeat1 propp >> P.triple1) -- P.marg_comment |
302 ((P.opt_thm_name ":" -- Scan.repeat1 P.propp >> P.triple1) -- P.marg_comment |
301 >> (Toplevel.print oo (Toplevel.proof o IsarThy.assume))); |
303 >> (Toplevel.print oo (Toplevel.proof o IsarThy.assume))); |
302 |
304 |
303 val presumeP = |
305 val presumeP = |
304 OuterSyntax.command "presume" "assume propositions, to be established later" K.prf_asm |
306 OuterSyntax.command "presume" "assume propositions, to be established later" K.prf_asm |
305 ((P.opt_thm_name ":" -- Scan.repeat1 propp >> P.triple1) -- P.marg_comment |
307 ((P.opt_thm_name ":" -- Scan.repeat1 P.propp >> P.triple1) -- P.marg_comment |
306 >> (Toplevel.print oo (Toplevel.proof o IsarThy.presume))); |
308 >> (Toplevel.print oo (Toplevel.proof o IsarThy.presume))); |
307 |
309 |
308 val fixP = |
310 val fixP = |
309 OuterSyntax.command "fix" "fix variables (Skolem constants)" K.prf_asm |
311 OuterSyntax.command "fix" "fix variables (Skolem constants)" K.prf_asm |
310 (Scan.repeat1 (P.name -- Scan.option (P.$$$ "::" |-- P.typ)) -- P.marg_comment |
312 (Scan.repeat1 (P.name -- Scan.option (P.$$$ "::" |-- P.typ)) -- P.marg_comment |
343 OuterSyntax.command "qed" "conclude (sub-)proof" K.qed_block |
345 OuterSyntax.command "qed" "conclude (sub-)proof" K.qed_block |
344 (Scan.option (P.method -- P.interest) >> IsarThy.qed); |
346 (Scan.option (P.method -- P.interest) >> IsarThy.qed); |
345 |
347 |
346 val terminal_proofP = |
348 val terminal_proofP = |
347 OuterSyntax.command "by" "terminal backward proof" K.qed |
349 OuterSyntax.command "by" "terminal backward proof" K.qed |
348 (P.method -- P.interest >> IsarThy.terminal_proof); |
350 (P.method -- P.interest -- Scan.option (P.method -- P.interest) >> IsarThy.terminal_proof); |
349 |
351 |
350 val immediate_proofP = |
352 val immediate_proofP = |
351 OuterSyntax.command "." "immediate proof" K.qed |
353 OuterSyntax.command "." "immediate proof" K.qed |
352 (Scan.succeed IsarThy.immediate_proof); |
354 (Scan.succeed IsarThy.immediate_proof); |
353 |
355 |
532 (*keep keywords consistent with the parsers, including those in |
534 (*keep keywords consistent with the parsers, including those in |
533 outer_parse.ML, otherwise be prepared for unexpected errors*) |
535 outer_parse.ML, otherwise be prepared for unexpected errors*) |
534 |
536 |
535 val keywords = |
537 val keywords = |
536 ["!", "%", "(", ")", "*", "+", ",", "--", ":", "::", ";", "<", "<=", |
538 ["!", "%", "(", ")", "*", "+", ",", "--", ":", "::", ";", "<", "<=", |
537 "=", "==", "=>", "?", "[", "]", "and", "as", "binder", "files", |
539 "=", "==", "=>", "?", "[", "]", "and", "as", "binder", "concl", |
538 "infixl", "infixr", "is", "output", "{", "|", "}"]; |
540 "files", "infixl", "infixr", "is", "output", "{", "|", "}"]; |
539 |
541 |
540 val parsers = [ |
542 val parsers = [ |
541 (*theory structure*) |
543 (*theory structure*) |
542 theoryP, end_excursionP, kill_excursionP, contextP, update_contextP, |
544 theoryP, end_excursionP, kill_excursionP, contextP, update_contextP, |
543 (*theory sections*) |
545 (*theory sections*) |
548 pathP, useP, mlP, setupP, parse_ast_translationP, |
550 pathP, useP, mlP, setupP, parse_ast_translationP, |
549 parse_translationP, print_translationP, typed_print_translationP, |
551 parse_translationP, print_translationP, typed_print_translationP, |
550 print_ast_translationP, token_translationP, oracleP, |
552 print_ast_translationP, token_translationP, oracleP, |
551 (*proof commands*) |
553 (*proof commands*) |
552 theoremP, lemmaP, showP, haveP, thusP, henceP, assumeP, presumeP, |
554 theoremP, lemmaP, showP, haveP, thusP, henceP, assumeP, presumeP, |
553 fixP, letP, thenP, fromP, withP, noteP, beginP, endP, nextP, |
555 fixP, letP, thenP, thenceP, fromP, withP, noteP, beginP, endP, |
554 qed_withP, qedP, terminal_proofP, immediate_proofP, default_proofP, |
556 nextP, qed_withP, qedP, terminal_proofP, immediate_proofP, |
555 skip_proofP, applyP, then_applyP, proofP, alsoP, finallyP, backP, |
557 default_proofP, skip_proofP, applyP, then_applyP, proofP, alsoP, |
556 cannot_undoP, clear_undoP, redoP, undos_proofP, |
558 finallyP, backP, cannot_undoP, clear_undoP, redoP, undos_proofP, |
557 kill_proofP, undoP, |
559 kill_proofP, undoP, |
558 (*diagnostic commands*) |
560 (*diagnostic commands*) |
559 print_commandsP, print_theoryP, print_syntaxP, print_attributesP, |
561 print_commandsP, print_theoryP, print_syntaxP, print_attributesP, |
560 print_methodsP, print_theoremsP, print_bindsP, print_lthmsP, |
562 print_methodsP, print_theoremsP, print_bindsP, print_lthmsP, |
561 print_thmsP, print_propP, print_termP, print_typeP, |
563 print_thmsP, print_propP, print_termP, print_typeP, |