coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: franck.barbier AT franckbarbier.com
- To: coq-club AT inria.fr
- Subject: [Coq-Club] Trivial? proof on a simple inductive type
- Date: Tue, 8 Mar 2011 13:40:25 +0100
I become quite mad on the second proof... I guess there are two solutions. The
proof is "too much trivial" or artificially complicated, even not proovable ?
Help appreciated.
Inductive X : Type := God | cons : X -> X.
Definition father(x : X) : X := match x with
| cons source => source
| _ => God
end.
Lemma Quasi_irreflexivity : forall i : X, i = father i -> i = God. (* solution
by P. Cast�ran *)
Proof.
induction i;trivial.
Lemma No_loop : forall i : X, i <> cons i. (* Somehow ugly... *)
Proof.
induction i.
discriminate.
intro H;injection H;intro H1;destruct IHi;auto.
Qed.
simpl;intro H;destruct (No_loop i);auto.
Qed.
Fixpoint ancestor(n : nat) (x : X) : X := match n with
| 0 => father x
| S m => father (ancestor m x)
end.
Lemma Quasi_irreflexivity' : forall i : X, forall n : nat, i = ancestor n i ->
i = God.
Proof.
intros.
induction n.
simpl in H.
apply Quasi_irreflexivity.
exact H.
(* pb from here...
elim IHn.
tauto.
*)
Qed.
- [Coq-Club] Trivial? proof on a simple inductive type, franck . barbier
- Re: [Coq-Club] Trivial? proof on a simple inductive type,
Sylvain Heraud
- Re: [Coq-Club] Trivial? proof on a simple inductive type, Sylvain Heraud
- Re: [Coq-Club] Trivial? proof on a simple inductive type, Brandon Moore
- Re: [Coq-Club] Trivial? proof on a simple inductive type, Adam Chlipala
- Re: [Coq-Club] Trivial? proof on a simple inductive type,
Sylvain Heraud
Archive powered by MhonArc 2.6.16.