reserve n for Element of NAT,
  p,q,r,s for Element of HP-WFF;

theorem Th20:
  for A,B,C being set st (B = {} implies A = {}) & (C = {} implies B = {})
  for f being Function of A, Funcs(B,C),
      g being Function of A,B holds rng(f..g) c= C
proof
  let A,B,C be set such that
A1: B = {} implies A = {} and
a1: C = {} implies B = {};
  let f be Function of A, Funcs(B,C), g be Function of A,B;
  let x be object;
  assume x in rng(f..g);
  then consider y being object such that
A2: y in dom(f..g) and
A3: (f..g).y = x by FUNCT_1:def 3;
S1: dom f = dom g
    proof
      per cases;
      suppose B <> {}; then
C1:     dom g = A by FUNCT_2:def 1;
        Funcs(B,C) <> {} by a1,FUNCT_2:8;
        hence thesis by C1,FUNCT_2:def 1;
      end;
      suppose B = {}; 
        hence thesis by A1;
      end;
    end;
A4: dom(f..g) = dom f /\ dom g by PRALG_1:def 19 .= dom f by S1; then
A5: Funcs(B,C) <> {} by A2; then
A6: dom f = A by FUNCT_2:def 1;
  then reconsider fy = f.y as Function of B,C by A2,A4,A5,FUNCT_2:5,66;
A7: C <> {} by A1,A2,A4;
  g.y in B by A1,A2,A4,A6,FUNCT_2:5;
  then fy.(g.y) in C by A7,FUNCT_2:5;
  hence thesis by A2,A3,PRALG_1:def 19;
end;
