Quotient_Examples/DList: explicit proof of remdups_eq_member_eq needed for explicit set type.
authorCezary Kaliszyk <kaliszyk@in.tum.de>
Thu, 18 Aug 2011 16:52:19 +0900
changeset 44263 971d1be5d5ce
parent 44262 355d5438f5fb
child 44264 c21ecbb028b6
child 44272 360fcbb1aa01
child 44274 731b18266d5a
child 44276 fe769a0fcc96
Quotient_Examples/DList: explicit proof of remdups_eq_member_eq needed for explicit set type.
src/HOL/Quotient_Examples/DList.thy
--- a/src/HOL/Quotient_Examples/DList.thy	Wed Aug 17 15:12:34 2011 -0700
+++ b/src/HOL/Quotient_Examples/DList.thy	Thu Aug 18 16:52:19 2011 +0900
@@ -48,6 +48,14 @@
   by (induct xa ya arbitrary: fx fy rule: list_induct2')
      (metis (full_types) remdups_nil_noteq_cons(2) remdups_map_remdups)+
 
+lemma remdups_eq_member_eq:
+  assumes "remdups xa = remdups ya"
+    shows "List.member xa = List.member ya"
+  using assms
+  unfolding fun_eq_iff List.member_def
+  by (induct xa ya rule: list_induct2')
+     (metis remdups_nil_noteq_cons set_remdups)+
+
 text {* Setting up the quotient type *}
 
 definition
@@ -91,7 +99,7 @@
   "(op = ===> dlist_eq ===> dlist_eq) map map"
   "(op = ===> dlist_eq ===> dlist_eq) filter filter"
   by (auto intro!: fun_relI simp add: remdups_filter)
-     (metis (full_types) member_set set_remdups remdups_eq_map_eq)+
+     (metis (full_types) set_remdups remdups_eq_map_eq remdups_eq_member_eq)+
 
 quotient_definition empty where "empty :: 'a dlist"
   is "Nil"