reserve x1,x2,z for set;
reserve A,B for non empty set;
reserve f,g,h for Element of Funcs(A,COMPLEX);
reserve a,b for Complex;

theorem Th20:
  A = {x1,x2} & x1<>x2 & ( for z st z in A holds (z=x1 implies f.z
= 1r) & (z<>x1 implies f.z = 0) ) & ( for z st z in A holds (z=x1 implies g.z =
  0) & (z<>x1 implies g.z = 1r) ) implies for h holds ex a,b st h = (
ComplexFuncAdd(A)). ((ComplexFuncExtMult(A)).[a,f],(ComplexFuncExtMult(A)).[b,g
  ])
proof
  assume that
A1: A = {x1,x2} and
A2: x1<>x2 and
A3: ( for z st z in A holds (z=x1 implies f.z = 1r) & (z<>x1 implies f.z
= 0))& for z st z in A holds (z=x1 implies g.z = 0) & (z<>x1 implies g.z = 1r);
  x2 in A by A1,TARSKI:def 2;
  then
A4: f.x2=0c & g.x2=1r by A2,A3;
  x1 in A by A1,TARSKI:def 2;
  then
A5: f.x1=1r & g.x1=0c by A3;
  let h;
  reconsider x1,x2 as Element of A by A1,TARSKI:def 2;
  take a = h.x1, b = h.x2;
  now
    let x be Element of A;
A6: x = x1 or x = x2 by A1,TARSKI:def 2;
A7: ((ComplexFuncAdd(A)). ((ComplexFuncExtMult(A)).[a,f],(
ComplexFuncExtMult(A)).[b,g])).x2 = (((ComplexFuncExtMult(A)).[a,f]).x2) + (((
    ComplexFuncExtMult(A)).[b,g]).x2) by Th1
      .= a*(f.x2) + (((ComplexFuncExtMult(A)).[b,g]).x2) by Th4
      .= 0c + b*1r by A4,Th4
      .= h.x2 by COMPLEX1:def 4;
    ((ComplexFuncAdd(A)). ((ComplexFuncExtMult(A)).[a,f],(
ComplexFuncExtMult(A)).[b,g])).x1 = (((ComplexFuncExtMult(A)).[a,f]).x1) + (((
    ComplexFuncExtMult(A)).[b,g]).x1) by Th1
      .= a*(f.x1) + (((ComplexFuncExtMult(A)).[b,g]).x1) by Th4
      .= a + b*0c by A5,Th4,COMPLEX1:def 4
      .= h.x1;
    hence h.x = ((ComplexFuncAdd(A)). ((ComplexFuncExtMult(A)).[a,f],(
    ComplexFuncExtMult(A)).[b,g])).x by A6,A7;
  end;
  hence thesis by FUNCT_2:63;
end;
