miniagda icon indicating copy to clipboard operation
miniagda copied to clipboard

Coinductive records are also treated as inductive by termination checker.

Open andreasabel opened this issue 9 years ago • 1 comments

-- 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 #)

andreasabel avatar Dec 16 '16 15:12 andreasabel

See https://github.com/agda/agda/issues/1201.

andreasabel avatar Nov 04 '18 09:11 andreasabel