Documentation

QuasiBorelSpaces.Option

@[reducible, inline]

We derive the QuasiBorelSpace instance for Option As from their encoding as Unit ⊕ A.

Equations
Instances For

    The encoded version of Option.some.

    Equations
    Instances For
      def QuasiBorelSpace.Option.Encoding.elim {A : Type u_1} {B : Type u_2} (x : B) (f : AB) :
      Encoding AB

      The encoded version of Option.elim.

      Equations
      Instances For
        theorem QuasiBorelSpace.Option.Encoding.isHom_elim {A : Type u_1} {B : Type u_2} {C : Type u_3} [QuasiBorelSpace A] [QuasiBorelSpace B] [QuasiBorelSpace C] {f : AC} (hf : IsHom f) {g : ABC} (hg : IsHom fun (x : A × B) => match x with | (x, y) => g x y) {h : AEncoding B} (hh : IsHom h) :
        IsHom fun (x : A) => elim (f x) (g x) (h x)
        theorem QuasiBorelSpace.Option.isHom_some {A : Type u_1} {B : Type u_2} [QuasiBorelSpace A] [QuasiBorelSpace B] {f : AB} (hf : IsHom f) :
        IsHom fun (x : A) => some (f x)
        theorem QuasiBorelSpace.Option.isHom_elim {A : Type u_1} {B : Type u_2} {C : Type u_3} [QuasiBorelSpace A] [QuasiBorelSpace B] [QuasiBorelSpace C] {f : AOption B} (hf : IsHom f) {g : AC} (hg : IsHom g) {h : ABC} (hh : IsHom fun (x : A × B) => match x with | (x, y) => h x y) :
        IsHom fun (x : A) => (f x).elim (g x) (h x)
        theorem QuasiBorelSpace.Option.isHom_map {A : Type u_1} {B : Type u_2} {C : Type u_3} [QuasiBorelSpace A] [QuasiBorelSpace B] [QuasiBorelSpace C] {f : ABC} (hf : IsHom fun (x : A × B) => match x with | (x, y) => f x y) {g : AOption B} (hg : IsHom g) :
        IsHom fun (x : A) => Option.map (f x) (g x)
        theorem QuasiBorelSpace.Option.isHom_getD {A : Type u_1} {B : Type u_2} [QuasiBorelSpace A] [QuasiBorelSpace B] {f : AOption B} (hf : IsHom f) {g : AB} (hg : IsHom g) :
        IsHom fun (x : A) => (f x).getD (g x)