Documentation

MIPRE.Tailored.Data.Convert

A tailored game description as a game description #

TailoredGameData.toGameData turns a tailored game description into a HaltingGameValue.GameData with the same game: the questions are the same vertices, the answers the bit vectors of length Λ named by the numbers below 2 ^ Λ (bit i of the number is coordinate i, vecEquiv), the weights the same list, and the acceptance table every tuple the canonical decider accepts (acceptsN, the decider on numbers). So the machinery written for game descriptions applies to tailored ones: the quantum value is the same (quantumValue_toGameData), and it is r.e. from below along a computable family (ValueApprox.rePred_lt_quantumValue), because the conversion is primitive recursive (primrec_toGameData).

Answers as numbers #

The bit vectors of length L as the numbers below 2 ^ L: coordinate i is bit i.

Equations
Instances For
    theorem TailoredGameValue.TailoredGameData.vecEquiv_apply (L : ℕ) (a : Fin (2 ^ L)) (i : Fin L) :
    (vecEquiv L) a i = (↑a).testBit ↑i

    The answer length and the canonical decider, on numbers #

    The answer length Λ, computed by a fold over the vertices.

    Equations
    Instances For
      theorem TailoredGameValue.TailoredGameData.foldr_max_le {l : List ℕ} {B : ℕ} (h : ∀ a ∈ l, a ≤ B) :

      The readable part of an answer given as a number.

      Equations
      Instances For

        The full answer, given as a number.

        Equations
        Instances For

          The parity of a list of bits, by a fold.

          Equations
          Instances For

            Satisfaction of a linear constraint, as a Boolean function.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              theorem TailoredGameValue.TailoredGameData.zipWith_eq_range (c v : List Bool) (h : c.length = v.length) :
              List.zipWith (fun (x1 x2 : Bool) => x1 && x2) c v = List.map (fun (i : ℕ) => c.getD i false && v.getD i false) (List.range c.length)

              The canonical decider on numbers: answers given as numbers, read as bit vectors.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                The acceptance table: every tuple of numbers in range that the decider accepts.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  A tailored game description as a game description.

                  Equations
                  Instances For
                    theorem TailoredGameValue.TailoredGameData.mem_accN (g : TailoredGameData) (x y a b : ℕ) :
                    (x, y, a, b) ∈ g.accN ↔ x < g.nV + 1 ∧ y < g.nV + 1 ∧ a < 2 ^ g.ansLenL ∧ b < 2 ^ g.ansLenL ∧ g.acceptsN x y a b = true

                    The canonical decider on numbers is the canonical decider #

                    theorem TailoredGameValue.TailoredGameData.full_vecEquiv (g : TailoredGameData) (x : Fin (g.nV + 1)) (a : Fin (2 ^ g.ansLen)) :
                    g.full x ((vecEquiv g.ansLen) a) = g.flN ↑x ↑a
                    theorem TailoredGameValue.TailoredGameData.elem_iff (A B C : Prop) [Decidable A] [Decidable B] [Decidable C] (s : Bool) :
                    (!(decide A && decide B && decide C) || s) = true ↔ A → B → C → s = true
                    theorem TailoredGameValue.TailoredGameData.acceptsN_iff (g : TailoredGameData) (x y : Fin (g.nV + 1)) (a b : Fin (2 ^ g.ansLen)) :
                    g.acceptsN ↑x ↑y ↑a ↑b = true ↔ g.Accepts x y ((vecEquiv g.ansLen) a) ((vecEquiv g.ansLen) b)

                    The canonical decider on numbers is the canonical decider.

                    The same game #

                    The answers of the game description, as bit vectors.

                    Equations
                    Instances For
                      theorem TailoredGameValue.TailoredGameData.toGameData_D (g : TailoredGameData) (x y : Fin (g.nV + 1)) (a b : Fin (g.toGameData.nA + 1)) :
                      g.toGameData.game.D x y a b = g.game.D x y (g.ansIdx a) (g.ansIdx b)

                      The conversion is primitive recursive #

                      The per-constraint test of acceptsN, as a function of the description, the tuple and the constraint entry.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        theorem TailoredGameValue.TailoredGameData.all_eq_foldr {α : Type u_1} (l : List α) (f : α → Bool) :
                        l.all f = List.foldr (fun (e : α) (b : Bool) => f e && b) true l