• Aucun résultat trouvé

L(A)=L(B) ? the program

N/A
N/A
Protected

Academic year: 2022

Partager "L(A)=L(B) ? the program"

Copied!
69
0
0

Texte intégral

(1)

the program

Patrick Henry and G´ eraud S´ enizergues

1

1

derni`ere mise ` a jour: May 11, 2012

(2)
(3)

Contents

1 Mathematical notions 7

1.1 AUTOMATON . . . . 7

1.1.1 Deterministic Finite Automaton . . . . 7

1.1.2 Deterministic Pushdown Automaton . . . . 10

1.2 GRAMMAR . . . . 11

1.2.1 The grammar G

M

. . . . 11

1.2.2 Free monoids acting on semi-rings . . . . 12

1.3 VECTOR . . . . 15

1.3.1 Deterministic series, vectors and matrices . . . . 15

1.3.2 Strict-deterministic grammars . . . . 19

1.3.3 Linear independence . . . . 21

1.4 PROOF . . . . 24

1.4.1 †The deduction rules . . . . 24

1.4.2 †Proofs . . . . 27

1.4.3 †Partial Proofs . . . . 29

1.4.4 †Tree of Partial Proofs . . . . 29

1.4.5 †Constructing proofs of equivalence or witnesses of non-equivalence . . . . 30

2 Objects 33 2.1 Deterministic Pushdown AUTOMATON . . . . 33

2.2 Strict-Deterministic GRAMMAR . . . . 33

2.3 VECTEUR deterministe rationnel (sur V) . . . . 34

2.4 ASSERTION . . . . 36

2.5 ANTI-ASSERTION . . . . 37

2.6 NODE . . . . 37

2.7 PROOF . . . . 38

3 Operations 39

3

(4)

3.1 AUTOMATE a pile deterministe . . . . 39

3.2 GRAMMAIRE deterministe . . . . 39

3.3 VECTEUR deterministe rationnel (sur V) . . . . 40

3.4 ASSERTION . . . . 42

3.5 ANTI-ASSERTION . . . . 44

3.6 NOEUD . . . . 44

3.7 PROOF . . . . 47

4 Algorithms 57 4.1 Deterministic Pushdown AUTOMATON . . . . 57

4.2 Strict-Deterministic GRAMMAR . . . . 57

4.3 VECTEUR deterministe rationnel (sur V) . . . . 58

4.4 ASSERTION . . . . 60

4.5 ANTI-ASSERTION . . . . 63

4.6 NODE . . . . 63

4.7 PROOF . . . . 63

5 Examples 65

6 Implementation 67

(5)

Introduction

We describe a program that, given a dpda and two initial configurations of this dpda, decides whether these configurations recognize the same language.

We follow the ideas exposed and proved in [S´en01]. The algorithm which is detailed here can be considered as an evolution of the one that is sketched in [S´en01, page 165 of the version of web page].

Section 1, in particular, consists mainly in recalling the mathematical frame- work of [S´en01]; some new notions or algorithms are also introduced: the paragraphs introducing such new notions are marked by a dag symbol (†).

5

(6)
(7)

Mathematical notions

We describe here the mathematical notions that we shall use in further sections. They consist mainly of the ones used in [S´en01] but some notions have been refined in order to be more usable in a concrete implementation.

We have labeled by a dag “†” those paragraphs that describe such new notions.

1.1 AUTOMATON

1.1.1 Deterministic Finite Automaton

The usual notion

Definition 1.1.1 A finite automaton is a tuple, A =< X, Q, I, T, δ >

where

• X is a finite set, the input alphabet

• Q is a finite set , the set of states

• I ⊂ Q is the set of initial states

7

(8)

• T ⊂ Q is the set of terminal states

• δ ⊂ Q × X × Q is the set of transitions transitions

As usual, the language accepted by A, denoted L(A) is the set of words that are labelling some successful path of A., starting from some initial state and ending in some terminal state. The finite automaton A is said deterministic iff,

• (1) Card(I ) = 1

• (2) ∀q ∈ Q, ∀x ∈ X, Card({q

∈ Q, (q, x, q

) ∈ δ}) ≤ 1 A is said complete deterministic iff

• (1) Card(I ) = 1

• (2) ∀q ∈ Q, ∀x ∈ X, Card({q

∈ Q|(q, x, q

) ∈ δ}) = 1

For such an automaton, the set of transitions δ can be viewed as a total map δ : Q × X → Q. We denote by ˆ δ : Q × X

→ Q its extension to words.

Such an automaton defines a language over the alphabet X:

L(A) := {u ∈ X

| δ(q ˆ

, u) ∈ Q

+

}.

A language is said recognizable iff it is of the form L(A) for some finite automaton A. We recall that any recognizable language L is also recog- nized by some deterministic complete automaton and that, among all the comlete d.f.a. recognizing L, the ones of minimal size are all isomorphic.

Therefore we call minimal automaton of L this d.f.a (it is well-defined, up to isomorphism).

†Partitioned dfa

It turns out that the main object that our program manipulates is not really

a language or a finite automaton but a vector of languages which is defined

(9)

by some finite automaton with one set of terminal states for each of its components. Let us recall that a language L ⊂ X

is a prefix language iff,

∀u, v ∈ L, u v ⇒ u = v. The vectors we are really interested in are prefix vectors in the following sense:

Definition 1.1.2 A vector (L

1

, . . . , L

i

, . . . , L

n

) ∈ P(X

)

n

is said to be pre- fix iff it fulfills:

(1) ∀i, j ∈ [1, n], i 6= j ⇒ L

i

∩ L

j

= ∅ (2) S

n

i=1

L

i

is a prefix language.

We thus consider here a variant of the notion of d.f.a. which recognizes a prefix vector of languages (instead of a single language).

Definition 1.1.3 A finite complete deterministic partitioned automaton is a tuple, A =< X, Q, {q

}, Q

1,+

, . . . , Q

n,+

, δ > where

• X is a finite set, the input alphabet

• Q is a finite set , the set of states

• q

∈ Q is the initial state

• every Q

i,+

is a subset of Q; ∀i, j ∈ [1, n], i 6= j ⇒ Q

i,+

∩ Q

j,+

= ∅ (Q

1,+

, . . . , Q

n,+

) is the vector of sets of terminal states, (we note Q

+

:= ∪

ni=1

Q

i,+

)

• δ : (Q \ Q

+

) × X → Q is a total map, which is called the transition map.

Such an automaton defines a prefix vector of languages

→ L (A) := (L

1

, . . . , L

i

, . . . , L

n

) where L

i

:= {u ∈ X

| δ(q ˆ

, u) ∈ Q

i,+

}.

The usual theory of recognizables languages, complete deterministic au- tomata and residuals can be adapted to vectors of languages complete par- titioned d.f.a. and vectors of residuals.

Note that, if A is a minimal d.f.a. recognizing a prefix vector of languages,

then vevry subset Q

i,+

has cardinality 0 or 1.

(10)

1.1.2 Deterministic Pushdown Automaton

The aim of the program is to test whether two different deterministic push- down automata recognize, in fact, the same language. Let us define these automata and the languages they recognize.

Definition 1.1.4 A pushdown automaton on the alphabet X is a 7-tuple M = < X, Z, Q, δ, q

0

, z

0

, F > where

• Z is the finite stack-alphabet

• Q is a finite set , the set of states

• q

0

∈ Q is the initial state,

• z

0

is the initial stack-symbol,

• F is a finite subset of QZ

, the set of final configurations,

• δ, the transition function, is a mapping δ : QZ ×(X∪{ǫ}) → P

f

(QZ

).

We define now how such an automaton may process an input word. Let q, q

∈ Q, ω, ω

∈ Z

, z ∈ Z, f ∈ X

and a ∈ X∪{ǫ} ; we note (qzω, af ) 7−→

M

(q

ω

ω, f ) if q

ω

∈ δ(qz, a). 7−→

M

is the reflexive and transitive closure of 7−→

M

.

For every qω, q

ω

∈ QZ

and f ∈ X

, we note qω −→

fM

q

ω

iff (qω, f ) 7−→

M

(q

ω

, ǫ).

M is said deterministic iff, for every z ∈ Z, q ∈ Q, x ∈ X :

Card(δ(qz, ǫ)) ∈ {0, 1} (1.1)

Card(δ(qz, ǫ)) = 1 ⇒ Card(δ(qz, x)) = 0, (1.2) Card(δ(qz, ǫ)) = 0 ⇒ Card(δ(qz, x)) ≤ 1. (1.3) M is said strict iff, F ⊆ Q (i.e. this dpda accepts by final states and empty-stack). The language recognized by M is

L(M) = {w ∈ X

| ∃c ∈ F, q

0

z

0

−→

wM

c}.

(11)

Definition 1.1.5 A language L ⊆ X

is said deterministic (resp. strict deterministic) context-free if and only if there exists some dpda (resp. strict dpda ) M with terminal alphabet X such that L = L(M).

A configuration qω of M is said ǫ-bound iff there exists a configuration q

ω

such that (qω, ǫ) 7−→

M

(q

ω

, ǫ); qω is said ǫ-free iff it is not ǫ-bound.

A dpda M is said normalized iff, it fufills conditions (1.1), (1.2) (see above) and (1.4),(1.5),(1.6):

q

0

z

0

is ǫ − free (1.4)

and for every q ∈ Q, z ∈ Z, x ∈ X:

q

ω

∈ δ(qz, x) ⇒| ω

|≤ 2, (1.5) q

ω

∈ δ(qz, ǫ) ⇒| ω

|= 0. (1.6) It is well known that, a language L is deterministic context-free and is prefix iff it is strict deterministic context-free. It is a “folklore” result that, given a deterministic pda M, one can effectively compute another dpda M

which is normalized and fulfills:

L(M) = L(M

) − {ε}.

1.2 GRAMMAR

1.2.1 The grammar G

M

Let M be some deterministic pushdown automaton (we suppose here that M is normalized). The variable alphabet V

M

associated to M is defined as:

V

M

= {[p, z, q] | p, q ∈ Q, z ∈ Z }.

The context-free grammar G

M

associated to M is then G

M

=< X, V

M

, P

M

>

where

P

M

is the set of all the pairs of one of the following forms:

([p, z, q], x[p

, z

1

, p

′′

][p

′′

, z

2

, q]) (1.7)

(12)

where p, q, p

, p

′′

∈ Q, x ∈ X, p

z

1

z

2

∈ δ(pz, x)

([p, z, q], x[p

, z

, q ]) (1.8) where p, q, p

∈ Q, x ∈ X, p

z

∈ δ(pz, x)

([p, z, q], a) (1.9)

where p, q, ∈ Q, a ∈ X ∪ {ǫ}, q ∈ δ(pz, a).

The language generated by this grammar, from the set of variables corre- sponding to the initial and final items of the automaton, is equal to the language recognized by the dpda M :

L(M) = L(G

M

, V

F

), where

V

F

= {[q

0

, z

0

, q] | q ∈ F }.

G

M

is a strict-deterministic grammar (see definition 1.3.13 below) . A general theory of this class of grammars is exposed in [Har78] and used in [HHY79].

1.2.2 Free monoids acting on semi-rings

Semi-ring B hh W ii

Let ( B , +, ·, 0, 1) where B = {0, 1} denote the semi-ring of “booleans”. Let W be some alphabet. By (Bhh W ii, +, ·, ∅, ǫ) we denote the semi-ring of boolean series over W :

the set B hh W ii is defined as B

W

; the sum and product are defined as usual; each word w ∈ W

can be identified with the element of B

W

mapping the word w on 1 and every other word w

6= w on 0; every boolean series S ∈ B hh W ii can then be written in a unique way as:

S = X

w∈W

S

w

· w,

where, for every w ∈ W

, S

w

∈ B.

The support of S is the language

supp(S) = {w ∈ W

| S

w

6= 0}.

(13)

In the particular case where the semi-ring of coefficients is B ( which is the only case considered in this program) we sometimes identify the series S with its support. A series S ∈ B hh W ii is called a boolean polynomial over W if and only if its support is finite. The set of all boolean polynomials over W is denoted by B hW i.

We recall that for every S ∈ B hh W ii, S

is the series defined by:

S

= X

0≤n

S

n

. (1.10)

Given two alphabets W, W

, a map ψ : B hh W ii → B hh W

ii is said σ-additive iff it fulfills: for every denumerable family (S

i

)

i∈N

of elements of B hh W ii,

ψ( X

i∈N

S

i

) = X

i∈N

ψ(S

i

). (1.11)

A map ψ : B hh W ii → B hh W

ii which is both a semi-ring homomorphism and a σ-additive map is usually called a substitution.

Actions of monoids

Given a semi-ring (S, +, ·, 0, 1) and a monoid ( M , ·, 1

M

), a map ◦ : S× M → S is called a right-action of the monoid M over the semi-ring S iff, for every S, T ∈ S, m, m

∈ M :

0◦m = 0, S◦1

M

= S, (S+T )◦m = (S◦m)+(T ◦m) and S◦(m·m

) = (S◦m)◦m

. (1.12) In the particular case where S = B hh W ii, ◦ is said to be a σ-right-action if it fulfills the additional property that, for every denumerable family (S

i

)

i∈N

of elements of S and m ∈ M : ( X

i∈N

S

i

) ◦ m = X

i∈N

(S

i

◦ m). (1.13)

(14)

The action of W

on Bhh W ii

We recall the following classical σ-right-action • of the monoid W

over the semi-ring B hh W ii : for all S, S

∈ B hh W ii, u ∈ W

S • u = S

⇔ ∀w ∈ W

, (S

w

= S

u·w

),

(i.e. S • u is the left-quotient of S by u , or the residual of S by u ).

For every S ∈ B hh W ii we denote by Q(S) the set of residuals of S:

Q(S) = {S • u | u ∈ W

}.

We recall that S is said rational iff the set Q (S) is finite.

The reduced grammar G

0

The classical X-reduced and ǫ-free grammar associated with G

M

is G

0

=<

X, V

0

, P

0

> where:

V

0

= {v ∈ V

M

| ∃w ∈ X

+

, v −→

PM

w}, (1.14) ϕ

0

: B hh V ii → B hh V

0

ii

is the unique substitution such that, for every v ∈ V :

ϕ

0

(v) = v ( if v ∈ V

0

), ϕ

0

(v) = ǫ ( if v −→

PM

ǫ), ϕ

0

(v) = ∅ ( otherwise ), P

0

= {(v, w

) ∈ V

0

×(X∪V

0

)

+

| v ∈ V

0

, ∃w ∈ (X∪V

M

)

, (v, w) ∈ P

M

, w

= ϕ

0

(w)}.

(1.15) G

0

is the X-reduced and ǫ-free form of G

M

. It is well-known that, for all v ∈ V

0

:

∃w ∈ X

+

, v −→

P0

w and

{w ∈ X

, v −→

PM

w} = {w ∈ X

, v −→

P0

w}.

Let us consider the unique substitution ϕ

0

: B hh V

0

ii → B hh X ii fulfilling:

for every v ∈ V

0

,

ϕ

0

(v) = {u ∈ X

| v −→

P0

u},

(15)

(in other words, ϕ

0

maps every subset L ⊆ V

0

on the language generated by the grammar G

0

from the set of axioms L).

Grammaire reduite vis-a vis d’un ensemble d’axiomes ?

Clearly, the equivalence problem for two different dpda reduces to the equiv- alence problem for two different configurations of a single normalized dpda M which has only one accepting configuration. This last problem reduces to the problem

ϕ

0

(S) = ϕ

0

(T )?

for some variables S, T ∈ V

0

.

1.3 VECTOR

1.3.1 Deterministic series, vectors and matrices

We introduce here a notion of deterministic series which, in the case of the alphabet V

M

associated to a dpda M, generalizes the classical notion of configuration of M. The main advantage of this notion is that, unlike for configurations, we shall be able to define nice algebraic operations on these series (see, in particular, §1.3.3). Let us consider a pair (W, ⌣) where W is an alphabet (i.e. a set

1

) and ⌣ is an equivalence relation over W . We call (W, ⌣) a structured alphabet. The most classical examples are:

• the case where W = V

M

, the variable alphabet associated to M and [p, z, q] ⌣ [p

, z

, q

] iff p = p

and z = z

(see [Har78])

• the case where W = X, the terminal alphabet of M and x ⌣ y holds for every x, y ∈ X (see [Har78]).

Definitions

Definition 1.3.1 Let S ∈ B hh W ii. S is said left-deterministic iff either (1) S = ∅ or

1

notice that we do not suppose that W is finite

(16)

(2) S = ǫ or (3) ∀w, w

∈ W

,

S

w

= S

w

= 1 ⇒ [∃A, A

∈ W, w

1

, w

1

∈ W

, A ⌣ A

, w = A·w

1

and w

= A

·w

1

].

A left-deterministic series S is said to have the type ∅ (resp. ǫ, [A]

) if case (1) (resp. (2), (3)) occurs.

Definition 1.3.2 Let S ∈ B hh W ii. S is said deterministic iff, for every u ∈ W

, S • u is left-deterministic.

This notion is the straighforward extension to the infinite case of the notion of (finite) set of associates defined in [HHY79, definition 3.2 p. 188].

We denote by D B hh W ii the subset of deterministic boolean series over W . Let us denote by B

n,m

hh W ii the set of (n, m)-matrices with entries in the semi-ring Bhh W ii.

Definition 1.3.3 Let m ∈ N, S ∈ B

1,m

hh W ii : S = (S

1

, · · · , S

m

). S is said left-deterministic iff either

(1) ∀i ∈ [1, m], S

i

= ∅ or

(2) ∃i

0

∈ [1, m], S

i0

= ǫ and ∀i 6= i

0

, S

i

= ∅ or

(3) ∀w, w

∈ W

, ∀i, j ∈ [1, m], (S

i

)

w

= (S

j

)

w

= 1 ⇒ [∃A, A

∈ W, w

1

, w

1

∈ V

, A ⌣ A

, w = A · w

1

and w

= A

· w

1

].

A left-deterministic row-vector S is said to have the type ∅ (resp. (ǫ, i

0

), [A]

) if case (1) (resp. (2), (3)) occurs.

The right-action • on B hh W ii is extended componentwise to B

n,m

hh W ii:

for every S = (s

i,j

), u ∈ W

, the matrix T = S • u is defined by t

i,j

= s

i,j

• u.

Definition 1.3.4 Let S ∈ B

1,m

hh W ii. S is said deterministic iff, for

every u ∈ W

, S • u is left-deterministic.

(17)

We denote by D B

1,m

hh W ii the subset of deterministic row-vectors of di- mension m over B hh W ii.

Definition 1.3.5 Let S ∈ B

n,m

hh W ii. S is said deterministic iff, for every i ∈ [1, n], S

i,.

is a deterministic row-vector.

Let us notice first an easy fact about deterministic series.

Fact 1.3.6 For every S ∈ D B hh W ii, u ∈ W

, S • u ∈ D B hh W ii.

Norm

Let us generalize the classical definition of rationality of series in B hh W ii to matrices. Given M ∈ B

n,m

hh W ii we denote by Q (M) the set of residuals of M :

Q (M ) = {M • u | u ∈ W

}.

Similarly, we denote by Q

r

(M) the set of row-residuals of M : Q

r

(M ) = [

1≤i≤n

Q(M

i,∗

).

M is said rational iff the set Q(M) is finite. One can check that it is equiva- lent to the property that every coefficient M

i,j

is rational, or to the property that Q

r

(M ) is finite. We denote by RB

n,m

hh W ii (resp. D RB

n,m

hh W ii) the set of rational ( resp. deterministic, rational) matrices over B hh W ii.

For every M ∈ RB

n,m

hh W ii, we define the norm of M as:

kM k = Card( Q

r

(M)).

Residuals

Lemma 1.3.7 Let S ∈ D B hh W ii, T ∈ B hh W ii, u ∈ W

. If S • u 6= ∅

then (S · T ) • u = (S • u) · T .

(18)

Lemma 1.3.8 Let S ∈ D Bhh W ii, T ∈ Bhh W ii, u ∈ W

and U = S · T.

Exactly one of the following cases is true:

(1) S • u 6= ∅;

in this case U • u = (S • u) · T . (2) S • u = ∅, ∃u

, u

′′

, u = u

· u

′′

, S • u

= ǫ;

in this case U • u = T • u

′′

. (3) S • u = ∅, ∀u

u, S • u

6= ǫ;

in this case U • u = ∅ = (S • u) · T .

Lemma 1.3.9 Let S ∈ D B

1,m

hh W ii, T ∈ B

m,s

hh W ii, u ∈ W

and U = S · T . Exactly one of the following cases is true:

(1) ∃j, S

j

• u 6∈ {∅, ǫ}

in this case U • u = (S • u) · T . (2) ∃j

0

, ∃u

, u

′′

, u = u

· u

′′

, S

j0

• u

= ǫ;

in this case U • u = T

j0

• u

′′

. (3) ∀j, ∀u

u, S

j

• u = ∅, S

j

• u

6= ǫ;

in this case U • u = ∅ = (S • u) · T .

This lemma is an easy extension of lemma 1.3.8 to the matricial case.

Lemma 1.3.10 For every S ∈ D B

n,m

hh W ii, T ∈ D B

m,s

hh W ii,

1. S · T ∈ D B

n,s

hh W ii.

2. kS · Tk ≤ kSk + kT k.

Operations on row-vectors

Let us introduce two new operations on row-vectors and prove some techni-

cal lemmas about them.

(19)

Given A, B ∈ B

1,m

hh W ii and 1 ≤ j

0

≤ m we define the vector C = A∇

j0

B as follows:

if A = (a

1

, . . . , a

j

, . . . , a

m

), B = (b

1

, . . . , b

j

, . . . , b

m

) then C = (c

1

, . . . , c

j

, . . . , c

m

) where

c

j

= a

j

+ a

j0

· b

j

if j 6= j

0

, c

j

= ∅ if j = j

0

. Lemma 1.3.11 Let A, B ∈ B

1,m

hh W ii and 1 ≤ j

0

≤ m.

1. if A, B are deterministic, then A∇

j0

B is deterministic.

2. if A, B are deterministic, then kA∇

j0

Bk ≤ kAk + kBk.

Given A ∈ D B

1,m

hh W ii and 1 ≤ j

0

≤ m we define the vector A

= ∇

j0

(A) as follows:

if A = (a

1

, . . . , a

j

, . . . , a

m

) then A

= (a

1

, . . . , a

j

, . . . , a

m

) where a

j

= a

j0

· a

j

if j 6= j

0

, a

j

= ∅ if j = j

0

. Lemma 1.3.12 Let A ∈ D B

1,m

hh W ii and 1 ≤ j

0

≤ m.

Then ∇

j0

(A) ∈ D B

1,m

hh W ii and k∇

j0

(A)k ≤ kAk.

1.3.2 Strict-deterministic grammars

Definition

Definition 1.3.13 Let G =< X, V, P > be a context-free grammar in Greibach normal form. G is said strict-deterministic iff there exists an equivalence relation ⌣ over V fulfilling the following condition: for every x ∈ X, if (E

k

)

1≤k≤m

are distinct variables in V such that ∀k ∈ [1, m], E

1

⌣ E

k

and H

k

= P

(Ek,h)∈P

h • x, then

(H

1

, H

2

, . . . , H

m

) is a deterministic vector.

Any equivalence ⌣ satisfying the above condition is said to be a strict equiv-

alence for the grammar G.

(20)

This definition is a reformulation of [Har78, Definition 11.4.1 p.347] adapted to the case of a Greibach normal-form.

Theorem 1.3.14 Let G =< X, V, P > be a strict-deterministic grammar.

Then its reduced form G

0

=< X, V

0

, P

0

>, as defined in formulas (1.14, 1.15), is strict-deterministic too. Moreover, if ⌣ is a strict equivalence for G, its restriction over V

0

is a strict equivalence for G

0

.

The proof would consist in slightly extending the proof of [Har78, Theorem 11.4.1 p.350].

It is known that, given a dpda M, its associated grammar G

M

is strict- deterministic. By theorem 1.3.14 G

0

is strict-deterministic too.

The action of X

on B hh V ii

Let (V, ⌣) be the infinite structured alphabet associated with M in the above paragraph. We define the right-action ⊙ as the unique σ-right-action of the monoid X

over the semi-ring B hh V ii such that: for every v ∈ V, β ∈ V

, x ∈ X

(v · β) ⊙ x = ( X

(v,h)∈P

h • x) · β, (1.16)

ǫ ⊙ x = ∅. (1.17)

Lemma 1.3.15 For every S ∈ B hh V ii, u ∈ X

,

ϕ(S ⊙ u) = ϕ(S) • u (i.e. ϕ is a morphism of right-actions).

Right-action and product

Let us define here handful notations for some particular vectors or matrices.

We use the Kronecker symbol δ

i,j

meaning ǫ if i = j and ∅ if i 6= j. For every 1 ≤ n, 1 ≤ i ≤ n, we define the row-vector ǫ

ni

as:

ǫ

ni

= (ǫ

ni,j

)

1≤j≤n

where ∀j, ǫ

ni,j

= δ

i,j

.

(21)

We call unit row-vector any vector of the form ǫ

ni

.

For every 1 ≤ n, we denote by ∅

n

∈ D B

1,n

hh V ii the row-vector:

n

= (∅, . . . , ∅).

The right-action ⊙ has similar behaviour w.r.t. the product as the right- action • does.

Lemma 1.3.16 Let S ∈ D B

1,m

hh V ii, T ∈ B

m,s

hh V ii, u ∈ X

and U = S · T . Exactly one of the following cases is true:

(1) S ⊙ u 6∈ {∅

m

} ∪ {ǫ

mj

|1 ≤ j ≤ m}

in this case U ⊙ u = (S ⊙ u) · T . (2) ∃j

0

, ∃u

, u

′′

, u = u

· u

′′

, S ⊙ u

= ǫ

sj0

;

in this case U ⊙ u = T

j0

⊙ u

′′

.

(3) ∀j, ∀u

u, S ⊙ u = ∅

m

and S ⊙ u

6= ǫ

mj

; in this case U ⊙ u = ∅

s

= (S ⊙ u) · T .

1.3.3 Linear independence

We adapt here the key-idea of [Mei89, Mei92] to deterministic series in D RB hh V ii.

Let us call linear combination of the series S

1

, . . . , S

j

, . . . , S

m

any series of the form P

1≤j≤m

α

j

· S

j

where ~ α ∈ D RB

1,m

hh V ii. Following an analogy with classical linear algebra, we develop a notion corresponding to a kind of linear independence of the classes (mod ≡) of the given series.

Lemma 1.3.17 Let S

1

, . . . , S

j

, . . . , S

m

∈ D RB hh V ii. The following are equivalent

1. ∃~ α, ~ β ∈ D RB

1,m

hh V ii, ~ α 6≡ β, such that ~ P

1≤j≤m

α

j

·S

j

≡ P

1≤j≤m

β

j

· S

j

,

2. ∃j

0

∈ [1, m], ∃~γ ∈ D RB

1,m

hh V ii, ~γ 6≡ ǫ

mj0

, such that S

j0

≡ P

1≤j≤m

γ

j

·

S

j

,

(22)

3. ∃j

0

∈ [1, m], ∃~γ

∈ D RB

1,m

hh V ii, γ

j0

≡ ∅, such that S

j0

≡ P

1≤j≤m

γ

j

· S

j

,

The equivalence between (1),(2) and (3) was first proved in [Mei89, lemma 11 p.589

2

], in the case where the S

j

’s are configurations q

j

ω, with the same ω.

Proof: Let use the notation S = (S

j

)

1≤j≤m

∈ D RB

m,1

hh V ii.

(1) ⇒ (2):

Let us consider

u = min{ϕ(~ α)∆ϕ( β ~ )}.

There exists j

0

∈ [1, m], such that

~

α ⊙ u = ǫ

mj0

⇔ β ~ ⊙ u 6= ǫ

mj0

.

Let us suppose , for example, that ~ α ⊙ u = ǫ

mj0

while β ~ ⊙ u 6= ǫ

mj0

and let

~γ = β ~ ⊙ u. As ≡ is preserved by the action ⊙ (see lemma 1.3.15):

(~ α · S) ⊙ u ≡ ( β ~ · S) ⊙ u. (1.18) Using lemma 1.3.16, we obtain:

(~ α · S) ⊙ u = S

j0

. (1.19) Let us examine now the righthand-side of equality (1.18). Let u

≺ u . By minimality of u, β ~ ⊙ u

is a unit iff ~ α ⊙ u

is a unit. But if ~ α ⊙ u

is a unit, then ~ α ⊙ u = ∅

m

, which is false. Hence β ~ ⊙u

is not a unit. By lemma 1.3.16 ( β ~ · S) ⊙ u = ( β ~ ⊙ u) · S. (1.20) Let us plug equalities (1.19) and (1.20) in equivalence (1.18) and let us define

~γ = β ~ ⊙ u. We obtain:

S

j0

≡ ~γ · S, where ~γ 6≡ ǫ

mj0

. (2) ⇒ (3):

S

j0

≡ γ

j0

· S

j0

+ ( X

j6=j0

γ

j

· S

j

), γ

j0

6≡ ǫ.

2

numbering of the english version

(23)

By the well-known Arden’s lemma, we can deduce that S

j0

≡ X

j6=j0

γ

j0

γ

j

· S

j

= ∇

j0

(γ) · S.

Taking γ

= ∇

j0

(γ ) we obtain

S

j0

≡ γ

· S where γ

j0

= ∅.

(3) ⇒ (1):

(3) asserts that

X

1≤j≤m

δ

j,j0

S

j

≡ X

1≤j≤m

γ

j

· S

j

.

The fact that δ

j0,j0

= ǫ 6≡ ∅ shows that (δ

1,j0

, . . . , δ

m,j0

) 6≡ (γ

1

, . . . , γ

m

).

Hence (1) is true.

2

†Dependencies

Let S

1

, . . . , S

j

, . . . , S

m

∈ D RB hh V ii.

We call linear dependence relation (dependency for short) between the S

j

’s, an equivalence of the form:

S

j0

≡ X

1≤j≤m

γ

j

· S

j

,

where j

0

∈ [1, m], ~γ

∈ D RB

1,m

hh V ii and γ

j0

= ∅. (This terminology originates in [Mei89] where the usefulness of such relations was shown).

†Canonical coordinates

Let S, T

1

, T

2

, . . . , T

n

D B hh V ii. We assume that i 6= j ⇒ T

i

6= T

j

. For every i ∈ [1, n] we define

α

i

:= {u ∈ V

| S • u = T

i

and ∀u

≺ u, ∀j ∈ [1, n], S • u

6= T

j

} and

α

n+1

:= {u ∈ S | ∀u

u, ∀j ∈ [1, n], S • u

6= T

j

}

(24)

Lemma 1.3.18 The vector − → α of canonical coordinates fullfils:

(CC1) − → α ∈ D B

1,n+1

hh V ii (CC2) S = P

n

i=1

α

i

· T

i

+ α

n+1

(CC3)S is linear combination of the T

i

, with a vector of coefficients in D B

1,n

hh V ii, iff α

n+1

= ∅.

Remark 1.3.19 - if the series S, T

i

are rational, then the canonical-coordinates vector − → α is rational

- the notion of canonical coordinates is defined w.r.t any family (T

1

, . . . , T

n

) of deterministic series, provided that it has no repetition, but this family might be linearly dependent

- (CC3) gives, in the case where the S and T

i

are rational, an algorithm for testing membership of S in V(T

1

, . . . , T

n

).

Lemma 1.3.20 Suppose that the series T

1

, . . . , T

i

, . . . , T

n

∈ D RB hh V ii are rational.

1- One can test whether these series are linearly independant.

2- One can construct the basis that generates the deterministic space V(T

1

, . . . , T

n

).

Proof: To be written 2

1.4 PROOF

1.4.1 †The deduction rules

Let us denote by ˆ N the set of natural integers augmented with two symbols

−∞, +∞:

N ˆ := N ∪ {−∞, ∞}

We call weighted equation any triple of the form

(p, S, T )

(25)

where p ∈ N, S, T ˆ ∈ D RBhh V ii. and we denote by E the set of all weighted equations over the alphabet V . The rules of D

0

are the following:

(R0)

{(p, S, T )} ||−− (q, S, T ) for p, q ∈ N, p < q, S, T ˆ ∈ D RB hh V ii,

(R1)

{(p, S, T )} ||−− (p, T, S) for p ∈ N, S, T ∈ D RBhh V ii,

(R2)

{(p, S, S

), (p, S

, S

′′

)} ||−− (p, S, S

′′

) for p ∈ N, S, S

, S

′′

∈ D RB hh V ii,

(R3)

∅ ||−− (0, S, S) for S ∈ D RB hh V ii,

(R4)

{(p + 1, S ⊙ x, T ⊙ x) | x ∈ X} ||−− (p, S, T ) for p ∈ N, S, T ∈ D RB hh V ii, (S 6≡ ǫ ∧ T 6≡ ǫ) ,

(R5)

{(p, S, S

)} ||−− (p + 2, S ⊙ x, S

⊙ x) for p ∈ N, S, T ∈ D RB hh V ii, x ∈ X,

(R6)

{(p, S · T

+ S

, T

)} ||−− (p, S

· S

, T

) for p ∈ N, (S, S

) ∈ D RB

1,2

hh V ii, T

∈ D RBhh V ii, S 6≡ ǫ, (R7)

{(p, S, S

), (p, T, T

)} ||−− (p, S + T, S

+ T

) for p ∈ N, (S, T ), (S

, T

) ∈ D RB

1,2

hh V ii,

(R8)

{(p, S, S

)} ||−− (p, S · T, S

· T )

for p ∈ N, S, S

, T ∈ D RB hh V ii,

(26)

(R9)

{(p, T, T

)} ||−− (p, S · T, S · T

) for p ∈ N, S, T, T

∈ D RB hh V ii,

We denote by D

0

the above set of rules (and we reserve the right to use variants of this system when useful). The usual integer addition is extended to ˆ N by: ∀n ∈ N

−∞+n = n+−∞ = −∞, ∞+n = n+∞ = ∞, −∞+∞ = ∞+(−∞) = ∞.

( ˆ N is a monoid, with neutral element 0 and with absorbing element ∞). The usual ordering over N is extended to ˆ N by: ∀n ∈ N

−∞ < n < ∞ The divergence between S and S

, is defined by:

Div(S, S

) = inf{| u || u ∈ ϕ(S)△ϕ(S

))}.

The “cost-function” H : E → N ∪ {∞} is defined by : H(n, S, S

) = n + 2 · Div(S, S

), Note that, for every weightd equation (n, S, T )

H(n, S, T ) = ∞ ⇔ S ≡ T.

All the rules of D increase the cost i.e.

∀(P, A) ∈ ||−− , inf{H(p), p ∈ P} ≤ H(A).

(We recall that inf(∅) = ∞).

In particular we have:

∀(P, A) ∈ ||−− , inf{ Tv (p), p ∈ P} ≤ Tv (A).

where Tv (n, S, T ) , the truth-value of T (nS, T ) is the truth value of “S ≡ T”

i.e. 1 (resp. 0) iff S ≡ T (resp. S 6≡T ). We introduce the notation:

P ||−−

Tv

A

in order to mean inf{ Tv (p), p ∈ P } ≤ Tv (A), i.e. that the conjunction of the equivalences of the lhs imply the equivalence of the rhs. We speak of ||−−

as the “deduction relation” while ||−−

Tv

is the “logical deduction relation”.

Among the rules we distinguish the strict rules, which have the property to

strictly increase the cost (except in the case where the cost is infinite). The

set of strict rules of the above system D

0

is {R0, R4}.

(27)

1.4.2 † Proofs

We call proof system (in short system) any subset of ˆ N × D RB hh V ii × D RB hh V ii. For example , D

0

above is a proof system. Let D be any proof system. A classical proof w.r.t. D is what is usually called a proof within the formal system D: it is a tree whose root is the proven statement, whose leaves are axioms and where every internal node can be deduced from its sons by one rule of the system D.

A basic proof w.r.t. D is a couple of sets (P, Q) where P , Q are finite subsets of weighted equations. The elements of P are called the nodes of the proof while the elements of Q are called the assertions of the proof. The nodes are supposed to be proved by some strict rule from a finite subset H ⊆ P ∪ Q while the assertions are supposed to be proved by some classical proof , within the system D, but where the axioms are those of D augmented with the elements of P .

Let us give a formal definitions.

Definition 1.4.1 A classical proof w.r.t. the set of rules D is a tree T labelled by weighted equations, fulfilling the conditions:

for every node of T labelled by a weighted equation E, with sons labelled by E

1

,. . . ,E

, there exist a rule R of D such that

{E

1

, . . . , E

} ||−−

R

E

Definition 1.4.2 A basic proof w.r.t. the set of rules D is a couple of sets (P, Q) where P , Q are sets of weighted equations, fulfilling the conditions:

P1- for every p ∈ P, there exist H ⊆ P ∪ Q and a strict rule R of D such that

H ||−−

R

p

P2- for every q ∈ Q, there exists a classical proof of q, labelled on P ∪ Q, within the system D augmented with the set of rules {∅ ||−− p | p ∈ P}.

Note that this notion of proof allows some loops because the set H , in

clause (P1), might posess p itself. This apparent “laxity” in clause a(P1)

is compensated by the strictness condition of the same clause. Nevertheless

(28)

clause (P2) excludes , in some sense, too much loops.

The general notion of proof w.r.t. a system D is now defined inductively, together with the notion of extended system and a notion of strict rule.

Definition 1.4.3 1- The (basis) system D itself is an extended system.

2- If (P , Q) is a basic proof w.r.t some extended system D

, then (P, Q) is a proof w.r.t. the system D.

3- If (n, S, T ) ∈ P ∪ Q, where (P , Q) is a proof w.r.t. the system D and D

is an extended system, then D

∪ {∅ ||−− (−∞, S, T )} is an extended system.

4- Every rule of the form ∅ ||−− (−∞, S, T ) is strict.

More intuitively, each time we have obtained a proof of an assertion (n, S, T ), we can then add the rule

∅ ||−− (−∞, S, T )

to the system and use it in further proofs. Moreover, since the cost of ∅ is ∞, point 4 is reasonable (i.e. it will guaranty that any basic proof w.r.t some well-founded extension of D

0

only proves equations which have an infinite cost).

The above inductive definition can be translated into a more explicit notion of proof w.r.t. D, that we shall prefer in our program.

Definition 1.4.4 A stratified proof w.r.t. D is a pair of two finite sequences (P

0

, Q

0

), (P

1

, Q

1

), . . . , (P

n

, Q

n

)

A

0

, A

1

, . . . , A

n

where

(P

i

, Q

i

) is a basic proof w.r.t. D S

i−1

j=0

A

j

A

i

is the set of all rules ∅ ||−− (−∞, S, T ) such that at least one weighted equation (n, S, T ) belongs to P

i

∪ Q

i

.

We call D

= D S

n

i=0

A

n

the extended system proved by this stratified proof.

A system D

which is an extended system w.r.t. D (according to definition

1.4.3) is also called a well-founded extension of D.

(29)

One can easily show that a weighted equation admits a proof w.r.t D iff it admits a basic proof w.r.t. some well-founded extension D

of D. Let us call anti-equation any triples (u, S, T ) such that u is a word which is a witness of S 6≡T i.e.:

(S ⊙ u = ε ∧ T ⊙ u = ∅) ∨ (S ⊙ u = ∅ ∧ T ⊙ u = ε).

1.4.3 †Partial Proofs

A partial proof is, informally speaking, a basic proof that can have some

“open nodes” i.e. some nodes which do not fulfill condition P1 (of def.

1.4.2), but that would, intuitively, be useful for making other nodes fulfill this condition P1. In contrast, a “closed node” is a node that fulfills condition P1. Note that a closed node does not necessarily be true (i.e. have an infinite cost) ! this will be ensured only when the partial proof, as a whole, has been completed into a proof. Note also that we could call “secure” the nodes that fulfill condition P1 with an empty set of premises H: these are necessarily true (whatever the state of the whole partial proof is). In addition a partial proof has a set of assertions which are equations deduced from the nodes.

Let us state a formal definition.

Definition 1.4.5 A partial proof w.r.t. a system D is a 3-tuple of sets (P

o

, P

c

, Q) where P

o

, P

c

, Q are sets of weighted equations fulfilling the con- ditions:

PP1- for every p ∈ P

c

, there exist H ⊆ P

c

∪ P

o

∪ Q and a strict rule R of D such that

H ||−−

R

p

PP2- for every q ∈ Q, there exists a classical proof T of q, labelled over some H ⊆ (P

c

∪ P

o

∪ Q) \ {q}.

The elements of Q are called the assertions of the partial proof.

1.4.4 †Tree of Partial Proofs

The notion we are to define now must be understood as a step towards the

construction of a stratified proof w.r.t. to system D.

(30)

Definition 1.4.6 A Tree of Partial Proofs w.r.t. system D is a sequence h SP , D

, ( PP

i

)

i∈I

, Qi ¯

where

- SP is a stratified proof, proving the system D

- I is a finite set endowed with an ordering , such that the ordered set (I, ) has a Hasse-diagram which is a tree

- for every i ∈ I , PP

i

= (P

i,o

, P

i,c

, Q

i

) is a triple such that (P

i,o

, P

i,c

, S

ji

Q

j

) is a partial proof w.r.t. D

- Q ¯ is a set of anti-equations (we call anti-assertions the elements of Q) ¯ - for each partial proof PP

i

, where i is not the least element (i.e. the root) of (I, ), there is a node p

j

∈ P

j,o

∪ P

j,c

, where j is the father of i, to which the partial proof PP

i

is attached.

The motivation for defining the ordering over I and the attachment of PP

i

to some node of its father PP

j

is the following:

- j is the father of i (i.e. its predecessor for ) means that some node p

j

of PP

j

needed the equation (n, S, T ) labelling the root of PP

i

:

• either to be itself proved by a rule of D

; this means that p

j

was open but the truth of p

j

does not imply the truth of (n, S, T ); the fact that (n, S, T ) becomes the root of some new partial proof reflects this lack of implication concerning truth.

• either the node p

j

was already closed, but the truth of (n, S, T ) would lead an alternative “simpler”proof of p

j

while the falsity of (n, S, T ) would lead to some dependency among series over which S, T are both decomposable. Calculating these dependencies is an essential ingredi- ent of our algorithm.

a figure

1.4.5 † Constructing proofs of equivalence or witnesses of non-equivalence

Let us sketch how our program, given some deterministic series S, T , will

find a proof of the weighted equation (0, S, T ) (w.r.t. D

0

) or will find a

witness of S 6≡T .

(31)

The program maintains, at each step of the computation, a tree of partial proofs.

The program starts from the tree of partial proofs:

h SP , D

, ( PP

i

)

i∈I

, Qi ¯

where SP is empty, D

= D

0

, I = {0}, PP

0

consists of just one open node which is (0, S, T ) and ¯ Q = ∅.

Then it iteratively modifies this t.p.p. by either:

1. increasing some partial proof PP

i

by closing some open node p and adding some new open nodes that prove, by one rule of D

, together with auxiliary assertions from S

ji

PP

i

the closed node; conversely, the new nodes are logical consequences of the node p and the auxiliary assertions (but, in general, not consequences w.r.t D

);

2. increasing some partial proof PP

i

by adding some new assertion which is a consequence (by one rule of D

) of some closed node(s) and some assertion(s) from S

ji

PP

j

3. creating, from a node N of some partial proof PP

i

, a sequence of n new partial proofs, each one consisting of just one single, open node R

k

labelled by a weighted equation (n

k

, S

k

, T

k

) and with no assertion.

The set I is extended by n elements i

1

, . . . , i

k

, . . . , i

n

which are sons of i. The set of nodes {R

k

| 1 ≤ k ≤ n} proves the node R (by one rule of D

). A link from every R

k

to the father-node N is created.

4. discovering that an open node of PP

i

(i 6= 0) is of the form (n, ∅, ε) or (n, ε, ∅); a witness of non-equivalence is propagated to the root R

j

of some PP

j

where j i;

(a) if j 6= 0, the witness u together with the equation (n, S, T ) of

the root of PP

j

allow to construct a new anti-assertion (u, S, T )

which is passed to the father of R

j

; finally, all the partial proofs

PP

k

with index j k are destroyed;

(32)

(b) if j = 0, the witness u is thus a witness of falsity for the initial equation (0, S, T ) (the root of PP

0

). The algorithm answers NO and returns the anti-assertion (u, S, T ).

5. discovering that a sub-partial-proof of a triple PP

i

(i 6= 0) is a basic proof w.r.t D

(i.e. PP

i

= (P

i,o

, P

i,c

∪P

i,c′′

, Q

i

∪Q

′′i

) and (∅, P

i,c

, Q

i

) is a basic proof w.r.t. D

). All the nodes and assertions of this sub-partial proof are turned into new axioms: the system D

is thus augmented.

All the nodes of this fragment are removed from the partial proof PP

i

and integrated into SP .

6. discovering that the tree of partial proofs has no open node. The union S

i∈I

PP

i

is thus a basic proof w.r.t D

. The algorithm stops and answers YES.

( SP , S

i∈I

PP

i

) is then a witness of the equivalence asserted by the root:

SP proves the system D

while S

i∈I

PP

i

is a basic proof w.r.t. D

. The precise way the program will perform these actions will be determined by a strategy; in turn, the strategy will call tactics that are able to perform, given a node of the current tree of partial proofs, one of the above kind of actions available in the neighborhood of this node.

one figure for each step

(33)

Objects

2.1 Deterministic Pushdown AUTOMATON

X= terminal alphabet Q= set of states

Z= pushdown alphabet, set of transitions of the form:

qz −→

y

where q, r ∈ Q, z ∈ Z, y ∈ (X ∪ {ε}), ω ∈ Z

(on convient de noter le sommet de pile comme le bord gauche du mot de pile)

2.2 Strict-Deterministic GRAMMAR

G = hX, V, P i

33

(34)

2.3 VECTEUR deterministe rationnel (sur V)

VECTEUR-ligne deterministe rationnel (sur V):

un vecteur de longueur n est represente par un a.f. deterministe sur V avec un vecteur de parties reconnaissantes Q

1,+

, Q

2,+

, . . . , Q

n,+

; ces parties sont disjointes deux ` a deux. On appelle serie rationnelle deterministe un tel vecteur de longueur 1.

Q

+

Figure 2.1: A rational deterministic series.

Q

1,+

Q

2,+

Q

3,+

Figure 2.2: A d´eterministic rational row-vector of length 3.

VECTEUR-colonne deterministe rationnel (sur V):

un vecteur de hauteur n consiste en une suite de n series rat. deterministes.

(it is represented by n “independent” finite deterministic automata).

GENERATING-SET:

vectors: a deterministic rational column-vector (S

1

, . . . , S

n

)

dependencies: a list of assertions A

1

, . . . , A

p

which are dependencies i.e.

A

i

: S

i

m

X

k=1

α

k

S

k

.

(35)

EQUATION:

poids: entier

serie-gauche: serie rationnelle deterministe serie-droite: serie rationnelle deterministe

RULE:

/* a rule of the current deduction system */

name: word;

premises: list of meta-equations conclusion: a meta-equation

(note that by forgetting the weights, we obtain a logical rule).

Basic rules:

all the rules of system D

0

: (R0), (R1), . . . , (R9)

Some derived rules:

name: DERIV;

word: w ∈ X

premises: (n, S, T )

conclusion: (n + 2|w|, S ⊙ w, T ⊙ w) /* |w| times R5 */

name: SUBST1-R;

premises: (p, P

n

i=1

α

i

S

i

, T ), (p

1

, S

1

, S

1

) . . . , (p

j

, S

j

, S

j

), . . . , (p

n

, S

n

, S

n

) conclusion:(max(p, p

1

, . . . , p

n

), P

n

i=1

α

i

S

i

, T ) name: SUBST2-R;

premises: (p, T, P

n

i=1

α

i

S

i

), (p

1

, S

1

, S

1

) . . . , (p

j

, S

j

, S

j

), . . . , (p

n

, S

n

, S

n

) conclusion:(max(p, p

1

, . . . , p

n

), T, P

n

i=1

α

i

S

i

)

(36)

name: SUBST1-L;

premises: (p, P

n

i=1

α

i

S

i

, T ), (p

1

, α

1

, α

1

) . . . , (p

j

, α

j

, α

j

), . . . , (p

n

, α

n

, α

n

) conclusion:(max(p, p

1

, . . . , p

n

), P

n

i=1

α

i

S

i

, T ) name: SUBST2-L;

premises: (p, T, P

n

i=1

α

i

S

i

), (p

1

, α

1

, α

1

) . . . , (p

j

, α

j

, α

j

), . . . , (p

n

, α

n

, α

n

) conclusion:(max(p, p

1

, . . . , p

n

), T, P

n

i=1

α

i

S

i

) name: ARDEN1;

premises:(p, S · T + S

, T ) conclusion: (p, S

· S

, T ) /* new name for R6 */

name: ARDEN2;

premises:(p, T, S · T + S

) conclusion: (p, T, S

· S

) /* R1+ R6+ R1*/

This set of rules is updated by the program which can add some rules of the form

∅ ||−− (−∞, S, T )

after having found a proof of some assertion (n, S, T ) where n ∈ N × D RB hh V ii × D RB hh V ii (see §1.4.5).

2.4 ASSERTION

weight: integer

left-series: rational deterministic series right-series: rational deterministic series root: NODE

premises: list of (NODE or ASSERTION) ded-rule: RULE

/* premisse prove equation by ded-rule w.r.t. deduction system */

(37)

2.5 ANTI-ASSERTION

word : a word u over X (the terminal alphabet), such that (S ⊙ u = ε ∧ T ⊙ u = ∅) ∨ (S ⊙ u = ∅ ∧ T ⊙ u = ε) /* we call “witness of falsity” for the pair (S, T ) such a word */

left-series: rational deterministic series S right-series: rational deterministic series T

/* no root and no weight: an anti-assertion is secure */

2.6 NODE

weight: integer

/* −∞ is reserved for secure equations that are added to the deduction- system */

left-series: rational deterministic series S right-series: rational deterministic series T root: NODE

/* the root of the subproof it belongs to */

father: NODE

/* the node that the birth of the node allowed to close */

auxiliaries: list of (NODE or ASSERTION) log-rule: RULE

/* father + auxiliaries logically prove equation by log-rule */

premises: list of (NODE or ASSERTION) ded-rule: RULE

/* premisse prove equation by ded-rule w.r.t. deduction system */

status: open, closed, TCrunning

(”open”: the node has empty premises and null ded-rule,

”closed”: equation is proved from its premises by the ded-rule; but equation is not yet secure because the premises themselves ...

”TCrunning”: the node is open and is decomposed over a generating set G;

it is pointing to a list L of ancestors all decomposed over G; the process of triangulating this system L of equations is running.

”TCactive”: the node is closed and is decomposed over a generating set

G; it is member of a list L of nodes all decomposed over G; the process of

(38)

triangulating this system L of equations is running;

2.7 PROOF

Set of nodes, assertions, anti-assertions

these objects are linked together by the fields: root, father, premises, auxil- iaries

/* The structure is a tree of partial proofs in the sense of section 1.4;

/* The set of nodes is a proof in the sense of [S´en01] when there are no open nodes;

/* The assertions are intermediate statements that are proved by nodes and prove other nodes; they ensure that set of nodes reallyis a proof in the sense of [S´en01].

/* The anti-assertions are truths of the form (S⊙u = ε∧T ⊙u = ∅)∨(S ⊙u =

∅ ∧ T ⊙ u = ε) i.e. kinds of negations of assertions (see section 2.5); they are used for finding “dependencies” between series, see section 1.3

One can test in P-time whether such a structure is a tree of partial proofs (in particular, whether it is a proof w.r.t. D

0

in the sense of definition 1.4.3).

TACTICS(P: PROOF, N: NODE): PROOF Fait passer d’une preuve a une preuve:

- soit en fermant le noeud N (qui ´etait ouvert) et en ajoutant eventuellement d’autres noeuds ouverts,

- soit en refutant le noeud N, en detruisant toute la sous-preuve issue de racine(N), et en transformant racine(N) en une anti-assertion.

STRATEGY(N: NODE): ANTI-ASSERTION or PROOF

If the equation of N is false, returns an anti-assertion witnessing its falsity,

else returns a proof P rooted in N.

(39)

Operations

3.1 AUTOMATE a pile deterministe

AUT-to-GRAM(A: AUTOMATE): GRAMMAIRE

produit une grammaire strict-deterministe equivalente a l’apd en argument;

la grammaire est propre (sans epsilon-regle).

3.2 GRAMMAIRE deterministe

EST-DETERMINISTE(G: GRAMMAIRE): partition ou booleen repond NON si la grammaire n’est pas strict-deterministe

repond ⌣ si la grammaire est strict-deterministe et si ⌣ est sa partition stricte la plus fine (i.e. celle qui a le plus de classes).

39

(40)

3.3 VECTEUR deterministe rationnel (sur V)

SMILEDET-L(V:VECTEUR-ligne): BOOLEAN

Returns TRUE if the argument, which is given by a deterministic parti- tionned automaton, is ⌣-deterministic.

Returns FALSE otherwise.

MINIMIZE-L(V:VECTEUR-ligne)

Remplace le vecteur-ligne argument par son automate minimal.

MINIMIZE-C(V:VECTEUR-ligne)

Remplace le vecteur-colonne argument par son automate minimal.

NORM(V:VECTEUR-ligne) : integer

returns the number of states of the minimal d.f.a. recognizing V.

EQUAL(U:VECTEUR-ligne,V:VECTEUR-ligne):BOOLEAN Les vecteurs sont rationnels.

Returns TRUE iff the two vectors are equal.

RESIDU-LETTRE( S:VECTEUR-ligne, v:lettre de V):VECTEUR-ligne ~ returns S ~ • x

RESIDU( S:VECTEUR-ligne, m:mot sur V) : VECTEUR-ligne ~ returns S ~ • u

ACTION-LETTRE( S:VECTEUR-ligne, x:lettre de X):VECTEUR-ligne ~ returns S ~ ⊙ x

ACTION( S:VECTEUR-ligne, u:mot sur X):VECTEUR-ligne ~

(41)

returns S ~ ⊙ u

ACTION-SER(u:mot sur X, S: SERIE):mot sur X returns P

S⊙s=ε

u • s

(i.e. returns the unique left-quotient of u by some terminal word s ∈ X

such that S ⊙ s = ε; returns ∅ if such a word s does not exist).

MAYBE-EQUIV( S:VECTEUR-ligne, ~ T ~ :VECTEUR-ligne):BOOLEAN or WORD over X

Cherche, par une methode heuristique (for example probabilistic sampling, comparison of commutative images, etc...), un mot u tel que

∃i ∈ [1, l( S ~ ] tel que

S ~ ⊙ u = ε

i

⇔ T ~ ⊙ u 6= ε

i

et pour tout prefixe strict u

≺ u et tout j ∈ [1, l( S ~ ]

S ~ ⊙ u

6= ε

j

∧ T ~ ⊙ u

6= ε

j

- si un mot u est trouve: renvoie u

- sinon, renvoie TRUE

PROD(V: VECTEUR-ligne, C: VECTEUR-colonne):SERIE renvoie le produit V· C du vecteur-ligne par le vecteur-colonne.

COORD(S, T

1

, T

2

, . . . , T

n

: SERIES): VECTEUR-ligne of length n + 1.

This function returns:

A rational deterministic line vector of length n + 1: (α

1

, . . . , α

n

, α

n+1

) such that

S =

n

X

i=1

α

i

· T

i

+ α

n+1

This vector is defined in section 1.3 (see lemma 1.3.18) and is called the vector of canonical coordinates of S over the family T

1

, T

2

, . . . , T

n

,

APP-VECT(S, T

1

, T

2

, . . . , T

n

: SERIES): VECTEUR-ligne ou NON

This function returns:

(42)

NO if S does not belong to the vector space generated by T

1

, T

2

, . . . , T

n

, (α

1

, α

2

, . . . , α

n

) if S belongs to the vector space generated by T

1

, T

2

, . . . , T

n

and (~ α, ∅) is the vector of canonical coordinates of S over the family T

1

, T

2

, . . . , T

n

. BASE:(S

1

, S

2

, . . . , S

n

: V ECT EU R − colonne):VECTEUR-colonne

Renvoie (T

1

, T

2

, . . . , T

m

) o` u m ≤ n et T ~ est la base de EV (S

1

, S

2

, . . . , S

n

);

renvoie aussi les expressions des S

i

comme combinaisons lineaires des T

j

. REMPL-D(S:SERIE, (S1,S’1):couple de SERIE,(S2,S’2): couple de SERIE,. . . , (Sn,S’n): couple de SERIE):SERIE

renvoie P

n

i=1

α

i

S

i ssi S = P

n i=1

α

i

S

i

o` u − → α est le vecteur des coordonnees canoniques de S sur les S

i

(voir section 1.3).

3.4 ASSERTION

A-CALCUL(A:ASSERTION, u: mot sur X):ASSERTION A = (p, S, T )

renvoie A

telle que:

poids := p + 2|u|, serie-gauche= S ⊙ u, serie-droite= T ⊙ u racine(A’) = racine(A) regle= CALCUL(u) premisses= A

A-REMPL1-D(A: ASSERTION,B

1

:ASSERTION,B

2

:ASSERTION,. . .,B

n

:ASSERTION):

ASSERTION A = (p, P

n

i=1

α

i

S

i

, T ), B

i

= (p

i

, S

i

, S

i

) avec p

i

≤ p

(les α

i

sont les coordonnees canoniques sur la famille (S

i

) et α

n+1

= ∅) renvoie A

telle que:

poids := p serie-gauche= P

n

i=1

α

i

S

i

(coordonnees canoniques sur la famille (S

i

)) serie-droite= T

racine(A’) = racine(A)

Références

Documents relatifs

The following criterion, usually referred to as Dynkin's criterion, will satisfy in the cases we shall consider... ARKIV FfR

The following three lemmas can be established directly from the definition of the all-pass transfer function... Almqvist &amp; %Viksells Boktryckerl AB

Pour une garantie de fraîcheur irréprochable, ces plats sont préparés en quantité limitée Notre Chef est à votre disposition en cas de restrictions alimentaires ou d’allergies.

Plutôt classique pour des travaux de Génie Civil, ce béton, acheminé sur place depuis la centrale Unibéton Codognan (Gard) et mis en œuvre par pompage, est de classe de résis-

Construire des automates de Moore déterministes pour les langages de

Pour une garantie de fraîcheur irréprochable, ces plats sont préparés en quantité limitée Notre Chef est à votre disposition en cas de restrictions alimentaires ou d’allergies..

Pour une garantie de fraîcheur irréprochable, ces plats sont préparés en quantité limitée Notre Chef est à votre disposition en cas de restrictions alimentaires ou d’allergies.

Pour une garantie de fraîcheur irréprochable, ces plats sont préparés en quantité limitée Notre Chef est à votre disposition en cas de restrictions alimentaires ou d’allergies..