Skip to Content.
Sympa Menu

ssreflect - Re: [ssreflect] Expected behavior of partition

Subject: Ssreflect Users Discussion List

List archive

Re: [ssreflect] Expected behavior of partition


Chronological Thread 
  • From: BEGAY Pierre-leo <>
  • To:
  • Subject: Re: [ssreflect] Expected behavior of partition
  • Date: Mon, 16 Dec 2019 17:55:47 +0100
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=Pass
  • Ironport-phdr: 9a23:zThe5hfJrIIGKY9sljGTPBLYlGMj4u6mDksu8pMizoh2WeGdxcu/Yh7h7PlgxGXEQZ/co6odzbaP6Oa6ATFLsMrJmUtBWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYdFRrlKAV6OPn+FJLMgMSrzeCy/IDYbxlViDanbr5+MRu7oR/PusUKgYZuJaI8xxTUqXZUZupawn9lK0iOlBjm/Mew+5Bj8yVUu/0/8sNLTLv3caclQ7FGFToqK2866tHluhnFVguP+2ATUn4KnRpSAgjK9w/1U5HsuSbnrOV92S2aPcrrTbAoXDmp8qlmRAP0hCoBKjU09nzchM5tg6JBuB+vpwJxzZPaYI6XOvVxYqzScs4VS2daQsZcVDBNDp+gY4YVDecMO/tToYnnp1sJqBuzHRShCuzuxDJUhHD9wLc00+U/HgHcxgwvAcsCsHDKo9XyKawfVvi1w7LWwjXMdfxX2Szw55bOchA6uP2DQah/ftbRyUY1EQPJlFuQqZb8Mj6Ty+8DsHCb4vJ9We+hiGMrsR99rzayyss2l4XEhIMYxkrE+Ch22Io4JsC0RFR7bNOqCpdcqT+WO5F4T84mRWxjpTw0xaccuZGheSgH0JQnyADba/yAa4WH+AjjVOeLLjd+mn1pZqiziAi08Ui70+HzStO730pKriVflNnArH4N1wbL5siGTPty4Fuh1C6S2w3d6exIO144mKTGJ5I737I9lJsevV7DEyL5gEn2ibWZdkQg+uim8eTnZbDmq4eEN4BvlA7+Pb4hm8ykDOsmNAgORHGX9vim27L//U32WrNKguc4kqnDqJzaP9gUpralAw9J1YYu8w2/Dyy80NsGk3kHKExKdw6bj4XyIFHPIPX4De+ljFi2kTdrwerGPrz7DZnXIHjDiuSpQbEo8FVGxQQ3wNtDz5dPEPQAJujyUwnwssbZB1k3KV+a2eHiXf9Q+aovEVqOD7WDPebWvFjAsvolLuaFdacYvi24IPEu5/foy3EjzwxONZK11IcaPSjrVs9tJF+UNCK13oUxVFwStw97d9TEzUWYWGcONXu0ROc37zo7AYTgA52RHtn80ozE5z+yG9htXk4DD1mNFXnycIDdBqUBbjnXKcZqkjUCE7a7GdZ4iEOe8TTiwr8iFdL6vy0VsZW5j4p8/ezakxxoszFyFIGW2mqNRmcykHlaHjI=

Hello Georges,

After Florent reassured me, I went back to my use case, and it now happens that the set0 \notin P condition is rather contradictory with what I have in mind. I had already proved what I needed with a slightly weaker notion of partition, and using the "classical" SSReflect definition will prove more painful than satisfactory, so I'll just stick with my former version.

Sorry for all the fuss over a silly mistake, and thanks.
Pierre-Léo

Georges Gonthier
<>
a écrit :

Hi Pierre-Léo,
You should be able to use partition and trivIset for your purposes; in particular the trivIsetP lemma says trivIset means “pairwise disjoint”.
Do note that as P : {set A}, P is by construction duplicate free. Indeed you have [set [set: A]; setT] = [set setT] - by lemma setUid.
Cheers,
Georges

Envoyé de mon iPhone

Le 16 déc. 2019 à 16:12, BEGAY Pierre-leo
<>
a écrit :

Hello everyone,

I was trying to prove straightforward lemmas using hypotheses about partition, but did not find the "no overlapping" condition (trivIset) strong enough to do so. I looked at the definition of trivIset

Definition trivIset P := \sum_(B in P) #|B| == #|cover P|.

and I think that multiple occurrences of a set in P are not captured by the sum. This can be sort of checked with the following lemma, that - as far as I understand the usual definition of a set partition - should be false:

From mathcomp
Require Import ssreflect ssrbool eqtype seq ssrfun choice fintype
finset bigop.

(* setT can be partitioned into two copies of itself *)
Lemma partitionF {A : finType} (wit : A) : partition [set [set: A]; setT] setT.
Proof.
apply/and3P;split.
(* cover *)
- rewrite eqEsubset. apply/andP;split;apply/subsetP;
move=>x Hx. apply in_setT.
apply/bigcupP. exists setT.
by apply/set2P;left.
apply Hx.
(* trivIset *)
- apply/trivIsetP.
by move=>x y /set2P [->|->] /set2P [->|->];
unfold negb; rewrite eq_refl.
(* set0 \notin *)
- apply/memPn.
move=>x /set2P [->|->];
apply/set0Pn; exists wit; apply in_setT.
Qed.

(tested in Coq 8.9.1 with mathcomp 1.8.0)

I was then wondering if this was the intended behavior of partition, or if maybe I was missing something.

Thank you in advance,
Pierre-Léo Bégay
PhD student at Orange Labs & Verimag







Archive powered by MHonArc 2.6.18.

Top of Page