#Tautology or Contradiction checker?

1 messages · Page 1 of 1 (latest)

crystal oar
#

I have a code that asks for a user input in an infix logical expression and it converts it into a postfix logical expression and then generates a complete table, however I am confused and I need help as to how am I going to implement a Propositional Logic checker for it, I already have tried to create a function for it, but it doesn't work and I am confused, I need it to check if the truth table from the user input is a Tautology or a Contradiction.

prisma palmBOT
#

This post has been reserved for your question.

Hey @crystal oar! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

crystal oar
#

Here is the code ^

split viper
#

Note that if you are using truth tables for checking tautologies and contradictions, this quickly gets out of hand with many variables

#

There are SAT solving techniques which are more efficient in that regard (what you are doing is (kinda) also called symbolic AI)

crystal oar
#

I kind of don't understand what you are saying, can you explain it more?

split viper
#

there are techniques for doing that more efficiently without truth tables