diff --git a/src/algebra/module/linear_map.lean b/src/algebra/module/linear_map.lean index df4e0671b5d03..650ad152e05a6 100644 --- a/src/algebra/module/linear_map.lean +++ b/src/algebra/module/linear_map.lean @@ -217,6 +217,12 @@ def comp : M →ₗ[R] M₃ := ⟨f ∘ g, by simp, by simp⟩ @[norm_cast] lemma comp_coe : (f : M₂ → M₃) ∘ (g : M → M₂) = f.comp g := rfl +@[simp] theorem comp_id : f.comp id = f := +linear_map.ext $ λ x, rfl + +@[simp] theorem id_comp : id.comp f = f := +linear_map.ext $ λ x, rfl + end /-- If a function `g` is a left and right inverse of a linear map `f`, then `g` is linear itself. -/ diff --git a/src/linear_algebra/basic.lean b/src/linear_algebra/basic.lean index 60006b12a9635..845d64571173c 100644 --- a/src/linear_algebra/basic.lean +++ b/src/linear_algebra/basic.lean @@ -106,12 +106,6 @@ variables [semimodule R M] [semimodule R M₂] [semimodule R M₃] [semimodule R variables (f g : M →ₗ[R] M₂) include R -@[simp] theorem comp_id : f.comp id = f := -linear_map.ext $ λ x, rfl - -@[simp] theorem id_comp : id.comp f = f := -linear_map.ext $ λ x, rfl - theorem comp_assoc (g : M₂ →ₗ[R] M₃) (h : M₃ →ₗ[R] M₄) : (h.comp g).comp f = h.comp (g.comp f) := rfl @@ -250,6 +244,32 @@ end lemma coe_pow (f : M →ₗ[R] M) (n : ℕ) : ⇑(f^n) = (f^[n]) := by { ext m, apply pow_apply, } +section +variables {f' : M →ₗ[R] M} + +lemma iterate_succ (n : ℕ) : (f' ^ (n + 1)) = comp (f' ^ n) f' := +by rw [pow_succ', mul_eq_comp] + +lemma iterate_surjective (h : surjective f') : ∀ n : ℕ, surjective ⇑(f' ^ n) +| 0 := surjective_id +| (n + 1) := by { rw [iterate_succ], exact surjective.comp (iterate_surjective n) h, } + +lemma iterate_injective (h : injective f') : ∀ n : ℕ, injective ⇑(f' ^ n) +| 0 := injective_id +| (n + 1) := by { rw [iterate_succ], exact injective.comp (iterate_injective n) h, } + +lemma iterate_bijective (h : bijective f') : ∀ n : ℕ, bijective ⇑(f' ^ n) +| 0 := bijective_id +| (n + 1) := by { rw [iterate_succ], exact bijective.comp (iterate_bijective n) h, } + +lemma injective_of_iterate_injective {n : ℕ} (hn : n ≠ 0) (h : injective ⇑(f' ^ n)) : + injective f' := +begin + rw [← nat.succ_pred_eq_of_pos (pos_iff_ne_zero.mpr hn), iterate_succ, ←comp_coe] at h, + exact injective.of_comp h, +end +end + section open_locale classical