src/HOL/Refute.thy
author kuncar
Fri Dec 09 18:07:04 2011 +0100 (2011-12-09)
changeset 45802 b16f976db515
parent 40178 00152d17855b
child 46950 d0181abdbdac
permissions -rw-r--r--
Quotient_Info stores only relation maps
webertj@14350
     1
(*  Title:      HOL/Refute.thy
webertj@14350
     2
    Author:     Tjark Weber
webertj@22058
     3
    Copyright   2003-2007
webertj@14350
     4
webertj@14350
     5
Basic setup and documentation for the 'refute' (and 'refute_params') command.
webertj@14350
     6
*)
webertj@14350
     7
wenzelm@14589
     8
header {* Refute *}
wenzelm@14589
     9
nipkow@15131
    10
theory Refute
blanchet@40178
    11
imports Hilbert_Choice List Sledgehammer
wenzelm@39048
    12
uses "Tools/refute.ML"
nipkow@15131
    13
begin
wenzelm@14589
    14
wenzelm@14589
    15
setup Refute.setup
wenzelm@14589
    16
wenzelm@14589
    17
text {*
wenzelm@14589
    18
\small
wenzelm@14589
    19
\begin{verbatim}
webertj@14350
    20
(* ------------------------------------------------------------------------- *)
webertj@14350
    21
(* REFUTE                                                                    *)
webertj@14350
    22
(*                                                                           *)
webertj@14350
    23
(* We use a SAT solver to search for a (finite) model that refutes a given   *)
webertj@14350
    24
(* HOL formula.                                                              *)
webertj@14350
    25
(* ------------------------------------------------------------------------- *)
webertj@14350
    26
webertj@14350
    27
(* ------------------------------------------------------------------------- *)
webertj@14457
    28
(* NOTE                                                                      *)
webertj@14350
    29
(*                                                                           *)
webertj@14457
    30
(* I strongly recommend that you install a stand-alone SAT solver if you     *)
webertj@14463
    31
(* want to use 'refute'.  For details see 'HOL/Tools/sat_solver.ML'.  If you *)
webertj@15293
    32
(* have installed (a supported version of) zChaff, simply set 'ZCHAFF_HOME'  *)
webertj@15293
    33
(* in 'etc/settings'.                                                        *)
webertj@14350
    34
(* ------------------------------------------------------------------------- *)
webertj@14350
    35
webertj@14350
    36
(* ------------------------------------------------------------------------- *)
webertj@14350
    37
(* USAGE                                                                     *)
webertj@14350
    38
(*                                                                           *)
webertj@14350
    39
(* See the file 'HOL/ex/Refute_Examples.thy' for examples.  The supported    *)
webertj@14350
    40
(* parameters are explained below.                                           *)
webertj@14350
    41
(* ------------------------------------------------------------------------- *)
webertj@14350
    42
webertj@14350
    43
(* ------------------------------------------------------------------------- *)
webertj@14350
    44
(* CURRENT LIMITATIONS                                                       *)
webertj@14350
    45
(*                                                                           *)
webertj@14350
    46
(* 'refute' currently accepts formulas of higher-order predicate logic (with *)
webertj@14350
    47
(* equality), including free/bound/schematic variables, lambda abstractions, *)
webertj@16870
    48
(* sets and set membership, "arbitrary", "The", "Eps", records and           *)
webertj@22058
    49
(* inductively defined sets.  Constants are unfolded automatically, and sort *)
webertj@22058
    50
(* axioms are added as well.  Other, user-asserted axioms however are        *)
webertj@22058
    51
(* ignored.  Inductive datatypes and recursive functions are supported, but  *)
webertj@22058
    52
(* may lead to spurious countermodels.                                       *)
webertj@14463
    53
(*                                                                           *)
webertj@14808
    54
(* The (space) complexity of the algorithm is non-elementary.                *)
webertj@14350
    55
(*                                                                           *)
webertj@16870
    56
(* Schematic type variables are not supported.                               *)
webertj@14350
    57
(* ------------------------------------------------------------------------- *)
webertj@14350
    58
webertj@14350
    59
(* ------------------------------------------------------------------------- *)
webertj@14350
    60
(* PARAMETERS                                                                *)
webertj@14350
    61
(*                                                                           *)
blanchet@34120
    62
(* The following global parameters are currently supported (and required,    *)
blanchet@34120
    63
(* except for "expect"):                                                     *)
webertj@14350
    64
(*                                                                           *)
webertj@14350
    65
(* Name          Type    Description                                         *)
webertj@14350
    66
(*                                                                           *)
webertj@14350
    67
(* "minsize"     int     Only search for models with size at least           *)
webertj@14350
    68
(*                       'minsize'.                                          *)
webertj@14350
    69
(* "maxsize"     int     If >0, only search for models with size at most     *)
webertj@14350
    70
(*                       'maxsize'.                                          *)
webertj@14350
    71
(* "maxvars"     int     If >0, use at most 'maxvars' boolean variables      *)
webertj@14350
    72
(*                       when transforming the term into a propositional     *)
webertj@14350
    73
(*                       formula.                                            *)
webertj@14808
    74
(* "maxtime"     int     If >0, terminate after at most 'maxtime' seconds.   *)
webertj@14808
    75
(*                       This value is ignored under some ML compilers.      *)
webertj@14457
    76
(* "satsolver"   string  Name of the SAT solver to be used.                  *)
blanchet@34120
    77
(* "no_assms"    bool    If "true", assumptions in structured proofs are     *)
blanchet@34120
    78
(*                       not considered.                                     *)
blanchet@34120
    79
(* "expect"      string  Expected result ("genuine", "potential", "none", or *)
blanchet@34120
    80
(*                       "unknown").                                         *)
webertj@14457
    81
(*                                                                           *)
wenzelm@17721
    82
(* See 'HOL/SAT.thy' for default values.                                     *)
webertj@14808
    83
(*                                                                           *)
webertj@14808
    84
(* The size of particular types can be specified in the form type=size       *)
webertj@14808
    85
(* (where 'type' is a string, and 'size' is an int).  Examples:              *)
webertj@14808
    86
(* "'a"=1                                                                    *)
webertj@14808
    87
(* "List.list"=2                                                             *)
webertj@14350
    88
(* ------------------------------------------------------------------------- *)
webertj@14350
    89
webertj@14350
    90
(* ------------------------------------------------------------------------- *)
webertj@14350
    91
(* FILES                                                                     *)
webertj@14350
    92
(*                                                                           *)
wenzelm@39048
    93
(* HOL/Tools/prop_logic.ML     Propositional logic                           *)
wenzelm@39048
    94
(* HOL/Tools/sat_solver.ML     SAT solvers                                   *)
wenzelm@39048
    95
(* HOL/Tools/refute.ML         Translation HOL -> propositional logic and    *)
wenzelm@39048
    96
(*                             Boolean assignment -> HOL model               *)
wenzelm@39048
    97
(* HOL/Refute.thy              This file: loads the ML files, basic setup,   *)
wenzelm@39048
    98
(*                             documentation                                 *)
wenzelm@39048
    99
(* HOL/SAT.thy                 Sets default parameters                       *)
wenzelm@39048
   100
(* HOL/ex/Refute_Examples.thy  Examples                                      *)
webertj@14350
   101
(* ------------------------------------------------------------------------- *)
wenzelm@14589
   102
\end{verbatim}
wenzelm@14589
   103
*}
webertj@14350
   104
webertj@14350
   105
end