LeanMachineLearning exposition

Learning.IT.filtrationAction_eq_comap๐Ÿ”—

This page has the declaration's own card below, then its dependency graph, then a card for each dependency (type dependencies first, then the rest of the transitive closure). For a theorem, the graph and the dependency cards only follow its statement's dependencies (its proof is replaced by sorry, so what it proves doesn't depend on how); for everything else, both the type and the body/value are followed, since their content is part of what later declarations build on.

Minimal Lean file

filtrationAction_eq_comap๐Ÿ”—

LemmaLearning.IT.filtrationAction_eq_comap

No docstring.

๐Ÿ”—theorem
Learning.IT.filtrationAction_eq_comap.{u_1, u_2} {๐“ : Type u_1} {๐“จ : Type u_2} {m๐“ : MeasurableSpace ๐“} {m๐“จ : MeasurableSpace ๐“จ} (n : โ„•) (hn : n โ‰  0) : โ†‘(filtrationAction ๐“ ๐“จ) n = MeasurableSpace.comap (fun ฯ‰ => (hist (n - 1) ฯ‰, action n ฯ‰)) inferInstance
Learning.IT.filtrationAction_eq_comap.{u_1, u_2} {๐“ : Type u_1} {๐“จ : Type u_2} {m๐“ : MeasurableSpace ๐“} {m๐“จ : MeasurableSpace ๐“จ} (n : โ„•) (hn : n โ‰  0) : โ†‘(filtrationAction ๐“ ๐“จ) n = MeasurableSpace.comap (fun ฯ‰ => (hist (n - 1) ฯ‰, action n ฯ‰)) inferInstance

Code

lemma filtrationAction_eq_comap (n : โ„•) (hn : n โ‰  0) :
    filtrationAction ๐“ ๐“จ n =
      MeasurableSpace.comap (fun ฯ‰ โ†ฆ (hist (n - 1) ฯ‰, action n ฯ‰)) inferInstance
Type uses (3)
Body uses (4)

Actions: Source ยท Open Issue

Proof
by
  simp only [filtrationAction, filtration_eq_comap, โ† MeasurableSpace.comap_prodMk, hn, โ†“reduceIte]
  rfl

Dependency graph

Type dependencies (3)

filtrationAction๐Ÿ”—

DefinitionLearning.IT.filtrationAction

Filtration generated by the history at time n-1 together with the action at time n.

๐Ÿ”—def
Learning.IT.filtrationAction.{u_4, u_5} (๐“ : Type u_4) (๐“จ : Type u_5) [MeasurableSpace ๐“] [MeasurableSpace ๐“จ] : MeasureTheory.Filtration โ„• inferInstance
Learning.IT.filtrationAction.{u_4, u_5} (๐“ : Type u_4) (๐“จ : Type u_5) [MeasurableSpace ๐“] [MeasurableSpace ๐“จ] : MeasureTheory.Filtration โ„• inferInstance

Code

def filtrationAction (๐“ ๐“จ : Type*) [MeasurableSpace ๐“] [MeasurableSpace ๐“จ] :
    Filtration โ„• (inferInstance : MeasurableSpace (โ„• โ†’ ๐“ ร— ๐“จ)) where
  seq n := if n = 0 then MeasurableSpace.comap (action 0) inferInstance
    else IT.filtration ๐“ ๐“จ (n - 1) โŠ” MeasurableSpace.comap (action n) inferInstance
  mono' n m hnm := by
    simp only
    by_cases hn : n = 0
    ยท by_cases hm : m = 0
      ยท simp [hn, hm]
      ยท simp only [hn, โ†“reduceIte, hm]
        refine le_sup_of_le_left ?_
        rw [โ† measurable_iff_comap_le]
        suffices Measurable[IT.filtration ๐“ ๐“จ 0] (action 0) from
          this.mono ((IT.filtration ๐“ ๐“จ).mono zero_le) le_rfl
        exact adapted_action 0
    have hm : m โ‰  0 := by grind
    simp only [hn, hm, โ†“reduceIte]
    have hnm' : n - 1 โ‰ค m - 1 := by grind
    simp only [sup_le_iff]
    constructor
    ยท refine le_sup_of_le_left ?_
      exact (IT.filtration ๐“ ๐“จ).mono hnm'
    ยท rcases eq_or_lt_of_le hnm with rfl | hlt
      ยท exact le_sup_of_le_right le_rfl
      refine le_sup_of_le_left ?_
      rw [โ† measurable_iff_comap_le]
      have h_le : n โ‰ค m - 1 := by grind
      suffices Measurable[IT.filtration ๐“ ๐“จ n] (action n) from
        this.mono ((IT.filtration ๐“ ๐“จ).mono h_le) le_rfl
      exact adapted_action n
  le' n := by
    by_cases hn : n = 0
    ยท simp only [hn, โ†“reduceIte]
      rw [โ† measurable_iff_comap_le]
      fun_prop
    simp only [hn, โ†“reduceIte, sup_le_iff]
    constructor
    ยท exact (IT.filtration ๐“ ๐“จ).le _
    ยท rw [โ† measurable_iff_comap_le]
      fun_prop
Body uses (4)
Used by (7)

Actions: Source ยท Open Issue

hist๐Ÿ”—

DefinitionLearning.IT.hist

hist n is the history up to time n. This is a random variable on the measurable space โ„• โ†’ ๐“ ร— ๐“จ.

๐Ÿ”—def
Learning.IT.hist.{u_1, u_2} {๐“ : Type u_1} {๐“จ : Type u_2} (n : โ„•) (h : โ„• โ†’ ๐“ ร— ๐“จ) : โ†ฅ(Finset.Iic n) โ†’ ๐“ ร— ๐“จ
Learning.IT.hist.{u_1, u_2} {๐“ : Type u_1} {๐“จ : Type u_2} (n : โ„•) (h : โ„• โ†’ ๐“ ร— ๐“จ) : โ†ฅ(Finset.Iic n) โ†’ ๐“ ร— ๐“จ

Code

def hist (n : โ„•) (h : โ„• โ†’ ๐“ ร— ๐“จ) : Iic n โ†’ ๐“ ร— ๐“จ := fun i โ†ฆ h i
Used by (23)

Actions: Source ยท Open Issue

action๐Ÿ”—

DefinitionLearning.IT.action

action n is the action pulled at time n. This is a random variable on the measurable space โ„• โ†’ ๐“ ร— ๐“จ.

๐Ÿ”—def
Learning.IT.action.{u_1, u_2} {๐“ : Type u_1} {๐“จ : Type u_2} (n : โ„•) (h : โ„• โ†’ ๐“ ร— ๐“จ) : ๐“
Learning.IT.action.{u_1, u_2} {๐“ : Type u_1} {๐“จ : Type u_2} (n : โ„•) (h : โ„• โ†’ ๐“ ร— ๐“จ) : ๐“

Code

def action (n : โ„•) (h : โ„• โ†’ ๐“ ร— ๐“จ) : ๐“ := (h n).1
Used by (31)

Actions: Source ยท Open Issue

All dependencies, transitively (3)

filtration๐Ÿ”—

DefinitionLearning.IT.filtration

Filtration of the algorithm Seq.

๐Ÿ”—def
Learning.IT.filtration.{u_4, u_5} (๐“ : Type u_4) (๐“จ : Type u_5) [MeasurableSpace ๐“] [MeasurableSpace ๐“จ] : MeasureTheory.Filtration โ„• inferInstance
Learning.IT.filtration.{u_4, u_5} (๐“ : Type u_4) (๐“จ : Type u_5) [MeasurableSpace ๐“] [MeasurableSpace ๐“จ] : MeasureTheory.Filtration โ„• inferInstance

Code

protected def filtration (๐“ ๐“จ : Type*) [MeasurableSpace ๐“] [MeasurableSpace ๐“จ] :
    Filtration โ„• (inferInstance : MeasurableSpace (โ„• โ†’ ๐“ ร— ๐“จ)) :=
  MeasureTheory.Filtration.piLE (X := fun _ โ†ฆ ๐“ ร— ๐“จ)
Used by (13)

Actions: Source ยท Open Issue

adapted_action๐Ÿ”—

LemmaLearning.IT.adapted_action

No docstring.

๐Ÿ”—theorem
Learning.IT.adapted_action.{u_1, u_2} {๐“ : Type u_1} {๐“จ : Type u_2} {m๐“ : MeasurableSpace ๐“} {m๐“จ : MeasurableSpace ๐“จ} : MeasureTheory.Adapted (IT.filtration ๐“ ๐“จ) action
Learning.IT.adapted_action.{u_1, u_2} {๐“ : Type u_1} {๐“จ : Type u_2} {m๐“ : MeasurableSpace ๐“} {m๐“จ : MeasurableSpace ๐“จ} : MeasureTheory.Adapted (IT.filtration ๐“ ๐“จ) action

Code

lemma adapted_action : Adapted (IT.filtration ๐“ ๐“จ) action
Type uses (2)
Body uses (4)
Used by (3)

Actions: Source ยท Open Issue

Proof
by
  intro n
  rw [filtration_eq_comap, action_eq_eval_comp_hist]
  exact measurable_comp_comap _ (by fun_prop)

measurable_action๐Ÿ”—

LemmaLearning.IT.measurable_action

No docstring.

๐Ÿ”—theorem
Learning.IT.measurable_action.{u_1, u_2} {๐“ : Type u_1} {๐“จ : Type u_2} {m๐“ : MeasurableSpace ๐“} {m๐“จ : MeasurableSpace ๐“จ} (n : โ„•) : Measurable (action n)
Learning.IT.measurable_action.{u_1, u_2} {๐“ : Type u_1} {๐“จ : Type u_2} {m๐“ : MeasurableSpace ๐“} {m๐“จ : MeasurableSpace ๐“จ} (n : โ„•) : Measurable (action n)

Code

lemma measurable_action (n : โ„•) : Measurable (action n (๐“
Type uses (1)
Used by (14)

Actions: Source ยท Open Issue

Proof
๐“) (๐“จ := ๐“จ)) := by
  unfold action; fun_prop