No, it is not age discrimination because there is a non-age basis for the differential treatment: whether the person is retired or not. If a non-retired teacher who is older than 40 is denied increases that a younger teacher is given, that would be age discrimination; but since there is a non-age difference (having been retired) between those getting the increases and not, this not age discrimation.