Skip to content

Unsoundness with self-referential indices in inductives #2125

Closed

Description

@gebner
open Classical

noncomputable def f (α : Type) : Bool :=
  Nonempty α

inductive C : Bool → Type
  | c : C (f (C false))

theorem unsound : False :=
  if h : Nonempty (C false) then by
    let ⟨c⟩ := h
    generalize hf : false = b at c
    let ⟨⟩ := c
    simp [f, h] at hf
  else
    have : f (C false) = false := by simp [f, h]
    h ⟨this ▸ .c⟩

Thanks to @nikswamy for the pointer!

Activity

  1. added
    bug
    on Feb 27, 2023
  2. added a commit that references this issue on Feb 28, 2023
    c00a1af
  3. added a commit that references this issue on Feb 28, 2023
    0da281f
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions