michibo / feyncop

feyngen and feyncop - Two programs for calculations with Feynman graphs
MIT License
19 stars 1 forks source link

interface to sagemath ? #5

Open fchapoton opened 4 weeks ago

fchapoton commented 4 weeks ago

Would you be interested by an interface to sagemath ? It can handle "combinatorial Hopf algebras" at least in some basic way.

For example, to have a module with a basis indexed by lists of pairs one can do

sage: M = CombinatorialFreeModule(QQ, Words(NN.cartesian_product(NN), infinite=False))
sage: t = M.monomial(Word([(0,1)])**3)/4; t
1/4*B[word: (0, 1),(0, 1),(0, 1)]
sage: t.tensor(t)
1/16*B[word: (0, 1),(0, 1),(0, 1)] # B[word: (0, 1),(0, 1),(0, 1)]

The Grossman-Larson bialgebra is an example of already implemented bialgebra :

sage: %display unicode_art
sage: G = algebras.GrossmanLarson(QQ, 'xy')
sage: x, y = G.single_vertex_all()
sage: x*x*y
B  + B    + 2*B    + B    + B     
 #     #       ╭#╮    ╭#╮    ╭─#─╮
 │     │       │ │    │ │    │ │ │
 x    ╭x╮      x x    y x    x x y
 │    │ │        │      │         
 x    x y        y      x         
 │                                
 y  
michibo commented 1 week ago

Apologies for the late answer. It would be fantastic to have an interface to sagemath. I am not familiar with the programming of sage modules. I am happy to support any efforts for making such a module.