Vacuous truth: Difference between revisions

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
imported>Marc Schroeder
Scope of the concept: ¬p ⊢ (p → q) does not hold in minimal logic
 
No edit summary
 
Line 1: Line 1:
{{Short description|Conditional statement which is true because the antecedent cannot be satisfied}}
{{Short description|Conditional statement which is true because the antecedent cannot be satisfied}}


In [[mathematics]] and [[logic]], a '''vacuous truth''' is a [[Material conditional|conditional]] or [[Universal quantification|universal]] [[Statement (logic)|statement]] (a universal statement that can be converted to a conditional statement) that is true because the [[Antecedent (logic)|antecedent]] cannot be [[Satisfiability|satisfied]].<ref name=":1">{{cite web |title=Vacuously true |url=http://web.cse.ohio-state.edu/~patel.2004/Glossary/HTML_Files/vacuously_true.html |url-status=dead |archive-url=https://web.archive.org/web/20231118192904/https://web.cse.ohio-state.edu/~patel.2004/Glossary/HTML_Files/vacuously_true.html |archive-date=18 November 2023 |access-date=15 December 2019 |website=web.cse.ohio-state.edu}}</ref>  
{{Lead too long|date=September 2025}}
It is sometimes said that a statement is vacuously true because it does not really say anything.<ref name=":2">{{cite web |title=Vacuously true - CS2800 wiki |url=https://courses.cs.cornell.edu/cs2800/wiki/index.php/Vacuously_true |url-status=live |archive-url=https://web.archive.org/web/20230621011654/https://courses.cs.cornell.edu/cs2800/wiki/index.php/Vacuously_true |archive-date=21 June 2023 |access-date=15 December 2019 |website=courses.cs.cornell.edu}}</ref> For example, the statement "all cell phones in the room are turned off" will be [[Truth (mathematics)|true]] when no cell phones are present in the room. In this case, the statement "all cell phones in the room are turned ''on''" would also be vacuously true, as would the [[Logical conjunction|conjunction]] of the two: "all cell phones in the room are turned on ''and'' turned off", which would otherwise be incoherent and false.
In [[mathematics]] and [[logic]], a '''vacuous truth''' is a [[Material conditional|conditional]] or [[Universal quantification|universal]] [[Statement (logic)|statement]] (specifically a universal statement that can be converted to a conditional statement) that is true because the [[Antecedent (logic)|antecedent]] cannot be [[Satisfiability|satisfied]].<ref name=":1">{{cite web |title=Vacuously true |url=http://web.cse.ohio-state.edu/~patel.2004/Glossary/HTML_Files/vacuously_true.html |url-status=dead |archive-url=https://web.archive.org/web/20231118192904/https://web.cse.ohio-state.edu/~patel.2004/Glossary/HTML_Files/vacuously_true.html |archive-date=18 November 2023 |access-date=15 December 2019 |website=web.cse.ohio-state.edu}}</ref>  
It is sometimes said that a statement is vacuously true because it does not really say anything.<ref name=":2">{{cite web |title=Vacuously true - CS2800 wiki |url=https://courses.cs.cornell.edu/cs2800/wiki/index.php/Vacuously_true |url-status=live |archive-url=https://web.archive.org/web/20230621011654/https://courses.cs.cornell.edu/cs2800/wiki/index.php/Vacuously_true |archive-date=21 June 2023 |access-date=15 December 2019 |website=courses.cs.cornell.edu}}</ref> For example, the statement "all cell phones in the room are turned off" (alternatively said "for all x in this room, ''if'' x is a cellphone then x is turned off") will be [[Truth (mathematics)|true]] when no cell phones are present in the room. In this case, the statement "all cell phones in the room are turned ''on''" would also be vacuously true, as would the [[Logical conjunction|conjunction]] of the two: "all cell phones in the room are turned on ''and'' all cell phones in the room are turned off", which would otherwise be incoherent and false.


More formally, a relatively [[Well-definition|well-defined]] usage refers to a conditional statement (or a universal conditional statement) with a false [[Antecedent (logic)|antecedent]].<ref name=":1" /><ref name=":3">{{cite web|url=https://proofwiki.org/wiki/Definition:Vacuous_Truth|title=Definition:Vacuous Truth – ProofWiki|website=proofwiki.org|access-date=2019-12-15}}</ref><ref name=":2" /><ref name=":4">{{cite web |last=Edwards |first=C. H. |date=January 18, 1998 |title=Vacuously True |url=http://www.swarthmore.edu/NatSci/smaurer1/Math18H/vacuous.pdf |url-status=dead |archive-url=https://web.archive.org/web/20210428063419/http://www.swarthmore.edu/NatSci/smaurer1/Math18H/vacuous.pdf |archive-date=28 April 2021 |access-date=14 December 2019 |website=swarthmore.edu}}</ref> One example of such a statement is "if Tokyo is in Spain, then the Eiffel Tower is in Bolivia".
More formally, a relatively [[Well-definition|well-defined]] usage refers to a conditional statement (or a universal conditional statement) with a false [[Antecedent (logic)|antecedent]].<ref name=":1" /><ref name=":3">{{cite web|url=https://proofwiki.org/wiki/Definition:Vacuous_Truth|title=Definition:Vacuous Truth – ProofWiki|website=proofwiki.org|access-date=2019-12-15}}</ref><ref name=":2" /><ref name=":4">{{cite web |last=Edwards |first=C. H. |date=January 18, 1998 |title=Vacuously True |url=http://www.swarthmore.edu/NatSci/smaurer1/Math18H/vacuous.pdf |url-status=dead |archive-url=https://web.archive.org/web/20210428063419/http://www.swarthmore.edu/NatSci/smaurer1/Math18H/vacuous.pdf |archive-date=28 April 2021 |access-date=14 December 2019 |website=swarthmore.edu}}</ref> One example of such a statement is "if Tokyo is in Spain, then the Eiffel Tower is in Bolivia".
Line 31: Line 32:
Many programming environments have a mechanism for querying if every item in a collection of items satisfies some predicate.  It is common for such a query to always evaluate as true for an empty collection.  For example:
Many programming environments have a mechanism for querying if every item in a collection of items satisfies some predicate.  It is common for such a query to always evaluate as true for an empty collection.  For example:


* In [[JavaScript]], the [[array]] method <code>every</code> executes a provided callback function once for each element present in the array, only stopping (if and when) it finds an element where the callback function returns false. Notably, calling the <code>every</code> method on an empty array will return true for any condition.<ref>{{Cite web|url=https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every|title=Array.prototype.every() - JavaScript &#124; MDN|website=developer.mozilla.org|date=27 November 2023 }}</ref>
* In [[JavaScript]], the [[array]] method <code>every</code> executes a provided callback function once for each element present in the array, only stopping (if and when) it finds an element where the callback function returns false. Notably, calling the <code>every</code> method on an empty array will return true for any condition.<ref>{{Cite web|url=https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every|title=Array.prototype.every() JavaScript |website=MDN Web Docs|publisher=Mozilla Foundation|date=27 November 2023 }}</ref>
* In [[Python (Programming Language)|Python]], the built in <code>all()</code> function returns <code>True</code> only when all of the elements of an array are <code>True</code> or the array is of length zero as shown in these examples: <code>all([1,1])==True; all([1,1,0])==False; all([])==True</code>.<ref>{{cite web |title=Built-in Functions Python 3.10.2 documentation |url=https://docs.python.org/3/library/functions.html#all |website=docs.python.org}}</ref> A less ambiguous way to express this is to say <code>all()</code> returns True when '''none of the elements are False'''.
* In [[Python (Programming Language)|Python]], the built-in <code>all()</code> function returns <code>True</code> only when all of the elements of an iterable (in this example, a list) are <code>True</code> or the iterable is empty: <code>all([1,1])==True; all([1,1,0])==False; all([])==True</code>.<ref>{{cite web |title=Built-in Functions |work=Python 3.10.2 documentation |url=https://docs.python.org/3/library/functions.html#all}}</ref> A less ambiguous way to express this is to say <code>all()</code> returns True when none of the elements are <code>False</code>.
* In [[Rust (programming language)|Rust]], the <code>Iterator::all</code> function accepts an iterator and a predicate and returns <code>true</code> only when the predicate returns <code>true</code> for all items produced by the iterator, or if the iterator produces no items.<ref>{{Cite web|url=https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.all|title=Iterator in std::iter – Rust|website=doc.rust-lang.org}}</ref>
* In [[Rust (programming language)|Rust]], the <code>Iterator::all</code> function accepts an iterator and a predicate and returns <code>true</code> only when the predicate returns <code>true</code> for all items produced by the iterator, or if the iterator produces no items.<ref>{{Cite web|url=https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.all|title=Iterator in std::iter |website=Rust Documentation}}</ref>
* In SQL, the function, the function <code>ANY_VALUE</code> can differ depending on the RDBMS's behaviour relating [[Null (SQL)|NULLs]] to vacuous truth. Some RDBMS might return <code>null</code> even if there are non-<code>null</code> values.<ref>{{Cite web |title=The ANY_VALUE() Aggregate Function |url=https://modern-sql.com/caniuse/any_value |access-date=2024-11-27 |website=modern-sql.com |language=en}}</ref> Some DBMS might not allow for its use in <code>filter()</code> or <code>over()</code> clauses.
* In SQL, the function, the function <code>ANY_VALUE</code> can differ depending on the RDBMS's behaviour relating [[Null (SQL)|NULLs]] to vacuous truth. Some RDBMS might return <code>null</code> even if there are non-<code>null</code> values.<ref>{{Cite web |title=The ANY_VALUE(...) Aggregate Function |url=https://modern-sql.com/caniuse/any_value |access-date=2024-11-27 |website=Modern SQL |language=en}}</ref> Some DBMS might not allow for its use in <code>filter(...)</code> or <code>over(.. )</code> clauses.
* In [[Kotlin (programming language)|Kotlin]], the collection method <code>all</code> returns <code>true</code> when the collection is empty.
* In [[Kotlin (programming language)|Kotlin]], the collection method <code>all</code> returns <code>true</code> when the collection is empty.
* In [[C Sharp (programming language)|C#]], the Linq method <code>All</code> returns <code>true</code> when the collection is empty.
* In [[C Sharp (programming language)|C#]], the Linq method <code>All</code> returns <code>true</code> when the collection is empty.
* In [[C++]], the <code>std::all_of</code> function template returns <code>true</code> for an empty collection.<ref>{{Cite web |date=19 March 2024 |title=std::all_of, std::any_of, std::none_of |url=https://en.cppreference.com/w/cpp/algorithm/all_any_none_of |url-status=live |archive-url=https://web.archive.org/web/20241201074645/https://en.cppreference.com/w/cpp/algorithm/all_any_none_of |archive-date=1 December 2024 |access-date=9 December 2024 |website=Cpprefeference}}</ref>
* In [[C++]], the <code>std::all_of</code> function template returns <code>true</code> for an empty collection.<ref>{{Cite web |date=19 March 2024 |title=std::all_of, std::any_of, std::none_of |url=https://en.cppreference.com/w/cpp/algorithm/all_any_none_of |url-status=live |archive-url=https://web.archive.org/web/20241201074645/https://en.cppreference.com/w/cpp/algorithm/all_any_none_of |archive-date=1 December 2024 |access-date=9 December 2024 |website=Cpprefeference}}</ref>
*In [[Agda (programming language)|Agda]], an empty type (for example, <code>⊥</code>, which is defined with no constructors) is 'false' at the type level, following the [[Curry–Howard correspondence]]. A parameter of such a type can be matched against an 'absurd' pattern and an equation containing such a pattern has no right hand side. The principle of [[ex falso quodlibet]] can be defined this way as a function <code>efq : ∀ {n} {a : Set n} → ⊥ → a</code>. The function <code>efq</code> is then a proof of the vacuously true proposition <code>⊥ → a</code> for every proposition (i.e. type) <code>a</code>. For example, it is a proof of <code>⊥ → ⊥</code>.


== Examples ==
== Examples ==

Latest revision as of 09:33, 3 November 2025

Template:Short description

Script error: No such module "Unsubst". In mathematics and logic, a vacuous truth is a conditional or universal statement (specifically a universal statement that can be converted to a conditional statement) that is true because the antecedent cannot be satisfied.[1] It is sometimes said that a statement is vacuously true because it does not really say anything.[2] For example, the statement "all cell phones in the room are turned off" (alternatively said "for all x in this room, if x is a cellphone then x is turned off") will be true when no cell phones are present in the room. In this case, the statement "all cell phones in the room are turned on" would also be vacuously true, as would the conjunction of the two: "all cell phones in the room are turned on and all cell phones in the room are turned off", which would otherwise be incoherent and false.

More formally, a relatively well-defined usage refers to a conditional statement (or a universal conditional statement) with a false antecedent.[1][3][2][4] One example of such a statement is "if Tokyo is in Spain, then the Eiffel Tower is in Bolivia".

Such statements are considered vacuous truths because the fact that the antecedent is false prevents using the statement to infer anything about the truth value of the consequent. In essence, a conditional statement, that is based on the material conditional, is true when the antecedent ("Tokyo is in Spain" in the example) is false regardless of whether the conclusion or consequent ("the Eiffel Tower is in Bolivia" in the example) is true or false because the material conditional is defined in that way.

Examples common to everyday speech include conditional phrases used as idioms of improbability like "when hell freezes over ..." and "when pigs can fly ...", indicating that not before the given (impossible) condition is met will the speaker accept some respective (typically false or absurd) proposition.

In pure mathematics, vacuously true statements are not generally of interest by themselves, but they frequently arise as the base case of proofs by mathematical induction.[5] This notion has relevance in pure mathematics, as well as in any other field that uses classical logic.

Outside of mathematics, statements in the form of a vacuous truth, while logically valid, can nevertheless be misleading. Such statements make reasonable assertions about qualified objects which do not actually exist. For example, a child might truthfully tell their parent "I ate every vegetable on my plate", when there were no vegetables on the child's plate to begin with. In this case, the parent can believe that the child has actually eaten some vegetables, even though that is not true.

Scope of the concept

A statement S is "vacuously true" if it resembles a material conditional statement PQ, where the antecedent P is known to be false.[1][3][2]

Vacuously true statements that can be reduced (with suitable transformations) to this basic form (material conditional) include the following universally quantified statements:

  • x:P(x)Q(x), where it is the case that x:¬P(x).[4]
  • xA:Q(x), where the set A is empty.
    • This logical form xA:Q(x) can be converted to the material conditional form in order to easily identify the antecedent. For the above example S "all cell phones in the room are turned off", it can be formally written as xA:Q(x) where A is the set of all cell phones in the room and Q(x) is "x is turned off". This can be written to a material conditional statement xB:P(x)Q(x) where B is the set of all things in the room (including cell phones if they exist in the room), the antecedent P(x) is "x is a cell phone", and the consequent Q(x) is "x is turned off".
  • ξ:Q(ξ), where the symbol ξ is restricted to a type that has no representatives.

Vacuous truths most commonly appear in classical logic with two truth values. However, vacuous truths can also appear in, for example, intuitionistic logic, in the same situations as given above. Indeed, if P is false, then PQ will yield a vacuous truth in any logic that uses the material conditional;[6] if P is a necessary falsehood, then it will also yield a vacuous truth under the strict conditional.

Other non-classical logics, such as relevance logic, may attempt to avoid vacuous truths by using alternative conditionals (such as the case of the counterfactual conditional).

In computer programming

Many programming environments have a mechanism for querying if every item in a collection of items satisfies some predicate. It is common for such a query to always evaluate as true for an empty collection. For example:

  • In JavaScript, the array method every executes a provided callback function once for each element present in the array, only stopping (if and when) it finds an element where the callback function returns false. Notably, calling the every method on an empty array will return true for any condition.[7]
  • In Python, the built-in all() function returns True only when all of the elements of an iterable (in this example, a list) are True or the iterable is empty: all([1,1])==True; all([1,1,0])==False; all([])==True.[8] A less ambiguous way to express this is to say all() returns True when none of the elements are False.
  • In Rust, the Iterator::all function accepts an iterator and a predicate and returns true only when the predicate returns true for all items produced by the iterator, or if the iterator produces no items.[9]
  • In SQL, the function, the function ANY_VALUE can differ depending on the RDBMS's behaviour relating NULLs to vacuous truth. Some RDBMS might return null even if there are non-null values.[10] Some DBMS might not allow for its use in filter(...) or over(.. ) clauses.
  • In Kotlin, the collection method all returns true when the collection is empty.
  • In C#, the Linq method All returns true when the collection is empty.
  • In C++, the std::all_of function template returns true for an empty collection.[11]
  • In Agda, an empty type (for example, , which is defined with no constructors) is 'false' at the type level, following the Curry–Howard correspondence. A parameter of such a type can be matched against an 'absurd' pattern and an equation containing such a pattern has no right hand side. The principle of ex falso quodlibet can be defined this way as a function efq : ∀ {n} {a : Set n} → ⊥ → a. The function efq is then a proof of the vacuously true proposition ⊥ → a for every proposition (i.e. type) a. For example, it is a proof of ⊥ → ⊥.

Examples

These examples, one from mathematics and one from natural language, illustrate the concept of vacuous truths:

  • "For any integer x, if x > 5 then x > 3."[12] – This statement is true non-vacuously (since some integers are indeed greater than 5), but some of its implications are only vacuously true: for example, when x is the integer 2, the statement implies the vacuous truth that "if 2 > 5 then 2 > 3".
  • "All my children are goats" is a vacuous truth when spoken by someone without children. Similarly, "None of my children is a goat" would also be a vacuous truth when spoken by the same person.

See also

References

Template:Reflist

Bibliography

Template:Refbegin

Template:Refend

External links

Template:Refbegin

Template:Refend

  1. a b c Script error: No such module "citation/CS1".
  2. a b c Script error: No such module "citation/CS1".
  3. a b Script error: No such module "citation/CS1".
  4. a b Script error: No such module "citation/CS1".
  5. Script error: No such module "citation/CS1".
  6. Johansson's minimal logic is an exception, because the proof needs the principle of explosion.
  7. Script error: No such module "citation/CS1".
  8. Script error: No such module "citation/CS1".
  9. Script error: No such module "citation/CS1".
  10. Script error: No such module "citation/CS1".
  11. Script error: No such module "citation/CS1".
  12. Script error: No such module "citation/CS1".