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].
a<b↔(R,+,0)⊨φ[a,b]↔(Rπ,+π,0π)⊨φ[π(a),π(b)]↔(R,+,0)⊨φ[−a,−b]↔−a<−bby Isomorphism Lemma.as π is an automorphism.
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∈IAi for the direct product of the structures
Ai, that is, the S-structure A with
domain
A:=I∈i∏Ai:={g∣g:I→i∈I⋃Ai and ∀i∈I:g(i)∈Ai},
which is determined by the following conditions (where for g∈∏i∈IAi we also write ⟨g(i)∣i∈I⟩):
For n-ary R∈S and g1,…,gn∈∏i∈IAi,
RAg1,⋯,gn↔∀i∈I,RAig1(i),…,gn(i);
For n-ary f∈S and g1,…,gn∈∏i∈IAi,
fA(g1,⋯,gn):=⟨fAi(g1(i),…,gn(i))∣i∈I⟩;
and cA:=⟨cAi∣i∈I⟩ for c∈S.
Show: If t is an S-term with var(t)⊆{v0,…,vn−1} and if g0,…,gn−1∈∏i∈IAi, then
the following holds:
tA[g0,…,gn−1]=⟨tAi[g0(i),…,gn−1(i)]∣i∈I⟩.
Proof. I'll use induction on S-terms.
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 follows from Exercise 4.15, which establishes (with different
notation)
Axa(t)≡⟨Aixa(i)(t)∣i∈I⟩. This can be propogated through Lemma 1 and the
other steps of this proof to see it holds for ϕ.
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 (1001), 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:
abeaeaabbebeabe
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.