Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] "match (Zpos p?=0%Z) with ..." given "p : positive"

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] "match (Zpos p?=0%Z) with ..." given "p : positive"


chronological Thread 
  • From: Tie Cheng <chengtie AT gmail.com>
  • To: Adam Chlipala <adam AT chlipala.net>
  • Cc: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] "match (Zpos p?=0%Z) with ..." given "p : positive"
  • Date: Thu, 17 Feb 2011 18:24:46 +0100
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=RgW9v+2RgBdZINdieDl+T0ZWoyyA27xhGCDIZwRWiakzHL4YMHUEZbXNBS6ZxKeVB/ mchuTtsHSTGna0IWdOWl5DG/f9T64uI2f7Du8pGgeJkNLfxNW7WyL/ak82kRBwGNiaAT s/OwlV1z3hNMQikvNK545cYN046dF4rbYDL2c=

Actually, the structure of goal looks like:

(Zpos p * a_formula))%Z =
a_function
   match (Zpos p ?=0)%Z with
      | Eq => ...
      | Lt => ...
      | Gt ==> a_value
   end 

After "Simpl.", it changes to:

match (a_formula)%Z with
   | 0%Z => 0%Z
   | Zpos y' => Zpos (p * y')
   | Zneg y' => Zneg (p * y')
end =
(a_function a_value)%Z

But i do not know if a_formula is Zpos or Zneg or 0, i would expect a tactic such that it changes the goal to

(Zpos p * a_formula))%Z =
(a_function a_value)%Z

Is it possible?

Thanks and regards

Tie


On Thu, Feb 17, 2011 at 5:56 PM, Adam Chlipala <adam AT chlipala.net> wrote:
Tie Cheng wrote:
I have "p : positive" in hypothsis and "match (Zpos p?=0%Z) with | Eq => ... | Gt => ... | Lt => ..." as part of the goal. Is there a tactic to remove the "match" from the goal?

I would expect [simpl] to do the job.




Archive powered by MhonArc 2.6.16.

Top of Page