Skip to content

Coinductive records are also treated as inductive by termination checker. #1

@andreasabel

Description

@andreasabel
-- 2014-01-09
-- Treating a type as both inductive and coinductive bears trouble…

data R -(i : Size)
{ delay (force : [j < i] -> R j)
} fields force

-- Coinductive interpretation:

fun inh : [i : Size] -> R i
{ inh i .force j = inh j
}

data Empty : Set {}

-- Inductive interpretation:

fun elim : R # -> Empty
{ elim (delay r) = elim (r #)
}

-- Trouble:

let absurd : Empty = elim (inh #)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions