]> matita.cs.unibo.it Git - helm.git/blob - matita/contribs/RELATIONAL/Zah/setoid.ma
e30b5a205723b3ae8cbad46098bdb2d1edc99989
[helm.git] / matita / contribs / RELATIONAL / Zah / setoid.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 set "baseuri" "cic:/matita/RELATIONAL/Zah/setoid".
16
17 include "NPlus/monoid.ma".
18 include "Zah/defs.ma".
19
20 theorem nplus_total: \forall p,q. \exists r. p + q == r.
21  intros 2. elim q; clear q;
22  decompose; auto.
23 qed.
24
25 theorem zeq_intro: \forall z1,z2. 
26                    (\forall n.((\fst z1) + (\snd z2) == n) \to ((\fst z2) + (\snd z1) == n)) \to
27                    (\forall n.((\fst z2) + (\snd z1) == n) \to ((\fst z1) + (\snd z2) == n)) \to
28                    z1 = z2.
29  unfold ZEq. intros. apply iff_intro; intros; auto.
30 qed.
31
32 theorem zeq_refl: \forall z. z = z.
33  unfold ZEq. intros. auto.
34 qed.
35
36 theorem zeq_sym: \forall z1,z2. z1 = z2 \to z2 = z1.
37  unfold ZEq. intros. lapply linear (H n). auto.
38 qed.
39 (*
40 theorem zeq_trans: \forall z1,z2. z1 = z2 \to 
41                    \forall z3. z2 = z3 \to z1 = z3.
42  unfold ZEq. intros.
43  lapply (nplus_total (\snd z2) (\fst z2)). decompose.
44  
45  
46  
47  apply iff_intro; intros;
48  [ lapply (nplus_total (\fst z1) (\snd z3)). decompose
49  |
50  
51  
52  
53  
54  lapply (nplus_total (\snd z2) (\fst z2)). decompose.
55  lapply (nplus_total n a). decompose.
56  lapply linear (H a1). lapply linear (H1 a1). decompose.
57  
58  
59
60 *)