let D be non empty set ; :: thesis: for M1, M2 being Matrix of D st width M1 > 0 & width M2 > 0 holds
( M1 = M2 iff ( M1 @ = M2 @ & width M1 = width M2 ) )

let M1, M2 be Matrix of D; :: thesis: ( width M1 > 0 & width M2 > 0 implies ( M1 = M2 iff ( M1 @ = M2 @ & width M1 = width M2 ) ) )
assume A1: ( width M1 > 0 & width M2 > 0 ) ; :: thesis: ( M1 = M2 iff ( M1 @ = M2 @ & width M1 = width M2 ) )
thus ( M1 = M2 implies ( M1 @ = M2 @ & width M1 = width M2 ) ) ; :: thesis: ( M1 @ = M2 @ & width M1 = width M2 implies M1 = M2 )
assume A2: ( M1 @ = M2 @ & width M1 = width M2 ) ; :: thesis: M1 = M2
now
now
len M1 = width (M1 @ ) by A1, Th12;
then A3: len M1 = len M2 by A1, A2, Th12;
A4: ( Indices M1 = [:(dom M1),(Seg (width M1)):] & Indices M2 = [:(dom M2),(Seg (width M2)):] ) ;
for i, j being Nat st [i,j] in Indices M1 holds
M1 * i,j = M2 * i,j
proof
let i, j be Nat; :: thesis: ( [i,j] in Indices M1 implies M1 * i,j = M2 * i,j )
assume A5: [i,j] in Indices M1 ; :: thesis: M1 * i,j = M2 * i,j
dom M1 = Seg (len M2) by A3, FINSEQ_1:def 3
.= dom M2 by FINSEQ_1:def 3 ;
then (M2 @ ) * j,i = M2 * i,j by A2, A4, A5, MATRIX_1:def 7;
hence M1 * i,j = M2 * i,j by A2, A5, MATRIX_1:def 7; :: thesis: verum
end;
hence M1 = M2 by A2, A3, MATRIX_1:21; :: thesis: verum
end;
hence M1 = M2 ; :: thesis: verum
end;
hence M1 = M2 ; :: thesis: verum