Documentation

Complexitylib.DescriptiveComplexity.FirstOrder.Blocks

Finite connectives and quantifier blocks #

Finite conjunctions and disjunctions express tag choices in an interpretation. Quantifier blocks replace a quantifier over tuples by quantification over each coordinate. envBlock σ v puts the coordinates of v first, followed by σ. These constructions include empty blocks and empty families.

def Complexity.DescriptiveComplexity.envBlock {card n : ℕ} (σ : Env card n) {k : ℕ} :
Env card k → Env card (n + k)

Extend an environment by an entire tuple, placing its first coordinate at index zero.

Equations
Instances For
    theorem Complexity.DescriptiveComplexity.envBlock_new {card n k : ℕ} (σ : Env card n) (v : Env card k) (i : Fin k) :
    envBlock σ v ⟨↑i, ⋯⟩ = v i

    The new variables evaluate to the corresponding tuple coordinates.

    def Complexity.DescriptiveComplexity.Term.shiftBy {V : Vocabulary} {n : ℕ} (t : Term V n) (k : ℕ) :
    Term V (n + k)

    Shift a term across a block of fresh variables.

    Equations
    Instances For
      theorem Complexity.DescriptiveComplexity.Term.shiftBy_eval {V : Vocabulary} {n k : ℕ} (A : FinStruct V) (σ : Env A.card n) (v : Env A.card k) (t : Term V n) :
      eval A (envBlock σ v) (t.shiftBy k) = eval A σ t

      Old terms retain their value when moved across a block of quantifiers.

      theorem Complexity.DescriptiveComplexity.Formula.existBlock_sat {V : Vocabulary} {n k : ℕ} (A : FinStruct V) (σ : Env A.card n) (φ : Formula V (n + k)) :
      Sat A σ (existBlock k φ) ↔ ∃ (v : Env A.card k), Sat A (envBlock σ v) φ

      Existential block quantification is quantification over all coordinate tuples.

      theorem Complexity.DescriptiveComplexity.Formula.allBlock_sat {V : Vocabulary} {n k : ℕ} (A : FinStruct V) (σ : Env A.card n) (φ : Formula V (n + k)) :
      Sat A σ (allBlock k φ) ↔ ∀ (v : Env A.card k), Sat A (envBlock σ v) φ

      Universal block quantification is quantification over all coordinate tuples.

      theorem Complexity.DescriptiveComplexity.Formula.conjList_sat {V : Vocabulary} {n : ℕ} (A : FinStruct V) (σ : Env A.card n) (xs : List (Formula V n)) :
      Sat A σ (conjList xs) ↔ ∀ (φ : Formula V n), φ ∈ xs → Sat A σ φ

      A finite conjunction holds exactly when every member holds.

      theorem Complexity.DescriptiveComplexity.Formula.disjList_sat {V : Vocabulary} {n : ℕ} (A : FinStruct V) (σ : Env A.card n) (xs : List (Formula V n)) :
      Sat A σ (disjList xs) ↔ ∃ (φ : Formula V n), φ ∈ xs ∧ Sat A σ φ

      A finite disjunction holds exactly when some member holds.

      theorem Complexity.DescriptiveComplexity.Formula.conjFin_sat {V : Vocabulary} {n k : ℕ} (A : FinStruct V) (σ : Env A.card n) (φ : Fin k → Formula V n) :
      Sat A σ (conjFin φ) ↔ ∀ (i : Fin k), Sat A σ (φ i)

      Finite conjunction is universal quantification over its indices.

      theorem Complexity.DescriptiveComplexity.Formula.disjFin_sat {V : Vocabulary} {n k : ℕ} (A : FinStruct V) (σ : Env A.card n) (φ : Fin k → Formula V n) :
      Sat A σ (disjFin φ) ↔ ∃ (i : Fin k), Sat A σ (φ i)

      Finite disjunction is existential quantification over its indices.