Nepedia
Back to Discover
Advanced Reader
🔢

Truth value

math Maturity 11-13 Next article →

A truth value is a fundamental concept in logic and mathematics. It indicates how a proposition relates to the truth. In classical logic, there are only two possible values. These values are true and false. This specific set of two values is known as the Boolean domain.

Mathematicians use specific terms for these values. True is also called the verum. False is also called the falsum. These values allow us to measure the validity of statements.

In classical logic, we use logical connectives to combine statements. These connectives act as truth functions. We often express their results using truth tables. One common connective is conjunction, which represents a joining of ideas. Another is disjunction, which represents an alternative. Negation is a rule that interchanges true with false.

There are also special rules called De Morgan's laws. These laws explain the relationship between conjunction, disjunction, and negation. In this system, assigning values to variables is called valuation.

Computing relies heavily on truth values to make decisions. Many programming languages use a data type called a Boolean. In these languages, certain expressions are labeled as falsy. This means the computer treats them as false. For example, the number zero or 0.0 is often falsy in the C language. In Lisp, the empty list, known as nil, is also treated as false.

Other values are called truthy, meaning they evaluate to true.

Different programming languages handle truthy and falsy values in unique ways. In JavaScript, several items are considered falsy. These include the empty string, null, undefined, NaN, +0, and −0. However, JavaScript differs from Python in how it handles containers. In JavaScript and PHP, empty containers like arrays or sets are truthy. In Python, these empty containers are handled differently.

These distinctions are important for how code executes.

Beyond classical logic, there are other ways to define truth. Intuitionistic logic and constructive mathematics use a different structure. Instead of a Boolean algebra, they use a Heyting algebra. In these systems, truth values can express locality or temporality. For instance, truth values might show where a formula holds in a topological space. This means truth is not just a yes or no answer. It can depend on location or time.

Other advanced mathematical theories provide different views on truth. In realizability, truth values are seen as sets of programs. These programs serve as computational evidence for a formula. For example, a truth value could be the set of all programs that find a prime number. In category theory, truth values appear as elements of a subobject classifier.

This is particularly true in a topos, where higher-order logic is used. There is also the Curry–Howard correspondence in intuitionistic type theory. This shows an equivalence between propositions and types.

Some logical systems move away from just two values entirely. These are known as multi-valued logics. Examples include fuzzy logic and relevance logic. These systems allow for many truth values. They might even include internal structures. For example, truth can exist on a unit interval.

This allows for different degrees of truth rather than a simple binary choice. This is useful for representing complex or uncertain information.

Not all logical systems use truth values in the same way. Some systems are not truth-valuational. This means logical connectives cannot always be interpreted as simple truth functions. Intuitionistic logic is an example of this. Its semantics are based on the Brouwer–Heyting–Kolmogorov interpretation. This focuses on provability conditions rather than just necessary truth. However, even these systems can use algebraic semantics. They can still associate values with logical formulas using structures like Heyting algebras.

603 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

More to explore

🔬 Go deeper

More advanced topics to explore

🪜 Step back

Simpler topics to build understanding

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.