Skip to main content

Module complement

Module complement 

Source
Expand description

The complement: data discarded by a forward projection. The complement: data discarded when projecting an instance forward.

A Complement records everything a forward projection (a lens get or a restrict_with_complement) drops from a source WInstance, so that the backward direction can reconstruct the original source from a (possibly modified) view. It is the shared complement type for both the asymmetric lens in panproto-lens and the polynomial-functor restrict pipeline in crate::poly.

Not every field is populated by every producer: the lens get path fills the structural-reconstruction fields (dropped nodes/arcs/fans, contraction choices, parent map, arc-edge disambiguators, snapshots, synthesized nodes, source fingerprint); the restrict pipeline additionally records Complement::contracted_into, the surviving ancestor each dropped node collapsed into. Unused fields stay empty and are omitted from the serialized form.

Structsยง

Complement
The complement: data discarded by a forward projection, needed by the backward direction to restore the original source instance.