Main derivation
S01 · definition
Before
p:R_X\to\mathbb{Q}After
p\ \text{is a PMF}\iff \forall x\in R_X:\ p(x)\ge 0\ \land\ \sum_{x\in R_X}p(x)=1Conditions: none
Rule: mko_pmf_def · Uses: mko_pmf_def, G1
Leaf basis: mko_pmf_def + prob_axioms
By the MKO a PMF must meet two conditions: every mass is nonnegative and all masses sum to exactly 1. The MKO's first paragraph requires checking this first; if it fails, the function may not be used as a distribution for event probabilities or expectation.
S02 · implies
Before
R_X=\{-1,0,1,2\}After
|R_X|=4,\ \text{values distinct}Conditions: none
Rule: finite_counting_basics · Uses: G1
Leaf basis: finite_counting_basics
The four values −1, 0, 1, 2 are pairwise distinct, the range is finite, and each value has exactly one mass. This is what MKO assumption a1 requires: if a value appeared twice, its mass could be counted twice in the total.
S03 · implies
Before
p(-1)=\tfrac16,\ p(0)=\tfrac13,\ p(1)=\tfrac14,\ p(2)=\tfrac14
After
\forall x\in R_X:\ p(x)\ge 0
Conditions: none
Rule: order_basics · Uses: G1
Leaf basis: order_basics + frac_rules
Each of the four masses is a positive numerator over a positive denominator, hence greater than 0 and in particular nonnegative. All four values are checked.
S04 · equivalent
Before
\sum_{x\in R_X}p(x)=\tfrac16+\tfrac13+\tfrac14+\tfrac14After
1
Conditions: none
Rule: frac_rules · Uses: G1, S02
Leaf basis: frac_rules + finite_sum_rules + numeric_evaluation
Since the values are distinct (S02), the total adds each of the four masses exactly once. Bring them to the denominator 12 and add, as in sub-steps S04.1 and S04.2.
S05 · implies
Before
p\ge 0,\ \sum p=1
After
p\ \text{is a PMF on } R_XConditions: none
Rule: mko_pmf_def · Uses: S01, S03, S04
Leaf basis: mko_pmf_def + and_intro_elim
S03 gives nonnegativity and S04 gives total exactly 1, so by the PMF conditions in S01, p is a PMF, and only now may event probabilities and expectations be computed.
S06 · equivalent
Before
A=\{x\in R_X\mid x\ge 1\}After
A=\{1,2\}Conditions: none
Rule: set_builder · Uses: G1
Leaf basis: set_builder + order_basics
Test each value of the range for x≥1: −1 no, 0 no, 1 yes (equality holds), 2 yes. So the event X≥1 corresponds to A={1,2}.
S07 · equivalent
Before
P(X\ge 1)=\sum_{x\in A}p(x)After
\tfrac14+\tfrac14=\tfrac12
Conditions: none
Rule: event_sum · Uses: S05, S06, event_sum
Leaf basis: event_sum + frac_rules + numeric_evaluation
An event's probability is the sum of the masses of the values it contains (MKO paragraph 2): p(1)+p(2)=1/4+1/4=1/2; the values −1 and 0 outside the event are not added.
S08 · implies
Before
P(X\in R_X\setminus A)=\tfrac16+\tfrac13
After
\tfrac12,\quad P(A)+P(R_X\setminus A)=1
Conditions: none
Rule: event_sum · Uses: S05, S06, S07, event_sum
Leaf basis: event_sum + prob_axioms + numeric_evaluation
Check: the complementary event {−1,0} has probability 1/6+1/3=1/2; the two add up to 1, in line with P(Aᶜ)=1−P(A) from the probability axioms.
S09 · equivalent
Before
E[X]=\sum_{x\in R_X}x\,p(x)After
\tfrac{7}{12}Conditions: none
Rule: expectation_def · Uses: S05, expectation_def
Leaf basis: expectation_def + frac_rules + numeric_evaluation
The expectation is the mass-weighted sum of the values (MKO). The terms are formed in S09.1 and added in S09.2.
S10 · implies
Before
g(-1)=1,\ g(0)=0,\ g(1)=1,\ g(2)=4
After
R_Y=\{0,1,4\};\ g^{-1}(0)=\{0\},\ g^{-1}(1)=\{-1,1\},\ g^{-1}(4)=\{2\}Conditions: none
Rule: image_preimage_def · Uses: G1, G2, pushforward_def
Leaf basis: image_preimage_def + function_def + numeric_evaluation
Compute g(x)=x² value by value: (−1)²=1, 0²=0, 1²=1, 2²=4. The new range is the image {0,1,4}; the preimage of each new value is the set of old values mapped to it. Both −1 and 1 map to 1.
S11 · equivalent
Before
p_Y(y)=\sum_{x\in g^{-1}(y)}p(x)After
p_Y(0)=\tfrac13,\ p_Y(1)=\tfrac16+\tfrac14=\tfrac{5}{12},\ p_Y(4)=\tfrac14Conditions: none
Rule: pushforward_def · Uses: S10, G1, pushforward_def
Leaf basis: pushforward_def + frac_rules + numeric_evaluation
By the pushforward definition, add the original masses mapped to the same new value (MKO paragraph 3): p_Y(1)=p(−1)+p(1)=2/12+3/12=5/12; the other two preimages have one element each.
S12 · theorem_application
Before
p_Y\ \text{on } R_Y=\{0,1,4\}After
p_Y\ \text{is a PMF};\ \tfrac13+\tfrac{5}{12}+\tfrac14=1Conditions: none
Rule: L_pushforward_total · Uses: S05, S11
Leaf basis: L_pushforward_total + numeric_evaluation
By Lemma L_pushforward_total (proved in S12.1 and S12.2 for any finite range), p being a PMF makes p_Y a PMF. Direct check: 4/12+5/12+3/12=12/12=1, consistent with the lemma.
S13 · equivalent
Before
E[Y]=\sum_{y\in R_Y}y\,p_Y(y)After
0\cdot\tfrac13+1\cdot\tfrac{5}{12}+4\cdot\tfrac14=\tfrac{17}{12}Conditions: none
Rule: expectation_def · Uses: S11, S12, expectation_def
Leaf basis: expectation_def + frac_rules + numeric_evaluation
p_Y is a PMF (S12), so its expectation may be computed: 0+5/12+1=5/12+12/12=17/12.
S14 · equivalent
Before
\sum_{y\in R_Y}y\,p_Y(y)After
\sum_{x\in R_X}x^2p(x)=\tfrac16+0+\tfrac14+1=\tfrac{17}{12}Conditions: none
Rule: L_regroup · Uses: S12, S13
Leaf basis: L_regroup + frac_rules + numeric_evaluation
Cross-check: by Lemma L_regroup (proved in S14.1), the expectation of Y can also be computed directly on the range of X: Σx²p(x)=1·(1/6)+0·(1/3)+1·(1/4)+4·(1/4)=2/12+0+3/12+12/12=17/12, the same as S13.
S15 · implies
Before
\sum_{x}q(x)=\tfrac12+\tfrac13+\tfrac14+0After
\tfrac{13}{12}\neq 1;\ q\ \text{is not a PMF}Conditions: none
Rule: mko_pmf_def · Uses: G3, S01
Leaf basis: mko_pmf_def + frac_rules + numeric_evaluation
Every mass of q lies between 0 and 1, but the total is 6/12+4/12+3/12+0=13/12≠1, which fails the PMF conditions, so q is not a PMF and may not be used for event probabilities or an expectation.
S16 · implies
Before
r(1)=-\tfrac16,\ \sum_x r(x)=1
After
r\ \text{is not a PMF}Conditions: none
Rule: mko_pmf_def · Uses: G3, S01
Leaf basis: mko_pmf_def + order_basics + numeric_evaluation
r sums to 3/6+4/6−1/6+0=6/6=1, but r(1)=−1/6<0 violates nonnegativity, so r is not a PMF. The two PMF conditions are independent and both are required.
Substeps and lemmas
S04.1 · equivalent
Before
\tfrac16+\tfrac13+\tfrac14+\tfrac14
After
\tfrac{2}{12}+\tfrac{4}{12}+\tfrac{3}{12}+\tfrac{3}{12}Conditions: 2,4,3\neq 0
Rule: frac_rules · Uses: frac_rules
Leaf basis: frac_rules
Multiplying numerator and denominator by the same nonzero integer does not change a fraction: 1/6=2/12 (by 2), 1/3=4/12 (by 4), 1/4=3/12 (by 3).
S04.2 · equivalent
Before
\tfrac{2}{12}+\tfrac{4}{12}+\tfrac{3}{12}+\tfrac{3}{12}After
\tfrac{12}{12}=1Conditions: 12\neq 0
Rule: frac_rules · Uses: S04.1, frac_rules
Leaf basis: frac_rules + numeric_evaluation
Fractions with a common denominator add by their numerators: 2+4+3+3=12, giving 12/12=1. The total is exactly 1, not approximately 1.
S09.1 · equivalent
Before
\sum_{x\in R_X}x\,p(x)After
(-1)\cdot\tfrac16+0\cdot\tfrac13+1\cdot\tfrac14+2\cdot\tfrac14
Conditions: none
Rule: finite_sum_rules · Uses: G1, expectation_def
Leaf basis: finite_sum_rules
Expand the finite sum over the four values of the range, each value multiplied by its own mass. The term for the value 0 is 0 but still belongs to the sum.
S09.2 · equivalent
Before
(-1)\cdot\tfrac16+0\cdot\tfrac13+1\cdot\tfrac14+2\cdot\tfrac14
After
-\tfrac{2}{12}+0+\tfrac{3}{12}+\tfrac{6}{12}=\tfrac{7}{12}Conditions: none
Rule: frac_rules · Uses: S09.1, frac_rules
Leaf basis: frac_rules + neg_mul + mul_zero + numeric_evaluation
The terms are −1/6=−2/12, 0, 1/4=3/12 and 2/4=6/12; adding numerators, −2+0+3+6=7, gives 7/12. An expectation need not be a value in the range.
S12.1 · implies
Before
p(x)\ge 0\ \forall x
After
p_Y(y)=\sum_{x\in g^{-1}(y)}p(x)\ge 0Conditions: none
Rule: order_basics · Uses: pushforward_def, order_basics
Leaf basis: order_basics + finite_sum_rules
For any y∈R_Y, p_Y(y) is a sum of nonnegative numbers, and a sum of nonnegative numbers is nonnegative (order is compatible with addition, applied term by term). This proves nonnegativity of the pushforward masses.
S12.2 · equivalent
Before
\sum_{y\in R_Y}p_Y(y)=\sum_{y\in R_Y}\sum_{x\in g^{-1}(y)}p(x)After
\sum_{x\in R_X}p(x)=1Conditions: none
Rule: sum_over_partition · Uses: S12.1, pushforward_def, sum_over_partition
Leaf basis: sum_over_partition + function_def + prob_axioms
Since g is a function, each x∈R_X lies in exactly one preimage g⁻¹(g(x)): the preimages are pairwise disjoint with union R_X. By summing over a partition, the double sum equals the sum over R_X, which is 1 because p is a PMF. S12.1 and S12.2 together prove Lemma L_pushforward_total.
S14.1 · equivalent
Before
\sum_{y\in R_Y}y\sum_{x\in g^{-1}(y)}p(x)After
\sum_{y\in R_Y}\sum_{x\in g^{-1}(y)}g(x)p(x)=\sum_{x\in R_X}g(x)p(x)Conditions: none
Rule: sum_over_partition · Uses: pushforward_def, sum_over_partition, distributive
Leaf basis: distributive + eq_replace + sum_over_partition + finite_sum_rules
After substituting the definition of p_Y(y), distribute y into the inner sum; every x in the inner sum satisfies g(x)=y, so y may be replaced by g(x); finally summing over the partition merges the double sum into a sum over R_X. S14.1 proves Lemma L_regroup.