Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Why I'm not getting any equalities as hypothesis in while filling underscores in proof mode

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Why I'm not getting any equalities as hypothesis in while filling underscores in proof mode


Chronological Thread 
  • From: Gabriel Scherer <gabriel.scherer AT gmail.com>
  • To: Coq Club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Why I'm not getting any equalities as hypothesis in while filling underscores in proof mode
  • Date: Sun, 6 Apr 2014 22:02:18 +0200

You can re-abstract over the equality, and apply eq_refl from outside
the pattern-matching.

refine (match n as k return (k = n) -> k + 0 = n with
| 0 => _
| S n' => _
end eq_refl).

On Sun, Apr 6, 2014 at 8:44 PM, Ömer Sinan Ağacan
<omeragacan AT gmail.com>
wrote:
> Let's say I have code like this:
>
> refine (match n with
> | 0 => _
> | S n' => _
> end).
>
> In proof mode, I was expecting to get `n = 0` while filling first
> underscore and `n = S n'` while filling second underscore, in fact I
> can't make any progress in my program without this equalities. But Coq
> doesn't give them to me as hypothesis. Why is this and what should I
> do to have that equalities in proof mode?
>
> Thanks.
>
> ---
> Ömer Sinan Ağacan
> http://osa1.net



Archive powered by MHonArc 2.6.18.

Top of Page