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

theorem CONST1:
  for n be Nat, a be Real holds ((a,a)Subnomial n) = ((n+1)|-> a|^n)
  proof
    let n be Nat, a be Real;
    A1: for j be Nat holds ((a,a)Subnomial n).j = ((n+1)|-> a|^n).j
    proof
      let j be Nat;
      j <> 0 implies ((a,a)Subnomial n).j = ((n+1)|-> a|^n).j
      proof
        assume j <> 0; then
        reconsider i = j-1 as Nat;
        per cases;
        suppose
          ex k be Nat st n = i+k; then
          reconsider k = n-i as Nat;
          set l = i+1;
          0+1 <= i+1 & (i+1)+0 <= (i+1)+k by XREAL_1:6; then
          1 <= i+1 <= len ((a,a) Subnomial (n+1-1)); then
          i+1 in dom ((a,a)Subnomial (i+k)) by FINSEQ_3:25; then
          ((a,a)Subnomial (i+k)).(i+1) = a|^n &
            ((k+(i+1))|-> a|^n).(i+1) = a|^n by CONST;
          hence thesis;
        end;
        suppose
          not ex k be Nat st n = i + k; then
          i+1 > n+1 by XREAL_1:6,NAT_1:10; then
          i+1 > len ((a,a)Subnomial n) & i+1 > len ((n+1)|-> a|^n) = n+1
            by Def2; then
          not (i+1) in dom ((a,a)Subnomial n) &
            not (i+1) in dom ((n+1)|-> a|^n) by FINSEQ_3:25; then
          ((a,a)Subnomial n).(i+1) = 0 & ((n+1)|-> a|^n).(i+1) = 0
            by FUNCT_1:def 2;
          hence thesis;
        end;
      end;
      hence thesis;
    end;
    len ((a,a)Subnomial (n+1-1)) = len ((n+1)|-> a|^n);
    hence thesis by A1;
  end;
