• Welcome to the new Internet Infidels Discussion Board, formerly Talk Freethought.

Applying Symbolic Logic

steve_bank

Diabetic retinopathy and poor eyesight. Typos ...
Joined
Nov 9, 2017
Messages
13,830
Location
seattle
Basic Beliefs
secular-skeptic
Somebody was always asking how logic is applied. I know a form of symbolic logic from electronics, Bollean Algebra.

I am not an expert in mathematical logic and formal logic under philosophy/

https://en.wikipedia.org/wiki/List_of_logic_symbols

There are several basic logic functions that can be applied to arguments, there are different symbol sets.

Basic syllogisms tend to be AND OR and NOT.

AND, OR, NOT(inversion)

AND &
a & b = c

a b c
T F F
F T F
T T T

P1 Cats meow
P2 Cats purr
P3 Casper purrs and meows
C Casper is a cat

(P1 & P2) & (P3) = C

Truth Table
p1 p2 p3 c
F F F F
F F T F
F T F F
F T T F
T F F F
T F T F
T T F F
T T T T
F T F F

OR ||
a || b = c

a b c
F F F
F T T
T F T
T T T

If it rains or snows the it will be cloudy

a b c
f f f
f t t
t f t
t t t

NOT negation !
a = !b

a = {all cats}
b = !a
b is not a cat

EXCLUSIVE OR mutual exclusion one or the other but not both , can't do the symbol
a XOR b = C
a b c
F F F
F T T
T F T
T T F

Joe is Greek or he is over 6 feet tall but not both.

Complex text arguments can be reduced to symbolic logic. The truth table mapping the input variables true and false sates determines if the argument is true. Truth tables can be generated by a computer alhorithm. Done routinely in electroics simulators.
 
steve bank said:
P1 Cats meow
P2 Cats purr
P3 Casper purrs and meows
C Casper is a cat
That argument is invalid.
Consider the following variant:

P1': Lions roar.
P2': Lions grunt.
P3': Felix roars and grunt.
C': Felix is a lion.

Yet, as it turns out, Felix is not a lion, but a tiger. The premises are true, but the conclusion is false, so the argument is not valid.

steve bank said:
(P1 & P2) & (P3) = C
I don't know what you are trying to say here, but "=" is not the right symbol. Rather, you should use whatever symbol you use for "then", let's say "->"

steve bank said:
Truth Table
p1 p2 p3 c
F F F F
F F T F
F T F F
F T T F
T F F F
T F T F
T T F F
T T T T
F T F F
I don't know how you are trying to use truth tables. How is c specified in terms of p1, p2, p3?
 
P1 Cats meow
P2 Cats purr
P3 Casper purrs and meows
C Casper is a cat

(P1 & P2) & (P3) = C

If "C" is meant to be the conjunction P1 & P2 & P3, then it can't possibly be "Casper is a cat"!

Instead C should be "Cats meow and Cats purr and Casper purrs and meows".

This does suggest that Casper is plausibly a cat but not that Casper is necessarily a cat.

So, it's not deductive logic, or at least not assertoric deductive logic.

The valid conclusion would be: For all we know by assuming the premises true, Casper is possibly a cat. Which isn't much.

Truth Table
p1 p2 p3 c
F F F F
F F T F
F T F F
F T T F
T F F F
T F T F
T T F F
T T T T
F T F F

The last line is both out of the blue and from left field.

I hope you didn't kill anyone with you're "electronics". :eek:
EB
 
That argument is invalid.
Consider the following variant:

P1': Lions roar.
P2': Lions grunt.
P3': Felix roars and grunt.
C': Felix is a lion.

Yet, as it turns out, Felix is not a lion, but a tiger. The premises are true, but the conclusion is false, so the argument is not valid.


I don't know what you are trying to say here, but "=" is not the right symbol. Rather, you should use whatever symbol you use for "then", let's say "->"

steve bank said:
Truth Table
p1 p2 p3 c
F F F F
F F T F
F T F F
F T T F
T F F F
T F T F
T T F F
T T T T
F T F F
I don't know how you are trying to use truth tables. How is c specified in terms of p1, p2, p3?

Then you do not understand logic. The logic wen all use informally like and, or, not have associated truth tables. Valid logic is cold and beyond dispute.

If a = b and b = c then a = c is va;id logic, conclusion follows from the premises. A valid logic does not neccesarily have any relation to reality.

P1': Lions roar.
P2': Lions grunt.
P3': Felix roars and grunt.
C': Felix is a lion.

The abive is valid in that concludion follows from premis. It is logic and says nothing other than a conclusion given premise.

There may be lions that do not roar. One can debate the sounds of a tiger vs lion. Validity is given truth of premise conclusion follows. As the computer programming saying goes, garbage in garbage out. GIGO.

P1 gazzos fatzwoos
P2 gazzos hitzbars
P3 dosant fatzwoos and hitzbars
C gozzant is a gzzzos.

P1 a
p2 b
P3 d = b & a
C if d then ....

Here d us a logical variable which can be eater true or false.

AND & truth table
a b d
f f f
f t f
t f f
t t t

A simple trivial example. If a b are both true then

P1': Lions roar.
P2': Lions do not roar.
P3': Felix roars and does not roar.
C': Felix is a lion.

P1 a
P2 b = !a ! not negation inversion
P3 d = a & !a
a !a d
f t f
t f f

P3 is always false hence the argument fails

The idea is to replce subarguments within the larger argument with symbols and the apply the rules of logic.

Digital electronics Boolean Algebra is symbolic logic.

If motor+stops & current_is_high then stall is true

Two electric signals given a name. Verbal to logic equation

stall = motor_stall AND current_is_high
c = a & b
 
How would you formally evaluate the following using formal symbolic logic to acces validity

If it is raining or snowing and my car is outside and it is not in the garage the seats will get wet if the top is open. If the top is up the seats will not get wet regardless if it is raining or snowing. If the car is in the garage the seats will not get wet regardless if the top is up or down.

If it is raining or snowing and my car is outside and it is not in the garage the seats will not get wet if the top is open. If the top is up the seats will not get wet regardless if it is raining or snowing. If the car is in the garage the seats will get wet regardless if the top is up or down.
 
If it is raining or snowing and my car is outside and it is not in the garage the seats will get wet if the top is open. If the top is up the seats will not get wet regardless if it is raining or snowing. If the car is in the garage the seats will not get wet regardless if the top is up or down.

"seats will get wet" = ("raining" OR "snowing") AND "top is open" AND NOT "car in garage"

The challenge is doing it with only NAND operators, so you only have to use one type of gate in your circuit.
 
steve bank said:
Then you do not understand logic. The logic wen all use informally like and, or, not have associated truth tables. Valid logic is cold and beyond dispute.
I do understand logic. I also understand that you are making logical mistakes. The fact that you do not explain how you are assigning values to those truth tables makes it difficult to pinpoint what sort of error you are making.


steve bank said:
If a = b and b = c then a = c is va;id logic, conclusion follows from the premises. A valid logic does not neccesarily have any relation to reality.
Sure.

steve bank said:
P1': Lions roar.
P2': Lions grunt.
P3': Felix roars and grunt.
C': Felix is a lion.

The abive is valid in that concludion follows from premis. It is logic and says nothing other than a conclusion given premise.
No, that is not valid. I already proved that it is not valid by explaining that Felix is a tiger, who roars and grunts, while assuming that P1' and P2' are true. In reality, lions normally roar and grunt but not always. However, for the sake of the counterexample, we may assume otherwise.

steve bank said:
There may be lions that do not roar. One can debate the sounds of a tiger vs lion. Validity is given truth of premise conclusion follows. As the computer programming saying goes, garbage in garbage out. GIGO.
That is not relevant. We may assume for the sake of the argument that lions roar and grunt. Alternatively, define

zion:= a lion that roars and grunts.

P1'': Zions roar.
P2'': Zions grunt.
P3'': Felix roars and grunts.
C'': Felix is a zion.

Now P1'' is true (no assumption needed), P2'' is true (no assumption needed), P3'' is assumed to be true (but we can pick any actual tiger that roars and grunts if you like), and the conclusion is still false: Felix is not a zion, because he is not a lion.

steve bank said:
A simple trivial example. If a b are both true then

P1': Lions roar.
P2': Lions do not roar.
P3': Felix roars and does not roar.
C': Felix is a lion.
That one is valid, because it has contradictory premises, and all arguments with contradictory premises are valid.


steve bank said:
P1 a
P2 b = !a ! not negation inversion
P3 d = a & !a
a !a d
f t f
t f f

P3 is always false hence the argument fails
P3 is not a&¬a, because "lions roar" is not the same as "Felix roars", but regardless, it is true that P3 is always false, and thus the argument is valid.

steve bank said:
The idea is to replce subarguments within the larger argument with symbols and the apply the rules of logic.
Yes, I do that very frequently (though I use somewhat different terminology). You're not doing it right, so you're getting false results with regard to validity.
 
steve bank said:
How would you formally evaluate the following using formal symbolic logic to acces validity

If it is raining or snowing and my car is outside and it is not in the garage the seats will get wet if the top is open. If the top is up the seats will not get wet regardless if it is raining or snowing. If the car is in the garage the seats will not get wet regardless if the top is up or down.
Is that an argument? What is the conclusion? It looks like 3 conditionals, but with no conclusion. I will assume that the last sentence is the conclusion (for example), but if you did not mean that, please let me know what the conclusion is. Also, I will try to guess your parentheses right. Also, by "The the top of the car is up." do you mean it is not open? By "is down" you mean it is open? I will assume so (if not; please let me know, but that is of no help). Also, the "regardless" part seems ambiguous, but I try my best. If you have any objections to my interpretation, please let me know.

So, here goes.

A1: It is raining.
A2: It is snowing.
A3: The car is in the garage.
A4: The car is outside.
A5: The car seats will get wet.
A6: The top of the car is open.

P1: ((A1 v A2)∧ (A4∧¬A3))->(A6->A5).
P2: ¬A6->((A1v¬A1vA2v¬A2)->¬A5)
C: A3->((A6v¬A6)->¬A5))


That is clearly invalid, though I did not need to use symbols to know that. Still, we can prove it with the following values:
A1F
A2F
A3T
A4F
A5T
A6T

With that assignment, we have true premises and a false conclusion, if you did indeed meant for "If the car is in the garage the seats will not get wet regardless if the top is up or down." to be the conclusion. Else, what is the conclusion?


steve bank said:
If it is raining or snowing and my car is outside and it is not in the garage the seats will not get wet if the top is open. If the top is up the seats will not get wet regardless if it is raining or snowing. If the car is in the garage the seats will get wet regardless if the top is up or down.
P1': ((A1 v A2)∧ (A4∧¬A3))->(A6->¬A5).
P2'=P2: ¬A6->((A1v¬A1vA2v¬A2)->¬A5)
C: A3->((A6v¬A6)->A5))

That is clearly invalid. For example:
A1F
A2F
A3T
A4F
A5F
A6T


gives true premises and a false conclusion.
 
It is easier to see symbolic logic and deriving truth tables using elecytical versionsm of symbolic llogic. Easier to derive logic equations and truth tables. It is what I used. Back in then80s I had to analyze a contract and specification to make a prosal. It was complicated. I ended up converting it to a logic diagram to make sure I had all the contingencies and cross connected requirements covered.

I read about an centuries old convoluted treaty that was reduced to symbolic language it was discovered that nothing was agreed to nothing on both sides.

I started the thread as something other than the usual threads of endless simple syllogisms.

https://en.wikipedia.org/wiki/Logic_gate
https://www.electrical-symbols.com/electric-electronic-symbols/digital-electronics-symbols.htm

A logic example. In electronics we typically start with a truth table and synthesize logic equations from the table. Everything comes down to truth tables.

https://www.geeksforgeeks.org/digital-logic-full-subtractor/
 
Yes, I do that very frequently (though I use somewhat different terminology). You're not doing it right, so you're getting false results with regard to validity

Yea, I did it in part for a living,
 
I read about an centuries old convoluted treaty that was reduced to symbolic language it was discovered that nothing was agreed to nothing on both sides.

I don't think that actually happened in real life. It's from Foundation by Isaac Asimov.

“And just how did you arrive at that remarkable conclusion, Mr. Mayor?"

"In a rather simple way. It merely required the use of that much-neglected commodity -- common sense. You see, there is a branch of human knowledge known as symbolic logic, which can be used to prune away all sorts of clogging deadwood that clutters up human language."

"What about it?" said Fulham.

"I applied it. Among other things, I applied it to this document here. I didn't really need to for myself because I knew what it was all about, but I think I can explain it more easily to five physical scientists by symbols rather than by words."

Hardin removed a few sheets of paper from the pad under his arm and spread them out. "I didn't do this myself, by the way," he said. "Muller Holk of the Division of Logic has his name signed to the analyses, as you can see."

Pirenne leaned over the table to get a better view and Hardin continued: "The message from Anacreon was a simple problem, naturally, for the men who wrote it were men of action rather than men of words. It boils down easily and straightforwardly to the unqualified statement, when in symbols is what you see, and which in words, roughly translated is, 'You give us what we want in a week, or we take it by force.'"

There was silence as the five members of the Board ran down the line of symbols, and then Pirenne sat down and coughed uneasily.

Hardin said, "No loophole, is there, Dr. Pirenne?"

"Doesn't seem to be.”
 
Yes, I do that very frequently (though I use somewhat different terminology). You're not doing it right, so you're getting false results with regard to validity

Yea, I did it in part for a living,

I did not mean to offend, but what I said is true. Maybe that was a long time ago, and you were doing it right back then, but you are a bit rusty and would need to take a look at your own notes, textbooks, etc., in order to do it right again.
 
Symbolic logic in applications gets complicated.

For then first problem.

a rain T no rain F
b snow T no snow F
c out of garage T in garage F
d top down T top up F
e wet T dry F

The assignment of state as T or F is arbitrary.

The truth table has 16 combination but can be reduced by eliminating states that have no effect on the out variable.

x = don't care

a b c d e
x x x f f in garage nothing else matters, dry
x x f x f top up nothing else matters, dry
t f t t t rain,top down, outside, wet
f t t t t snow, outside, top down, wet

It is simple enough to derive the logic by inspection of the text but it is not always so simple.

Create a truth table of ascend states. From the truth table the c d mapping is the truth table for an AND function. the rest indicates OR. There are structured techques for creating logic equations from a table. Tools are automated.

e = [a v b] ^ C ^ D

A lot of logic in technology traces to Quine
https://en.wikipedia.org/wiki/Willard_Van_Orman_Quine

The Quine–McCluskey algorithm is taught in digital logic. This form of formal logic was first applied to relay logic before digital electronics.

https://en.wikipedia.org/wiki/Quine–McCluskey_algorithm

Karnaugh mapping as well.
https://en.wikipedia.org/wiki/Karnaugh_map

It all derives from a truth table. Truth table then logic, synthesis. Existing problem to truth table and logic, analysis.

If I wanted to create a system to implement the logic with a few sensors I'd use electronic logic gates.

Scroll down to the logic symbol and truth table.
https://www.jameco.com/jameco/products/prodds/910901.pdf

A gimped into real world use of logic originating from a philosopher.
 
Last edited:
Yes, I do that very frequently (though I use somewhat different terminology). You're not doing it right, so you're getting false results with regard to validity

Yea, I did it in part for a living,

I did not mean to offend, but what I said is true. Maybe that was a long time ago, and you were doing it right back then, but you are a bit rusty and would need to take a look at your own notes, textbooks, etc., in order to do it right again.

The forum purpose in part is about stretching and taking risks for the purpose of growth. Short of of outfight hostility and blatant insult do not worry about offending. Enjoy yourself.
 
Back
Top Bottom