author | traytel |
Thu, 08 Aug 2013 12:01:02 +0200 | |
changeset 52905 | 41ebc19276ea |
parent 49834 | b27bbb021df1 |
child 54489 | 03ff4d1e6784 |
permissions | -rw-r--r-- |
19494 | 1 |
theory Nominal |
41413
64cd30d6b0b8
explicit file specifications -- avoid secondary load path;
wenzelm
parents:
39777
diff
changeset
|
2 |
imports Main "~~/src/HOL/Library/Infinite_Set" |
46950
d0181abdbdac
declare command keywords via theory header, including strict checking outside Pure;
wenzelm
parents:
46947
diff
changeset
|
3 |
keywords |
d0181abdbdac
declare command keywords via theory header, including strict checking outside Pure;
wenzelm
parents:
46947
diff
changeset
|
4 |
"atom_decl" "nominal_datatype" "equivariance" :: thy_decl and |
d0181abdbdac
declare command keywords via theory header, including strict checking outside Pure;
wenzelm
parents:
46947
diff
changeset
|
5 |
"nominal_primrec" "nominal_inductive" "nominal_inductive2" :: thy_goal and |
d0181abdbdac
declare command keywords via theory header, including strict checking outside Pure;
wenzelm
parents:
46947
diff
changeset
|
6 |
"avoids" |
44689 | 7 |
begin |
17870 | 8 |
|
9 |
section {* Permutations *} |
|
10 |
(*======================*) |
|
11 |
||
41798 | 12 |
type_synonym |
17870 | 13 |
'x prm = "('x \<times> 'x) list" |
14 |
||
30990
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
15 |
(* polymorphic constants for permutation and swapping *) |
17870 | 16 |
consts |
18491 | 17 |
perm :: "'x prm \<Rightarrow> 'a \<Rightarrow> 'a" (infixr "\<bullet>" 80) |
17870 | 18 |
swap :: "('x \<times> 'x) \<Rightarrow> 'x \<Rightarrow> 'x" |
19 |
||
30983
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
20 |
(* a "private" copy of the option type used in the abstraction function *) |
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
21 |
datatype 'a noption = nSome 'a | nNone |
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
22 |
|
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
23 |
(* a "private" copy of the product type used in the nominal induct method *) |
44689 | 24 |
datatype ('a, 'b) nprod = nPair 'a 'b |
30983
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
25 |
|
24544 | 26 |
(* an auxiliary constant for the decision procedure involving *) |
30983
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
27 |
(* permutations (to avoid loops when using perm-compositions) *) |
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
32960
diff
changeset
|
28 |
definition |
44683 | 29 |
"perm_aux pi x = pi\<bullet>x" |
19477 | 30 |
|
30990
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
31 |
(* overloaded permutation operations *) |
30983
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
32 |
overloading |
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
33 |
perm_fun \<equiv> "perm :: 'x prm \<Rightarrow> ('a\<Rightarrow>'b) \<Rightarrow> ('a\<Rightarrow>'b)" (unchecked) |
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
34 |
perm_bool \<equiv> "perm :: 'x prm \<Rightarrow> bool \<Rightarrow> bool" (unchecked) |
45961 | 35 |
perm_set \<equiv> "perm :: 'x prm \<Rightarrow> 'a set \<Rightarrow> 'a set" (unchecked) |
30983
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
36 |
perm_unit \<equiv> "perm :: 'x prm \<Rightarrow> unit \<Rightarrow> unit" (unchecked) |
44689 | 37 |
perm_prod \<equiv> "perm :: 'x prm \<Rightarrow> ('a\<times>'b) \<Rightarrow> ('a\<times>'b)" (unchecked) |
30983
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
38 |
perm_list \<equiv> "perm :: 'x prm \<Rightarrow> 'a list \<Rightarrow> 'a list" (unchecked) |
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
39 |
perm_option \<equiv> "perm :: 'x prm \<Rightarrow> 'a option \<Rightarrow> 'a option" (unchecked) |
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
40 |
perm_char \<equiv> "perm :: 'x prm \<Rightarrow> char \<Rightarrow> char" (unchecked) |
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
41 |
perm_nat \<equiv> "perm :: 'x prm \<Rightarrow> nat \<Rightarrow> nat" (unchecked) |
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
42 |
perm_int \<equiv> "perm :: 'x prm \<Rightarrow> int \<Rightarrow> int" (unchecked) |
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
43 |
|
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
44 |
perm_noption \<equiv> "perm :: 'x prm \<Rightarrow> 'a noption \<Rightarrow> 'a noption" (unchecked) |
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
45 |
perm_nprod \<equiv> "perm :: 'x prm \<Rightarrow> ('a, 'b) nprod \<Rightarrow> ('a, 'b) nprod" (unchecked) |
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
46 |
begin |
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
47 |
|
44838 | 48 |
definition perm_fun :: "'x prm \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'b" where |
44833 | 49 |
"perm_fun pi f = (\<lambda>x. pi \<bullet> f (rev pi \<bullet> x))" |
44683 | 50 |
|
44689 | 51 |
definition perm_bool :: "'x prm \<Rightarrow> bool \<Rightarrow> bool" where |
44833 | 52 |
"perm_bool pi b = b" |
30983
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
53 |
|
45961 | 54 |
definition perm_set :: "'x prm \<Rightarrow> 'a set \<Rightarrow> 'a set" where |
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
55 |
"perm_set pi X = {pi \<bullet> x | x. x \<in> X}" |
45961 | 56 |
|
44683 | 57 |
primrec perm_unit :: "'x prm \<Rightarrow> unit \<Rightarrow> unit" where |
30983
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
58 |
"perm_unit pi () = ()" |
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
59 |
|
44683 | 60 |
primrec perm_prod :: "'x prm \<Rightarrow> ('a\<times>'b) \<Rightarrow> ('a\<times>'b)" where |
44833 | 61 |
"perm_prod pi (x, y) = (pi\<bullet>x, pi\<bullet>y)" |
30983
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
62 |
|
44683 | 63 |
primrec perm_list :: "'x prm \<Rightarrow> 'a list \<Rightarrow> 'a list" where |
30983
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
64 |
nil_eqvt: "perm_list pi [] = []" |
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
65 |
| cons_eqvt: "perm_list pi (x#xs) = (pi\<bullet>x)#(pi\<bullet>xs)" |
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
66 |
|
44683 | 67 |
primrec perm_option :: "'x prm \<Rightarrow> 'a option \<Rightarrow> 'a option" where |
30983
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
68 |
some_eqvt: "perm_option pi (Some x) = Some (pi\<bullet>x)" |
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
69 |
| none_eqvt: "perm_option pi None = None" |
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
70 |
|
44683 | 71 |
definition perm_char :: "'x prm \<Rightarrow> char \<Rightarrow> char" where |
44833 | 72 |
"perm_char pi c = c" |
44683 | 73 |
|
74 |
definition perm_nat :: "'x prm \<Rightarrow> nat \<Rightarrow> nat" where |
|
44833 | 75 |
"perm_nat pi i = i" |
44683 | 76 |
|
77 |
definition perm_int :: "'x prm \<Rightarrow> int \<Rightarrow> int" where |
|
44833 | 78 |
"perm_int pi i = i" |
44683 | 79 |
|
80 |
primrec perm_noption :: "'x prm \<Rightarrow> 'a noption \<Rightarrow> 'a noption" where |
|
30983
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
81 |
nsome_eqvt: "perm_noption pi (nSome x) = nSome (pi\<bullet>x)" |
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
82 |
| nnone_eqvt: "perm_noption pi nNone = nNone" |
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
83 |
|
44683 | 84 |
primrec perm_nprod :: "'x prm \<Rightarrow> ('a, 'b) nprod \<Rightarrow> ('a, 'b) nprod" where |
30983
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
85 |
"perm_nprod pi (nPair x y) = nPair (pi\<bullet>x) (pi\<bullet>y)" |
44683 | 86 |
|
30983
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
87 |
end |
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
88 |
|
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
89 |
(* permutations on booleans *) |
44689 | 90 |
lemmas perm_bool = perm_bool_def |
91 |
||
92 |
lemma true_eqvt [simp]: |
|
93 |
"pi \<bullet> True \<longleftrightarrow> True" |
|
94 |
by (simp add: perm_bool_def) |
|
95 |
||
96 |
lemma false_eqvt [simp]: |
|
97 |
"pi \<bullet> False \<longleftrightarrow> False" |
|
98 |
by (simp add: perm_bool_def) |
|
18264 | 99 |
|
19972
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
100 |
lemma perm_boolI: |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
101 |
assumes a: "P" |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
102 |
shows "pi\<bullet>P" |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
103 |
using a by (simp add: perm_bool) |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
104 |
|
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
105 |
lemma perm_boolE: |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
106 |
assumes a: "pi\<bullet>P" |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
107 |
shows "P" |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
108 |
using a by (simp add: perm_bool) |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
109 |
|
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
110 |
lemma if_eqvt: |
21010
7fe928722821
added the missing freshness-lemmas for nat, int, char and string and
urbanc
parents:
20809
diff
changeset
|
111 |
fixes pi::"'a prm" |
7fe928722821
added the missing freshness-lemmas for nat, int, char and string and
urbanc
parents:
20809
diff
changeset
|
112 |
shows "pi\<bullet>(if b then c1 else c2) = (if (pi\<bullet>b) then (pi\<bullet>c1) else (pi\<bullet>c2))" |
30983
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
113 |
by (simp add: perm_fun_def) |
21010
7fe928722821
added the missing freshness-lemmas for nat, int, char and string and
urbanc
parents:
20809
diff
changeset
|
114 |
|
22514 | 115 |
lemma imp_eqvt: |
116 |
shows "pi\<bullet>(A\<longrightarrow>B) = ((pi\<bullet>A)\<longrightarrow>(pi\<bullet>B))" |
|
117 |
by (simp add: perm_bool) |
|
118 |
||
119 |
lemma conj_eqvt: |
|
120 |
shows "pi\<bullet>(A\<and>B) = ((pi\<bullet>A)\<and>(pi\<bullet>B))" |
|
121 |
by (simp add: perm_bool) |
|
122 |
||
123 |
lemma disj_eqvt: |
|
124 |
shows "pi\<bullet>(A\<or>B) = ((pi\<bullet>A)\<or>(pi\<bullet>B))" |
|
125 |
by (simp add: perm_bool) |
|
126 |
||
127 |
lemma neg_eqvt: |
|
128 |
shows "pi\<bullet>(\<not> A) = (\<not> (pi\<bullet>A))" |
|
129 |
by (simp add: perm_bool) |
|
130 |
||
26806 | 131 |
(* permutation on sets *) |
132 |
lemma empty_eqvt: |
|
133 |
shows "pi\<bullet>{} = {}" |
|
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
134 |
by (simp add: perm_set_def) |
26806 | 135 |
|
136 |
lemma union_eqvt: |
|
137 |
shows "(pi\<bullet>(X\<union>Y)) = (pi\<bullet>X) \<union> (pi\<bullet>Y)" |
|
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
138 |
by (auto simp add: perm_set_def) |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
139 |
|
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
140 |
lemma insert_eqvt: |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
141 |
shows "pi\<bullet>(insert x X) = insert (pi\<bullet>x) (pi\<bullet>X)" |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
142 |
by (auto simp add: perm_set_def) |
26806 | 143 |
|
30983
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
144 |
(* permutations on products *) |
26806 | 145 |
lemma fst_eqvt: |
146 |
"pi\<bullet>(fst x) = fst (pi\<bullet>x)" |
|
147 |
by (cases x) simp |
|
148 |
||
149 |
lemma snd_eqvt: |
|
150 |
"pi\<bullet>(snd x) = snd (pi\<bullet>x)" |
|
151 |
by (cases x) simp |
|
152 |
||
153 |
(* permutation on lists *) |
|
154 |
lemma append_eqvt: |
|
155 |
fixes pi :: "'x prm" |
|
156 |
and l1 :: "'a list" |
|
157 |
and l2 :: "'a list" |
|
158 |
shows "pi\<bullet>(l1@l2) = (pi\<bullet>l1)@(pi\<bullet>l2)" |
|
159 |
by (induct l1) auto |
|
160 |
||
161 |
lemma rev_eqvt: |
|
162 |
fixes pi :: "'x prm" |
|
163 |
and l :: "'a list" |
|
164 |
shows "pi\<bullet>(rev l) = rev (pi\<bullet>l)" |
|
165 |
by (induct l) (simp_all add: append_eqvt) |
|
166 |
||
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
167 |
lemma set_eqvt: |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
168 |
fixes pi :: "'x prm" |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
169 |
and xs :: "'a list" |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
170 |
shows "pi\<bullet>(set xs) = set (pi\<bullet>xs)" |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
171 |
by (induct xs) (auto simp add: empty_eqvt insert_eqvt) |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
172 |
|
30983
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
173 |
(* permutation on characters and strings *) |
23050 | 174 |
lemma perm_string: |
175 |
fixes s::"string" |
|
176 |
shows "pi\<bullet>s = s" |
|
30983
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
177 |
by (induct s)(auto simp add: perm_char_def) |
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
178 |
|
17870 | 179 |
|
180 |
section {* permutation equality *} |
|
181 |
(*==============================*) |
|
182 |
||
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
32960
diff
changeset
|
183 |
definition prm_eq :: "'x prm \<Rightarrow> 'x prm \<Rightarrow> bool" (" _ \<triangleq> _ " [80,80] 80) where |
44683 | 184 |
"pi1 \<triangleq> pi2 \<longleftrightarrow> (\<forall>a::'x. pi1\<bullet>a = pi2\<bullet>a)" |
17870 | 185 |
|
186 |
section {* Support, Freshness and Supports*} |
|
187 |
(*========================================*) |
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
32960
diff
changeset
|
188 |
definition supp :: "'a \<Rightarrow> ('x set)" where |
44683 | 189 |
"supp x = {a . (infinite {b . [(a,b)]\<bullet>x \<noteq> x})}" |
17870 | 190 |
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
32960
diff
changeset
|
191 |
definition fresh :: "'x \<Rightarrow> 'a \<Rightarrow> bool" ("_ \<sharp> _" [80,80] 80) where |
44683 | 192 |
"a \<sharp> x \<longleftrightarrow> a \<notin> supp x" |
17870 | 193 |
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
32960
diff
changeset
|
194 |
definition supports :: "'x set \<Rightarrow> 'a \<Rightarrow> bool" (infixl "supports" 80) where |
44683 | 195 |
"S supports x \<longleftrightarrow> (\<forall>a b. (a\<notin>S \<and> b\<notin>S \<longrightarrow> [(a,b)]\<bullet>x=x))" |
17870 | 196 |
|
30990
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
197 |
(* lemmas about supp *) |
17870 | 198 |
lemma supp_fresh_iff: |
199 |
fixes x :: "'a" |
|
200 |
shows "(supp x) = {a::'x. \<not>a\<sharp>x}" |
|
30990
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
201 |
by (simp add: fresh_def) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
202 |
|
17870 | 203 |
lemma supp_unit: |
204 |
shows "supp () = {}" |
|
205 |
by (simp add: supp_def) |
|
206 |
||
18264 | 207 |
lemma supp_set_empty: |
208 |
shows "supp {} = {}" |
|
26806 | 209 |
by (force simp add: supp_def empty_eqvt) |
18264 | 210 |
|
17870 | 211 |
lemma supp_prod: |
212 |
fixes x :: "'a" |
|
213 |
and y :: "'b" |
|
214 |
shows "(supp (x,y)) = (supp x)\<union>(supp y)" |
|
215 |
by (force simp add: supp_def Collect_imp_eq Collect_neg_eq) |
|
216 |
||
18600 | 217 |
lemma supp_nprod: |
218 |
fixes x :: "'a" |
|
219 |
and y :: "'b" |
|
220 |
shows "(supp (nPair x y)) = (supp x)\<union>(supp y)" |
|
221 |
by (force simp add: supp_def Collect_imp_eq Collect_neg_eq) |
|
222 |
||
17870 | 223 |
lemma supp_list_nil: |
224 |
shows "supp [] = {}" |
|
44696 | 225 |
by (simp add: supp_def) |
17870 | 226 |
|
227 |
lemma supp_list_cons: |
|
228 |
fixes x :: "'a" |
|
229 |
and xs :: "'a list" |
|
230 |
shows "supp (x#xs) = (supp x)\<union>(supp xs)" |
|
30990
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
231 |
by (auto simp add: supp_def Collect_imp_eq Collect_neg_eq) |
17870 | 232 |
|
233 |
lemma supp_list_append: |
|
234 |
fixes xs :: "'a list" |
|
235 |
and ys :: "'a list" |
|
236 |
shows "supp (xs@ys) = (supp xs)\<union>(supp ys)" |
|
30990
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
237 |
by (induct xs) (auto simp add: supp_list_nil supp_list_cons) |
17870 | 238 |
|
239 |
lemma supp_list_rev: |
|
240 |
fixes xs :: "'a list" |
|
241 |
shows "supp (rev xs) = (supp xs)" |
|
242 |
by (induct xs, auto simp add: supp_list_append supp_list_cons supp_list_nil) |
|
243 |
||
244 |
lemma supp_bool: |
|
245 |
fixes x :: "bool" |
|
30983
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
246 |
shows "supp x = {}" |
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
247 |
by (cases "x") (simp_all add: supp_def) |
17870 | 248 |
|
249 |
lemma supp_some: |
|
250 |
fixes x :: "'a" |
|
251 |
shows "supp (Some x) = (supp x)" |
|
30983
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
252 |
by (simp add: supp_def) |
17870 | 253 |
|
254 |
lemma supp_none: |
|
255 |
fixes x :: "'a" |
|
256 |
shows "supp (None) = {}" |
|
30983
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
257 |
by (simp add: supp_def) |
17870 | 258 |
|
259 |
lemma supp_int: |
|
260 |
fixes i::"int" |
|
261 |
shows "supp (i) = {}" |
|
30983
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
262 |
by (simp add: supp_def perm_int_def) |
17870 | 263 |
|
20388 | 264 |
lemma supp_nat: |
265 |
fixes n::"nat" |
|
30983
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
266 |
shows "(supp n) = {}" |
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
267 |
by (simp add: supp_def perm_nat_def) |
20388 | 268 |
|
18627 | 269 |
lemma supp_char: |
270 |
fixes c::"char" |
|
30983
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
271 |
shows "(supp c) = {}" |
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
272 |
by (simp add: supp_def perm_char_def) |
18627 | 273 |
|
274 |
lemma supp_string: |
|
275 |
fixes s::"string" |
|
30983
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
276 |
shows "(supp s) = {}" |
e54777ab68bd
adapted permutation functions to new overloading syntax (the functions are still "unchecked" because they are used in conjunction with type-classes)
Christian Urban <urbanc@in.tum.de>
parents:
30242
diff
changeset
|
277 |
by (simp add: supp_def perm_string) |
18627 | 278 |
|
30990
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
279 |
(* lemmas about freshness *) |
18264 | 280 |
lemma fresh_set_empty: |
281 |
shows "a\<sharp>{}" |
|
282 |
by (simp add: fresh_def supp_set_empty) |
|
283 |
||
19858 | 284 |
lemma fresh_unit: |
285 |
shows "a\<sharp>()" |
|
286 |
by (simp add: fresh_def supp_unit) |
|
287 |
||
17870 | 288 |
lemma fresh_prod: |
289 |
fixes a :: "'x" |
|
290 |
and x :: "'a" |
|
291 |
and y :: "'b" |
|
292 |
shows "a\<sharp>(x,y) = (a\<sharp>x \<and> a\<sharp>y)" |
|
293 |
by (simp add: fresh_def supp_prod) |
|
294 |
||
295 |
lemma fresh_list_nil: |
|
296 |
fixes a :: "'x" |
|
18264 | 297 |
shows "a\<sharp>[]" |
17870 | 298 |
by (simp add: fresh_def supp_list_nil) |
299 |
||
300 |
lemma fresh_list_cons: |
|
301 |
fixes a :: "'x" |
|
302 |
and x :: "'a" |
|
303 |
and xs :: "'a list" |
|
304 |
shows "a\<sharp>(x#xs) = (a\<sharp>x \<and> a\<sharp>xs)" |
|
305 |
by (simp add: fresh_def supp_list_cons) |
|
306 |
||
307 |
lemma fresh_list_append: |
|
308 |
fixes a :: "'x" |
|
309 |
and xs :: "'a list" |
|
310 |
and ys :: "'a list" |
|
311 |
shows "a\<sharp>(xs@ys) = (a\<sharp>xs \<and> a\<sharp>ys)" |
|
312 |
by (simp add: fresh_def supp_list_append) |
|
313 |
||
314 |
lemma fresh_list_rev: |
|
315 |
fixes a :: "'x" |
|
316 |
and xs :: "'a list" |
|
317 |
shows "a\<sharp>(rev xs) = a\<sharp>xs" |
|
318 |
by (simp add: fresh_def supp_list_rev) |
|
319 |
||
320 |
lemma fresh_none: |
|
321 |
fixes a :: "'x" |
|
322 |
shows "a\<sharp>None" |
|
22831
18f4014e1259
tuned some of the proofs and added the lemma fresh_bool
urbanc
parents:
22829
diff
changeset
|
323 |
by (simp add: fresh_def supp_none) |
17870 | 324 |
|
325 |
lemma fresh_some: |
|
326 |
fixes a :: "'x" |
|
327 |
and x :: "'a" |
|
328 |
shows "a\<sharp>(Some x) = a\<sharp>x" |
|
22831
18f4014e1259
tuned some of the proofs and added the lemma fresh_bool
urbanc
parents:
22829
diff
changeset
|
329 |
by (simp add: fresh_def supp_some) |
17870 | 330 |
|
21010
7fe928722821
added the missing freshness-lemmas for nat, int, char and string and
urbanc
parents:
20809
diff
changeset
|
331 |
lemma fresh_int: |
7fe928722821
added the missing freshness-lemmas for nat, int, char and string and
urbanc
parents:
20809
diff
changeset
|
332 |
fixes a :: "'x" |
7fe928722821
added the missing freshness-lemmas for nat, int, char and string and
urbanc
parents:
20809
diff
changeset
|
333 |
and i :: "int" |
7fe928722821
added the missing freshness-lemmas for nat, int, char and string and
urbanc
parents:
20809
diff
changeset
|
334 |
shows "a\<sharp>i" |
22831
18f4014e1259
tuned some of the proofs and added the lemma fresh_bool
urbanc
parents:
22829
diff
changeset
|
335 |
by (simp add: fresh_def supp_int) |
21010
7fe928722821
added the missing freshness-lemmas for nat, int, char and string and
urbanc
parents:
20809
diff
changeset
|
336 |
|
7fe928722821
added the missing freshness-lemmas for nat, int, char and string and
urbanc
parents:
20809
diff
changeset
|
337 |
lemma fresh_nat: |
7fe928722821
added the missing freshness-lemmas for nat, int, char and string and
urbanc
parents:
20809
diff
changeset
|
338 |
fixes a :: "'x" |
7fe928722821
added the missing freshness-lemmas for nat, int, char and string and
urbanc
parents:
20809
diff
changeset
|
339 |
and n :: "nat" |
7fe928722821
added the missing freshness-lemmas for nat, int, char and string and
urbanc
parents:
20809
diff
changeset
|
340 |
shows "a\<sharp>n" |
22831
18f4014e1259
tuned some of the proofs and added the lemma fresh_bool
urbanc
parents:
22829
diff
changeset
|
341 |
by (simp add: fresh_def supp_nat) |
21010
7fe928722821
added the missing freshness-lemmas for nat, int, char and string and
urbanc
parents:
20809
diff
changeset
|
342 |
|
7fe928722821
added the missing freshness-lemmas for nat, int, char and string and
urbanc
parents:
20809
diff
changeset
|
343 |
lemma fresh_char: |
7fe928722821
added the missing freshness-lemmas for nat, int, char and string and
urbanc
parents:
20809
diff
changeset
|
344 |
fixes a :: "'x" |
7fe928722821
added the missing freshness-lemmas for nat, int, char and string and
urbanc
parents:
20809
diff
changeset
|
345 |
and c :: "char" |
7fe928722821
added the missing freshness-lemmas for nat, int, char and string and
urbanc
parents:
20809
diff
changeset
|
346 |
shows "a\<sharp>c" |
22831
18f4014e1259
tuned some of the proofs and added the lemma fresh_bool
urbanc
parents:
22829
diff
changeset
|
347 |
by (simp add: fresh_def supp_char) |
21010
7fe928722821
added the missing freshness-lemmas for nat, int, char and string and
urbanc
parents:
20809
diff
changeset
|
348 |
|
7fe928722821
added the missing freshness-lemmas for nat, int, char and string and
urbanc
parents:
20809
diff
changeset
|
349 |
lemma fresh_string: |
7fe928722821
added the missing freshness-lemmas for nat, int, char and string and
urbanc
parents:
20809
diff
changeset
|
350 |
fixes a :: "'x" |
7fe928722821
added the missing freshness-lemmas for nat, int, char and string and
urbanc
parents:
20809
diff
changeset
|
351 |
and s :: "string" |
7fe928722821
added the missing freshness-lemmas for nat, int, char and string and
urbanc
parents:
20809
diff
changeset
|
352 |
shows "a\<sharp>s" |
22831
18f4014e1259
tuned some of the proofs and added the lemma fresh_bool
urbanc
parents:
22829
diff
changeset
|
353 |
by (simp add: fresh_def supp_string) |
18f4014e1259
tuned some of the proofs and added the lemma fresh_bool
urbanc
parents:
22829
diff
changeset
|
354 |
|
18f4014e1259
tuned some of the proofs and added the lemma fresh_bool
urbanc
parents:
22829
diff
changeset
|
355 |
lemma fresh_bool: |
18f4014e1259
tuned some of the proofs and added the lemma fresh_bool
urbanc
parents:
22829
diff
changeset
|
356 |
fixes a :: "'x" |
18f4014e1259
tuned some of the proofs and added the lemma fresh_bool
urbanc
parents:
22829
diff
changeset
|
357 |
and b :: "bool" |
18f4014e1259
tuned some of the proofs and added the lemma fresh_bool
urbanc
parents:
22829
diff
changeset
|
358 |
shows "a\<sharp>b" |
18f4014e1259
tuned some of the proofs and added the lemma fresh_bool
urbanc
parents:
22829
diff
changeset
|
359 |
by (simp add: fresh_def supp_bool) |
21010
7fe928722821
added the missing freshness-lemmas for nat, int, char and string and
urbanc
parents:
20809
diff
changeset
|
360 |
|
18294
bbfd64cc91ab
fresh_unit_elim and fresh_prod_elim -- for nominal_induct;
wenzelm
parents:
18268
diff
changeset
|
361 |
text {* Normalization of freshness results; cf.\ @{text nominal_induct} *} |
21377
c29146dc14f1
replaced exists_fresh lemma with a version formulated with obtains;
urbanc
parents:
21318
diff
changeset
|
362 |
lemma fresh_unit_elim: |
c29146dc14f1
replaced exists_fresh lemma with a version formulated with obtains;
urbanc
parents:
21318
diff
changeset
|
363 |
shows "(a\<sharp>() \<Longrightarrow> PROP C) \<equiv> PROP C" |
18294
bbfd64cc91ab
fresh_unit_elim and fresh_prod_elim -- for nominal_induct;
wenzelm
parents:
18268
diff
changeset
|
364 |
by (simp add: fresh_def supp_unit) |
bbfd64cc91ab
fresh_unit_elim and fresh_prod_elim -- for nominal_induct;
wenzelm
parents:
18268
diff
changeset
|
365 |
|
21377
c29146dc14f1
replaced exists_fresh lemma with a version formulated with obtains;
urbanc
parents:
21318
diff
changeset
|
366 |
lemma fresh_prod_elim: |
c29146dc14f1
replaced exists_fresh lemma with a version formulated with obtains;
urbanc
parents:
21318
diff
changeset
|
367 |
shows "(a\<sharp>(x,y) \<Longrightarrow> PROP C) \<equiv> (a\<sharp>x \<Longrightarrow> a\<sharp>y \<Longrightarrow> PROP C)" |
18294
bbfd64cc91ab
fresh_unit_elim and fresh_prod_elim -- for nominal_induct;
wenzelm
parents:
18268
diff
changeset
|
368 |
by rule (simp_all add: fresh_prod) |
bbfd64cc91ab
fresh_unit_elim and fresh_prod_elim -- for nominal_induct;
wenzelm
parents:
18268
diff
changeset
|
369 |
|
21405
26b51f724fe6
added an intro lemma for freshness of products; set up
urbanc
parents:
21377
diff
changeset
|
370 |
(* this rule needs to be added before the fresh_prodD is *) |
26b51f724fe6
added an intro lemma for freshness of products; set up
urbanc
parents:
21377
diff
changeset
|
371 |
(* added to the simplifier with mksimps *) |
26b51f724fe6
added an intro lemma for freshness of products; set up
urbanc
parents:
21377
diff
changeset
|
372 |
lemma [simp]: |
26b51f724fe6
added an intro lemma for freshness of products; set up
urbanc
parents:
21377
diff
changeset
|
373 |
shows "a\<sharp>x1 \<Longrightarrow> a\<sharp>x2 \<Longrightarrow> a\<sharp>(x1,x2)" |
26b51f724fe6
added an intro lemma for freshness of products; set up
urbanc
parents:
21377
diff
changeset
|
374 |
by (simp add: fresh_prod) |
26b51f724fe6
added an intro lemma for freshness of products; set up
urbanc
parents:
21377
diff
changeset
|
375 |
|
21318
edb595802d22
added fresh_prodD, which is included fresh_prodD into mksimps setup;
wenzelm
parents:
21010
diff
changeset
|
376 |
lemma fresh_prodD: |
21377
c29146dc14f1
replaced exists_fresh lemma with a version formulated with obtains;
urbanc
parents:
21318
diff
changeset
|
377 |
shows "a\<sharp>(x,y) \<Longrightarrow> a\<sharp>x" |
c29146dc14f1
replaced exists_fresh lemma with a version formulated with obtains;
urbanc
parents:
21318
diff
changeset
|
378 |
and "a\<sharp>(x,y) \<Longrightarrow> a\<sharp>y" |
21318
edb595802d22
added fresh_prodD, which is included fresh_prodD into mksimps setup;
wenzelm
parents:
21010
diff
changeset
|
379 |
by (simp_all add: fresh_prod) |
edb595802d22
added fresh_prodD, which is included fresh_prodD into mksimps setup;
wenzelm
parents:
21010
diff
changeset
|
380 |
|
26342 | 381 |
ML {* |
382 |
val mksimps_pairs = (@{const_name Nominal.fresh}, @{thms fresh_prodD}) :: mksimps_pairs; |
|
383 |
*} |
|
384 |
declaration {* fn _ => |
|
45625
750c5a47400b
modernized some old-style infix operations, which were left over from the time of ML proof scripts;
wenzelm
parents:
44838
diff
changeset
|
385 |
Simplifier.map_ss (Simplifier.set_mksimps (mksimps mksimps_pairs)) |
21318
edb595802d22
added fresh_prodD, which is included fresh_prodD into mksimps setup;
wenzelm
parents:
21010
diff
changeset
|
386 |
*} |
edb595802d22
added fresh_prodD, which is included fresh_prodD into mksimps setup;
wenzelm
parents:
21010
diff
changeset
|
387 |
|
17870 | 388 |
section {* Abstract Properties for Permutations and Atoms *} |
389 |
(*=========================================================*) |
|
390 |
||
391 |
(* properties for being a permutation type *) |
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
32960
diff
changeset
|
392 |
definition |
17870 | 393 |
"pt TYPE('a) TYPE('x) \<equiv> |
394 |
(\<forall>(x::'a). ([]::'x prm)\<bullet>x = x) \<and> |
|
395 |
(\<forall>(pi1::'x prm) (pi2::'x prm) (x::'a). (pi1@pi2)\<bullet>x = pi1\<bullet>(pi2\<bullet>x)) \<and> |
|
18295
dd50de393330
changed \<sim> of permutation equality to \<triangleq>
urbanc
parents:
18294
diff
changeset
|
396 |
(\<forall>(pi1::'x prm) (pi2::'x prm) (x::'a). pi1 \<triangleq> pi2 \<longrightarrow> pi1\<bullet>x = pi2\<bullet>x)" |
17870 | 397 |
|
398 |
(* properties for being an atom type *) |
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
32960
diff
changeset
|
399 |
definition |
17870 | 400 |
"at TYPE('x) \<equiv> |
401 |
(\<forall>(x::'x). ([]::'x prm)\<bullet>x = x) \<and> |
|
402 |
(\<forall>(a::'x) (b::'x) (pi::'x prm) (x::'x). ((a,b)#(pi::'x prm))\<bullet>x = swap (a,b) (pi\<bullet>x)) \<and> |
|
403 |
(\<forall>(a::'x) (b::'x) (c::'x). swap (a,b) c = (if a=c then b else (if b=c then a else c))) \<and> |
|
404 |
(infinite (UNIV::'x set))" |
|
405 |
||
406 |
(* property of two atom-types being disjoint *) |
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
32960
diff
changeset
|
407 |
definition |
17870 | 408 |
"disjoint TYPE('x) TYPE('y) \<equiv> |
409 |
(\<forall>(pi::'x prm)(x::'y). pi\<bullet>x = x) \<and> |
|
410 |
(\<forall>(pi::'y prm)(x::'x). pi\<bullet>x = x)" |
|
411 |
||
412 |
(* composition property of two permutation on a type 'a *) |
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
32960
diff
changeset
|
413 |
definition |
17870 | 414 |
"cp TYPE ('a) TYPE('x) TYPE('y) \<equiv> |
415 |
(\<forall>(pi2::'y prm) (pi1::'x prm) (x::'a) . pi1\<bullet>(pi2\<bullet>x) = (pi1\<bullet>pi2)\<bullet>(pi1\<bullet>x))" |
|
416 |
||
417 |
(* property of having finite support *) |
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
32960
diff
changeset
|
418 |
definition |
17870 | 419 |
"fs TYPE('a) TYPE('x) \<equiv> \<forall>(x::'a). finite ((supp x)::'x set)" |
420 |
||
421 |
section {* Lemmas about the atom-type properties*} |
|
422 |
(*==============================================*) |
|
423 |
||
424 |
lemma at1: |
|
425 |
fixes x::"'x" |
|
426 |
assumes a: "at TYPE('x)" |
|
427 |
shows "([]::'x prm)\<bullet>x = x" |
|
428 |
using a by (simp add: at_def) |
|
429 |
||
430 |
lemma at2: |
|
431 |
fixes a ::"'x" |
|
432 |
and b ::"'x" |
|
433 |
and x ::"'x" |
|
434 |
and pi::"'x prm" |
|
435 |
assumes a: "at TYPE('x)" |
|
436 |
shows "((a,b)#pi)\<bullet>x = swap (a,b) (pi\<bullet>x)" |
|
437 |
using a by (simp only: at_def) |
|
438 |
||
439 |
lemma at3: |
|
440 |
fixes a ::"'x" |
|
441 |
and b ::"'x" |
|
442 |
and c ::"'x" |
|
443 |
assumes a: "at TYPE('x)" |
|
444 |
shows "swap (a,b) c = (if a=c then b else (if b=c then a else c))" |
|
445 |
using a by (simp only: at_def) |
|
446 |
||
30990
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
447 |
(* rules to calculate simple permutations *) |
17870 | 448 |
lemmas at_calc = at2 at1 at3 |
449 |
||
22610 | 450 |
lemma at_swap_simps: |
451 |
fixes a ::"'x" |
|
452 |
and b ::"'x" |
|
453 |
assumes a: "at TYPE('x)" |
|
454 |
shows "[(a,b)]\<bullet>a = b" |
|
455 |
and "[(a,b)]\<bullet>b = a" |
|
27374 | 456 |
and "\<lbrakk>a\<noteq>c; b\<noteq>c\<rbrakk> \<Longrightarrow> [(a,b)]\<bullet>c = c" |
22610 | 457 |
using a by (simp_all add: at_calc) |
458 |
||
17870 | 459 |
lemma at4: |
460 |
assumes a: "at TYPE('x)" |
|
461 |
shows "infinite (UNIV::'x set)" |
|
462 |
using a by (simp add: at_def) |
|
463 |
||
464 |
lemma at_append: |
|
465 |
fixes pi1 :: "'x prm" |
|
466 |
and pi2 :: "'x prm" |
|
467 |
and c :: "'x" |
|
468 |
assumes at: "at TYPE('x)" |
|
469 |
shows "(pi1@pi2)\<bullet>c = pi1\<bullet>(pi2\<bullet>c)" |
|
470 |
proof (induct pi1) |
|
471 |
case Nil show ?case by (simp add: at1[OF at]) |
|
472 |
next |
|
473 |
case (Cons x xs) |
|
18053
2719a6b7d95e
some minor tweaks in some proofs (nothing extraordinary)
urbanc
parents:
18048
diff
changeset
|
474 |
have "(xs@pi2)\<bullet>c = xs\<bullet>(pi2\<bullet>c)" by fact |
2719a6b7d95e
some minor tweaks in some proofs (nothing extraordinary)
urbanc
parents:
18048
diff
changeset
|
475 |
also have "(x#xs)@pi2 = x#(xs@pi2)" by simp |
2719a6b7d95e
some minor tweaks in some proofs (nothing extraordinary)
urbanc
parents:
18048
diff
changeset
|
476 |
ultimately show ?case by (cases "x", simp add: at2[OF at]) |
17870 | 477 |
qed |
478 |
||
479 |
lemma at_swap: |
|
480 |
fixes a :: "'x" |
|
481 |
and b :: "'x" |
|
482 |
and c :: "'x" |
|
483 |
assumes at: "at TYPE('x)" |
|
484 |
shows "swap (a,b) (swap (a,b) c) = c" |
|
485 |
by (auto simp add: at3[OF at]) |
|
486 |
||
487 |
lemma at_rev_pi: |
|
488 |
fixes pi :: "'x prm" |
|
489 |
and c :: "'x" |
|
490 |
assumes at: "at TYPE('x)" |
|
491 |
shows "(rev pi)\<bullet>(pi\<bullet>c) = c" |
|
492 |
proof(induct pi) |
|
493 |
case Nil show ?case by (simp add: at1[OF at]) |
|
494 |
next |
|
495 |
case (Cons x xs) thus ?case |
|
496 |
by (cases "x", simp add: at2[OF at] at_append[OF at] at1[OF at] at_swap[OF at]) |
|
497 |
qed |
|
498 |
||
499 |
lemma at_pi_rev: |
|
500 |
fixes pi :: "'x prm" |
|
501 |
and x :: "'x" |
|
502 |
assumes at: "at TYPE('x)" |
|
503 |
shows "pi\<bullet>((rev pi)\<bullet>x) = x" |
|
504 |
by (rule at_rev_pi[OF at, of "rev pi" _,simplified]) |
|
505 |
||
506 |
lemma at_bij1: |
|
507 |
fixes pi :: "'x prm" |
|
508 |
and x :: "'x" |
|
509 |
and y :: "'x" |
|
510 |
assumes at: "at TYPE('x)" |
|
511 |
and a: "(pi\<bullet>x) = y" |
|
512 |
shows "x=(rev pi)\<bullet>y" |
|
513 |
proof - |
|
514 |
from a have "y=(pi\<bullet>x)" by (rule sym) |
|
515 |
thus ?thesis by (simp only: at_rev_pi[OF at]) |
|
516 |
qed |
|
517 |
||
518 |
lemma at_bij2: |
|
519 |
fixes pi :: "'x prm" |
|
520 |
and x :: "'x" |
|
521 |
and y :: "'x" |
|
522 |
assumes at: "at TYPE('x)" |
|
523 |
and a: "((rev pi)\<bullet>x) = y" |
|
524 |
shows "x=pi\<bullet>y" |
|
525 |
proof - |
|
526 |
from a have "y=((rev pi)\<bullet>x)" by (rule sym) |
|
527 |
thus ?thesis by (simp only: at_pi_rev[OF at]) |
|
528 |
qed |
|
529 |
||
530 |
lemma at_bij: |
|
531 |
fixes pi :: "'x prm" |
|
532 |
and x :: "'x" |
|
533 |
and y :: "'x" |
|
534 |
assumes at: "at TYPE('x)" |
|
535 |
shows "(pi\<bullet>x = pi\<bullet>y) = (x=y)" |
|
536 |
proof |
|
537 |
assume "pi\<bullet>x = pi\<bullet>y" |
|
538 |
hence "x=(rev pi)\<bullet>(pi\<bullet>y)" by (rule at_bij1[OF at]) |
|
539 |
thus "x=y" by (simp only: at_rev_pi[OF at]) |
|
540 |
next |
|
541 |
assume "x=y" |
|
542 |
thus "pi\<bullet>x = pi\<bullet>y" by simp |
|
543 |
qed |
|
544 |
||
545 |
lemma at_supp: |
|
546 |
fixes x :: "'x" |
|
547 |
assumes at: "at TYPE('x)" |
|
548 |
shows "supp x = {x}" |
|
29903 | 549 |
by(auto simp: supp_def Collect_conj_eq Collect_imp_eq at_calc[OF at] at4[OF at]) |
17870 | 550 |
|
551 |
lemma at_fresh: |
|
552 |
fixes a :: "'x" |
|
553 |
and b :: "'x" |
|
554 |
assumes at: "at TYPE('x)" |
|
555 |
shows "(a\<sharp>b) = (a\<noteq>b)" |
|
556 |
by (simp add: at_supp[OF at] fresh_def) |
|
557 |
||
26766
0e2a29a1065c
polished the proof for atm_prm_fresh and more lemmas for fresh_star
urbanc
parents:
26522
diff
changeset
|
558 |
lemma at_prm_fresh1: |
0e2a29a1065c
polished the proof for atm_prm_fresh and more lemmas for fresh_star
urbanc
parents:
26522
diff
changeset
|
559 |
fixes c :: "'x" |
0e2a29a1065c
polished the proof for atm_prm_fresh and more lemmas for fresh_star
urbanc
parents:
26522
diff
changeset
|
560 |
and pi:: "'x prm" |
0e2a29a1065c
polished the proof for atm_prm_fresh and more lemmas for fresh_star
urbanc
parents:
26522
diff
changeset
|
561 |
assumes at: "at TYPE('x)" |
0e2a29a1065c
polished the proof for atm_prm_fresh and more lemmas for fresh_star
urbanc
parents:
26522
diff
changeset
|
562 |
and a: "c\<sharp>pi" |
0e2a29a1065c
polished the proof for atm_prm_fresh and more lemmas for fresh_star
urbanc
parents:
26522
diff
changeset
|
563 |
shows "\<forall>(a,b)\<in>set pi. c\<noteq>a \<and> c\<noteq>b" |
0e2a29a1065c
polished the proof for atm_prm_fresh and more lemmas for fresh_star
urbanc
parents:
26522
diff
changeset
|
564 |
using a by (induct pi) (auto simp add: fresh_list_cons fresh_prod at_fresh[OF at]) |
0e2a29a1065c
polished the proof for atm_prm_fresh and more lemmas for fresh_star
urbanc
parents:
26522
diff
changeset
|
565 |
|
0e2a29a1065c
polished the proof for atm_prm_fresh and more lemmas for fresh_star
urbanc
parents:
26522
diff
changeset
|
566 |
lemma at_prm_fresh2: |
0e2a29a1065c
polished the proof for atm_prm_fresh and more lemmas for fresh_star
urbanc
parents:
26522
diff
changeset
|
567 |
fixes c :: "'x" |
0e2a29a1065c
polished the proof for atm_prm_fresh and more lemmas for fresh_star
urbanc
parents:
26522
diff
changeset
|
568 |
and pi:: "'x prm" |
0e2a29a1065c
polished the proof for atm_prm_fresh and more lemmas for fresh_star
urbanc
parents:
26522
diff
changeset
|
569 |
assumes at: "at TYPE('x)" |
0e2a29a1065c
polished the proof for atm_prm_fresh and more lemmas for fresh_star
urbanc
parents:
26522
diff
changeset
|
570 |
and a: "\<forall>(a,b)\<in>set pi. c\<noteq>a \<and> c\<noteq>b" |
0e2a29a1065c
polished the proof for atm_prm_fresh and more lemmas for fresh_star
urbanc
parents:
26522
diff
changeset
|
571 |
shows "pi\<bullet>c = c" |
0e2a29a1065c
polished the proof for atm_prm_fresh and more lemmas for fresh_star
urbanc
parents:
26522
diff
changeset
|
572 |
using a by(induct pi) (auto simp add: at1[OF at] at2[OF at] at3[OF at]) |
0e2a29a1065c
polished the proof for atm_prm_fresh and more lemmas for fresh_star
urbanc
parents:
26522
diff
changeset
|
573 |
|
19107
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
574 |
lemma at_prm_fresh: |
17870 | 575 |
fixes c :: "'x" |
576 |
and pi:: "'x prm" |
|
577 |
assumes at: "at TYPE('x)" |
|
19107
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
578 |
and a: "c\<sharp>pi" |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
579 |
shows "pi\<bullet>c = c" |
26766
0e2a29a1065c
polished the proof for atm_prm_fresh and more lemmas for fresh_star
urbanc
parents:
26522
diff
changeset
|
580 |
by (rule at_prm_fresh2[OF at], rule at_prm_fresh1[OF at, OF a]) |
17870 | 581 |
|
582 |
lemma at_prm_rev_eq: |
|
583 |
fixes pi1 :: "'x prm" |
|
584 |
and pi2 :: "'x prm" |
|
585 |
assumes at: "at TYPE('x)" |
|
19107
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
586 |
shows "((rev pi1) \<triangleq> (rev pi2)) = (pi1 \<triangleq> pi2)" |
17870 | 587 |
proof (simp add: prm_eq_def, auto) |
588 |
fix x |
|
589 |
assume "\<forall>x::'x. (rev pi1)\<bullet>x = (rev pi2)\<bullet>x" |
|
590 |
hence "(rev (pi1::'x prm))\<bullet>(pi2\<bullet>(x::'x)) = (rev (pi2::'x prm))\<bullet>(pi2\<bullet>x)" by simp |
|
591 |
hence "(rev (pi1::'x prm))\<bullet>((pi2::'x prm)\<bullet>x) = (x::'x)" by (simp add: at_rev_pi[OF at]) |
|
592 |
hence "(pi2::'x prm)\<bullet>x = (pi1::'x prm)\<bullet>x" by (simp add: at_bij2[OF at]) |
|
18295
dd50de393330
changed \<sim> of permutation equality to \<triangleq>
urbanc
parents:
18294
diff
changeset
|
593 |
thus "pi1\<bullet>x = pi2\<bullet>x" by simp |
17870 | 594 |
next |
595 |
fix x |
|
596 |
assume "\<forall>x::'x. pi1\<bullet>x = pi2\<bullet>x" |
|
597 |
hence "(pi1::'x prm)\<bullet>((rev pi2)\<bullet>x) = (pi2::'x prm)\<bullet>((rev pi2)\<bullet>(x::'x))" by simp |
|
598 |
hence "(pi1::'x prm)\<bullet>((rev pi2)\<bullet>(x::'x)) = x" by (simp add: at_pi_rev[OF at]) |
|
599 |
hence "(rev pi2)\<bullet>x = (rev pi1)\<bullet>(x::'x)" by (simp add: at_bij1[OF at]) |
|
600 |
thus "(rev pi1)\<bullet>x = (rev pi2)\<bullet>(x::'x)" by simp |
|
601 |
qed |
|
19107
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
602 |
|
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
603 |
lemma at_prm_eq_append: |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
604 |
fixes pi1 :: "'x prm" |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
605 |
and pi2 :: "'x prm" |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
606 |
and pi3 :: "'x prm" |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
607 |
assumes at: "at TYPE('x)" |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
608 |
and a: "pi1 \<triangleq> pi2" |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
609 |
shows "(pi3@pi1) \<triangleq> (pi3@pi2)" |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
610 |
using a by (simp add: prm_eq_def at_append[OF at] at_bij[OF at]) |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
611 |
|
19325 | 612 |
lemma at_prm_eq_append': |
613 |
fixes pi1 :: "'x prm" |
|
614 |
and pi2 :: "'x prm" |
|
615 |
and pi3 :: "'x prm" |
|
616 |
assumes at: "at TYPE('x)" |
|
617 |
and a: "pi1 \<triangleq> pi2" |
|
618 |
shows "(pi1@pi3) \<triangleq> (pi2@pi3)" |
|
619 |
using a by (simp add: prm_eq_def at_append[OF at]) |
|
620 |
||
19107
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
621 |
lemma at_prm_eq_trans: |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
622 |
fixes pi1 :: "'x prm" |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
623 |
and pi2 :: "'x prm" |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
624 |
and pi3 :: "'x prm" |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
625 |
assumes a1: "pi1 \<triangleq> pi2" |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
626 |
and a2: "pi2 \<triangleq> pi3" |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
627 |
shows "pi1 \<triangleq> pi3" |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
628 |
using a1 a2 by (auto simp add: prm_eq_def) |
17870 | 629 |
|
19107
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
630 |
lemma at_prm_eq_refl: |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
631 |
fixes pi :: "'x prm" |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
632 |
shows "pi \<triangleq> pi" |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
633 |
by (simp add: prm_eq_def) |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
634 |
|
17870 | 635 |
lemma at_prm_rev_eq1: |
636 |
fixes pi1 :: "'x prm" |
|
637 |
and pi2 :: "'x prm" |
|
638 |
assumes at: "at TYPE('x)" |
|
18295
dd50de393330
changed \<sim> of permutation equality to \<triangleq>
urbanc
parents:
18294
diff
changeset
|
639 |
shows "pi1 \<triangleq> pi2 \<Longrightarrow> (rev pi1) \<triangleq> (rev pi2)" |
17870 | 640 |
by (simp add: at_prm_rev_eq[OF at]) |
641 |
||
642 |
lemma at_ds1: |
|
643 |
fixes a :: "'x" |
|
644 |
assumes at: "at TYPE('x)" |
|
18295
dd50de393330
changed \<sim> of permutation equality to \<triangleq>
urbanc
parents:
18294
diff
changeset
|
645 |
shows "[(a,a)] \<triangleq> []" |
17870 | 646 |
by (force simp add: prm_eq_def at_calc[OF at]) |
647 |
||
648 |
lemma at_ds2: |
|
649 |
fixes pi :: "'x prm" |
|
650 |
and a :: "'x" |
|
651 |
and b :: "'x" |
|
652 |
assumes at: "at TYPE('x)" |
|
19107
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
653 |
shows "([(a,b)]@pi) \<triangleq> (pi@[((rev pi)\<bullet>a,(rev pi)\<bullet>b)])" |
17870 | 654 |
by (force simp add: prm_eq_def at_append[OF at] at_bij[OF at] at_pi_rev[OF at] |
655 |
at_rev_pi[OF at] at_calc[OF at]) |
|
656 |
||
657 |
lemma at_ds3: |
|
658 |
fixes a :: "'x" |
|
659 |
and b :: "'x" |
|
660 |
and c :: "'x" |
|
661 |
assumes at: "at TYPE('x)" |
|
662 |
and a: "distinct [a,b,c]" |
|
18295
dd50de393330
changed \<sim> of permutation equality to \<triangleq>
urbanc
parents:
18294
diff
changeset
|
663 |
shows "[(a,c),(b,c),(a,c)] \<triangleq> [(a,b)]" |
17870 | 664 |
using a by (force simp add: prm_eq_def at_calc[OF at]) |
665 |
||
666 |
lemma at_ds4: |
|
667 |
fixes a :: "'x" |
|
668 |
and b :: "'x" |
|
669 |
and pi :: "'x prm" |
|
670 |
assumes at: "at TYPE('x)" |
|
18295
dd50de393330
changed \<sim> of permutation equality to \<triangleq>
urbanc
parents:
18294
diff
changeset
|
671 |
shows "(pi@[(a,(rev pi)\<bullet>b)]) \<triangleq> ([(pi\<bullet>a,b)]@pi)" |
17870 | 672 |
by (force simp add: prm_eq_def at_append[OF at] at_calc[OF at] at_bij[OF at] |
673 |
at_pi_rev[OF at] at_rev_pi[OF at]) |
|
674 |
||
675 |
lemma at_ds5: |
|
676 |
fixes a :: "'x" |
|
677 |
and b :: "'x" |
|
678 |
assumes at: "at TYPE('x)" |
|
18295
dd50de393330
changed \<sim> of permutation equality to \<triangleq>
urbanc
parents:
18294
diff
changeset
|
679 |
shows "[(a,b)] \<triangleq> [(b,a)]" |
17870 | 680 |
by (force simp add: prm_eq_def at_calc[OF at]) |
681 |
||
19164 | 682 |
lemma at_ds5': |
683 |
fixes a :: "'x" |
|
684 |
and b :: "'x" |
|
685 |
assumes at: "at TYPE('x)" |
|
686 |
shows "[(a,b),(b,a)] \<triangleq> []" |
|
687 |
by (force simp add: prm_eq_def at_calc[OF at]) |
|
688 |
||
17870 | 689 |
lemma at_ds6: |
690 |
fixes a :: "'x" |
|
691 |
and b :: "'x" |
|
692 |
and c :: "'x" |
|
693 |
assumes at: "at TYPE('x)" |
|
694 |
and a: "distinct [a,b,c]" |
|
18295
dd50de393330
changed \<sim> of permutation equality to \<triangleq>
urbanc
parents:
18294
diff
changeset
|
695 |
shows "[(a,c),(a,b)] \<triangleq> [(b,c),(a,c)]" |
17870 | 696 |
using a by (force simp add: prm_eq_def at_calc[OF at]) |
697 |
||
698 |
lemma at_ds7: |
|
699 |
fixes pi :: "'x prm" |
|
700 |
assumes at: "at TYPE('x)" |
|
18295
dd50de393330
changed \<sim> of permutation equality to \<triangleq>
urbanc
parents:
18294
diff
changeset
|
701 |
shows "((rev pi)@pi) \<triangleq> []" |
17870 | 702 |
by (simp add: prm_eq_def at1[OF at] at_append[OF at] at_rev_pi[OF at]) |
703 |
||
704 |
lemma at_ds8_aux: |
|
705 |
fixes pi :: "'x prm" |
|
706 |
and a :: "'x" |
|
707 |
and b :: "'x" |
|
708 |
and c :: "'x" |
|
709 |
assumes at: "at TYPE('x)" |
|
710 |
shows "pi\<bullet>(swap (a,b) c) = swap (pi\<bullet>a,pi\<bullet>b) (pi\<bullet>c)" |
|
711 |
by (force simp add: at_calc[OF at] at_bij[OF at]) |
|
712 |
||
713 |
lemma at_ds8: |
|
714 |
fixes pi1 :: "'x prm" |
|
715 |
and pi2 :: "'x prm" |
|
716 |
and a :: "'x" |
|
717 |
and b :: "'x" |
|
718 |
assumes at: "at TYPE('x)" |
|
18295
dd50de393330
changed \<sim> of permutation equality to \<triangleq>
urbanc
parents:
18294
diff
changeset
|
719 |
shows "(pi1@pi2) \<triangleq> ((pi1\<bullet>pi2)@pi1)" |
17870 | 720 |
apply(induct_tac pi2) |
721 |
apply(simp add: prm_eq_def) |
|
722 |
apply(auto simp add: prm_eq_def) |
|
723 |
apply(simp add: at2[OF at]) |
|
724 |
apply(drule_tac x="aa" in spec) |
|
725 |
apply(drule sym) |
|
726 |
apply(simp) |
|
727 |
apply(simp add: at_append[OF at]) |
|
728 |
apply(simp add: at2[OF at]) |
|
729 |
apply(simp add: at_ds8_aux[OF at]) |
|
730 |
done |
|
731 |
||
732 |
lemma at_ds9: |
|
733 |
fixes pi1 :: "'x prm" |
|
734 |
and pi2 :: "'x prm" |
|
735 |
and a :: "'x" |
|
736 |
and b :: "'x" |
|
737 |
assumes at: "at TYPE('x)" |
|
18295
dd50de393330
changed \<sim> of permutation equality to \<triangleq>
urbanc
parents:
18294
diff
changeset
|
738 |
shows " ((rev pi2)@(rev pi1)) \<triangleq> ((rev pi1)@(rev (pi1\<bullet>pi2)))" |
17870 | 739 |
apply(induct_tac pi2) |
740 |
apply(simp add: prm_eq_def) |
|
741 |
apply(auto simp add: prm_eq_def) |
|
742 |
apply(simp add: at_append[OF at]) |
|
743 |
apply(simp add: at2[OF at] at1[OF at]) |
|
744 |
apply(drule_tac x="swap(pi1\<bullet>a,pi1\<bullet>b) aa" in spec) |
|
745 |
apply(drule sym) |
|
746 |
apply(simp) |
|
747 |
apply(simp add: at_ds8_aux[OF at]) |
|
748 |
apply(simp add: at_rev_pi[OF at]) |
|
749 |
done |
|
750 |
||
19107
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
751 |
lemma at_ds10: |
19132 | 752 |
fixes pi :: "'x prm" |
19107
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
753 |
and a :: "'x" |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
754 |
and b :: "'x" |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
755 |
assumes at: "at TYPE('x)" |
19132 | 756 |
and a: "b\<sharp>(rev pi)" |
757 |
shows "([(pi\<bullet>a,b)]@pi) \<triangleq> (pi@[(a,b)])" |
|
19107
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
758 |
using a |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
759 |
apply - |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
760 |
apply(rule at_prm_eq_trans) |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
761 |
apply(rule at_ds2[OF at]) |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
762 |
apply(simp add: at_prm_fresh[OF at] at_rev_pi[OF at]) |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
763 |
apply(rule at_prm_eq_refl) |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
764 |
done |
b16a45c53884
added a few lemmas to do with permutation-equivalence for the
urbanc
parents:
19045
diff
changeset
|
765 |
|
21377
c29146dc14f1
replaced exists_fresh lemma with a version formulated with obtains;
urbanc
parents:
21318
diff
changeset
|
766 |
--"there always exists an atom that is not being in a finite set" |
17870 | 767 |
lemma ex_in_inf: |
768 |
fixes A::"'x set" |
|
769 |
assumes at: "at TYPE('x)" |
|
770 |
and fs: "finite A" |
|
21377
c29146dc14f1
replaced exists_fresh lemma with a version formulated with obtains;
urbanc
parents:
21318
diff
changeset
|
771 |
obtains c::"'x" where "c\<notin>A" |
17870 | 772 |
proof - |
773 |
from fs at4[OF at] have "infinite ((UNIV::'x set) - A)" |
|
774 |
by (simp add: Diff_infinite_finite) |
|
775 |
hence "((UNIV::'x set) - A) \<noteq> ({}::'x set)" by (force simp only:) |
|
21377
c29146dc14f1
replaced exists_fresh lemma with a version formulated with obtains;
urbanc
parents:
21318
diff
changeset
|
776 |
then obtain c::"'x" where "c\<in>((UNIV::'x set) - A)" by force |
c29146dc14f1
replaced exists_fresh lemma with a version formulated with obtains;
urbanc
parents:
21318
diff
changeset
|
777 |
then have "c\<notin>A" by simp |
41550 | 778 |
then show ?thesis .. |
17870 | 779 |
qed |
780 |
||
21377
c29146dc14f1
replaced exists_fresh lemma with a version formulated with obtains;
urbanc
parents:
21318
diff
changeset
|
781 |
text {* there always exists a fresh name for an object with finite support *} |
c29146dc14f1
replaced exists_fresh lemma with a version formulated with obtains;
urbanc
parents:
21318
diff
changeset
|
782 |
lemma at_exists_fresh': |
c29146dc14f1
replaced exists_fresh lemma with a version formulated with obtains;
urbanc
parents:
21318
diff
changeset
|
783 |
fixes x :: "'a" |
c29146dc14f1
replaced exists_fresh lemma with a version formulated with obtains;
urbanc
parents:
21318
diff
changeset
|
784 |
assumes at: "at TYPE('x)" |
c29146dc14f1
replaced exists_fresh lemma with a version formulated with obtains;
urbanc
parents:
21318
diff
changeset
|
785 |
and fs: "finite ((supp x)::'x set)" |
c29146dc14f1
replaced exists_fresh lemma with a version formulated with obtains;
urbanc
parents:
21318
diff
changeset
|
786 |
shows "\<exists>c::'x. c\<sharp>x" |
c29146dc14f1
replaced exists_fresh lemma with a version formulated with obtains;
urbanc
parents:
21318
diff
changeset
|
787 |
by (auto simp add: fresh_def intro: ex_in_inf[OF at, OF fs]) |
c29146dc14f1
replaced exists_fresh lemma with a version formulated with obtains;
urbanc
parents:
21318
diff
changeset
|
788 |
|
17870 | 789 |
lemma at_exists_fresh: |
790 |
fixes x :: "'a" |
|
791 |
assumes at: "at TYPE('x)" |
|
792 |
and fs: "finite ((supp x)::'x set)" |
|
21377
c29146dc14f1
replaced exists_fresh lemma with a version formulated with obtains;
urbanc
parents:
21318
diff
changeset
|
793 |
obtains c::"'x" where "c\<sharp>x" |
c29146dc14f1
replaced exists_fresh lemma with a version formulated with obtains;
urbanc
parents:
21318
diff
changeset
|
794 |
by (auto intro: ex_in_inf[OF at, OF fs] simp add: fresh_def) |
17870 | 795 |
|
21377
c29146dc14f1
replaced exists_fresh lemma with a version formulated with obtains;
urbanc
parents:
21318
diff
changeset
|
796 |
lemma at_finite_select: |
30990
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
797 |
fixes S::"'a set" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
798 |
assumes a: "at TYPE('a)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
799 |
and b: "finite S" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
800 |
shows "\<exists>x. x \<notin> S" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
801 |
using a b |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
802 |
apply(drule_tac S="UNIV::'a set" in Diff_infinite_finite) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
803 |
apply(simp add: at_def) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
804 |
apply(subgoal_tac "UNIV - S \<noteq> {}") |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
805 |
apply(simp only: ex_in_conv [symmetric]) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
806 |
apply(blast) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
807 |
apply(rule notI) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
808 |
apply(simp) |
18657 | 809 |
done |
810 |
||
19140 | 811 |
lemma at_different: |
19132 | 812 |
assumes at: "at TYPE('x)" |
19140 | 813 |
shows "\<exists>(b::'x). a\<noteq>b" |
19132 | 814 |
proof - |
19140 | 815 |
have "infinite (UNIV::'x set)" by (rule at4[OF at]) |
816 |
hence inf2: "infinite (UNIV-{a})" by (rule infinite_remove) |
|
19132 | 817 |
have "(UNIV-{a}) \<noteq> ({}::'x set)" |
818 |
proof (rule_tac ccontr, drule_tac notnotD) |
|
819 |
assume "UNIV-{a} = ({}::'x set)" |
|
820 |
with inf2 have "infinite ({}::'x set)" by simp |
|
19869 | 821 |
then show "False" by auto |
19132 | 822 |
qed |
823 |
hence "\<exists>(b::'x). b\<in>(UNIV-{a})" by blast |
|
824 |
then obtain b::"'x" where mem2: "b\<in>(UNIV-{a})" by blast |
|
19140 | 825 |
from mem2 have "a\<noteq>b" by blast |
826 |
then show "\<exists>(b::'x). a\<noteq>b" by blast |
|
19132 | 827 |
qed |
828 |
||
17870 | 829 |
--"the at-props imply the pt-props" |
830 |
lemma at_pt_inst: |
|
831 |
assumes at: "at TYPE('x)" |
|
832 |
shows "pt TYPE('x) TYPE('x)" |
|
833 |
apply(auto simp only: pt_def) |
|
834 |
apply(simp only: at1[OF at]) |
|
835 |
apply(simp only: at_append[OF at]) |
|
18053
2719a6b7d95e
some minor tweaks in some proofs (nothing extraordinary)
urbanc
parents:
18048
diff
changeset
|
836 |
apply(simp only: prm_eq_def) |
17870 | 837 |
done |
838 |
||
839 |
section {* finite support properties *} |
|
840 |
(*===================================*) |
|
841 |
||
842 |
lemma fs1: |
|
843 |
fixes x :: "'a" |
|
844 |
assumes a: "fs TYPE('a) TYPE('x)" |
|
845 |
shows "finite ((supp x)::'x set)" |
|
846 |
using a by (simp add: fs_def) |
|
847 |
||
848 |
lemma fs_at_inst: |
|
849 |
fixes a :: "'x" |
|
850 |
assumes at: "at TYPE('x)" |
|
851 |
shows "fs TYPE('x) TYPE('x)" |
|
852 |
apply(simp add: fs_def) |
|
853 |
apply(simp add: at_supp[OF at]) |
|
854 |
done |
|
855 |
||
856 |
lemma fs_unit_inst: |
|
857 |
shows "fs TYPE(unit) TYPE('x)" |
|
858 |
apply(simp add: fs_def) |
|
859 |
apply(simp add: supp_unit) |
|
860 |
done |
|
861 |
||
862 |
lemma fs_prod_inst: |
|
863 |
assumes fsa: "fs TYPE('a) TYPE('x)" |
|
864 |
and fsb: "fs TYPE('b) TYPE('x)" |
|
865 |
shows "fs TYPE('a\<times>'b) TYPE('x)" |
|
866 |
apply(unfold fs_def) |
|
867 |
apply(auto simp add: supp_prod) |
|
868 |
apply(rule fs1[OF fsa]) |
|
869 |
apply(rule fs1[OF fsb]) |
|
870 |
done |
|
871 |
||
18600 | 872 |
lemma fs_nprod_inst: |
873 |
assumes fsa: "fs TYPE('a) TYPE('x)" |
|
874 |
and fsb: "fs TYPE('b) TYPE('x)" |
|
875 |
shows "fs TYPE(('a,'b) nprod) TYPE('x)" |
|
876 |
apply(unfold fs_def, rule allI) |
|
877 |
apply(case_tac x) |
|
878 |
apply(auto simp add: supp_nprod) |
|
879 |
apply(rule fs1[OF fsa]) |
|
880 |
apply(rule fs1[OF fsb]) |
|
881 |
done |
|
882 |
||
17870 | 883 |
lemma fs_list_inst: |
884 |
assumes fs: "fs TYPE('a) TYPE('x)" |
|
885 |
shows "fs TYPE('a list) TYPE('x)" |
|
886 |
apply(simp add: fs_def, rule allI) |
|
887 |
apply(induct_tac x) |
|
888 |
apply(simp add: supp_list_nil) |
|
889 |
apply(simp add: supp_list_cons) |
|
890 |
apply(rule fs1[OF fs]) |
|
891 |
done |
|
892 |
||
18431 | 893 |
lemma fs_option_inst: |
894 |
assumes fs: "fs TYPE('a) TYPE('x)" |
|
895 |
shows "fs TYPE('a option) TYPE('x)" |
|
17870 | 896 |
apply(simp add: fs_def, rule allI) |
18431 | 897 |
apply(case_tac x) |
898 |
apply(simp add: supp_none) |
|
899 |
apply(simp add: supp_some) |
|
900 |
apply(rule fs1[OF fs]) |
|
17870 | 901 |
done |
902 |
||
903 |
section {* Lemmas about the permutation properties *} |
|
904 |
(*=================================================*) |
|
905 |
||
906 |
lemma pt1: |
|
907 |
fixes x::"'a" |
|
908 |
assumes a: "pt TYPE('a) TYPE('x)" |
|
909 |
shows "([]::'x prm)\<bullet>x = x" |
|
910 |
using a by (simp add: pt_def) |
|
911 |
||
912 |
lemma pt2: |
|
913 |
fixes pi1::"'x prm" |
|
914 |
and pi2::"'x prm" |
|
915 |
and x ::"'a" |
|
916 |
assumes a: "pt TYPE('a) TYPE('x)" |
|
917 |
shows "(pi1@pi2)\<bullet>x = pi1\<bullet>(pi2\<bullet>x)" |
|
918 |
using a by (simp add: pt_def) |
|
919 |
||
920 |
lemma pt3: |
|
921 |
fixes pi1::"'x prm" |
|
922 |
and pi2::"'x prm" |
|
923 |
and x ::"'a" |
|
924 |
assumes a: "pt TYPE('a) TYPE('x)" |
|
18295
dd50de393330
changed \<sim> of permutation equality to \<triangleq>
urbanc
parents:
18294
diff
changeset
|
925 |
shows "pi1 \<triangleq> pi2 \<Longrightarrow> pi1\<bullet>x = pi2\<bullet>x" |
17870 | 926 |
using a by (simp add: pt_def) |
927 |
||
928 |
lemma pt3_rev: |
|
929 |
fixes pi1::"'x prm" |
|
930 |
and pi2::"'x prm" |
|
931 |
and x ::"'a" |
|
932 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
933 |
and at: "at TYPE('x)" |
|
18295
dd50de393330
changed \<sim> of permutation equality to \<triangleq>
urbanc
parents:
18294
diff
changeset
|
934 |
shows "pi1 \<triangleq> pi2 \<Longrightarrow> (rev pi1)\<bullet>x = (rev pi2)\<bullet>x" |
17870 | 935 |
by (rule pt3[OF pt], simp add: at_prm_rev_eq[OF at]) |
936 |
||
937 |
section {* composition properties *} |
|
938 |
(* ============================== *) |
|
939 |
lemma cp1: |
|
940 |
fixes pi1::"'x prm" |
|
941 |
and pi2::"'y prm" |
|
942 |
and x ::"'a" |
|
943 |
assumes cp: "cp TYPE ('a) TYPE('x) TYPE('y)" |
|
944 |
shows "pi1\<bullet>(pi2\<bullet>x) = (pi1\<bullet>pi2)\<bullet>(pi1\<bullet>x)" |
|
945 |
using cp by (simp add: cp_def) |
|
946 |
||
947 |
lemma cp_pt_inst: |
|
948 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
949 |
and at: "at TYPE('x)" |
|
950 |
shows "cp TYPE('a) TYPE('x) TYPE('x)" |
|
951 |
apply(auto simp add: cp_def pt2[OF pt,symmetric]) |
|
952 |
apply(rule pt3[OF pt]) |
|
953 |
apply(rule at_ds8[OF at]) |
|
954 |
done |
|
955 |
||
19638
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
956 |
section {* disjointness properties *} |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
957 |
(*=================================*) |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
958 |
lemma dj_perm_forget: |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
959 |
fixes pi::"'y prm" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
960 |
and x ::"'x" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
961 |
assumes dj: "disjoint TYPE('x) TYPE('y)" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
962 |
shows "pi\<bullet>x=x" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
963 |
using dj by (simp_all add: disjoint_def) |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
964 |
|
28371
471a356fdea9
Added some more lemmas that are useful in proof of strong induction rule.
berghofe
parents:
28322
diff
changeset
|
965 |
lemma dj_perm_set_forget: |
471a356fdea9
Added some more lemmas that are useful in proof of strong induction rule.
berghofe
parents:
28322
diff
changeset
|
966 |
fixes pi::"'y prm" |
471a356fdea9
Added some more lemmas that are useful in proof of strong induction rule.
berghofe
parents:
28322
diff
changeset
|
967 |
and x ::"'x set" |
471a356fdea9
Added some more lemmas that are useful in proof of strong induction rule.
berghofe
parents:
28322
diff
changeset
|
968 |
assumes dj: "disjoint TYPE('x) TYPE('y)" |
44833 | 969 |
shows "pi\<bullet>x=x" |
45961 | 970 |
using dj by (simp_all add: perm_set_def disjoint_def) |
28371
471a356fdea9
Added some more lemmas that are useful in proof of strong induction rule.
berghofe
parents:
28322
diff
changeset
|
971 |
|
19638
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
972 |
lemma dj_perm_perm_forget: |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
973 |
fixes pi1::"'x prm" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
974 |
and pi2::"'y prm" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
975 |
assumes dj: "disjoint TYPE('x) TYPE('y)" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
976 |
shows "pi2\<bullet>pi1=pi1" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
977 |
using dj by (induct pi1, auto simp add: disjoint_def) |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
978 |
|
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
979 |
lemma dj_cp: |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
980 |
fixes pi1::"'x prm" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
981 |
and pi2::"'y prm" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
982 |
and x ::"'a" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
983 |
assumes cp: "cp TYPE ('a) TYPE('x) TYPE('y)" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
984 |
and dj: "disjoint TYPE('y) TYPE('x)" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
985 |
shows "pi1\<bullet>(pi2\<bullet>x) = (pi2)\<bullet>(pi1\<bullet>x)" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
986 |
by (simp add: cp1[OF cp] dj_perm_perm_forget[OF dj]) |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
987 |
|
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
988 |
lemma dj_supp: |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
989 |
fixes a::"'x" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
990 |
assumes dj: "disjoint TYPE('x) TYPE('y)" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
991 |
shows "(supp a) = ({}::'y set)" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
992 |
apply(simp add: supp_def dj_perm_forget[OF dj]) |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
993 |
done |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
994 |
|
19972
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
995 |
lemma at_fresh_ineq: |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
996 |
fixes a :: "'x" |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
997 |
and b :: "'y" |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
998 |
assumes dj: "disjoint TYPE('y) TYPE('x)" |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
999 |
shows "a\<sharp>b" |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
1000 |
by (simp add: fresh_def dj_supp[OF dj]) |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
1001 |
|
17870 | 1002 |
section {* permutation type instances *} |
1003 |
(* ===================================*) |
|
1004 |
||
44696 | 1005 |
lemma pt_fun_inst: |
1006 |
assumes pta: "pt TYPE('a) TYPE('x)" |
|
1007 |
and ptb: "pt TYPE('b) TYPE('x)" |
|
1008 |
and at: "at TYPE('x)" |
|
1009 |
shows "pt TYPE('a\<Rightarrow>'b) TYPE('x)" |
|
1010 |
apply(auto simp only: pt_def) |
|
1011 |
apply(simp_all add: perm_fun_def) |
|
1012 |
apply(simp add: pt1[OF pta] pt1[OF ptb]) |
|
1013 |
apply(simp add: pt2[OF pta] pt2[OF ptb]) |
|
1014 |
apply(subgoal_tac "(rev pi1) \<triangleq> (rev pi2)")(*A*) |
|
1015 |
apply(simp add: pt3[OF pta] pt3[OF ptb]) |
|
1016 |
(*A*) |
|
1017 |
apply(simp add: at_prm_rev_eq[OF at]) |
|
1018 |
done |
|
1019 |
||
1020 |
lemma pt_bool_inst: |
|
1021 |
shows "pt TYPE(bool) TYPE('x)" |
|
1022 |
by (simp add: pt_def perm_bool_def) |
|
1023 |
||
1024 |
lemma pt_set_inst: |
|
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
1025 |
assumes pt: "pt TYPE('a) TYPE('x)" |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
1026 |
shows "pt TYPE('a set) TYPE('x)" |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
1027 |
apply(simp add: pt_def) |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
1028 |
apply(simp_all add: perm_set_def) |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
1029 |
apply(simp add: pt1[OF pt]) |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
1030 |
apply(force simp add: pt2[OF pt] pt3[OF pt]) |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
1031 |
done |
44696 | 1032 |
|
1033 |
lemma pt_unit_inst: |
|
44833 | 1034 |
shows "pt TYPE(unit) TYPE('x)" |
44696 | 1035 |
by (simp add: pt_def) |
1036 |
||
1037 |
lemma pt_prod_inst: |
|
1038 |
assumes pta: "pt TYPE('a) TYPE('x)" |
|
1039 |
and ptb: "pt TYPE('b) TYPE('x)" |
|
1040 |
shows "pt TYPE('a \<times> 'b) TYPE('x)" |
|
1041 |
apply(auto simp add: pt_def) |
|
1042 |
apply(rule pt1[OF pta]) |
|
1043 |
apply(rule pt1[OF ptb]) |
|
1044 |
apply(rule pt2[OF pta]) |
|
1045 |
apply(rule pt2[OF ptb]) |
|
1046 |
apply(rule pt3[OF pta],assumption) |
|
1047 |
apply(rule pt3[OF ptb],assumption) |
|
1048 |
done |
|
1049 |
||
17870 | 1050 |
lemma pt_list_nil: |
1051 |
fixes xs :: "'a list" |
|
1052 |
assumes pt: "pt TYPE('a) TYPE ('x)" |
|
1053 |
shows "([]::'x prm)\<bullet>xs = xs" |
|
1054 |
apply(induct_tac xs) |
|
1055 |
apply(simp_all add: pt1[OF pt]) |
|
1056 |
done |
|
1057 |
||
1058 |
lemma pt_list_append: |
|
1059 |
fixes pi1 :: "'x prm" |
|
1060 |
and pi2 :: "'x prm" |
|
1061 |
and xs :: "'a list" |
|
1062 |
assumes pt: "pt TYPE('a) TYPE ('x)" |
|
1063 |
shows "(pi1@pi2)\<bullet>xs = pi1\<bullet>(pi2\<bullet>xs)" |
|
1064 |
apply(induct_tac xs) |
|
1065 |
apply(simp_all add: pt2[OF pt]) |
|
1066 |
done |
|
1067 |
||
1068 |
lemma pt_list_prm_eq: |
|
1069 |
fixes pi1 :: "'x prm" |
|
1070 |
and pi2 :: "'x prm" |
|
1071 |
and xs :: "'a list" |
|
1072 |
assumes pt: "pt TYPE('a) TYPE ('x)" |
|
18295
dd50de393330
changed \<sim> of permutation equality to \<triangleq>
urbanc
parents:
18294
diff
changeset
|
1073 |
shows "pi1 \<triangleq> pi2 \<Longrightarrow> pi1\<bullet>xs = pi2\<bullet>xs" |
17870 | 1074 |
apply(induct_tac xs) |
1075 |
apply(simp_all add: prm_eq_def pt3[OF pt]) |
|
1076 |
done |
|
1077 |
||
1078 |
lemma pt_list_inst: |
|
1079 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1080 |
shows "pt TYPE('a list) TYPE('x)" |
|
1081 |
apply(auto simp only: pt_def) |
|
1082 |
apply(rule pt_list_nil[OF pt]) |
|
1083 |
apply(rule pt_list_append[OF pt]) |
|
1084 |
apply(rule pt_list_prm_eq[OF pt],assumption) |
|
1085 |
done |
|
1086 |
||
1087 |
lemma pt_option_inst: |
|
1088 |
assumes pta: "pt TYPE('a) TYPE('x)" |
|
1089 |
shows "pt TYPE('a option) TYPE('x)" |
|
1090 |
apply(auto simp only: pt_def) |
|
1091 |
apply(case_tac "x") |
|
1092 |
apply(simp_all add: pt1[OF pta]) |
|
1093 |
apply(case_tac "x") |
|
1094 |
apply(simp_all add: pt2[OF pta]) |
|
1095 |
apply(case_tac "x") |
|
1096 |
apply(simp_all add: pt3[OF pta]) |
|
1097 |
done |
|
1098 |
||
1099 |
lemma pt_noption_inst: |
|
1100 |
assumes pta: "pt TYPE('a) TYPE('x)" |
|
18579
002d371401f5
changed the name of the type "nOption" to "noption".
urbanc
parents:
18578
diff
changeset
|
1101 |
shows "pt TYPE('a noption) TYPE('x)" |
17870 | 1102 |
apply(auto simp only: pt_def) |
1103 |
apply(case_tac "x") |
|
1104 |
apply(simp_all add: pt1[OF pta]) |
|
1105 |
apply(case_tac "x") |
|
1106 |
apply(simp_all add: pt2[OF pta]) |
|
1107 |
apply(case_tac "x") |
|
1108 |
apply(simp_all add: pt3[OF pta]) |
|
1109 |
done |
|
1110 |
||
44696 | 1111 |
lemma pt_nprod_inst: |
1112 |
assumes pta: "pt TYPE('a) TYPE('x)" |
|
1113 |
and ptb: "pt TYPE('b) TYPE('x)" |
|
1114 |
shows "pt TYPE(('a,'b) nprod) TYPE('x)" |
|
1115 |
apply(auto simp add: pt_def) |
|
1116 |
apply(case_tac x) |
|
1117 |
apply(simp add: pt1[OF pta] pt1[OF ptb]) |
|
1118 |
apply(case_tac x) |
|
1119 |
apply(simp add: pt2[OF pta] pt2[OF ptb]) |
|
1120 |
apply(case_tac x) |
|
1121 |
apply(simp add: pt3[OF pta] pt3[OF ptb]) |
|
1122 |
done |
|
24544 | 1123 |
|
17870 | 1124 |
section {* further lemmas for permutation types *} |
1125 |
(*==============================================*) |
|
1126 |
||
1127 |
lemma pt_rev_pi: |
|
1128 |
fixes pi :: "'x prm" |
|
1129 |
and x :: "'a" |
|
1130 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1131 |
and at: "at TYPE('x)" |
|
1132 |
shows "(rev pi)\<bullet>(pi\<bullet>x) = x" |
|
1133 |
proof - |
|
18295
dd50de393330
changed \<sim> of permutation equality to \<triangleq>
urbanc
parents:
18294
diff
changeset
|
1134 |
have "((rev pi)@pi) \<triangleq> ([]::'x prm)" by (simp add: at_ds7[OF at]) |
17870 | 1135 |
hence "((rev pi)@pi)\<bullet>(x::'a) = ([]::'x prm)\<bullet>x" by (simp add: pt3[OF pt]) |
1136 |
thus ?thesis by (simp add: pt1[OF pt] pt2[OF pt]) |
|
1137 |
qed |
|
1138 |
||
1139 |
lemma pt_pi_rev: |
|
1140 |
fixes pi :: "'x prm" |
|
1141 |
and x :: "'a" |
|
1142 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1143 |
and at: "at TYPE('x)" |
|
1144 |
shows "pi\<bullet>((rev pi)\<bullet>x) = x" |
|
1145 |
by (simp add: pt_rev_pi[OF pt, OF at,of "rev pi" "x",simplified]) |
|
1146 |
||
1147 |
lemma pt_bij1: |
|
1148 |
fixes pi :: "'x prm" |
|
1149 |
and x :: "'a" |
|
1150 |
and y :: "'a" |
|
1151 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1152 |
and at: "at TYPE('x)" |
|
1153 |
and a: "(pi\<bullet>x) = y" |
|
1154 |
shows "x=(rev pi)\<bullet>y" |
|
1155 |
proof - |
|
1156 |
from a have "y=(pi\<bullet>x)" by (rule sym) |
|
1157 |
thus ?thesis by (simp only: pt_rev_pi[OF pt, OF at]) |
|
1158 |
qed |
|
1159 |
||
1160 |
lemma pt_bij2: |
|
1161 |
fixes pi :: "'x prm" |
|
1162 |
and x :: "'a" |
|
1163 |
and y :: "'a" |
|
1164 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1165 |
and at: "at TYPE('x)" |
|
1166 |
and a: "x = (rev pi)\<bullet>y" |
|
1167 |
shows "(pi\<bullet>x)=y" |
|
1168 |
using a by (simp add: pt_pi_rev[OF pt, OF at]) |
|
1169 |
||
1170 |
lemma pt_bij: |
|
1171 |
fixes pi :: "'x prm" |
|
1172 |
and x :: "'a" |
|
1173 |
and y :: "'a" |
|
1174 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1175 |
and at: "at TYPE('x)" |
|
1176 |
shows "(pi\<bullet>x = pi\<bullet>y) = (x=y)" |
|
1177 |
proof |
|
1178 |
assume "pi\<bullet>x = pi\<bullet>y" |
|
1179 |
hence "x=(rev pi)\<bullet>(pi\<bullet>y)" by (rule pt_bij1[OF pt, OF at]) |
|
1180 |
thus "x=y" by (simp only: pt_rev_pi[OF pt, OF at]) |
|
1181 |
next |
|
1182 |
assume "x=y" |
|
1183 |
thus "pi\<bullet>x = pi\<bullet>y" by simp |
|
1184 |
qed |
|
1185 |
||
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1186 |
lemma pt_eq_eqvt: |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1187 |
fixes pi :: "'x prm" |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1188 |
and x :: "'a" |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1189 |
and y :: "'a" |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1190 |
assumes pt: "pt TYPE('a) TYPE('x)" |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1191 |
and at: "at TYPE('x)" |
22829
f1db55c7534d
tuned some proofs and changed variable names in some definitions of Nominal.thy
urbanc
parents:
22808
diff
changeset
|
1192 |
shows "pi\<bullet>(x=y) = (pi\<bullet>x = pi\<bullet>y)" |
30990
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
1193 |
using pt at |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
1194 |
by (auto simp add: pt_bij perm_bool) |
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1195 |
|
17870 | 1196 |
lemma pt_bij3: |
1197 |
fixes pi :: "'x prm" |
|
1198 |
and x :: "'a" |
|
1199 |
and y :: "'a" |
|
1200 |
assumes a: "x=y" |
|
1201 |
shows "(pi\<bullet>x = pi\<bullet>y)" |
|
30990
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
1202 |
using a by simp |
17870 | 1203 |
|
1204 |
lemma pt_bij4: |
|
1205 |
fixes pi :: "'x prm" |
|
1206 |
and x :: "'a" |
|
1207 |
and y :: "'a" |
|
1208 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1209 |
and at: "at TYPE('x)" |
|
1210 |
and a: "pi\<bullet>x = pi\<bullet>y" |
|
1211 |
shows "x = y" |
|
30990
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
1212 |
using a by (simp add: pt_bij[OF pt, OF at]) |
17870 | 1213 |
|
1214 |
lemma pt_swap_bij: |
|
1215 |
fixes a :: "'x" |
|
1216 |
and b :: "'x" |
|
1217 |
and x :: "'a" |
|
1218 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1219 |
and at: "at TYPE('x)" |
|
1220 |
shows "[(a,b)]\<bullet>([(a,b)]\<bullet>x) = x" |
|
1221 |
by (rule pt_bij2[OF pt, OF at], simp) |
|
1222 |
||
19164 | 1223 |
lemma pt_swap_bij': |
1224 |
fixes a :: "'x" |
|
1225 |
and b :: "'x" |
|
1226 |
and x :: "'a" |
|
1227 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1228 |
and at: "at TYPE('x)" |
|
1229 |
shows "[(a,b)]\<bullet>([(b,a)]\<bullet>x) = x" |
|
1230 |
apply(simp add: pt2[OF pt,symmetric]) |
|
1231 |
apply(rule trans) |
|
1232 |
apply(rule pt3[OF pt]) |
|
1233 |
apply(rule at_ds5'[OF at]) |
|
1234 |
apply(rule pt1[OF pt]) |
|
1235 |
done |
|
1236 |
||
24571 | 1237 |
lemma pt_swap_bij'': |
1238 |
fixes a :: "'x" |
|
1239 |
and x :: "'a" |
|
1240 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1241 |
and at: "at TYPE('x)" |
|
1242 |
shows "[(a,a)]\<bullet>x = x" |
|
1243 |
apply(rule trans) |
|
1244 |
apply(rule pt3[OF pt]) |
|
1245 |
apply(rule at_ds1[OF at]) |
|
1246 |
apply(rule pt1[OF pt]) |
|
1247 |
done |
|
1248 |
||
26806 | 1249 |
lemma supp_singleton: |
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
1250 |
shows "supp {x} = supp x" |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
1251 |
by (force simp add: supp_def perm_set_def) |
26806 | 1252 |
|
1253 |
lemma fresh_singleton: |
|
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
1254 |
shows "a\<sharp>{x} = a\<sharp>x" |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
1255 |
by (simp add: fresh_def supp_singleton) |
26806 | 1256 |
|
17870 | 1257 |
lemma pt_set_bij1: |
1258 |
fixes pi :: "'x prm" |
|
1259 |
and x :: "'a" |
|
1260 |
and X :: "'a set" |
|
1261 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1262 |
and at: "at TYPE('x)" |
|
1263 |
shows "((pi\<bullet>x)\<in>X) = (x\<in>((rev pi)\<bullet>X))" |
|
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
1264 |
by (force simp add: perm_set_def pt_rev_pi[OF pt, OF at] pt_pi_rev[OF pt, OF at]) |
17870 | 1265 |
|
1266 |
lemma pt_set_bij1a: |
|
1267 |
fixes pi :: "'x prm" |
|
1268 |
and x :: "'a" |
|
1269 |
and X :: "'a set" |
|
1270 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1271 |
and at: "at TYPE('x)" |
|
1272 |
shows "(x\<in>(pi\<bullet>X)) = (((rev pi)\<bullet>x)\<in>X)" |
|
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
1273 |
by (force simp add: perm_set_def pt_rev_pi[OF pt, OF at] pt_pi_rev[OF pt, OF at]) |
17870 | 1274 |
|
1275 |
lemma pt_set_bij: |
|
1276 |
fixes pi :: "'x prm" |
|
1277 |
and x :: "'a" |
|
1278 |
and X :: "'a set" |
|
1279 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1280 |
and at: "at TYPE('x)" |
|
1281 |
shows "((pi\<bullet>x)\<in>(pi\<bullet>X)) = (x\<in>X)" |
|
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
1282 |
by (simp add: perm_set_def pt_bij[OF pt, OF at]) |
17870 | 1283 |
|
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1284 |
lemma pt_in_eqvt: |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1285 |
fixes pi :: "'x prm" |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1286 |
and x :: "'a" |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1287 |
and X :: "'a set" |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1288 |
assumes pt: "pt TYPE('a) TYPE('x)" |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1289 |
and at: "at TYPE('x)" |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1290 |
shows "pi\<bullet>(x\<in>X)=((pi\<bullet>x)\<in>(pi\<bullet>X))" |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1291 |
using assms |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1292 |
by (auto simp add: pt_set_bij perm_bool) |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1293 |
|
17870 | 1294 |
lemma pt_set_bij2: |
1295 |
fixes pi :: "'x prm" |
|
1296 |
and x :: "'a" |
|
1297 |
and X :: "'a set" |
|
1298 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1299 |
and at: "at TYPE('x)" |
|
1300 |
and a: "x\<in>X" |
|
1301 |
shows "(pi\<bullet>x)\<in>(pi\<bullet>X)" |
|
1302 |
using a by (simp add: pt_set_bij[OF pt, OF at]) |
|
1303 |
||
18264 | 1304 |
lemma pt_set_bij2a: |
1305 |
fixes pi :: "'x prm" |
|
1306 |
and x :: "'a" |
|
1307 |
and X :: "'a set" |
|
1308 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1309 |
and at: "at TYPE('x)" |
|
1310 |
and a: "x\<in>((rev pi)\<bullet>X)" |
|
1311 |
shows "(pi\<bullet>x)\<in>X" |
|
1312 |
using a by (simp add: pt_set_bij1[OF pt, OF at]) |
|
1313 |
||
26773 | 1314 |
(* FIXME: is this lemma needed anywhere? *) |
17870 | 1315 |
lemma pt_set_bij3: |
1316 |
fixes pi :: "'x prm" |
|
1317 |
and x :: "'a" |
|
1318 |
and X :: "'a set" |
|
1319 |
shows "pi\<bullet>(x\<in>X) = (x\<in>X)" |
|
26773 | 1320 |
by (simp add: perm_bool) |
17870 | 1321 |
|
18159
08282ca0402e
added a few equivariance lemmas (they need to be automated
urbanc
parents:
18068
diff
changeset
|
1322 |
lemma pt_subseteq_eqvt: |
08282ca0402e
added a few equivariance lemmas (they need to be automated
urbanc
parents:
18068
diff
changeset
|
1323 |
fixes pi :: "'x prm" |
08282ca0402e
added a few equivariance lemmas (they need to be automated
urbanc
parents:
18068
diff
changeset
|
1324 |
and Y :: "'a set" |
08282ca0402e
added a few equivariance lemmas (they need to be automated
urbanc
parents:
18068
diff
changeset
|
1325 |
and X :: "'a set" |
08282ca0402e
added a few equivariance lemmas (they need to be automated
urbanc
parents:
18068
diff
changeset
|
1326 |
assumes pt: "pt TYPE('a) TYPE('x)" |
08282ca0402e
added a few equivariance lemmas (they need to be automated
urbanc
parents:
18068
diff
changeset
|
1327 |
and at: "at TYPE('x)" |
26090 | 1328 |
shows "(pi\<bullet>(X\<subseteq>Y)) = ((pi\<bullet>X)\<subseteq>(pi\<bullet>Y))" |
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
1329 |
by (auto simp add: perm_set_def perm_bool pt_bij[OF pt, OF at]) |
18159
08282ca0402e
added a few equivariance lemmas (they need to be automated
urbanc
parents:
18068
diff
changeset
|
1330 |
|
19772
45897b49fdd2
added some further lemmas that deal with permutations and set-operators
urbanc
parents:
19771
diff
changeset
|
1331 |
lemma pt_set_diff_eqvt: |
45897b49fdd2
added some further lemmas that deal with permutations and set-operators
urbanc
parents:
19771
diff
changeset
|
1332 |
fixes X::"'a set" |
45897b49fdd2
added some further lemmas that deal with permutations and set-operators
urbanc
parents:
19771
diff
changeset
|
1333 |
and Y::"'a set" |
45897b49fdd2
added some further lemmas that deal with permutations and set-operators
urbanc
parents:
19771
diff
changeset
|
1334 |
and pi::"'x prm" |
45897b49fdd2
added some further lemmas that deal with permutations and set-operators
urbanc
parents:
19771
diff
changeset
|
1335 |
assumes pt: "pt TYPE('a) TYPE('x)" |
45897b49fdd2
added some further lemmas that deal with permutations and set-operators
urbanc
parents:
19771
diff
changeset
|
1336 |
and at: "at TYPE('x)" |
22829
f1db55c7534d
tuned some proofs and changed variable names in some definitions of Nominal.thy
urbanc
parents:
22808
diff
changeset
|
1337 |
shows "pi\<bullet>(X - Y) = (pi\<bullet>X) - (pi\<bullet>Y)" |
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
1338 |
by (auto simp add: perm_set_def pt_bij[OF pt, OF at]) |
19772
45897b49fdd2
added some further lemmas that deal with permutations and set-operators
urbanc
parents:
19771
diff
changeset
|
1339 |
|
22829
f1db55c7534d
tuned some proofs and changed variable names in some definitions of Nominal.thy
urbanc
parents:
22808
diff
changeset
|
1340 |
lemma pt_Collect_eqvt: |
f1db55c7534d
tuned some proofs and changed variable names in some definitions of Nominal.thy
urbanc
parents:
22808
diff
changeset
|
1341 |
fixes pi::"'x prm" |
f1db55c7534d
tuned some proofs and changed variable names in some definitions of Nominal.thy
urbanc
parents:
22808
diff
changeset
|
1342 |
assumes pt: "pt TYPE('a) TYPE('x)" |
f1db55c7534d
tuned some proofs and changed variable names in some definitions of Nominal.thy
urbanc
parents:
22808
diff
changeset
|
1343 |
and at: "at TYPE('x)" |
f1db55c7534d
tuned some proofs and changed variable names in some definitions of Nominal.thy
urbanc
parents:
22808
diff
changeset
|
1344 |
shows "pi\<bullet>{x::'a. P x} = {x. P ((rev pi)\<bullet>x)}" |
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
1345 |
apply(auto simp add: perm_set_def pt_rev_pi[OF pt, OF at]) |
22829
f1db55c7534d
tuned some proofs and changed variable names in some definitions of Nominal.thy
urbanc
parents:
22808
diff
changeset
|
1346 |
apply(rule_tac x="(rev pi)\<bullet>x" in exI) |
f1db55c7534d
tuned some proofs and changed variable names in some definitions of Nominal.thy
urbanc
parents:
22808
diff
changeset
|
1347 |
apply(simp add: pt_pi_rev[OF pt, OF at]) |
f1db55c7534d
tuned some proofs and changed variable names in some definitions of Nominal.thy
urbanc
parents:
22808
diff
changeset
|
1348 |
done |
19772
45897b49fdd2
added some further lemmas that deal with permutations and set-operators
urbanc
parents:
19771
diff
changeset
|
1349 |
|
17870 | 1350 |
-- "some helper lemmas for the pt_perm_supp_ineq lemma" |
1351 |
lemma Collect_permI: |
|
1352 |
fixes pi :: "'x prm" |
|
1353 |
and x :: "'a" |
|
1354 |
assumes a: "\<forall>x. (P1 x = P2 x)" |
|
1355 |
shows "{pi\<bullet>x| x. P1 x} = {pi\<bullet>x| x. P2 x}" |
|
1356 |
using a by force |
|
1357 |
||
1358 |
lemma Infinite_cong: |
|
1359 |
assumes a: "X = Y" |
|
1360 |
shows "infinite X = infinite Y" |
|
1361 |
using a by (simp) |
|
1362 |
||
1363 |
lemma pt_set_eq_ineq: |
|
1364 |
fixes pi :: "'y prm" |
|
1365 |
assumes pt: "pt TYPE('x) TYPE('y)" |
|
1366 |
and at: "at TYPE('y)" |
|
1367 |
shows "{pi\<bullet>x| x::'x. P x} = {x::'x. P ((rev pi)\<bullet>x)}" |
|
1368 |
by (force simp only: pt_rev_pi[OF pt, OF at] pt_pi_rev[OF pt, OF at]) |
|
1369 |
||
1370 |
lemma pt_inject_on_ineq: |
|
1371 |
fixes X :: "'y set" |
|
1372 |
and pi :: "'x prm" |
|
1373 |
assumes pt: "pt TYPE('y) TYPE('x)" |
|
1374 |
and at: "at TYPE('x)" |
|
1375 |
shows "inj_on (perm pi) X" |
|
1376 |
proof (unfold inj_on_def, intro strip) |
|
1377 |
fix x::"'y" and y::"'y" |
|
1378 |
assume "pi\<bullet>x = pi\<bullet>y" |
|
1379 |
thus "x=y" by (simp add: pt_bij[OF pt, OF at]) |
|
1380 |
qed |
|
1381 |
||
1382 |
lemma pt_set_finite_ineq: |
|
1383 |
fixes X :: "'x set" |
|
1384 |
and pi :: "'y prm" |
|
1385 |
assumes pt: "pt TYPE('x) TYPE('y)" |
|
1386 |
and at: "at TYPE('y)" |
|
1387 |
shows "finite (pi\<bullet>X) = finite X" |
|
1388 |
proof - |
|
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
1389 |
have image: "(pi\<bullet>X) = (perm pi ` X)" by (force simp only: perm_set_def) |
17870 | 1390 |
show ?thesis |
1391 |
proof (rule iffI) |
|
1392 |
assume "finite (pi\<bullet>X)" |
|
1393 |
hence "finite (perm pi ` X)" using image by (simp) |
|
1394 |
thus "finite X" using pt_inject_on_ineq[OF pt, OF at] by (rule finite_imageD) |
|
1395 |
next |
|
1396 |
assume "finite X" |
|
1397 |
hence "finite (perm pi ` X)" by (rule finite_imageI) |
|
1398 |
thus "finite (pi\<bullet>X)" using image by (simp) |
|
1399 |
qed |
|
1400 |
qed |
|
1401 |
||
1402 |
lemma pt_set_infinite_ineq: |
|
1403 |
fixes X :: "'x set" |
|
1404 |
and pi :: "'y prm" |
|
1405 |
assumes pt: "pt TYPE('x) TYPE('y)" |
|
1406 |
and at: "at TYPE('y)" |
|
1407 |
shows "infinite (pi\<bullet>X) = infinite X" |
|
1408 |
using pt at by (simp add: pt_set_finite_ineq) |
|
1409 |
||
1410 |
lemma pt_perm_supp_ineq: |
|
1411 |
fixes pi :: "'x prm" |
|
1412 |
and x :: "'a" |
|
1413 |
assumes pta: "pt TYPE('a) TYPE('x)" |
|
1414 |
and ptb: "pt TYPE('y) TYPE('x)" |
|
1415 |
and at: "at TYPE('x)" |
|
1416 |
and cp: "cp TYPE('a) TYPE('x) TYPE('y)" |
|
1417 |
shows "(pi\<bullet>((supp x)::'y set)) = supp (pi\<bullet>x)" (is "?LHS = ?RHS") |
|
1418 |
proof - |
|
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
1419 |
have "?LHS = {pi\<bullet>a | a. infinite {b. [(a,b)]\<bullet>x \<noteq> x}}" by (simp add: supp_def perm_set_def) |
17870 | 1420 |
also have "\<dots> = {pi\<bullet>a | a. infinite {pi\<bullet>b | b. [(a,b)]\<bullet>x \<noteq> x}}" |
1421 |
proof (rule Collect_permI, rule allI, rule iffI) |
|
1422 |
fix a |
|
1423 |
assume "infinite {b::'y. [(a,b)]\<bullet>x \<noteq> x}" |
|
1424 |
hence "infinite (pi\<bullet>{b::'y. [(a,b)]\<bullet>x \<noteq> x})" by (simp add: pt_set_infinite_ineq[OF ptb, OF at]) |
|
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
1425 |
thus "infinite {pi\<bullet>b |b::'y. [(a,b)]\<bullet>x \<noteq> x}" by (simp add: perm_set_def) |
17870 | 1426 |
next |
1427 |
fix a |
|
1428 |
assume "infinite {pi\<bullet>b |b::'y. [(a,b)]\<bullet>x \<noteq> x}" |
|
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
1429 |
hence "infinite (pi\<bullet>{b::'y. [(a,b)]\<bullet>x \<noteq> x})" by (simp add: perm_set_def) |
17870 | 1430 |
thus "infinite {b::'y. [(a,b)]\<bullet>x \<noteq> x}" |
1431 |
by (simp add: pt_set_infinite_ineq[OF ptb, OF at]) |
|
1432 |
qed |
|
1433 |
also have "\<dots> = {a. infinite {b::'y. [((rev pi)\<bullet>a,(rev pi)\<bullet>b)]\<bullet>x \<noteq> x}}" |
|
1434 |
by (simp add: pt_set_eq_ineq[OF ptb, OF at]) |
|
1435 |
also have "\<dots> = {a. infinite {b. pi\<bullet>([((rev pi)\<bullet>a,(rev pi)\<bullet>b)]\<bullet>x) \<noteq> (pi\<bullet>x)}}" |
|
1436 |
by (simp add: pt_bij[OF pta, OF at]) |
|
1437 |
also have "\<dots> = {a. infinite {b. [(a,b)]\<bullet>(pi\<bullet>x) \<noteq> (pi\<bullet>x)}}" |
|
1438 |
proof (rule Collect_cong, rule Infinite_cong, rule Collect_cong) |
|
1439 |
fix a::"'y" and b::"'y" |
|
1440 |
have "pi\<bullet>(([((rev pi)\<bullet>a,(rev pi)\<bullet>b)])\<bullet>x) = [(a,b)]\<bullet>(pi\<bullet>x)" |
|
1441 |
by (simp add: cp1[OF cp] pt_pi_rev[OF ptb, OF at]) |
|
1442 |
thus "(pi\<bullet>([((rev pi)\<bullet>a,(rev pi)\<bullet>b)]\<bullet>x) \<noteq> pi\<bullet>x) = ([(a,b)]\<bullet>(pi\<bullet>x) \<noteq> pi\<bullet>x)" by simp |
|
1443 |
qed |
|
1444 |
finally show "?LHS = ?RHS" by (simp add: supp_def) |
|
1445 |
qed |
|
1446 |
||
1447 |
lemma pt_perm_supp: |
|
1448 |
fixes pi :: "'x prm" |
|
1449 |
and x :: "'a" |
|
1450 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1451 |
and at: "at TYPE('x)" |
|
1452 |
shows "(pi\<bullet>((supp x)::'x set)) = supp (pi\<bullet>x)" |
|
1453 |
apply(rule pt_perm_supp_ineq) |
|
1454 |
apply(rule pt) |
|
1455 |
apply(rule at_pt_inst) |
|
1456 |
apply(rule at)+ |
|
1457 |
apply(rule cp_pt_inst) |
|
1458 |
apply(rule pt) |
|
1459 |
apply(rule at) |
|
1460 |
done |
|
1461 |
||
1462 |
lemma pt_supp_finite_pi: |
|
1463 |
fixes pi :: "'x prm" |
|
1464 |
and x :: "'a" |
|
1465 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1466 |
and at: "at TYPE('x)" |
|
1467 |
and f: "finite ((supp x)::'x set)" |
|
1468 |
shows "finite ((supp (pi\<bullet>x))::'x set)" |
|
1469 |
apply(simp add: pt_perm_supp[OF pt, OF at, symmetric]) |
|
1470 |
apply(simp add: pt_set_finite_ineq[OF at_pt_inst[OF at], OF at]) |
|
1471 |
apply(rule f) |
|
1472 |
done |
|
1473 |
||
1474 |
lemma pt_fresh_left_ineq: |
|
1475 |
fixes pi :: "'x prm" |
|
1476 |
and x :: "'a" |
|
1477 |
and a :: "'y" |
|
1478 |
assumes pta: "pt TYPE('a) TYPE('x)" |
|
1479 |
and ptb: "pt TYPE('y) TYPE('x)" |
|
1480 |
and at: "at TYPE('x)" |
|
1481 |
and cp: "cp TYPE('a) TYPE('x) TYPE('y)" |
|
1482 |
shows "a\<sharp>(pi\<bullet>x) = ((rev pi)\<bullet>a)\<sharp>x" |
|
1483 |
apply(simp add: fresh_def) |
|
1484 |
apply(simp add: pt_set_bij1[OF ptb, OF at]) |
|
1485 |
apply(simp add: pt_perm_supp_ineq[OF pta, OF ptb, OF at, OF cp]) |
|
1486 |
done |
|
1487 |
||
1488 |
lemma pt_fresh_right_ineq: |
|
1489 |
fixes pi :: "'x prm" |
|
1490 |
and x :: "'a" |
|
1491 |
and a :: "'y" |
|
1492 |
assumes pta: "pt TYPE('a) TYPE('x)" |
|
1493 |
and ptb: "pt TYPE('y) TYPE('x)" |
|
1494 |
and at: "at TYPE('x)" |
|
1495 |
and cp: "cp TYPE('a) TYPE('x) TYPE('y)" |
|
1496 |
shows "(pi\<bullet>a)\<sharp>x = a\<sharp>((rev pi)\<bullet>x)" |
|
1497 |
apply(simp add: fresh_def) |
|
1498 |
apply(simp add: pt_set_bij1[OF ptb, OF at]) |
|
1499 |
apply(simp add: pt_perm_supp_ineq[OF pta, OF ptb, OF at, OF cp]) |
|
1500 |
done |
|
1501 |
||
1502 |
lemma pt_fresh_bij_ineq: |
|
1503 |
fixes pi :: "'x prm" |
|
1504 |
and x :: "'a" |
|
1505 |
and a :: "'y" |
|
1506 |
assumes pta: "pt TYPE('a) TYPE('x)" |
|
1507 |
and ptb: "pt TYPE('y) TYPE('x)" |
|
1508 |
and at: "at TYPE('x)" |
|
1509 |
and cp: "cp TYPE('a) TYPE('x) TYPE('y)" |
|
1510 |
shows "(pi\<bullet>a)\<sharp>(pi\<bullet>x) = a\<sharp>x" |
|
1511 |
apply(simp add: pt_fresh_left_ineq[OF pta, OF ptb, OF at, OF cp]) |
|
1512 |
apply(simp add: pt_rev_pi[OF ptb, OF at]) |
|
1513 |
done |
|
1514 |
||
1515 |
lemma pt_fresh_left: |
|
1516 |
fixes pi :: "'x prm" |
|
1517 |
and x :: "'a" |
|
1518 |
and a :: "'x" |
|
1519 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1520 |
and at: "at TYPE('x)" |
|
1521 |
shows "a\<sharp>(pi\<bullet>x) = ((rev pi)\<bullet>a)\<sharp>x" |
|
1522 |
apply(rule pt_fresh_left_ineq) |
|
1523 |
apply(rule pt) |
|
1524 |
apply(rule at_pt_inst) |
|
1525 |
apply(rule at)+ |
|
1526 |
apply(rule cp_pt_inst) |
|
1527 |
apply(rule pt) |
|
1528 |
apply(rule at) |
|
1529 |
done |
|
1530 |
||
1531 |
lemma pt_fresh_right: |
|
1532 |
fixes pi :: "'x prm" |
|
1533 |
and x :: "'a" |
|
1534 |
and a :: "'x" |
|
1535 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1536 |
and at: "at TYPE('x)" |
|
1537 |
shows "(pi\<bullet>a)\<sharp>x = a\<sharp>((rev pi)\<bullet>x)" |
|
1538 |
apply(rule pt_fresh_right_ineq) |
|
1539 |
apply(rule pt) |
|
1540 |
apply(rule at_pt_inst) |
|
1541 |
apply(rule at)+ |
|
1542 |
apply(rule cp_pt_inst) |
|
1543 |
apply(rule pt) |
|
1544 |
apply(rule at) |
|
1545 |
done |
|
1546 |
||
1547 |
lemma pt_fresh_bij: |
|
1548 |
fixes pi :: "'x prm" |
|
1549 |
and x :: "'a" |
|
1550 |
and a :: "'x" |
|
1551 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1552 |
and at: "at TYPE('x)" |
|
1553 |
shows "(pi\<bullet>a)\<sharp>(pi\<bullet>x) = a\<sharp>x" |
|
1554 |
apply(rule pt_fresh_bij_ineq) |
|
1555 |
apply(rule pt) |
|
1556 |
apply(rule at_pt_inst) |
|
1557 |
apply(rule at)+ |
|
1558 |
apply(rule cp_pt_inst) |
|
1559 |
apply(rule pt) |
|
1560 |
apply(rule at) |
|
1561 |
done |
|
1562 |
||
1563 |
lemma pt_fresh_bij1: |
|
1564 |
fixes pi :: "'x prm" |
|
1565 |
and x :: "'a" |
|
1566 |
and a :: "'x" |
|
1567 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1568 |
and at: "at TYPE('x)" |
|
1569 |
and a: "a\<sharp>x" |
|
1570 |
shows "(pi\<bullet>a)\<sharp>(pi\<bullet>x)" |
|
1571 |
using a by (simp add: pt_fresh_bij[OF pt, OF at]) |
|
1572 |
||
19566 | 1573 |
lemma pt_fresh_bij2: |
1574 |
fixes pi :: "'x prm" |
|
1575 |
and x :: "'a" |
|
1576 |
and a :: "'x" |
|
1577 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1578 |
and at: "at TYPE('x)" |
|
1579 |
and a: "(pi\<bullet>a)\<sharp>(pi\<bullet>x)" |
|
1580 |
shows "a\<sharp>x" |
|
1581 |
using a by (simp add: pt_fresh_bij[OF pt, OF at]) |
|
1582 |
||
19972
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
1583 |
lemma pt_fresh_eqvt: |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
1584 |
fixes pi :: "'x prm" |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
1585 |
and x :: "'a" |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
1586 |
and a :: "'x" |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
1587 |
assumes pt: "pt TYPE('a) TYPE('x)" |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
1588 |
and at: "at TYPE('x)" |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
1589 |
shows "pi\<bullet>(a\<sharp>x) = (pi\<bullet>a)\<sharp>(pi\<bullet>x)" |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
1590 |
by (simp add: perm_bool pt_fresh_bij[OF pt, OF at]) |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
1591 |
|
17870 | 1592 |
lemma pt_perm_fresh1: |
1593 |
fixes a :: "'x" |
|
1594 |
and b :: "'x" |
|
1595 |
and x :: "'a" |
|
1596 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1597 |
and at: "at TYPE ('x)" |
|
1598 |
and a1: "\<not>(a\<sharp>x)" |
|
1599 |
and a2: "b\<sharp>x" |
|
1600 |
shows "[(a,b)]\<bullet>x \<noteq> x" |
|
1601 |
proof |
|
1602 |
assume neg: "[(a,b)]\<bullet>x = x" |
|
1603 |
from a1 have a1':"a\<in>(supp x)" by (simp add: fresh_def) |
|
1604 |
from a2 have a2':"b\<notin>(supp x)" by (simp add: fresh_def) |
|
1605 |
from a1' a2' have a3: "a\<noteq>b" by force |
|
1606 |
from a1' have "([(a,b)]\<bullet>a)\<in>([(a,b)]\<bullet>(supp x))" |
|
1607 |
by (simp only: pt_set_bij[OF at_pt_inst[OF at], OF at]) |
|
19325 | 1608 |
hence "b\<in>([(a,b)]\<bullet>(supp x))" by (simp add: at_calc[OF at]) |
17870 | 1609 |
hence "b\<in>(supp ([(a,b)]\<bullet>x))" by (simp add: pt_perm_supp[OF pt,OF at]) |
1610 |
with a2' neg show False by simp |
|
1611 |
qed |
|
1612 |
||
19638
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
1613 |
(* the next two lemmas are needed in the proof *) |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
1614 |
(* of the structural induction principle *) |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
1615 |
lemma pt_fresh_aux: |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
1616 |
fixes a::"'x" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
1617 |
and b::"'x" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
1618 |
and c::"'x" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
1619 |
and x::"'a" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
1620 |
assumes pt: "pt TYPE('a) TYPE('x)" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
1621 |
and at: "at TYPE ('x)" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
1622 |
assumes a1: "c\<noteq>a" and a2: "a\<sharp>x" and a3: "c\<sharp>x" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
1623 |
shows "c\<sharp>([(a,b)]\<bullet>x)" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
1624 |
using a1 a2 a3 by (simp_all add: pt_fresh_left[OF pt, OF at] at_calc[OF at]) |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
1625 |
|
22786 | 1626 |
lemma pt_fresh_perm_app: |
1627 |
fixes pi :: "'x prm" |
|
1628 |
and a :: "'x" |
|
1629 |
and x :: "'y" |
|
1630 |
assumes pt: "pt TYPE('y) TYPE('x)" |
|
1631 |
and at: "at TYPE('x)" |
|
22829
f1db55c7534d
tuned some proofs and changed variable names in some definitions of Nominal.thy
urbanc
parents:
22808
diff
changeset
|
1632 |
and h1: "a\<sharp>pi" |
f1db55c7534d
tuned some proofs and changed variable names in some definitions of Nominal.thy
urbanc
parents:
22808
diff
changeset
|
1633 |
and h2: "a\<sharp>x" |
f1db55c7534d
tuned some proofs and changed variable names in some definitions of Nominal.thy
urbanc
parents:
22808
diff
changeset
|
1634 |
shows "a\<sharp>(pi\<bullet>x)" |
22786 | 1635 |
using assms |
1636 |
proof - |
|
22829
f1db55c7534d
tuned some proofs and changed variable names in some definitions of Nominal.thy
urbanc
parents:
22808
diff
changeset
|
1637 |
have "a\<sharp>(rev pi)"using h1 by (simp add: fresh_list_rev) |
f1db55c7534d
tuned some proofs and changed variable names in some definitions of Nominal.thy
urbanc
parents:
22808
diff
changeset
|
1638 |
then have "(rev pi)\<bullet>a = a" by (simp add: at_prm_fresh[OF at]) |
f1db55c7534d
tuned some proofs and changed variable names in some definitions of Nominal.thy
urbanc
parents:
22808
diff
changeset
|
1639 |
then have "((rev pi)\<bullet>a)\<sharp>x" using h2 by simp |
f1db55c7534d
tuned some proofs and changed variable names in some definitions of Nominal.thy
urbanc
parents:
22808
diff
changeset
|
1640 |
thus "a\<sharp>(pi\<bullet>x)" by (simp add: pt_fresh_right[OF pt, OF at]) |
22786 | 1641 |
qed |
1642 |
||
1643 |
lemma pt_fresh_perm_app_ineq: |
|
19638
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
1644 |
fixes pi::"'x prm" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
1645 |
and c::"'y" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
1646 |
and x::"'a" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
1647 |
assumes pta: "pt TYPE('a) TYPE('x)" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
1648 |
and ptb: "pt TYPE('y) TYPE('x)" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
1649 |
and at: "at TYPE('x)" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
1650 |
and cp: "cp TYPE('a) TYPE('x) TYPE('y)" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
1651 |
and dj: "disjoint TYPE('y) TYPE('x)" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
1652 |
assumes a: "c\<sharp>x" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
1653 |
shows "c\<sharp>(pi\<bullet>x)" |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
1654 |
using a by (simp add: pt_fresh_left_ineq[OF pta, OF ptb, OF at, OF cp] dj_perm_forget[OF dj]) |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
1655 |
|
22535
cbee450f88a6
added extended the lemma for equivariance of freshness
urbanc
parents:
22514
diff
changeset
|
1656 |
lemma pt_fresh_eqvt_ineq: |
cbee450f88a6
added extended the lemma for equivariance of freshness
urbanc
parents:
22514
diff
changeset
|
1657 |
fixes pi::"'x prm" |
cbee450f88a6
added extended the lemma for equivariance of freshness
urbanc
parents:
22514
diff
changeset
|
1658 |
and c::"'y" |
cbee450f88a6
added extended the lemma for equivariance of freshness
urbanc
parents:
22514
diff
changeset
|
1659 |
and x::"'a" |
cbee450f88a6
added extended the lemma for equivariance of freshness
urbanc
parents:
22514
diff
changeset
|
1660 |
assumes pta: "pt TYPE('a) TYPE('x)" |
cbee450f88a6
added extended the lemma for equivariance of freshness
urbanc
parents:
22514
diff
changeset
|
1661 |
and ptb: "pt TYPE('y) TYPE('x)" |
cbee450f88a6
added extended the lemma for equivariance of freshness
urbanc
parents:
22514
diff
changeset
|
1662 |
and at: "at TYPE('x)" |
cbee450f88a6
added extended the lemma for equivariance of freshness
urbanc
parents:
22514
diff
changeset
|
1663 |
and cp: "cp TYPE('a) TYPE('x) TYPE('y)" |
cbee450f88a6
added extended the lemma for equivariance of freshness
urbanc
parents:
22514
diff
changeset
|
1664 |
and dj: "disjoint TYPE('y) TYPE('x)" |
cbee450f88a6
added extended the lemma for equivariance of freshness
urbanc
parents:
22514
diff
changeset
|
1665 |
shows "pi\<bullet>(c\<sharp>x) = (pi\<bullet>c)\<sharp>(pi\<bullet>x)" |
cbee450f88a6
added extended the lemma for equivariance of freshness
urbanc
parents:
22514
diff
changeset
|
1666 |
by (simp add: pt_fresh_left_ineq[OF pta, OF ptb, OF at, OF cp] dj_perm_forget[OF dj] perm_bool) |
cbee450f88a6
added extended the lemma for equivariance of freshness
urbanc
parents:
22514
diff
changeset
|
1667 |
|
17870 | 1668 |
--"the co-set of a finite set is infinte" |
1669 |
lemma finite_infinite: |
|
1670 |
assumes a: "finite {b::'x. P b}" |
|
1671 |
and b: "infinite (UNIV::'x set)" |
|
1672 |
shows "infinite {b. \<not>P b}" |
|
27687 | 1673 |
proof - |
1674 |
from a b have "infinite (UNIV - {b::'x. P b})" by (simp add: Diff_infinite_finite) |
|
1675 |
moreover |
|
1676 |
have "{b::'x. \<not>P b} = UNIV - {b::'x. P b}" by auto |
|
1677 |
ultimately show "infinite {b::'x. \<not>P b}" by simp |
|
1678 |
qed |
|
17870 | 1679 |
|
1680 |
lemma pt_fresh_fresh: |
|
1681 |
fixes x :: "'a" |
|
1682 |
and a :: "'x" |
|
1683 |
and b :: "'x" |
|
1684 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1685 |
and at: "at TYPE ('x)" |
|
1686 |
and a1: "a\<sharp>x" and a2: "b\<sharp>x" |
|
1687 |
shows "[(a,b)]\<bullet>x=x" |
|
1688 |
proof (cases "a=b") |
|
19325 | 1689 |
assume "a=b" |
1690 |
hence "[(a,b)] \<triangleq> []" by (simp add: at_ds1[OF at]) |
|
17870 | 1691 |
hence "[(a,b)]\<bullet>x=([]::'x prm)\<bullet>x" by (rule pt3[OF pt]) |
1692 |
thus ?thesis by (simp only: pt1[OF pt]) |
|
1693 |
next |
|
1694 |
assume c2: "a\<noteq>b" |
|
1695 |
from a1 have f1: "finite {c. [(a,c)]\<bullet>x \<noteq> x}" by (simp add: fresh_def supp_def) |
|
1696 |
from a2 have f2: "finite {c. [(b,c)]\<bullet>x \<noteq> x}" by (simp add: fresh_def supp_def) |
|
1697 |
from f1 and f2 have f3: "finite {c. perm [(a,c)] x \<noteq> x \<or> perm [(b,c)] x \<noteq> x}" |
|
1698 |
by (force simp only: Collect_disj_eq) |
|
1699 |
have "infinite {c. [(a,c)]\<bullet>x = x \<and> [(b,c)]\<bullet>x = x}" |
|
1700 |
by (simp add: finite_infinite[OF f3,OF at4[OF at], simplified]) |
|
1701 |
hence "infinite ({c. [(a,c)]\<bullet>x = x \<and> [(b,c)]\<bullet>x = x}-{a,b})" |
|
1702 |
by (force dest: Diff_infinite_finite) |
|
29903 | 1703 |
hence "({c. [(a,c)]\<bullet>x = x \<and> [(b,c)]\<bullet>x = x}-{a,b}) \<noteq> {}" |
44683 | 1704 |
by (metis finite_set set_empty2) |
17870 | 1705 |
hence "\<exists>c. c\<in>({c. [(a,c)]\<bullet>x = x \<and> [(b,c)]\<bullet>x = x}-{a,b})" by (force) |
1706 |
then obtain c |
|
1707 |
where eq1: "[(a,c)]\<bullet>x = x" |
|
1708 |
and eq2: "[(b,c)]\<bullet>x = x" |
|
1709 |
and ineq: "a\<noteq>c \<and> b\<noteq>c" |
|
1710 |
by (force) |
|
1711 |
hence "[(a,c)]\<bullet>([(b,c)]\<bullet>([(a,c)]\<bullet>x)) = x" by simp |
|
1712 |
hence eq3: "[(a,c),(b,c),(a,c)]\<bullet>x = x" by (simp add: pt2[OF pt,symmetric]) |
|
18295
dd50de393330
changed \<sim> of permutation equality to \<triangleq>
urbanc
parents:
18294
diff
changeset
|
1713 |
from c2 ineq have "[(a,c),(b,c),(a,c)] \<triangleq> [(a,b)]" by (simp add: at_ds3[OF at]) |
17870 | 1714 |
hence "[(a,c),(b,c),(a,c)]\<bullet>x = [(a,b)]\<bullet>x" by (rule pt3[OF pt]) |
1715 |
thus ?thesis using eq3 by simp |
|
1716 |
qed |
|
1717 |
||
26773 | 1718 |
lemma pt_pi_fresh_fresh: |
1719 |
fixes x :: "'a" |
|
1720 |
and pi :: "'x prm" |
|
1721 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1722 |
and at: "at TYPE ('x)" |
|
1723 |
and a: "\<forall>(a,b)\<in>set pi. a\<sharp>x \<and> b\<sharp>x" |
|
1724 |
shows "pi\<bullet>x=x" |
|
1725 |
using a |
|
1726 |
proof (induct pi) |
|
1727 |
case Nil |
|
1728 |
show "([]::'x prm)\<bullet>x = x" by (rule pt1[OF pt]) |
|
1729 |
next |
|
1730 |
case (Cons ab pi) |
|
1731 |
have a: "\<forall>(a,b)\<in>set (ab#pi). a\<sharp>x \<and> b\<sharp>x" by fact |
|
1732 |
have ih: "(\<forall>(a,b)\<in>set pi. a\<sharp>x \<and> b\<sharp>x) \<Longrightarrow> pi\<bullet>x=x" by fact |
|
1733 |
obtain a b where e: "ab=(a,b)" by (cases ab) (auto) |
|
1734 |
from a have a': "a\<sharp>x" "b\<sharp>x" using e by auto |
|
1735 |
have "(ab#pi)\<bullet>x = ([(a,b)]@pi)\<bullet>x" using e by simp |
|
1736 |
also have "\<dots> = [(a,b)]\<bullet>(pi\<bullet>x)" by (simp only: pt2[OF pt]) |
|
1737 |
also have "\<dots> = [(a,b)]\<bullet>x" using ih a by simp |
|
1738 |
also have "\<dots> = x" using a' by (simp add: pt_fresh_fresh[OF pt, OF at]) |
|
1739 |
finally show "(ab#pi)\<bullet>x = x" by simp |
|
1740 |
qed |
|
1741 |
||
17870 | 1742 |
lemma pt_perm_compose: |
1743 |
fixes pi1 :: "'x prm" |
|
1744 |
and pi2 :: "'x prm" |
|
1745 |
and x :: "'a" |
|
1746 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1747 |
and at: "at TYPE('x)" |
|
1748 |
shows "pi2\<bullet>(pi1\<bullet>x) = (pi2\<bullet>pi1)\<bullet>(pi2\<bullet>x)" |
|
1749 |
proof - |
|
23393 | 1750 |
have "(pi2@pi1) \<triangleq> ((pi2\<bullet>pi1)@pi2)" by (rule at_ds8 [OF at]) |
17870 | 1751 |
hence "(pi2@pi1)\<bullet>x = ((pi2\<bullet>pi1)@pi2)\<bullet>x" by (rule pt3[OF pt]) |
1752 |
thus ?thesis by (simp add: pt2[OF pt]) |
|
1753 |
qed |
|
1754 |
||
19045 | 1755 |
lemma pt_perm_compose': |
1756 |
fixes pi1 :: "'x prm" |
|
1757 |
and pi2 :: "'x prm" |
|
1758 |
and x :: "'a" |
|
1759 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1760 |
and at: "at TYPE('x)" |
|
1761 |
shows "(pi2\<bullet>pi1)\<bullet>x = pi2\<bullet>(pi1\<bullet>((rev pi2)\<bullet>x))" |
|
1762 |
proof - |
|
1763 |
have "pi2\<bullet>(pi1\<bullet>((rev pi2)\<bullet>x)) = (pi2\<bullet>pi1)\<bullet>(pi2\<bullet>((rev pi2)\<bullet>x))" |
|
1764 |
by (rule pt_perm_compose[OF pt, OF at]) |
|
1765 |
also have "\<dots> = (pi2\<bullet>pi1)\<bullet>x" by (simp add: pt_pi_rev[OF pt, OF at]) |
|
1766 |
finally have "pi2\<bullet>(pi1\<bullet>((rev pi2)\<bullet>x)) = (pi2\<bullet>pi1)\<bullet>x" by simp |
|
1767 |
thus ?thesis by simp |
|
1768 |
qed |
|
1769 |
||
17870 | 1770 |
lemma pt_perm_compose_rev: |
1771 |
fixes pi1 :: "'x prm" |
|
1772 |
and pi2 :: "'x prm" |
|
1773 |
and x :: "'a" |
|
1774 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1775 |
and at: "at TYPE('x)" |
|
1776 |
shows "(rev pi2)\<bullet>((rev pi1)\<bullet>x) = (rev pi1)\<bullet>(rev (pi1\<bullet>pi2)\<bullet>x)" |
|
1777 |
proof - |
|
18295
dd50de393330
changed \<sim> of permutation equality to \<triangleq>
urbanc
parents:
18294
diff
changeset
|
1778 |
have "((rev pi2)@(rev pi1)) \<triangleq> ((rev pi1)@(rev (pi1\<bullet>pi2)))" by (rule at_ds9[OF at]) |
17870 | 1779 |
hence "((rev pi2)@(rev pi1))\<bullet>x = ((rev pi1)@(rev (pi1\<bullet>pi2)))\<bullet>x" by (rule pt3[OF pt]) |
1780 |
thus ?thesis by (simp add: pt2[OF pt]) |
|
1781 |
qed |
|
1782 |
||
30990
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
1783 |
section {* equivariance for some connectives *} |
19972
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
1784 |
lemma pt_all_eqvt: |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
1785 |
fixes pi :: "'x prm" |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
1786 |
and x :: "'a" |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
1787 |
assumes pt: "pt TYPE('a) TYPE('x)" |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
1788 |
and at: "at TYPE('x)" |
22715
381e6c45f13b
improved the equivariance lemmas for the quantifiers; had to export the lemma eqvt_force_add and eqvt_force_del in the thmdecls
urbanc
parents:
22714
diff
changeset
|
1789 |
shows "pi\<bullet>(\<forall>(x::'a). P x) = (\<forall>(x::'a). pi\<bullet>(P ((rev pi)\<bullet>x)))" |
19972
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
1790 |
apply(auto simp add: perm_bool perm_fun_def) |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
1791 |
apply(drule_tac x="pi\<bullet>x" in spec) |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
1792 |
apply(simp add: pt_rev_pi[OF pt, OF at]) |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
1793 |
done |
89c5afe4139a
added more infrastructure for the recursion combinator
urbanc
parents:
19869
diff
changeset
|
1794 |
|
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1795 |
lemma pt_ex_eqvt: |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1796 |
fixes pi :: "'x prm" |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1797 |
and x :: "'a" |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1798 |
assumes pt: "pt TYPE('a) TYPE('x)" |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1799 |
and at: "at TYPE('x)" |
22715
381e6c45f13b
improved the equivariance lemmas for the quantifiers; had to export the lemma eqvt_force_add and eqvt_force_del in the thmdecls
urbanc
parents:
22714
diff
changeset
|
1800 |
shows "pi\<bullet>(\<exists>(x::'a). P x) = (\<exists>(x::'a). pi\<bullet>(P ((rev pi)\<bullet>x)))" |
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1801 |
apply(auto simp add: perm_bool perm_fun_def) |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1802 |
apply(rule_tac x="pi\<bullet>x" in exI) |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1803 |
apply(simp add: pt_rev_pi[OF pt, OF at]) |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1804 |
done |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
1805 |
|
28011 | 1806 |
lemma pt_ex1_eqvt: |
1807 |
fixes pi :: "'x prm" |
|
1808 |
and x :: "'a" |
|
1809 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1810 |
and at: "at TYPE('x)" |
|
1811 |
shows "(pi\<bullet>(\<exists>!x. P (x::'a))) = (\<exists>!x. pi\<bullet>(P (rev pi\<bullet>x)))" |
|
1812 |
unfolding Ex1_def |
|
1813 |
by (simp add: pt_ex_eqvt[OF pt at] conj_eqvt pt_all_eqvt[OF pt at] |
|
1814 |
imp_eqvt pt_eq_eqvt[OF pt at] pt_pi_rev[OF pt at]) |
|
1815 |
||
1816 |
lemma pt_the_eqvt: |
|
1817 |
fixes pi :: "'x prm" |
|
1818 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1819 |
and at: "at TYPE('x)" |
|
1820 |
and unique: "\<exists>!x. P x" |
|
1821 |
shows "pi\<bullet>(THE(x::'a). P x) = (THE(x::'a). pi\<bullet>(P ((rev pi)\<bullet>x)))" |
|
1822 |
apply(rule the1_equality [symmetric]) |
|
1823 |
apply(simp add: pt_ex1_eqvt[OF pt at,symmetric]) |
|
1824 |
apply(simp add: perm_bool unique) |
|
1825 |
apply(simp add: perm_bool pt_rev_pi [OF pt at]) |
|
1826 |
apply(rule theI'[OF unique]) |
|
1827 |
done |
|
1828 |
||
17870 | 1829 |
section {* facts about supports *} |
1830 |
(*==============================*) |
|
1831 |
||
1832 |
lemma supports_subset: |
|
1833 |
fixes x :: "'a" |
|
1834 |
and S1 :: "'x set" |
|
1835 |
and S2 :: "'x set" |
|
1836 |
assumes a: "S1 supports x" |
|
18053
2719a6b7d95e
some minor tweaks in some proofs (nothing extraordinary)
urbanc
parents:
18048
diff
changeset
|
1837 |
and b: "S1 \<subseteq> S2" |
17870 | 1838 |
shows "S2 supports x" |
1839 |
using a b |
|
22808 | 1840 |
by (force simp add: supports_def) |
17870 | 1841 |
|
1842 |
lemma supp_is_subset: |
|
1843 |
fixes S :: "'x set" |
|
1844 |
and x :: "'a" |
|
1845 |
assumes a1: "S supports x" |
|
1846 |
and a2: "finite S" |
|
1847 |
shows "(supp x)\<subseteq>S" |
|
1848 |
proof (rule ccontr) |
|
1849 |
assume "\<not>(supp x \<subseteq> S)" |
|
1850 |
hence "\<exists>a. a\<in>(supp x) \<and> a\<notin>S" by force |
|
1851 |
then obtain a where b1: "a\<in>supp x" and b2: "a\<notin>S" by force |
|
22808 | 1852 |
from a1 b2 have "\<forall>b. (b\<notin>S \<longrightarrow> ([(a,b)]\<bullet>x = x))" by (unfold supports_def, force) |
19216 | 1853 |
hence "{b. [(a,b)]\<bullet>x \<noteq> x}\<subseteq>S" by force |
17870 | 1854 |
with a2 have "finite {b. [(a,b)]\<bullet>x \<noteq> x}" by (simp add: finite_subset) |
1855 |
hence "a\<notin>(supp x)" by (unfold supp_def, auto) |
|
1856 |
with b1 show False by simp |
|
1857 |
qed |
|
1858 |
||
18264 | 1859 |
lemma supp_supports: |
1860 |
fixes x :: "'a" |
|
1861 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1862 |
and at: "at TYPE ('x)" |
|
1863 |
shows "((supp x)::'x set) supports x" |
|
22808 | 1864 |
proof (unfold supports_def, intro strip) |
18264 | 1865 |
fix a b |
1866 |
assume "(a::'x)\<notin>(supp x) \<and> (b::'x)\<notin>(supp x)" |
|
1867 |
hence "a\<sharp>x" and "b\<sharp>x" by (auto simp add: fresh_def) |
|
1868 |
thus "[(a,b)]\<bullet>x = x" by (rule pt_fresh_fresh[OF pt, OF at]) |
|
1869 |
qed |
|
1870 |
||
17870 | 1871 |
lemma supports_finite: |
1872 |
fixes S :: "'x set" |
|
1873 |
and x :: "'a" |
|
1874 |
assumes a1: "S supports x" |
|
1875 |
and a2: "finite S" |
|
1876 |
shows "finite ((supp x)::'x set)" |
|
1877 |
proof - |
|
1878 |
have "(supp x)\<subseteq>S" using a1 a2 by (rule supp_is_subset) |
|
1879 |
thus ?thesis using a2 by (simp add: finite_subset) |
|
1880 |
qed |
|
1881 |
||
1882 |
lemma supp_is_inter: |
|
1883 |
fixes x :: "'a" |
|
1884 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1885 |
and at: "at TYPE ('x)" |
|
1886 |
and fs: "fs TYPE('a) TYPE('x)" |
|
1887 |
shows "((supp x)::'x set) = (\<Inter> {S. finite S \<and> S supports x})" |
|
1888 |
proof (rule equalityI) |
|
1889 |
show "((supp x)::'x set) \<subseteq> (\<Inter> {S. finite S \<and> S supports x})" |
|
1890 |
proof (clarify) |
|
1891 |
fix S c |
|
1892 |
assume b: "c\<in>((supp x)::'x set)" and "finite (S::'x set)" and "S supports x" |
|
1893 |
hence "((supp x)::'x set)\<subseteq>S" by (simp add: supp_is_subset) |
|
1894 |
with b show "c\<in>S" by force |
|
1895 |
qed |
|
1896 |
next |
|
1897 |
show "(\<Inter> {S. finite S \<and> S supports x}) \<subseteq> ((supp x)::'x set)" |
|
1898 |
proof (clarify, simp) |
|
1899 |
fix c |
|
1900 |
assume d: "\<forall>(S::'x set). finite S \<and> S supports x \<longrightarrow> c\<in>S" |
|
1901 |
have "((supp x)::'x set) supports x" by (rule supp_supports[OF pt, OF at]) |
|
1902 |
with d fs1[OF fs] show "c\<in>supp x" by force |
|
1903 |
qed |
|
1904 |
qed |
|
1905 |
||
1906 |
lemma supp_is_least_supports: |
|
1907 |
fixes S :: "'x set" |
|
1908 |
and x :: "'a" |
|
1909 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1910 |
and at: "at TYPE ('x)" |
|
1911 |
and a1: "S supports x" |
|
1912 |
and a2: "finite S" |
|
19477 | 1913 |
and a3: "\<forall>S'. (S' supports x) \<longrightarrow> S\<subseteq>S'" |
17870 | 1914 |
shows "S = (supp x)" |
1915 |
proof (rule equalityI) |
|
1916 |
show "((supp x)::'x set)\<subseteq>S" using a1 a2 by (rule supp_is_subset) |
|
1917 |
next |
|
19477 | 1918 |
have "((supp x)::'x set) supports x" by (rule supp_supports[OF pt, OF at]) |
1919 |
with a3 show "S\<subseteq>supp x" by force |
|
17870 | 1920 |
qed |
1921 |
||
1922 |
lemma supports_set: |
|
1923 |
fixes S :: "'x set" |
|
1924 |
and X :: "'a set" |
|
1925 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
1926 |
and at: "at TYPE ('x)" |
|
1927 |
and a: "\<forall>x\<in>X. (\<forall>(a::'x) (b::'x). a\<notin>S\<and>b\<notin>S \<longrightarrow> ([(a,b)]\<bullet>x)\<in>X)" |
|
1928 |
shows "S supports X" |
|
1929 |
using a |
|
22808 | 1930 |
apply(auto simp add: supports_def) |
17870 | 1931 |
apply(simp add: pt_set_bij1a[OF pt, OF at]) |
1932 |
apply(force simp add: pt_swap_bij[OF pt, OF at]) |
|
1933 |
apply(simp add: pt_set_bij1a[OF pt, OF at]) |
|
1934 |
done |
|
1935 |
||
1936 |
lemma supports_fresh: |
|
1937 |
fixes S :: "'x set" |
|
1938 |
and a :: "'x" |
|
1939 |
and x :: "'a" |
|
1940 |
assumes a1: "S supports x" |
|
1941 |
and a2: "finite S" |
|
1942 |
and a3: "a\<notin>S" |
|
1943 |
shows "a\<sharp>x" |
|
1944 |
proof (simp add: fresh_def) |
|
1945 |
have "(supp x)\<subseteq>S" using a1 a2 by (rule supp_is_subset) |
|
1946 |
thus "a\<notin>(supp x)" using a3 by force |
|
1947 |
qed |
|
1948 |
||
1949 |
lemma at_fin_set_supports: |
|
1950 |
fixes X::"'x set" |
|
1951 |
assumes at: "at TYPE('x)" |
|
1952 |
shows "X supports X" |
|
19329 | 1953 |
proof - |
26806 | 1954 |
have "\<forall>a b. a\<notin>X \<and> b\<notin>X \<longrightarrow> [(a,b)]\<bullet>X = X" |
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
1955 |
by (auto simp add: perm_set_def at_calc[OF at]) |
22808 | 1956 |
then show ?thesis by (simp add: supports_def) |
17870 | 1957 |
qed |
1958 |
||
19329 | 1959 |
lemma infinite_Collection: |
1960 |
assumes a1:"infinite X" |
|
1961 |
and a2:"\<forall>b\<in>X. P(b)" |
|
1962 |
shows "infinite {b\<in>X. P(b)}" |
|
1963 |
using a1 a2 |
|
1964 |
apply auto |
|
1965 |
apply (subgoal_tac "infinite (X - {b\<in>X. P b})") |
|
26806 | 1966 |
apply (simp add: set_diff_eq) |
19329 | 1967 |
apply (simp add: Diff_infinite_finite) |
1968 |
done |
|
1969 |
||
17870 | 1970 |
lemma at_fin_set_supp: |
19329 | 1971 |
fixes X::"'x set" |
17870 | 1972 |
assumes at: "at TYPE('x)" |
1973 |
and fs: "finite X" |
|
1974 |
shows "(supp X) = X" |
|
19329 | 1975 |
proof (rule subset_antisym) |
1976 |
show "(supp X) \<subseteq> X" using at_fin_set_supports[OF at] using fs by (simp add: supp_is_subset) |
|
1977 |
next |
|
1978 |
have inf: "infinite (UNIV-X)" using at4[OF at] fs by (auto simp add: Diff_infinite_finite) |
|
1979 |
{ fix a::"'x" |
|
1980 |
assume asm: "a\<in>X" |
|
26806 | 1981 |
hence "\<forall>b\<in>(UNIV-X). [(a,b)]\<bullet>X\<noteq>X" |
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
1982 |
by (auto simp add: perm_set_def at_calc[OF at]) |
19329 | 1983 |
with inf have "infinite {b\<in>(UNIV-X). [(a,b)]\<bullet>X\<noteq>X}" by (rule infinite_Collection) |
1984 |
hence "infinite {b. [(a,b)]\<bullet>X\<noteq>X}" by (rule_tac infinite_super, auto) |
|
1985 |
hence "a\<in>(supp X)" by (simp add: supp_def) |
|
1986 |
} |
|
1987 |
then show "X\<subseteq>(supp X)" by blast |
|
17870 | 1988 |
qed |
1989 |
||
25950 | 1990 |
lemma at_fin_set_fresh: |
1991 |
fixes X::"'x set" |
|
1992 |
assumes at: "at TYPE('x)" |
|
1993 |
and fs: "finite X" |
|
1994 |
shows "(x \<sharp> X) = (x \<notin> X)" |
|
1995 |
by (simp add: at_fin_set_supp fresh_def at fs) |
|
1996 |
||
30990
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
1997 |
|
17870 | 1998 |
section {* Permutations acting on Functions *} |
1999 |
(*==========================================*) |
|
2000 |
||
2001 |
lemma pt_fun_app_eq: |
|
2002 |
fixes f :: "'a\<Rightarrow>'b" |
|
2003 |
and x :: "'a" |
|
2004 |
and pi :: "'x prm" |
|
2005 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
2006 |
and at: "at TYPE('x)" |
|
2007 |
shows "pi\<bullet>(f x) = (pi\<bullet>f)(pi\<bullet>x)" |
|
2008 |
by (simp add: perm_fun_def pt_rev_pi[OF pt, OF at]) |
|
2009 |
||
2010 |
||
19045 | 2011 |
--"sometimes pt_fun_app_eq does too much; this lemma 'corrects it'" |
17870 | 2012 |
lemma pt_perm: |
2013 |
fixes x :: "'a" |
|
2014 |
and pi1 :: "'x prm" |
|
2015 |
and pi2 :: "'x prm" |
|
2016 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
2017 |
and at: "at TYPE ('x)" |
|
2018 |
shows "(pi1\<bullet>perm pi2)(pi1\<bullet>x) = pi1\<bullet>(pi2\<bullet>x)" |
|
2019 |
by (simp add: pt_fun_app_eq[OF pt, OF at]) |
|
2020 |
||
2021 |
||
2022 |
lemma pt_fun_eq: |
|
2023 |
fixes f :: "'a\<Rightarrow>'b" |
|
2024 |
and pi :: "'x prm" |
|
2025 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
2026 |
and at: "at TYPE('x)" |
|
2027 |
shows "(pi\<bullet>f = f) = (\<forall> x. pi\<bullet>(f x) = f (pi\<bullet>x))" (is "?LHS = ?RHS") |
|
2028 |
proof |
|
2029 |
assume a: "?LHS" |
|
2030 |
show "?RHS" |
|
2031 |
proof |
|
2032 |
fix x |
|
2033 |
have "pi\<bullet>(f x) = (pi\<bullet>f)(pi\<bullet>x)" by (simp add: pt_fun_app_eq[OF pt, OF at]) |
|
2034 |
also have "\<dots> = f (pi\<bullet>x)" using a by simp |
|
2035 |
finally show "pi\<bullet>(f x) = f (pi\<bullet>x)" by simp |
|
2036 |
qed |
|
2037 |
next |
|
2038 |
assume b: "?RHS" |
|
2039 |
show "?LHS" |
|
2040 |
proof (rule ccontr) |
|
2041 |
assume "(pi\<bullet>f) \<noteq> f" |
|
39302
d7728f65b353
renamed lemmas: ext_iff -> fun_eq_iff, set_ext_iff -> set_eq_iff, set_ext -> set_eqI
nipkow
parents:
39198
diff
changeset
|
2042 |
hence "\<exists>x. (pi\<bullet>f) x \<noteq> f x" by (simp add: fun_eq_iff) |
19477 | 2043 |
then obtain x where b1: "(pi\<bullet>f) x \<noteq> f x" by force |
2044 |
from b have "pi\<bullet>(f ((rev pi)\<bullet>x)) = f (pi\<bullet>((rev pi)\<bullet>x))" by force |
|
2045 |
hence "(pi\<bullet>f)(pi\<bullet>((rev pi)\<bullet>x)) = f (pi\<bullet>((rev pi)\<bullet>x))" |
|
17870 | 2046 |
by (simp add: pt_fun_app_eq[OF pt, OF at]) |
19477 | 2047 |
hence "(pi\<bullet>f) x = f x" by (simp add: pt_pi_rev[OF pt, OF at]) |
17870 | 2048 |
with b1 show "False" by simp |
2049 |
qed |
|
2050 |
qed |
|
2051 |
||
2052 |
-- "two helper lemmas for the equivariance of functions" |
|
2053 |
lemma pt_swap_eq_aux: |
|
2054 |
fixes y :: "'a" |
|
2055 |
and pi :: "'x prm" |
|
2056 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
2057 |
and a: "\<forall>(a::'x) (b::'x). [(a,b)]\<bullet>y = y" |
|
2058 |
shows "pi\<bullet>y = y" |
|
2059 |
proof(induct pi) |
|
24544 | 2060 |
case Nil show ?case by (simp add: pt1[OF pt]) |
2061 |
next |
|
2062 |
case (Cons x xs) |
|
2063 |
have ih: "xs\<bullet>y = y" by fact |
|
2064 |
obtain a b where p: "x=(a,b)" by force |
|
2065 |
have "((a,b)#xs)\<bullet>y = ([(a,b)]@xs)\<bullet>y" by simp |
|
2066 |
also have "\<dots> = [(a,b)]\<bullet>(xs\<bullet>y)" by (simp only: pt2[OF pt]) |
|
2067 |
finally show ?case using a ih p by simp |
|
2068 |
qed |
|
17870 | 2069 |
|
2070 |
lemma pt_swap_eq: |
|
2071 |
fixes y :: "'a" |
|
2072 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
2073 |
shows "(\<forall>(a::'x) (b::'x). [(a,b)]\<bullet>y = y) = (\<forall>pi::'x prm. pi\<bullet>y = y)" |
|
2074 |
by (force intro: pt_swap_eq_aux[OF pt]) |
|
2075 |
||
2076 |
lemma pt_eqvt_fun1a: |
|
2077 |
fixes f :: "'a\<Rightarrow>'b" |
|
2078 |
assumes pta: "pt TYPE('a) TYPE('x)" |
|
2079 |
and ptb: "pt TYPE('b) TYPE('x)" |
|
2080 |
and at: "at TYPE('x)" |
|
2081 |
and a: "((supp f)::'x set)={}" |
|
2082 |
shows "\<forall>(pi::'x prm). pi\<bullet>f = f" |
|
2083 |
proof (intro strip) |
|
2084 |
fix pi |
|
2085 |
have "\<forall>a b. a\<notin>((supp f)::'x set) \<and> b\<notin>((supp f)::'x set) \<longrightarrow> (([(a,b)]\<bullet>f) = f)" |
|
2086 |
by (intro strip, fold fresh_def, |
|
2087 |
simp add: pt_fresh_fresh[OF pt_fun_inst[OF pta, OF ptb, OF at],OF at]) |
|
2088 |
with a have "\<forall>(a::'x) (b::'x). ([(a,b)]\<bullet>f) = f" by force |
|
2089 |
hence "\<forall>(pi::'x prm). pi\<bullet>f = f" |
|
2090 |
by (simp add: pt_swap_eq[OF pt_fun_inst[OF pta, OF ptb, OF at]]) |
|
2091 |
thus "(pi::'x prm)\<bullet>f = f" by simp |
|
2092 |
qed |
|
2093 |
||
2094 |
lemma pt_eqvt_fun1b: |
|
2095 |
fixes f :: "'a\<Rightarrow>'b" |
|
2096 |
assumes a: "\<forall>(pi::'x prm). pi\<bullet>f = f" |
|
2097 |
shows "((supp f)::'x set)={}" |
|
2098 |
using a by (simp add: supp_def) |
|
2099 |
||
2100 |
lemma pt_eqvt_fun1: |
|
2101 |
fixes f :: "'a\<Rightarrow>'b" |
|
2102 |
assumes pta: "pt TYPE('a) TYPE('x)" |
|
2103 |
and ptb: "pt TYPE('b) TYPE('x)" |
|
2104 |
and at: "at TYPE('x)" |
|
2105 |
shows "(((supp f)::'x set)={}) = (\<forall>(pi::'x prm). pi\<bullet>f = f)" (is "?LHS = ?RHS") |
|
2106 |
by (rule iffI, simp add: pt_eqvt_fun1a[OF pta, OF ptb, OF at], simp add: pt_eqvt_fun1b) |
|
2107 |
||
2108 |
lemma pt_eqvt_fun2a: |
|
2109 |
fixes f :: "'a\<Rightarrow>'b" |
|
2110 |
assumes pta: "pt TYPE('a) TYPE('x)" |
|
2111 |
and ptb: "pt TYPE('b) TYPE('x)" |
|
2112 |
and at: "at TYPE('x)" |
|
2113 |
assumes a: "((supp f)::'x set)={}" |
|
2114 |
shows "\<forall>(pi::'x prm) (x::'a). pi\<bullet>(f x) = f(pi\<bullet>x)" |
|
2115 |
proof (intro strip) |
|
2116 |
fix pi x |
|
2117 |
from a have b: "\<forall>(pi::'x prm). pi\<bullet>f = f" by (simp add: pt_eqvt_fun1[OF pta, OF ptb, OF at]) |
|
2118 |
have "(pi::'x prm)\<bullet>(f x) = (pi\<bullet>f)(pi\<bullet>x)" by (simp add: pt_fun_app_eq[OF pta, OF at]) |
|
2119 |
with b show "(pi::'x prm)\<bullet>(f x) = f (pi\<bullet>x)" by force |
|
2120 |
qed |
|
2121 |
||
2122 |
lemma pt_eqvt_fun2b: |
|
2123 |
fixes f :: "'a\<Rightarrow>'b" |
|
2124 |
assumes pt1: "pt TYPE('a) TYPE('x)" |
|
2125 |
and pt2: "pt TYPE('b) TYPE('x)" |
|
2126 |
and at: "at TYPE('x)" |
|
2127 |
assumes a: "\<forall>(pi::'x prm) (x::'a). pi\<bullet>(f x) = f(pi\<bullet>x)" |
|
2128 |
shows "((supp f)::'x set)={}" |
|
2129 |
proof - |
|
2130 |
from a have "\<forall>(pi::'x prm). pi\<bullet>f = f" by (simp add: pt_fun_eq[OF pt1, OF at, symmetric]) |
|
2131 |
thus ?thesis by (simp add: supp_def) |
|
2132 |
qed |
|
2133 |
||
2134 |
lemma pt_eqvt_fun2: |
|
2135 |
fixes f :: "'a\<Rightarrow>'b" |
|
2136 |
assumes pta: "pt TYPE('a) TYPE('x)" |
|
2137 |
and ptb: "pt TYPE('b) TYPE('x)" |
|
2138 |
and at: "at TYPE('x)" |
|
2139 |
shows "(((supp f)::'x set)={}) = (\<forall>(pi::'x prm) (x::'a). pi\<bullet>(f x) = f(pi\<bullet>x))" |
|
2140 |
by (rule iffI, |
|
2141 |
simp add: pt_eqvt_fun2a[OF pta, OF ptb, OF at], |
|
2142 |
simp add: pt_eqvt_fun2b[OF pta, OF ptb, OF at]) |
|
2143 |
||
2144 |
lemma pt_supp_fun_subset: |
|
2145 |
fixes f :: "'a\<Rightarrow>'b" |
|
2146 |
assumes pta: "pt TYPE('a) TYPE('x)" |
|
2147 |
and ptb: "pt TYPE('b) TYPE('x)" |
|
2148 |
and at: "at TYPE('x)" |
|
2149 |
and f1: "finite ((supp f)::'x set)" |
|
2150 |
and f2: "finite ((supp x)::'x set)" |
|
2151 |
shows "supp (f x) \<subseteq> (((supp f)\<union>(supp x))::'x set)" |
|
2152 |
proof - |
|
2153 |
have s1: "((supp f)\<union>((supp x)::'x set)) supports (f x)" |
|
22808 | 2154 |
proof (simp add: supports_def, fold fresh_def, auto) |
17870 | 2155 |
fix a::"'x" and b::"'x" |
2156 |
assume "a\<sharp>f" and "b\<sharp>f" |
|
2157 |
hence a1: "[(a,b)]\<bullet>f = f" |
|
2158 |
by (rule pt_fresh_fresh[OF pt_fun_inst[OF pta, OF ptb, OF at], OF at]) |
|
2159 |
assume "a\<sharp>x" and "b\<sharp>x" |
|
2160 |
hence a2: "[(a,b)]\<bullet>x = x" by (rule pt_fresh_fresh[OF pta, OF at]) |
|
2161 |
from a1 a2 show "[(a,b)]\<bullet>(f x) = (f x)" by (simp add: pt_fun_app_eq[OF pta, OF at]) |
|
2162 |
qed |
|
2163 |
from f1 f2 have "finite ((supp f)\<union>((supp x)::'x set))" by force |
|
2164 |
with s1 show ?thesis by (rule supp_is_subset) |
|
2165 |
qed |
|
2166 |
||
2167 |
lemma pt_empty_supp_fun_subset: |
|
2168 |
fixes f :: "'a\<Rightarrow>'b" |
|
2169 |
assumes pta: "pt TYPE('a) TYPE('x)" |
|
2170 |
and ptb: "pt TYPE('b) TYPE('x)" |
|
2171 |
and at: "at TYPE('x)" |
|
2172 |
and e: "(supp f)=({}::'x set)" |
|
2173 |
shows "supp (f x) \<subseteq> ((supp x)::'x set)" |
|
2174 |
proof (unfold supp_def, auto) |
|
2175 |
fix a::"'x" |
|
2176 |
assume a1: "finite {b. [(a, b)]\<bullet>x \<noteq> x}" |
|
2177 |
assume "infinite {b. [(a, b)]\<bullet>(f x) \<noteq> f x}" |
|
2178 |
hence a2: "infinite {b. f ([(a, b)]\<bullet>x) \<noteq> f x}" using e |
|
2179 |
by (simp add: pt_eqvt_fun2[OF pta, OF ptb, OF at]) |
|
2180 |
have a3: "{b. f ([(a,b)]\<bullet>x) \<noteq> f x}\<subseteq>{b. [(a,b)]\<bullet>x \<noteq> x}" by force |
|
2181 |
from a1 a2 a3 show False by (force dest: finite_subset) |
|
2182 |
qed |
|
2183 |
||
18264 | 2184 |
section {* Facts about the support of finite sets of finitely supported things *} |
2185 |
(*=============================================================================*) |
|
2186 |
||
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
32960
diff
changeset
|
2187 |
definition X_to_Un_supp :: "('a set) \<Rightarrow> 'x set" where |
18264 | 2188 |
"X_to_Un_supp X \<equiv> \<Union>x\<in>X. ((supp x)::'x set)" |
2189 |
||
2190 |
lemma UNION_f_eqvt: |
|
2191 |
fixes X::"('a set)" |
|
2192 |
and f::"'a \<Rightarrow> 'x set" |
|
2193 |
and pi::"'x prm" |
|
2194 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
2195 |
and at: "at TYPE('x)" |
|
2196 |
shows "pi\<bullet>(\<Union>x\<in>X. f x) = (\<Union>x\<in>(pi\<bullet>X). (pi\<bullet>f) x)" |
|
2197 |
proof - |
|
2198 |
have pt_x: "pt TYPE('x) TYPE('x)" by (force intro: at_pt_inst at) |
|
2199 |
show ?thesis |
|
18351 | 2200 |
proof (rule equalityI) |
2201 |
case goal1 |
|
2202 |
show "pi\<bullet>(\<Union>x\<in>X. f x) \<subseteq> (\<Union>x\<in>(pi\<bullet>X). (pi\<bullet>f) x)" |
|
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
2203 |
apply(auto simp add: perm_set_def) |
22829
f1db55c7534d
tuned some proofs and changed variable names in some definitions of Nominal.thy
urbanc
parents:
22808
diff
changeset
|
2204 |
apply(rule_tac x="pi\<bullet>xb" in exI) |
18351 | 2205 |
apply(rule conjI) |
22829
f1db55c7534d
tuned some proofs and changed variable names in some definitions of Nominal.thy
urbanc
parents:
22808
diff
changeset
|
2206 |
apply(rule_tac x="xb" in exI) |
18351 | 2207 |
apply(simp) |
22829
f1db55c7534d
tuned some proofs and changed variable names in some definitions of Nominal.thy
urbanc
parents:
22808
diff
changeset
|
2208 |
apply(subgoal_tac "(pi\<bullet>f) (pi\<bullet>xb) = pi\<bullet>(f xb)")(*A*) |
18351 | 2209 |
apply(simp) |
2210 |
apply(rule pt_set_bij2[OF pt_x, OF at]) |
|
2211 |
apply(assumption) |
|
2212 |
(*A*) |
|
2213 |
apply(rule sym) |
|
2214 |
apply(rule pt_fun_app_eq[OF pt, OF at]) |
|
2215 |
done |
|
2216 |
next |
|
2217 |
case goal2 |
|
2218 |
show "(\<Union>x\<in>(pi\<bullet>X). (pi\<bullet>f) x) \<subseteq> pi\<bullet>(\<Union>x\<in>X. f x)" |
|
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
2219 |
apply(auto simp add: perm_set_def) |
18351 | 2220 |
apply(rule_tac x="(rev pi)\<bullet>x" in exI) |
2221 |
apply(rule conjI) |
|
2222 |
apply(simp add: pt_pi_rev[OF pt_x, OF at]) |
|
22829
f1db55c7534d
tuned some proofs and changed variable names in some definitions of Nominal.thy
urbanc
parents:
22808
diff
changeset
|
2223 |
apply(rule_tac x="xb" in bexI) |
18351 | 2224 |
apply(simp add: pt_set_bij1[OF pt_x, OF at]) |
2225 |
apply(simp add: pt_fun_app_eq[OF pt, OF at]) |
|
2226 |
apply(assumption) |
|
2227 |
done |
|
2228 |
qed |
|
18264 | 2229 |
qed |
2230 |
||
2231 |
lemma X_to_Un_supp_eqvt: |
|
2232 |
fixes X::"('a set)" |
|
2233 |
and pi::"'x prm" |
|
2234 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
2235 |
and at: "at TYPE('x)" |
|
2236 |
shows "pi\<bullet>(X_to_Un_supp X) = ((X_to_Un_supp (pi\<bullet>X))::'x set)" |
|
2237 |
apply(simp add: X_to_Un_supp_def) |
|
45961 | 2238 |
apply(simp add: UNION_f_eqvt[OF pt, OF at] perm_fun_def) |
18264 | 2239 |
apply(simp add: pt_perm_supp[OF pt, OF at]) |
2240 |
apply(simp add: pt_pi_rev[OF pt, OF at]) |
|
2241 |
done |
|
2242 |
||
2243 |
lemma Union_supports_set: |
|
2244 |
fixes X::"('a set)" |
|
2245 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
2246 |
and at: "at TYPE('x)" |
|
2247 |
shows "(\<Union>x\<in>X. ((supp x)::'x set)) supports X" |
|
22808 | 2248 |
apply(simp add: supports_def fresh_def[symmetric]) |
18264 | 2249 |
apply(rule allI)+ |
2250 |
apply(rule impI) |
|
2251 |
apply(erule conjE) |
|
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
2252 |
apply(simp add: perm_set_def) |
18264 | 2253 |
apply(auto) |
22829
f1db55c7534d
tuned some proofs and changed variable names in some definitions of Nominal.thy
urbanc
parents:
22808
diff
changeset
|
2254 |
apply(subgoal_tac "[(a,b)]\<bullet>xa = xa")(*A*) |
18264 | 2255 |
apply(simp) |
2256 |
apply(rule pt_fresh_fresh[OF pt, OF at]) |
|
2257 |
apply(force) |
|
2258 |
apply(force) |
|
2259 |
apply(rule_tac x="x" in exI) |
|
2260 |
apply(simp) |
|
2261 |
apply(rule sym) |
|
2262 |
apply(rule pt_fresh_fresh[OF pt, OF at]) |
|
2263 |
apply(force)+ |
|
2264 |
done |
|
2265 |
||
2266 |
lemma Union_of_fin_supp_sets: |
|
2267 |
fixes X::"('a set)" |
|
2268 |
assumes fs: "fs TYPE('a) TYPE('x)" |
|
2269 |
and fi: "finite X" |
|
2270 |
shows "finite (\<Union>x\<in>X. ((supp x)::'x set))" |
|
2271 |
using fi by (induct, auto simp add: fs1[OF fs]) |
|
2272 |
||
2273 |
lemma Union_included_in_supp: |
|
2274 |
fixes X::"('a set)" |
|
2275 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
2276 |
and at: "at TYPE('x)" |
|
2277 |
and fs: "fs TYPE('a) TYPE('x)" |
|
2278 |
and fi: "finite X" |
|
2279 |
shows "(\<Union>x\<in>X. ((supp x)::'x set)) \<subseteq> supp X" |
|
2280 |
proof - |
|
2281 |
have "supp ((X_to_Un_supp X)::'x set) \<subseteq> ((supp X)::'x set)" |
|
2282 |
apply(rule pt_empty_supp_fun_subset) |
|
45961 | 2283 |
apply(force intro: pt_set_inst at_pt_inst pt at)+ |
18264 | 2284 |
apply(rule pt_eqvt_fun2b) |
45961 | 2285 |
apply(force intro: pt_set_inst at_pt_inst pt at)+ |
18351 | 2286 |
apply(rule allI)+ |
18264 | 2287 |
apply(rule X_to_Un_supp_eqvt[OF pt, OF at]) |
2288 |
done |
|
2289 |
hence "supp (\<Union>x\<in>X. ((supp x)::'x set)) \<subseteq> ((supp X)::'x set)" by (simp add: X_to_Un_supp_def) |
|
2290 |
moreover |
|
2291 |
have "supp (\<Union>x\<in>X. ((supp x)::'x set)) = (\<Union>x\<in>X. ((supp x)::'x set))" |
|
2292 |
apply(rule at_fin_set_supp[OF at]) |
|
2293 |
apply(rule Union_of_fin_supp_sets[OF fs, OF fi]) |
|
2294 |
done |
|
2295 |
ultimately show ?thesis by force |
|
2296 |
qed |
|
2297 |
||
2298 |
lemma supp_of_fin_sets: |
|
2299 |
fixes X::"('a set)" |
|
2300 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
2301 |
and at: "at TYPE('x)" |
|
2302 |
and fs: "fs TYPE('a) TYPE('x)" |
|
2303 |
and fi: "finite X" |
|
2304 |
shows "(supp X) = (\<Union>x\<in>X. ((supp x)::'x set))" |
|
18351 | 2305 |
apply(rule equalityI) |
18264 | 2306 |
apply(rule supp_is_subset) |
2307 |
apply(rule Union_supports_set[OF pt, OF at]) |
|
2308 |
apply(rule Union_of_fin_supp_sets[OF fs, OF fi]) |
|
2309 |
apply(rule Union_included_in_supp[OF pt, OF at, OF fs, OF fi]) |
|
2310 |
done |
|
2311 |
||
2312 |
lemma supp_fin_union: |
|
2313 |
fixes X::"('a set)" |
|
2314 |
and Y::"('a set)" |
|
2315 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
2316 |
and at: "at TYPE('x)" |
|
2317 |
and fs: "fs TYPE('a) TYPE('x)" |
|
2318 |
and f1: "finite X" |
|
2319 |
and f2: "finite Y" |
|
2320 |
shows "(supp (X\<union>Y)) = (supp X)\<union>((supp Y)::'x set)" |
|
2321 |
using f1 f2 by (force simp add: supp_of_fin_sets[OF pt, OF at, OF fs]) |
|
2322 |
||
2323 |
lemma supp_fin_insert: |
|
2324 |
fixes X::"('a set)" |
|
2325 |
and x::"'a" |
|
2326 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
2327 |
and at: "at TYPE('x)" |
|
2328 |
and fs: "fs TYPE('a) TYPE('x)" |
|
2329 |
and f: "finite X" |
|
2330 |
shows "(supp (insert x X)) = (supp x)\<union>((supp X)::'x set)" |
|
2331 |
proof - |
|
2332 |
have "(supp (insert x X)) = ((supp ({x}\<union>(X::'a set)))::'x set)" by simp |
|
2333 |
also have "\<dots> = (supp {x})\<union>(supp X)" |
|
2334 |
by (rule supp_fin_union[OF pt, OF at, OF fs], simp_all add: f) |
|
2335 |
finally show "(supp (insert x X)) = (supp x)\<union>((supp X)::'x set)" |
|
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
2336 |
by (simp add: supp_singleton) |
18264 | 2337 |
qed |
2338 |
||
2339 |
lemma fresh_fin_union: |
|
2340 |
fixes X::"('a set)" |
|
2341 |
and Y::"('a set)" |
|
2342 |
and a::"'x" |
|
2343 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
2344 |
and at: "at TYPE('x)" |
|
2345 |
and fs: "fs TYPE('a) TYPE('x)" |
|
2346 |
and f1: "finite X" |
|
2347 |
and f2: "finite Y" |
|
2348 |
shows "a\<sharp>(X\<union>Y) = (a\<sharp>X \<and> a\<sharp>Y)" |
|
2349 |
apply(simp add: fresh_def) |
|
2350 |
apply(simp add: supp_fin_union[OF pt, OF at, OF fs, OF f1, OF f2]) |
|
2351 |
done |
|
2352 |
||
2353 |
lemma fresh_fin_insert: |
|
2354 |
fixes X::"('a set)" |
|
2355 |
and x::"'a" |
|
2356 |
and a::"'x" |
|
2357 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
2358 |
and at: "at TYPE('x)" |
|
2359 |
and fs: "fs TYPE('a) TYPE('x)" |
|
2360 |
and f: "finite X" |
|
2361 |
shows "a\<sharp>(insert x X) = (a\<sharp>x \<and> a\<sharp>X)" |
|
2362 |
apply(simp add: fresh_def) |
|
2363 |
apply(simp add: supp_fin_insert[OF pt, OF at, OF fs, OF f]) |
|
2364 |
done |
|
2365 |
||
2366 |
lemma fresh_fin_insert1: |
|
2367 |
fixes X::"('a set)" |
|
2368 |
and x::"'a" |
|
2369 |
and a::"'x" |
|
2370 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
2371 |
and at: "at TYPE('x)" |
|
2372 |
and fs: "fs TYPE('a) TYPE('x)" |
|
2373 |
and f: "finite X" |
|
2374 |
and a1: "a\<sharp>x" |
|
2375 |
and a2: "a\<sharp>X" |
|
2376 |
shows "a\<sharp>(insert x X)" |
|
30990
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2377 |
using a1 a2 |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2378 |
by (simp add: fresh_fin_insert[OF pt, OF at, OF fs, OF f]) |
18264 | 2379 |
|
2380 |
lemma pt_list_set_supp: |
|
2381 |
fixes xs :: "'a list" |
|
2382 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
2383 |
and at: "at TYPE('x)" |
|
2384 |
and fs: "fs TYPE('a) TYPE('x)" |
|
2385 |
shows "supp (set xs) = ((supp xs)::'x set)" |
|
2386 |
proof - |
|
2387 |
have "supp (set xs) = (\<Union>x\<in>(set xs). ((supp x)::'x set))" |
|
2388 |
by (rule supp_of_fin_sets[OF pt, OF at, OF fs], rule finite_set) |
|
2389 |
also have "(\<Union>x\<in>(set xs). ((supp x)::'x set)) = (supp xs)" |
|
2390 |
proof(induct xs) |
|
2391 |
case Nil show ?case by (simp add: supp_list_nil) |
|
2392 |
next |
|
2393 |
case (Cons h t) thus ?case by (simp add: supp_list_cons) |
|
2394 |
qed |
|
2395 |
finally show ?thesis by simp |
|
2396 |
qed |
|
2397 |
||
2398 |
lemma pt_list_set_fresh: |
|
2399 |
fixes a :: "'x" |
|
2400 |
and xs :: "'a list" |
|
2401 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
2402 |
and at: "at TYPE('x)" |
|
2403 |
and fs: "fs TYPE('a) TYPE('x)" |
|
2404 |
shows "a\<sharp>(set xs) = a\<sharp>xs" |
|
2405 |
by (simp add: fresh_def pt_list_set_supp[OF pt, OF at, OF fs]) |
|
26847 | 2406 |
|
30990
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2407 |
|
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2408 |
section {* generalisation of freshness to lists and sets of atoms *} |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2409 |
(*================================================================*) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2410 |
|
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2411 |
consts |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2412 |
fresh_star :: "'b \<Rightarrow> 'a \<Rightarrow> bool" ("_ \<sharp>* _" [100,100] 100) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2413 |
|
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2414 |
defs (overloaded) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2415 |
fresh_star_set: "xs\<sharp>*c \<equiv> \<forall>x\<in>xs. x\<sharp>c" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2416 |
|
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2417 |
defs (overloaded) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2418 |
fresh_star_list: "xs\<sharp>*c \<equiv> \<forall>x\<in>set xs. x\<sharp>c" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2419 |
|
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2420 |
lemmas fresh_star_def = fresh_star_list fresh_star_set |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2421 |
|
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2422 |
lemma fresh_star_prod_set: |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2423 |
fixes xs::"'a set" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2424 |
shows "xs\<sharp>*(a,b) = (xs\<sharp>*a \<and> xs\<sharp>*b)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2425 |
by (auto simp add: fresh_star_def fresh_prod) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2426 |
|
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2427 |
lemma fresh_star_prod_list: |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2428 |
fixes xs::"'a list" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2429 |
shows "xs\<sharp>*(a,b) = (xs\<sharp>*a \<and> xs\<sharp>*b)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2430 |
by (auto simp add: fresh_star_def fresh_prod) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2431 |
|
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2432 |
lemmas fresh_star_prod = fresh_star_prod_list fresh_star_prod_set |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2433 |
|
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2434 |
lemma fresh_star_set_eq: "set xs \<sharp>* c = xs \<sharp>* c" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2435 |
by (simp add: fresh_star_def) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2436 |
|
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2437 |
lemma fresh_star_Un_elim: |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2438 |
"((S \<union> T) \<sharp>* c \<Longrightarrow> PROP C) \<equiv> (S \<sharp>* c \<Longrightarrow> T \<sharp>* c \<Longrightarrow> PROP C)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2439 |
apply rule |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2440 |
apply (simp_all add: fresh_star_def) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2441 |
apply (erule meta_mp) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2442 |
apply blast |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2443 |
done |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2444 |
|
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2445 |
lemma fresh_star_insert_elim: |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2446 |
"(insert x S \<sharp>* c \<Longrightarrow> PROP C) \<equiv> (x \<sharp> c \<Longrightarrow> S \<sharp>* c \<Longrightarrow> PROP C)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2447 |
by rule (simp_all add: fresh_star_def) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2448 |
|
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2449 |
lemma fresh_star_empty_elim: |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2450 |
"({} \<sharp>* c \<Longrightarrow> PROP C) \<equiv> PROP C" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2451 |
by (simp add: fresh_star_def) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2452 |
|
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2453 |
text {* Normalization of freshness results; see \ @{text nominal_induct} *} |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2454 |
|
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2455 |
lemma fresh_star_unit_elim: |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2456 |
shows "((a::'a set)\<sharp>*() \<Longrightarrow> PROP C) \<equiv> PROP C" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2457 |
and "((b::'a list)\<sharp>*() \<Longrightarrow> PROP C) \<equiv> PROP C" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2458 |
by (simp_all add: fresh_star_def fresh_def supp_unit) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2459 |
|
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2460 |
lemma fresh_star_prod_elim: |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2461 |
shows "((a::'a set)\<sharp>*(x,y) \<Longrightarrow> PROP C) \<equiv> (a\<sharp>*x \<Longrightarrow> a\<sharp>*y \<Longrightarrow> PROP C)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2462 |
and "((b::'a list)\<sharp>*(x,y) \<Longrightarrow> PROP C) \<equiv> (b\<sharp>*x \<Longrightarrow> b\<sharp>*y \<Longrightarrow> PROP C)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2463 |
by (rule, simp_all add: fresh_star_prod)+ |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2464 |
|
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2465 |
|
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2466 |
lemma pt_fresh_star_bij_ineq: |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2467 |
fixes pi :: "'x prm" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2468 |
and x :: "'a" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2469 |
and a :: "'y set" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2470 |
and b :: "'y list" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2471 |
assumes pta: "pt TYPE('a) TYPE('x)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2472 |
and ptb: "pt TYPE('y) TYPE('x)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2473 |
and at: "at TYPE('x)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2474 |
and cp: "cp TYPE('a) TYPE('x) TYPE('y)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2475 |
shows "(pi\<bullet>a)\<sharp>*(pi\<bullet>x) = a\<sharp>*x" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2476 |
and "(pi\<bullet>b)\<sharp>*(pi\<bullet>x) = b\<sharp>*x" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2477 |
apply(unfold fresh_star_def) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2478 |
apply(auto) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2479 |
apply(drule_tac x="pi\<bullet>xa" in bspec) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2480 |
apply(erule pt_set_bij2[OF ptb, OF at]) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2481 |
apply(simp add: fresh_star_def pt_fresh_bij_ineq[OF pta, OF ptb, OF at, OF cp]) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2482 |
apply(drule_tac x="(rev pi)\<bullet>xa" in bspec) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2483 |
apply(simp add: pt_set_bij1[OF ptb, OF at]) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2484 |
apply(simp add: pt_fresh_left_ineq[OF pta, OF ptb, OF at, OF cp]) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2485 |
apply(drule_tac x="pi\<bullet>xa" in bspec) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2486 |
apply(simp add: pt_set_bij1[OF ptb, OF at]) |
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
2487 |
apply(simp add: set_eqvt pt_rev_pi[OF pt_list_inst[OF ptb], OF at]) |
30990
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2488 |
apply(simp add: pt_fresh_bij_ineq[OF pta, OF ptb, OF at, OF cp]) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2489 |
apply(drule_tac x="(rev pi)\<bullet>xa" in bspec) |
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
2490 |
apply(simp add: pt_set_bij1[OF ptb, OF at] set_eqvt) |
30990
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2491 |
apply(simp add: pt_fresh_left_ineq[OF pta, OF ptb, OF at, OF cp]) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2492 |
done |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2493 |
|
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2494 |
lemma pt_fresh_star_bij: |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2495 |
fixes pi :: "'x prm" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2496 |
and x :: "'a" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2497 |
and a :: "'x set" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2498 |
and b :: "'x list" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2499 |
assumes pt: "pt TYPE('a) TYPE('x)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2500 |
and at: "at TYPE('x)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2501 |
shows "(pi\<bullet>a)\<sharp>*(pi\<bullet>x) = a\<sharp>*x" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2502 |
and "(pi\<bullet>b)\<sharp>*(pi\<bullet>x) = b\<sharp>*x" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2503 |
apply(rule pt_fresh_star_bij_ineq(1)) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2504 |
apply(rule pt) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2505 |
apply(rule at_pt_inst) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2506 |
apply(rule at)+ |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2507 |
apply(rule cp_pt_inst) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2508 |
apply(rule pt) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2509 |
apply(rule at) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2510 |
apply(rule pt_fresh_star_bij_ineq(2)) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2511 |
apply(rule pt) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2512 |
apply(rule at_pt_inst) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2513 |
apply(rule at)+ |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2514 |
apply(rule cp_pt_inst) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2515 |
apply(rule pt) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2516 |
apply(rule at) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2517 |
done |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2518 |
|
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2519 |
lemma pt_fresh_star_eqvt: |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2520 |
fixes pi :: "'x prm" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2521 |
and x :: "'a" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2522 |
and a :: "'x set" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2523 |
and b :: "'x list" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2524 |
assumes pt: "pt TYPE('a) TYPE('x)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2525 |
and at: "at TYPE('x)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2526 |
shows "pi\<bullet>(a\<sharp>*x) = (pi\<bullet>a)\<sharp>*(pi\<bullet>x)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2527 |
and "pi\<bullet>(b\<sharp>*x) = (pi\<bullet>b)\<sharp>*(pi\<bullet>x)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2528 |
by (simp_all add: perm_bool pt_fresh_star_bij[OF pt, OF at]) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2529 |
|
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2530 |
lemma pt_fresh_star_eqvt_ineq: |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2531 |
fixes pi::"'x prm" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2532 |
and a::"'y set" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2533 |
and b::"'y list" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2534 |
and x::"'a" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2535 |
assumes pta: "pt TYPE('a) TYPE('x)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2536 |
and ptb: "pt TYPE('y) TYPE('x)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2537 |
and at: "at TYPE('x)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2538 |
and cp: "cp TYPE('a) TYPE('x) TYPE('y)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2539 |
and dj: "disjoint TYPE('y) TYPE('x)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2540 |
shows "pi\<bullet>(a\<sharp>*x) = (pi\<bullet>a)\<sharp>*(pi\<bullet>x)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2541 |
and "pi\<bullet>(b\<sharp>*x) = (pi\<bullet>b)\<sharp>*(pi\<bullet>x)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2542 |
by (simp_all add: pt_fresh_star_bij_ineq[OF pta, OF ptb, OF at, OF cp] dj_perm_forget[OF dj] perm_bool) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2543 |
|
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2544 |
lemma pt_freshs_freshs: |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2545 |
assumes pt: "pt TYPE('a) TYPE('x)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2546 |
and at: "at TYPE ('x)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2547 |
and pi: "set (pi::'x prm) \<subseteq> Xs \<times> Ys" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2548 |
and Xs: "Xs \<sharp>* (x::'a)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2549 |
and Ys: "Ys \<sharp>* x" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2550 |
shows "pi\<bullet>x = x" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2551 |
using pi |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2552 |
proof (induct pi) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2553 |
case Nil |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2554 |
show ?case by (simp add: pt1 [OF pt]) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2555 |
next |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2556 |
case (Cons p pi) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2557 |
obtain a b where p: "p = (a, b)" by (cases p) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2558 |
with Cons Xs Ys have "a \<sharp> x" "b \<sharp> x" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2559 |
by (simp_all add: fresh_star_def) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2560 |
with Cons p show ?case |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2561 |
by (simp add: pt_fresh_fresh [OF pt at] |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2562 |
pt2 [OF pt, of "[(a, b)]" pi, simplified]) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2563 |
qed |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2564 |
|
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2565 |
lemma pt_fresh_star_pi: |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2566 |
fixes x::"'a" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2567 |
and pi::"'x prm" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2568 |
assumes pt: "pt TYPE('a) TYPE('x)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2569 |
and at: "at TYPE('x)" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2570 |
and a: "((supp x)::'x set)\<sharp>* pi" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2571 |
shows "pi\<bullet>x = x" |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2572 |
using a |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2573 |
apply(induct pi) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2574 |
apply(auto simp add: fresh_star_def fresh_list_cons fresh_prod pt1[OF pt]) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2575 |
apply(subgoal_tac "((a,b)#pi)\<bullet>x = ([(a,b)]@pi)\<bullet>x") |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2576 |
apply(simp only: pt2[OF pt]) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2577 |
apply(rule pt_fresh_fresh[OF pt at]) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2578 |
apply(simp add: fresh_def at_supp[OF at]) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2579 |
apply(blast) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2580 |
apply(simp add: fresh_def at_supp[OF at]) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2581 |
apply(blast) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2582 |
apply(simp add: pt2[OF pt]) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2583 |
done |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2584 |
|
26847 | 2585 |
section {* Infrastructure lemmas for strong rule inductions *} |
2586 |
(*==========================================================*) |
|
2587 |
||
2588 |
text {* |
|
2589 |
For every set of atoms, there is another set of atoms |
|
2590 |
avoiding a finitely supported c and there is a permutation |
|
30990
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
2591 |
which 'translates' between both sets. |
26847 | 2592 |
*} |
32638 | 2593 |
|
26847 | 2594 |
lemma at_set_avoiding_aux: |
2595 |
fixes Xs::"'a set" |
|
2596 |
and As::"'a set" |
|
2597 |
assumes at: "at TYPE('a)" |
|
2598 |
and b: "Xs \<subseteq> As" |
|
2599 |
and c: "finite As" |
|
2600 |
and d: "finite ((supp c)::'a set)" |
|
32638 | 2601 |
shows "\<exists>(pi::'a prm). (pi\<bullet>Xs)\<sharp>*c \<and> (pi\<bullet>Xs) \<inter> As = {} \<and> set pi \<subseteq> Xs \<times> (pi\<bullet>Xs)" |
2602 |
proof - |
|
2603 |
from b c have "finite Xs" by (simp add: finite_subset) |
|
2604 |
then show ?thesis using b |
|
2605 |
proof (induct) |
|
2606 |
case empty |
|
2607 |
have "({}::'a set)\<sharp>*c" by (simp add: fresh_star_def) |
|
2608 |
moreover |
|
2609 |
have "({}::'a set) \<inter> As = {}" by simp |
|
2610 |
moreover |
|
2611 |
have "set ([]::'a prm) \<subseteq> {} \<times> {}" by simp |
|
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
2612 |
ultimately show ?case by (simp add: empty_eqvt) |
32638 | 2613 |
next |
2614 |
case (insert x Xs) |
|
2615 |
then have ih: "\<exists>pi. (pi\<bullet>Xs)\<sharp>*c \<and> (pi\<bullet>Xs) \<inter> As = {} \<and> set pi \<subseteq> Xs \<times> (pi\<bullet>Xs)" by simp |
|
2616 |
then obtain pi where a1: "(pi\<bullet>Xs)\<sharp>*c" and a2: "(pi\<bullet>Xs) \<inter> As = {}" and |
|
2617 |
a4: "set pi \<subseteq> Xs \<times> (pi\<bullet>Xs)" by blast |
|
2618 |
have b: "x\<notin>Xs" by fact |
|
2619 |
have d1: "finite As" by fact |
|
2620 |
have d2: "finite Xs" by fact |
|
2621 |
have d3: "({x} \<union> Xs) \<subseteq> As" using insert(4) by simp |
|
2622 |
from d d1 d2 |
|
2623 |
obtain y::"'a" where fr: "y\<sharp>(c,pi\<bullet>Xs,As)" |
|
2624 |
apply(rule_tac at_exists_fresh[OF at, where x="(c,pi\<bullet>Xs,As)"]) |
|
2625 |
apply(auto simp add: supp_prod at_supp[OF at] at_fin_set_supp[OF at] |
|
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
2626 |
pt_supp_finite_pi[OF pt_set_inst[OF at_pt_inst[OF at]] at]) |
32638 | 2627 |
done |
2628 |
have "({y}\<union>(pi\<bullet>Xs))\<sharp>*c" using a1 fr by (simp add: fresh_star_def) |
|
2629 |
moreover |
|
2630 |
have "({y}\<union>(pi\<bullet>Xs))\<inter>As = {}" using a2 d1 fr |
|
2631 |
by (simp add: fresh_prod at_fin_set_fresh[OF at]) |
|
2632 |
moreover |
|
2633 |
have "pi\<bullet>x=x" using a4 b a2 d3 |
|
2634 |
by (rule_tac at_prm_fresh2[OF at]) (auto) |
|
2635 |
then have "set ((pi\<bullet>x,y)#pi) \<subseteq> ({x} \<union> Xs) \<times> ({y}\<union>(pi\<bullet>Xs))" using a4 by auto |
|
2636 |
moreover |
|
2637 |
have "(((pi\<bullet>x,y)#pi)\<bullet>({x} \<union> Xs)) = {y}\<union>(pi\<bullet>Xs)" |
|
26847 | 2638 |
proof - |
32638 | 2639 |
have eq: "[(pi\<bullet>x,y)]\<bullet>(pi\<bullet>Xs) = (pi\<bullet>Xs)" |
2640 |
proof - |
|
32960
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
2641 |
have "(pi\<bullet>x)\<sharp>(pi\<bullet>Xs)" using b d2 |
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
2642 |
by (simp add: pt_fresh_bij [OF pt_set_inst [OF at_pt_inst [OF at]], OF at] |
45961 | 2643 |
at_fin_set_fresh [OF at]) |
32960
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
2644 |
moreover |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
2645 |
have "y\<sharp>(pi\<bullet>Xs)" using fr by simp |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
2646 |
ultimately show "[(pi\<bullet>x,y)]\<bullet>(pi\<bullet>Xs) = (pi\<bullet>Xs)" |
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
2647 |
by (simp add: pt_fresh_fresh[OF pt_set_inst |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
2648 |
[OF at_pt_inst[OF at]], OF at]) |
32638 | 2649 |
qed |
2650 |
have "(((pi\<bullet>x,y)#pi)\<bullet>({x}\<union>Xs)) = ([(pi\<bullet>x,y)]\<bullet>(pi\<bullet>({x}\<union>Xs)))" |
|
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
2651 |
by (simp add: pt2[symmetric, OF pt_set_inst [OF at_pt_inst[OF at]]]) |
32638 | 2652 |
also have "\<dots> = {y}\<union>([(pi\<bullet>x,y)]\<bullet>(pi\<bullet>Xs))" |
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
2653 |
by (simp only: union_eqvt perm_set_def at_calc[OF at])(auto) |
32638 | 2654 |
finally show "(((pi\<bullet>x,y)#pi)\<bullet>({x} \<union> Xs)) = {y}\<union>(pi\<bullet>Xs)" using eq by simp |
26847 | 2655 |
qed |
32638 | 2656 |
ultimately |
2657 |
show ?case by (rule_tac x="(pi\<bullet>x,y)#pi" in exI) (auto) |
|
26847 | 2658 |
qed |
2659 |
qed |
|
2660 |
||
2661 |
lemma at_set_avoiding: |
|
2662 |
fixes Xs::"'a set" |
|
2663 |
assumes at: "at TYPE('a)" |
|
2664 |
and a: "finite Xs" |
|
2665 |
and b: "finite ((supp c)::'a set)" |
|
32638 | 2666 |
obtains pi::"'a prm" where "(pi\<bullet>Xs)\<sharp>*c" and "set pi \<subseteq> Xs \<times> (pi\<bullet>Xs)" |
2667 |
using a b at_set_avoiding_aux[OF at, where Xs="Xs" and As="Xs" and c="c"] |
|
2668 |
by (blast) |
|
2669 |
||
19477 | 2670 |
section {* composition instances *} |
2671 |
(* ============================= *) |
|
2672 |
||
2673 |
lemma cp_list_inst: |
|
2674 |
assumes c1: "cp TYPE ('a) TYPE('x) TYPE('y)" |
|
2675 |
shows "cp TYPE ('a list) TYPE('x) TYPE('y)" |
|
2676 |
using c1 |
|
2677 |
apply(simp add: cp_def) |
|
2678 |
apply(auto) |
|
2679 |
apply(induct_tac x) |
|
2680 |
apply(auto) |
|
2681 |
done |
|
2682 |
||
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
2683 |
lemma cp_set_inst: |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
2684 |
assumes c1: "cp TYPE ('a) TYPE('x) TYPE('y)" |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
2685 |
shows "cp TYPE ('a set) TYPE('x) TYPE('y)" |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
2686 |
using c1 |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
2687 |
apply(simp add: cp_def) |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
2688 |
apply(auto) |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
2689 |
apply(auto simp add: perm_set_def) |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
2690 |
apply(rule_tac x="pi2\<bullet>xc" in exI) |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
2691 |
apply(auto) |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
2692 |
done |
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
2693 |
|
19477 | 2694 |
lemma cp_option_inst: |
2695 |
assumes c1: "cp TYPE ('a) TYPE('x) TYPE('y)" |
|
2696 |
shows "cp TYPE ('a option) TYPE('x) TYPE('y)" |
|
2697 |
using c1 |
|
2698 |
apply(simp add: cp_def) |
|
2699 |
apply(auto) |
|
2700 |
apply(case_tac x) |
|
2701 |
apply(auto) |
|
2702 |
done |
|
2703 |
||
2704 |
lemma cp_noption_inst: |
|
2705 |
assumes c1: "cp TYPE ('a) TYPE('x) TYPE('y)" |
|
2706 |
shows "cp TYPE ('a noption) TYPE('x) TYPE('y)" |
|
2707 |
using c1 |
|
2708 |
apply(simp add: cp_def) |
|
2709 |
apply(auto) |
|
2710 |
apply(case_tac x) |
|
2711 |
apply(auto) |
|
2712 |
done |
|
2713 |
||
2714 |
lemma cp_unit_inst: |
|
2715 |
shows "cp TYPE (unit) TYPE('x) TYPE('y)" |
|
2716 |
apply(simp add: cp_def) |
|
2717 |
done |
|
2718 |
||
2719 |
lemma cp_bool_inst: |
|
2720 |
shows "cp TYPE (bool) TYPE('x) TYPE('y)" |
|
2721 |
apply(simp add: cp_def) |
|
2722 |
apply(rule allI)+ |
|
2723 |
apply(induct_tac x) |
|
2724 |
apply(simp_all) |
|
2725 |
done |
|
2726 |
||
2727 |
lemma cp_prod_inst: |
|
2728 |
assumes c1: "cp TYPE ('a) TYPE('x) TYPE('y)" |
|
2729 |
and c2: "cp TYPE ('b) TYPE('x) TYPE('y)" |
|
2730 |
shows "cp TYPE ('a\<times>'b) TYPE('x) TYPE('y)" |
|
2731 |
using c1 c2 |
|
2732 |
apply(simp add: cp_def) |
|
2733 |
done |
|
2734 |
||
2735 |
lemma cp_fun_inst: |
|
2736 |
assumes c1: "cp TYPE ('a) TYPE('x) TYPE('y)" |
|
2737 |
and c2: "cp TYPE ('b) TYPE('x) TYPE('y)" |
|
2738 |
and pt: "pt TYPE ('y) TYPE('x)" |
|
2739 |
and at: "at TYPE ('x)" |
|
2740 |
shows "cp TYPE ('a\<Rightarrow>'b) TYPE('x) TYPE('y)" |
|
2741 |
using c1 c2 |
|
39302
d7728f65b353
renamed lemmas: ext_iff -> fun_eq_iff, set_ext_iff -> set_eq_iff, set_ext -> set_eqI
nipkow
parents:
39198
diff
changeset
|
2742 |
apply(auto simp add: cp_def perm_fun_def fun_eq_iff) |
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
2743 |
apply(simp add: rev_eqvt[symmetric]) |
19477 | 2744 |
apply(simp add: pt_rev_pi[OF pt_list_inst[OF pt_prod_inst[OF pt, OF pt]], OF at]) |
2745 |
done |
|
2746 |
||
2747 |
||
17870 | 2748 |
section {* Andy's freshness lemma *} |
2749 |
(*================================*) |
|
2750 |
||
2751 |
lemma freshness_lemma: |
|
2752 |
fixes h :: "'x\<Rightarrow>'a" |
|
2753 |
assumes pta: "pt TYPE('a) TYPE('x)" |
|
2754 |
and at: "at TYPE('x)" |
|
2755 |
and f1: "finite ((supp h)::'x set)" |
|
22500
8436bfd21bf3
corrected the lemmas min_nat_eqvt and min_int_eqvt
urbanc
parents:
22446
diff
changeset
|
2756 |
and a: "\<exists>a::'x. a\<sharp>(h,h a)" |
17870 | 2757 |
shows "\<exists>fr::'a. \<forall>a::'x. a\<sharp>h \<longrightarrow> (h a) = fr" |
2758 |
proof - |
|
2759 |
have ptb: "pt TYPE('x) TYPE('x)" by (simp add: at_pt_inst[OF at]) |
|
2760 |
have ptc: "pt TYPE('x\<Rightarrow>'a) TYPE('x)" by (simp add: pt_fun_inst[OF ptb, OF pta, OF at]) |
|
22500
8436bfd21bf3
corrected the lemmas min_nat_eqvt and min_int_eqvt
urbanc
parents:
22446
diff
changeset
|
2761 |
from a obtain a0 where a1: "a0\<sharp>h" and a2: "a0\<sharp>(h a0)" by (force simp add: fresh_prod) |
17870 | 2762 |
show ?thesis |
2763 |
proof |
|
2764 |
let ?fr = "h (a0::'x)" |
|
2765 |
show "\<forall>(a::'x). (a\<sharp>h \<longrightarrow> ((h a) = ?fr))" |
|
2766 |
proof (intro strip) |
|
2767 |
fix a |
|
2768 |
assume a3: "(a::'x)\<sharp>h" |
|
2769 |
show "h (a::'x) = h a0" |
|
2770 |
proof (cases "a=a0") |
|
32960
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
2771 |
case True thus "h (a::'x) = h a0" by simp |
17870 | 2772 |
next |
32960
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
2773 |
case False |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
2774 |
assume "a\<noteq>a0" |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
2775 |
hence c1: "a\<notin>((supp a0)::'x set)" by (simp add: fresh_def[symmetric] at_fresh[OF at]) |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
2776 |
have c2: "a\<notin>((supp h)::'x set)" using a3 by (simp add: fresh_def) |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
2777 |
from c1 c2 have c3: "a\<notin>((supp h)\<union>((supp a0)::'x set))" by force |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
2778 |
have f2: "finite ((supp a0)::'x set)" by (simp add: at_supp[OF at]) |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
2779 |
from f1 f2 have "((supp (h a0))::'x set)\<subseteq>((supp h)\<union>(supp a0))" |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
2780 |
by (simp add: pt_supp_fun_subset[OF ptb, OF pta, OF at]) |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
2781 |
hence "a\<notin>((supp (h a0))::'x set)" using c3 by force |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
2782 |
hence "a\<sharp>(h a0)" by (simp add: fresh_def) |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
2783 |
with a2 have d1: "[(a0,a)]\<bullet>(h a0) = (h a0)" by (rule pt_fresh_fresh[OF pta, OF at]) |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
2784 |
from a1 a3 have d2: "[(a0,a)]\<bullet>h = h" by (rule pt_fresh_fresh[OF ptc, OF at]) |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
2785 |
from d1 have "h a0 = [(a0,a)]\<bullet>(h a0)" by simp |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
2786 |
also have "\<dots>= ([(a0,a)]\<bullet>h)([(a0,a)]\<bullet>a0)" by (simp add: pt_fun_app_eq[OF ptb, OF at]) |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
2787 |
also have "\<dots> = h ([(a0,a)]\<bullet>a0)" using d2 by simp |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
2788 |
also have "\<dots> = h a" by (simp add: at_calc[OF at]) |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
2789 |
finally show "h a = h a0" by simp |
17870 | 2790 |
qed |
2791 |
qed |
|
2792 |
qed |
|
2793 |
qed |
|
32960
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
2794 |
|
17870 | 2795 |
lemma freshness_lemma_unique: |
2796 |
fixes h :: "'x\<Rightarrow>'a" |
|
2797 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
2798 |
and at: "at TYPE('x)" |
|
2799 |
and f1: "finite ((supp h)::'x set)" |
|
22500
8436bfd21bf3
corrected the lemmas min_nat_eqvt and min_int_eqvt
urbanc
parents:
22446
diff
changeset
|
2800 |
and a: "\<exists>(a::'x). a\<sharp>(h,h a)" |
17870 | 2801 |
shows "\<exists>!(fr::'a). \<forall>(a::'x). a\<sharp>h \<longrightarrow> (h a) = fr" |
18703 | 2802 |
proof (rule ex_ex1I) |
17870 | 2803 |
from pt at f1 a show "\<exists>fr::'a. \<forall>a::'x. a\<sharp>h \<longrightarrow> h a = fr" by (simp add: freshness_lemma) |
2804 |
next |
|
2805 |
fix fr1 fr2 |
|
2806 |
assume b1: "\<forall>a::'x. a\<sharp>h \<longrightarrow> h a = fr1" |
|
2807 |
assume b2: "\<forall>a::'x. a\<sharp>h \<longrightarrow> h a = fr2" |
|
22500
8436bfd21bf3
corrected the lemmas min_nat_eqvt and min_int_eqvt
urbanc
parents:
22446
diff
changeset
|
2808 |
from a obtain a where "(a::'x)\<sharp>h" by (force simp add: fresh_prod) |
17870 | 2809 |
with b1 b2 have "h a = fr1 \<and> h a = fr2" by force |
2810 |
thus "fr1 = fr2" by force |
|
2811 |
qed |
|
2812 |
||
2813 |
-- "packaging the freshness lemma into a function" |
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
32960
diff
changeset
|
2814 |
definition fresh_fun :: "('x\<Rightarrow>'a)\<Rightarrow>'a" where |
17870 | 2815 |
"fresh_fun (h) \<equiv> THE fr. (\<forall>(a::'x). a\<sharp>h \<longrightarrow> (h a) = fr)" |
2816 |
||
2817 |
lemma fresh_fun_app: |
|
2818 |
fixes h :: "'x\<Rightarrow>'a" |
|
2819 |
and a :: "'x" |
|
2820 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
2821 |
and at: "at TYPE('x)" |
|
2822 |
and f1: "finite ((supp h)::'x set)" |
|
22500
8436bfd21bf3
corrected the lemmas min_nat_eqvt and min_int_eqvt
urbanc
parents:
22446
diff
changeset
|
2823 |
and a: "\<exists>(a::'x). a\<sharp>(h,h a)" |
17870 | 2824 |
and b: "a\<sharp>h" |
2825 |
shows "(fresh_fun h) = (h a)" |
|
2826 |
proof (unfold fresh_fun_def, rule the_equality) |
|
2827 |
show "\<forall>(a'::'x). a'\<sharp>h \<longrightarrow> h a' = h a" |
|
2828 |
proof (intro strip) |
|
2829 |
fix a'::"'x" |
|
2830 |
assume c: "a'\<sharp>h" |
|
2831 |
from pt at f1 a have "\<exists>(fr::'a). \<forall>(a::'x). a\<sharp>h \<longrightarrow> (h a) = fr" by (rule freshness_lemma) |
|
2832 |
with b c show "h a' = h a" by force |
|
2833 |
qed |
|
2834 |
next |
|
2835 |
fix fr::"'a" |
|
2836 |
assume "\<forall>a. a\<sharp>h \<longrightarrow> h a = fr" |
|
2837 |
with b show "fr = h a" by force |
|
2838 |
qed |
|
2839 |
||
22714
ca804eb70d39
added a more usuable lemma for dealing with fresh_fun
urbanc
parents:
22650
diff
changeset
|
2840 |
lemma fresh_fun_app': |
ca804eb70d39
added a more usuable lemma for dealing with fresh_fun
urbanc
parents:
22650
diff
changeset
|
2841 |
fixes h :: "'x\<Rightarrow>'a" |
ca804eb70d39
added a more usuable lemma for dealing with fresh_fun
urbanc
parents:
22650
diff
changeset
|
2842 |
and a :: "'x" |
ca804eb70d39
added a more usuable lemma for dealing with fresh_fun
urbanc
parents:
22650
diff
changeset
|
2843 |
assumes pt: "pt TYPE('a) TYPE('x)" |
ca804eb70d39
added a more usuable lemma for dealing with fresh_fun
urbanc
parents:
22650
diff
changeset
|
2844 |
and at: "at TYPE('x)" |
ca804eb70d39
added a more usuable lemma for dealing with fresh_fun
urbanc
parents:
22650
diff
changeset
|
2845 |
and f1: "finite ((supp h)::'x set)" |
ca804eb70d39
added a more usuable lemma for dealing with fresh_fun
urbanc
parents:
22650
diff
changeset
|
2846 |
and a: "a\<sharp>h" "a\<sharp>h a" |
ca804eb70d39
added a more usuable lemma for dealing with fresh_fun
urbanc
parents:
22650
diff
changeset
|
2847 |
shows "(fresh_fun h) = (h a)" |
ca804eb70d39
added a more usuable lemma for dealing with fresh_fun
urbanc
parents:
22650
diff
changeset
|
2848 |
apply(rule fresh_fun_app[OF pt, OF at, OF f1]) |
ca804eb70d39
added a more usuable lemma for dealing with fresh_fun
urbanc
parents:
22650
diff
changeset
|
2849 |
apply(auto simp add: fresh_prod intro: a) |
ca804eb70d39
added a more usuable lemma for dealing with fresh_fun
urbanc
parents:
22650
diff
changeset
|
2850 |
done |
ca804eb70d39
added a more usuable lemma for dealing with fresh_fun
urbanc
parents:
22650
diff
changeset
|
2851 |
|
19477 | 2852 |
lemma fresh_fun_equiv_ineq: |
2853 |
fixes h :: "'y\<Rightarrow>'a" |
|
2854 |
and pi:: "'x prm" |
|
2855 |
assumes pta: "pt TYPE('a) TYPE('x)" |
|
2856 |
and ptb: "pt TYPE('y) TYPE('x)" |
|
2857 |
and ptb':"pt TYPE('a) TYPE('y)" |
|
2858 |
and at: "at TYPE('x)" |
|
2859 |
and at': "at TYPE('y)" |
|
2860 |
and cpa: "cp TYPE('a) TYPE('x) TYPE('y)" |
|
2861 |
and cpb: "cp TYPE('y) TYPE('x) TYPE('y)" |
|
2862 |
and f1: "finite ((supp h)::'y set)" |
|
22500
8436bfd21bf3
corrected the lemmas min_nat_eqvt and min_int_eqvt
urbanc
parents:
22446
diff
changeset
|
2863 |
and a1: "\<exists>(a::'y). a\<sharp>(h,h a)" |
19477 | 2864 |
shows "pi\<bullet>(fresh_fun h) = fresh_fun(pi\<bullet>h)" (is "?LHS = ?RHS") |
2865 |
proof - |
|
2866 |
have ptd: "pt TYPE('y) TYPE('y)" by (simp add: at_pt_inst[OF at']) |
|
2867 |
have ptc: "pt TYPE('y\<Rightarrow>'a) TYPE('x)" by (simp add: pt_fun_inst[OF ptb, OF pta, OF at]) |
|
23393 | 2868 |
have cpc: "cp TYPE('y\<Rightarrow>'a) TYPE ('x) TYPE ('y)" by (rule cp_fun_inst[OF cpb cpa ptb at]) |
19477 | 2869 |
have f2: "finite ((supp (pi\<bullet>h))::'y set)" |
2870 |
proof - |
|
2871 |
from f1 have "finite (pi\<bullet>((supp h)::'y set))" |
|
2872 |
by (simp add: pt_set_finite_ineq[OF ptb, OF at]) |
|
2873 |
thus ?thesis |
|
2874 |
by (simp add: pt_perm_supp_ineq[OF ptc, OF ptb, OF at, OF cpc]) |
|
2875 |
qed |
|
22500
8436bfd21bf3
corrected the lemmas min_nat_eqvt and min_int_eqvt
urbanc
parents:
22446
diff
changeset
|
2876 |
from a1 obtain a' where c0: "a'\<sharp>(h,h a')" by force |
8436bfd21bf3
corrected the lemmas min_nat_eqvt and min_int_eqvt
urbanc
parents:
22446
diff
changeset
|
2877 |
hence c1: "a'\<sharp>h" and c2: "a'\<sharp>(h a')" by (simp_all add: fresh_prod) |
19477 | 2878 |
have c3: "(pi\<bullet>a')\<sharp>(pi\<bullet>h)" using c1 |
2879 |
by (simp add: pt_fresh_bij_ineq[OF ptc, OF ptb, OF at, OF cpc]) |
|
2880 |
have c4: "(pi\<bullet>a')\<sharp>(pi\<bullet>h) (pi\<bullet>a')" |
|
2881 |
proof - |
|
2882 |
from c2 have "(pi\<bullet>a')\<sharp>(pi\<bullet>(h a'))" |
|
2883 |
by (simp add: pt_fresh_bij_ineq[OF pta, OF ptb, OF at,OF cpa]) |
|
2884 |
thus ?thesis by (simp add: pt_fun_app_eq[OF ptb, OF at]) |
|
2885 |
qed |
|
22500
8436bfd21bf3
corrected the lemmas min_nat_eqvt and min_int_eqvt
urbanc
parents:
22446
diff
changeset
|
2886 |
have a2: "\<exists>(a::'y). a\<sharp>(pi\<bullet>h,(pi\<bullet>h) a)" using c3 c4 by (force simp add: fresh_prod) |
19477 | 2887 |
have d1: "?LHS = pi\<bullet>(h a')" using c1 a1 by (simp add: fresh_fun_app[OF ptb', OF at', OF f1]) |
2888 |
have d2: "?RHS = (pi\<bullet>h) (pi\<bullet>a')" using c3 a2 |
|
2889 |
by (simp add: fresh_fun_app[OF ptb', OF at', OF f2]) |
|
2890 |
show ?thesis using d1 d2 by (simp add: pt_fun_app_eq[OF ptb, OF at]) |
|
2891 |
qed |
|
2892 |
||
17870 | 2893 |
lemma fresh_fun_equiv: |
2894 |
fixes h :: "'x\<Rightarrow>'a" |
|
2895 |
and pi:: "'x prm" |
|
2896 |
assumes pta: "pt TYPE('a) TYPE('x)" |
|
2897 |
and at: "at TYPE('x)" |
|
2898 |
and f1: "finite ((supp h)::'x set)" |
|
22500
8436bfd21bf3
corrected the lemmas min_nat_eqvt and min_int_eqvt
urbanc
parents:
22446
diff
changeset
|
2899 |
and a1: "\<exists>(a::'x). a\<sharp>(h,h a)" |
17870 | 2900 |
shows "pi\<bullet>(fresh_fun h) = fresh_fun(pi\<bullet>h)" (is "?LHS = ?RHS") |
2901 |
proof - |
|
2902 |
have ptb: "pt TYPE('x) TYPE('x)" by (simp add: at_pt_inst[OF at]) |
|
2903 |
have ptc: "pt TYPE('x\<Rightarrow>'a) TYPE('x)" by (simp add: pt_fun_inst[OF ptb, OF pta, OF at]) |
|
2904 |
have f2: "finite ((supp (pi\<bullet>h))::'x set)" |
|
2905 |
proof - |
|
2906 |
from f1 have "finite (pi\<bullet>((supp h)::'x set))" by (simp add: pt_set_finite_ineq[OF ptb, OF at]) |
|
2907 |
thus ?thesis by (simp add: pt_perm_supp[OF ptc, OF at]) |
|
2908 |
qed |
|
22500
8436bfd21bf3
corrected the lemmas min_nat_eqvt and min_int_eqvt
urbanc
parents:
22446
diff
changeset
|
2909 |
from a1 obtain a' where c0: "a'\<sharp>(h,h a')" by force |
8436bfd21bf3
corrected the lemmas min_nat_eqvt and min_int_eqvt
urbanc
parents:
22446
diff
changeset
|
2910 |
hence c1: "a'\<sharp>h" and c2: "a'\<sharp>(h a')" by (simp_all add: fresh_prod) |
17870 | 2911 |
have c3: "(pi\<bullet>a')\<sharp>(pi\<bullet>h)" using c1 by (simp add: pt_fresh_bij[OF ptc, OF at]) |
2912 |
have c4: "(pi\<bullet>a')\<sharp>(pi\<bullet>h) (pi\<bullet>a')" |
|
2913 |
proof - |
|
2914 |
from c2 have "(pi\<bullet>a')\<sharp>(pi\<bullet>(h a'))" by (simp add: pt_fresh_bij[OF pta, OF at]) |
|
2915 |
thus ?thesis by (simp add: pt_fun_app_eq[OF ptb, OF at]) |
|
2916 |
qed |
|
22500
8436bfd21bf3
corrected the lemmas min_nat_eqvt and min_int_eqvt
urbanc
parents:
22446
diff
changeset
|
2917 |
have a2: "\<exists>(a::'x). a\<sharp>(pi\<bullet>h,(pi\<bullet>h) a)" using c3 c4 by (force simp add: fresh_prod) |
17870 | 2918 |
have d1: "?LHS = pi\<bullet>(h a')" using c1 a1 by (simp add: fresh_fun_app[OF pta, OF at, OF f1]) |
2919 |
have d2: "?RHS = (pi\<bullet>h) (pi\<bullet>a')" using c3 a2 by (simp add: fresh_fun_app[OF pta, OF at, OF f2]) |
|
2920 |
show ?thesis using d1 d2 by (simp add: pt_fun_app_eq[OF ptb, OF at]) |
|
2921 |
qed |
|
19216 | 2922 |
|
2923 |
lemma fresh_fun_supports: |
|
2924 |
fixes h :: "'x\<Rightarrow>'a" |
|
2925 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
2926 |
and at: "at TYPE('x)" |
|
2927 |
and f1: "finite ((supp h)::'x set)" |
|
22500
8436bfd21bf3
corrected the lemmas min_nat_eqvt and min_int_eqvt
urbanc
parents:
22446
diff
changeset
|
2928 |
and a: "\<exists>(a::'x). a\<sharp>(h,h a)" |
19216 | 2929 |
shows "((supp h)::'x set) supports (fresh_fun h)" |
22808 | 2930 |
apply(simp add: supports_def fresh_def[symmetric]) |
19216 | 2931 |
apply(auto) |
2932 |
apply(simp add: fresh_fun_equiv[OF pt, OF at, OF f1, OF a]) |
|
2933 |
apply(simp add: pt_fresh_fresh[OF pt_fun_inst[OF at_pt_inst[OF at], OF pt], OF at, OF at]) |
|
2934 |
done |
|
17870 | 2935 |
|
2936 |
section {* Abstraction function *} |
|
2937 |
(*==============================*) |
|
2938 |
||
2939 |
lemma pt_abs_fun_inst: |
|
2940 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
2941 |
and at: "at TYPE('x)" |
|
18579
002d371401f5
changed the name of the type "nOption" to "noption".
urbanc
parents:
18578
diff
changeset
|
2942 |
shows "pt TYPE('x\<Rightarrow>('a noption)) TYPE('x)" |
17870 | 2943 |
by (rule pt_fun_inst[OF at_pt_inst[OF at],OF pt_noption_inst[OF pt],OF at]) |
2944 |
||
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
32960
diff
changeset
|
2945 |
definition abs_fun :: "'x\<Rightarrow>'a\<Rightarrow>('x\<Rightarrow>('a noption))" ("[_]._" [100,100] 100) where |
17870 | 2946 |
"[a].x \<equiv> (\<lambda>b. (if b=a then nSome(x) else (if b\<sharp>x then nSome([(a,b)]\<bullet>x) else nNone)))" |
2947 |
||
18745
060400dc077c
a fixme comments about abs_fun_if, which should be called perm_if
urbanc
parents:
18703
diff
changeset
|
2948 |
(* FIXME: should be called perm_if and placed close to the definition of permutations on bools *) |
17870 | 2949 |
lemma abs_fun_if: |
2950 |
fixes pi :: "'x prm" |
|
2951 |
and x :: "'a" |
|
2952 |
and y :: "'a" |
|
2953 |
and c :: "bool" |
|
2954 |
shows "pi\<bullet>(if c then x else y) = (if c then (pi\<bullet>x) else (pi\<bullet>y))" |
|
2955 |
by force |
|
2956 |
||
2957 |
lemma abs_fun_pi_ineq: |
|
2958 |
fixes a :: "'y" |
|
2959 |
and x :: "'a" |
|
2960 |
and pi :: "'x prm" |
|
2961 |
assumes pta: "pt TYPE('a) TYPE('x)" |
|
2962 |
and ptb: "pt TYPE('y) TYPE('x)" |
|
2963 |
and at: "at TYPE('x)" |
|
2964 |
and cp: "cp TYPE('a) TYPE('x) TYPE('y)" |
|
2965 |
shows "pi\<bullet>([a].x) = [(pi\<bullet>a)].(pi\<bullet>x)" |
|
2966 |
apply(simp add: abs_fun_def perm_fun_def abs_fun_if) |
|
39302
d7728f65b353
renamed lemmas: ext_iff -> fun_eq_iff, set_ext_iff -> set_eq_iff, set_ext -> set_eqI
nipkow
parents:
39198
diff
changeset
|
2967 |
apply(simp only: fun_eq_iff) |
17870 | 2968 |
apply(rule allI) |
2969 |
apply(subgoal_tac "(((rev pi)\<bullet>(xa::'y)) = (a::'y)) = (xa = pi\<bullet>a)")(*A*) |
|
2970 |
apply(subgoal_tac "(((rev pi)\<bullet>xa)\<sharp>x) = (xa\<sharp>(pi\<bullet>x))")(*B*) |
|
2971 |
apply(subgoal_tac "pi\<bullet>([(a,(rev pi)\<bullet>xa)]\<bullet>x) = [(pi\<bullet>a,xa)]\<bullet>(pi\<bullet>x)")(*C*) |
|
2972 |
apply(simp) |
|
2973 |
(*C*) |
|
2974 |
apply(simp add: cp1[OF cp]) |
|
2975 |
apply(simp add: pt_pi_rev[OF ptb, OF at]) |
|
2976 |
(*B*) |
|
2977 |
apply(simp add: pt_fresh_left_ineq[OF pta, OF ptb, OF at, OF cp]) |
|
2978 |
(*A*) |
|
2979 |
apply(rule iffI) |
|
2980 |
apply(rule pt_bij2[OF ptb, OF at, THEN sym]) |
|
2981 |
apply(simp) |
|
2982 |
apply(rule pt_bij2[OF ptb, OF at]) |
|
2983 |
apply(simp) |
|
2984 |
done |
|
2985 |
||
2986 |
lemma abs_fun_pi: |
|
2987 |
fixes a :: "'x" |
|
2988 |
and x :: "'a" |
|
2989 |
and pi :: "'x prm" |
|
2990 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
2991 |
and at: "at TYPE('x)" |
|
2992 |
shows "pi\<bullet>([a].x) = [(pi\<bullet>a)].(pi\<bullet>x)" |
|
2993 |
apply(rule abs_fun_pi_ineq) |
|
2994 |
apply(rule pt) |
|
2995 |
apply(rule at_pt_inst) |
|
2996 |
apply(rule at)+ |
|
2997 |
apply(rule cp_pt_inst) |
|
2998 |
apply(rule pt) |
|
2999 |
apply(rule at) |
|
3000 |
done |
|
3001 |
||
3002 |
lemma abs_fun_eq1: |
|
3003 |
fixes x :: "'a" |
|
3004 |
and y :: "'a" |
|
3005 |
and a :: "'x" |
|
3006 |
shows "([a].x = [a].y) = (x = y)" |
|
3007 |
apply(auto simp add: abs_fun_def) |
|
39302
d7728f65b353
renamed lemmas: ext_iff -> fun_eq_iff, set_ext_iff -> set_eq_iff, set_ext -> set_eqI
nipkow
parents:
39198
diff
changeset
|
3008 |
apply(auto simp add: fun_eq_iff) |
17870 | 3009 |
apply(drule_tac x="a" in spec) |
3010 |
apply(simp) |
|
3011 |
done |
|
3012 |
||
3013 |
lemma abs_fun_eq2: |
|
3014 |
fixes x :: "'a" |
|
3015 |
and y :: "'a" |
|
3016 |
and a :: "'x" |
|
3017 |
and b :: "'x" |
|
3018 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
3019 |
and at: "at TYPE('x)" |
|
3020 |
and a1: "a\<noteq>b" |
|
3021 |
and a2: "[a].x = [b].y" |
|
18268
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3022 |
shows "x=[(a,b)]\<bullet>y \<and> a\<sharp>y" |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3023 |
proof - |
39302
d7728f65b353
renamed lemmas: ext_iff -> fun_eq_iff, set_ext_iff -> set_eq_iff, set_ext -> set_eqI
nipkow
parents:
39198
diff
changeset
|
3024 |
from a2 have "\<forall>c::'x. ([a].x) c = ([b].y) c" by (force simp add: fun_eq_iff) |
18268
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3025 |
hence "([a].x) a = ([b].y) a" by simp |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3026 |
hence a3: "nSome(x) = ([b].y) a" by (simp add: abs_fun_def) |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3027 |
show "x=[(a,b)]\<bullet>y \<and> a\<sharp>y" |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3028 |
proof (cases "a\<sharp>y") |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3029 |
assume a4: "a\<sharp>y" |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3030 |
hence "x=[(b,a)]\<bullet>y" using a3 a1 by (simp add: abs_fun_def) |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3031 |
moreover |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3032 |
have "[(a,b)]\<bullet>y = [(b,a)]\<bullet>y" by (rule pt3[OF pt], rule at_ds5[OF at]) |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3033 |
ultimately show ?thesis using a4 by simp |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3034 |
next |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3035 |
assume "\<not>a\<sharp>y" |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3036 |
hence "nSome(x) = nNone" using a1 a3 by (simp add: abs_fun_def) |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3037 |
hence False by simp |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3038 |
thus ?thesis by simp |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3039 |
qed |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3040 |
qed |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3041 |
|
17870 | 3042 |
lemma abs_fun_eq3: |
3043 |
fixes x :: "'a" |
|
3044 |
and y :: "'a" |
|
3045 |
and a :: "'x" |
|
3046 |
and b :: "'x" |
|
3047 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
3048 |
and at: "at TYPE('x)" |
|
3049 |
and a1: "a\<noteq>b" |
|
3050 |
and a2: "x=[(a,b)]\<bullet>y" |
|
3051 |
and a3: "a\<sharp>y" |
|
3052 |
shows "[a].x =[b].y" |
|
3053 |
proof - |
|
18268
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3054 |
show ?thesis |
39302
d7728f65b353
renamed lemmas: ext_iff -> fun_eq_iff, set_ext_iff -> set_eq_iff, set_ext -> set_eqI
nipkow
parents:
39198
diff
changeset
|
3055 |
proof (simp only: abs_fun_def fun_eq_iff, intro strip) |
18268
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3056 |
fix c::"'x" |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3057 |
let ?LHS = "if c=a then nSome(x) else if c\<sharp>x then nSome([(a,c)]\<bullet>x) else nNone" |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3058 |
and ?RHS = "if c=b then nSome(y) else if c\<sharp>y then nSome([(b,c)]\<bullet>y) else nNone" |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3059 |
show "?LHS=?RHS" |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3060 |
proof - |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3061 |
have "(c=a) \<or> (c=b) \<or> (c\<noteq>a \<and> c\<noteq>b)" by blast |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3062 |
moreover --"case c=a" |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3063 |
{ have "nSome(x) = nSome([(a,b)]\<bullet>y)" using a2 by simp |
32960
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3064 |
also have "\<dots> = nSome([(b,a)]\<bullet>y)" by (simp, rule pt3[OF pt], rule at_ds5[OF at]) |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3065 |
finally have "nSome(x) = nSome([(b,a)]\<bullet>y)" by simp |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3066 |
moreover |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3067 |
assume "c=a" |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3068 |
ultimately have "?LHS=?RHS" using a1 a3 by simp |
18268
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3069 |
} |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3070 |
moreover -- "case c=b" |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3071 |
{ have a4: "y=[(a,b)]\<bullet>x" using a2 by (simp only: pt_swap_bij[OF pt, OF at]) |
32960
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3072 |
hence "a\<sharp>([(a,b)]\<bullet>x)" using a3 by simp |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3073 |
hence "b\<sharp>x" by (simp add: at_calc[OF at] pt_fresh_left[OF pt, OF at]) |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3074 |
moreover |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3075 |
assume "c=b" |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3076 |
ultimately have "?LHS=?RHS" using a1 a4 by simp |
18268
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3077 |
} |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3078 |
moreover -- "case c\<noteq>a \<and> c\<noteq>b" |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3079 |
{ assume a5: "c\<noteq>a \<and> c\<noteq>b" |
32960
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3080 |
moreover |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3081 |
have "c\<sharp>x = c\<sharp>y" using a2 a5 by (force simp add: at_calc[OF at] pt_fresh_left[OF pt, OF at]) |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3082 |
moreover |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3083 |
have "c\<sharp>y \<longrightarrow> [(a,c)]\<bullet>x = [(b,c)]\<bullet>y" |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3084 |
proof (intro strip) |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3085 |
assume a6: "c\<sharp>y" |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3086 |
have "[(a,c),(b,c),(a,c)] \<triangleq> [(a,b)]" using a1 a5 by (force intro: at_ds3[OF at]) |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3087 |
hence "[(a,c)]\<bullet>([(b,c)]\<bullet>([(a,c)]\<bullet>y)) = [(a,b)]\<bullet>y" |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3088 |
by (simp add: pt2[OF pt, symmetric] pt3[OF pt]) |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3089 |
hence "[(a,c)]\<bullet>([(b,c)]\<bullet>y) = [(a,b)]\<bullet>y" using a3 a6 |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3090 |
by (simp add: pt_fresh_fresh[OF pt, OF at]) |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3091 |
hence "[(a,c)]\<bullet>([(b,c)]\<bullet>y) = x" using a2 by simp |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3092 |
hence "[(b,c)]\<bullet>y = [(a,c)]\<bullet>x" by (drule_tac pt_bij1[OF pt, OF at], simp) |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3093 |
thus "[(a,c)]\<bullet>x = [(b,c)]\<bullet>y" by simp |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3094 |
qed |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3095 |
ultimately have "?LHS=?RHS" by simp |
18268
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3096 |
} |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3097 |
ultimately show "?LHS = ?RHS" by blast |
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3098 |
qed |
17870 | 3099 |
qed |
18268
734f23ad5d8f
ISAR-fied two proofs about equality for abstraction functions.
urbanc
parents:
18264
diff
changeset
|
3100 |
qed |
32960
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3101 |
|
23158
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3102 |
(* alpha equivalence *) |
17870 | 3103 |
lemma abs_fun_eq: |
3104 |
fixes x :: "'a" |
|
3105 |
and y :: "'a" |
|
3106 |
and a :: "'x" |
|
3107 |
and b :: "'x" |
|
3108 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
3109 |
and at: "at TYPE('x)" |
|
3110 |
shows "([a].x = [b].y) = ((a=b \<and> x=y)\<or>(a\<noteq>b \<and> x=[(a,b)]\<bullet>y \<and> a\<sharp>y))" |
|
3111 |
proof (rule iffI) |
|
3112 |
assume b: "[a].x = [b].y" |
|
3113 |
show "(a=b \<and> x=y)\<or>(a\<noteq>b \<and> x=[(a,b)]\<bullet>y \<and> a\<sharp>y)" |
|
3114 |
proof (cases "a=b") |
|
3115 |
case True with b show ?thesis by (simp add: abs_fun_eq1) |
|
3116 |
next |
|
3117 |
case False with b show ?thesis by (simp add: abs_fun_eq2[OF pt, OF at]) |
|
3118 |
qed |
|
3119 |
next |
|
3120 |
assume "(a=b \<and> x=y)\<or>(a\<noteq>b \<and> x=[(a,b)]\<bullet>y \<and> a\<sharp>y)" |
|
3121 |
thus "[a].x = [b].y" |
|
3122 |
proof |
|
3123 |
assume "a=b \<and> x=y" thus ?thesis by simp |
|
3124 |
next |
|
3125 |
assume "a\<noteq>b \<and> x=[(a,b)]\<bullet>y \<and> a\<sharp>y" |
|
3126 |
thus ?thesis by (simp add: abs_fun_eq3[OF pt, OF at]) |
|
3127 |
qed |
|
3128 |
qed |
|
3129 |
||
23158
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3130 |
(* symmetric version of alpha-equivalence *) |
19562
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3131 |
lemma abs_fun_eq': |
23158
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3132 |
fixes x :: "'a" |
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3133 |
and y :: "'a" |
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3134 |
and a :: "'x" |
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3135 |
and b :: "'x" |
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3136 |
assumes pt: "pt TYPE('a) TYPE('x)" |
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3137 |
and at: "at TYPE('x)" |
23159 | 3138 |
shows "([a].x = [b].y) = ((a=b \<and> x=y)\<or>(a\<noteq>b \<and> [(b,a)]\<bullet>x=y \<and> b\<sharp>x))" |
3139 |
by (auto simp add: abs_fun_eq[OF pt, OF at] pt_swap_bij'[OF pt, OF at] |
|
23158
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3140 |
pt_fresh_left[OF pt, OF at] |
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3141 |
at_calc[OF at]) |
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3142 |
|
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3143 |
(* alpha_equivalence with a fresh name *) |
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3144 |
lemma abs_fun_fresh: |
19562
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3145 |
fixes x :: "'a" |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3146 |
and y :: "'a" |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3147 |
and c :: "'x" |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3148 |
and a :: "'x" |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3149 |
and b :: "'x" |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3150 |
assumes pt: "pt TYPE('a) TYPE('x)" |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3151 |
and at: "at TYPE('x)" |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3152 |
and fr: "c\<noteq>a" "c\<noteq>b" "c\<sharp>x" "c\<sharp>y" |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3153 |
shows "([a].x = [b].y) = ([(a,c)]\<bullet>x = [(b,c)]\<bullet>y)" |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3154 |
proof (rule iffI) |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3155 |
assume eq0: "[a].x = [b].y" |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3156 |
show "[(a,c)]\<bullet>x = [(b,c)]\<bullet>y" |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3157 |
proof (cases "a=b") |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3158 |
case True then show ?thesis using eq0 by (simp add: pt_bij[OF pt, OF at] abs_fun_eq[OF pt, OF at]) |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3159 |
next |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3160 |
case False |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3161 |
have ineq: "a\<noteq>b" by fact |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3162 |
with eq0 have eq: "x=[(a,b)]\<bullet>y" and fr': "a\<sharp>y" by (simp_all add: abs_fun_eq[OF pt, OF at]) |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3163 |
from eq have "[(a,c)]\<bullet>x = [(a,c)]\<bullet>[(a,b)]\<bullet>y" by (simp add: pt_bij[OF pt, OF at]) |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3164 |
also have "\<dots> = ([(a,c)]\<bullet>[(a,b)])\<bullet>([(a,c)]\<bullet>y)" by (rule pt_perm_compose[OF pt, OF at]) |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3165 |
also have "\<dots> = [(c,b)]\<bullet>y" using ineq fr fr' |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3166 |
by (simp add: pt_fresh_fresh[OF pt, OF at] at_calc[OF at]) |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3167 |
also have "\<dots> = [(b,c)]\<bullet>y" by (rule pt3[OF pt], rule at_ds5[OF at]) |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3168 |
finally show ?thesis by simp |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3169 |
qed |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3170 |
next |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3171 |
assume eq: "[(a,c)]\<bullet>x = [(b,c)]\<bullet>y" |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3172 |
thus "[a].x = [b].y" |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3173 |
proof (cases "a=b") |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3174 |
case True then show ?thesis using eq by (simp add: pt_bij[OF pt, OF at] abs_fun_eq[OF pt, OF at]) |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3175 |
next |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3176 |
case False |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3177 |
have ineq: "a\<noteq>b" by fact |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3178 |
from fr have "([(a,c)]\<bullet>c)\<sharp>([(a,c)]\<bullet>x)" by (simp add: pt_fresh_bij[OF pt, OF at]) |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3179 |
hence "a\<sharp>([(b,c)]\<bullet>y)" using eq fr by (simp add: at_calc[OF at]) |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3180 |
hence fr0: "a\<sharp>y" using ineq fr by (simp add: pt_fresh_left[OF pt, OF at] at_calc[OF at]) |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3181 |
from eq have "x = (rev [(a,c)])\<bullet>([(b,c)]\<bullet>y)" by (rule pt_bij1[OF pt, OF at]) |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3182 |
also have "\<dots> = [(a,c)]\<bullet>([(b,c)]\<bullet>y)" by simp |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3183 |
also have "\<dots> = ([(a,c)]\<bullet>[(b,c)])\<bullet>([(a,c)]\<bullet>y)" by (rule pt_perm_compose[OF pt, OF at]) |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3184 |
also have "\<dots> = [(b,a)]\<bullet>y" using ineq fr fr0 |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3185 |
by (simp add: pt_fresh_fresh[OF pt, OF at] at_calc[OF at]) |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3186 |
also have "\<dots> = [(a,b)]\<bullet>y" by (rule pt3[OF pt], rule at_ds5[OF at]) |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3187 |
finally show ?thesis using ineq fr0 by (simp add: abs_fun_eq[OF pt, OF at]) |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3188 |
qed |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3189 |
qed |
e56b3c967ae8
added the lemma abs_fun_eq' to the nominal theory,
urbanc
parents:
19494
diff
changeset
|
3190 |
|
23158
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3191 |
lemma abs_fun_fresh': |
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3192 |
fixes x :: "'a" |
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3193 |
and y :: "'a" |
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3194 |
and c :: "'x" |
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3195 |
and a :: "'x" |
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3196 |
and b :: "'x" |
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3197 |
assumes pt: "pt TYPE('a) TYPE('x)" |
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3198 |
and at: "at TYPE('x)" |
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3199 |
and as: "[a].x = [b].y" |
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3200 |
and fr: "c\<noteq>a" "c\<noteq>b" "c\<sharp>x" "c\<sharp>y" |
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3201 |
shows "x = [(a,c)]\<bullet>[(b,c)]\<bullet>y" |
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3202 |
using as fr |
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3203 |
apply(drule_tac sym) |
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3204 |
apply(simp add: abs_fun_fresh[OF pt, OF at] pt_swap_bij[OF pt, OF at]) |
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3205 |
done |
749b6870b1a1
introduced symmetric variants of the lemmas for alpha-equivalence
urbanc
parents:
23050
diff
changeset
|
3206 |
|
17870 | 3207 |
lemma abs_fun_supp_approx: |
3208 |
fixes x :: "'a" |
|
3209 |
and a :: "'x" |
|
3210 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
3211 |
and at: "at TYPE('x)" |
|
18048 | 3212 |
shows "((supp ([a].x))::'x set) \<subseteq> (supp (x,a))" |
3213 |
proof |
|
3214 |
fix c |
|
3215 |
assume "c\<in>((supp ([a].x))::'x set)" |
|
3216 |
hence "infinite {b. [(c,b)]\<bullet>([a].x) \<noteq> [a].x}" by (simp add: supp_def) |
|
3217 |
hence "infinite {b. [([(c,b)]\<bullet>a)].([(c,b)]\<bullet>x) \<noteq> [a].x}" by (simp add: abs_fun_pi[OF pt, OF at]) |
|
3218 |
moreover |
|
3219 |
have "{b. [([(c,b)]\<bullet>a)].([(c,b)]\<bullet>x) \<noteq> [a].x} \<subseteq> {b. ([(c,b)]\<bullet>x,[(c,b)]\<bullet>a) \<noteq> (x, a)}" by force |
|
3220 |
ultimately have "infinite {b. ([(c,b)]\<bullet>x,[(c,b)]\<bullet>a) \<noteq> (x, a)}" by (simp add: infinite_super) |
|
3221 |
thus "c\<in>(supp (x,a))" by (simp add: supp_def) |
|
17870 | 3222 |
qed |
3223 |
||
3224 |
lemma abs_fun_finite_supp: |
|
3225 |
fixes x :: "'a" |
|
3226 |
and a :: "'x" |
|
3227 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
3228 |
and at: "at TYPE('x)" |
|
3229 |
and f: "finite ((supp x)::'x set)" |
|
3230 |
shows "finite ((supp ([a].x))::'x set)" |
|
3231 |
proof - |
|
18048 | 3232 |
from f have "finite ((supp (x,a))::'x set)" by (simp add: supp_prod at_supp[OF at]) |
3233 |
moreover |
|
3234 |
have "((supp ([a].x))::'x set) \<subseteq> (supp (x,a))" by (rule abs_fun_supp_approx[OF pt, OF at]) |
|
3235 |
ultimately show ?thesis by (simp add: finite_subset) |
|
17870 | 3236 |
qed |
3237 |
||
3238 |
lemma fresh_abs_funI1: |
|
3239 |
fixes x :: "'a" |
|
3240 |
and a :: "'x" |
|
3241 |
and b :: "'x" |
|
3242 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
3243 |
and at: "at TYPE('x)" |
|
3244 |
and f: "finite ((supp x)::'x set)" |
|
3245 |
and a1: "b\<sharp>x" |
|
3246 |
and a2: "a\<noteq>b" |
|
3247 |
shows "b\<sharp>([a].x)" |
|
3248 |
proof - |
|
3249 |
have "\<exists>c::'x. c\<sharp>(b,a,x,[a].x)" |
|
21377
c29146dc14f1
replaced exists_fresh lemma with a version formulated with obtains;
urbanc
parents:
21318
diff
changeset
|
3250 |
proof (rule at_exists_fresh'[OF at], auto simp add: supp_prod at_supp[OF at] f) |
17870 | 3251 |
show "finite ((supp ([a].x))::'x set)" using f |
32960
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3252 |
by (simp add: abs_fun_finite_supp[OF pt, OF at]) |
17870 | 3253 |
qed |
3254 |
then obtain c where fr1: "c\<noteq>b" |
|
3255 |
and fr2: "c\<noteq>a" |
|
3256 |
and fr3: "c\<sharp>x" |
|
3257 |
and fr4: "c\<sharp>([a].x)" |
|
3258 |
by (force simp add: fresh_prod at_fresh[OF at]) |
|
3259 |
have e: "[(c,b)]\<bullet>([a].x) = [a].([(c,b)]\<bullet>x)" using a2 fr1 fr2 |
|
3260 |
by (force simp add: abs_fun_pi[OF pt, OF at] at_calc[OF at]) |
|
3261 |
from fr4 have "([(c,b)]\<bullet>c)\<sharp> ([(c,b)]\<bullet>([a].x))" |
|
3262 |
by (simp add: pt_fresh_bij[OF pt_abs_fun_inst[OF pt, OF at], OF at]) |
|
3263 |
hence "b\<sharp>([a].([(c,b)]\<bullet>x))" using fr1 fr2 e |
|
3264 |
by (simp add: at_calc[OF at]) |
|
3265 |
thus ?thesis using a1 fr3 |
|
3266 |
by (simp add: pt_fresh_fresh[OF pt, OF at]) |
|
3267 |
qed |
|
3268 |
||
3269 |
lemma fresh_abs_funE: |
|
3270 |
fixes a :: "'x" |
|
3271 |
and b :: "'x" |
|
3272 |
and x :: "'a" |
|
3273 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
3274 |
and at: "at TYPE('x)" |
|
3275 |
and f: "finite ((supp x)::'x set)" |
|
3276 |
and a1: "b\<sharp>([a].x)" |
|
3277 |
and a2: "b\<noteq>a" |
|
3278 |
shows "b\<sharp>x" |
|
3279 |
proof - |
|
3280 |
have "\<exists>c::'x. c\<sharp>(b,a,x,[a].x)" |
|
21377
c29146dc14f1
replaced exists_fresh lemma with a version formulated with obtains;
urbanc
parents:
21318
diff
changeset
|
3281 |
proof (rule at_exists_fresh'[OF at], auto simp add: supp_prod at_supp[OF at] f) |
17870 | 3282 |
show "finite ((supp ([a].x))::'x set)" using f |
32960
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32638
diff
changeset
|
3283 |
by (simp add: abs_fun_finite_supp[OF pt, OF at]) |
17870 | 3284 |
qed |
3285 |
then obtain c where fr1: "b\<noteq>c" |
|
3286 |
and fr2: "c\<noteq>a" |
|
3287 |
and fr3: "c\<sharp>x" |
|
3288 |
and fr4: "c\<sharp>([a].x)" by (force simp add: fresh_prod at_fresh[OF at]) |
|
3289 |
have "[a].x = [(b,c)]\<bullet>([a].x)" using a1 fr4 |
|
3290 |
by (simp add: pt_fresh_fresh[OF pt_abs_fun_inst[OF pt, OF at], OF at]) |
|
3291 |
hence "[a].x = [a].([(b,c)]\<bullet>x)" using fr2 a2 |
|
3292 |
by (force simp add: abs_fun_pi[OF pt, OF at] at_calc[OF at]) |
|
3293 |
hence b: "([(b,c)]\<bullet>x) = x" by (simp add: abs_fun_eq1) |
|
3294 |
from fr3 have "([(b,c)]\<bullet>c)\<sharp>([(b,c)]\<bullet>x)" |
|
3295 |
by (simp add: pt_fresh_bij[OF pt, OF at]) |
|
3296 |
thus ?thesis using b fr1 by (simp add: at_calc[OF at]) |
|
3297 |
qed |
|
3298 |
||
3299 |
lemma fresh_abs_funI2: |
|
3300 |
fixes a :: "'x" |
|
3301 |
and x :: "'a" |
|
3302 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
3303 |
and at: "at TYPE('x)" |
|
3304 |
and f: "finite ((supp x)::'x set)" |
|
3305 |
shows "a\<sharp>([a].x)" |
|
3306 |
proof - |
|
3307 |
have "\<exists>c::'x. c\<sharp>(a,x)" |
|
21377
c29146dc14f1
replaced exists_fresh lemma with a version formulated with obtains;
urbanc
parents:
21318
diff
changeset
|
3308 |
by (rule at_exists_fresh'[OF at], auto simp add: supp_prod at_supp[OF at] f) |
17870 | 3309 |
then obtain c where fr1: "a\<noteq>c" and fr1_sym: "c\<noteq>a" |
3310 |
and fr2: "c\<sharp>x" by (force simp add: fresh_prod at_fresh[OF at]) |
|
3311 |
have "c\<sharp>([a].x)" using f fr1 fr2 by (simp add: fresh_abs_funI1[OF pt, OF at]) |
|
3312 |
hence "([(c,a)]\<bullet>c)\<sharp>([(c,a)]\<bullet>([a].x))" using fr1 |
|
3313 |
by (simp only: pt_fresh_bij[OF pt_abs_fun_inst[OF pt, OF at], OF at]) |
|
3314 |
hence a: "a\<sharp>([c].([(c,a)]\<bullet>x))" using fr1_sym |
|
3315 |
by (simp add: abs_fun_pi[OF pt, OF at] at_calc[OF at]) |
|
3316 |
have "[c].([(c,a)]\<bullet>x) = ([a].x)" using fr1_sym fr2 |
|
3317 |
by (simp add: abs_fun_eq[OF pt, OF at]) |
|
3318 |
thus ?thesis using a by simp |
|
3319 |
qed |
|
3320 |
||
3321 |
lemma fresh_abs_fun_iff: |
|
3322 |
fixes a :: "'x" |
|
3323 |
and b :: "'x" |
|
3324 |
and x :: "'a" |
|
3325 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
3326 |
and at: "at TYPE('x)" |
|
3327 |
and f: "finite ((supp x)::'x set)" |
|
3328 |
shows "(b\<sharp>([a].x)) = (b=a \<or> b\<sharp>x)" |
|
3329 |
by (auto dest: fresh_abs_funE[OF pt, OF at,OF f] |
|
3330 |
intro: fresh_abs_funI1[OF pt, OF at,OF f] |
|
3331 |
fresh_abs_funI2[OF pt, OF at,OF f]) |
|
3332 |
||
3333 |
lemma abs_fun_supp: |
|
3334 |
fixes a :: "'x" |
|
3335 |
and x :: "'a" |
|
3336 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
3337 |
and at: "at TYPE('x)" |
|
3338 |
and f: "finite ((supp x)::'x set)" |
|
3339 |
shows "supp ([a].x) = (supp x)-{a}" |
|
3340 |
by (force simp add: supp_fresh_iff fresh_abs_fun_iff[OF pt, OF at, OF f]) |
|
3341 |
||
18048 | 3342 |
(* maybe needs to be better stated as supp intersection supp *) |
17870 | 3343 |
lemma abs_fun_supp_ineq: |
3344 |
fixes a :: "'y" |
|
3345 |
and x :: "'a" |
|
3346 |
assumes pta: "pt TYPE('a) TYPE('x)" |
|
3347 |
and ptb: "pt TYPE('y) TYPE('x)" |
|
3348 |
and at: "at TYPE('x)" |
|
3349 |
and cp: "cp TYPE('a) TYPE('x) TYPE('y)" |
|
3350 |
and dj: "disjoint TYPE('y) TYPE('x)" |
|
3351 |
shows "((supp ([a].x))::'x set) = (supp x)" |
|
3352 |
apply(auto simp add: supp_def) |
|
3353 |
apply(auto simp add: abs_fun_pi_ineq[OF pta, OF ptb, OF at, OF cp]) |
|
3354 |
apply(auto simp add: dj_perm_forget[OF dj]) |
|
3355 |
apply(auto simp add: abs_fun_eq1) |
|
3356 |
done |
|
3357 |
||
3358 |
lemma fresh_abs_fun_iff_ineq: |
|
3359 |
fixes a :: "'y" |
|
3360 |
and b :: "'x" |
|
3361 |
and x :: "'a" |
|
3362 |
assumes pta: "pt TYPE('a) TYPE('x)" |
|
3363 |
and ptb: "pt TYPE('y) TYPE('x)" |
|
3364 |
and at: "at TYPE('x)" |
|
3365 |
and cp: "cp TYPE('a) TYPE('x) TYPE('y)" |
|
3366 |
and dj: "disjoint TYPE('y) TYPE('x)" |
|
3367 |
shows "b\<sharp>([a].x) = b\<sharp>x" |
|
3368 |
by (simp add: fresh_def abs_fun_supp_ineq[OF pta, OF ptb, OF at, OF cp, OF dj]) |
|
3369 |
||
18048 | 3370 |
section {* abstraction type for the parsing in nominal datatype *} |
3371 |
(*==============================================================*) |
|
23755 | 3372 |
|
3373 |
inductive_set ABS_set :: "('x\<Rightarrow>('a noption)) set" |
|
3374 |
where |
|
17870 | 3375 |
ABS_in: "(abs_fun a x)\<in>ABS_set" |
3376 |
||
45694
4a8743618257
prefer typedef without extra definition and alternative name;
wenzelm
parents:
45625
diff
changeset
|
3377 |
definition "ABS = ABS_set" |
4a8743618257
prefer typedef without extra definition and alternative name;
wenzelm
parents:
45625
diff
changeset
|
3378 |
|
49834 | 3379 |
typedef ('x,'a) ABS ("\<guillemotleft>_\<guillemotright>_" [1000,1000] 1000) = |
45694
4a8743618257
prefer typedef without extra definition and alternative name;
wenzelm
parents:
45625
diff
changeset
|
3380 |
"ABS::('x\<Rightarrow>('a noption)) set" |
4a8743618257
prefer typedef without extra definition and alternative name;
wenzelm
parents:
45625
diff
changeset
|
3381 |
morphisms Rep_ABS Abs_ABS |
4a8743618257
prefer typedef without extra definition and alternative name;
wenzelm
parents:
45625
diff
changeset
|
3382 |
unfolding ABS_def |
17870 | 3383 |
proof |
3384 |
fix x::"'a" and a::"'x" |
|
3385 |
show "(abs_fun a x)\<in> ABS_set" by (rule ABS_in) |
|
3386 |
qed |
|
3387 |
||
3388 |
||
18048 | 3389 |
section {* lemmas for deciding permutation equations *} |
17870 | 3390 |
(*===================================================*) |
3391 |
||
19477 | 3392 |
lemma perm_aux_fold: |
3393 |
shows "perm_aux pi x = pi\<bullet>x" by (simp only: perm_aux_def) |
|
3394 |
||
3395 |
lemma pt_perm_compose_aux: |
|
3396 |
fixes pi1 :: "'x prm" |
|
3397 |
and pi2 :: "'x prm" |
|
3398 |
and x :: "'a" |
|
3399 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
3400 |
and at: "at TYPE('x)" |
|
3401 |
shows "pi2\<bullet>(pi1\<bullet>x) = perm_aux (pi2\<bullet>pi1) (pi2\<bullet>x)" |
|
3402 |
proof - |
|
23393 | 3403 |
have "(pi2@pi1) \<triangleq> ((pi2\<bullet>pi1)@pi2)" by (rule at_ds8[OF at]) |
19477 | 3404 |
hence "(pi2@pi1)\<bullet>x = ((pi2\<bullet>pi1)@pi2)\<bullet>x" by (rule pt3[OF pt]) |
3405 |
thus ?thesis by (simp add: pt2[OF pt] perm_aux_def) |
|
3406 |
qed |
|
3407 |
||
3408 |
lemma cp1_aux: |
|
3409 |
fixes pi1::"'x prm" |
|
3410 |
and pi2::"'y prm" |
|
3411 |
and x ::"'a" |
|
3412 |
assumes cp: "cp TYPE ('a) TYPE('x) TYPE('y)" |
|
3413 |
shows "pi1\<bullet>(pi2\<bullet>x) = perm_aux (pi1\<bullet>pi2) (pi1\<bullet>x)" |
|
3414 |
using cp by (simp add: cp_def perm_aux_def) |
|
3415 |
||
17870 | 3416 |
lemma perm_eq_app: |
3417 |
fixes f :: "'a\<Rightarrow>'b" |
|
3418 |
and x :: "'a" |
|
3419 |
and pi :: "'x prm" |
|
3420 |
assumes pt: "pt TYPE('a) TYPE('x)" |
|
3421 |
and at: "at TYPE('x)" |
|
3422 |
shows "(pi\<bullet>(f x)=y) = ((pi\<bullet>f)(pi\<bullet>x)=y)" |
|
3423 |
by (simp add: pt_fun_app_eq[OF pt, OF at]) |
|
3424 |
||
3425 |
lemma perm_eq_lam: |
|
3426 |
fixes f :: "'a\<Rightarrow>'b" |
|
3427 |
and x :: "'a" |
|
3428 |
and pi :: "'x prm" |
|
3429 |
shows "((pi\<bullet>(\<lambda>x. f x))=y) = ((\<lambda>x. (pi\<bullet>(f ((rev pi)\<bullet>x))))=y)" |
|
3430 |
by (simp add: perm_fun_def) |
|
3431 |
||
19132 | 3432 |
section {* test *} |
3433 |
lemma at_prm_eq_compose: |
|
3434 |
fixes pi1 :: "'x prm" |
|
3435 |
and pi2 :: "'x prm" |
|
3436 |
and pi3 :: "'x prm" |
|
3437 |
assumes at: "at TYPE('x)" |
|
3438 |
and a: "pi1 \<triangleq> pi2" |
|
3439 |
shows "(pi3\<bullet>pi1) \<triangleq> (pi3\<bullet>pi2)" |
|
3440 |
proof - |
|
3441 |
have pt: "pt TYPE('x) TYPE('x)" by (rule at_pt_inst[OF at]) |
|
3442 |
have pt_prm: "pt TYPE('x prm) TYPE('x)" |
|
3443 |
by (rule pt_list_inst[OF pt_prod_inst[OF pt, OF pt]]) |
|
3444 |
from a show ?thesis |
|
3445 |
apply - |
|
3446 |
apply(auto simp add: prm_eq_def) |
|
3447 |
apply(rule_tac pi="rev pi3" in pt_bij4[OF pt, OF at]) |
|
3448 |
apply(rule trans) |
|
3449 |
apply(rule pt_perm_compose[OF pt, OF at]) |
|
3450 |
apply(simp add: pt_rev_pi[OF pt_prm, OF at]) |
|
3451 |
apply(rule sym) |
|
3452 |
apply(rule trans) |
|
3453 |
apply(rule pt_perm_compose[OF pt, OF at]) |
|
3454 |
apply(simp add: pt_rev_pi[OF pt_prm, OF at]) |
|
3455 |
done |
|
3456 |
qed |
|
3457 |
||
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3458 |
(************************) |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3459 |
(* Various eqvt-lemmas *) |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3460 |
|
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3461 |
lemma Zero_nat_eqvt: |
22446
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3462 |
shows "pi\<bullet>(0::nat) = 0" |
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3463 |
by (auto simp add: perm_nat_def) |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3464 |
|
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3465 |
lemma One_nat_eqvt: |
22446
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3466 |
shows "pi\<bullet>(1::nat) = 1" |
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3467 |
by (simp add: perm_nat_def) |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3468 |
|
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3469 |
lemma Suc_eqvt: |
22446
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3470 |
shows "pi\<bullet>(Suc x) = Suc (pi\<bullet>x)" |
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3471 |
by (auto simp add: perm_nat_def) |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3472 |
|
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3473 |
lemma numeral_nat_eqvt: |
47108
2a1953f0d20d
merged fork with new numeral representation (see NEWS)
huffman
parents:
46950
diff
changeset
|
3474 |
shows "pi\<bullet>((numeral n)::nat) = numeral n" |
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3475 |
by (simp add: perm_nat_def perm_int_def) |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3476 |
|
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3477 |
lemma max_nat_eqvt: |
22446
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3478 |
fixes x::"nat" |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3479 |
shows "pi\<bullet>(max x y) = max (pi\<bullet>x) (pi\<bullet>y)" |
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3480 |
by (simp add:perm_nat_def) |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3481 |
|
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3482 |
lemma min_nat_eqvt: |
22446
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3483 |
fixes x::"nat" |
22500
8436bfd21bf3
corrected the lemmas min_nat_eqvt and min_int_eqvt
urbanc
parents:
22446
diff
changeset
|
3484 |
shows "pi\<bullet>(min x y) = min (pi\<bullet>x) (pi\<bullet>y)" |
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3485 |
by (simp add:perm_nat_def) |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3486 |
|
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3487 |
lemma plus_nat_eqvt: |
22446
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3488 |
fixes x::"nat" |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3489 |
shows "pi\<bullet>(x + y) = (pi\<bullet>x) + (pi\<bullet>y)" |
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3490 |
by (simp add:perm_nat_def) |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3491 |
|
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3492 |
lemma minus_nat_eqvt: |
22446
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3493 |
fixes x::"nat" |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3494 |
shows "pi\<bullet>(x - y) = (pi\<bullet>x) - (pi\<bullet>y)" |
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3495 |
by (simp add:perm_nat_def) |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3496 |
|
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3497 |
lemma mult_nat_eqvt: |
22446
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3498 |
fixes x::"nat" |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3499 |
shows "pi\<bullet>(x * y) = (pi\<bullet>x) * (pi\<bullet>y)" |
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3500 |
by (simp add:perm_nat_def) |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3501 |
|
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3502 |
lemma div_nat_eqvt: |
22446
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3503 |
fixes x::"nat" |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3504 |
shows "pi\<bullet>(x div y) = (pi\<bullet>x) div (pi\<bullet>y)" |
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3505 |
by (simp add:perm_nat_def) |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3506 |
|
22446
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3507 |
lemma Zero_int_eqvt: |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3508 |
shows "pi\<bullet>(0::int) = 0" |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3509 |
by (auto simp add: perm_int_def) |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3510 |
|
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3511 |
lemma One_int_eqvt: |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3512 |
shows "pi\<bullet>(1::int) = 1" |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3513 |
by (simp add: perm_int_def) |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3514 |
|
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3515 |
lemma numeral_int_eqvt: |
47108
2a1953f0d20d
merged fork with new numeral representation (see NEWS)
huffman
parents:
46950
diff
changeset
|
3516 |
shows "pi\<bullet>((numeral n)::int) = numeral n" |
2a1953f0d20d
merged fork with new numeral representation (see NEWS)
huffman
parents:
46950
diff
changeset
|
3517 |
by (simp add: perm_int_def perm_int_def) |
2a1953f0d20d
merged fork with new numeral representation (see NEWS)
huffman
parents:
46950
diff
changeset
|
3518 |
|
2a1953f0d20d
merged fork with new numeral representation (see NEWS)
huffman
parents:
46950
diff
changeset
|
3519 |
lemma neg_numeral_int_eqvt: |
2a1953f0d20d
merged fork with new numeral representation (see NEWS)
huffman
parents:
46950
diff
changeset
|
3520 |
shows "pi\<bullet>((neg_numeral n)::int) = neg_numeral n" |
22446
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3521 |
by (simp add: perm_int_def perm_int_def) |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3522 |
|
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3523 |
lemma max_int_eqvt: |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3524 |
fixes x::"int" |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3525 |
shows "pi\<bullet>(max (x::int) y) = max (pi\<bullet>x) (pi\<bullet>y)" |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3526 |
by (simp add:perm_int_def) |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3527 |
|
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3528 |
lemma min_int_eqvt: |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3529 |
fixes x::"int" |
22500
8436bfd21bf3
corrected the lemmas min_nat_eqvt and min_int_eqvt
urbanc
parents:
22446
diff
changeset
|
3530 |
shows "pi\<bullet>(min x y) = min (pi\<bullet>x) (pi\<bullet>y)" |
22446
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3531 |
by (simp add:perm_int_def) |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3532 |
|
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3533 |
lemma plus_int_eqvt: |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3534 |
fixes x::"int" |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3535 |
shows "pi\<bullet>(x + y) = (pi\<bullet>x) + (pi\<bullet>y)" |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3536 |
by (simp add:perm_int_def) |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3537 |
|
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3538 |
lemma minus_int_eqvt: |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3539 |
fixes x::"int" |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3540 |
shows "pi\<bullet>(x - y) = (pi\<bullet>x) - (pi\<bullet>y)" |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3541 |
by (simp add:perm_int_def) |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3542 |
|
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3543 |
lemma mult_int_eqvt: |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3544 |
fixes x::"int" |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3545 |
shows "pi\<bullet>(x * y) = (pi\<bullet>x) * (pi\<bullet>y)" |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3546 |
by (simp add:perm_int_def) |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3547 |
|
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3548 |
lemma div_int_eqvt: |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3549 |
fixes x::"int" |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3550 |
shows "pi\<bullet>(x div y) = (pi\<bullet>x) div (pi\<bullet>y)" |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3551 |
by (simp add:perm_int_def) |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3552 |
|
30990
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
3553 |
(*******************************************************) |
4872eef36167
reorganised the section about fresh_star and added lemma pt_fresh_star_pi
Christian Urban <urbanc@in.tum.de>
parents:
30983
diff
changeset
|
3554 |
(* Setup of the theorem attributes eqvt and eqvt_force *) |
48891 | 3555 |
ML_file "nominal_thmdecls.ML" |
22245
1b8f4ef50c48
moved the infrastructure from the nominal_tags file to nominal_thmdecls
urbanc
parents:
22231
diff
changeset
|
3556 |
setup "NominalThmDecls.setup" |
19132 | 3557 |
|
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3558 |
lemmas [eqvt] = |
22446
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3559 |
(* connectives *) |
22732
5bd1a2a94e1b
declared lemmas true_eqvt and false_eqvt to be equivariant (suggested by samth at ccs.neu.edu)
urbanc
parents:
22729
diff
changeset
|
3560 |
if_eqvt imp_eqvt disj_eqvt conj_eqvt neg_eqvt |
5bd1a2a94e1b
declared lemmas true_eqvt and false_eqvt to be equivariant (suggested by samth at ccs.neu.edu)
urbanc
parents:
22729
diff
changeset
|
3561 |
true_eqvt false_eqvt |
24568 | 3562 |
imp_eqvt [folded induct_implies_def] |
22446
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3563 |
|
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3564 |
(* datatypes *) |
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3565 |
perm_unit.simps |
22446
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3566 |
perm_list.simps append_eqvt |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3567 |
perm_prod.simps |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3568 |
fst_eqvt snd_eqvt |
22511
ca326e0fb5c5
added the permutation operation on options to the list of equivariance lemmas
urbanc
parents:
22500
diff
changeset
|
3569 |
perm_option.simps |
22446
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3570 |
|
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3571 |
(* nats *) |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3572 |
Suc_eqvt Zero_nat_eqvt One_nat_eqvt min_nat_eqvt max_nat_eqvt |
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3573 |
plus_nat_eqvt minus_nat_eqvt mult_nat_eqvt div_nat_eqvt |
22446
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3574 |
|
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3575 |
(* ints *) |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3576 |
Zero_int_eqvt One_int_eqvt min_int_eqvt max_int_eqvt |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3577 |
plus_int_eqvt minus_int_eqvt mult_int_eqvt div_int_eqvt |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3578 |
|
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3579 |
(* sets *) |
46179
47bcf3d5d1f0
Reverted several lemmas involving sets to the state before the
berghofe
parents:
45961
diff
changeset
|
3580 |
union_eqvt empty_eqvt insert_eqvt set_eqvt |
22446
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3581 |
|
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3582 |
|
22446
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3583 |
(* the lemmas numeral_nat_eqvt numeral_int_eqvt do not conform with the *) |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3584 |
(* usual form of an eqvt-lemma, but they are needed for analysing *) |
91951d4177d3
added eqvt-lemmas for integers and eqvt-tagged the lemma append_eqvt
urbanc
parents:
22418
diff
changeset
|
3585 |
(* permutations on nats and ints *) |
47108
2a1953f0d20d
merged fork with new numeral representation (see NEWS)
huffman
parents:
46950
diff
changeset
|
3586 |
lemmas [eqvt_force] = numeral_nat_eqvt numeral_int_eqvt neg_numeral_int_eqvt |
22326
a3acee47a883
start adding the attribute eqvt to some lemmas of the nominal library
narboux
parents:
22312
diff
changeset
|
3587 |
|
17870 | 3588 |
(***************************************) |
3589 |
(* setup for the individial atom-kinds *) |
|
18047
3d643b13eb65
simplified the abs_supp_approx proof and tuned some comments in
urbanc
parents:
18012
diff
changeset
|
3590 |
(* and nominal datatypes *) |
48891 | 3591 |
ML_file "nominal_atoms.ML" |
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3592 |
|
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3593 |
(************************************************************) |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3594 |
(* various tactics for analysing permutations, supports etc *) |
48891 | 3595 |
ML_file "nominal_permeq.ML" |
17870 | 3596 |
|
3597 |
method_setup perm_simp = |
|
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3598 |
{* NominalPermeq.perm_simp_meth *} |
19477 | 3599 |
{* simp rules and simprocs for analysing permutations *} |
17870 | 3600 |
|
3601 |
method_setup perm_simp_debug = |
|
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3602 |
{* NominalPermeq.perm_simp_meth_debug *} |
19986
3e0eababf58d
- nominal_permeq.ML is now loaded before nominal_package.ML
berghofe
parents:
19972
diff
changeset
|
3603 |
{* simp rules and simprocs for analysing permutations including debugging facilities *} |
19477 | 3604 |
|
28322
6f4cf302c798
made the perm_simp tactic to understand options such as (no_asm)
urbanc
parents:
28011
diff
changeset
|
3605 |
method_setup perm_extend_simp = |
6f4cf302c798
made the perm_simp tactic to understand options such as (no_asm)
urbanc
parents:
28011
diff
changeset
|
3606 |
{* NominalPermeq.perm_extend_simp_meth *} |
19477 | 3607 |
{* tactic for deciding equalities involving permutations *} |
3608 |
||
28322
6f4cf302c798
made the perm_simp tactic to understand options such as (no_asm)
urbanc
parents:
28011
diff
changeset
|
3609 |
method_setup perm_extend_simp_debug = |
6f4cf302c798
made the perm_simp tactic to understand options such as (no_asm)
urbanc
parents:
28011
diff
changeset
|
3610 |
{* NominalPermeq.perm_extend_simp_meth_debug *} |
19986
3e0eababf58d
- nominal_permeq.ML is now loaded before nominal_package.ML
berghofe
parents:
19972
diff
changeset
|
3611 |
{* tactic for deciding equalities involving permutations including debugging facilities *} |
17870 | 3612 |
|
3613 |
method_setup supports_simp = |
|
19986
3e0eababf58d
- nominal_permeq.ML is now loaded before nominal_package.ML
berghofe
parents:
19972
diff
changeset
|
3614 |
{* NominalPermeq.supports_meth *} |
18703 | 3615 |
{* tactic for deciding whether something supports something else *} |
17870 | 3616 |
|
3617 |
method_setup supports_simp_debug = |
|
19986
3e0eababf58d
- nominal_permeq.ML is now loaded before nominal_package.ML
berghofe
parents:
19972
diff
changeset
|
3618 |
{* NominalPermeq.supports_meth_debug *} |
3e0eababf58d
- nominal_permeq.ML is now loaded before nominal_package.ML
berghofe
parents:
19972
diff
changeset
|
3619 |
{* tactic for deciding whether something supports something else including debugging facilities *} |
17870 | 3620 |
|
19164 | 3621 |
method_setup finite_guess = |
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3622 |
{* NominalPermeq.finite_guess_meth *} |
19164 | 3623 |
{* tactic for deciding whether something has finite support *} |
3624 |
||
3625 |
method_setup finite_guess_debug = |
|
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3626 |
{* NominalPermeq.finite_guess_meth_debug *} |
19986
3e0eababf58d
- nominal_permeq.ML is now loaded before nominal_package.ML
berghofe
parents:
19972
diff
changeset
|
3627 |
{* tactic for deciding whether something has finite support including debugging facilities *} |
19494 | 3628 |
|
19638
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
3629 |
method_setup fresh_guess = |
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3630 |
{* NominalPermeq.fresh_guess_meth *} |
19638
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
3631 |
{* tactic for deciding whether an atom is fresh for something*} |
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
3632 |
|
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
3633 |
method_setup fresh_guess_debug = |
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3634 |
{* NominalPermeq.fresh_guess_meth_debug *} |
19986
3e0eababf58d
- nominal_permeq.ML is now loaded before nominal_package.ML
berghofe
parents:
19972
diff
changeset
|
3635 |
{* tactic for deciding whether an atom is fresh for something including debugging facilities *} |
19638
4358b88a9d12
added the lemmas pt_fresh_aux and pt_fresh_aux_ineq
urbanc
parents:
19634
diff
changeset
|
3636 |
|
22762 | 3637 |
(*****************************************************************) |
3638 |
(* tactics for generating fresh names and simplifying fresh_funs *) |
|
48891 | 3639 |
ML_file "nominal_fresh_fun.ML" |
22729 | 3640 |
|
3641 |
method_setup generate_fresh = |
|
3642 |
{* setup_generate_fresh *} |
|
3643 |
{* tactic to generate a name fresh for all the variables in the goal *} |
|
3644 |
||
3645 |
method_setup fresh_fun_simp = |
|
3646 |
{* setup_fresh_fun_simp *} |
|
3647 |
{* tactic to delete one inner occurence of fresh_fun *} |
|
3648 |
||
3649 |
||
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3650 |
(************************************************) |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3651 |
(* main file for constructing nominal datatypes *) |
27228
4f7976a6ffc3
allE_Nil: only one copy, proven in regular theory source;
wenzelm
parents:
26847
diff
changeset
|
3652 |
lemma allE_Nil: assumes "\<forall>x. P x" obtains "P []" |
4f7976a6ffc3
allE_Nil: only one copy, proven in regular theory source;
wenzelm
parents:
26847
diff
changeset
|
3653 |
using assms .. |
4f7976a6ffc3
allE_Nil: only one copy, proven in regular theory source;
wenzelm
parents:
26847
diff
changeset
|
3654 |
|
48891 | 3655 |
ML_file "nominal_datatype.ML" |
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3656 |
|
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3657 |
(******************************************************) |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3658 |
(* primitive recursive functions on nominal datatypes *) |
48891 | 3659 |
ML_file "nominal_primrec.ML" |
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3660 |
|
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3661 |
(****************************************************) |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3662 |
(* inductive definition involving nominal datatypes *) |
48891 | 3663 |
ML_file "nominal_inductive.ML" |
3664 |
ML_file "nominal_inductive2.ML" |
|
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3665 |
|
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3666 |
(*****************************************) |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3667 |
(* setup for induction principles method *) |
48891 | 3668 |
ML_file "nominal_induct.ML" |
22418
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3669 |
method_setup nominal_induct = |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3670 |
{* NominalInduct.nominal_induct_method *} |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3671 |
{* nominal induction *} |
49e2d9744ae1
major update of the nominal package; there is now an infrastructure
urbanc
parents:
22326
diff
changeset
|
3672 |
|
17870 | 3673 |
end |