src/HOL/ex/Guess.thy
author wenzelm
Wed, 06 May 2015 23:39:30 +0200
changeset 60271 a6c6a3fb7882
parent 59031 4c3bb56b8ce7
child 61343 5b5656a63bd6
permissions -rw-r--r--
updated screenshot;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
20005
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
     1
(*
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
     2
    Author:     Makarius
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
     3
*)
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
     4
58889
5b7a9633cfa8 modernized header uniformly as section;
wenzelm
parents: 41460
diff changeset
     5
section {* Proof by guessing *}
20005
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
     6
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
     7
theory Guess
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
     8
imports Main
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
     9
begin
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    10
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
    11
notepad
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
    12
begin
20005
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    13
  have 1: "\<exists>x. x = x" by simp
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    14
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    15
  from 1 guess ..
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    16
  from 1 guess x ..
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    17
  from 1 guess x :: 'a ..
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    18
  from 1 guess x :: nat ..
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    19
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
    20
  have 2: "\<exists>x y. x = x \<and> y = y" by simp
20005
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    21
  from 2 guess apply - apply (erule exE conjE)+ done
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    22
  from 2 guess x apply - apply (erule exE conjE)+ done
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    23
  from 2 guess x y apply - apply (erule exE conjE)+ done
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    24
  from 2 guess x :: 'a and y :: 'b apply - apply (erule exE conjE)+ done
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    25
  from 2 guess x y :: nat apply - apply (erule exE conjE)+ done
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
    26
end
20005
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    27
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    28
end