That works by doing:

return [
    'assertion_map' => [
        'post.delete' => 'postDeleteAssertion'
        }
    ],
    'assertions' => [
        'invokables' => [
            'postDeleteAssertion' => function(IdentityInterface $identity, Post $post) {
                return $identity === $post->getAuthor();
            }
        ]
    ]
];