doc-src/TutorialI/Inductive/document/AB.tex
changeset 10512 d34192966cd8
parent 10420 ef006735bee8
child 10520 bb9dfcc87951
equal deleted inserted replaced
10511:efb3428c9879 10512:d34192966cd8
    94 word. We start with 0 and end (at the right end) with 2. Since each move to the
    94 word. We start with 0 and end (at the right end) with 2. Since each move to the
    95 right increases or decreases the difference by 1, we must have passed through
    95 right increases or decreases the difference by 1, we must have passed through
    96 1 on our way from 0 to 2. Formally, we appeal to the following discrete
    96 1 on our way from 0 to 2. Formally, we appeal to the following discrete
    97 intermediate value theorem \isa{nat{\isadigit{0}}{\isacharunderscore}intermed{\isacharunderscore}int{\isacharunderscore}val}
    97 intermediate value theorem \isa{nat{\isadigit{0}}{\isacharunderscore}intermed{\isacharunderscore}int{\isacharunderscore}val}
    98 \begin{isabelle}%
    98 \begin{isabelle}%
    99 \ \ \ \ \ {\isasymlbrakk}{\isasymforall}i{\isachardot}\ i\ {\isacharless}\ n\ {\isasymlongrightarrow}\ abs\ {\isacharparenleft}f\ {\isacharparenleft}i\ {\isacharplus}\ {\isadigit{1}}{\isacharparenright}\ {\isacharminus}\ f\ i{\isacharparenright}\ {\isasymle}\ {\isacharhash}{\isadigit{1}}{\isacharsemicolon}\ f\ {\isadigit{0}}\ {\isasymle}\ k{\isacharsemicolon}\ k\ {\isasymle}\ f\ n{\isasymrbrakk}\isanewline
    99 \ \ \ \ \ {\isasymlbrakk}{\isasymforall}i{\isachardot}\ i\ {\isacharless}\ n\ {\isasymlongrightarrow}\ {\isasymbar}f\ {\isacharparenleft}i\ {\isacharplus}\ {\isadigit{1}}{\isacharparenright}\ {\isacharminus}\ f\ i{\isasymbar}\ {\isasymle}\ {\isacharhash}{\isadigit{1}}{\isacharsemicolon}\ f\ {\isadigit{0}}\ {\isasymle}\ k{\isacharsemicolon}\ k\ {\isasymle}\ f\ n{\isasymrbrakk}\isanewline
   100 \ \ \ \ \ {\isasymLongrightarrow}\ {\isasymexists}i{\isachardot}\ i\ {\isasymle}\ n\ {\isasymand}\ f\ i\ {\isacharequal}\ k%
   100 \ \ \ \ \ {\isasymLongrightarrow}\ {\isasymexists}i{\isachardot}\ i\ {\isasymle}\ n\ {\isasymand}\ f\ i\ {\isacharequal}\ k%
   101 \end{isabelle}
   101 \end{isabelle}
   102 where \isa{f} is of type \isa{nat\ {\isasymRightarrow}\ int}, \isa{int} are the integers,
   102 where \isa{f} is of type \isa{nat\ {\isasymRightarrow}\ int}, \isa{int} are the integers,
   103 \isa{abs} is the absolute value function, and \isa{{\isacharhash}{\isadigit{1}}} is the
   103 \isa{abs} is the absolute value function, and \isa{{\isacharhash}{\isadigit{1}}} is the
   104 integer 1 (see \S\ref{sec:numbers}).
   104 integer 1 (see \S\ref{sec:numbers}).