For instance: Sally can play the guitar and the piano. Martin can't play the guitar or the piano.
This could be seen as a matter of formal logic:
In propositional logic and boolean algebra, De Morgan's laws are a pair of transformation rules that are both valid rules of inference. The rules allow the expression of conjunctions and disjunctions purely in terms of each other via negation.
The rules can be expressed in English as:
The negation of a conjunction is the disjunction of the negations. The negation of a disjunction is the conjunction of the negations.
or informally as:
"not (A and B)" is the same as "(not A) or (not B)"
"not (A or B)" is the same as "(not A) and (not B)"
There is a logical rule, because in Boolean arithmetic:
In less formal language though, it doesn't always work that way.
We would generally not understand "Martin cannot play the guitar and the piano" as meaning "it is not true that Martin cannot play both the guitar and the piano, but I am telling you nothing about whether he can play one of those instruments". Rather we would understand it as meaning that he can play neither.
We might favour "Martin cannot play the guitar or the piano" because it better matches the formal logic while remaining understandable, but in terms of understanding what others mean, applying such a rule will not work.
The other answers discussion de Morgan's laws are relevant here, but I think it is instructive to look at all the possible combinations and what they mean. Let's say
From a logical perspective this means scenario 2, 3 and 4 are all possible. The only impossible scenario is scenario 1.
It reality this situation is not commonly encountered. This particular phrasing might also be used to mean that in some arrangement of players to instrument, the options are to assign Sally to guitar or piano—"Jane can play drums, Alice can play bass, and Sally can play the guitar or the piano."