The stable rank of pullbacks