PGoCareerGoCareer prep tools
LoginSign up
  • Java
  • Python
  • AI
  • React
  • Angular
  • PHP
  • Node.js
  • SQL
  • DSA
  • HTML
  • CSS
  • JS
  • Spring
  • ML
  • MongoDB

AI · Theory

Rules of Inference

← All stacks

Theory

32/215

Rules of Inference

Inference rules let you derive new sentences. Modus ponens: from P and P→Q infer Q. And-elimination, resolution, etc. Sound rules never invent falsehoods from true premises. Complete methods find every entailed sentence (in the fragment they cover).

Board — “If dirt then suck. Dirt is true.” Infer suck. That is modus ponens, not magic.

Output — idea / do / check for Rules of Inference. Fill those three in the viva.

Exam tip

Modus ponens with one AI action.

Example

# Rules of Inference
print("idea :", "Rules of Inference")
print("do   : one tiny example on paper")
print("check: one failure case")

Output: idea / do / check for Rules of Inference. Fill those three in the viva.

Short notes

  • DefModus ponens: P, P→Q ⊢ Q.
  • RuleSound vs complete.

Questions

1

Explain Rules of Inference as if you are teaching a junior — definition, then one example.

2

What does the example print, and what does that prove?

3

What mistake do freshers make with Rules of Inference?

Previous← Propositional LogicNextThe Wumpus world →
P

GoCareerGo

Utilities · Preparation Hub · Resume · CV · Tools — one workspace.

Workspace

DashboardProfilePreparation HubResume builderCV builderCareer planning

PDF Tools

Merge PDFSplit PDFCompress PDFImage to PDFAll toolsJobs

Image & QR

Compress ImageResize ImageQR ScannerQR GeneratorBlogIT interview prep

Company

FAQFeedbackContactPrivacyTermsSitemap

© 2026 GoCareerGo. Keep moving forward.