1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "dama/bishop_set.ma".
19 lemma eq_trans:∀E:bishop_set.∀x,z,y:E.x ≈ y → y ≈ z → x ≈ z ≝
20 λE,x,y,z.eq_trans_ E x z y.
22 notation > "'Eq'≈" non associative with precedence 50
25 interpretation "eq_rew" 'eqrewrite = (eq_trans _ _ _).
27 lemma le_rewl: ∀E:ordered_set.∀z,y,x:E. x ≈ y → x ≤ z → y ≤ z.
28 intros (E z y x Exy Lxz); apply (le_transitive ??? ? Lxz);
29 intro Xyz; apply Exy; right; assumption;
32 lemma le_rewr: ∀E:ordered_set.∀z,y,x:E. x ≈ y → z ≤ x → z ≤ y.
33 intros (E z y x Exy Lxz); apply (le_transitive ??? Lxz);
34 intro Xyz; apply Exy; left; assumption;
37 notation > "'Le'≪" non associative with precedence 50 for @{'lerewritel}.
38 interpretation "le_rewl" 'lerewritel = (le_rewl _ _ _).
39 notation > "'Le'≫" non associative with precedence 50 for @{'lerewriter}.
40 interpretation "le_rewr" 'lerewriter = (le_rewr _ _ _).
42 lemma ap_rewl: ∀A:bishop_set.∀x,z,y:A. x ≈ y → y # z → x # z.
43 intros (A x z y Exy Ayz); cases (bs_cotransitive ???x Ayz); [2:assumption]
44 cases (eq_sym ??? Exy H);
47 lemma ap_rewr: ∀A:bishop_set.∀x,z,y:A. x ≈ y → z # y → z # x.
48 intros (A x z y Exy Azy); apply bs_symmetric; apply (ap_rewl ???? Exy);
49 apply bs_symmetric; assumption;
52 notation > "'Ap'≪" non associative with precedence 50 for @{'aprewritel}.
53 interpretation "ap_rewl" 'aprewritel = (ap_rewl _ _ _).
54 notation > "'Ap'≫" non associative with precedence 50 for @{'aprewriter}.
55 interpretation "ap_rewr" 'aprewriter = (ap_rewr _ _ _).
57 lemma exc_rewl: ∀A:ordered_set.∀x,z,y:A. x ≈ y → y ≰ z → x ≰ z.
58 intros (A x z y Exy Ayz); cases (exc_cotransitive ?? x Ayz); [2:assumption]
59 cases Exy; right; assumption;
62 lemma exc_rewr: ∀A:ordered_set.∀x,z,y:A. x ≈ y → z ≰ y → z ≰ x.
63 intros (A x z y Exy Azy); cases (exc_cotransitive ??x Azy); [assumption]
64 cases (Exy); left; assumption;
67 notation > "'Ex'≪" non associative with precedence 50 for @{'ordered_setrewritel}.
68 interpretation "exc_rewl" 'ordered_setrewritel = (exc_rewl _ _ _).
69 notation > "'Ex'≫" non associative with precedence 50 for @{'ordered_setrewriter}.
70 interpretation "exc_rewr" 'ordered_setrewriter = (exc_rewr _ _ _).
73 lemma lt_rewr: ∀A:ordered_set.∀x,z,y:A. x ≈ y → z < y → z < x.
74 intros (A x y z E H); split; cases H;
75 [apply (Le≫ ? (eq_sym ??? E));|apply (Ap≫ ? E)] assumption;
78 lemma lt_rewl: ∀A:ordered_set.∀x,z,y:A. x ≈ y → y < z → x < z.
79 intros (A x y z E H); split; cases H;
80 [apply (Le≪ ? (eq_sym ??? E));| apply (Ap≪ ? E);] assumption;
83 notation > "'Lt'≪" non associative with precedence 50 for @{'ltrewritel}.
84 interpretation "lt_rewl" 'ltrewritel = (lt_rewl _ _ _).
85 notation > "'Lt'≫" non associative with precedence 50 for @{'ltrewriter}.
86 interpretation "lt_rewr" 'ltrewriter = (lt_rewr _ _ _).