Metamath Proof Explorer


Theorem coinfliprv

Description: The X we defined for coin-flip is a random variable. (Contributed by Thierry Arnoux, 12-Jan-2017)

Ref Expression
Hypotheses coinflip.h H V
coinflip.t T V
coinflip.th H T
coinflip.2 P = . 𝒫 H T fc ÷ 2
coinflip.3 X = H 1 T 0
Assertion coinfliprv X RndVar P

Proof

Step Hyp Ref Expression
1 coinflip.h H V
2 coinflip.t T V
3 coinflip.th H T
4 coinflip.2 P = . 𝒫 H T fc ÷ 2
5 coinflip.3 X = H 1 T 0
6 1ex 1 V
7 c0ex 0 V
8 1 2 6 7 fpr H T H 1 T 0 : H T 1 0
9 3 8 ax-mp H 1 T 0 : H T 1 0
10 5 feq1i X : H T 1 0 H 1 T 0 : H T 1 0
11 9 10 mpbir X : H T 1 0
12 1 2 3 4 5 coinflipuniv dom P = H T
13 12 feq2i X : dom P 1 0 X : H T 1 0
14 11 13 mpbir X : dom P 1 0
15 1re 1
16 0re 0
17 15 16 pm3.2i 1 0
18 6 7 prss 1 0 1 0
19 17 18 mpbi 1 0
20 fss X : dom P 1 0 1 0 X : dom P
21 14 19 20 mp2an X : dom P
22 imassrn X -1 y ran X -1
23 dfdm4 dom X = ran X -1
24 11 fdmi dom X = H T
25 23 24 eqtr3i ran X -1 = H T
26 22 25 sseqtri X -1 y H T
27 1 2 3 4 5 coinflipspace dom P = 𝒫 H T
28 27 eleq2i X -1 y dom P X -1 y 𝒫 H T
29 prex H 1 T 0 V
30 5 29 eqeltri X V
31 cnvexg X V X -1 V
32 imaexg X -1 V X -1 y V
33 30 31 32 mp2b X -1 y V
34 33 elpw X -1 y 𝒫 H T X -1 y H T
35 28 34 bitr2i X -1 y H T X -1 y dom P
36 35 biimpi X -1 y H T X -1 y dom P
37 26 36 mp1i y 𝔅 X -1 y dom P
38 37 rgen y 𝔅 X -1 y dom P
39 1 2 3 4 5 coinflipprob P Prob
40 39 a1i H V P Prob
41 40 isrrvv H V X RndVar P X : dom P y 𝔅 X -1 y dom P
42 1 41 ax-mp X RndVar P X : dom P y 𝔅 X -1 y dom P
43 21 38 42 mpbir2an X RndVar P