Documentation

Mathlib.LinearAlgebra.Projection

Projection to a subspace #

In this file we define

We also provide some lemmas justifying correctness of our definitions.

Tags #

projection, complement subspace

theorem LinearMap.ker_id_sub_eq_of_proj {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {p : Submodule R E} {f : E →ₗ[R] p} (hf : ∀ (x : p), f x = x) :
LinearMap.ker (LinearMap.id - p.subtype ∘ₗ f) = p
theorem LinearMap.range_eq_of_proj {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {p : Submodule R E} {f : E →ₗ[R] p} (hf : ∀ (x : p), f x = x) :
theorem LinearMap.isCompl_of_proj {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {p : Submodule R E} {f : E →ₗ[R] p} (hf : ∀ (x : p), f x = x) :
def Submodule.quotientEquivOfIsCompl {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] (p : Submodule R E) (q : Submodule R E) (h : IsCompl p q) :
(E p) ≃ₗ[R] q

If q is a complement of p, then M/p ≃ q.

Equations
Instances For
    @[simp]
    theorem Submodule.quotientEquivOfIsCompl_symm_apply {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] (p : Submodule R E) (q : Submodule R E) (h : IsCompl p q) (x : q) :
    (p.quotientEquivOfIsCompl q h).symm x = Submodule.Quotient.mk x
    @[simp]
    theorem Submodule.quotientEquivOfIsCompl_apply_mk_coe {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] (p : Submodule R E) (q : Submodule R E) (h : IsCompl p q) (x : q) :
    (p.quotientEquivOfIsCompl q h) (Submodule.Quotient.mk x) = x
    @[simp]
    theorem Submodule.mk_quotientEquivOfIsCompl_apply {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] (p : Submodule R E) (q : Submodule R E) (h : IsCompl p q) (x : E p) :
    Submodule.Quotient.mk ((p.quotientEquivOfIsCompl q h) x) = x
    def Submodule.prodEquivOfIsCompl {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] (p : Submodule R E) (q : Submodule R E) (h : IsCompl p q) :
    (p × q) ≃ₗ[R] E

    If q is a complement of p, then p × q is isomorphic to E. It is the unique linear map f : E → p such that f x = x for x ∈ p and f x = 0 for x ∈ q.

    Equations
    Instances For
      @[simp]
      theorem Submodule.coe_prodEquivOfIsCompl {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] (p : Submodule R E) (q : Submodule R E) (h : IsCompl p q) :
      (p.prodEquivOfIsCompl q h) = p.subtype.coprod q.subtype
      @[simp]
      theorem Submodule.coe_prodEquivOfIsCompl' {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] (p : Submodule R E) (q : Submodule R E) (h : IsCompl p q) (x : p × q) :
      (p.prodEquivOfIsCompl q h) x = x.1 + x.2
      @[simp]
      theorem Submodule.prodEquivOfIsCompl_symm_apply_left {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] (p : Submodule R E) (q : Submodule R E) (h : IsCompl p q) (x : p) :
      (p.prodEquivOfIsCompl q h).symm x = (x, 0)
      @[simp]
      theorem Submodule.prodEquivOfIsCompl_symm_apply_right {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] (p : Submodule R E) (q : Submodule R E) (h : IsCompl p q) (x : q) :
      (p.prodEquivOfIsCompl q h).symm x = (0, x)
      @[simp]
      theorem Submodule.prodEquivOfIsCompl_symm_apply_fst_eq_zero {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] (p : Submodule R E) (q : Submodule R E) (h : IsCompl p q) {x : E} :
      ((p.prodEquivOfIsCompl q h).symm x).1 = 0 x q
      @[simp]
      theorem Submodule.prodEquivOfIsCompl_symm_apply_snd_eq_zero {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] (p : Submodule R E) (q : Submodule R E) (h : IsCompl p q) {x : E} :
      ((p.prodEquivOfIsCompl q h).symm x).2 = 0 x p
      @[simp]
      theorem Submodule.prodComm_trans_prodEquivOfIsCompl {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] (p : Submodule R E) (q : Submodule R E) (h : IsCompl p q) :
      LinearEquiv.prodComm R q p ≪≫ₗ p.prodEquivOfIsCompl q h = q.prodEquivOfIsCompl p
      def Submodule.linearProjOfIsCompl {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] (p : Submodule R E) (q : Submodule R E) (h : IsCompl p q) :
      E →ₗ[R] p

      Projection to a submodule along its complement.

      Equations
      • p.linearProjOfIsCompl q h = LinearMap.fst R p q ∘ₗ (p.prodEquivOfIsCompl q h).symm
      Instances For
        @[simp]
        theorem Submodule.linearProjOfIsCompl_apply_left {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {p : Submodule R E} {q : Submodule R E} (h : IsCompl p q) (x : p) :
        (p.linearProjOfIsCompl q h) x = x
        @[simp]
        theorem Submodule.linearProjOfIsCompl_range {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {p : Submodule R E} {q : Submodule R E} (h : IsCompl p q) :
        LinearMap.range (p.linearProjOfIsCompl q h) =
        @[simp]
        theorem Submodule.linearProjOfIsCompl_apply_eq_zero_iff {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {p : Submodule R E} {q : Submodule R E} (h : IsCompl p q) {x : E} :
        (p.linearProjOfIsCompl q h) x = 0 x q
        theorem Submodule.linearProjOfIsCompl_apply_right' {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {p : Submodule R E} {q : Submodule R E} (h : IsCompl p q) (x : E) (hx : x q) :
        (p.linearProjOfIsCompl q h) x = 0
        @[simp]
        theorem Submodule.linearProjOfIsCompl_apply_right {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {p : Submodule R E} {q : Submodule R E} (h : IsCompl p q) (x : q) :
        (p.linearProjOfIsCompl q h) x = 0
        @[simp]
        theorem Submodule.linearProjOfIsCompl_ker {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {p : Submodule R E} {q : Submodule R E} (h : IsCompl p q) :
        LinearMap.ker (p.linearProjOfIsCompl q h) = q
        theorem Submodule.linearProjOfIsCompl_comp_subtype {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {p : Submodule R E} {q : Submodule R E} (h : IsCompl p q) :
        p.linearProjOfIsCompl q h ∘ₗ p.subtype = LinearMap.id
        theorem Submodule.linearProjOfIsCompl_idempotent {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {p : Submodule R E} {q : Submodule R E} (h : IsCompl p q) (x : E) :
        (p.linearProjOfIsCompl q h) ((p.linearProjOfIsCompl q h) x) = (p.linearProjOfIsCompl q h) x
        theorem Submodule.existsUnique_add_of_isCompl_prod {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {p : Submodule R E} {q : Submodule R E} (hc : IsCompl p q) (x : E) :
        ∃! u : p × q, u.1 + u.2 = x
        theorem Submodule.existsUnique_add_of_isCompl {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {p : Submodule R E} {q : Submodule R E} (hc : IsCompl p q) (x : E) :
        ∃ (u : p) (v : q), u + v = x ∀ (r : p) (s : q), r + s = xr = u s = v
        theorem Submodule.linear_proj_add_linearProjOfIsCompl_eq_self {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {p : Submodule R E} {q : Submodule R E} (hpq : IsCompl p q) (x : E) :
        ((p.linearProjOfIsCompl q hpq) x) + ((q.linearProjOfIsCompl p ) x) = x
        def LinearMap.ofIsCompl {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {F : Type u_3} [AddCommGroup F] [Module R F] {p : Submodule R E} {q : Submodule R E} (h : IsCompl p q) (φ : p →ₗ[R] F) (ψ : q →ₗ[R] F) :

        Given linear maps φ and ψ from complement submodules, LinearMap.ofIsCompl is the induced linear map over the entire module.

        Equations
        Instances For
          @[simp]
          theorem LinearMap.ofIsCompl_left_apply {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {F : Type u_3} [AddCommGroup F] [Module R F] {p : Submodule R E} {q : Submodule R E} (h : IsCompl p q) {φ : p →ₗ[R] F} {ψ : q →ₗ[R] F} (u : p) :
          (LinearMap.ofIsCompl h φ ψ) u = φ u
          @[simp]
          theorem LinearMap.ofIsCompl_right_apply {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {F : Type u_3} [AddCommGroup F] [Module R F] {p : Submodule R E} {q : Submodule R E} (h : IsCompl p q) {φ : p →ₗ[R] F} {ψ : q →ₗ[R] F} (v : q) :
          (LinearMap.ofIsCompl h φ ψ) v = ψ v
          theorem LinearMap.ofIsCompl_eq {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {F : Type u_3} [AddCommGroup F] [Module R F] {p : Submodule R E} {q : Submodule R E} (h : IsCompl p q) {φ : p →ₗ[R] F} {ψ : q →ₗ[R] F} {χ : E →ₗ[R] F} (hφ : ∀ (u : p), φ u = χ u) (hψ : ∀ (u : q), ψ u = χ u) :
          theorem LinearMap.ofIsCompl_eq' {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {F : Type u_3} [AddCommGroup F] [Module R F] {p : Submodule R E} {q : Submodule R E} (h : IsCompl p q) {φ : p →ₗ[R] F} {ψ : q →ₗ[R] F} {χ : E →ₗ[R] F} (hφ : φ = χ ∘ₗ p.subtype) (hψ : ψ = χ ∘ₗ q.subtype) :
          @[simp]
          theorem LinearMap.ofIsCompl_zero {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {F : Type u_3} [AddCommGroup F] [Module R F] {p : Submodule R E} {q : Submodule R E} (h : IsCompl p q) :
          @[simp]
          theorem LinearMap.ofIsCompl_add {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {F : Type u_3} [AddCommGroup F] [Module R F] {p : Submodule R E} {q : Submodule R E} (h : IsCompl p q) {φ₁ : p →ₗ[R] F} {φ₂ : p →ₗ[R] F} {ψ₁ : q →ₗ[R] F} {ψ₂ : q →ₗ[R] F} :
          LinearMap.ofIsCompl h (φ₁ + φ₂) (ψ₁ + ψ₂) = LinearMap.ofIsCompl h φ₁ ψ₁ + LinearMap.ofIsCompl h φ₂ ψ₂
          @[simp]
          theorem LinearMap.ofIsCompl_smul {R : Type u_7} [CommRing R] {E : Type u_8} [AddCommGroup E] [Module R E] {F : Type u_9} [AddCommGroup F] [Module R F] {p : Submodule R E} {q : Submodule R E} (h : IsCompl p q) {φ : p →ₗ[R] F} {ψ : q →ₗ[R] F} (c : R) :
          def LinearMap.ofIsComplProd {E : Type u_2} [AddCommGroup E] {F : Type u_3} [AddCommGroup F] {R₁ : Type u_7} [CommRing R₁] [Module R₁ E] [Module R₁ F] {p : Submodule R₁ E} {q : Submodule R₁ E} (h : IsCompl p q) :
          (p →ₗ[R₁] F) × (q →ₗ[R₁] F) →ₗ[R₁] E →ₗ[R₁] F

          The linear map from (p →ₗ[R₁] F) × (q →ₗ[R₁] F) to E →ₗ[R₁] F.

          Equations
          Instances For
            @[simp]
            theorem LinearMap.ofIsComplProd_apply {E : Type u_2} [AddCommGroup E] {F : Type u_3} [AddCommGroup F] {R₁ : Type u_7} [CommRing R₁] [Module R₁ E] [Module R₁ F] {p : Submodule R₁ E} {q : Submodule R₁ E} (h : IsCompl p q) (φ : (p →ₗ[R₁] F) × (q →ₗ[R₁] F)) :
            def LinearMap.ofIsComplProdEquiv {E : Type u_2} [AddCommGroup E] {F : Type u_3} [AddCommGroup F] {R₁ : Type u_7} [CommRing R₁] [Module R₁ E] [Module R₁ F] {p : Submodule R₁ E} {q : Submodule R₁ E} (h : IsCompl p q) :
            ((p →ₗ[R₁] F) × (q →ₗ[R₁] F)) ≃ₗ[R₁] E →ₗ[R₁] F

            The natural linear equivalence between (p →ₗ[R₁] F) × (q →ₗ[R₁] F) and E →ₗ[R₁] F.

            Equations
            Instances For
              @[simp]
              theorem LinearMap.linearProjOfIsCompl_of_proj {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {p : Submodule R E} (f : E →ₗ[R] p) (hf : ∀ (x : p), f x = x) :
              p.linearProjOfIsCompl (LinearMap.ker f) = f
              def LinearMap.equivProdOfSurjectiveOfIsCompl {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {F : Type u_3} [AddCommGroup F] [Module R F] {G : Type u_4} [AddCommGroup G] [Module R G] (f : E →ₗ[R] F) (g : E →ₗ[R] G) (hf : LinearMap.range f = ) (hg : LinearMap.range g = ) (hfg : IsCompl (LinearMap.ker f) (LinearMap.ker g)) :
              E ≃ₗ[R] F × G

              If f : E →ₗ[R] F and g : E →ₗ[R] G are two surjective linear maps and their kernels are complement of each other, then x ↦ (f x, g x) defines a linear equivalence E ≃ₗ[R] F × G.

              Equations
              Instances For
                @[simp]
                theorem LinearMap.coe_equivProdOfSurjectiveOfIsCompl {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {F : Type u_3} [AddCommGroup F] [Module R F] {G : Type u_4} [AddCommGroup G] [Module R G] {f : E →ₗ[R] F} {g : E →ₗ[R] G} (hf : LinearMap.range f = ) (hg : LinearMap.range g = ) (hfg : IsCompl (LinearMap.ker f) (LinearMap.ker g)) :
                (f.equivProdOfSurjectiveOfIsCompl g hf hg hfg) = f.prod g
                @[simp]
                theorem LinearMap.equivProdOfSurjectiveOfIsCompl_apply {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {F : Type u_3} [AddCommGroup F] [Module R F] {G : Type u_4} [AddCommGroup G] [Module R G] {f : E →ₗ[R] F} {g : E →ₗ[R] G} (hf : LinearMap.range f = ) (hg : LinearMap.range g = ) (hfg : IsCompl (LinearMap.ker f) (LinearMap.ker g)) (x : E) :
                (f.equivProdOfSurjectiveOfIsCompl g hf hg hfg) x = (f x, g x)
                def Submodule.isComplEquivProj {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] (p : Submodule R E) :
                { q : Submodule R E // IsCompl p q } { f : E →ₗ[R] p // ∀ (x : p), f x = x }

                Equivalence between submodules q such that IsCompl p q and linear maps f : E →ₗ[R] p such that ∀ x : p, f x = x.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  @[simp]
                  theorem Submodule.coe_isComplEquivProj_apply {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] (p : Submodule R E) (q : { q : Submodule R E // IsCompl p q }) :
                  (p.isComplEquivProj q) = p.linearProjOfIsCompl q
                  @[simp]
                  theorem Submodule.coe_isComplEquivProj_symm_apply {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] (p : Submodule R E) (f : { f : E →ₗ[R] p // ∀ (x : p), f x = x }) :
                  (p.isComplEquivProj.symm f) = LinearMap.ker f
                  @[simp]
                  theorem Submodule.isIdempotentElemEquiv_apply_coe {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] (p : Submodule R E) (f : { f : Module.End R E // IsIdempotentElem f LinearMap.range f = p }) :
                  (p.isIdempotentElemEquiv f) = LinearMap.codRestrict p f
                  @[simp]
                  theorem Submodule.isIdempotentElemEquiv_symm_apply_coe {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] (p : Submodule R E) (f : { f : E →ₗ[R] p // ∀ (x : p), f x = x }) :
                  (p.isIdempotentElemEquiv.symm f) = p.subtype ∘ₗ f
                  def Submodule.isIdempotentElemEquiv {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] (p : Submodule R E) :
                  { f : Module.End R E // IsIdempotentElem f LinearMap.range f = p } { f : E →ₗ[R] p // ∀ (x : p), f x = x }

                  The idempotent endomorphisms of a module with range equal to a submodule are in 1-1 correspondence with linear maps to the submodule that restrict to the identity on the submodule.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    structure LinearMap.IsProj {S : Type u_5} [Semiring S] {M : Type u_6} [AddCommMonoid M] [Module S M] (m : Submodule S M) {F : Type u_7} [FunLike F M M] (f : F) :

                    A linear endomorphism of a module E is a projection onto a submodule p if it sends every element of E to p and fixes every element of p. The definition allow more generally any FunLike type and not just linear maps, so that it can be used for example with ContinuousLinearMap or Matrix.

                    • map_mem : ∀ (x : M), f x m
                    • map_id : xm, f x = x
                    Instances For
                      theorem LinearMap.IsProj.map_mem {S : Type u_5} [Semiring S] {M : Type u_6} [AddCommMonoid M] [Module S M] {m : Submodule S M} {F : Type u_7} [FunLike F M M] {f : F} (self : LinearMap.IsProj m f) (x : M) :
                      f x m
                      theorem LinearMap.IsProj.map_id {S : Type u_5} [Semiring S] {M : Type u_6} [AddCommMonoid M] [Module S M] {m : Submodule S M} {F : Type u_7} [FunLike F M M] {f : F} (self : LinearMap.IsProj m f) (x : M) :
                      x mf x = x
                      theorem LinearMap.isProj_iff_idempotent {S : Type u_5} [Semiring S] {M : Type u_6} [AddCommMonoid M] [Module S M] (f : M →ₗ[S] M) :
                      (∃ (p : Submodule S M), LinearMap.IsProj p f) f ∘ₗ f = f
                      def LinearMap.IsProj.codRestrict {S : Type u_5} [Semiring S] {M : Type u_6} [AddCommMonoid M] [Module S M] {m : Submodule S M} {f : M →ₗ[S] M} (h : LinearMap.IsProj m f) :
                      M →ₗ[S] m

                      Restriction of the codomain of a projection of onto a subspace p to p instead of the whole space.

                      Equations
                      Instances For
                        @[simp]
                        theorem LinearMap.IsProj.codRestrict_apply {S : Type u_5} [Semiring S] {M : Type u_6} [AddCommMonoid M] [Module S M] {m : Submodule S M} {f : M →ₗ[S] M} (h : LinearMap.IsProj m f) (x : M) :
                        (h.codRestrict x) = f x
                        @[simp]
                        theorem LinearMap.IsProj.codRestrict_apply_cod {S : Type u_5} [Semiring S] {M : Type u_6} [AddCommMonoid M] [Module S M] {m : Submodule S M} {f : M →ₗ[S] M} (h : LinearMap.IsProj m f) (x : m) :
                        h.codRestrict x = x
                        theorem LinearMap.IsProj.codRestrict_ker {S : Type u_5} [Semiring S] {M : Type u_6} [AddCommMonoid M] [Module S M] {m : Submodule S M} {f : M →ₗ[S] M} (h : LinearMap.IsProj m f) :
                        LinearMap.ker h.codRestrict = LinearMap.ker f
                        theorem LinearMap.IsProj.isCompl {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {p : Submodule R E} {f : E →ₗ[R] E} (h : LinearMap.IsProj p f) :
                        theorem LinearMap.IsProj.eq_conj_prod_map' {R : Type u_1} [Ring R] {E : Type u_2} [AddCommGroup E] [Module R E] {p : Submodule R E} {f : E →ₗ[R] E} (h : LinearMap.IsProj p f) :
                        f = (p.prodEquivOfIsCompl (LinearMap.ker f) ) ∘ₗ LinearMap.id.prodMap 0 ∘ₗ (p.prodEquivOfIsCompl (LinearMap.ker f) ).symm
                        theorem LinearMap.IsProj.eq_conj_prodMap {R : Type u_1} [CommRing R] {E : Type u_2} [AddCommGroup E] [Module R E] {p : Submodule R E} {f : E →ₗ[R] E} (h : LinearMap.IsProj p f) :
                        f = (p.prodEquivOfIsCompl (LinearMap.ker f) ).conj (LinearMap.id.prodMap 0)