Stream: Beginner Questions

Topic: Using rule in isar proofs to setup assumptions


view this post on Zulip Joshua von Mutius (Nov 05 2020 at 11:15):

Is there a way to use rule in an isar proof

proof(rule myrule)
assume "P"
show "Q"
qed

such that one has not to specify P and Q explicitly?

E.g. when using the proof pattern for a proof by contradiction

proof(rule ccontr)
assume "foo"
show "False" ...
qed

I would like something like:

proof(rule ccontr)
assume  ?bot_assm
show "False" ...
qed

where ?bot_assm = "foo" is automatically specified.
At best i would like to also switch out show "False" ... with something like show ?thesis ....

view this post on Zulip Mathias Fleury (Nov 05 2020 at 11:17):

for rule ccontr , you can use\<not> ?thesis

view this post on Zulip Mathias Fleury (Nov 05 2020 at 11:20):

Is goal_cases the tactic you want?

view this post on Zulip Mathias Fleury (Nov 05 2020 at 11:20):

proof(rule ccontr, goal_cases)
case 1
show "?thesis" ...
qed

view this post on Zulip Joshua von Mutius (Nov 05 2020 at 11:25):

Yes that is exactly what i was searching for thank you very much!


Last updated: Dec 21 2024 at 16:20 UTC