It’s good that the definition of J (and its inverse) is being looked into more closely. I’ve been repeating the mantra “projectively X and -X are equivalent” – but my experience is that it is always a good idea to remove unnecessary sign flips despite this equivalence. In some sense I’m following my sense of beauty here more than my sense of truth.
@meuns: I believe the condition used in my description of J is that e_S e_{S^\perp}=\bf{I} which I don’t think is the same as e_S \bf{I} = e_{S^\perp}. If you use the former rather than the latter then the sign flips on the 2-vectors disappear I think.
Regarding the sign-flips on the 3-vectors: these can’t be gotten rid of so easily. In fact, I need to slightly correct the general description of J in 2.3.1.3 of my thesis for this case.
The algorithm described there assumes that given an ordered subset S of some ordered set U it’s always possible to find an ordering of the complementary subset S^\perp such that SS^\perp is an even permutation of U. This is however not always possible.
Consider the case n=4. There if I have S=0, then S^\perp={123} satisfies {0}{123} is even. But for S={123} and S^\perp = 0, {123}{0} is not even – and I cannot flip any elements in S^\perp to obtain an even permutation since S^\perp consists of a single element.
Exactly when k=(n-1) and k is odd, it isn’t possible to find S^\perp so that SS^\perp is an even permutation.
Proof: Note that if n-k > 1 then I can always flip elements in S^\perp so that SS^\perp is an even permutation. And if k=n-1 and k is even than SS^\perp and S^\perp S are both even or both odd. We can assume that S^\perp S is even (since we can then flip elements of S to obtain this goal), so SS^\perp is also even. But this isn’t possible for k odd.
Here’s the refined definition of J. I am using superscripts for G and subscripts for G* to be consistent with the original discussion in my thesis.
Let e^{S} \in G be some basis k-vector. Define
J(e^S) := -e_{S^\perp} if k=n-1 and k is odd, and
J(e^S) := e_{S^\perp} (where SS^\perp is an even permutation of 0123) otherwise.
The minus sign reflects the fact that in this case e_S e_{S^\perp} = -\bf{I}.
Then J^{-1} has to be accordingly adjusted:
J^{-1}(e_S) := -e^{S^\perp} if k==1 and k is odd, and
J^{-1}(e_S) := e^{S^\perp} for S\in\bf{S} (where S^\perp S is an even permutation of 0123) otherwise.
Note: it may make sense for implementation purposes to further amend the J algorithm as follows:
Arrange the 2^n index sets in lexicographical order: {{}, {0},{1},{2},{3},{01}, …}. Run the J algorithm on the first half of this list to obtain ordered representatives of the second half. Use this full ordered set of index pairs \{S, S^\perp\} to fix “canonical” bases for both G and G^*. Then run the second half of the J algorithm without allowing any flipping in S^\perp, but rather insert minus signs into the definition of J where the resulting permutation SS^{\perp} is odd. If I’m not mistaken, this will be the case exactly when both k and n-k are odd:
J(e^S) := (-1)^{k(n-k)}e_{S^\perp} for S in the second half of the full set of index sets.
J(e^S) := e_{S^\perp} for S otherwise
The advantage of this approach is that J is expressed directly using the canonical basis obtained in the first half of the algorithm. It will first differ from the existing (as amended above) version of the algorithm for n=6 and k=3 if I’m not mistaken. Then for example 012345 is even and 345012 is odd.