
I want you to help me carry out the formalization of a semiformal mathematical definition (see below)
from a mathematics textbook, given in LATEX format. The target system for the formalization is Naproche-ZF, 
a new interactive proof assistant for Zermelo-Fraenkel set theory.

The formalization language of Naproche-ZF is a controlled
natural language (CNL), a formally specified sublanguage of natural mathematical English
embedded into LATEX, which makes writing mathematical formulae and structuring documents
straightforward. Only the contents of certain formal LATEX-environments such as definition,
theorem, and proof are checked; everything else is informal commentary.

----------------------------------------------------------------------------------------------------

There are two types of definitions in Naproche-ZF,
which we call "iff"-definitions" and "="-definitions.

iff"-definitions are the most common type of definitions. They are used for introducing
(multiletter) predicate symbols.
On the other hand, "="-definitions are used for introducing (multiletter) function symbols.

Here are three examples for an "iff"-definition:

\begin{definition}\label{relation}
$R$ is a relation iff for all $w\in R$ there exists $x, y$ such that $w = (x, y)$.
\end{definition}

\begin{definition}\label{greatest_lower_bound}
$x$ is a greatest lower bound of $X$ iff $x$ is an lower bound of $X$ and for all $y$ such that $y$ is an lower bound of $X$ we have $x \geq y$.
\end{definition}

\begin{definition}\label{successor_ordinal}
$\alpha$ is a successor ordinal iff there exists an ordinal $\beta$ such that $\alpha = \suc{\beta}$.
\end{definition}

And here are three examples for an "="-definition:

\begin{definition}\label{converse_relation}
$\converse{R} = \{ z\mid \exists w\in R. \exists x, y. w = (x, y)\land z = (y, x)\}$.
\end{definition}

\begin{definition}\label{funs}
$\funs{A}{B} = \{ f\in\rels{A}{B}\mid \text{$A = \dom{f}$ and $f$ is right-unique}\}$.
\end{definition}

\begin{definition}\label{minus}
$n - m = n + \neg{m}$.
\end{definition}

Observe that an "="-definition cannot have any assumptions.
It is always of the form 

$term1(.., .., ..) = term2(.., .., ..)$

where in most cases term2 is a term involving the set comprehension notation like in two of the examples above.

So if you want to introduce a (multiletter) function symbol with preceding assumptions
you must try to introduce an analogous predicate symbol with the same assumptions
and then formalize the informal definition of the predicate symbol as an "iff"-definition.

For example,  if you are asked to formalize the following informal definition

\begin{definition}\label{area_of_a_rectangle}
Let $R$ be a rectangle. The area of $R$ is the product of the length and the width of $R$.
\end{definition}

you could first introduce a closely related predicate symbol "is the area of" 

\begin{definition}\label{is_the_area_of}
$r$ is the area of a recatangle $R$ iff $r$ is the product of the length and the width of $R$.
\end{definition}

and then formalize this informal definition in the form of an "iff"-definition in Naproche-ZF as follows:

\begin{definition}\label{is_the_area_of_a_rectangle}
$r$ is the area of $R$ iff $R$ is a rectangle and $r = l \rmul h$ and $l$ is the length of $R$ and $h$ is the width of $R$.
\end{definition}


----------------------------------------------------------------------------------------------------
WARNINGS:

Warning 1: Variables can only consist of single letters (enclosed in $...$) with or without an index, which must be a single digits.

   Examples: 
    - Valid variable names are, e.g., $A$, $G$, and $x_1$.
    - Invalid variable names are, e.g., $x_{R}$,  $t_{12}$, ${\mathcal A}$, and  ${\mathcal A}_{2}$.

Warning 2: More generally, every term appearing inside a formula (enclosed in $...$ or $$...$$)
           can only have indices that are integers.

           Examples: 
           - Valid: $x_1 \in A$, $f(x_{12})$,  $x \in A_{12}$ are allowed.
           - Invalid: $x_R \in A$, $f(x_{i}$ and $u \in R_{Ba}$ are not allowed.

Warning 3: The key word "let" needs to be followed by a variable name. 
           It cannot be followed by a more complicated expression, like, e.g. a pair $(x, y)$.

    Examples: 
    - Valid: "let $x$ be a set."
    - Invalid: "let $(G, \mu)$ be a group."

Warning 4: The only formulas allowed to the left of the word "iff" in an "iff"-definition are variable names. 
           Moreover, commas (i.e. ",") and the words 'and' and 'are' are not allowed in the part of the sentence to the left of "iff".


    Examples: 
    - Valid: "$x$ is a greatest lower bound of $X$ iff [...]" is allowed.
              "$x_1$ is compatible with $x_2$ iff [...]" is allowed.
    - Invalid: "$(G, \mu)$ is a group iff [...]" is not allowed.
               "$x_1$, $x_2$ are compatible iff [...]" is not allowed.
               "$x_1$ and $x_2$ are compatible iff [...]" is not allowed. 

Warning 5: Recall from what we said above assumptions are not allowed in an "="-definition.

Warning 6: LateX environments like \begin{itemize} ... \end{itemize},  \begin{enumerate} ... \end{enumerate},
\begin{align} ... \end{align}, ... are not allowed in a definition.

----------------------------------------------------------------------------------------------------
Only the following command expressions are allowed to appear in a formulas (delimited by $...$ or \begin{...}...\end{...})
within the formal definition you must produce:

\abs
\circ
\cons
\cumul
\emptyset
\fst
\funs
\in
\integers
\inter
\inters
\inv
\mapsto
\meets
\mid
\middle
\monus
\mul
\naturals
\neg
\neq
\ni
\notin
\notmeets
\pair
\pow
\rationals
\reals
\relcomp
\rfrac
\rless
\rminus
\rmul
\setminus
\snd
\subset
\subseteq
\supseteq
\times
\to
\union
\unions
\unit
\zero

Moreover, apart from the usual symbols like brackets, you can only use the following symbols within a formula in the definition:

','
'-'
'|'
'∈'
':'
'.'
'='
'&'
':='
'+'


Outside a formula, i.e. within a text section in the {env_mode} 
you can use the standard punctuation characters like '.' and ',' and all of the following multi-word expressions (but as a whole in each case):

a contradiction
all
and
are
as follows
associative
assume
assume that
assumption
be
because
binary operation
by
can
category
closed under arbitrary unions
closed under binary intersections
closed under binary unions
commuting
complement of
consider
consists of
contradiction
define
definition
denote
denotes
disjoint from
distributive lattice
do
does
either
element of
elements of
empty
equal
equal to
equals
equipped with
equivalence class of
equivalence relation
every
family of subsets of
familys of subsets of
fix
follows
for
for all
for every
function
greatest element of
greatest lower bound of
group
homomorphism of
identity element of
if
if and only if
iff
image of
in particular
in the sequel
inductively
inhabited
inverse monoid
inverse monoids
inverse of
inverse semigroup
inverse semigroups
invertible element of
is
it is not the case that
it is wrong that
it suffices to show
lattice
least element of
least upper bound of
let
magma
magmas
map
neither
no
nor
not
omitted
on
one of
onesorted structure
onesorted structures
or
partial order of
particularly
point
points
poset
regular semigroup
regular semigroups
relation
restriction of
satisfying
say that
semigroup
semigroups
set
set of
sets
since
small category
some
stand for
straightforward
subgroup of
subset of
subsets of
subsingleton
subsingletons
such that
suppose
suppose that
take
that
the
then
there exist
there exists
throughout
throughout this section
together with
trivial
unique
unit of
we have
we have that
we say that
we write
write

Warning! You cannot use just a part of one of the multi-word expressions above unless that part
itself is one of the entries in the list of word expressions.
For example, you cannot just use 'throughout this', which is a part of the expression 'throughout this section'
because 'throughout this' alone is not one of the entries in the list of word expressions.

----------------------------------------------------------------------------------------------------

Here are the existing definitions in the current project:

\begin{definition} \label{magma}  
$M$ is a magma iff there exist $M_0, m$ such that $M=(M_0, m)$ and $m \in \funs{M_0 \times M_0}{M_0}$. 
\end{definition}

\begin{definition} \label{def_semigroup}  
$S$ is a semigroup iff  $S$ is a magma and there exist  $S_0, m$ such that $S = (S_0, m)$  and  $m$ is associative.
\end{definition}

\begin{definition} \label{def_regular_semigroup} 
$S$ is a regular semigroup iff there exist $S_0, m, i$ such that  $S=  (S_0, m, i)$  and  $(S_0, m)$ is a semigroup and $i \in \funs{S_0}{S_0}$ and for all $s \in S_0$
we have
$s = m(m(s, i(s)), s)$ and $i(s) = m(i(s), m(s, i(s))) $.
\end{definition}

\begin{definition} \label{def_inverse_semigroup} 
$S$ is an inverse semigroup iff  $S$ is a regular semigroup and  there exist $S_0, m, i$ such that $S=(S_0, m, i)$ and for all  $s, y \in S_0$
such that  $s = m(m(s, y), s)$ and $y = m(y, m(s, y)) $ we have $i(s) = y$.
\end{definition}

\begin{definition} \label{def_inverse_monoid}
$M$ is an inverse monoid iff $M$ is a inverse semigroup and there exist $S_0, m, i, e$ such that
$M = (S_0, m, i)$ and $e \in S_0$ and for all $s \in S_0$ we have $m(e,s) = s$ and $m(s, e) = s$. 
\end{definition}



----------------------------------------------------------------------------------------------------

Now you have the information you need to start the formalization.
You will be given a definition in Latex format and you will need to formalize it in Naproche-ZF.
You will need to use the existing vocabulary and definitions to formalize the definition
and take into account the warnings above.
Here is the (semiformal) definition you need to formalize as a Naproche-ZF definition:

\begin{definition} \label{def_inverse_semigroup_with_zero}
An \emph{inverse semigroup with zero} is an inverse semigroup that has
a zero element.
\end{definition}
