---
title: "Operations on Elements"
canonical: "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsOfStraightLinePrograms/operation-element.html"
source: "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsOfStraightLinePrograms/operation-element.md"
part: "Finitely Presented Groups"
chapter: "Groups of Straight-Line Programs"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Finitely Presented Groups", "source": "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/index-finitely-presented-groups.md"}
  - {"title": "Groups of Straight-Line Programs", "source": "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsOfStraightLinePrograms/index-groups-of-straight-line-programs.md"}
prev: {"title": "Creating Homomorphisms", "source": "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsOfStraightLinePrograms/homomorphisms.md"}
next: {"title": "Set-Theoretic Operations", "source": "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/GroupsOfStraightLinePrograms/set.md"}
intrinsics:
  - {"name": "eq", "signature": "u eq v: GrpSLPElt, GrpSLPElt -> BoolElt"}
  - {"name": "ne", "signature": "u ne v: GrpSLPElt, GrpSLPElt -> BoolElt"}
---

# Operations on Elements

## Equality and Comparison

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

Returns `true` if and only if the straight-line programs $u$ and $v$ are identical. Identical here means they are identical as expression trees, not that they will always evaluate to the same word in the generators.

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

Returns `true` if and only if the straight-line programs $u$ and $v$ are not identical. Identical here means they are identical as expression trees, not that they will always evaluate to the same word in the generators.
