Commit 1a8d980f authored by Adam Chlipala's avatar Adam Chlipala

Move [present] section earlier

parent 0ee88d52
......@@ -398,6 +398,22 @@ Qed.
Inductive rtree : nat -> Set :=
| RedNode' : forall c1 c2 n, rbtree c1 n -> nat -> rbtree c2 n -> rtree n.
Section present.
Variable x : nat.
Fixpoint present c n (t : rbtree c n) {struct t} : Prop :=
match t with
| Leaf => False
| RedNode _ a y b => present a \/ x = y \/ present b
| BlackNode _ _ _ a y b => present a \/ x = y \/ present b
end.
Definition rpresent n (t : rtree n) : Prop :=
match t with
| RedNode' _ _ _ a y b => present a \/ x = y \/ present b
end.
End present.
Notation "{< x >}" := (existT _ _ x).
Definition balance1 n (a : rtree n) (data : nat) c2 :=
......@@ -426,22 +442,6 @@ Definition balance2 n (a : rtree n) (data : nat) c2 :=
end t2
end.
Section present.
Variable x : nat.
Fixpoint present c n (t : rbtree c n) {struct t} : Prop :=
match t with
| Leaf => False
| RedNode _ a y b => present a \/ x = y \/ present b
| BlackNode _ _ _ a y b => present a \/ x = y \/ present b
end.
Definition rpresent n (t : rtree n) : Prop :=
match t with
| RedNode' _ _ _ a y b => present a \/ x = y \/ present b
end.
End present.
Section insert.
Variable x : nat.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment