reserve D for non empty set,
  f for FinSequence of D,
  p, p1, p2, p3, q for Element of D,
  i, j, k, l, n for Nat;

theorem
  Swap(<*p1, p2, p3*>, 2, 3) = <*p1, p3, p2*>
proof
  set f = <*p1,p2,p3*>;
A1: len f = 3 by FINSEQ_1:45;
  then 2 in dom f by FINSEQ_3:25;
  then
A2: f/.2 = f.2 by PARTFUN1:def 6
    .= p2;
  3 in dom f by A1,FINSEQ_3:25;
  then
A3: f/.3 = f.3 by PARTFUN1:def 6
    .= p3;
  Swap(f,2,3) = Replace(Replace(f,2,f/.3),3,f/.2) by A1,Def2
    .= Replace(<*p1,p3,p3*>,3,f/.2) by A3,Th16;
  hence thesis by A2,Th17;
end;
