Skip to content

incorrect docstring for has_preimage_with_preimage #2441

Description

@matthias314

According to the docstring for has_preimage_with_preimage, the second component of the return value is the identity of the domain in case there is no preimage. However, it is a vector:

julia> M = FreeModule(ZZ, 1);

julia> f = ModuleHomomorphism(M, M, matrix(ZZ[2;;]));

julia> b, x = has_preimage_with_preimage(f, only(gens(M)))
(false, (0))

julia> typeof(x)
AbstractAlgebra.Generic.FreeModuleElem{BigInt}

In fact, it's the zero vector of the domain:

if fl
return true, elem_type(D)[D(x[i:i, 1:m]) for i in 1:length(v)]
else
return false, elem_type(D)[D(zero_matrix(R, 1, m)) for x in v]
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions