The codensity monad on a type constructor f is defined by: It is well known that C f is a monad for any type constructor f (not necessarily covaria ...
The codensity monad on a type constructor f is defined by: It is well known that C f is a monad for any type constructor f (not necessarily covaria ...
In this article, it is explained that each generic type argument in Scala 3 code is perceived as a dependent type to be conform with the DOT logic: h ...
I'd like to create a struct that is type-indexed (or, I guess as the Rust programmers would say, has a generic parameter of some array type). Somethin ...
I'm attempting to axiomatize a proof-irrelevant disjunction proposition with type elimination in Agda using the universe of proof-irrelevant propositi ...
I want to build a Hilbert matrix using the linear package and convert it to a list of lists. While this seems an easy task the type level constraints ...
With dependent types, you can either capture function properties in the type signature, like in concatenation with length-indexed lists or you can ...
The List type in Lean 4's prelude has a lot of nice goodies implemented, e.g. List.map, List.join, etc. A classic example in dependently-typed langua ...
I am new to Lean 4, and I was doing the exercises from Functional Programming in Lean, in particular the one about defining a length function for a cu ...
Given typename T and int N, the templated value below generates a null function pointer of the type: While the code works, I don't like that it pol ...
When learning Idris with Edwin's Type-driven Development with Idris, I read about the unique property of Idris that it's type is a first class constru ...
I want to pass double-arrays to/from a Fortran77 library with Foreign.Marshal.Array, but in my Haskell code, I want to use statically sized vectors fr ...
I was going through the Coq book from the maths perspective. I was trying to define a dependently typed function that returned a length list with n tr ...
I want to defined a lenghted list but I like arguments with names at the top of the inductive definition. Whenever I try that I get unification errors ...
Wanted to implement type safe matrix multiplication in Haskell. Defined the following: Eventually had the need to implement but the best I could ...
This code type-checks: type T :: Type -> foreach (r :: Type) -> Type -> Type data T k r a type T' :: Type -> Type type T' a = T a Identi ...
I have the following definitions for type precision: I want to prove that proofs of "x <| y" are unique: With the previous definition of TPre ...
I have this code: claim1 claim2 claim3 claim4 time1 time2 time3 time4 D ...
I want to define a relation over two type families in Coq and have come up with the following definition dep_rel and the identity relation dep_rel_id: ...
I want to prove a nearly trivial property of the take function for Vec in Agda. My problem stems from the fact that the type index of take consists ...
I have some incoming JSON (the field-order of which is not my choice) that embeds a dependent pair: and what type I should read data into depends o ...