# What is the logical operator for but?

I saw a sentence like,

I am fine but he has flu.


Now I have to convert it into logical sentence using logical operators. I do not have any idea what should but be translated to. Please help me out.

Thanks

-
What is the context? Why do you have to translate it? Since "but" is not really a logical operation and "and" will do as well ("I'm fine and he has the flu" has the same descriptive power of the facts) I'm not sure there's a simple answer –  Gadi A Sep 13 '11 at 8:13
Is it really ...he has flu.? Shouldn't it be ...he has *the* flu.? –  Svish Sep 13 '11 at 12:42
In my lecture notes for a class that deals with logical operators, the following is an exercise: "Write each...in symbolic logic...": Grumpy has a long nose but Stupy doesn't. Grumpy gets lost unless he gets up. Etc –  The Chaz 2.0 Sep 14 '11 at 2:34
@Svish: "he has flu" is British, "he has the flu" is American (more or less). –  TonyK Sep 14 '11 at 9:09
@TonyK: Ah, that explains things :) –  Svish Sep 15 '11 at 19:10

An alternative way of conveying the same information would be to say "I am fine and he has flu.".

Often, the word but is used in English to mean and, especially when there is some contrast or conflict between the statements being combined. To determine the logical form of a statement you must think about what the statement means, rather than just translating word by word into symbols.

-

This seems like an exercise in semantics. I cannot think of a logical operator which fits other than $\land$.

However, if we define the predicate $\operatorname{Fine}(x)$ which holds if and only if $x$ is fine, then we can assume "has the flu" is $\lnot\operatorname{Fine}(x)$.

In which case we can write the sentence:

$$\operatorname{Fine}(\textbf{me})\land\lnot\operatorname{Fine}(\textbf{him})$$

If you want to distinguish $\operatorname{Flu}(x)$ from simply $\lnot\operatorname{Fine}(x)$, then we are reduced to: $$\operatorname{Fine}(\textbf{me})\land\operatorname{Flu}(\textbf{him})$$

-

This is indeed an exercise in semantics as mentioned by @Asaf. My interpretation would be: $$fine(\text{me}) \land flue(\text{him})$$ where $fine, flue$ are predicates and me, him are constants.

Wiktionary lists various semantic meanings of 'but'. Here is an attempt to translate them into logic:

• But as preposition:
Everyone but Father left early: $\forall{X} [X \ne \text{father} \implies left(X)]$
I like everything but that: $\forall{X} [X \ne \text{that} \implies i\_like(X)]$

Since that day, my mood has changed but a little: $changed(\text{mood}) \land small(\text{change})$

• But as conjuction:
I have no choice but to leave: $\lnot choice (\text{me}) \land leave(\text{me})$
I am not rich but (I am) poor: $\lnot rich (\text{me}) \land poor(\text{me})$
(or if we asume $poor \implies \lnot rich$, just $poor(\text{me})$ )
She is very old but still attractive: $old(\text{she}) \land attractive(\text{she})$.

It is instructive to translate these logical clauses into Prolog and to play with them. Prolog and Natural Language Semantics is a good paper about translating English into Prolog.

-
In the adverb example, have you switched the predicates with the constants? It seems like "change = true" is something that we would say about a mood. Likewise, "small = true" is something that we would say about a change. Please clarify! –  The Chaz 2.0 Sep 14 '11 at 2:28
I thank you for your remark - it is correct. I looked at this sentence more from the viewpoint of Prolog. If I want to ask 'how big is the change?' I need to represent it as 'change(small)', then I can ask '?- change(X)' and get X=small. If I wrote 'small(change)' I could not ask the property of change. However, the representation 'change(small)' is not consistent with the other representations and so I am changing it to the logically correct 'change(small)' as you are suggesting. –  Jiri Sep 14 '11 at 8:55

I agree with Jiri on their interpretation. But coming from an AI background, I have a different sort of take:

Your example "I am fine but he has flu" has to do with the common knowledge between the speaker and the audience. The speaker has a certain belief of the above common knowledge. The attempt is to warn the audience that the proposition next to 'but' is unexpected, given the proposition before 'but'.

Let us denote the proposition of a sentence $S$ before 'but' as $before(S)$ and after 'but' as $after(S)$. Lets denote the information content of a proposition $B$ when $A$ is already known as $I(B|A)$. Then, 'but' means: $I(after(S)|before(S)) > I(\lnot after(S)|before(S))$. That is, the information content (surprise) of $after(S)$ is more than $\lnot after(S)$ when $before(S)$ is already known.

-
This can also be given as an intermediary formalism to motivate or show consistency in deconstructing such sentences as $\operatorname{fine}(me) \land \operatorname{flu}(him) \land (\operatorname{flu}(x) \implies \lnot \operatorname{fine}(x))$, thus exposing a hidden presumption, $\operatorname{flu}(x) \implies \lnot \operatorname{fine}(x)$, in the wording. –  Loki Clock Sep 29 '13 at 23:20

Though usually you'll see "but" translated as logical conjunction (AND), the sense of such a statement seems to mean "I am fine, and he has the flue, so he is not fine also." So with "f" meaning "I am fine", "l" meaning "he has the flue", "e" meaning "he is not fine", and it seems to mean "f, l|=e" where "|=" indicates entailment. The teacher, almost surely, wants to you translate "but" as logical conjunction, but I simply don't see why you would want to so mindless translate into a logical statement, instead of translating it into a metalogical one.

-
Why a -1? Reason? –  Fahad Uddin Sep 14 '11 at 12:52

In multi value logic BUT mean IF THEN ELSE. So its like saying if you are A and he is B then When B=flu THEN A=bad ELSE A=fine

-
This is given that the mention of the other person presupposes the intersection of your condition and his at least for the element mentioned(flu) –  vforeman Sep 29 '13 at 23:05