coalgebra data
play

Coalgebra & Data Clemens Kupke University of Strathclyde - PowerPoint PPT Presentation

Coalgebra & Data Clemens Kupke University of Strathclyde Glasgow, Scotland Alcop 2015, Delft, 7 May 2015 C. Kupke Coalgebra & Data Overview I iteration-free coalgebraic PDL I brief overview I completeness I Datalog I Intro:


  1. Coalgebra & Data Clemens Kupke University of Strathclyde Glasgow, Scotland Alcop 2015, Delft, 7 May 2015 C. Kupke Coalgebra & Data

  2. Overview I iteration-free coalgebraic PDL I brief overview I completeness I Datalog ± I Intro: ontology-based data access & Datalog ± I the problem with negative information I normal Datalog ± I Coalgebra & Data C. Kupke Coalgebra & Data

  3. Part 0: Basics of Coalgebraic Logics in 4 slides C. Kupke Coalgebra & Data

  4. Coalgebraic Modal Logic & PDL I Observation: Kripke models are P -coalgebras, ie, pairs ( X , γ ) with γ : X � ! P X I in this context X is usually a set I Idea: Develop modal logic for T-coalgebras, where T is an endofunctor. Development should be parametric in T. C. Kupke Coalgebra & Data

  5. Coalgebraic Logic: Syntax Given a modal similarity type Λ (ie., a collection of modal operators) and a set Var of propositional variables. Definition The set F ( Λ ) of formulas over Λ is defined a follows: F ( Λ ) 3 ϕ ::= p 2 Var | ? | ¬ ϕ | ϕ ^ ϕ | ~ ϕ , ~ 2 Λ Note In this talk the (basic) similarity type will consist of one unary modality only! C. Kupke Coalgebra & Data

  6. Coalgebraic Logic: Semantics In order to be able to interpret modal formulas we need I a set functor T I for every modal operator ~ 2 Λ a natural transformation ~ : P � ! PT , where P denotes the contravariant power set functor. Formulas are then interpreted over T-models ( X , γ , V ) consisting of γ : X � ! TX and V : Var � ! P ( X ) . [ [ p ] ] = V ( p ) for p 2 Var . . . ])) = γ � 1 ( ~ ([ [ ~ ϕ ] P γ ( ~ ([ [ ] = [ ϕ ] [ ϕ ] ])) C. Kupke Coalgebra & Data

  7. ✏ / Equivalently ~ : P � ! PT is in one-to-one correspondence to I b op P (T-coalgebras to neighbourhood frames) ~ : T � ! P ] 2 ( b x | = ~ ϕ i ff [ [ ϕ ] ~ � γ )( x ) . I ˘ ~ : T2 � ! 2 (“allowed 0-1 patterns”) χ [ [ ϕ ] ] X 2 γ T ( χ [ ] ) / T ( 2 ) ˘ ~ [ ϕ ] / 2 T ( X ) ˘ ( X , γ , V ) , x | = ~ ϕ ~ ( T ( χ [ i ff ] )( c ( x )) = 1. [ ϕ ] C. Kupke Coalgebra & Data

  8. Examples I T = P , ~ = 2 : ~ ( U ) = { V ✓ X | U ✓ V } , b ~ ( V ) { U ✓ X | U ✓ V } and = ˘ ~ ( V ✓ P 2 ) = 1 i ff 0 62 V I T = M , ~ = 2 : ~ ( U ) = { N 2 M X | U 2 N } b ~ ( N ) = N ˘ ~ ( N 2 M 2 ) = 1 i ff 1 2 N . . . C. Kupke Coalgebra & Data

  9. Part I: Coalgebraic PDL (joint work H.H. Hansen, R.Leal) C. Kupke Coalgebra & Data

  10. Propositional Dynamic Logic (PDL) Fischer & Ladner, 1977. Reason about program correctness. [ α ] ϕ “after all successful executions of program α , ϕ holds” I Syntax: formulas ϕ ::= p 2 P 0 | ¬ ϕ | ϕ _ ϕ | [ α ] ϕ a 2 A 0 | α ; α | α [ α | α ⇤ | ϕ ? programs α 2 A ::= composition (;), choice ( [ ), iteration ( ⇤ ), tests ( ϕ ? ) I Multi-modal Kripke semantics: M = ( X , { R α | α 2 A } , V ) where X is state space, I R α : X � ! P ( X ) (relation, nondeterministic programs), I V : P 0 � ! P ( X ) is a valuation. M , x | 8 y 2 X . xR α y ! M , y | = [ α ] ϕ i ff = ϕ . C. Kupke Coalgebra & Data

  11. Standard PDL Models I Def. M = ( X , { R α | α 2 A } , V ) is standard if R α ; β = R α � R β (relation composition) R α [ R β R α [ β = R ⇤ R α ∗ = α (reflexive, transitive closure) { ( x , x ) | x 2 [ ] } R ϕ ? = [ ϕ ] I Sound and (weakly) complete axiomatisation of standard models [Kozen & Parikh 1981]: PDL = Normal modal logic K (ML of Kripke frames) plus: [ α ; β ] ϕ $ [ α ][ β ] ϕ [ α [ β ] ϕ $ [ α ] ϕ ^ [ β ] ϕ [ ψ ?] ϕ $ ( ψ ! ϕ ) ϕ ^ [ α ][ α ⇤ ] ϕ $ [ α ⇤ ] ϕ ϕ ^ [ α ⇤ ]( ϕ ! [ α ] ϕ ) ! [ α ⇤ ] ϕ C. Kupke Coalgebra & Data

  12. Game Logic (GL) Parikh, 1985. Strategic ability in determined 2-player games. h γ i ϕ “player 1 has strategy in γ to ensure outcome satisfies ϕ ” (“player 1 is e ff ective for ϕ ”) I Syntax: PDL syntax extended with dual operation on games: I γ 1 ; γ 2 : play γ 1 then γ 2 , I γ 1 [ γ 2 : player 1 chooses to play γ 1 or γ 2 , I γ ⇤ : player 1 chooses when to stop. I γ d : players switch roles. I Semantics: Game model M = ( X , { E γ | γ 2 Γ } , V ) where E γ : X � ! PP ( X ) is monotonic neighbourhood function: If U 2 E γ ( x ) and U ✓ U 0 then U 0 2 E γ ( x ) . U 2 E γ ( x ) i ff player 1 is e ff ective for U in γ starting in x. Modal semantics: M , x | = h γ i ϕ ] 2 E γ ( x ) i ff [ [ ϕ ] C. Kupke Coalgebra & Data

  13. Standard GL Models I Standard GL model: similar to PDL notion, U 2 E γ d ( x ) i ff X \ U / 2 E γ ( x ) . I GL = monotonic modal logic M (ML of mon. nbhd. frames) plus h γ ; δ i ϕ $ h γ ih δ i ϕ h γ [ δ i ϕ $ h γ i ϕ _ h δ i ϕ h γ d i ϕ $ ¬ h γ i ¬ ϕ h ψ ? i ϕ $ ( ψ ^ ϕ ) ϕ _ h γ ih γ ⇤ i ϕ ! h γ ⇤ i ϕ ϕ _ h γ i ϕ ! ψ h γ ⇤ i ϕ ! ψ I Without dual: sound and (weakly) complete [Parikh 1985]. I Without iteration: sound and strongly complete [Pauly 2001]. I Completeness of full GL still open. C. Kupke Coalgebra & Data

  14. Towards Coalgebraic Dynamic Logic Basic observation: I P is monad ( P , η , µ ) with: µ X ( { U i | i 2 I } ) = S η X ( x ) = { x } , i 2 I U i . I M is a monad ( M , η , µ ) with: η X ( x ) = { U ✓ X | x 2 U } µ X ( W ) = { U ✓ X | η P ( X ) ( U ) 2 W } I Composition of programs and games is Kleisli composition. Basic setup: I Action/program X � ! TX where T a Set-monad (T describes computation type, side-e ff ects, ...) I Sequential composition as Kleisli composition ⇤ T . ! ( TX ) A (A-labelled I Multi-program setting: X � T-coalgebra) where A is a set of program labels. C. Kupke Coalgebra & Data

  15. Coalgebra-Algebra Two perspectives: ! ( TX ) A T A -coalgebra, modal logic ξ : X � b ! ( TX ) X ξ : A � algebra homomorphism, program operations Questions: I What are “program” operations like [ and d ? I What is a standard model? I Which compositionality axioms? I How to prove soundness and completeness? C. Kupke Coalgebra & Data

  16. Pointwise Program Operations via Natural Operations I An n-ary natural operation on T is a natural transformation σ : T n � ! T I σ : T n � ! T yields pointwise operation on ( TX ) X , e.g., σ X X ( c 1 , c 2 )( x ) = σ X ( c 1 ( x ) , c 2 ( x )) I Given finitary signature functor Σ , a natural Σ -algebra is natural transformation θ : Σ T � ! T, and yields pointwise Σ -algebra θ X X : Σ (( TX ) X ) � ! ( TX ) X . C. Kupke Coalgebra & Data

  17. Natural and Pointwise Operations: Examples Natural operations on P : I Union [ : P ⇥ P � ! P is a natural operation, since f [ U [ U 0 ] = f [ U ] [ f [ U 0 ] ( P f ( U ) = f [ U ]) The pointwise extension of [ : P ⇥ P � ! P is union of relations ( R 1 [ R 2 )( x ) = R 1 ( x ) [ R 2 ( x ) . I Observation: Intersection and complement are not natural operations on P . Natural operations on M : I [ and \ (since preserved by f � 1 ). I Dual operation d : M � ! M where for all N 2 M ( X ) , and U ✓ X, U 2 N d i ff X \ U / 2 N. Dual game operation is the pointwise extension. C. Kupke Coalgebra & Data

  18. Standard dynamic models Given a countable set A 0 of atomic programs, and a signature functor Σ . Let A = Σ [ { ; } -terms over A 0 . We define: ! ( TX ) A is I Given natural algebra θ : Σ T � ! T then ξ : X � θ -standard i ff b ! ( TX ) X ξ : A � is a Σ -algebra homomorphism . ! ( TX ) A is ; -standard i ff I If T is a monad, then ξ : X � ξ ( α ; β ) = b b ξ ( α ) ⇤ b for all α , β 2 A, ξ ( β ) . C. Kupke Coalgebra & Data

  19. ↵ ◆ ↵ ◆ ↵ ◆ ↵ ◆ Sound Axioms for Pointwise Operations I Example: PDL axiom for choice [ α [ β ] p $ [ α ] p ^ [ β ] p. I Idea: b ~ : T � ! N turns operations θ on T into operations χ on N . ~ n + 3 N n b 2 n + 3 N ⇥ N b T n For example: P ⇥ P χ θ [ \ b ~ + 3 N 2 b + 3 N T P From χ : N n � ! N , we get rank-1 formula ϕ ( χ , α 1 , . . . , α n , p ) (not in this talk). Lemma ! ( TX ) A is θ -standard and χ : N n � If ξ : X � ! N is such that ~ � θ = χ � b b ~ n , then the rank-1 formula [ θ ( α 1 , . . . , α n )] p $ ϕ ( χ , α 1 , . . . , α n , p ) is valid in ξ . C. Kupke Coalgebra & Data

  20. Coalgebraic Logic (Def) A (modal) logic is a triple L = ( Λ , A , Θ ) where I Λ is a similarity type, I A ✓ Prop ( Λ ( Prop ( Var ))) is a set of rank-1 axioms, and I Θ ✓ F ( Λ ) is a set of frame conditions If ϕ 2 F ( Λ ) , we write ` L ϕ if ϕ can be derived from A [ Θ with the help of propositional reasoning (tautologies + MP), uniform substitution, and the congruence rule. ϕ $ ψ ~ ϕ $ ~ ψ C. Kupke Coalgebra & Data

  21. Dynamic Syntax Given I Σ , a signature (functor). I P 0 , a countable set of atomic propositions. I A 0 , a countable set of atomic programs. we define formulas F ( P 0 , A 0 , Σ ) 3 ϕ ::= p 2 P 0 | ¬ ϕ | ϕ _ ϕ | [ α ] ϕ programs A ( P 0 , A 0 , Σ ) 3 α ::= a 2 A 0 | α ; α | σ ( α 1 , . . . , α n ) where σ 2 Σ is n-ary. (Tests are incorporated later) C. Kupke Coalgebra & Data

  22. ( T , θ ) -Dynamic Logic Given I base logic L b = ( { 2 } , Ax ( 2 , T ) , ; ) (rank-1) I θ : Σ T � ! T and set A 0 of atomic actions. We define { [ α ] | α 2 A } , Λ = Ax ( 2 , T ) A [ “ θ -axioms 00 , Ax = { [ α ; β ] p $ [ α ][ β ] p | α , β 2 A , some fresh p 2 P 0 } , Fr = L ( θ ) = ( Λ , Ax , ; ) , L ( θ , ; ) = ( Λ , Ax , Fr ) . L ( θ ) and L ( θ , ; ) are ( T , θ ) -dynamic logics over L b . C. Kupke Coalgebra & Data

Recommend


More recommend