author | Cezary Kaliszyk <kaliszyk@in.tum.de> |
Fri, 29 Jan 2010 19:42:07 +0100 | |
changeset 994 | 333c24bd595d |
parent 947 | fa810f01f7b5 |
child 1012 | 83d5a7cd2cc6 |
permissions | -rw-r--r-- |
947
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
1 |
(* Title: Nominal2_Supp |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
2 |
Authors: Brian Huffman, Christian Urban |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
3 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
4 |
Supplementary Lemmas and Definitions for |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
5 |
Nominal Isabelle. |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
6 |
*) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
7 |
theory Nominal2_Supp |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
8 |
imports Nominal2_Base Nominal2_Eqvt Nominal2_Atoms |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
9 |
begin |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
10 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
11 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
12 |
section {* Fresh-Star *} |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
13 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
14 |
text {* The fresh-star generalisation of fresh is used in strong |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
15 |
induction principles. *} |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
16 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
17 |
definition |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
18 |
fresh_star :: "atom set \<Rightarrow> 'a::pt \<Rightarrow> bool" ("_ \<sharp>* _" [80,80] 80) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
19 |
where |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
20 |
"xs \<sharp>* c \<equiv> \<forall>x \<in> xs. x \<sharp> c" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
21 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
22 |
lemma fresh_star_prod: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
23 |
fixes xs::"atom set" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
24 |
shows "xs \<sharp>* (a, b) = (xs \<sharp>* a \<and> xs \<sharp>* b)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
25 |
by (auto simp add: fresh_star_def fresh_Pair) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
26 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
27 |
lemma fresh_star_union: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
28 |
shows "(xs \<union> ys) \<sharp>* c = (xs \<sharp>* c \<and> ys \<sharp>* c)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
29 |
by (auto simp add: fresh_star_def) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
30 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
31 |
lemma fresh_star_insert: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
32 |
shows "(insert x ys) \<sharp>* c = (x \<sharp> c \<and> ys \<sharp>* c)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
33 |
by (auto simp add: fresh_star_def) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
34 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
35 |
lemma fresh_star_Un_elim: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
36 |
"((S \<union> T) \<sharp>* c \<Longrightarrow> PROP C) \<equiv> (S \<sharp>* c \<Longrightarrow> T \<sharp>* c \<Longrightarrow> PROP C)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
37 |
unfolding fresh_star_def |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
38 |
apply(rule) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
39 |
apply(erule meta_mp) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
40 |
apply(auto) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
41 |
done |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
42 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
43 |
lemma fresh_star_insert_elim: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
44 |
"(insert x S \<sharp>* c \<Longrightarrow> PROP C) \<equiv> (x \<sharp> c \<Longrightarrow> S \<sharp>* c \<Longrightarrow> PROP C)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
45 |
unfolding fresh_star_def |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
46 |
by rule (simp_all add: fresh_star_def) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
47 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
48 |
lemma fresh_star_empty_elim: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
49 |
"({} \<sharp>* c \<Longrightarrow> PROP C) \<equiv> PROP C" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
50 |
by (simp add: fresh_star_def) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
51 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
52 |
lemma fresh_star_unit_elim: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
53 |
shows "(a \<sharp>* () \<Longrightarrow> PROP C) \<equiv> PROP C" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
54 |
by (simp add: fresh_star_def fresh_unit) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
55 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
56 |
lemma fresh_star_prod_elim: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
57 |
shows "(a \<sharp>* (x, y) \<Longrightarrow> PROP C) \<equiv> (a \<sharp>* x \<Longrightarrow> a \<sharp>* y \<Longrightarrow> PROP C)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
58 |
by (rule, simp_all add: fresh_star_prod) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
59 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
60 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
61 |
section {* Avoiding of atom sets *} |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
62 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
63 |
text {* |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
64 |
For every set of atoms, there is another set of atoms |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
65 |
avoiding a finitely supported c and there is a permutation |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
66 |
which 'translates' between both sets. |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
67 |
*} |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
68 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
69 |
lemma swap_set_fresh: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
70 |
assumes a: "a \<notin> S" "b \<notin> S" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
71 |
shows "(a \<rightleftharpoons> b) \<bullet> S = S" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
72 |
using a |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
73 |
by (auto simp add: permute_set_eq swap_atom) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
74 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
75 |
lemma at_set_avoiding_aux: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
76 |
fixes Xs::"atom set" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
77 |
and As::"atom set" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
78 |
assumes b: "Xs \<subseteq> As" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
79 |
and c: "finite As" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
80 |
shows "\<exists>p. (p \<bullet> Xs) \<inter> As = {} \<and> (supp p) \<subseteq> (Xs \<union> (p \<bullet> Xs))" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
81 |
proof - |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
82 |
from b c have "finite Xs" by (rule finite_subset) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
83 |
then show ?thesis using b |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
84 |
proof (induct rule: finite_subset_induct) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
85 |
case empty |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
86 |
have "0 \<bullet> {} \<inter> As = {}" by simp |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
87 |
moreover |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
88 |
have "supp (0::perm) \<subseteq> {} \<union> 0 \<bullet> {}" by (simp add: supp_zero_perm) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
89 |
ultimately show ?case by blast |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
90 |
next |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
91 |
case (insert x Xs) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
92 |
then obtain p where |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
93 |
p1: "(p \<bullet> Xs) \<inter> As = {}" and |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
94 |
p2: "supp p \<subseteq> (Xs \<union> (p \<bullet> Xs))" by blast |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
95 |
from `x \<in> As` p1 have "x \<notin> p \<bullet> Xs" by fast |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
96 |
with `x \<notin> Xs` p2 have "x \<notin> supp p" by fast |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
97 |
hence px: "p \<bullet> x = x" unfolding supp_perm by simp |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
98 |
have "finite (As \<union> p \<bullet> Xs)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
99 |
using `finite As` `finite Xs` |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
100 |
by (simp add: permute_set_eq_image) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
101 |
then obtain y where "y \<notin> (As \<union> p \<bullet> Xs)" "sort_of y = sort_of x" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
102 |
by (rule obtain_atom) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
103 |
hence y: "y \<notin> As" "y \<notin> p \<bullet> Xs" "sort_of y = sort_of x" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
104 |
by simp_all |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
105 |
let ?q = "(x \<rightleftharpoons> y) + p" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
106 |
have q: "?q \<bullet> insert x Xs = insert y (p \<bullet> Xs)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
107 |
unfolding insert_eqvt |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
108 |
using `p \<bullet> x = x` `sort_of y = sort_of x` |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
109 |
using `x \<notin> p \<bullet> Xs` `y \<notin> p \<bullet> Xs` |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
110 |
by (simp add: swap_atom swap_set_fresh) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
111 |
have "?q \<bullet> insert x Xs \<inter> As = {}" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
112 |
using `y \<notin> As` `p \<bullet> Xs \<inter> As = {}` |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
113 |
unfolding q by simp |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
114 |
moreover |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
115 |
have "supp ?q \<subseteq> insert x Xs \<union> ?q \<bullet> insert x Xs" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
116 |
using p2 unfolding q |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
117 |
apply (intro subset_trans [OF supp_plus_perm]) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
118 |
apply (auto simp add: supp_swap) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
119 |
done |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
120 |
ultimately show ?case by blast |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
121 |
qed |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
122 |
qed |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
123 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
124 |
lemma at_set_avoiding: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
125 |
assumes a: "finite Xs" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
126 |
and b: "finite (supp c)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
127 |
obtains p::"perm" where "(p \<bullet> Xs)\<sharp>*c" and "(supp p) \<subseteq> (Xs \<union> (p \<bullet> Xs))" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
128 |
using a b at_set_avoiding_aux [where Xs="Xs" and As="Xs \<union> supp c"] |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
129 |
unfolding fresh_star_def fresh_def by blast |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
130 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
131 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
132 |
section {* The freshness lemma according to Andrew Pitts *} |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
133 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
134 |
lemma fresh_conv_MOST: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
135 |
shows "a \<sharp> x \<longleftrightarrow> (MOST b. (a \<rightleftharpoons> b) \<bullet> x = x)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
136 |
unfolding fresh_def supp_def MOST_iff_cofinite by simp |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
137 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
138 |
lemma fresh_apply: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
139 |
assumes "a \<sharp> f" and "a \<sharp> x" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
140 |
shows "a \<sharp> f x" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
141 |
using assms unfolding fresh_conv_MOST |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
142 |
unfolding permute_fun_app_eq [where f=f] |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
143 |
by (elim MOST_rev_mp, simp) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
144 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
145 |
lemma freshness_lemma: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
146 |
fixes h :: "'a::at \<Rightarrow> 'b::pt" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
147 |
assumes a: "\<exists>a. atom a \<sharp> (h, h a)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
148 |
shows "\<exists>x. \<forall>a. atom a \<sharp> h \<longrightarrow> h a = x" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
149 |
proof - |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
150 |
from a obtain b where a1: "atom b \<sharp> h" and a2: "atom b \<sharp> h b" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
151 |
by (auto simp add: fresh_Pair) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
152 |
show "\<exists>x. \<forall>a. atom a \<sharp> h \<longrightarrow> h a = x" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
153 |
proof (intro exI allI impI) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
154 |
fix a :: 'a |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
155 |
assume a3: "atom a \<sharp> h" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
156 |
show "h a = h b" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
157 |
proof (cases "a = b") |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
158 |
assume "a = b" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
159 |
thus "h a = h b" by simp |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
160 |
next |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
161 |
assume "a \<noteq> b" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
162 |
hence "atom a \<sharp> b" by (simp add: fresh_at) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
163 |
with a3 have "atom a \<sharp> h b" by (rule fresh_apply) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
164 |
with a2 have d1: "(atom b \<rightleftharpoons> atom a) \<bullet> (h b) = (h b)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
165 |
by (rule swap_fresh_fresh) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
166 |
from a1 a3 have d2: "(atom b \<rightleftharpoons> atom a) \<bullet> h = h" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
167 |
by (rule swap_fresh_fresh) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
168 |
from d1 have "h b = (atom b \<rightleftharpoons> atom a) \<bullet> (h b)" by simp |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
169 |
also have "\<dots> = ((atom b \<rightleftharpoons> atom a) \<bullet> h) ((atom b \<rightleftharpoons> atom a) \<bullet> b)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
170 |
by (rule permute_fun_app_eq) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
171 |
also have "\<dots> = h a" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
172 |
using d2 by simp |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
173 |
finally show "h a = h b" by simp |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
174 |
qed |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
175 |
qed |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
176 |
qed |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
177 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
178 |
lemma freshness_lemma_unique: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
179 |
fixes h :: "'a::at \<Rightarrow> 'b::pt" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
180 |
assumes a: "\<exists>a. atom a \<sharp> (h, h a)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
181 |
shows "\<exists>!x. \<forall>a. atom a \<sharp> h \<longrightarrow> h a = x" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
182 |
proof (rule ex_ex1I) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
183 |
from a show "\<exists>x. \<forall>a. atom a \<sharp> h \<longrightarrow> h a = x" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
184 |
by (rule freshness_lemma) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
185 |
next |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
186 |
fix x y |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
187 |
assume x: "\<forall>a. atom a \<sharp> h \<longrightarrow> h a = x" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
188 |
assume y: "\<forall>a. atom a \<sharp> h \<longrightarrow> h a = y" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
189 |
from a x y show "x = y" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
190 |
by (auto simp add: fresh_Pair) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
191 |
qed |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
192 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
193 |
text {* packaging the freshness lemma into a function *} |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
194 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
195 |
definition |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
196 |
fresh_fun :: "('a::at \<Rightarrow> 'b::pt) \<Rightarrow> 'b" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
197 |
where |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
198 |
"fresh_fun h = (THE x. \<forall>a. atom a \<sharp> h \<longrightarrow> h a = x)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
199 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
200 |
lemma fresh_fun_app: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
201 |
fixes h :: "'a::at \<Rightarrow> 'b::pt" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
202 |
assumes a: "\<exists>a. atom a \<sharp> (h, h a)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
203 |
assumes b: "atom a \<sharp> h" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
204 |
shows "fresh_fun h = h a" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
205 |
unfolding fresh_fun_def |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
206 |
proof (rule the_equality) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
207 |
show "\<forall>a'. atom a' \<sharp> h \<longrightarrow> h a' = h a" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
208 |
proof (intro strip) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
209 |
fix a':: 'a |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
210 |
assume c: "atom a' \<sharp> h" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
211 |
from a have "\<exists>x. \<forall>a. atom a \<sharp> h \<longrightarrow> h a = x" by (rule freshness_lemma) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
212 |
with b c show "h a' = h a" by auto |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
213 |
qed |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
214 |
next |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
215 |
fix fr :: 'b |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
216 |
assume "\<forall>a. atom a \<sharp> h \<longrightarrow> h a = fr" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
217 |
with b show "fr = h a" by auto |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
218 |
qed |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
219 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
220 |
lemma fresh_fun_app': |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
221 |
fixes h :: "'a::at \<Rightarrow> 'b::pt" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
222 |
assumes a: "atom a \<sharp> h" "atom a \<sharp> h a" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
223 |
shows "fresh_fun h = h a" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
224 |
apply (rule fresh_fun_app) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
225 |
apply (auto simp add: fresh_Pair intro: a) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
226 |
done |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
227 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
228 |
lemma fresh_fun_eqvt: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
229 |
fixes h :: "'a::at \<Rightarrow> 'b::pt" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
230 |
assumes a: "\<exists>a. atom a \<sharp> (h, h a)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
231 |
shows "p \<bullet> (fresh_fun h) = fresh_fun (p \<bullet> h)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
232 |
using a |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
233 |
apply (clarsimp simp add: fresh_Pair) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
234 |
apply (subst fresh_fun_app', assumption+) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
235 |
apply (drule fresh_permute_iff [where p=p, THEN iffD2]) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
236 |
apply (drule fresh_permute_iff [where p=p, THEN iffD2]) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
237 |
apply (simp add: atom_eqvt permute_fun_app_eq [where f=h]) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
238 |
apply (erule (1) fresh_fun_app' [symmetric]) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
239 |
done |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
240 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
241 |
lemma fresh_fun_supports: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
242 |
fixes h :: "'a::at \<Rightarrow> 'b::pt" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
243 |
assumes a: "\<exists>a. atom a \<sharp> (h, h a)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
244 |
shows "(supp h) supports (fresh_fun h)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
245 |
apply (simp add: supports_def fresh_def [symmetric]) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
246 |
apply (simp add: fresh_fun_eqvt [OF a] swap_fresh_fresh) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
247 |
done |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
248 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
249 |
notation fresh_fun (binder "FRESH " 10) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
250 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
251 |
lemma FRESH_f_iff: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
252 |
fixes P :: "'a::at \<Rightarrow> 'b::pure" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
253 |
fixes f :: "'b \<Rightarrow> 'c::pure" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
254 |
assumes P: "finite (supp P)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
255 |
shows "(FRESH x. f (P x)) = f (FRESH x. P x)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
256 |
proof - |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
257 |
obtain a::'a where "atom a \<notin> supp P" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
258 |
using P by (rule obtain_at_base) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
259 |
hence "atom a \<sharp> P" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
260 |
by (simp add: fresh_def) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
261 |
show "(FRESH x. f (P x)) = f (FRESH x. P x)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
262 |
apply (subst fresh_fun_app' [where a=a, OF _ pure_fresh]) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
263 |
apply (cut_tac `atom a \<sharp> P`) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
264 |
apply (simp add: fresh_conv_MOST) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
265 |
apply (elim MOST_rev_mp, rule MOST_I, clarify) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
266 |
apply (simp add: permute_fun_def permute_pure expand_fun_eq) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
267 |
apply (subst fresh_fun_app' [where a=a, OF `atom a \<sharp> P` pure_fresh]) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
268 |
apply (rule refl) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
269 |
done |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
270 |
qed |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
271 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
272 |
lemma FRESH_binop_iff: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
273 |
fixes P :: "'a::at \<Rightarrow> 'b::pure" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
274 |
fixes Q :: "'a::at \<Rightarrow> 'c::pure" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
275 |
fixes binop :: "'b \<Rightarrow> 'c \<Rightarrow> 'd::pure" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
276 |
assumes P: "finite (supp P)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
277 |
and Q: "finite (supp Q)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
278 |
shows "(FRESH x. binop (P x) (Q x)) = binop (FRESH x. P x) (FRESH x. Q x)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
279 |
proof - |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
280 |
from assms have "finite (supp P \<union> supp Q)" by simp |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
281 |
then obtain a::'a where "atom a \<notin> (supp P \<union> supp Q)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
282 |
by (rule obtain_at_base) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
283 |
hence "atom a \<sharp> P" and "atom a \<sharp> Q" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
284 |
by (simp_all add: fresh_def) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
285 |
show ?thesis |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
286 |
apply (subst fresh_fun_app' [where a=a, OF _ pure_fresh]) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
287 |
apply (cut_tac `atom a \<sharp> P` `atom a \<sharp> Q`) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
288 |
apply (simp add: fresh_conv_MOST) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
289 |
apply (elim MOST_rev_mp, rule MOST_I, clarify) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
290 |
apply (simp add: permute_fun_def permute_pure expand_fun_eq) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
291 |
apply (subst fresh_fun_app' [where a=a, OF `atom a \<sharp> P` pure_fresh]) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
292 |
apply (subst fresh_fun_app' [where a=a, OF `atom a \<sharp> Q` pure_fresh]) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
293 |
apply (rule refl) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
294 |
done |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
295 |
qed |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
296 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
297 |
lemma FRESH_conj_iff: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
298 |
fixes P Q :: "'a::at \<Rightarrow> bool" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
299 |
assumes P: "finite (supp P)" and Q: "finite (supp Q)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
300 |
shows "(FRESH x. P x \<and> Q x) \<longleftrightarrow> (FRESH x. P x) \<and> (FRESH x. Q x)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
301 |
using P Q by (rule FRESH_binop_iff) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
302 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
303 |
lemma FRESH_disj_iff: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
304 |
fixes P Q :: "'a::at \<Rightarrow> bool" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
305 |
assumes P: "finite (supp P)" and Q: "finite (supp Q)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
306 |
shows "(FRESH x. P x \<or> Q x) \<longleftrightarrow> (FRESH x. P x) \<or> (FRESH x. Q x)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
307 |
using P Q by (rule FRESH_binop_iff) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
308 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
309 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
310 |
section {* An example of a function without finite support *} |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
311 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
312 |
primrec |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
313 |
nat_of :: "atom \<Rightarrow> nat" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
314 |
where |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
315 |
"nat_of (Atom s n) = n" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
316 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
317 |
lemma atom_eq_iff: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
318 |
fixes a b :: atom |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
319 |
shows "a = b \<longleftrightarrow> sort_of a = sort_of b \<and> nat_of a = nat_of b" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
320 |
by (induct a, induct b, simp) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
321 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
322 |
lemma not_fresh_nat_of: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
323 |
shows "\<not> a \<sharp> nat_of" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
324 |
unfolding fresh_def supp_def |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
325 |
proof (clarsimp) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
326 |
assume "finite {b. (a \<rightleftharpoons> b) \<bullet> nat_of \<noteq> nat_of}" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
327 |
hence "finite ({a} \<union> {b. (a \<rightleftharpoons> b) \<bullet> nat_of \<noteq> nat_of})" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
328 |
by simp |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
329 |
then obtain b where |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
330 |
b1: "b \<noteq> a" and |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
331 |
b2: "sort_of b = sort_of a" and |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
332 |
b3: "(a \<rightleftharpoons> b) \<bullet> nat_of = nat_of" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
333 |
by (rule obtain_atom) auto |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
334 |
have "nat_of a = (a \<rightleftharpoons> b) \<bullet> (nat_of a)" by (simp add: permute_nat_def) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
335 |
also have "\<dots> = ((a \<rightleftharpoons> b) \<bullet> nat_of) ((a \<rightleftharpoons> b) \<bullet> a)" by (simp add: permute_fun_app_eq) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
336 |
also have "\<dots> = nat_of ((a \<rightleftharpoons> b) \<bullet> a)" using b3 by simp |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
337 |
also have "\<dots> = nat_of b" using b2 by simp |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
338 |
finally have "nat_of a = nat_of b" by simp |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
339 |
with b2 have "a = b" by (simp add: atom_eq_iff) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
340 |
with b1 show "False" by simp |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
341 |
qed |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
342 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
343 |
lemma supp_nat_of: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
344 |
shows "supp nat_of = UNIV" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
345 |
using not_fresh_nat_of [unfolded fresh_def] by auto |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
346 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
347 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
348 |
(* |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
349 |
section {* Characterisation of the support of sets of atoms *} |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
350 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
351 |
lemma swap_set_ineq: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
352 |
fixes a b::"'a::at" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
353 |
assumes "a \<in> S" "b \<notin> S" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
354 |
shows "(a \<leftrightarrow> b) \<bullet> S \<noteq> S" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
355 |
using assms |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
356 |
unfolding permute_set_eq |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
357 |
by (auto simp add: permute_flip_at) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
358 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
359 |
lemma supp_finite: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
360 |
fixes S::"'a::at set" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
361 |
assumes asm: "finite S" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
362 |
shows "(supp S) = atom ` S" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
363 |
sorry |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
364 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
365 |
lemma supp_infinite: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
366 |
fixes S::"atom set" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
367 |
assumes asm: "finite (UNIV - S)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
368 |
shows "(supp S) = (UNIV - S)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
369 |
apply(rule finite_supp_unique) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
370 |
apply(auto simp add: supports_def permute_set_eq swap_atom)[1] |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
371 |
apply(rule asm) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
372 |
apply(auto simp add: permute_set_eq swap_atom)[1] |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
373 |
done |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
374 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
375 |
lemma supp_infinite_coinfinite: |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
376 |
fixes S::"atom set" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
377 |
assumes asm1: "infinite S" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
378 |
and asm2: "infinite (UNIV-S)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
379 |
shows "(supp S) = (UNIV::atom set)" |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
380 |
*) |
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
381 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
382 |
|
fa810f01f7b5
added an LamEx example together with the new nominal infrastructure
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
383 |
end |