Opened 4 years ago

Last modified 4 years ago

#23513 new enhancement

Faster injectivity checks for FormalCompositeMap

Reported by: saraedum Owned by:
Priority: major Milestone: sage-8.1
Component: categories Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

#23204 introduced a regression for is_injective/is_surjective. These method are not widely implemented yet but we could improve their performance:

sage: V1 = QQ^2
sage: V2 = QQ^3
sage: phi1 = (QQ^1).hom(Matrix([[1, 1]]), V1)
sage: phi2 = V1.hom(Matrix([[1, 2, 3], [4, 5, 6]]), V2)
sage: from sage.categories.map import FormalCompositeMap
sage: c1 = FormalCompositeMap(Hom(QQ^1, V2, phi1.category_for()), phi1, phi2)
sage: %timeit c1.is_injective()
100000 loops, best of 3: 4.88 µs per loop # before
10000 loops, best of 3: 41.9 µs per loop # after

Change History (1)

comment:1 Changed 4 years ago by tscrim

  • Cc tscrim removed
Note: See TracTickets for help on using tickets.