Question: are 20v max batteries interchangeable?
Answer: In the same way that 18V and 20V max are exactly the same, 36V and 40V max are the same, *** electrically ***. So if you can make them fit and get the electrical connections between the batteries and the tool made, yes the tool and battery will work just fine.