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: port LinearAlgebra.BilinearMap #2434

Closed
wants to merge 6 commits into from

Conversation

jcommelin
Copy link
Member


Open in Gitpod

@jcommelin jcommelin added mathlib-port This is a port of a theory file from mathlib. blocked-by-other-PR This PR depends on another PR which is still in the queue. labels Feb 22, 2023
@semorrison semorrison removed the blocked-by-other-PR This PR depends on another PR which is still in the queue. label Feb 22, 2023
! if you have ported upstream changes.
-/
import Mathlib.LinearAlgebra.Basic
import Mathlib.LinearAlgebra.Basis
Copy link
Member

Choose a reason for hiding this comment

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

This import doesn't exist in mathlib3 master

Copy link
Member

@eric-wieser eric-wieser left a comment

Choose a reason for hiding this comment

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

Can you restart the port of this file after the next mathport run?

Comment on lines 453 to 481
variable (b₁ : Basis ι₁ R M) (b₂ : Basis ι₂ S N) (b₁' : Basis ι₁ R Mₗ) (b₂' : Basis ι₂ R Nₗ)

/-- Two bilinear maps are equal when they are equal on all basis vectors. -/
theorem ext_basis {B B' : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P} (h : ∀ i j, B (b₁ i) (b₂ j) = B' (b₁ i) (b₂ j)) :
B = B' :=
b₁.ext fun i => b₂.ext fun j => h i j
#align linear_map.ext_basis LinearMap.ext_basis

/-- Write out `B x y` as a sum over `B (b i) (b j)` if `b` is a basis.

Version for semi-bilinear maps, see `sum_repr_mul_repr_mul` for the bilinear version. -/
theorem sum_repr_mul_repr_mulₛₗ {B : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P} (x y) :
((b₁.repr x).Sum fun i xi => (b₂.repr y).Sum fun j yj => ρ₁₂ xi • σ₁₂ yj • B (b₁ i) (b₂ j)) =
B x y := by
conv_rhs => rw [← b₁.total_repr x, ← b₂.total_repr y]
simp_rw [Finsupp.total_apply, Finsupp.sum, map_sum₂, map_sum, LinearMap.map_smulₛₗ₂,
LinearMap.map_smulₛₗ]
#align linear_map.sum_repr_mul_repr_mulₛₗ LinearMap.sum_repr_mul_repr_mulₛₗ

/-- Write out `B x y` as a sum over `B (b i) (b j)` if `b` is a basis.

Version for bilinear maps, see `sum_repr_mul_repr_mulₛₗ` for the semi-bilinear version. -/
theorem sum_repr_mul_repr_mul {B : Mₗ →ₗ[R] Nₗ →ₗ[R] Pₗ} (x y) :
((b₁'.repr x).Sum fun i xi => (b₂'.repr y).Sum fun j yj => xi • yj • B (b₁' i) (b₂' j)) =
B x y := by
conv_rhs => rw [← b₁'.total_repr x, ← b₂'.total_repr y]
simp_rw [Finsupp.total_apply, Finsupp.sum, map_sum₂, map_sum, LinearMap.map_smul₂,
LinearMap.map_smul]
#align linear_map.sum_repr_mul_repr_mul LinearMap.sum_repr_mul_repr_mul
Copy link
Member

Choose a reason for hiding this comment

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

These lemmas don't exist in mathlib3 master

@eric-wieser
Copy link
Member

I think mathport has rerun, so this is ready to re-port

Mathbin -> Mathlib

fix certain import statements

move "by" to end of line

add import to Mathlib.lean
@casavaca casavaca force-pushed the port/LinearAlgebra.BilinearMap branch from fd6fb64 to 7a9b646 Compare February 28, 2023 00:57
@casavaca
Copy link
Collaborator

I re-ported this file. @jcommelin

@casavaca casavaca added the awaiting-review The author would like community review of the PR label Feb 28, 2023
Copy link
Member Author

@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

@semorrison semorrison added ready-to-merge This PR has been sent to bors. and removed awaiting-review The author would like community review of the PR labels Feb 28, 2023
bors bot pushed a commit that referenced this pull request Feb 28, 2023
Co-authored-by: casavaca <96765450+casavaca@users.noreply.github.com>
@bors
Copy link

bors bot commented Feb 28, 2023

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat: port LinearAlgebra.BilinearMap [Merged by Bors] - feat: port LinearAlgebra.BilinearMap Feb 28, 2023
@bors bors bot closed this Feb 28, 2023
@bors bors bot deleted the port/LinearAlgebra.BilinearMap branch February 28, 2023 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mathlib-port This is a port of a theory file from mathlib. ready-to-merge This PR has been sent to bors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants