Content deleted Content added
Dpleibovitz (talk | contribs) m Category:Equivalence renamed |
Pbsouthwood (talk | contribs) Adding local short description: "Logical operator in propositional calculus", overriding Wikidata description "logical operator in propositional calculus" |
||
(19 intermediate revisions by 17 users not shown) | |||
Line 1:
{{Short description|Logical operator in propositional calculus}}
{{For|the corresponding concept in [[combinational logic]]|XNOR gate}}
{{Infobox logical connective
| title = Logical equality
| other titles = EQ, XNOR
| Venn diagram = Venn1001.svg
| definition = <math>x = y</math>
| truth table = <math>(1001)</math>
| logic gate = XNOR_ANSI.svg
| DNF = <math>x \cdot y + \overline{x} \cdot \overline{y}</math>
| CNF = <math>(\overline{x} + y ) \cdot (x + \overline{y})</math>
| Zhegalkin = <math>1 \oplus x \oplus y</math>
| 0-preserving = no
| 1-preserving = yes
| monotone = no
| affine = yes
| self-dual = no
}}
'''Logical equality''' is a [[logical operator]] that compares two [[truth values]], or more generally, two [[Well-formed formula|formulas]], such that it gives the value ''[[Truth|True]]'' if both arguments have the same truth value, and ''[[False (logic)|False]]'' if they are different. In the case where formulas have [[free variables]], we say two formulas are equal when their truth values are equal for all possible resolutions of free variables. It corresponds to [[equality (mathematics)|equality]] in [[Boolean algebra]] and to the [[logical biconditional]] in [[propositional calculus]].
It is customary practice in various applications, if not always technically precise, to indicate the operation of '''logical equality''' on the logical operands ''x'' and ''y'' by any of the following forms:
:<math>\begin{align}
x &\leftrightarrow y & x &\Leftrightarrow y & \mathrm Exy \\
x &\mathrm{~EQ~} y & x &= y
\end{align}</math><!-- should be "\mathrel{\mathrm{EQ}}", but it is broken [https://phabricator.wikimedia.org/T148304] -->
Some logicians, however, draw a firm distinction between a ''functional form'', like those in the left column, which they interpret as an application of a function to a pair of arguments — and thus a mere indication that the value of the compound expression depends on the values of the component expressions — and an ''equational form'', like those in the right column, which they interpret as an assertion that the arguments have equal values, in other words, that the functional value of the compound expression is ''true''.{{Citation needed|date=July 2024}}
In [[mathematics]], the plus sign "+" almost invariably indicates an operation that satisfies the axioms assigned to addition in the type of [[algebraic structure]] that is known as a ''[[field (mathematics)|field]]''. For boolean algebra, this means that the logical operation signified by "+" is not the same as the [[inclusive disjunction]] signified by "∨" but is actually equivalent to the logical inequality operator signified by "≠", or what amounts to the same thing, the [[exclusive disjunction]] signified by "XOR" or "⊕". Naturally, these variations in usage have caused some failures to communicate between mathematicians and switching engineers over the years. At any rate, one has the following array of corresponding forms for the symbols associated with logical inequality:▼
:<math>\begin{align}▼
x &+ y & x &\not\equiv y & Jxy \\▼
x &\mathrm{~XOR~} y & x &\ne y▼
\end{align}</math><!-- should be "\mathrel{\mathrm{XOR}}", but it is broken [https://phabricator.wikimedia.org/T148304] -->▼
This explains why "EQ" is often called "[[XNOR gate|XNOR]]" in the [[combinational logic]] of circuit engineers, since it is the ''negation'' of the ''[[XOR]]'' operation; '''NXOR''' is a less commonly used alternative.<ref>{{citation|title=Using Java 2|first1=Brian|last1=Keeton|first2=Chuck|last2=Cavaness|first3=Geoff|last3=Friesen|publisher=Que Publishing|year=2001|isbn=9780789724687|page=112|url=https://books.google.com/books?id=yhFxiVyd1MgC&pg=PA112}}.</ref> Another rationalization of the admittedly circuitous name "XNOR" is that one begins with the "both false" operator NOR and then adds the eXception "or both true".▼
==Definition==
Line 26 ⟶ 34:
'''Logical equality''' is an [[logical operation|operation]] on two [[logical value]]s, typically the values of two [[proposition]]s, that produces a value of ''true'' if and only if both operands are false or both operands are true.
The [[truth table]] of '''p EQ q''' (also written as '''p = q''', '''p ↔ q''', '''Epq''', '''p ≡ q''', or '''p == q''') is as follows:
[[File:Venn1001.svg|thumb|right|150px|The [[Venn diagram]] of A EQ B (red part is true)]]
Line 67 ⟶ 75:
| style="padding: 1em;" | T
|}
== Inequality ==
▲In [[mathematics]], the plus sign "+" almost invariably indicates an operation that satisfies the axioms assigned to addition in the type of [[algebraic structure]] that is known as a ''[[field (mathematics)|field]]''. For
▲:<math>\begin{align}
▲ x &+ y & x &\not\equiv y & Jxy \\
▲ x &\mathrm{~XOR~} y & x &\ne y
▲\end{align}</math><!-- should be "\mathrel{\mathrm{XOR}}", but it is broken [https://phabricator.wikimedia.org/T148304] -->
▲This explains why "EQ" is often called "[[
== See also ==
{{Portal|
* [[Boolean function]]
* [[If and only if]]
Line 80 ⟶ 99:
==External links==
*{{Commonscatinline}}
*
{{Logical connectives}}
{{Mathematical logic}}
{{DEFAULTSORT:Logical Equality}}
[[Category:Logical connectives|Equality]]
[[Category:Logic gates|Equality]]
[[Category:Equivalence (mathematics)]]
|