A sorry-free Lean 4/mathlib formalization of Stokes-type theorems for smooth singular cubes and axis-aligned boxes in arbitrary finite dimension.
The main theorem is smooth singular cubical Stokes: for a globally smooth map
sigma : R^{n+1} -> R^m and a smooth n-form omega on R^m, the integral
of the true differential-form pullback of d omega over the unit cube equals
the alternating sum of pullback integrals over the cube faces.
This repository also contains:
- box Stokes for coordinate
n-forms onR^{n+1}; - a bridge from the coordinate formula to mathlib's abstract
extDeriv; - true pullback of forms via
fderivfor singular cubes; - singular cubical chains and the linear extension of Stokes;
- chain-level
partial (partial c) = 0for singular cubical chains; - dimensional specializations including FTC, rectangular Green, divergence consistency, 3D Gauss, integration by parts, and Leibniz.
The development does not formalize manifold-with-boundary Stokes, integration of forms over manifolds, partition-of-unity arguments, image-domain semantics, or boundary orientation for manifolds.
This repository is pinned to Lean 4.29.1 and mathlib v4.29.1.
lake exe cache get
lake build
lake exe diagnosticsAt the audited state, lake build completed successfully with 2659 jobs.
The Lean artifact contains 44 Lean source modules under LeanStokes/, 4028
source lines, 205 named declarations, and 79 #print axioms checks.
The checked declarations depend only on Lean's standard axioms used throughout mathlib:
propextClassical.choiceQuot.sound
SingularCubeStokes.singularStokesSingularCubeStokes.stokes_singular_boundarySingularCubeStokes.stokes_singular_chainSingularCubeStokes.stokes_chainSingularCubeStokes.bdry_bdry_chain_zeroSingularCubeStokes.bdry_bdry_chain_zero_generalCubeStokes.stokes_on_boxCubeStokes.stokes_smoothCubeStokes.stokes_extDeriv_smoothCubeStokes.extDeriv_topCoeff_eq_extDerivCoordCubeStokes.ftc_stokesCubeStokes.green_stokesCubeStokes.divergence_stokesCubeStokes.gauss_3dCubeStokes.integration_by_parts
GPL-3.0-only.