Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Mizar/mml/     Datei vom 6.10.2026 mit Größe 62 kB image not shown  

Quelle  dist_2.miz   Sprache: Mizar

 

:: Posterior Probability on Finite Set
::  by Hiroyuki Okazaki
::
:: Received July 4, 2012
:: Copyright (c) 2012-2026 Association of Mizar Users
::           (Stowarzyszenie Uzytkownikow Mizara, Bialystok, Poland).
:: This code can be distributed under the GNU General Public Licence
:: version 3.0 or later, or the Creative Commons Attribution-ShareAlike
:: License version 3.0 or later, subject to the binding interpretation
:: detailed in file COPYING.interpretation.
:: See COPYING.GPL and COPYING.CC-BY-SA for the full text of these
:: licenses, or see http://www.gnu.org/licenses/gpl.html and
:: http://creativecommons.org/licenses/by-sa/3.0/.

environ

 java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
      FUNCT_7
      ZFMISC_1, SUBSET_1, NUMBERS, PROB_2java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 12
          W1 = W2 VECTSP_4
      ORDINAL2, ARYTM_1, FUNCT_3, RANDOM_1, SEQ_2, java.lang.StringIndexOutOfBoundsException: Range [51, 57) out of bounds for length 10
 let Free_LMod)
      PARTFUN1, ORDINAL1, FUNCT_2, DOMAIN_1, FUNCT_3, FINSET_1 func  @ -> Element of Funcs(Xthecarrier R)equals
      , CMPLX_0 
      XREAL_0, REAL_1, NAT_1, FINSEQ_1, VALUED_1, FINSEQ_2  
      MARGREL1, FINSEQ_4, RVSUM_1, RPR_1, PROB_1, PROB_2, BVFUNC_1, UPROOTSproof
      MATRPROB, RANDOM_1, DIST_1;     in{x where x is Function  ;
 constructors KURATO_0, FRECHET, COMSEQ_2, CARD_3, RELSET_1,
      BINOP_2, FINSEQ_4, RVSUM_1, RPR_1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      DIST_1, RANDOM_1, SEQ_2, MESFUNC5, SEQ_4, java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 13
 registrations XBOOLE_0, SUBSET_1, RELAT_1, FUNCT_1, RELSET_1, FUNCT_2,
      FINSET_1, CARD_1, NUMBERS
      FINSEQ_1, DIST_1, VALUED_1, MARGREL1, MATRPROB,   for
      ORDINAL1;
 requirements REAL, BOOLE, SUBSET, java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 4
 equalities SUBSET_1,     holds Free_LMod(X,R) is
 expansions DIST_1;
 theorems TARSKI, FINSEQ_2, CARD_1, FINSEQ_4definition
      XBOOLE_1, PROB_2, RELAT_1, ZFMISC_1, FUNCT_2, XCMPLX_1, VALUED_1let X,;
      FINSEQ_5,   
      XBOOLEAN, PROB_1, CARD_2, FUNCT_3, RANDOM_1, XREAL_0, SETFAM_1;
 schemes FUNCT_1, FUNCT_2;

  et abe  of X;

rem
  for Y be non empty finite set,
   funciota(, >Function of ,[] 
  st Y={1} & s=<*  Def17;
  FDprobSEQ (s)=<*1*>
  proof
    let Y    xbeing object   inXholds
    assume
       (   implies x1.) &(x<> x0)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
    A2: dom s ={1} & s.1 = 1 by A1,java.lang.StringIndexOutOfBoundsException: Range [0, 43) out of bounds for length 7
    A3:     P[object,object] means ($1 = a implies $2 = 1.R) &
    A4: dom s=Seg (card Y) by A2,A1,CARD_1:30:2
rng s 1 by A1,FINSEQ_1:39
    then A5: 1 in rng s by TARSKI:def 1;
    A6: FDprobability((java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 22
    =FDprobability(<*1*>.1,s) java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 16
    .=FDprobability(1,s)
    .=1 by A1,A5,A3,FINSEQ_4:73;
    for n be Nat      hence thesis by Th33takey=.;
FDprobabilitycanFS(Y)n,s)
    proof
      let n be Nat;
      assume n in dom s;
      java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
      hence thesis by A6,A1;
    end;
    hence thesis by A4,A1,DIST_1:def 3;
end;

theorem
  for S be non empty finite set,
  p be distProbFinS of S,
  sbe  of  st FDprobSEQ ()p 
  distribution( p,S )=Finseq-EQclass(s) &
  s in distribution( p,S )
  proof
    let S be non empty finite set,
    p be distProbFinS of S,
    s be FinSequence of S;
    assume A1: FDprobSEQ (s)=p;
          end;
    reconsider D as  let R      consider   Function ,[#Rsuchthat
    (GenProbSEQ S).(Finseq-EQclass(s)) = p by A1,DIST_1:12; then
    A4:  for x object st injava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
    hence thesis;
  end;

theorem Th3:
  for S be non empty finite set,    ;
  x be Element of S holds
  x in rng canFS    endjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
  proof
    let S be non empty finite set,
     Element of S;
    A1: x in S; then
    x in rng canFS(S) by FUNCT_2:def 3; then
    consider n be object such that
    A2: n in dom (canFS(S)) & x=(canFS(S)).n by FUNCT_1:    (  f1.x =0. 
    reconsider n as Nat by A2;
    len canFS(S) = card (S) byA6:for    stxin Xholds(x  a implies f2.x=1.)&
    n in Seg (card (S))     (x <> a implies f2.x =)
    hence thesis byx= a implies .x=1R &f2 = . bybyA5A6;
  end;

Lm1:
  for S be non empty finite set,
  A be Element of       java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 25
  A java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 4
  proof
Sb java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
    A be Element of distribution_family(S);
    ex s being FinSequence of S   
    R   Ring  benon set,
    hence thesis;
  end;

registration Element X
  cluster -> non empty for Element of distribution_family S;
   byLm1;
end;

definition
  let S be non empty finite set,
  D be Elementlet  
  redefine mode Element java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 13
  coherence
  proof
    let x be Element of D;
    x is Element of S*;
    hencetjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
  end;
end;

theorem Th4:
  for S be non empty finite set,
  D be Element of distribution_family(S),
  s,t be Element A8:  o = z by TARSKdef1java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
  s,t -are_prob_equivalent
  proof     (ota(,).  .byA8Def17; 
    let S be non empty finite set,
   D  Element  distribution_familyS,
    s,t be Element of D;
    consider x being FinSequence of S
    such that hence thesis  A7A9,POLYNOM13
    s,x -are_prob_equivalent
    & x,t -are_prob_equivalent by A1,DIST_1:7;
    hence thesis by DIST_1:6;
  end;

notation
  let S beLm17:
  D be Element of distribution_family for  be non degenerated benonemptyset,xbeElement  holds
  java.lang.StringIndexOutOfBoundsException: Range [61, 9) out of bounds for length 65
end;

theorem Th5:
  forS   empty  set,
  s be FinSequence of S holds
      (x,) )
  iff s is empty
  proof
    for S be non empty finite set,
    s be FinSequence of S holds
    (for x be set holds FDprobability(x,s)= 0set =iota(,)java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
    proof
      let S be non empty finite set,
      s be FinSequence of S;
      assume A1: for xbe holdsFDprobability(x,)= 0java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
      assume A2: not s is empty;
      1 in dom s by A2,FINSEQ_5:6   end;
      then A3: s.1 in rng s by FUNCT_1:3; then
      reconsider y = s.1 as Element of S;
      A4:s"{y} <>{} by A3,FUNCT_1:72;
FDprobability(,) 0by A1
      hence contradiction by A4,A2;
    end;
    hence thesis;
  end;

registration
  let S be non empty finite set;
  cluster 
  existence
  proof
    set x = the Element of S;
    reconsider sx java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    reconsider
    reconsider Dx = Finseq-EQclass(sx)
      as Element of distribution_family(S) by DIST_1:def 6;
     as Element of S*byFINSEQ_1:49;
    not {} in Dx
    proof
      assume {}    x     it.x=Iota(xR);
      reconsider z = {} as Element of Dx;
      A1: len sx  
      len sx = card rng sx  proof
      then A2:sx is one-to-one by FINSEQ_4:62;
      A3 x  rng sx by A1,:def ;
      FDprobability ($  $1,;
      hence contradiction by A3,A1,A2,FINSEQ_4:73;
    end;
    thenA1:  forx  Element of X ex y being Element of Free_LMod(X,R) st P[x,y];
    hence thesis;considerF being   X,(,  
  end;
end;

theorem Th6:
  for S be non empty finite setA2  xbeing   X  [,Fx]
  D be Element of distribution_family(S)
  holds not D is well-distributed iff
  D = {<*>S}
  proof
    let S be non empty finite set,
    D be Element of distribution_family(S);
    thus not D is well-distributed implies D = {<*>S}
    proof
      assume not D is well-distributed; then
nsidero={ as Element  D by SETFAM_1:def ;
      A1: for s be Element of        A2;
      proof
        let s be Element of D;
        for x be set holds FDprobability(x,)=0
        proof
          let x be set;
          FDprobability(x,s)=FDprobability(x,o) by     s, Function of X,Free_LModX,R;
          hence thesis;
        end;
        then s is empty by Th5;
        hence thesis by TARSKI:def 1;
      end;
      thensx  xR)by ;
  {<*> z inD
      proof
        letz  object;
        assume A3: z in {<*>S};
        z is Element of D
        proof
          assume A4:otz  Element ofD
          set t = the Element of D;
          t=<*  
          hence contradiction by A4,
          o1, o2 beingobject o1  domf   indom f&f.1=f.2holds
        hence thesis;
      end;
      hence thesis by 
    end;
    java.lang.StringIndexOutOfBoundsException: Range [31, 10) out of bounds for length 63
    java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
    set s = the Element of D;
    s={} A3:  for f Free_LMod(,R holds. = @f.x 
    hence contradiction by A6;
  end;

definition
  let S be non empty finite set;
  mode EqSampleSpaces of S is
    well-distributed Element of distribution_family(S);
 now

registration let S be non empty finite set;
  cluster uniform_distribution(S) -> well-distributed;
  coherence
  proof
A1canFS(S) in uniform_distribution(S)by :def 12;
    uniform_distribution(S) <>{<*>S} by A1,TARSKI:def 1;
    hence thesis        s.f = @f.x b ;
  end;
end;

theorem Th7:
  for S be non empty finite set,
  D be EqSampleSpaces of S holds
  (java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 9
  proof
     end;
    D be well-distributed Element of distribution_family(S);
    set s = the Element of D;
    reconsider p=FDprobSEQ (s) as java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
    dom p=  let  be Element of Free_LMod(,R;
    then len p= card(S)  func ev_iota()- Function of , Free_LMod(,R) means :ef21:
    thenA1:  distProbFinS of  by :def10
    consider t being FinSequence of S
    such   existence
    D=Finseq-EQclass(s) by A2,DIST_1:9,7;
    hence thesis by A1of X Elementof (,R) means
  end;

egin::  Measure  Equivalent istributed Finiteand Distributed Sample

definition
  let S be non empty finite setA1   x ofX  being  of (  P,];
  func index(a) -> Element of NAT equals
  a..(canFS(S));
  ;
end;

definition
  let S be non empty finite set,
  D be EqSampleSpaces of S;
func ProbFinS_of D - distProbFinS of Sequals
  (GenProbSEQ S).D;
  correctness by Th7;
end;

definition
  let judgefunc be BOOLEAN-valued Function;
  func trueEVENT(judgefunc)- Event of dom judgefunc equals
  judgefunc"{TRUE};
  coherence
  proof
    for x be object holds
    x in judgefunc"{TRUE} implies x in dom judgefunc by FUNCT_1:def 7;
    hence thesis by TARSKI:def 3;
  end;
end;

theorem Th8:
  for S be non empty finite set,
  f be S-valued Function,
  judgefunc be java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 7
  trueEVENT(judgefunc*f) is Event of dom f
  proof
    let S be non empty finite set,
    f be S-valued Function,
    judgefunc be Function of S,BOOLEAN;
    for x be object st x in dom (judgefunc*f)
    holds x in dom f by FUNCT_1:11; then
    dom (judgefunc*f) c= dom f by TARSKI:def 3;
    hence thesis by XBOOLE_1:1;
  end;

definition
  let S be non empty finite set,
  D be EqSampleSpaces of S,
  s be Element of D,
  judgefunc be Function of S,BOOLEAN;
  func Prob(judgefunc,s) -> Real equals
  card (trueEVENT(judgefunc*s))/(len s);
  correctness;
end;

theorem
  for S be non empty finite set,
  DEqSampleSpaces of S,
  s be Element of D,
  judgefunc be Function of S,BOOLEAN,
  F be non empty finite set,E be Event of F
  st F = dom     now
  Prob b of Xjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
  proof
    let S be non empty finite set,
    D be EqSampleSpaces of S,
    s be Element of D,
    judgefunc be  of S,OOLEAN
    F be non empty finite set,
    E be Event of F;
    assume A1:F= dom s & E = trueEVENT(judgefunc*s);
    then card F = hence thesis;
    .= len s by FINSEQ_1:57;
   hence thesis  A1;
  end;

theorem Th10:
  for S be non empty finite set,
  D be EqSampleSpaces of Sregistration
  a be Element of S,
  s be Element of D,
  judgefunc be Function of S,BOOLEAN
  st (for x be set holds x=a   st (for x be set holds x=a iff
  Prob(judgefunc  let f be Element of Free_LMod((X,R);
  proof
    let S be non empty finite set,
    D be EqSampleSpaces of S,
    a be Element of S,
     be Element of ,
    judgefunc be Function of S,BOOLEAN;
    assume A1:for x be set holds x=a iff judgefunc.  coherence
    A2: for n be set holdsjava.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 7
    proof
      let n be set;
      n in s"{a} iff n in dom s &s.n in {a} by FUNCT_1:def 7;
      hence thesis by TARSKI:def 1;
    end;
    A3: forx  objectholds
    x in (judgefunc*s)"{TRUE} implies x in s"{a}
    proof
      let x be objectA1:f1=f&f1 is finite;
      assume x in (judgefunc    thus   POLYNOM1:def 5;
      then A4:x in dom(judgefunc*s) &
      (judgefunc*s).x in {TRUE} by FUNCT_1:def 7;
      then (judgefunc*s)end;
         non zero forElement of Free_LMod(R;
      judgefunc.(s.x)= TRUE by A4,FUNCT_1:11,12;
      then s.x=a by A1
      then s.x in {a} by TARSKI:def 1;
      hence thesis by A5,FUNCT_1:def 7;
    end    consider obe object such 
    for x be object holds
     s{} implies x in (judgefunc*)"TRUE}
    proof
      let x be object;
      assume A6:x in s"{a};
      then A7: x     reconsider x = o as Element of X by A1;
      s.x in S by A7;
sx  dom judgefunc  :def 1;
      judgefunc.(s.x)= TRUE by A6,A2,A1;
      then (judgefunc*s).java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
then A9:judgefunc*s.x in TRUE} by TARSKI:def 1;
      x in dom (judgefunc*s) by A7,A8,FUNCT_1:11;
      hence thesis by A9,FUNCT_1:def 7;
    end;
      xinSupport @ iffev_(x,R).f <> 0.R
  

definition
  let S be set
  s be FinSequence of S,
  A be Subset of dom s;
  func extract(s,A) -> FinSequence of S equals
  s*(canFS(A));
  coherence
  proof
    A1: rng (s*    proof
    rng (canFS(A)) java.lang.StringIndexOutOfBoundsException: Range [0, 20) out of bounds for length 12
    s*(canFS(A)) is       (xR.=@.x by Def20;
    hence thesis by A1      hence thesis by A2,:def 4;
  end;
end;

theorem Th11:
  for S be set,
  s be FinSequence of S,
  A be Subset of (dom s) holds
  len extract(s,A) = card A &
for i  Natsti extract(A holds
  (extract(s,A)).i=s.((canFS(A)).i)
  proof
    let ev_(xR).f =@. by Def20;
    s be FinSequence of S,
    A be Subset of (dom s);
    rng (canFS A hence  A3,OLYNOM1:def 4;
    len (extract(s,A)) = len(canFS A) by    ;
    .= card A by FINSEQ_1:93;
    hence thesis by FUNCT_1:12;
  end;

theorem end
  for S be non empty
  java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
  A be Subset of (dom s)   proof
  f be Function st f=canFS(A)
extractA)f"=s|A
  proof
    let S be      thus Supporev_iota(f)c=Support @java.lang.StringIndexOutOfBoundsException: Range [42, 43) out of bounds for length 42
    s be FinSequence of S,
    A be Subset of (dom s),
    f be Function;
    assume A1: f=canFS(A2:    o in Support ev_i(f;then
    A2:(f)*(f") =id (rng f) by A1,FUNCT_1: reconsider x x=oasElement of X;
    .= id A by A1,FUNCT_2:def 3;
    A3: dom (s|A) = (dom s) /       
    .= dom(s*(id A)) by FUNCT_1:19;
    now let x =(IotaMap(,))xasElement  Free_LMod(X,R)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
      assume A4: x in dom (s|A);
      then A5: x in (dom sr r=ev_(,). as Element ofthe  of ;
reconsider   IotaxR as Element of A5 
      .=(s*(id A)).x by A5,FUNCT_1:20;
    end; then
    A6: s*(id A) = s|A by A3,FUNCT_1:2;
    thus extract(s,A)*f" = s|A Lm20:
  end;

theorem Th13:
  for S be non empty finite set,
  f be S-valued Function,
   be  ofS,BOOLEAN,
  n be set _xR.iota,R) = 1.
  n in trueEVENT(judgefunc*f
  proof
    let S      let R benon  Ring  benon empty , be  of X;
    f be S-valued Function,
    judgefunc be Function of S,BOOLEAN,
    n  set;
    assume A1: n in dom f;
    A2: trueEVENT(judgefunc benon ,X emptyset java.lang.StringIndexOutOfBoundsException: Range [60, 60) out of bounds for length 8
    thus n assume
    f.n inA1 x <>y
    proof
      assume A3: n in trueEVENT(judgefunc*f)     (x,)(ota(,))=@Iota(,R)xby 
      then      = .R by ,;
      then A4      thesis;
      judgefunc.(f.n
      then A5:judgefunc.(f.n) in {TRUE} by java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 0
      fn fby ,2FUNCT_1: ;
      then f.n in S;
      then f.n in dom judgefunc  let s  thecarrier   java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
      A2    being Nat stj  domzholds z.= Fj;
    end;
:fn (judgefunc);
    A7:f.n in dom judgefunc &
    judgefunc.(f.n) in {TRUE} by A6,FUNCT_1:def 7      it1,it2  of the carrier  R such that
    A8:(judgefunc*f).n in {TRUE} by A3:  dom  =dom s and
    n A4:fori being Nat  iindoms holds .i=ev_(x,.s/i 
    hence thesis by A8,FUNCT_1:def 7;
  ;

Th14:
  for S be non empty finite set,
f java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 25
  judgefunc be java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
  trueEVENT(java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 7
  proof
    let S be non empty finite set,
    f be S-valued Function,
    judgefunc be Function of S,BOOLEAN;
    A1: trueEVENT(judgefunc*f) is Subset of dom f by Th8;
    for x be object holds
    x in f"(trueEVENT(judgefunc)) iff x in trueEVENT(judgefunc*f  endjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
proof
      let x be object;
      thus x in f"(    ev_(F,x) = (ev_(F|N0,x))(R(.F))>
      
        assume x in f"(trueEVENT(judgefunc));thenletN0be Nat,F be FinSequence b Elementof 
        x in dom f & f.x in trueEVENT(judgefunc) by java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 47
        hence thesis by Th13;
      end;
      assume A2: x in trueEVENT(judgefunc*f);
      .x in trueEVENT(judgefunc)by Th13,A2,A1;
      hence thesis by A1,A2,FUNCT_1:def 7;
    end;
    ence  byTARSKI:2;
  end;

theorem Th15:
  for S be non empty finite ,
  D be EqSampleSpaces of S,
  s be Element ofA,def;then
      (|by:6;
  ex A be Subset of dom freqSEQ(s)
  st A= trueEVENT(judgefunc*canFS(S)) &
  card (trueEVENT(judgefunc*s)) = Sum extract(freqSEQ(s),A)
  proof
    let S be non empty finite set,
    D be EqSampleSpaces of S,
     be Element of D,
    judgefunc be Function of S,BOOLEAN;
    len canFS(S) = card S by FINSEQ_1:93; A7:   len (ev_(F|N0,x)^<*ev_(x,R).(F/.(len F))
    A1:om (S = Seg (card S) by FINSEQ_1::def 3;
    A2: trueEVENT(judgefunc*canFS(S)) is Event of dom canFS(S) by Th8;
    reconsider A= trueEVENT(judgefunc*canFS(S))
as  of dom ()  A1,Ddef;
    A3: len extract(freqSEQ(s
    set L=extract( let  java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
    A4: dom L = Seg (card A) by A3,FINSEQ_1         /N0}by;
 P,object]means 
    st z=(canFS(S)).((canFS(A)).$1) & $2 = event_pick(z,s);
    len (canFS(A))= cardsuppose
    then A5 dom (canFS(A))=Segcard () byFINSEQ_1:def 3;
A6: for x,y1,y2 be object
    st x in dom L & P[x,y1] & P[x,y2] holds y1 = y2;
A7: for x be A12:        k indom(|N0)byA4,INSEQ_1:def ; 
    proof
      let x be object;
      assume xin dom L;
      then A8:x in Seg (card (A)) by A3,A15:        (F|N0)/.k = (F|Seg N0).k by A12,PARTFUN1:def 6
      set z= (canFS             = F.  ,FUNCT_1:.= F/.k  A2,11,10,ARTFUN1:def 6;
      rng (anFS )= byFUNCT_2def3 
      A9: (canFS A).x in A by A5,A8,FUNCT_1: =(v_|N0,x)).k by A13,FINSEQ_1:def 7
      rng (canFS S)=S by FUNCT_2:def 3;
      then reconsider z as Element of S by A9,A2,            =ev_(x,)(/.k)by,A12Def23
               = ev_Fx.k by Def23,A8,A2;
      A10: y=event_pick(z,s);
      take y;
      thus thesis by A10;
    end;
    consider G be Function such that
    A11:dom G = dom L & for x be object st x in dom          end;
    holds P[x           k in{N0+1}; then
    A12: for a,b be set st
    a in dom G & b in dom G & a<>b holds G.a misses G.b
    proof
      let a,b be set;
      assume A13: a in dom G & b in dom G & a<>b; then
& b indomcanFSA))
      by A3,A5,A11,FINSEQ_1:def 3;
      rng (canFS(A))=A by FUNCT_2:def 3; then
      A15: (canFS(A)).a in A & (canFS(             hence  by A1,Def23,A2FINSEQ_1:4,A16;
      (canFS(A)).a <> (canFS(A)).b by A14,A13,FUNCT_1:def 4; then
      A16: (canFS(S)).((canFS(A)).a)
      <>(canFS(S)).((canFS(A)).b) by A15,A2,FUNCT_1:def 4;java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 42
      consider za be   for F be FinSequence of  ofFree_LMod(X,R), x be ElementofX
      A17: za=(canFS(S)).((canFS(A)).a) &
      G.a=event_pick(za,s) by A11,A13;
      considerzb beElement of S such that
      A18: zb=(canFS(S)).((canFS(A)).b) &
      G.b=event_pick(zb,s) by A11,A13;
      thus thesis by A17,A18,A16,    let F be  of the carrier of Free_LMod(X,R), x be Element of X;
    end;
    A19: for i be Nat st i in dom G holds
    G.i  finite & .i =card (.)
    proof
      let i be Nat;
      assume A20: i in dom G;
      thenzi be   S
      such that A21: zi=(canFS(S)).((canFS(A)).i) &
      G.i=event_pick(zi,s) by A11;
      A22:iin dom(canFS(A)) by A3A5A11A20,FINSEQ_1: 3;
      rng (canFS(A))=A by FUNCT_2:def 3; then
      A23: (canFS(A)).i in A by A22,FUNCT_1:3; then
      A24: (canFS(A)).i in Seg (card (S)) by A2,java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 38
      A25: (canFS(A)).i in dom ( FDprobSEQ(s)) by           =dom by d java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
      L.i =(freqSEQ(s)).((canFS(A)).i) by A20,A11,Th11
      .= (len.= Seglen,)by:def ;then
      .= (len s)*FDprobability((canFS(S)).((canFS(A)).i),s)
      by A25Dd 3
      .= card (G.i) by A21,XCMPLX_1:87;
      hence thesis;
    end;
    for a,b be object st a<>b      ;
    
      let a,b be object;
      assume A26: a<>b;
      lenF=kimpliesev_x,R).(Sum F)=Sum(v_(F,)
        suppose a in dom G & b in dom G;
          hence thesis by A12,A26;
        end
        suppose not a in dom G;
          then G.          defpred P[on  Nat]means
          hence thesis by XBOOLE_1:65;
        end;
        suppose a in dom G & not b in dom G;
          then G.b={} by FUNCT_1:def 2;
          hencethesisby XBOOLE_1:65;
        end;
    end; then
    A27: G is disjoint_valued by PROB_2:def 2;
    for X be set st X in rngA4:      [1]
    proof
      let X be set;
      assume X in rng G;
      then consider j be object such that
     :  indom G&X=.jby FUNCT_1:def 3
      consider zj be Element of S such that
event_pick(zj,s) by A11,A28;
      zj in trueEVENT(judgefunc)
      proof
        j in dom canFS(A) by A28,A5,A11,A3,FINSEQ_1:def 3;then
        ()). in rng canFS()byFUNCT_1:3;then
        (canFS(A)).j in A by FUNCT_2:def 3;
        hence thesis by Th13,A29,A2;
      end;
      then for x be object st x in {zjA5            F=1 then
      xintrueEVENT(judgefunc) :def 1; then
      s"{zj} c= s"(trueEVENT(judgefunc)) by RELAT_1:143,TARSKI:def 3;
      hence thesis by A28,A29,Th14;
    end; then
   A30 union Gc= trueEVENT(judgefunc*s) by ZFMISC_1:76;
    for x be object st x in trueEVENT(judgefunc*s)
    holds x in union rng G
    proof
      let x be object;
      assume A31: x in trueEVENT(judgefunc*s);
      A32: trueEVENT(              reconsider o = F as   X,R;
      reconsider n=x as Nat by A31;
      A33: s               = <>by,FINSEQ_1: then
      A34A7            F =F1  : = F/  A6,:def 6;
      proofset  =ev_(F,x)1;
        dom judgefunc = S by FUNCT_2:def 1;
        hence thesis;
      end;
      ex m be Nat st m in Seg (card S) & s.n=(canFS S).m
      proof
        s.n in rng canFS(S)&
        ex m be Nat                 then
        & m in Seg card:           1indom(Fx;
      hencethesis;
                    (,  <*o1 >by ,FINSEQ_1:def java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
      consider m be Nat such that
      A35: m in Seg (card S)                 = ev_(x,)(um F)by A7,A9,A10,Def23;
      reconsider D0 =uniform_distribution(S) as EqSampleSpaceshencethesis;
      len (canFS S) = card S by             end;
      A36: m in            hence thesis;
      A37: m in trueEVENT(judgefunc*canFS(S)) by A36,Th13,A33,A35;
      ex k be Nat st k in Seg (card A) & m=(java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 14
      proof
        reconsider m as Element of A by A36,Th13,A33,A35;
        m in rng canFS(A) let  zero java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
        &     X,)
java.lang.StringIndexOutOfBoundsException: Range [10, 8) out of bounds for length 21
endthen
      consider k be Nat such 
A38  Seg cardA m=(anFSA))java.lang.StringIndexOutOfBoundsException: Range [46, 47) out of bounds for length 46
      s.n in {((canFS(S)).((canFS     onsider z being FinSequence such that
      A39:n in s"{((canFS(S)).((canFS(A)).k))}
      by A32,A31,FUNCT_1:def 7;
      consider z be Element of S such that
      A40:z=(canFS(S)).((canFS(A)).k) &
Gk=z)  A38,11,4;
      dom G =Seg (card A) by A11,A3,FINSEQ_1:def 3; then
      G.k c=union rng G by A38from FINSEQ_1:sch 2;
      hence x in union rng G by A39,A40;
    end; then
    trueEVENT(judgefunc*s) c=union rng      java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
    A41: union rng G = trueEVENT(judgefunc*s)
    by A30,XBOOLE_0     
    card Union G = Sum L by A11,A19,A27,DIST_1:17;
    hence thesis by A41;
  end;

theorem Th16:
  for S be          o object;
  D be EqSampleSpaces of S,
  s be Element of D holds
  freqSEQ(s) = (len s) (#) FDprobSEQ(s)
  proof
           consider i be   java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
    D be EqSampleSpaces of S    o=z y :def;
    domreconsider i as  by java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
    A1:domfreqSEQ()=()by :3
    for n be object st n in dom freqSEQx9 =idxseq(f).asof by :11
    holds (freqSEQ(s)).n=(len s)byjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
          bydef;
  end;

theorem Th17:
  for S be end
  D be hence thesis A1;
     ;
  java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 8
  Prob(judgefunc   z1 =len idxseq( 
  proof
A6  for  be  i  dom 
    D be EqSampleSpaces of S,
    s,t be Element of D,
    judgefunc be Function of SA8:forj Nat j dom  holds
    consider A be     z2j=(ev_iota().(idxseq(f).)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
    A1: A= trueEVENT(judgefunc*canFS(S))&
   ((*s))
    Sum extract(freqSEQ(s),A) byfor  stq  z1z1.  .q
    consider Bjava.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 20
    A2: B= trueEVENT(judgefunc*canFS(S))&
    card (trueEVENT(judgefunc*t))=
    Sum extract(freqSEQ(t),B) by Th15;
    consider vbeing FinSequence of S
           reconsider q9 =qasElementof NAT;
    A c= dom freqSEQ       .9=ev_iota().((idxseq )q9) by A6,A10
    A4: A c= Seg (card S) by DIST_1:def 9; then
    A5: A c= dom FDprobSEQ(s) by DIST_1:def 3;
    reconsider A0=A as Subset of            z2.q9byA8,9A10
    reconsiderA1=as Subset of dom (len s(#)DprobSEQ(s)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
    java.lang.StringIndexOutOfBoundsException: Range [5, 1) out of bounds for length 9
    B c= dom freqSEQ(t); then
    A6: B c= Seg (card S) by DIST_1:def 9; then
    A7: B c= dom FDprobSEQ(t) by DIST_1:def 3;
    reconsider B0=B as Subset of dom FDprobSEQ(t) by A6,DIST_1:def 3;
    reconsider B1=B as Subset of dom ((len t)(#)FDprobSEQ(t))
    by A7,VALUED_1:def 5;
    A8: v,s -are_prob_equivalent by A3,DIST_1:7;
    v,t -are_prob_equivalent by A3,DIST_1:7; then
    A9: FDprobSEQ(s) = FDprobSEQ(t) by DIST_1:10,A8,DIST_1:6;
    A10: freqSEQ(s) =(len s)(#) FDprobSEQ(s) by Th16;
    A11: freqSEQ(t) =(len t)(#) FDprobSEQ(t) by Th16;
    A12: extract(((len s)* FDprobSEQ(s)),A1)
    = (len s)* (extract(( FDprobSEQ(s)),A0))
    proof
      len extract((len s)*FDprobSEQ(s),A1) =card A1 by Th11;
      then A13:dom extract((len s)*FDprobSEQ(s),A1) =Seg(card A)
      by FINSEQ_1:def 3;
      len extract(( FDprobSEQ(s)),A0) =card A0 by Th11;
      then A14:
      dom extract((len s)*FDprobSEQ(s),A1)
      extractFDprobSEQ(),0)by A13,FINSEQ_1: 3;
      for c be object st c in dom extract((len s)*FDprobSEQ(s),A1) holds
      (java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
      =(len s)*(extract(FDprobSEQ(s),A0)).c
      proof
        let c be object;
        assume A15:c in dom extract((len s)*FDprobSEQ(s),A1); then
        A16:
(extract((len )FDprobSEQ(s)A1))c
        =((len s)*FDprobSEQ(s)).((canFS(A1)).c) by Th11
        .=(freqSEQ     et be  of Free_LMod(R,x be  ofX
        len canFS(A) = card A by FINSEQ_1     assume
        A17: dom canFSA1:not in @f;
        ((canFSA2   f=Seg len F_idxseqf FINSEQ_13
        then A18:((canFS(A)).c) in A by       len idxseqfbyDef24
(extract(FDprobSEQ(s,A0).
        =(FDprobSEQ(s)).((canFS(A))A3  ev_()x = dom f ;
        hence  i beNatstiin dom ev_(_()) holds
      end;
      hence thesis by A14,VALUED_1:def 5;
    end;
    A19: extract(((len t)* FDprobSEQ(t)),B1)
    = (len t)* (extract(( FDprobSEQ(t)),B0)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 20
    proof
( t*FDprobSEQ((t)B) card B1 by Th11;
      then A20:dom extract((len t)*FDprobSEQ(t),B1) =Seg(card B)
      by FINSEQ_1:def 3;
      len extract(( FDprobSEQ(t)),B0) =card B0 by Th11;
      then A21:
      dom extract((len t)*FDprobSEQ(t),B1)
omextract(FDprobSEQ((t),B0  A20,INSEQ_1:def ,   ,;
      for c be     .  @.x by ;
      (extract((len t)*A10:   [r,u] in [:the carrierfs_Funcs(,R]java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
      =(len _LMULT(X,).(,u by  
      proof
               letc  ;
        assume A22:c in dom extract((len t)*       L(XR.(r,). A10,49.= r*(@.x  Def7
        :(((en )*(t),).java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
        =((len t)*FDprobSEQ(        x,.))java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 57
.=(t).((B).c by DIST_1:14;
        len canFS(B) = card B by FINSEQ_1:93; then
        A24: dom canFS(B) = Seg (card B) by FINSEQ_1:def 3;
        ((canFS(B)).c) in rng (canFS(B)) by A24,A22,A20,FUNCT_1:3;
        then A25:
        ((canFS(B)).c) in B by FUNCT_2:def 3;
        (       . .by ,Def20
        =(len t)*((FDprobSEQ(t)).((canFS       thesisjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
        .()(canFSB)) ,DIST_1def9;
        hence thesis by A23;
      end;
      hence thesis by A21,VALUED_1:def 5;
    end;
    A26: card (trueEVENT(judgefunc*s))
    = (len s) * Sum extract=@java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 39
     endjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
    = (len t) * Sum extract((FDprobSEQ(t))    fbeElement Free_LMod(X,)x be X x  f
    thus
    Prob(judgefunc,s) = Sum extract((FDprobSEQ(s)),A0) by A26,XCMPLX_1:89
exstx= canFS(@f)k   indom canFS S@)&


definition
  let S be non  let  beElement of (X,R) beElementof ;
   be EqSampleSpaces of ,
  judgefunc be Function of S,     rng canFS Support @f = Support by FUNCT_2: 3; then
  func (D - means 
  for s be Element of        .= fs_LMULT(X,R)(u)by ;then
  
  
    set s =  F_idxseq)).= R.(java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 72
    take Prob(judgefunc,s);
    thus thesis by Th17;
end;
  uniqueness
  proof
    let,  java.lang.StringIndexOutOfBoundsException: Range [20, 21) out of bounds for length 20
            thesis;
    $1 = Prob(judgefunc,s);
    assume A1: P[a];
    assume A2: P[b];
    now let s be Element of D;
      (a = Prob(judgefunc,s)&b=Prob(judgefunc,s)) by A1,A2;
      hence thesis;
    end;
    hencethesis;
  end;
end;

theorem Th18:
  for  take ;
  s be Element of     thus thesis b A4A;
  judgefunc    ;
  Coim(judgefunc*s,TRUE) in bool (dom s)
  proof
    S nonempty finite java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
    s beElement of S,
    judgefunc be Function of S,BOOLEAN;
    reconsider s0=s as FinSequence of S;
    rng s0 c= S;
    then rng s0 c=@um(_dxseq()))x
    then A1:   proof
    for x be object st x in Coim(     let f be Element of Free_LMod(X,R), Elementof X;
    x in     assume
    then
    Coim(judgefunc*s,TRUE) c=A1:  x  Support @f;
    hence thesis;
  end;

definition
  let S be set,
  SS be Subset of S;
  func MembershipDecision(SS - Function S,BOOLEAN equals
  chi(SS,S);
  coherence by MARGREL1:def 11;
end;

theorem
for S   empty  ,
  BS be Subset of S holds
  ex judgefunc be Function of S,BOOLEAN st
  Coim(A4:  dom ev_(F_idxseqf),x  f by 
  proofA5   dom ((,)by,,Def23;
    let S be non empty finite set,
   BS  Subsetof ;
    reconsider f = chi(BS,S) as Function of     (java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 31
A1: dom f = S by FUNCT_2:def 1;
A2:forxbe object holdsx    x inTRUE)
    proof
      let x be object;
      A3 x in  impliesf.xin{RUE}
      proof
        assume A4p(canFS (upport@f)iin rng canFS (Support @) by FUNCT_1:3java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
        .x =TRUE  A4FUNCT_3:ef 3;
        hence thesis by TARSKI:def 1;
      end;
      f.x in {TRUE} implies x in BS
      proof
        .x{}
        f.x=TRUE by TARSKI:def 1;
hencethesis  FUNCT_3:36;
      end;
      hence thesis by A3,A1,FUNCT_1:def 7;
    end;
    take f;
    thus TARSKI2java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
end;

theorem
f S   empty ,
  s be Element of S*,
  f be Function of S,BOOLEAN,
  F be SigmaField of (       .= fs_LMULT(X,R).(r) by Def19; then
  holds Coim(f*s,java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 11

Lm2:
  for p,q be boolean-valued Function,
        0. by A10;
  (p 'or' q).x = TRUE iff
  p.x = TRUE or q.x =TRUE
  proof
    let p,q be boolean-valued Function,
     be set;
    assume A1:x in dom p /\ dom q;
    A2:x in dom (p 'or' q) by A1,BVFUNC_1:def 2;
    then
    A3:( '' q).x = (p.)''(q.x)by BVFUNC_1  
ebyassume(p 'or q)x= TRUE; then
      (p.x) '(),)k=f.x  ,java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
      'not' (p     Sum Fidxseq(,x)=ev_(x,)SumF_idxseq(f)by Th11
      hence     =(@Sum((f)).x by Def20;
    end;
     .x=TRUE or q =TRUE;
    hence (p 'or' q).x =TRUE by A3;
  end;   java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7

  Lm3:
  for p,q be boolean-valued Function,
  x be set st x in domtheorem Th15:
  (p '&' q).x = TRUE iff
  p.x = TRUE lement of Free_LModX,R)holdsf=Sum(F_idxseq(f)
  proof
    let p,q be boolean-valued Function,
    x      letf be Element of Free_LMod(X,R);
    assume A1:x in dom p /\ dom q;
    x in dom (p '&' q) by A1,MARGREL1:def 18;
    then (p '&' q).x = (p.x) '&' (q.x) by MARGREL1:def 18;
    hence thesis by MARGREL1:12;
  end;

  Lm4:
  for p be boolean-valued Function,
  x set  x indomp holds
  ( 'not' p).x = TRUE iff p.       java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 44
  proof
    let p be boolean-valued Function,
    x be set;
    assume x in dom p; then
    ('not' p).x = 'not' (p.x) by MARGREL1:def 17;
    hence thesis;
  end;

theorem Th21:
  for S be non empty finite set,
  s be Element of S*,
 Sjava.lang.StringIndexOutOfBoundsException: Range [30, 31) out of bounds for length 30
holds Coim(f''g*,TRUE =Coim fs,TRUE)\ (*,TRUE)
  proof
    let be non empty  set,
    s be Element of S*,
    f,g be Function java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 13
    A1: now let xLm23:
      >0R;
A3xin dom ((f 'or' g))
    iff x in (dom f /\ dom g) by BVFUNC_1:def 2;
    A4:x in (f 'or' g)"{TRUE}      java.lang.StringIndexOutOfBoundsException: Range [11, 12) out of bounds for length 11
    & (f 'or' g).x in {TRUE} by FUNCT_1:def 7;
    x in dom ((f 'or' g)) & (f 'or' g).x =TRUE iff
         reconsider x1  asElement of X;
    xA3:    (*(,)x1=r@Iota(x,)x1  Th7;
    per cases;
    x in (f 'or' g)"{java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 17

    xA4: @ ={}by:
    or x in g"{TRUE} by  reconsider    as Element of by A4,ZFMISC_131
     take java.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12
    by XBOOLE_0:def 3;
  endjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
  thus Coim(f 'or' g)*s,TRUE)=s"( '' g"TRUE)byRELAT_1:146
  .=  proof
  .= s" (f"{TRUE}) \/s"ofX f be Element Free_LMod(,;
  .= (f*s)"{TRUE} \/s"(g"{TRUE}) by RELAT_1:146
  .= Coim (f*s,TRUE) \/ Coim(g*s,TRUE) by RELAT_1:146;
end;

theorem Th22:
  for S be non empty finite set,
  s be Element of S*,
         be Element of such
  holds Coim((f '&' g)*s,java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
  proof
    let S be non empty finite set len (f)=  A2,m25;
    s be Element of S*,
    f,g be Function of S,BOOLEAN;
    A1: now let x be object;
    : dom f = S & dom g = S by FUNCT_2:ef java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
    A3:x in dom ((f '&' g))
    iff xin(dom f/ dom )by : java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
A4x ( & "TRUE}iff in (f & )
    & (f '&' g).x in:)1  ev_iota(f)(f)1 by A6,Def24
    x in dom ((f '&' g))
    &(''g.x=iff
    x in (dom f /\ dom g) & (       = @x*((R. byA4, 
    x ( ''){  ((x in dom f ) & (f.x in {TRUE}))
    & ((x in dom g ) & (g.x = TRUE)) by A4,A2,TARSKI       
    x in (& "T iffxin f"T}
    & ((x in dom g ) & (g.x in { hencethesis RLVECT_1:44,A8,Def24,;
    by FUNCT_1:def 7,TARSKI:def 1; then

    & xTh16:
    hence x in (for ,   Free_LMod(R
    by XBOOLE_0:def 4;
  end;
  A5:s  upport @f+)=(@)\/(@)
  for x be object st x in s" (f"{TRUE})    proof
  x       gbeElement  Free_LModXR;
  proof
    let x be object;
    assume A6:x in s" (f"{TRUE}) /\ s"(g"{TRUE});
    assume A7: not x in s"(f"{TRUE} /\ g"{TRUE});
    x in s"(f"{TRUE}) & x      thus Support@f) = Support f /Support @)
    A8java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
    by FUNCT_1:def  assume
    then reconsider s. asElementof S;
    not y in (f"{TRUE} /\ g"{TRUE}) by A7,A8,FUNCT_1:def 7;
    hence contradiction by A8,XBOOLE_0:def 4;
  end;
  then
  A9:sp
  c= s"(f"{TRUE} /\ g"{          assume not (x inSupport@)\ (Support @) then
  thus Coim((f '&' g)*s,TRUE)notx in Supportf  x  Support@ XBOOLE_0def 3
          then
  .= s" (f"{TRUE}) /\ s"(g"{TRUE}) by A9A:@.x  .  gx=0. byPOLYNOM1def ;
  .= (f*s)"{TRUE} /\ s"(          @(f+g).x = @f.x(f+)x= @. = 0R java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
  .= Coim (f*s,TRUE) /\ Coim(g*s,TRUE)        hence;
end;

l obe;
  for S be non empty finite set,
  s be Element of S*,
      
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
  proof
    let S be non empty finite set,
    s be Element of S*,
    f be Function of S,BOOLEAN;
A1: now A8:       @f+)x=@f.  gxbyTh8;
    A2 not  inSupport@ A1,7,BOOLE_0d ;then
    A3:x in           gx . by:def ;then
    iff x  domMARGREL1d17
    A4:x in ('not' f)"{TRUE} iff x in dom ('not' f )
    & ('not' f).x            thesis A8POLYNOM1:ef4;
    x in dom ('not' f)
    & ('not' f).x =TRUE iff
    x in dom f & not (f.x = TRUE) by Lm4,A3,A2;
    then
    x in ('not' f)"{TRUE} iff x in dom f &
    not  x in f&f. in{java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 57
    then
    xnotx in Support @ by A1,,XBOOLE_0:def 4; then
    by FUNCT_1:def 7;
    hence x in ( 'not' f)"{TRUE} iff x in (dom f \ f"{TRUE})
    by XBOOLE_0:def 5;
  nd
  dom f = S by FUNCT_2:def 0< fx + gx A10,POLYNOM1:
  A5: (rng          hence  by ,POLYNOM1def 4;
  s"(dom f)= s"((rng s) /\ (dom f)) by RELAT_1:133;
  then A6: s"(dom f) = dom s by A5,RELAT_1:134;
  thus Coim(('not' f)*s,TRUE)
  = s"(('not' f)"{TRUE}) by RELAT_1:146
  .= s"(dom f \ f"{TRUE} ) by A1,TARSKI:2
  .= s" (dom f ) \ s"(f"{TRUE}) by FUNCT_1 reserve  for Function of ,the of N
  .= (dom s) \ Coim(f*s,TRUE) by A6,RELAT_1:146;
java.lang.StringIndexOutOfBoundsException: Range [37, 3) out of bounds for length 37

theorem Th24forxbeing Elementx=(f.x *(x)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
  for S be non empty finite set,
  D be EqSampleSpaces of S,
  s Element of ,
  f,g be Function of S,BOOLEAN
  holds Prob((f 'or' g),s) =
  card (trueEVENT(f*s) \/ trueEVENT(g*s))/(len s)
  proof
    let S  empty finite setjava.lang.StringIndexOutOfBoundsException: Range [34, 35) out of bounds for length 34
    D be EqSampleSpaces of S,
    ent of D,
    f,g be Function of S,BOOLEAN;
    A1: s is Element of S* by FINSEQ_1:def 11;
    trueEVENT((f 'or' g)*s)=Coim((f 'or' g)*s,TRUE)
    .= Coim (f*s,TRUE) \/ Coim (g*s,TRUE) by Th21,A1
    .= trueEVENT(f*s) \/ trueEVENT(g*slet carrier ofN
    ence thesisjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
;

theorem coherencejava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
  for
  D be EqSampleSpaces of S,
  s be Element of D,
  f,g be Function of S,BOOLEAN
  holds Prob((f '&' g),s) =
  (f*s) /\ trueEVENT(g*s))/(len s)
  proof
    let S be non empty finite set,
    D be EqSampleSpaces of S,
    s be Element of D,
    f,g be Function of S,BOOLEAN;
    A1: s is Element of S* by FINSEQ_1:def 11;
s) Coim(f''g)s,)
    .= Coim (f*s,TRUE) /\ Coim(g*s = (fx vx byDef28;
    .= trueEVENT(f*s) /\ trueEVENT(g*s);
    hence thesis;
  end;

theorem Th26:
  for S be non emptylet be BinOp of;
  Dlet,be  ofX;
  s be Element of D,assume java.lang.StringIndexOutOfBoundsException: Range [16, 17) out of bounds for length 16
f Function ofSBOOLEAN
  holds Prob(('not' f),s) = 1 - Prob(f,s)
  proofA5:  dom(t1|B  dom t1 ;
    A6:dom (t2| = dom t2 /\BbyRELAT_1:1
    D be EqSampleSpaces of S,
    s be Element of D,
    f be Function of S,BOOLEAN;
    A1: s is Element of S* by FINSEQ_1:def 11;
    reconsider s0 = dom s as finite set;
       CfS =Coim(*,TRUE
    card Seg len s = len s by FINSEQ_1:57; then
    A2: card s0 = len s byt1|B = t2|java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
A3:Coim(sTRUE)in bool dom) byA1Th18;
    trueEVENT(('not' f)*s)=Coim(( 'not' f)*s,TRUE)
    .=dom s \ Coim (f*s,TRUE) by A1,Th23; then
    A4: card(trueEVENT(('not' f)*s))
    =card(s0) - card(CfS) by A3,CARD_2:44;
    thus Prob(('not' f),s) = card(s0)/(len s)
     card()(sA4X:120
    .=1-Prob(f,s) by A2,XCMPLX_1:60;
  end;

Th27java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
  for   finite ,
  D be EqSampleSpaces of S,
  gbe Functionof,holds
  Prob((f ';
  = Prob(f,D) + Prob(ghence thesisby,;
  proof
    let S be non empty finite set,
    D be S
    f,g be Function of S,BOOLEAN;
    set s = the Element of D;
    card (trueEVENT(f*s) \/ trueEVENT(g*s)) =
    card (trueEVENT(f*s))+ card(   let R be non degenerated Ring, X be non ;
    -card (  let f be Element of f beElement Free_LMod(R;
    Prob((f 'or' g),s) = (card (trueEVENT(f*s))+ card( trueEVENTfunc (f) ->Element  X 
    -card (trueEVENT(f*s)S @f;
    . coherence by FINSUB_1:ef ;
    - (card (trueEVENT(f*s) /\ trueEVENT(g*s)))/(len s) by XCMPLX_1:124
    .= Prob(f,s) + Prob(g,s) - Prob((f '&' g),s) by Th25
    .= Prob(f,D) + Prob(g,s) - Prob((f '&' g),s) by Def6
    .= Prob(f,D) + Prob(g,D) - ::$INSERT we define the induced homomorphism $\Phi(v):\mathrm{FS\_Funcs}(X,R)\to N$.
    .= Prob(f,D  etR  non degenerated Ring, X be non empty set, N be LeftMod of R;
    hence thesis  let v  FunctionofX,the  of java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
  end;

theorem
  for S be non empty finite set,
  D be EqSampleSpaces of S,
  unctionofSB
  holds Prob(('not' f),D) = 1 - Prob(f,D)
  proof
    let S be non empty it.f = PhiSet(v,f,SuppFin);
    D be EqSampleSpaces of S,
    f be Function of S,BOOLEAN;
    set s = the Element of D;
    thus Prob(('not' f),D)= Prob proof
    .= 1    deffunc F(Element ofFree_LMod(XR)=PhiSet(,1SuppFin(1)
    . 1- Prob(f,D) by Def6;
  java.lang.StringIndexOutOfBoundsException: Range [11, 12) out of bounds for length 6

theorem Th29:

for S be non empty finite set,
  D be EqSampleSpaces of S,
  f be Function of S, BOOLEAN
  stuniqueness
  holds Prob  
  proof
    let S be non empty finite set,
    D be EqSampleSpaces of S,
    f be Function of S, BOOLEAN;
    assume A1: f = chi(S,S);
java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 29
    reconsider s0 = dom s as finite set;
    reconsider CfS = Coimh1f=PhiSet(v,SuppFinf) byA2
    card Seg len s = len s by java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 20
    then
    A2: card s0 = len s by FINSEQ_1:def 3;
    ;
    A4: s is Function of ;
    A5: f is Function of dom f,rng f by FUNCT_2:1;
    S c= S;
    then
    A6: f is Function of dom f,{TRUE} by A5,A1,INTEGRA1:17;
    A7 dom f =S by def 1java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
    A8:trueEVENT(f*s) = s"(trueEVENT(f)) by Th14
    .    (Phiv).(Iota(,R) =.x
    .=dom s java.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 7
    thus Prob(f,D) = Prob(f,s) by Def6
    .=1 by A2,A8,XCMPLX_1:60;
  end;

theorem Th30:
  for S be non empty finite set,
  D be EqSampleSpaces of S,
  f be Function ofv.x)byTh17
    =1.R *(. Def17
  proof
    let S be non empty finite set,
    D java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 6
    f be Function of S,BOOLEAN;
    set s = the Element of D;
    Prob(f,D) = Prob(f,s)  forRnon degenerated Ring,X benon set ofR
    .= card (trueEVENT(f*s))/(len s)      v  Function  X,the  of ,f Element of Free_LMod(,Rjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
    hence 0 <= Prob(f+holds (Phijava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
  end;

theorem Th31:
  for S be non empty finite set,
  A,B be set,
  f,g be Function of S,BOOLEAN
  st A c= S & B c= S & f = chi(A,S) & g = chi(B,S)
or g
  proof
    let S be non empty finite set,
    A,B be set,
    f,g be Function of S,BOOLEAN;
    assume A1:
    A c= S & B c= S & f = chi(A,S) & g = chi(B,S);
    A2: dom chiA2:forx be Element Xstx Bf thx= .
    A3: dom chi(A,S) = S by FUNCT_3:def 3;
    A4:     proof
    A5: dom (f 'or' g)= dom f /\ dom g by        xjava.lang.StringIndexOutOfBoundsException: Range [15, 13) out of bounds for length 29
    .= S by A1:not in @ XBOOLE_03
    now let x be objectthx  @fg.)*(.) Def28
      assume A6: x .= (@f.x + @g.x  vx byTh8
              @x  R  vx A4,POLYNOM1:4
      per cases;
        suppose A8: (f 'or' g).x = TRUE;
          then chi(A,S).x =1 or chi(B,S).x =1 by A1,Lm2,A7;
          A5:for  of st xinBgholdsth.x  tg.
          then x in A\/ B by XBOOLE_0:defproof
          hence       letx  Element of X;
        end x in ;then
        suppose A9:A7:notxin @fby A1,XBOOLE_0:;
          A10: (f 'or' g).x = FALSE by A9,XBOOLEAN:def 3;
          not (chi(A,S).x =1) & not (chi(B,S).x =1) by A1,A9,Lm2,A7;
          then not (x in A) & not ( x in B) by A6,FUNCT_3:def 3;
          then not x in A\/ B by XBOOLE_0:def 3;
          hence chi((A\/ B),S).x = (f 'or' g).x by A10,A6,FUNCT_3:def 3;
        end;
    ;
    hence thesis by A2,A5,FUNCT_1:2(Phi()(+g)
  ;

theorem Th32:
  for S be non empty finite set,
  D be EqSampleSpaces of S,
 ABbe java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
fg  Function of,BOOLEAN
  st A c= S & B c= S & A misses B & java.lang.StringIndexOutOfBoundsException: Range [0, 37) out of bounds for length 27
  holds Prob(f '&' g,D) = 0
  proof
    let S be non empty finiteA5:C=B / by A1XBOOLE_1:;
      of java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
    A,B be set,
    f,g be Function of S,BOOLEAN;
    assume A1: A c= S & B c= S & A misses B C=B A1,BOOLE_1:37;
    set s = the Element of D;
    A2:Prob(f '&' g,D) = Prob(f '&' g,s) by Def6
    .= card (trueEVENT(f*s) /\ trueEVENT(g*s))/(len s) by Th25;
    trueEVENT(f*s) hence thesis;
    proof
      assume trueEVENT(f*s) /\ trueEVENT(g*s) <> {};
      then consider x be object such that
      A3: x in trueEVENT(f*s) /\ trueEVENT(g*sA9:tD = {0.N}
      A4:trueEVENT(f*s) = s"(trueEVENT(f)) by Th14
      .=s"(f"{TRUE});
           t.D={.}
      .=s"(g"{TRUE});
      x in s"(f"{TRUE}) & x in s"(g"{TRUE}) by A4,A5,A3,XBOOLE_0:def 4;
      then x assumeint.: 
      by FUNCT_1:def 7;
      then f.(s.x) in {1} & g.(s.x) in {1} by FUNCT_1:def 7;
      then f.(s.x) = 1 & g.(s.x) = 1 by TARSKI:def 1;
      then .x A&s. inBbyA1,36;
      then s.x in A /\ B by XBOOLE_0:def 4;
      hence contradiction by A1,XBOOLE_0:def 7;
    end;
    hence thesis by A2;
  end;

definition
  let S be non empty finite set,
  D be EqSampleSpaces of S;
  mode Probability of D -> Function of Funcs(S,BOOLEAN), REAL means
  for judgefunc be Element of Funcs(S,BOOLEAN) holds
  it.judgefunc = Prob(judgefunc,D);
  existence
  proof
    deffunc FA14:        isSubset of  by FINSUB_1:16;
    N), REALsuch 
A1: for x being Element of Funcs(S,BOOLEAN)
    holds f.x = F(x) from FUNCT_2:sch 4;
    take f;
     ofS);
    f.x = In(Prob(x,D),REAL) by A1    Element  Xholds TermFS(f,
    hence thesis. @f.)*(.x  @.*vx byd15
  end;
end;


Lm5:
 nonempty finiteset,
D be EqSampleSpaces of S holds
ex EP be Probability of Trivial-SigmaField (S)
st for x be set st x in Trivial-SigmaField (S) holds
ex ch be Function of S,BOOLEAN
st ch = chi(x,S) & EP.x =Prob(ch,D)
proof
  let S be non empty finite set,
  D be EqSampleSpaces of S;
  defpred F[object,object] means
   ex D1 being set, ch be Function of S,BOOLEAN
) &$2=(ch,D);
  java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
  assume
  x in Trivial       letxbe Element of X
  reconsider xx=x as       .x =TermFS(,v).x + TermFS(g,v).x by Lm31
  reconsider ch = (xx,S)as,by MARGREL1:def 
P(,)REAL bydef;
  hence ex y be object st y in REAL & F[x,y];
end;
consider EP be Function of Trivial-SigmaField (S),REAL such that
A2: for x be java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 21

p
 \ B)=EP.A  EP.B
java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
  let A,B be Event of Trivial-SigmaField (S);
  assume
  A4: A misses notxbyXBOOLE_0:ef 5;
  F[A,EP.A] by A2;
  then consider chA be Function of S,BOOLEAN such that
 :chA
  F[B,EP.B] by A2;
  then consider chB be Function       
  A6: chB           be Elementof java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
  F[A\/B, hencethesis Lm29;
  then consider chAB be Function of S,BOOLEAN such that
  A7: chAB = chi((A\/ B),S) & EP.(A \/ B) = Prob(chAB,D);
  A8: chAB = chA 'or' chB by A5,A6,A7,Th31;
  EP(\/)=Prob(D + Prob(D
  - Prob( (chA '&' chB) ,D) by Th27,A7,A8
  .= Prob(chA,D) + Prob(chB,D) - 0 by A5,A6,A4,Th32
  .= EP.A + EP.B by A6,A5;
end;
A9: for A being Event of Trivial-SigmaField (S) holds 0 <= EP.A
proof
  let A be Event Trivial-SigmaField (
  F[A,EP.A] by A2;
  then       be ofR,B  of Fin ;
  A10: chA =      set F = the of ,   TermFS(,)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
  thus thesis by A10,Th30;
end;
A11: for ASeq being SetSequence of Trivial-SigmaField (S) st ASeq is
non-ascending holds EP * ASeq is convergent & lim (EP * ASeq)
= EP.( Intersection ASeq)
proof
  let ASeq being SetSequence of Trivial-SigmaField (S);
  ASeq is -ascending;
  then consider N be Nat such that
  A12: for m be Nat st N<=m holds          = TermFS(a*f,v).xby ;
  by RANDOM_1:15;
  now
    let m be Nat;
assume
    A13: N <= m;
    m in NAT by ORDINAL1:def 12;
    then m     =a* PhiSet(v,,)by;
    hence (EP *hence ;
    .= EPend;
  end;
  hence thesis by PROB_1:1
end;
 F[[#]S,EP.[#]S] by A2;
then consider chS be Function of S,BOOLEAN such that
A14: chS = chi(S,S) & EP      v   ,the of,f be Free_LModX,
 reconsider EP as Probability of Trivial-SigmaField (S)
    by A9,A3,PROB_1:def 8,Th29,A11,A14;
take EP;
let x be set;
 assume x in Trivial-SigmaField (S);
  then F[x,EP.x] by A2;
 hence thesis;


definition
let nonemptyfinite ,
  D be EqSampleSpaces of S;
  func Trivial-Probability (D) -> Probability of Trivial-SigmaField (S) means
  for x be set st x in Trivial-SigmaField (S) holds
  ex ch be Function of S,BOOLEAN
    = chi, &it. Probch,)
  existence by Lm5;
  uniqueness
  proof
    let F,G be Probability of Trivial-SigmaField (S);
    assume
    A1: for A be set st A in Trivial-SigmaField (S) holds
    ex ch be Function of S,BOOLEAN
      chi(,S)  A=(ch,)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
    assume
    A2: for A be set st A in Trivial-SigmaField (S) holds
    ex ch be Function of S,BOOLEAN
       st ch =chi(,S  .A=(ch,);
    now
      let x be object;
      assume A3:x Trivial- (S;
       reconsider X=x as set by TARSKI:1;
      consider ch1 be Function of S,BOOLEAN such that
      A4: ch1 = chi(X,S) & F.x =Prob(ch1,D) by A1,A3;
      consider ch2 be Function of S,BOOLEAN such that
      A5: ch2 = chi(X,S) & G.x =Prob(ch2,D) by A3,A2;
      thus F.x = G.x by A4,A5;
    end;
    hence thesis by FUNCT_2:12;
  end;
end;

begin :: Sampling and Posterior Probability

definition
  let S be non empty finite set,
  D be EqSampleSpaces of S;
  mode sample of D -> Element of S means :Def10:
   ex s being Element of D st it in rng s;
  existence
  proof
    set s = the Element of D;
    1 in dom s by FINSEQ_5:6;
    .=a *PhiSet(,B)by A1,m34
    hence thesis;
  end;
end;

definition
  let  be non empty finite set,
  D be EqSampleSpaces of S,
     end
  func Prob(x) -> Real equals
  Prob(MembershipDecision({x}),D);
  coherence;
end;

theorem
  for S be non empty finite set,
   beEqSampleSpaces of S,xbe sample of java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
  holds Prob(x)= (ProbFinS_of D).(index(x))
  proof
    let S be non empty finite set,
    D be EqSampleSpaces of S, x be sample of D;
    reconsider f = chi({x},S) as Element of Funcs(S,BOOLEAN)
      by FUNCT_2:8,MARGREL1:def 11;
    set s = the Element of D;
java.lang.StringIndexOutOfBoundsException: Range [9, 2) out of bounds for length 43
    proof
      let a be set;
      assume a=x;then
      a in {x} by TARSKI:def 1;
      hence thesis by FUNCT_3:def 3;
    end;
    for a be set holds f.a=TRUE implies a=x
    proof
      let a be set;
      assume f.a=TRUE;then
      a in {x} by FUNCT_3:36;
      hence thesis by TARSKI:def 1;
    end; then
    A2: Prob(f,s) = FDprobability (x,s) by Th10,A1;
    A3: Prob(x) = FDprobability (x,sp0 by A1,FINSEQ_3:25; then
    consider t be FinSequence of S such that
    A4  D  GenProbSEQ().FDprobSEQ () def7java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
    A5:(GenProbSEQ(S)).D=FDprobSEQ (s) by A4,DIST_1:10,Th4;
      reconsider n=x.(anFS())as Nat
    len canFS(S) = card S by FINSEQ_1:93; then
    A6: dom canFS(S) = Seg (card S) by FINSEQ_1:def      .= (k'1  (len p0  k) by A6,,RFINSEQ:def 1
    A7: x in rng canFS(S) by Th3;then
    n in dom canFS(S) by FINSEQ_4:20;then
    A8: n in dom (FDprobSEQ (s)) by A6,DIST_1:def 3;
nxby ,FINSEQ_419;
    hence thesis by A3,A5,A8,DIST_1:def 3;
  end;

definition
l Sbe empty finite set,
  D be EqSampleSpaces of S;
  mode samplingRNG of D -> non empty Subset of S means   :Def12:
  ex x be sample of D st x in it;
  existence
  proof
    set x = the sample of D;
    A1: x in { TARSKI:1
    reconsider X ={x} as non empty Element of (bool S);
    take X;
     thesis ;
  end;
end;

definition
  let S be non empty finite set,
  D be EqSampleSpaces of S, i
  X be samplingRNG of D;
 func Prob(X - Real 
  Prob(MembershipDecision(X),D);
  coherence;
end;

theoremiin   ((-)  ,A6;then
  for S be non empty finite set,
XbeSubset ofS
  s,t be FinSequence of S,
  SD be Subset of dom s,
  x be Subset of X
  st SD = s"X &t = extract(s,SD) holds
  card (s"x) = card (t"x)
  proof
    let S be non empty finite set,
    X be Subset of S,
    s,t be FinSequence of S,
    SD be java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
    x be Subset of X;
    assume A1: SD = s"X &t = extract(,SD)
    reconsider SD as finite set;
set  canFS SD);
    len t = card SD by A1,Th11;then
   :  (ard   FINSEQ_1:3;
    then
    reconsider g= f as            k-< by XREAL_1:30;then
    A3: (canFS            k' <i by A16,18XXREAL_0:2; then
    .= (t*f)"x by RELAT_1:146
    .= (s|SD)"x by A1,Th12
. / s"x  :70
    .= s"x by A1,RELAT_1:143,XBOOLE_1:28; then
    A4: card (s"x) c= card (t"x i-len(p0|(k-'by XREAL_1:50; then
    A5: t"x c= Seg (card SD) by A2,RELAT_1:132;
    lencanFSSD =card SD by FINSEQ_1:93;then
    A6: t"x is Subset of dom (canFS SD) by A5,FINSEQ_1:def 3;
 SD)=id  canFS ) :39;
    f.:(s"x) =(f*(canFS SD)).:(t"x) by A3,RELAT_1:126
    .= t"x byk <   ,XXREAL_02 then
    card (t"x) c= card (s"x) by CARD_1:66;
    hence thesis by A4,XBOOLE_0:def 10;
  end;

theorem Th35:
  for S be non empty finite set,
  X be Subset of S            (len p0) -k in NAT by INT_1:3; then
  s,t be FinSequence of S,
  SD be Subset of dom s,
  x be set
java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
  frequency(x,sA23        dom (/^)=Segs by A7Fdef ;
  proofj=i-(-1  A5,AT_D:FINSEQ_1:;then
    let S be non empty finiteA25:         j +java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
    X be Subset of S,
    s,t             m- = 0 by XREAL_1:;
    SD be Subset of dom s,
              ;
      = sX t=extracts,    X;then
    for a be object st a in {x} holds a in X by TARSKI:def 1;then
    {x} is Subset of X by TARSKI:def 3;
    hence thesis by Th34,A1;
  end;

theorem Th36:
  for S be non empty finite set,

  s be FinSequence of S st s in D holds
  D = Finseq-EQclass(s)
  
    let S bek' =k 1 byA1FINSEQ_3:25,REAL_1:33;then
    D be Element of distribution_familyk  +1by A36;
    s be FinSequence of S;
    assume A1: s in D;
    consider t be FinSequence of S such that
    A2: D = Finseq-EQclass(t) by DIST_1:def 6;
    thus thesis by A2,DIST_1:9,A1,DIST_1:7;
  end;

theorem Th37:
  for S be non empty finite set,
  X be Subset of S,
  s be FinSequence of S holds
  s"X = trueEVENT   Sum =Sum(elp,k,)+p.java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
  proof
    let S be non     p be FinSequence of
    X be Subset of S,
    s be FinSequence of S;
    set SX= s"X;
    reconsiderSX Subset ( s)by RELAT_1132
    dom ((MembershipDecision(X))*s) c= dom s by java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 49
    reconsider SY= trueEVENT((MembershipDecision(X))*s)
    as Subset  dom by XBOOLE_1:;
    consider f be      .= (Sum a + Sum c) +  by41
    =(,S  X) f;
    A2:dom f = S by A1,FUNCT_3:def 3;
    A3:
    for x be object st x in SY holds x in SX
    proof
      let x be object;
      assume A4:x in SY;
      s.x in trueEVENT( f) by A1,Th13,A4;
      then sx  dom&
      f.(s.x) in {TRUE} by FUNCT_1:def 7;
      then s.x in dom f & f.(s.x) = TRUE by TARSKI:def 1;then
.x  XbyA1,UNCT_3:;
      hence thesis by A4,FUNCT_1:def 7;
    end;
    for x be for N be LeftMod R,vbe of ,the   N
    proof
      let x be object;
      assume A5:x in ;
      A6:s. forf1, Homomorphism (d ) N st f1*  &f2*u =
      s   by FUNCT_1def7;hen
      f.(s.x) = TRUE by A1,FUNCT_3:def 3;then
      f.(s.x) in {TRUE} by TARSKI:defend;
      s.x in trueEVENT(f) by A6,A2,FUNCT_1:def 7;
      hence thesis by A1,Th13,A5;
    end;
    hence thesis by A3,TARSKI:2;
  end;

theorem Th38:
  for  bebenonempty  ,
  X be non empty Subset of S,
  D be EqSampleSpaces of S,
  s1,s2 be Element of D,
  t1,t2 be FinSequence of S,
  SD1 be Subset of dom s1,
  SD2 be Subset of dom s2 st
  SD1=s1" t1 =extract(s1,SD1)&
  SD2 = s2"X &t2 = extract(s2,SD2) holds
  t1,t2 -are_prob_equivalent
  proof
    let S be non empty finite set,
    X be non empty Subset of S,
    D be EqSampleSpaces of S,
    s1,s2 be Element of D,
    t1,t2 be FinSequence of S,
    SD1 be Subset of dom s1,
    SD2 be Subset of dom s2;
    assume A1:
    SD1 = s1"X &t1 = extract(s1,SD1) &
    SD2 = s2"X &t2 = extract(s2,SD2);
thenSD1=rueEVENT(()s1) by Th37;
    then A2:rob( (,)
    =(len t1)/(len s1) by Th11,A1;
    SD2=trueEVENT((MembershipDecision(X))*s2) by A1,Th37;
    then A3:Prob( MembershipDecision(X),s2)
    (t2/len ) by Th11,1
    A4: t1={} implies t2={} by A3,A2,Th17;
           (v)*(otaMap(,))x
               Phi().(XR)x  :java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
    proof
      let n,x be set;
      assume A6end;
      assume s1.n in {x};
      then not s1.n in X by A6,TARSKI:def 1;
      hence contradiction by A1,A6,FUNCT_1:def 7;
    end;
    A7:for n,x be set st n in SD2 & not x in X holds not s2.n in {x}
    proof
      let n,x be set;
      assume A8: n in SD2 & not x in X;
      assume s2.n in {x};then
      not s2.n in X by A8,TARSKI:def 1;
      hence contradiction     h  Homomorphism of (d R),Free_LMod,) N;
    end;
    set c = (len t1)/(len s1);
    A9: c =  h(.(XR))=h.(0R  0Free_LMod(,)) :14
    for x be set holds FDprobability (x,t1)=FDprobability (x,t2)
    proof
      let x be set;
      per cases;
        suppose A10: t1 <> {};
          per cases;
            suppose A11:x in X;
              FDprobability (x,s1)=FDprobability (x,s2) by DIST_1:def 4,Th4
              .= frequency(x,s2) / (len s2);then
              frequency(x,t1)/(len s1)
              = frequency(x,s2) / (len s2) by Th35,A1,A11;then
              frequency(x,t1) / (len s1)
              = frequency(x,t2) / (let s be FinSequence of the carrier
              (len t1)* FDprobability (x,t1)/(len s1)
              =frequency(x,t2) / (len s2) by DIST_1:4;then
              (len t1)* FDprobability (x,t1)/(len s1)
              =(len t2)* FDprobability (x,t2)/(len s2) by DIST_1:4;then
              FDprobability (x,t1)*((len t1)/(len s1))
              =FDprobability (x,t2)*(len t2)/(len s2) bytheorem :
               forD, be empty set,  h be Function of D,E,  p be FinSequence of D,
              FDprobability (x,t1)*c
              =FDprobability (x,t2)*c by A9,XCMPLX_1:74;
              hence thesis by A10,XCMPLX_1:5;
            end;
            suppose A12: not x in X;
              not ex i be object st i in t1"{x}
              proof
                let i be object;
                assume A13:i in t1"{x};then
               iindomt1&t1i  x}by def 7
                len t1 =A4: domq  ibyA1,:def3java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
A15domt1=Seg (ard SD1)by FINSEQ_1:def3;
                reconsider     proof
                rng(SD1)c  FINSEQ_1:def 4;
                set NE A7:   Seg len p =dom by :ef3;
                len canFS(SD1) = card SD1 by FINSEQ_1:93;
                 i  domcanFS(SD1)by ,A15FINSEQ_1:ef 3;hen
                A17:NE in rng canFS(SD1) by FUNCT_1:3;
                t1.i= s1.NE by A1,A14,Th11;
                hence contradiction by A14,A17,A16,A5,A12suppose
              end;
  (1x)is   XBOOLE_0:def ;
              then A18: FDprobability (x,t1) = 0;
              not ex i be object st i in t2"{x}
              proof
                 beobject;
                assume A19:i in t2"{x};then
                A20:i in dom t2 & t2.i in {x} by FUNCT_1:def 7;
                len t2 = card SD2 by A1,Th11;then
                A21:dom t2 = Seg (card SD2) by FINSEQ_1:def 3;
                reconsider i as  by A19;
                A22:rng canFS           hence thesis;
                set NE = (canFS(SD2)).i;
                canFS(D2  card  byFINSEQ_1:93java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
                then i in dom        thesis  A6FINSEQ_3
                A23:NE in rng canFS(SD2) by FUNCT_1:3;
                t2.i= s2.NE by A1,A20,Th11;
                hence contradiction by A20,A23,A22,A7,A12;
              Lm39:
              then Coim(t2,x) is empty     being  empty  addLoopStr,
              hence thesis by A18;
            end;
        end;
        suppose t1 ={};
          hence thesis by A4;
        end;
    
    hence thesis;
  end;

definition
ty finite set,
  D be EqSampleSpaces of S,
  X     setz=0.;
  func ConditionalSS(X) -> EqSampleSpaces of S means
  :Def14:
  ex s be Element of D, t be FinSequence of S,
  SD be Subset of dom s
  st SD = s"X & t = extract(s,SD) & t in it;
  existence
  proof
    consider x be sample of D such that A1:x in X by Def12;
    consider s be Element of D
suchA2 inrngsbyDef10;
    consider n being object such that
A3:  n in      h 
  =s.nby , 3;
    reconsider SD =s"X as Subset of dom s by RELAT_1:132;
          let,  nonempty add-associative right_zeroed add-associative right_zeroed right_complementable
    reconsider DX =Finseq-EQclass(t)
    as Element of distribution_family(S) by DIST_1:def 6;
    A5:t in DX;
    n in SD by A3,A4,A1,FUNCT_1      s be  thecarrierofM;
    card SD <> 0;then
    len t <> 0 by Th11;then
    t <> <*>S; then
    not DX={<*>S} by A5,TARSKI:def 1;then
    reconsider DX as EqSampleSpaces of S by Th6;
    take DX;
    thus thesis by A5;
  ;
  uniqueness
  proof
    let DX1,DX2 be EqSampleSpaces of S;
    given s1 be Element of D,
    t1 be FinSequence of S,
    SD1 be   dom s1 such that :
    SD1 = s1"X &t1 = extract(s1,SD1) & t1 in DX1;
    given s2 be Element of D,
     be FinSequence of S,
    SD2 be Subset of dom s2 such that
A7:SD2 = s2"X &t2 = extract(s2,SD2) & t2 in DX2;
    DX1 = Finseq-EQclass(t1A6:for  beNat st []holds [+]
    DX2 = Finseq-proof
    hence thesis by java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 21
  end;
end;

definition
benon emptyset,
  D be EqSampleSpaces :s/.n1  s.(n+1) by FINSEQ_4:15;
  X   of D,
  f be Function of S, BOOLEAN;
  func Prob(f,X) -> Real equals
  Prob(f, ConditionalSS(X));
  coherence;
end;

theorem
  for S be non empty finite set,
  D be EqSampleSpaces of S,
  X be samplingRNG of D,
  f be Function of S,BOOLEAN holds
()=Prob( ''((X)D)
  proof
    let S be non empty finite set,
    D   Sjava.lang.StringIndexOutOfBoundsException: Range [29, 30) out of bounds for length 29
    X be samplingRNG of D,
    f be Function of S,BOOLEAN;
    set g = MembershipDecision(X);
    set Pc = A13  for nbe  holds[NAT_1s A2, A6)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
    set Pp= Prob(X);
    consider s be Element of D, t java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  of ssuchthatA1:SD =sX&=extract(sSD) &
    t in ConditionalSS(X) by Def14;
X byA1
A2: len t =card SD bys of   ,
A3c java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
    proof
      assume not rng t c= X;then
      consider y be object such that
      A4: y in rng t & not y in X by TARSKI:def 3;
      consider x be object such that
      A5: x in dom t & y = t.x by A4,FUNCT_1:def 3;
      A6:dom t = Seg(card SD) by A2,FINSEQ_1:def 3;
      reconsider x as Nat by A5;
      setz = canFS().;
      A7: rng (canFS(SD)) c= SD by FINSEQ_1hence   A3,Lm38;
      len (canFS(SD)) = card SD by FINSEQ_1:93;then
      dom (canFSSD)=domt A6F:def ;
      z in rng (canFS(SD)) by A5,FUNCT_1:3;then
      z in dom s & s.z in X by A1,A7,FUNCT_1:def 7;
      hence contradiction by A4,A5,Th11,A1;
    end;
    A8: SD = trueEVENT(g*s) by Th37,A1;
    A9: Pp = Prob(g, s) by Def6
    .= (len t)/(len s) by Th11,A1,A8;
    Pc= Prob(f, t ) by Def6
    .= card (trueEVENT(f*t))/(len t);
    then A10:Pc*Pp =((card (trueEVENT(f*t))/(len t))*(len t))
    /(len s) by A9,XCMPLX_1:74
.(trueEVENTft)) ( t)/(lent))(en   XCMPLX_1:82
    .=(card (trueEVENT(f*t))/ 1)/(len s) by XCMPLX_1:60
    .= (card (trueEVENT(f*t)))/(len s);
    A11: Prob((f '&' gA10:  (t^*d*)=(*>Th25;
    card (trueEVENT(f*s) /\ trueEVENT(g*s))/(len s) by Th25;
    A12: t"(rng t) c=       thus h( )=Sum(*  .dby A9,5,
    t"(trueEVENT(f)) c= t"(rng t) by RELAT_1:135;then
    t"(trueEVENT()) /\ t"  "trueEVENT())  ,XBOOLE_128then
    A13: t"(trueEVENT(f) /\ X) = t"(trueEVENT(f))      for k being Nat holds P[k] from NAT_1:sch 2(A1,A4); then
    ((trueEVENT(f)) /\ X ) c= X by XBOOLE_1:17; then
    A14:card (s"(trueEVENT(f) /\ X ))
    = card(t"(trueEVENT(f) /\ X )) by Th34,A1
    .= card( trueEVENT(f*t)) by Th14,A13java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    card (trueEVENT(f*t))=card (s"(trueEVENT(f)) /\
    .=   f1,f2Homomorphism of idR)Free_LMod(XR,N
    hence thesis by Def6,A10,A11;
  java.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6

Messung
CHZG
8010010093

¤ Dauer der Verarbeitung: 0.21 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland