src/HOL/Tools/TFL/usyntax.ML
changeset 29265 5b4247055bd7
parent 26750 b53db47a43b4
child 29270 0eade173f77e
equal deleted inserted replaced
29264:4ea3358fac3f 29265:5b4247055bd7
     1 (*  Title:      HOL/Tools/TFL/usyntax.ML
     1 (*  Title:      HOL/Tools/TFL/usyntax.ML
     2     ID:         $Id$
       
     3     Author:     Konrad Slind, Cambridge University Computer Laboratory
     2     Author:     Konrad Slind, Cambridge University Computer Laboratory
     4     Copyright   1997  University of Cambridge
       
     5 
     3 
     6 Emulation of HOL's abstract syntax functions.
     4 Emulation of HOL's abstract syntax functions.
     7 *)
     5 *)
     8 
     6 
     9 signature USYNTAX =
     7 signature USYNTAX =
   319 fun list_mk_forall(V,t) = fold_rev (fn v => fn b => mk_forall{Bvar=v, Body=b})V t;
   317 fun list_mk_forall(V,t) = fold_rev (fn v => fn b => mk_forall{Bvar=v, Body=b})V t;
   320 val list_mk_conj = Utils.end_itlist(fn c1 => fn tm => mk_conj{conj1=c1, conj2=tm})
   318 val list_mk_conj = Utils.end_itlist(fn c1 => fn tm => mk_conj{conj1=c1, conj2=tm})
   321 
   319 
   322 
   320 
   323 (* Need to reverse? *)
   321 (* Need to reverse? *)
   324 fun gen_all tm = list_mk_forall(term_frees tm, tm);
   322 fun gen_all tm = list_mk_forall(OldTerm.term_frees tm, tm);
   325 
   323 
   326 (* Destructing a cterm to a list of Terms *)
   324 (* Destructing a cterm to a list of Terms *)
   327 fun strip_comb tm =
   325 fun strip_comb tm =
   328    let fun dest(M$N, A) = dest(M, N::A)
   326    let fun dest(M$N, A) = dest(M, N::A)
   329          | dest x = x
   327          | dest x = x