# Residues

Let $\Gamma(X,\sim,t,I)$ be an incidence geometry and let $F$ be a flag of $\Gamma$ (i.e. a clique of the incidence graph of $\Gamma$).

We say that an element $x \in F$ is incident to the flag $F$ if and only if $x$ is incident to all elements in $F$, and we denote it $x \sim F$.

The *residue* $\Gamma_F$ of the flag $F$ in $\Gamma$ is the geometry whose set of elements is $\lbrace x\in X : x \sim F \rbrace \backslash F$ and whose set of types is $I\backslash t(F)$, together with the restricted type function and incidence relation.

Let $\Gamma(G;(G_i)_{i\in I})$ be a coset geometry and assume that $G$ acts flag–transitively on $\Gamma$. Let $F$ be a flag of $\Gamma$. The *residue* of $F$ is the coset geometry $\Gamma_F = \Gamma( \cap_{j\in F} G_j; (G_i\cap (\cap_{j\in F}G_j))_{i \in I\backslash t(F)})$.

## `Residue(D, f): IncGeom, Set -> IncGeom`

Given an incidence geometry $D$ and a flag $f$ of $D$, return the residue of the flag $f$ as an incidence geometry.

## `Residue(C, f): CosetGeom, Set -> CosetGeom`

Given a coset geometry $C$ and a subset $f$ of the set of types of $C$, return the residue of the flag consisting in the maximal parabolics of $C$ whose type is in $f$.
