reserve I for set,
  x,x1,x2,y,z for set,
  A for non empty set;
reserve C,D for Category;
reserve a,b,c,d for Object of C;
reserve f,g,h,i,j,k,p1,p2,q1,q2,i1,i2,j1,j2 for Morphism of C;
reserve f for Morphism of a,b,
        g for Morphism of b,a;
reserve g for Morphism of b,c;
reserve f,g for Morphism of C;

theorem Th49:
  for F being Projections_family of c,I
   st c is_a_product_wrt F &
    for x1,x2 st x1 in I & x2 in I holds Hom(cod(F/.x1),cod(F/.x2)) <> {}
  for x st x in I
  for d being Object of C st d = cod(F/.x) & Hom(c,d) <> {}
  for f being Morphism of c,d st f = F/.x
    holds f is retraction
proof
  let F be Projections_family of c,I such that
A1: c is_a_product_wrt F and
A2: for x1,x2 st x1 in I & x2 in I holds Hom(cod(F/.x1),cod(F/.x2)) <> {};
  let x such that
A3: x in I;
  let d be Object of C such that
A4: d = cod(F/.x) and
A5: Hom(c,d) <> {};
  let f be Morphism of c,d such that
A6: f = F/.x;
  defpred P[object,object] means
 ($1 = x implies $2 = id d) & ($1 <> x implies $2 in
  Hom(d,cod(F/.$1)));
A7: for y being object st y in I holds
   ex z being object st z in the carrier' of C & P[y,z]
  proof
    let y be object;
    set z = the Element of Hom(d,cod(F/.y));
    assume y in I;
    then
A8: Hom(d,cod(F/.y)) <> {} by A2,A3,A4;
    then
A9:  z in Hom(d,cod(F/.y));
    per cases;
    suppose
A10:   y = x;
      take z = id d;
      thus z in the carrier' of C;
      thus thesis by A10;
    end;
    suppose
A11:   y <> x;
      take z;
      thus z in the carrier' of C by A9;
      thus thesis by A8,A11;
    end;
  end;
  consider F9 being Function such that
A12: dom F9 = I & rng F9 c= the carrier' of C and
A13: for y being object st y in I holds P[y,F9.y] from FUNCT_1:sch 6(A7);

  reconsider F9 as Function of I,the carrier' of C by A12,FUNCT_2:def 1
,RELSET_1:4;
  now
    let y;
    assume
A14: y in I;
    then
A15: F9.y = F9/.y by FUNCT_2:def 13;
    then
A16: y <> x implies F9/.y in Hom(d,cod(F/.y)) by A13,A14;
    y = x implies F9/.y = id d by A13,A14,A15;
    then dom(F9/.y) = d by A16,CAT_1:1;
    hence (doms F9)/.y = d by A14,Def1
      .= (I-->d)/.y by A14,Th2;
  end;
  then
A17: F9 is Projections_family of d,I by Def13,Th1;
  now
    let y;
    assume
A18: y in I;
    then
A19: F9.y = F9/.y by FUNCT_2:def 13;
    then
A20: y <> x implies F9/.y in Hom(d,cod(F/.y)) by A13,A18;
    y = x implies F9/.y = id d by A13,A18,A19;
    then cod(F9/.y) = cod(F/.y) by A20,A4,CAT_1:1;
    hence (cods F9)/.y = cod(F/.y) by A18,Def2
      .= (cods F)/.y by A18,Def2;
  end;
  then consider i such that
A21: i in Hom(d,c) and
A22: for k st k in Hom(d,c) holds (for y st y in I holds (F/.y)(*)k = F9/.
  y) iff i = k by A1,A17,Th1;
   reconsider i as Morphism of d,c by A21,CAT_1:def 5;
  thus
 Hom(c,d) <> {} & Hom(d,c) <> {} by A21,A5;
  take i;
  thus f*i = f(*)i by A21,A5,CAT_1:def 13
    .= F9/.x by A3,A21,A22,A6
    .= F9.x by A3,FUNCT_2:def 13
    .= id d by A3,A13;
end;
