Giter VIP home page Giter VIP logo

proposition-logic's Introduction

Propositional Logic Resolution Algorithm

Overview

This Java program implements a form of the resolution algorithm for propositional logic, used in automated theorem proving. The resolution algorithm is a rule of inference for deductive reasoning, allowing for the verification of logical consistency or the proving of statements from given premises.

Key Features

  • Clause Processing: Parses and processes clauses from a given text file.
  • Resolution Algorithm Implementation: Implements the resolution algorithm to resolve pairs of clauses.
  • Automated Theorem Proving: Uses logical resolution to prove target statements or find contradictions in the given set of clauses.

How It Works

The program reads a file containing clauses in propositional logic, with each line in the file representing a clause. It then attempts to resolve these clauses, looking for complementary pairs of literals that lead to contradictions or the proving of a target statement.

Usage

To use this program, compile and run it with Java, providing the command "resolution" followed by the path to the text file containing the clauses: The file should contain clauses formatted as disjunctions of literals, with each clause on a separate line.

File Format

The input file should contain propositional logic clauses, with each line representing a clause. Literals in a clause should be separated by " v ". For example: A v B ~A v C C v ~B

Sample Output

The program outputs the process of resolving clauses and the conclusion it reaches. If it finds a contradiction or successfully proves the target statement, it outputs the result.

Contributing

Contributions to enhance the functionality, improve efficiency, or fix bugs are welcome. Please feel free to fork this repository and submit pull requests.

proposition-logic's People

Contributors

janb1701 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.