Ask HN: If n is prime than n is uneven
1–7 of 7 posts
Re: Ask HN: If n is prime than n is uneven
#2As n=6 is not prime, the implication is true whether n is even or not.
Re: Ask HN: If n is prime than n is uneven
#3If the number 6 was both prime and even it would disprove the implication
X prime and X != 2 -> X odd
But so long as the left hand side is false, the facts are compatible with the implication so it is ‘true’.I am fascinated with all of the ways logic breaks down as you try to use it as a tool for decision making. Conventional programming languages assume that events happen in some specific sequence, but in the case of logic you can work forwards or backwards. A practical system needs to be restrained from trying to infer true but irrelevant facts. Kurt Godel’s work indicates just one kind of trouble logic can get you into but the problems of reasoning with uncertainty are an absolute bear unless you impose a causal structure of some kind.
So I am on the side of McCoy vs Spock and think ‘rationalists’ just call themselves that so they can accuse everyone else at being irrational. Logic will probably disappoint you like it disappointed Whitehead and Russel.
Re: Ask HN: If n is prime than n is uneven
#4Welcome to the illogical world of logic. If the number 6 was both prime and even it would disprove the implication X prime and X != 2 -> X odd But so long as the left hand side is false, the facts are compatible with the implication so it is ‘true’. I am fascinated with all of the ways logic breaks down as you try to use it as a tool for decision making. Conventional programming languages assume that events happen in…
Re: Ask HN: If n is prime than n is uneven
#5Welcome to the illogical world of logic. If the number 6 was both prime and even it would disprove the implication X prime and X != 2 -> X odd But so long as the left hand side is false, the facts are compatible with the implication so it is ‘true’. I am fascinated with all of the ways logic breaks down as you try to use it as a tool for decision making. Conventional programming languages assume that events happen in…
To me material implication makes much more sense in the context of three-valued logic where you can also have 'null' values. Don't think they will accept that when I have do my exam though...
Re: Ask HN: If n is prime than n is uneven
#6 def f(n):
if is_prime(n):
return not is_even(n)
else:
return True
What is the value of f(6)? True is returned in the else-clause because this is an example of a vacuous truth. https://en.wikipedia.org/wiki/Vacuous_truth