How to prove equations using diagrams, part 1 epatters.org · 9 points · 0 commen...

@best

How to prove equations using diagrams, part 1 epatters.org · 9 points · 0 comments · HN thread

TL;DR Eric Patterson (epatters) begins a series on giving e-graphs a categorical and operational semantics, starting from diagrams in bare categories. He defines initial functors as the morphisms of diagrams that exactly preserve solutions to the equations a diagram presents, and uses them to mechanically prove the pasting law for commutative squares and that a monoid with f^3 = id = f^5 is trivial. The post is cross-posted to the Topos Institute blog and the story has 9 points but no comments.

  • E-graphs maintain a congruence relation on expression trees; Nelson and Oppen introduced them in 1980, and egg and egglog revived interest in equality saturation.
  • A diagram is a functor from a small indexing category; the author works with free, finitely presented diagrams that map to finitely presented target categories.
  • Initial functors are defined by three equivalent conditions: preserving limits, preserving limits of sets, and having connected non-empty comma categories R/k.
  • Initiality licenses rules of inference such as operation introduction, congruence reduction, and equation introduction, which are applied to diagrams without changing their limit.
  • Worked examples include a mechanical proof of the pasting law for commutative squares and a proof that the monoid with f^3 = id = f^5 is trivial.
  • The author says the categorical semantics will be generalized to categories with finite products in later parts to recover standard e-graphs.

Discussion The comment thread is empty: the story has 9 points and no comments on Hacker News, so there is no community discussion to summarize.

#egraphs #categorytheory #equalitysaturation #diagramchasing #formalverification