FormalConjecturesForMathlib/NumberTheory/Harmonic.lean

GitHub source file

Explanation legend Lean4 Domain Explanation Language (L4DEL)

L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.

L4DEL
Lean4 Domain Explanation Language

Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.

Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1

5 declarations, 0 contain sorry, 0 declared as axioms

Block harmonic sums

Mathlib's harmonic n is the initial harmonic sum ∑_{1 ≤ k ≤ n} 1 / k. Several problems instead need the block sum ∑_{n ≤ k ≤ m} 1 / k, which is what harmonicBlock gives. Like harmonic it is valued in ℚ; cast at the use site when a real value is wanted.

Main definitions

Main results

Imports (4)
Imported by 1 file
  1. def harmonicBlock The block harmonic sum $\sum_{n\leq k\leq m}\frac{1}{k}$ line 45 source

    Source documentation

    The block harmonic sum $\sum_{n\leq k\leq m}\frac{1}{k}$. For n = 1 this is Mathlib's harmonic, see harmonicBlock_one.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat, Rat

    Proof uses: Finset.sum, Finset.Icc, Inv.inv

    6 instances, coercions and auxiliary constants left out.

    def harmonicBlock (n m : ℕ) : ℚ := ∑ k ∈ Finset.Icc n m, (k : ℚ)⁻¹
    …
  2. theorem harmonicBlock_eq_sum_one_div line 49 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat, Eq, Rat, harmonicBlock, Finset.sum, Finset.Icc, HDiv.hDiv, OfNat.ofNat

    Proof uses: of_eq_true, Inv.inv, Eq.trans, True, congrArg, Finset.sum_congr, Eq.refl, Finset, Membership.mem, one_div, eq_self

    22 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

  3. theorem harmonicBlock_eq_zero_of_lt line 54 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat, LT.lt, Eq, Rat, harmonicBlock, OfNat.ofNat

    Proof uses: of_eq_true, Eq.trans, True, congrFun', congrArg, Finset.sum_congr, Finset.Icc, EmptyCollection.emptyCollection, Finset, Inv.inv, Finset.Icc_eq_empty_of_lt, Membership.mem, Eq.refl, eq_self

    18 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

  4. theorem harmonicBlock_succ_top line 57 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat, LE.le, HAdd.hAdd, OfNat.ofNat, Eq, Rat, harmonicBlock, Inv.inv

    Proof uses: of_eq_true, Finset.sum, Finset.Icc, Eq.trans, True, congrFun', congrArg, AddCommMonoid, Finset.sum_Icc_succ_top, Nat.cast_add, Nat.cast_one, eq_self

    35 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

  5. theorem harmonicBlock_one The block sum starting at 1 is Mathlib's harmonic number line 62 source

    Source documentation

    The block sum starting at 1 is Mathlib's harmonic number.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat, Eq, Rat, harmonicBlock, OfNat.ofNat, harmonic

    Proof uses: Nat.recAux, of_eq_true, Eq.trans, True, congrFun', congrArg, Finset.sum_congr, Finset.Icc, EmptyCollection.emptyCollection, Finset, Inv.inv, Finset.Icc_eq_empty_of_lt, LT.lt, eq_self, Membership.mem, Eq.refl, Eq.mpr, HAdd.hAdd, id, harmonicBlock_succ_top and 22 more

    70 instances, coercions and auxiliary constants left out.

    Tactic trace: 6 steps

    Open to load the checked before-and-after goal states.

    theorem harmonicBlock_one (n : ℕ) : harmonicBlock 1 n = harmonic n := by
    …

    Mentions: harmonicBlock