Documentation

ToCslib.MeasureTheory.MeasurableSpace.Except

The measurable coproduct structure on Except #

Except ε α is given the coproduct measurable space generated by its error and ok constructors. This is the measurable structure needed to retain exceptions as outcomes when interpreting ExceptT probabilistically.

@[instance_reducible]
instance Except.instMeasurableSpace {ε : Type u_1} {α : Type u_2} [mε : MeasurableSpace ε] [mα : MeasurableSpace α] :

The coproduct measurable space on Except ε α.

Equations

A set of exception values is measurable exactly when both constructor preimages are measurable.

@[simp]

The image of a measurable set under Except.error is measurable.

@[simp]

The image of a measurable set under Except.ok is measurable.

Except.error embeds the error branch into the coproduct measurable space.

Except.ok embeds the successful branch into the coproduct measurable space.

theorem Except.measurable_elim {ε : Type u_1} {α : Type u_2} {β : Type u_3} [MeasurableSpace ε] [MeasurableSpace α] [MeasurableSpace β] {f : Except ε α → β} (hError : Measurable (f ∘ error)) (hOk : Measurable (f ∘ ok)) :

A function out of Except ε α is measurable when both constructor branches are.

theorem Except.measurable_map {ε : Type u_1} {α : Type u_2} {β : Type u_3} [MeasurableSpace ε] [MeasurableSpace α] [MeasurableSpace β] {f : α → β} (hf : Measurable f) :

Mapping the successful value of an exception preserves measurability.