Second-order logic: Difference between revisions

Content deleted Content added
say what it is, not what it's like
As stated before, the x could be not an upper bound of A and therefore the statement is vacously true. We need x to be an upper bound and if y is an upper bound then x<= y.
Line 71:
Second-order logic is more expressive than first-order logic. For example, if the ___domain is the set of all [[real number]]s, one can assert in first-order logic the existence of an additive inverse of each real number by writing ∀''x'' ∃''y'' (''x'' + ''y'' = 0) but one needs second-order logic to assert the [[Supremum|least-upper-bound]] property for sets of real numbers, which states that every bounded, nonempty set of real numbers has a [[supremum]]. If the ___domain is the set of all real numbers, the following second-order sentence (split over two lines) expresses the least upper bound property:
: (&forall; A) ([{{color|#800000|(&exist; ''w'') (''w'' &isin; A)}} &and; {{color|#008000|(&exist; ''z'')(&forall; ''u'')(''u'' &isin; A &rarr; ''u'' &le; ''z'')}}]
::&rarr; {{color|#0000BB|(&exist; ''x'')(&forall; ''y'')([(&forall; ''w'')(''w'' &isin; A &rarr; ''w'' &le; ''x'')] &and; [(&forall; ''u'')(''u'' &isin; A &rarr; ''u'' &le; ''y'')] &rarr; ''x'' &le; ''y'')}})
This formula is a direct formalization of "every {{color|#800000|nonempty}}, {{color|#008000|bounded}} set A {{color|#0000BB|has a least upper bound}}." It can be shown that any [[ordered field]] that satisfies this property is isomorphic to the real number field. On the other hand, the set of first-order sentences valid in the reals has arbitrarily large models due to the compactness theorem. Thus the least-upper-bound property cannot be expressed by any set of sentences in first-order logic. (In fact, every [[real-closed field]] satisfies the same first-order sentences in the signature <math>\langle +,\cdot,\le\rangle</math> as the real numbers.)