When to use は instead of other particles


I have seen that は acts as a sort of negation (or contrast) particle, although
I'm not sure how it works, for example:

1) わたし **は** ともだち が いません  
2) わたし **の** ともだち が いません

Is 1) the only correct sentence? Why? And what's the rule for using は instead
of other particles? I have tried searching a bit but I still can't seem to
understand this.

Another example would be

1) さかな **は** たべません  
2) さかな **を** たべません

Is 2) incorrect? Why? Are there any other cases where I should be aware of
this?




When you describe a general fact, a sentence of statement needs some topic
parts, in short, "I don't have friends" translates to わたしは ともだちがいない. ("My
friend is not here" translates to わたしのともだち **は** いない as long as it's a general
fact.)

On the other hand, what's newly discovered i.e "(emergency) My friend is
missing!" is expressed without any topics as わたしの ともだちがいない.

Third, you can rephrase いないのは わたしの ともだちだ (it's my friend that's not here) as
わたしの ともだちがいない, which is the same form as the above.

さかなは たべない can be (1) a reply to question "How do you treat the fish?" or (2)
an implication that you may eat other things but not fish.

さかなを たべない is a reply to question "What would you save among these things".
**Edit:** If you still say さかなは… instead, it implies that you anyway don't eat
the fish and now the problem is what to choose from the rest.




No, は is the topic marker (i.e., it marks what the sentence is really _about_
), and contains no connotation of negation/contrast.

In your first case, (1) means "I have no friends" and (2) means "My friends
aren't here" (literally, "my friends don't exist [here]"). Both are correct,
but they have very different meanings.

In your second case, (1) and (2) both mean "[I] don't eat fish". They have the
same meaning because the object, 魚｛さかな｝, is exactly the _topic_ of the
sentence. However, if you're in some strange setting when you're concerned
with fishes eating things, (1) can mean "[The] fish doesn't eat". But people
rarely talk about fishes' eating habits.

