src/Pure/thm.ML
changeset 45443 c8a9a5e577bd
parent 45328 e5b33eecbf6e
child 46217 7b19666f0e3d
equal deleted inserted replaced
45442:2b91e27676b2 45443:c8a9a5e577bd
   105   val name_derivation: string -> thm -> thm
   105   val name_derivation: string -> thm -> thm
   106   val axiom: theory -> string -> thm
   106   val axiom: theory -> string -> thm
   107   val axioms_of: theory -> (string * thm) list
   107   val axioms_of: theory -> (string * thm) list
   108   val get_tags: thm -> Properties.T
   108   val get_tags: thm -> Properties.T
   109   val map_tags: (Properties.T -> Properties.T) -> thm -> thm
   109   val map_tags: (Properties.T -> Properties.T) -> thm -> thm
   110   val compress: thm -> thm
       
   111   val norm_proof: thm -> thm
   110   val norm_proof: thm -> thm
   112   val adjust_maxidx_thm: int -> thm -> thm
   111   val adjust_maxidx_thm: int -> thm -> thm
   113   (*meta rules*)
   112   (*meta rules*)
   114   val assume: cterm -> thm
   113   val assume: cterm -> thm
   115   val implies_intr: cterm -> thm -> thm
   114   val implies_intr: cterm -> thm -> thm
   643   Thm (der, {thy_ref = thy_ref, tags = f tags, maxidx = maxidx,
   642   Thm (der, {thy_ref = thy_ref, tags = f tags, maxidx = maxidx,
   644     shyps = shyps, hyps = hyps, tpairs = tpairs, prop = prop});
   643     shyps = shyps, hyps = hyps, tpairs = tpairs, prop = prop});
   645 
   644 
   646 
   645 
   647 (* technical adjustments *)
   646 (* technical adjustments *)
   648 
       
   649 fun compress (Thm (der, {thy_ref, tags, maxidx, shyps, hyps, tpairs, prop})) =
       
   650   let
       
   651     val thy = Theory.deref thy_ref;
       
   652     val term = #2 (Term_Sharing.init thy);
       
   653     val hyps' = map term hyps;
       
   654     val tpairs' = map (pairself term) tpairs;
       
   655     val prop' = term prop;
       
   656   in
       
   657     Thm (der,
       
   658      {thy_ref = Theory.check_thy thy,
       
   659       tags = tags,
       
   660       maxidx = maxidx,
       
   661       shyps = shyps,
       
   662       hyps = hyps',
       
   663       tpairs = tpairs',
       
   664       prop = prop'})
       
   665   end;
       
   666 
   647 
   667 fun norm_proof (Thm (der, args as {thy_ref, ...})) =
   648 fun norm_proof (Thm (der, args as {thy_ref, ...})) =
   668   let
   649   let
   669     val thy = Theory.deref thy_ref;
   650     val thy = Theory.deref thy_ref;
   670     val der' = deriv_rule1 (Proofterm.rew_proof thy) der;
   651     val der' = deriv_rule1 (Proofterm.rew_proof thy) der;