I am learning pure type systems to better understand functional (and general) programming.
My question arises mainly from the two facts:
It is known that we can define (co)inductive types in pure System-Fw (see Recursive types for free).
At the same time, it is known that we cannot come up with an inductive encoding that would allow us to derive the induction principle in $\lambda P2$ (see Induction Is Not Derivable in Second Order Dependent Type Theory).
My question is: is it true that we cannot define an (inhabited) dependent inductive type (e.g Vector
from Idris)
data Vect : Nat -> Type -> Type where
Nil : Vect Z a
Cons : a -> Vect k a -> Vect (S k) a
and pattern match on it similarly to pattern matching on Sum
types in (1) in a pure type system such as Calculus of Constructions?