Would it be gramatically correct to say 学校は行きます as opposed to 学校に行きます


My understanding is that 学校 **は** 行きます would mean: As for school, I will go
there.

While 学校 **に** 行きます is: I will go to school.

But is this the first sentence ever used? Or even grammatically correct?




Yes, 学校は行きます is grammatically correct and natural. But this has a clearly
contrastive meaning. The sentence implies something like this:

> 学校は行きます。  
>  (I said I won't go to the dentist but) I will go (at least) to school.

As a basic rule, a contrastive-は _replaces_ が and を, but _attaches_ other
particles such as に, へ, で, から and まで. Still, when a contrastive-は comes at the
beginning of a sentence, the associated particle can be omitted with the aid
of the context. We even have [eel sentences
(うなぎ文)](https://japanese.stackexchange.com/q/61651/5010).




Yes, 学校は行きます is grammatically correct and natural. But this has a clearly
contrastive meaning. The sentence implies something like this:

> 学校は行きます。  
>  (I said I won't go to the dentist but) I will go (at least) to school.

As a basic rule, a contrastive-は _replaces_ が and を, but _attaches_ other
particles such as に, へ, で, から and まで. Still, when a contrastive-は comes at the
beginning of a sentence, the associated particle can be omitted with the aid
of the context. We even have [eel sentences
(うなぎ文)](https://japanese.stackexchange.com/q/61651/5010).

