reserve a,b,i,j,k,l,m,n for Nat;

theorem CREV:
  for a be Complex, f,g be complex-valued FinSequence
    st g = Rev f holds Rev (a(#)f) = a(#)g
  proof
    let a be Complex, f,g be complex-valued FinSequence such that
    A1: g = Rev f;
    set h = (a(#)f),h1 = a(#)g,h2=Rev h;
    A2: dom h1 = dom g & dom h = dom f by VALUED_1:def 5;
    A4: dom Rev (h) = dom h & dom (Rev f) = dom f by FINSEQ_5:57; then
    A5: len h1 = len h2 & len h2 = len f & len f = len h &
      len g = len f by A1,A2,FINSEQ_3:29;
    reconsider h1 as (len f)-element complex-valued FinSequence by A5;
    for x be object st x in dom h1 holds h1.x = h2.x
    proof
      let x be object such that
      B1: x in dom h1;
      reconsider x as Nat by B1;
      B3: 1 <= x <= len f by B1,A1,A2,A4,FINSEQ_3:25; then
      reconsider k = (len f)-x as Element of NAT by NAT_1:21;
      set l=k+1;
      B4: 0+1 <= k+1 & k+1 <= k+x by B3,XREAL_1:6;
      (Rev h).x = h.((len h)-x+1) by B1,A1,A2,A4,FINSEQ_5:def 3
      .= (a(#)f).l by A2,FINSEQ_3:29
      .= a*(Rev (Rev f)).l by A2,B4,FINSEQ_3:25,VALUED_1:def 5
      .= a*(g.((len g)-l+1)) by A1,A4,B4,FINSEQ_3:25,FINSEQ_5:def 3
      .= a*(g.x) by A5;
      hence thesis by B1,VALUED_1:def 5;
    end;
    hence thesis by A1,A2,A4,FUNCT_1:2;
  end;
