right.apply not_eq_pp_nn.
right.apply not_eq_pp_cons.
intros. elim g1.
- right.intro.apply not_eq_pp_nn n1 n ?.apply sym_eq. assumption.
+ right.intro.apply not_eq_pp_nn n1 n.apply sym_eq. assumption.
elim ((decidable_eq_nat n n1) : Or (n=n1) (n=n1 \to False)).
left. apply eq_f. assumption.
right.intro.apply H.apply injective_nn.assumption.
right.apply not_eq_nn_cons.
- intros.right.intro.apply not_eq_pp_cons m x f1 ?.apply sym_eq.assumption.
- intros.right.intro.apply not_eq_nn_cons m x f1 ?.apply sym_eq.assumption.
+ intros.right.intro.apply not_eq_pp_cons m x f1.apply sym_eq.assumption.
+ intros.right.intro.apply not_eq_nn_cons m x f1.apply sym_eq.assumption.
intros.elim H.
elim ((decidable_eq_Z x y) : Or (x=y) (x=y \to False)).
left.apply eq_f2.assumption.
simplify.apply not_eq_pp_nn.
simplify.apply not_eq_pp_cons.
intros.elim g1.
- simplify.intro.apply not_eq_pp_nn n1 n ?.apply sym_eq. assumption.
+ simplify.intro.apply not_eq_pp_nn n1 n.apply sym_eq. assumption.
simplify.apply eqb_elim.intro.simplify.apply eq_f.assumption.
intro.simplify.intro.apply H.apply injective_nn.assumption.
simplify.apply not_eq_nn_cons.
- intros.simplify.intro.apply not_eq_pp_cons m x f1 ?.apply sym_eq. assumption.
- intros.simplify.intro.apply not_eq_nn_cons m x f1 ?.apply sym_eq. assumption.
+ intros.simplify.intro.apply not_eq_pp_cons m x f1.apply sym_eq. assumption.
+ intros.simplify.intro.apply not_eq_nn_cons m x f1.apply sym_eq. assumption.
intros.
change in match (eqfb (cons x f1) (cons y g1))
with (andb (eqZb x y) (eqfb f1 g1)).
intro.elim r.
reflexivity.
simplify.apply ftimes_finv.
-qed.
\ No newline at end of file
+qed.
rewrite < plus_n_Sm. rewrite < plus_n_Sm.rewrite < sym_plus.reflexivity.
simplify.
rewrite > nat_compare_n_m_m_n.
-simplify.elim nat_compare ? ?.simplify.reflexivity.
+simplify.elim nat_compare.simplify.reflexivity.
simplify. reflexivity.
simplify. reflexivity.
elim y.simplify.reflexivity.
simplify.rewrite > nat_compare_n_m_m_n.
-simplify.elim nat_compare ? ?.simplify.reflexivity.
+simplify.elim nat_compare.simplify.reflexivity.
simplify. reflexivity.
simplify. reflexivity.
simplify.rewrite < plus_n_Sm. rewrite < plus_n_Sm.rewrite < sym_plus.reflexivity.
change with
eq Z (pos (pred (times (S (pred (times (S n) (S n1)))) (S n2))))
(pos (pred (times (S n) (S (pred (times (S n1) (S n2))))))).
- rewrite < S_pred ? ?.rewrite < S_pred ? ?.rewrite < assoc_times.reflexivity.
+ rewrite < S_pred.rewrite < S_pred.rewrite < assoc_times.reflexivity.
apply lt_O_times_S_S.apply lt_O_times_S_S.
change with
eq Z (neg (pred (times (S (pred (times (S n) (S n1)))) (S n2))))
(neg (pred (times (S n) (S (pred (times (S n1) (S n2))))))).
- rewrite < S_pred ? ?.rewrite < S_pred ? ?.rewrite < assoc_times.reflexivity.
+ rewrite < S_pred.rewrite < S_pred.rewrite < assoc_times.reflexivity.
apply lt_O_times_S_S.apply lt_O_times_S_S.
elim z.
simplify.reflexivity.
change with
eq Z (neg (pred (times (S (pred (times (S n) (S n1)))) (S n2))))
(neg (pred (times (S n) (S (pred (times (S n1) (S n2))))))).
- rewrite < S_pred ? ?.rewrite < S_pred ? ?.rewrite < assoc_times.reflexivity.
+ rewrite < S_pred.rewrite < S_pred.rewrite < assoc_times.reflexivity.
apply lt_O_times_S_S.apply lt_O_times_S_S.
change with
eq Z (pos (pred (times (S (pred (times (S n) (S n1)))) (S n2))))
(pos(pred (times (S n) (S (pred (times (S n1) (S n2))))))).
- rewrite < S_pred ? ?.rewrite < S_pred ? ?.rewrite < assoc_times.reflexivity.
+ rewrite < S_pred.rewrite < S_pred.rewrite < assoc_times.reflexivity.
apply lt_O_times_S_S.apply lt_O_times_S_S.
elim y.
simplify.reflexivity.
change with
eq Z (neg (pred (times (S (pred (times (S n) (S n1)))) (S n2))))
(neg (pred (times (S n) (S (pred (times (S n1) (S n2))))))).
- rewrite < S_pred ? ?.rewrite < S_pred ? ?.rewrite < assoc_times.reflexivity.
+ rewrite < S_pred.rewrite < S_pred.rewrite < assoc_times.reflexivity.
apply lt_O_times_S_S.apply lt_O_times_S_S.
change with
eq Z (pos (pred (times (S (pred (times (S n) (S n1)))) (S n2))))
(pos (pred (times (S n) (S (pred (times (S n1) (S n2))))))).
- rewrite < S_pred ? ?.rewrite < S_pred ? ?.rewrite < assoc_times.reflexivity.
+ rewrite < S_pred.rewrite < S_pred.rewrite < assoc_times.reflexivity.
apply lt_O_times_S_S.apply lt_O_times_S_S.
elim z.
simplify.reflexivity.
change with
eq Z (pos (pred (times (S (pred (times (S n) (S n1)))) (S n2))))
(pos (pred (times (S n) (S (pred (times (S n1) (S n2))))))).
- rewrite < S_pred ? ?.rewrite < S_pred ? ?.rewrite < assoc_times.reflexivity.
+ rewrite < S_pred.rewrite < S_pred.rewrite < assoc_times.reflexivity.
apply lt_O_times_S_S.apply lt_O_times_S_S.
change with
eq Z (neg (pred (times (S (pred (times (S n) (S n1)))) (S n2))))
(neg(pred (times (S n) (S (pred (times (S n1) (S n2))))))).
- rewrite < S_pred ? ?.rewrite < S_pred ? ?.rewrite < assoc_times.reflexivity.
+ rewrite < S_pred.rewrite < S_pred.rewrite < assoc_times.reflexivity.
apply lt_O_times_S_S.apply lt_O_times_S_S.
qed.
(minus (pred (times (S n) (S p)))
(pred (times (S n) (S q)))).
intros.
-rewrite < S_pred ? ?.
-rewrite > minus_pred_pred ? ? ? ?.
+rewrite < S_pred.
+rewrite > minus_pred_pred.
rewrite < distr_times_minus.
reflexivity.
(* we now close all positivity conditions *)
simplify.
change in match (plus p (times n (S p))) with (pred (times (S n) (S p))).
change in match (plus q (times n (S q))) with (pred (times (S n) (S q))).
-rewrite < nat_compare_pred_pred ? ? ? ?.
+rewrite < nat_compare_pred_pred.
rewrite < nat_compare_times_l.
rewrite < nat_compare_S_S.
apply nat_compare_elim p q.
variant distr_Ztimes_Zplus: \forall x,y,z.
eq Z (Ztimes x (Zplus y z)) (Zplus (Ztimes x y) (Ztimes x z)) \def
-distributive_Ztimes_Zplus.
\ No newline at end of file
+distributive_Ztimes_Zplus.
simplify.apply not_eq_O_S.
intro.
simplify.
-intro. apply not_eq_O_S n1 ?.apply sym_eq.assumption.
+intro. apply not_eq_O_S n1.apply sym_eq.assumption.
intros.simplify.
generalize in match H.
elim (eqb n1 m1).
cut b \leq r.
apply lt_to_not_le r b H2 Hcut2.
elim Hcut.assumption.
-apply trans_le ? ((q1-q)*b) ?.
+apply trans_le ? ((q1-q)*b).
apply le_times_n.
apply le_SO_minus.exact H6.
rewrite < sym_plus.
rewrite < sym_times.
rewrite > distr_times_minus.
(* ATTENZIONE ALL' ORDINAMENTO DEI GOALS *)
-rewrite > plus_minus ? ? ? ?.
+rewrite > plus_minus.
rewrite > sym_times.
rewrite < H5.
rewrite < sym_times.
cut b \leq r1.
apply lt_to_not_le r1 b H4 Hcut2.
elim Hcut.assumption.
-apply trans_le ? ((q-q1)*b) ?.
+apply trans_le ? ((q-q1)*b).
apply le_times_n.
apply le_SO_minus.exact H6.
rewrite < sym_plus.
apply le_plus_n.
rewrite < sym_times.
rewrite > distr_times_minus.
-rewrite > plus_minus ? ? ? ?.
+rewrite > plus_minus.
rewrite > sym_times.
rewrite < H3.
rewrite < sym_times.
qed.
variant inj_times_l1:\forall n. O < n \to \forall p,q:nat.p*n = q*n \to p=q
-\def lt_O_to_injective_times_l.
\ No newline at end of file
+\def lt_O_to_injective_times_l.
apply le_n_O_to_eq.apply le_S_S_to_le.exact H5.
simplify.intro.
cut O=n1.
-apply not_le_Sn_O O ?.
+apply not_le_Sn_O O.
rewrite > Hcut3 in \vdash (? ? %).
assumption.rewrite > Hcut.
rewrite < H6.reflexivity.
rewrite > Hcut3 in \vdash (? (? ? %)).
change with divides (nth_prime p) r \to False.
intro.
-apply plog_aux_to_not_mod_O (S(S m1)) (S(S m1)) (nth_prime p) q r ? ? ? ?.
+apply plog_aux_to_not_mod_O (S(S m1)) (S(S m1)) (nth_prime p) q r.
apply lt_SO_nth_prime_n.
simplify.apply le_S_S.apply le_O_n.apply le_n.
assumption.
elim Hcut3.absurd O=r.
apply le_n_O_to_eq.apply le_S_S_to_le.exact H2.
simplify.intro.
-apply not_le_Sn_O O ?.
+apply not_le_Sn_O O.
rewrite > H3 in \vdash (? ? %).assumption.assumption.
apply le_to_or_lt_eq r (S O).
apply not_lt_to_le.assumption.
cut i = j.
apply not_le_Sn_n i.rewrite > Hcut1 in \vdash (? ? %).assumption.
apply injective_nth_prime ? ? H4.
-apply H i (S j) ?.
+apply H i (S j).
apply trans_lt ? j.assumption.simplify.apply le_n.
assumption.
apply divides_times_to_divides.
rewrite > plus_n_O.
rewrite > plus_n_O (defactorize_aux n3 (S i)).assumption.
apply False_ind.
-apply not_divides_defactorize_aux n1 i (S i) ?.
+apply not_divides_defactorize_aux n1 i (S i).
simplify. apply le_n.
simplify in H5.
rewrite > plus_n_O (defactorize_aux n1 (S i)).
reflexivity.
intros.
apply False_ind.
-apply not_divides_defactorize_aux n3 i (S i) ?.
+apply not_divides_defactorize_aux n3 i (S i).
simplify. apply le_n.
simplify in H4.
rewrite > plus_n_O (defactorize_aux n3 (S i)).
(* META NOT FOUND !!!
rewrite > sym_eq. *)
simplify.intro.
-apply not_eq_O_S m1 ?.
+apply not_eq_O_S m1.
rewrite > H5.reflexivity.
qed.
apply bool_ind (\lambda b:bool.
(f (S n1) = b) \to (f ([\lambda b:bool.nat] match b in bool with
[ true \Rightarrow (S n1)
-| false \Rightarrow (max n1 f)])) = true) ? ? ?.
+| false \Rightarrow (max n1 f)])) = true).
simplify.intro.assumption.
simplify.intro.apply H.
elim H1.elim H3.generalize in match H5.
intros.
apply ex_intro nat ? a.
split.apply le_S_S_to_le.assumption.assumption.
-intros.apply False_ind.apply not_eq_true_false ?.
+intros.apply False_ind.apply not_eq_true_false.
rewrite < H2.rewrite < H7.rewrite > H6. reflexivity.
reflexivity.
qed.
apply bool_ind (\lambda b:bool.
(f (m-(S n)) = b) \to (f ([\lambda b:bool.nat] match b in bool with
[ true \Rightarrow m-(S n)
-| false \Rightarrow (min_aux n m f)])) = true) ? ? ?.
+| false \Rightarrow (min_aux n m f)])) = true).
simplify.intro.assumption.
simplify.intro.apply H.
elim H1.elim H3.elim H4.
elim min_aux_S f n1 n.
elim H1.rewrite > H3.apply le_n.
elim H1.rewrite > H3.
-apply trans_le (n-(S n1)) (n-n1) ?.
+apply trans_le (n-(S n1)) (n-n1).
apply monotonic_le_minus_r.
apply le_n_Sn.
assumption.
theorem minus_to_plus :\forall n,m,p:nat.m \leq n \to n-m = p \to
n = m+p.
-intros.apply trans_eq ? ? ((n-m)+m) ?.
+intros.apply trans_eq ? ? ((n-m)+m).
apply plus_minus_m_m.
apply H.elim H1.
apply sym_plus.
apply inj_plus_l (x*z).assumption.
apply trans_eq nat ? (x*y).
rewrite < distr_times_plus.rewrite < plus_minus_m_m ? ? H.reflexivity.
- rewrite < plus_minus_m_m ? ? ?.
+ rewrite < plus_minus_m_m.
reflexivity.
apply le_times_r.assumption.
intro.rewrite > eq_minus_n_m_O.
left.reflexivity.
right.apply not_eq_O_S.
intro.right.intro.
-apply not_eq_O_S n1 ?.
+apply not_eq_O_S n1.
apply sym_eq.assumption.
intros.elim H.
left.apply eq_f. assumption.
intros.
apply not_le_to_lt.
change with smallest_factor (S (fact n)) \le n \to False.intro.
-apply not_divides_S_fact n (smallest_factor(S (fact n))) ? ?.
+apply not_divides_S_fact n (smallest_factor(S (fact n))).
apply lt_SO_smallest_factor.
simplify.apply le_S_S.apply le_SO_fact.
assumption.