Intuitively I know you're right because we say "The teacher comes here" or "The teacher goes there".
But if I saw a teacher far away (at a distance) coming this way, I can imagine myself saying "There comes the teacher." (The teacher comes from there)
Anyway, grammar causes me to overthink..
There are two Portuguese expressions:
- Aí vem
- Lá vem
Both are pretty much the same: here comes. The literal meanings of "aí" and "lá" (both "there") get twisted by the expression. The difference is that "aí" is used for things that are closer to us, and "lá" for things farther.
For "there goes", there are:
- Aqui vai (weird that there isn't an "aqui vem")
- Aí vai
- Lá vai
Using aqui stresses things are coming directly from the speaker.
Aí stresses things are going directly to the listener.
Lá doesn't set a precise destination.
There are many sayings that use this particular construction:
Definite articles (o) before possessives (nosso) when used before a noun (professor) are optional in Brazil, but mandatory in Portugal. Standalone possessives (without a noun) should always have a definite article, except when used after ser (maybe also estar?) in which case it is also optional, but with a slightly different meaning:
- Aí vem (o) nosso professor
- Este professor é o nosso = This teacher is the one we have
- Este professor é nosso = This teacher is one of ours
- Qual professor está aqui? O nosso.
I understand your confusion. Native speakers have told us there is no difference in meaning. The sentence is correct with AND without 'o', "nosso professor" and "o nosso professor". They said there is no rule or anything. It may be something that is changing in the language. Spanish requires a 'personal a' to show respect for a person when the person's name or a pronoun is used as a direct object. The 'personal a' is not used for animals (except sometimes pets) or inanimate objects. The 'o' in this Portuguese sentence is like the 'personal a' of Spanish, except that it is required in Spanish and optional in Portuguese.