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

Updated 26 Oct 20266 min read

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 power

  • S: the obstacle sensor is active

  • P: the path is clear

  • M: 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: R

  • C2: S

  • S -> 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.

Four-box inference flow for the robot knowledge base, with facts R=1 and S=1 in box 1, rule S -> not P producing P=0 in box 2, rule (R and not P) -> not M producing M=0 in box 3, and a query box stating KB entails not M while KB does not entail M.

Now convert both rules to clauses:

  • C3: not S or not P

  • C4: not R or P or not M

To prove not M by resolution refutation, add its negation as C5: M.

  1. Resolve C2: S with C3 to obtain C6: not P.

  2. Resolve C1: R with C4 to obtain C7: P or not M.

  3. Resolve C6: not P with C7 to obtain C8: not M.

  4. Resolve C5: M with C8: not M to 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.

Resolution tree derives C6 and C7, combines them into C8 = not M, then reaches the empty clause with C5 = M.

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 P=0, Q=1, P -> Q is true but Q -> P is false

Test the converse separately

Treating unknown as false

The R2 facts support neither readiness nor non-readiness

Keep absent facts unknown

Confusing satisfiable with valid

P and Q is true in some interpretations only

Compare it with the valid P or not P

Negating a quantifier without switching it

not forall does not become forall not

Use not forall = exists not

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:

  1. Write an atom glossary.

  2. Rewrite implications.

  3. Record the supplied truth values or clauses.

  4. 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.