src/HOL/Lattices.thy
changeset 35301 90e42f9ba4d1
parent 35121 36c0a6dd8c6f
child 35724 178ad68f93ed
equal deleted inserted replaced
35300:ca05ceeeb9ab 35301:90e42f9ba4d1
     6 
     6 
     7 theory Lattices
     7 theory Lattices
     8 imports Orderings Groups
     8 imports Orderings Groups
     9 begin
     9 begin
    10 
    10 
    11 subsection {* Lattices *}
    11 subsection {* Abstract semilattice *}
       
    12 
       
    13 text {*
       
    14   This locales provide a basic structure for interpretation into
       
    15   bigger structures;  extensions require careful thinking, otherwise
       
    16   undesired effects may occur due to interpretation.
       
    17 *}
       
    18 
       
    19 locale semilattice = abel_semigroup +
       
    20   assumes idem [simp]: "f a a = a"
       
    21 begin
       
    22 
       
    23 lemma left_idem [simp]:
       
    24   "f a (f a b) = f a b"
       
    25   by (simp add: assoc [symmetric])
       
    26 
       
    27 end
       
    28 
       
    29 
       
    30 subsection {* Idempotent semigroup *}
       
    31 
       
    32 class ab_semigroup_idem_mult = ab_semigroup_mult +
       
    33   assumes mult_idem: "x * x = x"
       
    34 
       
    35 sublocale ab_semigroup_idem_mult < times!: semilattice times proof
       
    36 qed (fact mult_idem)
       
    37 
       
    38 context ab_semigroup_idem_mult
       
    39 begin
       
    40 
       
    41 lemmas mult_left_idem = times.left_idem
       
    42 
       
    43 end
       
    44 
       
    45 
       
    46 subsection {* Conrete lattices *}
    12 
    47 
    13 notation
    48 notation
    14   less_eq  (infix "\<sqsubseteq>" 50) and
    49   less_eq  (infix "\<sqsubseteq>" 50) and
    15   less  (infix "\<sqsubset>" 50) and
    50   less  (infix "\<sqsubset>" 50) and
    16   top ("\<top>") and
    51   top ("\<top>") and