We consider an assemble-to-order M-system with multiple components, multiple products, batch ordering of components, random lead times, and lost sales. We model the system as an infinite-horizon Markov decision process and seek an optimal control policy: a control policy specifies when a batch of components should be produced, and whether an arriving demand for each product should be satisfied.We introduce new functional characterizations for submodularity and supermodularity restricted to certain subspaces. These enable us to characterize optimal inventory replenishment and allocation policies under a mild condition on component batch sizes via a new type of policy: lattice-dependent base-stock production and lattice-dependent rationing.