]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/nlibrary/basics/relations.ma
9a01823bec70fb4652c64465281e090dfb20014c
[helm.git] / helm / software / matita / nlibrary / basics / relations.ma
1 (**************************************************************************)
2 (*       ___                                                                *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||       A.Asperti, C.Sacerdoti Coen,                          *)
8 (*      ||A||       E.Tassi, S.Zacchiroli                                 *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU Lesser General Public License Version 2.1         *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 include "Plogic/connectives.ma".
16
17 ndefinition relation : Type \to Type
18 ≝ λA:Type.A→A→Prop. 
19
20 nrecord relation (A:Type) : Type ≝
21 {fun:2> A→A→Prop}.
22
23 ndefinition reflexive: ∀A:Type.∀R :relation A.Prop
24 ≝ λA.λR.∀x:A.R x x.
25
26 ndefinition symmetric: ∀A:Type.∀R: relation A.Prop
27 ≝ λA.λR.∀x,y:A.R x y → R y x.
28
29 ndefinition transitive: ∀A:Type.∀R:relation A.Prop
30 ≝ λA.λR.∀x,y,z:A.R x y → R y z → R x z.
31
32 ndefinition irreflexive: ∀A:Type.∀R:relation A.Prop
33 ≝ λA.λR.∀x:A.¬(R x x).
34
35 ndefinition cotransitive: ∀A:Type.∀R:relation A.Prop
36 ≝ λA.λR.∀x,y:A.R x y → ∀z:A. R x z ∨ R z y.
37
38 ndefinition tight_apart: ∀A:Type.∀eq,ap:relation A.Prop
39 ≝ λA.λeq,ap.∀x,y:A. (¬(ap x y) → eq x y) ∧
40 (eq x y → ¬(ap x y)).
41
42 ndefinition antisymmetric: ∀A:Type.∀R:relation A.Prop
43 ≝ λA.λR.∀x,y:A. R x y → ¬(R y x).
44
45