---
title: "Accessing Functions"
canonical: "https://docs.magma-maths.org/v2.30-1/SetsSequencesMappings/Coproducts/access.html"
source: "https://docs.magma-maths.org/v2.30-1/SetsSequencesMappings/Coproducts/access.md"
part: "Sets, Sequences, and Mappings"
chapter: "Coproducts"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Sets, Sequences, and Mappings", "source": "https://docs.magma-maths.org/v2.30-1/SetsSequencesMappings/index-sets-sequences-mappings.md"}
  - {"title": "Coproducts", "source": "https://docs.magma-maths.org/v2.30-1/SetsSequencesMappings/Coproducts/index-coproducts.md"}
prev: {"title": "Creation Functions", "source": "https://docs.magma-maths.org/v2.30-1/SetsSequencesMappings/Coproducts/creation.md"}
next: {"title": "Retrieve", "source": "https://docs.magma-maths.org/v2.30-1/SetsSequencesMappings/Coproducts/retrieve.md"}
intrinsics:
  - {"name": "Injections", "signature": "Injections(C): Cop -> [ Map ]"}
  - {"name": "#", "signature": "# C: Cop -> RngIntElt"}
  - {"name": "Constituent", "signature": "Constituent(C, i): Cop, RngIntElt -> Str"}
  - {"name": "Index", "signature": "Index(x): CopElt -> RngIntElt"}
---

# Accessing Functions

<a id="function-injections-cop"></a>
## `Injections(C): Cop -> [ Map ]`

Given a coproduct $C$, return the sequence of injection maps returned as the second argument from the `cop<>` constructor.

<a id="operation-operation-cop-rngintelt"></a>
## `# C: Cop -> RngIntElt`

Given a coproduct $C$, return the length (number of constituents) of $C$.

<a id="function-constituent-cop-rngintelt"></a>
## `Constituent(C, i): Cop, RngIntElt -> Str`

Given a coproduct $C$ and an integer $i$ between 1 and the length of $C$, return the $i$-th constituent of $C$.

<a id="function-index-copelt"></a>
## `Index(x): CopElt -> RngIntElt`

Given an element $x$ from a coproduct $C$, return the constituent number of $C$ to which $x$ belongs.
