reserve i,j,n,k,m for Nat,
     a,b,x,y,z for object,
     F,G for FinSequence-yielding FinSequence,
     f,g,p,q for FinSequence,
     X,Y for set,
     D for non empty set;

theorem Th48:
  f in doms F & g in doms G implies f^g in doms (F^G)
proof
  set fg=f^g,FG=F^G;
  assume
A1: f in doms F & g in doms G;
A2: len fg = len f + len g & len FG = len F + len G by FINSEQ_1:22;
A3: len f = len F & len g = len G by A1,Th47;
  for i st i in dom fg holds fg.i in dom (FG.i)
  proof
    let i be Nat such that
A4:   i in dom fg;
    per cases by A4,FINSEQ_1:25;
    suppose
A5:     i in dom f;
      then i in dom F by A3,FINSEQ_3:29;
      then f.i =fg.i & F.i =FG.i by A5,FINSEQ_1:def 7;
      hence thesis by A1,Th47,A5;
    end;
    suppose ex j st j in dom g & i=len f + j;
      then consider j such that
A6:     j in dom g & i=len f+j;
      j in dom G by A6,A3,FINSEQ_3:29;
      then g.j =fg.i & G.j =FG.i by A6,A3,FINSEQ_1:def 7;
      hence thesis by A1,Th47,A6;
    end;
  end;
  hence thesis by A2,A3,Th47;
end;
