CINXE.COM
boolean domain in nLab
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" > <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> boolean domain in nLab </title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="robots" content="index,follow" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link href="/stylesheets/instiki.css?1676280126" media="all" rel="stylesheet" type="text/css" /> <link href="/stylesheets/mathematics.css?1660229990" media="all" rel="stylesheet" type="text/css" /> <link href="/stylesheets/syntax.css?1660229990" media="all" rel="stylesheet" type="text/css" /> <link href="/stylesheets/nlab.css?1676280126" media="all" rel="stylesheet" type="text/css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/dreampulse/computer-modern-web-font@master/fonts.css"/> <style type="text/css"> h1#pageName, div.info, .newWikiWord a, a.existingWikiWord, .newWikiWord a:hover, [actiontype="toggle"]:hover, #TextileHelp h3 { color: #226622; } a:visited.existingWikiWord { color: #164416; } </style> <style type="text/css"><!--/*--><![CDATA[/*><!--*/ .toc ul {margin: 0; padding: 0;} .toc ul ul {margin: 0; padding: 0 0 0 10px;} .toc li > p {margin: 0} .toc ul li {list-style-type: none; position: relative;} .toc div {border-top:1px dotted #ccc;} .rightHandSide h2 {font-size: 1.5em;color:#008B26} table.plaintable { border-collapse:collapse; margin-left:30px; border:0; } .plaintable td {border:1px solid #000; padding: 3px;} .plaintable th {padding: 3px;} .plaintable caption { font-weight: bold; font-size:1.1em; text-align:center; margin-left:30px; } /* Query boxes for questioning and answering mechanism */ div.query{ background: #f6fff3; border: solid #ce9; border-width: 2px 1px; padding: 0 1em; margin: 0 1em; max-height: 20em; overflow: auto; } /* Standout boxes for putting important text */ div.standout{ background: #fff1f1; border: solid black; border-width: 2px 1px; padding: 0 1em; margin: 0 1em; overflow: auto; } /* Icon for links to n-category arXiv documents (commented out for now i.e. disabled) a[href*="http://arxiv.org/"] { background-image: url(../files/arXiv_icon.gif); background-repeat: no-repeat; background-position: right bottom; padding-right: 22px; } */ /* Icon for links to n-category cafe posts (disabled) a[href*="http://golem.ph.utexas.edu/category"] { background-image: url(../files/n-cafe_5.gif); background-repeat: no-repeat; background-position: right bottom; padding-right: 25px; } */ /* Icon for links to pdf files (disabled) a[href$=".pdf"] { background-image: url(../files/pdficon_small.gif); background-repeat: no-repeat; background-position: right bottom; padding-right: 25px; } */ /* Icon for links to pages, etc. -inside- pdf files (disabled) a[href*=".pdf#"] { background-image: url(../files/pdf_entry.gif); background-repeat: no-repeat; background-position: right bottom; padding-right: 25px; } */ a.existingWikiWord { color: #226622; } a.existingWikiWord:visited { color: #226622; } a.existingWikiWord[title] { border: 0px; color: #aa0505; text-decoration: none; } a.existingWikiWord[title]:visited { border: 0px; color: #551111; text-decoration: none; } a[href^="http://"] { border: 0px; color: #003399; } a[href^="http://"]:visited { border: 0px; color: #330066; } a[href^="https://"] { border: 0px; color: #003399; } a[href^="https://"]:visited { border: 0px; color: #330066; } div.dropDown .hide { display: none; } div.dropDown:hover .hide { display:block; } div.clickDown .hide { display: none; } div.clickDown:focus { outline:none; } div.clickDown:focus .hide, div.clickDown:hover .hide { display: block; } div.clickDown .clickToReveal, div.clickDown:focus .clickToHide { display:block; } div.clickDown:focus .clickToReveal, div.clickDown .clickToHide { display:none; } div.clickDown .clickToReveal:after { content: "A(Hover to reveal, click to "hold")"; font-size: 60%; } div.clickDown .clickToHide:after { content: "A(Click to hide)"; font-size: 60%; } div.clickDown .clickToHide, div.clickDown .clickToReveal { white-space: pre-wrap; } .un_theorem, .num_theorem, .un_lemma, .num_lemma, .un_prop, .num_prop, .un_cor, .num_cor, .un_defn, .num_defn, .un_example, .num_example, .un_note, .num_note, .un_remark, .num_remark { margin-left: 1em; } span.theorem_label { margin-left: -1em; } .proof span.theorem_label { margin-left: 0em; } :target { background-color: #BBBBBB; border-radius: 5pt; } /*]]>*/--></style> <script src="/javascripts/prototype.js?1660229990" type="text/javascript"></script> <script src="/javascripts/effects.js?1660229990" type="text/javascript"></script> <script src="/javascripts/dragdrop.js?1660229990" type="text/javascript"></script> <script src="/javascripts/controls.js?1660229990" type="text/javascript"></script> <script src="/javascripts/application.js?1660229990" type="text/javascript"></script> <script src="/javascripts/page_helper.js?1660229990" type="text/javascript"></script> <script src="/javascripts/thm_numbering.js?1660229990" type="text/javascript"></script> <script type="text/x-mathjax-config"> <!--//--><![CDATA[//><!-- MathJax.Ajax.config.path["Contrib"] = "/MathJax"; MathJax.Hub.Config({ MathML: { useMathMLspacing: true }, "HTML-CSS": { scale: 90, extensions: ["handle-floats.js"] } }); MathJax.Hub.Queue( function () { var fos = document.getElementsByTagName('foreignObject'); for (var i = 0; i < fos.length; i++) { MathJax.Hub.Typeset(fos[i]); } }); //--><!]]> </script> <script type="text/javascript"> <!--//--><![CDATA[//><!-- window.addEventListener("DOMContentLoaded", function () { var div = document.createElement('div'); var math = document.createElementNS('http://www.w3.org/1998/Math/MathML', 'math'); document.body.appendChild(div); div.appendChild(math); // Test for MathML support comparable to WebKit version https://trac.webkit.org/changeset/203640 or higher. div.setAttribute('style', 'font-style: italic'); var mathml_unsupported = !(window.getComputedStyle(div.firstChild).getPropertyValue('font-style') === 'normal'); div.parentNode.removeChild(div); if (mathml_unsupported) { // MathML does not seem to be supported... var s = document.createElement('script'); s.src = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=MML_HTMLorMML-full"; document.querySelector('head').appendChild(s); } else { document.head.insertAdjacentHTML("beforeend", '<style>svg[viewBox] {max-width: 100%}</style>'); } }); //--><!]]> </script> <link href="https://ncatlab.org/nlab/atom_with_headlines" rel="alternate" title="Atom with headlines" type="application/atom+xml" /> <link href="https://ncatlab.org/nlab/atom_with_content" rel="alternate" title="Atom with full content" type="application/atom+xml" /> <script type="text/javascript"> document.observe("dom:loaded", function() { generateThmNumbers(); }); </script> </head> <body> <div id="Container"> <div id="Content"> <h1 id="pageName"> <span style="float: left; margin: 0.5em 0.25em -0.25em 0"> <svg xmlns="http://www.w3.org/2000/svg" width="1.872em" height="1.8em" viewBox="0 0 190 181"> <path fill="#226622" d="M72.8 145c-1.6 17.3-15.7 10-23.6 20.2-5.6 7.3 4.8 15 11.4 15 11.5-.2 19-13.4 26.4-20.3 3.3-3 8.2-4 11.2-7.2a14 14 0 0 0 2.9-11.1c-1.4-9.6-12.4-18.6-16.9-27.2-5-9.6-10.7-27.4-24.1-27.7-17.4-.3-.4 26 4.7 30.7 2.4 2.3 5.4 4.1 7.3 6.9 1.6 2.3 2.1 5.8-1 7.2-5.9 2.6-12.4-6.3-15.5-10-8.8-10.6-15.5-23-26.2-31.8-5.2-4.3-11.8-8-18-3.7-7.3 4.9-4.2 12.9.2 18.5a81 81 0 0 0 30.7 23c3.3 1.5 12.8 5.6 10 10.7-2.5 5.2-11.7 3-15.6 1.1-8.4-3.8-24.3-21.3-34.4-13.7-3.5 2.6-2.3 7.6-1.2 11.1 2.8 9 12.2 17.2 20.9 20.5 17.3 6.7 34.3-8 50.8-12.1z"/> <path fill="#a41e32" d="M145.9 121.3c-.2-7.5 0-19.6-4.5-26-5.4-7.5-12.9-1-14.1 5.8-1.4 7.8 2.7 14.1 4.8 21.3 3.4 12 5.8 29-.8 40.1-3.6-6.7-5.2-13-7-20.4-2.1-8.2-12.8-13.2-15.1-1.9-2 9.7 9 21.2 12 30.1 1.2 4 2 8.8 6.4 10.3 6.9 2.3 13.3-4.7 17.7-8.8 12.2-11.5 36.6-20.7 43.4-36.4 6.7-15.7-13.7-14-21.3-7.2-9.1 8-11.9 20.5-23.6 25.1 7.5-23.7 31.8-37.6 38.4-61.4 2-7.3-.8-29.6-13-19.8-14.5 11.6-6.6 37.6-23.3 49.2z"/> <path fill="#193c78" d="M86.3 47.5c0-13-10.2-27.6-5.8-40.4 2.8-8.4 14.1-10.1 17-1 3.8 11.6-.3 26.3-1.8 38 11.7-.7 10.5-16 14.8-24.3 2.1-4.2 5.7-9.1 11-6.7 6 2.7 7.4 9.2 6.6 15.1-2.2 14-12.2 18.8-22.4 27-3.4 2.7-8 6.6-5.9 11.6 2 4.4 7 4.5 10.7 2.8 7.4-3.3 13.4-16.5 21.7-16 14.6.7 12 21.9.9 26.2-5 1.9-10.2 2.3-15.2 3.9-5.8 1.8-9.4 8.7-15.7 8.9-6.1.1-9-6.9-14.3-9-14.4-6-33.3-2-44.7-14.7-3.7-4.2-9.6-12-4.9-17.4 9.3-10.7 28 7.2 35.7 12 2 1.1 11 6.9 11.4 1.1.4-5.2-10-8.2-13.5-10-11.1-5.2-30-15.3-35-27.3-2.5-6 2.8-13.8 9.4-13.6 6.9.2 13.4 7 17.5 12C70.9 34 75 43.8 86.3 47.4z"/> </svg> </span> <span class="webName">nLab</span> boolean domain </h1> <div class="navigation"> <span class="skipNav"><a href='#navEnd'>Skip the Navigation Links</a> | </span> <span style="display:inline-block; width: 0.3em;"></span> <a href="/nlab/show/HomePage" accesskey="H" title="Home page">Home Page</a> | <a href="/nlab/all_pages" accesskey="A" title="List of all pages">All Pages</a> | <a href="/nlab/latest_revisions" accesskey="U" title="Latest edits and page creations">Latest Revisions</a> | <a href="https://nforum.ncatlab.org/discussion/15787/#Item_13" title="Discuss this page in its dedicated thread on the nForum" style="color: black">Discuss this page</a> | <form accept-charset="utf-8" action="/nlab/search" id="navigationSearchForm" method="get"> <fieldset class="search"><input type="text" id="searchField" name="query" value="Search" style="display:inline-block; float: left;" onfocus="this.value == 'Search' ? this.value = '' : true" onblur="this.value == '' ? this.value = 'Search' : true" /></fieldset> </form> <span id='navEnd'></span> </div> <div id="revision"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" xml:lang="en" lang="en"> <head><meta http-equiv="Content-type" content="application/xhtml+xml;charset=utf-8" /><title>Contents</title></head> <body> <div class="rightHandSide"> <div class="toc clickDown" tabindex="0"> <h3 id="context">Context</h3> <h4 id="universes">Universes</h4> <div class="hide"><div> <p><strong><a class="existingWikiWord" href="/nlab/show/universe">universe</a></strong></p> <p>(in <a class="existingWikiWord" href="/nlab/show/category+theory">category theory</a>/<a class="existingWikiWord" href="/nlab/show/type+theory">type theory</a>/<a class="existingWikiWord" href="/nlab/show/computer+science">computer science</a>)</p> <p><strong>of all <a class="existingWikiWord" href="/nlab/show/homotopy+types">homotopy types</a></strong></p> <ul> <li> <p><a class="existingWikiWord" href="/nlab/show/type+of+types">type of types</a>, <a class="existingWikiWord" href="/nlab/show/object+classifier">object classifier</a>,</p> <ul> <li><a class="existingWikiWord" href="/nlab/show/univalence">univalence</a></li> </ul> </li> <li> <p><a class="existingWikiWord" href="/nlab/show/codomain+fibration">codomain fibration</a></p> </li> </ul> <p><strong>of <a class="existingWikiWord" href="/nlab/show/homotopy+n-types">homotopy n-types</a></strong></p> <ul> <li><a class="existingWikiWord" href="/nlab/show/type+of+n-types">type of n-types</a></li> </ul> <p><strong>of <a class="existingWikiWord" href="/nlab/show/0-truncated+object">0-truncated types</a>/<a class="existingWikiWord" href="/nlab/show/h-sets">h-sets</a></strong></p> <ul> <li><a class="existingWikiWord" href="/nlab/show/type+of+h-sets">type of h-sets</a>, <a class="existingWikiWord" href="/nlab/show/universe+in+a+topos">universe in a topos</a></li> </ul> <p><strong>of <a class="existingWikiWord" href="/nlab/show/%28-1%29-truncated+object">(-1)-truncated types</a>/<a class="existingWikiWord" href="/nlab/show/h-propositions">h-propositions</a></strong></p> <ul> <li><a class="existingWikiWord" href="/nlab/show/type+of+propositions">type of propositions</a>, <a class="existingWikiWord" href="/nlab/show/subobject+classifier">subobject classifier</a></li> </ul> <h3 id="resizing">resizing</h3> <ul> <li><a class="existingWikiWord" href="/nlab/show/universe+enlargement">universe enlargement</a></li> </ul> </div></div> <h4 id="type_theory">Type theory</h4> <div class="hide"><div> <p><strong><a class="existingWikiWord" href="/nlab/show/natural+deduction">natural deduction</a></strong> <a class="existingWikiWord" href="/nlab/show/metalanguage">metalanguage</a>, <a class="existingWikiWord" href="/nlab/show/practical+foundations">practical foundations</a></p> <ul> <li> <p><a class="existingWikiWord" href="/nlab/show/judgement">judgement</a></p> </li> <li> <p><a class="existingWikiWord" href="/nlab/show/hypothetical+judgement">hypothetical judgement</a>, <a class="existingWikiWord" href="/nlab/show/sequent">sequent</a></p> <ul> <li><a class="existingWikiWord" href="/nlab/show/antecedents">antecedents</a><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mo>⊢</mo></mrow><annotation encoding="application/x-tex">\vdash</annotation></semantics></math> <a class="existingWikiWord" href="/nlab/show/consequent">consequent</a>, <a class="existingWikiWord" href="/nlab/show/succedents">succedents</a></li> </ul> </li> </ul> <ol> <li><a class="existingWikiWord" href="/nlab/show/type+formation+rule">type formation rule</a></li> <li><a class="existingWikiWord" href="/nlab/show/term+introduction+rule">term introduction rule</a></li> <li><a class="existingWikiWord" href="/nlab/show/term+elimination+rule">term elimination rule</a></li> <li><a class="existingWikiWord" href="/nlab/show/computation+rule">computation rule</a></li> </ol> <p><strong><a class="existingWikiWord" href="/nlab/show/type+theory">type theory</a></strong> (<a class="existingWikiWord" href="/nlab/show/dependent+type+theory">dependent</a>, <a class="existingWikiWord" href="/nlab/show/intensional+type+theory">intensional</a>, <a class="existingWikiWord" href="/nlab/show/observational+type+theory">observational type theory</a>, <a class="existingWikiWord" href="/nlab/show/homotopy+type+theory">homotopy type theory</a>)</p> <ul> <li><a class="existingWikiWord" href="/nlab/show/calculus+of+constructions">calculus of constructions</a></li> </ul> <p><strong><a class="existingWikiWord" href="/nlab/show/syntax">syntax</a></strong> <a class="existingWikiWord" href="/nlab/show/object+language">object language</a></p> <ul> <li> <p><a class="existingWikiWord" href="/nlab/show/theory">theory</a>, <a class="existingWikiWord" href="/nlab/show/axiom">axiom</a></p> </li> <li> <p><a class="existingWikiWord" href="/nlab/show/proposition">proposition</a>/<a class="existingWikiWord" href="/nlab/show/type">type</a> (<a class="existingWikiWord" href="/nlab/show/propositions+as+types">propositions as types</a>)</p> </li> <li> <p><a class="existingWikiWord" href="/nlab/show/definition">definition</a>/<a class="existingWikiWord" href="/nlab/show/proof">proof</a>/<a class="existingWikiWord" href="/nlab/show/program">program</a> (<a class="existingWikiWord" href="/nlab/show/proofs+as+programs">proofs as programs</a>)</p> </li> <li> <p><a class="existingWikiWord" href="/nlab/show/theorem">theorem</a></p> </li> </ul> <div> <p><strong><a class="existingWikiWord" href="/nlab/show/computational+trinitarianism">computational trinitarianism</a></strong> = <br /> <strong><a class="existingWikiWord" href="/nlab/show/propositions+as+types">propositions as types</a></strong> +<strong><a class="existingWikiWord" href="/nlab/show/programs+as+proofs">programs as proofs</a></strong> +<strong><a class="existingWikiWord" href="/nlab/show/relation+between+type+theory+and+category+theory">relation type theory/category theory</a></strong></p> <table><thead><tr><th><a class="existingWikiWord" href="/nlab/show/logic">logic</a></th><th><a class="existingWikiWord" href="/nlab/show/set+theory">set theory</a> (<a class="existingWikiWord" href="/nlab/show/internal+logic+of+set+theory">internal logic</a> of)</th><th><a class="existingWikiWord" href="/nlab/show/category+theory">category theory</a></th><th><a class="existingWikiWord" href="/nlab/show/type+theory">type theory</a></th></tr></thead><tbody><tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/proposition">proposition</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/set">set</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/object">object</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/type">type</a></td></tr> <tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/predicate">predicate</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/family+of+sets">family of sets</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/display+morphism">display morphism</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/dependent+type">dependent type</a></td></tr> <tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/proof">proof</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/element">element</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/generalized+element">generalized element</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/term">term</a>/<a class="existingWikiWord" href="/nlab/show/program">program</a></td></tr> <tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/cut+rule">cut rule</a></td><td style="text-align: left;"></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/composition">composition</a> of <a class="existingWikiWord" href="/nlab/show/classifying+morphisms">classifying morphisms</a> / <a class="existingWikiWord" href="/nlab/show/pullback">pullback</a> of <a class="existingWikiWord" href="/nlab/show/display+maps">display maps</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/substitution">substitution</a></td></tr> <tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/introduction+rule">introduction rule</a> for <a class="existingWikiWord" href="/nlab/show/implication">implication</a></td><td style="text-align: left;"></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/counit">counit</a> for hom-tensor adjunction</td><td style="text-align: left;">lambda</td></tr> <tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/elimination+rule">elimination rule</a> for <a class="existingWikiWord" href="/nlab/show/implication">implication</a></td><td style="text-align: left;"></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/unit">unit</a> for hom-tensor adjunction</td><td style="text-align: left;">application</td></tr> <tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/cut+elimination">cut elimination</a> for <a class="existingWikiWord" href="/nlab/show/implication">implication</a></td><td style="text-align: left;"></td><td style="text-align: left;">one of the <a class="existingWikiWord" href="/nlab/show/zigzag+identities">zigzag identities</a> for hom-tensor adjunction</td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/beta+reduction">beta reduction</a></td></tr> <tr><td style="text-align: left;">identity elimination for <a class="existingWikiWord" href="/nlab/show/implication">implication</a></td><td style="text-align: left;"></td><td style="text-align: left;">the other <a class="existingWikiWord" href="/nlab/show/zigzag+identity">zigzag identity</a> for hom-tensor adjunction</td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/eta+conversion">eta conversion</a></td></tr> <tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/true">true</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/singleton">singleton</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/terminal+object">terminal object</a>/<a class="existingWikiWord" href="/nlab/show/%28-2%29-truncated+object">(-2)-truncated object</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/h-level+0">h-level 0</a>-<a class="existingWikiWord" href="/nlab/show/type">type</a>/<a class="existingWikiWord" href="/nlab/show/unit+type">unit type</a></td></tr> <tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/false">false</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/empty+set">empty set</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/initial+object">initial object</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/empty+type">empty type</a></td></tr> <tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/proposition">proposition</a>, <a class="existingWikiWord" href="/nlab/show/truth+value">truth value</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/subsingleton">subsingleton</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/subterminal+object">subterminal object</a>/<a class="existingWikiWord" href="/nlab/show/%28-1%29-truncated+object">(-1)-truncated object</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/h-proposition">h-proposition</a>, <a class="existingWikiWord" href="/nlab/show/mere+proposition">mere proposition</a></td></tr> <tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/logical+conjunction">logical conjunction</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/cartesian+product">cartesian product</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/product">product</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/product+type">product type</a></td></tr> <tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/disjunction">disjunction</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/disjoint+union">disjoint union</a> (<a class="existingWikiWord" href="/nlab/show/support">support</a> of)</td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/coproduct">coproduct</a> (<a class="existingWikiWord" href="/nlab/show/%28-1%29-truncation">(-1)-truncation</a> of)</td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/sum+type">sum type</a> (<a class="existingWikiWord" href="/nlab/show/bracket+type">bracket type</a> of)</td></tr> <tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/implication">implication</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/function+set">function set</a> (into <a class="existingWikiWord" href="/nlab/show/subsingleton">subsingleton</a>)</td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/internal+hom">internal hom</a> (into <a class="existingWikiWord" href="/nlab/show/subterminal+object">subterminal object</a>)</td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/function+type">function type</a> (into <a class="existingWikiWord" href="/nlab/show/h-proposition">h-proposition</a>)</td></tr> <tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/negation">negation</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/function+set">function set</a> into <a class="existingWikiWord" href="/nlab/show/empty+set">empty set</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/internal+hom">internal hom</a> into <a class="existingWikiWord" href="/nlab/show/initial+object">initial object</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/function+type">function type</a> into <a class="existingWikiWord" href="/nlab/show/empty+type">empty type</a></td></tr> <tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/universal+quantification">universal quantification</a></td><td style="text-align: left;">indexed <a class="existingWikiWord" href="/nlab/show/cartesian+product">cartesian product</a> (of family of <a class="existingWikiWord" href="/nlab/show/subsingletons">subsingletons</a>)</td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/dependent+product">dependent product</a> (of family of <a class="existingWikiWord" href="/nlab/show/subterminal+objects">subterminal objects</a>)</td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/dependent+product+type">dependent product type</a> (of family of <a class="existingWikiWord" href="/nlab/show/h-propositions">h-propositions</a>)</td></tr> <tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/existential+quantification">existential quantification</a></td><td style="text-align: left;">indexed <a class="existingWikiWord" href="/nlab/show/disjoint+union">disjoint union</a> (<a class="existingWikiWord" href="/nlab/show/support">support</a> of)</td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/dependent+sum">dependent sum</a> (<a class="existingWikiWord" href="/nlab/show/%28-1%29-truncation">(-1)-truncation</a> of)</td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/dependent+sum+type">dependent sum type</a> (<a class="existingWikiWord" href="/nlab/show/bracket+type">bracket type</a> of)</td></tr> <tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/logical+equivalence">logical equivalence</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/bijection+set">bijection set</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/object+of+isomorphisms">object of isomorphisms</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/equivalence+type">equivalence type</a></td></tr> <tr><td style="text-align: left;"></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/support+set">support set</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/support+object">support object</a>/<a class="existingWikiWord" href="/nlab/show/%28-1%29-truncation">(-1)-truncation</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/propositional+truncation">propositional truncation</a>/<a class="existingWikiWord" href="/nlab/show/bracket+type">bracket type</a></td></tr> <tr><td style="text-align: left;"></td><td style="text-align: left;"></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/n-image">n-image</a> of <a class="existingWikiWord" href="/nlab/show/morphism">morphism</a> into <a class="existingWikiWord" href="/nlab/show/terminal+object">terminal object</a>/<a class="existingWikiWord" href="/nlab/show/n-truncation">n-truncation</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/n-truncation+modality">n-truncation modality</a></td></tr> <tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/equality">equality</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/diagonal+function">diagonal function</a>/<a class="existingWikiWord" href="/nlab/show/diagonal+subset">diagonal subset</a>/<a class="existingWikiWord" href="/nlab/show/diagonal+relation">diagonal relation</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/path+space+object">path space object</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/identity+type">identity type</a>/<a class="existingWikiWord" href="/nlab/show/path+type">path type</a></td></tr> <tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/completely+presented+set">completely presented set</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/set">set</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/discrete+object">discrete object</a>/<a class="existingWikiWord" href="/nlab/show/0-truncated+object">0-truncated object</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/h-level+2">h-level 2</a>-<a class="existingWikiWord" href="/nlab/show/type">type</a>/<a class="existingWikiWord" href="/nlab/show/set">set</a>/<a class="existingWikiWord" href="/nlab/show/h-set">h-set</a></td></tr> <tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/set">set</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/set">set</a> with <a class="existingWikiWord" href="/nlab/show/equivalence+relation">equivalence relation</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/groupoid+object+in+an+%28infinity%2C1%29-category">internal 0-groupoid</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/Bishop+set">Bishop set</a>/<a class="existingWikiWord" href="/nlab/show/setoid">setoid</a> with its <a class="existingWikiWord" href="/nlab/show/pseudo-equivalence+relation">pseudo-equivalence relation</a> an actual <a class="existingWikiWord" href="/nlab/show/equivalence+relation">equivalence relation</a></td></tr> <tr><td style="text-align: left;"></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/equivalence+class">equivalence class</a>/<a class="existingWikiWord" href="/nlab/show/quotient+set">quotient set</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/quotient">quotient</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/quotient+type">quotient type</a></td></tr> <tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/induction">induction</a></td><td style="text-align: left;"></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/colimit">colimit</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/inductive+type">inductive type</a>, <a class="existingWikiWord" href="/nlab/show/W-type">W-type</a>, <a class="existingWikiWord" href="/nlab/show/M-type">M-type</a></td></tr> <tr><td style="text-align: left;">higher <a class="existingWikiWord" href="/nlab/show/induction">induction</a></td><td style="text-align: left;"></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/%28infinity%2C1%29-colimit">higher colimit</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/higher+inductive+type">higher inductive type</a></td></tr> <tr><td style="text-align: left;">-</td><td style="text-align: left;"></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/0-truncated">0-truncated</a> <a class="existingWikiWord" href="/nlab/show/%28infinity%2C1%29-colimit">higher colimit</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/quotient+inductive+type">quotient inductive type</a></td></tr> <tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/coinduction">coinduction</a></td><td style="text-align: left;"></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/limit">limit</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/coinductive+type">coinductive type</a></td></tr> <tr><td style="text-align: left;"></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/preset">preset</a></td><td style="text-align: left;"></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/type">type</a> without <a class="existingWikiWord" href="/nlab/show/identity+types">identity types</a></td></tr> <tr><td style="text-align: left;"></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/set">set</a> of <a class="existingWikiWord" href="/nlab/show/truth+values">truth values</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/subobject+classifier">subobject classifier</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/type+of+propositions">type of propositions</a></td></tr> <tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/domain+of+discourse">domain of discourse</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/universe">universe</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/object+classifier">object classifier</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/type+universe">type universe</a></td></tr> <tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/modality">modality</a></td><td style="text-align: left;"></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/closure+operator">closure operator</a>, (<a class="existingWikiWord" href="/nlab/show/idempotent+monad">idempotent</a>) <a class="existingWikiWord" href="/nlab/show/monad">monad</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/modal+type+theory">modal type theory</a>, <a class="existingWikiWord" href="/nlab/show/monad+%28in+computer+science%29">monad (in computer science)</a></td></tr> <tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/linear+logic">linear logic</a></td><td style="text-align: left;"></td><td style="text-align: left;">(<a class="existingWikiWord" href="/nlab/show/symmetric+monoidal+category">symmetric</a>, <a class="existingWikiWord" href="/nlab/show/closed+monoidal+category">closed</a>) <a class="existingWikiWord" href="/nlab/show/monoidal+category">monoidal category</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/linear+type+theory">linear type theory</a>/<a class="existingWikiWord" href="/nlab/show/quantum+computation">quantum computation</a></td></tr> <tr><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/proof+net">proof net</a></td><td style="text-align: left;"></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/string+diagram">string diagram</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/quantum+circuit">quantum circuit</a></td></tr> <tr><td style="text-align: left;">(absence of) <a class="existingWikiWord" href="/nlab/show/contraction+rule">contraction rule</a></td><td style="text-align: left;"></td><td style="text-align: left;">(absence of) <a class="existingWikiWord" href="/nlab/show/diagonal">diagonal</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/no-cloning+theorem">no-cloning theorem</a></td></tr> <tr><td style="text-align: left;"></td><td style="text-align: left;"></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/synthetic+mathematics">synthetic mathematics</a></td><td style="text-align: left;"><a class="existingWikiWord" href="/nlab/show/domain+specific+embedded+programming+language">domain specific embedded programming language</a></td></tr> </tbody></table> </div> <p><strong><a class="existingWikiWord" href="/nlab/show/homotopy+levels">homotopy levels</a></strong></p> <ul> <li> <p><a class="existingWikiWord" href="/nlab/show/type+theory">type theory</a></p> </li> <li> <p><a class="existingWikiWord" href="/nlab/show/2-type+theory">2-type theory</a>, <a class="existingWikiWord" href="/michaelshulman/show/2-categorical+logic">2-categorical logic</a></p> </li> <li> <p><a class="existingWikiWord" href="/nlab/show/homotopy+type+theory">homotopy type theory</a>, <a class="existingWikiWord" href="/nlab/show/homotopy+type+theory+-+contents">homotopy type theory - contents</a></p> <ul> <li> <p><a class="existingWikiWord" href="/nlab/show/homotopy+type">homotopy type</a></p> </li> <li> <p><a class="existingWikiWord" href="/nlab/show/univalence">univalence</a>, <a class="existingWikiWord" href="/nlab/show/function+extensionality">function extensionality</a>, <a class="existingWikiWord" href="/nlab/show/internal+logic+of+an+%28%E2%88%9E%2C1%29-topos">internal logic of an (∞,1)-topos</a></p> </li> <li> <p><a class="existingWikiWord" href="/nlab/show/cohesive+homotopy+type+theory">cohesive homotopy type theory</a></p> </li> <li> <p><a class="existingWikiWord" href="/nlab/show/directed+homotopy+type+theory">directed homotopy type theory</a></p> </li> <li> <p><a class="existingWikiWord" href="/nlab/show/HoTT+methods+for+homotopy+theorists">HoTT methods for homotopy theorists</a></p> </li> </ul> </li> </ul> <p><strong><a class="existingWikiWord" href="/nlab/show/semantics">semantics</a></strong></p> <ul> <li> <p><a class="existingWikiWord" href="/nlab/show/internal+logic">internal logic</a>, <a class="existingWikiWord" href="/nlab/show/categorical+semantics">categorical semantics</a></p> <ul> <li><a class="existingWikiWord" href="/nlab/show/display+map">display map</a></li> </ul> </li> <li> <p><a class="existingWikiWord" href="/nlab/show/internal+logic+of+a+topos">internal logic of a topos</a></p> <ul> <li> <p><a class="existingWikiWord" href="/nlab/show/Mitchell-Benabou+language">Mitchell-Benabou language</a></p> </li> <li> <p><a class="existingWikiWord" href="/nlab/show/Kripke-Joyal+semantics">Kripke-Joyal semantics</a></p> </li> </ul> </li> <li> <p><a class="existingWikiWord" href="/nlab/show/internal+logic+of+an+%28%E2%88%9E%2C1%29-topos">internal logic of an (∞,1)-topos</a></p> <ul> <li><a class="existingWikiWord" href="/nlab/show/type-theoretic+model+category">type-theoretic model category</a></li> </ul> </li> </ul> <div> <p> <a href="/nlab/edit/type+theory+-+contents">Edit this sidebar</a> </p> </div></div></div> </div> </div> <h1 id="contents">Contents</h1> <div class='maruku_toc'> <ul> <li><a href='#idea'>Idea</a></li> <li><a href='#definition'>Definition</a></li> <ul> <li><a href='#InTypeTheory'>In type theory</a></li> <ul> <li><a href='#as_a_positive_type'>As a positive type</a></li> <li><a href='#as_the_type_of_decidable_propositions'>As the type of decidable propositions</a></li> <ul> <li><a href='#as_a_strict_tarski_universe'>As a strict Tarski universe</a></li> <li><a href='#as_a_weak_tarski_universe'>As a weak Tarski universe</a></li> <li><a href='#as_a_russell_universe'>As a Russell universe</a></li> </ul> </ul> <li><a href='#InHomotopyTypeTheory'>In homotopy type theory</a></li> </ul> <li><a href='#properties'>Properties</a></li> <ul> <li><a href='#descent_and_large_elimination'>Descent and large elimination</a></li> <li><a href='#extensionality_principle_of_the_boolean_domain'>Extensionality principle of the boolean domain</a></li> <li><a href='#relation_to_sum_types'>Relation to sum types</a></li> <li><a href='#boolean_logic'>Boolean logic</a></li> <li><a href='#other_properties'>Other properties</a></li> </ul> <li><a href='#related_concepts'>Related concepts</a></li> <li><a href='#references'>References</a></li> </ul> </div> <h2 id="idea">Idea</h2> <p>The <strong>boolean domain</strong> or <strong>boolean field</strong> (often just: <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>Bool</mi></mrow><annotation encoding="application/x-tex">Bool</annotation></semantics></math>) is a <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mn>2</mn></mrow><annotation encoding="application/x-tex">2</annotation></semantics></math>-element <a class="existingWikiWord" href="/nlab/show/set">set</a>, say <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>𝔹</mi><mo>=</mo><mo stretchy="false">{</mo><mn>0</mn><mo>,</mo><mn>1</mn><mo stretchy="false">}</mo></mrow><annotation encoding="application/x-tex">\mathbb{B} = \{ 0, 1 \}</annotation></semantics></math> (“<a class="existingWikiWord" href="/nlab/show/bits">bits</a>”) or <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>𝔹</mi><mo>=</mo><mo stretchy="false">{</mo><mo>⊥</mo><mo>,</mo><mo>⊤</mo><mo stretchy="false">}</mo></mrow><annotation encoding="application/x-tex">\mathbb{B} = \{ \bot, \top \}</annotation></semantics></math> (“<a class="existingWikiWord" href="/nlab/show/bottom">bottom</a>”, “<a class="existingWikiWord" href="/nlab/show/top">top</a>”), whose <a class="existingWikiWord" href="/nlab/show/elements">elements</a> may be interpreted as <a class="existingWikiWord" href="/nlab/show/truth+values">truth values</a>.</p> <p>Note that <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>𝔹</mi></mrow><annotation encoding="application/x-tex">\mathbb{B}</annotation></semantics></math> is the set of <em>all</em> <a class="existingWikiWord" href="/nlab/show/truth+values">truth values</a> in <a class="existingWikiWord" href="/nlab/show/classical+logic">classical logic</a>, but this cannot be assumed in non-classical logic such as <a class="existingWikiWord" href="/nlab/show/intuitionistic+logic">intuitionistic logic</a>.</p> <p>The Boolean domain plays the role of the <a class="existingWikiWord" href="/nlab/show/subobject+classifier">subobject classifier</a> in the <a class="existingWikiWord" href="/nlab/show/Boolean+topos">Boolean topos</a> of <a class="existingWikiWord" href="/nlab/show/Sets">Sets</a>.</p> <p>If we think of the classical <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>𝔹</mi></mrow><annotation encoding="application/x-tex">\mathbb{B}</annotation></semantics></math> as a <a class="existingWikiWord" href="/nlab/show/pointed+set">pointed set</a> equipped with the true element, then there is an <a class="existingWikiWord" href="/nlab/show/generalized+the">effectively unique</a> boolean domain.</p> <p>A <strong>boolean variable</strong> <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>x</mi></mrow><annotation encoding="application/x-tex">x</annotation></semantics></math> is a variable that takes its value in a boolean domain, as <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>x</mi><mo>∈</mo><mi>𝔹</mi></mrow><annotation encoding="application/x-tex">x \in \mathbb{B}</annotation></semantics></math>. If this variable depends on parameters, then it is (or defines) a <a class="existingWikiWord" href="/nlab/show/Boolean-valued+function">Boolean-valued function</a>, that is a <a class="existingWikiWord" href="/nlab/show/function">function</a> whose target is <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>𝔹</mi></mrow><annotation encoding="application/x-tex">\mathbb{B}</annotation></semantics></math>.</p> <p>An <a class="existingWikiWord" href="/nlab/show/element">element</a> of <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>𝔹</mi></mrow><annotation encoding="application/x-tex">\mathbb{B}</annotation></semantics></math> is a <strong><a class="existingWikiWord" href="/nlab/show/binary+digit">binary digit</a></strong>, or <strong>bit</strong>.</p> <p>The boolean domain is the initial set with two elements. It is also the initial set with an element and an <a class="existingWikiWord" href="/nlab/show/involution">involution</a>. It is also the <a class="existingWikiWord" href="/nlab/show/tensor+unit">tensor unit</a> for the <a class="existingWikiWord" href="/nlab/show/smash+product">smash product</a> in the <a class="existingWikiWord" href="/nlab/show/monoidal+category">monoidal category</a> of <a class="existingWikiWord" href="/nlab/show/pointed+sets">pointed sets</a>.</p> <p> <div class='num_remark'> <h6>Remark</h6> <p><strong>(relation to boolean algebra)</strong> <br /> The term ‘boolean field’ (or just ‘field’, depending on the context) is sometimes used more generally for any <em><a class="existingWikiWord" href="/nlab/show/boolean+algebra">boolean algebra</a></em>. In fact, the boolean domain is the <a class="existingWikiWord" href="/nlab/show/initial+object">initial</a> boolean algebra. If we interpret a boolean algebra as a <a class="existingWikiWord" href="/nlab/show/boolean+ring">boolean ring</a>, then the boolean domain is the <a class="existingWikiWord" href="/nlab/show/finite+field">finite field</a> with <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mn>2</mn></mrow><annotation encoding="application/x-tex">2</annotation></semantics></math> elements.</p> </div> </p> <h2 id="definition">Definition</h2> <h3 id="InTypeTheory">In type theory</h3> <p>As an <a class="existingWikiWord" href="/nlab/show/inductive+type">inductive type</a>, the boolean domain is given by</p> <pre><code>Inductive Bool : Type | zero : Bool | one : Bool</code></pre> <p>This says that the type is inductively constructed from two <a class="existingWikiWord" href="/nlab/show/terms">terms</a> in the type Bool, whose <a class="existingWikiWord" href="/nlab/show/semantics">interpretation</a> is as the two points of the type.</p> <h4 id="as_a_positive_type">As a positive type</h4> <p>Assuming that <a class="existingWikiWord" href="/nlab/show/identification+types">identification types</a> and <a class="existingWikiWord" href="/nlab/show/dependent+product+types">dependent product types</a> exist in the type theory, the boolean domain is the <a class="existingWikiWord" href="/nlab/show/inductive+type">inductive type</a> generated by two elements, and is defined by the following <a class="existingWikiWord" href="/nlab/show/inference+rules">inference rules</a>:</p> <p><strong><a class="existingWikiWord" href="/nlab/show/type+formation+rules">type formation rules</a></strong> for the boolean domain</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">ctx</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><mi mathvariant="normal">Bool</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathrm{Bool} \; \mathrm{type}}</annotation></semantics></math></div> <p><br /></p> <p><strong><a class="existingWikiWord" href="/nlab/show/term+introduction+rules">term introduction rules</a></strong> for the boolean domain:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">ctx</mi></mrow><mrow><mo>⊢</mo><mn>0</mn><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow></mfrac><mspace width="2em"></mspace><mfrac><mrow><mi>Γ</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">ctx</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><mn>1</mn><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \; \mathrm{ctx}}{\vdash 0:\mathrm{Bool}} \qquad \frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash 1:\mathrm{Bool}}</annotation></semantics></math></div> <p><br /></p> <p><strong><a class="existingWikiWord" href="/nlab/show/term+elimination+rules">term elimination rules</a></strong> for the boolean domain:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>,</mo><mi>x</mi><mo>:</mo><mi mathvariant="normal">Bool</mi><mo>⊢</mo><mi>C</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow><mrow><mi>Γ</mi><mo>,</mo><msub><mi>c</mi> <mn>0</mn></msub><mo>:</mo><mi>C</mi><mo stretchy="false">(</mo><mn>0</mn><mo stretchy="false">)</mo><mo>,</mo><msub><mi>c</mi> <mn>1</mn></msub><mo>:</mo><mi>C</mi><mo stretchy="false">(</mo><mn>1</mn><mo stretchy="false">)</mo><mo>,</mo><mi>p</mi><mo>:</mo><mi mathvariant="normal">Bool</mi><mo>⊢</mo><msubsup><mi mathvariant="normal">ind</mi> <mi mathvariant="normal">Bool</mi> <mi>C</mi></msubsup><mo stretchy="false">(</mo><msub><mi>c</mi> <mn>0</mn></msub><mo>,</mo><msub><mi>c</mi> <mn>1</mn></msub><mo>,</mo><mi>p</mi><mo stretchy="false">)</mo><mo>:</mo><mi>C</mi><mo stretchy="false">(</mo><mi>p</mi><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma, x:\mathrm{Bool} \vdash C(x) \; \mathrm{type}}{\Gamma, c_0:C(0), c_1:C(1), p:\mathrm{Bool} \vdash \mathrm{ind}_\mathrm{Bool}^C(c_0, c_1, p):C(p)}</annotation></semantics></math></div> <p><br /></p> <p><strong><a class="existingWikiWord" href="/nlab/show/computation+rules">computation rules</a></strong> for the boolean domain:</p> <ul> <li> <p><strong>judgmental computation rules</strong></p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>,</mo><mi>x</mi><mo>:</mo><mi mathvariant="normal">Bool</mi><mo>⊢</mo><mi>C</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow><mrow><mi>Γ</mi><mo>,</mo><msub><mi>c</mi> <mn>0</mn></msub><mo>:</mo><mi>C</mi><mo stretchy="false">(</mo><mn>0</mn><mo stretchy="false">)</mo><mo>,</mo><msub><mi>c</mi> <mn>1</mn></msub><mo>:</mo><mi>C</mi><mo stretchy="false">(</mo><mn>1</mn><mo stretchy="false">)</mo><mo>⊢</mo><msubsup><mi mathvariant="normal">ind</mi> <mi mathvariant="normal">Bool</mi> <mi>C</mi></msubsup><mo stretchy="false">(</mo><msub><mi>c</mi> <mn>0</mn></msub><mo>,</mo><msub><mi>c</mi> <mn>1</mn></msub><mo>,</mo><mn>0</mn><mo stretchy="false">)</mo><mo>≡</mo><msub><mi>c</mi> <mn>0</mn></msub><mo>:</mo><mi>C</mi><mo stretchy="false">(</mo><mn>0</mn><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma, x:\mathrm{Bool} \vdash C(x) \; \mathrm{type}}{\Gamma, c_0:C(0), c_1:C(1) \vdash \mathrm{ind}_\mathrm{Bool}^C(c_0, c_1, 0) \equiv c_0:C(0)}</annotation></semantics></math></div><div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>,</mo><mi>x</mi><mo>:</mo><mi mathvariant="normal">Bool</mi><mo>⊢</mo><mi>C</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow><mrow><mi>Γ</mi><mo>,</mo><msub><mi>c</mi> <mn>0</mn></msub><mo>:</mo><mi>C</mi><mo stretchy="false">(</mo><mn>0</mn><mo stretchy="false">)</mo><mo>,</mo><msub><mi>c</mi> <mn>1</mn></msub><mo>:</mo><mi>C</mi><mo stretchy="false">(</mo><mn>1</mn><mo stretchy="false">)</mo><mo>⊢</mo><msubsup><mi mathvariant="normal">ind</mi> <mi mathvariant="normal">Bool</mi> <mi>C</mi></msubsup><mo stretchy="false">(</mo><msub><mi>c</mi> <mn>0</mn></msub><mo>,</mo><msub><mi>c</mi> <mn>1</mn></msub><mo>,</mo><mn>1</mn><mo stretchy="false">)</mo><mo>≡</mo><msub><mi>c</mi> <mn>1</mn></msub><mo>:</mo><mi>C</mi><mo stretchy="false">(</mo><mn>1</mn><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma, x:\mathrm{Bool} \vdash C(x) \; \mathrm{type}}{\Gamma, c_0:C(0), c_1:C(1) \vdash \mathrm{ind}_\mathrm{Bool}^C(c_0, c_1, 1) \equiv c_1:C(1)}</annotation></semantics></math></div></li> <li> <p><strong>typal computation rules</strong></p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>,</mo><mi>x</mi><mo>:</mo><mi mathvariant="normal">Bool</mi><mo>⊢</mo><mi>C</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow><mrow><mi>Γ</mi><mo>,</mo><msub><mi>c</mi> <mn>0</mn></msub><mo>:</mo><mi>C</mi><mo stretchy="false">(</mo><mn>0</mn><mo stretchy="false">)</mo><mo>,</mo><msub><mi>c</mi> <mn>1</mn></msub><mo>:</mo><mi>C</mi><mo stretchy="false">(</mo><mn>1</mn><mo stretchy="false">)</mo><mo>⊢</mo><msubsup><mi>β</mi> <mi mathvariant="normal">Bool</mi> <mn>0</mn></msubsup><mo stretchy="false">(</mo><msub><mi>c</mi> <mn>0</mn></msub><mo>,</mo><msub><mi>c</mi> <mn>1</mn></msub><mo stretchy="false">)</mo><mo>:</mo><msub><mi mathvariant="normal">Id</mi> <mrow><mi>C</mi><mo stretchy="false">(</mo><mn>0</mn><mo stretchy="false">)</mo></mrow></msub><mo stretchy="false">(</mo><msubsup><mi mathvariant="normal">ind</mi> <mi mathvariant="normal">Bool</mi> <mi>C</mi></msubsup><mo stretchy="false">(</mo><msub><mi>c</mi> <mn>0</mn></msub><mo>,</mo><msub><mi>c</mi> <mn>1</mn></msub><mo>,</mo><mn>0</mn><mo stretchy="false">)</mo><mo>,</mo><msub><mi>c</mi> <mn>0</mn></msub><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma, x:\mathrm{Bool} \vdash C(x) \; \mathrm{type}}{\Gamma, c_0:C(0), c_1:C(1) \vdash \beta_\mathrm{Bool}^0(c_0, c_1):\mathrm{Id}_{C(0)}(\mathrm{ind}_\mathrm{Bool}^C(c_0, c_1, 0), c_0)}</annotation></semantics></math></div><div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>,</mo><mi>x</mi><mo>:</mo><mi mathvariant="normal">Bool</mi><mo>⊢</mo><mi>C</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow><mrow><mi>Γ</mi><mo>,</mo><msub><mi>c</mi> <mn>0</mn></msub><mo>:</mo><mi>C</mi><mo stretchy="false">(</mo><mn>0</mn><mo stretchy="false">)</mo><mo>,</mo><msub><mi>c</mi> <mn>1</mn></msub><mo>:</mo><mi>C</mi><mo stretchy="false">(</mo><mn>1</mn><mo stretchy="false">)</mo><mo>⊢</mo><msubsup><mi>β</mi> <mi mathvariant="normal">Bool</mi> <mn>1</mn></msubsup><mo stretchy="false">(</mo><msub><mi>c</mi> <mn>0</mn></msub><mo>,</mo><msub><mi>c</mi> <mn>1</mn></msub><mo>,</mo><mn>1</mn><mo stretchy="false">)</mo><mo>:</mo><msub><mi mathvariant="normal">Id</mi> <mrow><mi>C</mi><mo stretchy="false">(</mo><mn>1</mn><mo stretchy="false">)</mo></mrow></msub><mo stretchy="false">(</mo><msubsup><mi mathvariant="normal">ind</mi> <mi mathvariant="normal">Bool</mi> <mi>C</mi></msubsup><mo stretchy="false">(</mo><msub><mi>c</mi> <mn>0</mn></msub><mo>,</mo><msub><mi>c</mi> <mn>1</mn></msub><mo>,</mo><mn>1</mn><mo stretchy="false">)</mo><mo>,</mo><msub><mi>c</mi> <mn>1</mn></msub><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma, x:\mathrm{Bool} \vdash C(x) \; \mathrm{type}}{\Gamma, c_0:C(0), c_1:C(1) \vdash \beta_\mathrm{Bool}^1(c_0, c_1, 1):\mathrm{Id}_{C(1)}(\mathrm{ind}_\mathrm{Bool}^C(c_0, c_1, 1), c_1)}</annotation></semantics></math></div></li> </ul> <p><br /></p> <p><strong><a class="existingWikiWord" href="/nlab/show/uniqueness+rules">uniqueness rules</a></strong> for the boolean domain:</p> <ul> <li><strong>judgmental uniqueness rules</strong><div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>,</mo><mi>x</mi><mo>:</mo><mi mathvariant="normal">Bool</mi><mo>⊢</mo><mi>C</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow><mrow><mi>Γ</mi><mo>,</mo><mi>c</mi><mo>:</mo><munder><mo lspace="thinmathspace" rspace="thinmathspace">∏</mo> <mrow><mi>x</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow></munder><mi>C</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mo>,</mo><mi>p</mi><mo>:</mo><mi mathvariant="normal">Bool</mi><mo>⊢</mo><msubsup><mi mathvariant="normal">ind</mi> <mi mathvariant="normal">Bool</mi> <mi>C</mi></msubsup><mo stretchy="false">(</mo><mi>c</mi><mo stretchy="false">(</mo><mn>0</mn><mo stretchy="false">)</mo><mo>,</mo><mi>c</mi><mo stretchy="false">(</mo><mn>1</mn><mo stretchy="false">)</mo><mo>,</mo><mi>p</mi><mo stretchy="false">)</mo><mo>≡</mo><mi>c</mi><mo stretchy="false">(</mo><mi>p</mi><mo stretchy="false">)</mo><mo>:</mo><mi>C</mi><mo stretchy="false">(</mo><mi>p</mi><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma, x:\mathrm{Bool} \vdash C(x) \; \mathrm{type}}{\Gamma, c:\prod_{x:\mathrm{Bool}} C(x), p:\mathrm{Bool} \vdash \mathrm{ind}_\mathrm{Bool}^C(c(0), c(1), p) \equiv c(p):C(p)}</annotation></semantics></math></div></li> <li><strong>typal uniqueness rules</strong><div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>,</mo><mi>x</mi><mo>:</mo><mi mathvariant="normal">Bool</mi><mo>⊢</mo><mi>C</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow><mrow><mi>Γ</mi><mo>,</mo><mi>c</mi><mo>:</mo><munder><mo lspace="thinmathspace" rspace="thinmathspace">∏</mo> <mrow><mi>x</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow></munder><mi>C</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mo>,</mo><mi>p</mi><mo>:</mo><mi mathvariant="normal">Bool</mi><mo>⊢</mo><msub><mi>η</mi> <mi mathvariant="normal">Bool</mi></msub><mo stretchy="false">(</mo><mi>c</mi><mo>,</mo><mi>p</mi><mo stretchy="false">)</mo><mo>:</mo><msub><mi mathvariant="normal">Id</mi> <mrow><mi>C</mi><mo stretchy="false">(</mo><mi>p</mi><mo stretchy="false">)</mo></mrow></msub><mo stretchy="false">(</mo><msubsup><mi mathvariant="normal">ind</mi> <mi mathvariant="normal">Bool</mi> <mi>C</mi></msubsup><mo stretchy="false">(</mo><mi>c</mi><mo stretchy="false">(</mo><mn>0</mn><mo stretchy="false">)</mo><mo>,</mo><mi>c</mi><mo stretchy="false">(</mo><mn>1</mn><mo stretchy="false">)</mo><mo>,</mo><mi>p</mi><mo stretchy="false">)</mo><mo>,</mo><mi>c</mi><mo stretchy="false">(</mo><mi>p</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma, x:\mathrm{Bool} \vdash C(x) \; \mathrm{type}}{\Gamma, c:\prod_{x:\mathrm{Bool}} C(x), p:\mathrm{Bool} \vdash \eta_\mathrm{Bool}(c, p):\mathrm{Id}_{C(p)}(\mathrm{ind}_\mathrm{Bool}^C(c(0), c(1), p), c(p))}</annotation></semantics></math></div></li> </ul> <p><br /></p> <p>The elimination, typal computation, and typal uniqueness rules for the boolean domain state that the boolean domain satisfies the <strong>dependent universal property of the boolean domain</strong>. If the dependent type theory also has <a class="existingWikiWord" href="/nlab/show/dependent+sum+types">dependent sum types</a> and <a class="existingWikiWord" href="/nlab/show/product+types">product types</a>, allowing one to define the <a class="existingWikiWord" href="/nlab/show/uniqueness+quantifier">uniqueness quantifier</a>, the dependent universal property of the boolean domain can be simplified to the following rule:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>,</mo><mi>x</mi><mo>:</mo><mi mathvariant="normal">Bool</mi><mo>⊢</mo><mi>C</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow><mrow><mi>Γ</mi><mo>,</mo><msub><mi>c</mi> <mn>0</mn></msub><mo>:</mo><mi>C</mi><mo stretchy="false">(</mo><mn>0</mn><mo stretchy="false">)</mo><mo>,</mo><msub><mi>c</mi> <mn>1</mn></msub><mo>:</mo><mi>C</mi><mo stretchy="false">(</mo><mn>1</mn><mo stretchy="false">)</mo><mo>⊢</mo><msubsup><mi mathvariant="normal">up</mi> <mi mathvariant="normal">Bool</mi> <mi>C</mi></msubsup><mo stretchy="false">(</mo><msub><mi>c</mi> <mn>0</mn></msub><mo>,</mo><msub><mi>c</mi> <mn>1</mn></msub><mo stretchy="false">)</mo><mo>:</mo><mo>∃</mo><mo>!</mo><mi>c</mi><mo>:</mo><munder><mo lspace="thinmathspace" rspace="thinmathspace">∏</mo> <mrow><mi>x</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow></munder><mi>C</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mo>.</mo><msub><mi mathvariant="normal">Id</mi> <mrow><mi>C</mi><mo stretchy="false">(</mo><mn>0</mn><mo stretchy="false">)</mo></mrow></msub><mo stretchy="false">(</mo><mi>c</mi><mo stretchy="false">(</mo><mn>0</mn><mo stretchy="false">)</mo><mo>,</mo><msub><mi>c</mi> <mn>0</mn></msub><mo stretchy="false">)</mo><mo>×</mo><msub><mi mathvariant="normal">Id</mi> <mrow><mi>C</mi><mo stretchy="false">(</mo><mn>1</mn><mo stretchy="false">)</mo></mrow></msub><mo stretchy="false">(</mo><mi>c</mi><mo stretchy="false">(</mo><mn>1</mn><mo stretchy="false">)</mo><mo>,</mo><msub><mi>c</mi> <mn>1</mn></msub><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma, x:\mathrm{Bool} \vdash C(x) \; \mathrm{type}}{\Gamma, c_0:C(0), c_1:C(1)\vdash \mathrm{up}_\mathrm{Bool}^C(c_0, c_1):\exists!c:\prod_{x:\mathrm{Bool}} C(x).\mathrm{Id}_{C(0)}(c(0), c_0) \times \mathrm{Id}_{C(1)}(c(1), c_1)}</annotation></semantics></math></div> <p>The judgmental computation and uniqueness rules imply the typal computation and uniqueness rules and thus imply the dependent universal property of the boolean domain.</p> <p>In type theories with a separate type judgment where not all types are elements of universes, one has to additionally add the following elimination and computation rules:</p> <p>Elimination rules:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>B</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow><mrow><mi>Γ</mi><mo>,</mo><mi>x</mi><mo>:</mo><mi mathvariant="normal">Bool</mi><mo>⊢</mo><msubsup><mi mathvariant="normal">typerec</mi> <mi mathvariant="normal">Bool</mi> <mrow><mi>A</mi><mo>,</mo><mi>B</mi></mrow></msubsup><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type}}{\Gamma, x:\mathrm{Bool} \vdash \mathrm{typerec}_{\mathrm{Bool}}^{A, B}(x) \; \mathrm{type}}</annotation></semantics></math></div> <p>Computation rules:</p> <ul> <li>judgmental computation rules</li> </ul> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>B</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msubsup><mi mathvariant="normal">typerec</mi> <mi mathvariant="normal">Bool</mi> <mrow><mi>A</mi><mo>,</mo><mi>B</mi></mrow></msubsup><mo stretchy="false">(</mo><mn>0</mn><mo stretchy="false">)</mo><mo>≡</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type}}{\Gamma \vdash \mathrm{typerec}_{\mathrm{Bool}}^{A, B}(0) \equiv A \; \mathrm{type}}</annotation></semantics></math></div><div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>B</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msubsup><mi mathvariant="normal">typerec</mi> <mi mathvariant="normal">Bool</mi> <mrow><mi>A</mi><mo>,</mo><mi>B</mi></mrow></msubsup><mo stretchy="false">(</mo><mn>1</mn><mo stretchy="false">)</mo><mo>≡</mo><mi>B</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type}}{\Gamma \vdash \mathrm{typerec}_{\mathrm{Bool}}^{A, B}(1) \equiv B \; \mathrm{type}}</annotation></semantics></math></div> <ul> <li>typal computation rules</li> </ul> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>B</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msubsup><mi>β</mi> <mi mathvariant="normal">Bool</mi> <mrow><mn>0</mn><mo>,</mo><mi>A</mi><mo>,</mo><mi>B</mi></mrow></msubsup><mo>:</mo><msubsup><mi mathvariant="normal">typerec</mi> <mi mathvariant="normal">Bool</mi> <mrow><mi>A</mi><mo>,</mo><mi>B</mi></mrow></msubsup><mo stretchy="false">(</mo><mn>0</mn><mo stretchy="false">)</mo><mo>≃</mo><mi>A</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type}}{\Gamma \vdash \beta_{\mathrm{Bool}}^{0, A, B}:\mathrm{typerec}_{\mathrm{Bool}}^{A, B}(0) \simeq A}</annotation></semantics></math></div><div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>B</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msubsup><mi>β</mi> <mi mathvariant="normal">Bool</mi> <mrow><mn>1</mn><mo>,</mo><mi>A</mi><mo>,</mo><mi>B</mi></mrow></msubsup><mo>:</mo><msubsup><mi mathvariant="normal">typerec</mi> <mi mathvariant="normal">Bool</mi> <mrow><mi>A</mi><mo>,</mo><mi>B</mi></mrow></msubsup><mo stretchy="false">(</mo><mn>1</mn><mo stretchy="false">)</mo><mo>≃</mo><mi>B</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type}}{\Gamma \vdash \beta_{\mathrm{Bool}}^{1, A, B}:\mathrm{typerec}_{\mathrm{Bool}}^{A, B}(1) \simeq B}</annotation></semantics></math></div> <h4 id="as_the_type_of_decidable_propositions">As the type of decidable propositions</h4> <p>The boolean domain can also be defined as the type of decidable propositions. Suppose that we have a <a class="existingWikiWord" href="/nlab/show/type+of+propositions">type of propositions</a> <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi mathvariant="normal">Prop</mi></mrow><annotation encoding="application/x-tex">\mathrm{Prop}</annotation></semantics></math>. Then, the type of booleans is defined as</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mi mathvariant="normal">Bool</mi><mo>≡</mo><munder><mo lspace="thinmathspace" rspace="thinmathspace">∑</mo> <mrow><mi>P</mi><mo>:</mo><mi mathvariant="normal">Prop</mi></mrow></munder><mi>P</mi><mo>∨</mo><mo>¬</mo><mi>P</mi></mrow><annotation encoding="application/x-tex">\mathrm{Bool} \equiv \sum_{P:\mathrm{Prop}} P \vee \neg P</annotation></semantics></math></div> <p>where <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>A</mi><mo>∨</mo><mi>B</mi></mrow><annotation encoding="application/x-tex">A \vee B</annotation></semantics></math> is the <a class="existingWikiWord" href="/nlab/show/disjunction">disjunction</a> of two types <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>A</mi></mrow><annotation encoding="application/x-tex">A</annotation></semantics></math> and <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>B</mi></mrow><annotation encoding="application/x-tex">B</annotation></semantics></math> and <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mo>¬</mo><mi>A</mi><mo>≡</mo><mi>A</mi><mo>→</mo><mi>∅</mi></mrow><annotation encoding="application/x-tex">\neg A \equiv A \to \emptyset</annotation></semantics></math> is the <a class="existingWikiWord" href="/nlab/show/negation">negation</a> of the type <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>A</mi></mrow><annotation encoding="application/x-tex">A</annotation></semantics></math>. Both disjunctions and the empty set can be directly defined from <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi mathvariant="normal">Prop</mi></mrow><annotation encoding="application/x-tex">\mathrm{Prop}</annotation></semantics></math>, <a class="existingWikiWord" href="/nlab/show/dependent+function+types">dependent function types</a>, and <a class="existingWikiWord" href="/nlab/show/product+types">product types</a>.</p> <p>One can also define directly the boolean domain as the <em>type of all decidable propositions</em>, provided one already has <a class="existingWikiWord" href="/nlab/show/disjunctions">disjunctions</a> defined in the type theory. Similarly to the <a class="existingWikiWord" href="/nlab/show/type+of+all+propositions">type of all propositions</a>, the boolean domain can be presented either as a <a class="existingWikiWord" href="/nlab/show/Russell+universe">Russell universe</a> or a <a class="existingWikiWord" href="/nlab/show/Tarski+universe">Tarski universe</a>. The difference between the two is that in the former, every <a class="existingWikiWord" href="/nlab/show/decidable+proposition">decidable proposition</a> in the type theory is literally an element of the boolean domain, while in the latter, elements of <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi mathvariant="normal">Bool</mi></mrow><annotation encoding="application/x-tex">\mathrm{Bool}</annotation></semantics></math> are only indices of a (-1)-truncated type family <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi mathvariant="normal">El</mi></mrow><annotation encoding="application/x-tex">\mathrm{El}</annotation></semantics></math>; every <a class="existingWikiWord" href="/nlab/show/decidable+proposition">decidable proposition</a> in the type theory is only <a class="existingWikiWord" href="/nlab/show/essentially+small+type">essentially <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"> <semantics> <mrow> <mi mathvariant="normal">Bool</mi> </mrow> <annotation encoding="application/x-tex">\mathrm{Bool}</annotation> </semantics> </math>-small</a> for <a class="existingWikiWord" href="/nlab/show/weak+Tarski+universes">weak Tarski universes</a> or <a class="existingWikiWord" href="/nlab/show/judgmentally+equal">judgmentally equal</a> to an <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi mathvariant="normal">El</mi><mo stretchy="false">(</mo><mi>P</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">\mathrm{El}(P)</annotation></semantics></math> for <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>P</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow><annotation encoding="application/x-tex">P:\mathrm{Bool}</annotation></semantics></math> for <a class="existingWikiWord" href="/nlab/show/strict+Tarski+universes">strict Tarski universes</a>.</p> <h5 id="as_a_strict_tarski_universe">As a strict Tarski universe</h5> <p>As a strict <a class="existingWikiWord" href="/nlab/show/Tarski+universe">Tarski universe</a>, the boolean domain is given by the following <a class="existingWikiWord" href="/nlab/show/natural+deduction">natural deduction</a> <a class="existingWikiWord" href="/nlab/show/inference+rules">inference rules</a>:</p> <p>Formation rules for the boolean domain:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">ctx</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><mi mathvariant="normal">Bool</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathrm{Bool} \; \mathrm{type}}</annotation></semantics></math></div> <p>Introduction rules for the boolean domain:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msub><mi mathvariant="normal">toBool</mi> <mi>A</mi></msub><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo>→</mo><mo stretchy="false">(</mo><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi><mo stretchy="false">)</mo><mo>→</mo><mi mathvariant="normal">Bool</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash \mathrm{toBool}_A:\mathrm{isProp}(A) \to (A \vee \neg A) \to \mathrm{Bool}}</annotation></semantics></math></div> <p>Elimination rules for the boolean domain:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><mi mathvariant="normal">El</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow></mfrac><mspace width="2em"></mspace><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><mi mathvariant="normal">proptrunc</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi mathvariant="normal">El</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo></mrow></mfrac><mspace width="2em"></mspace><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><mi mathvariant="normal">lem</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo>:</mo><mi mathvariant="normal">El</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo>∨</mo><mo>¬</mo><mi mathvariant="normal">El</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A:\mathrm{Bool}}{\Gamma \vdash \mathrm{El}(A) \; \mathrm{type}} \qquad \frac{\Gamma \vdash A:\mathrm{Bool}}{\Gamma \vdash \mathrm{proptrunc}(A):\mathrm{isProp}(\mathrm{El}(A))} \qquad \frac{\Gamma \vdash A:\mathrm{Bool}}{\Gamma \vdash \mathrm{lem}(A):\mathrm{El}(A) \vee \neg \mathrm{El}(A)}</annotation></semantics></math></div> <p>Computation rules for the boolean domain:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>p</mi><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>q</mi><mo>:</mo><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><mi mathvariant="normal">El</mi><mo stretchy="false">(</mo><msub><mi mathvariant="normal">toBool</mi> <mi>A</mi></msub><mo stretchy="false">(</mo><mi>p</mi><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi>q</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>≡</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash p:\mathrm{isProp}(A) \quad \Gamma \vdash q:A \vee \neg A}{\Gamma \vdash \mathrm{El}(\mathrm{toBool}_A(p)(q)) \equiv A \; \mathrm{type}}</annotation></semantics></math></div> <ul> <li>Judgmental computation rules:</li> </ul> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>p</mi><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>q</mi><mo>:</mo><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><mi mathvariant="normal">proptrunc</mi><mo stretchy="false">(</mo><msub><mi mathvariant="normal">toBool</mi> <mi>A</mi></msub><mo stretchy="false">(</mo><mi>p</mi><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi>q</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>≡</mo><mi>p</mi><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash p:\mathrm{isProp}(A) \quad \Gamma \vdash q:A \vee \neg A}{\Gamma \vdash \mathrm{proptrunc}(\mathrm{toBool}_A(p)(q)) \equiv p:\mathrm{isProp}(A)}</annotation></semantics></math></div><div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>p</mi><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>q</mi><mo>:</mo><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><mi mathvariant="normal">lem</mi><mo stretchy="false">(</mo><msub><mi mathvariant="normal">toBool</mi> <mi>A</mi></msub><mo stretchy="false">(</mo><mi>p</mi><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi>q</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>≡</mo><mi>q</mi><mo>:</mo><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash p:\mathrm{isProp}(A) \quad \Gamma \vdash q:A \vee \neg A}{\Gamma \vdash \mathrm{lem}(\mathrm{toBool}_A(p)(q)) \equiv q:A \vee \neg A}</annotation></semantics></math></div> <ul> <li>Typal computation rules:</li> </ul> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>p</mi><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>q</mi><mo>:</mo><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msubsup><mi>β</mi> <mi mathvariant="normal">Bool</mi> <mrow><mi mathvariant="normal">proptrunc</mi><mo>,</mo><mi>A</mi></mrow></msubsup><mo stretchy="false">(</mo><mi>p</mi><mo>,</mo><mi>q</mi><mo stretchy="false">)</mo><mo>:</mo><msub><mi mathvariant="normal">Id</mi> <mrow><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo></mrow></msub><mo stretchy="false">(</mo><mi mathvariant="normal">proptrunc</mi><mo stretchy="false">(</mo><msub><mi mathvariant="normal">toBool</mi> <mi>A</mi></msub><mo stretchy="false">(</mo><mi>p</mi><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi>q</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>,</mo><mi>p</mi><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash p:\mathrm{isProp}(A) \quad \Gamma \vdash q:A \vee \neg A}{\Gamma \vdash \beta_{\mathrm{Bool}}^{\mathrm{proptrunc}, A}(p, q):\mathrm{Id}_{\mathrm{isProp}(A)}(\mathrm{proptrunc}(\mathrm{toBool}_A(p)(q)), p)}</annotation></semantics></math></div><div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>p</mi><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>q</mi><mo>:</mo><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msubsup><mi>β</mi> <mi mathvariant="normal">Bool</mi> <mrow><mi mathvariant="normal">lem</mi><mo>,</mo><mi>A</mi></mrow></msubsup><mo stretchy="false">(</mo><mi>p</mi><mo>,</mo><mi>q</mi><mo stretchy="false">)</mo><mo>:</mo><msub><mi mathvariant="normal">Id</mi> <mrow><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi></mrow></msub><mo stretchy="false">(</mo><mi mathvariant="normal">lem</mi><mo stretchy="false">(</mo><msub><mi mathvariant="normal">toBool</mi> <mi>A</mi></msub><mo stretchy="false">(</mo><mi>p</mi><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi>q</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>,</mo><mi>q</mi><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash p:\mathrm{isProp}(A) \quad \Gamma \vdash q:A \vee \neg A}{\Gamma \vdash \beta_{\mathrm{Bool}}^{\mathrm{lem}, A}(p, q):\mathrm{Id}_{A \vee \neg A}(\mathrm{lem}(\mathrm{toBool}_A(p)(q)), q)}</annotation></semantics></math></div> <p>Uniqueness rules for the boolean domain:</p> <ul> <li> <p>Judgmental computation rules:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msub><mi mathvariant="normal">toBool</mi> <mrow><mi mathvariant="normal">El</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo></mrow></msub><mo stretchy="false">(</mo><mi mathvariant="normal">proptrunc</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi mathvariant="normal">lem</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>≡</mo><mi>A</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A:\mathrm{Bool}}{\Gamma \vdash \mathrm{toBool}_{\mathrm{El}(A)}(\mathrm{proptrunc}(A))(\mathrm{lem}(A)) \equiv A:\mathrm{Bool}}</annotation></semantics></math></div></li> <li> <p>Typal computation rules:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msub><mi>η</mi> <mi mathvariant="normal">Bool</mi></msub><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo>:</mo><msub><mi mathvariant="normal">Id</mi> <mi mathvariant="normal">Bool</mi></msub><mo stretchy="false">(</mo><msub><mi mathvariant="normal">toProp</mi> <mrow><mi mathvariant="normal">El</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo></mrow></msub><mo stretchy="false">(</mo><mi mathvariant="normal">proptrunc</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi mathvariant="normal">lem</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>,</mo><mi>A</mi><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A:\mathrm{Bool}}{\Gamma \vdash \eta_{\mathrm{Bool}}(A):\mathrm{Id}_{\mathrm{Bool}}(\mathrm{toProp}_{\mathrm{El}(A)}(\mathrm{proptrunc}(A))(\mathrm{lem}(A)), A)}</annotation></semantics></math></div></li> </ul> <p>Extensionality principle for the boolean domain:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mo>:</mo><mi mathvariant="normal">Bool</mi><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>B</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msub><mi mathvariant="normal">ext</mi> <mi mathvariant="normal">Bool</mi></msub><mo stretchy="false">(</mo><mi>A</mi><mo>,</mo><mi>B</mi><mo stretchy="false">)</mo><mo>:</mo><mi mathvariant="normal">isEquiv</mi><mo stretchy="false">(</mo><msup><mi mathvariant="normal">transport</mi> <mi mathvariant="normal">El</mi></msup><mo stretchy="false">(</mo><mi>A</mi><mo>,</mo><mi>B</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A:\mathrm{Bool} \quad \Gamma \vdash B:\mathrm{Bool}} {\Gamma \vdash \mathrm{ext}_\mathrm{Bool}(A, B):\mathrm{isEquiv}(\mathrm{transport}^\mathrm{El}(A, B))}</annotation></semantics></math></div> <h5 id="as_a_weak_tarski_universe">As a weak Tarski universe</h5> <p>As a weak <a class="existingWikiWord" href="/nlab/show/Tarski+universe">Tarski universe</a>, the boolean domain is given by the following <a class="existingWikiWord" href="/nlab/show/natural+deduction">natural deduction</a> <a class="existingWikiWord" href="/nlab/show/inference+rules">inference rules</a>:</p> <p>Formation rules for the boolean domain:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">ctx</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><mi mathvariant="normal">Bool</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathrm{Bool} \; \mathrm{type}}</annotation></semantics></math></div> <p>Introduction rules for the boolean domain:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msub><mi mathvariant="normal">toBool</mi> <mi>A</mi></msub><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo>→</mo><mo stretchy="false">(</mo><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi><mo stretchy="false">)</mo><mo>→</mo><mi mathvariant="normal">Bool</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash \mathrm{toBool}_A:\mathrm{isProp}(A) \to (A \vee \neg A) \to \mathrm{Bool}}</annotation></semantics></math></div> <p>Elimination rules for the boolean domain:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><mi mathvariant="normal">El</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow></mfrac><mspace width="2em"></mspace><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><mi mathvariant="normal">proptrunc</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi mathvariant="normal">El</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo></mrow></mfrac><mspace width="2em"></mspace><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><mi mathvariant="normal">lem</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo>:</mo><mi mathvariant="normal">El</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo>∨</mo><mo>¬</mo><mi mathvariant="normal">El</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A:\mathrm{Bool}}{\Gamma \vdash \mathrm{El}(A) \; \mathrm{type}} \qquad \frac{\Gamma \vdash A:\mathrm{Bool}}{\Gamma \vdash \mathrm{proptrunc}(A):\mathrm{isProp}(\mathrm{El}(A))} \qquad \frac{\Gamma \vdash A:\mathrm{Bool}}{\Gamma \vdash \mathrm{lem}(A):\mathrm{El}(A) \vee \neg \mathrm{El}(A)}</annotation></semantics></math></div> <p>Computation rules for the boolean domain:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>p</mi><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>q</mi><mo>:</mo><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msubsup><mi>β</mi> <mi mathvariant="normal">Bool</mi> <mrow><mi mathvariant="normal">El</mi><mo>,</mo><mi>A</mi></mrow></msubsup><mo stretchy="false">(</mo><mi>p</mi><mo>,</mo><mi>q</mi><mo stretchy="false">)</mo><mo>:</mo><mi mathvariant="normal">El</mi><mo stretchy="false">(</mo><msub><mi mathvariant="normal">toBool</mi> <mi>A</mi></msub><mo stretchy="false">(</mo><mi>p</mi><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi>q</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>≃</mo><mi>A</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash p:\mathrm{isProp}(A) \quad \Gamma \vdash q:A \vee \neg A}{\Gamma \vdash \beta_\mathrm{Bool}^{\mathrm{El}, A}(p, q):\mathrm{El}(\mathrm{toBool}_A(p)(q)) \simeq A}</annotation></semantics></math></div> <ul> <li>Judgmental computation rules:</li> </ul> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>p</mi><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>q</mi><mo>:</mo><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msub><mi mathvariant="normal">congform</mi> <mi mathvariant="normal">isProp</mi></msub><mo stretchy="false">(</mo><msubsup><mi>β</mi> <mi mathvariant="normal">Bool</mi> <mrow><mi mathvariant="normal">El</mi><mo>,</mo><mi>A</mi></mrow></msubsup><mo stretchy="false">(</mo><mi>p</mi><mo>,</mo><mi>q</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi mathvariant="normal">proptrunc</mi><mo stretchy="false">(</mo><msub><mi mathvariant="normal">toBool</mi> <mi>A</mi></msub><mo stretchy="false">(</mo><mi>p</mi><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi>q</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>≡</mo><mi>p</mi><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash p:\mathrm{isProp}(A) \quad \Gamma \vdash q:A \vee \neg A}{\Gamma \vdash \mathrm{congform}_\mathrm{isProp}(\beta_\mathrm{Bool}^{\mathrm{El}, A}(p, q))(\mathrm{proptrunc}(\mathrm{toBool}_A(p)(q))) \equiv p:\mathrm{isProp}(A)}</annotation></semantics></math></div><div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>p</mi><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>q</mi><mo>:</mo><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msub><mi mathvariant="normal">congform</mi> <mrow><mo stretchy="false">(</mo><mo lspace="verythinmathspace" rspace="0em">−</mo><mo stretchy="false">)</mo><mo>∨</mo><mo>¬</mo><mo stretchy="false">(</mo><mo lspace="verythinmathspace" rspace="0em">−</mo><mo stretchy="false">)</mo></mrow></msub><mo stretchy="false">(</mo><msubsup><mi>β</mi> <mi mathvariant="normal">Bool</mi> <mrow><mi mathvariant="normal">El</mi><mo>,</mo><mi>A</mi></mrow></msubsup><mo stretchy="false">(</mo><mi>p</mi><mo>,</mo><mi>q</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi mathvariant="normal">lem</mi><mo stretchy="false">(</mo><msub><mi mathvariant="normal">toBool</mi> <mi>A</mi></msub><mo stretchy="false">(</mo><mi>p</mi><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi>q</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>≡</mo><mi>q</mi><mo>:</mo><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash p:\mathrm{isProp}(A) \quad \Gamma \vdash q:A \vee \neg A}{\Gamma \vdash \mathrm{congform}_{(-) \vee \neg (-)}(\beta_\mathrm{Bool}^{\mathrm{El}, A}(p, q))(\mathrm{lem}(\mathrm{toBool}_A(p)(q))) \equiv q:A \vee \neg A}</annotation></semantics></math></div> <ul> <li>Typal computation rules:</li> </ul> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>p</mi><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>q</mi><mo>:</mo><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msubsup><mi>β</mi> <mi mathvariant="normal">Bool</mi> <mrow><mi mathvariant="normal">proptrunc</mi><mo>,</mo><mi>A</mi></mrow></msubsup><mo stretchy="false">(</mo><mi>p</mi><mo>,</mo><mi>q</mi><mo stretchy="false">)</mo><mo>:</mo><msub><mi mathvariant="normal">Id</mi> <mrow><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo></mrow></msub><mo stretchy="false">(</mo><msub><mi mathvariant="normal">congform</mi> <mi mathvariant="normal">isProp</mi></msub><mo stretchy="false">(</mo><msubsup><mi>β</mi> <mi mathvariant="normal">Bool</mi> <mrow><mi mathvariant="normal">El</mi><mo>,</mo><mi>A</mi></mrow></msubsup><mo stretchy="false">(</mo><mi>p</mi><mo>,</mo><mi>q</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi mathvariant="normal">proptrunc</mi><mo stretchy="false">(</mo><msub><mi mathvariant="normal">toBool</mi> <mi>A</mi></msub><mo stretchy="false">(</mo><mi>p</mi><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi>q</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>,</mo><mi>p</mi><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash p:\mathrm{isProp}(A) \quad \Gamma \vdash q:A \vee \neg A}{\Gamma \vdash \beta_{\mathrm{Bool}}^{\mathrm{proptrunc}, A}(p, q):\mathrm{Id}_{\mathrm{isProp}(A)}(\mathrm{congform}_\mathrm{isProp}(\beta_\mathrm{Bool}^{\mathrm{El}, A}(p, q))(\mathrm{proptrunc}(\mathrm{toBool}_A(p)(q))), p)}</annotation></semantics></math></div><div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>p</mi><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>q</mi><mo>:</mo><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msubsup><mi>β</mi> <mi mathvariant="normal">Bool</mi> <mrow><mi mathvariant="normal">proptrunc</mi><mo>,</mo><mi>A</mi></mrow></msubsup><mo stretchy="false">(</mo><mi>p</mi><mo>,</mo><mi>q</mi><mo stretchy="false">)</mo><mo>:</mo><msub><mi mathvariant="normal">Id</mi> <mrow><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi></mrow></msub><mo stretchy="false">(</mo><msub><mi mathvariant="normal">congform</mi> <mrow><mo stretchy="false">(</mo><mo lspace="verythinmathspace" rspace="0em">−</mo><mo stretchy="false">)</mo><mo>∨</mo><mo>¬</mo><mo stretchy="false">(</mo><mo lspace="verythinmathspace" rspace="0em">−</mo><mo stretchy="false">)</mo></mrow></msub><mo stretchy="false">(</mo><msubsup><mi>β</mi> <mi mathvariant="normal">Bool</mi> <mrow><mi mathvariant="normal">El</mi><mo>,</mo><mi>A</mi></mrow></msubsup><mo stretchy="false">(</mo><mi>p</mi><mo>,</mo><mi>q</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi mathvariant="normal">lem</mi><mo stretchy="false">(</mo><msub><mi mathvariant="normal">toBool</mi> <mi>A</mi></msub><mo stretchy="false">(</mo><mi>p</mi><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi>q</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>,</mo><mi>q</mi><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash p:\mathrm{isProp}(A) \quad \Gamma \vdash q:A \vee \neg A}{\Gamma \vdash \beta_{\mathrm{Bool}}^{\mathrm{proptrunc}, A}(p, q):\mathrm{Id}_{A \vee \neg A}(\mathrm{congform}_{(-) \vee \neg (-)}(\beta_\mathrm{Bool}^{\mathrm{El}, A}(p, q))(\mathrm{lem}(\mathrm{toBool}_A(p)(q))), q)}</annotation></semantics></math></div> <p>where the equivalences</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><msub><mi mathvariant="normal">congform</mi> <mi mathvariant="normal">isProp</mi></msub><mo stretchy="false">(</mo><msubsup><mi>β</mi> <mi mathvariant="normal">Bool</mi> <mrow><mi mathvariant="normal">El</mi><mo>,</mo><mi>A</mi></mrow></msubsup><mo stretchy="false">(</mo><mi>p</mi><mo>,</mo><mi>q</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi mathvariant="normal">El</mi><mo stretchy="false">(</mo><msub><mi mathvariant="normal">toProp</mi> <mi>A</mi></msub><mo stretchy="false">(</mo><mi>p</mi><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi>q</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>≃</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">\mathrm{congform}_\mathrm{isProp}(\beta_\mathrm{Bool}^{\mathrm{El}, A}(p, q)):\mathrm{isProp}(\mathrm{El}(\mathrm{toProp}_A(p)(q))) \simeq \mathrm{isProp}(A)</annotation></semantics></math></div><div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><msub><mi mathvariant="normal">congform</mi> <mrow><mo stretchy="false">(</mo><mo lspace="verythinmathspace" rspace="0em">−</mo><mo stretchy="false">)</mo><mo>∨</mo><mo>¬</mo><mo stretchy="false">(</mo><mo lspace="verythinmathspace" rspace="0em">−</mo><mo stretchy="false">)</mo></mrow></msub><mo stretchy="false">(</mo><msubsup><mi>β</mi> <mi mathvariant="normal">Bool</mi> <mrow><mi mathvariant="normal">El</mi><mo>,</mo><mi>A</mi></mrow></msubsup><mo stretchy="false">(</mo><mi>p</mi><mo>,</mo><mi>q</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>:</mo><mo stretchy="false">(</mo><mi mathvariant="normal">El</mi><mo stretchy="false">(</mo><msub><mi mathvariant="normal">toProp</mi> <mi>A</mi></msub><mo stretchy="false">(</mo><mi>p</mi><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi>q</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>∨</mo><mo>¬</mo><mi mathvariant="normal">El</mi><mo stretchy="false">(</mo><msub><mi mathvariant="normal">toProp</mi> <mi>A</mi></msub><mo stretchy="false">(</mo><mi>p</mi><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi>q</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>≃</mo><mo stretchy="false">(</mo><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">\mathrm{congform}_{(-) \vee \neg (-)}(\beta_\mathrm{Bool}^{\mathrm{El}, A}(p, q)):(\mathrm{El}(\mathrm{toProp}_A(p)(q)) \vee \neg \mathrm{El}(\mathrm{toProp}_A(p)(q))) \simeq (A \vee \neg A)</annotation></semantics></math></div> <p>can always be constructed in a type theory with <a class="existingWikiWord" href="/nlab/show/dependent+product+types">dependent product types</a>, <a class="existingWikiWord" href="/nlab/show/dependent+sum+types">dependent sum types</a>, <a class="existingWikiWord" href="/nlab/show/identity+types">identity types</a>, <a class="existingWikiWord" href="/nlab/show/disjunctions">disjunctions</a>, and <a class="existingWikiWord" href="/nlab/show/negations">negations</a>, as given types <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>A</mi></mrow><annotation encoding="application/x-tex">A</annotation></semantics></math> and <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>B</mi></mrow><annotation encoding="application/x-tex">B</annotation></semantics></math> and an equivalence <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>e</mi><mo>:</mo><mi>A</mi><mo>≃</mo><mi>B</mi></mrow><annotation encoding="application/x-tex">e:A \simeq B</annotation></semantics></math>, it is possible to form the equivalences</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><msub><mi mathvariant="normal">congform</mi> <mi mathvariant="normal">isProp</mi></msub><mo stretchy="false">(</mo><mi>e</mi><mo stretchy="false">)</mo><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo>≃</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>B</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">\mathrm{congform}_\mathrm{isProp}(e):\mathrm{isProp}(A) \simeq \mathrm{isProp}(B)</annotation></semantics></math></div><div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><msub><mi mathvariant="normal">congform</mi> <mrow><mo stretchy="false">(</mo><mo lspace="verythinmathspace" rspace="0em">−</mo><mo stretchy="false">)</mo><mo>∨</mo><mo>¬</mo><mo stretchy="false">(</mo><mo lspace="verythinmathspace" rspace="0em">−</mo><mo stretchy="false">)</mo></mrow></msub><mo stretchy="false">(</mo><mi>e</mi><mo stretchy="false">)</mo><mo>:</mo><mo stretchy="false">(</mo><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi><mo stretchy="false">)</mo><mo>≃</mo><mo stretchy="false">(</mo><mi>B</mi><mo>∨</mo><mo>¬</mo><mi>B</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">\mathrm{congform}_{(-) \vee \neg (-)}(e):(A \vee \neg A) \simeq (B \vee \neg B)</annotation></semantics></math></div> <p>through <a class="existingWikiWord" href="/nlab/show/function+application+to+identifications">application of equivalences to identifications</a> and the typal congruence rules of <a class="existingWikiWord" href="/nlab/show/function+types">function types</a>, <a class="existingWikiWord" href="/nlab/show/dependent+product+types">dependent product types</a>, <a class="existingWikiWord" href="/nlab/show/product+types">product types</a>, <a class="existingWikiWord" href="/nlab/show/dependent+sum+types">dependent sum types</a>, <a class="existingWikiWord" href="/nlab/show/disjunctions">disjunctions</a>, and <a class="existingWikiWord" href="/nlab/show/negations">negations</a>.</p> <p>Uniqueness rules for the boolean domain:</p> <ul> <li> <p>Judgmental computation rules:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msub><mi mathvariant="normal">toBool</mi> <mrow><mi mathvariant="normal">El</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo></mrow></msub><mo stretchy="false">(</mo><mi mathvariant="normal">proptrunc</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi mathvariant="normal">lem</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>≡</mo><mi>A</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A:\mathrm{Bool}}{\Gamma \vdash\mathrm{toBool}_{\mathrm{El}(A)}(\mathrm{proptrunc}(A))(\mathrm{lem}(A)) \equiv A:\mathrm{Bool}}</annotation></semantics></math></div></li> <li> <p>Typal computation rules:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msub><mi>η</mi> <mi mathvariant="normal">Bool</mi></msub><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo>:</mo><msub><mi mathvariant="normal">Id</mi> <mi mathvariant="normal">Bool</mi></msub><mo stretchy="false">(</mo><msub><mi mathvariant="normal">toProp</mi> <mrow><mi mathvariant="normal">El</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo></mrow></msub><mo stretchy="false">(</mo><mi mathvariant="normal">proptrunc</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi mathvariant="normal">lem</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>,</mo><mi>A</mi><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A:\mathrm{Bool}}{\Gamma \vdash \eta_{\mathrm{Bool}}(A):\mathrm{Id}_{\mathrm{Bool}}(\mathrm{toProp}_{\mathrm{El}(A)}(\mathrm{proptrunc}(A))(\mathrm{lem}(A)), A)}</annotation></semantics></math></div></li> </ul> <p>Extensionality principle for the boolean domain:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mo>:</mo><mi mathvariant="normal">Bool</mi><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>B</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msub><mi mathvariant="normal">ext</mi> <mi mathvariant="normal">Bool</mi></msub><mo stretchy="false">(</mo><mi>A</mi><mo>,</mo><mi>B</mi><mo stretchy="false">)</mo><mo>:</mo><mi mathvariant="normal">isEquiv</mi><mo stretchy="false">(</mo><msup><mi mathvariant="normal">transport</mi> <mi mathvariant="normal">El</mi></msup><mo stretchy="false">(</mo><mi>A</mi><mo>,</mo><mi>B</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A:\mathrm{Bool} \quad \Gamma \vdash B:\mathrm{Bool}} {\Gamma \vdash \mathrm{ext}_\mathrm{Bool}(A, B):\mathrm{isEquiv}(\mathrm{transport}^\mathrm{El}(A, B))}</annotation></semantics></math></div> <h5 id="as_a_russell_universe">As a Russell universe</h5> <p>As a <a class="existingWikiWord" href="/nlab/show/Russell+universe">Russell universe</a>, the boolean domain is given by the following <a class="existingWikiWord" href="/nlab/show/natural+deduction">natural deduction</a> <a class="existingWikiWord" href="/nlab/show/inference+rules">inference rules</a>:</p> <p>Formation rules for the boolean domain:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">ctx</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><mi mathvariant="normal">Bool</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathrm{Bool} \; \mathrm{type}}</annotation></semantics></math></div> <p>Introduction rules for the boolean domain:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msub><mi mathvariant="normal">toBool</mi> <mi>A</mi></msub><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo>→</mo><mo stretchy="false">(</mo><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi><mo stretchy="false">)</mo><mo>→</mo><mi mathvariant="normal">Bool</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash \mathrm{toBool}_A:\mathrm{isProp}(A) \to (A \vee \neg A) \to \mathrm{Bool}}</annotation></semantics></math></div> <p>Elimination rules for the boolean domain:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow></mfrac><mspace width="2em"></mspace><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><mi mathvariant="normal">proptrunc</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo></mrow></mfrac><mspace width="2em"></mspace><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><mi mathvariant="normal">lem</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo>:</mo><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A:\mathrm{Bool}}{\Gamma \vdash A \; \mathrm{type}} \qquad \frac{\Gamma \vdash A:\mathrm{Bool}}{\Gamma \vdash \mathrm{proptrunc}(A):\mathrm{isProp}(A)} \qquad \frac{\Gamma \vdash A:\mathrm{Bool}}{\Gamma \vdash \mathrm{lem}(A):A \vee \neg A}</annotation></semantics></math></div> <p>Computation rules for the boolean domain:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>p</mi><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>q</mi><mo>:</mo><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msub><mi mathvariant="normal">toBool</mi> <mi>A</mi></msub><mo stretchy="false">(</mo><mi>p</mi><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi>q</mi><mo stretchy="false">)</mo><mo>≡</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash p:\mathrm{isProp}(A) \quad \Gamma \vdash q:A \vee \neg A}{\Gamma \vdash \mathrm{toBool}_A(p)(q) \equiv A \; \mathrm{type}}</annotation></semantics></math></div> <ul> <li>Judgmental computation rules:</li> </ul> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>p</mi><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>q</mi><mo>:</mo><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><mi mathvariant="normal">proptrunc</mi><mo stretchy="false">(</mo><msub><mi mathvariant="normal">toBool</mi> <mi>A</mi></msub><mo stretchy="false">(</mo><mi>p</mi><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi>q</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>≡</mo><mi>p</mi><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash p:\mathrm{isProp}(A) \quad \Gamma \vdash q:A \vee \neg A}{\Gamma \vdash \mathrm{proptrunc}(\mathrm{toBool}_A(p)(q)) \equiv p:\mathrm{isProp}(A)}</annotation></semantics></math></div><div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>p</mi><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>q</mi><mo>:</mo><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><mi mathvariant="normal">lem</mi><mo stretchy="false">(</mo><msub><mi mathvariant="normal">toBool</mi> <mi>A</mi></msub><mo stretchy="false">(</mo><mi>p</mi><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi>q</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>≡</mo><mi>q</mi><mo>:</mo><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash p:\mathrm{isProp}(A) \quad \Gamma \vdash q:A \vee \neg A}{\Gamma \vdash \mathrm{lem}(\mathrm{toBool}_A(p)(q)) \equiv q:A \vee \neg A}</annotation></semantics></math></div> <ul> <li>Typal computation rules:</li> </ul> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>p</mi><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>q</mi><mo>:</mo><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msubsup><mi>β</mi> <mi mathvariant="normal">Bool</mi> <mrow><mi mathvariant="normal">proptrunc</mi><mo>,</mo><mi>A</mi></mrow></msubsup><mo>:</mo><msub><mi mathvariant="normal">Id</mi> <mrow><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo></mrow></msub><mo stretchy="false">(</mo><mi mathvariant="normal">proptrunc</mi><mo stretchy="false">(</mo><msub><mi mathvariant="normal">toBool</mi> <mi>A</mi></msub><mo stretchy="false">(</mo><mi>p</mi><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi>q</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>,</mo><mi>p</mi><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash p:\mathrm{isProp}(A) \quad \Gamma \vdash q:A \vee \neg A}{\Gamma \vdash \beta_{\mathrm{Bool}}^{\mathrm{proptrunc}, A}:\mathrm{Id}_{\mathrm{isProp}(A)}(\mathrm{proptrunc}(\mathrm{toBool}_A(p)(q)), p)}</annotation></semantics></math></div><div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">type</mi><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>p</mi><mo>:</mo><mi mathvariant="normal">isProp</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>q</mi><mo>:</mo><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msubsup><mi>β</mi> <mi mathvariant="normal">Bool</mi> <mrow><mi mathvariant="normal">lem</mi><mo>,</mo><mi>A</mi></mrow></msubsup><mo>:</mo><msub><mi mathvariant="normal">Id</mi> <mrow><mi>A</mi><mo>∨</mo><mo>¬</mo><mi>A</mi></mrow></msub><mo stretchy="false">(</mo><mi mathvariant="normal">lem</mi><mo stretchy="false">(</mo><msub><mi mathvariant="normal">toBool</mi> <mi>A</mi></msub><mo stretchy="false">(</mo><mi>p</mi><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi>q</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>,</mo><mi>q</mi><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash p:\mathrm{isProp}(A) \quad \Gamma \vdash q:A \vee \neg A}{\Gamma \vdash \beta_{\mathrm{Bool}}^{\mathrm{lem}, A}:\mathrm{Id}_{A \vee \neg A}(\mathrm{lem}(\mathrm{toBool}_A(p)(q)), q)}</annotation></semantics></math></div> <p>Uniqueness rules for the boolean domain:</p> <ul> <li> <p>Judgmental computation rules:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msub><mi mathvariant="normal">toBool</mi> <mi>A</mi></msub><mo stretchy="false">(</mo><mi mathvariant="normal">proptrunc</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi mathvariant="normal">lem</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>≡</mo><mi>A</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A:\mathrm{Bool}}{\Gamma \vdash \mathrm{toBool}_{A}(\mathrm{proptrunc}(A))(\mathrm{lem}(A)) \equiv A:\mathrm{Bool}}</annotation></semantics></math></div></li> <li> <p>Typal computation rules:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msub><mi>η</mi> <mi mathvariant="normal">Bool</mi></msub><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo>:</mo><msub><mi mathvariant="normal">Id</mi> <mi mathvariant="normal">Bool</mi></msub><mo stretchy="false">(</mo><msub><mi mathvariant="normal">toBool</mi> <mi>A</mi></msub><mo stretchy="false">(</mo><mi mathvariant="normal">proptrunc</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi mathvariant="normal">lem</mi><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>,</mo><mi>A</mi><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A:\mathrm{Bool}}{\Gamma \vdash \eta_{\mathrm{Bool}}(A):\mathrm{Id}_{\mathrm{Bool}}(\mathrm{toBool}_{A}(\mathrm{proptrunc}(A))(\mathrm{lem}(A)), A)}</annotation></semantics></math></div></li> </ul> <p>Extensionality principle for the boolean domain:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mo>⊢</mo><mi>A</mi><mo>:</mo><mi mathvariant="normal">Bool</mi><mspace width="1em"></mspace><mi>Γ</mi><mo>⊢</mo><mi>B</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow><mrow><mi>Γ</mi><mo>⊢</mo><msub><mi mathvariant="normal">ext</mi> <mi mathvariant="normal">Bool</mi></msub><mo stretchy="false">(</mo><mi>A</mi><mo>,</mo><mi>B</mi><mo stretchy="false">)</mo><mo>:</mo><mi mathvariant="normal">isEquiv</mi><mo stretchy="false">(</mo><mi mathvariant="normal">idToEquiv</mi><mo stretchy="false">(</mo><mi>A</mi><mo>,</mo><mi>B</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \vdash A:\mathrm{Bool} \quad \Gamma \vdash B:\mathrm{Bool}} {\Gamma \vdash \mathrm{ext}_\mathrm{Bool}(A, B):\mathrm{isEquiv}(\mathrm{idToEquiv}(A, B))}</annotation></semantics></math></div> <h3 id="InHomotopyTypeTheory">In homotopy type theory</h3> <p>In <a class="existingWikiWord" href="/nlab/show/homotopy+type+theory">homotopy type theory</a> the type of booleans / bits looks as <a href="#InTypeTheory">above</a> (using <a class="existingWikiWord" href="/nlab/show/judgemental+equality">judgemental equality</a>, <a class="existingWikiWord" href="/nlab/show/propositional+equality">propositional equality</a>, or <a class="existingWikiWord" href="/nlab/show/typal+equality">typal equality</a> for the <a class="existingWikiWord" href="/nlab/show/computation+rule">computation rule</a> and <a class="existingWikiWord" href="/nlab/show/uniqueness+rule">uniqueness rule</a>) but now it may equivalently be thought of as the <a class="existingWikiWord" href="/nlab/show/sphere+type">sphere type</a> of the <em><a class="existingWikiWord" href="/nlab/show/0-sphere">0-sphere</a></em> and as such as the beginning of the <a class="existingWikiWord" href="/nlab/show/suspension+type">suspension type</a>-tower of types of “higher homotopy bits” — the <a class="existingWikiWord" href="/nlab/show/n-sphere"><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"> <semantics> <mrow> <mi>n</mi> </mrow> <annotation encoding="application/x-tex">n</annotation> </semantics> </math>-</a><a class="existingWikiWord" href="/nlab/show/sphere+types">sphere types</a>:</p> <center> <img src="/nlab/files/HigherHomotopyBits-230106.jpg" width="450" /> </center> <p><br /></p> <h2 id="properties">Properties</h2> <h3 id="descent_and_large_elimination">Descent and large elimination</h3> <p>The <a class="existingWikiWord" href="/nlab/show/descent">descent</a> for the boolean domain states that given any types <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>A</mi></mrow><annotation encoding="application/x-tex">A</annotation></semantics></math> and <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>B</mi></mrow><annotation encoding="application/x-tex">B</annotation></semantics></math> one can construct a type family <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>x</mi><mo>:</mo><mi>𝟚</mi><mo>⊢</mo><msubsup><mi mathvariant="normal">descFam</mi> <mi>𝟚</mi> <mrow><mi>A</mi><mo>,</mo><mi>B</mi></mrow></msubsup><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">x:\mathbb{2} \vdash \mathrm{descFam}_\mathbb{2}^{A, B}(x)</annotation></semantics></math> with <a class="existingWikiWord" href="/nlab/show/equivalences+of+types">equivalences of types</a></p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><msub><mi mathvariant="normal">descEquiv</mi> <mi>A</mi></msub><mo>:</mo><msubsup><mi mathvariant="normal">descFam</mi> <mi>𝟚</mi> <mrow><mi>A</mi><mo>,</mo><mi>B</mi></mrow></msubsup><mo stretchy="false">(</mo><mn>0</mn><mo stretchy="false">)</mo><mo>≃</mo><mi>A</mi><mspace width="1em"></mspace><mi mathvariant="normal">and</mi><mspace width="1em"></mspace><msub><mi mathvariant="normal">descEquiv</mi> <mi>B</mi></msub><mo>:</mo><msubsup><mi mathvariant="normal">descFam</mi> <mi>𝟚</mi> <mrow><mi>A</mi><mo>,</mo><mi>B</mi></mrow></msubsup><mo stretchy="false">(</mo><mn>1</mn><mo stretchy="false">)</mo><mo>≃</mo><mi>B</mi></mrow><annotation encoding="application/x-tex">\mathrm{descEquiv}_A:\mathrm{descFam}_\mathbb{2}^{A, B}(0) \simeq A \quad \mathrm{and} \quad \mathrm{descEquiv}_B:\mathrm{descFam}_\mathbb{2}^{A, B}(1) \simeq B</annotation></semantics></math></div> <p>Large elimination for the boolean domain strengthens the equivalences of types in descent to <a class="existingWikiWord" href="/nlab/show/judgmental+equality+of+types">judgmental equality of types</a></p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><msubsup><mi mathvariant="normal">descFam</mi> <mi>𝟚</mi> <mrow><mi>A</mi><mo>,</mo><mi>B</mi></mrow></msubsup><mo stretchy="false">(</mo><mn>0</mn><mo stretchy="false">)</mo><mo>≡</mo><mi>A</mi><mspace width="1em"></mspace><mi mathvariant="normal">and</mi><mspace width="1em"></mspace><msubsup><mi mathvariant="normal">descFam</mi> <mi>𝟚</mi> <mrow><mi>A</mi><mo>,</mo><mi>B</mi></mrow></msubsup><mo stretchy="false">(</mo><mn>1</mn><mo stretchy="false">)</mo><mo>≡</mo><mi>B</mi></mrow><annotation encoding="application/x-tex">\mathrm{descFam}_\mathbb{2}^{A, B}(0) \equiv A \quad \mathrm{and} \quad \mathrm{descFam}_\mathbb{2}^{A, B}(1) \equiv B</annotation></semantics></math></div> <h3 id="extensionality_principle_of_the_boolean_domain">Extensionality principle of the boolean domain</h3> <p>The elements of the boolean domain represent certain truth values or propositions, namely, <a class="existingWikiWord" href="/nlab/show/true">true</a> and <a class="existingWikiWord" href="/nlab/show/false">false</a>. By the principle of <a class="existingWikiWord" href="/nlab/show/propositions+as+some+types">propositions as some types</a>, truth values or propositions are represented as certain types: specifically, <a class="existingWikiWord" href="/nlab/show/true">true</a> or <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mn>1</mn></mrow><annotation encoding="application/x-tex">1</annotation></semantics></math> is represented by the <a class="existingWikiWord" href="/nlab/show/unit+type">unit type</a> <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>𝟙</mi></mrow><annotation encoding="application/x-tex">\mathbb{1}</annotation></semantics></math>, and <a class="existingWikiWord" href="/nlab/show/false">false</a> or <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mn>0</mn></mrow><annotation encoding="application/x-tex">0</annotation></semantics></math> is represented by the <a class="existingWikiWord" href="/nlab/show/empty+type">empty type</a> <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>𝟘</mi></mrow><annotation encoding="application/x-tex">\mathbb{0}</annotation></semantics></math>. The boolean domain is a <a class="existingWikiWord" href="/nlab/show/Tarski+universe">Tarski universe</a> through the following type family:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mi>x</mi><mo>:</mo><mi mathvariant="normal">Bool</mi><mo>⊢</mo><mi mathvariant="normal">El</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mo>≔</mo><mo stretchy="false">(</mo><mi>x</mi><msub><mo>=</mo> <mi mathvariant="normal">Bool</mi></msub><mn>1</mn><mo stretchy="false">)</mo><mo>×</mo><mo>¬</mo><mo stretchy="false">(</mo><mi>x</mi><msub><mo>=</mo> <mi mathvariant="normal">Bool</mi></msub><mn>0</mn><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">x:\mathrm{Bool} \vdash \mathrm{El}(x) \coloneqq (x =_\mathrm{Bool} 1) \times \neg (x =_\mathrm{Bool} 0)</annotation></semantics></math></div> <p>The extensionality principle of the boolean domain is then given by the <a class="existingWikiWord" href="/nlab/show/univalence+axiom">univalence axiom</a>:</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mfrac><mrow><mi>Γ</mi><mspace width="thickmathspace"></mspace><mi mathvariant="normal">ctx</mi></mrow><mrow><mi>Γ</mi><mo>,</mo><mi>x</mi><mo>:</mo><mi mathvariant="normal">Bool</mi><mo>,</mo><mi>y</mi><mo>:</mo><mi mathvariant="normal">Bool</mi><mo>⊢</mo><mi mathvariant="normal">ua</mi><mo stretchy="false">(</mo><mi>x</mi><mo>,</mo><mi>y</mi><mo stretchy="false">)</mo><mo>:</mo><msub><mi mathvariant="normal">Id</mi> <mi mathvariant="normal">Bool</mi></msub><mo stretchy="false">(</mo><mi>x</mi><mo>,</mo><mi>y</mi><mo stretchy="false">)</mo><mo>≃</mo><mo stretchy="false">(</mo><mi mathvariant="normal">El</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mo>≃</mo><mi mathvariant="normal">El</mi><mo stretchy="false">(</mo><mi>y</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo></mrow></mfrac></mrow><annotation encoding="application/x-tex">\frac{\Gamma \; \mathrm{ctx}}{\Gamma, x:\mathrm{Bool}, y:\mathrm{Bool} \vdash \mathrm{ua}(x, y):\mathrm{Id}_\mathrm{Bool}(x, y) \simeq (\mathrm{El}(x) \simeq \mathrm{El}(y))}</annotation></semantics></math></div> <p>Since the empty type is not equivalent to the unit type, this automatically implies that <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mn>0</mn></mrow><annotation encoding="application/x-tex">0</annotation></semantics></math> is not equal to <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mn>1</mn></mrow><annotation encoding="application/x-tex">1</annotation></semantics></math>. The extensionality principle of the boolean domain can be proven from descent of the boolean domain, see <a href="#Sattler23">Sattler 2023</a> for a proof.</p> <h3 id="relation_to_sum_types">Relation to sum types</h3> <p>The <a class="existingWikiWord" href="/nlab/show/sum+types">sum types</a> can be defined in terms of the boolean domain and the <a class="existingWikiWord" href="/nlab/show/dependent+sum+type">dependent sum type</a>. Given types <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>A</mi></mrow><annotation encoding="application/x-tex">A</annotation></semantics></math> and <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>B</mi></mrow><annotation encoding="application/x-tex">B</annotation></semantics></math>, the sum type <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>A</mi><mo>+</mo><mi>B</mi></mrow><annotation encoding="application/x-tex">A + B</annotation></semantics></math> is defined as</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mi>A</mi><mo>+</mo><mi>B</mi><mo>≔</mo><munder><mo lspace="thinmathspace" rspace="thinmathspace">∑</mo> <mrow><mi>x</mi><mo>:</mo><mi mathvariant="normal">Bool</mi></mrow></munder><mo stretchy="false">(</mo><mo stretchy="false">(</mo><mi>x</mi><msub><mo>=</mo> <mi mathvariant="normal">Bool</mi></msub><mn>1</mn><mo stretchy="false">)</mo><mo>→</mo><mi>A</mi><mo stretchy="false">)</mo><mo>×</mo><mo stretchy="false">(</mo><mo stretchy="false">(</mo><mi>x</mi><msub><mo>=</mo> <mi mathvariant="normal">Bool</mi></msub><mn>0</mn><mo stretchy="false">)</mo><mo>→</mo><mi>B</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">A + B \coloneqq \sum_{x:\mathrm{Bool}} ((x =_\mathrm{Bool} 1) \to A) \times ((x =_\mathrm{Bool} 0) \to B)</annotation></semantics></math></div> <h3 id="boolean_logic">Boolean logic</h3> <p>One could recursively define the logical functions on <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi mathvariant="normal">Bool</mi></mrow><annotation encoding="application/x-tex">\mathrm{Bool}</annotation></semantics></math> as follows</p> <ul> <li>For negation <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mo>¬</mo></mrow><annotation encoding="application/x-tex">\neg</annotation></semantics></math> <ul> <li><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mo>¬</mo><mn>0</mn><mo>:</mo><mo>=</mo><mn>1</mn></mrow><annotation encoding="application/x-tex">\neg 0 := 1</annotation></semantics></math></li> <li><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mo>¬</mo><mn>1</mn><mo>:</mo><mo>=</mo><mn>0</mn></mrow><annotation encoding="application/x-tex">\neg 1 := 0</annotation></semantics></math></li> </ul> </li> <li>For conjunction <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mo>∧</mo></mrow><annotation encoding="application/x-tex">\wedge</annotation></semantics></math> <ul> <li><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mn>0</mn><mo>∧</mo><mi>a</mi><mo>:</mo><mo>=</mo><mn>0</mn></mrow><annotation encoding="application/x-tex">0 \wedge a := 0</annotation></semantics></math></li> <li><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mn>1</mn><mo>∧</mo><mi>a</mi><mo>:</mo><mo>=</mo><mi>a</mi></mrow><annotation encoding="application/x-tex">1 \wedge a := a</annotation></semantics></math></li> </ul> </li> <li>For disjunction <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mo>∨</mo></mrow><annotation encoding="application/x-tex">\vee</annotation></semantics></math> <ul> <li><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mn>0</mn><mo>∨</mo><mi>a</mi><mo>:</mo><mo>=</mo><mi>a</mi></mrow><annotation encoding="application/x-tex">0 \vee a := a</annotation></semantics></math></li> <li><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mn>1</mn><mo>∨</mo><mi>a</mi><mo>:</mo><mo>=</mo><mn>1</mn></mrow><annotation encoding="application/x-tex">1 \vee a := 1</annotation></semantics></math></li> </ul> </li> <li>For implication <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mo>⇒</mo></mrow><annotation encoding="application/x-tex">\implies</annotation></semantics></math> <ul> <li><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mn>0</mn><mo>⇒</mo><mi>a</mi><mo>:</mo><mo>=</mo><mn>1</mn></mrow><annotation encoding="application/x-tex">0 \implies a := 1</annotation></semantics></math></li> <li><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mn>1</mn><mo>⇒</mo><mi>a</mi><mo>:</mo><mo>=</mo><mi>a</mi></mrow><annotation encoding="application/x-tex">1 \implies a := a</annotation></semantics></math></li> </ul> </li> <li>For the biconditional <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mo>⇔</mo></mrow><annotation encoding="application/x-tex">\iff</annotation></semantics></math> <ul> <li><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mn>0</mn><mo>⇔</mo><mi>a</mi><mo>:</mo><mo>=</mo><mo>¬</mo><mi>a</mi></mrow><annotation encoding="application/x-tex">0 \iff a := \neg a</annotation></semantics></math></li> <li><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mn>1</mn><mo>⇔</mo><mi>a</mi><mo>:</mo><mo>=</mo><mi>a</mi></mrow><annotation encoding="application/x-tex">1 \iff a := a</annotation></semantics></math></li> </ul> </li> </ul> <p>One could prove that <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mo stretchy="false">(</mo><mi mathvariant="normal">Bool</mi><mo>,</mo><mn>0</mn><mo>,</mo><mn>1</mn><mo>,</mo><mo>¬</mo><mo>,</mo><mo>∧</mo><mo>,</mo><mo>∨</mo><mo>,</mo><mo>⇒</mo><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">(\mathrm{Bool}, 0, 1, \neg, \wedge, \vee, \implies)</annotation></semantics></math> form a <a class="existingWikiWord" href="/nlab/show/Boolean+algebra">Boolean algebra</a>. The <a class="existingWikiWord" href="/nlab/show/poset">poset</a> structure is given by implication.</p> <p>One could also inductively define <a class="existingWikiWord" href="/nlab/show/observational+equality">observational equality</a> on the booleans <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><msub><mi mathvariant="normal">Eq</mi> <mi mathvariant="normal">Bool</mi></msub><mo stretchy="false">(</mo><mi>x</mi><mo>,</mo><mi>y</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">\mathrm{Eq}_\mathrm{Bool}(x, y)</annotation></semantics></math> as an indexed inductive type on the boolean type <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi mathvariant="normal">Bool</mi></mrow><annotation encoding="application/x-tex">\mathrm{Bool}</annotation></semantics></math> with the following constructors</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><msub><mi mathvariant="normal">eq</mi> <mn>0</mn></msub><mo>:</mo><msub><mi mathvariant="normal">Eq</mi> <mi>𝟚</mi></msub><mo stretchy="false">(</mo><mn>0</mn><mo>,</mo><mn>0</mn><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">\mathrm{eq}_0: \mathrm{Eq}_\mathbb{2}(0, 0)</annotation></semantics></math></div><div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><msub><mi mathvariant="normal">eq</mi> <mn>1</mn></msub><mo>:</mo><msub><mi mathvariant="normal">Eq</mi> <mi>𝟚</mi></msub><mo stretchy="false">(</mo><mn>1</mn><mo>,</mo><mn>1</mn><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">\mathrm{eq}_1: \mathrm{Eq}_\mathbb{2}(1, 1)</annotation></semantics></math></div> <p>A <em>boolean predicate</em> valued in a type <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>T</mi></mrow><annotation encoding="application/x-tex">T</annotation></semantics></math> is a function <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>P</mi><mo>:</mo><mi>T</mi><mo>→</mo><mi mathvariant="normal">Bool</mi></mrow><annotation encoding="application/x-tex">P: T \rightarrow \mathrm{Bool}</annotation></semantics></math>, and the type <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>T</mi><mo>→</mo><mi mathvariant="normal">Bool</mi></mrow><annotation encoding="application/x-tex">T \to \mathrm{Bool}</annotation></semantics></math> is a boolean <a class="existingWikiWord" href="/nlab/show/function+algebra">function algebra</a> for finite types <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>T</mi></mrow><annotation encoding="application/x-tex">T</annotation></semantics></math>, and if <a class="existingWikiWord" href="/nlab/show/path+types">path types</a> exist, for all types <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>T</mi></mrow><annotation encoding="application/x-tex">T</annotation></semantics></math>. Thus the <a class="existingWikiWord" href="/nlab/show/functor">functor</a> <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>F</mi><mo>:</mo><mi>U</mi><mo>→</mo><mi>BoolAlg</mi></mrow><annotation encoding="application/x-tex">F: U \to BoolAlg</annotation></semantics></math>, <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>F</mi><mo stretchy="false">(</mo><mi>T</mi><mo stretchy="false">)</mo><mo>=</mo><mi>T</mi><mo>→</mo><mi mathvariant="normal">Bool</mi></mrow><annotation encoding="application/x-tex">F(T) = T \to \mathrm{Bool}</annotation></semantics></math> for a <a class="existingWikiWord" href="/nlab/show/type+universe">type universe</a> <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>U</mi></mrow><annotation encoding="application/x-tex">U</annotation></semantics></math> is a <a class="existingWikiWord" href="/nlab/show/Boolean+hyperdoctrine">Boolean hyperdoctrine</a>, and one could do <a class="existingWikiWord" href="/nlab/show/classical+logic">classical</a> <a class="existingWikiWord" href="/nlab/show/first-order+logic">first-order logic</a> inside <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>U</mi></mrow><annotation encoding="application/x-tex">U</annotation></semantics></math> if <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi mathvariant="normal">Bool</mi></mrow><annotation encoding="application/x-tex">\mathrm{Bool}</annotation></semantics></math> and path types exist in <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>U</mi></mrow><annotation encoding="application/x-tex">U</annotation></semantics></math>.</p> <p>In fact, just with <a class="existingWikiWord" href="/nlab/show/dependent+sum+types">dependent sum types</a>, <a class="existingWikiWord" href="/nlab/show/dependent+product+types">dependent product types</a>, <a class="existingWikiWord" href="/nlab/show/empty+type">empty type</a>, <a class="existingWikiWord" href="/nlab/show/unit+type">unit type</a>, and the two-valued type in a type universe <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>U</mi></mrow><annotation encoding="application/x-tex">U</annotation></semantics></math>, any <a class="existingWikiWord" href="/nlab/show/two-valued+logic">two-valued logic</a> could be done inside <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>U</mi></mrow><annotation encoding="application/x-tex">U</annotation></semantics></math>. Furthermore, since binary <a class="existingWikiWord" href="/nlab/show/disjoint+coproducts">disjoint coproducts</a> exist when <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi mathvariant="normal">Bool</mi></mrow><annotation encoding="application/x-tex">\mathrm{Bool}</annotation></semantics></math> exists, all finite types exist in <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>U</mi></mrow><annotation encoding="application/x-tex">U</annotation></semantics></math>, and any <span class="newWikiWord">finitely-valued logic<a href="/nlab/new/finitely-valued+logic">?</a></span>, such as the <a class="existingWikiWord" href="/nlab/show/internal+logic">internal logic</a> of a <a class="existingWikiWord" href="/nlab/show/finite">finite</a> <a class="existingWikiWord" href="/nlab/show/cartesian+power">cartesian power</a> of <a class="existingWikiWord" href="/nlab/show/Set">Set</a>, could be done inside <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>U</mi></mrow><annotation encoding="application/x-tex">U</annotation></semantics></math>.</p> <p>For finite types, one could also inductively define specific functions</p> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mo>∀</mo><mi>a</mi><mo>∈</mo><mi>A</mi><mo>.</mo><mo stretchy="false">(</mo><mo lspace="verythinmathspace" rspace="0em">−</mo><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi>a</mi><mo stretchy="false">)</mo><mo>:</mo><mo stretchy="false">(</mo><mi>A</mi><mo>→</mo><mi mathvariant="normal">Bool</mi><mo stretchy="false">)</mo><mo>→</mo><mi mathvariant="normal">Bool</mi></mrow><annotation encoding="application/x-tex">\forall a \in A.(-)(a):(A \to \mathrm{Bool}) \to \mathrm{Bool}</annotation></semantics></math></div><div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mo>∃</mo><mi>a</mi><mo>∈</mo><mi>A</mi><mo>.</mo><mo stretchy="false">(</mo><mo lspace="verythinmathspace" rspace="0em">−</mo><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi>a</mi><mo stretchy="false">)</mo><mo>:</mo><mo stretchy="false">(</mo><mi>A</mi><mo>→</mo><mstyle mathvariant="bold"><mn>2</mn></mstyle><mo stretchy="false">)</mo><mo>→</mo><mi mathvariant="normal">Bool</mi></mrow><annotation encoding="application/x-tex">\exists a \in A.(-)(a):(A \to \mathbf{2}) \to \mathrm{Bool}</annotation></semantics></math></div> <p>from the type of boolean predicates on <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>A</mi></mrow><annotation encoding="application/x-tex">A</annotation></semantics></math> and <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi mathvariant="normal">Bool</mi></mrow><annotation encoding="application/x-tex">\mathrm{Bool}</annotation></semantics></math> such that they behave like <a class="existingWikiWord" href="/nlab/show/existential+quantification">existential quantification</a> and <a class="existingWikiWord" href="/nlab/show/universal+quantification">universal quantification</a>.</p> <h3 id="other_properties">Other properties</h3> <ul> <li> <p>The boolean domain is the <a class="existingWikiWord" href="/nlab/show/suspension+type">suspension type</a> of the <a class="existingWikiWord" href="/nlab/show/empty+type">empty type</a>, and the suspension of the boolean domain is the <a class="existingWikiWord" href="/nlab/show/circle+type">circle type</a>. Geometrically, the boolean domain is a zero-dimensional sphere.</p> </li> <li> <p>The boolean domain is <a class="existingWikiWord" href="/nlab/show/homotopy+equivalent">homotopy equivalent</a> to the type of <a class="existingWikiWord" href="/nlab/show/decidable+propositions">decidable propositions</a> in a universe <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><semantics><mrow><mi>𝒰</mi></mrow><annotation encoding="application/x-tex">\mathcal{U}</annotation></semantics></math>.</p> </li> </ul> <div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><semantics><mrow><mi mathvariant="normal">Bool</mi><mo>≅</mo><munder><mo lspace="thinmathspace" rspace="thinmathspace">∑</mo> <mrow><mi>P</mi><mo>:</mo><mi>𝒰</mi></mrow></munder><mi>isProp</mi><mo stretchy="false">(</mo><mi>P</mi><mo stretchy="false">)</mo><mo>×</mo><mi>isDecidable</mi><mo stretchy="false">(</mo><mi>P</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">\mathrm{Bool} \cong \sum_{P:\mathcal{U}} isProp(P) \times isDecidable(P)</annotation></semantics></math></div> <p>As a result, sometimes the boolean domain is called a <strong>decidable subset classifier</strong>.</p> <h2 id="related_concepts">Related concepts</h2> <ul> <li> <p><a class="existingWikiWord" href="/nlab/show/decidable+equality">decidable equality</a></p> </li> <li> <p><a class="existingWikiWord" href="/nlab/show/type+of+propositions">type of propositions</a></p> </li> <li> <p><a class="existingWikiWord" href="/nlab/show/boolean+domain+object">boolean domain object</a></p> </li> <li> <p><a class="existingWikiWord" href="/nlab/show/two-valued+logic">two-valued logic</a></p> </li> </ul> <h2 id="references">References</h2> <p>See also:</p> <ul> <li>Wikipedia, <em><a href="https://en.wikipedia.org/wiki/Boolean_domain">Boolean domain</a></em></li> </ul> <p>Discussion in <a class="existingWikiWord" href="/nlab/show/type+theory">type theory</a> as a simple example of an <a class="existingWikiWord" href="/nlab/show/inductive+type">inductive type</a>:</p> <ul> <li><a class="existingWikiWord" href="/nlab/show/Per+Martin-L%C3%B6f">Per Martin-Löf</a> (notes by <a class="existingWikiWord" href="/nlab/show/Giovanni+Sambin">Giovanni Sambin</a>), <a href="https://ncatlab.org/nlab/files/MartinLofIntuitionisticTypeTheory.pdf#page=43">p. 37</a> of <em>Intuitionistic type theory</em>, Lecture notes Padua 1984, Bibliopolis, Napoli (1984) [<a href="https://archive-pml.github.io/martin-lof/pdfs/Bibliopolis-Book-retypeset-1984.pdf">pdf</a>, <a class="existingWikiWord" href="/nlab/files/MartinLofIntuitionisticTypeTheory.pdf" title="pdf">pdf</a>]</li> </ul> <p>Discussion in <a class="existingWikiWord" href="/nlab/show/homotopy+type+theory">homotopy type theory</a>:</p> <ul> <li id="AwodeyGambinoSojakova"> <p><a class="existingWikiWord" href="/nlab/show/Steve+Awodey">Steve Awodey</a>, <a class="existingWikiWord" href="/nlab/show/Nicola+Gambino">Nicola Gambino</a>, <a class="existingWikiWord" href="/nlab/show/Kristina+Sojakova">Kristina Sojakova</a>, §3.1 in: <em>Inductive types in homotopy type theory</em>, LICS’12 (2012) 95–104 [<a href="http://arxiv.org/abs/1201.3898">arXiv:1201.3898</a>, <a href="https://doi.org/10.1109/LICS.2012.21">doi:10.1109/LICS.2012.21</a>]</p> </li> <li> <p>Univalent Foundations Project, <a class="existingWikiWord" href="/nlab/show/HoTT+book">Homotopy Type Theory – Univalent Foundations of Mathematics</a> (2013)</p> </li> <li> <p><a class="existingWikiWord" href="/nlab/show/Egbert+Rijke">Egbert Rijke</a>, Exc. 4.2 (pp. 35) in: <em><a class="existingWikiWord" href="/nlab/show/Introduction+to+Homotopy+Type+Theory">Introduction to Homotopy Type Theory</a></em> (2023) [<a href="https://arxiv.org/abs/2212.11082">arXiv:2212.11082</a>]</p> </li> </ul> <p>…</p> <ul> <li id="LumsdaineShulman16"><a class="existingWikiWord" href="/nlab/show/Peter+LeFanu+Lumsdaine">Peter LeFanu Lumsdaine</a>, <a class="existingWikiWord" href="/nlab/show/Mike+Shulman">Mike Shulman</a>, <em>Abstracting away from cell complexes</em>, [talk slides <a href="http://home.sandiego.edu/~shulman/papers/cellcxs.pdf">pdf</a>]</li> </ul> <p>Large elimination and descent of the boolean domain can be found in</p> <ul> <li id="Sattler23"><a class="existingWikiWord" href="/nlab/show/Christian+Sattler">Christian Sattler</a>, <em>Natural numbers from integers</em> (<a href="https://www.cse.chalmers.se/~sattler/docs/naturals.pdf">pdf</a>)</li> </ul> </body></html> </div> <div class="revisedby"> <p> Last revised on February 21, 2024 at 08:05:55. See the <a href="/nlab/history/boolean+domain" style="color: #005c19">history</a> of this page for a list of all contributions to it. </p> </div> <div class="navigation navfoot"> <a href="/nlab/edit/boolean+domain" accesskey="E" class="navlink" id="edit" rel="nofollow">Edit</a><a href="https://nforum.ncatlab.org/discussion/15787/#Item_13">Discuss</a><span class="backintime"><a href="/nlab/revision/boolean+domain/35" accesskey="B" class="navlinkbackintime" id="to_previous_revision" rel="nofollow">Previous revision</a></span><a href="/nlab/show/diff/boolean+domain" accesskey="C" class="navlink" id="see_changes" rel="nofollow">Changes from previous revision</a><a href="/nlab/history/boolean+domain" accesskey="S" class="navlink" id="history" rel="nofollow">History (35 revisions)</a> <a href="/nlab/show/boolean+domain/cite" style="color: black">Cite</a> <a href="/nlab/print/boolean+domain" accesskey="p" id="view_print" rel="nofollow">Print</a> <a href="/nlab/source/boolean+domain" id="view_source" rel="nofollow">Source</a> </div> </div> <!-- Content --> </div> <!-- Container --> </body> </html>