doc-src/TutorialI/Misc/document/AdvancedInd.tex
changeset 10242 028f54cd2cc9
parent 10236 7626cb4e1407
child 10281 9554ce1c2e54
equal deleted inserted replaced
10241:e0428c2778f1 10242:028f54cd2cc9
    39 \isa{last} return when applied to \isa{{\isacharbrackleft}{\isacharbrackright}}.
    39 \isa{last} return when applied to \isa{{\isacharbrackleft}{\isacharbrackright}}.
    40 
    40 
    41 The point is that we have violated the above warning. Because the induction
    41 The point is that we have violated the above warning. Because the induction
    42 formula is only the conclusion, the occurrence of \isa{xs} in the premises is
    42 formula is only the conclusion, the occurrence of \isa{xs} in the premises is
    43 not modified by induction. Thus the case that should have been trivial
    43 not modified by induction. Thus the case that should have been trivial
    44 becomes unprovable. Fortunately, the solution is easy:
    44 becomes unprovable. Fortunately, the solution is easy:\footnote{A very similar
       
    45 heuristic applies to rule inductions; see \S\ref{sec:rtc}.}
    45 \begin{quote}
    46 \begin{quote}
    46 \emph{Pull all occurrences of the induction variable into the conclusion
    47 \emph{Pull all occurrences of the induction variable into the conclusion
    47 using \isa{{\isasymlongrightarrow}}.}
    48 using \isa{{\isasymlongrightarrow}}.}
    48 \end{quote}
    49 \end{quote}
    49 This means we should prove%
    50 This means we should prove%
   266 \end{isamarkuptext}%
   267 \end{isamarkuptext}%
   267 \isacommand{theorem}\ nat{\isacharunderscore}less{\isacharunderscore}induct{\isacharcolon}\ {\isachardoublequote}{\isacharparenleft}{\isasymAnd}n{\isacharcolon}{\isacharcolon}nat{\isachardot}\ {\isasymforall}m{\isacharless}n{\isachardot}\ P\ m\ {\isasymLongrightarrow}\ P\ n{\isacharparenright}\ {\isasymLongrightarrow}\ P\ n{\isachardoublequote}\isanewline
   268 \isacommand{theorem}\ nat{\isacharunderscore}less{\isacharunderscore}induct{\isacharcolon}\ {\isachardoublequote}{\isacharparenleft}{\isasymAnd}n{\isacharcolon}{\isacharcolon}nat{\isachardot}\ {\isasymforall}m{\isacharless}n{\isachardot}\ P\ m\ {\isasymLongrightarrow}\ P\ n{\isacharparenright}\ {\isasymLongrightarrow}\ P\ n{\isachardoublequote}\isanewline
   268 \isacommand{by}{\isacharparenleft}insert\ induct{\isacharunderscore}lem{\isacharcomma}\ blast{\isacharparenright}%
   269 \isacommand{by}{\isacharparenleft}insert\ induct{\isacharunderscore}lem{\isacharcomma}\ blast{\isacharparenright}%
   269 \begin{isamarkuptext}%
   270 \begin{isamarkuptext}%
   270 Finally we should mention that HOL already provides the mother of all
   271 Finally we should mention that HOL already provides the mother of all
   271 inductions, \textbf{wellfounded
   272 inductions, \textbf{well-founded
   272 induction}\indexbold{induction!wellfounded}\index{wellfounded
   273 induction}\indexbold{induction!well-founded}\index{well-founded
   273 induction|see{induction, wellfounded}} (\isa{wf{\isacharunderscore}induct}):
   274 induction|see{induction, well-founded}} (\isa{wf{\isacharunderscore}induct}):
   274 \begin{isabelle}%
   275 \begin{isabelle}%
   275 \ \ \ \ \ {\isasymlbrakk}wf\ r{\isacharsemicolon}\ {\isasymAnd}x{\isachardot}\ {\isasymforall}y{\isachardot}\ {\isacharparenleft}y{\isacharcomma}\ x{\isacharparenright}\ {\isasymin}\ r\ {\isasymlongrightarrow}\ P\ y\ {\isasymLongrightarrow}\ P\ x{\isasymrbrakk}\ {\isasymLongrightarrow}\ P\ a%
   276 \ \ \ \ \ {\isasymlbrakk}wf\ r{\isacharsemicolon}\ {\isasymAnd}x{\isachardot}\ {\isasymforall}y{\isachardot}\ {\isacharparenleft}y{\isacharcomma}\ x{\isacharparenright}\ {\isasymin}\ r\ {\isasymlongrightarrow}\ P\ y\ {\isasymLongrightarrow}\ P\ x{\isasymrbrakk}\ {\isasymLongrightarrow}\ P\ a%
   276 \end{isabelle}
   277 \end{isabelle}
   277 where \isa{wf\ r} means that the relation \isa{r} is wellfounded
   278 where \isa{wf\ r} means that the relation \isa{r} is well-founded
   278 (see \S\ref{sec:wellfounded}).
   279 (see \S\ref{sec:well-founded}).
   279 For example, theorem \isa{nat{\isacharunderscore}less{\isacharunderscore}induct} can be viewed (and
   280 For example, theorem \isa{nat{\isacharunderscore}less{\isacharunderscore}induct} can be viewed (and
   280 derived) as a special case of \isa{wf{\isacharunderscore}induct} where 
   281 derived) as a special case of \isa{wf{\isacharunderscore}induct} where 
   281 \isa{r} is \isa{{\isacharless}} on \isa{nat}. The details can be found in the HOL library.
   282 \isa{r} is \isa{{\isacharless}} on \isa{nat}. The details can be found in the HOL library.
   282 For a mathematical account of wellfounded induction see, for example, \cite{Baader-Nipkow}.%
   283 For a mathematical account of well-founded induction see, for example, \cite{Baader-Nipkow}.%
   283 \end{isamarkuptext}%
   284 \end{isamarkuptext}%
   284 \end{isabellebody}%
   285 \end{isabellebody}%
   285 %%% Local Variables:
   286 %%% Local Variables:
   286 %%% mode: latex
   287 %%% mode: latex
   287 %%% TeX-master: "root"
   288 %%% TeX-master: "root"