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 1 commit 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.
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 ... ....
…r potential & metric
Multivariable Wirtinger calculus and the N=1 chiral scalar sector built on it.
* Mathematics/Calculus/Wirtinger: directional holomorphic/anti-holomorphic
operators over a complex space, the full calculus (linearity, Leibniz,
chain rule, conjugations, holomorphic collapse) and Schwarz's theorem via
ContDiffAt.isSymmSndFDerivAt.
* SUSY/N1/Basic: ChiralIndex, the physical configuration space WirtingerInput,
and the antiChiral derived view.
* SUSY/N1/Deriv: scalar Wirtinger derivatives ∂_I, ∂̄_I as specializations.
* SUSY/N1/KahlerPotential + KahlerMetric: ℝ-valued Kähler potential and the
hermitian metric g_{i j̄} = ∂_i ∂_{j̄} K via Schwarz's theorem.
* SUSY/N1/LogKahlerHn + UpperHalfPlane: the multi-field upper-half-plane log
Kähler model with positive-definite Poincaré metric.
* SUSY/N1/SuperPotential: abstract holomorphic superpotential.
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ⁿ.