Nominal-General/Nominal2_Supp.thy
author Christian Urban <urbanc@in.tum.de>
Tue, 04 May 2010 05:36:43 +0100
changeset 2033 74bd7bfb484b
parent 2012 a48a6f88f76e
child 2372 06574b438b8f
permissions -rw-r--r--
some preliminary changes to the pearl-jv paper
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1062
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
     1
(*  Title:      Nominal2_Supp
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
     2
    Authors:    Brian Huffman, Christian Urban
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
     3
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
     4
    Supplementary Lemmas and Definitions for 
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
     5
    Nominal Isabelle. 
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
     6
*)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
     7
theory Nominal2_Supp
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
     8
imports Nominal2_Base Nominal2_Eqvt Nominal2_Atoms
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
     9
begin
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    10
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    11
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    12
section {* Fresh-Star *}
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    13
1930
f189cf2c0987 moved some lemmas into the right places
Christian Urban <urbanc@in.tum.de>
parents: 1923
diff changeset
    14
1062
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    15
text {* The fresh-star generalisation of fresh is used in strong
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    16
  induction principles. *}
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    17
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    18
definition 
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    19
  fresh_star :: "atom set \<Rightarrow> 'a::pt \<Rightarrow> bool" ("_ \<sharp>* _" [80,80] 80)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    20
where 
1506
7c607df46a0a slightly more in the paper
Christian Urban <urbanc@in.tum.de>
parents: 1436
diff changeset
    21
  "as \<sharp>* x \<equiv> \<forall>a \<in> as. a \<sharp> x"
1062
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    22
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    23
lemma fresh_star_prod:
1506
7c607df46a0a slightly more in the paper
Christian Urban <urbanc@in.tum.de>
parents: 1436
diff changeset
    24
  fixes as::"atom set"
2012
a48a6f88f76e simplified the supp-of-finite-sets proof
Christian Urban <urbanc@in.tum.de>
parents: 2003
diff changeset
    25
  shows "as \<sharp>* (x, y) = (as \<sharp>* x \<and> as \<sharp>* y)" 
1062
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    26
  by (auto simp add: fresh_star_def fresh_Pair)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    27
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    28
lemma fresh_star_union:
1506
7c607df46a0a slightly more in the paper
Christian Urban <urbanc@in.tum.de>
parents: 1436
diff changeset
    29
  shows "(as \<union> bs) \<sharp>* x = (as \<sharp>* x \<and> bs \<sharp>* x)"
1062
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    30
  by (auto simp add: fresh_star_def)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    31
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    32
lemma fresh_star_insert:
1506
7c607df46a0a slightly more in the paper
Christian Urban <urbanc@in.tum.de>
parents: 1436
diff changeset
    33
  shows "(insert a as) \<sharp>* x = (a \<sharp> x \<and> as \<sharp>* x)"
1062
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    34
  by (auto simp add: fresh_star_def)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    35
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    36
lemma fresh_star_Un_elim:
1506
7c607df46a0a slightly more in the paper
Christian Urban <urbanc@in.tum.de>
parents: 1436
diff changeset
    37
  "((as \<union> bs) \<sharp>* x \<Longrightarrow> PROP C) \<equiv> (as \<sharp>* x \<Longrightarrow> bs \<sharp>* x \<Longrightarrow> PROP C)"
1062
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    38
  unfolding fresh_star_def
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    39
  apply(rule)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    40
  apply(erule meta_mp)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    41
  apply(auto)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    42
  done
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    43
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    44
lemma fresh_star_insert_elim:
1506
7c607df46a0a slightly more in the paper
Christian Urban <urbanc@in.tum.de>
parents: 1436
diff changeset
    45
  "(insert a as \<sharp>* x \<Longrightarrow> PROP C) \<equiv> (a \<sharp> x \<Longrightarrow> as \<sharp>* x \<Longrightarrow> PROP C)"
1062
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    46
  unfolding fresh_star_def
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    47
  by rule (simp_all add: fresh_star_def)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    48
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    49
lemma fresh_star_empty_elim:
1506
7c607df46a0a slightly more in the paper
Christian Urban <urbanc@in.tum.de>
parents: 1436
diff changeset
    50
  "({} \<sharp>* x \<Longrightarrow> PROP C) \<equiv> PROP C"
1062
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    51
  by (simp add: fresh_star_def)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    52
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    53
lemma fresh_star_unit_elim: 
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    54
  shows "(a \<sharp>* () \<Longrightarrow> PROP C) \<equiv> PROP C"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    55
  by (simp add: fresh_star_def fresh_unit) 
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    56
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    57
lemma fresh_star_prod_elim: 
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    58
  shows "(a \<sharp>* (x, y) \<Longrightarrow> PROP C) \<equiv> (a \<sharp>* x \<Longrightarrow> a \<sharp>* y \<Longrightarrow> PROP C)"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    59
  by (rule, simp_all add: fresh_star_prod)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    60
1436
04dad9b0136d started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents: 1258
diff changeset
    61
lemma fresh_star_plus:
04dad9b0136d started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents: 1258
diff changeset
    62
  fixes p q::perm
04dad9b0136d started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents: 1258
diff changeset
    63
  shows "\<lbrakk>a \<sharp>* p;  a \<sharp>* q\<rbrakk> \<Longrightarrow> a \<sharp>* (p + q)"
04dad9b0136d started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents: 1258
diff changeset
    64
  unfolding fresh_star_def
04dad9b0136d started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents: 1258
diff changeset
    65
  by (simp add: fresh_plus_perm)
04dad9b0136d started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents: 1258
diff changeset
    66
04dad9b0136d started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents: 1258
diff changeset
    67
lemma fresh_star_permute_iff:
04dad9b0136d started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents: 1258
diff changeset
    68
  shows "(p \<bullet> a) \<sharp>* (p \<bullet> x) \<longleftrightarrow> a \<sharp>* x"
04dad9b0136d started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents: 1258
diff changeset
    69
  unfolding fresh_star_def
2012
a48a6f88f76e simplified the supp-of-finite-sets proof
Christian Urban <urbanc@in.tum.de>
parents: 2003
diff changeset
    70
  by (metis mem_permute_iff permute_minus_cancel(1) fresh_permute_iff)
1436
04dad9b0136d started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents: 1258
diff changeset
    71
1861
226b797868dc some tuning of eqvt-infrastructure
Christian Urban <urbanc@in.tum.de>
parents: 1778
diff changeset
    72
lemma fresh_star_eqvt[eqvt]:
1436
04dad9b0136d started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents: 1258
diff changeset
    73
  shows "(p \<bullet> (as \<sharp>* x)) = (p \<bullet> as) \<sharp>* (p \<bullet> x)"
04dad9b0136d started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents: 1258
diff changeset
    74
unfolding fresh_star_def
04dad9b0136d started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents: 1258
diff changeset
    75
unfolding Ball_def
04dad9b0136d started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents: 1258
diff changeset
    76
apply(simp add: all_eqvt)
04dad9b0136d started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents: 1258
diff changeset
    77
apply(subst permute_fun_def)
04dad9b0136d started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents: 1258
diff changeset
    78
apply(simp add: imp_eqvt fresh_eqvt mem_eqvt)
04dad9b0136d started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents: 1258
diff changeset
    79
done
1062
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    80
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    81
section {* Avoiding of atom sets *}
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    82
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    83
text {* 
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    84
  For every set of atoms, there is another set of atoms
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    85
  avoiding a finitely supported c and there is a permutation
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    86
  which 'translates' between both sets.
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    87
*}
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    88
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    89
lemma at_set_avoiding_aux:
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    90
  fixes Xs::"atom set"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    91
  and   As::"atom set"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    92
  assumes b: "Xs \<subseteq> As"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    93
  and     c: "finite As"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    94
  shows "\<exists>p. (p \<bullet> Xs) \<inter> As = {} \<and> (supp p) \<subseteq> (Xs \<union> (p \<bullet> Xs))"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    95
proof -
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    96
  from b c have "finite Xs" by (rule finite_subset)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    97
  then show ?thesis using b
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    98
  proof (induct rule: finite_subset_induct)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
    99
    case empty
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   100
    have "0 \<bullet> {} \<inter> As = {}" by simp
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   101
    moreover
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   102
    have "supp (0::perm) \<subseteq> {} \<union> 0 \<bullet> {}" by (simp add: supp_zero_perm)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   103
    ultimately show ?case by blast
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   104
  next
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   105
    case (insert x Xs)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   106
    then obtain p where
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   107
      p1: "(p \<bullet> Xs) \<inter> As = {}" and 
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   108
      p2: "supp p \<subseteq> (Xs \<union> (p \<bullet> Xs))" by blast
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   109
    from `x \<in> As` p1 have "x \<notin> p \<bullet> Xs" by fast
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   110
    with `x \<notin> Xs` p2 have "x \<notin> supp p" by fast
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   111
    hence px: "p \<bullet> x = x" unfolding supp_perm by simp
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   112
    have "finite (As \<union> p \<bullet> Xs)"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   113
      using `finite As` `finite Xs`
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   114
      by (simp add: permute_set_eq_image)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   115
    then obtain y where "y \<notin> (As \<union> p \<bullet> Xs)" "sort_of y = sort_of x"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   116
      by (rule obtain_atom)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   117
    hence y: "y \<notin> As" "y \<notin> p \<bullet> Xs" "sort_of y = sort_of x"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   118
      by simp_all
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   119
    let ?q = "(x \<rightleftharpoons> y) + p"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   120
    have q: "?q \<bullet> insert x Xs = insert y (p \<bullet> Xs)"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   121
      unfolding insert_eqvt
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   122
      using `p \<bullet> x = x` `sort_of y = sort_of x`
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   123
      using `x \<notin> p \<bullet> Xs` `y \<notin> p \<bullet> Xs`
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   124
      by (simp add: swap_atom swap_set_not_in)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   125
    have "?q \<bullet> insert x Xs \<inter> As = {}"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   126
      using `y \<notin> As` `p \<bullet> Xs \<inter> As = {}`
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   127
      unfolding q by simp
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   128
    moreover
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   129
    have "supp ?q \<subseteq> insert x Xs \<union> ?q \<bullet> insert x Xs"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   130
      using p2 unfolding q
1930
f189cf2c0987 moved some lemmas into the right places
Christian Urban <urbanc@in.tum.de>
parents: 1923
diff changeset
   131
      by (intro subset_trans [OF supp_plus_perm])
f189cf2c0987 moved some lemmas into the right places
Christian Urban <urbanc@in.tum.de>
parents: 1923
diff changeset
   132
         (auto simp add: supp_swap)
1062
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   133
    ultimately show ?case by blast
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   134
  qed
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   135
qed
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   136
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   137
lemma at_set_avoiding:
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   138
  assumes a: "finite Xs"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   139
  and     b: "finite (supp c)"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   140
  obtains p::"perm" where "(p \<bullet> Xs)\<sharp>*c" and "(supp p) \<subseteq> (Xs \<union> (p \<bullet> Xs))"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   141
  using a b at_set_avoiding_aux [where Xs="Xs" and As="Xs \<union> supp c"]
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   142
  unfolding fresh_star_def fresh_def by blast
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   143
1879
869d1183e082 tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1861
diff changeset
   144
lemma at_set_avoiding2:
869d1183e082 tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1861
diff changeset
   145
  assumes "finite xs"
869d1183e082 tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1861
diff changeset
   146
  and     "finite (supp c)" "finite (supp x)"
869d1183e082 tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1861
diff changeset
   147
  and     "xs \<sharp>* x"
869d1183e082 tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1861
diff changeset
   148
  shows "\<exists>p. (p \<bullet> xs) \<sharp>* c \<and> supp x \<sharp>* p"
869d1183e082 tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1861
diff changeset
   149
using assms
869d1183e082 tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1861
diff changeset
   150
apply(erule_tac c="(c, x)" in at_set_avoiding)
869d1183e082 tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1861
diff changeset
   151
apply(simp add: supp_Pair)
869d1183e082 tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1861
diff changeset
   152
apply(rule_tac x="p" in exI)
869d1183e082 tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1861
diff changeset
   153
apply(simp add: fresh_star_prod)
869d1183e082 tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1861
diff changeset
   154
apply(subgoal_tac "\<forall>a \<in> supp p. a \<sharp> x")
869d1183e082 tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1861
diff changeset
   155
apply(auto simp add: fresh_star_def fresh_def supp_perm)[1]
869d1183e082 tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1861
diff changeset
   156
apply(auto simp add: fresh_star_def fresh_def)
869d1183e082 tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1861
diff changeset
   157
done
869d1183e082 tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1861
diff changeset
   158
869d1183e082 tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1861
diff changeset
   159
lemma at_set_avoiding2_atom:
869d1183e082 tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1861
diff changeset
   160
  assumes "finite (supp c)" "finite (supp x)"
1930
f189cf2c0987 moved some lemmas into the right places
Christian Urban <urbanc@in.tum.de>
parents: 1923
diff changeset
   161
  and     b: "a \<sharp> x"
f189cf2c0987 moved some lemmas into the right places
Christian Urban <urbanc@in.tum.de>
parents: 1923
diff changeset
   162
  shows "\<exists>p. (p \<bullet> a) \<sharp> c \<and> supp x \<sharp>* p"
1879
869d1183e082 tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1861
diff changeset
   163
proof -
1930
f189cf2c0987 moved some lemmas into the right places
Christian Urban <urbanc@in.tum.de>
parents: 1923
diff changeset
   164
  have a: "{a} \<sharp>* x" unfolding fresh_star_def by (simp add: b)
f189cf2c0987 moved some lemmas into the right places
Christian Urban <urbanc@in.tum.de>
parents: 1923
diff changeset
   165
  obtain p where p1: "(p \<bullet> {a}) \<sharp>* c" and p2: "supp x \<sharp>* p"
f189cf2c0987 moved some lemmas into the right places
Christian Urban <urbanc@in.tum.de>
parents: 1923
diff changeset
   166
    using at_set_avoiding2[of "{a}" "c" "x"] assms a by blast
f189cf2c0987 moved some lemmas into the right places
Christian Urban <urbanc@in.tum.de>
parents: 1923
diff changeset
   167
  have c: "(p \<bullet> a) \<sharp> c" using p1
1879
869d1183e082 tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1861
diff changeset
   168
    unfolding fresh_star_def Ball_def 
2012
a48a6f88f76e simplified the supp-of-finite-sets proof
Christian Urban <urbanc@in.tum.de>
parents: 2003
diff changeset
   169
    by(erule_tac x="p \<bullet> a" in allE) (simp add: permute_set_eq)
1930
f189cf2c0987 moved some lemmas into the right places
Christian Urban <urbanc@in.tum.de>
parents: 1923
diff changeset
   170
  hence "p \<bullet> a \<sharp> c \<and> supp x \<sharp>* p" using p2 by blast
f189cf2c0987 moved some lemmas into the right places
Christian Urban <urbanc@in.tum.de>
parents: 1923
diff changeset
   171
  then show "\<exists>p. (p \<bullet> a) \<sharp> c \<and> supp x \<sharp>* p" by blast
1879
869d1183e082 tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1861
diff changeset
   172
qed
1062
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   173
1930
f189cf2c0987 moved some lemmas into the right places
Christian Urban <urbanc@in.tum.de>
parents: 1923
diff changeset
   174
f189cf2c0987 moved some lemmas into the right places
Christian Urban <urbanc@in.tum.de>
parents: 1923
diff changeset
   175
section {* The freshness lemma according to Andy Pitts *}
1062
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   176
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   177
lemma freshness_lemma:
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   178
  fixes h :: "'a::at \<Rightarrow> 'b::pt"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   179
  assumes a: "\<exists>a. atom a \<sharp> (h, h a)"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   180
  shows  "\<exists>x. \<forall>a. atom a \<sharp> h \<longrightarrow> h a = x"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   181
proof -
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   182
  from a obtain b where a1: "atom b \<sharp> h" and a2: "atom b \<sharp> h b"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   183
    by (auto simp add: fresh_Pair)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   184
  show "\<exists>x. \<forall>a. atom a \<sharp> h \<longrightarrow> h a = x"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   185
  proof (intro exI allI impI)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   186
    fix a :: 'a
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   187
    assume a3: "atom a \<sharp> h"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   188
    show "h a = h b"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   189
    proof (cases "a = b")
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   190
      assume "a = b"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   191
      thus "h a = h b" by simp
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   192
    next
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   193
      assume "a \<noteq> b"
1080
2f1377bb4e1f fixed lemma name
Christian Urban <urbanc@in.tum.de>
parents: 1062
diff changeset
   194
      hence "atom a \<sharp> b" by (simp add: fresh_at_base)
1879
869d1183e082 tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1861
diff changeset
   195
      with a3 have "atom a \<sharp> h b" 
869d1183e082 tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1861
diff changeset
   196
	by (rule fresh_fun_app)
1062
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   197
      with a2 have d1: "(atom b \<rightleftharpoons> atom a) \<bullet> (h b) = (h b)"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   198
        by (rule swap_fresh_fresh)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   199
      from a1 a3 have d2: "(atom b \<rightleftharpoons> atom a) \<bullet> h = h"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   200
        by (rule swap_fresh_fresh)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   201
      from d1 have "h b = (atom b \<rightleftharpoons> atom a) \<bullet> (h b)" by simp
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   202
      also have "\<dots> = ((atom b \<rightleftharpoons> atom a) \<bullet> h) ((atom b \<rightleftharpoons> atom a) \<bullet> b)"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   203
        by (rule permute_fun_app_eq)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   204
      also have "\<dots> = h a"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   205
        using d2 by simp
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   206
      finally show "h a = h b"  by simp
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   207
    qed
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   208
  qed
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   209
qed
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   210
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   211
lemma freshness_lemma_unique:
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   212
  fixes h :: "'a::at \<Rightarrow> 'b::pt"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   213
  assumes a: "\<exists>a. atom a \<sharp> (h, h a)"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   214
  shows "\<exists>!x. \<forall>a. atom a \<sharp> h \<longrightarrow> h a = x"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   215
proof (rule ex_ex1I)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   216
  from a show "\<exists>x. \<forall>a. atom a \<sharp> h \<longrightarrow> h a = x"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   217
    by (rule freshness_lemma)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   218
next
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   219
  fix x y
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   220
  assume x: "\<forall>a. atom a \<sharp> h \<longrightarrow> h a = x"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   221
  assume y: "\<forall>a. atom a \<sharp> h \<longrightarrow> h a = y"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   222
  from a x y show "x = y"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   223
    by (auto simp add: fresh_Pair)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   224
qed
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   225
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   226
text {* packaging the freshness lemma into a function *}
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   227
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   228
definition
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   229
  fresh_fun :: "('a::at \<Rightarrow> 'b::pt) \<Rightarrow> 'b"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   230
where
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   231
  "fresh_fun h = (THE x. \<forall>a. atom a \<sharp> h \<longrightarrow> h a = x)"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   232
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   233
lemma fresh_fun_app:
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   234
  fixes h :: "'a::at \<Rightarrow> 'b::pt"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   235
  assumes a: "\<exists>a. atom a \<sharp> (h, h a)"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   236
  assumes b: "atom a \<sharp> h"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   237
  shows "fresh_fun h = h a"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   238
unfolding fresh_fun_def
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   239
proof (rule the_equality)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   240
  show "\<forall>a'. atom a' \<sharp> h \<longrightarrow> h a' = h a"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   241
  proof (intro strip)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   242
    fix a':: 'a
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   243
    assume c: "atom a' \<sharp> h"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   244
    from a have "\<exists>x. \<forall>a. atom a \<sharp> h \<longrightarrow> h a = x" by (rule freshness_lemma)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   245
    with b c show "h a' = h a" by auto
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   246
  qed
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   247
next
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   248
  fix fr :: 'b
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   249
  assume "\<forall>a. atom a \<sharp> h \<longrightarrow> h a = fr"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   250
  with b show "fr = h a" by auto
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   251
qed
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   252
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   253
lemma fresh_fun_app':
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   254
  fixes h :: "'a::at \<Rightarrow> 'b::pt"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   255
  assumes a: "atom a \<sharp> h" "atom a \<sharp> h a"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   256
  shows "fresh_fun h = h a"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   257
  apply (rule fresh_fun_app)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   258
  apply (auto simp add: fresh_Pair intro: a)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   259
  done
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   260
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   261
lemma fresh_fun_eqvt:
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   262
  fixes h :: "'a::at \<Rightarrow> 'b::pt"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   263
  assumes a: "\<exists>a. atom a \<sharp> (h, h a)"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   264
  shows "p \<bullet> (fresh_fun h) = fresh_fun (p \<bullet> h)"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   265
  using a
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   266
  apply (clarsimp simp add: fresh_Pair)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   267
  apply (subst fresh_fun_app', assumption+)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   268
  apply (drule fresh_permute_iff [where p=p, THEN iffD2])
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   269
  apply (drule fresh_permute_iff [where p=p, THEN iffD2])
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   270
  apply (simp add: atom_eqvt permute_fun_app_eq [where f=h])
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   271
  apply (erule (1) fresh_fun_app' [symmetric])
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   272
  done
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   273
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   274
lemma fresh_fun_supports:
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   275
  fixes h :: "'a::at \<Rightarrow> 'b::pt"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   276
  assumes a: "\<exists>a. atom a \<sharp> (h, h a)"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   277
  shows "(supp h) supports (fresh_fun h)"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   278
  apply (simp add: supports_def fresh_def [symmetric])
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   279
  apply (simp add: fresh_fun_eqvt [OF a] swap_fresh_fresh)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   280
  done
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   281
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   282
notation fresh_fun (binder "FRESH " 10)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   283
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   284
lemma FRESH_f_iff:
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   285
  fixes P :: "'a::at \<Rightarrow> 'b::pure"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   286
  fixes f :: "'b \<Rightarrow> 'c::pure"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   287
  assumes P: "finite (supp P)"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   288
  shows "(FRESH x. f (P x)) = f (FRESH x. P x)"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   289
proof -
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   290
  obtain a::'a where "atom a \<notin> supp P"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   291
    using P by (rule obtain_at_base)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   292
  hence "atom a \<sharp> P"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   293
    by (simp add: fresh_def)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   294
  show "(FRESH x. f (P x)) = f (FRESH x. P x)"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   295
    apply (subst fresh_fun_app' [where a=a, OF _ pure_fresh])
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   296
    apply (cut_tac `atom a \<sharp> P`)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   297
    apply (simp add: fresh_conv_MOST)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   298
    apply (elim MOST_rev_mp, rule MOST_I, clarify)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   299
    apply (simp add: permute_fun_def permute_pure expand_fun_eq)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   300
    apply (subst fresh_fun_app' [where a=a, OF `atom a \<sharp> P` pure_fresh])
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   301
    apply (rule refl)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   302
    done
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   303
qed
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   304
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   305
lemma FRESH_binop_iff:
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   306
  fixes P :: "'a::at \<Rightarrow> 'b::pure"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   307
  fixes Q :: "'a::at \<Rightarrow> 'c::pure"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   308
  fixes binop :: "'b \<Rightarrow> 'c \<Rightarrow> 'd::pure"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   309
  assumes P: "finite (supp P)" 
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   310
  and     Q: "finite (supp Q)"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   311
  shows "(FRESH x. binop (P x) (Q x)) = binop (FRESH x. P x) (FRESH x. Q x)"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   312
proof -
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   313
  from assms have "finite (supp P \<union> supp Q)" by simp
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   314
  then obtain a::'a where "atom a \<notin> (supp P \<union> supp Q)"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   315
    by (rule obtain_at_base)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   316
  hence "atom a \<sharp> P" and "atom a \<sharp> Q"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   317
    by (simp_all add: fresh_def)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   318
  show ?thesis
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   319
    apply (subst fresh_fun_app' [where a=a, OF _ pure_fresh])
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   320
    apply (cut_tac `atom a \<sharp> P` `atom a \<sharp> Q`)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   321
    apply (simp add: fresh_conv_MOST)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   322
    apply (elim MOST_rev_mp, rule MOST_I, clarify)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   323
    apply (simp add: permute_fun_def permute_pure expand_fun_eq)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   324
    apply (subst fresh_fun_app' [where a=a, OF `atom a \<sharp> P` pure_fresh])
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   325
    apply (subst fresh_fun_app' [where a=a, OF `atom a \<sharp> Q` pure_fresh])
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   326
    apply (rule refl)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   327
    done
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   328
qed
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   329
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   330
lemma FRESH_conj_iff:
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   331
  fixes P Q :: "'a::at \<Rightarrow> bool"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   332
  assumes P: "finite (supp P)" and Q: "finite (supp Q)"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   333
  shows "(FRESH x. P x \<and> Q x) \<longleftrightarrow> (FRESH x. P x) \<and> (FRESH x. Q x)"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   334
using P Q by (rule FRESH_binop_iff)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   335
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   336
lemma FRESH_disj_iff:
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   337
  fixes P Q :: "'a::at \<Rightarrow> bool"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   338
  assumes P: "finite (supp P)" and Q: "finite (supp Q)"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   339
  shows "(FRESH x. P x \<or> Q x) \<longleftrightarrow> (FRESH x. P x) \<or> (FRESH x. Q x)"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   340
using P Q by (rule FRESH_binop_iff)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   341
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   342
1930
f189cf2c0987 moved some lemmas into the right places
Christian Urban <urbanc@in.tum.de>
parents: 1923
diff changeset
   343
section {* @{const nat_of} is an example of a function 
f189cf2c0987 moved some lemmas into the right places
Christian Urban <urbanc@in.tum.de>
parents: 1923
diff changeset
   344
  without finite support *}
1062
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   345
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   346
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   347
lemma not_fresh_nat_of:
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   348
  shows "\<not> a \<sharp> nat_of"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   349
unfolding fresh_def supp_def
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   350
proof (clarsimp)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   351
  assume "finite {b. (a \<rightleftharpoons> b) \<bullet> nat_of \<noteq> nat_of}"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   352
  hence "finite ({a} \<union> {b. (a \<rightleftharpoons> b) \<bullet> nat_of \<noteq> nat_of})"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   353
    by simp
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   354
  then obtain b where
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   355
    b1: "b \<noteq> a" and
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   356
    b2: "sort_of b = sort_of a" and
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   357
    b3: "(a \<rightleftharpoons> b) \<bullet> nat_of = nat_of"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   358
    by (rule obtain_atom) auto
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   359
  have "nat_of a = (a \<rightleftharpoons> b) \<bullet> (nat_of a)" by (simp add: permute_nat_def)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   360
  also have "\<dots> = ((a \<rightleftharpoons> b) \<bullet> nat_of) ((a \<rightleftharpoons> b) \<bullet> a)" by (simp add: permute_fun_app_eq)
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   361
  also have "\<dots> = nat_of ((a \<rightleftharpoons> b) \<bullet> a)" using b3 by simp
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   362
  also have "\<dots> = nat_of b" using b2 by simp
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   363
  finally have "nat_of a = nat_of b" by simp
1930
f189cf2c0987 moved some lemmas into the right places
Christian Urban <urbanc@in.tum.de>
parents: 1923
diff changeset
   364
  with b2 have "a = b" by (simp add: atom_components_eq_iff)
1062
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   365
  with b1 show "False" by simp
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   366
qed
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   367
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   368
lemma supp_nat_of:
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   369
  shows "supp nat_of = UNIV"
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   370
  using not_fresh_nat_of [unfolded fresh_def] by auto
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   371
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   372
1930
f189cf2c0987 moved some lemmas into the right places
Christian Urban <urbanc@in.tum.de>
parents: 1923
diff changeset
   373
section {* Induction principle for permutations *}
1563
eb60f360a200 moved lemmas supp_perm_eq and exists_perm to Nominal2_Supp
Christian Urban <urbanc@in.tum.de>
parents: 1506
diff changeset
   374
1918
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   375
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   376
lemma perm_struct_induct[consumes 1, case_names zero swap]:
1778
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   377
  assumes S: "supp p \<subseteq> S"
1930
f189cf2c0987 moved some lemmas into the right places
Christian Urban <urbanc@in.tum.de>
parents: 1923
diff changeset
   378
  and zero: "P 0"
f189cf2c0987 moved some lemmas into the right places
Christian Urban <urbanc@in.tum.de>
parents: 1923
diff changeset
   379
  and swap: "\<And>p a b. \<lbrakk>P p; supp p \<subseteq> S; a \<in> S; b \<in> S; a \<noteq> b; sort_of a = sort_of b\<rbrakk> \<Longrightarrow> P ((a \<rightleftharpoons> b) + p)"
1778
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   380
  shows "P p"
1777
4f41a0884b22 isarfied proof about existence of a permutation list
Christian Urban <urbanc@in.tum.de>
parents: 1774
diff changeset
   381
proof -
4f41a0884b22 isarfied proof about existence of a permutation list
Christian Urban <urbanc@in.tum.de>
parents: 1774
diff changeset
   382
  have "finite (supp p)" by (simp add: finite_supp)
1918
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   383
  then show "P p" using S
1778
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   384
  proof(induct A\<equiv>"supp p" arbitrary: p rule: finite_psubset_induct)
1777
4f41a0884b22 isarfied proof about existence of a permutation list
Christian Urban <urbanc@in.tum.de>
parents: 1774
diff changeset
   385
    case (psubset p)
1778
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   386
    then have ih: "\<And>q. supp q \<subset> supp p \<Longrightarrow> P q" by auto
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   387
    have as: "supp p \<subseteq> S" by fact
1777
4f41a0884b22 isarfied proof about existence of a permutation list
Christian Urban <urbanc@in.tum.de>
parents: 1774
diff changeset
   388
    { assume "supp p = {}"
4f41a0884b22 isarfied proof about existence of a permutation list
Christian Urban <urbanc@in.tum.de>
parents: 1774
diff changeset
   389
      then have "p = 0" by (simp add: supp_perm expand_perm_eq)
1778
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   390
      then have "P p" using zero by simp
1777
4f41a0884b22 isarfied proof about existence of a permutation list
Christian Urban <urbanc@in.tum.de>
parents: 1774
diff changeset
   391
    }
4f41a0884b22 isarfied proof about existence of a permutation list
Christian Urban <urbanc@in.tum.de>
parents: 1774
diff changeset
   392
    moreover
4f41a0884b22 isarfied proof about existence of a permutation list
Christian Urban <urbanc@in.tum.de>
parents: 1774
diff changeset
   393
    { assume "supp p \<noteq> {}"
4f41a0884b22 isarfied proof about existence of a permutation list
Christian Urban <urbanc@in.tum.de>
parents: 1774
diff changeset
   394
      then obtain a where a0: "a \<in> supp p" by blast
1918
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   395
      then have a1: "p \<bullet> a \<in> S" "a \<in> S" "sort_of (p \<bullet> a) = sort_of a" "p \<bullet> a \<noteq> a" using as
1778
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   396
	by (auto simp add: supp_atom supp_perm swap_atom)
1918
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   397
      let ?q = "(p \<bullet> a \<rightleftharpoons> a) + p"
1778
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   398
      have a2: "supp ?q \<subseteq> supp p" unfolding supp_perm by (auto simp add: swap_atom)
1777
4f41a0884b22 isarfied proof about existence of a permutation list
Christian Urban <urbanc@in.tum.de>
parents: 1774
diff changeset
   399
      moreover
4f41a0884b22 isarfied proof about existence of a permutation list
Christian Urban <urbanc@in.tum.de>
parents: 1774
diff changeset
   400
      have "a \<notin> supp ?q" by (simp add: supp_perm)
4f41a0884b22 isarfied proof about existence of a permutation list
Christian Urban <urbanc@in.tum.de>
parents: 1774
diff changeset
   401
      then have "supp ?q \<noteq> supp p" using a0 by auto
1918
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   402
      ultimately have "supp ?q \<subset> supp p" using a2 by auto
1778
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   403
      then have "P ?q" using ih by simp
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   404
      moreover
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   405
      have "supp ?q \<subseteq> S" using as a2 by simp
1918
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   406
      ultimately  have "P ((p \<bullet> a \<rightleftharpoons> a) + ?q)" using as a1 swap by simp 
1777
4f41a0884b22 isarfied proof about existence of a permutation list
Christian Urban <urbanc@in.tum.de>
parents: 1774
diff changeset
   407
      moreover 
1918
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   408
      have "p = (p \<bullet> a \<rightleftharpoons> a) + ?q" by (simp add: expand_perm_eq)
1778
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   409
      ultimately have "P p" by simp
1777
4f41a0884b22 isarfied proof about existence of a permutation list
Christian Urban <urbanc@in.tum.de>
parents: 1774
diff changeset
   410
    }
1778
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   411
    ultimately show "P p" by blast
1777
4f41a0884b22 isarfied proof about existence of a permutation list
Christian Urban <urbanc@in.tum.de>
parents: 1774
diff changeset
   412
  qed
4f41a0884b22 isarfied proof about existence of a permutation list
Christian Urban <urbanc@in.tum.de>
parents: 1774
diff changeset
   413
qed
1062
dfea9e739231 rollback of the test
Christian Urban <urbanc@in.tum.de>
parents: 1061
diff changeset
   414
1930
f189cf2c0987 moved some lemmas into the right places
Christian Urban <urbanc@in.tum.de>
parents: 1923
diff changeset
   415
lemma perm_simple_struct_induct[case_names zero swap]:
1923
289988027abf added a variant of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1918
diff changeset
   416
  assumes zero: "P 0"
1930
f189cf2c0987 moved some lemmas into the right places
Christian Urban <urbanc@in.tum.de>
parents: 1923
diff changeset
   417
  and     swap: "\<And>p a b. \<lbrakk>P p; a \<noteq> b; sort_of a = sort_of b\<rbrakk> \<Longrightarrow> P ((a \<rightleftharpoons> b) + p)"
1923
289988027abf added a variant of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1918
diff changeset
   418
  shows "P p"
289988027abf added a variant of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1918
diff changeset
   419
by (rule_tac S="supp p" in perm_struct_induct)
289988027abf added a variant of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1918
diff changeset
   420
   (auto intro: zero swap)
289988027abf added a variant of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1918
diff changeset
   421
1930
f189cf2c0987 moved some lemmas into the right places
Christian Urban <urbanc@in.tum.de>
parents: 1923
diff changeset
   422
lemma perm_subset_induct[consumes 1, case_names zero swap plus]:
1778
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   423
  assumes S: "supp p \<subseteq> S"
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   424
  assumes zero: "P 0"
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   425
  assumes swap: "\<And>a b. \<lbrakk>sort_of a = sort_of b; a \<noteq> b; a \<in> S; b \<in> S\<rbrakk> \<Longrightarrow> P (a \<rightleftharpoons> b)"
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   426
  assumes plus: "\<And>p1 p2. \<lbrakk>P p1; P p2; supp p1 \<subseteq> S; supp p2 \<subseteq> S\<rbrakk> \<Longrightarrow> P (p1 + p2)"
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   427
  shows "P p"
1918
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   428
using S
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   429
by (induct p rule: perm_struct_induct)
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   430
   (auto intro: zero plus swap simp add: supp_swap)
1563
eb60f360a200 moved lemmas supp_perm_eq and exists_perm to Nominal2_Supp
Christian Urban <urbanc@in.tum.de>
parents: 1506
diff changeset
   431
eb60f360a200 moved lemmas supp_perm_eq and exists_perm to Nominal2_Supp
Christian Urban <urbanc@in.tum.de>
parents: 1506
diff changeset
   432
lemma supp_perm_eq:
1778
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   433
  assumes "(supp x) \<sharp>* p"
1563
eb60f360a200 moved lemmas supp_perm_eq and exists_perm to Nominal2_Supp
Christian Urban <urbanc@in.tum.de>
parents: 1506
diff changeset
   434
  shows "p \<bullet> x = x"
eb60f360a200 moved lemmas supp_perm_eq and exists_perm to Nominal2_Supp
Christian Urban <urbanc@in.tum.de>
parents: 1506
diff changeset
   435
proof -
1778
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   436
  from assms have "supp p \<subseteq> {a. a \<sharp> x}"
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   437
    unfolding supp_perm fresh_star_def fresh_def by auto
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   438
  then show "p \<bullet> x = x"
1918
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   439
  proof (induct p rule: perm_struct_induct)
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   440
    case zero
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   441
    show "0 \<bullet> x = x" by simp
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   442
  next
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   443
    case (swap p a b)
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   444
    then have "a \<sharp> x" "b \<sharp> x" "p \<bullet> x = x" by simp_all
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   445
    then show "((a \<rightleftharpoons> b) + p) \<bullet> x = x" by (simp add: swap_fresh_fresh)
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   446
  qed
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   447
qed
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   448
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   449
lemma supp_perm_eq_test:
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   450
  assumes "(supp x) \<sharp>* p"
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   451
  shows "p \<bullet> x = x"
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   452
proof -
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   453
  from assms have "supp p \<subseteq> {a. a \<sharp> x}"
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   454
    unfolding supp_perm fresh_star_def fresh_def by auto
e2e963f4e90d added an improved version of the induction principle for permutations
Christian Urban <urbanc@in.tum.de>
parents: 1879
diff changeset
   455
  then show "p \<bullet> x = x"
1778
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   456
  proof (induct p rule: perm_subset_induct)
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   457
    case zero
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   458
    show "0 \<bullet> x = x" by simp
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   459
  next
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   460
    case (swap a b)
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   461
    then have "a \<sharp> x" "b \<sharp> x" by simp_all
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   462
    then show "(a \<rightleftharpoons> b) \<bullet> x = x" by (simp add: swap_fresh_fresh)
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   463
  next
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   464
    case (plus p1 p2)
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   465
    have "p1 \<bullet> x = x" "p2 \<bullet> x = x" by fact+
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   466
    then show "(p1 + p2) \<bullet> x = x" by simp
88ec05a09772 added an induction principle for permutations; removed add_perm construction
Christian Urban <urbanc@in.tum.de>
parents: 1777
diff changeset
   467
  qed
1563
eb60f360a200 moved lemmas supp_perm_eq and exists_perm to Nominal2_Supp
Christian Urban <urbanc@in.tum.de>
parents: 1506
diff changeset
   468
qed
eb60f360a200 moved lemmas supp_perm_eq and exists_perm to Nominal2_Supp
Christian Urban <urbanc@in.tum.de>
parents: 1506
diff changeset
   469
2003
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   470
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   471
section {* Support of Finite Sets of Finitely Supported Elements *}
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   472
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   473
lemma Union_fresh:
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   474
  shows "a \<sharp> S \<Longrightarrow> a \<sharp> (\<Union>x \<in> S. supp x)"
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   475
  unfolding Union_image_eq[symmetric]
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   476
  apply(rule_tac f="\<lambda>S. \<Union> supp ` S" in fresh_fun_eqvt_app)
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   477
  apply(perm_simp)
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   478
  apply(rule refl)
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   479
  apply(assumption)
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   480
  done
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   481
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   482
lemma Union_supports_set:
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   483
  shows "(\<Union>x \<in> S. supp x) supports S"
2012
a48a6f88f76e simplified the supp-of-finite-sets proof
Christian Urban <urbanc@in.tum.de>
parents: 2003
diff changeset
   484
proof -
a48a6f88f76e simplified the supp-of-finite-sets proof
Christian Urban <urbanc@in.tum.de>
parents: 2003
diff changeset
   485
  { fix a b
a48a6f88f76e simplified the supp-of-finite-sets proof
Christian Urban <urbanc@in.tum.de>
parents: 2003
diff changeset
   486
    have "\<forall>x \<in> S. (a \<rightleftharpoons> b) \<bullet> x = x \<Longrightarrow> (a \<rightleftharpoons> b) \<bullet> S = S"
a48a6f88f76e simplified the supp-of-finite-sets proof
Christian Urban <urbanc@in.tum.de>
parents: 2003
diff changeset
   487
      unfolding permute_set_eq by force
a48a6f88f76e simplified the supp-of-finite-sets proof
Christian Urban <urbanc@in.tum.de>
parents: 2003
diff changeset
   488
  }
a48a6f88f76e simplified the supp-of-finite-sets proof
Christian Urban <urbanc@in.tum.de>
parents: 2003
diff changeset
   489
  then show "(\<Union>x \<in> S. supp x) supports S"
a48a6f88f76e simplified the supp-of-finite-sets proof
Christian Urban <urbanc@in.tum.de>
parents: 2003
diff changeset
   490
    unfolding supports_def 
a48a6f88f76e simplified the supp-of-finite-sets proof
Christian Urban <urbanc@in.tum.de>
parents: 2003
diff changeset
   491
    by (simp add: fresh_def[symmetric] swap_fresh_fresh)
a48a6f88f76e simplified the supp-of-finite-sets proof
Christian Urban <urbanc@in.tum.de>
parents: 2003
diff changeset
   492
qed
2003
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   493
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   494
lemma Union_of_fin_supp_sets:
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   495
  fixes S::"('a::fs set)"
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   496
  assumes fin: "finite S"   
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   497
  shows "finite (\<Union>x\<in>S. supp x)"
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   498
  using fin by (induct) (auto simp add: finite_supp)
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   499
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   500
lemma Union_included_in_supp:
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   501
  fixes S::"('a::fs set)"
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   502
  assumes fin: "finite S"
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   503
  shows "(\<Union>x\<in>S. supp x) \<subseteq> supp S"
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   504
proof -
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   505
  have "(\<Union>x\<in>S. supp x) = supp (\<Union>x\<in>S. supp x)"
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   506
    apply(rule supp_finite_atom_set[symmetric])
2012
a48a6f88f76e simplified the supp-of-finite-sets proof
Christian Urban <urbanc@in.tum.de>
parents: 2003
diff changeset
   507
    apply(rule Union_of_fin_supp_sets[OF fin])
2003
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   508
    done
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   509
  also have "\<dots> \<subseteq> supp S"
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   510
    apply(rule supp_subset_fresh)
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   511
    apply(simp add: Union_fresh)
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   512
    done
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   513
  finally show ?thesis .
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   514
qed
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   515
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   516
lemma supp_of_fin_sets:
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   517
  fixes S::"('a::fs set)"
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   518
  assumes fin: "finite S"
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   519
  shows "(supp S) = (\<Union>x\<in>S. supp x)"
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   520
apply(rule subset_antisym)
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   521
apply(rule supp_is_subset)
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   522
apply(rule Union_supports_set)
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   523
apply(rule Union_of_fin_supp_sets[OF fin])
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   524
apply(rule Union_included_in_supp[OF fin])
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   525
done
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   526
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   527
lemma supp_of_fin_union:
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   528
  fixes S T::"('a::fs) set"
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   529
  assumes fin1: "finite S"
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   530
  and     fin2: "finite T"
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   531
  shows "supp (S \<union> T) = supp S \<union> supp T"
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   532
  using fin1 fin2
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   533
  by (simp add: supp_of_fin_sets)
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   534
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   535
lemma supp_of_fin_insert:
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   536
  fixes S::"('a::fs) set"
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   537
  assumes fin:  "finite S"
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   538
  shows "supp (insert x S) = supp x \<union> supp S"
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   539
  using fin
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   540
  by (simp add: supp_of_fin_sets)
b53e98bfb298 added lemmas establishing the support of finite sets of finitely supported elements
Christian Urban <urbanc@in.tum.de>
parents: 1930
diff changeset
   541
2033
74bd7bfb484b some preliminary changes to the pearl-jv paper
Christian Urban <urbanc@in.tum.de>
parents: 2012
diff changeset
   542
1567
8f28e749d92b Fixed missing colon.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1564
diff changeset
   543
end