Section mf.
Variable radix : Z.
Hypothesis radixMoreThanOne : (1 < radix)%Z.
Let radixMoreThanZERO := Zlt_1_O _ (Zlt_le_weak _ _ radixMoreThanOne).
Hint Resolve radixMoreThanZERO: zarith.
Let FtoRradix := FtoR radix.
Local Coercion FtoRradix : float >-> R.
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.
intros v p; elim p; simpl in |- *; auto.
intros n H'; case (ZdividesP v (radix * Zpower_nat radix n)); auto.
Qed.
intros v p; case p; simpl in |- *; auto.
intros H'; case H'.
apply Zdivides1.
intros n H'; case (ZdividesP v (radix * Zpower_nat radix n)); auto.
intros H'0; case H'; auto.
intros H'0; generalize (maxDivLess v n); auto with arith.
Qed.
intros v p; elim p.
unfold maxDiv in |- *; rewrite Zpower_nat_O; auto.
apply Zdivides1.
simpl in |- *.
intros n H'; case (ZdividesP v (radix * Zpower_nat radix n)); simpl in |- *;
auto with zarith.
Qed.

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