aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazuhiko Sakaguchi2020-11-07 00:51:34 +0900
committerGitHub2020-11-07 00:51:34 +0900
commite1f1d3c5e778f9e427e46b9bca2e12719085a6ef (patch)
tree0c288090d2187151538e225e591bfea8c1752e97
parent26a35314966a28880888eefe62ef053f0b9f038f (diff)
parentaad2327376b2f76950be51a6bf22b32b0a01b2eb (diff)
Merge pull request #626 from CohenCyril/inj_card_bij
Generalizing inj_card_onto and inj_card_bij.
-rw-r--r--CHANGELOG_UNRELEASED.md3
-rw-r--r--mathcomp/ssreflect/fintype.v4
2 files changed, 6 insertions, 1 deletions
diff --git a/CHANGELOG_UNRELEASED.md b/CHANGELOG_UNRELEASED.md
index 81f1d27..57e5e28 100644
--- a/CHANGELOG_UNRELEASED.md
+++ b/CHANGELOG_UNRELEASED.md
@@ -321,6 +321,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
+ `>=< y` stands for `[pred x | x >=< y]`
- in `ssrint.v`, generalized `mulpz` for any `ringType`.
+- In `fintype.v`, lemmas `inj_card_onto` and `inj_card_bij` take a
+ weaker hypothesis (i.e. `#|T| >= #|T'|` instead of `#|T| = #|T'|`
+ thanks to `leq_card` under injectivity assumption).
### Renamed
diff --git a/mathcomp/ssreflect/fintype.v b/mathcomp/ssreflect/fintype.v
index 422d760..91d5c80 100644
--- a/mathcomp/ssreflect/fintype.v
+++ b/mathcomp/ssreflect/fintype.v
@@ -1300,7 +1300,9 @@ Qed.
Lemma leq_card : #|T| <= #|T'|. Proof. exact: (leq_card_in (in2W _)). Qed.
-Hypothesis card_range : #|T| = #|T'|.
+Hypothesis card_range : #|T| >= #|T'|.
+
+Let eq_card : #|T| = #|T'|. Proof. by apply/eqP; rewrite eqn_leq leq_card. Qed.
Lemma inj_card_onto y : y \in codom f.
Proof. by move: y; apply/subset_cardP; rewrite ?card_codom ?subset_predT. Qed.