coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Sebastian Böhne <boehne AT uni-potsdam.de>
- To: coq-club AT inria.fr
- Subject: [Coq-Club] Problems with ignored notations
- Date: Thu, 09 Feb 2017 14:57:07 +0100
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=boehne AT uni-potsdam.de; spf=Pass smtp.mailfrom=boehne AT uni-potsdam.de; spf=None smtp.helo=postmaster AT cl-mail.uni-potsdam.de
- Ironport-phdr: 9a23:/dlbmRekj+Bg+WAliVuOLv0OlGMj4u6mDksu8pMizoh2WeGdxc29YR7h7PlgxGXEQZ/co6odzbGH7+awBCdbud7B6ClEK8McEUddyI0/pE8JPo2sMQXDNvnkbig3ToxpdWRO2DWFC3VTA9v0fFbIo3e/vnY4ExT7MhdpdKyuQtaBx5f/6+fn8JrKJg5MmTCVYLVoLRzwox+CmNMRhN5ZJ6w40QfIq30AUXpWw24gcViUkhb66++t+p8m6yNMoP4o8ohMXPOpLOwDUbVEAWF+YCgO78rxuEybQA==
Dear Coq-community!
We, Tim Richter and Sebastian Böhne, have problems with some notations we introduced for numbers in Coq. Sometimes an already introduced notation is ignored by Coq and -- even worse -- when processing in a proof our notations are replaced by their original versions. This is a big problem, since even simple contents become very confusing.
You find a minimal example below and attached.
Thank you very much for your help!
Best regards
Tim Richter and Sebastian Böhne
PS: We use CoqIde 8.4pl3.
----------------------------------
Require Import Utf8_core.
Notation "〈 a , b 〉" := (pair a b)
(no associativity).
Inductive ℕ := Zero : ℕ | Suc : ℕ → ℕ.
Notation ℕ0 := (Zero).
Notation ℕ1 := (Suc ℕ0).
Check ℕ0.
Check Zero.
Check Suc Zero.
(* Here Coq sticks correctly to notations and
furthermore retranslates objects, which can be
displayed as Notations *)
Notation ℤ := (ℕ * ℕ)%type.
Check (〈ℕ0,ℕ1〉).
Check (〈Zero, Suc Zero〉).
(* So Coq does not seem to have problems with
the pair notation *)
Notation ℤ0 := (〈ℕ0, ℕ0〉 : ℤ).
Notation ℤ1 := (〈ℕ1, ℕ0〉 : ℤ).
Notation "ℤ-1" := (〈ℕ0, ℕ1〉 : ℤ).
Check ℤ1.
(* Still like expected *)
Check (〈ℕ1, ℕ0〉).
(* Here Coq does not retranslate anymore *)
Check (〈ℕ1, ℕ0〉 : ℤ).
(* However, with some little help it still
works *)
Lemma example : ℤ-1 = ℤ-1 ∧ ℤ0 = ℤ0 ∧ ℤ1 = ℤ1.
Proof.
simpl.
(* We did not even do anything but Coq
replaces our abbreviations with the longer
original versions. Why? *)
admit.
Admitted.
----------------------------------
Attachment:
Minimal_example.v
Description: application/verilog
- [Coq-Club] Problems with ignored notations, Sebastian Böhne, 02/09/2017
- Re: [Coq-Club] Problems with ignored notations, Gaetan Gilbert, 02/09/2017
- Re: [Coq-Club] Problems with ignored notations, Guillaume Melquiond, 02/09/2017
- Re: [Coq-Club] Problems with ignored notations, Sebastian Böhne, 02/10/2017
- Re: [Coq-Club] Problems with ignored notations, Guillaume Melquiond, 02/09/2017
- Re: [Coq-Club] Problems with ignored notations, Abhishek Anand, 02/09/2017
- Re: [Coq-Club] Problems with ignored notations, Abhishek Anand, 02/09/2017
- Re: [Coq-Club] Problems with ignored notations, Gaetan Gilbert, 02/09/2017
Archive powered by MHonArc 2.6.18.