CINXE.COM

Primitive recursive function - Wikipedia

<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-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-sticky-header-enabled vector-toc-available" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>Primitive recursive function - Wikipedia</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-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-sticky-header-enabled 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":"95377414-5894-463d-a931-fee666d9269a","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Primitive_recursive_function","wgTitle":"Primitive recursive function","wgCurRevisionId":1277541390,"wgRevisionId":1277541390,"wgArticleId":24829,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Articles with short description","Short description is different from Wikidata","All articles with unsourced statements","Articles with unsourced statements from January 2025","Computability theory","Theory of computation","Functions and mappings","Recursion"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Primitive_recursive_function","wgRelevantArticleId":24829,"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":40000,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q1570472","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.cite.styles":"ready","ext.math.styles":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","jquery.makeCollapsible.styles":"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","ext.scribunto.logs","site","mediawiki.page.ready","jquery.makeCollapsible","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.ReferenceTooltips","ext.gadget.switcher","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","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"];</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&amp;modules=ext.cite.styles%7Cext.math.styles%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cext.wikimediamessages.styles%7Cjquery.makeCollapsible.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&amp;only=styles&amp;skin=vector-2022"> <script async="" src="/w/load.php?lang=en&amp;modules=startup&amp;only=scripts&amp;raw=1&amp;skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=site.styles&amp;only=styles&amp;skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.18"> <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="Primitive recursive function - Wikipedia"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//en.m.wikipedia.org/wiki/Primitive_recursive_function"> <link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=Primitive_recursive_function&amp;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/Primitive_recursive_function"> <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&amp;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-Primitive_recursive_function rootpage-Primitive_recursive_function 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" title="Main menu" > <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><li id="n-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages"><span>Special pages</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&#039;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/?wmf_source=donate&amp;wmf_medium=sidebar&amp;wmf_campaign=en.wikipedia.org&amp;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&amp;returnto=Primitive+recursive+function" 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&amp;returnto=Primitive+recursive+function" title="You&#039;re encouraged to log in; however, it&#039;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/?wmf_source=donate&amp;wmf_medium=sidebar&amp;wmf_campaign=en.wikipedia.org&amp;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&amp;returnto=Primitive+recursive+function" 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&amp;returnto=Primitive+recursive+function" title="You&#039;re encouraged to log in; however, it&#039;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-Definition" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Definition"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Definition</span> </div> </a> <ul id="toc-Definition-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Examples" class="vector-toc-list-item vector-toc-level-1"> <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-Addition" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Addition"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.1</span> <span>Addition</span> </div> </a> <ul id="toc-Addition-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Doubling" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Doubling"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2</span> <span>Doubling</span> </div> </a> <ul id="toc-Doubling-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Multiplication" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Multiplication"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3</span> <span>Multiplication</span> </div> </a> <ul id="toc-Multiplication-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Predecessor" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Predecessor"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4</span> <span>Predecessor</span> </div> </a> <ul id="toc-Predecessor-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Truncated_subtraction" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Truncated_subtraction"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5</span> <span>Truncated subtraction</span> </div> </a> <ul id="toc-Truncated_subtraction-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Converting_predicates_to_numeric_functions" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Converting_predicates_to_numeric_functions"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.6</span> <span>Converting predicates to numeric functions</span> </div> </a> <ul id="toc-Converting_predicates_to_numeric_functions-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Predicate_&quot;Is_zero&quot;" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Predicate_&quot;Is_zero&quot;"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.7</span> <span>Predicate "Is zero"</span> </div> </a> <ul id="toc-Predicate_&quot;Is_zero&quot;-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Predicate_&quot;Less_or_equal&quot;" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Predicate_&quot;Less_or_equal&quot;"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.8</span> <span>Predicate "Less or equal"</span> </div> </a> <ul id="toc-Predicate_&quot;Less_or_equal&quot;-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Predicate_&quot;Greater_or_equal&quot;" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Predicate_&quot;Greater_or_equal&quot;"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.9</span> <span>Predicate "Greater or equal"</span> </div> </a> <ul id="toc-Predicate_&quot;Greater_or_equal&quot;-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-If-then-else" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#If-then-else"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.10</span> <span>If-then-else</span> </div> </a> <ul id="toc-If-then-else-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Junctors" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Junctors"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.11</span> <span>Junctors</span> </div> </a> <ul id="toc-Junctors-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Equality_predicate" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Equality_predicate"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.12</span> <span>Equality predicate</span> </div> </a> <ul id="toc-Equality_predicate-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Other_operations_on_natural_numbers" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Other_operations_on_natural_numbers"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.13</span> <span>Other operations on natural numbers</span> </div> </a> <ul id="toc-Other_operations_on_natural_numbers-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Operations_on_integers_and_rational_numbers" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Operations_on_integers_and_rational_numbers"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.14</span> <span>Operations on integers and rational numbers</span> </div> </a> <ul id="toc-Operations_on_integers_and_rational_numbers-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Some_common_primitive_recursive_functions" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Some_common_primitive_recursive_functions"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.15</span> <span>Some common primitive recursive functions</span> </div> </a> <ul id="toc-Some_common_primitive_recursive_functions-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Relationship_to_recursive_functions" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Relationship_to_recursive_functions"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>Relationship to recursive functions</span> </div> </a> <ul id="toc-Relationship_to_recursive_functions-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Limitations" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Limitations"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Limitations</span> </div> </a> <ul id="toc-Limitations-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Variants" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Variants"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>Variants</span> </div> </a> <button aria-controls="toc-Variants-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 Variants subsection</span> </button> <ul id="toc-Variants-sublist" class="vector-toc-list"> <li id="toc-Constant_functions" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Constant_functions"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.1</span> <span>Constant functions</span> </div> </a> <ul id="toc-Constant_functions-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Iterative_functions" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Iterative_functions"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.2</span> <span>Iterative functions</span> </div> </a> <ul id="toc-Iterative_functions-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Pure_recursion" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Pure_recursion"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.3</span> <span>Pure recursion</span> </div> </a> <ul id="toc-Pure_recursion-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Additional_primitive_recursive_forms" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Additional_primitive_recursive_forms"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.4</span> <span>Additional primitive recursive forms</span> </div> </a> <ul id="toc-Additional_primitive_recursive_forms-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Computer_language_definition" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Computer_language_definition"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.5</span> <span>Computer language definition</span> </div> </a> <ul id="toc-Computer_language_definition-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Finitism_and_consistency_results" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Finitism_and_consistency_results"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>Finitism and consistency results</span> </div> </a> <ul id="toc-Finitism_and_consistency_results-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-History" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#History"> <div class="vector-toc-text"> <span class="vector-toc-numb">7</span> <span>History</span> </div> </a> <ul id="toc-History-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-See_also" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#See_also"> <div class="vector-toc-text"> <span class="vector-toc-numb">8</span> <span>See also</span> </div> </a> <ul id="toc-See_also-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Notes" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Notes"> <div class="vector-toc-text"> <span class="vector-toc-numb">9</span> <span>Notes</span> </div> </a> <ul id="toc-Notes-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-References" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#References"> <div class="vector-toc-text"> <span class="vector-toc-numb">10</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" title="Table of Contents" > <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">Primitive recursive function</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 15 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-15" 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">15 languages</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikipedia.org/wiki/%D8%AF%D8%A7%D9%84%D8%A9_%D8%B9%D9%88%D8%AF%D9%8A%D8%A9_%D8%A8%D8%AF%D8%A7%D8%A6%D9%8A%D8%A9" title="دالة عودية بدائية – Arabic" lang="ar" hreflang="ar" data-title="دالة عودية بدائية" data-language-autonym="العربية" data-language-local-name="Arabic" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-ca mw-list-item"><a href="https://ca.wikipedia.org/wiki/Funcions_recursives_primitives" title="Funcions recursives primitives – Catalan" lang="ca" hreflang="ca" data-title="Funcions recursives primitives" data-language-autonym="Català" data-language-local-name="Catalan" class="interlanguage-link-target"><span>Català</span></a></li><li class="interlanguage-link interwiki-cs mw-list-item"><a href="https://cs.wikipedia.org/wiki/Primitivn%C4%9B_rekurzivn%C3%AD_funkce" title="Primitivně rekurzivní funkce – Czech" lang="cs" hreflang="cs" data-title="Primitivně rekurzivní funkce" data-language-autonym="Čeština" data-language-local-name="Czech" class="interlanguage-link-target"><span>Čeština</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/Primitiv-rekursive_Funktion" title="Primitiv-rekursive Funktion – German" lang="de" hreflang="de" data-title="Primitiv-rekursive Funktion" 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/Recursi%C3%B3n_primitiva" title="Recursión primitiva – Spanish" lang="es" hreflang="es" data-title="Recursión primitiva" 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/Fonction_r%C3%A9cursive_primitive" title="Fonction récursive primitive – French" lang="fr" hreflang="fr" data-title="Fonction récursive primitive" 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-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/%EC%9B%90%EC%8B%9C_%EC%9E%AC%EA%B7%80_%ED%95%A8%EC%88%98" 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/Funzione_ricorsiva_primitiva" title="Funzione ricorsiva primitiva – Italian" lang="it" hreflang="it" data-title="Funzione ricorsiva primitiva" 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%A4%D7%95%D7%A0%D7%A7%D7%A6%D7%99%D7%94_%D7%A4%D7%A8%D7%99%D7%9E%D7%99%D7%98%D7%99%D7%91%D7%99%D7%AA_%D7%A8%D7%A7%D7%95%D7%A8%D7%A1%D7%99%D7%91%D7%99%D7%AA" 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-nl mw-list-item"><a href="https://nl.wikipedia.org/wiki/Primitief_recursieve_functie" title="Primitief recursieve functie – Dutch" lang="nl" hreflang="nl" data-title="Primitief recursieve functie" data-language-autonym="Nederlands" data-language-local-name="Dutch" class="interlanguage-link-target"><span>Nederlands</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/%E5%8E%9F%E5%A7%8B%E5%86%8D%E5%B8%B0%E9%96%A2%E6%95%B0" 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-pt mw-list-item"><a href="https://pt.wikipedia.org/wiki/Fun%C3%A7%C3%A3o_recursiva_primitiva" title="Função recursiva primitiva – Portuguese" lang="pt" hreflang="pt" data-title="Função recursiva primitiva" 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-sr mw-list-item"><a href="https://sr.wikipedia.org/wiki/%D0%9F%D1%80%D0%B8%D0%BC%D0%B8%D1%82%D0%B8%D0%B2%D0%BD%D0%B0_%D1%80%D0%B5%D0%BA%D1%83%D1%80%D0%B7%D0%B8%D0%B2%D0%BD%D0%B0_%D1%84%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D1%98%D0%B0" title="Примитивна рекурзивна функција – Serbian" lang="sr" hreflang="sr" data-title="Примитивна рекурзивна функција" data-language-autonym="Српски / srpski" data-language-local-name="Serbian" class="interlanguage-link-target"><span>Српски / srpski</span></a></li><li class="interlanguage-link interwiki-uk badge-Q70894304 mw-list-item" title=""><a href="https://uk.wikipedia.org/wiki/%D0%9F%D1%80%D0%B8%D0%BC%D1%96%D1%82%D0%B8%D0%B2%D0%BD%D0%BE_%D1%80%D0%B5%D0%BA%D1%83%D1%80%D1%81%D0%B8%D0%B2%D0%BD%D0%B0_%D1%84%D1%83%D0%BD%D0%BA%D1%86%D1%96%D1%8F" 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/%E5%8E%9F%E5%A7%8B%E9%80%92%E5%BD%92%E5%87%BD%E6%95%B0" 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/Q1570472#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/Primitive_recursive_function" 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:Primitive_recursive_function" 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/Primitive_recursive_function"><span>Read</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Primitive_recursive_function&amp;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=Primitive_recursive_function&amp;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/Primitive_recursive_function"><span>Read</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Primitive_recursive_function&amp;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=Primitive_recursive_function&amp;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/Primitive_recursive_function" 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/Primitive_recursive_function" 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="//en.wikipedia.org/wiki/Wikipedia:File_Upload_Wizard" title="Upload files [u]" accesskey="u"><span>Upload file</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Primitive_recursive_function&amp;oldid=1277541390" 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=Primitive_recursive_function&amp;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&amp;page=Primitive_recursive_function&amp;id=1277541390&amp;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&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FPrimitive_recursive_function"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FPrimitive_recursive_function"><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&amp;page=Primitive_recursive_function&amp;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=Primitive_recursive_function&amp;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/Q1570472" 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">Function computable with bounded loops</div> <p> In <a href="/wiki/Computability_theory" title="Computability theory">computability theory</a>, a <b>primitive recursive function</b> is, roughly speaking, a function that can be computed by a <a href="/wiki/Computer_program" title="Computer program">computer program</a> whose <a href="/wiki/Loop_(programming)" class="mw-redirect" title="Loop (programming)">loops</a> are all <a href="/wiki/For_loop" title="For loop">"for" loops</a> (that is, an upper bound of the number of iterations of every loop is fixed before entering the loop). Primitive recursive functions form a strict <a href="/wiki/Subset" title="Subset">subset</a> of those <a href="/wiki/General_recursive_function" title="General recursive function">general recursive functions</a> that are also <a href="/wiki/Total_function" class="mw-redirect" title="Total function">total functions</a>. </p><p>The importance of primitive recursive functions lies in the fact that most <a href="/wiki/Computable_function" title="Computable function">computable functions</a> that are studied in <a href="/wiki/Number_theory" title="Number theory">number theory</a> (and more generally in mathematics) are primitive recursive. For example, <a href="/wiki/Addition" title="Addition">addition</a> and <a href="/wiki/Division_(mathematics)" title="Division (mathematics)">division</a>, the <a href="/wiki/Factorial" title="Factorial">factorial</a> and <a href="/wiki/Exponential_function" title="Exponential function">exponential function</a>, and the function which returns the <i>n</i>th prime are all primitive recursive.<sup id="cite_ref-FOOTNOTEBrainerdLandweber1974_1-0" class="reference"><a href="#cite_note-FOOTNOTEBrainerdLandweber1974-1"><span class="cite-bracket">&#91;</span>1<span class="cite-bracket">&#93;</span></a></sup> In fact, for showing that a computable function is primitive recursive, it suffices to show that its <a href="/wiki/Time_complexity" title="Time complexity">time complexity</a> is bounded above by a primitive recursive function of the input size.<sup id="cite_ref-FOOTNOTEHartmanis1989_2-0" class="reference"><a href="#cite_note-FOOTNOTEHartmanis1989-2"><span class="cite-bracket">&#91;</span>2<span class="cite-bracket">&#93;</span></a></sup> It is hence not particularly easy to devise a <a href="/wiki/Computable_function" title="Computable function">computable function</a> that is <i>not</i> primitive recursive; some examples are shown in section <a href="#Limitations">§&#160;Limitations</a> below. </p><p>The set of primitive recursive functions is known as <a href="/wiki/PR_(complexity)" title="PR (complexity)">PR</a> in <a href="/wiki/Computational_complexity_theory" title="Computational complexity theory">computational complexity theory</a>. </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="Definition">Definition</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=1" title="Edit section: Definition"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A primitive recursive function takes a fixed number of arguments, each a <a href="/wiki/Natural_number" title="Natural number">natural number</a> (nonnegative integer: {0, 1, 2, ...}), and returns a natural number. If it takes <i>n</i> arguments it is called <i>n</i>-<a href="/wiki/Arity" title="Arity">ary</a>. </p><p>The basic primitive recursive functions are given by these <a href="/wiki/Axiom" title="Axiom">axioms</a>: </p> <div><ol start="1"><li><i>Constant functions <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 C_{n}^{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msubsup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle C_{n}^{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9b088b67f00e4739e57c658ac7dd5913898013ac" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.887ex; height:2.843ex;" alt="{\displaystyle C_{n}^{k}}" /></span></i>: For each natural number <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> and every <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>, the <i>k</i>-ary constant function, defined by <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 C_{n}^{k}(x_{1},\ldots ,x_{k})\ {\stackrel {\mathrm {def} }{=}}\ n}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msubsup> <mo stretchy="false">(</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mtext>&#xa0;</mtext> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-REL"> <mover> <mrow class="MJX-TeXAtom-OP MJX-fixedlimits"> <mo>=</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">d</mi> <mi mathvariant="normal">e</mi> <mi mathvariant="normal">f</mi> </mrow> </mrow> </mover> </mrow> </mrow> <mtext>&#xa0;</mtext> <mi>n</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle C_{n}^{k}(x_{1},\ldots ,x_{k})\ {\stackrel {\mathrm {def} }{=}}\ n}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c37184786012801a8d6a2123ad2e2af0bd9f5e54" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:19.488ex; height:3.843ex;" alt="{\displaystyle C_{n}^{k}(x_{1},\ldots ,x_{k})\ {\stackrel {\mathrm {def} }{=}}\ n}" /></span>, is primitive recursive.</li><li><i>Successor function</i>: The 1-ary successor function <i>S</i>, which returns the successor of its argument (see <a href="/wiki/Peano_postulates" class="mw-redirect" title="Peano postulates">Peano postulates</a>), that is, <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 S(x)\ {\stackrel {\mathrm {def} }{=}}\ x+1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>S</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mtext>&#xa0;</mtext> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-REL"> <mover> <mrow class="MJX-TeXAtom-OP MJX-fixedlimits"> <mo>=</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">d</mi> <mi mathvariant="normal">e</mi> <mi mathvariant="normal">f</mi> </mrow> </mrow> </mover> </mrow> </mrow> <mtext>&#xa0;</mtext> <mi>x</mi> <mo>+</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle S(x)\ {\stackrel {\mathrm {def} }{=}}\ x+1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1e6968a6149cf34f1744866e54111df6e88b39ad" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:13.388ex; height:3.843ex;" alt="{\displaystyle S(x)\ {\stackrel {\mathrm {def} }{=}}\ x+1}" /></span>, is primitive recursive.</li><li><i>Projection functions</i> <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_{i}^{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msubsup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P_{i}^{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/361d716d235d131f6d22554b9b4797923c3be3c5" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:2.91ex; height:3.176ex;" alt="{\displaystyle P_{i}^{k}}" /></span>: For all natural numbers <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 i,k}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>i</mi> <mo>,</mo> <mi>k</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle i,k}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c3885ba48fa465d00556c235647088efbd248c26" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.048ex; height:2.509ex;" alt="{\displaystyle i,k}" /></span> such that <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 1\leq i\leq k}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>1</mn> <mo>&#x2264;<!-- ≤ --></mo> <mi>i</mi> <mo>&#x2264;<!-- ≤ --></mo> <mi>k</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 1\leq i\leq k}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/83de74da899efbafa01ec98ebf478e9ce5679fc6" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:9.373ex; height:2.343ex;" alt="{\displaystyle 1\leq i\leq k}" /></span>, the <i>k</i>-ary function defined by <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_{i}^{k}(x_{1},\ldots ,x_{k})\ {\stackrel {\mathrm {def} }{=}}\ x_{i}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msubsup> <mo stretchy="false">(</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mtext>&#xa0;</mtext> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-REL"> <mover> <mrow class="MJX-TeXAtom-OP MJX-fixedlimits"> <mo>=</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">d</mi> <mi mathvariant="normal">e</mi> <mi mathvariant="normal">f</mi> </mrow> </mrow> </mover> </mrow> </mrow> <mtext>&#xa0;</mtext> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P_{i}^{k}(x_{1},\ldots ,x_{k})\ {\stackrel {\mathrm {def} }{=}}\ x_{i}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6c61983e4beadbeeec6813f4cc01b6c2d92da367" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:20.246ex; height:4.009ex;" alt="{\displaystyle P_{i}^{k}(x_{1},\ldots ,x_{k})\ {\stackrel {\mathrm {def} }{=}}\ x_{i}}" /></span> is primitive recursive.</li></ol></div> <p>More complex primitive recursive functions can be obtained by applying the <a href="/wiki/Operation_(mathematics)" title="Operation (mathematics)">operations</a> given by these axioms: </p> <div><ol start="4"><li><i>Composition operator</i> <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 \circ \,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo>&#x2218;<!-- ∘ --></mo> <mspace width="thinmathspace"></mspace> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \circ \,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/307536c9e69fa4336e75b99e39243bd02d80f5fd" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.171ex; width:1.55ex; height:1.509ex;" alt="{\displaystyle \circ \,}" /></span> (also called the <i>substitution operator</i>): Given an <i>m</i>-ary function <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 h(x_{1},\ldots ,x_{m})\,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>h</mi> <mo stretchy="false">(</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mspace width="thinmathspace"></mspace> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle h(x_{1},\ldots ,x_{m})\,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/365d0558c7c9c47e4eaa64438fe7f22c5f1f659e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:14.102ex; height:2.843ex;" alt="{\displaystyle h(x_{1},\ldots ,x_{m})\,}" /></span> and <i>m</i> <i>k</i>-ary functions <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 g_{1}(x_{1},\ldots ,x_{k}),\ldots ,g_{m}(x_{1},\ldots ,x_{k})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>g</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo stretchy="false">(</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>g</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msub> <mo stretchy="false">(</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle g_{1}(x_{1},\ldots ,x_{k}),\ldots ,g_{m}(x_{1},\ldots ,x_{k})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d08afd5fedccb61860b7a7eadc6e41dd3bf6f5fb" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:33.705ex; height:2.843ex;" alt="{\displaystyle g_{1}(x_{1},\ldots ,x_{k}),\ldots ,g_{m}(x_{1},\ldots ,x_{k})}" /></span>: <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 h\circ (g_{1},\ldots ,g_{m})\ {\stackrel {\mathrm {def} }{=}}\ f,\quad {\text{where}}\quad f(x_{1},\ldots ,x_{k})=h(g_{1}(x_{1},\ldots ,x_{k}),\ldots ,g_{m}(x_{1},\ldots ,x_{k})).}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>h</mi> <mo>&#x2218;<!-- ∘ --></mo> <mo stretchy="false">(</mo> <msub> <mi>g</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>g</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mtext>&#xa0;</mtext> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-REL"> <mover> <mrow class="MJX-TeXAtom-OP MJX-fixedlimits"> <mo>=</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">d</mi> <mi mathvariant="normal">e</mi> <mi mathvariant="normal">f</mi> </mrow> </mrow> </mover> </mrow> </mrow> <mtext>&#xa0;</mtext> <mi>f</mi> <mo>,</mo> <mspace width="1em"></mspace> <mrow class="MJX-TeXAtom-ORD"> <mtext>where</mtext> </mrow> <mspace width="1em"></mspace> <mi>f</mi> <mo stretchy="false">(</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo>=</mo> <mi>h</mi> <mo stretchy="false">(</mo> <msub> <mi>g</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo stretchy="false">(</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>g</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msub> <mo stretchy="false">(</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle h\circ (g_{1},\ldots ,g_{m})\ {\stackrel {\mathrm {def} }{=}}\ f,\quad {\text{where}}\quad f(x_{1},\ldots ,x_{k})=h(g_{1}(x_{1},\ldots ,x_{k}),\ldots ,g_{m}(x_{1},\ldots ,x_{k})).}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2b56ce2defb5f290d0c486a18ceb62c586ef2835" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:85.457ex; height:3.843ex;" alt="{\displaystyle h\circ (g_{1},\ldots ,g_{m})\ {\stackrel {\mathrm {def} }{=}}\ f,\quad {\text{where}}\quad f(x_{1},\ldots ,x_{k})=h(g_{1}(x_{1},\ldots ,x_{k}),\ldots ,g_{m}(x_{1},\ldots ,x_{k})).}" /></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 m=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>m</mi> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle m=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b6100c5ebd48c6fd848709f2be624465203eb173" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:6.301ex; height:2.176ex;" alt="{\displaystyle m=1}" /></span>, the ordinary <a href="/wiki/Function_composition" title="Function composition">function composition</a> <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 h\circ g_{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>h</mi> <mo>&#x2218;<!-- ∘ --></mo> <msub> <mi>g</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle h\circ g_{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/bb4f759686bbd17331623bf5c5efb2b76188632e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.697ex; height:2.509ex;" alt="{\displaystyle h\circ g_{1}}" /></span> is obtained.</li><li><i>Primitive recursion operator</i> <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 \rho }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>&#x3c1;<!-- ρ --></mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \rho }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1f7d439671d1289b6a816e6af7a304be40608d64" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:1.202ex; height:2.176ex;" alt="{\displaystyle \rho }" /></span>: Given the <i>k</i>-ary function <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 g(x_{1},\ldots ,x_{k})\,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>g</mi> <mo stretchy="false">(</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mspace width="thinmathspace"></mspace> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle g(x_{1},\ldots ,x_{k})\,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/0a070f67fcfdb007cc3bb2afa075fc86722876da" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:13.293ex; height:2.843ex;" alt="{\displaystyle g(x_{1},\ldots ,x_{k})\,}" /></span> and the (<i>k</i>&#160;+&#160;2)-ary function <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 h(y,z,x_{1},\ldots ,x_{k})\,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>h</mi> <mo stretchy="false">(</mo> <mi>y</mi> <mo>,</mo> <mi>z</mi> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mspace width="thinmathspace"></mspace> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle h(y,z,x_{1},\ldots ,x_{k})\,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f7854e20a91c28109d5fcc4c6ba29477f01858d1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:17.827ex; height:2.843ex;" alt="{\displaystyle h(y,z,x_{1},\ldots ,x_{k})\,}" /></span>:<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}\rho (g,h)&amp;\ {\stackrel {\mathrm {def} }{=}}\ f,\quad {\text{where the }}(k+1){\text{-ary function }}f{\text{ is defined by}}\\f(0,x_{1},\ldots ,x_{k})&amp;=g(x_{1},\ldots ,x_{k})\\f(S(y),x_{1},\ldots ,x_{k})&amp;=h(y,f(y,x_{1},\ldots ,x_{k}),x_{1},\ldots ,x_{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> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <mi>g</mi> <mo>,</mo> <mi>h</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mtext>&#xa0;</mtext> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-REL"> <mover> <mrow class="MJX-TeXAtom-OP MJX-fixedlimits"> <mo>=</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">d</mi> <mi mathvariant="normal">e</mi> <mi mathvariant="normal">f</mi> </mrow> </mrow> </mover> </mrow> </mrow> <mtext>&#xa0;</mtext> <mi>f</mi> <mo>,</mo> <mspace width="1em"></mspace> <mrow class="MJX-TeXAtom-ORD"> <mtext>where the&#xa0;</mtext> </mrow> <mo stretchy="false">(</mo> <mi>k</mi> <mo>+</mo> <mn>1</mn> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mtext>-ary function&#xa0;</mtext> </mrow> <mi>f</mi> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;is defined by</mtext> </mrow> </mtd> </mtr> <mtr> <mtd> <mi>f</mi> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mi>g</mi> <mo stretchy="false">(</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd> <mi>f</mi> <mo stretchy="false">(</mo> <mi>S</mi> <mo stretchy="false">(</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mi>h</mi> <mo stretchy="false">(</mo> <mi>y</mi> <mo>,</mo> <mi>f</mi> <mo stretchy="false">(</mo> <mi>y</mi> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}\rho (g,h)&amp;\ {\stackrel {\mathrm {def} }{=}}\ f,\quad {\text{where the }}(k+1){\text{-ary function }}f{\text{ is defined by}}\\f(0,x_{1},\ldots ,x_{k})&amp;=g(x_{1},\ldots ,x_{k})\\f(S(y),x_{1},\ldots ,x_{k})&amp;=h(y,f(y,x_{1},\ldots ,x_{k}),x_{1},\ldots ,x_{k}).\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d7b32f8e00da5e01bd8aabe24001166e4137feeb" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -4.505ex; width:72.709ex; height:10.176ex;" alt="{\displaystyle {\begin{aligned}\rho (g,h)&amp;\ {\stackrel {\mathrm {def} }{=}}\ f,\quad {\text{where the }}(k+1){\text{-ary function }}f{\text{ is defined by}}\\f(0,x_{1},\ldots ,x_{k})&amp;=g(x_{1},\ldots ,x_{k})\\f(S(y),x_{1},\ldots ,x_{k})&amp;=h(y,f(y,x_{1},\ldots ,x_{k}),x_{1},\ldots ,x_{k}).\end{aligned}}}" /></span> <p><i>Interpretation:</i> </p> The function <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}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>f</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle f}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/132e57acb643253e7810ee9702d9581f159a1c61" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.279ex; height:2.509ex;" alt="{\displaystyle f}" /></span> acts as a <a href="/wiki/For_loop" title="For loop">for-loop</a> from <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}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2aae8864a3c1fec9585261791a809ddec1489950" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.162ex; height:2.176ex;" alt="{\displaystyle 0}" /></span> up to the value of its first argument. The rest of the arguments 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 f}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>f</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle f}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/132e57acb643253e7810ee9702d9581f159a1c61" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.279ex; height:2.509ex;" alt="{\displaystyle f}" /></span>, denoted here with <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_{1},\ldots ,x_{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x_{1},\ldots ,x_{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/00a6511886c686290cc57b23ab22f45fda9e1c12" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:9.981ex; height:2.009ex;" alt="{\displaystyle x_{1},\ldots ,x_{k}}" /></span>, are a set of initial conditions for the for-loop which may be used by it during calculations but which are immutable by it. The functions <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 g}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>g</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle g}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d3556280e66fe2c0d0140df20935a6f057381d77" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.116ex; height:2.009ex;" alt="{\displaystyle g}" /></span> 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 h}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>h</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle h}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b26be3e694314bc90c3215047e4a2010c6ee184a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.339ex; height:2.176ex;" alt="{\displaystyle h}" /></span> on the right-hand side of the equations that define <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}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>f</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle f}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/132e57acb643253e7810ee9702d9581f159a1c61" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.279ex; height:2.509ex;" alt="{\displaystyle f}" /></span> represent the body of the loop, which performs calculations. The function <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 g}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>g</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle g}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d3556280e66fe2c0d0140df20935a6f057381d77" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.116ex; height:2.009ex;" alt="{\displaystyle g}" /></span> is used only once to perform initial calculations. Calculations for subsequent steps of the loop are performed by <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 h}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>h</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle h}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b26be3e694314bc90c3215047e4a2010c6ee184a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.339ex; height:2.176ex;" alt="{\displaystyle h}" /></span>. The first parameter of <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 h}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>h</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle h}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b26be3e694314bc90c3215047e4a2010c6ee184a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.339ex; height:2.176ex;" alt="{\displaystyle h}" /></span> is fed the "current" value of the for-loop's index. The second parameter of <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 h}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>h</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle h}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b26be3e694314bc90c3215047e4a2010c6ee184a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.339ex; height:2.176ex;" alt="{\displaystyle h}" /></span> is fed the result of the for-loop's previous calculations, from previous steps. The rest of the parameters 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 h}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>h</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle h}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b26be3e694314bc90c3215047e4a2010c6ee184a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.339ex; height:2.176ex;" alt="{\displaystyle h}" /></span> are those immutable initial conditions for the for-loop mentioned earlier. They may be used by <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 h}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>h</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle h}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b26be3e694314bc90c3215047e4a2010c6ee184a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.339ex; height:2.176ex;" alt="{\displaystyle h}" /></span> to perform calculations but they will not themselves be altered by <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 h}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>h</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle h}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b26be3e694314bc90c3215047e4a2010c6ee184a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.339ex; height:2.176ex;" alt="{\displaystyle h}" /></span>.</li></ol></div> <p>The <b>primitive recursive functions</b> are the basic functions and those obtained from the basic functions by applying these operations a finite number of times. </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=Primitive_recursive_function&amp;action=edit&amp;section=2" title="Edit section: Examples"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div><ul><li><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 C_{0}^{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle C_{0}^{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d9f73107cfc3d7b29e540b3b7b6c5d070b56faf0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:2.852ex; height:3.176ex;" alt="{\displaystyle C_{0}^{1}}" /></span> is a 1-ary function which returns <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}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2aae8864a3c1fec9585261791a809ddec1489950" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.162ex; height:2.176ex;" alt="{\displaystyle 0}" /></span> for every input: <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 C_{0}^{1}(x)=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle C_{0}^{1}(x)=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/70f2b2de034a6d0ad3674a805148b0c3407de4ff" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:10.252ex; height:3.176ex;" alt="{\displaystyle C_{0}^{1}(x)=0}" /></span>.</li><li><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 C_{1}^{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle C_{1}^{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/19ff89472a2f5860873c8ed7e2c325e0127af9c6" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:2.852ex; height:3.176ex;" alt="{\displaystyle C_{1}^{1}}" /></span> is a 1-ary function which returns <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 1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/92d98b82a3778f043108d4e20960a9193df57cbf" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.162ex; height:2.176ex;" alt="{\displaystyle 1}" /></span> for every input: <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 C_{1}^{1}(x)=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle C_{1}^{1}(x)=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5d1eaa922c1a06cecfb0d90ebaecb6d66868f8d6" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:10.252ex; height:3.176ex;" alt="{\displaystyle C_{1}^{1}(x)=1}" /></span>.</li><li><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 C_{3}^{0}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msubsup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle C_{3}^{0}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4ba04f077557a4244b523d33ad7ffeb9ed911444" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:2.852ex; height:3.176ex;" alt="{\displaystyle C_{3}^{0}}" /></span> is a 0-ary function, i.e. a constant: <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 C_{3}^{0}=3}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msubsup> <mo>=</mo> <mn>3</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle C_{3}^{0}=3}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/065a00293795724443500bca36da88d57d0cbc59" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:7.113ex; height:3.176ex;" alt="{\displaystyle C_{3}^{0}=3}" /></span>.</li><li><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_{1}^{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P_{1}^{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/cf986b1a355d299b662f53917ebff839f24c38fd" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:2.876ex; height:3.176ex;" alt="{\displaystyle P_{1}^{1}}" /></span> is the identity function on the natural numbers: <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_{1}^{1}(x)=x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P_{1}^{1}(x)=x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/709354ab58433129309ead618819747c52e0ac80" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:10.443ex; height:3.176ex;" alt="{\displaystyle P_{1}^{1}(x)=x}" /></span>.</li><li><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_{1}^{2}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P_{1}^{2}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/bd897d977403f9d802ce876f067f84a5959ad8ff" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:2.876ex; height:3.176ex;" alt="{\displaystyle P_{1}^{2}}" /></span> 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_{2}^{2}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P_{2}^{2}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6bd701a007b58e3547ee212141fba8cdf4994256" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:2.876ex; height:3.176ex;" alt="{\displaystyle P_{2}^{2}}" /></span> is the left and right projection on natural number pairs, respectively: <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_{1}^{2}(x,y)=x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P_{1}^{2}(x,y)=x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/133f9cf4088eec019ee2515470e9c086dcbe5de9" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:12.632ex; height:3.176ex;" alt="{\displaystyle P_{1}^{2}(x,y)=x}" /></span> 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_{2}^{2}(x,y)=y}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>y</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P_{2}^{2}(x,y)=y}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/500493659d5cf4628765cdf6be9b04140502b8ac" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:12.458ex; height:3.176ex;" alt="{\displaystyle P_{2}^{2}(x,y)=y}" /></span>.</li><li><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 S\circ S}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>S</mi> <mo>&#x2218;<!-- ∘ --></mo> <mi>S</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle S\circ S}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ce4de5e9fb4ac348e94f52ab7a8ff07dd1539b8a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.193ex; height:2.176ex;" alt="{\displaystyle S\circ S}" /></span> is a 1-ary function that adds 2 to its input, <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 (S\circ S)(x)=x+2}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>S</mi> <mo>&#x2218;<!-- ∘ --></mo> <mi>S</mi> <mo stretchy="false">)</mo> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>x</mi> <mo>+</mo> <mn>2</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (S\circ S)(x)=x+2}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/db896b4ed0755ce57dbebb8473b1deda53e83d08" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:18.572ex; height:2.843ex;" alt="{\displaystyle (S\circ S)(x)=x+2}" /></span>.</li><li><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 S\circ C_{0}^{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>S</mi> <mo>&#x2218;<!-- ∘ --></mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle S\circ C_{0}^{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f84a6549323e3daa820e437c76f635d7f248d896" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:6.546ex; height:3.176ex;" alt="{\displaystyle S\circ C_{0}^{1}}" /></span> is a 1-ary function which returns 1 for every input: <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 (S\circ C_{0}^{1})(x)=S(C_{0}^{1}(x))=S(0)=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>S</mi> <mo>&#x2218;<!-- ∘ --></mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>S</mi> <mo stretchy="false">(</mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> <mo>=</mo> <mi>S</mi> <mo stretchy="false">(</mo> <mn>0</mn> <mo stretchy="false">)</mo> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (S\circ C_{0}^{1})(x)=S(C_{0}^{1}(x))=S(0)=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d54c4fc5e62998cc9d6364aef5bed6f56336ffcc" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:35.723ex; height:3.176ex;" alt="{\displaystyle (S\circ C_{0}^{1})(x)=S(C_{0}^{1}(x))=S(0)=1}" /></span>. That is, <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 S\circ C_{0}^{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>S</mi> <mo>&#x2218;<!-- ∘ --></mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle S\circ C_{0}^{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f84a6549323e3daa820e437c76f635d7f248d896" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:6.546ex; height:3.176ex;" alt="{\displaystyle S\circ C_{0}^{1}}" /></span> 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 C_{1}^{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle C_{1}^{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/19ff89472a2f5860873c8ed7e2c325e0127af9c6" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:2.852ex; height:3.176ex;" alt="{\displaystyle C_{1}^{1}}" /></span> are the same function: <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 S\circ C_{0}^{1}=C_{1}^{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>S</mi> <mo>&#x2218;<!-- ∘ --></mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo>=</mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle S\circ C_{0}^{1}=C_{1}^{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/664b3ebca2a05c0016664a661a0355393c471093" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:12.496ex; height:3.176ex;" alt="{\displaystyle S\circ C_{0}^{1}=C_{1}^{1}}" /></span>. In a similar way, every <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 C_{n}^{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msubsup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle C_{n}^{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9b088b67f00e4739e57c658ac7dd5913898013ac" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.887ex; height:2.843ex;" alt="{\displaystyle C_{n}^{k}}" /></span> can be expressed as a composition of appropriately many <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 S}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>S</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle S}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4611d85173cd3b508e67077d4a1252c9c05abca2" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.499ex; height:2.176ex;" alt="{\displaystyle S}" /></span> 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 C_{0}^{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msubsup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle C_{0}^{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/aa83360fbe63e63b0358e32e5743253712b59d32" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:2.887ex; height:3.176ex;" alt="{\displaystyle C_{0}^{k}}" /></span>. Moreover, <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 C_{0}^{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msubsup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle C_{0}^{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/aa83360fbe63e63b0358e32e5743253712b59d32" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:2.887ex; height:3.176ex;" alt="{\displaystyle C_{0}^{k}}" /></span> equals <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 C_{0}^{1}\circ P_{1}^{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo>&#x2218;<!-- ∘ --></mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msubsup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle C_{0}^{1}\circ P_{1}^{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3a87bdaa04962d39f997c97769cfdc008869776d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:7.957ex; height:3.176ex;" alt="{\displaystyle C_{0}^{1}\circ P_{1}^{k}}" /></span>, since <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 C_{0}^{k}(x_{1},\ldots ,x_{k})=0=C_{0}^{1}(x_{1})=C_{0}^{1}(P_{1}^{k}(x_{1},\ldots ,x_{k}))=(C_{0}^{1}\circ P_{1}^{k})(x_{1},\ldots ,x_{k})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msubsup> <mo stretchy="false">(</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo>=</mo> <mn>0</mn> <mo>=</mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo stretchy="false">(</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo stretchy="false">)</mo> <mo>=</mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo stretchy="false">(</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msubsup> <mo stretchy="false">(</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> <mo>=</mo> <mo stretchy="false">(</mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo>&#x2218;<!-- ∘ --></mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msubsup> <mo stretchy="false">)</mo> <mo stretchy="false">(</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle C_{0}^{k}(x_{1},\ldots ,x_{k})=0=C_{0}^{1}(x_{1})=C_{0}^{1}(P_{1}^{k}(x_{1},\ldots ,x_{k}))=(C_{0}^{1}\circ P_{1}^{k})(x_{1},\ldots ,x_{k})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e09ba19f0578b664b4de20672d6996071d85adf8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:76.195ex; height:3.176ex;" alt="{\displaystyle C_{0}^{k}(x_{1},\ldots ,x_{k})=0=C_{0}^{1}(x_{1})=C_{0}^{1}(P_{1}^{k}(x_{1},\ldots ,x_{k}))=(C_{0}^{1}\circ P_{1}^{k})(x_{1},\ldots ,x_{k})}" /></span>. For these reasons, some authors<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">&#91;</span>3<span class="cite-bracket">&#93;</span></a></sup> define <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 C_{n}^{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msubsup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle C_{n}^{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9b088b67f00e4739e57c658ac7dd5913898013ac" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.887ex; height:2.843ex;" alt="{\displaystyle C_{n}^{k}}" /></span> only 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 n=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/26819344e55f5e671c76c07c18eb4291fcec85ae" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.656ex; height:2.176ex;" alt="{\displaystyle n=0}" /></span> 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 k=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle k=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6c035ffa69b5bca8bf2d16c3da3aaad79a8bcbfa" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.472ex; height:2.176ex;" alt="{\displaystyle k=1}" /></span>.</li></ul></div> <div class="mw-heading mw-heading3"><h3 id="Addition">Addition</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=3" title="Edit section: Addition"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A definition of the 2-ary function <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 Add}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>A</mi> <mi>d</mi> <mi>d</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Add}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8123fd1136a666d741f090c10185d254d88df8e7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:4.175ex; height:2.176ex;" alt="{\displaystyle Add}" /></span>, to compute the sum of its arguments, can be obtained using the primitive recursion operator <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 \rho }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>&#x3c1;<!-- ρ --></mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \rho }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1f7d439671d1289b6a816e6af7a304be40608d64" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:1.202ex; height:2.176ex;" alt="{\displaystyle \rho }" /></span>. To this end, the well-known equations </p> <dl><dd><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 {\begin{array}{rcll}0+y&amp;=&amp;y&amp;{\text{ and}}\\S(x)+y&amp;=&amp;S(x+y)&amp;.\\\end{array}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right center left left" rowspacing="4pt" columnspacing="1em"> <mtr> <mtd> <mn>0</mn> <mo>+</mo> <mi>y</mi> </mtd> <mtd> <mo>=</mo> </mtd> <mtd> <mi>y</mi> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;and</mtext> </mrow> </mtd> </mtr> <mtr> <mtd> <mi>S</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>+</mo> <mi>y</mi> </mtd> <mtd> <mo>=</mo> </mtd> <mtd> <mi>S</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo>+</mo> <mi>y</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{array}{rcll}0+y&amp;=&amp;y&amp;{\text{ and}}\\S(x)+y&amp;=&amp;S(x+y)&amp;.\\\end{array}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f44eb64b90d4b117d36f6e3c28ce5ac73dcae7d4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:31.124ex; height:6.176ex;" alt="{\displaystyle {\begin{array}{rcll}0+y&amp;=&amp;y&amp;{\text{ and}}\\S(x)+y&amp;=&amp;S(x+y)&amp;.\\\end{array}}}" /></span></dd></dl> <p>are "rephrased in primitive recursive function terminology": In the definition of <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 \rho (g,h)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <mi>g</mi> <mo>,</mo> <mi>h</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \rho (g,h)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/415c8a701049b2fa80d00659d846f5012f91073a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.5ex; height:2.843ex;" alt="{\displaystyle \rho (g,h)}" /></span>, the first equation suggests to choose <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 g=P_{1}^{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>g</mi> <mo>=</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle g=P_{1}^{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/cbfd76dea051eb2bdef3362d67bba463bf9c5d5d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:7.09ex; height:3.176ex;" alt="{\displaystyle g=P_{1}^{1}}" /></span> to obtain <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 Add(0,y)=g(y)=y}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>A</mi> <mi>d</mi> <mi>d</mi> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>g</mi> <mo stretchy="false">(</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>y</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Add(0,y)=g(y)=y}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a35752e62d307f3c757b61b0bb602966fb8ef1fe" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:20.769ex; height:2.843ex;" alt="{\displaystyle Add(0,y)=g(y)=y}" /></span>; the second equation suggests to choose <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 h=S\circ P_{2}^{3}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>h</mi> <mo>=</mo> <mi>S</mi> <mo>&#x2218;<!-- ∘ --></mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msubsup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle h=S\circ P_{2}^{3}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/7d694158c20ad11cd6f239a7bfc2aec42ef053f9" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:11.007ex; height:3.176ex;" alt="{\displaystyle h=S\circ P_{2}^{3}}" /></span> to obtain <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 Add(S(x),y)=h(x,Add(x,y),y)=(S\circ P_{2}^{3})(x,Add(x,y),y)=S(Add(x,y))}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>A</mi> <mi>d</mi> <mi>d</mi> <mo stretchy="false">(</mo> <mi>S</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>,</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>h</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mi>A</mi> <mi>d</mi> <mi>d</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> <mo>=</mo> <mo stretchy="false">(</mo> <mi>S</mi> <mo>&#x2218;<!-- ∘ --></mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mi>A</mi> <mi>d</mi> <mi>d</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> <mo>=</mo> <mi>S</mi> <mo stretchy="false">(</mo> <mi>A</mi> <mi>d</mi> <mi>d</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Add(S(x),y)=h(x,Add(x,y),y)=(S\circ P_{2}^{3})(x,Add(x,y),y)=S(Add(x,y))}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4e8e8a0108a6cda837c762f42776c4945262c145" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:76.368ex; height:3.176ex;" alt="{\displaystyle Add(S(x),y)=h(x,Add(x,y),y)=(S\circ P_{2}^{3})(x,Add(x,y),y)=S(Add(x,y))}" /></span>. Therefore, the addition function can be defined 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 Add=\rho (P_{1}^{1},S\circ P_{2}^{3})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>A</mi> <mi>d</mi> <mi>d</mi> <mo>=</mo> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo>,</mo> <mi>S</mi> <mo>&#x2218;<!-- ∘ --></mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Add=\rho (P_{1}^{1},S\circ P_{2}^{3})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c90a3ac70eb3a50bb02046a775816d9ce7133dbe" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:20.764ex; height:3.176ex;" alt="{\displaystyle Add=\rho (P_{1}^{1},S\circ P_{2}^{3})}" /></span>. As a computation example, </p> <dl><dd><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 {\begin{array}{lll}&amp;Add(1,7)\\=&amp;\rho (P_{1}^{1},S\circ P_{2}^{3})\;(S(0),7)&amp;{\text{ by Def. }}Add,S\\=&amp;(S\circ P_{2}^{3})(0,Add(0,7),7)&amp;{\text{ by case }}\rho (g,h)\;(S(...),...)\\=&amp;S(Add(0,7))&amp;{\text{ by Def. }}\circ ,P_{2}^{3}\\=&amp;S(\;\rho (P_{1}^{1},S\circ P_{2}^{3})\;(0,7)\;)&amp;{\text{ by Def. }}Add\\=&amp;S(P_{1}^{1}(7))&amp;{\text{ by case }}\rho (g,h)\;(0,...)\\=&amp;S(7)&amp;{\text{ by Def. }}P_{1}^{1}\\=&amp;8&amp;{\text{ by Def. }}S.\\\end{array}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="left left left" rowspacing="4pt" columnspacing="1em"> <mtr> <mtd></mtd> <mtd> <mi>A</mi> <mi>d</mi> <mi>d</mi> <mo stretchy="false">(</mo> <mn>1</mn> <mo>,</mo> <mn>7</mn> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo>,</mo> <mi>S</mi> <mo>&#x2218;<!-- ∘ --></mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> <mspace width="thickmathspace"></mspace> <mo stretchy="false">(</mo> <mi>S</mi> <mo stretchy="false">(</mo> <mn>0</mn> <mo stretchy="false">)</mo> <mo>,</mo> <mn>7</mn> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by Def.&#xa0;</mtext> </mrow> <mi>A</mi> <mi>d</mi> <mi>d</mi> <mo>,</mo> <mi>S</mi> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mo stretchy="false">(</mo> <mi>S</mi> <mo>&#x2218;<!-- ∘ --></mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mi>A</mi> <mi>d</mi> <mi>d</mi> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mn>7</mn> <mo stretchy="false">)</mo> <mo>,</mo> <mn>7</mn> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by case&#xa0;</mtext> </mrow> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <mi>g</mi> <mo>,</mo> <mi>h</mi> <mo stretchy="false">)</mo> <mspace width="thickmathspace"></mspace> <mo stretchy="false">(</mo> <mi>S</mi> <mo stretchy="false">(</mo> <mo>.</mo> <mo>.</mo> <mo>.</mo> <mo stretchy="false">)</mo> <mo>,</mo> <mo>.</mo> <mo>.</mo> <mo>.</mo> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mi>S</mi> <mo stretchy="false">(</mo> <mi>A</mi> <mi>d</mi> <mi>d</mi> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mn>7</mn> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by Def.&#xa0;</mtext> </mrow> <mo>&#x2218;<!-- ∘ --></mo> <mo>,</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msubsup> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mi>S</mi> <mo stretchy="false">(</mo> <mspace width="thickmathspace"></mspace> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo>,</mo> <mi>S</mi> <mo>&#x2218;<!-- ∘ --></mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> <mspace width="thickmathspace"></mspace> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mn>7</mn> <mo stretchy="false">)</mo> <mspace width="thickmathspace"></mspace> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by Def.&#xa0;</mtext> </mrow> <mi>A</mi> <mi>d</mi> <mi>d</mi> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mi>S</mi> <mo stretchy="false">(</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo stretchy="false">(</mo> <mn>7</mn> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by case&#xa0;</mtext> </mrow> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <mi>g</mi> <mo>,</mo> <mi>h</mi> <mo stretchy="false">)</mo> <mspace width="thickmathspace"></mspace> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mo>.</mo> <mo>.</mo> <mo>.</mo> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mi>S</mi> <mo stretchy="false">(</mo> <mn>7</mn> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by Def.&#xa0;</mtext> </mrow> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mn>8</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by Def.&#xa0;</mtext> </mrow> <mi>S</mi> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{array}{lll}&amp;Add(1,7)\\=&amp;\rho (P_{1}^{1},S\circ P_{2}^{3})\;(S(0),7)&amp;{\text{ by Def. }}Add,S\\=&amp;(S\circ P_{2}^{3})(0,Add(0,7),7)&amp;{\text{ by case }}\rho (g,h)\;(S(...),...)\\=&amp;S(Add(0,7))&amp;{\text{ by Def. }}\circ ,P_{2}^{3}\\=&amp;S(\;\rho (P_{1}^{1},S\circ P_{2}^{3})\;(0,7)\;)&amp;{\text{ by Def. }}Add\\=&amp;S(P_{1}^{1}(7))&amp;{\text{ by case }}\rho (g,h)\;(0,...)\\=&amp;S(7)&amp;{\text{ by Def. }}P_{1}^{1}\\=&amp;8&amp;{\text{ by Def. }}S.\\\end{array}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d0e2f76d98cbe4d77277264533f14ba1fc2e88f4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -12.964ex; margin-bottom: -0.207ex; width:59.035ex; height:27.509ex;" alt="{\displaystyle {\begin{array}{lll}&amp;Add(1,7)\\=&amp;\rho (P_{1}^{1},S\circ P_{2}^{3})\;(S(0),7)&amp;{\text{ by Def. }}Add,S\\=&amp;(S\circ P_{2}^{3})(0,Add(0,7),7)&amp;{\text{ by case }}\rho (g,h)\;(S(...),...)\\=&amp;S(Add(0,7))&amp;{\text{ by Def. }}\circ ,P_{2}^{3}\\=&amp;S(\;\rho (P_{1}^{1},S\circ P_{2}^{3})\;(0,7)\;)&amp;{\text{ by Def. }}Add\\=&amp;S(P_{1}^{1}(7))&amp;{\text{ by case }}\rho (g,h)\;(0,...)\\=&amp;S(7)&amp;{\text{ by Def. }}P_{1}^{1}\\=&amp;8&amp;{\text{ by Def. }}S.\\\end{array}}}" /></span></dd></dl> <div class="mw-heading mw-heading3"><h3 id="Doubling">Doubling</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=4" title="Edit section: Doubling"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Given <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 Add}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>A</mi> <mi>d</mi> <mi>d</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Add}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8123fd1136a666d741f090c10185d254d88df8e7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:4.175ex; height:2.176ex;" alt="{\displaystyle Add}" /></span>, the 1-ary function <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 Add\circ (P_{1}^{1},P_{1}^{1})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>A</mi> <mi>d</mi> <mi>d</mi> <mo>&#x2218;<!-- ∘ --></mo> <mo stretchy="false">(</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Add\circ (P_{1}^{1},P_{1}^{1})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b9345d0dcbc7e5bdc72dfb442069d7ffe5bcb934" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:14.964ex; height:3.176ex;" alt="{\displaystyle Add\circ (P_{1}^{1},P_{1}^{1})}" /></span> doubles its argument, <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 (Add\circ (P_{1}^{1},P_{1}^{1}))(x)=Add(x,x)=x+x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>A</mi> <mi>d</mi> <mi>d</mi> <mo>&#x2218;<!-- ∘ --></mo> <mo stretchy="false">(</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>A</mi> <mi>d</mi> <mi>d</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>x</mi> <mo>+</mo> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (Add\circ (P_{1}^{1},P_{1}^{1}))(x)=Add(x,x)=x+x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e430c8457e5e010d6e6b3c2c520062ebf535dc31" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:41.287ex; height:3.176ex;" alt="{\displaystyle (Add\circ (P_{1}^{1},P_{1}^{1}))(x)=Add(x,x)=x+x}" /></span>. </p> <div class="mw-heading mw-heading3"><h3 id="Multiplication">Multiplication</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=5" title="Edit section: Multiplication"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In a similar way as addition, multiplication can be defined by <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 Mul=\rho (C_{0}^{1},Add\circ (P_{2}^{3},P_{3}^{3}))}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>M</mi> <mi>u</mi> <mi>l</mi> <mo>=</mo> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo>,</mo> <mi>A</mi> <mi>d</mi> <mi>d</mi> <mo>&#x2218;<!-- ∘ --></mo> <mo stretchy="false">(</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Mul=\rho (C_{0}^{1},Add\circ (P_{2}^{3},P_{3}^{3}))}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/abf2746ec392c9baaa9c0f2555214455baae6103" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:29.425ex; height:3.176ex;" alt="{\displaystyle Mul=\rho (C_{0}^{1},Add\circ (P_{2}^{3},P_{3}^{3}))}" /></span>. This reproduces the well-known multiplication equations: </p> <dl><dd><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 {\begin{array}{lll}&amp;Mul(0,y)\\=&amp;\rho (C_{0}^{1},Add\circ (P_{2}^{3},P_{3}^{3}))\;(0,y)&amp;{\text{ by Def. }}Mul\\=&amp;C_{0}^{1}(y)&amp;{\text{ by case }}\rho (g,h)\;(0,...)\\=&amp;0&amp;{\text{ by Def. }}C_{0}^{1}.\\\end{array}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="left left left" rowspacing="4pt" columnspacing="1em"> <mtr> <mtd></mtd> <mtd> <mi>M</mi> <mi>u</mi> <mi>l</mi> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mi>y</mi> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo>,</mo> <mi>A</mi> <mi>d</mi> <mi>d</mi> <mo>&#x2218;<!-- ∘ --></mo> <mo stretchy="false">(</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> <mspace width="thickmathspace"></mspace> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mi>y</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by Def.&#xa0;</mtext> </mrow> <mi>M</mi> <mi>u</mi> <mi>l</mi> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo stretchy="false">(</mo> <mi>y</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by case&#xa0;</mtext> </mrow> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <mi>g</mi> <mo>,</mo> <mi>h</mi> <mo stretchy="false">)</mo> <mspace width="thickmathspace"></mspace> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mo>.</mo> <mo>.</mo> <mo>.</mo> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mn>0</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by Def.&#xa0;</mtext> </mrow> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{array}{lll}&amp;Mul(0,y)\\=&amp;\rho (C_{0}^{1},Add\circ (P_{2}^{3},P_{3}^{3}))\;(0,y)&amp;{\text{ by Def. }}Mul\\=&amp;C_{0}^{1}(y)&amp;{\text{ by case }}\rho (g,h)\;(0,...)\\=&amp;0&amp;{\text{ by Def. }}C_{0}^{1}.\\\end{array}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6bba8f7fb4ba0698d6ed10c43e1edf2245bd9d6d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -6.338ex; width:57.531ex; height:13.843ex;" alt="{\displaystyle {\begin{array}{lll}&amp;Mul(0,y)\\=&amp;\rho (C_{0}^{1},Add\circ (P_{2}^{3},P_{3}^{3}))\;(0,y)&amp;{\text{ by Def. }}Mul\\=&amp;C_{0}^{1}(y)&amp;{\text{ by case }}\rho (g,h)\;(0,...)\\=&amp;0&amp;{\text{ by Def. }}C_{0}^{1}.\\\end{array}}}" /></span></dd></dl> <p>and </p> <dl><dd><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 {\begin{array}{lll}&amp;Mul(S(x),y)\\=&amp;\rho (C_{0}^{1},Add\circ (P_{2}^{3},P_{3}^{3}))\;(S(x),y)&amp;{\text{ by Def. }}Mul\\=&amp;(Add\circ (P_{2}^{3},P_{3}^{3}))\;(x,Mul(x,y),y)&amp;{\text{ by case }}\rho (g,h)\;(S(...),...)\\=&amp;Add(Mul(x,y),y)&amp;{\text{ by Def. }}\circ ,P_{2}^{3},P_{3}^{3}\\=&amp;Mul(x,y)+y&amp;{\text{ by property of }}Add.\\\end{array}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="left left left" rowspacing="4pt" columnspacing="1em"> <mtr> <mtd></mtd> <mtd> <mi>M</mi> <mi>u</mi> <mi>l</mi> <mo stretchy="false">(</mo> <mi>S</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>,</mo> <mi>y</mi> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo>,</mo> <mi>A</mi> <mi>d</mi> <mi>d</mi> <mo>&#x2218;<!-- ∘ --></mo> <mo stretchy="false">(</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> <mspace width="thickmathspace"></mspace> <mo stretchy="false">(</mo> <mi>S</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>,</mo> <mi>y</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by Def.&#xa0;</mtext> </mrow> <mi>M</mi> <mi>u</mi> <mi>l</mi> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mo stretchy="false">(</mo> <mi>A</mi> <mi>d</mi> <mi>d</mi> <mo>&#x2218;<!-- ∘ --></mo> <mo stretchy="false">(</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> <mspace width="thickmathspace"></mspace> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mi>M</mi> <mi>u</mi> <mi>l</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> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by case&#xa0;</mtext> </mrow> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <mi>g</mi> <mo>,</mo> <mi>h</mi> <mo stretchy="false">)</mo> <mspace width="thickmathspace"></mspace> <mo stretchy="false">(</mo> <mi>S</mi> <mo stretchy="false">(</mo> <mo>.</mo> <mo>.</mo> <mo>.</mo> <mo stretchy="false">)</mo> <mo>,</mo> <mo>.</mo> <mo>.</mo> <mo>.</mo> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mi>A</mi> <mi>d</mi> <mi>d</mi> <mo stretchy="false">(</mo> <mi>M</mi> <mi>u</mi> <mi>l</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> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by Def.&#xa0;</mtext> </mrow> <mo>&#x2218;<!-- ∘ --></mo> <mo>,</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msubsup> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mi>M</mi> <mi>u</mi> <mi>l</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mo>+</mo> <mi>y</mi> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by property of&#xa0;</mtext> </mrow> <mi>A</mi> <mi>d</mi> <mi>d</mi> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{array}{lll}&amp;Mul(S(x),y)\\=&amp;\rho (C_{0}^{1},Add\circ (P_{2}^{3},P_{3}^{3}))\;(S(x),y)&amp;{\text{ by Def. }}Mul\\=&amp;(Add\circ (P_{2}^{3},P_{3}^{3}))\;(x,Mul(x,y),y)&amp;{\text{ by case }}\rho (g,h)\;(S(...),...)\\=&amp;Add(Mul(x,y),y)&amp;{\text{ by Def. }}\circ ,P_{2}^{3},P_{3}^{3}\\=&amp;Mul(x,y)+y&amp;{\text{ by property of }}Add.\\\end{array}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/014db37df652711a2433f8d55052e27b5c9b144e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -7.741ex; margin-bottom: -0.264ex; width:68.686ex; height:17.176ex;" alt="{\displaystyle {\begin{array}{lll}&amp;Mul(S(x),y)\\=&amp;\rho (C_{0}^{1},Add\circ (P_{2}^{3},P_{3}^{3}))\;(S(x),y)&amp;{\text{ by Def. }}Mul\\=&amp;(Add\circ (P_{2}^{3},P_{3}^{3}))\;(x,Mul(x,y),y)&amp;{\text{ by case }}\rho (g,h)\;(S(...),...)\\=&amp;Add(Mul(x,y),y)&amp;{\text{ by Def. }}\circ ,P_{2}^{3},P_{3}^{3}\\=&amp;Mul(x,y)+y&amp;{\text{ by property of }}Add.\\\end{array}}}" /></span></dd></dl> <div class="mw-heading mw-heading3"><h3 id="Predecessor">Predecessor</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=6" title="Edit section: Predecessor"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The predecessor function acts as the "opposite" of the successor function and is recursively defined by the rules <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 Pred(0)=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>P</mi> <mi>r</mi> <mi>e</mi> <mi>d</mi> <mo stretchy="false">(</mo> <mn>0</mn> <mo stretchy="false">)</mo> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Pred(0)=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8a0b709e9776bd08e29ca836ec9635e3b47f99a9" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:12.326ex; height:2.843ex;" alt="{\displaystyle Pred(0)=0}" /></span> 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 Pred(S(n))=n}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>P</mi> <mi>r</mi> <mi>e</mi> <mi>d</mi> <mo stretchy="false">(</mo> <mi>S</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> <mo>=</mo> <mi>n</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Pred(S(n))=n}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f4dfbc27d5dce3374fe5b8d9a372608b8af09b4e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:16.099ex; height:2.843ex;" alt="{\displaystyle Pred(S(n))=n}" /></span>. A primitive recursive definition is <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 Pred=\rho (C_{0}^{0},P_{1}^{2})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>P</mi> <mi>r</mi> <mi>e</mi> <mi>d</mi> <mo>=</mo> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Pred=\rho (C_{0}^{0},P_{1}^{2})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/0cac8717442d8beee4186d5b9241928d5cd96e7f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:17.965ex; height:3.176ex;" alt="{\displaystyle Pred=\rho (C_{0}^{0},P_{1}^{2})}" /></span>. As a computation example, </p> <dl><dd><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 {\begin{array}{lll}&amp;Pred(8)\\=&amp;\rho (C_{0}^{0},P_{1}^{2})\;(S(7))&amp;{\text{ by Def. }}Pred,S\\=&amp;P_{1}^{2}(7,Pred(7))&amp;{\text{ by case }}\rho (g,h)\;(S(...),...)\\=&amp;7&amp;{\text{ by Def. }}P_{1}^{2}.\\\end{array}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="left left left" rowspacing="4pt" columnspacing="1em"> <mtr> <mtd></mtd> <mtd> <mi>P</mi> <mi>r</mi> <mi>e</mi> <mi>d</mi> <mo stretchy="false">(</mo> <mn>8</mn> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> <mspace width="thickmathspace"></mspace> <mo stretchy="false">(</mo> <mi>S</mi> <mo stretchy="false">(</mo> <mn>7</mn> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by Def.&#xa0;</mtext> </mrow> <mi>P</mi> <mi>r</mi> <mi>e</mi> <mi>d</mi> <mo>,</mo> <mi>S</mi> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo stretchy="false">(</mo> <mn>7</mn> <mo>,</mo> <mi>P</mi> <mi>r</mi> <mi>e</mi> <mi>d</mi> <mo stretchy="false">(</mo> <mn>7</mn> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by case&#xa0;</mtext> </mrow> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <mi>g</mi> <mo>,</mo> <mi>h</mi> <mo stretchy="false">)</mo> <mspace width="thickmathspace"></mspace> <mo stretchy="false">(</mo> <mi>S</mi> <mo stretchy="false">(</mo> <mo>.</mo> <mo>.</mo> <mo>.</mo> <mo stretchy="false">)</mo> <mo>,</mo> <mo>.</mo> <mo>.</mo> <mo>.</mo> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mn>7</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by Def.&#xa0;</mtext> </mrow> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{array}{lll}&amp;Pred(8)\\=&amp;\rho (C_{0}^{0},P_{1}^{2})\;(S(7))&amp;{\text{ by Def. }}Pred,S\\=&amp;P_{1}^{2}(7,Pred(7))&amp;{\text{ by case }}\rho (g,h)\;(S(...),...)\\=&amp;7&amp;{\text{ by Def. }}P_{1}^{2}.\\\end{array}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/49728351a759a56ae1c1ddb806584731198b9b2f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -6.171ex; width:51.809ex; height:13.509ex;" alt="{\displaystyle {\begin{array}{lll}&amp;Pred(8)\\=&amp;\rho (C_{0}^{0},P_{1}^{2})\;(S(7))&amp;{\text{ by Def. }}Pred,S\\=&amp;P_{1}^{2}(7,Pred(7))&amp;{\text{ by case }}\rho (g,h)\;(S(...),...)\\=&amp;7&amp;{\text{ by Def. }}P_{1}^{2}.\\\end{array}}}" /></span></dd></dl> <div class="mw-heading mw-heading3"><h3 id="Truncated_subtraction">Truncated subtraction</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=7" title="Edit section: Truncated subtraction"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The limited subtraction function (also called "<a href="/wiki/Monus" title="Monus">monus</a>", and 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 {\stackrel {.}{-}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-REL"> <mover> <mrow class="MJX-TeXAtom-OP MJX-fixedlimits"> <mo>&#x2212;<!-- − --></mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mo>.</mo> </mrow> </mover> </mrow> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\stackrel {.}{-}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4ec07832395c7cdc2c6f67a33a7e72a960a1e59a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:1.808ex; height:3.009ex;" alt="{\displaystyle {\stackrel {.}{-}}}" /></span>") is definable from the predecessor function. It satisfies the equations </p> <dl><dd><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 {\begin{array}{rcll}y{\stackrel {.}{-}}0&amp;=&amp;y&amp;{\text{and}}\\y{\stackrel {.}{-}}S(x)&amp;=&amp;Pred(y{\stackrel {.}{-}}x)&amp;.\\\end{array}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right center left left" rowspacing="4pt" columnspacing="1em"> <mtr> <mtd> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-REL"> <mover> <mrow class="MJX-TeXAtom-OP MJX-fixedlimits"> <mo>&#x2212;<!-- − --></mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mo>.</mo> </mrow> </mover> </mrow> </mrow> <mn>0</mn> </mtd> <mtd> <mo>=</mo> </mtd> <mtd> <mi>y</mi> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>and</mtext> </mrow> </mtd> </mtr> <mtr> <mtd> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-REL"> <mover> <mrow class="MJX-TeXAtom-OP MJX-fixedlimits"> <mo>&#x2212;<!-- − --></mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mo>.</mo> </mrow> </mover> </mrow> </mrow> <mi>S</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mo>=</mo> </mtd> <mtd> <mi>P</mi> <mi>r</mi> <mi>e</mi> <mi>d</mi> <mo stretchy="false">(</mo> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-REL"> <mover> <mrow class="MJX-TeXAtom-OP MJX-fixedlimits"> <mo>&#x2212;<!-- − --></mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mo>.</mo> </mrow> </mover> </mrow> </mrow> <mi>x</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{array}{rcll}y{\stackrel {.}{-}}0&amp;=&amp;y&amp;{\text{and}}\\y{\stackrel {.}{-}}S(x)&amp;=&amp;Pred(y{\stackrel {.}{-}}x)&amp;.\\\end{array}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b25ff6af208d06dc9ee613ea2f38413cbe161815" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.838ex; width:32.073ex; height:6.843ex;" alt="{\displaystyle {\begin{array}{rcll}y{\stackrel {.}{-}}0&amp;=&amp;y&amp;{\text{and}}\\y{\stackrel {.}{-}}S(x)&amp;=&amp;Pred(y{\stackrel {.}{-}}x)&amp;.\\\end{array}}}" /></span></dd></dl> <p>Since the recursion runs over the second argument, we begin with a primitive recursive definition of the reversed subtraction, <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 RSub(y,x)=x{\stackrel {.}{-}}y}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>R</mi> <mi>S</mi> <mi>u</mi> <mi>b</mi> <mo stretchy="false">(</mo> <mi>y</mi> <mo>,</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-REL"> <mover> <mrow class="MJX-TeXAtom-OP MJX-fixedlimits"> <mo>&#x2212;<!-- − --></mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mo>.</mo> </mrow> </mover> </mrow> </mrow> <mi>y</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle RSub(y,x)=x{\stackrel {.}{-}}y}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1c7a315340a70ddad03fd35245ec0acb3dc5cd2b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:18.311ex; height:3.343ex;" alt="{\displaystyle RSub(y,x)=x{\stackrel {.}{-}}y}" /></span>. Its recursion then runs over the first argument, so its primitive recursive definition can be obtained, similar to addition, 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 RSub=\rho (P_{1}^{1},Pred\circ P_{2}^{3})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>R</mi> <mi>S</mi> <mi>u</mi> <mi>b</mi> <mo>=</mo> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo>,</mo> <mi>P</mi> <mi>r</mi> <mi>e</mi> <mi>d</mi> <mo>&#x2218;<!-- ∘ --></mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle RSub=\rho (P_{1}^{1},Pred\circ P_{2}^{3})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/cebec2a09c7a0ceca0136decb1fe1e40a73531cb" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:25.774ex; height:3.176ex;" alt="{\displaystyle RSub=\rho (P_{1}^{1},Pred\circ P_{2}^{3})}" /></span>. To get rid of the reversed argument order, then define <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 Sub=RSub\circ (P_{2}^{2},P_{1}^{2})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>S</mi> <mi>u</mi> <mi>b</mi> <mo>=</mo> <mi>R</mi> <mi>S</mi> <mi>u</mi> <mi>b</mi> <mo>&#x2218;<!-- ∘ --></mo> <mo stretchy="false">(</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Sub=RSub\circ (P_{2}^{2},P_{1}^{2})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5a9e6afedd0066a0dbe66f22402b14fc7db3f259" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:23.305ex; height:3.176ex;" alt="{\displaystyle Sub=RSub\circ (P_{2}^{2},P_{1}^{2})}" /></span>. As a computation example, </p> <dl><dd><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 {\begin{array}{lll}&amp;Sub(8,1)\\=&amp;(RSub\circ (P_{2}^{2},P_{1}^{2}))\;(8,1)&amp;{\text{ by Def. }}Sub\\=&amp;RSub(1,8)&amp;{\text{ by Def. }}\circ ,P_{2}^{2},P_{1}^{2}\\=&amp;\rho (P_{1}^{1},Pred\circ P_{2}^{3})\;(S(0),8)&amp;{\text{ by Def. }}RSub,S\\=&amp;(Pred\circ P_{2}^{3})\;(0,RSub(0,8),8)&amp;{\text{ by case }}\rho (g,h)\;(S(...),...)\\=&amp;Pred(RSub(0,8))&amp;{\text{ by Def. }}\circ ,P_{2}^{3}\\=&amp;Pred(\;\rho (P_{1}^{1},Pred\circ P_{2}^{3})\;(0,8)\;)&amp;{\text{ by Def. }}RSub\\=&amp;Pred(P_{1}^{1}(8))&amp;{\text{ by case }}\rho (g,h)\;(0,...)\\=&amp;Pred(8)&amp;{\text{ by Def. }}P_{1}^{1}\\=&amp;7&amp;{\text{ by property of }}Pred.\\\end{array}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="left left left" rowspacing="4pt" columnspacing="1em"> <mtr> <mtd></mtd> <mtd> <mi>S</mi> <mi>u</mi> <mi>b</mi> <mo stretchy="false">(</mo> <mn>8</mn> <mo>,</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mo stretchy="false">(</mo> <mi>R</mi> <mi>S</mi> <mi>u</mi> <mi>b</mi> <mo>&#x2218;<!-- ∘ --></mo> <mo stretchy="false">(</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> <mspace width="thickmathspace"></mspace> <mo stretchy="false">(</mo> <mn>8</mn> <mo>,</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by Def.&#xa0;</mtext> </mrow> <mi>S</mi> <mi>u</mi> <mi>b</mi> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mi>R</mi> <mi>S</mi> <mi>u</mi> <mi>b</mi> <mo stretchy="false">(</mo> <mn>1</mn> <mo>,</mo> <mn>8</mn> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by Def.&#xa0;</mtext> </mrow> <mo>&#x2218;<!-- ∘ --></mo> <mo>,</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo>,</mo> <mi>P</mi> <mi>r</mi> <mi>e</mi> <mi>d</mi> <mo>&#x2218;<!-- ∘ --></mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> <mspace width="thickmathspace"></mspace> <mo stretchy="false">(</mo> <mi>S</mi> <mo stretchy="false">(</mo> <mn>0</mn> <mo stretchy="false">)</mo> <mo>,</mo> <mn>8</mn> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by Def.&#xa0;</mtext> </mrow> <mi>R</mi> <mi>S</mi> <mi>u</mi> <mi>b</mi> <mo>,</mo> <mi>S</mi> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mo stretchy="false">(</mo> <mi>P</mi> <mi>r</mi> <mi>e</mi> <mi>d</mi> <mo>&#x2218;<!-- ∘ --></mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> <mspace width="thickmathspace"></mspace> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mi>R</mi> <mi>S</mi> <mi>u</mi> <mi>b</mi> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mn>8</mn> <mo stretchy="false">)</mo> <mo>,</mo> <mn>8</mn> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by case&#xa0;</mtext> </mrow> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <mi>g</mi> <mo>,</mo> <mi>h</mi> <mo stretchy="false">)</mo> <mspace width="thickmathspace"></mspace> <mo stretchy="false">(</mo> <mi>S</mi> <mo stretchy="false">(</mo> <mo>.</mo> <mo>.</mo> <mo>.</mo> <mo stretchy="false">)</mo> <mo>,</mo> <mo>.</mo> <mo>.</mo> <mo>.</mo> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mi>P</mi> <mi>r</mi> <mi>e</mi> <mi>d</mi> <mo stretchy="false">(</mo> <mi>R</mi> <mi>S</mi> <mi>u</mi> <mi>b</mi> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mn>8</mn> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by Def.&#xa0;</mtext> </mrow> <mo>&#x2218;<!-- ∘ --></mo> <mo>,</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msubsup> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mi>P</mi> <mi>r</mi> <mi>e</mi> <mi>d</mi> <mo stretchy="false">(</mo> <mspace width="thickmathspace"></mspace> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo>,</mo> <mi>P</mi> <mi>r</mi> <mi>e</mi> <mi>d</mi> <mo>&#x2218;<!-- ∘ --></mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> <mspace width="thickmathspace"></mspace> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mn>8</mn> <mo stretchy="false">)</mo> <mspace width="thickmathspace"></mspace> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by Def.&#xa0;</mtext> </mrow> <mi>R</mi> <mi>S</mi> <mi>u</mi> <mi>b</mi> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mi>P</mi> <mi>r</mi> <mi>e</mi> <mi>d</mi> <mo stretchy="false">(</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo stretchy="false">(</mo> <mn>8</mn> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by case&#xa0;</mtext> </mrow> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <mi>g</mi> <mo>,</mo> <mi>h</mi> <mo stretchy="false">)</mo> <mspace width="thickmathspace"></mspace> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mo>.</mo> <mo>.</mo> <mo>.</mo> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mi>P</mi> <mi>r</mi> <mi>e</mi> <mi>d</mi> <mo stretchy="false">(</mo> <mn>8</mn> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by Def.&#xa0;</mtext> </mrow> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mn>7</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by property of&#xa0;</mtext> </mrow> <mi>P</mi> <mi>r</mi> <mi>e</mi> <mi>d</mi> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{array}{lll}&amp;Sub(8,1)\\=&amp;(RSub\circ (P_{2}^{2},P_{1}^{2}))\;(8,1)&amp;{\text{ by Def. }}Sub\\=&amp;RSub(1,8)&amp;{\text{ by Def. }}\circ ,P_{2}^{2},P_{1}^{2}\\=&amp;\rho (P_{1}^{1},Pred\circ P_{2}^{3})\;(S(0),8)&amp;{\text{ by Def. }}RSub,S\\=&amp;(Pred\circ P_{2}^{3})\;(0,RSub(0,8),8)&amp;{\text{ by case }}\rho (g,h)\;(S(...),...)\\=&amp;Pred(RSub(0,8))&amp;{\text{ by Def. }}\circ ,P_{2}^{3}\\=&amp;Pred(\;\rho (P_{1}^{1},Pred\circ P_{2}^{3})\;(0,8)\;)&amp;{\text{ by Def. }}RSub\\=&amp;Pred(P_{1}^{1}(8))&amp;{\text{ by case }}\rho (g,h)\;(0,...)\\=&amp;Pred(8)&amp;{\text{ by Def. }}P_{1}^{1}\\=&amp;7&amp;{\text{ by property of }}Pred.\\\end{array}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/90bf6400712c7487eaefb06b6894eda339ddf9dc" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -16.505ex; margin-bottom: -0.333ex; width:66.202ex; height:34.843ex;" alt="{\displaystyle {\begin{array}{lll}&amp;Sub(8,1)\\=&amp;(RSub\circ (P_{2}^{2},P_{1}^{2}))\;(8,1)&amp;{\text{ by Def. }}Sub\\=&amp;RSub(1,8)&amp;{\text{ by Def. }}\circ ,P_{2}^{2},P_{1}^{2}\\=&amp;\rho (P_{1}^{1},Pred\circ P_{2}^{3})\;(S(0),8)&amp;{\text{ by Def. }}RSub,S\\=&amp;(Pred\circ P_{2}^{3})\;(0,RSub(0,8),8)&amp;{\text{ by case }}\rho (g,h)\;(S(...),...)\\=&amp;Pred(RSub(0,8))&amp;{\text{ by Def. }}\circ ,P_{2}^{3}\\=&amp;Pred(\;\rho (P_{1}^{1},Pred\circ P_{2}^{3})\;(0,8)\;)&amp;{\text{ by Def. }}RSub\\=&amp;Pred(P_{1}^{1}(8))&amp;{\text{ by case }}\rho (g,h)\;(0,...)\\=&amp;Pred(8)&amp;{\text{ by Def. }}P_{1}^{1}\\=&amp;7&amp;{\text{ by property of }}Pred.\\\end{array}}}" /></span></dd></dl> <div class="mw-heading mw-heading3"><h3 id="Converting_predicates_to_numeric_functions">Converting predicates to numeric functions</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=8" title="Edit section: Converting predicates to numeric functions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In some settings it is natural to consider primitive recursive functions that take as inputs tuples that mix numbers with <a href="/wiki/Truth_value" title="Truth value">truth values</a> (that is <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 t}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>t</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle t}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/65658b7b223af9e1acc877d848888ecdb4466560" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.84ex; height:2.009ex;" alt="{\displaystyle t}" /></span> for true 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 f}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>f</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle f}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/132e57acb643253e7810ee9702d9581f159a1c61" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.279ex; height:2.509ex;" alt="{\displaystyle f}" /></span> for false),<sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">&#91;<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="Kleene never considers mixed domains - see p.226 where he lists the 4 types of functions he considers. Using N to represent the naturals, and T to represent the truth values: (a) N to N (b) N to T (c) T oto T (d) T to N (January 2025)">citation needed</span></a></i>&#93;</sup> or that produce truth values as outputs.<sup id="cite_ref-FOOTNOTEKleene1952226–227_4-0" class="reference"><a href="#cite_note-FOOTNOTEKleene1952226–227-4"><span class="cite-bracket">&#91;</span>4<span class="cite-bracket">&#93;</span></a></sup> This can be accomplished by identifying the truth values with numbers in any fixed manner. For example, it is common to identify the truth value <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 t}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>t</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle t}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/65658b7b223af9e1acc877d848888ecdb4466560" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.84ex; height:2.009ex;" alt="{\displaystyle t}" /></span> with the number <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 1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/92d98b82a3778f043108d4e20960a9193df57cbf" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.162ex; height:2.176ex;" alt="{\displaystyle 1}" /></span> and the truth value <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}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>f</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle f}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/132e57acb643253e7810ee9702d9581f159a1c61" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.279ex; height:2.509ex;" alt="{\displaystyle f}" /></span> with the number <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}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2aae8864a3c1fec9585261791a809ddec1489950" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.162ex; height:2.176ex;" alt="{\displaystyle 0}" /></span>. Once this identification has been made, the <a href="/wiki/Indicator_function" title="Indicator function">characteristic 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>, which always returns <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 1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/92d98b82a3778f043108d4e20960a9193df57cbf" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.162ex; height:2.176ex;" alt="{\displaystyle 1}" /></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 0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2aae8864a3c1fec9585261791a809ddec1489950" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.162ex; height:2.176ex;" alt="{\displaystyle 0}" /></span>, can be viewed as a predicate that tells whether a number is in the 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>. Such an identification of predicates with numeric functions will be assumed for the remainder of this article. </p> <div class="mw-heading mw-heading3"><h3 id="Predicate_&quot;Is_zero&quot;"><span id="Predicate_.22Is_zero.22"></span>Predicate "Is zero"</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=9" title="Edit section: Predicate &quot;Is zero&quot;"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>As an example for a primitive recursive predicate, the 1-ary function <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 IsZero}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>I</mi> <mi>s</mi> <mi>Z</mi> <mi>e</mi> <mi>r</mi> <mi>o</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle IsZero}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/47c7f5ceeeccd9e25f794c483c9365c9d3e5e278" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:7.202ex; height:2.176ex;" alt="{\displaystyle IsZero}" /></span> shall be defined such that <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 IsZero(x)=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>I</mi> <mi>s</mi> <mi>Z</mi> <mi>e</mi> <mi>r</mi> <mi>o</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle IsZero(x)=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3d3d08a836c73ede55558aaa5fac3a0a4b616aa4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:14.602ex; height:2.843ex;" alt="{\displaystyle IsZero(x)=1}" /></span> if <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"> <mi>x</mi> <mo>=</mo> <mn>0</mn> </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/953917eaf52f2e1baad54c8c9e3d6f9bb3710cdc" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.591ex; height:2.176ex;" alt="{\displaystyle x=0}" /></span>, 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 IsZero(x)=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>I</mi> <mi>s</mi> <mi>Z</mi> <mi>e</mi> <mi>r</mi> <mi>o</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle IsZero(x)=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b9917803c33264570352fa6ed2b5399106f4fdbd" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:14.602ex; height:2.843ex;" alt="{\displaystyle IsZero(x)=0}" /></span>, otherwise. This can be achieved by defining <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 IsZero=\rho (C_{1}^{0},C_{0}^{2})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>I</mi> <mi>s</mi> <mi>Z</mi> <mi>e</mi> <mi>r</mi> <mi>o</mi> <mo>=</mo> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle IsZero=\rho (C_{1}^{0},C_{0}^{2})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f72140195d7c6904776f3ec2581db8a45e3ca8b3" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:20.05ex; height:3.176ex;" alt="{\displaystyle IsZero=\rho (C_{1}^{0},C_{0}^{2})}" /></span>. Then, <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 IsZero(0)=\rho (C_{1}^{0},C_{0}^{2})(0)=C_{1}^{0}(0)=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>I</mi> <mi>s</mi> <mi>Z</mi> <mi>e</mi> <mi>r</mi> <mi>o</mi> <mo stretchy="false">(</mo> <mn>0</mn> <mo stretchy="false">)</mo> <mo>=</mo> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> <mo stretchy="false">(</mo> <mn>0</mn> <mo stretchy="false">)</mo> <mo>=</mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msubsup> <mo stretchy="false">(</mo> <mn>0</mn> <mo stretchy="false">)</mo> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle IsZero(0)=\rho (C_{1}^{0},C_{0}^{2})(0)=C_{1}^{0}(0)=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4b29855065f163df552668ffa5163a326336f764" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:39.177ex; height:3.176ex;" alt="{\displaystyle IsZero(0)=\rho (C_{1}^{0},C_{0}^{2})(0)=C_{1}^{0}(0)=1}" /></span> and e.g. <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 IsZero(8)=\rho (C_{1}^{0},C_{0}^{2})(S(7))=C_{0}^{2}(7,IsZero(7))=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>I</mi> <mi>s</mi> <mi>Z</mi> <mi>e</mi> <mi>r</mi> <mi>o</mi> <mo stretchy="false">(</mo> <mn>8</mn> <mo stretchy="false">)</mo> <mo>=</mo> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> <mo stretchy="false">(</mo> <mi>S</mi> <mo stretchy="false">(</mo> <mn>7</mn> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> <mo>=</mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo stretchy="false">(</mo> <mn>7</mn> <mo>,</mo> <mi>I</mi> <mi>s</mi> <mi>Z</mi> <mi>e</mi> <mi>r</mi> <mi>o</mi> <mo stretchy="false">(</mo> <mn>7</mn> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle IsZero(8)=\rho (C_{1}^{0},C_{0}^{2})(S(7))=C_{0}^{2}(7,IsZero(7))=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/beb9b5c9c0c3f9437908ae4554943032875a3baa" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:53.693ex; height:3.176ex;" alt="{\displaystyle IsZero(8)=\rho (C_{1}^{0},C_{0}^{2})(S(7))=C_{0}^{2}(7,IsZero(7))=0}" /></span>. </p> <div class="mw-heading mw-heading3"><h3 id="Predicate_&quot;Less_or_equal&quot;"><span id="Predicate_.22Less_or_equal.22"></span>Predicate "Less or equal"</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=10" title="Edit section: Predicate &quot;Less or equal&quot;"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Using the 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 x\leq y\iff x{\stackrel {.}{-}}y=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> <mo>&#x2264;<!-- ≤ --></mo> <mi>y</mi> <mspace width="thickmathspace"></mspace> <mo stretchy="false">&#x27fa;<!-- ⟺ --></mo> <mspace width="thickmathspace"></mspace> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-REL"> <mover> <mrow class="MJX-TeXAtom-OP MJX-fixedlimits"> <mo>&#x2212;<!-- − --></mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mo>.</mo> </mrow> </mover> </mrow> </mrow> <mi>y</mi> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x\leq y\iff x{\stackrel {.}{-}}y=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a0679b6d2ba8eac56498d30d3b92a58a6e75a3cd" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:21.035ex; height:3.176ex;" alt="{\displaystyle x\leq y\iff x{\stackrel {.}{-}}y=0}" /></span>, the 2-ary function <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 Leq}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>L</mi> <mi>e</mi> <mi>q</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Leq}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a976a2a3ef28c864cef1f5c96cb5457e427ac0dd" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.736ex; height:2.509ex;" alt="{\displaystyle Leq}" /></span> can be defined by <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 Leq=IsZero\circ Sub}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>L</mi> <mi>e</mi> <mi>q</mi> <mo>=</mo> <mi>I</mi> <mi>s</mi> <mi>Z</mi> <mi>e</mi> <mi>r</mi> <mi>o</mi> <mo>&#x2218;<!-- ∘ --></mo> <mi>S</mi> <mi>u</mi> <mi>b</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Leq=IsZero\circ Sub}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/079ee1e4aeb35646f220f5d88e4529a8d0445e33" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:20.058ex; height:2.509ex;" alt="{\displaystyle Leq=IsZero\circ Sub}" /></span>. Then <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 Leq(x,y)=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>L</mi> <mi>e</mi> <mi>q</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Leq(x,y)=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f62f921bf7aa29584ce9e83668f8f1ec8092c080" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:13.325ex; height:2.843ex;" alt="{\displaystyle Leq(x,y)=1}" /></span> if <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\leq y}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> <mo>&#x2264;<!-- ≤ --></mo> <mi>y</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x\leq y}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c07a0bc023490be1c08e6c33a9cdc93bec908224" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.584ex; height:2.343ex;" alt="{\displaystyle x\leq y}" /></span>, 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 Leq(x,y)=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>L</mi> <mi>e</mi> <mi>q</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Leq(x,y)=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c43c740ef880565882bd017101894f4abdb97871" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:13.325ex; height:2.843ex;" alt="{\displaystyle Leq(x,y)=0}" /></span>, otherwise. As a computation example, </p> <dl><dd><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 {\begin{array}{lll}&amp;Leq(8,3)\\=&amp;IsZero(Sub(8,3))&amp;{\text{ by Def. }}Leq\\=&amp;IsZero(5)&amp;{\text{ by property of }}Sub\\=&amp;0&amp;{\text{ by property of }}IsZero\\\end{array}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="left left left" rowspacing="4pt" columnspacing="1em"> <mtr> <mtd></mtd> <mtd> <mi>L</mi> <mi>e</mi> <mi>q</mi> <mo stretchy="false">(</mo> <mn>8</mn> <mo>,</mo> <mn>3</mn> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mi>I</mi> <mi>s</mi> <mi>Z</mi> <mi>e</mi> <mi>r</mi> <mi>o</mi> <mo stretchy="false">(</mo> <mi>S</mi> <mi>u</mi> <mi>b</mi> <mo stretchy="false">(</mo> <mn>8</mn> <mo>,</mo> <mn>3</mn> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by Def.&#xa0;</mtext> </mrow> <mi>L</mi> <mi>e</mi> <mi>q</mi> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mi>I</mi> <mi>s</mi> <mi>Z</mi> <mi>e</mi> <mi>r</mi> <mi>o</mi> <mo stretchy="false">(</mo> <mn>5</mn> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by property of&#xa0;</mtext> </mrow> <mi>S</mi> <mi>u</mi> <mi>b</mi> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mn>0</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by property of&#xa0;</mtext> </mrow> <mi>I</mi> <mi>s</mi> <mi>Z</mi> <mi>e</mi> <mi>r</mi> <mi>o</mi> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{array}{lll}&amp;Leq(8,3)\\=&amp;IsZero(Sub(8,3))&amp;{\text{ by Def. }}Leq\\=&amp;IsZero(5)&amp;{\text{ by property of }}Sub\\=&amp;0&amp;{\text{ by property of }}IsZero\\\end{array}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e035b2f3b0ca5e36543ac006eb1a6edb5e0d8281" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -5.838ex; width:47.866ex; height:12.843ex;" alt="{\displaystyle {\begin{array}{lll}&amp;Leq(8,3)\\=&amp;IsZero(Sub(8,3))&amp;{\text{ by Def. }}Leq\\=&amp;IsZero(5)&amp;{\text{ by property of }}Sub\\=&amp;0&amp;{\text{ by property of }}IsZero\\\end{array}}}" /></span></dd></dl> <div class="mw-heading mw-heading3"><h3 id="Predicate_&quot;Greater_or_equal&quot;"><span id="Predicate_.22Greater_or_equal.22"></span>Predicate "Greater or equal"</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=11" title="Edit section: Predicate &quot;Greater or equal&quot;"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Once a definition of <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 Leq}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>L</mi> <mi>e</mi> <mi>q</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Leq}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a976a2a3ef28c864cef1f5c96cb5457e427ac0dd" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.736ex; height:2.509ex;" alt="{\displaystyle Leq}" /></span> is obtained, the converse predicate can be defined 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 Geq=Leq\circ (P_{2}^{2},P_{1}^{2})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>G</mi> <mi>e</mi> <mi>q</mi> <mo>=</mo> <mi>L</mi> <mi>e</mi> <mi>q</mi> <mo>&#x2218;<!-- ∘ --></mo> <mo stretchy="false">(</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Geq=Leq\circ (P_{2}^{2},P_{1}^{2})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ffc387d34487a360460f9715ea43665de1f0e5a1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:21.604ex; height:3.176ex;" alt="{\displaystyle Geq=Leq\circ (P_{2}^{2},P_{1}^{2})}" /></span>. Then, <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 Geq(x,y)=Leq(y,x)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>G</mi> <mi>e</mi> <mi>q</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>L</mi> <mi>e</mi> <mi>q</mi> <mo stretchy="false">(</mo> <mi>y</mi> <mo>,</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Geq(x,y)=Leq(y,x)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6fc5b3b3dbf83b94a633339cd4118d55b4a4d509" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:21.471ex; height:2.843ex;" alt="{\displaystyle Geq(x,y)=Leq(y,x)}" /></span> is true (more precisely: has value 1) if, and only if, <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\geq y}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> <mo>&#x2265;<!-- ≥ --></mo> <mi>y</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x\geq y}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/aded94d634c48071188bf96a76a4d3b7dfb28470" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.584ex; height:2.343ex;" alt="{\displaystyle x\geq y}" /></span>. </p> <div class="mw-heading mw-heading3"><h3 id="If-then-else">If-then-else</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=12" title="Edit section: If-then-else"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The 3-ary if-then-else operator known from programming languages can be defined by <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 {\textit {If}}=\rho (P_{2}^{2},P_{3}^{4})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mtext class="MJX-tex-mathit" mathvariant="italic">If</mtext> </mrow> </mrow> <mo>=</mo> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>4</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\textit {If}}=\rho (P_{2}^{2},P_{3}^{4})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/05a6f7483233586794b1c629ef6c7fb0e07c607a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:14.507ex; height:3.176ex;" alt="{\displaystyle {\textit {If}}=\rho (P_{2}^{2},P_{3}^{4})}" /></span>. Then, for arbitrary <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}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/87f9e315fd7e2ba406057a97300593c4802b53e4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.33ex; height:1.676ex;" alt="{\displaystyle x}" /></span>, </p> <dl><dd><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 {\begin{array}{lll}&amp;{\textit {If}}(S(x),y,z)\\=&amp;\rho (P_{2}^{2},P_{3}^{4})\;(S(x),y,z)&amp;{\text{ by Def. }}{\textit {If}}\\=&amp;P_{3}^{4}(x,{\textit {If}}(x,y,z),y,z)&amp;{\text{ by case }}\rho (S(...),...)\\=&amp;y&amp;{\text{ by Def. }}P_{3}^{4}\\\end{array}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="left left left" rowspacing="4pt" columnspacing="1em"> <mtr> <mtd></mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mtext class="MJX-tex-mathit" mathvariant="italic">If</mtext> </mrow> </mrow> <mo stretchy="false">(</mo> <mi>S</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>,</mo> <mi>y</mi> <mo>,</mo> <mi>z</mi> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>4</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> <mspace width="thickmathspace"></mspace> <mo stretchy="false">(</mo> <mi>S</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>,</mo> <mi>y</mi> <mo>,</mo> <mi>z</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by Def.&#xa0;</mtext> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mtext class="MJX-tex-mathit" mathvariant="italic">If</mtext> </mrow> </mrow> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>4</mn> </mrow> </msubsup> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mtext class="MJX-tex-mathit" mathvariant="italic">If</mtext> </mrow> </mrow> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo>,</mo> <mi>z</mi> <mo stretchy="false">)</mo> <mo>,</mo> <mi>y</mi> <mo>,</mo> <mi>z</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by case&#xa0;</mtext> </mrow> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <mi>S</mi> <mo stretchy="false">(</mo> <mo>.</mo> <mo>.</mo> <mo>.</mo> <mo stretchy="false">)</mo> <mo>,</mo> <mo>.</mo> <mo>.</mo> <mo>.</mo> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mi>y</mi> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by Def.&#xa0;</mtext> </mrow> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>4</mn> </mrow> </msubsup> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{array}{lll}&amp;{\textit {If}}(S(x),y,z)\\=&amp;\rho (P_{2}^{2},P_{3}^{4})\;(S(x),y,z)&amp;{\text{ by Def. }}{\textit {If}}\\=&amp;P_{3}^{4}(x,{\textit {If}}(x,y,z),y,z)&amp;{\text{ by case }}\rho (S(...),...)\\=&amp;y&amp;{\text{ by Def. }}P_{3}^{4}\\\end{array}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9ba6bd3cd44065b8da4d5cb1d9567443f3635ab9" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -6.338ex; width:50.368ex; height:13.843ex;" alt="{\displaystyle {\begin{array}{lll}&amp;{\textit {If}}(S(x),y,z)\\=&amp;\rho (P_{2}^{2},P_{3}^{4})\;(S(x),y,z)&amp;{\text{ by Def. }}{\textit {If}}\\=&amp;P_{3}^{4}(x,{\textit {If}}(x,y,z),y,z)&amp;{\text{ by case }}\rho (S(...),...)\\=&amp;y&amp;{\text{ by Def. }}P_{3}^{4}\\\end{array}}}" /></span></dd></dl> <p>and </p> <dl><dd><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 {\begin{array}{lll}&amp;{\textit {If}}(0,y,z)\\=&amp;\rho (P_{2}^{2},P_{3}^{4})\;(0,y,z)&amp;{\text{ by Def. }}{\textit {If}}\\=&amp;P_{2}^{2}(y,z)&amp;{\text{ by case }}\rho (0,...)\\=&amp;z&amp;{\text{ by Def. }}P_{2}^{2}.\\\end{array}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="left left left" rowspacing="4pt" columnspacing="1em"> <mtr> <mtd></mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mtext class="MJX-tex-mathit" mathvariant="italic">If</mtext> </mrow> </mrow> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mi>y</mi> <mo>,</mo> <mi>z</mi> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>4</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> <mspace width="thickmathspace"></mspace> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mi>y</mi> <mo>,</mo> <mi>z</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by Def.&#xa0;</mtext> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mtext class="MJX-tex-mathit" mathvariant="italic">If</mtext> </mrow> </mrow> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo stretchy="false">(</mo> <mi>y</mi> <mo>,</mo> <mi>z</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by case&#xa0;</mtext> </mrow> <mi>&#x3c1;<!-- ρ --></mi> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mo>.</mo> <mo>.</mo> <mo>.</mo> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mi>z</mi> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;by Def.&#xa0;</mtext> </mrow> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{array}{lll}&amp;{\textit {If}}(0,y,z)\\=&amp;\rho (P_{2}^{2},P_{3}^{4})\;(0,y,z)&amp;{\text{ by Def. }}{\textit {If}}\\=&amp;P_{2}^{2}(y,z)&amp;{\text{ by case }}\rho (0,...)\\=&amp;z&amp;{\text{ by Def. }}P_{2}^{2}.\\\end{array}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/24e2e6c188e3e2f9b33ceaf89711b00ab5f04581" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -6.171ex; width:41.645ex; height:13.509ex;" alt="{\displaystyle {\begin{array}{lll}&amp;{\textit {If}}(0,y,z)\\=&amp;\rho (P_{2}^{2},P_{3}^{4})\;(0,y,z)&amp;{\text{ by Def. }}{\textit {If}}\\=&amp;P_{2}^{2}(y,z)&amp;{\text{ by case }}\rho (0,...)\\=&amp;z&amp;{\text{ by Def. }}P_{2}^{2}.\\\end{array}}}" /></span>.</dd></dl> <p>That is, <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 {\textit {If}}(x,y,z)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mtext class="MJX-tex-mathit" mathvariant="italic">If</mtext> </mrow> </mrow> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo>,</mo> <mi>z</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\textit {If}}(x,y,z)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/eb61b1c6db24c5603815831a1f1f7d463488527a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:9.062ex; height:2.843ex;" alt="{\displaystyle {\textit {If}}(x,y,z)}" /></span> returns the then-part, <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 y}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b8a6208ec717213d4317e666f1ae872e00620a0d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.155ex; height:2.009ex;" alt="{\displaystyle y}" /></span>, if the if-part, <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}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/87f9e315fd7e2ba406057a97300593c4802b53e4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.33ex; height:1.676ex;" alt="{\displaystyle x}" /></span>, is true, and the else-part, <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 z}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>z</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle z}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/bf368e72c009decd9b6686ee84a375632e11de98" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.088ex; height:1.676ex;" alt="{\displaystyle z}" /></span>, otherwise. </p> <div class="mw-heading mw-heading3"><h3 id="Junctors">Junctors</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=13" title="Edit section: Junctors"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Based on the <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 {\textit {If}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mtext class="MJX-tex-mathit" mathvariant="italic">If</mtext> </mrow> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\textit {If}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6e9820162706c72829a2429b2874e866d85531d7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-right: -0.332ex; width:1.944ex; height:2.509ex;" alt="{\displaystyle {\textit {If}}}" /></span> function, it is easy to define logical junctors. For example, defining <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 And={\textit {If}}\circ (P_{1}^{2},P_{2}^{2},C_{0}^{2})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>A</mi> <mi>n</mi> <mi>d</mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mtext class="MJX-tex-mathit" mathvariant="italic">If</mtext> </mrow> </mrow> <mo>&#x2218;<!-- ∘ --></mo> <mo stretchy="false">(</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle And={\textit {If}}\circ (P_{1}^{2},P_{2}^{2},C_{0}^{2})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/553b8985d8a11b2affbfceded045cfcdc8454c18" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:23.739ex; height:3.176ex;" alt="{\displaystyle And={\textit {If}}\circ (P_{1}^{2},P_{2}^{2},C_{0}^{2})}" /></span>, one obtains <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 And(x,y)={\textit {If}}(x,y,0)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>A</mi> <mi>n</mi> <mi>d</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mtext class="MJX-tex-mathit" mathvariant="italic">If</mtext> </mrow> </mrow> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo>,</mo> <mn>0</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle And(x,y)={\textit {If}}(x,y,0)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1a42738a9431995e52c30a779f121b45ff1bb5b1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:21.917ex; height:2.843ex;" alt="{\displaystyle And(x,y)={\textit {If}}(x,y,0)}" /></span>, that is, <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 And(x,y)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>A</mi> <mi>n</mi> <mi>d</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 And(x,y)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3d0b038815ea825217f10e86611542c33748fc2a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:9.682ex; height:2.843ex;" alt="{\displaystyle And(x,y)}" /></span> is true <a href="/wiki/If,_and_only_if" class="mw-redirect" title="If, and only if">if, and only if</a>, both <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}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/87f9e315fd7e2ba406057a97300593c4802b53e4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.33ex; height:1.676ex;" alt="{\displaystyle x}" /></span> 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 y}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b8a6208ec717213d4317e666f1ae872e00620a0d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.155ex; height:2.009ex;" alt="{\displaystyle y}" /></span> are true (<a href="/wiki/Logical_conjunction" title="Logical conjunction">logical conjunction</a> of <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}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/87f9e315fd7e2ba406057a97300593c4802b53e4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.33ex; height:1.676ex;" alt="{\displaystyle x}" /></span> 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 y}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b8a6208ec717213d4317e666f1ae872e00620a0d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.155ex; height:2.009ex;" alt="{\displaystyle y}" /></span>). </p><p>Similarly, <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 Or={\textit {If}}\circ (P_{1}^{2},C_{1}^{2},P_{2}^{2})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>O</mi> <mi>r</mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mtext class="MJX-tex-mathit" mathvariant="italic">If</mtext> </mrow> </mrow> <mo>&#x2218;<!-- ∘ --></mo> <mo stretchy="false">(</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Or={\textit {If}}\circ (P_{1}^{2},C_{1}^{2},P_{2}^{2})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/45a9a024f653da5d05fc3d0774352179465e36ea" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:22.208ex; height:3.176ex;" alt="{\displaystyle Or={\textit {If}}\circ (P_{1}^{2},C_{1}^{2},P_{2}^{2})}" /></span> 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 Not={\textit {If}}\circ (P_{1}^{1},C_{0}^{1},C_{1}^{1})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>N</mi> <mi>o</mi> <mi>t</mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mtext class="MJX-tex-mathit" mathvariant="italic">If</mtext> </mrow> </mrow> <mo>&#x2218;<!-- ∘ --></mo> <mo stretchy="false">(</mo> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Not={\textit {If}}\circ (P_{1}^{1},C_{0}^{1},C_{1}^{1})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2908404bbe99681cfdaa652a31c41ade89fe6fb7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:23.393ex; height:3.176ex;" alt="{\displaystyle Not={\textit {If}}\circ (P_{1}^{1},C_{0}^{1},C_{1}^{1})}" /></span> lead to appropriate definitions of <a href="/wiki/Disjunction" class="mw-redirect" title="Disjunction">disjunction</a> and <a href="/wiki/Negation" title="Negation">negation</a>: <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 Or(x,y)={\textit {If}}(x,1,y)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>O</mi> <mi>r</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mtext class="MJX-tex-mathit" mathvariant="italic">If</mtext> </mrow> </mrow> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mn>1</mn> <mo>,</mo> <mi>y</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Or(x,y)={\textit {If}}(x,1,y)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4296ae6356a7f42b289c783487a688a27b4b0fe1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:20.385ex; height:2.843ex;" alt="{\displaystyle Or(x,y)={\textit {If}}(x,1,y)}" /></span> 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 Not(x)={\textit {If}}(x,0,1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>N</mi> <mi>o</mi> <mi>t</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mtext class="MJX-tex-mathit" mathvariant="italic">If</mtext> </mrow> </mrow> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mn>0</mn> <mo>,</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Not(x)={\textit {If}}(x,0,1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/31ef8a046e8869540b2861226a93569532a43f7e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:19.412ex; height:2.843ex;" alt="{\displaystyle Not(x)={\textit {If}}(x,0,1)}" /></span>. </p> <div class="mw-heading mw-heading3"><h3 id="Equality_predicate">Equality predicate</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=14" title="Edit section: Equality predicate"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Using the above functions <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 Leq}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>L</mi> <mi>e</mi> <mi>q</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Leq}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a976a2a3ef28c864cef1f5c96cb5457e427ac0dd" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.736ex; height:2.509ex;" alt="{\displaystyle Leq}" /></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 Geq}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>G</mi> <mi>e</mi> <mi>q</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Geq}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5ede08b8c8c34e5706cc45b5e08790ceca310aca" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.98ex; height:2.509ex;" alt="{\displaystyle Geq}" /></span> 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 And}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>A</mi> <mi>n</mi> <mi>d</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle And}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c2984c0459da7aaecd7054ec869c4527a1b20eac" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:4.354ex; height:2.176ex;" alt="{\displaystyle And}" /></span>, the definition <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 Eq=And\circ (Leq,Geq)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>E</mi> <mi>q</mi> <mo>=</mo> <mi>A</mi> <mi>n</mi> <mi>d</mi> <mo>&#x2218;<!-- ∘ --></mo> <mo stretchy="false">(</mo> <mi>L</mi> <mi>e</mi> <mi>q</mi> <mo>,</mo> <mi>G</mi> <mi>e</mi> <mi>q</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Eq=And\circ (Leq,Geq)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d00cb9a4c6ea70534bf5c9497e3606d922759022" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:23.051ex; height:2.843ex;" alt="{\displaystyle Eq=And\circ (Leq,Geq)}" /></span> implements the equality predicate. In fact, <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 Eq(x,y)=And(Leq(x,y),Geq(x,y))}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>E</mi> <mi>q</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>A</mi> <mi>n</mi> <mi>d</mi> <mo stretchy="false">(</mo> <mi>L</mi> <mi>e</mi> <mi>q</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mo>,</mo> <mi>G</mi> <mi>e</mi> <mi>q</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Eq(x,y)=And(Leq(x,y),Geq(x,y))}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5950d4e567872c691bc16bb257d0a89bcfd33cb6" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:36.841ex; height:2.843ex;" alt="{\displaystyle Eq(x,y)=And(Leq(x,y),Geq(x,y))}" /></span> is true if, and only if, <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}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/87f9e315fd7e2ba406057a97300593c4802b53e4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.33ex; height:1.676ex;" alt="{\displaystyle x}" /></span> equals <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 y}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b8a6208ec717213d4317e666f1ae872e00620a0d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.155ex; height:2.009ex;" alt="{\displaystyle y}" /></span>. </p><p>Similarly, the definition <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 Lt=Not\circ Geq}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>L</mi> <mi>t</mi> <mo>=</mo> <mi>N</mi> <mi>o</mi> <mi>t</mi> <mo>&#x2218;<!-- ∘ --></mo> <mi>G</mi> <mi>e</mi> <mi>q</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Lt=Not\circ Geq}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/fc5d7240bd2f8c9d7884faa648bbf902f682fef4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:15.726ex; height:2.509ex;" alt="{\displaystyle Lt=Not\circ Geq}" /></span> implements the predicate "less-than", 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 Gt=Not\circ Leq}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>G</mi> <mi>t</mi> <mo>=</mo> <mi>N</mi> <mi>o</mi> <mi>t</mi> <mo>&#x2218;<!-- ∘ --></mo> <mi>L</mi> <mi>e</mi> <mi>q</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Gt=Not\circ Leq}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/32ba85e321f2a83451a98969900ecb11265e64ef" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:15.726ex; height:2.509ex;" alt="{\displaystyle Gt=Not\circ Leq}" /></span> implements "greater-than". </p> <div class="mw-heading mw-heading3"><h3 id="Other_operations_on_natural_numbers">Other operations on natural numbers</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=15" title="Edit section: Other operations on natural numbers"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/Exponentiation" title="Exponentiation">Exponentiation</a> and <a href="/wiki/Primality_test" title="Primality test">primality testing</a> are primitive recursive. Given primitive recursive functions <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 e}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>e</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle e}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/cd253103f0876afc68ebead27a5aa9867d927467" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.083ex; height:1.676ex;" alt="{\displaystyle e}" /></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 f}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>f</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle f}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/132e57acb643253e7810ee9702d9581f159a1c61" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.279ex; height:2.509ex;" alt="{\displaystyle f}" /></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 g}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>g</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle g}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d3556280e66fe2c0d0140df20935a6f057381d77" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.116ex; height:2.009ex;" alt="{\displaystyle g}" /></span>, 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 h}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>h</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle h}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b26be3e694314bc90c3215047e4a2010c6ee184a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.339ex; height:2.176ex;" alt="{\displaystyle h}" /></span>, a function that returns the value of <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 g}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>g</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle g}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d3556280e66fe2c0d0140df20935a6f057381d77" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.116ex; height:2.009ex;" alt="{\displaystyle g}" /></span> when <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 e\leq f}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>e</mi> <mo>&#x2264;<!-- ≤ --></mo> <mi>f</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle e\leq f}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/795281fe9b79eda9ca0b4c5132951d284c2d2f64" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.461ex; height:2.509ex;" alt="{\displaystyle e\leq f}" /></span> and the value of <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 h}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>h</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle h}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b26be3e694314bc90c3215047e4a2010c6ee184a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.339ex; height:2.176ex;" alt="{\displaystyle h}" /></span> otherwise is primitive recursive. </p> <div class="mw-heading mw-heading3"><h3 id="Operations_on_integers_and_rational_numbers">Operations on integers and rational numbers</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=16" title="Edit section: Operations on integers and rational numbers"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>By using <a href="/wiki/G%C3%B6del_numbering" title="Gödel numbering">Gödel numberings</a>, the primitive recursive functions can be extended to operate on other objects such as integers and <a href="/wiki/Rational_number" title="Rational number">rational numbers</a>. If integers are encoded by Gödel numbers in a standard way, the arithmetic operations including addition, subtraction, and multiplication are all primitive recursive. Similarly, if the rationals are represented by Gödel numbers then the <a href="/wiki/Field_(mathematics)" title="Field (mathematics)">field</a> operations are all primitive recursive. </p> <div class="mw-heading mw-heading3"><h3 id="Some_common_primitive_recursive_functions">Some common primitive recursive functions</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=17" title="Edit section: Some common primitive recursive functions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The following examples and definitions are from <a href="#CITEREFKleene1952">Kleene (1952</a>, pp.&#160;223–231). Many appear with proofs. Most also appear with similar names, either as proofs or as examples, in <a href="#CITEREFBoolosBurgessJeffrey2002">Boolos, Burgess &amp; Jeffrey (2002</a>, pp.&#160;63–70) they add the logarithm lo(x, y) or lg(x, y) depending on the exact derivation. </p><p>In the following the mark " ' ", e.g. a', is the primitive mark meaning "the successor of", usually thought of as " +1", e.g. a +1 =<sub>def</sub> a'. The functions 16–20 and #G are of particular interest with respect to converting primitive recursive predicates to, and extracting them from, their "arithmetical" form expressed as <a href="/wiki/G%C3%B6del_number" class="mw-redirect" title="Gödel number">Gödel numbers</a>. </p> <dl><dd><ol><li>Addition: a+b</li> <li>Multiplication: a×b</li> <li>Exponentiation: a<sup>b</sup></li> <li>Factorial a!&#160;: 0! = 1, a'! = a!×a'</li> <li>pred(a): (Predecessor or decrement): If a &gt; 0 then a−1 else 0</li> <li>Proper subtraction a ∸ b: If a ≥ b then a−b else 0</li> <li>Minimum(a<sub>1</sub>, ... a<sub>n</sub>)</li> <li>Maximum(a<sub>1</sub>, ... a<sub>n</sub>)</li> <li>Absolute difference: | a−b | =<sub>def</sub> (a ∸ b) + (b ∸ a)</li> <li>~sg(a): NOT[signum(a)]: If a=0 then 1 else 0</li> <li>sg(a): signum(a): If a=0 then 0 else 1</li> <li>a | b: (a divides b): If b=k×a for some k then 0 else 1</li> <li>Remainder(a, b): the leftover if b does not divide a "evenly". Also called MOD(a, b)</li> <li>a = b: sg | a − b | (Kleene's convention was to represent <i>true</i> by 0 and <i>false</i> by 1; presently, especially in computers, the most common convention is the reverse, namely to represent <i>true</i> by 1 and <i>false</i> by 0, which amounts to changing sg into ~sg here and in the next item)</li> <li>a &lt; b: sg( a' ∸ b )</li> <li>Pr(a): a is a prime number Pr(a) =<sub>def</sub> a&gt;1 &amp; NOT(Exists c)<sub>1&lt;c&lt;a</sub> [ c|a ]</li> <li>p<sub>i</sub>: the i+1th prime number</li> <li>(a)<sub>i</sub>: exponent of p<sub>i</sub> in a: the unique x such that p<sub>i</sub><sup>x</sup>|a &amp; NOT(p<sub>i</sub><sup>x'</sup>|a)</li> <li>lh(a): the "length" or number of non-vanishing exponents in a</li> <li>lo(a, b): (logarithm of a to base b): If a, b &gt; 1 then the greatest x such that b<sup>x</sup> | a else 0</li></ol></dd></dl> <dl><dd><i>In the following, the abbreviation <b>x</b> =<sub>def</sub> x<sub>1</sub>, ... x<sub>n</sub>; subscripts may be applied if the meaning requires.</i></dd></dl> <ul><li>#A: A function φ definable explicitly from functions Ψ and constants q<sub>1</sub>, ... q<sub>n</sub> is primitive recursive in Ψ.</li> <li>#B: The finite sum Σ<sub>y&lt;z</sub> ψ(<b>x</b>, y) and product Π<sub>y&lt;z</sub>ψ(<b>x</b>, y) are primitive recursive in ψ.</li> <li>#C: A <i>predicate</i> P obtained by substituting functions χ<sub>1</sub>,..., χ<sub>m</sub> for the respective variables of a predicate Q is primitive recursive in χ<sub>1</sub>,..., χ<sub>m</sub>, Q.</li> <li>#D: The following <i>predicates</i> are primitive recursive in Q and R:</li></ul> <dl><dd><dl><dd><ul><li>NOT_Q(<b>x</b>) .</li> <li>Q OR R: Q(<b>x</b>) V R(<b>x</b>),</li> <li>Q AND R: Q(<b>x</b>) &amp; R(<b>x</b>),</li> <li>Q IMPLIES R: Q(<b>x</b>) → R(<b>x</b>)</li> <li>Q is equivalent to R: Q(<b>x</b>) ≡ R(<b>x</b>)</li></ul></dd></dl></dd></dl> <ul><li>#E: The following <i>predicates</i> are primitive recursive in the <i>predicate</i> R:</li></ul> <dl><dd><dl><dd><ul><li>(Ey)<sub>y&lt;z</sub> R(<b>x</b>, y) where (Ey)<sub>y&lt;z</sub> denotes "there exists at least one y that is less than z such that"</li> <li>(y)<sub>y&lt;z</sub> R(<b>x</b>, y) where (y)<sub>y&lt;z</sub> denotes "for all y less than z it is true that"</li> <li>μy<sub>y&lt;z</sub> R(<b>x</b>, y). The operator μy<sub>y&lt;z</sub> R(<b>x</b>, y) is a <i>bounded</i> form of the so-called minimization- or <a href="/wiki/Mu-operator" class="mw-redirect" title="Mu-operator">mu-operator</a>: Defined as "the least value of y less than z such that R(<b>x</b>, y) is true; or z if there is no such value."</li></ul></dd></dl></dd></dl> <ul><li>#F: Definition by cases: The function defined thus, where Q<sub>1</sub>, ..., Q<sub>m</sub> are mutually exclusive <i>predicates</i> (or "ψ(<b>x</b>) shall have the value given by the first clause that applies), is primitive recursive in φ<sub>1</sub>, ..., Q<sub>1</sub>, ... Q<sub>m</sub>:</li></ul> <dl><dd><dl><dd>φ(<b>x</b>) = <ul><li>φ<sub>1</sub>(<b>x</b>) if Q<sub>1</sub>(<b>x</b>) is true,</li> <li>. . . . . . . . . . . . . . . . . . .</li> <li>φ<sub>m</sub>(<b>x</b>) if Q<sub>m</sub>(<b>x</b>) is true</li> <li>φ<sub>m+1</sub>(<b>x</b>) otherwise</li></ul></dd></dl></dd></dl> <ul><li>#G: If φ satisfies the equation:</li></ul> <dl><dd><dl><dd>φ(y,<b>x</b>) = χ(y, COURSE-φ(y; x<sub>2</sub>, ... x<sub>n</sub> ), x<sub>2</sub>, ... x<sub>n</sub> then φ is primitive recursive in χ. The value COURSE-φ(y; <b>x</b><sub>2 to n</sub> ) of the course-of-values function encodes the sequence of values φ(0,<b>x</b><sub>2 to n</sub>), ..., φ(y-1,<b>x</b><sub>2 to n</sub>) of the original function.</dd></dl></dd></dl> <div class="mw-heading mw-heading2"><h2 id="Relationship_to_recursive_functions">Relationship to recursive functions</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=18" title="Edit section: Relationship to recursive functions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The broader class of <a href="/wiki/Partial_recursive_function" class="mw-redirect" title="Partial recursive function">partial recursive functions</a> is defined by introducing an <a href="/wiki/Mu_operator" class="mw-redirect" title="Mu operator">unbounded search operator</a>. The use of this operator may result in a <a href="/wiki/Partial_function" title="Partial function">partial function</a>, that is, a relation with <i>at most</i> one value for each argument, but does not necessarily have <i>any</i> value for any argument (see <a href="/wiki/Domain_of_a_function" title="Domain of a function">domain</a>). An equivalent definition states that a partial recursive function is one that can be computed by a <a href="/wiki/Turing_machine" title="Turing machine">Turing machine</a>. A total recursive function is a partial recursive function that is defined for every input. </p><p>Every primitive recursive function is total recursive, but not all total recursive functions are primitive recursive. The <a href="/wiki/Ackermann_function" title="Ackermann function">Ackermann function</a> <i>A</i>(<i>m</i>,<i>n</i>) is a well-known example of a total recursive function (in fact, provable total), that is not primitive recursive. There is a characterization of the primitive recursive functions as a subset of the total recursive functions using the Ackermann function. This characterization states that a function is primitive recursive <a href="/wiki/If_and_only_if" title="If and only if">if and only if</a> there is a natural number <i>m</i> such that the function can be computed by a Turing <a href="/wiki/Machine_that_always_halts" class="mw-redirect" title="Machine that always halts">machine that always halts</a> within A(<i>m</i>,<i>n</i>) or fewer steps, where <i>n</i> is the sum of the arguments of the primitive recursive function.<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">&#91;</span>5<span class="cite-bracket">&#93;</span></a></sup> </p><p>An important property of the primitive recursive functions is that they are a <a href="/wiki/Recursively_enumerable" class="mw-redirect" title="Recursively enumerable">recursively enumerable</a> subset of the set of all <a href="/wiki/Total_recursive_function" class="mw-redirect" title="Total recursive function">total recursive functions</a> (which is not itself recursively enumerable). This means that there is a single computable function <i>f</i>(<i>m</i>,<i>n</i>) that enumerates the primitive recursive functions, namely: </p> <ul><li>For every primitive recursive function <i>g</i>, there is an <i>m</i> such that <i>g</i>(<i>n</i>) = <i>f</i>(<i>m</i>,<i>n</i>) for all <i>n</i>, and</li> <li>For every <i>m</i>, the function <i>h</i>(<i>n</i>) = <i>f</i>(<i>m</i>,<i>n</i>) is primitive recursive.</li></ul> <p><i>f</i> can be explicitly constructed by iteratively repeating all possible ways of creating primitive recursive functions. Thus, it is provably total. One can use a <a href="/wiki/Diagonal_lemma" title="Diagonal lemma">diagonalization</a> argument to show that <i>f</i> is not recursive primitive in itself: had it been such, so would be <i>h</i>(<i>n</i>) = <i>f</i>(<i>n</i>,<i>n</i>)+1. But if this equals some primitive recursive function, there is an <i>m</i> such that <i>h</i>(<i>n</i>) = <i>f</i>(<i>m</i>,<i>n</i>) for all <i>n</i>, and then <i>h</i>(<i>m</i>) = <i>f</i>(<i>m</i>,<i>m</i>), leading to contradiction. </p><p>However, the set of primitive recursive functions is not the <i>largest</i> recursively enumerable subset of the set of all total recursive functions. For example, the set of provably total functions (in Peano arithmetic) is also recursively enumerable, as one can enumerate all the proofs of the theory. While all primitive recursive functions are provably total, the converse is not true. </p> <div class="mw-heading mw-heading2"><h2 id="Limitations">Limitations</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=19" title="Edit section: Limitations"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Primitive recursive functions tend to correspond very closely with our intuition of what a computable function must be. Certainly the initial functions are intuitively computable (in their very simplicity), and the two operations by which one can create new primitive recursive functions are also very straightforward. However, the set of primitive recursive functions does not include every possible total computable function—this can be seen with a variant of <a href="/wiki/Cantor%27s_diagonal_argument" title="Cantor&#39;s diagonal argument">Cantor's diagonal argument</a>. This argument provides a total computable function that is not primitive recursive. A sketch of the proof is as follows: </p> <style data-mw-deduplicate="TemplateStyles:r996643573">.mw-parser-output .block-indent{padding-left:3em;padding-right:0;overflow:hidden}</style><div class="block-indent">The primitive recursive functions of one argument (i.e., unary functions) can be <a href="/wiki/Recursively_enumerable_set" class="mw-redirect" title="Recursively enumerable set">computably enumerated</a>. This enumeration uses the definitions of the primitive recursive functions (which are essentially just expressions with the composition and primitive recursion operations as operators and the basic primitive recursive functions as atoms), and can be assumed to contain every definition once, even though a same <i>function</i> will occur many times on the list (since many definitions define the same function; indeed simply composing by the <a href="/wiki/Identity_function" title="Identity function">identity function</a> generates infinitely many definitions of any one primitive recursive function). This means that the <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>-th definition of a primitive recursive function in this enumeration can be effectively determined from <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>. Indeed if one uses some <a href="/wiki/G%C3%B6del_numbering" title="Gödel numbering">Gödel numbering</a> to encode definitions as numbers, then this <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>-th definition in the list is computed by a primitive recursive function of <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>. Let <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_{n}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>f</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle f_{n}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b2702450f0458a5e01a698e248af552a7fab2b50" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.358ex; height:2.509ex;" alt="{\displaystyle f_{n}}" /></span> denote the unary primitive recursive function given by this definition. <p>Now define the "evaluator function" <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 ev}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>e</mi> <mi>v</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle ev}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c9e901132d15fa7733d1458e7926ba558a7945c0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.211ex; height:1.676ex;" alt="{\displaystyle ev}" /></span> with two arguments, by <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 ev(i,j)=f_{i}(j)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>e</mi> <mi>v</mi> <mo stretchy="false">(</mo> <mi>i</mi> <mo>,</mo> <mi>j</mi> <mo stretchy="false">)</mo> <mo>=</mo> <msub> <mi>f</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>j</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle ev(i,j)=f_{i}(j)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b7176019cf50e992f29216a260c45c3b93640aa3" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:14.62ex; height:2.843ex;" alt="{\displaystyle ev(i,j)=f_{i}(j)}" /></span>. Clearly <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 ev}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>e</mi> <mi>v</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle ev}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c9e901132d15fa7733d1458e7926ba558a7945c0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.211ex; height:1.676ex;" alt="{\displaystyle ev}" /></span> is total and computable, since one can effectively determine the definition of <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_{i}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>f</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle f_{i}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/65da883ca3d16b461e46c94777b0d9c4aa010e79" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.939ex; height:2.509ex;" alt="{\displaystyle f_{i}}" /></span>, and being a primitive recursive function <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_{i}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>f</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle f_{i}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/65da883ca3d16b461e46c94777b0d9c4aa010e79" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.939ex; height:2.509ex;" alt="{\displaystyle f_{i}}" /></span> is itself total and computable, so <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_{i}(j)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>f</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>j</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle f_{i}(j)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ebecb21e8503ac411e9a0de08c5eb8112a5839a8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:4.706ex; height:2.843ex;" alt="{\displaystyle f_{i}(j)}" /></span> is always defined and effectively computable. However a diagonal argument will show that the function <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 ev}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>e</mi> <mi>v</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle ev}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c9e901132d15fa7733d1458e7926ba558a7945c0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.211ex; height:1.676ex;" alt="{\displaystyle ev}" /></span> of two arguments is not primitive recursive. </p> Suppose <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 ev}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>e</mi> <mi>v</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle ev}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c9e901132d15fa7733d1458e7926ba558a7945c0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.211ex; height:1.676ex;" alt="{\displaystyle ev}" /></span> were primitive recursive, then the unary function <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 g}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>g</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle g}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d3556280e66fe2c0d0140df20935a6f057381d77" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.116ex; height:2.009ex;" alt="{\displaystyle g}" /></span> defined by <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 g(i)=S(ev(i,i))}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>g</mi> <mo stretchy="false">(</mo> <mi>i</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>S</mi> <mo stretchy="false">(</mo> <mi>e</mi> <mi>v</mi> <mo stretchy="false">(</mo> <mi>i</mi> <mo>,</mo> <mi>i</mi> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle g(i)=S(ev(i,i))}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a9b82dff3bb46d7fe31849576cfb4a693fdb2fe9" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:16.794ex; height:2.843ex;" alt="{\displaystyle g(i)=S(ev(i,i))}" /></span> would also be primitive recursive, as it is defined by composition from the successor function 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 ev}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>e</mi> <mi>v</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle ev}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c9e901132d15fa7733d1458e7926ba558a7945c0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.211ex; height:1.676ex;" alt="{\displaystyle ev}" /></span>. But then <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 g}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>g</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle g}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d3556280e66fe2c0d0140df20935a6f057381d77" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.116ex; height:2.009ex;" alt="{\displaystyle g}" /></span> occurs in the enumeration, so there is some number <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> such that <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 g=f_{n}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>g</mi> <mo>=</mo> <msub> <mi>f</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle g=f_{n}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/103493a6d369c80aa5688a2a4308fb6a2b023bcd" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:6.572ex; height:2.509ex;" alt="{\displaystyle g=f_{n}}" /></span>. But now <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 g(n)=S(ev(n,n))=S(f_{n}(n))=S(g(n))}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>g</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>S</mi> <mo stretchy="false">(</mo> <mi>e</mi> <mi>v</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo>,</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> <mo>=</mo> <mi>S</mi> <mo stretchy="false">(</mo> <msub> <mi>f</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> <mo>=</mo> <mi>S</mi> <mo stretchy="false">(</mo> <mi>g</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle g(n)=S(ev(n,n))=S(f_{n}(n))=S(g(n))}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/81b5d1bac6f776de46fdb12a5219af752084b7f7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:41.266ex; height:2.843ex;" alt="{\displaystyle g(n)=S(ev(n,n))=S(f_{n}(n))=S(g(n))}" /></span> gives a contradiction.</div> <p>This argument can be applied to any class of computable (total) functions that can be enumerated in this way, as explained in the article <a href="/wiki/Machine_that_always_halts" class="mw-redirect" title="Machine that always halts">Machine that always halts</a>. Note however that the <i>partial</i> computable functions (those that need not be defined for all arguments) can be explicitly enumerated, for instance by enumerating Turing machine encodings. </p><p>Other examples of total recursive but not primitive recursive functions are known: </p> <ul><li>The function that takes <i>m</i> to <a href="/wiki/Ackermann_function" title="Ackermann function">Ackermann</a>(<i>m</i>,<i>m</i>) is a unary total recursive function that is not primitive recursive.</li> <li>The <a href="/wiki/Paris%E2%80%93Harrington_theorem" title="Paris–Harrington theorem">Paris–Harrington theorem</a> involves a total recursive function that is not primitive recursive.</li> <li>The <a href="/wiki/Sudan_function" title="Sudan function">Sudan function</a></li> <li>The <a href="/wiki/Goodstein_function" class="mw-redirect" title="Goodstein function">Goodstein function</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="Variants">Variants</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=20" title="Edit section: Variants"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="Constant_functions">Constant functions</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=21" title="Edit section: Constant functions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Instead of <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 C_{n}^{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msubsup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle C_{n}^{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9b088b67f00e4739e57c658ac7dd5913898013ac" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.887ex; height:2.843ex;" alt="{\displaystyle C_{n}^{k}}" /></span>, alternative definitions use just one 0-ary <i>zero function</i> <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 C_{0}^{0}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msubsup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle C_{0}^{0}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1de12f06a3041941e852c046cf9b4ce17974bf19" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:2.852ex; height:3.176ex;" alt="{\displaystyle C_{0}^{0}}" /></span> as a primitive function that always returns zero, and built the constant functions from the zero function, the successor function and the composition operator. </p> <div class="mw-heading mw-heading3"><h3 id="Iterative_functions">Iterative functions</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=22" title="Edit section: Iterative functions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Robinson<sup id="cite_ref-FOOTNOTERobinson1947_6-0" class="reference"><a href="#cite_note-FOOTNOTERobinson1947-6"><span class="cite-bracket">&#91;</span>6<span class="cite-bracket">&#93;</span></a></sup> considered various restrictions of the recursion rule. One is the so-called <i>iteration rule</i> where the function <i>h</i> does not have access to the parameters <i>x<sub>i</sub></i> (in this case, we may assume without loss of generality that the function <i>g</i> is just the identity, as the general case can be obtained by substitution): </p> <dl><dd><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 {\begin{aligned}f(0,x)&amp;=x,\\f(S(y),x)&amp;=h(y,f(y,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> <mi>f</mi> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mi>x</mi> <mo>,</mo> </mtd> </mtr> <mtr> <mtd> <mi>f</mi> <mo stretchy="false">(</mo> <mi>S</mi> <mo stretchy="false">(</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mo>,</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mi>h</mi> <mo stretchy="false">(</mo> <mi>y</mi> <mo>,</mo> <mi>f</mi> <mo stretchy="false">(</mo> <mi>y</mi> <mo>,</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}f(0,x)&amp;=x,\\f(S(y),x)&amp;=h(y,f(y,x)).\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/50e6ebf9b39f3878a723882947b44b341da22d88" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:26.357ex; height:6.176ex;" alt="{\displaystyle {\begin{aligned}f(0,x)&amp;=x,\\f(S(y),x)&amp;=h(y,f(y,x)).\end{aligned}}}" /></span></dd></dl> <p>He proved that the class of all primitive recursive functions can still be obtained in this way. </p> <div class="mw-heading mw-heading3"><h3 id="Pure_recursion">Pure recursion</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=23" title="Edit section: Pure recursion"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Another restriction considered by Robinson<sup id="cite_ref-FOOTNOTERobinson1947_6-1" class="reference"><a href="#cite_note-FOOTNOTERobinson1947-6"><span class="cite-bracket">&#91;</span>6<span class="cite-bracket">&#93;</span></a></sup> is <i>pure recursion</i>, where <i>h</i> does not have access to the induction variable <i>y</i>: </p> <dl><dd><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 {\begin{aligned}f(0,x_{1},\ldots ,x_{k})&amp;=g(x_{1},\ldots ,x_{k}),\\f(S(y),x_{1},\ldots ,x_{k})&amp;=h(f(y,x_{1},\ldots ,x_{k}),x_{1},\ldots ,x_{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> <mi>f</mi> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mi>g</mi> <mo stretchy="false">(</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo>,</mo> </mtd> </mtr> <mtr> <mtd> <mi>f</mi> <mo stretchy="false">(</mo> <mi>S</mi> <mo stretchy="false">(</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mi>h</mi> <mo stretchy="false">(</mo> <mi>f</mi> <mo stretchy="false">(</mo> <mi>y</mi> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}f(0,x_{1},\ldots ,x_{k})&amp;=g(x_{1},\ldots ,x_{k}),\\f(S(y),x_{1},\ldots ,x_{k})&amp;=h(f(y,x_{1},\ldots ,x_{k}),x_{1},\ldots ,x_{k}).\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/03a846452f10e63ce61c74b1ad451be81eb72890" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:52.484ex; height:6.176ex;" alt="{\displaystyle {\begin{aligned}f(0,x_{1},\ldots ,x_{k})&amp;=g(x_{1},\ldots ,x_{k}),\\f(S(y),x_{1},\ldots ,x_{k})&amp;=h(f(y,x_{1},\ldots ,x_{k}),x_{1},\ldots ,x_{k}).\end{aligned}}}" /></span></dd></dl> <p>Gladstone<sup id="cite_ref-FOOTNOTEGladstone1967_7-0" class="reference"><a href="#cite_note-FOOTNOTEGladstone1967-7"><span class="cite-bracket">&#91;</span>7<span class="cite-bracket">&#93;</span></a></sup> proved that this rule is enough to generate all primitive recursive functions. Gladstone<sup id="cite_ref-FOOTNOTEGladstone1971_8-0" class="reference"><a href="#cite_note-FOOTNOTEGladstone1971-8"><span class="cite-bracket">&#91;</span>8<span class="cite-bracket">&#93;</span></a></sup> improved this so that even the combination of these two restrictions, i.e., the <i>pure iteration</i> rule below, is enough: </p> <dl><dd><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 {\begin{aligned}f(0,x)&amp;=x,\\f(S(y),x)&amp;=h(f(y,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> <mi>f</mi> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mi>x</mi> <mo>,</mo> </mtd> </mtr> <mtr> <mtd> <mi>f</mi> <mo stretchy="false">(</mo> <mi>S</mi> <mo stretchy="false">(</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mo>,</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mi>h</mi> <mo stretchy="false">(</mo> <mi>f</mi> <mo stretchy="false">(</mo> <mi>y</mi> <mo>,</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}f(0,x)&amp;=x,\\f(S(y),x)&amp;=h(f(y,x)).\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/210b3de7483bb1ba5e9790931ddd9938b64ef954" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:24.168ex; height:6.176ex;" alt="{\displaystyle {\begin{aligned}f(0,x)&amp;=x,\\f(S(y),x)&amp;=h(f(y,x)).\end{aligned}}}" /></span></dd></dl> <p>Further improvements are possible: Severin<sup id="cite_ref-FOOTNOTESeverin2008_9-0" class="reference"><a href="#cite_note-FOOTNOTESeverin2008-9"><span class="cite-bracket">&#91;</span>9<span class="cite-bracket">&#93;</span></a></sup> prove that even the pure iteration rule <i>without parameters</i>, namely </p> <dl><dd><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 {\begin{aligned}f(0)&amp;=0,\\f(S(y))&amp;=h(f(y)),\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>f</mi> <mo stretchy="false">(</mo> <mn>0</mn> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mn>0</mn> <mo>,</mo> </mtd> </mtr> <mtr> <mtd> <mi>f</mi> <mo stretchy="false">(</mo> <mi>S</mi> <mo stretchy="false">(</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mi>h</mi> <mo stretchy="false">(</mo> <mi>f</mi> <mo stretchy="false">(</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> <mo>,</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}f(0)&amp;=0,\\f(S(y))&amp;=h(f(y)),\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b34513a694e7266021a1c3099cba2c2d622054f2" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:19.44ex; height:6.176ex;" alt="{\displaystyle {\begin{aligned}f(0)&amp;=0,\\f(S(y))&amp;=h(f(y)),\end{aligned}}}" /></span></dd></dl> <p>suffices to generate all <a href="/wiki/Unary_operation" title="Unary operation">unary</a> primitive recursive functions if we extend the set of initial functions with truncated subtraction <i>x ∸ y</i>. We get <i>all</i> primitive recursive functions if we additionally include + as an initial function. </p> <div class="mw-heading mw-heading3"><h3 id="Additional_primitive_recursive_forms">Additional primitive recursive forms</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=24" title="Edit section: Additional primitive recursive forms"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Some additional forms of recursion also define functions that are in fact primitive recursive. Definitions in these forms may be easier to find or more natural for reading or writing. <a href="/wiki/Course-of-values_recursion" title="Course-of-values recursion">Course-of-values recursion</a> defines primitive recursive functions. Some forms of <a href="/wiki/Mutual_recursion" title="Mutual recursion">mutual recursion</a> also define primitive recursive functions. </p><p>The functions that can be programmed in the <a href="/wiki/LOOP_(programming_language)" title="LOOP (programming language)">LOOP programming language</a> are exactly the primitive recursive functions. This gives a different characterization of the power of these functions. The main limitation of the LOOP language, compared to a <a href="/wiki/Turing-complete_language" class="mw-redirect" title="Turing-complete language">Turing-complete language</a>, is that in the LOOP language the number of times that each loop will run is specified before the loop begins to run. </p> <div class="mw-heading mw-heading3"><h3 id="Computer_language_definition">Computer language definition</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=25" title="Edit section: Computer language definition"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>An example of a primitive recursive programming language is one that contains basic arithmetic operators (e.g. + and −, or ADD and SUBTRACT), conditionals and comparison (IF-THEN, EQUALS, LESS-THAN), and bounded loops, such as the basic <a href="/wiki/For_loop" title="For loop">for loop</a>, where there is a known or calculable upper bound to all loops (FOR i FROM 1 TO n, with neither i nor n modifiable by the loop body). No control structures of greater generality, such as <a href="/wiki/While_loop" title="While loop">while loops</a> or IF-THEN plus <a href="/wiki/GOTO" class="mw-redirect" title="GOTO">GOTO</a>, are admitted in a primitive recursive language. </p><p>The <a href="/wiki/LOOP_(programming_language)" title="LOOP (programming language)">LOOP language</a>, introduced in a 1967 paper by <a href="/wiki/Albert_R._Meyer" title="Albert R. Meyer">Albert R. Meyer</a> and <a href="/wiki/Dennis_M._Ritchie" class="mw-redirect" title="Dennis M. Ritchie">Dennis M. Ritchie</a>,<sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">&#91;</span>10<span class="cite-bracket">&#93;</span></a></sup> is such a language. Its computing power coincides with the primitive recursive functions. A variant of the LOOP language is <a href="/wiki/Douglas_Hofstadter" title="Douglas Hofstadter">Douglas Hofstadter</a>'s <a href="/wiki/BlooP_and_FlooP" title="BlooP and FlooP">BlooP</a> in <i><a href="/wiki/G%C3%B6del,_Escher,_Bach" title="Gödel, Escher, Bach">Gödel, Escher, Bach</a></i>. Adding unbounded loops (WHILE, GOTO) makes the language <a href="/wiki/General_recursive_function" title="General recursive function">general recursive</a> and <a href="/wiki/Turing_completeness" title="Turing completeness">Turing-complete</a>, as are all real-world computer programming languages. </p><p>The definition of primitive recursive functions implies that their computation halts on every input (after a finite number of steps). On the other hand, the <a href="/wiki/Halting_problem" title="Halting problem">halting problem</a> is <a href="/wiki/Undecidable_problem" title="Undecidable problem">undecidable</a> for general recursive functions. </p> <div class="mw-heading mw-heading2"><h2 id="Finitism_and_consistency_results">Finitism and consistency results</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=26" title="Edit section: Finitism and consistency results"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The primitive recursive functions are closely related to mathematical <a href="/wiki/Finitism" title="Finitism">finitism</a>, and are used in several contexts in mathematical logic where a particularly constructive system is desired. <a href="/wiki/Primitive_recursive_arithmetic" title="Primitive recursive arithmetic">Primitive recursive arithmetic</a> (PRA), a formal axiom system for the natural numbers and the primitive recursive functions on them, is often used for this purpose. </p><p>PRA is much weaker than <a href="/wiki/Peano_arithmetic" class="mw-redirect" title="Peano arithmetic">Peano arithmetic</a>, which is not a finitistic system. Nevertheless, many results in <a href="/wiki/Number_theory" title="Number theory">number theory</a> and in <a href="/wiki/Proof_theory" title="Proof theory">proof theory</a> can be proved in PRA. For example, <a href="/wiki/G%C3%B6del%27s_incompleteness_theorem" class="mw-redirect" title="Gödel&#39;s incompleteness theorem">Gödel's incompleteness theorem</a> can be formalized into PRA, giving the following theorem: </p> <dl><dd>If <i>T</i> is a theory of arithmetic satisfying certain hypotheses, with Gödel sentence <i>G</i><sub><i>T</i></sub>, then PRA proves the implication Con(<i>T</i>)→<i>G</i><sub><i>T</i></sub>.</dd></dl> <p>Similarly, many of the syntactic results in proof theory can be proved in PRA, which implies that there are primitive recursive functions that carry out the corresponding syntactic transformations of proofs. </p><p>In proof theory and <a href="/wiki/Set_theory" title="Set theory">set theory</a>, there is an interest in finitistic <a href="/wiki/Consistency_proof" class="mw-redirect" title="Consistency proof">consistency proofs</a>, that is, consistency proofs that themselves are finitistically acceptable. Such a proof establishes that the consistency of a theory <i>T</i> implies the consistency of a theory <i>S</i> by producing a primitive recursive function that can transform any proof of an inconsistency from <i>S</i> into a proof of an inconsistency from <i>T</i>. One sufficient condition for a consistency proof to be finitistic is the ability to formalize it in PRA. For example, many consistency results in set theory that are obtained by <a href="/wiki/Forcing_(mathematics)" title="Forcing (mathematics)">forcing</a> can be recast as syntactic proofs that can be formalized in PRA. </p> <div class="mw-heading mw-heading2"><h2 id="History">History</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=27" title="Edit section: History"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/Recursive_definition" title="Recursive definition">Recursive definitions</a> had been used more or less formally in mathematics before, but the construction of primitive recursion is traced back to <a href="/wiki/Richard_Dedekind" title="Richard Dedekind">Richard Dedekind</a>'s theorem 126 of his <i>Was sind und was sollen die Zahlen?</i> (1888). This work was the first to give a proof that a certain recursive construction defines a unique function.<sup id="cite_ref-Smith2013_11-0" class="reference"><a href="#cite_note-Smith2013-11"><span class="cite-bracket">&#91;</span>11<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-Tourlakis2003_12-0" class="reference"><a href="#cite_note-Tourlakis2003-12"><span class="cite-bracket">&#91;</span>12<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-Downey2014_13-0" class="reference"><a href="#cite_note-Downey2014-13"><span class="cite-bracket">&#91;</span>13<span class="cite-bracket">&#93;</span></a></sup> </p><p><a href="/wiki/Primitive_recursive_arithmetic" title="Primitive recursive arithmetic">Primitive recursive arithmetic</a> was first proposed by <a href="/wiki/Thoralf_Skolem" title="Thoralf Skolem">Thoralf Skolem</a><sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">&#91;</span>14<span class="cite-bracket">&#93;</span></a></sup> in 1923. </p><p>The current terminology was coined by <a href="/wiki/R%C3%B3zsa_P%C3%A9ter" title="Rózsa Péter">Rózsa Péter</a> (1934) after <a href="/wiki/Wilhelm_Ackermann" title="Wilhelm Ackermann">Ackermann</a> had proved in 1928 that the function which today is named after him was not primitive recursive, an event which prompted the need to rename what until then were simply called recursive functions.<sup id="cite_ref-Tourlakis2003_12-1" class="reference"><a href="#cite_note-Tourlakis2003-12"><span class="cite-bracket">&#91;</span>12<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-Downey2014_13-1" class="reference"><a href="#cite_note-Downey2014-13"><span class="cite-bracket">&#91;</span>13<span class="cite-bracket">&#93;</span></a></sup> </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=Primitive_recursive_function&amp;action=edit&amp;section=28" title="Edit section: See also"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/Grzegorczyk_hierarchy" title="Grzegorczyk hierarchy">Grzegorczyk hierarchy</a></li> <li><a href="/wiki/Recursion_(computer_science)" title="Recursion (computer science)">Recursion (computer science)</a></li> <li><a href="/wiki/Primitive_recursive_functional" title="Primitive recursive functional">Primitive recursive functional</a></li> <li><a href="/wiki/Double_recursion" title="Double recursion">Double recursion</a></li> <li><a href="/wiki/Primitive_recursive_set_function" title="Primitive recursive set function">Primitive recursive set function</a></li> <li><a href="/wiki/Primitive_recursive_ordinal_function" class="mw-redirect" title="Primitive recursive ordinal function">Primitive recursive ordinal function</a></li> <li><a href="/wiki/Tail_call" title="Tail call">Tail call</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="Notes">Notes</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Primitive_recursive_function&amp;action=edit&amp;section=29" title="Edit section: Notes"><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 mw-references-columns"><ol class="references"> <li id="cite_note-FOOTNOTEBrainerdLandweber1974-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEBrainerdLandweber1974_1-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFBrainerdLandweber1974">Brainerd &amp; Landweber 1974</a>.</span> </li> <li id="cite_note-FOOTNOTEHartmanis1989-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEHartmanis1989_2-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFHartmanis1989">Hartmanis 1989</a>.</span> </li> <li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text">E.g.: <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="CITEREFHenk_Barendregt1990" class="citation cs2"><a href="/wiki/Henk_Barendregt" title="Henk Barendregt">Henk Barendregt</a> (1990), "Functional Programming and Lambda Calculus", in <a href="/wiki/Jan_van_Leeuwen" title="Jan van Leeuwen">Jan van Leeuwen</a> (ed.), <i>Formal Models and Semantics</i>, Handbook of Theoretical Computer Science, vol.&#160;B, Elsevier, pp.&#160;<span class="nowrap">321–</span>364, <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0-444-88074-7" title="Special:BookSources/0-444-88074-7"><bdi>0-444-88074-7</bdi></a></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.atitle=Functional+Programming+and+Lambda+Calculus&amp;rft.btitle=Formal+Models+and+Semantics&amp;rft.series=Handbook+of+Theoretical+Computer+Science&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E321-%3C%2Fspan%3E364&amp;rft.pub=Elsevier&amp;rft.date=1990&amp;rft.isbn=0-444-88074-7&amp;rft.au=Henk+Barendregt&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3APrimitive+recursive+function" class="Z3988"></span> Here: 2.2.6 <i>initial functions</i>, Def.2.2.7 <i>primitive recursion</i>, p.331-332.</span> </li> <li id="cite_note-FOOTNOTEKleene1952226–227-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEKleene1952226–227_4-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFKleene1952">Kleene 1952</a>, pp.&#160;226–227.</span> </li> <li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text">This follows from the facts that the functions of this form are the most quickly growing primitive recursive functions, and that a function is primitive recursive if and only if its time complexity is bounded by a primitive recursive function. For the former, see <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFLinz2011" class="citation cs2">Linz, Peter (2011), <a rel="nofollow" class="external text" href="https://books.google.com/books?id=hsxDiWvVdBcC&amp;pg=PA332"><i>An Introduction to Formal Languages and Automata</i></a>, Jones &amp; Bartlett Publishers, p.&#160;332, <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/9781449615529" title="Special:BookSources/9781449615529"><bdi>9781449615529</bdi></a></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=An+Introduction+to+Formal+Languages+and+Automata&amp;rft.pages=332&amp;rft.pub=Jones+%26+Bartlett+Publishers&amp;rft.date=2011&amp;rft.isbn=9781449615529&amp;rft.aulast=Linz&amp;rft.aufirst=Peter&amp;rft_id=https%3A%2F%2Fbooks.google.com%2Fbooks%3Fid%3DhsxDiWvVdBcC%26pg%3DPA332&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3APrimitive+recursive+function" class="Z3988"></span>. For the latter, see <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFMooreMertens2011" class="citation cs2"><a href="/wiki/Cristopher_Moore" title="Cristopher Moore">Moore, Cristopher</a>; Mertens, Stephan (2011), <a rel="nofollow" class="external text" href="https://books.google.com/books?id=jnGKbpMV8xoC&amp;pg=PA287"><i>The Nature of Computation</i></a>, Oxford University Press, p.&#160;287, <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/9780191620805" title="Special:BookSources/9780191620805"><bdi>9780191620805</bdi></a></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=The+Nature+of+Computation&amp;rft.pages=287&amp;rft.pub=Oxford+University+Press&amp;rft.date=2011&amp;rft.isbn=9780191620805&amp;rft.aulast=Moore&amp;rft.aufirst=Cristopher&amp;rft.au=Mertens%2C+Stephan&amp;rft_id=https%3A%2F%2Fbooks.google.com%2Fbooks%3Fid%3DjnGKbpMV8xoC%26pg%3DPA287&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3APrimitive+recursive+function" class="Z3988"></span></span> </li> <li id="cite_note-FOOTNOTERobinson1947-6"><span class="mw-cite-backlink">^ <a href="#cite_ref-FOOTNOTERobinson1947_6-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-FOOTNOTERobinson1947_6-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><a href="#CITEREFRobinson1947">Robinson 1947</a>.</span> </li> <li id="cite_note-FOOTNOTEGladstone1967-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEGladstone1967_7-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFGladstone1967">Gladstone 1967</a>.</span> </li> <li id="cite_note-FOOTNOTEGladstone1971-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEGladstone1971_8-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFGladstone1971">Gladstone 1971</a>.</span> </li> <li id="cite_note-FOOTNOTESeverin2008-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTESeverin2008_9-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFSeverin2008">Severin 2008</a>.</span> </li> <li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFMeyerRitchie1967" class="citation cs2"><a href="/wiki/Albert_R._Meyer" title="Albert R. Meyer">Meyer, Albert R.</a>; <a href="/wiki/Dennis_Ritchie" title="Dennis Ritchie">Ritchie, Dennis M.</a> (1967), "The complexity of loop programs", <i>ACM '67: Proceedings of the 1967 22nd national conference</i>, pp.&#160;<span class="nowrap">465–</span>469, <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F800196.806014">10.1145/800196.806014</a></span></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.atitle=The+complexity+of+loop+programs&amp;rft.btitle=ACM+%2767%3A+Proceedings+of+the+1967+22nd+national+conference&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E465-%3C%2Fspan%3E469&amp;rft.date=1967&amp;rft_id=info%3Adoi%2F10.1145%2F800196.806014&amp;rft.aulast=Meyer&amp;rft.aufirst=Albert+R.&amp;rft.au=Ritchie%2C+Dennis+M.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3APrimitive+recursive+function" class="Z3988"></span></span> </li> <li id="cite_note-Smith2013-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-Smith2013_11-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFPeter_Smith2013" class="citation cs2">Peter Smith (2013), <a rel="nofollow" class="external text" href="https://www.logicmatters.net/igt/"><i>An Introduction to Gödel's Theorems</i></a> (2nd&#160;ed.), Cambridge University Press, pp.&#160;<span class="nowrap">98–</span>99, <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-1-107-02284-3" title="Special:BookSources/978-1-107-02284-3"><bdi>978-1-107-02284-3</bdi></a></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=An+Introduction+to+G%C3%B6del%27s+Theorems&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E98-%3C%2Fspan%3E99&amp;rft.edition=2nd&amp;rft.pub=Cambridge+University+Press&amp;rft.date=2013&amp;rft.isbn=978-1-107-02284-3&amp;rft.au=Peter+Smith&amp;rft_id=https%3A%2F%2Fwww.logicmatters.net%2Figt%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3APrimitive+recursive+function" class="Z3988"></span></span> </li> <li id="cite_note-Tourlakis2003-12"><span class="mw-cite-backlink">^ <a href="#cite_ref-Tourlakis2003_12-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Tourlakis2003_12-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFGeorge_Tourlakis2003" class="citation cs2">George Tourlakis (2003), <i>Lectures in Logic and Set Theory: Volume 1, Mathematical Logic</i>, Cambridge University Press, p.&#160;129, <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-1-139-43942-8" title="Special:BookSources/978-1-139-43942-8"><bdi>978-1-139-43942-8</bdi></a></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Lectures+in+Logic+and+Set+Theory%3A+Volume+1%2C+Mathematical+Logic&amp;rft.pages=129&amp;rft.pub=Cambridge+University+Press&amp;rft.date=2003&amp;rft.isbn=978-1-139-43942-8&amp;rft.au=George+Tourlakis&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3APrimitive+recursive+function" class="Z3988"></span></span> </li> <li id="cite_note-Downey2014-13"><span class="mw-cite-backlink">^ <a href="#cite_ref-Downey2014_13-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Downey2014_13-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFRod_Downey2014" class="citation cs2">Rod Downey, ed. (2014), <i>Turing's Legacy: Developments from Turing's Ideas in Logic</i>, Cambridge University Press, p.&#160;474, <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-1-107-04348-0" title="Special:BookSources/978-1-107-04348-0"><bdi>978-1-107-04348-0</bdi></a></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Turing%27s+Legacy%3A+Developments+from+Turing%27s+Ideas+in+Logic&amp;rft.pages=474&amp;rft.pub=Cambridge+University+Press&amp;rft.date=2014&amp;rft.isbn=978-1-107-04348-0&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3APrimitive+recursive+function" class="Z3988"></span></span> </li> <li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text"><a href="/wiki/Thoralf_Skolem" title="Thoralf Skolem">Thoralf Skolem</a> (1923) "The foundations of elementary arithmetic" in <a href="/wiki/Jean_van_Heijenoort" title="Jean van Heijenoort">Jean van Heijenoort</a>, translator and ed. (1967) <i>From Frege to Gödel: A Source Book in Mathematical Logic, 1879-1931</i>. Harvard Univ. Press: 302-33.</span> </li> </ol></div></div> <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=Primitive_recursive_function&amp;action=edit&amp;section=30" title="Edit section: References"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFBrainerdLandweber1974" class="citation cs2">Brainerd, W.S.; Landweber, L.H. (1974), <i>Theory of Computation</i>, Wiley, <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0471095850" title="Special:BookSources/0471095850"><bdi>0471095850</bdi></a></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Theory+of+Computation&amp;rft.pub=Wiley&amp;rft.date=1974&amp;rft.isbn=0471095850&amp;rft.aulast=Brainerd&amp;rft.aufirst=W.S.&amp;rft.au=Landweber%2C+L.H.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3APrimitive+recursive+function" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFHartmanis1989" class="citation cs2"><a href="/wiki/Juris_Hartmanis" title="Juris Hartmanis">Hartmanis, Juris</a> (1989), "Overview of Computational Complexity Theory", <i>Computational Complexity Theory</i>, Proceedings of Symposia in Applied Mathematics, vol.&#160;38, American Mathematical Society, pp.&#160;<span class="nowrap">1–</span>17, <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-8218-0131-4" title="Special:BookSources/978-0-8218-0131-4"><bdi>978-0-8218-0131-4</bdi></a>, <a href="/wiki/MR_(identifier)" class="mw-redirect" title="MR (identifier)">MR</a>&#160;<a rel="nofollow" class="external text" href="https://mathscinet.ams.org/mathscinet-getitem?mr=1020807">1020807</a></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.atitle=Overview+of+Computational+Complexity+Theory&amp;rft.btitle=Computational+Complexity+Theory&amp;rft.series=Proceedings+of+Symposia+in+Applied+Mathematics&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E1-%3C%2Fspan%3E17&amp;rft.pub=American+Mathematical+Society&amp;rft.date=1989&amp;rft.isbn=978-0-8218-0131-4&amp;rft_id=https%3A%2F%2Fmathscinet.ams.org%2Fmathscinet-getitem%3Fmr%3D1020807%23id-name%3DMR&amp;rft.aulast=Hartmanis&amp;rft.aufirst=Juris&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3APrimitive+recursive+function" class="Z3988"></span></li> <li><a href="/wiki/Robert_I._Soare" title="Robert I. Soare">Robert I. Soare</a>, <i>Recursively Enumerable Sets and Degrees</i>, Springer-Verlag, 1987. <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0-387-15299-7" title="Special:BookSources/0-387-15299-7">0-387-15299-7</a></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFKleene1952" class="citation cs2"><a href="/wiki/Stephen_Cole_Kleene" title="Stephen Cole Kleene">Kleene, Stephen Cole</a> (1952), <i>Introduction to Metamathematics</i> (7th [1974] reprint; 2nd&#160;ed.), <a href="/wiki/North-Holland_Publishing_Company" class="mw-redirect" title="North-Holland Publishing Company">North-Holland Publishing Company</a>, <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0444100881" title="Special:BookSources/0444100881"><bdi>0444100881</bdi></a>, <a href="/wiki/OCLC_(identifier)" class="mw-redirect" title="OCLC (identifier)">OCLC</a>&#160;<a rel="nofollow" class="external text" href="https://search.worldcat.org/oclc/3757798">3757798</a></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Introduction+to+Metamathematics&amp;rft.edition=7th+%5B1974%5D+reprint%3B+2nd&amp;rft.pub=North-Holland+Publishing+Company&amp;rft.date=1952&amp;rft_id=info%3Aoclcnum%2F3757798&amp;rft.isbn=0444100881&amp;rft.aulast=Kleene&amp;rft.aufirst=Stephen+Cole&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3APrimitive+recursive+function" class="Z3988"></span> Chapter XI. General Recursive Functions §57</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFBoolosBurgessJeffrey2002" class="citation cs2"><a href="/wiki/George_Boolos" title="George Boolos">Boolos, George</a>; <a href="/wiki/John_P._Burgess" title="John P. Burgess">Burgess, John</a>; <a href="/wiki/Richard_Jeffrey" title="Richard Jeffrey">Jeffrey, Richard</a> (2002), <i>Computability and Logic</i> (4th&#160;ed.), Cambridge University Press, pp.&#160;<span class="nowrap">70–</span>71, <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/9780521007580" title="Special:BookSources/9780521007580"><bdi>9780521007580</bdi></a></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Computability+and+Logic&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E70-%3C%2Fspan%3E71&amp;rft.edition=4th&amp;rft.pub=Cambridge+University+Press&amp;rft.date=2002&amp;rft.isbn=9780521007580&amp;rft.aulast=Boolos&amp;rft.aufirst=George&amp;rft.au=Burgess%2C+John&amp;rft.au=Jeffrey%2C+Richard&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3APrimitive+recursive+function" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFSoare1996" class="citation cs2">Soare, Robert I. (1996), <a rel="nofollow" class="external text" href="https://scholar.archive.org/work/ruvjr6nkyre4nfxjdme2refpwe">"Computability and recursion"</a>, <i>The Bulletin of Symbolic Logic</i>, <b>2</b> (3): <span class="nowrap">284–</span>321, <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.2307%2F420992">10.2307/420992</a>, <a href="/wiki/JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a>&#160;<a rel="nofollow" class="external text" href="https://www.jstor.org/stable/420992">420992</a>, <a href="/wiki/MR_(identifier)" class="mw-redirect" title="MR (identifier)">MR</a>&#160;<a rel="nofollow" class="external text" href="https://mathscinet.ams.org/mathscinet-getitem?mr=1416870">1416870</a></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=The+Bulletin+of+Symbolic+Logic&amp;rft.atitle=Computability+and+recursion&amp;rft.volume=2&amp;rft.issue=3&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E284-%3C%2Fspan%3E321&amp;rft.date=1996&amp;rft_id=https%3A%2F%2Fmathscinet.ams.org%2Fmathscinet-getitem%3Fmr%3D1416870%23id-name%3DMR&amp;rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F420992%23id-name%3DJSTOR&amp;rft_id=info%3Adoi%2F10.2307%2F420992&amp;rft.aulast=Soare&amp;rft.aufirst=Robert+I.&amp;rft_id=https%3A%2F%2Fscholar.archive.org%2Fwork%2Fruvjr6nkyre4nfxjdme2refpwe&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3APrimitive+recursive+function" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFSeverin2008" class="citation cs2">Severin, Daniel E. (2008), "Unary primitive recursive functions", <i>The Journal of Symbolic Logic</i>, <b>73</b> (4): <span class="nowrap">1122–</span>1138, <a href="/wiki/ArXiv_(identifier)" class="mw-redirect" title="ArXiv (identifier)">arXiv</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://arxiv.org/abs/cs/0603063">cs/0603063</a></span>, <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.2178%2Fjsl%2F1230396909">10.2178/jsl/1230396909</a>, <a href="/wiki/JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a>&#160;<a rel="nofollow" class="external text" href="https://www.jstor.org/stable/275903221">275903221</a>, <a href="/wiki/MR_(identifier)" class="mw-redirect" title="MR (identifier)">MR</a>&#160;<a rel="nofollow" class="external text" href="https://mathscinet.ams.org/mathscinet-getitem?mr=2467207">2467207</a></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=The+Journal+of+Symbolic+Logic&amp;rft.atitle=Unary+primitive+recursive+functions&amp;rft.volume=73&amp;rft.issue=4&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E1122-%3C%2Fspan%3E1138&amp;rft.date=2008&amp;rft_id=info%3Aarxiv%2Fcs%2F0603063&amp;rft_id=https%3A%2F%2Fmathscinet.ams.org%2Fmathscinet-getitem%3Fmr%3D2467207%23id-name%3DMR&amp;rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F275903221%23id-name%3DJSTOR&amp;rft_id=info%3Adoi%2F10.2178%2Fjsl%2F1230396909&amp;rft.aulast=Severin&amp;rft.aufirst=Daniel+E.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3APrimitive+recursive+function" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFRobinson1947" class="citation cs2">Robinson, Raphael M. (1947), "Primitive recursive functions", <i>Bulletin of the American Mathematical Society</i>, <b>53</b> (10): <span class="nowrap">925–</span>942, <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1090%2FS0002-9904-1947-08911-4">10.1090/S0002-9904-1947-08911-4</a></span>, <a href="/wiki/MR_(identifier)" class="mw-redirect" title="MR (identifier)">MR</a>&#160;<a rel="nofollow" class="external text" href="https://mathscinet.ams.org/mathscinet-getitem?mr=0022536">0022536</a></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=Bulletin+of+the+American+Mathematical+Society&amp;rft.atitle=Primitive+recursive+functions&amp;rft.volume=53&amp;rft.issue=10&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E925-%3C%2Fspan%3E942&amp;rft.date=1947&amp;rft_id=info%3Adoi%2F10.1090%2FS0002-9904-1947-08911-4&amp;rft_id=https%3A%2F%2Fmathscinet.ams.org%2Fmathscinet-getitem%3Fmr%3D22536%23id-name%3DMR&amp;rft.aulast=Robinson&amp;rft.aufirst=Raphael+M.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3APrimitive+recursive+function" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFGladstone1967" class="citation cs2">Gladstone, M. D. (1967), "A reduction of the recursion scheme", <i>The Journal of Symbolic Logic</i>, <b>32</b> (4): <span class="nowrap">505–</span>508, <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.2307%2F2270177">10.2307/2270177</a>, <a href="/wiki/JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a>&#160;<a rel="nofollow" class="external text" href="https://www.jstor.org/stable/2270177">2270177</a>, <a href="/wiki/MR_(identifier)" class="mw-redirect" title="MR (identifier)">MR</a>&#160;<a rel="nofollow" class="external text" href="https://mathscinet.ams.org/mathscinet-getitem?mr=0224460">0224460</a></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=The+Journal+of+Symbolic+Logic&amp;rft.atitle=A+reduction+of+the+recursion+scheme&amp;rft.volume=32&amp;rft.issue=4&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E505-%3C%2Fspan%3E508&amp;rft.date=1967&amp;rft_id=https%3A%2F%2Fmathscinet.ams.org%2Fmathscinet-getitem%3Fmr%3D224460%23id-name%3DMR&amp;rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F2270177%23id-name%3DJSTOR&amp;rft_id=info%3Adoi%2F10.2307%2F2270177&amp;rft.aulast=Gladstone&amp;rft.aufirst=M.+D.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3APrimitive+recursive+function" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFGladstone1971" class="citation cs2">Gladstone, M. D. (1971), "Simplifications of the recursion scheme", <i>The Journal of Symbolic Logic</i>, <b>36</b> (4): <span class="nowrap">653–</span>665, <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.2307%2F2272468">10.2307/2272468</a>, <a href="/wiki/JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a>&#160;<a rel="nofollow" class="external text" href="https://www.jstor.org/stable/2272468">2272468</a>, <a href="/wiki/MR_(identifier)" class="mw-redirect" title="MR (identifier)">MR</a>&#160;<a rel="nofollow" class="external text" href="https://mathscinet.ams.org/mathscinet-getitem?mr=0305993">0305993</a></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=The+Journal+of+Symbolic+Logic&amp;rft.atitle=Simplifications+of+the+recursion+scheme&amp;rft.volume=36&amp;rft.issue=4&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E653-%3C%2Fspan%3E665&amp;rft.date=1971&amp;rft_id=https%3A%2F%2Fmathscinet.ams.org%2Fmathscinet-getitem%3Fmr%3D305993%23id-name%3DMR&amp;rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F2272468%23id-name%3DJSTOR&amp;rft_id=info%3Adoi%2F10.2307%2F2272468&amp;rft.aulast=Gladstone&amp;rft.aufirst=M.+D.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3APrimitive+recursive+function" class="Z3988"></span></li></ul> <div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1129693374">.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}</style><style data-mw-deduplicate="TemplateStyles:r1236075235">.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}</style></div><div role="navigation" class="navbox" aria-labelledby="Mathematical_logic326" style="padding:3px"><table class="nowraplinks mw-collapsible mw-collapsed navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374" /><style data-mw-deduplicate="TemplateStyles:r1239400231">.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}</style><div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view"><a href="/wiki/Template:Mathematical_logic" title="Template:Mathematical logic"><abbr title="View this template">v</abbr></a></li><li class="nv-talk"><a href="/wiki/Template_talk:Mathematical_logic" title="Template talk:Mathematical logic"><abbr title="Discuss this template">t</abbr></a></li><li class="nv-edit"><a href="/wiki/Special:EditPage/Template:Mathematical_logic" title="Special:EditPage/Template:Mathematical logic"><abbr title="Edit this template">e</abbr></a></li></ul></div><div id="Mathematical_logic326" style="font-size:114%;margin:0 4em"><a href="/wiki/Mathematical_logic" title="Mathematical logic">Mathematical logic</a></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">General</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Axiom" title="Axiom">Axiom</a> <ul><li><a href="/wiki/List_of_axioms" title="List of axioms">list</a></li></ul></li> <li><a href="/wiki/Cardinality" title="Cardinality">Cardinality</a></li> <li><a href="/wiki/First-order_logic" title="First-order logic">First-order logic</a></li> <li><a href="/wiki/Formal_proof" title="Formal proof">Formal proof</a></li> <li><a href="/wiki/Formal_semantics_(logic)" class="mw-redirect" title="Formal semantics (logic)">Formal semantics</a></li> <li><a href="/wiki/Foundations_of_mathematics" title="Foundations of mathematics">Foundations of mathematics</a></li> <li><a href="/wiki/Information_theory" title="Information theory">Information theory</a></li> <li><a href="/wiki/Lemma_(mathematics)" title="Lemma (mathematics)">Lemma</a></li> <li><a href="/wiki/Logical_consequence" title="Logical consequence">Logical consequence</a></li> <li><a href="/wiki/Structure_(mathematical_logic)" title="Structure (mathematical logic)">Model</a></li> <li><a href="/wiki/Theorem" title="Theorem">Theorem</a></li> <li><a href="/wiki/Theory_(mathematical_logic)" title="Theory (mathematical logic)">Theory</a></li> <li><a href="/wiki/Type_theory" title="Type theory">Type theory</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Theorems&#160;(<a href="/wiki/Category:Theorems_in_the_foundations_of_mathematics" title="Category:Theorems in the foundations of mathematics">list</a>)<br />&#160;and&#160;<a href="/wiki/Paradoxes_of_set_theory" title="Paradoxes of set theory">paradoxes</a></th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/G%C3%B6del%27s_completeness_theorem" title="Gödel&#39;s completeness theorem">Gödel's completeness</a>&#160;and&#160;<a href="/wiki/G%C3%B6del%27s_incompleteness_theorems" title="Gödel&#39;s incompleteness theorems">incompleteness theorems</a></li> <li><a href="/wiki/Tarski%27s_undefinability_theorem" title="Tarski&#39;s undefinability theorem">Tarski's undefinability</a></li> <li><a href="/wiki/Banach%E2%80%93Tarski_paradox" title="Banach–Tarski paradox">Banach–Tarski paradox</a></li> <li>Cantor's&#160;<a href="/wiki/Cantor%27s_theorem" title="Cantor&#39;s theorem">theorem,</a>&#160;<a href="/wiki/Cantor%27s_paradox" title="Cantor&#39;s paradox">paradox</a>&#160;and&#160;<a href="/wiki/Cantor%27s_diagonal_argument" title="Cantor&#39;s diagonal argument">diagonal argument</a></li> <li><a href="/wiki/Compactness_theorem" title="Compactness theorem">Compactness</a></li> <li><a href="/wiki/Halting_problem" title="Halting problem">Halting problem</a></li> <li><a href="/wiki/Lindstr%C3%B6m%27s_theorem" title="Lindström&#39;s theorem">Lindström's</a></li> <li><a href="/wiki/L%C3%B6wenheim%E2%80%93Skolem_theorem" title="Löwenheim–Skolem theorem">Löwenheim–Skolem</a></li> <li><a href="/wiki/Russell%27s_paradox" title="Russell&#39;s paradox">Russell's paradox</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Logic" title="Logic">Logics</a></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th id="Traditional95" scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Term_logic" title="Term logic">Traditional</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Classical_logic" title="Classical logic">Classical logic</a></li> <li><a href="/wiki/Logical_truth" title="Logical truth">Logical truth</a></li> <li><a href="/wiki/Tautology_(logic)" title="Tautology (logic)">Tautology</a></li> <li><a href="/wiki/Proposition" title="Proposition">Proposition</a></li> <li><a href="/wiki/Inference" title="Inference">Inference</a></li> <li><a href="/wiki/Logical_equivalence" title="Logical equivalence">Logical equivalence</a></li> <li><a href="/wiki/Consistency" title="Consistency">Consistency</a> <ul><li><a href="/wiki/Equiconsistency" title="Equiconsistency">Equiconsistency</a></li></ul></li> <li><a href="/wiki/Argument" title="Argument">Argument</a></li> <li><a href="/wiki/Soundness" title="Soundness">Soundness</a></li> <li><a href="/wiki/Validity_(logic)" title="Validity (logic)">Validity</a></li> <li><a href="/wiki/Syllogism" title="Syllogism">Syllogism</a></li> <li><a href="/wiki/Square_of_opposition" title="Square of opposition">Square of opposition</a></li> <li><a href="/wiki/Venn_diagram" title="Venn diagram">Venn diagram</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Propositional_calculus" title="Propositional calculus">Propositional</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Boolean_algebra" title="Boolean algebra">Boolean algebra</a></li> <li><a href="/wiki/Boolean_function" title="Boolean function">Boolean functions</a></li> <li><a href="/wiki/Logical_connective" title="Logical connective">Logical connectives</a></li> <li><a href="/wiki/Propositional_calculus" title="Propositional calculus">Propositional calculus</a></li> <li><a href="/wiki/Propositional_formula" title="Propositional formula">Propositional formula</a></li> <li><a href="/wiki/Truth_table" title="Truth table">Truth tables</a></li> <li><a href="/wiki/Many-valued_logic" title="Many-valued logic">Many-valued logic</a> <ul><li><a href="/wiki/Three-valued_logic" title="Three-valued logic">3</a></li> <li><a href="/wiki/Finite-valued_logic" title="Finite-valued logic">finite</a></li> <li><a href="/wiki/Infinite-valued_logic" title="Infinite-valued logic">∞</a></li></ul></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Predicate_logic" class="mw-redirect" title="Predicate logic">Predicate</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/First-order_logic" title="First-order logic">First-order</a> <ul><li><a href="/wiki/List_of_first-order_theories" title="List of first-order theories"><span style="font-size:85%;">list</span></a></li></ul></li> <li><a href="/wiki/Second-order_logic" title="Second-order logic">Second-order</a> <ul><li><a href="/wiki/Monadic_second-order_logic" title="Monadic second-order logic">Monadic</a></li></ul></li> <li><a href="/wiki/Higher-order_logic" title="Higher-order logic">Higher-order</a></li> <li><a href="/wiki/Fixed-point_logic" title="Fixed-point logic">Fixed-point</a></li> <li><a href="/wiki/Free_logic" title="Free logic">Free</a></li> <li><a href="/wiki/Quantifier_(logic)" title="Quantifier (logic)">Quantifiers</a></li> <li><a href="/wiki/Predicate_(mathematical_logic)" title="Predicate (mathematical logic)">Predicate</a></li> <li><a href="/wiki/Monadic_predicate_calculus" title="Monadic predicate calculus">Monadic predicate calculus</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Set_theory" title="Set theory">Set theory</a></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><td colspan="2" class="navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Zermelo%E2%80%93Fraenkel_set_theory" title="Zermelo–Fraenkel set theory">Set</a> <ul><li><a href="/wiki/Hereditary_set" title="Hereditary set">hereditary</a></li></ul></li> <li><a href="/wiki/Class_(set_theory)" title="Class (set theory)">Class</a></li> <li>(<a href="/wiki/Urelement" title="Urelement">Ur-</a>)<a href="/wiki/Element_(mathematics)" title="Element (mathematics)">Element</a></li> <li><a href="/wiki/Ordinal_number" title="Ordinal number">Ordinal number</a></li> <li><a href="/wiki/Extensionality" title="Extensionality">Extensionality</a></li> <li><a href="/wiki/Forcing_(mathematics)" title="Forcing (mathematics)">Forcing</a></li> <li><a href="/wiki/Relation_(mathematics)" title="Relation (mathematics)">Relation</a> <ul><li><a href="/wiki/Equivalence_relation" title="Equivalence relation">equivalence</a></li> <li><a href="/wiki/Partition_of_a_set" title="Partition of a set">partition</a></li></ul></li> <li>Set operations: <ul><li><a href="/wiki/Intersection_(set_theory)" title="Intersection (set theory)">intersection</a></li> <li><a href="/wiki/Union_(set_theory)" title="Union (set theory)">union</a></li> <li><a href="/wiki/Complement_(set_theory)" title="Complement (set theory)">complement</a></li> <li><a href="/wiki/Cartesian_product" title="Cartesian product">Cartesian product</a></li> <li><a href="/wiki/Power_set" title="Power set">power set</a></li> <li><a href="/wiki/List_of_set_identities_and_relations" title="List of set identities and relations">identities</a></li></ul></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Types of <a href="/wiki/Set_(mathematics)" title="Set (mathematics)">sets</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Countable_set" title="Countable set">Countable</a></li> <li><a href="/wiki/Uncountable_set" title="Uncountable set">Uncountable</a></li> <li><a href="/wiki/Empty_set" title="Empty set">Empty</a></li> <li><a href="/wiki/Inhabited_set" title="Inhabited set">Inhabited</a></li> <li><a href="/wiki/Singleton_(mathematics)" title="Singleton (mathematics)">Singleton</a></li> <li><a href="/wiki/Finite_set" title="Finite set">Finite</a></li> <li><a href="/wiki/Infinite_set" title="Infinite set">Infinite</a></li> <li><a href="/wiki/Transitive_set" title="Transitive set">Transitive</a></li> <li><a href="/wiki/Ultrafilter_(set_theory)" class="mw-redirect" title="Ultrafilter (set theory)">Ultrafilter</a></li> <li><a href="/wiki/Recursive_set" class="mw-redirect" title="Recursive set">Recursive</a></li> <li><a href="/wiki/Fuzzy_set" title="Fuzzy set">Fuzzy</a></li> <li><a href="/wiki/Universal_set" title="Universal set">Universal</a></li> <li><a href="/wiki/Universe_(mathematics)" title="Universe (mathematics)">Universe</a> <ul><li><a href="/wiki/Constructible_universe" title="Constructible universe">constructible</a></li> <li><a href="/wiki/Grothendieck_universe" title="Grothendieck universe">Grothendieck</a></li> <li><a href="/wiki/Von_Neumann_universe" title="Von Neumann universe">Von Neumann</a></li></ul></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Map_(mathematics)" title="Map (mathematics)">Maps</a>&#160;and&#160;<a href="/wiki/Cardinality" title="Cardinality">cardinality</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Function_(mathematics)" title="Function (mathematics)">Function</a>/<a href="/wiki/Map_(mathematics)" title="Map (mathematics)">Map</a> <ul><li><a href="/wiki/Domain_of_a_function" title="Domain of a function">domain</a></li> <li><a href="/wiki/Codomain" title="Codomain">codomain</a></li> <li><a href="/wiki/Image_(mathematics)" title="Image (mathematics)">image</a></li></ul></li> <li><a href="/wiki/Injective_function" title="Injective function">In</a>/<a href="/wiki/Surjective_function" title="Surjective function">Sur</a>/<a href="/wiki/Bijection" title="Bijection">Bi</a>-jection</li> <li><a href="/wiki/Schr%C3%B6der%E2%80%93Bernstein_theorem" title="Schröder–Bernstein theorem">Schröder–Bernstein theorem</a></li> <li><a href="/wiki/Isomorphism" title="Isomorphism">Isomorphism</a></li> <li><a href="/wiki/G%C3%B6del_numbering" title="Gödel numbering">Gödel numbering</a></li> <li><a href="/wiki/Enumeration" title="Enumeration">Enumeration</a></li> <li><a href="/wiki/Large_cardinal" title="Large cardinal">Large cardinal</a> <ul><li><a href="/wiki/Inaccessible_cardinal" title="Inaccessible cardinal">inaccessible</a></li></ul></li> <li><a href="/wiki/Aleph_number" title="Aleph number">Aleph number</a></li> <li><a href="/wiki/Operation_(mathematics)" title="Operation (mathematics)">Operation</a> <ul><li><a href="/wiki/Binary_operation" title="Binary operation">binary</a></li></ul></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Set theories</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Zermelo%E2%80%93Fraenkel_set_theory" title="Zermelo–Fraenkel set theory">Zermelo–Fraenkel</a> <ul><li><a href="/wiki/Axiom_of_choice" title="Axiom of choice">axiom of choice</a></li> <li><a href="/wiki/Continuum_hypothesis" title="Continuum hypothesis">continuum hypothesis</a></li></ul></li> <li><a href="/wiki/General_set_theory" title="General set theory">General</a></li> <li><a href="/wiki/Kripke%E2%80%93Platek_set_theory" title="Kripke–Platek set theory">Kripke–Platek</a></li> <li><a href="/wiki/Morse%E2%80%93Kelley_set_theory" title="Morse–Kelley set theory">Morse–Kelley</a></li> <li><a href="/wiki/Naive_set_theory" title="Naive set theory">Naive</a></li> <li><a href="/wiki/New_Foundations" title="New Foundations">New Foundations</a></li> <li><a href="/wiki/Tarski%E2%80%93Grothendieck_set_theory" title="Tarski–Grothendieck set theory">Tarski–Grothendieck</a></li> <li><a href="/wiki/Von_Neumann%E2%80%93Bernays%E2%80%93G%C3%B6del_set_theory" title="Von Neumann–Bernays–Gödel set theory">Von Neumann–Bernays–Gödel</a></li> <li><a href="/wiki/Ackermann_set_theory" title="Ackermann set theory">Ackermann</a></li> <li><a href="/wiki/Constructive_set_theory" title="Constructive set theory">Constructive</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Formal_system" title="Formal system">Formal systems</a>&#160;(<a href="/wiki/List_of_formal_systems" title="List of formal systems"><span style="font-size:85%;">list</span></a>),<br /><a href="/wiki/Formal_language" title="Formal language">language</a>&#160;and&#160;<a href="/wiki/Syntax_(logic)" title="Syntax (logic)">syntax</a></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><td colspan="2" class="navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Alphabet_(formal_languages)" title="Alphabet (formal languages)">Alphabet</a></li> <li><a href="/wiki/Arity" title="Arity">Arity</a></li> <li><a href="/wiki/Automata_theory" title="Automata theory">Automata</a></li> <li><a href="/wiki/Axiom_schema" title="Axiom schema">Axiom schema</a></li> <li><a href="/wiki/Expression_(mathematics)" title="Expression (mathematics)">Expression</a> <ul><li><a href="/wiki/Ground_expression" title="Ground expression">ground</a></li></ul></li> <li><a href="/wiki/Extension_by_new_constant_and_function_names" title="Extension by new constant and function names">Extension</a> <ul><li><a href="/wiki/Extension_by_definitions" title="Extension by definitions">by definition</a></li> <li><a href="/wiki/Conservative_extension" title="Conservative extension">conservative</a></li></ul></li> <li><a href="/wiki/Finitary_relation" title="Finitary relation">Relation</a></li> <li><a href="/wiki/Formation_rule" title="Formation rule">Formation rule</a></li> <li><a href="/wiki/Formal_grammar" title="Formal grammar">Grammar</a></li> <li><a href="/wiki/Well-formed_formula" title="Well-formed formula">Formula</a> <ul><li><a href="/wiki/Atomic_formula" title="Atomic formula">atomic</a></li> <li><a href="/wiki/Sentence_(mathematical_logic)" title="Sentence (mathematical logic)">closed</a></li> <li><a href="/wiki/Ground_formula" class="mw-redirect" title="Ground formula">ground</a></li> <li><a href="/wiki/Open_formula" title="Open formula">open</a></li></ul></li> <li><a href="/wiki/Free_variables_and_bound_variables" title="Free variables and bound variables">Free/bound variable</a></li> <li><a href="/wiki/Formal_language" title="Formal language">Language</a></li> <li><a href="/wiki/Metalanguage" title="Metalanguage">Metalanguage</a></li> <li><a href="/wiki/Logical_connective" title="Logical connective">Logical connective</a> <ul><li><a href="/wiki/Negation" title="Negation">¬</a></li> <li><a href="/wiki/Logical_disjunction" title="Logical disjunction">∨</a></li> <li><a href="/wiki/Logical_conjunction" title="Logical conjunction">∧</a></li> <li><a href="/wiki/Material_conditional" title="Material conditional">→</a></li> <li><a href="/wiki/Logical_biconditional" title="Logical biconditional">↔</a></li> <li><a href="/wiki/Logical_equality" title="Logical equality">=</a></li></ul></li> <li><a href="/wiki/Predicate_(mathematical_logic)" title="Predicate (mathematical logic)">Predicate</a> <ul><li><a href="/wiki/Functional_predicate" title="Functional predicate">functional</a></li> <li><a href="/wiki/Predicate_variable" title="Predicate variable">variable</a></li> <li><a href="/wiki/Propositional_variable" title="Propositional variable">propositional variable</a></li></ul></li> <li><a href="/wiki/Formal_proof" title="Formal proof">Proof</a></li> <li><a href="/wiki/Quantifier_(logic)" title="Quantifier (logic)">Quantifier</a> <ul><li><a href="/wiki/Existential_quantification" title="Existential quantification">∃</a></li> <li><a href="/wiki/Uniqueness_quantification" title="Uniqueness quantification">!</a></li> <li><a href="/wiki/Universal_quantification" title="Universal quantification">∀</a></li> <li><a href="/wiki/Quantifier_rank" title="Quantifier rank">rank</a></li></ul></li> <li><a href="/wiki/Sentence_(mathematical_logic)" title="Sentence (mathematical logic)">Sentence</a> <ul><li><a href="/wiki/Atomic_sentence" title="Atomic sentence">atomic</a></li> <li><a href="/wiki/Spectrum_of_a_sentence" title="Spectrum of a sentence">spectrum</a></li></ul></li> <li><a href="/wiki/Signature_(logic)" title="Signature (logic)">Signature</a></li> <li><a href="/wiki/String_(formal_languages)" class="mw-redirect" title="String (formal languages)">String</a></li> <li><a href="/wiki/Substitution_(logic)" title="Substitution (logic)">Substitution</a></li> <li><a href="/wiki/Symbol_(formal)" title="Symbol (formal)">Symbol</a> <ul><li><a href="/wiki/Uninterpreted_function" title="Uninterpreted function">function</a></li> <li><a href="/wiki/Logical_constant" title="Logical constant">logical/constant</a></li> <li><a href="/wiki/Non-logical_symbol" title="Non-logical symbol">non-logical</a></li> <li><a href="/wiki/Variable_(mathematics)" title="Variable (mathematics)">variable</a></li></ul></li> <li><a href="/wiki/Term_(logic)" title="Term (logic)">Term</a></li> <li><a href="/wiki/Theory_(mathematical_logic)" title="Theory (mathematical logic)">Theory</a> <ul><li><a href="/wiki/List_of_mathematical_theories" title="List of mathematical theories"><span style="font-size:85%;">list</span></a></li></ul></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><span class="nowrap">Example&#160;<a href="/wiki/Axiomatic_system" title="Axiomatic system">axiomatic<br />systems</a>&#160;<span style="font-size:85%;">(<a href="/wiki/List_of_first-order_theories" title="List of first-order theories">list</a>)</span></span></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li>of <a href="/wiki/True_arithmetic" title="True arithmetic">arithmetic</a>: <ul><li><a href="/wiki/Peano_axioms" title="Peano axioms">Peano</a></li> <li><a href="/wiki/Second-order_arithmetic" title="Second-order arithmetic">second-order</a></li> <li><a href="/wiki/Elementary_function_arithmetic" title="Elementary function arithmetic">elementary function</a></li> <li><a href="/wiki/Primitive_recursive_arithmetic" title="Primitive recursive arithmetic">primitive recursive</a></li> <li><a href="/wiki/Robinson_arithmetic" title="Robinson arithmetic">Robinson</a></li> <li><a href="/wiki/Skolem_arithmetic" title="Skolem arithmetic">Skolem</a></li></ul></li> <li>of the <a href="/wiki/Construction_of_the_real_numbers" title="Construction of the real numbers">real numbers</a> <ul><li><a href="/wiki/Tarski%27s_axiomatization_of_the_reals" title="Tarski&#39;s axiomatization of the reals">Tarski's axiomatization</a></li></ul></li> <li>of <a href="/wiki/Axiomatization_of_Boolean_algebras" class="mw-redirect" title="Axiomatization of Boolean algebras">Boolean algebras</a> <ul><li><a href="/wiki/Boolean_algebras_canonically_defined" title="Boolean algebras canonically defined">canonical</a></li> <li><a href="/wiki/Minimal_axioms_for_Boolean_algebra" title="Minimal axioms for Boolean algebra">minimal axioms</a></li></ul></li> <li>of <a href="/wiki/Foundations_of_geometry" title="Foundations of geometry">geometry</a>: <ul><li><a href="/wiki/Euclidean_geometry" title="Euclidean geometry">Euclidean</a>: <ul><li><a href="/wiki/Euclid%27s_Elements" title="Euclid&#39;s Elements"><i>Elements</i></a></li> <li><a href="/wiki/Hilbert%27s_axioms" title="Hilbert&#39;s axioms">Hilbert's</a></li> <li><a href="/wiki/Tarski%27s_axioms" title="Tarski&#39;s axioms">Tarski's</a></li></ul></li> <li><a href="/wiki/Non-Euclidean_geometry" title="Non-Euclidean geometry">non-Euclidean</a></li></ul></li></ul> <ul><li><i><a href="/wiki/Principia_Mathematica" title="Principia Mathematica">Principia Mathematica</a></i></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Proof_theory" title="Proof theory">Proof theory</a></th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Formal_proof" title="Formal proof">Formal proof</a></li> <li><a href="/wiki/Natural_deduction" title="Natural deduction">Natural deduction</a></li> <li><a href="/wiki/Logical_consequence" title="Logical consequence">Logical consequence</a></li> <li><a href="/wiki/Rule_of_inference" title="Rule of inference">Rule of inference</a></li> <li><a href="/wiki/Sequent_calculus" title="Sequent calculus">Sequent calculus</a></li> <li><a href="/wiki/Theorem" title="Theorem">Theorem</a></li> <li><a href="/wiki/Formal_system" title="Formal system">Systems</a> <ul><li><a href="/wiki/Axiomatic_system" title="Axiomatic system">axiomatic</a></li> <li><a href="/wiki/Deductive_system" class="mw-redirect" title="Deductive system">deductive</a></li> <li><a href="/wiki/Hilbert_system" title="Hilbert system">Hilbert</a> <ul><li><a href="/wiki/List_of_Hilbert_systems" class="mw-redirect" title="List of Hilbert systems">list</a></li></ul></li></ul></li> <li><a href="/wiki/Complete_theory" title="Complete theory">Complete theory</a></li> <li><a href="/wiki/Independence_(mathematical_logic)" title="Independence (mathematical logic)">Independence</a>&#160;(<a href="/wiki/List_of_statements_independent_of_ZFC" title="List of statements independent of ZFC">from&#160;ZFC</a>)</li> <li><a href="/wiki/Proof_of_impossibility" title="Proof of impossibility">Proof of impossibility</a></li> <li><a href="/wiki/Ordinal_analysis" title="Ordinal analysis">Ordinal analysis</a></li> <li><a href="/wiki/Reverse_mathematics" title="Reverse mathematics">Reverse mathematics</a></li> <li><a href="/wiki/Self-verifying_theories" title="Self-verifying theories">Self-verifying theories</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Model_theory" title="Model theory">Model theory</a></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Interpretation_(logic)" title="Interpretation (logic)">Interpretation</a> <ul><li><a href="/wiki/Interpretation_function" class="mw-redirect" title="Interpretation function">function</a></li> <li><a href="/wiki/Interpretation_(model_theory)" title="Interpretation (model theory)">of models</a></li></ul></li> <li><a href="/wiki/Structure_(mathematical_logic)" title="Structure (mathematical logic)">Model</a> <ul><li><a href="/wiki/Elementary_equivalence" title="Elementary equivalence">equivalence</a></li> <li><a href="/wiki/Finite_model_theory" title="Finite model theory">finite</a></li> <li><a href="/wiki/Saturated_model" title="Saturated model">saturated</a></li> <li><a href="/wiki/Spectrum_of_a_theory" title="Spectrum of a theory">spectrum</a></li> <li><a href="/wiki/Substructure_(mathematics)" title="Substructure (mathematics)">submodel</a></li></ul></li> <li><a href="/wiki/Non-standard_model" title="Non-standard model">Non-standard model</a> <ul><li><a href="/wiki/Non-standard_model_of_arithmetic" title="Non-standard model of arithmetic">of arithmetic</a></li></ul></li> <li><a href="/wiki/Diagram_(mathematical_logic)" title="Diagram (mathematical logic)">Diagram</a> <ul><li><a href="/wiki/Elementary_diagram" title="Elementary diagram">elementary</a></li></ul></li> <li><a href="/wiki/Categorical_theory" title="Categorical theory">Categorical theory</a></li> <li><a href="/wiki/Model_complete_theory" title="Model complete theory">Model complete theory</a></li> <li><a href="/wiki/Satisfiability" title="Satisfiability">Satisfiability</a></li> <li><a href="/wiki/Semantics_of_logic" title="Semantics of logic">Semantics of logic</a></li> <li><a href="/wiki/Strength_(mathematical_logic)" title="Strength (mathematical logic)">Strength</a></li> <li><a href="/wiki/Theories_of_truth" class="mw-redirect" title="Theories of truth">Theories of truth</a> <ul><li><a href="/wiki/Semantic_theory_of_truth" title="Semantic theory of truth">semantic</a></li> <li><a href="/wiki/Tarski%27s_theory_of_truth" class="mw-redirect" title="Tarski&#39;s theory of truth">Tarski's</a></li> <li><a href="/wiki/Kripke%27s_theory_of_truth" class="mw-redirect" title="Kripke&#39;s theory of truth">Kripke's</a></li></ul></li> <li><a href="/wiki/T-schema" title="T-schema">T-schema</a></li> <li><a href="/wiki/Transfer_principle" title="Transfer principle">Transfer principle</a></li> <li><a href="/wiki/Truth_predicate" title="Truth predicate">Truth predicate</a></li> <li><a href="/wiki/Truth_value" title="Truth value">Truth value</a></li> <li><a href="/wiki/Type_(model_theory)" title="Type (model theory)">Type</a></li> <li><a href="/wiki/Ultraproduct" title="Ultraproduct">Ultraproduct</a></li> <li><a href="/wiki/Validity_(logic)" title="Validity (logic)">Validity</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Computability_theory" title="Computability theory">Computability theory</a></th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Church_encoding" title="Church encoding">Church encoding</a></li> <li><a href="/wiki/Church%E2%80%93Turing_thesis" title="Church–Turing thesis">Church–Turing thesis</a></li> <li><a href="/wiki/Computably_enumerable_set" title="Computably enumerable set">Computably enumerable</a></li> <li><a href="/wiki/Computable_function" title="Computable function">Computable function</a></li> <li><a href="/wiki/Computable_set" title="Computable set">Computable set</a></li> <li><a href="/wiki/Decision_problem" title="Decision problem">Decision problem</a> <ul><li><a href="/wiki/Decidability_(logic)" title="Decidability (logic)">decidable</a></li> <li><a href="/wiki/Undecidable_problem" title="Undecidable problem">undecidable</a></li> <li><a href="/wiki/P_(complexity)" title="P (complexity)">P</a></li> <li><a href="/wiki/NP_(complexity)" title="NP (complexity)">NP</a></li> <li><a href="/wiki/P_versus_NP_problem" title="P versus NP problem">P versus NP problem</a></li></ul></li> <li><a href="/wiki/Kolmogorov_complexity" title="Kolmogorov complexity">Kolmogorov complexity</a></li> <li><a href="/wiki/Lambda_calculus" title="Lambda calculus">Lambda calculus</a></li> <li><a class="mw-selflink selflink">Primitive recursive function</a></li> <li><a href="/wiki/Recursion" title="Recursion">Recursion</a></li> <li><a href="/wiki/Recursive_set" class="mw-redirect" title="Recursive set">Recursive set</a></li> <li><a href="/wiki/Turing_machine" title="Turing machine">Turing machine</a></li> <li><a href="/wiki/Type_theory" title="Type theory">Type theory</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Related</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Abstract_logic" title="Abstract logic">Abstract logic</a></li> <li><a href="/wiki/Algebraic_logic" title="Algebraic logic">Algebraic logic</a></li> <li><a href="/wiki/Automated_theorem_proving" title="Automated theorem proving">Automated theorem proving</a></li> <li><a href="/wiki/Category_theory" title="Category theory">Category theory</a></li> <li><a href="/wiki/Concrete_category" title="Concrete category">Concrete</a>/<a href="/wiki/Category_(mathematics)" title="Category (mathematics)">Abstract category</a></li> <li><a href="/wiki/Category_of_sets" title="Category of sets">Category of sets</a></li> <li><a href="/wiki/History_of_logic" title="History of logic">History of logic</a></li> <li><a href="/wiki/History_of_mathematical_logic" class="mw-redirect" title="History of mathematical logic">History of mathematical logic</a> <ul><li><a href="/wiki/Timeline_of_mathematical_logic" title="Timeline of mathematical logic">timeline</a></li></ul></li> <li><a href="/wiki/Logicism" title="Logicism">Logicism</a></li> <li><a href="/wiki/Mathematical_object" title="Mathematical object">Mathematical object</a></li> <li><a href="/wiki/Philosophy_of_mathematics" title="Philosophy of mathematics">Philosophy of mathematics</a></li> <li><a href="/wiki/Supertask" title="Supertask">Supertask</a></li></ul> </div></td></tr><tr><td class="navbox-abovebelow" colspan="2"><div><b><span class="nowrap"><span class="noviewer" typeof="mw:File"><a href="/wiki/File:Nuvola_apps_edu_mathematics_blue-p.svg" class="mw-file-description"><img alt="icon" src="//upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Nuvola_apps_edu_mathematics_blue-p.svg/16px-Nuvola_apps_edu_mathematics_blue-p.svg.png" decoding="async" width="16" height="16" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Nuvola_apps_edu_mathematics_blue-p.svg/24px-Nuvola_apps_edu_mathematics_blue-p.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Nuvola_apps_edu_mathematics_blue-p.svg/32px-Nuvola_apps_edu_mathematics_blue-p.svg.png 2x" data-file-width="128" data-file-height="128" /></a></span> </span><a href="/wiki/Portal:Mathematics" title="Portal:Mathematics">Mathematics&#32;portal</a></b></div></td></tr></tbody></table></div> <!-- NewPP limit report Parsed by mw‐web.codfw.main‐76d4c66f66‐9tjjs Cached time: 20250302044415 Cache expiry: 2592000 Reduced expiry: false Complications: [vary‐revision‐sha1, show‐toc] CPU time usage: 0.720 seconds Real time usage: 0.942 seconds Preprocessor visited node count: 3031/1000000 Post‐expand include size: 111470/2097152 bytes Template argument size: 5014/2097152 bytes Highest expansion depth: 14/100 Expensive parser function count: 3/500 Unstrip recursion depth: 1/20 Unstrip post‐expand size: 66624/5000000 bytes Lua time usage: 0.343/10.000 seconds Lua memory usage: 8020502/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 580.628 1 -total 30.18% 175.221 16 Template:Citation 25.30% 146.906 1 Template:Reflist 19.54% 113.480 4 Template:Navbox 17.89% 103.874 1 Template:Mathematical_logic 16.13% 93.675 1 Template:Short_description 10.90% 63.302 2 Template:Pagetype 10.17% 59.037 8 Template:Sfn 7.82% 45.433 1 Template:Citation_needed 6.70% 38.878 1 Template:Fix --> <!-- Saved in parser cache with key enwiki:pcache:24829:|#|:idhash:canonical and timestamp 20250302044415 and revision id 1277541390. 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?useformat=desktop&amp;type=1x1&amp;usesul3=0" 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=Primitive_recursive_function&amp;oldid=1277541390">https://en.wikipedia.org/w/index.php?title=Primitive_recursive_function&amp;oldid=1277541390</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">Categories</a>: <ul><li><a href="/wiki/Category:Computability_theory" title="Category:Computability theory">Computability theory</a></li><li><a href="/wiki/Category:Theory_of_computation" title="Category:Theory of computation">Theory of computation</a></li><li><a href="/wiki/Category:Functions_and_mappings" title="Category:Functions and mappings">Functions and mappings</a></li><li><a href="/wiki/Category:Recursion" title="Category:Recursion">Recursion</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: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><li><a href="/wiki/Category:All_articles_with_unsourced_statements" title="Category:All articles with unsourced statements">All articles with unsourced statements</a></li><li><a href="/wiki/Category:Articles_with_unsourced_statements_from_January_2025" title="Category:Articles with unsourced statements from January 2025">Articles with unsourced statements from January 2025</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 25 February 2025, at 07:36<span class="anonymous-show">&#160;(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=Primitive_recursive_function&amp;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"><picture><source media="(min-width: 500px)" srcset="/static/images/footer/wikimedia-button.svg" width="84" height="29"><img src="/static/images/footer/wikimedia.svg" width="25" height="25" alt="Wikimedia Foundation" lang="en" loading="lazy"></picture></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"><picture><source media="(min-width: 500px)" srcset="/w/resources/assets/poweredby_mediawiki.svg" width="88" height="31"><img src="/w/resources/assets/mediawiki_compact.svg" alt="Powered by MediaWiki" lang="en" width="25" height="25" loading="lazy"></picture></a></li> </ul> </footer> </div> </div> </div> <div class="vector-header-container vector-sticky-header-container"> <div id="vector-sticky-header" class="vector-sticky-header"> <div class="vector-sticky-header-start"> <div class="vector-sticky-header-icon-start vector-button-flush-left vector-button-flush-right" aria-hidden="true"> <button class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-sticky-header-search-toggle" tabindex="-1" data-event-name="ui.vector-sticky-search-form.icon"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </button> </div> <div role="search" class="vector-search-box-vue vector-search-box-show-thumbnail vector-search-box"> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail"> <form action="/w/index.php" id="vector-sticky-search-form" class="cdx-search-input cdx-search-input--has-end-button"> <div 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"> <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> <div class="vector-sticky-header-context-bar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-sticky-header-toc" class="vector-dropdown mw-portlet mw-portlet-sticky-header-toc vector-sticky-header-toc vector-button-flush-left" > <input type="checkbox" id="vector-sticky-header-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-sticky-header-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-sticky-header-toc-label" for="vector-sticky-header-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-sticky-header-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div class="vector-sticky-header-context-bar-primary" aria-hidden="true" ><span class="mw-page-title-main">Primitive recursive function</span></div> </div> </div> <div class="vector-sticky-header-end" aria-hidden="true"> <div class="vector-sticky-header-icons"> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-talk-sticky-header" tabindex="-1" data-event-name="talk-sticky-header"><span class="vector-icon mw-ui-icon-speechBubbles mw-ui-icon-wikimedia-speechBubbles"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-subject-sticky-header" tabindex="-1" data-event-name="subject-sticky-header"><span class="vector-icon mw-ui-icon-article mw-ui-icon-wikimedia-article"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-history-sticky-header" tabindex="-1" data-event-name="history-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-history mw-ui-icon-wikimedia-wikimedia-history"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only mw-watchlink" id="ca-watchstar-sticky-header" tabindex="-1" data-event-name="watch-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-star mw-ui-icon-wikimedia-wikimedia-star"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-edit-sticky-header" tabindex="-1" data-event-name="wikitext-edit-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-wikiText mw-ui-icon-wikimedia-wikimedia-wikiText"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-ve-edit-sticky-header" tabindex="-1" data-event-name="ve-edit-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-edit mw-ui-icon-wikimedia-wikimedia-edit"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-viewsource-sticky-header" tabindex="-1" data-event-name="ve-edit-protected-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-editLock mw-ui-icon-wikimedia-wikimedia-editLock"></span> <span></span> </a> </div> <div class="vector-sticky-header-buttons"> <button class="cdx-button cdx-button--weight-quiet mw-interlanguage-selector" id="p-lang-btn-sticky-header" tabindex="-1" data-event-name="ui.dropdown-p-lang-btn-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-language mw-ui-icon-wikimedia-wikimedia-language"></span> <span>15 languages</span> </button> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive" id="ca-addsection-sticky-header" tabindex="-1" data-event-name="addsection-sticky-header"><span class="vector-icon mw-ui-icon-speechBubbleAdd-progressive mw-ui-icon-wikimedia-speechBubbleAdd-progressive"></span> <span>Add topic</span> </a> </div> <div class="vector-sticky-header-icon-end"> <div class="vector-user-links"> </div> </div> </div> </div> </div> <div class="mw-portlet mw-portlet-dock-bottom emptyPortlet" id="p-dock-bottom"> <ul> </ul> </div> <script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-76d4c66f66-5q7sm","wgBackendResponseTime":257,"wgPageParseReport":{"limitreport":{"cputime":"0.720","walltime":"0.942","ppvisitednodes":{"value":3031,"limit":1000000},"postexpandincludesize":{"value":111470,"limit":2097152},"templateargumentsize":{"value":5014,"limit":2097152},"expansiondepth":{"value":14,"limit":100},"expensivefunctioncount":{"value":3,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":66624,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 580.628 1 -total"," 30.18% 175.221 16 Template:Citation"," 25.30% 146.906 1 Template:Reflist"," 19.54% 113.480 4 Template:Navbox"," 17.89% 103.874 1 Template:Mathematical_logic"," 16.13% 93.675 1 Template:Short_description"," 10.90% 63.302 2 Template:Pagetype"," 10.17% 59.037 8 Template:Sfn"," 7.82% 45.433 1 Template:Citation_needed"," 6.70% 38.878 1 Template:Fix"]},"scribunto":{"limitreport-timeusage":{"value":"0.343","limit":"10.000"},"limitreport-memusage":{"value":8020502,"limit":52428800},"limitreport-logs":"anchor_id_list = table#1 {\n [\"CITEREFBoolosBurgessJeffrey2002\"] = 1,\n [\"CITEREFBrainerdLandweber1974\"] = 1,\n [\"CITEREFGeorge_Tourlakis2003\"] = 1,\n [\"CITEREFGladstone1967\"] = 1,\n [\"CITEREFGladstone1971\"] = 1,\n [\"CITEREFHartmanis1989\"] = 1,\n [\"CITEREFHenk_Barendregt1990\"] = 1,\n [\"CITEREFKleene1952\"] = 1,\n [\"CITEREFLinz2011\"] = 1,\n [\"CITEREFMeyerRitchie1967\"] = 1,\n [\"CITEREFMooreMertens2011\"] = 1,\n [\"CITEREFPeter_Smith2013\"] = 1,\n [\"CITEREFRobinson1947\"] = 1,\n [\"CITEREFRod_Downey2014\"] = 1,\n [\"CITEREFSeverin2008\"] = 1,\n [\"CITEREFSoare1996\"] = 1,\n}\ntemplate_list = table#1 {\n [\"Block indent\"] = 1,\n [\"CS1 config\"] = 1,\n [\"Citation\"] = 16,\n [\"Citation needed\"] = 1,\n [\"Harvtxt\"] = 2,\n [\"Isbn\"] = 1,\n [\"Mathematical logic\"] = 1,\n [\"Ordered list\"] = 2,\n [\"Reflist\"] = 1,\n [\"Sfn\"] = 8,\n [\"Short description\"] = 1,\n [\"Slink\"] = 1,\n [\"Unordered list\"] = 1,\n}\narticle_whitelist = table#1 {\n}\nciteref_patterns = table#1 {\n}\ntable#1 {\n [\"size\"] = \"tiny\",\n}\n"},"cachereport":{"origin":"mw-web.codfw.main-76d4c66f66-9tjjs","timestamp":"20250302044415","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"Primitive recursive function","url":"https:\/\/en.wikipedia.org\/wiki\/Primitive_recursive_function","sameAs":"http:\/\/www.wikidata.org\/entity\/Q1570472","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q1570472","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":"2001-12-07T15:36:31Z","dateModified":"2025-02-25T07:36:56Z","headline":"function that can be computed with loops of bounded length"}</script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10