Finite model checking for first-order structures #
Two pieces of substrate for studies that verify claims on small hand-built models:
Language.monadic Sym— the purely unary-relational language whose arity-1 symbols areSym(mathlib precedent:Language.graph, one binary symbol), withmonadicStructurebuilding its structures from aSym → E → Proptable.Language.monadicWithConstants Const Pred— the monadic signature with individual constants, withmonadicWithConstantsStructurebuilding its structures from a constant interpretation and a predicate valuation.BoundedFormula.decRealize— decidable realization over a finite structure with decidable atoms, by structural recursion on the formula. Mathlib has no such instance; with it,decidekernel-checksFormula.Realizefacts on concrete finite models.
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
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
- FirstOrder.Language.monadicStructure.decRelMap holds 1 s v_2 = FirstOrder.Language.monadicStructure.decRelMap._aux_1 holds s v_2
- FirstOrder.Language.monadicStructure.decRelMap holds 0 r_2 v_2 = PEmpty.elim r_2
- FirstOrder.Language.monadicStructure.decRelMap holds n_2.succ.succ r_2 v_2 = PEmpty.elim r_2
Instances For
Equations
- FirstOrder.Language.instDecidableRelMap_linglib holds n r v = FirstOrder.Language.monadicStructure.decRelMap holds n r v
The monadic signature with individual constants: constant symbols
Const and unary relation symbols Pred, defined directly
(mathlib precedent: Language.graph; withConstants is the
elementary-diagram device, not a signature constructor).
Equations
- One or more equations did not get rendered due to their size.
Instances For
A constant as a symbol of the signature.
Equations
Instances For
A predicate as a relation symbol of the signature.
Equations
Instances For
The monadicWithConstants structure a constant interpretation and a
predicate valuation induce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Decidable realization on a finite structure with decidable atoms:
structural recursion on the formula. decide kernel-reduces through it.
Equations
- FirstOrder.Language.BoundedFormula.falsum.decRealize x✝¹ x✝ = isFalse ⋯
- (FirstOrder.Language.BoundedFormula.equal t₁ t₂).decRealize x✝¹ x✝ = FirstOrder.Language.BoundedFormula.decRealize._aux_1 x✝² t₁ t₂ x✝¹ x✝
- (FirstOrder.Language.BoundedFormula.rel R ts).decRealize x✝¹ x✝ = FirstOrder.Language.BoundedFormula.decRealize._aux_3 x✝² l R ts x✝¹ x✝
- (φ.imp ψ).decRealize x✝¹ x✝ = FirstOrder.Language.BoundedFormula.decRealize._aux_5 x✝² φ ψ x✝¹ x✝ (φ.decRealize x✝¹ x✝) (ψ.decRealize x✝¹ x✝)
- φ.all.decRealize x✝¹ x✝ = FirstOrder.Language.BoundedFormula.decRealize._aux_7 x✝² φ x✝¹ x✝ fun (a : M) => φ.decRealize x✝¹ (Fin.snoc x✝ a)
Equations
- φ.decRealize v = FirstOrder.Language.BoundedFormula.decRealize φ v default