Skip to content

Well-founded induction on Size is inconsistent #3026

Open

Description

@twanvl

It is possible to do well-founded induction on the < relation of Size, and since ∞ < ∞, we get an inconsistency:

module _ where

open import Size
open import Induction.WellFounded
open import Data.Empty

data _<_ : Size → Size → Set where
  gt : ∀ (i : Size) (j : Size< i) → j < i

<-wf : WellFounded _<_
<-wf i = acc (go i)
  where
  go : ∀ (i j : Size) → (j < i) → Acc _<_ j
  go i j (gt .i j') = <-wf j

acc-∞ : Acc _<_ ∞
acc-∞ = <-wf ∞

∞<∞ : ∞ < ∞
∞<∞ = gt ∞ ∞

foo : Acc _<_ ∞ → ⊥
foo (acc a) = foo (a ∞ ∞<∞)

bad : ⊥
bad = foo acc-∞

This is reproducible in HEAD, Agda version 2.6.0-971083d.

Activity

  1. added
    falseProof of the empty type which checks without known-unsafe flags (e.g. without --type-in-type)
    regression in 2.5.3Regression that first appeared in Agda 2.5.3
    on Apr 5, 2018
  2. gallais commented on Apr 5, 2018

    @gallais
    Member

    The definition of <-wf is rejected in 2.5.2:

    Termination checking failed for the following functions:
      <-wf
    Problematic calls:
      go i
        (at /home/gallais/languages/agda/wfsize.agda:11,15-17)
      <-wf j
        (at /home/gallais/languages/agda/wfsize.agda:14,23-27)
  3. added
    sized typesSized types, termination checking with sized types, size inference
    on Apr 5, 2018
  4. nad commented on Apr 5, 2018

    @nad
    Collaborator

    I think we should get rid of ∞ < ∞. See #2820.

  5. added
    type: bugIssues and pull requests about actual bugs
    on Apr 5, 2018
  6. added
    regression on masterUnreleased regression in development version (Change to "regression in ..." should it be released!)
    on May 24, 2018
  7. added this to the 2.5.5 milestone on Jun 1, 2018
  8. modified the milestones: 2.6.0, 2.6.1 on Dec 10, 2018
  9. removed
    regression on masterUnreleased regression in development version (Change to "regression in ..." should it be released!)
    on Oct 7, 2019
  10. modified the milestones: 2.6.1, 2.6.2 on Dec 1, 2019
  11. modified the milestones: 2.6.2, 2.6.3 on Feb 10, 2021
  12. modified the milestones: 2.6.3, 2.6.4 on Apr 7, 2022
  13. modified the milestones: 2.6.4, Later on Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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 ∞ < ∞ ruleregression in 2.5.3Regression that first appeared in Agda 2.5.3sized 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