equal
deleted
inserted
replaced
180 \end{center} |
180 \end{center} |
181 \end{figure} |
181 \end{figure} |
182 *} |
182 *} |
183 |
183 |
184 instance monoid < semigroup |
184 instance monoid < semigroup |
185 proof intro_classes |
185 proof |
186 fix x y z :: "'a\<Colon>monoid" |
186 fix x y z :: "'a\<Colon>monoid" |
187 show "x \<odot> y \<odot> z = x \<odot> (y \<odot> z)" |
187 show "x \<odot> y \<odot> z = x \<odot> (y \<odot> z)" |
188 by (rule monoid.assoc) |
188 by (rule monoid.assoc) |
189 qed |
189 qed |
190 |
190 |
191 instance group < monoid |
191 instance group < monoid |
192 proof intro_classes |
192 proof |
193 fix x y z :: "'a\<Colon>group" |
193 fix x y z :: "'a\<Colon>group" |
194 show "x \<odot> y \<odot> z = x \<odot> (y \<odot> z)" |
194 show "x \<odot> y \<odot> z = x \<odot> (y \<odot> z)" |
195 by (rule semigroup.assoc) |
195 by (rule semigroup.assoc) |
196 show "\<unit> \<odot> x = x" |
196 show "\<unit> \<odot> x = x" |
197 by (rule group.left_unit) |
197 by (rule group.left_unit) |
201 |
201 |
202 text {* |
202 text {* |
203 \medskip The $\INSTANCE$ command sets up an appropriate goal that |
203 \medskip The $\INSTANCE$ command sets up an appropriate goal that |
204 represents the class inclusion (or type arity, see |
204 represents the class inclusion (or type arity, see |
205 \secref{sec:inst-arity}) to be proven (see also |
205 \secref{sec:inst-arity}) to be proven (see also |
206 \cite{isabelle-isar-ref}). The @{text intro_classes} proof method |
206 \cite{isabelle-isar-ref}). The initial proof step causes |
207 does back-chaining of class membership statements wrt.\ the hierarchy |
207 back-chaining of class membership statements wrt.\ the hierarchy of |
208 of any classes defined in the current theory; the effect is to reduce |
208 any classes defined in the current theory; the effect is to reduce to |
209 to the initial statement to a number of goals that directly |
209 the initial statement to a number of goals that directly correspond |
210 correspond to any class axioms encountered on the path upwards |
210 to any class axioms encountered on the path upwards through the class |
211 through the class hierarchy. |
211 hierarchy. |
212 *} |
212 *} |
213 |
213 |
214 |
214 |
215 subsection {* Concrete instantiation \label{sec:inst-arity} *} |
215 subsection {* Concrete instantiation \label{sec:inst-arity} *} |
216 |
216 |