reserve i,j,n for Nat,
  K for Field,
  a for Element of K,
  M,M1,M2,M3,M4 for Matrix of n,K;
reserve A for Matrix of K;

theorem ::: should be a cluster
  for R being Ring, M1,M2 being Matrix of n,R
  holds M1 is upper_triangular Matrix of n,R & 
  M1 is lower_triangular Matrix of n,R implies M1 is symmetric
proof
  let R be Ring;
  let M1,M2 be Matrix of n,R;
  assume
A1: M1 is upper_triangular Matrix of n,R & M1 is lower_triangular Matrix
  of n,R;
A2: Indices M1=[:Seg n, Seg n:] by MATRIX_0:24;
  for i,j st [i,j] in Indices M1 holds M1@*(i,j)=M1*(i,j)
  proof
    let i,j;
    assume
A3: [i,j] in Indices M1;
    then [i,j] in [:Seg n, Seg n:] by MATRIX_0:24;
    then i in Seg n & j in Seg n by ZFMISC_1:87;
    then
A4: [j,i] in Indices M1 by A2,ZFMISC_1:87;
    per cases;
    suppose
      i=j;
      hence thesis by A4,MATRIX_0:def 6;
    end;
    suppose
A5:   i<>j;
      per cases by A5,XXREAL_0:1;
      suppose
        i<j;
        then M1*(i,j) = 0.R & M1*(j,i) = 0.R by A1,A3,A4,
MATRIX_1:def 9,def 8;
        hence thesis by A4,MATRIX_0:def 6;
      end;
      suppose
        i>j;
        then M1*(i,j)=0.R & M1*(j,i)=0.R by A1,A3,A4,MATRIX_1:def 8,def 9;
        hence thesis by A4,MATRIX_0:def 6;
      end;
    end;
  end;
  hence thesis by MATRIX_0:27;
end;
