src/HOL/Tools/Function/lexicographic_order.ML
changeset 60328 9c94e6a30d29
parent 59621 291934bac95e
child 60682 5a6cd2560549
equal deleted inserted replaced
60327:a3f565b8ba76 60328:9c94e6a30d29
    68 
    68 
    69 fun mk_cell ctxt solve_tac (vars, prems, lhs, rhs) mfun = Lazy.lazy (fn _ =>
    69 fun mk_cell ctxt solve_tac (vars, prems, lhs, rhs) mfun = Lazy.lazy (fn _ =>
    70   let
    70   let
    71     val goals = Thm.cterm_of ctxt o mk_goal (vars, prems, mfun $ lhs, mfun $ rhs)
    71     val goals = Thm.cterm_of ctxt o mk_goal (vars, prems, mfun $ lhs, mfun $ rhs)
    72   in
    72   in
    73     case try_proof (goals @{const_name Orderings.less}) solve_tac of
    73     (case try_proof ctxt (goals @{const_name Orderings.less}) solve_tac of
    74       Solved thm => Less thm
    74       Solved thm => Less thm
    75     | Stuck thm =>
    75     | Stuck thm =>
    76       (case try_proof (goals @{const_name Orderings.less_eq}) solve_tac of
    76         (case try_proof ctxt (goals @{const_name Orderings.less_eq}) solve_tac of
    77          Solved thm2 => LessEq (thm2, thm)
    77           Solved thm2 => LessEq (thm2, thm)
    78        | Stuck thm2 =>
    78         | Stuck thm2 =>
    79          if Thm.prems_of thm2 = [HOLogic.Trueprop $ @{term False}] then False thm2
    79             if Thm.prems_of thm2 = [HOLogic.Trueprop $ @{term False}] then False thm2
    80          else None (thm2, thm)
    80             else None (thm2, thm)
    81        | _ => raise Match) (* FIXME *)
    81         | _ => raise Match) (* FIXME *)
    82     | _ => raise Match
    82     | _ => raise Match)
    83   end);
    83   end);
    84 
    84 
    85 
    85 
    86 (** Search algorithms **)
    86 (** Search algorithms **)
    87 
    87