Repository navigation
v0.49.0
Native proofs over reflexive types, and the native tactics' induction … with on parameterized and indexed types. A new example,
example/lean_to_prooflang/branching, has infinitely branching trees (a
node with one child per natural number): all 10 obligations are proved
with Lean and natively (v0.48.0 proved none of them natively), and
verify --offline links them strictly.
- Reflexive types natively:
- a
matchon one compiles to its recursor; a recursive call through
a function field (double(f(n))atlim(f)) is the field's
hypothesis applied; - induction's hypothesis for a function field is a function too (
∀ n, P(f(n))); - offline, Lean's compilation of such a definition (
brecOn) is
proved equal to the native one, a function field's case by
funext. Lean-made certificates now always carrycongrand
funext, which those proofs use (a certificate had them only when
Lean's own proofs did).
- a
induction … within the native tactics on a project type with
parameters (Tree(α),Le(a, b)) or indices (Vec(α, n)), as Lean's
inductionruns it: the indices must be distinct variables and are
generalized, the hypotheses depending on the variable or its indices
are reverted with it, and an implicit field (cons's{n}) takes no
case name (| cons x xs ih). The families example's tactic proofs now
run as written.simp only [f]on a recursive definition folds what its unfolding
leaves of a recursive call back intof(length(cons(x, xs))to
length(xs) + 1, not a recursor application), as Lean's equation lemma
states it, sorw [ih]finds it.- Prover:
- a hypothesis whose definition computes to
Falsecloses any goal; - arithmetic computes a recursor application whose major premise is a
constructor (size(succ(succ(x)))issize(x) + 2); - an induction case uses its hypothesis by modus ponens whenever the
motive generalizes a binder (the hypothesis is then an implication).
- a hypothesis whose definition computes to
- Limits: a function field whose arguments' types depend on other
fields, and a reflexive indexed family, are left to Lean; a function
field with several arguments compiles natively but does not link
offline. Mutual and nested types still have no nativematchor
induction: ProofLang has no mutual definitions, and Lean'sinduction
takes neither kind.