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*>, 1, 3) = <*p3, p2, p1*>
proof
  set f = <*p1,p2,p3*>;
A1: len f = 3 by FINSEQ_1:45;
  then 1 in dom f by FINSEQ_3:25;
  then
A2: f/.1 = f.1 by PARTFUN1:def 6
    .= p1;
  3 in dom f by A1,FINSEQ_3:25;
  then
A3: f/.3 = f.3 by PARTFUN1:def 6
    .= p3;
  Swap(f,1,3) = Replace(Replace(f,1,f/.3),3,f/.1) by A1,Def2
    .= Replace(<*p3,p2,p3*>,3,f/.1) by A3,Th15;
  hence thesis by A2,Th17;
end;
