Lemmas on finite distributions #
Extensionality of Dynamics.Distribution (by weights or by expectations) and the
expectations of uniform, point, normalized and conditioned distributions.
theorem
Crn.dist_ext
{α : Type u_1}
[Fintype α]
{p q : Dynamics.Distribution α}
(h : ∀ (a : α), p.weight a = q.weight a)
:
Distributions with the same weights are equal.
theorem
Crn.weight_eq_expect
{α : Type u_1}
[Fintype α]
[DecidableEq α]
(p : Dynamics.Distribution α)
(a : α)
:
The weight of a is the expectation of the indicator of a.
theorem
Crn.dist_ext_expect
{α : Type u_1}
[Fintype α]
{p q : Dynamics.Distribution α}
(h : ∀ (f : α → ℝ), p.expect f = q.expect f)
:
Distributions with the same expectations are equal.
theorem
Crn.prob_eq_sum
{α : Type u_1}
[Fintype α]
(p : Dynamics.Distribution α)
(E : α → Prop)
[DecidablePred E]
:
The probability of an event, as a sum of weights, for any decidability instance.
theorem
Crn.prob_eq_expect
{α : Type u_1}
[Fintype α]
(p : Dynamics.Distribution α)
(E : α → Prop)
[DecidablePred E]
:
The probability of an event is the expectation of its indicator, for any decidability instance.
theorem
Crn.expect_ite
{α : Type u_1}
[Fintype α]
(p : Dynamics.Distribution α)
(E : α → Prop)
[DecidablePred E]
(f : α → ℝ)
:
Expectation of an observable vanishing off E, for any decidability instance.
Uniform expectation as a sum divided by the cardinality.
Uniform probability as a counting ratio.
theorem
Crn.uniform_prod_expect
{α : Type u_1}
[Fintype α]
{β : Type u_2}
[Fintype β]
[Nonempty α]
[Nonempty β]
(f : α × β → ℝ)
:
(Dynamics.Distribution.uniform (α × β)).expect f = (∑ b : β, (Dynamics.Distribution.uniform α).expect fun (a : α) => f (a, b)) / ↑(Fintype.card β)
Uniform expectation over a product, the first coordinate averaged first.