Zulip Chat Archive

Stream: Is there code for X?

Topic: Supp addition on LinearMaps Properties


Jam Kabeer Ali Khan (May 06 2025 at 08:40):

I am trying to formalize the following two lemmas, and I wanted to ask if these are present in MathLib?

lemma ker_add (P Q : E โ†’โ‚—[๐•œ] E) (hP : LinearMap.isPositiveSemiDefinite P) (hQ : LinearMap.isPositiveSemiDefinite Q):
  (LinearMap.ker (P + Q)) = (LinearMap.ker P) โŠ“ (LinearMap.ker Q)

The above states that ker of the sum of two positive-semidefinite operators must be equal to the intersection of the kernels of individual operators.
I am also proving the property below:

lemma ker_union (P Q : E โ†’โ‚—[๐•œ] E) (hP : LinearMap.isPositiveSemiDefinite P) (hQ : LinearMap.isPositiveSemiDefinite Q):
  (LinearMap.ker P โŠ“ LinearMap.ker Q)แ—ฎ = (LinearMap.ker P)แ—ฎ โŠ” (LinearMap.ker Q)แ—ฎ

For the first property, I am trying to prove by cases on the fact that P and Q are positive semi-definite, which has below definition

/-- Positive semidefinite operators. -/
def isPositiveSemiDefinite (T : E โ†’โ‚—[๐•œ] E) : Prop :=
  IsSelfAdjoint T โˆง โˆ€ x, 0 โ‰ค RCLike.re (inner (T x) x : ๐•œ)

But I am stuck on showing the contradiction in one of the cases.
Is there code for this property in MathLib for positive semi-definite operators? Thank you!

Jam Kabeer Ali Khan (May 06 2025 at 12:48):

here are the proof states I am stuck at

P Q : E โ†’โ‚—[๐•œ] E
hP_self : IsSelfAdjoint P
hP_re : โˆ€ (x : E), 0 โ‰ค RCLike.re (inner (P x) x)
hQ_self : IsSelfAdjoint Q
hQ_re : โˆ€ (x : E), 0 โ‰ค RCLike.re (inner (Q x) x)
x : E
this : RCLike.re (inner (P x) x) + RCLike.re (inner (Q x) x) = 0
h : P x + Q x = 0
hPx : RCLike.re (inner (P x) x) = 0
hQx : RCLike.re (inner (Q x) x) = 0
inner_Px : inner (P x) x = 0
inner_Qx : inner (Q x) x = 0
โŠข P x = 0 โˆง Q x = 0

Kevin Buzzard (May 06 2025 at 20:18):

(a) do you know the maths proof and (b) can you make a #mwe ?

Jam Kabeer Ali Khan (May 06 2025 at 20:33):

a)
Math proofs follow from the fact that P and Q are positive semi-definite operators, and that

<x|P|x> + <x|Q|x> = <x|P*P|x| + <x|Q*Q|x> = ||Px|| + ||Qx|| = 0 => Px = 0 and Qx = 0

Above is for ker_add
And the ker_union seems to follow from De Morgan

This is my understanding, but I might be wrong.

b) here is #mwe

import Mathlib.Analysis.InnerProductSpace.Positive

variable {๐•œ E : Type*} [RCLike ๐•œ]

variable? [HilbertSpace ๐•œ E] => [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [CompleteSpace E]
variable [FiniteDimensional ๐•œ E]

namespace LinearMap
/-- Positive semidefinite operators. -/
def isPositiveSemiDefinite (T : E โ†’โ‚—[๐•œ] E) : Prop :=
  IsSelfAdjoint T โˆง โˆ€ x, 0 โ‰ค RCLike.re (inner ๐•œ (T x) x)
end LinearMap

namespace SupportProp

def supp (P : E โ†’โ‚—[๐•œ] E) : Submodule ๐•œ E := (LinearMap.ker P)แ—ฎ

lemma ker_add (P Q : E โ†’โ‚—[๐•œ] E) (hP : LinearMap.isPositiveSemiDefinite P) (hQ : LinearMap.isPositiveSemiDefinite Q):
  (LinearMap.ker (P + Q)) = (LinearMap.ker P) โŠ“ (LinearMap.ker Q)               := by
  sorry

lemma ker_union (P Q : E โ†’โ‚—[๐•œ] E) (hP : LinearMap.isPositiveSemiDefinite P) (hQ : LinearMap.isPositiveSemiDefinite Q):
  (LinearMap.ker P โŠ“ LinearMap.ker Q)แ—ฎ = (LinearMap.ker P)แ—ฎ โŠ” (LinearMap.ker Q)แ—ฎ := by
  sorry

lemma supp_add (P Q : E โ†’โ‚—[๐•œ] E) (hP : LinearMap.isPositiveSemiDefinite P) (hQ : LinearMap.isPositiveSemiDefinite Q) :
    supp (P + Q) = supp (P) โŠ” supp (Q)  := by
    rw [supp, supp, supp, ker_add, ker_union]
    ยท apply hP
    ยท apply hQ
    ยท apply hP
    ยท apply hQ
end SupportProp

Apologies for not giving #mwe earlier; thanks a lot!


Last updated: Dec 20 2025 at 21:32 UTC