"Your best lab or library produces an additional amount of science equal to its level."
This "or" confuses me. Do I get it right that if my best lab is level X and my best library is level Y, I have max(X, Y) science production bonus?
Also, if there I have several labs of maximum level, does the "best lab" apply to one of them, or to all of them?
Yes, the max( X, Y). And, if you have several at the same, highest, level -- you only get the bonus for one of them.