Skip to content

fix: reject occurrences of inductive type in index - #2127

Merged
gebner merged 1 commit into
masterfrom
fix2125
Feb 28, 2023
Merged

gebner merged 1 commit into
masterfrom
fix2125

Conversation

@gebner

@gebner gebner commented Feb 28, 2023

Copy link
Copy Markdown
Member

Fixes #2125

@gebner
gebner enabled auto-merge (rebase) February 28, 2023 19:23
@gebner
gebner merged commit 0da281f into master Feb 28, 2023
@nomeata

nomeata commented Aug 13, 2025 •

Copy link
Copy Markdown
Collaborator

The unsoundness example in #2125 has an occurrence of the inductive type in the indices of the constructor’s return type:

-- The following inductive is unsound:
inductive C : Bool → Type
  -- Must be rejected because `C` occurs inside an index.
  | c : C (f (C false))

But the fix in this PR also forbids such occurrences in the arguments of the constructor:

inductive D : Bool → Type
  | c : D (f (D false)) → D true

Was that intentional? Or would such occurrences there be sound (maybe useful even)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unsoundness with self-referential indices in inductives

3 participants