equal
deleted
inserted
replaced
382 fixes a :: "'a\<Colon>{lattice_ab_group_add, linorder}" |
382 fixes a :: "'a\<Colon>{lattice_ab_group_add, linorder}" |
383 shows "sup a (- a) = (if a < 0 then - a else a)" |
383 shows "sup a (- a) = (if a < 0 then - a else a)" |
384 proof - |
384 proof - |
385 note add_le_cancel_right [of a a "- a", symmetric, simplified] |
385 note add_le_cancel_right [of a a "- a", symmetric, simplified] |
386 moreover note add_le_cancel_right [of "-a" a a, symmetric, simplified] |
386 moreover note add_le_cancel_right [of "-a" a a, symmetric, simplified] |
387 then show ?thesis by (auto simp: sup_max min_max.sup_absorb1 min_max.sup_absorb2) |
387 then show ?thesis by (auto simp: sup_max max.absorb1 max.absorb2) |
388 qed |
388 qed |
389 |
389 |
390 lemma abs_if_lattice: |
390 lemma abs_if_lattice: |
391 fixes a :: "'a\<Colon>{lattice_ab_group_add_abs, linorder}" |
391 fixes a :: "'a\<Colon>{lattice_ab_group_add_abs, linorder}" |
392 shows "\<bar>a\<bar> = (if a < 0 then - a else a)" |
392 shows "\<bar>a\<bar> = (if a < 0 then - a else a)" |