KonkurStudy
همه کارت‌ها

Evaluating First-Order Formulas in a Structure

To decide if a first-order formula is true, plug the structure's domain and the interpretations of its predicate/function symbols into the formula, then evaluate atoms, connectives, and quantifiers over that domain.

کارت مفهوم کنکور ارشد علوم کامپیوتر

اهمیت
۰/۵

A first-order structure (interpretation) M\mathcal{M} fixes the meaning of an otherwise abstract formula. It supplies

  • a non-empty domain DD (the universe the variables range over),
  • a concrete relation AM⊆DkA^{\mathcal M} \subseteq D^k for every kk-ary predicate symbol AA,
  • a concrete function fM:Dm→Df^{\mathcal M} : D^m \to D for every mm-ary function symbol ff,
  • and a variable assignment ss giving each free variable xix_i a value s(xi)∈Ds(x_i) \in D.

Deciding whether M\mathcal{M} with assignment ss satisfies a formula φ\varphi — written M⊨φ[s]\mathcal{M} \models \varphi[s] — means evaluating φ\varphi after substituting all these meanings.

Evaluating from the inside out

  1. Terms. Replace each variable by its assigned value and each function symbol by its interpretation, then compute. E.g. with fM(x)=2xf^{\mathcal M}(x)=2x, the term f(x2)f(x_2) evaluates to 2 s(x2)2\,s(x_2).
  2. Atomic formulas. A(t1,…,tk)A(t_1,\dots,t_k) is true iff the tuple of evaluated terms lies in the relation: ( [ ⁣[t1] ⁣],…,[ ⁣[tk] ⁣] )∈AM(\,[\![t_1]\!],\dots,[\![t_k]\!]\,) \in A^{\mathcal M}. If AA is interpreted as <<, then A(t1,t2)A(t_1,t_2) just means [ ⁣[t1] ⁣]<[ ⁣[t2] ⁣][\![t_1]\!] < [\![t_2]\!].
  3. Connectives. Combine truth values with the usual rules for ¬, ∧, ∨, →\neg,\ \wedge,\ \vee,\ \rightarrow.
  4. Quantifiers. ∀xi ψ\forall x_i\,\psi is true iff ψ\psi holds for every value of xix_i in DD; ∃xi ψ\exists x_i\,\psi is true iff ψ\psi holds for at least one value. A sentence (no free variables) is then either true or false in M\mathcal{M} independently of ss.

The recipe

Substitute the interpretations to turn the symbolic formula into an ordinary mathematical statement about the domain DD, then check that statement.

For quantifier-free formulas with free variables, the assignment ss supplies the values s(xi)s(x_i) and you simply compute. For quantified sentences, reason about whether a suitable witness exists (for ∃\exists) or whether the property survives a worst-case choice (for ∀\forall); the order of nested quantifiers matters.

Mini-example

Let D=ND=\mathbb{N}, interpret AA as << and ff as f(x)=2xf(x)=2x, and consider A(f(x2),x4)A(f(x_2), x_4). Substituting gives the statement

2 s(x2)<s(x4).2\,s(x_2) < s(x_4).

If the assignment comes from the sequence s=⟨2,4,6,8,… ⟩s=\langle 2,4,6,8,\dots\rangle (so s(xi)=2is(x_i)=2i), then s(x2)=4s(x_2)=4 and s(x4)=8s(x_4)=8, and we test 2⋅4<82\cdot 4 < 8, i.e. 8<88<8 — false, so ss does not satisfy the formula. For s′=⟨3,6,9,12,… ⟩s'=\langle 3,6,9,12,\dots\rangle (so s′(xi)=3is'(x_i)=3i) we test 2⋅6<122\cdot 6 < 12, i.e. 12<1212<12 — also false. Both fail because doubling the 2nd term lands exactly on the 4th.

Now a quantified sentence on D=ZD=\mathbb{Z} with AA as ≤\le and f(x)=x−1f(x)=x-1:

α=∃x2 ∀x1  A(f(x1),x2)  ≡  ∃x2 ∀x1 (x1−1≤x2).\alpha = \exists x_2\,\forall x_1\; A(f(x_1),x_2) \;\equiv\; \exists x_2\,\forall x_1\,(x_1-1 \le x_2).

This claims Z\mathbb{Z} has an upper bound — false, since for any x2x_2 pick x1=x2+2x_1=x_2+2 to break it. By contrast β=∃x3 A(f(x3),x3)≡∃x3 (x3−1≤x3)\beta=\exists x_3\,A(f(x_3),x_3)\equiv\exists x_3\,(x_3-1\le x_3) holds for every x3x_3, so it is true.

Pitfall: an atom is only as good as the relation behind the symbol. With AA meaning strict <<, equality a=aa=a makes A(a,a)A(a,a) false; with AA meaning ≤\le it is true. Always re-read whether the interpreted relation is strict or non-strict (and respect quantifier order — ∃∀\exists\forall and ∀∃\forall\exists are not interchangeable) before declaring a formula satisfied.

فرمول‌های کلیدی

Satisfaction of an atom
M⊨A(t1,…,tk)[s]  ⟺  ([ ⁣[t1] ⁣]s,…,[ ⁣[tk] ⁣]s)∈AM\mathcal{M} \models A(t_1,\dots,t_k)[s] \iff \big([\![t_1]\!]_s,\dots,[\![t_k]\!]_s\big) \in A^{\mathcal{M}}

An atomic formula is true exactly when the tuple of evaluated terms lies in the interpreted relation.

Term evaluation
[ ⁣[ f(t1,…,tm) ] ⁣]s=fM([ ⁣[t1] ⁣]s,…,[ ⁣[tm] ⁣]s)[\![\,f(t_1,\dots,t_m)\,]\!]_s = f^{\mathcal{M}}\big([\![t_1]\!]_s,\dots,[\![t_m]\!]_s\big)

Evaluate a term by applying the interpreted function to the values of its arguments under assignment s.

Quantifier semantics
M⊨∀x ψ[s]  ⟺  ∀d∈D: M⊨ψ[s(x↦d)]\mathcal{M}\models \forall x\,\psi[s] \iff \forall d\in D:\ \mathcal{M}\models \psi[s(x\mapsto d)]

Universal/existential truth is checked over every / some element d of the domain D, updating the assignment of x to d.

#first-order-logic#structure-interpretation#satisfaction#semantics#quantifiers#predicate-logic

سوالات تمرینی