---
title: "Predicates on Algebras"
canonical: "https://docs.magma-maths.org/v2.30-1/Algebras/QuaternionAlgebras/predicates.html"
source: "https://docs.magma-maths.org/v2.30-1/Algebras/QuaternionAlgebras/predicates.md"
part: "Algebras"
chapter: "Quaternion Algebras"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Algebras", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/index-algebras.md"}
  - {"title": "Quaternion Algebras", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/QuaternionAlgebras/index-quaternion-algebras.md"}
prev: {"title": "Hilbert Symbols and Embeddings", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/QuaternionAlgebras/hilbert-symbols.md"}
next: {"title": "Recognition Functions", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/QuaternionAlgebras/matrix-ring-test.md"}
intrinsics:
  - {"name": "IsDefinite", "signature": "IsDefinite(A): AlgQuat -> BoolElt"}
  - {"name": "IsIndefinite", "signature": "IsIndefinite(A): AlgQuat -> BoolElt"}
---

# Predicates on Algebras

A quaternion algebra $A$ over a number field $F$ with $[F:{\mathbb{Q}}]=h$ is *definite* (or *totally definite*) if $F$ is totally real and $A \otimes_{{\mathbb{Q}}} {\mathbb{R}}\cong H^h$, where $H$ is the division ring of real Hamiltonians, otherwise $A$ is *indefinite*.

A quaternion algebra $A$ over ${\mathbb{F}}_q(X)$ is called *definite* if the place corresponding to the degree valuation is ramified.

<a id="function-isdefinite-algquat"></a>
## `IsDefinite(A): AlgQuat -> BoolElt`

<a id="function-isindefinite-algquat"></a>
## `IsIndefinite(A): AlgQuat -> BoolElt`

Given a quaternion algebra $A$ over a number field, $\Q$, or $\F_q(X)$ with $q$ odd, returns `true` if and only if $A$ is a (totally) definite or indefinite quaternion algebra, respectively.
