• Aucun résultat trouvé

ffirN*I.a INRIA

N/A
N/A
Protected

Academic year: 2022

Partager "ffirN*I.a INRIA"

Copied!
35
0
0

Texte intégral

(1)

Design of the next 7OO Proof Assistants

Gérard

H

uet

Pro_let Coq

INRIA Rocquencourt

ffirN*I.a

E6 [ FLoc - Rutgers - July 28th 1ee6 - 1]

(2)

PLAN

.

General Design Issues

o

Zippers

o

Bôhm Trees

o

Mathematics modelling

ffitN.*"I.a

E6 [ FLoc - Rutgers - Juty 28th tss6 - 2l

(3)

General Design Issues

o Why yet

another

proof

assistant?

o

Overa

ll

arch itectu re

ffitN.xI.a

U I FLoc - Rutgers - Jury 28th 19e6 - 3 ]

(4)

A few popular proof assistants

o

ACL2

I

o

LCF-HOL

O NUPRL

o

PVS

o rMPS / ff iz &R

o

Isa belle

o

Coq-Atf-Lego

i oB

o Elf

o

LP,

etc

etc

ffirN*"I.a

E6 [ FLoc - Rutgers - Juty 28th 1ee6 - 4l

(5)

YAPA?

o Who will

use it?

For

what

concrete Purpose?

What

is

the

comPetition?

o

How could we share

the

efFort?

ffirN.xI.a

E6 [ FLoc - Rutgers - Jury 28th 1ee6 - 5 ]

(6)

Example 1 : proof trees

o

Should one keep proof trees around?

+

Program extraction

+ Self-certified

mobile code

+ Auditing

proofs

in natural

language

Size vs Speed

Decision procedures, rewriting

ffitN.&I.a

E6 [ FLoc - Rutgers - July 28th 1ee6 - 6 ]

(7)

Example 2: libraries

o What

should

the

library

structure

be?

o Modularity,

Naming

o

Search

for

relevant lemmas

o

Phase distinction

o

Dependency analysis

o

Sharing

with other

sites

o

Version ma nagement

o

Sharing

with other

provers

(qf

D!)

ffitN.*"I.a Eô

I FLoC - Rutgers - July 28th 1996 - 7 ]

(8)

Overa

I

I

arch

itectu

re

o Logical

Framework

o

Algorith ms

o

Programmability

o

User interface

o

User-defined notation?

o

Shared

data

base

of

proven facts

o

User assistance

o

Software eng ineering , tools

o Will it

scale up?

W /N RIA

E6 [ FLoc - Rutgers - Jury 28th 1ee6 - 8 ]

(9)

I got this in the mail today

The

following articles are submitted

to the

Mizar Mathemat-

ical

Library:

1. Piotr

Rudnicki and Andrzej Trybulec

submitted

an article

entitled: "on the

compositions

of

macro instructions"

2.

Yatsu

ka

N a ka m u

ra

a nd And rzej Trybu lec su bm

itted

arti- cles

entitled:

"Some

Topological

Properties

of

Cells

in

p2

and "The First Part of

Jordan's Theorem

for

Special poly- gons"

3. Noriko Asamoto, Yatsuka Nakamura, piotr

Rudnicki

and And

rzej Trybulec submitted

articles

entitled:

"

On

the compositions

of macro instructions, Part II" and

"

on

the compositions

of

macro

instructions,

Part

III"

The

preprints

of the

above articles are available at:

http : / /mat}r-. uw.

bialystok

.pL/ -Form. Math/Preprints Czeslaw Bylinski

Library

committee of the

Association

of Mizar

Users

ft(r N.xI"a

'Ëô [ FLoC - Rutgers - Juty 28th 1ee6 - e ]

(10)

Abstract Syntax

Any

implementer

of a proof

assistant,

a

programming envi- ronment,

or

a

formal computation

system, is faced early on

with the

problem

of

designing an abstract syntax framework.

Typical

concerns are:

o

well-formedness

wrt

arities

of

operators

o list

structures

o

bind

ing

operators, loca I defin itions

o

recu rsion

Usual solutions are:

o

LISP

o free

algebras

+

lists

o

pure À-calculus

.. À-n lAutomath lElf

ffitN.xI"a

E6 [ FLoC - Rutgers - Jury 28th 1ee6 - 10 ]

(11)

Managing the state

o

Version ma nagement

o

Dumps, Saves, Updates

o

Global context

o

Undo

o

Pragmas and flags

o

Clicking,

structure

editing

o

Notation

o

Applicative structu res

vs

Destructive ed iting

ft{

r

N.*"1.a

E6 [ FLoc - Rutgers - July 28th leeo - 11 ]

(12)

The zipper data structure

o

Mentor

,o Applicative

arrays

.

Emacs

o

hierarchical local

Turing

machine

ffitN.*"I"a

E6 [ FLoc - Rutgers - Jury 28th 1ee6 - 12 ]

(13)

The zipper type

type tree

=

Item of int

I

Section

of tree list;

;

type path

= ToP

I

Node

of path * tree list * tree list;

;

type location =

Loc

of tree * path;;

Node(p,I,r)

contains

the father

path

p, its left I

and

right r

brother

trees- Note: a path

has brother

trees,

uncle trees, great-uncle trees,

etc But its father

is a

path, not

a

tree

like

in

Mentor's

tree

processor.

ffitN.*I"a

E6 [ FLoC - Rutsers - July 28th 1ee6 - 13 ]

(14)

Updating and Inserting in a zipper

let

change

(Loc(-,p)) t = Loc(t,p);;

l-et insert-left (Loc(t,p)) t'

= match

p with ToP

>

I lrlode(up,left,right) -> Loc(t',Node(up,left,t

:

:right))

; ;

ffitN.*"I"a

E6 [ FLoc - Rutgers - July 28th 1ee6 - 14 ]

(15)

,d

t\j

l I I ,

aa'

(16)

Navigating in a zipper

let left

(Loc(t,p)

)

= match

p with ToP

>

I

Node(up,I:

:left,right)

>

I_

>

let

down

(Loc(t,p))

= match

t with

Item(_)

>

I

Section(t1 : :

trees)

>

|_

>

let up

(Loc

(t

, p)

)

= match

p with ToP

>

I

Noae (up,

left

,

right)

->

Loc(Section(concat

(t: :right) tett)

,up) ; ;

ft(

r

N.*,1"a E6

[ FLoc - Rutgers - Jury 28th rsso - rs ]

(17)

Scoping and

para

meterization

(À-ca lcu lus issues)

o

naming

of

variables

o

non-locality

of

B-rule

.

def in itions

.

recu rsion

.

a pproximations

o proof

search

ffitN.*"I"a

E6 [ FLoC - Rutgers - July 28th leeo - 16 ]

(18)

Bi nd i n g

/ Scopi ng/

N a mi ng

A

perplexing

state of

afFairs.

.

a-conversion

o de

BruUn indexes

o

com binators

o

M

iller

patterns

o

Pfenning HOAS

o

Ta

lcott

bind

ing

structu res

.

Pollack's meta-theory

of

LEGO

o Explicit

su bstitutions

W /N RIA

E6 [ FLoc - Rutgers - July 28th 1ee6 - 17 ]

(19)

Explicit

su

bstitutions

o Abadi

Cardelli Curien Lévy

o

Hardin Lévy

o

Lescanne; Rios; Kamareddine

.

Mufroz

o

Dowek Hardin Kirchner

o

etc

ffitN.*"I.a

E6 [ FLoc - Rurgers - Jury 28th 1e96 - 18 ]

(20)

Sharing

.

Dags

(UNIX

links,

TRS,

etc)

o

À-ca lcu lus

+

Wadsworth

+

LévY

+

Lamping

+ Gonthier l

o

Sharing modulo computing

+

symbolic link

+

U

RL

book .ps.gz

+

BDDs

+

Sharing substitutions

ffitN.*"I"a

E6 [ FLoc - Rutgers - July 28th ].ee6 - 1e l

(21)

An notations

Annotations

are essential.

They

represent points

of view. It

should be possible

to

add new annotations

without

changing

the type of the

core structu

re,

a nd

without

d istu rba nce

for

processes unconcerned by

this point of

view.

OO solution? Methods for copying, moving, etc.

Chet's OO-engine

f9r

adding judgements

to

Coq's engine.

There

are''à 'num

ber of

featu res

to be

added

to

ou

r

theory

in

order

to

meet long

term goals.

These include:

(1)

annotations;

(2)

generic

tools for structure walking,

matching and unifi-

cation;

a nd

(3)

representation

of

binding structures in terms

of

mutable structu res.

(C. Talcott)

ffirN.xI"a

[ FLoc - Rutgers - July 28th 1ee6 - 20 ]

(22)

Constraints, unification

Constraints are essential

for

delaying

the

search

for

existen-

cia ls.

o Constr{in}O

resolution

\)

o

Prolog

o Type

reconstruction

o Floating

universes

o

Linear arithfnetic

ffitN.*"IA

E6 [ FLoC - Rutgers - July 28th 1ee6 - 21 ]

(23)

À-terms vs Bôhm trees

.\ \ut'\uz'(("r uz) \ug'us)

I

\ ut

u2 '

ut(uz, \

u3 ' ue)

Èêad normal forms

vs

unsolvables

À,r

u2...'t-Ln' u;(Ttr ...rTp)

Separability:

Bôhm's theorem.

W INRIA

[ FLoc - Rutgers - July 28th 1,ss6 - 22]

(24)

Curry-Howard for Sequent Calculus

Proof checking is usually explained on natural deduction for-

mulations, for which (typed)

À-calculus

is relevant,

by the Curry-Howard

isomorphism.

However,

proof

search usually corresponds

to

a sequent calculus

structure. This

introduces cumbersome translations between

the

proof trees associated

to tactics computations,

and

the proof terms stored

as À-

terms j ustif ications.

However,

it

is possible

to

constra

in

seq uent ca lcu lus deriva-

tions

as Bôhm

trees. This

is

actually implicit from

Howard,

and was

exactly identified in H.

Herbetin's À-calculus

in

his

thesis

"Séquents

qu'on calcule"

(Paris

7, jan. 95). It

uses

a "stoup-ed" notion of

sequent, like

in

Girard's LU.

ffitN.*I"a

I FLoC - Rutgers - July 28th 1996 - 23 ]

(25)

Cut-free LJT

+ right , =':oi.'"=

f-; F

A+

B À

. r,A;Al

B

Contr ,

ffi Headf

--+ left

:

l-;FA f;BlC f;A+BlC Axiom :

r.,A"A nil

Thus the

term U Mt... Mn)

is coded as

(

.

(U Mr)

M27...

M*)

in À-calculus, and

f lMti M2,... Mnl in

À-calculus,

the

type- free

structure

underlying

LJT.

Note

that the

stoup contains

the

head variable.

Intros;

Apply

f

.

ffitN.xI.a

Et I FLoc - Rutgers - July 28th Lss6 - 241

(26)

Typing Bôhm trees

When we use Bôhm trees

to

represent proofs in some logical framework, these trees have types corresponding

to

formulas

(or

more generally

judgements) of this framework. But

we

want not to

be forced

at

construction

of the

abstract syntax

trees

representing

partial proof attempts to be obliged to

enforce

the

possibly complex

type

maintenance.

On

the

other side

of

the spectrum, w€ may consider a Bôhm

tree

as

just an untyped À-term, i.e. an element of

some

domain

D verifying

some isomorphism

D t!' ID

->

D].

Con-

sistency in

the

sense

of

equational logic is

just

requiring

that D

be non-trivial.

ft(r N.xl"a

E6 [ FLoc - Rutsers - July 28th 1ee6 - 2s ]

(27)

More on typing Bôhm trees

Somewhere

in

between

we

may

type

solvable

Bôhm

trees,

of the

form:

\ ut

u2...'tLn'

u(Tt,

...rTp)

by their

shape

(-,n - p), consisting of the pair head (-)

and difFerential

arity

(n

- p).

For a closed

tree,

rn

:'u,ftt

and

then

the

head indicates

the

index

of

sequentiality

k,

whereas

the

difFerential

arity

is

a

kind

of

coercion

specification.

The shape may

be

read as

a type

Dn

+ D klpl, specifying:

this

term is a functional value in Dn + D,

whenever

its

main

argument

æp

is

coerced

to a functional value in Dp +

D.

Note

that

this

type

is invariant by th€ 4 rule, and

thus

makes sense as

a partition of the

extensional

model

Dca.

ft( t N.*"1"a

'86 [ FLoC - Rutgers - Jury 28th rss6 - 26]

(28)

Systems of

g

uarded com binators

Definitions. We

assume given

two

disjoint.denumerable al- phabets

of

symbols:

X: {Xr,X2,...}

is

the

set

of

combina'

forsymbols,l,{ -- {ut,u2,...}

is the set

of

parameter symbols.

Intuitively,

combinators name Bôhm trees, whereas parame-

ters

name bound À-variables.

We call Bôhm tree presentation

with

respect

to

these

two

al- phabets any denumerable system of equations:

t : {Et,82,

...},

with

E6 . X6 u1 u2...r1ni

'-

11,ki(Mt,..., Mpt) where 1

<

k6

1n;,

O

4 p;, X;

e

X,

and

for

Yj 1 p; Mj : Xq'(rt,

...,ut6,i)

with

L

< kt,j

S

nt

and

{rt,...,uli,j}

Ç

{"r,,...,uni} çU.

We

assume

furthermore the

system

to be deterministic,

in

the

sense

that

every

X € N

possesses

at most

one defining

equation in t. We

say

that it is total when

every

X € X

possesses exactly one defining equation

in t.

ffitN.x!"a

[ FLoc - Rutgers - July 28th 7ss6 - 27 ]

(29)

Exa m

ples

We remark

that

Bôhm

tree

presentations are general enough

to

represent

arbitrary families of finitely generated

Bôhm

trees, which is

enough

for

instance

to

represent

the

Bôhm trees

of

any

À-terms. But they permit to do more, in that

we may represent dags and looping

structures.

For instance,

the

À-term

in

normal

form \ut uz.(ut ),u.(u u) ),u-u)

may

be presented as

X in the

system

X ut u2 l-

u1(D,

I) D u '- u(I(u)) I ru :-

rt)

with

sharing

of

combinator

/.

Whereas

the

single

equation Z u .- u(Z)

defines as

Z

the

infinite tree

Àut . u1(),u2 . u2( ..))

ffirN.xI.a

I FLoC - Rutgers - July 28th 1996 - 28 ]

(30)

Other

exa m

ples

Another

example is

the fixpoint

combinator

Y,

with

Y f :: fVU))

Still

another example, also denoting an

infinite

Bôhm

tree,

is

J

presented by

the system: J * a:: *(l(A)). It

is

the

Bôhm

tree of À-term (Y

^j

),r,

),y

(j s))), for Y any fixpoint

combinator such as Curry's.

Remark

that

recursion

is natural and more canonical,

and

that computation is

more

local than B-reduction. Also

de- finedness is atomic.

ft(

r

N.*"1.a

E6

[ FLoc - Rutgers - July 28th leeo - 2e ]

(31)

Regular Bôhm trees

Definition. We call

regular any

finite Bôhm tree

presenta-

tion.

S uc.h presentations define Bôh m trees wh ich are reg u-

lar in

the

sense

of admitting

only a

finite

number

of distinct

subtrees, up

to

variable renaming.

Theorem. It

is decidable whether

t I M - l'r for

any regular

t

and simple expressions

M

and

^f

.

( For a ppropriate notions

F

a nd sim ple) .

ffirN.xI"a

I FLoC - Rutgers - July 28th 1996 - 30 ]

(32)

Other issues

From À-calculus

to

Bôhm trees

to Automath to

Coq...

Constants. Let or A-T

pairs

or A-T couples. Other

judge-

ments.

Structu

re of the context. Sections,

Parag ra phs,

Mlodules. Meta-variables.

Unification.

Constraints.

Control of totality.

Control of

u nfold ing

,

opacity, a bstraction.

Tactics'

W /NRIA

E6 [FLoc - Rutgers - Juty 2eth 1ee6 - 31]

(33)

Ind uction

Should induction be primitive (Martin-Lôf) or

axiomatised

(Isa b el le) ?

Four

properties

of

inductive types.

o

Closed: no

junk

o Free:

no confusion

o

Ind uction

:

f in

itely

generated .

.

Dependance:

elimination

by pattern-matching.

Guarded general recursion vs

primitive

recursion.

ffitN.xI.a

E6 [ FLoc - Rutgers - July 28th leeo - 32 ]

(34)

How powerful should the framework be?

In other words, how much mathematical

knowledge should be internalized

in the proof assistant? E.g.

equality, induc-

tion,

SUbstitution, sharing, decision procedures.

The

more we add,

the

less we may share developments.

Extreme

view: PRA

as

the

framework.

Ref lexion.

Bootstra pping .

E6 [ FLoc - Rutgers - Juty 28th leeo - 33 ]

W lNRIA

(35)

Mathematics modelling

Mathematics

is

rigorous knowledge representation.

It

com-

bines com

putation in

concrete structu res

with

a

bstract

rea-

son

ing in

log ica I systems.

There

are historically

4

generations

of

computerized math- ematics:

1

com puters

2

programming languages

3

symbolic

computation

systems

4

proof-checked forma

I

mathematics

Proof

assistants

potentially open the

way

to the 4tn

gen-

eration of

computerized mathematics

modelling. BUT

they

will not

replace

well understood more eflicient

paradigms

of the

lower levels:

floating point computation,

imperative

prog ra m m ing

,

verif

ication of

f in

ite-state

systems

by

B D D

techniques. The smooth integration of the full range of

puterized mathematics tools is the

g

reat

cha llenge

of

com

putenzeo

ma

Wi"^iËl'Àears

ËÉ [ FLoC - Rutgers - July 28th ]ee6 - 34l

Références

Documents relatifs

This randomized clinical trial has shown that the use of hyperosmolar sodium-lactate solutions in the Dengue shock syndrome allowed the treatment of such a hypo- volemic shock

– global - tight : l’événement associé au début du bloc (e1) n’est pas détecté ; alors les actions du bloc sont lancées avec un délai nul si leur la position est antérieur

This project has highlighted various characteristics, approaches, and areas of content associated with counsel- ling theory and skill training in Canadian counselling and

For the impact of long-wave radiative exchanges, three modalities: the building exchanges with the sky without taking into account the masks of the environment and

An asymptotic estimate for the number of integers which are represented by a given binary form is due to Landau, Ramanujan and Bernays for positive definite quadratic forms and

Another noteworthy result tied to associativity is that systems generated by a single connective are always polynomially as efficient as any system generated by two or more

The parameters of this distribution represent the strength variation of fibres and are determined by appropriately fitting experimentally generated fibre strength

Spiking neural networks can encode information with high efficiency in the spike trains of individual neurons if the synaptic weights between neurons are set to specific,