1 (* Title: HOL/Library/Refute.thy
5 Basic setup and documentation for the 'refute' (and 'refute_params') command.
12 keywords "refute" :: diag and "refute_params" :: thy_decl
29 (* ------------------------------------------------------------------------- *)
32 (* We use a SAT solver to search for a (finite) model that refutes a given *)
34 (* ------------------------------------------------------------------------- *)
36 (* ------------------------------------------------------------------------- *)
39 (* I strongly recommend that you install a stand-alone SAT solver if you *)
40 (* want to use 'refute'. For details see 'HOL/Tools/sat_solver.ML'. If you *)
41 (* have installed (a supported version of) zChaff, simply set 'ZCHAFF_HOME' *)
42 (* in 'etc/settings'. *)
43 (* ------------------------------------------------------------------------- *)
45 (* ------------------------------------------------------------------------- *)
48 (* See the file 'HOL/ex/Refute_Examples.thy' for examples. The supported *)
49 (* parameters are explained below. *)
50 (* ------------------------------------------------------------------------- *)
52 (* ------------------------------------------------------------------------- *)
53 (* CURRENT LIMITATIONS *)
55 (* 'refute' currently accepts formulas of higher-order predicate logic (with *)
56 (* equality), including free/bound/schematic variables, lambda abstractions, *)
57 (* sets and set membership, "arbitrary", "The", "Eps", records and *)
58 (* inductively defined sets. Constants are unfolded automatically, and sort *)
59 (* axioms are added as well. Other, user-asserted axioms however are *)
60 (* ignored. Inductive datatypes and recursive functions are supported, but *)
61 (* may lead to spurious countermodels. *)
63 (* The (space) complexity of the algorithm is non-elementary. *)
65 (* Schematic type variables are not supported. *)
66 (* ------------------------------------------------------------------------- *)
68 (* ------------------------------------------------------------------------- *)
71 (* The following global parameters are currently supported (and required, *)
72 (* except for "expect"): *)
74 (* Name Type Description *)
76 (* "minsize" int Only search for models with size at least *)
78 (* "maxsize" int If >0, only search for models with size at most *)
80 (* "maxvars" int If >0, use at most 'maxvars' boolean variables *)
81 (* when transforming the term into a propositional *)
83 (* "maxtime" int If >0, terminate after at most 'maxtime' seconds. *)
84 (* This value is ignored under some ML compilers. *)
85 (* "satsolver" string Name of the SAT solver to be used. *)
86 (* "no_assms" bool If "true", assumptions in structured proofs are *)
88 (* "expect" string Expected result ("genuine", "potential", "none", or *)
91 (* The size of particular types can be specified in the form type=size *)
92 (* (where 'type' is a string, and 'size' is an int). Examples: *)
95 (* ------------------------------------------------------------------------- *)
97 (* ------------------------------------------------------------------------- *)
100 (* HOL/Tools/prop_logic.ML Propositional logic *)
101 (* HOL/Tools/sat_solver.ML SAT solvers *)
102 (* HOL/Tools/refute.ML Translation HOL -> propositional logic and *)
103 (* Boolean assignment -> HOL model *)
104 (* HOL/Refute.thy This file: loads the ML files, basic setup, *)
106 (* HOL/SAT.thy Sets default parameters *)
107 (* HOL/ex/Refute_Examples.thy Examples *)
108 (* ------------------------------------------------------------------------- *)