-
Notifications
You must be signed in to change notification settings - Fork 99
Add the core LocalJet coordinate object #1039
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
juanjfndz
wants to merge
2
commits into
leanprover-community:master
Choose a base branch
from
juanjfndz:codex/pr5-localjet-i
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| /- | ||
| Copyright (c) 2026 Juan Jose Fernandez Morales. All rights reserved. | ||
| Released under Apache 2.0 license as described in the file LICENSE. | ||
| Authors: Juan Jose Fernandez Morales | ||
| -/ | ||
| module | ||
|
|
||
| public import Physlib.SpaceAndTime.Space.Derivatives.Basic | ||
| public import Physlib.SpaceAndTime.Space.Derivatives.MultiIndex | ||
| /-! | ||
| # Local jets | ||
|
|
||
| ## i. Overview | ||
|
|
||
| This module introduces the core local jet object for fields on `Space d` with values in `Space m`. | ||
|
|
||
| At this first stage, a `k`-jet is represented only by: | ||
|
|
||
| - its base point, | ||
| - its field value, | ||
| - and its derivative coordinates indexed by multi-indices of order at most `k`. | ||
|
|
||
| The explicit coordinate conversions and the evaluation of jets of fields are added in follow-up PRs. | ||
|
|
||
| ## ii. Key results | ||
|
|
||
| - `ClassicalFieldTheory.Local.DerivativeIndex` | ||
| - `ClassicalFieldTheory.Local.JetCoordinates` | ||
| - `ClassicalFieldTheory.Local.LocalJet` | ||
|
|
||
| ## iii. Table of contents | ||
|
|
||
| - A. Derivative indices | ||
| - B. Local jets | ||
|
|
||
| ## iv. References | ||
|
|
||
| -/ | ||
|
|
||
| @[expose] public section | ||
|
|
||
| open Physlib | ||
|
|
||
| namespace ClassicalFieldTheory | ||
| namespace Local | ||
|
|
||
| /-! | ||
| ## A. Derivative indices | ||
|
|
||
| -/ | ||
|
|
||
| /-- The multi-indices on `d` coordinates of order at most `k`. -/ | ||
| abbrev DerivativeIndex (d k : ℕ) := { I : MultiIndex d // I.order ≤ k } | ||
|
|
||
| /-- Coordinate data `u^a_I` for local jets of order `k`. -/ | ||
| abbrev JetCoordinates (d m k : ℕ) := DerivativeIndex d k → Fin m → ℝ | ||
|
|
||
| /-- The zero multi-index as a derivative index of any order. -/ | ||
| def zeroIndex (d k : ℕ) : DerivativeIndex d k := ⟨0, by simp [Physlib.MultiIndex.order_zero]⟩ | ||
|
|
||
| /-! | ||
| ## B. Local jets | ||
|
|
||
| -/ | ||
|
|
||
| /-- Local jets of order `k` for fields `Space d → Space m`. -/ | ||
| structure LocalJet (d m k : ℕ) where | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm a bit confused about what this definition is meant to represent. More specifically how this is a |
||
| /-- The base point of the jet. -/ | ||
| base : Space d | ||
| /-- The field value. -/ | ||
| value : Space m | ||
| /-- The derivative coordinates indexed by all multi-indices of order at most `k`. -/ | ||
| deriv : JetCoordinates d m k | ||
| /-- Compatibility between the explicit field value and the zero-th order jet coordinate. -/ | ||
| value_eq_zeroIndex : ∀ a : Fin m, deriv (zeroIndex d k) a = value a | ||
|
|
||
| namespace LocalJet | ||
|
|
||
| variable {d m k : ℕ} | ||
|
|
||
| @[ext] | ||
| lemma ext (J K : LocalJet d m k) (hbase : J.base = K.base) (hvalue : J.value = K.value) | ||
| (hderiv : J.deriv = K.deriv) : J = K := by | ||
| cases J | ||
| cases K | ||
| cases hbase | ||
| cases hvalue | ||
| cases hderiv | ||
| rfl | ||
|
|
||
| /-- The derivative coordinate of a jet. -/ | ||
| def coord (J : LocalJet d m k) (I : DerivativeIndex d k) (a : Fin m) : ℝ := J.deriv I a | ||
|
|
||
| @[simp] | ||
| lemma value_eq_coord_zeroIndex (J : LocalJet d m k) (a : Fin m) : | ||
| J.value a = J.coord (zeroIndex d k) a := by | ||
| exact (J.value_eq_zeroIndex a).symm | ||
|
|
||
| end LocalJet | ||
|
|
||
| end Local | ||
| end ClassicalFieldTheory | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would make own file in
Space.Derivatives.