2

I'm sorry if this question seems to you bizarre.

Is the following a correct derivation relative to the inference rules of predicate/propositional logic? $$ \begin{align*} x = a\ \land\ P(x) \\ \hline P(a) \end{align*} $$ The common sense says it must hold, but I want to be sure it is legal syntactically.

Seeker
  • 377
  • 2
    It should certainly at least be a derivable rule in any formal system with a decent axiomatisation of equality. Do you have a specific system in mind? – Naïm Camille Favier Jul 22 '24 at 19:40
  • 1
    For example in first-order logic with equality you would usually have an axiom schema that gives you substitution axioms like $x = a \to P(x) \to P(a)$, so you could apply modus ponens twice to derive your rule. – Naïm Camille Favier Jul 22 '24 at 19:44
  • @NaïmFavier, to be honest, I'm not sure. I just decided to start proving things more formally. I opened Dirk van Dalen's Logic and Structure for that purpose. Yet, instead of reading it from start to end, I went directly to natural deduction in predicate logic. There were only four rules of inference to add to propositional logic. Then, while proving things about set theory, I wondered about the question I asked. – Seeker Jul 22 '24 at 20:08
  • 1
    Yes, it it. See Substitution axiom for equality. See also van Dalen (5th edition), page 93. – Mauro ALLEGRANZA Jul 23 '24 at 07:10
  • @MauroALLEGRANZA, perfect, thank you! – Seeker Jul 23 '24 at 08:33
  • Seeker, Mauro is wrong here. The only strings that are legal syntactically consist of those that follow the formation rules. If you have no formation rules, then there are no syntactically correct strings. If you do have formation rules which enable unique parsing ... or under usual classes of formation rules, then what you wrote is not syntactically correct. – Doug Spoonwood Jul 23 '24 at 21:59

1 Answers1

-2

Propositional calculi often do not have '=' nor equality as a primitive concept. So, we can't make any inference involving a property of equality, such as substituting an equal variable for an equality variable in propositional logic.

Predicate calculi similarly does not have equality often. So again, we can't make a substitution of an equal variable for an equal variable in predicate logic.

If we talk about a predicate calculus supplemented with equality, we might have the ability to substitute an equal variable with an equal variable. However, doing such might not come as a primitive (or first) rule of inference for equality. So, we might not have the ability to do that in a single line. We might need to first show that such comes as following from our axioms and/or rules of inference for that predicate calculus.

Common sense doesn't say that anything about equality must hold in propositional calculus or predicate calculus, because equality doesn't exist in either of those systems.

Such an inference as you present isn't legal syntactically on two points.

  1. x = a ∧ P(x) isn't well-formed, because the parsing order isn't derivable from the symbols given and formation rules. Even for predicate calculus with equality. In fact, I initially thought you meant:

(x = (a ∧ P(x))),

instead of

((x = a) ∧ P(x)) ...

until I read the comments.

Syntactically speaking, only well-formed formulas where the parsing order can get understood from the formula itself qualify as legal.

  1. '=' isn't in the grammar for either propositional logic, nor for predicate logic. Only symbols in the grammar are syntactically legal. So, any string with '=' in it is not syntactically legal in the context of a rigorous calculus.
  • 1
    While it is useful to distinguish between first-order logic with equality and first-order logic without equality, your answer is too absolute. Equality is commonly added to first-order logic, and its precedence is obvious and conventional: it's a binary relation symbol, so $x = (a \land P(x))$ doesn't make any sense; it has to be $(x = a) \land P(x)$. Parsing it otherwise just betrays a lack of familiarity with logic. – Naïm Camille Favier Jul 22 '24 at 22:42
  • @NaïmFavier In 'x=(a∧P(x))' there exists two parts 'x', and (a∧P(x)). So, parsing 'x=a ∧ P(x)' as 'x=(a∧P(x))' fits with '=' as a binary relation symbol. Consequently, it's not the case that 'x=(a∧P(x))' doesn't make any sense. So, it does make some sense to parse 'x=a∧P(x)' as 'x=(a∧P(x))' without any context as did hold for this question. Also, it is not obvious what the precedence for '=' is when used with all operations. Getting clear about syntax doesn't get in the way anytime we seek rigor. – Doug Spoonwood Jul 23 '24 at 01:50
  • @NaïmFavier Also, what is legal syntactically or is not legal syntactically, as got asked in the original question "... but I want to be sure it is legal syntactically" IS ABSOLUTE. There is no such thing as "too absolute" with respect to syntax. Syntactically, some string of text or form is legal or illegal and there is no in-between if the symbols are clear (and we don't have smudges via a computer screen). Some form either follows the grammar correctly or it does not. – Doug Spoonwood Jul 23 '24 at 01:54
  • No, syntactic legality is relative to a formal system, which the OP didn't specify. $x = (a \land P(x))$ doesn't make sense in first-order logic because $a \land P(x)$ is a formula, but relation symbols can only be applied to terms. – Naïm Camille Favier Jul 23 '24 at 07:50
  • @NaïmFavier "a∧P(x) is a formula" No, a∧P(x) is not well-formed and thus not a formula. We either have (a∧P(x)) or (a)∧(P(x)), depending on the system. '=' can and has gotten applied WITHOUT first-order logical terms in some papers , such as in A. N. Prior and C. A. Meredith's Equational Logic as printed Norte Dame Journal of Formal Logic, Volume IX, Number 3, July 1968. So, no... relation symbols can get applied to strings other than terms. – Doug Spoonwood Jul 23 '24 at 19:45
  • @NaïmFavier "syntactic legality is relative to a formal system which the OP didn't specify."

    Given no formal system implicitly referred to, then NOTHING is legal syntactically. Because there is no formal system to begin with, it makes no sense to speak of anything as legal syntactically with respect/relative to an existing formal system.

    But also, I didn't say that syntactic legality wasn't relational. I said it was absolute in the sense of either being legal or not legal. There is no such thing as "too absolute" as a formula as either legal or not legal.

    – Doug Spoonwood Jul 23 '24 at 20:05