From 7f25b156d2e33ec767732175f7030cd103e9b695 Mon Sep 17 00:00:00 2001 From: Georges Gonthier Date: Mon, 18 Mar 2019 12:49:18 +0100 Subject: remove dependency on hidden case branch types Anticipating coq/coq#9170, remove numeric occurrence selector affected by the (invisible) presence of explicit types for variables bound in `match` branch patterns. The proof could be further simplified if this change is implemented. --- mathcomp/ssreflect/fintype.v | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'mathcomp') diff --git a/mathcomp/ssreflect/fintype.v b/mathcomp/ssreflect/fintype.v index 2544ab6..93810ca 100644 --- a/mathcomp/ssreflect/fintype.v +++ b/mathcomp/ssreflect/fintype.v @@ -1950,8 +1950,12 @@ Variant split_spec m n (i : 'I_(m + n)) : 'I_m + 'I_n -> bool -> Type := Lemma splitP m n (i : 'I_(m + n)) : split_spec i (split i) (i < m). Proof. -rewrite /split {-3}/leq. -by case: (@ltnP i m) => cmp_i_m //=; constructor; rewrite ?subnKC. +(* We need to prevent the case on ltnP from rewriting the hidden constructor *) +(* argument types of the match branches exposed by unfolding split. If the *) +(* match representation is changed to omit these then this proof could reduce *) +(* to by rewrite /split; case: ltnP; [left | right. rewrite subnKC]. *) +set lt_i_m := i < m; rewrite /split. +by case: {-}_ lt_i_m / ltnP; [left | right; rewrite subnKC]. Qed. Definition unsplit {m n} (jk : 'I_m + 'I_n) := -- cgit v1.2.3