author | Cezary Kaliszyk <kaliszyk@in.tum.de> |
Fri, 20 Aug 2010 16:55:58 +0900 | |
changeset 2423 | f5cbf74d4ec5 |
parent 2310 | dd3b9c046c7d |
child 2466 | 47c840599a6b |
permissions | -rw-r--r-- |
1062 | 1 |
(* Title: Nominal2_Eqvt |
1810
894930834ca8
fixed bug in thmdecls with destructing Trueprop; some initial infrastructure for eqvt-theorems of the form _ ==> _
Christian Urban <urbanc@in.tum.de>
parents:
1803
diff
changeset
|
2 |
Author: Brian Huffman, |
894930834ca8
fixed bug in thmdecls with destructing Trueprop; some initial infrastructure for eqvt-theorems of the form _ ==> _
Christian Urban <urbanc@in.tum.de>
parents:
1803
diff
changeset
|
3 |
Author: Christian Urban |
1062 | 4 |
|
1869 | 5 |
Equivariance, supp and freshness lemmas for various operators |
6 |
(contains many, but not all such lemmas). |
|
1062 | 7 |
*) |
8 |
theory Nominal2_Eqvt |
|
1933
9eab1dfc14d2
moved lemmas from FSet.thy to do with atom to Nominal2_Base, and to do with 'a::at set to Nominal2_Atoms; moved Nominal2_Eqvt.thy one up to be loaded before Nominal2_Atoms
Christian Urban <urbanc@in.tum.de>
parents:
1872
diff
changeset
|
9 |
imports Nominal2_Base |
1062 | 10 |
uses ("nominal_thmdecls.ML") |
11 |
("nominal_permeq.ML") |
|
1833
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
1827
diff
changeset
|
12 |
("nominal_eqvt.ML") |
1062 | 13 |
begin |
14 |
||
15 |
||
1995
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
16 |
section {* Permsimp and Eqvt infrastructure *} |
1062 | 17 |
|
1869 | 18 |
text {* Setup of the theorem attributes @{text eqvt} and @{text eqvt_raw} *} |
19 |
||
1062 | 20 |
use "nominal_thmdecls.ML" |
21 |
setup "Nominal_ThmDecls.setup" |
|
22 |
||
1995
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
23 |
text {* helper lemmas for the perm_simp *} |
1062 | 24 |
|
25 |
definition |
|
26 |
"unpermute p = permute (- p)" |
|
27 |
||
28 |
lemma eqvt_apply: |
|
29 |
fixes f :: "'a::pt \<Rightarrow> 'b::pt" |
|
30 |
and x :: "'a::pt" |
|
31 |
shows "p \<bullet> (f x) \<equiv> (p \<bullet> f) (p \<bullet> x)" |
|
32 |
unfolding permute_fun_def by simp |
|
33 |
||
34 |
lemma eqvt_lambda: |
|
35 |
fixes f :: "'a::pt \<Rightarrow> 'b::pt" |
|
36 |
shows "p \<bullet> (\<lambda>x. f x) \<equiv> (\<lambda>x. p \<bullet> (f (unpermute p x)))" |
|
37 |
unfolding permute_fun_def unpermute_def by simp |
|
38 |
||
39 |
lemma eqvt_bound: |
|
40 |
shows "p \<bullet> unpermute p x \<equiv> x" |
|
41 |
unfolding unpermute_def by simp |
|
42 |
||
1995
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
43 |
text {* provides perm_simp methods *} |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
44 |
|
1062 | 45 |
use "nominal_permeq.ML" |
1800
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
46 |
setup Nominal_Permeq.setup |
1062 | 47 |
|
1800
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
48 |
method_setup perm_simp = |
1947 | 49 |
{* Nominal_Permeq.args_parser >> Nominal_Permeq.perm_simp_meth *} |
50 |
{* pushes permutations inside. *} |
|
1800
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
51 |
|
1801
6d2a39db3862
added more robust tracing infrastructure; a strict version of the eqvt_tac raises an error if not all permutations cannot be analysed
Christian Urban <urbanc@in.tum.de>
parents:
1800
diff
changeset
|
52 |
method_setup perm_strict_simp = |
1947 | 53 |
{* Nominal_Permeq.args_parser >> Nominal_Permeq.perm_strict_simp_meth *} |
54 |
{* pushes permutations inside, raises an error if it cannot solve all permutations. *} |
|
1801
6d2a39db3862
added more robust tracing infrastructure; a strict version of the eqvt_tac raises an error if not all permutations cannot be analysed
Christian Urban <urbanc@in.tum.de>
parents:
1800
diff
changeset
|
55 |
|
1995
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
56 |
(* the normal version of this lemma would cause loops *) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
57 |
lemma permute_eqvt_raw[eqvt_raw]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
58 |
shows "p \<bullet> permute \<equiv> permute" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
59 |
apply(simp add: expand_fun_eq permute_fun_def) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
60 |
apply(subst permute_eqvt) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
61 |
apply(simp) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
62 |
done |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
63 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
64 |
section {* Logical Operators *} |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
65 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
66 |
lemma eq_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
67 |
shows "p \<bullet> (x = y) \<longleftrightarrow> (p \<bullet> x) = (p \<bullet> y)" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
68 |
unfolding permute_eq_iff permute_bool_def .. |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
69 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
70 |
lemma if_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
71 |
shows "p \<bullet> (if b then x else y) = (if p \<bullet> b then p \<bullet> x else p \<bullet> y)" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
72 |
by (simp add: permute_fun_def permute_bool_def) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
73 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
74 |
lemma True_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
75 |
shows "p \<bullet> True = True" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
76 |
unfolding permute_bool_def .. |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
77 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
78 |
lemma False_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
79 |
shows "p \<bullet> False = False" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
80 |
unfolding permute_bool_def .. |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
81 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
82 |
lemma imp_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
83 |
shows "p \<bullet> (A \<longrightarrow> B) = ((p \<bullet> A) \<longrightarrow> (p \<bullet> B))" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
84 |
by (simp add: permute_bool_def) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
85 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
86 |
lemma conj_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
87 |
shows "p \<bullet> (A \<and> B) = ((p \<bullet> A) \<and> (p \<bullet> B))" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
88 |
by (simp add: permute_bool_def) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
89 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
90 |
lemma disj_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
91 |
shows "p \<bullet> (A \<or> B) = ((p \<bullet> A) \<or> (p \<bullet> B))" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
92 |
by (simp add: permute_bool_def) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
93 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
94 |
lemma Not_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
95 |
shows "p \<bullet> (\<not> A) \<longleftrightarrow> \<not> (p \<bullet> A)" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
96 |
by (simp add: permute_bool_def) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
97 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
98 |
lemma all_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
99 |
shows "p \<bullet> (\<forall>x. P x) = (\<forall>x. (p \<bullet> P) x)" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
100 |
unfolding permute_fun_def permute_bool_def |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
101 |
by (auto, drule_tac x="p \<bullet> x" in spec, simp) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
102 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
103 |
lemma all_eqvt2: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
104 |
shows "p \<bullet> (\<forall>x. P x) = (\<forall>x. p \<bullet> P (- p \<bullet> x))" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
105 |
by (perm_simp add: permute_minus_cancel) (rule refl) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
106 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
107 |
lemma ex_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
108 |
shows "p \<bullet> (\<exists>x. P x) = (\<exists>x. (p \<bullet> P) x)" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
109 |
unfolding permute_fun_def permute_bool_def |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
110 |
by (auto, rule_tac x="p \<bullet> x" in exI, simp) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
111 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
112 |
lemma ex_eqvt2: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
113 |
shows "p \<bullet> (\<exists>x. P x) = (\<exists>x. p \<bullet> P (- p \<bullet> x))" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
114 |
by (perm_simp add: permute_minus_cancel) (rule refl) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
115 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
116 |
lemma ex1_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
117 |
shows "p \<bullet> (\<exists>!x. P x) = (\<exists>!x. (p \<bullet> P) x)" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
118 |
unfolding Ex1_def |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
119 |
by (perm_simp) (rule refl) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
120 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
121 |
lemma ex1_eqvt2: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
122 |
shows "p \<bullet> (\<exists>!x. P x) = (\<exists>!x. p \<bullet> P (- p \<bullet> x))" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
123 |
by (perm_simp add: permute_minus_cancel) (rule refl) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
124 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
125 |
lemma the_eqvt: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
126 |
assumes unique: "\<exists>!x. P x" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
127 |
shows "(p \<bullet> (THE x. P x)) = (THE x. p \<bullet> P (- p \<bullet> x))" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
128 |
apply(rule the1_equality [symmetric]) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
129 |
apply(simp add: ex1_eqvt2[symmetric]) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
130 |
apply(simp add: permute_bool_def unique) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
131 |
apply(simp add: permute_bool_def) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
132 |
apply(rule theI'[OF unique]) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
133 |
done |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
134 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
135 |
section {* Set Operations *} |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
136 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
137 |
lemma mem_permute_iff: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
138 |
shows "(p \<bullet> x) \<in> (p \<bullet> X) \<longleftrightarrow> x \<in> X" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
139 |
unfolding mem_def permute_fun_def permute_bool_def |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
140 |
by simp |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
141 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
142 |
lemma mem_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
143 |
shows "p \<bullet> (x \<in> A) \<longleftrightarrow> (p \<bullet> x) \<in> (p \<bullet> A)" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
144 |
unfolding mem_def |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
145 |
by (perm_simp) (rule refl) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
146 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
147 |
lemma not_mem_eqvt: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
148 |
shows "p \<bullet> (x \<notin> A) \<longleftrightarrow> (p \<bullet> x) \<notin> (p \<bullet> A)" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
149 |
by (perm_simp) (rule refl) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
150 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
151 |
lemma Collect_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
152 |
shows "p \<bullet> {x. P x} = {x. (p \<bullet> P) x}" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
153 |
unfolding Collect_def permute_fun_def .. |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
154 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
155 |
lemma Collect_eqvt2: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
156 |
shows "p \<bullet> {x. P x} = {x. p \<bullet> (P (-p \<bullet> x))}" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
157 |
by (perm_simp add: permute_minus_cancel) (rule refl) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
158 |
|
2002
74d869595fed
added eqvt-lemmas for Bex, Ball and Union
Christian Urban <urbanc@in.tum.de>
parents:
1995
diff
changeset
|
159 |
lemma Bex_eqvt[eqvt]: |
74d869595fed
added eqvt-lemmas for Bex, Ball and Union
Christian Urban <urbanc@in.tum.de>
parents:
1995
diff
changeset
|
160 |
shows "p \<bullet> (\<exists>x \<in> S. P x) = (\<exists>x \<in> (p \<bullet> S). (p \<bullet> P) x)" |
74d869595fed
added eqvt-lemmas for Bex, Ball and Union
Christian Urban <urbanc@in.tum.de>
parents:
1995
diff
changeset
|
161 |
unfolding Bex_def |
74d869595fed
added eqvt-lemmas for Bex, Ball and Union
Christian Urban <urbanc@in.tum.de>
parents:
1995
diff
changeset
|
162 |
by (perm_simp) (rule refl) |
74d869595fed
added eqvt-lemmas for Bex, Ball and Union
Christian Urban <urbanc@in.tum.de>
parents:
1995
diff
changeset
|
163 |
|
74d869595fed
added eqvt-lemmas for Bex, Ball and Union
Christian Urban <urbanc@in.tum.de>
parents:
1995
diff
changeset
|
164 |
lemma Ball_eqvt[eqvt]: |
74d869595fed
added eqvt-lemmas for Bex, Ball and Union
Christian Urban <urbanc@in.tum.de>
parents:
1995
diff
changeset
|
165 |
shows "p \<bullet> (\<forall>x \<in> S. P x) = (\<forall>x \<in> (p \<bullet> S). (p \<bullet> P) x)" |
74d869595fed
added eqvt-lemmas for Bex, Ball and Union
Christian Urban <urbanc@in.tum.de>
parents:
1995
diff
changeset
|
166 |
unfolding Ball_def |
74d869595fed
added eqvt-lemmas for Bex, Ball and Union
Christian Urban <urbanc@in.tum.de>
parents:
1995
diff
changeset
|
167 |
by (perm_simp) (rule refl) |
74d869595fed
added eqvt-lemmas for Bex, Ball and Union
Christian Urban <urbanc@in.tum.de>
parents:
1995
diff
changeset
|
168 |
|
1995
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
169 |
lemma empty_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
170 |
shows "p \<bullet> {} = {}" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
171 |
unfolding empty_def |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
172 |
by (perm_simp) (rule refl) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
173 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
174 |
lemma supp_set_empty: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
175 |
shows "supp {} = {}" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
176 |
unfolding supp_def |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
177 |
by (simp add: empty_eqvt) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
178 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
179 |
lemma fresh_set_empty: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
180 |
shows "a \<sharp> {}" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
181 |
by (simp add: fresh_def supp_set_empty) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
182 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
183 |
lemma UNIV_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
184 |
shows "p \<bullet> UNIV = UNIV" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
185 |
unfolding UNIV_def |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
186 |
by (perm_simp) (rule refl) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
187 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
188 |
lemma union_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
189 |
shows "p \<bullet> (A \<union> B) = (p \<bullet> A) \<union> (p \<bullet> B)" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
190 |
unfolding Un_def |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
191 |
by (perm_simp) (rule refl) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
192 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
193 |
lemma inter_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
194 |
shows "p \<bullet> (A \<inter> B) = (p \<bullet> A) \<inter> (p \<bullet> B)" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
195 |
unfolding Int_def |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
196 |
by (perm_simp) (rule refl) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
197 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
198 |
lemma Diff_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
199 |
fixes A B :: "'a::pt set" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
200 |
shows "p \<bullet> (A - B) = p \<bullet> A - p \<bullet> B" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
201 |
unfolding set_diff_eq |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
202 |
by (perm_simp) (rule refl) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
203 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
204 |
lemma Compl_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
205 |
fixes A :: "'a::pt set" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
206 |
shows "p \<bullet> (- A) = - (p \<bullet> A)" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
207 |
unfolding Compl_eq_Diff_UNIV |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
208 |
by (perm_simp) (rule refl) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
209 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
210 |
lemma insert_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
211 |
shows "p \<bullet> (insert x A) = insert (p \<bullet> x) (p \<bullet> A)" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
212 |
unfolding permute_set_eq_image image_insert .. |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
213 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
214 |
lemma vimage_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
215 |
shows "p \<bullet> (f -` A) = (p \<bullet> f) -` (p \<bullet> A)" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
216 |
unfolding vimage_def |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
217 |
by (perm_simp) (rule refl) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
218 |
|
2002
74d869595fed
added eqvt-lemmas for Bex, Ball and Union
Christian Urban <urbanc@in.tum.de>
parents:
1995
diff
changeset
|
219 |
lemma Union_eqvt[eqvt]: |
74d869595fed
added eqvt-lemmas for Bex, Ball and Union
Christian Urban <urbanc@in.tum.de>
parents:
1995
diff
changeset
|
220 |
shows "p \<bullet> (\<Union> S) = \<Union> (p \<bullet> S)" |
74d869595fed
added eqvt-lemmas for Bex, Ball and Union
Christian Urban <urbanc@in.tum.de>
parents:
1995
diff
changeset
|
221 |
unfolding Union_eq |
74d869595fed
added eqvt-lemmas for Bex, Ball and Union
Christian Urban <urbanc@in.tum.de>
parents:
1995
diff
changeset
|
222 |
by (perm_simp) (rule refl) |
74d869595fed
added eqvt-lemmas for Bex, Ball and Union
Christian Urban <urbanc@in.tum.de>
parents:
1995
diff
changeset
|
223 |
|
1995
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
224 |
lemma finite_permute_iff: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
225 |
shows "finite (p \<bullet> A) \<longleftrightarrow> finite A" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
226 |
unfolding permute_set_eq_vimage |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
227 |
using bij_permute by (rule finite_vimage_iff) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
228 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
229 |
lemma finite_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
230 |
shows "p \<bullet> finite A = finite (p \<bullet> A)" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
231 |
unfolding finite_permute_iff permute_bool_def .. |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
232 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
233 |
section {* List Operations *} |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
234 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
235 |
lemma append_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
236 |
shows "p \<bullet> (xs @ ys) = (p \<bullet> xs) @ (p \<bullet> ys)" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
237 |
by (induct xs) auto |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
238 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
239 |
lemma supp_append: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
240 |
shows "supp (xs @ ys) = supp xs \<union> supp ys" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
241 |
by (induct xs) (auto simp add: supp_Nil supp_Cons) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
242 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
243 |
lemma fresh_append: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
244 |
shows "a \<sharp> (xs @ ys) \<longleftrightarrow> a \<sharp> xs \<and> a \<sharp> ys" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
245 |
by (induct xs) (simp_all add: fresh_Nil fresh_Cons) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
246 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
247 |
lemma rev_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
248 |
shows "p \<bullet> (rev xs) = rev (p \<bullet> xs)" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
249 |
by (induct xs) (simp_all add: append_eqvt) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
250 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
251 |
lemma supp_rev: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
252 |
shows "supp (rev xs) = supp xs" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
253 |
by (induct xs) (auto simp add: supp_append supp_Cons supp_Nil) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
254 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
255 |
lemma fresh_rev: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
256 |
shows "a \<sharp> rev xs \<longleftrightarrow> a \<sharp> xs" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
257 |
by (induct xs) (auto simp add: fresh_append fresh_Cons fresh_Nil) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
258 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
259 |
lemma set_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
260 |
shows "p \<bullet> (set xs) = set (p \<bullet> xs)" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
261 |
by (induct xs) (simp_all add: empty_eqvt insert_eqvt) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
262 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
263 |
(* needs finite support premise |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
264 |
lemma supp_set: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
265 |
fixes x :: "'a::pt" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
266 |
shows "supp (set xs) = supp xs" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
267 |
*) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
268 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
269 |
lemma map_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
270 |
shows "p \<bullet> (map f xs) = map (p \<bullet> f) (p \<bullet> xs)" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
271 |
by (induct xs) (simp_all, simp only: permute_fun_app_eq) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
272 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
273 |
section {* Product Operations *} |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
274 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
275 |
lemma fst_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
276 |
"p \<bullet> (fst x) = fst (p \<bullet> x)" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
277 |
by (cases x) simp |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
278 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
279 |
lemma snd_eqvt[eqvt]: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
280 |
"p \<bullet> (snd x) = snd (p \<bullet> x)" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
281 |
by (cases x) simp |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
282 |
|
2080
0532006ec7ec
added eqvt-lemma for split; changed semantics of perm_simp: excluded stands for constants about which no complaint is written out...eqvt_apply is now always applied
Christian Urban <urbanc@in.tum.de>
parents:
2064
diff
changeset
|
283 |
lemma split_eqvt[eqvt]: |
0532006ec7ec
added eqvt-lemma for split; changed semantics of perm_simp: excluded stands for constants about which no complaint is written out...eqvt_apply is now always applied
Christian Urban <urbanc@in.tum.de>
parents:
2064
diff
changeset
|
284 |
shows "p \<bullet> (split P x) = split (p \<bullet> P) (p \<bullet> x)" |
0532006ec7ec
added eqvt-lemma for split; changed semantics of perm_simp: excluded stands for constants about which no complaint is written out...eqvt_apply is now always applied
Christian Urban <urbanc@in.tum.de>
parents:
2064
diff
changeset
|
285 |
unfolding split_def |
0532006ec7ec
added eqvt-lemma for split; changed semantics of perm_simp: excluded stands for constants about which no complaint is written out...eqvt_apply is now always applied
Christian Urban <urbanc@in.tum.de>
parents:
2064
diff
changeset
|
286 |
by (perm_simp) (rule refl) |
0532006ec7ec
added eqvt-lemma for split; changed semantics of perm_simp: excluded stands for constants about which no complaint is written out...eqvt_apply is now always applied
Christian Urban <urbanc@in.tum.de>
parents:
2064
diff
changeset
|
287 |
|
1995
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
288 |
section {* Units *} |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
289 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
290 |
lemma supp_unit: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
291 |
shows "supp () = {}" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
292 |
by (simp add: supp_def) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
293 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
294 |
lemma fresh_unit: |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
295 |
shows "a \<sharp> ()" |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
296 |
by (simp add: fresh_def supp_unit) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
297 |
|
2009
4f7d7cbd4bc8
removed duplicate eqvt attribute
Christian Urban <urbanc@in.tum.de>
parents:
2002
diff
changeset
|
298 |
section {* additional eqvt lemmas *} |
1995
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
299 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
300 |
lemmas [eqvt] = |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
301 |
imp_eqvt [folded induct_implies_def] |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
302 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
303 |
(* nominal *) |
2310 | 304 |
supp_eqvt fresh_eqvt add_perm_eqvt atom_eqvt swap_eqvt uminus_eqvt |
1995
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
305 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
306 |
(* datatypes *) |
2009
4f7d7cbd4bc8
removed duplicate eqvt attribute
Christian Urban <urbanc@in.tum.de>
parents:
2002
diff
changeset
|
307 |
Pair_eqvt permute_list.simps |
1995
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
308 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
309 |
(* sets *) |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
310 |
image_eqvt |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
311 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
312 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
313 |
section {* Test cases *} |
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
314 |
|
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
315 |
|
2009
4f7d7cbd4bc8
removed duplicate eqvt attribute
Christian Urban <urbanc@in.tum.de>
parents:
2002
diff
changeset
|
316 |
declare [[trace_eqvt = false]] |
4f7d7cbd4bc8
removed duplicate eqvt attribute
Christian Urban <urbanc@in.tum.de>
parents:
2002
diff
changeset
|
317 |
(* declare [[trace_eqvt = true]] *) |
1800
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
318 |
|
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
319 |
lemma |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
320 |
fixes B::"'a::pt" |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
321 |
shows "p \<bullet> (B = C)" |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
322 |
apply(perm_simp) |
1062 | 323 |
oops |
324 |
||
1800
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
325 |
lemma |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
326 |
fixes B::"bool" |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
327 |
shows "p \<bullet> (B = C)" |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
328 |
apply(perm_simp) |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
329 |
oops |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
330 |
|
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
331 |
lemma |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
332 |
fixes B::"bool" |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
333 |
shows "p \<bullet> (A \<longrightarrow> B = C)" |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
334 |
apply (perm_simp) |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
335 |
oops |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
336 |
|
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
337 |
lemma |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
338 |
shows "p \<bullet> (\<lambda>(x::'a::pt). A \<longrightarrow> (B::'a \<Rightarrow> bool) x = C) = foo" |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
339 |
apply(perm_simp) |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
340 |
oops |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
341 |
|
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
342 |
lemma |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
343 |
shows "p \<bullet> (\<lambda>B::bool. A \<longrightarrow> (B = C)) = foo" |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
344 |
apply (perm_simp) |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
345 |
oops |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
346 |
|
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
347 |
lemma |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
348 |
shows "p \<bullet> (\<lambda>x y. \<exists>z. x = z \<and> x = y \<longrightarrow> z \<noteq> x) = foo" |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
349 |
apply (perm_simp) |
1062 | 350 |
oops |
351 |
||
1800
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
352 |
lemma |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
353 |
shows "p \<bullet> (\<lambda>f x. f (g (f x))) = foo" |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
354 |
apply (perm_simp) |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
355 |
oops |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
356 |
|
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
357 |
lemma |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
358 |
fixes p q::"perm" |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
359 |
and x::"'a::pt" |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
360 |
shows "p \<bullet> (q \<bullet> x) = foo" |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
361 |
apply(perm_simp) |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
362 |
oops |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
363 |
|
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
364 |
lemma |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
365 |
fixes p q r::"perm" |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
366 |
and x::"'a::pt" |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
367 |
shows "p \<bullet> (q \<bullet> r \<bullet> x) = foo" |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
368 |
apply(perm_simp) |
1062 | 369 |
oops |
370 |
||
1800
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
371 |
lemma |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
372 |
fixes p r::"perm" |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
373 |
shows "p \<bullet> (\<lambda>q::perm. q \<bullet> (r \<bullet> x)) = foo" |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
374 |
apply (perm_simp) |
1062 | 375 |
oops |
376 |
||
1800
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
377 |
lemma |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
378 |
fixes C D::"bool" |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
379 |
shows "B (p \<bullet> (C = D))" |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
380 |
apply(perm_simp) |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
381 |
oops |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
382 |
|
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
383 |
declare [[trace_eqvt = false]] |
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
384 |
|
2200
31f1ec832d39
fixed bug where perm_simp 'forgets' how to prove equivariance for the empty set
Christian Urban <urbanc@in.tum.de>
parents:
2129
diff
changeset
|
385 |
text {* there is no raw eqvt-rule for The *} |
1800
78fdc6b36a1c
changed the eqvt-tac to move only outermost permutations inside; added tracing infrastructure for the eqvt-tac
Christian Urban <urbanc@in.tum.de>
parents:
1774
diff
changeset
|
386 |
lemma "p \<bullet> (THE x. P x) = foo" |
1867
f4477d3fe520
preliminary parser for perm_simp metod
Christian Urban <urbanc@in.tum.de>
parents:
1866
diff
changeset
|
387 |
apply(perm_strict_simp exclude: The) |
f4477d3fe520
preliminary parser for perm_simp metod
Christian Urban <urbanc@in.tum.de>
parents:
1866
diff
changeset
|
388 |
apply(perm_simp exclude: The) |
1062 | 389 |
oops |
390 |
||
2064
2725853f43b9
solved the problem with equivariance by first eta-normalising the goal
Christian Urban <urbanc@in.tum.de>
parents:
2009
diff
changeset
|
391 |
lemma |
2725853f43b9
solved the problem with equivariance by first eta-normalising the goal
Christian Urban <urbanc@in.tum.de>
parents:
2009
diff
changeset
|
392 |
fixes P :: "(('b \<Rightarrow> bool) \<Rightarrow> ('b::pt)) \<Rightarrow> ('a::pt)" |
2080
0532006ec7ec
added eqvt-lemma for split; changed semantics of perm_simp: excluded stands for constants about which no complaint is written out...eqvt_apply is now always applied
Christian Urban <urbanc@in.tum.de>
parents:
2064
diff
changeset
|
393 |
shows "p \<bullet> (P The) = foo" |
2064
2725853f43b9
solved the problem with equivariance by first eta-normalising the goal
Christian Urban <urbanc@in.tum.de>
parents:
2009
diff
changeset
|
394 |
apply(perm_simp exclude: The) |
2725853f43b9
solved the problem with equivariance by first eta-normalising the goal
Christian Urban <urbanc@in.tum.de>
parents:
2009
diff
changeset
|
395 |
oops |
2725853f43b9
solved the problem with equivariance by first eta-normalising the goal
Christian Urban <urbanc@in.tum.de>
parents:
2009
diff
changeset
|
396 |
|
2080
0532006ec7ec
added eqvt-lemma for split; changed semantics of perm_simp: excluded stands for constants about which no complaint is written out...eqvt_apply is now always applied
Christian Urban <urbanc@in.tum.de>
parents:
2064
diff
changeset
|
397 |
lemma |
0532006ec7ec
added eqvt-lemma for split; changed semantics of perm_simp: excluded stands for constants about which no complaint is written out...eqvt_apply is now always applied
Christian Urban <urbanc@in.tum.de>
parents:
2064
diff
changeset
|
398 |
fixes P :: "('a::pt) \<Rightarrow> ('b::pt) \<Rightarrow> bool" |
0532006ec7ec
added eqvt-lemma for split; changed semantics of perm_simp: excluded stands for constants about which no complaint is written out...eqvt_apply is now always applied
Christian Urban <urbanc@in.tum.de>
parents:
2064
diff
changeset
|
399 |
shows "p \<bullet> (\<lambda>(a, b). P a b) = (\<lambda>(a, b). (p \<bullet> P) a b)" |
0532006ec7ec
added eqvt-lemma for split; changed semantics of perm_simp: excluded stands for constants about which no complaint is written out...eqvt_apply is now always applied
Christian Urban <urbanc@in.tum.de>
parents:
2064
diff
changeset
|
400 |
apply(perm_simp) |
0532006ec7ec
added eqvt-lemma for split; changed semantics of perm_simp: excluded stands for constants about which no complaint is written out...eqvt_apply is now always applied
Christian Urban <urbanc@in.tum.de>
parents:
2064
diff
changeset
|
401 |
oops |
0532006ec7ec
added eqvt-lemma for split; changed semantics of perm_simp: excluded stands for constants about which no complaint is written out...eqvt_apply is now always applied
Christian Urban <urbanc@in.tum.de>
parents:
2064
diff
changeset
|
402 |
|
1953
186d8486dfd5
rewrote eqvts_raw to be a symtab, that can be looked up
Christian Urban <urbanc@in.tum.de>
parents:
1947
diff
changeset
|
403 |
thm eqvts |
186d8486dfd5
rewrote eqvts_raw to be a symtab, that can be looked up
Christian Urban <urbanc@in.tum.de>
parents:
1947
diff
changeset
|
404 |
thm eqvts_raw |
186d8486dfd5
rewrote eqvts_raw to be a symtab, that can be looked up
Christian Urban <urbanc@in.tum.de>
parents:
1947
diff
changeset
|
405 |
|
1995
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
406 |
ML {* Nominal_ThmDecls.is_eqvt @{context} @{term "supp"} *} |
1953
186d8486dfd5
rewrote eqvts_raw to be a symtab, that can be looked up
Christian Urban <urbanc@in.tum.de>
parents:
1947
diff
changeset
|
407 |
|
186d8486dfd5
rewrote eqvts_raw to be a symtab, that can be looked up
Christian Urban <urbanc@in.tum.de>
parents:
1947
diff
changeset
|
408 |
|
2009
4f7d7cbd4bc8
removed duplicate eqvt attribute
Christian Urban <urbanc@in.tum.de>
parents:
2002
diff
changeset
|
409 |
section {* Automatic equivariance procedure for inductive definitions *} |
1995
652f310f0dba
reorganised eqvt-file (now uses perm_simp already)
Christian Urban <urbanc@in.tum.de>
parents:
1971
diff
changeset
|
410 |
|
1835
636de31888a6
tuned and removed dead code
Christian Urban <urbanc@in.tum.de>
parents:
1833
diff
changeset
|
411 |
use "nominal_eqvt.ML" |
1833
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
1827
diff
changeset
|
412 |
|
1315
43d6e3730353
Add image_eqvt and atom_eqvt to eqvt bases.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1258
diff
changeset
|
413 |
end |