equal
deleted
inserted
replaced
184 \isa{even.induct} to see why this happens.) We have these subgoals: |
184 \isa{even.induct} to see why this happens.) We have these subgoals: |
185 \begin{isabelle} |
185 \begin{isabelle} |
186 \ 1.\ n\ \isasymin \ even\isanewline |
186 \ 1.\ n\ \isasymin \ even\isanewline |
187 \ 2.\ \isasymAnd na.\ \isasymlbrakk na\ \isasymin \ even;\ n\ \isasymin \ even\isasymrbrakk \ \isasymLongrightarrow \ n\ \isasymin \ even% |
187 \ 2.\ \isasymAnd na.\ \isasymlbrakk na\ \isasymin \ even;\ n\ \isasymin \ even\isasymrbrakk \ \isasymLongrightarrow \ n\ \isasymin \ even% |
188 \end{isabelle} |
188 \end{isabelle} |
189 The first one is hopeless. Rule inductions involving |
189 The first one is hopeless. Rule induction on |
190 non-trivial terms usually fail. How to deal with such situations |
190 a non-variable term discards information, and usually fails. |
|
191 How to deal with such situations |
191 in general is described in {\S}\ref{sec:ind-var-in-prems} below. |
192 in general is described in {\S}\ref{sec:ind-var-in-prems} below. |
192 In the current case the solution is easy because |
193 In the current case the solution is easy because |
193 we have the necessary inverse, subtraction: |
194 we have the necessary inverse, subtraction: |
194 \begin{isabelle} |
195 \begin{isabelle} |
195 \isacommand{lemma}\ even_imp_even_minus_2:\ "n\ \isasymin \ even\ \isasymLongrightarrow \ n-2\ \isasymin \ even"\isanewline |
196 \isacommand{lemma}\ even_imp_even_minus_2:\ "n\ \isasymin \ even\ \isasymLongrightarrow \ n-2\ \isasymin \ even"\isanewline |