Documentation

Complexitylib.DescriptiveComplexity.Env

Variable environments for first-order logic.

Since Fin.cons is absent from Lean 4 core, we define our own environment machinery for mapping de Bruijn variables to universe elements.

@[reducible, inline]

An environment maps n de Bruijn variables to elements of Fin card.

Equations
Instances For
    def Complexity.DescriptiveComplexity.envCons {card n : Nat} (a : Fin card) (σ : Env card n) :
    Env card (n + 1)

    Extend an environment with a new element at index 0.

    Equations
    Instances For

      The empty environment (no free variables).

      Equations
      Instances For
        theorem Complexity.DescriptiveComplexity.envCons_zero {card n : Nat} (a : Fin card) (σ : Env card n) :
        envCons a σ 0, = a
        theorem Complexity.DescriptiveComplexity.envCons_succ {card n : Nat} (a : Fin card) (σ : Env card n) (i : Fin n) :
        envCons a σ i + 1, = σ i
        theorem Complexity.DescriptiveComplexity.envCons_comp {m k n : Nat} (f : Fin mFin k) (a : Fin m) (σ : Env m n) :
        f envCons a σ = envCons (f a) (f σ)