added atomize_cterm;
authorwenzelm
Sat Jan 12 22:15:48 2002 +0100 (2002-01-12)
changeset 1272946808b5ec985
parent 12728 4ed8ab7d677d
child 12730 fd0f8fa2b6bd
added atomize_cterm;
src/Pure/Isar/object_logic.ML
     1.1 --- a/src/Pure/Isar/object_logic.ML	Sat Jan 12 16:55:53 2002 +0100
     1.2 +++ b/src/Pure/Isar/object_logic.ML	Sat Jan 12 22:15:48 2002 +0100
     1.3 @@ -16,6 +16,7 @@
     1.4    val fixed_judgment: Sign.sg -> string -> term
     1.5    val declare_atomize: theory attribute
     1.6    val declare_rulify: theory attribute
     1.7 +  val atomize_cterm: cterm -> cterm
     1.8    val atomize_tac: int -> tactic
     1.9    val atomize_goal: int -> thm -> thm
    1.10    val rulify: thm -> thm
    1.11 @@ -126,6 +127,10 @@
    1.12      (MetaSimplifier.forall_conv
    1.13        (MetaSimplifier.goals_conv (K true) (Tactic.rewrite true rews)))));
    1.14  
    1.15 +fun atomize_cterm ct =
    1.16 +  let val sg = #sign (Thm.rep_cterm ct)
    1.17 +  in Thm.cterm_fun (drop_judgment sg) (Tactic.rewrite_cterm true (get_atomize sg) ct) end;
    1.18 +
    1.19  fun atomize_tac i st =
    1.20    if Logic.has_meta_prems (#prop (Thm.rep_thm st)) i then
    1.21      (rewrite_prems_tac (get_atomize (Thm.sign_of_thm st)) i) st