Zulip Chat Archive

Stream: Is there code for X?

Topic: Function to measure over discrete space?


Markus de Medeiros (Jul 18 2024 at 12:43):

Is there code for turning f : U -> ENNReal into a measure over the discrete space on U? I've used PMF.toMeasure before (at the moment I am converting that definition to work with functions that don't sum to 1) but I'm wondering if it's in Mathlib already.

Markus de Medeiros (Jul 18 2024 at 13:47):

Actually, I think I've dug up what I'm looking for, though it's not a generalization of PMF.toMeasure. For the record:

MeasureTheory.Measure.sum (fun u => f u  @MeasureTheory.Measure.dirac U  u)

Yury G. Kudryashov (Jul 18 2024 at 20:45):

Your solution LGTM


Last updated: May 02 2025 at 03:31 UTC