{"action":"created","issue":{"url":"https://api.github.com/repos/gap-packages/Semigroups/issues/166","repository_url":"https://api.github.com/repos/gap-packages/Semigroups","labels_url":"https://api.github.com/repos/gap-packages/Semigroups/issues/166/labels{/name}","comments_url":"https://api.github.com/repos/gap-packages/Semigroups/issues/166/comments","events_url":"https://api.github.com/repos/gap-packages/Semigroups/issues/166/events","html_url":"https://github.com/gap-packages/Semigroups/pull/166","id":150365087,"number":166,"title":"Fix MatrixEntires in stable-2.7 (Issue #164)","user":{"login":"wilfwilson","id":8956868,"avatar_url":"https://avatars.githubusercontent.com/u/8956868?v=3","gravatar_id":"","url":"https://api.github.com/users/wilfwilson","html_url":"https://github.com/wilfwilson","followers_url":"https://api.github.com/users/wilfwilson/followers","following_url":"https://api.github.com/users/wilfwilson/following{/other_user}","gists_url":"https://api.github.com/users/wilfwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/wilfwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilfwilson/subscriptions","organizations_url":"https://api.github.com/users/wilfwilson/orgs","repos_url":"https://api.github.com/users/wilfwilson/repos","events_url":"https://api.github.com/users/wilfwilson/events{/privacy}","received_events_url":"https://api.github.com/users/wilfwilson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-04-22T13:06:53Z","updated_at":"2016-05-05T11:13:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/gap-packages/Semigroups/pulls/166","html_url":"https://github.com/gap-packages/Semigroups/pull/166","diff_url":"https://github.com/gap-packages/Semigroups/pull/166.diff","patch_url":"https://github.com/gap-packages/Semigroups/pull/166.patch"},"body":"`MatrixEntries` fails for some Rees 0-matrix semigroups whose\r\nmatrices contain `0`, since MatrixEntries removes duplicates and\r\nsorts using `Union`, however `0` is not comparable with all\r\nsemigroup elements.\r\n\r\nThis issue is resolved by using `Unique` to remove duplicates,\r\nbut not sorting the list of matrix entries.\r\n\r\nResolves: #164"},"comment":{"url":"https://api.github.com/repos/gap-packages/Semigroups/issues/comments/217126930","html_url":"https://github.com/gap-packages/Semigroups/pull/166#issuecomment-217126930","issue_url":"https://api.github.com/repos/gap-packages/Semigroups/issues/166","id":217126930,"user":{"login":"james-d-mitchell","id":6686071,"avatar_url":"https://avatars.githubusercontent.com/u/6686071?v=3","gravatar_id":"","url":"https://api.github.com/users/james-d-mitchell","html_url":"https://github.com/james-d-mitchell","followers_url":"https://api.github.com/users/james-d-mitchell/followers","following_url":"https://api.github.com/users/james-d-mitchell/following{/other_user}","gists_url":"https://api.github.com/users/james-d-mitchell/gists{/gist_id}","starred_url":"https://api.github.com/users/james-d-mitchell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/james-d-mitchell/subscriptions","organizations_url":"https://api.github.com/users/james-d-mitchell/orgs","repos_url":"https://api.github.com/users/james-d-mitchell/repos","events_url":"https://api.github.com/users/james-d-mitchell/events{/privacy}","received_events_url":"https://api.github.com/users/james-d-mitchell/received_events","type":"User","site_admin":false},"created_at":"2016-05-05T11:13:36Z","updated_at":"2016-05-05T11:13:36Z","body":"@wilfwilson Hmm, the version of the code that I commented on is not the current version of the code, which looks much better. The current version of the code also doesn't related to the comments you've made above.  \r\n\r\nMy suggestion above is indeed slower than the current version, I just tested it on some random 89 x 10 ^ 4 matrix. \r\n\r\nWhile there is no special method for `DuplicateFreeList` and a sorted list, there is a special `in` method, and if `list` is sorted in the function you quote above, then so is `l`, and so the cost of looking up `not i in l` is lower than when `list` is unsorted.\r\n\r\nYour code could probably be further improved (for example, simply adding `0` to the end of the list rather than concatenating `[0]` and `elt` and by not doing `Concatenation(Matrix(R){Columns(R)}{Rows(R)})` but rather just looping over `Columns(R)` and `Rows(R)` instead), but I doubt it is worth it.\r\n"}}