src/Pure/term.ML
changeset 46215 0da9433f959e
parent 45156 a9b6c2ea7bec
child 46217 7b19666f0e3d
equal deleted inserted replaced
46214:8534f949548e 46215:0da9433f959e
    95   val subst_free: (term * term) list -> term -> term
    95   val subst_free: (term * term) list -> term -> term
    96   val abstract_over: term * term -> term
    96   val abstract_over: term * term -> term
    97   val lambda: term -> term -> term
    97   val lambda: term -> term -> term
    98   val absfree: string * typ -> term -> term
    98   val absfree: string * typ -> term -> term
    99   val absdummy: typ -> term -> term
    99   val absdummy: typ -> term -> term
   100   val list_all_free: (string * typ) list * term -> term
       
   101   val list_all: (string * typ) list * term -> term
   100   val list_all: (string * typ) list * term -> term
   102   val subst_atomic: (term * term) list -> term -> term
   101   val subst_atomic: (term * term) list -> term -> term
   103   val typ_subst_atomic: (typ * typ) list -> typ -> typ
   102   val typ_subst_atomic: (typ * typ) list -> typ -> typ
   104   val subst_atomic_types: (typ * typ) list -> term -> term
   103   val subst_atomic_types: (typ * typ) list -> term -> term
   105   val typ_subst_TVars: (indexname * typ) list -> typ -> typ
   104   val typ_subst_TVars: (indexname * typ) list -> typ -> typ
   762 fun lambda v t = lambda_name ("", v) t;
   761 fun lambda v t = lambda_name ("", v) t;
   763 
   762 
   764 fun absfree (a, T) body = Abs (a, T, abstract_over (Free (a, T), body));
   763 fun absfree (a, T) body = Abs (a, T, abstract_over (Free (a, T), body));
   765 fun absdummy T body = Abs (Name.uu_, T, body);
   764 fun absdummy T body = Abs (Name.uu_, T, body);
   766 
   765 
   767 (*Quantification over a list of free variables*)
       
   768 fun list_all_free ([], t: term) = t
       
   769   | list_all_free ((a,T)::vars, t) =
       
   770         all T $ absfree (a, T) (list_all_free (vars, t));
       
   771 
       
   772 (*Quantification over a list of variables (already bound in body) *)
   766 (*Quantification over a list of variables (already bound in body) *)
   773 fun list_all ([], t) = t
   767 fun list_all ([], t) = t
   774   | list_all ((a,T)::vars, t) =
   768   | list_all ((a,T)::vars, t) =
   775         all T $ Abs (a, T, list_all (vars, t));
   769         all T $ Abs (a, T, list_all (vars, t));
   776 
   770