So I am currently studying how the verb location particles (に,へ,で) work with the topic particles
(は and も) when the location of a sentence becomes the topic. I was given the following example:
ボブ:学校に⾏った?
アリス:⾏かなかった。
ボブ:図書館には?
アリス:図書館にも⾏かなかった。
Why is the topic particle は not needed in sentence one but instead needed in sentence three? Is the location not the topic in sentence 1?
The subject is often ommited in spoken Japanese. In sentence one アリス is the subject, but as it’s ommited so is the particle は. For example they could have said アリスは,学校に⾏った?
図書館には is slightly different as the は particle is normalizing the action of going to the libary and making it the subject.
Someone else might be able to pitch in if my explanaiton is not fully accurate.
Also, what @TofuMental said about アリス being the unspoken/understood subject is, I think mostly (all?) correct, though I would say it’s more accurate to say topic (not subject).
Furthermore, in 図書館には? I would interpret as 1. 図書館 is becoming the new topic, and 2. it is taking は in order to show contrast. Showing contrast is one of the functions of は:
(私は)お寿司は好きですが、焼き魚は好きじゃないです。
I think the most likely thing happening in your example is は as a contrast particle, because you could still say アリスは in both the first and third sentences. Sentences can have multiple instances of は.