X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Fdama%2Fvalued_lattice.ma;h=610bf7d359b65650cb84a838a4f3149bbcb973ca;hb=12ebc9483bec78f948de80e7e230c98488890f4d;hp=ca30ddd0fc6df9c5842ecc59df842c6f83afaa35;hpb=af26669a2135c46c06ce20acad017d55e3575fe0;p=helm.git diff --git a/helm/software/matita/dama/valued_lattice.ma b/helm/software/matita/dama/valued_lattice.ma index ca30ddd0f..610bf7d35 100644 --- a/helm/software/matita/dama/valued_lattice.ma +++ b/helm/software/matita/dama/valued_lattice.ma @@ -30,7 +30,7 @@ record vlattice (R : ogroup) : Type ≝ { meet_wins1: ∀x,y. value (join x (meet x y)) ≈ value x; meet_wins2: ∀x,y. value (meet x (join x y)) ≈ value x; 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 y) ≤ value (join x (meet y z)); + 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 y) ≤ value (meet x (join y z)) }. @@ -52,7 +52,7 @@ 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 (eq_trans ?? (μ(z∨y) + μ(z∧y)) ? (modular_mjp ??z y)); apply (plus_cancl ??? (- μ (z ∨ y))); apply (eq_trans ?? ? ? (plus_assoc ????)); apply (eq_trans ?? (0+ μ(z∧y)) ? (opp_inverse ??)); @@ -68,20 +68,22 @@ 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 ?? (μy+ μz + 0) ?? (opp_inverse ??)); apply (eq_trans ?? ? ?? (plus_comm ???)); apply (eq_trans ?? (μy + μz) ?? (eq_sym ??? (zero_neutral ??))); apply eq_reflexive. qed. lemma modularm: ∀R.∀L:vlattice R.∀y,z:L. μ(y∧z) ≈ μy + μz + -μ (y ∨ z). +(* CSC: questa è la causa per cui la hint per cercare i duplicati ci sta 1 mese *) +(* exact modularj; *) intros (R L y z); lapply (modular_mjp ?? y z) as H1; apply (plus_cancl ??? (μ(y ∨ z))); apply (eq_trans ?? ? ? H1); clear H1; apply (eq_trans ????? (plus_comm ???)); -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_assoc ????)); +apply (eq_trans ?? (μy+ μz + 0) ?? (opp_inverse ??)); apply (eq_trans ?? ? ?? (plus_comm ???)); apply (eq_trans ?? (μy + μz) ?? (eq_sym ??? (zero_neutral ??))); apply eq_reflexive. @@ -90,14 +92,37 @@ qed. lemma modularmj: ∀R.∀L:vlattice R.∀x,y,z:L.μ(x∧(y∨z))≈(μx + μ(y ∨ z) + - μ(x∨(y∨z))). intros (R L x y z); 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 ?? (μ(x∨(y∨z))+ μ(x∧(y∨z)) +-μ(x∨(y∨z))) ?? (feq_plusr ???? 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 ?? (- μ(x∨(y∨z))+ μ(x∨(y∨z))+ μ(x∧(y∨z))) ?? (plus_assoc ????)); +apply (eq_trans ?? (0+μ(x∧(y∨z))) ?? (opp_inverse ??)); +apply (eq_trans ?? (μ(x∧(y∨z))) ?? (zero_neutral ??)); +apply eq_reflexive. +qed. + +lemma modularjm: ∀R.∀L:vlattice R.∀x,y,z:L.μ(x∨(y∧z))≈(μx + μ(y ∧ z) + - μ(x∧(y∧z))). +intros (R L x y z); +lapply (modular_mjp ?? x (y ∧ z)) as H1; +apply (eq_trans ?? (μ(x∧(y∧z))+ μ(x∨(y∧z)) +-μ(x∧(y∧z)))); [2: apply feq_plusr; apply (eq_trans ???? (plus_comm ???)); apply H1] clear H1; +apply (eq_trans ?? ? ?? (plus_comm ???)); +apply (eq_trans ?? (- μ(x∧(y∧z))+ μ(x∧(y∧z))+ μ(x∨y∧z)) ?? (plus_assoc ????)); +apply (eq_trans ?? (0+ μ(x∨y∧z)) ?? (opp_inverse ??)); +apply eq_sym; apply 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); +apply (eq_trans ?? ? ? (modularjm ?? x y z)); +apply (eq_trans ?? ( μx+ (μy+ μz+- μ(y∨z)) +- μ(x∧(y∧z))) ?); [ + apply feq_plusr; apply feq_plusl; apply (modularm ?? y z);] +apply (eq_trans ?? (μx+ μy+ μz+- μ(y∨z)+- μ(x∧(y∧z)))); [2: + apply feq_plusl; apply feq_opp; + apply (eq_trans ?? ? ? (meet_assoc ?????)); + apply (eq_trans ?? ? ? (meet_comm ????)); + apply eq_reflexive;] +apply feq_plusr; apply (eq_trans ?? ? ? (plus_assoc ????)); +apply feq_plusr; apply plus_assoc; qed. lemma step1_3_57: ∀R.∀L:vlattice R.∀x,y,z:L. @@ -115,7 +140,59 @@ 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)). +(* LEMMA 3.57 *) + +lemma join_meet_le_join: ∀R.∀L:vlattice R.∀x,y,z:L.μ (x ∨ (y ∧ z)) ≤ μ (x ∨ z). +intros (R L x y z); +apply (le_rewl ??? ? (eq_sym ??? (step1_3_57' ?????))); +apply (le_rewl ??? (μx+ μy+ μz+- μ(y∨z)+ -μ(z∧x∧y))); [ + apply feq_plusl; apply feq_opp; apply (eq_trans ?? ? ?? (eq_sym ??? (meet_assoc ?????))); apply eq_reflexive;] +apply (le_rewl ??? (μx+ μy+ μz+- μ(y∨z)+ (- ( μ(z∧x)+ μy+- μ((z∧x)∨y))))); [ + apply feq_plusl; apply feq_opp; apply eq_sym; apply modularm] +apply (le_rewl ??? (μx+ μy+ μz+- μ(y∨z)+ (- μ(z∧x)+ -μy+-- μ((z∧x)∨y)))); [ + apply feq_plusl; apply (eq_trans ?? (- (μ(z∧x)+ μy) + -- μ((z∧x)∨y))); [ + apply feq_plusr; apply eq_sym; apply eq_opp_plus_plus_opp_opp;] + apply eq_sym; apply eq_opp_plus_plus_opp_opp;] +apply (le_rewl ??? (μx+ μy+ μz+- μ(y∨z)+(- μ(z∧x)+- μy+ μ(y∨(z∧x))))); [ + repeat apply feq_plusl; apply eq_sym; apply (eq_trans ?? (μ((z∧x)∨y)) ? (eq_opp_opp_x_x ??)); + apply join_comm;] +apply (le_rewl ??? (μx+ μy+ μz+- μ(y∨z)+(- μ(z∧x)+- μy)+ μ(y∨(z∧x)))); [ + apply eq_sym; apply plus_assoc;] +apply (le_rewl ??? (μx+ μy+ μz+- μ(y∨z)+(- μy + - μ(z∧x))+ μ(y∨(z∧x)))); [ + repeat apply feq_plusr; repeat apply feq_plusl; apply plus_comm;] +apply (le_rewl ??? (μx+ μy+ μz+- μ(y∨z)+- μy + - μ(z∧x)+ μ(y∨(z∧x)))); [ + repeat apply feq_plusr; apply eq_sym; apply plus_assoc;] +apply (le_rewl ??? (μx+ μy+ μz+- μy + - μ(y∨z)+- μ(z∧x)+ μ(y∨(z∧x)))); [ + repeat apply feq_plusr; apply (eq_trans ?? ? ?? (plus_assoc ????)); + apply (eq_trans ?? ( μx+ μy+ μz+(- μy+- μ(y∨z))) ? (eq_sym ??? (plus_assoc ????))); + apply feq_plusl; apply plus_comm;] +apply (le_rewl ??? (μx+ μy+ -μy+ μz + - μ(y∨z)+- μ(z∧x)+ μ(y∨(z∧x)))); [ + repeat apply feq_plusr; apply (eq_trans ?? ? ?? (plus_assoc ????)); + apply (eq_trans ?? (μx+ μy+( -μy+ μz)) ? (eq_sym ??? (plus_assoc ????))); + apply feq_plusl; apply plus_comm;] +apply (le_rewl ??? (μx+ 0 + μz + - μ(y∨z)+- μ(z∧x)+ μ(y∨(z∧x)))); [ + repeat apply feq_plusr; apply (eq_trans ?? ? ?? (plus_assoc ????)); + apply feq_plusl; apply eq_sym; apply (eq_trans ?? ? ? (plus_comm ???)); + apply opp_inverse; apply eq_reflexive;] +apply (le_rewl ??? (μx+ μz + - μ(y∨z)+- μ(z∧x)+ μ(y∨(z∧x)))); [ + repeat apply feq_plusr; apply (eq_trans ?? ? ?? (plus_comm ???)); + apply eq_sym; apply zero_neutral;] +apply (le_rewl ??? (μz+ μx + - μ(y∨z)+- μ(z∧x)+ μ(y∨(z∧x)))); [ + repeat apply feq_plusr; apply plus_comm;] +apply (le_rewl ??? (μz+ μx +- μ(z∧x)+ - μ(y∨z)+ μ(y∨(z∧x)))); [ + repeat apply feq_plusr; apply (eq_trans ?? ? ?? (plus_assoc ????)); + apply (eq_trans ?? ? ? (eq_sym ??? (plus_assoc ????))); apply feq_plusl; + apply plus_comm;] +apply (le_rewl ??? (μ(z∨x)+ - μ(y∨z)+ μ(y∨(z∧x)))); [ + repeat apply feq_plusr; apply modularj;] +apply (le_rewl ??? (μ(z∨x)+ (- μ(y∨z)+ μ(y∨(z∧x)))) (plus_assoc ????)); +apply (le_rewr ??? (μ(x∨z) + 0)); [apply (eq_trans ?? ? ? (plus_comm ???)); apply zero_neutral] +apply (le_rewr ??? (μ(x∨z) + (-μ(y∨z) + μ(y∨z)))); [ apply feq_plusl; apply opp_inverse] +apply (le_rewr ??? (μ(z∨x) + (-μ(y∨z) + μ(y∨z)))); [ apply feq_plusr; apply join_comm;] +repeat apply fle_plusl; apply join_meet_le; +qed. + +lemma meet_le_meet_join: ∀R.∀L:vlattice R.∀x,y,z:L.μ (x ∧ z) ≤ μ (x ∧ (y ∨ z)). intros (R L x y z); apply (le_rewr ??? ? (eq_sym ??? (step1_3_57 ?????))); apply (le_rewr ??? (μx+ μy+ μz+- μ(y∧z)+ -μ(z∨x∨y))); [