coq-club AT inria.fr
Subject: The Coq mailing list
List archive
Re: [Coq-Club] The definition of Union operation of Set in Coq standard library
Chronological Thread
- From: Théo Zimmermann <theo.zimmi AT gmail.com>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] The definition of Union operation of Set in Coq standard library
- Date: Wed, 25 Apr 2018 13:17:59 +0000
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=theo.zimmi AT gmail.com; spf=Pass smtp.mailfrom=theo.zimmi AT gmail.com; spf=None smtp.helo=postmaster AT mail-ua0-f176.google.com
- Ironport-phdr: 9a23:a9WwJxbGr+qQD1xWZS500TL/LSx+4OfEezUN459isYplN5qZoMq+bnLW6fgltlLVR4KTs6sC17KN9fi4EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCazbL9oMBm6sRjau9ULj4dlNqs/0AbCrGFSe+RRy2NoJFaTkAj568yt4pNt8Dletuw4+cJYXqr0Y6o3TbpDDDQ7KG81/9HktQPCTQSU+HQRVHgdnwdSDAjE6BH6WYrxsjf/u+Fg1iSWIdH6QLYpUjmk8qxlSgLniD0fOjE2/mHYiMx+gqxYrhy8uRJw35XZb5uJOPdkZK7RYc8WSGhHU81MVyJBGIS8b44XAuQfPeZftY79qEMNohu/AAmsAf3gyiVNhnDs26061fkqHAba3AwgAd0Ot27YrdT0NKcXVOC1zbLFzTrGb/xM2Df97JLEfQwmofGJRL99d9fax0coFwPAlFqQqIrlMiuU1uQLqWib7vBvWfihi249sw1xrTmvxtssionUnY0Z0EzL9SJ8wIszONa2S1Z7bMa6HJdMsyyWLYh7T8M4T212pSo3yKcKtYO5cSULzpks2gTRZOadc4eS5xLuTOaRLil8hHJiYL+/ggy98UmkyuHlS8m7ykpGojNLktXRtH0A1gbf6seASvt68Ueh3SiA2xrP5eFDJEA4javbK5g/zb4sjpcfr1jPEyvslEj1jKKabFso9vWq5uj9f7nrpJ6RO5dxig7kM6QunsK/Af4/MggLR2Wb5eS826Pk/UHjQbRKj/g2kqzYsJ3BKsQbo7S2Aw5R0oo59xm/CDKm3MwCnXYbNFJFZA6Hj4/xNl7SJ/D4FO6zjEiokDd23P/LJabhA5XILnjbirjtZ7d960hGyAoy199T/ZxUCqtSaM70D0T2rZnTCgIzGw2y2efuTttnha0EXmfaPq8YN5TgsFqN6/gqKu+KLNsJuDv6beok4vvvpXA8kF4ZO6Ku2M1EOziDAv16LhDBMjLXidAbHDJS51tsfKnRkFSHFAVrSTO3VqM46Cs8Ddv/X4jGT4GpxreG2XXiR8EEViV9ElmJVEzQWcCcQf5VMXCdJ8ZglnoPUr3zE9Z8hyHrjxfzzv9cFsSR+iAcssi9ht185umWiBhqsDItUJrb3GaKQGV52GgPQm1u0Q==
Hello,
These two definitions are equivalent. See the small proof below.Require Import Ensembles.
Section Ensembles.
Variable U : Type.
Definition Union' (B C: Ensemble U) : Ensemble U :=
fun a:U => In _ B a \/ In _ C a.
Theorem both_union_are_equivalent :
forall A B : Ensemble U, Same_set _ (Union _ A B) (Union' A B).
Proof.
split; unfold Included, Union', In; intros * H.
- destruct H.
+ now left.
+ now right.
- destruct H.
+ now left.
+ now right.
Qed.
End Ensembles.
Dear All,Recently, I try to describe classical set theory by using Coq and then I read the Coq library. I find the definition (see https://coq.inria.fr/distrib/current/stdlib/Coq.Sets.Ensembles.html) of Union operation of Set in Coq standard library is not same as I thinked, I prefer to define Union operation as follows:Definition Union (B C:Ensemble):Ensemble:= fun a:U => In B a \/ In C a.I don't understand why Union operation is defined in this way. Could you please tell me the reason?Thanks a lot.
Shenghao YuanCollege of Computer Science and Technology (CCST)Nanjing University of Aeronautics and Astronautics (NUAA)Nanjing China
- [Coq-Club] The definition of Union operation of Set in Coq standard library, shyuan AT nuaa.edu.cn, 04/24/2018
- Re: [Coq-Club] The definition of Union operation of Set in Coq standard library, Théo Zimmermann, 04/25/2018
Archive powered by MHonArc 2.6.18.