reserve i,j,m,n,k for Nat,
  x,y for set,
  K for Field,
  a for Element of K;

theorem Th2:
  for P be without_zero finite Subset of NAT st P c= Seg n holds
  Segm(1.(K,n),P,P) = 1.(K,card P)
proof
  let P be without_zero finite Subset of NAT such that
A1: P c= Seg n;
  set S=Segm(1.(K,n),P,P);
  now
    set SP=Sgm P;
    let i,j such that
A2: [i,j] in Indices 1.(K,card P);
A3: SP is one-to-one by FINSEQ_3:92;
A4: rng SP = P by FINSEQ_1:def 14;
    reconsider Spi = SP.i, Spj = SP.j as Nat by VALUED_0:12;
A5: Indices 1.(K,card P) = Indices S by MATRIX_0:26;
    then
A6: S*(i,j) = 1.(K,n)*(Spi,Spj) by A2,MATRIX13:def 1;
    Indices 1.(K,n) = [:Seg n,Seg n:] & [:P,P:] c= [:Seg n,Seg n:] by A1,
MATRIX_0:24,ZFMISC_1:96;
    then
A7: [SP.i,SP.j] in Indices 1.(K,n) by A2,A5,A4,MATRIX13:17;
    Indices S=[:Seg card P,Seg card P:] & dom SP=Seg card P by FINSEQ_3:40
,MATRIX_0:24;
    then
A8: i in dom SP & j in dom SP by A2,A5,ZFMISC_1:87;
    i=j or i<>j;
    then
    S*(i,j)=1_K & 1.(K,card P)*(i,j)=1_K or 1.(K,card P)*(i,j)=0.K & SP.i
    <>SP.j by A2,A3,A7,A8,A6,FUNCT_1:def 4,MATRIX_1:def 3;
    hence 1.(K,card P)*(i,j)=S*(i,j) by A7,A6,MATRIX_1:def 3;
  end;
  hence thesis by MATRIX_0:27;
end;
