When people talk about experience gains in Pokemon go, they usually talk about catch bonuses, evolution bonuses, hatching bonuses, etc. I haven't found anything that discusses experience gains from gym battles.
Unlike the bonuses mentioned above, gym battles seem to not reward experience in numbers ending in 0 (or 5 in the case of a Pokemon escaping).
I would assume that the higher the CP of the Pokemon defeated, the more experience would be given, but it looked like I was receiving different amounts for defeating the same Pokemon each time (training a gym). Does anyone know if the experience reward for battling includes other factors like time remaining or HP remaining?