proposition: Lemma Pos_log2ceil_plus1_spec : forall (p : positive), (Pos.pow 2 (Pos_log2ceil_plus1 p) < 4 * p <= 2 * Pos.pow 2 (Pos_log2ceil_plus1 p))%positive.
proof: Proof. intros p. split. - induction p. + cbn. do 2 rewrite Pos.pow_succ_r. pose proof Pos_log2floor_plus1_spec p. lia. + cbn. rewrite Pos.pow_succ_r. lia. + cbn. lia. - induction p. + cbn. do 2 rewrite Pos.pow_succ_r. pose proof Pos_log2floor_plus1_spec p. lia. + cbn. rewrite Pos.pow_succ_r. lia. + cbn. lia. Qed.
imports: QArith Qpower Qabs Qround Lia Lqa PosExtra