Here is the proof of "lemma 1" above. As I said there, I remember reading it in "Mathematics Magazine" many years ago but don't remember the author. It is certainly not original with me! I find it intriguing for two reasons- first, irrationality is a numeric, not function, property, yet this depends upon calculus methods. Second, it is the "worst" kind of proof by contradiction! Contradicting the conclusion (that c is irrational) leads to two conclusions (I call them "statement A" and "statement B" below) neither of which seems to have much to do with irrationality but which contradict one another.
Lemma i: let c be a positive real number. If there exist a function f, continuous on [0,c] and positive on (0,c), such that f and all of its anti-derivatives can be taken to be integer valued at 0 and c (by appropriate choice of the constant of integration), then c is irrational.
Proof by contradiction:
First: define the set P of all polynomials, p(x), such that p and all of its derivatives are integer valued at 0 and c.
Notice "derivatives" rather than "anti-derivatives". That allows us to prove:
Lemma i: if f(x) is the function above and p(x) is any polynomial in P, then \int_0^c f(x)p(x)dx is an integer.
To prove this, use repeated integeration by parts, repeatedly integrating the f "part" and differentiating the p "part". Since p is a polynomial and differentiating reduces the degree, that will eventually terminate giving the integral as a sum of anti-derivatives of f times derivatives of p, all of which are integer valued at 0 and c.
A similar proof gives
Lemma ii: the set P is closed under multiplication.
Suppose p and q are both in P. The pq is a polynomial and pq(0)= p(0)q(0) and pq(c)= p(c)q(c) are products of integers. All derivatives of pq can be done by repeated application of the product rule: every derivative is a sum of products of various derivatives of p times derivatives of q- all integer valued at 0 and c.
Now, suppose c is rational: c= m/n reduced to lowest terms. Let p0(x)= m- 2nx. Clearly p is a polynomial. p(0)= m, an integer and p(c)= p(m/n)= m- 2n(m/n)= -m, an integer. p'(x)= -2n, an integer for all x, and all subsequent derivatives are 0. Therefore, p0 is in P.
For i any positive integer, let p_i(x)= \frac{(mx- nx^2)^i}{i!}. We will prove, by induction, that pi is in P for all i.,
If i= 1, p1(x)= mx- nx^2= x(m- nx). p1(0)= 0 because of that 'x' factor and p1(c)= p1(m/n)= 0 because of the 'm-nx' factor. p'1= m- 2nx= p0(x). Since that is in P we have immediately that all derivatives of p1 are integer valued at p and so p1 is in P.
Assume that pi is in P for some i. p_{i+1}= \frac{(mx-nx^2)^{i+1}}{(i+1)!}= \frac{x^{i+1}(m-nx)^{i+1}}{(i+1)!} is 0 at both x=0 and x= c= m/n because of the factors. p'(x)= \frac{i(mx-nx^2)^i(m-2nx)}{(i+1)!}= \frac{(mx-nx^2)^i}{i!}(m- 2nx)= p_i(x)p_0(x). Since both pi and p0 are in P and P is closed under multiplication, so is p'i+1- all further derivatives are integer valued at 0 and c and so pi+1 is in P.
Since f(x) is continuous on [0,c], it takes on a maximum value there: let M= max f(x) on [0,c]. Further, since f is positive on (0, c), M> 0. Since, for all i, pi is differentiable on [0, c] it not only takes on a maximum value but that maximum value occurs either at an endpoint (0 or c) or in the interior where p'i(x)= 0. We have already seen that pi is 0 at 0 and c, for all i, (and only at x= 0 or c) and that p'i(x)= pi-1(x)p0(x). p'i(x)= 0 only where p0(x)= m- 2nx= 0 or x= m/2n= c/2. pi(m/2n)= \frac{\left(\frac{m^2}{4n}\right)^i}{i!}. Since that is positive, that is the maximum value of pi on [0, c].
Now we can prove:
\int_0^c f(x)p_i(x)dx\le \int_0^cM\frac{\left(\frac{m^2}{4n}\right)^i}{i!}dx= Mc\frac{\left(\frac{m^2}{4n}\right)^i}{i!}
That is a constant times a constant to the i power, divided by i!. As i goes to infinity, the factorial dominates and the limit is 0- we can make that as small as we please:
Therefore, Statement A:
For some i, \int_0^c f(x)p_i(x)dx< \frac{1}{2}.
But since f(x) and all pi(x) are positive on (0, c) (every pi is 0 only at 0 and c and is positive at c/2),
\int_0^cf(x)p_i(x)dx is a positive integer and so (statement B) must be larger than or equal to 1 for all i. That contradicts statement A and so the theorem is true.