# HG changeset patch # User haftmann # Date 1164990150 -3600 # Node ID 3d4bfc7f6363fe2a28d6f60df5177ab009f9c46d # Parent dea0914773f7ba6c03fa2b89fd8150d7a353a9c5 some syntax cleanup diff -r dea0914773f7 -r 3d4bfc7f6363 src/HOL/Orderings.thy --- a/src/HOL/Orderings.thy Fri Dec 01 17:22:28 2006 +0100 +++ b/src/HOL/Orderings.thy Fri Dec 01 17:22:30 2006 +0100 @@ -14,16 +14,16 @@ subsection {* Order syntax *} class ord = - fixes less_eq :: "'a \ 'a \ bool" - and less :: "'a \ 'a \ bool" + fixes less_eq :: "'a \ 'a \ bool" (infix "\" 50) + and less :: "'a \ 'a \ bool" (infix "\" 50) begin notation + less_eq ("(_/ \<^loc><= _)" [51, 51] 50) and less_eq ("op \<^loc><=") and - less_eq ("(_/ \<^loc><= _)" [51, 51] 50) and - less ("op \<^loc><") and - less ("(_/ \<^loc>< _)" [51, 51] 50) - + less ("(_/ \<^loc>< _)" [51, 51] 50) and + less ("op \<^loc><") + notation (xsymbols) less_eq ("op \<^loc>\") and less_eq ("(_/ \<^loc>\ _)" [51, 51] 50) @@ -33,23 +33,32 @@ less_eq ("(_/ \<^loc>\ _)" [51, 51] 50) abbreviation (input) - greater (infix "\<^loc>>" 50) where - "x \<^loc>> y \ y \<^loc>< x" + greater_eq ("(_/ \<^loc>>= _)" [51, 51] 50) where + "x \<^loc>>= y \ y \<^loc><= x" abbreviation (input) - greater_eq (infix "\<^loc>>=" 50) where - "x \<^loc>>= y \ y \<^loc><= x" + greater ("(_/ \<^loc>> _)" [51, 51] 50) where + "x \<^loc>> y \ y \<^loc>< x" + +notation + greater_eq ("op \<^loc>>=") and + greater ("op \<^loc>>") notation (xsymbols) - greater_eq (infix "\<^loc>\" 50) + greater_eq ("op \<^loc>\") and + greater_eq ("(_/ \<^loc>\ _)" [51, 51] 50) + +notation (HTML output) + greater_eq ("op \<^loc>\") and + greater_eq ("(_/ \<^loc>\ _)" [51, 51] 50) end notation + less_eq ("(_/ <= _)" [51, 51] 50) and less_eq ("op <=") and - less_eq ("(_/ <= _)" [51, 51] 50) and - less ("op <") and - less ("(_/ < _)" [51, 51] 50) + less ("(_/ < _)" [51, 51] 50) and + less ("op <") notation (xsymbols) less_eq ("op \") and @@ -60,34 +69,41 @@ less_eq ("(_/ \ _)" [51, 51] 50) abbreviation (input) - greater (infix ">" 50) where - "x > y \ y < x" + greater_eq ("(_/ >= _)" [51, 51] 50) where + "x >= y \ y <= x" abbreviation (input) - greater_eq (infix ">=" 50) where - "x >= y \ y <= x" - + greater ("(_/ > _)" [51, 51] 50) where + "x > y \ y < x" + +notation + greater_eq ("op >=") and + greater ("op >") + notation (xsymbols) - greater_eq (infix "\" 50) + greater_eq ("op \") and + greater_eq ("(_/ \ _)" [51, 51] 50) + +notation (HTML output) + greater_eq ("op \") and + greater_eq ("(_/ \ _)" [51, 51] 50) subsection {* Quasiorders (preorders) *} -locale preorder = - fixes less_eq :: "'a \ 'a \ bool" (infixl "\" 50) - fixes less :: "'a \ 'a \ bool" (infixl "\" 50) +locale preorder = ord + assumes refl [iff]: "x \ x" and trans: "x \ y \ y \ z \ x \ z" and less_le: "x \ y \ x \ y \ x \ y" begin abbreviation (input) - greater_eq (infixl "\" 50) where - "x \ y \ y \ x" + greater_eq (infixl "\<^loc>\" 50) where + "x \<^loc>\ y \ y \ x" abbreviation (input) - greater (infixl "\" 50) where - "x \ y \ y \ x" + greater (infixl "\<^loc>>" 50) where + "x \<^loc>> y \ y \ x" text {* Reflexivity. *}