equal
deleted
inserted
replaced
1 (*<*)theory Overloading = Overloading1:(*>*) |
1 (*<*)theory Overloading = Overloading1:(*>*) |
2 instance list :: ("term")ordrel |
2 instance list :: (type)ordrel |
3 by intro_classes |
3 by intro_classes |
4 |
4 |
5 text{*\noindent |
5 text{*\noindent |
6 This \isacommand{instance} declaration can be read like the declaration of |
6 This \isacommand{instance} declaration can be read like the declaration of |
7 a function on types. The constructor @{text list} maps types of class @{text |
7 a function on types. The constructor @{text list} maps types of class @{text |
8 term} (all HOL types), to types of class @{text ordrel}; |
8 type} (all HOL types), to types of class @{text ordrel}; |
9 in other words, |
9 in other words, |
10 if @{text"ty :: term"} then @{text"ty list :: ordrel"}. |
10 if @{text"ty :: type"} then @{text"ty list :: ordrel"}. |
11 Of course we should also define the meaning of @{text <<=} and |
11 Of course we should also define the meaning of @{text <<=} and |
12 @{text <<} on lists: |
12 @{text <<} on lists: |
13 *} |
13 *} |
14 |
14 |
15 defs (overloaded) |
15 defs (overloaded) |