Do you know what is a preservation theorem? Stage de M2, MPRI - - PowerPoint PPT Presentation

do you know what is a preservation theorem
SMART_READER_LITE
LIVE PREVIEW

Do you know what is a preservation theorem? Stage de M2, MPRI - - PowerPoint PPT Presentation

0 Do you know what is a preservation theorem? Stage de M2, MPRI Aliaume Lopez 11 Juin 2019 Sylvain Schmitz Jean Goubault-Larrecq 1 Preservation Theorems Motivations Equivalence : Database Finite Model Evaluation of a query on an


slide-1
SLIDE 1

Do you know what is a preservation theorem?

slide-2
SLIDE 2

Preservation Theorems

Stage de M2, MPRI

Aliaume Lopez 11 Juin 2019

Sylvain Schmitz Jean Goubault-Larrecq 1

slide-3
SLIDE 3

Motivations

slide-4
SLIDE 4

Database theory 101

Preservation theorem A monotone formula φ ∈ FO[σ] is equivalent to a simple formula ψ. Equivalence : Database Finite Model Evaluation of a query on an incomplete database corresponds to evaluation on a family of structures.

  • 1. Existence of a universal model to answer certain answers is

equivalent to a preservation theorem (Used in the Chase algorithm (Deutsch et al., 2008)).

  • 2. Naïve evaluation of a query Q yields certain answers if and only

if Q is monotone (Gheerbrant et al., 2014).

2

slide-5
SLIDE 5

Database theory 101

Preservation theorem A monotone formula φ ∈ FO[σ] is equivalent to a simple formula ψ. Equivalence : Database ↔ Finite Model Evaluation of a query on an incomplete database corresponds to evaluation on a family of structures.

  • 1. Existence of a universal model to answer certain answers is

equivalent to a preservation theorem (Used in the Chase algorithm (Deutsch et al., 2008)).

  • 2. Naïve evaluation of a query Q yields certain answers if and only

if Q is monotone (Gheerbrant et al., 2014).

2

slide-6
SLIDE 6

Motivations

Finite models and logics

slide-7
SLIDE 7

A good example is far better than a good precept.

Finite structures over σ ≜ {•, , } D ≜ {1, 2, 3}

  • ≜ {2}
  • ≜ {(1, 2), (3, 3)}
  • ≜ {(1, 3), (3, 1)}

1 2 3 Logical formulas FO[•, , ] φ := ∃x.φ | φ ∧ φ | ¬φ | • x | x y | x y ∃x.∀y.¬((•y) ∧ ¬(x y))

3

slide-8
SLIDE 8

The Bible tells us to love our neighbors, and also to love our enemies; probably because generally they are the same people.

x0 x1 x2 x3 xd x4 x5 x6 x7 x8 x9 ∃x.∀y.(x y) = ⇒ (•y) B(x0, 1)

Figure 1 – Locality of FO

4

slide-9
SLIDE 9

The Bible tells us to love our neighbors, and also to love our enemies; probably because generally they are the same people.

x0 x1 x2 x3 xd x4 x5 x6 x7 x8 x9 ∃x.∀y.(x y) = ⇒ (•y) B(x0, 1)

Figure 1 – Locality of FO

4

slide-10
SLIDE 10

Chaos is merely order waiting to be deciphered.

Preorders over finite structures Induced substructure ⊆i Strong Injective Homomorphism Substructure ⊆ Injective homomorphism Homomorphism → Homomorphism

5

slide-11
SLIDE 11

Orders on finite structures

⊆i, ⊆, → ̸⊆i, ⊆, → ̸⊆i, ̸⊆, →

Figure 2 – An investment in knowledge pays the best interest.

6

slide-12
SLIDE 12

Stone Duality …Lift, Lift, Lift!

φ ≜ ∃x. deg(x) ≥ 3 Upwards closed ⊆i ⊆i ⊆i

Figure 3 – Finite graphs encoded using Σ ≜ {E}

7

slide-13
SLIDE 13

Stone Duality …Lift, Lift, Lift!

φ ≜ ∃x. deg(x) ≥ 3 Upwards closed ⊆i ⊆i ⊆i

Figure 3 – Finite graphs encoded using Σ ≜ {E}

7

slide-14
SLIDE 14

Stone Duality …Lift, Lift, Lift!

φ ≜ ∃x. deg(x) ≥ 3 Upwards closed ⊆i ⊆i ⊆i

Figure 3 – Finite graphs encoded using Σ ≜ {E}

7

slide-15
SLIDE 15

Stone Duality …Lift, Lift, Lift!

φ ≜ ∃x. deg(x) ≥ 3 Upwards closed ⊆i ⊆i ⊆i

Figure 3 – Finite graphs encoded using Σ ≜ {E}

7

slide-16
SLIDE 16

Stone Duality …Lift, Lift, Lift!

φ ≜ ∃x. deg(x) ≥ 3 Upwards closed ⊆i ⊆i ⊆i

Figure 3 – Finite graphs encoded using Σ ≜ {E}

7

slide-17
SLIDE 17

Motivations

Preservation theorems

slide-18
SLIDE 18

Link between syntax and semantics

Known results Str(σ) Ordre Fragment FinStr(σ) Łós-Tarski ✓ ⊆i EFO ✗ Tait (1959) Tarski-Lyndon ✓ ⊆ EPFO̸= ✗ Ajtai and Gurevich (1994) H.P.T. ✓ → EPFO ✓ Rossman (2008)

8

slide-19
SLIDE 19

Link between syntax and semantics

Known results Str(σ) Ordre Fragment FinStr(σ) Łós-Tarski ✓ ⊆i EFO ✗ Tait (1959) Tarski-Lyndon ✓ ⊆ EPFO̸= ✗ Ajtai and Gurevich (1994) H.P.T. ✓ → EPFO ✓ Rossman (2008)

8

slide-20
SLIDE 20

Link between syntax and semantics

Known results Str(σ) Ordre Fragment FinStr(σ) Łós-Tarski ✓ ⊆i EFO ✗ Tait (1959) Tarski-Lyndon ✓ ⊆ EPFO̸= ✗ Ajtai and Gurevich (1994) H.P.T. ✓ → EPFO ✓ Rossman (2008)

8

slide-21
SLIDE 21

Relativisation

Lemma Preservation theorems do not relativise to subclasses.

9

slide-22
SLIDE 22

Motivations

Classical results

slide-23
SLIDE 23

Proof of a classical result

Łós-Tarski's theorem Let φ be a closed formula, preserved under induced substructure. There exists a closed existential formula ψ such that φ ⇐ ⇒ ψ. Proof

Considérons T et universelle . Par construction, T . Soit M un modèle de T , montrons que M est un modèle de . Pour cela, considérons M . Par l’absurde, cette théo- rie est incohérente, le théorème de compacité permet d’en ex- traire une théorie finie incohérente. Or, M est stable par conjonction finie et est cohérente. Ainsi, il existe une formule M telle que est incohérente. Par construction, cela veut dire que . Ainsi, T , et donc M , ce qui est absurde. Ainsi, M possède un modèle N, par construction M

i

N, N donc M . Par la suite, T est incohérente. Donc en utilisant le théo- rème de compacité, on déduit que celle-ci possède un sous en- semble fini incohérent. Comme T est cohérente, on a donc une formule dans T qui est équivalente à .

Compactness

10

slide-24
SLIDE 24

Proof of a classical result

Łós-Tarski's theorem Let φ be a closed formula, preserved under induced substructure. There exists a closed existential formula ψ such that φ ⇐ ⇒ ψ. Proof

Considérons T∀ ≜ {θ | φ ⊢ θ et θ universelle }. Par construction, φ ⊢ T∀. Soit M un modèle de T∀, montrons que M est un modèle de φ. Pour cela, considérons {φ} ∪ Diag(M). Par l’absurde, cette théo- rie est incohérente, le théorème de compacité permet d’en ex- traire une théorie finie incohérente. Or, Diag(M) est stable par conjonction finie et est cohérente. Ainsi, il existe une formule θ ∈ Diag(M) telle que {θ, φ} est incohérente. Par construction, cela veut dire que φ ⊢ ¬θ. Ainsi, ¬θ ∈ T∀, et donc M | = ¬θ, ce qui est absurde. Ainsi, {φ}∪Diag(M) possède un modèle N, par construction M ⊆i N, N | = φ donc M | = φ. Par la suite, {¬φ}∪T∀ est incohérente. Donc en utilisant le théo- rème de compacité, on déduit que celle-ci possède un sous en- semble fini incohérent. Comme T∀ est cohérente, on a donc une formule dans T∀ qui est équivalente à φ.

Compactness

10

slide-25
SLIDE 25

Involved counter-example

The sad truth The family S of simple planar graphs using only two labels does not satisfy a preservation theorem for ⊆i. Adaptation Can be (using some tricks) adapted to ⊆.

11

slide-26
SLIDE 26

Hide this family that I shall not see

Figure 4 – The graph G5

12

slide-27
SLIDE 27

Motivations

Two sides of a same coin.

slide-28
SLIDE 28

First example : Finite paths

Lemma The family P = {Pk | k ∈ N≥1} of finite paths satisfies a preservation theorem for ⊆i.

13

slide-29
SLIDE 29

First example : Finite paths

⊆i ⊆i ⊆i ⊆i ⊆i . . . ✗ ✗ ✗ ✗ ✓ Monotone

Figure 5 – Evaluation of a monotone formula φ over P

14

slide-30
SLIDE 30

First example : Finite paths

⊆i ⊆i ⊆i ⊆i ⊆i . . . ✗ ✗ ✗ ✗ ✓ Monotone

Figure 5 – Evaluation of a monotone formula φ over P

14

slide-31
SLIDE 31

First example : Finite paths

Lemma A formula φ preserved under ⊆i on P is equivalent to ∃x1, . . . , ∃xk.x1 ̸= x2 ̸= · · · ̸= xk (1) Notes (i) The order

i is total and well founded over

(ii) No property of FO were ever used!

15

slide-32
SLIDE 32

First example : Finite paths

Lemma A formula φ preserved under ⊆i on P is equivalent to ∃x1, . . . , ∃xk.x1 ̸= x2 ̸= · · · ̸= xk (1) Notes (i) The order ⊆i is total and well founded over P (ii) No property of FO were ever used!

15

slide-33
SLIDE 33

First example : Generalisation

Well Quasi Order / wqo (e.g. Kruskal, 1972) U B

Figure 6 – Every non empty upwards closed set U has a non empty finite basis of (finite) minimal elements.

Application preservation (2)

16

slide-34
SLIDE 34

First example : Generalisation

Well Quasi Order / wqo (e.g. Kruskal, 1972) U B

Figure 6 – Every non empty upwards closed set U has a non empty finite basis of (finite) minimal elements.

Application preservation (2)

16

slide-35
SLIDE 35

First example : Generalisation

Well Quasi Order / wqo (e.g. Kruskal, 1972) U B

Figure 6 – Every non empty upwards closed set U has a non empty finite basis of (finite) minimal elements.

Application wqo = ⇒ preservation (2)

16

slide-36
SLIDE 36

Second example : Finite cycles

Lemma The family C = {Ck | k ∈ N≥3} of finite cycles satisfies a preservation theorem for ⊆i.

17

slide-37
SLIDE 37

Second example : Finite cycles

Locality ✗ ✓ ✗ ✓ ✓ · · ·

̸⊆i i̸⊇ ̸⊆i i̸⊇ ̸⊆i i̸⊇ ̸⊆i i̸⊇ ̸⊆i i̸⊇

⊆i

Figure 7 – Evaluation of a monotone formula φ over C

18

slide-38
SLIDE 38

Second example : Finite cycles

Locality ✗ ✓ ✗ ✓ ✓ · · ·

̸⊆i i̸⊇ ̸⊆i i̸⊇ ̸⊆i i̸⊇ ̸⊆i i̸⊇ ̸⊆i i̸⊇

⊆i

Figure 7 – Evaluation of a monotone formula φ over C

18

slide-39
SLIDE 39

Second example : Finite cycles

Locality ✗ ✓ ✗ ✓ ✓ · · ·

̸⊆i i̸⊇ ̸⊆i i̸⊇ ̸⊆i i̸⊇ ̸⊆i i̸⊇ ̸⊆i i̸⊇

⊆i

Figure 7 – Evaluation of a monotone formula φ over C

18

slide-40
SLIDE 40

Second example : Finite cycles

Locality ✗ ✓ ✗ ✓ ✓ · · ·

̸⊆i i̸⊇ ̸⊆i i̸⊇ ̸⊆i i̸⊇ ̸⊆i i̸⊇ ̸⊆i i̸⊇

⊆i

Figure 7 – Evaluation of a monotone formula φ over C

18

slide-41
SLIDE 41

Second example : Finite cycles

Lemma Every formula φ preserved under ⊆i over C is equivalent to a formula

  • f the following form

(∨

k∈D

ψCk ) ∨ ψPn (3) (∨

k∈D

ψCk ) (4) Where D is a finite set of integers below k and M | = ψU ⇐ ⇒ U ⊆i M. Notes (i) The order

i is just isomorphism over

, which is not . (ii) Locality of FO is crucial in the construction

19

slide-42
SLIDE 42

Second example : Finite cycles

Lemma Every formula φ preserved under ⊆i over C is equivalent to a formula

  • f the following form

(∨

k∈D

ψCk ) ∨ ψPn (3) (∨

k∈D

ψCk ) (4) Where D is a finite set of integers below k and M | = ψU ⇐ ⇒ U ⊆i M. Notes (i) The order ⊆i is just isomorphism over C, which is not wqo. (ii) Locality of FO is crucial in the construction

19

slide-43
SLIDE 43

Motivations

A landscape complex enough

slide-44
SLIDE 44

Sparsity (Nešetřil and Ossona de Mendez, 2010)

Edgeless v ( Star forests ✏ ( Path forests v ✏ Bounded tree-depth ✏ Forests s ✏ Bounded tree-width * Planar ✏ Bounded degree ≈ Uniformly Wide y ✏ y Bounded genus ✏ Excluded apex minor ✏ " Excluded minor ✏

  • Bounded local tree-width

✏ Excluded topological minor v ✏ Uniformly Almost wide + Bounded expansion ✏ Locally excluded minors s Bounded local expansion ✏ Nowhere dense ≈ Uniformly Quasi-wide ✏ Dense

wqo

⊆i ⊆ → ⊆i ⊆ → ⊆i ⊆ → ⊆i ⊆ → ⊆i ⊆ →

20

slide-45
SLIDE 45

Sparsity (Nešetřil and Ossona de Mendez, 2010)

Edgeless v ( Star forests ✏ ( Path forests v ✏ Bounded tree-depth ✏ Forests s ✏ Bounded tree-width * Planar ✏ Bounded degree ≈ Uniformly Wide y ✏ y Bounded genus ✏ Excluded apex minor ✏ " Excluded minor ✏

  • Bounded local tree-width

✏ Excluded topological minor v ✏ Uniformly Almost wide + Bounded expansion ✏ Locally excluded minors s Bounded local expansion ✏ Nowhere dense ≈ Uniformly Quasi-wide ✏ Dense

wqo

⊆i ⊆ → ⊆i ⊆ → ⊆i ⊆ → ⊆i ⊆ → ⊆i ⊆ →

20

slide-46
SLIDE 46

A structural approach

Bounded Tree Depth Bounded Shrub Depth m-partite graph Co-graph Bounded Tree Width NLCk

F

F totally ordered Bounded Clique Width Brignall et al. (2018) Daligault et al. (2010)

wqo

21

slide-47
SLIDE 47

Personal Contribution

Logically pre-spectral spaces (LPS)

slide-48
SLIDE 48

logically pre-specral spaces : some definitions

logically pre-specral spaces U = φ B

Figure 8 – Every non empty and definable upwards closed set U admits a non empty finite basis of minimal (finite) elements.

22

slide-49
SLIDE 49

logically pre-specral spaces : some definitions

logically pre-specral spaces U = φ B

Figure 8 – Every non empty and definable upwards closed set U admits a non empty finite basis of minimal (finite) elements.

22

slide-50
SLIDE 50

logically pre-specral spaces : some definitions

Link with preservation theorems (i) If X is a logically pre-spectral space, then X admits a preservation theorems (ii) If X admits a preservation theorem and X is downwards closed in FinStr(σ) then X is a logically pre-spectral space.

23

slide-51
SLIDE 51

logically pre-specral spaces : some definitions

Looking back on examples (i) The family P is a logically pre-spectral space for ⊆i. (ii) The family C is NOT a logically pre-spectral space but admits a preservation theorem (iii) The family of graphs of degree bounded by 2 is a logically pre-spectral space for ⊆i, but is not wqo.

24

slide-52
SLIDE 52

logically pre-specral spaces : some definitions

C C φ ↑{A1, A2} A1 A2

Figure 9 – A not so well chosen illustration

25

slide-53
SLIDE 53

logically pre-specral spaces : some definitions

C C φ ↑{A1, A2} A1 A2

Figure 9 – A not so well chosen illustration

25

slide-54
SLIDE 54

Personal Contribution

Stability properties (yay!)

slide-55
SLIDE 55

Restriction, interpretations

FO-interpretation, surjective, monotone C D Γ Restriction to a subset…

  • 1. To an upwards closed definable set
  • 2. To a downwards closed definable set

26

slide-56
SLIDE 56

Algebraic operations!

Stability of logically pre-specral spaces Name Class Elements Disjoint union C ∪ D Cartesian product C × D A ⊎< B Dot product C · D A × B Finite words C∗ A1 ⊎< · · · ⊎< An Wreath product 1 C ⋊ D

  • 1. With some restrictions

27

slide-57
SLIDE 57

Personal Contribution

Applications

slide-58
SLIDE 58

Databases : Inner Join

NOM ÂGE Nadine 23 Frank 45 Georges 30 Cécile 29 ENTREPRISE EMPLOYÉ·E Facebook Nadine EDF Nadine Orange Georges Google Cécile NOM ÂGE ENTREPRISE Nadine 23 Facebook Nadine 23 EDF Georges 30 Orange Cécile 29 Google

  • Figure 10 – Inner of two tables using the equation NOM=EMPLOYÉ·E

28

slide-59
SLIDE 59

A dense class that is not wqo

< < < <

Figure 11 – A (small) element of ( Graph≤2 )∗

29

slide-60
SLIDE 60

A dense class that is not wqo

< < < <

Figure 11 – A (small) element of ( Graph≤2 )∗

29

slide-61
SLIDE 61

Conclusion

slide-62
SLIDE 62

Beautiful results

The ones presented here

  • 1. General framework to derive preservation theorems
  • 2. Stability properties extending known results
  • 3. Caveat : use with care!

« Some battles are silently won »

  • 1. Adaptations of counterexamples to ⊆
  • 2. Adaptations of counterexamples to the canonic C = Graph
  • 3. Study of tree-depth, clique-width, and relationship with wqo.

30

slide-63
SLIDE 63

What next?

Some ideas (i) Query enumeration (Schweikardt et al., 2018) (ii) Fast formula evaluation (Grohe et al., 2017) (iii) More powerful logics (Kuske and Schweikardt, 2018) (iv) Use more topology? (Nešetřil and Ossona de Mendez, 2012, Chapter 10)

31

slide-64
SLIDE 64

Ajtai, M. and Gurevich, Y. (1994). Datalog vs first-order logic. Brignall, R., Engen, M., and Vatter, V. (2018). A counterexample regarding labelled well-quasi-ordering. Graphs and Combinatorics, 34(6) :1395–1409. Daligault, J., Rao, M., and Thomassé, S. (2010). Well-quasi-order of relabel functions. Order, 27(3) :301–315. Deutsch, A., Nash, A., and Remmel, J. B. (2008). The chase revisited. In Proceedings of the Twenty-Seventh ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems, PODS 2008, June 9-11, 2008, Vancouver, BC, Canada, pages 149–158. Gheerbrant, A., Libkin, L., and Sirangelo, C. (2014). Naïve evaluation of queries over incomplete databases. ACM Trans. Database Syst., 39(4) :31 :1–31 :42. Grohe, M., Kreutzer, S., and Siebertz, S. (2017). Deciding first-order properties of nowhere dense graphs. Journal of the ACM (JACM), 64(3) :17.

slide-65
SLIDE 65

Kruskal, J. B. (1972). The theory of well-quasi-ordering : A frequently discovered concept. Journal of Combinatorial Theory, Series A, 13(3) :297–305. Kuske, D. and Schweikardt, N. (2018). Gaifman Normal Forms for Counting Extensions of First-Order Logic. In Chatzigiannakis, I., Kaklamanis, C., Marx, D., and Sannella, D., editors, 45th International Colloquium on Automata, Languages, and Programming (ICALP 2018), volume 107 of Leibniz International Proceedings in Informatics (LIPIcs), pages 133 :1–133 :14, Dagstuhl,

  • Germany. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik.

Nešetřil, J. and Ossona de Mendez, P. (2010). First order properties on nowhere dense structures. The Journal of Symbolic Logic, 75(3) :868–887. Nešetřil, J. and Ossona de Mendez, P. (2012). Sparsity : Graphs, Structures, and Algorithms. Springer Publishing Company, Incorporated.

slide-66
SLIDE 66

Rossman, B. (2008). Homomorphism preservation theorems. J. ACM, 55(3) :15 :1–15 :53. Schweikardt, N., Segoufin, L., and Vigny, A. (2018). Enumeration for fo queries over nowhere dense graphs. In Proceedings of the 37th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems, pages 151–163. ACM. Tait, W. W. (1959). A counterexample to a conjecture of scott and

  • suppes. The journal of symbolic logic, 24(1) :15–16.