1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>Collectors: Maps of Sets</title> 5<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../../index.html" title="Chapter 1. Boost.Icl"> 8<link rel="up" href="../semantics.html" title="Semantics"> 9<link rel="prev" href="maps.html" title="Maps"> 10<link rel="next" href="quantifiers__maps_of_numbers.html" title="Quantifiers: Maps of Numbers"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> 15<td align="center"><a href="../../../../../../index.html">Home</a></td> 16<td align="center"><a href="../../../../../libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="maps.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../semantics.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="quantifiers__maps_of_numbers.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h3 class="title"> 27<a name="boost_icl.semantics.collectors__maps_of_sets"></a><a class="link" href="collectors__maps_of_sets.html" title="Collectors: Maps of Sets">Collectors: 28 Maps of Sets</a> 29</h3></div></div></div> 30<p> 31 Icl <code class="computeroutput"><span class="identifier">Collectors</span></code>, behave like 32 <code class="computeroutput"><span class="identifier">Sets</span></code>. This can be understood 33 easily, if we consider, that every map of sets can be transformed to an equivalent 34 set of pairs. For instance in the pseudocode below map <code class="computeroutput"><span class="identifier">m</span></code> 35</p> 36<pre class="programlisting"><span class="identifier">icl</span><span class="special">::</span><span class="identifier">map</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="identifier">set</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">></span> <span class="identifier">m</span> <span class="special">=</span> <span class="special">{(</span><span class="number">1</span><span class="special">->{</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">}),</span> <span class="special">(</span><span class="number">2</span><span class="special">->{</span><span class="number">1</span><span class="special">})};</span> 37</pre> 38<p> 39 is equivalent to set <code class="computeroutput"><span class="identifier">s</span></code> 40</p> 41<pre class="programlisting"><span class="identifier">icl</span><span class="special">::</span><span class="identifier">set</span><span class="special"><</span><span class="identifier">pair</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="special">></span> <span class="identifier">s</span> <span class="special">=</span> <span class="special">{(</span><span class="number">1</span><span class="special">,</span><span class="number">1</span><span class="special">),(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">),</span> <span class="comment">//representing 1->{1,2}</span> 42 <span class="special">(</span><span class="number">2</span><span class="special">,</span><span class="number">1</span><span class="special">)</span> <span class="special">};</span> <span class="comment">//representing 2->{1}</span> 43</pre> 44<p> 45 </p> 46<p> 47 Also the results of add, subtract and other operations on <code class="computeroutput"><span class="identifier">map</span> 48 <span class="identifier">m</span></code> and <code class="computeroutput"><span class="identifier">set</span> 49 <span class="identifier">s</span></code> preserves the equivalence of 50 the containers <span class="emphasis"><em><span class="bold"><strong>almost</strong></span></em></span> 51 perfectly: 52</p> 53<pre class="programlisting"><span class="identifier">m</span> <span class="special">+=</span> <span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">3</span><span class="special">);</span> 54<span class="identifier">m</span> <span class="special">==</span> <span class="special">{(</span><span class="number">1</span><span class="special">->{</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">}),</span> <span class="special">(</span><span class="number">2</span><span class="special">->{</span><span class="number">1</span><span class="special">})};</span> <span class="comment">//aggregated on collision of key value 1</span> 55<span class="identifier">s</span> <span class="special">+=</span> <span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">3</span><span class="special">);</span> 56<span class="identifier">s</span> <span class="special">==</span> <span class="special">{(</span><span class="number">1</span><span class="special">,</span><span class="number">1</span><span class="special">),(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">),(</span><span class="number">1</span><span class="special">,</span><span class="number">3</span><span class="special">),</span> <span class="comment">//representing 1->{1,2,3}</span> 57 <span class="special">(</span><span class="number">2</span><span class="special">,</span><span class="number">1</span><span class="special">)</span> <span class="special">};</span> <span class="comment">//representing 2->{1}</span> 58</pre> 59<p> 60 </p> 61<p> 62 The equivalence of <code class="computeroutput"><span class="identifier">m</span></code> and 63 <code class="computeroutput"><span class="identifier">s</span></code> is only violated if an 64 empty set occurres in <code class="computeroutput"><span class="identifier">m</span></code> by 65 subtraction of a value pair: 66</p> 67<pre class="programlisting"><span class="identifier">m</span> <span class="special">-=</span> <span class="special">(</span><span class="number">2</span><span class="special">,</span><span class="number">1</span><span class="special">);</span> 68<span class="identifier">m</span> <span class="special">==</span> <span class="special">{(</span><span class="number">1</span><span class="special">->{</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">}),</span> <span class="special">(</span><span class="number">2</span><span class="special">->{})};</span> <span class="comment">//aggregated on collision of key value 2</span> 69<span class="identifier">s</span> <span class="special">-=</span> <span class="special">(</span><span class="number">2</span><span class="special">,</span><span class="number">1</span><span class="special">);</span> 70<span class="identifier">s</span> <span class="special">==</span> <span class="special">{(</span><span class="number">1</span><span class="special">,</span><span class="number">1</span><span class="special">),(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">),(</span><span class="number">1</span><span class="special">,</span><span class="number">3</span><span class="special">)</span> <span class="comment">//representing 1->{1,2,3}</span> 71 <span class="special">};</span> <span class="comment">//2->{} is not represented in s</span> 72</pre> 73<p> 74 </p> 75<p> 76 This problem can be dealt with in two ways. 77 </p> 78<div class="orderedlist"><ol class="orderedlist" type="1"> 79<li class="listitem"> 80 Deleting value pairs form the Collector, if it's associated value becomes 81 a neutral value or <code class="computeroutput"><span class="identifier">identity_element</span></code>. 82 </li> 83<li class="listitem"> 84 Using a different equality, called distinct equality in the laws to validate. 85 Distinct equality only accounts for value pairs that that carry values 86 unequal to the <code class="computeroutput"><span class="identifier">identity_element</span></code>. 87 </li> 88</ol></div> 89<p> 90 Solution (1) led to the introduction of map traits, particularly trait <span class="emphasis"><em><span class="bold"><strong>partial_absorber</strong></span></em></span>, which is the default 91 setting in all icl's map templates. 92 </p> 93<p> 94 Solution (2), is applied to check the semantics of icl::Maps for the partial_enricher 95 trait that does not delete value pairs that carry identity elements. Distinct 96 equality is implemented by a non member function called <code class="computeroutput"><span class="identifier">is_distinct_equal</span></code>. 97 Throughout this chapter distinct equality in pseudocode and law denotations 98 is denoted as <code class="computeroutput"><span class="special">=</span><span class="identifier">d</span><span class="special">=</span></code> operator. 99 </p> 100<p> 101 The validity of the sets of laws that make up <code class="computeroutput"><span class="identifier">Set</span></code> 102 semantics should now be quite evident. So the following text shows the laws 103 that are validated for all <code class="computeroutput"><span class="identifier">Collector</span></code> 104 types <code class="computeroutput"><span class="identifier">C</span></code>. Which are <code class="computeroutput"><a class="link" href="../../boost/icl/map.html" title="Class template map">icl::map</a></code><code class="computeroutput"><span class="special"><</span><span class="identifier">D</span><span class="special">,</span><span class="identifier">S</span><span class="special">,</span><span class="identifier">T</span><span class="special">></span></code>, 105 <code class="computeroutput"><a class="link" href="../../boost/icl/interval_map.html" title="Class template interval_map">interval_map</a></code><code class="computeroutput"><span class="special"><</span><span class="identifier">D</span><span class="special">,</span><span class="identifier">S</span><span class="special">,</span><span class="identifier">T</span><span class="special">></span></code> and <code class="computeroutput"><a class="link" href="../../boost/icl/split_interval_map.html" title="Class template split_interval_map">split_interval_map</a></code><code class="computeroutput"><span class="special"><</span><span class="identifier">D</span><span class="special">,</span><span class="identifier">S</span><span class="special">,</span><span class="identifier">T</span><span class="special">></span></code> where <code class="computeroutput"><span class="identifier">CodomainT</span></code> 106 type <code class="computeroutput"><span class="identifier">S</span></code> is a model of <code class="computeroutput"><span class="identifier">Set</span></code> and <code class="computeroutput"><span class="identifier">Trait</span></code> 107 type <code class="computeroutput"><span class="identifier">T</span></code> is either <code class="computeroutput"><a class="link" href="../../boost/icl/partial_absorber.html" title="Struct partial_absorber">partial_absorber</a></code> or <code class="computeroutput"><a class="link" href="../../boost/icl/partial_enricher.html" title="Struct partial_enricher">partial_enricher</a></code>. 108 </p> 109<h6> 110<a name="boost_icl.semantics.collectors__maps_of_sets.h0"></a> 111 <span class="phrase"><a name="boost_icl.semantics.collectors__maps_of_sets.laws_on_set_union__set_intersection_and_set_difference"></a></span><a class="link" href="collectors__maps_of_sets.html#boost_icl.semantics.collectors__maps_of_sets.laws_on_set_union__set_intersection_and_set_difference">Laws 112 on set union, set intersection and set difference</a> 113 </h6> 114<p> 115</p> 116<pre class="programlisting"><span class="identifier">Associativity</span><span class="special"><</span><span class="identifier">C</span><span class="special">,+,==</span> <span class="special">>:</span> <span class="identifier">C</span> <span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">,</span><span class="identifier">c</span><span class="special">;</span> <span class="identifier">a</span><span class="special">+(</span><span class="identifier">b</span><span class="special">+</span><span class="identifier">c</span><span class="special">)</span> <span class="special">==</span> <span class="special">(</span><span class="identifier">a</span><span class="special">+</span><span class="identifier">b</span><span class="special">)+</span><span class="identifier">c</span> 117<span class="identifier">Neutrality</span><span class="special"><</span><span class="identifier">C</span><span class="special">,+,==</span> <span class="special">></span> <span class="special">:</span> <span class="identifier">C</span> <span class="identifier">a</span><span class="special">;</span> <span class="identifier">a</span><span class="special">+</span><span class="identifier">C</span><span class="special">()</span> <span class="special">==</span> <span class="identifier">a</span> 118<span class="identifier">Commutativity</span><span class="special"><</span><span class="identifier">C</span><span class="special">,+,==</span> <span class="special">>:</span> <span class="identifier">C</span> <span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">;</span> <span class="identifier">a</span><span class="special">+</span><span class="identifier">b</span> <span class="special">==</span> <span class="identifier">b</span><span class="special">+</span><span class="identifier">a</span> 119 120<span class="identifier">Associativity</span><span class="special"><</span><span class="identifier">C</span><span class="special">,&,==</span> <span class="special">>:</span> <span class="identifier">C</span> <span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">,</span><span class="identifier">c</span><span class="special">;</span> <span class="identifier">a</span><span class="special">&(</span><span class="identifier">b</span><span class="special">&</span><span class="identifier">c</span><span class="special">)</span> <span class="special">==(</span><span class="identifier">a</span><span class="special">&</span><span class="identifier">b</span><span class="special">)&</span><span class="identifier">c</span> 121<span class="identifier">Commutativity</span><span class="special"><</span><span class="identifier">C</span><span class="special">,&,==</span> <span class="special">>:</span> <span class="identifier">C</span> <span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">;</span> <span class="identifier">a</span><span class="special">&</span><span class="identifier">b</span> <span class="special">==</span> <span class="identifier">b</span><span class="special">&</span><span class="identifier">a</span> 122 123<span class="identifier">RightNeutrality</span><span class="special"><</span><span class="identifier">C</span><span class="special">,-,==</span> <span class="special">>:</span> <span class="identifier">C</span> <span class="identifier">a</span><span class="special">;</span> <span class="identifier">a</span><span class="special">-</span><span class="identifier">C</span><span class="special">()</span> <span class="special">==</span> <span class="identifier">a</span> 124<span class="identifier">Inversion</span><span class="special"><</span><span class="identifier">C</span><span class="special">,-,=</span><span class="identifier">v</span><span class="special">=</span> <span class="special">></span> <span class="special">:</span> <span class="identifier">C</span> <span class="identifier">a</span><span class="special">;</span> <span class="identifier">a</span> <span class="special">-</span> <span class="identifier">a</span> <span class="special">=</span><span class="identifier">v</span><span class="special">=</span> <span class="identifier">C</span><span class="special">()</span> 125</pre> 126<p> 127 </p> 128<p> 129 All the fundamental laws could be validated for all icl Maps in their instantiation 130 as Maps of Sets or Collectors. As expected, Inversion only holds for distinct 131 equality, if the map is not a <code class="computeroutput"><span class="identifier">partial_absorber</span></code>. 132 </p> 133<p> 134</p> 135<pre class="programlisting"> <span class="special">+</span> <span class="special">&</span> <span class="special">-</span> 136<span class="identifier">Associativity</span> <span class="special">==</span> <span class="special">==</span> 137<span class="identifier">Neutrality</span> <span class="special">==</span> <span class="special">==</span> 138<span class="identifier">Commutativity</span> <span class="special">==</span> <span class="special">==</span> 139<span class="identifier">Inversion</span> <span class="identifier">partial_absorber</span> <span class="special">==</span> 140 <span class="identifier">partial_enricher</span> <span class="special">=</span><span class="identifier">d</span><span class="special">=</span> 141</pre> 142<p> 143 </p> 144<h6> 145<a name="boost_icl.semantics.collectors__maps_of_sets.h1"></a> 146 <span class="phrase"><a name="boost_icl.semantics.collectors__maps_of_sets.distributivity_laws"></a></span><a class="link" href="collectors__maps_of_sets.html#boost_icl.semantics.collectors__maps_of_sets.distributivity_laws">Distributivity 147 Laws</a> 148 </h6> 149<p> 150</p> 151<pre class="programlisting"> <span class="identifier">Distributivity</span><span class="special"><</span><span class="identifier">C</span><span class="special">,+,&,=</span><span class="identifier">v</span><span class="special">=</span> <span class="special">></span> <span class="special">:</span> <span class="identifier">C</span> <span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">,</span><span class="identifier">c</span><span class="special">;</span> <span class="identifier">a</span> <span class="special">+</span> <span class="special">(</span><span class="identifier">b</span> <span class="special">&</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">=</span><span class="identifier">v</span><span class="special">=</span> <span class="special">(</span><span class="identifier">a</span> <span class="special">+</span> <span class="identifier">b</span><span class="special">)</span> <span class="special">&</span> <span class="special">(</span><span class="identifier">a</span> <span class="special">+</span> <span class="identifier">c</span><span class="special">)</span> 152 <span class="identifier">Distributivity</span><span class="special"><</span><span class="identifier">C</span><span class="special">,&,+,=</span><span class="identifier">v</span><span class="special">=</span> <span class="special">></span> <span class="special">:</span> <span class="identifier">C</span> <span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">,</span><span class="identifier">c</span><span class="special">;</span> <span class="identifier">a</span> <span class="special">&</span> <span class="special">(</span><span class="identifier">b</span> <span class="special">+</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">=</span><span class="identifier">v</span><span class="special">=</span> <span class="special">(</span><span class="identifier">a</span> <span class="special">&</span> <span class="identifier">b</span><span class="special">)</span> <span class="special">+</span> <span class="special">(</span><span class="identifier">a</span> <span class="special">&</span> <span class="identifier">c</span><span class="special">)</span> 153<span class="identifier">RightDistributivity</span><span class="special"><</span><span class="identifier">C</span><span class="special">,+,-,=</span><span class="identifier">v</span><span class="special">=</span> <span class="special">></span> <span class="special">:</span> <span class="identifier">C</span> <span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">,</span><span class="identifier">c</span><span class="special">;</span> <span class="special">(</span><span class="identifier">a</span> <span class="special">+</span> <span class="identifier">b</span><span class="special">)</span> <span class="special">-</span> <span class="identifier">c</span> <span class="special">=</span><span class="identifier">v</span><span class="special">=</span> <span class="special">(</span><span class="identifier">a</span> <span class="special">-</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">+</span> <span class="special">(</span><span class="identifier">b</span> <span class="special">-</span> <span class="identifier">c</span><span class="special">)</span> 154<span class="identifier">RightDistributivity</span><span class="special"><</span><span class="identifier">C</span><span class="special">,&,-,=</span><span class="identifier">v</span><span class="special">=</span> <span class="special">></span> <span class="special">:</span> <span class="identifier">C</span> <span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">,</span><span class="identifier">c</span><span class="special">;</span> <span class="special">(</span><span class="identifier">a</span> <span class="special">&</span> <span class="identifier">b</span><span class="special">)</span> <span class="special">-</span> <span class="identifier">c</span> <span class="special">=</span><span class="identifier">v</span><span class="special">=</span> <span class="special">(</span><span class="identifier">a</span> <span class="special">-</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">&</span> <span class="special">(</span><span class="identifier">b</span> <span class="special">-</span> <span class="identifier">c</span><span class="special">)</span> 155</pre> 156<p> 157 </p> 158<p> 159 Results for the distributivity laws are almost identical to the validation 160 of sets except that for a <code class="computeroutput"><span class="identifier">partial_enricher</span> 161 <span class="identifier">map</span></code> the law <code class="computeroutput"><span class="special">(</span><span class="identifier">a</span> <span class="special">&</span> <span class="identifier">b</span><span class="special">)</span> <span class="special">-</span> 162 <span class="identifier">c</span> <span class="special">==</span> 163 <span class="special">(</span><span class="identifier">a</span> <span class="special">-</span> <span class="identifier">c</span><span class="special">)</span> 164 <span class="special">&</span> <span class="special">(</span><span class="identifier">b</span> <span class="special">-</span> <span class="identifier">c</span><span class="special">)</span></code> holds for lexicographical equality. 165 </p> 166<p> 167</p> 168<pre class="programlisting"> <span class="special">+,&</span> <span class="special">&,+</span> 169 <span class="identifier">Distributivity</span> <span class="identifier">joining</span> <span class="special">==</span> <span class="special">==</span> 170 <span class="identifier">splitting</span> <span class="identifier">partial_absorber</span> <span class="special">=</span><span class="identifier">e</span><span class="special">=</span> <span class="special">=</span><span class="identifier">e</span><span class="special">=</span> 171 <span class="identifier">partial_enricher</span> <span class="special">=</span><span class="identifier">e</span><span class="special">=</span> <span class="special">==</span> 172 173 <span class="special">+,-</span> <span class="special">&,-</span> 174<span class="identifier">RightDistributivity</span> <span class="identifier">joining</span> <span class="special">==</span> <span class="special">==</span> 175 <span class="identifier">splitting</span> <span class="special">=</span><span class="identifier">e</span><span class="special">=</span> <span class="special">==</span> 176</pre> 177<p> 178 </p> 179<h6> 180<a name="boost_icl.semantics.collectors__maps_of_sets.h2"></a> 181 <span class="phrase"><a name="boost_icl.semantics.collectors__maps_of_sets.demorgan_s_law_and_symmetric_difference"></a></span><a class="link" href="collectors__maps_of_sets.html#boost_icl.semantics.collectors__maps_of_sets.demorgan_s_law_and_symmetric_difference">DeMorgan's 182 Law and Symmetric Difference</a> 183 </h6> 184<p> 185</p> 186<pre class="programlisting"><span class="identifier">DeMorgan</span><span class="special"><</span><span class="identifier">C</span><span class="special">,+,&,=</span><span class="identifier">v</span><span class="special">=</span> <span class="special">></span> <span class="special">:</span> <span class="identifier">C</span> <span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">,</span><span class="identifier">c</span><span class="special">;</span> <span class="identifier">a</span> <span class="special">-</span> <span class="special">(</span><span class="identifier">b</span> <span class="special">+</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">=</span><span class="identifier">v</span><span class="special">=</span> <span class="special">(</span><span class="identifier">a</span> <span class="special">-</span> <span class="identifier">b</span><span class="special">)</span> <span class="special">&</span> <span class="special">(</span><span class="identifier">a</span> <span class="special">-</span> <span class="identifier">c</span><span class="special">)</span> 187<span class="identifier">DeMorgan</span><span class="special"><</span><span class="identifier">C</span><span class="special">,&,+,=</span><span class="identifier">v</span><span class="special">=</span> <span class="special">></span> <span class="special">:</span> <span class="identifier">C</span> <span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">,</span><span class="identifier">c</span><span class="special">;</span> <span class="identifier">a</span> <span class="special">-</span> <span class="special">(</span><span class="identifier">b</span> <span class="special">&</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">=</span><span class="identifier">v</span><span class="special">=</span> <span class="special">(</span><span class="identifier">a</span> <span class="special">-</span> <span class="identifier">b</span><span class="special">)</span> <span class="special">+</span> <span class="special">(</span><span class="identifier">a</span> <span class="special">-</span> <span class="identifier">c</span><span class="special">)</span> 188</pre> 189<p> 190 </p> 191<p> 192</p> 193<pre class="programlisting"> <span class="special">+,&</span> <span class="special">&,+</span> 194<span class="identifier">DeMorgan</span> <span class="identifier">joining</span> <span class="special">==</span> <span class="special">==</span> 195 <span class="identifier">splitting</span> <span class="special">==</span> <span class="special">=</span><span class="identifier">e</span><span class="special">=</span> 196</pre> 197<p> 198 </p> 199<p> 200</p> 201<pre class="programlisting"><span class="identifier">SymmetricDifference</span><span class="special"><</span><span class="identifier">C</span><span class="special">,==</span> <span class="special">></span> <span class="special">:</span> <span class="identifier">C</span> <span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">,</span><span class="identifier">c</span><span class="special">;</span> <span class="special">(</span><span class="identifier">a</span> <span class="special">+</span> <span class="identifier">b</span><span class="special">)</span> <span class="special">-</span> <span class="special">(</span><span class="identifier">a</span> <span class="special">*</span> <span class="identifier">b</span><span class="special">)</span> <span class="special">==</span> <span class="special">(</span><span class="identifier">a</span> <span class="special">-</span> <span class="identifier">b</span><span class="special">)</span> <span class="special">+</span> <span class="special">(</span><span class="identifier">b</span> <span class="special">-</span> <span class="identifier">a</span><span class="special">)</span> 202</pre> 203<p> 204 </p> 205<p> 206 Reviewing the validity tables above shows, that the sets of valid laws for 207 <code class="computeroutput"><span class="identifier">icl</span> <span class="identifier">Sets</span></code> 208 and <code class="computeroutput"><span class="identifier">icl</span> <span class="identifier">Maps</span> 209 <span class="identifier">of</span> <span class="identifier">Sets</span></code> 210 that are <span class="emphasis"><em>identity absorbing</em></span> are exactly the same. As 211 expected, only for Maps of Sets that represent empty sets as associated values, 212 called <span class="emphasis"><em>identity enrichers</em></span>, there are marginal semantic 213 differences. 214 </p> 215</div> 216<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 217<td align="left"></td> 218<td align="right"><div class="copyright-footer">Copyright © 2007-2010 Joachim 219 Faulhaber<br>Copyright © 1999-2006 Cortex Software 220 GmbH<p> 221 Distributed under the Boost Software License, Version 1.0. (See accompanying 222 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 223 </p> 224</div></td> 225</tr></table> 226<hr> 227<div class="spirit-nav"> 228<a accesskey="p" href="maps.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../semantics.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="quantifiers__maps_of_numbers.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> 229</div> 230</body> 231</html> 232