Repository navigation
v0.52.0
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)againstProp,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 xisg, 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 neverProp). 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.
- Pattern unification. A metavariable applied to distinct bound
- The importer:
- Partially applied relations, connectives, set and arithmetic
operators (@Eq αinSubrelation r (@Eq α),And p) are
η-expanded toλ x y ↦ x = y, each side typed as the operator takes it
(HPow.hPow ℝ ℕ ℝ xisλ 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) → Propwould read
back as an implication, andPropis 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.
- an eliminator (an implicit
- Partially applied relations, connectives, set and arithmetic