src/HOL/Data_Structures/Tree23_Map.thy
changeset 68020 6aade817bee5
parent 67965 aaa31cd0caef
child 68431 b294e095f64c
     1.1 --- a/src/HOL/Data_Structures/Tree23_Map.thy	Fri Apr 20 22:22:46 2018 +0200
     1.2 +++ b/src/HOL/Data_Structures/Tree23_Map.thy	Sat Apr 21 08:41:42 2018 +0200
     1.3 @@ -57,13 +57,13 @@
     1.4  "del x (Node2 l ab1 r) = (case cmp x (fst ab1) of
     1.5    LT \<Rightarrow> node21 (del x l) ab1 r |
     1.6    GT \<Rightarrow> node22 l ab1 (del x r) |
     1.7 -  EQ \<Rightarrow> let (ab1',t) = del_min r in node22 l ab1' t)" |
     1.8 +  EQ \<Rightarrow> let (ab1',t) = split_min r in node22 l ab1' t)" |
     1.9  "del x (Node3 l ab1 m ab2 r) = (case cmp x (fst ab1) of
    1.10    LT \<Rightarrow> node31 (del x l) ab1 m ab2 r |
    1.11 -  EQ \<Rightarrow> let (ab1',m') = del_min m in node32 l ab1' m' ab2 r |
    1.12 +  EQ \<Rightarrow> let (ab1',m') = split_min m in node32 l ab1' m' ab2 r |
    1.13    GT \<Rightarrow> (case cmp x (fst ab2) of
    1.14             LT \<Rightarrow> node32 l ab1 (del x m) ab2 r |
    1.15 -           EQ \<Rightarrow> let (ab2',r') = del_min r in node33 l ab1 m ab2' r' |
    1.16 +           EQ \<Rightarrow> let (ab2',r') = split_min r in node33 l ab1 m ab2' r' |
    1.17             GT \<Rightarrow> node33 l ab1 m ab2 (del x r)))"
    1.18  
    1.19  definition delete :: "'a::linorder \<Rightarrow> ('a*'b) tree23 \<Rightarrow> ('a*'b) tree23" where
    1.20 @@ -89,7 +89,7 @@
    1.21  lemma inorder_del: "\<lbrakk> bal t ; sorted1(inorder t) \<rbrakk> \<Longrightarrow>
    1.22    inorder(tree\<^sub>d (del x t)) = del_list x (inorder t)"
    1.23  by(induction t rule: del.induct)
    1.24 -  (auto simp: del_list_simps inorder_nodes del_minD split!: if_split prod.splits)
    1.25 +  (auto simp: del_list_simps inorder_nodes split_minD split!: if_split prod.splits)
    1.26  
    1.27  corollary inorder_delete: "\<lbrakk> bal t ; sorted1(inorder t) \<rbrakk> \<Longrightarrow>
    1.28    inorder(delete x t) = del_list x (inorder t)"
    1.29 @@ -107,11 +107,11 @@
    1.30  
    1.31  lemma height_del: "bal t \<Longrightarrow> height(del x t) = height t"
    1.32  by(induction x t rule: del.induct)
    1.33 -  (auto simp add: heights max_def height_del_min split: prod.split)
    1.34 +  (auto simp add: heights max_def height_split_min split: prod.split)
    1.35  
    1.36  lemma bal_tree\<^sub>d_del: "bal t \<Longrightarrow> bal(tree\<^sub>d(del x t))"
    1.37  by(induction x t rule: del.induct)
    1.38 -  (auto simp: bals bal_del_min height_del height_del_min split: prod.split)
    1.39 +  (auto simp: bals bal_split_min height_del height_split_min split: prod.split)
    1.40  
    1.41  corollary bal_delete: "bal t \<Longrightarrow> bal(delete x t)"
    1.42  by(simp add: delete_def bal_tree\<^sub>d_del)