-
Notifications
You must be signed in to change notification settings - Fork 410
Check needed when ∞ < ∞ is ok for sizes #1201
Copy link
Copy link
Open
Labels
falseProof of the empty type which checks without known-unsafe flags (e.g. without --type-in-type)Proof of the empty type which checks without known-unsafe flags (e.g. without --type-in-type)infinity-less-than-infinityBugs relating to the ∞ < ∞ ruleBugs relating to the ∞ < ∞ rulesized typesSized types, termination checking with sized types, size inferenceSized types, termination checking with sized types, size inferencetype: bugIssues and pull requests about actual bugsIssues and pull requests about actual bugs
Milestone
Description
{-# 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
falseProof of the empty type which checks without known-unsafe flags (e.g. without --type-in-type)Proof of the empty type which checks without known-unsafe flags (e.g. without --type-in-type)infinity-less-than-infinityBugs relating to the ∞ < ∞ ruleBugs relating to the ∞ < ∞ rulesized typesSized types, termination checking with sized types, size inferenceSized types, termination checking with sized types, size inferencetype: bugIssues and pull requests about actual bugsIssues and pull requests about actual bugs