
theorem Th8:
  for S be finite set, s,t be FinSequence of S holds
  s,t -are_prob_equivalent iff FDprobSEQ(s) = FDprobSEQ(t)
proof
  let S be finite set, s,t be FinSequence of S;
A1: now
    assume
A2: FDprobSEQ (s) = FDprobSEQ (t);
    for x be set holds FDprobability(x,t) = FDprobability(x,s)
    proof
      let x be set;
      per cases;
      suppose
        x in S;
        then x in rng canFS(S) by FUNCT_2:def 3;
        then consider n be object such that
A3:     n in dom canFS S and
A4:     x=(canFS(S)).n by FUNCT_1:def 3;
        reconsider n as Element of NAT by A3;
        len canFS(S) = card (S) by FINSEQ_1:93;
        then
A5:     n in Seg card S by A3,FINSEQ_1:def 3;
        then
A6:     n in dom FDprobSEQ t by Def3;
        n in dom FDprobSEQ s by A5,Def3;
        hence FDprobability(x,s) = (FDprobSEQ s).n by A4,Def3
          .= FDprobability(x,t) by A2,A4,A6,Def3;
      end;
      suppose
A7:     not x in S;
        not x in rng t by A7; then
        rng t misses {x} by ZFMISC_1:50; then
A8:     t"{x} = {} by RELAT_1:138;
        not x in rng s by A7; then
        rng s misses {x} by ZFMISC_1:50; then
        s"{x} = {} by RELAT_1:138;
        hence FDprobability(x,s)=0 .=FDprobability(x,t) by A8;
      end;
    end;
    hence s,t -are_prob_equivalent;
  end;
  now
    assume
A9: s,t -are_prob_equivalent;
A10: now
      let n be Nat;
      assume n in dom FDprobSEQ t;
      hence (FDprobSEQ t).n =FDprobability((canFS(S)).n,t) by Def3
        .=FDprobability((canFS S).n,s) by A9;
    end;
    dom FDprobSEQ t = Seg card S by Def3;
    hence FDprobSEQ s = FDprobSEQ t by A10,Def3;
  end;
  hence thesis by A1;
end;
