coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Ilmārs Cīrulis <ilmars.cirulis AT gmail.com>
- To: "coq-club AT inria.fr" <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] How can I make proofs from Standard Library transparent?
- Date: Fri, 22 Apr 2016 16:23:08 +0300
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=ilmars.cirulis AT gmail.com; spf=Pass smtp.mailfrom=ilmars.cirulis AT gmail.com; spf=None smtp.helo=postmaster AT mail-yw0-f181.google.com
- Ironport-phdr: 9a23:Kep7fB23DxIRokC3smDT+DRfVm0co7zxezQtwd8ZsegQLvad9pjvdHbS+e9qxAeQG96Lu7Qb06GI6ejJYi8p39WoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6kO74TNaIBjjLw09fr2zQd6CyZvvnL7os7ToICx2xxOFKYtoKxu3qQiD/uI3uqBFbpgL9x3Sv3FTcP5Xz247bXianhL7+9vitMU7q3cY6Lod8JsKWqLjOq88ULZwDTI8Mmlz6teh/U3IShLK7X8BWE0XlABJCk7L9kepcI32t37bsu/WwjLSFszsULQ1Qnz27qNuQQXzziwGLSM98Xr/hcl5jaYdqxWk8U8si7XIaZ2YYaItNpjWeskXEDJM
> Can you give some code here please? I don't see what transparency can help here.
Pierre, here is a code example.
> If the inductive proof of n + 1 = S n is Qeded, then you cannot reduce it in proof terms using it, I think that's what Ilmārs is saying. There's currently no getting around reproving it transparently.
Pierre, here is a code example.
===
Require Import Utf8 Arith.
Set Implicit Arguments.
Inductive list A: nat → Type :=
| nil: list A 0
| cons: ∀ n, A → list A n → list A (S n).
Arguments nil [A].
Infix "::" := cons (at level 60, right associativity).
Fixpoint app A n m (L: list A n) (L0: list A m): list A (n + m) :=
match L with
| nil => L0
| a :: t => a :: app t L0
end.
Infix "++" := app (at level 60, right associativity).
Definition add_to_end A n (L: list A n) (x: A): list A (S n) :=
eq_rect _ _ (L ++ x :: nil) _ ltac:(rewrite plus_comm, plus_n_O; auto).
Eval compute in (add_to_end nil 1).
(*
= match
match
match Nat.add_comm 0 1 in (_ = y) return (y = 1) with
| eq_refl => eq_refl
end in (_ = y) return (y = 1)
with
| eq_refl =>
match match plus_n_O 1 in (_ = y) return (y = 1) with
| eq_refl => eq_refl
end in (_ = y) return (1 = y) with
| eq_refl => plus_n_O 1
end
end in (_ = y) return (list nat y)
with
| eq_refl => 1 :: nil
end
: list nat 1
*)
===
> If the inductive proof of n + 1 = S n is Qeded, then you cannot reduce it in proof terms using it, I think that's what Ilmārs is saying. There's currently no getting around reproving it transparently.
Matthie, it must be this.
I'm using Coq for fun and experience, so learning vocabulary and theory isn't in the first place. Probably not for good.
---
Thank you.
I'm using Coq for fun and experience, so learning vocabulary and theory isn't in the first place. Probably not for good.
---
Thank you.
On Fri, Apr 22, 2016 at 2:59 PM, Matthieu Sozeau <mattam AT mattam.org> wrote:
If the inductive proof of n + 1 = S n is Qeded, then you cannot reduce it in proof terms using it, I think that's what Ilmārs is saying. There's currently no getting around reproving it transparently.
-- MatthieuLe ven. 22 avr. 2016 à 13:55, Pierre Courtieu <pierre.courtieu AT gmail.com> a écrit :2016-04-22 0:32 GMT+02:00 Ilmārs Cīrulis <ilmars.cirulis AT gmail.com>:
> Probably I can't. They're opaque and that's all.
I am afraid so.
> I need them, for example, to prove that types list A (n + 1) and list A (S
> n) are equal and then use this equality in computations.
I don't understand, an equality cannot help "computation" as far as I
can tell. You mean that this equality allows to rewrite *and then* you
can compute right? But then the transparency is not the problem.
> For now I just prove necessary equality again, this time transparently.
Can you give some code here please? I don't see what transparency can help here.
Best
Pierre Courtieu
- [Coq-Club] How can I make proofs from Standard Library transparent?, Ilmārs Cīrulis, 04/22/2016
- Re: [Coq-Club] How can I make proofs from Standard Library transparent?, Pierre Courtieu, 04/22/2016
- Re: [Coq-Club] How can I make proofs from Standard Library transparent?, Matthieu Sozeau, 04/22/2016
- Re: [Coq-Club] How can I make proofs from Standard Library transparent?, Ilmārs Cīrulis, 04/22/2016
- Re: [Coq-Club] How can I make proofs from Standard Library transparent?, Emilio Jesús Gallego Arias, 04/22/2016
- Re: [Coq-Club] How can I make proofs from Standard Library transparent?, Daniel Schepler, 04/22/2016
- Re: [Coq-Club] How can I make proofs from Standard Library transparent?, Ilmārs Cīrulis, 04/25/2016
- Re: [Coq-Club] How can I make proofs from Standard Library transparent?, Daniel Schepler, 04/22/2016
- Re: [Coq-Club] How can I make proofs from Standard Library transparent?, Emilio Jesús Gallego Arias, 04/22/2016
- Re: [Coq-Club] How can I make proofs from Standard Library transparent?, Ilmārs Cīrulis, 04/22/2016
- Re: [Coq-Club] How can I make proofs from Standard Library transparent?, Matthieu Sozeau, 04/22/2016
- Re: [Coq-Club] How can I make proofs from Standard Library transparent?, Pierre Courtieu, 04/22/2016
Archive powered by MHonArc 2.6.18.