src/HOL/Hoare/hoare.ML
changeset 13737 e564c3d2d174
parent 13696 631460c31a1f
child 13857 11d7c5a8dbb7
equal deleted inserted replaced
13736:6ea0e7c43c4f 13737:e564c3d2d174
    97                  in Const ("Pair", [T, T2] ---> mk_prodT (T, T2)) $ x $ z end;
    97                  in Const ("Pair", [T, T2] ---> mk_prodT (T, T2)) $ x $ z end;
    98 
    98 
    99 fun dest_Goal (Const ("Goal", _) $ P) = P;
    99 fun dest_Goal (Const ("Goal", _) $ P) = P;
   100 
   100 
   101 (** maps a goal of the form:
   101 (** maps a goal of the form:
   102         1. [| P |] ==> |- VARS x1 ... xn. {._.} _ {._.} or to [x1,...,xn]**) 
   102         1. [| P |] ==> VARS x1 ... xn {._.} _ {._.} or to [x1,...,xn]**) 
   103 fun get_vars thm = let  val c = dest_Goal (concl_of (thm));
   103 fun get_vars thm = let  val c = dest_Goal (concl_of (thm));
   104                         val d = Logic.strip_assums_concl c;
   104                         val d = Logic.strip_assums_concl c;
   105                         val Const _ $ pre $ _ $ _ = dest_Trueprop d;
   105                         val Const _ $ pre $ _ $ _ = dest_Trueprop d;
   106       in mk_vars pre end;
   106       in mk_vars pre end;
   107 
   107