Resolution Refutation Calculator online
Propositional logic · Free · No sign-up
Resolution refutation calculator online
Type your premises and the conclusion and get the proof step by step with Robinson's resolution refutation: everything is turned into clauses, the conclusion is negated and resolution is applied systematically until we reach the empty clause □. And if no contradiction is possible, every pair of clauses is exhausted so you can see that the refutation doesn't exist.
Check your argument by resolution refutation
Use the buttons if you can’t type the symbolsWhat is resolution refutation (Robinson's method)?
Resolution refutation consists of applying the resolution rule systematically until you obtain the empty clause. In other words: instead of trying to reach the conclusion, we assume it is false and look for everything to blow up. It is named after John Alan Robinson, who published it in 1965, and it didn't stay on paper: it is still the inference engine behind Prolog (a programming language that reasons with logic).
It is a classic proof by contradiction (reductio ad absurdum): you assume the premises are true and the conclusion is false, and if that leads you to something impossible, the assumption couldn't hold. So the premises being true while the conclusion is false can't happen, and that is exactly what it means for the argument to be valid.
The rule applied at every step is resolution, which corresponds to the tautology:
[(P ∨ Q) ∧ (¬P ∨ R)] → (Q ∨ R)
Complementary literals: the only requirement
A literal is the smallest thing we work with: a variable (P) or a negated variable (¬P). Two literals are complementary when they are the same variable but one appears plain and the other negated. As simple as that:
Pand¬Pare complementary. So areQand¬Q, orSand¬S.Pand¬Qare not: they are different variables, with nothing to do with each other.PandParen't either: both are positive, they don't contradict each other at all.
That is the only permission you need to take a step. If a literal is in one clause and its complement is in another, you can resolve them: you cross out that pair and join everything left on both sides into a single clause. What comes out is called the resolvent.
P ∨ Qhere is P¬P ∨ Rand here its complement, ¬PQ ∨ RResolution of (1) and (2) · the pair P / ¬P cancels outThe variable that cancels out is called the pivot (here, P). And a warning: you cancel only one pair per step, even if you find two. If you cross out two at once the result is no longer correct, and it is the most common mistake in exams.
Why is this step allowed? Look at the example above. P can only be true or false. If it's true, clause (2) forces R to hold. If it's false, clause (1) forces Q to hold. Either way we end up with Q ∨ R: that's why the resolvent is safe.
The three forms the step takes
The mechanism is always the same, but depending on the size of the clauses you combine, the step gets one name or another. There are these three, and no more:
| Rule | Pattern | From… we deduce… | When this one comes up |
|---|---|---|---|
| Resolution | P ∨ Q¬P ∨ RQ ∨ R | From P ∨ Q and ¬P ∨ R we deduce Q ∨ R | When both clauses have several literals. It is the general case, the one in the tautology above. |
| Disjunctive syllogism | P ∨ Q¬PQ | From P ∨ Q and ¬P we deduce Q | When one of the two is a single literal (a unit clause). Since it adds nothing to the resolvent, what happens is that you rule out one option of the disjunction and keep the rest. |
| Resolution (empty clause) | P¬P□ | From P and ¬P we deduce □ | When both are a single literal and they are complementary. Nothing is left on either side: the empty clause comes out and the exercise is over. |
That's why in the calculator's proof you'll see some lines labelled «Resolution» and others «Disjunctive syllogism»: it is exactly the same operation, named after the case it falls into. If you write them all as «resolution» in an exam you're not saying anything false, but using the precise name usually earns marks.
To work this way, the hypotheses and the negated conclusion must be in conjunctive normal form, that is, written as a conjunction of clauses. That's why the first step of the method is always to normalize.
Clauses and the empty clause
You already know what a literal is. Two pieces are missing, and with them you can get to work:
- Clause: a disjunction of a finite number of literals, such as
P ∨ ¬Q ∨ R. Everything joined by «or», nothing else. A clause with a single literal is called a unit clause. - Empty clause (□): the one left with no literals at all. It appears when you resolve two complementary unit clauses, for example
Rand¬R: the pair cancels out and nothing is left on either side.
And why is reaching □ so important? Because a clause reads as «at least one of these literals is true». If none is left, there's no way it can be true: the empty clause is always false. And since every resolvent is a logical consequence of the clauses it comes from, getting □ means the starting set was unsatisfiable: the premises plus the negated conclusion can't all be true at once.
That is exactly what we wanted to prove. That's why the empty clause marks the end of the exercise, and why this method is refutation complete: if the argument is valid, resolution always ends up finding □.
How to solve an exercise step by step
The procedure is always the same and there's no guesswork involved:
Step 1 · Identify the premises and the conclusion
Separate the hypotheses from the thesis. If the exercise gives you a single formula A → B and asks you to prove it is a tautology, the left side acts as the premises and the right side as the conclusion.
Step 2 · Convert the premises to conjunctive normal form
Remove every connective other than ¬, ∨ and ∧ (remember that A → B ≡ ¬A ∨ B), push negations inwards with De Morgan's laws and double negation, and distribute with the distributive law. If you need a refresher, there's the step-by-step CNF converter. Each conjunction is split into independent clauses, which are numbered.
Step 3 · Negate the conclusion and add it as one more hypothesis
This is the step that defines the method. The conclusion is not the goal: it is negated, also converted to CNF, and its clauses go into the same list as the premises' clauses. From here on everything is just clauses, no matter where they came from.
Step 4 · Resolve systematically
Look for two clauses with a complementary literal, cancel it and add the resolvent to the list with its number and the rule applied. If the resolvent is a tautology (it has a variable and its negation at the same time) or a clause you already had, don't even write it down: skip it and move on, because it won't take you anywhere. Repeat with the new clauses until □ appears.
In an exam, what never fails is going in order and trying everything with everything: (1) with (2), with (3), with (4)... until that row is done; then (2) with (3), with (4)... and so on to the last one. The key is the new clauses: as soon as one comes out it joins the list and has to be tried against all the others, including the ones you have already left behind. That is, if while working with (2) you get (7), you try it with (2), where you are, but you also go back and try it with (1). You're done when you've gone through the whole list and no pair gives anything you didn't already have. It's slower, but it's the only way to be sure you haven't missed any.
The calculator does exactly that when the argument is not valid, so the list comes out in the same order you would write it by hand. When there is a refutation it searches differently, starting with the clauses that come from the negated conclusion (the so-called set of support strategy), because that way it finds it sooner; and then it shows you only the steps that lead to □, without the filler.
Step 5 · Read the result
- You reach the empty clause
□: the set is unsatisfiable, so the argument is valid (and if you started from an implication, the formula is a tautology). - You exhaust every possible resolvent without reaching the empty clause
□: the set is satisfiable and the argument is not valid. There is then an assignment that makes the premises true and the conclusion false: the counterexample.
Worked example, step by step
Let’s look at a typical exam exercise:
“Prove that the formula (P → (Q → R)) → ((P → Q) → (P → R)) is a tautology, using the resolution refutation method.”
- Step 1 · We separate hypothesis and conclusion.
The formula is an implication, so the hypothesis isP → (Q → R)and the conclusion is(P → Q) → (P → R). - Step 2 · We convert the hypothesis to conjunctive normal form.
P → (Q → R) ≡ ¬P ∨ (¬Q ∨ R) ≡ ¬P ∨ ¬Q ∨ R. A single clause.(1)¬P ∨ ¬Q ∨ RPremise - Step 3 · We negate the conclusion and convert it to CNF.
¬((P → Q) → (P → R)) ≡ (P → Q) ∧ ¬(P → R) ≡ (¬P ∨ Q) ∧ P ∧ ¬R. Three clauses come out, and they join the list as extra hypotheses.(2)¬P ∨ QNegated conclusion(3)PNegated conclusion(4)¬RNegated conclusion - Step 4 · We resolve until we reach the empty clause.
We start with the clauses that come from the negated conclusion, which is what shortens the proof. In(4)we have¬RandRappears in(1): that's the first pivot.(5)¬P ∨ ¬QDisjunctive syllogism of (1) and (4) · pivot R(6)¬PResolution of (2) and (5) · pivot Q(7)□Resolution of (3) and (6) · pivot P - Step 5 · We read the result.
We have reached the empty clause, so assuming the conclusion false leads to a contradiction: the formula is a tautology.
Notice that step (5) combines a unit clause, (4) ¬R, with a three-literal clause: that's why it gets the specific name disjunctive syllogism, even though the mechanism is exactly the same. You can check it yourself: it is the first example in the calculator.
Resolution refutation, direct resolution and rules of inference
All three methods solve the same kind of exercise, but they aren't interchangeable, and it pays to know which one you're being asked for:
- Resolution refutation (this page): the conclusion is negated and you resolve until
□. It is complete: if the argument is valid, it always comes out. It is the one used in Prolog and in automated theorem provers. - Direct resolution: you also work with clauses, but without negating anything; you derive resolvents until you obtain the conclusion. Easier to read, although sometimes it doesn't get there.
- Rules of inference: modus ponens, modus tollens and the syllogisms are applied to the formulas as they are, without going through CNF. It's what you're asked for when the exercise says «using rules of inference»; you can practise it with the rules of inference calculator.
If an exercise resists you with rules of inference, run it through here: since it is a complete method, resolution refutation will give you the proof anyway.
Related calculators
All logic calculators (index)
The page that brings together every tool on this topic.
Conjunctive Normal Form (CNF) converter
The first step of the method: turn any formula into clauses.
Rules of inference calculator
Modus ponens, modus tollens and syllogisms on the formulas.
Predicate logic calculator
Arguments with quantifiers: instantiation and generalization step by step.
Frequently asked questions
Why do you have to negate the conclusion?
Because the method proves by contradiction. We assume the premises are true and the conclusion is false; if a contradiction follows, that case doesn't exist, and there being no case with true premises and a false conclusion is precisely the definition of a valid argument.
What does the empty clause □ mean?
A clause states that at least one of its literals is true. If it runs out of literals there's no way it can be true, so it is always false. Getting it means the starting set of clauses was unsatisfiable.
What if I never reach the empty clause?
Then the argument is not valid. Since it is a complete method, if the conclusion followed from the premises the empty clause would eventually appear. When that happens, the calculator shows you every clause it managed to derive, down to the last one, so you can check that nothing else comes out.
Can I discard clauses along the way?
Yes, and you should. Repeated resolvents and tautologies (clauses containing a variable and its negation at the same time) are removed, because they are always true and don't bring you closer to the contradiction. Subsumed clauses, those that contain another clause you already have, can also be discarded.
Which symbols can I use?
The ones on the buttons (¬ ∧ ∨ → ↔ ⊕) and their keyboard versions too: ! or ~ for negation, & or /\ for conjunction, \/ for disjunction, -> for implication and <-> for the biconditional. Variables can be any letter (A, B, x, y…) or names like p1, p2.