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

<span class="kw">let </span><font color="Maroon" title="c1">p</font> be   <a href="newton.html#NM1" title="NEWTON:NM.1">Prime</a>; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="Red">::  thesis: </font></span></a><span class="hide"> ( <font color="Maroon" title="c1">p</font> <a href="xxreal_0.html#NR4" title="XXREAL_0:NR.4">&gt;</a> 2 implies  ex <font color="Olive" title="b1">fp</font> being   <a href="finseq_1.html#M2" title="FINSEQ_1:mode.2">FinSequence</a> of  <a href="numbers.html#K5" title="NUMBERS:func.5">NAT</a>  st <br/>(  <a href="finseq_1.html#K3" title="FINSEQ_1:func.3">len</a> <font color="Olive" title="b1">fp</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <span class="p1">(<span class="default"><font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1</span>)</span> <a href="nat_d.html#K3" title="NAT_D:func.3">div</a> 2 &amp; ( for <font color="Olive" title="b2">d</font> being  <a href="nat_1.html#NM1" title="NAT_1:NM.1">Nat</a>  st <font color="Olive" title="b2">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Olive" title="b1">fp</font> holds <br/><span class="p1">(<span class="default"><font color="Olive" title="b1">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Olive" title="b2">d</font></span>)</span> <a href="int_2.html#K3" title="INT_2:func.3">gcd</a> <font color="Maroon" title="c1">p</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> 1 ) &amp; ( for <font color="Olive" title="b2">d</font> being  <a href="nat_1.html#NM1" title="NAT_1:NM.1">Nat</a>  st <font color="Olive" title="b2">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Olive" title="b1">fp</font> holds <br/><font color="Olive" title="b1">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Olive" title="b2">d</font> <a href="int_5.html#R1" title="INT_5:pred.1">is_quadratic_residue_mod</a> <font color="Maroon" title="c1">p</font> ) &amp; ( for <font color="Olive" title="b2">d</font>, <font color="Olive" title="b3">e</font> being  <a href="nat_1.html#NM1" title="NAT_1:NM.1">Nat</a>  st <font color="Olive" title="b2">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Olive" title="b1">fp</font> &amp; <font color="Olive" title="b3">e</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Olive" title="b1">fp</font> &amp; <font color="Olive" title="b2">d</font> <a href="hidden.html#NR2" title="HIDDEN:NR.2">&lt;&gt;</a> <font color="Olive" title="b3">e</font> holds <br/> not <font color="Olive" title="b1">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Olive" title="b2">d</font>,<font color="Olive" title="b1">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Olive" title="b3">e</font> <a href="int_1.html#R1" title="INT_1:pred.1">are_congruent_mod</a> <font color="Maroon" title="c1">p</font> ) ) )</span><br/>

<span class="kw">deffunc </span><font color="Maroon">H<sub>1</sub></font>(  <a href="nat_1.html#NM1" title="NAT_1:NM.1">Nat</a>) <span class="kw">-&gt; </span>   <a href="subset_1.html#M1" title="SUBSET_1:mode.1">Element</a> of  <a href="numbers.html#K5" title="NUMBERS:func.5">NAT</a>  = $1 <a href="pepin.html#K2" title="PEPIN:func.2">^2</a> ;<br/>
<span class="kw">consider </span><font color="Maroon" title="c2">fp</font> being   <a href="finseq_1.html#NM1" title="FINSEQ_1:NM.1">FinSequence</a><span class="kw"> such that </span><br/><a NAME="E2:22"/><span class="lab"><font color="Green" title="E18">A1</font></span>: 
(  <a href="finseq_1.html#K3" title="FINSEQ_1:func.3">len</a> <font color="Maroon" title="c2">fp</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <span class="p1">(<span class="default"><font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1</span>)</span> <a href="nat_d.html#K3" title="NAT_D:func.3">div</a> 2 &amp; ( for <font color="Olive" title="b1">d</font> being  <a href="nat_1.html#NM1" title="NAT_1:NM.1">Nat</a>  st <font color="Olive" title="b1">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c2">fp</font> holds <br/><font color="Maroon" title="c2">fp</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <font color="Olive" title="b1">d</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <font color="Maroon">H<sub>1</sub></font>(<font color="Olive" title="b1">d</font>) ) )
 <span class="kw">from</span> <span class="lab"><a class="ref" href="finseq_1.html#S2" title="FINSEQ_1:sch.2">FINSEQ_1:sch 2</a>();<br/></span>
<a NAME="E3:22"/>
for <font color="Olive" title="b1">d</font> being  <a href="nat_1.html#NM1" title="NAT_1:NM.1">Nat</a>  st <font color="Olive" title="b1">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c2">fp</font> holds <br/><font color="Maroon" title="c2">fp</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <font color="Olive" title="b1">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="numbers.html#K5" title="NUMBERS:func.5">NAT</a> 
 
<div><a class="txt" onclick="hs2(this)" href="javascript:()" title="22_1"><span class="kw">proof </span></a><div class="add">

<span class="kw">let </span><font color="Maroon" title="c3">d</font> be   <a href="nat_1.html#NM1" title="NAT_1:NM.1">Nat</a>; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="Red">::  thesis: </font></span></a><span class="hide"> ( <font color="Maroon" title="c3">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c2">fp</font> implies <font color="Maroon" title="c2">fp</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <font color="Maroon" title="c3">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="numbers.html#K5" title="NUMBERS:func.5">NAT</a>  )</span><br/>

<span class="kw">assume </span><a NAME="E1:22_1"/>
<font color="Maroon" title="c3">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c2">fp</font>
 ; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="Red">::  thesis: </font></span></a><span class="hide"> <font color="Maroon" title="c2">fp</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <font color="Maroon" title="c3">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="numbers.html#K5" title="NUMBERS:func.5">NAT</a> </span><br/>

<a NAME="E2:22_1"/><span class="kw">then </span>
<font color="Maroon" title="c2">fp</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <font color="Maroon" title="c3">d</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <font color="Maroon" title="c3">d</font> <a href="pepin.html#K2" title="PEPIN:func.2">^2</a> 
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E2:22"><span class="lab"><font color="Green" title="E18">A1</font></span></a></span>;<br/>
<span class="kw">hence </span><a NAME="E3:22_1"/>
<font color="Maroon" title="c2">fp</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <font color="Maroon" title="c3">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="numbers.html#K5" title="NUMBERS:func.5">NAT</a> 
 ; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="Red">::  thesis: </font></span></a><span class="hide"> verum</span><br/>


</div><span class="kw">end;</span></div>
<span class="kw">then </span><span class="kw">reconsider </span><font color="Maroon" title="c3">fp</font> = <font color="Maroon" title="c2">fp</font> as    <a href="finseq_1.html#M2" title="FINSEQ_1:mode.2">FinSequence</a> of  <a href="numbers.html#K5" title="NUMBERS:func.5">NAT</a>  <span class="kw">by</span> <span class="lab"><a class="ref" href="finseq_2.html#T14" title="FINSEQ_2:th.14">FINSEQ_2:14</a></span>;<br/>
<a NAME="E5:22"/><span class="lab"><font color="Green" title="E19">A2</font></span>: 
<font color="Maroon" title="c1">p</font> <a href="xxreal_0.html#NR4" title="XXREAL_0:NR.4">&gt;</a> 1
 
<span class="kw">by</span> <span class="lab"><a class="ref" href="int_2.html#D5" title="INT_2:def.5">INT_2:def 5</a></span>;<br/>
<a NAME="E6:22"/><span class="kw">then </span><span class="lab"><font color="Green" title="E20">A3</font></span>: 
<font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1 <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <font color="Maroon" title="c1">p</font> <a href="xcmplx_0.html#K6" title="XCMPLX_0:func.6">-</a> 1
 
<span class="kw">by</span> <span class="lab"><a class="ref" href="xreal_1.html#T235" title="XREAL_1:th.235">XREAL_1:235</a></span>;<br/>
<span class="kw">assume </span><a NAME="E7:22"/>
<font color="Maroon" title="c1">p</font> <a href="xxreal_0.html#NR4" title="XXREAL_0:NR.4">&gt;</a> 2
 ; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="Red">::  thesis: </font></span></a><span class="hide">  ex <font color="Olive" title="b1">fp</font> being   <a href="finseq_1.html#M2" title="FINSEQ_1:mode.2">FinSequence</a> of  <a href="numbers.html#K5" title="NUMBERS:func.5">NAT</a>  st <br/>(  <a href="finseq_1.html#K3" title="FINSEQ_1:func.3">len</a> <font color="Olive" title="b1">fp</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <span class="p1">(<span class="default"><font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1</span>)</span> <a href="nat_d.html#K3" title="NAT_D:func.3">div</a> 2 &amp; ( for <font color="Olive" title="b2">d</font> being  <a href="nat_1.html#NM1" title="NAT_1:NM.1">Nat</a>  st <font color="Olive" title="b2">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Olive" title="b1">fp</font> holds <br/><span class="p1">(<span class="default"><font color="Olive" title="b1">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Olive" title="b2">d</font></span>)</span> <a href="int_2.html#K3" title="INT_2:func.3">gcd</a> <font color="Maroon" title="c1">p</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> 1 ) &amp; ( for <font color="Olive" title="b2">d</font> being  <a href="nat_1.html#NM1" title="NAT_1:NM.1">Nat</a>  st <font color="Olive" title="b2">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Olive" title="b1">fp</font> holds <br/><font color="Olive" title="b1">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Olive" title="b2">d</font> <a href="int_5.html#R1" title="INT_5:pred.1">is_quadratic_residue_mod</a> <font color="Maroon" title="c1">p</font> ) &amp; ( for <font color="Olive" title="b2">d</font>, <font color="Olive" title="b3">e</font> being  <a href="nat_1.html#NM1" title="NAT_1:NM.1">Nat</a>  st <font color="Olive" title="b2">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Olive" title="b1">fp</font> &amp; <font color="Olive" title="b3">e</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Olive" title="b1">fp</font> &amp; <font color="Olive" title="b2">d</font> <a href="hidden.html#NR2" title="HIDDEN:NR.2">&lt;&gt;</a> <font color="Olive" title="b3">e</font> holds <br/> not <font color="Olive" title="b1">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Olive" title="b2">d</font>,<font color="Olive" title="b1">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Olive" title="b3">e</font> <a href="int_1.html#R1" title="INT_1:pred.1">are_congruent_mod</a> <font color="Maroon" title="c1">p</font> ) )</span><br/>

<a NAME="E8:22"/><span class="kw">then </span>
not <font color="Maroon" title="c1">p</font> is  <a href="abian.html#V1" title="ABIAN:attr.1">even</a> 
 
<span class="kw">by</span> <span class="lab"><a class="ref" href="pepin.html#T17" title="PEPIN:th.17">PEPIN:17</a></span>;<br/>
<a NAME="E9:22"/><span class="kw">then </span>
<font color="Maroon" title="c1">p</font> <a href="xcmplx_0.html#K6" title="XCMPLX_0:func.6">-</a> 1 is  <a href="abian.html#V1" title="ABIAN:attr.1">even</a> 
 
<span class="kw">by</span> <span class="lab"><a class="ref" href="hilbert3.html#T2" title="HILBERT3:th.2">HILBERT3:2</a></span>;<br/>
<a NAME="E10:22"/><span class="kw">then </span>
2 <a href="nat_d.html#R1" title="NAT_D:pred.1">divides</a> <font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E6:22"><span class="lab"><font color="Green" title="E20">A3</font></span></a>, <a class="ref" href="pepin.html#T22" title="PEPIN:th.22">PEPIN:22</a></span>;<br/>
<a NAME="E11:22"/><span class="kw">then </span>
<span class="p1">(<span class="default"><font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1</span>)</span> <a href="nat_d.html#K4" title="NAT_D:func.4">mod</a> 2 <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a>  <a href="numbers.html#K6" title="NUMBERS:func.6">0</a> 
 
<span class="kw">by</span> <span class="lab"><a class="ref" href="pepin.html#T6" title="PEPIN:th.6">PEPIN:6</a></span>;<br/>
<a NAME="E12:22"/><span class="kw">then </span><span class="lab"><font color="Green" title="E21">A4</font></span>: 
<span class="p1">(<span class="default"><font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1</span>)</span> <a href="nat_d.html#K3" title="NAT_D:func.3">div</a> 2 <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <span class="p1">(<span class="default"><font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1</span>)</span> <a href="xcmplx_0.html#K7" title="XCMPLX_0:func.7">/</a> 2
 
<span class="kw">by</span> <span class="lab"><a class="ref" href="pepin.html#T68" title="PEPIN:th.68">PEPIN:68</a></span>;<br/>
<a NAME="E13:22"/><span class="lab"><font color="Green" title="E22">A5</font></span>: 
for <font color="Olive" title="b1">d</font>, <font color="Olive" title="b2">e</font> being  <a href="nat_1.html#NM1" title="NAT_1:NM.1">Nat</a>  st <font color="Olive" title="b1">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c3">fp</font> &amp; <font color="Olive" title="b2">e</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c3">fp</font> &amp; <font color="Olive" title="b1">d</font> <a href="hidden.html#NR2" title="HIDDEN:NR.2">&lt;&gt;</a> <font color="Olive" title="b2">e</font> holds <br/> not <font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Olive" title="b1">d</font>,<font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Olive" title="b2">e</font> <a href="int_1.html#R1" title="INT_1:pred.1">are_congruent_mod</a> <font color="Maroon" title="c1">p</font>
 
<div><a class="txt" onclick="hs2(this)" href="javascript:()" title="22_2"><span class="kw">proof </span></a><div class="add">

<a NAME="E1:22_2"/>
<font color="Maroon" title="c1">p</font> <a href="xcmplx_0.html#K6" title="XCMPLX_0:func.6">-</a> 1 <a href="xxreal_0.html#NR4" title="XXREAL_0:NR.4">&gt;</a>  <a href="numbers.html#K6" title="NUMBERS:func.6">0</a> 
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E5:22"><span class="lab"><font color="Green" title="E19">A2</font></span></a>, <a class="ref" href="xreal_1.html#T52" title="XREAL_1:th.52">XREAL_1:52</a></span>;<br/>
<a NAME="E2:22_2"/><span class="kw">then </span>
<span class="p1">(<span class="default"><font color="Maroon" title="c1">p</font> <a href="xcmplx_0.html#K6" title="XCMPLX_0:func.6">-</a> 1</span>)</span> <a href="xcmplx_0.html#K7" title="XCMPLX_0:func.7">/</a> 2 <a href="xxreal_0.html#NR3" title="XXREAL_0:NR.3">&lt;</a> <span class="p1">(<span class="default"><font color="Maroon" title="c1">p</font> <a href="xcmplx_0.html#K6" title="XCMPLX_0:func.6">-</a> 1</span>)</span> <a href="xcmplx_0.html#K7" title="XCMPLX_0:func.7">/</a> 1
 
<span class="kw">by</span> <span class="lab"><a class="ref" href="xreal_1.html#T78" title="XREAL_1:th.78">XREAL_1:78</a></span>;<br/>
<a NAME="E3:22_2"/><span class="kw">then </span>
<span class="p1">(<span class="default"><font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1</span>)</span> <a href="nat_d.html#K3" title="NAT_D:func.3">div</a> 2 <a href="xxreal_0.html#NR3" title="XXREAL_0:NR.3">&lt;</a> <font color="Maroon" title="c1">p</font>
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E6:22"><span class="lab"><font color="Green" title="E20">A3</font></span></a>, <a class="txt" href="#E12:22"><span class="lab"><font color="Green" title="E21">A4</font></span></a>, <a class="ref" href="xreal_1.html#T149" title="XREAL_1:th.149">XREAL_1:149</a></span>;<br/>
<a NAME="E4:22_2"/><span class="kw">then </span><span class="lab"><font color="Green" title="E23">A6</font></span>: 
<span class="p1">(<span class="default"><span class="p2">(<span class="default"><font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1</span>)</span> <a href="nat_d.html#K3" title="NAT_D:func.3">div</a> 2</span>)</span> <a href="xcmplx_0.html#K6" title="XCMPLX_0:func.6">-</a> 1 <a href="xxreal_0.html#NR3" title="XXREAL_0:NR.3">&lt;</a> <font color="Maroon" title="c1">p</font>
 
<span class="kw">by</span> <span class="lab"><a class="ref" href="xreal_1.html#T149" title="XREAL_1:th.149">XREAL_1:149</a></span>;<br/>
<span class="kw">let </span><font color="Maroon" title="c4">d</font>, <font color="Maroon" title="c5">e</font> be   <a href="nat_1.html#NM1" title="NAT_1:NM.1">Nat</a>; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="Red">::  thesis: </font></span></a><span class="hide"> ( <font color="Maroon" title="c4">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c3">fp</font> &amp; <font color="Maroon" title="c5">e</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c3">fp</font> &amp; <font color="Maroon" title="c4">d</font> <a href="hidden.html#NR2" title="HIDDEN:NR.2">&lt;&gt;</a> <font color="Maroon" title="c5">e</font> implies  not <font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Maroon" title="c4">d</font>,<font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Maroon" title="c5">e</font> <a href="int_1.html#R1" title="INT_1:pred.1">are_congruent_mod</a> <font color="Maroon" title="c1">p</font> )</span><br/>



<span class="kw">assume </span><span class="kw">that </span><br/><a NAME="E5:22_2"/><span class="lab"><font color="Green" title="E24">A7</font></span>: 
<font color="Maroon" title="c4">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c3">fp</font>
 <span class="kw">and </span><br/><a NAME="E6:22_2"/><span class="lab"><font color="Green" title="E25">A8</font></span>: 
<font color="Maroon" title="c5">e</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c3">fp</font>
 <span class="kw">and </span><br/><a NAME="E7:22_2"/><span class="lab"><font color="Green" title="E26">A9</font></span>: 
<font color="Maroon" title="c4">d</font> <a href="hidden.html#NR2" title="HIDDEN:NR.2">&lt;&gt;</a> <font color="Maroon" title="c5">e</font>
 ; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="Red">::  thesis: </font></span></a><span class="hide"> not <font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Maroon" title="c4">d</font>,<font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Maroon" title="c5">e</font> <a href="int_1.html#R1" title="INT_1:pred.1">are_congruent_mod</a> <font color="Maroon" title="c1">p</font></span><br/>

<a NAME="E8:22_2"/><span class="lab"><font color="Green" title="E27">A10</font></span>: 
<font color="Maroon" title="c5">e</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K2" title="FINSEQ_1:func.2">Seg</a> <span class="p1">(<span class="default"><span class="p2">(<span class="default"><font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1</span>)</span> <a href="nat_d.html#K3" title="NAT_D:func.3">div</a> 2</span>)</span>
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E2:22"><span class="lab"><font color="Green" title="E18">A1</font></span></a>, <a class="txt" href="#E6:22_2"><span class="lab"><font color="Green" title="E25">A8</font></span></a>, <a class="ref" href="finseq_1.html#D3" title="FINSEQ_1:def.3">FINSEQ_1:def 3</a></span>;<br/>
<a NAME="E9:22_2"/><span class="kw">then </span><span class="lab"><font color="Green" title="E28">A11</font></span>: 
<font color="Maroon" title="c5">e</font> <a href="xxreal_0.html#R1" title="XXREAL_0:pred.1">&lt;=</a> <span class="p1">(<span class="default"><font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1</span>)</span> <a href="nat_d.html#K3" title="NAT_D:func.3">div</a> 2
 
<span class="kw">by</span> <span class="lab"><a class="ref" href="finseq_1.html#T3" title="FINSEQ_1:th.3">FINSEQ_1:3</a></span>;<br/>
<a NAME="E10:22_2"/><span class="lab"><font color="Green" title="E29">A12</font></span>: 
<font color="Maroon" title="c4">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K2" title="FINSEQ_1:func.2">Seg</a> <span class="p1">(<span class="default"><span class="p2">(<span class="default"><font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1</span>)</span> <a href="nat_d.html#K3" title="NAT_D:func.3">div</a> 2</span>)</span>
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E2:22"><span class="lab"><font color="Green" title="E18">A1</font></span></a>, <a class="txt" href="#E5:22_2"><span class="lab"><font color="Green" title="E24">A7</font></span></a>, <a class="ref" href="finseq_1.html#D3" title="FINSEQ_1:def.3">FINSEQ_1:def 3</a></span>;<br/>
<a NAME="E11:22_2"/><span class="kw">then </span><span class="lab"><font color="Green" title="E30">A13</font></span>: 
<font color="Maroon" title="c4">d</font> <a href="xxreal_0.html#NR2" title="XXREAL_0:NR.2">&gt;=</a> 1
 
<span class="kw">by</span> <span class="lab"><a class="ref" href="finseq_1.html#T3" title="FINSEQ_1:th.3">FINSEQ_1:3</a></span>;<br/>
<a NAME="E12:22_2"/><span class="kw">then </span>
1 <a href="xcmplx_0.html#K6" title="XCMPLX_0:func.6">-</a> <span class="p1">(<span class="default"><span class="p2">(<span class="default"><font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1</span>)</span> <a href="nat_d.html#K3" title="NAT_D:func.3">div</a> 2</span>)</span> <a href="xxreal_0.html#R1" title="XXREAL_0:pred.1">&lt;=</a> <font color="Maroon" title="c4">d</font> <a href="xcmplx_0.html#K6" title="XCMPLX_0:func.6">-</a> <font color="Maroon" title="c5">e</font>
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E9:22_2"><span class="lab"><font color="Green" title="E28">A11</font></span></a>, <a class="ref" href="xreal_1.html#T15" title="XREAL_1:th.15">XREAL_1:15</a></span>;<br/>
<a NAME="E13:22_2"/><span class="kw">then </span><span class="lab"><font color="Green" title="E31">A14</font></span>: 
 <a href="xcmplx_0.html#K4" title="XCMPLX_0:func.4">-</a> <span class="p1">(<span class="default"><span class="p2">(<span class="default"><span class="p3">(<span class="default"><font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1</span>)</span> <a href="nat_d.html#K3" title="NAT_D:func.3">div</a> 2</span>)</span> <a href="xcmplx_0.html#K6" title="XCMPLX_0:func.6">-</a> 1</span>)</span> <a href="xxreal_0.html#R1" title="XXREAL_0:pred.1">&lt;=</a> <font color="Maroon" title="c4">d</font> <a href="xcmplx_0.html#K6" title="XCMPLX_0:func.6">-</a> <font color="Maroon" title="c5">e</font>
 
;<br/>
<a NAME="E14:22_2"/><span class="lab"><font color="Green" title="E32">A15</font></span>: 
<font color="Maroon" title="c4">d</font> <a href="xxreal_0.html#R1" title="XXREAL_0:pred.1">&lt;=</a> <span class="p1">(<span class="default"><font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1</span>)</span> <a href="nat_d.html#K3" title="NAT_D:func.3">div</a> 2
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E10:22_2"><span class="lab"><font color="Green" title="E29">A12</font></span></a>, <a class="ref" href="finseq_1.html#T3" title="FINSEQ_1:th.3">FINSEQ_1:3</a></span>;<br/>
<a NAME="E15:22_2"/><span class="kw">then </span>
<font color="Maroon" title="c4">d</font> <a href="xcmplx_0.html#K2" title="XCMPLX_0:func.2">+</a> <font color="Maroon" title="c5">e</font> <a href="xxreal_0.html#R1" title="XXREAL_0:pred.1">&lt;=</a> <span class="p1">(<span class="default"><span class="p2">(<span class="default"><font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1</span>)</span> <a href="nat_d.html#K3" title="NAT_D:func.3">div</a> 2</span>)</span> <a href="nat_1.html#K2" title="NAT_1:func.2">+</a> <span class="p1">(<span class="default"><span class="p2">(<span class="default"><font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1</span>)</span> <a href="nat_d.html#K3" title="NAT_D:func.3">div</a> 2</span>)</span>
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E9:22_2"><span class="lab"><font color="Green" title="E28">A11</font></span></a>, <a class="ref" href="xreal_1.html#T9" title="XREAL_1:th.9">XREAL_1:9</a></span>;<br/>
<a NAME="E16:22_2"/><span class="kw">then </span>
<font color="Maroon" title="c4">d</font> <a href="xcmplx_0.html#K2" title="XCMPLX_0:func.2">+</a> <font color="Maroon" title="c5">e</font> <a href="xxreal_0.html#NR3" title="XXREAL_0:NR.3">&lt;</a> <font color="Maroon" title="c1">p</font>
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E6:22"><span class="lab"><font color="Green" title="E20">A3</font></span></a>, <a class="txt" href="#E12:22"><span class="lab"><font color="Green" title="E21">A4</font></span></a>, <a class="ref" href="xreal_1.html#T149" title="XREAL_1:th.149">XREAL_1:149</a></span>;<br/>
<a NAME="E17:22_2"/><span class="kw">then </span>
<font color="Maroon" title="c4">d</font> <a href="xcmplx_0.html#K2" title="XCMPLX_0:func.2">+</a> <font color="Maroon" title="c5">e</font>,<font color="Maroon" title="c1">p</font> <a href="int_2.html#R1" title="INT_2:pred.1">are_relative_prime</a> 
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E11:22_2"><span class="lab"><font color="Green" title="E30">A13</font></span></a>, <a class="ref" href="euler_1.html#T3" title="EULER_1:th.3">EULER_1:3</a></span>;<br/>
<a NAME="E18:22_2"/><span class="kw">then </span><span class="lab"><font color="Green" title="E33">A16</font></span>: 
<span class="p1">(<span class="default"><font color="Maroon" title="c4">d</font> <a href="xcmplx_0.html#K2" title="XCMPLX_0:func.2">+</a> <font color="Maroon" title="c5">e</font></span>)</span> <a href="int_2.html#K3" title="INT_2:func.3">gcd</a> <font color="Maroon" title="c1">p</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> 1
 
<span class="kw">by</span> <span class="lab"><a class="ref" href="int_2.html#D4" title="INT_2:def.4">INT_2:def 4</a></span>;<br/>
<span class="kw">assume </span><a NAME="E19:22_2"/>
<font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Maroon" title="c4">d</font>,<font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Maroon" title="c5">e</font> <a href="int_1.html#R1" title="INT_1:pred.1">are_congruent_mod</a> <font color="Maroon" title="c1">p</font>
 ; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="Red">::  thesis: </font></span></a><span class="hide"> contradiction</span><br/>

<a NAME="E20:22_2"/><span class="kw">then </span>
<font color="Maroon" title="c1">p</font> <a href="int_1.html#R2" title="INT_1:pred.2">divides</a> <span class="p1">(<span class="default"><font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Maroon" title="c4">d</font></span>)</span> <a href="xcmplx_0.html#K6" title="XCMPLX_0:func.6">-</a> <span class="p1">(<span class="default"><font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Maroon" title="c5">e</font></span>)</span>
 
<span class="kw">by</span> <span class="lab"><a class="ref" href="int_2.html#T19" title="INT_2:th.19">INT_2:19</a></span>;<br/>
<a NAME="E21:22_2"/><span class="kw">then </span>
<font color="Maroon" title="c1">p</font> <a href="int_1.html#R2" title="INT_1:pred.2">divides</a> <span class="p1">(<span class="default"><font color="Maroon" title="c4">d</font> <a href="pepin.html#K2" title="PEPIN:func.2">^2</a> </span>)</span> <a href="xcmplx_0.html#K6" title="XCMPLX_0:func.6">-</a> <span class="p1">(<span class="default"><font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Maroon" title="c5">e</font></span>)</span>
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E2:22"><span class="lab"><font color="Green" title="E18">A1</font></span></a>, <a class="txt" href="#E5:22_2"><span class="lab"><font color="Green" title="E24">A7</font></span></a></span>;<br/>
<a NAME="E22:22_2"/><span class="kw">then </span>
<font color="Maroon" title="c1">p</font> <a href="int_1.html#R2" title="INT_1:pred.2">divides</a> <span class="p1">(<span class="default"><font color="Maroon" title="c4">d</font> <a href="pepin.html#K2" title="PEPIN:func.2">^2</a> </span>)</span> <a href="xcmplx_0.html#K6" title="XCMPLX_0:func.6">-</a> <span class="p1">(<span class="default"><font color="Maroon" title="c5">e</font> <a href="pepin.html#K2" title="PEPIN:func.2">^2</a> </span>)</span>
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E2:22"><span class="lab"><font color="Green" title="E18">A1</font></span></a>, <a class="txt" href="#E6:22_2"><span class="lab"><font color="Green" title="E25">A8</font></span></a></span>;<br/>
<a NAME="E23:22_2"/><span class="kw">then </span><span class="lab"><font color="Green" title="E34">A17</font></span>: 
<font color="Maroon" title="c1">p</font> <a href="int_1.html#R2" title="INT_1:pred.2">divides</a> <span class="p1">(<span class="default"><font color="Maroon" title="c4">d</font> <a href="xcmplx_0.html#K6" title="XCMPLX_0:func.6">-</a> <font color="Maroon" title="c5">e</font></span>)</span> <a href="xcmplx_0.html#K3" title="XCMPLX_0:func.3">*</a> <span class="p1">(<span class="default"><font color="Maroon" title="c4">d</font> <a href="xcmplx_0.html#K2" title="XCMPLX_0:func.2">+</a> <font color="Maroon" title="c5">e</font></span>)</span>
 
;<br/>
<a NAME="E24:22_2"/>
<font color="Maroon" title="c4">d</font> <a href="xcmplx_0.html#K6" title="XCMPLX_0:func.6">-</a> <font color="Maroon" title="c5">e</font> <a href="hidden.html#NR2" title="HIDDEN:NR.2">&lt;&gt;</a>  <a href="numbers.html#K6" title="NUMBERS:func.6">0</a> 
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E7:22_2"><span class="lab"><font color="Green" title="E26">A9</font></span></a></span>;<br/>
<a NAME="E25:22_2"/><span class="kw">then </span>
 <a href="int_2.html#K1" title="INT_2:func.1">abs</a> <font color="Maroon" title="c1">p</font> <a href="xxreal_0.html#R1" title="XXREAL_0:pred.1">&lt;=</a>  <a href="int_2.html#K1" title="INT_2:func.1">abs</a> <span class="p1">(<span class="default"><font color="Maroon" title="c4">d</font> <a href="xcmplx_0.html#K6" title="XCMPLX_0:func.6">-</a> <font color="Maroon" title="c5">e</font></span>)</span>
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E18:22_2"><span class="lab"><font color="Green" title="E33">A16</font></span></a>, <a class="txt" href="#E23:22_2"><span class="lab"><font color="Green" title="E34">A17</font></span></a>, <a class="ref" href="int_4.html#T6" title="INT_4:th.6">INT_4:6</a>, <a class="ref" href="wsierp_1.html#T36" title="WSIERP_1:th.36">WSIERP_1:36</a></span>;<br/>
<a NAME="E26:22_2"/><span class="kw">then </span><span class="lab"><font color="Green" title="E35">A18</font></span>: 
<font color="Maroon" title="c1">p</font> <a href="xxreal_0.html#R1" title="XXREAL_0:pred.1">&lt;=</a>  <a href="int_2.html#K1" title="INT_2:func.1">abs</a> <span class="p1">(<span class="default"><font color="Maroon" title="c4">d</font> <a href="xcmplx_0.html#K6" title="XCMPLX_0:func.6">-</a> <font color="Maroon" title="c5">e</font></span>)</span>
 
<span class="kw">by</span> <span class="lab"><a class="ref" href="absvalue.html#D1" title="ABSVALUE:def.1">ABSVALUE:def 1</a></span>;<br/>
<a NAME="E27:22_2"/>
<font color="Maroon" title="c5">e</font> <a href="xxreal_0.html#NR2" title="XXREAL_0:NR.2">&gt;=</a> 1
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E8:22_2"><span class="lab"><font color="Green" title="E27">A10</font></span></a>, <a class="ref" href="finseq_1.html#T3" title="FINSEQ_1:th.3">FINSEQ_1:3</a></span>;<br/>
<a NAME="E28:22_2"/><span class="kw">then </span>
<font color="Maroon" title="c4">d</font> <a href="xcmplx_0.html#K6" title="XCMPLX_0:func.6">-</a> <font color="Maroon" title="c5">e</font> <a href="xxreal_0.html#R1" title="XXREAL_0:pred.1">&lt;=</a> <span class="p1">(<span class="default"><span class="p2">(<span class="default"><font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1</span>)</span> <a href="nat_d.html#K3" title="NAT_D:func.3">div</a> 2</span>)</span> <a href="xcmplx_0.html#K6" title="XCMPLX_0:func.6">-</a> 1
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E14:22_2"><span class="lab"><font color="Green" title="E32">A15</font></span></a>, <a class="ref" href="xreal_1.html#T15" title="XREAL_1:th.15">XREAL_1:15</a></span>;<br/>
<a NAME="E29:22_2"/><span class="kw">then </span>
 <a href="int_2.html#K1" title="INT_2:func.1">abs</a> <span class="p1">(<span class="default"><font color="Maroon" title="c4">d</font> <a href="xcmplx_0.html#K6" title="XCMPLX_0:func.6">-</a> <font color="Maroon" title="c5">e</font></span>)</span> <a href="xxreal_0.html#R1" title="XXREAL_0:pred.1">&lt;=</a> <span class="p1">(<span class="default"><span class="p2">(<span class="default"><font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1</span>)</span> <a href="nat_d.html#K3" title="NAT_D:func.3">div</a> 2</span>)</span> <a href="xcmplx_0.html#K6" title="XCMPLX_0:func.6">-</a> 1
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E13:22_2"><span class="lab"><font color="Green" title="E31">A14</font></span></a>, <a class="ref" href="absvalue.html#T12" title="ABSVALUE:th.12">ABSVALUE:12</a></span>;<br/>
<span class="kw">hence </span><a NAME="E30:22_2"/>
contradiction
 <span class="kw">by</span> <span class="lab"><a class="txt" href="#E26:22_2"><span class="lab"><font color="Green" title="E35">A18</font></span></a>, <a class="txt" href="#E4:22_2"><span class="lab"><font color="Green" title="E23">A6</font></span></a>, <a class="ref" href="xxreal_0.html#T2" title="XXREAL_0:th.2">XXREAL_0:2</a></span>; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="Red">::  thesis: </font></span></a><span class="hide"> verum</span><br/>


</div><span class="kw">end;</span></div>
<a NAME="E14:22"/><span class="lab"><font color="Green" title="E23">A19</font></span>: 
for <font color="Olive" title="b1">d</font> being  <a href="nat_1.html#NM1" title="NAT_1:NM.1">Nat</a>  st <font color="Olive" title="b1">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c3">fp</font> holds <br/><font color="Olive" title="b1">d</font> <a href="int_2.html#K3" title="INT_2:func.3">gcd</a> <font color="Maroon" title="c1">p</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> 1
 
<div><a class="txt" onclick="hs2(this)" href="javascript:()" title="22_3"><span class="kw">proof </span></a><div class="add">

<span class="kw">let </span><font color="Maroon" title="c4">d</font> be   <a href="nat_1.html#NM1" title="NAT_1:NM.1">Nat</a>; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="Red">::  thesis: </font></span></a><span class="hide"> ( <font color="Maroon" title="c4">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c3">fp</font> implies <font color="Maroon" title="c4">d</font> <a href="int_2.html#K3" title="INT_2:func.3">gcd</a> <font color="Maroon" title="c1">p</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> 1 )</span><br/>

<a NAME="E1:22_3"/><span class="lab"><font color="Green" title="E24">A20</font></span>: 
1 <a href="nat_1.html#K4" title="NAT_1:func.4">*</a> <font color="Maroon" title="c4">d</font> <a href="xxreal_0.html#R1" title="XXREAL_0:pred.1">&lt;=</a> 2 <a href="nat_1.html#K4" title="NAT_1:func.4">*</a> <font color="Maroon" title="c4">d</font>
 
<span class="kw">by</span> <span class="lab"><a class="ref" href="xreal_1.html#T66" title="XREAL_1:th.66">XREAL_1:66</a></span>;<br/>
<span class="kw">assume </span><a NAME="E2:22_3"/>
<font color="Maroon" title="c4">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c3">fp</font>
 ; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="Red">::  thesis: </font></span></a><span class="hide"> <font color="Maroon" title="c4">d</font> <a href="int_2.html#K3" title="INT_2:func.3">gcd</a> <font color="Maroon" title="c1">p</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> 1</span><br/>

<a NAME="E3:22_3"/><span class="kw">then </span><span class="lab"><font color="Green" title="E25">A21</font></span>: 
<font color="Maroon" title="c4">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K2" title="FINSEQ_1:func.2">Seg</a> <span class="p1">(<span class="default"><span class="p2">(<span class="default"><font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1</span>)</span> <a href="nat_d.html#K3" title="NAT_D:func.3">div</a> 2</span>)</span>
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E2:22"><span class="lab"><font color="Green" title="E18">A1</font></span></a>, <a class="ref" href="finseq_1.html#D3" title="FINSEQ_1:def.3">FINSEQ_1:def 3</a></span>;<br/>
<a NAME="E4:22_3"/><span class="kw">then </span>
<font color="Maroon" title="c4">d</font> <a href="xxreal_0.html#R1" title="XXREAL_0:pred.1">&lt;=</a> <span class="p1">(<span class="default"><font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1</span>)</span> <a href="nat_d.html#K3" title="NAT_D:func.3">div</a> 2
 
<span class="kw">by</span> <span class="lab"><a class="ref" href="finseq_1.html#T3" title="FINSEQ_1:th.3">FINSEQ_1:3</a></span>;<br/>
<a NAME="E5:22_3"/><span class="kw">then </span>
2 <a href="nat_1.html#K4" title="NAT_1:func.4">*</a> <font color="Maroon" title="c4">d</font> <a href="xxreal_0.html#R1" title="XXREAL_0:pred.1">&lt;=</a> <span class="p1">(<span class="default"><span class="p2">(<span class="default"><font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1</span>)</span> <a href="xcmplx_0.html#K7" title="XCMPLX_0:func.7">/</a> 2</span>)</span> <a href="xcmplx_0.html#K3" title="XCMPLX_0:func.3">*</a> 2
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E12:22"><span class="lab"><font color="Green" title="E21">A4</font></span></a>, <a class="ref" href="xreal_1.html#T66" title="XREAL_1:th.66">XREAL_1:66</a></span>;<br/>
<a NAME="E6:22_3"/><span class="kw">then </span>
<font color="Maroon" title="c4">d</font> <a href="xxreal_0.html#R1" title="XXREAL_0:pred.1">&lt;=</a> <font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E1:22_3"><span class="lab"><font color="Green" title="E24">A20</font></span></a>, <a class="ref" href="xxreal_0.html#T2" title="XXREAL_0:th.2">XXREAL_0:2</a></span>;<br/>
<a NAME="E7:22_3"/><span class="kw">then </span><span class="lab"><font color="Green" title="E26">A22</font></span>: 
<font color="Maroon" title="c4">d</font> <a href="xxreal_0.html#NR3" title="XXREAL_0:NR.3">&lt;</a> <font color="Maroon" title="c1">p</font>
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E6:22"><span class="lab"><font color="Green" title="E20">A3</font></span></a>, <a class="ref" href="xreal_1.html#T149" title="XREAL_1:th.149">XREAL_1:149</a></span>;<br/>
<a NAME="E8:22_3"/>
<font color="Maroon" title="c4">d</font> <a href="xxreal_0.html#NR2" title="XXREAL_0:NR.2">&gt;=</a> 1
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E3:22_3"><span class="lab"><font color="Green" title="E25">A21</font></span></a>, <a class="ref" href="finseq_1.html#T3" title="FINSEQ_1:th.3">FINSEQ_1:3</a></span>;<br/>
<a NAME="E9:22_3"/><span class="kw">then </span>
<font color="Maroon" title="c4">d</font>,<font color="Maroon" title="c1">p</font> <a href="int_2.html#R1" title="INT_2:pred.1">are_relative_prime</a> 
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E7:22_3"><span class="lab"><font color="Green" title="E26">A22</font></span></a>, <a class="ref" href="euler_1.html#T3" title="EULER_1:th.3">EULER_1:3</a></span>;<br/>
<span class="kw">hence </span><a NAME="E10:22_3"/>
<font color="Maroon" title="c4">d</font> <a href="int_2.html#K3" title="INT_2:func.3">gcd</a> <font color="Maroon" title="c1">p</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> 1
 <span class="kw">by</span> <span class="lab"><a class="ref" href="int_2.html#D4" title="INT_2:def.4">INT_2:def 4</a></span>; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="Red">::  thesis: </font></span></a><span class="hide"> verum</span><br/>


</div><span class="kw">end;</span></div>
<a NAME="E15:22"/><span class="lab"><font color="Green" title="E24">A23</font></span>: 
for <font color="Olive" title="b1">d</font> being  <a href="nat_1.html#NM1" title="NAT_1:NM.1">Nat</a>  st <font color="Olive" title="b1">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c3">fp</font> holds <br/><span class="p1">(<span class="default"><font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Olive" title="b1">d</font></span>)</span> <a href="int_2.html#K3" title="INT_2:func.3">gcd</a> <font color="Maroon" title="c1">p</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> 1
 
<div><a class="txt" onclick="hs2(this)" href="javascript:()" title="22_4"><span class="kw">proof </span></a><div class="add">

<span class="kw">let </span><font color="Maroon" title="c4">d</font> be   <a href="nat_1.html#NM1" title="NAT_1:NM.1">Nat</a>; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="Red">::  thesis: </font></span></a><span class="hide"> ( <font color="Maroon" title="c4">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c3">fp</font> implies <span class="p1">(<span class="default"><font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Maroon" title="c4">d</font></span>)</span> <a href="int_2.html#K3" title="INT_2:func.3">gcd</a> <font color="Maroon" title="c1">p</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> 1 )</span><br/>

<span class="kw">assume </span><a NAME="E1:22_4"/><span class="lab"><font color="Green" title="E25">A24</font></span>: 
<font color="Maroon" title="c4">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c3">fp</font>
 ; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="Red">::  thesis: </font></span></a><span class="hide"> <span class="p1">(<span class="default"><font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Maroon" title="c4">d</font></span>)</span> <a href="int_2.html#K3" title="INT_2:func.3">gcd</a> <font color="Maroon" title="c1">p</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> 1</span><br/>

<a NAME="E2:22_4"/><span class="kw">then </span>
<font color="Maroon" title="c4">d</font> <a href="int_2.html#K3" title="INT_2:func.3">gcd</a> <font color="Maroon" title="c1">p</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> 1
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E14:22"><span class="lab"><font color="Green" title="E23">A19</font></span></a></span>;<br/>
<a NAME="E3:22_4"/><span class="kw">then </span>
<span class="p1">(<span class="default"><font color="Maroon" title="c4">d</font> <a href="pepin.html#K2" title="PEPIN:func.2">^2</a> </span>)</span> <a href="int_2.html#K3" title="INT_2:func.3">gcd</a> <font color="Maroon" title="c1">p</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> 1
 
<span class="kw">by</span> <span class="lab"><a class="ref" href="wsierp_1.html#T12" title="WSIERP_1:th.12">WSIERP_1:12</a></span>;<br/>
<span class="kw">hence </span><a NAME="E4:22_4"/>
<span class="p1">(<span class="default"><font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Maroon" title="c4">d</font></span>)</span> <a href="int_2.html#K3" title="INT_2:func.3">gcd</a> <font color="Maroon" title="c1">p</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> 1
 <span class="kw">by</span> <span class="lab"><a class="txt" href="#E2:22"><span class="lab"><font color="Green" title="E18">A1</font></span></a>, <a class="txt" href="#E1:22_4"><span class="lab"><font color="Green" title="E25">A24</font></span></a></span>; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="Red">::  thesis: </font></span></a><span class="hide"> verum</span><br/>


</div><span class="kw">end;</span></div>
<span class="kw">take </span>
<font color="Maroon" title="c3">fp</font>
; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="Red">::  thesis: </font></span></a><span class="hide"> (  <a href="finseq_1.html#K3" title="FINSEQ_1:func.3">len</a> <font color="Maroon" title="c3">fp</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <span class="p1">(<span class="default"><font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1</span>)</span> <a href="nat_d.html#K3" title="NAT_D:func.3">div</a> 2 &amp; ( for <font color="Olive" title="b1">d</font> being  <a href="nat_1.html#NM1" title="NAT_1:NM.1">Nat</a>  st <font color="Olive" title="b1">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c3">fp</font> holds <br/><span class="p1">(<span class="default"><font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Olive" title="b1">d</font></span>)</span> <a href="int_2.html#K3" title="INT_2:func.3">gcd</a> <font color="Maroon" title="c1">p</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> 1 ) &amp; ( for <font color="Olive" title="b1">d</font> being  <a href="nat_1.html#NM1" title="NAT_1:NM.1">Nat</a>  st <font color="Olive" title="b1">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c3">fp</font> holds <br/><font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Olive" title="b1">d</font> <a href="int_5.html#R1" title="INT_5:pred.1">is_quadratic_residue_mod</a> <font color="Maroon" title="c1">p</font> ) &amp; ( for <font color="Olive" title="b1">d</font>, <font color="Olive" title="b2">e</font> being  <a href="nat_1.html#NM1" title="NAT_1:NM.1">Nat</a>  st <font color="Olive" title="b1">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c3">fp</font> &amp; <font color="Olive" title="b2">e</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c3">fp</font> &amp; <font color="Olive" title="b1">d</font> <a href="hidden.html#NR2" title="HIDDEN:NR.2">&lt;&gt;</a> <font color="Olive" title="b2">e</font> holds <br/> not <font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Olive" title="b1">d</font>,<font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Olive" title="b2">e</font> <a href="int_1.html#R1" title="INT_1:pred.1">are_congruent_mod</a> <font color="Maroon" title="c1">p</font> ) )</span><br/>

<a NAME="E16:22"/>
for <font color="Olive" title="b1">d</font> being  <a href="nat_1.html#NM1" title="NAT_1:NM.1">Nat</a>  st <font color="Olive" title="b1">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c3">fp</font> holds <br/><font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Olive" title="b1">d</font> <a href="int_5.html#R1" title="INT_5:pred.1">is_quadratic_residue_mod</a> <font color="Maroon" title="c1">p</font>
 
<div><a class="txt" onclick="hs2(this)" href="javascript:()" title="22_5"><span class="kw">proof </span></a><div class="add">

<span class="kw">let </span><font color="Maroon" title="c4">d</font> be   <a href="nat_1.html#NM1" title="NAT_1:NM.1">Nat</a>; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="Red">::  thesis: </font></span></a><span class="hide"> ( <font color="Maroon" title="c4">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c3">fp</font> implies <font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Maroon" title="c4">d</font> <a href="int_5.html#R1" title="INT_5:pred.1">is_quadratic_residue_mod</a> <font color="Maroon" title="c1">p</font> )</span><br/>

<span class="kw">assume </span><a NAME="E1:22_5"/><span class="lab"><font color="Green" title="E25">A25</font></span>: 
<font color="Maroon" title="c4">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c3">fp</font>
 ; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="Red">::  thesis: </font></span></a><span class="hide"> <font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Maroon" title="c4">d</font> <a href="int_5.html#R1" title="INT_5:pred.1">is_quadratic_residue_mod</a> <font color="Maroon" title="c1">p</font></span><br/>

<a NAME="E2:22_5"/>
<font color="Maroon" title="c4">d</font> <a href="pepin.html#K2" title="PEPIN:func.2">^2</a>  <a href="int_5.html#R1" title="INT_5:pred.1">is_quadratic_residue_mod</a> <font color="Maroon" title="c1">p</font>
 
<span class="kw">by</span> <span class="lab"><a class="ref" href="int_5.html#T9" target="_self" title="INT_5:th.9">Th9</a></span>;<br/>
<span class="kw">hence </span><a NAME="E3:22_5"/>
<font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Maroon" title="c4">d</font> <a href="int_5.html#R1" title="INT_5:pred.1">is_quadratic_residue_mod</a> <font color="Maroon" title="c1">p</font>
 <span class="kw">by</span> <span class="lab"><a class="txt" href="#E2:22"><span class="lab"><font color="Green" title="E18">A1</font></span></a>, <a class="txt" href="#E1:22_5"><span class="lab"><font color="Green" title="E25">A25</font></span></a></span>; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="Red">::  thesis: </font></span></a><span class="hide"> verum</span><br/>


</div><span class="kw">end;</span></div>
<span class="kw">hence </span><a NAME="E17:22"/>
(  <a href="finseq_1.html#K3" title="FINSEQ_1:func.3">len</a> <font color="Maroon" title="c3">fp</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <span class="p1">(<span class="default"><font color="Maroon" title="c1">p</font> <a href="nat_d.html#K7" title="NAT_D:func.7">-'</a> 1</span>)</span> <a href="nat_d.html#K3" title="NAT_D:func.3">div</a> 2 &amp; ( for <font color="Olive" title="b1">d</font> being  <a href="nat_1.html#NM1" title="NAT_1:NM.1">Nat</a>  st <font color="Olive" title="b1">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c3">fp</font> holds <br/><span class="p1">(<span class="default"><font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Olive" title="b1">d</font></span>)</span> <a href="int_2.html#K3" title="INT_2:func.3">gcd</a> <font color="Maroon" title="c1">p</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> 1 ) &amp; ( for <font color="Olive" title="b1">d</font> being  <a href="nat_1.html#NM1" title="NAT_1:NM.1">Nat</a>  st <font color="Olive" title="b1">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c3">fp</font> holds <br/><font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Olive" title="b1">d</font> <a href="int_5.html#R1" title="INT_5:pred.1">is_quadratic_residue_mod</a> <font color="Maroon" title="c1">p</font> ) &amp; ( for <font color="Olive" title="b1">d</font>, <font color="Olive" title="b2">e</font> being  <a href="nat_1.html#NM1" title="NAT_1:NM.1">Nat</a>  st <font color="Olive" title="b1">d</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c3">fp</font> &amp; <font color="Olive" title="b2">e</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="finseq_1.html#K4" title="FINSEQ_1:func.4">dom</a> <font color="Maroon" title="c3">fp</font> &amp; <font color="Olive" title="b1">d</font> <a href="hidden.html#NR2" title="HIDDEN:NR.2">&lt;&gt;</a> <font color="Olive" title="b2">e</font> holds <br/> not <font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Olive" title="b1">d</font>,<font color="Maroon" title="c3">fp</font> <a href="recdef_1.html#K1" title="RECDEF_1:func.1">.</a> <font color="Olive" title="b2">e</font> <a href="int_1.html#R1" title="INT_1:pred.1">are_congruent_mod</a> <font color="Maroon" title="c1">p</font> ) )
 <span class="kw">by</span> <span class="lab"><a class="txt" href="#E2:22"><span class="lab"><font color="Green" title="E18">A1</font></span></a>, <a class="txt" href="#E15:22"><span class="lab"><font color="Green" title="E24">A23</font></span></a>, <a class="txt" href="#E13:22"><span class="lab"><font color="Green" title="E22">A5</font></span></a></span>; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="Red">::  thesis: </font></span></a><span class="hide"> verum</span><br/>


</div>
