I\'m going through chapter 5 of concrete semantics.
I got some error while working through this toy example proof:
lemma
shows \"¬ ev (Suc 0)\"
The auto-generated proof outline is sometimes just wrong. This is one such case.
The reason why cases
solves your goal here is that it does some pre-simplification of the cases (as documented in §6.5.2 of the Isabelle/Isar reference manual). This is enough to make both cases disappear automatically here, since they are clearly impossible. Your proof state therefore has no proof obligations left, and Isar only allows you to prove things with show
that you still have to prove. That's why you get the error message Failed to refine any pending goal
: There simply are no pending goals.
You can disable the pre-simplification of cases
using the (no_simp)
parameter, i.e.
proof (cases (no_simp))
Note however that cases
does not define the ?case
variable because it does not change the goal. Just use ?thesis
instead.