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

<span class="kw">let </span><font color="Maroon" title="c1">p</font> be   <a href="ordinal1.html#V7" title="ORDINAL1:attr.7">natural</a>   <a href="xxreal_0.html#V2" title="XXREAL_0:attr.2">positive</a>   <a href="ordinal1.html#NM2" title="ORDINAL1:NM.2">number</a> ; <a class="txt" onmouseover="tooltip.show('hs',this)" onmouseout="tooltip.hide()" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="firebrick">::  thesis: </font></span></a><span class="hide">  for <font color="Olive" title="b1">a</font> being   <a href="int_1.html#V1" title="INT_1:attr.1">integer</a>   <a href="ordinal1.html#NM2" title="ORDINAL1:NM.2">number</a>  holds <br/> ( <font color="Olive" title="b1">a</font> <a href="int_5.html#R1" title="INT_5:pred.1">is_quadratic_residue_mod</a> <font color="Maroon" title="c1">p</font> iff  ex <font color="Olive" title="b2">x</font> being   <a href="int_1.html#V1" title="INT_1:attr.1">integer</a>   <a href="ordinal1.html#NM2" title="ORDINAL1:NM.2">number</a>  st <font color="Olive" title="b2">x</font> <a href="newton.html#K1" title="NEWTON:func.1">|^</a> 2,<font color="Olive" title="b1">a</font> <a href="int_1.html#R2" title="INT_1:pred.2">are_congruent_mod</a> <font color="Maroon" title="c1">p</font> )</span><br/><span class="kw">let </span><font color="Maroon" title="c2">a</font> be   <a href="int_1.html#V1" title="INT_1:attr.1">integer</a>   <a href="ordinal1.html#NM2" title="ORDINAL1:NM.2">number</a> ; <a class="txt" onmouseover="tooltip.show('hs',this)" onmouseout="tooltip.hide()" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="firebrick">::  thesis: </font></span></a><span class="hide"> ( <font color="Maroon" title="c2">a</font> <a href="int_5.html#R1" title="INT_5:pred.1">is_quadratic_residue_mod</a> <font color="Maroon" title="c1">p</font> iff  ex <font color="Olive" title="b1">x</font> being   <a href="int_1.html#V1" title="INT_1:attr.1">integer</a>   <a href="ordinal1.html#NM2" title="ORDINAL1:NM.2">number</a>  st <font color="Olive" title="b1">x</font> <a href="newton.html#K1" title="NEWTON:func.1">|^</a> 2,<font color="Maroon" title="c2">a</font> <a href="int_1.html#R2" title="INT_1:pred.2">are_congruent_mod</a> <font color="Maroon" title="c1">p</font> )</span><br/>



<span class="kw">thus </span><a NAME="E1:56"/>
( <font color="Maroon" title="c2">a</font> <a href="int_5.html#R1" title="INT_5:pred.1">is_quadratic_residue_mod</a> <font color="Maroon" title="c1">p</font> implies  ex <font color="Olive" title="b1">x</font> being   <a href="int_1.html#V1" title="INT_1:attr.1">integer</a>   <a href="ordinal1.html#NM2" title="ORDINAL1:NM.2">number</a>  st <font color="Olive" title="b1">x</font> <a href="newton.html#K1" title="NEWTON:func.1">|^</a> 2,<font color="Maroon" title="c2">a</font> <a href="int_1.html#R2" title="INT_1:pred.2">are_congruent_mod</a> <font color="Maroon" title="c1">p</font> )
  <a class="txt" onmouseover="tooltip.show('hs',this)" onmouseout="tooltip.hide()" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="firebrick">::  thesis: </font></span></a><span class="hide"> (  ex <font color="Olive" title="b1">x</font> being   <a href="int_1.html#V1" title="INT_1:attr.1">integer</a>   <a href="ordinal1.html#NM2" title="ORDINAL1:NM.2">number</a>  st <font color="Olive" title="b1">x</font> <a href="newton.html#K1" title="NEWTON:func.1">|^</a> 2,<font color="Maroon" title="c2">a</font> <a href="int_1.html#R2" title="INT_1:pred.2">are_congruent_mod</a> <font color="Maroon" title="c1">p</font> implies <font color="Maroon" title="c2">a</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><div><a class="txt" onmouseover="tooltip.show('hs2',this)" onmouseout="tooltip.hide()" onclick="hs2(this)" href="javascript:()" title="56_1"><span class="kw">proof </span></a><div class="add">

<span class="kw">assume </span><a NAME="E1:56_1"/>
<font color="Maroon" title="c2">a</font> <a href="int_5.html#R1" title="INT_5:pred.1">is_quadratic_residue_mod</a> <font color="Maroon" title="c1">p</font>
 ; <a class="txt" onmouseover="tooltip.show('hs',this)" onmouseout="tooltip.hide()" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="firebrick">::  thesis: </font></span></a><span class="hide">  ex <font color="Olive" title="b1">x</font> being   <a href="int_1.html#V1" title="INT_1:attr.1">integer</a>   <a href="ordinal1.html#NM2" title="ORDINAL1:NM.2">number</a>  st <font color="Olive" title="b1">x</font> <a href="newton.html#K1" title="NEWTON:func.1">|^</a> 2,<font color="Maroon" title="c2">a</font> <a href="int_1.html#R2" title="INT_1:pred.2">are_congruent_mod</a> <font color="Maroon" title="c1">p</font></span><br/>

<span class="kw">then </span><span class="kw">consider </span><font color="Maroon" title="c3">x</font> being   <a href="int_1.html#NM1" title="INT_1:NM.1">Integer</a><span class="kw"> such that </span><br/><a NAME="E3:56_1"/><span class="lab"><font color="Green" title="E26">A1</font></span>: 
<span class="p1">(<span class="default"><span class="p2">(<span class="default"><font color="Maroon" title="c3">x</font> <a href="pepin.html#K1" title="PEPIN:func.1">^2</a></span>)</span> <a href="xcmplx_0.html#K6" title="XCMPLX_0:func.6">-</a> <font color="Maroon" title="c2">a</font></span>)</span> <a href="int_1.html#K5" title="INT_1:func.5">mod</a> <font color="Maroon" title="c1">p</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a>  <a href="numbers.html#K5" title="NUMBERS:func.5">0</a> 
 <span class="kw">by</span> <span class="lab"><a class="ref" href="int_5.html#D2" onmouseover="rs('int_5/D2')" onmouseout="rh()">INT_5:def 2</a></span>;<br/>
<a NAME="E4:56_1"/><span class="lab"><font color="Green" title="E27">A2</font></span>: 
<span class="p1">(<span class="default"><font color="Maroon" title="c3">x</font> <a href="pepin.html#K1" title="PEPIN:func.1">^2</a></span>)</span> <a href="xcmplx_0.html#K6" title="XCMPLX_0:func.6">-</a> <font color="Maroon" title="c2">a</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <span class="p1">(<span class="default"><span class="p2">(<span class="default"><span class="p3">(<span class="default"><span class="p4">(<span class="default"><font color="Maroon" title="c3">x</font> <a href="pepin.html#K1" title="PEPIN:func.1">^2</a></span>)</span> <a href="xcmplx_0.html#K6" title="XCMPLX_0:func.6">-</a> <font color="Maroon" title="c2">a</font></span>)</span> <a href="int_1.html#K4" title="INT_1:func.4">div</a> <font color="Maroon" title="c1">p</font></span>)</span> <a href="xcmplx_0.html#K3" title="XCMPLX_0:func.3">*</a> <font color="Maroon" title="c1">p</font></span>)</span> <a href="xcmplx_0.html#K2" title="XCMPLX_0:func.2">+</a> <a href="numbers.html#K5" title="NUMBERS:func.5">0</a>
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E3:56_1"><span class="lab"><font color="Green" title="E26">A1</font></span></a>, <a class="ref" href="int_1.html#T59" onmouseover="rs('int_1/T59')" onmouseout="rh()">INT_1:59</a></span>;<br/>
<span class="kw">reconsider </span><font color="Maroon" title="c4">xx</font> = <font color="Maroon" title="c3">x</font> as   <a href="int_1.html#V1" title="INT_1:attr.1">integer</a>   <a href="ordinal1.html#NM2" title="ORDINAL1:NM.2">number</a>  <span class="kw">by</span> <span class="lab"><a class="ref" href="tarski.html#T1" onmouseover="rs('tarski/T1')" onmouseout="rh()">TARSKI:1</a></span>;<br/>
<span class="kw">take </span>
<font color="Maroon" title="c4">xx</font>
; <a class="txt" onmouseover="tooltip.show('hs',this)" onmouseout="tooltip.hide()" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="firebrick">::  thesis: </font></span></a><span class="hide"> <font color="Maroon" title="c4">xx</font> <a href="newton.html#K1" title="NEWTON:func.1">|^</a> 2,<font color="Maroon" title="c2">a</font> <a href="int_1.html#R2" title="INT_1:pred.2">are_congruent_mod</a> <font color="Maroon" title="c1">p</font></span><br/>

<a NAME="E6:56_1"/>
<font color="Maroon" title="c4">xx</font> <a href="pepin.html#K1" title="PEPIN:func.1">^2</a>  <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <font color="Maroon" title="c4">xx</font> <a href="newton.html#K1" title="NEWTON:func.1">|^</a> 2
 
<span class="kw">by</span> <span class="lab"><a class="ref" href="newton.html#T81" onmouseover="rs('newton/T81')" onmouseout="rh()">NEWTON:81</a></span>;<br/>
<span class="kw">hence </span><a NAME="E7:56_1"/>
<font color="Maroon" title="c4">xx</font> <a href="newton.html#K1" title="NEWTON:func.1">|^</a> 2,<font color="Maroon" title="c2">a</font> <a href="int_1.html#R2" title="INT_1:pred.2">are_congruent_mod</a> <font color="Maroon" title="c1">p</font>
 <span class="kw">by</span> <span class="lab"><a class="txt" href="#E4:56_1"><span class="lab"><font color="Green" title="E27">A2</font></span></a></span>; <a class="txt" onmouseover="tooltip.show('hs',this)" onmouseout="tooltip.hide()" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="firebrick">::  thesis: </font></span></a><span class="hide"> verum</span><br/>


</div><span class="kw">end;</span></div>

<span class="kw">assume </span><a NAME="E2:56"/>
 ex <font color="Olive" title="b1">x</font> being   <a href="int_1.html#V1" title="INT_1:attr.1">integer</a>   <a href="ordinal1.html#NM2" title="ORDINAL1:NM.2">number</a>  st <font color="Olive" title="b1">x</font> <a href="newton.html#K1" title="NEWTON:func.1">|^</a> 2,<font color="Maroon" title="c2">a</font> <a href="int_1.html#R2" title="INT_1:pred.2">are_congruent_mod</a> <font color="Maroon" title="c1">p</font>
 ; <a class="txt" onmouseover="tooltip.show('hs',this)" onmouseout="tooltip.hide()" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="firebrick">::  thesis: </font></span></a><span class="hide"> <font color="Maroon" title="c2">a</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">then </span><span class="kw">consider </span><font color="Maroon" title="c3">x</font> being   <a href="int_1.html#V1" title="INT_1:attr.1">integer</a>   <a href="ordinal1.html#NM2" title="ORDINAL1:NM.2">number</a> <span class="kw"> such that </span><br/><a NAME="E4:56"/><span class="lab"><font color="Green" title="E26">A3</font></span>: 
<font color="Maroon" title="c3">x</font> <a href="newton.html#K1" title="NEWTON:func.1">|^</a> 2,<font color="Maroon" title="c2">a</font> <a href="int_1.html#R2" title="INT_1:pred.2">are_congruent_mod</a> <font color="Maroon" title="c1">p</font>
 ;<br/>
<font color="Maroon" title="c3">x</font> <a href="pepin.html#K1" title="PEPIN:func.1">^2</a>  = 
<span class="p1">(<span class="default"><font color="Maroon" title="c3">x</font> <a href="newton.html#K1" title="NEWTON:func.1">|^</a> 1</span>)</span> <a href="xcmplx_0.html#K3" title="XCMPLX_0:func.3">*</a> <font color="Maroon" title="c3">x</font>

<br/>.= 
<font color="Maroon" title="c3">x</font> <a href="newton.html#K1" title="NEWTON:func.1">|^</a> <span class="p1">(<span class="default">1 <a href="xcmplx_0.html#K2" title="XCMPLX_0:func.2">+</a> 1</span>)</span>
<span class="kw">by</span> <span class="lab"><a class="ref" href="newton.html#T6" onmouseover="rs('newton/T6')" onmouseout="rh()">NEWTON:6</a></span>
;<br/>
<a NAME="E6:56"/><span class="kw">then </span>
<span class="p1">(<span class="default"><span class="p2">(<span class="default"><font color="Maroon" title="c3">x</font> <a href="pepin.html#K1" title="PEPIN:func.1">^2</a></span>)</span> <a href="xcmplx_0.html#K6" title="XCMPLX_0:func.6">-</a> <font color="Maroon" title="c2">a</font></span>)</span> <a href="int_1.html#K5" title="INT_1:func.5">mod</a> <font color="Maroon" title="c1">p</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a>  <a href="numbers.html#K5" title="NUMBERS:func.5">0</a> 
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E4:56"><span class="lab"><font color="Green" title="E26">A3</font></span></a>, <a class="ref" href="int_1.html#T62" onmouseover="rs('int_1/T62')" onmouseout="rh()">INT_1:62</a></span>;<br/>
<span class="kw">hence </span><a NAME="E7:56"/>
<font color="Maroon" title="c2">a</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="ref" href="int_5.html#D2" onmouseover="rs('int_5/D2')" onmouseout="rh()">INT_5:def 2</a></span>; <a class="txt" onmouseover="tooltip.show('hs',this)" onmouseout="tooltip.hide()" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="firebrick">::  thesis: </font></span></a><span class="hide"> verum</span><br/>


</div>
