Machine-checked statements
One hundred and fifty-one statements the book presents as theorems or relies on as identities, in one hundred and forty-three Lean files, are checked in Lean 4 against Mathlib, in the repository's lean\ directory, and build with no sorry. Each file states the result in the book's own terms and names the equation it checks. The proofs are short, since the statements are elementary, and their value is that the sentence in the chapter and the formal statement are the same sentence. The build was run on 2026-09-05 with Lean 4.32.2 and Mathlib at the matching tag, 8799 jobs including Mathlib, and the toolchain and dependency manifest are pinned in the directory. Every theorem named below was checked to depend on no axiom beyond the three Mathlib uses everywhere, propositional extensionality, quotient soundness, and choice.
| Statement | Where the book states it | Lean file and theorem |
|---|---|---|
| The read distortion identity. The expected quadratic form of an error under a read operator equals the trace of the operator times the error's second-moment matrix $M_\delta$, and for the identity reader it is the trace of that matrix, which is mean squared error. No symmetry of the operator and no centering are needed. The operator is fixed in the statement, so this is the linear case, and chapter 0 says when the averaged form is a surrogate. | Equation 0.10 | ReadDistortion.lean, read_distortion, identity_reader |
| The four-to-one flip. Two diagonal error covariances with the variances exchanged have the same trace, a reader leaning toward the first axis ranks them one way and the reader with its coordinates exchanged ranks them the other way, and with the book's numbers the two readings at 15 degrees are 1 minus 0.35 root 3 and 1 plus 0.35 root 3, which are 0.394 and 1.606 to three decimals. | Equation 3.1 and the cover | Flip.lean, flip, four_to_one_flip, readings_15_to_three_decimals |
| Anti-monotonicity of support and the Apriori principle. A superset has support at most that of any subset, so an infrequent itemset has only infrequent supersets, and every subset of a frequent itemset is frequent. | Chapter 5 section 5.3 | SafePruning.lean, support_anti, apriori, subset_of_frequent |
The Monotone Invariance Theorem. A strictly increasing transform of a score leaves its AUROC, defined pairwise with ties counted one half, unchanged (auroc_comp, hypothesis StrictMono); a strictly monotone transform in either direction leaves its optimal thresholded F1, defined by sweeping the threshold over every score value in both directions, unchanged (optF1_comp). Negation reverses the ranking and sends AUROC to one minus AUROC, so orientation-free authority uses $A^{*}=\max(A,1-A)$. | Equation 6.2 | MonotoneInvariance.lean, auroc_comp, optF1_comp |
| The read operator. With nonnegative row weights the workload average of the sensitivity's outer product is positive semidefinite, its diagonal entry for a coordinate is the weighted mean squared sensitivity to that coordinate, its off-diagonal entries are co-sensitivities, and with positive weights a direction is in its kernel exactly when every row's sensitivity is orthogonal to it, so the nuisance of the average is the intersection of the local nuisances. | Equations 0.8, 0.9, and 0.11, and chapter 0 section 0.6 | ReadOperator.lean, quad_readOp_nonneg, readOp_diag, readOp_offdiag, readOp_mulVec_eq_zero_iff |
| The quotient of equation 0.12 is exact for an affine consumer and local otherwise. An affine consumer does not change along a direction its gradient does not read, a nonconstant scalar affine consumer has an averaged operator of rank one on every workload, and the consumer that reads the squared length of a row has an averaged operator equal to four times the identity on the standard basis rows, of full rank, although each row reads one direction. | Equation 0.12 | ReadOperator.lean, affine_const_along_nuisance, readOp_affine, rank_one_reads_one_direction, readOp_sqLength_basis |
| The blind probe and its budget cliff. For an affine consumer a central difference along a direction returns the gradient's inner product with that direction exactly, at any nonzero step, so probing the standard basis recovers the gradient in two calls per coordinate, and a probe confined to fewer directions than the dimension has a nonzero blind direction along which two distinct affine consumers return identical readings on every call at every input. | Equation 11.4 and chapter 11 section 11.4 | ProbeCliff.lean, centralDiff_basis, exists_blind_direction, budget_cliff |
| False-clear rate and coverage. The false-clear rate times the coverage is the fraction of all decisions that were cleared and later refuted, a certificate that clears nothing has coverage zero, and the false-clear rate lies in the unit interval. | Equation 13.1 and equation 0.26 | Certificate.lean, falseClear_mul_coverage, coverage_empty, falseClear_mem_unit |
| Min over strata. The verdict passes a bar exactly when every scored stratum passes it, and it never exceeds any weighted mean of the strata. | Equation 10.7 | Certificate.lean, minOverStrata_passes_iff, minOverStrata_le_weighted_mean |
| The family-wise error and the Bonferroni correction. Under independence, $m$ looks at level $\alpha$ pass at least one null test with probability exactly $1-(1-\alpha)^m$; without any independence assumption that probability is at most $m\alpha$ by the union bound, and testing each look at level $\alpha/m$ keeps it at or below $\alpha$, so the Bonferroni guarantee needs no independence while the exact expression does. | Equation 8.3 | Bonferroni.lean, family_error_le, bonferroni |
| The Youden ceiling on F1. At an operating point with $TP$ true positives of $P$ positives and $FP$ false positives of $N$ negatives, if $TP/P-FP/N$ is at most $J$ then thresholded F1 is at most $2TP/(P+TP+N(TP/P-J))$, provided that denominator is positive, which it is whenever $TP/P\ge J$, and with no concavity assumed. | Equation 5.4 | YoudenF1.lean, f1_le_of_youden |
| The counterexample to the AUROC form of that ceiling. A score that ranks three of four positives above the single negative and one below has AUROC three quarters, by the pairwise definition of equation 0.16, and Youden index three quarters at the threshold between them, which exceeds $2A-1$. | Chapter 5 section 5.4 and the theory-radar erratum of 2026-09-03 | YoudenF1.lean, auroc_eq, youden_eq, youden_exceeds_auroc_form |
| The anti arm is worst. In the two-dimensional diagonal setting of the flip, a unit reader reads a diagonal error covariance as at most its larger variance, so among codes with the same total error and nonnegative parts no reading exceeds the total, and the code that puts the whole error on the read direction is read as the whole error. | Chapter 4 section 4.4 | AntiArm.lean, readDiag_le_max, readDiag_le_total, anti_arm_worst |
| The same read operator is not the same observer. Reversing the sign of every sensitivity, which reverses every ranking the consumer produces, leaves the averaged read operator unchanged. | Chapter 1 section 1.3 and chapter 2 | ReadOperator.lean, readOp_neg |
| Alignment lies in the unit interval. In the diagonal two-dimensional setting, the normalized overlap between the read operator and the source covariance is at most one by Cauchy–Schwarz, at least zero for nonnegative diagonals, and exactly one when the operator is a positive multiple of the covariance. | Equation 4.6 | Alignment.lean, alignment_le_one, alignment_nonneg, alignment_eq_one_of_proportional |
| The coupling null. When the read operator is a positive multiple of the covariance, one code is read as worse than another exactly when its covariance-weighted distortion is larger, so no flip is possible. | Equation 4.6 and chapter 4 section 4.4 | Alignment.lean, coupling_null |
| Hubness counts. The k-occurrence counts over a corpus sum to $k\lvert Q\rvert$ when every query retrieves $k$ corpus rows, so their mean is the Poisson mean $\mu$ of equation 0.17, the count depends on the query set alone once the retrieval rule is fixed, and a row is an anti-hub exactly when no query retrieves it. | Equations 10.3 and 0.17 | Hubness.lean, sum_count_eq, count_congr, antiHub_iff |
| The rank certificate's per-pair guarantee. When every compressed-to-exact distance ratio lies in the recorded range with $\kappa$ the ratio of its ends, a query's nearest neighbour is preserved whenever the runner-up is more than $\kappa$ times as far in the exact metric, and $\kappa$ is at least one. | Equation 11.2, strict setting | RankCertificate.lean, nn_preserved, nn_preserved_of_kappa_one, kappa_ge_one |
| The vacuity threshold. The maximum over more distractors is never smaller, so the bar rises with the candidate count, and the ratio $\rho$ is one exactly when the margin equals the bar and below one when the margin is below it. | Equation 9.3 | Vacuity.lean, maxOver_mono, rho_eq_one_iff, rho_lt_one_of_lt |
| Clarke's constant. $\sqrt{9/(16\pi)}$ is 0.423 to three decimals, 10 hertz gives 42.3 milliseconds, and 400 hertz gives about 1 millisecond. | Equation 0.25 | CoherenceTime.lean, clarke_to_three_decimals, examples |
| The refuted refresh law's arithmetic. At 0.177 coherence times the law predicts more than 6 milliseconds at 10 hertz and more than 1 millisecond at 50 hertz, above the sealed floors of at most 6 and 1 one-millisecond intervals. The refutation rests on the sealed record, and this checks only the arithmetic. | Equation 13.2 | CoherenceTime.lean, refuted_law_exceeds_sealed |
| The ledger rule. Stated as a function on the six classes, nothing changes without a sealed event, a sealed miss never raises a class and sends every experimental class to refuted, a sealed pass never lowers one, and a number without a sealed bar stays exploratory. | Chapter 8 section 8.10 and chapter 1 section 1.5 | Ledger.lean, step_none, step_miss_le, step_pass_ge, step_miss_refuted, exploratory_stays |
| The seal. For any hash function, a changed hash proves a changed file, an unchanged file has an unchanged hash, and a digest with fewer values than there are files sends two distinct files to the same digest, so an equal hash is evidence and not proof. | Chapter 0 section 0.12 | Seal.lean, changed_of_hash_ne, hash_eq_of_eq, exists_collision |
| Leakage by identifier. If every test identifier was seen in training, the consumer that looks its answer up by identifier has zero test error for every labeling, so the score measures recall of the labels and not generalization, and on an unseen identifier it returns its default. | Chapter 8 section 8.1 | Leakage.lean, errors_lookup_eq_zero, lookup_default |
| The template match. The root-mean-square distance between the logarithms of two lists is zero between a list and itself, symmetric, nonnegative, and unchanged when both lists are scaled by the same positive factor, so the recognizer reads shape and not size. | Equation 0.32 | Recognizer.lean, templateDist_self, templateDist_comm, templateDist_scale |
| Equal distortion under water-filling. A direction above the water, given the closed-form bits of equation 0.13, contributes exactly the water level. | Equations 0.13 and 4.2 | WaterFilling.lean, contribution_eq_water |
| The two-direction allocation. Whatever the split of a budget between two directions, the distortion is at least twice the geometric mean of the two terms, a quantity fixed by the budget, and the bound is attained when the two terms are equal. | Equation 4.2 | WaterFilling.lean, distortion2_ge, distortion2_eq_of_equal |
| The effective rank. The participation ratio of a spectrum lies between one and the number of eigenvalues for a nonnegative spectrum with positive energy, equals the number of eigenvalues when they are all equal, and equals one when a single eigenvalue carries the whole spectrum. | Equation 0.7 | EffectiveRank.lean, effRank_le, one_le_effRank, effRank_const, effRank_single |
| The Poisson ceiling. The tail probability of a count of at least $c$ never increases with $c$, is one at zero and at most one, so the expected number of rows at or above a count is nonincreasing and the ceiling is a threshold, and the chapter's example mean is one tenth. | Equation 0.17 | PoissonCeiling.lean, tail_antitone, tail_le_one, expectedAtLeast_antitone, example_mean |
The reliability weight. With AUROC as equation 0.16 defines it, AUROC is at most one, the weight lies in the unit interval, chance level and below give weight zero, and a strictly increasing transform of the score leaves the weight unchanged (weight_comp, hypothesis StrictMono), so it is a discrimination weight and monotone recalibration does not change an encoder's authority; an orientation flip is not a recalibration and sends the weight through $A^{*}=\max(A,1-A)$. | Equation 0.38 | ReliabilityWeight.lean, auroc_le_one, weight_mem_unit, weight_eq_zero_of_le_half, weight_comp |
| The Nadeau and Bengio correction. The corrected variance is the naive variance times one plus the fold count times the test-to-train ratio, it is never below the naive variance, the inflation exceeds any bound once the fold count is large enough, and with a thousand folds at a ratio of one quarter it is 251, the standard-error inflation is 15.84, and the effective fold count is 3.98, each to two decimals. | Equations 0.18 and 8.2 | NadeauBengio.lean, correctedVar_eq, naiveVar_le_correctedVar, inflation_unbounded, book_numbers |
| The expected calibration error lies in the unit interval when the bin weights sum to one and every mean and fraction lies in the unit interval, and it is zero exactly when every bin with positive weight is calibrated. | Equation 0.29 | Calibration.lean, ece_nonneg, ece_le_one, ece_eq_zero_iff |
The cross-corpus gate. A validated encoder clears each null by the margin, a null above one minus the margin cannot be cleared by any encoder since AUROC is at most one, the chapter's two cases fall on the two sides, and a strictly increasing transform of the encoder's score leaves the verdict unchanged (validated_comp, hypothesis StrictMono). | Equation 12.3 | CrossCorpusGate.lean, clears_bow, clears_untrained, not_validated_of_saturated, margin_example, validated_comp |
| Deployment mismatch. A deployment score, a weighted mean over the slices served, lies between the worst slice and the best, and falls strictly below the best whenever a slice with positive weight scores below it, so a benchmark drawn from the best slice overstates the deployment. With the chapter's numbers the benchmark clears the target and the deployment mean does not. | Chapter 12 section 12.6 and chapter 13 section 13.1 | DeploymentMismatch.lean, deployment_le_max, min_le_deployment, deployment_lt_max_of_gap, book_numbers |
| Distance concentration. When a squared distance is a sum of independent coordinate contributions with common mean and variance, its relative spread is the variance over the dimension times the squared mean, which falls with the dimension, tends to zero, and drops below any resolution at some dimension. | Chapter 3 section 3.4 | DistanceConcentration.lean, relSpread_eq, relSpread_antitone, relSpread_tendsto_zero, exists_dim_relSpread_lt |
| Abstention. Abstain is not a pass, the verdict is abstain exactly when no stratum is eligible, the verdict passes a bar exactly when some stratum is eligible and every eligible stratum clears the bar, and raising the eligibility bar can only raise the verdict, which is why every abstention is reported. | Equation 10.7 | Abstention.lean, abstain_not_passes, verdict_eq_none_iff, passes_verdict_iff, inf_le_of_subset |
| Drift as the consumer reads it. A one-direction consumer reads a drift as its squared projection on that direction, so the same drift is read as its full squared size by one consumer and as nothing by another, a drift in the nuisance is read as zero whatever its size, and no drift is read as less than zero. | Equation 13.1 | Drift.lean, damage_rank_one, same_drift_two_consumers, damage_eq_zero_of_nuisance, damage_nonneg |
| Freshness is consumer-relative. Two readers with different coherence times disagree about every age between the two, and the staleness rate of a mixed population lies strictly between the two readers' rates when they differ, equalling one reader's rate only when that reader is the whole population or the rates agree. | Chapter 13 section 13.3 and chapter 2 section 2.7 | Freshness.lean, disagree, mixedRate_between, mixedRate_eq_left_iff |
| Intrinsic dimension from Weyl's law. Under a power law the logarithm of the count is affine in the logarithm of the level with slope half the dimension, so the dimension is twice the slope between any two distinct levels whatever the constant, and doubling the level multiplies the count by two to the half dimension. | Equations 0.31 and 9.2 | IntrinsicDimension.lean, log_weyl, dimension_from_slope, weyl_double |
| Simpson's paradox as an aggregation quotient. A pooled rate is the size-weighted mean of the group rates, the classical example reverses, one arm winning in both groups and losing in the pool, and with equal group sizes under both arms no reversal is possible. | Chapter 5 section 5.5 | Simpson.lean, pooled_eq_weighted, reversal, no_reversal_of_equal_sizes |
| Multiple comparisons. The best of many tests is at least any single test, ten thousand null tests at five percent pass five hundred in expectation and forty pass two, the Bonferroni threshold at ten thousand tests is five in a million and keeps the family-wise rate under the target, and the expected passes grow without bound in the number of tests. | Chapter 0 section 0.9 and equation 8.3 | MultipleComparisons.lean, max_ge_each, book_numbers, corrected_family_rate, expectedPasses_unbounded |
| The disparate impact ratio and the per-group verdict. The ratio is one exactly when the two rates agree, it inverts when the groups are swapped, the four-fifths rule is a statement about the difference between the two rates, and the worst-group verdict of equation 14.5 clears a bar exactly when every scored group does and is never below the pooled rate. | Equations 0.37 and 14.5 | DisparateImpact.lean, ratio_eq_one_iff, ratio_swap, four_fifths_iff, verdict_le_iff, weighted_le_verdict |
| Equalized odds against parity. A group's favourable rate is its true-positive rate times its base rate plus its false-positive rate times the rest, so under equalized odds the difference in favourable rates is the separation times the difference in base rates, the rates agree exactly when the base rates do, and with rates 0.8 and 0.2 and base rates one half and one tenth the favourable rates are 0.5 and 0.26. | Equation 0.37 and chapter 14 section 14.6 | EqualizedOdds.lean, favourable_sub, parity_iff_equal_base, example_conflict |
| Rank-faithful maps. Every strictly increasing transform of the distance preserves the ordering, the set of candidates closer than a given one and the nearest neighbour are the same under it, the square is rank-faithful on the nonnegative reals, and the square exceeds any fixed stretch factor. | Chapter 0 section 0.10 | RankFaithful.lean, isRankFaithful_of_strictMono, closer_set_eq, nearest_eq, sq_rankFaithful_on_nonneg, sq_not_bi_lipschitz |
| Bi-Lipschitz maps. The factor is at least one wherever a distance is nonzero, two maps within factors compose to one within their product, the nearest neighbour is preserved whenever the runner-up is more than the factor squared times as far, and a map within factor two can reverse the order of two distances, so bi-Lipschitz does not mean rank-faithful. | Equation 0.21 | BiLipschitz.lean, one_le_factor, within_comp, nn_preserved, not_rank_faithful |
| Landauer's principle. Boltzmann's constant times 300 kelvin times the natural logarithm of two is 2.87 times ten to the minus twenty-one joules to three significant figures, the reset bound of equation 13.3 is monotone in the entropy so the consumer-relative bound is never above the consumer-free one, and a record that keeps nothing costs nothing to reset. | Equations 0.27 and 13.3 | Landauer.lean, eMin_300, resetBound_le, resetBound_zero |
| Balanced accuracy lies between the worst class and the best, and with 990 rows recalled perfectly and 10 never recalled, plain accuracy is 0.99 and balanced accuracy is 0.5. | Equation 0.34 | BalancedAccuracy.lean, min_le_balanced, balanced_le_max, hidden_class |
| The Kendall correlation lies between minus one and one, a strictly increasing transform of a score leaves it unchanged, and a score compared with itself has no discordant pair. | Equation 0.15 | Kendall.lean, tau_mem, tau_comp, discordant_self |
| The KL divergence is nonnegative for positive masses summing to one on both sides, which is Gibbs' inequality, it is zero from a distribution to itself, and it is not symmetric, the two directions between (1/2, 1/4, 1/8, 1/8) and (1/8, 1/2, 1/4, 1/8) being five eighths and one half of the logarithm of two. | Equation 0.24 | KL.lean, kl_nonneg, kl_self, kl_not_symm |
| Recall at k lies in the unit interval when the true list has k rows, it is one exactly when the returned list is the true list, and a stratum that fails entirely moves the aggregate by at most its weight, so a stratum of weight one in twenty at recall zero leaves the aggregate at 0.95. | Equation 11.3 | RecallAtK.lean, recallAtK_mem_unit, recallAtK_eq_one_iff, aggregate_le_of_failing, aggregate_example |
| The Spearman correlation is at most one for two or more items, one for identical rankings, minus one for three items in opposite orders, and ranks depend on the ordering alone, so a strictly increasing transform of a score leaves them unchanged. | Equation 0.14 | Spearman.lean, rho_le_one, rho_identical, rho_reversed_three, rank_comp |
| The silhouette lies between minus one and one for positive distances, it is positive exactly when the row is closer to its own cluster, and scaling every distance by the same positive factor leaves it unchanged. | Equation 0.30 | Silhouette.lean, silhouette_mem, silhouette_pos_iff, silhouette_scale |
| Whitening in the eigenbasis. A coordinate whose second moment is its eigenvalue has second moment one after whitening, and the squared length of a whitened row is the sum of its squared coordinates over the eigenvalues. | Equation 0.6 | Whitening.lean, whiten_unit_variance, whiten_sq_sum |
| The Mahalanobis distance in the eigenbasis is nonnegative, zero at the mean, unchanged when the data and the covariance are rescaled together, equal to the squared Euclidean length after whitening, and smaller along directions of larger variance. | Equations 0.33 and 10.1 | Mahalanobis.lean, dM2_nonneg, dM2_mean, dM2_scale, dM2_eq_whitened, dM2_antitone_in_variance |
| Lift is one under independence, symmetric in the two itemsets, at most the reciprocal of the consequent's support, and equal to the number of transactions when one transaction contains both items and no other contains either. | Equations 5.1 and 5.2 | Lift.lean, lift_indep, lift_symm, lift_le_inv, lift_single |
| Explained variance lies in the unit interval, cannot fall as components are added, reaches one at the full dimension, equals the fraction a consumer with unit sensitivities retains, and with variances 9 and 1 and a consumer reading only the second direction, one kept component explains nine tenths of the variance and none of what the consumer reads. | Chapter 4 section 4.1 | ExplainedVariance.lean, explained_mem_unit, explained_mono, explained_full, retained_identity, retained_example |
| The cross-support ratio lies in the unit interval, is one exactly when every item has the same support, and can only fall when items are added, which is the anti-monotonicity a threshold needs to prune safely. | Chapter 5 section 5.5 | CrossSupport.lean, ratio_mem_unit, ratio_eq_one_iff, ratio_anti |
| The Robin Hood index. The excess above the mean is half the total absolute deviation, the index is zero exactly when every count equals the mean, at most one for nonnegative counts, and unchanged by a common scaling of the counts. | Equation 0.35 | RobinHood.lean, excess_eq_half_abs, robinHood_eq_zero_iff, robinHood_le_one, robinHood_scale |
| Perplexity is at least one, equals the vocabulary size for a uniform model, is monotone in the bits, and the chapter 11 numbers lie under four and over thirteen bits per token. | Equations 0.22 and 11.1 | Perplexity.lean, one_le_perplexity, perplexity_uniform, perplexity_mono, bits_of_finding |
| The standard error halves only when the independent draws quadruple, never rises with more draws, tends to zero, and the square root of a thousand is 31.62 to two decimals. | Chapter 0 section 0.9 | StandardError.lean, se_quarter, se_antitone, se_tendsto_zero, thousand_folds |
| The softmax. Every weight is positive, the weights sum to one, adding the same constant to every score leaves them unchanged, and a larger score gets a larger weight. | Equation 0.23 | Softmax.lean, softmax_pos, softmax_sum, softmax_shift, softmax_lt_iff |
| Attention. For scalar values the head's output lies between the smallest and largest value, two sets of keys with the same scores against the query give the same output, and adding to every key a vector the query does not read leaves the output unchanged however large the change. | Equation 0.23 and chapter 11 section 11.1 | Attention.lean, output_le_max, min_le_output, output_congr, output_nuisance |
| Product quantization. The squared error of a vector split into two pieces is the sum of the pieces' errors, the least total error over pairs of codes is the sum of the least errors per codebook, $M$ codebooks of $K$ entries cost $M\log_2 K$ bits, and twenty-five one-byte subspaces cost two hundred. | Chapter 11 section 11.3 | ProductQuantization.lean, sq_error_add, inf_add, bits_of_codebooks, table_row |
| The paired bootstrap. The sample variance of a difference is the sum of the two variances minus twice the covariance, so pairing narrows the interval exactly when the two scores covary positively across rows. | Chapter 0 section 0.9 | Bootstrap.lean, var_sub, paired_lt_iff, cov_comm |
| Chance level. A constant score has AUROC one half when both classes are present, reliability weight zero, and Kendall correlation zero with any other score. | Chapter 0 section 0.8 and equations 0.15, 0.16, and 0.38 | ChanceLevel.lean, auroc_const, weight_const, tau_const |
| The p-value against a finite null sample lies in the unit interval, never rises as the observation grows, and under the null the number of draws with p-value at or below a level $\alpha$ is at most $\alpha n$, so a threshold on it is a false-positive rate. | Chapter 0 section 0.9 | PValue.lean, pvalue_mem_unit, pvalue_antitone, uniform_bound |
| The confidence interval. Coverage and miss rate are complements, the chance that at least one of $m$ independent intervals misses is at most $m\alpha$, nine intervals at ninety-five percent have between 0.92 and 0.93 chance of at most one miss, and their expected misses are 0.45. | Chapter 0 section 0.9 and chapter 14 section 14.1 | ConfidenceInterval.lean, missRate_eq, some_miss_le, nine_intervals, nine_expected |
| The unnormalized graph Laplacian. With degrees the row sums and symmetric nonnegative weights, the quadratic form is half the weighted sum of squared differences across edges, so it is nonnegative, zero on every constant, and positive on any function that differs across an edge of positive weight. | Equation 0.19 | Laplacian.lean, quad_eq, quad_nonneg, quad_const, quad_pos_of_edge |
| The KV cache. Its size is linear in the tokens and halves with the bits per number, keeping five percent of the tokens shrinks it twenty times, a compression that preserves every query-key score preserves every head output, and two keys of the same direction and different lengths have different scores against a query that reads them, so cosine is not the score. | Chapter 0 section 0.11 and chapter 11 section 11.1 | KVCache.lean, cacheBits_tokens, cacheBits_half, ratios, output_of_scores_preserved, cosine_not_score |
| Eviction. Attention over the kept subset lies between the kept values, equals them when they agree, and the whole cache is the case of no eviction. | Chapter 13 section 13.6 | Eviction.lean, keptOutput_le_max, min_le_keptOutput, keptOutput_const, keptOutput_univ |
| TF-IDF. A term in every document carries no weight, the weight is nonnegative for a term in at most every document, it falls as the term spreads, and the term frequency lies in the unit interval. | Equation 0.36 | TFIDF.lean, weight_everywhere, weight_nonneg, weight_antitone, tf_mem_unit |
| The bag of words. Two documents that are rearrangements of each other have the same bag, the counts sum to the document's length over its vocabulary, and an absent term has count zero. | Chapter 12 section 12.1 | BagOfWords.lean, bag_perm, bag_example, bag_sum, bag_absent |
| The pipeline as a chain of observers. Whatever one stage declares the same, the pipeline declares the same through any number of later stages, and for linear stages the rank of the composition is at most the rank of either stage. | Equation 12.1 | Pipeline.lean, quotient_inherited, quotient_inherited_chain, rank_comp_le_first, rank_comp_le_second |
| Teacher forcing. The free run equals the reference's prefix for as long as the forced predictions match the reference, has the length it was run for, and parts from the reference at the first token the model gets wrong. | Chapter 0 section 0.11 | TeacherForcing.lean, free_eq_take, free_length, free_ne_of_error |
| The inverted file. Probing more cells never loses a candidate, a neighbour is found exactly when its cell is probed, the scanned fraction lies in the unit interval, with equal cells it is the probe count over the cell count, and probing every cell is exact search. | Chapter 11 section 11.3 | InvertedFile.lean, scanned_mono, found_iff, scannedFraction_mem_unit, equal_cells, scanned_univ |
| The dot product and the cosine. The dot product is symmetric, Cauchy–Schwarz bounds its square by the product of the squared lengths, the cosine lies between minus one and one, scaling a vector scales its dot product, and scaling a vector by a positive factor leaves the cosine unchanged. | Equation 0.1 | DotProduct.lean, dot_comm, dot_sq_le, cosine_mem, dot_smul, cosine_smul |
| The projection onto a unit direction. Projecting twice is projecting once, the remainder is orthogonal to the direction, the projection is no longer than the vector, adding anything orthogonal to the direction leaves it unchanged, and it is linear. | Equation 0.2 | Projection.lean, proj_proj, dot_sub_proj, proj_sq_le, proj_add_orth, proj_add |
| The covariance matrix. Its quadratic form along a direction is the weighted variance of the projection onto it, its trace is the total variance, it is positive semidefinite for nonnegative weights, and it is symmetric. | Equations 0.3 and 0.4 | Covariance.lean, var_eq_quad, trace_eq_total, quad_nonneg, cov_symm |
| Euclidean distance. Its square is the identity reader's quadratic form on the difference, it is symmetric, zero exactly between a row and itself, and rescaling one coordinate changes which of two rows is nearer. | Chapter 3 section 3.2 | EuclideanDistance.lean, distSq_eq_quad_one, distSq_comm, distSq_eq_zero_iff, ranking_flips |
| Geodesic distance. Zero from a node to itself, symmetric, one between adjacent nodes, the triangle inequality on a connected graph, and the geodesic-rank reader's nearest neighbour is unchanged by a strictly increasing transform of the distances. | Chapter 0 section 0.10 and chapter 3 section 3.3 | GeodesicDistance.lean, dist_self, dist_comm, dist_adj, dist_triangle, geodesic_rank_invariant |
| Degree. The degrees sum to twice the number of edges, the sum is even, no node has degree more than the number of other nodes, and the average degree is twice the edge count over the node count. From Mathlib's simple graphs. | Chapter 0 section 0.10 | Degree.lean, sum_degrees, sum_degrees_even, degree_lt_card, average_degree |
| Eigenvalues and eigenvectors. For a symmetric matrix the quadratic pairing is symmetric, eigenvectors with distinct eigenvalues are orthogonal, every eigenvalue of a matrix with nonnegative quadratic form is nonnegative, and the form along an eigenvector is the eigenvalue times the squared length. | Equation 0.5 | Eigen.lean, pairing_symm, orthogonal_of_ne, eigenvalue_nonneg, quad_eigen |
| Isotropy. Every unit reader reads an isotropic covariance the same, swapping the reader's coordinates changes nothing under it, two unit readers disagree on an anisotropic one, and two codes with the variances exchanged are read the same by a reader off the diagonal exactly when the variances agree, so the flip needs anisotropy. | Chapter 0 section 0.3 and chapter 3 section 3.2 | Isotropy.lean, isotropic_reads_same, isotropic_no_flip, anisotropic_readers_differ, flip_iff_anisotropic |
| The threshold. Raising it shrinks the predicted set, so true positives and false positives can only fall, a strictly increasing recalibration of the score with the matching recalibration of the threshold leaves every decision unchanged, and below every score everything is positive while above every score nothing is. | Chapter 6 section 6.1 | Threshold.lean, predicted_anti, tp_anti, fp_anti, decision_comp, predicted_extremes |
| ROUGE-1 recall lies in the unit interval, is one for the reference against itself, and is one for any rearrangement of the reference, since it reads bags and not order. | Chapter 0 section 0.11 | Rouge.lean, overlap_le, rouge1_mem_unit, rouge1_self, rouge1_perm |
| The linear classifier. Its read operator is the workload mean of the squared link slope times the outer product of the weights, it sends every vector to a multiple of the weights, it reads nothing orthogonal to them, and the score is affine so moving orthogonally to the weights leaves it unchanged. | Equation 6.1 | Classifier.lean, readOp_classifier, readOp_classifier_mulVec, readOp_classifier_orth, score_orth |
| The decision boundary. Moving orthogonally to the weights never crosses it, moving along the weights crosses it exactly once, and two boundary points have the same projection on the weights. | Chapter 6 section 6.1 | DecisionBoundary.lean, orth_stays, cross_once, same_projection |
| The margin. A perturbation whose squared length times the squared weight length is below the squared margin cannot move a linear classifier's score across the threshold, and the step along the weights that reaches the boundary has squared length equal to the squared margin over the squared weight length. | Chapter 6 section 6.1 and chapter 9 section 9.3 | Margin.lean, score_add, decision_stable, tight_along_weights |
| The null model. A label permutation keeps every class size and the bag of scores, a statistic of the class sizes alone is constant under it, and the excess over the null mean is zero exactly at the null. | Chapter 0 section 0.9 and chapter 8 section 8.4 | NullModel.lean, card_pos_perm, scores_perm, stat_of_counts_const, excess_eq_zero_iff |
| Escalation. Raising the margin bar can only shrink the decided set, so coverage can only fall, every decided item carries at least the bar's margin, a bar of zero escalates nothing, and coverage times the decided false-clear rate is the joint rate. | Chapter 14 section 14.9 | Escalation.lean, decided_anti, coverage_anti, decided_margin, decided_zero, joint_rate |
| The confound. In the linear case the naive difference of group means is the treatment effect plus the confound's effect times the difference of the confound's means, so it equals the effect exactly when the confound is balanced or has no effect, and for any target difference there is an imbalance that produces it. | Chapter 8 section 8.6 | Confound.lean, naive_diff, naive_diff_of_balanced, naive_diff_of_no_effect, bias_unbounded |
| The replica. The keys stale under a lag grow with the lag and vanish at no lag, the naive certificate that clears every read has coverage one and false-clear rate equal to the stale fraction, and the certificate that clears only keys outside the lag has false-clear rate zero and coverage one minus the stale fraction. | Chapter 13 section 13.3 | Replica.lean, stale_mono, stale_zero, naive_certificate, witnessed_certificate, witnessed_coverage |
| The block error rate lies in the unit interval, a block of $n$ independently lost symbols fails with probability at most $nq$, longer blocks fail no less often, a one-symbol block fails exactly when its symbol is lost, and a lossless channel never fails a block. | Chapter 13 section 13.4 | BlockErrorRate.lean, bler_mem_unit, blockFail_le, blockFail_mono, blockFail_one, blockFail_zero |
| The cache. The hit rate over a stream of requests lies in the unit interval, is zero for a cold cache and one for a warm cache holding the footprint, never falls when the cache holds more, and is unchanged by entries outside the requests, so the footprint is a property of the requests. | Chapter 13 section 13.5 | Cache.lean, hitRate_mem_unit, hitRate_cold, hitRate_warm, hitRate_mono, hitRate_footprint |
| The embedding. Objects with the same embedding are indistinguishable to every consumer of it, rescaling an object's embedding by a positive factor changes no cosine, the cosine nearest neighbour is unchanged when the query is rescaled, and a dot-product reader scales with the rescaling. | Chapter 11 section 11.1 | Embedding.lean, quotient, cosine_scale_free, nearest_scale_free, dot_not_scale_free |
| The paraphrase class. The re-description ratio is nonnegative, its movement is zero exactly when no item's score moves, a scorer invariant to re-description scores zero, and the ratio is at most one half exactly when the movement under rewording is at most half the spread between inputs. | Equation 14.3 | ParaphraseClass.lean, ratio_nonneg, movement_eq_zero_iff, ratio_invariant, bar_iff |
| The contrastive objective. The margin loss is nonnegative, zero exactly when every declared pair scores above every other pair by the margin, never lower for a larger margin, and with a positive margin no scorer has zero loss for both a declaration and its swap, so the declared pairs decide what similar means. | Chapter 12 section 12.4 | Contrastive.lean, loss_nonneg, loss_eq_zero_iff, loss_mono_margin, not_both |
| Itemsets and support. Support as a fraction lies in the unit interval, the empty itemset has support one, a superset has support at most that of a subset, the support of a union is at most the smaller support, and every maximal frequent itemset is closed. | Equations 5.1 and 5.3 | ItemSet.lean, supportFrac_mem_unit, supportFrac_empty, supportFrac_anti, supportFrac_union_le, closed_of_maximal |
| Confidence lies in the unit interval, is not symmetric, equals the consequent's support under independence whatever the antecedent, so a consequent in nine of ten transactions gives every rule into it confidence 0.9, and lift is then one. | Equations 5.1 and 5.2 | Confidence.lean, confidence_mem_unit, confidence_asymm, confidence_indep, common_consequent, lift_of_indep |
| Precision, recall, and F1. Precision and recall lie in the unit interval, F1 is at most their arithmetic mean and at least the smaller of the two, equals both when they agree, is zero when either is zero, and in counts is twice the true positives over twice the true positives plus the false positives and false negatives. | Equation 0.28 | PrecisionRecall.lean, precision_mem_unit, recall_mem_unit, f1_le_mean, min_le_f1, f1_self, f1_zero, f1_counts |
| AUROC lies in the unit interval, is one when every positive scores above every negative and zero when every negative scores above every positive, is one half for a constant score, and is unchanged by a strictly monotone transform of the score. | Equation 0.16 | Auroc.lean, auroc_nonneg, auroc_le_one, auroc_perfect, auroc_reversed, auroc_chance, auroc_monotone_invariant |
| The trace is additive and scales, the trace of the identity is the dimension, the trace of an outer product is the squared length, the trace of a product does not depend on the order, and the trace of a read operator times a rank-one error is that error's read distortion. | Equations 0.3 and 0.10 | Trace.lean, trace_add, trace_smul, trace_one, trace_vecMulVec, trace_mul_comm, trace_read, trace_identity_read |
| The bit. One more bit doubles the levels, halves a uniform quantizer's step, and quarters the high-rate squared error, bits add across directions since the levels multiply, and no bits leave one level. | Chapter 0 section 0.7 and equation 0.13 | Bit.lean, levels_succ, levels_add, step_succ, sqError_succ, sqError_antitone, levels_zero |
| The neighbourhood graph. Every node has exactly k out-neighbours, the mutual graph is symmetric and a subgraph of the directed one, and no node has more than k mutual neighbours. | Chapter 0 section 0.10 | Graph.lean, outDegree, mutual_symm, mutual_sub, mutualNbrs_card_le, mem_mutualNbrs |
| Quantization. A uniform quantizer's error is at most half a step, a level quantizes to itself, a per-channel quantizer's squared error is at most the sum of the squared half steps, and a finer step on any coordinate lowers that bound. | Chapter 0 section 0.11 and chapter 11 section 11.2 | Quantization.lean, error_le_half_step, quantize_level, sq_error_le, finer_step |
| The codebook. Under the nearest-codeword rule the distortion is nonnegative, zero for an input that is itself a codeword, achieved by some codeword, and never larger for a larger codebook. | Chapter 4 section 4.2 | Codebook.lean, distortion_nonneg, distortion_codeword, distortion_anti, exists_nearest |
| The direction-only quantizer. With a unit codeword the quantized vector keeps the original's squared length, its score against a query is the length times the codeword's score, the score error is the length times the query's dot product with the direction error, and its cosine with a query is the codeword's. | Chapter 11 section 11.2 | DirectionQuantizer.lean, length_preserved, score_eq, score_error, cosine_eq |
| Hubs. The number of rows with count above a ceiling $c$ is at most the slots handed out over $c + 1$, two query sets that retrieve the same lists have the same hubs, a higher ceiling names fewer hubs, and no queries give no hubs. | Equations 10.3 and 0.17 | Hub.lean, card_hubs_le, hubs_congr, hubs_anti, hubs_empty |
| A concentrated spectrum. If one eigenvalue carries a fraction $f$ of the total, the effective rank is at most $1/f^2$, so half the mass in one direction gives effective rank at most four. | Equation 0.7 | Concentrated.lean, effRank_le_of_fraction, effRank_le_four |
| The challenge set. Every benchmark admits a shortcut with zero benchmark error, the shortcut errs on a row outside the benchmark whose label is not its default, two scorers that agree on the benchmark have the same benchmark error, and a row where they differ lies outside the benchmark. | Chapter 12 section 12.6 | ChallengeSet.lean, shortcut_passes, shortcut_fails, benchmark_blind, challenge_outside |
| Cross-validation. When the folds partition the rows their sizes sum to the row count, the overall accuracy is the size-weighted mean of the fold accuracies, and with equal folds it is their plain mean. | Chapter 8 section 8.5 | CrossValidation.lean, sizes_sum, accuracy_weighted, accuracy_mean_of_equal |
| The rotary position embedding. A plane rotation preserves length, the dot product of two rotated vectors depends only on the angle difference, a head reads relative position, and shifting both positions by the same amount changes no score. | Chapter 0 section 0.11 | Rope.lean, rot_length, rot_dot, relative_position, shift_invariant |
| The attribution. For an affine consumer the gradient attributions sum exactly to the change in output, a coordinate the consumer does not read gets attribution zero, and the weighted mean of the squared sensitivity is the read operator's diagonal entry. | Chapter 14 section 14.5 | Attribution.lean, attr_sum_affine, attr_unread, sq_sensitivity_eq_readOp_diag |
| The commute time. It is symmetric and zero from a node to itself, the resistance is its scaling by the volume, and the collapsed resistance of chapter 3 depends on two nodes only through their degrees, so it is one value for every pair of a regular graph. | Equation 0.20 | CommuteTime.lean, commute_symm, resistance_symm, collapsed_congr, collapsed_const |
| The finite difference. The central difference recovers the derivative of a quadratic exactly at every step, the one-sided difference is off by the curvature times the step, and two evaluations per coordinate cost $2d$. | Equation 0.8 | FiniteDifference.lean, central_quad, forward_quad, forward_error, central_cost |
| Principal components. In the eigenbasis the variance along a unit direction lies between the smallest and the largest eigenvalue, a basis direction attains its own eigenvalue, and the error of keeping $k$ components is the sum of the dropped eigenvalues. | Chapter 4 section 4.1 | PCA.lean, varAlong_basis, varAlong_le, varAlong_ge, dropped_eq |
| The multiplet. The cycle's Laplacian eigenvalue formula gives zero at the constant mode, values between zero and four, and the same value at $k$ and $n - k$, which are distinct modes unless $2k = n$. | Chapter 0 section 0.15 | Multiplet.lean, cycleEig_zero, cycleEig_le_four, cycleEig_pair, pair_distinct |
| The output metric. Negating a consumer keeps its read operator and reverses every comparison, and two cost matrices give the same two classifiers, with equal error counts, opposite verdicts. | Chapter 1 section 1.2 | OutputMetric.lean, neg_reverses, readOp_of_neg, cost_flips |
| The spectral embedding. Row normalization puts an embedded row on the unit sphere, the dot product of two normalized rows is the cosine of the originals, and a positive rescaling of a row does not change its normalized form. | Chapter 3 section 3.3 | SpectralEmbedding.lean, rowNormalize_unit, dot_rowNormalize, rowNormalize_smul |
| The transmission time interval. A duration of $m$ milliseconds spans $m$ slots, slots add over consecutive durations, and a longer duration spans at least as many. | Chapter 13 section 13.4 | TTI.lean, slots_of_ms, slots_add, slots_mono |
| The cosine. Cauchy–Schwarz puts it between minus one and one, a vector has cosine one with itself, a positive rescaling of either vector leaves it unchanged, and it is the dot product of the row-normalized vectors. | Equation 0.1 | Cosine.lean, abs_dot_le, cosine_le_one, neg_one_le_cosine, cosine_smul |
| The Jaccard coefficient. It lies in the unit interval, is one for a nonempty set against itself, is symmetric, is zero exactly when the sets are disjoint, and for a subset is its share of the larger set. | Chapter 3 section 3.1 | Jaccard.lean, jaccard_le_one, jaccard_self, jaccard_eq_zero_iff, jaccard_subset |
| The curvature. The second difference recovers a quadratic's curvature exactly, an affine consumer has none, the linear model's error at a step is the curvature times the step squared, and the gradient across a step changes by the curvature times the step. | Chapter 0 section 0.5 | Curvature.lean, second_quad, second_affine, linear_error, gradient_change |
| The shard. With strict top sets, the global top $k$ lies inside each shard's top $k$ and so inside the union of the shards' answers, and the merge reads at most the shard count times $k$ candidates. | Chapter 13 section 13.1 | Shard.lean, global_in_local, global_in_union, merge_cost |
| The outlier. The z-score is zero at the mean, unchanged under a joint rescaling and shift, past $t$ exactly when the row is more than $t$ spreads from the mean, and by Chebyshev the weight beyond $t$ is at most the mean squared score over $t^2$. | Chapter 10 section 10.1 | Outlier.lean, zscore_affine, outlier_iff, chebyshev |
| The ensemble. The average lies between the members' bounds, its squared error is at most the mean squared error of the members, and a constant ensemble is its constant. | Chapter 7 section 7.1 | Ensemble.lean, average_between, sq_average_le, average_const |
| Boosting. The step size is positive exactly when the weak scorer beats chance, zero at chance, and after reweighting the scorer's weighted error is one half. | Chapter 7 section 7.1 | Boosting.lean, alpha_pos_iff, alpha_half, reweighted_error_half |
| The decision tree. A stump is flat on either side of its split, a split on one coordinate reads nothing of the others, and two-class Gini impurity is at most one half and zero exactly for a pure leaf. | Chapter 6 section 6.1 | DecisionTree.lean, stump_flat_left, split_reads_one_axis, gini_le_half, gini_eq_zero_iff |
| Naive Bayes. The log likelihood is a sum, the log odds add across features, and one feature's contribution does not depend on the others. | Chapter 6 section 6.1 | NaiveBayes.lean, log_likelihood_sum, log_odds_sum, contribution_independent |
| Logistic regression. The sigmoid lies strictly in the unit interval, is one half at zero, is symmetric about one half, is strictly increasing, and the decision at one half is the sign of the weighted sum. | Equation 6.1 | Logistic.lean, sigmoid_lt_one, sigmoid_neg, sigmoid_strictMono, decision_linear |
| Standardization. The standardized column has mean zero and variance one, the transform is invertible, and it preserves every ordering. | Chapter 2 section 2.5 | Standardization.lean, mean_zero, variance_one, standardize_inv, standardize_lt_iff |
| Imputation. Mean imputation leaves the mean unchanged, the filled cells add nothing to the sum of squared deviations, and the variance shrinks. | Chapter 2 section 2.3 | Imputation.lean, mean_imputed, sum_sq_imputed, variance_imputed_le |
| K-means. The error about any centre is the error about the mean plus the count times the squared distance between the two, the mean minimizes the error, and assigning each row to its nearest centre never raises the total. | Equation 9.1 | KMeans.lean, sse_decomposition, mean_minimizes, assign_nearest |
| DBSCAN. A wider radius or a smaller count makes more core points, every reachability chain starts at a core point, and noise reaches nothing. | Chapter 9 section 9.1 | Dbscan.lean, core_mono, core_anti, reach_from_core, noise_unreachable |
| Hierarchical clustering. Under single, complete, and average linkage the merge heights never decrease, single linkage is never above complete, and average lies between them. | Chapter 9 section 9.1 | Hierarchical.lean, single_ge, complete_ge, average_ge, average_between |
| The variance. It is nonnegative, equals the mean square less the squared mean, is zero for a constant column, scales with the square of a rescaling, and with positive weights is zero only for a constant column. | Chapter 0 section 0.3 | Variance.lean, variance_nonneg, variance_eq, variance_smul, eq_mean_of_variance_eq_zero |
| The rank. It is at most the row and column counts, an outer product has rank at most one, a product has rank at most either factor's, and transposing does not change it. | Chapter 0 section 0.2 | Rank.lean, rank_le_width, rank_outer_le_one, rank_mul_le, rank_transpose' |
| The correlation. It is the cosine of the centred columns, so it lies between minus one and one, is one for a column with itself, is symmetric, and is unchanged by a shift or a positive rescaling. | Chapter 0 section 0.6 | Correlation.lean, abs_corr_le_one, corr_self, corr_shift, corr_smul |
| Orthogonality. It is symmetric, survives rescaling, Pythagoras holds for orthogonal vectors, and the residual of a projection is orthogonal to the direction projected on. | Chapter 0 section 0.1 | Orthogonal.lean, orth_symm, pythagoras, orth_smul, residual_orth |
| The positive semidefinite matrix. Sums and nonnegative multiples are positive semidefinite, so is an outer product of a vector with itself and the read operator, and the diagonal is nonnegative. | Chapter 0 section 0.3 | PositiveSemidefinite.lean, psd_add, psd_outer, psd_readOp, psd_diag_nonneg |
| The skewness. It is unchanged by a shift and a positive rescaling, changes sign under negation, and is zero for a column symmetric about its mean. | Chapter 3 section 3.5 | Skewness.lean, skew_shift, skew_scale, skew_neg, skew_symmetric |
| The percentile. The fraction at or below a value is in the unit interval, nondecreasing, one at or above every row and zero below every row, and an upper percentile over a lower one is at least one. | Chapter 11 section 11.3 | Percentile.lean, cdf_mono, cdf_of_all, cdf_of_none, ratio_ge_one |
| The reconstruction error. It is nonnegative, zero exactly when the approximation is the row, a sum of per-coordinate squared errors, and for a unit-direction projection the squared length less the squared component. | Chapter 4 section 4.1 | ReconstructionError.lean, recon_eq_zero_iff, recon_sum, recon_proj |
| The nearest neighbour. A strictly increasing transform of the distance names the same nearest neighbours, a row is its own, and two nearest neighbours sit at the same distance. | Chapter 6 section 6.1 | NearestNeighbour.lean, nearest_comp, nearest_smul, self_nearest, nearest_same_distance |
| Reranking. A rerank's recall is at most the candidate coverage, an oracle rerank reaches it exactly, and a deeper candidate list can only raise it. | Chapter 10 section 10.5 | Rerank.lean, recall_le_coverage, oracle_rerank, coverage_mono |
| The bar. Passing a higher bar passes every lower one, a bar discriminates exactly when it sits strictly above the null and at or below the real system, no bar discriminates when the null scores at least as high, some bar does when the real system scores higher, and a bar the null passes is vacuous. | Chapter 8 section 8.3 | Bar.lean, passes_anti, discriminates_iff, no_bar_of_null_ge, exists_bar_of_lt, vacuous_of_null_passes |
| The nat. The bit and nat conversions undo each other, the conversion is monotone, and one nat is between 1.4426 and 1.4427 bits. | Chapter 0 section 0.7 | NatUnit.lean, nats_bits, bits_nats, one_nat_in_bits |
| Discretization. The bin index is nondecreasing, every value in a cell gets the cell's index, two values in one cell become indistinguishable, and a sample confined to $m$ cells has at most $m$ labels. | Chapter 2 section 2.5 | Discretization.lean, bin_mono, bin_of_mem, bin_eq_of_same_cell, card_bins_le |
| The attribute types. A rescaling is affine, an affine map with positive slope is strictly increasing, a strictly increasing map is injective, a rescaling preserves ratios, and an affine map preserves ratios of differences. | Chapter 2 section 2.1 | AttributeType.lean, scale_affine, affine_strictMono, scale_preserves_ratio, affine_preserves_difference_ratio |
| Residualization. The residual is orthogonal to the column removed, its squared length is the original less the squared dot product over the removed column's squared length, an orthogonal column is unchanged, and a column residualized on itself vanishes. | Chapter 12 section 12.5 | Residual.lean, residual_orth, residual_sq, residual_of_orth, residual_self |
What the check does not cover is stated as plainly. The flip theorem and the anti-arm bound are about the two-dimensional diagonal case the chapter draws. The read operator file takes the sensitivities as given vectors, so it checks the algebra of the average and not the differentiation that produces them, and the probe file's consumers are affine, which is the case in which a central difference is exact. The family-wise error assumes independent looks. The Youden ceiling is checked at one operating point, and the ceiling over the sweep is the supremum of that bound, as equation 5.4 states. The alignment and coupling null are checked for diagonal operators in two dimensions. The hubness file checks the counting identity behind the Poisson mean, and the Poisson ceiling file checks that the tail is monotone in the count, not the value of the tail itself. The rank certificate file checks the per-pair fact under a bounded ratio and not the floors of equation 11.2, which are derived in the source from the ratio's concentration. The vacuity file checks that the bar is monotone in the candidate count and what the ratio means, not the expected maximum of a normal sample. The ledger rule is checked as the book states it, and the seal and leakage files check what a hash and an identifier can and cannot establish. The water-filling file checks the two-direction case and the equal-distortion property, not the optimality of the allocation over many directions. The distance concentration file checks the algebra of the relative spread under the independence model, not that real data obey the model. The deployment mismatch file checks that a weighted mean lies between its extremes, which is the whole of what a benchmark drawn from one slice can be held to. The intrinsic dimension file checks the algebra that turns a power law into a dimension, not Weyl's law itself, which is an asymptotic statement about manifolds. The two fairness files check the arithmetic of rates and ratios, and the multiple comparisons file assumes independent tests, as the Bonferroni file does. The Landauer file checks the constant and the monotonicity of the bound, and the entropies in equation 13.3 are the ledger's measurements. The whitening and Mahalanobis files work in the covariance's eigenbasis, where the covariance is diagonal, which is the form equations 0.6 and 10.1 state. The standard error file assumes independent draws, which is the assumption the Nadeau and Bengio file removes. The attention file takes scalar values and one head, and the product quantization file checks two pieces, which is the case the additivity extends from. The Laplacian file states the unnormalized form, and equation 0.19's normalized form is the same quadratic form in rescaled coordinates. The eviction file checks what attention over a subset can and cannot do, and the serving-stack numbers are the ledger's. The pipeline file's rank bound is for linear stages, and the quotient inheritance holds for every stage. The teacher forcing file takes the model as a function of the prefix, which is what a decoder is. The geodesic distance file takes the distance from Mathlib's simple graphs, and the radius-and-angle claim of chapter 3 stays a measurement, as does the radius-against-degree correlation. The eigenvalue file states the two facts the book uses and not the spectral theorem, which Mathlib holds and the book does not restate. The classifier, boundary, and margin files are for the linear classifier, and the null model file checks what a label permutation preserves, not the distribution of any statistic under it. The confound file is the linear case, and the block error file assumes independent symbol losses. The cache file counts hits over a request set and says nothing about replacement policies. The contrastive file uses a margin loss on pair scores, and the paraphrase file takes the within-input spread as given. The quantizer files bound the identity reader's error, and what a quantizer does to a consumer is the flip's question. The rotary file is the two-dimensional rotation the embedding is built from, and the cross-validation file checks the accounting of folds and not their independence, which is the correction's subject. The principal-components file works in the eigenbasis and does not prove that the eigenbasis exists, which is the spectral theorem. The commute-time file states the collapsed resistance and its consequences and not the convergence to it, which is von Luxburg, Radl, and Hein's theorem. The multiplet file pairs the cycle's eigenvalue formula and does not derive the formula from the cycle's Laplacian. The classifier and clustering files state the arithmetic each method rests on, the stump's flatness, the sigmoid's shape, the mean's optimality, the linkage updates, and not that any method finds what it is looking for. The boosting file checks one reweighting step and not the convergence of the sum, and the shard file assumes the global top set is strict. The bar file states the logic of a registered bar against a null and not any statistic's distribution, the rank file takes Mathlib's rank and does not compute one, and the percentile file states the empirical distribution function and not any order statistic. The twelve-domain flip of chapter 4 is a measurement, not a theorem, and stays in the ledger as demonstrated. AUROC and F1 are formalized on finite index sets with real scores, which is the case every chapter uses. The remaining results the book cites as proved, the Keep-the-Angle theorem among them, are proved in Volume 14 and are not re-checked here.
To rebuild, from the lean\ directory, run lake exe cache get and then lake build.