Zulip Chat Archive
Stream: mathlib4
Topic: MulAction for OrderIso
Eric Paul (Mar 02 2025 at 00:54):
Is this an instance that should be added?
import Mathlib
variable {α : Type*} [LinearOrder α]
instance : MulAction (α ≃o α) α where
smul f := f
one_smul _ := rfl
mul_smul _ _ _ := rfl
I wanted to use this to talk about the orbit of an element in a linear order under order automorphisms.
Aaron Liu (Mar 02 2025 at 01:08):
You can use docs#Equiv.Perm
Eric Paul (Mar 02 2025 at 01:10):
As far as I can tell, those are not order preserving maps
Aaron Liu (Mar 02 2025 at 01:10):
I mean, to get the MulAction
instance
Aaron Liu (Mar 02 2025 at 01:11):
(I realize this might not be as good of an idea as I had thought)
Eric Wieser (Mar 02 2025 at 01:40):
I think the instance above should be an instance, we have this pattern in general
Eric Wieser (Mar 02 2025 at 01:40):
@loogle "applyMulAction"
loogle (Mar 02 2025 at 01:40):
:search: Function.End.applyMulAction, Equiv.Perm.applyMulAction, and 2 more
Eric Wieser (Mar 02 2025 at 01:41):
I don't think you need to assume a linear order though
Aaron Liu (Mar 02 2025 at 01:51):
You don't need any order at all, just LE
, since this is an instance about RelIso
Eric Paul (Mar 02 2025 at 06:18):
So it seems like this is the instance we want:
import Mathlib
variable {α : Type*} [LE α]
instance RelIso.applyMulAction : MulAction ((· ≤ (· : α)) ≃r (· ≤ (· : α))) α where
smul f := f
one_smul _ := rfl
mul_smul _ _ _ := rfl
I'd be happy to make a PR for it if that seems reasonable
Daniel Weber (Mar 02 2025 at 07:07):
Perhaps more generally
import Mathlib
variable {α : Type*} {s : α → α → Prop}
instance RelIso.applyMulAction : MulAction (s ≃r s) α where
smul f := f
one_smul _ := rfl
mul_smul _ _ _ := rfl
Yaël Dillies (Mar 02 2025 at 17:21):
This is in a PR of mine
Yaël Dillies (Mar 02 2025 at 17:22):
Yaël Dillies (Mar 02 2025 at 18:53):
cc @Eric Paul to avoid you duplicating work :smile:
Eric Paul (Mar 02 2025 at 18:59):
Awesome, that looks like just what I need!
Last updated: May 02 2025 at 03:31 UTC