This paper presents the design of the Om language and an implementation of its type checker and bytecode extractor to Erlang. Om is an intermediate language based on a pure type system with the infinite number of universes, so it is known to be consistent in dependent type theory. The type checker can be switched between predicative and impredicative hierarchies of universes. The need to natively support Erlang platform dictated the look and feel of this work. This system is expected to be usable as trusted core for certified applications which could be run inside Erlang virtual machines LING and BEAM. The syntax is compatible with Morte language and supports its base library, however, it extends the indexed universes. We show how to program in this environment and link with Erlang inductive and coinductive free structures. A very basic prelude library is shipped as a part of the work. We briefly describe the top-level language which compiles to pure type system core. As the results, we will show lambda evaluation performance on BEAM virtual machine.

1.
P.
Martin-Löf
and
G.
Sambin
, Intuitionistic type theory,
Studies in proof theory
(
Bibliopolis
,
1984
).
2.
C.
Paulin-Mohring
, in All about Proofs, Proofs for All,
Studies in Logic (Mathematical logic and foundations)
, Vol.
55
, edited by
B. W.
Paleo
and
D.
Delahaye
(
College Publications
,
2015
).
3.
T.
Coquand
and
G.
Huet
, “The calculus of constructions,” in
Information and Computation
(
Academic Press, Inc.
,
Duluth, MN, USA
,
1988
), pp.
95
120
.
4.
H. P.
Barendregt
, in Handbook of Logic in Computer Science (Vol.
2
), edited by
S.
Abramsky
,
D. M.
Gabbay
, and
S. E.
Maibaum
(
Oxford University Press, Inc.
,
New York, NY, USA
,
1992
)
Chap. Lambda Calculi with Types
, pp.
117
309
.
5.
S. P.
Jones
and
E.
Meijer
, “
Henk: A typed intermediate language
,” in
In Proc. First Int’l Workshop on Types in Compilation
(
1997
).
6.
C.-E.
Ore
, “
The extended calculus of constructions (ecc) with inductive types
,” in
Information and Computation
, Vol.
99
(
1992
), pp.
231
264
.
7.
G.
Barthe
, “
Extensions of pure type systems
,” in
Typed Lambda Calculi and Applications: Second International Conference on Typed Lambda Calculi and Applications, TLCA ’95 Edinburgh, United Kingdom
, April 10–12, 1995 Proceedings, edited by
M.
Dezani-Ciancaglini
and
G.
Plotkin
(
Springer Berlin Heidelberg
,
Berlin, Heidelberg
,
1995
), pp.
16
31
.
8.
H.
Geuvers
, “Induction is not derivable in second order dependent type theory,” in
Typed Lambda Calculi and Applications: 5th International Conference, TLCA 2001 Kraków, Poland, May 2–5, 2001 Proceedings
, edited by
S.
Abramsky
(
Springer Berlin Heidelberg
,
Berlin, Heidelberg
,
2001
), pp.
166
181
.
9.
T.
Coquand
, “An algorithm for type-checking dependent types,” in
Sci. Comput. Program.
, Vol.
26
(
1996
), pp.
167
177
.
10.
C.
Böhm
and
A.
Berarducci
, “
Automatic synthesis of typed lambda-programs on term algebras
,” in
Theoretical Computer Science
, Vol.
39
(
1985
), pp.
135
154
.
11.
A.
Stump
, “The calculus of dependent lambda eliminations,” in
Journal of Functional Programming
, Vol.
27
(
Cambridge University Press
,
2017
).
12.
C.
Cohen
,
T.
Coquand
,
S.
Huber
, and
A.
Mörtberg
, in
Cubical Type Theory: a constructive interpretation of the univalence axiom
, Vol. abs/1611.02108 (
2017
).
13.
R.
Hinze
and
N.
Wu
, “Histo-and dynamorphisms revisited,” in
Proceedings of the 9th ACM SIGPLAN Workshop on Generic Programming
, WGP ’13 (
ACM
,
New York, NY, USA
,
2013
), pp.
1
12
.
14.
P.
Dagand
,
U. of Strathclyde. Department of Computer, and P. t. Information Sciences
,
A Cosmology of Datatypes: Reusability and Dependent Types
(
2013
).
15.
T.
Altenkirch
and
A.
Kaposi
, “
Type theory in type theory using quotient inductive types
,” in
Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
, POPL ’16 (
ACM
,
New York, NY, USA
,
2016
), pp.
18
29
.
16.
M.
Hamana
and
M. P.
Fiore
, “
A foundation for gadts and inductive families: dependent polynomial functor approach
,” in
Proceedings of the seventh ACM SIGPLAN workshop on Generic programming, WGP@ICFP 2011
,
Tokyo, Japan
, September 19-21, 2011 (
2011
), pp.
59
70
.
17.
P.
Fu
and
A.
Stump
, “
Self types for dependently typed lambda encodings
,” in
Rewriting and Typed Lambda Calculi - Joint International Conference, RTA-TLCA 2014, Held as Part of the Vienna Summer of Logic, VSL 2014
,
Vienna, Austria
, July 14-17, 2014. Proceedings (
2014
), pp.
224
239
.
This content is only available via PDF.