Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] omega's term

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] omega's term


chronological Thread 
  • From: Yakov Zaytsev <yakov AT yakov.cc>
  • To: Adam Chlipala <adam AT chlipala.net>
  • Cc: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] omega's term
  • Date: Sat, 20 Mar 2010 09:58:56 +0300

(*Now I'm confused :-). [Zle] is defined as follows. 
Why then it does not have type [Zle : Z -> Z -> Prop -> Prop] because of 
application of [not]?*)
Print Zle.
(* Zle = fun x y : Z => not (eq (Zcompare x y) Gt) *)
(*      : Z -> Z -> Prop *)
Check Zle.
(* Zle *)
(*      : Z -> Z -> Prop *)
Check not.
(* not *)
(*      : Prop -> Prop *)
(*I'm Haskell user.)

On Mar 19, 2010, at 3:41 PM, Adam Chlipala wrote:

> Yakov Zaytsev wrote:
>> I used omega to solve this inequality
>
>>    Lemma zgtz : not (0 > 0).
>
>> Now I can't get what does resulting term mean
>
>>    Require Import Arith.
>>    (*Require Import Omega.*)
>>    Require Import Coq.ZArith.auxiliary. (* Zgt_left *)
>>    Require Import Coq.ZArith.Znat. (* inj_gt *)
>>    Parameter H: 0 > 0.
>>    Definition left := Zgt_left 0 0 (inj_gt 0 0 H).
>>    Definition zgtz := left (eq_refl Gt).
>
>> Left doesn't have arrow type, does it!? Why is zgtz well-typed then?
> 
> In fact, [left] _does_ have a function type.  Its type is a call to [Zle], 
> which evaluates to an expression built with [<>], which evaluates to the 
> negation of an [=] fact.  A negation is encoded as a function returning 
> [False] proofs.





Archive powered by MhonArc 2.6.16.

Top of Page