{"id":3166,"date":"2015-05-18T07:48:52","date_gmt":"2015-05-18T11:48:52","guid":{"rendered":"http:\/\/www.goodmath.org\/blog\/?p=3166"},"modified":"2015-05-18T07:48:52","modified_gmt":"2015-05-18T11:48:52","slug":"expressions-and-arity-part-2-equivalence","status":"publish","type":"post","link":"http:\/\/www.goodmath.org\/blog\/2015\/05\/18\/expressions-and-arity-part-2-equivalence\/","title":{"rendered":"Expressions and Arity (Part 2): Equivalence"},"content":{"rendered":"<p> Continuing where I left off: we were talking about <em>arity<\/em> in Martin-L&ouml;f&#8217;s theory of expressions. There are two basic problems that arity solves: it makes certain kinds of impossible-to-evaluate expressions be invalid in the theory; and it helps enable some way of comparing expressions for equality. Arity solves both of those problems by imposing a simple type system over expressions.<\/p>\n<p> At the end of the last post, I started giving a sketch of what arities look like. Now we&#8217;re going to dive in, and take a look at how to determine the arity of an expression. It&#8217;s a fairly simple system of rules.<\/p>\n<p> Before diving in, I want to stress the most important thing about the way that these rules work is that the expressions are totally syntactic and static. This is something that confused me the first time I tried to read about expression theory. When you see an expression, you think about how it&#8217;s evaluated. But expression theory is a purely syntactic theory: it&#8217;s about analyzing expressions <em>as syntactic entities<\/em>. There are, deliberately, no evaluation rules. It&#8217;s about understanding what the notations mean, and how to determine when two expressions are equivalent. <\/p>\n<p> If, under the rules of Martin-L&ouml;f&#8217;s expression theory, two expressions are equivalent, then if you were to chose a valid set of evaluation rules, the two expressions will evaluate to the same value. But expression equivalence is stronger: expressions are equivalent only if you can prove their equivalence from their syntax.<\/p>\n<p>  That clarified, let&#8217;s start by looking at the rules of arity in expressions.<\/p>\n<dl>\n<dt><em>Variables and Constants<\/em><\/dt>\n<dd>Every variable and every primitive constant has a pre-defined arity; if <img src='http:\/\/l.wordpress.com\/latex.php?latex=x&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='x' style='vertical-align:1%' class='tex' alt='x' \/> is a variable or primitive constant with arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%5Calpha&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='\\alpha' style='vertical-align:1%' class='tex' alt='\\alpha' \/>, then the expression <img src='http:\/\/l.wordpress.com\/latex.php?latex=x&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='x' style='vertical-align:1%' class='tex' alt='x' \/> has arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%5Calpha&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='\\alpha' style='vertical-align:1%' class='tex' alt='\\alpha' \/>.<\/dd>\n<dt><em>Definitions<\/em><\/dt>\n<dd> In a definition <img src='http:\/\/l.wordpress.com\/latex.php?latex=D%20%3A%3D%20e&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='D := e' style='vertical-align:1%' class='tex' alt='D := e' \/>, the arity of the defined name <img src='http:\/\/l.wordpress.com\/latex.php?latex=D&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='D' style='vertical-align:1%' class='tex' alt='D' \/> is the same as the arity of the expression <img src='http:\/\/l.wordpress.com\/latex.php?latex=e&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='e' style='vertical-align:1%' class='tex' alt='e' \/>.<\/dd>\n<dt><em>Applications<\/em><\/dt>\n<dd> If <img src='http:\/\/l.wordpress.com\/latex.php?latex=a&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a' style='vertical-align:1%' class='tex' alt='a' \/> is an expression of arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%5Calpha%20%5Ctwoheadrightarrow%20%5Cbeta&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='\\alpha \\twoheadrightarrow \\beta' style='vertical-align:1%' class='tex' alt='\\alpha \\twoheadrightarrow \\beta' \/>, and <img src='http:\/\/l.wordpress.com\/latex.php?latex=b&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='b' style='vertical-align:1%' class='tex' alt='b' \/> is a expression of arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%5Calpha&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='\\alpha' style='vertical-align:1%' class='tex' alt='\\alpha' \/>, then <img src='http:\/\/l.wordpress.com\/latex.php?latex=a%28b%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a(b)' style='vertical-align:1%' class='tex' alt='a(b)' \/> is an expression of arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%5Cbeta&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='\\beta' style='vertical-align:1%' class='tex' alt='\\beta' \/>.<\/dd>\n<dt><em>Abstractions<\/em><\/dt>\n<dd>If <img src='http:\/\/l.wordpress.com\/latex.php?latex=e&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='e' style='vertical-align:1%' class='tex' alt='e' \/> is an expression of arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%5Cbeta&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='\\beta' style='vertical-align:1%' class='tex' alt='\\beta' \/> and <img src='http:\/\/l.wordpress.com\/latex.php?latex=x&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='x' style='vertical-align:1%' class='tex' alt='x' \/> is a variable of arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%5Calpha&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='\\alpha' style='vertical-align:1%' class='tex' alt='\\alpha' \/>, then <img src='http:\/\/l.wordpress.com\/latex.php?latex=%28x%29e&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='(x)e' style='vertical-align:1%' class='tex' alt='(x)e' \/> is an expression of arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%5Calpha%20%5Ctwoheadrightarrow%20%5Cbeta&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='\\alpha \\twoheadrightarrow \\beta' style='vertical-align:1%' class='tex' alt='\\alpha \\twoheadrightarrow \\beta' \/>.<\/dd>\n<dt><em>Combinations<\/em><\/dt>\n<dd> If <img src='http:\/\/l.wordpress.com\/latex.php?latex=e_1&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='e_1' style='vertical-align:1%' class='tex' alt='e_1' \/> is an expression af arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%5Calpha_1&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='\\alpha_1' style='vertical-align:1%' class='tex' alt='\\alpha_1' \/>, <img src='http:\/\/l.wordpress.com\/latex.php?latex=e_2&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='e_2' style='vertical-align:1%' class='tex' alt='e_2' \/> is an expression of arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%5Calpha_2&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='\\alpha_2' style='vertical-align:1%' class='tex' alt='\\alpha_2' \/>, &#8230;, and <img src='http:\/\/l.wordpress.com\/latex.php?latex=e_n&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='e_n' style='vertical-align:1%' class='tex' alt='e_n' \/> is an expression of arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%5Calpha_n&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='\\alpha_n' style='vertical-align:1%' class='tex' alt='\\alpha_n' \/>, then a combination expression <img src='http:\/\/l.wordpress.com\/latex.php?latex=e_1%2C%20e_2%2C%20...%2C%20e_n&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='e_1, e_2, ..., e_n' style='vertical-align:1%' class='tex' alt='e_1, e_2, ..., e_n' \/> is an expression of arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%5Calpha_1%20%5Cotimes%20%5Calpha_2%20%5Cotimes%20%5Cldots%20%5Cotimes%20%5Calpha_n&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='\\alpha_1 \\otimes \\alpha_2 \\otimes \\ldots \\otimes \\alpha_n' style='vertical-align:1%' class='tex' alt='\\alpha_1 \\otimes \\alpha_2 \\otimes \\ldots \\otimes \\alpha_n' \/>.<\/dd>\n<dt><em>Selections<\/em><\/dt>\n<dd>If <img src='http:\/\/l.wordpress.com\/latex.php?latex=e&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='e' style='vertical-align:1%' class='tex' alt='e' \/> is an expression of arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%5Calpha_1%20%5Cotimes%20%5Calpha_2%20%5Cotimes%20%5Cldots%20%5Cotimes%20%5Calpha_n&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='\\alpha_1 \\otimes \\alpha_2 \\otimes \\ldots \\otimes \\alpha_n' style='vertical-align:1%' class='tex' alt='\\alpha_1 \\otimes \\alpha_2 \\otimes \\ldots \\otimes \\alpha_n' \/> where <img src='http:\/\/l.wordpress.com\/latex.php?latex=n%20%5Cge%202&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='n \\ge 2' style='vertical-align:1%' class='tex' alt='n \\ge 2' \/>, then <img src='http:\/\/l.wordpress.com\/latex.php?latex=%28e%29.i&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='(e).i' style='vertical-align:1%' class='tex' alt='(e).i' \/> is an expression af arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=e_i&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='e_i' style='vertical-align:1%' class='tex' alt='e_i' \/>.<\/dd>\n<\/dl>\n<p> Let&#8217;s try working through an example: <img src='http:\/\/l.wordpress.com\/latex.php?latex=x%5E2%20%2B%203x%20%2B%207&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='x^2 + 3x + 7' style='vertical-align:1%' class='tex' alt='x^2 + 3x + 7' \/>. <\/p>\n<ol>\n<li> As we saw in <a href=\"http:\/\/www.goodmath.org\/blog\/2015\/05\/10\/understanding-expressions\/\">this post<\/a>, this is equivalent to the simple AST-form: <img src='http:\/\/l.wordpress.com\/latex.php?latex=%28x%29%2B%28%2B%28%2A%28x%2Cx%29%2C%20%2A%283%2C%20x%29%29%2C7%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='(x)+(+(*(x,x), *(3, x)),7)' style='vertical-align:1%' class='tex' alt='(x)+(+(*(x,x), *(3, x)),7)' \/>.<\/li>\n<li> &#8220;<img src='http:\/\/l.wordpress.com\/latex.php?latex=x&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='x' style='vertical-align:1%' class='tex' alt='x' \/>&#8221; is a variable of arity 0; &#8220;3&#8221; and &#8220;7&#8221; are constants of arity 0; &#8220;<img src='http:\/\/l.wordpress.com\/latex.php?latex=%2B&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='+' style='vertical-align:1%' class='tex' alt='+' \/>&#8221; and &#8220;<img src='http:\/\/l.wordpress.com\/latex.php?latex=%2A&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='*' style='vertical-align:1%' class='tex' alt='*' \/>&#8221; are constants of arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%280%20%5Cotimes%200%29%20%5Ctwoheadrightarrow%200&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='(0 \\otimes 0) \\twoheadrightarrow 0' style='vertical-align:1%' class='tex' alt='(0 \\otimes 0) \\twoheadrightarrow 0' \/>. <\/li>\n<li> From the combination rule, since <img src='http:\/\/l.wordpress.com\/latex.php?latex=x&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='x' style='vertical-align:1%' class='tex' alt='x' \/> and <img src='http:\/\/l.wordpress.com\/latex.php?latex=3&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='3' style='vertical-align:1%' class='tex' alt='3' \/> both have arity 0, <img src='http:\/\/l.wordpress.com\/latex.php?latex=%28x%2C%20x%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='(x, x)' style='vertical-align:1%' class='tex' alt='(x, x)' \/> and <img src='http:\/\/l.wordpress.com\/latex.php?latex=%283%2C%20x%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='(3, x)' style='vertical-align:1%' class='tex' alt='(3, x)' \/> each have arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=0%20%5Cotimes%200&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='0 \\otimes 0' style='vertical-align:1%' class='tex' alt='0 \\otimes 0' \/>. <\/li>\n<li> Since <img src='http:\/\/l.wordpress.com\/latex.php?latex=%28x%2C%20x%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='(x, x)' style='vertical-align:1%' class='tex' alt='(x, x)' \/> has arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=0%20%5Cotimes%200&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='0 \\otimes 0' style='vertical-align:1%' class='tex' alt='0 \\otimes 0' \/>, and <img src='http:\/\/l.wordpress.com\/latex.php?latex=%2A&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='*' style='vertical-align:1%' class='tex' alt='*' \/> has arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%280%20%5Cotimes%200%29%20%5Ctwoheadrightarrow%200&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='(0 \\otimes 0) \\twoheadrightarrow 0' style='vertical-align:1%' class='tex' alt='(0 \\otimes 0) \\twoheadrightarrow 0' \/>, <img src='http:\/\/l.wordpress.com\/latex.php?latex=%2A%28x%2C%20x%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='*(x, x)' style='vertical-align:1%' class='tex' alt='*(x, x)' \/> has arity 0. The same thing works for <img src='http:\/\/l.wordpress.com\/latex.php?latex=%2A%283%2C%20x%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='*(3, x)' style='vertical-align:1%' class='tex' alt='*(3, x)' \/>.<\/li>\n<li> Since the arities of the <img src='http:\/\/l.wordpress.com\/latex.php?latex=%2A%28x%2C%20x%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='*(x, x)' style='vertical-align:1%' class='tex' alt='*(x, x)' \/> and <img src='http:\/\/l.wordpress.com\/latex.php?latex=%2A%283%2C%20x%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='*(3, x)' style='vertical-align:1%' class='tex' alt='*(3, x)' \/> are both 0, the combination of the pair (the arguments to the inner &#8220;+&#8221;) are <img src='http:\/\/l.wordpress.com\/latex.php?latex=0%20%5Cotimes%200&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='0 \\otimes 0' style='vertical-align:1%' class='tex' alt='0 \\otimes 0' \/>, and the arity of the inner sum expression is thus 0.<\/li>\n<li> Since 7 has arity 0, the combination of it with the inner sum is <img src='http:\/\/l.wordpress.com\/latex.php?latex=0%20%5Cotimes%200&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='0 \\otimes 0' style='vertical-align:1%' class='tex' alt='0 \\otimes 0' \/>, and the arity of the outer sum is 0.<\/li>\n<li> Since <img src='http:\/\/l.wordpress.com\/latex.php?latex=x&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='x' style='vertical-align:1%' class='tex' alt='x' \/> is a variable of arity 0, and outer sum expression has arity 0, the abstract has arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=0%20%5Ctwoheadrightarrow%200&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='0 \\twoheadrightarrow 0' style='vertical-align:1%' class='tex' alt='0 \\twoheadrightarrow 0' \/>.<\/li>\n<\/ol>\n<p> If you&#8217;re familiar with type inference in the simply typed lambda calculus, this should look pretty familiar; the only real difference is that the only thing that arity really tracks is applicability and parameter counting.<\/p>\n<p> Just from this much, we can see how this prevents problems. If you try to compute the arity of <img src='http:\/\/l.wordpress.com\/latex.php?latex=3.1&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='3.1' style='vertical-align:1%' class='tex' alt='3.1' \/> (that is, the selection of the first element from 3), you find that you can&#8217;t: there is no arity rule that would allow you to do that. The selection rule only works on a product-arity, and 3 has arity 0. <\/p>\n<p> The other reason we wanted arity was to allow us to compare expressions. Intuitively, it should be obvious that the expression <img src='http:\/\/l.wordpress.com\/latex.php?latex=e&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='e' style='vertical-align:1%' class='tex' alt='e' \/> and the expression <img src='http:\/\/l.wordpress.com\/latex.php?latex=%28x%29e%28x%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='(x)e(x)' style='vertical-align:1%' class='tex' alt='(x)e(x)' \/> are in some sense equal. But we need some way of being able to actually precisely define that equality.<\/p>\n<p> The kind of equality that we&#8217;re trying to get at here is called <em>definitional equality<\/em>. We&#8217;re <em>not<\/em> trying to define equality where expressions <img src='http:\/\/l.wordpress.com\/latex.php?latex=a&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a' style='vertical-align:1%' class='tex' alt='a' \/> and <img src='http:\/\/l.wordpress.com\/latex.php?latex=b&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='b' style='vertical-align:1%' class='tex' alt='b' \/> evaluate to equal values &#8211; that would be easy. Instead, we&#8217;re trying to get at something more subtle: we want to capture the idea that the expressions are different ways of writing the same thing.<\/p>\n<p> We need arity for this, for a simple reason. Let&#8217;s go back to that first example expression: <img src='http:\/\/l.wordpress.com\/latex.php?latex=%28x%29%2B%28%2B%28%2A%28x%2Cx%29%2C%20%2A%283%2C%20x%29%29%2C7%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='(x)+(+(*(x,x), *(3, x)),7)' style='vertical-align:1%' class='tex' alt='(x)+(+(*(x,x), *(3, x)),7)' \/>. Is that equivalent to <img src='http:\/\/l.wordpress.com\/latex.php?latex=%28y%29%2B%28%2B%28%2A%28y%2Cy%29%2C%20%2A%283%2C%20y%29%29%2C7%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='(y)+(+(*(y,y), *(3, y)),7)' style='vertical-align:1%' class='tex' alt='(y)+(+(*(y,y), *(3, y)),7)' \/>? Or to <img src='http:\/\/l.wordpress.com\/latex.php?latex=8x%2B1&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='8x+1' style='vertical-align:1%' class='tex' alt='8x+1' \/>?  If we apply them to the value 3, and then evaluate them using standard arithmetic, then all three expressions evaluate to 25. So are they all equivalent? We want to be able to say that the first two are equivalent expressions, but the last one isn&#8217;t. And we&#8217;d really like to be able to say that structurally &#8211; that is, instead of saying something evaluation-based like &#8220;forall values of x, eval(f(x)) == eval(g(x)), therefore f == g&#8221;, we want to be able to do something that says <img src='http:\/\/l.wordpress.com\/latex.php?latex=f%20%5Cequiv%20g&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f \\equiv g' style='vertical-align:1%' class='tex' alt='f \\equiv g' \/> because they have the same structure. <\/p>\n<p> Using arity, we can work out a structural definition of equivalence for expressions. <\/p>\n<p> In everything below, we&#8217;l write <img src='http:\/\/l.wordpress.com\/latex.php?latex=a%3A%20%5Calpha&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a: \\alpha' style='vertical-align:1%' class='tex' alt='a: \\alpha' \/> to mean that <img src='http:\/\/l.wordpress.com\/latex.php?latex=a&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a' style='vertical-align:1%' class='tex' alt='a' \/> has arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%5Calpha&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='\\alpha' style='vertical-align:1%' class='tex' alt='\\alpha' \/>, and <img src='http:\/\/l.wordpress.com\/latex.php?latex=a%20%5Cequiv%20b%20%3A%20%5Calpha&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a \\equiv b : \\alpha' style='vertical-align:1%' class='tex' alt='a \\equiv b : \\alpha' \/> to mean that <img src='http:\/\/l.wordpress.com\/latex.php?latex=a&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a' style='vertical-align:1%' class='tex' alt='a' \/> and <img src='http:\/\/l.wordpress.com\/latex.php?latex=b&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='b' style='vertical-align:1%' class='tex' alt='b' \/> are equivalent expressions of arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%5Calpha&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='\\alpha' style='vertical-align:1%' class='tex' alt='\\alpha' \/>. We&#8217;ll define equivalence in a classic inductive form by structure:<\/p>\n<dl>\n<dt><em>Variables and Constants<\/em><\/dt>\n<dd> If <img src='http:\/\/l.wordpress.com\/latex.php?latex=x&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='x' style='vertical-align:1%' class='tex' alt='x' \/> is a variable or constant of arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%5Calpha&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='\\alpha' style='vertical-align:1%' class='tex' alt='\\alpha' \/>, then <img src='http:\/\/l.wordpress.com\/latex.php?latex=x%20%5Cequiv%20x%20%3A%20alpha&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='x \\equiv x : alpha' style='vertical-align:1%' class='tex' alt='x \\equiv x : alpha' \/>. This is the simplest identity rule: variables and constants are equivalent to themselves.<\/dd>\n<dt><em>Definitions<\/em><\/dt>\n<dd> If <img src='http:\/\/l.wordpress.com\/latex.php?latex=a%20%3A%3D%20b&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a := b' style='vertical-align:1%' class='tex' alt='a := b' \/> is a definition, and <img src='http:\/\/l.wordpress.com\/latex.php?latex=b%3A%20%5Calpha&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='b: \\alpha' style='vertical-align:1%' class='tex' alt='b: \\alpha' \/>, then <img src='http:\/\/l.wordpress.com\/latex.php?latex=a%20%5Cequiv%20b%20%3A%20%5Calpha&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a \\equiv b : \\alpha' style='vertical-align:1%' class='tex' alt='a \\equiv b : \\alpha' \/>. This is a slightly more complex form of an identity rule: if there&#8217;s a definition of <img src='http:\/\/l.wordpress.com\/latex.php?latex=b&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='b' style='vertical-align:1%' class='tex' alt='b' \/> as the value of <img src='http:\/\/l.wordpress.com\/latex.php?latex=a&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a' style='vertical-align:1%' class='tex' alt='a' \/>, then <img src='http:\/\/l.wordpress.com\/latex.php?latex=a&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a' style='vertical-align:1%' class='tex' alt='a' \/> and <img src='http:\/\/l.wordpress.com\/latex.php?latex=b&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='b' style='vertical-align:1%' class='tex' alt='b' \/> are equivalent. <\/dd>\n<dt><em>Application Rules<\/em><\/dt>\n<dd>\n<ol>\n<li>If <img src='http:\/\/l.wordpress.com\/latex.php?latex=a%20%5Cequiv%20a%27%3A%20%5Calpha%20%5Ctwoheadrightarrow%20%5Cbeta&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a \\equiv a': \\alpha \\twoheadrightarrow \\beta' style='vertical-align:1%' class='tex' alt='a \\equiv a': \\alpha \\twoheadrightarrow \\beta' \/> and <img src='http:\/\/l.wordpress.com\/latex.php?latex=b%20%5Cequiv%20b%27%3A%20%5Calpha&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='b \\equiv b': \\alpha' style='vertical-align:1%' class='tex' alt='b \\equiv b': \\alpha' \/>, then <img src='http:\/\/l.wordpress.com\/latex.php?latex=a%28b%29%20%5Cequiv%20a%27%28b%27%29%3A%20%5Cbeta&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a(b) \\equiv a'(b'): \\beta' style='vertical-align:1%' class='tex' alt='a(b) \\equiv a'(b'): \\beta' \/>. If an applyable expression <img src='http:\/\/l.wordpress.com\/latex.php?latex=a&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a' style='vertical-align:1%' class='tex' alt='a' \/> is equivalent to another applyable expression <img src='http:\/\/l.wordpress.com\/latex.php?latex=a%27&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a'' style='vertical-align:1%' class='tex' alt='a'' \/>, then applying <img src='http:\/\/l.wordpress.com\/latex.php?latex=a&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a' style='vertical-align:1%' class='tex' alt='a' \/> to an expression <img src='http:\/\/l.wordpress.com\/latex.php?latex=b&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='b' style='vertical-align:1%' class='tex' alt='b' \/> is equivalent to applying <img src='http:\/\/l.wordpress.com\/latex.php?latex=a%27&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a'' style='vertical-align:1%' class='tex' alt='a'' \/> to an expression <img src='http:\/\/l.wordpress.com\/latex.php?latex=b%27&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='b'' style='vertical-align:1%' class='tex' alt='b'' \/> if the argument <img src='http:\/\/l.wordpress.com\/latex.php?latex=b&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='b' style='vertical-align:1%' class='tex' alt='b' \/> is equivalent to the argument <img src='http:\/\/l.wordpress.com\/latex.php?latex=b%27&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='b'' style='vertical-align:1%' class='tex' alt='b'' \/>. That&#8217;s a mouthful, but it&#8217;s simple: if you have two function application expressions, they&#8217;re equivalent if both the function expressions and the argument expressions are equivalent.<\/li>\n<li> If <img src='http:\/\/l.wordpress.com\/latex.php?latex=x&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='x' style='vertical-align:1%' class='tex' alt='x' \/> is a variable of arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%5Calpha&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='\\alpha' style='vertical-align:1%' class='tex' alt='\\alpha' \/>, and <img src='http:\/\/l.wordpress.com\/latex.php?latex=a&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a' style='vertical-align:1%' class='tex' alt='a' \/> is an expression of arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%5Calpha&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='\\alpha' style='vertical-align:1%' class='tex' alt='\\alpha' \/> and <img src='http:\/\/l.wordpress.com\/latex.php?latex=b&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='b' style='vertical-align:1%' class='tex' alt='b' \/> is an expression of arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%5Cbeta&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='\\beta' style='vertical-align:1%' class='tex' alt='\\beta' \/>, then <img src='http:\/\/l.wordpress.com\/latex.php?latex=%28%28x%29b%29%28a%29%20%20b%5Bx%20%3A%3D%20a%5D%3A%20%5Cbeta&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='((x)b)(a)  b[x := a]: \\beta' style='vertical-align:1%' class='tex' alt='((x)b)(a)  b[x := a]: \\beta' \/>. This is arity&#8217;s version of the classic beta rule of lambda calculus: applying an abstraction to an argument means substituting the argument for all references to the abstracted parameter in the body of the abstraction. <\/li>\n<\/ol>\n<\/dd>\n<dt><em>Abstraction Rules<\/em><\/dt>\n<dd>\n<ol>\n<li>If <img src='http:\/\/l.wordpress.com\/latex.php?latex=x&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='x' style='vertical-align:1%' class='tex' alt='x' \/> is a variable of arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%5Calpha&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='\\alpha' style='vertical-align:1%' class='tex' alt='\\alpha' \/>, and <img src='http:\/\/l.wordpress.com\/latex.php?latex=b%20%5Cequiv%20b%3A%20%5Cbeta&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='b \\equiv b: \\beta' style='vertical-align:1%' class='tex' alt='b \\equiv b: \\beta' \/>, then <img src='http:\/\/l.wordpress.com\/latex.php?latex=%28x%29b%20%5Cequiv%20%28x%29b%3A%20%5Calpha%20%5Ctwoheadrightarrow%20%5Cbeta&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='(x)b \\equiv (x)b: \\alpha \\twoheadrightarrow \\beta' style='vertical-align:1%' class='tex' alt='(x)b \\equiv (x)b: \\alpha \\twoheadrightarrow \\beta' \/>. If two expressions are equivalent, then two abstractions using the same variable over the same expression is equivalent.<\/li>\n<li> If <img src='http:\/\/l.wordpress.com\/latex.php?latex=x&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='x' style='vertical-align:1%' class='tex' alt='x' \/> and <img src='http:\/\/l.wordpress.com\/latex.php?latex=y&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='y' style='vertical-align:1%' class='tex' alt='y' \/> are both variables of arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%5Calpha&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='\\alpha' style='vertical-align:1%' class='tex' alt='\\alpha' \/>, and <img src='http:\/\/l.wordpress.com\/latex.php?latex=b&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='b' style='vertical-align:1%' class='tex' alt='b' \/> is an expression of arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%5Cbeta&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='\\beta' style='vertical-align:1%' class='tex' alt='\\beta' \/>, then <img src='http:\/\/l.wordpress.com\/latex.php?latex=%28x%29b%20%5Cequiv%20%28y%29%28b%5Bx%20%3A%3D%20y%5D%29%3A%20%5Calpha%20%5Ctwoheadrightarrow%20%5Cbeta&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='(x)b \\equiv (y)(b[x := y]): \\alpha \\twoheadrightarrow \\beta' style='vertical-align:1%' class='tex' alt='(x)b \\equiv (y)(b[x := y]): \\alpha \\twoheadrightarrow \\beta' \/>, provided <img src='http:\/\/l.wordpress.com\/latex.php?latex=y&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='y' style='vertical-align:1%' class='tex' alt='y' \/> is not free in <img src='http:\/\/l.wordpress.com\/latex.php?latex=b&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='b' style='vertical-align:1%' class='tex' alt='b' \/>.<br \/>\n         Basically, the renaming variables in abstractions don&#8217;t matter, as long as you aren&#8217;t using the variable in the body of the abstraction. So <img src='http:\/\/l.wordpress.com\/latex.php?latex=%28x%29%283%2B4y%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='(x)(3+4y)' style='vertical-align:1%' class='tex' alt='(x)(3+4y)' \/> is equivalent  to <img src='http:\/\/l.wordpress.com\/latex.php?latex=%28z%29%283%2B4y%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='(z)(3+4y)' style='vertical-align:1%' class='tex' alt='(z)(3+4y)' \/>, but it&#8217;s not equivalent to <img src='http:\/\/l.wordpress.com\/latex.php?latex=%28y%29%283%2B4y%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='(y)(3+4y)' style='vertical-align:1%' class='tex' alt='(y)(3+4y)' \/>, because <img src='http:\/\/l.wordpress.com\/latex.php?latex=y&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='y' style='vertical-align:1%' class='tex' alt='y' \/> is a free variable in <img src='http:\/\/l.wordpress.com\/latex.php?latex=3%2B4y&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='3+4y' style='vertical-align:1%' class='tex' alt='3+4y' \/>, and the abstraction would create a binding for <img src='http:\/\/l.wordpress.com\/latex.php?latex=y&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='y' style='vertical-align:1%' class='tex' alt='y' \/>.<\/p>\n<\/li>\n<li>\n<p>This is arities version of the eta-rule from lambda calculus: If <img src='http:\/\/l.wordpress.com\/latex.php?latex=x&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='x' style='vertical-align:1%' class='tex' alt='x' \/> is a variable of arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%5Calpha&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='\\alpha' style='vertical-align:1%' class='tex' alt='\\alpha' \/>, and <img src='http:\/\/l.wordpress.com\/latex.php?latex=b&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='b' style='vertical-align:1%' class='tex' alt='b' \/> is an expression of arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=%5Calpha%20%5Ctwoheadrightarrow%20%5Cbeta&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='\\alpha \\twoheadrightarrow \\beta' style='vertical-align:1%' class='tex' alt='\\alpha \\twoheadrightarrow \\beta' \/>, then <img src='http:\/\/l.wordpress.com\/latex.php?latex=%28x%29%28b%28x%29%29%20%5Cequiv%20b%3A%20%5Calpha%20%5Ctwoheadrightarrow%20%5Cbeta&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='(x)(b(x)) \\equiv b: \\alpha \\twoheadrightarrow \\beta' style='vertical-align:1%' class='tex' alt='(x)(b(x)) \\equiv b: \\alpha \\twoheadrightarrow \\beta' \/>. This is a fancy version of an identity rule: abstraction and application cancel.\n  <\/ol>\n<\/dd>\n<dt><em>Combination Rules<\/em><\/dt>\n<dd>\n<ol>\n<li> If <img src='http:\/\/l.wordpress.com\/latex.php?latex=a_1%20%5Cequiv%20a_1%27%3A%20%5Calpha_1&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a_1 \\equiv a_1': \\alpha_1' style='vertical-align:1%' class='tex' alt='a_1 \\equiv a_1': \\alpha_1' \/>, <img src='http:\/\/l.wordpress.com\/latex.php?latex=a_2%20%5Cequiv%20a_2%27%3A%20%5Calpha_2&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a_2 \\equiv a_2': \\alpha_2' style='vertical-align:1%' class='tex' alt='a_2 \\equiv a_2': \\alpha_2' \/>, &#8230;, <img src='http:\/\/l.wordpress.com\/latex.php?latex=a_n%20%5Cequiv%20a_n%27%3A%20%5Calpha_n&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a_n \\equiv a_n': \\alpha_n' style='vertical-align:1%' class='tex' alt='a_n \\equiv a_n': \\alpha_n' \/>, then <img src='http:\/\/l.wordpress.com\/latex.php?latex=a_1%2C%20a_2%2C%20...%2C%20a_n%20%5Cequiv%20a_1%27%2C%20a_2%27%2C%20...%2C%20a_n%27%3A%20%5Calpha_1%20%5Cotimes%20%5Calpha_2%20%5Cotimes%20...%20%5Cotimes%20%5Calpha_n&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a_1, a_2, ..., a_n \\equiv a_1', a_2', ..., a_n': \\alpha_1 \\otimes \\alpha_2 \\otimes ... \\otimes \\alpha_n' style='vertical-align:1%' class='tex' alt='a_1, a_2, ..., a_n \\equiv a_1', a_2', ..., a_n': \\alpha_1 \\otimes \\alpha_2 \\otimes ... \\otimes \\alpha_n' \/>. This one is simple: if you have two combination expressions with the same arity, then they&#8217;re equivalent if their elements are equivalent.<\/li>\n<li> If <img src='http:\/\/l.wordpress.com\/latex.php?latex=e%3A%20%5Calpha_1%20%5Cotimes%20%5Calpha_2%20%5Cotimes%20...%20%5Cotimes%20%5Calpha_n&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='e: \\alpha_1 \\otimes \\alpha_2 \\otimes ... \\otimes \\alpha_n' style='vertical-align:1%' class='tex' alt='e: \\alpha_1 \\otimes \\alpha_2 \\otimes ... \\otimes \\alpha_n' \/>, then <img src='http:\/\/l.wordpress.com\/latex.php?latex=e.1%2C%20e.2%2C%20...%2C%20e.n%20%5Cequiv%3A%20e%20%3A%20%5Calpha_1%20%5Cotimes%20%5Calpha_2%20%5Cotimes%20...%20%5Cotimes%20%5Calpha_n&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='e.1, e.2, ..., e.n \\equiv: e : \\alpha_1 \\otimes \\alpha_2 \\otimes ... \\otimes \\alpha_n' style='vertical-align:1%' class='tex' alt='e.1, e.2, ..., e.n \\equiv: e : \\alpha_1 \\otimes \\alpha_2 \\otimes ... \\otimes \\alpha_n' \/>. Another easy one: if you take a combination expression, and you decompose it using selections, and then recombine those selection expressions into a combination, it&#8217;s equivalent to the original expression.<\/li>\n<\/ol>\n<\/dd>\n<dt><em>Selection Rules<\/em><\/dt>\n<dd>\n<ol>\n<li> If <img src='http:\/\/l.wordpress.com\/latex.php?latex=a%20%5Cequiv%20a%27%3A%20%5Calpha_1%20%5Cotimes%20%5Calpha_2%20%5Cotimes%20...%20%5Cotimes%20%5Calpha_n&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a \\equiv a': \\alpha_1 \\otimes \\alpha_2 \\otimes ... \\otimes \\alpha_n' style='vertical-align:1%' class='tex' alt='a \\equiv a': \\alpha_1 \\otimes \\alpha_2 \\otimes ... \\otimes \\alpha_n' \/>, then <img src='http:\/\/l.wordpress.com\/latex.php?latex=a.i%20%5Cequiv%20a%27.i&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a.i \\equiv a'.i' style='vertical-align:1%' class='tex' alt='a.i \\equiv a'.i' \/>. This is the reverse of combinations rule one: if you have two equivalent tuples, then their elements are equivalent.<\/li>\n<li> If <img src='http:\/\/l.wordpress.com\/latex.php?latex=a_1%3A%20%5Calpha_1%2C%20a_2%3A%20%5Calpha_2%2C%20...%2C%20a_n%3A%20%5Calpha_n&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a_1: \\alpha_1, a_2: \\alpha_2, ..., a_n: \\alpha_n' style='vertical-align:1%' class='tex' alt='a_1: \\alpha_1, a_2: \\alpha_2, ..., a_n: \\alpha_n' \/>, then <img src='http:\/\/l.wordpress.com\/latex.php?latex=%28a_1%2C%20a_2%2C%20...%2C%20a_n%29.i%20%5Cequiv%20a_i&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='(a_1, a_2, ..., a_n).i \\equiv a_i' style='vertical-align:1%' class='tex' alt='(a_1, a_2, ..., a_n).i \\equiv a_i' \/>. An element of a combination is equivalent to itself outside of the combination.<\/li>\n<\/ol>\n<\/dd>\n<dt><em>Symmetry<\/em><\/dt>\n<dd> If <img src='http:\/\/l.wordpress.com\/latex.php?latex=a%3A%20%5Calpha&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a: \\alpha' style='vertical-align:1%' class='tex' alt='a: \\alpha' \/>, then <img src='http:\/\/l.wordpress.com\/latex.php?latex=a%20%5Cequiv%20a%3A%20%5Calpha&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a \\equiv a: \\alpha' style='vertical-align:1%' class='tex' alt='a \\equiv a: \\alpha' \/>.<\/dd>\n<dt><em>Symmetry<\/em><\/dt>\n<dd> If <img src='http:\/\/l.wordpress.com\/latex.php?latex=a%20%5Cequiv%20b%3A%20%5Calpha&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a \\equiv b: \\alpha' style='vertical-align:1%' class='tex' alt='a \\equiv b: \\alpha' \/>, then <img src='http:\/\/l.wordpress.com\/latex.php?latex=b%20%5Cequiv%20a%3A%20%5Calpha&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='b \\equiv a: \\alpha' style='vertical-align:1%' class='tex' alt='b \\equiv a: \\alpha' \/>.<\/dd>\n<dt><em>Transitivity<\/em><\/dt>\n<dd> If <img src='http:\/\/l.wordpress.com\/latex.php?latex=a%20%5Cequiv%20b%3A%20%5Calpha&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a \\equiv b: \\alpha' style='vertical-align:1%' class='tex' alt='a \\equiv b: \\alpha' \/>, and <img src='http:\/\/l.wordpress.com\/latex.php?latex=b%20%5Cequiv%20c%3A%20%5Calpha&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='b \\equiv c: \\alpha' style='vertical-align:1%' class='tex' alt='b \\equiv c: \\alpha' \/>, then <img src='http:\/\/l.wordpress.com\/latex.php?latex=a%20%5Cequiv%20c%3A%20%5Calpha&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a \\equiv c: \\alpha' style='vertical-align:1%' class='tex' alt='a \\equiv c: \\alpha' \/>.<\/dd>\n<\/dl>\n<p> Jumping back to our example: Is <img src='http:\/\/l.wordpress.com\/latex.php?latex=x%5E2%20%2B%203x%20%2B%207&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='x^2 + 3x + 7' style='vertical-align:1%' class='tex' alt='x^2 + 3x + 7' \/> equivalent to <img src='http:\/\/l.wordpress.com\/latex.php?latex=x%5E2%20%2B%203x%20%2B%207&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='x^2 + 3x + 7' style='vertical-align:1%' class='tex' alt='x^2 + 3x + 7' \/>? If we convert them both into their canonical AST forms, then yes. They&#8217;re identical, except for one thing: the variable name in their abstraction. By abstraction rule 2, then, they&#8217;re equivalent.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Continuing where I left off: we were talking about arity in Martin-L&ouml;f&#8217;s theory of expressions. There are two basic problems that arity solves: it makes certain kinds of impossible-to-evaluate expressions be invalid in the theory; and it helps enable some way of comparing expressions for equality. Arity solves both of those problems by imposing a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[292],"tags":[],"class_list":["post-3166","post","type-post","status-publish","format-standard","hentry","category-type-theory"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4lzZS-P4","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/3166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/comments?post=3166"}],"version-history":[{"count":7,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/3166\/revisions"}],"predecessor-version":[{"id":3175,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/3166\/revisions\/3175"}],"wp:attachment":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/media?parent=3166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/categories?post=3166"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/tags?post=3166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}