diff -r dd58f13a8eb4 -r eb85850d3eb7 src/HOL/Algebra/Lattice.thy --- a/src/HOL/Algebra/Lattice.thy Fri Nov 17 02:19:55 2006 +0100 +++ b/src/HOL/Algebra/Lattice.thy Fri Nov 17 02:20:03 2006 +0100 @@ -29,7 +29,7 @@ definition command cannot specialise the types. *} definition (in order_syntax) - less (infixl "\" 50) "x \ y == x \ y & x ~= y" + less (infixl "\" 50) where "x \ y == x \ y & x ~= y" text {* Upper and lower bounds of a set. *} @@ -38,35 +38,35 @@ "Upper A == {u. (ALL x. x \ A \ L --> x \ u)} \ L" definition (in order_syntax) - Lower :: "'a set => 'a set" + Lower :: "'a set => 'a set" where "Lower A == {l. (ALL x. x \ A \ L --> l \ x)} \ L" text {* Least and greatest, as predicate. *} definition (in order_syntax) - least :: "['a, 'a set] => bool" + least :: "['a, 'a set] => bool" where "least l A == A \ L & l \ A & (ALL x : A. l \ x)" definition (in order_syntax) - greatest :: "['a, 'a set] => bool" + greatest :: "['a, 'a set] => bool" where "greatest g A == A \ L & g \ A & (ALL x : A. x \ g)" text {* Supremum and infimum *} definition (in order_syntax) - sup :: "'a set => 'a" ("\_" [90] 90) + sup :: "'a set => 'a" ("\_" [90] 90) where "\A == THE x. least x (Upper A)" definition (in order_syntax) - inf :: "'a set => 'a" ("\_" [90] 90) + inf :: "'a set => 'a" ("\_" [90] 90) where "\A == THE x. greatest x (Lower A)" definition (in order_syntax) - join :: "['a, 'a] => 'a" (infixl "\" 65) + join :: "['a, 'a] => 'a" (infixl "\" 65) where "x \ y == sup {x, y}" definition (in order_syntax) - meet :: "['a, 'a] => 'a" (infixl "\" 70) + meet :: "['a, 'a] => 'a" (infixl "\" 70) where "x \ y == inf {x, y}" locale partial_order = order_syntax + @@ -79,7 +79,7 @@ x \ L; y \ L; z \ L |] ==> x \ z" abbreviation (in partial_order) - less (infixl "\" 50) "less == order_syntax.less le" + less (infixl "\" 50) where "less == order_syntax.less le" abbreviation (in partial_order) Upper where "Upper == order_syntax.Upper L le" abbreviation (in partial_order) @@ -89,13 +89,13 @@ abbreviation (in partial_order) greatest where "greatest == order_syntax.greatest L le" abbreviation (in partial_order) - sup ("\_" [90] 90) "sup == order_syntax.sup L le" + sup ("\_" [90] 90) where "sup == order_syntax.sup L le" abbreviation (in partial_order) - inf ("\_" [90] 90) "inf == order_syntax.inf L le" + inf ("\_" [90] 90) where "inf == order_syntax.inf L le" abbreviation (in partial_order) - join (infixl "\" 65) "join == order_syntax.join L le" + join (infixl "\" 65) where "join == order_syntax.join L le" abbreviation (in partial_order) - meet (infixl "\" 70) "meet == order_syntax.meet L le" + meet (infixl "\" 70) where "meet == order_syntax.meet L le" subsubsection {* Upper *} @@ -207,7 +207,7 @@ "[| x \ L; y \ L |] ==> EX s. order_syntax.greatest L le s (order_syntax.Lower L le {x, y})" abbreviation (in lattice) - less (infixl "\" 50) "less == order_syntax.less le" + less (infixl "\" 50) where "less == order_syntax.less le" abbreviation (in lattice) Upper where "Upper == order_syntax.Upper L le" abbreviation (in lattice) @@ -217,13 +217,13 @@ abbreviation (in lattice) greatest where "greatest == order_syntax.greatest L le" abbreviation (in lattice) - sup ("\_" [90] 90) "sup == order_syntax.sup L le" + sup ("\_" [90] 90) where "sup == order_syntax.sup L le" abbreviation (in lattice) - inf ("\_" [90] 90) "inf == order_syntax.inf L le" + inf ("\_" [90] 90) where "inf == order_syntax.inf L le" abbreviation (in lattice) - join (infixl "\" 65) "join == order_syntax.join L le" + join (infixl "\" 65) where "join == order_syntax.join L le" abbreviation (in lattice) - meet (infixl "\" 70) "meet == order_syntax.meet L le" + meet (infixl "\" 70) where "meet == order_syntax.meet L le" lemma (in order_syntax) least_Upper_above: "[| least s (Upper A); x \ A; A \ L |] ==> x \ s" @@ -690,7 +690,7 @@ assumes total: "[| x \ L; y \ L |] ==> x \ y | y \ x" abbreviation (in total_order) - less (infixl "\" 50) "less == order_syntax.less le" + less (infixl "\" 50) where "less == order_syntax.less le" abbreviation (in total_order) Upper where "Upper == order_syntax.Upper L le" abbreviation (in total_order) @@ -700,13 +700,13 @@ abbreviation (in total_order) greatest where "greatest == order_syntax.greatest L le" abbreviation (in total_order) - sup ("\_" [90] 90) "sup == order_syntax.sup L le" + sup ("\_" [90] 90) where "sup == order_syntax.sup L le" abbreviation (in total_order) - inf ("\_" [90] 90) "inf == order_syntax.inf L le" + inf ("\_" [90] 90) where "inf == order_syntax.inf L le" abbreviation (in total_order) - join (infixl "\" 65) "join == order_syntax.join L le" + join (infixl "\" 65) where "join == order_syntax.join L le" abbreviation (in total_order) - meet (infixl "\" 70) "meet == order_syntax.meet L le" + meet (infixl "\" 70) where "meet == order_syntax.meet L le" text {* Introduction rule: the usual definition of total order *} @@ -768,7 +768,7 @@ "[| A \ L |] ==> EX i. order_syntax.greatest L le i (order_syntax.Lower L le A)" abbreviation (in complete_lattice) - less (infixl "\" 50) "less == order_syntax.less le" + less (infixl "\" 50) where "less == order_syntax.less le" abbreviation (in complete_lattice) Upper where "Upper == order_syntax.Upper L le" abbreviation (in complete_lattice) @@ -778,13 +778,13 @@ abbreviation (in complete_lattice) greatest where "greatest == order_syntax.greatest L le" abbreviation (in complete_lattice) - sup ("\_" [90] 90) "sup == order_syntax.sup L le" + sup ("\_" [90] 90) where "sup == order_syntax.sup L le" abbreviation (in complete_lattice) - inf ("\_" [90] 90) "inf == order_syntax.inf L le" + inf ("\_" [90] 90) where "inf == order_syntax.inf L le" abbreviation (in complete_lattice) - join (infixl "\" 65) "join == order_syntax.join L le" + join (infixl "\" 65) where "join == order_syntax.join L le" abbreviation (in complete_lattice) - meet (infixl "\" 70) "meet == order_syntax.meet L le" + meet (infixl "\" 70) where "meet == order_syntax.meet L le" text {* Introduction rule: the usual definition of complete lattice *} @@ -800,29 +800,29 @@ qed (assumption | rule complete_lattice_axioms.intro)+ definition (in order_syntax) - top ("\") + top ("\") where "\ == sup L" definition (in order_syntax) - bottom ("\") + bottom ("\") where "\ == inf L" abbreviation (in partial_order) - top ("\") "top == order_syntax.top L le" + top ("\") where "top == order_syntax.top L le" abbreviation (in partial_order) - bottom ("\") "bottom == order_syntax.bottom L le" + bottom ("\") where "bottom == order_syntax.bottom L le" abbreviation (in lattice) - top ("\") "top == order_syntax.top L le" + top ("\") where "top == order_syntax.top L le" abbreviation (in lattice) - bottom ("\") "bottom == order_syntax.bottom L le" + bottom ("\") where "bottom == order_syntax.bottom L le" abbreviation (in total_order) - top ("\") "top == order_syntax.top L le" + top ("\") where "top == order_syntax.top L le" abbreviation (in total_order) - bottom ("\") "bottom == order_syntax.bottom L le" + bottom ("\") where "bottom == order_syntax.bottom L le" abbreviation (in complete_lattice) - top ("\") "top == order_syntax.top L le" + top ("\") where "top == order_syntax.top L le" abbreviation (in complete_lattice) - bottom ("\") "bottom == order_syntax.bottom L le" + bottom ("\") where "bottom == order_syntax.bottom L le" lemma (in complete_lattice) supI: