src/HOL/Data_Structures/AA_Set.thy
changeset 68431 b294e095f64c
parent 68413 b56ed5010e69
child 68440 6826718f732d
     1.1 --- a/src/HOL/Data_Structures/AA_Set.thy	Tue Jun 12 07:18:18 2018 +0200
     1.2 +++ b/src/HOL/Data_Structures/AA_Set.thy	Tue Jun 12 17:18:40 2018 +0200
     1.3 @@ -12,6 +12,9 @@
     1.4  
     1.5  type_synonym 'a aa_tree = "('a,nat) tree"
     1.6  
     1.7 +definition empty :: "'a aa_tree" where
     1.8 +"empty = Leaf"
     1.9 +
    1.10  fun lvl :: "'a aa_tree \<Rightarrow> nat" where
    1.11  "lvl Leaf = 0" |
    1.12  "lvl (Node _ _ lv _) = lv"
    1.13 @@ -483,10 +486,10 @@
    1.14                post_split_max post_delete split_maxD split: prod.splits)
    1.15  
    1.16  interpretation I: Set_by_Ordered
    1.17 -where empty = Leaf and isin = isin and insert = insert and delete = delete
    1.18 +where empty = empty and isin = isin and insert = insert and delete = delete
    1.19  and inorder = inorder and inv = invar
    1.20  proof (standard, goal_cases)
    1.21 -  case 1 show ?case by simp
    1.22 +  case 1 show ?case by (simp add: empty_def)
    1.23  next
    1.24    case 2 thus ?case by(simp add: isin_set_inorder)
    1.25  next
    1.26 @@ -494,7 +497,7 @@
    1.27  next
    1.28    case 4 thus ?case by(simp add: inorder_delete)
    1.29  next
    1.30 -  case 5 thus ?case by(simp)
    1.31 +  case 5 thus ?case by(simp add: empty_def)
    1.32  next
    1.33    case 6 thus ?case by(simp add: invar_insert)
    1.34  next