Skip to content
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

[Merged by Bors] - feat(LinearAlgebra/Finsupp/linearCombination): add bilinearCombination #22678

Closed
wants to merge 12 commits into from

Conversation

AntoineChambert-Loir
Copy link
Collaborator

@AntoineChambert-Loir AntoineChambert-Loir commented Mar 7, 2025

Add Finsupp.bilinearCombination and Fintype.bilinearCombination as bilinear maps.

Previously, Fintype.linearCombination was a bilinear map, but Finsupp.linearCombination was only linear in the second variable.
That made Fintype.linearCombination unusable in the noncommutative case.
By consistency, Fintype.linearCombination is downgraded to a linear map.


Open in Gitpod

@AntoineChambert-Loir AntoineChambert-Loir added WIP Work in progress t-algebra Algebra (groups, rings, fields, etc) labels Mar 7, 2025
Copy link

github-actions bot commented Mar 7, 2025

PR summary 757fb139c8

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ Fintype.bilinearCombination
+ Fintype.bilinearCombination_apply
+ Fintype.bilinearCombination_apply_single
+ bilinearCombination
+ bilinearCombination_apply

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

@AntoineChambert-Loir AntoineChambert-Loir removed the WIP Work in progress label Mar 7, 2025
variable (α M)

@[simp]
theorem linearCombination_zero : linearCombination R (0 : α → M) = 0 :=
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand why you're moving these

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It was a mistake.

Copy link
Member

Choose a reason for hiding this comment

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

Can you move them back to where they were?

bors d+

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 moved linearCombination_zero to its initial place, but the bilinearCombination part fits better at the end, because it uses some simp lemmas that are proved earlier and requires to add some variables (such as Module S M).

Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Thanks 🎉

bors merge

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the ready-to-merge This PR has been sent to bors. label Mar 8, 2025
mathlib-bors bot pushed a commit that referenced this pull request Mar 8, 2025
#22678)

Add `Finsupp.bilinearCombination` and `Fintype.bilinearCombination` as bilinear maps.

Previously, `Fintype.linearCombination` was a bilinear map, but `Finsupp.linearCombination` was only linear in the second variable.
That made `Fintype.linearCombination` unusable in the noncommutative case.
By consistency, `Fintype.linearCombination` is downgraded to a linear map.
@eric-wieser
Copy link
Member

bors r-

@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Mar 8, 2025

Canceled.

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot removed the ready-to-merge This PR has been sent to bors. label Mar 8, 2025
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Mar 8, 2025

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

@AntoineChambert-Loir
Copy link
Collaborator Author

bors r+

mathlib-bors bot pushed a commit that referenced this pull request Mar 8, 2025
#22678)

Add `Finsupp.bilinearCombination` and `Fintype.bilinearCombination` as bilinear maps.

Previously, `Fintype.linearCombination` was a bilinear map, but `Finsupp.linearCombination` was only linear in the second variable.
That made `Fintype.linearCombination` unusable in the noncommutative case.
By consistency, `Fintype.linearCombination` is downgraded to a linear map.
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Mar 8, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(LinearAlgebra/Finsupp/linearCombination): add bilinearCombination [Merged by Bors] - feat(LinearAlgebra/Finsupp/linearCombination): add bilinearCombination Mar 8, 2025
@mathlib-bors mathlib-bors bot closed this Mar 8, 2025
@mathlib-bors mathlib-bors bot deleted the ACL/linearCombination branch March 8, 2025 11:06
variable (α M)

@[simp]
theorem linearCombination_zero : linearCombination R (0 : α → M) = 0 :=
Copy link
Member

@eric-wieser eric-wieser Mar 8, 2025

Choose a reason for hiding this comment

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

This is the line I was arguing should not have moved

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OMG, I'll open a PR at once to restore that one and the one after at this place, now I see your point.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

mathlib-bors bot pushed a commit that referenced this pull request Mar 8, 2025
… lemmas (#22713)

When merging #22678 , I had not understood an observation of @eric-wieser that two lemmas had been 
uselessly displaced. This PR puts them at their initial place.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated t-algebra Algebra (groups, rings, fields, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants