Lov\'asz (1967) showed that two finite relational structures A and B are isomorphic if, and only if, the number of homomorphisms from C to A is the same as the number of homomorphisms from C to B for any finite structure C. Soon after, Pultr (1973) proved a categorical generalisation of this fact. We propose a new categorical formulation, which applies to any locally finite category with pushouts and a proper factorisation system. As special cases of this general theorem, we obtain two variants of Lov\'asz' theorem: the result by Dvo\v{r}\'ak (2010) that characterises equivalence of graphs in the k-dimensional Weisfeiler-Leman equivalence by homomorphism counts from graphs of tree-width at most k, and the result of Grohe (2020) characterising equivalence with respect to first-order logic with counting and quantifier depth k in terms of homomorphism counts from graphs of tree-depth at most k. The connection of our categorical formulation with these results is obtained by means of the game comonads of Abramsky et al. We also present a novel application to homomorphism counts in modal logic.
翻译:Lov\'asz (1967) 显示,两种有限的关系结构A和B是异形的,如果而且只有以下两种情况:从C到A的同质体数与从C到C的任何有限制结构C的同质体数相同。 不久之后,Pultr (1973) 证明了对这一事实的绝对概括性。 我们提出了一个新的绝对公式,适用于任何局部的有限类别,有推推出和适当的乘数系统。作为这一总体理论的特殊例子,我们获得了两种不同的Lov\'asz' 理论:Dvo\v{r ⁇ 'za' orem 的结果(2010年),该结果将K-situ Weisfeler-Leman等同性图的等同性从大多数 k 的树wid 图表中定性为C至 B等同性数。我们提出了一个新的绝对的公式与目前Abramsky 和 al等同性逻辑数的等同性等同性(20年) 。