Equational logic

From testwiki
Revision as of 08:04, 17 February 2025 by imported>David Eppstein (foundational copyvio, will revdel)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

First-order equational logic consists of quantifier-free terms of ordinary first-order logic, with equality as the only predicate symbol. The model theory of this logic was developed into universal algebra by Birkhoff, Grätzer, and Cohn. It was later made into a branch of category theory by Lawvere ("algebraic theories").[1]

The terms of equational logic are built up from variables and constants using function symbols (or operations).

Syllogism

Here are the four inference rules of logic. P[x:=E] denotes textual substitution of expression E for variable x in expression P. Next, b=c denotes equality, for b and c of the same type, while bc, or equivalence, is defined only for b and c of type boolean. For b and c of type boolean, b=c and bc have the same meaning.

Substitution If P is a theorem, then so is P[x:=E]. PP[x:=E]
Leibniz If P=Q is a theorem, then so is E[x:=P]=E[x:=Q]. P=QE[x:=P]=E[x:=Q]
Transitivity If P=Q and Q=R are theorems, then so is P=R. P=Q,Q=RP=R
Equanimity If P and PQ are theorems, then so is Q. P,PQQ

[2]

Proof

We explain how the four inference rules are used in proofs, using the proof of Template:Clarify span. The logic symbols and indicate "true" and "false," respectively, and ¬ indicates "not." The theorem numbers refer to theorems of A Logical Approach to Discrete Math.[2]

(0)¬pp(1)=(3.9),¬(pq)¬pq,with q:=p(2)¬(pp)(3)=Identity of (3.9),with q:=p(4)¬(3.8)

First, lines (0)(2) show a use of inference rule Leibniz:

(0)=(2)

is the conclusion of Leibniz, and its premise ¬(pp)¬pp is given on line (1). In the same way, the equality on lines (2)(4) are substantiated using Leibniz.

The "hint" on line (1) is supposed to give a premise of Leibniz, showing what substitution of equals for equals is being used. This premise is theorem (3.9) with the substitution p:=q, i.e.

(¬(pq)¬pq)[p:=q]

This shows how inference rule Substitution is used within hints.

From (0)=(2) and (2)=(4), we conclude by inference rule Transitivity that (0)=(4). This shows how Transitivity is used.

Finally, note that line (4), ¬, is a theorem, as indicated by the hint to its right. Hence, by inference rule Equanimity, we conclude that line (0) is also a theorem. And (0) is what we wanted to prove.[2]

See also

References

Template:Reflist

  1. equational logic. (n.d.). The Free On-line Dictionary of Computing. Retrieved October 24, 2011, from Dictionary.com website: http://dictionary.reference.com/browse/equational+logic
  2. 2.0 2.1 2.2 Gries, D. (2010). Introduction to equational logic . Retrieved from http://www.cs.cornell.edu/home/gries/Logic/Equational.html Template:Webarchive