705 proof - |
705 proof - |
706 from assms have "- x \<sqsubset> - (- y)" by (simp only: compl_less_compl_iff) |
706 from assms have "- x \<sqsubset> - (- y)" by (simp only: compl_less_compl_iff) |
707 then show ?thesis by simp |
707 then show ?thesis by simp |
708 qed |
708 qed |
709 |
709 |
710 end |
710 lemma sup_cancel_left1: "sup (sup x a) (sup (- x) b) = top" |
711 |
711 by(simp add: inf_sup_aci sup_compl_top) |
|
712 |
|
713 lemma sup_cancel_left2: "sup (sup (- x) a) (sup x b) = top" |
|
714 by(simp add: inf_sup_aci sup_compl_top) |
|
715 |
|
716 lemma inf_cancel_left1: "inf (inf x a) (inf (- x) b) = bot" |
|
717 by(simp add: inf_sup_aci inf_compl_bot) |
|
718 |
|
719 lemma inf_cancel_left2: "inf (inf (- x) a) (inf x b) = bot" |
|
720 by(simp add: inf_sup_aci inf_compl_bot) |
|
721 |
|
722 declare inf_compl_bot [simp] sup_compl_top [simp] |
|
723 |
|
724 lemma sup_compl_top_left1 [simp]: "sup (- x) (sup x y) = top" |
|
725 by(simp add: sup_assoc[symmetric]) |
|
726 |
|
727 lemma sup_compl_top_left2 [simp]: "sup x (sup (- x) y) = top" |
|
728 using sup_compl_top_left1[of "- x" y] by simp |
|
729 |
|
730 lemma inf_compl_bot_left1 [simp]: "inf (- x) (inf x y) = bot" |
|
731 by(simp add: inf_assoc[symmetric]) |
|
732 |
|
733 lemma inf_compl_bot_left2 [simp]: "inf x (inf (- x) y) = bot" |
|
734 using inf_compl_bot_left1[of "- x" y] by simp |
|
735 |
|
736 lemma inf_compl_bot_right [simp]: "inf x (inf y (- x)) = bot" |
|
737 by(subst inf_left_commute) simp |
|
738 |
|
739 end |
|
740 |
|
741 ML_file "Tools/boolean_algebra_cancel.ML" |
|
742 |
|
743 simproc_setup boolean_algebra_cancel_sup ("sup a b::'a::boolean_algebra") = |
|
744 {* fn phi => fn ss => try Boolean_Algebra_Cancel.cancel_sup_conv *} |
|
745 |
|
746 simproc_setup boolean_algebra_cancel_inf ("inf a b::'a::boolean_algebra") = |
|
747 {* fn phi => fn ss => try Boolean_Algebra_Cancel.cancel_inf_conv *} |
712 |
748 |
713 subsection \<open>@{text "min/max"} as special case of lattice\<close> |
749 subsection \<open>@{text "min/max"} as special case of lattice\<close> |
714 |
750 |
715 context linorder |
751 context linorder |
716 begin |
752 begin |