src/HOL/Tools/Function/termination.ML
changeset 42361 23f352990944
parent 41114 f9ae7c2abf7e
child 42793 88bee9f6eec7
equal deleted inserted replaced
42360:da8817d01e7c 42361:23f352990944
   195     mk_desc thy tac vs Gam l r m1 m2
   195     mk_desc thy tac vs Gam l r m1 m2
   196   end
   196   end
   197 
   197 
   198 fun create ctxt chain_tac descent_tac T rel =
   198 fun create ctxt chain_tac descent_tac T rel =
   199   let
   199   let
   200     val thy = ProofContext.theory_of ctxt
   200     val thy = Proof_Context.theory_of ctxt
   201     val sk = mk_sum_skel rel
   201     val sk = mk_sum_skel rel
   202     val Ts = node_types sk T
   202     val Ts = node_types sk T
   203     val M = Inttab.make (map_index (apsnd (MeasureFunctions.get_measure_functions ctxt)) Ts)
   203     val M = Inttab.make (map_index (apsnd (MeasureFunctions.get_measure_functions ctxt)) Ts)
   204     val chain_cache = Cache.create Term2tab.empty Term2tab.lookup Term2tab.update
   204     val chain_cache = Cache.create Term2tab.empty Term2tab.lookup Term2tab.update
   205       (prove_chain thy chain_tac)
   205       (prove_chain thy chain_tac)
   270 
   270 
   271 in
   271 in
   272 
   272 
   273 fun wf_union_tac ctxt st =
   273 fun wf_union_tac ctxt st =
   274   let
   274   let
   275     val thy = ProofContext.theory_of ctxt
   275     val thy = Proof_Context.theory_of ctxt
   276     val cert = cterm_of (theory_of_thm st)
   276     val cert = cterm_of (theory_of_thm st)
   277     val ((_ $ (_ $ rel)) :: ineqs) = prems_of st
   277     val ((_ $ (_ $ rel)) :: ineqs) = prems_of st
   278 
   278 
   279     fun mk_compr ineq =
   279     fun mk_compr ineq =
   280       let
   280       let