diff -r c09598a97436 -r d8d85a8172b5 src/HOL/Lattices.thy --- a/src/HOL/Lattices.thy Sat Jul 18 21:44:18 2015 +0200 +++ b/src/HOL/Lattices.thy Sat Jul 18 22:58:50 2015 +0200 @@ -2,19 +2,19 @@ Author: Tobias Nipkow *) -section {* Abstract lattices *} +section \Abstract lattices\ theory Lattices imports Groups begin -subsection {* Abstract semilattice *} +subsection \Abstract semilattice\ -text {* +text \ These locales provide a basic structure for interpretation into bigger structures; extensions require careful thinking, otherwise undesired effects may occur due to interpretation. -*} +\ no_notation times (infixl "*" 70) no_notation Groups.one ("1") @@ -73,7 +73,7 @@ by simp then have "a = (a * b) * c" by (simp add: assoc) - with `a = a * b` [symmetric] have "a = a * c" by simp + with \a = a * b\ [symmetric] have "a = a * c" by simp then show "a \ c" by (rule orderI) qed @@ -153,7 +153,7 @@ notation Groups.one ("1") -subsection {* Syntactic infimum and supremum operations *} +subsection \Syntactic infimum and supremum operations\ class inf = fixes inf :: "'a \ 'a \ 'a" (infixl "\" 70) @@ -162,7 +162,7 @@ fixes sup :: "'a \ 'a \ 'a" (infixl "\" 65) -subsection {* Concrete lattices *} +subsection \Concrete lattices\ notation less_eq (infix "\" 50) and @@ -179,7 +179,7 @@ and sup_least: "y \ x \ z \ x \ y \ z \ x" begin -text {* Dual lattice *} +text \Dual lattice\ lemma dual_semilattice: "class.semilattice_inf sup greater_eq greater" @@ -191,7 +191,7 @@ class lattice = semilattice_inf + semilattice_sup -subsubsection {* Intro and elim rules*} +subsubsection \Intro and elim rules\ context semilattice_inf begin @@ -266,7 +266,7 @@ end -subsubsection {* Equational laws *} +subsubsection \Equational laws\ context semilattice_inf begin @@ -373,7 +373,7 @@ lemmas inf_sup_ord = inf_le1 inf_le2 sup_ge1 sup_ge2 -text{* Towards distributivity *} +text\Towards distributivity\ lemma distrib_sup_le: "x \ (y \ z) \ (x \ y) \ (x \ z)" by (auto intro: le_infI1 le_infI2 le_supI1 le_supI2) @@ -381,7 +381,7 @@ lemma distrib_inf_le: "(x \ y) \ (x \ z) \ x \ (y \ z)" by (auto intro: le_infI1 le_infI2 le_supI1 le_supI2) -text{* If you have one of them, you have them all. *} +text\If you have one of them, you have them all.\ lemma distrib_imp1: assumes D: "!!x y z. x \ (y \ z) = (x \ y) \ (x \ z)" @@ -411,7 +411,7 @@ end -subsubsection {* Strict order *} +subsubsection \Strict order\ context semilattice_inf begin @@ -442,7 +442,7 @@ end -subsection {* Distributive lattices *} +subsection \Distributive lattices\ class distrib_lattice = lattice + assumes sup_inf_distrib1: "x \ (y \ z) = (x \ y) \ (x \ z)" @@ -479,7 +479,7 @@ end -subsection {* Bounded lattices and boolean algebras *} +subsection \Bounded lattices and boolean algebras\ class bounded_semilattice_inf_top = semilattice_inf + order_top begin @@ -710,7 +710,7 @@ end -subsection {* @{text "min/max"} as special case of lattice *} +subsection \@{text "min/max"} as special case of lattice\ context linorder begin @@ -788,7 +788,7 @@ by (auto intro: antisym simp add: max_def fun_eq_iff) -subsection {* Uniqueness of inf and sup *} +subsection \Uniqueness of inf and sup\ lemma (in semilattice_inf) inf_unique: fixes f (infixl "\" 70) @@ -815,7 +815,7 @@ qed -subsection {* Lattice on @{typ bool} *} +subsection \Lattice on @{typ bool}\ instantiation bool :: boolean_algebra begin @@ -850,7 +850,7 @@ by auto -subsection {* Lattice on @{typ "_ \ _"} *} +subsection \Lattice on @{typ "_ \ _"}\ instantiation "fun" :: (type, semilattice_sup) semilattice_sup begin @@ -921,7 +921,7 @@ qed (rule ext, simp_all add: inf_compl_bot sup_compl_top diff_eq)+ -subsection {* Lattice on unary and binary predicates *} +subsection \Lattice on unary and binary predicates\ lemma inf1I: "A x \ B x \ (A \ B) x" by (simp add: inf_fun_def) @@ -965,10 +965,10 @@ lemma sup2E: "(A \ B) x y \ (A x y \ P) \ (B x y \ P) \ P" by (simp add: sup_fun_def) iprover -text {* +text \ \medskip Classical introduction rule: no commitment to @{text A} vs @{text B}. -*} +\ lemma sup1CI: "(\ B x \ A x) \ (A \ B) x" by (auto simp add: sup_fun_def)