---
title: "Properties of Codes"
canonical: "https://docs.magma-maths.org/v2.30-1/CodingTheory/AdditiveCodes/Boolean.html"
source: "https://docs.magma-maths.org/v2.30-1/CodingTheory/AdditiveCodes/Boolean.md"
part: "Coding Theory"
chapter: "Additive 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": "Additive Codes", "source": "https://docs.magma-maths.org/v2.30-1/CodingTheory/AdditiveCodes/index-additive-codes.md"}
prev: {"title": "Subcodes", "source": "https://docs.magma-maths.org/v2.30-1/CodingTheory/AdditiveCodes/subcode.md"}
next: {"title": "The Weight Distribution", "source": "https://docs.magma-maths.org/v2.30-1/CodingTheory/AdditiveCodes/structural.md"}
intrinsics:
  - {"name": "IsSelfDual", "signature": "IsSelfDual(C): Code -> BoolElt"}
  - {"name": "IsSelfOrthogonal", "signature": "IsSelfOrthogonal(C): Code -> BoolElt"}
  - {"name": "IsPerfect", "signature": "IsPerfect(C): Code -> BoolElt"}
  - {"name": "IsProjective", "signature": "IsProjective(C): Code -> BoolElt"}
  - {"name": "IsAdditiveProjective", "signature": "IsAdditiveProjective(C): CodeAdd -> BoolElt"}
---

# Properties of Codes

For the following operators, $C$ and $D$ are codes defined as a subset (or subspace) of the vector space $V$.

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

Return `true` if and only if the linear code $C$ is self-dual (or self-orthogonal) (i.e. $C$ equals the dual of $C$).

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

Return `true` if and only if the linear code $C$ is self-orthogonal (i.e. $C$ is contained in the dual of $C$).

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

Return `true` if and only if the linear code $C$ is perfect; that is, if and only if the cardinality of $C$ is equal to the size of the sphere packing bound of $C$.

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

Returns `true` if and only if the (non-quantum) code $C$ is projective over its alphabet.

<a id="function-isadditiveprojective-codeadd"></a>
## `IsAdditiveProjective(C): CodeAdd -> BoolElt`

Returns `true` if and only if the additive code $C$ is projective over its coefficient field. It is possible that some of the columns may not be independent with respect to the alphabet of the code.
