#Logic and Truth Tables in ChatGPT (my First Prompt)

28 messages · Page 1 of 1 (latest)

shy steppe
#

It fix's basic truth-table errors. feel free to shrink, edit, fork, or whatever you'd like to do 🙂 just please post new versions expanding on my version in this chat. Feedback is welcome!

Prompt:

Logic-Prompt Version-0.1.2:

I Will be teaching you how to use logic to create solid truth tables. A variable such as "a" can be either T(true) or F(false) in this world because it is considered to be a proposition. You will say either T for true or F for false in the truth tables you provide. Variables can be any letter of the alphabet or any symbol the user gives you that they declare to be a variable. In logic we will have several different "joiners" of variables that create new propositions.

Remember the RULES for:
Conjunction (∧):
Disjunction (∨):
Conditional (⇒):
Biconditional (⇔):
Negation (¬):

RULES EMPHASIZED:
Conditional (⇒): If you have two propositions on both sides of a conditional such as A ⇒ B and A= T and B=F, then (A ⇒ B) = F. if A = T and B = T then (A ⇒ B) = T. If A=F and B = F then (A ⇒ B) = T. If A = F and B = T, then (A ⇒ B) = T.

Negation (¬): If you negate a proposition on one side of any joiner such as ¬A∧B It does NOT EQUAL the opposite of the truth value for A∧B. If you negate both sides such as ¬(A∧B) then it is the opposite of the truth value for A∧B. For example, if A = T and B = T then A∧B = T, however ¬(A∧B) = F. Also in another situation if A = T and B = F then A∧B = F, however (A∧¬B) = T. If you are negating a variable or proposition make sure to make a column for that negation. So for example if you have A∧¬B, Have a column for ¬B as well as for B.

YOU MUST DO THE FOLLOWING FOR THE REST OF THE CHAT:

  • When I say any of these symbols (such as ‘or’) I want you to replace that or with “∨” in the truth table, same goes with the other words and their corresponding symbols.

  • For each new variable, you need to double the rows in the truth table. For instance, if there is variables a,b,c then there must be 8 rows.

marsh lion
#

Hi, can you provide an example of how to use it ?

#

Maybe also a screenshot but that is just a bonus

#

I tried this prompt:

provide an example of boolean algebra using LaTeX and a truth table in markdown. Provide the LaTeX in the format:

$$
[LaTeX code]
$$

shy steppe
#

Sure:

I copy and paste the above prompt into a blank conversation and click enter,

Then after it has responded I say something like "Give me a truth table on this: not a or b implies not c."

#

this is what I was doing

marsh lion
#

what is the RULES EMPHASIZED: part for ?

shy steppe
#

the main thing I was trying for was I wanted to be able to write out a proposition like I was speaking it, and for it to translate it into the symbolic representation then give me a truth table - I had a lot of issues with it not understanding "Implies" and different negations but I found once I specified those with examples in the prompt it worked

#

Those were rules it kept messing up on

#

probably doesn't have to be labeled

shy steppe
marsh lion
shy steppe
marsh lion
#

I had trouble teaching ChatGPT addition. It seemed to do better when I told it to code addition in the coding language "lean" (a coding language for mathematical proof solving) and I made it simulate using the code. Maybe you might also want to try that in boolean algebra but I do not know if it will help.

Here is a possible prompt:

provide code for the boolean operator "implies" in the coding language "lean"

#

and then make it use that code to reply to answers. I do not know if it would help

shy steppe
shy steppe
shy steppe
marsh lion
shy steppe
#

*tested

marsh lion
shy steppe
marsh lion
#

not sure. Normally it should forget.

ebon siren
#

this is hard for my old brain to understand, is there more simple table that dedect logic and irrelavent ?