Documentation

MIPRE.Tailored.Sofic.Measure.UpperPrimrec

The upper approximation is primitive recursive #

primrec_upperSeq: the numerators upperSeq T t of the upper approximation of the ergodic value are a primitive recursive function of the test and the stage — the polytope optimum over the grid is a finite list computation (Lemma I:1105, with linear programming replaced by enumeration). Each construction of Stage.lean is a composition of list operations; List.all, List.any and List.sum are folds (primrec_all, primrec_any, primrec_sum_map), and List.zip is a map over the indices (zip_eq_range).

Folds #

theorem MIPRE.Tailored.Sofic.Measure.primrec_all {α β : Type} [Primcodable α] [Primcodable β] {L : α → List β} {f : α → β → Bool} (hL : Primrec L) (hf : Primrec₂ f) :
Primrec fun (a : α) => (L a).all (f a)
theorem MIPRE.Tailored.Sofic.Measure.primrec_any {α β : Type} [Primcodable α] [Primcodable β] {L : α → List β} {f : α → β → Bool} (hL : Primrec L) (hf : Primrec₂ f) :
Primrec fun (a : α) => (L a).any (f a)
theorem MIPRE.Tailored.Sofic.Measure.primrec_sum_map {α β : Type} [Primcodable α] [Primcodable β] {L : α → List β} {f : α → β → ℕ} (hL : Primrec L) (hf : Primrec₂ f) :
Primrec fun (a : α) => (List.map (f a) (L a)).sum
theorem MIPRE.Tailored.Sofic.Measure.zip_eq_range {α β : Type} (l₁ : List α) (l₂ : List β) (d₁ : α) (d₂ : β) :
l₁.zip l₂ = List.map (fun (i : ℕ) => (l₁.getD i d₁, l₂.getD i d₂)) (List.range (min l₁.length l₂.length))

Words #

@[reducible, inline]

The arguments (T, t).

Equations
Instances For

    Patterns #

    theorem MIPRE.Tailored.Sofic.Measure.primrec_extW' {γ : Type} [Primcodable γ] {W : γ → List SubgroupTestValue.Word} {p : γ → List Bool} {u : γ → SubgroupTestValue.Word} (hW : Primrec W) (hp : Primrec p) (hu : Primrec u) :
    Primrec fun (c : γ) => extW (W c) (p c) (u c)

    extW with its arguments given by primitive recursive functions.

    @[reducible, inline]

    The arguments (s, W, p) of goodP.

    Equations
    Instances For

      Grid points #

      theorem MIPRE.Tailored.Sofic.Measure.primrec_cntR {γ : Type} [Primcodable γ] {n : γ → List ℕ} {Pt : γ → List (List Bool)} {f : γ → List Bool → Bool} (hn : Primrec n) (hPt : Primrec Pt) (hf : Primrec₂ f) :
      Primrec fun (c : γ) => cntR (n c) (Pt c) (f c)

      cntR with its arguments given by primitive recursive functions.

      @[reducible, inline]

      The arguments ((T, t), g, n) of invErr.

      Equations
      Instances For
        theorem MIPRE.Tailored.Sofic.Measure.primrec_invErr :
        Primrec fun (x : IArgs) => invErr x.1.1 x.1.2 x.2.1 x.2.2
        @[reducible, inline]

        The arguments ((T, t), n).

        Equations
        Instances For
          theorem MIPRE.Tailored.Sofic.Measure.primrecRel_good :
          PrimrecRel fun (y : ℕ × List Bool) (x : NArgs) => ¬0 < y.1 ∨ goodP x.1.1.nGen (stageW x.1.1 x.1.2) y.2 = true
          theorem MIPRE.Tailored.Sofic.Measure.primrecPred_feas2 :
          PrimrecPred fun (x : NArgs) => ∀ y ∈ x.2.zip (stagePt x.1.1 x.1.2), ¬0 < y.1 ∨ goodP x.1.1.nGen (stageW x.1.1 x.1.2) y.2 = true
          theorem MIPRE.Tailored.Sofic.Measure.primrecPred_feas3 :
          PrimrecPred fun (x : NArgs) => ∀ g ∈ letters x.1.1.nGen, invErr x.1.1 x.1.2 g x.2 ≤ 4 * stageP x.1.1 x.1.2

          The upper approximation is primitive recursive.