src/Doc/Prog_Prove/Types_and_funs.thy
changeset 58519 7d85162e8520
parent 58504 5f88c142676d
child 58521 b70e93c05efe
equal deleted inserted replaced
58518:07901e99565c 58519:7d85162e8520
   294 argument,~@{term"[]"}, prevents it from rewriting the conclusion.  
   294 argument,~@{term"[]"}, prevents it from rewriting the conclusion.  
   295 This example suggests a heuristic:
   295 This example suggests a heuristic:
   296 \begin{quote}
   296 \begin{quote}
   297 \emph{Generalize goals for induction by replacing constants by variables.}
   297 \emph{Generalize goals for induction by replacing constants by variables.}
   298 \end{quote}
   298 \end{quote}
   299 Of course one cannot do this na\"{\i}vely: @{prop"itrev xs ys = rev xs"} is
   299 Of course one cannot do this naively: @{prop"itrev xs ys = rev xs"} is
   300 just not true.  The correct generalization is
   300 just not true.  The correct generalization is
   301 *};
   301 *};
   302 (*<*)oops;(*>*)
   302 (*<*)oops;(*>*)
   303 lemma "itrev xs ys = rev xs @ ys"
   303 lemma "itrev xs ys = rev xs @ ys"
   304 (*<*)apply(induction xs, auto)(*>*)
   304 (*<*)apply(induction xs, auto)(*>*)