First-order logic with inflationary fixed points
Lax535992.InflationaryFixedPoint · concepts/Lax535992/InflationaryFixedPoint.lean · lax-535992
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition
A simultaneous induction over a vocabulary consists of a block of relation variables , a step formula for each variable, an arbitrary first-order formula over expanded by the block whose free variables are the arguments of , and an output sentence over the same expanded vocabulary. On an -structure, the inflationary iteration starts from the empty relations and at each stage adds to every the tuples satisfying at the current stage: and . Its limit is the union of the stages, and the induction holds on the structure, read inflationarily, when the output sentence is true at the limit. No positivity is required of the step formulas.
A decision problem over is FO(, IFP) definable when some simultaneous induction over holds inflationarily, for every nonempty finite -structure and every linear order on , exactly when is a yes-instance of .
Concept map
Lean source view on GitHub
| 1 | import Mathlib.ModelTheory.Order |
| 2 | import Mathlib.ModelTheory.Semantics |
| 3 | import Mathlib.Logic.Function.Iterate |
| 4 | import Lax904597.Problems |
| 5 | import Lax904597.Interpretations |
| 6 | import Lax904597.SecondOrder |
| 7 | |
| 8 | /-! |
| 9 | --- |
| 10 | title: First-order logic with inflationary fixed points |
| 11 | type: definition |
| 12 | --- |
| 13 | A simultaneous induction over a vocabulary consists of a block of |
| 14 | relation variables , a step formula |
| 15 | for each variable, an arbitrary first-order formula over expanded by |
| 16 | the block whose free variables are the arguments of , and an output |
| 17 | sentence over the same expanded vocabulary. On an -structure, the |
| 18 | inflationary iteration starts from the empty relations and at each stage |
| 19 | adds to every the tuples satisfying at the current stage: |
| 20 | and |
| 21 | . |
| 22 | Its limit is the union of the stages, and the induction holds on the |
| 23 | structure, read inflationarily, when the output sentence is true at the |
| 24 | limit. No positivity is required of the step formulas. |
| 25 | |
| 26 | A decision problem over is FO(, IFP) definable when some |
| 27 | simultaneous induction over holds inflationarily, for |
| 28 | every nonempty finite -structure and every linear order on , |
| 29 | exactly when is a yes-instance of . |
| 30 | -/ |
| 31 | |
| 32 | namespace Lax535992.InflationaryFixedPoint |
| 33 | |
| 34 | open Lax904597.Problems Lax904597.SecondOrder |
| 35 | |
| 36 | open FirstOrder |
| 37 | |
| 38 | open Language Structure |
| 39 | |
| 40 | /-- The structure over `L` expanded by one copy of a block's vocabulary, |
| 41 | interpreted by an assignment. -/ |
| 42 | @[reducible] |
| 43 | def SOBlock.structure₁ {L : Language.{0, 0}} (B : SOBlock) {A : Type} [inst : L.Structure A] |
| 44 | (ρ : B.Assignment A) : (L.sum B.lang).Structure A := |
| 45 | @sumStructure L B.lang A inst (B.structure ρ) |
| 46 | |
| 47 | /-- The all-empty assignment of a block: the starting point of the |
| 48 | iteration. -/ |
| 49 | def SOBlock.botAssign (B : SOBlock) (A : Type) : B.Assignment A := |
| 50 | fun _ _ => False |
| 51 | |
| 52 | /-- A simultaneous first-order induction: a block of relation variables, one |
| 53 | first-order step formula per variable – over the base vocabulary expanded by |
| 54 | the block, its free variables the arguments of the variable – and an output |
| 55 | sentence over the same expanded vocabulary, read at the value of the |
| 56 | iteration. The step formulas are *unrestricted*. -/ |
| 57 | structure StepDef (L : Language.{0, 0}) : Type 1 where |
| 58 | /-- The relation variables computed by the iteration. -/ |
| 59 | B : SOBlock |
| 60 | /-- The step formula of each variable; its free variables are the arguments |
| 61 | of the variable. -/ |
| 62 | step : ∀ i : B.ι, (L.sum B.lang).Formula (Fin (B.arity i)) |
| 63 | /-- The first-order output, over the expanded vocabulary – unrestricted, in |
| 64 | particular free to negate fixed-point atoms. -/ |
| 65 | out : (L.sum B.lang).Sentence |
| 66 | |
| 67 | namespace StepDef |
| 68 | |
| 69 | variable {L : Language.{0, 0}} (d : StepDef L) |
| 70 | |
| 71 | section Semantics |
| 72 | |
| 73 | variable {A : Type} [L.Structure A] |
| 74 | |
| 75 | /-- One application of the step formulas to an assignment. -/ |
| 76 | def next (ρ : d.B.Assignment A) : d.B.Assignment A := |
| 77 | fun i x => @Formula.Realize _ A (SOBlock.structure₁ (L := L) d.B ρ) _ (d.step i) x |
| 78 | |
| 79 | /-- The inflationary step: accumulate the step formulas into the previous |
| 80 | stage. -/ |
| 81 | def inflStep (ρ : d.B.Assignment A) : d.B.Assignment A := |
| 82 | fun i x => ρ i x ∨ d.next ρ i x |
| 83 | |
| 84 | variable (A) in |
| 85 | /-- The stages of the inflationary iteration. -/ |
| 86 | def inflStage (n : ℕ) : d.B.Assignment A := |
| 87 | (d.inflStep)^[n] (SOBlock.botAssign d.B A) |
| 88 | |
| 89 | variable (A) in |
| 90 | /-- The value of the inflationary iteration: the union of the stages. -/ |
| 91 | def inflLimit : d.B.Assignment A := |
| 92 | fun i x => ∃ n, d.inflStage A n i x |
| 93 | |
| 94 | end Semantics |
| 95 | |
| 96 | /-- The value of a simultaneous induction read inflationarily: the output |
| 97 | sentence, at the limit of the inflationary iteration. -/ |
| 98 | def IFPHolds (d : StepDef L) (A : Type) [L.Structure A] : Prop := |
| 99 | @Sentence.Realize _ A (SOBlock.structure₁ (L := L) d.B (d.inflLimit A)) d.out |
| 100 | |
| 101 | end StepDef |
| 102 | |
| 103 | /-- A decision problem is *FO(≤, IFP) definable* if, on nonempty finite |
| 104 | ordered structures, it is the value of a simultaneous induction over the |
| 105 | ordered expansion of its vocabulary, read inflationarily. The equivalence is |
| 106 | required for every linear order, so the notion is order-invariant: the |
| 107 | formulas see the order, the problem does not. -/ |
| 108 | def IFPDefinable {L : Language.{0, 0}} [L.IsRelational] (P : DecisionProblem L) : Prop := |
| 109 | ∃ d : StepDef (L.sum Language.order), |
| 110 | ∀ (A : Type) [L.Structure A] [LinearOrder A] [Finite A] [Nonempty A], |
| 111 | P A ↔ d.IFPHolds A |
| 112 | |
| 113 | end Lax535992.InflationaryFixedPoint |
| 114 |
Used by
Lax535992.CircuitValueInvarianceLax535992.CircuitValuePTIMECompleteLax535992.DeterministicMachineInvarianceLax535992.DeterministicMachinePTIMECompleteLax535992.GameInvarianceLax535992.GamePTIMECompleteLax535992.HornIsLeastFixedPointLax535992.HornSatInvarianceLax535992.HornSatPTIMECompleteLax535992.ImmermanVardiLax535992.InflationaryIsLeastFixedPointLax535992.LeastFixedPointComplementLax535992.NLSubsetPTIMELax535992.PTIMEClosureLax535992.PTIMEEqCoPTIMELax535992.PTIMESubsetNP
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments