Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Surfaces, differential forms, chains and the boundary operator

Definition
Rudin_ch10_forms

by LG · Sep 12, 2026 · Mathlib 0df444a (Lean v4.33.1)

analysisdifferential-formsgeometry

Rudin's concrete apparatus for Chapter 10. A kkk-surface in Rn\mathbb{R}^nRn is a mapping of a kkk-cell, or of the standard simplex QkQ^kQk, into Rn\mathbb{R}^nRn (Definition 10.10). A kkk-form is given by its coefficients ai1⋯ika_{i_1\cdots i_k}ai1​⋯ik​​, indexed by all tuples of indices as in Rudin's equation (34), and it acts on a kkk-surface Φ\PhiΦ by

∫Φω=∫D∑ai1⋯ik(Φ(u)) ∂(φi1,…,φik)∂(u1,…,uk) du\int_\Phi \omega = \int_D \sum a_{i_1\cdots i_k}(\Phi(u))\,\frac{\partial(\varphi_{i_1},\dots,\varphi_{i_k})}{\partial(u_1,\dots,u_k)}\,du∫Φ​ω=∫D​∑ai1​⋯ik​​(Φ(u))∂(u1​,…,uk​)∂(φi1​​,…,φik​​)​du

(equation (35)). The exterior derivative has coefficients DjaID_j a_IDj​aI​; the pullback along a differentiable TTT substitutes TTT into coefficients and differentials (Theorem 10.22). A kkk-chain is a formal integer combination of kkk-surfaces over QkQ^kQk, and the boundary of a (k)(k)(k)-surface is the alternating sum ∑j(−1)j\sum_j (-1)^j∑j​(−1)j of its restrictions to the faces of QkQ^kQk (Definitions 10.26, 10.28, 10.30). Mathlib has no counterpart to these coordinate-based objects. Integrals over parameter domains are Lebesgue integrals for the volume measure, which agree with Rudin's Riemann integrals for continuous integrands.

Definition code
import Mathlib

/-!
# Rudin, Chapter 10 — differential forms, surfaces and chains

Definitions transcribed from Walter Rudin, *Principles of Mathematical Analysis*, 3rd edition,
Chapter 10 (Definitions 10.10, 10.11, Sections 10.16–10.19, Definitions 10.26, 10.28, 10.30 and
Theorem 10.22).

Mathlib has differential forms only in the guise of alternating multilinear maps on manifolds;
Rudin's concrete objects — a `k`-form presented by its coefficient functions
`ω = ∑ a_{i₁⋯i_k} dx_{i₁} ∧ ⋯ ∧ dx_{i_k}`, evaluated by integrating a Jacobian over the
parameter domain of a `k`-surface — are set up here from scratch.  Points of `ℝⁿ` are functions
`Fin n → ℝ`.

Two conventions are worth stating. First, a `k`-form is recorded by a coefficient function
indexed by *all* tuples `i : Fin k → Fin n`, not only by increasing ones; this is Rudin's
equation (34), where the indices "range independently from 1 to n", and the anticommutation
relations are then consequences of the definition rather than extra data. Second, the integral
over the parameter domain is the Lebesgue integral for the volume measure, which agrees with
Rudin's Riemann integral (Definition 10.1) for the continuous integrands considered here.
-/

namespace Rudin

open MeasureTheory

/-- The partial derivative `D_s f` of a real function on `ℝᵏ`, in the direction of the `s`-th
coordinate vector. -/
noncomputable def partialDeriv {k : ℕ} (f : (Fin k → ℝ) → ℝ) (s : Fin k) (u : Fin k → ℝ) : ℝ :=
  fderiv ℝ f u (Pi.single s 1)

/-- Rudin, Definition 10.11: a **`k`-form** in `ℝⁿ`, presented by its coefficient functions
`a_{i₁⋯i_k}`, one for each tuple of indices. -/
structure KForm (k n : ℕ) where
  /-- The coefficient `a_{i₁⋯i_k}` of `dx_{i₁} ∧ ⋯ ∧ dx_{i_k}`. -/
  coeff : (Fin k → Fin n) → (Fin n → ℝ) → ℝ

/-- Rudin, Definition 10.11, equation (35): the Jacobian
`∂(φ_{i₁}, …, φ_{i_k}) / ∂(u₁, …, u_k)` of a map `Φ : ℝᵏ → ℝⁿ` along the index tuple `i`. -/
noncomputable def jacobian {k n : ℕ} (Φ : (Fin k → ℝ) → (Fin n → ℝ)) (i : Fin k → Fin n)
    (u : Fin k → ℝ) : ℝ :=
  Matrix.det (Matrix.of fun r s : Fin k => partialDeriv (fun v => Φ v (i r)) s u)

/-- Rudin, Definition 10.10: a **`k`-surface** with parameter domain the `k`-cell `[a, b]`, given
by a mapping of that cell into `ℝⁿ`. -/
structure CellSurface (k n : ℕ) where
  /-- Lower corner of the parameter cell. -/
  lo : Fin k → ℝ
  /-- Upper corner of the parameter cell. -/
  hi : Fin k → ℝ
  /-- The mapping into `ℝⁿ`. -/
  map : (Fin k → ℝ) → (Fin n → ℝ)

/-- Rudin, Definition 10.11, equation (35): the integral of a `k`-form over a `k`-surface whose
parameter domain is a cell. -/
noncomputable def integralOverCell {k n : ℕ} (ω : KForm k n) (Φ : CellSurface k n) : ℝ :=
  ∫ u in Set.Icc Φ.lo Φ.hi,
    ∑ i : Fin k → Fin n, ω.coeff i (Φ.map u) * jacobian Φ.map i u

/-- Rudin, Example 10.4: the standard `k`-simplex
`Qᵏ = {u : uᵢ ≥ 0, u₁ + ⋯ + u_k ≤ 1}`, the other admissible parameter domain. -/
def stdSimplex (k : ℕ) : Set (Fin k → ℝ) :=
  {u | (∀ i, 0 ≤ u i) ∧ ∑ i, u i ≤ 1}

/-- Rudin, Definition 10.10: a `k`-surface whose parameter domain is the standard simplex
`Qᵏ`. -/
structure SimplexSurface (k n : ℕ) where
  /-- The mapping of `Qᵏ` into `ℝⁿ`. -/
  map : (Fin k → ℝ) → (Fin n → ℝ)

/-- The integral of a `k`-form over a `k`-surface with parameter domain `Qᵏ`. -/
noncomputable def integralOverSimplex {k n : ℕ} (ω : KForm k n) (Φ : SimplexSurface k n) : ℝ :=
  ∫ u in stdSimplex k, ∑ i : Fin k → Fin n, ω.coeff i (Φ.map u) * jacobian Φ.map i u

/-- Rudin, Definition 10.26: the oriented affine `k`-simplex `[p₀, …, p_k]`, as the affine map
`u ↦ p₀ + ∑ uᵢ (pᵢ - p₀)` of `Qᵏ` into `ℝⁿ`. -/
def affineSimplexMap {k n : ℕ} (p : Fin (k + 1) → (Fin n → ℝ)) : (Fin k → ℝ) → (Fin n → ℝ) :=
  fun u => p 0 + ∑ i : Fin k, u i • (p i.succ - p 0)

/-- The vertices `0, e₁, …, e_k` of the standard simplex `Qᵏ`, i.e. Rudin's identity simplex
`[0, e₁, …, e_k]`. -/
def stdVertices (k : ℕ) : Fin (k + 1) → (Fin k → ℝ) :=
  Fin.cases (0 : Fin k → ℝ) fun j => Pi.single j (1 : ℝ)

/-- Rudin, Definition 10.28: a **`k`-chain**, a formal integer combination of `k`-surfaces with
parameter domain `Qᵏ`. -/
structure Chain (k n : ℕ) where
  /-- The terms of the chain, each with its integer multiplicity. -/
  terms : List (ℤ × SimplexSurface k n)

/-- Rudin, Definition 10.28, equation (87): the integral of a `k`-form over a `k`-chain. -/
noncomputable def Chain.integral {k n : ℕ} (ω : KForm k n) (Ψ : Chain k n) : ℝ :=
  (Ψ.terms.map fun t => (t.1 : ℝ) * integralOverSimplex ω t.2).sum

/-- The `j`-th face of a `(m+1)`-surface with parameter domain `Q^{m+1}`: the surface is
restricted along the affine map of `Qᵐ` onto the face of `[0, e₁, …, e_{m+1}]` obtained by
deleting the `j`-th vertex (Rudin, Definitions 10.29 and 10.30). -/
noncomputable def boundaryFace {m n : ℕ} (Φ : (Fin (m + 1) → ℝ) → (Fin n → ℝ)) (j : Fin (m + 2)) :
    SimplexSurface m n :=
  ⟨Φ ∘ affineSimplexMap fun i : Fin (m + 1) => stdVertices (m + 1) (j.succAbove i)⟩

/-- Rudin, Definition 10.30: the boundary `∂Φ = ∑_j (-1)^j Φ ∘ (j-th face)` of a
`(m+1)`-surface, as an `m`-chain. -/
noncomputable def surfaceBoundary {m n : ℕ} (Φ : SimplexSurface (m + 1) n) : Chain m n :=
  ⟨List.ofFn fun j : Fin (m + 2) => ((-1 : ℤ) ^ (j : ℕ), boundaryFace Φ.map j)⟩

/-- Rudin, Definition 10.30: the boundary of a `(m+1)`-chain, the `m`-chain obtained by taking
the boundary of each term with its multiplicity. -/
noncomputable def Chain.boundary {m n : ℕ} (Ψ : Chain (m + 1) n) : Chain m n :=
  ⟨Ψ.terms.flatMap fun t => (surfaceBoundary t.2).terms.map fun s => (t.1 * s.1, s.2)⟩

/-- Rudin, Section 10.16–10.19: the **exterior derivative** `dω` of a `k`-form, the `(k+1)`-form
whose coefficient at the tuple `(j, i₁, …, i_k)` is the partial derivative `D_j a_{i₁⋯i_k}`. -/
noncomputable def extDeriv {k n : ℕ} (ω : KForm k n) : KForm (k + 1) n where
  coeff := fun i x =>
    fderiv ℝ (ω.coeff fun r : Fin k => i r.succ) x (Pi.single (i 0) (1 : ℝ))

/-- Rudin, Theorem 10.22 and Section 10.21: the **pullback** `ω_T` of a `k`-form in `ℝⁿ` along a
differentiable map `T : ℝᵐ → ℝⁿ`, whose coefficient at `(j₁, …, j_k)` is
`∑_i a_i(T x) ∏_r D_{j_r} T_{i_r}(x)`. -/
noncomputable def pullback {k m n : ℕ} (T : (Fin m → ℝ) → (Fin n → ℝ)) (ω : KForm k n) :
    KForm k m where
  coeff := fun j x =>
    ∑ i : Fin k → Fin n,
      ω.coeff i (T x) * ∏ r : Fin k, partialDeriv (fun v => T v (i r)) (j r) x

end Rudin
Source
Walter Rudin, Principles of Mathematical Analysis, 3rd edition, McGraw-Hill, 1976, Chapter 10, pp. 245-273, Definitions 10.10, 10.11, 10.26, 10.28, 10.30, Sections 10.16-10.19 and Theorem 10.22
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic)

A bundle of definitions for differential forms on Rn\mathbb{R}^nRn, where a point of Rn\mathbb{R}^nRn is a function {0,…,n−1}→R\{0,\dots,n-1\}\to\mathbb{R}{0,…,n−1}→R. Two total-function conventions matter throughout: the derivative operator returns the zero map where a function is not differentiable, and a set integral returns 000 when the integrand is not integrable.

Partial derivative. For f:Rk→Rf : \mathbb{R}^k \to \mathbb{R}f:Rk→R, an index sss and a point uuu, Dsf(u)D_s f(u)Ds​f(u) is the Fréchet derivative of fff at uuu applied to the sss-th standard basis vector.

kkk-form. A kkk-form in Rn\mathbb{R}^nRn is a record consisting of one coefficient function ai:Rn→Ra_i : \mathbb{R}^n \to \mathbb{R}ai​:Rn→R for each tuple i=(i1,…,ik)i = (i_1,\dots,i_k)i=(i1​,…,ik​) of indices in {0,…,n−1}\{0,\dots,n-1\}{0,…,n−1} — all tuples, not only increasing ones, and with no antisymmetry imposed on the family.

Jacobian along a tuple. For Φ:Rk→Rn\Phi : \mathbb{R}^k \to \mathbb{R}^nΦ:Rk→Rn, a tuple iii and u∈Rku \in \mathbb{R}^ku∈Rk, JiΦ(u)J_i\Phi(u)Ji​Φ(u) is the determinant of the k×kk\times kk×k matrix whose (r,s)(r,s)(r,s) entry is Ds(v↦Φ(v)ir)(u)D_s\bigl(v \mapsto \Phi(v)_{i_r}\bigr)(u)Ds​(v↦Φ(v)ir​​)(u).

Cell surface and its integral. A cell kkk-surface is a record of two corners lo,hi∈Rk\mathrm{lo}, \mathrm{hi} \in \mathbb{R}^klo,hi∈Rk and a map Φ:Rk→Rn\Phi : \mathbb{R}^k\to\mathbb{R}^nΦ:Rk→Rn. The integral of a kkk-form ω\omegaω over it is

∫[lo,hi] ∑iai(Φ(u)) JiΦ(u) du,\int_{[\mathrm{lo},\mathrm{hi}]} \ \sum_{i} a_i\bigl(\Phi(u)\bigr)\, J_i\Phi(u)\ du,∫[lo,hi]​ i∑​ai​(Φ(u))Ji​Φ(u) du,

a Lebesgue integral over the box, summed over all nkn^knk index tuples.

Standard simplex. Qk={u∈Rk:ui≥0 for all i, ∑iui≤1}Q^k = \{u \in \mathbb{R}^k : u_i \ge 0 \text{ for all } i,\ \sum_i u_i \le 1\}Qk={u∈Rk:ui​≥0 for all i, ∑i​ui​≤1}.

Simplex surface and its integral. A simplex kkk-surface is just a map Φ:Rk→Rn\Phi:\mathbb{R}^k\to\mathbb{R}^nΦ:Rk→Rn; the integral of ω\omegaω over it is the same sum-of-Jacobians integrand integrated over QkQ^kQk instead of a box.

Affine simplex. For vertices p0,…,pk∈Rnp_0,\dots,p_k \in \mathbb{R}^np0​,…,pk​∈Rn, the map u↦p0+∑i=1kui (pi−p0)u \mapsto p_0 + \sum_{i=1}^{k} u_i\,(p_i - p_0)u↦p0​+∑i=1k​ui​(pi​−p0​).

Standard vertices. The k+1k+1k+1 points 0,e1,…,ek0, e_1, \dots, e_k0,e1​,…,ek​ of Rk\mathbb{R}^kRk.

Chain and its integral. A kkk-chain is a finite list of pairs (integer multiplicity, simplex kkk-surface); repetitions are allowed and the list order is part of the data. The integral of ω\omegaω over the chain is the sum over list entries of (multiplicity) ×\times× (integral over that surface).

Faces and boundary. For a map Φ\PhiΦ defined on Rm+1\mathbb{R}^{m+1}Rm+1 and j∈{0,…,m+1}j \in \{0,\dots,m+1\}j∈{0,…,m+1}, the jjj-th face is the simplex mmm-surface Φ∘(affine map with the standard vertices of Qm+1 omitting the j-th)\Phi \circ (\text{affine map with the standard vertices of } Q^{m+1} \text{ omitting the } j\text{-th})Φ∘(affine map with the standard vertices of Qm+1 omitting the j-th). The boundary of a simplex (m+1)(m+1)(m+1)-surface is the mmm-chain listing, for j=0,…,m+1j = 0,\dots,m+1j=0,…,m+1, the pair ((−1)j, j-th face)\bigl((-1)^j, \ j\text{-th face}\bigr)((−1)j, j-th face). The boundary of an (m+1)(m+1)(m+1)-chain is obtained by replacing each term by the terms of the boundary of its surface, multiplying multiplicities.

Exterior derivative. For a kkk-form ω\omegaω, dωd\omegadω is the (k+1)(k+1)(k+1)-form whose coefficient at a tuple (i0,i1,…,ik)(i_0, i_1,\dots,i_k)(i0​,i1​,…,ik​) is the partial derivative in direction i0i_0i0​ of the coefficient a(i1,…,ik)a_{(i_1,\dots,i_k)}a(i1​,…,ik​)​.

Pullback. For T:Rm→RnT : \mathbb{R}^m\to\mathbb{R}^nT:Rm→Rn and a kkk-form ω\omegaω in Rn\mathbb{R}^nRn, the pullback is the kkk-form in Rm\mathbb{R}^mRm with coefficients

(ωT)j(x)  =  ∑iai(T(x))∏r=1kDjr(v↦T(v)ir)(x).(\omega_T)_j(x) \;=\; \sum_{i} a_i\bigl(T(x)\bigr) \prod_{r=1}^{k} D_{j_r}\bigl(v \mapsto T(v)_{i_r}\bigr)(x).(ωT​)j​(x)=i∑​ai​(T(x))r=1∏k​Djr​​(v↦T(v)ir​​)(x).

These are definitions only; no property of them is asserted here.

Human review
  • Endorsed by Shuze Chen · Sep 14, 2026

  • Endorsed by Community (Bot) · Sep 14, 2026

  • Endorsed by LG · Sep 14, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me