Documentation

Linglib.Core.Logic.FirstOrder.FiniteModel

Finite model checking for first-order structures #

Two pieces of substrate for studies that verify claims on small hand-built models:

def FirstOrder.Language.monadic (Sym : Type u_1) :
Language

The monadic language: arity-1 relation symbols Sym, nothing else.

Equations
  • FirstOrder.Language.monadic Sym = { Functions := fun (x : ) => Empty, Relations := fun (n : ) => match n with | 1 => Sym | x => PEmpty.{?u.1 + 1} }
Instances For
    @[implicit_reducible]
    def FirstOrder.Language.monadicStructure {Sym : Type u_1} {E : Type u_2} (holds : SymEProp) :
    (monadic Sym).Structure E

    Build a monadic-structure from a truth table for the symbols.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def FirstOrder.Language.monadicStructure.decRelMap {Sym : Type u_1} {E : Type u_2} (holds : SymEProp) [(s : Sym) → (e : E) → Decidable (holds s e)] (n : ) (r : (monadic Sym).Relations n) (v : Fin nE) :
      Decidable (Structure.RelMap r v)

      Atom decidability for a monadicStructure with a decidable table. As a named def so concrete interpretation families can supply it by unification (exact monadicStructure.decRelMap _) where synthesis would be stuck on a metavariable table.

      Equations
      Instances For
        @[implicit_reducible]
        instance FirstOrder.Language.instDecidableRelMap_linglib {Sym : Type u_1} {E : Type u_2} (holds : SymEProp) [(s : Sym) → (e : E) → Decidable (holds s e)] (n : ) (r : (monadic Sym).Relations n) (v : Fin nE) :
        Decidable (Structure.RelMap r v)
        Equations
        @[implicit_reducible]
        instance FirstOrder.Language.BoundedFormula.decRealize {L : Language} {M : Type u_1} [L.Structure M] [Fintype M] [DecidableEq M] [(n : ) → (r : L.Relations n) → (x : Fin nM) → Decidable (Structure.RelMap r x)] {α : Type u_2} {n : } (φ : L.BoundedFormula α n) (v : αM) (xs : Fin nM) :
        Decidable (φ.Realize v xs)

        Decidable realization on a finite structure with decidable atoms: structural recursion on the formula. decide kernel-reduces through it.

        Equations
        @[implicit_reducible]
        instance FirstOrder.Language.Formula.decRealize {L : Language} {M : Type u_1} [L.Structure M] [Fintype M] [DecidableEq M] [(n : ) → (r : L.Relations n) → (x : Fin nM) → Decidable (Structure.RelMap r x)] {α : Type u_2} (φ : L.Formula α) (v : αM) :
        Decidable (φ.Realize v)
        Equations