Function retraction

Source
pub fn retraction<Dom, Cod, InvMap>(
    mapping: &impl Column<Dom = Dom, Cod = Cod>,
) -> Result<InvMap, (Dom, Dom)>
where Dom: Clone, Cod: Clone, InvMap: MutMapping<Dom = Cod, Cod = Dom> + Default,
Expand description

Finds a retraction of the mapping, if it exists.

A retraction (left inverse) exists if and only if the mapping is injective. The retraction is unique when it exists because it is defined only on the image of the mapping. When the mapping is not injective, a pair of elements having the same image is returned.