equal
deleted
inserted
replaced
180 end %quote |
180 end %quote |
181 |
181 |
182 text {* |
182 text {* |
183 \noindent Note the occurence of the name @{text mult_nat} |
183 \noindent Note the occurence of the name @{text mult_nat} |
184 in the primrec declaration; by default, the local name of |
184 in the primrec declaration; by default, the local name of |
185 a class operation @{text f} to instantiate on type constructor |
185 a class operation @{text f} to be instantiated on type constructor |
186 @{text \<kappa>} are mangled as @{text f_\<kappa>}. In case of uncertainty, |
186 @{text \<kappa>} is mangled as @{text f_\<kappa>}. In case of uncertainty, |
187 these names may be inspected using the @{command "print_context"} command |
187 these names may be inspected using the @{command "print_context"} command |
188 or the corresponding ProofGeneral button. |
188 or the corresponding ProofGeneral button. |
189 *} |
189 *} |
190 |
190 |
191 subsection {* Lifting and parametric types *} |
191 subsection {* Lifting and parametric types *} |
192 |
192 |
193 text {* |
193 text {* |
194 Overloaded definitions giving on class instantiation |
194 Overloaded definitions given on class instantiation |
195 may include recursion over the syntactic structure of types. |
195 may include recursion over the syntactic structure of types. |
196 As a canonical example, we model product semigroups |
196 As a canonical example, we model product semigroups |
197 using our simple algebra: |
197 using our simple algebra: |
198 *} |
198 *} |
199 |
199 |
210 qed |
210 qed |
211 |
211 |
212 end %quote |
212 end %quote |
213 |
213 |
214 text {* |
214 text {* |
215 \noindent Associativity from product semigroups is |
215 \noindent Associativity of product semigroups is established using |
216 established using |
|
217 the definition of @{text "(\<otimes>)"} on products and the hypothetical |
216 the definition of @{text "(\<otimes>)"} on products and the hypothetical |
218 associativity of the type components; these hypotheses |
217 associativity of the type components; these hypotheses |
219 are facts due to the @{class semigroup} constraints imposed |
218 are facts due to the @{class semigroup} constraints imposed |
220 on the type components by the @{command instance} proposition. |
219 on the type components by the @{command instance} proposition. |
221 Indeed, this pattern often occurs with parametric types |
220 Indeed, this pattern often occurs with parametric types |