-1

Here is the task from the book:

Proving the consistency of Coq with the general excluded middle axiom requires complicated reasoning that cannot be carried out within Coq itself. However, the following theorem implies that it is always safe to assume a decidability axiom (i.e., an instance of excluded middle) for any particular Prop [P]. Why? Because we cannot prove the negation of such an axiom. If we could, we would have both [~ (P / ~P)] and [~ ~ (P / ~P)] (since [P] implies [~ ~ P], by the exercise below), which would be a contradiction. But since we can't, it is safe to add [P / ~P] as an axiom.

As far as I understand the task, I must introduce excluded middle Axiom. But I am not sure that I did it correctly:

Axiom decidability : forall (P:Prop),
    (P \/ ~ P) = True.

(* Theorem double_neg : ∀P : Prop,
       P → ~~P. *)

Theorem excluded_middle_irrefutable: forall (P:Prop),
  ~ ~ (P \/ ~ P).
Proof.
  intros P. apply double_neg.

Now we got (P \/ ~ P), but when I try apply decidability., it gives an error:

Unable to unify "(?M1052 \/ ~ ?M1052) = True" with "P \/ ~ P".

What to do?

user4035
  • 22,508
  • 11
  • 59
  • 94
  • 1
    `rewrite decidability. constructor.` will do, though it's not how you're supposed to solve the task (as pointed out in the answer). – Bubbler May 21 '19 at 23:24
  • @Bubbler constructor tactic is not introduced in the book at this point. How do they suppose me to know it? – user4035 May 22 '19 at 06:52
  • 1
    That `constructor` is there to prove `True`. Since `I` is the constructor of type `True`, `apply I.` does the same job. – Bubbler May 22 '19 at 07:17

1 Answers1

1

The exercise is asking you to prove excluded_middle_irrefutable without assuming any axioms.

Arthur Azevedo De Amorim
  • 23,012
  • 3
  • 33
  • 39
  • In this case why do they say about assuming an axiom: "the following theorem implies that it is always safe to assume a decidability axiom (i.e., an instance of excluded middle) for any particular Prop"? – user4035 May 22 '19 at 06:55
  • 1
    @user4035 Your understanding of cause and effect is reversed. You should first prove `~~(P \/ ~P)` in Coq's logic without introducing the axiom, and *then* it is guaranteed to be safe to use the axiom when proving *other* theorems. (Side remark: For any statement X, if you write `~~X` and prove it, it is equivalent to saying "X is consistent with Coq's logic, so it is safe to add as an axiom.") – Bubbler May 22 '19 at 07:27
  • @Bubbler not "equivalent to saying", right? You cannot prove `~~excluded_middle`, but it is safe to add it as an axiom – Arthur Azevedo De Amorim May 22 '19 at 10:40
  • I guess it should've been "implies" instead of "equivalent". Or should I mention that universal quantifiers should go before double negation? – Bubbler May 22 '19 at 11:35