A portfolio-style AI / Logic Programming exercise implemented in Python using Jupyter Notebook. This exercise demonstrates propositional logic resolution, clause generation, CNF transformation, and equivalence verification using a resolution refutation approach.
This repository is created as a learning and practice exercise to explore AI concepts and logical inference techniques.
This exercise focuses on implementing:
- Propositional logic literals and clauses
- CNF (Conjunctive Normal Form) representation
- Resolution-based theorem proving
- Logical equivalence verification
- Resolution refutation workflow
- Circuit / logical rule verification
The notebook demonstrates how automated reasoning systems can derive contradictions and validate logical equivalence through resolution.
- Custom
Literalclass implementation - Clause generation and formatting utilities
- Resolution algorithm implementation
- Resolution refutation engine
- CNF conversion helpers
- Logical equivalence verification
- Step-by-step reasoning output
- Educational AI reasoning workflow
- Python 3
- Jupyter Notebook
- Artificial Intelligence
- Automated Reasoning
- Knowledge Representation
- Predicate / Propositional Logic
- Resolution Refutation
- CNF Transformations
itertools
AI_Package/
│
├── AI_Package.ipynb # Main notebook containing the exercise
├── README.md # Project documentation
└── requirements.txt # Optional dependenciesThe notebook implements a logic resolution system using the following workflow:
- Create literals and clauses
- Convert logical relationships into CNF
- Apply resolution between clauses
- Generate resolvents iteratively
- Detect contradictions using empty clauses
- Verify logical equivalence
This demonstrates a simplified AI reasoning engine commonly discussed in introductory Artificial Intelligence courses.
git clone https://github.com/your-username/your-repository-name.gitcd your-repository-namepip install notebookjupyter notebookThen open:
AI_Package.ipynbRun all cells to see the logical resolution process and outputs.
Literal("A")
Literal("B", True)clause(lit("A"), lit("B", True))The notebook resolves clauses iteratively to:
- Derive new logical conclusions
- Eliminate complementary literals
- Detect contradictions
- Validate equivalence
This exercise helps in understanding:
- AI knowledge representation
- Logical inference systems
- Automated theorem proving
- Resolution algorithms
- CNF transformations
- Symbolic AI concepts
This type of logic system is conceptually related to:
- Expert systems
- Rule-based AI
- Automated theorem provers
- Logic solvers
- Knowledge-based systems
- AI reasoning engines
Possible extensions for this exercise:
- GUI visualization for resolution trees
- Predicate logic support
- SAT solver integration
- Optimization for large clause sets
- Interactive clause input system
- Graphical proof generation
You can optionally create a requirements.txt file with:
notebookInstall using:
pip install -r requirements.txtgit initgit add .git commit -m "Added AI Package exercise"git remote add origin https://github.com/your-username/your-repository-name.gitgit branch -M main
git push -u origin mainSome good repository naming ideas:
ai-package-exerciselogic-resolution-exerciseai-resolution-refutationpropositional-logic-aisymbolic-ai-exercise
Ramvignesh R, Akilesh S, Sabariesh Karthic
Integrated M.Sc Data Science Student
This repository is created for educational and learning purposes.
You may use or modify the code for practice and academic exploration.
This exercise was created to practice Artificial Intelligence concepts related to logical inference and automated reasoning using Python.