Metamathematics of buts Something I learned (probably in middle school) that always bothered me is that the truth value of "and" and "but" are basically the same.  If you were going to assign a truth-functional interpretation of "but" in first-order logic, it would be the same as "and".
There's been a explosion of logical systems that are alternatives to first-order logic, such as fuzzy logic.  Is there a logical system that can distinguish "and" and "but"?
 A: Interpreting “$X \text{ but } Y$“ as
$$X \wedge Y \wedge \diamond(X\wedge\neg Y)$$
is a reasonable starting point. (“X and Y and it would be possible to have X and not Y”.)
This works for the basic examples I found in online dictionaries:

*

*“He was poor but proud”

*“She’s 83 but she still goes swimming every day”

*“My brother went but I did not”

*“He stumbled but did not fall”

*“She fell but wasn’t hurt”

This correctly identifies that “he is a bachelor but unmarried” is not an appropriate use of “but”.
And this also shows the difference between such examples as:

*

*“That comment was harsh but fair.” (It was harsh and fair, while some comments are harsh and unfair.)

*“That comment was fair but harsh.” (It was fair and harsh, while some comments are fair and compassionate.)

A: In a paper entitled "Contrastive Logic" (Logic Journal of the IGPL 3 (1995), 725–744), Nissim Francez introduced something he called bilogics, which are logics intepreted over a pair of structures instead of a single structure, in order to study words such as but and already. The idea in the case of but is that one must simultaneously consider two states of affairs, namely the actual state of affairs and the "expected" state of affairs.  A later paper by  J.-J. Ch. Meyer and W. van der Hoek,  A modal contrastive logic: The logic of ‘but’ (Ann. Math. Artif. Intell. 17 (1996), 291–313) showed how more or less the same idea could be captured using an extension of the well-known modal logic S5, which provides a framework for analyzing possible worlds.
There is a small literature on related topics that you can find by searching for "contrastive reasoning."
A: (not enough reputation to comment)
I would understand "but" to introduce some unexpected consequences (against implicit assumptions) of the truth value of a claim, or that there are some other elements that effect the truth value of the claim at some point. For example

*

*It is windy outside, but laundry will not dry faster because it will rain soon.

*Adam has a car, but he is not able to join us because he does not have a driving license.

*Lisa is not able to join us, but we can discuss with her over video call.

I dont't see "but" to be equal to "and" in first-order logic. It is more on the structure of a sentence and hidden assumptions that could be translated to "but" in textual presentation. I would guess (perhaps ignorantly) that no logic can define "but" because it refers to something we would not expect and hence unknown. (this is something that might carry some cultural differences, too)
A: I'm not a mathematician, but I think normally, when you say "X but Y" you mean:
$$X \wedge Y \wedge P(Y|X)<P(\neg Y | X)$$
As in, X and Y is true, but the probability of Y is low given X.
This works with the examples too:

*

*Alice was proud but poor - Most poor people are not proud, and Alice is both proud and poor

*My brother went but I did not - Most of the time I go where my brother goes, however this time I did not

In these cases, stating the probability is often an important part of the statement. In "My brother went but I did not" stating that I usually go with my brother is an important part of what the author is trying to communicate.
In some cases, Y is not special because of X, but because of something else implied by X, like even stating X itself. Consider the case:

*

*Thus we can conclude Y, but this is obvious. - "I am telling you Y. This means there is a high chance Y is important. However, Y is not important since it is obvious"

Now we get into high-level meta reasoning where we have to include the probability of the author saying X when computing X(Y|X).
There is another special case when X is subjunctive:

*

*I would have saved her, but I could not - "If I could have saved her I would"

In this case you can replace "but"  with "if not" with the same meaning.
A: In Lojban, a constructed language meant to embody logical thinking, the distinction between "and" and "but" is made with two different sorts of words which have different grammar. Conjunctions are made by simply uttering multiple propositions in a row, but each proposition can be tagged with a non-logical modifier which annotates it relative to prior propositions.
As explained in Complete Lojban Language, the discursive particle {ku'i} tags a proposition as contrary to the preceding proposition. This gives a way to annotate "but", but without changing what is logically asserted. Similarly, other particles give ways to translate "similarly" or "in parallel".
While Lojban does not directly correspond to a second-order formal logic (yet), there are tools like tersmu which can extract logical sentences, and these tools discard discursive annotations.
This answer isn't worth accepting, but it was too long for a comment.
