SlideShare une entreprise Scribd logo
1  sur  40
Télécharger pour lire hors ligne
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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)

,
B

B

or (A,

Galois

A)

o

(f ,g)

(B,

B)

PLMMS’09

12 / 28
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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

Contenu connexe

Tendances

Otter 2014-12-15-01-slideshare
Otter 2014-12-15-01-slideshareOtter 2014-12-15-01-slideshare
Otter 2014-12-15-01-slideshare
Ruo Ando
 

Tendances (7)

Mapping analysis
Mapping analysisMapping analysis
Mapping analysis
 
Otter 2014-12-15-01-slideshare
Otter 2014-12-15-01-slideshareOtter 2014-12-15-01-slideshare
Otter 2014-12-15-01-slideshare
 
Vertical tangents and cusps
Vertical tangents and cuspsVertical tangents and cusps
Vertical tangents and cusps
 
Policy Gradient Theorem
Policy Gradient TheoremPolicy Gradient Theorem
Policy Gradient Theorem
 
Probabilistic diameter and its properties.
Probabilistic diameter and its properties.Probabilistic diameter and its properties.
Probabilistic diameter and its properties.
 
Congruence Lattices of A Finite Uniform Lattices
Congruence Lattices of A Finite Uniform LatticesCongruence Lattices of A Finite Uniform Lattices
Congruence Lattices of A Finite Uniform Lattices
 
A Quick and Terse Introduction to Efficient Frontier Mathematics
A Quick and Terse Introduction to Efficient Frontier MathematicsA Quick and Terse Introduction to Efficient Frontier Mathematics
A Quick and Terse Introduction to Efficient Frontier Mathematics
 

En vedette (7)

On the Design of a Galculator
On the Design of a GalculatorOn the Design of a Galculator
On the Design of a Galculator
 
Compiling CAO: From Cryptographic Specifications to C Implementations
Compiling CAO: From Cryptographic Specifications to C ImplementationsCompiling CAO: From Cryptographic Specifications to C Implementations
Compiling CAO: From Cryptographic Specifications to C Implementations
 
Boolean algebra And Logic Gates
Boolean algebra And Logic GatesBoolean algebra And Logic Gates
Boolean algebra And Logic Gates
 
Deep Learningと他の分類器をRで比べてみよう in Japan.R 2014
Deep Learningと他の分類器をRで比べてみよう in Japan.R 2014Deep Learningと他の分類器をRで比べてみよう in Japan.R 2014
Deep Learningと他の分類器をRで比べてみよう in Japan.R 2014
 
Digital logic gates and Boolean algebra
Digital logic gates and Boolean algebraDigital logic gates and Boolean algebra
Digital logic gates and Boolean algebra
 
Boolean algebra
Boolean algebraBoolean algebra
Boolean algebra
 
実装ディープラーニング
実装ディープラーニング実装ディープラーニング
実装ディープラーニング
 

Dernier

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

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

  • 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) ,
  • 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