The phrase "Is this a library?" is indeed a chant used by sports fans, notably in football (soccer) and also observed in golf events like the Ryder Cup. It is typically chanted by supporters when the atmosphere is very quiet, comparing the quietness to that of a library. For example, Birmingham City football fans chant it when opposing fans are very quiet, implying the silence is unusual for a sports event and mocking the lack of noise or energy. This chant has been used in various contexts to playfully criticize or rile up a subdued crowd.
So yes, "Is this a library?" is recognized as a chant used primarily by fans in sports settings.
