Two interwoven chains In this question I defined a "chain" function as a function that:


is a permutation, meaning that every value maps to and is mapped to by exactly one value.
and allows any value can be obtained from any other value by repeated applications of the function or its inverse.


There are a lot of functions that do this and some of them are pretty simple (see the answers on that question).  Now we are going to define a separate class of functions I am going to call "interwoven" functions.  An interwoven function is a function on a set A, that has two infinite partitions a0 and a1 such that the function is a chain function on both a0 and a1.

This means that no value in a0 can map to a value in a1 under the function or vice versa.

Task

Your task is to write a code that performs or defines an interwoven function on the positive integers.  Your function can be anything as long as it satisfies the criteria for being interwoven.  You should include a explanation as to why your function is interwoven in the answer.

This is a code-golf question so answers will be scored in bytes, with less bytes being better.
Python, 46 42 37 bytes

5 bytes saved thanks to @notjagan



lambda x:1&lt;x&lt;4and x*2%5or x-(x&amp;2)*4+4


Try it online!

Iterates the even and odd numbers with steps of 4 and links on 2 and 3:

=&gt; 22 =&gt; 18 =&gt; 14 =&gt; 10 =&gt; 6 =&gt; 2 =&gt; 4 =&gt; 8 =&gt; 12 =&gt; 16 =&gt; 20 =&gt; 24 =&gt;
=&gt; 23 =&gt; 19 =&gt; 15 =&gt; 11 =&gt; 7 =&gt; 3 =&gt; 1 =&gt; 5 =&gt; 9 =&gt; 13 =&gt; 17 =&gt; 21 =&gt;