Add isTermlistSetEqual code to compare sets that are encoded as lists.
This commit is contained in:
parent
8ec1908306
commit
9f60184ba7
@ -762,6 +762,23 @@ termlistContained (const Termlist tlbig, Termlist tlsmall)
|
||||
return 1;
|
||||
}
|
||||
|
||||
//! Check whether the element sets corresponding to two termlist are equal
|
||||
/**
|
||||
* Currently this is a classical two-way containment test, but probably it can be done smarter.
|
||||
*/
|
||||
int
|
||||
isTermlistSetEqual (const Termlist tl1, const Termlist tl2)
|
||||
{
|
||||
if (termlistContained (tl1, tl2))
|
||||
{
|
||||
if (termlistContained (tl2, tl1))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//! Yield the result of f(x)
|
||||
/**
|
||||
* This function interpretes two termlists as the domain and range of a function,
|
||||
|
@ -71,6 +71,7 @@ Term termLocal (const Term t, Termlist fromlist, Termlist tolist);
|
||||
Termlist termlistLocal (Termlist tl, const Termlist fromlist,
|
||||
const Termlist tolist);
|
||||
int termlistContained (const Termlist tlbig, Termlist tlsmall);
|
||||
int isTermlistSetEqual (const Termlist tl1, const Termlist tl2);
|
||||
Term termFunction (Termlist fromlist, Termlist tolist, Term tx);
|
||||
Termlist termlistForward (Termlist tl);
|
||||
int termlistOrder (Termlist tl1, Termlist tl2);
|
||||
|
Loading…
Reference in New Issue
Block a user