equal
deleted
inserted
replaced
1083 fixes f :: "'a \<Rightarrow> 'b \<Rightarrow> 'b" |
1083 fixes f :: "'a \<Rightarrow> 'b \<Rightarrow> 'b" |
1084 fixes z :: "'b" |
1084 fixes z :: "'b" |
1085 assumes comp_fun_commute: "f y \<circ> f x = f x \<circ> f y" |
1085 assumes comp_fun_commute: "f y \<circ> f x = f x \<circ> f y" |
1086 begin |
1086 begin |
1087 |
1087 |
1088 interpretation comp_fun_commute f |
1088 interpretation fold?: comp_fun_commute f |
1089 by default (insert comp_fun_commute, simp add: fun_eq_iff) |
1089 by default (insert comp_fun_commute, simp add: fun_eq_iff) |
1090 |
1090 |
1091 definition F :: "'a set \<Rightarrow> 'b" |
1091 definition F :: "'a set \<Rightarrow> 'b" |
1092 where |
1092 where |
1093 eq_fold: "F A = fold f z A" |
1093 eq_fold: "F A = fold f z A" |
1133 assumes comp_fun_idem: "f x \<circ> f x = f x" |
1133 assumes comp_fun_idem: "f x \<circ> f x = f x" |
1134 begin |
1134 begin |
1135 |
1135 |
1136 declare insert [simp del] |
1136 declare insert [simp del] |
1137 |
1137 |
1138 interpretation comp_fun_idem f |
1138 interpretation fold?: comp_fun_idem f |
1139 by default (insert comp_fun_commute comp_fun_idem, simp add: fun_eq_iff) |
1139 by default (insert comp_fun_commute comp_fun_idem, simp add: fun_eq_iff) |
1140 |
1140 |
1141 lemma insert_idem [simp]: |
1141 lemma insert_idem [simp]: |
1142 assumes "finite A" |
1142 assumes "finite A" |
1143 shows "F (insert x A) = f x (F A)" |
1143 shows "F (insert x A) = f x (F A)" |