Zulip Chat Archive
Stream: mathlib4
Topic: gcongr attribute for folded relations
Rida Hamadani (Sep 19 2024 at 18:58):
Currently, it is not possible to add the @[gcongr]
attribute to lemma
s which are of the form f x ∼ f y
when the relation is folded, for example this fails:
import Mathlib
@[gcongr]
lemma f_mono {α : Type} {f : α → α} [Preorder α] : Monotone f := by
sorry
Same applies to similar Prop
s, such as Antitone
, StrictMono
, etc
I think it would be nice to be able to add this tag to such statements. What do you think?
Johan Commelin (Sep 20 2024 at 05:50):
Cc @Heather Macbeth @Mario Carneiro
Mario Carneiro (Sep 20 2024 at 05:52):
I think this is not a good idea, because the relation in question could be implication, in which case this can lead to a lot of ambiguity
Yaël Dillies (Sep 20 2024 at 08:58):
For now, I've been adding protected versions of these lemmas in the GCongr
namespace
Rida Hamadani (Sep 20 2024 at 11:06):
I wonder if if it would be a good idea to make gcongr
resolve the ambiguity for hardcoded Prop
s, the ones that we use a lot in mathlib, like Monotone
for example.
Last updated: May 02 2025 at 03:31 UTC