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

<span class="kw">let </span><font color="Maroon" title="c1">O</font> be   non  <a href="struct_0.html#V2" title="STRUCT_0:attr.2">empty</a>   <a href="waybel_0.html#V16" title="WAYBEL_0:attr.16">connected</a>  <a href="orders_2.html#NM1" title="ORDERS_2:NM.1">Poset</a>; <a class="txt" 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   non  <a href="xboole_0.html#V1" title="XBOOLE_0:attr.1">empty</a>   <a href="finset_1.html#V1" title="FINSET_1:attr.1">finite</a>   <a href="card_1.html#NK1" title="CARD_1:NK.1">0</a>  <a href="exchsort.html#V2" title="EXCHSORT:attr.2">-based</a>  <a href="exchsort.html#NM3" title="EXCHSORT:NM.3">array</a> of <font color="Maroon" title="c1">O</font>  ex <font color="Olive" title="b2">C</font> being   <a href="card_1.html#NK1" title="CARD_1:NK.1">0</a>  <a href="exchsort.html#V2" title="EXCHSORT:attr.2">-based</a>   <a href="exchsort.html#M2" title="EXCHSORT:mode.2">arr_computation</a> of <font color="Olive" title="b1">A</font> st <font color="Olive" title="b2">C</font> is  <a href="exchsort.html#V6" title="EXCHSORT:attr.6">complete</a> </span><br/><span class="kw">let </span><font color="Maroon" title="c2">A</font> be   non  <a href="xboole_0.html#V1" title="XBOOLE_0:attr.1">empty</a>   <a href="finset_1.html#V1" title="FINSET_1:attr.1">finite</a>   <a href="card_1.html#NK1" title="CARD_1:NK.1">0</a>  <a href="exchsort.html#V2" title="EXCHSORT:attr.2">-based</a>  <a href="exchsort.html#NM3" title="EXCHSORT:NM.3">array</a> of <font color="Maroon" title="c1">O</font>; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="firebrick">::  thesis: </font></span></a><span class="hide">  ex <font color="Olive" title="b1">C</font> being   <a href="card_1.html#NK1" title="CARD_1:NK.1">0</a>  <a href="exchsort.html#V2" title="EXCHSORT:attr.2">-based</a>   <a href="exchsort.html#M2" title="EXCHSORT:mode.2">arr_computation</a> of <font color="Maroon" title="c2">A</font> st <font color="Olive" title="b1">C</font> is  <a href="exchsort.html#V6" title="EXCHSORT:attr.6">complete</a> </span><br/>



<span class="kw">reconsider </span><font color="Maroon" title="c3">rA</font> =  <a href="relat_1.html#K2" title="RELAT_1:func.2">rng</a> <font color="Maroon" title="c2">A</font> as   non  <a href="xboole_0.html#V1" title="XBOOLE_0:attr.1">empty</a>  <a href="struct_0.html#NM2" title="STRUCT_0:NM.2">Subset</a> of <font color="Maroon" title="c1">O</font> <span class="kw">by</span> <span class="lab"><a class="ref" href="relat_1.html#D19" title="RELAT_1:def.19">RELAT_1:def 19</a></span>;<br/>
<span class="kw">reconsider </span><font color="Maroon" title="c4">a</font> =  <a href="afinsq_1.html#K2" title="AFINSQ_1:func.2">dom</a> <font color="Maroon" title="c2">A</font> as   <a href="ordinal1.html#NM2" title="ORDINAL1:NM.2">Ordinal</a> ;<br/>
<span class="kw">set </span><font color="Maroon" title="c5">X</font> =  <a href="funct_2.html#K9" title="FUNCT_2:func.9">Funcs</a> (<font color="Maroon" title="c4">a</font>,<font color="Maroon" title="c3">rA</font>);<br/>
<span class="kw">deffunc </span><font color="Maroon">H<sub>1</sub></font>(  <a href="exchsort.html#NM3" title="EXCHSORT:NM.3">array</a> of <font color="Maroon" title="c1">O</font>) <span class="kw">-&gt; </span>   <a href="hidden.html#M1" title="HIDDEN:mode.1">set</a>  =  <a href="card_1.html#K1" title="CARD_1:func.1">card</a> <span class="p1">(<span class="default"><a href="exchsort.html#K6" title="EXCHSORT:func.6">inversions</a> $1</span>)</span>;<br/>
<span class="kw">defpred </span><font color="Maroon">S<sub>9</sub></font>[   <a href="funct_2.html#M2" title="FUNCT_2:mode.2">Element</a> of  <a href="funct_2.html#K9" title="FUNCT_2:func.9">Funcs</a> (<font color="Maroon" title="c4">a</font>,<font color="Maroon" title="c3">rA</font>),   <a href="funct_2.html#M2" title="FUNCT_2:mode.2">Element</a> of  <a href="funct_2.html#K9" title="FUNCT_2:func.9">Funcs</a> (<font color="Maroon" title="c4">a</font>,<font color="Maroon" title="c3">rA</font>)] <span class="kw">means </span> ex <font color="Olive" title="b1">p</font>, <font color="Olive" title="b2">q</font> being    <a href="subset_1.html#M2" title="SUBSET_1:mode.2">Element</a> of  <a href="afinsq_1.html#K2" title="AFINSQ_1:func.2">dom</a> <font color="Maroon" title="c2">A</font> st <br/>( <span class="p1"><a href="tarski.html#K4" title="TARSKI:func.4">[</a><span class="default"><font color="Olive" title="b1">p</font>,<font color="Olive" title="b2">q</font></span><a href="tarski.html#K4" title="TARSKI:func.4">]</a></span> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="exchsort.html#K6" title="EXCHSORT:func.6">inversions</a> $1 &amp; $2 <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a>  <a href="funct_7.html#K10" title="FUNCT_7:func.10">Swap</a> ($1,<font color="Olive" title="b1">p</font>,<font color="Olive" title="b2">q</font>) );<br/>
<a NAME="E3:143"/>
<font color="Maroon" title="c2">A</font> is    <a href="exchsort.html#M1" title="EXCHSORT:mode.1">permutation</a> of <font color="Maroon" title="c2">A</font>
 
<span class="kw">by</span> <span class="lab"><a class="ref" href="exchsort.html#T38" target="_self" title="EXCHSORT:th.38">ThRef</a></span>;<br/>
<a NAME="E4:143"/><span class="kw">then </span><span class="lab"><font color="Green" title="E78">A0</font></span>: 
<font color="Maroon" title="c2">A</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="funct_2.html#K9" title="FUNCT_2:func.9">Funcs</a> (<font color="Maroon" title="c4">a</font>,<font color="Maroon" title="c3">rA</font>)
 
<span class="kw">by</span> <span class="lab"><a class="ref" href="exchsort.html#T82" target="_self" title="EXCHSORT:th.82">ThF</a></span>;<br/>
<a NAME="E5:143"/><span class="lab"><font color="Green" title="E79">A1</font></span>: 
<font color="Maroon">H<sub>1</sub></font>(<font color="Maroon" title="c2">A</font>) is  <a href="finset_1.html#V1" title="FINSET_1:attr.1">finite</a> 
 
;<br/>
<a NAME="E6:143"/><span class="lab"><font color="Green" title="E80">A2</font></span>: 
 for <font color="Olive" title="b1">x</font> being    <a href="funct_2.html#M2" title="FUNCT_2:mode.2">Element</a> of  <a href="funct_2.html#K9" title="FUNCT_2:func.9">Funcs</a> (<font color="Maroon" title="c4">a</font>,<font color="Maroon" title="c3">rA</font>)  st <font color="Maroon">H<sub>1</sub></font>(<font color="Olive" title="b1">x</font>) <a href="hidden.html#NR2" title="HIDDEN:NR.2">&lt;&gt;</a>  <a href="xboole_0.html#K1" title="XBOOLE_0:func.1">{}</a>  holds <br/> ex <font color="Olive" title="b2">y</font> being    <a href="funct_2.html#M2" title="FUNCT_2:mode.2">Element</a> of  <a href="funct_2.html#K9" title="FUNCT_2:func.9">Funcs</a> (<font color="Maroon" title="c4">a</font>,<font color="Maroon" title="c3">rA</font>) st <br/>( <font color="Maroon">S<sub>9</sub></font>[<font color="Olive" title="b1">x</font>,<font color="Olive" title="b2">y</font>] &amp; <font color="Maroon">H<sub>1</sub></font>(<font color="Olive" title="b2">y</font>) <a href="xboole_0.html#R2" title="XBOOLE_0:pred.2">c&lt;</a> <font color="Maroon">H<sub>1</sub></font>(<font color="Olive" title="b1">x</font>) )
 
<div><a class="txt" onclick="hs2(this)" href="javascript:()" title="143_1"><span class="kw">proof </span></a><div class="add">

<span class="kw">let </span><font color="Maroon" title="c6">x</font> be    <a href="funct_2.html#M2" title="FUNCT_2:mode.2">Element</a> of  <a href="funct_2.html#K9" title="FUNCT_2:func.9">Funcs</a> (<font color="Maroon" title="c4">a</font>,<font color="Maroon" title="c3">rA</font>); <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="firebrick">::  thesis: </font></span></a><span class="hide"> ( <font color="Maroon">H<sub>1</sub></font>(<font color="Maroon" title="c6">x</font>) <a href="hidden.html#NR2" title="HIDDEN:NR.2">&lt;&gt;</a>  <a href="xboole_0.html#K1" title="XBOOLE_0:func.1">{}</a>  implies  ex <font color="Olive" title="b1">y</font> being    <a href="funct_2.html#M2" title="FUNCT_2:mode.2">Element</a> of  <a href="funct_2.html#K9" title="FUNCT_2:func.9">Funcs</a> (<font color="Maroon" title="c4">a</font>,<font color="Maroon" title="c3">rA</font>) st <br/>( <font color="Maroon">S<sub>9</sub></font>[<font color="Maroon" title="c6">x</font>,<font color="Olive" title="b1">y</font>] &amp; <font color="Maroon">H<sub>1</sub></font>(<font color="Olive" title="b1">y</font>) <a href="xboole_0.html#R2" title="XBOOLE_0:pred.2">c&lt;</a> <font color="Maroon">H<sub>1</sub></font>(<font color="Maroon" title="c6">x</font>) ) )</span><br/>

<span class="kw">reconsider </span><font color="Maroon" title="c7">c</font> = <font color="Maroon" title="c6">x</font> as   <a href="exchsort.html#NM3" title="EXCHSORT:NM.3">array</a> of <font color="Maroon" title="c1">O</font> ;<br/>
<span class="kw">set </span><font color="Maroon" title="c8">z</font> =  the    <a href="subset_1.html#M1" title="SUBSET_1:mode.1">Element</a> of  <a href="exchsort.html#K6" title="EXCHSORT:func.6">inversions</a> <font color="Maroon" title="c7">c</font>;<br/>
<span class="kw">set </span><font color="Maroon" title="c9">Fx</font> = <font color="Maroon">H<sub>1</sub></font>(<font color="Maroon" title="c6">x</font>);<br/>
<span class="kw">assume </span><a NAME="E2:143_1"/>
<font color="Maroon">H<sub>1</sub></font>(<font color="Maroon" title="c6">x</font>) <a href="hidden.html#NR2" title="HIDDEN:NR.2">&lt;&gt;</a>  <a href="xboole_0.html#K1" title="XBOOLE_0:func.1">{}</a> 
 ; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="firebrick">::  thesis: </font></span></a><span class="hide">  ex <font color="Olive" title="b1">y</font> being    <a href="funct_2.html#M2" title="FUNCT_2:mode.2">Element</a> of  <a href="funct_2.html#K9" title="FUNCT_2:func.9">Funcs</a> (<font color="Maroon" title="c4">a</font>,<font color="Maroon" title="c3">rA</font>) st <br/>( <font color="Maroon">S<sub>9</sub></font>[<font color="Maroon" title="c6">x</font>,<font color="Olive" title="b1">y</font>] &amp; <font color="Maroon">H<sub>1</sub></font>(<font color="Olive" title="b1">y</font>) <a href="xboole_0.html#R2" title="XBOOLE_0:pred.2">c&lt;</a> <font color="Maroon">H<sub>1</sub></font>(<font color="Maroon" title="c6">x</font>) )</span><br/>

<a NAME="E3:143_1"/><span class="kw">then </span><span class="lab"><font color="Green" title="E81">B0</font></span>: 
 <a href="exchsort.html#K6" title="EXCHSORT:func.6">inversions</a> <font color="Maroon" title="c7">c</font> <a href="hidden.html#NR2" title="HIDDEN:NR.2">&lt;&gt;</a>  <a href="xboole_0.html#K1" title="XBOOLE_0:func.1">{}</a> 
 
;<br/>
<a NAME="E4:143_1"/><span class="kw">then </span>
(  the    <a href="subset_1.html#M1" title="SUBSET_1:mode.1">Element</a> of  <a href="exchsort.html#K6" title="EXCHSORT:func.6">inversions</a> <font color="Maroon" title="c7">c</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="exchsort.html#K6" title="EXCHSORT:func.6">inversions</a> <font color="Maroon" title="c7">c</font> &amp;  <a href="exchsort.html#K6" title="EXCHSORT:func.6">inversions</a> <font color="Maroon" title="c7">c</font> is   <a href="relset_1.html#NM1" title="RELSET_1:NM.1">Relation</a> of <span class="p1">(<span class="default"><a href="relset_1.html#K1" title="RELSET_1:func.1">dom</a> <font color="Maroon" title="c6">x</font></span>)</span>,<span class="p1">(<span class="default"><a href="relset_1.html#K1" title="RELSET_1:func.1">dom</a> <font color="Maroon" title="c6">x</font></span>)</span> )
 
<span class="kw">by</span> <span class="lab"><a class="ref" href="exchsort.html#T47" target="_self" title="EXCHSORT:th.47">TW1</a></span>;<br/>
<span class="kw">then </span><span class="kw">consider </span><font color="Maroon" title="c10">p</font>, <font color="Maroon" title="c11">q</font> being    <a href="hidden.html#M1" title="HIDDEN:mode.1">set</a> <span class="kw"> such that </span><br/><a NAME="E6:143_1"/><span class="lab"><font color="Green" title="E82">B1</font></span>: 
(  the    <a href="subset_1.html#M1" title="SUBSET_1:mode.1">Element</a> of  <a href="exchsort.html#K6" title="EXCHSORT:func.6">inversions</a> <font color="Maroon" title="c7">c</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <span class="p1"><a href="tarski.html#K4" title="TARSKI:func.4">[</a><span class="default"><font color="Maroon" title="c10">p</font>,<font color="Maroon" title="c11">q</font></span><a href="tarski.html#K4" title="TARSKI:func.4">]</a></span> &amp; <font color="Maroon" title="c10">p</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="relset_1.html#K1" title="RELSET_1:func.1">dom</a> <font color="Maroon" title="c6">x</font> &amp; <font color="Maroon" title="c11">q</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="relset_1.html#K1" title="RELSET_1:func.1">dom</a> <font color="Maroon" title="c6">x</font> )
 <span class="kw">by</span> <span class="lab"><a class="ref" href="relset_1.html#T2" title="RELSET_1:th.2">RELSET_1:2</a></span>;<br/>
<span class="kw">set </span><font color="Maroon" title="c12">y</font> =  <a href="funct_7.html#K10" title="FUNCT_7:func.10">Swap</a> (<font color="Maroon" title="c6">x</font>,<font color="Maroon" title="c10">p</font>,<font color="Maroon" title="c11">q</font>);<br/>
<a NAME="E7:143_1"/><span class="lab"><font color="Green" title="E83">B2</font></span>: 
(  <a href="relset_1.html#K1" title="RELSET_1:func.1">dom</a> <span class="p1">(<span class="default"><a href="funct_7.html#K10" title="FUNCT_7:func.10">Swap</a> (<font color="Maroon" title="c6">x</font>,<font color="Maroon" title="c10">p</font>,<font color="Maroon" title="c11">q</font>)</span>)</span> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a>  <a href="relset_1.html#K1" title="RELSET_1:func.1">dom</a> <font color="Maroon" title="c6">x</font> &amp;  <a href="relat_1.html#K2" title="RELAT_1:func.2">rng</a> <span class="p1">(<span class="default"><a href="funct_7.html#K10" title="FUNCT_7:func.10">Swap</a> (<font color="Maroon" title="c6">x</font>,<font color="Maroon" title="c10">p</font>,<font color="Maroon" title="c11">q</font>)</span>)</span> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a>  <a href="relat_1.html#K2" title="RELAT_1:func.2">rng</a> <font color="Maroon" title="c6">x</font> )
 
<span class="kw">by</span> <span class="lab"><a class="ref" href="funct_7.html#T99" title="FUNCT_7:th.99">FUNCT_7:99</a>, <a class="ref" href="funct_7.html#T103" title="FUNCT_7:th.103">FUNCT_7:103</a></span>;<br/>
<a NAME="E8:143_1"/>
(  <a href="relset_1.html#K1" title="RELSET_1:func.1">dom</a> <font color="Maroon" title="c6">x</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a>  <a href="afinsq_1.html#K2" title="AFINSQ_1:func.2">dom</a> <font color="Maroon" title="c2">A</font> &amp;  <a href="relat_1.html#K2" title="RELAT_1:func.2">rng</a> <font color="Maroon" title="c6">x</font> <a href="tarski.html#R1" title="TARSKI:pred.1">c=</a>  <a href="relat_1.html#K2" title="RELAT_1:func.2">rng</a> <font color="Maroon" title="c2">A</font> )
 
<span class="kw">by</span> <span class="lab"><a class="ref" href="funct_2.html#T92" title="FUNCT_2:th.92">FUNCT_2:92</a></span>;<br/>
<span class="kw">then </span><span class="kw">reconsider </span><font color="Maroon" title="c13">y</font> =  <a href="funct_7.html#K10" title="FUNCT_7:func.10">Swap</a> (<font color="Maroon" title="c6">x</font>,<font color="Maroon" title="c10">p</font>,<font color="Maroon" title="c11">q</font>) as    <a href="funct_2.html#M2" title="FUNCT_2:mode.2">Element</a> of  <a href="funct_2.html#K9" title="FUNCT_2:func.9">Funcs</a> (<font color="Maroon" title="c4">a</font>,<font color="Maroon" title="c3">rA</font>) <span class="kw">by</span> <span class="lab"><a class="txt" href="#E7:143_1"><span class="lab"><font color="Green" title="E83">B2</font></span></a>, <a class="ref" href="funct_2.html#D2" title="FUNCT_2:def.2">FUNCT_2:def 2</a></span>;<br/>
<span class="kw">reconsider </span><font color="Maroon" title="c14">b</font> = <font color="Maroon" title="c13">y</font> as   <a href="exchsort.html#NM3" title="EXCHSORT:NM.3">array</a> of <font color="Maroon" title="c1">O</font> ;<br/>
<span class="kw">set </span><font color="Maroon" title="c15">Fy</font> = <font color="Maroon">H<sub>1</sub></font>(<font color="Maroon" title="c13">y</font>);<br/>
<span class="kw">take </span>
<font color="Maroon" title="c13">y</font>
; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="firebrick">::  thesis: </font></span></a><span class="hide"> ( <font color="Maroon">S<sub>9</sub></font>[<font color="Maroon" title="c6">x</font>,<font color="Maroon" title="c13">y</font>] &amp; <font color="Maroon">H<sub>1</sub></font>(<font color="Maroon" title="c13">y</font>) <a href="xboole_0.html#R2" title="XBOOLE_0:pred.2">c&lt;</a> <font color="Maroon">H<sub>1</sub></font>(<font color="Maroon" title="c6">x</font>) )</span><br/>

<span class="kw">thus </span><a NAME="E11:143_1"/>
<font color="Maroon">S<sub>9</sub></font>[<font color="Maroon" title="c6">x</font>,<font color="Maroon" title="c13">y</font>]
 <span class="kw">by</span> <span class="lab"><a class="txt" href="#E3:143_1"><span class="lab"><font color="Green" title="E81">B0</font></span></a>, <a class="txt" href="#E6:143_1"><span class="lab"><font color="Green" title="E82">B1</font></span></a></span>; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="firebrick">::  thesis: </font></span></a><span class="hide"> <font color="Maroon">H<sub>1</sub></font>(<font color="Maroon" title="c13">y</font>) <a href="xboole_0.html#R2" title="XBOOLE_0:pred.2">c&lt;</a> <font color="Maroon">H<sub>1</sub></font>(<font color="Maroon" title="c6">x</font>)</span><br/>

<a NAME="E12:143_1"/>
<font color="Maroon">H<sub>1</sub></font>(<font color="Maroon" title="c14">b</font>) <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a> <font color="Maroon">H<sub>1</sub></font>(<font color="Maroon" title="c7">c</font>)
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E3:143_1"><span class="lab"><font color="Green" title="E81">B0</font></span></a>, <a class="txt" href="#E6:143_1"><span class="lab"><font color="Green" title="E82">B1</font></span></a>, <a class="ref" href="exchsort.html#T73" target="_self" title="EXCHSORT:th.73">MAIN3</a></span>;<br/>
<span class="kw">hence </span><a NAME="E13:143_1"/>
( <font color="Maroon">H<sub>1</sub></font>(<font color="Maroon" title="c13">y</font>) <a href="ordinal1.html#R1" title="ORDINAL1:pred.1">c=</a> <font color="Maroon">H<sub>1</sub></font>(<font color="Maroon" title="c6">x</font>) &amp; <font color="Maroon">H<sub>1</sub></font>(<font color="Maroon" title="c13">y</font>) <a href="hidden.html#NR2" title="HIDDEN:NR.2">&lt;&gt;</a> <font color="Maroon">H<sub>1</sub></font>(<font color="Maroon" title="c6">x</font>) )
 <span class="kw">by</span> <span class="lab"><a class="ref" href="ordinal1.html#D2" title="ORDINAL1:def.2">ORDINAL1:def 2</a></span>; <span class="comment"><font color="firebrick">:: according to </font></span><a class="ref" href="xboole_0.html#D8" title="XBOOLE_0:def.8">XBOOLE_0:def 8</a> <a class="txt" 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">consider </span><font color="Maroon" title="c6">f</font> being   non  <a href="xboole_0.html#V1" title="XBOOLE_0:attr.1">empty</a>   <a href="finset_1.html#V1" title="FINSET_1:attr.1">finite</a>   <a href="card_1.html#NK1" title="CARD_1:NK.1">0</a>  <a href="exchsort.html#V2" title="EXCHSORT:attr.2">-based</a>  <a href="exchsort.html#NM1" title="EXCHSORT:NM.1">array</a>, <font color="Maroon" title="c7">k</font> being    <a href="funct_2.html#M2" title="FUNCT_2:mode.2">Element</a> of  <a href="funct_2.html#K9" title="FUNCT_2:func.9">Funcs</a> (<font color="Maroon" title="c4">a</font>,<font color="Maroon" title="c3">rA</font>)<span class="kw"> such that </span><br/><a NAME="E8:143"/><span class="lab"><font color="Green" title="E81">A3</font></span>: 
( <font color="Maroon" title="c7">k</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a>  <a href="exchsort.html#K4" title="EXCHSORT:func.4">last</a> <font color="Maroon" title="c6">f</font> &amp; <font color="Maroon">H<sub>1</sub></font>(<font color="Maroon" title="c7">k</font>) <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a>  <a href="xboole_0.html#K1" title="XBOOLE_0:func.1">{}</a>  &amp; <font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <a href="card_1.html#NK1" title="CARD_1:NK.1">0</a> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <font color="Maroon" title="c2">A</font> )
 <span class="kw">and </span><br/><a NAME="E9:143"/><span class="lab"><font color="Green" title="E82">A4</font></span>: 
 for <font color="Olive" title="b1">a</font> being   <a href="ordinal1.html#V3" title="ORDINAL1:attr.3">ordinal</a>   <a href="ordinal1.html#NM1" title="ORDINAL1:NM.1">number</a>   st  <a href="ordinal1.html#K1" title="ORDINAL1:func.1">succ</a> <font color="Olive" title="b1">a</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="c6">f</font> holds <br/> ex <font color="Olive" title="b2">x</font>, <font color="Olive" title="b3">y</font> being    <a href="funct_2.html#M2" title="FUNCT_2:mode.2">Element</a> of  <a href="funct_2.html#K9" title="FUNCT_2:func.9">Funcs</a> (<font color="Maroon" title="c4">a</font>,<font color="Maroon" title="c3">rA</font>) st <br/>( <font color="Olive" title="b2">x</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <font color="Olive" title="b1">a</font> &amp; <font color="Olive" title="b3">y</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <span class="p1">(<span class="default"><a href="ordinal1.html#K1" title="ORDINAL1:func.1">succ</a> <font color="Olive" title="b1">a</font></span>)</span> &amp; <font color="Maroon">S<sub>9</sub></font>[<font color="Olive" title="b2">x</font>,<font color="Olive" title="b3">y</font>] )
 <span class="kw">from</span> <span class="lab"><a class="ref" href="exchsort.html#S2" target="_self" title="EXCHSORT:sch.2">EXCHSORT:sch 2</a>(<a class="txt" href="#E4:143"><span class="lab"><font color="Green" title="E78">A0</font></span></a>, <a class="txt" href="#E5:143"><span class="lab"><font color="Green" title="E79">A1</font></span></a>, <a class="txt" href="#E6:143"><span class="lab"><font color="Green" title="E80">A2</font></span></a>);<br/></span>
<a NAME="E10:143"/>
<font color="Maroon" title="c6">f</font> is    <a href="exchsort.html#M2" title="EXCHSORT:mode.2">arr_computation</a> of <font color="Maroon" title="c2">A</font>
 
<div><a class="txt" onclick="hs2(this)" href="javascript:()" title="143_2"><span class="kw">proof </span></a><div class="add">

<span class="kw">thus </span><a NAME="E1:143_2"/>
<font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <span class="p1">(<span class="default"><a href="exchsort.html#K1" title="EXCHSORT:func.1">base-</a> <font color="Maroon" title="c6">f</font></span>)</span> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <font color="Maroon" title="c2">A</font>
 <span class="kw">by</span> <span class="lab"><a class="txt" href="#E8:143"><span class="lab"><font color="Green" title="E81">A3</font></span></a>, <a class="ref" href="exchsort.html#T24" target="_self" title="EXCHSORT:th.24">TT0</a></span>; <span class="comment"><font color="firebrick">:: according to </font></span><a class="ref" href="exchsort.html#D14" target="_self" title="EXCHSORT:def.14">EXCHSORT:def 14</a> <a class="txt" 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="ordinal1.html#V3" title="ORDINAL1:attr.3">ordinal</a>   <a href="ordinal1.html#NM1" title="ORDINAL1:NM.1">number</a>   st <font color="Olive" title="b1">a</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="relat_1.html#NK2" title="RELAT_1:NK.2">dom</a> <font color="Maroon" title="c6">f</font> holds <br/><font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <font color="Olive" title="b1">a</font> is   <a href="exchsort.html#NM3" title="EXCHSORT:NM.3">array</a> of <font color="Maroon" title="c1">O</font> ) &amp; (  for <font color="Olive" title="b1">a</font> being   <a href="ordinal1.html#V3" title="ORDINAL1:attr.3">ordinal</a>   <a href="ordinal1.html#NM1" title="ORDINAL1:NM.1">number</a>   st <font color="Olive" title="b1">a</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="relat_1.html#NK2" title="RELAT_1:NK.2">dom</a> <font color="Maroon" title="c6">f</font> &amp;  <a href="ordinal1.html#K1" title="ORDINAL1:func.1">succ</a> <font color="Olive" title="b1">a</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="relat_1.html#NK2" title="RELAT_1:NK.2">dom</a> <font color="Maroon" title="c6">f</font> holds <br/> ex <font color="Olive" title="b2">R</font> being   <a href="exchsort.html#NM3" title="EXCHSORT:NM.3">array</a> of <font color="Maroon" title="c1">O</font> ex <font color="Olive" title="b3">x</font>, <font color="Olive" title="b4">y</font> being    <a href="hidden.html#M1" title="HIDDEN:mode.1">set</a>  st <br/>( <span class="p1"><a href="tarski.html#K4" title="TARSKI:func.4">[</a><span class="default"><font color="Olive" title="b3">x</font>,<font color="Olive" title="b4">y</font></span><a href="tarski.html#K4" title="TARSKI:func.4">]</a></span> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="exchsort.html#K6" title="EXCHSORT:func.6">inversions</a> <font color="Olive" title="b2">R</font> &amp; <font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <font color="Olive" title="b1">a</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <font color="Olive" title="b2">R</font> &amp; <font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <span class="p1">(<span class="default"><a href="ordinal1.html#K1" title="ORDINAL1:func.1">succ</a> <font color="Olive" title="b1">a</font></span>)</span> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a>  <a href="funct_7.html#K10" title="FUNCT_7:func.10">Swap</a> (<font color="Olive" title="b2">R</font>,<font color="Olive" title="b3">x</font>,<font color="Olive" title="b4">y</font>) ) ) )</span><br/>

<span class="kw">thus </span><a NAME="E2:143_2"/>
 for <font color="Olive" title="b1">a</font> being   <a href="ordinal1.html#V3" title="ORDINAL1:attr.3">ordinal</a>   <a href="ordinal1.html#NM1" title="ORDINAL1:NM.1">number</a>   st <font color="Olive" title="b1">a</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="c6">f</font> holds <br/><font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <font color="Olive" title="b1">a</font> is   <a href="exchsort.html#NM3" title="EXCHSORT:NM.3">array</a> of <font color="Maroon" title="c1">O</font>
  <a class="txt" 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="ordinal1.html#V3" title="ORDINAL1:attr.3">ordinal</a>   <a href="ordinal1.html#NM1" title="ORDINAL1:NM.1">number</a>   st <font color="Olive" title="b1">a</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="relat_1.html#NK2" title="RELAT_1:NK.2">dom</a> <font color="Maroon" title="c6">f</font> &amp;  <a href="ordinal1.html#K1" title="ORDINAL1:func.1">succ</a> <font color="Olive" title="b1">a</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="relat_1.html#NK2" title="RELAT_1:NK.2">dom</a> <font color="Maroon" title="c6">f</font> holds <br/> ex <font color="Olive" title="b2">R</font> being   <a href="exchsort.html#NM3" title="EXCHSORT:NM.3">array</a> of <font color="Maroon" title="c1">O</font> ex <font color="Olive" title="b3">x</font>, <font color="Olive" title="b4">y</font> being    <a href="hidden.html#M1" title="HIDDEN:mode.1">set</a>  st <br/>( <span class="p1"><a href="tarski.html#K4" title="TARSKI:func.4">[</a><span class="default"><font color="Olive" title="b3">x</font>,<font color="Olive" title="b4">y</font></span><a href="tarski.html#K4" title="TARSKI:func.4">]</a></span> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="exchsort.html#K6" title="EXCHSORT:func.6">inversions</a> <font color="Olive" title="b2">R</font> &amp; <font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <font color="Olive" title="b1">a</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <font color="Olive" title="b2">R</font> &amp; <font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <span class="p1">(<span class="default"><a href="ordinal1.html#K1" title="ORDINAL1:func.1">succ</a> <font color="Olive" title="b1">a</font></span>)</span> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a>  <a href="funct_7.html#K10" title="FUNCT_7:func.10">Swap</a> (<font color="Olive" title="b2">R</font>,<font color="Olive" title="b3">x</font>,<font color="Olive" title="b4">y</font>) )</span><div><a class="txt" onclick="hs2(this)" href="javascript:()" title="143_2_1"><span class="kw">proof </span></a><div class="add">

<span class="kw">let </span><font color="Maroon" title="c8">a</font> be   <a href="ordinal1.html#V3" title="ORDINAL1:attr.3">ordinal</a>   <a href="ordinal1.html#NM1" title="ORDINAL1:NM.1">number</a> ; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="firebrick">::  thesis: </font></span></a><span class="hide"> ( <font color="Maroon" title="c8">a</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="c6">f</font> implies <font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <font color="Maroon" title="c8">a</font> is   <a href="exchsort.html#NM3" title="EXCHSORT:NM.3">array</a> of <font color="Maroon" title="c1">O</font> )</span><br/>

<span class="kw">assume </span><a NAME="E1:143_2_1"/><span class="lab"><font color="Green" title="E83">Z1</font></span>: 
<font color="Maroon" title="c8">a</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="c6">f</font>
 ; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="firebrick">::  thesis: </font></span></a><span class="hide"> <font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <font color="Maroon" title="c8">a</font> is   <a href="exchsort.html#NM3" title="EXCHSORT:NM.3">array</a> of <font color="Maroon" title="c1">O</font></span><br/>

<div><a class="txt" onclick="hsNdiv(this)" href="javascript:()" title="143_2_1_1"><span class="kw">per </span></a><a class="txt" onclick="hs(this)" href="javascript:()"><span class="kw">cases </span></a><span class="hide"><a NAME="E1:143_2_1_1"/>
( <font color="Maroon" title="c8">a</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a>  <a href="card_1.html#NK1" title="CARD_1:NK.1">0</a>  or  ex <font color="Olive" title="b1">b</font> being   <a href="ordinal1.html#V3" title="ORDINAL1:attr.3">ordinal</a>   <a href="ordinal1.html#NM1" title="ORDINAL1:NM.1">number</a>  st <font color="Maroon" title="c8">a</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a>  <a href="ordinal1.html#K1" title="ORDINAL1:func.1">succ</a> <font color="Olive" title="b1">b</font> )
 </span><span class="kw">by</span> <span class="lab"><a class="txt" href="#E1:143_2_1"><span class="lab"><font color="Green" title="E83">Z1</font></span></a>, <a class="ref" href="exchsort.html#T84" target="_self" title="EXCHSORT:th.84">Lem1</a></span>;<br/><div class="add"><div><a class="txt" onclick="hsNdiv(this)" href="javascript:()" title="143_2_1_1_1"><span class="kw">suppose </span></a><a NAME="E1:143_2_1_1_1"/>
<font color="Maroon" title="c8">a</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a>  <a href="card_1.html#NK1" title="CARD_1:NK.1">0</a> 
 ; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="firebrick">::  thesis: </font></span></a><span class="hide"> <font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <font color="Maroon" title="c8">a</font> is   <a href="exchsort.html#NM3" title="EXCHSORT:NM.3">array</a> of <font color="Maroon" title="c1">O</font></span><br/><div class="add"><span class="kw">hence </span><a NAME="E2:143_2_1_1_1"/>
<font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <font color="Maroon" title="c8">a</font> is   <a href="exchsort.html#NM3" title="EXCHSORT:NM.3">array</a> of <font color="Maroon" title="c1">O</font>
 <span class="kw">by</span> <span class="lab"><a class="txt" href="#E8:143"><span class="lab"><font color="Green" title="E81">A3</font></span></a></span>; <a class="txt" 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><div><a class="txt" onclick="hsNdiv(this)" href="javascript:()" title="143_2_1_1_2"><span class="kw">suppose </span></a><a NAME="E1:143_2_1_1_2"/>
 ex <font color="Olive" title="b1">b</font> being   <a href="ordinal1.html#V3" title="ORDINAL1:attr.3">ordinal</a>   <a href="ordinal1.html#NM1" title="ORDINAL1:NM.1">number</a>  st <font color="Maroon" title="c8">a</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a>  <a href="ordinal1.html#K1" title="ORDINAL1:func.1">succ</a> <font color="Olive" title="b1">b</font>
 ; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="firebrick">::  thesis: </font></span></a><span class="hide"> <font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <font color="Maroon" title="c8">a</font> is   <a href="exchsort.html#NM3" title="EXCHSORT:NM.3">array</a> of <font color="Maroon" title="c1">O</font></span><br/><div class="add"><span class="kw">then </span><span class="kw">consider </span><font color="Maroon" title="c9">b</font> being   <a href="ordinal1.html#V3" title="ORDINAL1:attr.3">ordinal</a>   <a href="ordinal1.html#NM1" title="ORDINAL1:NM.1">number</a> <span class="kw"> such that </span><br/><a NAME="E3:143_2_1_1_2"/><span class="lab"><font color="Green" title="E84">Z2</font></span>: 
<font color="Maroon" title="c8">a</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a>  <a href="ordinal1.html#K1" title="ORDINAL1:func.1">succ</a> <font color="Maroon" title="c9">b</font>
 ;<br/><a NAME="E4:143_2_1_1_2"/>
 ex <font color="Olive" title="b1">x</font>, <font color="Olive" title="b2">y</font> being    <a href="funct_2.html#M2" title="FUNCT_2:mode.2">Element</a> of  <a href="funct_2.html#K9" title="FUNCT_2:func.9">Funcs</a> (<font color="Maroon" title="c4">a</font>,<font color="Maroon" title="c3">rA</font>) st <br/>( <font color="Olive" title="b1">x</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <font color="Maroon" title="c9">b</font> &amp; <font color="Olive" title="b2">y</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <font color="Maroon" title="c8">a</font> &amp; <font color="Maroon">S<sub>9</sub></font>[<font color="Olive" title="b1">x</font>,<font color="Olive" title="b2">y</font>] )
 <span class="kw">by</span> <span class="lab"><a class="txt" href="#E9:143"><span class="lab"><font color="Green" title="E82">A4</font></span></a>, <a class="txt" href="#E1:143_2_1"><span class="lab"><font color="Green" title="E83">Z1</font></span></a>, <a class="txt" href="#E3:143_2_1_1_2"><span class="lab"><font color="Green" title="E84">Z2</font></span></a></span>;<br/><span class="kw">hence </span><a NAME="E5:143_2_1_1_2"/>
<font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <font color="Maroon" title="c8">a</font> is   <a href="exchsort.html#NM3" title="EXCHSORT:NM.3">array</a> of <font color="Maroon" title="c1">O</font>
 ; <a class="txt" 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></div><span class="kw">end;</span></div>

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

<span class="kw">let </span><font color="Maroon" title="c8">a</font> be   <a href="ordinal1.html#V3" title="ORDINAL1:attr.3">ordinal</a>   <a href="ordinal1.html#NM1" title="ORDINAL1:NM.1">number</a> ; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="firebrick">::  thesis: </font></span></a><span class="hide"> ( <font color="Maroon" title="c8">a</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="relat_1.html#NK2" title="RELAT_1:NK.2">dom</a> <font color="Maroon" title="c6">f</font> &amp;  <a href="ordinal1.html#K1" title="ORDINAL1:func.1">succ</a> <font color="Maroon" title="c8">a</font> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="relat_1.html#NK2" title="RELAT_1:NK.2">dom</a> <font color="Maroon" title="c6">f</font> implies  ex <font color="Olive" title="b1">R</font> being   <a href="exchsort.html#NM3" title="EXCHSORT:NM.3">array</a> of <font color="Maroon" title="c1">O</font> ex <font color="Olive" title="b2">x</font>, <font color="Olive" title="b3">y</font> being    <a href="hidden.html#M1" title="HIDDEN:mode.1">set</a>  st <br/>( <span class="p1"><a href="tarski.html#K4" title="TARSKI:func.4">[</a><span class="default"><font color="Olive" title="b2">x</font>,<font color="Olive" title="b3">y</font></span><a href="tarski.html#K4" title="TARSKI:func.4">]</a></span> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="exchsort.html#K6" title="EXCHSORT:func.6">inversions</a> <font color="Olive" title="b1">R</font> &amp; <font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <font color="Maroon" title="c8">a</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <font color="Olive" title="b1">R</font> &amp; <font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <span class="p1">(<span class="default"><a href="ordinal1.html#K1" title="ORDINAL1:func.1">succ</a> <font color="Maroon" title="c8">a</font></span>)</span> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a>  <a href="funct_7.html#K10" title="FUNCT_7:func.10">Swap</a> (<font color="Olive" title="b1">R</font>,<font color="Olive" title="b2">x</font>,<font color="Olive" title="b3">y</font>) ) )</span><br/>

<span class="kw">assume </span><a NAME="E3:143_2"/>
( <font color="Maroon" title="c8">a</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="c6">f</font> &amp;  <a href="ordinal1.html#K1" title="ORDINAL1:func.1">succ</a> <font color="Maroon" title="c8">a</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="c6">f</font> )
 ; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="firebrick">::  thesis: </font></span></a><span class="hide">  ex <font color="Olive" title="b1">R</font> being   <a href="exchsort.html#NM3" title="EXCHSORT:NM.3">array</a> of <font color="Maroon" title="c1">O</font> ex <font color="Olive" title="b2">x</font>, <font color="Olive" title="b3">y</font> being    <a href="hidden.html#M1" title="HIDDEN:mode.1">set</a>  st <br/>( <span class="p1"><a href="tarski.html#K4" title="TARSKI:func.4">[</a><span class="default"><font color="Olive" title="b2">x</font>,<font color="Olive" title="b3">y</font></span><a href="tarski.html#K4" title="TARSKI:func.4">]</a></span> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="exchsort.html#K6" title="EXCHSORT:func.6">inversions</a> <font color="Olive" title="b1">R</font> &amp; <font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <font color="Maroon" title="c8">a</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <font color="Olive" title="b1">R</font> &amp; <font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <span class="p1">(<span class="default"><a href="ordinal1.html#K1" title="ORDINAL1:func.1">succ</a> <font color="Maroon" title="c8">a</font></span>)</span> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a>  <a href="funct_7.html#K10" title="FUNCT_7:func.10">Swap</a> (<font color="Olive" title="b1">R</font>,<font color="Olive" title="b2">x</font>,<font color="Olive" title="b3">y</font>) )</span><br/>

<a NAME="E4:143_2"/><span class="kw">then </span>
 ex <font color="Olive" title="b1">x</font>, <font color="Olive" title="b2">y</font> being    <a href="funct_2.html#M2" title="FUNCT_2:mode.2">Element</a> of  <a href="funct_2.html#K9" title="FUNCT_2:func.9">Funcs</a> (<font color="Maroon" title="c4">a</font>,<font color="Maroon" title="c3">rA</font>) st <br/>( <font color="Olive" title="b1">x</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <font color="Maroon" title="c8">a</font> &amp; <font color="Olive" title="b2">y</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <span class="p1">(<span class="default"><a href="ordinal1.html#K1" title="ORDINAL1:func.1">succ</a> <font color="Maroon" title="c8">a</font></span>)</span> &amp; <font color="Maroon">S<sub>9</sub></font>[<font color="Olive" title="b1">x</font>,<font color="Olive" title="b2">y</font>] )
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E9:143"><span class="lab"><font color="Green" title="E82">A4</font></span></a></span>;<br/>
<span class="kw">hence </span><a NAME="E5:143_2"/>
 ex <font color="Olive" title="b1">R</font> being   <a href="exchsort.html#NM3" title="EXCHSORT:NM.3">array</a> of <font color="Maroon" title="c1">O</font> ex <font color="Olive" title="b2">x</font>, <font color="Olive" title="b3">y</font> being    <a href="hidden.html#M1" title="HIDDEN:mode.1">set</a>  st <br/>( <span class="p1"><a href="tarski.html#K4" title="TARSKI:func.4">[</a><span class="default"><font color="Olive" title="b2">x</font>,<font color="Olive" title="b3">y</font></span><a href="tarski.html#K4" title="TARSKI:func.4">]</a></span> <a href="hidden.html#R2" title="HIDDEN:pred.2">in</a>  <a href="exchsort.html#K6" title="EXCHSORT:func.6">inversions</a> <font color="Olive" title="b1">R</font> &amp; <font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <font color="Maroon" title="c8">a</font> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a> <font color="Olive" title="b1">R</font> &amp; <font color="Maroon" title="c6">f</font> <a href="funct_1.html#K1" title="FUNCT_1:func.1">.</a> <span class="p1">(<span class="default"><a href="ordinal1.html#K1" title="ORDINAL1:func.1">succ</a> <font color="Maroon" title="c8">a</font></span>)</span> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a>  <a href="funct_7.html#K10" title="FUNCT_7:func.10">Swap</a> (<font color="Olive" title="b1">R</font>,<font color="Olive" title="b2">x</font>,<font color="Olive" title="b3">y</font>) )
 ; <a class="txt" 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">then </span><span class="kw">reconsider </span><font color="Maroon" title="c8">f</font> = <font color="Maroon" title="c6">f</font> as   <a href="card_1.html#NK1" title="CARD_1:NK.1">0</a>  <a href="exchsort.html#V2" title="EXCHSORT:attr.2">-based</a>   <a href="exchsort.html#M2" title="EXCHSORT:mode.2">arr_computation</a> of <font color="Maroon" title="c2">A</font> ;<br/>
<span class="kw">take </span>
<font color="Maroon" title="c8">f</font>
; <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="firebrick">::  thesis: </font></span></a><span class="hide"> <font color="Maroon" title="c8">f</font> is  <a href="exchsort.html#V6" title="EXCHSORT:attr.6">complete</a> </span><br/>

<a NAME="E12:143"/>
 <a href="exchsort.html#K6" title="EXCHSORT:func.6">inversions</a> <span class="p1">(<span class="default"><a href="exchsort.html#K4" title="EXCHSORT:func.4">last</a> <font color="Maroon" title="c8">f</font></span>)</span> <a href="hidden.html#R1" title="HIDDEN:pred.1">=</a>  <a href="xboole_0.html#K1" title="XBOOLE_0:func.1">{}</a> 
 
<span class="kw">by</span> <span class="lab"><a class="txt" href="#E8:143"><span class="lab"><font color="Green" title="E81">A3</font></span></a></span>;<br/>
<span class="kw">hence </span><a NAME="E13:143"/>
 <a href="exchsort.html#K4" title="EXCHSORT:func.4">last</a> <font color="Maroon" title="c8">f</font> is  <a href="exchsort.html#V5" title="EXCHSORT:attr.5">ascending</a> 
 <span class="kw">by</span> <span class="lab"><a class="ref" href="exchsort.html#T48" target="_self" title="EXCHSORT:th.48">SORT</a></span>; <span class="comment"><font color="firebrick">:: according to </font></span><a class="ref" href="exchsort.html#D15" target="_self" title="EXCHSORT:def.15">EXCHSORT:def 15</a> <a class="txt" onclick="hs(this)" href="javascript:()"><span class="comment"><font color="firebrick">::  thesis: </font></span></a><span class="hide"> verum</span><br/>


</div>
