src/HOL/hologic.ML
changeset 27325 70e4eb732fa9
parent 26804 e2b1e6868c2f
equal deleted inserted replaced
27324:904acdaf4299 27325:70e4eb732fa9
    32   val dest_conj: term -> term list
    32   val dest_conj: term -> term list
    33   val dest_disj: term -> term list
    33   val dest_disj: term -> term list
    34   val disjuncts: term -> term list
    34   val disjuncts: term -> term list
    35   val dest_imp: term -> term * term
    35   val dest_imp: term -> term * term
    36   val dest_not: term -> term
    36   val dest_not: term -> term
    37   val dest_concls: term -> term list
       
    38   val eq_const: typ -> term
    37   val eq_const: typ -> term
    39   val mk_eq: term * term -> term
    38   val mk_eq: term * term -> term
    40   val dest_eq: term -> term * term
    39   val dest_eq: term -> term * term
    41   val all_const: typ -> term
    40   val all_const: typ -> term
    42   val mk_all: string * typ * term -> term
    41   val mk_all: string * typ * term -> term
   196   | dest_imp  t = raise TERM ("dest_imp", [t]);
   195   | dest_imp  t = raise TERM ("dest_imp", [t]);
   197 
   196 
   198 fun dest_not (Const ("Not", _) $ t) = t
   197 fun dest_not (Const ("Not", _) $ t) = t
   199   | dest_not t = raise TERM ("dest_not", [t]);
   198   | dest_not t = raise TERM ("dest_not", [t]);
   200 
   199 
   201 fun imp_concl_of t = imp_concl_of (#2 (dest_imp t)) handle TERM _ => t;
       
   202 val dest_concls = map imp_concl_of o dest_conj o dest_Trueprop;
       
   203 
       
   204 fun eq_const T = Const ("op =", [T, T] ---> boolT);
   200 fun eq_const T = Const ("op =", [T, T] ---> boolT);
   205 fun mk_eq (t, u) = eq_const (fastype_of t) $ t $ u;
   201 fun mk_eq (t, u) = eq_const (fastype_of t) $ t $ u;
   206 
   202 
   207 fun dest_eq (Const ("op =", _) $ lhs $ rhs) = (lhs, rhs)
   203 fun dest_eq (Const ("op =", _) $ lhs $ rhs) = (lhs, rhs)
   208   | dest_eq t = raise TERM ("dest_eq", [t])
   204   | dest_eq t = raise TERM ("dest_eq", [t])