Skip to content

epfl-lara/SystemFR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

System FR Build Status

System FR's logo

Description

This project aims to formalize in Coq part of the Stainless project. It describes a call-by-value lambda-calculus and defines a rich type system (based on computations) that describes behaviors of lambda-calculus terms. Supported types include: System F polymorphism, recursive types, infinite intersections, refinement and dependent types, equality types.

Requirements

The proofs require Coq and Coq-Equations, which can be installed using opam with the coq and coq-equations packages. Some instructions are available here and there.

  • Coq 8.14.0
  • Coq-Equations 1.3.0+8.14

Compiling the Proofs

After installing Coq, you can compile the proofs using:

./configure
make -j4     # should take around 25 minutes

Overview of the proofs

All trees (for terms and for types) are defined in Trees.v. The operational semantics is given in SmallStep.v. The semantic definition of types is given in ReducibilityDefinition.v. We then prove soundness of inference rules for these types in the Erased*.v files (for erased terms) and in the Annotated*.v files (for annotated terms).

The file dependencies.pdf has an overview of the dependencies between all files.

Proofs for Scala Dependent Types project

We prove the following properties and the soundness of the typing rules. We rely on the following assumptions:

  • The terms and types appearing in goals/context satisfy some well-formedness conditions
  • The types are appearing in goals/context are non-empty
  • Inferred types are always syntactically singletons
  • During delta-beta reduction, the term being evaluated has type T_top (or equivalently, another arbitrary type)
  • In untangle (Untangle.v), we know which terms have the Tau property, and we rely on the abstract model of update and tlookup specified using axioms in TauProperty.v

Properties

  • widen gives a larger type widen_open_subtype in InferApp.v
  • delta_beta_reduction gives observationally equivalent terms: delta_beta_obs_equiv in DeltaBetaReduction.v
  • untangle returns an equivalent type untangle_open_equivalent_types in Untangle.v

Normalization Rules

Inference Rules

Subtyping Rules