A lot of good math and science was done before the Enlightenment - look at Newton or Euler or Descartes, for example. The scientific environment often operates rather independently of the political environment - the Soviets also had high-quality science going on.
Newton and Descartes are considered part of the Enlightenment, and you cannot conduct high-quality science while the politicians are telling you that conclusions like "evolution operates by natural selection" (re: Lysenkoism) or "there's no evidence for a natural hierarchy of races" (re: both current and previous incarnations of racism) will lose you your job.
What do you mean, even? Politicians are much worse than the general population at ever admitting to thinking clearly: their chief occupation is righteousness signaling.