# On the subalgebra lattice of a restricted Lie algebra

Pilar Páez-Guillán  Departamento de Matemáticas, Universidade de Santiago de
Compostela, Rúa Lope Gómez de Marzoa, 15782–Santiago de Compostela, Spain
<EMAIL_ADDRESS>,  Salvatore Siciliano  Dipartimento di Matematica e Fisica
“Ennio De Giorgi”, Università del Salento, Via Provinciale Lecce–Arnesano,
73100–Lecce, Italy<EMAIL_ADDRESS>and  David A. Towers
Lancaster University
Department of Mathematics and Statistics
LA$1$$4$YF Lancaster
England<EMAIL_ADDRESS>
###### Abstract.

In this paper we study the lattice of restricted subalgebras of a restricted
Lie algebra. In particular, we consider those algebras in which this lattice
is dually atomistic, lower or upper semimodular, or in which every restricted
subalgebra is a quasi-ideal. The fact that there are one-dimensional
subalgebras which are not restricted results in some of these conditions being
weaker than for the corresponding conditions in the non-restricted case.

###### Key words and phrases:

Restricted Lie algebra, restricted subalgebra, Frattini $p$-ideal, dually
atomistic, restricted quasi-ideal, lower semimodular, upper semimodular,
$J$-algebra, supersolvable.

###### 2010 Mathematics Subject Classification:

17B50, 17B05, 17B30, 17B60, 06D05.

##  1\. Introduction

The relationship between the structure of a group and that of its lattice of
subgroups is highly developed and has attracted the attention of many leading
algebraists. According to Schmidt ([18]), the origin of the subject can be
traced back to Dedekind, who studied the lattice of ideals in a ring of
algebraic integers; he discovered and used the modular identity, which is also
called the Dedekind law, in his calculation of ideals. Since then modularity
and lattice conditions related to it have been studied in a number of
contexts. The lattice of submodules of a module over a ring is modular, and
hence so is the lattice of subgroups of an abelian group. The lattice of
normal subgroups of a group is also modular, but the lattice of all subgroups
is not in general.

The study of the subalgebra lattice of a finite-dimensional Lie algebra was
popular in the 1980’s and in the 90’s (see, for example, [3, 7, 8, 9, 10, 11,
13, 14, 25, 26, 27, 28, 29, 30]), but interest then waned. The likely reason
is that most of the conditions under investigation were too strong and so few
algebras satisfied them. However, the lattice of restricted subalgebras of a
restricted Lie algebra is fundamentally different; for example, not every
element spans a one-dimensional restricted subalgebra. Thus, one could expect
more interesting results to hold for restricted algebras and, as we shall see,
this is indeed the case.

In Section 2 we fix some notation and terminology and introduce some results
that are needed later. In Section 3 we study restricted Lie algebras that are
dually atomistic; that is, such that every restricted subalgebra is an
intersection of maximal restricted subalgebras. We show that such algebras
over an algebraically closed field of positive characteristic are solvable or
semisimple, and then characterise the solvable ones more precisely. It turns
out that they are more abundant than in the non-restricted case. We then
investigate those restricted Lie algebras all of whose subalgebras (not
necessarily restricted) are intersections of maximals. It is shown that if the
ground field is algebraically closed then there are no such algebras that are
perfect.

The objective in Section 4 is to study restricted Lie algebras $L$ in which
every restricted subalgebra is a restricted quasi-ideal; that is, such that
$[S,H]\subseteq S+H$ for all restricted subalgebras $S,H$ of $L$. These are
characterised over an algebraically closed field of characteristic different
from 2, and the nilpotent ones more generally over a perfect field of
characteristic different from 2. In this regard, we also mention that
restricted Lie algebras over perfect fields all of whose restricted
subalgebras are ideals were characterized by the second author in [19].
Section 5 then goes on to consider $J$-algebras and lower semimodular
restricted Lie algebras. The main result here is the same as for the
corresponding situation as in the non-restricted case if the underlying field
is algebraically closed, but it is pointed out that the assumption of
algebraic closure cannot be omitted.

The final section is devoted to studying upper semimodular restricted Lie
algebras. It is shown that, over an algebraically closed field, such an
algebra is either almost abelian or nilpotent of class at most $2$. This is
proved by considering first upper semimodular restricted Lie algebras that are
generated by their one-dimensional restricted subalgebras. It is also shown
that over such fields the conditions that $L$ is modular, $L$ is upper
semimodular and every restricted subalgebra of $L$ is a quasi-ideal are
equivalent.

##  2\. Preliminaries

Here we fix some notation and terminology and introduce some results that will
be needed later. Unless otherwise stated, throughout the paper all algebras
are supposed finite-dimensional. Let $L$ be a Lie algebra over a field
${\mathbb{F}}$. As usual, the derived series for $L$ is defined inductively by
$L^{(0)}=L$, $L^{(k+1)}=[L^{(k)},L^{(k)}]$ for $k\geq 0$,
$L^{(\infty)}=\cap_{k\geq 0}L^{(k)}$; $L$ is solvable if $L^{(\infty)}=0$.
Similarly, the lower central series is defined inductively by $L^{1}=L$,
$L^{k+1}=[L^{k},L]$ for $k\geq 1$; $L$ is nilpotent if $L^{k}=0$ for some
$k\geq 1$. Also, $L$ is said to be _supersolvable_ if it admits a complete
flag made up of ideals of $L$, that is, there exists a chain

$0=L_{0}\subsetneq L_{1}\subsetneq\cdots\subsetneq L_{n}=L$

of ideals of $L$ such that $\dim L_{j}=j$ for every $0\leq j\leq n$. The
centre of $L$ is denoted by $Z(L)$, and $C_{B}(A)=\\{x\in B\colon[x,A]=0\\}$
denotes the centraliser in a subalgebra $B$ of another subalgebra $A$. Also,
the ascending central series is defined inductively by $C_{1}(L)=Z(L)$,
$C_{n+1}(L)=\\{x\in L\colon[x,L]\subseteq C_{n}(L)\\}$. The nilradical $N(L)$
is defined to be the maximal nilpotent ideal, and the solvable radical,
denoted by $R(L)$, is defined to be the maximal solvable ideal. For every
$x\in L$, the adjoint map of $x$ is defined by $\textup{ad}(x)\colon
L\rightarrow L$, $a\mapsto[x,a]$. If $S$ is a subalgebra of $L$, then the
largest ideal of $L$ contained in $S$ is called the core of $L$ and is denoted
by $S_{L}$. The Frattini subalgebra $F(L)$ of $L$ is the intersection of all
maximal subalgebras of $L$; the Frattini ideal of $L$ is $\phi(L)=F(L)_{L}$.
The abelian socle, $Asoc(L)$, is the sum of the minimal abelian ideals of $L$.
We will denote algebra direct sums by $\oplus$, whereas direct sums of the
vector space structure alone will be written as $\dot{+}$.

We say that $L$ is dually atomistic if every subalgebra of $L$ is an
intersection of maximal subalgebras of $L$. The Lie algebra $L$ is said to be
almost abelian if $L={\mathbb{F}}x\dot{+}A$, where $A$ is an abelian ideal of
$L$ and $\textup{ad}(x)$ acts as the identity map on $A$. Scheiderer proved in
[17] that, over a field of characteristic zero, every dually atomistic Lie
algebra is abelian, almost abelian or simple. Here we establish a slightly
weaker version of this which is valid over any field.

######  Proposition 2.1.

If $L$ is a dually atomistic Lie algebra over any field then $L$ is either
abelian, almost abelian or semisimple.

###### Proof.

Let $L$ be dually atomistic and suppose that $L$ is not semisimple. Then
$Asoc(L)\neq 0$ and $L$ splits over $Asoc(L)$, by [24, Theorem 7.3].
Furthermore, the minimal abelian ideals of $L$ are one-dimensional, by [17,
Lemma 1], so we can write
$L=({\mathbb{F}}a_{1}\oplus\dots\oplus{\mathbb{F}}a_{n})\dot{+}B$, where
${\mathbb{F}}a_{i}$ is a minimal ideal of $L$ for each $1\leq i\leq n$, $B$ is
a subalgebra of $L$, and $n\geq 1$.

Let $M$ be a maximal subalgebra of $L$ with $a_{1}\not\in M$. We shall show
that $L^{(\infty)}\subseteq M$. Now $L={\mathbb{F}}a_{1}+M$, so $M$ has
codimension one in $L$. It follows that $L/M_{L}$ is as described in [2,
Theorems 3.1 and 3.2]. Also,
$[{\mathbb{F}}a_{1},M_{L}]\subseteq{\mathbb{F}}a_{1}\cap M=0$. We consider the
three cases given in [2, Theorem 3.1] separately.

_Case (a)_ : Here $L/M_{L}$ is one-dimensional, so $M=M_{L}$ and
$L^{2}\subseteq M$.

_Case (b)_ : Here $L/M_{L}$ is two-dimensional, so
$L={\mathbb{F}}a_{1}+{\mathbb{F}}m+M_{L}$ where $m\in M\setminus M_{L}$. Now
$L^{2}\subseteq{\mathbb{F}}a_{1}+M_{L}$ and $L^{(2)}\subseteq M_{L}\subseteq
M$.

_Case (c)_ : Here $L/M_{L}\simeq L_{m}(\Gamma)$. If $m$ is odd then
$L_{m}(\Gamma)$ is simple. But $({\mathbb{F}}a_{1}+M_{L})/M_{L}$ is a one-
dimensional ideal of $L/M_{L}$, which is a contradiction. Hence $m$ is even,
in which case $L_{m}(\Gamma)={\mathbb{F}}x+L_{m}(\Gamma)^{2}$, where
$L_{m}(\Gamma)^{2}$ is simple. Put $L/M_{L}=\bar{L}$, and so on. Then
$\bar{L}={\mathbb{F}}\bar{a_{1}}\oplus\bar{L}^{2}$ and
$[\bar{L},\bar{a_{1}}]=\bar{0}$; that is, $[L,a_{1}]\subseteq M_{L}$, whence
$L^{2}\subseteq M$.

In any case we have established that, for any maximal subalgebra $M$ of $L$,
either $a_{1}\in M$ or $L^{(\infty)}\subseteq M$. Suppose that
$L^{(\infty)}\neq 0$. Then $L^{(\infty)}\neq{\mathbb{F}}a_{1}$ (since
$({\mathbb{F}}a_{1})^{2}=0$), so there is an element $x\in
L^{(\infty)}\setminus{\mathbb{F}}a_{1}$. Let $M$ be a maximal subalgebra
containing $x+a_{1}$. Then either $a_{1}\in M$ or $L^{(\infty)}\subseteq M$.
In each case, ${\mathbb{F}}x+{\mathbb{F}}a_{1}\subseteq M$. It follows that
${\mathbb{F}}(x+a_{1})$ cannot be an intersection of maximal subalgebras of
$L$, a contradiction. Hence, $L^{(\infty)}=0$ and $L$ is solvable. The result
now follows from [17, Lemma 1]. ∎

We shall need the following result which is due to Grunewald, Kunyavskii,
Nikolova and Plotkin for $p>5$. However, the same proof works for $p>3$ by
using the Corollary in page 180 of [20]. A. Premet has pointed out that the
result is also valid for $p=3$, but that it relies on results that have not
yet been published, so we omit this case.

######  Lemma 2.2.

Every simple Lie algebra $L$ over an algebraically closed field ${\mathbb{F}}$
of characteristic $p>3$ contains a subalgebra $S$ with a quotient isomorphic
to $\mathfrak{sl}(2,{\mathbb{F}})$.

###### Proof.

The proof is the same as for [12, Lemma 3.2] with the reference to [31, Part
II, Corollary 1.4] replaced by [20, page 180, Corollary]. ∎

In what follows we shall be studying the lattice of restricted subalgebras of
a restricted Lie algebra. Let $L$ be a restricted Lie algebra over a field of
characteristic $p>0$. For a subset $S$ of $L$, we denote by $\langle
S\rangle_{p}$ the restricted subalgebra generated by $S$. We say that $L$ is
_cyclic_ if $L=\langle x\rangle_{p}$ for some $x\in L$. An element $x\in L$ is
said to be _semisimple_ if $x\in\langle x^{[p]}\rangle_{p}$ and _toral_ if
$x^{[p]}=x$. An abelian restricted Lie algebra consisting of semisimple
elements is called a _torus_. An element $x\in L$ is said to be _$p$
-nilpotent_ if $x^{[p]^{n}}=0$ for some $n>0$ (in this case, the minimal $n$
with such a property is called the _order_ of $x$), and $L$ is said to be _$p$
-nilpotent_ if there exists $n>0$ such that $x^{[p]^{n}}=0$ for every $x\in
L$. We also introduce as “restricted analogues” of earlier concepts,
$F_{p}(L)$, the Frattini $p$-subalgebra of $L$, to be the intersection of the
maximal restricted subalgebras of $L$, and $\phi_{p}(L)$, the Frattini
$p$-ideal of $L$, to be the largest restricted ideal of $L$ which is contained
in $F_{p}(L)$. The abelian $p$-socle, $A_{p}soc(L)$, is the sum of the minimal
abelian restricted ideals of $L$. To avoid tedious repetition we shall
therefore often omit the word ’restricted’.

##  3\. Dually atomistic Lie algebras

We say that a restricted Lie algebra $L$ is dually atomistic if every
restricted subalgebra of $L$ is an intersection of maximal restricted
subalgebras of $L$. It is easy to see that if $L$ is dually atomistic then so
is every factor algebra of $L$, and if $L$ is dually atomistic then it is
$\phi_{p}$-free.

######  Lemma 3.1.

Let $L$ be a dually atomistic restricted Lie algebra. Then:

  1. (i)

$N(L)$ is abelian;

  2. (ii)

$M\cap N(L)$ is a restricted ideal of $L$ for every maximal restricted
subalgebra $M$ of $L$; and

  3. (iii)

for every subspace $S$ of $N(L)$, $\langle S\rangle_{p}$ is a restricted ideal
of $L$.

###### Proof.

(i) $N(L)^{2}\subseteq\phi_{p}(L)=0$ by [24, Theorem 6.5] and [15, Theorem
3.5].

(ii) The result is clear if $N(L)\subseteq M$, so suppose that
$N(L)\not\subseteq M$. Then $L=N(L)+M$ and

$\displaystyle[L,N(L)\cap M]$ $\displaystyle=[N(L)+M,N(L)\cap M]$
$\displaystyle\subseteq N(L)^{2}+N(L)\cap M^{2}\subseteq N(L)\cap M,$

using (i).

(iii) By (i), every subspace of $N(L)$ is a subalgebra of $L$. Let $S$ be any
subspace of $N(L)$. Then

$\langle S\rangle_{p}=\langle S\rangle_{p}\cap
N(L)=\left(\bigcap_{M\in\mathcal{M}}M\right)\cap
N(L)=\bigcap_{M\in\mathcal{M}}(M\cap N(L)),$

where $\mathcal{M}$ is the set consisting of all maximal restricted
subalgebras of $L$ containing $\langle S\rangle_{p}$. Therefore, $\langle
S\rangle_{p}$ is an intersection of restricted ideals of $L$, by (ii), and so
is itself a restricted ideal of $L$. ∎

######  Proposition 3.2.

Let $L$ be a dually atomistic restricted Lie algebra over an algebraically
closed field ${\mathbb{F}}$. Then $L$ is solvable or semisimple.

###### Proof.

Suppose that $L$ is not semisimple. Then
$L=N(L)\dot{+}B=A_{1}\oplus\cdots\oplus A_{n}\dot{+}B$, where $B$ is a
restricted subalgebra of $L$ and $A_{1}\oplus\cdots\oplus
A_{n}=A_{p}soc(L)\neq 0$, by [15, Theorems 3.4 and 4.2]. If $B=0$, then $L$ is
nilpotent and we are done. Assume therefore that $B\neq 0$.

Suppose first that $N(L)=Z(L)$. Then, $L=Z(L)\oplus B$ and $L^{2}\subseteq B$.
Then we must have that $N(L)=R(L)$. For, otherwise, there is a minimal ideal
$A/N(L)$ of $L/N(L)$ with $A\subseteq R(L)$. But $A$ is nilpotent, which is a
contradiction. Thus, $B$ is semisimple and $Z(L)\neq 0$. Let $M$ be a maximal
restricted subalgebra of $L$. If $Z(L)$ is not contained in $M$ then $M+Z(L)$
is a restricted subalgebra properly containing $M$, so $L=M+Z(L)$ and $\langle
B^{2}\rangle_{p}=\langle L^{2}\rangle_{p}\subseteq M$, since $L^{2}\subseteq
M$ and $M$ is restricted. Hence, either $Z(L)$ or $\langle B^{2}\rangle_{p}$
is inside $M$.

Let $z\in Z(L)$ and $b\in\langle B^{2}\rangle_{p}$, and let $M$ be a maximal
restricted subalgebra containing $\langle z+b\rangle_{p}$. Then $z,b\in M$, so
we must have $\langle z\rangle_{p}+\langle b\rangle_{p}=\langle
z+b\rangle_{p}$. But then
$b=\sum_{i=0}^{n}\lambda_{i}(b^{[p]^{i}}+z^{[p]^{i}})$, so
$b=\sum_{i=0}^{n}\lambda_{i}b^{[p]^{i}}$ and
$\sum_{i=0}^{n}\lambda_{i}z^{[p]^{i}}=0$. If $b$ is not semisimple, then
$\lambda_{0}=1$ which implies that $z$ is semisimple, from the second sum.
This must hold for every choice of $z\in Z(L)$, so $Z(L)$ is a torus of $L$,
by [23, Chapter 2, Theorem 3.10]. A similar argument shows that if $z$ is not
semisimple then every $b$ must be, in which case $\langle B^{2}\rangle_{p}$ is
a torus of $L$. Hence, either $Z(L)$ or $\langle B^{2}\rangle_{p}$ is a torus.
In the latter case, $\langle B^{2}\rangle_{p}$ is abelian, contradicting the
fact that $B$ is semisimple. In the former case, both $Z(L)$ and $\langle
B^{2}\rangle_{p}$ have a toral element: $z$ and $b$, say. But then $\langle
z\rangle_{p}+\langle
b\rangle_{p}={\mathbb{F}}z+{\mathbb{F}}b\neq{\mathbb{F}}(z+b)=\langle
z+b\rangle_{p}$, a contradiction.

Therefore suppose that $N(L)\neq Z(L)$. Then there is a minimal restricted
ideal $A$ with $A\subseteq N(L)$ and $A\cap Z(L)=0$. Moreover, if $a\in A$, we
have that $a^{[p]}\in A\cap Z(L)$, so $A={\mathbb{F}}a$ with $a^{[p]}=0$, by
Lemma 3.1(iii). Let $M$ be a maximal restricted subalgebra of $L$ such that
$a\notin M$. We have $L=M\dot{+}A$, by [15, Lemma 2.1], so $M$ has codimension
one in $L$, and, as in Proposition 2.1, $\langle
L^{(\infty)}\rangle_{p}\subseteq M$. It follows that $\langle
L^{(\infty)}\rangle_{p}\cap A=0$. Choose $x\in\langle
L^{(\infty)}\rangle_{p}$. Then $[x,a]\in L^{(\infty)}\cap A=0$. If $\langle
x+a\rangle_{p}=\langle x\rangle_{p}+\langle a\rangle_{p}$, then we have
$a=\sum_{i=0}^{n}\lambda_{i}(x+a)^{[p]^{i}}=\lambda_{0}a+\sum_{i=0}^{n}\lambda_{i}x^{[p]^{i}}$.
Hence $\lambda_{0}=1$ and $x$ is semisimple. It follows from [23, Chapter 2,
Theorem 3.10] that $\langle L^{(\infty)}\rangle_{p}$ is abelian. But this
means that $L$ is solvable.∎

For a field ${\mathbb{F}}$ of characteristic $p>0$, we will denote by
${\mathbb{F}}[t,\sigma]$ the skew polynomial ring over ${\mathbb{F}}$ in the
indeterminate $t$ with respect to the Frobenius endomorphism $\sigma$ of
${\mathbb{F}}$. We recall ${\mathbb{F}}[t,\sigma]$ is the ring consisting of
all polynomials $f=\sum_{i\geq 0}\alpha_{i}t^{i}$ with respect to the usual
sum and multiplication defined by the condition $t\cdot\alpha=\alpha^{p}t$ for
every $\alpha\in{\mathbb{F}}$.

######  Proposition 3.3.

Let $L$ be a solvable restricted Lie algebra over any field ${\mathbb{F}}$. If
$L$ is dually atomistic then

$L\simeq(\mathcal{L}/\langle\bar{f_{1}}\rangle_{p}\oplus\cdots\mathcal{L}/\langle\bar{f_{r}}\rangle_{p}\oplus{\mathbb{F}}x_{r+1}\oplus\cdots\oplus{\mathbb{F}}x_{n})\dot{+}{\mathbb{F}}b,$

where $r\geq 0$, but $r\neq n$, $b$ is toral, $\mathcal{L}=\langle
x\rangle_{p}$ is a free cyclic restricted Lie algebra and
$\bar{f_{i}}=\sum_{k=0}^{s}\alpha_{k}x^{{[p]}k}$ is an element of
$\mathcal{L}$ such that $f_{i}=\sum_{k=0}^{s}\alpha_{k}t^{k}$ is an
irreducible element of the ring ${\mathbb{F}}[t,\sigma]$.

###### Proof.

The nilradical $N(L)$ of $L$ is non-zero and abelian by Lemma 3.1(i). As $L$
is $\phi_{p}$-free, $L=N(L)\dot{+}B$ for some restricted subalgebra $B$ of
$L$, and $N(L)=A_{p}soc(L):=A$, by [15, Theorems 3.4 and 4.2]. Let $a\in A$.
Then $C_{B}(A)$ is a restricted ideal of $L$ and $C_{B}(A)\cap A=0$, so
$C_{B}(A)=0$ and $B$ acts faithfully on $A$. Also $\textup{ad}^{2}(a)=0$ and
so $\textup{ad}(a^{[p]})=0$, whence $a^{[p]}\in Z(L)$ for all $a\in A$.

We can write $A=A_{1}\oplus\dots\oplus A_{n}$, where $A_{i}$ is a minimal
abelian restricted ideal of $L$ for $1\leq i\leq n$. Moreover,
$A_{i}\simeq\mathcal{L}/\langle\bar{f_{i}}\rangle_{p}$, where
$\bar{f_{i}}=\sum_{k\geq 0}\alpha_{k}x^{{[p]}k}$ is an element of
$\mathcal{L}$ such that $f_{i}=\sum_{k\geq 0}\alpha_{k}t^{k}$ is an
irreducible element of the ring ${\mathbb{F}}[t,\sigma]$, by Lemma 3.1(iii)
and [16, Proposition 3.1]. Let $A_{1}\oplus\dots\oplus A_{r}=Z(L)$, where we
allow that $r$ could be $0$. Since $B$ acts faithfully on $A$ we cannot have
$r=n$. Then $[B,A]=A_{r+1}\oplus\dots\oplus
A_{n}={\mathbb{F}}x_{r+1}\oplus\dots\oplus{\mathbb{F}}x_{n}$. Now
$C_{B}(x_{i})$ is a restricted ideal of $L$, so $C_{B}(x_{i})=0$ for each
$r+1\leq i\leq n$. Let $b_{1},b_{2}\in B$. Then
$[b_{i},x_{n}]=\lambda_{i}x_{n}$ for some $0\neq\lambda_{i}\in{\mathbb{F}}$,
$i=1,2$. But then $[\lambda_{2}b_{1}-\lambda_{1}b_{2},x_{n}]=0$, whence
$b_{1}$ and $b_{2}$ are linearly dependent and $B$ is one-dimensional. Choose
$B={\mathbb{F}}b$ such that $[b,x_{n}]=x_{n}$. Let $b^{[p]}=\mu b$. Then

$x_{n}=[b^{[p]},x_{n}]=\mu[b,x_{n}]=\mu x_{n},$

so $\mu=1$ and $b$ is toral. ∎

We introduce another piece of notation before presenting the following
results. We say that a Lie algebra is restricted dually atomistic if it is
restricted and every subalgebra is an intersection of maximal subalgebras.

######  Proposition 3.4.

Let $L$ be a perfect restricted dually atomistic Lie algebra over any field
${\mathbb{F}}$ of characteristic $p>0$. Then every subalgebra of $L$ is
restricted.

###### Proof.

Arguing as in [15, Lemma 3.7], it is immediate to prove that every maximal
subalgebra of $L$ is self-idealising. It follows from [15, Lemma 3.9] that
every maximal subalgebra of $L$ is restricted. The result now follows from the
fact that $L$ is dually atomistic. ∎

######  Theorem 3.5.

There are no perfect restricted dually atomistic Lie algebras over an
algebraically closed field.

###### Proof.

Suppose that $L$ is a counterexample of minimal dimension. By Proposition 3.4,
$L$ is simple as a Lie algebra, and hence its absolute toral rank is just the
dimension of a maximal torus $T$ (cf. [22, §1.2]). Given two linearly
independent elements $x,y\in T$, Proposition 3.4 forces $0\neq(x+\lambda
y)^{[p]}\in{\mathbb{F}}(x+\lambda y)$ for all $\lambda\in{\mathbb{F}}$, but
this cannot happen since ${\mathbb{F}}$ is algebraically closed. Hence, $L$
has absolute toral rank $1$.

Now, if ${\mathbb{F}}$ has characteristic $p=2,3$, then [21, Theorem 6.5]
yields that $L$ is solvable or isomorphic to $\mathfrak{sl}(2,{\mathbb{F}})$
or to $\mathfrak{psl}(3,{\mathbb{F}})$. Otherwise, $L$ has a restricted
subalgebra with a quotient isomorphic to $\mathfrak{sl}(2,{\mathbb{F}})$, by
Lemma 2.2 and Proposition 3.4. But both $\mathfrak{sl}(2,{\mathbb{F}})$ and
$\mathfrak{psl}(3,{\mathbb{F}})$ have elements which are neither semisimple
nor $p$-nilpotent, which clearly contradicts Proposition 3.4. ∎

As well as the three-dimensional non-split simple Lie algebra, which is dually
atomistic in the characteristic zero case, there exist other perfect dually
atomistic simple restricted Lie algebras over a perfect field which is not
algebraically closed. For example, let $L$ be the seven-dimensional simple Lie
algebra over a perfect field of characteristic 3 constructed by Gein in [8,
Example 2]. This algebra $L$ can be endowed with a $[p]$-mapping such that
every element is semisimple. Any two linearly independent elements of $L$
generate a three-dimensional non-split restricted subalgebra which is maximal
in $L$. Any second-maximal restricted subalgebra is then one-dimensional, and
every one-dimensional restricted subalgebra $S$ is inside more than one
maximal restricted subalgebra whose intersection is $S$.

We finish this section by studying the so-called atomistic restricted Lie
algebras, those in which every restricted subalgebra is generated by minimal
restricted subalgebras.

######  Proposition 3.6.

Let ${\mathbb{F}}$ be an algebraically closed field of characteristic $p>0$. A
restricted Lie algebra $L$ over ${\mathbb{F}}$ is atomistic if and only if
every $p$-nilpotent cyclic restricted subalgebra is one-dimensional.

###### Proof.

Note that $L$ is atomistic if and only if all its cyclic restricted
subalgebras are atomistic. Consider the cyclic restricted subalgebra $C$,
whose semisimple elements form a torus $T$, and whose $p$-nilpotent elements
form a $p$-nilpotent restricted subalgebra $P$. By [23, Chapter 2, Theorem
3.6], $T$ is atomistic. From [23, Chapter 2, Theorem 3.5], it follows that
$C=T\oplus P$, so $C$ is atomistic if and only if $P$ is atomistic. But this
is equivalent to requiring that $\dim P=1$ ([16, Theorem 3.8]). The result
follows. ∎

##  4\. Restricted quasi-ideals

A restricted subalgebra $S$ of $L$ is called a restricted quasi-ideal of $L$
if $[S,H]\subseteq S+H$ for all restricted subalgebras $H$ of $L$. Clearly,
every restricted subalgebra that is a quasi-ideal is also a restricted quasi-
ideal.

Denote by $L^{[p]}$ the restricted subalgebra generated by all the elements
$x^{[p]}$, with $x\in L$.

######  Lemma 4.1.

If $S$ is a restricted subalgebra of $L$, then $S_{L}$ is a restricted ideal
of $L$

###### Proof.

Simply note that $(S_{L})^{[p]}$ is an ideal of $L$ inside $S$. ∎

######  Proposition 4.2.

If ${\mathbb{F}}$ is perfect then $L^{[p]}$ is a restricted quasi-ideal if and
only if it is an ideal of $L$.

###### Proof.

Suppose that $L^{[p]}$ is a restricted quasi-ideal of $L$. Then, for all $x\in
L$

$[L^{[p]},x]\subseteq L^{[p]}+\langle x\rangle_{p}=L^{[p]}+{\mathbb{F}}x,$

so $L^{[p]}$ is a quasi-ideal. Suppose that $L^{[p]}$ is not an ideal of $L$,
and factor out $(L^{[p]})_{L}$, so we can assume that $L^{[p]}$ is core-free.
Then, by [1, Theorem 3.6], there are three possibilities which we will
consider in turn.

Suppose first that $L^{[p]}$ has codimension 1 in $L$. Define $(L^{[p]})_{i}$
as in [2, (5)]. Then every element $x\in L$ can be written as $x=x_{s}+x_{n}$,
where $x_{s}$ is semisimple and $x_{n}$ is $p$-nilpotent, by [23, Theorem
3.5]. Moreover, all semisimple elements belong to $L^{[p]}$, so
$L=L^{[p]}+{\mathbb{F}}x$ for some $p$-nilpotent element $x$. Suppose that
$x^{[p]^{k}}=0$. Now $(L^{[p]})_{i}=\\{y\in L^{[p]}\mid[y,_{i}x]\in
L^{[p]}\\}$ for $i\geq 0$, by [2, Lemma 2.1(b)]. Hence
$[y,_{p^{h}}x]=[y,x^{[p]^{h}}]=0$ for $h\geq k$. Also, $(L^{[p]})_{0}=L^{[p]}$
and $(L^{[p]})_{i+1}\subseteq(L^{[p]})_{i}$ for $i\geq 0$, so
$(L^{[p]})_{L}=\cap_{i=0}^{\infty}(L^{[p]})_{i}=L^{[p]}$, by [2, Lemma 2.1],
contradicting the fact that $L^{[p]}$ is not an ideal of $L$.

On the other hand, [1, Theorem 3.6(c)] cannot hold, as the three-dimensional
simple Lie algebra $W(1,2)^{2}$ over a field of characteristic $2$ is not
restrictable. To see this simply note that the derivation $\textup{ad}^{2}(x)$
is not inner.

Finally, suppose that [1, Theorem 3.6(d)] holds. Then $L=L^{2}+{\mathbb{F}}y$
where $\textup{ad}(y)$ acts as the identity map on $L^{2}$ and
$L^{[p]}={\mathbb{F}}y$. Let $x\in L^{2}$. We have
$\textup{ad}^{p}(y)=\textup{ad}(y)$ and $\textup{ad}^{p}(x)=0$ for every $x\in
L^{2}$. Therefore, as $L$ is centerless, the $p$-mapping of $L$ is determined
by the conditions $y^{[p]}=y$ and $x^{[p]}=0$. This implies $L^{[p]}=L$, a
contradiction.

The converse is straightforward. ∎

######  Proposition 4.3.

Let $L$ be a restricted Lie algebra such that every restricted subalgebra of
$L$ is a restricted quasi-ideal. Then $L^{2}\subseteq L^{[p]}$. It follows
that $L^{3}=L^{p+1}$; in particular, if $L$ is nilpotent, then $L$ has
nilpotency class at most $2$.

###### Proof.

By Proposition 4.2, $L^{[p]}$ is a restricted ideal. Put
$\mathfrak{L}=L/L^{[p]}$. Then $\mathfrak{L}^{[p]}=0$ and every subalgebra of
$\mathfrak{L}$ is a quasi-ideal. If $\mathfrak{L}$ is not abelian then it is
almost abelian, by [1, Theorem 3.8], so
$\mathfrak{L}=\mathfrak{L}^{2}+{\mathbb{F}}y$, where $\textup{ad}(y)$ acts as
the identity map on $\mathfrak{L}^{2}$. But then, if $0\neq
x\in\mathfrak{L}^{2}$, then $0=[y^{[p]},x]=x$, a contradiction. It follows
that $\mathfrak{L}^{2}=0$, so $L^{2}\subseteq L^{[p]}$. Now, if $p\neq 2$,
then we are done. Assume then that $p=2$, and suppose, by contradiction, that
$L$ has nilpotency class $n>2$. Set $H=L/C_{n-3}(L)$, which has nilpotency
class $3$. By [4, Chapter 16, Proposition 1.1], $H$ does not satisfy the
second Engel condition, and therefore there exist $x,y\in H$ such that
$[x,y^{[2]}]=[[x,y],y]\neq 0$. Set $\tilde{x},\tilde{y}$ to be preimages of
$x,y$ in $L$, and note that
$\tilde{x}^{[2]^{2}},\tilde{y}^{[2]^{2}},[\tilde{x}^{[2]},\tilde{y}^{[2]}]\in
C_{n-3}(L)$. Then, by hypothesis we can write
$[x,y^{[2]}]=\lambda_{1}x+\lambda_{2}x^{[2]}+\lambda_{3}y^{[2]}$ for some
$\lambda_{i}\in{\mathbb{F}}$, $i=1,2,3$. Also, we have that
$[[x,y^{[2]}],z]=0$ for any $z\in H$. For $z=y^{[2]}$ we obtain that
$\lambda_{1}=0$, for $z=x$ we have $\lambda_{3}=0$ and, finally, for $z=y$ we
get $[x^{[2]},y]=0$. Now, write
$[x,y]=\lambda_{4}x+\lambda_{5}x^{[2]}+\lambda_{6}y+\lambda_{7}y^{[2]}$, for
some $\lambda_{i}\in{\mathbb{F}}$, $i=4,\dots,7$. But then
$[x,y^{[2]}]=[[x,y],y]=\lambda_{4}[x,y]$, and
$0=[[x,y],y^{[2]}]=\lambda_{4}[x,y^{[2]}]$. Consequently, $\lambda_{4}=0$ and
$[x,y^{[2]}]=0$, a contradiction. ∎

######  Lemma 4.4.

Let $L$ be a restricted Lie algebra over an algebraically closed field of
characteristic $p>0$ in which every restricted subalgebra is a restricted
quasi-ideal. If $H$ is a Cartan subalgebra of $L$, then $L$ has root space
decomposition

$L=H\dot{+}(\oplus_{\alpha\in\Phi}(L_{\alpha}\dot{+}L_{-\alpha})\oplus_{\beta\in\Psi}L_{\beta}),$

where $\Phi$ is the set of roots $\alpha$ for which $-\alpha$ is also a root,
and $\Psi$ is the remaining set of roots.

###### Proof.

Let $T$ be a maximal torus, $H=C_{L}(T)$ and let
$L=H\dot{+}_{\alpha\in\Pi}L_{\alpha}$ be the corresponding root space
decomposition. Then

$[x_{\alpha},x_{\beta}]=\lambda x_{\alpha}+\mu x_{\beta}+h\hbox{ for some
}h\in H,$

since $L_{\alpha}^{[p]}\subseteq H$ for all $\alpha\in\Pi$, by [23, Corollary
4.3]. But $[L_{\alpha},L_{\beta}]\subseteq L_{\alpha+\beta}$, so, either
$[L_{\alpha},L_{\beta}]=0$ or $[L_{\alpha},L_{\beta}]\subseteq H$ and
$\alpha+\beta=0$. If $[L_{\alpha},L_{\beta}]=0$ for $\alpha\neq\beta$ then
$[L_{-\alpha},L_{\beta}]=0$ also, giving the root space decomposition claimed.
∎

Suppose that every restricted subalgebra of $L$ is a restricted quasi-ideal.
Let $S$ be the subspace spanned by the semisimple elements of $L$ and let $P$
be the subspace spanned by the $p$-nilpotent elements of $L$. Then $S$ and $P$
are subalgebras of $L$, since $[x,y]\in\langle x\rangle_{p}+\langle
y\rangle_{p}$, and, if ${\mathbb{F}}$ is perfect, $L=S+P$. Moreover, both are
restricted, since

$(\lambda x+\mu
y)^{[p]}=\lambda^{p}x^{[p]}+\mu^{p}y^{[p]}+\sum_{i=1}^{p-1}s_{i}(x,y),$

and $x^{[p]},y^{[p]}$ are semisimple (respectively, $p$-nilpotent) if so are
$x,y$, and $s_{i}(x,y)\in\langle x,y\rangle^{p}$.

######  Proposition 4.5.

Let $L$ be a nilpotent restricted Lie algebra over a perfect field of
characteristic different from $2$. Then every restricted subalgebra of $L$ is
a restricted quasi-ideal of $L$ if and only if $L=S\oplus P$, where $S$ is a
toral ideal and $P$ is a p-nilpotent ideal in which every restricted
subalgebra is a restricted quasi-ideal.

###### Proof.

Suppose that every restricted subalgebra of $L$ is a restricted quasi-ideal of
$L$ . By Proposition 4.3, $L^{3}=0$ and $L^{[p]}\subseteq Z(L)$. Then, for all
$x,y\in L$, $(x+y)^{[p]}=x^{[p]}+y^{[p]}$, so $S,P$ are just the sets of
semisimple and $p$-nilpotent elements of $L$ respectively. Then $S\cap P=0$
and $S\subseteq Z(L)$. It follows that $L=S\oplus P$ and that $S$ is toral.

The converse is straightforward. ∎

######  Corollary 4.6.

Let $L$ be a restricted Lie algebra over an algebraically closed field of
characteristic different from 2 in which every restricted subalgebra of $L$ is
a restricted quasi-ideal of $L$. Then $L$ has a Cartan subalgebra $H$ such
that $H=S\oplus P$ where $S$ is a torus and $P$ is the set of p-nilpotent
elements in $H$, and $L=S\dot{+}N$ where $N$ is an ideal, $N^{3}=0$ and
$N^{[p]}\subseteq Z(H)$.

###### Proof.

We have that $L$ has the form given in Lemma 4.4 and $H=S\oplus P$, by
Proposition 4.5. Now $L_{\alpha}^{2}=L_{-\alpha}^{2}=L_{\beta}^{2}=0$ since
$2\alpha$, $-2\alpha$ and $2\beta$ are not roots. For every $h\in H$,
$\alpha\in\Pi=\Phi\cup\Psi$, we have that $[h,x_{\alpha}]\in(\langle
h\rangle_{p}+\langle x_{\alpha}\rangle_{p})\cap L_{\alpha}$, so
$[h,x_{\alpha}]=\lambda x_{\alpha}$ for some $\lambda\in{\mathbb{F}}$; that
is, $h$ acts semisimply on $L_{\alpha}$. Also $\alpha(x_{\alpha}^{[p]})=0$, by
[23, Chapter 2, Corollary 4.3 (4)]. It follows that
$[x_{\alpha}^{[p]},x_{-\alpha}]=0$. Similarly,
$[x_{-\alpha}^{[p]},x_{\alpha}]=0$. Now $[x_{\alpha},x_{-\alpha}]\in\langle
x_{\alpha}^{[p]}\rangle_{p}+\langle x_{-\alpha}^{[p]}\rangle_{p}$, so, if
$N=P+\sum_{\alpha\in\Phi}(L_{\alpha}+L_{-\alpha})+\sum_{\beta\in\Psi}L_{\beta}$
we have $N^{3}=0$ and $N^{[p]}\subseteq Z(H)$. ∎

##  5\. $J$-algebras and lower semimodular restricted Lie algebras

For this section, it will be useful to handle the following result.

######  Lemma 5.1.

Let $L$ be a restricted Lie algebra over an algebraically closed field of
characteristic $p>0$. If $L$ is supersolvable, then $L$ admits a complete flag
made up of restricted ideals of $L$.

###### Proof.

Plainly, it is enough to show that $L$ has a one-dimensional restricted ideal,
from which the conclusion will follow by induction. Suppose $\dim L>1$, the
claim being trivial otherwise. Consider a complete flag

$0=L_{0}\subsetneq L_{1}\subsetneq\cdots\subsetneq L_{n}=L$

of ideals of $L$. If the ideal $L_{1}$ is restricted, then we are done. Thus
we can suppose that there exists $x\in L_{1}$ such that $x^{[p]}\notin L_{1}$.
As $L_{1}$ is an abelian ideal, the restricted subalgebra $H$ generated by
$x^{[p]}$ is contained in the centre of $L$. Since the ground field is
algebraically closed, by [23, Chapter 2, Theorem 3.6] we see that $H$ contains
a toral element $t$. We conclude that $I={\mathbb{F}}t$ is a one-dimensional
restricted ideal of $L$, as desired. ∎

Note that the assumption that the ground field is algebraically closed is
essential for the validity of Lemma 5.1. In fact, over arbitrary fields of
positive characteristic, there can be cyclic restricted Lie algebras of
arbitrary dimension with no non-zero proper restricted subalgebras (cf. [16,
Proposition 3.1]).

Let $L$ be a restricted Lie algebra. A restricted subalgebra $U$ of $L$ is
called lower semimodular in $L$ if $U\cap B$ is maximal in $B$ for every
restricted subalgebra $B$ of $L$ such that $U$ is maximal in $\langle
U,B\rangle_{p}$. We say that $L$ is lower semimodular if every restricted
subalgebra of $L$ is lower semimodular in $L$.

If $U$, $V$ are restricted subalgebras of $L$ with $U\subseteq V$, a J-series
(or Jordan-Dedekind series) for $(U,V)$ is a series

$U=U_{0}\subsetneq U_{1}\subsetneq\ldots\subsetneq U_{r}=V$

of restricted subalgebras such that $U_{i}$ is a maximal subalgebra of
$U_{i+1}$ for $0\leq i\leq r-1$. This series has length equal to $r$. We shall
call $L$ a J-algebra if, whenever $U$ and $V$ are restricted subalgebras of
$L$ with $U\subseteq V$, all $J$-series for $(U,V)$ have the same finite
length, $d(U,V)$. Put $d(L)=d(0,L)$.

######  Proposition 5.2.

For a solvable restricted Lie algebra $L$ over an algebraically closed field
of characteristic $p>0$ the following are equivalent:

  * (i)

$L$ is lower semimodular;

  * (ii)

$L$ is a $J$-algebra; and

  * (iii)

$L$ is supersolvable.

###### Proof.

(i)$\Rightarrow$(ii): This is just a lattice theoretic result (see [6, Theorem
V3]).

(ii)$\Rightarrow$(iii): We first show by induction on $\dim L$ that there
exists a series of restricted subalgebras from $0$ to $L$ having length $\dim
L$. Suppose $L\neq 0$. As $L$ is solvable, it holds that $\langle
L^{(1)}\rangle_{p}\neq L$; otherwise, $L^{(1)}=\langle
L^{(1)}\rangle_{p}^{(1)}=L^{(2)}\neq 0$, a contradiction. Then the inductive
hypothesis ensures the existence of a series of restricted subalgebras

$U=U_{0}\subsetneq U_{1}\subsetneq\ldots\subsetneq U_{r}=\langle
L^{\prime}\rangle_{p}$

with $\dim U_{i}=i$ for all $0\leq i\leq r$. Moreover, as $L/\langle
L^{\prime}\rangle_{p}$ is abelian, Lemma 5.1 yields the claim.

Now, by hypothesis, all $J$-series of restricted subalgebras from $0$ to $L$
have length $\dim L$, and consequently all maximal restricted subalgebras have
codimension one in $L$. On the other hand, if $H$ is a maximal subalgebra of
$L$ which is not restricted, then pick an element $x$ of $H$ such that
$x^{[p]}\notin H$. Then $H+{\mathbb{F}}x^{[p]}$ is a subalgebra of $L$
properly containing $H$, so $H+{\mathbb{F}}x^{[p]}=L$ by the maximality of
$H$. Therefore, every maximal subalgebra has codimension one in $L$, which
allows to conclude that $L$ is supersolvable, by [5, Theorem 7].

(iii)$\Rightarrow$(i): Let $U,B$ be restricted subalgebras of $L$ such that
$U$ is maximal in $\langle U,B\rangle_{p}$. By Lemma 5.1, $U$ has codimension
1 in $\langle U,B\rangle_{p}$, which forces $\langle U,B\rangle_{p}=U+B$. It
follows that $\dim(B/(U\cap B))=\dim((U+B)/U)=1$, whence $U\cap B$ is maximal
in $B$, completing the proof. ∎

Note that the assumption of solvability is actually needed in the previous
result. In fact, consider the restricted Lie algebra
$L=\mathfrak{sl}(2,{\mathbb{F}})$ over an algebraically closed field
${\mathbb{F}}$ of characteristic $p>2$. Then all $J$-series of restricted
subalgebras of $L$ have length 3, despite the fact that $L$ is simple.

##  6\. Upper semimodular restricted Lie algebras

Let $L$ be a restricted Lie algebra. We say that a restricted subalgebra $S$
of $L$ is upper semimodular in $L$ if $S$ is maximal in $\langle
S,T\rangle_{p}$ for every restricted subalgebra $T$ of $L$ such that $S\cap T$
is maximal in $T$. The restricted Lie algebra $L$ is called upper semimodular
if all of its restricted subalgebras are upper semimodular in $L$.

This section is devoted to study the structure of upper semimodular restricted
Lie algebras over algebraically closed fields. In particular, our main aim of
this section is to prove the following result:

######  Theorem 6.1.

Let $L$ be a restricted Lie algebra over an algebraically closed field. The
following conditions are equivalent:

  1. (i)

$L$ is upper semimodular;

  2. (ii)

$L$ is modular;

  3. (iii)

every restricted subalgebra of $L$ is a restricted quasi-ideal.

Moreover, if one of the previous statements holds, then $L$ is either almost
abelian or nilpotent of class at most $2$.

We start with some preliminary results.

Let $L$ be an almost abelian Lie algebra over a field ${\mathbb{F}}$ of
characteristic $p>0$. Then $L={\mathbb{F}}x\dot{+}A$, where $A$ is an abelian
ideal and $\textup{ad}(x)$ acts as the identity map on $A$. It is immediate to
check that $L$ is restrictable and also centerless, so it admits a unique
$p$-mapping by [23, Chapter 2, Corollary 2.2]. Explicitly, this $p$-mapping is
given by $a^{[p]}=0$ for all $a\in A$ and $x^{[p]}=x$.

######  Lemma 6.2.

Let $L$ be an upper semimodular restricted Lie algebra over an algebraically
closed field of characteristic $p>0$. If $L$ is generated by two distinct one-
dimensional restricted subalgebras $X$ and $Y$, then $L$ is two-dimensional.

###### Proof.

Let $Z$ be a nonzero proper restricted subalgebra of $L$. Assume first that
$X\subseteq Z,Y\not\subseteq Z$. As $X\cap Y=0$ is maximal in $Y$, $X$ must be
maximal in $L$, yielding $Z=X$. Assume now that $X,Y\not\subseteq Z$ and take
a one-dimensional restricted subalgebra $Z^{\prime}$ of $Z$. By the previous
case, $\langle X,Z^{\prime}\rangle_{p}=L$. Since $X\cap Z^{\prime}=0$ is
maximal in $X$, $Z^{\prime}$ is maximal in $L$ and $Z=Z^{\prime}$. Thus, all
nonzero proper restricted subalgebras of $L$ are one-dimensional, and it
follows from [32, Lemma 1.6] that $L$ is two-dimensional. ∎

######  Lemma 6.3.

Let ${\mathbb{F}}$ be an algebraically closed field of characteristic $p>0$.
Let $L$ be a non-abelian upper semimodular restricted Lie algebra over
${\mathbb{F}}$ generated by three one-dimensional restricted subalgebras.
Then, $L$ is centerless.

###### Proof.

Let ${\mathbb{F}}x$, ${\mathbb{F}}y$, ${\mathbb{F}}z$ be three distinct one-
dimensional restricted subalgebras generating $L$ and suppose, by
contradiction, that $Z(L)\neq 0$. Note that we can take $x$ to be either toral
or such that $x^{[p]}=0$. By Lemma 6.2 and without loss of generality, we may
also assume $x\in Z(L)$ and that $\langle y,z\rangle_{p}$ is almost abelian,
with $[y,z]=z$, $y^{[p]}=y$ and $z^{[p]}=0$. If $x^{[p]}=0$, then $\langle
x+z\rangle_{p}\cap{\mathbb{F}}y=0$ is maximal in $\langle x+z\rangle_{p}$, but
${\mathbb{F}}y$ is not maximal in $\langle x+z,y\rangle_{p}=L$, a
contradiction. On the other hand, if $x$ is toral, then

$x\in\langle x-z\rangle_{p}\subseteq\langle x+y,y+z\rangle_{p},$

so $\langle x+y,y+z\rangle_{p}=L$. Now $\langle x+y\rangle_{p}\cap\langle
y+z\rangle_{p}=0$ is maximal in $\langle x+y\rangle_{p}$, but $\langle
y+z\rangle_{p}$ is not maximal in $L$, a contradiction. ∎

######  Proposition 6.4.

Let ${\mathbb{F}}$ be an algebraically closed field of characteristic $p>0$.
Any upper semimodular restricted Lie algebra $L$ over ${\mathbb{F}}$ generated
by its one-dimensional restricted subalgebras is either abelian or almost
abelian.

###### Proof.

By Lemma 6.2, all the restricted subalgebras of $L$ generated by two one-
dimensional restricted subalgebras are abelian or almost abelian. Suppose that
$\langle y,x_{1}\rangle_{p}$ is almost abelian, where
${\mathbb{F}}y,{\mathbb{F}}x_{1}$ are restricted subalgebras of $L$ with
$[y,x_{1}]=x_{1}$, $y^{[p]}=y$ and $x_{1}^{[p]}=0$. Write $L=\langle
y,x_{1},\dots,x_{s}\rangle_{p}$, where $y,x_{1},\dots,x_{s}$ are linearly
independent.We claim that $\langle y,x_{i}\rangle_{p}$ is almost abelian for
$i=2,\dots,s$. Suppose otherwise that $[y,x_{i}]=0$ for some $i\neq 1$. By
Lemma 6.3, we must have $[x_{1},x_{i}]\neq 0$. Then $\langle
x_{1},x_{i}\rangle_{p}$ would be almost abelian and $[x_{1},x_{i}]=\lambda
x_{1}$ for some $\lambda\in{\mathbb{F}}$, $\lambda\neq 0$. But then
$y+\lambda^{-1}x_{i}\in Z(\langle y,x_{1},x_{i}\rangle_{p})=0$ by Lemma 6.3, a
contradiction. Note also that $[y,x_{i}]\notin{\mathbb{F}}y$, as otherwise
$y^{[p]}=0$. Therefore, we can clearly assume that $[y,x_{i}]=x_{i}$. For
$i\neq j$ write $[x_{i},x_{j}]=\alpha_{ij}x_{i}+\beta_{ij}x_{j}$. We have

$\displaystyle 0$
$\displaystyle=[[y,x_{i}],x_{j}]+[[x_{i},x_{j}],y]+[[x_{j},y],x_{i}]$
$\displaystyle=\alpha_{ij}x_{i}+\beta_{ij}x_{j}-\alpha_{ij}x_{i}-\beta_{ij}x_{j}+\alpha_{ij}x_{i}+\beta_{ij}x_{j}$
$\displaystyle=\alpha_{ij}x_{i}+\beta_{ij}x_{j},$

hence $\alpha_{ij}=\beta_{ij}=0$.

Therefore, $L=\langle x_{1},\dots,x_{s}\rangle_{p}\dot{+}{\mathbb{F}}y$ is an
almost abelian restricted Lie algebra of dimension $s+1$, as desired. ∎

Note that the hypothesis of ${\mathbb{F}}$ being algebraically closed is
essential for our results. Indeed, the Lie algebra $L$ over a perfect field of
characteristic $3$ given by Gein in [8, Example 2], with the $p$-mapping
indicated in Section 3, is upper semimodular, generated by its minimal
restricted subalgebras and semisimple. The reader could ask if, ruling out the
hypothesis of ${\mathbb{F}}$ being algebraically closed, any upper semimodular
restricted Lie algebra generated by its minimal restricted subalgebras would
be abelian, almost abelian or semisimple, in a way somehow similar to the
situation in the ordinary Lie algebra setting (see [10]). However, this is not
the case either: the restricted Lie algebra ${\mathbb{F}}x\oplus L$, with
$x^{[p]}=0$, is generated by its minimal restricted subalgebras and it is
upper semimodular, but it is neither abelian, nor almost abelian, nor
semisimple. Furthermore, it is even possible to pick a modular restricted
subalgebra of ${\mathbb{F}}x\oplus L$ which does not lie in any of these three
cases.

######  Proposition 6.5.

Let ${\mathbb{F}}$ be an algebraically closed field of characteristic $p>0$,
and let $L$ be an upper semimodular restricted Lie algebra over
${\mathbb{F}}$. Let $B$ be the restricted subalgebra generated by the one-
dimensional restricted subalgebras of $L$. If $B$ is almost abelian, then
$L=B$.

###### Proof.

Assume $L\neq B$. By Proposition 3.6, there exists a $p$-nilpotent element
$x\in L$ of order $2$. Write $B=A\dot{+}{\mathbb{F}}y$, where $A$ is a
strongly abelian restricted ideal of $B$, and $y$ is a toral element which
acts as the identity map on $A$. Since $x^{[p]}\in A$, we have
$\textup{ad}^{p}(x)(y)=[x^{[p]},y]=-x^{[p]}$. Set $w=\textup{ad}^{p-1}(x)(y)$,
and note that $[x,w]=-x^{[p]}$ and $[x^{[p]},w]=[x,w^{[p]}]=0$.

As $\langle x\rangle_{p}\cap\langle x^{[p]},y\rangle_{p}={\mathbb{F}}x^{[p]}$
is maximal in $\langle
x^{[p]},y\rangle_{p}={\mathbb{F}}x^{[p]}+{\mathbb{F}}y$, one has that $\langle
x\rangle_{p}$ must be maximal in $\langle x,x^{[p]},y\rangle_{p}=\langle
x,y\rangle_{p}$. We have

$\langle x\rangle_{p}\subsetneq\langle x,w\rangle_{p}\subseteq\langle
x,y\rangle_{p}.$

It follows that $y\in\langle x,w\rangle_{p}=\langle x\rangle_{p}+\langle
w\rangle_{p}$, from which $[x,y]=\lambda[x,w]=-\lambda x^{[p]}$, for some
$\lambda\in{\mathbb{F}}$. But then

$-x^{[p]}=\textup{ad}^{p}(x)(y)=-\lambda\textup{ad}^{p-1}(x)(x^{[p]})=0,$

a contradiction. Therefore, $L=B$ and $L$ is almost abelian. ∎

######  Theorem 6.6.

Let ${\mathbb{F}}$ be an algebraically closed field of characteristic $p>0$.
Any upper semimodular restricted Lie algebra $L$ over ${\mathbb{F}}$ is either
abelian, almost abelian or of the form

$L=\langle x_{1},\dots,x_{r},B\rangle_{p},$

where $x_{i}$ is $p$-nilpotent of order $n_{i}>1$ for all $i=1,\dots,r$, $B$
is an abelian restricted subalgebra and $[L,L]\subseteq\langle
x_{1},\dots,x_{r}\rangle_{p}$.

###### Proof.

Let $B$ be the restricted subalgebra generated by the one-dimensional
restricted subalgebras of $L$. By Proposition 6.4, $B$ is either abelian or
almost abelian. If $L\neq B$, then $B$ is abelian by Proposition 6.5, and
every $x_{i}\notin B$ is $p$-nilpotent of order $n_{i}>1$ by Proposition 3.6.

To prove that $[L,L]\subseteq\langle x_{1},\dots,x_{r}\rangle_{p}$, it
suffices to see that $[x_{i},b]\in\langle x_{i}\rangle_{p}$, for $i=1,\dots,r$
and $b\in B$ such that $\langle b\rangle_{p}$ is one-dimensional. Take such a
$b\in B$. If $b\in\langle x_{i}\rangle_{p}$, then we are done. Otherwise,
$\langle x_{i}\rangle_{p}\cap\langle b\rangle_{p}=0$ is maximal in $\langle
b\rangle_{p}={\mathbb{F}}b$, and then $\langle x_{i}\rangle_{p}$ must be
maximal in $\langle x_{i},b\rangle_{p}$. Write
$w=\textup{ad}^{r-1}(x_{i})(b)\neq 0$, where $r$ is such that
$\textup{ad}^{r}(x_{i})(b)=0$. We have the following chain of inclusions

$\langle x_{i}\rangle_{p}\subseteq\langle x_{i},w\rangle_{p}\subsetneq\langle
x_{i},b\rangle_{p}.$

Then, $w\in\langle x_{i}\rangle_{p}$. Assume now that
$\textup{ad}^{r-k}(x_{i})(b)\in\langle x_{i}\rangle_{p}$ for some $k>1$, and
set $w^{\prime}=\textup{ad}^{r-k-1}(x_{i})(b)$. Again, it is clear that

$\langle x_{i}\rangle_{p}\subseteq\langle
x_{i},w^{\prime}\rangle_{p}\subseteq\langle x_{i},b\rangle_{p},$

where one inclusion has to be an equality. By assumption, if $b\in\langle
x_{i},w^{\prime}\rangle_{p}=\langle x_{i}\rangle_{p}+\langle
w^{\prime}\rangle_{p}$, then $[x_{i},b]\in\langle x_{i}\rangle_{p}$. Therefore
$w^{\prime}\in\langle x_{i}\rangle_{p}$, and by induction we have that
$[x_{i},b]\in\langle x_{i}\rangle_{p}$. ∎

Note that, although any abelian or almost abelian restricted Lie algebra is
upper semimodular, the converse of Theorem 6.6 does not hold, as the following
example shows.

######  Example 6.7.

_Let $L=\langle x,y,z\rangle_{p}$ with $x^{[p]^{2}}=y^{[p]}=z^{[p]}=0$ and
$[x,y]=z$ as the only non-zero product. Then the restricted subalgebra
$B={\mathbb{F}}x^{[p]}\oplus{\mathbb{F}}y\oplus{\mathbb{F}}z$ generated by all
the one-dimensional restricted subalgebras is abelian. However, $L$ is not
upper semimodular, as $\langle x\rangle_{p}\cap{\mathbb{F}}y=0$ is maximal in
${\mathbb{F}}y$, but $\langle x\rangle_{p}$ is not maximal in $\langle
x,y\rangle_{p}=L$._

######  Proposition 6.8.

Let ${\mathbb{F}}$ be an algebraically closed field of characteristic $p>0$,
and let $L$ be an upper semimodular restricted Lie algebra over
${\mathbb{F}}$. Then, $L$ is almost abelian or nilpotent.

###### Proof.

Assume that $L$ is not almost abelian. Let $T$ be a torus of $L$. By [23,
Chapter 2, Theorem 3.6], $T$ has a basis consisting of toral elements and
therefore $T\subseteq B$, in the notation of Theorem 6.6. Consequently, every
semisimple element of $L$ belongs to $B$, and the restricted subalgebra
$\mathfrak{T}$ formed by the semisimple elements of $L$ is the unique maximal
torus of $L$. Suppose, by contradiction, that $L$ is not nilpotent. Consider
the Cartan subalgebra $H=C_{L}(\mathfrak{T})$ and the associated root space
decomposition $L=H\dot{+}(\sum_{\alpha\in\Phi}L_{\alpha})$. Then there exists
$\alpha\in\Phi$ and a toral element $t\in\mathfrak{T}$ such that
$\alpha(t)\neq 0$. Let $x\in L_{\alpha}$, $x\neq 0$. By [23, Chapter 2,
Corollary 4.3(1)], we have $[t,x]=\alpha(t)x$ and
$\alpha(t)\in\mathrm{GF}(p)$. Thus one has

$(t+x)^{[p]}=t+x^{[p]}+\alpha(t)^{p-1}x=t+x^{[p]}+x.$

Moreover, by [23, Chapter 2, Corollary 4.3(3)] we have that $x^{[p]}\in H$ and
so $[t,x^{[p]}]=0$. By induction, it follows that

(1) $(t+x)^{[p]^{n}}=t+\sum_{i=0}^{n}x^{[p]^{n}}$

for every $n>0$. Now, by [23, Chapter 2, Theorem 3.4] we see that
$(t+x)^{[p]^{n}}\in\mathfrak{T}$ for some sufficiently large $n$, and so we
deduce from (1) that $x\in H$, a contradiction. ∎

######  Corollary 6.9.

Let ${\mathbb{F}}$ be an algebraically closed field of characteristic $p>0$,
and let $L$ be an upper semimodular restricted Lie algebra over
${\mathbb{F}}$. Then, $L$ is also lower semimodular and a $J$-algebra.

###### Proof.

It follows from Proposition 6.8 and Proposition 5.2. ∎

######  Proposition 6.10.

Let ${\mathbb{F}}$ be an algebraically closed field of characteristic $p>0$,
and let $L$ be an upper semimodular restricted Lie algebra over
${\mathbb{F}}$. Then, every restricted subalgebra of $L$ is a restricted
quasi-ideal.

###### Proof.

By Proposition 6.8, $L$ is either almost abelian or nilpotent. If $L$ is
almost abelian, then we are done, so suppose that it is nilpotent. Let $x,y\in
L$. If $x,y$ are semisimple, then we have that $x,y\in B$ and $[x,y]=0$. If
$x$ is semisimple and $y$ is $p$-nilpotent, then $x\in B$ and we get that
$[x,y]\in\langle y\rangle_{p}$ as in the proof of Theorem 6.6. If $x,y$ are
$p$-nilpotent, we claim that $[x,y]\in\langle x\rangle_{p}+\langle
y\rangle_{p}$. Indeed, let $s$ be the sum of their orders of $p$-nilpotency.
We will proceed by induction on $s$. If $s=2$, then $x,y\in B$ and therefore
$\langle x,y\rangle_{p}\subseteq\langle x\rangle_{p}+\langle y\rangle_{p}$.
Fix now $s>2$, and assume that $x^{[p]}\neq 0$. If $x\in\langle
x^{[p]},y\rangle_{p}$, it holds that $\langle x,y\rangle_{p}=\langle
x^{[p]},y\rangle_{p}$ is contained in $\langle x^{[p]}\rangle_{p}+\langle
y\rangle_{p}$ by induction. Otherwise, $\langle x^{[p]}\rangle_{p}=\langle
x\rangle_{p}\cap\langle x^{[p]},y\rangle_{p}$ is maximal in $\langle
x\rangle_{p}$, so $\langle x^{[p]},y\rangle_{p}$ is maximal in $\langle
x,y\rangle_{p}$. Then $\langle x^{[p]},y\rangle_{p}$ has codimension one in
$\langle x,y\rangle_{p}$ and $\langle x,y\rangle_{p}=\langle
x\rangle_{p}+\langle x^{[p]},y\rangle_{p}$. But by induction, $\langle
x^{[p]},y\rangle_{p}\subseteq\langle x^{[p]}\rangle_{p}+\langle y\rangle_{p}$.

Now take $x,y$ two arbitrary elements in $L$ and consider their Jordan-
Chevalley decompositions, $x=x_{s}+x_{n}$ and $y=y_{s}+y_{n}$. The above
arguments show that $[x,y]\in\langle x_{n}\rangle_{p}+\langle
y_{n}\rangle_{p}$. Since $x_{s}^{[p]^{r}}\in\langle x\rangle_{p}$ and
$y_{s}^{[p]^{t}}\in\langle y\rangle_{p}$ for $r$ and $t$ large enough and
$x_{s},y_{s}$ are semisimple, we get that $x_{n}\in\langle x\rangle_{p}$ and
$y_{n}\in\langle y\rangle_{p}$. It follows that $[x,y]\in\langle
x\rangle_{p}+\langle y\rangle_{p}$. ∎

The following simple lemma is all what is left to prove Theorem 6.1. We need
an easy consideration first.

Let $X$ be a restricted quasi-ideal of a restricted Lie algebra $L$. Then, for
every restricted subalgebra $Y$ of $L$, it holds that $X+Y=\langle
X,Y\rangle_{p}$ is a restricted subalgebra of $L$.

######  Lemma 6.11.

Let $L$ be a restricted Lie algebra in which every restricted subalgebra is a
restricted quasi-ideal. Then, $L$ is modular, and consequently, upper
semimodular and lower semimodular.

###### Proof.

Let $X$, $Y$ and $Z$ be restricted subalgebras of $L$ such that $X\subseteq
Z$. Take $z\in\langle X,Y\rangle_{p}\cap Z=(X+Y)\cap Z$, and write $z=x+y$ for
some $x\in X$, $y\in Y$. Then $x\in Z$, yielding that $y\in Y\cap Z$.
Therefore, $z\in X+(Y\cap Z)=\langle X,Y\cap Z\rangle_{p}$. Then, $L$ is
modular. ∎

It is now a simple matter to prove the main result of this section:

_Proof of Theorem 6.1._ It follows from the combination of Proposition 6.8,
Proposition 6.10, Proposition 4.3 and Lemma 6.11. ∎

## Acknowledgements

We are deeply grateful to A. Premet for some useful discussions.

The first author was supported by Agencia Estatal de Investigación (Spain),
Grant PID2020-115155GB-I00 (European FEDER support included, UE), and by Xunta
de Galicia, Grant ED431C 2019/10 (European FEDER support included, UE).

## References

  * [1] R. K. AMAYO, ‘Quasi-ideals of Lie algebras I’, Proc. London Math. Soc. (3) 33 (1976), 28–36.
  * [2] R. K. AMAYO, ‘Quasi-ideals of Lie algebras II’, Proc. London Math. Soc. (3) 33 (1976), 37–64.
  * [3] R. K. AMAYO and J. SCHWARZ, ‘Modularity in Lie Algebras’, Hiroshima Math. J. 10 (1980), 311–322.
  * [4] R. K. AMAYO and I. STEWART, ‘Infinite-dimensional Lie algebras’. Springer Netherlands, Amsterdam (1974).
  * [5] D. W. BARNES, ‘On the cohomology of soluble Lie algebras’, Math. Z. 101 (1967), 343–349.
  * [6] G. BIRKHOFF, ‘Lattice Theory’. Amer. Math. Soc., Providence (1966).
  * [7] K. BOWMAN and D. A. TOWERS, ‘Modularity conditions in Lie algebras’, Hiroshima Math. J. 19 (1989), 333–346.
  * [8] A. G. GEIN, ‘Modular rule and relative complements in the lattice of subalgebras of a Lie algebra’, Sov. Math. 31 (3) (1987), 22–32; translated from Izv. Vyssh. Uchebn. Zaved. Mat. 83 (1987), 18–25.
  * [9] A. G. GEIN, ‘On modular subalgebras of Lie algebras’, Ural Gos. Univ. Mat. Zap. 14 (1987), 27–33.
  * [10] A. G. GEIN, ‘Semimodular Lie algebras’, Siberian Math. J. 17 (1976), 243–248; translated from Sibirsk Mat. Z. 17 (1976), 243–248.
  * [11] A. G. GEIN and V. R. VAREA, ‘Solvable Lie algebras and their subalgebra lattices’, Comm. Alg. 20(8) (1992), 2203–2217. Corrigenda: Comm. Alg. 23(1) (1995), 399–403.
  * [12] F. GRUNEWALD, B. KUNYAVSKII, D. NIKOLOVA and E. PLOTKIN, ‘Two-variable identities in groups and Lie algebras, J. Math Sciences 116 (2003), 2972–2981.
  * [13] B. KOLMAN, ’Semi-modular Lie algebras’, J. Sci. Hiroshima Univ. Ser. A-I 29 (1965), 149–163.
  * [14] A. A. LAS̆HI, ‘On Lie algebras with modular lattices of subalgebras’, J. Algebra 99 (1986), 80–88.
  * [15] M. LINCOLN and D. A. TOWERS, ‘Frattini theory for restricted Lie algebras’, Arch. Math. (Basel) 45 (1985), 451–457.
  * [16] N. MALETESTA, P. PÁEZ-GUILLÁN, S. SICILIANO, ‘Restricted Lie algebras having a distributive lattice of restricted subalgebras’, Linear Multilinear Algebra 29 (2021), 3112–3120.
  * [17] C. SCHEIDERER, ‘Intersections of maximal subalgebras in Lie algebras’, J. Algebra 105 (1987), 268–270.
  * [18] R. SCHMIDT, ‘Subgroup Lattices of Groups.’ de Gruyter, Berlin, New York (1994).
  * [19] S. SICILIANO, ‘Restricted Lie algebras in which every restricted subalgebra is an ideal’, Proc. Amer. Math. Soc. 137 (2009), 2817–2823.
  * [20] S. SKRYABIN, ‘On the Structure of the Graded Lie Algebra Associated with a Noncontractible Filtration’, J. Algebra 197 (1997), 178–230.
  * [21] S. SKRYABIN, ‘Toral Rank One Simple Lie Algebras of Low Characteristics’, J. Algebra 200 (1998), 650–700.
  * [22] H. STRADE, ‘Simple Lie algebras over fields of positive characteristic. Vol. 1. Structure theory.’ de Gruyter, Berlin, 2004.
  * [23] H. STRADE and R. FARNSTEINER, ‘Modular Lie algebras and their representations.’ New York: Marcel Dekker Inc. (1988).
  * [24] D. A. TOWERS, ‘A Frattini theory for algebras’, Proc. London Math. Soc. (3) 27 (1973), 440–462.
  * [25] D. A. TOWERS, ‘Semimodular subalgebras of a Lie algebra’, J. Algebra 103 (1986), 202–207.
  * [26] D. A. TOWERS, ‘On modular∗ subalgebras of a Lie algebra’, J. Algebra 190 (1997), 461–473.
  * [27] V. R. VAREA, ‘The subalgebra lattice of a supersolvable Lie algebra’, In Lecture Notes in Mathematics. Springer-Verlag: New York, 1989; Vol. 1373, 81–92.
  * [28] V. R. VAREA, ‘Lie algebras whose maximal subalgebras are modular’, Proc. Roy. Soc. Edinburgh Sect. A 94 (1983), 9–13.
  * [29] V. R. VAREA, ‘On modular subalgebras in Lie algebras of prime characteristic, Contemporary Math. 110 (1990), 289–307.
  * [30] V. R. VAREA, ‘Lower Semimodular Lie algebras’, Proc. Edin. Math. Soc. 42(1999), 521–540.
  * [31] B. WEISFEILER, ‘On subalgebras of simple Lie algebras of characteristic $p>0$, Trans. Amer. Math. Soc. 286 (1984), 471–503.
  * [32] P. ZUSMANOVICH, ‘On Lie $p$-algebras of cohomological dimension one’, Indag. Math. (N.S.)) 30 (2019), 288–299.


# Q-COSMIC: Quantum Software Metrics Based on COSMIC (ISO/IEC19761)

Francisco Valdés-Souto  Universidad Nacional Autónoma de México, Mexico City,
México  Hector G. Perez-Gonzalez  Universidad Autónoma de San Luis Potosí, San
Luis Potosí, México  Carlos A. Perez-Delgado  University of Kent, School of
Computing, Canterbury, CT2 7NF, UK<EMAIL_ADDRESS>
###### Abstract

Quantum engineering seeks to exploit quantum information to build, among
others, computing, cybersecurity, and metrology technologies. Quantum Software
Engineering (QSE) focuses on the _information processing_ side of these
technologies. Historically, quantum (software) engineering has focused on
development in controlled research environments and _‘in the small’_. As the
field progresses, we should expect to see more large-scale quantum systems to
be deployed as ‘real-world’ products and services. An essential tool in
(classical) software engineering and development has been _software size_
metrics. Calculating/estimating the size of a piece of software, to be
developed or pre-existing, is an essential step in its engineering. Quantum
software will be no different. Here we introduce Q-COSMIC, a technique for
measuring the functional size of quantum software, based on the well-regarded
COSMIC standard (ISO/IEC19761) for classical software.

## Introduction

Recent years have seen a large increase in the rate of development of quantum
information technologies. Products and devices are now being introduced into
the market which aim to exploit quantum effects such as superposition and
entanglement for such diverse applications as metrology, power generation and
storage, communication, and of course computation.

As with (classical) information technologies before them, their precipitated
move from the scientific laboratory to industrial production has raised the
need to develop proper engineering standards and techniques.

In an effort to stave off a repeat of the _‘software crisis’_ of the 1960s,
researchers have recently begun developing the field of _quantum software
engineering (QSE)._ If software engineering is, as defined by the IEEE, _“the
application of a systematic, disciplined, quantifiable approach to the
development, operation, and maintenance of software, as well as to the study
of these approaches; that is, the application of engineering to software,”_
then _quantum_ software engineering is the application of engineering to the
development, operation, and maintenance of _quantum_ software.

Quantum software engineering is best understood as a super-set of (classical)
software engineering, or as an extension of it, in order to accommodate
software systems that have both a classical and a quantum component. Any
quantum information system of even modicum size is bound to have both
intricate classical and quantum subsystems. QSE tools and techniques,
therefore, need a way to analyse and portray both classical and quantum
systems, and the interplay between both.

Moreover, a good quantum software engineering tool/technique/device should be
identical/indistinguishable from a classical counterpart when the object of
discourse is a purely classical software system. This is to ensure backward
compatibility, ease-of-use, and keep a unified discourse language.

That said, as has been observed before[1, 2], quantum information is
sufficiently distinct from classical information that is important to have
language that distinguishes between the two even at a design level
documentation. In other words[2] _“quantum software engineering should be as
similar to classical software engineering as possible, but no more.”_

With the above in mind, we introduce here Q-COSMIC, a quantum extension of the
COSMIC (ISO/IEC 19761) standard for a Functional Size Measurement Method
(FSMM) for software.

Software _sizing_ is an essential technique in software development, used in
estimating and planning projects, measuring team productivity, evaluating
project performance, making benchmarks between technologies, suppliers, _etc._
A (naive) measure of software size is simply its total lines of code. A more
robust sizing method is based on the total functionality the software system
provides its user-base—this is called a functional size measurement method
(FSMM).

COSMIC (ISO/IEC 19761) is recognised as one of the leading standard for FSMM
software sizing, due to its ease-of-use, large user base, and various
advantages over previous generation methods[3].

Our extension of COSMIC aims to be _minimal_. Q-COSMIC is indistinguishable
from COSMIC when analysing purely classical projects. At the same time,
Q-COSMIC has all the tools necessary to properly study, assess, and measure,
quantum software projects. In this regard it achieves the goal set for quantum
engineering mentioned above, as well as those argued in the _Talavera
Manifesto_[4], _e.g._ “QSE is agnostic regarding quantum programming languages
and technologies” and “QSE embraces the coexistence of classical and quantum
computing.”

While this is not the first attempt to generalise COSMIC to work on quantum
software[5], this is the first time this done at the _functional unit_ level
of abstraction, which we will argue later is the only logical and proper way
to extend COSMIC.

## Background

In this section we give a brief overview of the background topics needed to
support our results. We begin with quantum computation and quantum
information.

### Quantum Computation and Quantum Software

Quantum computation aims to utilise quantum effects—such as superposition and
entanglement—to manipulate information in a computationally advantageous way.
The design and development of quantum algorithms, their composition into
quantum software, and their use in solving computational problems that are
infeasible classically, are topics that could fill several books; see _e.g._
Nielsen and Chuang’s excellent textbook[6] in the area.

Here, we will limit ourselves to point out a few essential facts for our
analysis. The first is the central concept of quantum information, whose
fundamental unit is the quantum bit, or _qubit_. A qubit, unlike its classical
counterpart, can exist in a _superposition_ of its basis states $0$ and $1$.
Quantum information can only be evolved (generally speaking) in a _unitary_ or
_reversible_ manner. In a fundamental physical sense, classical information
and quantum information are _incompatible_ data types: classical information
cannot be put in superposition, quantum information cannot be cloned, and
cannot be evolved non-reversibly.

As with the programming languages concept of _casting_ it is possible to
convert between quantum and classical data types. The process of creating a
quantum state based on a classical one is known as _state preparation_. While
physically this process can be quite laborious, conceptually it is pretty
straightforward: given a classical state $0$ ($1$) a quantum state $|0\rangle$
($|1\rangle$) is produced.

The reverse procedure—creating a classical bit from a qubit—is called
_measurement_ and is slightly more complicated. Given a quantum state
$|\phi\rangle=\alpha|0\rangle+\beta|1\rangle$, a measurement will destroy the
quantum bit, and create a classical bit whose state will be $0$ with
probability $|\alpha|^{2}$ and $1$ with probability $|\beta|^{2}$. Hence, this
procedure is generally lossy and irreversible.

It is important to stress a deep difference between the distinctions among
classical data types, and the distinction between classical and quantum
information types. The various classical data types (_e.g._ float, int,
boolean) are merely constructs of the software designer/programmer and exist
solely for their convenience. The difference between classical and quantum
bits is _physically fundamental_. For instance, the laws of physics themselves
prohibit the cloning of a quantum bit without first (explicitly or implicitly)
_casting_ (transforming) it into a classical bit.

This distinction, and its importance for quantum software engineering, has
been alluded to before, notably in the design of the quantum software design
and modelling language Q-UML[1, 2], which we discuss next.

### Q-UML

The Unified Modelling Language (UML) is a graphical language for designing,
presenting, modelling, and analysing software at a high-level of abstraction.
While it may be used to develop software under any paradigm, UML itself
heavily uses the concepts and lexicon of object oriented development. In UML
an _object_ (the encapsulation of a data-type and its associated operations)
interacts with other objects via messages. Every object is a member of a
_class_. Classes are organised into hierarchies (posets) of _inheritance_ , a
_subclass_ being a more specialised/specific class of a more general/abstract
_superclass_. As an example, a class _car_ can have a class _motor vehicle_ as
its _superclass_ , making _car_ a _sublcass_ of the class _motor vehicle_. In
turn, the black, 4.6 L V8 2005 Fort Mustang GT belonging to an author’s family
member is an instance, or _object_ , of class _car_.

UML is a graphical language allowing for various types of diagrams. Of
particular importance to us are class diagrams, which show the static
relationship between the various classes in a piece of software; the sequence
diagram, which shows how objects of the various classes interact with one
another dynamically over the execution of said software; and use-case diagrams
which show the software interacts with its intended users. For a more in-depth
discussion of UML refer to one of many excellent textbooks on the area[7].

Q-UML[1, 2] is an attempt to generalise UML to allow for the consideration of
quantum software projects. Q-UML aims to be a _minimal_ extension that changes
UML only as much as necessary to accomplish the above task. In particular
Q-UML diagrams, and UML diagrams are indistinguishable when addressing purely
classical software (in this sense, Q-UML is fully backwards compatible).

The Q-UML extensions to UML are all meant to address the central issue of
engineering quantum software (discussed earlier): quantum information and
classical information are fundamentally different; and they are different to a
level that goes beyond mere _implementation details_. The use of quantum or
classical information in a software module is a core design choice. Hence,
quantum and classical data-types and procedures need to be explicitly
delineated in a software design document.

The core principles of Q-UML—the need to differentiate quantum and software
information types, and the insistence on modifying classical design tools only
inasmuch as needed to do so—have been widely accepted by the community as
sound, see _e.g._ _The Talavera Manifesto_[4].

Q-UML is important for us here for two reasons. The first is that in extending
COSMIC to create Q-COSMIC we will also adhere to the principles delineated in
the paragraph above. The second is that COSMIC is a measurement technique used
on or applied to software design documents—most notably UML diagrams. It is
therefore natural to showcase Q-COSMIC by applying it to Q-UML diagrams (as we
shall do in the sections that follow).

Very briefly, Q-UML extends UML in two essential ways. First, it provides
(graphical) language to distinguish between classical and quantum data-types,
objects, classes, _etc._ Classical structures are represented in regular
typeface (or italics), and using single-lines (or single dotted-lines). In
contrast, quantum structures are represented in bold typeface (or bold
italics), and using double-lines (or double dotted-lines).

Q-UML also provides rules for how quantum and classical structures can
interact with one another, and for how quantum/classical modules interact with
UML concepts such as inheritance, aggregation, and communication. The two
essential rules for our purposes here are 1) a structure (object/class) that
encapsulates quantum structures or quantum-data types will itself be
considered a quantum structure and 2) a classical structure may only send and
receive classical information messages, whereas a quantum structure may send
and receive both quantum and classical information messages.

Beyond providing a syntactic set of rules to describe quantum software, Q-UML
sets forth a series of design rules and principles to be followed[1, 2]:

Quantum Classes (QCP):

Whenever a software module makes use of quantum information, either as part of
its internal state/implementation, or as part of its interface, this must be
clearly established in a design document.

Quantum Elements (QEP):

Each module interface element (_e.g._ public functions/methods, public
variables) and internal state variables can be either classical or quantum,
and must be labelled accordingly (this applies to both variables, and
functions).

Quantum Supremacy (QSP):

A module that has _at least_ one quantum element is to be considered a quantum
software module, otherwise it is a classical module. Quantum and classical
modules should be clearly labelled as such.

Quantum Aggregation (QAP):

Any module that is composed of one or more quantum modules will itself be
considered a quantum module, and must be labelled as such.

Quantum Communication (QCP):

Quantum and classical modules can communicate with each other as long as their
interfaces are compatible, _i.e._ the quantum module has classical inputs
and/or outputs that can interface with the classical module.

The above principles are important to us, as they are followed verbatim by
Q-COSMIC. For a fuller discussion of Q-UML, including a reasoned motivation
behind the above principles, please see the previous work on that modelling
language[1, 2]. In the next section we will cover the essentials of software
size metrics.

## Metrics in Software Engineering

Throughout software engineering development, software size metrics have been
crucial in identifying challenges and formulating solutions through
quantitative analysis. However, many metrics put forth by practitioners and
researchers primarily rely on intuition or empirical evidence, often resorting
to simple entity counting and neglecting the mathematical properties and
scales of numbers—an approach with various disadvantages[3]. Additionally, as
have been pointed out before[8], except for functional size, most metrics tend
to be descriptive or qualitative rather than quantitative.

The measuring of software size in terms of its Functional User Requirements
(FURs) has emerged as a way to provide more quantitative, standardised, and
rigorous software size analysis There are currently five competing standards
based on this approach: COSMIC (ISO/IEC 19761), IFPUG (ISO/IEC 20926), MKII
(ISO/IEC 20698), NESMA (ISO/IEC 24570), and FISMA (ISO/IEC 29881). For reasons
outlined in the next section, we have chosen to base our work on the COSMIC
standard.

As Quantum Software Engineering (QSE) continues to grow, it will be crucial to
integrate the insights already gained from classical software engineering.
There are clearly broad industrial application of quantum software projects.
The importance of QSE in managing these projects effectively, is equally
clear. Hence, establishing robust and scientifically valid engineering metrics
for QSE from the outset is of great importance, both in academia and industry.

### COSMIC Functional Size Measurement Method

Symbol |  Interpretation
---|---
|  The piece of classic software to be measured (box with thick outline) i.e.
the definition of a measurement scope.
|  Any functional user of the classic software being measured.
|  The arrows represent all the movements of data crossing a boundary (the
dotted line) between a functional user and the classic software being
measured.
|  The arrows represent all the movements of data between the classic software
being measured and persistent storage.
Table 1: COSMIC Context Diagram Symbols: This table shows the four basic
symbols that appear on COSMIC diagrams, and their semantic interpretation.

The COSMIC Functional Size Measurement Method, as outlined in the COSMIC
Measurement Manual [9], provides a systematic approach to gauging the
functional size of software through the use of Functional User Requirements
(FURs).

The COSMIC software measurement process is neatly divided into three phases:
_strategy_ , _mapping_ , and _measurement._

The strategy phase, has three main goals. The first is to determine the
purpose of performing a COSMIC measurement or analysis. The second is to
clearly define who the functional users are. The third goal is to define the
scope of the Functional User Requirements (FURs) to be measured. Succinctly, a
FUR is a service or functionality that the software provides to the user,
_e.g._ a bank application may have _‘add a new account’_ , and _‘search and
return all accounts based on a certain search pattern’_ among its FURs.

With the information obtained above, a context diagram is then generated. Tab.
1 summarises COSMIC’s symbolic language for such diagrams.

The next step is the _mapping_ phase. During this stage, the FURs are mapped
onto a COSMIC Generic Software Model (the general modelling approach used by
COSMIC, as briefly described here, and in more detail in the COSMIC user
manual[3]). Afterwards, the data movements required to provide specific
functionality for software are identified.

Finally, the measurement phase consists of counting the _data movements_.
COSMIC identifies four possible data movements, as detailed in Tab. 3. Each of
these movements represents a functionality, and increases the size of the
analysed software project/system. This allows COSMIC software size
measurements to be independent of implementation details, such as programming
language, total lines of code, _etc._

For more detailed information on the COSMIC standard and method, please refer
to the COSMIC measurement manual[9], or the official COSMIC website at
www.cosmic-sizing.org

The COSMIC Functional Size Measurement Method (FSMM) is not without criticisms
or drawbacks. Notably, FSMM is based on software design (_e.g._ UML) diagrams,
which in some software development cases may be non-existent or come later in
the development process than ideal[10, 11]. That said, COSMIC is recognised as
one of the leading standards for functional software sizing due to its ease-
of-use, large user base, and various advantages over previous generation
methods[3].

In classical software engineering, it is generally accepted that software
sizing is an essential technique in software development, used in estimating
and planning projects, measuring team productivity, and evaluating project
performance, making benchmarks between technologies, suppliers, _etc._

Yet, quantum-software has so far been developed without many of these tools.
One reason is that historically and to this moment, quantum software is
designed and developed ‘in the small.’ Quantum software, for the most part, is
designed to be run on just _one_ particular hardware platform, solve _one_
particular problem, for _one_ particular user (-group). This is likely to
change to in the near- to mid-term future.

A second reason is, plainly, the lack of quantum software engineering tools;
with the introduction of Q-COSMIC, in the next section, we aim to help remedy
this.

## Q-COSMIC

Q-COSMIC, introduced here, is meant to be an extension or super-set of the
COSMIC (ISO/IEC19761) standard. For a purely classical piece of software, an
analysis performed by either COSMIC or Q-COSMIC ought to be identical.
Q-COSMIC, however, allows for the measurement of quantum software. In other
words, a key goal is to keep Q-COSMIC maximally _backward-compatible_ with
COSMIC.

Briefly and intuitively we can understand the changes going from COSMIC to
Q-COSMIC as follows. First, the basic process and methodology is unchanged.
However, Q-COSMIC does introduce extra syntactic elements, and semantic rules,
as detailed in this section. The newly-added syntactic elements allow us to
portray quantum data, functional units, and information flow. Q-COSMIC maps
the data-movement rules of COSMIC onto quantum data movement (_e.g._ just as
reading/writing from/to external storage incurs a software size increment in
COSMIC, so does reading/writing from/to quantum storage in Q-COSMIC).

Less intuitively obvious is the fact that Q-COSMIC imposes a cost on data
movement between _classical_ and _quantum_ functional units. In other words,
whenever a quantum data-type is instantiated using classical information
(state preparation), or a classical data-type is instantiated using quantum
information (measurement), this incurs a software size increment in Q-COSMIC.
Crucially, this analysis is done at the _functional_ level (as opposed to an
implementation level—see the end of this section for a full discussion on this
last point).

Q-COSMIC follows the same syntactic rules, as well as the basic axiom of
minimally changing existing software engineering tools111The axiom reads
textually _“Quantum software engineering should be as similar to classical
software engineering as possible, but no more.”_ , adopted by Q-UML[2]. Hence,
the basic syntax of Q-COSMIC (above and beyond the COSMIC standard) can be
summarised as follows:

  * •

Quantum information will be typeset in bold font when it is represented
textually to set it apart from classical information. This applies to context
diagrams.

  * •

Quantum information will be distinguished in visual diagrams by the use of
_double lines_.

  * •

When representing quantum objects, processes, etc., both bold type and _double
lines_ are employed wherever possible and appropriate.

  * •

In Q-COSMIC, every element is, by default, classical. A Data Group (DG) is
designated as a Quantum Data Group (QDG) if and only if at least one of its
components—such as an attribute—stores quantum information.

  * •

Data movements can be purely classical, purely quantum, or start as one and
end as the other—this later referring to _quantum state preparation_ , and
_quantum measurement_.

Symbol |  Interpretation
---|---
|  The piece of quantum software to be measured (box with thick double line)
i.e. the definition of a measurement scope
|  Any functional user that is itself quantum in nature.
|  The arrows represent all the movements of quantum data crossing a boundary
(the dotted line) between a functional user and the quantum software being
measured.
|  The arrows represent all the movements of quantum data between the quantum
software being measured and persistent storage.
Table 2: Q-COSMIC Context Diagram Symbols: In addition to the symbols detailed
in Tab. 1, Q-COSMIC introduces the four symbols presented here.

Q-COSMIC introduces new syntactic elements to its pictorial language as
detailed in Tab. 2. In short, these new symbols allow us to portray quantum
software, functional users, data, and storage, and to distinguish them from
their classical counterparts.

Figure 1: Q-COSMIC Context Diagram: This figure shows a generic quantum
software context diagram in Q-COSMIC. It has two software layers: a classical,
and quantum one. There is data movement between the user and the classical
layer, and between the classical layer and the quantum layer. In this latter
case, that data movement comes in the form of a quantum state preparation, and
a quantum measurement. Finally, reading/writing to/from classical and quantum
data storage is also portrayed.

Additionally, Q-COSMIC introduces four new data-movement types. These are
presented in Tab. 3. Each newly introduced data movement mirrors a classical
analogue, and is meant to represent _quantum data_ movement. The COSMIC rules
for data-movements, how they are counted towards software size (and when they
are not) are extended _in whole_ to quantum data movements in Q-COSMIC.

Data Movement (DM) Type in COSMIC |  Quantum Data Movement (QDM) Type in Q-COSMIC
---|---
Entry (E): data movement that moves a classic data group from a functional user across the boundary into the functional process where it is required. |  QEntry (QE): data movement that moves a quantum data group from a functional user across the boundary into the functional process where it is required.
eXit (X): data movement that moves a classic data group from a functional process across the boundary to the functional user that requires it. |  QeXit (QX): data movement that moves a quantum data group from a functional process across the boundary to the functional user that requires it.
Read (R): data movement that moves a classic data group from persistent storage within reach of the functional process which requires it. |  QRead (QR): data movement that moves a quantum data group from quantum persistent storage within reach of the functional process which requires it.
Write (W): data movement that moves a classic data group from a functional process to persistent storage. |  QWrite (QW): data movement that moves a quantum data group from a functional process to quantum persistent storage.
Table 3: Data Movements: The left hand column presents the four data movements
pre-existing in COSMIC. The right hand column displays the four new data
movements introduced in Q-COSMIC. Recall that each data movement incurs a
cost, and hence increases the ultimate software size.

Q-COSMIC adheres to the same design principles as Q-UML, as described on Pg.
Q-UML.

Q-COSMIC adds the following _rules_ to the existing COSMIC standard. First is
the use of the prefix Q to refer to quantum elements in writing. The second
rule, alluded to above, is the introduction of the Q-COSMIC Function Point
(QCFP), as the unit representing a single generalised (quantum or classical)
data movement . As an example, a write (W) to classical data storage is
counted towards the size of a classical software system in COSMIC. Similarly,
in Q-COSMIC a movement of quantum information from a quantum functional
process to quantum data storage (QW), or to/from a quantum functional process
(QE/QX), are considered data-movements, and incur a software size increments
in Q-COSMIC.

In addition, Q-COSMIC makes the following changes to existing COSMIC
definitions as they appear in the COSMIC User Manual V5, Part 1[9]:

Data movement:

Base Functional Component which moves a single data group. The data group can
be either classical or quantum.

Functional process:

Elementary component of a set of Functional User Requirements, comprising a
unique, cohesive and independently executable set of data movements. These can
be either classical or quantum.

Software system:

A software system can be purely classical; or, it can be a quantum software
system.

Layer:

Partition resulting from the functional division of a software system. A
quantum software system will consist of at least one classical, and one
quantum software layer.

The fact that both quantum measurements and quantum state preparation (that
is, transferring information from a quantum data-type/module to a classical
one) incur a software size increment in Q-COSMIC would seem to imply that
every _quantum gate_ would incur a separate size increase cost in Q-COSMIC.

This is because quantum control, and hence the implementation of quantum gate,
necessitates the interplay and cross-talk of both classical and quantum data
types. This is particularly true when considering fault-tolerant quantum
gates[12].

However, Q-COSMIC as a super-set of COSMIC, measures data movements at
_functional_ level of abstraction. The COSMIC manual lays out clearly[13]:
_“The COSMIC Generic Software Model, as its name suggests, is a logical
‘model’ that exposes units in which software processes data that are suitable
for functional size measurement. The model does not intend to describe the
physical sequence of the steps by which software executes nor any technical
implementation of the software.”_

The manual goes on to say that any data manipulation that is _“internal to the
functional process and that can be changed only by a programmer, or
computation of intermediate results in a calculation, or of data stored by a
functional process resulting only from the implementation, rather than from
the FUR”_ shall likewise not be counted in the functional size.

So, as an example, a classical module messaging an integer to be factored to a
quantum module would constitute a data transfer in Q-COSMIC; while the error
syndrome being measured during the implementation of a fault-tolerant gate
would not.

Before moving on, it is worth explaining the motivation behind some of the
less intuitive or obvious design choices behind Q-COSMIC. For instance,
quantum data read/writes from/to external quantum storage incurring a size
cost in Q-COSMIC—just like classical read/writes incur a size cost in
COSMIC—should seem like a natural choice. The further imposition, in Q-COSMIC,
that quantum and classical functionality be separated into separate layers,
and that data movement between these classical and quantum functional units
incurs a software size increment cost, may seem arbitrary. The argument could
be made that the classical pre- and post-processing of data before/after a
quantum algorithm is part of the same functional unit.

Furthermore, while it is unarguable that at an _implementation_ level quantum
and classical software are indeed different, the argument has to be made that
they are different at the _functional_ level, which is the abstraction level
at which COSMIC and Q-COSMIC operate. However, this precise argument _has
been_ made before, repeatedly[1, 2, 14, 15]. Briefly, the argument goes as
follows. Even at the software design abstraction level, quantum and classical
modules or functional units are distinct and must be properly identified. This
is because quantum and classical software modules obey fundamentally different
logical rules; need to be developed using different
techniques/languages/methodologies; and must be tested (separately) using
different tools. This is not an external imposition, or arbitrary rule, this
is so because of the fundamental laws of nature.

Given the above one might be tempted to argue that the development of
classical and quantum functional units require different amount of efforts,
and hence should be accounted for differently. We chose not to take this path
in Q-COSMIC, for two fundamental reasons. The first, is for simplicity and
maximum backwards compatibility with COSMIC. COSMIC, as a metric of software
size, ultimately reports a single number. Q-COSMIC should do the same.

The second is more fundamental. Functional size, as reported by COSMIC, is
_not_ a measure of algorithmic complexity, or the _difficulty_ of implementing
a feature. COSMIC—and by extension Q-COSMIC—do not attempt to quantify the
amount of human effort required to create a software product. What they do, is
measure the _functional_ size of a software product.

For instance, COSMIC would not differentiate between a functional unit that
sorts the entries on a database of modicum size by the value of some field,
and a functional unit that predicts the weather accurately months in advance.
From COSMIC’s perspective, they both provide a single functionality to the
user. This is independent of the difficulty of implementing each
functionality.

While implementing _quantum_ functionality may be even harder than the most
challenging classical functionality, we argue that the difference in
difficulty is one of merely degrees. All of this is not to say that Q-COSMIC
can not report separately the functional sizes of the _classical_ and
_quantum_ modules of a software system if required.

Finally, it is worth addressing our choice to define Q-COSMIC to operate at
the abstraction level of functional unit, rather than, say, quantum gates. We
acknowledge that other authors have attempted to extend COSMIC to quantum
software in this alternate way[5]. However, we would argue that the _only_
logical and proper way to extend COSMIC is to keep the accounting of quantum
and classical software as homogeneous as possible. In other words, if
classical software is measured at the functional level, then so should quantum
software.

Figure 2: Quantum software FUR’s: This diagrams shows the Functional User
Requirements (FURs) of a quantum large integer factoring software application.
This figure is based on the ones used to exemplify the use of Q-UML[1, 2].

In order to give a better understanding of Q-COSMIC’s syntactic and semantic
rules, as well as principles, in the next section we will provide a Q-COSMIC
analysis of a quantum software system designed to factor large integers.

## Example: Measuring a Factoring Application with Q-COSMIC

In this section, we will analyse an example quantum software system that
factors large numbers using Shor’s algorithm.
Thhttps://www.overleaf.com/project/64a42106ef033ebd3015b963/detacheris
software system has two potential users: mathematicians, interested in
factoring large integers (for the sake of mathematical curiosity), and hackers
who wish to break public-key cryptosystems, see Fig. 2.

To do the above, we shall proceed through the three phases of a Q-COSMIC
analysis in order.

#### The strategy phase

As mentioned earlier, the three main goals of the strategy phase are to
determine the purpose the Q-COSMIC measurement, the scope of the functional
requirements, and to identify who the functional users are.

Purpose:

this case, the purpose is to determine the Functional Size Measurement (FSM)
of the quantum software portrayed in Fig. 2 which implements two use cases
(the previously defined $UC_{1}$ and $UC_{2}$).

Scope:

The scope of this measurement are the FURs related to $UC_{1}$ and $UC_{2}$.

Functional Users:

The functional users are “Matemathician”, and “Hacker”.

With the above information we can generate a context diagram, which is shown
in Fig. 3. Note that since $UC_{1}$ corresponds to a quantum software system,
Q-COSMIC rules state that two separate layers must be defined, a classical and
a quantum one.

In order to provide its functionality, $UC_{2}$ is a functional user for the
$UC_{1}$. This gives us the context diagram in Fig. 4.

Figure 3: Q-COSMIC Context Diagram for _Factor Large Integer:_ This shows the
context diagram for the first use case, $UC_{1}$ of the integer factoring
software application. This diagram depicts six total data movements: two eXits
(2X), two Entries (2E), one Quantum eXit (1QX), and one Quantum Entry (1QE).

#### The mapping phase

Recall, the purpose of this phase is to map FURs to the Q-COSMIC generic
software model.

We established previously that each Functional Process (FP) corresponds to a a
UC. The next step hence is to identify the data movements in each of the use
cases, $UC_{1}$ and $UC_{2}$. These are presented in Fig. 3, and Fig. 4
respectively.

Figure 4: Diagram Context for Break RSA Use Case: Here we show the context
diagram for the second use case $UC_{2}$ of our example software. The previous
use case, $UC_{1}$ provides some of the functionality required by $UC_{2}$,
and hence appears on this diagram. Importantly, while measuring the functional
size of $UC_{2}$, we only count the data movements newly introduced in
$UC_{2}$, and _not_ the data movements pre-existing in $UC_{2}$. In this case,
these consist of two Entries (2E), and two eXits (2X).

Note that during the measurement of $UC_{2}$ we do _not_ re-measure the size
of $UC_{1}$, since it has already been accounted for. Since $UC_{2}$ is
otherwise purely classical, its size in Q-COSMIC corresponds to the size that
would be calculated using COSMIC.

#### The measuring phase

Finally, after the Data Movements (DMs) in all use cases have been identified,
in previous phases, the final phase is to simply count them up. Doing this
calculation gives the Q-COSMIC functional size of $UC_{1}$ as: $6$ QCFP, where
QCFP is short for Q-COSMIC Functional Point. Whereas the Q-COSMIC functional
size of $UC_{2}$ is $4$ QCFP $=4$ CFPv5, where CFPv5 refers to the functional
size units used in COSMIC version 5 (since this is a purely classical sub-
system, its size in Q-COSMIC and in COSMIC coincides, as would be expected).

While the total functional size of the quantum software use cases are the
ultimate numbers being sought, it will sometimes be useful to do a more
granular analysis, separating the quantum and classical layers and measuring
them separately. For $UC_{2}$, this granular analysis is irrelevant, since its
own functionality is purely classical. In the case of $UC_{1}$, the quantum
layer is of size $2$ QCFP. The size of the classical layer is $4$ QCFP $=4$
CFPv5.

In summary, for the analysed FURs ($CU_{1}$ and $CU_{2}$), there are $6$ total
functional points in the classical layer constituting $60\%$ of the total, and
$4$ functional points in the quantum layer making up the remaining $40\%$.
This granular analysis allows for the separation of estimation, productivity,
and cost analysis for each type of software.

## Conclusions

In this paper we have introduced Q-COSMIC, a proposed standard metric and tool
for measuring and estimating the size of quantum software systems. Q-COSMIC
extends the COSMIC (ISO/IEC 19761) standard using the same quantum software
engineering principles developed earlier, namely for Q-UML[1, 2].

Q-COSMIC aims to be a _minimal_ extension to COSMIC—retaining maximum
backwards-compatibility, while still having the sufficient tools to analyse
quantum software. Q-COSMIC is grounded on the well-established principles that
COSMIC is grounded on, while expanding on COSMIC sufficiently to consider
previously non-analysable software. Crucially, all results, tools, and
advances made in the field of COSMIC measurement are applicable in Q-COSMIC
with little or no modification.

Further, we demonstrate the principles and rules of Q-COSMIC, as well as its
expressiveness and ease-of-use, by applying Q-COSMIC to an example quantum
software system.

Q-COSMIC represents a novel contribution to the area of software metrics.
Moreover, the introduction of Q-COSMIC contributes to the broader goal of
advancing QSE by establishing robust, scientifically valid metrics from the
outset. This aligns with the principles outlined in the _Talavera
Manifesto_[4], emphasising the importance of effective project management and
industry-wide implementation of quantum software projects.

The ultimate goal of Q-COSMIC, like other QSE tools, is to help expedite the
transition of quantum technologies from the laboratory, to a robust and
growing industry.

## References

  * [1] Pérez-Delgado, C. A. & Perez-Gonzalez, H. G.  Towards a Quantum Software Modeling Language.  _Proceedings - 2020 IEEE/ACM 42nd International Conference on Software Engineering Workshops, ICSEW 2020_ 442–444, DOI: 10.1145/3387940.3392183 (2020).  2006.16690.
  * [2] Pérez-Delgado, C. A.  A Quantum Software Modeling Language. In: Quantum Software Engineering.  In _Quantum Software Engineering_ , 103–119 (Springer International Publishing Cham, Switzerland, 2022), 1st edn.
  * [3] Abran, A.  _Software Metrics and Software Metrology_ (John Wiley & Sons, Hoboken, New Jersey, 2010).
  * [4] Piattini, M. _et al._ The Talavera manifesto for quantum software engineering and programming.  _CEUR Workshop Proceedings_ 2561, 1–5 (2020).
  * [5] Khattab, K., Elsayed, H. A. & Soubra, H.  Functional size measurement of quantum computers software.  In _IWSM-Mensura_ (2022).
  * [6] Nielsen, M. A. & Chuang, I.  Quantum computation and quantum information (2002).
  * [7] Seidl, M., Huemer, M. S. C. & Kappel, G.  _UML@ Classroom An Introduction to Object-Oriented Modeling_ (Springer, 2012).
  * [8] Valdés-Souto, F. & Naranjo-albarrán, L.  Software Project Estimation Using Smooth Curve Methods and Variable Selection and Regularization Methods as an Alternative to Linear Regression Models when the Reference Database Presents a Wedge-shape Form.  _Programming and Computer Software_ 48, 716–734, DOI: 10.1134/S0361768822080205 (2022).
  * [9] Abran, A., Fagg, P. & Lestherhuis, A.  COSMIC Measurement Manual for ISO 19761 Part 1 : (2021).
  * [10] Desharnais, J. M. & Abran, A.  Approximation Techniques for Measuring Function Points, Proc.  In _13th Inter. Workshop on Software Measurement (IWSM 2003)_ , 270–286 (Springer, Montreal, Canada, 2003).
  * [11] Santillo, L.  Early and Quick COSMIC FFP Overview.  In Reiner Dumke, A. A. (ed.) _COSMIC Function Points: Theory and Advanced Practices_ , 176–191 (CRC Press, Boca Raton, FL, USA, 2011).
  * [12] Gottesman, D.  An introduction to quantum error correction and fault-tolerant quantum computation.  In _Quantum information science and its contributions to mathematics, Proceedings of Symposia in Applied Mathematics_ , vol. 68, 13–58 (2010).
  * [13] Common Software Measurement International Consortium (COSMIC).  Measurementt Manual v4.0.2.  Tech. Rep. (2017).
  * [14] Sodhi, B.  Quality Attributes on Quantum Computing Platforms.  _ArXiv_ abs/1803.0 (2018).  1803.07407.
  * [15] Zhao, J.  Quantum software engineering: Landscapes and horizons.  _arXiv preprint arXiv:2007.07047_ (2020).

## Acknowledgements

C.P-D. would like to acknowledge funding through the Quantum Communications
Hub (EP/T001011/1), and from the Casper Association Academic Grants Program.