feat: Wirtinger calculus and N=1 SUSY scalar Wirtinger derivatives#1107
feat: Wirtinger calculus and N=1 SUSY scalar Wirtinger derivatives#1107pariandrea wants to merge 7 commits into
Conversation
jstoobysmith
left a comment
There was a problem hiding this comment.
Looks good - some comments to help improve this.
| namespace Physlib | ||
|
|
||
| /-- Restrict a complex 1-D Fréchet derivative on `ℂ → ℂ` to `ℝ`-scalars. -/ | ||
| lemma hasFDerivAt_restrictScalarsℝℂ {f : ℂ → ℂ} {f' : ℂ →L[ℂ] ℂ} |
There was a problem hiding this comment.
Is it not possible to use HasFDerivAt.restrictScalars directly somewhere?
There was a problem hiding this comment.
It is not possible because the inference of the arguments does not work. They need to be provided manually.
| @@ -0,0 +1,116 @@ | |||
| /- | |||
| Copyright (c) 2026 The Physlib Contributors. All rights reserved. | |||
There was a problem hiding this comment.
The Physlib Contributors should be your name throughout.
| /-! | ||
|
|
||
| # Wirtinger operators on `ℂ → ℂ` and the Wirtinger decomposition | ||
|
|
There was a problem hiding this comment.
Maybe a bit more detail on what the Wirtinger operators are.
There was a problem hiding this comment.
Expanded the Overview section.
|
|
||
| /-- The real Fréchet derivative of `Complex.log` at a slit-plane point, | ||
| packaged as a `HasFDerivAt` statement over `ℝ`. -/ | ||
| lemma hasFDerivAt_real_log {z : ℂ} (hz : z ∈ Complex.slitPlane) : |
There was a problem hiding this comment.
Is this necessary? I.e. could we use hasFDerivAt_restrictScalarsℝℂ directly?
There was a problem hiding this comment.
It is not necessary. removed
There was a problem hiding this comment.
Lemmas.lean would probably be a better title here.
|
|
||
| ## i. Overview | ||
|
|
||
| In this module we introduce the minimal label and configuration data for the |
There was a problem hiding this comment.
I think some additional context here would be nice e.g. what is missing, and how this fits into the big picture.
There was a problem hiding this comment.
Expanded the overview
There was a problem hiding this comment.
These can likely go in the Basic.lean file.
|
|
||
| -/ | ||
|
|
||
| namespace dScalar |
There was a problem hiding this comment.
This shouldn't be a namespace, similar elsewhere.
There was a problem hiding this comment.
Would try and extract useful results from this into their own files.
There was a problem hiding this comment.
the reusable lemmas moved into Kahler.lean/Deriv.lean. Examples.lean is now
a demo with only examples and #checks. This is a specific example of potential which shows that the infrastructure works. Expanding from here will help me understand what is actually reusable and what is specific to the calculation of a certain potential.
There was a problem hiding this comment.
Could likely be merged with the Deriv file.
… feedback - Rename Wirtinger/Rules.lean to Lemmas.lean - Remove the Wirtinger.lean re-export aggregator; Physlib.lean imports the four leaf modules directly - Merge SUSY/N1/CLM.lean into SUSY/N1/Basic.lean - Merge SUSY/N1/OuterDeriv.lean into SUSY/N1/Deriv.lean - Flatten the dScalar / dScalarBar namespaces: lemmas are now dScalar_foo rather than dScalar.foo - Extract the H^n log Kähler potential and its Kähler metric into the new SUSY/N1/Kahler.lean; reduce Examples.lean to a runnable demo - Expand the Wirtinger-operator explanation in Complex.lean and the big-picture context in SUSY/N1/Basic.lean - Set copyright headers to the author's name Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Resolve the two `Style linters` CI failures on PR leanprover-community#1107: - check_file_imports: move the `SUSY.N1.*` import block to its sorted position (before `SpaceAndTime.*`) in `Physlib.lean`. - simpNF: drop `@[simp]` from `dWirtinger_star`, `dWirtingerBar_star`, `dScalar_antiChiralCoord`, and `dScalarBar_antiChiralCoord`. Their left-hand sides contain `star`/`antiChiral`, which simp normalises to `starRingEnd ℂ` before the lemma could fire, so they were never valid simp lemmas. All call sites use them explicitly via `rw`/`simp only`. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Note the `IsScalarTower ℝ ℂ ℂ` instance diamond (the `Algebra` vs `NormedSpace.complexToReal` route to `SMul ℝ ℂ`) behind `hasFDerivAt_restrictScalarsℝℂ`, with a commented-out `example` that reproduces the synthesis failure. Addresses PR leanprover-community#1107 review feedback. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
….lean `hasFDerivAt_real_log` was a one-line wrapper around `hasFDerivAt_restrictScalarsℝℂ`, used once and only for its differentiability corollary. Inline it at the call site in Kahler.lean and remove the now-empty OuterFunctions.lean. Addresses PR leanprover-community#1107 review feedback. Also expand the Wirtinger folder overview in Basic.lean (motivation, folder layout, conventions) — recovering content from the deleted Wirtinger.lean aggregator. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Can we start with a PR which is just this file - I think this will make the process a lot quicker.
There was a problem hiding this comment.
Of course. Should i make a new branch and a new PR ? Or is there a quicker way?
There was a problem hiding this comment.
Probably easiest to make a new branch and then use (I think) git checkout ... ....
30587c6 to
2fe9e92
Compare
Adds the Wirtinger calculus on finite-index complex coordinate spaces `ι → ℂ` in `Physlib/Mathematics/Calculus/Wirtinger/`: * `Basic.lean` — coordinate-basis CLMs and complex conjugation on `ι → ℂ`. * `Multivariable.lean` — the multivariable holomorphic / anti-holomorphic Wirtinger derivatives `dWirtingerDir` and their calculus. * `Coordinate.lean` — the coordinate operators `dWirtingerCoord` / `dWirtingerAntiCoord`, the Leibniz rule, and Schwarz's theorem. * `UpperHalfPlane.lean` — reusable upper-half-plane Wirtinger lemmas. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…uperpotential
Builds the N=1 chiral scalar sector on the coordinate Wirtinger calculus:
* `Basic.lean` — the `Model` indexing data and the chiral configuration type
`ChiralScalarConfiguration` (the no-doubling design: the only field data is
the chiral configuration; anti-chiral scalars are its conjugates).
* `Derivative.lean` — the chiral / anti-chiral derivative wrappers
`M.dChiralScalar` / `M.dAntiChiralScalar` over the Wirtinger operators.
* `SuperPotential.lean` — the holomorphic superpotential `W` and its conjugate.
* `KahlerPotential.lean` — the abstract Kähler potential `K`.
* `KahlerMetric.lean` — the Kähler metric `g_{IJ̄} = ∂_I ∂_J̄ K` and hermiticity.
* `LogKahlerHn.lean` — worked example: the `Hⁿ` log Kähler potential.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…erview Rework the module docstrings onto a single notation convention: - total real directional derivative `df(d)`, Wirtinger parts `∂f(d)`/`∂̄f(d)`, all in applied form; genuine coordinate partials (`∂f/∂x`, `∂g/∂z`) stay fractions - consolidate the conventions into a dedicated Notation paragraph; frame the split `df(d) = ∂f(d) + ∂̄f(d)` as the directional `d = ∂ + ∂̄` (Dolbeault) splitting - retire the `Df(·)` and `∂_d f` variants; `∂_d ∂_ē f` kept only as operator shorthand for the iterated Schwarz statement - tighten the overview (clearer ℝ/ℂ-linearity argument, drop blank-line gaps, unambiguous Dolbeault wording) Docstring/comment-only; no definitions or proofs changed. Build (2080 jobs) and style lint clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ed frame `d` is a general complex vector, so `(d, i·d)` points in `d`'s own direction and is a rotated *and rescaled* copy of the `(1, i)` axes — not `d` on the real axis with `i·d` on the imaginary axis. Reword to avoid that misreading. Comment-only. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…n renamed v Overhaul the module's directional-derivative notation so the direction is a subscript, not a parenthesised argument — `∂_v f` reads as "the ∂-derivative in direction v of f", removing the `∂f(d)`/`f(d)` misread where the direction looked like f's argument. - code binders renamed to match the notation: direction `d → v`, `e → w`, and the base-point bound variable `v → p` (proofs unchanged — pure α-renaming, build re-verified; `Coordinate.lean` downstream build clean). - total real directional derivative `d_v f`, Wirtinger parts `∂_v f`, `∂̄_v f` (straight d for the total, ∂/∂̄ for the parts; directional Dolbeault d = ∂ + ∂̄). - chain rule keeps Leibniz and Dolbeault in separate lanes: outer one-variable g in Leibniz `∂g/∂f`, `∂g/∂f̄` (bar on the variable), inner f directional `∂_v` (bar on the operator), with a §C note that the two must not be conflated. - Schwarz reads as operator composition `∂_v ∂̄_w f = ∂̄_w ∂_v f`; `/∂` fractions kept only for genuine V=ℂ coordinate partials (`∂f/∂x`, `∂f/∂z`). Docstring/notation + binder names only; no definitions or proofs changed. Build (2080 jobs), downstream Coordinate.lean (2082), and style lint all clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…n/chain-rule sections Documentation-only refinements to the module header and section prose: - Move Notation to its own un-numbered section ahead of the overview; convert it to a bullet list (subscript convention, the three operators, the /∂ variable fraction, u/p base-point roles, V = its own tangent space). - Rewrite the overview into labelled mini-paragraphs (Real derivative, Rotation, Holomorphy, Splitting) for quicker reading; introduce z, z̄ at the V = ℂ case and keep the general statements coordinate-free. - Split former §C "Conjugation and the Wirtinger chain rule" into two sections — C. Conjugation and D. The Wirtinger chain rule — renumbering D–H to E–I and updating all cross-references; add a worked example per conjugation law. - Tighten the chain-rule intro and the comp/anti-comp docstrings; expand on realLinear_apply_eq_wirtinger as the a·w + b·conj w split. - Add the Wikipedia "Complex differential form" (Dolbeault operators) reference as the source of the d = ∂ + ∂̄ / ∂̄ notation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…cstrings Root the shared notation legend in Basic (the import root): Basic documents only what it uses (operator subscript vs `/∂`-variable fraction, `f̄`), Multivariable keeps the foundation-specific notation (directions, fixed `u` vs bound `p`, iterated composition). Align Basic's symbols to the subscript convention (`∂_v f`, not `∂f/∂d`; `v` for direction, since `d` denotes the total real derivative); rename the `fderiv_star_eq` bound point `v` to `p`. De-dash the prose, drop the stray `g'` and the differential-`d` overload, cut the chain-rule worked example now that §D carries it, and tighten the `fderiv_star_eq` docstring. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Summary
Adds a reusable Wirtinger calculus for
ℂ → ℂfunctions, and builds on itthe N=1 SUSY scalar Wirtinger derivatives
∂/∂φ^Iand∂/∂φ̄^Ion thechiral configuration space. The change is purely additive — 11 new files, no
existing code modified (aside from registering the modules in
Physlib.lean).What this adds
Physlib/Mathematics/Calculus/Wirtinger/— a general 1-D Wirtinger calculus:dWirtinger/dWirtingerBar, the operators(1/2)(∂_x ∓ i∂_y);real-linear Wirtinger decomposition;
two-term chain rule, conjugation lemmas;
Complex.log, …).Physlib/SUSY/N1/— the N=1 scalar sector:ChiralScalarValue n = Fin n → ℂ, the physical configuration space, with theanti-chiral view as a derived conjugation;
dScalar/dScalarBar, the scalar Wirtinger operators, defined as the 1-Doperators applied through a coordinate slice;
∂φ^J/∂φ^I = δ_IJ, additivity, the Leibnizrule, the holomorphic/antiholomorphic collapse, and the outer chain rules.
Worked example
SUSY/N1/Examples.leancomputes, in closed form, the chiral and anti-chiralWirtinger derivatives of the multi-field upper-half-plane log Kähler potential
K = -∑_I log(i(z̄^I − z^I)), and from them the Kähler metricg_{IJ̄} = -δ_{IJ}/(z^I − z̄^I)²— the Poincaré metric onHⁿ.