equal
deleted
inserted
replaced
444 using bst_wrt_mono less_imp_le by blast |
444 using bst_wrt_mono less_imp_le by blast |
445 |
445 |
446 lemma bst_wrt_le_iff_sorted: "bst_wrt (\<le>) t \<longleftrightarrow> sorted (inorder t)" |
446 lemma bst_wrt_le_iff_sorted: "bst_wrt (\<le>) t \<longleftrightarrow> sorted (inorder t)" |
447 apply (induction t) |
447 apply (induction t) |
448 apply(simp) |
448 apply(simp) |
449 by (fastforce simp: sorted_append sorted_Cons intro: less_imp_le less_trans) |
449 by (fastforce simp: sorted_append intro: less_imp_le less_trans) |
450 |
450 |
451 lemma bst_iff_sorted_wrt_less: "bst t \<longleftrightarrow> sorted_wrt (<) (inorder t)" |
451 lemma bst_iff_sorted_wrt_less: "bst t \<longleftrightarrow> sorted_wrt (<) (inorder t)" |
452 apply (induction t) |
452 apply (induction t) |
453 apply simp |
453 apply simp |
454 apply (fastforce simp: sorted_wrt_Cons sorted_wrt_append) |
454 apply (fastforce simp: sorted_wrt_append) |
455 done |
455 done |
456 |
456 |
457 |
457 |
458 subsection \<open>@{const heap}\<close> |
458 subsection \<open>@{const heap}\<close> |
459 |
459 |