1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 set "baseuri" "cic:/matita/test/decl".
17 include "nat/times.ma".
18 include "nat/orders.ma".
20 theorem easy: ∀n,m. n * m = O → n = O ∨ m = O.
24 by (refl_eq ? O) we proved (O = O) (trivial).
25 by (or_introl ? ? trivial) we proved (O = O ∨ m = O) (trivial2).
26 by (λ_.trivial2) we proved (O*m=O → O=O ∨ m=O) (base_case).
29 (∀n1. (n1 * m = O → n1 = O ∨ m = O) → (S n1) * m = O → (S n1) = O ∨ m = O)
32 suppose (n1 * m = O → n1 = O ∨ m = O) (inductive_hyp).
34 by (or_intror ? ? trivial) we proved (S n1 = O ∨ O = O) (pre_base_case2).
35 by (λ_.pre_base_case2) we proved (S n1*O = O → S n1 = O ∨ O = O) (base_case2).
38 (∀m1. (S n1 * m1 = O → S n1 = O ∨ m1 = O) →
39 (S n1 * S m1 = O → S n1 = O ∨ S m1 = O)) (inductive_hyp2).
41 suppose (S n1 * m1 = O → S n1 = O ∨ m1 = O) (useless).
42 suppose (S n1 * S m1 = O) (absurd_hyp).
43 simplify in absurd_hyp.
44 by (sym_eq ? ? ? absurd_hyp) we proved (O = S (m1+n1*S m1)) (absurd_hyp').
45 by (not_eq_O_S ? absurd_hyp') we proved False (the_absurd).
46 by (False_ind ? the_absurd)
49 by (nat_ind (λm.S n1 * m = O → S n1 = O ∨ m = O) base_case2 inductive_hyp2 m)
52 by (nat_ind (λn.n*m=O → n=O ∨ m=O) base_case inductive_case n)
56 theorem easy2: ∀n,m. n * m = O → n = O ∨ m = O.
69 lapply (sym_eq ? ? ? H2);
70 elim (not_eq_O_S ? Hletin)