Sujet : Re: Why Python When There Is Perl?
De : ff (at) *nospam* linux.rocks (Farley Flud)
Groupes : comp.os.linux.advocacyDate : 24. Mar 2024, 01:08:48
Autres entêtes
Organisation : UsenetExpress - www.usenetexpress.com
Message-ID : <17bf8777050f5c1e$7$2218499$802601b3@news.usenetexpress.com>
References : 1 2 3 4 5 6 7 8 9 10
On Sat, 23 Mar 2024 17:11:00 -0500, Physfitfreak wrote:
The second and fourth cases should both be false, not true.
In the second case (~A => B), non-prime isn't necessarily odd, and
therefore ~A does _not_ imply B, so result is false, not true.
You are reading it wrong.
The problem, I suppose, is the use of the word "implies." This
should not be taken literally.
If a number is not prime, then could it be odd? This is the
correct way to to interpret "~A => B." The answer is "yes"
and the condition is true.
Similarly, the fourth case, "~A => ~B," should be interpreted
as "if a number is not prime, could it be even?" The answer
is "yes" and hence the statement is true.
The second case, again, says, if a number is prime could it
be even? The answer is "no" and hence false.
Again, the use of words obscures the mathematical reality.
It is proven that "A => B" is equivalent to "~A OR B" and
the negation (falsification) is "A AND ~B."
If it is raining (A), could the sky be cloudy (B)? Yes.
If it is raining (A), could the sky be not cloudy (~B)? No.
If it is not raining (~A), could the sky be cloudy (B)? Yes.
If it is not raining (~A), could the sky be not cloudy (~B)? Yes.
These are word games, however. The mathematical definition
is that A => B is equivalent to "~A OR B."