Exercises Logic and Computability TU Wien 2014W, Übungen von Logik

Toggle sidebar
bg1
Andreas Humenberger
1026602
January 13, 2015
Exercises Block 2
6.0 VU Logic and Computability
2014W
Exercise ML2 For each of the following schematic formulas, show that they are valid in
Fand provide concrete counter-examples that show that removal of some accessibilities
leads to invalidity:
(A⊃A)
Since A⊃Ais a classical tautology, it holds in every world, and therefore
(A⊃A) holds in every world as well. Furthermore, the removal of some
accessibilities does not yield invalidity.
♦♦A⊃♦A
Let x∈ {w, u}be an arbitrary world and Aan arbitrary formula, and suppose
M, x |=♦♦A. Then, there exists a world y∈ {w, u}s.t. xRy and M, y |=
♦A, moreover there must be a world z∈ {w, u}s.t. yRz and M, z |=A.
Since Fis transitive, xRz must hold as well, and therefore M, x |=♦A, and
M, x |=♦♦A⊃♦A. We can conclude F |=♦♦A⊃♦A.
The removal of wRw yields invalidity. Consider a model Mbased on Fs.t.
vM(p, w) = 1and vM(p, u) = 0. Then M, w |=♦♦pholds, but M, w 6|=♦p.
Therefore M, w 6|=♦♦p⊃♦pand F 6|=♦♦p⊃♦p.
A⊃♦A
Let x∈ {w, u}be an arbitrary world and Aan arbitrary formula, and suppose
M, x |=A. Since Fis symmetric we have M, y |=♦Afor each world
y∈ {w, u}s.t. xRy. Therefore we have M, x |=♦Aand M, x |=A⊃♦A.
We can conclude F |=A⊃♦A.
The removal of uRw yields invalidity. Consider a model Mbased on Fs.t.
vM(p, w) = 1and vM(p, u) = 0. Then M, w |=pholds, and M, u 6|=♦p.
Therefore M, w 6|=♦pand M, w 6|=p⊃♦p. Moreover F 6|=p⊃♦p.
Exercise ML3 Show that the intersection of two logics is also a logic. What about
unions of logics? (Prove or refute!)
Let L1,L2be arbitrary logics and L=L1∩ L2the intersection of them. Furthermore,
let F, F ⊃G∈ L. Hence, F , F ⊃G∈ L1and F, F ⊃G∈ L2. Since L1and L2are closed
under modus ponens, we have G∈ L1,G∈ L2, and therefore G∈ L. In conclusion, if
F, F ⊃G∈ L then G∈ L, therefore Lis closed under modus ponens.
Let F∈ L be an arbitrary formula, πan arbitrary substitution (P VL7→ F ORML)
and F[π] the formula resulting from Fby applying π. Since L1and L2are closed under
substitution, we have F[π]∈ L1,F[π]∈ L2, and therefore F[π]∈ L. Hence, we can
conclude Lis closed under substitution.
1
pf3
pf4
pf5
pf8

Unvollständige Textvorschau

Nur auf Docsity: Lade Exercises Logic and Computability TU Wien 2014W und mehr Übungen als PDF für Logik herunter!

January 13, 2015

6.0 VU Logic and Computability 2014W

Exercise ML2 For each of the following schematic formulas, show that they are valid in F and provide concrete counter-examples that show that removal of some accessibilities leads to invalidity:

(A ⊃ A)

Since A ⊃ A is a classical tautology, it holds in every world, and therefore (A ⊃ A) holds in every world as well. Furthermore, the removal of some accessibilities does not yield invalidity.

♦♦A ⊃ ♦A

Let x ∈ {w, u} be an arbitrary world and A an arbitrary formula, and suppose M, x |= ♦♦A. Then, there exists a world y ∈ {w, u} s.t. xRy and M, y |= ♦A, moreover there must be a world z ∈ {w, u} s.t. yRz and M, z |= A. Since F is transitive, xRz must hold as well, and therefore M, x |= ♦A, and M, x |= ♦♦A ⊃ ♦A. We can conclude F |= ♦♦A ⊃ ♦A. The removal of wRw yields invalidity. Consider a model M based on F s.t. vM(p, w) = 1 and vM(p, u) = 0. Then M, w |= ♦♦p holds, but M, w 6 |= ♦p. Therefore M, w 6 |= ♦♦p ⊃ ♦p and F 6 |= ♦♦p ⊃ ♦p.

A ⊃ ♦A

Let x ∈ {w, u} be an arbitrary world and A an arbitrary formula, and suppose M, x |= A. Since F is symmetric we have M, y |= ♦A for each world y ∈ {w, u} s.t. xRy. Therefore we have M, x |= ♦A and M, x |= A ⊃ ♦A. We can conclude F |= A ⊃ ♦A. The removal of uRw yields invalidity. Consider a model M based on F s.t. vM(p, w) = 1 and vM(p, u) = 0. Then M, w |= p holds, and M, u 6 |= ♦p. Therefore M, w 6 |= ♦p and M, w 6 |= p ⊃ ♦p. Moreover F 6 |= p ⊃ ♦p.

Exercise ML3 Show that the intersection of two logics is also a logic. What about unions of logics? (Prove or refute!)

Let L 1 , L 2 be arbitrary logics and L = L 1 ∩ L 2 the intersection of them. Furthermore, let F, F ⊃ G ∈ L. Hence, F, F ⊃ G ∈ L 1 and F, F ⊃ G ∈ L 2. Since L 1 and L 2 are closed under modus ponens, we have G ∈ L 1 , G ∈ L 2 , and therefore G ∈ L. In conclusion, if F, F ⊃ G ∈ L then G ∈ L, therefore L is closed under modus ponens. Let F ∈ L be an arbitrary formula, π an arbitrary substitution (P VL 7 → F ORML) and F [π] the formula resulting from F by applying π. Since L 1 and L 2 are closed under substitution, we have F [π] ∈ L 1 , F [π] ∈ L 2 , and therefore F [π] ∈ L. Hence, we can conclude L is closed under substitution.

January 13, 2015

6.0 VU Logic and Computability 2014W

Let L 1 = {⊥} and L 2 = {⊥ ⊃ >}. Both, L 1 and L 2 , are logics since both are closed under substitution and modus ponens. However, the union L = L 1 ∪ L 2 = {⊥, ⊥ ⊃ >} is not closed under modus ponens since > 6 ∈ L, and therefore it is not a logic.

Exercise ML4 Specify a concrete counter-example to F ⊃ F. Is there a frame in which F ⊃ F is valid? (Prove or refute!)

Let M = 〈W, R, V 〉 be a model s.t. there are worlds w, u ∈ W and wRu. Now consider an assignment vM(p, w) = 1 for some p ∈ P V and vM(p, x) = 0 for all x ∈ W different from w. Then M, w |= p and M, w 6 |= p, and therefore M, w 6 |= p ⊃ p.

Let F = 〈W, ∅〉 be a frame. Then, trivially F |= F ⊃ F holds, since F holds in every world w ∈ W and every model M based on F.

Exercise I1 Show that formulas 3, 6, 7 and 9 (on slide 8) are BHK-valid.

(3) (A ∧ B) ⊃ (B ∧ A)

The procedure γ. {(A ∧ B) ⊃ (B ∧ A)} transforms every proof ρ = 〈ρA, ρB 〉 of (A ∧ B) into a proof of (B ∧ A), where ρA is a proof of A and ρB is a proof of B. The procedure γ can be described as follows:

  1. extract the first component ρA from ρ
  2. extract the second component ρB from ρ
  3. return 〈ρB , ρA〉

(6) ⊥ ⊃ A

The procedure γ. {⊥ ⊃ A} takes as input a proof of ⊥ and returns a proof of A. Trivially, γ transforms any given proof of ⊥ into a proof of A, since there are no proofs for ⊥.

(7) (A ⊃ (B ⊃ C)) ⊃ ((A ∧ B) ⊃ C)

We define the procedure γ. {(A ⊃ (B ⊃ C)) ⊃ ((A ∧ B) ⊃ C)} as follows: The input of γ is a procedure η. {A ⊃ (B ⊃ C)} where the

  • input of η is a proof δ. {A}, and the
  • output of η is a procedure π. {B ⊃ C}. The output of γ, i.e. the procedure ν – which transforms a proof ρ = 〈ρA, ρB 〉 into a proof σ of C – can be described as follows:
  1. extract the first component ρA from ρ
  2. apply η to ρA, i.e. compute η(ρA), we get a proof π of B ⊃ C

January 13, 2015

6.0 VU Logic and Computability 2014W

Why is the inverse implication not valid?

Assuming ∀x∀y∃z∀u∃vF (x, y, z, u, v) holds, then one cannot conclude that ∀x∀y∀uF (x, y, f (x, y), u, g(x, y, u)) holds for every function f and g. Con- sider an interpretation I = (D, φ, d) as counter-example, where

D = { 0 , 1 } φ(f )(x, y) = 1 for all x, y ∈ D φ(g)(x, y, z) = 1 for all x, y, z ∈ D

φ(F )(x, y, z, u, v) =

1 if z = v = 0 0 otherwise

Then, ∀x∀y∃z∀u∃vF (x, y, z, u, v) evaluates to 1 and ∀x∀y∀uF (x, y, f (x, y), u, g(x, y, u)) evaluates to 0. Hence, the inverse implication is not valid.

Exercise AD2 Prove that if ∀x 1 · · · ∀xnF is satisfiable, then ∀x 1 · · · ∀xnδ(F ) is satisfi- able.

By the lemma about the definition we get that ∀x 1 · · · ∀xn((F ) ∧ pF (x 1 ,... , xn)) is satisfiable iff ∀x 1 · · · ∀xnF is satisfiable. It suffices to show that if (F ) is satisfiable, then γ(F ) :=

G∈Σ(F ) DG^ is satisfiable.^ We will perform an inductive proof on the logical complexity of F.

Basis F is atomic. Then, (F ) = EF and EF has the form ∀X(pF (X) ↔ F ), by applying equivalence transformations we get

∀X(pF (X) ↔ F ) ⇐⇒ ∀X((pF (X) → F ) ∧ (F → pF (X))) ⇐⇒ ∀X((¬pF (X) ∨ F ) ∧ (¬F ∨ pF (X))) ⇐⇒ ∀X(¬pF (X) ∨ F ) ∧ ∀X(¬F ∨ pF (X)).

It is obvious that the last formula is equivalent to DF. Since γ(F ) = DF , if (F ) is satisfiable then γ(F ) is satisfiable.

Induction hypothesis Assume that, for all H with lc(H) < m, if (H) is satisfiable, then γ(H) is satisfiable.

Step Consider a formula G with lc(G) = m. We perform a case distinction wrt. the top-level symbol in G.

January 13, 2015

6.0 VU Logic and Computability 2014W

Case G is of the form ¬H. Then, EG is of the form ∀X(pG(X) ↔ ¬pH (X)), by applying equivalence transformations we get

∀X(pG(X) ↔ ¬pH (X)) ⇐⇒ ∀X((pG(X) → ¬pH (X)) ∧ (¬pH (X) → pG(X))) ⇐⇒ ∀X((¬pG(X) ∨ ¬pH (X)) ∧ (pG(X) ∨ pH (X))) ⇐⇒ ∀X(¬pG(X) ∨ ¬pH (X)) ∧ ∀X(pG(X) ∨ pH (X)).

Thus, EG is equivalent to DG and furthermore if EG is satisfiable then DG is satisfiable. Hence, by the induction hypothesis, the equivalence of EG and DG, and the construction of DG, we get that if (G) is satisfiable, then γ(G) is satisfiable.

Case G is of the form H 1 ∧ H 2. Then, EG is of the form ∀X(pG(X) ↔ (pH 1 (Y ) ∧ pH 2 (Z))) where X = Y ∪ Z, by applying equivalence transformations we get

∀X(pG(X) ↔ (pH 1 (Y ) ∧ pH 2 (Z))) ⇐⇒ ∀X((pG(X) → (pH 1 (Y ) ∧ pH 2 (Z))) ∧ ((pH 1 (Y ) ∧ pH 2 (Z)) → pG(X))) ⇐⇒ ∀X((¬pG(X) ∨ (pH 1 (Y ) ∧ pH 2 (Z))) ∧ (¬(pH 1 (Y ) ∧ pH 2 (Z)) ∨ pG(X))) ⇐⇒ ∀X((¬pG(X) ∨ pH 1 (Y )) ∧ (¬pG(X) ∨ pH 2 (Z)) ∧ (¬pH 1 (Y ) ∨ ¬pH 2 (Z) ∨ pG(X))) ⇐⇒ ∀X(¬pG(X) ∨ pH 1 (Y )) ∧ ∀X(¬pG(X) ∨ pH 2 (Z))∧ ∀X(¬pH 1 (Y ) ∨ ¬pH 2 (Z) ∨ pG(X)). (1)

Furthermore DG is of the form

∀X(¬pH (X)∨pH 1 (X))∧∀X(¬pG(X)∨pG 2 (X))∧∀X(pG(X)∨¬pG 1 (X)∨¬pG 2 (X)). (2)

It is obvious that (1) is equivalent to (2). Hence, by the induction hypothesis, the equivalence of (1) and (2), and the construction of DG, we get that if (G) is satisfiable, then γ(G) is satisfiable.

Case G is of the form H 1 ◦ H 2 st. ◦ ∈ {∨, →}. These cases are analogous to the one above.

Case G is of the form ∀vH. Then, EG is of the form ∀X(pG(X) ↔ ∀v pH (X, v)), by applying equivalences we get

∀X(pG(X) ↔ ∀v pH (X, v)) ⇐⇒ ∀X((pG(X) → ∀v pH (X, v)) ∧ (∀v pH (X, v) → pG(X))) ⇐⇒ ∀X((¬pG(X) ∨ ∀v pH (X, v)) ∧ (¬∀v pH (X, v) ∨ pG(X))) ⇐⇒ ∀X((¬pG(X) ∨ ∀v pH (X, v)) ∧ (∃v ¬pH (X, v) ∨ pG(X))) ⇐⇒ ∀X∀v(¬pG(X) ∨ pH (X, v)) ∧ ∀X(∃v ¬pH (X, v) ∨ pG(X))

January 13, 2015

6.0 VU Logic and Computability 2014W

As a first step, we only consider Robinson-resolvents of trivial factors, and we consider the variable disjoint variant C′^ = p(u, f (u)) ∨ p(a, v) with ν = {x 7 → u, y 7 → v}.

  • Resolving upon first literal of C′^ and first literal of D using mgu {x 7 → u, y 7 → f (u)} we obtain the resolvent p(a, v) ∨ ¬p(a, f (u)) ∨ ¬p(f (u), f (f (u))).
  • Resolving upon first literal of C′^ and second literal of D using mgu {u 7 → a, x 7 → a} we obtain the resolvent p(a, v) ∨ ¬p(a, y) ∨ ¬p(f (a), f (y)).
  • Resolving upon first literal of C′^ and third literal of D using mgu {u 7 → f (x), y 7 → f (x)} we obtain the resolvent p(a, v) ∨ ¬p(x, f (x)) ∨ ¬p(a, f (x)).
  • Resolving upon second literal of C′^ and first literal of D using mgu {x 7 → a, y 7 → v} we obtain the resolvent p(u, f (u)) ∨ ¬p(a, f (a)) ∨ ¬p(f (a), f (v)).
  • Resolving upon second literal of C′^ and second literal of D using mgu {v 7 → f (x)} we obtain the resolvent p(u, f (u)) ∨ ¬p(x, y) ∨ ¬p(f (x), f (y)).

In the next step, we consider Robinson-resolvents of non-trivial factors.

  • Let C′^ = p(a, f (a)) be a factor of C by using the mgu {x 7 → a, y 7 → f (a)}. Resolving upon the first literal of C′^ and the first literal of D using mgu {x 7 → a, y 7 → f (a)} yields the resolvent ¬p(a, f (a)) ∨ ¬p(f (a), f (f (a))).
  • Let C′^ = p(a, f (a)) be a factor of C by using the mgu {x 7 → a, y 7 → f (a)}. Resolving upon the first literal of C′^ and the second literal of D using mgu {x 7 → a} yields the resolvent ¬p(a, y) ∨ ¬p(f (a), f (y)).
  • Let D′^ = ¬p(a, f (a)) ∨ ¬p(f (a), f (f (a))) be a factor of D by using the mgu {x 7 → a, y 7 → f (a)}. Resolving upon the first literal of C and the first literal of D′^ using mgu {x 7 → a} yields the resolvent p(a, y) ∨ ¬p(f (a), f (f (a))).
  • Let D′^ = ¬p(a, f (a)) ∨ ¬p(f (a), f (f (a))) be a factor of D by using the mgu {x 7 → a, y 7 → f (a)}. Resolving upon the first literal of C and the second literal of D′ using mgu {x 7 → f (a)} yields the resolvent p(a, y) ∨ ¬p(a, f (a)).
  • Let D′^ = ¬p(a, f (a)) ∨ ¬p(f (a), f (f (a))) be a factor of D by using the mgu {x 7 → a, y 7 → f (a)}. Resolving upon the second literal of C and the first literal of D′ using mgu {y 7 → f (a)} yields the resolvent p(x, f (x)) ∨ ¬p(f (a), f (f (a))).
  • Let C′^ = p(a, f (a)) be a factor of C by using the mgu {x 7 → a, y 7 → f (a)} and D′^ = ¬p(a, f (a)) ∨ ¬p(f (a), f (f (a))) be a factor of D by using the mgu {x 7 → a, y 7 → f (a)}. We can immediately resolve upon the first literal of C′^ and the first literal of D′^ and we obtaion the resolvent ¬p(f (a), f (f (a))).

January 13, 2015

6.0 VU Logic and Computability 2014W

Exercise AD5 Describe another resolution refinement (other than ordered resolution) in detail. (You do not have to give a completeness proof ).

In the following, we will consider hyperresolution as a resolution refinement. The desription is based on the paper about Resolution Theorem Proving^1 , especially the definition and the example are taken from this work. Hyperresolution is the deduction principle where only positive clauses and the empty clause are derivable. A clause is called positive if it is of the form ` A 1 ,... , An, where A 1 ,... , An are atoms. The derivation of just positive clauses is only possible if we use many-step instead of one-step inferences.

Definition 1. Let C be a nonpositive clause and D 1 ,... , Dn be positive clauses; then S : (C; D 1 ,... , Dn) is called a clash sequence. Let C 0 = 0 and Ci + 1 ∈ Res({Ci, Di+1}) for i = 1,... , n − 1. If Cn is defined and positive then it is called a hyperresolvent of S.

Remark. Res(C) denotes the set of resolvents definable from a set of clauses C.

Example 1. Let C = {C 1 , C 2 , C 3 , C 4 } be a set of clauses where

C1 = p(a, b) C2 = p(b, a) C3 = p(x, y), p(y, z) p(x, z) C4 = p(a, a).

We can construct a refutation of C:

` p(a, b)

p(b, a) p(x, y), p(y, z) p(x, z) p(x, b) p(x, a) p(a, a) p(a, a)

Note that ` p(a, a) is a hyperresolvent of the clash sequence (C 3 ; C 1 , C 2 ).

(^1) Alexander Leitsch, http://www.logic.at/staff/leitsch/httpd/resolv.pdf