(* *)
(**************************************************************************)
-set "baseuri" "cic:/matita/Z/".
+set "baseuri" "cic:/matita/Z/z".
include "nat/compare.ma".
include "nat/minus.ma".
theorem associative_Zplus: associative Z Zplus.
-change with (\forall x,y,z. eq ?(Zplus (Zplus x y) z) (Zplus x (Zplus y z))).
-(* simplify. *)
+change with \forall x,y,z:Z. eq Z (Zplus (Zplus x y) z) (Zplus x (Zplus y z)).
+(* simplify. *)
intros.elim x.simplify.reflexivity.
elim e1.rewrite < (Zpred_Zplus_neg_O (Zplus y z)).
rewrite < (Zpred_Zplus_neg_O y).
apply eq_f.assumption.
qed.
-variant assoc_Zplus :
-\forall x,y,z:Z. eq Z (Zplus (Zplus x y) z) (Zplus x (Zplus y z))
+variant assoc_Zplus : \forall x,y,z:Z. eq Z (Zplus (Zplus x y) z) (Zplus x (Zplus y z))
\def associative_Zplus.
+(* Zopp *)
+definition Zopp : Z \to Z \def
+\lambda x:Z. match x with
+[ OZ \Rightarrow OZ
+| (pos n) \Rightarrow (neg n)
+| (neg n) \Rightarrow (pos n) ].
+
+theorem Zplus_Zopp: \forall x:Z. (eq Z (Zplus x (Zopp x)) OZ).
+intro.elim x.
+apply refl_eq.
+simplify.
+rewrite > nat_compare_n_n.
+simplify.apply refl_eq.
+simplify.
+rewrite > nat_compare_n_n.
+simplify.apply refl_eq.
+qed.
+
\def
\lambda A.\lambda R.\forall x,y,z:A.R x y \to R y z \to R x z.
+definition irreflexive: \forall A:Type.\forall R:A \to A \to Prop.Prop
+\def
+\lambda A.\lambda R.\forall x:A.Not (R x x).
\ No newline at end of file
(* *)
(**************************************************************************)
-set "baseuri" "cic:/matita/connectives/".
+set "baseuri" "cic:/matita/logic/connectives/".
inductive True: Prop \def
I : True.
-default "true" cic:/matita/logic/True.ind.
+default "true" cic:/matita/logic/connectives/True.ind.
inductive False: Prop \def .
-default "false" cic:/matita/logic/False.ind.
+default "false" cic:/matita/logic/connectives/False.ind.
definition Not: Prop \to Prop \def
\lambda A. (A \to False).
intros. elim (H1 H).
qed.
-default "absurd" cic:/matita/logic/absurd.ind.
+default "absurd" cic:/matita/logic/connectives/absurd.con.
inductive And (A,B:Prop) : Prop \def
conj : A \to B \to (And A B).
set "baseuri" "cic:/matita/nat/orders".
-include "logic/connectives.ma".
-include "logic/equality.ma".
-include "nat/nat.ma".
include "nat/plus.ma".
include "higher_order_defs/ordering.ma".
apply le_times_r.assumption.
qed.
-theorem le_n_nm: \forall n,m:nat.le (S O) n \to le m (times n m).
+theorem le_times_n: \forall n,m:nat.le (S O) n \to le m (times n m).
intros.elim H.simplify.
elim (plus_n_O ?).apply le_n.
simplify.rewrite < sym_plus.apply le_plus_n.
set "baseuri" "cic:/matita/nat/plus".
-include "logic/equality.ma".
include "nat/nat.ma".
let rec plus n m \def