src/HOL/Data_Structures/AVL_Set.thy
changeset 68431 b294e095f64c
parent 68422 0a3a36fa1d63
child 68440 6826718f732d
     1.1 --- a/src/HOL/Data_Structures/AVL_Set.thy	Tue Jun 12 07:18:18 2018 +0200
     1.2 +++ b/src/HOL/Data_Structures/AVL_Set.thy	Tue Jun 12 17:18:40 2018 +0200
     1.3 @@ -14,6 +14,9 @@
     1.4  
     1.5  type_synonym 'a avl_tree = "('a,nat) tree"
     1.6  
     1.7 +definition empty :: "'a avl_tree" where
     1.8 +"empty = Leaf"
     1.9 +
    1.10  text \<open>Invariant:\<close>
    1.11  
    1.12  fun avl :: "'a avl_tree \<Rightarrow> bool" where
    1.13 @@ -421,10 +424,10 @@
    1.14  subsection "Overall correctness"
    1.15  
    1.16  interpretation 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 = avl
    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 @@ -432,7 +435,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: avl_insert(1))
    1.34  next