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


Solution 1:

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.

Solution 2:

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})$$

Solution 3:

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.

Solution 4:

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)]$

  • But as adverb:
    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.