How can I extract an explicit value for a schematic variable in Isabelle after using it in a proof? For
example, in the following goal, I’m looking to extract a numerical value for ?solution
, e.g. ?solution = 5
:
schematic_goal test:
assumes “x = 3” and “y = 2"
shows “?solution = x + y”
The following proof works, but doesn’t provide a numerical value for ?solution
. Isabelle seems content with ?solution = x + y
without further simplification.
proof -
show “x + y = x + y” using assms by auto
qed
I’ve also experimented with using existentials but didn’t seem to get anywhere with that either. Is this possible to achieve?
In the more general case, if I don’t know the exact form of the answer, how can I force a proof to provide a closed-form solution for an unknown target variable? (And is there an easy way to specify the “closed-form solution” requirement in Isabelle?)
Note that I’m not necessarily asking Isabelle to compute the answer, just enforcing that the proof won’t go through unless an explicit value is either provided or computed.