HNP.gap

Definition of ${\rm Obs}(K/k)$ and ${\rm Obs}_1(L/K/k)$ (Drakokhrust and Platonov [PD85a, page 350], [DP87, page 300]).
Let $k$ be a number field, $L\supset K\supset k$ be a tower of finite extensions where $L$ is normal over $k$. We call the group \begin{align*} {\rm Obs}(K/k)=(N_{K/k}(\mathbb{A}_K^\times)\cap k^\times)/N_{K/k}(K^\times) \end{align*} the total obstruction to the Hasse norm principle for $K/k$ and \begin{align*} {\rm Obs}_1(L/K/k)=\left(N_{K/k}(\mathbb{A}_K^\times)\cap k^\times\right)/\left((N_{L/k}(\mathbb{A}_L^\times)\cap k^\times)N_{K/k}(K^\times)\right)\ \end{align*} the first obstruction to the Hasse norm principle for $K/k$ corresponding to the tower $L\supset K\supset k$.
Theorem 1 (Drakokhrust and Platonov [PD85a, page 350], [PD85b, pages 789-790], [DP87, Theorem 1]).
Let $k$ be a number field, $L\supset K\supset k$ be a tower of finite extensions where $L$ is normal over $k$. Let $G={\rm Gal}(L/k)$ and $H={\rm Gal}(L/K)$. Then \begin{align*} {\rm Obs}_1(L/K/k)\simeq {\rm Ker}\, \psi_1/\varphi_1({\rm Ker}\, \psi_2) \end{align*} where \begin{align*} \begin{CD} H/[H,H] @>\psi_1 >> G/[G,G]\\ @AA\varphi_1 A @AA\varphi_2 A\\ \displaystyle{\bigoplus_{v\in V_k}\left(\bigoplus_{w\mid v} H_w/[H_w,H_w]\right)} @>\psi_2 >> \displaystyle{\bigoplus_{v\in V_k} G_v/[G_v,G_v]} \end{CD} \end{align*} where $\psi_1$, $\varphi_1$ and $\varphi_2$ are defined by the inclusions $H\subset G$, $H_w\subset H$ and $G_v\subset G$ respectively, and \begin{align*} \psi_2(h[H_{w},H_{w}])=x^{-1}hx[G_v,G_v] \end{align*} for $h\in H_{w}=H\cap x^{-1}hx[G_v,G_v]$ $(x\in G)$.

Let $\psi_2^{v}$ be the restriction of $\psi_2$ to the subgroup $\bigoplus_{w\mid v} H_w/[H_w,H_w]$ with respect to $v\in V_k$ and $\psi_2^{\rm nr}$ (resp. $\psi_2^{\rm r}$) be the restriction of $\psi_2$ to the unramified (resp. the ramified) places $v$ of $k$.

Proposition 2 (Drakokhrust and Platonov [DP87]).
Let $k$, $L\supset K\supset k$, $G$ and $H$ be as in Theorem 1.
(i) ([DP87, Lemma 1]) Places $w_i\mid v$ of $K$ are in one-to-one correspondence with the set of double cosets in the decomposition $G=\cup_{i=1}^{r_v} Hx_iG_v$ where $H_{w_i}=H\cap x_iG_vx_i^{-1}$;
(ii) ([DP87, Lemma 2]) If $G_{v_1}\leq G_{v_2}$, then $\varphi_1({\rm Ker}\,\psi_2^{v_1})\subset \varphi_1({\rm Ker}\,\psi_2^{v_2})$;
(iii) ([DP87, Theorem 2]) $\varphi_1({\rm Ker}\,\psi_2^{\rm nr})=\Phi^G(H)/[H,H]$ where $\Phi^G(H)=\langle [h,x]\mid h\in H\cap xHx^{-1}, x\in G\rangle$;
(iv) ([DP87, Lemma 8]) If $[K:k]=p^r$ $(r\geq 1)$ and ${\rm Obs}(K_p/k_p)=1$ where $k_p=L^{G_p}$, $K_p=L^{H_p}$, $G_p$ and $H_p$ are $p$-Sylow subgroups of $G$ and $H$ respectively, then ${\rm Obs}(K/k)=1$.
Theorem 3 (Drakokhrust and Platonov [DP87, Theorem 3, Corollary 1]).
Let $k$, $L\supset K\supset k$, $G$ and $H$ be as in Theorem 1. Let $H_i\leq G_i\leq G$ $(1\leq i\leq m)$, $H_i\leq H\cap G_i$, $k_i=L^{G_i}$ and $K_i=L^{H_i}$. If ${\rm Obs}(K_i/k_i)=1$ for any $1\leq i\leq m$ and \begin{align*} \bigoplus_{i=1}^m \widehat{H}^{-3}(G_i,\mathbb{Z})\xrightarrow{\rm cores} \widehat{H}^{-3}(G,\mathbb{Z}) \end{align*} is surjective, then ${\rm Obs}(K/k)={\rm Obs}_1(L/K/k)$. In particular, if $[K:k]=n$ is square-free, then ${\rm Obs}(K/k)={\rm Obs}_1(L/K/k)$.
Theorem 4 (Drakokhrust [Dra89, Theorem 1], see also Opolka [Opo80, Satz 3]).
Let $k$, $L\supset K\supset k$, $G$ and $H$ be as in Theorem 1. Let $\widetilde{L}\supset L\supset k$ be a tower of Galois extensions with $\widetilde{G}={\rm Gal}(\widetilde{L}/k)$ and $\widetilde{H}={\rm Gal}(\widetilde{L}/K)$ which correspond to a central extension $1\to A\to \widetilde{G}\to G\to 1$ with $A\cap[\widetilde{G},\widetilde{G}]\simeq M(G)$; the Schur multiplier of $G$ (this is equivalent to the inflation $M(\widetilde{G})\to M(G)$ is zero map, see Beyl and Tappe [BT82, Proposition 2.13, page 85]). Then ${\rm Obs}(K/k)={\rm Obs}_1(\widetilde{L}/K/k)$. In particular, $\widetilde{G}$ is a Schur cover of $G$, i.e. $A\simeq M(G)$, then ${\rm Obs}(K/k)={\rm Obs}_1(\widetilde{L}/K/k)$.

FirstObstructionN

FirstObstructionN(G,H).ker
returns the list $[l_1, [l_2, l_3]]$ where $l_1$ is the abelian invariant of the numerator of the first obstruction ${\rm Ker}\, \psi_1=\langle y_1,\ldots,y_t\rangle$ with respect to $G$, $H$ as in Theorem 1, $l_2=[e_1,\ldots,e_m]$ is the abelian invariant of $H^{ab}=H/[H,H]=\langle x_1,\ldots,x_m\rangle$ with $e_i={\rm order}(x_i)$ and $l_3=[l_{3,1},\ldots,l_{3,t}]$, $l_{3,i}=[r_{i,1},\ldots,r_{i,m}]$ is the list with $y_i=x_1^{r_{i,1}}\cdots x_m^{r_{i,m}}$ for $H\leq G\leq S_n$.
FirstObstructionN(G).ker
returns the same as FirstObstructionN(G,H).ker where $H={\rm Stab}_1(G)$ is the stabilizer of $1$ in $G\leq S_n$.

FirstObstructionDnr

FirstObstructionDnr(G,H).Dnr
returns the list $[l_1, [l_2, l_3]]$ where $l_1$ is the abelian invariant of the unramified part of the denominator of the first obstruction $\varphi_1({\rm Ker}\, \psi_2^{\rm nr})=\Phi^G(H)/[H,H]=\langle y_1,\ldots,y_t\rangle$ with respect to $G$, $H$ as in Proposition 2 (iii), $l_2=[e_1,\ldots,e_m]$ is the abelian invariant of $H^{ab}=H/[H,H]=\langle x_1,\ldots,x_m\rangle$ with $e_i={\rm order}(x_i)$ and $l_3=[l_{3,1},\ldots,l_{3,t}]$, $l_{3,i}=[r_{i,1},\ldots,r_{i,m}]$ is the list with $y_i=x_1^{r_{i,1}}\cdots x_m^{r_{i,m}}$ for $H\leq G\leq S_n$.
FirstObstructionDnr(G).Dnr
returns the same as FirstObstructionDnr(G,H).Dnr where $H={\rm Stab}_1(G)$ is the stabilizer of $1$ in $G\leq S_n$.

FirstObstructionDr

FirstObstructionDr(G,Gv,H).Dr
returns the list $[l_1, [l_2, l_3]]$ where $l_1$ is the abelian invariant of the ramified part of the denominator of the first obstruction $\varphi_1({\rm Ker}\, \psi_2^v)=\langle y_1,\ldots,y_t\rangle$ with respect to $G$, $G_v$, $H$ as in Theorem 1, $l_2=[e_1,\ldots,e_m]$ is the abelian invariant of $H^{ab}=H/[H,H]=\langle x_1,\ldots,x_m\rangle$ with $e_i={\rm order}(x_i)$ and $l_3=[l_{3,1},\ldots,l_{3,t}]$, $l_{3,i}=[r_{i,1},\ldots,r_{i,m}]$ is the list with $y_i=x_1^{r_{i,1}}\cdots x_m^{r_{i,m}}$ for $H\leq G\leq S_n$.
FirstObstructionDr(G,Gv).Dr
returns the same as FirstObstructionDr(G,Gv,H).Dr where $H={\rm Stab}_1(G)$ is the stabilizer of $1$ in $G\leq S_n$.

SchurCoverG

SchurCoverG(G).SchurCover
returns one of the Schur covers $\widetilde{G}$ of $G$ in a central extension $1\to A\to \widetilde{G}\xrightarrow{\pi} G\to 1$ with $A\simeq M(G)$; Schur multiplier of $G$ (see Karpilovsky [Kap87, page 16]). The Schur covers $\widetilde{G}$ are stem extensions, i.e. $A\leq Z(\widetilde{G})\cap [\widetilde{G},\widetilde{G}]$, of the maximal size.
SchurCoverG(G).epi
returns the surjective map $\pi$ in a central extension $1\to A\to \widetilde{G}\xrightarrow{\pi} G\to 1$ with $A\simeq M(G)$; Schur multiplier of $G$ (see Karpilovsky [Kap87, page 16]). The Schur covers $\widetilde{G}$ are stem extensions, i.e. $A\leq Z(\widetilde{G})\cap [\widetilde{G},\widetilde{G}]$, of the maximal size.
These functions are based on the built-in function EpimorphismSchurCover in GAP.

MinimalStemExtensions

MinimalStemExtensions(G)[j].MinimalStemExtension
(resp. MinimalStemExtensions(G)[j].epi) returns the $j$-th minimal stem extension $\overline{G}=\widetilde{G}/A^\prime$, i.e. $\overline{A}\leq Z(\overline{G})\cap [\overline{G},\overline{G}]$, of $G$ provided by the Schur cover $\widetilde{G}$ of $G$ via SchurCoverG(G).SchurCover where $A^\prime$ is the $j$-th maximal subgroups of $A=M(G)$ (resp. the surjective map $\overline{\pi}$) in the commutative diagram \begin{align*} \begin{CD} 1 @>>> A=M(G) @>>> \widetilde{G}@>\pi>> G@>>> 1\\ @. @VVV @VVV @|\\ 1 @>>> \overline{A}=A/A^\prime @>>> \overline{G}=\widetilde{G}/A^\prime @>\overline{\pi}>> G@>>> 1 \end{CD} \end{align*} (see Robinson [Rob96, Exercises 11.4]).
This function is based on the built-in function EpimorphismSchurCover in GAP.

StemExtensions

StemExtensions(G)[j].StemExtension
(resp. StemExtensions(G)[j].epi) returns the $j$-th stem extension $\overline{G}=\widetilde{G}/A^\prime$, i.e. $\overline{A}\leq Z(\overline{G})\cap [\overline{G},\overline{G}]$, of $G$ provided by the Schur cover $\widetilde{G}$ of $G$ via SchurCoverG(G).SchurCover where $A^\prime$ is the $j$-th maximal subgroups of $A=M(G)$ (resp. the surjective map $\overline{\pi}$) in the commutative diagram \begin{align*} \begin{CD} 1 @>>> A=M(G) @>>> \widetilde{G}@>\pi>> G@>>> 1\\ @. @VVV @VVV @|\\ 1 @>>> \overline{A}=A/A^\prime @>>> \overline{G}=\widetilde{G}/A^\prime @>\overline{\pi}>> G@>>> 1 \end{CD} \end{align*} (see Robinson [Rob96, Exercises 11.4]).
This function is based on the built-in function EpimorphismSchurCover in GAP.

Resolution of $G$

ResolutionNormalSeries(LowerCentralSeries(G),n+1)
returns a free resolution $RG$ of $G$ when $G$ is nilpotent.
ResolutionNormalSeries(DerivedSeries(G),n+1)
returns a free resolution $RG$ of $G$ when $G$ is solvable.
ResolutionFiniteGroup(G,n+1)
returns a free resolution $RG$ of $G$ when $G$ is finite.
These functions are the built-in functions of HAP in GAP.

ResHnZ

ResHnZ(RG,RH,n).HnGZ
returns the abelian invariants of $H^n(G,\mathbb{Z})$ with respect to Smith normal form, for free resolution $RG$ of $G$.
ResHnZ(RG,RH,n).HnHZ
returns the abelian invariants of $H^n(H,\mathbb{Z})$ with respect to Smith normal form, for free resolution $RH$ of $H$.
ResHnZ(RG,RH,n).Res
returns the list $L=[l_1,\ldots,l_s]$ where $H^n(G,\mathbb{Z})=\langle x_1,\ldots,x_s\rangle\xrightarrow{\rm res} H^n(H,\mathbb{Z})=\langle y_1,\ldots,y_t\rangle$, ${\rm res}(x_i)=\prod_{j=1}^t y_j^{l_{i,j}}$ and $l_i=[l_{i,1},\ldots,l_{i,t}]$ for free resolutions $RG$ and $RH$ of $G$ and $H$ respectively.
ResHnZ(RG,RH,n).Ker
returns the list $L=[l_1,[l_2,l_3]]$ where $l_1$ is the abelian invariant of ${\rm Ker}\{H^n(G,\mathbb{Z})$ $\xrightarrow{\rm res}$ $H^n(H,\mathbb{Z})\}=\langle y_1,\ldots,y_t\rangle$, $l_2=[d_1,\ldots,d_s]$ is the abelian invariant of $H^n(G,\mathbb{Z})=\langle x_1,\ldots,x_s\rangle$ with $d_i={\rm ord}(x_i)$ and $l_3=[l_{3,1},\ldots,l_{3,t}]$, $l_{3,j}=[r_{j,1},\ldots,r_{j,s}]$ is the list with $y_j=x_1^{r_{j,1}}\cdots x_s^{r_{j,s}}$ for free resolutions $RG$ and $RH$ of $G$ and $H$ respectively.
ResHnZ(RG,RH,n).Coker
returns the list $L=[l_1,[l_2,l_3]]$ where $l_1=[e_1,\ldots,e_t]$ is the abelian invariant of ${\rm Coker}\{H^n(G,\mathbb{Z})$ $\xrightarrow{\rm res}$ $H^n(H,\mathbb{Z})\}=\langle \overline{y_1},\ldots,\overline{y_t}\rangle$ with $e_j={\rm ord}(\overline{y_j})$, $l_2=[d_1,\ldots,d_s]$ is the abelian invariant of $H^n(H,\mathbb{Z})=\langle x_1,\ldots,x_s\rangle$ with $d_i={\rm ord}(x_i)$ and $l_3=[l_{3,1},\ldots,l_{3,t}]$, $l_{3,j}=[r_{j,1},\ldots,r_{j,s}]$ is the list with $\overline{y_j}=\overline{x_1}^{r_{j,1}}\cdots \overline{x_s}^{r_{j,s}}$ for free resolutions $RG$ and $RH$ of $G$ and $H$ respectively.

KerResH3Z

KerResH3Z was improved to ver.2019.10.04 from ver.2020.03.19
KerResH3Z(G,H)
returns the list $L=[l_1,[l_2,l_3]]$ where $l_1$ is the abelian invariant of ${\rm Ker}\{H^3(G,\mathbb{Z})\xrightarrow{\rm res}\oplus_{i=1}^{m^\prime} H^3(G_i,\mathbb{Z})\}=\langle y_1,\ldots,y_t\rangle$ where $H_i\leq G_i\leq G$, $H_i\leq H\cap G_i$, $[G_i:H_i]=n$ and the action of $G_i$ on $\mathbb{Z}[G_i/H_i]$ may be regarded as $nTm$ $(n\leq 15)$ which is not in [HKY22, Table $1$] or [HKY23, Table $1$], $l_2=[d_1,\ldots,d_s]$ is the abelian invariant of $H^3(G,\mathbb{Z})=\langle x_1,\ldots,x_s\rangle$ with $d_{i^\prime}={\rm ord}(x_{i^\prime})$ and $l_3=[l_{3,1},\ldots,l_{3,t}]$, $l_{3,j}=[r_{j,1},\ldots,r_{j,s}]$ is the list with $y_j=x_1^{r_{j,1}}\cdots x_s^{r_{j,s}}$ for groups $G$ and $H$ (cf. Theorem 3).

KerResH3Z($G$,$H$:iterator) was added to ver.2019.10.04 from ver.2020.03.19
KerResH3Z(G,H:iterator)
returns the same as KerResH3Z$(G,H)$ but using the built-in function IteratorByFunctions of GAP in order to run fast (by applying the new function ChooseGiIterator$(G,H)$ to choose suitable $G_i\leq G$ instead of the old one ChooseGi$(G,H)$).

ConjugacyClassesSubgroupsNGHOrbitRep

ConjugacyClassesSubgroupsNGHOrbitRep was added to ver.2019.10.04 from ver.2020.03.19
ConjugacyClassesSubgroupsNGHOrbitRep(ConjugacyClassesSubgroups(G),H)
returns the list $L=[l_1,\ldots,l_t]$ where $t$ is the number of subgroups of $G$ up to conjugacy, $l_r=[l_{r,1},\ldots,l_{r,u_r}]$ $(1\leq r\leq t)$, $l_{r,s}$ $(1\leq s\leq u_r)$ is a representative of the orbit ${\rm Orb}_{N_G(H)\backslash G/N_G(G_{v_{r,s}})}(G_{v_{r,s}})$ of $G_{v_{r,s}}\leq G$ under the conjugate action of $G$ which corresponds to the double coset $N_G(H)\backslash G/N_G(G_{v_{r,s}})$ with ${\rm Orb}_{G/N_G(G_{v_r})}(G_{v_r}) =\bigcup_{s=1}^{u_r}{\rm Orb}_{N_G(H)\backslash G/N_G(G_{v_{r,s}})}(G_{v_{r,s}})$ corresponding to $r$-th subgroup $G_{v_r}\leq G$ up to conjugacy.

MinConjugacyClassesSubgroups

MinConjugacyClassesSubgroups was added to ver.2019.10.04 from ver.2020.03.19
MinConjugacyClassesSubgroups(l)
returns the minimal elements of the list $l=\{H_i^G\}$ where $H_i^G=\{x^{-1}H_ix\mid x\in G\}$ for some subgroups $H_i\leq G$ which satisfy the condition that if $H_i^G, H_r^G\in l$ and $H_i\leq H_r$, then $H_j^G\in l$ for any $H_i\leq H_j\leq H_r$.

IsInvariantUnderAutG

IsInvariantUnderAutG was added to ver.2019.10.04 from ver.2020.03.19
IsInvariantUnderAutG(l)
returns true if the list $l=\{H_i^G\}$ is closed under the action of all the automorphisms ${\rm Aut}(G)$ of $G$ where $H_i^G=\{x^{-1}H_ix\mid x\in G\}$ $(H_i\leq G)$. If not, this returns false.

References

[BT82] F. R. Beyl, J. Tappe, Group extensions, representations, and the Schur multiplicator, Lecture Notes in Mathematics, 958. Springer-Verlag, Berlin-New York, 1982.
[Dra89] Yu. A. Drakokhrust, On the complete obstruction to the Hasse principle, (Russian) Dokl. Akad. Nauk BSSR 30 (1986) 5-8; translation in Amer. Math. Soc. Transl. (2) 143 (1989) 29-34.
[DP87] Yu. A. Drakokhrust, V. P. Platonov, The Hasse norm principle for algebraic number fields, (Russian) Izv. Akad. Nauk SSSR Ser. Mat. 50 (1986) 946-968; translation in Math. USSR-Izv. 29 (1987) 299-322.
[HKY22] A. Hoshi, K. Kanai, A. Yamsaki, Norm one tori and Hasse norm principle, Math. Comp. 91 (2022) 2431-2458. Extended version: arXiv:1910.01469.
[HKY23] A. Hoshi, K. Kanai, A. Yamsaki, Norm one tori and Hasse norm principle, II: Degree 12 case, J. Number Theory 244 (2023) 84-110. Extended version: arXiv:2003.08253,
[HKY] A. Hoshi, K. Kanai, A. Yamsaki, Norm one tori and Hasse norm principle, III: Degree 16 case, arXiv.24xx.xxxxx
[Kap87] G. Karpilovsky, The Schur multiplier, London Mathematical Society Monographs. New Series, 2. The Clarendon Press, Oxford University Press, New York, 1987.
[Opo80] H. Opolka, Zur Auflösung zahlentheoretischer Knoten, Math. Z. 173 (1980) 95-103.
[PD85a] V. P. Platonov, Yu. A. Drakokhrust, On the Hasse principle for algebraic number fields, (Russian) Dokl. Akad. Nauk SSSR 281 (1985) 793-797; translation in Soviet Math. Dokl. 31 (1985) 349-353.
[PD85b] V. P. Platonov, Yu. A. Drakokhrust, The Hasse norm principle for primary extensions of algebraic number fields, (Russian) Dokl. Akad. Nauk SSSR 285 (1985) 812-815; translation in Soviet Math. Dokl. 32 (1985) 789-792.
[Rob96] D. J. S. Robinson, A course in the theory of groups, Second edition. Graduate Texts in Mathematics, 80. Springer-Verlag, New York, 1996.