Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Defining a term making use of eta-conversion without tactics (a bug in 8.4?)

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Defining a term making use of eta-conversion without tactics (a bug in 8.4?)


Chronological Thread 
  • From: Jason Gross <jasongross9 AT gmail.com>
  • To: coq-club <coq-club AT inria.fr>
  • Subject: [Coq-Club] Defining a term making use of eta-conversion without tactics (a bug in 8.4?)
  • Date: Mon, 4 Feb 2013 09:25:22 -0500

Hi,
I have the following code:

  Let fun_eta (a b : Type) (f : a -> b) : (fun x => f x) = f.
    exact eq_refl.
  Defined.
  Set Printing All.
  Print fun_eta.
  Check fun (a b : Type) (f : a -> b) =>
                       @eq_refl (a -> b) (fun x : a => f x) :
                       forall (a b : Type) (f : a -> b),
                       @eq (a -> b) (fun x : a => f x) f.
  (* Toplevel input, characters 77-229:
Error:
In environment
fun_eta := fun (a b : Type) (f : a -> b) =>
                   @eq_refl (a -> b) (fun x : a => f x)
                : forall (a b : Type) (f : a -> b),
                  @eq (a -> b) (fun x : a => f x) f
a : Type
b : Type
f : a -> b
The term "@eq_refl (a -> b) (fun x : a => f x)" has type
 "@eq (a -> b) (fun x : a => f x) (fun x : a => f x)"
 while it is expected to have type
 "forall (a b : Type) (f : a -> b), @eq (a -> b) (fun x : a => f x) f". *)

When I [Print fun_eta.], I get something that doesn't type-check according to [Check] and [Definition].  Is there a way to define this term without using tactics?  Is this a bug in Coq 8.4?

Thanks.

-Jason




Archive powered by MHonArc 2.6.18.

Top of Page