In logic, the definition of initial segments is the following:
Let $\sigma$ and $\tau$ be strings. Then $\tau$ is an initial segment of $\sigma$ if $lh(\tau) \leq lh(\sigma)$ and for some $i < lh(\tau)$, $\tau_{i} = \sigma _{i}$. (where $lh$ is length of the string)
My professor did not define terminal segments (and he did not hint what a terminal segment might be) and I cannot find the definition anywhere (or I find definitions in different lingo so I am unsure if it is the right definition). If you know the definition of terminal segments in logic, I really appreciate you help me!
"Final segment" is basically the dual of "initial segment" - a final segment of a string $\sigma$ is a string that $\sigma$ "ends with," in the same way that an initial segment of a string $\sigma$ is a string that $\sigma$ "begins with."
Formally, $\tau$ is a final segment of $\sigma$ if there is some string $\hat{\tau}$ such that $\hat{\tau}{}^\smallfrown\tau=\sigma$ (where "$^\smallfrown$" denotes concatenation of strings).
For example, taking $\sigma=\langle 1,2,3,4,5\rangle$:
The initial segments of $\sigma$ are:
$\langle 1,2,3,4,5\rangle$
$\langle 1,2,3,4\rangle$
$\langle 1,2,3\rangle$
$\langle 1,2\rangle$
$\langle 1\rangle$
$\langle\rangle$ (this is sometimes denoted "$\Lambda$").
The final segments of $\sigma$ are:
$\langle 1,2,3,4,5\rangle$
$\langle 2,3,4,5\rangle$
$\langle 3,4,5\rangle$
$\langle 4,5\rangle$
$\langle 5\rangle$
$\langle\rangle$