Skip to Content.
Sympa Menu

coq-club - Types in Coq

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Types in Coq


chronological Thread 
  • From: Antonia Balaa <Antonia.Balaa AT sophia.inria.fr>
  • To: coq-club AT pauillac.inria.fr
  • Subject: Types in Coq
  • Date: Mon, 20 Nov 2000 16:38:37 +0100

Dear all,

        I'm trying to type the expressions: titi and toto (see below),
 and I would like to know why these two terms do not have the same type.
The last Check command raises an error. Could you explain me why?

Best Regards.
        Antonia
-----------------------------------------------------------------------------

Require Arith.
Require Compare_dec.

Variable x : nat.
Variable toto :  O
        =(<[_:{x=O}+{(lt O x)}]nat>Cases (zerop x) of
            (left _) => O
          | (right _) => O
          end).

Variable titi : O = (Cases (zerop x) of
                       (left _) => O
                     | (right _) => O
                     end).

Check (titi::  O
        =(<[_:{x=O}+{(lt O x)}]nat>Cases (zerop x) of
            (left _) => O
          | (right _) => O
          end)).


  Antonia







Archive powered by MhonArc 2.6.16.

Top of Page