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
Conversation
jcommelin
commented
Feb 22, 2023
! if you have ported upstream changes. | ||
-/ | ||
import Mathlib.LinearAlgebra.Basic | ||
import Mathlib.LinearAlgebra.Basis |
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.
This import
doesn't exist in mathlib3 master
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.
Can you restart the port of this file after the next mathport run?
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 |
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.
These lemmas don't exist in mathlib3 master
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
fd6fb64
to
7a9b646
Compare
I re-ported this file. @jcommelin |
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.
Thanks 🎉
bors merge
Co-authored-by: casavaca <96765450+casavaca@users.noreply.github.com>
Pull request successfully merged into master. Build succeeded:
|