The equational theory of the natural join and of the inner union is decidable 1 Luigi Santocanale LIF, Aix-Marseille Universit´ e Meeting TICAMORE@Marseille, November 15-17, 2017 1 Preprint available on HAL: https://hal.archives-ouvertes.fr/hal-01625134/ 1/26
Plan Algebra from databases Some undecidable theories The structure of relational lattices Decidability of the equational theory of the relational lattices 2/26
Plan Algebra from databases Some undecidable theories The structure of relational lattices Decidability of the equational theory of the relational lattices 3/26
Databases, tables, sqls . . . 4/26
Databases, tables, sqls . . . 4/26
Operations on tables: the natural join Item Description Name Surname Item 33 Book Luigi Santocanale 33 ⊲ ⊳ 33 Livre Alan Turing 21 21 Machine Name Surname Item Description Luigi Santocanale 33 Book = Luigi Santocanale 33 Livre Alan Turing 21 Machine 5/26
Operations on tables: the inner union Name Surname Item Luigi Santocanale 33 Alan Turing 21 Name Surname Sport ∪ Diego Maradona Football Usain Bolt Athletics Name Surname Luigi Santocanale = Alan Turing Diego Maradona Usain Bolt 6/26
Lattices from databases Proposition. [Spight & Tropashko, 2006] The set of tables, whose columns are indexed by a subset of A and values are from a set D , is a lattice, with natural join as meet and inner union as join. R( D , A ) shall denote the lattice whose elements are tables, with columns indexed a subset of A and cells’ values are from a set D . A project (Tropashko). Rebuild Codd’s relational algebra out of lattice theoretic building blocks. 7/26
Plan Algebra from databases Some undecidable theories The structure of relational lattices Decidability of the equational theory of the relational lattices 8/26
A family of undecidable theories and problems Theorem (Maddux) The equational theory of 3 -dimensional diagonal free cylindric algebras is undecidable. Theorem (Hirsch and Hodkinson) It is not decidable whether a finite simple relation algebra embeds into a concrete one (a powerset of a binary product). Theorem (Hirsch, Hodkinson and Kurucz) It is not decidable whether a finite mutimodal frame has a surjective p-morphism from a universal product frame. 9/26
n -dimensional diagonal free cylindric algebras, aka the multidimensional modal logic S5 n ◮ n -dimensional cylindric algebras: algebraic modelling of first order logic with no more than n variables. Diagonal free: no equality. ◮ n -multimodal logic S5 : we have n modal operators � i � , i = 1 , . . . , n , each one is S5 . ◮ S5 n is the n -multimodal logic determined by the universal product frames. These are product sets X 1 × . . . × X n with accessibility given by: ( x 1 , . . . , x n ) R i ( y 1 , . . . , y n ) iff x j = y j , for all j � = i . ◮ For n ≥ 3, S5 n has the finite model property, it is recursively enumerable, yet it is not decidable. 10/26
Quasiequations, equations ◮ A quasiequation (definite Horn clause) is the universal closure of a formula of the form s 1 = t 1 ∧ . . . ∧ s n = t n = ⇒ s 0 = t 0 , with s i , t i , i = 0 , . . . , n , terms build over a fixed signature. ◮ The quasiequational theory of a class K : the set of quasiequations holding in all elements of K . 11/26
Quasiequations, equations ◮ A quasiequation (definite Horn clause) is the universal closure of a formula of the form s 1 = t 1 ∧ . . . ∧ s n = t n = ⇒ s 0 = t 0 , with s i , t i , i = 0 , . . . , n , terms build over a fixed signature. ◮ The quasiequational theory of a class K : the set of quasiequations holding in all elements of K . ◮ An equation is a quasiequation as above with n = 0. ◮ The equational theory of a class K : the set of equations holding in all elements of K . See the standard Birkhoff’s theorem. 11/26
Undecidable quasiequational theories of relational lattices Theorem (Litak, Mikul´ as and Hidders, 2015) The set of quasiequations in the signature ( ∧ , ∨ , H ) that are valid on relational lattices is undecidable. 12/26
Undecidable quasiequational theories of relational lattices Theorem (Litak, Mikul´ as and Hidders, 2015) The set of quasiequations in the signature ( ∧ , ∨ , H ) that are valid on relational lattices is undecidable. This was refined to: Theorem (Santocanale, RAMICS 2017) The set of quasiequations in the signature ( ∧ , ∨ ) that are valid on relational lattices is undecidable. where we actually proved a stronger result: Theorem (Santocanale 2017) It is undecidable whether a finite subdirectly irreducible lattice embeds into some R( D , A ) . 12/26
Plan Algebra from databases Some undecidable theories The structure of relational lattices Decidability of the equational theory of the relational lattices 13/26
The relational lattices R( D , A ) A a set of attributes, D a set of values. An element of R( D , A ): ◮ a pair ( α, Y ) with α ⊆ A and Y ⊆ D α . We have ( α 1 , Y 1 ) ≤ ( α 2 , Y 2 ) iff α 2 ⊆ α 1 and Y 1 ↾ ↾ α 2 ⊆ Y 2 . NB : ◮ ↾ ↾ is restriction: Y ↾ ↾ α = { f ↾ α | f ∈ Y } . 14/26
Meet and join ( α 1 , Y 1 ) ∧ ( α 2 , Y 2 ) := ( α 1 ∪ α 2 , Y ) where Y = { f | f ↾ α i ∈ Y i , i = 1 , 2 } = i α 1 ∪ α 2 ( Y 1 ) ∩ i α 1 ∪ α 2 ( Y 2 ) , ( α 1 , Y 1 ) ∨ ( α 2 , Y 2 ) := ( α 1 ∩ α 2 , Y ) where Y = { f | ∃ i ∈ { 1 , 2 } , ∃ g ∈ Y i s.t. g ↾ α 1 ∩ α 2 = f } = Y 1 ↾ ↾ α 1 ∩ α 2 ∪ Y 2 ↾ ↾ α 1 ∩ α 2 . NB : ◮ i is cylindrification: i α ( Y ) = { f | f ↾ α ∈ Y } . 15/26
Representation via closure operators The Hamming/Priess Crampe-Ribenboim ultrametric distance on D A : δ ( f , g ) := { x ∈ A | f ( x ) � = g ( x ) } . NB: this distance takes values in the join-semilattice ( P ( A ) , ∅ , ∪ ). 16/26
Representation via closure operators The Hamming/Priess Crampe-Ribenboim ultrametric distance on D A : δ ( f , g ) := { x ∈ A | f ( x ) � = g ( x ) } . NB: this distance takes values in the join-semilattice ( P ( A ) , ∅ , ∪ ). A subset Z of A + D A is closed if � δ ( f , g ) ⊆ A ∩ Z � implies f ∈ Z . g ∈ D A ∩ Z 16/26
Representation via closure operators The Hamming/Priess Crampe-Ribenboim ultrametric distance on D A : δ ( f , g ) := { x ∈ A | f ( x ) � = g ( x ) } . NB: this distance takes values in the join-semilattice ( P ( A ) , ∅ , ∪ ). A subset Z of A + D A is closed if � δ ( f , g ) ⊆ A ∩ Z � implies f ∈ Z . g ∈ D A ∩ Z Proposition. [Litak, Mikul´ as and Hidders 2015] R( D , A ) is isomorphic to the lattice of closed subsets of A + D A . 16/26
Lattices from generalized ultrametric spaces In a similar way, we can construct a lattice from any generalized ultrametric space ( X , δ ) over some P ( A ). A subset Z ∈ P ( A + X ) is closed if � δ ( f , g ) ⊆ A ∩ Z � implies f ∈ Z . g ∈ X ∩ Z 17/26
Lattices from generalized ultrametric spaces In a similar way, we can construct a lattice from any generalized ultrametric space ( X , δ ) over some P ( A ). A pair ( α, Y ) ∈ P ( A ) × P ( Y ) is closed if � δ ( f , g ) ⊆ α � implies f ∈ Z . g ∈ Y 17/26
Lattices from generalized ultrametric spaces In a similar way, we can construct a lattice from any generalized ultrametric space ( X , δ ) over some P ( A ). A pair ( α, Y ) ∈ P ( A ) × P ( Y ) is closed if � δ ( f , g ) ⊆ α � implies f ∈ Z . g ∈ Y Thus we put L( X , δ ) := { ( α, Y ) | � α � Y ⊆ Y } , where � α � Y = { f ∈ X | ∃ g ∈ Y s.t. δ ( f , g ) ⊆ α } . 17/26
Lattices from generalized ultrametric spaces In a similar way, we can construct a lattice from any generalized ultrametric space ( X , δ ) over some P ( A ). A pair ( α, Y ) ∈ P ( A ) × P ( Y ) is closed if � δ ( f , g ) ⊆ α � implies f ∈ Z . g ∈ Y Thus we put L( X , δ ) := { ( α, Y ) | � α � Y ⊆ Y } , where � α � Y = { f ∈ X | ∃ g ∈ Y s.t. δ ( f , g ) ⊆ α } . Clearly R( D , A ) = L( D A , δ ). 17/26
Universal product spaces as injective generalized ultrametric spaces Lemma TFAE : ◮ ( X , δ ) is injective in the category of generalized ultrametric spaces over P ( A ) , ◮ ( X , δ ) is, up to isomorphism, a universal product space: � X = X a , δ ( x , y ) = { a ∈ A | x a � = y a } . a ∈ A Remark : intuitively, injective means complete. 18/26
Relational lattices as modal logic We can interpret the theory of the lattices L( X , δ ) in a sort of multidimensional S5 n modal logic. Modal operators are indexed by subsets of A : � α � Y := { f ∈ D A | ∃ g ∈ Y s.t. δ ( f , g ) ⊆ α } . If ( X , δ ) is injective, then we have the following logical equivalence: � α 1 ∪ α 2 � Y = � α 1 �� α 2 � Y . Meet is conjunction, where the join is: ( α 1 , Y 1 ) ∨ ( α 2 , Y 2 ) = ( α 1 ∪ α 2 , � α 1 ∪ α 2 � ( Y 1 ∪ Y 2 )) = ( α 1 ∪ α 2 , � α 1 ∪ α 2 � Y 1 ∪ � α 1 ∪ α 2 � Y 2 ) = ( α 1 ∪ α 2 , � α 2 �� α 1 � Y 1 ∪ � α 1 �� α 2 � Y 2 ) = ( α 1 ∪ α 2 , � α 2 � Y 1 ∪ � α 1 � Y 2 ) . 19/26
Plan Algebra from databases Some undecidable theories The structure of relational lattices Decidability of the equational theory of the relational lattices 20/26
Strategy ◮ Every lattice equation t = s is equivalent to a pair of “inclusions”, t ≤ s and s ≤ t . 21/26
Recommend
More recommend