The capstone runs one deterministic stream through all three sketches. First up is the Bloom filter, which over the whole stream must never deny a member and should exhibit at least one honest false positive.
Feed a stream to a Bloom filter and confirm no false negatives plus a real false positive.
The final chapter is a single stream - ten tokens over four distinct words - passed through every sketch you built, each answering its own question. The Bloom filter answers membership, and the capstone pins its guarantee end to end: after adding the whole stream, every token that appeared reads present. Not one member is denied, which is the no-false-negatives promise holding across a realistic run rather than a single hand-picked pair.
The deliberately small 16-bit filter is crowded by four items, so it also delivers the other half of the bargain: "olive", which never appeared in the stream, collides onto three already-set bits and reports present. That is a true false positive, exactly the behavior the sizing math predicts and the price you knowingly pay for a filter this small. Membership done; frequency is next.
f := NewBloom(16, 3)for _, tok := range stream { f.Add([]byte(tok)) }// every token in the stream: Contains == true (no false negatives)// "olive" was never added yet Contains("olive") == true (a false positive)