reserve x,y for object,
  N for Element of NAT,
  c,i,j,k,m,n for Nat,
  D for non empty set,
  s for Element of 2Set Seg (n+2),
  p for Element of Permutations(n) ,
  p1, q1 for Element of Permutations(n+1),
  p2 for Element of Permutations(n +2),
  K for Field,
  a for Element of K,
  f for FinSequence of K,
  A for (Matrix of K),
  AD for Matrix of n,m,D,
  pD for FinSequence of D,
  M for Matrix of n,K;

theorem Th5:
  for i being Nat st j in Seg width M holds width Deleting(M,i,j) = n-' 1
proof
  let i be Nat;
  assume
A1: j in Seg width M;
  per cases;
  suppose
A2: len M<=1 & i in dom M;
  Seg width M <> {} by A1;
    then width M <> {};
    then len M > 0 by MATRIX_0:def 3;
    then
A3: len M=1 by A2,NAT_1:25;
A4: len Deleting(M,i,j)=n-'1 by A2,Th2;
    len M=n by MATRIX_0:24;
    then len Deleting(M,i,j)=0 by A3,A4,XREAL_1:232;
    hence thesis by A4,MATRIX_0:def 3;
  end;
  suppose
A5: len M>1;
A6: width M=n by MATRIX_0:24;
    width M=width DelLine(M,i) by A5,Th4;
    hence thesis by A1,A6,Th3;
  end;
  suppose
A7: not i in dom M;
A8: width M=n by MATRIX_0:24;
    DelLine(M,i)=M by A7,FINSEQ_3:104;
    hence thesis by A1,A8,Th3;
  end;
end;
