Skip to content

v0.42.0

Choose a tag to compare

@gmpassos gmpassos released this 01 Dec 01:14
· 51 commits to main since this release
0fdf794

A new example, example/lean_to_prooflang/sequences, covers Cauchy
sequences and the geometric series. A convergent sequence is Cauchy, a
Cauchy sequence is bounded from some index on, and the geometric series
converges to 1 / (1 − r) for 0 ≤ r < 1, through the closed form of its
partial sums and rⁿ → 0. All 9 obligations are proved with Lean and
natively, and verify --offline links them. The example was written to
test 0.38.0 to 0.41.0 together, and what it found missing is in this
release.

  • Natively, an atom's value substituted: from equation hypotheses a = v (a any atom, geomSum(r, 0) = 0, a variable too), L − R = Σ cⱼ · (aⱼ − vⱼ) is a ring identity, the cofactors found by dividing out
    each aⱼ − vⱼ. What Lean's simp_all or rw then ring do, through a
    product or a power of the atom. The equations are substituted in rounds,
    so their order does not matter (f(x) = g(x) after g(x) = c).
  • xⁿ ≥ 0 (n symbolic, or a numeral past the ring's expansion,
    12) when 0 ≤ x by linear arithmetic over the hypotheses: natively for
    linarith (each base once per call), and in Lean as pow_nonneg in the
    same alternative as the supremum's and √t's facts.
  • Natively, a λ applied ((λ n ↦ geomSum(r, n))(n)), as the steps
    leave a sequence given as a function after intro n.
  • In Lean, a goal with a quotient gets field_simp; linarith, and
    rw [div_lt_iff₀ …] (div_le_iff₀, lt_div_iff₀, le_div_iff₀) then
    linarith, > and ≥ turned into < and ≤ first, last in
    strategy automatic's portfolio but for decide.
  • New native ℝ helpers: exists_pow_lt_of_lt_one,
    pow_le_pow_of_le_one, pow_nonneg, abs_of_nonneg, abs_div,
    abs_neg, pow_zero, mul_add, sub_eq_zero_of_eq'. Regenerated.
  • CI certifies the new example and verifies it offline.
  • Tests: the example (with Lean, its baseline, natively), the
    substitutions and their refusal, xⁿ ≥ 0, and the quotient
    alternatives.