Just out of curiosity, why do you find the code horrid? There are really only 9 lines of code that aren't glue code, and apart from the error prints (which are really irrelevant for these demonstration purposes), the code looks basically fine to me.
EDIT:
seen = []
for b in boards:
if set(seen).isdisjoint(orbit(b)):
seen.append(b)
Ah, well...EDIT 2: also, see comment below, it's not Python
I didn't realize it was Sage (I didn't know that existed) but I'm not sure that actually makes a difference. Obviously it works, and that's fine, but it's still horribly ugly.
They don't mean "found an execution exception", they literally mean that the code found an exception to the rule that n^9 + 4n^6 + n^5 + 2n^3 is divisible by 8.
If you're a programmer (but don't have a math degree) then I would offer up API docs as a comparison. They are written for you, the user of the API, to be as concise and straightforward as possible so that you can get up and running with the API. API docs are definitely not written for beginners who have never written a line of code (or a line of code in the language the API is written in) before.
If there's one complaint I may entertain, it's that Wikipedia isn't supposed to be a resource for specialists. It's intended to be an encyclopedia for a general audience. But then by that reasoning, many of these math pages on Wikipedia probably ought to be deleted outright because they're simply too specialized in the first place. So we're left with the dilemma: do we keep these articles as-is (and keep mathematicians happy) or do we delete them outright because they're too specialized?
The third option, rewriting them for a general audience, is likely to run afoul of Aesop's fable #721 "The miller, his son, and the donkey" [1]. You'll get a highly technical and complex article that explains far too much and buries its insights in overly verbose and cumbersome prose (which cannot assume any prerequisite mathematical knowledge). It'll please neither the mathematician nor the general audience member.
[1] https://en.wikipedia.org/wiki/The_miller,_his_son_and_the_do...
The math pages look like they’re trying to be Perl one-liners. Why is everything so jammed up, Mathematics?
It's not. The language of mathematics is prose, usually written in English. The formulae are meant to illustrate the relationships in a very concise way but they're meaningless without the accompanying prose.
In software, restating the problem or the bullshit plainly is usually the first step to eliminating or mitigating it. George Carlin and his rants about softening words until they mean nothing comes to mind all too often.
https://en.wikipedia.org/wiki/Bremsstrahlung#Quantum_mechani...
It is actually physics, but for all I know it could just as well summon Cthulhu.
You surely know the syntax for multiplication, addition, and exponentiation. So you understand the polynomial in the opening paragraph. I'm sure you know function notation and division, so you understand that P(n)/k is always an integer.
You probably have seen the sigma notation before because that's usually taught in high schools around the world, so you know that the lemma which is not Burnside's is about adding and dividing. You probably have seen the notation |X| to mean absolute value, so perhaps we finally are reaching the limits of your knowledge if it has been a while since you've seen the notation |X| can also mean the size of a set (which is, in a way, a sort of absolute value, mathematicians love type-punning).
I'm sure you've seen function notation f: X -> Y to indicate that f is a function from the set X to the set Y, but I'll believe if you didn't know that [n] is the set {1, 2, 3, 4, ..., n}.
I haven't done a careful calculation here, but I believe as a moderate estimate that this already covers at least 30% of the mathematical symbols in this page.
My point is: the notation isn't probably the problem. You surely have seen these symbols before or can figure out what the individual symbols mean. I daresay the most esoteric symbol here is the Fraktur S for the symmetric group (here for the symmetric group of 6 symbols),
https://en.wikipedia.org/wiki/Fraktur#Unicode
but I assume that if you didn't know what the symmetric group is, the more common notation of S_6 would probably not have helped you much.
So if the notation isn't the problem, I wager that the concepts and the difficulty of absorbing these ideas is the problem. It requires you to compile stuff yourself in your own head.
With programming we are used to a machine doing this for us. We write the code, give it to a machine, the machine basically tells us if we're right or not. With mathematics we don't generally have that machine for all cases. You have to do the work in your own head. The problem isn't the symbols. The problem is that you have to think about them harder, work out what is being multiplied, what are the sets in question, what are the operations, and put them together yourself. You have to read something like not Burnside's lemma and understand what it's saying about permutations and sets and grouping and counting.
Reading mathematics is a special skill. It's slow. It requires you to take out pen and paper and work it out yourself. Yes, like that. You have to do input and output on your own as you do mathematics. It's a unique skill that sadly isn't usually independently taught except at the university level.
The concepts and the work required to understand them are the problem. Not the symbols. The symbols are superficial and easily dispensed with.
But still, thank you for the long and thought-out reply. You're mostly right, of course, about the symbols I was familiar with. I didn't know about the "size of a set" using the |X| notation, that's new to me, but yeah.
I've heard the explanation of "compiling it in your head" before, and it makes sense, and I think I get the idea. However, that's a ton of work to understand a post, and my ADHD is way too strong.
I did go read about the lemma which is not Burnside's, though that lead down a rabbit hole (I had never heard of a lemma).
Anyway, I think you're mostly right about all of this, but I do think the position of "it's not the symbols" is a common misconception. It's like you handed me a recipe book in Spanish, and I said I don't speak Spanish, and you said "well, the the book isn't really _about_ Spanish, you know"