Skip to content

Add snippet for set-equality of two u64 lists #114

Description

@Sword-Smith

Add a snippet where one list (assumed to be sorted and containing unique elements) is compared to another list which is not sorted and may contain duplicates. The snippet should either return a boolean indicating set-equality or crash the VM if set equality does not hold.

The snippet can be implemented using logarithmic derivatives of the running product, where multiplicities are divined.

The mathematical expressions that are compared should be:

$ld=\sum_{i}\frac{m_i}{\alpha - l_i}$, and

$ld=\sum_{j}\frac{1}{\alpha - l_j}$

where $m_i$ is the divined-in multiplicity. $m_i$ should be constrained somehow, to either a u32 or to something smaller yet.

This snippet can be used together with that defined in #111 in neptune-core's removal record integrity program to verify that the divined-in chunk indices are correct.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions