Step * 1 2 1 1 2 2 of Lemma aa_max_ltree_spec


1. t : aa_ltree()@i
2. val : @i
3. left_subtree : aa_ltree()@i
4. right_subtree : aa_ltree()@i
5. aa_binary_search_tree(left_subtree)
 (i:. (aa_bst_member_prop(i;left_subtree)  (j:. (((inl j ) = aa_max_ltree(left_subtree))  (i  j)))))@i
6. aa_binary_search_tree(right_subtree)
 (i:. (aa_bst_member_prop(i;right_subtree)  (j:. (((inl j ) = aa_max_ltree(right_subtree))  (i  j)))))@i
7. aa_binary_search_tree(aa_lt_node(val;left_subtree;right_subtree))@i
8. i : @i
9. ((i < val)  aa_bst_member_prop(i;left_subtree))  ((val < i)  aa_bst_member_prop(i;right_subtree))@i
 i  case aa_max_ltree(right_subtree) of inl(rmaxint) =imax(val;rmaxint) | inr(unitval) =val
BY
{ GenConclAtAddr [2;1] THEN DVar `v' THEN Reduce 0 THEN Auto' THEN D 9 THEN Auto' THEN MaAuto }

1
1. t : aa_ltree()@i
2. val : @i
3. left_subtree : aa_ltree()@i
4. right_subtree : aa_ltree()@i
5. aa_binary_search_tree(left_subtree)
 (i:. (aa_bst_member_prop(i;left_subtree)  (j:. (((inl j ) = aa_max_ltree(left_subtree))  (i  j)))))@i
6. aa_binary_search_tree(right_subtree)
 (i:. (aa_bst_member_prop(i;right_subtree)  (j:. (((inl j ) = aa_max_ltree(right_subtree))  (i  j)))))@i
7. aa_binary_search_tree(aa_lt_node(val;left_subtree;right_subtree))@i
8. i : @i
9. val < i@i
10. aa_bst_member_prop(i;right_subtree)@i
11. x : @i
12. aa_max_ltree(right_subtree) = (inl x )@i
 i  imax(val;x)

2
1. t : aa_ltree()@i
2. val : @i
3. left_subtree : aa_ltree()@i
4. right_subtree : aa_ltree()@i
5. aa_binary_search_tree(left_subtree)
 (i:. (aa_bst_member_prop(i;left_subtree)  (j:. (((inl j ) = aa_max_ltree(left_subtree))  (i  j)))))@i
6. aa_binary_search_tree(right_subtree)
 (i:. (aa_bst_member_prop(i;right_subtree)  (j:. (((inl j ) = aa_max_ltree(right_subtree))  (i  j)))))@i
7. aa_binary_search_tree(aa_lt_node(val;left_subtree;right_subtree))@i
8. i : @i
9. val < i@i
10. aa_bst_member_prop(i;right_subtree)@i
11. y : Unit@i
12. aa_max_ltree(right_subtree) = (inr y )@i
 i  val



1.  t  :  aa\_ltree(\mBbbZ{})@i
2.  val  :  \mBbbZ{}@i
3.  left$_{subtree}$  :  aa\_ltree(\mBbbZ{})@i
4.  right$_{subtree}$  :  aa\_ltree(\mBbbZ{})@i
5.  aa\_binary\_search\_tree(left$_{subtree}$)
{}\mRightarrow{}  (\mforall{}i:\mBbbZ{}
            (aa\_bst\_member\_prop(i;left$_{subtree}$)
            {}\mRightarrow{}  (\mexists{}j:\mBbbZ{}.  (((inl  j  )  =  aa\_max\_ltree(left$_{subtree}$))  \mwedge{}  (i  \mleq{}  j)))))@i
6.  aa\_binary\_search\_tree(right$_{subtree}$)
{}\mRightarrow{}  (\mforall{}i:\mBbbZ{}
            (aa\_bst\_member\_prop(i;right$_{subtree}$)
            {}\mRightarrow{}  (\mexists{}j:\mBbbZ{}.  (((inl  j  )  =  aa\_max\_ltree(right$_{subtree}$))  \mwedge{}  (i  \mleq{}  j)))))@i
7.  aa\_binary\_search\_tree(aa\_lt\_node(val;left$_{subtree}$;right$_{sub\000Ctree}$))@i
8.  i  :  \mBbbZ{}@i
9.  ((i  <  val)  \mwedge{}  aa\_bst\_member\_prop(i;left$_{subtree}$))
\mvee{}  ((val  <  i)  \mwedge{}  aa\_bst\_member\_prop(i;right$_{subtree}$))@i
\mvdash{}  i  \mleq{}  case  aa\_max\_ltree(right$_{subtree}$)  of  inl(rmaxint)  =>  imax(val;rmaxint)  \000C|  inr(unitval)  =>  val


By

GenConclAtAddr  [2;1]  THEN  DVar  `v'  THEN  Reduce  0  THEN  Auto'  THEN  D  9  THEN  Auto'  THEN  MaAuto\mcdot{}



Home Index