a combinator language for theorem discovery
play

A Combinator Language for Theorem Discovery Phil Scott and Jacques - PowerPoint PPT Presentation

A Combinator Language for Theorem Discovery Phil Scott and Jacques Fleuriot July 13, 2012 Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery Overview Example: Incidence Reasoning Monad for Discovery/Search


  1. A Combinator Language for Theorem Discovery Phil Scott and Jacques Fleuriot July 13, 2012 Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  2. Overview ◮ Example: Incidence Reasoning ◮ Monad for Discovery/Search ◮ Composable Proof Trees ◮ Example: Forward Chaining Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  3. Example: Incidence Reasoning Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  4. Algebra for Theorem Discovery ◮ Expressing data flow ◮ Merging data ◮ Lifting Inference Rules over Discovery Process ◮ Filtering Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  5. Monad 0 : α m (+) : α m → α m → m ( >> =) : α m → ( α → β m ) → β m filter : ( α → bool ) → α m → α m oflist : α list → α m msum : α list m → α m Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  6. Idiom return : α → α m ap : ( α → β ) m → α m → β m fmap : ( α → β ) → α m → β m fmap2 : ( α → β → γ ) → α m → β m → γ m fmap3 : ( α → β → γ → δ ) → α m → β m → γ m → δ m sequence : α m list → α list m Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  7. Collection difference : α m → α m → α m maxima : ( α → α → bool ) → α m → α m unique : ( α → α → bool ) → α m → α m transpose : α m list → α list m Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  8. Theorem Discovery α m := α Stream ( collection ) . t subst : thm m → thm m → thm m contr : thm m → thm m → thm m mp : thm m → thm m → thm m rule1 : thm → thm m → thm m rule2 : thm → thm m → thm m → thm m rule3 : thm → thm m → thm m → thm m → thm m disjuncts : thm → thm m conjuncts : thm → thm m split : thm m → thm m delay : α m → α m Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  9. Example Search Algebra by incidence thms = let rec collinear = maxima ( filter is collinear thms + fmap3 col union ( delay collinear ) ( delay collinear ) neqs ) and non collinear = maxima ( filter is non collinear thms + fmap3 triangle collinear ( delay non collinear ) neqs ) and eqs = filter is eq thms + maxima ( msum ( fmap3 intersect collinears collinear non collinear )) and neqs = maxima ( filter is neq thms + sum ( fmap2 colncolneq collinear ( delay non collinear )) + sum ( fmap ′ CONJUNCTS ( rule1 ncol neq non collinear ))) and planes = maxima ( filter is plane thms + fmap3 ′ plane union ( delay planes ) ( delay planes ) non collinear + fmap3 ′ colplaneplane collinear ( delay planes ) neqs + fmap2 ′ colcolplane collinear collinear + fmap ′ colplane collinear + fmap ′ ncolplane non collinear ) in collinear + non collinear + eqs + neqs + planes Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  10. Case-splitting Book-keeping Case-analysis φ 1 ∧ φ 2 ∧· · ·∧ φ n ∧ ( P → ψ 1 ∧ ψ 2 ∧ · · · ∧ ψ n ) ∧ ( Q → χ 1 ∧ χ 2 ∧· · ·∧ χ n ∧ ( R → α 1 ∧ α 2 ∧ · · · ∧ α n ) ∧ ( S → β 1 ∧ β 2 ∧ · · · ∧ β n )) [ φ 1 , φ 2 , . . . , φ n ] Q P [ ψ 1 , ψ 2 , . . . , ψ n ][ χ 1 , χ 2 , . . . , χ n ] R S [ α 1 , α 2 , . . . , α n ] [ β 1 , β 2 , . . . , β n ] Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  11. Tree Merging Parallel Merge/Combine xs xs ′ Q P X Y + ys ′ zs ′ ys zs Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  12. Tree Merging Parallel Merge/Combine xs xs ′ Q P X Y + ys ′ zs ′ ys zs xs Q P ys + xs ′ zs + xs ′ = X Y X Y ys ′ zs ′ ys ′ zs ′ Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  13. Tree Merging with Simplification xs ′ xs Q Q P P + ys zs ys ′ zs ′ xs Q P ys + xs ′ zs + xs ′ = Q Q P P ys ′ zs ′ ys ′ zs ′ Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  14. Tree Merging with Simplification xs ′ xs Q Q P P + ys zs ys ′ zs ′ xs Q P ys + xs ′ zs + xs ′ = Q Q P P ys ′ zs ′ ys ′ zs ′ Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  15. Tree Merging with Simplification xs ′ xs Q Q P P + ys zs ys ′ zs ′ xs Q P = ys + xs ′ + ys ′ zs + xs ′ Q P ys ′ zs ′ Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  16. Tree Merging with Simplification xs ′ xs Q Q P P + ys zs ys ′ zs ′ xs Q P = ys + xs ′ + ys ′ zs + xs ′ Q P ys ′ zs ′ Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  17. Tree Merging with Simplification xs xs ′ Q Q P P + ys ′ zs ′ ys zs xs Q P = ys + xs ′ + ys ′ zs + xs ′ + zs ′ Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  18. Further Simplification xs ′ xs Q P X P ys zs + ys ′ zs ′ Q R S T U T R S ts ′ us ′ vs ′ ws ′ ts us vs ws Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  19. More Tree Filtering (left branch) If we have already assumed a particular case (red), we discard the alternative (blue) and merge into the parent. xs Q P ys R S ts us X P ys ′ zs ′ Q T R S ts ′ us ′ vs ′ ws ′ Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  20. More Tree Filtering (left branch) If we have already assumed a particular case (red), we discard the alternative (blue) and merge into the parent. xs Q P ys R S ts us X P ys ′ zs ′ Q T R S ts ′ us ′ vs ′ ws ′ Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  21. More Tree Filtering (left branch) xs ′ xs P P zs ′ ys + R S R S vs ′ ws ′ us ts Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  22. More Tree Filtering (left branch) xs ′ xs P P zs ′ ys + R S R S vs ′ ws ′ us ts xs + xs ′ P ys + zs ′ = R S us + vs ′ ts + ws ′ Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  23. More Tree Filtering (right branch) If a case has already been considered in an alternative branch (an uncle branch), we discard the case. xs Q P zs T vs X P ys ′ zs ′ Q T R S ts ′ us ′ vs ′ ws ′ Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  24. More Tree Filtering (right branch) If a case has already been considered in an alternative branch (an uncle branch), we discard the case. xs Q P zs T vs X P ys ′ zs ′ Q T R S ts ′ us ′ vs ′ ws ′ Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  25. More Tree Filtering (right branch) If a case has already been considered in an alternative branch (an uncle branch), we discard the case. xs Q P zs T vs X ys ′ Q T ts ′ us ′ Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  26. More Tree Filtering (right branch) If a case has already been considered in an alternative branch (an uncle branch), we discard the case. xs Q P zs T vs X ys ′ Q T ts ′ us ′ Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  27. More Tree Filtering (right branch) If a case has already been considered in an alternative branch (an uncle branch), we discard the case. xs Q P zs T vs X ys ′ + ts ′ + us ′ Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  28. After Full Simplification xs ′ xs Q P X P ys zs + ys ′ zs ′ Q R S T U T R S ts ′ us ′ vs ′ ws ′ ts us vs ws xs + xs ′ Q P = ys + zs ′ zs R S T U ts + vs ′ us + ws ′ vs ws X X ys ′ + ts ′ + us ′ ys ′ + us ′ Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  29. Forward-chaining chain imps thms = imps >> = ( λ imp . if is imp imp then chain ( fmap’ ( MATCH MP imp ) thms ) thms else return imp ) f rules base = chain ( oflist rules ) ( delay f rules thms ) + delay ( f rules base ) Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  30. Integration ◮ Concurrent discovery ◮ Writer transformer to add assumption dependencies obviously : ( thm chain → thm chain ) → assumption list → step clearly : ( thm chain → thm chain ) → assumption list → step Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  31. Contributions ◮ Language for guiding discovery ◮ Integration with proof contexts ◮ ML library for monads, idioms and transformers ◮ Improved library for lazy lists Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

  32. Conclusion and Further Work ◮ Search algebras ◮ Monads and idioms ◮ Implementing data-flow for discovery ◮ Integration with interactive theorem proving ◮ Case-splitting via composable proof trees Future work ◮ Higher-order reasoning/existential reasoning ◮ Efficient subsumption Phil Scott and Jacques Fleuriot A Combinator Language for Theorem Discovery

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend