---
title: "Properties of AG–Codes"
canonical: "https://docs.magma-maths.org/v2.30-1/CodingTheory/AlgebraicGeometricCodes/properties.html"
source: "https://docs.magma-maths.org/v2.30-1/CodingTheory/AlgebraicGeometricCodes/properties.md"
part: "Coding Theory"
chapter: "Algebraic-Geometric Codes"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Coding Theory", "source": "https://docs.magma-maths.org/v2.30-1/CodingTheory/index-coding-theory.md"}
  - {"title": "Algebraic-Geometric Codes", "source": "https://docs.magma-maths.org/v2.30-1/CodingTheory/AlgebraicGeometricCodes/index-algebraic-geometric-codes.md"}
prev: {"title": "Creation of an Algebraic Geometric Code", "source": "https://docs.magma-maths.org/v2.30-1/CodingTheory/AlgebraicGeometricCodes/creation.md"}
next: {"title": "Access Functions", "source": "https://docs.magma-maths.org/v2.30-1/CodingTheory/AlgebraicGeometricCodes/access.md"}
intrinsics:
  - {"name": "IsWeaklyAG", "signature": "IsWeaklyAG(C): Code -> BoolElt"}
  - {"name": "IsWeaklyAGDual", "signature": "IsWeaklyAGDual(C): Code -> BoolElt"}
  - {"name": "IsAlgebraicGeometric", "signature": "IsAlgebraicGeometric(C): Code -> BoolElt"}
  - {"name": "IsStronglyAG", "signature": "IsStronglyAG(C): Code -> BoolElt"}
---

<a id="properties-of-ag-codes"></a>
# Properties of AG–Codes

<a id="function-isweaklyag-code"></a>
## `IsWeaklyAG(C): Code -> BoolElt`

Return `true` if and only if the code $C$ is a weakly algebraic–geometric code, i.e. $C$ has been constructed as an algebraic–geometric code with respect to a divisor of any degree.

<a id="function-isweaklyagdual-code"></a>
## `IsWeaklyAGDual(C): Code -> BoolElt`

Return `true` if and only if the code $C$ was constructed as the dual of a weakly algebraic–geometric code.

<a id="function-isalgebraicgeometric-code"></a>
## `IsAlgebraicGeometric(C): Code -> BoolElt`

Return `true` if and only if the code $C$ is of algebraic–geometric construction of length $n$, built from a divisor $D$ with $deg(D) < n$.

<a id="function-isstronglyag-code"></a>
## `IsStronglyAG(C): Code -> BoolElt`

Return `true` if and only if $C$ is an algebraic–geometric code of length $n$ constructed from a divisor $D$ satisfying $2g-2 < deg(D) < n$, where $g$ is the genus of the curve.
