src/Pure/logic.ML
changeset 19775 06cb6743adf6
parent 19425 e0d7d9373faf
child 19806 f860b7a98445
equal deleted inserted replaced
19774:5fe7731d0836 19775:06cb6743adf6
    46   val mk_defpair: term * term -> string * term
    46   val mk_defpair: term * term -> string * term
    47   val mk_type: typ -> term
    47   val mk_type: typ -> term
    48   val protectC: term
    48   val protectC: term
    49   val protect: term -> term
    49   val protect: term -> term
    50   val unprotect: term -> term
    50   val unprotect: term -> term
       
    51   val mk_term: term -> term
       
    52   val dest_term: term -> term
    51   val occs: term * term -> bool
    53   val occs: term * term -> bool
    52   val close_form: term -> term
    54   val close_form: term -> term
    53   val combound: term * int * int -> term
    55   val combound: term * int * int -> term
    54   val rlist_abs: (string * typ) list * term -> term
    56   val rlist_abs: (string * typ) list * term -> term
    55   val incr_indexes: typ list * int -> term -> term
    57   val incr_indexes: typ list * int -> term -> term
   314 
   316 
   315 fun mk_defpair lhs_rhs = mk_cond_defpair [] lhs_rhs;
   317 fun mk_defpair lhs_rhs = mk_cond_defpair [] lhs_rhs;
   316 
   318 
   317 
   319 
   318 
   320 
   319 (** protected propositions **)
   321 (** protected propositions and embedded terms **)
   320 
   322 
   321 val protectC = Const ("prop", propT --> propT);
   323 val protectC = Const ("prop", propT --> propT);
   322 fun protect t = protectC $ t;
   324 fun protect t = protectC $ t;
   323 
   325 
   324 fun unprotect (Const ("prop", _) $ t) = t
   326 fun unprotect (Const ("prop", _) $ t) = t
   325   | unprotect t = raise TERM ("unprotect", [t]);
   327   | unprotect t = raise TERM ("unprotect", [t]);
       
   328 
       
   329 
       
   330 fun mk_term t = Const ("ProtoPure.term", Term.fastype_of t --> propT) $ t;
       
   331 
       
   332 fun dest_term (Const ("ProtoPure.term", _) $ t) = t
       
   333   | dest_term t = raise TERM ("dest_term", [t]);
   326 
   334 
   327 
   335 
   328 
   336 
   329 (*** Low-level term operations ***)
   337 (*** Low-level term operations ***)
   330 
   338