reserve G,F for RealLinearSpace;

theorem Th2:
  for X be non empty set, D be Function st dom D = {1} & D.1 = X
  ex I be Function of X,product D
  st I is one-to-one & I is onto
  & for x be object st x in X holds I.x = <*x*>
  proof
    let X be non empty set, D be Function;
    assume A1: dom D ={1} & D.1 = X;
    defpred P[object,object] means $2 = <* $1 *>;
    A2:for x be object st x in X
    ex z be object st z in product D & P[x,z]
    proof
      let x be object;
      assume A3: x in X;
      A4: dom <*x*> = Seg len <*x*> by FINSEQ_1:def 3
      .= {1} by FINSEQ_1:2,40;
      now let i be object;
        assume i in dom <*x*>; then
        i = 1 by A4,TARSKI:def 1;
        hence <*x*>.i in D.i by A1,A3;
      end; then
      <*x*> in product D by A4,A1,CARD_3:9;
      hence ex z be object st z in product D & P[x,z];
    end;
    consider I be Function of X, product D such that
    A5: for x be object st x in X holds P[x,I.x] from FUNCT_2:sch 1(A2);
    now assume {} in rng D; then
      ex x be object st x in dom D & D.x={} by FUNCT_1:def 3;
      hence contradiction by A1,TARSKI:def 1;
    end; then
    A6:product D <> {} by CARD_3:26;
    now let z1,z2 be object;
      assume A7: z1 in X & z2 in X & I.z1=I.z2;
      <*z1*> = I.z1 by A5,A7
      .= <*z2*> by A5,A7;
      hence z1 = z2 by FINSEQ_1:76;
    end; then
    A8:I is one-to-one by A6,FUNCT_2:19;
    now let w be object;
      assume w in product D; then
      consider g be Function such that
      A9:  w = g & dom g = dom D
      & for i be object st i in dom D holds g.i in D.i by CARD_3:def 5;
      reconsider g as FinSequence by A1,A9,FINSEQ_1:2,def 2;
      set x = g.1;
      A10: len g = 1 by A1,A9,FINSEQ_1:2,def 3;
      1 in dom D by A1,TARSKI:def 1; then
      A11:x in X & w=<*x*> by A9,A10,A1,FINSEQ_1:40; then
      w = I.x by A5;
      hence w in rng I by A11,A6,FUNCT_2:112;
    end; then
    product D c= rng I by TARSKI:def 3; then
    product D = rng I by XBOOLE_0:def 10; then
    I is onto by FUNCT_2:def 3;
    hence thesis by A5,A8;
  end;
