]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/contribs/dama/dama/ordered_set.ma
first page of the new dama proof
[helm.git] / helm / software / matita / contribs / dama / dama / ordered_set.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 include "cprop_connectives.ma".
16
17 (* Definition 2.1 *)
18 record ordered_set: Type ≝ {
19   os_carr:> Type;
20   os_excess: os_carr → os_carr → CProp;
21   os_coreflexive: coreflexive ? os_excess;
22   os_cotransitive: cotransitive ? os_excess 
23 }.
24
25 interpretation "Ordered set excess" 'nleq a b = 
26   (cic:/matita/dama/ordered_set/os_excess.con _ a b). 
27
28 (* Definition 2.2 (3) *)
29 definition le ≝ λE:ordered_set.λa,b:E. ¬ (a ≰ b).
30
31 interpretation "Ordered set greater or equal than" 'geq a b = 
32  (cic:/matita/dama/ordered_set/le.con _ b a).
33
34 interpretation "Ordered set less or equal than" 'leq a b = 
35  (cic:/matita/dama/ordered_set/le.con _ a b).
36
37 lemma le_reflexive: ∀E.reflexive ? (le E).
38 unfold reflexive; intros 3 (E x H); apply (os_coreflexive ?? H);
39 qed.
40
41 lemma le_transitive: ∀E.transitive ? (le E).
42 unfold transitive; intros 7 (E x y z H1 H2 H3); cases (os_cotransitive ??? y H3) (H4 H4);
43 [cases (H1 H4)|cases (H2 H4)]
44 qed.
45
46 (* Lemma 2.3 *)
47 lemma exc_le_variance: 
48   ∀O:ordered_set.∀a,b,a',b':O.a ≰ b → a ≤ a' → b' ≤ b → a' ≰ b'.
49 intros (O a b a1 b1 Eab Laa1 Lb1b);
50 cases (os_cotransitive ??? a1 Eab) (H H); [cases (Laa1 H)]
51 cases (os_cotransitive ??? b1 H) (H1 H1); [assumption]
52 cases (Lb1b H1);
53 qed.
54   
55