UNPKG

@ciao-lang/ts-ciao-interface

Version:

Simple Ciao interface for node.

103 lines 26.7 kB
<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta name="theme-color" content="#273f79"/><link rel="stylesheet" href="lpdoc.css" type="text/css"/><script type="text/javascript" src="lpdoc.js"></script><title>Set operations &mdash; The Ciao System v1.22</title></head><body><div class="lpdoc-page fixleftbar"><a href="#" id="sidebar-toggle-button" class="lpdoc-navbutton"><span id="sidebar-button-arrow">&#9776;</span></a><div id="sidebar" class="lpdoc-sidebar"><div style="height: 40px; margin-left: auto; margin-right: auto"><img src="ciao-logo_autofig.png" width=auto height=100%></div><div class="lpdoc-nav"><span class="lpdoc-on-right"><a class="lpdoc-navbutton" href="DataStructuresAlgs.html">&#x2191;</a><a class="lpdoc-navbutton" href="queues.html">&#x2190;</a><a class="lpdoc-navbutton" href="bitcodesets.html">&#x2192;</a><a class="lpdoc-navbutton" href="ciaosearch.html">&#x1F50D;</a></span><span><a href="ciaofulltoc.html">TOC</a></span></div><hr></hr><ul class="lpdoc-itemize-sectpath"><li><a href="ciao.html">The Ciao System</a> &raquo;<br/> </li><li><a href="DataStructuresAlgs.html">PART VI - Data structures and algorithms</a> &raquo;<br/> </li><li><a href=""><strong>Set operations</strong></a></li></ul><hr></hr><em>ON THIS PAGE</em><ul><li><a href="#Usage and interface">Usage and interface</a></li><li><a href="#Documentation on exports">Documentation on exports</a></li><li><a href="#Documentation on imports">Documentation on imports</a></li></ul></div><div class="lpdoc-main"><div id=""><h1>Set operations</h1><a class="lpdoc-idx-anchor" href="ciaosearch.html#sets"></a> <strong>Author(s):</strong> <a class="lpdoc-idx-anchor" id="Lena Flood" href="ciaosearch.html#Lena Flood">Lena Flood</a>.<p> This module implements set operations. Sets are just ordered lists.<br/><div id="Usage and interface"><h2>Usage and interface</h2><div class="lpdoc-cartouche"><ul><li><strong>Library usage:</strong><br/><tt>:- use_module(library(sets)).</tt><li><strong>Exports:</strong><br/><ul class="lpdoc-itemize-minus"><li><em>Predicates:</em><br/><a class="lpdoc-idx-anchor" id="0" href="#insert/3"><tt>insert/3</tt></a>, <a class="lpdoc-idx-anchor" id="1" href="#ord_delete/3"><tt>ord_delete/3</tt></a>, <a class="lpdoc-idx-anchor" id="2" href="#ord_member/2"><tt>ord_member/2</tt></a>, <a class="lpdoc-idx-anchor" id="3" href="#ord_test_member/3"><tt>ord_test_member/3</tt></a>, <a class="lpdoc-idx-anchor" id="4" href="#ord_subtract/3"><tt>ord_subtract/3</tt></a>, <a class="lpdoc-idx-anchor" id="5" href="#ord_intersection/3"><tt>ord_intersection/3</tt></a>, <a class="lpdoc-idx-anchor" id="6" href="#ord_intersection_diff/4"><tt>ord_intersection_diff/4</tt></a>, <a class="lpdoc-idx-anchor" id="7" href="#ord_intersect/2"><tt>ord_intersect/2</tt></a>, <a class="lpdoc-idx-anchor" id="8" href="#ord_subset/2"><tt>ord_subset/2</tt></a>, <a class="lpdoc-idx-anchor" id="9" href="#ord_subset_diff/3"><tt>ord_subset_diff/3</tt></a>, <a class="lpdoc-idx-anchor" id="10" href="#ord_union/3"><tt>ord_union/3</tt></a>, <a class="lpdoc-idx-anchor" id="11" href="#ord_union_diff/4"><tt>ord_union_diff/4</tt></a>, <a class="lpdoc-idx-anchor" id="12" href="#ord_union_symdiff/4"><tt>ord_union_symdiff/4</tt></a>, <a class="lpdoc-idx-anchor" id="13" href="#ord_union_change/3"><tt>ord_union_change/3</tt></a>, <a class="lpdoc-idx-anchor" id="14" href="#merge/3"><tt>merge/3</tt></a>, <a class="lpdoc-idx-anchor" id="15" href="#ord_disjoint/2"><tt>ord_disjoint/2</tt></a>, <a class="lpdoc-idx-anchor" id="16" href="#setproduct/3"><tt>setproduct/3</tt></a>. </ul></ul></div></div><div id="Documentation on exports"><h2>Documentation on exports</h2><div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="insert/3" href="ciaosearch.html#insert/3">insert/3</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>insert(Set1,Element,Set2)</tt> </span><p>It is true when <span class="lpdoc-var">Set2</span> is <span class="lpdoc-var">Set1</span> with <span class="lpdoc-var">Element</span> inserted in it, preserving the order.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="17" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set1</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="18" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Element</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="19" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">Set2</span> is a free variable. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="ord_delete/3" href="ciaosearch.html#ord_delete/3">ord_delete/3</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>ord_delete(Set0,X,Set)</tt> </span><p>It succeeds if <span class="lpdoc-var">Set</span> is <span class="lpdoc-var">Set0</span> without element <span class="lpdoc-var">X</span>.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="20" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set0</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="21" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">X</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="22" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">Set</span> is a free variable. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="ord_member/2" href="ciaosearch.html#ord_member/2">ord_member/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>ord_member(X,Set)</tt> </span><p>It succeeds if <span class="lpdoc-var">X</span> is member of <span class="lpdoc-var">Set</span>.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="23" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">X</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="24" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set</span> is currently a term which is not a free variable. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="ord_test_member/3" href="ciaosearch.html#ord_test_member/3">ord_test_member/3</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>ord_test_member(Set,X,Result)</tt> </span><p>If <span class="lpdoc-var">X</span> is member of <span class="lpdoc-var">Set</span> then <span class="lpdoc-var">Result</span>=<tt>yes</tt>. Otherwise <span class="lpdoc-var">Result</span>=<tt>no</tt>.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="25" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="26" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">X</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="27" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">Result</span> is a free variable. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="ord_subtract/3" href="ciaosearch.html#ord_subtract/3">ord_subtract/3</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>ord_subtract(Set1,Set2,Difference)</tt> </span><p>It is true when <span class="lpdoc-var">Difference</span> contains all and only the elements of <span class="lpdoc-var">Set1</span> which are not also in <span class="lpdoc-var">Set2</span>.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="28" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set1</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="29" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set2</span> is currently a term which is not a free variable. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="ord_intersection/3" href="ciaosearch.html#ord_intersection/3">ord_intersection/3</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>ord_intersection(Set1,Set2,Intersection)</tt> </span><p>It is true when <span class="lpdoc-var">Intersection</span> is the ordered representation of <span class="lpdoc-var">Set1</span> and <span class="lpdoc-var">Set2</span>, provided that <span class="lpdoc-var">Set1</span> and <span class="lpdoc-var">Set2</span> are ordered lists.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="30" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set1</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="31" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set2</span> is currently a term which is not a free variable. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="ord_intersection_diff/4" href="ciaosearch.html#ord_intersection_diff/4">ord_intersection_diff/4</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>ord_intersection_diff(Set1,Set2,Intersect,NotIntersect)</tt> </span><p><span class="lpdoc-var">Intersect</span> contains those elements which are both in <span class="lpdoc-var">Set1</span> and <span class="lpdoc-var">Set2</span>, and <span class="lpdoc-var">NotIntersect</span> those which are in <span class="lpdoc-var">Set1</span> but not in <span class="lpdoc-var">Set2</span>.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="32" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set1</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="33" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set2</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="34" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">Intersect</span> is a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="35" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">NotIntersect</span> is a free variable. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="ord_intersect/2" href="ciaosearch.html#ord_intersect/2">ord_intersect/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>ord_intersect(Xs,Ys)</tt> </span><p>Succeeds when the two ordered lists have at least one element in common.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="36" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Xs</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="37" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Ys</span> is currently a term which is not a free variable. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="ord_subset/2" href="ciaosearch.html#ord_subset/2">ord_subset/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>ord_subset(Xs,Ys)</tt> </span><p>Succeeds when every element of <span class="lpdoc-var">Xs</span> appears in <span class="lpdoc-var">Ys</span>.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="38" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Xs</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="39" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Ys</span> is currently a term which is not a free variable. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="ord_subset_diff/3" href="ciaosearch.html#ord_subset_diff/3">ord_subset_diff/3</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>ord_subset_diff(Set1,Set2,Difference)</tt> </span><p>It succeeds when every element of <span class="lpdoc-var">Set1</span> appears in <span class="lpdoc-var">Set2</span> and <span class="lpdoc-var">Difference</span> has the elements of <span class="lpdoc-var">Set2</span> which are not in <span class="lpdoc-var">Set1</span>.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="40" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set1</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="41" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set2</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="42" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">Difference</span> is a free variable. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="ord_union/3" href="ciaosearch.html#ord_union/3">ord_union/3</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>ord_union(Set1,Set2,Union)</tt> </span><p>It is true when <span class="lpdoc-var">Union</span> is the union of <span class="lpdoc-var">Set1</span> and <span class="lpdoc-var">Set2</span>. When some element occurs in both sets, <span class="lpdoc-var">Union</span> retains only one copy.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="43" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set1</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="44" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set2</span> is currently a term which is not a free variable. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="ord_union_diff/4" href="ciaosearch.html#ord_union_diff/4">ord_union_diff/4</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>ord_union_diff(Set1,Set2,Union,Difference)</tt> </span><p>It succeeds when <span class="lpdoc-var">Union</span> is the union of <span class="lpdoc-var">Set1</span> and <span class="lpdoc-var">Set2</span>, and <span class="lpdoc-var">Difference</span> is <span class="lpdoc-var">Set2</span> set-minus <span class="lpdoc-var">Set1</span>.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="45" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set1</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="46" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set2</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="47" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">Union</span> is a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="48" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">Difference</span> is a free variable. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="ord_union_symdiff/4" href="ciaosearch.html#ord_union_symdiff/4">ord_union_symdiff/4</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>ord_union_symdiff(Set1,Set2,Union,Diff)</tt> </span><p>It is true when Diff is the symmetric difference of Set1 and Set2, and Union is the union of Set1 and Set2.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="49" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set1</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="50" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set2</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="51" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">Union</span> is a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="52" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">Diff</span> is a free variable. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="ord_union_change/3" href="ciaosearch.html#ord_union_change/3">ord_union_change/3</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>ord_union_change(Set1,Set2,Union)</tt> </span><p><span class="lpdoc-var">Union</span> is the union of <span class="lpdoc-var">Set1</span> and <span class="lpdoc-var">Set2</span> and <span class="lpdoc-var">Union</span> is different from <span class="lpdoc-var">Set2</span>.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="53" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set1</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="54" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set2</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="55" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">Union</span> is a free variable. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="merge/3" href="ciaosearch.html#merge/3">merge/3</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>merge(Set1,Set2,Union)</tt> </span><p>See <tt>ord_union/3</tt>.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="56" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set1</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="57" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set2</span> is currently a term which is not a free variable. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="ord_disjoint/2" href="ciaosearch.html#ord_disjoint/2">ord_disjoint/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>ord_disjoint(Set1,Set2)</tt> </span><p><span class="lpdoc-var">Set1</span> and <span class="lpdoc-var">Set2</span> have no element in common.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="58" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set1</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="59" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set2</span> is currently a term which is not a free variable. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="setproduct/3" href="ciaosearch.html#setproduct/3">setproduct/3</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>setproduct(Set1,Set2,Product)</tt> </span><p><span class="lpdoc-var">Product</span> has all two element sets such that one element is in <span class="lpdoc-var">Set1</span> and the other in <span class="lpdoc-var">set2</span>, except that if the same element belongs to both, then the corresponding one element set is in <span class="lpdoc-var">Product</span>.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="60" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set1</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="61" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Set2</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="62" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">Product</span> is a free variable. </span> </ul></div></div><p> </div><div id="Documentation on imports"><h2>Documentation on imports</h2>This module has the following direct dependencies:<ul class="lpdoc-itemize-minus"><li><em>System library modules:</em><br/><a class="lpdoc-idx-anchor" id="63" href="sort.html"><tt>sort</tt></a>. <li><em>Packages:</em><br/><a class="lpdoc-idx-anchor" id="64" href="ciaosearch.html#prelude"><tt>prelude</tt></a>, <a class="lpdoc-idx-anchor" id="65" href="ciaosearch.html#initial"><tt>initial</tt></a>, <a class="lpdoc-idx-anchor" id="66" href="condcomp_doc.html"><tt>condcomp</tt></a>, <a class="lpdoc-idx-anchor" id="67" href="assertions_doc.html"><tt>assertions</tt></a>, <a class="lpdoc-idx-anchor" id="68" href="ciaosearch.html#assertions/assertions_basic"><tt>assertions/assertions_basic</tt></a>, <a class="lpdoc-idx-anchor" id="69" href="basicmodes_doc.html"><tt>basicmodes</tt></a>. </ul></div></div><div class="lpdoc-footer">Generated with LPdoc using Ciao</div></div><div class="lpdoc-clearer"></div></div></body></html>