  An algebra $\A$ is said to be an independence algebra if it is a matroid
algebra and every map $\al:X\to A$, defined on a basis $X$ of $\A$, can be
extended to an endomorphism of $\A$. These algebras are particularly well
behaved generalizations of vector spaces, and hence they naturally appear in
several branches of mathematics such as model theory, group theory, and
semigroup theory.
  It is well known that matroid algebras have a well defined notion of
dimension. Let $\A$ be any independence algebra of finite dimension $n$, with
at least two elements. Denote by $\End(\A)$ the monoid of endomorphisms of
$\A$. We prove that a largest subsemilattice of $\End(\A)$ has either $2^{n-1}$
elements (if the clone of $\A$ does not contain any constant operations) or
$2^n$ elements (if the clone of $\A$ contains constant operations). As
corollaries, we obtain formulas for the size of the largest subsemilattices of:
some variants of the monoid of linear operators of a finite-dimensional vector
space, the monoid of full transformations on a finite set $X$, the monoid of
partial transformations on $X$, the monoid of endomorphisms of a free $G$-set
with a finite set of free generators, among others.
  The paper ends with a relatively large number of problems that might attract
attention of experts in linear algebra, ring theory, extremal combinatorics,
group theory, semigroup theory, universal algebraic geometry, and universal
algebra.
