1698 % |
1698 % |
1699 \begin{isamarkuptext}% |
1699 \begin{isamarkuptext}% |
1700 \begin{matharray}{rcl} |
1700 \begin{matharray}{rcl} |
1701 \indexdef{}{method}{cases}\hypertarget{method.cases}{\hyperlink{method.cases}{\mbox{\isa{cases}}}} & : & \isa{method} \\ |
1701 \indexdef{}{method}{cases}\hypertarget{method.cases}{\hyperlink{method.cases}{\mbox{\isa{cases}}}} & : & \isa{method} \\ |
1702 \indexdef{}{method}{induct}\hypertarget{method.induct}{\hyperlink{method.induct}{\mbox{\isa{induct}}}} & : & \isa{method} \\ |
1702 \indexdef{}{method}{induct}\hypertarget{method.induct}{\hyperlink{method.induct}{\mbox{\isa{induct}}}} & : & \isa{method} \\ |
|
1703 \indexdef{}{method}{induction}\hypertarget{method.induction}{\hyperlink{method.induction}{\mbox{\isa{induction}}}} & : & \isa{method} \\ |
1703 \indexdef{}{method}{coinduct}\hypertarget{method.coinduct}{\hyperlink{method.coinduct}{\mbox{\isa{coinduct}}}} & : & \isa{method} \\ |
1704 \indexdef{}{method}{coinduct}\hypertarget{method.coinduct}{\hyperlink{method.coinduct}{\mbox{\isa{coinduct}}}} & : & \isa{method} \\ |
1704 \end{matharray} |
1705 \end{matharray} |
1705 |
1706 |
1706 The \hyperlink{method.cases}{\mbox{\isa{cases}}}, \hyperlink{method.induct}{\mbox{\isa{induct}}}, and \hyperlink{method.coinduct}{\mbox{\isa{coinduct}}} |
1707 The \hyperlink{method.cases}{\mbox{\isa{cases}}}, \hyperlink{method.induct}{\mbox{\isa{induct}}}, \hyperlink{method.induction}{\mbox{\isa{induction}}}, |
|
1708 and \hyperlink{method.coinduct}{\mbox{\isa{coinduct}}} |
1707 methods provide a uniform interface to common proof techniques over |
1709 methods provide a uniform interface to common proof techniques over |
1708 datatypes, inductive predicates (or sets), recursive functions etc. |
1710 datatypes, inductive predicates (or sets), recursive functions etc. |
1709 The corresponding rules may be specified and instantiated in a |
1711 The corresponding rules may be specified and instantiated in a |
1710 casual manner. Furthermore, these methods provide named local |
1712 casual manner. Furthermore, these methods provide named local |
1711 contexts that may be invoked via the \hyperlink{command.case}{\mbox{\isa{\isacommand{case}}}} proof command |
1713 contexts that may be invoked via the \hyperlink{command.case}{\mbox{\isa{\isacommand{case}}}} proof command |
1716 infrastructure in order to be applicable to structure statements |
1718 infrastructure in order to be applicable to structure statements |
1717 (either using explicit meta-level connectives, or including facts |
1719 (either using explicit meta-level connectives, or including facts |
1718 and parameters separately). This avoids cumbersome encoding of |
1720 and parameters separately). This avoids cumbersome encoding of |
1719 ``strengthened'' inductive statements within the object-logic. |
1721 ``strengthened'' inductive statements within the object-logic. |
1720 |
1722 |
|
1723 Method \hyperlink{method.induction}{\mbox{\isa{induction}}} differs from \hyperlink{method.induct}{\mbox{\isa{induct}}} only in |
|
1724 the names of the facts in the local context invoked by the \hyperlink{command.case}{\mbox{\isa{\isacommand{case}}}} |
|
1725 command. |
|
1726 |
1721 \begin{railoutput} |
1727 \begin{railoutput} |
1722 \rail@begin{6}{} |
1728 \rail@begin{6}{} |
1723 \rail@term{\hyperlink{method.cases}{\mbox{\isa{cases}}}}[] |
1729 \rail@term{\hyperlink{method.cases}{\mbox{\isa{cases}}}}[] |
1724 \rail@bar |
1730 \rail@bar |
1725 \rail@nextbar{1} |
1731 \rail@nextbar{1} |
1740 \rail@nextbar{4} |
1746 \rail@nextbar{4} |
1741 \rail@nont{\isa{rule}}[] |
1747 \rail@nont{\isa{rule}}[] |
1742 \rail@endbar |
1748 \rail@endbar |
1743 \rail@end |
1749 \rail@end |
1744 \rail@begin{6}{} |
1750 \rail@begin{6}{} |
|
1751 \rail@bar |
1745 \rail@term{\hyperlink{method.induct}{\mbox{\isa{induct}}}}[] |
1752 \rail@term{\hyperlink{method.induct}{\mbox{\isa{induct}}}}[] |
|
1753 \rail@nextbar{1} |
|
1754 \rail@term{\hyperlink{method.induction}{\mbox{\isa{induction}}}}[] |
|
1755 \rail@endbar |
1746 \rail@bar |
1756 \rail@bar |
1747 \rail@nextbar{1} |
1757 \rail@nextbar{1} |
1748 \rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[] |
1758 \rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[] |
1749 \rail@term{\isa{no{\isaliteral{5F}{\isacharunderscore}}simp}}[] |
1759 \rail@term{\isa{no{\isaliteral{5F}{\isacharunderscore}}simp}}[] |
1750 \rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[] |
1760 \rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[] |
1870 of variables is instantiated. In most situations, only a single |
1880 of variables is instantiated. In most situations, only a single |
1871 term needs to be specified; this refers to the first variable of the |
1881 term needs to be specified; this refers to the first variable of the |
1872 last premise (it is usually the same for all cases). The \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}no{\isaliteral{5F}{\isacharunderscore}}simp{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} option can be used to disable pre-simplification of |
1882 last premise (it is usually the same for all cases). The \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}no{\isaliteral{5F}{\isacharunderscore}}simp{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} option can be used to disable pre-simplification of |
1873 cases (see the description of \hyperlink{method.induct}{\mbox{\isa{induct}}} below for details). |
1883 cases (see the description of \hyperlink{method.induct}{\mbox{\isa{induct}}} below for details). |
1874 |
1884 |
1875 \item \hyperlink{method.induct}{\mbox{\isa{induct}}}~\isa{{\isaliteral{22}{\isachardoublequote}}insts\ R{\isaliteral{22}{\isachardoublequote}}} is analogous to the |
1885 \item \hyperlink{method.induct}{\mbox{\isa{induct}}}~\isa{{\isaliteral{22}{\isachardoublequote}}insts\ R{\isaliteral{22}{\isachardoublequote}}} and |
1876 \hyperlink{method.cases}{\mbox{\isa{cases}}} method, but refers to induction rules, which are |
1886 \hyperlink{method.induction}{\mbox{\isa{induction}}}~\isa{{\isaliteral{22}{\isachardoublequote}}insts\ R{\isaliteral{22}{\isachardoublequote}}} are analogous to the |
|
1887 \hyperlink{method.cases}{\mbox{\isa{cases}}} method, but refer to induction rules, which are |
1877 determined as follows: |
1888 determined as follows: |
1878 |
1889 |
1879 \medskip |
1890 \medskip |
1880 \begin{tabular}{llll} |
1891 \begin{tabular}{llll} |
1881 facts & & arguments & rule \\\hline |
1892 facts & & arguments & rule \\\hline |
1977 the induction hypotheses and conclusion; the original goal context |
1988 the induction hypotheses and conclusion; the original goal context |
1978 is no longer available. Thus local assumptions, fixed parameters |
1989 is no longer available. Thus local assumptions, fixed parameters |
1979 and definitions effectively participate in the inductive rephrasing |
1990 and definitions effectively participate in the inductive rephrasing |
1980 of the original statement. |
1991 of the original statement. |
1981 |
1992 |
1982 In induction proofs, local assumptions introduced by cases are split |
1993 In \hyperlink{method.induct}{\mbox{\isa{induct}}} proofs, local assumptions introduced by cases are split |
1983 into two different kinds: \isa{hyps} stemming from the rule and |
1994 into two different kinds: \isa{hyps} stemming from the rule and |
1984 \isa{prems} from the goal statement. This is reflected in the |
1995 \isa{prems} from the goal statement. This is reflected in the |
1985 extracted cases accordingly, so invoking ``\hyperlink{command.case}{\mbox{\isa{\isacommand{case}}}}~\isa{c}'' will provide separate facts \isa{c{\isaliteral{2E}{\isachardot}}hyps} and \isa{c{\isaliteral{2E}{\isachardot}}prems}, |
1996 extracted cases accordingly, so invoking ``\hyperlink{command.case}{\mbox{\isa{\isacommand{case}}}}~\isa{c}'' will provide separate facts \isa{c{\isaliteral{2E}{\isachardot}}hyps} and \isa{c{\isaliteral{2E}{\isachardot}}prems}, |
1986 as well as fact \isa{c} to hold the all-inclusive list. |
1997 as well as fact \isa{c} to hold the all-inclusive list. |
|
1998 |
|
1999 In \hyperlink{method.induction}{\mbox{\isa{induction}}} proofs, local assumptions introduced by cases are |
|
2000 split into three different kinds: \isa{IH}, the induction hypotheses, |
|
2001 \isa{hyps}, the remaining hypotheses stemming from the rule, and |
|
2002 \isa{prems}, the assumptions from the goal statement. The names are |
|
2003 \isa{c{\isaliteral{2E}{\isachardot}}IH}, \isa{c{\isaliteral{2E}{\isachardot}}hyps} and \isa{c{\isaliteral{2E}{\isachardot}}prems}, as above. |
|
2004 |
1987 |
2005 |
1988 \medskip Facts presented to either method are consumed according to |
2006 \medskip Facts presented to either method are consumed according to |
1989 the number of ``major premises'' of the rule involved, which is |
2007 the number of ``major premises'' of the rule involved, which is |
1990 usually 0 for plain cases and induction rules of datatypes etc.\ and |
2008 usually 0 for plain cases and induction rules of datatypes etc.\ and |
1991 1 for rules of inductive predicates or sets and the like. The |
2009 1 for rules of inductive predicates or sets and the like. The |