src/HOL/Library/Lattice_Algebras.thy
changeset 54863 82acc20ded73
parent 54230 b1d955791529
child 56228 0f6dc7512023
equal deleted inserted replaced
54862:c65e5cbdbc97 54863:82acc20ded73
   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)"