ProgTutorial/Recipes/Oracle.thy
author Norbert Schirmer <norbert.schirmer@web.de>
Tue, 14 May 2019 11:10:53 +0200
changeset 562 daf404920ab9
parent 538 e9fd5eff62c1
child 565 cecd7a941885
permissions -rw-r--r--
Accomodate to Isabelle 2018
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
120
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
theory Oracle
346
0fea8b7a14a1 tuned the ML-output mechanism; tuned slightly the text
Christian Urban <urbanc@in.tum.de>
parents: 211
diff changeset
     2
imports "../Appendix"
120
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
begin
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
211
d5accbc67e1b more work on simple inductive and marked all sections that are still seriously incomplete with TBD
Christian Urban <urbanc@in.tum.de>
parents: 189
diff changeset
     5
section {* Writing an Oracle (TBD)\label{rec:oracle} *} 
120
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
text {*
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
  {\bf Problem:}
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
  You want to use a fast, new decision procedure not based one Isabelle's
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
  tactics, and you do not care whether it is sound.
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
  \smallskip
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
  {\bf Solution:} Isabelle provides the oracle mechanisms to bypass the
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
  inference kernel. Note that theorems proven by an oracle carry a special
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
  mark to inform the user of their potential incorrectness.
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
  \smallskip
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
  \begin{readmore}
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
  A short introduction to oracles can be found in [isar-ref: no suitable label
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
  for section 3.11]. A simple example, which we will slightly extend here,
457
aedfdcae39a9 'Iff_Oracle.thy' has moved
griff
parents: 346
diff changeset
    21
  is given in @{ML_file "HOL/ex/Iff_Oracle.thy"}. The raw interface for adding
120
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    22
  oracles is @{ML add_oracle in Thm} in @{ML_file "Pure/thm.ML"}.
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    23
  \end{readmore}
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
  For our explanation here, we restrict ourselves to decide propositional
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
  formulae which consist only of equivalences between propositional variables,
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
  i.e. we want to decide whether @{term "P = (Q = P) = Q"} is a tautology.
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    29
  Assume, that we have a decision procedure for such formulae, implemented
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    30
  in ML. Since we do not care how it works, we will use it here as an
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    31
  ``external solver'':
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    32
*}
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    33
538
e9fd5eff62c1 removed "use" for "ML_file"
Christian Urban <urbanc@in.tum.de>
parents: 535
diff changeset
    34
ML_file "external_solver.ML"
120
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    35
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    36
text {*
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    37
  We do, however, know that the solver provides a function
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    38
  @{ML IffSolver.decide}.
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    39
  It takes a string representation of a formula and returns either
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    40
  @{ML true} if the formula is a tautology or
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    41
  @{ML false} otherwise. The input syntax is specified as follows:
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    42
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    43
  formula $::=$ atom $\mid$ \verb|(| formula \verb|<=>| formula \verb|)|
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    44
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    45
  and all token are separated by at least one space.
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    46
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    47
  (FIXME: is there a better way for describing the syntax?)
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    48
 
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    49
  We will proceed in the following way. We start by translating a HOL formula
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    50
  into the string representation expected by the solver. The solver's result
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    51
  is then used to build an oracle, which we will subsequently use as a core
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    52
  for an Isar method to be able to apply the oracle in proving theorems.
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    53
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    54
  Let us start with the translation function from Isabelle propositions into
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    55
  the solver's string representation. To increase efficiency while building
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    56
  the string, we use functions from the @{text Buffer} module.
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    57
  *}
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    58
535
5734ab5dd86d adapted to new build framework
Christian Urban <urbanc@in.tum.de>
parents: 517
diff changeset
    59
ML %grayML{*fun translate t =
120
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    60
  let
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    61
    fun trans t =
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    62
      (case t of
562
daf404920ab9 Accomodate to Isabelle 2018
Norbert Schirmer <norbert.schirmer@web.de>
parents: 538
diff changeset
    63
        @{term "(=) :: bool \<Rightarrow> bool \<Rightarrow> bool"} $ t $ u =>
120
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    64
          Buffer.add " (" #>
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    65
          trans t #>
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    66
          Buffer.add "<=>" #> 
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    67
          trans u #>
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    68
          Buffer.add ") "
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    69
      | Free (n, @{typ bool}) =>
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    70
         Buffer.add " " #> 
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    71
         Buffer.add n #>
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    72
         Buffer.add " "
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    73
      | _ => error "inacceptable term")
535
5734ab5dd86d adapted to new build framework
Christian Urban <urbanc@in.tum.de>
parents: 517
diff changeset
    74
  in Buffer.content (trans t Buffer.empty) end*}
120
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    75
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    76
text {*
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    77
  Here is the string representation of the term @{term "p = (q = p)"}:
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    78
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    79
  @{ML_response 
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    80
    "translate @{term \"p = (q = p)\"}" 
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    81
    "\" ( p <=> ( q <=> p ) ) \""}
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    82
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    83
  Let us check, what the solver returns when given a tautology:
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    84
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    85
  @{ML_response 
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    86
    "IffSolver.decide (translate @{term \"p = (q = p) = q\"})"
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    87
    "true"}
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    88
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    89
  And here is what it returns for a formula which is not valid:
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    90
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    91
  @{ML_response 
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    92
    "IffSolver.decide (translate @{term \"p = (q = p)\"})" 
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    93
    "false"}
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    94
*}
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    95
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    96
text {* 
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    97
  Now, we combine these functions into an oracle. In general, an oracle may
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    98
  be given any input, but it has to return a certified proposition (a
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    99
  special term which is type-checked), out of which Isabelle's inference
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   100
  kernel ``magically'' makes a theorem.
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   101
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   102
  Here, we take the proposition to be show as input. Note that we have
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   103
  to first extract the term which is then passed to the translation and
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   104
  decision procedure. If the solver finds this term to be valid, we return
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   105
  the given proposition unchanged to be turned then into a theorem:
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   106
*}
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   107
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   108
oracle iff_oracle = {* fn ct =>
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   109
  if IffSolver.decide (translate (HOLogic.dest_Trueprop (Thm.term_of ct)))
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   110
  then ct
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   111
  else error "Proof failed."*}
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   112
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   113
text {*
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   114
  Here is what we get when applying the oracle:
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   115
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   116
  @{ML_response_fake "iff_oracle @{cprop \"p = (p::bool)\"}" "p = p"}
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   117
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   118
  (FIXME: is there a better way to present the theorem?)
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   119
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   120
  To be able to use our oracle for Isar proofs, we wrap it into a tactic:
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   121
*}
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   122
562
daf404920ab9 Accomodate to Isabelle 2018
Norbert Schirmer <norbert.schirmer@web.de>
parents: 538
diff changeset
   123
ML %grayML{*fun iff_oracle_tac ctxt =
120
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   124
  CSUBGOAL (fn (goal, i) => 
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   125
    (case try iff_oracle goal of
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   126
      NONE => no_tac
562
daf404920ab9 Accomodate to Isabelle 2018
Norbert Schirmer <norbert.schirmer@web.de>
parents: 538
diff changeset
   127
    | SOME thm => resolve_tac ctxt [thm] i))*}
120
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   128
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   129
text {*
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   130
  and create a new method solely based on this tactic:
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   131
*}
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   132
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   133
method_setup iff_oracle = {*
562
daf404920ab9 Accomodate to Isabelle 2018
Norbert Schirmer <norbert.schirmer@web.de>
parents: 538
diff changeset
   134
   Scan.succeed (fn ctxt => (Method.SIMPLE_METHOD' (iff_oracle_tac ctxt)))
120
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   135
*} "Oracle-based decision procedure for chains of equivalences"
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   136
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   137
text {*
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   138
  Finally, we can test our oracle to prove some theorems:
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   139
*}
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   140
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   141
lemma "p = (p::bool)"
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   142
   by iff_oracle
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   143
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   144
lemma "p = (q = p) = q"
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   145
   by iff_oracle
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   146
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   147
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   148
text {*
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   149
(FIXME: say something about what the proof of the oracle is ... what do you mean?)
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   150
*} 
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   151
c39f83d8daeb some polishing; split up the file External Solver into two
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   152
457
aedfdcae39a9 'Iff_Oracle.thy' has moved
griff
parents: 346
diff changeset
   153
end