let D be non empty set ; :: thesis: for M being Matrix of D st width M > 0 holds
( len (M @ ) = width M & width (M @ ) = len M )
let M be Matrix of D; :: thesis: ( width M > 0 implies ( len (M @ ) = width M & width (M @ ) = len M ) )
assume A1:
width M > 0
; :: thesis: ( len (M @ ) = width M & width (M @ ) = len M )
thus
len (M @ ) = width M
by Def7; :: thesis: width (M @ ) = len M
A2:
len M >= 0
by NAT_1:2;
per cases
( len M = 0 or len M > 0 )
by A2, XXREAL_0:1;
suppose A3:
len M > 0
;
:: thesis: width (M @ ) = len M
dom M = Seg (len M)
by FINSEQ_1:def 3;
then A4:
(
Seg (width M) <> {} &
dom M <> {} )
by A1, A3;
for
i,
j being
set holds
(
[i,j] in [:(dom (M @ )),(Seg (width (M @ ))):] iff
[i,j] in [:(Seg (width M)),(dom M):] )
proof
let i,
j be
set ;
:: thesis: ( [i,j] in [:(dom (M @ )),(Seg (width (M @ ))):] iff [i,j] in [:(Seg (width M)),(dom M):] )
thus
(
[i,j] in [:(dom (M @ )),(Seg (width (M @ ))):] implies
[i,j] in [:(Seg (width M)),(dom M):] )
:: thesis: ( [i,j] in [:(Seg (width M)),(dom M):] implies [i,j] in [:(dom (M @ )),(Seg (width (M @ ))):] )
assume A6:
[i,j] in [:(Seg (width M)),(dom M):]
;
:: thesis: [i,j] in [:(dom (M @ )),(Seg (width (M @ ))):]
then
(
i in Seg (width M) &
j in dom M )
by ZFMISC_1:106;
then reconsider i =
i,
j =
j as
Element of
NAT ;
[j,i] in Indices M
by A6, ZFMISC_1:107;
then
[i,j] in Indices (M @ )
by Def7;
hence
[i,j] in [:(dom (M @ )),(Seg (width (M @ ))):]
;
:: thesis: verum
end; then
[:(Seg (width M)),(dom M):] = [:(dom (M @ )),(Seg (width (M @ ))):]
by ZFMISC_1:108;
then
(
Seg (width M) = dom (M @ ) &
dom M = Seg (width (M @ )) )
by A4, ZFMISC_1:134;
hence
width (M @ ) = len M
by FINSEQ_1:def 3;
:: thesis: verum end; end;