src/HOL/SMT.thy
author blanchet
Thu Jun 12 01:00:49 2014 +0200 (2014-06-12)
changeset 57226 c22ad39c3b4b
parent 57213 9daec42f6784
child 57229 489083abce44
permissions -rw-r--r--
use 'ctr_sugar' abstraction in SMT(2)
boehmes@36898
     1
(*  Title:      HOL/SMT.thy
boehmes@36898
     2
    Author:     Sascha Boehme, TU Muenchen
boehmes@36898
     3
*)
boehmes@36898
     4
boehmes@36898
     5
header {* Bindings to Satisfiability Modulo Theories (SMT) solvers *}
boehmes@36898
     6
boehmes@36898
     7
theory SMT
blanchet@57226
     8
imports List
wenzelm@46950
     9
keywords "smt_status" :: diag
boehmes@36898
    10
begin
boehmes@36898
    11
wenzelm@48892
    12
ML_file "Tools/SMT/smt_utils.ML"
wenzelm@48892
    13
ML_file "Tools/SMT/smt_failure.ML"
wenzelm@48892
    14
ML_file "Tools/SMT/smt_config.ML"
boehmes@36898
    15
boehmes@36898
    16
huffman@36902
    17
subsection {* Triggers for quantifier instantiation *}
boehmes@36898
    18
boehmes@36898
    19
text {*
boehmes@41125
    20
Some SMT solvers support patterns as a quantifier instantiation
boehmes@41125
    21
heuristics.  Patterns may either be positive terms (tagged by "pat")
boehmes@41125
    22
triggering quantifier instantiations -- when the solver finds a
boehmes@41125
    23
term matching a positive pattern, it instantiates the corresponding
boehmes@41125
    24
quantifier accordingly -- or negative terms (tagged by "nopat")
boehmes@41125
    25
inhibiting quantifier instantiations.  A list of patterns
boehmes@41125
    26
of the same kind is called a multipattern, and all patterns in a
boehmes@41125
    27
multipattern are considered conjunctively for quantifier instantiation.
boehmes@41125
    28
A list of multipatterns is called a trigger, and their multipatterns
boehmes@41125
    29
act disjunctively during quantifier instantiation.  Each multipattern
boehmes@41125
    30
should mention at least all quantified variables of the preceding
boehmes@41125
    31
quantifier block.
boehmes@36898
    32
*}
boehmes@36898
    33
blanchet@56078
    34
typedecl pattern
boehmes@36898
    35
blanchet@56078
    36
consts
blanchet@56078
    37
  pat :: "'a \<Rightarrow> pattern"
blanchet@56078
    38
  nopat :: "'a \<Rightarrow> pattern"
boehmes@36898
    39
blanchet@56078
    40
definition trigger :: "pattern list list \<Rightarrow> bool \<Rightarrow> bool" where "trigger _ P = P"
boehmes@36898
    41
boehmes@36898
    42
boehmes@40664
    43
subsection {* Quantifier weights *}
boehmes@40664
    44
boehmes@40664
    45
text {*
boehmes@40664
    46
Weight annotations to quantifiers influence the priority of quantifier
boehmes@40664
    47
instantiations.  They should be handled with care for solvers, which support
boehmes@40664
    48
them, because incorrect choices of weights might render a problem unsolvable.
boehmes@40664
    49
*}
boehmes@40664
    50
boehmes@40664
    51
definition weight :: "int \<Rightarrow> bool \<Rightarrow> bool" where "weight _ P = P"
boehmes@40664
    52
boehmes@40664
    53
text {*
boehmes@40664
    54
Weights must be non-negative.  The value @{text 0} is equivalent to providing
boehmes@40664
    55
no weight at all.
boehmes@40664
    56
boehmes@40664
    57
Weights should only be used at quantifiers and only inside triggers (if the
boehmes@40664
    58
quantifier has triggers).  Valid usages of weights are as follows:
boehmes@40664
    59
boehmes@40664
    60
\begin{itemize}
boehmes@40664
    61
\item
boehmes@40664
    62
@{term "\<forall>x. trigger [[pat (P x)]] (weight 2 (P x))"}
boehmes@40664
    63
\item
boehmes@40664
    64
@{term "\<forall>x. weight 3 (P x)"}
boehmes@40664
    65
\end{itemize}
boehmes@40664
    66
*}
boehmes@40664
    67
boehmes@40664
    68
huffman@36902
    69
subsection {* Higher-order encoding *}
boehmes@36898
    70
boehmes@36898
    71
text {*
boehmes@36898
    72
Application is made explicit for constants occurring with varying
boehmes@36898
    73
numbers of arguments.  This is achieved by the introduction of the
boehmes@36898
    74
following constant.
boehmes@36898
    75
*}
boehmes@36898
    76
boehmes@41127
    77
definition fun_app where "fun_app f = f"
boehmes@36898
    78
boehmes@36898
    79
text {*
boehmes@36898
    80
Some solvers support a theory of arrays which can be used to encode
boehmes@36898
    81
higher-order functions.  The following set of lemmas specifies the
boehmes@36898
    82
properties of such (extensional) arrays.
boehmes@36898
    83
*}
boehmes@36898
    84
boehmes@36898
    85
lemmas array_rules = ext fun_upd_apply fun_upd_same fun_upd_other
boehmes@37157
    86
  fun_upd_upd fun_app_def
boehmes@36898
    87
boehmes@36898
    88
huffman@36902
    89
subsection {* First-order logic *}
boehmes@36898
    90
boehmes@36898
    91
text {*
boehmes@41059
    92
Some SMT solvers only accept problems in first-order logic, i.e.,
boehmes@41059
    93
where formulas and terms are syntactically separated. When
boehmes@41059
    94
translating higher-order into first-order problems, all
boehmes@41059
    95
uninterpreted constants (those not built-in in the target solver)
boehmes@36898
    96
are treated as function symbols in the first-order sense.  Their
boehmes@41059
    97
occurrences as head symbols in atoms (i.e., as predicate symbols) are
boehmes@41281
    98
turned into terms by logically equating such atoms with @{term True}.
boehmes@41281
    99
For technical reasons, @{term True} and @{term False} occurring inside
boehmes@41281
   100
terms are replaced by the following constants.
boehmes@36898
   101
*}
boehmes@36898
   102
boehmes@41281
   103
definition term_true where "term_true = True"
boehmes@41281
   104
definition term_false where "term_false = False"
boehmes@41281
   105
boehmes@36898
   106
boehmes@37151
   107
subsection {* Integer division and modulo for Z3 *}
boehmes@37151
   108
boehmes@37151
   109
definition z3div :: "int \<Rightarrow> int \<Rightarrow> int" where
boehmes@37151
   110
  "z3div k l = (if 0 \<le> l then k div l else -(k div (-l)))"
boehmes@37151
   111
boehmes@37151
   112
definition z3mod :: "int \<Rightarrow> int \<Rightarrow> int" where
boehmes@37151
   113
  "z3mod k l = (if 0 \<le> l then k mod l else k mod (-l))"
boehmes@37151
   114
boehmes@37151
   115
huffman@36902
   116
subsection {* Setup *}
boehmes@36898
   117
wenzelm@48892
   118
ML_file "Tools/SMT/smt_builtin.ML"
wenzelm@48892
   119
ML_file "Tools/SMT/smt_datatypes.ML"
wenzelm@48892
   120
ML_file "Tools/SMT/smt_normalize.ML"
wenzelm@48892
   121
ML_file "Tools/SMT/smt_translate.ML"
wenzelm@48892
   122
ML_file "Tools/SMT/smt_solver.ML"
wenzelm@48892
   123
ML_file "Tools/SMT/smtlib_interface.ML"
wenzelm@48892
   124
ML_file "Tools/SMT/z3_interface.ML"
wenzelm@48892
   125
ML_file "Tools/SMT/z3_proof_parser.ML"
wenzelm@48892
   126
ML_file "Tools/SMT/z3_proof_tools.ML"
wenzelm@48892
   127
ML_file "Tools/SMT/z3_proof_literals.ML"
wenzelm@48892
   128
ML_file "Tools/SMT/z3_proof_methods.ML"
wenzelm@48892
   129
ML_file "Tools/SMT/z3_proof_reconstruction.ML"
wenzelm@48892
   130
ML_file "Tools/SMT/z3_model.ML"
wenzelm@48892
   131
ML_file "Tools/SMT/smt_setup_solvers.ML"
boehmes@36898
   132
boehmes@36898
   133
setup {*
boehmes@40424
   134
  SMT_Config.setup #>
boehmes@41059
   135
  SMT_Normalize.setup #>
boehmes@41059
   136
  SMTLIB_Interface.setup #>
boehmes@41059
   137
  Z3_Interface.setup #>
boehmes@36898
   138
  Z3_Proof_Reconstruction.setup #>
boehmes@40162
   139
  SMT_Setup_Solvers.setup
boehmes@36898
   140
*}
boehmes@36898
   141
wenzelm@47701
   142
method_setup smt = {*
wenzelm@47701
   143
  Scan.optional Attrib.thms [] >>
wenzelm@47701
   144
    (fn thms => fn ctxt =>
wenzelm@47701
   145
      METHOD (fn facts => HEADGOAL (SMT_Solver.smt_tac ctxt (thms @ facts))))
wenzelm@47701
   146
*} "apply an SMT solver to the current goal"
boehmes@36898
   147
boehmes@36898
   148
huffman@36902
   149
subsection {* Configuration *}
boehmes@36898
   150
boehmes@36898
   151
text {*
boehmes@36899
   152
The current configuration can be printed by the command
boehmes@36899
   153
@{text smt_status}, which shows the values of most options.
boehmes@36898
   154
*}
boehmes@36898
   155
boehmes@36898
   156
boehmes@36898
   157
boehmes@36898
   158
subsection {* General configuration options *}
boehmes@36898
   159
boehmes@36898
   160
text {*
boehmes@36898
   161
The option @{text smt_solver} can be used to change the target SMT
boehmes@41432
   162
solver.  The possible values can be obtained from the @{text smt_status}
boehmes@41432
   163
command.
boehmes@41459
   164
boehmes@41459
   165
Due to licensing restrictions, Yices and Z3 are not installed/enabled
boehmes@41459
   166
by default.  Z3 is free for non-commercial applications and can be enabled
wenzelm@55007
   167
by setting Isabelle system option @{text z3_non_commercial} to @{text yes}.
boehmes@36898
   168
*}
boehmes@36898
   169
boehmes@41601
   170
declare [[ smt_solver = z3 ]]
boehmes@36898
   171
boehmes@36898
   172
text {*
boehmes@36898
   173
Since SMT solvers are potentially non-terminating, there is a timeout
boehmes@36898
   174
(given in seconds) to restrict their runtime.  A value greater than
boehmes@36898
   175
120 (seconds) is in most cases not advisable.
boehmes@36898
   176
*}
boehmes@36898
   177
boehmes@36898
   178
declare [[ smt_timeout = 20 ]]
boehmes@36898
   179
boehmes@40162
   180
text {*
boehmes@41121
   181
SMT solvers apply randomized heuristics.  In case a problem is not
boehmes@41121
   182
solvable by an SMT solver, changing the following option might help.
boehmes@41121
   183
*}
boehmes@41121
   184
boehmes@41121
   185
declare [[ smt_random_seed = 1 ]]
boehmes@41121
   186
boehmes@41121
   187
text {*
boehmes@40162
   188
In general, the binding to SMT solvers runs as an oracle, i.e, the SMT
boehmes@40162
   189
solvers are fully trusted without additional checks.  The following
boehmes@40162
   190
option can cause the SMT solver to run in proof-producing mode, giving
boehmes@40162
   191
a checkable certificate.  This is currently only implemented for Z3.
boehmes@40162
   192
*}
boehmes@40162
   193
boehmes@40162
   194
declare [[ smt_oracle = false ]]
boehmes@40162
   195
boehmes@40162
   196
text {*
boehmes@40162
   197
Each SMT solver provides several commandline options to tweak its
boehmes@40162
   198
behaviour.  They can be passed to the solver by setting the following
boehmes@40162
   199
options.
boehmes@40162
   200
*}
boehmes@40162
   201
boehmes@55049
   202
declare [[ cvc3_options = "" ]]
boehmes@41432
   203
declare [[ yices_options = "" ]]
boehmes@55049
   204
declare [[ z3_options = "" ]]
boehmes@40162
   205
boehmes@40162
   206
text {*
boehmes@40162
   207
Enable the following option to use built-in support for datatypes and
boehmes@40162
   208
records.  Currently, this is only implemented for Z3 running in oracle
boehmes@40162
   209
mode.
boehmes@40162
   210
*}
boehmes@40162
   211
boehmes@40162
   212
declare [[ smt_datatypes = false ]]
boehmes@40162
   213
boehmes@41125
   214
text {*
boehmes@41125
   215
The SMT method provides an inference mechanism to detect simple triggers
boehmes@41125
   216
in quantified formulas, which might increase the number of problems
boehmes@41125
   217
solvable by SMT solvers (note: triggers guide quantifier instantiations
boehmes@41125
   218
in the SMT solver).  To turn it on, set the following option.
boehmes@41125
   219
*}
boehmes@41125
   220
boehmes@41125
   221
declare [[ smt_infer_triggers = false ]]
boehmes@41125
   222
boehmes@41125
   223
text {*
boehmes@41125
   224
The SMT method monomorphizes the given facts, that is, it tries to
boehmes@41125
   225
instantiate all schematic type variables with fixed types occurring
boehmes@41125
   226
in the problem.  This is a (possibly nonterminating) fixed-point
boehmes@41125
   227
construction whose cycles are limited by the following option.
boehmes@41125
   228
*}
boehmes@41125
   229
boehmes@43230
   230
declare [[ monomorph_max_rounds = 5 ]]
boehmes@41125
   231
boehmes@41762
   232
text {*
boehmes@41762
   233
In addition, the number of generated monomorphic instances is limited
boehmes@41762
   234
by the following option.
boehmes@41762
   235
*}
boehmes@41762
   236
boehmes@43230
   237
declare [[ monomorph_max_new_instances = 500 ]]
boehmes@41762
   238
boehmes@36898
   239
boehmes@36898
   240
boehmes@36898
   241
subsection {* Certificates *}
boehmes@36898
   242
boehmes@36898
   243
text {*
boehmes@36898
   244
By setting the option @{text smt_certificates} to the name of a file,
boehmes@36898
   245
all following applications of an SMT solver a cached in that file.
boehmes@36898
   246
Any further application of the same SMT solver (using the very same
boehmes@36898
   247
configuration) re-uses the cached certificate instead of invoking the
boehmes@36898
   248
solver.  An empty string disables caching certificates.
boehmes@36898
   249
boehmes@36898
   250
The filename should be given as an explicit path.  It is good
boehmes@36898
   251
practice to use the name of the current theory (with ending
boehmes@36898
   252
@{text ".certs"} instead of @{text ".thy"}) as the certificates file.
wenzelm@50317
   253
Certificate files should be used at most once in a certain theory context,
wenzelm@50317
   254
to avoid race conditions with other concurrent accesses.
boehmes@36898
   255
*}
boehmes@36898
   256
boehmes@36898
   257
declare [[ smt_certificates = "" ]]
boehmes@36898
   258
boehmes@36898
   259
text {*
blanchet@47152
   260
The option @{text smt_read_only_certificates} controls whether only
blanchet@47152
   261
stored certificates are should be used or invocation of an SMT solver
blanchet@47152
   262
is allowed.  When set to @{text true}, no SMT solver will ever be
boehmes@36898
   263
invoked and only the existing certificates found in the configured
boehmes@36898
   264
cache are used;  when set to @{text false} and there is no cached
boehmes@36898
   265
certificate for some proposition, then the configured SMT solver is
boehmes@36898
   266
invoked.
boehmes@36898
   267
*}
boehmes@36898
   268
blanchet@47152
   269
declare [[ smt_read_only_certificates = false ]]
boehmes@36898
   270
boehmes@36898
   271
boehmes@36898
   272
boehmes@36898
   273
subsection {* Tracing *}
boehmes@36898
   274
boehmes@36898
   275
text {*
boehmes@40424
   276
The SMT method, when applied, traces important information.  To
boehmes@40424
   277
make it entirely silent, set the following option to @{text false}.
boehmes@40424
   278
*}
boehmes@40424
   279
boehmes@40424
   280
declare [[ smt_verbose = true ]]
boehmes@40424
   281
boehmes@40424
   282
text {*
boehmes@36898
   283
For tracing the generated problem file given to the SMT solver as
boehmes@36898
   284
well as the returned result of the solver, the option
boehmes@36898
   285
@{text smt_trace} should be set to @{text true}.
boehmes@36898
   286
*}
boehmes@36898
   287
boehmes@36898
   288
declare [[ smt_trace = false ]]
boehmes@36898
   289
boehmes@36898
   290
text {*
boehmes@40162
   291
From the set of assumptions given to the SMT solver, those assumptions
boehmes@40162
   292
used in the proof are traced when the following option is set to
boehmes@40162
   293
@{term true}.  This only works for Z3 when it runs in non-oracle mode
boehmes@40162
   294
(see options @{text smt_solver} and @{text smt_oracle} above).
boehmes@36898
   295
*}
boehmes@36898
   296
boehmes@40162
   297
declare [[ smt_trace_used_facts = false ]]
boehmes@39298
   298
boehmes@36898
   299
boehmes@36898
   300
huffman@36902
   301
subsection {* Schematic rules for Z3 proof reconstruction *}
boehmes@36898
   302
boehmes@36898
   303
text {*
boehmes@36898
   304
Several prof rules of Z3 are not very well documented.  There are two
boehmes@36898
   305
lemma groups which can turn failing Z3 proof reconstruction attempts
boehmes@36898
   306
into succeeding ones: the facts in @{text z3_rule} are tried prior to
boehmes@36898
   307
any implemented reconstruction procedure for all uncertain Z3 proof
boehmes@36898
   308
rules;  the facts in @{text z3_simp} are only fed to invocations of
boehmes@36898
   309
the simplifier when reconstructing theory-specific proof steps.
boehmes@36898
   310
*}
boehmes@36898
   311
boehmes@36898
   312
lemmas [z3_rule] =
boehmes@36898
   313
  refl eq_commute conj_commute disj_commute simp_thms nnf_simps
boehmes@36898
   314
  ring_distribs field_simps times_divide_eq_right times_divide_eq_left
boehmes@36898
   315
  if_True if_False not_not
boehmes@36898
   316
boehmes@36898
   317
lemma [z3_rule]:
boehmes@44488
   318
  "(P \<and> Q) = (\<not>(\<not>P \<or> \<not>Q))"
boehmes@44488
   319
  "(P \<and> Q) = (\<not>(\<not>Q \<or> \<not>P))"
boehmes@44488
   320
  "(\<not>P \<and> Q) = (\<not>(P \<or> \<not>Q))"
boehmes@44488
   321
  "(\<not>P \<and> Q) = (\<not>(\<not>Q \<or> P))"
boehmes@44488
   322
  "(P \<and> \<not>Q) = (\<not>(\<not>P \<or> Q))"
boehmes@44488
   323
  "(P \<and> \<not>Q) = (\<not>(Q \<or> \<not>P))"
boehmes@44488
   324
  "(\<not>P \<and> \<not>Q) = (\<not>(P \<or> Q))"
boehmes@44488
   325
  "(\<not>P \<and> \<not>Q) = (\<not>(Q \<or> P))"
boehmes@44488
   326
  by auto
boehmes@44488
   327
boehmes@44488
   328
lemma [z3_rule]:
boehmes@36898
   329
  "(P \<longrightarrow> Q) = (Q \<or> \<not>P)"
boehmes@36898
   330
  "(\<not>P \<longrightarrow> Q) = (P \<or> Q)"
boehmes@36898
   331
  "(\<not>P \<longrightarrow> Q) = (Q \<or> P)"
boehmes@44488
   332
  "(True \<longrightarrow> P) = P"
boehmes@44488
   333
  "(P \<longrightarrow> True) = True"
boehmes@44488
   334
  "(False \<longrightarrow> P) = True"
boehmes@44488
   335
  "(P \<longrightarrow> P) = True"
boehmes@36898
   336
  by auto
boehmes@36898
   337
boehmes@36898
   338
lemma [z3_rule]:
boehmes@36898
   339
  "((P = Q) \<longrightarrow> R) = (R | (Q = (\<not>P)))"
boehmes@36898
   340
  by auto
boehmes@36898
   341
boehmes@36898
   342
lemma [z3_rule]:
boehmes@44488
   343
  "(\<not>True) = False"
boehmes@44488
   344
  "(\<not>False) = True"
boehmes@44488
   345
  "(x = x) = True"
boehmes@44488
   346
  "(P = True) = P"
boehmes@44488
   347
  "(True = P) = P"
boehmes@44488
   348
  "(P = False) = (\<not>P)"
boehmes@44488
   349
  "(False = P) = (\<not>P)"
boehmes@36898
   350
  "((\<not>P) = P) = False"
boehmes@36898
   351
  "(P = (\<not>P)) = False"
boehmes@44488
   352
  "((\<not>P) = (\<not>Q)) = (P = Q)"
boehmes@44488
   353
  "\<not>(P = (\<not>Q)) = (P = Q)"
boehmes@44488
   354
  "\<not>((\<not>P) = Q) = (P = Q)"
boehmes@36898
   355
  "(P \<noteq> Q) = (Q = (\<not>P))"
boehmes@36898
   356
  "(P = Q) = ((\<not>P \<or> Q) \<and> (P \<or> \<not>Q))"
boehmes@36898
   357
  "(P \<noteq> Q) = ((\<not>P \<or> \<not>Q) \<and> (P \<or> Q))"
boehmes@36898
   358
  by auto
boehmes@36898
   359
boehmes@36898
   360
lemma [z3_rule]:
boehmes@36898
   361
  "(if P then P else \<not>P) = True"
boehmes@36898
   362
  "(if \<not>P then \<not>P else P) = True"
boehmes@36898
   363
  "(if P then True else False) = P"
boehmes@36898
   364
  "(if P then False else True) = (\<not>P)"
boehmes@44488
   365
  "(if P then Q else True) = ((\<not>P) \<or> Q)"
boehmes@44488
   366
  "(if P then Q else True) = (Q \<or> (\<not>P))"
boehmes@44488
   367
  "(if P then Q else \<not>Q) = (P = Q)"
boehmes@44488
   368
  "(if P then Q else \<not>Q) = (Q = P)"
boehmes@44488
   369
  "(if P then \<not>Q else Q) = (P = (\<not>Q))"
boehmes@44488
   370
  "(if P then \<not>Q else Q) = ((\<not>Q) = P)"
boehmes@36898
   371
  "(if \<not>P then x else y) = (if P then y else x)"
boehmes@44488
   372
  "(if P then (if Q then x else y) else x) = (if P \<and> (\<not>Q) then y else x)"
boehmes@44488
   373
  "(if P then (if Q then x else y) else x) = (if (\<not>Q) \<and> P then y else x)"
boehmes@44488
   374
  "(if P then (if Q then x else y) else y) = (if P \<and> Q then x else y)"
boehmes@44488
   375
  "(if P then (if Q then x else y) else y) = (if Q \<and> P then x else y)"
boehmes@44488
   376
  "(if P then x else if P then y else z) = (if P then x else z)"
boehmes@44488
   377
  "(if P then x else if Q then x else y) = (if P \<or> Q then x else y)"
boehmes@44488
   378
  "(if P then x else if Q then x else y) = (if Q \<or> P then x else y)"
boehmes@44488
   379
  "(if P then x = y else x = z) = (x = (if P then y else z))"
boehmes@44488
   380
  "(if P then x = y else y = z) = (y = (if P then x else z))"
boehmes@44488
   381
  "(if P then x = y else z = y) = (y = (if P then x else z))"
boehmes@36898
   382
  by auto
boehmes@36898
   383
boehmes@36898
   384
lemma [z3_rule]:
boehmes@44488
   385
  "0 + (x::int) = x"
boehmes@44488
   386
  "x + 0 = x"
boehmes@44488
   387
  "x + x = 2 * x"
boehmes@44488
   388
  "0 * x = 0"
boehmes@44488
   389
  "1 * x = x"
boehmes@44488
   390
  "x + y = y + x"
boehmes@44488
   391
  by auto
boehmes@44488
   392
boehmes@44488
   393
lemma [z3_rule]:  (* for def-axiom *)
boehmes@36898
   394
  "P = Q \<or> P \<or> Q"
boehmes@36898
   395
  "P = Q \<or> \<not>P \<or> \<not>Q"
boehmes@36898
   396
  "(\<not>P) = Q \<or> \<not>P \<or> Q"
boehmes@36898
   397
  "(\<not>P) = Q \<or> P \<or> \<not>Q"
boehmes@36898
   398
  "P = (\<not>Q) \<or> \<not>P \<or> Q"
boehmes@36898
   399
  "P = (\<not>Q) \<or> P \<or> \<not>Q"
boehmes@36898
   400
  "P \<noteq> Q \<or> P \<or> \<not>Q"
boehmes@36898
   401
  "P \<noteq> Q \<or> \<not>P \<or> Q"
boehmes@36898
   402
  "P \<noteq> (\<not>Q) \<or> P \<or> Q"
boehmes@36898
   403
  "(\<not>P) \<noteq> Q \<or> P \<or> Q"
boehmes@36898
   404
  "P \<or> Q \<or> P \<noteq> (\<not>Q)"
boehmes@36898
   405
  "P \<or> Q \<or> (\<not>P) \<noteq> Q"
boehmes@36898
   406
  "P \<or> \<not>Q \<or> P \<noteq> Q"
boehmes@36898
   407
  "\<not>P \<or> Q \<or> P \<noteq> Q"
boehmes@44488
   408
  "P \<or> y = (if P then x else y)"
boehmes@44488
   409
  "P \<or> (if P then x else y) = y"
boehmes@44488
   410
  "\<not>P \<or> x = (if P then x else y)"
boehmes@44488
   411
  "\<not>P \<or>  (if P then x else y) = x"
boehmes@44488
   412
  "P \<or> R \<or> \<not>(if P then Q else R)"
boehmes@44488
   413
  "\<not>P \<or> Q \<or> \<not>(if P then Q else R)"
boehmes@44488
   414
  "\<not>(if P then Q else R) \<or> \<not>P \<or> Q"
boehmes@44488
   415
  "\<not>(if P then Q else R) \<or> P \<or> R"
boehmes@44488
   416
  "(if P then Q else R) \<or> \<not>P \<or> \<not>Q"
boehmes@44488
   417
  "(if P then Q else R) \<or> P \<or> \<not>R"
boehmes@44488
   418
  "(if P then \<not>Q else R) \<or> \<not>P \<or> Q"
boehmes@44488
   419
  "(if P then Q else \<not>R) \<or> P \<or> R"
boehmes@36898
   420
  by auto
boehmes@36898
   421
boehmes@37124
   422
hide_type (open) pattern
blanchet@56078
   423
hide_const fun_app term_true term_false z3div z3mod
boehmes@41280
   424
hide_const (open) trigger pat nopat weight
boehmes@37124
   425
boehmes@36898
   426
end