Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Commands/Tools for Debugging Universe Inconsistency?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Commands/Tools for Debugging Universe Inconsistency?


Chronological Thread 
  • From: Gaëtan Gilbert <gaetan.gilbert AT skyskimmer.net>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Commands/Tools for Debugging Universe Inconsistency?
  • Date: Fri, 10 Apr 2020 17:57:57 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=gaetan.gilbert AT skyskimmer.net; spf=Pass smtp.mailfrom=gaetan.gilbert AT skyskimmer.net; spf=None smtp.helo=postmaster AT relay1-d.mail.gandi.net
  • Ironport-phdr: 9a23:Jf3gmxdK301BzfjlmIky2FollGMj4u6mDksu8pMizoh2WeGdxcSyYh7h7PlgxGXEQZ/co6odzbaP7ua6AydRvd7B6ClELMUQEUddyI0/pE8JPo2sMQXDNvnkbig3ToxpdWRO2DWFC3VTA9v0fFbIo3e/vnY4ExT7MhdpdKyuQtaBx8u42Pqv9JLNfg5GmCSyYa9oLBWxsA7dqtQajZFtJ6osyhbFuGVEd/pZyW5sKl+YghLw6tut8JJ5/Clcpv0s+9RcXanmeqgzUKBVAikhP20p68LnsgXOQxGS7XUGSGUWlRRIAwnB7B7kW5r6rzX3uOlg1iSEJMP6Vb87Vyis4KdtUx/olTwINyUl/2HNi8x/l7xUrRS8rBFi2YHUYYWVNP1jfqPBeN4RWGRMUtpNWyFHH4ixaZYEAegcMuZCt4TzukUArRW+CwevCu3gxDBHiX3q0qM1yOkhDQLL0RY8E94SvnnZrtP4P7oSX+Cvy6nIyC3OYfJM1jDh9IjHaBYhrumNU7Jxdcre0lcgFxnZjl6NroHlMCma2foRs2eB6epsT+2vi28jqw5qvDev3Nssh5LShoIWylHE7iZ5wIcwJd29VkF7e8SoEJ1OuCGGLoZ7RN4pTW9vuCY/0LIGuJi7cTAXxJg5yRPTcfOHfJKQ7hLiUuaROzZ4i2h/dLKxnRa/91WrxO7kVsSszlpGsyhInsPOu3wRzRDf98uKR/Vn8ku83TuC2Rjf5v9ZLU06j6bXNp4szqAqmpYOsEnPADX6lFj1gaOLcEgv5/Km5P79Yrr8o5+RL490hR/6MqQpgsG/G/o3MgwUUGmb5OiwzaDs8Vf8QLpQj/02lrPVsJ/AKsQdu6G5AhVZ0oA95BajFzum0dIYkmcbLF9dZh6LkorkN0vMLfzkF/uznlehnTlxy/zbOrDsDI3BLn3Zn7fgebZ95VRcyA02zd1H6JJbEK8OIO7pVU/3rtDYAR45MwivzOn5EtV9ypgTWXmMAq6ZK6PSsl6I5ucqI+aSfo8ZojD9JOY55/L2l382hUcdfbW13ZsQcH23AvNmI1yAbXXwhtcBDHwFsxElTO3qjV2CSSRca2yzX6I6/DE7CZipAZ3NRoC30/S923KwGYQTbWRbAHiNF23pfsOKQaQiciWXd+BoESANU4+OSosr2Auy/Fv1wrd7J+yS9Swcv5/5yPBu5PzIlhA38DFuScKQzzfeHClPgmoUSmpuj+hEqktnxwLbiPQqs7ljDdVWoshxfEIiL5eFkb5hCMHpWQPEe9qTDlCrXof+WGBjfpcK29YLJn1FNZCnhxHH0TCtBuZLxaeIFYc386fZ0mK3IcthmS+fifsRymI+S84KDlWIw65y8w+JWtzTnkGQhv/veeIZ1S/JsmiKy2aP+kdVTFwoXA==

The Foo.number universes are unstable (for instance the number changes if you backtrack and rerun the command which generated the universe) so you can't put them into a script.
Instead you have to ensure they get a name when created (so eg if you have

Definition foo := Type. (* produces Type@{Foo.123} *)

you can replace it by

Universe foo_univ.
Definition foo := Type@{foo_univ}.

Coq >=8.10 will automatically name universes in some cases (for instance the above example actually uses the name "foo.u0" not "Foo.123").

Gaëtan Gilbert

On 10/04/2020 17:42, Yao Li wrote:
Hi Christian,

Thanks for the pointers! They are helpful. In particular, I find your suggestion of using the “Constraint” command quite useful. I would like to reiterate that suggestion here:

- once one has located the spot where needlessly strong constraints (usually
U = V for some U and V) are enforced, one can precede said lemma/definition
with a "Contraint" command ruling out the equality (e.g., Contraint U < V) to
force backtracking within the definition/lemma. Afterwards, the desired
parallel structure can be reestablished.

However, I have universe variables whose names are in the form of “Foo.2”, which cannot be parsed by Coq, even under “Constraint” command (Coq would complain:"Error: Syntax Error: Lexer: Undefined token”). This prevents me from putting any constraints regarding “Foo.2”. Is this a bug or did I miss something?

Best,
Yao

On Apr 10, 2020, at 3:30 AM, Christian Doczkal <christian.doczkal AT inria.fr <mailto:christian.doczkal AT inria.fr>> wrote:

Hi,

the subject has been discussed on this list before, and I am not aware
of any tooling advances made since then. The two treads I have been
involved in are:

https://sympa.inria.fr/sympa/arc/coq-club/2018-09/msg00008.html
https://sympa.inria.fr/sympa/arc/coq-club/2019-11/msg00087.html

I hope this helps!

Best,
Christian

On 4/10/20 1:14 AM, Yao Li wrote:
Dear All,

I am having some recurring universe inconsistency problems lately and I would like to know if there are any commands/tools for helping me debugging what happened.

For example, a recurring pattern is that Coq complains to me that it cannot unify two universe levels (assuming they are u1 and u4) because “u1 <= u2 < u3 <= u4” or “u1 <= u2 < u3 = u4”. I would like to know where the constraints concerning u3 and u4 (and perhaps other relevant constraints as well) are generated—or better yet, why. However, I haven’t found a tool for doing that.

I have tried “Set Printing Universes”. Unfortunately, the constraints concerning u3 and u4 cannot be found at any relevant definitions. I have also tried “Print Universes”, but I cannot find what I’m looking for in the sea of constraints that Coq shows me.

Best,
Yao





Archive powered by MHonArc 2.6.18.

Top of Page