+(*a variant of or_div_mod *)
+theorem or_div_mod1: \forall n,q. O < q \to
+(divides q (S n)) \land S n = (S (div n q)) * q \lor
+(\lnot (divides q (S n)) \land S n= (div n q) * q + S (n\mod q)).
+intros.elim (or_div_mod n q H);elim H1
+ [left.split
+ [apply (witness ? ? (S (n/q))).
+ rewrite > sym_times.assumption
+ |assumption
+ ]
+ |right.split
+ [intro.
+ apply (not_eq_O_S (n \mod q)).
+ (* come faccio a fare unfold nelleipotesi ? *)
+ cut ((S n) \mod q = O)
+ [rewrite < Hcut.
+ apply (div_mod_spec_to_eq2 (S n) q (div (S n) q) (mod (S n) q) (div n q) (S (mod n q)))
+ [apply div_mod_spec_div_mod.
+ assumption
+ |apply div_mod_spec_intro;assumption
+ ]
+ |apply divides_to_mod_O;assumption
+ ]
+ |assumption
+ ]
+ ]
+qed.
+
+theorem divides_to_div: \forall n,m.divides n m \to m/n*n = m.
+intro.
+elim (le_to_or_lt_eq O n (le_O_n n))
+ [rewrite > plus_n_O.
+ rewrite < (divides_to_mod_O ? ? H H1).
+ apply sym_eq.
+ apply div_mod.
+ assumption
+ |elim H1.
+ generalize in match H2.
+ rewrite < H.
+ simplify.
+ intro.
+ rewrite > H3.
+ reflexivity
+ ]
+qed.