proposition: Lemma hO_grandsOk: forall L j, heapOrdered L -> grandsOk L j root_idx.
proof: Proof. repeat intro. generalize (nth_error_le _ _ _ H3 j); intro. rewrite <- H2 in H5. destruct (H5 (parent_le gs)). apply hOhO2 in H. transitivity x; eapply H; eauto. congruence. Qed.
imports: Psatz List Arith.Div2 Even Relations RelationClasses PeanoNat Peano_dec Recdef Sorting Permutation Multiset