Documentation

Complexitylib.Models.RoseTreeMachine.Data

Main internal data type for the rose tree machine (RTM) #

This file contains the main internal data structure for the RTM, Data, a rose tree.

Main definitions and notations #

Rose-tree data structure, it allows us to encode most of Lean's data structures in a "natural" manner

Instances For

    Decidable equality for Data, defined jointly with Data.listDecEq.

    Equations
    Instances For

      Decidable equality for List Data, defined jointly with Data.decEq.

      Equations
      Instances For

        The list of children of a Data node.

        Equations
        Instances For
          @[irreducible]

          The encoding length of d, relevant for complexity. This is the encoded size assuming an encoding into parenthesized expressions.

          Equations
          Instances For
            @[simp]
            @[irreducible]
            def Complexity.RoseTreeMachine.Data.recL {motive : DataSort u_1} (nil : motive (l [])) (cons : (x : Data) → (xs : List Data) → motive xmotive (l xs)motive (l (x :: xs))) (d : Data) :
            motive d

            Recursion principle for Data.

            Equations
            Instances For
              theorem Complexity.RoseTreeMachine.Data.inductionL {motive : DataProp} (nil : motive (l [])) (cons : ∀ (x : Data) (xs : List Data), motive xmotive (l xs)motive (l (x :: xs))) (d : Data) :
              motive d

              Induction principle for Data, the Prop-valued companion to Data.recL.

              @[reducible, inline]

              Index of a tape cell used by the rose tree machine's execution model.

              Equations
              Instances For