Nominal/Nominal2_FSet.thy
author Christian Urban <urbanc@in.tum.de>
Tue, 13 Apr 2010 00:53:48 +0200
changeset 1817 f20096761790
parent 1815 4135198bbb8a
child 1818 37480540c1af
permissions -rw-r--r--
merged
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"
Christian Urban <urbanc@in.tum.de>
parents: 1782
diff changeset
     3
        FSet 
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     4
begin
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     5
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     6
lemma permute_rsp_fset[quot_respect]:
1682
ae54ce4cde54 Remove list_eq notation.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1675
diff changeset
     7
  "(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
     8
  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
     9
  apply clarify
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    10
  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
    11
  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
    12
  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
    13
  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
    14
  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
    15
  apply simp
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    16
  done
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    17
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    18
instantiation FSet.fset :: (pt) pt
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    19
begin
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    20
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    21
quotient_definition
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    22
  "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
    23
is
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    24
  "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
    25
1815
4135198bbb8a moved equivariance of map into Nominal2_Eqvt file
Christian Urban <urbanc@in.tum.de>
parents: 1806
diff changeset
    26
instance 
4135198bbb8a moved equivariance of map into Nominal2_Eqvt file
Christian Urban <urbanc@in.tum.de>
parents: 1806
diff changeset
    27
proof
1782
27fec5fcfe67 simplify instance proof
Brian Huffman <brianh@cs.pdx.edu>
parents: 1774
diff changeset
    28
  fix x :: "'a fset" and p q :: "perm"
27fec5fcfe67 simplify instance proof
Brian Huffman <brianh@cs.pdx.edu>
parents: 1774
diff changeset
    29
  show "0 \<bullet> x = x"
27fec5fcfe67 simplify instance proof
Brian Huffman <brianh@cs.pdx.edu>
parents: 1774
diff changeset
    30
    by (lifting permute_zero [where 'a="'a list"])
27fec5fcfe67 simplify instance proof
Brian Huffman <brianh@cs.pdx.edu>
parents: 1774
diff changeset
    31
  show "(p + q) \<bullet> x = p \<bullet> q \<bullet> x"
27fec5fcfe67 simplify instance proof
Brian Huffman <brianh@cs.pdx.edu>
parents: 1774
diff changeset
    32
    by (lifting permute_plus [where 'a="'a list"])
27fec5fcfe67 simplify instance proof
Brian Huffman <brianh@cs.pdx.edu>
parents: 1774
diff changeset
    33
qed
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    34
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    35
end
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    36
1675
d24f59f78a86 Generalize Abs_eq_iff.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1568
diff changeset
    37
lemma permute_fset[eqvt]:
1815
4135198bbb8a moved equivariance of map into Nominal2_Eqvt file
Christian Urban <urbanc@in.tum.de>
parents: 1806
diff changeset
    38
  "(p \<bullet> {||}) = ({||} :: 'a::pt fset)"
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    39
  "p \<bullet> finsert (x :: 'a :: pt) xs = finsert (p \<bullet> x) (p \<bullet> xs)"
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    40
  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
    41
1815
4135198bbb8a moved equivariance of map into Nominal2_Eqvt file
Christian Urban <urbanc@in.tum.de>
parents: 1806
diff changeset
    42
lemma fmap_eqvt[eqvt]: 
4135198bbb8a moved equivariance of map into Nominal2_Eqvt file
Christian Urban <urbanc@in.tum.de>
parents: 1806
diff changeset
    43
  shows "pi \<bullet> (fmap f l) = fmap (pi \<bullet> f) (pi \<bullet> l)"
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    44
  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
    45
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    46
lemma fset_to_set_eqvt[eqvt]: "pi \<bullet> (fset_to_set x) = fset_to_set (pi \<bullet> x)"
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    47
  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
    48
1542
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    49
lemma fin_fset_to_set:
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    50
  "finite (fset_to_set x)"
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    51
  by (induct x) (simp_all)
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    52
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    53
lemma supp_fset_to_set:
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    54
  "supp (fset_to_set x) = supp x"
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    55
  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
    56
  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
    57
  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
    58
  done
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    59
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    60
lemma atom_fmap_cong:
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    61
  shows "(fmap atom x = fmap atom y) = (x = y)"
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    62
  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
    63
  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
    64
  done
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    65
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    66
lemma supp_fmap_atom:
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    67
  "supp (fmap atom x) = supp x"
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    68
  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
    69
  apply (simp add: eqvts eqvts_raw atom_fmap_cong)
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    70
  done
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    71
1542
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    72
lemma supp_atom_insert:
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    73
  "finite (xs :: atom set) \<Longrightarrow> supp (insert x xs) = supp x \<union> supp xs"
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    74
  apply (simp add: supp_finite_atom_set)
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    75
  apply (simp add: supp_atom)
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    76
  done
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    77
1542
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    78
lemma atom_image_cong:
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    79
  shows "(atom ` X = atom ` Y) = (X = Y)"
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    80
  apply(rule inj_image_eq_iff)
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    81
  apply(simp add: inj_on_def)
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    82
  done
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    83
1542
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    84
lemma atom_eqvt_raw:
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    85
  fixes p::"perm"
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    86
  shows "(p \<bullet> atom) = atom"
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    87
  by (simp add: expand_fun_eq permute_fun_def atom_eqvt)
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    88
1542
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    89
lemma supp_finite_at_set:
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    90
  fixes S::"('a :: at) set"
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    91
  assumes a: "finite S"
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    92
  shows "supp S = atom ` S"
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    93
  apply(rule finite_supp_unique)
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    94
  apply(simp add: supports_def)
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    95
  apply (rule finite_induct[OF a])
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    96
  apply (simp add: eqvts)
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    97
  apply (simp)
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    98
  apply clarify
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
    99
  apply (subst atom_image_cong[symmetric])
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   100
  apply (subst atom_eqvt_raw[symmetric])
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   101
  apply (subst eqvts[symmetric])
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   102
  apply (rule swap_set_not_in)
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   103
  apply simp_all
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   104
  apply(rule finite_imageI)
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   105
  apply(rule a)
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   106
  apply (subst atom_image_cong[symmetric])
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   107
  apply (subst atom_eqvt_raw[symmetric])
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   108
  apply (subst eqvts[symmetric])
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   109
  apply (rule swap_set_in)
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   110
  apply simp_all
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   111
  done
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   112
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   113
lemma supp_at_insert:
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   114
  "finite (xs :: ('a :: at) set) \<Longrightarrow> supp (insert x xs) = supp x \<union> supp xs"
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   115
  apply (simp add: supp_finite_at_set)
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   116
  apply (simp add: supp_at_base)
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   117
  done
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   118
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   119
lemma supp_atom_finsert:
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   120
  "supp (finsert (x :: atom) S) = supp x \<union> 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
   121
  apply (subst supp_fset_to_set[symmetric])
1542
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   122
  apply (simp add: supp_finite_atom_set)
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   123
  apply (simp add: supp_atom_insert[OF fin_fset_to_set])
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   124
  apply (simp add: supp_fset_to_set)
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   125
  done
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   126
1542
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   127
lemma supp_at_finsert:
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   128
  "supp (finsert (x :: 'a :: at) S) = supp x \<union> supp S"
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   129
  apply (subst supp_fset_to_set[symmetric])
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   130
  apply (simp add: supp_finite_atom_set)
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   131
  apply (simp add: supp_at_insert[OF fin_fset_to_set])
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   132
  apply (simp add: supp_fset_to_set)
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   133
  done
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   134
1568
2311a9fc4624 Strong induction for Type Schemes.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1542
diff changeset
   135
lemma supp_fempty:
2311a9fc4624 Strong induction for Type Schemes.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1542
diff changeset
   136
  "supp {||} = {}"
2311a9fc4624 Strong induction for Type Schemes.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1542
diff changeset
   137
  by (simp add: supp_def eqvts)
2311a9fc4624 Strong induction for Type Schemes.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1542
diff changeset
   138
1542
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   139
instance fset :: (at) fs
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   140
  apply (default)
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   141
  apply (induct_tac x rule: fset_induct)
1568
2311a9fc4624 Strong induction for Type Schemes.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1542
diff changeset
   142
  apply (simp add: supp_fempty)
2311a9fc4624 Strong induction for Type Schemes.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1542
diff changeset
   143
  apply (simp add: supp_at_finsert)
2311a9fc4624 Strong induction for Type Schemes.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1542
diff changeset
   144
  apply (simp add: supp_at_base)
2311a9fc4624 Strong induction for Type Schemes.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1542
diff changeset
   145
  done
2311a9fc4624 Strong induction for Type Schemes.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1542
diff changeset
   146
2311a9fc4624 Strong induction for Type Schemes.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1542
diff changeset
   147
lemma supp_at_fset:
2311a9fc4624 Strong induction for Type Schemes.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1542
diff changeset
   148
  "supp (fset :: 'a :: at fset) = fset_to_set (fmap atom fset)"
2311a9fc4624 Strong induction for Type Schemes.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1542
diff changeset
   149
  apply (induct fset)
2311a9fc4624 Strong induction for Type Schemes.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1542
diff changeset
   150
  apply (simp add: supp_fempty)
1542
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   151
  apply (simp add: supp_at_finsert)
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   152
  apply (simp add: supp_at_base)
63e327e95abd Showed the instance: fset::(at) fs
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1534
diff changeset
   153
  done
1534
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   154
984ea1299cd7 The nominal infrastructure for fset. 'fs' missing, but not needed so far.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   155
end