feat(Analysis/PDE): Total variation estimate for hyperbolic systems - #499
Open
jvanwinden wants to merge 7 commits into
Open
feat(Analysis/PDE): Total variation estimate for hyperbolic systems#499jvanwinden wants to merge 7 commits into
jvanwinden wants to merge 7 commits into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).