Skip to content

Conversation

grunweg
Copy link
Collaborator

@grunweg grunweg commented Oct 8, 2025

We define a predicate IsLocalFrameOn, for a collection of sections of a vector bundle to be a local frame.
We provide some basic API, such as the coefficients of a section t w.r.t. a local frame, or proving smoothness of t via proving the smoothness of its local frame coefficients.

A future PR will construct actual local frames, and use these to define the local extension of a tangent vector to a vector field near a point.

From the path towards geodesics and the Levi-Civita connection.

Co-authored-by: Patrick Massot patrickmassot@free.fr


Open in Gitpod

@github-actions github-actions bot added the t-differential-geometry Manifolds etc label Oct 8, 2025
Copy link

github-actions bot commented Oct 8, 2025

PR summary c7bb7934b2

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.Geometry.Manifold.VectorBundle.LocalFrame (new file) 2101

Declarations diff

+ IsLocalFrameOn
+ congr
+ contMDiffAt
+ contMDiffAt_of_repr
+ contMDiffAt_of_repr_aux
+ contMDiffOn_of_repr
+ eq_iff_repr
+ mdifferentiableAt_of_repr
+ mdifferentiableAt_of_repr_aux
+ mdifferentiableOn_of_repr
+ mono
+ repr
+ repr_apply_of_mem
+ repr_apply_of_notMem
+ repr_apply_zero_at
+ repr_congr
+ repr_eq_of_eq
+ repr_spec
+ repr_sum_eq
+ toBasisAt
+ toBasisAt_coe

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

Copy link
Contributor

@ocfnash ocfnash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, just a bunch of nitpicks!

bors d+

Outside of `u`, this returns the junk value 0. -/
-- NB. We don't use simps here, as we prefer to have dedicated `_apply` lemmas for the separate
-- cases.
def repr (hs : IsLocalFrameOn I F n s u) (i : ι) : (Π x : M, V x) →ₗ[𝕜] M → 𝕜 where
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have never been a fan of the name repr in Basis and this is also pretty far from Basis.repr (which is an equivalence singling no one coord).

I'd prefer almost anything else here. What do you think of:

Suggested change
def repr (hs : IsLocalFrameOn I F n s u) (i : ι) : (Π x : M, V x) →ₗ[𝕜] M → 𝕜 where
def toLin (hs : IsLocalFrameOn I F n s u) (i : ι) : (Π x : M, V x) →ₗ[𝕜] M → 𝕜 where

(or maybe coeff or coord)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! I went by analogy with Basis.repr, but indeed Basis.coord is a better analogy. So, certainly coord would already be a better name, and perhaps coeff is even better. I'll think about it!

Why did you pick toLin? To me, that seems "type-correct", but carries little semantic information (unlike coeff or coord).


/-- A local frame locally spans the space of sections for `V`: for each local frame `s i` on an open
set `u` around `x`, we have `t = ∑ i, (hs.repr i t) • (s i x)` near `x`. -/
lemma repr_spec [Fintype ι] (hs : IsLocalFrameOn I F n s u) (t : Π x : M, V x) (hu'' : u ∈ 𝓝 x) :
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about:

Suggested change
lemma repr_spec [Fintype ι] (hs : IsLocalFrameOn I F n s u) (t : Π x : M, V x) (hu'' : u ∈ 𝓝 x) :
lemma eventually_eq_sum_repr_smul [Fintype ι] (hs : IsLocalFrameOn I F n s u) (t : Π x : M, V x) (hu'' : u ∈ 𝓝 x) :

(or even better if you agree with my comment above and pick something other than repr)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do both!

basis of `V x` for each `x ∈ e.baseSet`. Any section `s` of `e` can be uniquely written as
`s = ∑ i, f^i sᵢ` near `x`, and `s` is smooth at `x` iff the functions `f^i` are.

The latter statement holds in many cases, but not for every vector bundle. In this file, we prove
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're raising explicitly the failure to capture smoothness by smoothness of coefficients (IIUC), then I think you need to add a sentence saying when it can fail.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the key point is that IsLocalFrame is only really useful in finite-dimensions?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, that's mostly it. The subsequent sentences describe better when this holds. Do you see a way to reword this? (Otherwise, I'll think about it when I'm done with my teaching this week.)

@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Oct 20, 2025

✌️ grunweg can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Oct 20, 2025
Co-authored-by: Oliver Nash <7734364+ocfnash@users.noreply.github.com>
Copy link
Collaborator Author

@grunweg grunweg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the careful review. I'm still learning something new every time. I have some comments on your comments (and will fully address them once I'm out of my teaching cave for the week).

basis of `V x` for each `x ∈ e.baseSet`. Any section `s` of `e` can be uniquely written as
`s = ∑ i, f^i sᵢ` near `x`, and `s` is smooth at `x` iff the functions `f^i` are.

The latter statement holds in many cases, but not for every vector bundle. In this file, we prove
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, that's mostly it. The subsequent sentences describe better when this holds. Do you see a way to reword this? (Otherwise, I'll think about it when I'm done with my teaching this week.)

Outside of `u`, this returns the junk value 0. -/
-- NB. We don't use simps here, as we prefer to have dedicated `_apply` lemmas for the separate
-- cases.
def repr (hs : IsLocalFrameOn I F n s u) (i : ι) : (Π x : M, V x) →ₗ[𝕜] M → 𝕜 where
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! I went by analogy with Basis.repr, but indeed Basis.coord is a better analogy. So, certainly coord would already be a better name, and perhaps coeff is even better. I'll think about it!

Why did you pick toLin? To me, that seems "type-correct", but carries little semantic information (unlike coeff or coord).


/-- A local frame locally spans the space of sections for `V`: for each local frame `s i` on an open
set `u` around `x`, we have `t = ∑ i, (hs.repr i t) • (s i x)` near `x`. -/
lemma repr_spec [Fintype ι] (hs : IsLocalFrameOn I F n s u) (t : Π x : M, V x) (hu'' : u ∈ 𝓝 x) :
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do both!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). t-differential-geometry Manifolds etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants