Subject: Ssreflect Users Discussion List
List archive
- From: Christian Doczkal <>
- To:
- Subject: Re: [ssreflect] Empty type
- Date: Thu, 12 Oct 2017 08:56:20 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Neutral ; spf=None
- Ironport-phdr: 9a23:WfhCWBSWW2sfYN7SYxdCLZGEntpsv+yvbD5Q0YIujvd0So/mwa67bBWN2/xhgRfzUJnB7Loc0qyN7PCmBDRIyK3CmU5BWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnZBUin4YBFuPOn7HoPZk+yyzPr3+pvJYgwOhTynYLo0Ig/lgx/Ws5w9gZFjMbowwx2BjnxDaedfwSs8LlKJng3g5862upJk+DZTsvYJ+shbFKHreKJ+Q6YOX2duCHw8+MC+7UqLdgCI/HZJCmg=
Hello,
I have a use case. In one of my developments I represent directed graphs as
{vertex : finType ; edge : finType ; source, target : edge -> vertex ; ... }
There I need the empty type as finType for graphs without edges. Below are my
instances.
So yes, I second including this in future releases.
Best,
Christian
-------------------------------------------------------------------
Inductive void : Type :=.
Lemma void_eqP : @Equality.axiom void [rel _ _ | false].
Proof. by case. Qed.
Canonical void_eqType := EqType void (EqMixin void_eqP).
Lemma void_pcancel : pcancel (fun x : void => match x with end) (fun x:unit
=> None).
Proof. by case. Qed.
Definition void_choiceMixin := PcanChoiceMixin void_pcancel.
Canonical void_choiceType := ChoiceType void void_choiceMixin.
Definition void_countMixin := PcanCountMixin void_pcancel.
Canonical void_countType := CountType void void_countMixin.
Lemma void_enumP : @Finite.axiom [countType of void] [::].
Proof. by case. Qed.
Canonical void_finType := FinType void (FinMixin void_enumP).
--------------------------------------------------------------------
On 10/12/2017 08:38 AM, Maxime Dénès wrote:
> Hi Arthur,
>
> That's an interesting observation. Just curious, what use cases do you
> have in mind?
>
> Maxime.
>
> On 10/12/2017 12:11 AM, Arthur Azevedo de Amorim wrote:
>> I was hoping to find instances of the basic ssreflect classes for
>> Empty_set or some other empty type, and to my surprise there aren't
>> any. (The eqtype library still says: "The eqType interface is
>> implemented for most standard datatypes: bool, unit, void, ...".)
>>
>> Do others think it would be useful to include that in a future release?
>>
>> Arthur
- [ssreflect] Empty type, Arthur Azevedo de Amorim, 10/12/2017
- Re: [ssreflect] Empty type, Maxime Dénès, 10/12/2017
- Re: [ssreflect] Empty type, Christian Doczkal, 10/12/2017
- Re: [ssreflect] Empty type, Pierre-Yves Strub, 10/12/2017
- Re: [ssreflect] Empty type, Arthur Azevedo de Amorim, 10/12/2017
- Re: [ssreflect] Empty type, Christian Doczkal, 10/12/2017
- Re: [ssreflect] Empty type, Maxime Dénès, 10/12/2017
Archive powered by MHonArc 2.6.18.