reserve x, y for object, X for set,
  i, j, k, l, n, m for Nat,
  D for non empty set,
  K for commutative Ring,
  a,b for Element of K,
  perm, p, q for Element of Permutations(n),
  Perm,P for Permutation of Seg n,
  F for Function of Seg n,Seg n,
  perm2, p2, q2, pq2 for Element of Permutations(n+2),
  Perm2 for Permutation of Seg (n+2);
reserve s for Element of 2Set Seg (n+2);
reserve pD for FinSequence of D,
  M for Matrix of n,m,D,
  pK,qK for FinSequence of K,
  A for Matrix of n,K;

theorem Th30:
  M = RLine(M,l,Line(M,l))
proof
  set L=Line(M,l);
  set RL=RLine(M,l,L);
A1: width M=len L by MATRIX_0:def 7;
A2: now
    let i be Nat such that
A3: 1<= i and
A4: i <= len M;
A5: i in Seg len M by A3,A4;
A6: n=len M by MATRIX_0:def 2;
    then
A7: RL.i=Line(RL,i) by A5,MATRIX_0:52;
A8: Line(M,i)=M.i by A5,A6,MATRIX_0:52;
    now
      per cases;
      case
        i=l;
        hence RL.i=M.i by A1,A5,A6,A8,A7,Th28;
      end;
      case
        i<>l;
        hence RL.i=M.i by A5,A6,A8,A7,Th28;
      end;
    end;
    hence RL.i=M.i;
  end;
  len M=len RL by Lm4;
  hence thesis by A2;
end;
