And all of this works just as well in any number of dimensions, of course. Consider ANY equivalence relation whatsoever on x coordinates, and ANY separate equivalence relation whatsoever on y coordinates, and ANY separate equivalence relation whatsoever on z coordinates, etc. If each small block (in some block decomposition of a big block) runs between equivalent coordinates along at least one axial direction, then so does the big one.
Incidentally, instead of enumerating all the different types of points like “T-junction”, etc., perhaps the simpler way to have framed the argument would have been to consider only regular grids of blocks first; then there’s only very straightforward kinds of points. Specifically, around each point, there are then 2^n many blocks treating it with alternating sign in their g calculation, where the specific dimension n corresponds to whether it’s on an outside corner (n = 0), on an outside edge (n = 1), outside face (n = 2), etc. In all cases other than being an outside corner, the point ends up cancelling out in the sum g of over all blocks in the grid, so that this is just the same as the sum of f over the outermost corners (i.e., the sum of g over all the small blocks equals g for the overall big block they comprise).
Then, to handle non-regular-grid decompositions of a big block into small blocks, we note that such decompositions can always be embedded in regular grids, as though various cells of such grid happened to have been fused together, and this will make no difference to anything because, again, the calculation of g over each fused block is just the same as the sum of g over the individual grid cells making it up. So even with non-regular-grids, we maintain the result that the sum of g over individual blocks equals g for the overall big block they comprise.
All of this could actually still be framed in terms of sine integrals and/or specifically derived from our result on integer-sided rectangles, but, that would be bizarre and backwards and obfuscating.
Ok, I’m done rambling for now. [I know, I know, I serial-reply to myself. Whatever, the edit window is too short. Just think of the end result as one very long post; disorganized, but with some good stuff in there.]