]> matita.cs.unibo.it Git - helm.git/blob - matita/contribs/dama/dama/constructive_higher_order_relations.ma
tagged 0.5.0-rc1
[helm.git] / matita / contribs / dama / dama / constructive_higher_order_relations.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
16
17 include "constructive_connectives.ma".
18 include "higher_order_defs/relations.ma".
19
20 definition cotransitive ≝
21  λC:Type.λlt:C→C→Type.∀x,y,z:C. lt x y → lt x z ∨ lt z y. 
22
23 definition coreflexive ≝ λC:Type.λlt:C→C→Type. ∀x:C. ¬ (lt x x).
24
25 definition antisymmetric ≝
26  λC:Type.λle:C→C→Type.λeq:C→C→Type.∀x,y:C.le x y → le y x → eq x y.
27
28 definition symmetric ≝
29  λC:Type.λle:C→C→Type.∀x,y:C.le x y → le y x.
30
31 definition transitive ≝
32  λC:Type.λle:C→C→Type.∀x,y,z:C.le x y → le y z → le x z.
33
34 definition associative ≝
35  λC:Type.λop:C→C→C.λeq:C→C→Type.∀x,y,z. eq (op x (op y z)) (op (op x y) z).
36
37 definition commutative ≝
38  λC:Type.λop:C→C→C.λeq:C→C→Type.∀x,y. eq (op x y) (op y x).
39
40 alias id "antisymmetric" = "cic:/matita/higher_order_defs/relations/antisymmetric.con".
41 theorem antisimmetric_to_cotransitive_to_transitive:
42  ∀C:Type.∀le:C→C→Prop. antisymmetric ? le → cotransitive ? le → transitive ? le.  
43 intros (T f Af cT); unfold transitive; intros (x y z fxy fyz);
44 lapply (cT ??z fxy) as H; cases H; [assumption] cases (Af ? ? fyz H1);
45 qed.
46
47 lemma Or_symmetric: symmetric ? Or.
48 unfold; intros (x y H); cases H; [right|left] assumption;
49 qed.
50
51