src/HOL/ex/Guess.thy
author wenzelm
Fri, 31 Aug 2007 23:17:25 +0200
changeset 24505 9e6d91f8bb73
parent 20005 3fd6d57b16de
child 41460 ea56b98aee83
permissions -rw-r--r--
reject_vars: accept type-inference params; standard_term_check: include prepare_pattern; infer_type: mode_schematic; tuned;

(*
    ID:         $Id$
    Author:     Makarius
*)

header {* Proof by guessing *}

theory Guess
imports Main
begin

lemma True
proof

  have 1: "\<exists>x. x = x" by simp

  from 1 guess ..
  from 1 guess x ..
  from 1 guess x :: 'a ..
  from 1 guess x :: nat ..

  have 2: "\<exists>x y. x = x & y = y" by simp
  from 2 guess apply - apply (erule exE conjE)+ done
  from 2 guess x apply - apply (erule exE conjE)+ done
  from 2 guess x y apply - apply (erule exE conjE)+ done
  from 2 guess x :: 'a and y :: 'b apply - apply (erule exE conjE)+ done
  from 2 guess x y :: nat apply - apply (erule exE conjE)+ done

qed

end