src/HOL/Data_Structures/RBT_Map.thy
changeset 68431 b294e095f64c
parent 68415 d74ba11680d4
child 68440 6826718f732d
     1.1 --- a/src/HOL/Data_Structures/RBT_Map.thy	Tue Jun 12 07:18:18 2018 +0200
     1.2 +++ b/src/HOL/Data_Structures/RBT_Map.thy	Tue Jun 12 17:18:40 2018 +0200
     1.3 @@ -42,7 +42,7 @@
     1.4  by(induction x y t rule: upd.induct)
     1.5    (auto simp: upd_list_simps inorder_baliL inorder_baliR)
     1.6  
     1.7 -lemma inorder_update:
     1.8 +lemma inorder_update_rbt:
     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 inorder_paint)
    1.11  
    1.12 @@ -51,7 +51,7 @@
    1.13  by(induction x t rule: del.induct)
    1.14    (auto simp: del_list_simps inorder_combine inorder_baldL inorder_baldR)
    1.15  
    1.16 -lemma inorder_delete:
    1.17 +lemma inorder_delete_rbt:
    1.18    "sorted1(inorder t) \<Longrightarrow> inorder(delete x t) = del_list x (inorder t)"
    1.19  by(simp add: delete_def inorder_del inorder_paint)
    1.20  
    1.21 @@ -105,18 +105,18 @@
    1.22  by (metis delete_def rbt_def color_paint_Black del_invc_invh invc_paint_Black invc2I invh_paint)
    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 = rbt
    1.28  proof (standard, goal_cases)
    1.29 -  case 1 show ?case by simp
    1.30 +  case 1 show ?case by (simp add: empty_def)
    1.31  next
    1.32    case 2 thus ?case by(simp add: lookup_map_of)
    1.33  next
    1.34 -  case 3 thus ?case by(simp add: inorder_update)
    1.35 +  case 3 thus ?case by(simp add: inorder_update_rbt)
    1.36  next
    1.37 -  case 4 thus ?case by(simp add: inorder_delete)
    1.38 +  case 4 thus ?case by(simp add: inorder_delete_rbt)
    1.39  next
    1.40 -  case 5 thus ?case by (simp add: rbt_Leaf) 
    1.41 +  case 5 thus ?case by (simp add: rbt_def empty_def) 
    1.42  next
    1.43    case 6 thus ?case by (simp add: rbt_update) 
    1.44  next