coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: "�����" <qgxu AT mail.shu.edu.cn>
- To: "Pierre Casteran" <pierre.casteran AT labri.fr>
- Cc: "coq-club" <coq-club AT inria.fr>
- Subject: ظ: Re: [Coq-Club] usage of eq_ind
- Date: Fri, 28 May 2010 18:59:58 +0800
Prof. Pierre Casteran:
thank you very much!
I learned a lot from your reply,
especially the usage of the implicit
argument.
Would you like to give me the further hints?
the term "eq_ind x (fun z => z = x) (refl_equal x) y h" has type
"y=x"
What's meaning of the type "x=y" ? Is it a
predication type over type Aor a Set type or the dependent product
type?
thanks a lot!
Best Kinds!
Q.g. XU
qgxu AT mail.shu.edu.cn
2010-05-28
From:
Pierre Casteran
Date:
2010-05-27 20:30:12
To: qgxu
Cc:
coq-club
Subject:
Re: [Coq-Club] usage of eq_ind
Hi,
Le 27/05/2010 13:32, qgxu AT mail.shu.edu.cn a crit :
Ok. The type of eq_sym is the following : Check eq_sym. eq_sym : forall (A : Type) (x y : A), x = y -> y = x (Note that Coq's Standard Library already has sym_eq (in Init.Logic)
In an interactive proof of eq_sym , the simplest way is to get a goal : H : x = y ----------- y = x then rewrite <- H. You can also apply explicitely eq_ind, but rewrite is more usual. Goal forall (A : Type) (x y : A), x = y -> y = x. intros A x y H. pattern y. (* puts the goal under the form (P y) *) apply (eq_ind x);trivial. Qed. i.e. In eq_ind, the argument "A" is implicit (just check it by typing "About eq_ind" About eq_ind. eq_ind : forall (A : Type) (x : A) (P : A -> Prop), P x -> forall y : A, x = y -> P y Argument A is implicit So if you consider the term eq_ind x (fun z => z=x) (refl_equal x) y h. the correspondance is A <-> A (A implicit in eq_ind) x <-> x P <->fun z => z = x P x <-> (fun z => z = x) x (reduces to x = x ) y <-> y x = y <-> x = y P y <-> (fun z => z = x) y (reduces to y = x ) So the term "eq_ind x (fun z => z = x) (refl_equal x) y h" has type "y=x" Again, this job is done by "rewrite" Hope it helps, Pierre ... |
- [Coq-Club] usage of eq_ind, qgxu
- Re: [Coq-Club] usage of eq_ind, Adam Chlipala
- Re: [Coq-Club] usage of eq_ind, Pierre Casteran
- ظ: Re: [Coq-Club] usage of eq_ind,
- Re: ظ: Re: [Coq-Club] usage of eq_ind, Pierre Casteran
- Re: 回复: Re: [Coq-Club] usage of eq_ind, Roman Beslik
Archive powered by MhonArc 2.6.16.