The previous 98th ranked took the new 99th rank as anyone between 64-98 moved down by one rank.
This system do not work on Ash vs Korrina and Ash vs Iris. Korrina wasn't even in Top 1000 yet by beating her, Ash enter Top 1000. Same with Iris regarding Top 100. In fact, there is a rule that only participants from the same class can have battle, if they system you proposed is used, there is no way they can reach higher class.
The system might be point-based like FIFA world ranking. You gain/loss point based on the result (W/D/L) and opponen'ts rank. The ranking will change as the points changes.
Yeah you're right, taking the average of both numbers would just cap the rank since they can only battle people within the same class. This pretty much breaks my whole system like you mentioned. It was a nice attempt though, I tried.
Personally, I don't like the idea of a trainer's rank suddenly decreasing out of nothingness, mainly because it wouldn't be fair to the individual. I feel like it should mainly stay as a consequence of losing or not participating in enough battles.
So I'm thinking that maybe each class has a separate grace period that forces to the meet some type of quota.
Like maybe people within the normal class must partake in at least 3 battles a week, those within the great class must do at least 2, and people within the hyper class have their battles chosen for them (at least 1 per week).
And then let's say that there are two battles happening consecutively.
Red (Rank 60) vs. Blue Rank (99) and Green (Rank 105) vs. Yellow (Rank 106)
If Blue wins against Red, he will just be put in a higher rank that becomes available. Since his 99th spot is now open, whoever wins between Green and Yellow takes that spot advancing them to the Ultra Class.
It'll just pit the challenger to the nearest spot that becomes available, along with a few other variables.
Since battles are happening at all times all around the world, new positions are constantly opening. This is also makes it so that a person's rank may increase even if they are not battling.