File: Mathlib/LinearAlgebra/BilinearMap.lean

full_name: LinearMap.mk₂'ₛₗ
code: /-- Create a bilinear map from a function that is semilinear in each component.
See `mk₂'` and `mk₂` for the linear case. -/
def mk₂'ₛₗ (f : M → N → P) (H1 : ∀ m₁ m₂ n, f (m₁ + m₂) n = f m₁ n + f m₂ n)
    (H2 : ∀ (c : R) (m n), f (c • m) n = ρ₁₂ c • f m n)
    (H3 : ∀ m n₁ n₂, f m (n₁ + n₂) = f m n₁ + f m n₂)
    (H4 : ∀ (c : S) (m n), f m (c • n) = σ₁₂ c • f m n) : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P 
goal: M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P

full_name: LinearMap.mk₂'ₛₗ_apply
code: @[simp]
theorem mk₂'ₛₗ_apply (f : M → N → P) {H1 H2 H3 H4} (m : M) (n : N) :
    (mk₂'ₛₗ ρ₁₂ σ₁₂ f H1 H2 H3 H4 : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P) m n = f m n 
goal: ((LinearMap.mk₂'ₛₗ ρ₁₂ σ₁₂ f H1 H2 H3 H4) m) n = f m n

full_name: LinearMap.mk₂'
code: /-- Create a bilinear map from a function that is linear in each component.
See `mk₂` for the special case where both arguments come from modules over the same ring. -/
def mk₂' (f : M → N → Pₗ) (H1 : ∀ m₁ m₂ n, f (m₁ + m₂) n = f m₁ n + f m₂ n)
    (H2 : ∀ (c : R) (m n), f (c • m) n = c • f m n)
    (H3 : ∀ m n₁ n₂, f m (n₁ + n₂) = f m n₁ + f m n₂)
    (H4 : ∀ (c : S) (m n), f m (c • n) = c • f m n) : M →ₗ[R] N →ₗ[S] Pₗ 
goal: M →ₗ[R] N →ₗ[S] Pₗ

full_name: LinearMap.mk₂'_apply
code: @[simp]
theorem mk₂'_apply (f : M → N → Pₗ) {H1 H2 H3 H4} (m : M) (n : N) :
    (mk₂' R S f H1 H2 H3 H4 : M →ₗ[R] N →ₗ[S] Pₗ) m n = f m n 
goal: ((LinearMap.mk₂' R S f H1 H2 H3 H4) m) n = f m n

full_name: LinearMap.ext₂
code: theorem ext₂ {f g : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P} (H : ∀ m n, f m n = g m n) : f = g 
goal: f = g

full_name: LinearMap.congr_fun₂
code: theorem congr_fun₂ {f g : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P} (h : f = g) (x y) : f x y = g x y 
goal: (f x) y = (g x) y

full_name: LinearMap.ext_iff₂
code: theorem ext_iff₂ {f g : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P} : f = g ↔ ∀ m n, f m n = g m n 
goal: f = g ↔ ∀ (m : M) (n : N), (f m) n = (g m) n

full_name: LinearMap.flip
code: /-- Given a linear map from `M` to linear maps from `N` to `P`, i.e., a bilinear map from `M × N` to
`P`, change the order of variables and get a linear map from `N` to linear maps from `M` to `P`. -/
def flip (f : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P) : N →ₛₗ[σ₁₂] M →ₛₗ[ρ₁₂] P 
goal: N →ₛₗ[σ₁₂] M →ₛₗ[ρ₁₂] P

full_name: LinearMap.flip_apply
code: @[simp]
theorem flip_apply (f : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P) (m : M) (n : N) : flip f n m = f m n 
goal: (f.flip n) m = (f m) n

full_name: LinearMap.flip_flip
code: @[simp]
theorem flip_flip (f : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P) : f.flip.flip = f 
goal: f.flip.flip = f

full_name: LinearMap.flip_inj
code: theorem flip_inj {f g : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P} (H : flip f = flip g) : f = g 
goal: f = g

full_name: LinearMap.map_zero₂
code: theorem map_zero₂ (f : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P) (y) : f 0 y = 0 
goal: (f 0) y = 0

full_name: LinearMap.map_neg₂
code: theorem map_neg₂ (f : M' →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P') (x y) : f (-x) y = -f x y 
goal: (f (-x)) y = -(f x) y

full_name: LinearMap.map_sub₂
code: theorem map_sub₂ (f : M' →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P') (x y z) : f (x - y) z = f x z - f y z 
goal: (f (x - y)) z = (f x) z - (f y) z

full_name: LinearMap.map_add₂
code: theorem map_add₂ (f : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P) (x₁ x₂ y) : f (x₁ + x₂) y = f x₁ y + f x₂ y 
goal: (f (x₁ + x₂)) y = (f x₁) y + (f x₂) y

full_name: LinearMap.map_smul₂
code: theorem map_smul₂ (f : M₂ →ₗ[R] N₂ →ₛₗ[σ₁₂] P₂) (r : R) (x y) : f (r • x) y = r • f x y 
goal: (f (r • x)) y = r • (f x) y

full_name: LinearMap.map_smulₛₗ₂
code: theorem map_smulₛₗ₂ (f : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P) (r : R) (x y) : f (r • x) y = ρ₁₂ r • f x y 
goal: (f (r • x)) y = ρ₁₂ r • (f x) y

full_name: LinearMap.map_sum₂
code: theorem map_sum₂ {ι : Type*} (f : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P) (t : Finset ι) (x : ι → M) (y) :
    f (∑ i ∈ t, x i) y = ∑ i ∈ t, f (x i) y 
goal: (f (∑ i ∈ t, x i)) y = ∑ i ∈ t, (f (x i)) y

full_name: LinearMap.domRestrict₂
code: /-- Restricting a bilinear map in the second entry -/
def domRestrict₂ (f : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P) (q : Submodule S N) : M →ₛₗ[ρ₁₂] q →ₛₗ[σ₁₂] P 
goal: M →ₛₗ[ρ₁₂] ↥q →ₛₗ[σ₁₂] P

full_name: LinearMap.domRestrict₂_apply
code: theorem domRestrict₂_apply (f : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P) (q : Submodule S N) (x : M) (y : q) :
    f.domRestrict₂ q x y = f x y 
goal: ((f.domRestrict₂ q) x) y = (f x) ↑y

full_name: LinearMap.domRestrict₁₂
code: /-- Restricting a bilinear map in both components -/
def domRestrict₁₂ (f : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P) (p : Submodule R M) (q : Submodule S N) :
    p →ₛₗ[ρ₁₂] q →ₛₗ[σ₁₂] P 
goal: ↥p →ₛₗ[ρ₁₂] ↥q →ₛₗ[σ₁₂] P

full_name: LinearMap.domRestrict₁₂_apply
code: theorem domRestrict₁₂_apply (f : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P) (p : Submodule R M) (q : Submodule S N)
    (x : p) (y : q) : f.domRestrict₁₂ p q x y = f x y 
goal: ((f.domRestrict₁₂ p q) x) y = (f ↑x) ↑y

full_name: LinearMap.restrictScalars₁₂_apply_apply
code: /-- If `B : M → N → Pₗ` is `R`-`S` bilinear and `R'` and `S'` are compatible scalar multiplications,
then the restriction of scalars is a `R'`-`S'` bilinear map. -/
@[simps!]
def restrictScalars₁₂ (B : M →ₗ[R] N →ₗ[S] Pₗ) : M →ₗ[R'] N →ₗ[S'] Pₗ 
goal: ∀ (x : N), ((LinearMap.restrictScalars₁₂ R' S' B) m) x = (B m) x

full_name: LinearMap.restrictScalars₁₂
code: /-- If `B : M → N → Pₗ` is `R`-`S` bilinear and `R'` and `S'` are compatible scalar multiplications,
then the restriction of scalars is a `R'`-`S'` bilinear map. -/
@[simps!]
def restrictScalars₁₂ (B : M →ₗ[R] N →ₗ[S] Pₗ) : M →ₗ[R'] N →ₗ[S'] Pₗ 
goal: M →ₗ[R'] N →ₗ[S'] Pₗ

full_name: LinearMap.restrictScalars₁₂_injective
code: theorem restrictScalars₁₂_injective : Function.Injective
    (LinearMap.restrictScalars₁₂ R' S' : (M →ₗ[R] N →ₗ[S] Pₗ) → (M →ₗ[R'] N →ₗ[S'] Pₗ)) 
goal: Function.Injective (LinearMap.restrictScalars₁₂ R' S')

full_name: LinearMap.restrictScalars₁₂_inj
code: @[simp]
theorem restrictScalars₁₂_inj {B B' : M →ₗ[R] N →ₗ[S] Pₗ} :
    B.restrictScalars₁₂ R' S' = B'.restrictScalars₁₂ R' S' ↔ B = B' 
goal: LinearMap.restrictScalars₁₂ R' S' B = LinearMap.restrictScalars₁₂ R' S' B' ↔ B = B'

full_name: LinearMap.mk₂
code: /-- Create a bilinear map from a function that is linear in each component.

This is a shorthand for `mk₂'` for the common case when `R = S`. -/
def mk₂ (f : M → Nₗ → Pₗ) (H1 : ∀ m₁ m₂ n, f (m₁ + m₂) n = f m₁ n + f m₂ n)
    (H2 : ∀ (c : R) (m n), f (c • m) n = c • f m n)
    (H3 : ∀ m n₁ n₂, f m (n₁ + n₂) = f m n₁ + f m n₂)
    (H4 : ∀ (c : R) (m n), f m (c • n) = c • f m n) : M →ₗ[R] Nₗ →ₗ[R] Pₗ 
goal: M →ₗ[R] Nₗ →ₗ[R] Pₗ

full_name: LinearMap.mk₂_apply
code: @[simp]
theorem mk₂_apply (f : M → Nₗ → Pₗ) {H1 H2 H3 H4} (m : M) (n : Nₗ) :
    (mk₂ R f H1 H2 H3 H4 : M →ₗ[R] Nₗ →ₗ[R] Pₗ) m n = f m n 
goal: ((LinearMap.mk₂ R f H1 H2 H3 H4) m) n = f m n

full_name: LinearMap.lflip
code: /-- Given a linear map from `M` to linear maps from `N` to `P`, i.e., a bilinear map `M → N → P`,
change the order of variables and get a linear map from `N` to linear maps from `M` to `P`. -/
def lflip : (M →ₛₗ[σ₁₃] N →ₛₗ[σ₂₃] P) →ₗ[R₃] N →ₛₗ[σ₂₃] M →ₛₗ[σ₁₃] P 
goal: (M →ₛₗ[σ₁₃] N →ₛₗ[σ₂₃] P) →ₗ[R₃] N →ₛₗ[σ₂₃] M →ₛₗ[σ₁₃] P

full_name: LinearMap.lflip_apply
code: @[simp]
theorem lflip_apply (m : M) (n : N) : lflip f n m = f m n 
goal: ((LinearMap.lflip f) n) m = (f m) n

full_name: LinearMap.lcomp
code: /-- Composing a linear map `M → N` and a linear map `N → P` to form a linear map `M → P`. -/
def lcomp (f : M →ₗ[R] Nₗ) : (Nₗ →ₗ[R] Pₗ) →ₗ[R] M →ₗ[R] Pₗ 
goal: (Nₗ →ₗ[R] Pₗ) →ₗ[R] M →ₗ[R] Pₗ

full_name: LinearMap.lcomp_apply
code: @[simp]
theorem lcomp_apply (f : M →ₗ[R] Nₗ) (g : Nₗ →ₗ[R] Pₗ) (x : M) : lcomp _ _ f g x = g (f x) 
goal: ((LinearMap.lcomp R Pₗ f) g) x = g (f x)

full_name: LinearMap.lcomp_apply'
code: theorem lcomp_apply' (f : M →ₗ[R] Nₗ) (g : Nₗ →ₗ[R] Pₗ) : lcomp R Pₗ f g = g ∘ₗ f 
goal: (LinearMap.lcomp R Pₗ f) g = g ∘ₗ f

full_name: LinearMap.lcompₛₗ
code: /-- Composing a semilinear map `M → N` and a semilinear map `N → P` to form a semilinear map
`M → P` is itself a linear map. -/
def lcompₛₗ (f : M →ₛₗ[σ₁₂] N) : (N →ₛₗ[σ₂₃] P) →ₗ[R₃] M →ₛₗ[σ₁₃] P 
goal: (N →ₛₗ[σ₂₃] P) →ₗ[R₃] M →ₛₗ[σ₁₃] P

full_name: LinearMap.lcompₛₗ_apply
code: @[simp]
theorem lcompₛₗ_apply (f : M →ₛₗ[σ₁₂] N) (g : N →ₛₗ[σ₂₃] P) (x : M) :
    lcompₛₗ P σ₂₃ f g x = g (f x) 
goal: ((LinearMap.lcompₛₗ P σ₂₃ f) g) x = g (f x)

full_name: LinearMap.llcomp
code: /-- Composing a linear map `M → N` and a linear map `N → P` to form a linear map `M → P`. -/
def llcomp : (Nₗ →ₗ[R] Pₗ) →ₗ[R] (M →ₗ[R] Nₗ) →ₗ[R] M →ₗ[R] Pₗ 
goal: (Nₗ →ₗ[R] Pₗ) →ₗ[R] (M →ₗ[R] Nₗ) →ₗ[R] M →ₗ[R] Pₗ

full_name: LinearMap.llcomp_apply
code: @[simp]
theorem llcomp_apply (f : Nₗ →ₗ[R] Pₗ) (g : M →ₗ[R] Nₗ) (x : M) :
    llcomp R M Nₗ Pₗ f g x = f (g x) 
goal: (((LinearMap.llcomp R M Nₗ Pₗ) f) g) x = f (g x)

full_name: LinearMap.llcomp_apply'
code: theorem llcomp_apply' (f : Nₗ →ₗ[R] Pₗ) (g : M →ₗ[R] Nₗ) : llcomp R M Nₗ Pₗ f g = f ∘ₗ g 
goal: ((LinearMap.llcomp R M Nₗ Pₗ) f) g = f ∘ₗ g

full_name: LinearMap.compl₂
code: /-- Composing a linear map `Q → N` and a bilinear map `M → N → P` to
form a bilinear map `M → Q → P`. -/
def compl₂ {R₅ : Type*} [CommSemiring R₅] [Module R₅ P] [SMulCommClass R₃ R₅ P] {σ₁₅ : R →+* R₅}
    (h : M →ₛₗ[σ₁₅] N →ₛₗ[σ₂₃] P) (g : Q →ₛₗ[σ₄₂] N) : M →ₛₗ[σ₁₅] Q →ₛₗ[σ₄₃] P 
goal: M →ₛₗ[σ₁₅] Q →ₛₗ[σ₄₃] P

full_name: LinearMap.compl₂_apply
code: @[simp]
theorem compl₂_apply (g : Q →ₛₗ[σ₄₂] N) (m : M) (q : Q) : f.compl₂ g m q = f m (g q) 
goal: ((f.compl₂ g) m) q = (f m) (g q)

full_name: LinearMap.compl₂_id
code: @[simp]
theorem compl₂_id : f.compl₂ LinearMap.id = f 
goal: f.compl₂ LinearMap.id = f

full_name: LinearMap.compl₁₂
code: /-- Composing linear maps `Q → M` and `Q' → N` with a bilinear map `M → N → P` to
form a bilinear map `Q → Q' → P`. -/
def compl₁₂ {R₁ : Type*} [CommSemiring R₁] [Module R₂ N] [Module R₂ Pₗ] [Module R₁ Pₗ]
    [Module R₁ Mₗ] [SMulCommClass R₂ R₁ Pₗ] [Module R₁ Qₗ] [Module R₂ Qₗ']
    (f : Mₗ →ₗ[R₁] N →ₗ[R₂] Pₗ) (g : Qₗ →ₗ[R₁] Mₗ) (g' : Qₗ' →ₗ[R₂] N) :
    Qₗ →ₗ[R₁] Qₗ' →ₗ[R₂] Pₗ 
goal: Qₗ →ₗ[R₁] Qₗ' →ₗ[R₂] Pₗ

full_name: LinearMap.compl₁₂_apply
code: @[simp]
theorem compl₁₂_apply (f : Mₗ →ₗ[R] Nₗ →ₗ[R] Pₗ) (g : Qₗ →ₗ[R] Mₗ) (g' : Qₗ' →ₗ[R] Nₗ) (x : Qₗ)
    (y : Qₗ') : f.compl₁₂ g g' x y = f (g x) (g' y) 
goal: ((f.compl₁₂ g g') x) y = (f (g x)) (g' y)

full_name: LinearMap.compl₁₂_id_id
code: @[simp]
theorem compl₁₂_id_id (f : Mₗ →ₗ[R] Nₗ →ₗ[R] Pₗ) : f.compl₁₂ LinearMap.id LinearMap.id = f 
goal: f.compl₁₂ LinearMap.id LinearMap.id = f

full_name: LinearMap.compl₁₂_inj
code: theorem compl₁₂_inj {f₁ f₂ : Mₗ →ₗ[R] Nₗ →ₗ[R] Pₗ} {g : Qₗ →ₗ[R] Mₗ} {g' : Qₗ' →ₗ[R] Nₗ}
    (hₗ : Function.Surjective g) (hᵣ : Function.Surjective g') :
    f₁.compl₁₂ g g' = f₂.compl₁₂ g g' ↔ f₁ = f₂ 
goal: f₁.compl₁₂ g g' = f₂.compl₁₂ g g' ↔ f₁ = f₂

full_name: LinearMap.compr₂
code: /-- Composing a linear map `P → Q` and a bilinear map `M → N → P` to
form a bilinear map `M → N → Q`. -/
def compr₂ (f : M →ₗ[R] Nₗ →ₗ[R] Pₗ) (g : Pₗ →ₗ[R] Qₗ) : M →ₗ[R] Nₗ →ₗ[R] Qₗ 
goal: M →ₗ[R] Nₗ →ₗ[R] Qₗ

full_name: LinearMap.compr₂_apply
code: @[simp]
theorem compr₂_apply (f : M →ₗ[R] Nₗ →ₗ[R] Pₗ) (g : Pₗ →ₗ[R] Qₗ) (m : M) (n : Nₗ) :
    f.compr₂ g m n = g (f m n) 
goal: ((f.compr₂ g) m) n = g ((f m) n)

full_name: LinearMap.lsmul
code: /-- Scalar multiplication as a bilinear map `R → M → M`. -/
def lsmul : R →ₗ[R] M →ₗ[R] M 
goal: R →ₗ[R] M →ₗ[R] M

full_name: LinearMap.lsmul_eq_DistribMulAction_toLinearMap
code: lemma lsmul_eq_DistribMulAction_toLinearMap (r : R) :
    lsmul R M r = DistribMulAction.toLinearMap R M r 
goal: (LinearMap.lsmul R M) r = DistribMulAction.toLinearMap R M r

full_name: LinearMap.lsmul_apply
code: @[simp]
theorem lsmul_apply (r : R) (m : M) : lsmul R M r m = r • m 
goal: ((LinearMap.lsmul R M) r) m = r • m

full_name: LinearMap.BilinMap
code: /-- A shorthand for the type of `R`-bilinear `Nₗ`-valued maps on `M`. -/
protected abbrev BilinMap : Type _ 
goal: Type (max u_10 u_5)

full_name: LinearMap.BilinForm
code: /-- For convenience, a shorthand for the type of bilinear forms from `M` to `R`. -/
protected abbrev BilinForm : Type _ 
goal: Type (max u_1 u_5)

full_name: LinearMap.lsmul_injective
code: theorem lsmul_injective [NoZeroSMulDivisors R M] {x : R} (hx : x ≠ 0) :
    Function.Injective (lsmul R M x) 
goal: Function.Injective ⇑((LinearMap.lsmul R M) x)

full_name: LinearMap.ker_lsmul
code: theorem ker_lsmul [NoZeroSMulDivisors R M] {a : R} (ha : a ≠ 0) :
    LinearMap.ker (LinearMap.lsmul R M a) = ⊥ 
goal: LinearMap.ker ((LinearMap.lsmul R M) a) = ⊥