apply (trans_lt ? (S O));
[ unfold lt; apply le_n;
| assumption; ] *) ] ]
- | letin x \def prime. auto new.
+ | auto.
(*
apply prime_to_nth_prime;
apply prime_smallest_factor_n;
cut (prime (nth_prime (max_prime_factor n))).
apply lt_O_nth_prime_n.apply prime_nth_prime.
cut (nth_prime (max_prime_factor n) \divides n).
-auto new.
-auto new.
+auto.
+auto.
(*
[ apply (transitive_divides ? n);
[ apply divides_max_prime_factor_n.
theorem divides_mod: \forall p,m,n:nat. O < n \to p \divides m \to p \divides n \to
p \divides (m \mod n).
intros.elim H1.elim H2.
-apply (witness ? ? (n2 - n1*(m / n))).
+(* apply (witness ? ? (n2 - n1*(m / n))). *)
+apply witness[|
rewrite > distr_times_minus.
-rewrite < H3.
+rewrite < H3 in \vdash (? ? ? (? % ?)).
rewrite < assoc_times.
-rewrite < H4.
-apply sym_eq.
-apply plus_to_minus.
+rewrite < H4 in \vdash (? ? ? (? ? (? % ?))).
+apply sym_eq.apply plus_to_minus.
rewrite > sym_times.
-apply div_mod.
-assumption.
+letin x \def div.
+rewrite < (div_mod ? ? H).
+reflexivity.
+]
qed.
theorem divides_mod_to_divides: \forall p,m,n:nat. O < n \to