sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.46k stars 482 forks source link

tentative of free-Algebra functor #38989

Open fchapoton opened 4 days ago

fchapoton commented 4 days ago

This is trying to create a functor for free Associative unital algebras.

Using as a model the case of free Pre-Lie algebras.

:memo: Checklist

fchapoton commented 4 days ago

So far, the merge is not working as expected for the coercion

github-actions[bot] commented 4 days ago

Documentation preview for this PR (built with commit 4f3c259d07cace3ada11ba827e3212fe15979aff; changes) is ready! :tada: This preview will update shortly after each push to this PR.

fchapoton commented 4 days ago

probably one needs to fix that also :

sage: A = algebras.Free(QQ,['x','y'])
sage: B = algebras.Free(QQ,['y'])
sage: A.has_coerce_map_from(B)
False
fchapoton commented 1 day ago

@tscrim : if you have time to have a look, I need help here. There is a failing doctest about

            sage: R = algebras.Free(ZZ, 3, 'x,y,z')
            sage: x,y,z = R.gens()
            sage: S = algebras.Free(QQ, 2, 'z,t')
            sage: z,t = S.gens()
            sage: x + t

where the coercion model fails to find the common parent using the construction functor.