Skip to content

[Merged by Bors] - chore(LinearAlgebra/TensorProduct/Basic): semi-linearize map and lift#27288

Closed
themathqueen wants to merge 15 commits intoleanprover-community:masterfrom
themathqueen:mapsl_tensor
Closed

[Merged by Bors] - chore(LinearAlgebra/TensorProduct/Basic): semi-linearize map and lift#27288
themathqueen wants to merge 15 commits intoleanprover-community:masterfrom
themathqueen:mapsl_tensor

Conversation

@themathqueen
Copy link
Copy Markdown
Collaborator

@themathqueen themathqueen commented Jul 19, 2025

Semi-linearizing TensorProduct.map. This is important as we can then define star on tensors as: star x := map (starLinearEquiv R) (starLinearEquiv R) x. We can then also define the inner product on tensors.

Co-authored-by: Anatole Dedecker anatolededecker@gmail.com


Part of #27353.

Open in Gitpod

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 19, 2025

PR summary 652dbc72e5

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ liftAux.smulₛₗ

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).

@eric-wieser
Copy link
Copy Markdown
Member

My slight preference here would be to push forward with at least parts of #24208

@themathqueen
Copy link
Copy Markdown
Collaborator Author

My slight preference here would be to push forward with at least parts of #24208

@eric-wieser I agree, but I still think (and I think @ADedecker would agree) that we should create duplicate definitions for a lot of the things, including map and lift like what I did here, to keep the linear cases the same as before.

@ADedecker
Copy link
Copy Markdown
Member

ADedecker commented Jul 22, 2025

My conclusion was indeed that some things need to be duplicated, but I don't think this is the case for lift and map: unless I'm missing something, the semilinearized lift and map should be drop-in replacements for the existing ones because everything can be inferred from the data of the explicit arguments f and g.

@themathqueen themathqueen marked this pull request as draft July 22, 2025 19:21
@themathqueen themathqueen deleted the mapsl_tensor branch July 22, 2025 21:06
@themathqueen themathqueen changed the title feat(LinearAlgebra/TensorProduct/Basic): add semi-linear versions for map and lift feat(LinearAlgebra/TensorProduct/Basic): semi-linearize map and lift Jul 27, 2025
@themathqueen themathqueen restored the mapsl_tensor branch July 27, 2025 19:03
@themathqueen themathqueen reopened this Jul 27, 2025
@themathqueen
Copy link
Copy Markdown
Collaborator Author

@eric-wieser, mind taking a look at this? It's part of #27353, but for the stuff that doesn't depend on the refactor of LinearAlgebra/BilinearMap.

@github-actions github-actions bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Aug 4, 2025
@mathlib4-merge-conflict-bot mathlib4-merge-conflict-bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Aug 4, 2025
@themathqueen themathqueen requested a review from ocfnash August 13, 2025 11:31
@YaelDillies YaelDillies assigned ADedecker and unassigned YaelDillies Aug 14, 2025
@themathqueen themathqueen changed the title feat(LinearAlgebra/TensorProduct/Basic): semi-linearize map and lift chore(LinearAlgebra/TensorProduct/Basic): semi-linearize map and lift Aug 14, 2025
@themathqueen themathqueen requested a review from ADedecker August 24, 2025 14:15
@ocfnash
Copy link
Copy Markdown
Contributor

ocfnash commented Sep 28, 2025

Shouldn't we also upgrade lift.equiv to (M →ₛₗ[σ₁₂] N →ₛₗ[σ₁₂] P₂) ≃ₛₗ[σ₁₂] (M ⊗[R] N →ₛₗ[σ₁₂] P₂)?

@ocfnash ocfnash added the awaiting-author A reviewer has asked the author a question or requested changes. label Sep 28, 2025
@themathqueen
Copy link
Copy Markdown
Collaborator Author

themathqueen commented Sep 28, 2025

Shouldn't we also upgrade lift.equiv to (M →ₛₗ[σ₁₂] N →ₛₗ[σ₁₂] P₂) ≃ₛₗ[σ₁₂] (M ⊗[R] N →ₛₗ[σ₁₂] P₂)?

That's part of the next PR #27353 (with a lot more semilinearizing).

I guess it won't hurt to do lift.equiv here. hmm

@themathqueen themathqueen removed the awaiting-author A reviewer has asked the author a question or requested changes. label Sep 28, 2025
@ocfnash
Copy link
Copy Markdown
Contributor

ocfnash commented Sep 28, 2025

@themathqueen I'm getting mixed signals from your labeling and comments: are you planning to handle lift.equiv as part of these changes?

I'm adding back awaiting-author for now but feel free to remove it again if you do wish for further review for this in its current form.

@ocfnash ocfnash added the awaiting-author A reviewer has asked the author a question or requested changes. label Sep 28, 2025
@themathqueen
Copy link
Copy Markdown
Collaborator Author

I initially thought it wouldn't hurt to do. But I'd rather leave it for the next PR, because then we'd also need to semilinearize uncurry and all that.
So, it's ready for review as is :)

@themathqueen themathqueen removed the awaiting-author A reviewer has asked the author a question or requested changes. label Sep 28, 2025
@ocfnash
Copy link
Copy Markdown
Contributor

ocfnash commented Sep 28, 2025

OK let's go with this then. Thanks!

bors merge

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Sep 28, 2025
mathlib-bors bot pushed a commit that referenced this pull request Sep 28, 2025
…ift` (#27288)

Semi-linearizing `TensorProduct.map`. This is important as we can then define `star` on tensors as: `star x := map (starLinearEquiv R) (starLinearEquiv R) x`. We can then also define the inner product on tensors.

Co-authored-by: Anatole Dedecker <anatolededecker@gmail.com>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Sep 28, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title chore(LinearAlgebra/TensorProduct/Basic): semi-linearize map and lift [Merged by Bors] - chore(LinearAlgebra/TensorProduct/Basic): semi-linearize map and lift Sep 28, 2025
@mathlib-bors mathlib-bors bot closed this Sep 28, 2025
@themathqueen themathqueen deleted the mapsl_tensor branch September 28, 2025 16:39
joelriou pushed a commit to joelriou/mathlib4 that referenced this pull request Oct 2, 2025
…ift` (leanprover-community#27288)

Semi-linearizing `TensorProduct.map`. This is important as we can then define `star` on tensors as: `star x := map (starLinearEquiv R) (starLinearEquiv R) x`. We can then also define the inner product on tensors.

Co-authored-by: Anatole Dedecker <anatolededecker@gmail.com>
mitchell-horner pushed a commit to mitchell-horner/mathlib4 that referenced this pull request Oct 6, 2025
…ift` (leanprover-community#27288)

Semi-linearizing `TensorProduct.map`. This is important as we can then define `star` on tensors as: `star x := map (starLinearEquiv R) (starLinearEquiv R) x`. We can then also define the inner product on tensors.

Co-authored-by: Anatole Dedecker <anatolededecker@gmail.com>
BeibeiX0 pushed a commit to BeibeiX0/mathlib4 that referenced this pull request Nov 7, 2025
…ift` (leanprover-community#27288)

Semi-linearizing `TensorProduct.map`. This is important as we can then define `star` on tensors as: `star x := map (starLinearEquiv R) (starLinearEquiv R) x`. We can then also define the inner product on tensors.

Co-authored-by: Anatole Dedecker <anatolededecker@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors. t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants