Two extension theorems. Modular functions on complemented lattices