Your SlideShare is downloading. ×
Galois: A Language for Proofs Using Galois Connections and Fork Algebras
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Galois: A Language for Proofs Using Galois Connections and Fork Algebras

230
views

Published on

Presented at PLMMS'09, Munich, Germany in August 21, 2011.

Presented at PLMMS'09, Munich, Germany in August 21, 2011.

Published in: Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
230
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Galois: A Language for Proofs Using Galois connections and Fork Algebras Paulo Silva1 Joost Visser2 José Oliveira1 1 CCTC University of Minho Braga, Portugal 2 Software Improvement Group The Netherlands PLMMS’09 August 21, 2009 Munich, Germany Paulo Silva (UMinho) Galois PLMMS’09 1 / 28
  • 2. Outline Outline 1 Introduction Motivation Objectives 2 Theoretical background Indirect equality Galois connections Fork algebras Point-free transform 3 Galois and Galculator Galois Galculator 4 Summary Summary Future work Paulo Silva (UMinho) Galois PLMMS’09 2 / 28
  • 3. Introduction Outline 1 Introduction Motivation Objectives 2 Theoretical background Indirect equality Galois connections Fork algebras Point-free transform 3 Galois and Galculator Galois Galculator 4 Summary Summary Future work Paulo Silva (UMinho) Galois PLMMS’09 3 / 28
  • 4. Introduction Motivation Whole division Prove (a ÷ b) ÷ c = a ÷ (c × b) for b and c = 0. Easy if ÷ is the real number division Also valid in natural numbers but the proof is not so straightforward Paulo Silva (UMinho) Galois PLMMS’09 4 / 28
  • 5. Introduction Motivation Whole division specification Implicit definition c =x ÷y ⇔ ∃r : 0 r <y : x =c×y +r Explicit definition x ÷y = z :: z × y x Galois connection z ×y Paulo Silva (UMinho) x ⇔ z x ÷y Galois (y > 0) PLMMS’09 5 / 28
  • 6. Introduction Motivation Whole division specification Implicit definition c =x ÷y ⇔ ∃r : 0 r <y : x =c×y +r Explicit definition x ÷y = z :: z × y x Galois connection z ×y Paulo Silva (UMinho) x ⇔ z x ÷y Galois (y > 0) PLMMS’09 5 / 28
  • 7. Introduction Motivation Whole division specification Implicit definition c =x ÷y ⇔ ∃r : 0 r <y : x =c×y +r Explicit definition x ÷y = z :: z × y x Galois connection z ×y Paulo Silva (UMinho) x ⇔ z x ÷y Galois (y > 0) PLMMS’09 5 / 28
  • 8. Introduction Motivation Proof. n ⇔ (a ÷ b) ÷ c { z ×y n×c ⇔ (n × c) × b x ⇔z x ÷y } a { multiplication is associative } n × (c × b) ⇔ { z ×y n Paulo Silva (UMinho) x ÷y } a÷b { z ×y ⇔ x ⇔z a x ⇔z x ÷y } a ÷ (c × b) Galois PLMMS’09 6 / 28
  • 9. Introduction Motivation Proof. n ⇔ (a ÷ b) ÷ c { z ×y n×c ⇔ (n × c) × b x ⇔z x ÷y } a { multiplication is associative } n × (c × b) ⇔ { z ×y n Paulo Silva (UMinho) x ÷y } a÷b { z ×y ⇔ x ⇔z a x ⇔z x ÷y } a ÷ (c × b) Galois PLMMS’09 6 / 28
  • 10. Introduction Motivation Proof. n ⇔ (a ÷ b) ÷ c { z ×y n×c ⇔ (n × c) × b x ⇔z x ÷y } a { multiplication is associative } n × (c × b) ⇔ { z ×y n Paulo Silva (UMinho) x ÷y } a÷b { z ×y ⇔ x ⇔z a x ⇔z x ÷y } a ÷ (c × b) Galois PLMMS’09 6 / 28
  • 11. Introduction Motivation Proof. n ⇔ (a ÷ b) ÷ c { z ×y n×c ⇔ (n × c) × b x ⇔z x ÷y } a { multiplication is associative } n × (c × b) ⇔ { z ×y n Paulo Silva (UMinho) x ÷y } a÷b { z ×y ⇔ x ⇔z a x ⇔z x ÷y } a ÷ (c × b) Galois PLMMS’09 6 / 28
  • 12. Introduction Motivation Proof. n ⇔ (a ÷ b) ÷ c { z ×y n×c ⇔ (n × c) × b x ⇔z x ÷y } a { multiplication is associative } n × (c × b) ⇔ { z ×y n Paulo Silva (UMinho) x ÷y } a÷b { z ×y ⇔ x ⇔z a x ⇔z x ÷y } a ÷ (c × b) Galois PLMMS’09 6 / 28
  • 13. Introduction Objectives Objectives Galculator = Galois connection + calculator Build a proof assistant based on Galois connections, their algebra and associated tactics Galois Language for mathematical reasoning Equivalent to first-order logic Typed language Front-end for the Galculator Paulo Silva (UMinho) Galois PLMMS’09 7 / 28
  • 14. Theoretical background Outline 1 Introduction Motivation Objectives 2 Theoretical background Indirect equality Galois connections Fork algebras Point-free transform 3 Galois and Galculator Galois Galculator 4 Summary Summary Future work Paulo Silva (UMinho) Galois PLMMS’09 8 / 28
  • 15. Theoretical background Indirect equality Indirect inequality Definition (Indirect inequality) a ⇔ ∀ x :: x a⇒x b a Paulo Silva (UMinho) b b ⇔ ∀ x :: b x ⇒a x Galois PLMMS’09 9 / 28
  • 16. Theoretical background Indirect equality Proof. a=b ⇔ { Anti-symmetry } a ⇔ b∧b a { Indirect inequality } ∀ x :: x ⇔ a⇒x b ∧ ∀ x :: x b⇒x a { Rearranging quantifiers } ∀ x :: x ⇔ a⇒x b∧x b⇒x a { Mutual implication } ∀ x :: x Paulo Silva (UMinho) a⇔x b Galois PLMMS’09 10 / 28
  • 17. Theoretical background Indirect equality Proof. a=b ⇔ { Anti-symmetry } a ⇔ b∧b a { Indirect inequality } ∀ x :: x ⇔ a⇒x b ∧ ∀ x :: x b⇒x a { Rearranging quantifiers } ∀ x :: x ⇔ a⇒x b∧x b⇒x a { Mutual implication } ∀ x :: x Paulo Silva (UMinho) a⇔x b Galois PLMMS’09 10 / 28
  • 18. Theoretical background Indirect equality Proof. a=b ⇔ { Anti-symmetry } a ⇔ b∧b a { Indirect inequality } ∀ x :: x ⇔ a⇒x b ∧ ∀ x :: x b⇒x a { Rearranging quantifiers } ∀ x :: x ⇔ a⇒x b∧x b⇒x a { Mutual implication } ∀ x :: x Paulo Silva (UMinho) a⇔x b Galois PLMMS’09 10 / 28
  • 19. Theoretical background Indirect equality Proof. a=b ⇔ { Anti-symmetry } a ⇔ b∧b a { Indirect inequality } ∀ x :: x ⇔ a⇒x b ∧ ∀ x :: x b⇒x a { Rearranging quantifiers } ∀ x :: x ⇔ a⇒x b∧x b⇒x a { Mutual implication } ∀ x :: x Paulo Silva (UMinho) a⇔x b Galois PLMMS’09 10 / 28
  • 20. Theoretical background Indirect equality Proof. a=b ⇔ { Anti-symmetry } a ⇔ b∧b a { Indirect inequality } ∀ x :: x ⇔ a⇒x b ∧ ∀ x :: x b⇒x a { Rearranging quantifiers } ∀ x :: x ⇔ a⇒x b∧x b⇒x a { Mutual implication } ∀ x :: x Paulo Silva (UMinho) a⇔x b Galois PLMMS’09 10 / 28
  • 21. Theoretical background Indirect equality Indirect equality Definition (Indirect equality) a=b ∀ x :: x a⇔x b a=b Paulo Silva (UMinho) ⇔ ⇔ ∀ x :: a x ⇔b x Galois PLMMS’09 11 / 28
  • 22. Theoretical background Galois connections Galois connections Definition (Galois connection) Given two preordered sets (A, A ) and (B, B ) and two functions g f Bo A and A o B , the pair (f , g) is a Galois connection if and only if, for all a ∈ A and b ∈ B: f a B b ⇔ a A gb Graphical notation A  Al f g Paulo Silva (UMinho) ,
  • 23. B B or (A, Galois A) o (f ,g) (B, B) PLMMS’09 12 / 28
  • 24. Theoretical background Galois connections Properties Property f a Bb⇔a Agb a A a ⇒f a B f a b B b ⇒g b A g b a A g (f a) f (g b) B b f (g (f a)) = f a g (f (g b)) = g b g (b B b ) = g b A g b f (a A a ) = f a B f a g B= A f ⊥A = ⊥B Paulo Silva (UMinho) Description “Shunting rule” Monotonicity (LA) Monotonicity (UA) Lower cancellation Upper cancellation Semi-inverse Semi-inverse Distributivity (UA over meet) Distributivity (LA over join) Top-preservation (UA) Bottom-preservation (LA) Galois PLMMS’09 13 / 28
  • 25. Theoretical background Galois connections Galois connections — Algebra Identity connection (A, A) o (id,id) (A, A) Composition if (A, ) o (f ,g) (B, ) and (B, ) o (h,k ) (h◦f ,g ◦k ) (C, ) then (A, ) o (C, ) Composition is associative and the identity is its unit. Galois connections form a category. Paulo Silva (UMinho) Galois PLMMS’09 14 / 28
  • 26. Theoretical background Galois connections Galois connections — Algebra Converse if (A, ) o (f ,g) (B, ) then (B, ) o (g,f ) (A, ) Relator For every relator F if (A, ) o (f ,g) Paulo Silva (UMinho) (B, ) then (FA, F Galois (F f ,F g) )o (FB, F ) PLMMS’09 15 / 28
  • 27. Theoretical background Fork algebras Logic vs. algebra Logic Propositional logic Intuitionistic propositional logic Predicate logic Paulo Silva (UMinho) Galois Algebra Boolean algebra Heyting algebra ?? PLMMS’09 16 / 28
  • 28. Theoretical background Fork algebras Relation algebras Extension of Boolean algebras Original work of De Morgan, Peirce and Schröder Further developed by Tarski in his attempt to formalize set theory without variables Amenable for syntactic manipulation Only one inference rule is needed: substitution of equals by equals Equational reasoning Paulo Silva (UMinho) Galois PLMMS’09 17 / 28
  • 29. Theoretical background Fork algebras Relation algebras Extension of Boolean algebras Original work of De Morgan, Peirce and Schröder Further developed by Tarski in his attempt to formalize set theory without variables Amenable for syntactic manipulation Only one inference rule is needed: substitution of equals by equals Equational reasoning Paulo Silva (UMinho) Galois PLMMS’09 17 / 28
  • 30. Theoretical background Fork algebras Fork algebras Limitation of relation algebras Relations algebras can express first-order predicates with at most three variables Fork algebras Extend relation algebras with a pairing operator Equivalent in expressive and deductive power to first-order logic Paulo Silva (UMinho) Galois PLMMS’09 18 / 28
  • 31. Theoretical background Fork algebras Fork algebras Limitation of relation algebras Relations algebras can express first-order predicates with at most three variables Fork algebras Extend relation algebras with a pairing operator Equivalent in expressive and deductive power to first-order logic Paulo Silva (UMinho) Galois PLMMS’09 18 / 28
  • 32. Theoretical background Point-free transform Point-free transform summary Pointwise ¬(bRa) bRa ∧ bSa bSa ∨ bSa True False b=a aRb ∃ c :: bRc ∧ cSa ∀ x :: xRb ⇒ xSa ∀ x :: aRx ⇒ bSx bRa ∧ cSa bRa ∧ dSc ∀ a, b :: bRa ⇒ bSa ∀ a, b :: bRa ⇔ bSa Paulo Silva (UMinho) Galois Pointfree b(¬R)a b(R ∩ S)a b(R ∪ S)a b a b⊥a b id a bR ◦ a b(R ◦ S)a b(R S)a b(S/R)a (b, c)(R S)a (b, d)(R × S)(a, c) R⊆S R=S PLMMS’09 19 / 28
  • 33. Theoretical background Point-free transform Point-free definitions Definition (Galois connection) f◦ ◦ B = A ◦ g Definition (Indirect equality) f =g f =g Paulo Silva (UMinho) ⇔ ⇔ ◦ f ◦ ◦ Galois f = =g ◦ ◦ g ◦ PLMMS’09 20 / 28
  • 34. Galois and Galculator Outline 1 Introduction Motivation Objectives 2 Theoretical background Indirect equality Galois connections Fork algebras Point-free transform 3 Galois and Galculator Galois Galculator 4 Summary Summary Future work Paulo Silva (UMinho) Galois PLMMS’09 21 / 28
  • 35. Galois and Galculator Galois Sub-languages of Galois Module Definition GC Definition Axiom Type Theorem Strategy Proof Step Fork Formula Rewriting Combinator Term Derivation Order Paulo Silva (UMinho) Function Galois Galois connection PLMMS’09 22 / 28
  • 36. Galois and Galculator Galculator Architecture of Galculator Combine GC Derive Laws Relation algebra Derive Properties Derive Theory domain Derive Rules TRS Strategies Combine Paulo Silva (UMinho) Galois PLMMS’09 23 / 28
  • 37. Summary Outline 1 Introduction Motivation Objectives 2 Theoretical background Indirect equality Galois connections Fork algebras Point-free transform 3 Galois and Galculator Galois Galculator 4 Summary Summary Future work Paulo Silva (UMinho) Galois PLMMS’09 24 / 28
  • 38. Summary Summary Summary Fork algebras Equivalent to first-order logic (same expressive and deductive power) Single inference rule: substitution of equals for equals Equational No variables Integrates Galois connections and indirect equality Galois connections Provide structure Introduce semantic information in syntactic reasoning Paulo Silva (UMinho) Galois PLMMS’09 25 / 28
  • 39. Summary Summary Summary Galois Follows the mathematical concepts Alternative to first-order languages Typed approach Galculator Proof assistance prototype based on Galois connections Innovative approach Uses a point-free equational approach Paulo Silva (UMinho) Galois PLMMS’09 26 / 28
  • 40. Summary Future work Future work Mechanization of point-free transform Automated proofs Extension of the type system Free-theorems Evaluation of the language Integration with host theorem provers (e.g., Coq) Paulo Silva (UMinho) Galois PLMMS’09 27 / 28
  • 41. The End Download Source code and documentation available from www.di.uminho.pt/research/galculator Contact Questions to paufil@di.uminho.pt Paulo Silva (UMinho) Galois PLMMS’09 28 / 28