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
  for F being Projections_family of a,I st a is_a_product_wrt F & for x
  st x in I holds cod(F/.x) is terminal holds a is terminal
proof
  let F be Projections_family of a,I such that
A1: a is_a_product_wrt F and
A2: for x st x in I holds cod(F/.x) is terminal;
  now
    thus I = {} implies a is terminal by A1,Th50;
    let b;
    deffunc f(set) = term(b,cod(F/.$1));
    consider F9 being Function of I, the carrier' of C such that
A3: for x st x in I holds F9/.x = f(x) from LambdaIdx;
    now
      let x;
      assume
A4:   x in I;
      then
A5:   cod(F/.x) is terminal by A2;
      thus (doms F9)/.x = dom(F9/.x) by A4,Def1
        .= dom(term(b,cod(F/.x))) by A3,A4
        .= b by A5,Th35
        .= (I-->b)/.x by A4,Th2;
    end;
    then reconsider F9 as Projections_family of b,I by Def13,Th1;
    now
      let x;
      assume
A6:   x in I;
      then
A7:   cod(F/.x) is terminal by A2;
      thus (cods F)/.x = cod(F/.x) by A6,Def2
        .= cod(term(b,cod(F/.x))) by A7,Th35
        .= cod(F9/.x) by A3,A6
        .= (cods F9)/.x by A6,Def2;
    end;
    then consider h such that
A8: h in Hom(b,a) and
A9: for k st k in Hom(b,a) holds (for x st x in I holds (F/.x)(*)k = F9
    /.x) iff h = k by A1,Th1;
    thus Hom(b,a)<>{} by A8;
    reconsider h as Morphism of b,a by A8,CAT_1:def 5;
    take h;
    let g be Morphism of b,a;
    now
      thus g in Hom(b,a) by A8,CAT_1:def 5;
      let x;
      set c = cod(F/.x);
A10:  cod g = a by A8,CAT_1:5;
      assume
A11:  x in I;
      then c is terminal by A2;
      then consider f being Morphism of b,c such that
A12:  for f9 being Morphism of b,c holds f = f9;
A13:  dom(F/.x) = a by A11,Th41;
      then
A14:  cod((F/.x)(*)g) = c by A10,CAT_1:17;
      dom g = b by A8,CAT_1:5;
      then dom((F/.x)(*)g) = b by A10,A13,CAT_1:17;
      then (F/.x)(*)g in Hom(b,c) by A14;
      then
A15:  (F/.x)(*)g is Morphism of b,c by CAT_1:def 5;
      F9/.x = term(b,c) by A3,A11;
      hence F9/.x = f by A12
        .= (F/.x)(*)g by A12,A15;
    end;
    hence h = g by A9;
  end;
  hence thesis;
end;
