> This note has been taken from `2Y/articles/geotrait/mathematical_notes.md`

!!! note "'note' admonition"

In Landscape Ecology, it is of particular interest to study the geographical position of the lineage through time. This is because richness patterns are thought to arise through allopatric speciation, where populations get separated in space and time. This is the topic of the following section.

## Julia accessors

An agents of type `Agent{Ancestors{true}}` stores the values of its ancestors traits. From it, one can thus study the history of the lineage.

In Landscape Ecology, it is of particular interest to study the geographical position of the lineage through time. This is because richness patterns are thought to arise through allopatric speciation, where populations get separated in space and time. This is the topic of the following section.

## Projection of the geographic history

Consider a set of individuals which lineage geographical history has been stored in a vector $`x^{(i)}(t)`$. If individual $`i`$ was born at time $`t^*`$ then $`x^{(i)}(t>t^*)`$ represents its geographical position, while $`x^{(i)}(t<t^*)`$ represents its ancestors geographical position.

Consider a set of individuals which lineage geographical history has been stored in a vector ``x^{(i)}(t)``. If individual ``i`` was born at time ``t^*`` then ``x^{(i)}(t>t^*)`` represents its geographical position, while ``x^{(i)}(t<t^*)`` represents its ancestors geographical position.

### Isolation in time

We want to account for the isolation in time and possibly in space of the lineage of a given individual. That is, for how long and how distant stay lineages appart?

#### Setting

Consider a discrete setting, where $`N(t)`$ individuals (or populations) evolve over a set of $`M`$ demes disposed in a linear fashion, such that $`x^i(t) \in \{1,2,...,M\}`$. The population is characterised by the counting measure

Consider a discrete setting, where ``N(t)`` individuals (or populations) evolve over a set of ``M`` demes disposed in a linear fashion, such that ``x^i(t) \in \{1,2,...,M\}``. The population is characterised by the counting measure

```math

\nu = \sum_i^{N(t)} \delta_{x^i(t)}

```

We define the geographical history hamming distance $`\mathfrak{g}`$ as

We define the geographical history hamming distance ``\mathfrak{g}`` as

Equality should arises if $`x^{(i)}, x^{(j)}`$ are positively linearly dependent (which should not be the case).

Equality should arises if ``x^{(i)}, x^{(j)}`` are positively linearly dependent (which should not be the case).

However, what we are eventually interested is a population measure. This measure should be related to the average pairwise distance across the population. Hence we define $`\mathcal{D_d}(\nu,t)`$ such that

However, what we are eventually interested is a population measure. This measure should be related to the average pairwise distance across the population. Hence we define ``\mathcal{D_d}(\nu,t)`` such that