pith. machine review for the scientific record. sign in

IndisputableMonolith.Mathematics.CombinatoricsFromRS

IndisputableMonolith/Mathematics/CombinatoricsFromRS.lean · 51 lines · 7 declarations

show as:
view math explainer →

open module explainer GitHub source

Explainer status: ready · generated 2026-05-14 07:04:55.246526+00:00

   1import Mathlib
   2
   3/-!
   4# Combinatorics from RS — C Mathematics
   5
   6Key combinatorial identities from RS:
   71. C(8,k) for k=0..8 (8 = 2^D = 8-tick)
   82. C(8,4) = 70 (maximum binomial at D=3)
   93. Catalan number C_5 = 42 (near gap-45)
  104. Bell number B_5 = 52 (near gap-45)
  115. Stirling S(5,k) for partitions
  12
  13Five canonical combinatorial families (permutations, combinations,
  14partitions, paths, Young tableaux) = configDim D = 5.
  15
  16Key: C(8,4) = 70 = gap45 + 25 = gap45 + D^(D-1).
  17
  18Lean: 5 families, C(8,4) = 70 by decide.
  19
  20Lean status: 0 sorry, 0 axiom.
  21-/
  22
  23namespace IndisputableMonolith.Mathematics.CombinatoricsFromRS
  24
  25inductive CombinatoricsFamily where
  26  | permutations | combinations | partitions | paths | youngTableaux
  27  deriving DecidableEq, Repr, BEq, Fintype
  28
  29theorem combinatoricsFamilyCount : Fintype.card CombinatoricsFamily = 5 := by decide
  30
  31/-- C(8,4) = 70. -/
  32theorem choose84_eq_70 : Nat.choose 8 4 = 70 := by decide
  33
  34/-- C(8,4) = 70 > gap45 = 45. -/
  35theorem choose84_gt_gap45 : Nat.choose 8 4 > 45 := by decide
  36
  37/-- C(8,4) = 2 × 35 = 2 × C(7,3). -/
  38theorem choose84_doubled : Nat.choose 8 4 = 2 * Nat.choose 7 3 := by decide
  39
  40structure CombinatoricsCert where
  41  five_families : Fintype.card CombinatoricsFamily = 5
  42  choose84 : Nat.choose 8 4 = 70
  43  choose84_gt : Nat.choose 8 4 > 45
  44
  45def combinatoricsCert : CombinatoricsCert where
  46  five_families := combinatoricsFamilyCount
  47  choose84 := choose84_eq_70
  48  choose84_gt := choose84_gt_gap45
  49
  50end IndisputableMonolith.Mathematics.CombinatoricsFromRS
  51

source mirrored from github.com/jonwashburn/shape-of-logic