between two and three variable logic over word models
play

Between two- and three-variable logic over word models Kamal Lodaya - PowerPoint PPT Presentation

Between two- and three-variable logic over word models Kamal Lodaya with Andreas Krebs, Paritosh Pandya, Howard Straubing The Institute of Mathematical Sciences, Chennai July 2017 First-order and temporal logic First-order logic FO is


  1. Between two- and three-variable logic over word models Kamal Lodaya with Andreas Krebs, Paritosh Pandya, Howard Straubing The Institute of Mathematical Sciences, Chennai July 2017

  2. First-order and temporal logic ◮ First-order logic FO is normally interpreted over structures with domains D ◮ Linear-time temporal logic is normally interpreted over linearly ordered structures ( D , < ) ◮ Linear temporal logic LTL is normally interpreted over ( ω, <, Suc ) , called ω -words over A, a finite alphabet α ::= p ∈ Prop | ¬ α | α ∨ β | X α | F α | Y α | P α | α U β | α S β ◮ Think of the letters of the alphabet as interpretations of atomic propositions (monadic predicates), A is ℘ ( Prop ) ◮ w , i | = p iff p ∈ w ( i ) ◮ w , i | = X α iff w , i + 1 | = α w , i | = α U β iff for some k : i ≤ k : w , k | = β and ◮ ∀ j : i ≤ j < k : w , j | = α

  3. Finite models ◮ Here we consider FO and LTL (with enhancements) interpreted over finite models which are initial segments of ω , that is, ( { 1 , . . . , n } , <, Suc ) , called finite words over a finite alphabet A, or atomic propositions ℘ ( Prop ) ◮ Sets of finite words are called (formal) languages ◮ FO sentences and LTL formulae define languages ◮ Use regular expression notation, for example ( ab ) ∗ aa ( ab ) ∗ over the alphabet {a,b} is words with alternating occurrences of the two letters beginning with a and ending with b, except for one consecutive occurrence of a’s somewhere in the middle ◮ Results extend to ω -words

  4. Quantifier alternation hierarchy (Brzozowski-Cohen, Thomas) ◮ An FO sentence is Σ r [ < ] / Π r [ < ] if it has r alternating blocks of quantifiers, with first block existential/universal ◮ ∆ r [ < ] is the class of languages which are definable by both Σ r [ < ] and Π r [ < ] sentences ( Σ r [ < ] ∩ Π r [ < ] languages) ◮ Language A ∗ aaA ∗ in Σ 2 [ < ] \ Π 2 [ < ] , defined by � ∃ x ∃ y ∀ z ( x < z < y ⊃ ¬ a ( z )) a ∈ A ◮ ( ab ) ∗ in Π 2 [ < ] \ Σ 2 [ < ] ◮ ( a ( ba ) ∗ b ( ba ) ∗ ) ∗ in Π 3 [ < ] \ B 2 [ < ]

  5. Finite-variable logics ◮ FO k , FO using at most k variables ◮ (Kamp) introduced binary modalities such as “until” to capture FO over linear orders ◮ By a standard translation reusing the same bound variables, this means that FO [ < ] is equivalent to FO 3 (Kamp)

  6. Two-variable logic ◮ (Mortimer, Grädel-Otto-Rosen) showed that FO 2 is much weaker than FO ◮ (Thérien-Wilke) showed that over words, FO 2 [ < ] is below the second level of the quantifier alternation hierarchy ◮ FO 2 [ < ] is exactly ∆ 2 [ < ] = Σ 2 [ < ] ∩ Π 2 [ < ] (Thérien-Wilke) ◮ With alphabet { 0 , 1 } 3 , let ADD be the language of words � m � representing vertically three numbers n m + n ◮ ADD is not definable in FO 2 [ < ]

  7. During and throughout (Pratt, Segerberg) ◮ During the flight from Delhi to Seoul they serve two snacks: # snack ( del , seoul ) = 2 ◮ I slept throughout the flight from Chennai to Delhi: ¬ awake ( ch , del ) , or # awake ( ch , del ) = 0 ◮ Generally speaking, counting propositions upto a threshold ◮ These operators also appeared in interval temporal logic and duration calculus (Moszkowski, Zhou-Hoare-Ravn)

  8. Within first-order logic ◮ Thresholds are easily defined in first-order logic on words: # snack ( del , seoul ) = 2 translates to del < seoul ∧ ∃ x , y : del < x < y < seoul ∧ snack ( x ) ∧ snack ( y ) ∧ ∀ z : ( del < z < x ) ∨ ( x < z < y ) ∨ ( y < z < seoul ) ⊃ ¬ snack ( z ) ◮ Oriented: # snack ( seoul , del ) = 2 is about the return flight ◮ So x < y is definable as # A ( x , y ) ≥ 0 (A is the alphabet) ◮ Translating out thresholds requires more variables ◮ Thresholds are not definable in two-variable logic FO 2

  9. Counting upto a threshold ◮ A threshold constraint has the form: # B ( x , y ) ∼ c , where B ⊆ A , ∼ a comparison operation and c ≥ 0 ◮ Its semantics is as follows: � w , i , j | = # B ( x , y ) ∼ c ⇐ ⇒ |{ z | x < z < y ∧ a ( z ) }| ∼ c a ∈ B

  10. Logics with threshold ◮ The logic FO [ Th ] with threshold constraints has the same expressiveness as FO [ < ] ◮ The logic FO 2 [ Th ] is the two-variable fragment ◮ The temporal logic ThTL [ F , P ] has unary future and past modalities F # B ∼ c and P # B ∼ c ◮ w , i | = a iff w ( i ) = a ◮ w , i | = F # B ∼ c α iff for some k > i , we have: w , k | = α and |{ j | w ( j ) ∈ B , i < j < k }| ∼ c

  11. Two-variable logic with between ◮ The binary between relation a ( x , y ) is defined as the threshold constraint # { a } ( x , y ) > 0 (we usually drop the set brackets) ◮ w , i , j | = a ( x , y ) iff for some z , x < z < y and w ( z ) = a ◮ The logic FO [ Bet ] with only between constraints has the same expressiveness as FO [ < ] ◮ The logic FO 2 [ Bet ] is the two-variable fragment only using between constraints Theorem FO 2 [ Th ] and FO 2 [ Bet ] are equally expressive, their sentences define the same class of languages.

  12. Definability examples ◮ The successor relation Suc ( x , y ) is definable as # A ( x , y ) = 0 ◮ Hence languages like A ∗ aaA ∗ which are not FO 2 [ < ] -definable can be expressed ◮ But one can go beyond FO 2 [ <, Suc ] : Stair k = A ∗ ac ∗ ac ∗ . . . c ∗ aA ∗ with k intermediate occurrences of a (Etessami-Wilke) can be expressed, these are at different levels of the until-since hierarchy of linear temporal logic (Thérien-Wilke) ◮ Includes B 2 [ < ] , the second level of the quantifier alternation hierarchy

  13. Implementing numbers ◮ An r -bit value b 1 · · · b r over {0,1}, from LSB b 1 to MSB b r : 0 ( x ) def Bit 1 = ∃ y . Suc ( x , y ) ∧ 0 ( y ) (similarly Bit i 1 ( x ) ) ( x ) def Bit i + 1 ∃ y . Suc ( x , y ) ∧ Bit i = 0 ( y ) 0 ◮ A sequence c 1 c 2 . . . c k of r -bit values with separator s: s · b 1 1 · · · b 1 r · s · b 2 1 · · · b 2 r · s · · · s · b k 1 · · · b k r ◮ Value at x and value at y are the same (language is A ∗ s b 1 . . . b r A ∗ s b 1 . . . b r A ∗ ): EQ i ( x , y ) def ( Bit i 0 ( x ) ⇔ Bit i = 0 ( y )) r EQ ( x , y ) def � = s ( x ) ∧ s ( y ) ∧ EQ i ( x , y ) i = 1

  14. Operations on numbers ◮ (Value at y ) is (value at x )+1: language is r � A ∗ s1 i − 1 0 b i + 1 . . . b r A ∗ s0 i − 1 1 b i + 1 . . . b r A ∗ i = 1 i − 1 INC 1 ( x , y ) def � ( Bit i � Bit h = 0 ( x ) ∧ 1 ( x )) ⊃ i h = 1 i − 1 r ( Bit i � Bit h � 1 ( y ) ∧ 0 ( y ) ∧ EQ j ( x , y )) h = 1 j = i + 1 ◮ (Value at y ) is 2 × (value at x ): language is A ∗ s0 h 11 i 0 b h + i + 3 . . . b r A ∗ s0 h 01 i 1 b h + i + 3 . . . b r A ∗ , together with a matching of the border positions, when value of x is below 2 r − 1

  15. Defining counters ◮ Consider a threshold constraint # a ( x , y ) = 2 r ◮ Expand the alphabet to A × { 0 , 1 } r (“vertical” layout rather than “horizontal”) ◮ An r -bit counter: ∀ x , y . Suc ( x , y ) ⊃ ( a ( x ) ⊃ INC 1 ( x , y )) ∧ ( ¬ a ( x ) ⊃ EQ ( x , y )) ◮ Observe that everything is done in FO 2 [ <, Suc ] , because we fixed the length of the numbers

  16. Complexity of satisfiability ◮ Three colour predicates red, blue and green ◮ The colour at the beginning of the word, and for the first 2 r occurrences of a, is red ◮ For the next 2 r occurrences of a is blue, then green . . . ◮ Change the colour cyclically red → blue → green → red each time the counter resets to zero by overflowing ◮ Replace constraint by an equisatisfiable FO 2 [ Bet ] formula: a ( x , y ) ∧ EQ ( x , y ) ∧ ( ¬ red ( x , y ) ∨ ¬ blue ( x , y ) ∨ ¬ green ( x , y )) Theorem Satisfiability of FO 2 [ Th ] polynomially reduces to satisfiability of FO 2 [ Bet ] . Satisfiability of FO 2 [ Bet ] is Expspace-complete.

  17. Addition defines betweenness ◮ Alphabet { 0 , 1 } 2 (“vertical” layout) ◮ Let Double ( x , y ) be a “doubling” predicate, specifying that the positions from x to y (both included) n � � represent vertically two numbers 2 × n ◮ Consider a ( x ) ∧ b ( y ) ∧ ¬ ( C \ { c } )( x , y ) , defining the word ac ∗ b from positions x to y � 1 � 0 � 1 ◮ By mapping the letter a to � � � , b to and c to , 0 1 1 reduce betweenness—rather its complement � 11 ∗ 0 � “throughout”—to with rows of the same length 01 ∗ 1 n ◮ That is: some numbers � � defined by the formula 2 × n � 1 � 0 � � ( x ) ∧ ( y ) ∧ Double ( x , y ) 0 1

  18. Addition defines betweenness, continued ◮ From position x to position y , language ac ∗ b is simulated by doubling, cc ∗ b and ac ∗ c are simulated by increment, and cc ∗ c is simulated by equality ◮ All these are over alphabet { 0 , 1 } 2 ◮ Hence betweenness is definable using a binary predicate Add ( x , y ) representing addition (over alphabet { 0 , 1 } 3 ) m � � from position x to y (both included) of the form n m + n

Recommend


More recommend