src/HOL/Data_Structures/Tree23_Map.thy
changeset 68431 b294e095f64c
parent 68020 6aade817bee5
child 68440 6826718f732d
     1.1 --- a/src/HOL/Data_Structures/Tree23_Map.thy	Tue Jun 12 07:18:18 2018 +0200
     1.2 +++ b/src/HOL/Data_Structures/Tree23_Map.thy	Tue Jun 12 17:18:40 2018 +0200
     1.3 @@ -81,7 +81,7 @@
     1.4    "sorted1(inorder t) \<Longrightarrow> inorder(tree\<^sub>i(upd x y t)) = upd_list x y (inorder t)"
     1.5  by(induction t) (auto simp: upd_list_simps split: up\<^sub>i.splits)
     1.6  
     1.7 -corollary inorder_update:
     1.8 +corollary inorder_update_23:
     1.9    "sorted1(inorder t) \<Longrightarrow> inorder(update x y t) = upd_list x y (inorder t)"
    1.10  by(simp add: update_def inorder_upd)
    1.11  
    1.12 @@ -91,7 +91,7 @@
    1.13  by(induction t rule: del.induct)
    1.14    (auto simp: del_list_simps inorder_nodes split_minD split!: if_split prod.splits)
    1.15  
    1.16 -corollary inorder_delete: "\<lbrakk> bal t ; sorted1(inorder t) \<rbrakk> \<Longrightarrow>
    1.17 +corollary inorder_delete_23: "\<lbrakk> bal t ; sorted1(inorder t) \<rbrakk> \<Longrightarrow>
    1.18    inorder(delete x t) = del_list x (inorder t)"
    1.19  by(simp add: delete_def inorder_del)
    1.20  
    1.21 @@ -120,18 +120,22 @@
    1.22  subsection \<open>Overall Correctness\<close>
    1.23  
    1.24  interpretation Map_by_Ordered
    1.25 -where empty = Leaf and lookup = lookup and update = update and delete = delete
    1.26 +where empty = empty and lookup = lookup and update = update and delete = delete
    1.27  and inorder = inorder and inv = bal
    1.28  proof (standard, goal_cases)
    1.29 +  case 1 thus ?case by(simp add: empty_def)
    1.30 +next
    1.31    case 2 thus ?case by(simp add: lookup_map_of)
    1.32  next
    1.33 -  case 3 thus ?case by(simp add: inorder_update)
    1.34 +  case 3 thus ?case by(simp add: inorder_update_23)
    1.35  next
    1.36 -  case 4 thus ?case by(simp add: inorder_delete)
    1.37 +  case 4 thus ?case by(simp add: inorder_delete_23)
    1.38 +next
    1.39 +  case 5 thus ?case by(simp add: empty_def)
    1.40  next
    1.41    case 6 thus ?case by(simp add: bal_update)
    1.42  next
    1.43    case 7 thus ?case by(simp add: bal_delete)
    1.44 -qed simp+
    1.45 +qed
    1.46  
    1.47  end