X.3.5 Exercise. Let M be a nonempty set and RβMΓM a binary relation over M. Let Maβ={bβ£Rab} and D={bβ£Β¬Rbb}. And let RΞΎa be true if and only if ΞΎ is
the GΓΆdel number of a program P such that P:aββ.
A subset A of M is decidable if there is a program which for all
aβM halts and outputs a truthy value if aβA.
D is distinct from all Maβ.
For any aβM, either Raa or Β¬Raa. If Raa, then
aξ βD and aβMaβ. If Β¬Raa, then aβD and aξ βMaβ. So a cannot be an element of both Maβ and D, so
the two sets must differ by at least a.
All decidable subsets of M occur among Maβ.
For any decidable subset A of M, let P be a decision
procedure for A. Let Pβ² be a program which for aβM halts
if and only if P decides aξ βA. Supposing ΞΎPβ²β is
Pβ²'s GΓΆdel number, MΞΎPβ²βββ‘A.
D is undecidable.
Per (1) and (2).
The set Ξ haltβ²β={Pβ£P:ΞΎPββhalt} is undecidable.
Suppose Ξ haltβ²β was decidable by a program P. Then
D is decidable with P (For an input aβM, if a is the
GΓΆdel number for a program Paβ, use P to determine if Paβ is
an element of Ξ haltβ²β. If PaββΞ haltβ²β,
then aξ βD. If Paβξ βΞ haltβ²β, aβD.). But this contradicts (3), so Ξ haltβ²β is
undecidable.
There is not a program which decides if an arbitrary program halts.
If there were Ξ haltβ²β would be decidable, a
contradiction to (4).
X.1.10 Exercise. Let A1β and A2β be finite
alphabets such that A1ββA2β, and suppose
WβA1ββ. Show W is decidable (enumerable) with
respect to A1β if and only if it is decidable (enumerable)
with respect to A2β.
Because A1β and A2β are alphabets,
A1ββ and A2ββ are enumerable by 1.5
(p. 150). Let EA2βββ be a procedure which
enumerates A2ββ. A2βββA1ββ
is enumerable by a procedure which filters out elements of
EA2βββ's output containing only elements of
A1β. A1ββ is decidable with respect to
A2ββ by Theorem 11.8 (p. 151) by the enumerability of
A2βββA1ββ and A1ββ. Let
DA2βββA1βββ be a decision
procedure for A1ββ with respect to A2ββ.
Suppose W is decidable with respect to A1β. Call
DA1βββWβ that decision
procedure. Then W is decidable with respect to A2β with a
decision procedure which checks its input satisfies
DA2βββA1βββ and
DA1βββWβ. Suppose W is
decidable with respect to A2β. Call
DA2βββWβ that decision
procedure. Because A1ββA2β,
DA2βββWβ is also a decision
procedure for W with respect to A1β. So W is decidable
with respect to A1β.
5.10 Exercise. Show (a) The relation < ("less-than") is
elementarily definable in (R,+,β ,0), i.e., there is
a formula ΟβL2{+,β ,0}β such that for all a,bβR,
(R,+,β ,0)β¨Ο[a,b]βa<b.
(b) The relation < is not elementarily definable in (R,+,0).
Proof. (a) is easily satisfied by Ο=βkβR,a+kβ kβ‘bβ§aξ β‘b.
For (b) consider the automorphism Ο(x)=βx. I'll derive a
contradiction. Say there were a Ο satisfying a<bβ(R,+,0)β¨Ο[a,b].
But a<bββa<βb is a contradiction, so < is
not elementarily definable in (R,+,0).
4.15 Exercise. Let I be a nonempty set. For every iβI, let
Aiβ be an S-structure. We write βiβIβAiβ for the direct product of the structures
Aiβ, that is, the S-structure A with
domain
t=x: Suppose jβ0,β¦,(nβ1) is the index in the variable
assignment list corresponding to x. As t is a variable and
variables take on the value assigned to them when interpreted,
tAiβ[g0β(i),β¦,gnβ1β(i)]=gjβ(i). Thus,
t=ft1ββ¦tnβ: First, for a S-interpretation J,
J(ft1ββ¦tnβ) is
fJJ(t1β)β¦J(tnβ); I make use
of this in the first step below. Second, per the induction hypothesis,
tA[g0β,β¦,gnβ1β](i) is
tAiβ[g0β(i),β¦,gnβ1β(i)]; I make use of this in
the second step below.
This concludes the proof via induction on S-terms.
4.16 Exercise. Formulas which are derivable in the following
calculus are called Horn formulas.
For nβN and atomic S-formulas Ο1β,β¦,Οnβ,Ο:
(Β¬Ο1ββ¨β―β¨Β¬Οnββ¨Ο)β
For nβN and atomic S-formulas Ο1β,β¦,Οnβ:
Β¬Ο1ββ¨β―β¨Β¬Οnββ
For Horn formulas Ο and Ο:
(Οβ§Ο)Ο,Οβ
For Horn formula Ο:
βxΟΟβ
For Horn formula Ο:
βxΟΟβ
Horn formulas without free variables are called Horn sentences.
Show: If Ο is a Horn sentence and βiβIAiβ is a model of Ο, then for A:=βiβIβAiβ, Aβ¨Ο.
Proof. I'll use induction on Horn formulas. First, a lemma.
Lemma 1. For atomic S-formula Ο,
Aβ¨ΟββiβI,Aiββ¨Ο.
I show this is true for both forms of atomic S-formula.
This concludes the proof via induction on Horn formulas.
4.14 Exercise. A set Ξ¦ of sentences is called independent
if there is no ΟβΞ¦ such that Ξ¦β{Ο}β¨Ο. Show that the set of group axioms and the set of axioms
for equivalence relations are independent. (p. 36)
I'll start with equivalence relations, their axioms being:
βx,Rxx
βxy,RxyβRyx
βxyz,(Rxyβ§Ryz)βRxz
This exercise asks for a proof none of the axioms of equivalence
relations are redundant. Letting (1), (2), and (3) correspond to
the axioms above and setting Ξ¦={(1),(2),(3)}, we'd like to
show:
βΟβΞ¦,Ξ¦βΟβ¨Ο
Which unrolls to three cases.
Β¬{(2),(3)}β¨(1)
Β¬{(1),(3)}β¨(2)
Β¬{(1),(2)}β¨(3)
Bβ¨Ξ², read "B models Ξ²", is true if all
interpretations which are true for the sentences in B are also
true for Ξ². To show Β¬Bβ¨Ξ², it is sufficent
to find an interpretation which is true for the sentences in B
and false for Ξ². As we're dealing with relations, we look for
relations which satisfy only two of the three axioms.
A relation on a set X is a subset R of XΓX. Rxy is true
β(x,y)βR. Three relations then satisfying the
expressions above are:
For R1β suppose the domain is non-empty. In this case, the second
and third axioms are vacuously true, but (1) is not satisfied. R2β
satisfies the first and third axiom, but violates the second one as
(1,2)βR2β but (2,1)β/R2β. R3β satisfies the first and
second axiom, but voilates the third one as (2,1)βR3ββ§(1,3)βR3β but (2,3)β/R3β. Thus, the axioms of equivalence
relations are independent.
For Β¬{(2),(3)}β¨(1) there is a more general solution.
Lemma 1. For R satisfying the second and third axiom of
equivalence relations, if (x,y)βR, then (y,y)βR and
(x,x)βR.
Proof: Suppose (x,y)βR and R satisfies the second and third
axiom of equivalence relations.
By the second axiom, (x,y)βRβ(y,x)βR.
By the third axiom, (x,y)βRβ§(y,x)βRβ(x,x)βR.
By the third axiom, (y,x)βRβ§(x,y)βRβ(y,y)βR.
R is not reflexive if βx,(x,x)β/R. By Lemma 1, for
R satisfying the second and third axiom to not also satisfy the
first axiom, there must exist x not in the domain or range of
R. Thus, starting from a relation R satisfying all three axioms,
one can generate Rβ² satisfying only the second and third by
selecting BβA and Rβ²={pβ£pβRβ§pβ/BΓB}. Setting B=A yields β i.e. R1β above.
Independence of Group Axioms
A 2-ary function f is a group over the domain A if it satisfies
identity, inverse, and associativity. These are satisfied if for some
constant e in A:
βx,fxeβ‘x, i.e. identity.
βx,βxβ1,fxxβ1β‘e, i.e. inverse.
βxyz,fxfyzβ‘ffxyz, i.e. associativity.
As with equivalence relations, there are three cases.
Β¬{(2),(3)}β¨(1). For the group addition over the
integers, e would normally take on the value 0, but without
(1)e can be 1 (i.e. xβ1=βx+1). With this new value of
e, (2) and (3) are satisfied, but (1) is not.
Β¬{(1),(3)}β¨(2). For fab=aΓb over the
set Q2Γ2 of matricies with rational entries,
e is (10β01β), matrix
multiplication is associative, but not all matricies are
invertable.
For the third case, Β¬{(1),(2)}β¨(3), we'd like to
find an operation and domain which satisfies identity and inverse but
not associativity. Let the domain A be {a,b,e} and let
f:AΓAβA be defined as follows:
abeβaeaaβbbebβeabeββ
fab corresponds to the value in row a and column b,
i.e. b. From the table, xβ1 is x, left and right identity are
satisfied, but associativity is not satisfied.