Documentation

DescriptiveComplexity.Exponential.GameProgram

The six questions a machine playing a second-order game must answer #

DescriptiveComplexity.Exponential.AltQuant and DescriptiveComplexity.Exponential.BlockClaim are the two normal forms; this file applies them to an DescriptiveComplexity.SOGameSpec and packages the result as the interface a machine consumes.

The six questions #

A machine playing the game of a specification has to decide six sentences, not four: the three one-copy sentences won, univ, start, the two-copy sentence move, and the negations of univ and of move. The negations are not a redundancy – a sentence is always used in the positive direction, an existential branch that proves it and gets stuck otherwise, so refuting one means proving another (DescriptiveComplexity.GameQuestion).

DescriptiveComplexity.SOGameSpec.question reads all six in the same language, the two-copy one, the one-copy sentences traveling along FirstOrder.Language.LHom.sumInl; that uniformity is what lets the machine's tag be a plain product rather than a dependent sum.

What the interface says #

DescriptiveComplexity.QuestionData is what the machine's control needs about one question:

DescriptiveComplexity.QuestionData.Plays states that this data decides the sentence, and DescriptiveComplexity.exists_questionData produces it. The matrix condition is stated as DescriptiveComplexity.QuestionData.MatrixHoldsthere is a vector of correct claims whose residual formula holds – which is literally the round the machine plays: the existential player claims the whole vector in one move, the universal player challenges one claim by a tape lookup or lets the residual formula be evaluated.

Reading a one-copy sentence in the two-copy language #

A sentence over one copy of the block, read in the two-copy language, says the same thing of the first copy.

Dependency graph

The six questions #

The six sentences a machine playing a second-order game must decide. The two negations are separate questions because a machine only ever proves: an existential branch that fails to prove its sentence runs out of transitions, so refuting a sentence has to be proving another one.

  • won : GameQuestion

    The current position wins outright.

  • univ : GameQuestion

    The current position belongs to the universal player.

  • notUniv : GameQuestion

    The current position belongs to the existential player.

  • move : GameQuestion

    The move from the current position to the candidate is legal.

  • notMove : GameQuestion

    The move from the current position to the candidate is illegal.

  • start : GameQuestion

    The current position starts the game.

Instances For
    Dependency graph
    Dependency graph
    @[instance_reducible]
    Equations
    • One or more equations did not get rendered due to their size.
    Dependency graph
    @[reducible, inline]

    The two-copy language of a specification: the base vocabulary and the order, expanded by two copies of the block.

    Equations
    Instances For
      Dependency graph
      Dependency graph
      Dependency graph
      theorem DescriptiveComplexity.SOGameSpec.realize_question {L : FirstOrder.Language} (spec : SOGameSpec L) {A : Type} [L.Structure A] [LinearOrder A] (q : GameQuestion) (ρ σ : spec.State A) :
      A spec.question q spec.QuestionHolds q ρ σ

      The sentence of a question says what the question asks.

      Dependency graph

      What the machine needs to know about one question #

      The machine-ready form of one sentence: an alternating prefix, and a matrix presented as finitely many block-atom addresses together with, for each vector of claimed truth values, the residual formula over the base vocabulary.

      • vars :

        The number of variables of the prefix, and of the matrix.

      • pol : Bool

        Whose turn each variable of the prefix is.

      • natoms :

        The number of block-atom occurrences in the matrix.

      • atoms : Fin self.natomsBlockAtom B self.vars

        The occurrences, each an address on the tape.

      • sub : (Fin self.natomsBool)K.BoundedFormula Empty self.vars

        The residual formula, over the base vocabulary, of a vector of claims.

      Instances For
        Dependency graph

        The matrix, as the machine settles it: there is a vector of correct claims about the block atoms whose residual formula holds. The existential player claims the vector in one move; each claim is challengeable by a single tape lookup, and the residual formula guards the transition that concludes.

        Equations
        Instances For
          Dependency graph

          The data decides the sentence: the sentence is the alternating prefix of the data, played over its matrix. The initial tuple is arbitrary – the prefix overwrites every coordinate it reads.

          Equations
          Instances For
            Dependency graph

            Every sentence over two copies of a block has machine-ready form. This is the composite of the two normal forms, and it is everything a machine's finite control needs in order to decide the sentence: a prefix of moves, a finite set of tape addresses, and a family of transition guards over the base vocabulary.

            Dependency graph