Open Lemmata

MTH2008Real Analysis

v1.0.1 Samuel Okwuonu CC BY-SA 4.0 core/mth2008

Results from the MTH2008 lecture notes, restated and proved in the checker's notation; references follow the notes' numbering.

Verified every entry gives its recorded verdict under engine 0.4.0, checked 23 November 2026.

1 The Real Numbers13 entries

  1. §1.1
    Field manipulationschecks · at Course
    Let a, b, c, d : RealStep: (a + b)^2 = a^2 + 2*a*b + b^2Step: (3*a + 2*b)*(4*c + 2*d) = 12*a*c + 6*a*d + 8*b*c + 4*b*dStep: -a = (-1)*aStep: a*(-b) = (-a)*bAssume hb: b != 0Assume hd: d != 0Step: a/b + c/d = (a*d + b*c)/(b*d)
  2. §1.1 (1.1)–(1.2)
    The two-element fieldchecks · at Course
    Step: 1 + 1 = 0 (mod 2)Step: 1 * 1 = 1 (mod 2)Step: 0 + 1 = 1 (mod 2)
  3. Theorem 1.1
    The triangle inequality, by the four caseschecks · at Course
    Theorem: "The Triangle Inequality"Claim: forall a : Real, forall b : Real, |a + b| <= |a| + |b|Proof:    Given a, b : Real    Case a >= 0 and b >= 0:        Step: |a + b| = a + b        Step: = |a| + |b|    Case a <= 0 and b <= 0:        Step: |a + b| = -a + (-b)        Step: = |a| + |b|    Case a >= 0 and b <= 0:        Step: a + b = |a| - |b|        Step: |a + b| <= |a| + |b|    Case a <= 0 and b >= 0:        Step: a + b = -|a| + |b|        Step: |a + b| <= |a| + |b|    Therefore |a + b| <= |a| + |b|QED
  4. Corollary 1.2
    The reverse triangle inequalitychecks · at Course
    Let a, b : RealStep: |a| = |(a - b) + b|Step: <= |a - b| + |b|Step: |a - b| >= |a| - |b|Step: |b - a| = |a - b|Step: |a - b| >= | |a| - |b| |Step: |a + b| >= | |a| - |b| |
  5. Corollary 1.2
    Reversing the inequalitytrap · fails, as it should · at Course
    Let a, b : RealStep: |a - b| <= |a| - |b|

    The corollary says |a − b| ≥ |a| − |b|. With the inequality flipped the claim fails at a = 0, b = 1: |−1| = 1 is not ≤ −1.

  6. Theorem 1.4
    Uniqueness of the supremumchecks · at Course
    Theorem: "Uniqueness of sup"Proof:    Let b1, b2, x0 : Real    Assume h1: b1 < b2    Let \epsilon = b2 - b1    Step: \epsilon > 0    Assume h2: x0 > b2 - \epsilon    Step: x0 > b2 - (b2 - b1)    Step: = b1    Therefore x0 > b1QED
  7. Theorem 1.5
    The Archimedean stepchecks · at Course
    Let n : IntLet \epsilon, \beta : RealAssume h: (n + 1) * \epsilon <= \betaStep: n * \epsilon <= \beta - \epsilon
  8. Theorem 1.7
    The rationals are densechecks · at Course
    Theorem: "Density of the rationals (closing algebra)"Proof:    Let a, b : Real    Let p, q : Int    Assume hab: a < b    Assume hq: q > 0    Assume h1: q * (b - a) > 1    Assume h2: q * a < p    Assume h3: p <= q * a + 1    Step: p < q * a + q * (b - a)    Step: = q * b    Therefore a < p / q and p / q < bQED
  9. Theorem 1.9
    The irrationals are densechecks · at Course
    Let a, b, r1, r2 : RealAssume a < r1Assume r1 < r2Assume r2 < bLet t = r1 + (r2 - r1) / sqrt(2)Step: t > r1Step: t < r2Therefore a < t and t < b
  10. Theorem 1.9
    Placing t on the wrong sidetrap · fails, as it should · at Course
    Let r1, r2 : RealAssume r1 < r2Let t = r1 + (r2 - r1) / sqrt(2)Step: t < r1

    t = r1 + (r2 − r1)/√2 adds a positive amount to r1, so t > r1; claiming t < r1 contradicts r1 < r2.

  11. §1.1
    Arithmetic in the extended realschecks · at Course
    Let a : RealStep: a + oo = ooStep: a - oo = -ooStep: a / oo = 0Step: oo * oo = ooStep: (-oo) * (-oo) = ooStep: -oo < aStep: a < oo
  12. §1.1
    Cancelling infinitiestrap · fails, as it should · at Course
    Step: oo - oo = 0

    ∞ − ∞ is an indeterminate form: the notes leave it undefined, so it cannot equal 0.

  13. Example 1.17
    Open intervals are openchecks · at Course
    Let a, b, x0, x, \epsilon : RealAssume a < x0 and x0 < bAssume \epsilon > 0 and \epsilon <= min(x0 - a, b - x0)Assume |x - x0| < \epsilonTherefore a < x and x < b

2 Differential Calculus of Functions of One Variable33 entries

  1. Example 2.2
    √x defines a functionchecks · at Course
    Let x : RealAssume x >= 0Step: sqrt(x)^2 = xStep: sqrt(x) >= 0Step: (-sqrt(x))^2 = x
  2. Example 2.4
    A product of square-root functionschecks · at Course
    Let x : RealAssume 1 <= x and x <= 2Step: sqrt(4 - x^2) * sqrt(x - 1) = sqrt((4 - x^2) * (x - 1))
  3. Example 2.7
    lim cx = cx₀, by ε–δchecks · at Course
    Theorem: "Limit of cx"Proof:    Let c, x0 : Real    Assume hc: c != 0    Given \epsilon : Real where \epsilon > 0    Let \delta = \epsilon / |c|    Step: \delta > 0    Subproof:        Given x : Real        Assume |x - x0| < \delta        Step: |c * x - c * x0| = |c| * |x - x0|        Step: < |c| * \delta        Step: = \epsilon    Therefore exists \delta : Real, \delta > 0 and (forall x : Real, |x - x0| < \delta => |c * x - c * x0| < \epsilon) [witness: \epsilon / |c|]QED
  4. Example 2.8
    x sin(1/x) → 0checks · at Course
    Let x, \epsilon : RealAssume \epsilon > 0Assume hx: 0 < |x| and |x| < \epsilonStep: |x * sin(1/x)| = |x| * |sin(1/x)|Step: <= |x|Step: < \epsilonStep: lim(x * sin(1/x), x, 0) = 0
  5. Example 2.8
    A bound that is too tighttrap · fails, as it should · at Course
    Let x : RealAssume x != 0Step: |x * sin(1/x)| <= |x| / 2

    |sin(1/x)| can reach 1, so |x sin(1/x)| can equal |x|; it is not bounded by |x|/2.

  6. Theorem 2.9
    Limits are uniquechecks · at Course
    Let x, L1, L2, \epsilon : RealAssume \epsilon > 0Assume h1: |f(x) - L1| < \epsilonAssume h2: |f(x) - L2| < \epsilonStep: |L1 - L2| = |(L1 - f(x)) + (f(x) - L2)|Step: <= |L1 - f(x)| + |f(x) - L2|Step: < 2 * \epsilon
  7. Theorem 2.10
    The product-limit identitychecks · at Course
    Let x, L1, L2 : RealStep: f(x) * g(x) - L1 * L2 = f(x) * (g(x) - L2) + L2 * (f(x) - L1)Step: |f(x)| <= |f(x) - L1| + |L1|
  8. Example 2.11
    Limits by Theorem 2.10checks · at Course
    Step: lim(9 - x^2, x, 2) = 5Step: lim(x + 1, x, 2) = 3Step: lim((9 - x^2)/(x + 1), x, 2) = 5/3Step: lim((9 - x^2)*(x + 1), x, 2) = 15Step: \lim_{x \to 2} (9 - x^2)/(x + 1) = 5/3
  9. Example 2.11
    Dividing the limits wronglytrap · fails, as it should · at Course
    Step: lim((9 - x^2)/(x + 1), x, 2) = 5

    lim (9 − x²)/(x + 1) at x = 2 is 5/3: the numerator tends to 5 and the denominator to 3, not 1.

  10. Examples 2.13, 2.15
    One-sided limitschecks · at Course
    Step: lim(x/|x|, x, 0, "-") = -1Step: lim(x/|x|, x, 0, "+") = 1Step: lim(|x|/x + x, x, 0, "+") = 1Step: lim(|x|/x + x, x, 0, "-") = -1Step: lim(x * sin(sqrt(x)), x, 0, "+") = 0Step: \lim_{x \to 0^+} x/|x| = 1
  11. Theorem 2.16
    A two-sided limit that does not existtrap · fails, as it should · at Course
    Step: lim(x/|x|, x, 0) = 1

    x/|x| tends to −1 from the left and 1 from the right; by Theorem 2.16 the two-sided limit does not exist.

  12. Example 2.18
    Limits at infinitychecks · at Course
    Step: lim(1 - 1/x^2, x, oo) = 1Step: lim(2*|x|/(1 + x), x, oo) = 2Step: lim(1 - 1/x^2, x, -oo) = 1Step: lim(2*|x|/(1 + x), x, -oo) = -2Step: \lim_{x \to \infty} (1 - 1/x^2) = 1
  13. Example 2.18
    The ε argument for gchecks · at Course
    Let x, \epsilon : RealAssume he: \epsilon > 0Assume hx: x > 2 / \epsilonStep: x > 0Step: |2*x/(1 + x) - 2| = 2/(1 + x)Step: < 2/xStep: < \epsilon
  14. Example 2.20
    Infinite limitschecks · at Course
    Step: lim(1/x, x, 0, "-") = -ooStep: lim(1/x, x, 0, "+") = ooStep: lim(1/x^2, x, 0) = ooStep: lim(x^2, x, oo) = ooStep: lim(x^3, x, oo) = ooStep: lim(x^3, x, -oo) = -oo
  15. Example 2.20
    A two-sided infinite limittrap · fails, as it should · at Course
    Step: lim(1/x, x, 0) = oo

    1/x tends to +∞ from the right but −∞ from the left, so the two-sided limit is not ∞.

  16. Examples 2.21–2.23
    Limits via Theorem 2.10checks · at Course
    Step: lim(sinh(x), x, oo) = ooStep: lim(sinh(x), x, -oo) = -ooStep: lim(exp(-x)/x, x, oo) = 0Step: lim(exp(2*x) - exp(x), x, oo) = ooStep: lim((2*x^2 - x + 1)/(3*x^2 + 2*x - 1), x, oo) = 2/3Let x : RealStep: sinh(x) = (exp(x) - exp(-x))/2
  17. Example 2.28
    One-sided limits of a piecewise functionchecks · at Course
    Step: lim(x^2, x, 0, "+") = 0Step: lim(x^2, x, 1, "-") = 1Step: lim(x + 1, x, 1, "+") = 2Step: lim(x + 1, x, 2, "-") = 3Let x, x0 : RealAssume 0 < x and x < 1 and 0 < x0 and x0 < 1Step: |x^2 - x0^2| = |x - x0| * |x + x0|Step: <= 2 * |x - x0|
  18. Example 2.30
    √x is continuouschecks · at Course
    Let x, x0 : RealAssume x >= 0Assume x0 > 0Step: |sqrt(x) - sqrt(x0)| = |x - x0| / (sqrt(x) + sqrt(x0))Step: <= |x - x0| / sqrt(x0)
  19. Example 2.39
    A composite functionchecks · at Course
    Let f(t) = log(t)Let g(t) = 1/(1 - t^2)Let x : RealAssume -1 < x and x < 1Step: f(g(x)) = log(1/(1 - x^2))Step: g(x) > 0
  20. Example 2.49
    2x is uniformly continuouschecks · at Course
    Let x, y, \epsilon : RealAssume \epsilon > 0Assume |x - y| < \epsilon / 2Step: |2*x - 2*y| = 2 * |x - y|Step: < \epsilon
  21. Example 2.50
    x² is uniformly continuous on [−r, r]checks · at Course
    Let x, y, r : RealAssume r > 0Assume |x| <= r and |y| <= rStep: |x^2 - y^2| = |x - y| * |x + y|Step: <= 2 * r * |x - y|
  22. Example 2.51
    x² is not uniformly continuous on ℝchecks · at Course
    Let x, y, \delta : RealAssume \delta > 0Assume x > 1/\delta and y > 1/\deltaAssume |x - y| = \delta / 2Step: |x^2 - y^2| = |x - y| * |x + y|Step: > (\delta / 2) * (1/\delta + 1/\delta)Step: = 1
  23. Example 2.52
    cos(1/x) is not uniformly continuouschecks · at Course
    Let n : IntStep: |cos(n * pi) - cos((n + 1) * pi)| = 2
  24. Examples 2.57–2.58
    Inverse functionschecks · at Course
    Let f(t) = 2*t + 4Let g(s) = (s - 4)/2Let x, y : RealStep: g(f(x)) = xStep: f(g(y)) = yLet F(t) = t^2Let G(s) = sqrt(s)Let u : RealAssume u >= 0Step: G(F(u)) = uStep: F(G(u)) = u
  25. Example 2.60
    d/dx xⁿ = n xⁿ⁻¹checks · at Course
    Let n : NatLet x, x0 : RealStep: diff(x^n, x) = n * x^(n - 1)Step: lim((x^3 - x0^3)/(x - x0), x, x0) = 3 * x0^2Assume x != x0Step: (x^3 - x0^3)/(x - x0) = x^2 + x*x0 + x0^2
  26. Example 2.60
    Forgetting to lower the powertrap · fails, as it should · at Course
    Let x : RealStep: diff(x^3, x) = 3 * x^3

    d/dx x³ = 3x², not 3x³: differentiating lowers the exponent by one.

  27. Example 2.63
    |x| has different one-sided derivatives at 0checks · at Course
    Step: lim((|x| - 0)/(x - 0), x, 0, "+") = 1Step: lim((|x| - 0)/(x - 0), x, 0, "-") = -1
  28. Theorem 2.64
    The product and quotient ruleschecks · at Course
    Let f(t) = t^2 + 1Let g(t) = exp(t)Let x : RealStep: diff(f(x) * g(x), x) = diff(f(x), x) * g(x) + f(x) * diff(g(x), x)Step: diff(f(x) / g(x), x) = (diff(f(x), x) * g(x) - f(x) * diff(g(x), x)) / g(x)^2
  29. Example 2.66
    The chain rulechecks · at Course
    Let x : RealAssume x != 0Step: diff(sin(1/x), x) = cos(1/x) * (-1/x^2)
  30. Example 2.67
    One-sided derivatives at 0checks · at Course
    Step: lim((x^2 * sin(1/x) - 0)/(x - 0), x, 0, "+") = 0Step: lim((x^3 - 0)/(x - 0), x, 0, "-") = 0
  31. Theorem 2.73
    h(a) = h(b) in the generalised MVTchecks · at Course
    Let fa, fb, ga, gb : RealStep: (gb - ga)*fa - (fb - fa)*ga = (gb - ga)*fb - (fb - fa)*gb
  32. Theorem 2.74
    The mean value theorem for x³ on [0, 3]checks · at Course
    Let f(x) = x^3Let fp(x) = 3 * x^2Let t : RealStep: diff(f(t), t) = fp(t)Let c = sqrt(3)Step: c > 0 and c < 3Step: fp(c) = (f(3) - f(0)) / (3 - 0)
  33. Theorem 2.71
    Rolle's theorem for x² − 2x on [0, 2]checks · at Course
    Let f(x) = x^2 - 2*xLet t : RealStep: f(0) = f(2)Step: diff(f(t), t) = 2*t - 2Step: 2*1 - 2 = 0

3 Infinite Sequences and Series14 entries

  1. Example 3.3
    (2n + 1)/(n + 1) → 2checks · at Course
    Theorem: "Example 3.3"Proof:    Given \epsilon : Real where \epsilon > 0    Let N : Int where N >= 1 / \epsilon and N >= 1    Given n : Int where n >= N    Step: |(2*n + 1)/(n + 1) - 2| = 1/(n + 1)    Step: < 1/N    Step: <= \epsilon    Step: lim((2*n + 1)/(n + 1), n, oo) = 2QED
  2. Example 3.4
    Sequences diverging to ±∞checks · at Course
    Let n, a : RealAssume n > 0 and n >= 2 * aStep: n/2 + 1/n > aStep: lim(n/2 + 1/n, n, oo) = ooStep: lim(n - n^2, n, oo) = -oo
  3. Examples 3.6–3.7
    Sequences of functional valueschecks · at Course
    Step: lim(log(x)/x, x, oo) = 0Step: lim(x * log(1 + 1/x), x, oo) = 1Step: lim((1 + 1/x)^x, x, oo) = e
  4. Example 3.8
    ρⁿ → 0 for 0 < ρ < 1checks · at Course
    Let \rho : RealAssume 0 < \rho and \rho < 1Step: lim(\rho^n, n, oo) = 0
  5. Example 3.11
    Convergent subsequenceschecks · at Course
    Step: lim(1 + 1/(2*k), k, oo) = 1Step: lim(-1 - 1/(2*k + 1), k, oo) = -1
  6. Example 3.16
    1/n is Cauchychecks · at Course
    Let n, m, N : IntAssume N >= 1 and n >= N and m >= NStep: |1/n - 1/m| <= 1/n + 1/mStep: <= 2/N
  7. Lemma 3.17
    Convergent implies Cauchychecks · at Course
    Let sn, sm, s, \epsilon : RealAssume \epsilon > 0Assume |sn - s| < \epsilon / 2Assume |sm - s| < \epsilon / 2Step: |sn - sm| = |(sn - s) - (sm - s)|Step: <= |sn - s| + |sm - s|Step: < \epsilon / 2 + \epsilon / 2Step: = \epsilon
  8. Example 3.22
    The geometric serieschecks · at Course
    Let r : RealLet n : NatAssume r != 1Step: sum(k, 0, n, r^k) = (1 - r^(n + 1))/(1 - r)Assume |r| < 1Step: sum(k, 0, oo, r^k) = 1/(1 - r)Step: \sum_{k=0}^{\infty} r^k = 1/(1 - r)
  9. Example 3.22
    An off-by-one partial sumtrap · fails, as it should · at Course
    Let r : RealLet n : NatAssume r != 1Step: sum(k, 0, n, r^k) = (1 - r^n)/(1 - r)

    1 + r + … + rⁿ has n + 1 terms, so its closed form is (1 − rⁿ⁺¹)/(1 − r), not (1 − rⁿ)/(1 − r).

  10. Example 3.27
    The tail of the geometric serieschecks · at Course
    Let r : RealLet m : NatAssume |r| < 1Step: sum(k, m, oo, r^k) = r^m / (1 - r)
  11. Example 3.30
    The derivative of xⁿe⁻ⁿˣchecks · at Course
    Let x : RealLet n : NatAssume n >= 1Step: diff(x^n * exp(-n*x), x) = n * x^(n - 1) * exp(-n*x) * (1 - x)
  12. Example 3.45
    Partial sums of Σ xʲchecks · at Course
    Let x : RealLet n : NatAssume x != 1Step: sum(j, 0, n, x^j) = (1 - x^(n + 1))/(1 - x)Step: 1/(1 - x) - (1 - x^(n + 1))/(1 - x) = x^(n + 1)/(1 - x)
  13. Example 3.49
    Bounds for the Weierstrass testchecks · at Course
    Let x : RealLet n : IntAssume n >= 1Step: 1/(x^2 + n^2) <= 1/n^2Step: |sin(n*x)/n^2| <= 1/n^2Step: sum(k, 1, oo, 1/k^2) = pi^2/6
  14. Example 3.50
    |x/(1 + x)| ≤ rchecks · at Course
    Let x, r : RealAssume 0 < r and r < 1Assume -r/(1 + r) <= x and x <= r/(1 - r)Step: |x/(1 + x)| <= r

4 Continuity and Differentiability3 entries

  1. Example 4.15
    A Lipschitz constant of 3checks · at Course
    Let x, y : RealAssume 0 <= x and x <= 1 and 0 <= y and y <= 1Step: |x^2 - y^2| = |x - y| * |x + y|Step: <= 2 * |x - y|Let u, v : RealStep: |(-3*u) - (-3*v)| = 3 * |u - v|Let p, q : RealAssume p > 0 and q < 0Step: 2*|p| + 3*|q| < 3*(|p| + |q|)Step: |p - q| = |p| + |q|
  2. Exercise 4.16
    The Lipschitz constant of ln(x² + k²)checks · at Course
    Let x, k : RealAssume k > 0Step: diff(ln(x^2 + k^2), x) = 2*x/(x^2 + k^2)Step: |2*x/(x^2 + k^2)| <= 1/k
  3. Exercise 4.16
    Halving the Lipschitz constanttrap · fails, as it should · at Course
    Let x, k : RealAssume k > 0Step: |2*x/(x^2 + k^2)| <= 1/(2*k)

    |2x/(x² + k²)| reaches 1/k at x = k, so 1/(2k) is too small to be a Lipschitz constant.

5 Integrability4 entries

  1. Example 5.12
    The integral of a constantchecks · at Course
    Let a, b, c : RealStep: integrate(c, x, a, b) = c*(b - a)Let n : NatStep: sum(i, 1, n, x(i) - x(i - 1)) = x(n) - x(0)
  2. Example 5.14
    The integral of logchecks · at Course
    Let n : NatAssume n >= 2Step: integrate(log(x), x, 1, n) = n*log(n) - n + 1
  3. Theorems 5.21–5.22
    The fundamental theorem of calculuschecks · at Course
    Let x : RealStep: diff(integrate(t^2 + sin(t), t, 0, x), x) = x^2 + sin(x)Step: integrate(3*t^2, t, 1, 2) = 2^3 - 1^3Step: \int_{1}^{2} 3*t^2 dt = 7
  4. Theorem 5.24
    The substitution formulachecks · at Course
    Step: integrate(2*x*cos(x^2), x, 0, sqrt(pi)) = integrate(cos(u), u, 0, pi)