reserve i,j,k,l for natural Number;
reserve A for set, a,b,x,x1,x2,x3 for object;
reserve D,D9,E for non empty set;
reserve d,d1,d2,d3 for Element of D;
reserve d9,d19,d29,d39 for Element of D9;
reserve p,q,r for FinSequence;

theorem Th58:
  for a being object holds (i+1) |-> a = (i |-> a) ^ <*a*>
proof let a be object;
  set p = (i+1) |-> a;
  consider q being FinSequence , x being object such that
A1: p = q^<*x*> by FINSEQ_1:46;
A2: len p = i + 1 & len p = len q + 1 by A1,Th14,CARD_1:def 7;
A3: now
    per cases;
    suppose
A4:   i = 0;
      then q = {} by A2;
      hence q = i |-> a by A4;
    end;
    suppose
A5:   i <> 0;
A6:   rng q c= rng p & rng p = {a} by A1,FINSEQ_1:29,FUNCOP_1:8;
A7:   dom q = Seg len q by FINSEQ_1:def 3;
      then i in dom q by A2,A5,FINSEQ_1:3;
      then q.i in rng q by FUNCT_1:def 3;
      then rng q = {a} by A6,ZFMISC_1:33;
      hence q = i |-> a by A2,A7,FUNCOP_1:9;
    end;
  end;
  p.(i+1) = a by FINSEQ_1:4,FUNCOP_1:7;
  hence thesis by A1,A2,A3,FINSEQ_1:42;
end;
