diff options
| -rw-r--r-- | doc/changelog/06-ssreflect/11136-inj_compr.rst | 2 | ||||
| -rw-r--r-- | plugins/ssr/ssrfun.v | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/doc/changelog/06-ssreflect/11136-inj_compr.rst b/doc/changelog/06-ssreflect/11136-inj_compr.rst new file mode 100644 index 0000000000..b546fcde6b --- /dev/null +++ b/doc/changelog/06-ssreflect/11136-inj_compr.rst @@ -0,0 +1,2 @@ +- Added lemma :g:`inj_compr` to :g:`ssr.ssrfun` + (`#11136 <https://github.com/coq/coq/pull/11136>`_, by Cyril Cohen). diff --git a/plugins/ssr/ssrfun.v b/plugins/ssr/ssrfun.v index b8affba541..dd847169b9 100644 --- a/plugins/ssr/ssrfun.v +++ b/plugins/ssr/ssrfun.v @@ -675,6 +675,9 @@ Proof. by move=> fK injf' x; apply: injf'. Qed. Lemma inj_comp : injective f -> injective h -> injective (f \o h). Proof. by move=> injf injh x y /injf; apply: injh. Qed. +Lemma inj_compr : injective (f \o h) -> injective h. +Proof. by move=> injfh x y /(congr1 f) /injfh. Qed. + Lemma can_comp f' h' : cancel f f' -> cancel h h' -> cancel (f \o h) (h' \o f'). Proof. by move=> fK hK x; rewrite /= fK hK. Qed. |
