playground/coq/unfinished/email.v

38 lines
666 B
Coq

Require Import String.
Inductive email : Set :=
| Email: forall (username domain tld:string), email.
Goal
email.
Proof.
eapply Email.
- exact "famubu"%string.
- exact "rawtext"%string.
- exact "club"%string.
Qed.
Reset email.
(* https://en.wikipedia.org/wiki/Email_address#Local-part *)
Definition username := string.
Definition domain := string.
(* https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains *)
Definition tld := string.
Inductive email : Set :=
| Email (user:username) (dom: domain) (t:tld) : email.
Goal
email.
Proof.
eapply Email.
- exact "famubu"%string.
- exact "rawtext"%string.
- exact "club"%string.
Qed.