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