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