src/HOL/ex/Guess.thy
author huffman
Mon, 02 Apr 2012 16:06:24 +0200
changeset 47299 e705ef5ffe95
parent 41460 ea56b98aee83
child 58889 5b7a9633cfa8
permissions -rw-r--r--
add lemma Suc_1
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
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
     5
header {* Proof by guessing *}
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
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    11
lemma True
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    12
proof
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    13
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    14
  have 1: "\<exists>x. x = x" by simp
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    15
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    16
  from 1 guess ..
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    17
  from 1 guess x ..
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    18
  from 1 guess x :: 'a ..
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    19
  from 1 guess x :: nat ..
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    20
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    21
  have 2: "\<exists>x y. x = x & y = y" by simp
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    22
  from 2 guess apply - apply (erule exE conjE)+ done
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    23
  from 2 guess x apply - apply (erule exE conjE)+ done
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    24
  from 2 guess x y apply - apply (erule exE conjE)+ done
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    25
  from 2 guess x :: 'a and y :: 'b apply - apply (erule exE conjE)+ done
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    26
  from 2 guess x y :: nat apply - apply (erule exE conjE)+ done
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    27
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    28
qed
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    29
3fd6d57b16de Proof by guessing.
wenzelm
parents:
diff changeset
    30
end