> When mathematicians do succeed in proving a number’s irrationality, the core of their proof usually relies on one basic property of rational numbers: They don’t like to come near each other.
This property of the minimum distance between two rational numbers is what the ruler function* relies on to be continuous at all irrational numbers while being discontinuous at all rationals.
* When x is irrational, f(x) = 0; otherwise, when p and q are integers, f(p/q) = gcd(p,q)/q. Note that this leaves f(0) undefined, which is fine for the result of being discontinuous at rationals. You could define f(0) to be any value other than 0. The function is traditionally defined over the open interval (0, 1), which avoids the issue.