src/HOL/Tools/meson.ML
changeset 15700 970e0293dfb3
parent 15679 28eb0fe50533
child 15736 1bb0399a9517
equal deleted inserted replaced
15699:7d91dd712ff8 15700:970e0293dfb3
    65 
    65 
    66 (*raises exception if no rules apply -- unlike RL*)
    66 (*raises exception if no rules apply -- unlike RL*)
    67 fun tryres (th, rl::rls) = (th RS rl handle THM _ => tryres(th,rls))
    67 fun tryres (th, rl::rls) = (th RS rl handle THM _ => tryres(th,rls))
    68   | tryres (th, []) = raise THM("tryres", 0, [th]);
    68   | tryres (th, []) = raise THM("tryres", 0, [th]);
    69 
    69 
    70 val prop_of = #prop o rep_thm;
       
    71 
       
    72 (*Permits forward proof from rules that discharge assumptions*)
    70 (*Permits forward proof from rules that discharge assumptions*)
    73 fun forward_res nf st =
    71 fun forward_res nf st =
    74   case Seq.pull (ALLGOALS (METAHYPS (fn [prem] => rtac (nf prem) 1)) st)
    72   case Seq.pull (ALLGOALS (METAHYPS (fn [prem] => rtac (nf prem) 1)) st)
    75   of SOME(th,_) => th
    73   of SOME(th,_) => th
    76    | NONE => raise THM("forward_res", 0, [st]);
    74    | NONE => raise THM("forward_res", 0, [st]);