I was fighting a gym alone earlier today, as the Pokémon in it had been there for four days, so I thought I may as well send them home, as I've had Pokémon stuck in gyms for two days, and it's no fun, anyway, I cleared the gym, but as I went to put my mon in someone else beat me to it. I was furious, and battled them, until I won and took over the gym. Within five minutes they had the gym again. All I can think is maybe we were both battling at the same time, I was so focused on what I was doing, I didn't notice. There was no one standing nearby, but it was at a pub, so maybe they were inside, I don't know if it shows on the screen if someone battles at the same time as you, anyway, it just seemed strange to me that four days pass, the gym is untouched, but when I clear it, someone is there at the same time, so did they steal it, or did they think I stole it off them? I'll never know, maybe someone can tell me if I can see rivals on my phone though.