aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyril Cohen2020-10-30 19:42:56 +0100
committerCyril Cohen2020-11-03 15:14:29 +0100
commitaad2327376b2f76950be51a6bf22b32b0a01b2eb (patch)
tree1433612cdaae78d59a634d4d9ccf8e9c96dea4ec
parentf980c1a579988325efcc5071a8067380a870e403 (diff)
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 86c920b..db1c642 100644
--- a/CHANGELOG_UNRELEASED.md
+++ b/CHANGELOG_UNRELEASED.md
@@ -319,6 +319,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.