Fixpoint pos_length (p : positive) : nat :=
  match p with
  | xH => 0
  | xO p' => S (pos_length p')
  | xI p' => S (pos_length p')
  end.

Theorem digitAuxMore : forall (v r : Z) (q : positive), (0 < r)%Z -> (v < Zpower_nat n (pos_length q) * r)%Z -> (v < Zpower_nat n (digitAux v r q) * r)%Z.