第 11 章
极值定理、介值定理与度量空间
先用序列刻画连续性,再借 Bolzano–Weierstrass 证明极值定理:像集有界,且上确界被取到;随后用上确界构造证明介值定理。最后把距离抽象成度量空间,给出欧氏、出租车、连续函数空间等例子,并说明收敛与 Cauchy 性如何推广。
Extreme and Intermediate Value Theorems; Metric Spaces
Continuity is first characterized by sequences, then Bolzano-Weierstrass proves the extreme value theorem: the image is bounded and the supremum is attained. The intermediate value theorem follows from a supremum construction. Finally, distance is abstracted into a metric space, with Euclidean, taxicab and function-space examples, and convergence and Cauchy sequences are generalized.
篇内目录
- Two languages for continuity
- Sequential characterization
- Timeline
- Extreme value theorem
- Step one: the image is bounded
- Step two: the supremum is attained
- Intermediate value theorem
- Metric spaces
- Examples
- Convergence and Cauchy sequences in metric spaces
- Continuous functions on metric spaces
- What this lecture establishes
- Comprehension check
- Relation to neighbouring lectures
连续性的两种语言
第一讲提出了介值定理,并用「粉笔不能离开黑板」的直觉描述连续性。现在工具齐了:单调收敛、Bolzano–Weierstrass、Cauchy 收敛都已证完,可以把这两条定理真正证出来。
先回顾定义。 在 连续,指对每个 ,存在 ,使得当 (且 在定义域内)时,
一般同时依赖 与 。
但证明定理时,- 并不总是最顺手的语言。下面这条引理把它翻译成序列语言,后面两个定理的证明都会用到它。
序列刻画
引理。 设 定义在 上,在 连续。若 是 中的序列且 ,则
证明。 给定 。由 在 连续,存在 ,使得
由 ,对这个 存在 ,使得 时 。于是 时
所以 。
用一句话概括:连续函数可以与极限交换次序,
反方向也成立(教材中常写成一充要条件):若对每个收敛到 的序列都有 ,则 在 连续。本讲只用正方向。
时间轴
| 时间 | 内容 |
|---|---|
| 0:00 | 连续性回顾;两个值定理的陈述 |
| 7:24 | 引理:连续性与序列极限可交换 |
| 15:16 | 极值定理证明第一步:像集有界 |
| 20:28 | 第二步:上确界被取到 |
| 26:25 | 介值定理:构造集合 并取上确界 |
| 39:57 | 度量空间的定义与三条公理 |
| 44:55 | 例子:、欧氏、出租车距离、 |
| 53:57 | 怪例子:整数上的 $ |
| 57:23 | 法国铁路距离 |
| 1:01:22 | 度量空间中的收敛与 Cauchy 列 |
| 1:12:12 | 度量空间中的连续函数;赋值映射连续 |
极值定理
定理(极值定理,EVT)。 设 在闭区间 上连续,则存在 ,使得对一切 ,
也就是说, 在 上取到最大值与最小值(从而有界)。
第一步:像集有界
先证上界。反设 无上界。则对每个整数 ,数 不是上界,故存在 使
是有界序列(都落在 里),由 Bolzano–Weierstrass 定理,存在收敛子列 。因为 ,取极限得 。
由 连续与序列引理,。收敛序列必有界,所以 有界。但另一方面 ,无界。矛盾。
同理可证下界。故 是有界集。
第二步:上确界被取到
令
由第一步, 是有限实数。
对每个 , 严格小于上确界,因此不是上界,故存在 使
右边的不等号来自 是上界。再次用 Bolzano–Weierstrass,取收敛子列 ,同样 。
由连续性,。另一方面,把不等式沿子列写出:
左右两端都趋于 ,由夹逼,
所以上确界被取到, 就是最大值点。对下确界重复同样的论证(或对 用已证结论)得到最小值点 。
证明的结构值得记住:上确界不一定被取到在一般集合上是常态(例如 的上确界 不在集合里)。连续性 + 闭区间恰好保证了两件事——像集有界,且逼近上确界的点列有收敛子列,而子列的极限仍在定义域内。
两个条件都不能去掉:
- 区间必须闭: 在 上连续,但既无最大值也无最小值。
- 函数必须连续:()、 在 上有界,却取不到上确界。
介值定理
定理(介值定理,IVT)。 设 在 上连续,。则存在 使 。
课程只证这个特例。一般情形( 取遍 与 之间的一切值)只需对 用这个特例。
证明。 定义集合
直观上, 是「从 出发、函数一直非正」能走到的所有位置。
非空且有界。 ,因为区间 上只有 。又 ,故有界。
令
由 与 ,得 。
断言:。
对每个 , 不是 的上界(它小于上确界),故存在 使
于是 。因为 ,有 。由连续性与序列引理 ,而极限保持不等号,故
断言:。
反设 。取 使
由 在 连续,存在 ,使得 时
现在说明这会与 矛盾。取
这个区间非空(因为 ,),且 。
- 若 :由 ,存在 且 (否则 就是更小的上界)。 的定义给出 在 上成立,而 ,故 。
- 若 :由 得 。
两段合起来, 在整个 上成立,所以 。但 ,矛盾。
因此 。结合前一个断言,,且 (端点处函数值非零),故 。
证明的骨架只有两句话:上确界从左边逼近,连续性把 传过去;若严格小于零,则右边还有一小段也满足条件,上确界就不够大。这与第一讲「粉笔不能离开黑板」的直觉完全对应,只是每一步都换成了可以检查的论证。
度量空间
前面的所有概念都建立在 上。把「距离」抽象出来,就得到度量空间。
定义。 度量空间是一个集合 配上一个映射 ,满足三条:
- 正定:,且 ;
- 对称:;
- 三角不等式:。
第三条是实质内容:绕路不会更近。
例子
上的通常距离。 。
上的欧氏距离。
三角不等式就是「两点之间线段最短」,证明并不平凡(需要 Cauchy–Schwarz 不等式)。 同理,只是根号下多一项。
出租车距离(box distance)。
三条公理都好验证:正定与对称显然;三角不等式逐坐标用 上的三角不等式相加即可。它度量的是「只能沿坐标轴走」时的路程。
连续函数空间 。 取 为 上全体连续函数,
这个最大值确实存在—— 连续,由极值定理保证取到最大值。三条公理:正定性来自「连续函数若处处为零则距离为零」;对称显然;三角不等式逐点用 上的版本再取最大值。
这里出现了一个循环意味很妙的地方:定义这个度量需要极值定理,而极值定理的证明只用到 的结构,不依赖 。所以逻辑上是干净的。
整数上的怪距离。
正定与对称显然。三角不等式不必硬算:映射 把 单射进 ,这个距离只是把 的通常距离沿这个单射拉回来,因此自动满足三角不等式。
效果很反直觉: 与 在通常意义下相距 ,在这里却只相距约 。距离是附加的结构,不是集合自带的。
法国铁路距离。 取 ,把原点想象成巴黎:
两地若在同一条通往巴黎的线路上,可以直达;否则必须先到巴黎再出发。Cannes 与 Nice 在地图上很近,坐法国铁路却要先绕巴黎——这就是这个名称的由来。
度量空间中的收敛与 Cauchy 列
定义几乎逐字照搬:
- 序列 收敛到 :对每个 ,存在 ,当 时 。
- 是 Cauchy 列:对每个 ,存在 ,当 时 。
定理。 度量空间中,收敛序列必是 Cauchy 列。
证明。 设 。给定 ,取 使 时
则当 时,由三角不等式
反过来不成立。 这正是度量空间与 的关键差别。取
序列 。它在 中收敛到 ,因此是 Cauchy 列;但在 中 根本不存在,所以它在 中不收敛。
有 Cauchy 收敛性质的度量空间称为完备的。 完备(这正是 Cauchy 收敛定理), 不完备。一个自然的问题是:能不能把空间放大,使所有 Cauchy 列都有极限?有时可以(完备化),有时不行——课程把这留作后续方向。
度量空间中的连续函数
设 是度量空间,。 在 连续,指对每个 ,存在 ,使得
与 上的定义相比,唯一的改动是把 换成 。
例子:赋值映射。 在 上定义
断言 连续。对任意 ,
所以给定 ,取 即可。这实际上说明 是「不放大距离」的映射(Lipschitz 常数为 )。
这个例子小,但意义不小:函数本身可以是另一个空间的点,而「在一点取值」是这个空间上的连续函数。度量空间的语言让这种层次变得自然。
最后,序列引理在度量空间中同样成立,证明一字不改:若 在 连续且 ,则 。只需把 读作 。
本节结论
- 连续函数与序列极限可交换: ⇒ 。
- 极值定理:闭区间上的连续函数有界,且取到最大、最小值。证明分两步——像集有界(反证 + Bolzano–Weierstrass),上确界被取到(逼近 + 子列 + 夹逼)。
- 介值定理:用集合 的上确界 ,证明 与 。
- 度量空间 = 集合 + 满足正定、对称、三角不等式的距离。
- 欧氏距离与出租车距离给出不同的几何; 上的上确界距离依赖极值定理;整数上的 与法国铁路距离说明距离可以很反直觉。
- 收敛 ⇒ Cauchy,但反过来需要完备性; 中的 是标准反例。
- 度量空间中的连续性只是把绝对值换成距离;赋值映射 连续。
理解检验
1. 为什么极值定理的证明需要「闭区间」和「连续性」两个条件?各举一个去掉后结论失败的例子。
参考答案:闭区间保证两件事:像集有界性的反证中,逼近点列 有界,从而有收敛子列;以及子列的极限 仍落在定义域内( 取极限)。连续性保证 ,从而把「」与「收敛列有界」对立起来。去掉闭性: 在 上连续但无最大最小值。去掉连续性:()、 在 上有界但取不到上确界 。
2. 在介值定理的证明中,为什么 一定满足 ?
参考答案:对每个 , 不是 的上界,所以能取到 且 。于是 。因为 ,有 。连续性给出 ,而极限保持不等号(若 ,取 会与 矛盾),故 。
3. 若 ,证明中如何构造矛盾?关键用到 的哪条性质?
参考答案:取 使 。连续性给出 ,使 时 。取 。对 ,由 可找到 且 ,于是 在 上成立,特别地 。对 ,由连续性 。故 在整个 上成立,即 ,与 是上确界矛盾。关键用的是: 中元素「从 起一直非正」,且上确界左侧总能用 中的点逼近。
4. 验证 是 上的度量,并解释为什么 与 在这个度量下很近。
参考答案:令 ,则 。 是单射,所以 ;非负与对称由绝对值继承;三角不等式由 上的三角不等式直接得到:
,因为 在 很大时变化极慢。这正说明距离是额外赋予的结构,与数值大小无关。
5. 为什么「收敛 ⇒ Cauchy」在任意度量空间都成立,而「Cauchy ⇒ 收敛」不成立?
参考答案:前者只需三角不等式与收敛的定义:,这对任何度量空间都成立。后者要求极限点存在于空间内。反例: 取通常距离, 是 Cauchy 列,但在 中若 ,则 必须是 (在 中极限唯一),而 ,故不收敛。这类空间称为不完备; 的完备性正是 Cauchy 收敛定理。
6. 证明赋值映射 在 上连续,并说明它为什么是 Lipschitz 的。
参考答案:
给定 ,取 ,则 时 。由于不等式对一切 成立且系数为 , 是 Lipschitz 常数为 的映射。
与前后课的关系
这一讲兑现了第一讲的承诺:介值定理在第十一讲被真正证明,而且证明只用到完备性、Bolzano–Weierstrass 与连续性的定义——正是第一讲所说「实数是有序完备域」的全部内容。
度量空间则把视野抬高了一层。收敛、Cauchy 列、连续性都只依赖距离的三条公理,不依赖加法或乘法。这也解释了为什么这些概念能原样搬到函数空间上。下一讲开始研究开集、闭集、覆盖与紧性——它们刻画的是「哪些集合上的连续函数仍然享有极值定理」,而 与 的差别,届时会有统一的解释。
Two languages for continuity
The first lecture announced the intermediate value theorem and described continuity with the image of chalk that may not leave the blackboard. The tools are now in place — monotone convergence, Bolzano–Weierstrass and Cauchy convergence are all proved — so the theorem can be proved properly.
Recall the definition: is continuous at if for every there is such that whenever (and lies in the domain),
In general depends on both and .
For proving theorems, however, - is not always the easiest language. The following lemma translates it into sequences, and both value theorems are proved with it.
Sequential characterization
Lemma. Let be defined on and continuous at . If is a sequence in with , then
Proof. Given . Continuity of at gives such that
Since , for this there is with whenever . Hence for ,
So .
In one phrase: a continuous function commutes with limits,
The converse also holds (the equivalence is standard): if for every sequence converging to , then is continuous at . This lecture uses only the forward direction.
Timeline
| Time | Topic |
|---|---|
| 0:00 | Continuity recap; statements of the two value theorems |
| 7:24 | Lemma: continuity commutes with sequential limits |
| 15:16 | EVT, step one: the image is bounded |
| 20:28 | Step two: the supremum is attained |
| 26:25 | IVT: build the set and take its supremum |
| 39:57 | Metric spaces: definition and three axioms |
| 44:55 | Examples: , Euclidean, taxicab, |
| 53:57 | A strange example: $ |
| 57:23 | The French railway metric |
| 1:01:22 | Convergence and Cauchy sequences in metric spaces |
| 1:12:12 | Continuous functions on metric spaces; the evaluation map |
Extreme value theorem
Theorem (EVT). Let be continuous on the closed interval . Then there exist such that for all ,
That is, attains a maximum and a minimum on , and is therefore bounded.
Step one: the image is bounded
First show it is bounded above. Suppose not. Then for every integer , the number is not an upper bound, so there is with
is bounded (it lies in ), so Bolzano–Weierstrass gives a convergent subsequence . Since , passing to the limit gives .
By continuity and the sequence lemma, . Convergent sequences are bounded, so is bounded. But , which is unbounded. Contradiction.
The lower bound is identical. Hence is bounded.
Step two: the supremum is attained
Set
finite by step one.
For each , the number is strictly below the supremum and hence not an upper bound, so there is with
The right inequality holds because is an upper bound. Bolzano–Weierstrass again gives a convergent subsequence , and again .
Continuity gives . Along the subsequence,
Both ends tend to , so by squeezing,
The supremum is attained, and is a maximum point. Repeating the argument for the infimum (or applying the result to ) gives the minimum point .
The structure is worth remembering: a supremum need not be attained — for the set the supremum is not in the set. Continuity plus a closed interval guarantees exactly two things: the image is bounded, and points approaching the supremum have a convergent subsequence whose limit still lies in the domain.
Neither hypothesis can be dropped:
- The interval must be closed: on is continuous but attains neither maximum nor minimum.
- The function must be continuous: for and on is bounded but never attains the supremum.
Intermediate value theorem
Theorem (IVT). Let be continuous on with . Then there is with .
The lecture proves this special case. The general statement (every value between and is attained) follows by applying the special case to .
Proof. Define
Intuitively, collects the positions reachable from while stays non-positive.
is nonempty and bounded. because on only matters. And , so it is bounded.
Set
Since and , we have .
Claim: .
For each , the number is not an upper bound of , so there is with
Thus . Since , we have . Continuity and the sequence lemma give , and limits preserve inequalities, so
Claim: .
Suppose . Choose with
Continuity at gives such that implies
This contradicts . Pick
The interval is nonempty because forces , and .
- If : since , there is with (otherwise would be a smaller upper bound). By definition of , on , and , so .
- If : from we get .
Together, on all of , so . But , a contradiction.
Therefore . With the first claim, , and since the endpoints have nonzero values, so .
The skeleton is two sentences: the supremum is approached from the left, and continuity carries to it; if the value were strictly negative, a short stretch to the right would also qualify, so the supremum was not large enough. This is exactly the chalk-on-the-blackboard intuition from the first lecture, with every step made checkable.
Metric spaces
Everything so far rested on . Abstracting "distance" gives a metric space.
Definition. A metric space is a set with a map satisfying three axioms:
- Positive definite: , and ;
- Symmetric: ;
- Triangle inequality: .
The third is the substantive one: a detour is never shorter.
Examples
Usual distance on . .
Euclidean distance on .
The triangle inequality is "the straight path is shortest", whose proof is nontrivial (it needs Cauchy–Schwarz). The same works on with a third term under the root.
Taxicab (box) distance.
All three axioms are easy: positive definiteness and symmetry are clear, and the triangle inequality follows coordinate by coordinate from the one on . It measures the distance when one may only travel parallel to the axes.
**The space . Let be the continuous functions on and
The maximum exists because is continuous, by the extreme value theorem. Positive definiteness comes from "a continuous function that vanishes everywhere has distance zero"; symmetry is clear; the triangle inequality is applied pointwise and then maximized.
There is a pleasant interplay here: defining this metric needs the EVT, whose proof uses only the structure of and not . The logic is therefore clean.
A strange distance on the integers.
Positive definiteness and symmetry are clear. The triangle inequality need not be checked by hand: the map injects into , and this distance is simply the usual distance pulled back along that injection, so the triangle inequality is inherited.
The effect is counterintuitive: and are one unit apart in the usual sense but about apart here. Distance is added structure, not something a set carries by itself.
The French railway metric. Let , with the origin playing the role of Paris:
Two towns on the same line through Paris can travel directly; otherwise the journey must pass through Paris. Cannes and Nice are close on the map but far by rail — hence the name.
Convergence and Cauchy sequences in metric spaces
The definitions transfer almost verbatim:
- converges to : for every there is with for .
- is Cauchy: for every there is with for .
Theorem. In a metric space, every convergent sequence is Cauchy.
Proof. Let . Given , choose with
for . Then for , the triangle inequality gives
The converse fails. This is the key difference from . Take
and . In it converges to , so it is Cauchy; but is not in , so it does not converge in .
A metric space in which every Cauchy sequence converges is complete. is complete (that is the Cauchy convergence theorem); is not. A natural question is whether the space can be enlarged so that all Cauchy sequences converge — sometimes yes (completion), sometimes no. The lecture leaves this as a direction for later.
Continuous functions on metric spaces
Let be a metric space and . Then is continuous at if for every there is such that
The only change from is replacing by .
Example: the evaluation map. On define
Then is continuous. For any ,
Given , take . In fact does not stretch distances (it is Lipschitz with constant ).
Small as it is, the example carries a point: a function can be a point of another space, and "evaluate at a point" is a continuous function on that space. The language of metric spaces makes this hierarchy natural.
Finally, the sequence lemma holds in metric spaces with an unchanged proof: if is continuous at and , then ; one simply reads as .
What this lecture establishes
- Continuous functions commute with sequential limits: implies .
- EVT: a continuous function on a closed interval is bounded and attains its maximum and minimum. The proof has two steps — bounded image (contradiction plus Bolzano–Weierstrass), then attainment of the supremum (approximation, subsequence, squeezing).
- IVT: take the supremum of and prove both and .
- A metric space is a set with a distance satisfying positive definiteness, symmetry and the triangle inequality.
- Euclidean and taxicab distances give different geometries; the sup metric on relies on the EVT; on the integers and the French railway metric show how counterintuitive distance can be.
- Convergent implies Cauchy, but the converse needs completeness; the sequence in is the standard counterexample.
- Continuity on a metric space just replaces the absolute value by the distance; the evaluation map is continuous.
Comprehension check
1. Why does the EVT need both "closed interval" and "continuity"? Give an example showing the conclusion fails without each.
Reference answer: Closedness guarantees two things: in the boundedness argument the approximating sequence is bounded, hence has a convergent subsequence; and the limit stays in the domain, since passes to the limit. Continuity gives , setting up the contradiction between "" and "convergent sequences are bounded". Without closedness: on is continuous but attains neither extreme. Without continuity: for , on is bounded but never attains the supremum .
2. In the IVT proof, why must satisfy ?
Reference answer: For each , is not an upper bound of , so there is with , hence . Since , . Continuity gives , and limits preserve inequalities (if , taking contradicts ), so .
3. If , how does the proof derive a contradiction, and which property of is essential?
Reference answer: Choose with . Continuity gives such that implies . Pick . For , the supremum property yields with , so on and in particular . For , continuity gives . Hence on , i.e. , contradicting that is an upper bound. The essential property: elements of keep non-positive from onward, and the supremum can be approached from below by elements of .
4. Verify that is a metric on , and explain why and are close in it.
Reference answer: Let ; then . Since is injective, iff ; non-negativity and symmetry are inherited from the absolute value; the triangle inequality follows from that on :
And , because changes very slowly for large . Distance is extra structure, unrelated to numerical size.
5. Why does "convergent ⇒ Cauchy" hold in every metric space, while "Cauchy ⇒ convergent" fails?
Reference answer: The first needs only the triangle inequality and the definition of convergence: . The second requires the limit point to exist in the space. Counterexample: with the usual distance, is Cauchy, but if it converged in the limit would have to be (unique in ), and . Such spaces are incomplete; completeness of is exactly the Cauchy convergence theorem.
6. Prove that the evaluation map is continuous on , and explain why it is Lipschitz.
Reference answer:
Given , take ; then implies . Since the inequality holds for all with constant , is Lipschitz with constant .
Relation to neighbouring lectures
This lecture redeems the promise of the first: the intermediate value theorem is proved in lecture eleven, using only completeness, Bolzano–Weierstrass and the definition of continuity — exactly "the reals are a complete ordered field".
Metric spaces lift the viewpoint one level. Convergence, Cauchy sequences and continuity depend only on the three distance axioms, not on addition or multiplication. That is why the same notions carry over verbatim to function spaces. The next lecture studies open sets, closed sets, coverings and compactness — which characterize the sets on which continuous functions still enjoy the extreme value theorem, and explain uniformly what separates from .