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
Equations
- M.hist_to_idx' h = (h.length, ↑(M.hist_to_idx h))
Instances For
Equations
- M.idx_to_hist' ti = if h : ti.2 < M.numhist ti.1 then ↑(M.idx_to_hist ti.1 ⟨ti.2, h⟩) else MDPs.Hist.init ⟨0, ⋯⟩
Instances For
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
Instances For
Equations
- MDPs.hist2state (MDPs.Hist.init a) = a
- MDPs.hist2state (h.foll a a_1) = a_1
Instances For
Equations
- MDPs.state2hist_emb = { toFun := MDPs.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