Logic for Computer Science/Querying Proofs

From testwiki
Revision as of 20:23, 22 May 2019 by imported>Texvc2LaTeXBot (Replacing deprecated latex syntax mw:Extension:Math/Roadmap)
(diff) ← Older revision | Latest revision (diff) | Newer revision β†’ (diff)
Jump to navigation Jump to search

Partial Isomorphism

Definition (partial isomorphism on relational S-Structures)

Let 𝔄 and 𝔅 be relational S-Structures and p be a mapping. Then p is said to be a Partial Isomorphism from 𝔄 to 𝔅 iff all of the following hold

  • dom(p) A and codom(p) B
  • for every a1, a2: a1 = a2 iff p(a1) = p(a2).
  • for every constant symbol c from S and every a: a = c iff p(a) = c
  • for every n-ary relation symbol R from S and a1, ..., an: R𝔄 a1 ... an iff R𝔅 p(a1) ... p(an)

where a* A, b* B.

Remark

  • I.e. a partial Isomorphism on 𝔄 and 𝔅 is a (plain) Isomprphism on the substructures obtained by choosing dom(p) and codom(p) and 'prune' constants and relations respectively.

Example

  • Let S ={<} be defined over A ={1, 2, 3} and B ={3, 4, 5, 6} the 'usual' way. Then p1 with 1->3 and 2->4 is a partial isomorphism (since 1 < 2 and p(1) < p(2)) as well as p3 with 2->3 and 3->6 as well as p2 with 1->6. Whereas neither p4 with 1->6 and 2->3 (since 1 < 2 but not p(1) < p(2)) nor p5 with 2->5 and 3->5 is a partial isomorphism.
  • Let S ={R} with R𝔄={(1,2),(2,3),(3,4),(4,1)} (a 'square') and R𝔅={(1,2),(1,3),(3,4),(3,5)} (a 'binary tree'). A ={1, ..., 4} and B ={1, ..., 5}. Then p: {1, 2, 3} -> {1, 3, 4} with 1->1, 2->3, 3->4 is a partial isomorphism from 𝔄 to 𝔅, since {(1, 2), (2, 3)} becomes {(1, 3), (3, 4)}. Notice that in case R𝔅 contained e.g. (4, 1) additionally, p would not be a partial isomorphism.
  • Let S ={<} be defined over A ={1, 2, 3, 4, 5, 6} and B ={1, 3, 5} in the 'usual' way. Then p with 2->3 and 4->5 defines a partial isomorphism. Notice that e.g. x(x<42<x) holds on 𝔄 but x(x<p(4)p(2)<x) does not hold on 𝔅. I.e. in general the validity of sentences with quantifiers is not preserved. So in order to preserve this validity we need sth stronger than partial isomorphism. That is mainly what the Ehrenfeucht-games will provide us with.

Ehrenfeucht-Fraisse Games

Definition

Suppose that we are given two structures 𝔄 and 𝔅, each with no function symbols and the same set of relation symbols, and a fixed natural number n.

Then an Ehrenfeucht-Fraisse game is a game with the subsequent properties:

  • Elements
    • a position is a pair of sequences Ξ± and Ξ², both of length i, i 0, ..., n
    • the starting position is the pair of empty sequences (i = 0)
    • the game is finished iff Ξ± and Ξ² are both of size n
    • the players are the 'spoiler' S and the 'duplicator' D
  • Moves
    • moves are carried out alternatingly
    • S moves first
    • S chooses exactly one element of either A or B that has not been chosen already (latter is not relevant in the first move)
    • D chooses exactly one element of the other set, i.e. if S has chosen from A then D has to choose from B and if S chose one from B then D has to choose from A.
  • Winning & Information
    • D wins iff the final position defines a partial isomorphism by mapping the i-th elements of Ξ± and Ξ², for all i.
    • else S wins
    • both players know both of the structures completely and also know about all the moves played previously


Remark

  • notice that above constants are not mentioned (yet)


Example

  • Let A ={1, 2, 3}, B ={1, 2}, S ={ < }, where '<' is defined the 'usual' way. Here player S can win by playing 2 in the first move and playing the second move corresponding to D's first move in the following way: to 1 he responds 1 and in case of 2 his answer is 3. In both cases D can not follow. He may have isomorphic structures e.g. {2, 3} and {1, 2} but the mapping defined by the sequence of moves is twisted, i.e. it maps 2 to 2 (1st move) and 3 to 1 and thus is not a partial isomorphism.
  • Let A ={1, 2, ..., 9}, B ={1, 2, ..., 8}, S ={ < }, where '<' is defined the 'usual' way. So, what is the best way to play for S? In case S picks 1 from A, D picks 1 from B and the game left is mainly the same as before just with 1 element less but also 1 move played already. But we can make a better deal for the price of one move: by playing 5 in A, D is forced to play 5 (or 4) in B what leaves two possible ways to proceed for S: either playing the {1, 2, 3, 4} vs {1, 2, 3, 4} game what of course would lead to an obvious win for D, or playing the {6, 7, 8, 9} vs {6, 7, 8} game. Choosing the latter the quickest win for S is 7 - 7, 8 - 8 and finally 9 with a 4 move win. Since there is no better way to play for both sides S wins if n > 3 for the structures above.
  • The result from the above example can be generalised to: For linear orders in an n-move Ehrenfeucht game D has a winning strategy if the size of each of A and B is less or equal 2^n.
  • Caption
    The following is an (popular) illustrative representation of an Ehrenfeucht-game: from the two sequences S has won iff the lines connecting matching letters cross (if D can find a match at all), e.g. S wins after three moves:


...

Quantifier Rank

Definition

The function qr(Ο†) is said to be the Quantifier Ranking of Ο† iff

  • qr(φ)=0, for Ο† atomic
  • qr(φ1φ2)=qr(φ1φ2)=max(qr(φ1),qr(φ2))
  • qr(¬φ)=qr(φ)
  • qr(φ)=qr(φ)=qr(φ)+1

Remark

  • qr(Ο†) describes the 'depth of quantifier nesting' of Ο†.
  • We write FO[k] for all Formulas of Quantifier Rank up to k.
  • Notice that in prenex normal form the Quantifier Rank of Ο† is exactly the number of quantifiers appearing in Ο†.

Example

  • The sentence x(y((¬x=y)xRy))(y((¬x=z)zRx)) has the Quantifier Rank 2.
  • The sentence in prenex normal form xyy((¬x=y)xRy)((¬x=z)zRx) has the Quantifier Rank 3. Notice that it is equivalent to the above.

...

Ehrenfeucht-Fraisse Theorem

Theorem

Let 𝔄 and 𝔅 be two structures in a relational vocabulary. Then the following are equivalent

  • 𝔄 and 𝔅 agree on FO[k]
  • 𝔄k𝔅

Remark

  • The proof is omitted here
  • The concept of back and forth relations is not mentioned here, since we do not need it subsequently

Expressibility Proofs employing Ehrenfeucht-Fraisse Games

The basis for considering expressibility by Ehrenfeucht-Fraisse-Games is given by the following corollary from the above theorem:

Corollary

Let P be a property of finite Οƒ-structures. Then the following are equivalent

  • P is not expressible in FO
  • for every k β„• there exist two finite Οƒ-structures 𝔄k and 𝔅k, such that the following are both satisfied
    • 𝔄kk𝔅k
    • 𝔄k has P and 𝔅k does not have P

Example

  • To begin pick two linear orders say A ={1, 2, 3, 4} and B ={1, 2, 3, 4, 5}. For a two-move Ehrenfeucht game D is to win, obviously. This gives us two structures that satisfy the above conditions for k = 2 and the Property having even cardinality (that A has and B doesn't). Now we have to expand this over all k β„•. From the above example we adopt that in a linear order of cardinality 2k or higher D has a winning strategy. Thus we choose the cardinalities depending on k as |A| = 2k and |B| = 2k+1. So we have found an even A and an odd B for every k, where D has a winning strategy. Thus (by the corollary) having even/odd cardinality is a property that can not be expressed in FO for finite Οƒ-structures of linear order.
  • Graphs in general are a popular object of interest for FO expressibility. So e.g. it can be shown that the following properties can't be defined in FO:
    • Connectivity
    • Cyclicity
    • Planarity
    • Hamiltonicity
    • n-colorability
    • etc

...

Template:BookCat