doc-src/TutorialI/Types/Overloading1.thy
changeset 10396 5ab08609e6c8
parent 10328 bf33cbd76c05
child 10885 90695f46440b
equal deleted inserted replaced
10395:7ef380745743 10396:5ab08609e6c8
    24 
    24 
    25 consts less :: "('a::ordrel) \<Rightarrow> 'a \<Rightarrow> bool"     (infixl "<<"  50)
    25 consts less :: "('a::ordrel) \<Rightarrow> 'a \<Rightarrow> bool"     (infixl "<<"  50)
    26        le   :: "('a::ordrel) \<Rightarrow> 'a \<Rightarrow> bool"     (infixl "<<=" 50)
    26        le   :: "('a::ordrel) \<Rightarrow> 'a \<Rightarrow> bool"     (infixl "<<=" 50)
    27 
    27 
    28 text{*\noindent
    28 text{*\noindent
       
    29 Note that only one occurrence of a type variable in a type needs to be
       
    30 constrained with a class; the constraint is propagated to the other
       
    31 occurrences automatically.
       
    32 
    29 So far there is not a single type of class @{text ordrel}. To breathe life
    33 So far there is not a single type of class @{text ordrel}. To breathe life
    30 into @{text ordrel} we need to declare a type to be an \bfindex{instance} of
    34 into @{text ordrel} we need to declare a type to be an \bfindex{instance} of
    31 @{text ordrel}:
    35 @{text ordrel}:
    32 *}
    36 *}
    33 
    37