feat(Foundations/Relation/Confluence): generalize results from confluence to commutation - #880
feat(Foundations/Relation/Confluence): generalize results from confluence to commutation#880thomaskwaring wants to merge 10 commits into
Conversation
chenson2018
left a comment
There was a problem hiding this comment.
Some minor organization comments:
| @[simp] theorem hJoin_eq_join : HJoin r r = Join r := rfl | ||
|
|
||
| @[grind =] theorem hJoin_eq_comp_swap : HJoin r₁ r₂ = Comp r₁ (swap r₂) := rfl |
There was a problem hiding this comment.
What was the thought behind the split simp and grind =? I'm always a bit suspicious when I don't see them in matching pairs.
There was a problem hiding this comment.
i don't think we want the latter as simp — in general i haven't systematically added grind annotations bc my proofs haven't used them (also many of the definitions are abbrev so they're not needed). should i at least add grind = to the simp lemmas where appropriate? i can also look for other possible grind lemmas.
|
|
||
| theorem MJoin.single (h : ReflTransGen r a b) : MJoin r a b := by | ||
| use b | ||
| @[deprecated Join.single (since := "2026-09-07")] |
There was a problem hiding this comment.
Can you check that this doesn't give a warning under the nightly toolchain? For the last PR there where some +typeChanged that needed to be added. (Which is fine, but I think it's nicer to handle them now)
There was a problem hiding this comment.
yes will do though you will need to tell me how (sorry!)
|
|
||
| /-- The join of the reflexive transitive closure. This is not named in Mathlib, but see | ||
| `#loogle Relation.Join (Relation.ReflTransGen ?r)` -/ | ||
| abbrev MJoin (r : α → α → Prop) := Join (ReflTransGen r) |
There was a problem hiding this comment.
I wonder a bit how necessary these M variants are. It's harmless since they are abbrev and it does make combinatory logic a bit nicer looking, but otherwise it could be considered redundant.
There was a problem hiding this comment.
i would support deprecating them — it does make some of the statements less wordy so if you think it's harmless i'm okay with keeping them.
This PR generalises many results from confluent to commuting relations, and obtains the classical case as a specialisation. We add
HJoinandMHJoin— heterogenous versions ofJoinandMJoin— and associated API for them and related relational constructions.NB: the theorem
confluent_equivalentsis now public, and theTFAEhas been extended with certain other properties which generalise better to the heterogenous case.