2
$\begingroup$

In many areas of computer science, and some areas of mathematics (particulary mathematical logic), there is often a separation between the semantics (meaning) of mathematical objects and the explicit, symbolic representation(s) of them (the syntax). Well-known examples of this are the propositional calculus, first-order logic, regular expressions, formal grammars, and so on. A much simpler example is the rational numbers: The numbers $\frac{1}{2},\frac{2}{4},\frac{3}{6},\frac{4}{8},\dots$ are semantically the same, but syntactically/symbolically different.

Sometimes a proof employs a certain syntactic representation of an object even if the statement concerns only the semantics of the object: For instance, the classical proof that $\sqrt{2}$ is not rational assumes by contradiction that $\sqrt{2}$ is rational and picks a specific fractional representation of it (where the numerator and denominator are coprime) to work with. If we were to pick a specific representative for each rational number (say, a reduced fraction where a negative integer can only appear as the numerator), then syntax and semantics would essentially become the same - each number would have a unique representation, so we may as well think of the representation as the number itself. Of course, this would be inconvenient and counter-productive in most circumstances. But it raises a question: Is the usage of semantics in mathematics and CS merely a matter of convenience? Here's another example.

The semantics of a formula in propositional calculus, e.g. $\left(\left(p_1\vee\left(\neg p_2\right)\right)\to p_3\right)\wedge p_4$, is its truth/false value under all possible assignments of true/false values to the atomic propositions $p_1,p_2,\dots$. We can define an equivalence relation on the set of all (well-formed) formulas by declaring that two formulas are equivalent if they have the same value under all possible assignments to the atomic propositions. We may then pick a representative formula (via some normal form) for each equivalence class and work exclusively with these formulas. Again, semantics have been reduced to syntax, but at the cost of convenience.

So, do we define semantics, even when we can work syntactically, only because we find it more intuitive and convenient? Or is there some fundamental problem here that I don't see?

  • 1
    I do not have time for a full answer right now, but as a first note: your syntax might not be strong enough to cover your semantics. E.g., in a countable language you have names for at most countably many elements of your model. (And cheating by using an uncountable language and simply adding names for each element moves the syntax closer to semantics, not vice versa.)2017-01-25
  • 3
    You can see [Lindebaum algebra](https://en.wikipedia.org/wiki/Lindenbaum%E2%80%93Tarski_algebra) : "In mathematical logic, the Lindenbaum–Tarski algebra (or Lindenbaum algebra) of a logical theory $T$ consists of the equivalence classes of sentences of the theory, i.e., the quotient, under the equivalence relation $\sim$ defined such that $p \sim q$ exactly when $p$ and $q$ are provably equivalent in $T$" (i.e. $T \vdash p \leftrightarrow q$).2017-01-25
  • 1
    An yes : in propositional calculus the "meaning" of a formula is nothing more than its truth value, and thus we may say that equivalent formulae have te "same meaning".2017-01-25
  • 0
    So, do we define semantics, even when we can work syntactically, only because we find it more intuitive and convenient? Yes and no. For prop logic, the truth-table procedure is effective, and thus - in principle - we can avoid any proof-calculus and relies only non it. But this is not so for first order logic, where we have no algorithm to establisg *validity* (truth in any universe): thus, we need proofs (i.e. "syntactical" derivations).2017-01-25
  • 1
    @MauroALLEGRANZA: of course, this is a sort of "extensional" meaning in propositional logic, if we identify all the elements of each equivalence class in the Lindenbaum algebra. Equivalent formulas may have different "intensional" meanings; $A \land B$ and $\lnot (\lnot A \lor \lnot B)$ for example. You are surely aware of this, but I wanted to point it out for the readers.2017-01-25

0 Answers 0