Nominal/Nominal2_FSet.thy
author Christian Urban <urbanc@in.tum.de>
Wed, 23 Jun 2010 15:21:04 +0100
changeset 2329 df3a952c6a67
parent 2302 c6db12ddb60c
child 2340 b1549d391ea7
permissions -rw-r--r--
whitespace
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     1
theory Nominal2_FSet
1806
Christian Urban <urbanc@in.tum.de>
parents: 1782
diff changeset
     2
imports "../Nominal-General/Nominal2_Supp"
2302
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
     3
        "../Nominal-General/Nominal2_Atoms" 
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
     4
        "../Nominal-General/Nominal2_Eqvt" 
1806
Christian Urban <urbanc@in.tum.de>
parents: 1782
diff changeset
     5
        FSet 
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     6
begin
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     7
2302
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
     8
lemma "p \<bullet> {} = {}"
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
     9
apply(perm_simp)
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
    10
by simp
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
    11
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    12
lemma permute_rsp_fset[quot_respect]:
1682
ae54ce4cde54 Remove list_eq notation.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1675
diff changeset
    13
  "(op = ===> list_eq ===> list_eq) permute permute"
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    14
  apply (simp add: eqvts[symmetric])
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    15
  apply clarify
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    16
  apply (subst permute_minus_cancel(1)[symmetric, of "xb"])
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    17
  apply (subst mem_eqvt[symmetric])
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    18
  apply (subst (2) permute_minus_cancel(1)[symmetric, of "xb"])
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    19
  apply (subst mem_eqvt[symmetric])
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    20
  apply (erule_tac x="- x \<bullet> xb" in allE)
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    21
  apply simp
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    22
  done
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    23
2004
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
    24
instantiation fset :: (pt) pt
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    25
begin
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    26
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    27
quotient_definition
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    28
  "permute_fset :: perm \<Rightarrow> 'a fset \<Rightarrow> 'a fset"
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    29
is
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    30
  "permute :: perm \<Rightarrow> 'a list \<Rightarrow> 'a list"
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    31
1815
4135198bbb8a moved equivariance of map into Nominal2_Eqvt file
Christian Urban <urbanc@in.tum.de>
parents: 1806
diff changeset
    32
instance 
4135198bbb8a moved equivariance of map into Nominal2_Eqvt file
Christian Urban <urbanc@in.tum.de>
parents: 1806
diff changeset
    33
proof
1782
27fec5fcfe67 simplify instance proof
Brian Huffman <brianh@cs.pdx.edu>
parents: 1774
diff changeset
    34
  fix x :: "'a fset" and p q :: "perm"
27fec5fcfe67 simplify instance proof
Brian Huffman <brianh@cs.pdx.edu>
parents: 1774
diff changeset
    35
  show "0 \<bullet> x = x"
27fec5fcfe67 simplify instance proof
Brian Huffman <brianh@cs.pdx.edu>
parents: 1774
diff changeset
    36
    by (lifting permute_zero [where 'a="'a list"])
27fec5fcfe67 simplify instance proof
Brian Huffman <brianh@cs.pdx.edu>
parents: 1774
diff changeset
    37
  show "(p + q) \<bullet> x = p \<bullet> q \<bullet> x"
27fec5fcfe67 simplify instance proof
Brian Huffman <brianh@cs.pdx.edu>
parents: 1774
diff changeset
    38
    by (lifting permute_plus [where 'a="'a list"])
27fec5fcfe67 simplify instance proof
Brian Huffman <brianh@cs.pdx.edu>
parents: 1774
diff changeset
    39
qed
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    40
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    41
end
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    42
2302
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
    43
lemma "p \<bullet> {} = {}"
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
    44
apply(perm_simp)
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
    45
by simp
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
    46
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
    47
lemma permute_fset[simp]:
2004
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
    48
  fixes S::"('a::pt) fset"
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
    49
  shows "(p \<bullet> {||}) = ({||} ::('a::pt) fset)"
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
    50
  and "p \<bullet> finsert x S = finsert (p \<bullet> x) (p \<bullet> S)"
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    51
  by (lifting permute_list.simps)
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    52
2302
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
    53
lemma "p \<bullet> {} = {}"
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
    54
apply(perm_simp)
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
    55
by simp
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
    56
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
    57
ML {* @{term "{}"} ; @{term "{||}"} *}
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
    58
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
    59
declare permute_fset[eqvt]
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
    60
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
    61
lemma "p \<bullet> {} = {}"
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
    62
apply(perm_simp)
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
    63
by simp
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
    64
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
    65
1815
4135198bbb8a moved equivariance of map into Nominal2_Eqvt file
Christian Urban <urbanc@in.tum.de>
parents: 1806
diff changeset
    66
lemma fmap_eqvt[eqvt]: 
2004
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
    67
  shows "p \<bullet> (fmap f S) = fmap (p \<bullet> f) (p \<bullet> S)"
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    68
  by (lifting map_eqvt)
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    69
1818
37480540c1af made everything to compile
Christian Urban <urbanc@in.tum.de>
parents: 1815
diff changeset
    70
lemma fset_to_set_eqvt[eqvt]: 
2004
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
    71
  shows "p \<bullet> (fset_to_set S) = fset_to_set (p \<bullet> S)"
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    72
  by (lifting set_eqvt)
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    73
2004
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
    74
lemma fin_fset_to_set[simp]:
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
    75
  shows "finite (fset_to_set S)"
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
    76
  by (induct S) (simp_all)
1542
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    77
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    78
lemma supp_fset_to_set:
2004
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
    79
  shows "supp (fset_to_set S) = supp S"
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    80
  apply (simp add: supp_def)
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    81
  apply (simp add: eqvts)
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    82
  apply (simp add: fset_cong)
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    83
  done
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    84
2004
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
    85
lemma supp_finsert:
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
    86
  fixes x::"'a::fs"
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
    87
  shows "supp (finsert x S) = supp x \<union> supp S"
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
    88
  apply(subst supp_fset_to_set[symmetric])
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
    89
  apply(simp add: supp_fset_to_set)
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
    90
  apply(simp add: supp_of_fin_insert)
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
    91
  apply(simp add: supp_fset_to_set)
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
    92
  done
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
    93
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
    94
lemma supp_fempty:
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
    95
  shows "supp {||} = {}"
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
    96
  unfolding supp_def
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
    97
  by simp
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
    98
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
    99
instance fset :: (fs) fs
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
   100
  apply (default)
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
   101
  apply (induct_tac x rule: fset_induct)
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
   102
  apply (simp add: supp_fempty)
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
   103
  apply (simp add: supp_finsert)
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
   104
  apply (simp add: finite_supp)
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
   105
  done
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
   106
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   107
lemma atom_fmap_cong:
2004
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
   108
  shows "fmap atom x = fmap atom y \<longleftrightarrow> x = y"
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   109
  apply(rule inj_fmap_eq_iff)
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   110
  apply(simp add: inj_on_def)
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   111
  done
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   112
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   113
lemma supp_fmap_atom:
2004
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
   114
  shows "supp (fmap atom S) = supp S"
1818
37480540c1af made everything to compile
Christian Urban <urbanc@in.tum.de>
parents: 1815
diff changeset
   115
  unfolding supp_def
2004
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
   116
  apply(perm_simp)
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
   117
  apply(simp add: atom_fmap_cong)
1568
2311a9fc4624 Strong induction for Type Schemes.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1542
diff changeset
   118
  done
2311a9fc4624 Strong induction for Type Schemes.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1542
diff changeset
   119
2311a9fc4624 Strong induction for Type Schemes.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1542
diff changeset
   120
lemma supp_at_fset:
1973
fc5ce7f22b74 use the more general type-class at_base
Christian Urban <urbanc@in.tum.de>
parents: 1933
diff changeset
   121
  fixes S::"('a::at_base) fset"
fc5ce7f22b74 use the more general type-class at_base
Christian Urban <urbanc@in.tum.de>
parents: 1933
diff changeset
   122
  shows "supp S = fset_to_set (fmap atom S)"
fc5ce7f22b74 use the more general type-class at_base
Christian Urban <urbanc@in.tum.de>
parents: 1933
diff changeset
   123
  apply (induct S)
1568
2311a9fc4624 Strong induction for Type Schemes.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1542
diff changeset
   124
  apply (simp add: supp_fempty)
2004
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
   125
  apply (simp add: supp_finsert)
1542
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   126
  apply (simp add: supp_at_base)
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   127
  done
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   128
2178
e559513143e9 reversing the direction of fresh_star
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2004
diff changeset
   129
lemma fresh_star_atom:
e559513143e9 reversing the direction of fresh_star
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2004
diff changeset
   130
  "fset_to_set s \<sharp>* (a :: _ :: at_base) \<Longrightarrow> atom a \<sharp> fset_to_set s"
e559513143e9 reversing the direction of fresh_star
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2004
diff changeset
   131
  apply (induct s)
e559513143e9 reversing the direction of fresh_star
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2004
diff changeset
   132
  apply (simp add: fresh_set_empty)
e559513143e9 reversing the direction of fresh_star
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2004
diff changeset
   133
  apply simp
e559513143e9 reversing the direction of fresh_star
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2004
diff changeset
   134
  apply (unfold fresh_def)
e559513143e9 reversing the direction of fresh_star
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2004
diff changeset
   135
  apply (simp add: supp_atom_insert)
e559513143e9 reversing the direction of fresh_star
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2004
diff changeset
   136
  apply (rule conjI)
e559513143e9 reversing the direction of fresh_star
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2004
diff changeset
   137
  apply (unfold fresh_star_def)
e559513143e9 reversing the direction of fresh_star
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2004
diff changeset
   138
  apply simp
e559513143e9 reversing the direction of fresh_star
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2004
diff changeset
   139
  apply (unfold fresh_def)
e559513143e9 reversing the direction of fresh_star
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2004
diff changeset
   140
  apply (simp add: supp_at_base supp_atom)
e559513143e9 reversing the direction of fresh_star
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2004
diff changeset
   141
  apply clarify
e559513143e9 reversing the direction of fresh_star
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2004
diff changeset
   142
  apply auto
e559513143e9 reversing the direction of fresh_star
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2004
diff changeset
   143
  done
2004
b96e8cf86891 generalised the fs-instance lemma (not just fsets of atoms are finitely supported, but also fsets of finitely supported elements)
Christian Urban <urbanc@in.tum.de>
parents: 1973
diff changeset
   144
2302
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
   145
lemma "p \<bullet> {} = {}"
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
   146
apply(perm_simp)
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
   147
by simp
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2178
diff changeset
   148
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   149
end