268 terms and other types. But when type classes are introduced through axioms, |
268 terms and other types. But when type classes are introduced through axioms, |
269 this may result in some sorts becoming {\em empty\/}: where one cannot exhibit |
269 this may result in some sorts becoming {\em empty\/}: where one cannot exhibit |
270 a type belonging to it because certain axioms are unsatisfiable. |
270 a type belonging to it because certain axioms are unsatisfiable. |
271 |
271 |
272 If a theorem contains a type variable that is constrained by an empty |
272 If a theorem contains a type variable that is constrained by an empty |
273 sort, then that theorem has no instances. It is basically an instance |
273 sort, then that theorem has no instances. It is basically an instance |
274 of {\em ex falso quodlibet}. But what if it is used to prove another |
274 of {\em ex falso quodlibet}. But what if it is used to prove another |
275 theorem that no longer involves that sort? The latter theorem holds |
275 theorem that no longer involves that sort? The latter theorem holds |
276 only if under an additional non-emptiness assumption. |
276 only if under an additional non-emptiness assumption. |
277 |
277 |
278 Therefore, Isabelle's theorems carry around sort hypotheses. The {\tt |
278 Therefore, Isabelle's theorems carry around sort hypotheses. The {\tt |
279 shyps} field is a list of sorts occurring in type variables in the current |
279 shyps} field is a list of sorts occurring in type variables in the current |
280 {\tt prop} and {\tt hyps} fields. It may also includes sorts used in the |
280 {\tt prop} and {\tt hyps} fields. It may also includes sorts used in the |
281 theorem's proof that no longer appear in the {\tt prop} or {\tt hyps} |
281 theorem's proof that no longer appear in the {\tt prop} or {\tt hyps} |
282 fields --- so-called {\em dangling\/} sort constraints. These are the |
282 fields --- so-called {\em dangling\/} sort constraints. These are the |
283 critical ones, asserting non-emptiness of the corresponding sorts. |
283 critical ones, asserting non-emptiness of the corresponding sorts. |
284 |
284 |
285 Isabelle tries to remove extraneous sorts from the {\tt shyps} field whenever |
285 Isabelle tries to remove extraneous sorts from the {\tt shyps} field whenever |
286 non-emptiness can be established by looking at the theorem's signature: from |
286 non-emptiness can be established by looking at the theorem's signature: from |
287 the {\tt arities} information, etc. Because its current implementation is |
287 the {\tt arities} information, etc. Because its current implementation is |
337 of the assumptions of the premises. Formally, the system works with |
337 of the assumptions of the premises. Formally, the system works with |
338 assertions of the form |
338 assertions of the form |
339 \[ \phi \quad [\phi@1,\ldots,\phi@n], \] |
339 \[ \phi \quad [\phi@1,\ldots,\phi@n], \] |
340 where $\phi@1$,~\ldots,~$\phi@n$ are the assumptions. This can be |
340 where $\phi@1$,~\ldots,~$\phi@n$ are the assumptions. This can be |
341 also read as a single conclusion sequent $\phi@1,\ldots,\phi@n \vdash |
341 also read as a single conclusion sequent $\phi@1,\ldots,\phi@n \vdash |
342 \phi$. Do not confuse meta-level assumptions with the object-level |
342 \phi$. Do not confuse meta-level assumptions with the object-level |
343 assumptions in a subgoal, which are represented in the meta-logic |
343 assumptions in a subgoal, which are represented in the meta-logic |
344 using~$\Imp$. |
344 using~$\Imp$. |
345 |
345 |
346 Each theorem has a signature. Certified terms have a signature. When a |
346 Each theorem has a signature. Certified terms have a signature. When a |
347 rule takes several premises and certified terms, it merges the signatures |
347 rule takes several premises and certified terms, it merges the signatures |