@@ -8,6 +8,7 @@ import Mathlib.Algebra.Module.Defs
8
8
import Mathlib.Algebra.Order.Archimedean
9
9
import Mathlib.Algebra.Order.Group.Instances
10
10
import Mathlib.GroupTheory.GroupAction.Pi
11
+ import Mathlib.Logic.Function.Iterate
11
12
12
13
/-!
13
14
# Maps (semi)conjugating a shift to a shift
@@ -48,7 +49,7 @@ Note that `a` and `b` are `outParam`s,
48
49
so one should not add instances like
49
50
`[AddConstMapClass F G H a b] : AddConstMapClass F G H (-a) (-b)`. -/
50
51
class AddConstMapClass (F : Type *) (G H : outParam Type *) [Add G] [Add H]
51
- (a : outParam G) (b : outParam H) extends DFunLike F G fun _ ↦ H where
52
+ (a : outParam G) (b : outParam H) [FunLike F G H] : Prop where
52
53
/-- A map of `AddConstMapClass` class semiconjugates shift by `a` to the shift by `b`:
53
54
`∀ x, f (x + a) = f x + b`. -/
54
55
map_add_const (f : F) (x : G) : f (x + a) = f x + b
@@ -63,7 +64,7 @@ In this section we prove properties like `f (x + n • a) = f x + n • b`.
63
64
64
65
attribute [simp] map_add_const
65
66
66
- variable {F G H : Type *} {a : G} {b : H}
67
+ variable {F G H : Type *} [FunLike F G H] {a : G} {b : H}
67
68
68
69
protected theorem semiconj [Add G] [Add H] [AddConstMapClass F G H a b] (f : F) :
69
70
Semiconj f (· + a) (· + b) :=
@@ -227,7 +228,7 @@ theorem map_int_add [AddCommGroupWithOne G] [AddGroupWithOne H] [AddConstMapClas
227
228
(f : F) (n : ℤ) (x : G) : f (↑n + x) = f x + n := by simp
228
229
229
230
theorem map_fract {R : Type *} [LinearOrderedRing R] [FloorRing R] [AddGroup H]
230
- [AddConstMapClass F R H 1 b] (f : F) (x : R) :
231
+ [FunLike F R H] [ AddConstMapClass F R H 1 b] (f : F) (x : R) :
231
232
f (Int.fract x) = f x - ⌊x⌋ • b :=
232
233
map_sub_int' ..
233
234
@@ -309,13 +310,16 @@ variable {G H : Type*} [Add G] [Add H] {a : G} {b : H}
309
310
### Coercion to function
310
311
-/
311
312
312
- instance : AddConstMapClass (G →+c[a, b] H) G H a b where
313
+ instance : FunLike (G →+c[a, b] H) G H where
313
314
coe := AddConstMap.toFun
314
315
coe_injective' | ⟨_, _⟩, ⟨_, _⟩, rfl => rfl
315
- map_add_const f := f.map_add_const'
316
316
317
317
@[simp] theorem coe_mk (f : G → H) (hf) : ⇑(mk f hf : G →+c[a, b] H) = f := rfl
318
318
@[simp] theorem mk_coe (f : G →+c[a, b] H) : mk f f.2 = f := rfl
319
+ @[simp] theorem toFun_eq_coe (f : G →+c[a, b] H) : f.toFun = f := rfl
320
+
321
+ instance : AddConstMapClass (G →+c[a, b] H) G H a b where
322
+ map_add_const f := f.map_add_const'
319
323
320
324
@[ext] protected theorem ext {f g : G →+c[a, b] H} (h : ∀ x, f x = g x) : f = g :=
321
325
DFunLike.ext _ _ h
@@ -369,24 +373,24 @@ instance {K : Type*} [AddMonoid K] [AddAction K H] [VAddAssocClass K H H] :
369
373
### Monoid structure on endomorphisms `G →+c[a, a] G`
370
374
-/
371
375
372
- instance : Monoid (G →+c[a, a] G) where
373
- mul := comp
374
- one := .id
375
- mul_assoc _ _ _ := rfl
376
- one_mul := id_comp
377
- mul_one := comp_id
376
+ instance : Mul (G →+c[a, a] G) := ⟨comp⟩
377
+ instance : One (G →+c[a, a] G) := ⟨.id⟩
378
+
379
+ instance : Pow (G →+c[a, a] G) ℕ where
380
+ pow f n := ⟨f^[n], Commute.iterate_left (AddConstMapClass.semiconj f) _⟩
381
+
382
+ instance : Monoid (G →+c[a, a] G) :=
383
+ DFunLike.coe_injective.monoid (M₂ := Function.End G) _ rfl (fun _ _ ↦ rfl) fun _ _ ↦ rfl
378
384
379
385
theorem mul_def (f g : G →+c[a, a] G) : f * g = f.comp g := rfl
380
386
@[simp] theorem coe_mul (f g : G →+c[a, a] G) : ⇑(f * g) = f ∘ g := rfl
381
387
382
388
theorem one_def : (1 : G →+c[a, a] G) = .id := rfl
383
389
@[simp] theorem coe_one : ⇑(1 : G →+c[a, a] G) = id := rfl
384
390
385
- theorem coe_pow (f : G →+c[a, a] G) (n : ℕ) : ⇑(f ^ n) = f^[n] :=
386
- hom_coe_pow _ rfl (fun _ _ ↦ rfl) _ _
391
+ @[simp] theorem coe_pow (f : G →+c[a, a] G) (n : ℕ) : ⇑(f ^ n) = f^[n] := rfl
387
392
388
- theorem pow_apply (f : G →+c[a, a] G) (n : ℕ) (x : G) : (f ^ n) x = f^[n] x :=
389
- congr_fun (coe_pow f n) x
393
+ theorem pow_apply (f : G →+c[a, a] G) (n : ℕ) (x : G) : (f ^ n) x = f^[n] x := rfl
390
394
391
395
end Add
392
396
0 commit comments