theorem Th138:
  for v,v1
  for h being Endomorphism of Free(S,Y)
  for g being one-to-one FinSequence of dom v st
  rng g = {xi where xi is Element of dom v: ex s,y st v.xi = [y,s]} &
  dom v c= dom v1 & v|((dom v) \ rng g) = v1|((dom v) \ rng g) &
  for i st i in dom g holds (h.v)|(g/.i qua Node of v)=v1|(g/.i qua Node of v)
  holds h.v = v1
  proof
    let v,v1;
    let h be Endomorphism of Free(S,Y);
    let g be one-to-one FinSequence of dom v;
    assume
Z0: rng g = {xi where xi is Element of dom v: ex s,y st v.xi = [y,s]};
    assume Z1: dom v c= dom v1;
    assume v|((dom v) \ rng g) = v1|((dom v) \ rng g);
    then
A5: (h.v)|((dom v) \ rng g) = v1|((dom v) \ rng g) by Z0,Th135;
    assume Z3: for i st i in dom g holds
    (h.v)|(g/.i qua Node of v) = v1|(g/.i qua Node of v);
    h.v c= v1
    proof let a,b;
      assume [a,b] in h.v;
      then
A1:   a in dom(h.v) & b = h.v.a by FUNCT_1:1;
      then per cases by Z0,Th137;
      suppose a in (dom v)\rng g;
        then
A2:     ((h.v)|((dom v) \ rng g)).a = h.v.a & a in dom v &
        (v1|((dom v) \ rng g)).a = v1.a by FUNCT_1:49;
        thus thesis by Z1,A5,A1,A2,FUNCT_1:1;
      end;
      suppose ex nu being Element of dom v st nu in rng g &
        ex mu being Node of (h.v)|nu st a = nu^mu;
        then consider nu being (Element of dom v), mu being Node of (h.v)|nu
        such that
A3:     nu in rng g & a = nu^mu;
        consider i being object such that
A6:     i in dom g & nu = g.i by A3,FUNCT_1:def 3;
        reconsider i as Nat by A6;
        nu = g/.i by A6,PARTFUN1:def 6;
        then
A7:     (h.v)|nu = v1|nu by A6,Z3;
A8:     nu in dom v c= dom (h.v) by Th135;
        mu in dom((h.v)|nu) = (dom (h.v))|nu & dom(v1|nu) = (dom v1)|nu
        by TREES_2:def 10;
        then b = ((h.v)|nu).mu = v1.a & a in dom v1
        by Z1,A7,A1,A3,A8,TREES_1:def 6,TREES_2:def 10;
        hence thesis by FUNCT_1:1;
      end;
    end;
    hence h.v = v1 by Th136;
  end;
