Skip to content

From the input of a premise and a conclusion, this program will build a truth table and determine whether the corresponding biconditional is a tautology. Created by request of Professor Ravikumar (Sonoma State University).

License

Notifications You must be signed in to change notification settings

NaimAyat/Propositional_Logic_Formula_Evaluator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Propositional Logic Formula Evaluator

Purpose

From the input of a premise and a conclusion, this program will build a truth table and determine whether the corresponding biconditional is a tautology.

Usage

Boolean Operators

  • ~ (negation)
  • V (or)
  • ^ (and)
  • -> (implies)
  • <-> (iff)
  • XOR (exclusive or)
  • t (true statement)
  • f (false statement)
  • Parentheses also allowed.

You may use any character not defined above as a variable.

Example Execution

Premise input: p V (q -> z)

Conclusion input: z <-> ~p

Output:

p q z | p V (q -> z) | z <-> ~p
t t t |      t       |    f     Premise does not imply conclusion in this case.
f t t |      t       |    t    
t f t |      t       |    f     Premise does not imply conclusion in this case.
f f t |      t       |    t    
t t f |      t       |    t    
f t f |      f       |    f    
t f f |      t       |    t    
f f f |      t       |    f     Premise does not imply conclusion in this case.

The statement [(p V (q -> z)) -> (z <-> ~p)]
is not a tautology. Invalid cases are labeled.

About

From the input of a premise and a conclusion, this program will build a truth table and determine whether the corresponding biconditional is a tautology. Created by request of Professor Ravikumar (Sonoma State University).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages