Repository navigation
[Merged by Bors] - chore(Order/Defs/Unbundled): deprecate def Irreflexive in favor of class Std.Irrefl - #35191
SnirBroshi wants to merge 3 commits into
Conversation
…`class Std.Irrefl`
PR summary fe7639f2f6Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
| Adj : V → V → Prop | ||
| symm : Symmetric Adj := by aesop_graph | ||
| loopless : Irreflexive Adj := by aesop_graph | ||
| loopless : Std.Irrefl Adj := by aesop_graph |
There was a problem hiding this comment.
It is somewhat annoying that the change makes us have to construct/destruct Std.Irrefl the whole time. An alternative is to add a field
loopless : ∀ x, ¬ Adj x xand then define SimpleGraph.irrefl to return Std.Irrefl. But that would be more annoying in practice, especially if we add a few more lemmas involving Std.Irrefl. So I think the current approach is the right way to go.
There was a problem hiding this comment.
It is annoying, but my hope is that we'll someday convert it to [Std.Irrefl Adj] and let the typeclass system handle the proof if it can, which is why I preferred changing the field. So to construct a graph we only have to specify an Adj relation, and we can prove it is a simple graph using instances.
…`class Std.Irrefl` (#35191)
|
Pull request successfully merged into master. Build succeeded: |
def Irreflexive in favor of class Std.Irrefldef Irreflexive in favor of class Std.Irrefl
Mathlib's
def IrreflexiveCore's
class Std.IrreflZulip