Set of all states
Equations
Instances For
Set of all actions
Equations
Instances For
Equations
- MDPs.instCoeFinSHist = { coe := fun (s : Fin M.S) => MDPs.Hist.init s }
Construct i-th history of length t
Equations
Instances For
Compute the index of a history
Equations
- M.hist_to_idx (MDPs.Hist.init a) = ⟨↑a, ⋯⟩
- M.hist_to_idx (h_1.foll a a_1) = ⟨M.SA * ↑(M.hist_to_idx h_1) + (↑a * M.S + ↑a_1), ⋯⟩
Instances For
A more convenient definition for constructing inverses
Equations
- M.hist_to_idx' t h = ⋯ ▸ M.hist_to_idx ↑h
Instances For
A more convenient definition for constructing inverses
Equations
- M.idx_to_hist' t i = M.idx_to_hist t i
Instances For
theorem
MDPs.hist_idx_LeftInverse
(t : ℕ)
(M : MDP)
:
Function.LeftInverse (M.idx_to_hist' t) (M.hist_to_idx' t)
theorem
MDPs.hist_idx_RightInverse
(M : MDP)
(t : ℕ)
:
Function.RightInverse (M.idx_to_hist' t) (M.hist_to_idx' t)
Return the prefix of hist of length k
Equations
- MDPs.Hist.prefix k (MDPs.Hist.init a) = MDPs.Hist.init a
- MDPs.Hist.prefix k (h_1.foll a a_1) = if h_1.length + 1 ≤ k then h_1.foll a a_1 else MDPs.Hist.prefix k h_1
Instances For
Equations
- M.state2hist s = MDPs.Hist.init s
Instances For
Equations
- M.hist2state (MDPs.Hist.init a) = a
- M.hist2state (h.foll a a_1) = a_1
Instances For
Equations
- MDPs.state2hist_emb = { toFun := M.state2hist, inj' := ⋯ }
Instances For
Checks if the first hist is the prefix of the second hist.
Equations
- One or more equations did not get rendered due to their size.
- MDPs.isprefix (MDPs.Hist.init s₁) (MDPs.Hist.init s₂) = decide (s₁ = s₂)
- MDPs.isprefix (MDPs.Hist.init s₁) (hp.foll a a_1) = MDPs.isprefix (MDPs.Hist.init s₁) hp
- MDPs.isprefix (a.foll a_1 a_2) (MDPs.Hist.init a_3) = decide False
Instances For
All histories that follow h for t decisions
Equations
- MDPs.Histories h Nat.zero = {h}
- MDPs.Histories h t.succ = Finset.map MDPs.emb_tuple2hist (MDPs.Histories h t ×ˢ M.setA ×ˢ M.setS)
Instances For
All histories of a given length
Equations
- M.HistoriesHorizon Nat.zero = Finset.map MDPs.state2hist_emb M.setS
- M.HistoriesHorizon t_1.succ = Finset.map MDPs.emb_tuple2hist (M.HistoriesHorizon t_1 ×ˢ M.setA ×ˢ M.setS)
Instances For
Shows that there are no extra histories in the finset
Equations
- M.HistoriesHorizonT t = Finset.map { toFun := fun (hh : { h : MDPs.Hist M // h ∈ M.HistoriesHorizon t }) => ⟨↑hh, ⋯⟩, inj' := ⋯ } (M.HistoriesHorizon t).attach
Instances For
Equations
- MDPs.instFintypeHistT M t = { elems := M.HistoriesHorizonT t, complete := ⋯ }