
diff -r a37c65fe10de -r c8c2f83fadb4 Nominal/TySch.thy
--- a/Nominal/TySch.thy	Fri Mar 19 09:40:34 2010 +0100
+++ b/Nominal/TySch.thy	Fri Mar 19 09:40:57 2010 +0100
@@ -10,60 +10,6 @@
 ML {* val _ = cheat_fv_eqvt := false *}
 ML {* val _ = cheat_alpha_eqvt := false *}
 
-lemma permute_rsp_fset[quot_respect]:
-  "(op = ===> op \<approx> ===> op \<approx>) permute permute"
-  apply (simp add: eqvts[symmetric])
-  apply clarify
-  apply (subst permute_minus_cancel(1)[symmetric, of "xb"])
-  apply (subst mem_eqvt[symmetric])
-  apply (subst (2) permute_minus_cancel(1)[symmetric, of "xb"])
-  apply (subst mem_eqvt[symmetric])
-  apply (erule_tac x="- x \<bullet> xb" in allE)
-  apply simp
-  done
-
-instantiation FSet.fset :: (pt) pt
-begin
-
-term "permute :: perm \<Rightarrow> 'a list \<Rightarrow> 'a list"
-
-quotient_definition
-  "permute_fset :: perm \<Rightarrow> 'a fset \<Rightarrow> 'a fset"
-is
-  "permute :: perm \<Rightarrow> 'a list \<Rightarrow> 'a list"
-
-lemma permute_list_zero: "0 \<bullet> (x :: 'a list) = x"
-by (rule permute_zero)
-
-lemma permute_fset_zero: "0 \<bullet> (x :: 'a fset) = x"
-by (lifting permute_list_zero)
-
-lemma permute_list_plus: "(p + q) \<bullet> (x :: 'a list) = p \<bullet> q \<bullet> x"
-by (rule permute_plus)
-
-lemma permute_fset_plus: "(p + q) \<bullet> (x :: 'a fset) = p \<bullet> q \<bullet> x"
-by (lifting permute_list_plus)
-
-instance
-apply default
-apply (rule permute_fset_zero)
-apply (rule permute_fset_plus)
-done
-
-end
-
-lemma fset_to_set_eqvt[eqvt]: "pi \<bullet> (fset_to_set x) = fset_to_set (pi \<bullet> x)"
-by (lifting set_eqvt)
-
-lemma map_eqvt[eqvt]: "pi \<bullet> (map f l) = map (pi \<bullet> f) (pi \<bullet> l)"
-apply (induct l)
-apply (simp_all)
-apply (simp only: eqvt_apply)
-done
-
-lemma fmap_eqvt[eqvt]: "pi \<bullet> (fmap f l) = fmap (pi \<bullet> f) (pi \<bullet> l)"
-by (lifting map_eqvt)
-
 nominal_datatype t =
   Var "name"
 | Fun "t" "t"
@@ -76,42 +22,39 @@
 thm t_tyS.perm
 thm t_tyS.inducts
 thm t_tyS.distinct
+ML {* Sign.of_sort @{theory} (@{typ t}, @{sort fs}) *}
 
 lemma finite_fv_t_tyS:
   shows "finite (fv_t t)" "finite (fv_tyS ts)"
   by (induct rule: t_tyS.inducts) (simp_all)
 
-lemma infinite_Un:
-  shows "infinite (S \<union> T) \<longleftrightarrow> infinite S \<or> infinite T"
-  by simp
-
 lemma supp_fv_t_tyS:
   shows "fv_t t = supp t" "fv_tyS ts = supp ts"
-apply(induct rule: t_tyS.inducts)
-apply(simp_all only: t_tyS.fv)
-prefer 3
-apply(rule_tac t="supp (All fset t)" and s="supp (Abs (fset_to_set (fmap atom fset)) t)" in subst)
-prefer 2
-apply(subst finite_supp_Abs)
-apply(drule sym)
-apply(simp add: finite_fv_t_tyS(1))
-apply(simp)
-apply(simp_all (no_asm) only: supp_def)
-apply(simp_all only: t_tyS.perm)
-apply(simp_all only: permute_ABS)
-apply(simp_all only: t_tyS.eq_iff Abs_eq_iff)
-apply(simp_all only: alpha_gen)
-apply(simp_all only: eqvts[symmetric])
-apply(simp_all only: eqvts eqvts_raw)
-apply(simp_all only: supp_at_base[symmetric,simplified supp_def])
-apply(simp_all only: infinite_Un[symmetric] Collect_disj_eq[symmetric])
-apply(simp_all only: de_Morgan_conj[symmetric])
-done
+  apply(induct rule: t_tyS.inducts)
+  apply(simp_all only: t_tyS.fv)
+  prefer 3
+  apply(rule_tac t="supp (All fset t)" and s="supp (Abs (fset_to_set (fmap atom fset)) t)" in subst)
+  prefer 2
+  apply(subst finite_supp_Abs)
+  apply(drule sym)
+  apply(simp add: finite_fv_t_tyS(1))
+  apply(simp)
+  apply(simp_all (no_asm) only: supp_def)
+  apply(simp_all only: t_tyS.perm)
+  apply(simp_all only: permute_ABS)
+  apply(simp_all only: t_tyS.eq_iff Abs_eq_iff)
+  apply(simp_all only: alpha_gen)
+  apply(simp_all only: eqvts[symmetric])
+  apply(simp_all only: eqvts eqvts_raw)
+  apply(simp_all only: supp_at_base[symmetric,simplified supp_def])
+  apply(simp_all only: infinite_Un[symmetric] Collect_disj_eq[symmetric])
+  apply(simp_all only: de_Morgan_conj[symmetric])
+  done
 
 instance t and tyS :: fs
-apply default
-apply (simp_all add: supp_fv_t_tyS[symmetric] finite_fv_t_tyS)
-done
+  apply default
+  apply (simp_all add: supp_fv_t_tyS[symmetric] finite_fv_t_tyS)
+  done
 
 lemmas t_tyS_supp = t_tyS.fv[simplified supp_fv_t_tyS]
 
@@ -120,7 +63,7 @@
   \<And>t1 t2 b. \<lbrakk>\<And>c. P c t1; \<And>c. P c t2\<rbrakk> \<Longrightarrow> P b (Fun t1 t2);
   \<And>fset t. \<lbrakk>\<And>c. P c t; fset_to_set (fmap atom fset) \<sharp>* b\<rbrakk> \<Longrightarrow> P' b (All fset t)
  \<rbrakk> \<Longrightarrow> P a t"
-
+  oops
 
 
 lemma




