Skip to content

feat(Analysis/PDE): Total variation estimate for hyperbolic systems - #499

Open
jvanwinden wants to merge 7 commits into
leanprover:mainfrom
jvanwinden:viscous_shock
Open

feat(Analysis/PDE): Total variation estimate for hyperbolic systems#499
jvanwinden wants to merge 7 commits into
leanprover:mainfrom
jvanwinden:viscous_shock

Conversation

@jvanwinden

Copy link
Copy Markdown

This PR formalizes (the statement of) an a priori estimate for the total variation norm of solutions to viscous hyperbolic systems, as established in [1]. This estimate is crucial for proving that vanishing viscosity solutions converge to unique entropy solutions.

The estimate is elementary to state but very challenging to prove, which is why I believe it is a good benchmark problem for the development of formalization for nonlinear PDE.

To avoid technical details, the estimate is stated for global smooth solutions. However, this qualitative smoothness preserves all the difficulty of establishing the theorem, which is quantitative in nature.

[1]. Bianchini and Bressan, Vanishing viscosity solutions of nonlinear hyperbolic systems. Annals of Mathematics 161 (2005).

kim-em added a commit that referenced this pull request Aug 9, 2026
This PR makes theorem workspace generation robust to the shape of the source declaration, so a problem module can use the constructs that [Total variation estimate for hyperbolic systems](#499) does without the generated workspace coming out wrong.

Accept direct `:= sorry` bodies and bodies with trivia between `:=` and `by`, and ignore body-like text in comments and strings. The body marker is the candidate whose body is a `sorry` running to the end of the declaration, so a statement that opens a tactic block of its own (`substInv_X_sub_X_sq_eq_catalan` contains a top-level `haveI … := by …`) is not mistaken for the body.

Preserve scoped `notation`, `syntax` and `macro` commands, and keep the precise inter-declaration context that trusted helpers need: `ChallengeDeps.lean` deletes only a declaration's own `.ilean` range rather than everything up to the next declaration, so an intervening `variable` or `local notation` survives. Removals still extend back over `set_option … in` and similar prefixes, which sit outside the range they scope onto.

Pass outer `variable` parameters through the generated `Solution` delegation. Which of them Lean retained is read off the elaborated declaration: a hole's body is a `sorry`, so its value carries exactly one lambda per signature binder, and counting those separates the signature from binders belonging to the statement. The result is reconciled with the source signature and the re-emitted `variable` commands before use, and generation fails rather than emit a delegation that under-applies. `include` and `omit` are carried through as well, since they decide which of those binders the declaration takes.

Validation: `lake exe test_generate` (49 passed); `lake exe lean-eval generate` reproduces `main`'s tree apart from blank lines in 20 `ChallengeDeps.lean` files, all of which typecheck; and the `hyperbolic_viscosity` workspace from #499 generates and builds.

🤖 Prepared with Claude Code
@jvanwinden jvanwinden changed the title Total variation estimate for hyperbolic systems feat(Analysis/PDE): Total variation estimate for hyperbolic systems Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant