Formal Analysis of Symbolic Computation Systems for Algebraic Topology

45
Formal Analysis of Symbolic Computation Systems for Algebraic Topology Julio Rubio Universidad de La Rioja (Spain)

description

Formal Analysis of Symbolic Computation Systems for Algebraic Topology. Julio Rubio Universidad de La Rioja (Spain). The Systems EAT Homology groups of iterated loop spaces Kenzo Better performance Object-oriented. Formal Analysis. -Why?. First answer: Why not?. -How?. - PowerPoint PPT Presentation

Transcript of Formal Analysis of Symbolic Computation Systems for Algebraic Topology

Page 1: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Formal Analysis of

Symbolic Computation Systems for

Algebraic Topology

Julio Rubio

Universidad de La Rioja

(Spain)

Page 2: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

The Systems

- EATEAT

Homology groups of iterated loop spaces

- KenzoKenzoBetter performanceObject-oriented

Page 3: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Formal Analysis

- Why?

- How?

First answer:

Why not?

Page 4: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Formal Analysis

- Why?

- How?

Second answer:

Increasing reliability

Page 5: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Formal Analysis

- Why?

- How?

Third answer:

Increasing knowledge

Page 6: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Formal Analysis

- How?

Two lines:

1. Algebraic Specifications

2. Computer-aided Theorem Proving

Page 7: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Formal Methods in Design

Implementation

SPECIFICATION

SOFTWARE PRODUCT

Formal Methods

Page 8: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Formal Methods in our problem

SOFTWARE PRODUCT

(MATHEMATICAL) MODEL OF THESOFTWARE PRODUCT

Formal Methods

Page 9: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

A case-study: BPL

EAT and Kenzo implement theEAT and Kenzo implement the

Basic Perturbation Lemma (BPL)Basic Perturbation Lemma (BPL)

Page 10: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

BPL, preliminaries:

- Chain complex- Chain complex

- Reduction- Reduction

- Perturbation- Perturbation

Page 11: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

BPL, preliminaries: chain complex

Page 12: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

BPL, preliminaries: reduction

Page 13: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

BPL, preliminaries: reduction

H(C, d) H(C, d)

H(C, d)H(C, d)

(C, d) (C, d)f

g

h

Big CC Small CC

Page 14: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

BPL, preliminaries: perturbation

Page 15: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

BPL, statement:

(C, d) (C, d)f

g

h

Big CC Small CC

(C,d+) (C, ¿d´?)¿f ´?

¿g´?

¿h´?

Big CC Small CC

Now we introduce a perturbation and we obtain: BPL algorithm

f´,g´,d´,h´

Page 16: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

BPL implementation, questions:

- How many reductions can be represented?- How many reductions can be represented?

- Is the implementation correct?Is the implementation correct?

Page 17: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

BPL implementation, questions:

- How many reductions can be represented?- How many reductions can be represented?

(First line: algebraic specifications)(First line: algebraic specifications)

- Is the implementation correct?Is the implementation correct?

(Second line: ATPs)(Second line: ATPs)

Page 18: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

First line:

ALGEBRAIC SPECIFICATIONSALGEBRAIC SPECIFICATIONS

Joint work with:

L. Lambán, V. Pascual, C. Domínguez

(Universidad de La Rioja)

Page 19: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Inspired by EAT syntax

Simp=S U { imp }

imp = { imp_ : imp s1 ... sn s}

S

= { : s1 ... sn s}

= S, imp = Simp, imp

Page 20: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

- Storing operations

(make-grp :prd ... )

Real Common Lisp implementation

Sergeraert’s notions 1986

- Functional coding

f #’(lambda (x)

(integerp x))

- Decoding function

f Z

Page 21: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

- Programs realizing operations

Real Common Lisp implementation

- Representation invariant

U Bool

- Abstraction function

U M

Hoare’s notions 1972

Page 22: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Real Common Lisp implementation

Sergeraert’s notions 1986

- Functional coding

f #’(lambda (x)

(integerp x))

- Decoding function

f Z

- Storing operations

(make-grp :prd ... )

- Representation invariant

U Bool

- Abstraction function

U M

- Programs realizing operations

Hoare’s notions 1972

DATUMIMPLEMENTATION OF A DATA TYPE

The implementation shift

Page 23: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Theorem

The implementations appearing in EAT define final objects in certain categories of Abstract Data Types implementations

Page 24: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Theorem

Thus: EAT implementations are

“as general as possible”

The implementations appearing in EAT define final objects in certain categories of Abstract Data Types implementations

Page 25: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Categories

EAT

implementing

Families of objects

modelling

Mathematics

Page 26: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Kenzo: dealing with inheritance

- explicit coercion- explicit coercion

(at the algebraic specification level)(at the algebraic specification level)

- similar kind of resultssimilar kind of results

(finality)(finality)

Page 27: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Second line:

MECHANISED THEOREM PROVINGMECHANISED THEOREM PROVING

Joint work with:

C. Ballarin (Technische Universität München)

J. Aransay (Universidad de La Rioja)

Page 28: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Certify the BPL EAT implementation

Page 29: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Certify the BPL EAT implementation

Choose a proof assistant

Page 30: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

A Common Lisp assistant?

Page 31: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

A Common Lisp assistant?

ACL2 (Boyer-Moore)Poor expressiveness

(no higher order functional programming)

Page 32: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

An Assistant with other native language L?

Page 33: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

An Assistant with other native language L?

Semantic gap between

L and Common Lisp

Page 34: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Give a mechanised proof of the BPL theorem

(as a previous step towards the proof of EAT implementation correctness)

Page 35: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

To choose a (by hand) proof:

Sergeraert’s proofSergeraert’s proof

To choose a proof Assistant:

IsabelleIsabelle

Page 36: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

In Isabelle:

- Algebraic structures:- Algebraic structures:

- dependent typesdependent types- extensible records (to reuse)extensible records (to reuse)

Page 37: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Lemma: Let f: C D a group homomorphism.

Then Im f is a subgroup of D.

In Isabelle:

...

Page 38: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Further work:

- Algebraic specifications:

More fragments

- Theorem proving:

The series

Page 39: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Statement of the BPL:

Page 40: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Further work:

- To relate more closely both lines

Page 41: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Further work:

- To relate more closely both lines

- To apply the acquired knowledge to other systems

Page 42: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Conclusions:

Starting from a very concrete problem ...

Page 43: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Conclusions:

- Symbolic Computation enriched with Formal Methods

Page 44: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Conclusions:

- Symbolic Computation enriched with Formal Methods

- Formal Methods enriched from our experiences with Symbolic Computation

Page 45: Formal Analysis  of  Symbolic Computation Systems  for Algebraic Topology

Increasing

knowledgeConclusions:

- Symbolic Computation enriched with Formal Methods

- Formal Methods enriched from our experiences with Symbolic Computation