I have 3 gym badges. I got my 3rd gym badge and the leader said now I could use the HM Defog.
I thought "oh, I guess i'll get it soon", so I just kept going. I got to lost tower, but it got really foggy, and I thought "The next floor, it must be to foggy to see.".