1 alias id "O" = "cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1/1)".
2 alias id "nat" = "cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1)".
3 alias id "S" = "cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1/2)".
4 alias id "le" = "cic:/matita/fguidi/le.ind#xpointer(1/1)".
5 alias id "False_ind" = "cic:/Coq/Init/Logic/False_ind.con".
6 alias id "I" = "cic:/Coq/Init/Logic/True.ind#xpointer(1/1/1)".
7 alias id "ex_intro" = "cic:/Coq/Init/Logic/ex.ind#xpointer(1/1/1)".
9 alias symbol "and" (instance 0) = "logical and".
10 alias symbol "eq" (instance 0) = "leibnitz's equality".
11 alias symbol "exists" (instance 0) = "exists".
12 alias id "False" = "cic:/Coq/Init/Logic/False.ind#xpointer(1/1)".
13 alias id "True" = "cic:/Coq/Init/Logic/True.ind#xpointer(1/1)".
15 definition is_S: nat \to Prop \def
16 \lambda n. match n with
18 | (S n) \Rightarrow True
21 definition pred: nat \to nat \def
22 \lambda n. match n with
27 theorem eq_gen_S_O: \forall x. (S x = O) \to \forall P:Prop. P.
28 intros. apply False_ind. cut (is_S O). auto. elim H. exact I.
31 theorem eq_gen_S_O_cc: (\forall P:Prop. P) \to \forall x. (S x = O).
35 theorem eq_gen_S_S: \forall m,n. (S m) = (S n) \to m = n.
36 intros. cut (pred (S m)) = (pred (S n)).
37 assumption. elim H. auto.
40 theorem eq_gen_S_S_cc: \forall m,n. m = n \to (S m) = (S n).
44 inductive le: nat \to nat \to Prop \def
45 le_zero: \forall n. (le O n)
46 | le_succ: \forall m, n. (le m n) \to (le (S m) (S n)).
48 theorem le_refl: \forall x. (le x x).
49 intros. elim x. auto. auto.
52 theorem le_gen_x_O_aux: \forall x, y. (le x y) \to (y =O) \to
54 intros 3. elim H. auto. apply eq_gen_S_O. exact x2. auto.
57 theorem le_gen_x_O: \forall x. (le x O) \to (x = O).
58 intros. apply le_gen_x_O_aux. exact O. auto. auto.
61 theorem le_gen_x_O_cc: \forall x. (x = O) \to (le x O).
65 theorem le_gen_S_x_aux: \forall m,x,y. (le y x) \to (y = S m) \to
66 (\exists n. x = (S n) \land (le m n)).
68 apply eq_gen_S_O. exact m. elim H1. auto.
69 cut x1 = m. elim Hcut. apply ex_intro. exact x2. auto. auto.
72 theorem le_gen_S_x: \forall m,x. (le (S m) x) \to
73 (\exists n. x = (S n) \land (le m n)).
74 intros. apply le_gen_S_x_aux. exact (S m). auto. auto.
77 theorem le_gen_S_x_cc: \forall m,x. (\exists n. x = (S n) \land (le m n)) \to
79 intros. elim H. elim H1. cut (S x1) = x. elim Hcut. auto. elim H2. auto.
82 theorem le_gen_S_S: \forall m,n. (le (S m) (S n)) \to (le m n).
83 intros. cut (\exists p. (S n) = (S p) \land (le m p)).
84 elim Hcut. elim H1. cut x = n.
85 elim Hcut1. auto. symmetry. auto. auto.
88 theorem le_gen_S_S_cc: \forall m,n. (le m n) \to (le (S m) (S n)).
93 theorem pippo: \forall m,n. (le (S m) (S n)) \to (le m n).