You failed to prove anything other than in melee combat they can't be attacked.
So we agree that against an opponent with only melee capability an invisible and undetected elf cannot be attacked.
Spells are not a part of melee combat.
You can cast spells
during melee, however. See the section on "Casting Spells During Melee" on p. 65 of the DMG.
Also, fireball is an "attack", but not an attack. The quotes mean that it qualifies for things like invisibility which refer to anything hostile and dangerous, but not for melee combat which is specifically called out by invisibility.
You're going to have to explain this distinction a little further. I don't see anything like it in AD&D where the word
attack seems to have its natural language meaning and isn't a term of game jargon. In fact, on p. 80 of the DMG, you'll find fireball, yes "the magical
fireball" listed as a form of attack along with other magical effects and blows from opponents, among other things.
Consider the following situation. 6 elves are attacking a fighter/magic user and are unaware of the magic user part. They retreat back to a tree and fade from view while being observed. The fighter/magic user still being in combat lobs a fireball at a point near the tree. A second later a ball of fire blossoms and we now have 6 dead elves, nice and crispy. Combat is ended at that moment and not before.
This scenario shows that you haven't understood what I've been saying. Maybe that's my fault for not explaining things well enough. The elves in your scenario, although invisible, are not undetected precisely because they are observed while
becoming invisible. Therefore, they can be attacked in the way you describe. What I've been arguing is that the elves, if
undetected, could not be attacked.
Quote something other than melee combat rules will ya? Melee combat rules don't apply to spells and never have.
I already have, but I'll post it again since you seem to have already forgotten it. This is from p. 60 of the DMG, under the heading
Invisibility: "... if the party is observed [becoming invisible], there is no reason why an opponent cannot attack..." This statement assumes that normally, if the party is not observed becoming invisible (or is not detected in any other way) then there
is a reason why an opponent cannot attack. Notice that this rule is not qualified by any reference to melee whatsoever.
Sure there is. From the 1e PHB.
"The magic-user points his or her finger and speaks the range (distance and height) at which the fireball is to burst. A streak flashes from the pointing digit and, unless it impacts upon a material body prior to attaining the prescribed range, flowers into the fireball."
There is no requirement that it target anything. The magic user is allowed to guess anything he wants prior to picking the distance and height.
The spell doesn't give the magic-user the ability to detect a hidden elf.