a lock is a part of a canal where boats can be raised and lowered