{"id":2036,"date":"2013-01-24T21:16:00","date_gmt":"2013-01-25T02:16:00","guid":{"rendered":"http:\/\/scientopia.org\/blogs\/goodmath\/?p=2036"},"modified":"2013-01-24T21:16:00","modified_gmt":"2013-01-25T02:16:00","slug":"hensels-lemma-newtons-method-for-p-adic-numbers","status":"publish","type":"post","link":"http:\/\/www.goodmath.org\/blog\/2013\/01\/24\/hensels-lemma-newtons-method-for-p-adic-numbers\/","title":{"rendered":"Hensel&#039;s Lemma: Newton&#039;s Method for p-Adic numbers"},"content":{"rendered":"<p> This is, sadly, the last part of my posts about P-adic arithmetic. It&#8217;s not for lack of information, but rather for lack of competence on my part. The area of math that I&#8217;m worst at is analysis, and an awful lot of the interesting things that you can do with p-adic numbers is analysis.<\/p>\n<p> For an explanation of what p-adic numbers are, and how arithmetic on them works, you can refer to my <a href=\"http:\/\/scientopia.org\/blogs\/goodmath\/2012\/12\/12\/p-adic-arithmetic\/\">first post on the p-adics<\/a>, and for an explanation of p-adic metrics and distance, you can look at <a href=\"http:\/\/scientopia.org\/blogs\/goodmath\/2013\/01\/13\/define-distance-differently-the-p-adic-norm\/\">this post<\/a>.<\/p>\n<p> Today, we&#8217;re going to look at Hensel&#8217;s lemma. This is really cool. Hensel&#8217;s lemma shows you a simple way of finding polynomial roots in P-adic arithmetic. It&#8217;s sometimes called Newton&#8217;s method for p-adics, which is both a good description of how it&#8217;s used (but a complete misnomer because the lemma is a description of of a property, and Newton&#8217;s method is a description of a procedure).<\/p>\n<p> Hensel&#8217;s lemma says that if you&#8217;ve got a polynomial, and for a prime number p, you can find a root using modulo arithmetic using base p, then you can use the base-p root to find the corresponding root using modulo base p<sup>2<\/sup>, and given the root using base p<sup>2<\/sup>, you can find it for modulo p<sup>3<\/sup>, and so on! <\/p>\n<p> So far, this is just a statement about modulo arithmetic &#8211; <em>not<\/em> about p-adic arithmetic. But what ends up happening is that the result modulo p gives you a first approximation of the root in p-adic. Using the process defined by Hensel&#8217;s lemma, you can take that root and extend it to a better approximation. It ends up being the case that each time you lift the result to a higher exponent of <img src='http:\/\/l.wordpress.com\/latex.php?latex=p&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='p' style='vertical-align:1%' class='tex' alt='p' \/>, you&#8217;re performing the exactly analog of one step in Newton&#8217;s method of finding roots! But it&#8217;s actually better than that. In you look at Hensel&#8217;s lemma in the p-adic numbers, then each step extends the approximation by exactly one digit! <\/p>\n<p> Let&#8217;s look at the lemma in formal terms:<\/p>\n<p> Suppose that you have a polynomial <img src='http:\/\/l.wordpress.com\/latex.php?latex=f%28x%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f(x)' style='vertical-align:1%' class='tex' alt='f(x)' \/>.<\/p>\n<p> If there is an integer, <img src='http:\/\/l.wordpress.com\/latex.php?latex=i&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='i' style='vertical-align:1%' class='tex' alt='i' \/> and a prime number <img src='http:\/\/l.wordpress.com\/latex.php?latex=p&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='p' style='vertical-align:1%' class='tex' alt='p' \/> such that for <img src='http:\/\/l.wordpress.com\/latex.php?latex=f%28i%29%20%3D%200&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f(i) = 0' style='vertical-align:1%' class='tex' alt='f(i) = 0' \/> in mod <img src='http:\/\/l.wordpress.com\/latex.php?latex=p&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='p' style='vertical-align:1%' class='tex' alt='p' \/>, <img src='http:\/\/l.wordpress.com\/latex.php?latex=j&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='j' style='vertical-align:1%' class='tex' alt='j' \/> such that <img src='http:\/\/l.wordpress.com\/latex.php?latex=f%28j%29%20%3D%200&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f(j) = 0' style='vertical-align:1%' class='tex' alt='f(j) = 0' \/> in mod <img src='http:\/\/l.wordpress.com\/latex.php?latex=p%5E2&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='p^2' style='vertical-align:1%' class='tex' alt='p^2' \/>. In general, if there&#8217;s an exponent <img src='http:\/\/l.wordpress.com\/latex.php?latex=k&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='k' style='vertical-align:1%' class='tex' alt='k' \/> where <img src='http:\/\/l.wordpress.com\/latex.php?latex=f%28i%29%20%3D%200&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f(i) = 0' style='vertical-align:1%' class='tex' alt='f(i) = 0' \/> in mod <img src='http:\/\/l.wordpress.com\/latex.php?latex=p%5Ek&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='p^k' style='vertical-align:1%' class='tex' alt='p^k' \/>, then there&#8217;s a <img src='http:\/\/l.wordpress.com\/latex.php?latex=j&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='j' style='vertical-align:1%' class='tex' alt='j' \/> where <img src='http:\/\/l.wordpress.com\/latex.php?latex=f%28j%29%20%3D%200&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f(j) = 0' style='vertical-align:1%' class='tex' alt='f(j) = 0' \/> in mod <img src='http:\/\/l.wordpress.com\/latex.php?latex=p%5E%7Bk%2B1%7D&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='p^{k+1}' style='vertical-align:1%' class='tex' alt='p^{k+1}' \/>.<\/p>\n<p> In fact, we can do even better than that! If we know the root <img src='http:\/\/l.wordpress.com\/latex.php?latex=i&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='i' style='vertical-align:1%' class='tex' alt='i' \/> for an exponent <img src='http:\/\/l.wordpress.com\/latex.php?latex=k&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='k' style='vertical-align:1%' class='tex' alt='k' \/>, then we can easily compute <img src='http:\/\/l.wordpress.com\/latex.php?latex=j&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='j' style='vertical-align:1%' class='tex' alt='j' \/> using a process called <em>lifting<\/em>:<\/p>\n<p><center><img src='http:\/\/l.wordpress.com\/latex.php?latex=j%20%3D%20i%20%2B%20%28p%5Ek%29-frac%7Bf%28i%29%7D%7Bp%5Ek%20times%20f%27%28i%29%7D&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='j = i + (p^k)-frac{f(i)}{p^k times f'(i)}' style='vertical-align:1%' class='tex' alt='j = i + (p^k)-frac{f(i)}{p^k times f'(i)}' \/><\/center><\/p>\n<p> (In this, <img src='http:\/\/l.wordpress.com\/latex.php?latex=f%27%28i%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f'(i)' style='vertical-align:1%' class='tex' alt='f'(i)' \/> is the first derivative of <img src='http:\/\/l.wordpress.com\/latex.php?latex=f&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f' style='vertical-align:1%' class='tex' alt='f' \/> at <img src='http:\/\/l.wordpress.com\/latex.php?latex=i&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='i' style='vertical-align:1%' class='tex' alt='i' \/>.)<\/p>\n<p> You can see, looking at that equation, that the derivative of <img src='http:\/\/l.wordpress.com\/latex.php?latex=f&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f' style='vertical-align:1%' class='tex' alt='f' \/> at <img src='http:\/\/l.wordpress.com\/latex.php?latex=i&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='i' style='vertical-align:1%' class='tex' alt='i' \/> can&#8217;t be zero mod <img src='http:\/\/l.wordpress.com\/latex.php?latex=p%5Ek&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='p^k' style='vertical-align:1%' class='tex' alt='p^k' \/>, or else the denominator of the fraction would be zero, and everything would go kablooie in your face!<\/p>\n<p> In P-adic arithemetic, this becomes absolutely amazing. If <img src='http:\/\/l.wordpress.com\/latex.php?latex=i&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='i' style='vertical-align:1%' class='tex' alt='i' \/> is the root mod <img src='http:\/\/l.wordpress.com\/latex.php?latex=p%5Ek&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='p^k' style='vertical-align:1%' class='tex' alt='p^k' \/>, then the root mod <img src='http:\/\/l.wordpress.com\/latex.php?latex=p%5E%7Bk%2B1%7D&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='p^{k+1}' style='vertical-align:1%' class='tex' alt='p^{k+1}' \/> is:<\/p>\n<p><center><img src='http:\/\/l.wordpress.com\/latex.php?latex=%20j%20%3D%20i%20-%20frac%7Bf%28i%29%7D%7Bf%27%28i%29%7D&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title=' j = i - frac{f(i)}{f'(i)}' style='vertical-align:1%' class='tex' alt=' j = i - frac{f(i)}{f'(i)}' \/><\/center><\/p>\n<p> It can&#8217;t be simpler. And you can clearly see the relation to Newton&#8217;s method.<\/p>\n<p> For fun, let&#8217;s try looking at an example: let&#8217;s take the square root of 2 in 7-adic. In base-10, the square root of 2 is roughly 1.4142135624. In p-adic, it&#8217;s going to bo something completely different. We&#8217;ll start by phrasing it as a polynomial: <img src='http:\/\/l.wordpress.com\/latex.php?latex=x%5E2%20-%202%20%3D%200&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='x^2 - 2 = 0' style='vertical-align:1%' class='tex' alt='x^2 - 2 = 0' \/>. So, what&#8217;s the solution to that mod-7? 3: in mod-7, 3*3=2.<\/p>\n<p> So, our first approximation of a square root of 2 is 3.<\/p>\n<p> We can extend to the next digit using Hensel&#8217;s lemma, and we get <img src='http:\/\/l.wordpress.com\/latex.php?latex=j%20%3D%203%20-%207%2F6%20%3D%20%20%20%289-2%29%2F6%20%3D%207%2F6&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='j = 3 - 7\/6 =   (9-2)\/6 = 7\/6' style='vertical-align:1%' class='tex' alt='j = 3 - 7\/6 =   (9-2)\/6 = 7\/6' \/>. We&#8217;re looking at mod 7 arithmetic here, so 6 = -1. So <img src='http:\/\/l.wordpress.com\/latex.php?latex=j%20%3D%203%20%2B%207%20%3D%2010%20%3D%2013&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='j = 3 + 7 = 10 = 13' style='vertical-align:1%' class='tex' alt='j = 3 + 7 = 10 = 13' \/>.<\/p>\n<p> Repeated, we&#8217;d get 213, 6213, and so on.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is, sadly, the last part of my posts about P-adic arithmetic. It&#8217;s not for lack of information, but rather for lack of competence on my part. The area of math that I&#8217;m worst at is analysis, and an awful lot of the interesting things that you can do with p-adic numbers is analysis. For [&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":[43],"tags":[211],"class_list":["post-2036","post","type-post","status-publish","format-standard","hentry","category-numbers","tag-padic"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4lzZS-wQ","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/2036","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=2036"}],"version-history":[{"count":0,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/2036\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/media?parent=2036"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/categories?post=2036"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/tags?post=2036"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}