src/HOL/ex/Set_Comprehension_Pointfree_Tests.thy
author bulwahn
Mon, 28 May 2012 02:18:46 +0200
changeset 49064 d862b0d56c49
child 49070 9819d49d2f39
permissions -rw-r--r--
adding incompleted simproc to rewrite set comprehensions into pointfree expressions on sets
bulwahn@49064
     1
(*  Title:      HOL/ex/Set_Comprehension_Pointfree_Tests.thy
bulwahn@49064
     2
    Author:     Lukas Bulwahn
bulwahn@49064
     3
    Copyright   2012 TU Muenchen
bulwahn@49064
     4
*)
bulwahn@49064
     5
bulwahn@49064
     6
header {* Tests for the set comprehension to pointfree simproc *}
bulwahn@49064
     7
bulwahn@49064
     8
theory Set_Comprehension_Pointfree_Tests
bulwahn@49064
     9
imports Main
bulwahn@49064
    10
uses "~~/src/HOL/ex/set_comprehension_pointfree.ML"
bulwahn@49064
    11
begin
bulwahn@49064
    12
bulwahn@49064
    13
simproc_setup finite_Collect ("finite (Collect P)") = {* Set_Comprehension_Pointfree.simproc *}
bulwahn@49064
    14
bulwahn@49064
    15
lemma
bulwahn@49064
    16
  "finite {f a b| a b. a : A \<and> b : B}"
bulwahn@49064
    17
apply simp (* works :) *)
bulwahn@49064
    18
oops
bulwahn@49064
    19
bulwahn@49064
    20
lemma
bulwahn@49064
    21
  "finite {f a b| a b. a : A \<and> a : A' \<and> b : B}"
bulwahn@49064
    22
(* apply simp -- does not terminate *)
bulwahn@49064
    23
oops
bulwahn@49064
    24
bulwahn@49064
    25
lemma
bulwahn@49064
    26
  "finite {f a b| a b. a : A \<and> b : B \<and> b : B'}"
bulwahn@49064
    27
(* apply simp -- does not terminate *)
bulwahn@49064
    28
oops
bulwahn@49064
    29
bulwahn@49064
    30
lemma
bulwahn@49064
    31
  "finite {f a b c| a b c. a : A \<and> b : B \<and> c : C}"
bulwahn@49064
    32
(* apply simp -- failed *) 
bulwahn@49064
    33
oops
bulwahn@49064
    34
bulwahn@49064
    35
lemma
bulwahn@49064
    36
  "finite {f a b c d| a b c d. a : A \<and> b : B \<and> c : C \<and> d : D}"
bulwahn@49064
    37
(* apply simp -- failed *)
bulwahn@49064
    38
oops
bulwahn@49064
    39
bulwahn@49064
    40
lemma
bulwahn@49064
    41
  "finite {f a b c d e | a b c d e. a : A \<and> b : B \<and> c : C \<and> d : D \<and> e : E}"
bulwahn@49064
    42
(* apply simp -- failed *)
bulwahn@49064
    43
oops
bulwahn@49064
    44
bulwahn@49064
    45
end