
theorem Th1:
  for X being non empty set,
      V being ComplexAlgebra,
      V1 being non empty Subset of V,
      d1,d2 being Element of X,
      A being BinOp of X,
      M being Function of [:X,X:],X,
      MR being Function of [:COMPLEX,X:],X st
  (V1 = X & d1 = 0.V & d2 = 1.V
  & A = (the addF of V)||V1 & M = (the multF of V)||V1
  & MR = (the Mult of V) | [:COMPLEX,V1:]
  & V1 is having-inverse)
  holds ComplexAlgebraStr(#X,M,A,MR,d2,d1#) is ComplexSubAlgebra of V
proof
  let X be non empty set, V be ComplexAlgebra,
      V1 be non empty Subset of V, d1,d2 be Element of X,
      A be BinOp of X, M be Function of [:X,X:],X,
      MR be Function of [:COMPLEX,X:],X;
  assume that
A1: V1 = X and
A2: d1 = 0.V and
A3: d2 = 1.V and
A4: A = (the addF of V)||V1 and
A5: M = (the multF of V)||V1 and
A6: MR = (the Mult of V) | [:COMPLEX,V1:] and
A7: for v be Element of V st v in V1 holds -v in V1;
  reconsider W = ComplexAlgebraStr(# X,M,A,MR,d2,d1#)
                       as non empty ComplexAlgebraStr;
A8: now
      let x,y be Element of W;
      reconsider x1 = x, y1 = y as Element of V by A1,TARSKI:def 3;
      x + y = (the addF of V).([x,y]) by A1,A4,FUNCT_1:49;
      hence x + y = (the addF of V).(x,y);
    end;
A9: now
      let a,x be VECTOR of W;
      a * x = (the multF of V).([a,x]) by A1,A5,FUNCT_1:49;
      hence a * x = (the multF of V).(a,x);
    end;
A10: W is Abelian add-associative right_zeroed right_complementable
  commutative associative right_unital right-distributive vector-distributive
  scalar-distributive scalar-associative vector-associative
  proof
    set Mv = the multF of V;
    set MV = the Mult of V;
    set Av = the addF of V;
    hereby
      let x,y be VECTOR of W;
      reconsider x1 = x, y1 = y as VECTOR of V by A1,TARSKI:def 3;
      x + y = x1 + y1 & y + x = y1 + x1 by A8;
      hence x + y = y + x;
    end;
    hereby
      let x,y,z be VECTOR of W;
      reconsider x1 = x, y1 = y, z1 = z as VECTOR of V by A1,TARSKI:def 3;
      x + (y + z) = Av.(x1,y + z) by A8; then
A11:  x + (y + z) = x1 + (y1 + z1) by A8;
      (x + y) + z = Av.(x + y,z1) by A8;
      then (x + y) + z = (x1 + y1) + z1 by A8;
      hence (x + y) + z = x + (y + z) by A11,RLVECT_1:def 3;
    end;
    hereby
      let x be VECTOR of W;
      reconsider y = x, z = 0.W as VECTOR of V by A1,TARSKI:def 3;
      thus x + 0.W = y + 0.V by A2,A8
                  .= x by RLVECT_1:4;
    end;
    thus W is right_complementable
    proof
      let x be Element of W;
      reconsider x1 = x as Element of V by A1,TARSKI:def 3;
      consider v be Element of V such that
A12:  x1 + v = 0.V by ALGSTR_0:def 11;
      v = - x1 by A12,VECTSP_1:16;
      then reconsider y = v as Element of W by A1,A7;
      take y;
      thus thesis by A2,A8,A12;
    end;
    hereby
      let v,w be Element of W;
      reconsider v1 = v, w1=w as Element of V by A1,TARSKI:def 3;
      v * w = v1 * w1 & w * v = w1 * v1 by A9;
      hence v * w = w * v;
    end;
    hereby
      let a,b,x be Element of W;
      reconsider y=x, a1=a, b1=b as Element of V by A1,TARSKI:def 3;
      a * (b * x) = Mv.(a,b * x) by A9; then
A13:  a * (b * x) = a1 * (b1 * y) by A9;
      a * b = a1 * b1 by A9;
      then (a * b) * x = (a1 * b1) * y by A9;
      hence (a * b) * x = a * (b * x) by A13,GROUP_1:def 3;
    end;
    hereby
      let v be Element of W;
      reconsider v1 = v as Element of V by A1,TARSKI:def 3;
      v * 1.W =v1*1.V by A3,A9;
      hence v * 1.W = v;
    end;
    hereby
      let x,y,z be Element of W;
      reconsider x1=x, y1=y, z1=z as Element of V by A1,TARSKI:def 3;
      y+z = y1+z1 by A8;
      then x*(y+z) = x1*(y1+z1) by A9; then
A14:  x*(y+z) = x1*y1 + x1*z1 by VECTSP_1:def 2;
      x*y = x1*y1 & x*z = x1*z1 by A9;
      hence x*(y+z) = x*y + x*z by A8,A14;
    end;
    thus for a be Complex,x,y be VECTOR of W  holds a*(x+y) = a*x + a*y
    proof
      let a be Complex;
      let x,y be VECTOR of W;
      reconsider x1=x, y1=y as Element of V by A1,TARSKI:def 3;
A15:  a*x =a*x1 by A1,A6,Lm1;
A16:  a*y = a*y1 by A1,A6,Lm1;
      x+y = x1+y1 by A8;
      then a*(x+y) = a*(x1+y1) by A1,A6,Lm1; then
      a*(x+y) =a*x1 + a*y1 by CLVECT_1:def 2;
      hence thesis by A8,A15,A16;
    end;
    thus for a,b be Complex,v be VECTOR of W holds (a + b) * v = a * v + b * v
    proof
      let a,b be Complex;
      let x be Element of W;
      reconsider x1=x as Element of V by A1,TARSKI:def 3;
A17:  a*x = a*x1 by A1,A6,Lm1;
A18:  b*x = b*x1 by A1,A6,Lm1;
      (a+b)*x = (a+b)*x1 by A1,A6,Lm1;
      then (a+b)*x = a*x1 + b*x1 by CLVECT_1:def 3;
      hence (a+b)*x =a*x + b*x by A8,A17,A18;
    end;
    thus for a,b be Complex,v be VECTOR of W holds (a * b) * v = a * (b * v)
    proof
      let a,b be Complex;
      let x be Element of W;
      reconsider x1=x as Element of V by A1,TARSKI:def 3;
      reconsider y=b*x as Element of W;
      reconsider y1=b*x1 as Element of V;
A19:  b*x = b*x1 by A1,A6,Lm1;
A20:  a*(b*x) = a*(b*x1) by A1,A6,A19,Lm1;
      (a*b)*x = (a*b)*x1 by A1,A6,Lm1;
      hence thesis by A20,CLVECT_1:def 4;
    end;
    thus for x,y be Element of W,a be Complex holds
    a * (x * y) = (a * x) * y
    proof
      let x,y be Element of W;
      let a be Complex;
      reconsider x1=x, y1=y as Element of V by A1,TARSKI:def 3;
A21:  a*x = a*x1 by A1,A6,Lm1;
A22:  a*(x*y) = a*(x1*y1) by A1,A6,Lm1,A9;
      a * (x1 * y1) = (a * x1) * y1 by CFUNCDOM:def 9;
      hence thesis by A9,A21,A22;
    end;
    thus thesis;
  end;
  0.W = 0.V & 1.W= 1.V by A2,A3;
  hence thesis by A1,A4,A5,A6,A10,Def1;
end;
