We introduce a general theory of quantitative and metric rewriting systems, namely systems with a rewriting relation enriched over quantales modelling abstract quantities. We develop theories of abstract and term-based systems, refining cornerstone results of rewriting theory (such as Newman's Lemma, Church-Rosser Theorem, and critical pair-like lemmas) to a metric and quantitative setting. To avoid distance trivialisation and lack of confluence issues, we introduce non-expansive, linear term rewriting systems, and then generalise the latter to the novel class of graded term rewriting systems. These systems make quantitative rewriting modal and context-sensitive, this endowing rewriting with coeffectful behaviours. We apply the theory developed to several examples coming from the fields of quantitative algebras, programming language semantics, and algorithms.
翻译:我们引入了定量和计量重写系统的一般理论,即具有经过孔形模型模拟的抽象数量而丰富了重写关系的系统;我们开发了抽象和基于术语的系统理论,将重写理论(如纽曼的Lemma、Church-Rosser Theorem和关键对等的利玛等)的基本结果精细化为衡量和定量设置。为了避免距离的微小化和缺乏汇合问题,我们引入了非探索性的线性重写系统,然后将后者概括到新型的分级重写系统类别中。这些系统使定量重写模式和背景敏感度,从而将重写理论的基础结果(如纽曼的Lemma、Church-Rosser-Rosser Theorem和关键式的双对式的利玛斯等)转化为衡量和定量设置。我们把这一理论应用于定量代数代数、编语言语义和算法领域的几个例子。