CINXE.COM
Iverson bracket - Wikipedia
<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>Iverson bracket - Wikipedia</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )enwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy", "wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"509d50a1-483a-47e9-8936-6a68067668ca","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Iverson_bracket","wgTitle":"Iverson bracket","wgCurRevisionId":1254815635,"wgRevisionId":1254815635,"wgArticleId":1721092,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Webarchive template wayback links","Articles with short description","Short description is different from Wikidata","Mathematical notation"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Iverson_bracket","wgRelevantArticleId":1721092,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":false, "wgFlaggedRevsParams":{"tags":{"status":{"levels":1}}},"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":9000,"wgRelatedArticlesCompat":[],"wgCentralAuthMobileDomain":false,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q2114682","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={ "ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.math.styles":"ready","ext.cite.styles":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.cite.ux-enhancements","site","mediawiki.page.ready","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.ReferenceTooltips","ext.gadget.switcher","ext.urlShortener.toolbar","ext.centralauth.centralautologin","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns" ,"ext.cx.uls.quick.actions","wikibase.client.vector-2022","ext.checkUser.clientHints","ext.growthExperiments.SuggestedEditSession","wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&modules=ext.cite.styles%7Cext.math.styles%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cext.wikimediamessages.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&only=styles&skin=vector-2022"> <script async="" src="/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&modules=site.styles&only=styles&skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.4"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="Iverson bracket - Wikipedia"> <meta property="og:type" content="website"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//en.m.wikipedia.org/wiki/Iverson_bracket"> <link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=Iverson_bracket&action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (en)"> <link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://en.wikipedia.org/wiki/Iverson_bracket"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en"> <link rel="alternate" type="application/atom+xml" title="Wikipedia Atom feed" href="/w/index.php?title=Special:RecentChanges&feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-Iverson_bracket rootpage-Iverson_bracket skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Jump to content</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Main menu" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Main menu</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Main menu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">hide</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigation </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-contents" class="mw-list-item"><a href="/wiki/Wikipedia:Contents" title="Guides to browsing Wikipedia"><span>Contents</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Portal:Current_events" title="Articles related to current events"><span>Current events</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Random" title="Visit a randomly selected article [x]" accesskey="x"><span>Random article</span></a></li><li id="n-aboutsite" class="mw-list-item"><a href="/wiki/Wikipedia:About" title="Learn about Wikipedia and how it works"><span>About Wikipedia</span></a></li><li id="n-contactpage" class="mw-list-item"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us" title="How to contact Wikipedia"><span>Contact us</span></a></li> </ul> </div> </div> <div id="p-interaction" class="vector-menu mw-portlet mw-portlet-interaction" > <div class="vector-menu-heading"> Contribute </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-help" class="mw-list-item"><a href="/wiki/Help:Contents" title="Guidance on how to use and edit Wikipedia"><span>Help</span></a></li><li id="n-introduction" class="mw-list-item"><a href="/wiki/Help:Introduction" title="Learn how to edit Wikipedia"><span>Learn to edit</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:Community_portal" title="The hub for editors"><span>Community portal</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes to Wikipedia [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_upload_wizard" title="Add images or other media for use on Wikipedia"><span>Upload file</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Main_Page" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikipedia" src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" style="width: 7.5em; height: 1.125em;"> <img class="mw-logo-tagline" alt="The Free Encyclopedia" src="/static/images/mobile/copyright/wikipedia-tagline-en.svg" width="117" height="13" style="width: 7.3125em; height: 0.8125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:Search" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Search Wikipedia [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search Wikipedia" aria-label="Search Wikipedia" autocapitalize="sentences" title="Search Wikipedia [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Personal tools"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page's font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Appearance" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Appearance</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_en.wikipedia.org&uselang=en" class=""><span>Donate</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:CreateAccount&returnto=Iverson+bracket" title="You are encouraged to create an account and log in; however, it is not mandatory" class=""><span>Create account</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:UserLogin&returnto=Iverson+bracket" title="You're encouraged to log in; however, it's not mandatory. [o]" accesskey="o" class=""><span>Log in</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Log in and more options" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Personal tools" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Personal tools</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="User menu" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_en.wikipedia.org&uselang=en"><span>Donate</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&returnto=Iverson+bracket" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:UserLogin&returnto=Iverson+bracket" title="You're encouraged to log in; however, it's not mandatory. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Pages for logged out editors <a href="/wiki/Help:Introduction" aria-label="Learn more about editing"><span>learn more</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>Talk</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Contents" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Contents</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">hide</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">(Top)</div> </a> </li> <li id="toc-Properties" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Properties"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Properties</span> </div> </a> <ul id="toc-Properties-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Examples" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Examples"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Examples</span> </div> </a> <button aria-controls="toc-Examples-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Examples subsection</span> </button> <ul id="toc-Examples-sublist" class="vector-toc-list"> <li id="toc-Double-counting_rule" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Double-counting_rule"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.1</span> <span>Double-counting rule</span> </div> </a> <ul id="toc-Double-counting_rule-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Summation_interchange" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Summation_interchange"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2</span> <span>Summation interchange</span> </div> </a> <ul id="toc-Summation_interchange-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Counting" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Counting"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3</span> <span>Counting</span> </div> </a> <ul id="toc-Counting-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Simplification_of_special_cases" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Simplification_of_special_cases"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4</span> <span>Simplification of special cases</span> </div> </a> <ul id="toc-Simplification_of_special_cases-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Common_functions" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Common_functions"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5</span> <span>Common functions</span> </div> </a> <ul id="toc-Common_functions-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Formulation_in_terms_of_usual_functions" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Formulation_in_terms_of_usual_functions"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>Formulation in terms of usual functions</span> </div> </a> <ul id="toc-Formulation_in_terms_of_usual_functions-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Notational_variations" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Notational_variations"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Notational variations</span> </div> </a> <ul id="toc-Notational_variations-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-See_also" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#See_also"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>See also</span> </div> </a> <ul id="toc-See_also-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-References" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#References"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>References</span> </div> </a> <ul id="toc-References-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">Iverson bracket</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="Go to an article in another language. Available in 14 languages" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-14" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">14 languages</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/Pr%C3%A4dikatabbildung" title="Prädikatabbildung – German" lang="de" hreflang="de" data-title="Prädikatabbildung" data-language-autonym="Deutsch" data-language-local-name="German" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/Corchete_de_Iverson" title="Corchete de Iverson – Spanish" lang="es" hreflang="es" data-title="Corchete de Iverson" data-language-autonym="Español" data-language-local-name="Spanish" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/Crochet_d%27Iverson" title="Crochet d'Iverson – French" lang="fr" hreflang="fr" data-title="Crochet d'Iverson" data-language-autonym="Français" data-language-local-name="French" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-gl mw-list-item"><a href="https://gl.wikipedia.org/wiki/Corchete_de_Iverson" title="Corchete de Iverson – Galician" lang="gl" hreflang="gl" data-title="Corchete de Iverson" data-language-autonym="Galego" data-language-local-name="Galician" class="interlanguage-link-target"><span>Galego</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/%EC%95%84%EC%9D%B4%EB%B2%84%EC%8A%A8_%EA%B4%84%ED%98%B8" title="아이버슨 괄호 – Korean" lang="ko" hreflang="ko" data-title="아이버슨 괄호" data-language-autonym="한국어" data-language-local-name="Korean" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-it mw-list-item"><a href="https://it.wikipedia.org/wiki/Parentesi_di_Iverson" title="Parentesi di Iverson – Italian" lang="it" hreflang="it" data-title="Parentesi di Iverson" data-language-autonym="Italiano" data-language-local-name="Italian" class="interlanguage-link-target"><span>Italiano</span></a></li><li class="interlanguage-link interwiki-he mw-list-item"><a href="https://he.wikipedia.org/wiki/%D7%A1%D7%95%D7%92%D7%A8%D7%99_%D7%90%D7%99%D7%99%D7%91%D7%A8%D7%A1%D7%95%D7%9F" title="סוגרי אייברסון – Hebrew" lang="he" hreflang="he" data-title="סוגרי אייברסון" data-language-autonym="עברית" data-language-local-name="Hebrew" class="interlanguage-link-target"><span>עברית</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/%E3%82%A2%E3%82%A4%E3%83%90%E3%83%BC%E3%82%BD%E3%83%B3%E3%81%AE%E8%A8%98%E6%B3%95" title="アイバーソンの記法 – Japanese" lang="ja" hreflang="ja" data-title="アイバーソンの記法" data-language-autonym="日本語" data-language-local-name="Japanese" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-pl mw-list-item"><a href="https://pl.wikipedia.org/wiki/Nawias_Iversona" title="Nawias Iversona – Polish" lang="pl" hreflang="pl" data-title="Nawias Iversona" data-language-autonym="Polski" data-language-local-name="Polish" class="interlanguage-link-target"><span>Polski</span></a></li><li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://pt.wikipedia.org/wiki/Colchetes_de_Iverson" title="Colchetes de Iverson – Portuguese" lang="pt" hreflang="pt" data-title="Colchetes de Iverson" data-language-autonym="Português" data-language-local-name="Portuguese" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/%D0%A1%D0%BA%D0%BE%D0%B1%D0%BA%D0%B0_%D0%90%D0%B9%D0%B2%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0" title="Скобка Айверсона – Russian" lang="ru" hreflang="ru" data-title="Скобка Айверсона" data-language-autonym="Русский" data-language-local-name="Russian" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-sv mw-list-item"><a href="https://sv.wikipedia.org/wiki/Iversonklammer" title="Iversonklammer – Swedish" lang="sv" hreflang="sv" data-title="Iversonklammer" data-language-autonym="Svenska" data-language-local-name="Swedish" class="interlanguage-link-target"><span>Svenska</span></a></li><li class="interlanguage-link interwiki-uk mw-list-item"><a href="https://uk.wikipedia.org/wiki/%D0%94%D1%83%D0%B6%D0%BA%D0%B0_%D0%90%D0%B9%D0%B2%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0" title="Дужка Айверсона – Ukrainian" lang="uk" hreflang="uk" data-title="Дужка Айверсона" data-language-autonym="Українська" data-language-local-name="Ukrainian" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://zh.wikipedia.org/wiki/%E8%89%BE%E4%BD%9B%E6%A3%AE%E6%8B%AC%E5%8F%B7" title="艾佛森括号 – Chinese" lang="zh" hreflang="zh" data-title="艾佛森括号" data-language-autonym="中文" data-language-local-name="Chinese" class="interlanguage-link-target"><span>中文</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q2114682#sitelinks-wikipedia" title="Edit interlanguage links" class="wbc-editpage">Edit links</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Namespaces"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Iverson_bracket" title="View the content page [c]" accesskey="c"><span>Article</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Talk:Iverson_bracket" rel="discussion" title="Discuss improvements to the content page [t]" accesskey="t"><span>Talk</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Change language variant" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">English</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Views"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Iverson_bracket"><span>Read</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Iverson_bracket&action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Iverson_bracket&action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Tools" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Tools</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Tools</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">hide</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="More options" > <div class="vector-menu-heading"> Actions </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/Iverson_bracket"><span>Read</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Iverson_bracket&action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Iverson_bracket&action=history"><span>View history</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/Iverson_bracket" title="List of all English Wikipedia pages containing links to this page [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/Iverson_bracket" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_Upload_Wizard" title="Upload files [u]" accesskey="u"><span>Upload file</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q"><span>Special pages</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Iverson_bracket&oldid=1254815635" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Iverson_bracket&action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Special:CiteThisPage&page=Iverson_bracket&id=1254815635&wpFormIdentifier=titleform" title="Information on how to cite this page"><span>Cite this page</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FIverson_bracket"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FIverson_bracket"><span>Download QR code</span></a></li> </ul> </div> </div> <div id="p-coll-print_export" class="vector-menu mw-portlet mw-portlet-coll-print_export" > <div class="vector-menu-heading"> Print/export </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&page=Iverson_bracket&action=show-download-screen" title="Download this page as a PDF file"><span>Download as PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=Iverson_bracket&printable=yes" title="Printable version of this page [p]" accesskey="p"><span>Printable version</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> In other projects </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q2114682" title="Structured data on this page hosted by Wikidata [g]" accesskey="g"><span>Wikidata item</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Appearance</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">hide</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">From Wikipedia, the free encyclopedia</div> </div> <div id="contentSub"><div id="mw-content-subtitle"></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><div class="shortdescription nomobile noexcerpt noprint searchaux" style="display:none">Mathematical notation</div> <p>In <a href="/wiki/Mathematics" title="Mathematics">mathematics</a>, the <b>Iverson bracket</b>, named after <a href="/wiki/Kenneth_E._Iverson" title="Kenneth E. Iverson">Kenneth E. Iverson</a>, is a notation that generalises the <a href="/wiki/Kronecker_delta" title="Kronecker delta">Kronecker delta</a>, which is the Iverson bracket of the statement <span class="texhtml"><i>x</i> = <i>y</i></span>. It maps any <a href="/wiki/Statement_(logic)" title="Statement (logic)">statement</a> to a <a href="/wiki/Function_(mathematics)" title="Function (mathematics)">function</a> of the <a href="/wiki/Free_variable" class="mw-redirect" title="Free variable">free variables</a> in that statement. This function is defined to take the value 1 for the values of the variables for which the statement is true, and takes the value 0 otherwise. It is generally denoted by putting the statement inside square brackets: <span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle [P]={\begin{cases}1&{\text{if }}P{\text{ is true;}}\\0&{\text{otherwise.}}\end{cases}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">[</mo> <mi>P</mi> <mo stretchy="false">]</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mo>{</mo> <mtable columnalign="left left" rowspacing=".2em" columnspacing="1em" displaystyle="false"> <mtr> <mtd> <mn>1</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>if </mtext> </mrow> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mtext> is true;</mtext> </mrow> </mtd> </mtr> <mtr> <mtd> <mn>0</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>otherwise.</mtext> </mrow> </mtd> </mtr> </mtable> <mo fence="true" stretchy="true" symmetric="true"></mo> </mrow> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle [P]={\begin{cases}1&{\text{if }}P{\text{ is true;}}\\0&{\text{otherwise.}}\end{cases}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ead533e8bdd9bcb51828f0d580bdc2d70a799da6" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:23.314ex; height:6.176ex;" alt="{\displaystyle [P]={\begin{cases}1&{\text{if }}P{\text{ is true;}}\\0&{\text{otherwise.}}\end{cases}}}"></span> In other words, the Iverson bracket of a statement is the <a href="/wiki/Indicator_function" title="Indicator function">indicator function</a> of the set of values for which the statement is true. </p><p>The Iverson bracket allows using <a href="/wiki/Capital-sigma_notation" class="mw-redirect" title="Capital-sigma notation">capital-sigma notation</a> without restriction on the summation index. That is, for any property <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P(k)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>P</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P(k)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b41614fb84549b21f2c7f2793bbd8a87a2105027" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:4.766ex; height:2.843ex;" alt="{\displaystyle P(k)}"></span> of the integer <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>k</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle k}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c3c9a2c7b599b37105512c5d570edc034056dd40" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.211ex; height:2.176ex;" alt="{\displaystyle k}"></span>, one can rewrite the restricted sum <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sum _{k:P(k)}f(k)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>:</mo> <mi>P</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo stretchy="false">)</mo> </mrow> </munder> <mi>f</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \sum _{k:P(k)}f(k)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2ad2b658a5609fc942cc3e57b84161c5e02b926b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.505ex; width:9.37ex; height:6.009ex;" alt="{\displaystyle \sum _{k:P(k)}f(k)}"></span> in the unrestricted form <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sum _{k}f(k)\cdot [P(k)]}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </munder> <mi>f</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo stretchy="false">)</mo> <mo>⋅<!-- ⋅ --></mo> <mo stretchy="false">[</mo> <mi>P</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo stretchy="false">)</mo> <mo stretchy="false">]</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \sum _{k}f(k)\cdot [P(k)]}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f6691a8964a679fd1cbc5366d433ca6dcfce2926" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:15.78ex; height:5.509ex;" alt="{\displaystyle \sum _{k}f(k)\cdot [P(k)]}"></span>. With this convention, <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle f(k)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>f</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle f(k)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c36f16f5357aeb5b0fa2fe3040e74282d62f8881" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:4.299ex; height:2.843ex;" alt="{\displaystyle f(k)}"></span> does not need to be defined for the values of <span class="texhtml mvar" style="font-style:italic;">k</span> for which the Iverson bracket equals <span class="texhtml">0</span>; that is, a summand <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle f(k)[{\textbf {false}}]}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>f</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo stretchy="false">)</mo> <mo stretchy="false">[</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mtext mathvariant="bold">false</mtext> </mrow> </mrow> <mo stretchy="false">]</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle f(k)[{\textbf {false}}]}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/fb044c98e46ced3e73b546cf6723d9f20a29fed9" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:10.732ex; height:2.843ex;" alt="{\displaystyle f(k)[{\textbf {false}}]}"></span> must evaluate to 0 regardless of whether <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle f(k)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>f</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle f(k)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c36f16f5357aeb5b0fa2fe3040e74282d62f8881" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:4.299ex; height:2.843ex;" alt="{\displaystyle f(k)}"></span> is defined. </p><p>The notation was originally introduced by <a href="/wiki/Kenneth_E._Iverson" title="Kenneth E. Iverson">Kenneth E. Iverson</a> in his programming language <a href="/wiki/APL_(programming_language)" title="APL (programming language)">APL</a>,<sup id="cite_ref-APL_1-0" class="reference"><a href="#cite_note-APL-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> though restricted to single relational operators enclosed in parentheses, while the generalisation to arbitrary statements, notational restriction to square brackets, and applications to summation, was advocated by <a href="/wiki/Donald_Knuth" title="Donald Knuth">Donald Knuth</a> to avoid ambiguity in parenthesized logical expressions.<sup id="cite_ref-TNN_3-0" class="reference"><a href="#cite_note-TNN-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="Properties">Properties</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Iverson_bracket&action=edit&section=1" title="Edit section: Properties"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>There is a direct correspondence between arithmetic on Iverson brackets, logic, and set operations. For instance, let <i>A</i> and <i>B</i> be sets and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P(k_{1},\dots )}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>P</mi> <mo stretchy="false">(</mo> <msub> <mi>k</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>…<!-- … --></mo> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P(k_{1},\dots )}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f19a59d8eb614552f50e5317e0fd9bb6fa0dc422" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:9.577ex; height:2.843ex;" alt="{\displaystyle P(k_{1},\dots )}"></span> any property of integers; then we have <span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}[][\,P\land Q\,]~&=~[\,P\,]\,[\,Q\,]~~;\\[1em][\,P\lor Q\,]~&=~[\,P\,]\;+\;[\,Q\,]\;-\;[\,P\,]\,[\,Q\,]~~;\\[1em][\,\neg \,P\,]~&=~1-[\,P\,]~~;\\[1em][\,P{\scriptstyle {\mathsf {\text{ XOR }}}}Q\,]~&=~{\Bigl |}\,[\,P\,]\;-\;[\,Q\,]\,{\Bigr |}~~;\\[1em][\,k\in A\,]\;+\;[\,k\in B\,]~&=~[\,k\in A\cup B\,]\;+\;[\,k\in A\cap B\,]~~;\\[1em][\,x\in A\cap B\,]~&=~[\,x\in A\,]\,[\,x\in B\,]~~;\\[1em][\,\forall \,m\ :\,P(k,m)\,]~&=~\prod _{m}\,[\,P(k,m)\,]~~;\\[1em][\,\exists \,m\ :\,P(k,m)\,]~&=~\min {\Bigl \{}\;1\,,\,\sum _{m}\,[\,P(k,m)\,]\;{\Bigr \}}=1\;-\;\prod _{m}\,[\,\neg \,P(k,m)\,]~~;\\[1em]\#{\Bigl \{}\;m\,{\Big |}\,P(k,m)\;{\Bigr \}}~&=~\sum _{m}\,[\,P(k,m)\,]~~.\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="1.3em 1.3em 1.3em 1.3em 1.3em 1.3em 1.3em 1.3em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi>P</mi> <mo>∧<!-- ∧ --></mo> <mi>Q</mi> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mtext> </mtext> </mtd> <mtd> <mi></mi> <mo>=</mo> <mtext> </mtext> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi>P</mi> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mspace width="thinmathspace" /> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi>Q</mi> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mtext> </mtext> <mtext> </mtext> <mo>;</mo> </mtd> </mtr> <mtr> <mtd> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi>P</mi> <mo>∨<!-- ∨ --></mo> <mi>Q</mi> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mtext> </mtext> </mtd> <mtd> <mi></mi> <mo>=</mo> <mtext> </mtext> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi>P</mi> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mspace width="thickmathspace" /> <mo>+</mo> <mspace width="thickmathspace" /> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi>Q</mi> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mspace width="thickmathspace" /> <mo>−<!-- − --></mo> <mspace width="thickmathspace" /> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi>P</mi> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mspace width="thinmathspace" /> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi>Q</mi> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mtext> </mtext> <mtext> </mtext> <mo>;</mo> </mtd> </mtr> <mtr> <mtd> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi mathvariant="normal">¬<!-- ¬ --></mi> <mspace width="thinmathspace" /> <mi>P</mi> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mtext> </mtext> </mtd> <mtd> <mi></mi> <mo>=</mo> <mtext> </mtext> <mn>1</mn> <mo>−<!-- − --></mo> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi>P</mi> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mtext> </mtext> <mtext> </mtext> <mo>;</mo> </mtd> </mtr> <mtr> <mtd> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="1"> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mtext mathvariant="sans-serif"> XOR </mtext> </mrow> </mrow> </mstyle> </mrow> <mi>Q</mi> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mtext> </mtext> </mtd> <mtd> <mi></mi> <mo>=</mo> <mtext> </mtext> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="1.623em" minsize="1.623em">|</mo> </mrow> </mrow> <mspace width="thinmathspace" /> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi>P</mi> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mspace width="thickmathspace" /> <mo>−<!-- − --></mo> <mspace width="thickmathspace" /> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi>Q</mi> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mspace width="thinmathspace" /> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="1.623em" minsize="1.623em">|</mo> </mrow> </mrow> <mtext> </mtext> <mtext> </mtext> <mo>;</mo> </mtd> </mtr> <mtr> <mtd> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi>k</mi> <mo>∈<!-- ∈ --></mo> <mi>A</mi> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mspace width="thickmathspace" /> <mo>+</mo> <mspace width="thickmathspace" /> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi>k</mi> <mo>∈<!-- ∈ --></mo> <mi>B</mi> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mtext> </mtext> </mtd> <mtd> <mi></mi> <mo>=</mo> <mtext> </mtext> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi>k</mi> <mo>∈<!-- ∈ --></mo> <mi>A</mi> <mo>∪<!-- ∪ --></mo> <mi>B</mi> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mspace width="thickmathspace" /> <mo>+</mo> <mspace width="thickmathspace" /> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi>k</mi> <mo>∈<!-- ∈ --></mo> <mi>A</mi> <mo>∩<!-- ∩ --></mo> <mi>B</mi> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mtext> </mtext> <mtext> </mtext> <mo>;</mo> </mtd> </mtr> <mtr> <mtd> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi>x</mi> <mo>∈<!-- ∈ --></mo> <mi>A</mi> <mo>∩<!-- ∩ --></mo> <mi>B</mi> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mtext> </mtext> </mtd> <mtd> <mi></mi> <mo>=</mo> <mtext> </mtext> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi>x</mi> <mo>∈<!-- ∈ --></mo> <mi>A</mi> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mspace width="thinmathspace" /> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi>x</mi> <mo>∈<!-- ∈ --></mo> <mi>B</mi> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mtext> </mtext> <mtext> </mtext> <mo>;</mo> </mtd> </mtr> <mtr> <mtd> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi mathvariant="normal">∀<!-- ∀ --></mi> <mspace width="thinmathspace" /> <mi>m</mi> <mtext> </mtext> <mo>:</mo> <mspace width="thinmathspace" /> <mi>P</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo>,</mo> <mi>m</mi> <mo stretchy="false">)</mo> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mtext> </mtext> </mtd> <mtd> <mi></mi> <mo>=</mo> <mtext> </mtext> <munder> <mo>∏<!-- ∏ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </munder> <mspace width="thinmathspace" /> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi>P</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo>,</mo> <mi>m</mi> <mo stretchy="false">)</mo> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mtext> </mtext> <mtext> </mtext> <mo>;</mo> </mtd> </mtr> <mtr> <mtd> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi mathvariant="normal">∃<!-- ∃ --></mi> <mspace width="thinmathspace" /> <mi>m</mi> <mtext> </mtext> <mo>:</mo> <mspace width="thinmathspace" /> <mi>P</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo>,</mo> <mi>m</mi> <mo stretchy="false">)</mo> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mtext> </mtext> </mtd> <mtd> <mi></mi> <mo>=</mo> <mtext> </mtext> <mo movablelimits="true" form="prefix">min</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="1.623em" minsize="1.623em">{</mo> </mrow> </mrow> <mspace width="thickmathspace" /> <mn>1</mn> <mspace width="thinmathspace" /> <mo>,</mo> <mspace width="thinmathspace" /> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </munder> <mspace width="thinmathspace" /> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi>P</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo>,</mo> <mi>m</mi> <mo stretchy="false">)</mo> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mspace width="thickmathspace" /> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="1.623em" minsize="1.623em">}</mo> </mrow> </mrow> <mo>=</mo> <mn>1</mn> <mspace width="thickmathspace" /> <mo>−<!-- − --></mo> <mspace width="thickmathspace" /> <munder> <mo>∏<!-- ∏ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </munder> <mspace width="thinmathspace" /> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi mathvariant="normal">¬<!-- ¬ --></mi> <mspace width="thinmathspace" /> <mi>P</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo>,</mo> <mi>m</mi> <mo stretchy="false">)</mo> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mtext> </mtext> <mtext> </mtext> <mo>;</mo> </mtd> </mtr> <mtr> <mtd> <mi mathvariant="normal">#<!-- # --></mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="1.623em" minsize="1.623em">{</mo> </mrow> </mrow> <mspace width="thickmathspace" /> <mi>m</mi> <mspace width="thinmathspace" /> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mo maxsize="1.623em" minsize="1.623em">|</mo> </mrow> </mrow> <mspace width="thinmathspace" /> <mi>P</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo>,</mo> <mi>m</mi> <mo stretchy="false">)</mo> <mspace width="thickmathspace" /> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="1.623em" minsize="1.623em">}</mo> </mrow> </mrow> <mtext> </mtext> </mtd> <mtd> <mi></mi> <mo>=</mo> <mtext> </mtext> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </munder> <mspace width="thinmathspace" /> <mo stretchy="false">[</mo> <mspace width="thinmathspace" /> <mi>P</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo>,</mo> <mi>m</mi> <mo stretchy="false">)</mo> <mspace width="thinmathspace" /> <mo stretchy="false">]</mo> <mtext> </mtext> <mtext> </mtext> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}[][\,P\land Q\,]~&=~[\,P\,]\,[\,Q\,]~~;\\[1em][\,P\lor Q\,]~&=~[\,P\,]\;+\;[\,Q\,]\;-\;[\,P\,]\,[\,Q\,]~~;\\[1em][\,\neg \,P\,]~&=~1-[\,P\,]~~;\\[1em][\,P{\scriptstyle {\mathsf {\text{ XOR }}}}Q\,]~&=~{\Bigl |}\,[\,P\,]\;-\;[\,Q\,]\,{\Bigr |}~~;\\[1em][\,k\in A\,]\;+\;[\,k\in B\,]~&=~[\,k\in A\cup B\,]\;+\;[\,k\in A\cap B\,]~~;\\[1em][\,x\in A\cap B\,]~&=~[\,x\in A\,]\,[\,x\in B\,]~~;\\[1em][\,\forall \,m\ :\,P(k,m)\,]~&=~\prod _{m}\,[\,P(k,m)\,]~~;\\[1em][\,\exists \,m\ :\,P(k,m)\,]~&=~\min {\Bigl \{}\;1\,,\,\sum _{m}\,[\,P(k,m)\,]\;{\Bigr \}}=1\;-\;\prod _{m}\,[\,\neg \,P(k,m)\,]~~;\\[1em]\#{\Bigl \{}\;m\,{\Big |}\,P(k,m)\;{\Bigr \}}~&=~\sum _{m}\,[\,P(k,m)\,]~~.\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b4f17e5b46dbdd18574473bd4a27c4329a3a2a40" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -27.505ex; width:75.952ex; height:56.176ex;" alt="{\displaystyle {\begin{aligned}[][\,P\land Q\,]~&=~[\,P\,]\,[\,Q\,]~~;\\[1em][\,P\lor Q\,]~&=~[\,P\,]\;+\;[\,Q\,]\;-\;[\,P\,]\,[\,Q\,]~~;\\[1em][\,\neg \,P\,]~&=~1-[\,P\,]~~;\\[1em][\,P{\scriptstyle {\mathsf {\text{ XOR }}}}Q\,]~&=~{\Bigl |}\,[\,P\,]\;-\;[\,Q\,]\,{\Bigr |}~~;\\[1em][\,k\in A\,]\;+\;[\,k\in B\,]~&=~[\,k\in A\cup B\,]\;+\;[\,k\in A\cap B\,]~~;\\[1em][\,x\in A\cap B\,]~&=~[\,x\in A\,]\,[\,x\in B\,]~~;\\[1em][\,\forall \,m\ :\,P(k,m)\,]~&=~\prod _{m}\,[\,P(k,m)\,]~~;\\[1em][\,\exists \,m\ :\,P(k,m)\,]~&=~\min {\Bigl \{}\;1\,,\,\sum _{m}\,[\,P(k,m)\,]\;{\Bigr \}}=1\;-\;\prod _{m}\,[\,\neg \,P(k,m)\,]~~;\\[1em]\#{\Bigl \{}\;m\,{\Big |}\,P(k,m)\;{\Bigr \}}~&=~\sum _{m}\,[\,P(k,m)\,]~~.\end{aligned}}}"></span> </p> <div class="mw-heading mw-heading2"><h2 id="Examples">Examples</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Iverson_bracket&action=edit&section=2" title="Edit section: Examples"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The notation allows moving boundary conditions of summations (or integrals) as a separate factor into the summand, freeing up space around the summation operator, but more importantly allowing it to be manipulated algebraically. </p> <div class="mw-heading mw-heading3"><h3 id="Double-counting_rule">Double-counting rule</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Iverson_bracket&action=edit&section=3" title="Edit section: Double-counting rule"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>We mechanically derive a well-known sum manipulation rule using Iverson brackets: <span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}\sum _{k\in A}f(k)+\sum _{k\in B}f(k)&=\sum _{k}f(k)\,[k\in A]+\sum _{k}f(k)\,[k\in B]\\&=\sum _{k}f(k)\,([k\in A]+[k\in B])\\&=\sum _{k}f(k)\,([k\in A\cup B]+[k\in A\cap B])\\&=\sum _{k\in A\cup B}f(k)\ +\sum _{k\in A\cap B}f(k).\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>∈<!-- ∈ --></mo> <mi>A</mi> </mrow> </munder> <mi>f</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo stretchy="false">)</mo> <mo>+</mo> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>∈<!-- ∈ --></mo> <mi>B</mi> </mrow> </munder> <mi>f</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </munder> <mi>f</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo stretchy="false">)</mo> <mspace width="thinmathspace" /> <mo stretchy="false">[</mo> <mi>k</mi> <mo>∈<!-- ∈ --></mo> <mi>A</mi> <mo stretchy="false">]</mo> <mo>+</mo> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </munder> <mi>f</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo stretchy="false">)</mo> <mspace width="thinmathspace" /> <mo stretchy="false">[</mo> <mi>k</mi> <mo>∈<!-- ∈ --></mo> <mi>B</mi> <mo stretchy="false">]</mo> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo>=</mo> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </munder> <mi>f</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo stretchy="false">)</mo> <mspace width="thinmathspace" /> <mo stretchy="false">(</mo> <mo stretchy="false">[</mo> <mi>k</mi> <mo>∈<!-- ∈ --></mo> <mi>A</mi> <mo stretchy="false">]</mo> <mo>+</mo> <mo stretchy="false">[</mo> <mi>k</mi> <mo>∈<!-- ∈ --></mo> <mi>B</mi> <mo stretchy="false">]</mo> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo>=</mo> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </munder> <mi>f</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo stretchy="false">)</mo> <mspace width="thinmathspace" /> <mo stretchy="false">(</mo> <mo stretchy="false">[</mo> <mi>k</mi> <mo>∈<!-- ∈ --></mo> <mi>A</mi> <mo>∪<!-- ∪ --></mo> <mi>B</mi> <mo stretchy="false">]</mo> <mo>+</mo> <mo stretchy="false">[</mo> <mi>k</mi> <mo>∈<!-- ∈ --></mo> <mi>A</mi> <mo>∩<!-- ∩ --></mo> <mi>B</mi> <mo stretchy="false">]</mo> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo>=</mo> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>∈<!-- ∈ --></mo> <mi>A</mi> <mo>∪<!-- ∪ --></mo> <mi>B</mi> </mrow> </munder> <mi>f</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo stretchy="false">)</mo> <mtext> </mtext> <mo>+</mo> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>∈<!-- ∈ --></mo> <mi>A</mi> <mo>∩<!-- ∩ --></mo> <mi>B</mi> </mrow> </munder> <mi>f</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo stretchy="false">)</mo> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}\sum _{k\in A}f(k)+\sum _{k\in B}f(k)&=\sum _{k}f(k)\,[k\in A]+\sum _{k}f(k)\,[k\in B]\\&=\sum _{k}f(k)\,([k\in A]+[k\in B])\\&=\sum _{k}f(k)\,([k\in A\cup B]+[k\in A\cap B])\\&=\sum _{k\in A\cup B}f(k)\ +\sum _{k\in A\cap B}f(k).\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9db21dce1a822a3af11a89026a8c9e03533598ae" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -10.838ex; width:58.721ex; height:22.843ex;" alt="{\displaystyle {\begin{aligned}\sum _{k\in A}f(k)+\sum _{k\in B}f(k)&=\sum _{k}f(k)\,[k\in A]+\sum _{k}f(k)\,[k\in B]\\&=\sum _{k}f(k)\,([k\in A]+[k\in B])\\&=\sum _{k}f(k)\,([k\in A\cup B]+[k\in A\cap B])\\&=\sum _{k\in A\cup B}f(k)\ +\sum _{k\in A\cap B}f(k).\end{aligned}}}"></span> </p> <div class="mw-heading mw-heading3"><h3 id="Summation_interchange">Summation interchange</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Iverson_bracket&action=edit&section=4" title="Edit section: Summation interchange"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The well-known rule <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\textstyle \sum _{j=1}^{n}\sum _{k=1}^{j}f(j,k)=\sum _{k=1}^{n}\sum _{j=k}^{n}f(j,k)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>j</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </munderover> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>j</mi> </mrow> </munderover> <mi>f</mi> <mo stretchy="false">(</mo> <mi>j</mi> <mo>,</mo> <mi>k</mi> <mo stretchy="false">)</mo> <mo>=</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </munderover> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>j</mi> <mo>=</mo> <mi>k</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </munderover> <mi>f</mi> <mo stretchy="false">(</mo> <mi>j</mi> <mo>,</mo> <mi>k</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\textstyle \sum _{j=1}^{n}\sum _{k=1}^{j}f(j,k)=\sum _{k=1}^{n}\sum _{j=k}^{n}f(j,k)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6b9f91703881389dd06502ac948f43ba996e5635" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.338ex; width:39.478ex; height:3.843ex;" alt="{\textstyle \sum _{j=1}^{n}\sum _{k=1}^{j}f(j,k)=\sum _{k=1}^{n}\sum _{j=k}^{n}f(j,k)}"></span> is likewise easily derived: <span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}\sum _{j=1}^{n}\,\sum _{k=1}^{j}f(j,k)&=\sum _{j,k}f(j,k)\,[1\leq j\leq n]\,[1\leq k\leq j]\\&=\sum _{j,k}f(j,k)\,[1\leq k\leq j\leq n]\\&=\sum _{j,k}f(j,k)\,[1\leq k\leq n]\,[k\leq j\leq n]\\&=\sum _{k=1}^{n}\,\sum _{j=k}^{n}f(j,k).\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>j</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </munderover> <mspace width="thinmathspace" /> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>j</mi> </mrow> </munderover> <mi>f</mi> <mo stretchy="false">(</mo> <mi>j</mi> <mo>,</mo> <mi>k</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>j</mi> <mo>,</mo> <mi>k</mi> </mrow> </munder> <mi>f</mi> <mo stretchy="false">(</mo> <mi>j</mi> <mo>,</mo> <mi>k</mi> <mo stretchy="false">)</mo> <mspace width="thinmathspace" /> <mo stretchy="false">[</mo> <mn>1</mn> <mo>≤<!-- ≤ --></mo> <mi>j</mi> <mo>≤<!-- ≤ --></mo> <mi>n</mi> <mo stretchy="false">]</mo> <mspace width="thinmathspace" /> <mo stretchy="false">[</mo> <mn>1</mn> <mo>≤<!-- ≤ --></mo> <mi>k</mi> <mo>≤<!-- ≤ --></mo> <mi>j</mi> <mo stretchy="false">]</mo> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo>=</mo> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>j</mi> <mo>,</mo> <mi>k</mi> </mrow> </munder> <mi>f</mi> <mo stretchy="false">(</mo> <mi>j</mi> <mo>,</mo> <mi>k</mi> <mo stretchy="false">)</mo> <mspace width="thinmathspace" /> <mo stretchy="false">[</mo> <mn>1</mn> <mo>≤<!-- ≤ --></mo> <mi>k</mi> <mo>≤<!-- ≤ --></mo> <mi>j</mi> <mo>≤<!-- ≤ --></mo> <mi>n</mi> <mo stretchy="false">]</mo> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo>=</mo> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>j</mi> <mo>,</mo> <mi>k</mi> </mrow> </munder> <mi>f</mi> <mo stretchy="false">(</mo> <mi>j</mi> <mo>,</mo> <mi>k</mi> <mo stretchy="false">)</mo> <mspace width="thinmathspace" /> <mo stretchy="false">[</mo> <mn>1</mn> <mo>≤<!-- ≤ --></mo> <mi>k</mi> <mo>≤<!-- ≤ --></mo> <mi>n</mi> <mo stretchy="false">]</mo> <mspace width="thinmathspace" /> <mo stretchy="false">[</mo> <mi>k</mi> <mo>≤<!-- ≤ --></mo> <mi>j</mi> <mo>≤<!-- ≤ --></mo> <mi>n</mi> <mo stretchy="false">]</mo> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo>=</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </munderover> <mspace width="thinmathspace" /> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>j</mi> <mo>=</mo> <mi>k</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </munderover> <mi>f</mi> <mo stretchy="false">(</mo> <mi>j</mi> <mo>,</mo> <mi>k</mi> <mo stretchy="false">)</mo> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}\sum _{j=1}^{n}\,\sum _{k=1}^{j}f(j,k)&=\sum _{j,k}f(j,k)\,[1\leq j\leq n]\,[1\leq k\leq j]\\&=\sum _{j,k}f(j,k)\,[1\leq k\leq j\leq n]\\&=\sum _{j,k}f(j,k)\,[1\leq k\leq n]\,[k\leq j\leq n]\\&=\sum _{k=1}^{n}\,\sum _{j=k}^{n}f(j,k).\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2967acb1f5111d9b0baa80b51131e9094295bae5" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -12.842ex; margin-top: -0.335ex; margin-bottom: -0.329ex; width:51.133ex; height:27.509ex;" alt="{\displaystyle {\begin{aligned}\sum _{j=1}^{n}\,\sum _{k=1}^{j}f(j,k)&=\sum _{j,k}f(j,k)\,[1\leq j\leq n]\,[1\leq k\leq j]\\&=\sum _{j,k}f(j,k)\,[1\leq k\leq j\leq n]\\&=\sum _{j,k}f(j,k)\,[1\leq k\leq n]\,[k\leq j\leq n]\\&=\sum _{k=1}^{n}\,\sum _{j=k}^{n}f(j,k).\end{aligned}}}"></span> </p> <div class="mw-heading mw-heading3"><h3 id="Counting">Counting</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Iverson_bracket&action=edit&section=5" title="Edit section: Counting"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>For instance, <a href="/wiki/Euler%27s_totient_function" title="Euler's totient function">Euler's totient function</a> that counts the number of positive integers up to <i>n</i> which are <a href="/wiki/Coprime" class="mw-redirect" title="Coprime">coprime</a> to <i>n</i> can be expressed by <span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varphi (n)=\sum _{i=1}^{n}[\gcd(i,n)=1],\qquad {\text{for }}n\in \mathbb {N} ^{+}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>φ<!-- φ --></mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>=</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </munderover> <mo stretchy="false">[</mo> <mo movablelimits="true" form="prefix">gcd</mo> <mo stretchy="false">(</mo> <mi>i</mi> <mo>,</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mn>1</mn> <mo stretchy="false">]</mo> <mo>,</mo> <mspace width="2em" /> <mrow class="MJX-TeXAtom-ORD"> <mtext>for </mtext> </mrow> <mi>n</mi> <mo>∈<!-- ∈ --></mo> <msup> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">N</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mo>+</mo> </mrow> </msup> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \varphi (n)=\sum _{i=1}^{n}[\gcd(i,n)=1],\qquad {\text{for }}n\in \mathbb {N} ^{+}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a00ccd1b2f9b81b1a3e9fb7c9b734aee393f3c15" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:42.377ex; height:6.843ex;" alt="{\displaystyle \varphi (n)=\sum _{i=1}^{n}[\gcd(i,n)=1],\qquad {\text{for }}n\in \mathbb {N} ^{+}.}"></span> </p> <div class="mw-heading mw-heading3"><h3 id="Simplification_of_special_cases">Simplification of special cases</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Iverson_bracket&action=edit&section=6" title="Edit section: Simplification of special cases"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Another use of the Iverson bracket is to simplify equations with special cases. For example, the formula <span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sum _{1\leq k\leq n \atop \gcd(k,n)=1}\!\!k={\frac {1}{2}}n\varphi (n)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac linethickness="0"> <mrow> <mn>1</mn> <mo>≤<!-- ≤ --></mo> <mi>k</mi> <mo>≤<!-- ≤ --></mo> <mi>n</mi> </mrow> <mrow> <mo movablelimits="true" form="prefix">gcd</mo> <mo stretchy="false">(</mo> <mi>k</mi> <mo>,</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mn>1</mn> </mrow> </mfrac> </mrow> </munder> <mspace width="negativethinmathspace" /> <mspace width="negativethinmathspace" /> <mi>k</mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mrow> <mi>n</mi> <mi>φ<!-- φ --></mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \sum _{1\leq k\leq n \atop \gcd(k,n)=1}\!\!k={\frac {1}{2}}n\varphi (n)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/34f983e7667367ac459315b6e42b5d1749a1fd62" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -4.838ex; width:19.211ex; height:8.176ex;" alt="{\displaystyle \sum _{1\leq k\leq n \atop \gcd(k,n)=1}\!\!k={\frac {1}{2}}n\varphi (n)}"></span> </p><p>is valid for <span class="texhtml"><i>n</i> > 1</span> but is off by <style data-mw-deduplicate="TemplateStyles:r1214402035">.mw-parser-output .sfrac{white-space:nowrap}.mw-parser-output .sfrac.tion,.mw-parser-output .sfrac .tion{display:inline-block;vertical-align:-0.5em;font-size:85%;text-align:center}.mw-parser-output .sfrac .num{display:block;line-height:1em;margin:0.0em 0.1em;border-bottom:1px solid}.mw-parser-output .sfrac .den{display:block;line-height:1em;margin:0.1em 0.1em}.mw-parser-output .sr-only{border:0;clip:rect(0,0,0,0);clip-path:polygon(0px 0px,0px 0px,0px 0px);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}</style><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">2</span></span>⁠</span> for <span class="texhtml"><i>n</i> = 1</span>. To get an identity valid for all positive integers <span class="texhtml mvar" style="font-style:italic;">n</span> (i.e., all values for which <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varphi (n)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>φ<!-- φ --></mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \varphi (n)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f067864064667dd5f8b2508b9cbf983d89788629" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:4.724ex; height:2.843ex;" alt="{\displaystyle \varphi (n)}"></span> is defined), a correction term involving the Iverson bracket may be added: <span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sum _{1\leq k\leq n \atop \gcd(k,n)=1}\!\!k={\frac {1}{2}}n{\Big (}\varphi (n)+[n=1]{\Big )}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac linethickness="0"> <mrow> <mn>1</mn> <mo>≤<!-- ≤ --></mo> <mi>k</mi> <mo>≤<!-- ≤ --></mo> <mi>n</mi> </mrow> <mrow> <mo movablelimits="true" form="prefix">gcd</mo> <mo stretchy="false">(</mo> <mi>k</mi> <mo>,</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mn>1</mn> </mrow> </mfrac> </mrow> </munder> <mspace width="negativethinmathspace" /> <mspace width="negativethinmathspace" /> <mi>k</mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mrow> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mo maxsize="1.623em" minsize="1.623em">(</mo> </mrow> </mrow> <mi>φ<!-- φ --></mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>+</mo> <mo stretchy="false">[</mo> <mi>n</mi> <mo>=</mo> <mn>1</mn> <mo stretchy="false">]</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mo maxsize="1.623em" minsize="1.623em">)</mo> </mrow> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \sum _{1\leq k\leq n \atop \gcd(k,n)=1}\!\!k={\frac {1}{2}}n{\Big (}\varphi (n)+[n=1]{\Big )}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d2a8f8155d65edd9912930076d7b2a9d52f55ca4" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -4.838ex; width:31.776ex; height:8.176ex;" alt="{\displaystyle \sum _{1\leq k\leq n \atop \gcd(k,n)=1}\!\!k={\frac {1}{2}}n{\Big (}\varphi (n)+[n=1]{\Big )}}"></span> </p> <div class="mw-heading mw-heading3"><h3 id="Common_functions">Common functions</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Iverson_bracket&action=edit&section=7" title="Edit section: Common functions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Many common functions, especially those with a natural piecewise definition, may be expressed in terms of the Iverson bracket. The <a href="/wiki/Kronecker_delta" title="Kronecker delta">Kronecker delta</a> notation is a specific case of Iverson notation when the condition is equality. That is, <span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \delta _{ij}=[i=j].}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>δ<!-- δ --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> <mi>j</mi> </mrow> </msub> <mo>=</mo> <mo stretchy="false">[</mo> <mi>i</mi> <mo>=</mo> <mi>j</mi> <mo stretchy="false">]</mo> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \delta _{ij}=[i=j].}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f81e83a8bfafc93fb53facd4360cd794ea0fc98d" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:12.407ex; height:3.009ex;" alt="{\displaystyle \delta _{ij}=[i=j].}"></span> </p><p>The <a href="/wiki/Indicator_function" title="Indicator function">indicator function</a> of a set <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle A}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>A</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle A}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/7daff47fa58cdfd29dc333def748ff5fa4c923e3" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.743ex; height:2.176ex;" alt="{\displaystyle A}"></span>, often denoted <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbf {1} _{A}(x)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mn mathvariant="bold">1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>A</mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \mathbf {1} _{A}(x)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f932fcbec6f7a11b3bee1f02714ed10c0235dcdc" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:5.94ex; height:2.843ex;" alt="{\displaystyle \mathbf {1} _{A}(x)}"></span>, <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbf {I} _{A}(x)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">I</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>A</mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \mathbf {I} _{A}(x)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/098976f651a178d4753a7e8a23037b2f34936237" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:5.618ex; height:2.843ex;" alt="{\displaystyle \mathbf {I} _{A}(x)}"></span> or <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \chi _{A}(x)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>χ<!-- χ --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>A</mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \chi _{A}(x)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/89b9161990fcda15db1ab01bce8b2832f8517857" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.059ex; height:2.843ex;" alt="{\displaystyle \chi _{A}(x)}"></span>, is an Iverson bracket with set membership as its condition: <span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbf {I} _{A}(x)=[x\in A].}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">I</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>A</mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mo stretchy="false">[</mo> <mi>x</mi> <mo>∈<!-- ∈ --></mo> <mi>A</mi> <mo stretchy="false">]</mo> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \mathbf {I} _{A}(x)=[x\in A].}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/33e4bb3975a1a5cf61f4bb5f2dc569a6b84c0671" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:16.57ex; height:2.843ex;" alt="{\displaystyle \mathbf {I} _{A}(x)=[x\in A].}"></span> </p><p>The <a href="/wiki/Heaviside_step_function" title="Heaviside step function">Heaviside step function</a>, <a href="/wiki/Sign_function" title="Sign function">sign function</a>,<sup id="cite_ref-APL_1-1" class="reference"><a href="#cite_note-APL-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> and absolute value function are also easily expressed in this notation: <span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}H(x)&=[x\geq 0],\\\operatorname {sgn}(x)&=[x>0]-[x<0],\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mi>H</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mo stretchy="false">[</mo> <mi>x</mi> <mo>≥<!-- ≥ --></mo> <mn>0</mn> <mo stretchy="false">]</mo> <mo>,</mo> </mtd> </mtr> <mtr> <mtd> <mi>sgn</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mo stretchy="false">[</mo> <mi>x</mi> <mo>></mo> <mn>0</mn> <mo stretchy="false">]</mo> <mo>−<!-- − --></mo> <mo stretchy="false">[</mo> <mi>x</mi> <mo><</mo> <mn>0</mn> <mo stretchy="false">]</mo> <mo>,</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}H(x)&=[x\geq 0],\\\operatorname {sgn}(x)&=[x>0]-[x<0],\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a598483538bebdd969498bae9d62c7071e74aa61" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:27.616ex; height:6.176ex;" alt="{\displaystyle {\begin{aligned}H(x)&=[x\geq 0],\\\operatorname {sgn}(x)&=[x>0]-[x<0],\end{aligned}}}"></span> </p><p>and <span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}|x|&=x[x>0]-x[x<0]\\&=x([x>0]-[x<0])\\&=x\cdot \operatorname {sgn}(x).\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">|</mo> </mrow> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">|</mo> </mrow> </mtd> <mtd> <mi></mi> <mo>=</mo> <mi>x</mi> <mo stretchy="false">[</mo> <mi>x</mi> <mo>></mo> <mn>0</mn> <mo stretchy="false">]</mo> <mo>−<!-- − --></mo> <mi>x</mi> <mo stretchy="false">[</mo> <mi>x</mi> <mo><</mo> <mn>0</mn> <mo stretchy="false">]</mo> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo>=</mo> <mi>x</mi> <mo stretchy="false">(</mo> <mo stretchy="false">[</mo> <mi>x</mi> <mo>></mo> <mn>0</mn> <mo stretchy="false">]</mo> <mo>−<!-- − --></mo> <mo stretchy="false">[</mo> <mi>x</mi> <mo><</mo> <mn>0</mn> <mo stretchy="false">]</mo> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo>=</mo> <mi>x</mi> <mo>⋅<!-- ⋅ --></mo> <mi>sgn</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}|x|&=x[x>0]-x[x<0]\\&=x([x>0]-[x<0])\\&=x\cdot \operatorname {sgn}(x).\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/baca386282c81fa70a6d985d0fc8f8b1cb26607b" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -4.005ex; width:26.221ex; height:9.176ex;" alt="{\displaystyle {\begin{aligned}|x|&=x[x>0]-x[x<0]\\&=x([x>0]-[x<0])\\&=x\cdot \operatorname {sgn}(x).\end{aligned}}}"></span> </p><p>The comparison functions max and min (returning the larger or smaller of two arguments) may be written as <span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \max(x,y)=x[x>y]+y[x\leq y]}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo movablelimits="true" form="prefix">max</mo> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>x</mi> <mo stretchy="false">[</mo> <mi>x</mi> <mo>></mo> <mi>y</mi> <mo stretchy="false">]</mo> <mo>+</mo> <mi>y</mi> <mo stretchy="false">[</mo> <mi>x</mi> <mo>≤<!-- ≤ --></mo> <mi>y</mi> <mo stretchy="false">]</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \max(x,y)=x[x>y]+y[x\leq y]}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4d5e468ef50c5de1e167a4d696db20d7515fc80a" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:31.833ex; height:2.843ex;" alt="{\displaystyle \max(x,y)=x[x>y]+y[x\leq y]}"></span> and <span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \min(x,y)=x[x\leq y]+y[x>y].}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo movablelimits="true" form="prefix">min</mo> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>x</mi> <mo stretchy="false">[</mo> <mi>x</mi> <mo>≤<!-- ≤ --></mo> <mi>y</mi> <mo stretchy="false">]</mo> <mo>+</mo> <mi>y</mi> <mo stretchy="false">[</mo> <mi>x</mi> <mo>></mo> <mi>y</mi> <mo stretchy="false">]</mo> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \min(x,y)=x[x\leq y]+y[x>y].}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/19227520db8872c5dec651f059be1a933f13af1d" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:32.029ex; height:2.843ex;" alt="{\displaystyle \min(x,y)=x[x\leq y]+y[x>y].}"></span> </p><p>The <a href="/wiki/Floor_and_ceiling_functions" title="Floor and ceiling functions">floor and ceiling functions</a> can be expressed as <span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lfloor x\rfloor =\sum _{n}n\cdot [n\leq x<n+1]}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">⌊<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">⌋<!-- ⌋ --></mo> <mo>=</mo> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </munder> <mi>n</mi> <mo>⋅<!-- ⋅ --></mo> <mo stretchy="false">[</mo> <mi>n</mi> <mo>≤<!-- ≤ --></mo> <mi>x</mi> <mo><</mo> <mi>n</mi> <mo>+</mo> <mn>1</mn> <mo stretchy="false">]</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lfloor x\rfloor =\sum _{n}n\cdot [n\leq x<n+1]}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4b376aa67868c65c1cd58ebe7ba9c738da3b4810" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:28.921ex; height:5.509ex;" alt="{\displaystyle \lfloor x\rfloor =\sum _{n}n\cdot [n\leq x<n+1]}"></span> and <span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lceil x\rceil =\sum _{n}n\cdot [n-1<x\leq n],}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">⌈<!-- ⌈ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">⌉<!-- ⌉ --></mo> <mo>=</mo> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </munder> <mi>n</mi> <mo>⋅<!-- ⋅ --></mo> <mo stretchy="false">[</mo> <mi>n</mi> <mo>−<!-- − --></mo> <mn>1</mn> <mo><</mo> <mi>x</mi> <mo>≤<!-- ≤ --></mo> <mi>n</mi> <mo stretchy="false">]</mo> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lceil x\rceil =\sum _{n}n\cdot [n-1<x\leq n],}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/faee0541bcabb19ed0265101e73afe0e3fd856a4" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:29.568ex; height:5.509ex;" alt="{\displaystyle \lceil x\rceil =\sum _{n}n\cdot [n-1<x\leq n],}"></span> where the index <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a601995d55609f2d9f5e233e36fbe9ea26011b3b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.395ex; height:1.676ex;" alt="{\displaystyle n}"></span> of summation is understood to range over all the integers. </p><p>The <a href="/wiki/Ramp_function" title="Ramp function">ramp function</a> can be expressed <span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle R(x)=x\cdot [x\geq 0].}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>R</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>x</mi> <mo>⋅<!-- ⋅ --></mo> <mo stretchy="false">[</mo> <mi>x</mi> <mo>≥<!-- ≥ --></mo> <mn>0</mn> <mo stretchy="false">]</mo> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle R(x)=x\cdot [x\geq 0].}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/039b3efdebd26fa8fdf4548161888c931f0913b8" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:18.541ex; height:2.843ex;" alt="{\displaystyle R(x)=x\cdot [x\geq 0].}"></span> </p><p>The <a href="/wiki/Trichotomy_(mathematics)" class="mw-redirect" title="Trichotomy (mathematics)">trichotomy</a> of the reals is equivalent to the following identity: <span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle [a<b]+[a=b]+[a>b]=1.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">[</mo> <mi>a</mi> <mo><</mo> <mi>b</mi> <mo stretchy="false">]</mo> <mo>+</mo> <mo stretchy="false">[</mo> <mi>a</mi> <mo>=</mo> <mi>b</mi> <mo stretchy="false">]</mo> <mo>+</mo> <mo stretchy="false">[</mo> <mi>a</mi> <mo>></mo> <mi>b</mi> <mo stretchy="false">]</mo> <mo>=</mo> <mn>1.</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle [a<b]+[a=b]+[a>b]=1.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f904a0e9312701114b104202634fa07e250c2605" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:30.447ex; height:2.843ex;" alt="{\displaystyle [a<b]+[a=b]+[a>b]=1.}"></span> </p><p>The <a href="/wiki/M%C3%B6bius_function" title="Möbius function">Möbius function</a> has the property (and can be defined by recurrence as<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup>) <span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sum _{d|n}\mu (d)\ =\ [n=1].}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>d</mi> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">|</mo> </mrow> <mi>n</mi> </mrow> </munder> <mi>μ<!-- μ --></mi> <mo stretchy="false">(</mo> <mi>d</mi> <mo stretchy="false">)</mo> <mtext> </mtext> <mo>=</mo> <mtext> </mtext> <mo stretchy="false">[</mo> <mi>n</mi> <mo>=</mo> <mn>1</mn> <mo stretchy="false">]</mo> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \sum _{d|n}\mu (d)\ =\ [n=1].}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5864cb0903f1b7a7b58d48a3a3294041b77069aa" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.505ex; width:20.025ex; height:6.009ex;" alt="{\displaystyle \sum _{d|n}\mu (d)\ =\ [n=1].}"></span> </p> <div class="mw-heading mw-heading2"><h2 id="Formulation_in_terms_of_usual_functions">Formulation in terms of usual functions</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Iverson_bracket&action=edit&section=8" title="Edit section: Formulation in terms of usual functions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In the 1830s, <a href="/wiki/Guglielmo_Libri_Carucci_dalla_Sommaja" title="Guglielmo Libri Carucci dalla Sommaja">Guglielmo dalla Sommaja</a> used the expression <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 0^{0^{x}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mn>0</mn> <mrow class="MJX-TeXAtom-ORD"> <msup> <mn>0</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>x</mi> </mrow> </msup> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 0^{0^{x}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a70c55d7c0ac5ed82aa25810ee472b02a4760e6b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:3.144ex; height:2.676ex;" alt="{\displaystyle 0^{0^{x}}}"></span> to represent what now would be written <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle [x>0]}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">[</mo> <mi>x</mi> <mo>></mo> <mn>0</mn> <mo stretchy="false">]</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle [x>0]}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/fc24e58bd7226ba390c2f26c51f25523815ce1bd" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.884ex; height:2.843ex;" alt="{\displaystyle [x>0]}"></span>; he also used variants, such as <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left(1-0^{0^{-x}}\right)\left(1-0^{0^{x-a}}\right)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>(</mo> <mrow> <mn>1</mn> <mo>−<!-- − --></mo> <msup> <mn>0</mn> <mrow class="MJX-TeXAtom-ORD"> <msup> <mn>0</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mi>x</mi> </mrow> </msup> </mrow> </msup> </mrow> <mo>)</mo> </mrow> <mrow> <mo>(</mo> <mrow> <mn>1</mn> <mo>−<!-- − --></mo> <msup> <mn>0</mn> <mrow class="MJX-TeXAtom-ORD"> <msup> <mn>0</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>x</mi> <mo>−<!-- − --></mo> <mi>a</mi> </mrow> </msup> </mrow> </msup> </mrow> <mo>)</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left(1-0^{0^{-x}}\right)\left(1-0^{0^{x-a}}\right)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/bbc1a2263fefd8cb0f899d44e69df4cf885d2d42" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:23.014ex; height:4.843ex;" alt="{\displaystyle \left(1-0^{0^{-x}}\right)\left(1-0^{0^{x-a}}\right)}"></span> for <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle [0\leq x\leq a]}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">[</mo> <mn>0</mn> <mo>≤<!-- ≤ --></mo> <mi>x</mi> <mo>≤<!-- ≤ --></mo> <mi>a</mi> <mo stretchy="false">]</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle [0\leq x\leq a]}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/52b17ea225c8e2e326fa0aa428f1cb4a168a612b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.213ex; height:2.843ex;" alt="{\displaystyle [0\leq x\leq a]}"></span>.<sup id="cite_ref-TNN_3-1" class="reference"><a href="#cite_note-TNN-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> Following one <a href="/wiki/Zero_to_the_power_of_zero" title="Zero to the power of zero">common convention</a>, those quantities are equal where defined: <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 0^{0^{x}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mn>0</mn> <mrow class="MJX-TeXAtom-ORD"> <msup> <mn>0</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>x</mi> </mrow> </msup> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 0^{0^{x}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a70c55d7c0ac5ed82aa25810ee472b02a4760e6b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:3.144ex; height:2.676ex;" alt="{\displaystyle 0^{0^{x}}}"></span> is 1 if <span class="texhtml"><i>x</i> > 0</span>, is 0 if <span class="texhtml"><i>x</i> = 0</span>, and is undefined otherwise. </p> <div class="mw-heading mw-heading2"><h2 id="Notational_variations">Notational variations</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Iverson_bracket&action=edit&section=9" title="Edit section: Notational variations"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In addition to the now-standard square brackets <span class="nowrap"> [ · ] ,</span> and the original parentheses <span class="nowrap"> ( · ) ,</span> <a href="/wiki/Blackboard_bold" title="Blackboard bold">blackboard bold</a> brackets have also been used, e.g. <span class="nowrap"> <span class="texhtml"> ⟦ · ⟧ </span> ,</span> as well as other unusual forms of bracketing marks available in the publisher's typeface, accompanied by a marginal note. </p> <div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Iverson_bracket&action=edit&section=10" title="Edit section: See also"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/Boolean_function" title="Boolean function">Boolean function</a></li> <li><a href="/wiki/Type_conversion" title="Type conversion">Type conversion</a> in computer programming: many <a href="/wiki/Programming_language" title="Programming language">languages</a> allow numeric or <a href="/wiki/Pointer_(computer_programming)" title="Pointer (computer programming)">pointer</a> quantities to be used as <a href="/wiki/Boolean_data_type" title="Boolean data type">boolean quantities</a></li> <li><a href="/wiki/Indicator_function" title="Indicator function">Indicator function</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="References">References</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Iverson_bracket&action=edit&section=11" title="Edit section: References"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1239543626">.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}</style><div class="reflist"> <div class="mw-references-wrap"><ol class="references"> <li id="cite_note-APL-1"><span class="mw-cite-backlink">^ <a href="#cite_ref-APL_1-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-APL_1-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}</style><cite id="CITEREFKenneth_E._Iverson1962" class="citation book cs1">Kenneth E. Iverson (1962). <a rel="nofollow" class="external text" href="http://www.jsoftware.com/papers/APL.htm"><i>A Programming Language</i></a>. Wiley. p. 11<span class="reference-accessdate">. Retrieved <span class="nowrap">7 April</span> 2016</span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=A+Programming+Language&rft.pages=11&rft.pub=Wiley&rft.date=1962&rft.au=Kenneth+E.+Iverson&rft_id=http%3A%2F%2Fwww.jsoftware.com%2Fpapers%2FAPL.htm&rfr_id=info%3Asid%2Fen.wikipedia.org%3AIverson+bracket" class="Z3988"></span></span> </li> <li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><a href="/wiki/Ronald_Graham" title="Ronald Graham">Ronald Graham</a>, <a href="/wiki/Donald_Knuth" title="Donald Knuth">Donald Knuth</a>, and <a href="/wiki/Oren_Patashnik" title="Oren Patashnik">Oren Patashnik</a>. <i><a href="/wiki/Concrete_Mathematics" title="Concrete Mathematics">Concrete Mathematics</a></i>, Section 2.1: Notation.</span> </li> <li id="cite_note-TNN-3"><span class="mw-cite-backlink">^ <a href="#cite_ref-TNN_3-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-TNN_3-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text">Donald Knuth, "Two Notes on Notation", <i><a href="/wiki/American_Mathematical_Monthly" class="mw-redirect" title="American Mathematical Monthly">American Mathematical Monthly</a></i>, Volume 99, Number 5, May 1992, pp. 403–422. (<a rel="nofollow" class="external text" href="http://www-cs-faculty.stanford.edu/~knuth/papers/tnn.tex.gz">TeX</a> <a rel="nofollow" class="external text" href="https://web.archive.org/web/20210506142926/http://www-cs-faculty.stanford.edu/~knuth/papers/tnn.tex.gz">Archived</a> 2021-05-06 at the <a href="/wiki/Wayback_Machine" title="Wayback Machine">Wayback Machine</a>, <a href="/wiki/ArXiv_(identifier)" class="mw-redirect" title="ArXiv (identifier)">arXiv</a>:<a rel="nofollow" class="external text" href="https://arxiv.org/abs/math/9205211">math/9205211</a>).</span> </li> <li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><a href="/wiki/Ronald_Graham" title="Ronald Graham">Ronald Graham</a>, <a href="/wiki/Donald_Knuth" title="Donald Knuth">Donald Knuth</a>, and <a href="/wiki/Oren_Patashnik" title="Oren Patashnik">Oren Patashnik</a>. <i><a href="/wiki/Concrete_Mathematics" title="Concrete Mathematics">Concrete Mathematics</a></i>, Section 4.9: Phi and Mu.</span> </li> </ol></div></div> <!-- NewPP limit report Parsed by mw‐web.codfw.main‐f69cdc8f6‐bndbt Cached time: 20241122144329 Cache expiry: 2592000 Reduced expiry: false Complications: [vary‐revision‐sha1, show‐toc] CPU time usage: 0.205 seconds Real time usage: 0.357 seconds Preprocessor visited node count: 967/1000000 Post‐expand include size: 4961/2097152 bytes Template argument size: 981/2097152 bytes Highest expansion depth: 10/100 Expensive parser function count: 1/500 Unstrip recursion depth: 1/20 Unstrip post‐expand size: 8428/5000000 bytes Lua time usage: 0.091/10.000 seconds Lua memory usage: 3516870/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 237.464 1 -total 42.70% 101.408 1 Template:Short_description 41.24% 97.937 1 Template:Reflist 31.32% 74.366 1 Template:Cite_book 21.17% 50.277 2 Template:Pagetype 16.64% 39.503 10 Template:Main_other 14.76% 35.042 1 Template:SDcat 7.65% 18.170 1 Template:Sfrac 3.74% 8.882 7 Template:Math 3.41% 8.094 1 Template:Webarchive --> <!-- Saved in parser cache with key enwiki:pcache:idhash:1721092-0!canonical and timestamp 20241122144329 and revision id 1254815635. Rendering was triggered because: page-view --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/w/index.php?title=Iverson_bracket&oldid=1254815635">https://en.wikipedia.org/w/index.php?title=Iverson_bracket&oldid=1254815635</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Help:Category" title="Help:Category">Category</a>: <ul><li><a href="/wiki/Category:Mathematical_notation" title="Category:Mathematical notation">Mathematical notation</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">Hidden categories: <ul><li><a href="/wiki/Category:Webarchive_template_wayback_links" title="Category:Webarchive template wayback links">Webarchive template wayback links</a></li><li><a href="/wiki/Category:Articles_with_short_description" title="Category:Articles with short description">Articles with short description</a></li><li><a href="/wiki/Category:Short_description_is_different_from_Wikidata" title="Category:Short description is different from Wikidata">Short description is different from Wikidata</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on 1 November 2024, at 20:41<span class="anonymous-show"> (UTC)</span>.</li> <li id="footer-info-copyright">Text is available under the <a href="/wiki/Wikipedia:Text_of_the_Creative_Commons_Attribution-ShareAlike_4.0_International_License" title="Wikipedia:Text of the Creative Commons Attribution-ShareAlike 4.0 International License">Creative Commons Attribution-ShareAlike 4.0 License</a>; additional terms may apply. By using this site, you agree to the <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use" class="extiw" title="foundation:Special:MyLanguage/Policy:Terms of Use">Terms of Use</a> and <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy" class="extiw" title="foundation:Special:MyLanguage/Policy:Privacy policy">Privacy Policy</a>. Wikipedia® is a registered trademark of the <a rel="nofollow" class="external text" href="https://wikimediafoundation.org/">Wikimedia Foundation, Inc.</a>, a non-profit organization.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:About">About Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:General_disclaimer">Disclaimers</a></li> <li id="footer-places-contact"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact Wikipedia</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/en.wikipedia.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//en.m.wikipedia.org/w/index.php?title=Iverson_bracket&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-f69cdc8f6-qr4c8","wgBackendResponseTime":124,"wgPageParseReport":{"limitreport":{"cputime":"0.205","walltime":"0.357","ppvisitednodes":{"value":967,"limit":1000000},"postexpandincludesize":{"value":4961,"limit":2097152},"templateargumentsize":{"value":981,"limit":2097152},"expansiondepth":{"value":10,"limit":100},"expensivefunctioncount":{"value":1,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":8428,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 237.464 1 -total"," 42.70% 101.408 1 Template:Short_description"," 41.24% 97.937 1 Template:Reflist"," 31.32% 74.366 1 Template:Cite_book"," 21.17% 50.277 2 Template:Pagetype"," 16.64% 39.503 10 Template:Main_other"," 14.76% 35.042 1 Template:SDcat"," 7.65% 18.170 1 Template:Sfrac"," 3.74% 8.882 7 Template:Math"," 3.41% 8.094 1 Template:Webarchive"]},"scribunto":{"limitreport-timeusage":{"value":"0.091","limit":"10.000"},"limitreport-memusage":{"value":3516870,"limit":52428800}},"cachereport":{"origin":"mw-web.codfw.main-f69cdc8f6-bndbt","timestamp":"20241122144329","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"Iverson bracket","url":"https:\/\/en.wikipedia.org\/wiki\/Iverson_bracket","sameAs":"http:\/\/www.wikidata.org\/entity\/Q2114682","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q2114682","author":{"@type":"Organization","name":"Contributors to Wikimedia projects"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2005-04-11T00:09:46Z","dateModified":"2024-11-01T20:41:03Z","headline":"mathematical notation: [P] has the value 1 if P is true, and 0 if P is false"}</script> </body> </html>