 reserve X for RealUnitarySpace;
 reserve x, y, y1, y2 for Point of X;

theorem Th25:
for X being RealHilbertSpace,
    M be Subspace of X
st
X is strict &
the carrier of M is closed Subset of TopSpaceNorm RUSp2RNSp X
holds X is_the_direct_sum_of M,Ort_Comp(M)
proof
let X be RealHilbertSpace,
    M be Subspace of X;
assume A1: X is strict &
   the carrier of M is closed Subset of TopSpaceNorm RUSp2RNSp X;
AAT6:
for z be object
  holds z in the carrier of ( M + Ort_Comp(M) )
      iff z in the carrier of X
proof let z be object;
  hereby assume z in the carrier of ( M + Ort_Comp(M) );
    then
    z in { (v + u) where v, u is VECTOR of X
        : ( v in M & u in Ort_Comp(M) ) }
      by RUSUB_2:def 1; then
    ex v, u be VECTOR of X st z = v+u &
                 v in M & u in Ort_Comp(M);
    hence z in the carrier of X;
  end;
  assume z in the carrier of X; then
  reconsider x=z as Point of X;
  consider m0 be Point of X such that
A2: m0 in M and
A3: for m be Point of X
       st m in M holds ||.x-m0.|| <= ||.x-m.|| by Th19,A1;
  reconsider CM = the carrier of M
    as non empty Subset of X by RUSUB_1:def 1;
  for m be Point of X
         st m in M holds ( x-m0 ) .|. m = 0
    by Th17,A2,A3; then
  for m be Point of X
         st m in the carrier of M
            holds m .|. ( x-m0 ) = 0 by STRUCT_0:def 5;
then
( x-m0 ) in Ort_CompSet(CM) by Def1; then
( x-m0 ) in the carrier of Ort_Comp(CM) by Lm5; then
( x-m0 ) in Ort_Comp(CM) by STRUCT_0:def 5; then
A4:( x-m0 ) in Ort_Comp(M) by Lm6;
z = m0+(x-m0) by RLVECT_4:1;
then z in { (u + v) where u, v is VECTOR of X :
( u in M & v in Ort_Comp(M) ) } by A2,A4;
hence z in the carrier of ( M + Ort_Comp(M)) by RUSUB_2:def 1;
end;
for z be object holds
z in the carrier of (M /\ Ort_Comp(M))
 iff
z in {0.X}
proof
let z be object;
 hereby assume z in the carrier of (M /\ Ort_Comp(M)); then
  z in ( the carrier of M ) /\ (the carrier of Ort_Comp(M) )
  by RUSUB_2:def 2; then
 A7: z in the carrier of M & z in the carrier of Ort_Comp(M)
   by XBOOLE_0:def 4;
  the carrier of M c= the carrier of X by RUSUB_1:def 1;
  then
 reconsider x = z as Point of X by A7;
 reconsider N = the carrier of M
  as non empty Subset of X by RUSUB_1:def 1;
 x in the carrier of Ort_Comp(N) by A7,Lm6; then
 x in Ort_CompSet(N) by Lm5; then
 x.|.x = 0 by Def1,A7; then
  ||.x.|| = 0; then
  x = 0.X by BHSP_1:26;
 hence z in {0.X} by TARSKI:def 1;
end;
assume z in {0.X}; then
  z = 0.X by TARSKI:def 1; then
  z in the carrier of M & z in the carrier of Ort_Comp(M)
    by RUSUB_1:11,STRUCT_0:def 5; then
  z in ( the carrier of M ) /\ (the carrier of Ort_Comp(M) )
    by XBOOLE_0:def 4;
  hence z in the carrier of (M /\ Ort_Comp(M))
   by RUSUB_2:def 2;
end;
hence thesis by AAT6,RUSUB_1:26,A1,TARSKI:2,RUSUB_1:def 2;
end;
