Skip to content

Check needed when ∞ < ∞ is ok for sizes #1201

@GoogleCodeExporter

Description

@GoogleCodeExporter
{-# OPTIONS --copatterns #-}
open import Common.Size

mutual
  data D (i : Size) : Set where
    c :  (j : Size< i)  R j  D i

  record R (i : Size) : Set where
    coinductive
    constructor delay
    field       force : D i
open R

-- coinductive definition of inhabitant
mutual
  inR : R ∞
  force inR = inD

  inD : D ∞
  inD = c ∞ inR   -- ∞ < ∞

data  : Set where

-- inductive use of inhabitant
mutual
  loop :  i  D i  ⊥
  loop i (c j r) = loopR j r

  loopR :  i  R i  ⊥
  loopR i r = loop i (force r)

absurd : ⊥
absurd = loop ∞ inD

Original issue reported on code.google.com by [email protected] on 16 Jun 2014 at 12:09

Metadata

Metadata

Assignees

No one assigned

    Labels

    falseProof of the empty type which checks without known-unsafe flags (e.g. without --type-in-type)infinity-less-than-infinityBugs relating to the ∞ < ∞ rulesized typesSized types, termination checking with sized types, size inferencetype: bugIssues and pull requests about actual bugs

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions