coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: James Wilcox <wilcoxjay AT gmail.com>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] proof with nat_ind
- Date: Wed, 2 Dec 2015 10:04:42 -0800
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=wilcoxjay AT gmail.com; spf=Pass smtp.mailfrom=wilcoxjay AT gmail.com; spf=None smtp.helo=postmaster AT mail-qg0-f48.google.com
- Ironport-phdr: 9a23:X6onaRQa0adcZFIb7t/xXh5+Udpsv+yvbD5Q0YIujvd0So/mwa64YhON2/xhgRfzUJnB7Loc0qyN4/6mATRIyK3CmU5BWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYsExnyfTB4Ov7yUtaLyZ/niabqo9X6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD8/gl/sVDGaj/dqU8BbBfCT0nNTIr6dfi8xLESE2S9zNcCT1O00kAPw+Q5xbjG5z1ryHSt+xn2SDcM9elY6ozXGGA5qJmU1fXiSMMMC5xpH7Wjsd3nKBSsTquohV+x8jfZ4TDZ6k2Rb/UYd5PHDkJZc1WTSEUWdvkYg==
Also note that this is provable without induction (your proof doesn't use the induction hypothesis q). For example, it follows directly from f_equal.
Definition aux1b (n : nat) : forall m : nat, forall e : n = m, S n = S m :=
fun m e => f_equal S e.
On Wed, Dec 2, 2015 at 9:58 AM, Pierre Casteran <pierre.casteran AT labri.fr> wrote:
Perhaps it's just a syntax error, if you put nat_ind at a place where a tactic is expected.
You should try to write something like :
exact (nat_ind ... ...)
or
apply nat_ind with ...
or
intros n; pattern; apply nat_ind.
Pierre
Quoting Patricia Peratto <psperatto AT vera.com.uy>:
I want to prove (using nat_ind) the following proposition.
I adjoin the proof I have written myself.
Definition aux1b (n:nat) : forall m:nat,
forall (e:n=m),S n = S m.
nat_ind (fun n:nat =>
(forall m:nat, forall e:n=m, S n = S m))
(fun m:nat, fun e:O=m,
(f_equal nat nat S O m e))
(fun p:nat, fun q:(forall m:nat,
forall e:p = m, S p = S m) =>
(fun m2:nat =>
(fun e2:(S p)=m2 =>
(f_equal nat nat S (S p) m2 e2))))
n.
I have proved it using "induction" but I want to
find the proof using nat_ind.
I have gotten the following message:
Error: The reference nat_ind was not found in the current environment.
Someone can say me where I'm wrong?
Regards
Patricia
- [Coq-Club] proof with nat_ind, Patricia Peratto, 12/02/2015
- Re: [Coq-Club] proof with nat_ind, Jonathan Leivent, 12/02/2015
- Re: [Coq-Club] proof with nat_ind, Pierre Casteran, 12/02/2015
- Re: [Coq-Club] proof with nat_ind, James Wilcox, 12/02/2015
- Re: [Coq-Club] proof with nat_ind, Emilio Jesús Gallego Arias, 12/02/2015
- Re: [Coq-Club] proof with nat_ind, Dominique Larchey-Wendling, 12/03/2015
Archive powered by MHonArc 2.6.18.