# Offloading electromagnetic shower transport to GPUs

G Amadio1 J Apostolakis1 P Buncic1 G Cosmo1 D Dosaru2 A Gheata1 S Hageboeck1 J
Hahnfeld1 M Hodgkinson3 B Morgan4 M Novak1 A A Petre5,6 W Pokorski1 A Ribon1 G
A Stewart1 and P M Vila1 1 CERN, Geneva (CH)  2 EPFL, Lausanne (CH)  3
University of Sheffield (GB)  4 University of Warwick (GB)  5 University of
Bucharest (RO)  6 University Politehnica of Bucharest (RO)
<EMAIL_ADDRESS>
###### Abstract

Making general particle transport simulation for high-energy physics (HEP)
single-instruction-multiple-thread (SIMT) friendly, to take advantage of
accelerator hardware, is an important alternative for boosting the throughput
of simulation applications. To date, this challenge is not yet resolved, due
to difficulties in mapping the complexity of Geant4 components and workflow to
the massive parallelism features exposed by graphics processing units (GPU).
The AdePT project is one of the R&D initiatives tackling this limitation and
exploring GPUs as potential accelerators for offloading some part of the CPU
simulation workload. Our main target is to implement a complete
electromagnetic shower demonstrator working on the GPU. The project is the
first to create a full prototype of a realistic electron, positron, and gamma
electromagnetic shower simulation on GPU, implemented as either a standalone
application or as an extension of the standard Geant4 CPU workflow. Our
prototype currently provides a platform to explore many optimisations and
different approaches. We present the most recent results and initial
conclusions of our work, using both a standalone GPU performance analysis and
a first implementation of a hybrid workflow based on Geant4 on the CPU and
AdePT on the GPU.

##  1 Introduction

Several online and offline applications in high-energy physics (HEP) have
benefited from running on graphics processing units (GPUs), taking advantage
of their processing model ([1, 2, 3] are some of the more notable examples).
To date, however, general HEP particle transport simulation is not one of
them, due to difficulties in mapping the complexity of its components and
workflow to the GPU’s hardware. Deep polymorphic code stacks, low branch
predictability, incoherent memory accesses, and the use of stateful global
managers are significant obstacles that prevent porting Geant4 [4] to GPUs.
However, HEP computing will need to exploit more and more heterogeneous
resources in the future [5], and our current inability to use GPU cards, which
are increasingly found in computing centres, for detailed simulation of
collider experiments limits our ability to exploit hardware that is available
to HEP and therefore raises costs, which motivates R&D in this area.

The AdePT [6] project started late 2020 with the goal of demonstrating a
complete workflow working on GPUs, having all the simulation stepping
components: complete physics models describing the electromagnetic (EM)
processes, magnetic field propagation in detector geometry, and code producing
user hit information transferred from the GPU back to the host. Existing CPU
simulation components had to be adapted, extended, or redesigned entirely to
fit to the GPU’s hardware. The project evolved from very simple examples,
which demonstrated only limited functionality. Geometry was one of the first
usable modules, and was provided by the VecGeom [7] library. The G4HepEm
library [8] was utilised for modelling EM interactions of electron, positron
and gamma particles on the device. Finally, we developed a generic example
demonstrating the integration of Geant4 CPU-based simulation with the AdePT
GPU workflow.

The paper describes our most recent validation and performance results for
setups with different complexity. We present our initial conclusions and our
preliminary understanding of the usability of GPUs for full simulation in HEP
applications.

##  2 Simulation components

The AdePT workflow was built on top of the GPU ports of the main particle
transport simulation components. While the VecGeom GPU functionality pre-dated
our project, modules such as physics and magnetic field were rewritten or
adapted from their original CPU-based versions.

###  2.1 Geometry integration, validation and optimisation

Geometry was the first major simulation component adapted to the AdePT GPU
workflow, building on existing CUDA support in the VecGeom library. VecGeom’s
existing capabilities included generating and compiling CUDA code for all
geometry types (solids, placed and unplaced volumes) in a namespace separate
from CPU/host code, and copying the CPU transient model to the device. Code to
navigate on a GPU was not available.

We have made an early implementation of a ray-tracing demonstrator using the
same executable on host and device, and a common geometry service usable by
other AdePT examples. Among the downsides of the current VecGeom GPU port,
direct binding to CUDA is required to support virtual polymorphism, in
particular for different solid types. This currently prevents the usage of
portability frameworks and other GPU backends.

First a simple ’loop’ navigator was created, which searches all daughter
volumes, to serve as a baseline to validate correctness of other approaches.
Development of the navigation capabilities concentrated on creating
acceleration structures that can be used on the GPU. A bounding volume
hierarchy (BVH) per logical volume was implemented in GPU-portable data
structures and code, to reduce the number of candidate volumes that must be
intersected. We observed performance improvements of up to 2.4x in case of a
CMS geometry setup from 2018 compared to the ’loop’ navigator case. Since
geometry navigation was identified as one of the major bottlenecks in the GPU
workflows, additional optimisations were undertaken:

  * •

a separate kernel was used to manage volume relocation, to improve load
balancing;

  * •

a revision of boundary-crossing eliminated a bias and reduced the number of
trial steps needed;

  * •

the storage of the navigation hierarchy information in navigation states was
improved, reducing its memory footprint;

  * •

we implemented the option to compile all types and interfaces of VecGeom in
single-precision. Using ray-tracing in single-precision for the TrackML
challenge [9] geometry setup, we observed 44 % better performance on GPU, but
also 14 % improvement on the CPU.

Together these resulted in important consistency and performance improvements
compared to the initial non-optimised baseline.

Figure 1: Geometry validation using ray tracing, comparing single-precision
(left) with the default double-precision (right) images.

Geometry navigation validation was initially done using images from a ray-
tracing example, comparing at pixel level images produced for setups of
different complexity on GPU against results obtained with the same executable
running on CPU. This setup allowed the validation of other geometry
optimisations, such as single-precision support in navigation, as shown in
figure 1. Geometry navigation was also validated using more advanced examples
embedding physics-driven stepping, by comparing step-length distributions, and
other low-level observables, with the values obtained in Geant4 reference
setups.

###  2.2 Physics integration and validation

AdePT uses the G4HepEm library [8] to model the electromagnetic physics of
electrons, positrons, and gammas. The library is a compact rewrite of the
three particles’ electromagnetic processes that are relevant for HEP detector
simulation. It follows a strict separation of initialisation, that is
dependent on Geant4, and run-time functionalities, which are standalone.
G4HepEm also directly interfaces with CUDA to transfer the required physics
data to GPUs.

For the AdePT project, we introduced two generalisations into the run-time
functions. Firstly, we abstracted the usage of the random number generator
(RNG). On the host, and when integrating with Geant4, G4HepEm uses the RNGs
provided by CLHEP. However, we choose a portable implementation of RANLUX++ on
the GPU which was described recently [10]. Secondly, it was necessary to split
some functions that accessed G4HepEm’s thread-local storage. Accepting
arguments as scalar values allows utilisation of track storage that is more
appropriate for parallel processing on the GPU. With these two changes, it is
possible to reuse 95 % of G4HepEm and only write some glue code in AdePT
itself. This greatly reduced the time and effort needed for this part of the
demonstrators.

Figure 2: Mean energy deposit in a simplified sampling calorimeter for Geant4,
G4HepEm on the CPU, and AdePT.

For validating the physics integration, we simulate the mean energy deposit in
a simplified sampling calorimeter. The calorimeter consists of 50 layers, each
made up of slabs of PbWO4 (2.3 mm) and liquid argon (5.7 mm). The choice of
lead tungstate was made to test the element selectors for a material composed
of multiple elements. The same setup is also used for the validation of
G4HepEm on the CPU against Geant4. Thus, figure 2 shows a three-fold
comparison with excellent agreement between Geant4, G4HepEm on the CPU, and
AdePT. We further compared the number of secondary particles generated by
G4HepEm on the CPU with AdePT, and found these to be equal to per-mil level.

###  2.3 Magnetic field

A capability to propagate charged tracks in a constant magnetic field has been
incorporated into the prototype. In order to intersect the model geometry, the
track is broken into linear segments. In each segment the estimated deflection
of the curved path from the projection of the direction must be less than or
equal to an adjustable threshold. Breaking up a step into multiple linear
track segments can create significant divergence between threads. In addition,
refining a candidate intersection to its precise location is a secondary
source of divergence.

An investigation over the effects of the divergence of threads used a maximum
number of iterations. Tracks which did not finish their integration were
killed and accounted for, in order to measure their overall contribution to
the total energy deposited. A large value for the maximum number of iterations
(1000) was required to ensure that less than $0.5\%$ of the energy is lost in
a geometry from a LHC detector. Even at the smaller value like $100$, which
corresponds to $3\%$ of energy deposit, the overall simulation time was about
$4$ times slower than when using a maximum value of $10$ ($8\%$ energy
deposit). These figures demonstrate how vital it is to handle this divergence.
Approaches to address it are being evaluated.

##  3 Stepping workflow

In Geant4, every thread works on a single particle track, transporting it one
step at a time. Secondary particles are pushed onto a stack, and consumed as
threads finish processing their current particles. To make use of multiple
cores, events are distributed across threads, which continue to work
independently of each other. While efficient on the CPU, this approach does
not yield enough uniformity and parallelism for GPUs. Instead, the
demonstrators developed in the AdePT project immediately start tracking
secondary particles. Parallelism is achieved by making one step for an entire
population of tracks. This requires creating secondaries in parallel, without
influencing the current population of tracks.

In the current demonstrators, we implement this with arrays that all threads
can append to in parallel. For each particle type (electron, positron, gamma),
there are two arrays that represent the current and the next population,
respectively. They contain indices into the track storage, and are swapped
after each step. Having distinct arrays per particle type has the advantage
that it is not necessary to store the type explicitly. Rather, it is implicit
from the array that the track is taken from or inserted into. To remain
efficient, we launch the three kernels for transporting all particles of each
type into different CUDA streams. This allows the hardware to run them
concurrently, after which we synchronise using CUDA events.

At the time of writing, track storage is implemented as a contiguous array
with an atomic counter. While simulating a batch of particles, the kernels
only append to the storage. When a track is finished, its slot is not reused
which is wasteful in terms of memory. However, any more elaborate solution
will require more synchronisation and introduce overhead. For this reason, we
decided to postpone optimisation in this area until memory usage becomes an
issue.

##  4 Geant4 integration

Besides the focus on functionality and performance, the integration with the
Geant4 CPU workflow is very important to explore, given that hadronic physics
is not yet implemented on the GPU. We based our first integration
implementation on the existing Geant4 fast-simulation hooks. Those hooks
consist of defining a ‘fast simulation’ process responsible for a region of
the geometry where, for particles passing some selection criteria (particle
type, energy, etc), an external simulation library is called. Those particles
are taken off the Geant4 stack, and the handling of the detector response is
delegated to the ‘fast simulation’ process.

The AdePT library can indeed be considered as such ‘fast simulation’ process,
which takes particles from Geant4 as input and gives back the energy
depositions and any ’outgoing’ particles from that region as output. The
upside of such an approach is that it allows configurable activation of the
AdePT integration and easy comparison with native Geant4 simulation using a
single executable.

The current GPU workflow of AdePT was proven to be more efficient with
increasing the input tracks batch size. This was implemented in the current
integration by buffering particles entering the ’GPU region’. Buffering is
done until reaching a configurable threshold, which triggers synchronous
processing of the batch on the GPU. This approach required adding a new Flush
method in the fast-simulation process interface, called within the main Geant4
event loop, which enables processing of any remaining particles in the buffer
when the Geant4 event stack is empty.

Once the AdePT batched processing completes, the particles outgoing from the
GPU-enabled region are passed back onto the Geant4 stack. The Flush interface
is called in the event loop when the Geant4 ’urgent stack’ is empty, but
before the event is finished. If particles are added back onto the Geant4
stack, the Geant4 event will continue to process those. This interface is
usable by any ‘fast simulation’ models which rely on buffering input particles
to process them concurrently.

As far as the energy depositions (hits) produced by AdePT are concerned, they
are stored in arrays transferred back from the device to the host at the end
of each event. The corresponding Geant4 hits are then created (assigned to
specific sensitive volumes) and added to the Geant4 hit collections. This
allows for structurally identical simulation output when running either with
Geant4 only or with Geant4 plus AdePT.

##  5 Preliminary analysis

A preliminary performance analysis of AdePT has been done, which provides some
insights into how further progress can be made in this area. In figure 3, the
GPU usage for two runs with different particle batch sizes is shown. As the
electromagnetic shower develops for each batch of particles, GPU usage
increases. When the average energy of the particles is no longer enough to
create new secondaries, GPU usage begins to decrease. Hence each peak in usage
corresponds to one batch of particles being simulated. Small batches lead to
sharp peaks with significant amounts of idling time between them, while larger
batches make for better use of the GPU resources with broader peaks and about
4x faster run time. Nevertheless, even with large batches of particles, there
is still some idling time between the peaks that could be reduced by injecting
new primary particles into the simulation at regular intervals rather than
simulating full batches until the end. This would allow for staggered showers
to develop for each set of injected particles, increasing the overlap and
reducing the low GPU usage intervals between the peaks currently observed.

Figure 3: GPU usage for two runs of an AdePT simulation of CMS on an Nvidia
RTX 2070 GPU, one with 20 particles per batch, and another with 200 particles
per batch. Each run simulates 2000 primary particles. Colors represent
unallocated warps in active SMs (gray), and compute warps in flight (yellow).

Figure 4 provides a closer look at a few simulation steps when GPU usage is at
its peak. On one hand, in small batches, there are not enough warps in flight
to fill the GPU, which means that all kernels can start running at the same
time, and the slowest kernel determines the pace of the simulation. The white
space between kernel calls represents idle time on the GPU in this case. On
the other hand, in large batches, a single kernel has enough warps to fill the
whole GPU, so other kernels can only start after some of the warps from the
previous kernel have finished executing. In this case, the white space at the
beginning of each step is an indication that the GPU is busy, and idle time is
limited to the end of the step, when the last running kernel no longer has
enough warps to fill the whole GPU.

Complementary to analysing the overall device occupancy, we analysed the
performance of a single geometry navigation kernel on a Tesla V100 data-centre
GPU at peak occupancy. While this device can theoretically handle 16 warps per
scheduler, the register usage for handling rotation matrices and deep call
stacks limits the kernel to only three warps per scheduler. Of these three
warps, an average of 0.1 warps are eligible for execution at a given time. The
device was found to issue on average one instruction every 34 cycles. Two main
causes for the low in-kernel utilisation were identified. Firstly, when many
particles navigate the on-device detector description, quasi-random memory
access is required. Given that GPUs are not optimised for low memory latency,
warps regularly stall when waiting for data from device memory. Secondly,
VecGeom uses virtual functions to compute distances to geometric objects. If
the threads within a warp jump into different functions, the warp diverges,
effectively serialising threads within the warp. It is likely possible to
speed up these computations, but this requires a redesign of the on-device
detector description.

(a) 20 particles

(b) 200 particles

Figure 4: Detailed view of a few simulation steps and their kernels at peak
GPU usage.

##  6 Conclusions and next steps

The AdePT project implemented a first full prototype of particle transport on
GPUs, having all the simulation stepping components: complete physics models
describing the electromagnetic processes, magnetic field propagation in
detector geometry, and code producing user hits data transferred from the GPU
back to the host. The main simulation components were re-engineered to be GPU
aware, as either GPU functional ports in the case of geometry, or complete re-
implementations in the case of the physics library.

Besides the required functionality, performance portability was one of the
aspects investigated. We have developed code abstractions based on portability
libraries such as Alpaka [11] and OneApi [12], but also developed a kernel
launcher abstracted on the backend type. It was found that portability can
only be achieved if more effort is invested, due to both the maturity of the
available tools, and the fact that VecGeom GPU support is only implemented for
CUDA. A revisited geometry GPU port would allow resuming the portability work
at a future stage.

Performance is one of the important aspects we monitored upon implementing
more complex examples. This triggered specific performance optimisation
developments, from handling random numbers to geometry navigation and host-
device interplay in the hybrid simulation approach. Geometry was identified as
being the main bottleneck in the current project phase, limiting the device
usage to a small fraction of the theoretical maximum. This inefficiency became
irreducible after doing a number of obvious optimisations, being intrinsic to
the geometry model used, deemed too complex and unbalanced for the GPU. This
puts the overall GPU efficiency target out of reach in the current
implementation, and calls for a deeper review of the adopted GPU approaches
for geometry and other work-divergent components, such as magnetic field
propagation.

Having implemented a hybrid workflow prototype able to use the GPU as
opportunistic accelerator in a general Geant4-driven CPU application
represents a major milestone for the AdePT project. Optimisation work for the
application has just started, aiming to expose additional opportunities for
performance improvement. The AdePT state-of-the-art prototype provides a
platform for understanding both the opportunities and future efforts needed to
allow general HEP detector simulation to benefit from GPU accelerator
hardware.

The oneAPI related work was conducted with the support of Intel in the
framework of the CERN openlab-Intel collaboration agreement. The authors
acknowledge the funding from EPSRC and STFC agencies. The single-precision
work was supported by the GSoC 2021 program.

## References

## References

  * [1] Aaij R et al. 2020 Computing and Software for Big Science 4 7 URL https://doi.org/10.1007/s41781-020-00039-7
  * [2] Rohr, David 2020 EPJ Web Conf. 245 10005 URL https://doi.org/10.1051/epjconf/202024510005
  * [3] Bocci A, Innocente V, Kortelainen M, Pantaleo F and Rovere M 2020 Frontiers in Big Data 3 ISSN 2624-909X URL https://www.frontiersin.org/article/10.3389/fdata.2020.601728
  * [4] Agostinelli S et al. (GEANT4) 2003 Nucl. Instr. Meth. A506 250–303
  * [5] The HEP Software Foundation 2019 Computing and Software for Big Science 3 7 ISSN 2510-2044 URL https://doi.org/10.1007/s41781-018-0018-8
  * [6] AdePT code repository https://github.com/apt-sim/AdePT
  * [7] Apostolakis J et al. 2015 J. of Phys.: Conf. Ser. 608 012023 URL https://doi.org/10.1088/1742-6596/608/1/012023
  * [8] G4HepEm code repository https://github.com/mnovak42/g4hepem
  * [9] Golling T et al. 2019 PoS ICHEP2018 159
  * [10] Hahnfeld, Jonas and Moneta, Lorenzo 2021 EPJ Web Conf. 251 03008 URL https://doi.org/10.1051/epjconf/202125103008
  * [11] Zenker E, Worpitz B, Widera R, Huebl A, Juckeland G, Knüpfer A, Nagel W E and Bussmann M 2016 Alpaka - an abstraction library for parallel kernel acceleration 2016 IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW) (IEEE Computer Society) (Preprint 1602.08477) URL http://arxiv.org/abs/1602.08477
  * [12] oneapi URL https://www.oneapi.io/


# Ideals in BIT speciale varieties

Dali Zangurashvili

###### Abstract.

Ideals in BIT speciale varieties are characterized. In particular, it is
proved that, for any finitary BIT speciale variety, there is a finite set of
ideal terms determining ideals. Several ideal term sets of this kind are
given. For the variety of groups one of these sets consists of the terms
$y_{1}y_{2}$, $xyx^{-1}$, $x^{-1}y^{-1}x$ (and $y$ which can be ignored),
while for rings it consists of the terms $y_{1}+y_{2}$, $-y$, $xy$, $yx$. For
each of the following varieties – groups with multiple operators, semi-loops,
and divisible involutory groupoids – one of the term sets found in this paper
almost coincides with the term sets found earlier for these particular
varieties by resp. Higgins, Bělohlávek and Chajda, and Halaš. The coincidence
is precise in the case of divisible involutory groupoids. For loops (resp.
loops with operators), the intersection of one of the term sets found in this
paper with the term sets found earlier for loops (resp. for loops with
operators) by Bruck (resp. by Higgins) forms the major part of both sets.

Key words and phrases: semi-abelian variety, BIT speciale variety, ideal term,
ideal, protomodular variety, 0-coherent variety.

2020 Mathematics Subject Classification: 08B05, 18E13, 08A30, 18A20.

##  1\. Introduction

As is well-known, for some particular pointed varieties of universal algebras,
there are finite sets of terms
$t_{i}(x_{1},x_{2},...,x_{m_{i}},y_{1},y_{2},...y_{n_{i}})$ such that normal
subalgebras (i.e. kernels of homomorphisms) can be characterized as follows:

(*) a non-empty subset $H$ of an algebra $A$ is a normal subalgebra if and
only if it is closed under all terms $t_{i}$ for arbitrary fixed values of the
variables $x_{1},x_{2},...,x_{m_{i}}$, i.e. for any $i$, any
$a_{1},a_{2},...,a_{m_{i}}\in A$, and any $h_{1},h_{2},...,h_{n_{i}}\in H$,
one has $t_{i}(a_{1},a_{2},...,a_{m_{i}},h_{1},h_{2},...,h_{n_{i}})\in H$.

For instance, for groups such a set consists of the terms $y_{1}y_{2}^{-1}$,
$xyx^{-1}$, for rings it consists of the terms $y_{1}-y_{2}$, $xy$ and $yx$.
In the present paper we show that a finite set of terms $t_{i}$ satisfying the
condition (*) exists for any finitary semi-abelian variety. In fact, we deal
with more general case of a finitary BIT speciale variety, and in place of
normal subalgebras consider ideals (which are precisely normal subalgebras in
the semi-abelian case).

The notion of a semi-abelian variety, and more generally, of a semi-abelian
category was introduced by Janelidze, Márki and Tholen in 2002 [10]. The
investigations of a number of mathematicians on the problem ”to find a list of
axioms which reflect the properties of groups, rings and algebras as nicely as
the abelian-category axioms do for abelian groups and modules [10]” posed by
MacLane [13] in 1950 led to this notion. One of them was Bourn who introduced
the notion of a protomodular category [3]. If a category is Barr exact (like a
variety of universal algebras) and has a zero object, then the protomodularity
is equivalent to the split version of the Short Five Lemma [3]. A semi-abelian
category is defined as a Barr exact protomodular category with a zero object
and finite coproducts. The notion of a semi-abelian category provides a good
abstract foundation for the isomorphism and decomposition theorems, radical
and commutator theory, homology of non-abelian structures. Any semi-abelian
category (in particular, any semi-abelian variety) is a Mal’cev category.

Another class of Mal’cev varieties is that of BIT speciale (or classically
ideal-determined) varieties. The notion of such a variety was introduced by
Ursini at the beginning of 70’s of the past century [18], [19], though the
identities included in the definition of a BIT speciale variety (see (1.1) and
(1.2) below) for the case where $n=1$ were considered earlier by Slomiński
[16]. A BIT speciale variety is defined as a variety the algebraic theory of
which contains a constant $0$ and, for some natural $n$, binary terms
$\alpha_{1}$, $\alpha_{2}$,…, $\alpha_{n}$, and an $(n+1)$-ary term $\theta$
such that the following identities are satisfied:

$\alpha_{i}(x,x)=0,$ (1.1)
$\theta(\alpha_{1}(x,y),\alpha_{2}(x,y),...,\alpha_{n}(x,y),y)=x.$ (1.2)

The equivalent notion is that of a $0$-coherent variety introduced by Beutler
at the end of 70’s [2].

The term BIT speciale variety is of Italian origin. BIT is an abbreviation for
”buona”+”ideali”+”teoria”, or in sentence ”buona teoria degli ideali”, and is
translated as a good theory of ideals, the precise meaning of which is
explained in the Ursini’s paper [19] (and Section 2 of this paper).

The notion of an ideal also was introduced by Ursini [17], and took its roots
from the earlier works by Higgins [9], Slomiński [16], Magari [14], etc. (for
details we refer the reader to [6] and [11]). Ideals were deeply studied by
Gumm and Ursini in [6].

Although the notion of a BIT speciale variety was introduced for purely
universal-algebraic purposes, subsequently it turned out to be closely related
to the notions of a protomodular category and of a semi-abelian category
since, as it was proved by Bourn and Janelidze in [4], a variety is semi-
abelian if and only if it is a pointed BIT speciale variety, (i.e. a BIT
speciale variety such that $0$ is a unique constant in its algebraic theory).

The varieties of groups, rings, loops, semi-loops, divisible involutory
groupoids, Heyting semi-lattices are semi-abelian, and hence BIT speciale.
More examples of varieties of the latter kind are given by the varieties of
groups with multiple operators, Boolean algebras, Heyting algebras.

In this paper, for any BIT speciale variety, we give several term sets
satisfying the condition (*), where ”normal subalgebra” is replaced by
”ideal”. The terms in them are represented via the BIT special terms $0$,
$\theta$, $\alpha_{i}$, and operations from the signature of the variety. Each
of these sets is finite if the variety is finitary. For the varieties of
groups and rings one of these sets contains the typical terms. Namely, for
groups, it consists of the terms $y_{1}y_{2}$ , $xyx^{-1}$, $x^{-1}y^{-1}x$
(and $y$, which, of course, can be ignored), while for the variety of rings it
consists of the terms $y_{1}+y_{2}$, $-y$, $xy$ and $yx$. For each of the
following varieties – groups with multiple operators, semi-loops, and
divisible involutory groupoids – one of the term sets found in this paper
almost coincides with the term sets given by resp. Higgins [9], Bělohlávek and
Chajda [1], and Halaš [7] for these particular varieties. The coincidence is
precise in the case of the variety of divisible involutory groupoids. For
loops (resp. loops with operators), the intersection of one of term sets found
in this paper with the term sets given by Bruck for loops [5] (by Higgins [9]
for loops with operators) forms the major part of both sets.

Finally note that, for the semi-abelian case, there is a different
characterization of ideals (=normal subalgebras). It is given by Mantovani and
Metere [15], and by Hartl and Loiseau [8]. It is formulated in terms of
commutators in abstract categories and works for arbitrary semi-abelian
categories. In this relation we have to mention also the paper [11] by
Janelidze, Márki, and Ursini, where the relationship between the basic
constructions of semi-abelian category theory and the theory of ideals (and of
clots) in universal algebra is studied.

##  2\. Ideal terms and ideals

We begin with the definitions from the papers [17] and [6].

Let $\mathbb{V}$ be a variety of universal algebras with a signature
$\mathcal{F}$, and let $0$ be a constant in the algebraic theory of
$\mathcal{F}$.

A term $t(x_{1},x_{2},...,x_{m},y_{1},y_{2},...,y_{n})$ over $\mathcal{F}$ is
called a 0-ideal in the variables $y_{1},y_{2},...,y_{n}$ if

$t(x_{1},x_{2},...,x_{m},0,0,...,0)=0$

is an identity in $\mathbb{V}$.

A non-empty subset $H$ of a $\mathbb{V}$-algebra $A$ is called a 0-ideal if,
for any 0-ideal term $t(x_{1},x_{2},...,x_{m},y_{1},y_{2},...,y_{n})$ in the
variables $y_{1},y_{2},...,y_{n}$, any $a_{1},a_{2},...,a_{m}\in A$ and any
$b_{1},b_{2},...,b_{n}\in H$, one has

$t(a_{1},a_{2},...,a_{m},b_{1},b_{2},...,b_{n})\in H.$

When no confusion might arise, we omit the prefix ”0-”.

One can easily verify that the kernel of any congruence on $A$ (i.e. the
equivalence class containing $0$) is an ideal.

A variety is called a BIT variety or ideal-determined if any ideal of its any
algebra is the kernel of precisely one congruence.

For the definitions of semi-abelian and BIT speciale varieties we refer the
reader to the Introduction. As it was mentioned there, a variety is semi-
abelian if and only if it is BIT speciale and $0$ is the unique constant in
its algebraic theory [4]. The latter condition is equivalent to the one that
the subset $\\{0\\}$ is a subalgebra in any algebra from this variety. In a
semi-abelian variety ideals are precisely normal subalgebras (i.e. kernels of
homomorphisms).

Any BIT speciale variety is a BIT variety, but the converse is not true [18].
The characterizations of the congruence corresponding to an ideal in a BIT
speciale variety are given by the following observation (see Proposition 2.1
below). Before we give it, let us agree that, as usual, for a
$\mathbb{V}$-algebra $A$, its subset $H$, a term
$t(x_{1},x_{2},...,x_{m},y_{1},y_{2},...,$ $y_{n})$ and
$a_{1},a_{2},...,a_{m}\in A$, the symbol $t(a_{1},a_{2},...,a_{m},H,H,...,H)$
denotes the set
$\\{t(a_{1},a_{2},...,a_{m},h_{1},h_{2},...,h_{n})|h_{1},h_{2},...,h_{n}\in
H\\}$.

######  Proposition 2.1.

(see e.g. [2]) Let $\mathbb{V}$ be a BIT speciale variety, $A$ be its algebra,
and $H$ be an ideal of $A$. Let $\simeq_{H}$ be the congruence whose kernel is
$H$, and $a,b\in A$. Then the following conditions are equivalent:

(i) $a\simeq_{H}b$;

(ii) $\alpha_{i}(a,b)\in H$, for any $i$ ($1\leq i\leq n)$;

(iii) $a\in\theta(H,H,...,H,b)$;

(iv) $b\in\theta(H,H,...,H,a)$.

Below we will characterize ideals in a BIT speciale variety. From now on we
will assume that $\mathbb{V}$ is such a variety.

Proposition 2.1 immediately implies that for any $\mathbb{V}$-algebra $A$, its
any ideal $H$, any $a\in A$, and any $i$ with $1\leq i\leq n$, we have the
inclusion

$\alpha_{i}(\theta(H,H,...,H,a),\theta(H,H,...,H,a))\subseteq H.$ (2.1)

Observe that, for a subset $H$ of an algebra $A$, the validity of inclusion
(2.1) for any $a\in A$ and any $i$ with $1\leq i\leq n$ does not imply that
$H$ is an ideal (for a counterexample take the variety of groups).

Let $H$ be a non-empty subset of a $\mathbb{V}$-algebra $A$. In view of
Proposition 2.1 we introduce the following equivalence relation on $A$:

$a\sim_{H}b$ iff $\theta(H,H,...,H,a)=\theta(H,H,...,H,b)$.

In the sequel we will repeatedly use the identity

$\theta(0,0,...,0,a)=a.$ (2.2)

It immediately follows from (1.1) and (1.2).

######  Lemma 2.2.

Let $0\in H$. The equivalence class $\left[a\right]$ of any element $a$ of $A$
is contained in the set $\theta(H,H,...,H,a)$.

###### Proof.

Assume that $b$ is an element of $A$ with $a\sim_{H}b$. Since
$b=\theta(0,0,...,0,b)\in\theta(H,H,...,H,b)$, we obtain that
$b\in\theta(H,H,...,H,a)$. ∎

######  Lemma 2.3.

Let $H$ contains $0$ and is closed under the operations $\theta$ and
$\alpha_{i}(-,0)$, for all $i$. Then

$\theta(H,H,...,H,0)=H.$ (2.3)

###### Proof.

It suffices to observe that, for any $h\in H$ we have

$h=\theta(\alpha_{1}(h,0),\alpha_{2}(h,0),...,\alpha_{n}(h,0),0).$

∎

######  Lemma 2.4.

Let $H$ be a non-empty subset of $A$. The following conditions are equivalent
and imply that $0\in H$:

(i) for any $a\in A$ and any $i$ with $1\leq i\leq n$, inclusion (2.1) holds;

(ii) for any $a\in A$ we have the equality

$\left[a\right]=\theta(H,H,...,H,a),$ (2.4)

and, moreover, for any $a,b\in A$, if $a\sim_{H}b$, then $\alpha_{i}(a,b)\in
H$, for any $i$ $(1\leq i\leq n)$.

###### Proof.

(i)$\Rightarrow$(ii): Since $H$ is not empty, inclusion (2.1) implies that
$0\in H$. Consider now an element

$b=\theta(h_{1},h_{2},...,h_{n},a),$ (2.5)

with $h_{1},h_{2},...,h_{n}\in H$. We will show that

$\theta(H,H,...,H,a)=\theta(H,H,...,H,b).$ (2.6)

Consider any

$c=\theta(h^{\prime}_{1},h^{\prime}_{2},...,h^{\prime}_{n},\theta(h_{1},h_{2},...,h_{n},a))$

with $h^{\prime}_{1},h^{\prime}_{2},...,h^{\prime}_{n}\in H$. Equality (1.2)
implies that

$\alpha_{i}(\theta(h^{\prime}_{1},h^{\prime}_{2},...,h^{\prime}_{n},\theta(h_{1},h_{2},...,h_{n},a)),a)=$
$\alpha_{i}(\theta(h^{\prime}_{1},h^{\prime}_{2},...,h^{\prime}_{n},\theta(h_{1},h_{2},...,h_{n},a)),$
$\theta(\alpha_{1}(a,\theta(h_{1},h_{2},...,h_{n},a)),\alpha_{2}(a,\theta(h_{1},h_{2},...,h_{n},a)),...$
$\alpha_{n}(a,\theta(h_{1},h_{2},...,h_{n},a)),\theta(h_{1},h_{2},...,h_{n},a))).$

By (2.1), we have $\alpha_{j}(a,\theta(h_{1},h_{2},...,h_{n},a))\in H$, for
all $j$. Applying (2.1) again, we obtain that $\alpha_{i}(c,a)\in H$. Then
from (1.2) we obtain that

$c=\theta(\alpha_{1}(c,a),\alpha_{2}(c,a),...,\alpha_{n}(c,a),a)\in\theta(H,H,...,H,a).$

This implies that $\theta(H,H,...,H,b)\subseteq\theta(H,H,...,H,a)$.

For the converse, consider again arbitrary
$h^{\prime}_{1},h^{\prime}_{2},...,h^{\prime}_{n}\in H$. We have

$\theta(h^{\prime}_{1},h^{\prime}_{2},...,h^{\prime}_{n},a)=\theta(c_{1},c_{2},...,c_{n},\theta(h_{1},h_{2},...,h_{n},a)),$
(2.7)

where, for any $j$,

$c_{j}=\alpha_{j}(\theta(h^{\prime}_{1},h^{\prime}_{2},...,h^{\prime}_{n},a),\theta(h_{1},h_{2},...,h_{n},a)).$

Inclusion (2.1) implies that $c_{j}\in H$. This together with (2.5) and (2.7)
implies (2.6). Taking into account Lemma 2.2 we can conclude that equality
(2.4) holds.

If $a\sim_{H}b$, then $b=\theta(h_{1},h_{2},...,h_{n},a)$, for some
$h_{1},h_{2},...,h_{n}\in H$. Applying (2.1), we obtain that
$\alpha_{i}(a,b)\in H$.

The implication (ii)$\Rightarrow$(i) is obvious.

∎

######  Theorem 2.5.

Let $\mathbb{V}$ be a BIT speciale variety, and let $A$ be its any algebra.
Then, for any non-empty subset $H$ of $A$, the following conditions are
equivalent:

(i) $H$ is an ideal;

(ii) $H$ is closed under the operations $\theta$ and $\alpha_{i}$, for any $i$
with $1\leqslant i\leqslant n$, and, moreover, for any
$\tau\in\mathcal{F}\cup\\{\theta\\}$, any $i$ with $1\leqslant i\leqslant n$,
and any $a_{1},a_{2},...,a_{k}\in A$ (with $k$ being the arity of $\tau$) we
have:

$\alpha_{i}(\tau(\theta(H,H,...,H,a_{1}),\theta(H,H,...,H,a_{2}),$ (2.8)
$...,\theta(H,H,...,H,a_{k})),\tau(a_{1},a_{2},...,a_{k}))\subseteq H.$

(iii) $H$ contains $0$ and is closed under the operations $\theta$ and
$\alpha_{i}(-,0)$, for any $i$ with $1\leqslant i\leqslant n$, and, moreover,
for any $\tau\in\mathcal{F}\cup\\{\theta\\}\cup\\{\alpha_{j}|1\leqslant
j\leqslant n\\}$, any $i$ with $1\leqslant i\leqslant n$, and any
$a_{1},a_{2},...,a_{k}\in A$ (with $k$ being the arity of $\tau$) we have
(2.8);

(iv) $H$ is closed under the operations $\theta$ and $\alpha_{i}(-,0)$, for
any $i$ with $1\leqslant i\leqslant n$, and, moreover, for any
$\tau\in\mathcal{F}$, any $a_{1},a_{2},...,a_{k}\in A$ (with $k$ being the
arity of $\tau$) and $i$ with $1\leqslant i\leqslant n$, we have (2.8) and

$\alpha_{i}(\theta(H,H,...,H,a),\theta(H,H,...,H,a))\subseteq H;$ (2.9)

(v) $H$ is closed under the operations $\theta$ and $\alpha_{i}(-,0)$, for any
$i$ with $1\leqslant i\leqslant n$, and, moreover, for any
$\tau\in\mathcal{F}$, any $a_{1},a_{2},...,a_{k}\in A$ (with $k$ being the
arity of $\tau$) and $i$, $j$ with $1\leqslant i\leqslant n,1\leq j\leq k$, we
have (2.9) and

$\alpha_{i}(\tau(a_{1},a_{2},....,a_{j-1},\theta(H,H,...,H,a_{j}),a_{j+1},...$
(2.10) $...,a_{k}),\tau(a_{1},a_{2},...,a_{k}))\subseteq H;$

(vi) $H$ contains $0$ and is closed under the operations $\theta$ and
$\alpha_{i}(-,0)$, for any $i$ with $1\leqslant i\leqslant n$, and, moreover,
for any $a\in A$ we have

$\left[a\right]=\theta(H,H,...,H,a),$ (2.11)

and moreover, for any $\tau\in\mathcal{F}$, any $a_{1},a_{2},...,a_{k}\in A$
(with $k$ being the arity of $\tau$) and $i$, $j$ with $1\leqslant i\leqslant
n,1\leq j\leq k$, we have inclusion (2.10);

(vii) $\sim_{H}$ is a congruence on $A$, and $H$ is its kernel.

If $\mathbb{V}$ is semi-abelian, then ”$H$ is closed under the operations
$\theta$ and $\alpha_{i}$, for any $i$ with $1\leqslant i\leqslant n$” in
condition (ii), ”$H$ contains $0$ and is closed under the operations $\theta$
and $\alpha_{i}(-,0)$, for any $i$ with $1\leqslant i\leqslant n$” in
condition (iii), ”$H$ is closed under the operations $\theta$ and
$\alpha_{i}(-,0)$, for any $i$ with $1\leqslant i\leqslant n$” in conditions
(iv) and (v) can be replaced by ”$H$ is a subalgebra of $A$”.

###### Proof.

The implications (i)$\Rightarrow$(ii) and (i)$\Rightarrow$(iii) immediately
follow from the definition of an ideal.

(ii)$\Rightarrow$(iv): Since $H$ is not empty and is closed under
$\alpha_{i}$, it contains $0$. Moreover, inclusion (2.8) considered for
$\tau=\theta$ implies that, for any
$h_{1},h_{2},...,h_{n},h^{\prime}_{1},h^{\prime}_{2},...,h^{\prime}_{n}\in H$,
we have:

$\alpha_{i}(\theta(\theta(\alpha_{1}(h_{1},h^{\prime}_{1}),\alpha_{2}(h_{1},h^{\prime}_{1}),...,\alpha_{n}(h_{1},h^{\prime}_{1}),h^{\prime}_{1}),$
$\theta(\alpha_{1}(h_{2},h^{\prime}_{2}),\alpha_{2}(h_{2},h^{\prime}_{2}),...,\alpha_{n}(h_{2},h^{\prime}_{2}),h^{\prime}_{2})$
$...,\theta(\alpha_{1}(h_{n},h^{\prime}_{n}),\alpha_{2}(h_{n},h^{\prime}_{n}),...,\alpha_{n}(h_{n},h^{\prime}_{n}),h^{\prime}_{n})),$
$\theta(0,0,...,0,a),$
$\theta(h^{\prime}_{1},h^{\prime}_{2},...,h^{\prime}_{n},a))\in H.$

Applying equality (1.2) $n$ times, we obtain that

$\alpha_{i}(\theta(h_{1},h_{2},...,h_{n},a),\theta(h^{\prime}_{1},h^{\prime}_{2},...,h^{\prime}_{n},a))\in
H,$

and inclusion (2.9) is proved.

(iii)$\Rightarrow$(iv): To show inclusion (2.9) we consider (2.8) for
$\tau=\alpha_{j}$ and $a_{1}=a_{2}=a$. Then we obtain

$\alpha_{i}(\alpha_{j}(\theta(H,H,...,H,a),\theta(H,H,...,H,a)),0)\subseteq
H,$

for any $i$ and $j$. Equality (1.2) implies that, for any
$h_{1},h_{2},...,h_{n},$ $h^{\prime}_{1},h^{\prime}_{2},...,h^{\prime}_{n}\in
H$, we have

$\alpha_{i}(\theta(h_{1},h_{2},...,h_{n},a),\theta(h^{\prime}_{1},h^{\prime}_{2},...,h^{\prime}_{n},a))=$
$\theta(\alpha_{1}(\alpha_{i}(\theta(h_{1},h_{2},...,h_{n},a),\theta(h^{\prime}_{1},h^{\prime}_{2},...,h^{\prime}_{n},a)),0),$
$\alpha_{2}(\alpha_{i}(\theta(h_{1},h_{2},...,h_{n},a),\theta(h^{\prime}_{1},h^{\prime}_{2},...,h^{\prime}_{n},a)),0),...,$
$\alpha_{n}(\alpha_{i}(\theta(h_{1},h_{2},...,h_{n},a),\theta(h^{\prime}_{1},h^{\prime}_{2},...,h^{\prime}_{n},a)),0),0,).$

Therefore, this element belongs to $H$.

The implication (iv)$\Rightarrow$(v) follows from equality (2.2), while
(v)$\Rightarrow$(vi) follows from Lemma 2.4.

(vi)$\Rightarrow$(vii): Let us show that for any $\tau\in\mathcal{F}$ and any
$j$, we have

$\tau(a_{1},a_{2},...,a_{j-1},\left[a_{j}\right],a_{j+1}...a_{k})\subseteq$
$\left[\tau(a_{1},a_{2},...,a_{j-1},a_{j},a_{j+1},...,a_{k})\right].$ (2.12)

Inclusion (2.10) and equality (2.11) imply that, for any

$b\in\tau(a_{1},a_{2},...,a_{j-1},\left[a_{j})\right],a_{j+1},...,a_{k})=$
$\tau(a_{1},a_{2},...,a_{j-1},\theta(H,H,...,H,a_{j}),a_{j+1},...,a_{k}),$

and any $i$ we have

$\alpha_{i}(b,\tau(a_{1},a_{2},...,a_{k}))\in H.$ (2.13)

Hence

$b=\theta(\alpha_{1}(b,\tau(a_{1},a_{2},...,a_{k})),\alpha_{2}(b,\tau(a_{1},a_{2},...,a_{k})),$
$...,\alpha_{n}(b,\tau(a_{1},a_{2},...,a_{k})),\tau(a_{1},a_{2},...,a_{k}))\in$
$\theta(H,H,...,H,\tau(a_{1},a_{2},...,a_{k}))=$
$\left[\tau(a_{1},a_{2},...,a_{k})\right],$

and inclusion (2.12) is proved. Thus $\sim_{H}$ is a congruence. Lemma 2.3
implies that $H$ is the kernel of the congruence $\sim_{H}$.

The implication (vii)$\Rightarrow$(i) is well-known.

∎

Observe that inclusion (2.9) is satisfied for any subset $H$ of a
$\mathbb{V}$-algebra $A$ which is right-cancellable in the sense of [21].
Recall this means that for any $a_{1},a_{2},...,$
$a_{n},a^{\prime}_{1},a^{\prime}_{2},...,a^{\prime}_{n},b,b^{\prime}\in A$ and
any $i$ with $1\leqslant i\leqslant n$ one has

$\alpha_{i}(\theta(a_{1},a_{2},...,a_{n},b),\theta(a^{\prime}_{1},a^{\prime}_{2},...,a^{\prime}_{n},b))=$
$\alpha_{i}(\theta(a_{1},a_{2},...,a_{n},b^{\prime}),\theta(a^{\prime}_{1},a^{\prime}_{2},...,a^{\prime}_{n},b^{\prime})).$

We say that a set $T$ of ideal terms determines ideals in a variety
$\mathbb{V}$ if ”any ideal term” in the definition of an ideal can be replaced
by ”any ideal term from $T$”. Theorem 2.5 implies

######  Theorem 2.6.

Let $\mathbb{V}$ be a BIT speciale variety. Then each of the following sets of
terms (being ideal terms in the variables $y$ with or without indices)
determines ideals in $\mathbb{V}$:

(i) the set of the terms

$\theta(y_{1},y_{2},...,y_{n},y_{n+1}),\alpha_{i}(y_{1},y_{2}),$ (2.14)

and

$\alpha_{i}(\tau(\theta(y_{11},y_{12},...,y_{1n},x_{1}),\theta(y_{21},y_{22},...,y_{2n},x_{2}),$
(2.15)
$...,\theta(y_{k1},y_{k2},...,y_{kn},x_{k})),\tau(x_{1},x_{2},...,x_{k})),$

for all operations $\tau$ from the set $\mathcal{F}\cup\\{\theta\\}$, and all
$i$ with $1\leqslant i\leqslant n$;

(ii) the set of the terms

$0,\theta(y_{1},y_{2},...,y_{n},y_{n+1}),\alpha_{i}(y,0),$ (2.16)

and terms (2.15) for all operations $\tau$ from the set
$\mathcal{F}\cup\\{\theta\\}\cup\\{\alpha_{j}|1\leqslant j\leqslant n\\}$ and
all $i$ with $1\leqslant i\leqslant n$;

(iii) the set of the terms

$\theta(y_{1},y_{2},...,y_{n},y_{n+1}),\alpha_{i}(y,0),$ (2.17)
$\alpha_{i}(\theta(y_{1},y_{2},...,y_{n},x),\theta(y_{n+1},y_{n+2},...,y_{2n},x)),$
(2.18)

and terms (2.15) for all operations $\tau$ from the signature $\mathcal{F}$
and all $i$ with $1\leqslant i\leqslant n$;

(iv) the set of the terms (2.18) and

$\theta(y_{1},y_{2},...,y_{n},y_{n+1}),\alpha_{i}(y,0),$ (2.19)
$\alpha_{i}(\tau(x_{1},x_{2},....,x_{j-1},\theta(y_{1},y_{2},...,y_{n},x_{j}),x_{j+1},...$
(2.20) $...,x_{k}),\tau(x_{1},x_{2},...,x_{k}));$

for all operations $\tau$ from the signature $\mathcal{F}$ and all $i$, $j$
with $1\leqslant i\leqslant n,1\leq j\leq k$;

If $\mathbb{V}$ is semi-abelian, then terms (2.14) in (i), (2.16) in (ii),
(2.17) in (iii), and (2.19) in (iv) can be replaced by the terms

$\tau(y_{1},y_{2},...,y_{n}),$ (2.21)

for all operations $\tau$ from the signature $\mathcal{F}$ (including $0$).

Observe that if $\mathcal{F}$ is finite, then obviously all four term sets in
Theorem 2.6 also are finite.

Finally let us give several easy corollaries of Theorem 2.5. Consider two
varieties $\mathbb{V}$ and $\mathbb{V^{\prime}}$ with signatures resp.
$\mathcal{F}$ and $\mathcal{F}^{\prime}$, and sets of identities resp.
$\Sigma$ and $\Sigma^{\prime}$. Assume that
$\mathcal{F}\subseteq\mathcal{F}^{\prime}$ and
$\Sigma\subseteq\Sigma^{\prime}$. If $\mathbb{V}$ is a BIT speciale variety,
then obviously $\mathbb{V^{\prime}}$ is also of this kind with the same terms
$0$, $\theta$, and $\alpha_{i}$. Theorem 2.5 implies

######  Corollary 2.7.

Let $\mathbb{V}$ be a BIT speciale variety, $A^{\prime}$ be a
$\mathbb{V^{\prime}}$-algebra, and $H$ be a subset of $A^{\prime}$. The
following conditions are equivalent:

(i) $H$ is an ideal of $A^{\prime}$ in the variety $\mathbb{V^{\prime}}$;

(ii) $H$ is an ideal of $A^{\prime}$ in the variety $\mathbb{V}$ and inclusion
(2.8) is satisfied for any $a_{1},a_{2},...,a_{k}\in A^{\prime}$ and any
$\tau\in\mathcal{F}^{\prime}\setminus\mathcal{F}$.

(iii) $H$ is an ideal of $A^{\prime}$ in the variety $\mathbb{V}$ and
inclusions (2.10) are satisfied for any $a_{1},a_{2},...,a_{k}\in A^{\prime}$,
any $\tau\in\mathcal{F}^{\prime}\setminus\mathcal{F}$, and any $i$, $j$ with
$1\leqslant i\leqslant n,1\leq j\leq k$.

######  Corollary 2.8.

Let $\mathbb{V}$ be a BIT speciale variety, and $A^{\prime}$ be a
$\mathbb{V^{\prime}}$-algebra. Let $\mathcal{F}=\mathcal{F}^{\prime}$. A
subset $H$ of $A^{\prime}$ is an ideal in the variety $\mathbb{V^{\prime}}$ if
and only if it is an ideal of $A^{\prime}$ in the variety $\mathbb{V}$.

Observe that the condition that $\mathbb{V}$ is BIT speciale is essential in
both Corollaries 2.7 and 2.8. Removing this condition we still have that any
subset which is an ideal in $\mathbb{V}^{\prime}$ is an ideal in $\mathbb{V}$
too, but the converse is not true even if $\mathcal{F}=\mathcal{F}^{\prime}$
(for a counterexample take the variety $\mathbb{V}^{\prime}$ of groups, and
the variety $\mathbb{V}$ with the same signature, but the empty set of
identities).

Corollaries 2.7 implies

######  Corollary 2.9.

Let $\mathbb{V}$ be a BIT speciale variety.

(a) The union of any set of ideal terms determining ideals of $\mathbb{V}$
with the set of terms (2.15) for
$\tau\in\mathcal{F}^{\prime}\setminus\mathcal{F}$ determines ideals in
$\mathbb{V^{\prime}}$.

(b) The union of any set of ideal terms determining ideals of $\mathbb{V}$
with the set of terms (2.20) for
$\tau\in\mathcal{F}^{\prime}\setminus\mathcal{F}$ and $1\leqslant i\leqslant
n,1\leq j\leq k$ determines ideals in $\mathbb{V^{\prime}}$.

######  Corollary 2.10.

If $\mathcal{F}=\mathcal{F}^{\prime}$, any set of ideal terms determining
ideals in $\mathbb{V}$ determines ideals in $\mathbb{V^{\prime}}$ too.

##  3\. Examples

For all varieties considered in this section, the signature/algebraic theory
of which contains the constant $e$, the multiplication operation $\cdot$ and
the division operation /, there are the following BIT speciale terms:

$0=e,\theta(x,y)=xy,\alpha(x,y)=x/y.$ (3.1)

Throughout the section we identify the equivalent terms (like, for instance,
the terms $y/e$ and $y$ in the variety of groups).

For the variety of groups, the set (iv) from Theorem 2.6 consists of the
terms:

$y_{1}y_{2},xyx^{-1},x^{-1}y^{-1}x,$ (3.2)

and the identity term $y$ which can be ignored (so below we will not mention
it).

For the variety of rings the set (iv) from Theorem 2.6 consists of the terms
$y_{1}+y_{2}$, $-y$, $xy$ and $yx$.

More generally, consider the variety $\Omega$-$Grp$ of groups with operators
from a set $\Omega$ (three criteria for a variety of universal algebras to be
of this kind, formulated in BIT speciale terms are given in our recent papers
[20] and [21]). The set (iv) from Theorem 2.6 consists of terms (3.2) and

$\omega(x_{1},x_{2},...,yx_{i},...,x_{k})(\omega(x_{1},x_{2},...,x_{k}))^{-1},$
(3.3)

for all $\omega\in\Omega$ and all $i$ with $1\leqslant i\leqslant n$. Note
that a set of ideal terms determining ideals in the variety $\Omega$-$Grp$ was
given by Higgings in [9]. It consists of the well-known terms determining
ideals of groups (i.e. normal subgroups) and the terms which can be obtained
from (3.3) by permuting the factors, i.e. the terms

$(\omega(x_{1},x_{2},...,x_{k}))^{-1}\omega(x_{1},x_{2},...,yx_{i},...,x_{k}).$
(3.4)

When $\omega$ is a unary distributive term (like the multiplication by a
scalar in the case of algebras over a ring), term (3.3) takes the form
$\omega(y)$.

Recall that a loop can be defined as a set $A$ equipped with three binary
operations $\cdot$, $/$, and $\setminus$ and a constant $e$ satisfying the
identities:

$x/x=e,$ (3.5) $(x/y)y=x,$ (3.6) $(xy)/y=x.$ (3.7) $y(y\setminus x)=x,$ (3.8)
$y\setminus(yx)=x,$ (3.9) $x\setminus x=e.$ (3.10)

Hence, for the variety of loops, the set (i) from Theorem 2.6 consists of the
terms

$y_{1}y_{2},y_{1}/y_{2},$ (3.11) $((y_{1}x_{1})(y_{2}x_{2}))/(x_{1}x_{2}),$
(3.12) $((y_{1}x_{1})/(y_{2}x_{2}))/(x_{1}/x_{2}).$ (3.13)
$((y_{1}x_{1})\setminus(y_{2}x_{2}))/(x_{1}\setminus x_{2}).$ (3.14)

while the set (iv) of Theorem 2.6 consists of the following terms:

$(y_{1}x_{1})/(y_{2}x_{2}),$ (3.15) $y_{1}y_{2},$ (3.16)
$((y_{1}x_{1})x_{2})/(x_{1}x_{2}),$ (3.17) $(x_{1}(y_{1}x_{2}))/(x_{1}x_{2}),$
(3.18) $((y_{1}x_{1})/x_{2})/(x_{1}/x_{2}),$ (3.19)
$(x_{1}\setminus(yx_{2}))/(x_{1}\setminus x_{2}).$ (3.20)
$(x_{1}/(yx_{2}))/(x_{1}/x_{2}),$ (3.21) $((y_{1}x_{1})\setminus
x_{2})/(x_{1}\setminus x_{2})$ (3.22)

and the term $y$ which can be ignored, so that, like in the case of groups, we
will not count it. Recall that a set of ideal terms determining ideals of
loops was found by Bruck in [5]. It consists of terms (3.16)-(3.20) and the
terms

$y_{1}/y_{2},y_{1}\setminus y_{2}.$ (3.23)

Let $\Omega$-$Loop$ be the variety of loops with operators from a set
$\Omega$. The set (i) of Theorem 2.6 consists of terms (3.11)-(3.14) and

$\omega(y_{1}x_{1},y_{2}x_{2},...,y_{k}x_{k})/\omega(x_{1},x_{2},...,x_{k}),$
(3.24)

for all $\omega\in\Omega$. The set (iv) from Theorem 2.6 consists of terms
(3.15)-(3.22) and

$\omega(x_{1},x_{2},...,yx_{i},...,x_{k})/\omega(x_{1},x_{2},...,x_{k}),$
(3.25)

for all $\omega\in\Omega$ and all $i$ with $1\leq i\leq n$. Another set of
terms determining ideals in the variety $\Omega$-$Loop$ was found by Higgins
in [9]. It consists of terms (3.16)-(3.20), (3.23) and (3.25).

Recall that a (right) semi-loop is a set $A$ equipped with two binary
operations $\cdot$, $/$, and a constant $e$ which satisfies identities
(3.5)-(3.7). $A$ is called a (right) divisible involutory groupoid if it
satisfies identities (3.5)-(3.6) [7]. For both varieties, the set (i) of
Theorem 2.6 consists of terms (3.11)-(3.13), which coincides with the set of
terms found by Halaš [7] for divisible involutory groupoids, and almost
coincides with the set of terms found by Bělohlávek and Chajda [1] for semi-
loops. The latter one consists of term (3.11) and the terms which can be
obtained from (3.13) and (3.14) by permuting the external numerators and
denominators, i.e. the terms

$(x_{1}x_{2})/((y_{1}x_{1})(y_{2}x_{2})),$ (3.26)
$(x_{1}/x_{2})/((y_{1}x_{1})/(y_{2}x_{2})).$ (3.27)

Recall that the BIT speciale terms for the variety of Heyting semi-lattices
and Heyting algebras were found by Johnstone [12] (observe that $0$ is the
constant $\mathsf{T}$, so that $0$-ideals are filters in this case). For these
varieties the terms from any set given by Theorem 2.6 take very cumbersome
forms, and we do not give them here. For the variety of Boolean algebras, we
have at least two collections of BIT speciale terms – one of them is the same
as that of the variety of Heyting algebras. The second one is obtained from
the group structure of Boolean algebras. For both collections of BIT speciale
terms, some of terms from any set given by Theorem 2.6 are cumbersome.

##  4\. Acknowledgments

Financial support from Shota Rustaveli Georgian National Science Foundation
(Ref.: FR-18-10849) is gratefully acknowledged.

## References

  * [1] R. Bělohlávek, I. Chajda, Congruences and ideals in semiloops, Acta Sci. Math. (Szeged), 59(1994), 43-47.
  * [2] E. Beutler, An idealtheoretic characterization of varieties of abelian $\Omega$-groups, Algebra Universalis 8(1978), 91-100.
  * [3] D. Bourn, Normalization equivalence, kernel equivalence and affine categories, Lecture notes in Math, 1448(1991), 43-62.
  * [4] D. Bourn, G. Janelidze, Characterization of protomodular varieties of universal algebras, Theory Appl. Categ., 11(2002), 143-147.
  * [5] R. H. Bruck, Contributions to the theory of loops, Trans. Amer. Math. Soc. 60(1946), 245-354.
  * [6] H. P. Gumm, A. Ursini, Ideals in universal algebras, Algebra Universalis, 19(1984), 45-54.
  * [7] R. Halaš, Congruences and ideals of left divisible involutory groupoids, Mathematica Bohemica, 121, N. 3(1996), 269-272.
  * [8] M. Hartl, B. Loiseau, On actions and strict actions in homological categories, Theory Appl. Categ. 27(2013), n.15, 347-392.
  * [9] P. J. Higgins, Groups with multiple operators, Proc. London Math. Soc. (3), 6(1956), 366-416.
  * [10] G. Janelidze, L. Márki, W. Tholen, Semi-abelian categories, J. Pure Appl. Algebra, 168(2002), 367-386.
  * [11] G. Janelidze, L. Márki, A. Ursini, Ideals and clots in universal algebra and semi-abelian categories, J. Algebra 307(2007), 191-208.
  * [12] P. T. Johnstone, A note on the semiabelian variety of Heyting semilattices, in: Galois theory, Hopf algebras, and Semiabelian categories, Fields Inst. Commun. 43(2004), 317-318.
  * [13] S. MacLane, Duality for groups, Bull. Amer. Math. Soc., 56(1950), 485-516.
  * [14] R. Magari, Su una classe equazionale di algebre. Ann. di Mat. pura e applic. (44)65 (1967), 277-311.
  * [15] S. Mantovani, G. Metere, Normalities and commutators, J. Algebra, 324(2010), 2568-2588.
  * [16] J. Slomiński, On the determining of the form of congruences in abstract algebras with equationally definable constant elements, Fund. Math. 48 (1960) 325–341.
  * [17] A. Ursini, Sulle varietá di algebre con una buona teoria degli ideali, Boll. Un. Mat. Ital. (4), 6(1972), 90-95.
  * [18] A. Ursini, Osservazioni sulla varietá BIT, Boll. Un. Mat. Ital.(4)7(1973), 205-211.
  * [19] A. Ursini, On subtractive varieties, I, Algebra Universalis 31(1994), 204-222.
  * [20] D. Zangurashvili, Associativity-like conditions for protomodular algebras, Algebra Universalis 81:1 (2020).
  * [21] D. Zangurashvili, Right-cancellable protomodular algebras, https://arxiv.org/pdf/2103.00278.pdf

Author’s address: Dali Zangurashvili, A. Razmadze Mathematical Institute of
Tbilisi State University, 6 Tamarashvili Str., Tbilisi 0177, Georgia, e-mail:
<EMAIL_ADDRESS>