9g (part 1): drop 9 _g typeclass-dispatch notations#39
Merged
Conversation
… I) HasMetric.metric f
… I) HasMetric.metric f
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.
Summary
9g (part 1) — first wave of _g notation drops. Each notation is replaced inline with explicit
HasMetric.metric-form expansions, then the notation definition is deleted.Notations dropped (9 commits, each its own commit)
Ric_g(v, w) xricciTensor HasMetric.metric x v wgrad_g[I] fmanifoldGradient (I := I) HasMetric.metric fΔ_g[I] fOperators.scalarLaplacian (I := I) HasMetric.metric fhess_g[I] fOperators.hessianBilin (I := I) HasMetric.metric fdiv_g[I]H_g[I]K_g[I](X, Y)sectionalCurvature (I := I) X Yscal_g[I]Ric(X, Y)ricci HasMetric.metric X Y⟪V, W⟫_gHasMetric.metric.metricInner x V W(tangent) /fun y => ...(section)∇[X] YcovDeriv HasMetric.metric X YAlso removed the
MetricInnerHomdispatch class (only consumer was⟪V, W⟫_g).Deferred to follow-up
Larger notations not yet dropped:
Riem(X, Y) Z(41 callsites)vol_g(28 callsites)‖V‖²_g(20 callsites) — polymorphic, still needsMetricNormSqdispatch class(∇R)[X](Y, Z) W(covariant Riemann tensor notation)II(X, Y),⟦X, Y⟧(mlieBracket — metric-independent, may keep)Why
Typeclass-dispatch notations conflate metric and operator at parse time, making multi-metric reasoning (Ricci flow, conformal change, comparison geometry) impossible. Explicit forms make
HasMetric.metric/gvisible at every site. Future PR (9h) can selectively re-introduce dot-method notations (e.g.,g.gradient f,g.scalarLaplacian f) once typeclass abbrev is gone.Test plan
lake buildclean per commit