# isShortExactSequence(Matrix,Matrix) -- whether a pair of matrices forms a short exact sequence

## Synopsis

• Function: isShortExactSequence
• Usage:
isShortExactSequence(g, f)
• Inputs:
• f, ,
• g, ,
• Outputs:
• , that is true if these form a short exact sequence

## Description

A short exact sequence of modules $0 \to L \xrightarrow{f} M \xrightarrow{g} N \to 0$ consists of two homomorphisms of modules $f \colon L \to M$ and $g \colon M \to N$ such that $g f = 0$, $\operatorname{image} f = \operatorname{ker} g$, $\operatorname{ker} f = 0$, and $\operatorname{coker} g = 0$.

From a homomorphism $h \colon M \to N$, one obtains a short exact sequence $0 \to \operatorname{image} h \to N \to \operatorname{coker} h \to 0.$

 i1 : R = ZZ/101[a,b,c]; i2 : h = random(R^3, R^{4:-1}) o2 = | 24a-36b-30c -22a-29b-24c -47a-39b-18c 2a+16b+22c | | -29a+19b+19c -38a-16b+39c -13a-43b-15c 45a-34b-48c | | -10a-29b-8c 21a+34b+19c -28a-47b+38c -47a+47b+19c | 3 4 o2 : Matrix R <--- R i3 : f = inducedMap(target h, image h) o3 = | 24a-36b-30c -22a-29b-24c -47a-39b-18c 2a+16b+22c | | -29a+19b+19c -38a-16b+39c -13a-43b-15c 45a-34b-48c | | -10a-29b-8c 21a+34b+19c -28a-47b+38c -47a+47b+19c | o3 : Matrix i4 : g = inducedMap(cokernel h, target h) o4 = | 1 0 0 | | 0 1 0 | | 0 0 1 | o4 : Matrix i5 : assert isShortExactSequence(g,f)

Ideal quotients also give rise to short exact sequences.

 i6 : I = ideal(a^3, b^3, c^3) 3 3 3 o6 = ideal (a , b , c ) o6 : Ideal of R i7 : J = I + ideal(a*b*c) 3 3 3 o7 = ideal (a , b , c , a*b*c) o7 : Ideal of R i8 : K = I : ideal(a*b*c) 2 2 2 o8 = ideal (c , b , a ) o8 : Ideal of R i9 : g = map(comodule J, comodule I, 1) o9 = | 1 | o9 : Matrix i10 : f = map(comodule I, (comodule K) ** R^{-3}, {{a*b*c}}) o10 = | abc | o10 : Matrix i11 : assert isShortExactSequence(g,f)