finitely presentedfinitely presented exppgansions of algebras · take s 1.check if a 1 satisfies s...

38
Finitely Presented Finitely Presented Expansions of Algebras (Algebraic Specifications of Abstract Data Types) Bakhadyr Khoussainov Computer Science Department The University of Auckland New Zealand

Upload: others

Post on 27-Jun-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Finitely PresentedFinitely Presented Expansions of Algebrasp g

(Algebraic Specifications of Abstract Data Types)

Bakhadyr KhoussainovComputer Science Department

The University of AucklandNew Zealand

Page 2: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

This is a joint work with S G h (N ibi k U i it )Sergey Goncharov (Novosibirsk University), Denis Hirschfeldt (University of Chicago),Sasha Rubin (The University of Auckland).

Research is partially supported by Marsden F d f N Z l d R l S i tFund of New Zealand Royal Society.

Page 3: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Definition: A many sorted algebra is a tuple A=(A1, A2,…An; f1,f2,…., fk, c1,…,cr), wherewhere

each A is a set of elements of a given sorteach Ai is a set of elements of a given sort,each fj is a function of type (s1,…,sm)→s.each ck is a constant.

Page 4: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Definition: Terms are defined as follows.Variables of each sort and constants areterms.terms.

Suppose that t t are terms f is a functionSuppose that t1,…,tm are terms, f is a function of type (s1,…,sm)→s, where the range of each ti is of sort si.

Then the expression f(t1,…,tm) is a term.

Page 5: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

The set of ground terms can be turned into amany sorted algebra called y g

the term algebradenoted by F The algebra is finitely generateddenoted by F. The algebra is finitely generatedand computable.

Fact: Every many sorted algebra generated by y y g g ythe constants is a homomorphic image of F.

Page 6: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

An equational specification is a finite set of formulas of type

t=q;t q;

A i ti l ifi ti i fi it tA quasiequational specification is a finite setof formulas of type

t1=q1&…… & tn=qn→ t=q,

where t,q are terms that may contain variables.

Page 7: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Definition: (Specified Algebras)

Let E(S) be the congruence relation generated by S.

The algebra FS = F/ E(S) is called specified by S.

FS is equationally specified if S is an equational specification.

FS is quasiequationally specified if S is a S q q y pquasiequational specification.

Page 8: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Properties of FS:

1. FS satisfies S and is finitely generated.2. The equality relation E(S) of FS is

computable enumerable.p3. The algebra FS is universal.4 The algebra F is unique4. The algebra FS is unique.5. If S is equational then all homomorphic

i f F ti f Simages of FS satisfy S.

Page 9: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Specification Problem: Can a given many sorted algebra A be specified?specified?

We need to at least assume that A is f gWe need to at least assume that A is f.g. and the equality relation in A is c.e.

We single out these into the followingWe single out these into the following definition.

Page 10: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

DefinitionA computably enumerable algebra is one of the form F/E, where,

F is the free term algebraF is the free term algebra,E is a computably enumerable congruence relation on F.

Example: specified algebras.

Page 11: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

A start up example:

The algebra (ω, S, f), where f(x)=2x, is g ( , , ), ( ) ,not be specified in its own language.

An important observation is, however, this:

Consider the expansion (ω, S, f, +, x). This p ( , , , , )expanded algebra is now specified.

Page 12: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Definition: (Computable Algebra)

A many sorted algebraA many sorted algebraA=(A1, A2,…An; f1,f2,…., fk, c1,…,cr)

i t bl if ll t A d f ti fis computable if all sets Ai and functions fjare computable.

Page 13: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Definition: An expansion of

A=(A1, A2,…An; f1,f2,…., fk, c1,…,cr)( 1, 2, n; 1, 2, , k, 1, , r)is

(A1, A2,…An; f1,f2,…., fk, g1,…,gr, c1,…,cr),

where g1,…,gr are new functions.g1 gr

Page 14: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Th (B t & T k 1980)Theorem (Bergstra & Tucker, ≈1980).

Every computable many sorted algebra has an equationally specified expansion.an equationally specified expansion.

Page 15: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Definition: An extension ofA=(A A ; f f c c )A=(A1,…An; f1,…., fk, c1,…,cr)

is a many sorted algebra:

(A1,…An,C1,..,Cm; f1,…., fk,g1,..,gh, c1,…,cr)

where C1,..,Cm are new sort sets, andf ig1,..,gh are new functions.

Page 16: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Theorem (Bergstra & Tucker, ≈1980)

Any many sorted c.e. algebra has anequationally specified extensionequationally specified extension.

This theorem positively solves the specification problem if one allows to extend many sorted c eproblem if one allows to extend many sorted c.e. algebras.

Page 17: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Problem (early 1980s, Bergstra & Tucker, Goncharov)Let A be a finitely generated computablyLet A be a finitely generated computably enumerable algebra:1 Does A have an equationally specified1. Does A have an equationally specified

expansion?2. Does A have a quasiequationally

specified expansion?

Resemblance to Higman’s theorem

Page 18: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Theorem(Kassymov, 1988; Khoussainov, 1994)

There exists a finitely generated computably enumerable algebra no expansion of whichenumerable algebra no expansion of which can be equationally specified.

Essential facts used in the proof of this presult are properties 3, 4 and 6 of specified algebrasalgebras.

Page 19: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Many attempts have been done to fully solve the problem especially in the late 80s andthe problem, especially in the late 80s and early 90s. See surveys on algebraic specifications during those years.

Page 20: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

The main theorem:(G h Hi hf ldt Kh i )(Goncharov, Hirschfeldt, Khoussainov)

There exists a finitely generated computably enumerable algebra no expansion of which can be quasiequationally specified.

Proof involves several concepts and results that are interesting on their own Wethat are interesting on their own. We explain them below.

Page 21: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Fix the language (f,g,h,…; a,b,c,..) with finitely many function and constant symbols.

Let F be the algebra of ground terms.

The desired algebra A we construct will be a homomorphic image of F. The algebra will be constructed by stages.y g

Page 22: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

At stage n, some ground terms tn and gn are glued. Thus, at this stage we have a finite set of ground term equationsg q

E = { t =g t =g t =g }En= { t1=g1, t2=g2,….., tn=gn}.

The algebra An is obtained by factorizing F by En. The desired algebra will be the limit of y n gthis sequence of algebras.

Page 23: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Definition: An almost free algebra is the factor of the free algebra F by a finite set of ground term equations.ground term equations.

To construct the desired algebra satisfying the main theorem we need to have a good understanding of almost free algebras.understanding of almost free algebras.

Page 24: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Theorem (Kozen, 1976)

1) The word problem for almost free ) palgebras is decidable.

2) It is also decidable whether a given almost free algebra is finite.

Page 25: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Implicitly in Kozen (1976):p y ( )

An algebra is almost free if and only if it is the free term extension of a finite partial algebra.g

Page 26: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Free extensions: Let B be a partial algebra. The free extension of B is denoted by Free(B).

The free extension Free(B) is a total algebra.

Example:The free extension of (Constants; f,g,h,…),The free extension of (Constants; f,g,h,…), where the functions are defined nowhere, is the free algebra Ffree algebra F.

Page 27: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Theorem (Khoussainov, Rubin)

Let B be a decidable partial algebra. Then its free extension Free (B) is also a decidable algebra.

Corollary. Every almost free algebra is Co o a y e y a ost ee a geb a sdecidable.

This extends Kozen’s result to FO logic.

Page 28: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Now, we can control the sequence of almost f l bfree algebras

A0, A1, A2,…. in order to build the desired algebra A.

Here is an example. Say, we want A not to b ifi d i it lbe specified in its own language.

Page 29: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

CONSTRUCTION 1:

We list all the specifications pS0, S1, S2,……

We want A not to be isomorphic to FS for every specification S.

Thus, we have infinitely many requirements.

Page 30: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Set A0=F. Take S0. Check if A0 satisfies S0.

If A0 satisfies S0 then take two terms t0,q0, 0 0 0,q0,glue them, and A1 is the result obtainedby factorizing A w r t t =qby factorizing A0 w.r.t. t0=q0.

Otherwise, take witnesses that do not satisfy S0, and ensure that these witnesses y 0,never glued. Set A1=A0.

Page 31: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Take S1. Check if A1 satisfies S1.

If A1 satisfies S1 then take two terms t1,q1, glue them, and A2 is the result obtainedby factorizing A1 w.r.t. t1=q1. 1 1 1

Otherwise, take witnesses that do not Ot e se, ta e t esses t at do otsatisfy S1, and ensure that these witnesses never glued Set A2=A1 Continue this onnever glued. Set A2=A1. Continue this on inductively.

Page 32: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Let A=(F/E; f,g,…)

be a f.g. computably enumerable algebra.be a f.g. computably enumerable algebra. Take any computable function

h Fn Fh: Fn→F.

If the action of h on F/E is well-defined thenconsider the expansion:consider the expansion:

(F/E; f,g,…, h)

Page 33: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Definition: The function h is a term-like if there is a term t of the original algebra Asuch thatsuch that

h(b)=t(b)for all b in (F\X)n where X is a finite setfor all b in (F\X)n, where X is a finite set.

Page 34: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Definition: (Primal Algebra)

LetLet A=(F/E; f,g,…)

be an a f.g. computably enumerable infinitealgebra. We say that A is primal if all expansions of A by computable functionsexpansions of A by computable functions are term-like.

Page 35: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Theorem (Goncharov, Hirschfeldt, Khoussainov)

There exists a finitely generated computably bl i fi it i l l benumerable infinite primal algebra.

Proof is based on a finite injury priority argument construction. Call itargument construction. Call it

CONSTRUCTION 2

Page 36: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Corollary. Assume that A is a finitely t d l b h th tgenerated c.e. algebra such that

a) A is not specified in its own language.b) A is primalb) A is primal.

Th i f A i ifi dThen no expansion of A is specified.

Page 37: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Theorem (Goncharov, Hirschfeldt, Khoussainov)

There exists a finitely generated c.e. algebra A such that:g

a) A is not specified in its own languagea) A is not specified in its own language.b) A is primal.

The proof is based on putting the two p p gconstructions together.

Page 38: Finitely PresentedFinitely Presented Exppgansions of Algebras · Take S 1.Check if A 1 satisfies S 1. If A 1 satisfies S 1 then take two terms t 1,q 1, glue them, and A 2 is the result

Conclusion:

We have a full picture of results related to the ifi ti blspecification problem:

1. Computable algebras can be specified if expansions are allowed.p

2. Computably enumerable algebras can be specified if extensions are allowed.specified if extensions are allowed.

3. Expansions are not powerful enough to specify computably enumerable algebrasspecify computably enumerable algebras.