logo

Axiom prob_of_all_def of type Forall

from the theory of proveit.statistics

see dependencies

In [1]:
import proveit
# Automation is not needed when only building an expression:
proveit.defaults.automation = False # This will speed things up.
proveit.defaults.inline_pngs = False # Makes files smaller.
%load_axiom_expr # Load the stored axiom expression as 'stored_expr'
# import the special expression
from proveit.statistics import prob_of_all_def
In [2]:
# check that the built expression is the same as the stored expression
assert prob_of_all_def.expr == stored_expr
assert prob_of_all_def.expr._style_id == stored_expr._style_id
print("Passed sanity check: prob_of_all_def matches stored_expr")
Passed sanity check: prob_of_all_def matches stored_expr
In [3]:
# Show the LaTeX representation of the expression for convenience if you need it.
print(stored_expr.latex())
\forall_{\Omega \underset{{\scriptscriptstyle c}}{\in} \textrm{SampleSpaces}}~\left[\forall_{X}~\left[\forall_{f \in \left[X \rightarrow \Omega\right]}~\left[\forall_{Q}~\left(\begin{array}{c} \begin{array}{l} \left[\textrm{Prob}_{x \in X~|~Q\left(x\right)}~f\left(x\right)\right] =  \\ \textrm{Pr}\left(\left\{f\left(x\right)~|~Q\left(x\right)\right\}_{x \in X}\right) \end{array} \end{array}\right)\right]\right]\right]
In [4]:
stored_expr.style_options()
namedescriptiondefaultcurrent valuerelated methods
with_wrappingIf 'True', wrap the Expression after the parametersNoneNone/False('with_wrapping',)
condition_wrappingWrap 'before' or 'after' the condition (or None).NoneNone/False('with_wrap_after_condition', 'with_wrap_before_condition')
wrap_paramsIf 'True', wraps every two parameters AND wraps the Expression after the parametersNoneNone/False('with_params',)
justificationjustify to the 'left', 'center', or 'right' in the array cellscentercenter('with_justification',)
In [5]:
# display the expression information
stored_expr.expr_info()
 core typesub-expressionsexpression
0Operationoperator: 20
operand: 2
1ExprTuple2
2Lambdaparameter: 31
body: 4
3ExprTuple31
4Conditionalvalue: 5
condition: 6
5Operationoperator: 20
operand: 10
6Operationoperator: 8
operands: 9
7ExprTuple10
8Literal
9ExprTuple31, 11
10Lambdaparameter: 53
body: 13
11Literal
12ExprTuple53
13Operationoperator: 20
operand: 15
14ExprTuple15
15Lambdaparameter: 44
body: 17
16ExprTuple44
17Conditionalvalue: 18
condition: 19
18Operationoperator: 20
operand: 23
19Operationoperator: 49
operands: 22
20Literal
21ExprTuple23
22ExprTuple44, 24
23Lambdaparameter: 51
body: 26
24Operationoperator: 27
operands: 28
25ExprTuple51
26Operationoperator: 29
operands: 30
27Literal
28ExprTuple53, 31
29Literal
30ExprTuple32, 33
31Variable
32Operationoperator: 34
operand: 40
33Operationoperator: 35
operand: 37
34Literal
35Literal
36ExprTuple37
37Operationoperator: 38
operand: 40
38Literal
39ExprTuple40
40Lambdaparameter: 54
body: 41
41Conditionalvalue: 42
condition: 43
42Operationoperator: 44
operand: 54
43Operationoperator: 45
operands: 46
44Variable
45Literal
46ExprTuple47, 48
47Operationoperator: 49
operands: 50
48Operationoperator: 51
operand: 54
49Literal
50ExprTuple54, 53
51Variable
52ExprTuple54
53Variable
54Variable