Metamath Proof Explorer


Theorem bayesth

Description: Bayes Theorem. (Contributed by Thierry Arnoux, 20-Dec-2016) (Revised by Thierry Arnoux, 21-Jan-2017)

Ref Expression
Assertion bayesth P Prob A dom P B dom P P A 0 P B 0 cProb P A B = cProb P B A P A P B

Proof

Step Hyp Ref Expression
1 unitsscn 0 1
2 cndprob01 P Prob A dom P B dom P P B 0 cProb P A B 0 1
3 2 3adant2 P Prob A dom P B dom P P A 0 P B 0 cProb P A B 0 1
4 1 3 sseldi P Prob A dom P B dom P P A 0 P B 0 cProb P A B
5 simp11 P Prob A dom P B dom P P A 0 P B 0 P Prob
6 simp13 P Prob A dom P B dom P P A 0 P B 0 B dom P
7 prob01 P Prob B dom P P B 0 1
8 5 6 7 syl2anc P Prob A dom P B dom P P A 0 P B 0 P B 0 1
9 1 8 sseldi P Prob A dom P B dom P P A 0 P B 0 P B
10 simp3 P Prob A dom P B dom P P A 0 P B 0 P B 0
11 4 9 10 divcan4d P Prob A dom P B dom P P A 0 P B 0 cProb P A B P B P B = cProb P A B
12 incom A B = B A
13 12 fveq2i P A B = P B A
14 cndprobin P Prob A dom P B dom P P B 0 cProb P A B P B = P A B
15 14 3adant2 P Prob A dom P B dom P P A 0 P B 0 cProb P A B P B = P A B
16 simp12 P Prob A dom P B dom P P A 0 P B 0 A dom P
17 simp2 P Prob A dom P B dom P P A 0 P B 0 P A 0
18 cndprobin P Prob B dom P A dom P P A 0 cProb P B A P A = P B A
19 5 6 16 17 18 syl31anc P Prob A dom P B dom P P A 0 P B 0 cProb P B A P A = P B A
20 13 15 19 3eqtr4a P Prob A dom P B dom P P A 0 P B 0 cProb P A B P B = cProb P B A P A
21 20 oveq1d P Prob A dom P B dom P P A 0 P B 0 cProb P A B P B P B = cProb P B A P A P B
22 11 21 eqtr3d P Prob A dom P B dom P P A 0 P B 0 cProb P A B = cProb P B A P A P B