266 |
266 |
267 txt{*\noindent |
267 txt{*\noindent |
268 The goal can be split by a special method, \methdx{split}: |
268 The goal can be split by a special method, \methdx{split}: |
269 *} |
269 *} |
270 |
270 |
271 apply(split split_if) |
271 apply(split if_split) |
272 |
272 |
273 txt{*\noindent |
273 txt{*\noindent |
274 @{subgoals[display,indent=0]} |
274 @{subgoals[display,indent=0]} |
275 where \tdx{split_if} is a theorem that expresses splitting of |
275 where \tdx{if_split} is a theorem that expresses splitting of |
276 @{text"if"}s. Because |
276 @{text"if"}s. Because |
277 splitting the @{text"if"}s is usually the right proof strategy, the |
277 splitting the @{text"if"}s is usually the right proof strategy, the |
278 simplifier does it automatically. Try \isacommand{apply}@{text"(simp)"} |
278 simplifier does it automatically. Try \isacommand{apply}@{text"(simp)"} |
279 on the initial goal above. |
279 on the initial goal above. |
280 |
280 |
332 the @{text split} method can be |
332 the @{text split} method can be |
333 helpful in selectively exploring the effects of splitting. |
333 helpful in selectively exploring the effects of splitting. |
334 |
334 |
335 The split rules shown above are intended to affect only the subgoal's |
335 The split rules shown above are intended to affect only the subgoal's |
336 conclusion. If you want to split an @{text"if"} or @{text"case"}-expression |
336 conclusion. If you want to split an @{text"if"} or @{text"case"}-expression |
337 in the assumptions, you have to apply \tdx{split_if_asm} or |
337 in the assumptions, you have to apply \tdx{if_split_asm} or |
338 $t$@{text".split_asm"}: *} |
338 $t$@{text".split_asm"}: *} |
339 |
339 |
340 lemma "if xs = [] then ys \<noteq> [] else ys = [] \<Longrightarrow> xs @ ys \<noteq> []" |
340 lemma "if xs = [] then ys \<noteq> [] else ys = [] \<Longrightarrow> xs @ ys \<noteq> []" |
341 apply(split split_if_asm) |
341 apply(split if_split_asm) |
342 |
342 |
343 txt{*\noindent |
343 txt{*\noindent |
344 Unlike splitting the conclusion, this step creates two |
344 Unlike splitting the conclusion, this step creates two |
345 separate subgoals, which here can be solved by @{text"simp_all"}: |
345 separate subgoals, which here can be solved by @{text"simp_all"}: |
346 @{subgoals[display,indent=0]} |
346 @{subgoals[display,indent=0]} |