Think incrementally! You only need one pump.
~~~~
1. Build the pump, with its outflow pointing at the floodgate.
2. Open the floodgate.
3. Pump the 6/7 magma.
4. Close the floodgate.
You spent the 6/7 magma and got an extra 3 into the cistern, but your pump is free.
So now the procedure is clear:
1. recursively, pump 6/7 magma into the cistern at level i.
2. use the procedure to pump 3/7 into the cistern at level i+1.
3. recursively pump 6/7 at level i.
4. procedure, now you have 6/7 at level i+1.
(base case: the magma sea)
QED.
Actually this will take many more steps, because you will need to pump again into the same cistern while it has magma in it.
1. Cistern has 6/7 spread in 2 tiles
2. Floodgate closes, Cistern has 3/7 in 1 tile
3. --time passes, magma is ready to be pumped up again
4. Floodgate has to be opened(!), Cistern has 3/7 over 2 tiles
5. Magma pumped, Cistern has 9/7 over 2 tiles
6. Floodgate closes, Cistern has 4 or 5/7 in 1 tile.
7. --time passes, magma ready for pumping
8. Floodgate opened, Cistern has 4 or 5/7 over 2 tiles.
9. Magma pumped, Cistern has 10 or 11/7 over 2 tiles.
10. Floodgate closed, Cistern has 5 or 6/7 in 1 tile.
The 6/7 only happens if none evaporates and the maximum amount is saved each time the floodgate closes. This means that instead of 2
n complexity you have at minimum 3
n and probably more like 4
n. Your dwarf would probably die of old age before completing even one forge on a standard embark.
Simply building the floodgates and mechanisms and linking them all would take more time than mining out some iron and smelting it and making more pumps. And it's already been mentioned that with 2 pumps you can transfer 7/7 relatively quickly with no losses.