bradencarlson / sage-jupyter

SageMath files (via Jupyter Notebooks) that give an introduction to using SageMath to explore select topics in Abstract Algebra and Cryptography. Note that no local installation of SageMath or Jupyter Notebooks is required to access and use this Project
MIT License
4 stars 3 forks source link

Cosets not all accounted for #11

Closed bradencarlson closed 2 years ago

bradencarlson commented 2 years ago

In the Cosets file, the coset_generators() function does not add all the cosets to the dictionary correctly, in the case where both cosets are not found in the dictionary keys, it adds in the left coset, then the right, but if the cosets happen to be equal, the left one is overwritten, and thus is not in the final dictionary.

bradencarlson commented 2 years ago

Changed all the lists to sets, also ordered everything, then fixed the logic in the coset_generators() method that added the same coset more than once.