fact
stringlengths
6
3.84k
type
stringclasses
11 values
library
stringclasses
32 values
imports
listlengths
1
14
filename
stringlengths
20
95
symbolic_name
stringlengths
1
90
docstring
stringlengths
7
20k
isAlt_iff_eq_neg_flip [NoZeroDivisors R] [CharZero R] {B : M₁ →ₛₗ[I] M₁ →ₛₗ[I] R} : B.IsAlt ↔ B = -B.flip := by constructor <;> intro h · ext simp_rw [neg_apply, flip_apply] exact (h.neg _ _).symm intro x let h' := congr_fun₂ h x x simp only [neg_apply, flip_apply, ← add_eq_zero_iff_eq_neg] at h' exact add_self_eq_zero.mp h'
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
isAlt_iff_eq_neg_flip
null
orthogonalBilin (N : Submodule R₁ M₁) (B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] M) : Submodule R₁ M₁ where carrier := { m | ∀ n ∈ N, B.IsOrtho n m } zero_mem' x _ := B.isOrtho_zero_right x add_mem' hx hy n hn := by rw [LinearMap.IsOrtho, map_add, show B n _ = 0 from hx n hn, show B n _ = 0 from hy n hn, zero_add] smul_mem' c x hx n hn := by rw [LinearMap.IsOrtho, LinearMap.map_smulₛₗ, show B n x = 0 from hx n hn, smul_zero] variable {N L : Submodule R₁ M₁} @[simp]
def
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
orthogonalBilin
The orthogonal complement of a submodule `N` with respect to some bilinear map is the set of elements `x` which are orthogonal to all elements of `N`; i.e., for all `y` in `N`, `B x y = 0`. Note that for general (neither symmetric nor antisymmetric) bilinear maps this definition has a chirality; in addition to this "left" orthogonal complement one could define a "right" orthogonal complement for which, for all `y` in `N`, `B y x = 0`. This variant definition is not currently provided in mathlib.
mem_orthogonalBilin_iff {m : M₁} : m ∈ N.orthogonalBilin B ↔ ∀ n ∈ N, B.IsOrtho n m := Iff.rfl
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
mem_orthogonalBilin_iff
null
orthogonalBilin_le (h : N ≤ L) : L.orthogonalBilin B ≤ N.orthogonalBilin B := fun _ hn l hl ↦ hn l (h hl)
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
orthogonalBilin_le
null
le_orthogonalBilin_orthogonalBilin (b : B.IsRefl) : N ≤ (N.orthogonalBilin B).orthogonalBilin B := fun n hn _m hm ↦ b _ _ (hm n hn)
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
le_orthogonalBilin_orthogonalBilin
null
span_singleton_inf_orthogonal_eq_bot (B : V₁ →ₛₗ[J₁] V₁ →ₛₗ[J₁'] V₂) (x : V₁) (hx : ¬B.IsOrtho x x) : (K₁ ∙ x) ⊓ Submodule.orthogonalBilin (K₁ ∙ x) B = ⊥ := by rw [← Finset.coe_singleton] refine eq_bot_iff.2 fun y h ↦ ?_ obtain ⟨μ, -, rfl⟩ := Submodule.mem_span_finset.1 h.1 replace h := h.2 x (by simp [Submodule.mem_span] : x ∈ Submodule.span K₁ ({x} : Finset V₁)) rw [Finset.sum_singleton] at h ⊢ suffices hμzero : μ x = 0 by rw [hμzero, zero_smul, Submodule.mem_bot] rw [isOrtho_def, map_smulₛₗ] at h exact Or.elim (smul_eq_zero.mp h) (fun y ↦ by simpa using y) (fun hfalse ↦ False.elim <| hx hfalse)
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
span_singleton_inf_orthogonal_eq_bot
null
orthogonal_span_singleton_eq_to_lin_ker {B : V →ₗ[K] V →ₛₗ[J] V₂} (x : V) : Submodule.orthogonalBilin (K ∙ x) B = LinearMap.ker (B x) := by ext y simp_rw [Submodule.mem_orthogonalBilin_iff, LinearMap.mem_ker, Submodule.mem_span_singleton] constructor · exact fun h ↦ h x ⟨1, one_smul _ _⟩ · rintro h _ ⟨z, rfl⟩ rw [isOrtho_def, map_smulₛₗ₂, smul_eq_zero] exact Or.intro_right _ h
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
orthogonal_span_singleton_eq_to_lin_ker
null
span_singleton_sup_orthogonal_eq_top {B : V →ₗ[K] V →ₗ[K] K} {x : V} (hx : ¬B.IsOrtho x x) : (K ∙ x) ⊔ Submodule.orthogonalBilin (N := K ∙ x) (B := B) = ⊤ := by rw [orthogonal_span_singleton_eq_to_lin_ker] exact (B x).span_singleton_sup_ker_eq_top hx
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
span_singleton_sup_orthogonal_eq_top
null
isCompl_span_singleton_orthogonal {B : V →ₗ[K] V →ₗ[K] K} {x : V} (hx : ¬B.IsOrtho x x) : IsCompl (K ∙ x) (Submodule.orthogonalBilin (N := K ∙ x) (B := B)) := { disjoint := disjoint_iff.2 <| span_singleton_inf_orthogonal_eq_bot B x hx codisjoint := codisjoint_iff.2 <| span_singleton_sup_orthogonal_eq_top hx }
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
isCompl_span_singleton_orthogonal
Given a bilinear form `B` and some `x` such that `B x x ≠ 0`, the span of the singleton of `x` is complement to its orthogonal complement.
IsAdjointPair (f : M → M₁) (g : M₁ → M) := ∀ x y, B' (f x) y = B x (g y) variable {B B' f g}
def
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
IsAdjointPair
Given a pair of modules equipped with bilinear maps, this is the condition for a pair of maps between them to be mutually adjoint.
isAdjointPair_iff_comp_eq_compl₂ : IsAdjointPair B B' f g ↔ B'.comp f = B.compl₂ g := by constructor <;> intro h · ext x y rw [comp_apply, compl₂_apply] exact h x y · intro _ _ rw [← compl₂_apply, ← comp_apply, h]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
isAdjointPair_iff_comp_eq_compl₂
null
isAdjointPair_zero : IsAdjointPair B B' 0 0 := fun _ _ ↦ by simp only [Pi.zero_apply, map_zero, zero_apply]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
isAdjointPair_zero
null
isAdjointPair_id : IsAdjointPair B B (_root_.id : M → M) (_root_.id : M → M) := fun _ _ ↦ rfl
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
isAdjointPair_id
null
isAdjointPair_one : IsAdjointPair B B (1 : Module.End R M) (1 : Module.End R M) := isAdjointPair_id
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
isAdjointPair_one
null
IsAdjointPair.add {f f' : M → M₁} {g g' : M₁ → M} (h : IsAdjointPair B B' f g) (h' : IsAdjointPair B B' f' g') : IsAdjointPair B B' (f + f') (g + g') := fun x _ ↦ by rw [Pi.add_apply, Pi.add_apply, B'.map_add₂, (B x).map_add, h, h']
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
IsAdjointPair.add
null
IsAdjointPair.comp {f : M → M₁} {g : M₁ → M} {f' : M₁ → M₂} {g' : M₂ → M₁} (h : IsAdjointPair B B' f g) (h' : IsAdjointPair B' B'' f' g') : IsAdjointPair B B'' (f' ∘ f) (g ∘ g') := fun _ _ ↦ by rw [Function.comp_def, Function.comp_def, h', h]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
IsAdjointPair.comp
null
IsAdjointPair.mul {f g f' g' : Module.End R M} (h : IsAdjointPair B B f g) (h' : IsAdjointPair B B f' g') : IsAdjointPair B B (f * f') (g' * g) := h'.comp h
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
IsAdjointPair.mul
null
IsAdjointPair.sub (h : IsAdjointPair B B' f g) (h' : IsAdjointPair B B' f' g') : IsAdjointPair B B' (f - f') (g - g') := fun x _ ↦ by rw [Pi.sub_apply, Pi.sub_apply, B'.map_sub₂, (B x).map_sub, h, h']
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
IsAdjointPair.sub
null
IsAdjointPair.smul (c : R) (h : IsAdjointPair B B' f g) : IsAdjointPair B B' (c • f) (c • g) := fun _ _ ↦ by simp [h _]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
IsAdjointPair.smul
null
IsOrthogonal : Prop := ∀ x y, B (f x) (f y) = B x y variable {B f} @[simp]
def
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
IsOrthogonal
A linear transformation `f` is orthogonal with respect to a bilinear form `B` if `B` is bi-invariant with respect to `f`.
_root_.LinearEquiv.isAdjointPair_symm_iff {f : M ≃ M} : LinearMap.IsAdjointPair B B f f.symm ↔ B.IsOrthogonal f := ⟨fun hf x y ↦ by simpa using hf x (f y), fun hf x y ↦ by simpa using hf x (f.symm y)⟩
lemma
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
_root_.LinearEquiv.isAdjointPair_symm_iff
null
isOrthogonal_of_forall_apply_same {F : Type*} [FunLike F M M] [LinearMapClass F R M M] (f : F) (h : IsLeftRegular (2 : R)) (hB : B.IsSymm) (hf : ∀ x, B (f x) (f x) = B x x) : B.IsOrthogonal f := by intro x y suffices 2 * B (f x) (f y) = 2 * B x y from h this have := hf (x + y) simp only [map_add, LinearMap.add_apply, hf x, hf y, show B y x = B x y from hB.eq y x] at this rw [show B (f y) (f x) = B (f x) (f y) from hB.eq (f y) (f x)] at this simp only [add_assoc, add_right_inj] at this simp only [← add_assoc, add_left_inj] at this simpa only [← two_mul] using this
lemma
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
isOrthogonal_of_forall_apply_same
null
IsPairSelfAdjoint (f : M → M) := IsAdjointPair B F f f
def
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
IsPairSelfAdjoint
The condition for an endomorphism to be "self-adjoint" with respect to a pair of bilinear maps on the underlying module. In the case that these two maps are identical, this is the usual concept of self adjointness. In the case that one of the maps is the negation of the other, this is the usual concept of skew adjointness.
protected IsSelfAdjoint (f : M → M) := IsAdjointPair B B f f
def
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
IsSelfAdjoint
An endomorphism of a module is self-adjoint with respect to a bilinear map if it serves as an adjoint for itself.
isPairSelfAdjointSubmodule : Submodule R (Module.End R M) where carrier := { f | IsPairSelfAdjoint B F f } zero_mem' := isAdjointPair_zero add_mem' hf hg := hf.add hg smul_mem' c _ h := h.smul c
def
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
isPairSelfAdjointSubmodule
The set of pair-self-adjoint endomorphisms are a submodule of the type of all endomorphisms.
IsSkewAdjoint (f : M → M) := IsAdjointPair B B f (-f)
def
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
IsSkewAdjoint
An endomorphism of a module is skew-adjoint with respect to a bilinear map if its negation serves as an adjoint.
selfAdjointSubmodule := isPairSelfAdjointSubmodule B B
def
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
selfAdjointSubmodule
The set of self-adjoint endomorphisms of a module with bilinear map is a submodule. (In fact it is a Jordan subalgebra.)
skewAdjointSubmodule := isPairSelfAdjointSubmodule (-B) B variable {B F} @[simp]
def
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
skewAdjointSubmodule
The set of skew-adjoint endomorphisms of a module with bilinear map is a submodule. (In fact it is a Lie subalgebra.)
mem_isPairSelfAdjointSubmodule (f : Module.End R M) : f ∈ isPairSelfAdjointSubmodule B F ↔ IsPairSelfAdjoint B F f := Iff.rfl
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
mem_isPairSelfAdjointSubmodule
null
isPairSelfAdjoint_equiv (e : M₁ ≃ₗ[R] M) (f : Module.End R M) : IsPairSelfAdjoint B F f ↔ IsPairSelfAdjoint (B.compl₁₂ e e) (F.compl₁₂ e e) (e.symm.conj f) := by have hₗ : (F.compl₁₂ (↑e : M₁ →ₗ[R] M) (↑e : M₁ →ₗ[R] M)).comp (e.symm.conj f) = (F.comp f).compl₁₂ (↑e : M₁ →ₗ[R] M) (↑e : M₁ →ₗ[R] M) := by ext simp only [LinearEquiv.symm_conj_apply, coe_comp, LinearEquiv.coe_coe, compl₁₂_apply, LinearEquiv.apply_symm_apply, Function.comp_apply] have hᵣ : (B.compl₁₂ (↑e : M₁ →ₗ[R] M) (↑e : M₁ →ₗ[R] M)).compl₂ (e.symm.conj f) = (B.compl₂ f).compl₁₂ (↑e : M₁ →ₗ[R] M) (↑e : M₁ →ₗ[R] M) := by ext simp only [LinearEquiv.symm_conj_apply, compl₂_apply, coe_comp, LinearEquiv.coe_coe, compl₁₂_apply, LinearEquiv.apply_symm_apply, Function.comp_apply] have he : Function.Surjective (⇑(↑e : M₁ →ₗ[R] M) : M₁ → M) := e.surjective simp_rw [IsPairSelfAdjoint, isAdjointPair_iff_comp_eq_compl₂, hₗ, hᵣ, compl₁₂_inj he he]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
isPairSelfAdjoint_equiv
null
isSkewAdjoint_iff_neg_self_adjoint (f : M → M) : B.IsSkewAdjoint f ↔ IsAdjointPair (-B) B f f := show (∀ x y, B (f x) y = B x ((-f) y)) ↔ ∀ x y, B (f x) y = (-B) x (f y) by simp @[simp]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
isSkewAdjoint_iff_neg_self_adjoint
null
mem_selfAdjointSubmodule (f : Module.End R M) : f ∈ B.selfAdjointSubmodule ↔ B.IsSelfAdjoint f := Iff.rfl @[simp]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
mem_selfAdjointSubmodule
null
mem_skewAdjointSubmodule (f : Module.End R M) : f ∈ B.skewAdjointSubmodule ↔ B.IsSkewAdjoint f := by rw [isSkewAdjoint_iff_neg_self_adjoint] exact Iff.rfl
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
mem_skewAdjointSubmodule
null
SeparatingLeft (B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M) : Prop := ∀ x : M₁, (∀ y : M₂, B x y = 0) → x = 0 variable (M₁ M₂ I₁ I₂)
def
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
SeparatingLeft
A bilinear map is called left-separating if the only element that is left-orthogonal to every other element is `0`; i.e., for every nonzero `x` in `M₁`, there exists `y` in `M₂` with `B x y ≠ 0`.
not_separatingLeft_zero [Nontrivial M₁] : ¬(0 : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M).SeparatingLeft := let ⟨m, hm⟩ := exists_ne (0 : M₁) fun h ↦ hm (h m fun _n ↦ rfl) variable {M₁ M₂ I₁ I₂}
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
not_separatingLeft_zero
In a non-trivial module, zero is not non-degenerate.
SeparatingLeft.ne_zero [Nontrivial M₁] {B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M} (h : B.SeparatingLeft) : B ≠ 0 := fun h0 ↦ not_separatingLeft_zero M₁ M₂ I₁ I₂ <| h0 ▸ h
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
SeparatingLeft.ne_zero
null
SeparatingLeft.congr (h : B.SeparatingLeft) : (e₁.arrowCongr (e₂.arrowCongr (LinearEquiv.refl R M)) B).SeparatingLeft := by intro x hx rw [← e₁.symm.map_eq_zero_iff] refine h (e₁.symm x) fun y ↦ ?_ specialize hx (e₂ y) simp only [LinearEquiv.arrowCongr_apply, LinearEquiv.symm_apply_apply, LinearEquiv.map_eq_zero_iff] at hx exact hx @[simp]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
SeparatingLeft.congr
null
separatingLeft_congr_iff : (e₁.arrowCongr (e₂.arrowCongr (LinearEquiv.refl R M)) B).SeparatingLeft ↔ B.SeparatingLeft := ⟨fun h ↦ by convert h.congr e₁.symm e₂.symm ext x y simp, SeparatingLeft.congr e₁ e₂⟩
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
separatingLeft_congr_iff
null
SeparatingRight (B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M) : Prop := ∀ y : M₂, (∀ x : M₁, B x y = 0) → y = 0
def
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
SeparatingRight
A bilinear map is called right-separating if the only element that is right-orthogonal to every other element is `0`; i.e., for every nonzero `y` in `M₂`, there exists `x` in `M₁` with `B x y ≠ 0`.
Nondegenerate (B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M) : Prop := SeparatingLeft B ∧ SeparatingRight B @[simp]
def
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
Nondegenerate
A bilinear map is called non-degenerate if it is left-separating and right-separating.
flip_separatingRight {B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M} : B.flip.SeparatingRight ↔ B.SeparatingLeft := ⟨fun hB x hy ↦ hB x hy, fun hB x hy ↦ hB x hy⟩ @[simp]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
flip_separatingRight
null
flip_separatingLeft {B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M} : B.flip.SeparatingLeft ↔ SeparatingRight B := by rw [← flip_separatingRight, flip_flip] @[simp]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
flip_separatingLeft
null
flip_nondegenerate {B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M} : B.flip.Nondegenerate ↔ B.Nondegenerate := Iff.trans and_comm (and_congr flip_separatingRight flip_separatingLeft)
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
flip_nondegenerate
null
separatingLeft_iff_linear_nontrivial {B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M} : B.SeparatingLeft ↔ ∀ x : M₁, B x = 0 → x = 0 := by constructor <;> intro h x hB · simpa only [hB, zero_apply, eq_self_iff_true, forall_const] using h x have h' : B x = 0 := by ext rw [zero_apply] exact hB _ exact h x h'
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
separatingLeft_iff_linear_nontrivial
null
separatingRight_iff_linear_flip_nontrivial {B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M} : B.SeparatingRight ↔ ∀ y : M₂, B.flip y = 0 → y = 0 := by rw [← flip_separatingLeft, separatingLeft_iff_linear_nontrivial]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
separatingRight_iff_linear_flip_nontrivial
null
separatingLeft_iff_ker_eq_bot {B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M} : B.SeparatingLeft ↔ LinearMap.ker B = ⊥ := Iff.trans separatingLeft_iff_linear_nontrivial LinearMap.ker_eq_bot'.symm
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
separatingLeft_iff_ker_eq_bot
A bilinear map is left-separating if and only if it has a trivial kernel.
separatingRight_iff_flip_ker_eq_bot {B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M} : B.SeparatingRight ↔ LinearMap.ker B.flip = ⊥ := by rw [← flip_separatingLeft, separatingLeft_iff_ker_eq_bot]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
separatingRight_iff_flip_ker_eq_bot
A bilinear map is right-separating if and only if its flip has a trivial kernel.
IsRefl.nondegenerate_iff_separatingLeft {B : M →ₗ[R] M →ₗ[R] M₁} (hB : B.IsRefl) : B.Nondegenerate ↔ B.SeparatingLeft := by refine ⟨fun h ↦ h.1, fun hB' ↦ ⟨hB', ?_⟩⟩ rw [separatingRight_iff_flip_ker_eq_bot, hB.ker_eq_bot_iff_ker_flip_eq_bot.mp] rwa [← separatingLeft_iff_ker_eq_bot]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
IsRefl.nondegenerate_iff_separatingLeft
null
IsRefl.nondegenerate_iff_separatingRight {B : M →ₗ[R] M →ₗ[R] M₁} (hB : B.IsRefl) : B.Nondegenerate ↔ B.SeparatingRight := by refine ⟨fun h ↦ h.2, fun hB' ↦ ⟨?_, hB'⟩⟩ rw [separatingLeft_iff_ker_eq_bot, hB.ker_eq_bot_iff_ker_flip_eq_bot.mpr] rwa [← separatingRight_iff_flip_ker_eq_bot]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
IsRefl.nondegenerate_iff_separatingRight
null
disjoint_ker_of_nondegenerate_restrict {B : M →ₗ[R] M →ₗ[R] M₁} {W : Submodule R M} (hW : (B.domRestrict₁₂ W W).Nondegenerate) : Disjoint W (LinearMap.ker B) := by refine Submodule.disjoint_def.mpr fun x hx hx' ↦ ?_ let x' : W := ⟨x, hx⟩ suffices x' = 0 by simpa [x'] apply hW.1 x' simp_rw [Subtype.forall, domRestrict₁₂_apply] intro y hy rw [mem_ker] at hx' simp [x', hx']
lemma
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
disjoint_ker_of_nondegenerate_restrict
null
IsSymm.nondegenerate_restrict_of_isCompl_ker {B : M →ₗ[R] M →ₗ[R] R} (hB : B.IsSymm) {W : Submodule R M} (hW : IsCompl W (LinearMap.ker B)) : (B.domRestrict₁₂ W W).Nondegenerate := by have hB' : (B.domRestrict₁₂ W W).IsRefl := fun x y ↦ hB.isRefl (W.subtype x) (W.subtype y) rw [LinearMap.IsRefl.nondegenerate_iff_separatingLeft hB'] intro ⟨x, hx⟩ hx' simp only [Submodule.mk_eq_zero] replace hx' : ∀ y ∈ W, B x y = 0 := by simpa [Subtype.forall] using hx' replace hx' : x ∈ W ⊓ ker B := by refine ⟨hx, ?_⟩ ext y obtain ⟨u, hu, v, hv, rfl⟩ : ∃ u ∈ W, ∃ v ∈ ker B, u + v = y := by rw [← Submodule.mem_sup, hW.sup_eq_top]; exact Submodule.mem_top suffices B x u = 0 by rw [mem_ker] at hv; simpa [← hB.eq v, hv] exact hx' u hu simpa [hW.inf_eq_bot] using hx'
lemma
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
IsSymm.nondegenerate_restrict_of_isCompl_ker
null
nondegenerate_restrict_of_disjoint_orthogonal {B : M →ₗ[R] M →ₗ[R] M₁} (hB : B.IsRefl) {W : Submodule R M} (hW : Disjoint W (W.orthogonalBilin B)) : (B.domRestrict₁₂ W W).Nondegenerate := by rw [(hB.domRestrict W).nondegenerate_iff_separatingLeft] rintro ⟨x, hx⟩ b₁ rw [Submodule.mk_eq_zero, ← Submodule.mem_bot R] refine hW.le_bot ⟨hx, fun y hy ↦ ?_⟩ specialize b₁ ⟨y, hy⟩ simp_rw [domRestrict₁₂_apply] at b₁ rw [hB.ortho_comm] exact b₁
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
nondegenerate_restrict_of_disjoint_orthogonal
The restriction of a reflexive bilinear map `B` onto a submodule `W` is nondegenerate if `W` has trivial intersection with its orthogonal complement, that is `Disjoint W (W.orthogonalBilin B)`.
IsOrthoᵢ.not_isOrtho_basis_self_of_separatingLeft [Nontrivial R] {B : M →ₛₗ[I] M →ₛₗ[I'] M₁} {v : Basis n R M} (h : B.IsOrthoᵢ v) (hB : B.SeparatingLeft) (i : n) : ¬B.IsOrtho (v i) (v i) := by intro ho refine v.ne_zero i (hB (v i) fun m ↦ ?_) obtain ⟨vi, rfl⟩ := v.repr.symm.surjective m rw [Basis.repr_symm_apply, Finsupp.linearCombination_apply, Finsupp.sum, map_sum] apply Finset.sum_eq_zero rintro j - rw [map_smulₛₗ] suffices B (v i) (v j) = 0 by rw [this, smul_zero] obtain rfl | hij := eq_or_ne i j · exact ho · exact h hij
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
IsOrthoᵢ.not_isOrtho_basis_self_of_separatingLeft
An orthogonal basis with respect to a left-separating bilinear map has no self-orthogonal elements.
IsOrthoᵢ.not_isOrtho_basis_self_of_separatingRight [Nontrivial R] {B : M →ₛₗ[I] M →ₛₗ[I'] M₁} {v : Basis n R M} (h : B.IsOrthoᵢ v) (hB : B.SeparatingRight) (i : n) : ¬B.IsOrtho (v i) (v i) := by rw [isOrthoᵢ_flip] at h rw [isOrtho_flip] exact h.not_isOrtho_basis_self_of_separatingLeft (flip_separatingLeft.mpr hB) i
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
IsOrthoᵢ.not_isOrtho_basis_self_of_separatingRight
An orthogonal basis with respect to a right-separating bilinear map has no self-orthogonal elements.
IsOrthoᵢ.separatingLeft_of_not_isOrtho_basis_self [NoZeroSMulDivisors R M₁] {B : M →ₗ[R] M →ₗ[R] M₁} (v : Basis n R M) (hO : B.IsOrthoᵢ v) (h : ∀ i, ¬B.IsOrtho (v i) (v i)) : B.SeparatingLeft := by intro m hB obtain ⟨vi, rfl⟩ := v.repr.symm.surjective m rw [LinearEquiv.map_eq_zero_iff] ext i rw [Finsupp.zero_apply] specialize hB (v i) simp_rw [Basis.repr_symm_apply, Finsupp.linearCombination_apply, Finsupp.sum, map_sum₂, map_smulₛₗ₂] at hB rw [Finset.sum_eq_single i] at hB · exact (smul_eq_zero.mp hB).elim _root_.id (h i).elim · intro j _hj hij replace hij : B (v j) (v i) = 0 := hO hij rw [hij, RingHom.id_apply, smul_zero] · intro hi replace hi : vi i = 0 := Finsupp.notMem_support_iff.mp hi rw [hi, RingHom.id_apply, zero_smul]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
IsOrthoᵢ.separatingLeft_of_not_isOrtho_basis_self
Given an orthogonal basis with respect to a bilinear map, the bilinear map is left-separating if the basis has no elements which are self-orthogonal.
IsOrthoᵢ.separatingRight_iff_not_isOrtho_basis_self [NoZeroSMulDivisors R M₁] {B : M →ₗ[R] M →ₗ[R] M₁} (v : Basis n R M) (hO : B.IsOrthoᵢ v) (h : ∀ i, ¬B.IsOrtho (v i) (v i)) : B.SeparatingRight := by rw [isOrthoᵢ_flip] at hO rw [← flip_separatingLeft] refine IsOrthoᵢ.separatingLeft_of_not_isOrtho_basis_self v hO fun i ↦ ?_ rw [isOrtho_flip] exact h i
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
IsOrthoᵢ.separatingRight_iff_not_isOrtho_basis_self
Given an orthogonal basis with respect to a bilinear map, the bilinear map is right-separating if the basis has no elements which are self-orthogonal.
IsOrthoᵢ.nondegenerate_of_not_isOrtho_basis_self [NoZeroSMulDivisors R M₁] {B : M →ₗ[R] M →ₗ[R] M₁} (v : Basis n R M) (hO : B.IsOrthoᵢ v) (h : ∀ i, ¬B.IsOrtho (v i) (v i)) : B.Nondegenerate := ⟨IsOrthoᵢ.separatingLeft_of_not_isOrtho_basis_self v hO h, IsOrthoᵢ.separatingRight_iff_not_isOrtho_basis_self v hO h⟩
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
IsOrthoᵢ.nondegenerate_of_not_isOrtho_basis_self
Given an orthogonal basis with respect to a bilinear map, the bilinear map is nondegenerate if the basis has no elements which are self-orthogonal.
apply_smul_sub_smul_sub_eq [CommRing R] [AddCommGroup M] [Module R M] (B : LinearMap.BilinForm R M) (x y : M) : B ((B x y) • x - (B x x) • y) ((B x y) • x - (B x x) • y) = (B x x) * ((B x x) * (B y y) - (B x y) * (B y x)) := by simp only [map_sub, map_smul, sub_apply, smul_apply, smul_eq_mul, mul_sub, mul_comm (B x y) (B x x), mul_left_comm (B x y) (B x x)] abel variable [CommRing R] [LinearOrder R] [IsStrictOrderedRing R] [AddCommGroup M] [Module R M] (B : LinearMap.BilinForm R M)
lemma
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
apply_smul_sub_smul_sub_eq
null
apply_mul_apply_le_of_forall_zero_le (hs : ∀ x, 0 ≤ B x x) (x y : M) : (B x y) * (B y x) ≤ (B x x) * (B y y) := by have aux (x y : M) : 0 ≤ (B x x) * ((B x x) * (B y y) - (B x y) * (B y x)) := by rw [← apply_smul_sub_smul_sub_eq B x y] exact hs (B x y • x - B x x • y) rcases lt_or_ge 0 (B x x) with hx | hx · exact sub_nonneg.mp <| nonneg_of_mul_nonneg_right (aux x y) hx · replace hx : B x x = 0 := le_antisymm hx (hs x) rcases lt_or_ge 0 (B y y) with hy | hy · rw [mul_comm (B x y), mul_comm (B x x)] exact sub_nonneg.mp <| nonneg_of_mul_nonneg_right (aux y x) hy · replace hy : B y y = 0 := le_antisymm hy (hs y) suffices B x y = - B y x by simpa [this, hx, hy] using mul_self_nonneg (B y x) rw [eq_neg_iff_add_eq_zero] apply le_antisymm · simpa [hx, hy, le_neg_iff_add_nonpos_left] using hs (x - y) · simpa [hx, hy] using hs (x + y)
lemma
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
apply_mul_apply_le_of_forall_zero_le
The **Cauchy-Schwarz inequality** for positive semidefinite forms.
apply_sq_le_of_symm (hs : ∀ x, 0 ≤ B x x) (hB : B.IsSymm) (x y : M) : (B x y) ^ 2 ≤ (B x x) * (B y y) := by rw [show (B x y) ^ 2 = (B x y) * (B y x) by rw [sq, ← hB.eq, RingHom.id_apply]] exact apply_mul_apply_le_of_forall_zero_le B hs x y
lemma
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
apply_sq_le_of_symm
The **Cauchy-Schwarz inequality** for positive semidefinite symmetric forms.
not_linearIndependent_of_apply_mul_apply_eq (hp : ∀ x, x ≠ 0 → 0 < B x x) (x y : M) (he : (B x y) * (B y x) = (B x x) * (B y y)) : ¬ LinearIndependent R ![x, y] := by have hz : (B x y) • x - (B x x) • y = 0 := by by_contra hc exact (ne_of_lt (hp ((B x) y • x - (B x) x • y) hc)).symm <| (apply_smul_sub_smul_sub_eq B x y).symm ▸ (mul_eq_zero_of_right ((B x) x) (sub_eq_zero_of_eq he.symm)) by_contra hL by_cases hx : x = 0 · simpa [hx] using LinearIndependent.ne_zero 0 hL · have h := sub_eq_zero.mpr (sub_eq_zero.mp hz).symm rw [sub_eq_add_neg, ← neg_smul, add_comm] at h exact (Ne.symm (ne_of_lt (hp x hx))) (LinearIndependent.eq_zero_of_pair hL h).2
lemma
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
not_linearIndependent_of_apply_mul_apply_eq
The equality case of **Cauchy-Schwarz**.
apply_mul_apply_lt_iff_linearIndependent [NoZeroSMulDivisors R M] (hp : ∀ x, x ≠ 0 → 0 < B x x) (x y : M) : (B x y) * (B y x) < (B x x) * (B y y) ↔ LinearIndependent R ![x, y] := by have hle : ∀ z, 0 ≤ B z z := by intro z by_cases hz : z = 0; simp [hz] exact le_of_lt (hp z hz) constructor · contrapose! intro h rw [LinearIndependent.pair_iff] at h push_neg at h obtain ⟨r, s, hl, h0⟩ := h by_cases hr : r = 0; · simp_all by_cases hs : s = 0; · simp_all suffices (B (r • x) (r • x)) * (B (s • y) (s • y)) = (B (r • x) (s • y)) * (B (s • y) (r • x)) by simp only [map_smul, smul_apply, smul_eq_mul] at this rw [show r * (r * (B x) x) * (s * (s * (B y) y)) = (r * r * s * s) * ((B x) x * (B y) y) by ring, show s * (r * (B x) y) * (r * (s * (B y) x)) = (r * r * s * s) * ((B x) y * (B y) x) by ring] at this have hrs : r * r * s * s ≠ 0 := by simp [hr, hs] exact le_of_eq <| mul_right_injective₀ hrs this simp [show s • y = - r • x by rwa [neg_smul, ← add_eq_zero_iff_eq_neg']] · contrapose! intro h refine not_linearIndependent_of_apply_mul_apply_eq B hp x y (le_antisymm (apply_mul_apply_le_of_forall_zero_le B hle x y) h)
lemma
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
apply_mul_apply_lt_iff_linearIndependent
Strict **Cauchy-Schwarz** is equivalent to linear independence for positive definite forms.
apply_sq_lt_iff_linearIndependent_of_symm [NoZeroSMulDivisors R M] (hp : ∀ x, x ≠ 0 → 0 < B x x) (hB : B.IsSymm) (x y : M) : (B x y) ^ 2 < (B x x) * (B y y) ↔ LinearIndependent R ![x, y] := by rw [show (B x y) ^ 2 = (B x y) * (B y x) by rw [sq, ← hB.eq, RingHom.id_apply]] exact apply_mul_apply_lt_iff_linearIndependent B hp x y
lemma
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
apply_sq_lt_iff_linearIndependent_of_symm
Strict **Cauchy-Schwarz** is equivalent to linear independence for positive definite symmetric forms.
apply_apply_same_eq_zero_iff (hs : ∀ x, 0 ≤ B x x) (hB : B.IsSymm) {x : M} : B x x = 0 ↔ x ∈ LinearMap.ker B := by rw [LinearMap.mem_ker] refine ⟨fun h ↦ ?_, fun h ↦ by simp [h]⟩ ext y have := B.apply_sq_le_of_symm hs hB x y simp only [h, zero_mul] at this exact pow_eq_zero <| le_antisymm this (sq_nonneg (B x y))
lemma
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
apply_apply_same_eq_zero_iff
null
nondegenerate_iff (hs : ∀ x, 0 ≤ B x x) (hB : B.IsSymm) : B.Nondegenerate ↔ ∀ x, B x x = 0 ↔ x = 0 := by simp_rw [hB.isRefl.nondegenerate_iff_separatingLeft, separatingLeft_iff_ker_eq_bot, Submodule.eq_bot_iff, B.apply_apply_same_eq_zero_iff hs hB, mem_ker] exact forall_congr' fun x ↦ by aesop
lemma
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
nondegenerate_iff
null
nondegenerate_iff' (hs : ∀ x, 0 ≤ B x x) (hB : B.IsSymm) : B.Nondegenerate ↔ ∀ x, x ≠ 0 → 0 < B x x := by rw [B.nondegenerate_iff hs hB, ← not_iff_not] push_neg exact exists_congr fun x ↦ ⟨by aesop, fun ⟨h₀, h⟩ ↦ Or.inl ⟨le_antisymm h (hs x), h₀⟩⟩
lemma
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
nondegenerate_iff'
A convenience variant of `LinearMap.BilinForm.nondegenerate_iff` characterising nondegeneracy as positive definiteness.
nondegenerate_restrict_iff_disjoint_ker (hs : ∀ x, 0 ≤ B x x) (hB : B.IsSymm) {W : Submodule R M} : (B.domRestrict₁₂ W W).Nondegenerate ↔ Disjoint W (LinearMap.ker B) := by refine ⟨disjoint_ker_of_nondegenerate_restrict, fun hW ↦ ?_⟩ have hB' : (B.domRestrict₁₂ W W).IsRefl := fun x y ↦ hB.isRefl (W.subtype x) (W.subtype y) rw [IsRefl.nondegenerate_iff_separatingLeft hB'] intro ⟨x, hx⟩ h simp_rw [Subtype.forall, domRestrict₁₂_apply] at h specialize h x hx rw [B.apply_apply_same_eq_zero_iff hs hB] at h have key : x ∈ W ⊓ LinearMap.ker B := ⟨hx, h⟩ simpa [hW.eq_bot] using key
lemma
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
nondegenerate_restrict_iff_disjoint_ker
null
SModEq (x y : M) : Prop := (Submodule.Quotient.mk x : M ⧸ U) = Submodule.Quotient.mk y @[inherit_doc] notation:50 x " ≡ " y " [SMOD " N "]" => SModEq N x y variable {U U₁ U₂}
def
LinearAlgebra
[ "Mathlib.Algebra.Module.Submodule.Map", "Mathlib.Algebra.Polynomial.Eval.Defs", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/LinearAlgebra/SModEq.lean
SModEq
A predicate saying two elements of a module are equivalent modulo a submodule.
protected SModEq.def : x ≡ y [SMOD U] ↔ (Submodule.Quotient.mk x : M ⧸ U) = Submodule.Quotient.mk y := Iff.rfl
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Submodule.Map", "Mathlib.Algebra.Polynomial.Eval.Defs", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/LinearAlgebra/SModEq.lean
SModEq.def
null
sub_mem : x ≡ y [SMOD U] ↔ x - y ∈ U := by rw [SModEq.def, Submodule.Quotient.eq] @[simp]
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Submodule.Map", "Mathlib.Algebra.Polynomial.Eval.Defs", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/LinearAlgebra/SModEq.lean
sub_mem
null
top : x ≡ y [SMOD (⊤ : Submodule R M)] := (Submodule.Quotient.eq ⊤).2 mem_top @[simp]
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Submodule.Map", "Mathlib.Algebra.Polynomial.Eval.Defs", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/LinearAlgebra/SModEq.lean
top
null
bot : x ≡ y [SMOD (⊥ : Submodule R M)] ↔ x = y := by rw [SModEq.def, Submodule.Quotient.eq, mem_bot, sub_eq_zero] @[mono]
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Submodule.Map", "Mathlib.Algebra.Polynomial.Eval.Defs", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/LinearAlgebra/SModEq.lean
bot
null
mono (HU : U₁ ≤ U₂) (hxy : x ≡ y [SMOD U₁]) : x ≡ y [SMOD U₂] := (Submodule.Quotient.eq U₂).2 <| HU <| (Submodule.Quotient.eq U₁).1 hxy @[refl]
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Submodule.Map", "Mathlib.Algebra.Polynomial.Eval.Defs", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/LinearAlgebra/SModEq.lean
mono
null
protected refl (x : M) : x ≡ x [SMOD U] := @rfl _ _
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Submodule.Map", "Mathlib.Algebra.Polynomial.Eval.Defs", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/LinearAlgebra/SModEq.lean
refl
null
protected rfl : x ≡ x [SMOD U] := SModEq.refl _
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Submodule.Map", "Mathlib.Algebra.Polynomial.Eval.Defs", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/LinearAlgebra/SModEq.lean
rfl
null
comm : x ≡ y [SMOD U] ↔ y ≡ x [SMOD U] := ⟨symm, symm⟩ @[trans] nonrec theorem trans (hxy : x ≡ y [SMOD U]) (hyz : y ≡ z [SMOD U]) : x ≡ z [SMOD U] := hxy.trans hyz
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Submodule.Map", "Mathlib.Algebra.Polynomial.Eval.Defs", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/LinearAlgebra/SModEq.lean
comm
null
instTrans : Trans (SModEq U) (SModEq U) (SModEq U) where trans := trans @[gcongr]
instance
LinearAlgebra
[ "Mathlib.Algebra.Module.Submodule.Map", "Mathlib.Algebra.Polynomial.Eval.Defs", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/LinearAlgebra/SModEq.lean
instTrans
null
add (hxy₁ : x₁ ≡ y₁ [SMOD U]) (hxy₂ : x₂ ≡ y₂ [SMOD U]) : x₁ + x₂ ≡ y₁ + y₂ [SMOD U] := by rw [SModEq.def] at hxy₁ hxy₂ ⊢ simp_rw [Quotient.mk_add, hxy₁, hxy₂] @[gcongr]
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Submodule.Map", "Mathlib.Algebra.Polynomial.Eval.Defs", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/LinearAlgebra/SModEq.lean
add
null
sum {ι} {s : Finset ι} {x y : ι → M} (hxy : ∀ i ∈ s, x i ≡ y i [SMOD U]) : ∑ i ∈ s, x i ≡ ∑ i ∈ s, y i [SMOD U] := by classical induction s using Finset.cons_induction with | empty => simp [SModEq.rfl] | cons i s _ ih => grw [Finset.sum_cons, Finset.sum_cons, hxy i (Finset.mem_cons_self i s), ih (fun j hj ↦ hxy j (Finset.mem_cons_of_mem hj))] @[gcongr]
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Submodule.Map", "Mathlib.Algebra.Polynomial.Eval.Defs", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/LinearAlgebra/SModEq.lean
sum
null
smul (hxy : x ≡ y [SMOD U]) (c : R) : c • x ≡ c • y [SMOD U] := by rw [SModEq.def] at hxy ⊢ simp_rw [Quotient.mk_smul, hxy] @[gcongr]
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Submodule.Map", "Mathlib.Algebra.Polynomial.Eval.Defs", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/LinearAlgebra/SModEq.lean
smul
null
nsmul (hxy : x ≡ y [SMOD U]) (n : ℕ) : n • x ≡ n • y [SMOD U] := by rw [SModEq.def] at hxy ⊢ simp_rw [Quotient.mk_smul, hxy] @[gcongr]
lemma
LinearAlgebra
[ "Mathlib.Algebra.Module.Submodule.Map", "Mathlib.Algebra.Polynomial.Eval.Defs", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/LinearAlgebra/SModEq.lean
nsmul
null
zsmul (hxy : x ≡ y [SMOD U]) (n : ℤ) : n • x ≡ n • y [SMOD U] := by rw [SModEq.def] at hxy ⊢ simp_rw [Quotient.mk_smul, hxy] @[gcongr]
lemma
LinearAlgebra
[ "Mathlib.Algebra.Module.Submodule.Map", "Mathlib.Algebra.Polynomial.Eval.Defs", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/LinearAlgebra/SModEq.lean
zsmul
null
mul {I : Ideal A} {x₁ x₂ y₁ y₂ : A} (hxy₁ : x₁ ≡ y₁ [SMOD I]) (hxy₂ : x₂ ≡ y₂ [SMOD I]) : x₁ * x₂ ≡ y₁ * y₂ [SMOD I] := by simp only [SModEq.def, Ideal.Quotient.mk_eq_mk, map_mul] at hxy₁ hxy₂ ⊢ rw [hxy₁, hxy₂] @[gcongr]
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Submodule.Map", "Mathlib.Algebra.Polynomial.Eval.Defs", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/LinearAlgebra/SModEq.lean
mul
null
prod {I : Ideal A} {ι} {s : Finset ι} {x y : ι → A} (hxy : ∀ i ∈ s, x i ≡ y i [SMOD I]) : ∏ i ∈ s, x i ≡ ∏ i ∈ s, y i [SMOD I] := by classical induction s using Finset.cons_induction with | empty => simp [SModEq.rfl] | cons i s _ ih => grw [Finset.prod_cons, Finset.prod_cons, hxy i (Finset.mem_cons_self i s), ih (fun j hj ↦ hxy j (Finset.mem_cons_of_mem hj))] @[gcongr]
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Submodule.Map", "Mathlib.Algebra.Polynomial.Eval.Defs", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/LinearAlgebra/SModEq.lean
prod
null
pow {I : Ideal A} {x y : A} (n : ℕ) (hxy : x ≡ y [SMOD I]) : x ^ n ≡ y ^ n [SMOD I] := by simp only [SModEq.def, Ideal.Quotient.mk_eq_mk, map_pow] at hxy ⊢ rw [hxy] @[gcongr]
lemma
LinearAlgebra
[ "Mathlib.Algebra.Module.Submodule.Map", "Mathlib.Algebra.Polynomial.Eval.Defs", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/LinearAlgebra/SModEq.lean
pow
null
neg (hxy : x ≡ y [SMOD U]) : - x ≡ - y [SMOD U] := by simpa only [SModEq.def, Quotient.mk_neg, neg_inj] @[gcongr]
lemma
LinearAlgebra
[ "Mathlib.Algebra.Module.Submodule.Map", "Mathlib.Algebra.Polynomial.Eval.Defs", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/LinearAlgebra/SModEq.lean
neg
null
sub (hxy₁ : x₁ ≡ y₁ [SMOD U]) (hxy₂ : x₂ ≡ y₂ [SMOD U]) : x₁ - x₂ ≡ y₁ - y₂ [SMOD U] := by rw [SModEq.def] at hxy₁ hxy₂ ⊢ simp_rw [Quotient.mk_sub, hxy₁, hxy₂]
lemma
LinearAlgebra
[ "Mathlib.Algebra.Module.Submodule.Map", "Mathlib.Algebra.Polynomial.Eval.Defs", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/LinearAlgebra/SModEq.lean
sub
null
zero : x ≡ 0 [SMOD U] ↔ x ∈ U := by rw [SModEq.def, Submodule.Quotient.eq, sub_zero]
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Submodule.Map", "Mathlib.Algebra.Polynomial.Eval.Defs", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/LinearAlgebra/SModEq.lean
zero
null
_root_.sub_smodEq_zero : x - y ≡ 0 [SMOD U] ↔ x ≡ y [SMOD U] := by simp only [SModEq.sub_mem, sub_zero]
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Submodule.Map", "Mathlib.Algebra.Polynomial.Eval.Defs", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/LinearAlgebra/SModEq.lean
_root_.sub_smodEq_zero
null
map (hxy : x ≡ y [SMOD U]) (f : M →ₗ[R] N) : f x ≡ f y [SMOD U.map f] := (Submodule.Quotient.eq _).2 <| f.map_sub x y ▸ mem_map_of_mem <| (Submodule.Quotient.eq _).1 hxy
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Submodule.Map", "Mathlib.Algebra.Polynomial.Eval.Defs", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/LinearAlgebra/SModEq.lean
map
null
comap {f : M →ₗ[R] N} (hxy : f x ≡ f y [SMOD V]) : x ≡ y [SMOD V.comap f] := (Submodule.Quotient.eq _).2 <| show f (x - y) ∈ V from (f.map_sub x y).symm ▸ (Submodule.Quotient.eq _).1 hxy @[gcongr]
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Submodule.Map", "Mathlib.Algebra.Polynomial.Eval.Defs", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/LinearAlgebra/SModEq.lean
comap
null
eval {R : Type*} [CommRing R] {I : Ideal R} {x y : R} (h : x ≡ y [SMOD I]) (f : R[X]) : f.eval x ≡ f.eval y [SMOD I] := by simp_rw [Polynomial.eval_eq_sum, Polynomial.sum] gcongr
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Submodule.Map", "Mathlib.Algebra.Polynomial.Eval.Defs", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/LinearAlgebra/SModEq.lean
eval
null
linearIndependent_single [Semiring R] [∀ i, AddCommMonoid (Ms i)] [∀ i, Module R (Ms i)] [DecidableEq η] (v : ∀ j, ιs j → Ms j) (hs : ∀ i, LinearIndependent R (v i)) : LinearIndependent R fun ji : Σ j, ιs j ↦ Pi.single ji.1 (v ji.1 ji.2) := by convert (DFinsupp.linearIndependent_single _ hs).map_injOn _ DFinsupp.injective_pi_lapply.injOn
theorem
LinearAlgebra
[ "Mathlib.Algebra.Algebra.Pi", "Mathlib.LinearAlgebra.Finsupp.VectorSpace", "Mathlib.LinearAlgebra.FreeModule.Basic", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/StdBasis.lean
linearIndependent_single
null
linearIndependent_single_one (ι R : Type*) [Semiring R] [DecidableEq ι] : LinearIndependent R (fun i : ι ↦ Pi.single i (1 : R)) := by rw [← linearIndependent_equiv (Equiv.sigmaPUnit ι)] exact Pi.linearIndependent_single (fun (_ : ι) (_ : Unit) ↦ (1 : R)) <| by simp +contextual [Fintype.linearIndependent_iffₛ]
theorem
LinearAlgebra
[ "Mathlib.Algebra.Algebra.Pi", "Mathlib.LinearAlgebra.Finsupp.VectorSpace", "Mathlib.LinearAlgebra.FreeModule.Basic", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/StdBasis.lean
linearIndependent_single_one
null
linearIndependent_single_of_ne_zero {ι R M : Type*} [Ring R] [AddCommGroup M] [Module R M] [NoZeroSMulDivisors R M] [DecidableEq ι] {v : ι → M} (hv : ∀ i, v i ≠ 0) : LinearIndependent R fun i : ι ↦ Pi.single i (v i) := by rw [← linearIndependent_equiv (Equiv.sigmaPUnit ι)] exact linearIndependent_single (fun i (_ : Unit) ↦ v i) <| by simp +contextual [Fintype.linearIndependent_iff, hv] @[deprecated linearIndependent_single_of_ne_zero (since := "2025-04-14")]
lemma
LinearAlgebra
[ "Mathlib.Algebra.Algebra.Pi", "Mathlib.LinearAlgebra.Finsupp.VectorSpace", "Mathlib.LinearAlgebra.FreeModule.Basic", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/StdBasis.lean
linearIndependent_single_of_ne_zero
null
linearIndependent_single_ne_zero {ι R : Type*} [Ring R] [NoZeroDivisors R] [DecidableEq ι] {v : ι → R} (hv : ∀ i, v i ≠ 0) : LinearIndependent R (fun i : ι ↦ Pi.single i (v i)) := linearIndependent_single_of_ne_zero hv variable [Semiring R] [∀ i, AddCommMonoid (Ms i)] [∀ i, Module R (Ms i)]
theorem
LinearAlgebra
[ "Mathlib.Algebra.Algebra.Pi", "Mathlib.LinearAlgebra.Finsupp.VectorSpace", "Mathlib.LinearAlgebra.FreeModule.Basic", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/StdBasis.lean
linearIndependent_single_ne_zero
null
protected noncomputable basis (s : ∀ j, Basis (ιs j) R (Ms j)) : Basis (Σ j, ιs j) R (∀ j, Ms j) := Basis.ofRepr ((LinearEquiv.piCongrRight fun j => (s j).repr) ≪≫ₗ (Finsupp.sigmaFinsuppLEquivPiFinsupp R).symm) @[simp]
def
LinearAlgebra
[ "Mathlib.Algebra.Algebra.Pi", "Mathlib.LinearAlgebra.Finsupp.VectorSpace", "Mathlib.LinearAlgebra.FreeModule.Basic", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/StdBasis.lean
basis
`Pi.basis (s : ∀ j, Basis (ιs j) R (Ms j))` is the `Σ j, ιs j`-indexed basis on `Π j, Ms j` given by `s j` on each component. For the standard basis over `R` on the finite-dimensional space `η → R` see `Pi.basisFun`.
basis_repr_single [DecidableEq η] (s : ∀ j, Basis (ιs j) R (Ms j)) (j i) : (Pi.basis s).repr (Pi.single j (s j i)) = Finsupp.single ⟨j, i⟩ 1 := by classical ext ⟨j', i'⟩ by_cases hj : j = j' · subst hj simp only [Pi.basis, LinearEquiv.trans_apply, LinearEquiv.piCongrRight, Finsupp.sigmaFinsuppLEquivPiFinsupp_symm_apply, Basis.repr_symm_apply, LinearEquiv.coe_mk] symm simp [Finsupp.single_apply] simp only [Pi.basis, LinearEquiv.trans_apply, Finsupp.sigmaFinsuppLEquivPiFinsupp_symm_apply, LinearEquiv.piCongrRight] dsimp rw [Pi.single_eq_of_ne (Ne.symm hj), LinearEquiv.map_zero, Finsupp.zero_apply, Finsupp.single_eq_of_ne] rintro ⟨⟩ contradiction @[simp]
theorem
LinearAlgebra
[ "Mathlib.Algebra.Algebra.Pi", "Mathlib.LinearAlgebra.Finsupp.VectorSpace", "Mathlib.LinearAlgebra.FreeModule.Basic", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/StdBasis.lean
basis_repr_single
null
basis_apply [DecidableEq η] (s : ∀ j, Basis (ιs j) R (Ms j)) (ji) : Pi.basis s ji = Pi.single ji.1 (s ji.1 ji.2) := Basis.apply_eq_iff.mpr (by simp) @[simp]
theorem
LinearAlgebra
[ "Mathlib.Algebra.Algebra.Pi", "Mathlib.LinearAlgebra.Finsupp.VectorSpace", "Mathlib.LinearAlgebra.FreeModule.Basic", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/StdBasis.lean
basis_apply
null
basis_repr (s : ∀ j, Basis (ιs j) R (Ms j)) (x) (ji) : (Pi.basis s).repr x ji = (s ji.1).repr (x ji.1) ji.2 := rfl
theorem
LinearAlgebra
[ "Mathlib.Algebra.Algebra.Pi", "Mathlib.LinearAlgebra.Finsupp.VectorSpace", "Mathlib.LinearAlgebra.FreeModule.Basic", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/StdBasis.lean
basis_repr
null