Nominal/Nominal2_Abs.thy
changeset 2943 09834ba7ce59
parent 2909 de5c9a0040ec
child 3004 c6af56de923d
equal deleted inserted replaced
2939:dc003667cd17 2943:09834ba7ce59
  1011 lemma prod_alpha_eq:
  1011 lemma prod_alpha_eq:
  1012   shows "prod_alpha (op=) (op=) = (op=)"
  1012   shows "prod_alpha (op=) (op=) = (op=)"
  1013   unfolding prod_alpha_def
  1013   unfolding prod_alpha_def
  1014   by (auto intro!: ext)
  1014   by (auto intro!: ext)
  1015 
  1015 
  1016 lemma Abs_lst1_fcb:
       
  1017   fixes x y :: "'a :: at_base"
       
  1018     and S T :: "'b :: fs"
       
  1019   assumes e: "(Abs_lst [atom x] T) = (Abs_lst [atom y] S)"
       
  1020   and f1: "x \<noteq> y \<Longrightarrow> atom y \<sharp> T \<Longrightarrow> atom x \<sharp> (atom y \<rightleftharpoons> atom x) \<bullet> T \<Longrightarrow> atom x \<sharp> f x T"
       
  1021   and f2: "x \<noteq> y \<Longrightarrow> atom y \<sharp> T \<Longrightarrow> atom x \<sharp> (atom y \<rightleftharpoons> atom x) \<bullet> T \<Longrightarrow> atom y \<sharp> f x T"
       
  1022   and p: "S = (atom x \<rightleftharpoons> atom y) \<bullet> T \<Longrightarrow> x \<noteq> y \<Longrightarrow> atom y \<sharp> T \<Longrightarrow> atom x \<sharp> S \<Longrightarrow> (atom x \<rightleftharpoons> atom y) \<bullet> (f x T) = f y S"
       
  1023   and s: "sort_of (atom x) = sort_of (atom y)"
       
  1024   shows "f x T = f y S"
       
  1025   using e
       
  1026   apply(case_tac "atom x \<sharp> S")
       
  1027   apply(simp add: Abs1_eq_iff'[OF s s])
       
  1028   apply(elim conjE disjE)
       
  1029   apply(simp)
       
  1030   apply(rule trans)
       
  1031   apply(rule_tac p="(atom x \<rightleftharpoons> atom y)" in supp_perm_eq[symmetric])
       
  1032   apply(rule fresh_star_supp_conv)
       
  1033   apply(simp add: supp_swap fresh_star_def s f1 f2)
       
  1034   apply(simp add: swap_commute p)
       
  1035   apply(simp add: Abs1_eq_iff[OF s s])
       
  1036   done
       
  1037 
       
  1038 lemma Abs_lst_fcb:
       
  1039   fixes xs ys :: "'a :: fs"
       
  1040     and S T :: "'b :: fs"
       
  1041   assumes e: "(Abs_lst (ba xs) T) = (Abs_lst (ba ys) S)"
       
  1042     and f1: "\<And>x. x \<in> set (ba xs) \<Longrightarrow> x \<sharp> f xs T"
       
  1043     and f2: "\<And>x. supp T - set (ba xs) = supp S - set (ba ys) \<Longrightarrow> x \<in> set (ba ys) \<Longrightarrow> x \<sharp> f xs T"
       
  1044     and eqv: "\<And>p. p \<bullet> T = S \<Longrightarrow> p \<bullet> ba xs = ba ys \<Longrightarrow> supp p \<subseteq> set (ba xs) \<union> set (ba ys) \<Longrightarrow> p \<bullet> (f xs T) = f ys S"
       
  1045   shows "f xs T = f ys S"
       
  1046   using e apply -
       
  1047   apply(subst (asm) Abs_eq_iff2)
       
  1048   apply(simp add: alphas)
       
  1049   apply(elim exE conjE)
       
  1050   apply(rule trans)
       
  1051   apply(rule_tac p="p" in supp_perm_eq[symmetric])
       
  1052   apply(rule fresh_star_supp_conv)
       
  1053   apply(drule fresh_star_perm_set_conv)
       
  1054   apply(rule finite_Diff)
       
  1055   apply(rule finite_supp)
       
  1056   apply(subgoal_tac "(set (ba xs) \<union> set (ba ys)) \<sharp>* f xs T")
       
  1057   apply(metis Un_absorb2 fresh_star_Un)
       
  1058   apply(subst fresh_star_Un)
       
  1059   apply(rule conjI)
       
  1060   apply(simp add: fresh_star_def f1)
       
  1061   apply(simp add: fresh_star_def f2)
       
  1062   apply(simp add: eqv)
       
  1063   done
       
  1064 
       
  1065 lemma Abs_set_fcb:
       
  1066   fixes xs ys :: "'a :: fs"
       
  1067     and S T :: "'b :: fs"
       
  1068   assumes e: "(Abs_set (ba xs) T) = (Abs_set (ba ys) S)"
       
  1069     and f1: "\<And>x. x \<in> ba xs \<Longrightarrow> x \<sharp> f xs T"
       
  1070     and f2: "\<And>x. supp T - ba xs = supp S - ba ys \<Longrightarrow> x \<in> ba ys \<Longrightarrow> x \<sharp> f xs T"
       
  1071     and eqv: "\<And>p. p \<bullet> T = S \<Longrightarrow> p \<bullet> ba xs = ba ys \<Longrightarrow> supp p \<subseteq> ba xs \<union> ba ys \<Longrightarrow> p \<bullet> (f xs T) = f ys S"
       
  1072   shows "f xs T = f ys S"
       
  1073   using e apply -
       
  1074   apply(subst (asm) Abs_eq_iff2)
       
  1075   apply(simp add: alphas)
       
  1076   apply(elim exE conjE)
       
  1077   apply(rule trans)
       
  1078   apply(rule_tac p="p" in supp_perm_eq[symmetric])
       
  1079   apply(rule fresh_star_supp_conv)
       
  1080   apply(drule fresh_star_perm_set_conv)
       
  1081   apply(rule finite_Diff)
       
  1082   apply(rule finite_supp)
       
  1083   apply(subgoal_tac "(ba xs \<union> ba ys) \<sharp>* f xs T")
       
  1084   apply(metis Un_absorb2 fresh_star_Un)
       
  1085   apply(subst fresh_star_Un)
       
  1086   apply(rule conjI)
       
  1087   apply(simp add: fresh_star_def f1)
       
  1088   apply(simp add: fresh_star_def f2)
       
  1089   apply(simp add: eqv)
       
  1090   done
       
  1091 
       
  1092 lemma Abs_res_fcb:
       
  1093   fixes xs ys :: "('a :: at_base) set"
       
  1094     and S T :: "'b :: fs"
       
  1095   assumes e: "(Abs_res (atom ` xs) T) = (Abs_res (atom ` ys) S)"
       
  1096     and f1: "\<And>x. x \<in> atom ` xs \<Longrightarrow> x \<in> supp T \<Longrightarrow> x \<sharp> f xs T"
       
  1097     and f2: "\<And>x. supp T - atom ` xs = supp S - atom ` ys \<Longrightarrow> x \<in> atom ` ys \<Longrightarrow> x \<in> supp S \<Longrightarrow> x \<sharp> f xs T"
       
  1098     and eqv: "\<And>p. p \<bullet> T = S \<Longrightarrow> supp p \<subseteq> atom ` xs \<inter> supp T \<union> atom ` ys \<inter> supp S
       
  1099                \<Longrightarrow> p \<bullet> (atom ` xs \<inter> supp T) = atom ` ys \<inter> supp S \<Longrightarrow> p \<bullet> (f xs T) = f ys S"
       
  1100   shows "f xs T = f ys S"
       
  1101   using e apply -
       
  1102   apply(subst (asm) Abs_eq_res_set)
       
  1103   apply(subst (asm) Abs_eq_iff2)
       
  1104   apply(simp add: alphas)
       
  1105   apply(elim exE conjE)
       
  1106   apply(rule trans)
       
  1107   apply(rule_tac p="p" in supp_perm_eq[symmetric])
       
  1108   apply(rule fresh_star_supp_conv)
       
  1109   apply(drule fresh_star_perm_set_conv)
       
  1110   apply(rule finite_Diff)
       
  1111   apply(rule finite_supp)
       
  1112   apply(subgoal_tac "(atom ` xs \<inter> supp T \<union> atom ` ys \<inter> supp S) \<sharp>* f xs T")
       
  1113   apply(metis Un_absorb2 fresh_star_Un)
       
  1114   apply(subst fresh_star_Un)
       
  1115   apply(rule conjI)
       
  1116   apply(simp add: fresh_star_def f1)
       
  1117   apply(subgoal_tac "supp T - atom ` xs = supp S - atom ` ys")
       
  1118   apply(simp add: fresh_star_def f2)
       
  1119   apply(blast)
       
  1120   apply(simp add: eqv)
       
  1121   done
       
  1122 
  1016 
  1123 end
  1017 end
  1124 
  1018