reserve i,j,k,n,l for Element of NAT,
  K for Field,
  a,b,c for Element of K,
  p ,q for FinSequence of K,
  M1,M2,M3 for Matrix of n,K;
reserve D for non empty set,
  t for FinSequence of D,
  A for Matrix of n,D;

theorem
  n>0 implies 1.(K,n) is col_circulant
proof
  assume
A1: n > 0;
  set M1=1.(K,n);
A2: Indices (1.(K,n)) = [:Seg n, Seg n:] by MATRIX_0:24;
  set p=Col(M1,1);
A3: len (1.(K,n))=n by MATRIX_0:24;
  then
A4: len p = n by MATRIX_0:def 8;
A5: dom M1= Seg n by A3,FINSEQ_1:def 3;
A6: width (1.(K,n))=n by MATRIX_0:24;
  for i,j be Nat st [i,j] in Indices M1 holds M1*(i,j)=p.((i-j mod len p)+ 1)
  proof
    let i,j be Nat;
A7: i-j mod n >=0 by A1,NAT_D:62;
    then
A8: (i-j mod n)+1 in NAT by INT_1:3;
    assume
A9: [i,j] in Indices M1;
    then
A10: j in Seg n by A2,ZFMISC_1:87;
    then
A11: 1 <= j by FINSEQ_1:1;
A12: j <= n by A10,FINSEQ_1:1;
A13: i in Seg n by A2,A9,ZFMISC_1:87;
    then 1 <= i by FINSEQ_1:1;
    then
A14: 1-n<=i-j by A12,XREAL_1:13;
    -n<=-n+1 by XREAL_1:29;
    then
A15: -n<=i-j by A14,XXREAL_0:2;
    i <= n by A13,FINSEQ_1:1;
    then
A16: i-j <= n-1 by A11,XREAL_1:13;
    n-1 < n by XREAL_1:44;
    then
A17: i-j< n by A16,XXREAL_0:2;
    i-j mod n <=n-1
    proof
      per cases;
      suppose
        0 <=i-j;
        hence thesis by A16,A17,NAT_D:63;
      end;
      suppose
A18:    0 >i-j;
        then i-j<=-1 by INT_1:8;
        then n+(i-j)<=n+-1 by XREAL_1:6;
        hence thesis by A15,A18,NAT_D:63;
      end;
    end;
    then
A19: (i-j mod n)+1 <=n-1+1 by XREAL_1:6;
    (i-j mod n)+1>=0+1 by A7,XREAL_1:6;
    then
A20: (i-j mod n)+1 in Seg n by A19,A8;
    then
A21: (i-j mod len p)+1 in Seg n by A3,MATRIX_0:def 8;
    M1*(i,j)=p.((i-j mod len p)+1)
    proof
      per cases;
      suppose
A22:    i=j;
        0+1<=n by A1,NAT_1:13;
        then 1 in Seg n;
        then
A23:    [1,1] in Indices M1 by A2,ZFMISC_1:87;
        i-j mod len p =0 by A1,A4,A22,NAT_D:63;
        then p.((i-j mod len p)+1) =M1*(1,1) by A5,A21,MATRIX_0:def 8
          .=1_K by A23,MATRIX_1:def 3;
        hence thesis by A9,A22,MATRIX_1:def 3;
      end;
      suppose
A24:    i <> j;
        then
A25:    i-j<>0;
        i-j mod n <> 0
        proof
          per cases;
          suppose
            0 <=i-j;
            hence thesis by A17,A25,NAT_D:63;
          end;
          suppose
A26:        0 >i-j;
            1-n+n<=(i-j)+n by A14,XREAL_1:6;
            hence thesis by A15,A26,NAT_D:63;
          end;
        end;
        then
A27:    (i-j mod len p)+1<>1 by A3,MATRIX_0:def 8;
        set l=(i-j mod len p)+1;
        reconsider l as Nat by A3,A8,MATRIX_0:def 8;
        0+1<=n by A1,NAT_1:13;
        then
A28:    1 in Seg n;
        l in dom M1 by A3,A4,A20,FINSEQ_1:def 3;
        then
A29:    [l,1] in Indices M1 by A6,A28,ZFMISC_1:87;
        p.l=M1*(l,1) by A5,A21,MATRIX_0:def 8
          .=0.K by A27,A29,MATRIX_1:def 3;
        hence thesis by A9,A24,MATRIX_1:def 3;
      end;
    end;
    hence thesis;
  end;
  then M1 is_col_circulant_about p by A3,A4;
  then consider p being FinSequence of K such that
A30: len p =len M1 & M1 is_col_circulant_about p;
  take p;
  thus thesis by A30;
end;
