Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Idiomatic Proof by Contradiction in Isabelle?

So far I wrote proofs by contradiction in the following style in Isabelle (using a pattern by Jeremy Siek):

lemma "<expression>"
proof -
  {
    assume "¬ <expression>"
    then have False sorry
  }
  then show ?thesis by blast
qed

Is there a way that works without the nested raw proof block { ... }?

like image 437
Christoph Lange Avatar asked May 18 '13 22:05

Christoph Lange


1 Answers

There is the rule ccontr for classical proofs by contradiction:

have "<expression>"
proof (rule ccontr)
  assume "¬ <expression>"
  then show False sorry
qed

It may sometimes help to use by contradiction to prove the last step.

There is also the rule classical (which looks less intuitive):

have "<expression>"
proof (rule classical)
  assume "¬ <expression>"
  then show "<expression>" sorry
qed

For further examples using classical, see $ISABELLE_HOME/src/HOL/Isar_Examples/Drinker.thy

like image 111
Christoph Lange Avatar answered Sep 19 '22 21:09

Christoph Lange