Jump to content

Propositional Logic

- - - - -

  • Please log in to reply
20 replies to this topic

#1
Apprentice123

Apprentice123

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 430 posts
Assume that "Lucas sings well" is true, "John writes well" is false and that "Philip is good at math" is true

How can I know the truth value for:

Lucas sings badly and John writes well.
Lucas sings well or John writes well.
Lucas sings badly or John writes badly and Philip is good at math.

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
~"Lucas sings well" ^ "John writes well"
"Lucas sings well" v "John writes well"
~"Lucas sings well" v ~"John writes well" ^ "Philip is good at math"
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
Apprentice123

Apprentice123

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 430 posts

WingedPanther said:

~"Lucas sings well" ^ "John writes well"
"Lucas sings well" v "John writes well"
~"Lucas sings well" v ~"John writes well" ^ "Philip is good at math"

OK. Thanks

#4
Apprentice123

Apprentice123

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 430 posts

Apprentice123 said:

OK. Thanks

Please check this:

Identify which are propositions. For each proposal, evaluate its truth value

1) All non-white swans
2) is the largest number 1000000000000
3) Do this exercise
4) There is no greater number
5) The set of integers is larger than the set of real
6) He or she is lying
7) The bar serves coffee or tea
8) This is item number 8

I found:
1) proposition. true or false ?
2) False proposition
3) Not proposition
4) True proposition
5) False proposition
6) Not proposition
7) Not proposition
8) proposition. True or False ?


How to create an operator (U) where:
p U q must be true when p or q is true, but not when both are true

I create the truth table
p q pUq
T T F
T F T
F T T
F F F

Now how do I create a formula?

#5
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
1) All non-white swans
Not a proposition. There is no claim (as opposed to "All swans are not white").

2) is the largest number 1000000000000
This looks like a question, not a statement or proposition.

3) Do this exercise
Not a proposition

4) There is no greater number
Not a proposition (no greater number than what?)

5) The set of integers is larger than the set of real
False proposition

6) He or she is lying
Not a proposition without context.

7) The bar serves coffee or tea
proposition, but cannot determine truth out of context

8) This is item number 8
True proposition

How to create an operator (U) where:
p U q must be true when p or q is true, but not when both are true

I create the truth table
p q pUq
T T F
T F T
F T T
F F F

This is the truth table for XOR. You should be able to Google it from there.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#6
Apprentice123

Apprentice123

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 430 posts
Why number 8 is a true proposition ? I think is undeterminate proposition.

OK I know is a XOR:
(p v q) ^ ~(p ^ q)

As from the truth table I can get the formula ?

#7
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
The eighth item is normally considered item 8.

I think you would have to get there through some experimentation.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#8
Apprentice123

Apprentice123

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 430 posts
According to the rules:
Modus Tollens (p -> q) ^ ~q => ~p
Disjunctive Syllogism (p v q) ^ ~p => q

But I found:

Modus Tollens:
p q (p->q) ~q (p->q)^~q ~p
T T T F F F
T F F T F F
F T T F F T
F F T T T T

Disjunctive Syllogism
p q (pvq) ~p (pvq)^~p
T T T F F
T F T F F
F T T T T
F F F T F


Where did I go wrong?

#9
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
You did nothing wrong, except for fail to interpret it.

Notice that for Modus Tollens, only the last line satisfies (p->q)^~q, and on that line, ~p is true.

Similarly, the for Disjunctive Syllogism, only the next to last line satisfies (pvq)^~p, and on that line q is true.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#10
Apprentice123

Apprentice123

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 430 posts
??
Modus Tollens => F F [COLOR=#ff0000]F[/COLOR] T
            p => T T F F
           ~p => F F [COLOR=#ff0000]T[/COLOR] T

Disjunctive Syllogism => [COLOR=#ff0000]F[/COLOR] F T F
                     q => [COLOR=#ff0000]T[/COLOR] F T F

It is not wrong?

#11
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
For both, you ONLY care if the assumption is true. The assumption can be false and the conclusion still be true.

Consider (p -> q) ^ ~q => ~p
p: I'm a blithering idiot
q: I suck at literature

The conclusion, I'm not a blithering idiot, it true, but the initial part is false, because I DO suck at literature.

Edit---

Another way to think about it:
According to the rules:
Modus Tollens (p -> q) ^ ~q => ~p
Disjunctive Syllogism (p v q) ^ ~p => q

Is equivalent to:
The following are tautologies:
Modus Tollens ((p -> q) ^ ~q) -> ~p
Disjunctive Syllogism ((p v q) ^ ~p) -> q
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#12
Apprentice123

Apprentice123

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 430 posts

WingedPanther said:

For both, you ONLY care if the assumption is true. The assumption can be false and the conclusion still be true.

Consider (p -> q) ^ ~q => ~p
p: I'm a blithering idiot
q: I suck at literature

The conclusion, I'm not a blithering idiot, it true, but the initial part is false, because I DO suck at literature.

Edit---

Another way to think about it:
According to the rules:
Modus Tollens (p -> q) ^ ~q => ~p
Disjunctive Syllogism (p v q) ^ ~p => q

Is equivalent to:
The following are tautologies:
Modus Tollens ((p -> q) ^ ~q) -> ~p
Disjunctive Syllogism ((p v q) ^ ~p) -> q

OK. Thanks. These I understand. But I did not understand the Addition:
p => p v q

p q (pvq)
T T T
T F T
F T T
F F F

In the third line p = F and (p v q) = T




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users