Fixpoint maxDiv (v : Z) (p : nat) {struct p} : nat :=
  match p with
  | O => 0
  | S p' =>
      match ZdividesP v (Zpower_nat radix p) with
      | left _ => p
      | right _ => maxDiv v p'
      end
  end.

Theorem maxDivSimplAux : forall (v : Z) (p q : nat), p = maxDiv v (S (q + p)) -> p = maxDiv v (S p).