It is easy to prove that an apple is an apple: The equation x=x is a tautology, for all x. So if x=apple, we can substitute it in the equation x=x and get apple=apple, so an apple is an apple.

But how can one prove (using standard deductive logic) that an apple is not an orange, since x!=y is not a tautology for all x,y?
['https://philosophy.stackexchange.com/questions/8459', 'https://philosophy.stackexchange.com', 'https://philosophy.stackexchange.com/users/4639/']
In mathematics, an equals sign connects subject and predicate.

The statement, apple=orange, is the same as the statement, an apple is an orange.

In order to determine an apple is an apple, you used the principle of identity. That which is the same is the same.

In order to determine an apple is not an orange, we use the principle of difference. That which is the same is not different, or two different things are not the same. 

General reasoning from sense infers that apples are not oranges. However, if we use the power of abstraction, we can take the concept of an apple, its "appleness", and a concept of an orange, its "orangeness". These conceptions are known though general reasoning from sense and are often informed from the rest of society, e.g. academia. 

An apple's "appleness" can only belong to apples. An orange's "orangeness" can only belong to oranges. "appleness" contains no "orangeness". Therefore, something containing "orangeness", namely an orange, is never something containing "appleness", namely an apple, i.e. apples are never oranges.
As has been pointed out already, if you are using logic to talk about apples and oranges you have already provided some model (say, *a* is an apple and *o* is an orange - formally speaking you've set up a function from constants in your logical language to objects or types or fruit or whatever). So I'm reasonably comfortable that the following proof is no less rigorous than what you've got already: let *P* (a one-place predicate) be assigned the meaning 'needs to be peeled to be eaten'\*. Then *Po* is true and *Pa* is false, so then clearly ¬(*x* = *y*) holds.

\*obviously if you don't peel your oranges feel free to substitute some other predicate that fits

---

To generalise a little, in case the moral of the above isn't clear, we 'prove' that two objects are distinct by providing some property that holds of one but not the other. It's an open question in metaphysics whether distinct objects can share every property (contenders might be the object of 52 cards and the object of the deck, I guess). Within logic, though, if two elements of your domain are distinct but the same predicates hold of them there isn't a way to prove that they are distinct - you could show that rigorously in a quite straightforward way; proof systems for first-order logic use (roughly) the above method for proving inequality.