Skip to content

RamvignesH-R/Circuit-Verification-Using-Resolution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

AI Package Exercise

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.


Overview

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.


Features

  • Custom Literal class 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

Tech Stack

Language

  • Python 3

Environment

  • Jupyter Notebook

Concepts Used

  • Artificial Intelligence
  • Automated Reasoning
  • Knowledge Representation
  • Predicate / Propositional Logic
  • Resolution Refutation
  • CNF Transformations

Python Modules

  • itertools

Repository Structure

AI_Package/
│
├── AI_Package.ipynb      # Main notebook containing the exercise
├── README.md             # Project documentation
└── requirements.txt      # Optional dependencies

How It Works

The notebook implements a logic resolution system using the following workflow:

  1. Create literals and clauses
  2. Convert logical relationships into CNF
  3. Apply resolution between clauses
  4. Generate resolvents iteratively
  5. Detect contradictions using empty clauses
  6. Verify logical equivalence

This demonstrates a simplified AI reasoning engine commonly discussed in introductory Artificial Intelligence courses.


Installation

1. Clone the Repository

git clone https://github.com/your-username/your-repository-name.git

2. Navigate to the Folder

cd your-repository-name

3. Install Dependencies

pip install notebook

Running the Exercise

Start Jupyter Notebook

jupyter notebook

Then open:

AI_Package.ipynb

Run all cells to see the logical resolution process and outputs.


Example Concepts Demonstrated

Literal Representation

Literal("A")
Literal("B", True)

Clause Representation

clause(lit("A"), lit("B", True))

Resolution Process

The notebook resolves clauses iteratively to:

  • Derive new logical conclusions
  • Eliminate complementary literals
  • Detect contradictions
  • Validate equivalence

Learning Outcomes

This exercise helps in understanding:

  • AI knowledge representation
  • Logical inference systems
  • Automated theorem proving
  • Resolution algorithms
  • CNF transformations
  • Symbolic AI concepts

Use Cases

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

Future Improvements

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

Requirements

You can optionally create a requirements.txt file with:

notebook

Install using:

pip install -r requirements.txt

GitHub Setup Guide

Initialize Git

git init

Add Files

git add .

Commit Changes

git commit -m "Added AI Package exercise"

Add Remote Repository

git remote add origin https://github.com/your-username/your-repository-name.git

Push to GitHub

git branch -M main
git push -u origin main

Suggested Repository Name

Some good repository naming ideas:

  • ai-package-exercise
  • logic-resolution-exercise
  • ai-resolution-refutation
  • propositional-logic-ai
  • symbolic-ai-exercise

Author

Ramvignesh R, Akilesh S, Sabariesh Karthic

Integrated M.Sc Data Science Student


License

This repository is created for educational and learning purposes.

You may use or modify the code for practice and academic exploration.


Acknowledgement

This exercise was created to practice Artificial Intelligence concepts related to logical inference and automated reasoning using Python.

About

An Artificial Intelligence exercise implementing propositional logic resolution and CNF-based reasoning using Python. The notebook demonstrates automated theorem proving, logical equivalence verification, and resolution refutation concepts in a practical learning-oriented workflow.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors