equal
deleted
inserted
replaced
61 val transfer_facts: theory -> Proof.context -> Proof.context |
61 val transfer_facts: theory -> Proof.context -> Proof.context |
62 val background_theory: (theory -> theory) -> Proof.context -> Proof.context |
62 val background_theory: (theory -> theory) -> Proof.context -> Proof.context |
63 val background_theory_result: (theory -> 'a * theory) -> Proof.context -> 'a * Proof.context |
63 val background_theory_result: (theory -> 'a * theory) -> Proof.context -> 'a * Proof.context |
64 val facts_of: Proof.context -> Facts.T |
64 val facts_of: Proof.context -> Facts.T |
65 val facts_of_fact: Proof.context -> string -> Facts.T |
65 val facts_of_fact: Proof.context -> string -> Facts.T |
66 val markup_extern_fact: Proof.context -> string -> Markup.T * xstring |
66 val markup_extern_fact: Proof.context -> string -> Markup.T list * xstring |
67 val pretty_term_abbrev: Proof.context -> term -> Pretty.T |
67 val pretty_term_abbrev: Proof.context -> term -> Pretty.T |
68 val pretty_fact: Proof.context -> string * thm list -> Pretty.T |
68 val pretty_fact: Proof.context -> string * thm list -> Pretty.T |
69 val check_class: Proof.context -> xstring * Position.T -> class * Position.report list |
69 val check_class: Proof.context -> xstring * Position.T -> class * Position.report list |
70 val read_class: Proof.context -> string -> class |
70 val read_class: Proof.context -> string -> class |
71 val read_typ: Proof.context -> string -> typ |
71 val read_typ: Proof.context -> string -> typ |
408 if Facts.defined local_facts name |
408 if Facts.defined local_facts name |
409 then local_facts else global_facts |
409 then local_facts else global_facts |
410 end; |
410 end; |
411 |
411 |
412 fun markup_extern_fact ctxt name = |
412 fun markup_extern_fact ctxt name = |
413 Facts.markup_extern ctxt (facts_of_fact ctxt name) name; |
413 let |
|
414 val facts = facts_of_fact ctxt name; |
|
415 val (markup, xname) = Facts.markup_extern ctxt facts name; |
|
416 val markups = |
|
417 if Facts.is_dynamic facts name then [markup, Markup.dynamic_fact name] |
|
418 else [markup]; |
|
419 in (markups, xname) end; |
414 |
420 |
415 |
421 |
416 |
422 |
417 (** pretty printing **) |
423 (** pretty printing **) |
418 |
424 |
419 fun pretty_term_abbrev ctxt = Syntax.pretty_term (set_mode mode_abbrev ctxt); |
425 fun pretty_term_abbrev ctxt = Syntax.pretty_term (set_mode mode_abbrev ctxt); |
420 |
426 |
421 fun pretty_fact_name ctxt a = |
427 fun pretty_fact_name ctxt a = |
422 Pretty.block [Pretty.mark_str (markup_extern_fact ctxt a), Pretty.str ":"]; |
428 Pretty.block [Pretty.marks_str (markup_extern_fact ctxt a), Pretty.str ":"]; |
423 |
429 |
424 fun pretty_fact ctxt = |
430 fun pretty_fact ctxt = |
425 let |
431 let |
426 val pretty_thm = Thm.pretty_thm ctxt; |
432 val pretty_thm = Thm.pretty_thm ctxt; |
427 val pretty_thms = map (Thm.pretty_thm_item ctxt); |
433 val pretty_thms = map (Thm.pretty_thm_item ctxt); |