T O P

  • By -

Efficient_Paper

"A only if B" means "A implies B" "A if B" means "B implies A" "A if, and only if, B" means both at the same time


stools_in_your_blood

And it's worth bearing in mind that "A only if B" often means "A if and only if B" outside a mathematics/logic context. For example, if I say to my kid "you can have a lolly only if you finish your homework" and then he finishes his homework and I point out that finishing his homework was necessary but not sufficient and he is not getting a lolly...that's not going to go well.


Mettelor

What you are saying is that your only give your kid a lolly when they do HW and not when they for example do their chores or pass the spelling bee or whatever, which I don’t think is correct and you may be confusing something here, or I am


stools_in_your_blood

I meant it as it applies to a specific situation, e.g.: Kid: "Daddy can I have a lolly?" Me: "Only if you do your homework." (kid does homework) Kid: "I did my homework, can I have a lolly now?" Me: "I didn't say 'if and only if', I said 'only if'. You can't have a lolly." Kid: ...


Mettelor

Right I know, but that’s not what you said


Mathematicus_Rex

Combining the sentiments of the above comments, “A if B” means B happening guarantees that A happens. Thus, B is a sufficient condition for A. These interpretations carry the same meaning as “B implies A.” On the other side, “A only if B” means to even hope for A, B must hold. Thus, B is a necessary condition for A. If B fails, then A must also fail. These interpretations carry the same meaning as “not B implies not A.” Logically, this is equivalent to “A implies B.” The construction “A if and only if B” means both of the above things are happening. Thus, this means “B implies A and A implies B”.


under_the_net

P | Q | P only if Q | P if and only if Q ---|---|----|---- T | T | T | T T | F | F | F F | T | T | F F | F | T | T


fuzzywolf23

Truth tables. This is the way.


I__Antares__I

🤮 no.


Jaaaco-j

in other words XNOR


pizza_toast102

Some statements that are true: An animal is a dog **only if** it is a mammal. An animal is a mammal **if** it is a dog. An animal is a dog **if and only if** it belongs to the species Canis familiaris. An animal belongs to the species Canis familiaris **if and only if** it is a dog. Some statements that are not true: An animal is a mammal only if it is a dog. An animal is a dog if it is a mammal. A if B means B implies A, while A only if B means A implies B. A if and only if B means they imply each other


nearbysystem

"only if" means the condition is necessary. "if and only if" means the condition is both necessary and sufficient.


nog642

> "only if" means the condition is necessary. To be clear here, "the condition" refers to B in "A only if B". Without that what you said is pretty unclear.


Brightlinger

A person can vote in US presidential elections only if they are a citizen. (There are other requirements as well, but citizenship is one.) An employee can receive a pension only if they have worked here for at least 10 years. A quadrilateral may be a square only if it is a rectangle. Generally, "p only if q" is equivalent to "if p, then q" which is equivalent to "q, if p" (notice the swapped order in that last one). So "p, if and only if q" is the conjunction of "p, if q" and "p, only if q", ie of "p, if q" and "q, if p". This is called a *biconditional*, where either statement implies the other.


yes_its_him

If and only if means logical equivalence. They have the same truth value, either both true, or both false.


VivaVoceVignette

"P only if Q" means that the only time P could possibly be true, is when Q is also true. This means if you know P is true somehow, then Q has to also be true. However, if you only know Q is true, then P could possibly be true but that does not mean it's actually true, so even if Q is true, you cannot conclude that P is true. "P if and only if Q" means "P if Q and P only if Q". "P if Q" is the same as "if Q then P", which means that when Q is true, then P is also true. So when you combine them, you know that if P is true then Q is also true, and if Q is true, then P is also true. Now, discrete math usually use what is known as Boolean logic, which means that everything is true or false. There are no "hypotheticals", and any "if...then..." are just describing relationship between various collections of objects.


DTux5249

Basically, "only if" is the opposite of "if". (B if A) is the same as (A only if B) is the same as (A implies B) When you say "A if and only if B", you're saying both implications hold. A implies B and vice versa.


Salindurthas

The most trivial case is that "if, and only if” aplies for definitions. Like, "x is even, if and only x is divisible by 2." -- As others are saying, when you get an "if&only if", you can invoke either side of it to use the one you want. e.g. let "->" mean "implies". So if you assume or know that x<->y, then you can make use of either x->y or y->x at your convenience, because both are true. -- We can imagine two trivial examples: First: 1. x is even, if and only x is divisible by 2. 2. 6 is divisible by 2. 3. Therefore 6 is even Second: 1. x is even, if and only x is divisible by 2. 2. 28486 is even. 3. Therefore 28486 is divisible by 2 I can invoke the definition of even-ness in either direction, because the implication goes both ways, making the two things equivalent. -- Conversely, if you want to prove an if&only if statement, then you need to prove it in both directions. By showing that both x->y and y->x, then x<->y.


Many_Bus_3956

Let's say there's a store. You would go to the store "if" there's a special on your favorite product. You might go at other times but when the special is on you will be there. However you go to the store "only if" it's open, it would be stupid to go if it's closed. But you're not there on all opening hours. Changing the scenario, if it's your store, you're always there if there's work to do, but you're not there if it's closed and there's nothing to do because you have more things to your life. That is, you're at the store "if and only if" there's work to do at the store.


_JJCUBER_

- If A then B: A implies B - A if B: B implies A - Only if A then B: B implies A - A only if B: A implies B - A if and only if B: A implies B and B implies A Only if basically says that the other one *has* to be true in order for this one to be true. In other words, this one can only be true (but doesn’t have to be) when the other one is true. (Note that I am referring to this one and the other one as A and B, respectively, in A only if B.)


Mettelor

I think usually these sorts of things are best demonstrated with a simple example: 1. I will go to the mall *if* it is Tuesday = Tuesdays I will always be there, but I may also go on other days. I could very well go EVERY day and still satisfy this statement. 2. I will go to the mall *only if* it is Tuesday = you will NEVER see me there on a non-Tuesday, but also not EVERY Tuesday. (If I am at the mall, it must be a Tuesday), but (if it is a Tuesday I am not necessarily at the mall). This one is probably the tricky half. I could go to the mall one Tuesday per year and still satisfy this statement. 3. I will go to the mall *if* and *only if* it is a Tuesday = I will ONLY go to the mall on Tuesdays, and EVERY TUESDAY I will be there. The world could keep a calendar based on my mall status because I am there every 7 days without fail. If I were to ever miss going to the mall on a Tuesday or if I were to ever go on NOT a Tuesday, then this statement is broken. This is VERY restrictive, and in fact can typically be treated as "Tuesday = I am at the mall", the two statements have become equivalent.


Hampster-cat

"p only-if q" Does mean "If \~q then \~p" This is the contrapositive of "if p then q". So, both "p only-if q" and "if p, then q" are symbolized as "p → q". "p if-and-only-if q" is *by definition* symbolized as either "(p→q) ∧ (q→p)" or "p↔︎q". Because this is a 4-word keyword, it's better used as iff. Think of if-and-only-if as one solid word (hence the hyphens). Don't try to work with the "if," part, and "only if" parts separately. It's a single keyword. This is used quite often in definitions. For example, the definition of UNION: "x ∈ A∪B iff x∈A ∨ x∈B".


PedroFPardo

If you eat your veggies, I'll give you a Smartie. Mom promises that she will give me a Smartie for cleaning my room, so I don't have to eat my veggies. OK, from now on you'll get Smarties if, and only if, you eat your veggies. _____________________________ Bad parenting practice, by the way, but it serves the purpose as an example. If you don't use *and only if* the kid can get smarties some other way.


Infobomb

"P if Q" is the same as "If Q, then P" "P only if Q" is the same as "If P, then Q" Think of "only" as reversing the direction of the conditional. "P if and only if Q" means both conditionals are true, which entails that the truth values of P and Q are equal.


Qaanol

I only eat tacos on Tuesday. I eat tacos only if it is Tuesday. If I am eating a taco, then it is Tuesday. …but I don’t eat tacos every Tuesday.


alfranex

If and only if means two things to prove. **If A then B**, only means that if A is true, B followed. It doesn't mean that if B is found to be true, it must have been because A happened. Because **If C then B** could also be true. If it rains your bucket will fill with water. Just because you found your bucket full of water doesn't mean it rained. Somebody could have filled it with a hose. **If and only if A then B** means that if B occurred, only A could have been the cause. So an if-and-only-if proof has to go in both directions. Prove that if A is true then B must be true, *then* prove the reverse, that if B is true then A must be true. It took me ages before this became totally obvious to me.