Log Asymptotic mathematical objects
DefinitionAnalyticCombinatorics_Ch8_Partitions_LogAsymptoticanalytic-combinatoricsinteger-partitionslean4
PartCum(N) is the cumulative partition count sum of part(n) from n=0 through N, inclusive. Given natural m<=n, addOnesPartition maps a partition of m to a partition of n by adjoining n-m parts equal to 1.
Definition code
import Definitions.Def_AnalyticCombinatorics_Ch8_Partitions_UpperBound
import Definitions.Def_AnalyticCombinatorics_Ch8_Partitions_Tauberian
import Mathlib
set_option autoImplicit true
set_option relaxedAutoImplicit false
set_option maxSynthPendingDepth 3
namespace AnalyticCombinatorics.Ch8.Partitions
open Filter
open scoped BigOperators Topology Asymptotics
-- The final transfer combines real logarithm/square-root limits with field
-- simplification; this keeps those terminal proofs within the local file.
set_option maxHeartbeats 400000
noncomputable def PartCum (N : ℕ) : ℝ :=
Tauberian.Cum part N
def addOnesPartition {m n : ℕ} (hmn : m ≤ n) (p : Nat.Partition m) :
Nat.Partition n where
parts := p.parts + Multiset.replicate (n - m) 1
parts_pos := by
intro i hi
rw [Multiset.mem_add] at hi
rcases hi with hi | hi
· exact p.parts_pos hi
· have h : i = 1 := Multiset.eq_of_mem_replicate hi
omega
parts_sum := by
rw [Multiset.sum_add, Multiset.sum_replicate, p.parts_sum]
simp
omega
end AnalyticCombinatorics.Ch8.Partitions
Source