coq-club AT inria.fr
Subject: The Coq mailing list
List archive
Re: [Coq-Club] How can I print definitions without unfolding the sub-definitions within it?
Chronological Thread
- From: Jasper Hugunin <jasperh AT cs.washington.edu>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] How can I print definitions without unfolding the sub-definitions within it?
- Date: Sat, 22 Aug 2020 10:52:36 -0700
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=jasperh AT cs.washington.edu; spf=Pass smtp.mailfrom=jasperh AT cs.washington.edu; spf=None smtp.helo=postmaster AT mail-pj1-f41.google.com
- Ironport-phdr: 9a23:XXV0khaQ2Q/NILgOCEQ4T37/LSx+4OfEezUN459isYplN5qZr869bnLW6fgltlLVR4KTs6sC17OI9fm5BSdZuMnJmUtBWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYdFRrlKAV6OPn+FJLMgMSrzeCy/IDYbxlViDanbr5+MRS7oR/MusULjoZuJbs9xgbLr3BVZ+lY2GRkKE6JkR3h/Mmw5plj8ypRu/Il6cFNVLjxcro7Q7JFEjkoKng568L3uxbNSwuP/WYcXX4NkhVUGQjF7Qr1UYn3vyDnq+dywiiaPcnxTbApRTSv6rpgRRH0hCsbMTMy7WfagdFygq1GuhKsvxNww4DWb4+VOvRwfb7Tc80GSmdaRMldSzZMD5mgY4cTDecMO/tToYnnp1sJqBuzHQ2iC/n0yj9QmHD2x7Ax3eY8EQHJwQwgGdMOsHLJp9jyNqcdS/u1zLHWwjXZb/Nbwivy6JPSfhEvu/6MRrJwccvXyUkgCwPFiVOQpZb7MDyIy+QAqm6W5PdvWuyzkWAosR1xoiSxycc2jInEnoYYx1LH+Ct2z4s4JNK2RUx/bNOmHpVdszyWOopyT84iXWxlvDg3x6AJtJO1YiQG1ogqygPDZ/GIb4WF/h3tWeaXLDxlh3xlYKqyiwiu/UWk0OHxVcm53ExUoiZYk9TArH8A2wHV58OaUPVy5F2h1iyK1w3L6uFLP0Q0la3DJp4k2LEwl54TvV3bHi/0hUn6laGWe0o59uSy5OTnZbLmppCYN4BqkA3xLqMumsmnDeQ5NAgBQXSb9Pyi2LH/+UD1WrZHg/0snqXHrZzXJN4Xq6GkDwNN14Ys8Re/DzOo0NQCmnkHKUpIeBCdgIjyI1HBPur4Dfekjluwizdn3f7HMaf6ApXNL3jDlrjhfap6605a0gY8081Q549MBrEbPP3zQlPxtMDfDhIhLwO0xP/nBMxh2YMaRGKAGbSUMLjSsF+N/uIgOfOAZI4TuDbnKvgq/eTijXEjmQxVQa781pwOLXu8A/5OIkODYHOqjM1SP30Nu18cRffyhUfKcSNcenCzWepo5DggEI+8Da/IXcayiaeB3SG0AppQIG1KFwbfQj/Ta4yYVqJUO2qpKch7n2lcDOTze8oazRir8TTC5f9/NOONq38TrtT83cN15uvciRY0szF4EpbFijzffyRPhmoNAgQO8uV/rEh6kArR1KF5h7lAF4UW6a8QFAg9MpHYwqpxDNWgAluQLOfMc06vR5CdOR90S9swx9EUZEMkSoeplVbc1jGqArkai7uNQpE47/CF0g==
The most direct interpretation of this request would be to print
`vvv_lt_irrefl = let s := _ in let H := _ in H : forall v : vpg_var, vpg_var_as_OT.lt v v -> False`,
which is not much different from what `About` would print in this case, which is something like
`vvv_lt_irrefl : forall v : vpg_var, vpg_var_as_OT.lt v v -> False`.
Since sub-definitions aren't part of the global environment, there is no unfolding going on in your example. The proof term for `vv_lt_irefl` is exactly what gets printed.
Sincerely,
- Jasper Hugunin
On 22/08/2020 16:43, Kumar, Ashish wrote:
> Here's one example I could find (not the worst one, but it highlights my point):
> In one of the files in my project 'vv_lt_irefl' is a lemma defined by:
>
> Lemma vv_lt_irefl : forall (v:vpg_var), vpg_var_as_OT.lt v v -> False.
>
> When I encountered the term 'vv_lt_irefl' in another file for the first time, I did 'Print vv_lt_irfl'. Coq's output was:
>
> vv_lt_irefl =
> let s : StrictOrder vpg_var_as_OT.lt := vpg_var_as_OT.lt_strorder in
> let H : forall v : vpg_var, vpg_var_as_OT.lt v v -> False :=
> match s with
> | {| StrictOrder_Irreflexive := StrictOrder_Irreflexive;
> StrictOrder_Transitive := StrictOrder_Transitive |} =>
> (fun (StrictOrder_Irreflexive0 : Irreflexive vpg_var_as_OT.lt)
> (_ : Transitive vpg_var_as_OT.lt) (v : vpg_var) =>
> let c : complement vpg_var_as_OT.lt v v := StrictOrder_Irreflexive0 v in
> c) StrictOrder_Irreflexive StrictOrder_Transitive
> end in
> H
> : forall v : vpg_var, vpg_var_as_OT.lt v v -> False
>
> It clearly unfolded the term 'vpg_var_as_OT.lt', and even unfolded terms within this term - making it hard to read. Is there a way I can print 'vv_lt_irefl' without Coq unfolding it's inner terms?
> *From:* coq-club-request AT inria.fr <coq-club-request AT inria.fr> on behalf of Gaëtan Gilbert <gaetan.gilbert AT skyskimmer.net>
> *Sent:* Saturday, August 22, 2020 9:38 AM
> *To:* coq-club AT inria.fr <coq-club AT inria.fr>
> *Subject:* Re: [Coq-Club] How can I print definitions without unfolding the sub-definitions within it?
> Depending on what you mean by "sub definitions" this may be impossible. Can you give an example?
>
> Gaëtan Gilbert
>
> On 22/08/2020 14:58, Kumar, Ashish wrote:
>> I use "Print A" to print the definition of a term A. But Coq unfolds all the sub-definitions and functions within the term and sometimes, the resultant definition becomes very long and unreadable. Is there a way by which I can print definitions without having Coq unfold the inner functions and definitions? (I tried set unprinting notations, but that didn't work).
>>
>> With regards,
>> Ashish
- [Coq-Club] How can I print definitions without unfolding the sub-definitions within it?, Kumar, Ashish, 08/22/2020
- Re: [Coq-Club] How can I print definitions without unfolding the sub-definitions within it?, Gaëtan Gilbert, 08/22/2020
- Re: [Coq-Club] How can I print definitions without unfolding the sub-definitions within it?, Kumar, Ashish, 08/22/2020
- Re: [Coq-Club] How can I print definitions without unfolding the sub-definitions within it?, Gaëtan Gilbert, 08/22/2020
- Re: [Coq-Club] How can I print definitions without unfolding the sub-definitions within it?, Jasper Hugunin, 08/22/2020
- Re: [Coq-Club] How can I print definitions without unfolding the sub-definitions within it?, Gaëtan Gilbert, 08/22/2020
- Re: [Coq-Club] How can I print definitions without unfolding the sub-definitions within it?, Jasper Hugunin, 08/22/2020
- Re: [Coq-Club] How can I print definitions without unfolding the sub-definitions within it?, Gaëtan Gilbert, 08/22/2020
- Re: [Coq-Club] How can I print definitions without unfolding the sub-definitions within it?, Kumar, Ashish, 08/22/2020
- Re: [Coq-Club] How can I print definitions without unfolding the sub-definitions within it?, Gaëtan Gilbert, 08/22/2020
Archive powered by MHonArc 2.6.19+.