Proof by Contradiction - Artificial intelligence
So, both backward chaining andforward chaining have drawbacks. Another approach is to think regarding proving theorems by contradiction. These are so much common in mathematics: mathematicians specify some axioms, and then make an assumption. After some complexes mathematics, they have proven that an axiom is false (or something derived from the axioms which did not involve the assumption is false). As the axioms are irrefutably right, this means that the assumption they made might be false. That is, the assumption is not consistent with the axioms of the theory. To utilize this for a specific theorem which they want to prove is true; they negate the theorem statement and use this as the assumption they are going to display is false. As the negated theorem must be false, their original theorem ought to be true.
We may program our reasoning agents to do just the similar.Therefore, to specify this as a search problem, we need to say that the axioms of our theory and the negation of the theorem we want to prove are the starting search states. Recalling our example in section, to do this, we have to derive the false statement to show inconsistency, that the reason that the False statement becomes our goal. So, if we can deduce the false statement from our axioms, the theorem we were attempting to prove will certainly have been proven. This means that, not only can we use all our rules of inference; we also have goal to aim for.
As an instance, below is the input to the Otter theorem proves for the trivial theorem regarding Socrates being mortal. Otter searches for contradictions by using resolution, hence we notice that the theorem statement that Socrates is mortal is negated byusing the minus sign.
Input:
set(auto). formula_list(usable).
all x (man(x)->mortal(x)). % for all x, if x is man then x is mortal
man(socrates). % Socrates is man
-mortal(socrates). % Socrates is immortal (note: negated)
end_of_list.
Otter has no problem whatsoever proving this theorem, and output is following:
Output:
PROOF
1 [] -man(x)|mortal(x).
2 [] -mortal(socrates).
3 [] man(socrates).
4 [hyper,3,1] mortal(socrates).
5 [binary,4.1,2.1] $F.
Hence proof