Documentation

QuasiBorelSpaces.List

Lists over Quasi-Borel Spaces #

This file defines the quasi-borel structure on lists and proves various operations on lists are homomorphisms.

Main definitions #

Main results #

Encoding Homomorphisms #

theorem List.Encoding.isHom_cons {A : Type u_1} [QuasiBorelSpace A] :
QuasiBorelSpace.IsHom fun (x : A × Encoding A) => cons x.1 x.2

cons is a homomorphism.

theorem List.Encoding.isHom_fold {A : Type u_1} {B : Type u_2} [QuasiBorelSpace A] [QuasiBorelSpace B] {cons : ABB} (hcons : QuasiBorelSpace.IsHom fun (x : A × B) => match x with | (x, y) => cons x y) (nil : B) :

Folding over an encoded list is a homomorphism.

QuasiBorel Structure #

@[simp]

encode is a homomorphism.

@[simp]
theorem QuasiBorelSpace.List.isHom_cons {A : Type u_1} [QuasiBorelSpace A] :
IsHom fun (x : A × List A) => x.1 :: x.2

List cons is a homomorphism.

theorem QuasiBorelSpace.List.isHom_cons' {A : Type u_1} {B : Type u_2} [QuasiBorelSpace A] [QuasiBorelSpace B] {f : AB} (hf : IsHom f) {g : AList B} (hg : IsHom g) :
IsHom fun (x : A) => f x :: g x

cons is a homomorphism when composed with other homomorphisms.

Basic List Operations #

theorem QuasiBorelSpace.List.isHom_foldr {A : Type u_1} {B : Type u_2} [QuasiBorelSpace A] [QuasiBorelSpace B] {cons : ABB} (hcons : IsHom fun (x : A × B) => match x with | (x, xs) => cons x xs) (nil : B) :
IsHom (List.foldr cons nil)

foldr is a homomorphism.

theorem QuasiBorelSpace.List.isHom_foldr' {A : Type u_1} {B : Type u_2} {C : Type u_3} [QuasiBorelSpace A] [QuasiBorelSpace B] [QuasiBorelSpace C] {cons : ABCC} (hcons : IsHom fun (x : A × B × C) => match x with | (x, y, z) => cons x y z) {nil : AC} (hnil : IsHom nil) {f : AList B} (hf : IsHom f) :
IsHom fun (x : A) => List.foldr (cons x) (nil x) (f x)

foldr is a homomorphism when composed with other homomorphisms.

theorem QuasiBorelSpace.List.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 : AList B} (hg : IsHom g) :
IsHom fun (x : A) => List.map (f x) (g x)

map is a homomorphism.

List Queries #

theorem QuasiBorelSpace.List.isHom_getElem? {A : Type u_1} {B : Type u_2} [QuasiBorelSpace A] [QuasiBorelSpace B] {f : AList B} (hf : IsHom f) {g : A} (hg : IsHom g) :
IsHom fun (x : A) => (f x)[g x]?

getElem? is a homomorphism.

length is a homomorphism.

theorem QuasiBorelSpace.List.isHom_get {A : Type u_1} {B : Type u_2} [QuasiBorelSpace A] [QuasiBorelSpace B] {f : AList B} (hf : IsHom f) {g : A} (hg : IsHom g) (h : ∀ (x : A), g x < (f x).length) :
IsHom fun (x : A) => (f x)[g x]

get is a homomorphism for valid indices.

theorem QuasiBorelSpace.List.isHom_ofFn {A : Type u_1} {B : Type u_2} [QuasiBorelSpace A] [QuasiBorelSpace B] {n : } {f : AFin nB} (hf : IsHom fun (x : A × Fin n) => match x with | (x, y) => f x y) :
IsHom fun (x : A) => List.ofFn (f x)

ofFn is a homomorphism.

tail is a homomorphism.

theorem QuasiBorelSpace.List.isHom_append {A : Type u_1} [QuasiBorelSpace A] :
IsHom fun (x : List A × List A) => x.1 ++ x.2

List append is a homomorphism.

List Membership and Set Operations #

theorem QuasiBorelSpace.List.isHom_mem {A : Type u_1} {B : Type u_2} [QuasiBorelSpace A] [QuasiBorelSpace B] [IsHomDiagonal B] {f : AB} (hf : IsHom f) {g : AList B} (hg : IsHom g) :
IsHom fun (x : A) => f x g x

List membership is a homomorphism.

theorem QuasiBorelSpace.List.isHom_elem {A : Type u_1} {B : Type u_2} [QuasiBorelSpace A] [QuasiBorelSpace B] [DecidableEq B] [IsHomDiagonal B] {f : AB} (hf : IsHom f) {g : AList B} (hg : IsHom g) :
IsHom fun (x : A) => List.elem (f x) (g x)

elem is a homomorphism.

@[simp]
theorem QuasiBorelSpace.List.isHom_insert {A : Type u_1} {B : Type u_2} [QuasiBorelSpace A] [QuasiBorelSpace B] [DecidableEq B] [IsHomDiagonal B] {f : AB} (hf : IsHom f) {g : AList B} (hg : IsHom g) :
IsHom fun (x : A) => insert (f x) (g x)

insert is a homomorphism.

theorem QuasiBorelSpace.List.isHom_union {A : Type u_1} [QuasiBorelSpace A] [DecidableEq A] [IsHomDiagonal A] :
IsHom fun (x : List A × List A) => x.1.union x.2

List union is a homomorphism.

theorem QuasiBorelSpace.List.isHom_erase {A : Type u_1} [QuasiBorelSpace A] [BEq A] [LawfulBEq A] [IsHomDiagonal A] :
IsHom fun (x : List A × A) => x.1.erase x.2

erase is a homomorphism.

theorem QuasiBorelSpace.List.isHom_diff {A : Type u_1} [QuasiBorelSpace A] [BEq A] [LawfulBEq A] [IsHomDiagonal A] :
IsHom fun (x : List A × List A) => x.1.diff x.2

List diff is a homomorphism.

Measurable Structure #

Probability Measures on Lists #

Converts a sequence of measures into a measure of sequences, where each element is drawn from an element of the original sequence.

Equations
Instances For
    noncomputable def QuasiBorelSpace.List.lintegral {A : Type u_1} [QuasiBorelSpace A] (k : List AENNReal) :

    Lifting integration to sequences.

    Equations
    Instances For
      @[simp]

      Computing the integral of a sequence.

      Point Separation #

      The SeparatesPoints instance for List A.