Skip to content

refactor(FieldStrength): remove basis-representation lemmas - #1615

Merged
zhikaip merged 4 commits into
masterfrom
fieldstrength_refactor
Sep 7, 2026
Merged

refactor(FieldStrength): remove basis-representation lemmas#1615
zhikaip merged 4 commits into
masterfrom
fieldstrength_refactor

Conversation

@zhikaip

@zhikaip zhikaip commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Resolves the remaining TODO in Electromagnetism/Kinematics/FieldStrength.lean, following #1614.

Changes

  • Removed toTensor_toFieldStrength_basis_repr, toFieldStrength_tensor_basis_eq_basis and toFieldStrength_eval_eq_basis_repr, the lemmas about the Mathlib product basis basis.tensorProduct basis on Vector d ⊗ Vector d, together with the TODO.
  • What was general about them moves to the tensor library, for any F : Vector d ⊗ Vector d (RealTensor/Vector/Tensorial.lean): Lorentz.Vector.toField_eval_eval_eq_tensorProduct_reprandLorentz.Vector.tensor_basis_repr_toTensor_prod_apply`.
  • toFieldStrength_antisymmetric, toFieldStrength_add and toFieldStrength_smul are now derived from their _eval component versions through toFieldStrength_tensor_basis_repr_eq_eval, rather than the other way round. The Tensor.basis bridge lemmas from refactor(Electromagnetism): replace fieldStrengthMatrix with index-evaluation components #1614 stay.
  • golfed some proofs where appropriate

Why

After #1614 these lemmas had a single consumer each inside FieldStrength.lean, and nothing
about them was specific to the field strength.

Additional Effect of the series (#1610, #1611, #1614, this PR)

Two root causes fixed rather than worked around: Lorentz.Vector/CoVector are implicit_reducible, and the tensor action outranks the Tensorial transport action, so rw/simp match again where the respectTransparency option was compensating. One duplicate representation removed: field-strength components go through index evaluation only.

Counts against master before #1610:
set_option backward.isDefEq.respectTransparency false 553 → 508 library-wide
(Electromagnetism 21 → 11, Relativity/Tensors 107 → 72);

the files touched by the series have none. The remaining 72 in the tensor library were checked with scripts/rm_set_option.py and are needed for unrelated reasons.

mostly prepared by claude, supervised and checked by myself

zhikaip and others added 2 commits September 5, 2026 09:42
The field-strength-specific basis-representation lemmas
(`toTensor_toFieldStrength_basis_repr`, `toFieldStrength_tensor_basis_eq_basis`,
`toFieldStrength_eval_eq_basis_repr`) are removed, completing the second
TODO. The two generic facts they relied on now live in the tensor library
as lemmas about any `F : Vector d ⊗ Vector d`.

Antisymmetry, equivariance and linearity of the tensor are derived from
their component versions. Four `respectTransparency` options in
FieldStrength.lean become unnecessary and are dropped.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Rewrite in one top-level `simp only` and close by `rfl` instead of navigating
into subterms; use structured `induction … with`; derive
`toFieldStrength_action_eq_sum` from the component equivariance.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions github-actions Bot added the medium label Sep 5, 2026
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Thank you for this pull-request (PR). If this is your first PR, welcome to the community!

Below is what will happen next. Please read carefully if you are not familiar with the process. You may open other PRs while this one is being reviewed, and can stack PRs on top of each other, so don't let these steps slow you down.

  1. Some automated checks will be run on your PR. You can see the results of these checks at the buttom of your PR page. If any of these checks fail, you will need to fix the issues before your PR can be merged. You can learn more about these here, including how to run them locally, which is sometimes quicker than relying on the GitHub Actions. If you have never had a PR merged before, you may have to wait for a reviewer to manually start these checks (this is for security).

  2. A reviewer will look at your PR and may ask you to make changes. This may happen a couple of days after you submit your PR, so you may need to be patient. But it should not be longer than that - if it is please bring it to the attention of the community on the Zulip. The level of review will depend on where your PR is submitted. If it is submitted to ./Physlib or ./QuantumInfo, the review will be more thorough than if it is submitted to ./PhyslibAlpha. You can find out more about what the review process is looking for in our review guidelines. If a reviewer adds an awaiting-author label to your PR, address the review comments, then please remove that label by adding a comment with -awaiting-author. This helps us keep track of reviews.

  3. The reviewer will either approve your PR, or request more changes (in which case we return to step 2). Once your PR is approved, it will be merged by a maintainer, this should happen shortly after approval, though you may get more comments at this stage.

Tip: The easiest way to get have a fast review is to submit a PR that is small and self-contained, and has clear documentation explaining why things are the way they are in your chages.

If you have any problems or questions, please reach out to the community on the Zulip.

@zhikaip zhikaip changed the title Fieldstrength refactor refactor(FieldStrength): remove basis-representation lemmas Sep 5, 2026
@nateabr nateabr self-assigned this Sep 6, 2026
@nateabr

nateabr commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

claim

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Review claim by @nateabr completed — thanks for the review.

@nateabr nateabr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Look good to me, one very minor comment

Comment thread Physlib/Relativity/Tensors/RealTensor/Vector/Tensorial.lean Outdated
@jstoobysmith jstoobysmith added ready-to-merge This PR is approved and will be merged shortly t-electromagnetism Electromagnetism and removed reviewer-approved labels Sep 7, 2026
@zhikaip
zhikaip merged commit 67d7427 into master Sep 7, 2026
9 checks passed
@zhikaip
zhikaip deleted the fieldstrength_refactor branch September 7, 2026 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

medium ready-to-merge This PR is approved and will be merged shortly t-electromagnetism Electromagnetism

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants