From def9eeebf2234ee6f544618616cde812bd9d0bf8 Mon Sep 17 00:00:00 2001 From: Reynald Affeldt Date: Mon, 2 Dec 2024 12:05:46 +0900 Subject: [PATCH] fixes #113 --- CHANGELOG.md | 11 ++++++++++- CHANGELOG_UNRELEASED.md | 6 +++--- finmap.v | 15 +++++++++------ multiset.v | 2 +- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30b09c1..86e9388 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ # Changelog -Last release: [[1.5.2] - 2022-07-06](#152---2022-07-06) +Last release: [[2.1.0] - 2024-01-17](#210---2024-01-17) + +## [2.1.0] - 2024-01-17 + +no documentation + +## [2.0.0] - 2023-05-23 + +- in `finmap.v`: + + lemmas `bigfcup_imfset1`, `fbig_pred1_inj` ## [1.5.2] - 2022-07-06 diff --git a/CHANGELOG_UNRELEASED.md b/CHANGELOG_UNRELEASED.md index f928dd8..8a3643b 100644 --- a/CHANGELOG_UNRELEASED.md +++ b/CHANGELOG_UNRELEASED.md @@ -4,11 +4,11 @@ ### Added -- in `finmap.v`: - + lemmas `bigfcup_imfset`, `fbig_pred1_inj` - ### Changed +- in `finmap.v` + + lemma `partition_disjoint_bigfcup` generalized + ### Renamed ### Removed diff --git a/finmap.v b/finmap.v index 67dc590..850aaa0 100644 --- a/finmap.v +++ b/finmap.v @@ -5,7 +5,7 @@ From HB Require Import structures. Set Warnings "-notation-incompatible-format". From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq. Set Warnings "notation-incompatible-format". -From mathcomp Require Import choice path finset finfun fintype bigop. +From mathcomp Require Import choice finset finfun fintype bigop. (*****************************************************************************) (* This file provides representations for finite sets over a choiceType K, *) @@ -2607,21 +2607,24 @@ Qed. Lemma partition_disjoint_bigfcup (f : T -> R) (F : I -> {fset T}) (K : {fset I}) : - (forall i j, i != j -> [disjoint F i & F j])%fset -> + (forall i j, i \in K -> j \in K -> i != j -> [disjoint F i & F j])%fset -> \big[op/idx]_(i <- \big[fsetU/fset0]_(x <- K) (F x)) f i = \big[op/idx]_(k <- K) (\big[op/idx]_(i <- F k) f i). Proof. move=> disjF; pose P := [fset F i | i in K & F i != fset0]%fset. have trivP : trivIfset P. - apply/trivIfsetP => _ _ /imfsetP[i _ ->] /imfsetP[j _ ->] neqFij. - by apply: disjF; apply: contraNneq neqFij => ->. + apply/trivIfsetP => _ _ /imfsetP[i iK ->] /imfsetP[j jK ->] neqFij. + move: iK; rewrite !inE/= => /andP[iK Fi0]. + move: jK; rewrite !inE/= => /andP[jK Fj0]. + by apply: (disjF _ _ iK jK); apply: contraNneq neqFij => ->. have -> : (\bigcup_(i <- K) F i)%fset = fcover P. apply/esym; rewrite /P fcover_imfset big_mkcond /=; apply eq_bigr => i _. by case: ifPn => // /negPn/eqP. -rewrite big_trivIfset // /rhs big_imfset => [|i j _ /andP[jK notFj0] eqFij] /=. +rewrite big_trivIfset // /rhs big_imfset => [|i j iK /andP[jK notFj0] eqFij] /=. rewrite big_filter big_mkcond; apply eq_bigr => i _. by case: ifPn => // /negPn /eqP ->; rewrite big_seq_fset0. -by apply: contraNeq (disjF _ _) _; rewrite -fsetI_eq0 eqFij fsetIid. +move: iK; rewrite !inE/= => /andP[iK Fi0]. +by apply: contraNeq (disjF _ _ iK jK) _; rewrite -fsetI_eq0 eqFij fsetIid. Qed. End FsetBigOps. diff --git a/multiset.v b/multiset.v index a665284..4107eb0 100644 --- a/multiset.v +++ b/multiset.v @@ -7,7 +7,7 @@ Set Warnings "-notation-incompatible-format". From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq. Set Warnings "notation-incompatible-format". -From mathcomp Require Import choice path finset finfun fintype bigop tuple. +From mathcomp Require Import choice finset finfun fintype bigop tuple. Require Import finmap. (*****************************************************************************)