---
title: "Operations on Elements"
canonical: "https://docs.magma-maths.org/v2.30-1/FiniteGroups/BlackBoxGroups/operation-element.html"
source: "https://docs.magma-maths.org/v2.30-1/FiniteGroups/BlackBoxGroups/operation-element.md"
part: "Finite Groups"
chapter: "Black-Box Groups"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Finite Groups", "source": "https://docs.magma-maths.org/v2.30-1/FiniteGroups/index-finite-groups.md"}
  - {"title": "Black-Box Groups", "source": "https://docs.magma-maths.org/v2.30-1/FiniteGroups/BlackBoxGroups/index-black-box-groups.md"}
prev: {"title": "Arithmetic with Elements", "source": "https://docs.magma-maths.org/v2.30-1/FiniteGroups/BlackBoxGroups/operation.md"}
next: {"title": "Set-Theoretic Operations", "source": "https://docs.magma-maths.org/v2.30-1/FiniteGroups/BlackBoxGroups/set.md"}
intrinsics:
  - {"name": "eq", "signature": "u eq v: GrpBBElt, GrpBBElt -> BoolElt"}
  - {"name": "ne", "signature": "u ne v: GrpBBElt, GrpBBElt -> BoolElt"}
  - {"name": "Parent", "signature": "Parent(u): GrpBBElt -> GrpBB"}
  - {"name": "UnderlyingElement", "signature": "UnderlyingElement(u): GrpBBElt -> GrpElt"}
  - {"name": "Order", "signature": "Order(u): GrpBBElt -> RngIntElt"}
examples:
  - "ex-124120"
---

# Operations on Elements

## Equality and Comparison

<a id="operation-op-eq-grpbbelt-grpbbelt"></a>
### `u eq v: GrpBBElt, GrpBBElt -> BoolElt`

Returns `true` if and only if the underlying concrete group elements for $u$ and $v$ are equal.

<a id="operation-op-ne-grpbbelt-grpbbelt"></a>
### `u ne v: GrpBBElt, GrpBBElt -> BoolElt`

Returns `true` if and only if the underlying concrete group elements for $u$ and $v$ are not equal.

## Attributes of Elements

<a id="function-parent-grpbbelt"></a>
### `Parent(u): GrpBBElt -> GrpBB`

The parent group $G$ of the element $u$.

<a id="function-underlyingelement-grpbbelt"></a>
### `UnderlyingElement(u): GrpBBElt -> GrpElt`

The concrete group element corresponding to the BB-group element $u$.

<a id="function-order-grpbbelt"></a>
### `Order(u): GrpBBElt -> RngIntElt`

The order of the underlying concrete group element of $u$.

<a id="example-ex-124120"></a>
### `Example: Standard Generators of M24 (ex-124120)`

The following function takes a black box group isomorphic to $M_{24}$ and finds standard generators. It is taken from the ATLAS of Finite Group Representations page on $M_{24}$.

```magma
> m24_standard := function(B)
> repeat a := PseudoRandom(B); until Order(a) eq 10;
> a := a ^ 5;
> repeat b := PseudoRandom(B); until Order(b) eq 15;
> b := b ^ 5;
> repeat b := b ^ PseudoRandom(B); ab := a*b;
> until Order(ab) eq 23;
> x := ab*(ab^2*b)^2*ab*b;
> if Order(x) eq 5 then b := b^-1; end if;
> return a,b;
> end function;
```

We take a group which must be $M_{24}$ and find these generators.

```magma
> G := PermutationGroup<24 |
> [ 20, 4, 10, 3, 15, 9, 7, 1, 11, 22, 21, 19, 8, 2, 24, 5,
> 12, 18, 13, 16, 14, 23, 6, 17 ],
> [ 12, 18, 3, 2, 7, 11, 5, 21, 19, 22, 23, 1, 14, 17, 10,
> 8, 4, 13, 24, 20, 9, 15, 6, 16 ]>;
> #G;
244823040
> Transitivity(G);
5
> B := NaturalBlackBoxGroup(G);
> a,b := m24_standard(B); a,b;
GrpBBElt (1, 16)(2, 22)(3, 14)(4, 15)(5, 11)(6, 24)(7,
10)(8, 18)(9, 19)(12, 17)(13, 20)(21, 23)
GrpBBElt (1, 14, 17)(2, 18, 13)(5, 16, 20)(7, 22, 9)(8, 24,
15)(19, 23, 21)
```

The printing of the GrpBBElts shows the underlying concrete group elements. These may be extracted using the `UnderlyingElement` intrinsic for use within $G$.
