In
logic
Logic is the study of correct reasoning. It includes both formal and informal logic. Formal logic is the study of deductively valid inferences or logical truths. It examines how conclusions follow from premises based on the structure o ...
and
mathematics
Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, a truth value, sometimes called a logical value, is a value indicating the relation of a
proposition to
truth
Truth or verity is the Property (philosophy), property of being in accord with fact or reality.Merriam-Webster's Online Dictionarytruth, 2005 In everyday language, it is typically ascribed to things that aim to represent reality or otherwise cor ...
, which in
classical logic has only two possible values (''
true'' or ''
false''). Truth values are used in
computing
Computing is any goal-oriented activity requiring, benefiting from, or creating computer, computing machinery. It includes the study and experimentation of algorithmic processes, and the development of both computer hardware, hardware and softw ...
as well as various types of
logic
Logic is the study of correct reasoning. It includes both formal and informal logic. Formal logic is the study of deductively valid inferences or logical truths. It examines how conclusions follow from premises based on the structure o ...
.
Computing
In some programming languages, any
expression can be evaluated in a context that expects a
Boolean data type. Typically (though this varies by programming language) expressions like the number
zero, the
empty string
In formal language theory, the empty string, or empty word, is the unique String (computer science), string of length zero.
Formal theory
Formally, a string is a finite, ordered sequence of character (symbol), characters such as letters, digits ...
, empty lists, and
null
Null may refer to:
Science, technology, and mathematics Astronomy
*Nuller, an optical tool using interferometry to block certain sources of light Computing
*Null (SQL) (or NULL), a special marker and keyword in SQL indicating that a data value do ...
are treated as false, and strings with content (like "abc"), other numbers, and objects evaluate to true. Sometimes these classes of expressions are called falsy and truthy. For example, in
Lisp,
nil, the empty list, is treated as false, and all other values are treated as true. In
C, the number 0 or 0.0 is false, and all other values are treated as true.
In
JavaScript
JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior.
Web browsers have ...
, the empty string (
""
),
null
,
undefined
,
NaN
, +0,
−0 and
false
are sometimes called ''falsy'' (of which the
complement is ''truthy'') to distinguish between strictly
type-checked and
coerced Booleans (see also:
JavaScript syntax#Type conversion). As opposed to Python, empty containers (Arrays, Maps, Sets) are considered truthy. Languages such as
PHP also use this approach.
Classical logic
In
classical logic, with its intended semantics, the truth values are ''
true'' (denoted by ''1'' or the
verum ⊤), and ''
untrue'' or ''
false'' (denoted by ''0'' or the
falsum
"Up tack" is the Unicode name for a symbol (⊥, \bot in LaTeX, U+22A5 in Unicode) that is also called "bottom", "falsum", "absurdum", or "the absurdity symbol", depending on context. It is used to represent:
* The truth value false (logic), 'fal ...
⊥); that is, classical logic is a
two-valued logic. This set of two values is also called the
Boolean domain. Corresponding semantics of
logical connectives are
truth functions, whose values are expressed in the form of
truth table
A truth table is a mathematical table used in logic—specifically in connection with Boolean algebra, Boolean functions, and propositional calculus—which sets out the functional values of logical expressions on each of their functional arg ...
s.
Logical biconditional becomes the
equality binary relation, and
negation
In logic, negation, also called the logical not or logical complement, is an operation (mathematics), operation that takes a Proposition (mathematics), proposition P to another proposition "not P", written \neg P, \mathord P, P^\prime or \over ...
becomes a
bijection which
permutes true and false. Conjunction and disjunction are
dual with respect to negation, which is expressed by
De Morgan's laws:
: ¬(
: ¬(
Propositional variables become
variables in the Boolean domain. Assigning values for propositional variables is referred to as
valuation.
Intuitionistic and constructive logic
Whereas in classical logic truth values form a
Boolean algebra, in
intuitionistic logic, and more generally,
constructive mathematics, the truth values form a
Heyting algebra. Such truth values may express various aspects of validity, including locality, temporality, or computational content.
For example, one may use the
open sets
of a topological space as intuitionistic truth values, in which case the truth value of a formula expresses ''where'' the formula holds, not whether it holds.
In
realizability truth values are sets of programs, which can be understood as computational evidence of validity of a formula. For example, the truth value of the statement "for every number there is a prime larger than it" is the set of all programs that take as input a number
, and output a prime larger than
.
In
category theory
Category theory is a general theory of mathematical structures and their relations. It was introduced by Samuel Eilenberg and Saunders Mac Lane in the middle of the 20th century in their foundational work on algebraic topology. Category theory ...
, truth values appear as the elements of the
subobject classifier. In particular, in a
topos every formula of
higher-order logic may be assigned a truth value in the subobject classifier.
Even though a Heyting algebra may have many elements, this should not be understood as there being truth values that are neither true nor false, because intuitionistic logic proves
("it is not the case that
is neither true nor false").
Proof that intuitionistic logic has no third truth value, Glivenko 1928
/ref>
In intuitionistic type theory, the Curry-Howard correspondence exhibits an equivalence of propositions and types, according to which validity is equivalent to inhabitation of a type.
For other notions of intuitionistic truth values, see the Brouwer–Heyting–Kolmogorov interpretation and .
Multi-valued logic
Multi-valued logic
Many-valued logic (also multi- or multiple-valued logic) is a propositional calculus in which there are more than two truth values. Traditionally, in Aristotle's logical calculus, there were only two possible values (i.e., "true" and "false") ...
s (such as fuzzy logic and relevance logic) allow for more than two truth values, possibly containing some internal structure. For example, on the unit interval such structure is a total order; this may be expressed as the existence of various degrees of truth.
Algebraic semantics
Not all logical systems are truth-valuational in the sense that logical connectives may be interpreted as truth functions. For example, intuitionistic logic lacks a complete set of truth values because its semantics, the Brouwer–Heyting–Kolmogorov interpretation, is specified in terms of provability conditions, and not directly in terms of the necessary truth of formulae.
But even non-truth-valuational logics can associate values with logical formulae, as is done in algebraic semantics. The algebraic semantics of intuitionistic logic is given in terms of Heyting algebras, compared to Boolean algebra semantics of classical propositional calculus.
See also
* Agnosticism
Agnosticism is the view or belief that the existence of God, the divine, or the supernatural is either unknowable in principle or unknown in fact. (page 56 in 1967 edition) It can also mean an apathy towards such religious belief and refer t ...
* Bayesian probability
* Circular reasoning
* Degree of truth
* False dilemma
*
* Paradox
* Semantic theory of truth
* Slingshot argument
* Supervaluationism
* Truth-value semantics
* Verisimilitude
References
External links
*
{{Logical truth
Concepts in logic
Propositions
Logical truth
Concepts in epistemology