This modification is relevant for fixing regressions on recent changes to the auto implicit behavior for inductive families. The following declarations are now accepted: ```lean inductive HasType : Fin n → Vector Ty n → Ty → Type where | stop : HasType 0 (ty :: ctx) ty | pop : HasType k ctx ty → HasType k.succ (u :: ctx) ty inductive Sublist : List α → List α → Prop | slnil : Sublist [] [] | cons l₁ l₂ a : Sublist l₁ l₂ → Sublist l₁ (a :: l₂) | cons2 l₁ l₂ a : Sublist l₁ l₂ → Sublist (a :: l₁) (a :: l₂) inductive Lst : Type u → Type u | nil : Lst α | cons : α → Lst α → Lst α ``` TODO: universe inference for `inductive` should be improved. The current approach is not good enough when we have auto implicits. TODO: allow implicit fixed indices that do not depend on indices that cannot be moved to become parameters.
15 lines
789 B
Text
15 lines
789 B
Text
inductive sublist.{u_1} : {α : Type u_1} → List α → List α → Prop
|
||
number of parameters: 1
|
||
constructors:
|
||
sublist.slnil : ∀ {a : Type u_1}, sublist [] []
|
||
sublist.cons : ∀ {a : Type u_1} (l₁ l₂ : List a) (a_1 : a), sublist l₁ l₂ → sublist l₁ (a_1 :: l₂)
|
||
sublist.cons2 : ∀ {a : Type u_1} (l₁ l₂ : List a) (a_1 : a), sublist l₁ l₂ → sublist (a_1 :: l₁) (a_1 :: l₂)
|
||
inductive Foo.{u_1} : {α : Type u_1} → List α → Type u_1
|
||
number of parameters: 1
|
||
constructors:
|
||
Foo.mk₁ : {a : Type u_1} → Foo []
|
||
Foo.mk₂ : {α : Type u_1} → {as : List α} → (a : α) → Foo as → Foo (a :: as)
|
||
inductive Bla.{u_1} : {a : Type u_1} → {as : List a} → Foo as → Type
|
||
number of parameters: 1
|
||
constructors:
|
||
Bla.mk₁ : {a : Type u_1} → Bla Foo.mk₁
|