First Order Logic and related Concepts

205 阅读6分钟

1 Logic Hierarchy

  1. Propositional Logic (propositional variables, logical connectives)
  2. First Order Logic: (Propositional Logic, quantifiers)

    quantifies only variables that range over individuals (elements of the domain of discourse).

  3. Second Order Logic (Fisrt Order Logic, quantifiers over relations) (relations are sets of elements in the domain).
  4. Higher Order Logic

    First-order logic quantifies only variables that range over individuals;

    second-order logic, in addition, also quantifies over sets;

    third-order logic also quantifies over sets of sets, and so on.

    Higher-order logic is the union of first-, second-, third-, …, nth-order logic;

    i.e., higher-order logic admits quantification over sets that are nested arbitrarily deeply.

2 Fisrt-Order Logic Language

  1. A language is countable if it has only countable many nonlogical symbols.
  2. A language is finite if it has finitely many nonlogical symbols.

2.1 A first Order Logic language L consists of two types of symbols:

  1. Logical Symbols: (Same for all fisrt-order logic language)
    1. a sequence of variables, V. (x, y, z, u, v, w, …)
    2. logical connectives. (not ¬, disjunction ∨)
    3. logical quantifiers. (Exists ∃, For-all ∀)
    4. equality symbols. (=)
  2. Non-logical Symbols: (Signature of the specified first-order logic language)
    1. a set of constant symbols, C, { ci, i ∈ I }.
    2. a set of n-ary function symbols, F, n ≥ 0, { fj, j ∈ Jn }. (return values) (0-ary function symbols are constants.)
    3. a set of n-ary relation symbols, R, n ≥ 0, { Pk, k ∈ Kn }. (return true of false) (1-ary relation symbols are predicates on a varaible; 0-ary relation symbols are propositions.)

2.2 Terms of a language: (No Relation Symbols)

The set of all terms of a language L is the smallest set T of expression of L that contains all variables and constant symbols and is closed under operation f ∈ F.

  1. the rank of a term t is the smallest natural number k such that t is of rank ≤ k, shows how many nested functions inside that term.
  2. all variables and constant symbols are terms of rank 0.
  3. (t1, t2, …, tn) ∈ T and the ranks of ti ≤ k ⇒ f(t1, t2, …, tn) is a term of rank at most k + 1.

The set of all varaible-free terms of lanugage is the smallest set T' is constructed as T without variables. And they are called closed terms.

2.3 Formulas of a language: (invoking Relation Symbols)

The set of all formulas of L is the smallest set of all expressions of L that contains all the atomic formulas and that is closed under negation, disjunction, and existential quantification

  1. atomic formula:
    1. t, s ∈ T ⇒ t=s is atomic formula.
    2. t1, t2, …, tn ∈ T and P ∈ R with n-ary ⇒ P(t1, t2, …, tn) is atomic formula.
  2. fomula:
    1. atomic formula is formula of rank 0.
    2. A, B ∈ Formula of rank ≤ k, v ∈ V ⇒ A, B, or v, connected with connetives ∈ Formula of rank ≤ k+1.

3 First-Order Theory

  1. A first order theory, or simply a theory, T consists of a first-order language L and a set of formulas of L as nonlogical axioms of T.
  2. The language of T is denoted by L(T).
  3. A theory is called countable if its language is countable.
  4. A theory is finite if its language is finite.

3.1 ZF Set Theory

  1. Nonlogical Axioms:
    1. Set existence: There exists a set. ∃ x (x = x)
    2. Extensionality: Two sets are the same if they contain the same sets. ∀ x ∀ y (∀ z (z ∈ x ↔ z ∈ y) → x = y)
    3. Comprehension (subset) schema: given any property of sets to define a subset of the set contains those sets. ∀ φ [x, w1, …, wn] ∀ z ∀ w1 … ∀ wn (∃ y ∀ x (x ∈ y ↔ x ∈ z ∧ φ) )
    4. Replacement schema.
    5. Pairing. ∀ x ∀ y ∃ z (x ∈ z ∧ y ∈ z)
    6. Union.
    7. PowerSet.
    8. Infinite.
    9. Foundation.

3.2 Magma(Groupoid) Theory = (Set, closure under an operation •)

  1. a binary function: •
  2. Nonlogical axioms:
    1. closure: ∀ x ∀ y ∃ z (z = x • y)

3.3 Semigroup Theory = (Groupoid, Associativity)

  1. a binary function: •
  2. Nonlogical axioms:
    1. closure: ∀ x ∀ y ∃ z (z = x • y)
    2. Associativity: ∀ x ∀ y ∀ z (x • (y • z) = (x • y) • z)

3.4 Monoid Theory = (Semigroup, Identity) (Natural Number with addition as a Model)

  1. a constant symbol: e
  2. a binary function: •
  3. Nonlogical axioms:
    1. closure: ∀ x ∀ y ∃ z (z = x • y)
    2. Associativity: ∀ x ∀ y ∀ z (x • (y • z) = (x • y) • z)
    3. Identity: ∀ x (x • e = x ∧ e • x = x )

3.5 Group Theory = (Monoid, Inversibility)

  1. a constant symbol: e
  2. a binary function: •
  3. Nonlogical axioms:
    1. closure: ∀ x ∀ y ∃ z (z = x • y)
    2. Associativity: ∀ x ∀ y ∀ z (x • (y • z) = (x • y) • z)
    3. Identity: ∀ x (x • e = x ∧ e • x = x )
    4. Inversibility: ∀ x ∃ y (x • y = e ∧ y • x = e)

3.6 Abelian Group Theory = (Group, Commutativity) (Integer with addition as a Model)

  1. a constant symbol: e
  2. a binary function: •
  3. Nonlogical axioms:
    1. closure: ∀ x ∀ y ∃ z (z = x • y)
    2. Associativity: ∀ x ∀ y ∀ z (x • (y • z) = (x • y) • z)
    3. Identity: ∀ x (x • e = x ∧ e • x = x )
    4. Inversibility: ∀ x ∃ y (x • y = e ∧ y • x = e)
    5. Commutativity: ∀ x ∀ y (x • y = y • x)

3.7 Ring with Identity = (Set, +, *, 0, 1) = (Abelian Group, *, 1)

  1. constant symbols: 0, 1
  2. binary function symbols: +, *
  3. Nonlogical axioms:
    1. closure of +: ∀ x ∀ y ∃ z (z = x + y)
    2. Associativity of +: ∀ x ∀ y ∀ z (x + (y + z) = (x + y) + z)
    3. Identity for +: ∀ x (x + e = x ∧ e + x = x )
    4. Inversibility of +: ∀ x ∃ y (x + y = e ∧ y + x = e)
    5. Commutativity of +: ∀ x ∀ y (x + y = y + x)
    6. closure of *: ∀ x ∀ y ∃ z (z = x * y)
    7. Associativity of *: ∀ x ∀ y ∀ z (x * (y * z) = (x * y) * z)
    8. Identity of *: ∀ x (x * e = x ∧ e * x = x )
    9. Left Distributability: ∀ x ∀ y ∀ z (x * (y + z) = x * y + x * z)
    10. Right Distributability: ∀ x ∀ y ∀ z ((y + z) * x = y * x + z * x)

3.8 Commutative Ring with Identity = (Ring with Identity, commutativity of *) (Integer with addition and multiplication as a Model)

  1. Commutativity: ∀ x ∀ y (x * y = y * z)

3.9 Field = (Commutative Ring with Identity, ) (Rational with addition and multiplication as a Model)

  1. constant symbols: 0, 1
  2. binary function symbols: +, *
  3. Nonlogical axioms:
    1. closure of +: ∀ x ∀ y ∃ z (z = x + y)
    2. Associativity of +: ∀ x ∀ y ∀ z (x + (y + z) = (x + y) + z)
    3. Identity for +: ∀ x (x + e = x ∧ e + x = x )
    4. Inversibility of +: ∀ x ∃ y (x + y = e ∧ y + x = e)
    5. Commutativity of +: ∀ x ∀ y (x + y = y + x)
    6. closure of *: ∀ x ∀ y ∃ z (z = x * y)
    7. Associativity of *: ∀ x ∀ y ∀ z (x * (y * z) = (x * y) * z)
    8. Identity of *: ∀ x (x * e = x ∧ e * x = x )
    9. Left Distributability: ∀ x ∀ y ∀ z (x * (y + z) = x * y + x * z)
    10. Right Distributability: ∀ x ∀ y ∀ z ((y + z) * x = y * x + z * x)
    11. Inversibility of *: ∀ x (¬ (x = 0) → ∃ y (x * y = 1 ∧ y * x = 1) )

4 Structures of Fisrt-Order Languages

Define the interpretation or the structure of a language L as a nonempty set A together with the interpretations or meanings of all nonlogical symbols of L.

Note that which statement is true in a structure and which is not is irrelevant in the definition of a structure.

A structure or an interpretation of a first-order language L(T) consists of:

  1. a nonempty set M. (the universe of the structure)
  2. for each constant symbol c of L(T), a fixed element cM ∈ M.
  3. for each n-ary function symbol f of L(T), an n-ary map fM: Mn → M.
  4. for each n-ary relation symbol P of L(T), an n-ary relation PM ⊂ Mn.
  5. The interpretation of = is always taken to be the equality relation in M.

5 Models of First-Order Theory (As Types in Type Theory)

A model M of a first-order theory T is a structure of L(T) with universe M in which all nonlogical axioms of T are valid. M |= A. E.g. Any group is a model of group theory, but the set N of natural numbers, together with the usual 0 and + as the interpretations of e and · respectively, is definitely a structure for the language of group theory but not a model of group theory.

6 Elementary Class. (As Type class in Type Theory)

A class M of structures of a language L is called elementary if there is a theory T with language L such that elements of M are precisely the models of T.

7 Embedings and Isomorphisms.

M and N denote structures of a fixed first-order language L. An embedings of N into M, N -> M, is a one-to-one map α : N -> M, where:

  1. For all constant symbol c of language L, α(cN) = cM.
  2. For every n-ary function symbol f of language L, and every β ∈ Nn, α(fN(β)) = fM(β).
  3. For every n-ary relation symbol P of language L, and every β ∈ Nn, α(PN(β)) ⇔ PM(β).

if α is surjective, then α is an isomorphism. And M and N are isomorphic structures. An automorphism of M is an isomorphism from M onto itself.

N is a substructure of M if

  1. N ⊂ M.
  2. α : N -> M is an embeding.