<?xml version="1.0"?>
<div class="add">

<b>let </b><font color="Maroon" title="c1">n</font> be  <a href="ordinal1.html#V7" title="ORDINAL1:attr.7">natural</a>  <a href="ordinal1.html#NM1" title="ORDINAL1:NM.1">number</a> ;<br/>

<b>consider </b><font color="Maroon" title="c2">p</font> being   <a href="afinsq_1.html#NM2" title="AFINSQ_1:NM.2">XFinSequence</a> of  <a href="numbers.html#K5" title="NUMBERS:func.5">NAT</a> <b> such that </b><br/><a NAME="E2:15"/><i><font color="Green" title="E13">A1</font></i>: 
(  <a href="afinsq_1.html#K2" title="AFINSQ_1:func.2">dom</a> <font color="Maroon" title="c2">p</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a>  <a href="afinsq_1.html#K2" title="AFINSQ_1:func.2">dom</a> <span class="p1">(<span class="default"><a href="numeral1.html#K2" title="NUMERAL1:func.2">digits</a> <font color="Maroon" title="c1">n</font>,10</span>)</span> &amp; ( for <font color="Olive" title="b1">i</font> being <a href="ordinal1.html#V7" title="ORDINAL1:attr.7">natural</a>  <a href="ordinal1.html#NM1" title="ORDINAL1:NM.1">number</a>   st <font color="Olive" title="b1">i</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="afinsq_1.html#K2" title="AFINSQ_1:func.2">dom</a> <font color="Maroon" title="c2">p</font> holds <br/><font color="Maroon" title="c2">p</font> <a href="stirl2_1.html#K8" title="STIRL2_1:func.8">.</a> <font color="Olive" title="b1">i</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <span class="p1">(<span class="default"><span class="p2">(<span class="default"><a href="numeral1.html#K2" title="NUMERAL1:func.2">digits</a> <font color="Maroon" title="c1">n</font>,10</span>)</span> <a href="stirl2_1.html#K8" title="STIRL2_1:func.8">.</a> <font color="Olive" title="b1">i</font></span>)</span> <a href="xcmplx_0.html#K3" title="XCMPLX_0:func.3">*</a> <span class="p1">(<span class="default">10 <a href="newton.html#K3" title="NEWTON:func.3">|^</a> <font color="Olive" title="b1">i</font></span>)</span> ) &amp;  <a href="numeral1.html#K1" title="NUMERAL1:func.1">value</a> <span class="p1">(<span class="default"><a href="numeral1.html#K2" title="NUMERAL1:func.2">digits</a> <font color="Maroon" title="c1">n</font>,10</span>)</span>,10 <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a>  <a href="stirl2_1.html#K7" title="STIRL2_1:func.7">Sum</a> <font color="Maroon" title="c2">p</font> )
 <b>by </b><i><a class="ref" href="numeral1.html#D1" target="_self" title="NUMERAL1:def.1">Def1</a></i>;<br/>
<b>defpred </b><font color="Maroon">S<sub>1</sub></font>[   <a href="hidden.html#M1" title="HIDDEN:mode.1">set</a> ,   <a href="hidden.html#M1" title="HIDDEN:mode.1">set</a> ] <b>means </b>$2 <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <span class="p1">(<span class="default"><font color="Maroon" title="c2">p</font> <a href="stirl2_1.html#K8" title="STIRL2_1:func.8">.</a> $1</span>)</span> <a href="nat_d.html#K4" title="NAT_D:func.4">mod</a> 3;<br/>
<b>reconsider </b><font color="Maroon" title="c3">dop</font> =  <a href="afinsq_1.html#K2" title="AFINSQ_1:func.2">dom</a> <font color="Maroon" title="c2">p</font> as    <a href="subset_1.html#M2" title="SUBSET_1:mode.2">Element</a> of  <a href="numbers.html#K5" title="NUMBERS:func.5">NAT</a>  <b>by </b><i><a class="ref" href="ordinal1.html#D13" title="ORDINAL1:def.13">ORDINAL1:def 13</a></i>;<br/>
<a NAME="E4:15"/><i><font color="Green" title="E14">A2</font></i>: 
for <font color="Olive" title="b1">k</font> being   <a href="subset_1.html#M2" title="SUBSET_1:mode.2">Element</a> of  <a href="numbers.html#K5" title="NUMBERS:func.5">NAT</a>   st <font color="Olive" title="b1">k</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a> <font color="Maroon" title="c3">dop</font> holds <br/> ex <font color="Olive" title="b2">x</font> being   <a href="subset_1.html#M2" title="SUBSET_1:mode.2">Element</a> of  <a href="numbers.html#K5" title="NUMBERS:func.5">NAT</a>  st <font color="Maroon">S<sub>1</sub></font>[<font color="Olive" title="b1">k</font>,<font color="Olive" title="b2">x</font>]
 
;<br/>
<b>consider </b><font color="Maroon" title="c4">p'</font> being   <a href="afinsq_1.html#NM2" title="AFINSQ_1:NM.2">XFinSequence</a> of  <a href="numbers.html#K5" title="NUMBERS:func.5">NAT</a> <b> such that </b><br/><a NAME="E6:15"/><i><font color="Green" title="E15">A3</font></i>: 
(  <a href="afinsq_1.html#K2" title="AFINSQ_1:func.2">dom</a> <font color="Maroon" title="c4">p'</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <font color="Maroon" title="c3">dop</font> &amp; ( for <font color="Olive" title="b1">k</font> being   <a href="subset_1.html#M2" title="SUBSET_1:mode.2">Element</a> of  <a href="numbers.html#K5" title="NUMBERS:func.5">NAT</a>   st <font color="Olive" title="b1">k</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a> <font color="Maroon" title="c3">dop</font> holds <br/><font color="Maroon">S<sub>1</sub></font>[<font color="Olive" title="b1">k</font>,<font color="Maroon" title="c4">p'</font> <a href="stirl2_1.html#K8" title="STIRL2_1:func.8">.</a> <font color="Olive" title="b1">k</font>] ) )
 <b>from </b><i><a class="ref" href="stirl2_1.html#S6" title="STIRL2_1:sch.6">STIRL2_1:sch 6</a>(<a class="txt" href="numeral1.html#E4:15"><i><font color="Green" title="E14">A2</font></i></a>);<br/></i>
<a NAME="E7:15"/><i><font color="Green" title="E16">A4</font></i>: 
for <font color="Olive" title="b1">i</font> being <a href="ordinal1.html#V7" title="ORDINAL1:attr.7">natural</a>  <a href="ordinal1.html#NM1" title="ORDINAL1:NM.1">number</a>   st <font color="Olive" title="b1">i</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="afinsq_1.html#K2" title="AFINSQ_1:func.2">dom</a> <font color="Maroon" title="c2">p</font> holds <br/><font color="Maroon" title="c4">p'</font> <a href="stirl2_1.html#K8" title="STIRL2_1:func.8">.</a> <font color="Olive" title="b1">i</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <span class="p1">(<span class="default"><font color="Maroon" title="c2">p</font> <a href="stirl2_1.html#K8" title="STIRL2_1:func.8">.</a> <font color="Olive" title="b1">i</font></span>)</span> <a href="nat_d.html#K4" title="NAT_D:func.4">mod</a> 3
 
<b>by </b><i><a class="txt" href="numeral1.html#E6:15"><i><font color="Green" title="E15">A3</font></i></a></i>;<br/>
<div><i><font color="Green" title="E17">A5</font></i>: <a class="txt" onclick="hs2(this)" href="javascript:()" title="15_1"><b>now </b></a><div class="add"><b>let </b><font color="Maroon" title="c5">i</font> be  <a href="ordinal1.html#V7" title="ORDINAL1:attr.7">natural</a>  <a href="ordinal1.html#NM1" title="ORDINAL1:NM.1">number</a> ;<br/><a NAME="E1:15_1"/>
10 <a href="newton.html#K3" title="NEWTON:func.3">|^</a> <font color="Maroon" title="c5">i</font> <a href="xxreal_0.html#NR4" title="XXREAL_0:NR.4">&gt;</a> 0
 <b>by </b><i><a class="ref" href="newton.html#T102" title="NEWTON:th.102">NEWTON:102</a></i>;<br/><b>then reconsider </b><font color="Maroon" title="c6">dz</font> = <span class="p1">(<span class="default">10 <a href="newton.html#K3" title="NEWTON:func.3">|^</a> <font color="Maroon" title="c5">i</font></span>)</span> <a href="binop_2.html#K10" title="BINOP_2:func.10">-</a> 1 as  <a href="ordinal1.html#V7" title="ORDINAL1:attr.7">natural</a>  <a href="ordinal1.html#NM1" title="ORDINAL1:NM.1">number</a>  <b>by </b><i><a class="ref" href="nat_1.html#T20" title="NAT_1:th.20">NAT_1:20</a></i>;<br/><b>reconsider </b><font color="Maroon" title="c7">dz</font> = <font color="Maroon" title="c6">dz</font> as    <a href="subset_1.html#M2" title="SUBSET_1:mode.2">Element</a> of  <a href="numbers.html#K5" title="NUMBERS:func.5">NAT</a>  <b>by </b><i><a class="ref" href="ordinal1.html#D13" title="ORDINAL1:def.13">ORDINAL1:def 13</a></i>;<br/><a NAME="E4:15_1"/>
( 3 <a href="nat_d.html#R1" title="NAT_D:pred.1">divides</a> 3 <a href="binop_2.html#K24" title="BINOP_2:func.24">*</a> 3 &amp; 9 <a href="nat_d.html#R1" title="NAT_D:pred.1">divides</a> <font color="Maroon" title="c7">dz</font> )
 <b>by </b><i><a class="ref" href="numeral1.html#T9" target="_self" title="NUMERAL1:th.9">Th9</a>, <a class="ref" href="nat_d.html#D3" title="NAT_D:def.3">NAT_D:def 3</a></i>;<br/><a NAME="E5:15_1"/><b>then </b>
3 <a href="nat_d.html#R1" title="NAT_D:pred.1">divides</a> <font color="Maroon" title="c7">dz</font>
 <b>by </b><i><a class="ref" href="nat_d.html#T4" title="NAT_D:th.4">NAT_D:4</a></i>;<br/><a NAME="E6:15_1"/><b>then </b>
3 <a href="nat_d.html#R1" title="NAT_D:pred.1">divides</a> <span class="p1">(<span class="default"><span class="p2">(<span class="default"><a href="numeral1.html#K2" title="NUMERAL1:func.2">digits</a> <font color="Maroon" title="c1">n</font>,10</span>)</span> <a href="stirl2_1.html#K8" title="STIRL2_1:func.8">.</a> <font color="Maroon" title="c5">i</font></span>)</span> <a href="binop_2.html#K24" title="BINOP_2:func.24">*</a> <font color="Maroon" title="c7">dz</font>
 <b>by </b><i><a class="ref" href="nat_d.html#T9" title="NAT_D:th.9">NAT_D:9</a></i>;<br/><a NAME="E7:15_1"/><b>then </b><i><font color="Green" title="E18">A6</font></i>: 
<span class="p1">(<span class="default"><span class="p2">(<span class="default"><span class="p3">(<span class="default"><a href="numeral1.html#K2" title="NUMERAL1:func.2">digits</a> <font color="Maroon" title="c1">n</font>,10</span>)</span> <a href="stirl2_1.html#K8" title="STIRL2_1:func.8">.</a> <font color="Maroon" title="c5">i</font></span>)</span> <a href="binop_2.html#K24" title="BINOP_2:func.24">*</a> <font color="Maroon" title="c7">dz</font></span>)</span> <a href="nat_d.html#K4" title="NAT_D:func.4">mod</a> 3 <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> 0
 <b>by </b><i><a class="ref" href="pepin.html#T6" title="PEPIN:th.6">PEPIN:6</a></i>;<br/><b>assume </b><a NAME="E8:15_1"/><i><font color="Green" title="E19">A7</font></i>: 
<font color="Maroon" title="c5">i</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="afinsq_1.html#K2" title="AFINSQ_1:func.2">dom</a> <font color="Maroon" title="c2">p</font>
 ;<br/><b>hence </b><font color="Maroon" title="c4">p'</font> <a href="stirl2_1.html#K8" title="STIRL2_1:func.8">.</a> <font color="Maroon" title="c5">i</font> = 
<span class="p1">(<span class="default"><font color="Maroon" title="c2">p</font> <a href="stirl2_1.html#K8" title="STIRL2_1:func.8">.</a> <font color="Maroon" title="c5">i</font></span>)</span> <a href="nat_d.html#K4" title="NAT_D:func.4">mod</a> 3
<b>by </b><i><a class="txt" href="numeral1.html#E6:15"><i><font color="Green" title="E15">A3</font></i></a></i>
<br/>.= 
<span class="p1">(<span class="default"><span class="p2">(<span class="default"><span class="p3">(<span class="default"><a href="numeral1.html#K2" title="NUMERAL1:func.2">digits</a> <font color="Maroon" title="c1">n</font>,10</span>)</span> <a href="stirl2_1.html#K8" title="STIRL2_1:func.8">.</a> <font color="Maroon" title="c5">i</font></span>)</span> <a href="binop_2.html#K24" title="BINOP_2:func.24">*</a> <span class="p2">(<span class="default"><font color="Maroon" title="c7">dz</font> <a href="binop_2.html#K23" title="BINOP_2:func.23">+</a> 1</span>)</span></span>)</span> <a href="nat_d.html#K4" title="NAT_D:func.4">mod</a> 3
<b>by </b><i><a class="txt" href="numeral1.html#E2:15"><i><font color="Green" title="E13">A1</font></i></a>, <a class="txt" href="numeral1.html#E8:15_1"><i><font color="Green" title="E19">A7</font></i></a></i>
<br/>.= 
<span class="p1">(<span class="default"><span class="p2">(<span class="default"><span class="p3">(<span class="default"><span class="p4">(<span class="default"><a href="numeral1.html#K2" title="NUMERAL1:func.2">digits</a> <font color="Maroon" title="c1">n</font>,10</span>)</span> <a href="stirl2_1.html#K8" title="STIRL2_1:func.8">.</a> <font color="Maroon" title="c5">i</font></span>)</span> <a href="binop_2.html#K24" title="BINOP_2:func.24">*</a> <font color="Maroon" title="c7">dz</font></span>)</span> <a href="binop_2.html#K23" title="BINOP_2:func.23">+</a> <span class="p2">(<span class="default"><span class="p3">(<span class="default"><a href="numeral1.html#K2" title="NUMERAL1:func.2">digits</a> <font color="Maroon" title="c1">n</font>,10</span>)</span> <a href="stirl2_1.html#K8" title="STIRL2_1:func.8">.</a> <font color="Maroon" title="c5">i</font></span>)</span></span>)</span> <a href="nat_d.html#K4" title="NAT_D:func.4">mod</a> 3

<br/>.= 
<span class="p1">(<span class="default">0 <a href="binop_2.html#K23" title="BINOP_2:func.23">+</a> <span class="p2">(<span class="default"><span class="p3">(<span class="default"><a href="numeral1.html#K2" title="NUMERAL1:func.2">digits</a> <font color="Maroon" title="c1">n</font>,10</span>)</span> <a href="stirl2_1.html#K8" title="STIRL2_1:func.8">.</a> <font color="Maroon" title="c5">i</font></span>)</span></span>)</span> <a href="nat_d.html#K4" title="NAT_D:func.4">mod</a> 3
<b>by </b><i><a class="txt" href="numeral1.html#E7:15_1"><i><font color="Green" title="E18">A6</font></i></a>, <a class="ref" href="nat_d.html#T22" title="NAT_D:th.22">NAT_D:22</a></i>
<br/>.= 
<span class="p1">(<span class="default"><span class="p2">(<span class="default"><a href="numeral1.html#K2" title="NUMERAL1:func.2">digits</a> <font color="Maroon" title="c1">n</font>,10</span>)</span> <a href="stirl2_1.html#K8" title="STIRL2_1:func.8">.</a> <font color="Maroon" title="c5">i</font></span>)</span> <a href="nat_d.html#K4" title="NAT_D:func.4">mod</a> 3

;<br/><br/></div><b>end;</b></div>
<b>thus </b><a NAME="E9:15"/>
( 3 <a href="nat_d.html#R1" title="NAT_D:pred.1">divides</a> <font color="Maroon" title="c1">n</font> implies 3 <a href="nat_d.html#R1" title="NAT_D:pred.1">divides</a>  <a href="stirl2_1.html#K7" title="STIRL2_1:func.7">Sum</a> <span class="p1">(<span class="default"><a href="numeral1.html#K2" title="NUMERAL1:func.2">digits</a> <font color="Maroon" title="c1">n</font>,10</span>)</span> )
 <div><a class="txt" onclick="hs2(this)" href="javascript:()" title="15_2"><b>proof </b></a><div class="add">

<b>assume </b><a NAME="E1:15_2"/>
3 <a href="nat_d.html#R1" title="NAT_D:pred.1">divides</a> <font color="Maroon" title="c1">n</font>
 ;<br/>

<a NAME="E2:15_2"/><b>then </b>
3 <a href="nat_d.html#R1" title="NAT_D:pred.1">divides</a>  <a href="stirl2_1.html#K7" title="STIRL2_1:func.7">Sum</a> <font color="Maroon" title="c2">p</font>
 
<b>by </b><i><a class="ref" href="numeral1.html#T8" target="_self" title="NUMERAL1:th.8">Th8</a>, <a class="txt" href="numeral1.html#E2:15"><i><font color="Green" title="E13">A1</font></i></a></i>;<br/>
<a NAME="E3:15_2"/><b>then </b>
<span class="p1">(<span class="default"><a href="stirl2_1.html#K7" title="STIRL2_1:func.7">Sum</a> <font color="Maroon" title="c2">p</font></span>)</span> <a href="nat_d.html#K4" title="NAT_D:func.4">mod</a> 3 <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> 0
 
<b>by </b><i><a class="ref" href="pepin.html#T6" title="PEPIN:th.6">PEPIN:6</a></i>;<br/>
<a NAME="E4:15_2"/><b>then </b>
<span class="p1">(<span class="default"><a href="stirl2_1.html#K7" title="STIRL2_1:func.7">Sum</a> <font color="Maroon" title="c4">p'</font></span>)</span> <a href="nat_d.html#K4" title="NAT_D:func.4">mod</a> 3 <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> 0
 
<b>by </b><i><a class="ref" href="numeral1.html#T6" target="_self" title="NUMERAL1:th.6">Th6</a>, <a class="txt" href="numeral1.html#E6:15"><i><font color="Green" title="E15">A3</font></i></a>, <a class="txt" href="numeral1.html#E7:15"><i><font color="Green" title="E16">A4</font></i></a></i>;<br/>
<a NAME="E5:15_2"/><b>then </b>
<span class="p1">(<span class="default"><a href="stirl2_1.html#K7" title="STIRL2_1:func.7">Sum</a> <span class="p2">(<span class="default"><a href="numeral1.html#K2" title="NUMERAL1:func.2">digits</a> <font color="Maroon" title="c1">n</font>,10</span>)</span></span>)</span> <a href="nat_d.html#K4" title="NAT_D:func.4">mod</a> 3 <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> 0
 
<b>by </b><i><a class="ref" href="numeral1.html#T6" target="_self" title="NUMERAL1:th.6">Th6</a>, <a class="txt" href="numeral1.html#E8:15"><i><font color="Green" title="E17">A5</font></i></a>, <a class="txt" href="numeral1.html#E2:15"><i><font color="Green" title="E13">A1</font></i></a>, <a class="txt" href="numeral1.html#E6:15"><i><font color="Green" title="E15">A3</font></i></a></i>;<br/>
<b>hence </b><a NAME="E6:15_2"/>
3 <a href="nat_d.html#R1" title="NAT_D:pred.1">divides</a>  <a href="stirl2_1.html#K7" title="STIRL2_1:func.7">Sum</a> <span class="p1">(<span class="default"><a href="numeral1.html#K2" title="NUMERAL1:func.2">digits</a> <font color="Maroon" title="c1">n</font>,10</span>)</span>
 <b>by </b><i><a class="ref" href="pepin.html#T6" title="PEPIN:th.6">PEPIN:6</a></i>;<br/>


</div><b>end;</b></div>

<b>assume </b><a NAME="E10:15"/>
3 <a href="nat_d.html#R1" title="NAT_D:pred.1">divides</a>  <a href="stirl2_1.html#K7" title="STIRL2_1:func.7">Sum</a> <span class="p1">(<span class="default"><a href="numeral1.html#K2" title="NUMERAL1:func.2">digits</a> <font color="Maroon" title="c1">n</font>,10</span>)</span>
 ;<br/>

<a NAME="E11:15"/><b>then </b>
<span class="p1">(<span class="default"><a href="stirl2_1.html#K7" title="STIRL2_1:func.7">Sum</a> <span class="p2">(<span class="default"><a href="numeral1.html#K2" title="NUMERAL1:func.2">digits</a> <font color="Maroon" title="c1">n</font>,10</span>)</span></span>)</span> <a href="nat_d.html#K4" title="NAT_D:func.4">mod</a> 3 <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> 0
 
<b>by </b><i><a class="ref" href="pepin.html#T6" title="PEPIN:th.6">PEPIN:6</a></i>;<br/>
<a NAME="E12:15"/><b>then </b>
<span class="p1">(<span class="default"><a href="stirl2_1.html#K7" title="STIRL2_1:func.7">Sum</a> <font color="Maroon" title="c4">p'</font></span>)</span> <a href="nat_d.html#K4" title="NAT_D:func.4">mod</a> 3 <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> 0
 
<b>by </b><i><a class="ref" href="numeral1.html#T6" target="_self" title="NUMERAL1:th.6">Th6</a>, <a class="txt" href="numeral1.html#E8:15"><i><font color="Green" title="E17">A5</font></i></a>, <a class="txt" href="numeral1.html#E2:15"><i><font color="Green" title="E13">A1</font></i></a>, <a class="txt" href="numeral1.html#E6:15"><i><font color="Green" title="E15">A3</font></i></a></i>;<br/>
<a NAME="E13:15"/><b>then </b>
<span class="p1">(<span class="default"><a href="stirl2_1.html#K7" title="STIRL2_1:func.7">Sum</a> <font color="Maroon" title="c2">p</font></span>)</span> <a href="nat_d.html#K4" title="NAT_D:func.4">mod</a> 3 <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> 0
 
<b>by </b><i><a class="ref" href="numeral1.html#T6" target="_self" title="NUMERAL1:th.6">Th6</a>, <a class="txt" href="numeral1.html#E6:15"><i><font color="Green" title="E15">A3</font></i></a>, <a class="txt" href="numeral1.html#E7:15"><i><font color="Green" title="E16">A4</font></i></a></i>;<br/>
<a NAME="E14:15"/><b>then </b>
3 <a href="nat_d.html#R1" title="NAT_D:pred.1">divides</a>  <a href="stirl2_1.html#K7" title="STIRL2_1:func.7">Sum</a> <font color="Maroon" title="c2">p</font>
 
<b>by </b><i><a class="ref" href="pepin.html#T6" title="PEPIN:th.6">PEPIN:6</a></i>;<br/>
<b>hence </b><a NAME="E15:15"/>
3 <a href="nat_d.html#R1" title="NAT_D:pred.1">divides</a> <font color="Maroon" title="c1">n</font>
 <b>by </b><i><a class="ref" href="numeral1.html#T8" target="_self" title="NUMERAL1:th.8">Th8</a>, <a class="txt" href="numeral1.html#E2:15"><i><font color="Green" title="E13">A1</font></i></a></i>;<br/>


</div>
