proposition: Theorem Zdigit_mod_pow_out : forall n k k', (0 <= k' <= k)%Z -> Zdigit (Z.rem n (Zpower beta k')) k = Z0.
proof: Proof. intros n k k' Hk. unfold Zdigit. rewrite ZOdiv_small_abs. apply Zrem_0_l. apply Z.lt_le_trans with (Zpower beta k'). rewrite <- (Z.abs_eq (beta ^ k')) at 2 by apply Zpower_ge_0. apply Zrem_lt. apply Zgt_not_eq. now apply Zpower_gt_0. now apply Zpower_le. Qed.
imports: Coq(Lia ZArith Zquot) Zaux