Formal self duality

We study the notion of formal self duality in finite abelian groups. Formal duality in finite abelian groups has been proposed by Cohn, Kumar, Reiher and Sch\"urmann. In this paper we give a precise definition of formally self dual sets and discuss results from the literature in this perspective. Also, we discuss the connection to formally dual codes. We prove that formally self dual sets can be reduced to primitive formally self dual sets similar to a previously known result on general formally dual sets. Furthermore, we describe several properties of formally self dual sets. Also, some new examples of formally self dual sets are presented within this paper. Lastly, we study formally self dual sets of the form $\{(x,F(x)) \ : \ x\in\mathbb{F}_{2^n}\}$ where $F$ is a vectorial Boolean function mapping $\mathbb{F}_{2^n}$ to $\mathbb{F}_{2^n}$.


Introduction
In this paper we study formal duality as introduced by Cohn, Kumar, Reiher and Schürmann in [CKS09]. For an outline of the relations of this concept to formal duality of codes, we refer to Section 2. Formal duality has been introduced in relation to energy minimization problems and has subsequently been studied using finite abelian groups in [CKRS14].
It can be defined as follows: Definition 1.1. Let be some (multiplicative) finite abelian group and̂ be its dual group, i.e., the group of homomorphisms from to ℂ * . Two sets ⊂ and ⊂̂ form a formally dual pair, if for all ∈̂ we have or equivalently if for all ∈ we have where ( ) = |{( , ) ∈ × ∶ ⋅ −1 = }| is called the weight enumerator of and we use the notation ( ) = ∑ ∈ ( ) and ( ) = ∑ ∈ ( ). A set is called a formally dual set if there is a set such that and form a formally dual pair.
Note that̂ is canonically isomorphic to and and form a formally dual pair (in and̂ ) if and only if and form a formally dual pair (in̂ and̂ ). Furthermore, formal duality can be seen as a generalization of relative difference sets, i.e. sets ⊂ such that there is a subgroup ≤ and an integer with ( ) = | | if = 1, ( ) = 0 if ∈ and ( ) = otherwise. The characterization of such formally dual sets is an interesting open question which several authors studied before. More information about formal duality in cyclic groups can be found in [Sch17], [Xia16], [Mal18]. A comprehensive analysis of formal duality in general abelian groups is given in [LPS19], [Sch19] and some more examples are discussed in [LP19], [LP20].
In order to define formal self duality, we have to regard the set of Definition 1.1 as a subset of . A finite abelian group is always isomorphic to its dual group. Thus, by choosing an isomorphism Δ ∶ →̂ we can get rid of the dual group in Definition 1.1. Equivalently we can choose a pairing, that is a nondegenerate bilinear form ⟨⋅, ⋅⟩ ∶ × → ℂ * . Note that any isomorphism Δ defines a pairing ⟨⋅, ⋅⟩ Δ by ⟨ , ⟩ Δ = [Δ ]( ) and any pairing ⟨⋅, ⋅⟩ defines an isomorphism by ↦ such that ( ) = ⟨ , ⟩ for all ∈ .
Using this notion we can define formal duality under isomorphisms and formal self duality: Definition 1.2 ([LPS19, Definition 2.7]). Let be a finite abelian group and Δ ∶ →̂ be an isomorphism. Then ⊂ and ⊂ form a formally dual pair under Δ if and Δ( ) form a formally dual pair (in and̂ ). Alternatively, we say and form a formally dual pair under the pairing ⟨⋅, ⋅⟩ Δ . We call a set formally self dual, when is formally dual to itself under some isomorphism.
Formal self duality has been briefly studied in [Xia16] and some examples are given in [CKRS14], [LPS19].
In this paper we continue the study of formal self duality. An important tool in the study of formal duality is the reduction to so called primitive formally dual sets (see Theorem 3.2). We prove an analog result for formal self duality. Furthermore, we state some equivalent formulations of formal self duality using the even set theory introduced in [LPS19]. Moreover, we state four new examples of primitive formally dual sets in groups of order 64 that happen to be formally self dual. Note that in the set of all groups with order no more than 63 we are able to characterize formally dual sets (see [LPS19,  The paper is organized as follows: We start with a comparison of formal duality in finite abelian groups and formal duality of codes in Section 2. In Section 3 we state previously known facts needed to follow the rest of the paper. We also give an overview of examples of formal self duality known from the literature. In Section 4 we state and prove the results about formal self duality mentioned before and Section 5 contains the new examples. In Section 6, we discuss the relations of formal duality to Boolean vectorial functions and study formally self dual sets of the form {( , ( )) ∶ ∈ 2 }. We conclude this paper by some open questions in Section 7.

Connection to formal duality of codes
In this section we point out an interesting connection between formal duality of sets in finite abelian groups as defined in Definition 1.1 and the notion of formal dual codes. The possible connection between these to concepts has been brought to our attention by Claude Carlet. Let ⊆ be a code with = . We denote the weight of ∈ (i.e. the number of non-zero entries) by wt( ) and the Hamming distance of 1 , 2 by ( 1 , 2 ) = wt( 1 − 2 ). Further, we define the weight enumerator and distance enumerator by If is a linear code, it is elementary that = .
A key result in the theory of linear codes is the MacWilliams identity (see e.g. [MS78]), which gives a relation between the weight/distance enumerator of a linear code and its dual ⟂ = { ∈ ∶ ⋅ = 0 for all ∈ }, where the multiplication ⋅ denotes the usual dot product on . The MacWilliams identity then states and, of course, the same relation equivalently for the distance enumerator . Extending the notion of dual codes, we say that two non-linear codes , ′ ⊆ that nevertheless satisfy the MacWilliams identity in the sense that  3] shows in fact that binary codes constructed via the Gray mapping from ℤ 4 -linear codes and their ℤ 4 -duals are always formal dual codes in the binary setting. For a more detailed treatment of this connection between ℤ 4 -linear codes and formal dual codes, we also refer to [Car95]. There is also a connection between the notion of formal duality for codes and the notion of formal duality we introduced for finite abelian groups in Definition 1. Therefore, and ′ are not formal dual codes.
On the other hand, it is also not the case that formal dual codes always yield formal dual sets.
As a counterexample, consider the two ℤ 4 -linear codes = ⟨(2, 1, 3, 1), (1, 2, 1, 3)⟩, ′ = ⟨(1, 3, 1, 0), (3, 1, 0, 1)⟩. It is easy to check that , ′ are ℤ 4 -duals, i.e. ′ = { ∈ ℤ 4 4 ∶ ⋅ = 0 for all ∈ }, where ⋅ again denotes the usual dot product in ℤ 4 4 . Then, by [HKC + 94, Theorems 2,3], the associated binary codes ( ), ( ′ ) ⊆ 8 2 , where ∶ ℤ 4 4 → 8 2 is the Gray mapping (see [HKC + 94]), are formal dual codes. We explicitly state the resulting codes for convenience: However, there are also sets which are simultaneously formally self dual sets and formal self dual codes. For example, when is an odd prime, the set = {( , 2 ) ∶ ∈ } is a formally self dual set under the pairing ⟨( , ), ( , )⟩ = Tr( + ) in the additive group of 2 (see [CKRS14,Theorem 3.2]).This set is also a formally self dual code: Indeed wt(( , 2 )) = 0 if = 0, 2 otherwise, and therefore has a self dual weight enumerators as Similar to the discussion above, we can see that also has a self dual distance enumerator and is therefore a formally self dual code. Of course, the motivation of the study of formal dual sets in finite abelian groups is quite different from the motivations in coding theory. For instance, the coding theoretical properties like minimum distance are one of the main reasons to investigate the formal dual Kerdock and Preparata codes, but are not of particular interest in our study.

Preliminaries
In this section we give a brief summary of needed results from the literature. Recall, that the definition of formal self duality, i.e., Definition 1.2, uses an isomorphism from tô or a pairing in . Often, a very specific paring is used. If a group is given in An important tool in the study of formal duality is the reduction to so called primitive sets. A primitive set is defined as follows. The characterization of formally dual sets reduces to the study of primitive formally dual sets by the following result: An equivalent definition of formal duality using the so called even sets has been introduced in [LPS19, Section 4]. For this purpose, we consider the group algebra ℚ . More information about group algebras can be found in [Lan02, page 104]. Here, for a finite abelian group ( , ⋅), the group algebra ℚ is the set of formal sums = ∑ ∈ with coefficients ∈ ℚ. We define addition and multiplication in ℚ by With this addition and multiplication ℚ is indeed an algebra. Also, for = ∑ Furthermore, we abuse notation as = ∑ ∈ ∈ ℚ as well as (−1) ∶= ∑ ∈ −1 ∈ ℚ for ⊂ . Note that this abuse of notation can also be applied to subgroups of . Also, note that Then, an even set is a set such that (−1) can be expressed as a linear combination of subgroups in the group algebra using the mentioned abuse of notation. For more details about even sets kindly refer to [LPS19,Section 4] Especially and are even sets.
The following example states previously known formally self dual sets: There is another way known to construct primitive formally dual sets of the same size using skew Hadamard difference sets: be the dual set of (see [LPS19] and [WH09] for details). Furthermore, let and be nonzero elements of ℤ with ≠ and = ℤ × ℤ . Then Remark 3.7. Theorem 3.6 can be easily obtained by [LPS19, Theorem 3.20], even though it is a slight generalization of this result.
In Theorem 3.9 we will prove that, at least in a special case, Theorem 3.6 produces a formally self dual set. Therefore, consider the following example of a skew Hadamard difference set: is a skew Hadamard difference set in the additive group of called the Paley difference set. Theorem 3.9. Let be the Paley difference set in ℤ and , ∈ ℤ with ≠ . Then Proof. Let Tr be the field trace of . We consider the isomorphism Δ Tr with the respective pairing ⟨ , ⟩ Δ Tr = Tr( ⋅ ) .

Due to Equation (3) this yields
Therefore, is a formally self dual set under Δ Tr × Δ Tr • .

Remark 3.10.
There are several other constructions of skew-Hadamard difference sets (see for example [DPW15], [DWX07], [DY06], [FX12], [WQWX07]). It is unknown if these examples and Theorem 3.6 can be used to produce more formally self dual sets. Another family of examples has been constructed in [LP19] (see also [LP20]). These examples are not formally self dual since the respective sets have unequal sizes. Also, it is unknown if there are any relative difference sets with forbidden subgroup such that and ⟂ are not isomorphic. If such relative difference sets exist, it is unclear if they are formally self dual sets or even if they are formally dual sets.

Structural results about formally self dual sets
It is easy to see that Examples 3.4.5 and 3.4.6 are not primitive. Thus, by Theorem 3.2 they can be reduced to a primitive formally dual set. However, it is not guaranteed that the resulting set is still a formally self dual set. The following proposition implies, that a result similar to Theorem 3.2 also holds for formally self dual sets, i.e., every nonprimitive formally self dual set can be reduced to a primitive formally self dual set. A weaker version of this Proposition has been stated in the second authors thesis [Sch19, Proposition 3.22].
Proof. First suppose is not primitive but also not contained in a proper coset. Due to Definition 3.1 we know that = ⋃ ⋅ for some non-trivial ≤ . Using Theorem 3.2 we then know that Δ is contained in a coset with respect to ⟂ <̂ and thus is contained in a coset with respect to Δ −1 ⟂ < which is a contradiction. Now assume that is contained in a coset with respect to < . By Theorem 3.2 we know that Δ is invariant under translations by ⟂ and thus is invariant under translations bỹ .
Due to this result, we only need to characterize the primitive formally self dual sets in order to characterize all formally self dual sets. In particular we have: We continue by discussing formal self duality in perspective of even sets. Our main aim is to provide a canonical even set decomposition for formally self dual sets. This is achieved in Proposition 4.5. First we discuss some insights which are helpful in order to proof Proposition 4.5. Recall that an even set is a set ⊂ such that (−1) = ∑ ≤ ∈ ℚ for some rational coefficients . For every isomorphism Δ ∶ →̂ we define the adjoint isomorphism by Δ * ∶ →̂ such that ⟨ , ⟩ Δ = ⟨ , ⟩ Δ * . In other words for all ∈̂ and ∈ . This induces an automorphism = Δ −1 Δ * of . Note, that if Δ corresponds to a symmetric bilinear form, for example the standard pairing, then Δ = Δ * and = id. In the general case we can use the following to describe the relations among , ⟂ , Δ and Δ * .
With these results we can provide a canonical even set decomposition of formally self dual sets: Proposition 4.5. Let ⊂ and Δ ∶ →̂ be an isomorphism.
The following are equivalent:

is a formally self dual set under Δ,
2.
Proof. Suppose is a formally self dual set under Δ. By Theorem 3.3

First we show by induction in that
If = 0 the first equation follows from the above assumption (−1) = ∑ ≤ . For the second equation we use Theorem 3.3, Lemma 4.4 and | | 2 = | | to get By changing the order of summation by substituting by Δ −1 ⟂ and using Lemma 4.3 we get The proof of induction can be obtained in a similar fashion using Lemma 4.3 as Equation (6) then follows by the lines (8) and (9). Now set = ord and by taking the average over all equations of the form (6) we get Observe that by Lemma 4.3 and = 0 : On the other hand, if (−1) = ∑ ≤ with as asserted, then By Theorem 3.3 is formally self dual under Δ * and thus by Lemma 4.4 is formally self dual under Δ.
The following result discusses the relations between the canonical decomposition given in Proposition 4.5 and an arbitrary even set decomposition.
This representation of can be used to find an even set representation

Formally self dual sets from vectorial Boolean functions
In this section, we investigate formally self dual sets of the form {( , ( )) ∶ ∈ 2 } ⊂ 2 2 , where 2 denotes as usual the field with 2 elements and ∶ 2 → 2 is a function (such functions are also called vectorial Boolean functions). Recall that the additive group of 2 is isomorphic to ℤ 2 . We define the absolute trace mapping of 2 as Tr ∶ 2 → 2 via ↦ + 2 + … 2 −1 .
Our investigation is motivated by the following new sporadic example that has been found by Shuxing Li [Li20] who gave his permission to publish it here. Both the Walsh transform and the differential uniformity of vectorial Boolean functions have been the subject of much research because of their immense importance to symmetric cryptography: If is used as an S-box of a block cipher, the Walsh transform immediately determines the resistance of to linear attacks and max ∈ * 2 , ∈ 2 ( , ) the resistance to differential attacks. For an overview on vectorial Boolean functions and their cryptographic properties, we refer the reader to [Car21]. Note that ( , ) is always even. Indeed, if is a solution of ( + ) + ( ) = then so is + . We can now characterize formally self dual sets of the structure in Example 6.1 via the values of and the Walsh transform. AB functions are rare and finding infinite families of AB functions remains a difficult research problem. A particularly well-studied group of AB functions are AB monomials. It is known that all AB monomials are bijections, so they are natural choices for our search for formally self dual pairs. A table of all known AB monomials is given in Table 1, for references we again refer to [Car21, Section 3.1.6.]. In the following, we refer to functions given by the exponents in Table 1 as Gold-functions, Kasami functions etc. As we can see, the function ↦ 3 that leads to Example 6.1 can be identified as a Gold function.
( ) has to be identical to the zero function (as a function in ) to satisfy the condition. Tr( −1∕(2 +1) ) is linear in . On the other hand Tr( −(2 +1) ) is only linear if −(2 +1) is a power of two. Clearly, the binary weight of − (2 + 1) is − 2, so this is only possible for = 3. For = 3 it can easily be checked that both ∈ {1, 2} satisfy the condition.
In [LPS19, Definition 2.17], the formal dual pairs that can be constructed with Proposition 6.13 (and, by extension, with Proposition 6.18) are called equivalent to the original one. Still, it is interesting to note that these equivalent formal self dual sets have the special structure of a graph, i.e. {( , ( )) ∶ ∈ 2 }. Remark 6.19. With Remark 6.4 and Proposition 6.18 we can create some more formally self dual sets. Indeed, if is a bijective linear function on 2 satisfying = ( −1 ) * , then {( , ( )) ∶ ∈ 2 } is a formally self dual set.
We now give a criterion when the condition = ( −1 ) * holds for some linear function ∶ 2 → 2 . The polynomial * ( ( )) has to be equal to the polynomial , so all coefficients have to be 0 except the coefficient for = 0, which has to be 1.