Documentation

Linglib.Studies.ChatzikyriakidisLuo2020

Chatzikyriakidis & Luo (2020): MTT semantics via coercive subtyping #

[CL20]

Modern Type Theory (MTT) analysis where common nouns denote types, not predicates, and subtyping is coerciveA ≤_c B whenever there is a unique implicit coercion c : A → B that the elaborator inserts on demand (paper §2.4, eqs. CA/CD on p. 40).

Coercive vs subsumptive. C&L explicitly reject subsumptive subtyping for MTT (p. 39): "subsumptive subtyping is incompatible with some key properties of modern type theories and, as a consequence, cannot be employed for an MTT." This file uses Lean's Coe typeclass, which is the canonical coercive-subtyping mechanism (value-level coercion functions, automatic elaboration-time insertion).

Coherence. Paper p. 40 fn 18 requires unique coercions between any two types. Lean's typeclass resolution picks an instance by priority rather than enforcing uniqueness; coherence is therefore the file author's responsibility, documented via CoherentCoercion Props below.

Main definitions #

References #

Paper §3.2.1: CNs as types #

Instances For
    @[implicit_reducible]
    Equations
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      Instances For
        @[implicit_reducible]
        Equations
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Paper §3.2.2: projective subtyping via Σ-types #

          Man := Σx:Human.male(x) (paper eq. 2.41); Man ≤_π₁ Human (eq. 2.42, p. 41) — the first projection is the coercion. In Lean, this is {h : Human // Male h} with Coe ... Human via Subtype.val.

          @[implicit_reducible]
          Equations
          @[implicit_reducible]
          Equations

          Paper eq. 3.30-3.33 paradigm: read john W&P #

          Paper §3.2.2: read : HumanBook → Prop.

          Equations
          Instances For

            johnMan : Man (John is a Man = a male Human).

            Equations
            Instances For

              The expanded form: applying the explicit coercions yields the same term Lean's elaborator produces implicitly (paper rule CD, p. 40: f(a) = f(c(a))).

              Coherence (paper p. 41 fn 18) #

              Coherence of coercions between two types: any two Coe-derived coercion functions agree. Lean's typeclass resolution does not enforce this (it picks by priority); the user declares and proves coherence on a case-by-case basis.

              • coh (c₁ c₂ : AB) : c₁ = Coe.coec₂ = Coe.coec₁ = c₂
              Instances

                The Man-to-Human coercion is trivially coherent: there is only one Coe instance declared.

                The HeavyBook-to-Book coercion is trivially coherent.

                Paper §3.2.2: subtyping propagates through function types #

                C&L p. 55: if A' ≤ A and B ≤ B', then A → B ≤ A' → B' (contravariance + covariance). In Lean this is automatic — any f : Human → Prop accepts m : Man via Coe insertion.

                Failure case: missing coercion is a type error #

                The paper's selectional-restriction argument: if there is no Coe Book Human, then Talks warAndPeace fails to elaborate. Lean's type error IS the paper's "category mistake" (paper §3.2.1, table 3.1 commentary). The following would not typecheck:

                example : Prop := Talks Book.warAndPeace