coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jason Gross <jasongross9 AT gmail.com>
- To: Dan Christensen <jdc AT uwo.ca>
- Cc: coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] rewriting in an equality without eq_ind_r / transport
- Date: Thu, 14 Nov 2019 12:13:33 -0800
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jasongross9 AT gmail.com; spf=Pass smtp.mailfrom=jasongross9 AT gmail.com; spf=None smtp.helo=postmaster AT mail-wr1-f52.google.com
- Ironport-phdr: 9a23:m1JUCRJw+IjYEiCkGtmcpTZWNBhigK39O0sv0rFitYgRL/XxwZ3uMQTl6Ol3ixeRBMOHsqkC0rGN+Pm7AyQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTagb75+Ngi6oAvfu8UZnIdvJLg9wQbVr3VVfOhb2XlmLk+JkRbm4cew8p9j8yBOtP8k6sVNT6b0cbkmQLJBFDgpPHw768PttRnYUAuA/WAcXXkMkhpJGAfK8hf3VYrsvyTgt+p93C6aPdDqTb0xRD+v4btnRAPuhSwaMTMy7WPZhdFqjK9Drx2hqR5wzY7abo+WKfRwYL/ScMgASmZdRMtcTTBNDp++YoYJEuEPPfxYr474p1YWqRWxHxKsBOTpyjRVh3H2x6o60/86EQrb2wEgHcgBsG/TrNXzO6cSS+e1zLLTzTjHdP5W1jL955LJchAlu/2DQbVwcc/IxEQpCgjLgFKQqYn/MDOU0OQAq2eb7+t8VeKvlm4osBt9rSSoxscpjITCm4Ebykjc+Cln3Io4Ice0RU17bNK+DpdcqTyWO5F2T888RWxjpTw0xaccuZGheSgH0JQnyADba/yAa4WI5wjsVOeVITthinNlYq+ziw+88UWg1OHwTMa00FFNripKltnDqGoB2ADU6siCUvd9/0Gh1iiT1w3L9O1IPUQ5mbDYJpMh2LI8iIQfvVnZEiL2hkn6lKqWeV8l+uis5eTneLLmppqEOo92kA7+KaMumsqwAeQiNQgORHOb9OCn2b3s+E32WrRKjvksnqbFt5DaINwXprSlDA9NzoYj9xG/Ai+639QfhHkLNU5KeBaaj4fyIFzOO/D5DfKng1u2ijtrxvbGPqfgAprXNHTDnq3hLv5B7BtwwQx75tBF5olIB7caLfS7Dk39v/TFERh/OAXikMj9D9Ao9IoFXmTHLbWeK7ia5V2B/eUpLPOLf5REkDn4IvkhofXpiClqyhcmYaC10M5POziDFfN8LhDBOCu+spI6CW4P+zEGYqnvgVyGXyRUYi/rDa057zA/TomhCNWaH93/sPm6xC6+W6ZuSCVGB1SLSyq6coyFX7ITcnvXLJI71DMDUrelRskq0hT87FammYoiFfLd/2gjjbymzMJ8vrSBmhQ79DgyBMOYgTmA
If the built-in unify fails on those terms, that sounds like a bug in Coq worth reporting. If you want to extract a stand-alone example, you can use my bug minimizer: https://github.com/JasonGross/coq-tools/blob/master/README.md#coq-bug-minimizer
On Thu, Nov 14, 2019, 08:04 Dan Christensen <jdc AT uwo.ca> wrote:
On Nov 13, 2019, Samuel Gruetter <gruetter AT mit.edu> wrote:
> https://github.com/mit-plv/coqutil/blob/master/src/coqutil/Tactics/syntactic_unify.v
I tried the syntactic_unify tactic from there, and it worked better
than the set method in some simple situations. But unfortunately
syntactic_unify failed to unify some terms that look easy to unify.
(See below.) And the original tactic I posted in the first message of
this thread is able to handle those. So the current situation is
my original tactic > syntactic unify method > set method
I'll post a separate message later asking for help with my original
tactic.
Here's how I tried to use syntactic_unify:
let lemH := fresh "lem" in
pose lem as lemH;
insterU lemH; (* put evars in for all arguments *)
let src := source lemH in
lazymatch goal with
| |- ?lhs = _ =>
match lhs with
| context[?trm] =>
syntactic_unify trm src;
...
I can't easily give a reproducible example of where it fails, since it
involves a large development using the HoTT library, but here are the
terms:
src:
(@ap ?A (smash ?A ?B)
(fun a : ?A => @smin ?A ?B (a, @point ?B (ispointed_type ?B)))
?x
?y
?q0)
a sub-term of lhs:
(@ap X (smash X Y)
(fun x : X => @smin X Y (x, @point Y (ispointed_type Y)))
(f (@point A (ispointed_type A)))
(@point X (ispointed_type X))
(@point_eq A X f))
(The @ at the start of the last line is like eq_trans.)
Both rewrite and my original tactic unify src with the sub-term
(probably using more ambient information), but both syntactic_unify and
the built-in unify fail. If I help the latter two by doing some partial
unification, they succeed, so the terms are unifiable.
Any ideas?
Thanks again!
Dan
- Re: [Coq-Club] rewriting in an equality without eq_ind_r / transport, (continued)
- Re: [Coq-Club] rewriting in an equality without eq_ind_r / transport, Talia Ringer, 11/12/2019
- Re: [Coq-Club] rewriting in an equality without eq_ind_r / transport, Dan Christensen, 11/12/2019
- Re: [Coq-Club] rewriting in an equality without eq_ind_r / transport, Talia Ringer, 11/12/2019
- Re: [Coq-Club] rewriting in an equality without eq_ind_r / transport, Clément Pit-Claudel, 11/12/2019
- Re: [Coq-Club] rewriting in an equality without eq_ind_r / transport, Dan Christensen, 11/13/2019
- Re: [Coq-Club] rewriting in an equality without eq_ind_r / transport, Clément Pit-Claudel, 11/13/2019
- Re: [Coq-Club] rewriting in an equality without eq_ind_r / transport, Dan Christensen, 11/13/2019
- Re: [Coq-Club] rewriting in an equality without eq_ind_r / transport, Clément Pit-Claudel, 11/13/2019
- Re: [Coq-Club] rewriting in an equality without eq_ind_r / transport, Dan Christensen, 11/13/2019
- Re: [Coq-Club] rewriting in an equality without eq_ind_r / transport, Dan Christensen, 11/14/2019
- Re: [Coq-Club] rewriting in an equality without eq_ind_r / transport, Jason Gross, 11/14/2019
- Re: [Coq-Club] rewriting in an equality without eq_ind_r / transport, Dan Christensen, 11/15/2019
- Re: [Coq-Club] rewriting in an equality without eq_ind_r / transport, Dan Christensen, 11/15/2019
- Re: [Coq-Club] rewriting in an equality without eq_ind_r / transport, Dan Christensen, 11/15/2019
- Re: [Coq-Club] rewriting in an equality without eq_ind_r / transport, Gaëtan Gilbert, 11/15/2019
- Re: [Coq-Club] rewriting in an equality without eq_ind_r / transport, Samuel Gruetter, 11/16/2019
- Re: [Coq-Club] rewriting in an equality without eq_ind_r / transport, Dan Christensen, 11/16/2019
- Re: [Coq-Club] rewriting in an equality without eq_ind_r / transport, Dan Christensen, 11/13/2019
- Re: [Coq-Club] rewriting in an equality without eq_ind_r / transport, Samuel Gruetter, 11/13/2019
Archive powered by MHonArc 2.6.18.