X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=blobdiff_plain;f=matita%2Fcontribs%2Flibrary_auto%2Fauto%2FZ%2Forders.ma;fp=matita%2Fcontribs%2Flibrary_auto%2Fauto%2FZ%2Forders.ma;h=a90ceadceb86e63d8bf93296654a217942f80ae9;hp=0000000000000000000000000000000000000000;hb=f61af501fb4608cc4fb062a0864c774e677f0d76;hpb=58ae1809c352e71e7b5530dc41e2bfc834e1aef1 diff --git a/matita/contribs/library_auto/auto/Z/orders.ma b/matita/contribs/library_auto/auto/Z/orders.ma new file mode 100644 index 000000000..a90ceadce --- /dev/null +++ b/matita/contribs/library_auto/auto/Z/orders.ma @@ -0,0 +1,188 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| A.Asperti, C.Sacerdoti Coen, *) +(* ||A|| E.Tassi, S.Zacchiroli *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU Lesser General Public License Version 2.1 *) +(* *) +(**************************************************************************) + +set "baseuri" "cic:/matita/library_autobatch/Z/orders". + +include "auto/Z/z.ma". +include "auto/nat/orders.ma". + +definition Zle : Z \to Z \to Prop \def +\lambda x,y:Z. + match x with + [ OZ \Rightarrow + match y with + [ OZ \Rightarrow True + | (pos m) \Rightarrow True + | (neg m) \Rightarrow False ] + | (pos n) \Rightarrow + match y with + [ OZ \Rightarrow False + | (pos m) \Rightarrow n \leq m + | (neg m) \Rightarrow False ] + | (neg n) \Rightarrow + match y with + [ OZ \Rightarrow True + | (pos m) \Rightarrow True + | (neg m) \Rightarrow m \leq n ]]. + +(*CSC: the URI must disappear: there is a bug now *) +interpretation "integer 'less or equal to'" 'leq x y = (cic:/matita/library_autobatch/Z/orders/Zle.con x y). +(*CSC: the URI must disappear: there is a bug now *) +interpretation "integer 'neither less nor equal to'" 'nleq x y = + (cic:/matita/logic/connectives/Not.con (cic:/matita/library_autobatch/Z/orders/Zle.con x y)). + +definition Zlt : Z \to Z \to Prop \def +\lambda x,y:Z. + match x with + [ OZ \Rightarrow + match y with + [ OZ \Rightarrow False + | (pos m) \Rightarrow True + | (neg m) \Rightarrow False ] + | (pos n) \Rightarrow + match y with + [ OZ \Rightarrow False + | (pos m) \Rightarrow n