Skip to content

v0.49.0

Choose a tag to compare

@gmpassos gmpassos released this 01 Dec 10:24
· 31 commits to main since this release
b97659a

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 match on one compiles to its recursor; a recursive call through
      a function field (double(f(n)) at lim(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 carry congr and
      funext, which those proofs use (a certificate had them only when
      Lean's own proofs did).
  • induction … with in the native tactics on a project type with
    parameters (Tree(α), Le(a, b)) or indices (Vec(α, n)), as Lean's
    induction runs 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 into f (length(cons(x, xs)) to
    length(xs) + 1, not a recursor application), as Lean's equation lemma
    states it, so rw [ih] finds it.
  • Prover:
    • a hypothesis whose definition computes to False closes any goal;
    • arithmetic computes a recursor application whose major premise is a
      constructor (size(succ(succ(x))) is size(x) + 2);
    • an induction case uses its hypothesis by modus ponens whenever the
      motive generalizes a binder (the hypothesis is then an implication).
  • 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 native match or
    induction: ProofLang has no mutual definitions, and Lean's induction
    takes neither kind.