reserve i for Nat, x,y for set;
reserve S for non empty non void ManySortedSign;
reserve X for non-empty ManySortedSet of S;

theorem
  for f,g being Function-yielding Function holds doms (f*g) = (doms f)*g
  proof
    let f,g be Function-yielding Function;
A1: dom doms (f*g) = dom (f*g) & dom doms f = dom f
    by FUNCT_6:def 2;
A2: dom doms (f*g) = dom((doms f)*g)
    proof
      thus dom doms (f*g) c= dom((doms f)*g)
      proof
        let x be object; assume x in dom doms (f*g); then
     x in dom(f*g) & (f*g).x is Function by A1; then
A3:     x in dom g & g.x in dom f & (f*g).x = f.(g.x) by FUNCT_1:11,12; then
        g.x in dom doms f by FUNCT_6:22;
        hence thesis by A3,FUNCT_1:11;
      end;
      let x be object; assume x in dom((doms f)*g); then
A4:   x in dom g & g.x in dom doms f by FUNCT_1:11; then
A5:   g.x in dom f & f.(g.x) is Function & f.(g.x) = (f*g).x
      by A1,FUNCT_1:13; then
      x in dom(f*g) by A4,FUNCT_1:11;
      hence thesis by A5,FUNCT_6:22;
    end;
    now let x be object;
      assume x in dom doms (f*g); then
A6:   x in dom g & g.x in dom doms f & (doms (f*g)).x = proj1((f*g).x)
      by A1,FUNCT_1:11,FUNCT_6:def 2; then
A7:   (doms f).(g.x) = proj1(f.(g.x)) by A1,FUNCT_6:def 2;
      thus (doms(f*g)).x = (doms f).(g.x) by A6,A7,FUNCT_1:13
      .= ((doms f)*g).x by A6,FUNCT_1:13;
    end;
    hence doms (f*g) = (doms f)*g by A2;
  end;
