| 20005 |      1 | (*
 | 
|  |      2 |     Author:     Makarius
 | 
|  |      3 | *)
 | 
|  |      4 | 
 | 
| 61343 |      5 | section \<open>Proof by guessing\<close>
 | 
| 20005 |      6 | 
 | 
|  |      7 | theory Guess
 | 
|  |      8 | imports Main
 | 
|  |      9 | begin
 | 
|  |     10 | 
 | 
| 59031 |     11 | notepad
 | 
|  |     12 | begin
 | 
| 20005 |     13 |   have 1: "\<exists>x. x = x" by simp
 | 
|  |     14 | 
 | 
|  |     15 |   from 1 guess ..
 | 
|  |     16 |   from 1 guess x ..
 | 
|  |     17 |   from 1 guess x :: 'a ..
 | 
|  |     18 |   from 1 guess x :: nat ..
 | 
|  |     19 | 
 | 
| 59031 |     20 |   have 2: "\<exists>x y. x = x \<and> y = y" by simp
 | 
| 20005 |     21 |   from 2 guess apply - apply (erule exE conjE)+ done
 | 
|  |     22 |   from 2 guess x apply - apply (erule exE conjE)+ done
 | 
|  |     23 |   from 2 guess x y apply - apply (erule exE conjE)+ done
 | 
|  |     24 |   from 2 guess x :: 'a and y :: 'b apply - apply (erule exE conjE)+ done
 | 
|  |     25 |   from 2 guess x y :: nat apply - apply (erule exE conjE)+ done
 | 
| 59031 |     26 | end
 | 
| 20005 |     27 | 
 | 
|  |     28 | end
 |