cubing / cubing.js

🛠 A library for displaying and working with twisty puzzles. Also currently home to the code for Twizzle.
https://js.cubing.net/cubing/
GNU General Public License v3.0
232 stars 42 forks source link

Add support for exporting permutations to Mathematica #283

Closed benwh1 closed 11 months ago

lgarron commented 11 months ago

Looking good!

FactorInteger[GroupOrder[PermutationGroup[gen]]/43252003274489856000]
{{2, 14}, {3, 1}}

2^12 of those are from center orientation (4^6); do you know why that leaves only a factor of 12 rather than 24?

benwh1 commented 11 months ago

2^12 of those are from center orientation (4^6); do you know why that leaves only a factor of 12 rather than 24?

It's not possible to only rotate one center by 90 degrees

lgarron commented 11 months ago

2^12 of those are from center orientation (4^6); do you know why that leaves only a factor of 12 rather than 24?

It's not possible to only rotate one center by 90 degrees

Ah, yes, that would do it! For some reason I was dividing the 48 by 2, but not the 4^6. 🤦

In any case, I'll leave final approval and merging to @rokicki!

rokicki commented 11 months ago

Ben, can you make the same change as 4697f79da63feb3c688d73b4d70f76d8b91e3a4d to your toMathematica function in this pull request before we integrate? This way i can test full functionality before approving. Thanks!

The test here would be: PermutationOrder[PermutationProduct[mU, mF, mR]]

This should return 80. With the current code it is returning 84.

benwh1 commented 11 months ago

Ben, can you make the same change as 4697f79da63feb3c688d73b4d70f76d8b91e3a4d to your toMathematica function in this pull request before we integrate? This way i can test full functionality before approving. Thanks!

Done.