Skip to content

Equality is incompatible with sized types #2820

@andreasabel

Description

@andreasabel
open import Size
open import Relation.Binary.PropositionalEquality
open import Relation.Binary.PropositionalEquality.TrustMe

data  : Set where

data SizeLt (i : Size) : Set where
  [_] : (j : Size< i)  SizeLt i

module OneSize where 

  eq! :  (i j : Size)  i ≡ j
  eq! _ _ = trustMe

  cast :  i j  SizeLt i  SizeLt j
  cast i j = subst SizeLt (eq! i j)

  foo :  i  SizeLt i  ⊥
  foo i [ j ] = foo j (cast i j [ j ])

  test : ⊥
  test = foo ∞ [ ∞ ]

The term test is looping.

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