Search code examples
coq

Assume the negation of the goal in Coq


I'm trying to prove in Coq the following theorem:

Theorem slot_company:
  forall s x, PPs s x -> exists t, PPs t x /\ s <> t.

My current context and goal are:

1 subgoal
s, x : Entity
Pssx : Ps s x
nFxs : ~ F x s
Sx : Entity
PsSxx : Ps Sx x
FxSx : F x Sx
______________________________________(1/1)
exists t : Entity,
  PPs t x /\ s <> t

I would like to pose the hypothesis that there are no t with PPs t x /\ s <> t. By doing so, I can get that s = Sx, and then get a contradiction (I would have F x s /\ ~ F x s. This way, I will know that the goal is true.

The problem is that I don't know how to do so.


Solution

  • I'm skeptical that proof by contradiction is the way to go here, but it's hard to tell without seeing the definition of those relations.

    Here's one way to do proof by contradiction:

    1. From Coq Require Import Classical.

    2. apply Peirce; intros Hcontra.