coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jason -Zhong Sheng- Hu <fdhzs2010 AT hotmail.com>
- To: "coq-club AT inria.fr" <coq-club AT inria.fr>
- Subject: RE: [Coq-Club] Why does this apply tactic with a lambda fail?
- Date: Thu, 7 Jun 2018 19:54:45 +0000
- Accept-language: en-CA, en-US
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=fdhzs2010 AT hotmail.com; spf=Pass smtp.mailfrom=fdhzs2010 AT hotmail.com; spf=Pass smtp.helo=postmaster AT NAM02-SN1-obe.outbound.protection.outlook.com
- Ironport-phdr: 9a23:ff+e5ROnW5ectIFMS+Al6mtUPXoX/o7sNwtQ0KIMzox0Iv/9rarrMEGX3/hxlliBBdydt6oZzbKO+4nbGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2aFLduGC94iAPERvjKwV1Ov71GonPhMiryuy+4ZLebxlIiTanfb9+MAi9oBnMuMURnYZsMLs6xAHTontPdeRWxGdoKkyWkh3h+Mq+/4Nt/jpJtf45+MFOTav1f6IjTbxFFzsmKHw65NfqtRbYUwSC4GYXX3gMnRpJBwjF6wz6Xov0vyDnuOdxxDWWMMvrRr0yRD+s7bpkSAXwhSkHKTA37X3XhMJzgqJVoh2uuxNwzpXOb42JKPZzZL/Rcc8ESWdHQ81fVzZBAoS5b4YXC+QOJ/1Yr477p1ATtBexBgmsBOTpyj9Hm3T4wK063PonEQHJxQArAtAAsGnJp9jyOqcdTOC1zajTzTndc/9axCvx5ZPIchAmvfGMWKh/ccvVyUU1CwzFiVCQpJXjMjiI1eoNq3CW4uV8We61j2MrtRt9rzi1yssylIXFnowVxU7H+CllxYs4IN+1RUF1bNG6FZZdszqVOotqTc4nXW5ltzs1x7wDtJO7cyUHyo4oyhjCYPKdaYeI+AjsVOOJLDd4mn1lfLW/ig6q/0W8zePwSte43E9XoCRdj9XAr3cN2AfN5cSdTft941uh1i2I1wDO7OFLPFo4lbLBK54m3r4/iIYcsVjCHi/xnkX6lqiWdlg4+uis7OTnZbbmqoWAOI9zjwHyKqUumsqhDuQkKgUDUHSX9f642bH950H0QK9GguMonqXBtZDVP8Ubpqq3Aw9P1YYj7g6yDzm739QYnHgHN0xJdA6ag4T1IFzOIPf4Deu6g1u2kTdrw+rKMaHmApXINnTDiqvufa5h605Azwo+1cxQ55VNCr0YPP3zXlLxu8fDAx8iMw20xv7nB89n2oMfX2KPGK6ZP7nIvV+G/OJ8a9WLMcUevy+4IPw47dbvi2U4kBkTZ+PhiZAQcTWzGulsC0Sfe3vlxNkbRzQkpA07Gc7jk1qEGXthZ3G0UOoH5jw9B8fuLZqLEo6hgK6ahn/iRrVWYXxDA1GIV3zvctPXCL83dCuOL5o5wXQ/Xr+7Rtp5jED8hErB07Nia9Hs1GgdvJPn2sJy4rSIxxE16Tl9DsDb2GaIHTgtwjE4AgQu1aU6mnRTj0+Z2PEj0fxfCdla5vcPWQA/Z8aFkr5KTuvqUweERe+nDVarRtL6XmMXZ/dpmZo1RR84HN+vyBfewyCtHrkZ0aSRA4A5+b7d2H63INthz3HB1+8qiFx0G8Y=
I guess it would be hard to guess what b should be, wouldn't it? Would eapply make it through?
Thanks,
Jason Hu
-------- Original message --------
From: Li-yao Xia <lysxia AT gmail.com>
Date: 6/7/18 15:50 (GMT-05:00)
To: coq-club AT inria.fr
Subject: [Coq-Club] Why does this apply tactic with a lambda fail?
Hello Coq-club
Say the goal is a conjunction (A /\ B).
Variables A B : Prop.
Goal A /\ B.
and I want to prove A, then B under hypothesis A. One way I found is to
apply some function (A -> (A -> B) -> A /\ B) which is trivial to concoct:
apply (fun a b => conj a (b a)).
Alas, Coq then complains somehow:
Error: Cannot refine with term "conj ?M158 ((?M159 : A -> B) ?M158)"
because a metavariable has several occurrences.
Suprisingly, it is happy with this version matching on a dummy parameter:
apply (fun 'I a b => conj a (b a)).
Or with another version using "refine":
refine ((fun a b => conj a (b a)) _ _).
What is going on?
I am also curious about other solutions for the original task, that also
don't need to explicitly name the two conjuncts A and B.
Li-yao
Say the goal is a conjunction (A /\ B).
Variables A B : Prop.
Goal A /\ B.
and I want to prove A, then B under hypothesis A. One way I found is to
apply some function (A -> (A -> B) -> A /\ B) which is trivial to concoct:
apply (fun a b => conj a (b a)).
Alas, Coq then complains somehow:
Error: Cannot refine with term "conj ?M158 ((?M159 : A -> B) ?M158)"
because a metavariable has several occurrences.
Suprisingly, it is happy with this version matching on a dummy parameter:
apply (fun 'I a b => conj a (b a)).
Or with another version using "refine":
refine ((fun a b => conj a (b a)) _ _).
What is going on?
I am also curious about other solutions for the original task, that also
don't need to explicitly name the two conjuncts A and B.
Li-yao
- [Coq-Club] Why does this apply tactic with a lambda fail?, Li-yao Xia, 06/07/2018
- RE: [Coq-Club] Why does this apply tactic with a lambda fail?, Jason -Zhong Sheng- Hu, 06/07/2018
- Re: [Coq-Club] Why does this apply tactic with a lambda fail?, Anton Trunov, 06/07/2018
Archive powered by MHonArc 2.6.18.