Documentation

CslibFrontier.Computability.Machines.Turing.MultiTape.Complexity.PolyTime.ListCollision

Polynomial-time collision checks on lists #

A list of digest-message pairs contains a collision when two different messages share a digest. The check scans pairs and compares their coordinates. Both coordinates may use arbitrary readable encodings with lawful equality tests.

def Cslib.hasDistinctCollision {Y M : Type} [BEq Y] [BEq M] (seen : List (Y × M)) :

Check whether two entries agree in their first (digest) coordinate and differ in their second (message) coordinate.

Testing the two coordinates of every pair of entries is polynomial-time.