1:43 PM
Hi @H.PWiz, in your answer here codegolf.stackexchange.com/a/157955, why do those specific permutations work, how did you derive them?

Can't remember. I don't think I ever had a proof.

huh, looks like another submission has the answer, apparently the symmetry group of a cube is isomorphic to that of permutations of size n, so those permutations work because they are the generating set of this group like left and right are to the cube

Yes, I knew the bijection between permutations and the symmetry group. But wasn't sure what made those particular permutations special
You probably just need an odd and an even permutation, each of order 4

2:06 PM
why can't you have two odd permutations?

oh yeah, maybe you can

To anyone who knows J: I'm having trouble figuring out what `((|@i:)#@[-1+])arg` is doing, precisely. I know `(|@i:)` is doing something like `abs(-arg..arg)`. What does it do then? Is it applying a dyadic `#` to the `abs` and `arg-1`?
^ If so, how would something like (assuming arg is 3) `3 2 1 0 1 2 3#2` work?

2:26 PM
@J.Sallé the train is equivalent to `([:|]i:#-1+])`, so essentially the abs of ] i: # - 1+]
so `((|@i:)#@[-1+])` first decomposes to `(] (|@i:)#@[-1+])`, then `(| ] i:#@[-1+])` because `@` means atop
`#@[` is monadic, so is equivalent to `#`

I'm still confused, since I've no idea what a single `]` does. >.>
I'll look into it though. Thanks @Cowsquack

`]` = `⊢`, and `[` = `⊣`

Aaaaaah, that makes sense now

@Cowsquack Thanks a lot
@Cowsquack So, assuming an argument of 3, what would this function return? TIO seems to return `-1` but I don't see how

2:51 PM
@J.Sallé tio gives me `1` not `-1`

Ah yeah, you're right
I had a loose ] I think
Also I just noticed there's also a left argument, and it seems to return the length of it?
left arg is a string

@J.Sallé it seems to return `(≢⍺)/(≢⍵)`
because its an atop so the structure changes in the dyadic case

@Cowsquack It does, yes

3:12 PM
@Cowsquack i can explain
first of all, terminology: group of permutations = symmetric group, usually written S_n
every group G (including the group of symmetries of a cube) is isomorphic to a subgroup of some S_n (cayley's theorem). in this case it just happens that G ≡ S_4 exactly.
imagine you drive 4 spikes through the cube. spike "a" goes through one of the corners, through the centre, and then out through the diagonally opposite corner. we label both of those corners as "a". same for b,c,d.
from the point of view of the ant (marked with a "`^`"), the cube could look like this:
```    d
/ \
/   \
/     \
b       c
|\     /|
| \   / |
|  \ /  |
c   a   b
\  |  /
\ ^ /
\|/
d```

@ngn ah interesting

imagine what happens when the ant takes a left turn: a -> b -> c -> d -> a. this is equivalent to rotating left face of the cube clockwise.

so that gives the first permutation

right turn: a -> c -> b -> d -> a, that is abcd -> cdba. equvalent to rotating the right-hand side face anticlockwise.

thanks for the explanation
to generalise, what properties do the two permutations need to have for them to generate the entire group

3:31 PM
@Cowsquack that's hard for me to answer

so not something trivial then

if you are given two (or any set of) specific permutations you could try to combine them in various ways to produce some known generator set

3:44 PM
@ngn i should have pointed out that the abcd letters in the diagram determine the ant's position uniquely, i.e. there's no other edge on the cube that goes from d to a and has b on the left and c on the right
on the opposite side of the cube there's an edge from d to a, but b and c are swapped there