Logical Reasoning Principles in AI: Syntax, Entailment and a Worked Resolution Proof
Learn how facts, rules, models and proof procedures fit together in AI knowledge representation. Follow a robot-safety query from truth values to an empty clause.
KnowledgeGate Team
Exam prep & CS education

Memorising logical symbols is not enough if you cannot separate a formula's grammar, its truth under an interpretation, and the inference steps that follow. In the robot-safety proof, R=1 and S=1 force P=0 and M=0 before resolution closes with the empty clause. Logical reasoning for AI knowledge representation differs from aptitude puzzle solving.
Logical reasoning principles in AI: facts, rules and queries
A knowledge base, or KB, is a set of declarative sentences. Representation stores facts and rules, semantics gives those sentences meaning, and inference derives conclusions from them.
The robot example uses four propositional atoms:
R: the robot has powerS: the obstacle sensor is activeP: the path is clearM: the move command is permitted
A query is not accepted merely because it sounds plausible. We ask whether every interpretation that satisfies the KB also satisfies the query. Written KB |= alpha, this means "KB entails alpha".
Propositional logic treats R, S, P, and M as indivisible truth-valued atoms. First-order logic adds named objects, predicates, variables, and quantifiers. Knowledge Representation in Artificial Intelligence: Logic, Semantic Networks, Frames and Rules with Worked Examples compares logic with semantic networks, frames and production rules; the robot case isolates entailment and proof inside logic.
Syntax and semantics: the formula is not its truth value
Syntax tells us how to form sentences. The connectives needed here are negation, not P; conjunction, P and Q; disjunction, P or Q; implication, P -> Q; and biconditional, P <-> Q.
The implication P -> Q is equivalent to not P or Q. Its converse, Q -> P, is a different formula and need not have the same truth value.
Consider S -> not P:
S | P | S -> not P |
|---|---|---|
1 | 1 | 0 |
1 | 0 | 1 |
0 | 1 | 1 |
0 | 0 | 1 |
An implication is false only when its antecedent is true and its consequent is false. For truth tables, quantifier syntax and translation, use Propositional and Predicate Logic: Truth Tables to Proofs. The robot proof applies those tools to separate model-theoretic entailment from syntactic derivation.
A formula is satisfiable if it is true in at least one interpretation, valid if it is true in every interpretation, and contradictory if it is true in none. Semantic entailment preserves truth across all models: if KB |= alpha, every model of the KB is also a model of alpha.
Inference rules: what makes a reasoning step valid
Modus ponens says that from S=1 and S -> not P, we may derive not P, hence P=0. Resolution expresses the same move with clauses: combine S with not S or not P by cancelling the complementary literals S and not S, leaving not P.
Proof and meaning are related but distinct. KB |- alpha means a proof system derives alpha; KB |= alpha means every model of the KB makes alpha true. Soundness says KB |- alpha implies KB |= alpha. Completeness says KB |= alpha implies KB |- alpha for a chosen complete proof system.
The valuation P=0, Q=1 exposes two common invalid patterns. P -> Q and Q are both true, but P is false, so affirming the consequent fails. Similarly, P -> Q and not P are true, but not Q is false, so denying the antecedent fails.
Logical reasoning worked example: prove the robot must not move
Use this exact knowledge base:
C1: RC2: SS -> not P(R and not P) -> not M
We ask two queries: does the KB entail not M, and does it entail M?
First, forward-chain through the rules. From C2: S and S -> not P, derive not P, so P=0. Next combine C1: R, which gives R=1, with not P. The rule (R and not P) -> not M now derives not M, so M=0.
The valuation R=1, S=1, P=0, M=0 satisfies every sentence in the KB, so the KB is consistent. Forward chaining derives not M, and resolution refutation independently proves KB |= not M. The KB does not entail M.

Now convert both rules to clauses:
C3: not S or not PC4: not R or P or not M
To prove not M by resolution refutation, add its negation as C5: M.
Resolve
C2: SwithC3to obtainC6: not P.Resolve
C1: RwithC4to obtainC7: P or not M.Resolve
C6: not PwithC7to obtainC8: not M.Resolve
C5: MwithC8: not Mto obtain the empty clause.
The empty clause proves that KB plus M is contradictory. The contradiction is not in the original KB, which has the satisfying assignment listed above.

First-order logic: objects, predicates and quantified rules
First-order logic can describe individual objects. Let the domain contain R1 and R2, with facts Robot(R1), Charged(R1), and Robot(R2). Add the rule: for every x, (Robot(x) and Charged(x)) -> Ready(x).
Instantiate the rule at x=R1. Both matching facts are present, so derive Ready(R1). At x=R2, Robot(R2) is present but Charged(R2) is absent, so the inference must stop. The KB entails neither Ready(R2) nor not Ready(R2).
This is the open-world principle: missing knowledge is unknown, not automatically false. Universal and existential quantifiers also have different force. In classical logic, not (for every x, Ready(x)) is equivalent to there exists an x such that not Ready(x). Use Inference Mechanisms in First Order Logic: Unification, Chaining, Resolution and Worked Proofs for unification, generalized modus ponens, chaining and quantified resolution; the logical boundary remains syntax, model truth and entailment across every model.
Logical reasoning traps that change the conclusion
Trap | Why it is wrong | Correction |
|---|---|---|
Treating the converse as equivalent | With | Test the converse separately |
Treating unknown as false | The | Keep absent facts unknown |
Confusing satisfiable with valid |
| Compare it with the valid |
Negating a quantifier without switching it |
| Use |
Calling a lucky step sound | A true conclusion can still come from an invalid rule | Check truth preservation in every model |
How exams test logical reasoning principles
Stable question forms include translating a sentence into symbols, evaluating a formula under a supplied truth assignment, deciding whether a query is entailed, and identifying a legal inference or resolution step. Soundness, completeness, and quantifier negation are also common conceptual discriminators.
Use a four-pass routine:
Write an atom glossary.
Rewrite implications.
Record the supplied truth values or clauses.
Test only the requested query.
For the robot example: glossary R,S,P,M; clauses C1-C4; assumed opposite C5=M; empty clause; therefore KB |= not M.
For broader preparation, explore UGC NET CS Exam Preparation. The exact pattern for any exam cycle must come from that cycle's official material.
Logical reasoning principles: the short version and next step
Syntax tells whether a sentence is well formed. Semantics assigns truth. Entailment is a relation between models, and a sound inference procedure preserves truth. The worked KB gives R=1, S=1, P=0, M=0, while resolution reaches the empty clause after assuming M, proving not M.
Test the boundary with two changes. Set S to 0: neither P nor M follows. Then keep S=1 but delete C4: not P still follows, yet not M no longer does. Learners preparing the wider computer-science syllabus can use NTA-UGC-NET Paper - 2 as a structured course option.
Keep learning

Agent Architecture and Program Types in AI: A Worked Warehouse Example and Exam Traps
Separate architecture, program and agent function, then compare four program types through one fully worked warehouse routing problem.

Problem Representation in AI: State Space, Worked Water-Jug Example and Exam Traps
Learn how states, operators, goals and costs turn a verbal task into a search problem. The worked water-jug trace separates valid states from reachable ones.

Foundations and Evolution of AI: Approaches, Timeline and a Worked Rational-Agent Example
Build a connected map of AI foundations, historical shifts and major paradigms, then calculate how a rational agent chooses under uncertainty.

Natural Language Processing Explained: Pipeline, TF-IDF Worked Example and Exam Patterns
Start from raw text, build BoW and TF-IDF vectors, compute cosine similarity, examine ambiguity, and finish with evaluation and exam-style checks.