theorem
  [#](p^q,d)|(dom p) = p
proof
  set k = len p, f = [#](p^q,d);
  Seg k c= NAT;
  then Seg k c= dom f by FUNCT_2:def 1;
  then
A1: dom (f|Seg k) = Seg k by RELAT_1:62;
A2: dom p = Seg k by FINSEQ_1:def 3;
  now
    let x be object;
    k <= k + len q by NAT_1:12;
    then k <= len (p^q) by FINSEQ_1:22;
    then
A3: Seg(len(p^q)) = dom (p^q) & Seg k c= Seg len(p^q) by FINSEQ_1:5,def 3;
    assume
A4: x in Seg k;
    then (f|Seg k).x = f.x by A1,FUNCT_1:47;
    hence (f|Seg k).x = (p^q).x by A4,A3,Th20
      .= p.x by A2,A4,FINSEQ_1:def 7;
  end;
  hence thesis by A1,A2,FUNCT_1:2;
end;
