• No results found

SEMIPAL 2, an extension of the mathematical nottional language SEMIPAL

N/A
N/A
Protected

Academic year: 2021

Share "SEMIPAL 2, an extension of the mathematical nottional language SEMIPAL"

Copied!
7
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

SEMIPAL 2, an extension of the mathematical nottional

language SEMIPAL

Citation for published version (APA):

Bruijn, de, N. G. (1969). SEMIPAL 2, an extension of the mathematical nottional language SEMIPAL. Technische Hogeschool Eindhoven.

Document status and date: Published: 01/01/1969

Document Version:

Publisher’s PDF, also known as Version of Record (includes final page, issue and volume numbers)

Please check the document version of this publication:

• A submitted manuscript is the version of the article upon submission and before peer-review. There can be important differences between the submitted version and the official published version of record. People interested in the research are advised to contact the author for the final version of the publication, or visit the DOI to the publisher's website.

• The final author version and the galley proof are versions of the publication after peer review.

• The final published version features the final layout of the paper including the volume, issue and page numbers.

Link to publication

General rights

Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights. • Users may download and print one copy of any publication from the public portal for the purpose of private study or research. • You may not further distribute the material or use it for any profit-making activity or commercial gain

• You may freely distribute the URL identifying the publication in the public portal.

If the publication is distributed under the terms of Article 25fa of the Dutch Copyright Act, indicated by the “Taverne” license above, please follow below link for the End User Agreement:

www.tue.nl/taverne

Take down policy

If you believe that this document breaches copyright please contact us at: openaccess@tue.nl

providing details and we will investigate your claim.

(2)

N a t - i t f r , Nr 43 ( I 966-1

969)

1 1 1969.

Technological University Eindhoven Department of Mathematics

I n t e r n a l Report

SEMIPAL 2, an extension of the mathematical notational language SEMIPAL.

by N.G. de Bruijn.

1. SEMIPAL i s a simple language, o r rather a notational system f o r the abbreviation of expressions. It was described i n [21, sec.

4.3

-

4.8.

In

t h i s note we s h a l l extend t h a t language by extending the notion of the i n d i c a t o r s t r i n g s used i n SEMIPAL.

I n SEMIPAL every l i n e represents the d e f i n i t i o n of a new i d e n t i f i e r i n terms of previously introduced ones, a s f a r a s the new i d e n t i f i e r was not introduced a s a variable o r a s a primitive notion. And every l i n e has a context i n d i c a t o r , which i s e i t h e r 0 o r a previous block opener. I f the i n d i c a t o r of a l i n e i s xn, and i f , f o r every j ( I G j 4 n )

,

x

i s the

j -1

i n d i c a t o r of the l i n e whose i d e n t i f i e r i s x and i f 0 i s t h e i n d i c a t o r of

'

the l i n e whose i d e n t i f i e r i s x,

,

then (x,

,

.

. .

,x n

)

i s called the i n d i c a t o r s t r i n g of the given l i n e .

With t h i s d e f i n i t i o n of the indicator s t r i n g s , the following property holds. I f ( x

,

x n

)

and (y

,...

,Ym) a r e the i n d i c a t o r s t r i n g s of two

I

d i f f e r e n t l i n e s , then there i s an i n t e g e r k ( 0 G k S min(n,m)

)

such t h a t

x = yl

,...,%

= yk, and such t h a t there i s no f u r t h e r case where an x

1 i

equals a n y I n the extended form of SENIPAL, t o be discussed presently,

j '

this property no longer holds, and the indicator s t r i n g s can no longer be obtained from single indicators,

In SEMIPAL 2, a s we s h a l l c a l l t h i s version, we s h a l l write an i n d i - c a t o r s t r i n g i n f r o n t of every l i n e , and no longer a single indicator,

.

.

2. In order t o f a c i l i t a t e our discuasion, we number the l i n e s by i n t e g e r s

l , 2 , J , . . . ; the m-th l i n e i s called Am, the i n d i c a t o r s t r i n g of A i s pm,

m

the i d e n t i f i e r p a r t of i s am, the d e f i n i t i o n p a r t of i s

hm.

The order i n the i n d i c a t o r s t r i n g s i s , a s i s usually done i n s t r i n g s , referred t o a s

(3)

l e f t t o r i g h t , with l e f t

<

r i g h t .

The following r u l e s define SENIF'AL 2 uniquely.

( i )

am

i s e i t h e r the symbol

-,

o r the symbol PN, o r an expression (see sec. 3).

(ii) a i s c a l l e d a block opener i f bk =

-.

m

(

i i i ) p m i s e i t h e r 0 or a l i n e a r l y ordered set of block openers taken from the sequence ( a

,...,

a

).

The order i n pm need not be the same a s

1 m-1 i n ( a

,...,

a

).

1 m-1

(id

If a . occurs i n pm, then p i s a subset of p

.

Moreover, the order

J j m

i n p

.

U { a .

)

i s preserved i n p ( t h e order i n p U {aj

]

i s defined by taldng

J J m j

the e x i s t i n g order i n p and requiring b

<

a f o r a l l b E p

.).

j

'

j J

(v) I f 6 i s an expression, then the p a i r ( m , 6

)

i s a "valid pair"

m m

(see sec.

3).

3-1 The no t i o n "expression" ( o r "parentheses expression"

)

i s defined by recursion: i f p i s an i d e n t i f i e r then p i s an expression; i f p i s an i d e n t i f i e r and i f C

,

. . .

,C a r e expressions, then P(C

,

. .

.

,C

)

i s an

1 k 1 k

expression.

3- 2 We s h a l l a l s o define the notion of "valid p a i r t t by recursion. The l e t t e r s m , j ,n,k w i l l stand f o r integers.

( i ) I f a .

E

%

(whence a i s a block opener), then (m , a .

)

is a v a l i d

J j J

p a i r .

( i i ) Assume t h a t 1 --( j

<

m , and t h a t a . i s not a block opener. Let n

J

a be the number of elements of p l e t k be an i n t e g e r s a t i s f y i n g 0 ,(k ,(n.

3'

Let C,

,

.

.

.

,Ck be such t h a t (m,C

)

, ,

( m ,

)

a r e v a l i d pairs. And assume

1 k

t h a t the f i r s t n - k e n t r i e s of p occur i n p

.

Under these circumstances

j m

( m , ~ ) i s a l s o a v a l i d p a i r , where

These descriptions a r e t o be modified i n the obvious way i f k = n , o r k = 0, o r both.

4. Examples. The SEMIPAL book i n [2], sec. 4.1 (categories t o be omitted) can be transformed a t once i n t o the following SEMIPAL 2 book:

(4)

n a t r e a l prod n power Y d

The following example i s a line-by-line t r a n s l a t i o n of

a

SEUIPAL book:

--

Remark -

j

1

.

In some canes (see

f;

:= PN)'we define a thing i n terms of what seems t o be

independent variables, i n other eases b i k e q

s-

f(w)) the variables seem t o be l e s s

independent. There does not seem t o be much of a reason to admit the l a t t e r possi

b i l i t y , but

i t

w i l l become s i g n i f i c a n t i f we wish t o a t t a c h a category t o each

variable, l i k e we do i n

PAL.

I n that case, the categary of a variable w m a y de-

pend on the variables occurring i n the indicator s t r i n g of the l i n e where w i s

introduced.

Remark 2.

It

ma;y

help the

reader

t o write the i d e n t i f i e r s (apart from the

block

openers) a s functions of the variables i n the indicator string:

(5)

Remark

3.

Note that the variable w (see above) has

x

i n i t s i n d i c a t o r s t r i n g , and t h a t t h i s has the e f f e c t t h a t

x

has to occur i n every i n d i c a t o r s t r i n g containing w.

5.

Completion.

If ( k , ~ ) i s a v a l i d

mir,

then we define the %ompletion" + ' Z 8 of C.

(cf. [2], see 4.6).

(1) I f

C

i s a single block opener, then

C

I = X

( 2 ) Let CE a .(C1

,

".

.Ck) ( f o r notation see sec. 1

)

,

and l e t bl

,

.

. .

,bn bc

J

-

the f i r s t n-k e n t r i e s of p Then

3"

with obvious modifications i f k = n, o r k = 0, o r both.

6.

Normal form.

Let ( k , ~ ) be a valid pair. We shall give a recursive d e f i n i t i o n of the "normal form" of C. It w i l l become an expression C* that again has t h e pro- perty t h a t (k,C*) i s a valid pair.

( i ) I f C i s a single block opener;then 'IC* = C.

(ii) I f C i s not a single block opener, we f i r s t form the_@ompletion.

- -

XI

of C. Let

(possibly with n = 0).

(6)

If 6 . i s an expression, then we first produce the normal f o m 6? of

.J J

6 Let pj =

(u,~..

.

, U

)

be the indicator s t r i n g of t h e j-th l i n e , The ex- n

pression 6* may contain u a t various places, i t may contain u

a t

various

3 1 2

"

places, etc. We now replace i n

W

each of these u l l s by

7 ,

each of the u p ' s J

by

P,

etc.

h his

substituion r e f e r s only to t h e w, I s , u2's,.

. .

that were

2

o r i g i n a l l y present i n 6*, and not t o those u . % tthat e n t e r i n t o t h e formula

J 1

since they occurred i n

y,

3,.

.

).

This s u b s t i t u t i o n procedure leads t o what we c a l l

P.

I f both ( k , ~ )

and

(m,C) are v a l i d , then t h e normal form evaluated with reference t o k is i d e n t i c a l to the one evaluated with reference t o m.

7.

Every SEMIPAL book A turns i n t o a SEMIPAL 2 book AQf we a t t a c h t o every l i n e an i n d i c a t o r s t r i n g obtained from t h e indicators i n t h e way described i n sec. I . The normal form of an expression i n A (normal form a s defined f o r

SEMIPAL

i n [2, sec.

4.71)

w i l l be i d e n t i c a l to the normal form of the same expression a s defined i n SENIPAL 2 by means of sec.

6

above,

8. Let A be a c o r r e c t SEMIPAL 2 book.

An

expression C i s c a l l e d a A-expression i f there i s a k such that (k, C) i s a v a l i d p a i r (with respect t o A ) .

Every A-expression has a uniquely defined normd form. Two A-expressions a r e c a l l e d d e f i n i t i o n a l l y equivalent i f they have the same normal form.

I n order t o t e s t d e f i n i t i o n a l equivalence

i t

i s not always necessary t o evaluate the normal forms, One of the devices t h a t w i l l enable us t o reduce the amount of work is the "reduced i n d i c a t o r s t r i n g " , t o be discussed presently.

9,

Reduced i n d i c a t o r strings,

I f 6 . i s an expression, we define the reduced i n d i c a t o r s t r i n g pw as

J j

the s t r i n g obtained from y by d e l e t i n g a l l variables that do no$ occur i n

j

the normal form of 6

j'

A correct book can sometimes be made incorrect i f we replace a l l p !s

N J

by

p,

Is,

In

the

f i r s t place

we

night have

t o

omit

s u b e q r e s s i o n s whose

J

p o s i t i o n i n an expression r e f e r s t o a variable omitted from t h e corres- ponding i n d i c a t o r s t r i n g . Secondly we should bear i n mind t h a t replacing

(7)

pm by

pi

might endanger the v a l i d i t y of rule ( i v ) of sec. 2.

10. We can extend PAL and AUTOMA.TH (deseribed i n [l

1,

[ 2 ] ) t o

PBL

2 and ATJTOMATH 2 by means of t h e same r u l e s on indicator s t r i n g s as d i m cussed f o r the case of SEMIPAL i n t h i s note.

AUTOMBTH 2 has some obvious advantages over ADTOMATH. It can be e a s i e r t o write, and may require a smaller number of l i n e s , On the other hand, d i s - advantages of AUTOMATH 2 are:

( i ) Writing indicator s t r i n g s (and reduced indicator s t r i n g s ) can give more trouble than writing single indicators.

( i i ) We loose the easy s t r u c t u r e of a book, a s i l l u s t r a t e d by the " t r e e of knowledge".

Even i f we write AUTOMATH instead of AUTOMATH 2.,

i t

may be very useful t o evaluate t h e reduced indicator s t r i n g f o r every l i n e , This can of course be done by an AUTOMATH processor. By means of these reduced indicator s t r i n g s , the processor can economize considerably on the amount of checking

i t

has t o do.

References :

1. N. G. de Brui jn : AUTOMATH, a language f o r mathematics.

Report 68-WSK-05 (1 968) Technological University Eindhoven, The Netherlands.

2, N.G. de Bruijn .: The mathematical language AUTOMATE, i t s usage, and some of i t s extensions.

To be published i n the Proceedings of the Symposium on Atit omatic Demonstration

(IRIA,

Versailles, Decem- ber 1 968).

Referenties

GERELATEERDE DOCUMENTEN

Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of

Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of

Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of

Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of

Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of

Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of

Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of

Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of