proposition: Lemma bits_iff_neg_ex : forall a, a<0 <-> (exists k, forall m, k<m -> a.[m] = true).
proof: Proof. intros a. split. - intros Ha. exists (log2 (P (-a))). intros m Hm. now apply bits_above_log2_neg. - intros (k,Hk). destruct (le_gt_cases k (log2 (abs a))). + now apply bits_iff_neg', Hk, lt_succ_r. + apply (bits_iff_neg a (S k)). * now apply lt_succ_r, lt_le_incl. * apply Hk. apply lt_succ_diag_r. Qed.
imports: Bool ZAxioms ZMulOrder ZPow ZDivFloor ZSgnAbs ZParity NZLog