<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
<html xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/1999/xhtml" version="-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" xml:lang="en" lang="en">
  <head profile="">
    <title>Example of FoC hierarchy.</title>
    <link rel="stylesheet" href="focdoc.css" type="text/css"/>
  </head>
  <body><h1>Example of FoC hierarchy.</h1><p class="author">Manuel Maarek and Virgile Prevosto</p><p class="comments">Demonstration of the various concepts of the FoC library.</p><table class="head"><caption><a shape="rect" name="head"> </a></caption><tr><td colspan="1" rowspan="1" class="index">List of species </td><td colspan="1" rowspan="1" class="index"><a shape="rect" href="#species-setoid">setoid</a> - <a shape="rect" href="#species-monoid">monoid</a> - <a shape="rect" href="#species-setoid_product">setoid_product</a> - <a shape="rect" href="#species-monoid_product">monoid_product</a></td></tr><tr><td colspan="1" rowspan="1" class="index">List of collections </td><td colspan="1" rowspan="1" class="index"><a shape="rect" href="#collection-integers">integers</a> - <a shape="rect" href="#collection-integers_2">integers_2</a></td></tr></table><a shape="rect" href="index.html">back to index of files</a>

NB : <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:f="focdoc.dtd" mode="inline"><mml:mstyle color="red"><mml:mrow><mml:mi mathvariant="italic">FuncSpace</mml:mi><mml:mi> : </mml:mi><mml:mi>A :set, B : set </mml:mi><mml:mi>&#x2192;</mml:mi><mml:mrow><mml:mo>{</mml:mo><mml:mrow><mml:mrow><mml:mi> f </mml:mi></mml:mrow></mml:mrow><mml:mo>|</mml:mo><mml:mrow><mml:mrow><mml:mrow><mml:mrow><mml:mo>domain</mml:mo><mml:mo/><mml:mfenced open="(" close=")" separators=","><mml:mrow><mml:mi> f </mml:mi></mml:mrow></mml:mfenced></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">&#x2286;</mml:mo><mml:mrow><mml:mi> A </mml:mi></mml:mrow></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">&#x2227;</mml:mo><mml:mrow><mml:mrow><mml:mi> A </mml:mi></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">&#x2286;</mml:mo><mml:mrow><mml:mo>domain</mml:mo><mml:mo/><mml:mfenced open="(" close=")" separators=","><mml:mrow><mml:mi> f </mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">&#x2227;</mml:mo><mml:mrow><mml:mrow><mml:mo>image</mml:mo><mml:mo/><mml:mfenced open="(" close=")" separators=","><mml:mrow><mml:mi> f </mml:mi></mml:mrow></mml:mfenced></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">&#x2286;</mml:mo><mml:mrow><mml:mi> B </mml:mi></mml:mrow></mml:mrow></mml:mrow></mml:mrow><mml:mo>}</mml:mo></mml:mrow></mml:mrow></mml:mstyle></mml:math><h2>Species: <code>setoid</code><a shape="rect" name="species-setoid"> </a></h2><p class="comments">a setoid is simply a set with an equivalence relation.</p><p><code class="foc"><code class="key1">species</code> setoid <code class="key1">inherits</code> <a shape="rect" href="basics.xml#species-basic_object">basic_object</a></code></p><table><tr><td colspan="1" rowspan="1" class="categ">signature</td><td colspan="1" rowspan="1" class="name"><code>equal</code><a shape="rect" name="setoid-equal"> </a></td><td colspan="1" rowspan="1"><code><code class="type"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:f="focdoc.dtd" mode="inline"><mml:mstyle color="salmon"><mml:mrow><mml:mrow><mml:mi>equal</mml:mi></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">&#x2208;</mml:mo><mml:mrow><mml:mi mathvariant="italic">FuncSpace</mml:mi><mml:mo/><mml:mfenced open="(" close=")" separators=","><mml:mrow><mml:mi>self</mml:mi></mml:mrow><mml:mrow><mml:mi mathvariant="italic">FuncSpace</mml:mi><mml:mo/><mml:mfenced open="(" close=")" separators=","><mml:mrow><mml:mi>self</mml:mi></mml:mrow><mml:mrow><mml:mi>bool</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mrow></mml:mstyle></mml:math></code></code></td></tr><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><div class="comments">equal is an equivalence relation on the carrier.</div></td></tr><tr><td colspan="1" rowspan="1" class="categ">signature</td><td colspan="1" rowspan="1" class="name"><code>element</code><a shape="rect" name="setoid-element"> </a></td><td colspan="1" rowspan="1"><code><code class="type"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:f="focdoc.dtd" mode="inline"><mml:mstyle color="fuchsia"><mml:mrow><mml:mi>self</mml:mi></mml:mrow></mml:mstyle></mml:math></code></code></td></tr><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><div class="comments">the presence of element impose to work with non empty setoids</div></td></tr><tr><td colspan="1" rowspan="1" class="categ">definition</td><td colspan="1" rowspan="1" class="name"><code>different</code><a shape="rect" name="definition-setoid-different"> </a></td><td colspan="1" rowspan="1"><code><code class="type"><code class="key3">self</code><code class="key2"> -&gt; </code><code class="key3">self</code><code class="key2"> -&gt; </code>bool</code></code></td></tr><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><div class="comments">definition of the negation of our equality.</div></td></tr><tr><td colspan="1" rowspan="1" class="categ">definition</td><td colspan="1" rowspan="1" class="name"><code>to_openmath</code><a shape="rect" name="definition-setoid-to_openmath"> </a></td><td colspan="1" rowspan="1"><code><code class="type"><code class="key3">self</code><code class="key2"> -&gt; </code>openmath</code></code></td></tr><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><div class="comments">connection with OpenMath expression. At this level, we can only consider abstract O.M. entities.</div></td></tr><tr><td colspan="1" rowspan="1" class="categ">property</td><td colspan="1" rowspan="1" class="name"><code>refl</code><a shape="rect" name="property_theorem-setoid-refl"> </a></td><td colspan="1" rowspan="1"/></tr><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:f="focdoc.dtd" mode="inline"><mml:mstyle color="teal">
    <mml:mrow><mml:mi>&#x2200;</mml:mi><mml:mrow><mml:mrow><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">&#x2208;</mml:mo><mml:mrow><mml:mi>self</mml:mi></mml:mrow></mml:mrow></mml:mrow><mml:mo>.</mml:mo><mml:mfenced><mml:mrow><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">=</mml:mo><mml:mrow><mml:mi>x</mml:mi></mml:mrow></mml:mrow></mml:mfenced></mml:mrow>
   </mml:mstyle></mml:math></td></tr><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><div class="comments">As an equivalence relation, equal has to be reflexive.</div></td></tr><tr><td colspan="1" rowspan="1" class="categ">property</td><td colspan="1" rowspan="1" class="name"><code>symm</code><a shape="rect" name="property_theorem-setoid-symm"> </a></td><td colspan="1" rowspan="1"/></tr><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:f="focdoc.dtd" mode="inline"><mml:mstyle color="teal">
    <mml:mrow><mml:mi>&#x2200;</mml:mi><mml:mrow><mml:mrow><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">&#x2208;</mml:mo><mml:mrow><mml:mi>self</mml:mi></mml:mrow></mml:mrow></mml:mrow><mml:mo>.</mml:mo><mml:mfenced><mml:mrow><mml:mi>&#x2200;</mml:mi><mml:mrow><mml:mrow><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">&#x2208;</mml:mo><mml:mrow><mml:mi>self</mml:mi></mml:mrow></mml:mrow></mml:mrow><mml:mo>.</mml:mo><mml:mfenced><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">=</mml:mo><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">&#x21D2;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">=</mml:mo><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow>
   </mml:mstyle></mml:math></td></tr><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><div class="comments">Yet another property of equal.</div></td></tr></table><div class="refhead"><a shape="rect" href="#head">top</a></div><h2>Species: <code>monoid</code><a shape="rect" name="species-monoid"> </a></h2><p><code class="foc"><code class="key1">species</code> monoid <code class="key1">inherits</code> <a shape="rect" href="#species-setoid">setoid</a></code></p><table><tr><td colspan="1" rowspan="1" class="categ">signature</td><td colspan="1" rowspan="1" class="name"><code>mult</code><a shape="rect" name="monoid-mult"> </a></td><td colspan="1" rowspan="1"><code><code class="type"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:f="focdoc.dtd" mode="inline"><mml:mstyle color="salmon"><mml:mrow><mml:mrow><mml:mi>mult</mml:mi></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">&#x2208;</mml:mo><mml:mrow><mml:mi mathvariant="italic">FuncSpace</mml:mi><mml:mo/><mml:mfenced open="(" close=")" separators=","><mml:mrow><mml:mi>self</mml:mi></mml:mrow><mml:mrow><mml:mi mathvariant="italic">FuncSpace</mml:mi><mml:mo/><mml:mfenced open="(" close=")" separators=","><mml:mrow><mml:mi>self</mml:mi></mml:mrow><mml:mrow><mml:mi>self</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mrow></mml:mstyle></mml:math></code></code></td></tr><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><div class="comments">a binary operation on self.</div></td></tr><tr><td colspan="1" rowspan="1" class="categ">signature</td><td colspan="1" rowspan="1" class="name"><code>one</code><a shape="rect" name="monoid-one"> </a></td><td colspan="1" rowspan="1"><code><code class="type"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:f="focdoc.dtd" mode="inline"><mml:mstyle color="fuchsia"><mml:mrow><mml:mi>self</mml:mi></mml:mrow></mml:mstyle></mml:math></code></code></td></tr><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><div class="comments">one, neutral element for mult. (Note: the corresponding property has not be written yet).</div></td></tr></table><div class="refhead"><a shape="rect" href="#head">top</a></div><h2>Species: <code>setoid_product</code><a shape="rect" name="species-setoid_product"> </a></h2><p><code class="foc"><code class="key1">species</code> setoid_product <code class="key2">(</code><code>a</code><a shape="rect" name="setoid_product-a"> </a> <code class="key2">is</code> <code class="type"><a shape="rect" href="#species-setoid">setoid</a></code><code class="key2">,</code><code>b</code><a shape="rect" name="setoid_product-b"> </a> <code class="key2">is</code> <code class="type"><a shape="rect" href="#species-setoid">setoid</a></code><code class="key2">)</code> <code class="key1">inherits</code> <a shape="rect" href="#species-setoid">setoid</a></code></p><table><tr><td colspan="1" rowspan="1" class="categ">carrier type </td><td colspan="1" rowspan="1" class="name"><code/><a shape="rect" name="setoid_product-"> </a></td><td colspan="1" rowspan="1"><code class="type">a<code class="key2"> * </code>b</code></td></tr><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><div class="dependence">from: <a shape="rect" href="#species-setoid">setoid</a> (<a shape="rect" href="#setoid-"/>), first def: <a shape="rect" href="basics.xml#species-basic_object">basic_object</a> (<a shape="rect" href="basics.xml#basic_object-"/> )</div></td></tr><tr><td colspan="1" rowspan="1"><div class="comments">the carrier is simply the product of the carrier of a and b.</div></td></tr><tr><td colspan="1" rowspan="1" class="categ">theorem</td><td colspan="1" rowspan="1" class="name"><code>refl</code><a shape="rect" name="property_theorem-setoid_product-refl"> </a></td><td colspan="1" rowspan="1"><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><div class="dependence">from: <a shape="rect" href="#species-setoid">setoid</a> (<a shape="rect" href="#property_theorem-setoid-refl">refl</a>), first def: <a shape="rect" href="#species-setoid">setoid</a> (<a shape="rect" href="#property_theorem-setoid-refl">refl</a> )</div></td></tr></td></tr><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:f="focdoc.dtd" mode="inline"><mml:mstyle color="teal">
    <mml:mrow><mml:mi>&#x2200;</mml:mi><mml:mrow><mml:mrow><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">&#x2208;</mml:mo><mml:mrow><mml:mi>self</mml:mi></mml:mrow></mml:mrow></mml:mrow><mml:mo>.</mml:mo><mml:mfenced><mml:mrow><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">=</mml:mo><mml:mrow><mml:mi>x</mml:mi></mml:mrow></mml:mrow></mml:mfenced></mml:mrow>
   </mml:mstyle></mml:math></td></tr><tr><td colspan="1" rowspan="1" class="categ">theorem</td><td colspan="1" rowspan="1" class="name"><code>symm</code><a shape="rect" name="property_theorem-setoid_product-symm"> </a></td><td colspan="1" rowspan="1"><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><div class="dependence">from: <a shape="rect" href="#species-setoid">setoid</a> (<a shape="rect" href="#property_theorem-setoid-symm">symm</a>), first def: <a shape="rect" href="#species-setoid">setoid</a> (<a shape="rect" href="#property_theorem-setoid-symm">symm</a> )</div></td></tr></td></tr><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:f="focdoc.dtd" mode="inline"><mml:mstyle color="teal">
    <mml:mrow><mml:mi>&#x2200;</mml:mi><mml:mrow><mml:mrow><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">&#x2208;</mml:mo><mml:mrow><mml:mi>self</mml:mi></mml:mrow></mml:mrow></mml:mrow><mml:mo>.</mml:mo><mml:mfenced><mml:mrow><mml:mi>&#x2200;</mml:mi><mml:mrow><mml:mrow><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">&#x2208;</mml:mo><mml:mrow><mml:mi>self</mml:mi></mml:mrow></mml:mrow></mml:mrow><mml:mo>.</mml:mo><mml:mfenced><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">=</mml:mo><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">&#x21D2;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">=</mml:mo><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow>
   </mml:mstyle></mml:math></td></tr><tr><td colspan="1" rowspan="1" class="categ">definition</td><td colspan="1" rowspan="1" class="name"><code>create</code><a shape="rect" name="definition-setoid_product-create"> </a></td><td colspan="1" rowspan="1"><code><code class="type">a<code class="key2"> -&gt; </code>b<code class="key2"> -&gt; </code><code class="key3">self</code></code></code></td></tr><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><div class="comments">Simply takes two elements and makes a pair.</div></td></tr><tr><td colspan="1" rowspan="1" class="categ">definition</td><td colspan="1" rowspan="1" class="name"><code>first</code><a shape="rect" name="definition-setoid_product-first"> </a></td><td colspan="1" rowspan="1"><code><code class="type"><code class="key3">self</code><code class="key2"> -&gt; </code>a</code></code></td></tr><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><div class="comments">first projection.</div></td></tr><tr><td colspan="1" rowspan="1" class="categ">theorem</td><td colspan="1" rowspan="1" class="name"><code>first_proj</code><a shape="rect" name="property_theorem-setoid_product-first_proj"> </a></td><td colspan="1" rowspan="1"/></tr><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:f="focdoc.dtd" mode="inline"><mml:mstyle color="teal">
    <mml:mrow><mml:mi>&#x2200;</mml:mi><mml:mrow><mml:mrow><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">&#x2208;</mml:mo><mml:mrow><mml:mi>self</mml:mi></mml:mrow></mml:mrow></mml:mrow><mml:mo>.</mml:mo><mml:mfenced><mml:mrow><mml:mi>&#x2200;</mml:mi><mml:mrow><mml:mrow><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">&#x2208;</mml:mo><mml:mrow><mml:mi>self</mml:mi></mml:mrow></mml:mrow></mml:mrow><mml:mo>.</mml:mo><mml:mfenced><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">=</mml:mo><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">&#x21D2;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mrow><mml:mi>first</mml:mi></mml:mrow><mml:mo/><mml:mfenced open="(" close=")" separators=","><mml:mrow><mml:mi>x</mml:mi></mml:mrow></mml:mfenced></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">=</mml:mo><mml:mrow><mml:mrow><mml:mi>first</mml:mi></mml:mrow><mml:mo/><mml:mfenced open="(" close=")" separators=","><mml:mrow><mml:mi>y</mml:mi></mml:mrow></mml:mfenced></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow>
   </mml:mstyle></mml:math></td></tr><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><div class="comments">equality is extensionnal.</div></td></tr></table><div class="refhead"><a shape="rect" href="#head">top</a></div><h2>Species: <code>monoid_product</code><a shape="rect" name="species-monoid_product"> </a></h2><p><code class="foc"><code class="key1">species</code> monoid_product <code class="key2">(</code><code>a</code><a shape="rect" name="monoid_product-a"> </a> <code class="key2">is</code> <code class="type"><a shape="rect" href="#species-monoid">monoid</a></code><code class="key2">,</code><code>b</code><a shape="rect" name="monoid_product-b"> </a> <code class="key2">is</code> <code class="type"><a shape="rect" href="#species-monoid">monoid</a></code><code class="key2">)</code> <code class="key1">inherits</code> <a shape="rect" href="#species-monoid">monoid</a><code class="key2">,</code><a shape="rect" href="#species-setoid_product">setoid_product</a></code></p><table><tr><td colspan="1" rowspan="1" class="categ">carrier type </td><td colspan="1" rowspan="1" class="name"><code/><a shape="rect" name="monoid_product-"> </a></td><td colspan="1" rowspan="1"><code class="type">a<code class="key2"> * </code>b</code></td></tr><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><div class="dependence">from: <a shape="rect" href="#species-setoid_product">setoid_product</a> (<a shape="rect" href="#setoid_product-"/>), first def: <a shape="rect" href="basics.xml#species-basic_object">basic_object</a> (<a shape="rect" href="basics.xml#basic_object-"/> )</div></td></tr></table><div class="refhead"><a shape="rect" href="#head">top</a></div><h2>Collection: <code>integers</code><a shape="rect" name="collection-integers"> </a></h2><p class="comments">we can now implement a real monoid, based over the integers of FoC, and the basic operations over them.</p><p><code class="foc"><code class="key1">collection</code> integers
   <code class="key1">implements</code> <a shape="rect" href="#species-">
   monoid
  </a></code></p><table><tr><td colspan="1" rowspan="1" class="categ">carrier type </td><td colspan="1" rowspan="1" class="name"><code/><a shape="rect" name="integers-"> </a></td><td colspan="1" rowspan="1"><code class="type">int</code></td></tr><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><div class="dependence">from: <a shape="rect" href="#species-monoid">monoid</a> (<a shape="rect" href="#monoid-"/>), first def: <a shape="rect" href="basics.xml#species-basic_object">basic_object</a> (<a shape="rect" href="basics.xml#basic_object-"/> )</div></td></tr><tr><td colspan="1" rowspan="1" class="categ">theorem</td><td colspan="1" rowspan="1" class="name"><code>refl</code><a shape="rect" name="property_theorem-integers-refl"> </a></td><td colspan="1" rowspan="1"><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><div class="dependence">from: <a shape="rect" href="#species-monoid">monoid</a> (<a shape="rect" href="#property_theorem-monoid-refl">refl</a>), first def: <a shape="rect" href="#species-setoid">setoid</a> (<a shape="rect" href="#property_theorem-setoid-refl">refl</a> )</div></td></tr></td></tr><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:f="focdoc.dtd" mode="inline"><mml:mstyle color="teal">
    <mml:mrow><mml:mi>&#x2200;</mml:mi><mml:mrow><mml:mrow><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">&#x2208;</mml:mo><mml:mrow><mml:mi>self</mml:mi></mml:mrow></mml:mrow></mml:mrow><mml:mo>.</mml:mo><mml:mfenced><mml:mrow><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">=</mml:mo><mml:mrow><mml:mi>x</mml:mi></mml:mrow></mml:mrow></mml:mfenced></mml:mrow>
   </mml:mstyle></mml:math></td></tr><tr><td colspan="1" rowspan="1" class="categ">theorem</td><td colspan="1" rowspan="1" class="name"><code>symm</code><a shape="rect" name="property_theorem-integers-symm"> </a></td><td colspan="1" rowspan="1"><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><div class="dependence">from: <a shape="rect" href="#species-monoid">monoid</a> (<a shape="rect" href="#property_theorem-monoid-symm">symm</a>), first def: <a shape="rect" href="#species-setoid">setoid</a> (<a shape="rect" href="#property_theorem-setoid-symm">symm</a> )</div></td></tr></td></tr><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:f="focdoc.dtd" mode="inline"><mml:mstyle color="teal">
    <mml:mrow><mml:mi>&#x2200;</mml:mi><mml:mrow><mml:mrow><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">&#x2208;</mml:mo><mml:mrow><mml:mi>self</mml:mi></mml:mrow></mml:mrow></mml:mrow><mml:mo>.</mml:mo><mml:mfenced><mml:mrow><mml:mi>&#x2200;</mml:mi><mml:mrow><mml:mrow><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">&#x2208;</mml:mo><mml:mrow><mml:mi>self</mml:mi></mml:mrow></mml:mrow></mml:mrow><mml:mo>.</mml:mo><mml:mfenced><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">=</mml:mo><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">&#x21D2;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mo xmlns:mml="http://www.w3.org/1998/Math/MathML">=</mml:mo><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow>
   </mml:mstyle></mml:math></td></tr></table><div class="refhead"><a shape="rect" href="#head">top</a></div><h2>Collection: <code>integers_2</code><a shape="rect" name="collection-integers_2"> </a></h2><p class="comments">Cartesian product of the integer collection.</p><p><code class="foc"><code class="key1">collection</code> integers_2
   <code class="key1">implements</code> <a shape="rect" href="#species-">
   monoid_product
  </a></code></p><table><tr><td colspan="1" rowspan="1" class="categ">carrier type </td><td colspan="1" rowspan="1" class="name"><code/><a shape="rect" name="integers_2-"> </a></td><td colspan="1" rowspan="1"><code class="type">integers<code class="key2"> * </code>integers</code></td></tr><tr><td rowspan="1" colspan="2"/><td colspan="1" rowspan="1"><div class="dependence">from: <a shape="rect" href="#species-monoid_product">monoid_product</a> (<a shape="rect" href="#monoid_product-"/>), first def: <a shape="rect" href="basics.xml#species-basic_object">basic_object</a> (<a shape="rect" href="basics.xml#basic_object-"/> )</div></td></tr></table><div class="refhead"><a shape="rect" href="#head">top</a></div></body>
</html>
