From 29ba55bc6e228a2f5021b4131075ea3a3ba23458 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Thu, 22 Nov 2007 13:29:20 +0000 Subject: [PATCH] snapshot --- matita/dama/groups.ma | 10 +++---- matita/dama/ordered_groups.ma | 35 ++++++++++++++-------- matita/dama/valued_lattice.ma | 56 ++++++++++++++++++++++++++++++----- 3 files changed, 75 insertions(+), 26 deletions(-) diff --git a/matita/dama/groups.ma b/matita/dama/groups.ma index 0df357af5..f2b4bd01c 100644 --- a/matita/dama/groups.ma +++ b/matita/dama/groups.ma @@ -182,26 +182,26 @@ intros (G x y z H1 H2); apply eq_sym; apply (feq_oppr ??y); [2:apply eq_sym] assumption; qed. -lemma eq_opp: ∀G:abelian_group.∀x,y:G. x ≈ y → -x ≈ -y. +lemma feq_opp: ∀G:abelian_group.∀x,y:G. x ≈ y → -x ≈ -y. intros (G x y H); apply (feq_oppl ??y ? H); apply eq_reflexive; qed. -coercion cic:/matita/groups/eq_opp.con nocomposites. +coercion cic:/matita/groups/feq_opp.con nocomposites. lemma eq_opp_sym: ∀G:abelian_group.∀x,y:G. y ≈ x → -x ≈ -y. -compose eq_opp with eq_sym (H); apply H; assumption; +compose feq_opp with eq_sym (H); apply H; assumption; qed. coercion cic:/matita/groups/eq_opp_sym.con nocomposites. lemma eq_opp_plusr: ∀G:abelian_group.∀x,y,z:G. x ≈ y → -(x + z) ≈ -(y + z). -compose feq_plusr with eq_opp(H); apply H; assumption; +compose feq_plusr with feq_opp(H); apply H; assumption; qed. coercion cic:/matita/groups/eq_opp_plusr.con nocomposites. lemma eq_opp_plusl: ∀G:abelian_group.∀x,y,z:G. x ≈ y → -(z + x) ≈ -(z + y). -compose feq_plusl with eq_opp(H); apply H; assumption; +compose feq_plusl with feq_opp(H); apply H; assumption; qed. coercion cic:/matita/groups/eq_opp_plusl.con nocomposites. diff --git a/matita/dama/ordered_groups.ma b/matita/dama/ordered_groups.ma index d9be248d0..0d13eda04 100644 --- a/matita/dama/ordered_groups.ma +++ b/matita/dama/ordered_groups.ma @@ -32,27 +32,36 @@ qed. coercion cic:/matita/ordered_groups/og_abelian_group.con. -(* CSC: NO! Cosi' e' nel frammento negativo. Devi scriverlo con l'eccedenza! - Tutto il resto del file e' da rigirare nel frammento positivo. -*) record ogroup : Type ≝ { og_carr:> pre_ogroup; exc_canc_plusr: ∀f,g,h:og_carr. f+h ≰ g+h → f ≰ g }. +notation > "'Ex'≪" non associative with precedence 50 for + @{'excedencerewritel}. + +interpretation "exc_rewl" 'excedencerewritel = + (cic:/matita/excedence/exc_rewl.con _ _ _). + +notation > "'Ex'≫" non associative with precedence 50 for + @{'excedencerewriter}. + +interpretation "exc_rewr" 'excedencerewriter = + (cic:/matita/excedence/exc_rewr.con _ _ _). + lemma fexc_plusr: ∀G:ogroup.∀x,y,z:G. x ≰ y → x+z ≰ y + z. intros 5 (G x y z L); apply (exc_canc_plusr ??? (-z)); -apply (exc_rewl ??? (x + (z + -z)) (plus_assoc ????)); -apply (exc_rewl ??? (x + (-z + z)) (plus_comm ??z)); -apply (exc_rewl ??? (x+0) (opp_inverse ??)); -apply (exc_rewl ??? (0+x) (plus_comm ???)); -apply (exc_rewl ??? x (zero_neutral ??)); -apply (exc_rewr ??? (y + (z + -z)) (plus_assoc ????)); -apply (exc_rewr ??? (y + (-z + z)) (plus_comm ??z)); -apply (exc_rewr ??? (y+0) (opp_inverse ??)); -apply (exc_rewr ??? (0+y) (plus_comm ???)); -apply (exc_rewr ??? y (zero_neutral ??) L); +apply (Ex≪ (x + (z + -z)) (plus_assoc ????)); +apply (Ex≪ (x + (-z + z)) (plus_comm ??z)); +apply (Ex≪ (x+0) (opp_inverse ??)); +apply (Ex≪ (0+x) (plus_comm ???)); +apply (Ex≪ x (zero_neutral ??)); +apply (Ex≫ (y + (z + -z)) (plus_assoc ????)); +apply (Ex≫ (y + (-z + z)) (plus_comm ??z)); +apply (Ex≫ (y+0) (opp_inverse ??)); +apply (Ex≫ (0+y) (plus_comm ???)); +apply (Ex≫ y (zero_neutral ??) L); qed. coercion cic:/matita/ordered_groups/fexc_plusr.con nocomposites. diff --git a/matita/dama/valued_lattice.ma b/matita/dama/valued_lattice.ma index 66eb715c9..781b34c07 100644 --- a/matita/dama/valued_lattice.ma +++ b/matita/dama/valued_lattice.ma @@ -29,7 +29,7 @@ record vlattice (R : ogroup) : Type ≝ { meet_assoc: ∀x,y,z. value (meet x (meet y z)) ≈ value (meet (meet x y) z); meet_wins1: ∀x,y. value (join x (meet x y)) ≈ value x; meet_wins2: ∀x,y. value (meet x (join x y)) ≈ value x; - meet_join_plus: ∀x,y. value (join x y) + value (meet x y) ≈ value x + value y; + modular_mjp: ∀x,y. value (join x y) + value (meet x y) ≈ value x + value y; join_meet_le: ∀x,y,z. value (join x (meet y z)) ≤ value (join x y); meet_join_le: ∀x,y,z. value (meet x (join y z)) ≤ value (meet x y) }. @@ -46,18 +46,58 @@ interpretation "lattice value" 'value2 a = (cic:/matita/valued_lattice/value.con notation "\mu" non associative with precedence 80 for @{ 'value }. interpretation "lattice value" 'value = (cic:/matita/valued_lattice/value.con _ _). -lemma foo: ∀R.∀L:vlattice R.∀x,y,z:L. +lemma feq_joinr: ∀R.∀L:vlattice R.∀x,y,z:L. + μ x ≈ μ y → μ (z ∧ x) ≈ μ (z ∧ y) → μ (z ∨ x) ≈ μ (z ∨ y). +intros (R L x y z H H1); +apply (plus_cancr ??? (μ(z∧x))); +apply (eq_trans ?? (μz + μx) ? (modular_mjp ????)); +apply (eq_trans ?? (μz + μy) ? H); clear H; +apply (eq_trans ?? (μ(z∨y) + μ(z∧y))); [1: apply eq_sym; apply modular_mjp] +apply (plus_cancl ??? (- μ (z ∨ y))); +apply (eq_trans ?? ? ? (plus_assoc ????)); +apply (eq_trans ?? (0+ μ(z∧y)) ? (opp_inverse ??)); +apply (eq_trans ?? ? ? (zero_neutral ??)); +apply (eq_trans ?? (- μ(z∨y)+ μ(z∨y)+ μ(z∧x)) ?? (plus_assoc ????)); +apply (eq_trans ?? (0+ μ(z∧x)) ?? (opp_inverse ??)); +apply (eq_trans ?? (μ (z ∧ x)) ?H1 (zero_neutral ??)); +qed. + +lemma step1_3_57: ∀R.∀L:vlattice R.∀x,y,z:L. μ(x ∧ (y ∨ z)) ≈ (μ x) + (μ y) + μ z + -μ (y ∧ z) + -μ (z ∨ (x ∨ y)). intros (R L x y z); -lapply (meet_join_plus ? ? x (y ∨ z)) as H; -lapply (meet_join_plus ? ? y z) as H1; - (*CSC: A questo punto ti servono dei lemmi sui gruppi che non sono ancora - stati dimostrati. E una valanga di passi di riscrittura :-) - *) - +cut (μ(x∧(y∨z))≈(μx + μ(y ∨ z) + - μ(x∨(y∨z)))); [2: + lapply (modular_mjp ?? x (y ∨ z)) as H1; + apply (eq_trans ?? (μ(x∨(y∨z))+ μ(x∧(y∨z)) +-μ(x∨(y∨z))) ?? H1); clear H1; + apply (eq_trans ?? ? ?? (plus_comm ???)); + (* apply (eq_trans ?? (0+μ(x∧(y∧z))) ?? (opp_inverse ??)); ASSERT FALSE *) + apply (eq_trans ?? (- μ(x∨(y∨z))+ μ(x∨(y∨z))+ μ(x∧(y∨z)))); [2: apply eq_sym; apply plus_assoc;] + apply (eq_trans ?? (0+μ(x∧(y∨z)))); [2: apply feq_plusr; apply eq_sym; apply opp_inverse;] + (* apply (eq_trans ?? ? ? (eq_refl ??) (zero_neutral ??)); ASSERT FALSE *) + apply (eq_trans ?? (μ(x∧(y∨z)))); [apply eq_reflexive| apply eq_sym; apply zero_neutral]] +apply (eq_trans ?? ? ? Hcut); clear Hcut; +cut ( μ(y∨z) ≈ μy + μz + -μ (y ∧ z)); [2: + lapply (modular_mjp ?? y z) as H1; + apply (plus_cancr ??? (μ(y ∧ z))); + apply (eq_trans ?? ? ? H1); clear H1; + apply (eq_trans ?? ? ?? (plus_assoc ????)); + apply (eq_trans ?? (μy+ μz + 0)); [2: apply feq_plusl; apply eq_sym; apply opp_inverse] + apply (eq_trans ?? ? ?? (plus_comm ???)); + apply (eq_trans ?? (μy + μz) ?? (eq_sym ??? (zero_neutral ??))); + apply eq_reflexive;] +apply (eq_trans ?? ( μx+ (μy+ μz+- μ(y∧z)) +- μ(x∨(y∨z))) ?); [ + apply feq_plusr; apply feq_plusl; apply Hcut] clear Hcut; +apply (eq_trans ?? (μx+ μy+ μz+- μ(y∧z)+- μ(x∨(y∨z)))); [2: + apply feq_plusl; apply feq_opp; + apply (eq_trans ?? ? ? (join_assoc ?????)); + apply (eq_trans ?? ? ? (join_comm ????)); + apply eq_reflexive;] +apply feq_plusr; apply (eq_trans ?? ? ? (plus_assoc ????)); +apply feq_plusr; apply plus_assoc; +qed. lemma meet_join_le1: ∀R.∀L:vlattice R.∀x,y,z:L.μ (x ∧ z) ≤ μ (x ∧ (y ∨ z)). intros (R L x y z); +apply (le_rewr ??? ? (step1_3_57 ?????)); apply (le_rewr ??? (μ x + μ y + μ z + -μ (y ∧ z) + -μ(z ∨ (x ∨ y))) (foo ?????)); apply (le_rewr ??? (μ x + μ y + μ z + -μ (y ∧ z) + -μ((z ∨ x) ∨ y))); [ apply feq_plusl; apply eq_opp_sym; apply join_assoc;] -- 2.39.2