src/HOL/Data_Structures/Tree23_Map.thy
changeset 68431 b294e095f64c
parent 68020 6aade817bee5
child 68440 6826718f732d
--- a/src/HOL/Data_Structures/Tree23_Map.thy	Tue Jun 12 07:18:18 2018 +0200
+++ b/src/HOL/Data_Structures/Tree23_Map.thy	Tue Jun 12 17:18:40 2018 +0200
@@ -81,7 +81,7 @@
   "sorted1(inorder t) \<Longrightarrow> inorder(tree\<^sub>i(upd x y t)) = upd_list x y (inorder t)"
 by(induction t) (auto simp: upd_list_simps split: up\<^sub>i.splits)
 
-corollary inorder_update:
+corollary inorder_update_23:
   "sorted1(inorder t) \<Longrightarrow> inorder(update x y t) = upd_list x y (inorder t)"
 by(simp add: update_def inorder_upd)
 
@@ -91,7 +91,7 @@
 by(induction t rule: del.induct)
   (auto simp: del_list_simps inorder_nodes split_minD split!: if_split prod.splits)
 
-corollary inorder_delete: "\<lbrakk> bal t ; sorted1(inorder t) \<rbrakk> \<Longrightarrow>
+corollary inorder_delete_23: "\<lbrakk> bal t ; sorted1(inorder t) \<rbrakk> \<Longrightarrow>
   inorder(delete x t) = del_list x (inorder t)"
 by(simp add: delete_def inorder_del)
 
@@ -120,18 +120,22 @@
 subsection \<open>Overall Correctness\<close>
 
 interpretation Map_by_Ordered
-where empty = Leaf and lookup = lookup and update = update and delete = delete
+where empty = empty and lookup = lookup and update = update and delete = delete
 and inorder = inorder and inv = bal
 proof (standard, goal_cases)
+  case 1 thus ?case by(simp add: empty_def)
+next
   case 2 thus ?case by(simp add: lookup_map_of)
 next
-  case 3 thus ?case by(simp add: inorder_update)
+  case 3 thus ?case by(simp add: inorder_update_23)
 next
-  case 4 thus ?case by(simp add: inorder_delete)
+  case 4 thus ?case by(simp add: inorder_delete_23)
+next
+  case 5 thus ?case by(simp add: empty_def)
 next
   case 6 thus ?case by(simp add: bal_update)
 next
   case 7 thus ?case by(simp add: bal_delete)
-qed simp+
+qed
 
 end