466 val _ = ctxt |
466 val _ = ctxt |
467 |> Proof.theorem_i NONE (K I) [[(prop, [])]] |
467 |> Proof.theorem_i NONE (K I) [[(prop, [])]] |
468 |> Proof.global_terminal_proof (method_text, NONE); |
468 |> Proof.global_terminal_proof (method_text, NONE); |
469 in pretty_term ctxt prop end; |
469 in pretty_term ctxt prop end; |
470 |
470 |
|
471 val hd_src = Args.src o (apfst o apsnd) (single o hd) o Args.dest_src; |
|
472 |
471 fun pretty_thm ctxt = pretty_term ctxt o Thm.full_prop_of; |
473 fun pretty_thm ctxt = pretty_term ctxt o Thm.full_prop_of; |
472 |
474 |
473 fun pretty_term_style ctxt (name, t) = |
475 fun pretty_term_style ctxt (name, t) = |
474 pretty_term ctxt (TermStyle.the_style (ProofContext.theory_of ctxt) name ctxt t); |
476 pretty_term ctxt (TermStyle.the_style (ProofContext.theory_of ctxt) name ctxt t); |
475 |
477 |
527 |
529 |
528 val _ = add_commands |
530 val _ = add_commands |
529 [("thm", args Attrib.thms (output_list pretty_thm)), |
531 [("thm", args Attrib.thms (output_list pretty_thm)), |
530 ("thm_style", args (Scan.lift Args.liberal_name -- Attrib.thm) (output pretty_thm_style)), |
532 ("thm_style", args (Scan.lift Args.liberal_name -- Attrib.thm) (output pretty_thm_style)), |
531 ("prop", args Args.prop (output pretty_term)), |
533 ("prop", args Args.prop (output pretty_term)), |
532 ("lemma", args (Args.prop -- Scan.lift Method.simple_text) (output pretty_fact)), |
534 ("lemma", args (Args.prop -- Scan.lift Method.simple_text) (output pretty_fact o hd_src)), |
533 ("term", args Args.term (output pretty_term)), |
535 ("term", args Args.term (output pretty_term)), |
534 ("term_style", args (Scan.lift Args.liberal_name -- Args.term) (output pretty_term_style)), |
536 ("term_style", args (Scan.lift Args.liberal_name -- Args.term) (output pretty_term_style)), |
535 ("term_type", args Args.term (output pretty_term_typ)), |
537 ("term_type", args Args.term (output pretty_term_typ)), |
536 ("typeof", args Args.term (output pretty_term_typeof)), |
538 ("typeof", args Args.term (output pretty_term_typeof)), |
537 ("const", args Args.const_proper (output pretty_const)), |
539 ("const", args Args.const_proper (output pretty_const)), |