
theorem Th4:
  for X being set, P,Q being a_partition of X
  for f being Function of P,Q st for a being set st a in P holds a c= f.a
  for p being FinSequence of P, q being FinSequence of Q holds
  product p c= product q iff f*p = q
proof
  let X be set, P,Q be a_partition of X;
  let f be Function of P,Q such that
A1: for a being set st a in P holds a c= f.a;
  let p be FinSequence of P, q be FinSequence of Q;
A2: rng p c= P;
  now
    assume P <> {};
    then reconsider X as non empty set;
    Q is a_partition of X;
    hence Q <> {};
  end;
  then dom f = P by FUNCT_2:def 1;
  then
A3: dom (f*p) = dom p by A2,RELAT_1:27;
  hereby
    assume
A4: product p c= product q;
    then
A5: dom p = dom q by Th1;
    now
      let x be object;
      assume
A6:   x in dom p;
      then
A7:   p.x c= q.x by A4,Th1;
A8:   p.x in rng p by A6,FUNCT_1:def 3;
A9:   q.x in rng q by A5,A6,FUNCT_1:def 3;
      reconsider Y = X as non empty set by A8;
      reconsider P9 = P, Q9 = Q as a_partition of Y;
      reconsider a = p.x as Element of P9 by A8;
      set z = the Element of a;
A10:  a c= f.a by A1;
A11:  z in a;
      f.a in Q9 by FUNCT_2:5;
      then q.x = f.a by A7,A9,A10,A11,Lm3;
      hence (f*p).x = q.x by A6,FUNCT_1:13;
    end;
    hence f*p = q by A3,A5;
  end;
  assume
A12: f*p = q;
  now
    let x be object;
    assume
A13: x in dom p;
    then
A14: q.x = f.(p.x) by A12,FUNCT_1:13;
    p.x in rng p by A13,FUNCT_1:def 3;
    hence p.x c= q.x by A1,A14;
  end;
  hence thesis by A3,A12,CARD_3:27;
end;
