I'm 99,9% sure double tap has nothing to do with proximity sensor (it activates even when tapping the lower part of screen which surely isn't close enough to the prox sensor and also requires actual physical taps) and pretty sure not with glance either.
I can assure you that both glance and the double-tap-to-wake features are tied to the proximity sensor.
Should you cover the proximity sensor, double tapping anywhere on the display with not function. (phone thinks its in a pocket or place where its not in use, thus ignoring double-tap inputs)
If its uncovered, double tapping anywhere on the display will work, regardless of where on the display the taps occur.
The sensor simply serves as a "should I be enabled now?" check.