Skip to content

v0.52.0

Choose a tag to compare

@gmpassos gmpassos released this 01 Dec 21:57
· 21 commits to main since this release
f14e44c

The Lean importer reaches more of Mathlib. The round-trip suite gains
Mathlib.Logic.Relation: 163 theorems imported, self-checked, and each
kernel-verified through the generated Lean (0.51.0 imported 139 of them).
Mathlib.Logic.Function.Basic now imports 128 theorems (100 before). In
all, the suite covers 383 theorems across four modules.

  • The front end's unifier:
    • Pattern unification. A metavariable applied to distinct bound
      variables (?φ(x, y) against Prop, Function.swap's dependent
      codomain) is the other side abstracted over them, its λ binders typed
      as those variables (the solved implicit argument is part of the
      elaborated term, and its hash). A solution λ x, g x is g, as
      first-order unification found before.
    • Universe-polymorphic constants at another level. A used constant's
      own universe variables are flexible at its use (Setoid(α: Sort(u))
      at α: Type(v)), even when Mathlib names the using declaration's alike
      (u_1): any level they can be (max(1, u) is never Prop). Lean
      checks the instantiation; this checker may accept a level mismatch
      Lean rejects (one variable used at two levels), never reject what Lean
      accepts. A declaration whose stored IR would mention such a variable
      (Id(Setoid)) is an error.
  • The importer:
    • Partially applied relations, connectives, set and arithmetic
      operators
      (@Eq α in Subrelation r (@Eq α), And p) are
      η-expanded to λ x y ↦ x = y, each side typed as the operator takes it
      (HPow.hPow ℝ ℕ ℝ x is λ y: ℕ ↦ x ^ y); not a composition or a
      product.
    • A Π whose domain is a proposition and whose body is not (an
      inductive predicate's motive, (x: α) → q(x) → Prop) stays a function
      type, not an implication, and a function type prints with its binder
      named unless its domain is plainly a type: q(x) → Prop would read
      back as an implication, and Prop is no proposition.
    • Refused, with the reason:
      • an eliminator (an implicit motive: casesOn, recOn, below),
        whose motive the generated Lean does not infer;
      • a theorem with a premise that has implicit binders of its own
        (head : ∀ {a c}, …), which ProofLang cannot state and whose
        citation meets Lean's implicit lambdas.