Digraphs icon indicating copy to clipboard operation
Digraphs copied to clipboard

Implemented ^ operator for digraphs to delegate to OnDigraphs (issue #580)

Open devansh2605 opened this issue 1 month ago • 4 comments

Resolves issue #580.

Edited oper.gi file to allow D ^ p (digraph and permutation) and D ^ t (digraph and transformation) to call OnDigraphs(D, p) and OnDigraphs(D, t), respectively.

devansh2605 avatar Oct 29 '25 15:10 devansh2605

Thanks for the PR!

Some tests are failing here, and I think the key is that you've installed a method without first declaring the operation.

The trick to fixing this is to go into oper.gd and add a DeclareOperation statement for these two filters.

mtorpey avatar Oct 29 '25 15:10 mtorpey

@james-d-mitchell @mtorpey I’ve added tests for this issue. I had to adjust the formatting a few times since the GitHub checks were failing initially. The tests run correctly when I execute them manually, but I’m still getting a Syntax warning: Unbound global variable in stream:1. I’m not entirely sure what the best way to address this is (as you can see I’ve tried a few approaches).

Just to confirm for the documentation, should I add it in pkg/Digraphs/doc/oper.xml following the same structure used for the other methods in that file?

devansh2605 avatar Oct 30 '25 13:10 devansh2605

@james-d-mitchell @mtorpey I’ve added tests for this issue. I had to adjust the formatting a few times since the GitHub checks were failing initially. The tests run correctly when I execute them manually, but I’m still getting a Syntax warning: Unbound global variable in stream:1. I’m not entirely sure what the best way to address this is (as you can see I’ve tried a few approaches).

I've commented directly on the line that's wrong, you're reporting the exact error you'd get if you typed local some_variables; at the command line in GAP.

Just to confirm for the documentation, should I add it in pkg/Digraphs/doc/oper.xml following the same structure used for the other methods in that file?

Yes @devansh2605 that's correct.

james-d-mitchell avatar Oct 30 '25 19:10 james-d-mitchell

Happy with this, while noting that this currently isn't documented. I'd suggest adding a paragraph in the OnDigraphs documentation noting the new alternative syntax, since I'm not sure there's actually a man entry for a symbol like ^.

mtorpey avatar Nov 10 '25 15:11 mtorpey

@mtorpey I have made the changes, please let me know if everything is in order or any other modifications are required.

devansh2605 avatar Nov 19 '25 17:11 devansh2605