src/HOL/Tools/ATP/atp_util.ML
changeset 77918 55b81d14a1b8
parent 77430 51dac6fcdd0e
child 79799 2746dfc9ceae
equal deleted inserted replaced
77917:a1abcf46eb24 77918:55b81d14a1b8
    48   val strip_subgoal : thm -> int -> Proof.context -> (string * typ) list * term list * term
    48   val strip_subgoal : thm -> int -> Proof.context -> (string * typ) list * term list * term
    49   val extract_lambda_def : (term -> string * typ) -> term -> string * term
    49   val extract_lambda_def : (term -> string * typ) -> term -> string * term
    50   val short_thm_name : Proof.context -> thm -> string
    50   val short_thm_name : Proof.context -> thm -> string
    51   val map_prod : ('a -> 'b) -> ('c -> 'd) -> 'a * 'c -> 'b * 'd
    51   val map_prod : ('a -> 'b) -> ('c -> 'd) -> 'a * 'c -> 'b * 'd
    52   val compare_length_with : 'a list -> int -> order
    52   val compare_length_with : 'a list -> int -> order
       
    53   val forall2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool
    53 end;
    54 end;
    54 
    55 
    55 structure ATP_Util : ATP_UTIL =
    56 structure ATP_Util : ATP_UTIL =
    56 struct
    57 struct
       
    58 
       
    59 fun forall2 _ [] [] = true
       
    60   | forall2 P (x :: xs) (y :: ys) = P x y andalso forall2 P xs ys
       
    61   | forall2 _ _ _ = false
    57 
    62 
    58 fun timestamp_format time =
    63 fun timestamp_format time =
    59   Date.fmt "%Y-%m-%d %H:%M:%S." (Date.fromTimeLocal time) ^
    64   Date.fmt "%Y-%m-%d %H:%M:%S." (Date.fromTimeLocal time) ^
    60   (StringCvt.padLeft #"0" 3 (string_of_int (Time.toMilliseconds time - 1000 * Time.toSeconds time)))
    65   (StringCvt.padLeft #"0" 3 (string_of_int (Time.toMilliseconds time - 1000 * Time.toSeconds time)))
    61 
    66