src/Pure/drule.ML
changeset 29344 fc4a04a2970a
parent 29270 0eade173f77e
child 29579 cb520b766e00
equal deleted inserted replaced
29343:43ac99cdeb5b 29344:fc4a04a2970a
   108   val sort_constraintI: thm
   108   val sort_constraintI: thm
   109   val sort_constraint_eq: thm
   109   val sort_constraint_eq: thm
   110   val sort_triv: theory -> typ * sort -> thm list
   110   val sort_triv: theory -> typ * sort -> thm list
   111   val unconstrainTs: thm -> thm
   111   val unconstrainTs: thm -> thm
   112   val with_subgoal: int -> (thm -> thm) -> thm -> thm
   112   val with_subgoal: int -> (thm -> thm) -> thm -> thm
       
   113   val comp_no_flatten: thm * int -> int -> thm -> thm
   113   val rename_bvars: (string * string) list -> thm -> thm
   114   val rename_bvars: (string * string) list -> thm -> thm
   114   val rename_bvars': string option list -> thm -> thm
   115   val rename_bvars': string option list -> thm -> thm
   115   val incr_type_indexes: int -> thm -> thm
   116   val incr_type_indexes: int -> thm -> thm
   116   val incr_indexes: thm -> thm -> thm
   117   val incr_indexes: thm -> thm -> thm
   117   val incr_indexes2: thm -> thm -> thm -> thm
   118   val incr_indexes2: thm -> thm -> thm -> thm
   815 fun incr_indexes2 th1 th2 =
   816 fun incr_indexes2 th1 th2 =
   816   Thm.incr_indexes (Int.max (Thm.maxidx_of th1, Thm.maxidx_of th2) + 1);
   817   Thm.incr_indexes (Int.max (Thm.maxidx_of th1, Thm.maxidx_of th2) + 1);
   817 
   818 
   818 fun th1 INCR_COMP th2 = incr_indexes th2 th1 COMP th2;
   819 fun th1 INCR_COMP th2 = incr_indexes th2 th1 COMP th2;
   819 fun th1 COMP_INCR th2 = th1 COMP incr_indexes th1 th2;
   820 fun th1 COMP_INCR th2 = th1 COMP incr_indexes th1 th2;
       
   821 
       
   822 fun comp_no_flatten (th, n) i rule =
       
   823   (case distinct Thm.eq_thm (Seq.list_of
       
   824       (Thm.compose_no_flatten false (th, n) i (incr_indexes th rule))) of
       
   825     [th'] => th'
       
   826   | [] => raise THM ("comp_no_flatten", i, [th, rule])
       
   827   | _ => raise THM ("comp_no_flatten: unique result expected", i, [th, rule]));
       
   828 
   820 
   829 
   821 
   830 
   822 (*** Instantiate theorem th, reading instantiations in theory thy ****)
   831 (*** Instantiate theorem th, reading instantiations in theory thy ****)
   823 
   832 
   824 (*Version that normalizes the result: Thm.instantiate no longer does that*)
   833 (*Version that normalizes the result: Thm.instantiate no longer does that*)