AFTD Auto-Formalizing Theoretical Domains

From papers, books and you

Open Problems

Open problems the machine works on, from papers and books or submitted by you. A problem counts as settled when a Lean theorem answers it, one way or the other, and that theorem has passed the round trip.

How submitting works

Submit one precise statement as a GitHub issue; Lean is optional. Once a maintainer accepts it, the machine states it in Lean, checks that the statement says what you said, and tries to prove it. A proved problem appears here, credited to you. To dispute a result, open a challenge; for anything else, use the discussions.

Settled in Lean60
Stated in Lean, Prover Stuck0
Stated in Lean, Not Yet Proved370
Not Yet Stated in Lean900
Awaiting Review0
Declined0

Settled in Lean

60

Answered by a Lean theorem that settles the question, one way or the other.

OP-4 Exact T-count of the line cubic phase gate familySettledQuantum Computation

For an integer n ≥ 5, let f_n : (ZMod 2)^n → ZMod 2 be the cubic form f_n(x_1, ..., x_n) = ∑_{i=1}^{n-2} x_i x_{i+1} x_{i+2}, and let U_{f_n} be the diagonal n-qubit gate acting by |x⟩ ↦ (-1)^{f_n(x)} |x⟩. Let δ(U_{f_n}) denote the minimum number of T gates required to implement U_{f_n} in a Hadamard-free {CNOT, T} circuit with diagonal Clifford gates free. By Proposition 65, δ(U_{f_n}) ≥ 2n + 1 for all n ≥ 5, with equality δ(U_{f_n}) = 2n + 1 known to hold for 5 ≤ n ≤ 12. Does δ(U_{f_n}) = 2n + 1 hold for all n ≥ 5?

Posed in arXiv:2610.01024, Appendix K.2, item 1 — Exact $T$-counts of Toffoli layers from an isotropy bound

In Lean: line_cubic_t_count_lower_bound (partial), line_cubic_t_count_five (partial), line_cubic_t_count_six (partial), open_problem_line_cubic_t_count (statement), line_cubic_boundary_extension (partial), line_cubic_nat_family_exists (partial)

OP-45 Does MXS imply EEF1 for additive goods?SettledFair Division

Notation as in the source: n agents, a set M of indivisible goods, valuations v_i with v_i(empty) = 0. An allocation is MXS-fair to agent i (minimum EFX share) if v_i(A_i) >= v_i(B_i) for some allocation B that is EFX-fair to i. An allocation A is EEF1-fair (epistemic EF1) to agent i if there is an allocation B with B_i = A_i that is EF1-fair to i, i.e. for every j there is a good g in B_j with v_i(B_i) >= v_i(B_j minus g). For additive goods and equal entitlements, is every allocation that is MXS-fair to agent i also EEF1-fair to agent i?

Posed in arXiv:2502.02815, Sec. 6, open problem 1 — Exploring Relations among Fairness Notions in Discrete Fair Division

What is known

The implication holds for two agents (Lemma 22 of the source). Its inference engine settles almost every other implication among the 22 notions in this setting; this is the one left unresolved there.

In Lean: mxs_fair_not_imp_eef1_fair (negation)

OP-46 Does APS imply PROP1 for additive goods with unequal entitlements?SettledFair Division

Additive goods, entitlements w_i > 0 summing to 1. Agent i's AnyPrice share is APS_i = min over price vectors p in R^m of the max of v_i(S) over bundles S with p(S) <= w_i p(M); an allocation is APS-fair to i if v_i(A_i) >= APS_i. It is PROP1-fair to i if v_i(A_i) >= w_i v_i(M), or v_i(A_i plus g) > w_i v_i(M) for some good g not in A_i (the source uses strict inequality). Is every allocation that is APS-fair to agent i also PROP1-fair to agent i?

Posed in arXiv:2502.02815, Sec. 6, open problem 2 — Exploring Relations among Fairness Notions in Discrete Fair Division

What is known

The source maps implications among 22 fairness notions with an inference engine; for additive goods with unequal entitlements this implication is left open, even for two agents.

In Lean: aps_fair_not_imp_prop1_fair (negation)

OP-47 Does MXS imply PROP1 for submodular goods?SettledFair Division

Notation as in the source: n agents, a set M of indivisible goods, valuations v_i with v_i(empty) = 0. An allocation is MXS-fair to agent i (minimum EFX share) if v_i(A_i) >= v_i(B_i) for some allocation B that is EFX-fair to i. An allocation is PROP1-fair to i if v_i(A_i) >= v_i(M)/n or v_i(A_i plus g) > v_i(M)/n for some good g not in A_i. For monotone submodular valuations over goods and equal entitlements, is every allocation that is MXS-fair to agent i also PROP1-fair to agent i?

Posed in arXiv:2502.02815, Sec. 6, open problem 3 — Exploring Relations among Fairness Notions in Discrete Fair Division

What is known

The implication holds for submodular valuations with binary marginals (Lemma 68 of the source).

In Lean: mxs_fair_imp_prop1_fair_of_submodular (statement)

OP-48 Does pairwise MMS imply MMS for submodular goods with binary marginals?SettledFair Division

Equal entitlements, n agents, valuations submodular with binary marginals (v_i(S plus g) - v_i(S) in {0, 1}). Agent i's maximin share MMS_i is the max over partitions of M into n bundles of the min bundle value. An allocation is pairwise-MMS-fair to i if for every other agent j, A_i is worth at least i's 2-agent maximin share of A_i union A_j. Is every allocation that is pairwise-MMS-fair to every agent also MMS-fair to every agent?

Posed in arXiv:2502.02815, Sec. 6, open problem 4 — Exploring Relations among Fairness Notions in Discrete Fair Division

What is known

The source maps implications among 22 fairness notions; for submodular goods with binary marginals this implication is one of the four it could not resolve.

In Lean: pmms_fair_not_imp_mms_fair (negation)

OP-49 Swing rigidity of weighted voting gamesSettledGeneral Equilibrium & Cooperative Games

For a simple game on n players and a player i, the swing table entry T(i, k) is the number of coalitions S of size k not containing i such that S is losing and S plus i is winning. Is every weighted voting game determined by its swing table among all simple games, i.e. if f is weighted and g is any simple game with the same swing table, must f = g?

Posed in arXiv:2607.07013, Conjecture 10.2 (Sec. 10); first of the open problems in Sec. 11 — What Semivalues Cannot See: The Information Content of Anonymous Marginal Values

What is known

Distinct non-weighted simple games can share a swing table, so semivalues cannot tell them apart. An exhaustive census at n = 5 and searches at n = 6, 7 found no weighted game sharing its swing table with another game.

In Lean: weighted_game_eq_of_swing_table_eq (statement)

OP-52 EF1 and Pareto optimality for connected chores on a pathSettledFair Division

Indivisible chores are arranged on a path and each agent must receive a connected bundle (an interval); costs are additive and strictly positive. An allocation is EF1 if for every agents i, j, removing some chore from i's bundle makes i not envy j. Pareto optimality is taken among connected allocations. Does a connected allocation that is both EF1 and Pareto optimal always exist?

Posed in arXiv:2609.32545, Sec. 4 (Conclusion) — Connected EF1 Allocations Exist in Discrete Chore Cutting

What is known

Connected EF1 (even EF1outer) allocations of chores always exist for monotone costs (the source's main result). Without connectivity, EF1 and PO are compatible for additive chores.

In Lean: connected_ef1_po_chores_incompatible (negation)

OP-55 Concavity of the QA weight-score without convex exposureSettledMechanism Design & Auctions

Given a proper scoring rule s and expert forecasts p_1..p_m, the quasi-arithmetic (QA) pool with weights w averages the forecasts in the exposure (gradient) space of s. Theorem 5.1 of the source shows that if s has convex exposure, then for every outcome j the weight-score WS_j(w) = s(QA pool of (p_i, w_i); j) is concave in w. Does this concavity hold for every proper scoring rule, without the convex-exposure assumption?

Posed in arXiv:2102.07081, Sec. 7 (Conclusions and future work), third bullet — From Proper Scoring Rules to Max-Min Optimal Forecast Aggregation

What is known

Every proper scoring rule for binary outcomes has convex exposure, as do the logarithmic and quadratic rules and several power families (App. D), so a counterexample needs at least three outcomes and a rule outside these classes.

In Lean: tsallis_three_qa_weight_score_not_concave (negation)

OP-56 Optimal receiver-utility constant in bit-string persuasionSettledMechanism Design & Auctions

The state is a bit string X drawn from a prior mu; a sender observes X and commits to a signaling scheme; the receiver guesses every bit and is paid the number of correct guesses; the sender wants as many bits as possible guessed as 1. Let R_0(mu) be the receiver's utility from the prior alone and R_max(mu) the largest receiver utility among sender-optimal schemes. What is the least constant c such that R_max(mu) <= c R_0(mu) for every prior mu?

Posed in arXiv:2606.22226, Sec. 5 (Future Work), first open direction — Quantifying Theoretical AI Alignment Guarantees: Receiver-Utility Bounds in Bayesian Persuasion

What is known

The source proves c <= 3/2 (Theorem 4.5) and gives a six-bit prior with ratio 39/31 > 5/4, so the optimal constant lies in [39/31, 3/2].

In Lean: persuasion_receiver_ratio_optimal_constant (statement), persuasion_slice_ratio (partial)

OP-57 Does the Monroe rule satisfy Droop-JR when k does not divide n?SettledSocial Choice Theory

Approval-based committee elections with n voters and committee size k. The Hare Monroe rule assigns each winner a group of about n/k voters and maximizes the number of voters who approve their assigned winner; Droop Monroe does the same with groups of n/(k + 1) voters. A rule satisfies an axiom if it always outputs an outcome providing it. Droop-JR requires that for every group of more than n/(k + 1) voters who all approve a common candidate, some voter in the group approves a member of the committee. The (Hare) Monroe rule satisfies Droop-JR when k divides n. Does it satisfy Droop-JR for all n and k?

Posed in arXiv:2508.00811, Appendix, discussion before Proposition 3; Table 1, note d — Justified Representation: From Hare to Droop

What is known

Proposition 3 of the source proves it when k divides n. Hare Monroe fails Droop-PJR even when k or k + 1 divides n, and Hare Greedy Monroe can fail Droop-JR depending on tie-breaking.

In Lean: hare_monroe_satisfies_droop_jr (statement)

OP-58 Droop-PJR+ for the Droop Monroe ruleSettledSocial Choice Theory

Approval-based committee elections with n voters and committee size k. The Hare Monroe rule assigns each winner a group of about n/k voters and maximizes the number of voters who approve their assigned winner; Droop Monroe does the same with groups of n/(k + 1) voters. A rule satisfies an axiom if it always outputs an outcome providing it. Droop-PJR+ is the Droop-quota version of the PJR+ axiom (groups of more than l n/(k + 1) voters with l commonly approved candidates must be represented, with the "+" strengthening that compares against any commonly approved unelected candidate). Droop Monroe satisfies Droop-PJR when k + 1 divides n. When k + 1 divides n, does Droop Monroe satisfy Droop-PJR+?

Posed in arXiv:2508.00811, Table 1, note a — Justified Representation: From Hare to Droop

What is known

Droop Monroe and Droop Greedy Monroe satisfy Droop-PJR and even Droop-FPJR when k + 1 divides n (Theorem 4), and can violate them otherwise (Proposition 4).

In Lean: droop_monroe_satisfies_droop_pjr_plus (statement)

OP-59 Droop-EJR+ and Droop-FJR for the Droop Monroe ruleSettledSocial Choice Theory

Approval-based committee elections with n voters and committee size k. The Hare Monroe rule assigns each winner a group of about n/k voters and maximizes the number of voters who approve their assigned winner; Droop Monroe does the same with groups of n/(k + 1) voters. A rule satisfies an axiom if it always outputs an outcome providing it. Table 1 of the source leaves open whether Droop Monroe satisfies the Droop versions of EJR+ and FJR. Does every committee output by the Droop Monroe rule (in particular when k + 1 divides n) provide Droop-EJR+ and Droop-FJR?

Posed in arXiv:2508.00811, Table 1 ("?" entries in the EJR+ and FJR columns for Droop Monroe); Conclusion — Justified Representation: From Hare to Droop

What is known

PAV and Droop MES/EES satisfy Droop-EJR+ and Droop GCR satisfies Droop-FJR, so both axioms are satisfiable; for Droop Monroe the source has no positive or negative result.

In Lean: droop_monroe_tie_violates_droop_ejr_plus_fjr (negation)

OP-60 Does Droop-FJR imply BFJR in temporal voting?SettledSocial Choice Theory

Temporal approval voting: n voters, l rounds, one candidate chosen per round; voter i approves the set a_{i,r} in round r and her satisfaction is the number of rounds whose chosen candidate she approves. Droop-FJR (Definition A.6 of the source) and base full justified representation BFJR (Definition A.5, an FJR analogue from the general approval-voting model with feasibility constraints) are both defined there, and BFJR implies Droop-FJR (Proposition A.7). Does the converse hold, i.e. does every outcome providing Droop-FJR provide BFJR, possibly under some additional assumption such as no voter approving every candidate in a round?

Posed in arXiv:2505.22513, Appendix A.3 (before Proposition A.7) — Strengthening Proportionality in Temporal Voting

What is known

BFJR implies Droop-FJR (Proposition A.7). For the EJR analogues, Droop-EJR implies BEJR once no voter approves all candidates in some round (Proposition A.4).

In Lean: temporal_droop_fjr_not_imp_bfjr (negation)

OP-61 Uniqueness of equilibrium in the publication choice problem with many typesSettledEquilibria in Games

Researchers of types theta_1 < ... < theta_k with population densities mu_i choose publication amounts a_{i,j} >= 0 at venues j to maximize sum_j a_{i,j}^alpha v_j^beta (alpha in (0,1), beta > 1) subject to the budget sum_j c_{i,j} a_{i,j} <= 1; venue impact v_j is the average type of the papers published there. A pure-strategy equilibrium is a best-response profile consistent with the impacts it induces. Venue 1 is non-competitive: c_{i,1} is the same for all types. With more than two types, is the pure-strategy equilibrium always unique?

Posed in arXiv:2511.13678, Conjecture 4.2 (Sec. 4.1) — The Publication Choice Problem

What is known

The source states uniqueness for two types under a non-competitive venue (Theorem 4.1) and reports simulations with five types consistent with uniqueness (App. A.2).

In Lean: publication_choice_many_type_equilibrium_not_unique (negation), publication_choice_three_types_three_equilibria (partial)

OP-62 Can a static threshold be 1/2-robust under strategic reward signaling?SettledMechanism Design & Auctions

Prophet inequality with strategic players: each reward X_i ~ H_i belongs to a player who commits to a signaling scheme to maximize the chance of being selected; the searcher sees only the signals and uses a threshold stopping policy. A policy is alpha-robust if it is an alpha-approximation to E[max X_i] when players signal strategically (in equilibrium) and a 1/2-approximation in the standard non-strategic setting. Is there a static (single) threshold, possibly outside the usual spectrum of 1/2-approximate thresholds, that is 1/2-robust for every instance?

Posed in arXiv:2409.18269, Remark 4.1; Sec. 6 (Conclusion and Future Directions) — Intrinsic Robustness of Prophet Inequality to Strategic Reward Signaling

What is known

Thresholds in the standard 1/2-approximation spectrum are (1 - 1/e)/2-robust and no threshold in that spectrum does better in general (Theorem 4.1, Proposition 4.2); 1/2-robustness is achievable for i.i.d. and for log-concave rewards.

In Lean: strategic_prophet_no_half_robust_static_threshold (negation)

OP-63 Is the deterministic lower bound for finding minimal elements of a poset tight?SettledAlgorithm Design & Analysis

Given n elements of an unknown partial order of width at most w, accessible through a comparison oracle, a deterministic algorithm must output all minimal elements. The source proves that at least (w + 1)n/2 - w queries are needed in the worst case and that wn queries suffice. Is the lower bound tight, i.e. is the deterministic query complexity (w + 1)n/2 - w up to lower-order terms?

Posed in arXiv:0707.1532, Sec. 4 (introduction to the k-selection problem); Theorems 11 and 16 — Sorting and Selection in Posets

What is known

Theorem 16 gives the adversary lower bound (w + 1)n/2 - w and Theorem 11 an algorithm with at most wn queries, so the leading constant is known only up to a factor of about 2.

In Lean: pm_conjecture_false (negation), pm_exact_complexity (partial), pm_lower_bound (partial)

OP-67 Price of MNW for two agentsSettledFair Division

Two agents with additive, nonnegative valuations over indivisible goods, normalized so each values all goods at 1. The price of maximum Nash welfare (MNW) is the worst case, over instances, of the ratio between the optimal utilitarian welfare and the welfare of the best MNW allocation; the strong price uses the worst MNW allocation. The source shows both lie in [27/23, 5/4] for two agents. What are their exact values?

Posed in arXiv:1905.04910, Theorem 5.4 and Table 1 — The Price of Fairness for Indivisible Goods

What is known

Theorem 5.4 of the source: for two agents the price and the strong price of MNW are at least 27/23 and at most 5/4. For general n the price of MNW is Theta(n).

In Lean: mnw_two_agents_welfare_le (statement), mnw_two_agents_price_lower_bound (partial)

OP-68 Linkedness and the two-agent price of connectivitySettledFair Division

Goods are the vertices of a connected graph G; for two agents with an additive utility u, MMS(u, 2) is the best min-value over all bipartitions of the vertices and G-MMS(G, u, 2) the best over bipartitions into two connected parts. The price of connectivity PoC(G, 2) is the sup over u of MMS(u, 2)/G-MMS(G, u, 2). G is (a, b)-linked if for any disjoint vertex sets M_1, M_2 with |M_1| = a, |M_2| = b there are disjoint connected subgraphs containing them. For k >= 2, if G is (2, k - 1)-linked but not (2, k)-linked, is PoC(G, 2) = 2k/(2k - 1)?

Posed in arXiv:1908.05433, Conjecture 3.10 (Sec. 3) — The Price of Connectivity in Fair Division

What is known

Not being (2, k)-linked forces PoC(G, 2) >= 2k/(2k - 1) (Proposition 3.9). The case k = 2 holds (Corollary 3.6), and the conjecture holds for complete graphs minus a nonempty matching (Theorem 3.11).

In Lean: poc_linkedness_conjecture_counterexample (negation)

OP-69 Quota and population monotonicity for four states at a common house sizeSettledSocial Choice Theory

An apportionment solution assigns, to every population vector of four states (all positive) and every house size h, a seat vector summing to h. Quota: each state gets the floor or ceiling of its standard quota h p_i / sum p. Population monotonicity forbids a state whose population weakly increases from losing a seat to a state whose population weakly decreases. Is there a deterministic solution for four states satisfying quota and population monotonicity when monotonicity is only required between profiles with the same house size (no anonymity, order preservation or other regularity assumed)?

Posed in arXiv:2608.02759, Sec. 5 (Conclusion and applications), first limitation — Quota and Population Monotonicity Across House Sizes are Incompatible for Apportionment to Four States

What is known

Without order-preservation assumptions, quota and population monotonicity are incompatible for five states (arXiv:2202.11061) and for four states when comparisons may span house sizes (the source, using house sizes 3, 5, 8 and 10); for three states Webster's method is compatible with both.

In Lean: quota_population_monotone_incompatible_four_states_common_house (negation)

OP-70 Linear entropy of geometric Plackett–Luce modelsSettledSocial Choice Theory

The Plackett–Luce model with weights w_1, ..., w_m draws a ranking of m alternatives by repeatedly picking the next alternative with probability proportional to its weight among those remaining. For the geometric weights w = (1, phi, ..., phi^(m-1)) with a constant phi, is the Shannon entropy of the resulting distribution over rankings O(m) for every phi in (0, 1)?

Posed in Preference Elicitation as Average-Case Sorting (AAAI 2021), Sec. 5, after Theorem 12 — Preference Elicitation as Average-Case Sorting

What is known

Theorem 12 of the source proves entropy O(m) for phi in (0, 1/2]; its proof uses that removing entries does not increase the entropy of the weight vector, which needs phi <= 1/2.

In Lean: plackett_luce_geometric_entropy_linear (statement)

OP-71 Is leximin among EF1 allocations Pareto optimal?SettledFair Division

Indivisible goods, additive nonnegative valuations. Among all EF1 allocations (each agent envies another only up to removing one good from the other's bundle), choose one that is leximin-optimal: it maximizes the smallest utility, then the second smallest, and so on. Is such an allocation always Pareto optimal?

Posed in The Unreasonable Fairness of Maximum Nash Welfare (ACM TEAC 7(3), 2019), Appendix B (The Elusive Combination of EF1 and PO) — The Unreasonable Fairness of Maximum Nash Welfare

What is known

Maximizing egalitarian welfare subject to EF1 need not be PO (a three-agent example in the source); MNW allocations are always EF1 and PO, and leximin refines the egalitarian solution in that example.

In Lean: leximin_ef1_not_pareto_optimal (negation)

OP-89 Existence of an optimal coloring that is a strong equilibrium in unweighted Max-k-Cut gamesSettledEquilibria in Games

Let $G=(V,E)$ be a finite simple unweighted graph and $k\ge 3$. In the unweighted Max-$k$-Cut game each vertex picks a color in $\{1,\dots,k\}$ and its utility is the number of neighbours with a different color; a coloring is optimal if it maximizes the total utility (equivalently, the cut value), and a strong equilibrium if no nonempty coalition can jointly recolor so that every member strictly gains. Does every such game admit an optimal coloring that is a strong equilibrium? (Not every optimal coloring is one: arXiv:2610.04948, Theorem 2.)

Posed in arXiv:2610.04948, Sec. 4 (Concluding remarks)

What is known

A positive answer implies existence of strong equilibria (OP-85); the paper's counterexample (Remark 6) does not rule out another, stable optimum on its graph. Optimal colorings are strong equilibria when the maximum degree is at most 2k-1.

In Lean: maxcut_op89_optimal_strong_equilibrium_exists (statement), maxcut_op89_exists_of_max_degree_le (partial), maxcut_op89_exists_of_max_degree_five (partial), maxcut_op89_exists_of_card_le (partial), maxcut_anchor_three_coloring_strong (partial), maxcut_op89_optimal_strong_equilibrium_negation (negation)

OP-121 Existence of a Complete Cycle Permutation for $n \ge 8$SettledCombinatorics for TCS

Let $n \ge 8$ be an integer. Let $\sigma$ be a permutation of $\{1, \ldots, n\}$. Arrange the labels $\sigma(1), \ldots, \sigma(n)$ cyclically around the $n$-cycle $C_n$. An arc is a nonempty proper contiguous subsegment along the cycle, or the entire cycle. The sum of an arc is the sum of the labels of its vertices. We say that the permutation $\sigma$ is complete if every integer $k \in \{1, \ldots, n(n+1)/2\}$ can be represented as the sum of some arc along the cycle. Does there exist any integer $n \ge 8$ and any permutation $\sigma$ of $\{1, \ldots, n\}$ such that the cycle labeled by $\sigma$ is complete?

Proposed here, building on arXiv:2610.08889, Sec. 1, after Theorem 1 — Consecutive Cycle Sums; the paper does not ask it

What is known

Theorem 1 establishes that the standard consecutive ordering (1, 2, ..., n) around an n-cycle is incomplete for all n >= 8. However, there are n(n-1)+1 distinct arcs on an n-cycle, which strictly exceeds the n(n+1)/2 target sums for every n >= 3. The paper does not investigate whether placing other permutations of {1, ..., n} around the cycle can eliminate duplicate sums and achieve all numbers from 1 to T_n for any n >= 8.

In Lean: exists_cycle_labeling_complete_ge_eight (statement), cycle_labeling_complete_nine (partial), cycle_labeling_complete_ten (partial)

OP-135 Sharpness of the (5n-1)/6 local average dominating set bound for n at least 4SettledGraph Theory & Graph Algorithms

Let $G$ be a finite simple graph of order $n \ge 4$ without isolated vertices, and let $v \in V(G)$. Theorem 3.8 proves that the local average order of dominating sets containing $v$, $avd_v(G)$, satisfies $avd_v(G) \le \frac{5n-1}{6}$. Is this upper bound sharp for any $n \ge 4$, i.e., does there exist a graph $G$ of order $n \ge 4$ without isolated vertices and a vertex $v \in V(G)$ such that $avd_v(G) = \frac{5n-1}{6}$? If not, what is the exact maximum value of $avd_v(G)$ over all graphs of order $n$ without isolated vertices and all $v \in V(G)$?

Proposed here, building on arXiv:2610.11446, Theorem 3.8 — On the local average order of dominating sets; the paper does not ask it

What is known

Theorem 3.8 proves that for every graph G of order n with no isolated vertices and every vertex v, avd_v(G) <= (5n - 2 deg(v) + 1)/6 <= (5n-1)/6. For n = 3, this bound is attained by the path P_3 at an endpoint (avd = 7/3 = (15-1)/6). However, the proof derives (5n-1)/6 by bounding each term (deg(u)+1)/(2^{deg(u)+1}-1) <= 2/3 for all u not in N[v], with equality requiring all such vertices to have degree 1, which cannot all have disjoint closed neighborhoods when n >= 4. It remains open whether the bound (5n-1)/6 is sharp for any n >= 4, or what the exact maximum of avd_v(G) is as a function of n.

In Lean: simple_graph_local_avg_dominating_order_lt_of_four_le (negation)

OP-161 Classification of planar graphs whose powers are all well-coveredSettledGraph Theory & Graph Algorithms

Let $G$ be a finite connected simple planar graph with at least two vertices. Characterize all such graphs $G$ with the property that for every integer $d \geq 1$, the power graph $G^d$ is well-covered. In particular, is every such planar graph either a complete graph ($K_3$ or $K_4$), or an induced cycle $C_5$, or a clique blow-up thereof?

Proposed here, building on arXiv:2610.09300, Theorem 1.4 — On graphs whose powers are well-covered; the paper does not ask it

What is known

The paper completely classifies connected chordal graphs whose powers are all well-covered (Theorem 1.2: only complete graphs), connected very well-covered graphs (Theorem 1.3: complete bipartite graphs), and connected cochordal graphs (Theorem 1.4: well-covered with diameter at most 2). A previous result by Deniz (2022) established that bipartite graphs whose powers are well-covered are disjoint unions of $K_{n,n}$ and $K_1$. Planar graphs are another fundamental graph class for which well-coveredness has been extensively studied, yet the classification of planar graphs all of whose powers are well-covered remains open.

In Lean: cycle_seven_all_powers_well_covered (partial), cycle_five_all_powers_well_covered (partial), complete_bipartite_two_two_all_powers_well_covered (partial), not_planar_all_powers_well_covered_characterization (negation)

OP-164 Edge-connectivity lower bound via distance-d Lin-Lu-Yau curvatureSettledGraph Theory & Graph Algorithms

Let d >= 3 be an integer. For every connected graph G with diameter diam(G) >= d, minimum degree delta(G), edge-connectivity kappa'(G), and distance-d Lin--Lu--Yau curvature kappa_LLY^(d)(G) = inf { kappa_LLY(x, y) : x, y in V(G), dist(x, y) = d }, does the inequality kappa'(G) >= (d / 2) * delta(G) * kappa_LLY^(d)(G) hold?

Proposed here, building on arXiv:2610.10559, Theorem 1.2 — Edge-Connectivity versus Lin--Lu--Yau Curvature; the paper does not ask it

What is known

Theorem 1.1 shows kappa'(G) >= delta(G) * kappa_LLY^(2)(G) for diameter 2, and Theorem 1.2 proves kappa'(G) >= (3/2) * delta(G) * kappa_LLY^(3)(G) for diameter at least 3. In the proof of Theorem 1.2, vertices across a minimum edge cut can reach distance 3. When diam(G) >= d, if both components have depth at least d/2, the distance between vertices across the cut could be d, suggesting a general factor of d/2. However, asymmetric cuts where one side is small (as in Case 1 of Theorem 1.2) leave open whether the factor d/2 holds universally for all d >= 3.

In Lean: edge_connectivity_ge_half_scale_mul_min_degree_mul_lly_lower_bound (statement), edge_connectivity_ge_three_halves_min_degree_mul_lly_lower_bound_three (partial), edge_connectivity_ge_half_scale_mul_min_degree_mul_lly_lower_bound_of_eq_minDegree (partial), not_edge_connectivity_ge_half_scale_mul_min_degree_mul_lly_lower_bound (negation)

OP-165 Exact edge-connectivity threshold for positive Lin-Lu-Yau curvatureSettledGraph Theory & Graph Algorithms

For each integer n >= 3, let c(n) be the smallest integer k such that every connected simple graph G on n vertices with edge-connectivity kappa'(G) >= k satisfies kappa_LLY(x, y) > 0 for all edges xy in E(G). Is c(n) = ceil(2 * n / 3 - 1) for all n >= 3?

Proposed here, building on arXiv:2610.10559, Theorem 1.4 — Edge-Connectivity versus Lin--Lu--Yau Curvature; the paper does not ask it

What is known

Theorem 1.3 proves that edge-connectivity at least 2n/3 - 1 guarantees kappa_LLY(x, y) > 0 for every edge. Theorem 1.4 establishes sharpness by constructing counterexamples with kappa'(G) = 2n/3 - 2 and an edge of negative curvature, but only under the hypothesis that 2n/3 is an even integer at least 6. For general values of n (especially where 2n/3 is not an even integer), the exact minimum edge-connectivity threshold ensuring everywhere positive Lin--Lu--Yau curvature is left open.

In Lean: lly_positive_edge_connectivity_threshold_three (partial), lly_curvature_pos_of_edge_connectivity_ge (partial), lly_positive_edge_connectivity_threshold_five (partial), lly_positive_edge_connectivity_threshold (definition), not_forall_lly_positive_edge_connectivity_threshold_eq_ceil (negation)

OP-182 Approximation Ratio Beyond 1/2 for Pandora's Problem with Deferred-to-Deadline CommitmentSettledOnline Algorithms

For Pandora's problem with deadlines, can an efficient policy exploiting deferred-to-deadline commitment achieve an approximation ratio strictly greater than $1/2$ against the fully adaptive optimum with deferred-until-stopping commitment?

Posed in arXiv:2610.13775, Sec. 5, para. 2 — A $1/2$-Approximation for Pandora's Problem with Deadlines

In Lean: opt_dtd_le_opt_dus (partial), op182_deferred_to_deadline_beyond_half_against_stopping (negation), op182_deferred_to_deadline_beyond_half_self_benchmark (partial)

OP-203 Permutation property of greedy difference sequences with arbitrary initial termsSettledCombinatorics for TCS

Let $a_1, a_2$ be distinct positive integers. Define a sequence $(a_n)_{n \ge 1}$ of positive integers recursively: for each $n \ge 2$, let $a_{n+1}$ be the least positive integer not in $\{a_1, \dots, a_n\}$ such that $|a_{n+1} - a_n| \notin \{|a_k - a_{k-1}| : 2 \le k \le n\}$. Is $(a_n)_{n \ge 1}$ a permutation of the positive integers for every choice of distinct initial terms $a_1, a_2$?

Proposed here, building on arXiv:2610.15860, Theorem 1 — A note on the Slater$\unicode{x2013}$V\'elez permutation; the paper does not ask it

What is known

The 1977 paper 'Permutations of the positive integers with restrictions on the sequence of differences' introduced this greedy construction for initial values $a_1 = 1, a_2 = 2$ and proved that the resulting sequence exhausts $\mathbb{N}$. In arXiv:2610.15860, the author proves that its sequence of consecutive absolute differences is also a permutation of $\mathbb{N}$. The author's proof that differences exhaust $\mathbb{N}$ applies to any greedy sequence that is already known to be a permutation of $\mathbb{N}$. However, whether the sequence $(a_n)_{n \ge 1}$ itself exhausts $\mathbb{N}$ when starting from arbitrary distinct initial values $(a_1, a_2) \in \mathbb{N}^2$ remains open.

In Lean: greedy_distinct_diff_seq_surjective (statement), greedy_distinct_diff_seq_one_two_surjective (partial)

OP-301 Classification of leap groups of kayak paddle graphsSettledGraph Theory & Graph Algorithms

For integers $k, m \ge 3$ and $l \ge 1$, let $\mathrm{KP}(k, m, l)$ denote the kayak paddle graph formed by taking a cycle $C_k$ and a cycle $C_m$ and connecting a vertex of $C_k$ to a vertex of $C_m$ via a simple path of length $l$ (having $l+1$ vertices and $l$ edges). Characterize the leap group $\Lambda_1(\mathrm{KP}(k, m, l))$ for all parameters $k, m, l$. In particular, is $\Lambda_1(\mathrm{KP}(k, m, l))$ always isomorphic to either the alternating group $A_N$ or the symmetric group $S_N$ on $N = k + m + l - 1$ vertices whenever the graph admits a hop?

Posed in arXiv:2610.18463, Question 2.20 — The group generated by a graph's derangements

In Lean: kayak_paddle_leap_group_not_eq_top_or_alternating (negation), kayak_paddle_leap_group_ne_of_even_cycle (partial), kayak_paddle_three_three_one_leap_group_eq_top (partial)

OP-302 Matroid flats from hop-maximal and leap-maximal subgraphsSettledGraph Theory & Graph Algorithms

Let $G = (V, E)$ be a finite simple graph. For an edge subset $F \subseteq E$, denote by $G[F] = (V, F)$ the spanning subgraph with edge set $F$. Define $F$ to be hop-closed (hop-maximal) in $G$ if for every edge $e \in E \setminus F$, the graph $G[F \cup \{e\}]$ has strictly more hops than $G[F]$. Similarly, define $F$ to be leap-closed (leap-maximal) in $G$ if for every edge $e \in E \setminus F$, the leap group $\Lambda_1(G[F \cup \{e\}])$ strictly contains $\Lambda_1(G[F])$. Does the collection of hop-closed edge subsets (respectively, leap-closed edge subsets) form the set of flats of a matroid on ground set $E$?

Posed in arXiv:2610.18463, Question 5.9 — The group generated by a graph's derangements

In Lean: simple_graph_completeGraph_three_hop_closed_not_intersection_closed (partial), simple_graph_completeGraph_three_leap_closed_not_intersection_closed (partial), simple_graph_hop_or_leap_maximal_not_matroid_flats (negation)

OP-332 Subadditivity of Mutual f-Information for Power DivergencesSettledInformation Theory & Coding

For \beta \in (0, 1), let f_\beta: [0, \infty) \to \mathbb{R} be the power divergence generator f_\beta(x) = \frac{x^\beta - \beta x + (\beta - 1)}{\beta(\beta - 1)}. For any finite discrete random variables X, Y, Z satisfying the Markov chain relation Y \to X \to Z (i.e., p_{XYZ}(x,y,z) = p_X(x) p_{Y|X}(y|x) p_{Z|X}(z|x)), does the subadditivity inequality \widetilde{I}_{f_\beta}(X; YZ) \le \widetilde{I}_{f_\beta}(X; Y) + \widetilde{I}_{f_\beta}(X; Z) hold for all such distributions, or does there exist a finite alphabet counterexample? In particular, does subadditivity hold for the Hellinger case \beta = 1/2?

Proposed here, building on arXiv:2610.21231, Theorem 1 — On the Subadditivity of Mutual f-Information; the paper does not ask it

What is known

The paper establishes that f(x) = x log x, f(x) = (x-1) log x, and new families such as f(x) = x log x + (2/3)(\sqrt{x}-1)^2 yield subadditive mutual f-information, but does not address whether the standard Hellinger / Tsallis / power divergences f_\beta(x) = (x^\beta - \beta x + \beta - 1)/(\beta(\beta - 1)) for \beta \in (0, 1) satisfy subadditivity under conditionally independent observations. For \beta = 1/2 (the Hellinger affinity / Bhattacharyya distance), g(x) = x^2 f''(x) = (1/4) \sqrt{x}, which does not satisfy the condition of Theorem 1 since g''(x) < 0 but the differential inequality (3) does not hold without the affine log term.

In Lean: mutual_power_divergence_information_not_subadditive_quarter (negation), mutual_hellinger_information_not_subadditive (negation)

OP-360 Expressiveness and Complexity of Single-Counter Update Symmetric Counter MachinesSettledAutomata & Formal Languages

Consider the syntactic fragment of symmetric d-counter machines (for d ≥ 2) in which all update transitions (q, update(w), q') are single-counter, meaning that w has at most one non-zero coordinate, while zero-test transitions remain unrestricted. Is this single-counter fragment strictly less expressive than unrestricted symmetric d-counter machines in terms of reachability relations, and what is the computational complexity of its reachability problem?

Posed in arXiv:2610.23495, Sec. 1, Open questions — Symmetric two-counter machines

What is known

The paper shows that if both zero-tests and updates are restricted to single counters / symmetric, the model degenerates to 1-VASS, but the expressive power and complexity when only update instructions are restricted to single-counter modifications remains open.

In Lean: op_360_single_counter_update_strictly_less_expressive (statement)

OP-494 Additive chromatic number bounded by maximum degree for bipartite graphsSettledGraph Theory & Graph Algorithms

Let $G = (V, E)$ be a connected bipartite finite simple graph with maximum degree $\Delta(G) \ge 2$. Is the additive chromatic number $\eta(G)$ at most $\Delta(G)$? That is, does there exist a vertex labeling $f: V \to \{1, \dots, \Delta(G)\}$ such that for every edge $\{u, v\} \in E$, $\sum_{w \in N(u)} f(w) \neq \sum_{w \in N(v)} f(w)$?

Proposed here, building on arXiv:2610.30174, Theorem 2.1 — An elementary proof of a tight $\Delta+1$ bound for the additive chromatic number; the paper does not ask it

What is known

Theorem 2.1 proves that η(G) ≤ Δ(G) + 1 for all finite simple graphs, and observes that this bound is tight for complete graphs K_{Δ+1}. For Δ(G) ≥ 2, complete graphs K_{Δ+1} have at least 3 vertices and are never bipartite. For Δ(G) = 1, the only connected bipartite graph is K_2, which has η(K_2) = 2 = Δ(K_2) + 1. For regular bipartite graphs, setting f(v) = 1 on one part and f(v) = 2 on the other gives distinct neighborhood sums 2d ≠ d, so η(G) = 2 ≤ Δ(G) whenever Δ(G) ≥ 2. It is natural to ask whether the bound improves to Δ(G) for all connected bipartite graphs with Δ(G) ≥ 2.

In Lean: op_494_additive_chromatic_bipartite_maxDegree (statement), additive_coloring_bipartite_maxDegree_add_one (partial)

OP-502 Sufficiency of Known Necessary Conditions for Prefix Reversal GenerationSettledCombinatorics for TCS

Let $n, m, k$ be integers with $2 \le k < m < n$. For each $i \in \{k, m, n\}$, let $r_i \in S_n$ be the prefix reversal permutation reversing the first $i$ positions and fixing the rest. Suppose all of the following conditions hold: (1) $m > n/2$; (2) at least one of $k, m, n$ is even; (3) at least one of $k, m, n$ is congruent to $2$ or $3$ modulo $4$; (4) $\gcd(k, m, n) = 1$; (5) $m + k \ge n + 1$; and (6) $\gcd(n-m, n-k) = 1$. Does the subgroup $\langle r_n, r_m, r_k \rangle$ necessarily equal the full symmetric group $S_n$?

Proposed here, building on arXiv:2610.30892, Lemma 3.2 — On the generation of the symmetric group by index relations of three prefix reversals; the paper does not ask it

What is known

Prior work and this paper identify several necessary conditions for three prefix reversals $r_k, r_m, r_n$ with $2 \le k < m < n$ to generate $S_n$: $m > n/2$; at least one index is even; at least one index is congruent to 2 or 3 mod 4; $\gcd(k, m, n) = 1$; $m + k \ge n + 1$ (Theorem 3.1); and $\gcd(n-m, n-k) = 1$ (Lemma 3.2). While recurrence shifts by 4 and 2 are established, it remains open whether these necessary conditions are collectively sufficient for generation, or whether additional obstructions exist.

In Lean: prefix_reversal_six_five_three_not_top (partial), prefix_reversal_necessary_conditions_not_sufficient (negation), prefix_reversal_gcd_diff_necessary (partial)

OP-598 complete pmms matroid rank sharp mms factorSettledFair Division

For every integer n >= 2, every finite set M of indivisible goods, every profile of matroid-rank valuations v_1,...,v_n on M, and every complete allocation A=(A_1,...,A_n) that is pairwise maximin-share fair, is (n-1) v_i(A_i) >= MMS_i(n,M) for every agent i? Here MMS_i(k,S)=max over partitions S=B_1 disjoint-union ... disjoint-union B_k of min_j v_i(B_j), and pairwise fairness means v_i(A_i) >= MMS_i(2,A_i union A_j) for every ordered pair i != j. No welfare optimality or nonwastefulness is assumed. Equivalently, is the optimal universal PMMS-to-MMS guarantee for complete allocations under matroid-rank valuations exactly 1/(n-1)?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The KB's proved original counterexample shows that PMMS need not imply MMS even for three agents with identical partition-matroid rank valuations, but leaves the quantitative relationship completely open. A sharp guarantee for every number of agents would replace that failed implication by a theorem about an important class of substitutes valuations. The known additive-goods implication has a constant MMS guarantee and does not transfer to rank valuations. Barman--Verma's full version proves only a 1/(2n-1) guarantee under the additional hypothesis of a social-welfare-maximizing partial allocation (Appendix E, Theorem 7); that result neither gives the proposed factor nor covers arbitrary complete PMMS allocations. The tested sharpness family already consists of complete nonwasteful, hence welfare-maximizing allocations, so adding efficiency cannot improve the conjectured constant. Evidence: Experiment 7184 checked 177589 focal-agent allocations for 72 GF(2)-representable rank valuations on 10,12,14,16 goods, with n=3,4,5,6: all 27098 PMMS-fair focal bundles obeyed the proposed bound, including sampled bundles with redundant goods. Integer category-count optimization in 7183 and 7186 found no partition-matroid violation for n=3..8 and own ranks up to 6, but many searches were FEASIBLE or UNKNOWN and are not asserted exhaustive. Experiment 7189 verified the proposed sharpness family for n=2..40: agent 0 values the number of represented categories, owns one category-0 item, and each other agent j owns n category-j copies and values only her own goods additively. The complete allocation is PMMS and nonwasteful; agent 0 gets value 1 and has MMS n-1. These are computational observations, not a proof of the universal bound.

In Lean: complete_pmms_matroid_rank_sharp_mms_factor (statement), pmms_matroid_rank_mms_factor_two_agents (partial)

OP-733 Universal spectral bound for positive trace-preserving maps in dimension at least threeSettledQuantum Computation

Let $d \ge 3$ be an integer. Let $\Phi: M_d(\mathbb{C}) \to M_d(\mathbb{C})$ be a positive, trace-preserving linear map (meaning $\Phi(X)$ is positive semidefinite whenever $X$ is positive semidefinite, and $\operatorname{tr}(\Phi(X)) = \operatorname{tr}(X)$ for all $X$). Let $m(\Phi) = \min \{\operatorname{Re}\lambda : \lambda \in \sigma(\Phi)\}$ and $\operatorname{Tr}\Phi = \sum_{\lambda \in \sigma(\Phi)} \lambda$ (the trace of $\Phi$ as a linear operator on $M_d(\mathbb{C})$). Does every such positive trace-preserving map satisfy $\operatorname{Tr}\Phi \le d\,m(\Phi) + d^2 - d$, or does there exist a positive trace-preserving map $\Phi$ on $M_d(\mathbb{C})$ with $\operatorname{Tr}\Phi > d\,m(\Phi) + d^2 - d$?

Posed in arXiv:2610.37187, Sec. 9, Concluding remarks — Removing Trace Preservation from a Universal Spectral Bound for 2-Positive Maps

In Lean: universal_spectral_bound_positive_trace_preserving (statement), not_universal_spectral_bound_positive_tp_dim_three (partial), not_universal_spectral_bound_positive_trace_preserving (negation), exists_positive_tp_violating_universal_spectral_bound (partial)

OP-744 Existence of a non-transitive cycle of length at least 12 for 11-sided diceSettledCombinatorics for TCS

Let $n = 11$. A non-standard 11-sided die is a non-decreasing 11-tuple $\mathbf{x} = (x_1, \dots, x_{11}) \in \{1, \dots, 11\}^{11}$. Let $G_{11}$ be the directed graph whose vertices are all $\binom{21}{11} = 352,716$ such dice, with a directed edge $\mathbf{x} \to \mathbf{y}$ if and only if the beat score $\sum_{i=1}^{11} \sum_{j=1}^{11} \mathbf{1}_{\{x_i > y_j\}}$ equals $(11^2 + 1) / 2 = 61$. Does $G_{11}$ contain a directed simple cycle of length at least 12?

Posed in arXiv:2610.40321, Sec. 3, after case n=10 — Computer-Assisted Results for \(n\)-Sided Non-Transitive Dice Taking Face Values in \([n]\)

What is known

The paper computationally settles the cases n = 7, 8, 9, 10 by exhibiting directed cycles of lengths 14, 29, 10, and 110 respectively, but leaves n = 11 and n = 12 unresolved due to the computational search time over the 352,716-vertex and 1,352,078-vertex graphs.

In Lean: op744_dice11_has_directed_cycle_ge_twelve (statement), op744_dice6_has_cycle_six (partial), op744_dice3_no_cycle_three (partial), op744_dice7_has_cycle_fourteen (partial)

OP-913 Randomized MMS approximation barrier under upgrade recourseSettledFair Division

Let n >= 2 be an integer. Consider the online fair division of indivisible chores among n agents with nonnegative additive cost functions under upgrade recourse. Does there exist a randomized prediction-free online algorithm with upgrade recourse and an epsilon > 0 such that, against an oblivious adversary (any chore sequence fixed in advance), the output allocation A satisfies E[c_i(A_i)] <= (2 - 1/n - epsilon) * MMS_i(D) for every agent i?

Proposed here, building on arXiv:2611.00432, Thm 4.1 — Online Fair Division of Chores with Upgrade Recourse; the paper does not ask it

What is known

Theorem 4.1 shows that no deterministic prediction-free algorithm with upgrade recourse can achieve an MMS factor below 2 - 1/n against an adaptive adversary. The proof constructs an adaptive arrival sequence against the algorithm's past choices. Whether randomized algorithms against an oblivious adversary can beat the 2 - 1/n barrier (in expectation or with high probability) remains open.

In Lean: op913_randomized_mms_barrier_under_upgrade_recourse (statement), randomized_mms_barrier_breaker_mono (partial)

OP-940 Criteria for Nonnegative Linearization with Nonconstant Downward RatiosSettledCombinatorics for TCS

Let $N \ge 2$ and consider a normalized three-term recurrence on $0 \le i \le N$ with coefficients $a_i, b_i, c_i$ satisfying $a_0 = 1$, $b_0 = c_0 = 0$, $a_N = 0$, $a_i + b_i + c_i = 1$, $a_i > 0$ for $i < N$, $c_i > 0$ and $b_i \ge 0$ for $i > 0$. Let $d_i = b_i + c_i$ be the profile. What general conditions on the profile $d_i$ and the ratio sequence $r_i = c_i / d_i$ guarantee property (P) (that is, $g(m,n;k) \ge 0$ for all $0 \le m,n,k \le N$ in $R_m R_n = \sum_k g(m,n;k) R_k$ on the orthogonality support) when the ratio $c_i / d_i$ is nonconstant, such as when $c_i / d_i$ is decreasing with $i$, or concave, or when $b_i$ is non-monotone?

Posed in arXiv:2611.01561, Sec. 6, Other ratios — A log-concavity criterion for finite nonnegative linearization

In Lean: op_940_dim2_property_p_of_ratio_condition (partial), op_940_dim2_property_p_constant_ratio (partial), op_940_decreasing_ratios_not_all_property_p (negation)

OP-1086 Independent-Bipartite Component Partition in Triangle-Free Subcubic GraphsSettledGraph Theory & Graph Algorithms

Let $G = (V, E)$ be a finite simple graph with maximum degree at most 3 that is triangle-free (contains no 3-cycle). Does there exist a partition $V = L \cup R$ of the vertex set into two disjoint sets such that $L$ is an independent set in $G$, and for every connected component $C$ of the induced subgraph $G[R]$ and every vertex $v \in L$, the induced subgraph $G[V(C) \cup \{v\}]$ is bipartite?

Posed in arXiv:2611.05178, Question 5.3 — Weighted Max Cut in Subcubic Graphs

In Lean: triangle_free_subcubic_independent_bipartite_partition_negation (negation), bipartite_exists_independent_bipartite_component_partition (partial), subcubic_isAcyclic_exists_independent_bipartite_component_partition (partial), triangle_free_subcubic_card_le_four_partition (partial)

OP-1087 Partition of Odd-Girth 5 Subcubic Graphs with Component Order at Most ThreeSettledGraph Theory & Graph Algorithms

Let $G = (V, E)$ be a finite simple graph with maximum degree at most 3 and odd girth exactly 5 (that is, $G$ contains a 5-cycle, but no cycle of length 3). Does there exist a partition $V = L \cup R$ of the vertex set into disjoint subsets such that $L$ is an independent set of $G$ and every connected component of the induced subgraph $G[R]$ has at most 3 vertices?

Posed in arXiv:2611.05178, Question 5.4 — Weighted Max Cut in Subcubic Graphs

In Lean: subcubic_odd_girth_five_partition_component_le_three_negation (negation), subcubic_triangle_free_partition_component_le_six (partial), subcubic_partition_component_le_three_of_isBipartite (partial), subcubic_partition_component_le_three_of_card_le_three (partial)

OP-1106 oblivious forest carpooling random greedy double exponential tailSettledOnline Algorithms

Does randomized greedy achieve doubly exponential discrepancy tails on every obliviously specified forest arrival sequence? Precisely, do absolute constants c,C,a>0 exist such that, for every T>=2 and every fixed sequence of T distinct undirected edges whose union is a forest, the following algorithm satisfies Pr(max_{v,0<=t<=T}|d_t(v)|>=D) <= C*T*exp(-c*2^(a*D)) for every integer D>=1? Here d_0=0, each arriving edge is oriented toward its endpoint with smaller current indegree-minus-outdegree discrepancy, and an independent fair coin resolves ties. In particular this would give O(log log T) maximum prefix discrepancy with probability at least 1-T^(-10).

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Lei's recent theorem obtains the sharp O((log T)^(1/3)) scale for arbitrary fixed edge sequences with a different, potentially computationally expensive Gaussian-dominated algorithm. The forest restriction makes the components at each arrival disjoint, so random-greedy discrepancies on the two sides are independent, an ingredient unavailable when edges repeat or close cycles. A log-log result would identify an exponentially better graph-structural regime and give a simple practical rule; balanced binary merge gadgets suggest the order cannot be improved even for this specific algorithm. The general theorem and its cubic-tail witness analysis do not imply this stronger rate. Evidence: Experiment 15057 enumerates every possible rooted component discrepancy law up to 20 vertices using exact integer probability recurrences, including unbalanced merge trees. Experiment 15054 simulates fixed balanced forests up to 262144 vertices and computes root laws, with observed maxima 3-4, while 15055 checks random, unbalanced and comb schedules. The balanced merge event in 15055 also supplies positive-discrepancy witnesses of size 2^D with probability 2^(-(2^D-1)); repetitions point to a log-log lower scale. These finite calculations do not prove a uniform tail bound.

In Lean: carpool_forest_edge_sequence_nil (partial), op_1106_forest_carpooling_random_greedy_double_exponential_tail (statement), op_1106_forest_carpooling_single_edge_max_discrepancy (partial), op_1106_forest_carpooling_length_two_bound (partial)

OP-1111 two agent common bivalued equal marginal sharp mms curveSettledFair Division

Fix any real r with 1<=r<=2. Two agents have additive costs for finitely many chores, and agent i's cost for each chore is either a_i or r*a_i, for some a_i>0. Let mu_i be her two-agent chore maximin share. Is there always a partition of the chores into S and its complement such that both bundles cost at most (r+1)*mu_i/2 to each agent i? If so, uniformly swapping the bundles gives an itemwise equal-marginal lottery whose every realization is (r+1)/2-MMS. Is that factor sharp even allowing arbitrary equal-marginal lotteries? The proposed lower-bound family has three chores with cost pairs (r,1), (1,r), and (1,1), after normalizing a_1=a_2=1.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Equal item marginals are a direct route to truthfulness in expectation and ex-ante envy-freeness. Lin, Tao, Wu and Zhang's zero-nomination mechanism gives a 3/2-MMS upper bound for two agents with arbitrary additive costs, with a matching example at value ratio 2. This asks for the exact continuous ratio-sensitive guarantee for the common-bivalued subdomain, strictly improving that bound throughout 1<r<2. Requiring a single partition whose two bundles are safe for both agents is a concrete structural strengthening; the three-chore family tests the lower bound against all equal-marginal lotteries, not only swapped partitions. The unrestricted two-agent 4/3 truthful result uses nonuniform marginals and does not settle this equal-marginal question. Evidence: Experiment 15101 checks every four-type count profile of up to eight chores at 11 value ratios using linear-program feasibility, finding the proposed curve for 1<r<=2. Experiment 15103 checks that complementary swapped partitions attain the optimal equal-marginal factor in every profile of up to ten chores for five ratios. Experiment 15107 uses an independent integer constraint model on 15000 randomly sampled profiles with individual type counts up to 50, at five ratios in (1,2], and finds no violation. Experiment 15102 evaluates the three-chore lower-bound family over a grid of ratios.

In Lean: two_agent_common_bivalued_safe_partition (statement), bivalued_sharp_lower_bound_mms_le_two_agents (partial)

OP-1114 spr minimax sign deletion monotonicity and full erasureSettledComputational Learning Theory

In the finite-horizon sign-preservation-with-reuse game, is the minimax value monotone under adding existing signs? Precisely, for every number n of ordered cells, remaining horizon r, and pair of boards b,b' in {empty,+,-}^n where b' is obtained from b by turning any subset of its signs into empty cells while leaving the other signs unchanged, must spr_value(n,r,b') <= spr_value(n,r,b)? Equivalently as a concrete strategic consequence, can the minimizing labeler respond optimally to every pointer move by deleting every eligible minus sign to its left and every eligible plus sign to its right, instead of choosing among arbitrary eligible subsets? The pointer may stop at any round, and newly emptied cells can be selected again.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Recent work connects this game to online calibrated forecasting, and both the 2024 game and the 2026 sharper calibration bound allow arbitrary deletion subsets. Eliminating this strategic freedom without changing the game would compress each labeler response from exponentially many subsets to two sign choices and give a simpler minimax recurrence usable for structural bounds on calibration. Monotonicity is not immediate from the stopping payoff: erasing a sign also opens a cell that the maximizing pointer can reuse, so merely counting current signs does not compare future games. The cited papers define and exploit the game but do not establish the proposed arbitrary-board monotonicity or this global strategy reduction. Evidence: Experiments 15153 and 15154 exhaustively check the sign-deletion monotonicity for every board through nine cells and every horizon through twelve. Experiments 15150 and 15151 independently compare unrestricted versus forced-full-erasure minimax values for every board through nine cells and horizon twelve. Experiment 15155 checks the stronger local assertion for every pointer choice on every board through seven cells and horizon eight. Experiment 15152 compares the two games from the empty board through nine cells and horizons up to twenty.

In Lean: spr_minimax_sign_deletion_monotonicity (statement), spr_value_zero_mono (partial), spr_minimax_sign_deletion_monotonicity_two_two (partial)

OP-1148 Algebraic recoverability of BIBD seeds from modified block-clique graphsSettledGraph Theory & Graph Algorithms

Let D₁ and D₂ be two balanced incomplete block designs (BIBDs) with parameters (v, b, r, k, λ). Let K_v^*(D₁) and K_v^*(D₂) denote the graphs constructed by replacing each block B_i with a k-clique whose vertices are matched to the corresponding point vertices in X. Determine whether K_v^*(D₁) ≅ K_v^*(D₂) as simple graphs implies that D₁ and D₂ are isomorphic as designs, and characterize the structural subclasses of such graphs for which the underlying design is canonically recoverable.

Posed in arXiv:2611.05762, Conjecture 6.30.1, Sec. 6.30 — Classifying K-Geodetic Graphs Via Combinatorial Designs and Distance-regularity

In Lean: bibd_isomorphic_of_block_clique_graph_iso_of_three_le (partial), bibd_isomorphic_of_block_clique_graph_iso (statement)

OP-1172 Optimal Constant for Potential Functions in Descent-and-Repair DynamicsSettledEquilibria in Games

Consider the continuous-time descent-and-repair dynamical system where scaled satisfaction \varsigma and memory weight H evolve under descent drift \dot{H} = -\eta H, \dot{\varsigma} \ge \eta(\varsigma - G_0) (for fixed \eta > 0, G_0 \ge 1) and repair drift \dot{H} = f - H, \dot{\varsigma} \ge 1 + H - \varsigma (for activation budget f \in (0, 1)). Does there exist a continuously differentiable potential function \Phi : \mathbb{R}_{>0}^2 \to \mathbb{R} that certifies simultaneous positive drift \dot{\Phi} \ge c > 0 on all nonterminal states \varsigma \le \sigma for some constant \sigma > \sigma_\star \approx 1.5867?

Proposed here, building on arXiv:2611.06076, Theorem 5.8 — Breaking the One-Player Extension Barrier: History-Aware Repair for Multiplayer Approximate Nash Equilibria; the paper does not ask it

What is known

Theorem 5.8 proves that the scalar repair certificate K_f(H) uniquely achieves maximum value \sigma_\star \approx 1.5867 over activation budgets f \in (0, 2/3) and memories H \ge 0, matching the separable potential function \Phi_f(\varsigma, H) = (\varsigma - 1/f)/H + F_f(H). However, the continuous-time dynamics of descent and repair allow more general, non-separable potential functions \Phi(\varsigma, H), or adaptive multi-parameter history allocations across players. The paper leaves open whether a richer Lyapunov potential function can certify progress towards a target satisfaction strictly exceeding \sigma_\star.

In Lean: op_1172_optimal_constant_potential_function_exists (statement), repair_drift_separable_identity (partial), scalar_repair_certificate_tangency (partial), scalar_repair_certificate_activation_optimality (partial)

OP-1291 Characterization of Extremal Reset Thresholds for Direct Products of DFAsSettledAutomata & Formal Languages

Let $\mathcal{A}_1 = (Q_1, \Sigma, \delta_1)$ and $\mathcal{A}_2 = (Q_2, \Sigma, \delta_2)$ be synchronizable deterministic finite automata over a common alphabet $\Sigma$, and let $\mathcal{A}_1 \times \mathcal{A}_2$ denote their direct product. Proposition 3.4 establishes that $\max\{\mathrm{rt}(\mathcal{A}_1), \mathrm{rt}(\mathcal{A}_2)\} \le \mathrm{rt}(\mathcal{A}_1 \times \mathcal{A}_2) \le \mathrm{rt}(\mathcal{A}_1) + \mathrm{rt}(\mathcal{A}_2)$. What are necessary and sufficient structural conditions on $\mathcal{A}_1$ and $\mathcal{A}_2$ for the lower bound $\mathrm{rt}(\mathcal{A}_1 \times \mathcal{A}_2) = \max\{\mathrm{rt}(\mathcal{A}_1), \mathrm{rt}(\mathcal{A}_2)\}$ to be attained? Likewise, what are necessary and sufficient structural conditions for the upper bound $\mathrm{rt}(\mathcal{A}_1 \times \mathcal{A}_2) = \mathrm{rt}(\mathcal{A}_1) + \mathrm{rt}(\mathcal{A}_2)$ to be attained?

Posed in arXiv:2611.09136, Sec. 7, open question 1 — Shortest Synchronizing Words on Product Automata

What is known

Proposition 3.4 shows max{rt(A₁), rt(A₂)} ≤ rt(A₁ × A₂) ≤ rt(A₁) + rt(A₂), and Examples 3.6 and 3.7 show both bounds are attainable, but the paper leaves open a structural characterization of the automata attaining either bound.

In Lean: op_1291_extremal_reset_thresholds_characterization (statement), dfa_prod_attains_lower_bound_of_subsingleton (partial)

OP-1292 Optimality of Two-Stage Subset Synchronization for Direct ProductsSettledAutomata & Formal Languages

Let $\mathcal{A}_1 = (Q_1, \Sigma, \delta_1)$ and $\mathcal{A}_2 = (Q_2, \Sigma, \delta_2)$ be synchronizable DFAs over a shared alphabet $\Sigma$. For a subset $S \subseteq Q_2$, denote by $\mathrm{rt}(S, \mathcal{A}_2)$ the minimum length of a word $v \in \Sigma^*$ such that $|\delta_2(S, v)| = 1$. Does there always exist a shortest synchronizing word $w_1$ of $\mathcal{A}_1$ (i.e., $|w_1| = \mathrm{rt}(\mathcal{A}_1)$) such that $\mathrm{rt}(\mathcal{A}_1 \times \mathcal{A}_2) = |w_1| + \mathrm{rt}(\delta_2(Q_2, w_1), \mathcal{A}_2)$? That is, can every direct product be synchronized in minimum length by first synchronizing $\mathcal{A}_1$ via some optimal synchronizing word and then synchronizing the surviving state subset of $\mathcal{A}_2$?

Posed in arXiv:2611.09136, Sec. 7, open question 4 — Shortest Synchronizing Words on Product Automata

What is known

The standard upper bound concatenation w₁w₂ ignores the partial synchronization w₁ performs on the second component. The paper asks whether an optimal reset word for the product can always be factored into an optimal reset word for A₁ followed by a reset word for the remaining active subset of A₂.

In Lean: dfa_prod_is_synchronizing_of_subset_synchronizing (partial), dfa_prod_subset_sync_two_stage_bound (partial), op_1292_optimality_of_two_stage_subset_sync_false (negation)

OP-1293 Attainability of Intermediate Reset Thresholds for Direct ProductsSettledAutomata & Formal Languages

Let $k_1, k_2$ be positive integers, and let $k$ be an integer satisfying $\max\{k_1, k_2\} \le k \le k_1 + k_2$. Can every such intermediate value $k$ be attained as the reset threshold $\mathrm{rt}(\mathcal{A}_1 \times \mathcal{A}_2) = k$ of the direct product of two synchronizable DFAs $\mathcal{A}_1$ and $\mathcal{A}_2$ over a common alphabet $\Sigma$ having reset thresholds $\mathrm{rt}(\mathcal{A}_1) = k_1$ and $\mathrm{rt}(\mathcal{A}_2) = k_2$?

Posed in arXiv:2611.09136, Sec. 7, open question 2 — Shortest Synchronizing Words on Product Automata

What is known

Proposition 3.4 shows that rt(A₁ × A₂) lies in [max{rt(A₁), rt(A₂)}, rt(A₁) + rt(A₂)]. Proposition 4.12 constructs partially ordered DFAs achieving intermediate values, but leaves open whether every intermediate integer is attainable under fixed alphabet or broader class constraints.

In Lean: op_1293_intermediate_reset_threshold (statement), op_1293_product_reset_threshold_lower_bound_attained (partial), op_1293_product_reset_threshold_upper_bound_attained (partial), op_1293_intermediate_reset_threshold_k1_eq_one_k2_eq_one (partial)

OP-1323 Compensatory fairness of subgame-perfect equilibria in two-agent picking gamesSettledFair Division

Consider two agents dividing T = 2k + 1 indivisible goods under complete information, where agents have strict preferences over goods and compare bundles by pairwise dominance (or additive valuations). In the sequential picking game where agents choose items according to a compensatory picking sequence (such as the block-snake draft or round-robin), does the unique subgame-perfect equilibrium allocation necessarily satisfy envy-freeness up to one object (EF1) and no envy toward larger bundles up to any object (NEL) with respect to the agents' true preferences?

Posed in arXiv:2611.09685, Sec. 7 — Who Picks First? Compensatory Fairness When Equal Division Is Impossible

What is known

While draft rules under truthful play satisfy EF1 and NEL under the block-snake sequence, agents may play strategically. For two agents picking sequentially under complete information, the subgame-perfect equilibrium allocation is unique. It is known that pure Nash equilibria of the round-robin game are EF1 with respect to true values, but whether subgame-perfect or reporting-game equilibrium allocations under compensatory sequences (such as block-snake) guarantee both EF1 and NEL with respect to true preferences is unsettled.

In Lean: block_snake_two_agent_spe_nel_ef1 (statement), block_snake_two_agent_spe_nel_ef1_three_items (partial), round_robin_five_item_spe_not_nel (partial)

OP-1371 Achievability of upper bounds on minimum forcing numbers of products with pathsSettledGraph Theory & Graph Algorithms

Let G be a bipartite graph of order n that admits an involutory weighted adjacency matrix over a field F with characteristic not 2. For an integer k ≥ 2, it is known that n/2 ≤ f(G □ P_k) ≤ (n/2)⌈k/2⌉, where P_k is the path graph on k vertices, and that for odd k ≥ 3, this upper bound improves to f(G □ P_k) ≤ n(k-1)/4 + f(G). While the lower bound n/2 is achieved for k = 2 and k = 3, does there exist an integer k ≥ 4 (or odd k ≥ 3) and a bipartite graph G admitting an involutory weighted adjacency matrix over a field of characteristic not 2 such that f(G □ P_k) = (n/2)⌈k/2⌉ (for even k) or f(G □ P_k) = n(k-1)/4 + f(G) (for odd k)?

Posed in arXiv:2611.11813, Remark 2.10 — The minimum forcing number of graphs and involutory weighted adjacency matrices

What is known

Theorem 2.6 establishes n/2 ≤ f(G □ P_k) ≤ (n/2)⌈k/2⌉ for all bipartite graphs G of order n admitting an involutory weighted adjacency matrix over a field of characteristic not 2. Remark 2.7 notes that for odd k ≥ 3, the upper bound improves to f(G □ P_k) ≤ n(k-1)/4 + f(G). The paper proves the lower bound n/2 is attained for k=2 and k=3, but leaves open whether either upper bound is ever tight.

In Lean: op_1371_min_forcing_num_upper_bound_achievable (statement), op_1371_even_upper_bound_achievable (partial), op_1371_odd_improved_upper_bound_achievable (partial), op_1371_min_forcing_num_box_path_le_general_upper (partial)

OP-1400 Order of the Smallest Graph with Non-Unimodal Zero Forcing PolynomialSettledGraph Theory & Graph Algorithms

Let $G = (V, E)$ be a finite simple graph of order $n = |V|$, and let $\mathcal{Z}(G; x) = \sum_{i=1}^n z(G, i) x^i$ be its zero forcing polynomial, where $z(G, i)$ is the number of zero forcing sets of $G$ of cardinality $i$. The construction of $G_{24,24,23}$ shows that there exists a graph of order 81 with a non-unimodal zero forcing polynomial. What is the minimum order $n$ of a simple graph $G$ such that $\mathcal{Z}(G; x)$ is not unimodal? In particular, does there exist a counterexample of order at most 80?

Posed in arXiv:2611.11352, Sec. 3, Question 2 — Zero forcing is not unimodal

In Lean: op_1400_counterexample_order_le_eighty (statement), op_1400_counterexample_order_eighty_two (partial)

OP-1429 Enumeration of mirror-symmetric m-leafy treesSettledCombinatorics for TCS

Let m, n >= 1. Let LT_n^m denote the set of finite plane trees with n internal vertices and mn+1 leaves such that every rooted subtree T_v satisfies \ell(T_v) > m * n(T_v), where \ell(T_v) is the leaf count and n(T_v) is the internal vertex count. Let \tau be the left-right mirror reflection involution on plane trees. What is the number of reflection-symmetric trees T in LT_n^m satisfying \tau(T) = T, or equivalently the number of fixed points of the induced involution on m-Tamari intervals? In particular, does this count admit an algebraic closed-form formula in terms of m and n?

Proposed here, building on arXiv:2611.10154, Sec. 2.3, after Proposition 2.8 — Bijecting $m$-Tamari intervals, trees, and tight gradings; the paper does not ask it

What is known

The paper introduces a left-right reflection involution on m-leafy trees that induces a new involution on m-Tamari intervals exchanging length-zero intervals and intervals whose upper path is maximal. While the total number of m-leafy trees is given by a closed formula, the paper leaves open the number of trees invariant under mirror reflection (the fixed points of this involution).

In Lean: op_1429_mirror_symmetric_m_leafy_trees_involution (partial), op_1429_mirror_symmetric_m_leafy_trees_nonempty (statement), op_1429_mirror_symmetric_m_leafy_trees_n_one_unique (partial)

OP-1461 Existence of Uniquely K4-Saturated Graphs with Maximum Degree n - 6SettledGraph Theory & Graph Algorithms

Does there exist a finite simple graph $G$ on $n$ vertices with maximum degree $\Delta(G) = n - 6$ such that $G$ is uniquely $K_4$-saturated (that is, $G$ contains no complete subgraph on 4 vertices, but for every pair of distinct non-adjacent vertices $u, v \in V(G)$, adding the edge $\{u, v\}$ to $G$ produces exactly one complete subgraph on 4 vertices)?

Proposed here, building on arXiv:2611.13656, Sec. 3, after Theorem 3.3 — Uniquely $K_{4}$-saturated graphs with large maximum degree; the paper does not ask it

What is known

The paper completely classifies uniquely K_4-saturated graphs on n vertices with maximum degree Delta >= n - 5: there are none with Delta = n - 2 or Delta = n - 4, exactly one with Delta = n - 3 (the complement of C_7), and exactly one with Delta = n - 5 (the graph G_10). The next case Delta = n - 6 is left open. It is unknown whether the non-existence pattern for even codegree n - Delta continues (so that no uniquely K_4-saturated graphs exist with Delta = n - 6) or whether new examples appear.

In Lean: uniquely_k4_saturated_max_degree_six_order_twelve (partial), op_1461_uniquely_k4_saturated_max_degree_n_minus_six (statement), uniquely_k4_saturated_max_degree_ge_three (partial), uniquely_k4_saturated_no_max_degree_n_minus_six_of_le_eight (partial)

OP-1592 Maximum Cardinality of Non-Attacking Queens on Modular Boards with Small Prime FactorsSettledCombinatorics for TCS

Let d >= 2 and n >= 2 be integers. In the d-dimensional modular board (Z/nZ)^d, two queens at positions x, y in (Z/nZ)^d attack each other if their difference x - y is of the form c * v for some c in (Z/nZ) \ {0} and some nonzero vector v in {-1, 0, 1}^d. If n has at least one prime factor less than 2^d, what is the maximum number of mutually non-attacking queens that can be placed on (Z/nZ)^d? In particular, for d = 3 and n having prime factors at most 7, can n^2 - 1 queens always be placed, or does the maximum depend on the prime factorization of n?

Posed in arXiv:2611.14754, Sec. 4 — Modular $n$-queens in higher dimensions

What is known

When all prime factors of n exceed 2^d, exactly n^{d-1} non-attacking queens can be placed. When n has a prime factor less than 2^d, at most n^{d-1}-1 can be placed, and the exact maximum remains open for all d >= 3.

In Lean: op_1592_not_always_n_sq_minus_one_queens (negation), op_1592_zmod2_queens_card_le_one (partial), op_1592_modular_queens_upper_bound_of_small_prime (partial)

OP-1600 Boundedness of Sprague-Grundy values for slow exact k-Nim with k+2 pilesSettledCombinatorial Games

Let k ≥ 3 and n = k + 2. In the normal-play game of slow exact k-Nim on n piles, where each move consists of choosing exactly k positive piles and removing 1 stone from each, is the range of the Sprague-Grundy function finite? That is, does there exist an integer C = C(k) such that for every position x ∈ ℕ^{k+2}, the Sprague-Grundy value G_k(x) satisfies G_k(x) ≤ C?

Proposed here, building on arXiv:2611.14546, Corollary 1 — The Sprague--Grundy Function of Slow Exact $k$-Nim with $k+1$ Piles; the paper does not ask it

What is known

The paper proves that for slow exact k-Nim with n = k + 1 piles, the Sprague-Grundy function takes values exclusively in {0, 1, 2, 3} for all k ≥ 2. For n = k + 2, the case k = 2 (4 piles) is known to have bounded SG values, but the behavior for k ≥ 3 (e.g. k = 3, n = 5 piles) remains open: does the range of the Sprague-Grundy function remain uniformly bounded by a constant, or does it take arbitrarily large values?

In Lean: op_1600_slow_exact_nim_bounded_grundy (statement), op_1600_slow_exact_nim_k3_ones (partial)

OP-1627 Realization of Maximum Local Packings on Complete Graphs for Star Set-ColoringsSettledCombinatorics for TCS

For integers $r \ge s \ge t \ge 1$ and $h \ge 0$, let $\nu(r,s,t;h)$ denote the maximum size (counted with multiplicity) of a multiset of $s$-subsets of $\{1,\dots,r\}$ such that every $t$-subset of $\{1,\dots,r\}$ belongs to at most $h$ members. For an integer $n \ge 2$, when $D = \nu(r,s,t;n-1)$ is even, can an $(r,s)$-set-coloring of the complete graph $K_{D+1}$ have the property that at every vertex $v$, the multiset of $D$ edge labels incident to $v$ is a maximum feasible multiset, in the case where no maximum multiset has the property that every label occurs with even multiplicity?

Posed in arXiv:2611.15376, Sec. 7, after Question 7.2 — Set-coloring Ramsey numbers with multiple intersections

In Lean: op_1627_maximum_local_packing_realizable (statement), op_1627_not_realizable_parameters_four_three_two_two (partial), op_1627_realizable_parameters_seven_five_three_two (partial)

OP-1628 Strictness of Consecutive Inequalities in the Ramsey Intersection SpectrumSettledCombinatorics for TCS

For a finite simple graph $G$ and integers $r \ge s \ge t \ge 1$, let $R(G; r, s, t)$ denote the generalized set-coloring Ramsey number, defined as the least integer $N$ such that every assignment of an $s$-element subset of $\{1, \dots, r\}$ to each edge of $K_N$ contains a copy of $G$ whose edges share at least $t$ common colors. The intersection spectrum is the sequence $R(G; r, s, 1) \le R(G; r, s, 2) \le \cdots \le R(G; r, s, s) = R(G; \binom{r}{s})$. Does there exist any connected graph $G$ with at least two edges, and integers $r \ge s > t \ge 1$, such that $R(G; r, s, t) = R(G; r, s, t+1)$? Furthermore, can the consecutive jump $R(G; r, s, t+1) - R(G; r, s, t)$ be arbitrarily large for fixed $G$?

Posed in arXiv:2611.15376, Question 7.1 — Set-coloring Ramsey numbers with multiple intersections

In Lean: set_coloring_ramsey_property_of_succ (partial), set_coloring_ramsey_number_mono_t (partial), op_1628_ramsey_spectrum_consecutive_equality_exists (statement), op_1628_p3_consecutive_equality (partial)

Stated in Lean, Not Yet Proved

370

Stated in Lean, with partial results where there are any; the main question is not yet proved or refuted.

OP-1 Existence of a 22-multiplication algorithm for 3x3 matrix multiplication over ℤIn LeanAlgebraic & Lattice-Based Complexity

Does there exist an algorithm for 3x3 matrix multiplication with integer constants that can be applied recursively (or equivalently, a bilinear decomposition of the 3x3 matrix multiplication tensor over ℤ) using 22 multiplications, or is 23 multiplications the minimum?

Posed in arXiv:2610.01639, Sec. 8 — Lower Bound of 22 for 3x3 Matrix Multiplication over the Integers

What is known

The authors prove a lower bound of 22 multiplications for any recursive 3x3 algorithm with integer constants, improving the previous bound of 21. Laderman's 1976 algorithm provides an upper bound of 23. Whether 22 is achievable over the integers remains unresolved.

In Lean: matrix3_tensor_rank_z_le_23 (partial), matrix3_tensor_rank_z_dichotomy (partial), matrix3_tensor_rank_z_22_exact (partial), matrix3_tensor_rank_le_23_of_comm_ring (partial), matrix3_tensor_rank_ge_of_surjective (partial), matrix3_tensor_rank_int_ge_of_zmod2 (partial), matrix3_tensor_rank_int_le_22 (statement), matrix3_trace_split_reconstruction (partial), matrix3_trace_rank_sum_ge_27 (partial), matrix3_trace_saturation (partial), matrix3_saturated_invertible_length_eq_25 (partial), matrix3_trace_gram_column_factorization (partial)

OP-2 Tensor rank of 3x3 matrix multiplication over F2In LeanAlgebraic & Lattice-Based Complexity

Is the tensor rank of 3x3 matrix multiplication over the finite field F2 equal to 22 or 23? That is, does there exist a set of 22 triad products whose F2-linear combinations compute the product of two arbitrary 3x3 matrices over F2, or is the rank at least 23?

Proposed here, building on arXiv:2610.01639, Sec. 7, Table 1 (row 0) — Lower Bound of 22 for 3x3 Matrix Multiplication over the Integers; the paper does not ask it

What is known

The paper proves in Lean that the tensor rank of 3x3 matrix multiplication over F2 is at least 22 (class 495 in Wang's table), improving on the lower bound of 21 from Wang (2026) and Yang et al. (2026). Laderman's 1976 decomposition yields an upper bound of 23 over F2. Thus the exact rank over F2 is either 22 or 23, leaving a gap of exactly one.

In Lean: matrix3_tensor_rank_f2_le_23 (partial), matrix3_tensor_rank_f2_dichotomy (partial), matrix3_tensor_rank_not_le_22_iff_ge_23 (partial), matrix3_tensor_rank_le_of_surjective (partial), matrix3_tensor_rank_zmod2_le_of_int (partial), matrix3_tensor_rank_zmod2_le_22 (statement)

OP-3 T-count of parallel CCZ gates in general Clifford+T with HadamardsIn LeanQuantum Computation

Let m ≥ 2 be an integer, and let U_m = ⨂_{j=1}^m CCZ_{3j-2, 3j-1, 3j} be the unitary operator on 3m qubits that acts as the three-qubit Controlled-Controlled-Z gate CCZ = diag(1, 1, 1, 1, 1, 1, 1, -1) on each disjoint triplet of qubits (3j-2, 3j-1, 3j). In a general Clifford+T quantum circuit with an arbitrary number a ≥ 0 of clean ancilla qubits (initialized and returned to |0⟩), where gates may be arbitrary single-qubit Hadamards H, phase gates S = diag(1, i), CNOT gates, and T = diag(1, e^{iπ/4}) gates: can U_m be implemented using strictly fewer than 6m + 1 gates of type T?

Proposed here, building on arXiv:2610.01024, Abstract (line 11 / 45) — Exact $T$-counts of Toffoli layers from an isotropy bound; the paper does not ask it

What is known

The paper proves that every Hadamard-free Clifford+T circuit with clean ancillas implementing m disjoint CCZ gates requires at least 6m+1 T gates, which matches the Campbell-Howard construction. However, general Clifford+T circuits may place Hadamard gates freely between T gates. For m = 1, it is known that CCZ requires 7 T gates even with Hadamards, but for m ≥ 2 it is unknown whether intermediate Hadamard gates can reduce the T-count below 6m+1.

In Lean: ccz_layer_parity_repr_card_ge (partial), ccz_layer_parity_repr_two (partial), ccz_layer_t_count_below_6m_plus_1_with_hadamards (statement)

OP-5 Exact T-count of the GF(8) multiplication oracleIn LeanQuantum Computation

Let U_3 be the reversible multiplication oracle for the finite field GF(8) = GF(2^3) acting on 9 qubits by |a, b, c⟩ ↦ |a, b, c ⊕ (a · b)⟩ for a, b, c ∈ GF(8). Under Clifford equivalence to a diagonal level-three gate, its T-count δ(U_3) in Hadamard-free {CNOT, T} circuits with clean ancillas is known to satisfy 20 ≤ δ(U_3) ≤ 23, where 20 is the slice-rank lower bound (Proposition 59) and 23 is achieved by known compiled circuits. What is the exact T-count δ(U_3) of the GF(8) oracle? Specifically, is it 20, 23, or an intermediate value (21 or 22)?

Posed in arXiv:2610.01024, Open Problem 10 — Exact $T$-counts of Toffoli layers from an isotropy bound

In Lean: slice_rank_floor_three (partial), gf8_oracle_t_count_le_29 (partial), gf8_oracle_t_count_ge_20 (partial), gf8_oracle_min_t_count_ge_20 (partial), gf8_oracle_min_t_count_le_29 (partial), open_problem_gf8_oracle_t_count_negation (negation)

OP-6 FPT-sized resolution refutations parameterized by incidence treewidthIn LeanProof Complexity

Does every unsatisfiable CNF formula have an FPT-sized resolution refutation parameterized by its incidence treewidth? Precisely: do there exist a computable function $g: \mathbb{N} \to \mathbb{N}$ and a constant $c \ge 1$ such that for every unsatisfiable CNF formula $F$ with $n$ variables and $m$ clauses, there exists a resolution refutation of $F$ of length at most $g(\mathrm{tw}^*(F)) (n+m)^c$? Here, a CNF formula $F$ is a finite set of clauses over a finite set of Boolean variables $V$, where each clause is a finite disjunction of literals (variables or their negations); the incidence graph $G^*(F)$ is the bipartite graph with vertex set $V \cup F$ and edges $\{x, C\}$ for every variable $x \in \mathrm{var}(C)$; $\mathrm{tw}^*(F)$ is the treewidth of $G^*(F)$; and a resolution refutation is a sequence of clauses ending in $\bot$ derived by weakening and resolution.

Posed in arXiv:2610.02047, Sec. 8 — Short Resolution Refutations for CNFs with Bounded Weighted Incidence Treewidth

What is known

Central open question in parameterized proof complexity, explicitly highlighted in the paper's abstract, introduction, and conclusion.

In Lean: resolution_refutation_exists_of_unsat (partial), resolution_fpt_incidence_treewidth (statement)

OP-7 EFX existence for four or more agents with additive goodsIn LeanFair Division

There are $n$ agents $N=\{1,\dots,n\}$ and a finite set $M$ of $m$ indivisible goods. Agent $i$ has an additive valuation $v_i(S)=\sum_{g\in S} v_i(g)$ with $v_i(g)\ge 0$. An allocation is an ordered partition $A=(A_1,\dots,A_n)$ of $M$ (every good is allocated; bundles may be empty). The allocation is EFX (envy-free up to any good) if for all agents $i\ne j$ and every good $g\in A_j$ we have $v_i(A_i)\ge v_i(A_j\setminus\{g\})$. Question: for every $n\ge 4$, every $m$ and every additive valuation profile, does an EFX allocation exist? (Some papers quantify only over $g$ with $v_i(g)>0$; for strictly positive values the two versions coincide, and both are open. The smallest open case is $n=4$.)

Posed in arXiv:2208.08782, Sec. 4.1, Open Problem 2 (EFX itself first proposed in 'The Unreasonable Fairness of Maximum Nash Welfare', ACM TEAC 2019, DOI:10.1145/3355902, which left existence open) — Fair Division of Indivisible Goods: Recent Progress and Open Questions

What is known

Widely called the central open problem of discrete fair division. Known: $n=2$ (cut-and-choose, arXiv:1707.04769); $n=3$ with additive valuations ('EFX Exists for Three Agents', arXiv:2002.05119), extended to three agents when at least one valuation is additive/MMS-feasible (arXiv:2205.07638); EFX with at most one unallocated good for $n=4$ (arXiv:2102.10654); EFX with at most $n-2$ unallocated goods in general (arXiv:2102.10654, arXiv:2107.09901); complete EFX when $m\le n+3$ and, for $n=4$, when $m\le 9$ (arXiv:2608.08590, computer-assisted); EFX for up to three valuation types ('EFX Exists for Three Types of Agents', EC 2025); EF2X for four agents (arXiv:2412.00254); EFX on multigraph instances (arXiv:2606.18665). On the negative side, EFX fails for three agents with monotone submodular valuations (arXiv:2604.18216, arXiv:2605.06451) and for $n\ge 4$ additive chores (arXiv:2606.08872), but no additive-goods counterexample is known.

In Lean: efx_four_agents_additive_exists (partial), efx_exists_of_two_universal_small_goods_ir (partial)

OP-19 Condorcet dimension of elections: do 3 candidates always suffice?In LeanSocial Choice Theory

Let $N$ be a finite nonempty set of $n$ voters and $C$ a finite set of candidates; each voter $v$ has a strict linear order $\succ_v$ on $C$. A set $S \subseteq C$ is a Condorcet winning set if for every candidate $a \in C \setminus S$, strictly fewer than $n/2$ voters rank $a$ above every member of $S$ (equivalently, a strict majority of voters prefers some member of $S$ to $a$). The Condorcet dimension of the election is the minimum size of a Condorcet winning set. Question: is the Condorcet dimension of every election at most 3? (Weaker open form: at most 4.) It is known that every election has dimension at most 5, and that there exist elections of dimension exactly 3.

Posed in Social Choice and Welfare 44(3):493-517 (2015) — Condorcet winning sets

What is known

The concept was introduced in the paper 'Condorcet winning sets', which exhibited elections needing 3 candidates and conjectured unbounded dimension. 'Six Candidates Suffice to Win a Voter Majority' (arXiv:2411.03390) gave the first constant bound (6) via the minimax theorem and maximal lotteries; 'A few good choices' (arXiv:2506.22133) improved it to 5 (exposition: arXiv:2606.14666). 'Is Four Enough? Automated Reasoning Approaches and Dual Bounds for Condorcet Dimensions of Elections' (arXiv:2604.19851) reports extensive SAT/computational search finding no election of dimension > 3 and states the gap 3 <= k <= 5 as open. Special cases: dimension <= 3 for l1 and l_inf metric elections (arXiv:2410.09201). The planar Euclidean bound in arXiv:2608.27653 is 4; its bound of 3 concerns planar l1/l_inf peer selection, including strong peer selection. Closing the gap is a central question in committee selection and connects to approximately dominating sets (arXiv:2504.20372, arXiv:2608.06872).

In Lean: condorcet_dimension_le_three_of_le_four (partial), condorcet_dimension_le_three (statement), condorcet_mutual_bad_outsiders_partition (partial), condorcet_obstruction_selector_two_coloring (partial), condorcet_ordering_certificate_excludes_common_obstruction (partial), condorcet_winning_family_of_ordering_certificates (partial)

OP-22 Committee monotonicity versus EJR in approval-based committee votingIn LeanSocial Choice Theory

Let $N=\{1,\dots,n\}$ be voters and $C$ a finite set of $m$ candidates; voter $i$ approves a set $A_i\subseteq C$. For a committee size $k$, a group $G\subseteq N$ is $\ell$-cohesive if $|G|\ge \ell n/k$ and $|\bigcap_{i\in G}A_i|\ge \ell$. A committee $W\subseteq C$ with $|W|=k$ satisfies Extended Justified Representation (EJR) if for every $\ell\ge 1$ and every $\ell$-cohesive group $G$ there is $i\in G$ with $|A_i\cap W|\ge \ell$. Question: does every approval profile admit an ordering $c_1,c_2,\dots,c_m$ of all candidates such that for every $k\in\{1,\dots,m\}$ the prefix $\{c_1,\dots,c_k\}$ satisfies EJR for committee size $k$? (Equivalently: does there exist a resolute committee-monotonic approval-based committee rule satisfying EJR?)

Posed in arXiv:2007.01795, Open problems chapter, Q2 (Committee monotonicity and proportionality) — Multi-Winner Voting with Approval Preferences

What is known

Committee monotonicity (W(k) ⊆ W(k+1)) is essential for ranking candidates/excellence lists. Sequential Phragmén is committee monotonic and satisfies the weaker PJR, while all known EJR rules (PAV, Method of Equal Shares) violate committee monotonicity. The survey states no impossibility is known and only partial answers exist: a positive answer is known for approval-based party-list elections ('Approval-Based Apportionment', arXiv:1911.08365). Because a resolute rule may be defined profile-by-profile, the question is exactly the per-profile chain-existence statement above, so a counterexample is a finite object that could be found by SAT search; a positive answer would require a new construction.

In Lean: ejr_committee_exists (partial), ejr_committee_monotone_chain_exists (statement), ejr_adjacent_committees_exists (partial)

OP-43 The Shield-Core conjecture for stable marriageIn LeanMatching & Market Design

Consider the stable marriage problem with n men and n women and strict, complete preference lists. For a preference profile S let beta(S) be the largest number of blocking pairs of a complete matching of S, and let the shield number sigma(n) be the minimum of beta(S) over all such profiles. The cyclic Hollow-Shell profile C_n has man g rank woman h at position ((h - g) mod n) + 1 and woman h rank man g at position n - ((h - g) mod n). Is sigma(n) = beta(C_n) = floor((n - 1)^2 / 4) for every n? Equivalently: (a) every complete matching of C_n has at most floor((n - 1)^2 / 4) blocking pairs, and (b) every profile has a complete matching with at least floor((n - 1)^2 / 4) blocking pairs.

Posed in arXiv:2609.17418, Sec. 1.1 (Shield-Core conjecture); Sec. 7.1 and Sec. 8 (the upper bound on beta(C_n) is left open) — A Quadratic Lower Bound for the Shield Number of the Stable Marriage Problem: Rearrangement, Extremal Construction, and Biclique Realizability

What is known

The paper proves sigma(n) >= ceil(n(n - 2)/6) by a rearrangement argument and constructs a matching of C_n with exactly floor((n - 1)^2/4) blocking pairs (Theorem 5.3). It explicitly does not claim the upper bound beta(C_n) <= floor((n - 1)^2/4) or the exact equality; a related Hall-type biclique property is verified exhaustively for n <= 4.

In Lean: hollow_shell_blocking_pairs_ncard_le (partial)

OP-44 Weakly consecutive sequences begin or end with 1In LeanElementary Number Theory

A permutation sigma of {1, ..., k} is weakly consecutive if for all positions i, j and all integers m, whenever m divides sigma(i) and m divides i - j, then m divides sigma(j). Does every weakly consecutive sequence satisfy sigma(1) = 1 or sigma(k) = 1?

Posed in arXiv:2401.09497, Conjecture 5.2 (Sec. 5) — Weakly Consecutive Sequences

What is known

The paper generates weakly consecutive sequences from four starting sequences by three rules and conjectures that these produce every such sequence (Conjecture 5.1), which would imply this statement; the authors report that they could not prove it directly from the definition.

In Lean: weakly_consecutive_one_at_end (statement), weakly_consecutive_one_at_end_of_isPrimePow (partial)

OP-50 Are the RAT-degree bounds 3 and 5 for deferred acceptance tight?In LeanMatching & Market Design

In a mechanism with agent set N, a manipulation by agent a_i is safe given known agents K and their preferences if it is weakly better than truth for every preference profile of the unknown agents, and profitable if it is strictly better for some. The RAT-degree is the least k such that some agent, for some k-set of known agents and some preferences of theirs, has a safe and profitable manipulation (n if none). For men-proposing deferred acceptance, with women as potential manipulators, the source shows RAT-degree at most 3 when truncation is allowed and at most 5 when only complete rankings may be reported. Are these bounds tight, i.e. is the RAT-degree exactly 3 with truncation and exactly 5 without truncation?

Posed in arXiv:2502.18805, Sec. 8.1 (before Lemma 8.5 and Theorem 8.6) — It’s Not All Black and White: Degree of Truthfulness for Risk-Avoiding Agents

What is known

Lemmas 8.2 and 8.3 give safe profitable manipulations with 3 known agents (truncation) and 5 known agents (reordering only); Lemma 8.5 shows no agent has a safe manipulation with no knowledge, so the RAT-degree is at least 1.

In Lean: da_three_by_three_three_known_safely_manipulable (partial)

OP-51 Exact subsidy for envy-free orientations of multigraphsIn LeanFair Division

Agents are the vertices of a multigraph and items are its edges; each edge can only go to one of its two endpoints (an orientation). Valuations are monotone, an agent values only edges incident to her, and the largest marginal value of any edge is at most 1. What is the worst-case minimum total subsidy needed to make some orientation envy-free, as a function of the number n of agents? The known bounds are n - 2 (lower) and n - 1 (upper).

Posed in arXiv:2502.13671, Sec. 1.1 (Table 1) and Sec. 7, first open problem — On the Subsidy of Envy-Free Orientations in Graphs

What is known

A total subsidy of n - 1 always suffices (Theorem 9), and a simple-graph instance needs n - 2 (Example 20), which is tight for simple graphs (Theorem 21). For additive valuations on multigraphs the answer is n/2.

In Lean: multigraph_orientation_subsidy_three_halves (partial), multigraph_orientation_subsidy_four_agents (partial)

OP-53 Existence of PROPm orientationsIn LeanFair Division

In the orientation model, items (goods) are edges of a multigraph whose vertices are the agents, each item is relevant only to its two endpoints and must be given to one of them. An agent's proportional share is the sum over relevant items e of v_i(e)/n_e, where n_e = 2 is the number of agents to whom e is relevant. PROPm relaxes proportionality by the minimax-item slack (between PROP1 and PROPX). Does every instance with nonnegative additive valuations admit a PROPm orientation?

Posed in arXiv:2602.18098, Sec. 6 (Conclusion) — Fair Orientations: Proportionality and Equitability

What is known

PROP1 orientations always exist for goods on multigraphs, while PROPX orientations need not exist and deciding their existence is NP-complete (results of the source).

In Lean: propm_orientation_exists_of_le_five (partial), propm_orientation_of_out_degree_two (partial)

OP-54 Sybil-proof, ex-post safe procurement without winner-take-all equilibriaIn LeanMechanism Design & Auctions

A buyer procures one unit of divisible work from agents with private linear costs c_i; a mechanism maps bids (an agent may submit several bids under different identities) to allocations x_i and payments p_i, with utility p_i - c_i x_i. It is Sybil-proof if every multi-bid strategy is weakly dominated by a single-bid strategy, and ex-post safe if each agent has a bidding strategy guaranteeing nonnegative utility against all others' bids and positive utility against some. Is there a procurement mechanism that is Sybil-proof and ex-post safe and whose pure Nash equilibria (under complete information) are not winner-take-all, i.e. give work to at least two agents?

Posed in arXiv:2603.27779, Sec. 6 (Conclusion) — Beyond Winner-Take-All Procurement Auctions

What is known

In the source, the DSIC proportional mechanism is not Sybil-proof, Tullock contests are Sybil-proof but not ex-post safe, and the paid-as-bid mechanism is ex-post safe but not Sybil-proof.

In Lean: exists_sybil_proof_ex_post_safe_non_winner_take_all_procurement (partial), stake_share_pne_exists_and_non_winner_take_all (partial), proportional_share_no_pne_of_safe_all_costs (partial)

OP-64 Linear-in-s approximation for pure equilibria of anonymous gamesIn LeanEquilibria in Games

In an anonymous game with n players and s strategies, each player's payoff depends on her own strategy and on how many others play each strategy; payoffs are in [0, 1] and lambda-Lipschitz in that count vector. The source shows that a pure f(s) lambda-approximate Nash equilibrium always exists, with f quadratic in s, and that epsilon < lambda is impossible in general. Can the bound be improved to linear in s, and is s lambda a lower bound (some game has no pure epsilon-equilibrium for epsilon < s lambda)?

Posed in arXiv:0710.5582, Sec. 4 (Open Problems); also Sec. 1 ("We conjecture that the dependence on s can be improved to s lambda") — Computing Equilibria in Anonymous Games

What is known

Every lambda-Lipschitz anonymous game has a pure f(s) lambda-approximate equilibrium with f(s) quadratic in s (proof via Brouwer on an interpolated best-response map); matching pennies shows epsilon cannot go below lambda.

In Lean: ag_two_exact (partial), ag_three_lower (partial), ag_four_lower (partial)

OP-65 Are strategyproof surjective facility-location mechanisms under scaling effects dictatorships?In LeanMechanism Design & Auctions

One facility is placed at y in [0, 1]; agent i at x_i has cost d(x_i, y) q(y), where q is a continuous positive scaling function, so preferences need not be single-peaked. Are the deterministic mechanisms that are strategyproof and surjective (onto [0, 1]) under these preferences exactly the dictatorships?

Posed in arXiv:2402.18908, Sec. 8 (Discussion) — Facility Location Games with Scaling Effects

What is known

For single-peaked preferences, strategyproof anonymous rules are the phantom-median mechanisms; for unrestricted preferences, strategyproof surjective rules are dictatorial. The source shows preferences stay single-peaked iff q(y) - |q'(y)| >= 0 wherever q is differentiable (Theorem 4).

In Lean: fse_dictatorship_conjecture_false (partial), fse_scaling_oblivious_dictatorship (partial)

OP-66 Best approximation ratio for temporal EFX under identical daysIn LeanFair Division

Goods arrive over rounds t = 1..T and are allocated irrevocably. An allocation sequence is alpha-TEFX if after every round the cumulative allocation is alpha-EFX: v_i(A_i) >= alpha v_i(A_j minus g) for all agents i, j and goods g in A_j. Under identical days the same multiset of goods (same values for every agent) arrives each round. What is the largest alpha such that an alpha-TEFX allocation always exists under identical days (for two agents, and in general)?

Posed in arXiv:2607.17224, Sec. 7 (Discussion and Future Works); Theorems 2 and 3 — Temporal Fair Division of Indivisible Goods with Structured Constraints

What is known

Exact TEFX can fail under identical days when T > 2, even for two agents with identical valuations (Theorem 2); a 1/2-TEFX allocation exists and is computable in polynomial time for two agents (Theorem 3).

In Lean: tfx_identical_days_upper_bound (partial)

OP-72 Banzhaf veto distortion at simple majority with strict quotaIn LeanGeneral Equilibrium & Cooperative Games

Inverse power problem: given a target distribution m over players and quota q, choose voting weights whose p-propensity Banzhaf power is closest to m. The veto distortion of an instance is max{(1 - q) / (smallest m_i of a player who is a veto player under some optimal weights), 1}, and the veto distortion at quota q is its supremum over m. For q > 1/2 it is unbounded and for q = 1/2 with non-strict quota it equals 1. What is the veto distortion at q = 1/2 with strict quota (weights > 1/2 win); in particular, is it bounded?

Posed in How Banzhaf Makes a Victor: Curing a Distortion Paradox in Weighted Voting (EC 2026), Sec. 5 (Veto Distortion), after Theorem 5.2 — How Banzhaf Makes a Victor: Curing a Distortion Paradox in Weighted Voting

What is known

Theorem 5.1: for every q in (1/2, 1) and every propensity p the veto distortion is unbounded; Theorem 5.2: with non-strict quota at q = 1/2 there is no distortion. For strict quota 1/2 the target (5/12, 5/12, 2/12) gives distortion at least 6/5.

In Lean: banzhaf_strict_majority_veto_distortion_ge_five_thirds (partial)

OP-73 The Catch-Up conjectureIn LeanCombinatorial Games

Catch-Up is played on a finite set S of positive integers: player 1 first removes one number; afterwards players alternate, and on a turn the mover keeps removing numbers (adding them to her score) until her score is at least the opponent's, staying strictly behind before her last pick; if she cannot catch up, she takes all remaining numbers and the game ends. Higher final score wins, equal scores draw. Is Catch-Up on {1, ..., N} a draw under optimal play exactly when N(N + 1)/2 is even (N = 0 or 3 mod 4)?

Posed in Game & Puzzle Design 1(2):38–49 (2015), Sec. 3.1 (Optimal Play); Sec. 2.6 and Appendix 5.1 for the odd case — Catch-Up: A Game in Which the Lead Alternates

What is known

When N(N + 1)/2 is odd no draw is possible, since the totals differ by an odd amount (proved in the source). For even N(N + 1)/2 the source computed optimal play up to N = 20 (all draws) and explored N = 23, 24, 27, 28 by Monte-Carlo tree search without contradiction.

In Lean: catch_up_value_icc_eq_draw_of_even_triangular (statement), catch_up_value_icc_ne_draw_of_odd_triangular (partial), catch_up_value_icc_eleven (partial), catch_up_value_icc_eight (partial)

OP-75 NP-completeness of ReLU verification at width 3 on [0,1]In LeanNP-Completeness & Reductions

Is the verification problem for feedforward ReLU neural networks of width 3 on the unit interval [0,1] NP-complete? Specifically, given a network N : [0,1] → ℝ with rational weights and biases having at most 3 neurons per hidden layer, is deciding whether there exists x ∈ [0,1] such that N(x) = 0 NP-hard, or is it solvable in polynomial time?

Posed in arXiv:2610.06092, Remark 5.15 — Fractal Gadgets for Neural Networks: The Complexity of the Narrow Regime

What is known

The paper achieves NP-completeness on DD_{1,3}^{(n)} at width 3, but lifting the reduction to [0,1] requires width 4 to carry the fractal error register alongside the computation. The authors note that whether this lifting can be done at width 3 remains open.

In Lean: relu_network_width4_lifting (partial), relu_network_eval_continuous (partial), relu_network_zero_of_ivt (partial), op_75_relu_width3_lifting (partial), op_75_relu_width3_unit_interval_np_complete (statement), relu_continuous_flag_two_step_erasure (partial), op75_compact_subset_equivalence (partial), op75_compact_digit_relu (partial), op75_compact_map_relu (partial), op75_compact_block_effect (partial), op75_compact_network_subset_sum (partial), op75_subset_language_karp_reduction (partial), op75_subset_language_np_hard (partial), op75_subset_reduction_hard (partial), op75_relu_width3_unit_interval_zero_mem_np (partial), op75_karp_bool_trans (partial)

OP-80 Exploration time lower bound for temporal graphs with path snapshotsIn LeanGraph Theory & Graph Algorithms

Let $\mathcal{G} = (G_t)_{t \ge 1}$ be a temporal graph on a set $V$ of $n$ vertices such that every snapshot $G_t$ is a path graph spanning $V$ (i.e., a connected graph where two vertices have degree 1 and $n-2$ vertices have degree 2). An agent starts at an arbitrary vertex $v_1 \in V$ and at each time step $t \ge 1$ either stays at its current vertex or traverses an edge of $G_t$. Can the worst-case exploration time of such temporal graphs exceed $\Theta(n \log n)$? Specifically, does there exist a family of temporal graphs on $n$ vertices whose snapshots are all spanning paths requiring $\omega(n \log n)$ steps (e.g., $\Omega(n \log^2 n)$ or $n^{1 + \varepsilon}$ for some $\varepsilon > 0$) to explore from some start vertex, or does every such temporal graph admit an exploration in $O(n \log n)$ steps?

Posed in arXiv:2610.06228, Sec. 7, under "The role of the hub" — Hiding a Vertex from the Temporal Explorer: A Lower Bound for Degree-Bounded Temporal Graphs

In Lean: temporal_connected_explore_sq (partial), temporal_path_snapshots_explore_n_log_n (statement), temporal_path_four_requires_six (partial), temporal_path_twelve_one_frame_target_trap (partial), temporal_path_five_requires_nine (partial), temporal_path_many_targets_one_frame_trap (partial)

OP-85 Existence of a Strong Equilibrium in Unweighted Max-k-Cut GamesIn LeanEquilibria in Games

Let $G = (V, E)$ be a finite simple unweighted graph and let $k \ge 3$ be an integer. In the unweighted Max-$k$-Cut game on $(G, k)$, each player $v \in V$ chooses a strategy $\sigma(v) \in \{1, \dots, k\}$, and player $v$'s utility is $u_v(\sigma) = |\{w \in N(v) : \sigma(w) \neq \sigma(v)\}|$, where $N(v)$ denotes the open neighborhood of $v$ in $G$. A strong deviation from a strategy profile $\sigma: V \to \{1, \dots, k\}$ is a non-empty coalition $S \subseteq V$ and a profile $\tau: V \to \{1, \dots, k\}$ such that $\tau(v) = \sigma(v)$ for all $v \in V \setminus S$ and $u_v(\tau) > u_v(\sigma)$ for all $v \in S$. A profile $\sigma$ is a strong equilibrium if it admits no strong deviation. Does every finite simple unweighted graph admit a strong equilibrium in the Max-$k$-Cut game for every $k \ge 3$?

Posed in arXiv:2610.04948, Sec. 4, para. 3 — Social Optimality Does Not Imply Coalitional Stability in Unweighted Max-k-Cut Games

What is known

While the paper exhibits an unweighted graph where an optimal coloring admits a profitable coalitional deviation, the coalition deviates to another optimal coloring that may itself be stable, leaving the universal existence of strong equilibria unresolved.

In Lean: maxcut_strong_equilibrium_exists_of_card_le (partial), maxcut_game_strong_equilibrium_exists (statement), maxcut_strong_equilibrium_of_one_double_defect (partial)

OP-86 Maximum Degree Threshold for Coalitional Stability of Optimal ColoringsIn LeanEquilibria in Games

For an integer $k \ge 3$, let $\Delta^*(k)$ denote the largest integer $D$ such that for every finite simple unweighted graph $G = (V, E)$ with maximum degree $\Delta(G) \le D$, every cut-maximizing coloring $\sigma: V \to \{1, \dots, k\}$ in the unweighted Max-$k$-Cut game is a strong equilibrium. It is known that $\Delta^*(k) \ge 2k - 1$ (which gives $\Delta^*(3) \ge 5$). What is the exact value of $\Delta^*(k)$ for each $k \ge 3$, and in particular, what is the exact value of $\Delta^*(3)$?

Proposed here, building on arXiv:2610.04948, Cor. 9 — Social Optimality Does Not Imply Coalitional Stability in Unweighted Max-k-Cut Games; the paper does not ask it

What is known

Corollary 9 shows that every optimal coloring is a strong equilibrium whenever the maximum degree satisfies $\Delta(G) \le 2k - 1$ (recovering a known bound), while Theorem 2 provides a counterexample where $\Delta(G) > 2k - 1$. The paper leaves open the sharp maximum degree threshold separating graphs where all optimal colorings are coalitionally stable from those admitting unstable optima.

In Lean: maxcut_optimal_strong_of_degree_le (partial), maxcut_optimal_not_strong_degree_66 (partial)

OP-87 Tight asymptotic threshold for MMS allocations with monotone goodsIn LeanFair Division

Let M be a set of m indivisible items and N = {1, ..., n} a set of n ≥ 2 agents. Each agent i ∈ N has a monotone valuation function v_i : 2^M → ℝ with v_i(∅) = 0 and v_i(S) ≤ v_i(T) whenever S ⊆ T ⊆ M. The maximin share of agent i is MMS(M, v_i, n) = max_{P} min_{j ∈ [n]} v_i(P_j), where the maximum is over all partitions P = (P_1, ..., P_n) of M into n bundles. An allocation A = (A_1, ..., A_n) of M is an MMS allocation if v_i(A_i) ≥ MMS(M, v_i, n) for all i ∈ N. Define μ(n) to be the largest integer m such that every instance with n agents, at most m goods, and monotone valuations has an MMS allocation. Is μ(n) = n + log_2 n + o(log_2 n) as n → ∞?

Posed in arXiv:2610.06125, Sec. 3 — On MMS allocations with few items

What is known

The paper establishes that μ(n) = n + Θ(log n), showing the upper bound μ(n) ≤ n + log_2 n + O(log log n) in Theorem 6 and the lower bound μ(n) ≥ n + c log_2 n for c ≈ 0.93 in Lemma 9 and Lemma 8. Closing the gap to determine whether the leading constant is 1 remains open.

In Lean: mms_threshold_monotone_asymptotic (statement), mms_two_agents_four_goods_not_exists (partial), mms_exists_monotone_of_le (partial), mms_threshold_monotone_two (partial)

OP-90 Undirected Multiple-Unicast Coding Advantage over the Binary FieldIn LeanInformation Theory & Coding

Does there exist an undirected graph $G = (V, E)$ with edge capacities $c \colon E \to \mathbb{R}_{>0}$ and source-sink pairs $(s_1, t_1), \ldots, (s_k, t_k)$ such that the throughput achievable by deterministic linear network coding over the binary field $\mathbb{F}_2$ strictly exceeds the maximum common rate supported by fractional multicommodity flow?

Proposed here, building on arXiv:2610.10108, Sec. 4 — The Multiple Unicast Conjecture is False; the paper does not ask it

What is known

The paper refutes the undirected multiple-unicast conjecture by constructing an explicit linear network code over the field with 9 elements on a 182-vertex graph derived from PG(2,9), achieving common throughput 1 where fractional multicommodity flow cannot exceed 147/157. The construction crucially uses the projective geometry of PG(2,9) and degree-4 polynomials over F_9. The paper leaves untouched whether any coding advantage over multicommodity flow is possible using linear (or non-linear) network codes over the binary field F_2.

In Lean: flow_supports_rate_zero (partial), flow_supports_rate_mono (partial), undirected_binary_linear_unicast_advantage (statement), linear_code_supports_rate_mono (partial)

OP-97 Existence of a Strongly Symmetric Matroid Instance with Symmetry Gap Strictly Below 8/17In LeanSubmodular & Combinatorial Optimization

Consider the symmetry gap framework for submodular maximization: let N be a finite set, ℱ ⊆ 2^N be the collection of independent sets of a matroid on N, and f : 2^N → ℝ_{≥ 0} be a non-negative submodular function. Suppose the problem max {f(S) : S ∈ ℱ} is strongly symmetric with respect to a permutation group 𝒢 on N, meaning f(σ(S)) = f(S) for all S ⊆ N and σ ∈ 𝒢, and S ∈ ℱ ⇔ S' ∈ ℱ whenever 𝔼_{σ ∈ 𝒢}[1_{σ(S)}] = 𝔼_{σ ∈ 𝒢}[1_{σ(S')}]. The symmetry gap of the instance is defined as γ = max_{x ∈ P(ℱ)} F(x̄) / max_{x ∈ P(ℱ)} F(x), where P(ℱ) is the convex hull of indicator vectors of sets in ℱ, F is the multilinear extension of f, and x̄ = 𝔼_{σ ∈ 𝒢}[σ(x)]. Does there exist such an instance (f, ℱ, 𝒢), where ℱ is a matroid constraint (or a simplified partition matroid constraint), with symmetry gap γ < 8/17?

Proposed here, building on arXiv:2610.07387, Corollary 3.4 and Appendix A — Stronger Hardness for Submodular Maximization Subject to a Matroid Constraint; the paper does not ask it

What is known

The paper shows that the symmetry gap framework yields an inapproximability bound of 8/17 ≈ 0.471 for submodular maximization subject to a simplified partition matroid or cardinality constraint, improving upon the 2011 bound of 2 e^{-1/2} (1 - e^{-1/2}) ≈ 0.478. In Appendix A, the authors prove that within their 3-parameter family of hyperedge-cut gadgets, the symmetry gap is strictly minimized at 8/17. It remains open whether the symmetry gap framework itself has an intrinsic barrier at 8/17 for matroid constraints, or whether a different gadget or geometry can yield a symmetry gap strictly strictly smaller than 8/17.

In Lean: matroid_symmetry_gap_lt_eight_seventeenths (statement)

OP-98 Objective-switching approximation for weighted 4-set packingIn LeanApproximation & Inapproximability

Let an instance of Maximum Weighted $k$-Set Packing consist of a finite collection $\mathcal{S}$ of sets of cardinality at most $k$ on a ground set $U$, together with a positive weight function $w : \mathcal{S} \to \mathbb{Q}_{>0}$. A packing is a subfamily $A \subseteq \mathcal{S}$ of pairwise disjoint sets, with weight $w(A) = \sum_{S \in A} w(S)$. Can the two-phase framework combining squared-weight potential local search with residual linear-objective claw repairs be extended to $k = 4$ to obtain a polynomial-time approximation algorithm for Maximum Weighted $4$-Set Packing with approximation ratio strictly better than the locality gap of squared-weight local search (or strictly less than $2.5$)?

Posed in arXiv:2610.10036, Sec. 5, Extension to weighted k-Set Packing — Breaking the $\sqrt{3}$ Barrier for Maximum Weighted $3$-Set Packing

What is known

The paper breaks the sqrt(3) barrier for k=3 by combining Phase I (squared-weight local search) with Phase II (linear-objective claw repair via auxiliary 9-set packing). For k >= 4, the layered coefficients change and direct claw repairs may occupy up to k^2 ground elements, leaving open whether objective switching yields a net improvement over the squared-weight locality gap.

In Lean: claws_from_packing_compatible (partial), apply_repairs_is_packing (partial), apply_repairs_empty (partial), op_98_objective_switching_weighted_four_set_packing (statement)

OP-100 Maximal secant variety order testable by linear flattenings in even dimensionsIn LeanAlgebraic & Lattice-Based Complexity

Let $n \ge 4$ be an even integer. For a nonzero linear map $L : (\mathbb{C}^n)^{\otimes 3} \to \mathrm{Mat}_{u,v}(\mathbb{C})$ into complex matrices of arbitrary dimensions $u, v \ge 1$, define $\rho(L) = \max_{x,y,z \in \mathbb{C}^n} \mathrm{rank} L(x \otimes y \otimes z)$ and the potency $\mathrm{Pot}(L) = \frac{\max_{T \in (\mathbb{C}^n)^{\otimes 3}} \mathrm{rank} L(T)}{\rho(L)}$. Let $\Pi(n) = \sup_L \mathrm{Pot}(L)$ be the supremum over all nonzero linear flattenings. For an integer $r \ge 1$, the linear flattening method yields a nontrivial equation for the secant variety $\sigma_r((\mathbb{C}^n)^{\otimes 3})$ if and only if $\mathrm{Pot}(L) > r$ for some linear flattening $L$, which occurs if and only if $r \le \lceil \Pi(n) \rceil - 1$. Since $2n - 2 \le \Pi(n) \le 2n - 2 + \frac{2}{n+1} < 2n - 1$, the maximum such integer $r$ is either $2n - 3$ (if $\Pi(n) = 2n - 2$) or $2n - 2$ (if $\Pi(n) > 2n - 2$). What is this maximum integer $r$ for each even $n \ge 4$; in particular, is $\Pi(n) > 2n - 2$?

Posed in arXiv:2610.08504, Sec. 1.2, open question (ii) — Explicit tensors beyond the linear flattening barrier

In Lean: linear_flattening_testable_antitone (partial), linear_flattening_testable_tensor_rank_gt (partial), op100_linear_flattening_potency_gt_even (statement)

OP-103 Universal Additive Gap Between List Chromatic Number and Chromatic Number of Two MatroidsIn LeanCombinatorics for TCS

Let $M_1$ and $M_2$ be two loopless matroids on a common finite ground set $E$. A common $k$-coloring is a partition of $E$ into $k$ sets, each independent in both $M_1$ and $M_2$; the common chromatic number $\chi(M_1, M_2)$ is the minimum number of colors in such a coloring. Given an assignment of color lists $L(e)$ of size $k$ for each $e \in E$, a list coloring is a choice of color $c(e) \in L(e)$ for each $e \in E$ such that each monochromatic set is independent in both matroids; the common list chromatic number $\chi_{\ell}(M_1, M_2)$ is the minimum $k$ such that a list coloring exists for every list assignment of size $k$. Is there an absolute constant $C \ge 0$ such that $\chi_{\ell}(M_1, M_2) \le \chi(M_1, M_2) + C$ for every pair of finite loopless matroids $M_1, M_2$ on a common ground set? In particular, does $\chi_{\ell}(M_1, M_2) \le \chi(M_1, M_2) + 1$ always hold?

Posed in arXiv:2610.07318, Question 3.1 — A note on the list chromatic number of two matroids

What is known

A multiplicative bound $\chi_{\ell}(M_1, M_2) \le 2\chi(M_1, M_2)$ was previously established for every pair of matroids (Combinatorica 2025). The paper constructs a graphic matroid and a partition matroid with common chromatic number 2 and common list chromatic number 3, demonstrating that an additive gap of 1 is possible. It remains open whether the additive gap $\chi_{\ell} - \chi$ can grow arbitrarily large or is bounded by an absolute constant.

In Lean: matroid_common_list_chromatic_le_add_const (statement)

OP-104 Equality of List Chromatic and Chromatic Numbers for Strongly Base-Orderable MatroidsIn LeanCombinatorics for TCS

Let $M$ be a finite matroid. Recall that $M$ is strongly base-orderable if for every pair of bases $B_1, B_2$ of $M$, there exists a bijection $\varphi: B_1 \to B_2$ such that $(B_1 \setminus X) \cup \varphi(X)$ is a basis of $M$ for every subset $X \subseteq B_1$. For two loopless strongly base-orderable matroids $M_1, M_2$ on a common finite ground set $E$, does the common list chromatic number always equal the common chromatic number, that is, $\chi_{\ell}(M_1, M_2) = \chi(M_1, M_2)$?

Posed in arXiv:2610.07318, Question 3.2 — A note on the list chromatic number of two matroids

What is known

The common chromatic number of two strongly base-orderable matroids equals $\max\{\chi(M_1), \chi(M_2)\}$ by a classical result of 1976. Earlier work proved equality $\chi_\ell = \chi$ for transversal matroids (a subclass of strongly base-orderable matroids). This paper proves that $\chi(M_1, M_2) = 2$ implies $\chi_\ell(M_1, M_2) = 2$ for strongly base-orderable matroids, establishing equality when the common chromatic number is at most 2. The case where $\chi(M_1, M_2) \ge 3$ remains open.

In Lean: matroid_sbo_common_list_chromatic_eq (statement), matroid_sbo_list_colorable_two_of_colorable_two (partial), matroid_sbo_common_list_colorable_two_of_common_colorable_two (partial), matroid_sbo_common_list_chromatic_eq_of_le_two (partial)

OP-105 Exponent of log n in the Query Complexity of Tarski Fixed Points on the GridIn LeanAlgorithm Design & Analysis

Let $[n]^k$ denote the grid $\{1, \dots, n\}^k$ with the standard componentwise partial order. Let $\operatorname{Tarski}(n, k)$ denote the deterministic query complexity of finding a fixed point of an unknown monotone function $f: [n]^k \to [n]^k$ accessed via an evaluation oracle. Does there exist a constant $c < 1$ and a function $f: \mathbb{N} \to \mathbb{N}$ such that for all $k \ge 3$ and all $n \ge 2$, $\operatorname{Tarski}(n, k) \le f(k) (\log n)^{c \lceil \log_2 k \rceil}$? In particular, for dimension $k = 5$, is $\operatorname{Tarski}(n, 5) = O(\log^2 n)$?

Proposed here, building on arXiv:2610.07055, Theorem 2 and Theorem 3 (Abstract and Sec. 1) — Tarski Fixed Points in Quasi-FPT Queries; the paper does not ask it

What is known

The paper achieves a major breakthrough by showing that $\operatorname{Tarski}(n,k) = (\log n)^{\Theta(\log k)}$ up to the $5^k$ factor, proving an upper bound $O(5^k (\log n)^{\lceil \log_2 k \rceil})$ and a lower bound $\Omega((\log n / \mathrm{polylog}(k))^{\lfloor \log_4(6k+4)\rfloor})$. However, this leaves a factor of 2 gap in the exponent of $\log n$ between $\frac{1}{2}\log_2 k$ and $\log_2 k$. For instance, in dimension $k=5$, the known bounds give $\Omega(\log^2 n) \le \operatorname{Tarski}(n,5) \le O(\log^3 n)$. Determining the exact exponent constant $c \in [1/2, 1]$ is the central remaining open question on the asymptotic query complexity.

In Lean: tarski_query_complexity_five_le_log_sq (statement)

OP-110 Bermond--Thomassen conjecture for four disjoint directed cyclesIn LeanGraph Theory & Graph Algorithms

Does every finite simple loopless directed graph $D$ with minimum out-degree at least 7 contain 4 pairwise vertex-disjoint directed cycles?

Posed in arXiv:2610.11517, Sec. 1, after Conjecture 1.1 — An asymptotic bound for the Bermond--Thomassen Conjecture

In Lean: bermond_thomassen_four_disjoint_cycles (statement), digraph_126_four_cycles_under_extremal_and_cycle_criteria (partial), digraph_125_no_four_cycles_overlap_window (partial), digraph_125_four_cycles_under_extremal_and_cycle_criteria (partial)

OP-119 Exact value of optimal oriented diameter for diameter 4 graphsIn LeanGraph Theory & Graph Algorithms

Let f(4) be the smallest integer such that every finite connected bridgeless simple graph of diameter 4 admits a strong orientation of directed diameter at most f(4). Determine the exact value of f(4) within the known range {12, 13, 14, 15, 16}, and in particular whether f(4) = 12.

Posed in arXiv:2610.09648, Section 1 — An asymptotically tight bound on oriented diameter

In Lean: oriented_diameter_four_lower_bound (partial), op_119_oriented_diameter_four_eq_twelve (statement)

OP-123 Existence of an 8-regular triangle-distinct graphIn LeanGraph Theory & Graph Algorithms

Does there exist a finite simple 8-regular triangle-distinct graph? That is, does there exist a finite simple graph $G = (V, E)$ such that every vertex $v \in V$ has degree $\deg_G(v) = 8$, and the triangle-degrees $\operatorname{td}_G(v) = |\{ \{u, w\} \subseteq V \setminus \{v\} : \{u, v\}, \{w, v\}, \{u, w\} \in E \}|$ are pairwise distinct for all $v \in V$?

Proposed here, building on arXiv:2610.08478, Section 1, paragraph 2 — Regular $K_3$-Irregular Graphs of Every Regularity at Least Nine; the paper does not ask it

What is known

Hak, Kozerenko, and Serdiuk (arXiv:2507.18776) showed that no r-regular triangle-distinct graph exists for r <= 7, and narrowed the possible orders of an 8-regular triangle-distinct graph to six candidate values. The present paper establishes existence for all regularities r >= 9. Consequently, r = 8 is the sole remaining regularity whose status is open.

In Lean: card_le_twenty_nine_of_regular_eight_triangle_distinct (partial), exists_nonempty_regular_eight_triangle_distinct (statement), regular_eight_triangle_distinct_card_ge_fifteen (partial)

OP-132 Worst-Case State-Complexity Blow-up for Bipartite Cactus AutomataIn LeanAutomata & Formal Languages

Let L be a regular language over a finite alphabet Σ, and let n be the state complexity of L (the number of states of its minimal DFA). What is the optimal upper bound f(n) on the minimum number of states in an ε-free NFA A such that L(A) = L and the transition graph G(A) is a bipartite cactus? In particular, can f(n) be bounded polynomially in n, or is the worst-case blow-up exponential or super-exponential?

Posed in arXiv:2610.11717, Sec. 4 — Every Regular Language Has a Bipartite Cactus Automaton

In Lean: min_bipartite_cactus_nfa_states_empty (partial), regular_language_has_bipartite_cactus_nfa (partial), min_bipartite_cactus_nfa_states_nonempty (partial), bipartite_cactus_nfa_polynomial_blowup (statement)

OP-134 Local average order of dominating sets containing a stemIn LeanGraph Theory & Graph Algorithms

Let $G$ be a finite simple graph of order $n \ge 2$ without isolated vertices. A vertex $u \in V(G)$ is a leaf if $\deg(u) = 1$, and an $l$-stem if it has exactly $l$ leaf neighbors. A graph is star-like if every vertex is either a leaf or an $l$-stem with $l \le 2$. For any vertex $v \in V(G)$, let $\mathcal{D}_v(G)$ be the set of dominating sets of $G$ containing $v$, and let $avd_v(G) = \frac{1}{|\mathcal{D}_v(G)|} \sum_{S \in \mathcal{D}_v(G)} |S|$ be the local average order of dominating sets containing $v$. If $v$ is an $l$-stem with $l \ge 1$, is it always true that $avd_v(G) \le \frac{4n+1}{6}$, with equality if and only if $l = 1$ and $G$ is star-like?

Posed in arXiv:2610.11446, Conjecture 6.1 — On the local average order of dominating sets

In Lean: simple_graph_local_avg_dominating_order_stem_le (statement)

OP-142 Quadratic lower bound for sets with no unique sums in finite fieldsIn LeanCombinatorics for TCS

For an odd prime $p$, let $m(p)$ denote the minimum size of a subset $A \subseteq \mathbb{F}_p$ with $|A| \ge 2$ such that every sum in $A + A$ has at least two distinct representations as an unordered pair $\{a, b\}$ with $a, b \in A$, allowing $a = b$. Does there exist an absolute constant $c > 0$ such that $m(p) \ge c (\log p)^2$ for all sufficiently large primes $p$?

Posed in arXiv:2610.09349, Question 5.1 — A near-quadratic lower bound for sets with no unique sums

In Lean: finset_card_ge_one_add_clog_of_midpoint_balanced (partial), nus_min_card_ge_one_add_clog (partial), nus_min_card_ge_c_log_sq (statement)

OP-144 Equality of tree stacking number and the tree estimateIn LeanGraph Theory & Graph Algorithms

Let $T$ be any finite tree. The stacking number $\operatorname{stack}(T)$ is the minimum integer $t \ge 2$ such that every configuration of $t$ pebbles on $T$ can be transformed, by standard pebbling steps (removing 2 pebbles from a vertex and placing 1 on an adjacent vertex), into a configuration supported on a single vertex. For a vertex $r \in V(T)$, let $\operatorname{leaf}_T(r)$ be the number of leaves of $T$ distinct from $r$, and let $\rho_T(r) = \sum_{v \in V(T),\, v = r \text{ or } \deg(v) > 1} \deg(v) \cdot 2^{\operatorname{dist}_T(r, v)}$. Define $\operatorname{estim}(T) = \max\left\{2,\, 1 + \max_{r \in V(T)} (\rho_T(r) + \operatorname{leaf}_T(r))\right\}$. Does the equality $\operatorname{stack}(T) = \operatorname{estim}(T)$ hold unconditionally for every finite tree $T$?

Posed in arXiv:2610.09650, Conjecture 5.6 — The Almost Stacked Hypothesis: A Conjectural Analogue of Sjöstrand's Cover Pebbling Theorem

What is known

The paper proves the lower bound unconditionally (Theorem 5.2) and the upper bound assuming the Almost Stacked Hypothesis (Theorem 5.4), but the unconditional equality for arbitrary configurations remains open.

In Lean: path_graph_two_stacking_number_eq_tree_estimate (partial), path_graph_three_stacking_number_eq_tree_estimate (partial), star_graph_four_stacking_number_eq_tree_estimate (partial), star_graph_one_stacking_number_eq_tree_estimate (partial), op144_tree_stacking_number_eq_tree_estimate (statement)

OP-148 Optimal Asymptotic Base Constant for Ambiguity of Finitely Ambiguous NFAsIn LeanAutomata & Formal Languages

Let M(n) denote the maximum degree of ambiguity (the maximum number of accepting runs on any word) over all trim finitely ambiguous nondeterministic finite automata with n states. What is the value of the asymptotic base constant c = lim_{n -> infty} M(n)^{1/n}? In particular, is c = 1 + Real.sqrt 2, or does there exist an infinite family of finitely ambiguous NFAs with base constant strictly greater than 1 + Real.sqrt 2?

Proposed here, building on arXiv:2610.08525, Sec. 5, after Theorem 14 — Stronger bounds on the degree of ambiguity of finite automata; the paper does not ask it

What is known

The paper proves that every n-state finitely ambiguous NFA has degree of ambiguity at most 2^{O(n)}, improving the long-standing 2^{O(n log n)} bound, and constructs a family of NFAs with ambiguity at least 2 P_{n-2} = Omega((1+sqrt(2))^n), where log_2(1+sqrt(2)) ≈ 1.27155. The upper bound constant in the exponent is of the order of 12-14. The exact optimal base constant c = lim_{n -> infty} M(n)^{1/n} remains unknown and is the central quantitative question left open.

In Lean: finitely_ambiguous_nfa_single_state_unambiguous (partial), pell_family_asymptotic_base (partial), optimal_asymptotic_base_constant_finitely_ambiguous_nfa (statement), nfa_max_ambiguity_one_le (partial), le_nfa_max_ambiguity (partial)

OP-153 Sub-exponential difference bounds for general quadratic intersective polynomialsIn LeanElementary Number Theory

Let $h \in \mathbb{Z}[X]$ be an intersective polynomial of degree 2, meaning that for every positive integer $m$, there exists $n \in \mathbb{Z}$ such that $h(n) \equiv 0 \pmod m$. Do there exist constants $c > 0$ and $C > 0$ depending only on $h$ such that for all integers $N \ge 3$, every subset $A \subseteq \{1, \dots, N\}$ satisfying $(A - A) \cap \{h(n) : n \in \mathbb{N}_{\ge 1}\} \subseteq \{0\}$ satisfies $|A| \le C N \exp(-c \sqrt{\log N \log \log N})$?

Proposed here, building on arXiv:2610.07765, Sec. 1, after line 248 — A new bound for the Furstenberg--Sárközy theorem using the van der Corput property; the paper does not ask it

What is known

The paper obtains the bound $N \exp(-c \sqrt{\log N \log \log N})$ for difference sets avoiding $h(n) = n^2$. For general intersective polynomials of degree at least 2, the best known bound from density-increment methods is $N \exp(-c_h (\log N)^\mu)$ for any fixed $\mu \in (0, 1/2)$. The paper's signed van der Corput construction relies on the explicit structure of quadratic Gauss sums $G_q(a v^2)$ for pure squares. Extending this signed coefficient averaging to arbitrary quadratic intersective polynomials $h(X) \in \mathbb{Z}[X]$ remains open.

In Lean: op_153_square_diff_free_three_card_le_two (partial), op_153_subexp_bound_intersective_quadratic (statement), op_153_card_le_of_avoiding_diff (partial), op_153_card_le_of_poly_diff_free (partial), op_153_square_diff_free_four_card_le_two (partial), op_153_square_diff_free_five_card_le_two (partial)

OP-158 Tightness of the harmonic residual error bound for iterated trade operationsIn LeanMechanism Design & Auctions

Let $G: \mathbb{R} \to \mathbb{R}$ be defined by $G(t) = \max\{1-t, 0\}$. For $n \ge 3$ and $\theta = (\theta_1, \dots, \theta_n) \in [0, 1]^n$ with $s = \sum_{i=1}^n \theta_i$, let $\mathsf{T}$ be the averaging operator defined by $(\mathsf{T}f)(t) = \frac{1}{n^2} \sum_{j=1}^n \sum_{k=1}^n f(t - \theta_j + \theta_k)$, and let $E_m = (\mathrm{I} - \mathsf{T})^m G$. Lemma 4.2 shows that for all $m \ge 1$, $|E_m(s)| \le \frac{s}{n H_m} = O(\frac{s}{n \log m})$. Is this harmonic/logarithmic upper bound on $|E_m(s)|$ tight for the iterated trade operator on $G$? That is, does there exist a sequence of profiles $\theta^{(m)}$ such that $|E_m(s)| = \Omega(\frac{s}{n \log m})$, or does $\sup_{\theta \in [0, 1]^n, s > 0} \frac{n |E_m(s)|}{s}$ decay at a faster rate in $m$, such as $O(m^{-c})$ for some $c > 0$?

Posed in arXiv:2610.10995, Remark 6.2 — Asymptotically Optimal Public Project Redistribution without Bounded Precision: A Complex-Analytic Proof

What is known

Lemma 4.2 proves that the aggregate residual error $|(\mathrm{I} - \mathsf{T})^m G(s)|$ is at most $s / (n H_m) \le s / (n \ln m)$. The author notes that it is unknown whether this logarithmic decay is tight or if the residual error decays faster as a function of the number of rounds m.

In Lean: redistribution_trade_error_harmonic_bound (partial), op_158_trade_residual_harmonic_bound_tight (statement), trade_residual_error_round_one_tight (partial), redistribution_trade_error_one (partial), redistribution_trade_error_succ (partial)

OP-159 Existence of CSS codes with three logical qubits and quasi-transversal CCZ for block lengths 39 to 46In LeanQuantum Computation

Does there exist an integer $n \in \{39, 40, 41, 42, 43, 44, 45, 46\}$ and a CSS quantum code of block length $n$ with $k=3$ logical qubits and $Z$-distance $d_Z \ge 3$, specified by an $X$-stabilizer generator matrix $S \in \mathbb{F}_2^{s \times n}$ and a logical $X$-operator matrix $K \in \mathbb{F}_2^{3 \times n}$, satisfying the nine Campbell–Howard conditions: (K1) $\sum_{j=1}^n K_{i,j} \equiv 0 \pmod 2$ for all $1 \le i \le 3$; (K2) $\sum_{j=1}^n K_{i,j} K_{i',j} \equiv 0 \pmod 2$ for all $1 \le i < i' \le 3$; (K3) $\sum_{j=1}^n K_{1,j} K_{2,j} K_{3,j} \equiv 1 \pmod 2$; (KS1) $\sum_{j=1}^n K_{i,j} S_{l,j} \equiv 0 \pmod 2$ for all $1 \le i \le 3, 1 \le l \le s$; (KS2) $\sum_{j=1}^n K_{i,j} K_{i',j} S_{l,j} \equiv 0 \pmod 2$ for all $1 \le i < i' \le 3, 1 \le l \le s$; (KS3) $\sum_{j=1}^n K_{i,j} S_{l,j} S_{l',j} \equiv 0 \pmod 2$ for all $1 \le i \le 3, 1 \le l < l' \le s$; (S1) $\sum_{j=1}^n S_{l,j} \equiv 0 \pmod 2$ for all $1 \le l \le s$; (S2) $\sum_{j=1}^n S_{l,j} S_{l',j} \equiv 0 \pmod 2$ for all $1 \le l < l' \le s$; (S3) $\sum_{j=1}^n S_{l,j} S_{l',j} S_{l'',j} \equiv 0 \pmod 2$ for all $1 \le l < l' < l'' \le s$?

Posed in arXiv:2610.09341, Sec. 5 — Building codes with transversal CCZ using projective geometry and SAT solvers

What is known

Theorem 4.5 proves that no CSS code with k = 3, d_Z >= 3 and quasi-transversal CCZ exists for n <= 38, while Jacinto et al. constructed a [[47,3,3]] code. The paper isolates the remaining gap 39 <= n <= 46 as open.

In Lean: op_159_css_ccz_no_code_s_zero (partial), op_159_css_ccz_no_code_s_one (partial), op_159_css_ccz_gap_39_to_46_existence (statement), op_159_css_ccz_stabilizer_rank_ge_two (partial)

OP-160 Diameter and finiteness of graphs whose powers are all well-coveredIn LeanGraph Theory & Graph Algorithms

Let $G$ be a finite simple connected graph such that for every positive integer $d \geq 1$, the power graph $G^d$ is well-covered (every maximal independent set of $G^d$ has the same cardinality). Is the diameter of $G$ at most 3? Furthermore, if $\operatorname{diam}(G) = 3$, are there only finitely many such graphs up to isomorphism that contain no true twins (pairs of adjacent vertices $u, v$ such that $N[u] = N[v]$)?

Posed in arXiv:2610.09300, Question 3.9 — On graphs whose powers are well-covered

In Lean: diam_le_one_of_forall_power_well_covered_of_degree_eq_one (partial)

OP-163 Polynomial Transient Bound for the Rational Hunger GameIn LeanCombinatorial Games

Let $(V, P, F)$ be an irreducible rational hunger game on $n$ states with stationary distribution $\pi$ and minimal period $T$ such that $T\pi$ is integral. For an initial hunger vector $h \in \mathbb{Q}^n$ with $\sum_{i=1}^n h_i = 0$, let $\tau(h) = \min \{t \ge 0 : F^t(h) \in B\}$ denote the transient time to reach the recurrent basin $B$. Is $\tau(h)$ bounded by a polynomial in $n$, $T$, $\|h\|_\infty$, and the least common denominator of the entries of $P$?

Proposed here, building on arXiv:2610.08949, Thm 3.8 — Primitive periods in greedy chip-firing games; the paper does not ask it

What is known

The paper proves that every rational hunger game trajectory on the zero-sum hyperplane is eventually periodic and converges to a unique recurrent state tiling the hyperplane by lattice shifts, but provides no quantitative bounds on the number of steps required to reach this recurrent basin as a function of the initial state or transition matrix.

In Lean: rational_hunger_game_transient_polynomial_bound (statement), hunger_transient_time_eq_zero_of_mem_basin (partial), hunger_transient_polynomial_bound_of_mem_basin (partial), rational_hunger_game_transient_polynomial_bound_lcd (statement)

OP-166 Symmetry of the inversion number under tournament dijoinsIn LeanGraph Theory & Graph Algorithms

Let $D_1$ and $D_2$ be finite tournaments. For any tournament $D$, let $\operatorname{inv}(D)$ denote the inversion number of $D$, defined as the minimum number of subsets $X \subseteq V(D)$ whose successive inversions (reversing the direction of all directed edges with both endpoints in $X$) transform $D$ into an acyclic (transitive) tournament. Let $D_1 \to D_2$ denote the dijoin of $D_1$ and $D_2$, which is the tournament on vertex set $V(D_1) \sqcup V(D_2)$ with all directed edges of $D_1$, all directed edges of $D_2$, and all directed edges $u \to v$ for $u \in V(D_1)$ and $v \in V(D_2)$. Is it true that $\operatorname{inv}(D_1 \to D_2) = \operatorname{inv}(D_2 \to D_1)$ for all finite tournaments $D_1$ and $D_2$?

Posed in arXiv:2610.13798, Conjecture 4.1 — On the failure of additivity of inversion numbers for dijoins

In Lean: tournament_dijoin_inversion_number_symm (statement), tournament_dijoin_inversion_number_le_add (partial), tournament_dijoin_inversion_number_le_symm_add_two (partial), tournament_inversion_number_le_dijoin (partial), tournament_dijoin_inversion_number_symm_of_is_acyclic_left (partial), tournament_dijoin_swap_inversion_number_eq_reverse (partial)

OP-173 KNRS homomorphism density conjecture for distance-hereditary graphsIn LeanGraph Theory & Graph Algorithms

Let $F$ be a finite distance-hereditary graph (a connected graph in which every induced path between any two vertices is a shortest path, or equivalently any graph generated from a single vertex by repeatedly adding pendant vertices, true twins, or false twins). Is $F$ a KNRS graph? That is, for every $d \in (0, 1]$ and every $\varepsilon > 0$, does there exist $\rho > 0$ such that every sufficiently large $(\rho, d)$-dense graph $G$ satisfies $q(F, G) \ge d^{e(F)} - \varepsilon$?

Proposed here, building on arXiv:2610.13820, Theorem 1.2 — Counting cographs in locally dense graphs; the paper does not ask it

What is known

Theorem 1.2 proves that every cograph is KNRS, using the fact that cographs are generated from a single vertex by disjoint unions (false twins) and joins (true twins). Distance-hereditary graphs strictly generalize cographs by allowing one additional operation: attaching a pendant vertex (leaf) to an existing vertex. Since trees are known to be KNRS and cographs are now KNRS, distance-hereditary graphs represent the most natural common generalization whose KNRS status is left open.

In Lean: knrs_conjecture_distance_hereditary (statement), tree_is_distance_hereditary (partial), cograph_is_distance_hereditary (partial)

OP-175 Spectral Wegner equality for graphs with spectral radius up to 3/sqrt(2)In LeanGraph Theory & Graph Algorithms

Let $k \ge 1$ be an integer and $r \in [1, 3/\sqrt{2}]$. Let $\omega_\lambda(k, r) = \max \{\omega(G^k) \mid \lambda_1(G) \le r\}$ and $\chi_\lambda(k, r) = \max \{\chi(G^k) \mid \lambda_1(G) \le r\}$, where the maximum is taken over all finite simple graphs $G$ with spectral radius $\lambda_1(G) \le r$. Does $\omega_\lambda(k, r) = \chi_\lambda(k, r)$ hold for all $k \ge 1$ and all $r \in [1, 3/\sqrt{2}]$?

Posed in arXiv:2610.13852, Sec. 6, after Theorem 6.4 — Clique and chromatic numbers of graph powers: spectral bounds and anticodes

In Lean: spectral_wegner_equality_spectral_radius_le_three_div_sqrt_two (statement), spectral_extremal_clique_num_le_chromatic_number (partial), spectral_wegner_equality_spectral_radius_le_sqrt_two_add_sqrt_five (partial), spectral_wegner_equality_k_one_le_three_div_sqrt_two (partial), spectral_wegner_equality_k_two_le_three_div_sqrt_two (partial)

OP-179 Additive Basis Bound for C_p + C_np Sufficient for the Zero-Sum ConjectureIn LeanCombinatorics for TCS

Let $p \geq 3$ be a prime and $n \geq 2$ an integer such that the smallest prime divisor of $np$ is $p$ and $p \nmid n$. Let $G = (\mathbb{Z}/p\mathbb{Z}) \oplus (\mathbb{Z}/np\mathbb{Z})$. A sequence (multiset) $S$ over $G$ is called regular if for every proper subgroup $H < G$, the number of terms of $S$ belonging to $H$ is at most $|H| - 1$. The sequence $S$ is an additive basis if every element of $G$ is a sum of a nonempty subsequence of $S$. Let $c_0(G)$ be the minimal integer $l$ such that every regular sequence $S$ over $G$ of length $|S| \geq l$ is an additive basis of $G$. Is $c_0(G) \leq \lceil(4np - 2)/3\rceil$?

Proposed here, building on arXiv:2610.13103, Sec. 5, after Conjecture — Additive bases and the zero-sum invariant $\mathsf{N}(G)$ for groups $C_p\oplus C_{np}$; the paper does not ask it

What is known

Theorem 1.4 proves N(C_p ⊕ C_np) = 2np - 1 when p divides n. In Section 5, the author notes that for p not dividing n, the non-regular case in the proof already holds for all sequences with |S| ≥ 2np - 1; by Proposition 4.2, establishing c_0(C_p ⊕ C_np) ≤ ⌈(4np - 2)/3⌉ would immediately complete the proof of the conjecture N(G) = 2np - 1. The best upper bounds proven in the paper (Theorem 1.2 / Lemma 4.1) are ⌈(25np - 20)/6⌉ for p ≥ 5 and ⌈(16np - 12)/5⌉ for p = 3, leaving the tighter bound ⌈(4np - 2)/3⌉ open.

In Lean: additive_basis_bound_cp_cnp_conjecture (statement), additive_basis_bound_cp_cnp_of_dvd (partial), additive_basis_bound_cp_cnp_of_ge_five (partial), additive_basis_bound_c3_cn3_of_not_dvd (partial)

OP-184 Tight Adaptivity Gap for Partially Adaptive Policies in Pandora's Problem with DeadlinesIn LeanOnline Algorithms

What is the tight worst-case approximation ratio $\sup \{ \alpha \in [0, 1] : \forall \mathcal{I}, \, \mathrm{OPT}_{\mathrm{PA}}(\mathcal{I}) \ge \alpha \, \mathrm{OPT}_{\mathrm{FA}}(\mathcal{I}) \}$ of partially adaptive policies against the fully adaptive optimum in Pandora's problem with deadlines under deferred-until-stopping commitment? In particular, is this ratio strictly greater than $1/2$?

Proposed here, building on arXiv:2610.13775, Sec. 4 and Sec. 5 — A $1/2$-Approximation for Pandora's Problem with Deadlines; the paper does not ask it

What is known

The paper establishes that a partially adaptive immediate-commitment policy achieves a 1/2-approximation, while no partially adaptive policy can exceed 0.778 against the fully adaptive optimum even under deferred-until-stopping commitment. It leaves open the exact worst-case approximation ratio for partially adaptive policies with deferred commitment: whether the 1/2 bound is tight even when partial adaptivity is granted deferred commitment, or whether the true ratio lies strictly between 1/2 and 0.778.

In Lean: op184_partially_adaptive_beyond_half (statement), op184_partially_adaptive_half_approximation (partial)

OP-191 Reconstructibility of Finite Posets of Height OneIn LeanCombinatorics for TCS

Is every finite ordered set of height 1 and cardinality at least 4 reconstructible from its deck of one-element deleted suborders? That is, if P and Q are finite posets of height 1 with |P| ≥ 4 having the same multiset of isomorphism types of one-element deletions, is P isomorphic to Q?

Posed in arXiv:2610.12690, Conclusions, Section 9 — Reconstruction of Finite Posets of Width Three

What is known

This problem was originally posed by Schröder (2016) in Ordered Sets (Chapter 2, Remarks and Open Problems, item 9, p. 50). The current paper settles the width-three part of Schröder's problem, explicitly leaving the height-one case open.

In Lean: poset_height_one_reconstructible (statement), poset_hypomorphic_card_lt_pairs_eq (partial)

OP-193 k-tightness of a cycle plus an isolated vertexIn LeanGraph Theory & Graph Algorithms

Let $k \ge 3$ and $m \ge 4k - 3$ be integers. Let $G = C_m \sqcup K_1$ be the disjoint union of an $m$-cycle and an isolated vertex (so $G$ has $n = m+1$ vertices). Is $G$ always $k$-tight; that is, does the $G$-stable Kneser graph $\operatorname{KG}(C_m \sqcup K_1, k)$ have chromatic number $(m+1) - 2k + 2 = m - 2k + 3$?

Posed in arXiv:2610.17884, Sec. 1, after Conjecture 1.3 — The chromatic number of $G$-stable Kneser graphs

In Lean: op_193_cycle_isolated_vertex_k3_m9 (partial), op_193_cycle_isolated_vertex_chromatic_le (partial), op_193_cycle_isolated_vertex_k_tight_iff_ge (partial), is_k_tight_cycle_sum_unit_iff (partial), op_193_kneser_hom_sum_inl (partial), op_193_hom_cycle_step (partial), op_193_cycle_isolated_vertex_chromatic_ge_cycle (partial), op_193_cycle_plus_isolated_k_tight (statement), op_193_chromaticNumber_le_cycle_step (partial), op_193_nine_cycle_stable_triples_anchored_five_coloring (partial), op_193_cubic_threshold_edge_gap (partial), op_193_cubic_cycle_anchor_avoidance (partial), op_193_large_cycle_three_set_anchor_avoidance (partial), op_193_nonanchored_color_exposes_all_colors (partial), op_193_covering_color_obstruction (partial), op_193_k3_m10_at_least_85_vertices (partial), op_193_eleven_cycle_stable_triples_anchored_seven_coloring (partial), op_193_k3_m10_case_a3 (partial), op_193_twelve_cycle_stable_triples_anchored_eight_coloring (partial), op_193_avoidance_forces_nonanchor (partial), op_193_k3_m10_case_a4 (partial), op_193_clique_free_edge_bound (partial), op_193_avoidance_graph (partial), op_193_k3_m10_case_a5 (partial), op_193_k3_m10_case_b2x1 (partial), op_193_k3_m10_case_a0 (partial), op_193_stable_anchor_avoidance_forces_nonanchor (partial), op_193_k3_m10_case_b2x4 (partial), op_193_noncolorable_if_stable_anchor_avoidance (partial), op_193_k3_m10_case_b2x5 (partial), op_193_cubic_noncolorable_if_cycle_lower (partial), op_193_cubic_tight_if_cycle_lower (partial), op_193_k3_m10_case_b3x0 (partial), op_193_k3_m10_case_b3x1 (partial), op_193_k3_m10_case_b4x0 (partial), op_193_disjoint_anchor_packings (partial), op_193_k3_m10_case_b3x4 (partial), op_193_k3_m10_case_b4x3 (partial), op_193_k3_m10_case_b3x5 (partial), op_193_k3_m10_case_b4x5 (partial), op_193_cycle_isolated_vertex_k3_m10 (partial), op_193_k3_m10_case_b5x0 (partial), op_193_k3_m10_case_b5x3 (partial), op_193_k3_m10_case_b5x4 (partial), op_193_thirteen_anchor_avoidance_nonbipartite (partial), op_193_fourteen_anchor_avoidance_nonbipartite (partial), op_193_fourteen_cycle_avoids_ten_anchors (partial), op_193_cycle_isolated_vertex_k3_m11 (partial), op_193_cycle13_bipartition_pair_parity (partial), op_193_cycle14_bipartition_pair_parity (partial)

OP-197 Davenport Constant of Two-Dimensional Integer Symmetric BoxesIn LeanElementary Number Theory

Let $m \ge 2$ be an integer. Let $B_m = \llbracket -m, m \rrbracket^2 = \{ (x, y) \in \mathbb{Z}^2 : -m \le x \le m, -m \le y \le m \}$. A zero-sum sequence over $B_m$ is a finite multiset $S$ of elements of $B_m$ whose sum is $(0, 0)$. It is minimal if no non-empty proper submultiset has sum $(0, 0)$. The Davenport constant $\mathsf{D}(B_m)$ is the maximal length of a minimal zero-sum sequence over $B_m$. Let $q(m)$ be the smallest prime number not dividing $m$. Is it true that for every integer $m \ge 2$, $\mathsf{D}(B_m) = 4m^2 - q(m)$, and furthermore, up to the eight symmetries of the square $[-m, m]^2$ and permutation of terms, the unique minimal zero-sum sequence achieving this maximal length is the sequence $S(m)$ consisting of $q(m)(m-1)+m$ copies of $(m, m)$, $2m^2 - mq(m)$ copies of $(-m, m-1)$, and $2m^2 - m$ copies of $(m - q(m), -m)$?

Posed in arXiv:2610.16562, Conjecture 1 — The Davenport constant of low-dimensional boxes

In Lean: davenport_constant_int_box_two_eq (statement), davenport_constant_int_box_two_ge (partial)

OP-205 Equivalence covering number of cycle powers for power-of-two bandwidth and even order not divisible by the bandwidthIn LeanCombinatorics for TCS

Let $k \ge 1$ be an integer such that $k+1 = 2^m$ for some positive integer $m$. Let $n \ge \max\{2k+2, k^2(k+2)\}$ be an even integer such that $k+1$ does not divide $n$. For the cycle graph $C_n$ on $n$ vertices, let $C_n^k$ denote its $k$th power, where two distinct vertices are adjacent if and only if their shortest-path distance along $C_n$ is at most $k$. An equivalence subgraph of $C_n^k$ is a disjoint union of cliques, and $\operatorname{eq}(C_n^k)$ denotes the minimum number of equivalence subgraphs needed to cover all edges of $C_n^k$. Determine the exact value of $\operatorname{eq}(C_n^k)$ in this case; specifically, does $\operatorname{eq}(C_n^k) = 1 + \lceil\log_2(k+1)\rceil$ or does $\operatorname{eq}(C_n^k) = 2 + \lceil\log_2(k+1)\rceil$? In particular, for $k = 3$ (where $k+1 = 4$) and even $n \ge 45$ not divisible by $4$, is $\operatorname{eq}(C_n^3)$ equal to $3$ or $4$?

Proposed here, building on arXiv:2610.15635, Theorem 1.3 — Covering powers of cycles with equivalence subgraphs; the paper does not ask it

What is known

Theorem 1.3 determines the exact value of eq(C_n^k) for all n >= max{2k+2, k^2(k+2)} whenever k+1 is not a power of 2, or (k+1) divides n, or when k+1 is a power of 2 and n is odd. Theorem 1.4 further restricts eq(C_n^k) to {1 + ceil(log_2(k+1)), 2 + ceil(log_2(k+1))} for large n. This leaves open the exact value when k+1 is a power of 2, n is even, and k+1 does not divide n.

In Lean: simple_graph_equivalence_covering_number_cycle_power_two_pow_even_not_dvd (statement), simple_graph_equivalence_covering_number_cycle_power_forty_six_three (partial), simple_graph_not_has_equivalence_cover_cycle_power_three_of_not_dvd (partial), simple_graph_equivalence_covering_number_cycle_power_three_of_mod_four_eq_two (partial), cycle_power_sixteen_block_vertical_average_barrier (partial), cycle_power_exact_rank_boundary_successor (partial), cycle_power_rooted_reflect (partial), cycle_power_rooted_reflect_exact (partial), cycle_power_rooted_reflect_cover (partial), cycle_power_rooted_reflect_parent (partial), cycle_power_sixteen_block_geometry_reflect (partial), cycle_power_sixteen_block_outer_quarters_of_upper_vertical (partial), cycle_power_dyadic_outer_quarter_monotone_of_sixteen_block_core (partial), simple_graph_equivalence_covering_number_cycle_power_fifteen_of_not_dvd (partial), simple_graph_equivalence_covering_number_cycle_power_seven_of_not_dvd (partial), cycle_power_eight_local_count_defect_impossible (partial), cycle_power_dyadic_odd_coverage_single_count_endpoint_only (partial), cycle_power_dyadic_single_count_endpoint_only_of_boundary_pairing (partial)

OP-207 Tuza's conjecture on triangle packing and coveringIn LeanGraph Theory & Graph Algorithms

For every finite simple graph $G = (V, E)$, does the minimum cardinality $\tau(G)$ of a set of edges meeting every triangle satisfy $\tau(G) \le 2\nu(G)$, where $\nu(G)$ denotes the maximum number of pairwise edge-disjoint triangles in $G$?

Posed in arXiv:2610.15539, Conjecture 1.1 — Tuza's Conjecture under an Edge-Count Condition

In Lean: simple_graph_triangle_cover_number_le_two_mul_packing_number (statement), simple_graph_triangle_cover_number_le_three_mul_packing_number (partial), simple_graph_line_graph_triangle_cover_le_two_mul_packing (partial)

OP-211 Eventual parity of Grundy values for three-legged spidersIn LeanCombinatorial Games

Let S(x, y, z) denote the 3-legged spider tree with x, y, and z markable edges on its three respective legs (so the paths from the centre have lengths x+1, y+1, z+1). For all positive integers x, y with 1 ≤ x ≤ y such that (x, y) is not of the form (1, 2j) for any integer j ≥ 1, does there exist an integer z₀(x, y) such that for all z ≥ z₀(x, y), the Grundy value in the Game of Arrows satisfies g(S(x, y, z)) = z mod 2?

Posed in arXiv:2610.15145, Conjecture 7.4 — Nim heaps in the Game of Cycles: the parity conjecture fails on trees

In Lean: spider_grundy_val_one_one_up_to_five (partial), spider_grundy_val_one_three_up_to_three (partial), spider_grundy_val_two_two_up_to_two (partial), spider_grundy_val_one_one_up_to_seven (partial), spider_grundy_val_two_two_up_to_three (partial), spider_grundy_val_one_three_up_to_four (partial), op211_three_legged_spider_eventual_parity (statement)

OP-212 Parity conjecture for trees with bounded internal and leaf threadsIn LeanCombinatorial Games

Let T be a finite tree. Decompose T into pieces by removing all pendant edges (edges incident to leaves) and splitting at all special vertices (vertices adjacent to leaves). In each piece, a thread is a maximal path whose interior vertices have degree 2; a thread is internal if both of its endpoints have degree at least 3 in the piece, and a leaf thread otherwise. If every internal thread of every piece of T has at most 2 edges, and every leaf thread has at most 3 edges, does the parity conjecture hold for T, that is, does g(T) = m(T) mod 2, where m(T) is the number of markable edges of T?

Posed in arXiv:2610.15145, Question 11.4 — Nim heaps in the Game of Cycles: the parity conjecture fails on trees

In Lean: arrows_parity_of_internal_threads_le_two_leaf_threads_le_three (statement)

OP-216 Strong chromatic-choosability of odd antiholesIn LeanGraph Theory & Graph Algorithms

For every integer $\ell \ge 3$, is the odd antihole $\overline{C_{2\ell-1}}$ (the complement of the cycle of length $2\ell-1$) strongly $\ell$-chromatic-choosable? That is, since $\chi(\overline{C_{2\ell-1}}) = \ell$, does every list assignment $L$ assigning a list of size $\ell-1$ to each vertex of $\overline{C_{2\ell-1}}$ admit a proper list coloring unless all vertices are assigned the identical list of colors?

Posed in arXiv:2610.14241, Conjecture 9 — Restricting Odd Antiholes in Critical Graphs via List Coloring

What is known

Theorem 8 establishes list-colorability for complements of hypomatchable graphs under a common palette assumption. Removing the common palette assumption yields Conjecture 9, which the authors prove implies the full extremal antihole characterization (Conjecture 3) for all critical graphs. The case ell = 3 is classical and ell = 4 is known, leaving ell >= 5 open.

In Lean: odd_antihole_not_colorable_of_identical_lists (partial), odd_antihole_colorable_of_common_palette (partial), odd_antihole_chromaticNumber (partial), odd_antihole_strongly_chromatic_choosable (statement), cycle_five_compl_strongly_chromatic_choosable (partial)

OP-217 Higher-order star-forming and independence equality for chain graphsIn LeanGraph Theory & Graph Algorithms

Let $G = (A, B; E)$ be a finite simple chain graph (that is, a bipartite graph whose neighborhoods of vertices in $A$ are totally ordered by inclusion, or equivalently an induced $2K_2$-free bipartite graph). For an integer $k \ge 3$, let $\beta_k(G)$ be the maximum cardinality of a $k$-independent vertex set in $G$ (a vertex set $I$ such that every vertex in $I$ has fewer than $k$ neighbors in $I$). Let $SF_k(G)$ be the maximum cardinality of a minimal $k$-star-forming set in $G$, where a set $S \subseteq V(G)$ is $k$-star-forming if for every $v \notin S$, $v$ is contained in a copy of $K_{1,k}$ in $G[S \cup \{v\}]$ (equivalently, $|N(v) \cap S| \ge k$ or there exists $u \in N(v) \cap S$ with $|N(u) \cap S| \ge k-1$), and minimal if no proper subset is $k$-star-forming. Does the equality $\beta_k(G) = SF_k(G)$ hold for every chain graph $G$ and every integer $k \ge 3$?

Posed in arXiv:2610.03785, Conjecture 6.4 — Upper $k$-Star-Forming Sets, $k$-Independence, and Upper Domination

In Lean: chain_graph_k_independence_number_eq_upper_k_star_forming_number (statement)

OP-223 Poset connectivity of sustainable and non-sustainable trees under generalized tree shiftsIn LeanGraph Theory & Graph Algorithms

Let $T$ be a tree on $n$ vertices. A tree $T'$ is obtained from $T$ by a generalized tree shift (GTS) from candidate $v$ to beneficiary $u$ if all internal vertices of the path connecting $u$ and $v$ in $T$ have degree 2, $w$ is the neighbour of $v$ on this path, and $T'$ is formed by removing every edge $vz$ for $z \in N(v) \setminus \{w\}$ and adding the edge $uz$. An edge $e$ of a tree $T$ is sustainable if there exists a non-edge $f$ such that $T - e + f$ is a tree and $\lambda_1(T - e + f) \ge \lambda_1(T)$, where $\lambda_1$ is the adjacency spectral radius; $T$ is sustainable if every edge of $T$ is sustainable, and non-sustainable otherwise. Under the partial order on trees of order $n$ generated by generalized tree shifts (with minimum element $P_n$ and maximum element $K_{1, n-1}$): (1) For every sustainable tree $X$ on $n$ vertices, does there exist a sequence of sustainable trees $X_1, X_2, \dots, X_k$ such that $X_1 \cong P_n$, $X_k \cong X$, and each $X_{i+1}$ is obtained from $X_i$ by a generalized tree shift? (2) For every non-sustainable tree $X$ on $n$ vertices, does there exist a sequence of non-sustainable trees $X_1, X_2, \dots, X_k$ such that $X_1 \cong X$, $X_k \cong K_{1, n-1}$, and each $X_{i+1}$ is obtained from $X_i$ by a generalized tree shift?

Posed in arXiv:2610.17078, Open Problem 6.1 — Sustainable trees

In Lean: op223_star_is_nonsustainable (partial), op223_gts_is_tree (partial), op223_no_nonsustainable_tree_fin_three (partial), op223_sustainable_tree_fin_four (partial), op223_nonsustainable_tree_fin_four (partial), op223_nonsustainable_connectivity_fin_four (partial), op223_gts_poset_connectivity (statement), op223_example_graph (partial), op223_example_slide (partial), op223_example_graph_sustainable (partial), op223_example_slide_nonsustainable (partial), op223_conditional_slide_refutation (partial), op223_matrix_spectrum_abs_le (partial), op223_matrix_spectral_upper (partial), op223_matrix_spectral_lower (partial), op223_example_spectral_upper (partial), op223_first_replacement_spectral_lower (partial), op223_gts_neighbor_sets_counterexample (partial), op223_nonleaf_count_counterexample (partial), op223_tree_adjacent_shift_other_degrees (partial), op223_tree_adjacent_shift_nonleaf_count (partial), op223_nonstar_tree_has_nonleaf_neighbor_at_vertex (partial), op223_nonsustainable_has_bad_edge (partial), op223_adjacent_shift_retains_beneficiary_edges (partial), op223_shift_bad_edge_yields_step (partial), op223_star_connectivity_from_edge_preservation (partial), op223_leaf_slide_count_with_source_degree (partial), op223_leaf_slide_count_counterexample (partial), op223_local_principal_maxima_not_sufficient (partial), op223_separated_branch_derivative_positive (partial)

OP-250 Exact order of (1, z, g)-mixed cagesIn LeanGraph Theory & Graph Algorithms

Let $z \geq 1$ and $g \geq 3$ be integers. Is the minimum order $n(1,z,g)$ of a mixed graph that is 1-regular in edges and $z$-regular in arcs with girth $g$ equal to $N(z,g)$, where $N(z,g) = z(g-1) + 2$ when $z$ is even, and $N(z,g) = (z+1)(g-1)$ when $z$ is odd?

Posed in arXiv:2610.14110, Conjecture 2 — New mixed cages, bounds and computational results

What is known

The authors prove the upper bound n(1,z,g) <= N(z,g) for all z >= 1 and g >= 3 by constructing the circulant mixed graphs M(z,g), and conjecture sharpness based on exhaustive computational searches matching N(z,g) for all tested parameters.

In Lean: mixed_cage_order_one_eq (statement), mixed_cage_order_one_girth_three (partial)

OP-253 Glove Number of Complete GraphsIn LeanCombinatorics for TCS

Let $K_n$ denote the complete graph on $n$ vertices, and let $\mathrm{gl}(K_n)$ denote its glove number. While it is proved that $\mathrm{gl}(K_n) \le n - 1$ for all $n \ge 2$ and that $\mathrm{gl}(K_n) = n - 1$ holds for $n \in \{2, 3, 4, 5\}$, is it true that $\mathrm{gl}(K_n) = n - 1$ for all integers $n \ge 2$?

Posed in arXiv:2610.17602, Conjecture 2 — Clean handshake sequences

In Lean: glove_number_complete_graph_upper_bound (partial), glove_number_k2 (partial), glove_number_k3 (partial), glove_number_k4 (partial), glove_number_complete_graph_no_zero_gloves (partial), glove_number_complete_graph_eq_iff_ge (partial), glove_number_complete_graph_pos (partial), glove_number_complete_graph_eq_iff_not_has_seq (partial), glove_number_complete_graph_eq_of_not_has_seq (partial), glove_number_complete_graph_succ_succ (statement), glove_number_complete_graph_le_three (partial)

OP-258 Coincidence of Triangle-Forcing Density Sequences and Decay-Ramsey SequencesIn LeanCombinatorics for TCS

Let $\mathcal{A}$ be the class of non-increasing sequences $\mathbf{a} = (a_i)_{i \ge 1}$ of positive real numbers with $\sum_{i=1}^\infty a_i > 1$. For an integer $k \ge 2$, write $\mathbf{a} \to K_k$ if for all sufficiently large $n$, every edge-colouring $c: E(K_n) \to \mathbb{N}$ with $|c^{-1}(i)| \le a_i \binom{n}{2}$ for all $i \ge 1$ contains a monochromatic $K_k$. Is it true that for every $\mathbf{a} \in \mathcal{A}$, if $\mathbf{a} \to K_3$, then $\mathbf{a} \to K_k$ for all $k \ge 3$? Equivalently, does there exist a sequence $\mathbf{a} \in \mathcal{A}$ such that $\mathbf{a} \to K_3$ but $\mathbf{a} \not\to K_4$?

Proposed here, building on arXiv:2610.20577, Theorem 1.3 — Decay-Ramsey Sequences; the paper does not ask it

What is known

The paper defines a sequence $\mathbf{a} \in \mathcal{A}$ to be Decay-Ramsey if $\mathbf{a} \to K_k$ for all $k \ge 2$. Both of its main negative results (Theorem 1.3 showing non-Decay-Ramsey for divergent series $\sum a_i = \infty$, and Proposition 1.5 showing non-Decay-Ramsey for exponential sequences $C \beta^i$) actually establish the strictly stronger conclusion that $\mathbf{a} \not\to K_3$. It is left open whether the property $\mathbf{a} \to K_3$ is strictly weaker than being Decay-Ramsey, or whether forcing monochromatic triangles already forces monochromatic cliques of all sizes.

In Lean: op_258_triangle_forcing_implies_decay_ramsey (statement), decay_ramsey_arrow_mono (partial)

OP-259 Equality of Zero-Sum Constant to Linear Dimension Lower BoundIn LeanElementary Number Theory

Let $r \ge 1$ and $n > 1$ be integers. An integer vector sequence $A = (\mathbf{a}_1, \dots, \mathbf{a}_N)$ in $\mathbb{Z}^r$ is admissible if $\mathbf{a}_i \not\equiv \mathbf{0} \pmod n$ for every $i \in \{1, \dots, N\}$. Let $w_r(n)$ denote the least positive integer $N$ such that every admissible sequence of length $N$ in $\mathbb{Z}^r$ contains a nonempty subsequence whose sum is $\mathbf{0} \pmod n$ but not $\mathbf{0} \pmod{n^2}$. Is it true that $w_r(n) = 2r(n-1) + 1$ for all integers $r \ge 1$ and $n > 1$?

Posed in arXiv:2610.19965, Question 3.1 — Proofs and disproofs of some conjectures on zero-sum problems of new types

What is known

The authors prove the lower bound $w_r(n) \ge 2r(n-1)+1$ for all $r \ge 1, n > 1$. Equality is known for $r=1$ (all $n$), $n=2$ (all $r$), and $r=2$ when $n = 2^k 3^\ell p$. The authors pose whether equality holds universally.

In Lean: zero_sum_w_two (partial), zero_sum_w_eq_question (statement), zero_sum_w_three_three (partial)

OP-265 Worst-case comparison complexity of finding the median of 16 elementsIn LeanAlgorithm Design & Analysis

Let $V_i(n)$ denote the minimum number of pairwise comparisons needed in the worst case by a deterministic comparison algorithm (decision tree) to find the $i$-th smallest element among $n$ distinct elements of a totally ordered set. It is known that $28 \le V_8(16) \le 29$. Determine whether $V_8(16) = 28$ or $V_8(16) = 29$.

Posed in arXiv:2610.18740, Sec. 7, open problems — Selecting the 7th Smallest of 16 Elements Takes Exactly 28 Comparisons

What is known

The paper proves V_8(16) <= 29 using a 2937-function decision tree certificate and notes that known lower bounds give V_8(16) >= 28, leaving V_8(16) in {28, 29}. Proof-number search runs at budget 28 remained undecided, and leaf-count lower bounds cannot exceed 28 due to a certificate having fewer than 2^28 leaves.

In Lean: op_265_median_sixteen_comparison_tree_depth_twenty_eight (statement), v_selection_le_iff (partial), v_selection_16_8_le_28_iff_exists_tree (partial), comparison_tree_num_leaves_le_two_pow_depth (partial)

OP-270 Exact value of the k-color Ramsey number of the 5-diamondIn LeanCombinatorics for TCS

For an integer $j \ge 2$, let $D_j$ be the $(j+2)$-element poset consisting of a unique minimum element $\hat{0}$, a unique maximum element $\hat{1}$, and an antichain of $j$ elements strictly between $\hat{0}$ and $\hat{1}$. For an integer $k \ge 1$, let $R_k(D_j)$ be the poset Ramsey number of $D_j$, defined as the minimum dimension $d$ such that every $k$-coloring of the Boolean lattice $B_d$ contains a monochromatic induced copy of $D_j$. What is the exact value of $R_k(D_5)$ for all $k \ge 2$, and in particular does $R_k(D_5) = 4k$ or $R_k(D_5) = 5k$?

Posed in arXiv:2610.20545, Sec. 1, after Corollary 3 — The $k$-color poset Ramsey number of the diamond is $2k$

What is known

Theorem 2 proves $R_k(D_j) \le jk$ for all $j \ge 2$, and matching lower bounds $R_k(D_j) \ge jk$ hold for $j \in \{2, 3, 4\}$ via level-set colorings because $B_{j-1}$ contains no copy of $D_j$. However, for $j = 5$, $B_4$ contains $D_5$ because $\binom{4}{2} = 6 \ge 5$, so level-set colorings only show $R_k(D_5) \ge 4k$, leaving a gap between $4k$ and $5k$.

In Lean: op_270_five_diamond_poset_ramsey_number (statement), diamond_poset_ramsey_number_le (partial), five_diamond_poset_ramsey_number_ge (partial), five_diamond_poset_ramsey_number_le (partial)

OP-275 Principal isotope avoidance between arbitrary Latin squaresIn LeanCombinatorics for TCS

Let $n > 1$ be an integer. Let $L$ and $L'$ be Latin squares of order $n$, viewed as functions from $\{1, \dots, n\}^2 \to \{1, \dots, n\}$ whose rows and columns are permutations of $\{1, \dots, n\}$. Does there always exist a principal isotope $L''$ of $L'$ that avoids $L$? That is, do there exist permutations $\pi, \rho \in \mathcal{S}_n$ such that for all $i, j \in \{1, \dots, n\}$, $L'(\pi(i), \rho(j)) \neq L(i, j)$?

Posed in arXiv:2610.20008, Conjecture 4 — Avoiding a partial Latin square with an isotope of a given Latin square

In Lean: latin_square_exists_principal_isotope_avoiding (statement), latin_square_exists_principal_isotope_avoiding_self (partial)

OP-280 Nonexistence of Perfect Mondrian PartitionsIn LeanElementary Number Theory

Does there exist an integer n ≥ 3 such that the n × n square admits an admissible Mondrian partition with defect 0? That is, does there exist an integer n ≥ 3 admitting a partition into two or more axis-aligned integer-sided rectangles that are pairwise noncongruent (no two share the same unordered pair of side lengths) and all have equal area?

Posed in arXiv:2610.19193, Sec. 1, below (1.1) — A Bounded-Defect Construction for the Mondrian Art Problem

In Lean: mondrian_no_perfect_partition (statement), mondrian_no_perfect_prime_power (partial), mondrian_large_prime_descent (partial), mondrian_perfect_partition_large_prime_iff (partial), mondrian_no_perfect_six_mul_prime_pow (partial), mondrian_perfect_prime_free_side_counts (partial), mondrian_perfect_min_width_layer_count (partial), mondrian_no_perfect_prime_mul_prime_pow (partial), mondrian_no_perfect_two_prime_powers (partial), mondrian_no_perfect_prime_power_area (partial), mondrian_no_perfect_two_prime_area (partial), mondrian_perfect_area_three_prime_factors (partial), mondrian_no_perfect_three_prime_area_one_factor (partial)

OP-282 Optimality of Defect Bound for Seven-Rectangle Mondrian DissectionsIn LeanElementary Number Theory

Let M₇(n) denote the minimum defect among all admissible Mondrian partitions of the n × n square into exactly 7 pairwise noncongruent integer-sided rectangles. Is it true that liminf_{n → ∞} M₇(n) = 280? That is, can any sequence of 7-rectangle Mondrian partitions achieve an asymptotic defect strictly less than 280?

Posed in arXiv:2610.19193, Sec. 4, Conjecture 1 — A Bounded-Defect Construction for the Mondrian Art Problem

In Lean: mondrian_seven_rects_defect_ge (partial), mondrian_liminf_min_defect_seven_le (partial), mondrian_liminf_min_defect_seven_eq (statement)

OP-284 Optimal Deterministic Competitive Ratio for Paging with Deadlines on at Least Two HolesIn LeanOnline Algorithms

Let $k \ge 2$ and $n \ge k+2$. In online paging with deadlines, each request $r$ for a page $v_r$ arrives at time $a_r$ with a deadline $d_r \ge a_r$, and must be served by having $v_r$ in cache at some time in $[a_r, d_r]$. The cost is the total number of page fetches into a cache of size $k$. The optimal deterministic competitive ratio is known to lie in $[k + 1/2, k + 1]$. What is the exact optimal deterministic competitive ratio for paging with deadlines on $n \ge k+2$ pages? In particular, for $k=2$ and $n=4$, is the optimal ratio $5/2$, $3$, or an intermediate value?

Posed in arXiv:2610.18767, Sec. 4, after Theorem 4.3 — Two Holes Make a Difference: Deterministic Paging with Delay and Deadlines

In Lean: deadline_paging_lower_bound_k_plus_half (partial)

OP-292 Tightness of the cop number bound ceil((k-1)/2) for (P_k, claw)-free graphsIn LeanGraph Theory & Graph Algorithms

Let $k \ge 7$ be an integer. Is the upper bound $c(G) \le \lceil \frac{k-1}{2} \rceil$ on the cop number of connected $(P_k, K_{1,3})$-free graphs tight? That is, for each $k \ge 7$, does there exist a connected $(P_k, K_{1,3})$-free graph $G$ with $c(G) = \lceil \frac{k-1}{2} \rceil$, or can the bound be improved to $c(G) \le \lceil \frac{k-1}{2} \rceil - 1$? In particular, for $k = 7$, does every connected $(P_7, K_{1,3})$-free graph have cop number at most $2$?

Posed in arXiv:2610.20129, Sec. 4 — Cop number of $P_k$-free graphs without a claw or a fork

In Lean: op_292_cop_number_p7_claw_free (statement), op_292_cop_number_p6_claw_free (partial)

OP-297 Minimum order of a vertex-transitive completion of a connected oriented graphIn LeanGraph Theory & Graph Algorithms

Given a finite connected oriented graph G on k vertices, how small can a vertex-transitive oriented graph H containing G as a subgraph be, as a function of k? In particular, does there exist a polynomial (or single-exponential) upper bound on the minimum number of vertices of such a vertex-transitive graph H in terms of k?

Posed in arXiv:2610.18600, Question 4.2 — Saturation and semisaturation of oriented graphs

What is known

Lemma 3.13 shows that if a connected graph can be embedded into a vertex-transitive graph of sufficiently small size, its saturation function is Theta(n). Reversing this raises the natural extremal question of how small a vertex-transitive host graph containing a given connected oriented graph can be.

In Lean: digraph_subgraph_fintype_card_le (partial)

OP-300 Leap groups of prism graphs and hypercube graphsIn LeanGraph Theory & Graph Algorithms

For each integer $n \ge 3$, determine the leap group $\Lambda_1(P_1 \square C_n)$ of the prism graph $P_1 \square C_n$ (the Cartesian product of the path $P_1 = K_2$ and the $n$-cycle $C_n$). Similarly, for each integer $n \ge 1$, determine the leap group $\Lambda_1(Q_n)$ of the hypercube graph $Q_n = K_2^{\square n}$. In particular, what are their group isomorphism types and their actions on the vertex sets?

Posed in arXiv:2610.18463, Question 5.4 — The group generated by a graph's derangements

In Lean: op_300_leap_group_prism_and_hypercube (statement), op_300_prism_three_leap_group_eq_top (partial), op_300_hypercube_one_leap_group_card (partial), op_300_hypercube_two_leap_group_card (partial)

OP-305 Optimal approximation ratio of universally strategyproof mechanisms for max cost on general metric spacesIn LeanMechanism Design & Auctions

In the two-facility location problem with candidate locations on general metric spaces, what is the optimal approximation ratio of universally strategyproof mechanisms with respect to the max cost? In particular, does there exist a universally strategyproof mechanism achieving an approximation ratio strictly less than 19/5, or does the lower bound of 15/4 match the true optimum?

Posed in arXiv:2610.18006, Sec. 5 — Truthful Two-Facility Location with Candidate Locations in Metric Spaces

What is known

On general metric spaces, the paper proves a lower bound of 15/4 = 3.75 and an upper bound of 19/5 = 3.8 for the approximation ratio of universally strategyproof mechanisms under the max cost, leaving a small gap between 3.75 and 3.8.

In Lean: two_facility_universal_expected_max_cost_nonneg (partial), two_facility_universal_max_cost_ratio_strictly_below_19_5 (statement)

OP-306 Sharpness of the wild number lower bound for minimum proper colorings of complete graphsIn LeanGraph Theory & Graph Algorithms

Let $n \ge 3$ be an integer, and let $K_n$ be the complete graph on $n$ vertices. For every minimum proper edge coloring $\rho$ of $K_n$ (using $\chi'(K_n)$ colors, where $\chi'(K_n) = n$ if $n$ is odd and $n-1$ if $n$ is even), is the wild number $\operatorname{wld}_\rho(K_n)$ equal to $\lfloor \frac{4\lceil n/2\rceil}{3} \rfloor$?

Posed in arXiv:2610.22142, Section 6, Conjecture — Wild number for spanning trees in complete and complete bipartite graphs

What is known

The paper proves the lower bound for all n >= 3 (Theorem 3.4) and proves it is sharp for 3 <= n <= 12 (Theorem 3.5), but sharpness for all n >= 13 remains open.

In Lean: wild_number_complete_graph_min_proper_coloring_ge (partial), wild_number_complete_graph_min_proper_coloring_eq (statement), wild_number_complete_three_min_proper_coloring_eq (partial), wild_number_complete_graph_279_min_proper_coloring_eq (partial), wild_number_complete_graph_large_odd_multiple_three_eq (partial), wild_number_complete_graph_large_eq (partial), wild_number_complete_graph_upper_sub_four_add_parity (partial), wild_number_complete_thirteen_fourteen_eq_nine_or_ten (partial)

OP-309 Rich-neighbor 5-edge-coloring of connected subcubic graphs other than K4In LeanGraph Theory & Graph Algorithms

Let $G$ be a finite connected simple graph with maximum degree at most 3 that is not isomorphic to the complete graph $K_4$. Does $G$ admit a rich-neighbor 5-edge-coloring, that is, a proper edge-coloring $\varphi : E(G) \to \{1, 2, 3, 4, 5\}$ such that every non-isolated edge is adjacent to a rich edge (an edge all of whose adjacent edges have pairwise distinct colors)?

Posed in arXiv:2610.21868, Conjecture 1.1 — Rich-neighbor 5-edge-colorings of subcubic graphs whose 3-vertices induce a matching

What is known

The central conjecture of Petruševski and Škrekovski (2024), confirmed here for graphs with Delta(G[V_3]) <= 1 and previously for edgeless G[V_3].

In Lean: cyclic_four_block_graph_exists_rich_neighbor_five_coloring (partial)

OP-310 Rich-neighbor 5-edge-coloring of subcubic graphs with Delta(G[V3]) at most 2In LeanGraph Theory & Graph Algorithms

Let $G$ be a finite simple graph with maximum degree at most 3. Let $V_3 = \{v \in V(G) : d_G(v) = 3\}$ be the set of vertices of degree 3 in $G$, and let $G[V_3]$ denote the induced subgraph on $V_3$. Suppose that $\Delta(G[V_3]) \le 2$. Does $G$ admit a rich-neighbor 5-edge-coloring?

Posed in arXiv:2610.21868, Sec. 4 — Rich-neighbor 5-edge-colorings of subcubic graphs whose 3-vertices induce a matching

What is known

The authors state this as the natural next step beyond their theorem Delta(G[V_3]) <= 1 towards the full subcubic conjecture. Note that K_4 has Delta(K_4[V_3]) = 3, so any graph with Delta(G[V_3]) <= 2 automatically excludes K_4.

In Lean: subcubic_subgraph_three_vertices_max_degree_le_two (partial), maxDegree_induce_V3_le_two_iff (partial), complete_four_not_induce_V3_maxDegree_le_two (partial), maxDegree_induce_V3_le_two_of_card_le_three (partial), op_310_partial_maxDegree_le_two (partial), op_310_partial_empty_V3 (partial), op_310_rich_neighbor_five_coloring_induce_V3_maxDegree_le_two (statement)

OP-314 Cancellation of higher right-associated exponentiation towers for finite posetsIn LeanCombinatorics for TCS

For a finite nonempty partially ordered set X, define the sequence of posets inductively by T_1(X) = X and T_{k+1}(X) = X^{T_k(X)} for all integers k ≥ 1, where X^Y denotes the set of order-preserving maps from Y to X ordered pointwise. For each fixed integer k ≥ 3, if A and B are finite nonempty partially ordered sets such that T_k(A) ≅ T_k(B) as partially ordered sets, does it follow that A ≅ B?

Proposed here, building on arXiv:2610.20802, Sec. 5, table row on iterated exponentiation — Two Short Proofs of the $A^A$ Theorem; the paper does not ask it

What is known

For k = 1 the claim is trivial, and for k = 2 it is Theorem 1.1 (A^A ≅ B^B implies A ≅ B). For k ≥ 3, the base and exponent differ, so Theorem 1.1 cannot be applied directly. While coordinate methods can handle certain structured families of iterated exponentiations, the general cancellation property for the right-associated towers T_k(X) = X^{T_{k-1}(X)} at height k ≥ 3 remains open.

In Lean: op314_poset_tower_order_iso_converse (partial), op314_poset_tower_two_cancellation (partial), op314_cancellation_poset_tower_three (partial), op314_cancellation_poset_tower (statement)

OP-320 Directed cuts of size at least ceil((d-1)m/(2(2d-1))) for digraphs of minimum outdegree dIn LeanGraph Theory & Graph Algorithms

Let $d \ge 2$ be an integer, and let $G$ be a finite directed graph with $m$ edges and minimum outdegree at least $d$ (that is, every vertex $v \in V(G)$ satisfies $d^+(v) \ge d$). Is there a vertex partition $V(G) = A \mathbin{\dot{\cup}} B$ such that $e_G(A,B) \ge \left\lceil \frac{d-1}{2(2d-1)}m \right\rceil$ and $e_G(B,A) \ge \left\lceil \frac{d-1}{2(2d-1)}m \right\rceil$?

Posed in arXiv:2610.21381, Conjecture 6.1 — Optimally large cuts in both directions

What is known

Scott (2005) asked for the maximum fraction of edges in directed cuts in both directions. Lee, Loh, and Sudakov conjectured the asymptotic coefficient (d-1)/(2(2d-1)). This paper proves that bound with the optimal additive constant for large m, and proves the linear bound ceil(m/6) for all m when d = 2. Conjecture 6.1 asks whether ceil((d-1)m / (2(2d-1))) holds for all m and all d >= 2.

In Lean: digraph_conjecture_six_one (statement), digraph_apex_over_bidirected_complete_three_has_bipartition (partial), digraph_apex_over_bidirected_complete_two_has_bipartition (partial)

OP-333 Complete cycle permutations for every $n$In LeanCombinatorics for TCS

For an integer $n \ge 1$, arrange a permutation $\sigma(1), \ldots, \sigma(n)$ of $\{1, \ldots, n\}$ cyclically around the $n$-cycle. An arc is a nonempty contiguous segment of the cycle (the whole cycle included); its sum is the sum of its labels. Call $\sigma$ complete if every integer $k \in \{1, \ldots, n(n+1)/2\}$ is the sum of some arc. Is there a complete permutation for every $n \ge 1$?

Proposed here, building on arXiv:2610.08889, follow-up to OP-121 (Sec. 1, after Theorem 1); the paper does not ask it

What is known

OP-121 asked whether some n >= 8 admits a complete permutation; it is settled in Lean (n = 8; also n = 9 and n = 10). The paper shows the increasing order fails for n = 6 and every n >= 8, while there are n(n-1)+1 arcs for only n(n+1)/2 targets. A computer search (10-09) found complete placements for every n <= 19 and for n = 21 (exhaustively for n <= 10). The Lean conjecture exists_cycle_labeling_complete was retired on 10-17 as out of reach: no general construction is known. A uniform construction, or a family of n with none, would answer it.

In Lean: cycle_labeling_complete (definition), exists_cycle_labeling_complete_ge_eight (partial), cycle_labeling_complete_nine (partial), cycle_labeling_complete_ten (partial)

OP-334 Exact edge-connectivity threshold $c(n)$ for positive Lin-Lu-Yau curvature, general $n$In LeanGraph Theory & Graph Algorithms

For each integer $n \ge 3$, let $c(n)$ be the smallest integer $k$ such that every connected simple graph $G$ on $n$ vertices with edge-connectivity $\kappa'(G) \ge k$ has $\kappa_{LLY}(x, y) > 0$ on every edge $xy$. The paper gives $c(n) \le \lceil 2n/3 - 1 \rceil$ for all $n$, with equality when $2n/3$ is an even integer $\ge 6$; but $c(3) = 0$ and $c(5) = 2$ lie below that bound. Determine $c(n)$ for the remaining $n$. In particular, is $c(n) = \lceil 2n/3 - 1 \rceil$ for all sufficiently large $n$?

Proposed here, building on arXiv:2610.10559, follow-up to OP-165 (after Theorem 1.4); the paper does not ask it

What is known

OP-165 asked whether c(n) = ceil(2n/3 - 1) for all n >= 3; Lean refutes it (c(3) = 0, and c(5) = 2 against 3). Theorem 1.3 (edge-connectivity >= 2n/3 - 1 suffices) is proved in Lean; Theorem 1.4 shows sharpness only when 2n/3 is an even integer >= 6. So the exact threshold is known only on that arithmetic progression, and small n behave differently. The next steps are c(4), c(6), c(7), c(8) by finite search, then lower-bound constructions for n not covered by Theorem 1.4.

In Lean: lly_positive_edge_connectivity_threshold (definition), lly_curvature_pos_of_edge_connectivity_ge (partial), lly_positive_edge_connectivity_threshold_three (partial), lly_positive_edge_connectivity_threshold_five (partial)

OP-337 Small Quasi-kernel ConjectureIn LeanGraph Theory & Graph Algorithms

Let $D = (V, E)$ be a finite loopless directed graph with no source (every vertex has in-degree at least 1). A subset $Q \subseteq V$ is an independent set if there is no directed arc between any pair of distinct vertices in $Q$. A subset $Q$ is a quasi-kernel of $D$ if $Q$ is independent and every vertex in $V$ is reachable from $Q$ by a directed path of length at most 2. Does every such source-free digraph $D$ contain a quasi-kernel $Q$ such that $|Q| \le |V|/2$?

Posed in arXiv:2610.23487, Conjecture 1.1 — Small and large quasi-kernels: a weighted transfer theorem

In Lean: digraph_small_quasi_kernel_exists (statement), digraph_quasikernel_covers_independent_set (partial), digraph_small_quasikernel_max_independent_cover_counterexample (partial), digraph_two_private_leaves_avoidance_reduces_large (partial), digraph_quasikernel_independent_cover_avoids_outneighbors (partial), digraph_seven_tournament_two_neighborhood_cover_counterexample (partial), finite_three_weighted_sets_half_cover_implies_pair_cover (partial), digraph_seven_cover_counterexample_rigidity (partial), digraph_two_vertex_avoidance_obstruction_parent_adjacency (partial), digraph_four_vertices_kernel_perfect_triple (partial), digraph_nonneighbor_kernel_or_dominating_vertex (partial), digraph_delete_dominated_vertex_quasikernel_lift (partial), digraph_nonneighborhood_kernel_neighborhood_lift (partial), digraph_nonneighborhood_kernels_weighted_half_cover (partial), digraph_kernel_perfect_subset_quasikernel_cover (partial), digraph_any_two_vertices_quasikernel_cover (partial), digraph_quasikernel_weighted_half_cover_support_six (partial), digraph_two_kernel_perfect_sets_weighted_half_cover (partial), digraph_weighted_in_degree_below_half (partial), digraph_seven_pair_four_cover_counterexample (partial), digraph_cyclic_seven_prescribed_neighborhood_counterexample (partial), digraph_nonneighborhood_kernel_condition_witness (partial), digraph_source_tournament_quasikernel_singleton (partial), digraph_digon_minimum_inweight_half_cover_counterexample (partial), digraph_nonneighborhood_kernel_no_second_layer_kernel_counterexample (partial), digraph_two_kernel_perfect_parent_half_cover (partial), digraph_matching_transfer_from_parent_half_cover (partial), digraph_fractional_kernel_perfect_parent_half_cover (partial), digraph_small_quasikernel_decomposition_fractional_parents (partial), digraph_small_quasikernel_decomposition_two_perfect_parents (partial)

OP-339 Convergence of iterated Round Robin under adjacent swaps for two agentsIn LeanFair Division

Let there be n = 2 agents and m >= 5 items allocated using the Round Robin sequence pi = (1, 2, 1, 2, ...). Each agent has an additive utility function consistent with a strict linear order over the items. In iterated Round Robin starting from truthful preferences, at each step an agent who can strictly improve their utility by exchanging two adjacent items in their reported ranking performs a best-response adjacent swap. Does this iterated Round Robin dynamic always converge to a pure Nash equilibrium under adjacent swaps for all m >= 5, or can it enter a cycle?

Posed in arXiv:2610.23040, Conjecture 3.14 — On the Convergence of Iterated Round Robin

What is known

The paper proves that iterated Round Robin under adjacent swaps converges to a pure Nash equilibrium for n = 2 and m = 4, but may cycle for n = 3 and m = 5; it conjectures that for n = 2, convergence holds for all m.

In Lean: iterated_round_robin_two_agents_adjacent_swaps_converges (statement)

OP-340 Polynomial bound on convergence of iterated Round Robin under item-preserving swapsIn LeanFair Division

Let n >= 3 be a fixed number of agents, and let m items be allocated via the Round Robin sequence pi = (1, 2, ..., n, 1, 2, ...). Agents have additive valuations consistent with strict linear preference rankings over items. In iterated Round Robin starting from truthful preferences, at each step an agent performs a strictly profitable item-preserving swap (exchanging two items in their reported ranking such that an item initially allocated to the agent is demoted yet remains allocated to that agent after the swap). Is the maximum number of manipulations in any such execution bounded by a polynomial in m, or can it be superpolynomial in m?

Proposed here, building on arXiv:2610.23040, Theorem 3.13 — On the Convergence of Iterated Round Robin; the paper does not ask it

What is known

Theorem 3.13 proves that iterated Round Robin under item-preserving swaps converges to a pure Nash equilibrium for any n >= 2 and m items within m! - 1 steps. For n = 2, Theorem 3.12 proves convergence in at most m(m-1)/2 steps via a potential function based on Kendall tau distance. The authors note that the Kendall tau argument does not extend to n >= 3 (the sum of pairwise Kendall tau distances can increase), leaving a large gap between the O(m^2) bound for two agents and the O(m!) bound for three or more agents.

In Lean: round_robin_item_preserving_swaps_polynomial_convergence (statement), iterated_round_robin_item_preserving_swaps_zero_of_card_le (partial), round_robin_item_preserving_swaps_three_agents_four_items_le_one (partial)

OP-345 Equivalence of EF1 guarantees for Round-Robin and recursively balanced sequencesIn LeanFair Division

Let alpha_RR be the largest universal EF1 approximation factor guaranteed at every pure Nash equilibrium of every Round-Robin instance with additive valuations, and let alpha_RB be the corresponding factor for all fixed recursively balanced picking sequence mechanisms. Does allowing the agent picking order to vary across rounds strictly decrease the worst-case EF1 guarantee, i.e., is alpha_RB < alpha_RR, or is alpha_RB = alpha_RR?

Posed in arXiv:2610.23686, Sec. 6, second paragraph — Revisiting the Fairness of Pure Nash Equilibria of Round-Robin

What is known

The lower bound of 1/2 applies to all recursively balanced picking sequences, while the upper-bound construction of 2/3 uses standard Round-Robin where the order of agents is identical in every round. Whether varying the order between rounds can strictly degrade the worst-case EF1 factor is open.

In Lean: round_robin_sequence_is_recursively_balanced (partial), recursively_balanced_alpha_le_round_robin_universal_alpha (partial)

OP-346 Best guaranteed EF1 factor for Round-Robin pure Nash equilibria with three agentsIn LeanFair Division

For fair division with indivisible goods and additive valuations allocated via the Round-Robin mechanism with n = 3 agents, what is the supremum alpha_RR(3) of factors alpha in [0, 1] such that every pure Nash equilibrium induces an alpha-EF1 allocation? In particular, is alpha_RR(3) equal to 15/16 (the bound from the 8-good counterexample), or does it decrease towards 2/3 as the number of goods grows?

Posed in arXiv:2610.23686, Sec. 6, third paragraph — Revisiting the Fairness of Pure Nash Equilibria of Round-Robin

What is known

For two agents, every pure Nash equilibrium of Round-Robin is 1-EF1. For three agents, Proposition 1 shows that 1-EF1 fails and yields an upper bound of 15/16 with 8 goods. It is open whether 15/16 is the tight worst-case factor for three agents or whether the guarantee decreases as the number of rounds grows.

In Lean: round_robin_three_agents_pne_not_alpha_ef1_of_three_quarters_lt (partial), round_robin_alpha_three_eq_two_thirds (statement), not_is_guaranteed_round_robin_ef1_factor_three_fifteen_sixteenths (partial), not_is_guaranteed_round_robin_ef1_factor_three_of_three_quarters_lt (partial)

OP-359 Semilinearity of Reachability Relations in Symmetric Two-Counter MachinesIn LeanAutomata & Formal Languages

Let M = (Q, T) be a symmetric 2-counter machine. For each pair of states q, q' ∈ Q, let R_{q, q'} ⊆ ℕ^2 × ℕ^2 denote the set of pairs of counter vectors (u, v) such that configuration (q', v) is reachable from configuration (q, u) in M. Is R_{q, q'} a semilinear subset of ℕ^4 (that is, a finite union of linear sets, or equivalently, definable in Presburger arithmetic)?

Posed in arXiv:2610.23495, Sec. 1, Related research — Symmetric two-counter machines

What is known

Effective semilinearity of reachability sets is known for 2-VASS and symmetric 2-VASS, and the paper proves effective semilinearity of certain 1-dimensional boundary reachability slices, but leaves open whether the full 4-dimensional reachability relation is semilinear.

In Lean: op_359_symmetric_two_counter_reachability_semilinear (statement)

OP-363 Lower bound on triangle-free blocking number by vertex cover numberIn LeanCombinatorics for TCS

Let L be a finite family of ℓ straight-line segments in ℝ² in general position whose crossing graph G(L) (with edges between segments whose relative interiors intersect) is triangle-free. Let τ(G(L)) denote the minimum vertex cover size of G(L), and let τ(ℓ) = max { τ(G(L)) : |L| = ℓ, G(L) is triangle-free }. Let β_△(L) be the maximum cardinality of a point set P ⊂ ℝ² blocked by L under the triangle-free crossing property (meaning for every pair of distinct points u, v ∈ P, adding segment uv creates a triangle in the crossing graph), and let β_△(ℓ) = max_{|L|=ℓ} β_△(L). Is it true that for every positive integer ℓ, β_△(ℓ) ≥ τ(ℓ)? Furthermore, does β_△(L) ≥ τ(G(L)) hold for every triangle-free family of segments L?

Posed in arXiv:2610.23130, Sec. 3.4, Conjecture 3.4 — Online geometric matching and segments block points

In Lean: triangle_free_blocking_ge_vertex_cover (statement)

OP-380 Edge-connectivity threshold for modulo-7 orientations and strong Z_7-connectivityIn LeanGraph Theory & Graph Algorithms

Is the minimum edge-connectivity guaranteeing that every graph has a modulo-7 orientation (an orientation where every vertex outdegree is congruent to indegree modulo 7) equal to 13 or 14? Equivalently, does every 13-edge-connected graph admit a modulo-7 orientation?

Posed in arXiv:2610.07034, Sec. 4.3, after Prop. 4.5 — Graphic additive bases and graph flows

What is known

For k = 3 (modulus 7), 12-edge-connected counterexamples are known and the paper proves sufficiency of (4k+2) = 14-edge-connectivity. It remains open whether the sharp threshold is 13 or 14.

In Lean: op_380_thirteen_edge_connected_has_modulo_seven_orientation (statement), complete_twelve_no_modulo_seven_orientation (partial)

OP-384 Asymptotic multi-label radio number of pathsIn LeanGraph Theory & Graph Algorithms

For any integers $k \ge 1$ and $m \ge 1$, does there exist an integer $n_0$ such that for every $n \ge n_0$, the $(m,k)$-radio number of the path graph $P_n$ of order $n$ satisfies $\lambda_k^m(P_n) = \lceil (k+1)^2 / 2 \rceil m - 1$?

Posed in arXiv:2610.25863, Conjecture 1 — On Multi-label radio Labelings of Graphs

What is known

Proved for k=1, k=2, and upper bound proved for k=3. Conjectured for all k and m for sufficiently large paths.

In Lean: simple_graph_multi_radio_number_path_le_eight_mul (partial), simple_graph_multi_radio_number_path_three_lt (partial), simple_graph_multi_radio_number_path_three_one_of_le (partial)

OP-392 Adjacency of consecutive binary necklaces under binary reflected Gray order for primesIn LeanCombinatorics for TCS

Let $n > 47$ be an odd prime. Let $D_n$ be the list of all $(2^n-2)/n$ non-constant binary necklaces of length $n$ (equivalence classes of words in $\{0, 1\}^n$ under cyclic shift), ordered by the rank of their first occurrence in the binary reflected Gray code (BRGC) $g(t) = t \oplus \lfloor t/2 \rfloor$ for $t \in \{0, \dots, 2^n-1\}$, where the first occurrence of a necklace is its representative with smallest rank. Are any two consecutive necklaces in $D_n$ adjacent in the necklace graph $Q_n$ (that is, do there exist representatives differing in exactly one bit)?

Posed in arXiv:2610.24758, Conjecture 1 — Optimal single-track Gray codes from Gray-ordered necklaces

In Lean: brgc_word (definition), bitword_rotate (definition), bitword_is_rotation (definition), brgc_necklace_first_rank (definition), bitword_necklace_adjacent (definition), brgc_necklace_order_consecutive_adjacent_of_prime (statement), brgc_necklace_order_consecutive_adjacent_five (partial), brgc_necklace_order_consecutive_adjacent_seven (partial)

OP-396 Existence of fractional symmetric chain decompositions for Young lattices and Boolean quotientsIn LeanCombinatorics for TCS

For all positive integers $m, n \ge 1$, does the Young lattice $L(m, n)$ (the poset of integer partitions whose Young diagrams fit inside an $m \times n$ bounding box, ordered by inclusion) admit a fractional symmetric chain decomposition? More generally, for any integer $n \ge 1$ and any subgroup $G \subseteq S_n$ acting on the Boolean lattice $\{0, 1\}^n$ by coordinate permutation, does the quotient poset $\{0, 1\}^n / G$ (with orbits ordered by existence of an order relation between representatives) always admit a fractional symmetric chain decomposition?

Posed in arXiv:2610.24148, Section 2.7.4, first open problem — Strong $\mathfrak{sl}_2$ Actions and Symmetric Chain Decompositions

In Lean: open_problem_young_lattice_fractional_scd (statement), young_lattice_one_fractional_scd (partial)

OP-397 Bounded denominators of rational fractional symmetric chain decompositionsIn LeanCombinatorics for TCS

Let $P$ be a finite ranked poset that admits a fractional symmetric chain decomposition. Is there an upper bound on the minimum positive integer $D$ such that $P$ admits a fractional symmetric chain decomposition with all chain weights in $\frac{1}{D}\mathbb{Z}_{\ge 0}$, depending only on the number of ranks of $P$ (or the cardinality of $P$)? In particular, for posets with at most $r$ ranks, does there always exist a rational fractional SCD with denominator bounded by a function of $r$?

Posed in arXiv:2610.24148, Section 2.7.4, third open problem — Strong $\mathfrak{sl}_2$ Actions and Symmetric Chain Decompositions

In Lean: fractional_scd_of_with_denominator (partial), fractional_scd_with_denominator_one_of_scd (partial), fractional_scd_with_denominator_mul (partial), open_problem_fractional_scd_bounded_denominator_by_ranks (statement), open_problem_fractional_scd_bounded_denominator_by_card (partial)

OP-404 Nearly doubly regular property of arborescence-maximizing regular tournaments of order 4k + 1In LeanGraph Theory & Graph Algorithms

Let $k \ge 1$ be an integer and let $n = 4k + 1$. A tournament $T$ on $n$ vertices is regular if every vertex has outdegree $2k$. For two distinct vertices $i \neq j$, let $c_{ij} = |N_T^+(i) \cap N_T^+(j)|$ denote the number of common outneighbors of $i$ and $j$. The tournament $T$ is called nearly doubly regular if $c_{ij} \in \{k-1, k\}$ for all pairs of distinct vertices $i \neq j$. Is it true that every regular tournament of order $4k+1$ that maximizes the total number of arborescences $\tau(T)$ among all regular tournaments of order $4k+1$ is nearly doubly regular?

Posed in arXiv:2610.25886, Conjecture 6.1 — Extremal arborescences in graph orientations

What is known

At order $n \equiv 3 \pmod 4$, arborescence maximizers among regular tournaments are known to be doubly regular tournaments. At order $n = 4k+1$, doubly regular tournaments cannot exist due to non-integrality of common outneighbor counts, and nearly doubly regular (NDR) tournaments are the nearest-integer analogue. The conjecture is verified computationally for orders 5, 9, 13, and 17.

In Lean: digraph_common_out_count (definition), digraph_out_count (definition), digraph_arborescence_count_at (definition), digraph_arborescence_count (definition), regular_tournament_arborescence_max_nearly_doubly_regular (statement), regular_tournament_five_nearly_doubly_regular (partial)

OP-416 Tightness of lower bound on metric distortion for rank score veto coresIn LeanSocial Choice Theory

Let C be a set of m ≥ 3 candidates and let s = (s_1, ..., s_m) ∈ ℚ^m be a non-increasing scoring vector with s_1 = 1 and s_j ≥ 0 for all j. For any preference profile of n voters with strict rankings over C, let q^s(c) = (∑_{j=1}^m N_{c,j} s_j) / (n ||s||_1), where N_{c,j} is the number of voters ranking candidate c in position j. Let the (p^unif, q^s)-veto core be the set of candidates admitting a fractional perfect matching in their domination graph with voter weights 1/n and candidate weights q^s(c). Is the worst-case metric distortion of the (p^unif, q^s)-veto core across all preference profiles and all consistent pseudometrics always equal to 1 + 2(||s||_1 - s_m) whenever s_m > 0?

Posed in arXiv:2610.26535, Section 5 — Regularizing the Veto Core

What is known

The paper proves that the worst-case distortion of the (p^unif, q^s)-veto core lies in [1 + 2(||s||_1 - s_m), 1 + 2||s||_1]. When s_m = 0, the bounds coincide; when s_m > 0, the authors conjecture the lower bound is the exact worst-case distortion.

In Lean: rank_score_veto_core_tightness_conjecture (statement)

OP-422 Binding number bound of 3 for K5-free graphsIn LeanGraph Theory & Graph Algorithms

Does every finite nonempty K_5-free simple graph G satisfy bind(G) <= 3, where bind(G) is the minimum of |N_G(S)| / |S| over all nonempty subsets S of V(G) whose neighborhood N_G(S) is not the entire vertex set?

Posed in arXiv:2610.28536, Sec. 1, paragraph before Thm 1.3 — A sharp bound on the binding number of $K_k$-free graphs and the Brandt conjecture

What is known

The authors confirm Brandt's conjecture for all clique orders k >= 6, showing bind(G) <= k-2. A 2009 paper showed that the bound fails for k=4 (where binding numbers can exceed 2.18), but for k=5 the bound k-2 = 3 remains unproven; existing methods give an upper bound strictly larger than 3.

In Lean: simple_graph_binding_number (definition), simple_graph_binding_number_le_three_of_clique_free_five (statement), simple_graph_binding_number_complete_four_partite (partial)

OP-437 Sufficiency of two straight-line cuts for three agents in the planeIn LeanFair Division

Let P ⊂ ℝ² be a finite set of m points in the plane, colored red and blue, such that the number of red points and the number of blue points are both multiples of 3. Do there always exist two straight lines in ℝ² and an allocation of the regions formed by the two lines among 3 agents (where points on lines may be assigned to either adjacent region) such that each agent receives exactly one-third of the red points and one-third of the blue points?

Posed in arXiv:2610.27956, Conjecture 2 — Splitting Planar Necklaces with Few Straight Cuts

In Lean: not_is_straight_line_cut_consistent_singleton_of_three_agents (partial), is_straight_line_cut_consistent_mono (partial), is_straight_line_cut_consistent_of_parallel_cuts (partial), planar_necklace_two_cuts_six_points (partial), planar_necklace_three_agents_cuts_ge_two (partial), planar_necklace_two_cuts_refutation_of_instance (partial)

OP-442 Achromatic number of cubic Paley graphsIn LeanGraph Theory & Graph Algorithms

Let $q$ be a prime power satisfying $q \equiv 1 \pmod 6$, and let $G_3(q)$ denote the cubic Paley graph, whose vertices are the elements of $\mathbb{F}_q$ and where two distinct vertices $x, y \in \mathbb{F}_q$ are adjacent if and only if $x - y \in (\mathbb{F}_q^\times)^3$. Is it true that for all sufficiently large $q$, the achromatic number of $G_3(q)$ equals $\frac{q+2}{3}$?

Posed in arXiv:2610.27510, after Theorem 1.4 — The achromatic number of Paley graphs, Peisert graphs, and related Cayley graphs

In Lean: simple_graph_coloring_is_achromatic (definition), simple_graph_achromatic_number (definition), cubic_paley_graph (definition), simple_graph_achromatic_number_le_max_degree_or_half (partial), cubic_paley_graph_achromatic_number_eventually_eq (statement), cubic_paley_graph_zmod_thirteen_achromatic_number (partial), cubic_paley_graph_zmod_nineteen_achromatic_number (partial), cubic_paley_graph_zmod_thirty_one_achromatic_number (partial)

OP-444 Exact minimum average order of connected induced subgraphs for graphs with a cut vertex but no cut edgeIn LeanGraph Theory & Graph Algorithms

For each integer $n \ge 7$, what is the exact minimum of $A(G)$ among all connected simple graphs $G$ of order $n$ with minimum degree $\delta(G) \ge 3$ that have a cut vertex but no cut edge, and which graphs attain this minimum?

Posed in arXiv:2610.27553, Sec. 5, open question — A proof of Vince's conjecture on the average order of connected induced subgraphs

What is known

Theorem 1.3(i) proves that A(G) >= n/2 + 7/78 for all such graphs, with equality attained only at n = 7 by G_c (two copies of K_4 identified at a vertex). For fixed n > 7, the exact minimum and the extremal graphs remain open.

In Lean: simple_graph_avg_connected_induced_order (definition), simple_graph_clique_four_glued_clique (definition), simple_graph_avg_connected_induced_order_clique_four_glued_clique (partial), simple_graph_avg_connected_induced_order_min_cut_vertex_no_bridge (statement)

OP-446 Partitionability of two-dimensional Cohen-Macaulay simplicial complexesIn LeanCombinatorics for TCS

Let $\Delta$ be a finite, pure 2-dimensional simplicial complex. If $\Delta$ is Cohen-Macaulay (over a field $k$, or over $\mathbb{Z}$), is $\Delta$ necessarily partitionable into boolean intervals $[\phi(\sigma), \sigma]$ indexed by its facets $\sigma$?

Posed in arXiv:2610.27083, Question 6.2 — Partitionability is NP-complete

What is known

A non-partitionable Cohen-Macaulay complex was constructed in dimension 3 with 42 tetrahedra (Duval et al. 2016), but no 2-dimensional counterexample is known, and many 2-dimensional CM complexes (such as triangulations of the dunce hat or real projective plane) are known to be partitionable.

In Lean: single_facet_is_partitionable (partial), tetrahedron_boundary_is_partitionable (partial), cohen_macaulay_two_complex_partitionable (statement)

OP-449 Improvement of the Leading Constant in Higher-Dimensional Distinct Subset Sum BoundsIn LeanCombinatorics for TCS

Fix an integer $k \ge 2$, and let $C_k = \sqrt{\frac{2k}{\pi}} \frac{(k+1)^{(k-1)/(2k)}}{\sqrt{\lfloor(k+1)^2/4\rfloor}}$. Does there exist a constant $C > C_k$ such that every admissible sequence $\Sigma = (a_1, \ldots, a_n)$ in $\mathbb{Z}_{\ge 0}^k$ with distinct subset sums satisfies $\max_{1 \le i \le n, 1 \le j \le k} (a_i)_j \ge (C - o(1)) \frac{2^{n/k}}{\sqrt{n}}$ as $n \to \infty$?

Posed in arXiv:2610.26970, Sec. 5, second paragraph — Gaussian Lower Bounds for Distinct Subset Sums in Higher Dimensions

What is known

Theorem 3.3 shows that C_k is optimal for the quadratic-form family C(A), but whether additional structural constraints on the empirical covariance matrix T of admissible sequences allow an improved uniform leading constant C > C_k remains unsettled.

In Lean: distinct_subset_sums_powers_of_two_upper_bound (partial), distinct_subset_sums_improved_leading_constant (statement), distinct_subset_sums_constant_one (partial)

OP-462 Minimum cardinality of a counterexample to Gale's conjecture in dimension 3In LeanCombinatorics for TCS

For any finite subset V ⊂ ℝ³ with |V| ≥ 2, let β₄(V) = min { max_{1 ≤ i ≤ 4} diam(V_i) / diam(V) : V₁ ∪ V₂ ∪ V₃ ∪ V₄ = V }. Gale's conjecture in ℝ³ asserted that β₄(V) ≤ sqrt((3+sqrt(3))/6) ≈ 0.888073 for all bounded subsets. What is the minimum positive integer m such that there exists a subset V ⊂ ℝ³ of cardinality m with β₄(V) > sqrt((3+sqrt(3))/6)? In particular, what is the exact minimum in the known range 5 ≤ m ≤ 101?

Posed in arXiv:2610.28828, Sec. 5, Question 2 — A counterexample to Gale's conjecture in $\mathbb{R}^3$

What is known

The paper establishes that m(3) ≤ 101 by constructing an explicit 101-point set, while m(3) ≥ 5 is trivial. The minimal number of points needed to refute Gale's conjecture in dimension 3 is unknown.

In Lean: op_462_not_is_gale_counterexample_three_of_card_le_four (partial), op_462_gale_counterexample_card_three_ge_five (partial), op_462_gale_counterexample_card_three_le_101 (partial), op_462_min_gale_counterexample_card_three_in_range (partial), op_462_min_gale_counterexample_card_three_lt_101 (partial), op_462_is_least_iff (partial), op_462_five_le_min_gale_counterexample_card_three (partial), op_462_min_card_le_of_integer_witness (partial), op_462_min_counterexample_card_three_in_range (partial), op_462_min_gale_counterexample_card_three_lt_sixty_five (statement), op_462_min_gale_counterexample_card_three_le_sixty_five (partial), op_462_min_gale_counterexample_card_three_range_sixty_five (partial)

OP-465 Validity of the polygon conjecture for standardized Laplacians of order 4In LeanGraph Theory & Graph Algorithms

Let $\mathcal{L}_4$ be the set of all real $4 \times 4$ matrices $\widetilde{L} = (\ell_{ij})_{i,j=1}^4$ such that $\sum_{j=1}^4 \ell_{ij} = 0$ for each $i \in \{1, 2, 3, 4\}$ and $-\frac{1}{4} \le \ell_{ij} \le 0$ for all $i \ne j$. Let $\Lambda_4 \subset \mathbb{C}$ be the set of all complex eigenvalues of matrices in $\mathcal{L}_4$. Let $S_4 \subset \mathbb{C}$ be the convex polygon with vertices $\lambda_k$ and $\bar{\lambda}_k$ for $0 \le k \le 3$, where $\lambda_k = \frac{1}{4} \sum_{m=1}^k (1 - (-i)^m)$ (with $i^2 = -1$). Is $\Lambda_4 = S_4$? Equivalently, is $\sup \{ |\operatorname{Im} \lambda| : \lambda \in \Lambda_4 \} = \frac{1}{4}$?

Posed in arXiv:2610.14100, Sec. 7.3, Question 1 — Digraph Laplacian spectra: The 2005 polygon conjecture fails for all orders above four

What is known

The 2005 polygon conjecture by Agaev and Chebotarev was proven for n <= 3 and disproven in this paper for all n >= 5. Order 4 is the unique remaining case.

In Lean: standardized_laplacian_order_four_zero_mem_spectrum (partial), zero_mem_standardized_laplacian_polygon_four (partial), real_eigenvalue_unit_interval_mem_standardized_laplacian_polygon_four (partial), op_465_standardized_laplacian_order_four_polygon_conjecture (statement), standardized_laplacian_order_four_mem_polygon_of_sector_and_im_bounds (partial)

OP-474 Monotonicity of Latin tableaux count under cell addition to a non-bottom rowIn LeanCombinatorics for TCS

Let $\lambda$ and $\mu$ be wide integer partitions of the same length $\ell(\lambda) = \ell(\mu)$. Suppose there exists an index $i \in \{1, \ldots, \ell(\lambda) - 1\}$ such that $\lambda_i = \mu_i + 1$ and $\lambda_j = \mu_j$ for all $j \neq i$ (that is, $\lambda$ is obtained from $\mu$ by adding a single box to a row other than the bottom row). Let $LT(\lambda)$ denote the number of Latin tableaux of shape $\lambda$ and type $\lambda'$. Is it always true that $LT(\lambda) \ge LT(\mu)$?

Posed in arXiv:2610.29291, Conjecture 6.1 — Counting and constructing Latin tableaux

In Lean: latin_tableaux_count_mono_cell_addition_non_bottom (statement), latin_tableaux_count_mono_cell_addition_top_row (partial), latin_tableaux_count_mono_three_two_one (partial)

OP-486 Maximum number of vertices of a polygon with semidefinite rank at most fourIn LeanInteger & Polyhedral Optimization

Let V₂(4) denote the maximum number of vertices of a convex polygon in the plane admitting a real positive semidefinite slack factorization of size at most 4. Is V₂(4) = 8? That is, can a convex polygon with real positive semidefinite rank at most 4 have more than 8 vertices (leaving 9, 10, 11, or 12 vertices to exclude)?

Posed in arXiv:2610.04498, Sec. 8, P3 — Rank-sensitive vertex bounds for semidefinite lifts

In Lean: polygon_psd_rank_four_attains_eight (partial), polygon_v2_four_eq_eight (statement), polygon_v2_four_ge_eight (partial), polygon_v2_four_eq_eight_iff_no_larger (partial)

OP-487 Semidefinite extension complexity of the five-dimensional permutahedronIn LeanInteger & Polyhedral Optimization

Let Π₅ ⊂ ℝ⁵ be the 4-dimensional permutahedron on 5 elements, defined as the convex hull of the 120 permutation vectors of (1, 2, 3, 4, 5). Does the positive semidefinite extension complexity satisfy xc_PSD(Π₅) ≥ 7? Equivalently, does the slack matrix of Π₅ admit no real positive semidefinite factorization of size 6?

Posed in arXiv:2610.04498, Sec. 8, after P5 — Rank-sensitive vertex bounds for semidefinite lifts

In Lean: permutahedron_five_xc_psd_ge_seven (statement), permutahedron_five_not_psd_factorization_six_of_rank_ge_seven (partial), permutahedron_five_xc_psd_ge_six (partial)

OP-491 Exact length threshold for q-ary codes with distances 2 and 4 for large alphabetsIn LeanInformation Theory & Coding

Let $q \ge 26$ be an integer, and let $\Sigma$ be an alphabet of cardinality $q$. For integers $n \ge 1$, let $A_q(n, \{2,4\})$ be the maximum cardinality of a subset $\mathcal{C} \subseteq \Sigma^n$ such that every two distinct codewords in $\mathcal{C}$ have Hamming distance in $\{2, 4\}$. Let $N_*(q)$ be the smallest integer such that $A_q(n, \{2,4\}) = 1 + \binom{n}{2}$ for all integers $n \ge N_*(q)$. It is known that $2q - 1 \le N_*(q) \le 2q + 1$. For each integer $q \ge 26$, which of the three integers $2q - 1$, $2q$, or $2q + 1$ is equal to $N_*(q)$?

Posed in arXiv:2610.30613, Remark 6.1 — Asymptotically Sharp Length Thresholds for \texorpdfstring{$q$}{q}-ary Codes with Distances \texorpdfstring{$2$}{2} and \texorpdfstring{$4$}{4}

What is known

The paper bounds the eventual length threshold N_*(q) between 2q - 1 and 2q + 1 for q >= 26, leaving open which of the three integers is the exact threshold.

In Lean: op_491_eventual_threshold_le_of_stabilizes (partial), op_491_threshold_gt_of_ne (partial), op_491_threshold_le_two_q_minus_one_of_stabilizes (partial), op_491_threshold_ge_two_q_of_ne (partial), op_491_threshold_ge_two_q_plus_one_of_ne (partial), op_491_threshold_in_three_candidates (statement)

OP-501 Characterization of Triples of Prefix Reversals Generating the Symmetric GroupIn LeanCombinatorics for TCS

Let $n \ge 3$ be an integer. For each integer $i$ with $2 \le i \le n$, let $r_i \in S_n$ denote the prefix reversal permutation defined by $r_i(j) = i + 1 - j$ for $1 \le j \le i$ and $r_i(j) = j$ for $i < j \le n$. Determine a complete characterization (necessary and sufficient conditions on the integer parameters $k, m, n$) of which triples of prefix reversals $(r_k, r_m, r_n)$ with $2 \le k < m < n$ generate the full symmetric group $S_n$.

Posed in arXiv:2610.30892, Abstract — On the generation of the symmetric group by index relations of three prefix reversals

In Lean: prefix_reversal_group_contains_alternating_of_primitive (partial)

OP-516 Validity of Derivative Conjecture for Dimension EightIn LeanFoundations of Cryptography

Let n = 8. Is every balanced Boolean function f : F₂⁸ → F₂ of algebraic degree at most 3 with a nonzero period (that is, there exists a non-zero vector a ∈ F₂⁸ such that f(x + a) = f(x) for all x ∈ F₂⁸) expressible as the directional derivative D_v g(x) = g(x) + g(x + v) of some bent function g : F₂⁸ → F₂ along some nonzero direction v ∈ F₂⁸?

Proposed here, building on arXiv:2610.32239, Thm 4.7 — A counterexample to Tokareva's conjecture on sums of two bent functions; the paper does not ask it

What is known

Tokareva (2016, Conjecture 4.5) conjectured that every balanced Boolean function on F₂ⁿ (n even) of degree at most n/2 - 1 with a nonzero period is a derivative of a bent function. Theorem 4.7 disproves this for all even n ≥ 10 by using Shaporenko's reduction to lift counterexamples from dimension n - 2. For n = 8, however, n - 2 = 6, and on F₂⁶ Tokareva's bent-sum conjecture holds, so Shaporenko's reduction cannot yield counterexamples in dimension 8. The validity of Conjecture 4.5 for balanced cubics on F₂⁸ remains open.

In Lean: boolean_derivative_dim_eight_has_period (partial), boolean_derivative_bent_dim_eight_is_balanced (partial), boolean_derivative_bent_dim_eight_degree_le (partial), boolean_derivative_conjecture_dim_eight (statement)

OP-517 Polynomial-time decidability of zero excess for wiring diagramsIn LeanNP-Completeness & Reductions

Can one decide in polynomial time whether a given pair of wiring diagrams of m pseudolines has braid-move excess 0, that is, whether their braid-move distance equals their Hamming distance |D| (the number of triples of wires whose orientations differ)?

Posed in arXiv:2610.03808, Sec. 9, open problem 1 — Computing distances in braid-move graphs, higher Bruhat orders, and oriented-matroid mutation graphs is NP-hard

What is known

The paper shows that deciding whether braid distance is at most K is NP-complete in general, but leaves open whether the special case of zero excess (where the braid distance equals the trivial Hamming lower bound |D|) is solvable in polynomial time.

In Lean: op_517_zero_excess_iff_exists_walk (partial), op_517_zero_excess_of_eq (partial), op_517_zero_excess_of_adj (partial), op_517_zero_excess_of_eq_pair (partial), op_517_zero_excess_of_le_two (partial), op_517_zero_excess_poly_time_decidable (statement)

OP-518 Isometry of the positive fibre for rank-3 chirotopesIn LeanCombinatorics for TCS

For all positive integers m and all signotopes s, v in the higher Bruhat order B(m, 2), is the mutation distance between their positive-fibre embeddings equal to their distance in B(m, 2), that is, does d_tilde(F_3(s), F_3(v)) = d_B(s, v)? Equivalently, can a shortest walk of chirotopes between two rank-3 chirotopes that are positive at infinity ever leave the positive fibre?

Posed in arXiv:2610.03808, Sec. 9, open problem 2 — Computing distances in braid-move graphs, higher Bruhat orders, and oriented-matroid mutation graphs is NP-hard

What is known

The author proves this equality for the specific gadget instances constructed in the paper (Theorem 7.2), but the question remains open for arbitrary pairs of signotopes.

In Lean: op_518_positive_fibre_isometry (statement), op_518_positive_fibre_adj_of_adj (partial)

OP-529 Circulant classification of sharp cyclic graph labelings at power-of-two ordersIn LeanCombinatorics for TCS

Let $N = 2^r$ for an integer $r \ge 1$, and let $G$ be a finite simple graph on $N$ vertices with at least one edge. A cyclic labeling $\pi : \mathbb{Z}_N \to V(G)$ is sharp if it achieves equality in the graph-energy lower bound for the Fourier ratio, $\operatorname{FR}(G, \pi) = \mathcal{E}(G)/\sqrt{2s}$ (where $s$ is the number of edges and $\mathcal{E}(G)$ is the graph energy), which is equivalent to the Fourier transform $\widehat{M}_\pi$ having at most one nonzero entry in each row and each column. For every power of two $N = 2^r$, must every simple graph admitting a sharp cyclic labeling be a circulant graph (that is, Cayley on $\mathbb{Z}_N$)? If not, what is the minimum power of two $N = 2^r$ admitting a non-circulant sharp graph?

Posed in arXiv:2610.31807, Question 12.1 — Additive energy and Fourier complexity of graphs

What is known

The paper proves that at odd prime-power orders every sharp graph is circulant, but leaves powers of two completely unclassified.

In Lean: not_all_sharp_cyclic_graphs_circulant_at_powers_of_two (negation), exists_non_circulant_sharp_cyclic_graph_order_eight (partial), sharp_cyclic_graph_circulant_order_four (partial), circulant_graph_admits_sharp_cyclic_labeling (partial), sharp_cyclic_graph_is_regular (partial)

OP-537 planar all powers well covered diameter le threeIn LeanGraph Theory & Graph Algorithms

For every finite connected simple planar graph G with at least two vertices, if every positive integer power G^d is well-covered (all maximal independent sets of G^d have the same cardinality), must diam(G) be at most 3? Equivalently, within connected planar graphs, is having every positive power well-covered equivalent to the conjunction diam(G) <= 3, G well-covered, and G^2 well-covered? The proposed upper bound is sharp: C_7 and the pentagonal prism have diameter 3 and all their powers are well-covered.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers studying uniform maximal distance packings and well-covered graph powers would gain a global metric obstruction for a fundamental graph class. The unrestricted diameter-3 assertion from Pham--Vu Question 3.9 was refuted in AFTD memory by C_21(1,7) and C_7 square K_3, both of diameter 4; experiment 6040 independently confirms that BOTH are nonplanar. The earlier proposed planar classification OP-161 was also refuted, already by C_4, so its very restrictive list must not be reused. The present question retains only the substantial metric claim and admits all planar diameter-2 well-covered graphs and the known diameter-3 examples. A positive answer would reduce the full power condition on planar graphs to an explicit diameter constraint and two well-coveredness checks. Neither the paper's chordal proof (a partition into simplices), its very well-covered proof (Favaron's perfect-matching conditions), nor its cochordal radius-2 proof applies to arbitrary planar graphs. The KB's ball obstruction and self-centeredness are necessary conditions only: planar self-centered graphs such as C_8 already have diameter 4, so a new argument connecting packing structure to planar minor exclusion is needed. Computation also rules out an over-strong shortcut: G and G^2 alone can both be well-covered on planar 9-vertex graphs of diameter 4 or 5 while G^3 fails. The hypothesis about every positive power is therefore substantive. It moves simple_graph_eccent_eq_diam_of_power_well_covered along neighbouring_graph_class: The recent paper classifies the chordal, very well-covered, and cochordal cases. Seek a sharp diameter theorem for the entire planar class, incorporating the existing refutation of the unrestricted diameter bound and the failure of the previously proposed planar dichotomy. This is a new restricted statement, not a re-pitch of either false statement.. Evidence: Experiment 6037 exhausts all connected graphs up to order 9 up to isomorphism, filters planarity and checks every nontrivial power: no planar all-power-well-covered graph has diameter above 3. Experiment 6038 exhausts all 9,808,209 connected minimum-degree-2 graphs of order 10 and, using necessary self-centeredness, checks all 43 possible diameter>=4 survivors: none is all-power well-covered (even without requiring planarity). It agrees with the independent NetworkX search through order 9. Experiment 6040 verifies that the known 21-vertex diameter-4 all-power counterexamples C_21(1,7) and C_7 square K_3 are nonplanar, and finds three planar 9-vertex counterexamples to the weaker two-power hypothesis. Experiment 6041 checks G,G^2,G^3 on every connected minimum-degree-2 graph of orders 9 and 10; its planar survivors again have diameter at most 3. These are finite evidence, not proofs of the conjecture.

In Lean: planar_all_powers_well_covered_diameter_le_three (statement), forall_power_well_covered_of_well_covered_diam_le_three (partial), cycle_seven_diam_eq_three (partial), cycle_seven_is_planar (partial), exists_planar_all_powers_well_covered_diam_eq_three (partial)

OP-538 triangle free all powers well covered diameter le threeIn LeanGraph Theory & Graph Algorithms

Does every finite connected triangle-free simple graph G with at least two vertices such that G^d is well-covered for every integer d >= 1 have diameter at most 3? Here G^d joins distinct vertices at G-distance at most d, and well-covered means that all inclusion-maximal independent sets have the same cardinality. The bound would be sharp, since C7 has diameter 3 and all its powers are well-covered.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks whether the failure of the paper's global diameter conjecture is genuinely driven by triangles. Researchers classifying graphs whose every distance-packing problem has equicardinal maximal solutions would obtain a structural boundary for an entire class for which even ordinary well-covered graphs lack a full characterization. The bipartite/very-well-covered classification does not apply to non-bipartite triangle-free graphs such as C7, and the chordal and cochordal arguments do not control arbitrary odd cycles and four-cycles together. The proved self-centeredness and ball-union obstruction only give local necessary conditions; the known diameter-four counterexample C7 square K3 (Cartesian product) has triangles. This is independent of the existing planar question: the two graph classes are incomparable. Exhaustive computation also rules out replacing the every-power hypothesis with only G and G^2: there are triangle-free examples of diameter four or five satisfying those two tests but failing G^3. It moves Pham and Vu, On graphs whose powers are well-covered, arXiv:2610.09300, Theorem 1.3 and the bipartite classification recalled before Theorem 1.2 along new_setting: Ask for a sharp diameter theorem in the whole triangle-free class, including non-bipartite and nonplanar graphs, after memory refuted the unrestricted diameter-three proposal using a graph containing triangles.. Evidence: Experiment 6148 exhausts all connected triangle-free graphs with minimum degree two for each order 4 through 12 (570405 graphs total); every graph whose powers are all well-covered has diameter at most three, including diameter-three examples at orders 7,10,11,12. It also finds explicit failures of the two-power recognition strengthening, beginning at order 9. Graphs with leaves are excluded legitimately by the proved no-leaf lemma except K2.

In Lean: triangle_free_all_powers_well_covered_diameter_le_three (statement), exists_triangle_free_all_powers_well_covered_diam_eq_three (partial), bipartite_all_powers_well_covered_diameter_le_two (partial)

OP-539 caterpillar third t chromatic specialization fiber le twoIn LeanGraph Theory & Graph Algorithms

For a finite tree T define P_3(T;q,t) = sum over proper colorings kappa:V(T)->{0,1,2} of q^(sum_v kappa(v)) t^(number of colors used). Is every fiber of P_3 on isomorphism classes of finite caterpillars of size at most two? Equivalently, for any three finite caterpillars T1,T2,T3 with P_3(T1)=P_3(T2)=P_3(T3) as polynomials in Z[q,t], must at least two of T1,T2,T3 be isomorphic? A caterpillar is a tree that becomes a path, a single vertex, or empty after deletion of all leaves.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The paper reconstructs elongated bistars and three-spine caterpillars from the third specialization, then exhibits two-member collisions and turns to injectivity of the fourth specialization. It does not quantify the information loss at the third specialization. A two-element fiber theorem would say that three colors already reconstruct an arbitrary caterpillar up to one binary choice, and would substantially sharpen what these coloring invariants retain even if the fourth-specialization conjecture remains open. Neither reconstruction algorithm handles arbitrary spines; the displayed collisions show precisely why simply extending injectivity is impossible. Fourth-specialization injectivity would not imply a two-element bound for third-specialization fibers. The computations find several qualitatively different pairs, including pairs with different spine lengths, but no triple collisions, so this is not just the classification of one displayed example. It moves Bingham, Celano, Commins, Orellana, Pan and Simone, Principal specializations of the t-chromatic symmetric function, arXiv:2610.31785, Sections 4-6 along quantitative: Replace the known failure of injectivity for the third specialization by a universal bound of two on its ambiguity for all caterpillars, with no bound on order or spine length.. Evidence: Experiment 6155 enumerates all caterpillar compositions up to reversal with at least two spine vertices for each order 9 through 25, including 2,098,175 at order 25. It filters with exact evaluations at q=2 and q=3 and the bipartition sizes, and verifies every resulting collision by exact integer polynomial dynamic programming. Every collision class has exactly two members; the 25-vertex layer has 23 such classes and no triples. Stars are individually identifiable from the t^2 coefficient's bipartition (1,n-1), so their omission from the composition enumeration cannot hide a triple. Experiment 6147 also shows that simply excluding degree-two spine vertices fails, matching the paper's four-spine collision at order 12.

In Lean: third_principal_specialization_card_eq (partial), caterpillar_third_t_chromatic_specialization_fiber_le_two (statement)

OP-540 petersen strip small boundary quadratic extremumIn LeanGraph Theory & Graph Algorithms

For each integer k>=8, let H_k be the infinite simple graph with vertices u_i,v_i for i in Z and edges u_i-u_(i+1), u_i-v_i, and v_i-v_(i+k). For a finite vertex set S, write partial(S) for the vertices outside S adjacent to at least one member of S. Is it true that every finite S with |partial(S)|<=2k+1 satisfies |S|<=floor(k^2/2)+1, and that for every k>=8 this bound is attained by some finite S? Thus the exact maximum cardinality of a finite set with boundary at most 2k+1 would be floor(k^2/2)+1 uniformly in k.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The paper's zero-forcing lower bounds turn on finding a cardinality for which every set has large external vertex boundary; they require a separate finite certificate calculation for each of k=3 and k=4. This question asks for the optimal uniform replacement in the large-step regime, rather than another fixed value of k or another finite circumference. Such a theorem would supply a structural lower-bound mechanism for the entire generalized Petersen family after the paper's empty-column reduction, as well as an exact isoperimetric result for its natural infinite model. The k=4 proof's 89 bounded-circumference boundary formulas do not yield an inequality in symbolic k, and the elementary strip-cut bound only controls unbounded sets, not the maximum size of finite sets below the cut threshold. The data changes regime: for k=2,3,4,5,6,7 the maxima at budget 2k+1 are 5,9,13,17,21,27; the clean quadratic formula starts at k=8. The existing literature's general question about zero-forcing stabilization does not state this optimal boundary-cardinality formula. It moves Krishnan, Ma and Zhang, Sharp zero forcing numbers for the generalized Petersen graphs P(n,3) and P(n,4), arXiv:2610.24059, Lemmas 2.1-2.2 and Propositions 4.1 and 5.1 along new_setting: Determine a sharp vertex-isoperimetric threshold for the infinite two-layer graph uniformly for every large inner step k, beyond the recent finite-circumference boundary checks for k=3 and k=4.. Evidence: Experiments 6160 and 6181 compute the exact maxima over arbitrary finite supports using a three-state frontier automaton, shortest boundary costs, and longest paths in an acyclic graph indexed by boundary budget. They give 33,41,51,61,73 for k=8,9,10,11,12 respectively, exactly floor(k^2/2)+1. Experiment 6190 extracts an attaining set for each of these k and independently verifies its cardinality and external boundary by direct adjacency; the witnesses use paired rectangular blocks of indices r*k+s plus one extra v-vertex. Experiment 6164 independently checks the automaton's boundary charging against direct neighborhoods on every seven-column subset for k=1..6 and 1000 random thirty-column subsets per k.

In Lean: petersen_strip_small_boundary_quadratic_extremum (statement), petersen_strip_small_boundary_attainment_eight (partial)

OP-541 three connected plane eulerian arborescence minimizers alternatingIn LeanGraph Theory & Graph Algorithms

Let G be a finite 3-vertex-connected simple plane graph all of whose vertex degrees are even, with a fixed plane embedding. Fix an alternating orientation D0 (incoming and outgoing arcs alternate in the cyclic order at every vertex), and let a_r(D) be the number of spanning arborescences directed towards a root r. For every Eulerian orientation D of G, does a_r(D)=a_r(D0) imply that D=D0 or D is obtained by reversing every arc of D0? Equivalently, are the only arborescence-minimizing Eulerian orientations of every such embedded graph its two alternating orientations?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The new theorem identifies the minimum value via alternating orientations but leaves open the structure of all minimizers. Uniqueness up to reversal would give a strong equality theorem for the whole 3-connected plane class and would identify the minimum-volume facets in the associated symmetric-edge-polytope interpretation. The connectivity condition addresses an actual obstruction: in the natural embedding of K2,4 all six Eulerian orientations have the same rooted count 2, but only two are alternating. The paper's forest expansion compares each nonnegative Pfaffian square using parity, proving a non-strict inequality. It gives no reason that a nonalternating orientation must make even one of these comparisons strict, which is the new issue; 3-connectivity is not used in the baseline. The computations include separating triangles and vertices of degree six and higher, so the proposed statement is not confined to the quartic ice model or to triangulations with no separating triangle. It moves Liu and Xu, Extremal arborescences in graph orientations, arXiv:2610.25886, Theorem 1.1 along converse: Characterize all equality cases of the recent alternating-orientation minimum theorem within 3-connected simple plane Eulerian graphs, rather than only exhibiting an orientation attaining the minimum.. Evidence: Experiment 6199 exhausts every 3-connected simple planar Eulerian graph through order ten, covering all even degree sequences by generating the entire allowable edge-count range. For every graph, exact enumeration of all Eulerian orientations up to global reversal and Bareiss Laplacian cofactors finds exactly one minimizer up to reversal, and it is alternating. Experiment 6201 confirms the same for bipyramids over C6,C8,C10 and for twelve octahedral face-gluing examples of orders 9,12,15; each 15-vertex example has over 160,000 orientations up to reversal. Experiment 6191 supplies the K2,4 control with three distinct minimizers up to reversal and checks the cuboctahedron.

In Lean: three_connected_plane_eulerian_arborescence_minimizers_alternating (statement)

OP-542 weighted dominating occupancy star envelopeIn LeanGraph Theory & Graph Algorithms

For every finite simple graph G with n >= 2 vertices and no isolated vertex and every real lambda > 0, put Z_G(lambda) = sum_{S dominating G} lambda^{|S|} and rho_G(lambda) = (sum_{S dominating G} |S| lambda^{|S|})/(n Z_G(lambda)). Is rho_G(lambda) <= sup_{k >= 1} [lambda(1+lambda)^k + k lambda^2(1+lambda)^{k-1} + k lambda^k]/[(k+1)(lambda(1+lambda)^k + lambda^k)]? The expression on the right is exactly the largest normalized lambda-biased mean among all stars K_{1,k}; equivalently, do stars determine the sharp universal occupancy envelope for dominating sets at every positive activity?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for a weighted extension of a sharp extremal theorem that took a full paper to prove. It would give graph domination researchers the first candidate universal activity-dependent mean-size bound and identify a sequence of extremal changes with activity. The uniform proof compares unweighted counts of critical vertices and uses modifications changing set size; those comparisons do not preserve lambda weights. Merely substituting lambda into its final 2/3 bound fails, and even restricting the answer to K2 and P3 fails (larger stars win at larger lambda). The paper's own questions concern minimum degree, modes, and domination number, rather than this weighted envelope. Searches of AFTD memory and the literature found no prior version of this question. It moves Beaton--Cameron, A tight upper bound on the average order of dominating sets of a graph, J. Graph Theory 107 (2024), Theorem 2.9 in arXiv:2208.10475v2: rho_G(1) <= 2/3, with equality exactly for star-like graphs. along new_setting: Replace uniform sampling by activity lambda, and identify the entire sharp extremal curve rather than one activity value. For lambda > 1 the extremizing star size changes and becomes unbounded as lambda grows.. Evidence: Experiment 6254 checked all 1,043 isolate-free atlas graphs through order 7 at 14 activities and every tree through order 13. Experiment 6256 additionally checked every connected graph of orders 8 (11,117) and 9 (261,080), and all 78,849 trees of orders 14--17, at 13 activities from 1/4 to 100: no violation. The winning star has k=1 for lambda<1 in the tested values, k=2 at lambda=2, k=3 at 5, k=4 at 10, k=5 at 20, and k=11 at 100. These are computational observations, not proved results.

In Lean: star_occupancy_one_at_one (partial), star_occupancy_two_at_one (partial), weighted_dominating_occupancy_star_envelope (statement)

OP-543 leap group universal quadratic word diameterIn LeanGraph Theory & Graph Algorithms

Is there an absolute constant C > 0 such that, for every connected finite simple undirected graph G on n >= 2 vertices admitting a hop, every element of its leap group Lambda(G) is a product of at most C n^2 hops? A hop is a permutation h of V(G) satisfying {v,h(v)} in E(G) for every vertex v; in particular, no vertex may remain fixed during a hop. Lambda(G) is the subgroup generated by all such hops, and the empty word is allowed for the identity. Equivalently, is the diameter of Cay(Lambda(G), Hop(G)) universally O(n^2)?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The leap-group paper answers which permutations are possible, whereas a universal quadratic word bound would control how long a realizable simultaneous motion takes. This would be a general structural theorem about its new generating sets. Neither an arbitrary subgroup of S_n nor an arbitrary generating set has a quadratic diameter bound. Yu--Rus cannot be invoked directly: their construction isolates and rotates one cycle while leaving vertices elsewhere fixed, which is forbidden here; a local cycle need not extend to a spanning hop. Allowing all vertices to wait also changes the reachable group and destroys the bipartite and parity restrictions visible in leap groups. The question is absent from the paper's list of inverse, product, counting, categorical, and random-graph questions. Searches in memory and the literature found no hop-word diameter result. It moves Schachner--Udell, arXiv:2610.18463, define leap groups and determine algebraic structure in several families, without quantitative word bounds. Yu--Rus, Pebble Motion on Graphs with Rotations, arXiv:1205.5263 / WAFR 2014, prove O(n^2) diameter for the different model generated by local rotations that can fix all pebbles outside the chosen cycles. along new_setting: Ask for a uniform short-word theorem when every generator must move every vertex, connecting the new leap group with the older rotation-routing diameter theorem.. Evidence: Experiment 6261 enumerates the Cayley graph exactly by breadth-first search for every connected atlas graph through order 7 with at most n+2 edges. The maximum diameters at orders 3,4,5,6,7 are 1,2,8,10,15. Exact searches for two triangles joined by a path give diameters 10,12,16,20,24 at orders 6--10 (including all 3,628,800 elements at order 10). Chorded odd cycles give diameter 26 at order 9. Thus very sparse graphs already have substantial word length even when their leap group is S_n; all tested cases are compatible with a quadratic bound. This is finite evidence, not a proof or a claimed lower-bound theorem.

In Lean: simple_graph_two_le_card_of_connected_hop (partial), op_543_completeGraph_three_hop_word_length_le_one (partial), op_543_leap_group_universal_quadratic_word_diameter (statement)

OP-544 dominating average star like vertex stabilityIn LeanGraph Theory & Graph Algorithms

For a finite simple graph G on n >= 2 vertices with no isolated vertex, let avd(G) be the average cardinality of all dominating sets. Call a graph star-like if every vertex is either a leaf or has exactly one or two leaf neighbours; the empty graph is allowed as star-like. Define d_*(G) = min{|X| : X is a subset of V(G) and the induced graph G-X is star-like}. Is the sharp structural stability inequality 5 d_*(G) <= 51(2n/3 - avd(G)) true for every such G? In particular, does a mean within epsilon n of the extremal value force an induced star-like graph on at least (1 - 51 epsilon/5)n vertices?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Extremal domination researchers know precisely which graphs attain 2n/3, but the equality theorem does not say whether nearly attaining graphs are structurally close to that class. This question would supply linear vertex stability and recover both parts of the original theorem as immediate consequences. The substance is the structural control for all graphs, not an improvement of a previously known constant. The published proof uses strictness of aggregate critical-vertex comparisons; it neither constructs a large induced star-like subgraph nor relates the number of vertices requiring deletion to its numerical slack. The coefficient is forced by P5 in the computation: avd(P5)=55/17, deficit 5/51, and deleting one endpoint leaves P4, which is star-like. Neither the paper's open questions nor AFTD memory contained this stability question. It moves Beaton--Cameron, arXiv:2208.10475v2 Theorem 2.9 (Journal of Graph Theory 107, 2024), prove avd(G) <= 2n/3 and characterize equality exactly by star-like graphs. along stronger_result: Upgrade an exact equality characterization to a uniform quantitative statement controlling vertex deletion distance from the extremal class by the mean-size deficit.. Evidence: Experiment 6255 exactly computes both the mean deficit and minimum induced star-like deletion distance for all 1,043 isolate-free atlas graphs through order 7 and every tree of orders 8--12; a proposed coefficient 9 fails and the maximum ratio d_*/deficit is 51/5. Experiment 6267 checks every connected graph of orders 8 and 9, and all trees of orders 13--16, with exact rational deficits and exhaustive deletion search whenever the trivial n-2 distance bound is insufficient. It finds no violation and again many exact ratios 51/5. Experiment 6267 corrects the tree-label indexing error in superseded experiment 6262. All equality and nonviolation claims here are computational evidence only.

In Lean: dominating_average_star_like_vertex_stability_of_star_like (partial), dominating_average_star_like_vertex_stability_of_card_two (partial), dominating_average_star_like_vertex_stability (statement), dominating_average_stability_path_five_decidable (definition), dominating_average_stability_path_five_mean (partial), dominating_average_stability_path_five_not_star (partial), dominating_average_stability_path_five_delete_endpoint (partial), dominating_average_stability_path_five_deletion (partial), dominating_average_stability_path_five_no_isolated (partial), dominating_average_stability_constant_lower_bound (partial)

OP-545 even tournament arborescence maximizers near regularIn LeanGraph Theory & Graph Algorithms

For every integer m >= 2, let T be a tournament on 2m vertices maximizing tau(T), the total number of spanning arborescences directed toward a root, summed over all 2m possible roots, among every tournament of that order. Must every vertex of T have outdegree m-1 or m? Equivalently, is every even-order total-arborescence maximizer near-regular, with exactly m vertices of each of those two degrees?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This is an infinite-family structural classification directly adjacent to a recent main theorem. It would reduce the unrestricted even-order extremal problem to near-regular tournaments, just as the new odd-order theorem reduces its problem to regular tournaments. This conclusion is absent from both the source's theorem and its open-questions section. The odd-order proof does not simply carry over: Lemma 4.2 derives a minimum-degree bound from an odd-order swirl comparison, and the final two-arc balancing lemma (4.6) assumes n=2d+1 and a degree triple d+1,d,d-1 that becomes d,d,d. At even order the target has two degree levels, and the relevant Schur-complement diagonal triples differ. Also, total rooted counts are no longer a multiple of one common rooted count. Literature, memory, KB, and the existing open-problem list searches found no statement of this even-order classification. It moves Liu--Xu, Extremal arborescences in graph orientations, arXiv:2610.25886, Theorem 1.2, prove that every odd-order tournament maximizing the total arborescence count is regular. Their Section 4 proof is stated only for odd order. along boundary: Determine the degree sequence forced by arborescence maximization at every even order, where regularity is impossible and Eulerian methods do not apply.. Evidence: Experiment 6271 exhausts every tournament up to isomorphism of orders 4--10, including all 9,733,056 tournaments at order 10. The even-order maximum tau values at n=4,6,8,10 are respectively 10,333,23363,2869025, and every maximizing class is near-regular. The respective best non-near-regular values are strictly smaller: 9,309,22442,2782085. Determinants were evaluated in batches and all maximizing witnesses and the listed best non-near-regular witnesses were checked by exact integer Laplacian cofactors. Odd-order controls recover regular maximizers. This is computational evidence, not a theorem.

In Lean: even_tournament_arborescence_maximizer_is_near_regular (statement), tournament_four_arborescence_maximizer_is_near_regular (partial), tournament_near_regular_card_degrees (partial), tournament_near_regular_of_card_degrees (partial)

OP-546 balanced multipartite asymptotic cospectrality rank bridgeIn LeanGraph Theory & Graph Algorithms

Fix an integer r >= 4. Let T_{r,n}=K_{n,...,n} have r independent parts of size n. For simple graphs G,H of order rn, let d_2^2(G,H)=sum_{i=1}^{rn}(lambda_i(G)-lambda_i(H))^2, where adjacency eigenvalues are sorted in nonincreasing order. Define c_r(n)=min{d_2^2(T_{r,n},H): H is any simple graph on rn vertices not isomorphic to T_{r,n}}. Is lim_{n -> infinity} c_r(n) = 2((r-2)/(r-1))^2 for every fixed r >= 4? The proposed asymptotic competitor is H_{r,n}=((n-1)K_1) join (K_1 disjoint-union K_{n,...,n}), where the last complete multipartite graph has r-1 parts of size n; its adjacency rank is r+1. The minimum in c_r(n) is over all graphs, including graphs of larger rank and disconnected graphs.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Spectral graph researchers studying cospectrality need to know whether a complete multipartite graph's nearest spectra are governed by a single exceptional vertex or by genuinely more complicated high-rank competitors. An exact limit over all graphs would turn the recent counterexample mechanism into a general asymptotic extremal theorem. The difficult new direction is a uniform lower bound against arbitrary competitors; evaluating the proposed graph's quotient matrix gives no such bound. The candidate is deliberately asymptotic: the numerical full census at r=4,n=2 finds a rank-six graph beating the rank-five construction, so an exact-minimizer claim at every n would already fail in the data. Neither the paper's stated questions nor prior AFTD candidates ask this general-r unrestricted limit. It moves Jovanovic--Sedlar--Skrekovski, arXiv:2610.18636, show that a rank-four graph H_{3,n} beats the conjectured complete-tripartite nearest competitor to K_{n,n,n}; its squared spectral distance tends to 1/2. Their paper obtains upper bounds on the unrestricted nearest distance and an asymptotic classification restricted to complete multipartite competitors, not a matching unrestricted lower bound. along new_setting: Test whether the next-rank construction identifies the exact asymptotic unrestricted nearest spectral distance for every balanced multipartite rank r>=4, rather than merely furnishing one closer competitor at rank three.. Evidence: Experiment 6265 enumerates every one- and two-exceptional-vertex bulk-part neighbourhood pattern for r=3,...,7 at n=4,20,10000. At large n its best competitors are H_{r,n}, with squared distances approaching 8/9,9/8,32/25,25/18 for r=4,5,6,7. Experiment 6273 adds complete numerical graph censuses at (r,n)=(3,2),(4,2),(3,3), and exhausts all 98,304, 786,432, and 6,291,456 three-exceptional-vertex patterns at r=4,5,6 and n=1000. No such pattern beats the single-exceptional-vertex competitor there. The full order-eight census finds a rank-six small-order exception, which is why the pitch asks for a limit. All spectral searches are numerical evidence, not certified lower bounds.

In Lean: balanced_complete_multipartite_graph (definition), simple_graph_adj_eigenvalues_sorted (definition), balanced_multipartite_nearest_spectral_distance (definition), balanced_multipartite_nearest_spectral_distance_limit (statement)

OP-557 Central extensions of dihedral groups of odd square-free orders are DCI-groupsIn LeanGraph Theory & Graph Algorithms

Let $m > 1$ be an odd square-free integer. Let $\widehat{D}_{4m}$ be the group of order $4m$ with presentation $\langle a, b \mid a^m = 1, b^4 = 1, b^{-1}ab = a^{-1} \rangle$, which is a central extension of the dihedral group $D_{2m}$ by a central subgroup of order 2 generated by $b^2$. Is $\widehat{D}_{4m}$ a DCI-group for every odd square-free integer $m$?

Posed in arXiv:2610.33692, Conjecture 2 — On the isomorphism problem of Cayley digraphs

In Lean: group_is_dci (definition), dihedral_central_extension_odd_squarefree_is_dci (statement)

OP-561 Tight EF1 approximation factor for online fair division with four agentsIn LeanFair Division

In the model of online fair division of indivisible goods among $n = 4$ agents with additive valuations and exact frequency predictions against an adaptive adversary, what is the supremum of approximation ratios $\alpha \in [0, 1]$ such that there exists a deterministic online algorithm guaranteeing an $\alpha$-EF1 allocation (that is, an allocation where for all distinct agents $i, j$, $v_i(A_i) \ge \alpha \cdot \max_{g \in A_j} v_i(A_j \setminus \{g\})$ whenever $A_j \ne \emptyset$)? In particular, can the lower bound $(3 - \sqrt{5})/2 \approx 0.382$ be improved?

Posed in arXiv:2610.34625, Sec. 5, after Theorem 5.3 — Online Fair Division with Frequency Predictions

What is known

The paper develops an adaptive potential-based algorithm achieving an approximation ratio of (3 - sqrt(5))/2 for four agents, but leaves open whether this factor is tight or whether a higher ratio (up to 1) can be guaranteed.

In Lean: op561_has_online_algorithm_mono (partial), online_ef1_approximation_ratio_nonneg (partial), op561_exists_online_algorithm_gt_sqrt5 (statement)

OP-562 Exact error threshold for consistent EEFX under overestimates for three or more agentsIn LeanFair Division

In online fair division of indivisible goods among $n \ge 3$ agents with additive valuations and noisy frequency predictions, let the predicted values be overestimates with a common error factor $\rho \ge 1$ (meaning $a_{ir} \le \widehat{a}_{ir} \le \rho a_{ir}$ for every agent $i$ and sorted rank $r$). A consistent online algorithm must return an EEFX allocation whenever the predictions are exact ($\rho = 1$). What is the exact supremum $\rho^*(n)$ of error factors $\rho$ such that there exists a consistent online algorithm guaranteeing an $\alpha$-EEFX allocation for some $\alpha > 0$? Known bounds establish $(2n-2)/(2n-3) \le \rho^*(n) \le 3/2$.

Posed in arXiv:2610.34625, Sec. 7, paragraph 2 — Online Fair Division with Frequency Predictions

What is known

For overestimates with error factor \rho, the paper proves that consistent algorithms guarantee a positive approximation of EEFX for \rho < (2n-2)/(2n-3) (e.g. \rho < 4/3 for n=3), while no consistent algorithm can guarantee any positive approximation for \rho >= 3/2. It leaves open the exact threshold between (2n-2)/(2n-3) and 3/2 for n >= 3.

In Lean: op562_critical_threshold_separates (statement), op562_consistent_eefx_of_lt_lower_bound (partial), op562_not_consistent_eefx_of_ge_three_halves (partial), op562_two_agents_threshold_eq_two (partial)

OP-582 Solvability of Five Sages in a Row with Three Symbols and Unlabeled SeatsIn LeanCombinatorial Games

In the anonymous-slip puzzle for S = 5 sages seated in a row without seat labels (the 5R3E puzzle), each sage sees their adjacent neighbor(s) (an interior sage sees their left and right neighbors, while an end sage sees their single neighbor and knows which end they occupy). The sages agree in advance on a deterministic protocol assigning a symbol from an alphabet of size n = 3 to each local view. Each sage writes their symbol, and the slips are mixed so that only the multiset of five symbols is publicly revealed. A protocol succeeds if every sage, combining their local view with the public multiset, can uniquely determine the seating of all five sages. Does there exist a successful deterministic protocol for 5R3E, or is the minimum number of symbols r_E(5) equal to 4?

Posed in arXiv:2610.33032, Question 12 — Sages and Their Anonymous Slips

In Lean: row_sages_5R3E_solvable (statement), row_solvable_mono (partial), row_sages_5R3E_implies_5R4E (partial)

OP-584 Monotonicity of Anonymous-Slip Solvability with Respect to Sages CountIn LeanCombinatorial Games

For a fixed alphabet size n, if the anonymous-slip puzzle is solvable for S sages (in any of the four models: row or circle, unlabeled or labeled seats), is it necessarily solvable for S - 1 sages (or all S' <= S)? Equivalently, are the minimum required symbol functions r_E(S), r_L(S), c_E(S), and c_L(S) non-decreasing in S?

Posed in arXiv:2610.33032, Question 14 — Sages and Their Anonymous Slips

In Lean: sages_monotone_row_unlabeled_step (statement)

OP-593 cycle proportional choice number eq threeIn LeanGraph Theory & Graph Algorithms

Is the proportional choice number of C_n exactly 3 for every integer n >= 3? Precisely: for every finite color palette and every assignment L of exactly three distinct colors to each vertex of the simple n-cycle, is there a proper coloring f with f(v) in L(v) such that, for each color c, its number of uses is either floor(eta_L(c)/3) or ceil(eta_L(c)/3), where eta_L(c) is the number of lists containing c?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This would determine the exact proportional choice number of an infinite connected graph family, and would also settle the paper's path conjecture by subgraph monotonicity. The question concerns cycles themselves; it is not a re-pitch of the listed question about paths. The paper states only the upper bound 4 for cycles and does not pose their exact value. Its matching-reduction proof selects half of a 2t-list and therefore yields four colors from a proportionally 2-choosable remainder; it has no three-list rounding step, and on a cycle both the closing edge and all color multiplicities must be respected. Neither equitable 3-choosability nor ordinary 3-choosability controls the lower and upper multiplicity quotas. Searches of the corpus, prior candidates, memory, Mathlib combinatorics, and the literature found no statement settling this cycle family. Evidence: Experiment 7132 found a proportional coloring for every three-list assignment from a four-color palette on each C_n, 3<=n<=11, exhaustively modulo color permutation (175275 classes at n=11). It also found no counterexample in 3200 random assignments using palettes of 5,6,8,12 colors on cycles of orders 6,8,10,12,16,20,24,30. This is finite evidence only and does not cover all palettes.

In Lean: cycle_proportional_choice_number_eq_three (statement), cycle_not_proportionally_two_choosable (partial), cycle_three_proportionally_three_choosable (partial)

OP-594 unicyclic spectral sustainability maximum degreeIn LeanGraph Theory & Graph Algorithms

For every integer n >= 9, is the maximum possible degree among spectrally sustainable connected simple unicyclic graphs of order n equal to ceil(n/2)? Here G is spectrally sustainable if for every edge e of G there exists a non-edge f of the original G such that G-e+f is connected and its adjacency spectral radius is at least that of G. Equivalently, does every such sustainable G satisfy Delta(G)<=ceil(n/2), with the bound attained by the graph obtained from C_4 by attaching floor((n-4)/2) pendant leaves to one vertex and ceil((n-4)/2) pendant leaves to the opposite vertex?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for an exact extremal value for all orders in the first cyclic class beyond the paper's trees, measuring how one independent cycle affects local spectral robustness. It is not any of the paper's stated questions about tree-shift connectivity, asymptotic counting, or rooted attachments. The tree argument uses the two components created by deleting each edge and reductions within those components; deleting a cycle edge of a unicyclic graph leaves it connected, and a degree-two generalized tree shift need not preserve a simple unicyclic graph. Those steps do not transfer. The numerical search initially suggested a uniform half-order bound but found sustainable exceptions at orders 4 and 8, which is why the conjecture starts at n=9. Neither the tree theorem nor classical global spectral maximizers give this edgewise extremal statement. Evidence: Experiment 7129 classified sustainability numerically for every unicyclic graph through order 11. Experiment 7131 enumerated all unicyclic isomorphism types at orders 12--16 (311465 at order 16), finding no sustainable graph above ceil(n/2); the closest negative witness margin at order 16 was below -0.000417, well separated from floating-point tolerance. The proposed C4-with-balanced-opposite-leaves equality family was numerically sustainable at every order 9--80. Spectral comparisons are exploratory, not certified proofs.

In Lean: unicyclic_spectral_sustainability_maximum_degree (statement)

OP-595 sparse strong odd five list coloringIn LeanGraph Theory & Graph Algorithms

Does every finite simple graph G with maximum average degree mad(G) < 7/3 admit a strong odd coloring from every assignment L of five distinct allowed colors to each vertex? Here mad(G)=max_{nonempty H subseteq G} 2|E(H)|/|V(H)|. The requested coloring f must satisfy f(v) in L(v), f(u)!=f(v) on every edge, and for every vertex v and every color c the number of neighbors of v colored c must be either zero or odd. The lists may use any finite palette and need not be equal.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks whether a sharp new sparsity threshold is also the sharp threshold for list coloring, a standard and consequential distinction in coloring theory. It is not the paper's stated problem of determining ordinary thresholds m_c. A positive answer would extend the entire theorem to independently constrained local palettes, while a negative answer would separate the two parity-coloring notions inside a very sparse graph class. The ordinary reducibility proof does not carry over: for example Lemma 3.2 colors both ends of a deleted closed thread with the color beta of a retained neighbor, with no guarantee beta lies in either deleted vertex's list. The subsequent thread and discharging arguments rely on such palette-wide extensions. Square-list coloring does not supply a constant bound here because the squares of stars have unbounded clique number. Searches of memory, the candidate list, Mathlib combinatorics, and current literature found no list version settling this question. Evidence: Experiment 7147 found no obstruction in 600 five-list instances on stars, trees, sufficiently subdivided dense graphs and long theta graphs, using palettes of 6,7,9,12 colors. Experiment 7149 used adversarial counterexample-guided synthesis and completely ruled out every five-list assignment from a six-color palette on a 13-vertex graph formed by subdividing one edge of the sharp Q5 obstruction and adding six pendant leaves; its maximum average degree is 16/7. Larger adversarial searches found no obstruction but ended UNKNOWN or at their time limit, not with a complete certificate. The same experiment correctly found the common-five-list Q5 control infeasible and its common-six-list control feasible.

In Lean: strong_odd_five_coloring_of_list_colorable (partial), sparse_strong_odd_five_list_coloring (statement)

OP-596 chordal maxcut optimal strong equilibrium existsIn LeanEquilibria in Games

For every finite simple chordal graph G and every integer k >= 3, does the unweighted Max-k-Cut game on G admit a welfare-maximizing coloring that is a strong equilibrium? Chordal means G has no induced cycle of length at least four. Each vertex chooses one of k colors and receives utility equal to the number of differently colored neighbors. Welfare is the sum of these utilities. A strong equilibrium permits no nonempty coalition to change its members' colors, keeping all other colors fixed, so that every coalition member strictly gains utility. The quantifier is existence of at least one stable optimum, not stability of every optimum.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The freshly completed pinned-twins refutation in memory (experiment/attempt 7115 and the proved negation node) shows that even existence of an optimal strong equilibrium fails for general graphs. Chordal graphs are a natural structural boundary: they retain the proved complete-graph case and proper-coloring case but allow arbitrarily large overlapping cliques and unbounded degree. A positive answer would restore welfare-optimal coalitional stability on a substantial graph class, rather than on a finite size range or at a higher color count. Carosi et al. show that every optimum resists clique coalitions, but a connected coalition in a chordal graph need not itself be a clique. The complete-graph proof balances one global collection of color-class sizes; overlapping maximal cliques share players, so its independent balancing steps are incompatible without a new selection principle. The degree bound does not cover this class. This is not any of the source paper's own questions for unrestricted graphs. Memory, prior-pitch, Mathlib and primary-literature checks found no chordal theorem settling it. Evidence: Experiment 7155 tested 400 graph/color-count cases on random chordal and split graphs of orders 16,24,36,52 for k=3 and k=4. It certified a globally optimal coloring and exhaustively ruled out every profitable coalition in 278 cases; 122 optimization runs timed out and are unresolved, not positive evidence. No completed case produced an unstable optimum. Experiment 7159 adversarially synthesized split-graph obstructions with clique sizes six and seven, unique optimal clique partition, unique initial best responses for independent vertices, and at most 60 independent vertices: all 1455 searched deviation patterns were infeasible within that restricted model. Experiment 7143 supplies small exact controls and samples through order 11.

In Lean: maxcut_optimal_no_clique_deviation (partial), chordal_maxcut_optimal_strong_equilibrium_exists (statement), chordal_maxcut_optimal_strong_equilibrium_of_card_le (partial), chordal_maxcut_optimal_strong_equilibrium_of_max_degree_le (partial)

OP-597 even odd cycle strong product equivalence cover eq fiveIn LeanCombinatorics for TCS

For every even integer m >= 6 and odd integer n >= 5, is the equivalence covering number of the strong product C_m boxtimes C_n exactly 5? Its vertices are pairs (i,j) in Z/mZ times Z/nZ. Distinct vertices (i,j),(i',j') are adjacent exactly when i'-i belongs to {0,1,-1} modulo m and j'-j belongs to {0,1,-1} modulo n. An equivalence subgraph is a spanning disjoint union of cliques, and the covering number is the minimum number of these subgraphs whose edge sets together cover every edge of the product graph.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The KB's recent exact covers of one-dimensional cycle powers suggest asking how periodic obstructions interact in two dimensions. For this two-parameter family the basic bounds are 4 and 5: the four diagonal neighbors at a vertex force four layers, and classical five-colorings of the square-cell intersection graph give a five-layer cover. The upper bound is already known by that construction and is not the requested novelty. Both-even periods admit four layers. Both-odd periods have an elementary matching-parity obstruction because the total number of vertices is odd. Mixed parity is the substantive unresolved case: the total order is even, and the diagonal graph is bipartite and admits a four-edge-coloring, so those lower-bound arguments no longer exclude four equivalence layers. A cover may use arbitrary two- and three-vertex cliques, so non-four-colorability of the square-cell intersection graph alone is insufficient. Settling the mixed family would characterize the exact compatibility condition for minimum equality-relation representations of cyclic king grids. Searches of KB, memory, prior candidates, Mathlib combinatorics and primary literature found no product-cover theorem settling this case. Evidence: Experiment 7148 enumerated every possible clique and found exact 4/5-layer values on 15 small tori, with independently checked cover witnesses. Experiment 7153 reproduced the key mixed-parity four-layer impossibilities using a separate Boolean edge-transitivity model, avoiding clique enumeration. Experiment 7162 extended that second model to 74 side pairs with 5<=m<=12 and m<=n<=14, plus long width-five strips to length 30 and width-six strips to length 25: 14 both-even cases had four-layer covers and all 60 cases with at least one odd side were infeasible in four layers, with no UNKNOWN outcomes. These are finite solver observations, not a proof of the conjecture.

In Lean: even_odd_cycle_strong_product_equivalence_cover_eq_five (statement), cycle_strong_product_not_has_equivalence_cover_three (partial)

OP-599 connected induced activity clique minimumIn LeanGraph Theory & Graph Algorithms

For every finite connected simple graph G on n>=4 vertices with minimum degree at least three and every real lambda>=1, is the lambda-weighted mean order of a nonempty connected induced vertex set at least that of K_n? Precisely, put Z_G(lambda)=sum over nonempty S subset V(G) with G[S] connected of lambda^|S|. Is lambda Z'_G(lambda)/Z_G(lambda) >= n lambda (1+lambda)^(n-1)/((1+lambda)^n-1) always true, with equality if and only if G is complete?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for an activity-uniform extremal theorem, relating the newly resolved Vince conjecture to connectivity under independent vertex retention. In reliability terms it says that R_G(p)/(1-(1-p)^n) is increasing for p>=1/2. The proof in the recent paper counts equally weighted rooted connected sets and uses the unweighted potential F=2S-nN; its equal-weight cancellation and comparisons do not supply a derivative inequality at arbitrary p. General node reliability is nonmonotone, so ordinary monotonic-event inequalities do not apply. Brown's constructions of multiple decreasing intervals do not establish or refute this high-retention, minimum-degree-three assertion. This is not one of Chen and Ma's Section 5 open questions, which concern fixed minimum degree or cut-vertex extremizers. Evidence: Experiment 7583 exhaustively checked all 87,004 connected graphs of minimum degree at least three on 4 through 9 vertices. In every case all coefficients of Q_G(1+x) were nonnegative, where Q_G(lambda)=((1+lambda)^n-1)Z'_G(lambda)-n(1+lambda)^(n-1)Z_G(lambda), certifying the inequality for every real lambda>=1 on these instances. Experiment 7581 also checked 210 random connected regular graphs through order 14 at seven exact rational activities; stronger reflection and stochastic-order assertions failed and were discarded.

In Lean: op_599_connected_induced_activity_clique_minimum (statement), op_599_complete_graph_equality (partial)

OP-600 two type goods simultaneous efx mms paretoIn LeanFair Division

For every n>=3 agents, two positive integers a,b, and positive real per-item values (p_i,q_i) for each agent i, does an allocation of a indistinguishable type-A goods and b indistinguishable type-B goods exist that is simultaneously EFX, exact maximin-share fair, and Pareto optimal? Precisely, choose nonnegative integer counts x_i,y_i summing to a,b. Require p_i x_i+q_i y_i>=mu_i for every i, where mu_i=max over all nonnegative integer count partitions (u_j,v_j) of (a,b) of min_j(p_i u_j+q_i v_j); require p_i x_i+q_i y_i>=p_i x_j+q_i y_j-p_i whenever x_j>0 and >=p_i x_j+q_i y_j-q_i whenever y_j>0; and require that no other complete integer allocation weakly increases every agent's own utility and strictly increases one.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This would make the two-item-type domain simultaneously compatible with the central envy-based and share-based fairness notions and efficiency. The existing EFX+PO algorithm orders relative valuations and uses proper/split allocations; its EFX invariant does not enforce the integer maximin-share thresholds. The MMS construction instead uses per-agent feasible lattice regions and unimodular decompositions without preserving the pairwise EFX inequalities. The gap is real: even for three identical agents valuing the types at (4,1), with counts (3,6), the complete allocation ((2,0),(1,1),(0,5)) is computationally verified EFX and PO but gives utilities (8,5,5) below MMS six for two agents. Thus the new question does not follow just by applying either guarantee, nor from Pareto improvement of an arbitrary EFX allocation. Neither paper explicitly poses this simultaneous question; the October paper explicitly notes the difference between the EFX and MMS geometric methods. Evidence: Experiment 7584 enumerated every count allocation in 3,430 random positive-integer profiles for 3--5 agents and type multiplicities at most six; every profile had a joint EFX+MMS+PO allocation. Experiment 7604 completed 29,029 systematic profiles for three/four agents using all multisets of primitive valuation ratios from {1,2,3,4}^2 (counts up to eight/six respectively), covering 32,325,293 count allocations, with no failure, and then completed 1,081 random five-agent profiles; a subsequent six-agent phase timed out and is not counted. Experiment 7596 independently exhausts the 280 allocations of the displayed EFX+PO-but-not-MMS example.

In Lean: two_type_identical_valuations_all_allocations_pareto_optimal (partial), two_type_goods_simultaneous_efx_mms_pareto (statement)

OP-601 four cycle graph code asymptotic density oneIn LeanCombinatorics for TCS

For each n>=4, let d_C4(n) be the maximum of |C|/2^(n choose 2) over families C of labelled simple graphs on [n] such that the symmetric difference of any two distinct members is not exactly a four-cycle together with isolated vertices. Does lim as n tends to infinity of n d_C4(n) equal one? Equivalently, for every real epsilon>0, does every sufficiently large integer n admit such a family with at least (1-epsilon) 2^(n choose 2)/n members? The family need not be linear under symmetric difference.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks whether the dyadic loss in the existing constructions is an artifact of linear codes or reflects a persistent arithmetic oscillation in the unrestricted extremal density. An affirmative answer gives the sharp leading asymptotic at every order for the smallest complete bipartite difference with both sides even; a negative answer identifies a genuine obstruction absent from the current Theta theorem. It needs a family of constructions, not one better finite code or a numerical constant optimization. The field-product argument uses a syndrome alphabet of power-of-two size and cannot just be rounded to arbitrary n. Nonlinear codes are a credible missing ingredient: exact optimization at n=5 found a density 3/16 code, whereas two-bit parity checks are impossible and the largest binary linear density is 1/8. This particular asymptotic statement is not posed in Bshouty's paper or in Alon's concluding open questions. Evidence: Experiment 7589 exactly computes d_C4(4)=1/4 and d_C4(5)=3/16, and finds a verified density-3/16 code at n=6 (optimality unresolved there: component independent-set bounds 96..113 out of 512). Its exhaustive signed-matrix spectrum computation gives Hoffman upper bounds 1/8 at n=7 and 8, attained by the verified three-bit constructions of 7586. Experiment 7606 independently constructs all 192 members of the n=5 nonlinear family, checks every forbidden difference, and validates field-product constructions for every q=2^r from 4 through 256. Experiment 7586 distinguishes certified UNSAT two-bit labelings at n=5,6 from larger solver timeouts.

In Lean: k22_code_card_le (partial), k22_code_max_density_le (partial), four_cycle_graph_code_asymptotic_density_eventually_le (partial), four_cycle_graph_code_density_tendsto_one_along_powers_of_two (partial), four_cycle_graph_code_asymptotic_density_one (statement)

OP-602 subcubic short thread arrows grundy four value boundIn LeanCombinatorial Games

Does every finite tree T of maximum degree at most three, whose every initial Game-of-Arrows piece has every thread of length at most three, have initial Sprague-Grundy value at most three? The Game of Arrows starts with every edge unmarked; a move orients one unmarked edge without creating a vertex whose incident edges are all marked and all directed inwards or all outwards, and normal play applies. Initial pieces are obtained by deleting pendant edges, splitting each vertex adjacent to a deleted pendant edge into separate free ends, and discarding isolated vertices. A thread is a maximal path in a piece with all internal vertices of degree two. The bound would be sharp: the thread-three regime contains subcubic examples of value three.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for the full bounded-value behavior on an infinite structural class, rather than another counterexample to the parity rule. A positive answer would identify a sharp transition from the two-value spectrum at thread length two to a four-value spectrum at length three, while showing that long threads are necessary for richer nim behavior in subcubic trees. The existing parity induction cannot simply be repeated: it relies on the absence of adjacent degree-two interior vertices, and after a branch is partly resolved the surviving runs may be much longer than one original thread. The paper's Question 11.4 is about parity with internal threads at most two and leaf threads at most three, a different restriction; its unbounded-value conjecture is for unrestricted trees. Neither is this proposed uniform bound. The initial submission was not scored because the definition was cited by its module name IsPieceThread; this revision uses the verified node name is_piece_thread. Evidence: Experiment 7602 exactly evaluated every subcubic initial piece with 4--16 vertices and thread lengths at most three (2,295 nonisomorphic pieces); only values 0,1,3 occurred, with the first value-three piece at 16 vertices. It also reproduced five published spider values, including an unrestricted value-four spider. Experiment 7625 checked the forest solver against an independent raw edge-state recursion on all 93 trees with 3--9 vertices, then tested 306 larger random subdivisions of subcubic branch skeletons on 6,8,10,12 vertices; again no value above three occurred. Disjunctive gluing with a free one-edge piece supplies value two without needing longer threads.

In Lean: subcubic_short_thread_arrows_grundy_four_value_bound_negation (negation)

OP-605 Smallest open case of nearly diagonal book Ramsey numbers R(B_63, B_64)In LeanCombinatorics for TCS

Does there exist a simple graph on 254 vertices that contains no book graph $B_{63}$ and whose complement contains no book graph $B_{64}$, thereby proving $R(B_{63}, B_{64}) = 255$?

Posed in arXiv:2610.36522, Appendix A — Constructions for Nearly Diagonal Book Ramsey Numbers

In Lean: cycle_graph_six_book_ramsey_witness (partial), book_ramsey_b1_b2_graph_exists (partial), op_605_ramsey_b63_b64_graph_exists (statement)

OP-610 Subsequence sums of extremal zero-sum free sequences cover all nonzero elementsIn LeanCombinatorics for TCS

Let $G = C_n^r = (\mathbb{Z}/n\mathbb{Z})^r$ for positive integers $n, r \ge 1$. Let $\mathsf{s}(G)$ denote the Erdős–Ginzburg–Ziv constant of $G$, and let $S$ be a sequence over $G$ of length $\mathsf{s}(G) - 1$ containing no zero-sum subsequence of length $n$. Let $\Sigma_n(S) = \{\sum_{x \in U} x : U \subseteq S, |U| = n\} \subseteq G$ denote the set of sums of all length-$n$ subsequences of $S$. Is it true that $\Sigma_n(S) = G \setminus \{0\}$, i.e., that the $n$-term subsequence sums of every extremal zero-sum free sequence over $G$ cover all $|G|-1$ nonzero elements?

Posed in arXiv:2610.35819, Conjecture 8.1 — The Erd\H{o}s--Ginzburg--Ziv constant of $C_n^r$ for even $n$: rigid sequences, products, and growth beyond Harborth's bound

In Lean: conjecture_subsequence_sums_cover_all_nonzero (statement), conjecture_subsequence_sums_cover_n_two (partial)

OP-611 Harborth bound equality for rank-three abelian groups of even non-power-of-two exponentIn LeanCombinatorics for TCS

Let $n \ge 6$ be an even integer that is not a power of 2, and let $C_n^3 = (\mathbb{Z}/n\mathbb{Z})^3$. Does the Erdős–Ginzburg–Ziv constant of $C_n^3$ satisfy Harborth's bound with equality, that is, $\mathsf{s}(C_n^3) = 8(n-1) + 1$? In particular, is $\mathsf{s}(C_6^3) = 41$?

Posed in arXiv:2610.35819, Sec. 10, remark (2) — The Erd\H{o}s--Ginzburg--Ziv constant of $C_n^r$ for even $n$: rigid sequences, products, and growth beyond Harborth's bound

In Lean: harborth_bound_equality_rank_three (statement), harborth_bound_equality_rank_three_implies_six (partial)

OP-613 Randomized competitive ratio of generalized k-server as a function of metric space sizeIn LeanOnline Algorithms

In the generalized $k$-server problem on uniform metrics with unit distances, each server $i \in \{1,\dots,k\}$ resides in its own uniform metric space $M_i$ of cardinality $m \ge 2$, where all distinct points in $M_i$ are at distance $1$. A request is a tuple $r = (r_1, \dots, r_k) \in M_1 \times \dots \times M_k$, and is served once some server $i$ occupies $r_i$. What is the optimal randomized competitive ratio against an oblivious adversary as a function of $k$ and $m$? In particular, when $m = 2$ (every server moves in a 2-point space), is the randomized competitive ratio $\Theta(k)$, or does it grow as $\omega(k)$?

Posed in arXiv:2610.37192, Sec. 6, paragraph 2 — Tight Bounds for Randomized Generalized $k$-Server on Uniform Metrics

In Lean: gen_k_server_uniform_two_points_ratio_theta_k (statement), gen_k_server_uniform_log_competitive (partial), gen_k_server_uniform_one_server_competitive_one (partial)

OP-614 Optimal deterministic competitive ratio for generalized k-server on uniform metricsIn LeanOnline Algorithms

In the deterministic generalized $k$-server problem on uniform metric spaces with unit distances, an online algorithm must maintain a configuration $x \in M_1 \times \dots \times M_k$ and move to a configuration that serves each request $r = (r_1,\dots,r_k)$ (i.e. with $x_i = r_i$ for some $i$). The known lower bound on the competitive ratio is $2^k - 1$ and the best known upper bound is $O(k 2^k)$. Is the optimal deterministic competitive ratio on uniform metrics $\Theta(2^k)$, or is the additional factor of $k$ necessary?

Posed in arXiv:2610.37192, Sec. 6, paragraph 3 — Tight Bounds for Randomized Generalized $k$-Server on Uniform Metrics

In Lean: uniform_kserver_det_k_one_competitive (partial), uniform_kserver_det_lower_bound_two_pow_k_sub_one (partial), uniform_kserver_det_ratio_theta_two_pow_k (statement)

OP-619 Sharp Strong Connectivity Threshold for Unilateral 2-Linkage in Co-Bipartite DigraphsIn LeanGraph Theory & Graph Algorithms

Let $D = (V, A)$ be a 5-strong co-bipartite digraph, that is, $V$ is partitioned into two sets $V_1, V_2$ such that each induced subdigraph $D[V_1]$ and $D[V_2]$ is semicomplete, and for every subset $S \subset V$ with $|S| \le 4$, $D - S$ is strongly connected. Is $D$ necessarily unilaterally 2-linked, meaning that for every choice of four distinct vertices $s_1, t_1, s_2, t_2 \in V$, there exist vertex-disjoint directed paths $P_1, P_2$ in $D$ such that $P_1$ connects $\{s_1, t_1\}$ (in either direction) and $P_2$ connects $\{s_2, t_2\}$ (in either direction)?

Posed in arXiv:2610.36895, Sec. 6, Problem 6.1 (also Abstract) — The unilateral 2-linkage problem

In Lean: digraph_five_strong_co_bipartite_unilaterally_two_linked (statement)

OP-620 Unilateral 2-Linkage in 4-Strong Semicomplete Multipartite Digraphs on at Least 9 VerticesIn LeanGraph Theory & Graph Algorithms

Let $D$ be a 4-strong semicomplete multipartite digraph on $n \ge 9$ vertices. Is $D$ necessarily unilaterally 2-linked?

Posed in arXiv:2610.36895, Sec. 5, Problem 5.1 — The unilateral 2-linkage problem

In Lean: digraph_exists_four_strong_semicomplete_multipartite_not_unilaterally_two_linked_eight (partial), digraph_four_strong_semicomplete_multipartite_adjacent_pair_linked (partial), digraph_four_strong_tournament_unilaterally_two_linked (partial), op_620_four_strong_semicomplete_multipartite_unilaterally_two_linked (statement)

OP-621 2-Linkage of 5-Strong Semicomplete Multipartite DigraphsIn LeanGraph Theory & Graph Algorithms

Let $D$ be a 5-strong semicomplete multipartite digraph. Is $D$ necessarily 2-linked, meaning that for every choice of four distinct vertices $s_1, t_1, s_2, t_2 \in V(D)$, there exist vertex-disjoint directed paths $P_1$ from $s_1$ to $t_1$ and $P_2$ from $s_2$ to $t_2$ in $D$?

Posed in arXiv:2610.36895, Sec. 5, Problem 5.2 — The unilateral 2-linkage problem

In Lean: digraph_unilaterally_two_linked_of_two_linked (partial), digraph_five_strong_semicomplete_multipartite_two_linked (statement)

OP-628 Diameter Bound for Amply Regular Graphs with Intersection Parameter mu Greater Than 2In LeanGraph Theory & Graph Algorithms

Let $G$ be an amply regular graph with parameters $(v, k, \lambda, \mu)$, where $k$ is the degree, $\lambda$ is the number of common neighbors of any two adjacent vertices, and $\mu$ is the number of common neighbors of any two vertices at distance 2. If $\mu > 2$, is the diameter of $G$ at most $2k/(\lambda + 2)$?

Posed in arXiv:2610.36620, Conjecture 3.7 — Diameter Bounds and Finiteness of Graphs from Local Intersection Data

In Lean: amply_regular_diameter_bound_conjecture (statement), amply_regular_diameter_bound_qpk (partial)

OP-636 NP-completeness of Petersen coloring of cubic graphsIn LeanNP-Completeness & Reductions

Let $P_{10}$ be the Petersen graph. The Petersen coloring problem ($P_{10}$-coloring) asks, given a connected cubic graph $G$, whether $G$ admits a Petersen coloring, meaning a mapping $f: E(G) \to E(P_{10})$ such that for every vertex $v \in V(G)$ there exists a vertex $x \in V(P_{10})$ with $f(\partial_G(v)) = \partial_{P_{10}}(x)$. Is the decision problem $P_{10}$-coloring NP-complete?

Posed in arXiv:2610.35794, Sec. 4 — Computational complexity of the $H$-coloring problem in cubic graphs

In Lean: op_636_petersen_coloring_np_complete (statement)

OP-637 Exact exponential algorithm for cubic H-coloring in O*(2^n) timeIn LeanAlgorithm Design & Analysis

Let $H$ be a fixed simple connected cubic graph. Does there exist an exact algorithm that decides whether an arbitrary input connected cubic graph $G$ on $n$ vertices admits an $H$-coloring in time $O^*(2^n)$ (that is, $2^n \cdot \mathrm{poly}(n)$ operations)?

Posed in arXiv:2610.35794, Conjecture 5 — Computational complexity of the $H$-coloring problem in cubic graphs

In Lean: h_coloring_cubic_language (definition), cubic_h_coloring_exact_two_pow_n_algorithm (statement)

OP-639 Exact Maximum Size of an Intersecting 4-Uniform Hypergraph with Covering Number 4In LeanCombinatorics for TCS

Let $m(4)$ denote the maximum number of edges in an intersecting 4-uniform hypergraph $\mathcal{F}$ on a finite vertex set with covering number $\tau(\mathcal{F}) = 4$. It is known that $42 \le m(4) \le 64$. What is the exact value of $m(4)$; in particular, is $m(4) = 42$?

Posed in arXiv:2610.37315, Sec. 1, after Claim 1.2 — The maximum size of intersecting $k$-graphs with covering number $k$

In Lean: op_639_exists_intersecting_four_uniform_covering_four_card_ge_forty_two (partial), op_639_intersecting_four_uniform_covering_four_card_le_forty_two (statement), op_639_intersecting_four_uniform_covering_four_card_le_two_hundred_fifty_six (partial)

OP-641 Edge Geodesic Transversal Number of Corona Product with K_1In LeanGraph Theory & Graph Algorithms

Let G be a connected simple graph on n ≥ 2 vertices, and let G ⊙ K_1 be the corona product of G with K_1 (the graph obtained by attaching a pendant leaf to every vertex of G). Is the edge geodesic transversal number gt_e(G ⊙ K_1) equal to n - 1 for all connected graphs G on n vertices?

Proposed here, building on arXiv:2610.36821, Section 5 — The Edge Geodesic Transversal Problem; the paper does not ask it

What is known

Section 5 explicitly suggests investigating the edge geodesic transversal problem in graph products including corona products. In G ⊙ K_1, all maximal geodesics are paths between distinct pendant leaves, having length dist_G(u, v) + 2. Selecting any n - 1 of the n pendant edges hits all such paths, so gt_e(G ⊙ K_1) ≤ n - 1. The paper leaves open whether edges within G can ever be exploited to achieve a transversal of size strictly smaller than n - 1.

In Lean: corona_k1_maximal_geodesic_endpoints (partial), corona_k1_exists_edge_geodesic_transversal (partial), edge_geodesic_transversal_number_corona_k1_le (partial), edge_geodesic_transversal_number_corona_k1_card_two (partial), edge_geodesic_transversal_number_corona_k1 (statement)

OP-648 three connected degree list kempe quadratic diameterIn LeanGraph Theory & Graph Algorithms

For every integer Delta>=3, does there exist a constant C_Delta>0 such that the following holds? For every finite simple 3-vertex-connected graph G with n>=5 vertices and maximum degree at most Delta, excluding complete graphs and the triangular prism, every finite color palette and tight degree-list assignment L satisfying |L(v)|=d_G(v) at each vertex, and every two proper L-colorings alpha,beta, can alpha be transformed into beta by at most C_Delta*n^2 L-valid Kempe changes? One change swaps two distinct colors on exactly one whole connected component of their induced bichromatic subgraph, and every intermediate coloring must respect the same lists.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The question asks whether the latest qualitative degree-list theorem has short reconfiguration certificates throughout every bounded-degree class. This is a quantitative theorem about an infinite graph/list family, relevant to reconfiguration algorithms and the geometry of constrained coloring spaces. Neither baseline supplies it: ordinary-color proofs rely on unrestricted recoloring in a common palette, while the list version with linear diameter relies on a spare color at almost every vertex. In tight lists, the spare-color step can fail at every vertex. Wang's proof uses equivalence inside reduced-list subproblems and induced-subgraph lifting without bounding the repeated repairs; mere connectivity gives only an exponential counting bound. The constant may depend on Delta, so the question does not silently strengthen the known ordinary-color theorem in its dependence on the degree. This differs from dropped OP-646, which lacked a structural characterization target: here the graph class is already fixed and the numerical bound is precise. Evidence: Experiment 8080 constructs every proper list coloring and every valid single-component Kempe swap, and computes graph diameter by BFS from every state. It exhausts all 625 five-color-palette assignment classes modulo color names on noncomplete 3-connected five-vertex graphs, and all 222 four-color-palette classes on eligible six-vertex graphs of maximum degree four. It additionally completes 2481 random tight-degree instances on 6-12 vertices, using palettes up to maximum degree plus one and cubic palettes up to five. All 3328 completed graphs are connected; maximal observed diameters at orders 5,6,7,8,9,10,12 are 6,7,8,10,10,11,13. Ninety-two larger-state instances are explicitly skipped, not counted as verified.

In Lean: op_648_degree_list_kempe_quadratic_diameter (statement)

OP-650 quadripartite minimum coloring max wild eq two n add oneIn LeanGraph Theory & Graph Algorithms

For every integer n>=4, let G=K_{n,n,n,n}, and let gamma range over all proper edge colorings using exactly 3n colors (equivalently, over all 1-factorizations of G). For a coloring gamma, define wld_gamma(G) as the least size of W subset E(G) such that (V(G), W union gamma^{-1}(c)) is connected for every color c. Is max_gamma wld_gamma(G)=2n+1 for every n>=4? The generic matching-component lower bound is 2n, so the proposed upper bound would also restrict each individual coloring to wild number 2n or 2n+1.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for an exact extremal function across every optimal schedule on an infinite graph family, closing a linear gap and describing precisely how much coloring dependence can appear beyond the complete/bipartite cases. The direction arose because computations refuted the initially expected coloring-independent value 2n: at n=4,5 a structured factorization has a larger value, and at n=6 both values occur in separately verified factorizations. The bipartite star proof breaks because a quadripartite star costs 3n edges. The complete-graph proof uses adjacency of every pair of singleton wild components, whereas up to n singleton components can lie in an independent part here; the remaining color matchings can close unions of several blocks, so preventing isolated triples is insufficient. Neither source paper asks the multipartite extremal question. Memory and current literature searches found no answer for this graph family. Evidence: Experiment 8107 exhausts all possible minimum-size wild-forest component partitions, proving computational infeasibility of 2n edges for the round-robin factorizations at n=4,5, and reconstructs a 9-edge upper witness at n=4. Experiment 8123 independently reproduces those exclusions with closed-component pruning, finds a verified 12-edge wild set for a structured n=6 coloring, and exhaustively excludes 12 edges for two cycle-switched n=6 colorings and 16 edges for a cycle-switched n=8 coloring. Experiment 8126 reconstructs exactly the same seven factorizations and independently checks explicit 2n+1-edge wild sets for all of them. Thus the sampled values 9,11,13,17 are exact for the indicated n=4,5,6,8 examples, while another n=6 coloring has value 12. Experiment 8109 additionally finds and validates 44 upper-bound witnesses at part sizes through ten; its 11 larger unresolved searches are not counted as evidence of the universal bound. The n=8 structured lower-bound search in 8123 was UNKNOWN, not infeasible.

In Lean: quadripartite_minimum_coloring_wild_number_ge_two_n (partial), quadripartite_minimum_coloring_max_wild_number_eq (statement)

OP-651 cyclic cubic phase min t count eq two n add fiveIn LeanQuantum Computation

For every integer n>=6, let f_n(x)=sum_{j in Z/nZ} x_j*x_(j+1)*x_(j+2) over F_2, and let s_n(A)=1 exactly when A is one of the n cyclic consecutive triples {j,j+1,j+2}, with s_n(A)=0 otherwise. Is the minimum cardinality of a finite set S of distinct nonempty subsets of Z/nZ satisfying sum_{y in S} 1[A subseteq y] = s_n(A) modulo 2 for every nonempty A with |A|<=3 exactly 2*n+5? Equivalently, does the cyclic consecutive-triple phase gate U_n|x>=(-1)^(f_n(x))|x> have Hadamard-free {CNOT,T} T-count exactly 2*n+5, with diagonal Clifford gates free, for every n>=6?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for an exact resource formula for an infinite translation-invariant family of local cubic phase gates, and for an intrinsic periodic-boundary penalty of four T gates relative to the proved line optimum. It would supply a structured family where the powerful isotropy bound has a provable fixed positive gap at every size, rather than only an isolated six-qubit failure. The line induction cannot be applied: its two designated terminal supports and moment invariant describe an open boundary, while the two wrap triples couple that boundary to the first two variables. Independently compiling the two added CCZs gives only the crude upper bound 2n+15 and says nothing about a new lower obstruction. Radical rank remains zero on both families, so it cannot explain the proposed four-gate gap. The numerical slice-rank/MacWilliams relaxation also remains feasible well below the proposed optimum. Searches of KB, memory, existing OPs, candidate history, the paper, its companion code and the literature did not reveal this all-n formula. The excluded n=5 genuinely has count 11 rather than 15. Evidence: Experiment 8144 mirrors the proved KB line seed and boundary extension as a computational starting point, toggles the two wrapping CCZ residues, and searches zero-moment affine-four-flat moves. It finds cardinality exactly 2n+5 at EVERY n=6..60 (55 distinct sizes), independently checking all order-one/two/three moments of each returned set. Earlier independent searches 8133 and 8138 found this size throughout n=6..20 and reproduced the exceptional weight 11 at n=5; 8132 also independently used the CP-SAT moment model. Experiment 8140 reproduces INFEASIBLE for weight<=16 at n=6, hence the published exact value 17 with a witness; its subsequent n=7 search hits a memory limit and establishes nothing there. Experiment 8142 enumerates exact slice-rank spectra for n=6..13 and tests the existing code-distribution LP with all-ones extension: numerically it is feasible already at 2n+2 for n=6..11, and at 2n+1 for n=12,13, so this relaxation does not give the conjectured lower bound. Earlier larger-size heuristic failures in 8138 and 8143 were search failures, not counterexamples; the improved initialization in 8144 resolves all those upper-bound gaps. Beyond n=6, these computations establish only upper-bound witnesses; the universal lower bound 2n+5 remains the main research obstacle.

In Lean: cyclic_cubic_phase_min_t_count_eq_two_n_add_five (statement), cyclic_cubic_t_count_six (partial), cyclic_cubic_t_count_five (partial), cyclic_cubic_t_count_isotropy_lower_bound (partial)

OP-652 coprime divisor progression half degree matching packingIn LeanGraph Theory & Graph Algorithms

Let n>=2, let D(n) be its positive divisors, put N=|D(n)|, and let P={a+bt:0<=t<N} for integers a and b>0. Form the balanced bipartite graph B with parts D(n) and P, where d is adjacent to x exactly when gcd(d,x)=1. Assume that B has a perfect matching (equivalently, for every prime p dividing n, at most N/(nu_p(n)+1) elements of P are divisible by p). If delta is the minimum degree of B, must B contain at least ceil(delta/2) pairwise edge-disjoint perfect matchings?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for a sharp robust form of a newly solved arithmetic matching criterion: how many complete coprime assignments can be made without ever reusing a divisor/term pair? It would give a packing theorem for an infinite family of arithmetic bipartite graphs, rather than a finite matching example. The baseline's nonzero Vandermonde determinant certifies a single matching; after deleting a matching its nonzero pattern is no longer a coprimality matrix, so repeating that proof does not establish packing. The tempting delta-matchings statement is false (experiment 8388); the surviving half-degree statement is asymptotically sharp in the tested squarefree families, with (delta,maximum packing)=(3,2),(7,4),(15,8),(31,16). Neither the paper's stated results nor the existing OP/candidate lists ask this packing question. Searches of memory and Mathlib found no such result. Evidence: Exact integral max-flow tests found no failure of ceil(delta/2)-factor existence in 5,709 mixed prime/exponent/progression cases and all 6,480 qualifying progression residue cases modulo 30 for n=2^a 3^b 5^c, 1<=a,b,c<=3. Four squarefree families attain ceil(delta/2), while the stronger delta-factor claim already fails at n=50.

In Lean: op_652_half_degree_packing_negation (negation), op_652_half_degree_packing_of_min_degree_le_two (partial), op_652_half_degree_packing_of_prime (partial)

OP-653 symmetric hunger tile convex iff ultrametric transitionIn LeanCombinatorial Games

For every n>=3 and every symmetric rational row-stochastic n-by-n matrix P with P_ij>0 whenever i!=j, let F(h)=h+P_i-e_i, where i is the least index maximizing h_i, and let B={h in R^n: sum_i h_i=0 and F^n(h)=h}. Is the closure of B in the zero-sum hyperplane convex if and only if P_ij <= max(P_ik,P_jk) for every triple of pairwise distinct indices i,j,k? Thus the proposed characterization says that, among the three off-diagonal transition weights on any triple, the largest occurs at least twice.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The recent tiling theorem leaves the geometry of its fundamental tile unresolved: a finite union of convex firing cells can be nonconvex, even for a symmetric chain. This question would classify convex recurrent tiles in every dimension by an explicit local condition on the transition matrix, linking a new greedy dynamical tiling to hierarchical ultrametric weights. The paper's quota-return proof establishes uniqueness of a representative in each lattice coset, not closure under convex combinations, and gives no such matrix criterion. Exact computations first refuted convexity for arbitrary symmetric chains, then isolated this iff pattern; it is not a small-order claim. Literature, OP/candidate, memory and Mathlib searches found no existing convexity/ultrametric statement. Evidence: All 512 three-state positive integer off-diagonal weight triples in {1,...,8} satisfy the iff when tested by exact rational firing-cell polygon areas (92 convex, 420 nonconvex). Exhaustive four-state cell constructions for all 624 connected profiles with weights in {0,1,2} also agree (59 convex, 565 nonconvex), as do nine hierarchical and nine generic five-state positive profiles. The latter comparisons use numerical convex hull volumes against the exact lattice determinant; the three-state tests use exact fractions.

In Lean: symmetric_hunger_tile_convex_iff_ultrametric_transition (statement), symmetric_hunger_tile_convex_iff_ultrametric_transition_three (partial), symmetric_hunger_tile_convex_of_uniform_weights (partial)

OP-656 binary singleton scc ambiguity sharp envelope and extremizersIn LeanAutomata & Formal Languages

For every n>=3, is the following sharp bound and equality characterization true? Every trim epsilon-free NFA over the fixed alphabet {a,b}, with n states, exactly one initial state and one distinct accepting state, singleton strongly connected components, and finite degree of ambiguity, has at most (n+2)*2^(n-3) accepting runs on every word. Equality in its degree of ambiguity occurs only for the following automaton, up to state isomorphism and interchange of a,b: its states admit an order q_1<...<q_n, q_1 is initial, q_n is accepting, each forward pair q_i,q_j with i<j has both an a-transition and a b-transition, and the only self-loops are the a-loop at q_1 and the b-loop at q_n. This automaton is predicted to attain the bound on a^(n-1)b^(n-1).

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This would give an exact extremal function and all extremizers for an infinite natural automata class, while sharply distinguishing a fixed binary alphabet from the recent five-letter Pell-growth construction: the proposed binary exponential base is two with a precise linear prefactor. The paper's alphabet-insensitive Catalan-style upper bound does not yield it, and merging its five letters introduces forbidden IDA patterns, so its lower construction does not transfer. The older binary chain result does not cover dense forward-transition automata. The data changed the initial question: the unary ceiling 2^(n-2) already fails on three states, whereas exhaustive searches discover 5,12,28 and only the two alphabet-swapped extremizers. Searches of memory, the OP/candidate lists, Mathlib and the older primary literature did not reveal this bound or characterization. This is distinct from OP-148's unrestricted-alphabet asymptotic-base problem. Evidence: Complete count-vector orbit enumeration of every eligible binary upper-triangular model gives exact maxima 2,5,12,28 for n=2,3,4,5. At n=5, 44,691,280 finite trim transition pairs were checked after lossless one-letter finiteness pruning; only the two alphabet-swapped complete-forward models attained 28. Searches of another 14,328 finite mutations at n=6..12 found no bound violation or unresolved count-vector cap. Explicit counts and finite-ambiguity checks for the proposed extremizer agree with the formula at sampled sizes through 100.

In Lean: binary_singleton_scc_degree_upper_bound (partial), binary_extremizer_has_singleton_sccs (partial), binary_extremizer_is_trim (partial), binary_extremizer_degree_lower_bound (partial), binary_singleton_scc_ambiguity_sharp_envelope_and_extremizers (statement)

OP-657 squarefree coprime divisor progression half degree packingIn LeanGraph Theory & Graph Algorithms

For every squarefree positive integer n with at least two distinct prime factors, let N be the number of positive divisors of n. For any positive coprime integers a,b, form the balanced bipartite graph B between D(n) and P={a+bt:0<=t<N}, with an edge d--x exactly when gcd(d,x)=1. If delta is its minimum degree, must B contain at least ceil(delta/2) pairwise edge-disjoint perfect matchings? Equivalently, must there be ceil(delta/2) coprime bijections from D(n) onto P such that no divisor/term pair is reused?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This is a substantive correction prompted by new data, not a repeat of OP-652. The general claim fails for n=2*3^2*37^5 and P={37,...,72}: delta=6 but the exact packing number is two, with an integral min-cut obstruction to three. Simultaneous tight divisibility constraints for several prime powers force those failures. The squarefree class removes that mechanism while retaining an infinite, asymptotically sharp robust-matching problem: computed squarefree examples have delta=2^(r-1)-1 and maximum packing 2^(r-2), for 3<=r<=9. The determinant proof for one matching still cannot be iterated after deleting used pairs. A second proposed correction based on the minimum degree of the allowed-edge core also failed computationally, making the squarefree restriction a mathematical boundary rather than a cosmetic simplification. No existing candidate apart from the now-refuted broader OP-652, or source-paper question, asks this restricted packing theorem. Evidence: No violation in 12,650 independently chosen CRT divisibility profiles on squarefree divisor graphs with 2..10 prime factors, including orders up to 1,024, inactive primes, and singleton hits by primes larger than the progression. Sharp families were exactly checked for every r=3..9. A separate audit reconstructed 100 actual primitive arithmetic progressions by CRT and checked every adjacency using integer gcd; 65 half-degree regular factors were independently found by CP-SAT, with no unknown cases. Experiments 8434/8440 separately refute the general non-squarefree version.

In Lean: op_657_half_degree_packing_of_min_degree_le_two (partial), squarefree_coprime_divisor_progression_half_degree_packing (statement)

OP-658 real hunger same lattice coset eventual coalescenceIn LeanCombinatorial Games

For every n>=3 and every irreducible real row-stochastic matrix P on {1,...,n}, set H=P-I and define F(h)=h+H_i, where i is the least index maximizing the coordinate h_i. Is it true that for every real row vector h with sum_i h_i=0 and every integer row vector z with sum_i z_i=0, there is a finite t>=0 such that F^t(h)=F^t(h+zH)? Equivalently, do all two hunger trajectories starting in the same coset of L={zH:z in Z^n, sum_i z_i=0} eventually coincide exactly, including when the stationary distribution has irrational coordinates?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks whether the strongest initialization-independence consequence of the new rational tiling theorem survives in genuinely aperiodic deterministic Markov simulation. It is exact finite coalescence, not just convergence of empirical frequencies or trajectories approaching each other. The rational proof cannot be reused for irrational stationary distributions: there is no positive integer stationary firing quota and the return map on periodic orbits no longer exists. Even the obvious definition of the periodic recurrent tile is unavailable there. The property would identify a global synchronization principle underneath the new lattice-tiling result and suggest the right invariant-section formulation beyond rational chains. This is distinct from the paper's already-listed questions about periodic firing words and polynomial rational transient bounds. Memory, Mathlib, the paper, the older primary source and targeted literature searches found no such real-coalescence statement. Evidence: Exact algebraic arithmetic found finite coalescence for all 726 sampled same-coset pairs over Q(sqrt(2)) in dimensions 3..5, and all 1,158 further pairs over cubic fields Q(cuberoot(c)), c=2,3,5, in dimensions 3..7. Stationary cofactors were checked to exclude rational stationary distributions. All 180 additional pairs on weakly coupled four-state chains with irrational class masses also merged, through bottleneck parameter q=10,000; the longest took 81,830 steps. No finite-horizon non-mergers occurred. Equality and firing comparisons used exact integer algebraic-number representations, not floating-point proximity.

In Lean: real_hunger_same_lattice_coset_eventual_coalescence (statement), real_hunger_coalescence_persists (partial)

OP-661 radius independence connectivity hamiltonian interpolationIn LeanGraph Theory & Graph Algorithms

Does every finite simple graph G on at least three vertices with vertex connectivity kappa(G)>=2 and independence number alpha(G)<=kappa(G)+rad(G)-2 contain a Hamilton cycle? Here rad(G) is the ordinary graph radius, not a spectral radius. Equivalently, must every 2-connected non-Hamiltonian graph satisfy alpha(G)>=kappa(G)+rad(G)-1?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This would unify a new extremal radius theorem with the classical independence/connectivity Hamiltonicity criterion in a single parameter-sensitive theorem, rather than adding one small graph class. It asks whether each extra unit of connectivity compensates for one unit of independence above radius. Zhan's proof gets claw-freeness and further forbidden induced configurations from exact equality; those consequences disappear for positive alpha-rad, so the induced-obstruction proof does not simply transfer. Conversely the Chvatal-Erdos fan argument stops at an independent set of kappa+1 and has no radius term. The source paper does not ask this interpolation. Memory, existing candidates/open problems, the relevant Mathlib graph declarations, and live literature searches found no duplicate. Evidence: Experiment 8701 exhausts every connected graph through order 9 and every connected cubic graph through order 18, with no counterexample. Experiment 8709 exhausts all 5,201,856 biconnected graphs of order 10 and minimum degree at least 3: all 303 satisfying the proposed condition with radius at least 3 are Hamiltonian, including 234 with positive alpha-rad. Exact connectivity cuts, bitmask maximum independent sets and Hamilton-path dynamic programming were used. The latter count is not asserted to consist entirely of graphs outside the Chvatal-Erdos condition, since actual connectivity can exceed the required threshold.

In Lean: radius_independence_connectivity_hamiltonian_interpolation (statement), radius_independence_connectivity_hamiltonian_radius_two (partial)

OP-665 thue morse random attractor lattice gumbelIn LeanCombinatorics for TCS

Let t_n=mu^n(0), where mu(0)=01 and mu(1)=10, so |t_n|=2^n. For k>=0 let p_n(k) be the fraction of ordered k-tuples of positions from {1,...,2^n}, sampled uniformly with replacement, whose set of distinct positions is a string attractor of t_n (every nonempty factor has an occurrence meeting that set). Is it true that lim_(n->infinity) sup_(k in N) |p_n(k)-exp(-8*n*(5/6)^k)|=0? This is a precise lattice extreme-value law; in particular it predicts a random-sampling threshold at log(n)/log(6/5), despite the deterministic minimum attractor size being four.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The recent paper classifies every smallest Thue-Morse attractor and all 8n-22 essential occurrence-coverage constraints, but studies neither uniform random sampling nor its completion-time distribution. The question asks for a probabilistic counterpart to deterministic compressibility: how many arbitrary text anchors suffice, and what is the full transition law? A bulk MUS coverage occupies asymptotically 1/6 of the positions, suggesting 8n*(5/6)^k unhit constraints, but coverage misses at adjacent dyadic scales and within each eight-factor generation are strongly dependent. The classification and a union bound alone do not imply a Poisson law or the matching lower threshold. Establishing the uniform distributional statement requires controlling those dependencies and the nonstationary top and bottom scales. The 8 coefficient and the 5/6 base are supported by exact finite-word sampling rather than fitted constants. This goes beyond the paper's existing open questions OP-138/139 about deterministic certificate depth and counts of minimum attractors in other morphic words. Evidence: Experiment 9038 used 10,000 exact finite-word trials at each order n=6,8,...,18 and a separately labelled interior-limit simulation through n=4096. Experiment 9049 then removed that approximation: 5,000 trials each at n=64,256,1024,4096 used exact uniform n-bit positions and exact coverage membership at every source generation, including finite endpoint thickening and the aa/bb constraints. At n=4096,k=60, the empirical completion CDF was 0.5676 versus exp(-8n(5/6)^k)=0.5590; the mean unhit count was 0.5784 versus 0.58153, and its second factorial moment 0.3556 versus 0.33818. At k=57 the mean was 0.9986 versus 1.00489. Experiment 9053 independently checked 194,208 streaming membership masks against direct arbitrary-precision bit-counting and occurrence-interval tests across all scales through n=4096. This is statistical evidence for the proposed asymptotic law, not a proof.

In Lean: thue_morse_word_length (partial), thue_morse_random_attractor_lattice_gumbel (statement), thue_morse_random_attractor_prob_zero (partial)

OP-666 three token complete bipartite two exactIn LeanGraph Theory & Graph Algorithms

For every integer n>=4, is the domination number of the three-token graph F_3(K_{2,n}) exactly floor((n+1)^2/4)-2? Explicitly, F_3(K_{2,n}) has all three-element subsets of A disjoint-union B as vertices, where |A|=2 and |B|=n, and two configurations are adjacent precisely when one token moves from A to B or B to A along an edge of K_{2,n}, with no collision. Domination means that every configuration is chosen or is adjacent to a chosen configuration.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The new paper determines every two-token complete-bipartite domination number, including gamma(F_2(K_{2,n}))=n, but gives only broad bounds once k>=3. This exact all-n family would identify the first quadratic regime and its sharp leading constant 1/4, rather than another finite instance or a search-improved constant. The general lower bound specialized to m=2,k=3 is only binom(n+2,3)/(2n+1), asymptotic to n^2/12, and the stated upper bound is cubic. Three tokens require coupled domination across B-triples, A-plus-B-pairs, and two-A-plus-one-B states; the two-token coverage arithmetic cannot simply be substituted. Projecting selected A-plus-B-pairs onto B suggests a bridge to triangle-hitting pair families and Mantel's theorem, but selected B-triples can replace missing pair coverage and can simultaneously cover the middle layer, so Mantel alone does not provide the conjectured lower bound. Prior experiments 6162/6186 had already found the formula but never pitched it; this session independently rediscovered it and verified its construction much further. This is the specific new exact formula, not a restatement of the papers' general request to determine higher-token domination numbers. Evidence: Experiment 6162's reduced exact CP-SAT model excluded every smaller solution for all 4<=n<=11, modulo the symmetry fixing the selected two-A configurations; at n>=12 some cases were UNKNOWN and no lower-bound claim is made there. Experiment 6186 independently generated the full token graph and confirmed nonexistence of smaller solutions through n=9. This session's independent full-graph optimization 9052 again obtained exact optima 4,7,10,14 for n=4..7 and verified upper witnesses of the formula through n=18, without claiming optimality after time limits. Fresh experiment 9060 directly checked a uniform construction for every n=4..80, examining 1,837,605 token states in total: use a0 with every B-pair lying within a balanced bipartition of B, add one B-triple, and select every two-A state whose B-vertex lies outside that triple. These computations support the formula; they do not establish the all-n lower bound.

In Lean: three_token_complete_bipartite_two_exact (statement), three_token_k2n_domination_number_le (partial), three_token_k2n_domination_number_four (partial)

OP-668 ternary maximal triangle free first gap and repair classificationIn LeanCombinatorics for TCS

For every integer n>=6, is the following classification true? Let B be a subset of F_3^n meeting every axis-parallel coordinate line, and assume B is inclusion-minimal with that property (equivalently, every point of B is the sole B-point on at least one coordinate line). If |B|<=3^(n-1)+n-1, then there exist a_1,...,a_n in {1,2} and b in F_3, with H={x:sum_i a_i*x_i=b}, such that either B=H, or B=(H minus {p}) union {p+epsilon_i*e_i:1<=i<=n} for some p in H and independently chosen epsilon_i in {1,2}. Conversely every displayed repair is an inclusion-minimal line cover. Equivalently, among inclusion-maximal triangle-free vertex sets in the distance-one ternary Hamming graph, the largest size below 2*3^(n-1) is exactly 2*3^(n-1)-(n-1), and every set of that size is the complement of one of these single-point repairs.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This is an exact discrete stability theorem for the recent Hamming extremal result: it asks for the first gap in the spectrum of maximal feasible sets and the complete structure at that gap, for an unbounded-dimensional family. It is also a near-minimum classification for row-minimal covering arrays CA(N;n-1,n,3). Researchers studying extremal Hamming graphs, Latin hypercubes and irredundant covers would obtain a rigidity description of the first nonoptimal configurations. The counting proof of the maximum controls only line occupancies, and the classical Latin-hypercube result applies only when every line has exactly one cover point. Neither addresses private-line minimality when some lines have multiple cover points; nonlocal small-dimensional exceptions show that extending the exact-case argument without a dimension threshold is false. The paper's listed questions OP-532 and OP-533 concern different Hamming distances, not this distance-one stability classification. Evidence: Experiment 9071 gives a complete CP-SAT infeasibility check showing every 4D line cover of size at most 28 contains an affine minimum cover. Experiment 9079 uses this finite fact and the classical affine classification to exhaust all normalized 5D slice cases of positive excess at most three: 24 two-minimum-slice cases, 1296 one-extra-slice cases (54 exact residual CP-SAT infeasibilities), and 576 code triples; none yields a minimal nonminimum cover of size 82,83,84. Experiment 9084 then audits the normalized 6D slice cases at size at most 248, with dependence on the finite 5D audit made explicit: 2304 code triples, 48 two-minimum-slice cases, and 7776 one-extra-slice cases. Its 5184 remaining completions are all minimal single-point repairs, checked against every line and every private-point requirement. These are finite computational evidence, not an all-dimension theorem. Experiments 9072 and 9075 independently verify repair constructions through dimension 11, including varied signs, normals and translations. Experiment 9075 also confirms genuinely nonlocal minimal covers of sizes 10 in dimension 3 and 29 in dimension 4, motivating the stated dimension range. Earlier unrestricted searches returning UNKNOWN are not treated as exclusions.

In Lean: ternary_affine_hyperplane_card (partial), ternary_single_point_repair_card (partial), ternary_affine_hyperplane_is_minimal_line_cover (partial), ternary_single_point_repair_is_minimal_line_cover (partial), op_668_ternary_line_cover_first_gap_and_repair (statement)

OP-669 fibonacci full minimal coverage singular boundary basisIn LeanCombinatorics for TCS

For every integer n>=7, is the following exact certificate for string attractors of arbitrary cardinality true? Define binary Fibonacci words F_(-1)=1, F_0=0 and F_(j+1)=F_j F_(j-1) for j>=0, with juxtaposition denoting concatenation. For j>=0 let S_j be last(F_(j-1)) followed by F_j with its final symbol deleted, and let E_j=last(F_(j-1)) F_j 0. For a nonempty factor u of F_n let Cov_n(u) be the union of all position intervals occupied by occurrences of u. Let H_min(F_n) be the inclusion-minimal distinct sets among all Cov_n(u). Put B_n={S_j:0<=j<=n-2} union {E_j:3<=j<=n-4 and j congruent to n modulo 2}. Is H_min(F_n) exactly {Cov_n(u):u in B_n}, with all these coverage sets distinct? In particular this would give exactly ceil(3n/2)-4 irredundant canonical constraints, and a position set Gamma is a string attractor if and only if it meets Cov_n(u) for every u in B_n.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This connects the new Fibonacci smallest-attractor classification with the new minimal-coverage-certificate framework for Thue-Morse words. It asks for the complete irredundant obstruction system for every attractor of an unbounded word family, not another computation of the known minimum size two or a count of optimal pairs. Such a system gives an O(n)-constraint exact verifier on texts of Fibonacci-exponential length and describes which occurrence geometries remain essential after optimality is dropped. Banbara et al. characterize position pairs, using singular-word geometry; that does not determine the blockers for larger position sets. Faro et al. determine the complete antichain for a different word, using an equal-length binary morphism and its generation geometry; their list of generation-MUS constraints does not transfer to the nonuniform Fibonacci recursion. The computations expose an additional parity-dependent family E_j that is not simply the singular-word list. This is a structural family theorem with an explicit certificate, rather than a numerical improvement or one more finite case. Evidence: Experiment 9098 computes every minimal factor-coverage set through Fibonacci order 21 via a suffix automaton: all factors in a state have identical occurrence ends, and the shortest representative has the smallest coverage, so scanning those representatives is exhaustive. Experiment 9106 independently computes the proposed words' occurrence unions and compares them with the full automaton antichain for every order 7 through 24 (lengths 34 through 121393). Every set agrees, all proposed coverages are distinct, and their count is ceil(3n/2)-4. Experiment 9107 independently enumerates every distinct factor literally through order 12, including 34017 distinct factors and 27725 distinct coverage sets at order 12, then checks the exact same basis and a witness to the necessity of each constraint. The initial opposite-letter-bordered singular-word guess was falsified in 9103; the corrected boundary factors were identified in 9105 and checked in 9106. Order six is genuinely exceptional, with six minimal constraints instead of the five predicted by extending the formula. These are finite checks, not a proof of the all-order question.

In Lean: fibonacci_full_minimal_coverage_singular_boundary_basis (statement), fibonacci_string_attractor_iff_meets_basis (partial), fibonacci_attractor_basis_seven_card (partial), fibonacci_attractor_basis_seven_coverage_distinct (partial)

OP-670 parallel uniform merino welsh strict balancingIn LeanCombinatorics for TCS

For every n>=3, 2<=r<n, and positive integers q_1,...,q_n, let M_r(q) be the matroid whose ground set is partitioned into n classes of sizes q_i, with independent sets precisely those of cardinality at most r meeting each class at most once. Put R_r(q)=T_{M_r(q)}(2,0) T_{M_r(q)}(0,2)/T_{M_r(q)}(1,1)^2. Whenever q_j>=q_i+2, let q' be obtained by replacing (q_i,q_j) with (q_i+1,q_j-1). Must R_r(q')<R_r(q)? Equivalently as an extremal consequence, at fixed n,r and total ground-set size, are the unique minimizing parallel-class profiles, up to permutation, the profiles whose entries differ by at most one?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for an extremal principle on all truncations of partition matroids, a family containing the known Merino-Welsh counterexamples. It would identify the profiles most prone to violation and reduce an unbounded vector of multiplicities to a nearly uniform profile. The recent paper's factorization into a single power of (2^q-1)/q^2 is lost when multiplicities vary: smoothing increases both the totally cyclic evaluation and the basis count, so nonnegative Tutte coefficients and the usual elementary-symmetric-function inequality alone do not decide their quotient. The rank-one quotient is invariant under these transfers, which explains the substantive rank>=2 hypothesis. The question is not the paper's existing absolute-minimum-counterexample problem OP-439. Searches of KB, memory, Mathlib and primary literature found no balancing theorem; the recent controlled-cyclic-flat bounds in arXiv:2609.38047 address a different parameter. Evidence: Experiment 9358 checked 3,785 exhaustive multiplicity profiles with 2<=n<=12, entries 2..7 and total size at most 36, and 1,500 random profiles through n=100: balancing never increased the ratio at any rank. Experiment 9360 independently checked all three Tutte evaluations by literal ground-set subset enumeration on 147 cases, then checked 437,239 individual transfer/rank comparisons with 3<=n<=10, entries 1..8 and total size at most 34, and 14,650 larger random comparisons through n=150. Every rank>=2 comparison was strict in the predicted direction. These are exact-arithmetic finite observations, not a proof.

In Lean: parallel_uniform_merino_welsh_strict_balancing_rank_one_invariant (partial), parallel_uniform_merino_welsh_strict_balancing_three_two (partial), parallel_uniform_merino_welsh_strict_balancing (statement)

OP-673 terminal cactus endpoint stability exact cycle envelopeIn LeanAlgorithm Design & Analysis

For every integer m>=1, is C_m=(3*2^(m-1)-2)/(2^m-1) the exact supremum of cost_d(T)/MST_d(V) in the following class? H is any finite connected simple cactus graph with strictly positive real edge lengths, every cycle of H has at most 2m+1 vertices, V is any subset of at least two vertices of H (other vertices may be hidden Steiner vertices), and d is the shortest-path metric of H restricted to V. T is any spanning tree of the complete graph on V that is endpoint cut-stable: whenever deleting uv from T gives parts A,B with u in A and v in B, d(u,v)<=d(u,x) for all x in B and d(u,v)<=d(v,y) for all y in A. Here cost_d(T)=sum_{uv in T}d(u,v), and MST_d(V) is the minimum of this cost over all terminal spanning trees.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This would connect the new ordinal MST framework with cactus metric realizations used in phylogenetic networks. It asks for an exact function of cycle complexity across an infinite metric class, including arbitrary hidden branching vertices, and would certify the paper's ordinal Algorithm 2 with an absolute bound below 3/2 on every bounded-cycle cactus class, independently of doubling dimension. Cacti can have unbounded doubling dimension, and a cardinal reconstruction theorem cannot be applied when only local rankings are known. The all-observed cycle case suggests a geometric accumulation of local cut inequalities, but hidden vertices remove the intermediate observed points that make direct edge charging possible; joining many hidden cycle blocks also requires a new terminal projection or decomposition argument. Computation rejected both a uniform 4/3 cut-stability bound and a first linear-in-cycle-length envelope before identifying the geometric formula. The proposed sharpness concerns the cut-stability guarantee. This is distinct from the source paper's explicit open questions about general metric distortion, comparison-query complexity, and dependence on doubling dimension. No duplicate was found in memory, the KB, Mathlib or primary-literature searches. Evidence: Experiment 9411 checks every terminal spanning tree on exhaustive integer-weight cycle families through six vertices and on 1,900 larger sampled cycles, plus 1,752 weighted cacti covering every unlabelled cactus through eight vertices: all endpoint-stable trees obey the geometric envelope. Experiment 9410 checks 14,064 terminal-subset metrics drawn from every unlabelled cactus host through nine vertices, and 9412 checks 10,000 larger hidden-vertex cacti with up to five cycle blocks; neither finds a violation. Experiment 9414 exhausts 348,649 cycle-core/pendant-length profiles, including two terminals at one hidden core vertex, with every terminal spanning tree checked. Zero-pendant boundary cases are explicitly included there. Experiment 9416 independently audits every m=2..100 equality instance: on C_(2m), use cyclic edge lengths [1,1,2,...,2^(m-2),2^(m-1),2^(m-2),...,2,1] and delete the first unit edge for T. Literal cut checks and complete-metric Kruskal computation give cost 3*2^(m-1)-2 and optimum 2^m-1. These are finite exact computations, not a universal proof.

In Lean: cactus_cycle_envelope_one (partial), cactus_cycle_envelope_two (partial), cactus_cycle_envelope_lt_three_halves (partial), op_673_terminal_cactus_endpoint_stability_exact_cycle_envelope (statement)

OP-679 Height-rigidity of planar all-even sets on at most eight parallel linesIn LeanCombinatorics for TCS

Let $A \subset \mathbb{R}^2$ be a finite planar all-even set (that is, for every direction $\ell \in \mathbb{P}(\mathbb{R}^2)$, the number of affine lines parallel to $\ell$ meeting $A$ is even). Suppose there exists a direction $\ell \in \mathbb{P}(\mathbb{R}^2)$ such that $A$ is covered by at most 8 lines parallel to $\ell$. Is $A$ necessarily height-rigid, in the sense that every function $z : A \to \mathbb{R}$ preserving parallel secant ratios (i.e., $q - p = \lambda (s - r)$ implies $z(q) - z(p) = \lambda (z(s) - z(r))$ for all $p, q, r, s \in A$) is the restriction of an affine map?

Posed in arXiv:2610.38864, Problem 9.2 — All-even sets in $\mathbb{R}^2$ and $\mathbb{R}^3$

What is known

Origin is stated; extends the six-line theorem (Theorem 8.1) to eight parallel lines, which is the first open case since any non-height-rigid all-even set must have at least 8 lines in every direction.

In Lean: planar_all_even_occupied_lines_ge_four (partial), planar_all_even_height_rigid_of_occupied_lines_le_eight (statement), planar_all_even_height_rigid_of_occupied_lines_le_six (partial), planar_all_even_card_le_eight_implies_height_rigid (partial)

OP-686 Admissibility and Finiteness of Two-Element Inflection SetsIn LeanCombinatorics for TCS

Let $k_1, m_1, k_2, m_2$ be integers satisfying $2 \le k_1 < m_1 \le k_2 < m_2$. Under what necessary and sufficient conditions on $(k_1, m_1, k_2, m_2)$ is the two-element set $I = \{(k_1, m_1), (k_2, m_2)\}$ an admissible inflection set (that is, witnessed by at least one permutation $\sigma \in \mathrm{Sym}_n$ for some $n$)? Furthermore, when it is admissible, for which parameters is it vanishing (witnessed for only finitely many $n$)?

Proposed here, building on arXiv:2610.38237, Example 3.4 and Corollary 5.15 — Inflection sets of permutations; the paper does not ask it

What is known

The paper completely characterizes single-element inflection sets {(k, m)}, proving that every single-element set is admissible, and is vanishing if and only if m ≥ 2k + 1. It also gives an example of an inadmissible two-element set, namely {(3, 6), (6, 10)}. However, it leaves open the full characterization of which multi-element sets I are admissible, starting with two-element sets.

In Lean: op_686_disjoint_two_element_inflection_set_admissible (statement), op_686_single_element_admissible (partial), op_686_single_element_vanishing_iff (partial), op_686_two_three_three_four_admissible (partial)

OP-691 Sufficiency of fewer than d^2 binary measurements to certify noiseless quantum codesIn LeanQuantum Computation

Let $d \ge 2$ and $D \ge d$ be integers. A quantum channel $\mathcal{N}: \mathcal{B}(\mathbb{C}^D) \to \mathcal{B}(\mathbb{C}^d)$ with Heisenberg dual $\Lambda = \mathcal{N}^*$ admits a noiseless encoding of dimension $d$ if there exists an isometry $W: \mathbb{C}^d \to \mathbb{C}^D$ such that $\mathcal{N}(W \rho W^\dagger) = \rho$ for all states $\rho$ on $\mathbb{C}^d$. The paper proves that preservation of the compatibility threshold of a specific family of $d^2$ binary measurements on $\mathbb{C}^d$ by $\Lambda$ is necessary and sufficient for the existence of such an isometry $W$. For a given dimension $d$, what is the minimum integer $k(d)$ such that there exists a family of $k(d)$ binary measurements on $\mathbb{C}^d$ whose compatibility threshold preservation by any channel $\mathcal{N}$ is equivalent to the existence of a noiseless code isometry $W$? In particular, is $k(d) < d^2$ for any $d \ge 2$, and specifically for qubits ($d = 2$), does a family of $3$ binary measurements suffice?

Posed in arXiv:2610.37347, Discussion and outlook, paragraph 3 — Measurement incompatibility and noiseless quantum codes

In Lean: not_can_certify_noiseless_codes_one (partial)

OP-693 Minimal size of measurement families incompatible globally but compatible on all proper subspacesIn LeanQuantum Computation

For an integer $d \ge 2$, let $m(d)$ denote the minimum integer $k$ such that there exists a family of $k$ binary measurements $\{ \{M_j, \mathbb{I}_d - M_j\} \}_{j=1}^k$ on $\mathbb{C}^d$ that is incompatible (not jointly measurable) on $\mathbb{C}^d$, yet for every proper subspace $V \subsetneq \mathbb{C}^d$ with orthogonal projection $\Pi_V$, the compressed family $\{ \{\Pi_V M_j \Pi_V, \Pi_V - \Pi_V M_j \Pi_V\} \}_{j=1}^k$ is jointly measurable on $V$. While $m(2) = 2$ and the paper establishes $m(d) \le d^2$, what is the exact value of $m(3)$? In particular, does there exist such a family in dimension $d=3$ with strictly fewer than $9$ binary measurements (for example, $m(3) = 3$ or $m(3) = 4$)?

Proposed here, building on arXiv:2610.37347, Corollary 1 — Measurement incompatibility and noiseless quantum codes; the paper does not ask it

What is known

Corollary 1 proves that for every d ≥ 2, there exists a family of d^2 binary measurements that is incompatible on ℂ^d but jointly measurable after compression to any proper subspace. For d = 2, two binary measurements suffice because every proper subspace is 1-dimensional, where all measurements are trivially compatible. The paper leaves open whether d^2 is the minimal cardinality of such a family for d ≥ 3, or what the exact minimum number m(d) of binary measurements is for general d.

In Lean: subspace_incompatible_family_dimension_squared (partial), subspace_incompatible_family_two_two (partial), not_has_subspace_compatible_incompatible_family_one (partial), open_problem_693_three_dim_fewer_than_nine (partial)

OP-697 Generalisation of quadratic pure-state invariants to qudit systemsIn LeanQuantum Computation

Let H = C^d be a d-dimensional Hilbert space (with d >= 3 prime or composite) and let {T_a}_{a=1}^{d^2-1} be an orthonormal Hermitian operator basis of the Lie algebra su(d). Determine the subspace of coefficient vectors zeta in R^(d^2-1) for which the quadratic form I_psi(zeta) = sum_{a=1}^{d^2-1} zeta_a (Tr(|psi><psi| T_a))^2 is constant for all pure states |psi> in CP^(d-1), and characterise those invariants that are dynamically stable under Lüders state update.

Posed in arXiv:2610.36076, Sec. 6, lines 2765-2766 — An algebraic characterisation of $n$-qubit pure-state invariants

In Lean: pure_state_invariant_scaling (partial), pure_state_invariant_addition (partial), open_problem_qudit_pure_state_invariants (partial)

OP-706 Anonymous stationary monotone SWF with upper and lower restricted dominanceIn LeanSocial Choice Theory

Let $Y = [0, 1]$ and $X = Y^{\mathbb{N}}$ be the set of infinite utility streams. A social welfare function is a mapping $W: X \to \mathbb{R}$. Does there exist a social welfare function $W: X \to \mathbb{R}$ satisfying all of the following five conditions: (1) Monotonicity: for all $x, y \in X$, if $x_t \ge y_t$ for all $t \in \mathbb{N}$, then $W(x) \ge W(y)$; (2) Stationarity: for all $x, y \in X$ with $x_1 = y_1$, $W(x) \ge W(y) \iff W(x') \ge W(y')$, where $x' = (x_2, x_3, \ldots)$ and $y' = (y_2, y_3, \ldots)$; (3) Finite anonymity: for every $x \in X$ and every finite permutation $\pi$ of $\mathbb{N}$ (i.e. $\pi(t) = t$ for all sufficiently large $t$), $W(x \circ \pi) = W(x)$; (4) Upper restricted dominance: for all $a, b \in [0, 1]$ with $a < b$, $W(a, b, b, b, \ldots) < W(b, b, b, b, \ldots)$; (5) Lower restricted dominance: for all $a, b \in [0, 1]$ with $a < b$, $W(a, a, a, a, \ldots) < W(b, a, a, a, \ldots)$?

Proposed here, building on arXiv:2610.38824, Proposition 1 — The existence of anonymous, stationary, monotone social welfare functions satisfying restricted dominance: an answer to an open question in intergenerational equity; the paper does not ask it

What is known

The paper constructs a real-valued SWF satisfying monotonicity, stationarity, strong anonymity, and upper restricted dominance (via Liminf-Restricted Dominance). However, for that SWF, W(a, a, a, ...) = W(b, a, a, ...) whenever a < b, because the lower cut-counts cannot detect improvements of a single generation above the tail limit. The dual construction based on upper cut-counts satisfies lower restricted dominance but fails upper restricted dominance. Whether both upper and lower restricted sensitivity can simultaneously coexist with stationarity and finite anonymity in a real-valued SWF remains open.

In Lean: swf_anonymous_stationary_monotone_upper_lower_dominance_exists (statement), swf_upper_restricted_dominance_exists (partial), swf_lower_restricted_dominance_exists (partial), swf_upper_restricted_dominance_not_constant (partial)

OP-716 Exact Davenport Constant of C3 Plus Elementary 2-Group Outside Solved IntervalsIn LeanElementary Number Theory

Let $\mathsf{D}(C_3 \oplus C_2^r)$ denote the Davenport constant of the abelian group $C_3 \oplus C_2^r$. What is the exact value of $\mathsf{D}(C_3 \oplus C_2^r)$ for ranks $r$ in the gaps between the intervals $[2^{m+1}-2m-2, \lfloor 2^{m+2}/\sqrt{3} \rfloor - 2m - 2]$, such as $r \in \{5, 6, 7\}$? More generally, what are the exact values of the Fourier thresholds $\nu(d) = \min \{ |\operatorname{supp}\widehat{f}| : f : \mathbb{F}_2^d \to \mathbb{F}_3,\, f^{-1}(0) = \{0\} \}$ for all positive integers $d$?

Posed in arXiv:2610.38447, Sec. 11 — Davenport constants with growing binary rank

What is known

Theorem 1.2 determines D(C_3 + C_2^r) for r in [2^{m+1}-2m-2, floor(2^{m+2}/sqrt(3)) - 2m - 2], leaving gaps between floor(2^{m+2}/sqrt(3)) - 2m - 2 and 2^{m+2} - 2(m+1) - 2 (e.g., r = 5, 6, 7 between m=2 and m=3). Appendix B gives a two-threshold formula for sufficiently large r involving two unevaluated extremal Fourier support thresholds nu(2m+1) and nu(2m+2).

In Lean: op716_fourier_threshold_odd_eq_arithmetic_bound (statement), fourier_threshold_nu_odd_ge_arithmetic_bound (partial), fourier_threshold_nu_one (partial), fourier_threshold_nu_two (partial), fourier_threshold_nu_three (partial)

OP-719 yang mills additional profile universal large dimension limitIn LeanClassical Field Theory & Electromagnetism

Do the additional smooth self-similar Yang-Mills profiles have a universal large-dimension limit distinct from both explicit branches? Precisely, for m>=12 and d=2m+5, let P_m be the rational resonance polynomial defined by recurrence (2.3) and normalization (2.5) of Bizoń--Kluszczyński, and let S_m(z)=P_m(z)/((z-z_-(d))(z-z_+(d))), where z_± are the explicit squared endpoint values in their Eq. (3.1). Put Z_m={z in (0,1):S_m(z)=0}; the paper guarantees that this is a nonempty finite set, disjoint from the two explicit roots. Is there one constant C_* in (12.94,12.95) and constants A<infinity and m_0 such that |m(1-z)-C_*|<=A/m for every m>=m_0 and every z in Z_m? Determine C_* by a dimension-independent analytic characterization. In the equivalent profile formulation, if u_{m,z} is the unique origin-regular smooth profile corresponding to z, normalized by u_{m,z}(0)=1 and u_{m,z}(1)=sqrt(z), does sup_{z in Z_m} sup_{0<=y<=1} |(2m+5)(1-u_{m,z}(y))-C_* y^2| tend to zero? The requested asymptotic is uniform over all additional profiles and does not assume their conjectured uniqueness at each dimension.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers studying supercritical Yang-Mills blowup now know an additional smooth profile exists in every high odd dimension, but have no formula or asymptotic description of it. A uniform limiting profile and a selection rule for C_* would explain how this branch differs from the explicit solutions and provide quantitative input for its dynamical analysis. The existing endpoint-sign and simplicity arguments prove existence without locating the extra roots. Naively dropping the highest derivative in the large-dimension ODE leaves a free amplitude and therefore does not select C_*. The computations point to a third amplitude near 12.942, whereas the two explicit branches have amplitudes 6±2*sqrt(3). This is an asymptotic description of an entire PDE profile family, beyond an isolated root count or an improved searched constant. It moves Bizoń--Kluszczyński, arXiv:2610.36784, Proposition 1.1, Corollary 1.2, and Proposition 3.1 along new_setting: Identify the universal singular-perturbation scaling and limiting shape of the newly established additional branch as d tends to infinity; this is separate from the papers' questions on root count, even dimensions, and stability.. Evidence: Exact rational recurrence and Sturm isolation found one root of S_m in (0,1) for every m=3..25 and m=30,35,40,50,60. Independent 70/110-digit numerical recurrences reproduce the exact cases and continue the scaled root through m=500. Independent 60/90-digit recurrences give m(1-z)=12.7951470955 at m=750, 12.8316056840 at 1000, 12.8682473311 at 1500, and 12.8866372140 at 2000; the independent precisions agree to about 64 decimal places. The differences fit convergence at order 1/m to a constant near 12.942. These are numerical evidence for the endpoint scaling, not a proof of convergence or numerical verification of the uniform profile assertion.

In Lean: yang_mills_residual_root_m3 (partial), yang_mills_additional_root_distinct_explicit (partial)

OP-726 mutual power divergence subadditivity iff golden ratio exponentIn LeanInformation Theory & Coding

Is the exact set of subadditive power-divergence mutual informations characterized by the golden-ratio exponent? Put beta_*=(sqrt(5)-1)/2. For 0<beta<1, define f_beta(t)=(t^beta-beta*t+beta-1)/(beta*(beta-1)), including its continuous value at t=0, and define I_beta(X;Y)=sum_(x,y) p_X(x)p_Y(y) f_beta(p_XY(x,y)/(p_X(x)p_Y(y))), with zero-marginal terms omitted. Is the following equivalence true for every beta in (0,1): I_beta(X;(Y,Z)) <= I_beta(X;Y)+I_beta(X;Z) for every finite X,Y,Z satisfying Y independent of Z conditional on X, if and only if beta>=beta_*? Equivalently the inequality should hold throughout [beta_*,1), including beta_*, and for every beta<beta_* there should be a strictly positive binary-alphabet counterexample. The proposed classification covers arbitrary finite alphabet sizes on the positive side, rather than only the symmetric binary family used to locate the boundary.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Information theorists use standard power divergences to compare noisy observations, but the knowledge base only contains isolated failures and an unresolved sufficient range. An exact classification would identify when independent sensor observations obey a universal dimension-free information inequality. Memory experiments 2845 and 2943--2946 found a boundary near 0.618 but did not identify or state its exact value. The new computations locate it at the root beta^2+beta-1=0 to ten decimal places with independent very high precision. The recent sufficient differential criterion in Abin--Gohari does not apply to any pure-power generator in (0,1); substituting g(t)=t^beta cannot establish the proposed positive range. The known Markov/Theta identity offers a route to a new generator-specific concavity argument, but no such argument is currently in the knowledge base. The target is a classification of an entire standard divergence family, not merely a searched improvement of a numerical constant. It moves mutual_hellinger_information_not_subadditive along stronger_result: Replace isolated refutations at beta=1/4,1/2 and the parked sufficient-range conjecture beta>=2/3 with an exact all-alphabet characterization and a binary obstruction for every excluded exponent. This is not a re-pitch of the existing beta>=2/3 statement.. Evidence: In the positive binary family p_X=(10^(-L),1-10^(-L)) with conditionally iid Bernoulli observations of probabilities a and 10^(-L), the last violating exponent approaches 0.6152857935657 for a=10^(-2), 0.6180063510168 for a=10^(-4), and 0.6180339859860 for a=10^(-8). At L=200,a=10^(-12), independent 750/1000-digit evaluation gives a negative subadditivity slack -4.6999e-234 at beta=.6180339887 and a positive slack 4.7722e-234 at beta=.6180339888. The precisions agree to over 500 relative digits. No violation above the proposed cutoff was found in asymmetric binary exponent grids or in 2,000 skewed and weak-channel samples across 2x2x2,3x2x2,3x3x3,4x3x2,6x3x3 alphabets, tested at beta_*, .619, 2/3 and .8. The numerical evidence does not establish the universal positive assertion.

In Lean: mutual_power_divergence_not_subadditive_of_lt_golden_ratio (partial), power_divergence_exists_binary_counterexample_of_lt_golden_ratio (partial), mutual_power_divergence_binary_subadditive_imp_golden_ratio_le (partial), mutual_power_divergence_subadditive_imp_golden_ratio_le (partial), mutual_power_divergence_subadditive_imp_quadratic_nonneg (partial), op_726_power_divergence_subadditivity_iff_golden_ratio (statement)

OP-729 torus degree n sub two exact anf spectrum classificationIn LeanCircuit Complexity & Lower Bounds

For every n>=2 and every Boolean function f:{0,1}^n->{0,1}, is the optimal degree-(n-2) torus approximation error determined exactly by its top two algebraic-normal-form layers as follows? Write the unique multilinear F_2 polynomial of f as sum_(S subset [n]) a_S product_(i in S) x_i, with a_S in F_2. Put b=a_[n] and k=|{i:a_([n] minus {i})=1}|. Let E_(n-2)(f)=inf_(real multilinear P,deg P<=n-2) max_x dist(P(x)-f(x)/2,Z), using ordinary total degree over the reals and allowing arbitrary integer lifts. The proposed exact formula is: E_(n-2)(f)=1/(2*binomial(n,floor(n/2))) if b=1; E_(n-2)(f)=0 if b=0,k=0; and E_(n-2)(f)=2^(h-n)/binomial(h,floor(h/2)) if b=0,k>=1, where h=min(k-1,n-k). Does this formula hold for all f and all n, with the infimum attained by a rational-coefficient polynomial? This asks for the entire error spectrum and its algebraic classification, rather than only the AND function or symmetric approximants.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Torus approximation is used to study the behavior of modular gates, and precise high-degree cases are benchmarks for lower-bound and integer-lift methods. The knowledge base constructs the degree-(n-1) approximation, whose optimal error is controlled by one parity bit. At degree n-2 the orthogonal complement has dimension n+1 and the n+1 integer-residue constraints must be satisfied together; the single alternating-sum argument no longer decides optimality. A full formula for arbitrary Boolean functions would expose the next structural invariant of the approximation problem, including a nonmonotone dependence on the number k of next-to-top ANF coefficients. The general dual LP criterion of Krishan--Vishwanathan does not optimize these coupled lattice residues. Even if each fixed-lift LP is elementary, proving that no other integer lift improves the proposed error across every n is an infinite lattice minimization problem, not a direct API corollary. It moves explicitApproximant_torusDistance along new_setting: Classify optimal error for every Boolean function one degree below the known universal explicit approximation. The formula detects all top-two-layer ANF patterns and predicts which functions are harder than AND; it is not a single finite input size or a constant improvement.. Evidence: Mixed-integer optimization of the full n+1 coupled residue constraints agrees with the formula for every top-layer orbit at n=2..8 and all tested orbits at n=9. All n<=8 instances and all but one n=9 instance were solved to numerical global optimality; n=9,k=7 found the predicted feasible error but timed out with a lower-bound gap and is not counted as an optimum. For b=1, the errors were 1/4,1/6,1/12,1/20,1/40,1/70,1/140,1/252 at n=2..9. For b=0, the errors peak near intermediate k and return to 2^(-n) at k=n; at n=8, k=1..8 gives 1/256,1/128,1/128,1/96,1/96,1/128,1/128,1/256. The optimization uses floating-point LP/MIP arithmetic, with reported residuals near machine precision; these are conjecture-generating computations, not formal proofs.

In Lean: optimalTorusError_degree_sub_two_zero_of_top_layers_zero (partial), op_729_case_n_two (partial), op_729_rational_approximant_of_top_layers_zero (partial), op_729_and3_has_rational_torus_approximation (partial), op_729_case_n_three (partial), op_729_exact_anf_spectrum_classification (statement)

OP-730 Sharp coefficient of predictability loss near magic-square thresholdIn LeanQuantum Computation

In the magic square nonlocal game, let $\beta_0 = (2 + \sqrt{2/3})/3$ be the threshold score above which Alice's complete first row $K$ ceases to be perfectly predictable by an adversary with quantum side information. For $w \in [\beta_0, 1]$, let $g(w)$ denote the supremum of $p_{\mathrm{guess}}(K \mid E, x=0)$ over all finite-dimensional strategies with score at least $w$. What is the exact slope $c^* = \lim_{\delta \to 0^+} \frac{1 - g(\beta_0 + \delta)}{\delta}$, known to satisfy $\frac{9}{2} \le c^* \le \frac{3}{4(1-\beta_0)} = \frac{27(1+\sqrt{2/3})}{4}$, and what is the exact function $g(w)$?

Posed in arXiv:2610.12001, Sec. 8, para. 5 — Exact value and rigidity of the $2\times3$ magic rectangle

What is known

The paper establishes linear upper and lower bounds on 1 - g(β₀ + δ) with constants 9/2 and 3/(4(1-β₀)), leaving the exact value of the slope and the global shape of g(w) open.

In Lean: is_povm (definition), magic_square_strategy_valid (definition), magic_square_score (definition), magic_square_key_guess_success (definition), magic_square_guess_fn (definition), magic_square_guess_fn_ge_linear (partial), magic_square_guess_fn_concaveOn (partial)

OP-735 Parity bound of the closed network for end nodes of higher dimensionIn LeanQuantum Computation

Let n >= 1 be an odd integer. In the closed network with n tripartite sources where two central nodes without inputs perform an arbitrary joint quantum measurement with signs f_0, f_1 in {-1, 1}, and each end node i in {1, ..., n} performs dichotomic projective measurements B_0^(i), B_1^(i) on a Hilbert space of dimension d > 2, does every quantum state and measurement strategy satisfy the parity bound |I|^(1/n) + |J|^(1/n) <= 2^(1/2 - 1/(2n)), where I = 2^(-n) sum_{y_1, ..., y_n} <f_0 prod_{i=1}^n B_{y_i}^(i)> and J = 2^(-n) sum_{y_1, ..., y_n} (-1)^(y_1 + ... + y_n) <f_1 prod_{i=1}^n B_{y_i}^(i)>?

Posed in arXiv:2610.35838, Sec. VII — Network nonlocality with tripartite entangled sources

In Lean: dichotomic_sum_diff_sq_sum (partial)

OP-736 Exact two-copy closed-network value for generalized GHZ statesIn LeanQuantum Computation

For any parameter alpha in (0, pi/2), let |GHZ_alpha> = cos(alpha) |000> + sin(alpha) |111> in (C^2)^{\otimes 3} be the generalized GHZ pure state. Let N_c(GHZ_alpha) = max_{{e_i}, {f_j}} max_{mu, nu, mu', nu' in {0, 1, 2, 3}} sqrt(Lambda(tau_{mu nu}, tau_{mu' nu'})) be the maximal two-copy closed-network value achieved by Bell-state measurements, where tau_{mu nu} = (Tr[|GHZ_alpha><GHZ_alpha| (A_mu \otimes sigma_k \otimes C_nu)])_{k=1}^3 with A_0 = C_0 = I and A_i = e_i . sigma, C_j = f_j . sigma for orthonormal frames {e_i}_{i=1}^3, {f_j}_{j=1}^3 of R^3, and Lambda(tau, tau') = (1/2) * (|tau|^2 + |tau'|^2 + sqrt((|tau|^2 + |tau'|^2)^2 - 4 (tau . tau')^2)). Is N_c(GHZ_alpha) = sqrt(1 + sin^2(2*alpha)) for all alpha in (0, pi/2)?

Posed in arXiv:2610.35838, Sec. III.4 — Network nonlocality with tripartite entangled sources

In Lean: ghz_network_lambda_standard_frame (partial), ghz_two_copy_closed_lower_bound (partial), ghz_closed_network_value_exact (statement), ghz_standard_frame_lambda_le (partial), ghz_closed_network_lambda_le_two (partial), ghz_network_lambda_at_pi_div_four_le (partial)

OP-737 Operational Capacity Characterization of Thermally Reachable States for Degenerate HamiltoniansIn LeanSubmodular & Combinatorial Optimization

Let H = \sum_{k=1}^m E_k \Pi_k be a finite-dimensional Hamiltonian on \mathcal{H} = \bigoplus_{k=1}^m \mathcal{H}_k with distinct energy eigenvalues E_1 < ... < E_m and eigenspace dimensions g_k = \dim \mathcal{H}_k \ge 1 (with at least one g_k > 1). Let \gamma_H = \sum_{k=1}^m \frac{e^{-\beta E_k}}{Z} \Pi_k be the Gibbs state at inverse temperature \beta > 0. Consider the set \mathcal{L}_{\mathrm{TO}}(\rho) of states reachable from a block-diagonal state \rho = \sum_{k=1}^m \Pi_k \rho \Pi_k under the closure of thermal operations. For each subset S \subseteq \{1, ..., m\} of energy levels, define the block population capacity C_\rho(S) = \max_{\rho' \in \mathcal{L}_{\mathrm{TO}}(\rho)} \mathrm{Tr}\bigl(\rho' \sum_{k \in S} \Pi_k\bigr). Is C_\rho necessarily a submodular rank function on 2^{\{1,...,m\}}, and does the set of reachable block population vectors \vec{p}' = (\mathrm{Tr}(\rho'\Pi_1), ..., \mathrm{Tr}(\rho'\Pi_m)) coincide exactly with the base polytope B(C_\rho) = \{\vec{z} \in \mathbb{R}^m : \sum_{k \in S} z_k \le C_\rho(S)\ \forall S \subseteq \{1,...,m\},\ \sum_{k=1}^m z_k = 1\}?

Posed in arXiv:2610.35433, Sec. Discussion, p. 5 — Population Capacity and the Geometry of Thermomajorization

In Lean: op_737_block_capacity_submodular_and_base_polytope (statement), thermally_reachable_subset_base_polytope (partial), op_737_two_level_submodular (partial)

OP-746 Global GCD Agreement for Permutations Avoiding Short CyclesIn LeanElementary Number Theory

For integers $r \ge 1$ and $n \ge r+2$, let $g_r(n) = \gcd_{S \supseteq \{1, \dots, r\}} a_S(n)$ denote the gcd of the number $a_S(n)$ of permutations of $\{1, \dots, n\}$ having no cycle lengths in $S$, over all sets $S \subseteq \mathbb{N}$ containing $\{1, \dots, r\}$. Let $G_r(n) = \gcd_{k > r} a_{\{1, \dots, r, k\}}(n)$ denote the gcd restricted to the one-parameter family of excluded sets $\{1, \dots, r, k\}$. (1) For $r = 3$, do $g_3(n)$ and $G_3(n)$ differ if and only if $n \ge 111$ and $n \equiv 30 \pmod{81}$? (2) For every $r \ge 4$ and every $n \ge r+2$, is $g_r(n) = G_r(n)$?

Posed in arXiv:2610.40342, Question 14.10 — A p-adic Valuation Calculus for Permutations with Restricted Cycle Lengths

What is known

The paper finds that $g_3(111) = G_3(111)/3$, disproving that the one-parameter family always determines the global gcd over all excluded sets containing {1,...,r}, and checks that the two gcds differ on $n = 111 + 81j$ for $j \le 9$ while agreeing for all $r \ge 4$ on tested ranges.

In Lean: restricted_cycle_global_gcd_dvd_one_param_gcd (partial), restricted_cycle_global_gcd_eq_one_param_gcd_3_5 (partial), global_gcd_agreement_short_cycles (statement)

OP-757 Minimum CNOT count to achieve optimal shadow norm in two-sided locally randomized classical shadowsIn LeanQuantum Computation

In the two-sided locally randomized classical shadow architecture on k qubits, a middle Clifford unitary U in Cliff(k) achieves the optimal squared shadow norm C_k^{opt} = 9^k / s_k (where s_k = (3 * 5^k + 3^k - 6) / 4 for odd k and s_k = (3 * 5^k - 3^k + 2) / 4 for even k) if and only if its integer score S_k(U) = sum_{P in {X,Y,Z}^{\otimes k}} 3^{k - Size(U P U^\dagger)} equals s_k. With all-to-all connectivity, the dual-axis circuit U_* = exp(i * pi * X^{\otimes k} / 4) * exp(i * pi * Z^{\otimes k} / 4) can be implemented with at most 3k - 6 CNOT gates for even k >= 4 and 3k - 5 CNOT gates for odd k >= 3, while on a nearest-neighbor 1D chain it can be implemented with 4k - 6 CNOT gates for k >= 2. What is the minimum CNOT count of a k-qubit Clifford circuit that achieves S_k(U) = s_k, under (1) all-to-all connectivity, and (2) nearest-neighbor 1D chain connectivity, for each k >= 3?

Posed in arXiv:2610.04621, Sec. V, fifth paragraph — Exact Clifford Optimality for Two-Sided Locally Randomized Classical Shadows

In Lean: op_757_all_to_all_cnot_lower_bound (statement), op_757_all_to_all_cnot_three_exists (partial), op_757_1d_chain_cnot_three_le_five (partial), op_757_cnot_two_exists (partial)

OP-771 Existence of a diameter-two graph with mutual-visibility chromatic number 4In LeanGraph Theory & Graph Algorithms

Does there exist a finite connected simple graph $G$ of diameter 2 such that $\chi_\mu(G) = \chi(G) = 4$, where $\chi_\mu(G)$ is the mutual-visibility chromatic number (the minimum number of mutual-visibility sets partitioning $V(G)$) and $\chi(G)$ is the chromatic number?

Proposed here, building on arXiv:2610.39430, Sec. 4, question (1) — Diameter-two graphs whose mutual-visibility chromatic number equals their chromatic number; the paper does not ask it

What is known

The paper constructs an infinite family of diameter-two graphs G with chi_mu(G) = chi(G) = 3 and asks whether such graphs exist for all k >= 4. The base case k = 4 is the first open case: a positive construction would provide candidates or structural insights towards higher k, while a negative answer would disprove the general conjecture.

In Lean: graph_mutual_visibility_chromatic_number_le_chromatic_number_of_diam_two (partial), exists_diameter_two_graph_mutual_visibility_chromatic_number_three (partial), exists_diameter_two_graph_mutual_visibility_chromatic_number_four (statement)

OP-776 Explicit polynomial-order matrix hitting point for noncommutative ABPs in small characteristicIn LeanAlgebraic & Lattice-Based Complexity

Let m, S >= 1 be positive integers, and let F be a field of characteristic p > 0. Does there exist a deterministic polynomial-time constructible tuple of matrices T_1, ..., T_m in M_R(F) of order R = poly(m, S) such that for every polynomial f in F<x_1, ..., x_m> computed by an affine noncommutative algebraic branching program with at most S vertices, f(T_1, ..., T_m) = 0 if and only if f = 0, in the regime of small prime characteristic p <= binom((m+2)S, 2) (and in particular for p = 2)?

Proposed here, building on arXiv:2610.37677, Sec. 4.1, after Prop. 4.1 — Explicit matrix hitting points for noncommutative algebraic branching programs; the paper does not ask it

What is known

The paper constructs an explicit single hitting matrix tuple of order R = O(m^{3/2} S^2) for noncommutative ABPs with at most S vertices over fields of characteristic zero and characteristic p > binom(d,2) with d = (m+2)S. In Section 4.1, the author demonstrates that this specific construction fails in characteristic 2: at (m,S)=(2,3) modulo 2, the construction maps the nonzero polynomial x_1^2 to the zero matrix of order 312. Constructing an explicit polynomial-order hitting tuple for ncABPs over fields of small characteristic p <= binom(d,2) (and particularly characteristic 2) remains open.

In Lean: op_776_explicit_polynomial_hitting_small_char (statement), op_776_char_two_hitting_point (partial)

OP-786 Minimum Average Pairwise Hamming Distance for Density 1/16 Subsets of the HypercubeIn LeanCombinatorics for TCS

Let $n \ge 4$ be an integer. For any subset $\mathcal{F} \subseteq \{0,1\}^n$ of cardinality $|\mathcal{F}| = 2^{n-4}$, is the average pairwise Hamming distance $\frac{1}{|\mathcal{F}|^2} \sum_{x \in \mathcal{F}} \sum_{y \in \mathcal{F}} d_H(x, y) \ge \frac{n-4}{2}$, with equality attained if and only if $\mathcal{F}$ is an $(n-4)$-dimensional subcube of $\{0,1\}^n$?

Posed in arXiv:2610.40486, Sec. 3, after Eq. (1) — Average pairwise Hamming distance of a subset in a hypercube

What is known

The Ahlswede-Katona problem asks for the minimum average pairwise Hamming distance of subsets of {0,1}^n of given size. It is settled for densities 1/2 (by Althöfer-Sillke 1992), 1/4 (by Fu-Wei-Yeung 2001), and 1/8 (this paper). Density 1/16 is the remaining power-of-two density where subcubes could be optimal, as counterexamples to subcube optimality exist for density 1/32 (e.g. dimension 19).

In Lean: min_avg_pairwise_hamming_dist_density_one_sixteenth (statement), min_avg_pairwise_hamming_dist_density_one_sixteenth_n_eq_four (partial), min_avg_pairwise_hamming_dist_density_one_sixteenth_n_eq_five (partial), subcube_avg_pairwise_hamming_dist (partial)

OP-794 tree graph state max tripartite information claw packingIn LeanQuantum Mechanics

For every finite tree T, is the maximum over all partitions V(T)=A disjoint-union B disjoint-union C disjoint-union D (empty parts allowed) of the tripartite information I3(A:B:C) of the graph state |T> exactly the maximum number of pairwise vertex-disjoint induced copies of K_{1,3} in T? Entropies use base-two logarithms. Equivalently, for X subset V let r(X) be the rank over F_2 of the T-adjacency submatrix with rows X and columns V\X; is max_{A,B,C,D} [r(A)+r(B)+r(C)+r(D)-r(A union B)-r(A union C)-r(B union C)] equal to the maximum number of vertex-disjoint four-vertex stars?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Quantum-information researchers use positive I3 to detect failures of holographic monogamy. Fuentes et al. identify graph-state violations and show that a one-center generalized star can violate an MMI instance, but do not give a quantitative formula for the strongest violation on arbitrary trees. The proposed equality connects this quantum quantity to a tree packing optimization, potentially yielding a structural and efficient calculation for any size, including unbounded violation. Their single-center construction and rank analysis do not directly imply that multiple vertex-disjoint stars can be combined without interference or that no other partition gives a larger violation. Empty parts allow zero on small paths; no assumption of a nonempty region is concealed. Evidence: Experiments enumerated every four-part partition up to permutations of parts and every nonisomorphic tree on 5 through 11 vertices, plus the first 150 nonisomorphic 12-vertex trees; max I3 equals disjoint claw packing throughout, including 3-claw examples. At 4 vertices the path has max I3 0 when empty parts are allowed, while the sole nonempty four-part split gives -1, and the four-star gives 1. Independently direct graph-state Schmidt spectra agree numerically with GF(2) cut ranks for every cut of every tree on 4 through 7 vertices.

In Lean: tree_graph_state_max_tripartite_info_eq_claw_packing (statement), claw_free_tree_graph_state_mmi (partial), tree_with_claw_tripartite_info_pos (partial), tree_graph_state_tripartite_info_trivial_zero (partial)

OP-797 antipodal hellinger sharp stability majority transitionIn LeanInformation Theory & Coding

For 0<rho<1, let X be uniform on {-1,1}^n and let Y be obtained by independently flipping each coordinate with probability (1-rho)/2. For every antipodal Boolean function f, define Z_rho(f)=E_Y sqrt(1-(E[f(X)|Y])^2) and delta(f)=min over signed coordinate functions g of Pr[f(X)!=g(X)]. Is the largest dimension-independent constant c(rho) such that Z_rho(f)-sqrt(1-rho^2) >= c(rho) delta(f) for every n and every antipodal f exactly min{c_3(rho),c_G(rho)}? Here c_3(rho)=sqrt(1-((3rho-rho^3)/2)^2)+3 sqrt(1-((rho+rho^3)/2)^2)-4 sqrt(1-rho^2), and c_G(rho)=2(E_{G~N(0,1)} sqrt(1-erf(rho G/sqrt(2(1-rho^2)))^2)-sqrt(1-rho^2)). The two terms are respectively the excess-to-distance ratio for 3-bit majority and the limit of that ratio for odd majorities on increasingly many inputs.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

For noisy Boolean channels, Ky's 2026 antipodal Hellinger inequality proves the dictator bound and notes that equality and quantitative stability require additional work. OP-141 asks only for uniqueness of equality. This question proposes a specific sharp dimension-free stability constant and a noise-dependent change of extremizing family: 3-bit majority versus an infinite Gaussian-majority limit. It would quantify how close an almost-optimal decision rule must be to a dictator, settle the interior equality case if true, and expose an extremal transition that the paper does not formulate. The paper's spectral matching argument supplies nonnegativity but no linear loss term or optimal coefficient. Evidence: All antipodal functions on n<=5 bits were exhaustively checked at rho=0.2,0.5,0.8,0.95; no ratio was below the proposed coefficient. For rho in {0.2,0.5,0.7,0.75,0.8,0.82,0.84,0.86,0.88,0.9,0.92,0.95,0.98}, every odd majority of 3 through 101 bits was evaluated using binomial convolution; the smaller candidate switches between the Gaussian limit and 3-bit majority between rho=0.84 and 0.86. Additional tests covered 6679 distinct self-dual 7-bit majority circuits, sampled weighted thresholds up to 11 bits, and numerical two-heavy-coordinate Gaussian thresholds.

In Lean: antipodal_hellinger_sharp_stability_majority_transition (statement), antipodal_hellinger_signed_dictator_equality (partial)

OP-798 energy filter two species purity arithmetic limitIn LeanStatistical Mechanics & Thermodynamics

Fix tau>0 and alpha>0. For n divisible by 4, let H_n=sum_j a_j Z_j on n qubits, where each half A and B of n/2 qubits contains n/4 coefficients a_j=1 and n/4 coefficients a_j=alpha. Let |psi_n> be the normalized state exp(-tau^2 H_n^2/4)|+>^{tensor n}, and let P_n=Tr[(Tr_B |psi_n><psi_n|)^2]. Does sqrt(n) P_n converge as follows? For irrational alpha, the limit is 2 sqrt(2)/(tau sqrt(1+alpha^2)). For rational alpha=p/q in lowest terms, put h=1/q, a_k=exp(-tau^2 h^2 k^2), S_2=sum_{k in Z} a_k^2, and S_4=sum_{m in Z}(sum_{k in Z}a_k a_{m-k})^2. Is the limit 2 sqrt(2) h S_4/(sqrt(pi) sqrt(1+alpha^2) S_2^2)?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Energy filtering is used to prepare low-energy-variance states, and Renyi entanglement determines their tensor-network cost. Morettini et al. derive large-system entropy behavior under continuum and thermalization assumptions; these do not identify the exact constant or resolve lattice recurrences in this explicitly noninteracting two-species model. The proposed all-parameter formula distinguishes rational and irrational coupling ratios and predicts an arithmetic discontinuity in the constant, despite the same leading half-logarithmic Renyi-2 entropy. This makes precise when replacing a discrete spin spectrum by a Gaussian continuum misses physically relevant finite offsets; the result is a family for all tau and alpha rather than a single finite example. Evidence: Numerical Dicke-basis calculations through n=200 approach the proposed constants for alpha=1, 3/2, and sqrt(2) at tau=1,2,3. For example tau=2 gives sqrt(n)P_200=1.12781 versus lattice prediction 1.13140 at alpha=1, and 0.81256 versus continuum prediction 0.81650 at alpha=sqrt(2). Independent full Hilbert-space computations for n=4,8,12 agree with the Dicke calculation to floating-point precision.

In Lean: energy_filter_rational_continuum_limit (partial), energy_filter_two_species_purity_arithmetic_limit (statement), energy_filter_two_species_purity_rational_limit (partial)

OP-799 plurality veto core exact regularization thresholdIn LeanSocial Choice Theory

For integers m>=3 and n>=max(8,m), is the first regularization strength at which a previously excluded candidate can enter the plurality veto core exactly epsilon_*(n,m)=1/((m-2)n-2m)? Precisely, for every profile of n strict rankings of m candidates, let q(c)=plurality(c)/n and q_epsilon(c)=(q(c)+epsilon)/(1+m epsilon), with each voter weighted 1/n. For candidate a, let N_a(S) be the union, over voters v in S, of the candidates ranked at or below a by v. Define a to be in C_epsilon exactly if |S|/n <= sum_{c in N_a(S)} q_epsilon(c) for every voter set S. Is C_epsilon contained in C_0 for every profile and every 0<epsilon<epsilon_*(n,m), and does some profile have C_epsilon_* not contained in C_0?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Rossi's Theorem 4.1 provides the sufficient bound epsilon<1/((n-1)(m-1)-1) to keep the regularized plurality core inside the original core, but does not find the largest universally safe value. The exact threshold quantifies the amount of regularization the Pareto-efficient rule can use while retaining the original core's distortion guarantee by the same containment argument. It is a sharp statement for an infinite two-parameter family, not a numerical improvement for one election. Core membership may change nonmonotonically with epsilon, so the claim explicitly covers the entire interval below the first entry. This is an exact core-containment question and does not claim that distortion necessarily exceeds 3 above the threshold. Evidence: Exact enumeration of anonymous ballot types gives the formula for m=3 and every 8<=n<=25, m=4 and 6<=n<=9, and m=5,n=5,6. A separate constraint model checked all possible earlier Hall breakpoints for (m,n)=(5,8),(6,8),(7,8),(8,8),(5,12), finding none; it also found entry witnesses at the proposed threshold for m=3,...,10 with n=max(8,m). Smaller cases show exceptions, motivating the stated parameter range. The breakpoint check accounts for nonmonotonic core membership.

In Lean: plurality_veto_core_exact_regularization_threshold (statement)

OP-801 prime fixed offset linear probe stochastic maximumIn LeanData Structures

Let p be prime, 0<=t<p, and r=(r_0,...,r_{p-1}) any permutation of Z/pZ with r_0=0. Starting from an empty p-slot table, insert t keys with independent uniform home slots, each key occupying the first empty slot h+r_j. For an additional independent uniform home slot let T_r be the number of probes needed for insertion. Is Pr[T_r>k] <= Pr[T_lin>k] for every integer k>=0, where lin=(0,1,...,p-1)? Equivalently, does linear probing maximize every insertion-cost tail, and hence the expected insertion cost, among all fixed-offset orders on every prime-size table?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Guo, Pettie and Wan prove the uniform bound 1+2/epsilon^2 and identify linear probing as asymptotically sharp up to constants, but do not identify the finite-size worst offset order or compare entire probe-count distributions. An affirmative result gives an exact distributional extremizer for an infinite and practically standard family of table sizes, rather than merely improving the constant, and may connect additive structure of Z/pZ with clustering. The prime restriction is substantive: exhaustive computation finds larger costs on composite-size tables, and a ten-slot example violates tail dominance even though its first nonzero offset is a generator. The paper's recurrence bounds the worst occupancy probability but does not establish this comparison of coupled insertion processes. Evidence: Exact occupancy-state enumeration checked all offset orders for prime p=3,5,7 and all loads and tails. Rotation-compressed exact recursions found no violation in 10,000 normalized orders at p=11, 3,000 at p=13, or 120 structured near-periodic orders each at p=11,13,17; the compression was checked against uncompressed recursions. For composite n=10, offset order (0,1,5,6,7,2,3,8,9,4) gives a numerically larger tail at t=8,k=4 despite its first offset being 1.

In Lean: prime_fixed_offset_linear_probe_stochastic_maximum (statement), prime_fixed_offset_linear_probe_stochastic_maximum_three (partial), prime_fixed_offset_mean_le_of_tail_le (partial)

OP-802 energy filter rational resonance theta crossoverIn LeanStatistical Mechanics & Thermodynamics

Fix tau>0, coprime positive integers p,q and real c. For n divisible by four put alpha_n=p/q+c/sqrt(n); for all sufficiently large n this is positive. In each half of n qubits take n/4 Hamiltonian coefficients 1 and n/4 coefficients alpha_n; set H_n=sum_j a_j Z_j and let psi_n be the normalized state exp(-tau^2 H_n^2/4)|+>^tensor n. Define P_n=Tr[(Tr_B |psi_n><psi_n|)^2]. Let L be the 3-by-3 matrix with diagonal 2 and adjacent off-diagonal entries -1, and put D=p^2+q^2, u=pi^2 q^2/(2 tau^2)+pi^2 c^2 q^4/(4D), S_2=sum_{k in Z} exp(-u k^2), and S_4=sum_{v in Z^3} exp[-pi^2 q^2(v^T L^{-1}v)/tau^2 - pi^2 c^2 q^4 (v^T v+(v_1+v_2+v_3)^2)/(8D)]. Does sqrt(n) P_n tend to (2 sqrt(2) q/(tau sqrt(D))) S_4/S_2^2?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers using energy filters want the entanglement and matrix-product-state cost for finite precision couplings. The fixed-coupling question OP-798 predicts different rational and irrational constants but gives no uniform control when the coupling itself changes with size. This asks for the entire critical detuning window, resolving how a rational spectral resonance is rounded and predicting a nontrivial three-dimensional theta crossover for every coprime p,q, filter width and signed detuning. A pointwise fixed-alpha limit does not imply this moving-parameter limit. Evidence: Dicke-basis calculations for rational centers 1, 3/2 and 2/3, tau=2 or 4 and several detunings approach the predicted theta constants through n=640; e.g. at p/q=3/2, tau=4, c=0.5, sqrt(n)P_n is 0.432527, 0.433408, 0.433942 for n=240,400,640 versus prediction 0.435196. Independent full-Hilbert-space and Dicke calculations agree to 1e-15 for detuned systems through n=16. Convergence is slower for larger detuning.

In Lean: energy_filter_rational_resonance_theta_crossover (statement), energy_filter_rational_resonance_crossover_zero (partial), energy_filter_crossover_quad_form_nonneg (partial), energy_filter_crossover_u_pos (partial)

OP-805 unit first fixed offset mean probe maximumIn LeanData Structures

For every integer n>=2, let r=(r_0,...,r_{n-1}) be a permutation of Z/nZ with r_0=0 and gcd(r_1,n)=1. Starting from an empty n-slot table, insert t independent uniformly hashed keys for 0<=t<n, probing h+r_0,h+r_1,... in order for each key and occupying the first empty slot. Is the expected number of probes needed to insert one further independent uniformly hashed key always at most the expectation for ordinary linear probing r_j=j?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for a sharp finite-size performance comparison for every table size, including composite sizes used in real hash tables, and every load. It extends OP-801 in a genuinely different direction: OP-801 asks stochastic dominance only at prime size, whereas here the first offset generates the cyclic table but the remaining offsets are arbitrary and the claim is only about mean cost. Neither assertion implies the other. The generating condition matters: without it, a four-slot order (0,2,1,3) has expected cost 7/4 after two insertions, above the linear value 27/16. The stronger stochastic version is false even with a generating first offset, so the weakening to mean cost is essential. Evidence: Exact dynamic programming exhausts every normalized order with first offset 1 for n=4,6,8,9,10 and 12, including all 3,628,800 orders at n=12, with no violation at any load; multiplication by a unit makes this normalization without loss. Independent randomized and subgroup-structured searches cover n=12,16,18, and 120,000 adaptive 14-slot evaluations find no violation. For n=10, first offset 1 does not imply stochastic domination, so these checks concern the mean specifically.

In Lean: unit_first_fixed_offset_mean_probe_maximum (statement), unit_first_fixed_offset_mean_probe_eq_zero (partial), unit_first_fixed_offset_mean_probe_maximum_three (partial)

OP-806 inverse square ising bulk field polynomials real rootedIn LeanStatistical Mechanics & Thermodynamics

For each n>=2, let P_n(y) be the coefficient of x^n in the infinite-volume reduced free energy of the one-dimensional inverse-square ferromagnetic Ising model, with uniform dimensionless field h, x=pi^2 beta J, and y=tanh(h)^2. Equivalently, on an L-spin periodized ring set A_L(r)=L^(-2)csc^2(pi r/L) for nonzero residues and A_L(0)=0, define phi_L(x,h)=L^(-1) log sum_{sigma in {-1,1}^L} exp[x sum_{i<j} A_L(i-j)sigma_i sigma_j + h sum_i sigma_i], and take P_n coefficientwise as L tends to infinity in phi_L=log(2 cosh h)+sum_{n>=1} P_{n,L}(y)x^n. Are all zeros of every P_n real and simple, at most one nonpositive, and all at most 1?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The field polynomials encode all high-temperature nonlinear magnetic responses, and a real-root and location theorem would impose a strong global structure on their entire coefficient array. Rajabpour proves rationality, degree bounds and P_n(1)=0, but the paper does not ask about these roots. Its own alternating-sign conjecture concerns coefficient signs and is not this root-location question. The Lee-Yang theorem locates zeros of the full finite-volume partition function in the field fugacity, not zeros in y of a fixed coupling-expansion coefficient of the logarithm; it cannot simply be applied term by term. Computation also rules out an easy finite-ring transfer: at order 10 the four-site field coefficient has nonreal zeros, although all reconstructed bulk polynomials through order 26 have only real simple roots. Evidence: Exact rational Sturm counts and polynomial gcds applied to the author's reconstructed coefficient table give n distinct real roots, all <=1 and at most one <=0, for every order n=2,...,26; the negative root present at n=2,...,9 disappears in the tabulated orders 10,...,26. Independent exact spin enumeration and finite-size interpolation reproduce the first four bulk polynomials. The finite-ring property fails: at n=10 on the four-site ring only eight of the ten roots are real. The tabulated high-order coefficients themselves are reconstructed and checked data, not independently certified by this experiment.

In Lean: ising_ring_spin (definition), ising_polynomial_real_simple_root_location (definition), ising_inverse_square_order_two_root_location (partial), ising_inverse_square_ring_kernel (definition), ising_inverse_square_ring_free_energy (definition), ising_inverse_square_ring_coefficient (definition), ising_inverse_square_bulk_field_polynomial (definition), ising_inverse_square_bulk_field_polynomials_real_rooted (statement), ising_inverse_square_bulk_field_polynomial_two (partial), ising_inverse_square_bulk_order_two_root_location (partial)

OP-808 solvable group flag hash cost distribution invarianceIn LeanData Structures

Let G be a finite group with a subnormal series {e}=H_0 normal-in H_1 normal-in ... normal-in H_k=G, such that each quotient H_i/H_{i-1} has prime order p_i. For each i choose representatives g_{i,0}=e,g_{i,1},...,g_{i,p_i-1} in H_i whose cosets are the successive powers of g_{i,1}H_{i-1}; the representatives within those cosets are otherwise arbitrary. Write j=sum_i d_i product_{a<i}p_a, 0<=d_i<p_i, and set r_j=g_{k,d_k}...g_{1,d_1}. Starting with all |G| slots empty, each key independently selects a uniform h in G and probes h r_0,h r_1,... until the first empty slot. For every 0<=t<|G|, is the entire distribution of the number of probes used to insert key t+1 determined solely by the ordered prime indices p_1,...,p_k, independent of the group, normal series and representatives? Equivalently, does it always equal the distribution for the cyclic group Z/|G|Z and its mixed-radix reversed offset sequence for the same ordered primes?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This connects fixed-offset hash-table analysis to the normal-series structure of finite solvable groups. It would turn an exponential-state stochastic process into a universal invariant of the ordered composition factors and transfer complete cost distributions, not merely asymptotic bounds, across cyclic, product and nonabelian slot groups. The fixed-offset upper bound of Guo, Pettie and Wan neither addresses nonabelian groups nor identifies distributions. Normality is a substantive boundary: the natural analogous flag in S_3 through a nonnormal order-two subgroup gives different cost tails from the cyclic flag. Evidence: Exact integer dynamic programming gives identical entire probe-cost histograms for all five abelian groups of order 16 with prime flag (2,2,2,2); for the cyclic and elementary-abelian groups of order 9 and 25; and for the cyclic and product groups of order 12. It also agrees for all tested normal flags in D4 and the non-supersolvable group A4, and for the normal order-three flag in S3. By contrast, an S3 flag through a nonnormal order-two subgroup changes the tail after four insertions. Independent paired Monte Carlo at order 49 is consistent with, but does not establish, equality.

In Lean: flag_hash_offset_zero (partial), group_hash_probe_tail_count_zero_tail (partial), group_hash_probe_tail_count_t_zero_succ (partial), solvable_group_flag_hash_cost_invariance (statement)

OP-809 fixed offset hash worst mean mixed radixIn LeanData Structures

For every n>=2, let n=p_1...p_k be an ordered prime factorization, allowing repeated primes. Write each j in {0,...,n-1} uniquely as j=d_1+p_1 d_2+...+(p_1...p_{k-1})d_k with 0<=d_i<p_i, and define the mixed-radix reversed offset r_j=sum_{i=1}^k d_i n/(p_1...p_i) in Z/nZ. Starting with an empty table of n slots, insert t independent uniformly hashed keys using any common fixed offset permutation, for 0<=t<n, and measure the expected probes required by one further independent uniformly hashed key. Is this expectation always at most the maximum of the expectations obtained from the mixed-radix reversed offsets over all orderings of the prime factors of n? The maximizing factor ordering may depend on t.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Finding the genuinely worst fixed probe order matters for exact open-addressing performance guarantees. Guo, Pettie and Wan give an asymptotically sharp bound for arbitrary fixed offsets; this asks for a structural extremizer at every finite size and load, reducing optimization over n! orders to the finitely many orders of the prime factors. It extends the prime-size linear-probing comparison in OP-801 from prime n and stochastic tails to arbitrary n and mean cost; composite table sizes give strictly worse orders, so that prime result alone does not answer this question. The optimizer can change with load: at n=6 the factor order (2,3) gives the larger mean after two insertions, while (3,2) is larger after three. Evidence: Exact dynamic programming checked all offset orders through n=12 after grouping by multiplication by units: mixed-radix orders attain the maximum at every load, including all 18,144,000 normalized orders at n=12. Further exact occupancy calculations found no larger mean in random or near-radix orders at n=14,15,16,18,20,21, and targeted annealing tested 180,000 orders at n=14,15,16. An independently implemented uncompressed occupancy DP agrees on the candidate costs at n=9,10,12.

In Lean: mixed_radix_offset_mean_probe_zero (partial), fixed_offset_hash_worst_mean_mixed_radix_prime (partial), fixed_offset_hash_worst_mean_mixed_radix (statement)

OP-810 dual melas adjacent cyclic patterns bivariate poisson limitIn LeanInformation Theory & Coding

For every k>=3 choose a primitive element alpha_k of F_(2^k) and nonzero c_k in F_(2^k). Form the period-(2^k-1) binary sequence s_i=Tr(alpha_k^i+c_k alpha_k^(-i)). Choose a uniform binary word W of length k, put RW=(W_2,...,W_k,W_1), and let N_w count cyclic occurrences of w in one period of s. Does (N_W,N_RW) converge jointly in distribution, uniformly over all choices of alpha_k and c_k, to (A+C,B+C), where A,B,C are independent Poisson random variables each of mean 1/2?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks coding theorists for correlations among neighboring patterns in the dual Melas sequence, a stronger and genuinely multivariate randomness statistic than the paper's single-pattern Poisson conjecture. Overlap creates a shared Poisson component: occurrences of W followed by W's first bit simultaneously count RW. Marginal Poisson convergence alone cannot determine their joint law and the paper's first three averaged factorial moments do not control mixed pattern moments. Evidence: Experiment 11741 enumerates all nonzero c for k=4..8 and four c values for k=9..14, using primitive polynomials and cyclic traces; at k=14 the four cross moments range 1.50543..1.51312 against predicted 1.5, while joint-zero frequencies range .21790.. .23169 against exp(-1.5)=.22313. This samples primitive-element choices, not all of them.

In Lean: bivariate_poisson_pmf_zero_zero (partial), dual_melas_pattern_count_sum (partial), dual_melas_adjacent_cyclic_patterns_bivariate_poisson_limit (statement)

OP-812 critical regular ising two layer weak matching quartic crossoverIn LeanStatistical Mechanics & Thermodynamics

Fix an integer d >= 3 and c >= 0. For each n with dn even, draw independent uniform simple d-regular graphs G_1,G_2 on the common vertex set [n]. On two copies of [n], let the zero-field Ising Gibbs weight be exp{beta_c sum_{i=1,2} sum_{uv in E(G_i)} sigma_{i,u} sigma_{i,v} + c n^{-1/2} sum_{v=1}^n sigma_{1,v} sigma_{2,v}}, with beta_c=atanh(1/(d-1)). If M_i=sum_v sigma_{i,v}, does the random Gibbs law of (n^{-3/4}M_1,n^{-3/4}M_2) converge in probability with respect to the graphs, weakly, to the deterministic probability density Z^{-1} exp[-a_d(x^4+y^4)+cxy], where a_d=(d-2)(d-1)/(12d^2)?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers studying coupled critical systems need the crossover distribution, not just the critical exponent. Prodromidis and Sly establish the quartic law for one isolated random regular system; the matching has vanishing per-edge strength but produces order-one coupling at the n^{3/4} fluctuation scale. Their single-layer convergence does not control the random overlap, its exponential tilt, or quenched normalization. The question asks for an explicit joint finite-size scaling law for every degree and coupling strength. Evidence: Experiment 11739 exactly sums the finite Gibbs measure for three pairs of random graphs per size n=8,12,16,18 and d=3,4 using tensor-product transfer; the rescaled cross moment is zero at c=0 and positive for c=.25,.5. The observed values remain well below the putative limit at these sizes, so this is qualitative finite-size evidence only.

In Lean: ising_two_layer_quartic_density (definition), ising_two_layer_quartic_expectation (definition), ising_two_layer_quartic_density_pos (partial), ising_two_layer_edge_energy (definition), ising_two_layer_weight (definition), ising_two_layer_observable (definition), ising_two_layer_gibbs_expectation (definition), ising_two_layer_bad_fraction (definition), critical_regular_ising_two_layer_weak_matching_quartic_crossover (statement), ising_two_layer_weight_zero_coupling (partial)

OP-813 xz scar uniform reduced spectrum odd length doublingIn LeanQuantum Mechanics

Let I,X,Y,Z be the Pauli matrices and let M_00=X, M_01=Y, M_10=I, M_11=Z. For each integer L>=3 define the Hermitian 2^L by 2^L matrix A_L=2^(-L) sum_{a in {0,1}^L} tensor_{j=1}^L M_(a_j,a_{j+1}), with a_(L+1)=a_1, and define the normalized density matrix rho_L=A_L^2. For every odd L>=3, is the complete eigenvalue multiset of rho_(2L), including multiplicities, equal to {lambda_i lambda_j : 1<=i,j<=2^L}, where lambda_1,...,lambda_(2^L) are the eigenvalues of rho_L? Equivalently, does there exist a unitary U_L with rho_(2L)=U_L(rho_L tensor rho_L)U_L^dagger?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The matrices describe the half-chain reduced state of the uniform superposition of valid antipodal XZ-chain zero modes in a recent quantum many-body paper. Its Appendix C calculates only purity using a 16-by-16 transfer matrix. Complete spectrum factorization would yield exact doubling identities for all Renyi entropies and von Neumann entropy, expose a parity-sensitive decoupling of the scar state's entanglement spectrum, and is not determined by purity. The precise odd-length restriction is needed: even lengths fail computationally. Evidence: Experiment 11752 independently constructs and diagonalizes the exact finite Pauli sums: sorted rho_(2L) spectra agree with the tensor-square spectra to max error 7.7e-17 for L=3 and 7.9e-17 for L=5; the corresponding max errors for L=2 and 4 are .1875 and .0293. Experiment 11748 computes von Neumann entropy across L=2..10 and observes the predicted doubling at 3->6 and 5->10.

In Lean: xz_scar_uniform_reduced_spectrum_odd_length_doubling (statement), xz_scar_reduced_spectrum_doubling_three (partial), xz_scar_purity_doubling_of_odd_length (partial), xz_scar_reduced_spectrum_doubling_even_fails_two (partial)

OP-814 scaled common ratio bivalued efx fpo envyfreeableIn LeanFair Division

For every n>=2, finite set M of indivisible goods, real ratio r>1, and positive scales a_1,...,a_n, suppose agents have additive valuations with v_i(g) in {a_i,r a_i} for every agent i and good g. Must there exist a complete allocation A and nonnegative subsidies s_1,...,s_n such that: (i) A is EFX, i.e. v_i(A_i)>=v_i(A_j\{g}) for all i,j and all g in A_j; (ii) v_i(A_i)+s_i >= v_i(A_j)+s_j for every i,j; and (iii) A is fractionally Pareto optimal, meaning no fractional reassignment of M weakly improves every agent and strictly improves at least one?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This connects two active fair-division lines: Bu et al. obtain an ex-ante envy-free, ex-post EFX and fPO lottery for a common pair of item values, while Panchapakesan and Vaish connect subsidy-supported EFX allocations to such lotteries and show the converse fails for more general domains. All EFX, fPO, and ex-ante EF claims survive positive agent-wise rescaling, but envy-freeability does not. The problem asks whether the scaled common-ratio bivalued domain closes this reverse direction with fractional efficiency, for arbitrary numbers of agents and goods. Neither a lottery nor an EFX+fPO allocation alone supplies a subsidy-supported outcome. Evidence: Experiment 11758 tests 50 random profiles for each r in {2,3,5,20} and each (n,m) in {(3,4),(3,6),(3,8),(4,5),(4,6),(4,7)} with independent heterogeneous positive scales: it enumerates all complete allocations, checks EFX and every bundle permutation for envy-freeability, and checks fPO by a fractional-allocation linear program. Every one of the 1,200 profiles had a qualifying allocation. Experiment 11756 separately checks integer Pareto optimality for 700 additional random profiles.

In Lean: scaled_common_ratio_bivalued_efx_fpo_envyfreeable (statement), scaled_common_ratio_bivalued_efx_fpo_envyfreeable_two_agents (partial)

OP-819 online single high frequency efx sharp sqrt lawIn LeanFair Division

For an integer R>=2, let alpha_R be the supremum of all alpha in [0,1] for which the following holds for every number m>=1 of goods: there is a deterministic online algorithm for three agents, told m and R in advance, that irrevocably assigns each arriving good after observing all three values and always returns an alpha-EFX allocation against any adaptive adversary. Each agent has additive values, exactly one good of value R and m-1 goods of value 1, as known in advance; the high-valued good may be different for different agents. Alpha-EFX means v_i(A_i)>=alpha*v_i(A_j\{g}) for every i!=j and every g in A_j. Is lim_{R to infinity} sqrt(R)*alpha_R=1?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for the sharp dependence on a bounded value ratio in an online fairness model with exact frequency predictions. Neoh and Teh's Theorem 4.2 proves that no R-independent positive EFX ratio exists, even with precisely one high-value good per agent, but its qualitative impossibility does not determine the decay rate or produce an algorithm matching the adversary. A sharp square-root law would quantify how much valuation heterogeneity harms online EFX and identify the optimal competitive scale, even in their simplest impossibility class. The paper's EF1 bounds do not imply an EFX lower bound. This covers every m and all adaptive arrivals, not only a finite example or the paper's adversarial arrival order. Evidence: Exact rational backward induction over the unrestricted adaptive game gives alpha(m,R)=1/10 at m=13,R=100, and alpha(m,R)=4/125 at m=35,R=1000, with surrounding m=29..38 no smaller in experiment 12078. Experiments 12070 and 12073 cover other m and R. Independently, in the paper's restricted scenario where all high values occur in the final two goods, experiment 12067 minimizes over the low-good count through a growing square-root window and finds restricted-game values 1/10 at R=100, 1/17 at R=300, and 4/125 at R=1000; the products with sqrt(R) are 1.000, 1.019 and 1.012. These finite searches do not establish the universal limit.

In Lean: op819_has_online_single_high_alpha_mono (partial), op819_single_high_efx_one_good (partial), op819_online_single_high_efx_sharp_sqrt_law (statement)

OP-822 tree binary embedding steiner optimum equalityIn LeanApproximation & Inapproximability

For every finite tree T on at least two vertices, are the following two optima equal? In both cases minimize sum_{uv in E(T)} dist_H(u,v) over finite unweighted trees H of maximum degree at most three containing V(T). In the first optimization require V(H)=V(T); in the second permit any additional vertices. Equivalently, can every tree demand instance attain its optimal binary-host routing cost without using a Steiner vertex?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Demand-aware network design asks whether extra routing devices improve the best topology. Weisbrodt and Werner give an 8/3-approximation for TBT without Steiner vertices and a PTAS for TBT-SN with Steiner vertices, while Kellerhals et al. remove Steiner nodes from one special constructed solution at additive cost up to n-1. Neither result establishes equality of the two optimal values or a cost-preserving replacement for arbitrary optima. Such an equality, or a structural counterexample, would resolve a basic comparison between the models; a constructive cost-preserving version could also connect their approximation algorithms. This asks a concrete finite graph statement rather than the separate dropped PTAS-versus-hardness question OP-768. Evidence: Experiments 12093 and 12096 exhaust all nonisomorphic demand trees through n=8 and all subcubic host shapes with every possible injective terminal labeling and all extra vertices of degree three: no Steiner host improves the terminal-only optimum. For n=9, experiment 12106 checks all 29 demand trees of maximum degree at least four against all hosts with one or two Steiner vertices; experiment 12108 checks the remaining cases where three or more Steiner vertices could improve, discarding hosts whose number of edges already exceeds the terminal-only optimum. No improvement occurs; the 18 subcubic demand trees are already optimal with cost eight. The paper observes that an optimum with Steiner vertices can be taken to have every Steiner vertex of degree three, bounding the required search. The finite results do not settle the general question.

In Lean: tree_binary_embedding_steiner_optimum_equality (statement), tbt_sn_opt_le_tbt_opt (partial), tbt_opt_eq_sn_opt_of_is_subcubic (partial)

OP-825 inhomogeneous dephased path mmi local noise criterionIn LeanQuantum Mechanics

For n>=3 and q_0,...,q_{n-1} in [0,1], define a set function H on subsets of the path {0,...,n-1} as follows. For S, put an auxiliary graph on S, joining the two neighbors of each vertex outside S that has two neighbors in S, and mark the unique S-neighbor of each outside vertex that has exactly one neighbor in S. Let F(S) be the connected auxiliary components containing no marked vertex. Define H(S)=|S|-|F(S)|+sum_{C in F(S)} h_2((1-product_{j in C}q_j)/2), with binary entropy h_2(0)=h_2(1)=0. Is the following exact equivalence true: H(A)+H(B)+H(C)-H(A union B)-H(A union C)-H(B union C)+H(A union B union C)<=0 for every triple of disjoint subsets A,B,C if and only if q_i>=q_{i-1}q_{i+1} for every 1<=i<=n-2?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The set function is the stabilizer-kernel formula for von Neumann entropy of a path graph state under independent Z-flips with probabilities p_i=(1-q_i)/2. The question therefore asks for a complete, local characterization of a global multipartite-information inequality under spatially varying noise. It strictly extends the uniformly dephased path case in OP-820, since a common q in [0,1] always satisfies q>=q^2, and it explains why nonuniform noise can cause violations. The purely scalar formulation avoids the density-matrix and partial-trace infrastructure that the referee identified as a barrier for OP-820. Neither the pure graph-state cut-rank formula nor the uniform-noise Bernstein certificate OP-823 determines the heterogeneous criterion. The proposed local witness is independently testable: for A={0,...,i-1}, B={i}, C={i+1,...,n-1}, the computed I3 is h_2((1-q_i)/2)-h_2((1-q_{i-1}q_{i+1})/2). Evidence: Experiment 12143 exhausts all 3^n rate profiles with p_i in {0,1/4,1/2} and all four-region partitions through n=8, with zero disagreements. Experiments 12140 and 12142 test random heterogeneous profiles and all partitions through n=11, again without a disagreement. Experiment 12144 independently compares all reduced entropies to direct partial traces of noisy density matrices through n=6; experiment 12145 verifies the local three-block witness to numerical precision through n=12. This is finite and numerical evidence, not a proof.

In Lean: inhomogeneous_dephased_path_mmi_local_noise_criterion (statement), dephased_path_three_block_witness (partial), dephased_path_mmi_n_eq_three (partial)

OP-826 online single high frequency exact efx envelopeIn LeanFair Division

For integer R>=2, define alpha_R as the supremum of alpha in [0,1] such that, for every m>=1, three agents with additive valuations can be allocated m arriving goods by a deterministic online algorithm guaranteeing alpha-EFX against every adaptive adversary, when the algorithm knows in advance that each agent has exactly one good worth R and all her other goods worth 1. Is alpha_R exactly min{1/floor(sqrt R), ceil(sqrt R)/R}? Here alpha-EFX requires v_i(A_i)>=alpha*v_i(A_j\{g}) for all distinct i,j and g in A_j.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This is a strictly stronger, exact version of the square-root limit in OP-819, discovered by extending its minimax computation. It predicts a discrete phase diagram for every value ratio, including the exact crossover between 1/k and k/R and exact EFX at R=2, and would give decision-makers a sharp finite guarantee rather than only an asymptotic scale. Neoh and Teh establish impossibility of any value-ratio-independent positive EFX factor even in this single-high class, but do not determine bounded-ratio optima. Both an algorithm for every m and a matching adaptive adversary are required; the finite minimax instances alone do not supply either universal direction. Evidence: Experiment 12152 uses exact rational backward induction for all integer R=2,...,50 and every m up through ceil(sqrt R)+6; the minimum over those m agrees with the proposed formula for every R. Experiment 12159 checks the remaining larger range through m=3 ceil(sqrt R)+6 for selected ratios 3,7,13,21,31,43,47,75,100 and finds no smaller value. Experiment 12078 checks the crossover for R=1000, finding the predicted 4/125 at m=35. These are bounded searches and do not establish the claim for all m or R.

In Lean: op826_envelope_at_two (partial), op826_envelope_perfect_square (partial), op826_online_single_high_efx_ratio_le_one (partial), op826_online_single_high_efx_upper_bound_two (partial)

OP-827 inhomogeneous dephased tree mmi local noise criterionIn LeanQuantum Mechanics

Let T=(V,E) be any finite tree and let q_v be in [0,1] for every vertex. For S subset V, let K_S be the kernel over F_2 of the adjacency submatrix with rows V\S and columns S, and write d_S=dim K_S. For each character chi:K_S -> {+1,-1}, set P_S(chi)=2^{-d_S} sum_{x in K_S} chi(x) product_{i in S:x_i=1} q_i, and define H(S)=|S|-d_S-sum_{chi} P_S(chi) log_2 P_S(chi), using 0 log 0=0. Is H(A)+H(B)+H(C)-H(A union B)-H(A union C)-H(B union C)+H(A union B union C)<=0 for every triple of pairwise disjoint subsets A,B,C of V if and only if both local conditions hold: (i) at every degree-two vertex v with neighbors u,w, q_v >= q_u q_w; (ii) at every vertex v of degree at least three, at most one neighbor u has q_u>0?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The finite scalar function is the subsystem von Neumann entropy of the tree graph state after independent local Z noise with probabilities p_i=(1-q_i)/2. This asks whether all exponentially many tripartite-information inequalities on an arbitrary noisy tree are controlled by one local inequality at each degree-two vertex and a support condition at each branching vertex, including the singular fully-dephased boundary. It strictly strengthens the path-only heterogeneous criterion OP-825 and the uniform-noise branched-tree question OP-820; neither gives mixed-rate branching or the zero-noise-parameter boundary. A local characterization would be useful for quantum-correlation and holographic-entropy tests on noisy tree-like resources. Evidence: Experiment 12166 checks every noise profile q_i in {0,1/2,1} on every nonisomorphic tree through 7 vertices against all four-region partitions, with no disagreement. Experiment 12175 checks every locally admissible such profile, 8,189 in all, on every 8-vertex tree and every partition, with no violation. Experiment 12155 checks the branch witness I3=1-h_2((1-q_u q_w)/2) for arbitrary noise on every tree through 8 vertices. Experiment 12177 independently checks the kernel entropy formula against direct density-matrix partial traces through 6 vertices (maximum error 5.4e-15). Experiment 12176 uses 80-digit arithmetic to validate a small positive branch violation that ordinary floating-point tolerance initially missed. These are numerical finite checks, not a proof.

In Lean: op_827_inhomogeneous_dephased_tree_mmi_criterion (statement), dephased_tree_mmi_implies_local_noise_criterion (partial), dephased_tree_mmi_zero_noise_profile (partial)

OP-828 tree graph renyi spectral collision extensive mmi gapIn LeanQuantum Mechanics

For a tree T, let c_s(T) count its connected vertex subsets of size s, and let M(T) be the maximum tripartite information over disjoint vertex subsets A,B,C of its pure graph state, in bits. For each N let D_N be the largest |M(T)-M(T')| over N-vertex trees T,T' with c_s(T)=c_s(T') for every s. Is limsup_{N->infinity} D_N/N at least 1/32? More concretely, take the two trees on vertices 0,...,15 with edge sets E=[(1, 0), (1, 2), (1, 7), (1, 8), (0, 9), (2, 3), (2, 6), (3, 4), (4, 5), (9, 10), (9, 14), (10, 11), (11, 12), (11, 13), (14, 15)] and E'=[(1, 0), (1, 2), (1, 7), (0, 8), (2, 3), (2, 6), (3, 4), (4, 5), (8, 9), (8, 13), (8, 15), (9, 10), (10, 11), (10, 12), (13, 14)], and mark vertices 9 and 1 respectively. For each k>=1 form T_k, T'_k by joining k copies of the corresponding marked tree in a chain using one edge between consecutive marked vertices. Do all c_s(T_k)=c_s(T'_k), while M(T_k)=floor(5k/2) and M(T'_k)=3k?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Equal connected-subtree counts imply equality of the entire integer-order Renyi multi-entropy spectrum of the pure tree graph states by the 2026 connected-subtree formula. A positive linear gap would show that even that complete spectrum does not determine the strongest tripartite-information witness to monogamy failure, and that its blindness can be extensive rather than a finite-size accident. The quantitative asymptotic question bridges that paper with Fuentes et al.'s graph-state monogamy program and the knowledge base's tripartite-information cut-rank results. The two papers do not compare these invariants. Evidence: Experiment 12179 enumerates all unlabeled trees through 17 vertices and finds equal-subtree-count examples with different claw-packing bounds. Experiment 12184 independently exhausts 171,798,901 unlabeled four-region partitions for each 16-vertex seed and obtains M=2 and 3, respectively; it also checks an 11-vertex collision with maxima 2 and 1. Experiment 12185 computes all subtree-count coefficients and maximum I3 by a tree dynamic program for the specified chains k=1,...,25 (up to 400 qubits), matching the equal-spectrum and exact-maxima predictions in every case. The dynamic program was checked against brute force on all trees through eight vertices and against the two 16-vertex seeds. Experiment 12182 used a faulty vertex relabeling and is excluded.

In Lean: chain_trees_claw_packing_gap_rate (partial), chain_trees_floor_claw_packing_gap_ge (partial), op_828_tree_graph_renyi_spectral_collision_extensive_mmi_gap (statement), chain_trees_extensive_mmi_gap_of_exact_claw_packings (partial), chain_tree_vertex_count (partial)

OP-840 Gap between quantum and classical zero-error equality certification with multi-bit messagesIn LeanCommunication Complexity

In zero-error certification of equality where Alice and Bob receive labels $s, t \in \{1, \dots, N\}$ with $N > 2^k$ and Alice sends Bob a $k$-bit message ($k \ge 2$), classical protocols with shared randomness achieve an optimal worst-case conclusive probability of $(2^k - 1)/N$, while commuting-operator quantum protocols are bounded above by $(2^k - 1)/(N-1)$. For integers $k \ge 2$ and $N > 2^k$, is the optimal entanglement-assisted zero-error efficiency strictly greater than the classical value $(2^k - 1)/N$, or does quantum entanglement offer no advantage over shared randomness?

Posed in arXiv:2610.41448, Sec. 9, para. 5 — An Unbounded Separation of Almost-Quantum and Commuting-Operator Correlations in Zero-Error Communication

In Lean: op_840_no_quantum_advantage_multibit_equality (statement), commuting_quantum_efficiency_classical_lower_bound (partial), commuting_quantum_efficiency_one_bit (partial)

OP-851 Constant-factor approximation for non-adaptive stochastic MST identificationIn LeanApproximation & Inapproximability

Let $G = (V, E)$ be a finite connected graph. Each edge $e \in E$ is independently assigned a binary weight $w_e \in \{0, 1\}$ such that $P(w_e = 1) = p_e$ and $P(w_e = 0) = 1 - p_e$, where $p = (p_e)_{e \in E} \in (0, 1)^E$ is given. In the non-adaptive stochastic minimum spanning tree identification problem, an algorithm specifies a permutation $\pi = (e_1, \dots, e_{|E|})$ of $E$. The edges are queried in the order $\pi$ until the revealed weights uniquely identify a subset of edges forming an MST of $G$ under the true weights. The objective is to minimize the expected number of queries. Does there exist a polynomial-time algorithm that computes a non-adaptive querying order $\pi$ achieving a constant-factor approximation to the optimal non-adaptive expected query cost on all connected graphs $G$ and probability vectors $p$?

Posed in arXiv:2610.40844, Sec. 8 — Stochastic Minimum Spanning Tree Identification with Binary Weights

What is known

The paper presents an O(log |E|)-approximation algorithm for non-adaptive stochastic MST identification via reduction to submodular ranking, but leaves open whether a constant-factor approximation exists.

In Lean: nonadaptive_mst_stopping_time_of_isTree (partial), nat_self_delimiting_code (definition), stochastic_mst_instance_code (definition), edge_order_code (definition), nonadaptive_mst_poly_time_constant_factor_approximation (statement)

OP-853 Polynomial bound on the submodular goal value for stochastic MST identificationIn LeanSubmodular & Combinatorial Optimization

Let $G = (V, E)$ be a finite connected graph. A partial realization is a function $\beta \colon E \to \{0, 1, *\}$, where $*$ denotes an unqueried edge. A partial realization $\beta$ is an MST identification certificate for $G$ if every full realization $\alpha \colon E \to \{0, 1\}$ extending $\beta$ shares the same set of minimum spanning trees (equivalently, every edge in the graph minor $G_\beta$, formed by contracting edges with $\beta(e) = 0$ and deleting edges with $\beta(e) = 1$, is either a loop or a bridge). A function $g \colon \{0, 1, *\}^E \to \{0, 1, \dots, Q\}$ is a submodular goal function with goal value $Q$ if: (1) $g(*, \dots, *) = 0$; (2) $g(\beta) \le g(\gamma)$ whenever $\beta \preceq \gamma$; (3) for all $\beta \preceq \gamma$, $e \in E$ with $\gamma(e) = *$, and $s \in \{0, 1\}$, $g(\beta_{e \leftarrow s}) - g(\beta) \ge g(\gamma_{e \leftarrow s}) - g(\gamma)$; and (4) $g(\beta) = Q$ if and only if $\beta$ contains an MST identification certificate. Let $Q_{\mathrm{ID}}(G)$ be the minimum goal value $Q$ of such a function. Is there a polynomial $P$ such that $Q_{\mathrm{ID}}(G) \le P(|E|)$ for every connected graph $G$?

Posed in arXiv:2610.40844, Sec. 7 — Stochastic Minimum Spanning Tree Identification with Binary Weights

What is known

A polynomial bound on Q_ID(G) would immediately yield an O(log |E|)-approximation algorithm for the adaptive stochastic MST problem via stochastic submodular cover. The authors showed Q_ID is at least the rank times corank for multi-edge cycles, and computed Q_ID for small graphs, but its asymptotic worst-case growth remains unknown.

In Lean: mst_certificate_monotone (partial), tree_submodular_goal_value_zero (partial), op_853_polynomial_submodular_goal_value_bound (statement)

OP-861 Least intersection parameter for standard list uncolorability in bipartite subset graphsIn LeanGraph Theory & Graph Algorithms

For an integer $k \\ge 2$ and an integer $r \\ge 0$, let $G(k,r)$ be the bipartite graph whose two vertex classes $A$ and $B$ are disjoint copies of the family $\\binom{[2k-1]}{k}$ of all $k$-element subsets of $\{1, \\dots, 2k-1\}$, where two vertices $a_S \\in A$ and $b_T \\in B$ are adjacent if and only if $|S \\cap T| \\le r$. Assign each vertex its corresponding subset as its list of available colors: $L(a_S) = S$ and $L(b_T) = T$. Define $r^*(k)$ to be the minimum integer $r \\ge 0$ such that $G(k,r)$ has no proper list coloring from $L$. Is $r^*(k) = \\Theta(\\sqrt{k \\ln k})$ as $k \\to \\infty$, or is $G(k,r)$ uncolorable from standard lists for an asymptotically smaller parameter $r = o(\\sqrt{k \\ln k})$?

Posed in arXiv:2610.42094, after Corollary 1.4 — A Counterexample to the Alon-Krivelevich Conjecture and a New Lower Bound for Choosability of Bipartite Graphs

What is known

Theorem 1.3 proves that r^2 > 2(2k-1) ln(2k-1) is sufficient for uncolorability from standard lists, giving r on the order of sqrt(k ln k). The paper explicitly notes that it leaves open the true least value of r for which G(k,r) is uncolorable from these lists.

In Lean: bipartite_subset_uncolorable_of_ge (partial), op_861_least_uncolorable_intersection_param_asymptotic (statement), bipartite_subset_colorable_at_one (partial), op861_no_right_equivariant_k6_r3 (partial), bipartite_subset_colorable_two_from_five (partial), op861_no_threefold_right_equivariant_k7_r3 (partial), op861_selector_palette_lower_bound (partial)

OP-864 Shannon OR-Capacity of Categorical Products with Smaller Capacity ThreeIn LeanInformation Theory & Coding

Let C_OR(G) denote the Shannon OR-capacity of a simple graph G, defined as sup_{n ≥ 1} (omega(G^{∨n}))^{1/n}, where G^{∨n} is the n-th OR-power (co-normal product) of G and omega is the clique number. For any two finite simple graphs G and H, if min{C_OR(G), C_OR(H)} = 3, does their categorical product G × H (with vertex set V(G) × V(H) and an edge between (u_1, v_1) and (u_2, v_2) if and only if u_1 ~ u_2 and v_1 ~ v_2) satisfy C_OR(G × H) = 3?

Posed in arXiv:2610.41977, Sec. 6, Question 1 — Hedetniemi's conjecture for Shannon OR-capacity: counterexamples and asymptotic separation

What is known

The paper proves counterexamples for every integer capacity m ≥ 7 and for a pair with capacities below 6, while Hedetniemi's identity is known to hold for smaller factor capacity 1 and 2. Capacity 3 is the first integer case remaining open.

In Lean: shannon_or_capacity_categorical_prod_three (statement), shannon_or_capacity_categorical_prod_le_min (partial), shannon_or_capacity_categorical_prod_of_min_eq_one (partial), shannon_or_capacity_categorical_prod_of_min_eq_two (partial)

OP-869 Online Coloring Bounds for k-Colorable Graphs for k >= 4In LeanOnline Algorithms

For an integer $k \ge 4$, what are the optimal bounds on the number of colors required by deterministic and randomized online algorithms to properly color any online $k$-colorable graph on $n$ vertices? In particular, for any fixed $k \ge 4$, does there exist an absolute constant $c_k > 0$ such that every deterministic online coloring algorithm requires at least $\exp(c_k (\log n)^{1/(k-1)} (\log\log n)^{(k-2)/(k-1)})$ colors in the worst case on some $n$-vertex $k$-colorable graph, and does there exist a randomized online coloring algorithm that uses $O(n^{(k-2)/(k-1)})$ colors in expectation?

Posed in arXiv:2610.41516, Remark 1.3(3) — New bounds for online coloring three-colorable graphs

What is known

The paper focuses on 3-colorable graphs, establishing subpolynomial lower bounds and O(sqrt(n)) randomized upper bounds, but explicitly leaves open the quantitative generalization to k-colorable graphs for k >= 4.

In Lean: op869_online_coloring_clique_exact (partial), op869_online_coloring_deterministic_lower_bound (statement)

OP-886 two chore types pmms fractional pareto sharp four thirdsIn LeanFair Division

Is 4/3 the optimal universal constant alpha with the following property? For every n>=2, counts a,b>=0, and positive additive chore costs c_i(A)=p_i and c_i(B)=q_i for agent i, there is a complete allocation X of a identical type-A and b identical type-B chores that is fractionally Pareto optimal and satisfies c_i(X_i) <= alpha min_{T subset X_i union X_j} max(c_i(T),c_i((X_i union X_j)\T)) for every distinct i,j. Fractional Pareto optimal means there is no feasible division of the chores into fractional shares that weakly decreases every agent's total cost and strictly decreases at least one. In particular, does such an allocation always exist for alpha=4/3, and for every alpha<4/3 does some instance have none?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks how much pairwise fairness must be sacrificed to retain the strongest standard efficiency guarantee for two common chore types. The KB shows exact PMMS may fail for general chores. Aziz et al. prove EFX existence and separately EF1 plus fPO for two types: EFX implies PMMS, but their EFX allocation need not be fPO, and their fPO allocation need not be PMMS. Experiment 12769 finds even the two-type conjunction fails. EF1 alone gives only the generic 3/2 PMMS factor, so 4/3 would be a nontrivial sharp improvement. The ratio is not a small-instance-only question: it quantifies over arbitrary agents and both type multiplicities, and the lower-bound family tends to 4/3. Evidence: Exact enumeration over 14,520 two- and three-agent cases in 12771 found no optimum above 5/4 on its coarse cost grid. A denser two-agent grid and randomized 3-5 agent search in 12776 found no optimum above 4/3. In 12781, for two agents, two items of each type, and cost pairs (k,2k+1) and (1,2), the enumerated best fPO factor is (4k+1)/(3k+1) for k=2,3,5,10,20,100,1000, approaching 4/3; these are computations, not a proof of the family formula.

In Lean: two_chore_types_pmms_fractional_pareto_sharp_four_thirds (statement), op886_two_type_chores_alpha_pmms_fpo_mono (partial), two_chore_types_exact_pmms_fpo_incompatible (partial), single_chore_type_b_zero_is_fpo (partial)

OP-887 ladder graph state exact max tripartite informationIn LeanQuantum Mechanics

For every integer n >= 2 let L_n = P_n square K_2 be the 2-by-n ladder graph and |L_n> its n-rung, 2n-qubit graph state. Is the maximum of tripartite information I3(A:B:C) over all ordered partitions V(L_n)=A disjoint-union B disjoint-union C disjoint-union D, with empty regions allowed, exactly floor((n-2)/3) bits? Equivalently, define r(S) as the F_2-rank of the adjacency submatrix with rows S and columns V\S; does max [r(A)+r(B)+r(C)+r(D)-r(A union B)-r(A union C)-r(B union C)] equal floor((n-2)/3)?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Positive I3 measures failure of holographic monogamy in a graph state. Two-leg ladder cluster states are standard quasi-one-dimensional quantum resources; an exact extensive violation per rung would quantify a many-body entanglement feature, with no unproved connection to claw packing. Fuentes et al. analyze generalized stars and numerically observe no MMI failure on paths and cycles, but do not optimize I3 on cyclic graphs of unbounded size. A ladder has overlapping four-cycles and coupled claws, so their one-center analysis and the separate tree-packing question OP-794 do not settle it. The baseline zero partition is proved in the KB. The exhaustive rank data show long-range multi-rung constraints: the maxima 0,0,0,1,1,1,2,2 for n=2,...,9 and the threshold n=8 are not the naive count of all local stars. Evidence: Exhaustive four-party partitions (modulo permutation symmetry, with independently implemented bitmask enumeration) give max I3=0 for n=2,3,4, 1 for n=5,6,7, and 2 for n=8,9. A separate unquotiented enumeration confirms all cases through n=7.

In Lean: ladder_graph_state_tripartite_info_lower_bound (partial), ladder_two_graph_state_max_tripartite_info_eq_zero (partial), ladder_five_graph_state_tripartite_info_ge_one (partial), ladder_graph_state_exact_max_tripartite_information (statement)

OP-889 algebraic energy filter renyi purity phase diagramIn LeanStatistical Mechanics & Thermodynamics

Fix a real s>0. For n divisible by 4, let H_n=sum_{j=1}^n Z_j, let |psi_n(s)> be the normalization of (1+|H_n|)^(-s)|+>^tensor n, and let P_n(s)=Tr[(Tr_B |psi_n(s)><psi_n(s)|)^2] for the equal bipartition A,B. Is the following sharp asymptotic phase diagram valid as n tends to infinity through multiples of four: P_n(s)=Theta(1) for 0<s<1/2; Theta((log n)^(-2)) for s=1/2; Theta(n^{-(2s-1)}) for 1/2<s<3/4; Theta((log n)/sqrt(n)) for s=3/4; and Theta(n^(-1/2)) for s>3/4? Each Theta allows positive constants depending on s but not n.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Energy-filtered pure states are proposed as efficiently representable surrogates for thermal states, and half-system Renyi-2 entropy is minus log purity. Morettini et al. analyze Gaussian filtering and discuss other filter kernels, but a Gaussian saddle-point calculation does not control algebraically decaying energy tails; in particular even the normalization changes regime when its squared amplitude ceases to be summable. This asks exactly which tail exponents preserve the Gaussian half-log entanglement law, and predicts two distinct critical exponents and logarithmic corrections in a standard local spin Hamiltonian. The existing arithmetic questions OP-798 and OP-802 concern Gaussian filters and do not imply this new tail phase diagram. The filter is fixed with n, rather than smuggling n-dependence into a changing protocol. Evidence: A direct exact Dicke-sector matrix calculation in 12797 evaluated all six s=1/4,1/2,3/5,3/4,9/10,6/5 for n=64,...,2048. Independently implemented binomial-convolution and FFT computation in 12798 agrees at n=2048 and extends to n=100,000: for s=3/5, n^(1/5)P_n progresses 1.9017,2.0086,2.0919 at n=2048,10000,100000; for s=6/5, sqrt(n)P_n is 2.7775,2.8936,2.9619. At s=3/4, sqrt(n)P_n grows from 11.15 to 24.55 over the same range, consistent with a logarithmic correction. These are finite-size data with slow critical convergence, not proofs.

In Lean: algebraic_energy_filter_purity_eq_sequence_purity (partial)

OP-890 cycle greedy assignment exact second momentIn LeanOnline Algorithms

For every integer n>=2, put n unit-capacity facilities at the integer points of a circle of circumference n, and independently sample n uniformly distributed requests on that circle. Assign each request immediately to its nearest currently free facility using shortest-arc distance, and let C_n be the realized total distance. With S_n=sum_{d=0}^{n-1} product_{j=1}^{d}(1-j/n), is the exact second moment E[C_n^2] = (n^2/48)(5n+1-2 S_n)? Equivalently, since the known mean is E[C_n]=n S_n/4, is E[C_n^2]=(5n^3+n^2)/48 - n E[C_n]/6?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Rahat, Riad and Hasan determine the exact mean of this online algorithm, and OP-723 asks a much stronger two-scale distributional limit that was handed up as not currently formalizable because it requires continuum random trees and excursion theory. A closed exact second moment is an independently meaningful all-n theorem about the same cost fluctuations and gives Var(C_n)/n^3 -> 5/48-pi/32 using the paper's first-moment asymptotic. The mean proof counts a single pair of vertices in a Cayley tree; second moments depend on correlations between different times and on within-Voronoi-cell arrival randomness, so the published calculation does not establish the identity. A finite exact recurrence admits a much more direct formalization without continuum random tree infrastructure. Evidence: Experiment 12810 uses an exact rational Bellman recursion for both moments over all free-facility subsets, checking n=2 through 14. Experiment 12811 fits and checks the stated identity against exact values through n=15. An independently coded integer-only recursion with cyclic symmetry in 12813 verifies n=2,3,4,8,12 and every n=16 through 20, the last involving 52,488 rotation classes. All are finite computations, not an all-n proof.

In Lean: cycle_greedy_second_moment_formula_eq_mean_form (partial), cycle_greedy_second_moment_two (partial), cycle_greedy_second_moment_three (partial), cycle_greedy_assignment_exact_second_moment (statement)

OP-891 cycle greedy all moments polynomial mean structureIn LeanOnline Algorithms

For every integer k>=1, do there exist polynomials P_k,Q_k over the rationals, with deg P_k<=floor(3k/2) and deg Q_k<=floor((3k-3)/2), such that for every n>=2 the kth raw moment of the total greedy cost C_n in the following cycle assignment model is E[C_n^k]=P_k(n)+Q_k(n) E[C_n]? The model has n unit-capacity facilities at the integer points of a circumference-n circle, n independent uniform continuous arrivals, and assigns each immediately to a nearest free facility in shortest-arc distance. The known mean is E[C_n]=(n/4) sum_{d=0}^{n-1} product_{j=1}^d(1-j/n). Zero polynomials have degree minus infinity.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This is an all-orders structural question about the full finite-size cost distribution, motivated by the newly pitched OP-890 for k=2 and by the long-term distributional question OP-723. If true, it reduces every moment to one classical Cayley-tree distance sum and predicts the integer and half-integer finite-size powers governing fluctuations, giving exact quantities at every n without continuum random trees. OP-890 asks only for k=2; neither it nor the literature's first-moment formula implies any general closure. The obstacle is that higher powers involve correlations among several mergers and within-cell locations, not a single two-vertex tree-distance calculation. It is suitable for partial progress at each k even if the universal family is difficult. Evidence: Exact rational subset recursions verify the predicted polynomial degrees for k=2 through 5: k=2 fits through n=20 (12810,12813); k=3 through n=15 (12814); k=4 through n=18 (12817); and k=5 through n=19 (12819), with independent integer-only holdout confirmation for n=20,21 (12822). For example P_2(n)=(5n^3+n^2)/48 and Q_2(n)=-n/6. For k=3 the fitted P_3 is n^3/768-25n^4/1536 and Q_3 is 13n^2/192+15n^3/128. These are finite checks, not proofs for arbitrary k or n.

In Lean: cycle_greedy_raw_moment_zero (partial), cycle_greedy_all_moments_polynomial_mean_structure (statement)

OP-892 summable energy filters universal lattice purity constantIn LeanStatistical Mechanics & Thermodynamics

Let a=(a_j)_{j in Z} be any nonzero real sequence in l^(4/3)(Z). For n divisible by 4 and sufficiently large that the normalizing factor is nonzero, define |psi_n> proportional to sum_{x in {0,1}^n} a_{n/2-|x|}|x>, and let P_n=Tr[(Tr_B |psi_n><psi_n|)^2] for the equal bipartition. Is it true that lim_{n->infinity, 4|n} sqrt(n) P_n = (2/sqrt(pi)) [sum_{m in Z}(sum_{j in Z} a_j a_{m-j})^2]/(sum_{j in Z} a_j^2)^2? Inner and outer sums are absolutely meaningful under the stated summability assumption. Equivalently, this is a fixed energy filter a_{H_n/2} on |+>^tensor n for H_n=sum_i Z_i.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Energy filtering prepares pure many-body states for approximate thermal simulation, and the purity constant controls Renyi-2 entanglement and tensor-network costs. The existing OP-798 asks for a Gaussian two-species arithmetic limit and OP-889 asks only for the scaling exponents of one positive algebraic filter. This asks for an exact asymptotic coefficient for a whole sequence space of filters, including asymmetric and sign-changing kernels such as the sinc filter produced by time-box filtering. The general case cannot be obtained merely by substituting a Gaussian parameter: the proof must control the four-replica convolution uniformly over infinitely supported possibly oscillatory coefficients. The l^(4/3) hypothesis is a natural common threshold because it controls the squared convolution and includes power tails s>3/4. Evidence: Experiment 12838 compares the formula with independent binomial/FFT purity calculations through n=1,000,000 for delta, Gaussian, sinc, oscillatory power and positive power filters. For example n=1,000,000 gives 1.69234798 versus truncated convolution prediction 1.69256939 for sinc, and 2.98153110 versus 2.98820946 for the slowly converging s=1.2 power filter. Experiment 12840 tests four compactly supported sequences, including asymmetric negative coefficients, through n=100,000; e.g. a_{-1},a_0,a_1=(2,-1,3) gives 1.830691021 versus 1.830737628. Experiment 12828 independently compares direct full-Hilbert-space partial traces with Dicke-sector calculations through n=16 for the positive power case. These are computations, not a general proof.

In Lean: energy_filter_sequence_purity_zero (partial), summable_energy_filters_universal_lattice_purity_constant (statement), energy_filter_delta_lattice_sums (partial), energy_filter_delta_purity_limit (partial), energy_filter_sequence_purity_scale (partial)

OP-894 cycle greedy linear probing joint cost lawIn LeanOnline Algorithms

For each n>=2 compare two stochastic processes. In the first, n facilities occupy integer points of a circle of circumference n; independent uniform continuous arrivals are each assigned to their nearest free facility under shortest-arc distance, and G_i is the distance paid by arrival i. In the second, n keys with independent uniform home slots are inserted into an initially empty n-slot circular hash table by ordinary linear probing, and D_i is the number of occupied slots inspected by insertion i before its first empty slot, equivalently probes minus one. Are the whole cost vectors (2G_1,...,2G_n) and (D_1+U_1,...,D_n+U_n) equal in distribution, where U_1,...,U_n are independent Uniform[0,1] variables independent of the entire displacement vector (D_1,...,D_n)?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This exact finite-n process-level bridge would transfer the classical theory of linear-probing displacement distributions directly to the recent cycle assignment problem, including joint partial sums, all raw moments and the leading Airy limit. It would also offer a concrete route into OP-890 and OP-891, which ask only a second-moment identity and a moment hierarchy respectively. Rahat et al. explicitly note that the two models have the same additive coalescent of unordered gap sizes, but that observation alone does not identify the conditional paid-cost vector, its correlations or the asserted independent continuous noise. Flajolet, Poblete and Viola study displacement moments and limit laws for linear probing, not the nearest-free continuous geometric cost vector. Establishing the law or identifying its first failure would answer a precise bridge question rather than repeat either paper's own open problem. Evidence: Experiment 12874 independently computes the characteristic function of 2 times total greedy cost via free-subset integration and the full linear-probing displacement histogram, finding agreement with the uniform-noise convolution for n=1,...,11 at four frequencies. Experiment 12875 checks exact rational equality of moments 0 through 8 for every n=1,...,10. Experiment 12876 compares joint characteristic functions at 12 independently generated frequency vectors for each n=1,...,10 and finds discrepancies below numerical precision. These are finite computational checks, not a proof.

In Lean: cycle_greedy_linear_probing_joint_cost_law (statement), cycle_greedy_linear_probing_joint_cost_law_two (partial)

OP-895 square lattice graph state max tripartite information densityIn LeanQuantum Mechanics

Let G_n be the n-by-n open square-grid graph and |G_n> its 2D cluster graph state. For every ordered four-partition of its vertices A,B,C,D (empty parts allowed), let I3(A:B:C)=S(A)+S(B)+S(C)+S(D)-S(AB)-S(AC)-S(BC), with entropies in bits, and let M_n be the maximum over all such partitions. Does the density c=lim_{n to infinity} M_n/n^2 exist, and what is its exact value? In particular, is this optimum density attained by periodically repeating a finite four-color pattern? Equivalently S(X) is the GF(2) cut-rank of X. A correct answer would quantify the asymptotically strongest monogamy violation among arbitrary partitions of the standard two-dimensional cluster state.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Fuentes et al. identify graph-state monogamy violations and analyze star graphs; they do not determine the maximal violation per qubit in a two-dimensional cluster state. This asks for an exact thermodynamic extremal density and the structure of maximizers, rather than a single violation. It is distinct from OP-887, which asks for a two-row ladder: an arbitrarily wide square grid has two-dimensional interactions and unbounded transfer width. The all-D boundaries of the computed tile mean its inter-tile edges act within one party, motivating an area-law construction rather than a single small example. The exact upper density and whether any finite period reaches it remain unknown; no value is asserted. Evidence: Experiment 12894 found an 8-by-8 pattern with all boundary vertices in D and I3=3; experiment 12895 recomputed the seven GF(2) cut ranks directly after tiling it 1-by-1, 1-by-2, 2-by-2, 2-by-3, 3-by-3, 4-by-4 and 6-by-6, obtaining I3=3 times the number of tiles, i.e. 108 on a 48-by-48 grid. Experiments 12891 and 12892 show generic annealing and simple periodic patterns are not enough to identify the maximum; 12896 did not improve on four tiled motifs on a 16-by-16 block.

In Lean: square_lattice_graph_state_max_tripartite_information_density_exists (statement), square_grid_two_max_tripartite_info_eq_zero (partial), square_grid_max_tripartite_info_nonneg (partial)

OP-899 Least Degree Threshold for the Asymptotic Order Bound of k-Regular GraphsIn LeanGraph Theory & Graph Algorithms

Let $\theta \ge 1$ be a real number. Let $v(k, \theta)$ denote the maximum order (number of vertices) of a connected $k$-regular simple graph whose second largest adjacency eigenvalue is at most $\theta$. Determine the least integer $K(\theta)$ such that for every integer $k \ge K(\theta)$, the maximum order satisfies $v(k, \theta) \le 2k + 2\lfloor 1 + \theta^2 / 4 \rfloor$.

Posed in arXiv:2611.00591, Question 8.1 — A spectral Moore problem and the Yang-Koolen conjecture

In Lean: spectral_moore_max_order (definition), spectral_moore_degree_threshold (definition), spectral_moore_max_order_le_of_large_degree (partial)

OP-902 Polynomial-time online carpooling algorithm achieving cube-root logarithmic discrepancyIn LeanOnline Algorithms

Does there exist a randomized online carpooling algorithm on n vertices that can be implemented in polynomial time (running in time polynomial in n and T) such that for every sequence of T edges fixed in advance, the maximum discrepancy satisfies M_T = O((log T)^{1/3}) with high probability?

Posed in arXiv:2611.00388, Sec. 3.1, after Theorem 3.3 — Online carpooling against an oblivious adversary

In Lean: op_902_single_edge_max_discrepancy (partial), op_902_cube_root_log_discrepancy_unconditional (partial), op_902_poly_time_carpooling_cube_root_log_discrepancy (statement)

OP-906 Existence of a 7-Universal Tournament on 13 VerticesIn LeanGraph Theory & Graph Algorithms

A tournament $T = (V, E)$ is an orientation of a complete undirected graph: a directed graph with no self-loops such that for every pair of distinct vertices $u, v \in V$, exactly one of $(u, v) \in E$ or $(v, u) \in E$ holds. A tournament $T$ is called $k$-universal if every tournament on $k$ vertices is isomorphic to an induced subtournament of $T$. Let $t(k)$ denote the minimum number of vertices in a $k$-universal tournament. The exact values $t(1)=1, t(2)=2, t(3)=4, t(4)=5, t(5)=8, t(6)=10$ are known, and it is known that $13 \le t(7) \le 14$. Does there exist a 7-universal tournament on 13 vertices? Equivalently, is $t(7) = 13$ or $t(7) = 14$?

Posed in arXiv:2610.06891, Abstract — A New Upper Bound for 7-Universal Tournaments

What is known

The paper presents an explicit 14-vertex tournament $T_{14}$ and verifies by exhaustive computer search that it contains all 456 isomorphism classes of 7-vertex tournaments as induced subtournaments, improving the upper bound on $t(7)$ from 15 to 14. Combined with the lower bound $t(7) \ge 13$ established by SAT solver methods in 2023, the exact value of $t(7)$ is narrowed to $\{13, 14\}$. The author notes that deleting any vertex from $T_{14}$ destroys 7-universality, so $T_{14}$ contains no 7-universal subtournament on 13 vertices. The existence of an arbitrary 7-universal tournament on 13 vertices remains open.

In Lean: op_906_exists_seven_universal_tournament_thirteen (statement)

OP-909 Digirth threshold for C(k,k)-subdivisions with two or three vertices of out-degree oneIn LeanGraph Theory & Graph Algorithms

For integers $k \ge 2$ and $r \ge 0$, let $F_r(k)$ denote the minimum integer $g$ such that every finite simple digraph $D$ with minimum out-degree $\delta^+(D) \ge 1$, at most $r$ vertices of out-degree one, and digirth $g(D) \ge g$ contains a subdivision of the two-block cycle $C(k,k)$ (two internally vertex-disjoint directed paths of length $k$ between common endpoints). Determine the exact value of $F_2(k)$ and $F_3(k)$ for all integers $k \ge 2$. In particular, does $F_r(k) = r(k-1) + 1$ hold for $r \in \{2, 3\}$, or does a different threshold arise?

Posed in arXiv:2611.00720, Section 4, Problem 4.1 — Sharp digirth bounds for C(k,k)-subdivisions in digraphs

What is known

The paper settles $F_r(k) = r(k-1)+1$ for all $r \ge 4$ and cites the known theorem $F_0(k) = F_1(k) = k+1$. The proof for $r \ge 4$ critically relies on finding non-consecutive regions along a cycle of length $N \ge r+1 \ge 5$, which breaks when $r \in \{2, 3\}$. The paper explicitly highlights determining $F_2(k)$ and $F_3(k)$ as Problem 4.1.

In Lean: digraph_ckk_subdivision_two_three_exceptional_threshold (statement)

OP-926 Decide the Ramsey number R(3,10) (40 or 41)In LeanCombinatorics for TCS

Is every graph on 40 vertices guaranteed to contain a triangle or an independent set of size 10? Equivalently, is R(3,10) = 40? Known: 40 ≤ R(3,10) ≤ 41 (lower bound Exoo; upper bound Angeltveit).

Posed in arXiv:2401.00392, Angeltveit, R(3,10) <= 41, introduction; Radziszowski, Small Ramsey Numbers DS1 rev. 18 (2026), Sec. 2.1

In Lean: simple_graph_ramsey_three_ten_forty (statement), simple_graph_triangle_free_independent_neighborhood_cover (partial), simple_graph_triangle_free_weighted_low_neighborhood (partial), simple_graph_triangle_free_closed_neighborhood_edge_count (partial), simple_graph_ramsey_three_ten_nonregular_edge_bound_conditional (partial), simple_graph_triangle_free_independent_neighborhood_matching (partial), simple_graph_triangle_free_private_neighborhood_neighbor_unique (partial), simple_graph_triangle_free_unique_neighborhood_neighbors_card_le (partial), simple_graph_ramsey_three_ten_nine_regular_outer_degree_eight_card_le (partial), simple_graph_triangle_free_independent_cover_capacity (partial), simple_graph_five_noncycle_independent_cover_witness (partial), simple_graph_ramsey_three_ten_total_dominating_five_cycle (partial), simple_graph_ramsey_three_ten_total_dominating_five_links (partial), simple_graph_circulant_thirty_five_three_link_obstruction (partial), simple_graph_ramsey_three_ten_no_circulant_thirty_five_induced (partial), simple_graph_forty_nine_regular_five_cycle_one_undominated (partial), simple_graph_circulant_thirty_five_five_coloring_no_bichromatic_eight (partial), simple_graph_regular_forty_induced_thirty_five_total_dominating (partial), simple_graph_twenty_one_three_independent_seven_parts_alpha_seven (partial)

OP-928 Optimal Differential Uniformity of the Digit-Exchange Family $G_c$In LeanFoundations of Cryptography

Let m ≥ 1, q = 2^m, and let c ∈ 𝔽_q have absolute trace Tr_{𝔽_q/𝔽_2}(c) = 1. Let D(x) = x^2 + x + c, and define the permutation G_c on 𝔽_q × 𝔽_q by G_c(a,b) = (L, D(L)a) where L = D(a)b, with group addition given by the Teichmüller digit sum (a,b) + (u,v) = (a+u, b+v+√(au)) isomorphic to (ℤ/4ℤ)^m. What is the supremum sup_{m ≥ 1, c} Δ(G_c) of the differential uniformity of G_c over all m ≥ 1 and all trace-one elements c? In particular, is Δ(G_c) ≤ 20 for all m ≥ 1?

Posed in arXiv:2611.02572, Sec. 8, Open problem (2) — Explicit permutations of $(\mathbb{Z}/4\mathbb{Z})^m$ with uniformly bounded differential uniformity

What is known

The theoretical degree bound proved in Theorem 1.1 yields Δ(G_c) ≤ 36 for all m, but computer searches up to m = 10 show Δ(G_c) ≤ 20. Whether the supremum over all m and c is at most 20, or what the exact maximum value is, is left open.

In Lean: op_928_digit_exchange_differential_uniformity_le_twenty (statement), op_928_digit_exchange_differential_uniformity_le_thirty_six (partial), op_928_digit_exchange_differential_uniformity_ge_two (partial), op_928_digit_exchange_differential_uniformity_one (partial)

OP-932 Polynomial-Query Testing of Submodularity for Functions with Polynomial RangeIn LeanSubmodular & Combinatorial Optimization

For any constant c ≥ 1 and any fixed ε ∈ (0, 1), does there exist a randomized algorithm making poly(n) queries that ε-tests submodularity for functions f : {0, 1}^n → {0, 1, ..., n^c}? That is, the tester accepts submodular functions with probability at least 2/3, and rejects functions that differ from all submodular functions on at least an ε fraction of hypercube points with probability at least 2/3.

Posed in arXiv:2611.02374, Sec. 1.2, Bounded ranges — Submodularity Is Barely Testable

In Lean: op_932_constant_fn_submodular (partial), op_932_submodular_not_far (partial), op_932_poly_query_testing_submodular_poly_range (statement), all_cube_func_one_is_submodular (partial), not_submodular_cube_three_two (partial)

OP-936 Uniqueness of Loopless Digraph with In- and Out-Degrees Equal to a Threshold SequenceIn LeanGraph Theory & Graph Algorithms

Let $d = (d_1, \dots, d_n)$ be a threshold degree sequence (that is, the degree sequence of a threshold graph, so that the number of simple graphs with degree sequence $d$ is $G(d) = 1$). Is the number $D(d)$ of loopless digraphs with in-degree and out-degree both equal to $d_i$ at each vertex $i$ also uniquely determined, i.e., $D(d) = 1$?

Posed in arXiv:2611.02191, Sec. 11.2 — Graphs versus loopless digraphs with a given degree sequence, and convergence of uniformly random graphs at every density

In Lean: threshold_loopless_digraph_unique (statement), threshold_loopless_digraph_ge_one (partial), threshold_loopless_digraph_two (partial)

OP-939 Optimal Upper Density Constant for Infinite Bh SetsIn LeanCombinatorics for TCS

Let $h \ge 3$ be an integer. A set $A \subseteq \mathbb{N}$ is a $B_h$ set if every sum of $h$ elements from $A$ (with repetitions allowed) uniquely determines the multiset of summands. For $x \ge 1$, let $A(x) = |A \cap [1, x]|$. Does there exist an infinite $B_h$ set $A \subseteq \mathbb{N}$ such that $\limsup_{x \to \infty} \frac{A(x)}{x^{1/h}} > \frac{1}{h}$? More generally, what is the supremum of $\limsup_{x\to\infty} A(x)/x^{1/h}$ over all infinite $B_h$ sets $A \subseteq \mathbb{N}$?

Posed in arXiv:2611.01871, Sec. 4, line 399 — Infinite Generalized Sidon Sets with a Negative Answer to a Problem of Szemer\'edi

In Lean: infinite_bh_set_upper_density_eq_one_div_h (partial), infinite_b3_set_upper_density_eq_one_third (partial)

OP-976 2-Regularity of the Halving Partition SequenceIn LeanElementary Number Theory

Let a(n) denote the number of halving partitions of n, defined for n ≥ 1 as sequences of positive integers (p_1, ..., p_k) summing to n with p_1 ∈ {⌊n/2⌋, ⌈n/2⌉} and p_i ∈ {⌊p_{i-1}/2⌋, ⌈p_{i-1}/2⌉} for 2 ≤ i ≤ k, with a(0) = 1. Is the integer sequence (a(n))_{n ≥ 0} 2-regular, in the sense that the ℤ-module spanned by the 2-kernel {n ↦ a(2^e n + r) : e ≥ 0, 0 ≤ r < 2^e} is finitely generated?

Posed in arXiv:2611.01243, Sec. 6, paragraph 2 — Halving Partitions and Hyperbinary Expansions

What is known

The paper gives an O((log n)^2) algorithm computing a(n) using auxiliary counts A_r(m), but the range of r grows with n, leaving the structural 2-regularity of a(n) open.

In Lean: halving_partition_count_two_mul (partial), halving_partition_count_two_pow (partial), halving_partition_kernel_even_reduction (partial), halving_partition_length_le (partial), halving_partition_sequence_two_regular (statement)

OP-979 Equality Between Combinatorially Symmetric Maximum Nullity and Fort Transversal NumberIn LeanGraph Theory & Graph Algorithms

Does there exist a finite simple graph $G = (V, E)$ such that $\N(G) < \T(G)$? Here $\N(G)$ is the maximum nullity of a combinatorially symmetric real matrix whose graph is $G$ (meaning $A_{ij} \ne 0 \iff A_{ji} \ne 0$ and $A_{ij} \ne 0 \iff \{i, j\} \in E$ for $i \ne j$), and $\T(G)$ is the fort transversal number of $G$, defined as $\max\{\tau(\mathcal{C}) : \mathcal{C} \text{ is a compatible collection of forts of } G\}$, where a fort is a nonempty subset $F \subseteq V$ such that no vertex outside $F$ has exactly one neighbor in $F$, and a collection $\mathcal{C}$ is compatible if for all distinct $C_1, C_2 \in \mathcal{C}$ and $x \in C_1 \cap C_2$, there exists $C_3 \in \mathcal{C}$ with $C_3 \subseteq (C_1 \cup C_2) \setminus \{x\}$.

Posed in arXiv:2407.03492v1, Question 4.5; also recalled in arXiv:2611.01102 after Corollary 5.8 — Compatible Forts and Maximum Nullity of a Graph

What is known

Theorem 2.10 establishes N(G) <= T(G) <= Z(G) for all graphs G, where N(G) is the maximum nullity of combinatorially symmetric matrices and T(G) is the fort transversal number. Corollary 5.8 characterizes N(G) as the maximum transversal number over compatible fort collections whose minimal sets define a matroid representable over R, whereas T(G) drops representability. Example 5.10 shows that non-representable matroids (the Fano matroid) can appear as compatible fort collections, but in that example other representable collections still achieve T(G). It remains open whether there exists a graph where every optimal compatible fort collection has an associated matroid that is not representable over R, which would force N(G) < T(G).

In Lean: op_979_csym_max_nullity_empty_graph (partial), op_979_csym_max_nullity_lt_fort_transversal_number (statement), op_979_csym_max_nullity_le_fort_transversal_number (partial), op_979_fort_transversal_number_empty_graph (partial), op_979_csym_max_nullity_eq_fort_transversal_number_of_edgeless (partial)

OP-983 Separation of bounded-bias and general depth-three AMC at constant shiftIn LeanProof Complexity

Does there exist an explicit family of tautological DNF formulas that separates the bounded-bias depth-three Algebraic Monotone Calculus fragment (\Sigma\Pi\Sigma-AMC_b) from the arbitrary-bias depth-three fragment (\Sigma\Pi\Sigma-AMC) at a fixed constant shift parameter \epsilon \in (0, 1], in the sense that it admits polynomial-size proofs in \Sigma\Pi\Sigma-AMC but requires superpolynomial size in \Sigma\Pi\Sigma-AMC_b?

Posed in arXiv:2611.01055, Section 5, open question 7 — Nonnegative Rank Bounds for the Algebraic Monotone Calculus

In Lean: depth_three_amc_of_bounded_bias (partial), depth_three_amc_soundness (partial), op_983_depth_three_amc_separation_at_constant_shift (statement)

OP-989 two deletion posterior renyi alternating sharp order transitionIn LeanInformation Theory & Coding

For n>=2 and w in {0,1}^n, let N_w(y) be the number of embeddings of w as a subsequence of y in {0,1}^{n+2}; define P_w(y)=N_w(y)/(4*binom(n+2,2)), the posterior distribution on uniformly random transmitted words conditional on receiving w after two uniformly chosen deletions. Let a_n=0101... have length n. Is it true that, for every 0<alpha<1 and every n>=2, H_alpha(P_w) <= H_alpha(P_{a_n}), with equality exactly for the two alternating words, whereas for every alpha>1 there exist n and w with H_alpha(P_w)>H_alpha(P_{a_n})? Here H_alpha(P)=log(sum_y P(y)^alpha)/(1-alpha). Equivalently, is the full set of positive Renyi orders for which alternating words maximize the posterior entropy at every output length precisely (0,1], with alpha=1 interpreted as Shannon entropy?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers studying information leakage from deletions use Shannon, collision, and min-entropy; the order determines which posterior events matter. Ma and Zhang's two-deletion theorem settles the Shannon endpoint, but its proof compares sums k log k and does not establish the entire continuum of power sums. The older Atashpendar literature discusses Renyi entropy and proves single-deletion results but does not provide this two-deletion order transition. Finite data show that a blanket Renyi extension fails, and that majorization already fails, so this requires a more refined power-sum argument. Evidence: Exhaustive word enumeration through n=10 found alternating uniquely best at alpha=0.25 and 0.5 but high-order failures; a separate enumeration through n=14 found the first competitor at alpha=3 by n=12. For the centered single-defect family, embedding histograms were independently enumerated and matched formulas for n=6..30; the formulas give numerical strict order-2 and order-1.25 competitors at n=20 and n=106, respectively. These are computations rather than established theorems.

In Lean: two_deletion_posterior_sum_two (partial), two_deletion_posterior_renyi_sub_one_alternating_max (partial), two_deletion_posterior_renyi_order_crossings_exist (partial), op_989_two_deletion_posterior_renyi_alternating_sharp_order_transition (statement)

OP-994 gaussian coin majority worst variance zeta crossoverIn LeanCommunication Complexity

For an integer q>=2 and lambda>0, let X~N(0,lambda^2) and Y~N(0,1) be independent. Alice observes X, sends one of q messages, and Bob, observing Y and the message, estimates sign(X+Y). Let e_q(lambda) be the infimum of error probability over all measurable one-way encoders and decoders (shared randomness is allowed). Does e_q have a unique global maximizing lambda_q>1 for every q>=2, and, writing c=7*zeta(3)/pi^2, do the exact large-alphabet asymptotics q*(lambda_q-1)->c and q^3*(e_q(lambda_q)-1/(4q))->c^2/8 hold as q->infinity?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

A sharp finite-message error law for distributed majority is relevant to communication complexity, statistical decision theory, and quantizer design. Diddapur and Sawettamalya treat unknown input sizes and establish order bounds; here both sizes and their ratio are known, and one asks for the full large-message worst-ratio correction, which is not their own two-bit question. A central-limit bridge takes known-length binomial coin imbalances to the stated Gaussian problem. The zeta value comes from endpoint fluctuations of a quantization kernel, so the proposed theorem identifies both an optimizer and an explicit second asymptotic term, not a better numerically searched constant. The KB's one-way protocol and error nodes provide finite foundations but do not already cover real Gaussian inputs. Evidence: Multistart optimization for 2-5 messages and ratios 0.03-30, plus stationary calculations through q=8192, suggest a unique hardest ratio greater than 1: q*(lambda_q-1) is 0.7587 at q=6 and 0.8115 at q=8192, plausibly approaching 0.85256. The scaled error excess is 0.08232 at q=8192, versus the conjectured 0.09086. A separate q=2^20 boundary-response computation and an independent singular-integral quadrature support the slowly converging zeta coefficient. Exact dynamic programming on known-length fair-coin problems with sizes up to 800 and 400 approaches the Gaussian q=2,4 values. The large-q optimizer computation assumes interval cells and establishes stationarity numerically; it is evidence, not a global certificate.

In Lean: gaussian_coin_majority_worst_variance_zeta_crossover (statement), gaussian_majority_error_nonneg (partial), gaussian_majority_error_le_half (partial)

OP-998 jensen shannon mutual information sharp kl regularizationIn LeanInformation Theory & Coding

For finite random variables X,Y,Z with Y and Z conditionally independent given X, write J(U;V)=JS(P_UV,P_U P_V) for Jensen-Shannon divergence with natural logarithms, and I(U;V) for ordinary Shannon mutual information. Determine the exact least lambda >= 0 for which J(X;YZ)-J(X;Y)-J(X;Z) <= lambda I(Y;Z) holds for every such Markov fork, equivalently for which J+lambda I is a subadditive mutual information. Can the sharp constant be approached using binary X,Y,Z and conditionally identically distributed observations? Determine extremizing sequences or prove that larger alphabets increase the threshold.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

A sharp regularization threshold would quantify exactly how much classical mutual information repairs the failure of a widely used bounded and symmetric divergence to tensorize. Abin and Gohari explicitly prove the inequality at lambda=1/2 (their Example 1(3), after dividing by two and removing a linear generator term); their sufficient condition does not identify the least lambda. The nearby OP-997 asks which unregularized power means fail, and cannot determine this coefficient or whether binary alphabets are extremal. This is a quantitative refinement of a proved paper result, not the general necessary-and-sufficient open problem in that paper. Evidence: A 75-digit calculation for binary X with P(X=1)=10^-5 and conditionally iid Y,Z with P(Y=1|X=0)=10^-5, P(Y=1|X=1)=0.01 yields JS subadditivity gap 1.41535349882100644e-10 and I(Y;Z)=1.61792007468476027e-9, giving a lower bound around 0.0874798, while the paper gives the upper bound 0.5. Numerical optimization over binary forks gives ratios above 0.0907, apparently approached in a singular rare-signal limit; no claim that the global optimum is attained or binary is assumed proved.

In Lean: jensen_shannon_binary_cid_not_subadditive (partial), jensen_shannon_regularized_subadditive_full_support_half (partial), op_998_jensen_shannon_sharp_kl_regularization (statement)

OP-999 two insertion collision excess sqrt spacing asymptoticIn LeanInformation Theory & Coding

For a binary word w of length n, let e(u,w) be the number of (n-2)-element index sets of w spelling u, and let C_n=min_{w in {0,1}^n} sum_{u in {0,1}^{n-2}} e(u,w)^2. Is it true that lim_{n to infinity} (C_n - binom(n,2))/n^(3/2) = 2 sqrt(2)? Equivalently this determines the leading correction to the maximum posterior Renyi-2 entropy in the uniform-input binary channel with exactly two insertions.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Synchronization-channel researchers study how the received word controls posterior uncertainty. Ma and Zhang prove the Shannon-entropy maximizer is alternating for this very channel, but their convex t log t comparison does not settle the quadratic collision objective; alternating words are not optimal for it. The problem asks for the asymptotically sharp optimum over every word, not just for a particular construction. It also complements, without repeating, OP-989, which concerns two deletions and a different posterior distribution. Evidence: Exact enumeration in 14514 and 14517 finds global minima through n=18 and shows a single central repeated bit fails from n=15. In 14518 evenly spaced repeated bits give normalized excess 2.3978, 2.5906, 2.6840, 2.7549, 2.7905, 2.8095 for n=30,60,100,200,400,800, respectively, suggesting 2 sqrt(2); these large-n values are construction upper bounds, not proven minima.

In Lean: op_999_two_insertion_collision_excess_sqrt_spacing_asymptotic (statement), min_two_insertion_collision_four (partial), min_two_insertion_collision_five (partial), min_two_insertion_collision_five_lt_alternating (partial)

OP-1003 two insertion collision exact balanced defect envelopeIn LeanInformation Theory & Coding

For n>=5, let C_n be the minimum, over binary words w of length n, of sum_u e(u,w)^2, where u ranges over all binary words of length n-2 and e(u,w) counts index-set embeddings. Put K_n={1} union {k integer: 2<=k<=floor((n-2)/3)-1}. For k in K_n write n-2=(k+1)q+r with 0<=r<=k. Is C_n equal to binom(n,2)+min over k in K_n of [2kn+2k^2+n-10k-2+(k+1-r)q^2+r(q+1)^2]?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The collision probability of the uniform-input two-insertion posterior controls its Renyi-2 entropy and is a natural synchronization-channel statistic. Ma and Zhang determine the Shannon maximizers; OP-999 asks only for the leading n^(3/2) correction to the collision minimum. The new computations reveal a sharp finite-length formula and candidate minimizers with repeated-adjacent bits separated by long, nearly balanced alternating segments. Establishing it would resolve a stronger all-n extremal problem and imply the OP-999 asymptotic after analyzing the explicit minimum. The remaining crux is a global lower bound over arbitrary binary words, including runs of length 3 or more and unbalanced segments. Evidence: Experiments 14514, 14517, 14556 and 14560 exhaustively determine the global minimum for n=5,...,27, all matching the proposed expression (14569). Experiment 14564 checks the segment cost identity on all isolated-repeat words through n=17 and random longer words, including the necessary length-two correction; 14568 directly realizes the simplified envelope with explicit words through n=120. For example the predicted minimum at n=30 is 827, improving the earlier evenly spaced construction's 829; global optimality at n=30 is not yet exhaustively checked.

In Lean: op_1003_two_insertion_collision_defect_envelope_five (partial), op_1003_two_insertion_collision_defect_envelope_six (partial), op_1003_two_insertion_collision_exact_balanced_defect_envelope (statement)

OP-1004 two agent two type efx fpo reciprocal ratio boundaryIn LeanFair Division

Fix real numbers a>=b>1. For each pair h,l of nonnegative integers, consider two agents and h identical high goods and l identical low goods. Both agents value every low good at 1; agent 1 values each high good at a and agent 2 at b, with additive utilities. Is it true that every such instance admits a complete allocation that is both EFX and fractionally Pareto optimal if and only if either a=b or there exists a positive integer k with b<=1+1/k<=a? Fractional Pareto optimality forbids even a fractional reallocation that weakly improves both agents and strictly improves one.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Fair-division researchers ask when strong fairness and efficiency can coexist. Davidiuk et al. prove EFX plus ordinary Pareto optimality for two goods types, but exhibit a two-agent counterexample to the fractional version. Common-ratio bivalued profiles admit EFX and fractional efficiency. Neither gives the exact boundary between these behaviors for unequal ratios. The proposed criterion is a concrete all-real-parameter characterization, including arbitrarily close unequal valuations and arbitrarily many goods; it is distinct from OP-600, which asks for ordinary Pareto optimality and MMS. Evidence: Experiment 14584 tested 1,150 rational (a,b) pairs, including values below, at, and above predicted thresholds, against all positive h+l<=100 with no discrepancy. Experiment 14585 tested 110,791 predicted obstruction families h=l=floor(1/(b-1))+2 and 39,209 random feasible-side instances with counts up to 100,000, with no discrepancy. The arithmetic implementation was checked against 100,000 full allocation enumerations (14583), and independent linear programming confirmed its fractional-efficiency criterion on 12,422 allocations (14586).

In Lean: op_1004_two_type_efx_fpo_equal_ratio (partial), op_1004_two_type_efx_fpo_single_type (partial), op_1004_two_agent_two_type_efx_fpo_necessary (partial), op_1004_two_agent_two_type_efx_fpo_reciprocal_ratio_boundary (statement)

OP-1005 two agent personalized bivalued efx fpo ratio boundaryIn LeanFair Division

Fix real numbers a>=b>1. For every finite set of indivisible goods, let agent 1 have additive values in {1,a} and agent 2 have additive values in {1,b}; their high-value sets may overlap arbitrarily. Is it true that every such profile admits a complete allocation that is EFX and fractionally Pareto optimal if and only if either a=b or there exists an integer k>=1 with b<=1+1/k<=a? Fractional Pareto optimality means that no fractional reallocation weakly improves both agents and strictly improves one.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for the exact compatibility boundary between a central fairness guarantee and the strongest standard efficiency notion for all two-agent personalized bivalued instances. OP-1004 proposes the same threshold only when the two agents agree on which goods are high; arbitrary overlaps produce four rather than two item types, and the two-segment fractional-efficiency reduction no longer applies. The negative side follows from the common-high-set subfamily, but the positive side must handle all overlaps. A positive answer would identify a broad new class supporting EFX and fractional efficiency, while a counterexample would locate the limit of the OP-1004 pattern. Evidence: Experiment 14593 exhaustively checks all 6,561 four-type count profiles with 0,...,8 goods of each type at each of five threshold-satisfying ratio pairs, and finds no failure; three pairs on the other side have common-high-set counterexamples. Experiment 14595 finds no counterexample among 50,000 randomized threshold-satisfying rational ratio/profile pairs and confirms 10,000 predicted negative families. Experiment 14596 independently checks the four-type fPO frontier against 1,500 fractional-allocation linear programs.

In Lean: op_1005_personalized_bivalued_efx_fpo_necessary (partial), op_1005_personalized_bivalued_efx_fpo_ratio_boundary (statement), op_1005_personalized_bivalued_efx_fpo_equal_ratio (partial)

OP-1006 Chromatic number of generalized Kneser graph KG(2n, n, 3) for n at least 5In LeanGraph Theory & Graph Algorithms

For integers $n$ and $r$ with $n \ge r$, let $G_{n,r} = \mathrm{KG}(2n, n, r)$ denote the generalized Kneser graph whose vertices are the $n$-element subsets of a $(2n)$-element ground set, with an edge between two subsets $A$ and $B$ if and only if $|A \cap B| < r$. While $\chi(G_{4,3}) = 14$ and it is established that $10 \le \chi(G_{n,3}) \le 14$ for all $n \ge 4$, determine the exact chromatic number $\chi(G_{n,3})$ for each $n \ge 5$, and in particular whether $\chi(G_{n,3}) = 14$ for all $n \ge 5$ or strictly decreases towards 10.

Posed in arXiv:2611.04486, Sec. 1, Open problems — Balanced Fair Division and Generalized Kneser Graphs

In Lean: op_1006_generalized_kneser_chromatic_eq_fourteen (statement), generalized_kneser_chromatic_le_fourteen (partial), generalized_kneser_four_three_chromatic_eq_fourteen (partial)

OP-1011 Laplacian Spectral Radius Bound on Adjacency Second EigenvalueIn LeanGraph Theory & Graph Algorithms

Let $G$ be a connected simple undirected graph on $n \ge 2$ vertices. Let $\lambda_2$ be the second largest eigenvalue of the adjacency matrix of $G$, and let $\mu_1$ be the largest eigenvalue of the Laplacian matrix $\mathcal{L} = D - A$ of $G$. Is $\lambda_2 \le \mu_1 - 2$?

Posed in arXiv:2611.03879, Conjecture 2 (#20829) — Lemmas and Conjectures in Spectral Graph Theory

In Lean: op1011_adjacency_second_eigenvalue_le_laplacian_spectral_radius_sub_two (statement)

OP-1012 Adjacency Rank and Spectral Radius Upper Bound on Randic IndexIn LeanGraph Theory & Graph Algorithms

Let $G$ be a connected simple undirected graph on $n \ge 2$ vertices with adjacency matrix $A$. Let $R = \sum_{uv \in E} (d_u d_v)^{-1/2}$ be the Randić index of $G$, $\rk(A)$ the matrix rank of $A$ over $\mathbb{R}$, and $\lambda_1$ the largest eigenvalue of $A$. Is $2R \le \rk(A) \cdot \lambda_1$?

Posed in arXiv:2611.03879, Conjecture 3 (#501193) — Lemmas and Conjectures in Spectral Graph Theory

In Lean: op1012_randic_le_rank_mul_spectral_radius (statement), op1012_randic_index_le_half_card (partial), op1012_complete_bipartite_randic_index (partial), op1012_complete_bipartite_equality (partial)

OP-1013 Adjacency Rank and Second Laplacian Eigenvalue Upper Bound by Double Edge CountIn LeanGraph Theory & Graph Algorithms

Let $G$ be a connected simple undirected graph on $n \ge 2$ vertices with $m$ edges and adjacency matrix $A$. Let $\mu_2$ be the second largest eigenvalue of the Laplacian matrix $\mathcal{L} = D - A$ of $G$, and let $\rk(A)$ be the rank of $A$ over $\mathbb{R}$. Is $\mu_2 + \rk(A) \le 2m$?

Posed in arXiv:2611.03879, Conjecture 5 (#239534) — Lemmas and Conjectures in Spectral Graph Theory

In Lean: adjacency_rank_laplacian_second_eigenvalue_le_two_mul_edge_count (statement)

OP-1027 Gap Below the Totient Bound for Good Slopes over Odd Composite ModuliIn LeanElementary Number Theory

Let $n$ be an odd composite integer with at least two distinct prime divisors, and let $q$ be its largest prime divisor. For a permutation $f$ of $\mathbb{Z}/n\mathbb{Z}$, let $D_n(f)$ be the set of slopes $m \in \mathbb{Z}/n\mathbb{Z}$ such that $x \mapsto f(x) + mx$ is a permutation of $\mathbb{Z}/n\mathbb{Z}$. A permutation $f$ is extremal if $|D_n(f)| = \varphi(n)$, where $\varphi$ is Euler's totient function. Does every non-extremal permutation $f$ of $\mathbb{Z}/n\mathbb{Z}$ satisfy $|D_n(f)| \le \varphi(n)\frac{q-2}{q-1}$? In particular, does this hold for the smallest unsettled modulus $n = 105$ (for which $q = 7$, $\varphi(105) = 48$, and the conjectured bound is 40)?

Posed in arXiv:2611.04551, Question 10.2 — Good slopes, congruence preservation, and gaps over residue rings

In Lean: good_slopes_gap_mod_105 (partial), good_slopes_gap_tight_mod_15 (partial), good_slopes_gap_tight_mod_45 (partial), good_slopes_gap_open_conjecture (statement), good_slopes_f3_two_directions_line (partial), good_slopes_fiber35_unit_gap (partial), good_slopes_fiber21_bad_row_triple (partial), good_slopes_fiber35_colored_gap (partial), good_slopes_gap_mod_165 (partial)

OP-1036 Strict improvement over quadratic lower bound for three-colored anti-Ramsey numbersIn LeanCombinatorics for TCS

For an integer $n \ge 3$, let $\xi(K_n)$ denote the three-colored anti-Ramsey number of the complete graph $K_n$, defined as the maximum integer $N$ such that $K_N$ admits a 3-edge-coloring in which every complete subgraph on $n$ vertices contains at least one edge of each color. While $\xi(K_3) = 4$ and $\xi(K_4) = 9$ achieve the grid lower bound $(n-1)^2$, Paley-type cubic residue colorings show $\xi(K_5) \ge 19 > 16$ and $\xi(K_6) \ge 31 > 25$. Does there exist for every integer $n \ge 5$ an edge-coloring of a complete graph $K_N$ with three colors such that $N > (n-1)^2$ and every complete subgraph on $n$ vertices contains all three colors, establishing that $\xi(K_n) > (n-1)^2$ for all $n \ge 5$?

Posed in arXiv:2611.03878, Remark 3.1 — On the lower- and upper bounds of three-colored anti-Ramsey numbers

In Lean: anti_ramsey_grid_lower_bound (partial), anti_ramsey_five_nineteen (partial), anti_ramsey_six_twenty_six (partial), op_1036_anti_ramsey_strict_improvement (statement)

OP-1038 Beating 0.5 competitive ratio for online matching with stochastic rewards and patienceIn LeanOnline Algorithms

In online bipartite matching with stochastic rewards and patience, upon the arrival of vertex $t \in \{1, \dots, T\}$, the online algorithm is allowed to probe a sequence of up to $k_t \ge 1$ available offline resources (where $k_t$ is the patience budget of arrival $t$), stopping at the first successful match or when the budget is exhausted. Does there exist a randomized online algorithm that achieves a competitive ratio strictly greater than $1/2$ against the adaptive offline benchmark for arbitrary instances with patience?

Posed in arXiv:2611.03598, Sec. 6, under "Beyond Stochastic Rewards" — Online Matching with Arbitrary Stochastic Rewards

What is known

Non-adaptive Greedy is 0.5-competitive for OMSR with patience. The paper's techniques for beating 0.5 do not immediately carry over because offering multiple resources can break resource availability monotonicity.

In Lean: op1038_beating_half_omsr_patience (statement), omsr_patience_half_competitive (partial), omsr_patience_single_arrival_optimal (partial)

OP-1048 weighted efx two type universal entitlement integer ratio boundaryIn LeanFair Division

Fix positive real entitlements w_1,w_2. Is it true that every instance with two agents, any nonnegative counts of two types of indivisible goods, and strictly positive additive values for the two types admits a complete weighted-EFX allocation if and only if max(w_1,w_2)/min(w_1,w_2) is a positive integer? Weighted EFX means v_i(A_i)/w_i >= v_i(A_j\{g})/w_j for both ordered pairs i != j and every good g in A_j. In the noninteger direction, can a counterexample always be chosen with the same strict ranking of the two types for both agents?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for the exact entitlement boundary for a foundational fairness guarantee, not a single instance. Hajiaghayi-Springer-Yami Theorem 10 gives the integer-ratio sufficiency even for general additive goods, while two-type EFX with equal entitlements is also known; neither provides the converse. Their Theorem 6 states a broader common-ranking guarantee, but the independently enumerated positive 3:7 example appears to contradict it, so the potential discrepancy needs careful verification. The question seeks a family valid at every noninteger real ratio, including irrationals, not merely that witness. Evidence: Experiment 14828 enumerated all type-count allocations for weight pairs with coprime total at most 13, up to 12 goods, over a 99-by-99 positive common-ranking value grid: every tested noninteger ratio had an obstruction and none of the tested integer ratios did. Independently, exact integer experiment 14826 found no WEFX allocation for weights (3,7), two A goods and three B goods, with values (2,5) and (1,4). This is computational evidence only.

In Lean: weighted_efx_two_type_of_integer_ratio (partial), weighted_efx_two_type_integer_ratio_boundary (statement)

OP-1056 Recursive Alphabet-Size Condition for Well-Covered Powers of Multi-Factor Complete Graph ProductsIn LeanGraph Theory & Graph Algorithms

Let $t \ge 5$ and let $2 \le a_1 \le a_2 \le \cdots \le a_t$ be a sequence of positive integers. Let $F = K_{a_1} \mathbin{\square} K_{a_2} \mathbin{\square} \cdots \mathbin{\square} K_{a_t}$ be the Cartesian product of the corresponding complete graphs. If every power $F^d$ ($d \ge 1$) is well-covered (meaning all maximal independent sets of $F^d$ have the same cardinality), must the recursive alphabet-size inequalities $a_j \ge 1 + \sum_{i=1}^{j-1} (a_i - 1)$ hold for all $j \in \{3, \ldots, t\}$?

Posed in arXiv:2611.03956, Conjecture 5.6 — Well-Covered Powers: Cartesian Products and Cayley Graphs

What is known

Theorem 5.7 proves the sufficient direction for all t. The equivalence is established for t = 3 (Proposition 5.3) and t = 4 (Theorem 5.5). The necessity (converse) remains open for t ≥ 5, even for mixed alphabets with 5 factors.

In Lean: op_1056_wcp_cartesian_product_complete_graphs_recursive_bound (statement), cartesian_product_complete_graphs_wcp_of_recursive_bound (partial), wcp_cartesian_product_three_complete_graphs_iff (partial), wcp_cartesian_product_four_complete_graphs_iff (partial), cartesian_product_complete_graphs_top_inequality_of_well_covered (partial)

OP-1058 Factor Inheritance of the Well-Covered Powers Property in Cartesian ProductsIn LeanGraph Theory & Graph Algorithms

Let $G$ and $H$ be finite connected simple graphs such that their Cartesian product $G \mathbin{\square} H$ has the well-covered powers property (that is, every positive power $(G \mathbin{\square} H)^d$ for $d \ge 1$ is well-covered). Must at least one of $G$ and $H$ have the well-covered powers property?

Posed in arXiv:2611.03956, Question 1.1 — Well-Covered Powers: Cartesian Products and Cayley Graphs

What is known

Hartnell and Rall proved that well-coveredness of G □ H implies at least one factor is well-covered. The paper gives examples where one factor is not well-covered, but leaves open whether both factors can simultaneously fail to have well-covered powers.

In Lean: op_1058_cartesian_product_factor_has_wcp (statement), op_1058_cartesian_square_factor_has_wcp (partial), op_1058_cycle_product_factor_has_wcp (partial), op_1058_of_diam_le_two (partial)

OP-1088 Partition of Subcubic Graphs of Odd Girth at Least Seven with Component Order at Most FiveIn LeanGraph Theory & Graph Algorithms

Let $G = (V, E)$ be a finite simple graph with maximum degree at most 3 and odd girth at least 7 (that is, $G$ contains no cycle of odd length less than 7). Does there exist a partition $V = L \cup R$ of the vertex set into disjoint subsets such that $L$ is an independent set of $G$ and every connected component of the induced subgraph $G[R]$ has at most 5 vertices?

Posed in arXiv:2611.05178, Question 5.5 — Weighted Max Cut in Subcubic Graphs

In Lean: subcubic_odd_girth_seven_partition (statement), subcubic_odd_girth_seven_partition_of_card_le_five (partial)

OP-1095 Ex-post MMS approximation below 4/3 under ex-ante proportionalityIn LeanFair Division

Let N be a set of n agents and M a finite set of indivisible chores, where each agent i ∈ N has an additive cost function c_i : 2^M → ℝ_{≥ 0} and maximin share μ_i = min_{(P_1,...,P_n) ∈ Π_n(M)} max_{j ∈ [n]} c_i(P_j). A lottery over allocations X = (X_1,...,X_n) of M is ex-ante proportional if 𝔼[c_i(X_i)] ≤ c_i(M)/n for all i ∈ N, and ex-post α-MMS if c_i(X_i) ≤ α · μ_i for all i ∈ N in every allocation X in the support of the lottery. Does there exist a universal constant α < 4/3 such that every instance of additive chores admits a finite allocation lottery that is simultaneously ex-ante proportional and ex-post α-MMS?

Proposed here, building on arXiv:2611.04884, Thm 4.4 — Best-of-Many-Worlds MMS Allocation for Chores with Sublinear Disposals; the paper does not ask it

What is known

The paper establishes that every instance of additive chores admits an ex-ante proportional lottery that is ex-post 4/3-MMS (and MMS1), improving upon the previous best-of-both-worlds ratio of 8/5. In deterministic chore allocation without ex-ante constraints, the best known MMS approximation ratio is 13/11. It is natural and open whether the 4/3 barrier for ex-ante proportional lotteries can be broken to approach or match the deterministic state of the art.

In Lean: ex_post_mms_chore_lottery_below_four_thirds (statement), ex_post_one_mms_chore_lottery_single_agent (partial)

OP-1104 balanced tsallis seven eighths sharp dictator stability transitionIn LeanInformation Theory & Coding

Fix 0<rho<1 and alpha=7/8. For a balanced Boolean indicator f:{-1,1}^n -> {0,1}, let delta(f) be its minimum Hamming distance to any signed coordinate indicator and let T_rho be independent coordinate noise of correlation rho. Put h(t)=(((1+t)/2)^alpha+((1-t)/2)^alpha)/2, C_3(rho)=h((3rho-rho^3)/2)+3h((rho+rho^3)/2)-4h(rho), and C_G(rho)=2(E[Phi(rho Z/sqrt(1-rho^2))^alpha]-h(rho)), where Z is standard normal and Phi its distribution function. Is it true for every n and every balanced f that E[(T_rho f)^alpha]-h(rho) >= min(C_3(rho),C_G(rho))*delta(f)? If so this constant is sharp, witnessed by 3-bit majority or asymptotically by odd majorities of increasing dimension.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Yu's order-7/8 theorem proves dictator optimality and equality, but does not give a sharp dimension-free gap in terms of distance to dictators. Such a bound would quantify robustness of a strengthened balanced Courtade-Kumar inequality. The KB's sharp Hellinger stability question OP-797 concerns an antipodal function and the symmetric square-root kernel; here f need only be balanced and the one-sided 7/8 power kernel is not symmetric under complementation before averaging. Existing Hellinger equality does not imply this quantitative bound. Small-case evidence suggests a transition of extremal families. Evidence: Experiment 15037 exhausts balanced functions through dimension 4 at four correlations; 15039 evaluates all odd majorities through dimension 61; 15040 searches randomized weighted majorities through dimension 11; and 15043 searches balanced non-threshold functions through dimension 8. None beat the proposed minimum. Experiment 15042 tests a one-heavy-coordinate Gaussian threshold family, and 15044 places the candidate crossover near rho=0.8123074. These are numerical tests, not proofs.

In Lean: balanced_tsallis_seven_eighths_sharp_dictator_stability_transition (statement)

OP-1109 graph state even cycle collision control boundaryIn LeanQuantum Mechanics

For every integer m>=3, does there exist a finite field F of characteristic two and two 2m-tuples t,s of pairwise distinct nonzero elements of F such that their weighted adjacency matrices for the cycle C_(2m), with entry t_i+t_j or s_i+s_j on an edge ij and zero elsewhere, have ranks 2m and 2m-2 respectively? Together with Akella and Gadde's results for odd cycles and C4, an affirmative answer would characterize exactly which cycle graph states are collision-controlled when every qubit is its own party.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The graph-state replica-rank paper proves collision control for all odd cycles and for the exceptional even cycle C4, leaving the rest of the cycle family untreated. An all-length boundary identifies where its partition-polynomial method applies and exhibits an infinite class where momentum coincidences alone do not determine Rényi replica ranks. It is a family-level characterization, not merely a six-vertex witness. The cited paper does not provide this even-cycle negative direction. Evidence: Experiments 15079 and 15082 give explicit pairs of all-distinct nonzero GF(256) momentum vectors with ranks 2m and 2m-2 for every even cycle length from 6 to 30. Experiment 15081 factors the cycle Pfaffian over F_2: the C4 expression splits into collision factors, while the expressions for C6, C8, C10 and C12 are irreducible in Sage. The data are finite checks and do not establish the all-m result.

In Lean: graph_state_even_cycle_collision_control_boundary (statement), graph_state_six_cycle_rank_witness (partial), four_cycle_weighted_matrix_rank_eq_four (partial), cycle_weighted_adjacency_matrix_rank_le (partial)

OP-1112 all agent common bivalued equal marginal sharp mms curveIn LeanFair Division

Fix n>=2 and 1<=r<=2. For every finite set of indivisible chores and every profile of additive costs c_i(g) in {a_i,r*a_i} with a_i>0, does there exist a lottery over complete allocations such that every chore is assigned to every agent with probability exactly 1/n, and every allocation in the support gives every agent at most (r+1)/2 times her n-agent chore maximin share? Is (r+1)/2 the smallest universal factor for each fixed n and r? A proposed lower-bound family has n+1 chores indexed 0,...,n: agents 1,...,n-1 assign low cost exactly to {0,1}, agent n assigns low cost exactly to {0,2}, and all other costs are high.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This extends OP-1111 from two agents to every market size and asks for the exact ratio, with equal item marginals giving truthfulness in expectation and ex-ante envy-freeness. It is materially stronger than the two-agent question: even at n=3 there need not be one partition all of whose bundles are safe for every agent, so the complementary-swap proof strategy does not extend. The general equal-marginal 0-nomination bound is 2-1/n, and a more involved general construction reaches 1.97; neither supplies the proposed at-most-3/2 bound. The sharp ratio would reveal how small dispersion in chore costs affects universal truthfulness-and-fairness guarantees. Evidence: Experiment 15117 checked all three-agent type-count profiles through four chores and 1,200 random profiles each at five, six and seven chores, over r=1.2,1.5,2. Experiment 15122 exhaustively checked all 35 three-agent seven-chore profiles with four high chores per agent at r=1.2, where sorted-slot rounding can fail. Experiment 15125 exhaustively checked the equal-marginal upper bound for all 216 three-agent and 10,000 four-agent profiles with n+1 chores and exactly two low chores per agent. Experiment 15121 found that the proposed lower-bound family forces the target factor for n=2,3,4 and also found lower-bound instances for n=5,6. Experiment 15118 found three-agent instances with no universally safe partition, and 15120 gives a sorted-slot obstruction.

In Lean: all_agent_common_bivalued_equal_marginal_sharp_mms_curve (statement), two_agent_bivalued_equal_marginal_sharp_mms (partial), bivalued_chore_sharp_mms_lower_bound (partial), all_agent_bivalued_equal_marginal_at_most_twice_agents (partial), all_agent_bivalued_equal_marginal_divisible_chores (partial), all_agent_bivalued_equal_marginal_large_ratio (partial), all_agent_bivalued_equal_marginal_many_chores (partial), all_agent_bivalued_equal_marginal_two_sub_inv_ratio (partial), balanced_high_counts_insufficient_for_sharp_mms (partial), critical_bivalued_equal_marginal_sharp_mms (partial), critical_four_two_choice_pairing_counterexample (partial), near_equal_ratio_all_remainders_equal_marginal_sharp_mms (partial), three_agent_seven_chores_equal_marginal_sharp_mms (partial)

OP-1115 finite energy filters all renyi moment fourier lawIn LeanStatistical Mechanics & Thermodynamics

Let a: Z -> R be finitely supported and nonzero. For n divisible by 4, let |psi_n> be the normalized n-qubit state sum_x a_{n/2-|x|}|x>, and let rho_n be the reduced density matrix on the first n/2 qubits. Write S=sum_j a_j^2 and A(theta)=sum_j a_j exp(i j theta). Is it true that, for every real q>1, lim_{n->infinity, 4|n} n^((q-1)/2) Tr(rho_n^q) = (4/sqrt(2 pi))^q sqrt(pi/(8q)) * (1/(2 pi)) integral_0^(2 pi) |A(theta)|^(2q) dtheta / S^q?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

A full family of exact Renyi entanglement asymptotics would let quantum simulation researchers determine the filter-dependent O(1) entropy term and distinguish filters sharing the same purity. OP-892 asks the q=2 case for summable filters and is itself unresolved; knowing one moment does not determine the full spectrum or prove fractional q. The Fourier integral represents a nontrivial local spectral limit for a binomially weighted band matrix, not just a formal application of the purity formula. Evidence: Experiment 15395 diagonalized the exact symmetric-sector reduced matrix for four finite filters including signed, asymmetric examples, n=64 to 4096, and q=1.5,2,3,4; all scaled moments approached the displayed Fourier constants, e.g. q=3 gave 4.68948 versus 4.69782 at n=4096 for a=(-1:2,0:-1,1:3).

In Lean: finite_energy_filters_all_renyi_moment_fourier_law (statement), energy_filter_renyi_moment_two_eq_purity (partial), energy_filter_renyi_constant_two (partial), energy_filter_delta_renyi_constant (partial)

OP-1118 balanced multipartite graph state tripartite information parityIn LeanQuantum Mechanics

Let G=K_{s,s,...,s} be the complete k-partite graph with k>=2 parts of size s>=2. For each S subset V(G), let r(S) be the rank over F_2 of the adjacency submatrix between S and V(G)\S. For a four-partition V=A disjoint_union B disjoint_union C disjoint_union D, define I_3=r(A)+r(B)+r(C)+r(D)-r(A union B)-r(A union C)-r(A union D). Let M(k,s) be the maximum of I_3 over all four-partitions (empty sets allowed). Is M(k,2)=0 for k=2 and 1 for k>=3; M(k,3)=1 for even k, 2 for k=3, and 3 for odd k>=5; and M(k,s)=2 floor(k/2) for every s>=4?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Graph-state researchers study violations of monogamy of mutual information and want to know how entanglement violations scale with system structure. This would identify an exact family where increasing part size from three to four changes the maximal violation from bounded to extensive, with an even/odd effect. Fuentes et al. analyze star-like families and small stabilizer entropy vectors, not maxima for this balanced multipartite family; the KB definition applies to arbitrary graphs but has no such classification. Evidence: Experiment 15422 exhaustively evaluates the binary cut-rank expression for representative multipartite graphs through nine qubits. Experiment 15425 optimizes all four-party support assignments with CP-SAT for every 2<=k<=16 and s=2,3,4, obtaining OPTIMAL for all cases and the stated piecewise values. Experiment 15426 independently checked the support-based cut-rank formula against direct F_2 elimination on 30000 random cuts. These are computational checks, not a proof for all k.

In Lean: balanced_multipartite_graph_state_tripartite_info_part_size_two (partial), balanced_multipartite_graph_state_tripartite_info_large_part_uniform (partial), balanced_multipartite_graph_state_tripartite_information_parity (statement)

OP-1119 multipartite graph state large part sharp information envelopeIn LeanQuantum Mechanics

Let G be any finite complete multipartite graph with nonempty parts, and let a be the number of parts containing at least four vertices. For S subset V let r(S) be the F_2 rank of the adjacency submatrix from S to its complement. Let M(G) be the maximum, over all four-partitions V=A disjoint_union B disjoint_union C disjoint_union D (empty parts allowed), of r(A)+r(B)+r(C)+r(D)-r(A union B)-r(A union C)-r(A union D). Is 2 floor(a/2) <= M(G) <= a+3 for every such graph, with both bounds sharp for each a>=0 as G varies?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for a sharp structural envelope for arbitrary, potentially highly unbalanced multipartite graph states: it would show that only parts large enough to meet all four parties contribute extensively to positive tripartite information, and would identify the exact best additive correction. Unlike OP-1118's conjectured exact formula for equal part sizes, this applies simultaneously to arbitrary size profiles and identifies the extremal graph for each number of large parts. Fuentes et al. study MMI violations and stars, but do not give such a bound for multipartite graph states. The formulation uses the existing finite-field cut-rank definition and avoids density matrices. Evidence: Experiment 15453 enumerates all 14,348,906 nonzero support profiles in which each of the 15 nonempty four-party support masks occurs zero, one, or two times; its rank-based objective never exceeds the number of four-party masks by more than three. Experiment 15426 checks the cut-rank formula against direct binary elimination on 30000 random cuts. Experiment 15452 optimizes 242 mixed part-size profiles without violating either bound, and 15451 obtains the upper value a+3 for a=0,...,8 using four or five size-three parts plus a size-four parts. Experiment 15425 checks lower-bound equality in all-size-four examples through a=16; the a=0 and a=1 lower endpoints occur in independent examples. These checks require proof of the reduction to arbitrary multiplicities.

In Lean: multipartite_graph_state_large_part_sharp_information_envelope (statement), multipartite_graph_state_tripartite_info_upper_bound (partial), multipartite_graph_state_tripartite_info_lower_bound (partial), multipartite_graph_state_tripartite_info_upper_bound_sharp (partial)

OP-1120 finite energy filter unbalanced von neumann fourier constantIn LeanStatistical Mechanics & Thermodynamics

Let a: Z -> R be finitely supported and nonzero. For each even n let |psi_n> be the normalized n-qubit state sum_{x in {0,1}^n} a_{n/2-|x|}|x>. Let 1<=m_n<n with m_n -> infinity and n-m_n -> infinity, and let rho_n be the reduced state on the first m_n qubits. Put V_n=m_n(n-m_n)/(4n), A(theta)=sum_j a_j exp(i j theta), and w(theta)=|A(theta)|^2/(sum_j a_j^2). Is the natural-logarithm von Neumann entropy asymptotic S(rho_n) = (1/2) log(2 pi e V_n) - integral_0^(2 pi) w(theta) log w(theta) dtheta/(2 pi) + o(1), with 0 log 0 interpreted as zero? This includes arbitrary vanishing subsystem fractions as long as both sides grow, as well as fixed fractions.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Entanglement researchers want the actual von Neumann entropy and its filter-dependent constant, including experimentally relevant small subsystems. OP-1115 asks only Renyi moments at orders strictly above one and an equal bipartition; those limits alone do not justify taking a derivative at one or controlling an unbalanced family and its small eigenvalues. The delta-filter term recovers the hypergeometric Dicke-state entropy, while nontrivial signed filters produce a shape-dependent constant. The endpoint q=1 requires a genuine uniform-integrability or entropy-tail argument. Evidence: Experiment 15503 computed entropy and q=1.5 moments for five finite filters, including signed and sixth-order-zero Fourier symbols, using m=64 through 2048 and n=2m^2; the centered entropy approached the predicted Fourier constant, with absolute error below 0.0011 at m=2048 in all five cases. Experiment 15505 independently checked the symmetric-sector spectrum against direct qubit partial traces for 84 unequal-cut/signed-filter instances up to 14 qubits. Balanced entropy-moment calculations appear in 15395 and 15488, though those test q>1 rather than q=1.

In Lean: energy_filter_fourier_entropy_constant_delta (partial), finite_energy_filter_unbalanced_von_neumann_fourier_constant (statement), finite_energy_filter_equal_cut_von_neumann_constant (partial)

OP-1142 Infinite Cardinality and Zero Density of Remoteness-4 Positions in Epstein's GameIn LeanCombinatorial Games

In Epstein's put-or-take-a-square game, define the remoteness R(n) of n ∈ ℕ_{>0} as the number of plies to game termination under optimal play (with the player to move maximizing game length and the opposing player minimizing it). An integer n has remoteness 4 if both legal moves D(n) = n - ⌊√n⌋² and U(n) = n + ⌊√n⌋² have remoteness at least 3, and at least one has remoteness exactly 3 (for instance, n = 29, from which U(29) = 54 leads to D(54) = 5, an E. P. Stein number). Are there infinitely many positive integers n with R(n) = 4? Furthermore, does the set of remoteness-4 positions have asymptotic density zero, i.e., lim_{X → ∞} (1/X) #{n ≤ X : R(n) = 4} = 0?

Proposed here, building on arXiv:2611.05898, Sec. 6, after Remark on remoteness-2 positions — An Asymptotic for E. P. Stein Numbers; the paper does not ask it

What is known

The paper proves that the set of remoteness-2 positions (E. P. Stein numbers) is infinite and has asymptotic density zero, with counting function S₂(X) = π⁻² X¹/⁴ log X + O(X¹/⁴). The paper explicitly points out that positions of higher remoteness remain open. The first higher remoteness class of P-positions is remoteness 4 (such as n = 29). It remains open whether the set of remoteness-4 positions in Epstein's put-or-take-a-square game is infinite, and whether its natural density is zero.

In Lean: epstein_remoteness_four_infinite_and_zero_density (statement), epstein_remoteness_twenty_nine (partial), epstein_remoteness_four_nonempty (partial), epstein_remoteness_of_is_stein_number (partial)

OP-1143 Exact 2-adic valuation of designated-summand partition k-tuples on 4n+3In LeanElementary Number Theory

Let $A_k(n)$ denote the number of ordered $k$-tuples of partitions with designated summands of total size $n$, with generating function $\sum_{n\ge 0} A_k(n)q^n = \prod_{m=1}^\infty \frac{1-q^{6m}}{(1-q^m)(1-q^{2m})(1-q^{3m})}^k$. For every integer $k\ge 1$, let $A_k(3) = k(k+1)(k+14)/6$. Then the exact 2-adic valuation $\min_{n\ge 0} v_2(A_k(4n+3))$ equals 3 if $k \equiv 2 \pmod{16}$, and equals $v_2(A_k(3))$ if $k \not\equiv 2 \pmod{16}$.

Posed in arXiv:2611.05623, Conjecture 6.1 — Partitions with designated summands: $k$-tuples and their congruences

In Lean: designated_partition_a3_formula (partial)

OP-1144 Exact 2-adic valuation of odd-part designated partition k-tuples on 4n+3In LeanElementary Number Theory

Let $B_k(n)$ denote the number of ordered $k$-tuples of partitions with designated summands in which all parts are odd, of total size $n$, with generating function $\sum_{n\ge 0} B_k(n)q^n = \prod_{m=1}^\infty \frac{(1-q^{4m})(1-q^{6m})^2}{(1-q^m)(1-q^{3m})(1-q^{12m})}^k$. For every integer $k\ge 1$, let $B_k(3) = k(k+2)(k+7)/6$. Then the exact 2-adic valuation $\min_{n\ge 0} v_2(B_k(4n+3))$ equals 2 if $k\equiv 1\pmod 8$, equals 3 if $k\equiv 6\pmod 8$, and equals $v_2(B_k(3))$ if $k\not\equiv 1,6\pmod 8$.

Posed in arXiv:2611.05623, Conjecture 6.2 — Partitions with designated summands: $k$-tuples and their congruences

In Lean: designated_odd_partition_tuple_thm_4_5_c (partial)

OP-1145 Exact 3-adic valuation of A_6 along the progression 12n+10In LeanElementary Number Theory

Let $A_6(n)$ be the coefficient of $q^n$ in $\prod_{m=1}^\infty ((1-q^{6m})/((1-q^m)(1-q^{2m})(1-q^{3m})))^6$. Then for all $n \ge 0$, $A_6(12n+10) \equiv 0 \pmod{243}$, and there exists some $n \ge 0$ such that $A_6(12n+10) \not\equiv 0 \pmod{729}$.

Posed in arXiv:2611.05623, Conjecture 6.3 — Partitions with designated summands: $k$-tuples and their congruences

In Lean: designated_partition_six_tuple_twelve_mod_three (partial), designated_partition_six_tuple_ten_mod_243 (partial), designated_partition_six_tuple_twenty_two_not_mod_729 (partial), designated_partition_six_tuple_twenty_two_divisible_by_243 (partial), designated_partition_six_tuple_exact_valuation_iff (partial), designated_partition_six_tuple_progression_twelve_exact_valuation (statement), designated_partition_six_tuple_not_all_mod_729 (partial)

OP-1146 Classification of realizable intersection arrays for distance-regular K-geodetic graphs (K=2,3)In LeanGraph Theory & Graph Algorithms

For each K ∈ {2, 3}, determine all realizable intersection arrays {b_0, b_1, ..., b_{d-1}; c_1, c_2, ..., c_d} of distance-regular graphs of diameter d that satisfy the product condition ∏_{j=1}^i c_j ≤ K for all 1 ≤ i ≤ d, and determine which such intersection arrays correspond to at least one distance-regular graph.

Posed in arXiv:2611.05762, Problem 9.2.1, Sec. 9.2 — Classifying K-Geodetic Graphs Via Combinatorial Designs and Distance-regularity

What is known

The paper establishes the necessary condition that for a distance-regular graph to be K-geodetic with K ∈ {1, 2, 3}, the sequence (c_1, ..., c_d) must be all 1s (for K=1), all 1s except possibly c_d = 2 (for K=2), or all 1s except possibly c_d ∈ {2, 3} (for K=3). However, determining which intersection arrays with these c_i sequences satisfy the feasibility conditions (positivity, integrality of multiplicities, Krein conditions) and are realized by actual distance-regular graphs remains open.

In Lean: geodetic_c_condition_iff_product_condition_two (partial), geodetic_c_condition_iff_product_condition_three (partial), op_1146_classification_realizable_intersection_array_k_geodetic (statement), distance_regular_is_k_geodetic_iff_product_condition (partial)

OP-1151 Hamiltonicity of the smallest unresolved bicirculant graphsIn LeanGraph Theory & Graph Algorithms

Does the bicirculant graph $B(3465; \{2310, -2310\}, \{0, 35, 77, 275\}, \{1155, -1155\})$ of odd order $2m = 6930$, or the bicirculant graph $B(9240; \{2310, -2310\}, \{0, 70, 220, 154\}, \{1155, -1155\})$ of even order $2m = 18480$, have a Hamilton cycle?

Posed in arXiv:2611.05531, Sec. 5, line 824 — Hamilton cycles in bicirculants with non-coprime connection sets

In Lean: op_1151_bicirculant_3465_is_hamiltonian (statement), op_1151_bicirculant_prism_is_hamiltonian (partial)

OP-1152 random signed widening energy filter purity universalityIn LeanStatistical Mechanics & Thermodynamics

Let n range over multiples of 4, and let m=m(n) be positive integers with m -> infinity and m/sqrt(n) -> 0. Independently choose Rademacher signs a_0,...,a_{m-1}, and set a_j=0 outside 0<=j<m. Define the normalized n-qubit state |psi_n> proportional to sum_{x in {0,1}^n} a_{n/2-|x|}|x>, and rho_n=Tr_{last n/2 qubits} |psi_n><psi_n|. Does sqrt(n) Tr(rho_n^2) converge in probability to 4/sqrt(pi), for every such sequence m(n)?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers studying entanglement generated by microcanonical energy filtering need to understand whether a wide, phase-disordered energy window has a universal purity, and how this differs from random phases on individual basis states. Morettini et al. analyze energy filtering, but not independent signs shared across each energy shell with the window growing jointly with system size. In AFTD OP-1115 the filter is fixed as n increases, and that conjectural fixed-filter limit is not uniform in support size; Borwein-Lockhart-type random polynomial norm results control the Fourier symbol as m grows but do not control the finite-n quantum reduced spectrum. The joint limit is therefore an additional mathematical step, not a corollary of either baseline. Evidence: Experiment 15721 sampled 80 filters at each n=256,1024,4096,16384,65536 with m approximately n^0.3; mean sqrt(n) purity was 1.999,1.985,2.218,2.251,2.152, compared with 4/sqrt(pi)=2.257, and standard deviation decreased from 0.657 to 0.351 over the endpoints. The finite-m expected Fourier fourth moment is 2-1/m. Experiment 15726 checked the fast convolution formula against reduced matrices, and 15725 checked symmetric-sector purities against full partial traces through n=16.

In Lean: rademacher_filter_expected_purity_constant_tendsto (partial), random_signed_widening_energy_filter_purity_universality (statement), rademacher_filter_expected_lattice_s4 (partial)

OP-1158 probabilistic serial line metric sharp linear distortionIn LeanSocial Choice Theory

For each n>=2, consider n agents and n distinct items at arbitrary real positions. Each agent ranks items by increasing Euclidean distance, with any fixed tie-breaking, and probabilistic serial runs at unit eating speed until all unit-capacity items are consumed. Let X_ij be the fraction of item j consumed by agent i, PS=sum_ij X_ij |a_i-b_j|, and OPT=min over permutations sigma of sum_i |a_i-b_sigma(i)|. Is PS<=n*OPT for every such instance? Moreover, is n the least possible universal factor, in the sense that for every n the supremum of PS/OPT over instances with OPT>0 equals n?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Probabilistic serial is a canonical envy-free fractional assignment rule used in one-sided markets, so its actual efficiency on a line is relevant to applications with geographic or ideological distance. Charikar et al. prove exponential distortion on general metrics and provide a linear lower bound from a line instance, but their branching construction uses a non-line graph and does not settle the line's upper bound or sharp constant. Filos-Ratsikas et al. give an optimal-distortion-3 line mechanism, which says what is achievable but does not bound this specific fairness-preserving rule. The conjecture would separate the line geometry from the general exponential behavior and give the exact factor for every market size. It moves Charikar et al., Sublinear Metric Distortion for Matching, Theorem 2 (probabilistic serial on general metrics) along new_setting: Restrict the exact metric-distortion question to one-dimensional line metrics, where agents' orderings obey spatial single-peakedness, and conjecture the sharp factor n.. Evidence: Experiment 15765 traversed all strict line-order/ranking chambers for n=3,4 and optimized the fractional PS cost over the closure of each using linear programming, finding maxima 3 and 4 over 112 and 2750 chambers. Experiment 15768 optimized 34,106 sampled realizable ranking chambers over all 252 line interleavings for n=5, with no ratio above 4.334; it is not an exhaustive ranking-chamber search. Experiment 15766 used exact rational arithmetic on a perturbed exponential line cascade and obtained ratios within 1.3e-7 of n for every 2<=n<=12. Numerical linear programs and finite cases do not prove the bound.

In Lean: probabilistic_serial_phase (definition), probabilistic_serial_fractional_assignment (definition), probabilistic_serial_fractional_assignment_two_same (definition), probabilistic_serial_line_cost (definition), probabilistic_serial_line_cost_two_same (definition), line_min_matching_cost (definition), line_min_matching_cost_le (definition), line_min_matching_cost_nonneg (definition), is_line_distance_preference_profile (definition), is_line_distance_preference_profile_of_const_items (definition), probabilistic_serial_fractional_assignment_two_same_one (partial), probabilistic_serial_fractional_assignment_two_split (partial), probabilistic_serial_fractional_assignment_two_split_swap (partial), probabilistic_serial_line_distortion_le_two_agents (partial), probabilistic_serial_line_distortion_ge_sharp (partial), probabilistic_serial_line_metric_sharp_linear_distortion (statement), probabilistic_serial_line_three_agents_le_of_first_choices_01 (partial), probabilistic_serial_line_three_agents_le_of_first_choices_02 (partial), probabilistic_serial_line_three_agents_le_of_first_choices_10 (partial), probabilistic_serial_line_three_agents_le_of_first_choices_12 (partial), probabilistic_serial_line_three_agents_le_of_first_choices_20 (partial), probabilistic_serial_line_three_agents_le_of_first_choices_21 (partial), probabilistic_serial_line_distortion_le_three_agents (partial)

OP-1169 Diameter of Supertoken Graphs on Odd CyclesIn LeanGraph Theory & Graph Algorithms

Let n = 2m + 1 >= 3 be an odd integer, and let s >= 2 and 1 <= k < ns be integers. Let C_n be the cycle graph on n vertices. In the supertoken graph F^s_{k x 1}(C_n) whose vertices are ordered k-tuples of vertices of C_n with at most s tokens per vertex and edges corresponding to moving a single token along an edge of C_n to an available vertex, is the diameter of F^s_{k x 1}(C_n) equal to km + floor(k / (2s)) when k <= 2ms, and equal to km when 2ms < k < (2m + 1)s?

Posed in arXiv:2611.06275, Conjecture 4.5 — On generalized $k$-token graphs with distinguishable tokens and a maximum capacity of $s$ tokens per vertex

What is known

The authors prove the lower bound km + floor(k / (2s)) for k <= 2ms and km for 2ms < k < (2m+1)s, verify it computationally in all tested cases, and prove it for n = 3 (K_3), leaving the general upper bound and exact equality as Conjecture 4.5.

In Lean: supertoken_cycle_diameter_conjecture (statement), supertoken_cycle_diameter_lower_bound_le (partial), supertoken_cycle_diameter_lower_bound_gt (partial), supertoken_cycle_three_diameter (partial), supertoken_cycle_diameter_single_token (partial)

OP-1199 stein number pell log periodic second orderIn LeanCombinatorial Games

Let S_2(X) be the number of positive integers n<=X for which, with m=floor(sqrt(n)), both n-m^2 and n+m^2 are positive squares. Put P=17+12*sqrt(2), and R(Y)=S_2(Y^4)/Y-(4/pi^2)*log(Y). Does there exist a nonconstant continuous 1-periodic function F such that R(Y)=F(log(Y)/log(P))+o(1) as real Y tends to infinity? Equivalently, does S_2(X) admit a second-order term X^(1/4) times a nonconstant continuous periodic function of log(X)/(4 log(P)), with error o(X^(1/4))?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Rampell establishes S_2(X)=pi^(-2) X^(1/4) log X+O(X^(1/4)) and observes numerical oscillations but does not identify a period or a limiting shape. The proposed term would explain the fluctuations, sharpen the counting theorem, and connect the arithmetic of Epstein's game to the action of units in Q(sqrt(2)). The published error estimate is the same order as the proposed term, so it cannot decide this question. The corresponding broad questions about outcome densities and remoteness 4 are OP-1141 and OP-1142, not this second-order counting problem. It moves Rampell, An Asymptotic for E. P. Stein Numbers, arXiv:2611.05898, Theorem 1.6 along quantitative: Resolve the O(X^(1/4)) remainder into a nonconstant log-periodic second-order term with an explicit Pell period and a genuinely smaller error.. Evidence: Experiment 16143 used the paper's primitive-pair parametrization, with exact integer checks. At Y=500, 16985, 577000, 19601000, successive approximately P-scaled residuals were 0.755314, 0.756054, 0.755746, 0.755748; at Y=1500, 50956, 1730999 they were 0.492063, 0.488758, 0.488719. Independent direct enumeration agreed with the parametrization for six Y values through 150 in 16145. These numerical values suggest, but do not prove, nonconstant periodicity.

In Lean: stein_number_pell_log_periodic_second_order (statement), pell_log_shift_periodic (partial)

OP-1200 three by cycle torus moving target accuracy exactIn LeanCombinatorial Games

Let n>=3 and G=C_3 square C_n. Initially a hidden target may occupy any vertex. Before each noiseless binary query it may stay or traverse one edge. The searcher adaptively queries any subset of vertices and learns whether the target is in it. A strategy must terminate after finitely many queries on every feasible answer history; its accuracy is the largest number of target positions remaining immediately after the last answer, with no subsequent movement. Is the minimum achievable accuracy exactly min(7,ceil(3n/2)) for every n>=3?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Moving-target localization with binary tests is a basic search and tracking model. The recent paper proves accuracy at most eight on rectangles using progress to a physical boundary and proposes nine on cylinders without a proof; neither argument covers a torus, which has no boundary to force progress. An exact all-length result on the first nondegenerate cyclic width would give both an optimal adaptive strategy and an adversarial lower bound, and clarify the effect of removing both boundaries. It moves Lebedev-Lebedev-Deppe, arXiv:2611.01281, Theorem 4.1, adaptive search on rectangular grids along new_setting: Replace the bounded rectangular grid by the doubly periodic width-three grid C_3 square C_n and determine exact accuracy for all cycle lengths, not merely an upper bound.. Evidence: Full finite-state attractor search gave exact accuracies 5,6,7 for n=3,4,5 in 16125 and exact 7 for n=6 in 16149. A separate cyclic transfer-matrix computation in 16154 found minimum closed neighborhood size 13 among seven-vertex sets for n=5 through 15,20,30,50,100, and tested a single terminal query pattern on each. These are computations, not a proof for every n.

In Lean: three_by_cycle_torus_moving_target_accuracy_exact (statement), three_by_cycle_torus_moving_target_accuracy_le_ceil (partial), three_by_three_torus_moving_target_accuracy_exact (partial)

OP-1206 random signed energy filter critical window purity crossoverIn LeanStatistical Mechanics & Thermodynamics

Fix c>0. For n divisible by 4 let m_n=floor(c sqrt(n)) and take independent uniform random signs a_0,...,a_{m_n-1}, with a_j=0 otherwise. Normalize |psi_n>=sum_{x in {0,1}^n} a_{n/2-|x|}|x>, take rho_n=Tr_B |psi_n><psi_n| for the equal half-system partition, and set P_n=Tr(rho_n^2). Does sqrt(n) P_n converge in probability to K(c)=2 integral_R g(x)^2 F_c(x)^2 dx / D_c^2, where g(x)=2 exp(-4x^2)/sqrt(pi), F_c(x)=integral_{-c-x}^{-x} g(y)dy, and D_c=integral_R g(x)F_c(x)dx=erf(sqrt(2)c)/2?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Quantum many-body researchers study how energy filtering of product states generates entanglement. Existing AFTD question OP-1152 covers random sign windows of width tending to infinity but o(sqrt(n)), predicting 4/sqrt(pi); it excludes the physically natural central-limit width c sqrt(n), for which the binomial density varies across the window and the limiting purity changes with c. The fixed-filter Fourier formulas likewise cannot be applied uniformly when the support grows. This asks for a full crossover law, including concentration for the random state, not merely its mean. The candidate reduces to the narrow-window constant as c tends to zero and predicts a distinct wider-window limit. Evidence: Experiment 16734 independently checked an exact ensemble-mean formula against exhaustive sign enumeration for n=8,12,16; its sqrt(n)-scaled means for n up to 65536 approach the stated integral at c=0.3,1,2,4. Random-sign samples at n=1024,4096,16384 are compatible with concentration but do not prove it.

In Lean: energy_filter_critical_window_length_scale (partial), random_signed_energy_filter_critical_window_purity_crossover (statement), energy_filter_critical_gaussian_kernel_pos (partial), energy_filter_critical_overlap_integral_pos (partial), energy_filter_critical_purity_constant_tendsto_zero (partial)

OP-1209 stochastic mst priority optimal for all probabilities iff cactusIn LeanAlgorithm Design & Analysis

Let G be a finite connected simple graph. Each edge e independently has weight 1 with probability p_e in (0,1), and 0 otherwise. For binary stochastic MST identification, let A(G,p) be the minimum expected number of edge queries over adaptive strategies that certify some minimum spanning tree. For a fixed edge permutation pi, define its priority-Tutte strategy by always querying the first edge of pi that is neither a loop nor a bridge in the current minor, contracting queried 0-edges and deleting queried 1-edges, and stopping when only loops and bridges remain. Let P(G,p) be the least expected number of queries among such fixed-priority strategies. Is P(G,p)=A(G,p) for every p in (0,1)^E if and only if G is a cactus, meaning each edge belongs to at most one simple cycle?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers designing stochastic verification algorithms need to know when one reusable priority ordering captures the power of fully adaptive edge selection. Diwan et al. show that any Tutte strategy is optimal for equal probabilities and give fixed-order solutions for individual cycles; neither result characterizes which graph structures retain fixed-priority optimality for every heterogeneous probability vector. The proposed cactus characterization covers an infinite graph family and would identify theta subgraphs as the exact obstruction. Priority strategies do adaptively skip irrelevant edges; they are more powerful than the paper's strictly nonadaptive query permutations, so its general adaptivity-gap statement does not settle this question. Evidence: Experiment 16783 uses exact rational decision-tree recursion and all fixed permutations: for the diamond edges (01,02,12,03,13) with p=(13/20,4/5,7/20,1/10,7/20), A=2493/1000 and P=5009/2000, a strict gap 23/2000. It also found a strict gap for K_2,3 and no gap in 18 trials each on a cycle and a two-cycle cactus. Experiment 16784 found further gaps on subdivided theta graphs; the general characterization remains conjectural.

In Lean: stochastic_mst_query_eligible (definition), stochastic_mst_adaptive_cost_aux (definition), stochastic_mst_adaptive_cost (definition), stochastic_mst_priority_cost_aux (definition), stochastic_mst_priority_cost (definition), stochastic_mst_adaptive_cost_le_priority_cost (partial), stochastic_mst_priority_optimal_iff_cactus (statement)

OP-1212 opposed latin marriage random blocking universal cltIn LeanMatching & Market Design

Let L_n be any sequence of Latin squares of order n with symbols 0,...,n-1. Define a strict marriage market with man i ranking woman j at position L_n(i,j)+1, and woman j ranking man i at position n-L_n(i,j). Choose a complete matching uniformly at random, and let B_n be its number of blocking pairs. Is it true, uniformly over all sequences L_n, that (B_n - n(n-2)/6)/sqrt(n^3/180) converges in distribution to the standard normal? Equivalently, is the n^(3/2) scale and its leading variance 1/180 universal across all such opposed Latin markets?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Matching theorists studying the Shield-Core minimax problem want to understand the distribution underlying its strongest uniform first-moment bound. Every opposed Latin market saturates the paper's first-moment benchmark, while the KB proves the sharp worst-case bound for just the cyclic member. A uniform central limit theorem would explain how typical matchings fluctuate throughout a much larger infinite family and why random matching alone rarely approaches the cyclic extremum. The paper gives first-moment rearrangement and an extremal construction, neither a variance calculation nor a limit theorem. This asks for distributional universality, not the Latin minimizer characterization OP-795. Evidence: Exhaustive all matchings for cyclic n=4,...,9 and Monte Carlo through n=512 give mean n(n-2)/6, normalized variance approaching 1/180 and skew approaching zero. Independent 16,000-40,000-sample runs for each of cyclic, xor-group, and rank-scrambled cyclic Latin squares through n=256 show the same apparent limit despite visibly different finite-n variances. Exact conditioned counts through n=7 show finite-size conditional means can depend on the Latin square, so an exact finite-n universality claim would be too strong.

In Lean: opposed_latin_blocking_sum_eq (partial), opposed_latin_marriage_random_blocking_universal_clt (statement)

OP-1220 Continuous Limit and Piecewise Polynomiality of Sumset Representation CountsIn LeanCombinatorics for TCS

For integers $k \ge 3$, $h \ge 2$, and $q \ge k$, let $\mathcal{X}_{h+1,k} = \{\mathbf{x} \in \mathbb{Z}_{\ge 0}^k : \sum_{i=1}^k x_i = h+1\}$. For each $s \in \mathbb{Z}$, let $\nu_q(s) = \#\{(\mathbf{x}, A) \in \mathcal{X}_{h+1,k} \times \binom{[q]}{k} : \mathbf{x} \cdot \vec{A} = s\}$, where $\vec{A} = (a_1 < \dots < a_k)$ is the sorted vector of elements of $A$. For each fixed $\sigma \in (0, h+1)$, does the limit $\lim_{q \to \infty} q^{-(k-1)} \nu_q(\lfloor \sigma q \rfloor)$ exist? If so, is the resulting limit function $f(\sigma)$ piecewise polynomial on $(0, h+1)$?

Posed in arXiv:2611.07303, Sec. 5.2, Question 4 — Gaps in the Most Frequent Sizes of Integer Sumsets

In Lean: op_1220_not_tendsto_k3_h2_sigma1 (partial), op_1220_sumset_rep_count_continuous_limit_negation (negation), sumset_rep_count_le_choose_mul_choose (partial), sumset_rep_count_eq_zero_of_lt (partial), sumset_rep_count_eq_zero_of_gt (partial)

OP-1239 Log-Concavity of Partial Petrial Polynomials for Maximum Degree Three TreesIn LeanCombinatorics for TCS

Let $T$ be a tree such that every vertex has degree at most $3$. Is the sequence of nonzero coefficients of the partial Petrial polynomial $P_T^{\times}(z)$ log-concave? More generally, which classes of trees have log-concave partial Petrial polynomials?

Posed in arXiv:2611.07503, Problem 16 — Strict unimodality without log-concavity for partial Petrial polynomials

What is known

The tree $R_m$ has root degree $m$ and branch central vertices of degree 3. For $m \ge 4$, log-concavity fails, but for $m \le 3$, it holds. Yan and Li proved paths (maximum degree 2) have log-concave partial Petrial polynomials. The paper poses the question of whether maximum degree at most 3 guarantees log-concavity.

In Lean: op_1239_max_degree_three_tree_petrial_log_concave (statement), op_1239_path_graph_petrial_log_concave (partial), op_1239_max_degree_two_tree_petrial_log_concave (partial), op_1239_at_most_two_nonzero_coeffs_log_concave (partial)

OP-1251 seeded subtraction a two a two a one period divisibilityIn LeanCombinatorial Games

For every integer a>=1 and every initial binary word (w_{-(2a+1)},...,w_{-1}), recursively define w_n=1 if at least one of w_{n-a}, w_{n-2a}, w_{n-(2a+1)} equals 0, and w_n=0 otherwise, for n>=0. Its binary sequence is eventually periodic. Is its least eventual period always a divisor of either 3a or 3a+1, and is the maximum of this least period over all 2^(2a+1) initial words exactly 3a+1?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This is a sharp all-seeds period restriction for a non-additive infinite family of three-move games; it would classify the only possible period divisors and give an exact maximum. Miklós and Post characterize arbitrary seeds for two moves and show that three moves can have superpolynomial periods, while Manabe's 2026 arithmetic criterion concerns the standard initial seed and pure periods. Neither cited result gives all-seed periods for this three-move family, and the two-move proof no longer applies after a third predecessor is added. The closely related family {a,3a,3a+1} already exhibits period 6a+1, so the proposed divisibility is not a generic three-move phenomenon. Evidence: Experiment 17269 exhaustively enumerates every seed state for a=1,...,10, with up to 2,097,152 states per a. Every attractor length divides 3a or 3a+1 and the largest is 3a+1 in each case. Experiment 17272 checks neighboring families and finds period 13 for {2,6,7}, which divides neither 8 nor 9.

In Lean: seeded_subtraction_a_two_a_two_a_one_period_divisibility (statement), seeded_subtraction_seq_eventually_periodic (partial), seeded_subtraction_period_divisibility_case_one (partial), seeded_subtraction_zero_seed_period (partial)

OP-1254 random cubic hypergraph magic gaussian fluctuationsIn LeanQuantum Computation

For n qubits independently apply a CCZ gate to each 3-element subset with probability 1/2, yielding a random state psi. Write D=2^n and m_2(psi)=(1/D) sum_{P in {I,X,Y,Z}^{tensor n}} |<psi|P|psi>|^4. Is it true that sqrt(D) times [D m_2(psi) - (7 - 14/D + 8/D^2)] converges in distribution to the centered normal law of variance 168 as n tends to infinity? Equivalently, is there a central limit theorem for fluctuations of the second stabilizer Renyi entropy about n-log_2(7), with the corresponding delta-method variance?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers quantifying magic of efficient non-Clifford circuit ensembles need more than a near-maximality estimate to compare typical state-to-state fluctuations and precision of resource estimates. The cubic phase determines an alternating trilinear form over F_2. The Pauli moment is a rank statistic of all its contractions, so the question also asks for a fluctuation law for a rank-based invariant of a random alternating tensor, an object appearing in tensor-isomorphism cryptography. Chen et al. compute the exact mean and bound the variance, but their Chebyshev bound does not yield a Gaussian distribution; the CLT is not their stated open question. It moves Chen, Yan and Zhou, Magic of quantum hypergraph states, Propositions 3 and 4 (2024) along quantitative: Their exact mean and variance upper bound imply concentration of D m_2, but do not identify the central-limit-scale distribution or its variance. This asks for the asymptotic fluctuation law at the exponential scale D^(-1/2).. Evidence: Experiment 17339 compares the contraction-rank formula with direct enumeration of all Pauli expectation values for every 3-uniform hypergraph on 3 and 4 qubits. Experiment 17341 enumerates every such hypergraph through n=5, and its exact variance agrees with the two-plane-overlap prediction tending to 168 after the stated scaling. Experiment 17338 uses 400-12000 independent random hypergraphs per n=5,...,13; experiment 17342 uses 4000, 4000, 2500, and 1000 samples at n=12,13,14,15, with variances 170.00,169.63,167.73,166.76 and decreasing skewness 0.37,0.22,0.21,0.11. These are numerical observations, not a proof.

In Lean: op_1254_cubic_hypergraph_magic_mean (partial), op_1254_cubic_hypergraph_fluctuation_mean_zero (partial)

OP-1257 Ordered Ramsey number of monotone cycles versus alternating pathsIn LeanGraph Theory & Graph Algorithms

Let $k \ge 3$ and $\ell \ge 2$ be integers. Is the ordered Ramsey number of the monotone cycle $\MC_k$ and the alternating path $\AP_\ell$ equal to $$R_{\textup{ord}}(\MC_k, \AP_\ell) = \left\lceil \left(k - \frac{1}{2}\right)(\ell - 1) \right\rceil?$$ Here, $\MC_k$ is the ordered cycle on $\{1, \dots, k\}$ with edges $\{i, i+1\}$ for $1 \le i \le k-1$ and $\{1, k\}$, and $\AP_\ell$ is the alternating path on $\{1, \dots, \ell\}$ whose vertices in path order alternate from the ends inward: $1, \ell, 2, \ell-1, \dots$. An ordered graph $G$ contains an ordered graph $H$ if there is an order-preserving edge-injective map from $V(H)$ to $V(G)$.

Posed in arXiv:2611.08375, Sec. 5, after Table 2 — New results on cyclic and ordered Ramsey numbers

What is known

Bašić et al. conjectured this value based on SAT solver computation, and this paper confirms most other cyclic/ordered conjectures but leaves this ordered Ramsey number open.

In Lean: ordered_ramsey_monotone_cycle_alternating_path (statement), ordered_ramsey_monotone_cycle_alternating_path_two (partial), ordered_ramsey_monotone_cycle_three_alternating_path_three (partial)

OP-1258 Cyclic Ramsey number of nested matchings versus monotone pathsIn LeanGraph Theory & Graph Algorithms

Let $k \ge 1$ and $\ell \ge 3$ be integers. Is the cyclic Ramsey number of the nested matching $\NM_{2k}$ and the monotone path $\MP_\ell$ equal to $$R_{\textup{cyc}}(\NM_{2k}, \MP_\ell) = k\ell - k + 1 - (\ell - 2)\mathbbm{1}\{2 \mid k\}?$$ Explicitly, the question is whether the upper bound $R_{\textup{cyc}}(\NM_{2k}, \MP_\ell) \le k\ell - k + 1$ (for $k$ odd) and $R_{\textup{cyc}}(\NM_{2k}, \MP_\ell) \le k\ell - k - \ell + 3$ (for $k$ even) holds, matching the lower bound proved in Proposition 3.9. Here $\NM_{2k}$ is the cyclically ordered matching on $2k$ vertices with edges $\{\{i, 2k+1-i\} : 1 \le i \le k\}$, and $\MP_\ell$ is the monotone path on $\ell$ vertices.

Posed in arXiv:2611.08375, Sec. 1, Table 1, Conjecture 4.32 — New results on cyclic and ordered Ramsey numbers

What is known

The paper establishes the lower bound in Proposition 3.9, but the upper bound (and thus the exact equality) remains open.

In Lean: op_1258_cyclic_ramsey_nested_matching_monotone_path (statement), op_1258_cyclic_ramsey_lower_bound (partial), op_1258_cyclic_ramsey_k_one (partial), op_1258_cyclic_ramsey_k2_l3 (partial)

OP-1264 Sharp Constant in the Discrete Level 1 to 3 InequalityIn LeanCombinatorics for TCS

Let $n \ge 1$ be an integer, and let $f, g: \{0,1\}^n \to \mathbb{R}$ be coordinatewise increasing functions. For $k \ge 1$, let $W_k[f,g] = \sum_{|S|=k} \hat{f}(S)\hat{g}(S)$, where $\hat{f}(S) = \mathbb{E}_{x \sim \{0,1\}^n}[f(x)\chi_S(x)]$ and $\chi_S(x) = (-1)^{\sum_{i \in S} x_i}$. Define $C_*$ to be the supremum of $$\frac{(-W_3[f,g])_+}{W_1[f,g] \log\left(\frac{\sqrt{\mathrm{Var}(f)\mathrm{Var}(g)}}{W_1[f,g]}\right)}$$ over all $n \ge 1$ and all increasing functions $f,g: \{0,1\}^n \to \mathbb{R}$ such that $W_1[f,g] > 0$ and $W_1[f,g] < \sqrt{\mathrm{Var}(f)\mathrm{Var}(g)}$. Is $C_* = \frac{1}{3\log(4/3)}$? Equivalently, does every pair of increasing real-valued functions on $\{0,1\}^n$ satisfy $$W_3[f,g] \ge -\frac{W_1[f,g]}{3\log(4/3)} \log\left(\frac{\sqrt{\mathrm{Var}(f)\mathrm{Var}(g)}}{W_1[f,g]}\right)?$$

Posed in arXiv:2611.08289, Question 6.1 — Fourier level inequalities on the discrete cube via complex hypercontractivity and Riesz transforms

What is known

The paper proves $C_* \le 2$ via discrete Riesz transforms and complex hypercontractivity, and provides a 3-variable example giving $C_* \ge 1/(3\log(4/3)) \approx 1.1587$. Question 6.1 asks whether this 3-variable construction is sharp.

In Lean: discrete_level_one_to_three_lower_bound_three_vars (partial), discrete_level_one_to_three_sharp_constant (statement)

OP-1267 Existence of a non-row (0,1)-vector in adjacency row space for diameter-2 nut graphsIn LeanGraph Theory & Graph Algorithms

Let $G$ be a finite simple nut graph (a simple graph whose adjacency matrix over $\mathbb{R}$ has nullity 1 and whose 1-dimensional null space is spanned by a vector with non-zero coordinates at all vertices). If the diameter of $G$ is 2, does there exist a non-zero $(0,1)$-vector in the row space of the adjacency matrix $A(G)$ over $\mathbb{R}$ that does not occur as a row of $A(G)$?

Proposed here, building on arXiv:2611.08244, Thm 4.1 — Open Problems on the Null Space and Image Space of the Adjacency Matrix; the paper does not ask it

What is known

Theorem 4.1 settles the ACK conjecture for all nut graphs of diameter 3. By known structural characterizations of potential counterexamples to the ACK conjecture, any counterexample must be a core graph of diameter 2 or 3. Nut graphs are core graphs with 1-dimensional null space. Because the diameter-3 case is completely resolved by Theorem 4.1, the only remaining diameter case for nut graphs is diameter 2. For diameter 2, non-adjacent vertices always share a common neighbor, so the sum of two columns is no longer guaranteed to be a (0,1)-vector, leaving this case open and requiring new techniques.

In Lean: op_1267_diameter_two_nut_graph_has_binary_vector (statement), simple_graph_ones_mem_range_imp_has_binary_vector (partial), simple_graph_regular_has_binary_vector (partial), simple_graph_nut_graph_subset_neighbors_has_binary_vector (partial)

OP-1269 Dimension Reduction Equality for Generalized Hamming Weights of Projective Reed-Muller CodesIn LeanInformation Theory & Coding

Let $q$ be a prime power, let $e, m \ge 1$ be integers, let $0 \le t \le m-1$, and set $h = m-t$. Let $\operatorname{PRM}_q(d, n)$ denote the projective Reed-Muller code over $\mathbb{F}_q$ of degree $d$ on $\mathbb{P}^n$, and let $k_e(h) = \dim \operatorname{PRM}_q(e, h)$. For every $1 \le r \le k_e(h)$, does equality hold in the dimension-reduction bound, that is, is $d_r(\operatorname{PRM}_q(e + t(q-1), m)) = d_r(\operatorname{PRM}_q(e, m-t))$?

Posed in arXiv:2611.08203, Remark 6.11 — Common zeros of homogeneous polynomials and the weight hierarchy of projective Reed-Muller codes

What is known

Lemma 6.10 proves that $d_r(\operatorname{PRM}_q(e+t(q-1), m)) \le d_r(\operatorname{PRM}_q(e, m-t))$ for $1 \le r \le k_e(m-t)$ and that the combinatorial bound $\mathcal{B}_r$ satisfies equality. Proposition 6.12 confirms the equality for $e \in \{1, 2\}$, but the equality in full generality is open.

In Lean: prm_ghw_dimension_reduction_equality (statement), prm_ghw_dimension_reduction_le (partial)

OP-1270 Optimal competitive ratio of Dominant Resource Fairness for two resourcesIn LeanOnline Algorithms

In multidimensional nonclairvoyant scheduling with $D=2$ resource types and zero release times, where jobs have processing times $p_j > 0$, resource demand vectors $a_j \in [0, 1]^2$ normalized so $\max_{d \in \{1, 2\}} a_{j,d} = 1$, and rate caps $u_j > 0$, the competitive ratio of Dominant Resource Fairness (DRF) for total completion time $\sum_j C_j$ is known to lie between $1 + \sqrt{2} \approx 2.414$ and $2 + \sqrt{3} \approx 3.732$. What is the exact worst-case competitive ratio of DRF (or one-shot DRF) for total completion time when $D=2$?

Posed in arXiv:2611.07905, Sec. 5 — Tight Worst-Case Completion-Time Bounds for Dominant Resource Fairness

In Lean: drf_two_resources_projection_inequality (partial), oneshot_drf_competitive_ratio_two_resources_lower_bound (partial), op_1270_oneshot_drf_competitive_ratio_two_resources (statement)

OP-1285 Agreement of sliding expansion and anti-ribbon expansion on corner-crossed diagrams without implicit boxesIn LeanCombinatorics for TCS

Let D ⊂ ℕ² be a finite diagram that is corner-crossed (any two northwest corners form a crossing) and has no implicit boxes (meaning D = \widetilde{D}, where \widetilde{D} is the closure under filling gaps within any row or column). Can the consecutive admissible pairs (b₁, b₂) at every internal node of the sliding tree T_D be chosen such that the terminal sliding expansion coincides with the anti-ribbon expansion Slide_D(A) = ARE_D(A) for every tableau A on D, or equivalently (by Proposition 4.15), such that ω(P_T) = rb(T) for every standard Young tableau T ∈ SYT(D)?

Posed in arXiv:2611.07715, Conjecture 4.13 — Anti-ribbon shaped Young diagram decomposition

What is known

The paper shows that the identity holds if and only if ω(P_T) = rb(T) for all standard tableaux T (Proposition 4.15), and shows that the no-implicit-boxes hypothesis is necessary by a counterexample on 3 boxes (Remark 4.14). The conjecture remains open even for straight Young diagrams of general partitions.

In Lean: open_problem_1285_sliding_expansion_conjecture (statement), open_problem_1285_partial_no_crossings (partial), open_problem_1285_exists_tree_of_no_crossings (partial)

OP-1288 Exact worst-case approximation ratio of Byte-Pair Encoding for three mergesIn LeanAlgorithm Design & Analysis

Let $\rho_3 = \inf_s \frac{\mathrm{BPE}(s, 3)}{\mathrm{OPT}(s, 3)}$ denote the worst-case approximation ratio of greedy Byte-Pair Encoding for budget $k = 3$, taken over all finite strings $s$ and all tie-breaking rules, where $\mathrm{BPE}(s, 3)$ is the utility of greedy BPE and $\mathrm{OPT}(s, 3)$ is the optimal partial-merge utility. Is $\rho_3 = 7/12$, or is $\rho_3 < 7/12$?

Posed in arXiv:2611.08671, Sec. 8 — Greedy Byte-Pair Encoding Achieves at Least 0.361 of the Optimal Compression

What is known

Theorem 12 settles \rho_2 = 3/4 exactly, while for k = 3 Proposition 13 proves \rho_3 <= 7/12. The exact value of \rho_3 remains open.

In Lean: bpe_worst_case_ratio_three_exact (statement), bpe_worst_case_ratio_three_upper_bound (partial)

OP-1304 Logarithmic distortion embedding for unions of 1-strongly Euclidean metric spacesIn LeanAlgorithm Design & Analysis

Let $(X, d)$ be a metric space that can be written as the union $X = U_1 \cup \dots \cup U_k$ of $k$ subsets, each of which is 1-strongly Euclidean in $X$ (that is, for each $i \in \{1, \dots, k\}$ and every point $x \in X$, $U_i \cup \{x\}$ isometrically embeds into Euclidean space $\ell_2$). Does there exist an absolute constant $C > 0$, independent of $k$ and $|X|$, such that $(X, d)$ embeds into $\ell_2$ with distortion at most $C \log(k+1)$?

Posed in arXiv:2611.08546, Sec. 1.1, p. 3 — Bourgain's Theorem for a Union of Euclidean Metric Spaces

What is known

The paper proves that a union of k 2-strongly Euclidean sets embeds into Euclidean space with distortion O(log k), and a union of k 1-strongly Euclidean sets embeds with distortion O(k^{0.895} log k). It leaves open whether the distortion for 1-strongly Euclidean sets is O(log k).

In Lean: one_strongly_euclidean_union_two_sets_distortion (partial), op_1304_union_one_strongly_euclidean_logarithmic_distortion (statement), one_strongly_euclidean_singleton_union_isometric (partial), one_strongly_euclidean_spherical_core_extension (partial), one_strongly_euclidean_spherical_core_variable_height_extension (partial), ose_spherical_two_layer_hilbert_distortion_upper (partial), ose_two_layer_cube_exact_hilbert_distortion (partial), ose_two_layer_cube_exact_extension_threshold (partial), ose_two_layer_cube_universal_extension_threshold (partial), ose_two_piece_unbounded_negative_directions (partial), ose_two_piece_unbounded_depth_and_negative_directions (partial), ose_two_piece_block_exact_hilbert_distortion (partial), ose_convex_hull_projection_unbounded (partial)

OP-1308 Absence of type II edges in claw-free minimal 3-factor-critical graphsIn LeanGraph Theory & Graph Algorithms

Let $G$ be a claw-free minimal 3-factor-critical graph. Can $G$ contain a type II edge? That is, can there exist an edge $e = uv \in E(G)$ with $d_G(u), d_G(v) \ge 5$ such that every good set $S_e \subseteq V(G) \setminus \{u,v\}$ of minimum cardinality satisfies $|S_e| = 4$, the graph $G - S_e - e$ has exactly three components, and two of those components are the singletons $\{u\}$ and $\{v\}$?

Proposed here, building on arXiv:2611.09072, Corollary 2.9 — Claw-free minimal factor-critical and bicritical graphs; the paper does not ask it

What is known

For k >= 2, Lemma 2.8 classifies edges between vertices of degree at least k+2 in claw-free minimal k-factor-critical graphs into type I (|S_e| = k, 2 components in G - S_e - e) and type II (|S_e| = k+1, 3 components, with two being isolated vertices u, v). Corollary 2.9 shows that claw-free minimal bicritical graphs (k=2) have no type II edges. The paper does not address whether type II edges can appear for k >= 3.

In Lean: op_1308_claw_free_minimal_3_factor_critical_no_type_ii_edge_negation (negation)

OP-1312 Existence of Range-Criterion Subspaces for Sporadic Krawtchouk QuadruplesIn LeanQuantum Computation

Let (m, n, k, \ell) be a quadruple of positive integers such that m <= n, k <= \ell, k + \ell = m + n - 2, and the binary Krawtchouk polynomial satisfies P_{m-1}^{k+\ell}(k) = 0. Do there exist complex subspaces D, E \subset \mathbb{C}^m \otimes \mathbb{C}^n of codimensions k and \ell, respectively, such that for all x \in \mathbb{C}^m and y \in \mathbb{C}^n, the conditions x \otimes y \in D and \bar{x} \otimes y \in E imply x = 0 or y = 0? In particular, do such subspaces exist for the sporadic quadruple (m, n, k, \ell) = (5, 5, 3, 5)?

Posed in arXiv:2611.08518, Sec. 1, after Problem 1.1 — Integral zeros of Krawtchouk polynomials and quantum entanglements

What is known

The paper resolves the range-criterion conjecture for all infinite asymmetric families in case (d) for m = 3 and m = 4. The only remaining cases of the conjecture are the sporadic zeros for m >= 5, the minimal such instance being (m, n, k, \ell) = (5, 5, 3, 5).

In Lean: krawtchouk_sporadic_zero_five_five_three_five (partial), sporadic_krawtchouk_range_criterion_subspaces (statement), range_criterion_subspaces_sporadic_five_five_three_five (partial), range_criterion_subspaces_three_family (partial)

OP-1321 Extension of EF1 and weak strategy-proofness impossibility to three or more agentsIn LeanFair Division

Let n >= 3 and let k >= 2, 0 <= r < n, and T = kn + r. Let N = {1, ..., n} be the set of agents and O be a set of T indivisible objects. Let P be the set of strict linear orders on O, and A the set of allocations (partitions of O into n pairwise disjoint bundles (x_1, ..., x_n)). Does there exist a social choice rule f : P^N -> A that is: 1. Non-wasteful: bigcup_{i in N} f_i(succ) = O for every profile succ in P^N; 2. Neutral: f(succ^sigma) = sigma(f(succ)) for every bijection sigma : O -> O; 3. Weakly strategy-proof: for every profile succ, every agent i in N, and every misreport succ'_i, f_i(succ'_i, succ_{-i}) does not strictly pairwise-dominate f_i(succ) under succ_i; and 4. Envy-free up to one object (EF1): for all i, j in N, there exists y in f_j(succ) such that f_i(succ) pairwise-dominates f_j(succ) \ {y} under succ_i?

Posed in arXiv:2611.09685, Sec. 5, after Proposition 2 — Who Picks First? Compensatory Fairness When Equal Division Is Impossible

What is known

Proposition 2 proves that for n = 2 agents and k >= 2 objects each, no non-wasteful, neutral, and weakly strategy-proof rule satisfies EF1. The paper shows that for n >= 3, if some agents receive only 1 object, such a rule does exist (Remark 2). However, when every agent receives at least 2 objects (k >= 2), the two-agent contradiction does not directly generalize because a third agent's report can alter the division between the other two.

In Lean: proposition_2_two_agents_impossibility (partial), draft_rule_ef1_not_weakly_strategy_proof (partial), op_1321_partial_three_agents_two_objects (partial), op_1321_impossibility_extension (statement)

OP-1332 Polynomial DFA Size Bound for Finite Word Subtraction GamesIn LeanCombinatorial Games

Fix a finite alphabet $\Sigma$. For any nonempty finite subtraction set $S \subseteq \Sigma^+$, let $\ell = \max \{|s| : s \in S\}$, and let $L_{\mathcal{N}}(S)$ be the language of winning positions ($\mathcal{N}$-positions) in the normal-play word subtraction game $\mathtt{WordSubtraction}(S)$ (where a move removes a suffix $s \in S$ from the current word). Does there exist a polynomial $p \colon \mathbb{N} \to \mathbb{N}$, independent of $S$, such that for every nonempty finite $S \subseteq \Sigma^+$, $L_{\mathcal{N}}(S)$ is recognized by a deterministic finite automaton with at most $p(\ell)$ states?

Posed in arXiv:2611.09157, Problem 2.1 — Word Subtraction Games

In Lean: word_subtraction_is_regular (partial), word_subtraction_dfa_state_complexity_le_exp (partial), word_subtraction_poly_dfa_bound (statement)

OP-1340 inhomogeneous hard core closed neighborhood variance boundIn LeanStatistical Mechanics & Thermodynamics

Let G=(V,E) be a finite simple graph, and assign each vertex v a positive fugacity lambda_v. Select an independent set I with probability proportional to the product of lambda_v over v in I. Is Var(|I|) at least the sum over v in V of lambda_v/(1+sum_{u in N[v]} lambda_u)^2? Is equality attained only when every connected component is a clique?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The variance of particle count is the hard-core gas susceptibility and its lower bounds control fluctuations. The proposed inequality is an inhomogeneous, local-degree strengthening of the 2026 homogeneous maximum-degree theorem: it gives the individual neighborhood fugacity rather than the common worst-case degree. It is sharp for arbitrary fugacities on disjoint clique components. Zhang and Xu average addable vertices by cardinality and exploit a common scalar fugacity; with heterogeneous activities, that counting identity no longer closes in |I|, so their proof does not transfer. It is also genuinely stronger than the degree-sequence expectation bounds and does not follow from differentiating them. Evidence: Experiment 19546 enumerated all independent sets in every connected graph of orders 2 through 7 from the graph atlas and tested 100 independently sampled heterogeneous fugacity vectors per graph, each coordinate log-uniform from 0.01 to 100; no violations were seen. Equality on cliques was numerically recovered, up to floating-point error. This is exploratory numeric evidence, not a proof.

In Lean: op_1340_inhomogeneous_hard_core_closed_neighborhood_variance_bound (statement), op_1340_clique_components_equality (partial), op_1340_complete_graph_equality (partial), op_1340_empty_graph_equality (partial)

OP-1347 ccz tree renyi entropy tree shift exact order boundaryIn LeanQuantum Mechanics

For a finite n-vertex tree T=(V,E), prepare |psi_T> by starting with |+> on edge qubits a_e and vertex qubits b_v and applying CCZ(a_e,b_u,b_v) for each edge e={u,v}; let rho_T be the reduced state on the edge qubits and let H_alpha(T) be its order-alpha Renyi entropy, with H_1 the von Neumann entropy. For every real alpha>=1, does every generalized tree shift T -> T' satisfy H_alpha(T')<=H_alpha(T)? In particular, is H_alpha(T)<=H_alpha(P_n) for all n-vertex trees? Conversely, for every 0<alpha<1, is there an n for which the star S_n has H_alpha(S_n)>H_alpha(P_n)? A generalized tree shift chooses non-leaf vertices u,v joined by a path whose internal vertices all have degree two, then moves all edges from v to its off-path neighbors to u.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Entanglement researchers want to compare non-stabilizer states through their von Neumann and real-order Renyi spectra, which integer replica moments alone do not order between integers. The question also asks for a phase boundary: finite-size tests misleadingly show the path winning for alpha=0.9 at n<=12, but the direction reverses at larger n. The spectrum is the distribution of the induced edge set obtained from a uniform random vertex subset, so the statement bridges quantum entanglement and a natural random-subgraph entropy. A majorization argument cannot settle it, since the spectra need not be comparable by majorization. It moves Galvin et al., Theorem 1.5, gives an increasing-columns criterion for tree homomorphism counts and its proof establishes monotonicity under generalized tree shifts. For every integer alpha>=2, the corresponding CCZ replica target has vertices s in {0,1}^alpha, adjacent when s AND t is zero or all-ones; its orbit matrix by decreasing subset size appears to meet that criterion. Thus the earlier integer-order pitch OP-1346 is likely already implied by this general theorem and should not be treated as a novel baseline. along boundary: Find the sharp real Renyi-order boundary: extend the known-looking integer replica inequalities to all real orders including von Neumann entropy and require the structural tree-shift inequality; show that every order below one eventually fails, even for a star versus a path.. Evidence: 19639 tests every non-isomorphic generalized shift through 10 vertices at eight orders from 1 to 10, finding no violation. 19646 checks 3,154 random adjacent shifts through 22 vertices with no violation at orders >=1, while finding reversals for alpha=0.9. 19649 groups exact induced-edge preimage multiplicities for paths through 70 vertices and compares with the explicit star spectrum: the star beats the path at alpha=0.9 by n=25 and at alpha=0.95 by n=50. 19620 independently checks the spectrum/moment reduction by direct reduced-state computation through seven vertices.

In Lean: op_1347_ccz_tree_renyi_entropy_tree_shift_exact_order_boundary (statement), ccz_tree_path_maximizes_renyi_entropy_ge_one (partial), ccz_tree_shift_von_neumann_entropy_le (partial), ccz_star_beats_path_sub_one_renyi_entropy_half (partial)

OP-1349 cyclic permutation word game exact lcm state complexityIn LeanCombinatorial Games

Fix d>=2 and alphabet Sigma={0,1,...,d-1}; let w=0 1 ... (d-1), and let rot_s(w)=s (s+1) ... (d-1) 0 ... (s-1) for 1<=s<d. For positive integers a,b, play normal-play word subtraction over Sigma with the two allowed suffixes w^a and rot_s(w)^b: each turn removes one allowed suffix, and a player with no move loses. Is the minimal complete DFA recognizing the losing-position language of this game exactly 4d*lcm(a,b)-d states for every d,s,a,b?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Automata and combinatorial-game researchers seek the information a winning strategy must remember. The conjectured formula exhibits an unexpected least-common-multiple synchronization and says that the relative rotation does not affect the number of states, even when the rotation and d are not coprime. It gives a concrete two-word quadratic lower-bound family and an exact target for the general complexity question. Repeated-letter primitive words do not obey this simple law, so the permutation-word hypothesis is substantial. It moves Inoue and Inazu, Theorem 2.9, give a general finite-automaton construction for finite word-subtraction sets; their general polynomial-size question is already OP-1332. The more specific d=2 prediction, 8*lcm(a,b)-2, is already OP-1345 and remains unproved. along stronger_result: Determine the exact minimal automaton size simultaneously for arbitrary alphabet size, every nontrivial rotation and both exponents, extending the previous binary conjecture and yielding a sharp quadratic family rather than only a general polynomial upper-bound question.. Evidence: 19673 completed 2,212 instances over d=2,...,8, every rotation, all exponent pairs through 7 and 30 additional random pairs through 16, with no discrepancy before its d=9 timeout. 19675 independently compares the reachable-state recursion with direct game play over 9,600 perturbed periodic words, 1,439,344 prefixes, and alphabet sizes up to 15. 19668 finds that allowing repeated symbols changes the formula, e.g. word 0011 with rotation 3, preventing an unjustified extension.

In Lean: op_1349_cyclic_permutation_word_game_exact_lcm_state_complexity (statement), op_1349_partial_unit_exponents (partial), op_1349_partial_binary_case (partial)

OP-1351 cyclic latin stable rank polynomial gcd sequence invarianceIn LeanMatching & Market Design

For n >= 3 and a permutation a=(a_0,...,a_{n-1}) of Z/nZ, define the opposed cyclic Latin marriage market by L_a(i,j)=r exactly when i+j=a_r mod n. Each man ranks women by increasing L_a(i,j), and each woman ranks men by decreasing L_a(i,j). Define F_a(z)=sum over all stable perfect matchings pi of z^(sum_i L_a(i,pi(i))). If two orderings a,b satisfy gcd(n,a_{r+1}-a_r)=gcd(n,b_{r+1}-b_r) for every r=0,...,n-2, must F_a(z)=F_b(z)?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The stable-match rank polynomial records not only the number of stable outcomes but the distribution of their aggregate proposer rank. Benjamin, Converse and Krieger characterize stability and show that the natural cyclic ordering attains the minimum n stable matchings, but this does not determine the polynomial after arbitrary reordering of the symbols. OP-1342 asks only for the minimum-count boundary for general Latin squares; here the proposed invariant covers the entire rank distribution for a nontrivial infinite group-based family. Consecutive gcds specify the number of alternating cycles in adjacent rank matchings, but those cycles can interact across several ranks, so agreement of the individual cycle counts does not immediately identify the full lattice or its rank polynomial. Evidence: Experiment 19559 exhausts every symbol order for n=4,5,6. Experiment 19966 tests 240 orders for n=7, 1000 for n=8 and 90 for n=9: among respectively 239, 818 and 39 comparisons sharing gcd sequences, there were no rank-polynomial disagreements. Experiment 19569 includes n=10 and 12 sampled orderings. Experiment 19968 rejects a tempting simplification: stable matchings can use three or more consecutive ranks, and a formula treating adjacent rank cycles independently fails already at n=6. These are finite computations, not proofs.

In Lean: cyclic_latin_rank_matching_is_stable (partial), cyclic_latin_stable_rank_polynomial_gcd_sequence_invariance (statement), cyclic_latin_stable_rank_polynomial_order_three (partial)

OP-1352 fixed k binary deletion collision sharp sqrt defect lawIn LeanInformation Theory & Coding

For every fixed integer k>=2 and n>=k, let e(u,w) count the index subsets of size n-k of a binary word w in which the retained subsequence equals u, and let C_k(n)=min_{w in {0,1}^n} sum_{u in {0,1}^{n-k}} e(u,w)^2. Is it true that lim_{n to infinity} [C_k(n)-binom(n,k)]/n^(k-1/2) = 2*sqrt(2*(k-1))/(k-1)! ?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Synchronization-channel researchers care about collision entropy and how concentrated the deletion-output distribution must be. OP-999 and OP-1062 conjecture the special cases k=2 and k=3, respectively; both remain open, and neither controls the additional interactions between k deletion pairs. The proposed formula unifies their distinct constants and predicts an exact coefficient and square-root optimal spacing at every fixed k. It is a global minimum over all binary words, so its lower bound is substantially stronger than exhibiting balanced constructions. The question is a single precise infinite family rather than one more numerical case. Evidence: Experiment 19970 evaluates balanced-repeat constructions by a paired-subsequence DP for k=2,...,6 and n up to 65536. At n=65536 the normalized excesses for k=4,5,6 are 0.83216, 0.24358, 0.05536, approaching the respective predicted 0.81650, 0.23570, 0.05270; the k=2,3 values also approach the earlier conjectured constants. Experiment 19971 independently matches that DP to direct deletion-mask enumeration on 1125 short random instances. Experiment 19972 exhaustively computes global minima for k=4,5,6 through n=15. The large-n data are construction upper bounds and do not establish the necessary global lower bounds.

In Lean: min_binary_deletion_collision_two_four (partial), min_binary_deletion_collision_three_four (partial), op_1352_binary_deletion_collision_asymptotic_k_two (partial), op_1352_fixed_k_binary_deletion_collision_sharp_sqrt_defect_law (statement)

OP-1354 triangle free cubic petersen variance first crossoverIn LeanStatistical Mechanics & Thermodynamics

For a finite simple triangle-free cubic graph G, let Z_G(x)=sum_{I independent} x^|I| and V_G(x)=(x d/dx)^2 log Z_G(x)/|V(G)|, the hard-core particle-number variance per vertex. Let P(x)=1+10x+30x^2+30x^3+5x^4 and Q(x)=1+20x+160x^2+660x^3+1510x^4+1912x^5+1240x^6+320x^7+5x^8. Let x_* be the smallest strictly positive root of (x d/dx)^2[(log Q(x))/20-(log P(x))/10], numerically about 0.7237539694. Is V_G(x)>=V_Petersen(x) for every such G and every 0<x<=x_*? Is x_* the largest endpoint for which this holds simultaneously on the full interval from zero?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The hard-core variance is the particle-number susceptibility, and sharp fluctuation bounds matter in statistical mechanics and independent-set counting. Perarnau and Perkins prove that the Petersen graph minimizes occupancy on triangle-free cubic graphs for all activities through 1, but differentiating that pointwise inequality cannot compare variances. Zhang and Xu prove general maximum-degree and triangle-free variance lower bounds without this sharp extremizer. Numerical searches show the naive full occupancy interval is too long: a connected Petersen two-lift has lower variance at x=3/4. The question asks whether that same explicit graph determines the exact universal onset of failure, not merely a small finite example. Evidence: Experiment 19999 independently enumerates all subsets of an explicit connected triangle-free cubic 20-vertex two-lift and recovers Q exactly; its per-vertex variance difference from Petersen is positive at 1/2, 7/10 and 18/25 but negative at 3/4 and 9/10. Experiment 19994 numerically locates its first positive crossover at 0.7237539694. Experiment 19997 checks all 63 connected two-lifts and samples 4977 connected three-lifts and 2995 connected four-lifts: no tested lift crosses earlier. Experiment 19998 tests 24488 connected triangle-free perturbations of two or three Petersen copies at activities through 29/40, with no earlier sampled witness. These numerical and finite checks leave the universal inequality open.

In Lean: petersen_hard_core_var_per_vertex_eq_poly (partial), lift20_variance_crossover_at_three_fourths (partial), lift20_variance_exceeds_petersen_at_half (partial), op_1354_triangle_free_cubic_petersen_variance_crossover (statement)

OP-1355 claw free iff weighted hard core neighborhood variance boundIn LeanStatistical Mechanics & Thermodynamics

For a finite simple graph G=(V,E), assign activities lambda_v>0 and nonnegative observable weights a_v>=0, and sample an independent set I with probability proportional to product_{v in I} lambda_v. Is G claw-free if and only if, for every choice of lambda and a, Var(sum_{v in I} a_v) >= sum_{v in V} a_v^2 lambda_v/(1+sum_{u in N[v]} lambda_u)^2? Here claw-free means that G has no induced K_{1,3}.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

OP-1340 conjectures the unweighted local lower bound on all graphs; it says nothing about the variance of a general spatially weighted particle count. The naive weighted extension fails on a claw, yet the experiments suggest the exact obstruction may be induced claws. If true, the equivalence would characterize an entire graph class by a sharp family of susceptibility inequalities, connecting hard-core gases, weighted observables and monomer-dimer models on line graphs. The ordinary scalar variance theorem of Zhang and Xu and univariate real-rootedness results do not give this inhomogeneous copositivity inequality. The converse is motivated by concentrating activities on an induced claw and suppressing all other sites; the difficult direction is the uniform weighted bound on all claw-free graphs. Evidence: Experiment 20018 gives an exact rational obstruction on K_1,3 with leaf activities 10, center activity 1, observable weight 1 only at the center: variance 1331/1774224 is smaller than the proposed 1/1024. Experiment 20016 tested all connected claw-free graph isomorphism classes through seven vertices, 40 independently sampled heterogeneous activity profiles per graph and three simplex-optimization starts per profile, with no violation. Experiment 20017 tested 90 larger line graphs and clique-cycle blowups, 10800 activity-weight optimizations, again without a numerical violation. Optimization and the rational witness are exploratory computation, not a Lean-checked result.

In Lean: op_1355_empty_graph_equality (partial), op_1355_complete_graph_variance_ge_bound (partial), op_1355_claw_free_of_weighted_bound (partial), op_1355_claw_strict_variance_violation (partial), op_1355_clique_components_is_claw_free (partial), op_1355_clique_components_variance_ge_bound (partial), op_1355_claw_free_iff_weighted_neighborhood_variance_bound (statement)

OP-1358 random greedy independent set split graph max varianceIn LeanGraph Theory & Graph Algorithms

For every integer n>=3 and every n-vertex finite simple graph G, consider the random greedy maximal independent set formed by examining the vertices in uniformly random order and accepting each vertex that has no earlier accepted neighbor. Let X_G be its cardinality. Is Var(X_G) <= max_{1<=k<n} k(n-k)(n-k-1)^2/n^2? Are equality graphs exactly the joins K_k + overline{K}_{n-k} for those k attaining this maximum?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Random greedy independent sets are central to randomized graph algorithms and random sequential adsorption. Shaikh identifies the variance-maximizing tree and establishes an edge-count bound for triangle-free graphs. Removing the tree constraint changes the order of the maximum: a complete split graph has a quadratic-in-n variance and, for n>=7, a nontrivial clique can do better than the star. This asks for an exact n-dependent extremal value and structural equality cases over all graphs; it is distinct from the paper's question of whether its edge-count inequality holds when triangles are allowed. The triangle-free proof cannot extend directly because its deleted-neighborhood edge identity acquires a triangle term. It moves Shaikh (2026), Corollary 2, the n-vertex star maximizes random-greedy independent-set size variance over trees along new_setting: Replace trees by all simple graphs on n vertices and give the exact variance maximum as a finite optimization over complete split graphs.. Evidence: Experiment 20379 computes exact first and second moments by conditioning on the first vertex for every unlabeled graph of order 3 through 7: the unique maximizer is a split graph, with the extremizer changing from a star to K_2 joined to 5 independent vertices at n=7. Experiment 20386 enumerates all 2^(n-1) threshold-graph construction sequences for each n=7,...,15 and finds the same split optimum (floating-point arithmetic). Experiment 20381's random-restart edge-mutation search up to n=14 found no larger value.

In Lean: random_greedy_split_graph_max_variance (statement), complete_split_graph_greedy_indep_var (partial), tree_random_greedy_indep_var_le_star (partial)

OP-1359 equal alphabet deletion collision universal sqrt lawIn LeanInformation Theory & Coding

For each integer q>=2 and n>=q, let e(u,w) be the number of (n-q)-element index sets of the q-ary word w that spell u. Define C_q(n)=min over w in {0,...,q-1}^n of the sum over u in {0,...,q-1}^{n-q} of e(u,w)^2. Is it true, for every fixed q>=2, that (C_q(n)-binom(n,q))/n^(3/2) tends to 2 sqrt(2) as n tends to infinity?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers in insertion/deletion channels use subsequence embedding multiplicities to quantify collision entropy and posterior uncertainty. OP-999 proposes this limit only for q=2, and OP-1352 varies the number of deletions while retaining a binary alphabet. At q>2 the cyclic word has no collisions for fewer than q deletions, and the competitive defects are repeats at distance q-1 rather than repeated bits, so the binary lower bound does not transfer directly. The question predicts the same sharp coefficient at the first nontrivial deletion radius for every alphabet size. It asks for the global optimum, not just the value of one construction. It moves AFTD OP-999 and OP-1352, the conjectured sharp collision excess for two deletions from a binary word along new_setting: Increase the alphabet size and deletion number together, and ask for one sharp asymptotic constant for every fixed alphabet size q.. Evidence: Experiment 20408 exhaustively minimizes up to alphabet relabeling for q=3 and retained lengths 5-9, q=4 and retained lengths 4-6, q=5 and retained lengths 4-5. Experiment 20403 verifies the paired-subsequence dynamic program against direct enumeration for q=2,...,5 and tests sparse-defect cyclic constructions. Experiment 20404 evaluates those constructions up to n=20000: normalized excess ranges from 2.81996 at q=6 to 2.82765 at q=2, approaching 2 sqrt(2)=2.82843. These are construction upper bounds, not global lower bounds. Experiments 20406 and 20409 also show exact interalphabet equality at equal retained length is too strong: a ternary word of length 14 has excess 88, versus binary optimum 90 at retained length 11.

In Lean: op_1359_equal_alphabet_deletion_collision_universal_sqrt_law (statement), op_1359_q_two_of_binary_two_deletion_law (partial), min_q_ary_deletion_collision_three_three_five (partial)

OP-1365 qary off diagonal deletion collision explicit defect limitIn LeanInformation Theory & Coding

Fix integers q>=2 and k>=q, and put d=k-q. For each sufficiently large n set B_n to the nearest integer to sqrt(2n/(d+1)); form a word w=w_0...w_{n-1} over {0,...,q-1} by setting w_i=i for 0<=i<q and, for i>=q, setting w_i=w_{i-(q-1)} when B_n divides i-q+1, and otherwise setting w_i to the unique alphabet symbol absent from w_{i-q+1},...,w_{i-1}. For each word u of length n-k let e(u,w) be the number of index subsets of size n-k spelling u. Does [sum_u e(u,w)^2 - binom(n,k)] / n^(d+3/2) converge to 2 sqrt(2(d+1))/(d+1)! as n tends to infinity?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

For synchronization-channel coding, collision sums quantify concentration of deletion outputs. This is a tractable constructive half of two stalled minimization programs and a new joint-alphabet/radius theorem, with a coefficient depending only on k-q. The binary repeat-defect analysis does not directly transfer because for q>2 competing collisions arise from length-(q-1) repetitions among q-symbol cycles. A proof would provide explicit near-optimal benchmark words and global-minimum limsup bounds, without assuming the still-open lower bounds. It moves AFTD OP-1352 conjectures the optimal asymptotic for binary words at all fixed k; OP-1359 conjectures the optimal asymptotic for k=q over every alphabet. Both matching lower bounds remain open. along new_setting: Give a single explicit construction and exact upper-bound asymptotic for all fixed q and k>=q, including the previously unasked off-diagonal q>=3, k>q regime.. Evidence: Experiment 20761 compares its paired-subsequence DP to direct deletion-mask enumeration in 81 instances, and evaluates the displayed deterministic construction at lengths 2,000, 10,000, and 30,000 for seven (q,k) pairs, including (3,4),(3,5),(3,6),(4,5),(4,6),(5,6),(6,7). The normalized values near n=30,000 agree with the predicted constants within 0.002. Independent experiment 20435 also supports the off-diagonal pattern. These are construction values, not global lower bounds.

In Lean: op_1365_qary_off_diagonal_deletion_collision_explicit_defect_limit (statement), op_1365_diagonal_deletion_collision_explicit_defect_limit (partial), op_1365_binary_deletion_collision_explicit_defect_limit (partial)

OP-1370 Maximum Size of Non-Empty Strongly Incomparable Uncomplemented FamiliesIn LeanCombinatorics for TCS

Let $n \ge 3$ and $3 \le t \le n$ be integers. Let $\mathcal{A}_1, \dots, \mathcal{A}_t \subseteq 2^{[n]}$ be non-empty families of subsets of $[n]$ that are uncomplemented (no family contains both a set and its complement) and mutually strongly incomparable (for all $i \ne j$, if $A \in \mathcal{A}_i$ and $B \in \mathcal{A}_j$, then $A \not\subseteq B$ and $B \not\subseteq A$). Let $M(n,t)$ denote the maximum of $\sum_{i=1}^t |\mathcal{A}_i|$ over all such collections. Is $M(n,t) = 2^{n-1} - 1$?

Posed in arXiv:2611.12199, Conjecture 4.3 — Hilton's Conjecture on Uncomplemented Incomparable Families

What is known

Proposition 4.2 proves $2^{n-1}-1 \le M(n,t) \le 2^{n-1}$ for all $n \ge 3$ and $3 \le t \le n$, leaving a gap of 1 between the lower bound construction and the upper bound.

In Lean: op_1370_uncomplemented_incomparable_conjecture (statement), op_1370_uncomplemented_strongly_incomparable_upper_bound (partial), op_1370_uncomplemented_strongly_incomparable_lower_bound (partial), op_1370_case_n3_t3 (partial), hilton_strong_incomparability_matrix (partial), op_1370_three_two_singletons (partial), op_1370_singleton_element_family_bound (partial), op_1370_three_two_singletons_sharp (partial), op_1370_private_element_bound (partial), op_1370_four_elements_bound (partial), op_1370_pair_shatter_surplus_counterexample (partial), op_1370_six_three_bound (partial), op_1370_no_private_sharp_all_dimensions (partial), op_1370_small_pair_bound (partial), op_1370_low_vcdim_others_bound (partial), op_1370_no_private_sharp_four_families (partial), op_1370_sparse_others_bound (partial)

OP-1385 Finite-Memory Determinacy of Prioritized Borel Games with Three PrioritiesIn LeanAutomata & Formal Languages

In every prioritized Borel tree game with $k = 3$ priorities and state space $Q$ (where positions are in $2^* \times Q$, edges advance to children with priorities in $\{1, 2, 3\}$, and Eve wins an infinite play tracing branch $b$ if and only if $b \in W_i$ for $i = \limsup_{n \to \infty} p_n$), does the winner always have a finite-memory winning strategy? Moreover, is the required memory size bounded by a computable function of $|Q|$?

Posed in arXiv:2611.10136, Sec. 5.2.2, after Remark 25 — Automata for MSO over Infinite Trees with Quantification over Borel Sets of Branches

What is known

While games with 1 priority admit memoryless strategies (Proposition 23) and games with 2 priorities admit 2-state memory strategies independent of the state space (Proposition 24), games with 3 priorities require memory growing with the number of states (Proposition 41), and the existence of any finite-memory winning strategy remains open.

In Lean: op_1385_three_priority_borel_finite_memory_determinacy (statement), prioritized_borel_two_priorities_two_memory (partial), prioritized_borel_one_state_eve_memory_of_winning (partial), prioritized_borel_alternating_priority_no_two_relabel (partial), prioritized_borel_reverse_state_histories_unique (partial), prioritized_borel_deterministic_opponent_memoryless (partial), prioritized_borel_record_replay (partial), prioritized_borel_record_injective (partial), prioritized_borel_outgoing_edge_card_bound (partial), prioritized_borel_bounded_opponent_branching_compression (partial), prioritized_borel_finitely_many_opponent_choices_compression (partial), prioritized_borel_finite_hidden_opponent_choices_positional (partial), prioritized_borel_eventually_visible_determined_positional (partial), prioritized_borel_reverse_edge_deterministic_positional (partial), prioritized_borel_eventual_hidden_shadow (partial), prioritized_borel_payoff_tail_congr (partial), prioritized_borel_reverse_deterministic_finite_hidden_priorities_positional (partial)

OP-1391 Tight lower-order term for non-deterministic degree of random Boolean functionsIn LeanCircuit Complexity & Lower Bounds

Does there exist an absolute constant $C > 0$ such that for a uniformly random Boolean function $f : \{0,1\}^n \to \{0,1\}$, with probability $1 - o(1)$ as $n \to \infty$, the non-deterministic degree satisfies $\mathsf{ndeg}(f) \le \frac{n}{2} + C\sqrt{n}$? Here $\mathsf{ndeg}(f)$ is the minimal degree of a polynomial $p \in \mathbb{R}[x_1, \dots, x_n]$ such that for all $a \in \{0,1\}^n$, $p(a) \ne 0 \iff f(a) = 1$.

Proposed here, building on arXiv:2611.11966, Sec. 1, after Theorem 3 and Corollary 5 — On Non-Deterministic Representation of Boolean Functions; the paper does not ask it

What is known

The paper shows that almost all Boolean functions on n variables have non-deterministic degree at most n/2 + O(sqrt(n log n)) (Theorem 3). The lower bound established in arXiv:2310.08004 shows that almost all Boolean functions have rational degree (and hence non-deterministic degree) at least n/2 - O(sqrt(n)). The gap of sqrt(log n) in the lower-order term arises from taking a union bound over all basis vectors. It remains open whether the true typical non-deterministic degree is n/2 + O(sqrt(n)) without the sqrt(log n) factor.

In Lean: ndeg_le_n (partial)

OP-1394 Uniform Rotation Estimation with Unknown Source Parameter in Overcomplete ICAIn LeanEstimation Theory

In the equally spaced overcomplete ICA model with unknown rotation $\theta \pmod{\pi/q}$ and source density $\phi_a$ with unknown parameter $a \in (0, 4]$, can an estimator $\hat{a}$ derived from the radial fourth moment $\mathbb{E}\|X\|^4 = 8 + 4a/q$ be plugged into the radially weighted phase estimator such that the sample size guarantee $n \le O(1/H_q^2)$ for estimating $\theta$ within angular accuracy $\pi/(8q)$ with probability at least $3/4$ is preserved uniformly over $a \in [\epsilon, 4]$ and $\theta$?

Posed in arXiv:2611.11852, Sec. 5, Learning the source law — Identifiable but Hard to Estimate: Rotation in Equally Spaced Overcomplete ICA

What is known

The paper proves that the radial fourth moment identifies the source parameter a, but the effect of estimation error in a on the small-mean weighted harmonic estimator is left open.

In Lean: overcomplete_ica_moment_estimator_exact (partial), overcomplete_ica_radial_fourth_moment_identifiability (partial), overcomplete_ica_sample_size_hellinger_comparison (partial)

OP-1399 Unimodality of Zero Forcing Polynomials for TreesIn LeanGraph Theory & Graph Algorithms

Let $T = (V, E)$ be a finite tree. For each integer $i \in \{1, \dots, |V|\}$, let $z(T, i)$ denote the number of zero forcing sets of $T$ of cardinality $i$. The zero forcing polynomial of $T$ is defined by $\mathcal{Z}(T; x) = \sum_{i=1}^{|V|} z(T, i) x^i$. Is $\mathcal{Z}(T; x)$ always unimodal, i.e., does there always exist an index $i^* \in \{1, \dots, |V|\}$ such that $z(T, 1) \le z(T, 2) \le \dots \le z(T, i^*) \ge \dots \ge z(T, |V|)$?

Posed in arXiv:2611.11352, Sec. 3, Question 1 — Zero forcing is not unimodal

In Lean: tree_zero_forcing_poly_lower_half_monotone (partial), star_graph_zero_forcing_poly_unimodal (partial), path_graph_zero_forcing_poly_unimodal (partial), tree_zero_forcing_poly_unimodal (statement), polynomial_log_concave_interval_support_unimodal (partial), zero_forcing_poly_positive_coeff_interval (partial), tree_zero_forcing_poly_ultra_log_concave (partial), zero_forcing_poly_ulc_implies_log_concave (partial), graph_leaf_rich_except (definition), leaf_rich_except_zero_forcing_iff (partial), leaf_rich_except_fort_free_exchange (partial), polynomial_log_concave_mul_linear_nonneg (partial), leaf_rich_except_zero_forcing_poly_unimodal (partial), zero_forcing_complements_two_extendible (definition), tree_zero_forcing_complements_not_two_extendible (partial), zero_forcing_poly_unimodal_of_ulc (partial), zero_forcing_root_exposed_fort (definition), zero_forcing_root_exposure_count (definition), zero_forcing_exposure_counts_add (partial), tree_zero_forcing_exposure_likelihood_ratio (partial), polynomial_log_concave_erase_top (partial), polynomial_log_concave_reflect (partial), zero_forcing_root_exposed_unique_neighbor (partial), zero_forcing_attach_leaf (definition), root_exposed_fort_iff_new_white_leaf_breaks_forcing (partial), tree_zero_forcing_exposure_mixture_ulc (partial), zero_forcing_poly_ulc_of_exposure_at_one (partial), tree_zero_forcing_conditional_antipodal_counterexample (partial), zero_forcing_white_weighted_count (definition), tree_minimal_fort_three_vertices_shape (partial), weighted_two_section_log_concavity (partial), sequence_ulc_bounded_mixture (definition), ordered_ulc_mixture_one_vertex_counterexample (partial), zero_forcing_complements_three_extendible (definition), tree_zero_forcing_complements_not_three_extendible (partial), zero_forcing_root_exposed_singletons (partial), tree_root_exposed_pairs_le_vertices (partial), tree_root_exposed_pair_bounds (partial), forest_single_exposure_degree_sum_le (partial), tree_fort_free_nonpure_counterexample (partial), normalized_ordered_partial_mixture (definition), normalized_partial_sync_one_vertex_counterexample (partial), normalized_tree_rank_partial_mixture (definition), normalized_tree_rank_partial_sync_counterexample (partial), tree_exposure_plain_partial_sync_counterexample (partial), normalized_binary_tree_prefix_input (definition), normalized_binary_tree_prefix_ulc_counterexample (partial), tree_root_exposed_c3_correction_bound (partial), tree_four_zf_white_rank_sequence_counterexample (partial)

OP-1402 Exact Domination Number of Three-Token Graphs of StarsIn LeanGraph Theory & Graph Algorithms

For every integer $n \ge 3$, is the domination number of the 3-token graph of the star $S_n$ on $n+1$ vertices (with leaves $\{1, \dots, n\}$ and center $0$) equal to $\binom{n}{2} - \lfloor (n+1)^2 / 8 \rfloor$?

Posed in arXiv:2611.11191, Conjecture 7.2 — Token graphs of stars

In Lean: three_token_star_domination_number_le (partial), three_token_star_domination_number_conjecture (statement), three_token_star_domination_number_three_le (partial), three_token_star_domination_number_three (partial), three_token_star_domination_number_four (partial)

OP-1406 Monotonicity of Weakened Multicolour Ramsey Numbers of CyclesIn LeanCombinatorics for TCS

Let $t \ge 4$ and $\ell \ge 4$ be integers. Let $R^t_{t-1}(C_\ell)$ denote the least integer $n$ such that every edge-colouring $\phi \colon E(K_n) \to \{1, \dots, t\}$ contains a cycle of length $\ell$ using at most $t-1$ colours. Is the sequence $(R^t_{t-1}(C_\ell))_{\ell \ge 4}$ monotonically non-decreasing in $\ell$; that is, does $R^t_{t-1}(C_\ell) \le R^t_{t-1}(C_{\ell+1})$ hold for all integers $t \ge 4$ and $\ell \ge 4$?

Proposed here, building on arXiv:2611.11187, Cor. 3.2 — The $(t-1)$-chromatic Ramsey number of cycles for three colours; the paper does not ask it

What is known

For 3 colours, Corollary 3.2 proves that R^3_2(C_ℓ) ≤ R^3_2(C_{ℓ+1}) for all ℓ ≥ 4, deduced from Lemma 3.1 which establishes that every 2-coloured cycle of length c ≥ 5 in a 3-colouring of K_n contains a 2-coloured cycle of length c - 1 on the same vertex set. The paper leaves open whether this monotonicity holds for t ≥ 4 colours: whether R^t_{t-1}(C_ℓ) ≤ R^t_{t-1}(C_{ℓ+1}) holds for all ℓ ≥ 4 and t ≥ 4.

In Lean: op_1406_weakened_cycle_ramsey_monotonicity (statement), op_1406_weakened_cycle_ramsey_monotonicity_three_colors (partial)

OP-1416 Leading-Unit Monotonicity for General Positive Linear RecurrencesIn LeanElementary Number Theory

Let L ≥ 2, and let c = (c_1, ..., c_L) be a tuple of nonnegative integers with c_1 = 1 and c_L ≥ 1. Let (H_n)_{n=1}^∞ be the standard positive linear recurrence sequence defined by H_1 = 1, H_n = 1 + ∑_{j=1}^{n-1} c_j H_{n-j} for 2 ≤ n ≤ L, and H_n = ∑_{j=1}^L c_j H_{n-j} for n ≥ L+1. The sequence (H_n)_{n=1}^∞ is complete if every positive integer t ≥ 1 can be expressed as a sum ∑_{i ∈ S} H_i for some finite subset S ⊂ {1, 2, 3, ...}. If (H_n)_{n=1}^∞ is complete, is the sequence (H'_n)_{n=1}^∞ associated with the prepended coefficient tuple (1, c_1, c_2, ..., c_L) of length L+1 also complete?

Proposed here, building on arXiv:2611.10200, Theorem 1.2 — Brown-Gap Healing and Exact Completeness Thresholds for Leading-Unit Positive Linear Recurrences; the paper does not ask it

What is known

The paper (arXiv:2611.10200) proves the leading-unit monotonicity conjecture for positive linear recurrence sequences whose coefficient list consists of leading units, followed by zeros and a final positive coefficient [1^g, 0^k, N], showing that if [1^g, 0^k, N] is complete, then [1^{g+1}, 0^k, N] is complete. It leaves open the full leading-unit monotonicity conjecture for general positive linear recurrence sequences [c_1, ..., c_L] where intermediate coefficients may be arbitrary: does prepending a unit coefficient 1 to any complete positive linear recurrence sequence always yield a complete sequence?

In Lean: leading_unit_monotonicity_conjecture (statement), leading_unit_monotonicity_leading_units (partial), leading_unit_monotonicity_length_two (partial)

OP-1421 Upper Bound on the Minimum Gap of Optimal Uniform WGFHSs for Small Odd AlphabetsIn LeanInformation Theory & Coding

Let $k \ge 4$ and let $s \ge 5$ be an odd integer. Let $F = \{0, 1, \dots, s-1\}$, and let $X = (x_0, \dots, x_{ks-1}) \in F^{ks}$ be an optimal uniform wide-gap frequency hopping sequence, meaning each symbol $f \in F$ appears exactly $k$ times in $X$, the maximal periodic Hamming autocorrelation is $H(X) = \max_{1 \le \tau < ks} |\{0 \le j < ks : x_j = x_{(j+\tau) \bmod ks}\}| = k$, and $e = \min_{0 \le j < ks} (|x_{(j+1) \bmod ks} - x_j| - 1) > 0$. Is it true that $e \le \lfloor (s-1)/2 \rfloor - 2$ for all odd $s$ with $5 \le s \le k(k-1)-1$?

Posed in arXiv:2611.11747, Conjecture 4.1 — Bounds and Constructions for Optimal Wide-Gap Frequency Hopping Sequences

What is known

The paper establishes this bound for k = 3 (Lemma 2.2) and for k >= 4 with s >= k(k-1)+1 (Lemma 2.3), and verifies k in {4, 5} for 7 <= s <= k(k-1)-1 by computer search, leaving the range 5 <= s <= k(k-1)-1 open for general k >= 6.

In Lean: op_1421_optimal_uniform_wgfhs_min_gap_bound (statement)

OP-1423 Multiparameter Counting Formula for Numerical Semigroups with Multiplicity Below (F+1)/3In LeanCombinatorics for TCS

Does there exist an explicit combinatorial formula for the number n_{F,m,g} of numerical semigroups with Frobenius number F, multiplicity m, and genus g in the parameter regime (F+1)/4 ≤ m < (F+1)/3, expressed as a sum over finite configurations of elements in [m, 2m] and their higher-order spans?

Proposed here, building on arXiv:2611.11559, Section 4, after Theorem 4.2 — Multiparameter counting of numerical semigroups by Frobenius number, genus, and multiplicity; the paper does not ask it

What is known

Theorem 4.2 provides an exact formula for n_{F,m,g} when m ≥ (F+1)/3 by decomposing semigroups according to the nongap set in [m, 2m] and showing nongaps in [2m, F-1] can be chosen independently outside a determined span. When m < (F+1)/3, ternary sums of elements in [m, 2m] can interact below F, breaking this independence. Developing an explicit combinatorial formula for the next tier (F+1)/4 ≤ m < (F+1)/3 is the natural next step.

In Lean: op_1423_two_band_binomial_count (partial)

OP-1430 Relation between leafy trees and interval-poset models of m-Tamari intervalsIn LeanCombinatorics for TCS

Let m, n >= 1. Does there exist an explicit combinatorial bijection between the set LT_n^m of m-leafy trees and the synchronized interval-poset model of m-Tamari intervals that maps tree statistics (l(T), r(T)) to natural interval-poset statistics? Furthermore, what is the structure of the permutation group on m-Tamari intervals generated by the leafy-tree reflection involution and the rise-contact involution?

Posed in arXiv:2611.10154, Sec. 2.1 — Bijecting $m$-Tamari intervals, trees, and tight gradings

What is known

The paper notes existing combinatorial models for m-Tamari intervals such as interval-posets and questions how they relate to the new m-leafy tree model.

In Lean: op_1430_leafy_tree_interval_poset_bijection (statement), op_1430_involution_group_n_one (partial)

OP-1439 round robin uniform borda best response one twenty four lawIn LeanFair Division

For even m, let two agents A and B have independent uniform random strict rankings of m goods. Give A additive Borda utility m+1-r to her r-th ranked good. Use the fixed picking sequence ABAB...AB, with B reporting truthfully. Let U_truth be A's total utility when A also reports her true ranking, and let U_best be the maximum of A's utility over all m! fixed ranking reports after observing B's ranking. Does (U_best-U_truth)/m^2 converge in probability to 1/24 as m tends to infinity through even integers, and consequently does its expectation converge to 1/24?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The expected advantage of manipulation matters for designers assessing the incentive cost of a fair picking rule. The question separates complete information from the Bayesian case where only a distribution is known: A sees B's ranking before choosing a report. It asks for an explicit nonzero asymptotic constant, not just whether manipulation is possible. Generic worst-case approximation and polynomial-time best-response algorithms do not determine this average-case constant. It moves Xiao and Ling, Algorithms for Manipulating Sequential Allocation (AAAI 2020), give best-response algorithms and a worst-case one-half utility guarantee for sincere play. Kalinowski et al., A Social Welfare Optimal Sequential Allocation Procedure, study expected sincere welfare under random Borda rankings. along quantitative: The exact typical cardinal incentive to exploit a fully observed opponent in the two-agent alternating draft, rather than a worst-case multiplicative guarantee or sincere welfare alone.. Evidence: Experiment 21481 exhausts all opponent rankings through m=8 with a direct subset-state best-response dynamic program. Experiments 21484 and 21490 compare that independent dynamic program with prefix-cap greedy and a fast range-minimum implementation, with zero mismatches on all rankings through m=8. In experiment 21487 independent random samples give mean gain/m^2 0.03655 at m=80, 0.04057 at 640, 0.04103 at 1280 and 0.04140 at 5120, consistent with 1/24=0.0416667; these are simulations and the large-n greedy characterization is not yet proved.

In Lean: round_robin_borda_gain_two_goods (partial), round_robin_borda_manipulation_gain_nonneg (partial), round_robin_expected_manipulation_gain_two_eq_zero (partial), round_robin_uniform_borda_best_response_one_twenty_four_law (statement)

OP-1440 petz power information symmetric qubit forks all exponentsIn LeanQuantum Mechanics

For every real beta with 0 < beta < 1, do there exist rational p,a,q,t strictly between 0 and 1 such that the following full-rank binary-classical, two-qubit Markov fork violates Petz power-information subadditivity? Put R(t)=[[ (1-t^2)/(1+t^2), -2t/(1+t^2) ], [ 2t/(1+t^2), (1-t^2)/(1+t^2) ]], sigma_0=R(t) diag(1-a,a) R(t)^T, and sigma_1=diag(1-q,q). Let rho_XYZ=p|0><0| tensor sigma_0 tensor sigma_0 +(1-p)|1><1| tensor sigma_1 tensor sigma_1. For any bipartite rho_UV define I_beta(U:V)=(1-Tr[rho_UV^beta (rho_U tensor rho_V)^(1-beta)])/(beta(1-beta)), with positive matrix powers. Is I_beta(X:YZ) > I_beta(X:Y)+I_beta(X:Z)=2 I_beta(X:Y) achievable for every such beta?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Quantum information researchers need to know whether a basic sensor-combination inequality survives when two conditionally independent outputs are quantum. The equal-output, full-rank qubit restriction makes this a precise, minimal physical family. Classical distributions embed as commuting diagonal states, but noncommuting matrix powers and the correlated YZ marginal prevent a direct use of the classical theorem or its scalar proof. A result for all beta would separate the quantum boundary from the classical conjectured golden-ratio regime and locate a discontinuity at relative entropy. It moves The proved KB theorem mutual_power_divergence_subadditive_imp_golden_ratio_le and OP-726 concern classical power-divergence mutual information; OP-726 conjectures subadditivity above the golden-ratio threshold. At beta=1 the standard relative-entropy mutual information obeys the fork inequality. along new_setting: Replace classical conditionally independent outputs by identical noncommuting qubit states, and ask whether the admissible subadditivity interval collapses for every beta<1 even with a classical one-bit common cause.. Evidence: Experiment 21506 computes the actual correlated YZ reference marginal at 70-digit precision: the single symmetric rational fork p=10^-5, a=10^-6, q=9*10^-9, t=73/10000 has strictly negative subadditivity slack at every mesh exponent j/1000 for 1<=j<=953. Different rational symmetric forks give slack approximately -1.80873e-21 at beta=.98 (80 and 130 digits, experiment 21507) and -2.17120e-37 at beta=.99 (120 and 200 digits, experiment 21509). These are numerical experiments, not proofs of any strict inequality or of the continuum. An earlier incorrect product-marginal scan 21494 is superseded and is not evidence.

In Lean: op_1440_petz_power_information_symmetric_qubit_forks_all_exponents (statement), op_1440_petz_power_information_subadditivity_violation_four_fifths (partial)

OP-1441 probabilistic serial equispaced items sharp harmonic distortionIn LeanSocial Choice Theory

For each integer n>=2, place n unit-capacity items at 0,1,...,n-1 on the real line, and let n agents have arbitrary real locations a_1,...,a_n. Each agent ranks items in order of increasing distance, with arbitrary tie breaks. Run probabilistic serial: all agents continuously eat their favorite available item at unit rate. Let X_ij be the resulting fractional assignment, PS=sum_ij X_ij |a_i-j|, and OPT=min over permutations sigma of sum_i |a_i-sigma(i)|. Writing H_0=0 and H_k=sum_{j=1}^k 1/j, is PS <= [1+H_floor(n/2)+H_floor((n-1)/2)] OPT for every such instance? Is this bound attained for every n by agents at 0,1,...,n-2,n-3/2, when each agent breaks ties toward the smaller-index item?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

One-sided matching researchers and designers of the envy-free probabilistic-serial mechanism need to know whether regular spatial structure improves its efficiency. The general-line lower-bound construction relies on highly nonuniform spacing, so it does not settle the unit-spaced problem. The proposed expression is asymptotic to 2 log n and is not a constant bound; both its leading term and exact finite-n value distinguish the unit-spaced case from the n-factor conjectured for unrestricted lines. A sharp all-n guarantee is meaningful even if the unrestricted problem remains open. It moves OP-1158 asks for the sharp factor n for probabilistic serial on arbitrary line metrics, supported by an exponential-spaced cascade; the KB proves its lower bound and the n=2,3 upper bounds. OP-1207 considers random serial dictatorship, a different mechanism, with equispaced items. along new_setting: Fix the items to a unit-spaced line and ask for an exact harmonic distortion factor for probabilistic serial, with arbitrary agent locations and ties.. Evidence: Experiment 21528 enumerated all half-grid agent multisets and every distance-consistent tie ordering for n=2,...,6, including 3,262,623 profiles at n=6, and found maxima 2,3,7/2,4,13/3, exactly matching the proposed formula; these floating-point checks do not cover all real locations. Experiment 21530 used exact rational arithmetic on the one-half-step family for n=2,...,20,32,64,128,256 and matched the full harmonic expression. Experiment 21532 found no larger half-grid example in local random searches at n=7,10,16,24.

In Lean: probabilistic_serial_equispaced_items_sharp_harmonic_distortion (statement), probabilistic_serial_equispaced_distortion_le_two_agents (partial), probabilistic_serial_equispaced_distortion_le_three_agents (partial), probabilistic_serial_equispaced_distortion_two_agents_attained (partial)

OP-1446 Determination of Maximum Aura a(2, r) and Maximum Span sp(3, r)In LeanCombinatorics for TCS

For integers $k \ge 1$ and $r \ge 3$, an $r$-flower is a collection of $r$ distinct sets with pairwise identical intersections. The span of a set system $\mathcal{S}$ is the size of its ground set $|\bigcup \mathcal{S}|$. The aura of a $k$-uniform system $\mathcal{S}$ relative to parameter $r$ is defined as $\text{aura}(\mathcal{S}) = |\bigcup \mathcal{S}| + (r-1)|\mathcal{S}|$, and $a(k, r)$ denotes the maximum aura of a $k$-uniform $r$-flower-free system. By the dimension reduction theorem, the maximum span $\mathrm{sp}(3, r)$ of a 3-uniform $r$-flower-free system equals $a(2, r)$. In graph-theoretic terms, $a(2, r)$ is the maximum of $|V(G)| + (r-1)|E(G)|$ over all simple graphs $G$ without isolated vertices having maximum degree $\Delta(G) \le r-1$ and matching number $\nu(G) \le r-1$. What is the exact value of $a(2, r)$ (and consequently $\mathrm{sp}(3, r)$) as a function of $r \ge 3$?

Posed in arXiv:2611.13495, Sec. 6, paragraph 2 — The Largest Ground Set for Sunflower-Free Systems

In Lean: op_1446_dimension_reduction (partial), op_1446_max_aura_and_max_span (statement)

OP-1447 Maximum Size of Three-Uniform Four-Flower-Free System with Maximum SpanIn LeanCombinatorics for TCS

Let $\mathcal{S}$ be a family of 3-element subsets of a 39-element ground set $G$ such that every element of $G$ is contained in at least one member of $\mathcal{S}$ (so the span of $\mathcal{S}$ is 39), and such that $\mathcal{S}$ contains no 4-flower (four distinct sets with identical pairwise intersections). Can the cardinality of $\mathcal{S}$ exceed 38, or is $|\mathcal{S}| \le 38$ for every such system?

Posed in arXiv:2611.13495, Sec. 6, paragraph 1 — The Largest Ground Set for Sunflower-Free Systems

In Lean: three_uniform_link_four_flower_free (partial), three_uniform_sum_card_le_span_mul_max_deg (partial), three_uniform_four_flower_free_max_span_card_bound (statement), three_uniform_card_le_130_of_max_degree_ten (partial)

OP-1453 Codegree Turán Densities of the Four- and Six-ZyclesIn LeanCombinatorics for TCS

Let $Z_\ell$ denote the $3$-uniform zycle on vertex set $\{x_i, y_i : i \in \mathbb{Z}_\ell\}$ with edge set $\{\{x_i, y_i, x_{i+1}\}, \{x_i, y_i, y_{i+1}\} : i \in \mathbb{Z}_\ell\}$. For a $3$-uniform hypergraph $F$, let $\operatorname{ex}_2(n, F)$ denote the maximum minimum pair-codegree $\delta_2(H)$ among all $F$-free $3$-uniform hypergraphs $H$ on $n$ vertices, and let $\gamma(F) = \lim_{n \to \infty} \operatorname{ex}_2(n, F)/n$ be its codegree Turán density. What are the values of $\gamma(Z_4)$ and $\gamma(Z_6)$? In particular, is $\gamma(Z_4) = 1/3$, and is $\gamma(Z_6) \le 1/3$?

Posed in arXiv:2611.12582, Problem 5.1 — Exact codegree Tur\'an densities of even zycles

In Lean: op_1453_zycle_four_three_uniform (partial), op_1453_zycle_four_card (partial), op_1453_zycle_six_card (partial), op_1453_codegree_turan_density_zycle_four_and_six (statement)

OP-1458 Existence of Rich Projections Achieving the Asymptotic Critical Exponent for d at Least 5In LeanCombinatorics for TCS

For every integer $d \ge 5$, does there exist a morphism $\pi : \Sigma_{2d-1}^* \to \Sigma_d^*$ such that the infinite word $\pi(\mathbf{u}_{2d-1})$ is rich in palindromes and its critical exponent $E(\pi(\mathbf{u}_{2d-1}))$ equals the asymptotic critical exponent $E^*(\mathbf{u}_{2d-1})$, thereby establishing the upper bound $\mathrm{RT}(\mathcal{C}_d) \le E^*(\mathbf{u}_{2d-1})$ on the repetition threshold of $d$-ary rich words?

Posed in arXiv:2611.13676, Sec. 8, item 1 — An automated approach to structure theorems for minimally repetitive rich words

In Lean: op_1458_rich_projection_existence (statement), op_1458_rich_repetition_threshold_le_asymptotic_of_projection (partial), op_1458_asymptotic_critical_exponent_le_critical_exponent (partial)

OP-1459 Second Smallest Critical Exponent of Uniformly Recurrent d-ary Rich WordsIn LeanCombinatorics for TCS

Let $\Sigma_d = \{0, \dots, d-1\}$. Let $S_d = \{ E(\mathbf{u}) : \mathbf{u} \in \Sigma_d^\omega \text{ is a uniformly recurrent rich word} \} \subset \mathbb{R}$. For $d \in \{2, 3, 4\}$, the repetition threshold $\mathrm{RT}(\mathcal{C}_d) = \min(S_d)$ is known to be an isolated point of $S_d$. What is the value of $\inf(S_d \setminus \{\mathrm{RT}(\mathcal{C}_d)\})$, the second smallest element of $S_d$? Is this infimum attained as a minimum by some uniformly recurrent rich word?

Posed in arXiv:2611.13676, Sec. 8, item 2 — An automated approach to structure theorems for minimally repetitive rich words

In Lean: op_1459_second_smallest_critical_exponent_attained (statement)

OP-1466 Chromatic Number of Cayley Tables of Generalized Quaternion Groups of Order 8n+4In LeanCombinatorics for TCS

For each integer $n \ge 1$, let $Q_{2n+1} = \langle a, b \mid a^{4n+2} = e, b^2 = a^{2n+1}, ba = a^{-1}b \rangle$ be the generalized quaternion group of order $8n+4$. Let $L_{Q_{2n+1}}$ denote its Cayley table, considered as a Latin square of order $8n+4$. Is the chromatic number of $L_{Q_{2n+1}}$ equal to $8n+6$ for every integer $n \ge 1$?

Posed in arXiv:2611.13274, Sec. 6 — On the Chromatic Number of Cayley Tables of Dihedral Groups

In Lean: quaternion_odd_has_no_complete_mapping (partial), cayley_table_graph_quaternion_chromatic_number_ge (partial), cayley_table_graph_quaternion_three_chromatic_number (partial), cayley_table_graph_quaternion_chromatic_number (statement)

OP-1480 qary two deletion entropy square path coloringsIn LeanInformation Theory & Coding

For integers q>=3 and n>=2, transmit a uniformly random word X in {0,...,q-1}^{n+2}, delete two uniformly random positions, and observe the length-n word y. Let P_y(x)=e(y,x)/(q^2*binom(n+2,2)), where e(y,x) is the number of subsequence embeddings of y in x. Are the maximizers of the posterior Shannon entropy H(P_y), as y ranges over all q-ary words of length n, exactly the words satisfying y_i != y_{i+1} for all i and y_i != y_{i+2} for all i?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Posterior input entropy measures information leakage after deletion errors, including in nonbinary DNA storage channels. Ma and Zhang's Theorem 2.2 establishes the binary maximum and unique alternating maximizers using binary run and alternating-segment identities; those identities do not extend directly to three or more letters. The computation changes the naive q-periodic guess: the predicted maximizers are exactly proper colorings of the square of the path, including exponentially many nonperiodic words for q>=4. It specifies both the optimum and every equality case for every alphabet size and word length. The existing OP-989 treats Renyi orders in the binary channel; OP-1359 treats a different deletion collision statistic. Evidence: Experiment 21788 enumerated candidates up to alphabet relabeling and found the pattern at q=3 for n<=9 and q=4 for n<=7. Experiment 21789 extended this to (q,n)=(3,<=10),(4,<=8),(5,<=7),(6,<=6), using exact integer products to compare Shannon entropies; every maximizer and only a maximizer has the stated local property. All such words have the same embedding histogram in the tested cases. A second dynamic-programming enumeration over every transmitted word agrees with the insertion-mask histogram through n=4 for q=2,3,4. These are finite computations, not Lean proofs.

In Lean: op_1480_qary_two_deletion_entropy_square_path_colorings (statement), op_1480_square_path_colorings_equal_entropy (partial), op_1480_square_path_colorings_maximize_entropy (partial)

OP-1481 Avoidance of 21-Term Arithmetic Progressions at Four Exceptional Squared SpacingsIn LeanCombinatorics for TCS

Let $\alpha > 0$ satisfy $\alpha^2 \in \{1/4, 1/9, 2/15, 3/4\}$. For every positive integer $n$, does there exist a two-coloring of $n$-dimensional Euclidean space $\mathbb{E}^n$ containing neither a monochromatic 3-term arithmetic progression with unit spacing of the first color nor a monochromatic 21-term arithmetic progression with spacing $\alpha$ of the second color (that is, does $\mathbb{E}^n \not\to (\ell_3, \alpha \ell_{21})$ hold)?

Posed in arXiv:2611.12360, Sec. 3.3, after proof of Theorem 1.3 — Avoiding short progressions in Euclidean Ramsey theory II

What is known

The paper proves that $\mathbb{E}^n \not\to (\ell_3, \alpha \ell_{21})$ for all positive integers $n$ and all $\alpha > 0$ such that $\alpha^2 \notin \{1/4, 1/9, 2/15, 3/4\}$. The interval-intersection test based on spherical colorings leaves these four specific squared ratios unresolved, and the authors explicitly pose whether the 21-term bound holds for them.

In Lean: op_1481_avoidance_three_twenty_one_dim_one (partial), norm_sq_ap_quadratic (partial), norm_sq_three_ap_unit (partial), op_1481_avoidance_three_twenty_one_exceptional_spacings (statement)

OP-1482 Avoidance of 17-Term Progressions with Unit Spacing in Euclidean Ramsey TheoryIn LeanCombinatorics for TCS

For every positive integer $n$, does there exist a two-coloring of $n$-dimensional Euclidean space $\mathbb{E}^n$ containing neither a monochromatic 3-term arithmetic progression with unit spacing of the first color nor a monochromatic 17-term arithmetic progression with unit spacing of the second color (that is, does $\mathbb{E}^n \not\to (\ell_3, \ell_{17})$ hold)?

Proposed here, building on arXiv:2611.12360, Theorem 1.2 — Avoiding short progressions in Euclidean Ramsey theory II; the paper does not ask it

What is known

Theorem 1.2 proves $\mathbb{E}^n \not\to (\ell_3, \alpha \ell_{17})$ for all but finitely many $\alpha > 0$, namely whenever $\alpha^2$ is irrational, $\alpha^2 \in [7/152, 179/3600]$, or $\alpha^2 = a/b$ in lowest terms with $a + b/50 \ge 37$. For equal spacings $\alpha = 1$, $a = b = 1$ gives $a + b/50 = 1.02 < 37$, and $1 \notin [7/152, 179/3600]$, so unit spacing is one of the finitely many unhandled cases. The best known bound for equal spacings remains 20 terms (Remark 2.5), leaving open whether the 17-term bound extends to $\alpha = 1$.

In Lean: euclidean_avoids_ap_of_le (partial), op_1482_avoidance_three_seventeen_dim_one (partial), op_1482_avoidance_three_seventeen_unit (statement), euclidean_radial_ap_avoidance_transfer_from_plane (partial), quadratic_red_mod17_certificate (partial), quadratic_blue_mod17_certificate (partial), quadratic_mod19_residue_certificate (partial), quadratic_mod25_residue_certificate (partial), integer_quadratic_coloring_coprime_17_19_5 (partial), rational_quadratic_coloring_from_integer_scales (partial), rational_quadratic_coloring_implies_euclidean_avoidance (partial), mod5_rational_quadratic_blue_witness (partial), spherical_mod5_scale149_100_blue_unit_ap (partial), spherical_mod29_scale7_residue_obstruction (partial), integer_quadratic_coloring_divisor (partial), quadratic_mod34_no_seed_witness (partial), integer_quadratic_seventeen_span_lower_bound (partial), single_interval_radial_coloring_forces_unit_three_or_nineteen (partial), planar_unit_line_realizes_quadratic_phase (partial), planar_radial_red_triple_from_near_half_integer_scale (partial), planar_radial_blue_nineteen_from_circular_gap (partial), single_interval_gap_quarter_chunk_0_10 (partial), single_interval_gap_quarter_chunk_10_20 (partial), single_interval_gap_quarter_chunk_20_30 (partial)

OP-1486 quantum permutation walk slow mode chebyshev semicircle limitIn LeanStatistical Mechanics & Thermodynamics

Fix an integer m>=2. On the Hilbert space with basis |g> indexed by permutations g in S_n, let H_{n,m} be the average of the left-regular permutation matrices for all m-cycles. Define Q_{n,m}(g,s)=|<g|exp(-i s H_{n,m})|e>|^2 and kappa_{n,m}(s)=sum_{g in S_n} Q_{n,m}(g,s)*(fix(g)-1)/(n-1). Let U_k be the Chebyshev polynomial of the second kind and let rho_sc(dx)=sqrt(4-x^2) dx/(2*pi) on [-2,2]. Is it true that for every T>0, uniformly for |t|<=T, kappa_{n,m}(t*n^((m+1)/2)/m) = |integral exp(i*t*U_{m-1}(x/2)) rho_sc(dx)|^2 + O_{m,T}(1/n) as n tends to infinity?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The standard irrep is the slowest classical random-transposition mode, so its coherent suppression profile controls when a permutation quantum stochastic walk begins to deviate from classical mixing. He et al. express this profile as a characteristic function of coupled character ratios and compute its variance, but that does not determine its shape. A connection to Plancherel growth suggests the explicit family of Chebyshev transforms; the all-m formula and uniform rate would supply an analytic benchmark for the paper's observed scaling collapse. Kerov's semicircle theorem is a relevant baseline, but using it here also requires a joint increment estimate for two coupled character ratios and quantitative control. Fulman's older work treats character-ratio central limits and exchangeable pairs; a literature check did not locate this explicit quantum slow-mode limit or its rate, though further checking of representation-theoretic consequences is warranted. It moves He et al., Quantum Stochastic Walks on the Permutation Group, equation (89) and variance equation (94) along bridge: Identify the full n-scaled quantum slow-mode profile and a quantitative convergence rate for every fixed cycle length using the Plancherel transition measure, beyond the known variance bound.. Evidence: Experiment 21806 uses exact partition dimensions and branching multiplicities with floating-point cosine evaluation; for m=2,3,4 and n through 50 it compares 121 times in [0,3], and n times the largest observed error remains bounded in the reported range (at n=50 it is 1.174, 2.615, and 3.896 respectively). Experiment 21807 independently uses Murnaghan-Nakayama rim hooks for m=5 through n=45, where kappa(1) is 0.3919 versus predicted 0.4154, with slow convergence at t=2. Experiment 21799 cross-checks m=2,3,4 against direct finite permutation-matrix evolution, and experiment 21809 independently does so for m=5 on S_5. Experiment 21802 gives more pointwise data. These are computations, not a proof, and the rate is not resolved by the finite range.

In Lean: chebyshev_semicircle_slow_mode_limit_zero (partial), chebyshev_semicircle_slow_mode_limit_two (partial), quantum_permutation_walk_slow_mode_chebyshev_semicircle_limit (statement), slow_mode_dephasing_zero (partial)

OP-1493 balanced draft uniform normalized utility joint gaussianIn LeanFair Division

Fix n>=2. For each m, give n agents independent U[0,1] values V_ig for m goods, and allocate by any deterministic balanced picking sequence: each complete block of n turns contains each agent exactly once, followed by a final block with no repeated agent. Each agent sincerely picks her highest-valued remaining good. Set R_{i,m}=n*(sum of V_ig over goods received by i)/(sum of V_ig over all m goods). Does the vector sqrt(m)*(R_{i,m}-2n/(n+1))_{i=1}^n converge in distribution, for every such sequence of schedules, to n independent centered Gaussian random variables of variance 4n^2(n-1)/(3(n+1)^2(n+2))?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The normalized utility vector quantifies actual cardinal disparities in random fair-division instances. Chernulich and Yenmez simulate normalized group disparities for several drafting orders but do not give a fixed-n joint limit law; Amanatidis et al. study high-probability fairness in a different asymptotic regime. OP-1433 asks for the finer order-1/m difference between two two-agent absolute-gap expectations, so it does not determine the leading joint Gaussian law. The question predicts that balanced schedules have the same first-order random fluctuations, including asymptotic independence across agents and an explicit variance; this provides a benchmark for deciding whether observed differences between draft rules are leading-order or finite-size effects. It moves Chernulich and Yenmez, Who Picks First?, Appendix B.2; AFTD OP-1433 along quantitative: Determine the joint fluctuation law and an explicit covariance for every fixed number of agents and every balanced deterministic schedule, rather than only finite-size mean disparities or the two-agent second-order schedule comparison.. Evidence: Experiment 21827 directly simulates sincere round-robin allocations for n=2,3,4,5 and m=600 or 2400: at m=600 the pooled diagonal variances are 0.148825, 0.298257, 0.427716 and 0.527827 against targets 0.148148, 0.300000, 0.426667 and 0.529101, and mean off-diagonal covariances are near zero. Experiment 21829 checks round-robin, snake, block-snake and rotating orders for 2,000 samples each at m approximately 1200 with unequal final bundle counts. Experiment 21832 independently simulates a focal-agent beta-maximum and uniform-deletion model up to m=9600 and n=10, finding the predicted variance. Normality and independence are statistical conjectures, not proven from finite simulations.

In Lean: balanced_draft_normalized_utility_bounds (partial), balanced_draft_coordinate_normal_limit (partial), balanced_draft_joint_normal_limit (statement)

OP-1495 Superpolynomial Lower Bound for Wolfe's Linopt Rule on Submodular Base PolytopesIn LeanSubmodular & Combinatorial Optimization

Does there exist a family of submodular functions $f_n \colon 2^{V_n} \to \mathbb{R}$ on ground sets $V_n$ of cardinality $n$ such that Wolfe's minimum-norm-point method with the linopt insertion rule requires superpolynomially many major cycles in $n$ to find the minimum-norm point of the base polytope $B(f_n)$?

Posed in arXiv:2611.12680, Sec. 4, Open Problem 2 — Wolfe's Minimum-Norm-Point Method Generalizes the Simplex Method

What is known

The Fujishige-Wolfe algorithm for submodular function minimization relies on Wolfe's method with the linopt rule applied to base polytopes. A superpolynomial lower bound on base polytopes would be the first lower bound for this fundamental algorithm.

In Lean: wolfe_linopt_run_sq_norm_strict_anti (partial), wolfe_linopt_run_terminal_optimality (partial), wolfe_minor_reaches_eq_of_corral (partial), wolfe_faithful_run_terminal_optimality (partial), op_1495_superpoly_lower_bound_wolfe_linopt_base_polytope (statement)

OP-1499 qary two deletion embedding hinge majorizationIn LeanInformation Theory & Coding

Fix integers q>=3 and n>=2. For each q-ary word y of length n, and each q-ary word x of length n+2, let e(y,x) count subsequence embeddings of y into x. Define W_r(y)=sum_x max(e(y,x)-r,0). Is it true that W_2(y)>=n^2+n-1 and W_3(y)>=binom(n,2), with equality in both inequalities exactly when y_i differs from y_{i+1} and y_{i+2} wherever those indices exist?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This sharpens OP-1480 into a finite combinatorial core that would simultaneously control Shannon, Renyi and every Schur-concave posterior entropy. For a word with no repeated letters at distance one or two, the computed positive embedding histogram has maximum 4, with exactly 2n-1 entries of multiplicity 3 and binom(n,2) entries of multiplicity 4; the two displayed inequalities would thus establish convex-order minimality of its full embedding vector, using the common total embedding count and the standard insertion-ball cardinality. This phenomenon appears specific to alphabets of size at least three: experiment 21847 finds that the binary alternating word 010101 is not convex-order minimal at n=6, even though Ma and Zhang prove its Shannon optimality. The stronger information-theoretic conclusion cannot be deduced from OP-1480's one entropy inequality, and its fully integer formulation may make it more approachable. It moves OP-1480, qary_two_deletion_entropy_square_path_colorings along stronger_result: Replace one Shannon-entropy extremum by two exact integer inequalities controlling the entire posterior in convex order, with an equality characterization.. Evidence: Experiment 21844 exhausts all q-ary words up to alphabet renaming for (q,n)=(3,<=10),(4,<=8),(5,<=7): every word satisfies both hinge inequalities, and simultaneous equality occurs exactly for proper square-path colorings. Experiment 21849 checks one-defect words at lengths through 240 for q=3,4 and 120 for q=5, after independently validating packed-word histograms against direct insertion enumeration; experiment 21850 checks additional random and run-heavy words through length 120. Experiment 21847 finds the binary obstruction: alternating 010101 has one multiplicity-7 supersequence, whereas 010010 has none, so W_6 is 1 versus 0. All are exact finite computations, not Lean proofs.

In Lean: op_1499_qary_two_deletion_embedding_hinge_majorization (statement), op_1499_square_path_coloring_hinge_values (partial), op_1499_ternary_length_two (partial), op_1499_quaternary_length_two (partial)

OP-1503 qary multiple deletion spaced word embedding convex orderIn LeanInformation Theory & Coding

For integers t>=1, q>=t+1 and n>=1, let y be any q-ary word of length n. For each q-ary word x of length n+t let e(y,x) be the number of increasing subsequence embeddings of y in x, and set W_r(y)=sum over all such x of max(e(y,x)-r,0). Let y* be the word 0,1,...,t,0,1,... repeated to length n. Is W_r(y)>=W_r(y*) for every integer r>=1? Does equality simultaneously for all r hold exactly when y_i differs from y_j whenever 0<|i-j|<=t?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Deletion-channel researchers want to identify which observations leave the most uncertainty about the transmitted word. Under the uniform prior, the posterior is proportional to the embedding counts, so the proposed convex order would identify maximizers simultaneously for Shannon and all Schur-concave posterior entropies. This asks for a structural theorem for an infinite family of channels, not a further fixed-radius case. It is not the binary three-deletion open problem from Ma and Zhang: the alphabet size grows with the deletion radius, and the statement is stronger than Shannon optimality. The condition q>=t+1 matters empirically: already for q=2,t=2 the binary alternating word fails convex-order minimality (21847). It moves OP-1499 asks two integer hinge inequalities for two deletions and q>=3, and OP-1480 asks its Shannon-entropy consequence; Ma and Zhang determine binary two-deletion Shannon maximizers and state a binary three-deletion question. along stronger_result: Unify all deletion radii t in the alphabet regime q>=t+1 and replace Shannon comparison by the full embedding convex order with an exact equality characterization.. Evidence: Experiment 21922 exhausts words up to alphabet renaming for t=3, q=4 through n=11 and q=5 through n=10; all inequalities hold and histogram equality is exactly the spacing condition. Experiment 21920 checks its compiled multiplicity counter against an independent Python enumerator on 54 random words. Experiment 21918 checks all canonical words for t=4,q=5 through n=6, t=4,q=6,n=5, and t=5,q=6,n=4. Experiment 21921 checks additional t=4,q=6 words through n=8, including proper words with different periods. Experiment 21883 exhausts t=2,q=3 through n=16 and q=4 through n=12. These are exact finite computations; the all-t statement remains open.

In Lean: op_1503_canonical_spaced_word_is_spaced (partial), op_1503_spaced_word_two_iff (partial), op_1503_two_deletion_hinge_eq (partial), op_1503_qary_multiple_deletion_spaced_word_embedding_convex_order (statement)

OP-1514 Exact Minimum Order of Strictly k-Dismantlable Graphs for k at Least TwoIn LeanGraph Theory & Graph Algorithms

For each integer $k \ge 1$, let $\mathcal{D}_k$ denote the class of graphs dismantlable at level $k$, where $\mathcal{D}_{-1}$ consists of all non-empty cones, and for $j \ge 0$, a non-empty graph $H$ belongs to $\mathcal{D}_j$ if it can be reduced to $K_1$ by successive deletions of vertices whose open neighbourhood graph belongs to $\mathcal{D}_{j-1}$. A graph is strictly $k$-dismantlable if it belongs to $\mathcal{D}_k \setminus \mathcal{D}_{k-1}$. Let $m_k = \min \{ |V(G)| : G \in \mathcal{D}_k \setminus \mathcal{D}_{k-1} \}$. While $m_1 = 8$ is known, the upper bound is $m_k \le \min\{4k+4, 3k+8\}$. What is the exact value of $m_k$ for each $k \ge 2$? In particular, is $m_2 = 12$?

Posed in arXiv:2611.14430, Sec. 6, after Proposition 6.1 — Linear-size graphs at every strict dismantling level

What is known

The paper proves the upper bound m_k <= min{4k+4, 3k+8} on the least order m_k of a strictly k-dismantlable graph, achieving m_1 = 8 (which matches the known minimum), m_2 <= 12, m_3 <= 16, m_4 <= 20, m_5 <= 23. It notes that determining the least order among all graphs of strict level k remains open.

In Lean: op_1514_strictly_two_dismantlable_order_ge_ten (partial), op1514_strictly_two_dismantlable_min_order (statement), op1514_strictly_dismantlable_card_ge_two (partial)

OP-1525 Switching Reconstructibility of Balanced Signed Graphs with Near-Equal PartsIn LeanCombinatorics for TCS

Let $(\Gamma, \sigma)$ be a connected balanced signed graph on $n \ge 6$ vertices (with $n$ even). Suppose the two parts $A, B$ of its unique balance partition satisfy $\{|A|, |B|\} = \{n/2, n/2\}$ or $\{|A|, |B|\} = \{n/2 - 1, n/2 + 1\}$, and suppose $(\Gamma, \sigma)$ contains both vertices with strictly negative net-degrees and vertices with non-negative net-degrees. Is $(\Gamma, \sigma)$ reconstructible from its switching deck (that is, is every signed graph with the same switching deck isomorphic to $(\Gamma, \sigma)$)?

Posed in arXiv:2611.13901, Sec. 1, lines 229-233 — Switching reconstruction of signed graphs: net-degree and balance

What is known

Theorem B settles reconstructibility when the parts differ in size by more than 2, and Theorem C settles the case when all net-degrees are non-negative. The cases where the parts differ by at most 2 and net-degrees take both positive and negative values remain unresolved.

In Lean: signed_graph_reconstructible_balanced_near_equal (statement), signed_graph_reconstructible_of_all_nonneg_net_degrees (partial), op1525_three_fixed_points_reconstruct (partial), signed_graph_reconstructible_balanced_three_fixed (partial), op1525_invariant_mono_subset_reconstruct (partial), signed_graph_reconstructible_balanced_mono_invariant (partial), op1525_flip_neighborhood_injective (partial), signed_graph_reconstructible_balanced_mono_pair_fixed (partial), simple_graph_undirected_pair_orbit_closed (partial), op1525_binary_pair_closure_characterization (partial), op1525_linked_flip_punctures_reconstruct (partial), op1525_odd_unequal_switch_deck_iff_deletion (partial), op1525_equal_switch_deck_iff_complementary_deletions (partial), op1525_even_deletion_switch_counterexample (partial), op1525_flip_imbalance_square_sum (partial), op1525_flip_mono_pair_sum (partial), op1525_pair_coloring_profile_classification (partial), signed_graph_reconstructible_balanced_mixed_twin_pair (partial), signed_graph_reconstructible_balanced_mixed_two_orbits (partial)

OP-1532 independent rank trajectories sequential draftIn LeanFair Division

Fix any n>=2, m>=1 and deterministic length-m picking sequence pi over the agents. Each agent independently draws a uniformly random strict ranking of the same m labeled goods, and at each turn the scheduled agent takes her highest-ranked remaining good. For agent i let R_i be the ordered list of the ORIGINAL ranks (1=best) of the goods she personally receives. Are the random vectors R_1,...,R_n mutually independent for every n, m, and pi? More strongly, is their joint law the product of these one-agent chains: begin with ranks {1,...,m}; at each turn of i remove and record the smallest surviving rank, and at every other turn delete a uniformly random surviving rank, with all random deletions independent across agents? Consequently, does exact independence also hold for the agents' realized and normalized utilities when each independently has any item-exchangeable continuous valuation vector, including dependent values within an agent?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This would turn the multi-agent joint law under every deterministic picking schedule into independent one-agent chains, giving exact distributions of welfare, egalitarian utility and normalized utilities, not only expected welfare. It explains and strengthens the independence half of the balanced-draft Gaussian conjecture OP-1493 from an asymptotic uniform-valuations phenomenon to finite m, arbitrary schedules and item-exchangeable priors. Kalinowski, Narodytska and Walsh compute marginal expectations under independent random rankings; those first moments do not determine their joint law. Caution: independence concerns each agent's own acquired ranks or utilities, not agents' valuations for other bundles, so it does not by itself settle envy probabilities. Evidence: Experiment 22369 exhausts all preference profiles for five deterministic schedules, including all 1,728,000 profiles for each of two distinct three-agent, five-good schedules and all 518,400 profiles for a six-good unbalanced two-agent schedule. It checks equality of every joint ordered-rank probability to the product of its marginals, including zero-probability tuples, and finds no failures. Experiment 22366 simulates normalized utilities for independent uniform, squared-uniform, square-root-uniform and exponential values with n=2,3,4 and finds near-zero cross-agent covariance; this numerical check does not establish independence.

In Lean: independent_rank_trajectories_sequential_draft (statement), independent_rank_trajectories_single_good (partial)

OP-1533 iid binary greedy bpe universal log dictionary rateIn LeanAlgorithm Design & Analysis

For each p in (0,1), let X_1,...,X_N be independent Bernoulli(p) bits. Run k greedy full byte-pair merges, at each step replacing all nonoverlapping occurrences of a most frequent pair from left to right with a fresh symbol; if there is no pair, stop. For a tie-breaking run pi write T_{N,k,pi} for the final token count, and put H(p)=-p log_2 p-(1-p) log_2(1-p). Does there exist one constant c>0, independent of p, such that for every p in (0,1) and epsilon>0, lim_{k to infinity} limsup_{N to infinity} P(max_pi |H(p) N/(T_{N,k,pi} log_2(k+2))-c| > epsilon)=0? If so, determine c. The maximization is over all greedy tie-breaking runs on the sampled string, and the input-length limit precedes the dictionary-size limit.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks whether ordinary frequency-greedy BPE has a universal information-normalized token-length law as the learned dictionary grows, across a continuum of source biases and all tie-breaks. Such a law would quantify the compression scale of a standard tokenizer on the simplest nontrivial stochastic source. Existing worst-case fixed-budget utility bounds do not control N/T or this two-limit regime; the factor-two result of Rajaraman, Jiao and Ramchandran concerns unigram cross-entropy under a modified sequential training and hybrid encoding scheme, not the standard same-corpus greedy process or this universal constant. It is not the fixed-k worst-case OP-1344. Evidence: Experiment 22382 implements independent seeded 2.5-million-bit sources at p=0.5,0.2,0.1: at k=1024 the normalized lengths H(p)N/(T log_2(k+2)) are approximately 0.841, 0.846, 0.850; at k=256 they are 0.856, 0.860, 0.861. Experiment 22384 uses 20 million fair bits and gives 0.841 at k=1024 and 0.832 at k=2048. Experiment 22381 uses a separate Python implementation through k=256 and gives similar values. The slow downward drift means the data neither identifies c nor proves it exists; all runs choose one deterministic tie rule.

In Lean: bpe_greedy_step_length_le (partial), bpe_greedy_steps_length_le (partial), bpe_greedy_step_with_length_le (partial), bpe_greedy_run_length_le (partial), bpe_zero_step_run_unique (partial), op_1533_iid_binary_greedy_bpe_universal_rate (statement)

OP-1534 constant word all deletion embedding convex orderIn LeanInformation Theory & Coding

For integers q>=2, n>=1 and t>=1, let y be any q-ary word of length n, let c=0^n, and let e_y(x) count increasing embeddings of y into a q-ary word x of length n+t. Define W_r(y)=sum_{x in [q]^(n+t)} max(e_y(x)-r,0). Is W_r(y) <= W_r(c) for every integer r>=1, with equality simultaneously for all r if and only if y is constant? Equivalently, does the embedding-count vector for c majorize that for every other observation? The proposed explicit upper envelope is W_r(c)=sum_{z=n}^{n+t} binom(n+t,z)(q-1)^(n+t-z) max(binom(z,n)-r,0).

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The uniform-prior deletion posterior is proportional to embedding counts, with common normalizer q^t binom(n+t,n), so this single discrete convex-order inequality would identify the least uncertain observation simultaneously for every Schur-concave posterior entropy, including every positive-order Renyi entropy and Shannon entropy, across all alphabets and deletion radii. Singhvi et al. establish binary Shannon minimization for one and two deletions; Atashpendar et al. treat an asymptotic fixed-output-length regime. Neither gives full finite-radius majorization for arbitrary alphabets. This goes beyond the earlier Shannon minimization problem and complements OP-1503, which concerns the opposite, maximum-entropy end under q>=t+1; neither implies the other. Evidence: Experiment 22385 counts embeddings through all insertion-position and inserted-letter choices: no hinge inequality fails for every canonical q-ary word in twelve parameter sets, including binary output length 7 at radii 1 through 5, binary length 9 at radius 3, ternary length 7 at radius 3, and quaternary length 5 at radius 3. Experiment 22386 independently enumerates all transmitted words and uses a subsequence dynamic program, reaching binary radii 8 to 11 and ternary radii 5 to 7; it finds no failures and only the constant histogram matches the proposed extremizer. These are finite exact computations, not a proof.

In Lean: op_1534_constant_word_all_deletion_embedding_convex_order (statement), op_1534_constant_word_deletion_envelope_eq (partial), op_1534_binary_length_two_one_deletion (partial), op_1534_ternary_length_two_one_deletion (partial)

OP-1535 cubic stationary current frustration sharp dissipation penaltyIn LeanStatistical Mechanics & Thermodynamics

Let G=(V,E) be a nonempty finite simple cubic graph on n vertices, and let f(G)=|E|-maxcut(G), the minimum number of edges whose deletion makes G bipartite. Give each edge an arbitrary orientation and let j:E->R be any stationary current, meaning that the signed sum of j at every vertex is zero. Is it true that (sum_e |j_e|)^2 <= (4n/3 - f(G)/6) sum_e j_e^2 for all such G and j? The coefficient 1/6 would be sharp: for K4, f=2 and the maximum ratio on the left is 5, attaining 4n/3-f/6. The proposed bound is also sharp on every cubic bipartite graph, where f=0.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

For a continuous-time stationary Markov network with unit total flux on each edge, choose directed fluxes (1+j_e)/2 and (1-j_e)/2. Its entropy production is sum_e j_e log((1+j_e)/(1-j_e)), so at fixed total absolute current J and weak driving the sharp leading dissipation is 2J^2/C(G), where C(G) is the maximum squared l1-to-l2 ratio over circulations. This question would give a sharp explicit penalty for graph non-bipartiteness in that leading term, linking stochastic thermodynamics to the maximum-cut frustration index. Salazar's current-weight entropy-production bound is graph independent and does not quantify how far a graph is from bipartite; the bipartite perfect-matching theorem gives the equality construction but does not provide stability for non-bipartite graphs. Evidence: Experiment 22399 enumerates every edge-sign vector for every one of the 112 connected cubic graphs on 4,6,8,10,12 vertices, computes the cycle-space projection using a Laplacian pseudoinverse and independently enumerates cuts; there are no violations, up to floating-point tolerance. Experiment 22400 verifies the K4 equality exactly over rational matrices, producing the current (-1,-1/2,3/2,-1/2,-1/2,-1) in lexicographic edge order with l1=5 and l2^2=5. Experiment 22394 tests feasible divergence-plus-or-minus-one orientations on all 509 connected cubic graphs of order 14 and a sample of order 16; this is only a restricted search and does not certify those orders.

In Lean: complete_graph_four_bipartite_frustration (partial), cubic_bipartite_stationary_current_dissipation_bound (partial), cubic_stationary_current_frustration_sharp_dissipation_penalty (statement)

OP-1536 greedy bpe golden bias critical window mixtureIn LeanAlgorithm Design & Analysis

Put p_*=(3-sqrt(5))/2. For each real theta and all sufficiently large N, draw N independent bits with probability p_N=p_*+theta/sqrt(N) of 1. Starting from symbol IDs 0 and 1, perform k greedy full BPE merges: at each step choose a pair with the largest number of nonoverlapping occurrences, break ties by lexicographic order of the current integer IDs, replace all its occurrences left-to-right by the fresh next integer ID, and stop early if no pair remains. Let Y_{N,k} be the final token count divided by N. For every fixed integer k>=1 and every real theta, does Y_{N,k} converge in distribution to a finitely supported probability measure whose support consists of algebraic numbers? For k=8, does the limiting measure assign positive mass to each of the disjoint intervals (0.350,0.352) and (0.365,0.368) for every theta? Thus even at a fixed merge budget the token density would have a nontrivial critical-window mixture rather than a deterministic law.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This is a concrete, finite-state crossover question prompted by the Referee's critique of OP-1533: it isolates corpus-to-corpus randomness at a phase boundary before asking for a universal large-dictionary rate. The bias p_* is where the population densities of nonoverlapping 00 merges and mixed 01 merges coincide. A nondegenerate limiting distribution would show that more data need not remove tokenizer variability at critical source statistics. The all-k assertion is a structural theorem for an infinite family, while the two explicit k=8 support intervals prevent a vacuous finite-mixture claim. Baliga et al. analyze worst-case compression utility, and Rajaraman et al. analyze a different sequential/hybrid tokenizer; neither addresses this train-on-one-corpus critical distribution. Evidence: Experiment 22439 sampled the actual lexicographic greedy process at p_* with N=100,000, 1 million and 8 million; eight-merge token-density quantiles remain spread rather than collapsing. Experiment 22440 records 36 distinct merge paths across 100 two-million-bit samples, with large clusters near 0.351 and 0.366. Experiment 22444 tests theta=-0.3,-0.1,0,0.1,0.3 at N=250,000, 1 million and 4 million; the low cluster appears in every setting and the high cluster appears in all but one 40-sample setting. Experiment 22380 independently computes the first-merge asymptotic rates (1-p)^2/(2-p) and p(1-p), which agree at p_*. The asserted limiting distribution and positive masses are conjectural, not established by simulations.

In Lean: golden_bpe_bias_poly (partial), golden_bpe_bias_rates_agree (partial), golden_bpe_bias_in_open_unit_interval (partial)

OP-1537 deletion embedding convex order longest run absorptionIn LeanInformation Theory & Coding

Fix integers q>=2, n>=2 and t>=1. For a q-ary word y of length n and integer r>=1, let W_r(y)=sum over all q-ary x of length n+t of max(e_y(x)-r,0), where e_y(x) counts increasing subsequence embeddings. A run is a maximal contiguous block of equal letters. If y is nonconstant, must there exist a longest run R of y and a run R' immediately adjacent to R such that, after changing every letter of R' to the letter of R to obtain y', W_r(y')>=W_r(y) for every r>=1 and the inequality is strict for at least one r?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for a constructive local monotonicity theorem linking run geometry with the full embedding convex order for every alphabet and deletion radius. Each allowed move reduces the number of runs, so a positive answer supplies a finite monotone route to a constant word and would settle the global majorization question OP-1534, giving all posterior Renyi and Shannon entropy minima under uniform input. The refinement is essential: arbitrary coalescence fails, both endpoint choices can fail, and a fixed leftmost-longest choice fails for ternary words. OP-1534 only asserts the global endpoint comparison; it does not imply the existence of any such local route. Singhvi et al.'s binary one- and two-deletion entropy arguments do not establish all hinges or arbitrary radii. Evidence: Experiment 22514 exhausts all binary length-20 words up to reversal and complement for t=3: all 262,656 symmetry classes have a strictly improving longest-run absorption. Experiment 22450 exhausts all ternary words of length 10 for t=3 and length 8 for t=4 and all quaternary words of length 8 for t=3; no nonconstant word is trapped. Experiment 22497 tests longer random q-ary words, up to binary length 50 and t=4, without finding a trap. Experiment 22417 independently finds that arbitrary coalescence 1010101010 -> 1010001010 lowers W_16 from 50 to 49; experiment 22506 finds that the fixed leftmost-longest rule 210101010 -> 220101010 lowers W_12 from 48 to 32. Finite enumeration does not prove the all-parameter assertion.

In Lean: op_1537_deletion_embedding_convex_order_longest_run_absorption (statement), op_1537_binary_length_two_one_deletion (partial), op_1537_ternary_length_two_one_deletion (partial)

OP-1539 two agent balanced draft welfare regret universal limitIn LeanFair Division

For each m, let two agents have independent U[0,1] values V_ig for each of m goods. A deterministic balanced schedule chooses one agent per turn, with each complete consecutive pair containing both agents; at her turn the agent takes her highest-value remaining good. Let W_m(s) be the total value of the resulting allocation and W_m^*=sum_{g=1}^m max(V_1g,V_2g). Is there a nonconstant nonnegative random variable L with E[L]=1/3 such that, for every sequence of deterministic balanced schedules s_m, W_m^*-W_m(s_m) converges in distribution to L? In addition, on the common valuation array, does W_m(s_m)-W_m(1,2,1,2,...) converge to zero in probability? Determine the law of L, for example by its Laplace transform or as a functional of Gaussian processes.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

A randomized fair division rule can be asymptotically efficient in relative welfare while still having a nontrivial, socially relevant distribution of absolute losses. OP-1493 studies the much larger square-root-m fluctuations of individual normalized utilities; it does not control the cancellation in the welfare gap. OP-1532 concerns marginal rank trajectories and does not give the cross-agent coupling to the itemwise optimum. Kalinowski et al. give an exact first-moment formula for alternating Borda welfare, which combined with uniform order-statistic means gives limiting expected loss 1/3, but neither that mean nor asymptotic relative optimality determines the loss distribution or pathwise schedule invariance. Such a distribution quantifies the economic cost of rank-only balanced picking without full preference elicitation. Evidence: Experiment 22948 simulates uniform and exponential utilities across 120-7680 goods; for uniform 2-agent values the mean gap is 0.307, 0.322, 0.332, 0.335 and its spread remains nonzero. Experiment 22949 uses common instances for alternating and snake schedules at 128, 512, 2048, 8192 goods; their mean absolute gap difference falls from 0.0480 to 0.00875 while the alternating gap standard deviation remains about 0.21-0.24. This supports but does not establish either the limiting law or all-schedule universality.

In Lean: two_agent_alternating_schedule_is_balanced (partial), two_agent_welfare_regret_nonneg (partial), two_agent_balanced_draft_welfare_regret_universal_limit (statement)

OP-1543 spr linear board sharp quadratic saturation horizonIn LeanComputational Learning Theory

Let opt(n,t) be the finite-horizon sign-preservation-with-reuse minimax value starting from an empty ordered board of n cells: in each of at most t rounds the pointer may stop or select an empty cell j, and the labeler may erase any minus signs left of j and any plus signs right of j before writing either sign at j; the payoff is the number of occupied cells. For every integer k>=1 and each n in {2k-1,2k}, is opt(n,t)<=k for all t, with opt(n,t)=k if and only if t>=1+k(k-1)/2? Equivalently, is the exact minimum horizon on either board size needed to force k signs the triangular number 1+binom(k,2), and can the labeler always prevent k+1 signs even with unlimited rounds?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The SPR minimax value is a central combinatorial quantity in sequential calibration. Dagan et al. relate it to forecasting error, while Dai and Fishelson establish asymptotic upper bounds via a sophisticated recursive labeling strategy. The proved AFTD full-erasure theorem eliminates the labeler's deletion-subset choices but does not identify an optimal value or a hitting time. This asks for an exact all-k time-space tradeoff at the smallest apparent linear board scale, a directly reusable strategy and lower-bound benchmark rather than one more finite case. Early stopping, reusable cells, and the labeler's adaptive signs make the horizon bound genuinely strategic. Evidence: Experiments 23035 and 23037 compute full-erasure minimax values over every ternary board through n=13 until the entire value function stabilizes. Experiments 23038 and 23039 independently compute every sign-ordered reachable board through n=17 and n=16 respectively: the first times to reach k=1,...,9 on n=2k-1 are 1,2,4,7,11,16,22,29,37, and the next even board has the same threshold through k=8; no higher value appears after stabilization. Experiment 23040 separately compares all legal deletion subsets with full erasure on every board through n=5 and four rounds. These finite results are evidence, not a proof for all k.

In Lean: spr_opt_capacity_le (partial), spr_opt_three_two (partial), spr_opt_four_two (partial), spr_opt_three_one (partial), spr_linear_board_sharp_quadratic_saturation_horizon (statement)

OP-1546 bit persuasion even support sharp receiver ratioIn LeanMechanism Design & Auctions

In the bit-string persuasion model, fix m>=1 and let mu be any prior supported on at most 2m bit strings, over an arbitrary finite set of coordinates. Is it true that every sender-optimal obedient signaling scheme gives receiver utility at most ((6m-1)/(4m+1)) R_0(mu), and that this constant is sharp for each m? More specifically, for m>=2, does the following family attain equality: take 2m equiprobable states; for every (m-1)-subset of states include m+1 identical coordinates whose bit is 1 exactly on that subset, and for every m-subset include 3m identical coordinates of that type; reveal a uniformly selected unordered pair containing the realized state, and recommend 1 for a coordinate exactly when either state in the revealed pair has bit 1? For m=1 use any nontrivial two-state instance. Thus the question includes both sender optimality of the pair scheme for the displayed family and a matching upper bound for arbitrary priors and coordinate systems.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The proved knowledge-base theorem determines the best unrestricted ratio as 3/2 via slice priors, but it gives no quantitative information when only a bounded number of states can occur. The new assertion is an exact all-support-size interpolation with a different, two-layer extremal construction; it measures how much sender-optimal persuasion can improve the receiver's prediction when the underlying uncertainty is sparse. Unlike a finite small case or a second proof of 3/2, the proposed theorem gives a sharp rational function of support size and explicit maximizers for every even support bound. The construction already beats the known one-layer slice family at the same support size. Evidence: An exact posterior-arrangement linear program on uniform four- and six-state priors gives upper bounds 11/9 and 17/13, and explicit sender-optimal pair schemes attain them (23091,23094,23097); nonuniform prior optimization did not improve either value (23093,23098). A mixed-integer posterior optimization certifies sender optimality of the proposed construction on eight states and finds no better posterior on ten or twelve, although the latter two bounds did not close (23099). The integer posterior grids in 23100 give additional checks through twelve states. The five-state computations 23092-23094 also show uniformity cannot be assumed for odd support sizes.

In Lean: open_problem_1546 (statement), bit_persuasion_bounded_support_ratio_le_three_halves (partial), bit_persuasion_even_prior_support_card_le (partial)

OP-1547 bit persuasion uniform even support sharp receiver ratioIn LeanMechanism Design & Auctions

Fix m>=1. Among all bit-string persuasion instances whose prior is uniform on exactly 2m distinct states and whose coordinate set is arbitrary and finite, is the optimal ratio R_max(mu)/R_0(mu) exactly (6m-1)/(4m+1)? For m>=2, does equality hold for the two-layer construction: take 2m equiprobable states, include m+1 copies of the coordinate indexed by each (m-1)-subset of states and 3m copies of the coordinate indexed by each m-subset, where the coordinate is 1 precisely on its indexing subset, and signal a uniformly chosen unordered pair containing the realized state with the coordinatewise OR recommendation? Thus one must establish both sender optimality of this explicit signal and the matching upper bound for every uniform 2m-state prior. For m=1 the claimed ratio is 1.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The knowledge base establishes the global sharp 3/2 constant but not the sharp information value under a bounded uniform state space. This exact all-m formula would quantify the finite-support gap and identify an extremal family. The earlier, stronger question OP-1546 allowed nonuniform priors; new experiments 23111 and 23116 find sender-optimal numerical schemes above its eight-state bound, making uniformity a substantive restriction rather than an arbitrary specialization. These floating-point computations are strong evidence, not a certified exact refutation. The original paper's open question concerned the unrestricted constant, which the knowledge base has since settled. Evidence: At support 4 and 6 the full posterior-arrangement LP and explicit pair signals match 11/9 and 17/13 (23092,23094,23097); a MILP certifies sender optimality of the eight-state construction (23099). A symmetry-reduced LP using uniform-subset posteriors gives matching upper bounds and the adjacent middle layers for every even support size 2..40 and 50,60,80,100,150,200 (23114); it is a numerical relaxation and is not asserted as a proof. Experiment 23101 checks the pair-signal ratio in exact arithmetic through m=100, conditional on sender optimality. Experiments 23111 and 23116 give the nonuniform eight-state gap requiring this revision.

In Lean: persuasion_uniform_even_ratio_le_three_halves (partial), persuasion_uniform_two_states_ratio_le (partial), bit_persuasion_even_prior_is_bit_prior (partial), bit_persuasion_even_scheme_obedient (partial), bit_persuasion_even_prior_is_uniform (partial), bit_persuasion_even_scheme_sender_utility (partial), bit_persuasion_even_values (partial), bit_persuasion_even_scheme_ratio (partial)

OP-1552 two qubit adjusted entropy sharp bell fidelity frontierIn LeanQuantum Mechanics

For each 0<=epsilon<=ln 2, let L(epsilon) be the minimum fully entangled fraction F(rho)=max_U <Phi+|(I tensor U) rho (I tensor U*)|Phi+> over all two-qubit density matrices rho with ln 2+S(rho)-S(Tr_A rho)<=epsilon, where S is von Neumann entropy in nats and |Phi+>=(|00>+|11>)/sqrt(2). Is L(epsilon) exactly the minimum over 0<=p,q<=1 of max{ p(1+2 sqrt(q(1-q)))/2, (1-p)/2 }, subject to ln 2+h(p)-h(pq)<=epsilon, where h is binary entropy and 0 ln 0=0? Equivalently, does the two-parameter rank-at-most-two family rho=p |psi_q><psi_q|+(1-p)|01><01|, |psi_q>=sqrt(q)|00>+sqrt(1-q)|11>, always contain an extremizer?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Bayeh and Kornell show that equality of adjusted joint and marginal entropy exactly characterizes Bell states; this asks for the sharp robustness of that characterization for every nonzero deficit, with a directly operational teleportation fidelity. Kumar, Chakrabarty and Ganguly study related conditional-entropy/fully-entangled-fraction relations chiefly under maximally mixed marginals, which the candidate extremizers generally do not have. The equality criterion and standard continuity inequalities do not identify the optimal full-state frontier or its apparently mixed-state branch. The question is a complete continuum of entropy constraints over all two-qubit density operators, not a single numerical instance. Evidence: Experiment 23504 sampled 140,000 generic density matrices of ranks 1 through 4; 23505 and 23509 optimized the candidate family, suggesting a transition from pure to mixed extremizers near epsilon=0.6 nats. At epsilon=0.1,0.4,0.6,0.62,0.64,0.66,0.68, generic multistart constrained numerical optimization with rank-two, rank-three and rank-four parameterizations (23510) agreed with the candidate minima to numerical tolerance; 23508 independently checked the fully-entangled-fraction calculation against sampled local unitaries. Numerical optimization does not certify global optimality.

In Lean: two_qubit_candidate_fidelity_bound_at_zero (partial), two_qubit_adjusted_entropy_sharp_bell_fidelity_frontier (statement), two_qubit_bell_fidelity_le_candidate (partial), two_qubit_candidate_state_is_quantum_state (partial)

OP-1553 online common bivalued chores odd half integer sharp mmsIn LeanFair Division

For every integer p >= 19 with p congruent to 3 modulo 4, let r=p/2. Two agents have additive chore costs in {1,r}; chores arrive sequentially, both costs are revealed on arrival, and the deterministic algorithm knows r and must irrevocably assign each chore to one agent. Let alpha(r) be the infimum over algorithms of the smallest factor alpha such that after every prefix each agent incurs at most alpha times her two-agent chore maximin share for all chores in that prefix. Is alpha(p/2)=(3p+1)/(2p)? In particular, can an adaptive adversary force that factor by prefix (p+3)/2, and can a deterministic algorithm achieve it at every prefix of every length?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Online fair-allocation researchers would gain the first proposed exact ratio-sensitive family beyond the 3/2 versus 5/3 gap. This is a data-driven revision of OP-1548, whose 3/2 claim is contradicted computationally, not a restatement: it asks for a quantitative lower-bound family and a matching all-horizon algorithm. The published 5/3 algorithm for personalized bivalued costs does not distinguish these ratios or imply the sharper upper bound; its 3/2 lower-bound example uses r=2 and does not give a strict lower bound at these r. Evidence: Exact adaptive minimax computation finds that 3/2 fails at r=15/2 and 19/2 (first at prefixes 9 and 11); an independent bitset subset-sum game extracts full adversarial certificates. For p=19,23,...,51, exact finite-game rational-gap tests give lower bound (3p+1)/(2p) by prefix (p+3)/2 and matching finite-horizon strategies through the following prefix. Additional viability checks give matching strategies through prefixes 30,28,26 at p=19,23,27. These do not establish the all-horizon formula.

In Lean: op_1553_online_common_bivalued_chores_odd_half_integer_sharp_mms (statement), op_1553_general_adversary_lower_bound (partial), op_1553_upper_bound_five_thirds (partial)

OP-1558 graph state fisher sparse topology growing excess core classificationIn LeanQuantum Mechanics

Fix an integer d>=2 and let c_n>=0 be any integer sequence with c_n=o(n). For each n let Q_max(n,d,c_n) be the maximum of Q(G)=sum_{u,v} 1[N(u)=N(v)] over connected triangle-free n-vertex graphs with dn+c_n edges. Put k=k(d,c_n) equal to the least positive integer for which floor(k^2/4)>=d*k+c_n. Let B(d,c_n) be the maximum Q(J)-1 over all connected triangle-free graphs J on k+1 vertices with d(k+1)+c_n edges and a marked vertex s of degree d whose open-neighborhood equivalence class is a singleton. Is this finite family nonempty, and, for every such c_n sequence and all sufficiently large n, is Q_max(n,d,c_n)=(n-k)^2+B(d,c_n)? Moreover, does every maximizing G arise by replacing the marked vertex in a B(d,c_n)-maximizing J by n-k independent vertices with the same neighborhood?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This is a general response to the Referee's criticism of the earlier two-edge-count pitch, not the same pair of examples: it asks for all integer densities d>=2, allows a growing sublinear offset, and gives both an exact eventual formula and a characterization of every optimizer by a finite core. For triangle-free graphs the clique-complex first Betti number equals (d-1)n+c_n+1, so the result would classify the best collective-X metrological sensitivity throughout entire sparse topological regimes and show a near-Heisenberg QFI n^2-2kn+O(k^2). The finite-core maximum is explicitly defined and computable from (d,c); it is not an unspecified constant. Neither the physics paper's numerical topology correlations nor Mantel's edge bound alone identifies this optimum or its equality cases. The two previous edge counts are merely illustrative specializations. It moves Hassani, Emonts and Tura, arXiv:2611.08593, Eqs. (9)-(10), express graph-state collective-X quantum Fisher information in terms of equal-neighborhood classes and numerically examine Betti-number relationships. along new_setting: Replace the vetoed fixed-edge examples by an exact asymptotic structural classification and finite optimization for every fixed sparse edge density and every sublinear Betti-number offset.. Evidence: Experiment 23997 independently enumerates all eligible marked triangle-free cores and finds B(2,c)=24,27,33,36,44,38,57,43,49 for c=0,...,8. Experiment 24000 similarly finds B(3,c)=54,77,51,67 for c=0,...,3, with core graphs through 14 vertices. Experiments 23974,23982,23978,23981 test all weighted twin-class quotients capable of beating the predicted d=2,c=1,2 values for every n=24,...,46; no counterexample or solver-unknown case occurs. Experiments 23999 and 24002 test restricted large-class quotients for further d=2 and d=3 offsets at n=50,60,80 and find no counterexample, though several hard cases remain UNKNOWN. Experiment 24003 independently constructs examples at d=2,3,4 with c=floor(sqrt(n)) through n=5000 and checks the predicted core size and near-Heisenberg scaling; it does not establish optimality. Finite enumeration is computational evidence, not a formal proof.

In Lean: graph_state_fisher_sparse_topology_growing_excess_core_classification (statement)

OP-1559 graph state fisher fractional density three halves topological lawIn LeanQuantum Mechanics

For every fixed noninteger real gamma>1, let m_n=floor(gamma*n) and let Q_max(n,gamma) be the maximum of Q(G)=sum_{u,v} 1[N(u)=N(v)] over connected triangle-free simple n-vertex graphs with m_n edges. Does (n^2-Q_max(n,gamma))/n^(3/2) converge to 4*sqrt(gamma-floor(gamma)) as n tends to infinity? Here Q is the collective-X quantum Fisher information of the graph state.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for a continuum of sharp metrological frontiers indexed by the first Betti-number density beta_1/n -> gamma-1. It predicts a genuine change of scale: at every fixed noninteger gamma the loss from the Heisenberg value is order n^(3/2), while OP-1558's integer-density c=0 candidate has only order n loss. The square-root dependence on the fractional part would create an explicit staircase of singular topology-density thresholds. The distinction matters in graph-state sensor design, where controlling the number of entangling edges fixes the topological budget. The referenced paper studies Betti numbers and QFI numerically and does not provide this extremal asymptotic; OP-1558 has c_n=o(n) and therefore cannot cover a fixed positive fractional offset. It moves Hassani, Emonts and Tura, arXiv:2611.08593, Eqs. (9)-(10), relate graph-state QFI to equal-neighborhood classes; OP-1558 asks about edge counts d*n+o(n) for integer d>=2. along new_setting: Determine the correction to maximal QFI for every fixed noninteger edge density, outside OP-1558's integer-density window.. Evidence: Experiment 24026 constructs and checks connected triangle-free graph states at densities d+1/4,d+1/2,d+3/4 for d=1,2,3 and n=100,...,3000; their scaled deficits approach the stated constants, though these constructions alone provide only one-sided evidence. Experiment 24030 numerically brackets the optimum using possible largest false-twin class sizes, the triangle-free capacity of the remaining vertices, and the explicit construction; at n=10^6 the bracket for density 2.5 is [2.833973,2.835986], versus the proposed limit 2.828427. Experiment 24028 searches all relevant weighted quotient partitions at several n<=40; it reveals substantial finite-size crossovers, including a density-3.5 instance whose best observed graph has a degree-four giant class, and reports solver UNKNOWN cases explicitly. Experiment 23953 independently checks the graph-neighborhood formula against direct state-vector variances for 995 graphs. These computations do not establish the limit.

In Lean: graph_state_fisher_fractional_density_three_halves_topological_law (statement), graph_state_fisher_density_three_halves_case (partial)

OP-1560 cubic markov network saturated current entropy topologyIn LeanStatistical Mechanics & Thermodynamics

Let G be any finite bridgeless cubic simple graph on n vertices. Assign an arbitrary orientation to each edge and let j be a real stationary current on its edges, meaning zero signed divergence at every vertex. Give each edge unit total forward-plus-reverse stationary flux, so |j_e|<1 and its entropy-production contribution is phi(j_e)=|j_e| log((1+|j_e|)/(1-|j_e|)). For 0<J<n let S_G(J) be the infimum of sum_e phi(j_e) among stationary currents with sum_e |j_e|=J. Define b(G) as the minimum number of edges with |j_e|=1 among stationary currents with j_e in {0,+/-1/2,+/-1} and sum_e |j_e|=n. Is lim_{J->n-} S_G(J)/log(1/(1-J/n)) exactly b(G)? If f(G)=|E|-maxcut(G), must b(G)>=ceil((n+f(G))/2), with equality on infinitely many graphs?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for an exact far-from-equilibrium dissipation law and a graph-theoretic computation of its coefficient, rather than a numerical constant or another weak-drive variance bound. Bridgeless cubic graphs have a perfect matching and hence a two-factor, supplying feasible currents at all J<n by scaling cycle flows. Salazar's graph-independent current/activity bound remains finite at J=n because |E|=3n/2, so it cannot capture the predicted divergence. OP-1535 concerns the quadratic coefficient as J->0 and does not address this boundary. The finite half-integral problem links the divergence to cycle structure and graph frustration; the triangular prism attains the proposed frustration bound, while K4 has a strictly larger coefficient, so the exact invariant contains more information than the lower bound. It moves Salazar, arXiv:2204.00875, proves a graph-independent lower bound in terms of total current and activity; OP-1535 studies a frustration penalty only in the weak-current quadratic regime. along new_setting: Identify the exact graph-dependent logarithmic entropy-production coefficient at the opposite, maximal-current limit.. Evidence: Experiments 24034 and 24042 solve the finite half-integral optimization and compute max-cuts for every connected cubic graph through 14 vertices, including all 509 at order 14; no violation of b(G)>=ceil((n+f(G))/2) is observed. The triangular prism has n=6, f=2, b=4, so it attains the lower bound; K4 has n=4, f=2, b=4. Experiments 24036 and 24039 numerically optimize the continuous entropy on K4, the prism and an eight-vertex non-bipartite graph at current fractions up to .999, with normalized values approaching their candidate coefficients 4,4,8; nonlinear optimization is numerical. Experiment 24044 independently evaluates scaled half-integral certificates down to current gap 10^-12. These computations do not establish the limiting law.

In Lean: op_1560_cubic_markov_saturated_current_entropy_topology (statement), op_1560_entropy_upper_bound_of_half_integral (partial), op_1560_half_integral_cycle_frustration_bound (partial)

OP-1567 hellinger mutual information sharp multiplicative tensorizationIn LeanInformation Theory & Coding

For finite random variables X,Y,Z with Y and Z conditionally independent given X, write H(U;V)=sum_(u,v) (sqrt(p_UV(u,v))-sqrt(p_U(u)p_V(v)))^2. Is H(X;(Y,Z)) <= C*(H(X;Y)+H(X;Z)) always valid for C=(13+5*sqrt(10))/27? Is C the smallest universal constant, approached by binary X,Y,Z with conditionally iid observations as follows: P(X=1)=epsilon, P(Y=1|X=0)=P(Z=1|X=0)=c*epsilon, and P(Y=1|X=1)=P(Z=1|X=1)=(2*sqrt(10)-2)/9, taking epsilon to zero for fixed c and then c to infinity?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Hellinger information is useful for statistical testing and communication lower bounds, but the proved KB counterexample shows ordinary factor-one tensorization fails for conditionally independent observations. A sharp multiplicative repair would quantify exactly how much information can be gained by combining two channels and would be useful even if the general power-divergence classification OP-726 remains open. OP-726 asks for factor one, which is already known to fail at the Hellinger exponent; OP-998 instead adds a KL correction to Jensen-Shannon information. Neither determines the optimal multiplicative Hellinger constant. The proposed algebraic value comes from a two-parameter singular channel limit rather than a numerical fit, and the universal part includes arbitrary alphabet sizes. Evidence: Experiment 24477 evaluates the displayed binary family at 150-digit precision: with epsilon=10^-100 and c=10^16, the ratio is 1.06708845558673690509, approaching C=1.06708845558673691333. Experiment 24479 checks exactly that the limiting candidate reduces to (3+3u-u^2-u^3)/4, whose interior critical value is (13+5sqrt(10))/27. Experiments 24478 and 24480 optimize binary and multi-output forks with hidden alphabets up to five and output alphabets up to four, without exceeding C; experiment 24476 samples 120,000 additional multi-alphabet forks. These numerical checks do not prove the universal bound or the limiting claim.

In Lean: op_1567_hellinger_multiplicative_tensorization_sharp (statement), op_1567_hellinger_factor_one_fails (partial), op_1567_hellinger_rare_source_polynomial_maximum (partial)

OP-1569 hellinger independent observation sharp factor by countIn LeanInformation Theory & Coding

For m>=2, let C_m be the supremum of H(X;Y_1,...,Y_m)/sum_i H(X;Y_i) over finite X and observations Y_i independent conditional on X, when the denominator is positive, with H(U;V)=sum_(u,v)(sqrt(p_UV)-sqrt(p_U p_V))^2. For k>=2 and 0<=u<1 define F_k(u)=[1-u^k+(1-u^(2k)-k(1-u^2)u^(2k-2))/2]/[k(1-u)]. Is C_m=max_{2<=k<=m} sup_{0<=u<1} F_k(u)? Equivalently, is the sharp bound attained in a limit of binary X and binary observations, with k identical informative channels and m-k uninformative ones? Does the optimizer switch from k=2 to k=m at m=24, giving sup_m C_m=max_{a>0}[1-exp(-a)+(1-(1+2a)exp(-2a))/2]/a approximately 1.0671551638?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Statistical testing and multi-sensor inference use independent repeated observations, for which a dimension-free sharp accumulation law would be useful. OP-1567 asks only about two observations. Iterating a two-observation bound compounds its loss and does not determine C_m; in fact a high-precision binary 24-observation example exceeds OP-1567's proposed two-output constant, so the obvious unchanged extension fails. The proposed formula predicts a nontrivial sparsity transition: a worst case uses only two channels up to 23 but all channels starting at 24. It asks for a single sharp theorem for every number of sensors, not one additional finite case. Evidence: Experiment 24514 evaluates a rational 24-output family at 150 digits: P(X=1)=10^-80, P(Y_i=1|X=0)=10^-64 and P(Y_i=1|X=1)=2/75 independently for each i. The ratio is 1.0670903208470371, above (13+5 sqrt(10))/27=1.0670884555867369. Experiment 24507 computes the limiting F_k optimum below the two-output candidate at k=23 and above it at k=24; 24503 checks k through 1000. Experiment 24505 optimizes unequal rare-limit channels through k=50 and finds either two or all channels active. Experiments 24502, 24508 and 24513 optimize finite-probability families with up to six channels, five source states and output alphabets up to four, without exceeding the displayed candidate. These are numerical checks, not proofs.

In Lean: op_1569_hellinger_independent_observation_sharp_factor (statement), hellinger_rare_source_ratio_two_max (partial)

OP-1604 iid alphabet greedy bpe sharp uniform merge budget factorIn LeanAlgorithm Design & Analysis

Put c=(2+sqrt(2))/4. Fix any integer q>=2, any probability vector p with all q entries positive, and any merge budget k>=1. Draw a length-N iid string from p. A full BPE merge replaces all nonoverlapping occurrences of a chosen adjacent pair, left to right, with a fresh symbol. Let G_{N,k} be the smallest total decrease in length among all k-step greedy full-merge runs, where greedy maximizes the number actually replaced at each step and may break ties arbitrarily. Let O_{N,k} be the largest total decrease over all k-step full-merge sequences. Is it true that for every epsilon>0, P(G_{N,k} >= (c-epsilon) O_{N,k}) tends to 1 as N tends to infinity, and that c is sharp uniformly over q,p,k?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Tokenizer designers need performance guarantees for statistical sources, not only worst-case strings. This asks for one sharp compression-utility factor across every finite alphabet, source distribution, merge budget, and greedy tie rule. Baliga-Xie-Byju obtain 0.361 for arbitrary strings and 3/4 as the exact arbitrary-string two-merge guarantee; neither is the claimed iid-source factor. Prior iid BPE questions OP-1533 and OP-1536 address large dictionaries and critical-window fluctuations, not approximation to the optimal merge sequence for every fixed budget. Evidence: An independently checked stationary finite-state calculation over 33,000 sampled source laws for alphabets of sizes 2-8 found no two-merge ratio below c; on p=(a,(1-a)/2,(1-a)/2) with a just above sqrt(2)-1 the ratio approaches c. Direct long-string computations agree with the stationary calculation. Exact three- and four-merge searches on 500 and 160 sampled ternary instances, and beam-search competitors for 2-6 symbols and budgets through 8 and 2-4 symbols through 14, found no violation. The latter searches under-approximate the optimum and do not certify the all-budget bound.

In Lean: iid_bpe_sharp_factor_bounds (partial), bpe_steps_greedy_imp_full_steps (partial), op_1604_iid_greedy_bpe_bound (statement), op_1604_iid_greedy_bpe_budget_one (partial)

OP-1605 katz ising tree entanglement critical window star path transitionIn LeanQuantum Mechanics

Let T range over all simple trees on n>=4 vertices, and let A be its adjacency matrix, K_T(beta)=A(I-beta A)^(-1), and E_T(t,beta)=sum_i[1-product_{j != i} cos^2(t (K_T(beta))_ij)]. For u real and sufficiently small beta>0 set t=sqrt(10 beta^2+u beta^4), and put u_n=4(7n^2-53n+129)/(3(n-2)). Is it true that for each fixed n and u<u_n, the star uniquely maximizes E_T(t,beta) over all n-vertex trees for all sufficiently small beta, while for u>u_n the path uniquely maximizes it? Equivalently, for every tree T let D(T)=sum_v d_v^2 and F(T)=140 sum_v d_v^3 - 1020 sum_{vw in E(T)} d_v d_w - 40 sum_v d_v^2. Is (F(T)-F(P_n))(D(S_n)-D(P_n)) <= (F(S_n)-F(P_n))(D(T)-D(P_n)), with equality only for the path P_n and star S_n?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This is a precise network-design phase transition for multipartite entanglement generated by a mediated Ising Hamiltonian: the optimal geometry changes as the measurement time crosses an n-dependent critical window. De Simone, Capra and Franzosi derive the entanglement formula and study stars and paths separately; their finite-time expansion does not optimize over all trees or resolve the cancellation at t^2=10 beta^2. The limiting invariant inequality is a concrete all-n graph-theoretic core, relating degree-cube and degree-correlation terms; it cannot be inferred by comparing the two displayed examples alone. Evidence: Exact integer evaluation of the invariant found no inequality violation and no nontrivial equality in every unlabeled tree on 4 through 16 vertices; a further 7,000 heterogeneous random trees on 20 through 400 vertices found no violation. Independent 65-digit evaluations of the full matrix-resolvent and cosine formula at beta=0.01 and 0.003 confirm the predicted sixth-order star/path coefficients. A wider numerical scan finds intermediate minimizers, so the analogous lower-envelope claim was deliberately not made.

In Lean: katz_ising_tree_entanglement_star_path_secant_inequality (statement)

OP-1608 digit exchange binary walsh symmetric six limit lawIn LeanFoundations of Cryptography

Let q=2^m, F=GF(q), c in F have absolute trace 1, D(x)=x^2+x+c, and G_c(a,b)=(L,D(L)a), L=D(a)b. Regard F^2 as a binary vector space with coordinatewise field addition. For input masks (u,v) in F^2 and nonzero output masks (s,t) in F^2, put W(u,v;s,t)=sum_{a,b in F} (-1)^Tr(u a+v b+s L+t D(L)a). Sample (u,v) uniformly from F^2 and (s,t) uniformly from F^2 minus {(0,0)}. Uniformly over all trace-one choices c, do the probabilities Pr(|W|=j q), j=0,...,6, converge respectively to (361/768,49/120,161/1536,1/72,11/3840,0,1/23040), with error O(q^(-1/2)) as m tends to infinity?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Linear cryptanalysts need the distribution of linear correlations for an explicit ring S-box, including the frequency of the rare largest correlations. Fukui's theorem and the KB prove a native ring-addition differential bound, which does not provide this binary-coordinate Walsh spectrum; the paper explicitly excludes linear attacks. The proposed limit is a concrete spectral law for the whole infinite family, not merely a new upper bound. Evidence: Direct Walsh-Hadamard transforms at small m agree with independent exact sextic-fiber counts. Full spectra for m=3,...,10 approach the stated probabilities; for m=9 the largest absolute discrepancy among the seven frequencies is 0.00231 and the rare 6q frequency is 1.082 times its proposed limit. Independent root enumeration through m=10 approaches the fixed-point distribution of S_6, and the proportion of linearly dependent root sets decreases.

In Lean: digit_exchange_binary_walsh_symmetric_six_limit_law (statement), op_1608_digit_exchange_walsh_prob_five_zero (partial), op_1608_digit_exchange_walsh_le_six (partial), op_1608_digit_exchange_walsh_limit_sum_one (partial)

OP-1611 Minimal maximum degree for super-linear matching recoloring diameterIn LeanGraph Theory & Graph Algorithms

What is the smallest positive integer $\Delta$ such that there exists a finite simple graph $G$ with maximum degree $\Delta(G) = \Delta$ whose $(\Delta+2)$-colouring reconfiguration graph has diameter strictly greater than $|V(G)| + \mu(G)$, where $\mu(G)$ is the matching number of $G$? (It is known that $\Delta \in \{4, 5, 6, 7, 8\}$.)

Posed in arXiv:2611.17022, Sec. 8, open question 3 — Large diameter for $(\Delta+2)$-colouring reconfiguration

In Lean: op_1611_min_max_degree_superlinear_matching_recoloring_diameter (statement), op_1611_min_max_degree_le_eight (partial), op_1611_min_max_degree_ge_four (partial)

OP-1633 Fall 3-Colourability of Det-Extremal Cubic Bipartite Graphs of Connectivity TwoIn LeanGraph Theory & Graph Algorithms

Let $G$ be a finite, connected, cubic bipartite graph of vertex connectivity two. Let $B$ be the biadjacency matrix of $G$. The graph $G$ is det-extremal if $|\det B| = \operatorname{per} B$, where $\operatorname{per} B$ is the permanent of $B$ (equivalently, all perfect matchings of $G$ have the same sign). Does every such graph $G$ admit a fall 3-colouring, that is, a proper 3-colouring such that every closed neighbourhood contains all three colours (which for cubic graphs is equivalent to a proper 2-homogeneous 3-colouring, $\chi_h^{(2)}(G) = 3$)?

Posed in arXiv:2611.16649, Sec. 4, after G* — On 2-Homogeneous Colourings of Cubic Bipartite Graphs

In Lean: connected_cubic_bipartite_has_no_cut_vertex (partial), op_1633_fall_3_coloring_of_det_extremal_cubic_bipartite_connectivity_two (statement), op_1633_fall_3_coloring_of_det_extremal_cubic_bipartite_three_connected (partial), op_1633_exists_cubic_bipartite_connectivity_two_not_fall_three (partial)

OP-1638 Tight exact quantum query complexity of recursive ternary not-all-equalIn LeanQuantum Computation

Let $\mathrm{NAE}_3 : \{0, 1\}^3 \to \{0, 1\}$ be the ternary not-all-equal Boolean function defined by $\mathrm{NAE}_3(x) = 0$ if $x \in \{000, 111\}$ and $1$ otherwise. For each integer $k \ge 1$, let $F_k = \mathrm{NAE}_3^{\circ k} : \{0, 1\}^{3^k} \to \{0, 1\}$ denote the $k$-th recursive block composition of $\mathrm{NAE}_3$. Does there exist an absolute constant $C > 0$ such that for all $k \ge 1$, $$Q_E(F_k) \le C \left(\frac{3}{\sqrt{2}}\right)^k?$$

Posed in arXiv:2611.16412, Problem 12.2 — Exact Quantum Algorithms for Composed Boolean Functions

What is known

The paper proves Q_E(NAE_3^{∘ k}) ≤ (3/√2)^k exp(O(log²(k+2))), leaving open whether the subexponential overhead exp(O(log²(k+2))) can be removed to match the adversary lower bound Ω((3/√2)^k).

In Lean: recursive_nae_exact_quantum_upper_bound_subexponential (partial), op_1638_tight_exact_quantum_query_complexity_recursive_nae (statement), recursive_nae_contractive_normalized_recurrence_implies_upper_bound (partial)

OP-1643 Asymptotic Behavior of State Isomorphism Collision Probability in PyranimIn LeanCombinatorial Games

Let $\mathcal{T}_n$ be the set of stable positions of an $n$-tier Pyranim game, which are order ideals in the interval containment poset $\mathcal{P}_n = \{[i, j] : 1 \le i \le j \le n\}$, so that $|\mathcal{T}_n| = C_{n+1} = \frac{1}{n+2}\binom{2n+2}{n+1}$. Let $X$ and $Y$ be selected independently and uniformly at random from $\mathcal{T}_n$. Two states $X, Y$ are game-isomorphic ($X \simeq_{\text{game}} Y$) if there exists a bijection between their legal move option sets that preserves isomorphism recursively. Is it true that $\lim_{n \to \infty} (\mathbb{P}(X \simeq_{\text{game}} Y))^{1/n} = 1$? More generally, what is the asymptotic decay rate of $\mathbb{P}(X \simeq_{\text{game}} Y) = \frac{1}{C_{n+1}^2}\sum_{K \in \mathcal{K}_n} |K|^2$ as $n \to \infty$?

Posed in arXiv:2611.16153, Sec. 5.3, Question 4 — Enumerating Pyranim Isomorphisms

What is known

The paper completely characterizes game isomorphism through unlabeled unit interval graphs, but the asymptotic probability that two independent random Dyck paths/Pyranim states are isomorphic remains uncomputed.

In Lean: op_1643_pyranim_collision_prob_decay (statement), pyranim_card_stable_positions (partial), pyranim_game_iso_iff_graph_iso (partial), pyranim_collision_prob_one (partial)

OP-1653 Local Encodability of All Three-Qubit Pure StatesIn LeanQuantum Computation

Let H = (ℂ²)^{⊗ 3} be a three-qubit Hilbert space. Is every normalized pure state |ψ⟩ ∈ H locally encodable, i.e., do there exist 8 local unitaries V_a = U_1^{(a)} ⊗ U_2^{(a)} ⊗ U_3^{(a)} ∈ U(2)^{⊗ 3} (a = 1, ..., 8) such that {V_a |ψ⟩ : a = 1, ..., 8} forms an orthonormal basis of H? In particular, does the set of maximally coherent states in the common eigenbasis of G = ⟨Z^{⊗ 3}, X ⊗ 𝟙 ⊗ X, 𝟙 ⊗ X ⊗ X⟩ form an LU-universal set for three qubits?

Posed in arXiv:2611.16921, Sec. VII — When can local unitaries generate a complete orthogonal basis?

What is known

While systems of 4 or more qubits are proven not to be universally locally encodable, three qubits satisfy the dimensional degree-of-freedom inequality (8 ≤ 12 - 4 + 3 = 11), making it the primary remaining boundary case among multiqubit systems.

In Lean: three_qubit_dof_inequality (partial), multiqubit_dof_inequality_fails (partial), three_qubit_universal_local_encodability (statement), three_qubit_pair_correlation_parallel_obstruction (partial), three_qubit_three_pairwise_zero_axes (partial), three_qubit_ghz_phase_compatibility (partial), continuous_antipodal_circle_zero (partial), three_qubit_degenerate_pair_ghz_frame (partial), three_qubit_isotropic_pair_form_gives_degeneracy (partial), three_qubit_degenerate_correlations_locally_encodable (partial), three_qubit_gaussian_witness (definition), three_qubit_gaussian_witness_locally_encodable (partial), three_qubit_gaussian_witness_not_locally_real (partial), unit_complex_three_phase_surjective (partial), three_qubit_singular_pair_form_gives_degeneracy (partial), three_qubit_exchange_symmetric_ghz_frames (partial), three_qubit_ghz_frames_locally_encodable (partial), three_qubit_exchange_symmetric_locally_encodable (partial), ghz_exchange_harmonic_zero (partial), three_qubit_exchange_pair_fixed_axis_path (partial), three_qubit_exchange_positive_plane_ghz_frames (partial), three_qubit_regular_ghz_witness (definition), three_qubit_regular_ghz_neighborhood_locally_encodable (partial), three_qubit_weighted_pair_path_zero (partial), three_qubit_exchange_witness_positive_form (partial), ghz_sign_symmetry_nonzero (partial), three_qubit_ghz_spurious_minimum_arithmetic_certificate (partial)

OP-1657 Exact Turán Number of Even Zycles Not Divisible by ThreeIn LeanCombinatorics for TCS

Let $\ell \ge 4$ be an even integer with $3 \nmid \ell$. Let $Z_\ell$ denote the $3$-uniform zycle on $2\ell$ vertices with edges $\{\{x_i, y_i, x_{i+1}\}, \{x_i, y_i, y_{i+1}\} : i \in \mathbb{Z}_\ell\}$. Let $T_n$ denote the balanced $3$-partite Turán hypergraph on $n$ vertices whose edges are all triples meeting each part in one vertex, or having two vertices in $V_i$ and one in $V_{i+1}$ (indices modulo 3) for some $i \in \{1, 2, 3\}$. Does there exist an integer $n_0$ such that for all $n \ge n_0$, the maximum number of edges in a $Z_\ell$-free $3$-uniform hypergraph on $n$ vertices satisfies $\operatorname{ex}(n, Z_\ell) = e(T_n)$?

Posed in arXiv:2611.16654, Problem 4.2 — Exact Tur\'an densities of even zycles

In Lean: op_1657_exact_turan_number_even_zycles (statement), op_1657_exact_turan_number_zycle_four (partial), op_1657_turan_hypergraph_le_extremal_number (partial)

OP-1665 Isomorphism Classification of Involutive Poset Solutions of the Braid EquationIn LeanCombinatorics for TCS

Let $P$ and $Q$ be finite non-empty partially ordered sets. Let $Z_P = P \times (\mathbb{Z}/2)$ and $X_P = P \sqcup Z_P$, and define $D_P : X_P \times X_P \to X_P \times X_P$ by $D_P(x, (y, \varepsilon)) = ((y, \varepsilon + 1), x)$ if $y \le x$ and $D_P(x, (y, \varepsilon)) = ((y, \varepsilon), x)$ if $y \not\le x$; $D_P((y, \varepsilon), x) = (x, (y, \varepsilon + 1))$ if $y \le x$ and $D_P((y, \varepsilon), x) = (x, (y, \varepsilon))$ if $y \not\le x$; and $D_P(u, v) = (u, v)$ for all $(u, v) \in (P \times P) \cup (Z_P \times Z_P)$. Define $(X_Q, D_Q)$ analogously. Is $(X_P, D_P)$ isomorphic to $(X_Q, D_Q)$ as a solution of the braid equation if and only if $P$ is isomorphic to $Q$ as a partially ordered set?

Proposed here, building on arXiv:2611.15540, Theorem 3.2 — Solutions of the set-theoretic quantum Yang-Baxter equation arising from posets; the paper does not ask it

What is known

The paper proves that the sorting map $R_P$ satisfies $(P, R_P) \cong (Q, R_Q) \iff P \cong Q$ (Theorem 2.1(b)) and determines the automorphism group of $(X_P, D_P)$ as $(\mathbb{Z}/2)^P \rtimes \mathrm{Aut}(P)$ (Theorem 3.2). However, it leaves open whether the involutive construction $P \mapsto (X_P, D_P)$ is an embedding on isomorphism classes, i.e., whether $(X_P, D_P) \cong (X_Q, D_Q)$ implies $P \cong Q$.

In Lean: poset_braid_map_is_braid_solution (partial), poset_braid_iso_of_order_iso (partial), op_1665_poset_braid_iso_iff_order_iso (statement)

OP-1667 opposite cerny direct product exact reset thresholdIn LeanAutomata & Formal Languages

For each n>=2 let C_n be the deterministic automaton on {0,...,n-1} with letter a acting by x -> x+1 mod n and letter b fixing 0,...,n-2 while mapping n-1 to 0. Let C_n^swap be the same automaton with the roles of a and b exchanged. Is the reset threshold of their direct product C_n x C_n^swap exactly 2(n-1)(n-2)+2? Equivalently, is the shortest binary word simultaneously resetting C_n and its letter-swapped copy always of that length?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The product synchronization theory in Fernau and Rystsov bounds the threshold between (n-1)^2 and 2(n-1)^2 for these classical extremal n-state factors. The proposed exact formula falls strictly inside both bounds for n>=4 and measures how much synchronization work can be shared even when the two factors use opposite letters. It would give automata theorists a concrete infinite family of exact product thresholds for the central Cerny extremal examples. The paper's stated open problem asks for general conditions for attaining the extreme bounds; this different question concerns an interior value and does not follow from that characterization. Evidence: Breadth-first search of the exact pair-of-subsets automaton matches the formula for every n=2,...,11; the n=11 search visited 3,139,396 distinct states and returned length 182. An independent search over unequal sizes and both shared and swapped letters checked n,m<=9 and shows that the simple diagonal formula does not blindly transfer to unequal factors.

In Lean: op_1667_opposite_cerny_direct_product_exact_reset_threshold (statement), op_1667_opposite_cerny_product_two_is_synchronizing (partial), op_1667_opposite_cerny_product_reset_threshold_two (partial)

OP-1668 hypergraph metrology binomial deficit sharp rateIn LeanQuantum Mechanics

Fix p in (0,1/2) and define h_p(j)=4 p^j(1-p)^j/[p^j+(1-p)^j]^2 for integers j>=0. For n>=3 and W~Binomial(n,p), set D_n(p)=(3/16) E[(n-2W)^2 h_p(|n-2W|)] +(9/16) E[(n-W)h_p(|n-2W-1|)+W h_p(|n-2W+1|)]. Is there, for every fixed p, a pair of positive finite constants c_p,C_p such that c_p sqrt(n) [2 sqrt(p(1-p))]^n <= D_n(p) <= C_p sqrt(n) [2 sqrt(p(1-p))]^n for every n>=3? More sharply, do D_(2m)(p)/[sqrt(2m) (2 sqrt(p(1-p)))^(2m)] and D_(2m+1)(p)/[sqrt(2m+1) (2 sqrt(p(1-p)))^(2m+1)] both converge to positive finite limits?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Alexander and Tame's mixed-state Fisher calculation for the complete weighted hypergraph state at phase 2pi/3 reduces, according to independent finite computations, to a binomial formula with D_n as the deficit from (3/16)(1-2p)^2 n^2+(3/4)n. Sharp exponential decay with the polynomial prefactor quantifies the finite-size cost of fixed preparation dephasing; parity-resolved constants would show precisely how fast the asymptotic metrological law becomes useful. In response to the Referee's infrastructure critique this pitch is stated entirely as a finite binomial inequality and two real-sequence limits; no quantum operators or Fisher-information definitions are needed to formalize it. Evidence: Direct diagonalization of the mixed quantum state agreed with the separately derived binomial formula for n=3,...,8 and four noise values (#25740). Direct positive-sum evaluation through n=641 (#25748) yields stable parity-resolved normalized deficits; for p=0.1 at n=640,641 they are 1.02141,1.11749, matching numerical lattice-sum predictions 1.02214,1.11797 (#25749). Similar tests cover p=0.2,0.3,0.4,0.45.

In Lean: op_1668_hypergraph_binomial_deficit_pos (partial), op_1668_hypergraph_binomial_deficit_two_sided_bounds (partial)

OP-1669 two thirds convex random marginal core sharp failure rateIn LeanGeneral Equilibrium & Cooperative Games

For each n>=3 let alpha_n be the supremum, over all real-valued transferable-utility games v:2^[n]->R with v(empty)=0 that are 2/3-convex, of the probability that the marginal vector associated to a uniformly random player ordering is not in the core. Equivalently, for every three distinct coalitions at most one of their three supermodular inequalities fails; a permutation pi has marginal component v({pi_1,...,pi_k})-v({pi_1,...,pi_(k-1)}) for player pi_k, and fails if some coalition receives less than its worth. What is the sharp asymptotic order of alpha_n? In particular, is there an absolute c>0 and, for every sufficiently large n, a 2/3-convex game for which at least c log(n)/n of all marginal orderings are outside the core?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Bando, Hirai, Imamura and Mizutani show that some ordering produces a core allocation and give a constructive algorithm. The probability that a uniformly random ordering succeeds is a different robustness question: it measures how reliably the simplest randomized marginal rule implements stable cost sharing. Their local adjacent-swap characterization and 2/3 convexity imply a matching constraint on bad coalition pairs, suggesting an O(log n/n) failure upper bound; the computational constructions presently establish only Omega(1/n). Closing this logarithmic gap, in either direction, would quantify the random rule for the whole game class rather than just prove existence of one good ordering. Evidence: Exact CP-SAT feasibility searches found games with 4/6, 14/24, 68/120, and 320/720 noncore permutations at n=3,4,5,6 respectively; the integer-value restriction means these are lower witnesses, not global optima. A separate explicit family was checked for n=5,...,10 and gives failure probability asymptotic to 2/n; a relaxed matching-only optimization (#25743) exceeds the feasible-game result already for n=4, showing why geometric realizability matters.

In Lean: two_thirds_convex_noncore_ordering_fraction_lt_one (partial), two_thirds_convex_three_player_noncore_ordering_fraction_ge_two_thirds (partial), two_thirds_convex_random_marginal_core_logarithmic_lower_bound (statement)

OP-1670 opposite cerny product two size exact threshold transitionIn LeanAutomata & Formal Languages

For 2<=n<=m let C_n be the binary automaton on {0,...,n-1} with a the cyclic increment modulo n and b fixing all states except n-1, which it maps to 0; let C_m^swap be the m-state automaton with a and b exchanged. Is the reset threshold of C_n x C_m^swap exactly (m-1)^2 + max{n-2, (n-1)(n-2)+3-m}? Equivalently, is the shortest word synchronizing both factors always this length? In particular, is its overhead beyond the larger factor's classical threshold exactly n-2 whenever m>=n^2-4n+7?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This extends the just-adopted equal-size question OP-1667 to arbitrary factor sizes and predicts an unexpected transition: with a sufficiently larger factor, synchronizing the small opposite-letter factor costs only n-2 extra symbols; below the transition, the overhead varies with both sizes. Fernau and Rystsov's general product bounds do not determine either branch, and the paper's own open question asks a different general equality characterization. The two-variable formula would give an exact family of common reset words for canonical slowly synchronizing automata, useful both for synchronization theory and testing product algorithms. Evidence: Independent subset-state breadth-first searches matched the stated formula for all 2<=n<=6, n<=m<=16; all 7<=n<=10 with n<=m<=22-n; and the critical six-state transition at m=17,18,19. The equal-size conjecture also has an explicit candidate word tested through n=1000 (#25758). These are finite computations, not a proof.

In Lean: op_1670_opposite_cerny_product_two_three_is_synchronizing (partial), op_1670_opposite_cerny_product_reset_threshold_two_three (partial), op_1670_opposite_cerny_product_large_factor_overhead (partial), op_1670_opposite_cerny_product_exact_reset_threshold (statement)

OP-1671 two thirds convex random marginal sharp two log over nIn LeanGeneral Equilibrium & Cooperative Games

Let alpha_n be the supremum, over all 2/3-convex TU games v:2^[n]->R with v(empty)=0, of the probability that the marginal worth vector of a uniform random ordering is outside the core. Is lim_{n->infinity} n alpha_n/log n = 2? More specifically, let r=floor(n/2), partition players into pairs {2i-1,2i} for 1<=i<=r and, if n is odd, one singleton. For a coalition S write x_j=1[j in S], E_j=1[x_(2j-1)=x_(2j)], and define v_n(S)=(4r+1) sum_{u<v in distinct groups} x_u x_v - sum_{i=1}^r x_(2i-1)x_(2i) product_{j<i} E_j. Is v_n 2/3-convex for all n, and does its noncore marginal-ordering probability itself satisfy lim_{n->infinity} n Pr[noncore]/log n=2?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

OP-1669 asks only for the order of the worst random marginal-order failure probability, leaving a gap between inverse-n constructions and a logarithmic upper bound. The new first-split interaction gives a single explicit game in every dimension and suggests the exact leading constant, sharply strengthening that question. This matters for randomized stable allocation: it would identify the worst-case failure probability to first order, without solving or describing every core. Bando et al. establish existence of a core marginal vector but do not quantify this probability. Evidence: The full 2/3-convex condition was exhaustively checked through n=10; direct coalition-by-coalition core tests agree with the adjacent-swap count through n=7. Exact permutation dynamic programming gives n Pr[noncore]/log n = 1.9111 at n=20, while large independent permutation samples give 2.123, 2.166 and 2.168 at n=100,500,1000; the explicitly counted expected number of bad adjacencies has normalized values 2.1517, 2.1253 and 2.0946 at n=2000,10000,200000. These are finite tests, not a proof of the limits.

In Lean: two_thirds_convex_random_marginal_sharp_two_log_over_n (statement)

OP-1678 hermitian lindblad relaxation saturation qubit plane stabilityIn LeanQuantum Mechanics

For every d>=2 and finite family of d-by-d Hermitian matrices H_j, put J_j=H_j-Tr(H_j)I/d and W=sum_j Tr(J_j^2)>0. Consider the purely dissipative Lindblad generator L(X)=-1/2 sum_j [J_j,[J_j,X]], and let gamma be the largest eigenvalue of the positive superoperator -L on M_d(C). Define the relative relaxation defect delta=1-gamma/W. Let D be the infimum of sum_j ||J_j-Proj_E(J_j)||_F^2/W over all real planes E of Hermitian matrices obtained as follows: choose any rank-two orthogonal projector P, take the three-dimensional real space of traceless Hermitian matrices supported on P, and choose any two-dimensional real subspace E of it; Proj_E is the Hilbert-Schmidt orthogonal projection. Is D<=4 delta for every dimension and every such family?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Relaxation spectra are experimentally accessible, and the universal quantum Markovian relaxation bound says delta>=0 but by itself does not quantify the structure of an almost-saturating generator. This asks whether near saturation forces essentially all dissipative noise into a single effective qubit and at most two Pauli directions, with a dimension-independent linear error bound; the optimization is invariant under orthogonal changes of the Hermitian jump-operator representation. Fox's recent equality characterization for a single commutator gives exact pairwise extremizers, not a dimension-uniform stability statement for arbitrary sums of Lindblad double commutators. Tanninen proves the general spectral bound but no such inverse theorem. The proposed constant four is a concrete quantitative target. Evidence: Experiment 26007 checked random Hermitian multi-jump generators and near-saturating perturbations in dimensions 2,3,4,5,7,9; the explicit candidate plane obtained from a maximizing eigenmatrix always had residual at most 1.51 times delta. Experiment 26008 tested 5000 additional single-, two-, five-, and near-extremal-jump families per dimension 3 through 6; the largest candidate-plane residual/defect was 1.81. These are floating-point checks, not proofs of the infimum.

In Lean: hermitian_lindblad_qubit_plane_stability (statement), hermitian_lindblad_qubit_plane_stability_single_jump (partial)

OP-1682 star core multientropy qubit allocation degree order thresholdIn LeanQuantum Computation

For integers k>=3, Q>=k and n>=2, consider positive integers b,a_1,...,a_{k-1} with b+sum_i a_i=Q, and define X_n(b,a)=sum_i n^(Q-a_i)+product_i (n^(a_i)-n+1). (1) Is every minimizer of X_n over these allocations such that all leaf sizes a_i differ by at most one and b<=min_i a_i? (2) In the special but infinite regime Q=2k, is the unique minimizing allocation, up to leaf permutation, determined by the strict comparison (n^2-n+1)^(k-2) versus n^(2k-5): all blocks equal 2 when the former is larger, and b=1 with one leaf of size 3 and all other leaves of size 2 when the former is smaller? If equality can occur, are these the only minimizers?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The linked 2026 paper evaluates multipartite entanglement at fixed block sizes but does not determine optimal allocations. For a star-core graph state, X_n is its assignment exponent, and at fixed k,Q,n its fully multipartite Renyi multi-entropy is a strictly decreasing affine function of X_n. Finding an optimal distribution of physical qubits is relevant to designing encoded graph states. A natural inference from the path-core question—that equal blocks are optimal whenever Q is divisible by k—fails already for a five-node star at n=2, while it holds there at n=3; this proposed exact degree/order transition explains that difference for an infinite family. The first part asks for the genuine multi-parameter structural principle, not only one observed counterexample. It moves Czech, Feng, Harper, Ju and Zhao, Renyi Multi-entropy for Stabilizer States, arXiv:2610.26814, Theorem 3.1 and Eq. (20); path-core allocation question OP-1681. along new_setting: Replace the path backbone of OP-1681 by a star, where the optimizing allocation can change with the replica order, and ask for a quantitative degree/order threshold and all equality cases for every k and n.. Evidence: Experiment 26097 checked all tree backbones through 8 core vertices and found equal blocks cease to be optimal on the five-vertex star; its n=2 exponent falls from 1105 at (b,leaves)=(2;2,2,2,2) to 1085 at (1;2,2,2,3). Experiment 26103 checked all sorted star allocations for k<=10, Q from k through min(3k+4,29), and n=2,3,4,10; every minimizer had balanced leaves with center no larger. Experiment 26108 exhaustively checked every leaf multiset when Q=2k for k=3..30 and n=2,3,4,5,6,10, including uniqueness and the claimed exact threshold. Experiment 26105 explored the predicted transition under balanced leaves up to k=100.

In Lean: op_1682_star_core_allocation_minimizer_conjecture (statement), op_1682_star_core_exponent_all_two (partial), op_1682_star_core_regime_2k_difference (partial)

OP-1693 noon realign witness loss monotonicity scaling surfaceIn LeanQuantum Mechanics

For every N>=1 and 0<q<1, consider the two-mode generalized NOON state sqrt(q)|N,0>+sqrt(1-q)|0,N> after independent pure-loss channels with transmissivities x,y in (0,1). Write p_k=q binom(N,k)x^k(1-x)^(N-k), s_k=(1-q) binom(N,k)y^k(1-y)^(N-k), and W_N(q,x,y)=sum_{k=0}^N (p_k+s_k)^2+4q(1-q)(xy)^N. (i) Whenever W_N>1, are both partial derivatives dW_N/dx and dW_N/dy nonnegative? In particular is the region detected by the paper's second-moment realignment criterion upward closed in the two transmissivities? (ii) In the joint high-photon, low-loss regime x=1-a/N, y=1-b/N with fixed a,b>=0, is the detection boundary governed by F_q(a,b)=1, where F_q=q^2 exp(-2a) I_0(2a)+(1-q)^2 exp(-2b) I_0(2b)+2q(1-q)exp(-a-b) I_0(2 sqrt(ab))+4q(1-q)exp(-a-b), with a uniform O(1/N) approximation on compact (a,b)-sets and a single crossing on every nonzero loss ray? Here I_0(z)=sum_{j>=0}(z^2/4)^j/(j!)^2.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Quantum-optical experiments need to know whether improving one lossy channel can ever destroy a given moment-based entanglement certification and how tolerable loss scales as photon number grows. Entanglement itself is monotone under local loss, but a particular sufficient witness need not be, so that monotonicity does not follow merely from physical entanglement monotones. The paper supplies the exact finite-N polynomial for general imbalance and loss, and plots symmetric balanced cases N<=5; it does not derive the arbitrary-N monotonicity or the asymmetric Bessel surface. The Poisson scaling makes the threshold a concrete all-parameter theorem rather than an extrapolation of a few plotted cases. It moves Deside, Kala and Cerf, arXiv:2611.17021, Eq. (117)-(118) and Fig. 6 along stronger_result: Extend five plotted symmetric-loss examples and their finite-N witness formula to a monotonicity theorem and an explicit two-arm, all-amplitudes asymptotic detection surface.. Evidence: Experiment 26529 independently computes density matrices and realignment moments for 90 asymmetric states through N=9, matching W_N to 2.3e-16. Experiment 26536 scans a 121-by-121 transmission grid for 13 amplitude choices and N=1,...,60 without an upward-closure violation; 26540 samples 150,000 configurations through N=500 and finds both gradients nonnegative in all 118,230 detected configurations. Exact Sturm root counts in 26537 found at most one interior transition for 392 rational one-arm slices. Experiment 26526 checks 12 asymmetric loss rays at N=10,40,200 against the displayed limit; for q=1/2 and a=b the critical value is approximately 0.383290969. These checks are not proofs.

In Lean: op_1693_noon_witness_symm (partial), op_1693_noon_scaling_surface_symmetric (partial), op_1693_noon_witness_loss_monotonicity_one (partial), op_1693_noon_witness_monotonicity_scaling (statement)

OP-1695 ising graph magic sixteen spin bipartite subgraph bridgeIn LeanQuantum Mechanics

For every finite simple graph G=(V,E) and real edge angles theta_e, define psi_G=exp(-i sum_{uv in E} theta_uv Z_u Z_v)|+>^{tensor |V|} and Q(G,theta)=2^{-|V|} sum_{P in {I,X,Y,Z}^{tensor |V|}} <psi_G|P|psi_G>^4. Let spins s_v=(u_v,x_v,a_v,b_v) range over F_2^4. For d in F_2^4 put w_e(d)=exp(8 i theta_e) if d=(0,1,0,1), exp(-8 i theta_e) if d=(1,1,0,1), and 1 otherwise. Is Q(G,theta) exactly 16^{-|V|} sum_{s:V -> F_2^4} product_{uv in E} w_uv(s_u+s_v)? In particular, when theta_e=pi/8 for every edge, is Q(G)=8^{-|V|} sum_{A subset E: (V,A) bipartite} (-2)^{|A|} 8^{k(V,A)}, where k(V,A) counts components including isolated vertices? Consequently, for bipartite G does Q(G)=8^{-|V|} Z_G(8,-2), with Z_G the ordinary Fortuin-Kasteleyn random-cluster polynomial?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Quantum information researchers need exact magic benchmarks for interacting spin networks beyond forests. Jha and Gadge prove an exact all-angle forest formula and explain that cycles obstruct their CNOT pruning; the proposed identity treats every finite graph and independently weighted interactions by connecting magic to a concrete finite-state spin partition function. Mann relates individual IQP amplitudes to graph Tutte polynomials, but a fourth moment summed over all Pauli strings is a different observable: in numerical tests even planar graphs with identical ordinary Tutte polynomials have distinct Q. The special pi/8 formula would give an explicit cycle-sensitive graph invariant and imply the previously pitched cactus formula OP-1690 as a special case, while its restriction to bipartite graphs recovers an ordinary random-cluster evaluation. Neither cited paper states this proposed connection. Evidence: Experiment 26603 checks the full independent-angle sixteen-spin expression against explicit Pauli fourth moments for 54 weighted graphs through four vertices; maximum numerical error was 3.4e-16. Experiment 26600 checks the pi/8 bipartite-subgraph expression against Pauli moments on 1,170 nonisomorphic simple graphs through seven vertices with at most 14 edges, with no mismatch, and independently finds Q=945/16384 and 897/16384 for two planar eight-vertex examples. Experiment 26597 found this pair among Tutte-equivalent graphs; 26603 independently compares their full symbolic Tutte polynomials. Experiment 26590 additionally checks one-vertex factorization for 300 random weighted pairs. The Pauli transforms use floating point; these are computations, not proofs.

In Lean: op_1695_bipartite_graph_fortuin_kasteleyn (partial), op_1695_magic_sixteen_spin_identity (statement), op_1695_pi_over_eight_eq_bipartite_subgraphs (partial)

OP-1697 uniform bivalued chores equal marginal exact mms reciprocal ratiosIn LeanFair Division

Fix a real r in [1,2]. There are two agents and finitely many indivisible chores, with additive costs: agent 1 assigns cost 1 to every chore, and agent 2 assigns each chore cost either 1 or r. Let mu_i be agent i's two-agent chore maximin share, namely the minimum over all two-partitions of the larger bundle cost. Is it true that every such instance admits a lottery over complete allocations in which every chore is assigned to each agent with probability 1/2 and every allocation in the support gives each agent cost at most mu_i if and only if r=1 or r=1+1/k for some positive integer k? At each such reciprocal ratio, can the lottery always be chosen as a 50-50 mixture of one partition and its swap, with both bundles MMS-safe for both agents? For every integer t>=2 and every r strictly between 1+1/t and 1+1/(t-1), does the instance with 4t chores, of which agent 2 considers 2t-1 high and 2t+1 low, rule out every exact-MMS equal-marginal lottery?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Fair-division and mechanism-design researchers want to know when a universally equal-marginal lottery can achieve exact ex-post maximin-share guarantees. The proved knowledge-base theorem guarantees only factor (r+1)/2 for the larger common-ratio bivalued domain; the uniform-cost first agent is a strict subclass, and its general bound is not exact for r>1. The proposed result characterizes all real ratios in [1,2], including a countably infinite set of isolated feasible ratios and an explicit obstruction family covering every open interval between consecutive ones. It is a qualitative arithmetic phase diagram, not a fixed-size example, and it distinguishes equal-marginal lotteries from existence of one fair allocation. Evidence: Experiment 26650 exactly compared unrestricted MMS partitions with balanced partitions for 221,400 profiles with r=1+1/k, k<=30 and up to 120 chores, with no violation; it also checked the proposed 4t-chore obstruction counts for t=2,...,100 at three rational ratios in each gap, with no failure. Experiment 26647 tested all 128 distinct rational ratios with denominator at most 20 and all even sizes up to 100: exactly the 20 reciprocal ratios lacked an obstruction. Experiment 26646 directly solved the aggregate equal-marginal lottery LP for the eight-chore profile with r=9/5: factor 1 is infeasible, while the first feasible factor is 28/27. Experiment 26643 originally falsified the tempting smaller-agent-ratio bound. Exact cost arithmetic is used in the ratio tests; LP feasibility is numerical evidence.

In Lean: uniform_bivalued_obstruction_no_equal_marginal_exact_mms (partial), uniform_bivalued_reciprocal_safe_partition (partial), op_1697_uniform_bivalued_equal_marginal_exact_mms_iff (statement), uniform_bivalued_unit_ratio_exact_mms (partial)

OP-1702 gapped three point secret descending band mask frontierIn LeanInformation Theory & Coding

Fix an integer d>=3 and let X be uniform on {0,1,d}. For r,L integers with 1<=r<=L, put A_{r,L}=union_{j=0}^{r-1} {jd,jd+1,...,jd+L-j-1}. Let C_{r,L}=min_{t in Z} (1/|A_{r,L}|) sum_{a in A_{r,L}} |a-t| and W_{r,L}=|A_{r,L}+{0,1,d}|/(3|A_{r,L}|). For every budget c>=0, is the infimum of one-guess vulnerability (1/3) sum_{s in Z} max{Pr(Y=s),Pr(Y=s-1),Pr(Y=s-d)} over all independent integer masks Y with E|Y|<=c equal to the lower convex envelope at c of the points (C_{r,L},W_{r,L}), over all 1<=r<=L?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for an exact all-budget privacy frontier and optimal mask structure for an infinite family of non-interval secrets. It corrects the centered-interval proposal OP-1701: exact-arithmetic experiment 27081 found a three-band mask apparently below that proposed hull, so OP-1701 is suspect and has not been checked in Lean. The richer descending-band family captures that counterexample and predicts changes in optimal shape with the gap and budget. Neither the known uniform-interval result nor the general three-point-prior question OP-1662 gives this structural formula. Evidence: Experiment 27081 computed a rational three-band witness that appears to beat the old interval hull at d=80. Experiments 27084 and 27102 checked every tested supporting slope of a restricted descending-band hull against unrestricted finite-window LPs for d<=100, with no discrepancies. Experiment 27112 matched unrestricted LPs at 24 transition budgets for d=200,400,800, including the three-, five-, and seven-band regimes; 27104 explores candidate hulls at larger gaps. All these are finite-window computations, not proofs.

In Lean: gapped_three_point_vulnerability_ge_one_third (partial), gapped_three_point_secret_descending_band_mask_frontier (statement), descending_band_point_mem (partial)

OP-1710 kuramoto tree shift log concave frequency stochastic orderIn LeanLagrangian & Hamiltonian Mechanics

Let T be a finite tree on n>=4 vertices, and let T' be obtained by a generalized tree shift: choose distinct a,b with at least one off-path neighbor at each endpoint and all internal vertices on their path of degree 2, then move every edge from b to an off-path neighbor so it meets a instead. Let omega_1,...,omega_n be iid from any probability distribution on R with a log-concave density, and let omega_bar be their mean. For a tree H set K_H=max over edges e of |sum_{v in C_e}(omega_v-omega_bar)|, where C_e is either component of H-e. Is K_T' stochastically no larger than K_T, i.e. is Pr(K_T'<=s)>=Pr(K_T<=s) for every real s>=0?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

K_H is the exact critical coupling for phase locking of Kuramoto oscillators on H, by Dekker and Taylor's Theorem 3. Their work studies expected critical couplings for selected trees and Gaussian or uniform frequencies; it does not establish an entire stochastic order under tree shifts or cover all log-concave frequency laws. Such an order would compare the full probability of synchronization and its risk quantiles for every tree size and coupling strength. Some regularity assumption is essential: for iid frequencies +/-1 on five vertices, at s=4/5 the path has synchronization probability 6/32 whereas the shifted star has only 4/32. The paper's expectation-level comparisons do not control this distributional reversal. Evidence: Experiment 27382 samples 50,000 iid Gaussian and uniform frequency vectors for every ordered shift of every unlabeled tree through n=9, with no statistically significant violations on 19 quantiles. Experiment 27384 repeats through n=8 for Laplace, logistic, triangular, and exponential laws. Experiment 27385 finds robust violations for smooth bimodal Beta(a,a) laws at a=0.05,0.1,0.2, while the sampled log-concave Beta cases show none. Experiments 27380 and 27381 exactly enumerate the binary n=5 path/star counterexample and show its low-threshold pattern through odd n=17.

In Lean: op_1710_kuramoto_coupling_iso_eq (partial)

OP-1712 plackett luce profile entropy surprisal gaussian limitIn LeanSocial Choice Theory

Let w:[0,1]->(0,infinity) be continuously differentiable and set w_i=w(i/n), 0<=i<n. Draw a Plackett-Luce ranking Pi_n with those weights; write I_n=-log P(Pi_n) and H_n=E I_n. Put L(t)=integral_0^1 w(x) exp(-t w(x)) dx and mu=integral_0^infinity L(t) log L(t) dt - integral_0^1 log w(x) dx. For each x let X_x have the exponential distribution of rate w(x), and put V=integral_0^1 Var(log L(X_x)+w(x)X_x) dx. Is it true that (H_n - n log n)/n tends to mu and (I_n-H_n)/sqrt(n) converges in distribution to the centered Gaussian with variance V, including the degenerate zero-variance case?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers studying preference elicitation and random rankings need the actual information content and its fluctuations, not just a bound. The proved KB result controls entropy when the geometric decay ratio is fixed below one, while this asks for an explicit entropy correction and Gaussian information spectrum for a whole class of varying profiles. In particular w(x)=exp(-cx) gives the near-uniform critical window phi_n=exp(-c/n), which is outside that fixed-phi theorem and distinct from the fixed-phi entropy-rate question mentioned in the AFTD research post. Evidence: Simulations with 100 to 100000 alternatives support the entropy integral for exp(-cx), c=0,1,3,8,20. Independent runs for c=1,3,8 support the variance and approximately normal standardized surprisal; further linear, sinusoidal and peaked profiles agree with both integral predictions within finite-size and sampling error.

In Lean: plackett_luce_laplace_profile_const_one (partial), plackett_luce_profile_entropy_surprisal_gaussian_limit (statement), plackett_luce_surprisal_variance_profile_const_one (partial), plackett_luce_surprisal_gaussian_limit_const_one (partial), plackett_luce_surprisal_variance_profile_nonneg (partial)

OP-1716 sequential subset synchronization sharp k approximationIn LeanAutomata & Formal Languages

Fix k>=2. Given k individually synchronizable deterministic finite automata over a common alphabet, start with the full state set of each. In a fixed order i=1,...,k, choose a shortest word synchronizing the current image of automaton i, append it, and apply it to all k current images. Let G be the total length and OPT the length of a shortest word synchronizing all k automata, with OPT>0. Is the supremum of G/OPT exactly k, even when the alphabet is binary and every stage has a unique shortest choice?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

A proved two-automaton counterexample shows that synchronizing one component optimally first need not yield an optimal product reset word, but it does not quantify the damage. The proposed sharp k-factor would characterize the worst-case performance of a natural modular synchronization strategy for any number of components, even when no tie-breaking ambiguity exists. It goes beyond the original paper's exact optimality question and does not assert a polynomial-time algorithm for finding the shortest subset words. Evidence: Exact subset-automaton breadth-first searches for k=2,...,5 and binary examples with pattern lengths 8-12 give total staged lengths kL-k+1 and product optimum L+1. Further exact searches up to k=10 and L=32 confirm the stage lengths and establish unique shortest choices; the common reset word of length L+1 is explicit there.

In Lean: dfa_seq_subset_sync_total_le_k_mul_simultaneous (partial), dfa_seq_subset_sync_stage_le_simultaneous (partial), op_1716_two_automata_subset_sync_le_two_opt (partial), op_1716_sequential_subset_sync_sharp_k_approximation (statement)

OP-1719 bounded bivalued efx ordinal mms sharp asymptoticIn LeanFair Division

Fix an integer R>=2. For n>=2 let D_n(R) be the largest integer d for which some finite additive-goods instance with n agents, each of whose individual item values lie in {1,R}, has a complete EFX allocation A and an agent i such that v_i(A_i) is strictly smaller than i's 1-out-of-d maximin share. Is lim_{n->infinity} D_n(R)/n = 2(R+1)/(R+3)? Here an agent's 1-out-of-d maximin share is the maximum, over partitions of all goods into d bundles, of the minimum bundle value.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers comparing envy-based and share-based fairness would obtain the sharp loss incurred when an arbitrary EFX allocation is used and the value ratio is bounded. Hosseini and Pathak give a specially constructed EFX allocation with an ordinal guarantee for arbitrary personalized bivalued values; that existence result does not imply a guarantee for every EFX allocation. EF1 alone yields only the generic 2n-1 denominator. The proposed coefficient interpolates from 6/5 at R=2 toward 2 and is attained asymptotically already with identical valuations. Evidence: Experiment 27637 enumerated bounded two-value EFX bundle patterns for n=2 through 6. Experiment 27639 solved a fractional packing relaxation for all integer R=2,...,12 and all own-bundle values 1,...,100; its optimum was 2(R+1)/(R+3), always attained at own value R. This is a finite floating-point LP search, not an upper-bound proof for unbounded bundle values. A matching asymptotic construction uses n=1+(R+3)h identical agents, one bundle of R low goods, (R+1)h bundles of two high goods, and 2h bundles of R+1 low goods; the goods can be repartitioned into 2(R+1)h high-low pairs worth R+1 each.

In Lean: op_1719_bounded_bivalued_efx_ordinal_mms_sharp_asymptotic (statement), op_1719_bivalued_efx_sub_mms_two_agents_two_ratio (partial), op_1719_bivalued_efx_sub_mms_construction_feasible (partial)

OP-1721 tree matching percolation rare tail all p counterexample familyIn LeanCombinatorics for TCS

Fix any real p in (0,1), let q=1-p, and for each integer d>=1 put ell=2d and r=ceil(d*q^(-d)). Let T_d be the tree formed by a central vertex joined to r branch vertices, each branch vertex joined to ell private leaves. Retain each edge independently with probability p. Write b_j(d)=Pr(nu(T_d[p])=r-j), where nu is maximum matching size. Is it true that as d tends to infinity, b_d(d)^2/(b_(d-1)(d)*b_(d+1)(d)) tends to 4q/(1+q)^2? If so, this explicit family would give a failure of matching-number log-concavity for every p in (0,1), including uniform random subgraphs at p=1/2.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The question targets a structural obstruction to two already-listed graph and tree conjectures and would explain whether fixed-probability percolation can ever universally preserve matching-number log-concavity. The limit is strictly below one for every p in (0,1), so a positive answer would overturn OP-1717 and OP-1720 by an explicit infinite family; it is not just a single isolated instance. The matching-number distribution is relevant to random-subgraph reliability and forest graph-state cut-rank statistics. Previous small-tree and moderate-probability computations missed the phenomenon because it appears deep in an exponentially rare tail. It moves OP-1717 (uniform random-subgraph matching-number log-concavity) and OP-1720 (the proposed low-retention tree extension) along boundary: Use a variable-branch depth-two tree family to test and quantify rare-deficiency tail behavior for every fixed p, rather than conjecturing log-concavity at one p or on an interval.. Evidence: Experiment 27661 checked the compressed probability formula against independent exhaustive edge-subset enumeration for small trees at p=1/2, 2/5, 7/10, and used exact rational arithmetic on the proposed family for p=1/4,2/5,1/2,7/10,9/10 and d=6,...,40. At p=1/2 its ratio decreases from 1.07716 at d=6 to 0.91817 at d=40, toward 8/9. Experiment 27659 separately gives an exact-rational p=1/2 example on 10081 vertices with ratio 1126503232380375/1163264949025024 < 1, suggesting OP-1717 and OP-1720 are false; this is a computational warning, not a Lean-verified refutation. Experiment 27654 corrects the bibliographic error in the OP-1720 pitch.

In Lean: rare_tail_target_limit_lt_one (partial), op_1721_tree_matching_rare_tail_limit (statement), op_1721_eventual_log_concavity_failure (partial)

OP-1728 slow exact nim geometric padded witness exponential grundyIn LeanCombinatorial Games

For each pair of integers r>=1 and k>=r+1, play normal-play slow exact k-Nim on k+r piles, where a move removes exactly one stone from each of k nonempty piles. Put M=2^(r+1)-1 and x=(1,2,4,...,2^r,M,...,M), with exactly k-1 copies of M. Is the Sprague-Grundy value of x equal to M for every such r and k? Equivalently, does this explicit two-parameter family witness that the maximum possible Grundy value with r extra piles grows at least exponentially in r, uniformly over all k>=r+1?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Impartial-game researchers seek concrete high nimbers and how nimber ranges depend on the number of unplayed piles. The paper completely handles the one-extra-pile case, while existing OP-1694 concerns a separate all-position bound for two extra piles. This question instead predicts the exact value of one structured witness uniformly in both r and k; it gives a dimension-free exponential lower bound on the attainable nimbers and supplies a concrete stepping stone toward the unexplored fixed-excess theory. The naive bound by the number of legal moves is polynomial in k for fixed r and does not construct a high value or explain this exponential dependence on r. The one-extra-pile unit-shift identity is known to fail once more piles are available. It moves Gurvich and Naumova, arXiv:2611.14546, Corollary 1, gives values 0-3 for r=1; OP-1694 conjectures a sharp range for r=2. along new_setting: Construct a single explicit family with a prescribed exponentially growing Grundy value for every excess r, instead of a range conjecture for one fixed excess.. Evidence: Experiment 28078 evaluates the actual mex recursion on the explicit positions: the proposed values 3, 7, and 15 hold for r=1,2,3 at every tested k>=r+1, while lower k show counterexamples to dropping the threshold. Independent experiment 28079 confirms value 31 for r=4 and k=5,6,7,8 and finds values 15 and 10 for k=3 and 4 respectively. Prior exhaustive experiments 26543 and 26566 independently confirm the r=3 witnesses. These are finite computations, not proofs.

In Lean: slow_exact_nim_geometric_padded_witness_one_eq_witness_three (partial), slow_exact_nim_geometric_padded_witness_r1_k2 (partial), slow_exact_nim_geometric_padded_witness_r2_k3 (partial), slow_exact_nim_geometric_padded_witness_exponential_grundy (statement)

OP-1730 thermomajorization optimal nonadaptive probe budget scalingIn LeanQuantum Mechanics

At uniform Gibbs weights on n levels, let x,y range over nonincreasing probability vectors. Write D_j=sum_{i=1}^j(y_i-x_i), E=max({0} union {D_j:1<=j<n}), and for a fixed set F subset {1,...,n-1} let E_F=max({0} union {D_j:j in F}). Define R(n,m)=min_{F:|F|=m} sup_{x,y}(E-E_F), for 0<=m<n. Is it true that for each fixed integer m>=1, 1-R(n,m) is asymptotic to 4^(m/(2m+1))*n^(-1/(2m+1))? More generally, for each fixed c>0 and m_n=floor(c*ln n), does R(n,m_n) converge to tanh(1/(4c))?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Quantum thermodynamics experiments have a limited number of binary work probes, and need a quantitative design law rather than a certificate requiring all ranks. OP-988 concerns exact comparison, and OP-1727 concerns the loss for a specified family; neither determines the best placement of a fixed or dimension-dependent number of probes. The logarithmic regime predicts a continuum of nonzero limiting errors and an operational sample-size law: constant-quality universal certification requires logarithmically many well-spaced ranks. The fixed-budget statement quantifies how certification becomes nearly useless as dimension increases. Even granting OP-1727, these limits require optimizing over all integer rank sets and controlling the small-rank boundary and rounding. It moves OP-988 asks the number of fixed binary probes for exact thermomajorization; OP-1727 asks for the pointwise sharp missed-error formula for a given probe family; Meroi et al., arXiv:2610.35433, give the full-probe error. along quantitative: Optimize the fixed-probe family and determine the asymptotic minimax tradeoff between number of probes, system dimension and the amount of undetected conversion error.. Evidence: Experiment 28097 optimizes a discrete interval-gap model conditional on OP-1727: for c=1 and n=10^48, m=111, it gives 0.244855 versus tanh(1/4)=0.244919; for fixed m=1,2,3, the scaled deficit at n=10^24 is 1.587402,1.741077,1.810842 against predicted 1.587401,1.741101,1.811447. Experiment 28098 independently verifies exact integer gap maxima for all endpoints below 100 and dynamic-programming optima against brute-force placements for n<=10. Experiment 28063 solves the actual underlying linear programs for n<=12 and agrees on the tested optimal placements. The large-n results are conditional numerical evidence, not proofs.

In Lean: thermomajorization_full_budget_zero_error (partial), thermomajorization_minimax_error_antitone (partial), thermomajorization_optimal_nonadaptive_probe_budget_scaling (statement)

Not Yet Stated in Lean

900

Listed, but no Lean statement of the question yet.

OP-8 EFX for three agents with additive choresNot in LeanFair Division

There are $3$ agents and a finite set $M$ of $m$ indivisible chores. Agent $i$ has an additive cost function $c_i(S)=\sum_{e\in S}c_i(e)$ with $c_i(e)\ge 0$. An allocation is a partition $A=(A_1,A_2,A_3)$ of $M$ (all chores assigned). It is EFX for chores if for all agents $i\ne j$ and every chore $e\in A_i$, $c_i(A_i\setminus\{e\})\le c_i(A_j)$. Question: does every such 3-agent instance admit an EFX allocation? (Variant quantifying only over $e$ with $c_i(e)>0$ is equally open; with strictly positive costs they coincide.)

Posed in arXiv:2606.08872, Sec. 1 (introduction) and Sec. 6 (open problems); the n=3 gap is also the explicit frontier in arXiv:2609.10585 — EFX for Additive Chores: Nonexistence, Pareto Incompatibility, and Bi-Valued Existence

What is known

After the 2026 counterexample for every $n\ge 4$ (tri-valued costs, two agent types, three chore types; arXiv:2606.08872), three agents is the only remaining number of agents for which EFX existence under additive costs is undecided (two agents is easy by cut-and-choose). Known for $n=3$: all instances with $m\le 8$ chores (arXiv:2609.10585, SMT-verified); personalized bi-valued instances; EFX together with fractional Pareto optimality for bi-valued costs; instances with $m\le 2n$; two chore types. Approximate EFX results exist (e.g. arXiv:2410.18655). A small-$n$ question with a finite search frontier ($m=9$ next), so it is a natural target for computer-assisted search and Lean-checked certificates.

OP-9 Best universal approximation ratio for maximin share with additive goodsNot in LeanFair Division

There are $n$ agents $N=\{1,\dots,n\}$ and a finite set $M$ of $m$ indivisible goods. Agent $i$ has an additive valuation $v_i(S)=\sum_{g\in S} v_i(g)$ with $v_i(g)\ge 0$. An allocation is an ordered partition $A=(A_1,\dots,A_n)$ of $M$ (every good is allocated; bundles may be empty). The maximin share of agent $i$ is $\mu_i=\max_{(P_1,\dots,P_n)}\min_k v_i(P_k)$, the maximum over all partitions of $M$ into $n$ bundles. For $\alpha\in(0,1]$ an allocation is $\alpha$-MMS if $v_i(A_i)\ge\alpha\,\mu_i$ for every $i$. Let $\alpha^*$ be the supremum of $\alpha$ such that every instance (any $n$, $m$, additive $v$) admits an $\alpha$-MMS allocation. Question: determine $\alpha^*$; currently $7/9\le\alpha^*\le 20/21$.

Posed in arXiv:2208.08782, Sec. 5, Open Problem 5 — Fair Division of Indivisible Goods: Recent Progress and Open Questions

What is known

Exact MMS allocations need not exist for $n\ge 3$, so the right constant is a central question. Lower bounds: $3/4+3/3836$ (arXiv:2307.07304), $10/13$ (arXiv:2510.10423), and $7/9$ with an FPTAS for $7/9-\varepsilon$ (arXiv:2511.13056). Upper bounds: $39/40$ for three agents (arXiv:2104.04977), improved to $20/21$ with four agents and eleven goods, together with an asymptotic bound $1-\Omega((\log n)^{-2})$ (arXiv:2609.15085). The gap $[0.778, 0.952]$ remains wide.

OP-10 Best universal approximation ratio for maximin share with additive choresNot in LeanFair Division

There are $n$ agents and a finite set $M$ of indivisible chores; agent $i$ has an additive cost $c_i(S)=\sum_{e\in S}c_i(e)$ with $c_i(e)\ge 0$. An allocation partitions $M$ into $(A_1,\dots,A_n)$. The maximin share (for chores) is $\mu_i=\min_{(P_1,\dots,P_n)}\max_k c_i(P_k)$ over all partitions of $M$ into $n$ bundles. For $\beta\ge 1$ an allocation is $\beta$-MMS if $c_i(A_i)\le\beta\,\mu_i$ for all $i$. Let $\beta^*$ be the infimum of $\beta$ such that every instance admits a $\beta$-MMS allocation. Question: determine $\beta^*$; currently $31/30\le\beta^*\le 13/11$.

Posed in arXiv:1604.01435 — Approximation Algorithms for Max-Min Share Allocations of Indivisible Chores and Goods

What is known

The chores counterpart of OP-9, introduced in arXiv:1604.01435 (which showed exact MMS can fail for chores and gave a 2-approximation). Existence bound $13/11$ through a reduction to the MultiFit job-scheduling algorithm (arXiv:2302.04581), with better bounds for small $n$ ($15/13$ for $n=3$ there; $19/18$ for three agents in arXiv:2205.05363). Impossibility $44/43$ with three agents (arXiv:2104.04977), improved to $31/30$ with four agents and eleven chores, plus asymptotic $1+\Omega((\log n)^{-2})$ (arXiv:2609.15085).

OP-11 Maximin share approximation for three agents with additive goodsNot in LeanFair Division

Same model as the general MMS problem (see OP-9) with exactly $n=3$ agents: finite goods set $M$, additive $v_i\ge 0$, $\mu_i=\max$ over partitions of $M$ into 3 bundles of the minimum bundle value, and an allocation is $\alpha$-MMS if $v_i(A_i)\ge\alpha\mu_i$ for $i=1,2,3$. Let $\alpha_3^*$ be the largest $\alpha$ such that every 3-agent instance admits an $\alpha$-MMS allocation. Question: determine $\alpha_3^*$; currently $11/12\le\alpha_3^*\le 39/40$.

Posed in arXiv:2205.05363 — Improved maximin fair allocation of indivisible items to three agents

What is known

The smallest case where exact MMS can fail. The $11/12$ guarantee (arXiv:2205.05363) is shown best possible for a restricted kind of allocation (one prespecified agent gets her full proportional share), so improving it needs new ideas. The $39/40$ example (three agents, nine goods; arXiv:2104.04977) is proven to be the worst possible among instances with fewer than six more items than agents, so any better impossibility needs at least ten goods. With three agents the problem is small enough for computer-assisted search on the impossibility side.

OP-12 Polynomial-time computation of EF1 and Pareto-optimal allocations of goodsNot in LeanFair Division

There are $n$ agents $N=\{1,\dots,n\}$ and a finite set $M$ of $m$ indivisible goods. Agent $i$ has an additive valuation $v_i(S)=\sum_{g\in S} v_i(g)$ with $v_i(g)\ge 0$. An allocation is an ordered partition $A=(A_1,\dots,A_n)$ of $M$ (every good is allocated; bundles may be empty). Values are given as nonnegative integers (or rationals) in binary. An allocation is EF1 if for all $i\ne j$ with $A_j\ne\emptyset$ there is $g\in A_j$ with $v_i(A_i)\ge v_i(A_j\setminus\{g\})$, and Pareto optimal (PO) if no allocation $B$ has $v_i(B_i)\ge v_i(A_i)$ for all $i$ with strict inequality for some $i$. An EF1+PO allocation always exists (e.g. a maximum Nash welfare allocation). Question: is there an algorithm that outputs an EF1+PO allocation in time polynomial in $n$, $m$ and the bit length of the values?

Posed in arXiv:2208.08782, Sec. 3, Open Problem 1 — Fair Division of Indivisible Goods: Recent Progress and Open Questions

What is known

Existence follows from maximum Nash welfare ('The Unreasonable Fairness of Maximum Nash Welfare'), but computing that allocation is APX-hard. A market-based pseudo-polynomial algorithm finds EF1+PO (arXiv:1707.04731); polynomial time is known for a fixed number of agents (arXiv:2411.01810), for binary and other few-valued instances, and for EF1+fPO under extra structure. For chores, EF1+PO existence was settled in 2025 (arXiv:2507.09544), but only with polynomial time for constant $n$. A general polynomial algorithm, or evidence of hardness (e.g. PLS/PPAD), is open.

OP-13 EF1 and Pareto optimality for mixed goods and choresNot in LeanFair Division

There are $n$ agents and a finite set $M$ of indivisible items. Agent $i$ has an additive valuation $v_i(S)=\sum_{o\in S}v_i(o)$ with $v_i(o)\in\mathbb{R}$ of arbitrary sign (an item may be a good for one agent and a chore for another). An allocation is a partition $(A_1,\dots,A_n)$ of $M$. It is EF1 if for all $i\ne j$, either $v_i(A_i)\ge v_i(A_j)$ or there is an item $o\in A_i\cup A_j$ with $v_i(A_i\setminus\{o\})\ge v_i(A_j\setminus\{o\})$. It is Pareto optimal if no allocation $B$ has $v_i(B_i)\ge v_i(A_i)$ for all $i$ with strict inequality for some $i$. Question: does every such instance (for every $n\ge 3$) admit an allocation that is both EF1 and Pareto optimal?

Posed in arXiv:1807.10684 — Fair allocation of combinations of indivisible goods and chores

What is known

For goods, maximum Nash welfare gives EF1+PO; for chores, existence was proven only in 2025 by a fixed-point argument (arXiv:2507.09544). For mixed manna, EF1 alone is easy (a double round-robin) and EF1+PO is known for two agents (arXiv:1807.10684), but the general case is open, even for three agents. Partial progress: PO with introspective EF1 (arXiv:2509.18673) and PO with envy-freeness up to $n-1$ reallocations (arXiv:2507.03946). A positive answer would unify the goods and chores theories.

OP-14 Query complexity of envy-free cake cuttingNot in LeanFair Division

The cake is $[0,1]$. Each of $n$ agents has a valuation $v_i$: a nonatomic probability measure on $[0,1]$ (additive, $v_i([0,1])=1$, single points have measure 0). In the Robertson–Webb query model a protocol may ask $\mathrm{Eval}_i(x,y)=v_i([x,y])$ and $\mathrm{Cut}_i(x,\alpha)=$ some $y$ with $v_i([x,y])=\alpha$. It must output an allocation: disjoint pieces $A_1,\dots,A_n$, each a finite union of intervals, covering $[0,1]$, that is envy-free ($v_i(A_i)\ge v_i(A_j)$ for all $i,j$). Let $T(n)$ be the minimum, over protocols, of the worst-case number of queries. Question: is $T(n)$ bounded by a polynomial in $n$? More generally, determine the growth of $T(n)$.

Posed in arXiv:1604.03655 — A Discrete and Bounded Envy-Free Cake Cutting Protocol for Any Number of Agents

What is known

Bounded protocols were found only in 2015-16: four agents (arXiv:1508.05143, improved to about 171 queries in arXiv:1807.00317) and any $n$ with a tower of exponentials (arXiv:1604.03655). A later sharper analysis gave $n^{O(n^2)}$, and a September 2026 preprint claims $n^{O(1)}2^n$ (arXiv:2609.05191; not yet peer-reviewed). The only lower bound is $\Omega(n^2)$ ('Thou Shalt Covet Thy Neighbor's Cake'). Even for $n=4$ the exact query complexity is unknown. With connected pieces, exact envy-freeness cannot be reached by any finite protocol, and the connected approximate version is a separate open question (see OP-18).

OP-15 Best approximation factor for EFX with additive goodsNot in LeanFair Division

There are $n$ agents $N=\{1,\dots,n\}$ and a finite set $M$ of $m$ indivisible goods. Agent $i$ has an additive valuation $v_i(S)=\sum_{g\in S} v_i(g)$ with $v_i(g)\ge 0$. An allocation is an ordered partition $A=(A_1,\dots,A_n)$ of $M$ (every good is allocated; bundles may be empty). For $\alpha\in(0,1]$ an allocation is $\alpha$-EFX if for all $i\ne j$ and all $g\in A_j$, $v_i(A_i)\ge\alpha\,v_i(A_j\setminus\{g\})$. Let $\alpha^*$ be the supremum of $\alpha$ such that every instance (any $n$, $m$) admits an $\alpha$-EFX allocation. Currently $\varphi-1=(\sqrt5-1)/2\approx0.618\le\alpha^*\le 1$. Question: determine $\alpha^*$; in particular, does a $2/3$-EFX allocation (or any $\alpha>\varphi-1$) always exist for every $n$?

Posed in arXiv:2208.08782, Sec. 4.2, Open Problem 3 — Fair Division of Indivisible Goods: Recent Progress and Open Questions

What is known

Envy-cycle elimination gives $1/2$-EFX, and the golden-ratio bound $\varphi-1$ comes from combining round-robin with envy-cycle elimination ('Multiple Birds with One Stone: Beating 1/2 for EFX and GMMS via Envy Cycle Elimination', arXiv:1909.07650). $2/3$-EFX is known for at most seven agents, for valuations with at most three distinct values, and for multigraph instances (arXiv:2406.12413), and $(1-\varepsilon)$-EFX holds if a sublinear number of goods may stay unallocated (arXiv:2205.07638). If OP-7 were refuted, this question would become the main open problem about EFX.

OP-16 EFX together with Pareto optimality for positive additive goodsNot in LeanFair Division

There are $n\ge 3$ agents and a finite set $M$ of goods; agent $i$ has an additive valuation with strictly positive item values $v_i(g)>0$. An allocation $(A_1,\dots,A_n)$ partitions $M$. It is EFX if $v_i(A_i)\ge v_i(A_j\setminus\{g\})$ for all $i\ne j$ and $g\in A_j$, and Pareto optimal if no allocation $B$ has $v_i(B_i)\ge v_i(A_i)$ for all $i$ with strict inequality for some $i$. Question: does every such instance admit an allocation that is simultaneously EFX and Pareto optimal? (The case $n=3$, where EFX alone is known to exist, is already open.)

Posed in arXiv:1707.04769, Sec. 5 (Thm. 5.1) and concluding section — Almost Envy-Freeness with General Valuations

Reported solved in the literature; not yet checked in Lean.

What is known

With zero values EFX and PO can be incompatible even for two agents (arXiv:1707.04769), so strict positivity is the natural assumption; with it, EFX+PO holds for two agents via leximin. Known: bi-valued instances (EFX with fractional PO); two types of goods (arXiv:2601.03438). For chores the analog fails for every $n\ge 4$ even with positive bi-valued costs (arXiv:2606.08872), which raises the question of whether goods behave differently. A counterexample for $n=3$ would be a finite object, which makes this attractive for search plus Lean verification.

OP-17 Exact EFX with a sublinear number of unallocated goodsNot in LeanFair Division

There are $n$ agents $N=\{1,\dots,n\}$ and a finite set $M$ of $m$ indivisible goods. Agent $i$ has an additive valuation $v_i(S)=\sum_{g\in S} v_i(g)$ with $v_i(g)\ge 0$. A partial allocation is a tuple of pairwise disjoint bundles $X_1,\dots,X_n\subseteq M$; the unallocated goods form $P=M\setminus\bigcup_i X_i$. $X$ is EFX if $v_i(X_i)\ge v_i(X_j\setminus\{g\})$ for all $i\ne j$, $g\in X_j$, and no agent envies the pool if $v_i(X_i)\ge v_i(P)$ for all $i$. It is known that some EFX partial allocation with no envy toward the pool always has $|P|\le n-2$ (for $n\ge 2$). Question: is there a function $f(n)=o(n)$ such that every additive instance admits an EFX partial allocation with $|P|\le f(n)$ and no agent envying the pool?

Posed in arXiv:2208.08782, Sec. 4.2, Open Problem 4 — Fair Division of Indivisible Goods: Recent Progress and Open Questions

What is known

EFX with charity was introduced in arXiv:1902.04319, with the bound of $n-1$ unallocated goods in arXiv:1907.04596, improved to $n-2$ (arXiv:2102.10654; arXiv:2107.09901 for general monotone valuations). Through the rainbow-cycle-number connection, $(1-\varepsilon)$-EFX holds with sublinearly many unallocated goods ($\tilde O((n/\varepsilon)^{1/2})$, arXiv:2205.07638), but for exact EFX nothing sublinear is known. A positive answer to OP-7 would give $f\equiv0$, so this is a weaker stepping stone toward OP-7.

OP-18 Connected approximately envy-free cake cutting for five monotone agentsNot in LeanFair Division

The cake is $[0,1]$. Each of $n=5$ agents has a valuation $v_i$ assigning a value in $[0,1]$ to every interval $I\subseteq[0,1]$. It is monotone ($I\subseteq J\Rightarrow v_i(I)\le v_i(J)$), Lipschitz-continuous in the endpoints, and accessible only through value queries $v_i([a,b])$. A connected allocation is given by cut points $0\le x_1\le\dots\le x_4\le 1$, which form 5 consecutive intervals, together with a bijection assigning them to agents. It is $\varepsilon$-envy-free if $v_i(I_{\sigma(i)})\ge v_i(I_{\sigma(j)})-\varepsilon$ for all $i,j$. Such allocations always exist. Question: can one be found with $\mathrm{poly}(\log(1/\varepsilon))$ value queries, or is $\mathrm{poly}(1/\varepsilon)$ queries necessary?

Posed in arXiv:2311.02075, Sec. 'Open problems and future directions' — Envy-Free Cake-Cutting for Four Agents

What is known

For monotone valuations an efficient algorithm ($\mathrm{poly}(\log 1/\varepsilon)$ queries) was known for three agents ('Algorithmic Solutions for Envy-Free Cake Cutting', Operations Research 2012, which posed four or more agents as open), and arXiv:2311.02075 solved four agents. Without monotonicity the problem becomes PPAD-hard with $\mathrm{poly}(1/\varepsilon)$ query lower bounds for four agents (arXiv:2311.02075), and in 2026 also for three agents (arXiv:2606.13980). Five monotone agents is the next frontier, and it decides whether monotonicity keeps the problem tractable for every $n$.

OP-20 Optimal metric distortion of randomized ordinal voting rulesNot in LeanSocial Choice Theory

Voters $V$ ($|V|=n$) and candidates $C$ ($|C|=m$) lie in a common (pseudo)metric space $d$. Each voter reports a strict ranking of $C$ consistent with $d$ (if $d(v,a)<d(v,b)$ then $v$ ranks $a$ above $b$). A randomized ordinal rule $f$ maps each ranking profile $\sigma$ to a probability distribution over $C$. Social cost: $SC_d(c)=\sum_{v\in V} d(v,c)$. The distortion of $f$ is $\sup_{n,m,\sigma}\ \sup_{d \text{ consistent with } \sigma} \mathbb{E}_{c\sim f(\sigma)}[SC_d(c)] / \min_{c'} SC_d(c')$. Question: determine $\alpha^* = \inf_f \mathrm{dist}(f)$. Known: $2.1126 \le \alpha^* \le 2.13713$ (deterministic rules: optimal value is exactly 3).

Posed in arXiv:2111.03694 — Metric Distortion Bounds for Randomized Social Choice

What is known

A natural conjecture that randomized rules achieve distortion 2 was refuted by the lower bound approaching 2.1126 as the number of candidates grows ('Metric Distortion Bounds for Randomized Social Choice', arXiv:2111.03694). The first constant separation from 3 was 2.753 ('Breaking the Metric Voting Distortion Barrier', arXiv:2306.17838). In Aug-Sep 2026 the upper bound dropped rapidly: 5/2 ('An improved bound for the randomized metric distortion problem', arXiv:2608.17863), 2.1441 ('Improving Randomized Metric Distortion to 2.1441', arXiv:2608.29308), and 2.13713 ('Stable Voting Rules on the Edge of Optimal Metric Distortion', arXiv:2609.08259), within 0.025 of the lower bound. The exact optimum, and whether the lower-bound construction is tight, remain open. The m=3 case is resolved exactly in arXiv:2111.03694.

OP-21 Maximum size of a Condorcet domainNot in LeanSocial Choice Theory

A Condorcet domain on the alternative set $[n]=\{1,\dots,n\}$ is a set $D$ of linear orders on $[n]$ such that for every finite profile of voters with an odd number of voters, each voter's order taken from $D$, the pairwise strict-majority relation is transitive. Equivalently, for every three alternatives $a,b,c$, the restrictions of the orders in $D$ to $\{a,b,c\}$ satisfy a never-condition: some $x\in\{a,b,c\}$ and some position $p\in\{1,2,3\}$ such that $x$ never appears at position $p$ in any restriction. Let $f(n)$ be the maximum $|D|$. Questions: (a) determine $f(9)$ (known $492 \le f(9)$); (b) determine $\lim_{n\to\infty} f(n)^{1/n}$ (known to be at least $2.198139$ and finite).

Posed in arXiv:2601.07336, Introduction (exact maximum only known for n <= 8) — Improved lower bounds for the maximum size of Condorcet domains

What is known

The maximum size of acyclic sets of linear orders is a classical question going back to the early 1990s literature on Condorcet domains. Exact values are known only up to n=8, where f(8)=224 with a unique extremal domain ('The Largest Condorcet Domains on 8 Alternatives', arXiv:2303.15002). Heuristic and supercomputer searches ('New Record-Breaking Condorcet Domains on 10 and 11 Alternatives', arXiv:2303.06524; arXiv:2601.07336) give f(9)>=492, f(10)>=1104, f(11)>=2452 and an asymptotic lower bound Omega(2.198139^n). An exponential upper bound c^n is known but with an implicit constant that gives no realistic value, so the growth rate is wide open. The n=9 case is a finite but very large search.

OP-23 Do 2-approximately stable committees always exist?Not in LeanSocial Choice Theory

There are $n$ voters and a finite candidate set $C$ with unit weights; a committee is a subset $S\subseteq C$. Each voter $v$ has a complete transitive (weak) preference $\succeq_v$ over all subsets of $C$ that is monotone: $S_1\subseteq S_2 \Rightarrow S_2\succeq_v S_1$. Fix a size limit $K\ge1$. For $c\ge1$, a committee $S$ with $|S|\le K$ is $c$-approximately stable if for every committee $S'$ (of any size $K'=|S'|$), the number of voters who strictly prefer $S'$ to $S$ is strictly less than $c\,\frac{K'}{K}\,n$. ($c=1$ is the core.) Question: for every such instance, does a 2-approximately stable committee exist? It is known that $c$ cannot be below 2 in general, and that $c=32$ always suffices (16 when exactly stable lotteries exist).

Posed in arXiv:1910.14008, Sec. 5 (Open Questions), last bullet; companion question: exactly stable lotteries (first bullet) — Approximately Stable Committee Selection

What is known

Stability (core) is the strongest group-fairness notion for committee selection and covers participatory budgeting, facility location and ranking-based committee voting as special cases. Exactly stable committees can fail to exist (cyclic preferences), and Appendix A of arXiv:1910.14008 shows (2-eps)-stable committees may fail to exist even in the ranking setting with unit weights; the same paper proves an O(1) bound (32, improvable to 16 when exactly stable lotteries exist, e.g. ranking and approval settings via 'Group Fairness in Committee Selection', arXiv:1905.04438) and conjectures 2 is tight. In the approval special case the constant has been driven to 2 ('Sequential Phragmén Guarantees 2-Approximate Core Stability', arXiv:2609.29646) and an exact core is claimed (arXiv:2609.11912), so the open frontier is general monotone and ranking preferences. Related open question from the same section: does an exactly stable lottery exist for all monotone preferences (known only for K <= 3)?

OP-24 Maximum number of stable matchingsNot in LeanMatching & Market Design

A stable-marriage instance of size $n$ has $n$ men and $n$ women, each with a strict total order over all agents of the other side. A perfect matching is stable if no man-woman pair strictly prefer each other to their partners. Let $M(n)$ be the maximum, over all instances of size $n$, of the number of stable matchings. Since $M(a+b)\ge M(a)M(b)$, the limit $\beta=\lim_n M(n)^{1/n}$ exists. Question: determine $\beta$; known $2.28 \lesssim \beta \le 3.55$. In particular, is the classical lower-bound construction (base $\approx 2.28$) optimal?

Posed in arXiv:2011.00915, Introduction — At most 3.55^n stable matchings

What is known

One of the classical open questions on stable marriage from the 1970s literature. For decades the best upper bound was super-exponential; 'A Simply Exponential Upper Bound on the Maximum Number of Stable Matchings' (arXiv:1711.01032) gave c^n with a huge constant, and 'At most 3.55^n stable matchings' (arXiv:2011.00915) brought it to 3.55^n via an entropy method. The best lower bound, Omega(2.28^n), comes from a recursive construction for n a power of 2 and has stood since the 1980s. Exact M(n) is known only for small n.

OP-25 Approximately counting stable matchings (FPRAS)Not in LeanMatching & Market Design

Given a stable-marriage instance with $n$ men and $n$ women having complete strict preferences, let $\#SM$ be its number of stable matchings. Question: is there a fully polynomial randomized approximation scheme (FPRAS) for $\#SM$, i.e. a randomized algorithm that, given the instance and $\varepsilon>0$, outputs $Z$ with $\Pr[(1-\varepsilon)\#SM \le Z \le (1+\varepsilon)\#SM]\ge 3/4$ in time polynomial in $n$ and $1/\varepsilon$? This is equivalent (under approximation-preserving reductions) to the existence of an FPRAS for counting independent sets in bipartite graphs (#BIS); it is conjectured that none exists.

Posed in arXiv:1004.1836, Abstract / Introduction — The Complexity of Approximately Counting Stable Matchings

What is known

Exact counting is #P-complete (classical, 1980s). Stable matchings correspond bijectively to downsets (closed sets) of the rotation poset, and every finite poset arises this way, so approximate counting is #BIS-equivalent; 'The Complexity of Approximately Counting Stable Matchings' (arXiv:1004.1836) shows equivalence persists even in restricted attribute models and identifies easy special cases. Resolving it either way would settle the #BIS question, one of the central open problems in approximate counting.

OP-26 Is computing an exact Hylland–Zeckhauser equilibrium FIXP-hard?Not in LeanGeneral Equilibrium & Cooperative Games

A Hylland–Zeckhauser (HZ) market has $n$ agents and $n$ goods, each good with unit supply, and nonnegative utilities $u_{ij}$; every agent has budget 1. An HZ equilibrium is a price vector $p\in\mathbb{R}_{\ge0}^n$ and a fractional allocation $x\in[0,1]^{n\times n}$ with $\sum_j x_{ij}=1$ for each agent and $\sum_i x_{ij}=1$ for each good, such that each row $x_i$ maximizes $\sum_j u_{ij}y_j$ over $\{y\ge0: \sum_j y_j=1, \sum_j p_j y_j\le 1\}$ and, among maximizers, minimizes cost $\sum_j p_j y_j$. Equilibria always exist (by a fixed-point argument) but may be irrational. Question: is the problem of computing an exact HZ equilibrium FIXP-hard (hence FIXP-complete, since membership in FIXP is known)?

Posed in arXiv:2004.01348, Abstract and Sec. 1 ('We leave open the problem of determining if HZ is FIXP-hard') — Computational Complexity of the Hylland-Zeckhauser Scheme for One-Sided Matching Markets

What is known

The HZ scheme is the canonical pricing-based mechanism for one-sided matching with cardinal utilities. arXiv:2004.01348 shows equilibria can be irrational and puts the problem in FIXP; 'Computational Hardness of the Hylland-Zeckhauser Scheme' (arXiv:2107.05746) proves PPAD-hardness of computing approximate equilibria (even with 4-valued utilities), settling the approximate case, but leaves exact FIXP-completeness and the 3-valued-utility case open. 'Hardness of approximate Hylland-Zeckhauser equilibria' (arXiv:2606.00951, 2026) extends approximate hardness conditionally. The exact case remains open; few natural market problems are known to be FIXP-complete.

OP-27 Core of simple symmetric fractional hedonic games on bipartite graphsNot in LeanGeneral Equilibrium & Cooperative Games

Let $G=(N,E)$ be a finite simple undirected graph. In the associated simple symmetric fractional hedonic game, a partition $\pi$ of $N$ gives each player $i$ utility $u_i(\pi(i)) = |\{j\in \pi(i): \{i,j\}\in E\}| / |\pi(i)|$, where $\pi(i)$ is $i$'s block. A nonempty coalition $S\subseteq N$ blocks $\pi$ if $u_i(S) > u_i(\pi(i))$ for every $i\in S$; $\pi$ is in the core if no coalition blocks it. Question: if $G$ is bipartite, is the core always nonempty?

Posed in arXiv:1705.10116, Sec. 5.5 (Bipartite graphs) — Fractional Hedonic Games

What is known

For general simple symmetric fractional hedonic games the core can be empty (a 40-player example in arXiv:1705.10116) and deciding non-emptiness is computationally hard. Non-emptiness is known for graphs of maximum degree at most 2, forests, complete multipartite graphs, graphs of girth at least 5, bipartite graphs with a perfect matching, and regular bipartite graphs; the K_{4,10} example shows star-packing methods that work for girth >= 5 fail for bipartite graphs. Bipartite graphs (girth >= 4) are the natural boundary case. A counterexample would be a finite graph, so computer search plus Lean verification is plausible; a positive proof needs a new idea.

OP-28 Constant-Factor Truthful Mechanism for XOS/Submodular Combinatorial AuctionsNot in LeanMechanism Design & Auctions

There are $n$ bidders and a set $M$ of $m$ items. Each bidder $i$ has a private valuation $v_i:2^M\to\mathbb{R}_{\ge0}$ with $v_i(\emptyset)=0$. It is monotone and XOS, meaning $v_i(S)=\max_{\ell} \sum_{j\in S} a^{i}_{\ell j}$ for finitely many nonnegative additive clauses $a^i_\ell$. Submodular valuations are a special case. A mechanism learns about valuations only through value queries ($S\mapsto v_i(S)$) and demand queries (prices $p\in\mathbb{R}^M_{\ge0}\mapsto$ some $S\in\arg\max_S v_i(S)-\sum_{j\in S}p_j$). It may use at most $\mathrm{poly}(n,m)$ queries and computation. It outputs a partition of items to bidders and payments. It is universally truthful if it is a probability distribution over deterministic mechanisms in each of which truthful reporting is a dominant strategy for every bidder. Its approximation ratio is $\sup_{v} \mathrm{OPT}(v)/\mathbb{E}[\sum_i v_i(A_i)]$. Question: is there a universally truthful (or at least truthful-in-expectation) mechanism of this kind whose approximation ratio is $O(1)$, independent of $n$ and $m$? Equivalently, can truthful mechanisms match the constant-factor approximation that non-truthful polynomial-query algorithms achieve?

Posed in arXiv:2010.01420 — Improved Truthful Mechanisms for Subadditive Combinatorial Auctions: Breaking the Logarithmic Barrier

What is known

This is the central open problem on the price of truthfulness in combinatorial auctions. Without incentives, constant factors are easy: $1-1/e$ for XOS with demand queries. Truthful mechanisms went from $O(\log m\log\log m)$ and $O(\sqrt{\log m})$ to $O((\log\log m)^3)$ for submodular/XOS bidders (arXiv:1911.02716) and to $O((\log\log m)^3)$ for subadditive bidders (arXiv:2010.01420). With value queries alone, polynomially many queries provably cannot give better than an $m^{\Omega(1)}$ ratio (see the discussion in arXiv:1911.02716 and 'Limitations of randomized mechanisms for combinatorial auctions', arXiv:1109.1055). The demand-query case is wide open: no super-constant lower bound for truthful mechanisms is known, and no communication separation between truthful mechanisms and algorithms is known either.

OP-29 Optimal Truthful-in-Expectation Mechanism for Unrelated-Machine SchedulingNot in LeanMechanism Design & Auctions

There are $n$ machines and $m$ jobs. Machine $i$ privately knows its processing times $t_i=(t_{i1},\dots,t_{im})\in\mathbb{R}_{\ge0}^m$. A randomized mechanism maps a reported profile $t$ to a probability distribution over assignments $\sigma:[m]\to[n]$ and to payments $P_i(t)$. Machine $i$'s expected utility is $P_i(t)-\mathbb{E}_\sigma[\sum_{j:\sigma(j)=i} t_{ij}]$ when evaluated at its true times. The mechanism is truthful in expectation (TIE) if no machine can raise its expected utility by misreporting, whatever the others report. Its approximation ratio is $\rho=\sup_t \mathbb{E}_\sigma[\max_i \sum_{j:\sigma(j)=i} t_{ij}] / \mathrm{OPT}(t)$, where $\mathrm{OPT}(t)$ is the minimum makespan. Question: determine $\rho^*_{\mathrm{TIE}}(n)=\inf$ over TIE mechanisms of $\rho$. Is it bounded by a constant, or does it grow linearly in $n$? The case $n=2$ is also open: find the exact optimal ratio for two machines.

Posed in arXiv:2301.11905, Sec. 1.1 (Further related work) — A proof of the Nisan-Ronen conjecture

What is known

The deterministic Nisan–Ronen conjecture (ratio $n$) was proved in arXiv:2301.11905, so randomization is now the main open question in truthful scheduling. Known bounds: $2-1/n\le\rho^*_{\mathrm{TIE}}(n)\le (n+5)/2$, and fractional mechanisms achieve $(n+1)/2$. For universally truthful mechanisms, 'Universally truthful mechanisms for scheduling' (arXiv:2609.12621) shows a lower bound of $n/12-o(n)$ for discrete-support mechanisms and an upper bound of $n/2+o(n)$. That separates them from the TIE question, which is still open. For $n=2$ the bounds are $1.5$ and about $1.587$ ('Copula-based Randomized Mechanisms for Truthful Scheduling on Two Unrelated Machines', arXiv:1306.3909).

OP-30 Optimal Competitive Ratio for Prophet SecretaryNot in LeanOnline Algorithms

Let $X_1,\dots,X_n$ be independent nonnegative random variables with known distributions $F_1,\dots,F_n$. A uniformly random permutation $\pi$ is drawn and the values are revealed in the order $X_{\pi(1)},X_{\pi(2)},\dots$. After each value is revealed, an online algorithm must irrevocably either stop and receive that value or continue. It may use the distributions, the past values and the identities of the variables seen so far. Let $\alpha^*=\inf_{n,F_1,\dots,F_n}\sup_{\mathrm{ALG}} \mathbb{E}[\mathrm{ALG}]/\mathbb{E}[\max_i X_i]$. Question: determine $\alpha^*$. Known: $0.688\le\alpha^*\le 0.7235$.

Posed in arXiv:1507.01155 — Prophet Secretary

What is known

This is the canonical random-order prophet inequality. It sits between the adversarial-order prophet inequality, where $1/2$ is tight, and the i.i.d. case, where the constant $\approx0.745$ is tight. The original paper (arXiv:1507.01155) gave $1-1/e$. 'Prophet Secretary and Matching: the Significance of the Largest Item' (arXiv:2411.01191) gives $0.688$, beating the $0.675$ barrier for blind strategies. 'Prophet Inequalities: Separating Random Order from Order Selection' (arXiv:2304.04024) gives the upper bound $0.7235$. The gap is still about $0.035$.

OP-31 Free-Order (Order-Selection) Prophet Inequality ConstantNot in LeanOnline Algorithms

Let $X_1,\dots,X_n$ be independent nonnegative random variables with known distributions. Before any value is revealed, the gambler chooses a permutation $\pi$ (it may depend on the distributions). Values $X_{\pi(1)},X_{\pi(2)},\dots$ are then revealed one by one and the gambler stops irrevocably at most once, receiving the current value. Let $\beta^*=\inf_{n,F}\sup_{\pi,\tau}\mathbb{E}[X_{\pi(\tau)}]/\mathbb{E}[\max_i X_i]$, where $\tau$ ranges over stopping times. Let $\gamma\approx0.7451$ be the i.i.d. prophet constant: the unique $\gamma$ with $\int_0^1 \big(y(1-\ln y)+1/\gamma-1\big)^{-1}dy=1$. Then $\beta^*\le\gamma$. Question: is $\beta^*=\gamma$, i.e., is the worst case for free order attained by i.i.d. instances? Known: $0.7258\le\beta^*\le\gamma$.

Posed in arXiv:2204.01425 — Order Selection Prophet Inequality: From Threshold Optimization to Arrival Time Design

What is known

This is a natural and well-known question: does the power to choose the order fully recover the i.i.d. guarantee? 'Order Selection Prophet Inequality: From Threshold Optimization to Arrival Time Design' (arXiv:2204.01425) raised the lower bound from 0.669 to 0.725. 'Prophet Inequality: Order selection beats random order' (arXiv:2211.04145) gives 0.7258. 'Prophet Inequalities: Separating Random Order from Order Selection' (arXiv:2304.04024) shows random order is strictly worse (at most 0.7235). It is open whether $\beta^*$ equals $\approx0.745$.

OP-32 Exact Approximation Ratio of the Random-Offerer MechanismNot in LeanMechanism Design & Auctions

There is one seller with value $s\sim F_S$ and one buyer with value $b\sim F_B$, drawn independently with known distributions on $\mathbb{R}_{\ge0}$. In the seller-offering mechanism, the seller posts $p_S(s)\in\arg\max_p (p-s)(1-F_B(p))$ and trade happens iff $b\ge p_S(s)$. In the buyer-offering mechanism, the buyer posts $p_B(b)\in\arg\max_p (b-p)F_S(p)$ and trade happens iff $s\le p_B(b)$. The random-offerer mechanism (RO) runs each with probability $1/2$. Its gains from trade are $\mathrm{RO}=\mathbb{E}[(b-s)\mathbf 1_{\text{trade}}]$, and $\mathrm{FB}=\mathbb{E}[(b-s)^+]$. Question: determine $R^*=\sup_{F_S,F_B}\mathrm{FB}/\mathrm{RO}$. Known: $2.1728\lesssim R^*\le\pi$. Ties in the argmax may be broken in favour of trade.

Posed in arXiv:2111.03611 — Approximately Efficient Bilateral Trade

What is known

The second-best ratio is now settled at exactly $1/2$ ('Second-Best Bilateral Trade is 1/2 Efficient', arXiv:2606.03849). The tight constant for the simplest dominant-strategy, budget-balanced, IR mechanism is still unknown. The upper bound on $R^*$ went from $8.23$ (arXiv:2111.03611) to $3.15$ ('Improved Approximation to First-Best Gains-from-Trade', arXiv:2205.00140; also 'A Geometric Analysis of Gains from Trade', arXiv:2508.06469) to $\pi$ ('Tighter Bounds for the Random-Offerer Mechanism in Bilateral Trade', arXiv:2607.13959). Lower-bound instances give $2.0749$ ('A New Lower Bound for the Random Offerer Mechanism in Bilateral Trade using AI-Guided Evolutionary Search', arXiv:2603.08679) and about $2.1728$ (arXiv:2607.13959). This kind of question is well suited to explicit-instance certificates in Lean.

OP-33 Strong Matroid Secretary Conjecture (1/e for Every Matroid)Not in LeanOnline Algorithms

Let $M=(E,\mathcal I)$ be a matroid on $n$ elements with distinct (adversarial) weights $w:E\to\mathbb{R}_{>0}$. Elements arrive in a uniformly random order. On arrival of an element, the algorithm learns how it compares in weight with all previously arrived elements (ordinal model), or its weight. It may query independence of subsets of arrived elements and must irrevocably accept or reject it, keeping the accepted set in $\mathcal I$. Conjecture: for every matroid there is such an algorithm with $\mathbb{E}[w(\mathrm{ALG})]\ge \frac1e\, w(\mathrm{OPT})$. A stronger form asks that every element of the max-weight basis $\mathrm{OPT}$ is accepted with probability $\ge 1/e$. The constant $1/e$ would be best possible, as the rank-1 uniform matroid (classical secretary problem) shows.

Posed in Matroids, Secretary Problems, and Online Mechanisms (SODA 2007); restated as Conjecture 1.1 in arXiv:2609.19118, Conjecture 1.1 of arXiv:2609.19118 — Matroids, Secretary Problems, and Online Mechanisms

What is known

The constant-ratio matroid secretary conjecture was claimed resolved in September 2026 ('The Matroid Secretary Conjecture is True', arXiv:2609.14555, ratio $1/4$; improved to $1/3.1462$ in arXiv:2609.17782). The sharp constant $1/e$ is the remaining well-known target. 'On the Strong Matroid Secretary Conjecture and Beyond' (arXiv:2609.19118) and 'The Strong Secretary Conjecture is True for Linear Matroids' (arXiv:2609.20797) prove it for linear matroids. These cover graphic, regular and transversal matroids and gammoids. General matroids are open, and so are non-representable families such as sparse paving matroids.

OP-34 Polynomial-Time ε-Nash Equilibria for Bimatrix Games with ε < 1/3Not in LeanEquilibria in Games

A bimatrix game is a pair of matrices $A,B\in[0,1]^{n\times n}$ with rational entries. A pair of mixed strategies $(x,y)$ in the simplices $\Delta_n\times\Delta_n$ is an $\varepsilon$-Nash equilibrium if $x^\top A y\ge \max_i (Ay)_i-\varepsilon$ and $x^\top B y\ge \max_j (x^\top B)_j-\varepsilon$. Question: is there a constant $\varepsilon<1/3$ and a polynomial-time algorithm (in the bit size of $A,B$) that outputs an $\varepsilon$-Nash equilibrium of every bimatrix game?

Posed in arXiv:2204.11525 — A Polynomial-Time Algorithm for 1/3-Approximate Nash Equilibria in Bimatrix Games

Reported solved in the literature; not yet checked in Lean.

What is known

Computing exact Nash equilibria is PPAD-complete. Polynomial-time approximation progressed through $3/4, 1/2, 0.38, 0.36, 0.3393$, and then $1/3+\delta$ ('A Polynomial-Time Algorithm for 1/3-Approximate Nash Equilibria in Bimatrix Games', arXiv:2204.11525). On the hardness side, 'Settling the complexity of computing approximate two-player Nash equilibria' (arXiv:1606.04550) shows that, under ETH for PPAD, some small constant $\varepsilon$ needs $n^{\log^{1-o(1)}n}$ time. A quasi-polynomial algorithm exists for every constant $\varepsilon$. Whether $1/3$ is a natural barrier for polynomial time is open, and so is what the true threshold is.

OP-35 Query Complexity of Tarski Fixed Points on the GridNot in LeanEquilibria in Games

For $n,k\ge1$, let $L=[n]^k$ with the componentwise partial order, where $[n]=\{1,\dots,n\}$. TARSKI$(n,k)$ is the problem: given oracle access to a monotone map $f:L\to L$ ($x\le y\Rightarrow f(x)\le f(y)$), find some $x$ with $f(x)=x$. One exists by Tarski's theorem. Let $Q(n,k)$ be the deterministic query complexity (worst-case number of oracle calls). Questions: (a) is $Q(n,k)=O(\log^2 n)$ for every fixed $k$? In particular, is $Q(n,5)=O(\log^2 n)$? (b) Is $Q(n,k)\le \mathrm{poly}(k,\log n)$, i.e., with an exponent of $\log n$ independent of $k$? (c) In the white-box model, where $f$ is given by a Boolean circuit, can a fixed point be found in polynomial time?

Posed in arXiv:1909.03210 — Tarski's Theorem, Supermodular Games, and the Complexity of Equilibria

What is known

Tarski fixed points capture equilibria of supermodular games and several stochastic game problems, and lie in PLS ∩ PPAD. Known bounds: $Q(n,k)=\Theta(\log^2 n)$ for $k=2,3,4$. The $k=4$ case and the bound $O(\log^{\lceil (k-1)/3\rceil+1} n)$ for general $k$ are from 'The Mystery Deepens: On the Query Complexity of Tarski Fixed Points' (arXiv:2604.00268). The earlier $O(\log^{\lceil (k+1)/2\rceil}n)$ is from 'A faster algorithm for finding Tarski fixed points' (arXiv:2010.02618) and successors. The best lower bound is $\Omega(k\log^2 n/\log k)$, even for randomized algorithms ('Tarski Lower Bounds from Multi-Dimensional Herringbones', arXiv:2502.16679). Whether the complexity grows with dimension at all beyond the $k$ factor is open; the field calls this a mystery.

OP-36 Are Simple Stochastic Games Solvable in Polynomial Time?Not in LeanEquilibria in Games

A simple stochastic game (SSG) is a finite directed graph whose vertices are partitioned into MAX, MIN and AVERAGE vertices, plus two sink vertices, $0$-sink and $1$-sink. Every non-sink vertex has two out-edges. A token moves from a start vertex. MAX (resp. MIN) chooses the successor at MAX (resp. MIN) vertices, and at AVERAGE vertices the successor is chosen uniformly at random. MAX wins if the token reaches the $1$-sink. The value $v(u)$ is the probability that MAX wins from $u$ under optimal play. It exists, and positional (memoryless deterministic) optimal strategies exist. Question: is there a polynomial-time algorithm that, given an SSG and a vertex $u$, decides whether $v(u)>1/2$ (equivalently, computes all values exactly as rationals)?

Posed in The Complexity of Stochastic Games (Information and Computation 96(2), 1992) — The Complexity of Stochastic Games

What is known

This is a famous problem in NP ∩ coNP that is not known to be in P. Parity, mean-payoff and discounted games all reduce to it in polynomial time. The best algorithms are randomized subexponential ($2^{O(\sqrt n)}$) or fixed-parameter in the number of AVERAGE vertices. Strategy-improvement methods have exponential lower bounds. Stopping SSGs lie in UEOPL ('Unique End of Potential Line', arXiv:1811.03841). 'Reducing Stochastic Games to Semidefinite Programming' (arXiv:2411.09646) gives a polynomial reduction to SDP feasibility, but SDP feasibility is not known to be in P.

OP-37 Are Parity Games Solvable in Polynomial Time?Not in LeanEquilibria in Games

A parity game is a finite directed graph $G=(V,E)$ where every vertex has at least one successor. $V=V_0\sqcup V_1$ is partitioned between players Even and Odd, and there is a priority function $p:V\to\{0,\dots,d\}$. From a start vertex, the owner of the current vertex picks a successor, forever. The resulting infinite play is won by Even iff $\max\{p(v): v \text{ occurs infinitely often}\}$ is even. Parity games are positionally determined. Question: is there an algorithm that, given $(G,p)$ and a vertex $v$, decides which player has a winning strategy from $v$ in time polynomial in $|V|+|E|$ (with $d\le|V|$)?

Posed in Deciding Parity Games in Quasipolynomial Time (STOC 2017) — Deciding Parity Games in Quasipolynomial Time

What is known

This is the central open problem of infinite-duration games and the algorithmic core of μ-calculus model checking and LTL synthesis. It is in NP ∩ coNP and UP ∩ coUP. Since 2017 there have been quasi-polynomial algorithms ($n^{O(\log d)}$), e.g. 'An Ordered Approach to Solving Parity Games in Quasi Polynomial Time and Quasi Linear Space' (arXiv:1703.01296). 'Universal trees grow inside separating automata: Quasi-polynomial lower bounds for parity games' (arXiv:1807.10546) shows that every separating-automaton approach is inherently quasi-polynomial. A November 2025 preprint (arXiv:2511.03752) claims a polynomial algorithm, but it has not been validated by the community.

OP-38 Sylver Coinage After the Opening Move 16Not in LeanCombinatorial Games

Sylver coinage is a two-player game. Players alternately name a positive integer that is not a sum of nonnegative integer multiples of the integers named so far. The player who names $1$ loses. Equivalently, $1$ is excluded and a player with no other legal move loses. Every play is finite, so every position is either a first-player win (N) or a second-player win (P). Question: after the first player opens with $16$, does the player to move (the second player) have a winning reply? That is, is the position $\{16\}$ an N-position or a P-position? If it is N, which replies win?

Posed in Winning Ways for your Mathematical Plays (Vol. 3, 2nd ed.); also 'Unsolved Problems in Combinatorial Games' (Games of No Chance, MSRI Publ. 29, 1996) — Winning Ways for your Mathematical Plays

What is known

This is a famous prize problem in combinatorial game theory. All openings below $16$ have known outcomes, and every prime $p\ge5$ is a known winning opening (a classical theorem on 'ender' primes). The game has infinitely many options until the named set has gcd $1$, so plain search does not apply directly. Positions with gcd $1$ reduce to numerical semigroups with finitely many gaps. Recent computational campaigns (2025-2026) have certified hundreds of thousands of sub-positions under $\{16\}$, but they report that the opening remains undecided.

OP-39 Periodicity of Grundy's GameNot in LeanCombinatorial Games

In Grundy's game a position is a multiset of heap sizes. A move picks one heap of size $n$ and splits it into two nonempty heaps of different sizes $a+b=n$, $a\ne b$. A player with no move loses (normal play). The Grundy value of a single heap is $g(n)=\operatorname{mex}\{g(a)\oplus g(b): a+b=n,\ 1\le a<b\}$, where $\oplus$ is bitwise XOR and $g(1)=g(2)=0$. Question: is the sequence $g$ eventually periodic, i.e., are there $N$ and $p\ge1$ with $g(n+p)=g(n)$ for all $n\ge N$?

Posed in Winning Ways for your Mathematical Plays — Winning Ways for your Mathematical Plays

What is known

Grundy's game is the best-known test case for (non-)periodicity of impartial heap games. It is conjectured to be eventually periodic. Very long computations (the first $2^{35}$ values have been reported) show no period, but the values grow very slowly and show strong structure, e.g. almost all values are $0,1,2$ mod small patterns. No proof technique is known in either direction.

OP-40 Guy's Conjecture: Finite Octal Games Are Eventually PeriodicNot in LeanCombinatorial Games

A finite octal game is given by a code $0.d_1d_2\dots d_k$ with digits $d_j\in\{0,\dots,7\}$. On a position (a multiset of heaps), a move takes one heap of size $h$ and removes $j\le h$ tokens from it. The remainder $h-j$ is left as zero heaps if bit $1$ of $d_j$ is set (requires $h=j$). It is left as one nonempty heap if bit $2$ is set (requires $h>j$). It is left as two nonempty heaps $a+b=h-j$, $a,b\ge1$, if bit $4$ is set. Under normal play, the single-heap Grundy values are $G(h)=\operatorname{mex}$ of $G(h-j)$ (bit 2), of $0$ (bit 1, $h=j$) and of $G(a)\oplus G(b)$ (bit 4). Conjecture: for every finite octal code, the sequence $G$ is eventually periodic. The smallest unresolved examples include $0.007$.

Posed in Winning Ways for your Mathematical Plays; 'Unsolved Problems in Combinatorial Games' (Games of No Chance, MSRI Publ. 29, 1996) — Winning Ways for your Mathematical Plays

What is known

This is the central conjecture of impartial heap games. The octal periodicity theorem makes eventual periodicity checkable for a single game once a long enough periodic stretch is observed. Many octal games have been settled this way, but several small codes ($0.007$ and others) show no period after hundreds of millions of values. Proving it for even a single such game, or finding a non-periodic finite octal game, would be a landmark.

OP-41 Hex: Classify All Opening Moves on the 10×10 BoardNot in LeanCombinatorial Games

Hex on an $n\times n$ rhombic board of hexagonal cells: Black owns the top and bottom sides and White owns the left and right sides. Players alternately place a stone of their colour on an empty cell, with Black moving first. A player wins on forming a connected chain of their stones joining their two sides. Draws are impossible, and the first player wins on an empty board, by a non-constructive strategy-stealing argument. For each cell $c$, let $\mathrm{Win}_n(c)$ mean that Black, after opening at $c$, has a winning strategy (with White to move next and no swap rule). Question: determine $\mathrm{Win}_{10}(c)$ for all 100 cells $c$. More ambitiously, exhibit any explicit winning opening and strategy on the $11\times11$ board.

Posed in Scalable Parallel DFPN Search (Computers and Games 2013, LNCS 8427) — Scalable Parallel DFPN Search

What is known

Hex is the classical example of a game where strategy stealing proves a first-player win without a strategy. Every opening is solved for $n\le9$, while for $n=10$ only a handful are, including the centre. Nothing is known constructively for the standard $11\times11$ board. Progress is purely computational (proof-number search with virtual-connection and inferior-cell pruning), which makes certificate-checking in a proof assistant an interesting, if very large, target.

OP-42 The Sprouts ConjectureNot in LeanCombinatorial Games

Sprouts starts with $n$ spots in the plane. A move draws a simple curve joining two spots, or a spot to itself, that crosses no existing curve or spot. The player then places a new spot on the interior of the new curve. Each spot may be the endpoint of at most three curve-ends; a loop counts twice. A player unable to move loses (normal play). The game always ends within $3n-1$ moves. Conjecture: the first player has a winning strategy in $n$-spot Sprouts iff $n\equiv 3,4,5 \pmod 6$.

Posed in Computer Analysis of Sprouts (Carnegie Mellon Univ. tech. report CMU-CS-91-144, 1991); Winning Ways for your Mathematical Plays — Computer Analysis of Sprouts

What is known

This is a well-known conjecture about a famous topological game, and it is supported by massive computation. Outcomes are known for all $n\le62$ plus 27 larger cases up to $n=104$ ('Massively Parallel Proof-Number Search for Impartial Games and Beyond', arXiv:2511.10339), up from $n\le 44$ with a few sporadic larger values (earlier work, e.g. 'Computer analysis of Sprouts with nimbers', arXiv:1008.2320). There is no theoretical approach to the mod-6 pattern.

OP-74 Complexity of width-2 ReLU verificationNot in LeanNP-Completeness & Reductions

Let N : [0,1] → ℝ be a feedforward ReLU neural network with rational weights and biases where each hidden layer has width at most 2. Is the verification problem on [0,1]—deciding whether there exists x ∈ [0,1] such that N(x) = 0—NP-hard, or is it decidable in polynomial time? Concomitantly, is the discrete verification problem NP-hard: given such a width-2 network N and an integer n ≥ 1, deciding whether there exists x in DD_{1,3}^{(n)} := {∑_{i=1}^n a_i 4^{-i} : a_i ∈ {1,3}} such that N(x) = 0?

Posed in arXiv:2610.06092, Sec. 6 — Fractal Gadgets for Neural Networks: The Complexity of the Narrow Regime

What is known

The paper shows that ReLU verification is polynomial-time solvable at width 1, NP-complete at width 3 on the discrete encoding set DD_{1,3}^{(n)}, and NP-complete at width 4 on [0,1]. Width 2 is conjectured NP-hard but remains open in both the discrete and continuous settings.

OP-76 Polynomial-Time Approximate Nash Equilibria in Bimatrix Games with Error Below 0.3Not in LeanEquilibria in Games

Let A, B ∈ [0, 1]^{m × n} be rational payoff matrices for a two-player normal-form game. A mixed strategy profile (x, y) ∈ Δ_m × Δ_n is an ε-approximate Nash equilibrium if for all pure strategies i ∈ {1, ..., m}, e_iᵀ A y - xᵀ A y ≤ ε, and for all pure strategies j ∈ {1, ..., n}, xᵀ B e_j - xᵀ B y ≤ ε. Does there exist an absolute constant c < 0.3 and a deterministic or randomized algorithm that, given any such game and any rational δ > 0, outputs a (c + δ)-approximate Nash equilibrium in time polynomial in the game's bit length and 1/δ?

Posed in arXiv:2610.05317, Sec. 6, paragraph 3 — A Simple Algorithm Breaking the 1/3 Barrier for Approximate Nash Equilibria in Bimatrix Games

What is known

The paper achieves an approximation guarantee of ~0.30954 + δ, breaking the longstanding 1/3 barrier. In Section 6, the authors explicitly identify breaking 0.3 (a constant c < 0.3, typeset as 'c 0' in the text conversion) as the immediate open frontier where proof complexity became the main barrier.

OP-77 Existence of a Polynomial-Time Approximation Scheme for Bimatrix GamesNot in LeanEquilibria in Games

Does there exist a polynomial-time approximation scheme (PTAS) for Nash equilibria in bimatrix games? That is, for every fixed rational constant ε > 0, does there exist an algorithm that, given any two-player game with payoff matrices A, B ∈ [0, 1]^{m × n} with rational entries, computes an ε-approximate Nash equilibrium (x, y) ∈ Δ_m × Δ_n in time polynomial in the encoding size of (A, B)?

Proposed here, building on arXiv:2610.05317, Sec. 1, paragraph 2 — A Simple Algorithm Breaking the 1/3 Barrier for Approximate Nash Equilibria in Bimatrix Games; the paper does not ask it

What is known

The paper improves the best known polynomial-time approximation guarantee from 1/3 to 0.30954. A fundamental open question in algorithmic game theory mentioned in Section 1 is determining the infimum error achievable in polynomial time: does there exist a polynomial-time approximation scheme (PTAS) for approximate Nash equilibria in bimatrix games, or is there an absolute inapproximability lower bound ε₀ > 0 for polynomial-time algorithms?

OP-78 Complexity of maximizing Nash social welfare with two item typesNot in LeanFair Division

In the high-multiplicity fair division setting with additive nonnegative utilities and multiplicities encoded in binary, consider instances with q = 2 item types and an arbitrary number of agent types. Is the problem of computing an allocation of indivisible goods that maximizes the Nash social welfare NSW(x) = (∏_{i=1}^n u_i(x_i))^{1/n} solvable in polynomial time, or is the rational-threshold decision problem NP-hard?

Posed in arXiv:2610.04417, Sec. 7, paragraph 4 — Maximizing $p$-Mean Social Welfare in the High-Multiplicity Setting: Few Agent Types and Few Item Types

What is known

For all finite rational p < 1 with p ≠ 0, the authors prove that computing an optimal allocation is NP-hard with two item types (Theorem 1). For p = -∞ (egalitarian welfare), two item types is solvable in polynomial time (Theorem 8). For Nash welfare (p = 0), NP-hardness is proved for three item types (Theorem 2) and polynomial time for one item type (Theorem 7), leaving the case of two item types open.

OP-79 Tightness of exploration time lower bound for degree-bounded temporal graphsNot in LeanGraph Theory & Graph Algorithms

Let $\mathcal{G} = (G_t)_{t \ge 1}$ be a temporal graph on a finite vertex set $V$ of size $n$, where each snapshot $G_t = (V, E_t)$ is a simple connected undirected graph on $V$, and the underlying graph $U(\mathcal{G}) = (V, \bigcup_{t \ge 1} E_t)$ has maximum degree at most $\Delta$. A temporal walk of length $\ell$ from a start vertex $v^* \in V$ is a sequence $(v_1, \ldots, v_{\ell+1})$ in $V$ with $v_1 = v^*$ such that for every $t \in \{1, \ldots, \ell\}$, either $v_{t+1} = v_t$ or $\{v_t, v_{t+1}\} \in E_t$. It explores $\mathcal{G}$ if $\{v_1, \ldots, v_{\ell+1}\} = V$. Is the lower bound $\Omega(\Delta n (1 + \log(n/\Delta)))$ tight? That is, does there exist an absolute constant $C > 0$ such that every always-connected temporal graph on $n$ vertices with underlying maximum degree at most $\Delta$ can be explored from any start vertex in at most $C \cdot \Delta n (1 + \ln(n / \Delta))$ time steps? In particular, for constant $\Delta = O(1)$, can every always-connected temporal graph of maximum degree at most $\Delta$ be explored in $O(n \log n)$ time steps?

Posed in arXiv:2610.06228, Sec. 8 — Hiding a Vertex from the Temporal Explorer: A Lower Bound for Degree-Bounded Temporal Graphs

OP-81 Degree-dependent exploration lower bound under two moves per time stepNot in LeanGraph Theory & Graph Algorithms

Consider temporal graph exploration in the two-moves-per-step model: at each time step $t \ge 1$, an agent at vertex $v_t$ may traverse a path of length at most 2 in snapshot $G_t$ to reach $v_{t+1}$ (that is, $v_{t+1}$ is at graph distance at most 2 from $v_t$ in $G_t$). An exploration is complete when every vertex in $V$ has been visited at the start or intermediate vertex of some step. For always-connected temporal graphs on $n$ vertices with underlying maximum degree at most $\Delta$, does any lower bound on exploration time with linear (or super-constant) dependence on $\Delta$ survive? That is, does there exist a constant $c > 0$ such that for arbitrarily large $n$ and $\Delta$, some always-connected temporal graph requires $\Omega(\Delta n)$ (or $\Omega(f(\Delta) n)$ for some $f(\Delta) = \omega(1)$) time steps to explore under two moves per step, or can every such temporal graph be explored in $o(\Delta n)$ (or $O(n \log n)$) steps?

Posed in arXiv:2610.06228, Sec. 7, under "Several moves per time step" — Hiding a Vertex from the Temporal Explorer: A Lower Bound for Degree-Bounded Temporal Graphs

OP-82 Explicit polynomial-size robust subspace designs for all dimensionsNot in LeanCombinatorics for TCS

For positive integers $k \le n$, an operator-norm bounded family of linear maps $Q_1, \ldots, Q_m: \mathbb{C}^n \to \mathbb{C}^k$ (with $\|Q_i\|_{\mathrm{op}} \le 1$) is a $(k, \eta, \Delta)$-weak robust subspace design if for every $k$-dimensional subspace $W \subseteq \mathbb{C}^n$, at most $\Delta$ indices $i \in [m]$ satisfy $\sigma_{\min}(Q_i|_W) \le \eta$, where $\sigma_{\min}(Q_i|_W) = \inf_{w \in W, \|w\|=1} \|Q_i w\|$. Does there exist an explicit (deterministic polynomial-time or logspace-uniform) construction that, given $n$ and $1 \le k \le n$, outputs a $(k, \eta, \Delta)$-weak robust subspace design $\mathcal{Q}_{n,k} = \{Q_1, \ldots, Q_m\}$ with entries in $\mathbb{Q}(i)$ such that the size $m \le n^{c}$ and the robustness $\eta \ge n^{-c}$ for some universal constant $c > 0$, with $\Delta \le m - 1$?

Posed in arXiv:2610.06302, Sec. 1.6 — Robust subspace designs and the power of a unique small quantum witness

What is known

The paper shows that a random family of $O(k(n-k)\log(nk))$ Gaussian matrices achieves inverse-polynomial robustness $\eta = \Theta(1/\sqrt{nk})$ with high probability. However, its explicit deterministic construction based on sketching and coordinate projections has size $O(n^4 k^{O(k)})$, which is polynomial only when $k = O(\log n / \log \log n)$. Derandomizing this to an explicit polynomial-size construction for all $1 \le k \le n$ would derandomize quantum witness isolation from randomized logspace to deterministic logspace.

OP-83 Truthful polynomial-communication mechanism beating 1/2 for two XOS valuationsNot in LeanMechanism Design & Auctions

Consider a two-bidder combinatorial auction on a set $M$ of $m$ items, where each bidder $i \in \{1, 2\}$ has an XOS valuation $v_i : 2^M \to \mathbb{R}_{\ge 0}$, meaning $v_i(S) = \max_{k \in K_i} \sum_{e \in S} a_{k, e}^{(i)}$ for a finite collection of nonnegative additive supporting clauses $a_k^{(i)}$. Does there exist a constant $\varepsilon > 0$ and an individually rational, no-negative-transfers truthful (ex-post Nash or dominant-strategy incentive-compatible) mechanism using at most $\operatorname{poly}(m)$ bits of communication that attains expected social welfare at least $(1/2 + \varepsilon) \max_{S \subseteq M} (v_1(S) + v_2(M \setminus S))$ on every pair of XOS valuations $(v_1, v_2)$?

Posed in arXiv:2610.06773, Sec. 5, Two-Bidder Settings — The Hardness of Dominant Strategy Mechanism Design, Revisited

OP-84 Tight deterministic DSIC approximation ratio for XOS combinatorial auctionsNot in LeanMechanism Design & Auctions

For an auction with $m$ items and parameter $\gamma \in [\log m, m]$, let $\mathsf{DSIC_{XOS}}(m, \gamma)$ denote the best social welfare approximation ratio attainable by a deterministic, individually rational, no-negative-transfers DSIC mechanism using at most $2^\gamma$ communication when bidders have XOS valuations. The paper proves a lower bound $\mathsf{DSIC_{XOS}}(m, \gamma) = \Omega((m/\gamma)^{1/5})$. Is the true optimal approximation ratio $\mathsf{DSIC_{XOS}}(m, \gamma) = \tilde{\Theta}((m/\gamma)^{1/2})$, matching the known bound for maximal-in-range truthful mechanisms, or can deterministic DSIC mechanisms achieve an approximation ratio $o((m/\gamma)^{1/2})$?

Posed in arXiv:2610.06773, Sec. 5, Beyond Reductions to Simultaneous Lower Bounds — The Hardness of Dominant Strategy Mechanism Design, Revisited

OP-88 Universal Constant for General-to-Internal Collage System ConversionNot in LeanAutomata & Formal Languages

Let $\Sigma$ be a finite alphabet. A collage system $\mathcal{C}$ over $\Sigma$ is an acyclic sequence of nonterminal definitions $X_1, \dots, X_m$, where each nonterminal $X_i$ is defined by exactly one rule of the following types: 1. an atomic character: $X_i \to a$ for $a \in \Sigma$; 2. a concatenation: $X_i \to Y Z$ where $Y, Z \in \{X_1, \dots, X_{i-1}\}$; 3. a repetition: $X_i \to Y^r$ with integer $r > 2$ and $Y \in \{X_1, \dots, X_{i-1}\}$; 4. a substring truncation: $X_i \to Y[b..e)$ with $1 \le b < e \le |\langle Y \rangle| + 1$ and $Y \in \{X_1, \dots, X_{i-1}\}$, where $\langle Y \rangle$ is the string derived by $Y$. The size of $\mathcal{C}$ is $|\mathcal{C}| = m$. The string generated by $\mathcal{C}$ is $\langle X_m \rangle$. A nonterminal $X_j$ is structurally reachable from $X_m$ if there is a directed path from $X_m$ to $X_j$ in the dependency graph consisting exclusively of concatenation and repetition edges (truncation edges $X \to Y[b..e)$ do not expose $Y$). A collage system is internal if every nonterminal $X_1, \dots, X_m$ is structurally reachable from $X_m$. For a nonempty string $T \in \Sigma^+$, let $c(T)$ denote the minimum size of a collage system generating $T$, and let $\widehat{c}(T)$ denote the minimum size of an internal collage system generating $T$. Can the universal conversion constant 5 be strictly reduced? That is, does there exist a constant $C < 5$ such that for all nonempty strings $T$, $\widehat{c}(T) \le C \cdot c(T)$?

Posed in arXiv:2610.04520, Sec. 7, para. 2 — A Factor-5 Conversion to Internal Collage Systems

What is known

The paper proves an upper bound of $5m$ (and more precisely $4m+a-b$, where $a$ is the number of original truncation rules and $b$ is the breaker count) for converting an arbitrary collage system of size $m$ into an equivalent internal collage system. The proof intentionally allows worst-case helper charges to each lineage, suggesting that a tighter accounting could further reduce the constant.

OP-91 Logarithmic Undirected Multiple-Unicast Coding GapNot in LeanInformation Theory & Coding

Let $g(n)$ denote the maximum ratio of network coding throughput to fractional multicommodity flow throughput among all undirected multiple-unicast instances on $n$-vertex graphs. Is $g(n) = \Theta(\log n)$? Specifically, does there exist an absolute constant $C > 0$ such that $g(n) \ge C \log n$ for all sufficiently large $n$?

Proposed here, building on arXiv:2610.10108, Cor. 1.2 — The Multiple Unicast Conjecture is False; the paper does not ask it

What is known

Corollary 1.2 proves that the undirected multiple-unicast coding gap is $\Omega((\log n)^\varepsilon)$ for some constant $\varepsilon > 0$, by combining the 182-vertex counterexample with known graph-product amplification methods. Meanwhile, standard multicommodity flow-cut bounds establish an upper bound of $O(\log n)$. The paper leaves open the exact asymptotic order of the undirected coding gap, and in particular whether it can match the upper bound $\Theta(\log n)$.

OP-92 Linear Dimension Dependence of Fictitious Play Convergence Rates Without TiesNot in LeanEquilibria in Games

Let n ≥ 2 be an integer. For an n x n payoff matrix A of a two-player zero-sum game, consider simultaneous fictitious play where after an initial move, every subsequent best response for each player is unique. Does there exist a constant c > 0 such that for arbitrarily large n, there exists an n x n matrix A and an initial action with unique subsequent best responses along the trajectory such that the duality gap satisfies Gap_A(x_t/t, y_t/t) = Ω(t^{-c/n}) as t → ∞?

Proposed here, building on arXiv:2610.08768, Remark 1.4 — Arbitrarily Slow Polynomial Convergence of Fictitious Play; the paper does not ask it

What is known

The paper constructs games of dimension n_k = (k+1)^2 - 5 with convergence rate Theta(t^{-1/k}), which gives an exponent of order Theta(1/sqrt(n)) in terms of the number of actions n. On the other hand, the classic upper bound of Shapiro (1958) establishes that the duality gap on any n x n matrix decays as O(t^{-1/(2n-2)}), i.e., with rate exponent at least 1/(2n-2). While an adversarial tie-breaking rule can achieve rate Theta(t^{-1/n}) on the n x n identity matrix (as shown in 2014), it remains open whether this linear dimension dependence Theta(1/n) in the rate exponent can be achieved with unique best responses (or any fixed tie-breaking rule), or whether the Theta(1/sqrt(n)) scaling achieved by the recursive clock construction is optimal.

OP-93 Linear-exponent resolution lower bound for multiplier associativityNot in LeanProof Complexity

Let $\mathsf{Assoc}_n$ be the unsatisfiable CNF formula encoding the associativity of $n$-bit multiplication under a strip-local multiplier encoding (such as the standard array multiplier or Wallace-tree multiplier). Does there exist an absolute constant $c > 0$ such that for all sufficiently large $n$, every resolution refutation of $\mathsf{Assoc}_n$ requires size at least $2^{c n}$?

Posed in arXiv:2610.08988, Sec. 10, para. 3 — Associativity of Multiplication Is Hard for Resolution

What is known

The paper proves a resolution size lower bound of 2^{Ω((n/log n)^{1/4})} by embedding an m-vertex bipartite expander matching instance into n = O(m^4 log m) bits. A linear exponent 2^{Ω(n)} would match the maximal hardness possible for resolution on formulas with O(n) or O(n^2) variables.

OP-94 Proof complexity of multiplier associativity in Cutting Planes and Polynomial CalculusNot in LeanProof Complexity

Let $\mathsf{Assoc}_n$ be the CNF formula encoding the associativity of $n$-bit multiplication under a strip-local multiplier architecture. Does $\mathsf{Assoc}_n$ require super-polynomial (or exponential) size refutations in Cutting Planes (CP), and in Polynomial Calculus with Resolution (PCR) over any field $\mathbb{F}$?

Posed in arXiv:2610.08988, Sec. 10, para. 4 — Associativity of Multiplication Is Hard for Resolution

What is known

Word-level associativity admits O(n^2)-length polynomial calculus proofs, but extracting bit-level equalities from word-level equalities is known to require exponentially many monomials. The paper's reduction from bipartite expander matching fails to give lower bounds for Cutting Planes or Polynomial Calculus because the matching principle has small proofs in both systems.

OP-95 Tight resolution lower bound for multiplier commutativity and distributivityNot in LeanProof Complexity

Let $\mathsf{Comm}_n$ and $\mathsf{Dist}_n$ be the CNF formulas encoding the negation of commutativity $\mathbf{x}\mathbf{y} = \mathbf{y}\mathbf{x}$ and distributivity $\mathbf{x}(\mathbf{y}+\mathbf{z}) = \mathbf{x}\mathbf{y} + \mathbf{x}\mathbf{z}$ for $n$-bit multipliers, respectively. Does every resolution refutation of $\mathsf{Comm}_n$ (and $\mathsf{Dist}_n$) require size $\Omega(n^6 \log n)$?

Posed in arXiv:2610.08988, Sec. 10, para. 6 — Associativity of Multiplication Is Hard for Resolution

What is known

Upper bounds of size O(n^6 log n) in resolution were previously established for commutativity and distributivity of multiplication. Proving a matching Ω(n^6 log n) lower bound would show that CDCL solvers inherently require high-degree polynomial time even on these degree-two identities.

OP-96 Polynomial-Time (8/17)-Approximation for Submodular Maximization under a Matroid ConstraintNot in LeanSubmodular & Combinatorial Optimization

Let α* be the supremum of approximation ratios α ∈ [0, 1] for which there exists a randomized polynomial-time algorithm in the value-oracle model that, given an independence oracle for a matroid M = (N, ℐ) and a value oracle for an arbitrary non-negative submodular function f : 2^N → ℝ_{≥ 0}, outputs an independent set S ∈ ℐ such that 𝔼[f(S)] ≥ α · max_{T ∈ ℐ} f(T). Is α* = 8/17? Equivalently, does there exist, for every ε > 0, a polynomial-time value-oracle algorithm achieving an (8/17 - ε)-approximation for non-negative submodular maximization subject to a matroid constraint?

Proposed here, building on arXiv:2610.07387, Theorem 1.1 — Stronger Hardness for Submodular Maximization Subject to a Matroid Constraint; the paper does not ask it

What is known

Theorem 1.1 proves that in the value-oracle model, no polynomial-time (or sub-exponential time) algorithm can achieve an approximation ratio exceeding 8/17 for maximizing a non-negative submodular function subject to a matroid constraint (even for cardinality or simplified partition constraints). This improves the 2011 inapproximability bound of approximately 0.478. The current best known polynomial-time algorithm (STOC 2024) achieves an approximation ratio of 0.401. This leaves a gap between 0.401 and 8/17 ≈ 0.471. It is open whether 8/17 is the true approximability threshold, i.e., whether an (8/17 - ε)-approximation can be achieved in polynomial time.

OP-99 Polynomial-time (4/3 + ε)-approximation for weighted 3-set packingNot in LeanApproximation & Inapproximability

Let an instance of Maximum Weighted $3$-Set Packing consist of a finite ground set $U$, a family $\mathcal{S}$ of subsets of $U$ with $|S| \le 3$ for each $S \in \mathcal{S}$, and a weight function $w : \mathcal{S} \to \mathbb{Q}_{>0}$. A packing is a collection $A \subseteq \mathcal{S}$ of pairwise disjoint sets, and an optimum packing $O$ maximizes $\sum_{S \in O} w(S)$. Does there exist, for every fixed $\varepsilon > 0$, a deterministic polynomial-time algorithm that computes a packing $A$ satisfying $\sum_{S \in O} w(S) \le (4/3 + \varepsilon) \sum_{S \in A} w(S)$?

Proposed here, building on arXiv:2610.10036, Thm 1.1 — Breaking the $\sqrt{3}$ Barrier for Maximum Weighted $3$-Set Packing; the paper does not ask it

What is known

The best polynomial-time approximation ratio for unweighted 3-Set Packing is 4/3 + ε. The present work improves the ratio for weighted 3-Set Packing from sqrt(3) ≈ 1.732 to 1.6908, breaking the squared-weight local search barrier. The known NP-hardness lower bound is only 95/94 ≈ 1.0106. Whether weighted 3-Set Packing can match the 4/3 ratio of the unweighted case remains open.

OP-101 Explicit 3-tensors with border rank exceeding 3nNot in LeanAlgebraic & Lattice-Based Complexity

Does there exist a polynomial-time explicit family of tensors $T_n \in (\mathbb{C}^n)^{\otimes 3}$ whose border rank satisfies $\underline{\mathrm{R}}(T_n) > 3n$ for all sufficiently large $n$, or more generally satisfies $\underline{\mathrm{R}}(T_n) \ge c n$ for some constant $c > 3$? Here, a tensor family $(T_n)_{n \ge 1}$ is polynomial-time explicit if each entry of $T_n$ is an integer computable in binary in time polynomial in $n$.

Posed in arXiv:2610.08504, Sec. 1.2, open question (i) — Explicit tensors beyond the linear flattening barrier

OP-102 Comb inequality separation at extreme points of the subtour elimination polytopeNot in LeanInteger & Polyhedral Optimization

Let $n \ge 3$ be an integer, and let $K_n = (V, E)$ be the complete undirected graph on $n$ vertices. The subtour elimination polytope $\operatorname{SEP}(n) \subset \mathbb{R}^E$ is the set of vectors $x = (x_e)_{e \in E}$ satisfying: (1) $x_e \ge 0$ for all $e \in E$; (2) $\sum_{e \in \delta(\{v\})} x_e = 2$ for all $v \in V$, where $\delta(S) = \{\{u,w\} \in E : u \in S, w \notin S\}$; (3) $\sum_{e \in \delta(S)} x_e \ge 2$ for all non-empty proper subsets $S \subsetneq V$. A point $x^* \in \operatorname{SEP}(n)$ is an extreme point (vertex) of $\operatorname{SEP}(n)$ if it cannot be written as a convex combination $\lambda x_1 + (1 - \lambda) x_2$ of two distinct points $x_1, x_2 \in \operatorname{SEP}(n)$ with $\lambda \in (0, 1)$. A comb inequality is specified by a handle $H \subsetneq V$ ($H \ne \emptyset$) and an odd integer $s \ge 3$ together with pairwise disjoint subsets $T_1, \dots, T_s \subset V$ (teeth) such that for each $i \in \{1, \dots, s\}$, $T_i \cap H \ne \emptyset$ and $T_i \setminus H \ne \emptyset$. The comb inequality requires $\sum_{e \in \delta(H)} x_e + \sum_{i=1}^s \sum_{e \in \delta(T_i)} x_e \ge 3s + 1$. The decision problem asks: given $n$ and an extreme point $x^*$ of $\operatorname{SEP}(n)$ with rational coordinates (encoded in binary), does there exist a comb inequality violated by $x^*$? Is this decision problem NP-complete (and the corresponding exact separation problem NP-hard), or is it solvable in polynomial time?

Posed in arXiv:2610.09065, Sec. 4 — Separating comb inequalities is NP-hard

What is known

The paper resolves the complexity of separating comb inequalities in the general case by showing NP-completeness for half-integral points in SEP(n) with support graph of maximum degree 4. However, in branch-and-cut TSP solvers, separation is called on optimal vertices (extreme points) of the LP relaxation. The construction in the reduction does not guarantee that the constructed fractional point is an extreme point of SEP(n), leaving the complexity on extreme points open.

OP-106 Universal upper bound of 3 for fractional majority coloring of digraphsNot in LeanGraph Theory & Graph Algorithms

Let $D = (V, E)$ be a finite loopless directed graph. A subset $S \subseteq V$ is called majority-stable if for every vertex $v \in S$, $|N^+_D(v) \cap S| \le \lfloor d^+_D(v) / 2 \rfloor$, where $N^+_D(v) = \{u \in V : (v, u) \in E\}$ and $d^+_D(v) = |N^+_D(v)|$. The fractional majority coloring number $\chi^*_{\mathrm{maj}}(D)$ is the minimum of $\sum_{S \in \mathcal{S}(D)} w_S$ over nonnegative weights $w_S \ge 0$ covering every vertex, i.e., $\sum_{S \in \mathcal{S}(D) : v \in S} w_S \ge 1$ for all $v \in V$, where $\mathcal{S}(D)$ is the family of majority-stable subsets of $V$. Does every finite loopless directed graph $D$ satisfy $\chi^*_{\mathrm{maj}}(D) \le 3$?

Posed in arXiv:2610.11997, Sec. 7, paragraph 2 — Fractional majority coloring of digraphs: bounds and inapproximability

OP-107 Fractional majority coloring bound of 8/3 for digraphs without terminal directed trianglesNot in LeanGraph Theory & Graph Algorithms

Let $D = (V, E)$ be a finite loopless directed graph. A strongly connected component $K \subseteq V$ of $D$ is terminal if there is no arc from $K$ to $V \setminus K$. Suppose $D$ contains no terminal strongly connected component isomorphic to the directed triangle $C_3$ (the directed 3-cycle). Does $D$ satisfy $\chi^*_{\mathrm{maj}}(D) \le 8/3$?

Posed in arXiv:2610.11997, Sec. 7, paragraph 3 — Fractional majority coloring of digraphs: bounds and inapproximability

OP-108 Universal upper bound of 3 for fractional majority coloring of tournamentsNot in LeanGraph Theory & Graph Algorithms

Let $T = (V, E)$ be a finite tournament, meaning a finite loopless directed graph such that for every pair of distinct vertices $u, v \in V$, exactly one of $(u, v) \in E$ or $(v, u) \in E$ holds. Does every finite tournament $T$ satisfy $\chi^*_{\mathrm{maj}}(T) \le 3$?

Proposed here, building on arXiv:2610.11997, Sec. 7, after paragraph 2 — Fractional majority coloring of digraphs: bounds and inapproximability; the paper does not ask it

What is known

The paper proves that every tournament has fractional majority coloring number at most 45927/13820 < 3.324 (Theorem 10), improving previous bounds. For general digraphs, the directed triangle achieves value 3, which is also a tournament. Thus 3 is a candidate sharp universal bound for tournaments.

OP-109 Bermond--Thomassen conjecture for disjoint directed cyclesNot in LeanGraph Theory & Graph Algorithms

For every positive integer $k$, does every finite simple loopless directed graph $D$ with minimum out-degree at least $2k - 1$ contain $k$ pairwise vertex-disjoint directed cycles?

Posed in arXiv:2610.11517, Conjecture 1.1 — An asymptotic bound for the Bermond--Thomassen Conjecture

What is known

The Bermond--Thomassen conjecture has been a central open problem in digraph theory since 1981. This paper proves it asymptotically with out-degree 2k + O(k^{3/4} (log k)^{1/2}), but the exact bound 2k - 1 remains open for all k ≥ 4.

OP-111 Additive constant gap for disjoint directed cyclesNot in LeanGraph Theory & Graph Algorithms

Does there exist an absolute integer constant $C$ such that for every positive integer $k$, every finite simple loopless directed graph $D$ with minimum out-degree at least $2k + C$ contains $k$ pairwise vertex-disjoint directed cycles?

Proposed here, building on arXiv:2610.11517, Thm 1.2 — An asymptotic bound for the Bermond--Thomassen Conjecture; the paper does not ask it

What is known

Theorem 1.2 resolves the leading coefficient of the Bermond--Thomassen conjecture by showing that minimum out-degree 2k + O(k^{3/4} (log k)^{1/2}) suffices for all sufficiently large k. However, the paper leaves open whether the sublinear error term can be reduced to an absolute constant C independent of k, which would show f(k) ≤ 2k + C. The authors mention in their discussion that an attempt to obtain an explicit linear bound 2k + C was unsuccessful.

OP-112 Asymptotic Edge Density of 3-Uniform Hypergraphs with Bipartite Links Exceeding 0.251Not in LeanCombinatorics for TCS

Let π be the supremum of all α ≥ 0 such that for every ε > 0 and all sufficiently large integers n, there exists a 3-uniform hypergraph H on n vertices whose vertex link graphs are all bipartite and whose number of hyperedges satisfies |H| ≥ (α - ε) * (n choose 3). Is π ≥ 0.251?

Proposed here, building on arXiv:2610.11642, Theorem 1.2 — A counterexample to the Erdős--Sós bipartite-link conjecture; the paper does not ask it

What is known

The paper disproves the bipartite-link conjecture by constructing a 3-uniform hypergraph family with asymptotic edge density at least 1/4 + 25/70150556 ≈ 0.250000356, strictly surpassing 1/4. On the other hand, the best known upper bound established via flag algebras (doi:10.1017/S0963548312000508) is 0.258295. The true asymptotic maximum edge density is completely open, and closing the gap to 0.251 remains open.

OP-113 Linear Berge saturation for finite families of graphsNot in LeanGraph Theory & Graph Algorithms

Let $k \geq 2$ be an integer, and let $\mathcal{F}$ be a finite nonempty family of finite simple graphs, each having at least one edge. A $k$-uniform hypergraph $H$ is a Berge-$F$ (for a graph $F$) if there exists an injection $\psi : E(F) \to E(H)$ such that $e \subseteq \psi(e)$ for every $e \in E(F)$. A $k$-uniform hypergraph $H$ is Berge-$\mathcal{F}$-free if it contains no Berge-$F$ as a subhypergraph for any $F \in \mathcal{F}$. A $k$-uniform hypergraph $H$ on $n$ vertices is Berge-$\mathcal{F}$-saturated if $H$ is Berge-$\mathcal{F}$-free, but for every hyperedge $e \in \binom{V(H)}{k} \setminus E(H)$, the hypergraph obtained by adding $e$ contains a Berge-$F$ for some $F \in \mathcal{F}$. The saturation number $\mathrm{sat}_k(n, \text{Berge-}\mathcal{F})$ is the minimum number of edges in a Berge-$\mathcal{F}$-saturated $k$-uniform hypergraph on $n$ vertices. Does there exist a constant $C = C(\mathcal{F}, k)$ such that $\mathrm{sat}_k(n, \text{Berge-}\mathcal{F}) \leq C n$ for all $n \geq 1$?

Posed in arXiv:2610.11409, Conjecture 1.1 — A linear upper bound for Berge saturation numbers

What is known

The paper proves the single-graph case of this conjecture (Theorem 1.2), but the general case for families of two or more forbidden graphs remains open.

OP-114 Hamilton cycle threshold for digraph connectivity in terms of two-cycle independence numberNot in LeanGraph Theory & Graph Algorithms

Let D be a finite simple digraph without loops. Let alpha_2(D) be the maximum size of a vertex set containing no directed 2-cycle in D, and let kappa(D) be the vertex strong-connectivity of D. If kappa(D) >= alpha_2(D) + 1, does D necessarily contain a directed Hamilton cycle? Equivalently, is f_2(a) <= a + 1 for all integers a >= 1, where f_2(a) is the minimum k such that every k-strongly connected digraph with alpha_2(D) <= a has a Hamilton cycle?

Posed in arXiv:2610.10292, Sec. 1, paragraph 7 — A near-linear Chvátal--Erdős condition for Hamilton cycles in digraphs

What is known

The classical Chvátal--Erdős theorem states that an undirected graph with vertex-connectivity at least its independence number is Hamiltonian. The directed analogue remains open; this paper provides the first near-linear bound but does not settle the linear bound f_2(a) <= a + 1.

OP-115 Classification of graphs H with finitely many vertex-critical (2P3, H)-free graphsNot in LeanGraph Theory & Graph Algorithms

Let $H$ be a simple undirected graph. Characterize all graphs $H$ such that for every integer $k \ge 1$, the class of $(2P_3, H)$-free graphs contains only finitely many non-isomorphic $k$-vertex-critical graphs, where $2P_3$ is the disjoint union of two paths of length 2 (on 3 vertices each), and a graph $G$ is $k$-vertex-critical if its chromatic number is $k$ but every proper induced subgraph has chromatic number strictly less than $k$.

Posed in arXiv:2610.10737, Open Problem 4.2 — Obstructions to $k$-colouring $H$-free graphs

OP-116 Finiteness of vertex-critical (2P3, K3)-free graphsNot in LeanGraph Theory & Graph Algorithms

For every integer $k \ge 1$, are there only finitely many non-isomorphic $k$-vertex-critical $(2P_3, K_3)$-free graphs? That is, for each $k \ge 1$, does there exist an upper bound $N(k)$ such that every $k$-vertex-critical graph containing neither an induced $2P_3$ nor an induced triangle $K_3$ has at most $N(k)$ vertices?

Proposed here, building on arXiv:2610.10737, Sec. 4, after Open Problem 4.2 — Obstructions to $k$-colouring $H$-free graphs; the paper does not ask it

What is known

Theorem 1.3 establishes that P4 + \ell P1 is the unique maximal forbidden induced subgraph for finiteness of k-vertex-critical H-free graphs for all k >= 5. In Open Problem 4.2, the authors ask to characterize graphs H for which (2P3, H)-free graphs admit only finitely many k-vertex-critical graphs for all k. Excluding triangles K3 is the classic first test case (as in (P7, K3)-free graphs, which were recently shown to have only three 4-vertex-critical graphs). Settling whether H = K3 admits finitely many k-vertex-critical graphs for all k is the natural starting point for Open Problem 4.2.

OP-117 Elementary bound on the order of vertex-critical (P4 + P1)-free graphsNot in LeanGraph Theory & Graph Algorithms

Does there exist an absolute constant $C > 0$ such that for every integer $k \ge 5$, every $k$-vertex-critical $(P_4 + P_1)$-free graph has at most $2^{C k}$ vertices?

Proposed here, building on arXiv:2610.10737, Sec. 3, after Claim 3.6 — Obstructions to $k$-colouring $H$-free graphs; the paper does not ask it

What is known

The proof of Theorem 1.3 bounds the order of any k-vertex-critical (P4 + \ell P1)-free graph using hypergraph Ramsey numbers R = R^(\ell+1)_{2^{\ell(k-1)}}((k-1)\ell+2). Consequently, the resulting upper bound on the maximum order of such a critical graph is non-elementary (a tower of exponentials). For \ell = 0 (cographs), the only k-vertex-critical graph is K_k of order k. For \ell = 1, it remains open whether the astronomical hypergraph Ramsey bound can be replaced by an elementary (e.g. single exponential) bound in k.

OP-118 Exact value of the maximum oriented diameter for graphs of diameter dNot in LeanGraph Theory & Graph Algorithms

For each integer d >= 2, let f(d) denote the smallest integer such that every finite connected bridgeless simple graph of diameter d admits a strong orientation of directed diameter at most f(d). Is f(d) = ceil(d^2 / 2) + d for all integers d >= 2?

Proposed here, building on arXiv:2610.09648, Theorem 1.1 — An asymptotically tight bound on oriented diameter; the paper does not ask it

What is known

The paper proves that ceil(d^2/2) + d <= f(d) <= ceil(d^2/2) + d + 18 for every d >= 2, establishing the exact quadratic coefficient (1/2) and linear coefficient (1). However, it leaves untouched the exact additive constant, leaving a gap of at most 18 between the known lower bound ceil(d^2/2) + d and the new upper bound ceil(d^2/2) + d + 18. Determining whether the lower bound is always tight or finding the exact additive term is the ultimate question left open by this line of work.

OP-120 Sublinear Minimum Edge Completion for Consecutive Cycle SumsNot in LeanCombinatorics for TCS

Let $n \in \mathbb{N}$ with $n \ge 3$. Let $C_n$ denote the standard cycle graph on vertices $\{1, \ldots, n\}$ with edges $(i, i+1)$ for $1 \le i < n$ and $(n, 1)$. For a graph $G$ on $\{1, \ldots, n\}$ containing $C_n$ as a subgraph, a subset $S \subseteq \{1, \ldots, n\}$ is called connected if the induced subgraph $G[S]$ is connected. Define the sum of $S$ by $S^* = \sum_{v \in S} v$. The graph $G$ is called complete if every integer $k \in \{1, \ldots, n(n+1)/2\}$ can be written as $S^*$ for some connected subset $S$ of $G$. Let $\text{mEC}(n)$ denote the minimum number of additional edges $|E(G) \setminus E(C_n)|$ such that $G$ is complete. For every integer $a \ge 1$, does there exist an integer $N_a$ such that for all $n \ge N_a$, $\text{mEC}(n) \le n / a$? (Equivalently, does $\text{mEC}(n) = o(n)$ as $n \to \infty$?)

Posed in arXiv:2610.08889, Sec. 5, after Proposition 1 — Consecutive Cycle Sums

What is known

The paper proves mEC(n) <= n/2 - 1 for n >= 8 via Proposition 1 and notes that the inductive argument appears extendable to n/a for any integer a >= 1 given an appropriate base case, but leaves open whether mEC(n) is indeed sublinear (o(n)) in n.

OP-122 Asymptotic Density of Missing Consecutive Cycle SumsNot in LeanCombinatorics for TCS

Let $C_n$ be the cycle graph with vertices labeled $1, \ldots, n$ in consecutive clockwise order, and let $T_n = n(n+1)/2$. An arc sum is the sum of vertex labels on a contiguous path in $C_n$. Let $\mathcal{M}_n = \{1, \ldots, T_n\} \setminus \{A^* : A \text{ is an arc of } C_n\}$ be the set of missing sums on the $n$-cycle. Does the asymptotic density of missing sums $\lim_{n \to \infty} \frac{|\mathcal{M}_n|}{T_n}$ exist, and if so, what is its value?

Proposed here, building on arXiv:2610.08889, Sec. 3, before Lemma 2 — Consecutive Cycle Sums; the paper does not ask it

What is known

The paper proves that the set of missing sums on the standard n-cycle is nonempty for n = 6 and all n >= 8. Lemma 3 establishes an asymptotic lower bound of order (ln 2) T_n on standard-sum non-achievable numbers, showing that missing sums constitute a positive fraction of [1, T_n]. However, the paper leaves open the exact characterization of which sums are missing and the exact asymptotic proportion of missing values.

OP-124 Minimum order of regular triangle-distinct graphsNot in LeanGraph Theory & Graph Algorithms

For an integer $k \ge 15$, does there exist a finite simple $2k$-regular triangle-distinct graph on strictly fewer than $4k + 2$ vertices? More generally, for each $r \ge 9$, what is the minimum order $N(r)$ of an $r$-regular triangle-distinct graph?

Proposed here, building on arXiv:2610.08478, Theorem 1.2 — Regular $K_3$-Irregular Graphs of Every Regularity at Least Nine; the paper does not ask it

What is known

The paper establishes that for every integer k >= 15, there exists a 2k-regular triangle-distinct graph on 4k + 2 vertices (order 2r + 2), and complementation yields a (2k+1)-regular triangle-distinct graph of the same order (order 2r). Trivial degree constraints rule out orders <= r + 3, but the exact minimum order required for an r-regular triangle-distinct graph is unknown.

OP-125 Hajós conjecture on cycle decompositions of Eulerian graphsNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite simple graph on $n$ vertices in which every vertex has even degree (an Eulerian graph). Can the edge set of $G$ always be partitioned into at most $\lfloor(n-1)/2\rfloor$ edge-disjoint simple cycles?

Posed in arXiv:2610.07840, Sec. 7, paragraph 1 — A proof of the Erdős--Gallai cycle decomposition conjecture

OP-126 Gallai path decomposition conjecture for connected graphsNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a connected finite simple graph on $n$ vertices. Can the edge set of $G$ always be partitioned into at most $\lceil n/2\rceil$ edge-disjoint simple paths?

Posed in arXiv:2610.07840, Sec. 1, paragraph 4 — A proof of the Erdős--Gallai cycle decomposition conjecture

OP-127 Existence of near-closed robust sublinear expanders in light graphsNot in LeanGraph Theory & Graph Algorithms

Let $h(d) = \max\{1, \log_2^2 d\}$ and let $w_G(v) = 1/(d_G(v) h(d_G(v)))$ for any finite graph $G$ without isolated vertices. A graph $G$ is called light if every cycle $C$ satisfies $\sum_{v \in V(C)} w_G(v) < 1$. Does there exist $\delta_0 > 0$ and parameters $\eta > 0, s \ge 0$ such that every light graph $G$ with minimum degree $\delta(G) \ge \delta_0$ contains a nonempty induced subgraph $G[S]$ that is both an $(\eta, s)$-expander (in the sense that $|N_{G[S]-E'}(X)| \ge \eta |X| / \log^2 |S|$ for all $1 \le |X| \le 2|S|/3$ and $|E'| \le s|X|$) and near-closed in $G$ (at least $|S|/50$ vertices of $S$ have at most two neighbors outside $S$ in $G$)?

Posed in arXiv:2610.07840, Sec. 7, paragraph 2 — A proof of the Erdős--Gallai cycle decomposition conjecture

OP-128 Exact Hilton-Milner bound in (j, p)-norm for k ≥ 4 and n > 2kNot in LeanCombinatorics for TCS

Let $k \\ge 4$ and $1 \\le j \\le k-1$ be integers, and let $p > 1$ be a real number. For every integer $n > 2k$ and every nontrivial intersecting family $\\mathcal{F} \\subset \\binom{[n]}{k}$, does the inequality $\\sum_{J \\in \\binom{[n]}{j}} d_{\\mathcal{F}}(J)^p \\le \\sum_{J \\in \\binom{[n]}{j}} d_{\\mathcal{H}(n,k)}(J)^p$ hold, with equality if and only if $\\mathcal{F} \\cong \\mathcal{H}(n,k)$? Here $\\mathcal{H}(n,k) = \\{F \\in \\binom{[n]}{k} : 1 \\in F, \\, F \\cap [2, k+1] \\neq \\emptyset\\} \\cup \\{[2, k+1]\\}$.

Proposed here, building on arXiv:2610.12433, Theorem 6 — The Hilton-Milner theorem in the $\ell_2$-norm; the paper does not ask it

What is known

The paper proves an exact Hilton-Milner bound in the ℓ₂-norm for all n > 2k (Theorem 5), and an asymptotic Hilton-Milner bound in the (j, p)-norm for n ≥ n₀(k, p, j) (Theorem 6), as well as an exact bound for k=3 for all n ≥ 7 (Proposition 7). However, for k ≥ 4 and general (j, p), it leaves open whether the exact upper bound cojp(F) ≤ cojp(H(n,k)) holds for all n > 2k.

OP-129 Extremal nontrivial intersecting families in (j, p)-norm at n = 2kNot in LeanCombinatorics for TCS

Let $k \\ge 4$ and $1 \\le j \\le k-1$ be integers, and let $p > 1$ be a real number. For $n = 2k$, what is the maximum value of $\\sum_{J \\in \\binom{[2k]}{j}} d_{\\mathcal{F}}(J)^p$ among all nontrivial intersecting families $\\mathcal{F} \\subset \\binom{[2k]}{k}$, and is the unique maximizer isomorphic to $\\binom{[2k-1]}{k}$?

Proposed here, building on arXiv:2610.12433, Theorem 5 — The Hilton-Milner theorem in the $\ell_2$-norm; the paper does not ask it

What is known

Theorem 5 determines that when n = 2k, the codegree squared sum (ℓ₂-norm) of any nontrivial intersecting family is maximized uniquely by the complement of a star, binom([2k-1], k). For the general (j, p)-norm, the paper's techniques establish asymptotic bounds for large n, leaving the boundary case n = 2k completely open.

OP-130 Inclusion of cycle-maximal graphs in edge-extremal graphs at the Turán remainder boundaryNot in LeanGraph Theory & Graph Algorithms

Let $r \ge 3$ be an integer. Define the linear coefficient $\gamma_r$ by $\gamma_3 = 5/18$, $\gamma_4 = 7/32$, and $\gamma_r = 2/(2r+1)$ for $r \ge 5$. Let $T_{n,r}$ denote the complete $r$-partite Turán graph on $n$ vertices with $t_r(n) = e(T_{n,r})$ edges. A finite family of graphs $\mathcal{H}$ with chromatic number $\chi(\mathcal{H}) = r+1$ is called a boundary family if its extremal number satisfies $\operatorname{ex}(n, \mathcal{H}) = t_r(n) + \gamma_r n + O(1)$ as $n \to \infty$. Characterize the boundary families $\mathcal{H}$ for which every cycle-maximal $\mathcal{H}$-free graph is edge-extremal for all sufficiently large $n$, that is, $\operatorname{CEX}(n, \mathcal{H}) \subseteq \operatorname{EX}(n, \mathcal{H})$ for all large $n$.

Posed in arXiv:2610.12109, Sec. 6, third paragraph — Sharp linear Turán remainders for cycle and edge extremality

OP-131 Additive Turán remainder threshold for cycle-maximality in 3-chromatic graphsNot in LeanGraph Theory & Graph Algorithms

Let $H$ be a fixed graph with chromatic number $\chi(H) = 3$. Suppose that for all sufficiently large $n$, the extremal number satisfies $\operatorname{ex}(n, H) \le t_2(n) + 1$, where $t_2(n) = \lfloor n^2/4 \rfloor$. Must every cycle-maximal $H$-free graph on $n$ vertices be edge-extremal for all sufficiently large $n$, that is, $\operatorname{CEX}(n, H) \subseteq \operatorname{EX}(n, H)$? More generally, what is the maximum integer $c \in \{0, 1, 2, 3\}$ such that $\operatorname{ex}(n, H) \le t_2(n) + c$ implies $\operatorname{CEX}(n, H) \subseteq \operatorname{EX}(n, H)$ for all large $n$?

Proposed here, building on arXiv:2610.12109, Proposition B.2 — Sharp linear Turán remainders for cycle and edge extremality; the paper does not ask it

What is known

The paper proves in Appendix B that for $r=2$, no positive linear coefficient $\gamma > 0$ guarantees $\operatorname{CEX}(n, H) \subseteq \operatorname{EX}(n, H)$, and constructs an explicit 3-chromatic graph $H_2$ on 27 vertices with $\operatorname{ex}(n, H_2) = t_2(n) + 4$ such that $\operatorname{EX}(n, H_2) \cap \operatorname{CEX}(n, H_2) = \varnothing$ for all large odd $n$. However, it leaves open whether the inclusion holds for smaller additive constants $c \in \{1, 2, 3\}$. Determining the discrete additive threshold for 3-chromatic graphs is the natural next step.

OP-133 Expressiveness of Unambiguous Cactus AutomataNot in LeanAutomata & Formal Languages

Does every regular language admit an unambiguous finite automaton (an ε-free NFA in which every accepted word has a unique accepting run) whose transition graph is a bipartite cactus? If not, which subclass of regular languages is characterized by unambiguous bipartite cactus NFAs?

Proposed here, building on arXiv:2610.11717, Thm 1.1, Sec. 4 — Every Regular Language Has a Bipartite Cactus Automaton; the paper does not ask it

What is known

The paper proves that every regular language has an epsilon-free NFA with a bipartite cactus transition graph, heavily exploiting nondeterminism and state duplication. In Section 4, the authors suggest investigating restrictions forced by the cactus property in deterministic, unambiguous, and finitely ambiguous automata. For deterministic automata, planarity is already known to strictly restrict the class of recognizable languages (Book and Chandra, 1976). Whether unambiguous finite automata (where every accepted word has a unique accepting run) can recognize all regular languages with a bipartite cactus transition graph remains untouched and open.

OP-136 Polynomial versus Polylogarithmic Word Separation by Permutation AutomataNot in LeanAutomata & Formal Languages

Let \operatorname{Sepp}(n) denote the maximum over all pairs of distinct binary words u, v \in \{0, 1\}^* of length at most n of the minimum number of states in a deterministic finite automaton whose input letters act as permutations on the state set that separates u and v. Does there exist a constant \varepsilon > 0 such that \operatorname{Sepp}(n) = \Omega(n^\varepsilon) as n \to \infty, or is \operatorname{Sepp}(n) = (\log n)^{O(1)}?

Proposed here, building on arXiv:2610.11098, Section 1 — An Improved Lower Bound for Separating Words by Permutation Automata; the paper does not ask it

What is known

Robson (1996) proved an upper bound of O(\sqrt{n}) for separating length-n words by permutation automata. The present paper improves the lower bound from (3/2 - o(1)) log n (Bulatov et al., arXiv:1609.03199) to \Omega(\log n \log \log n). A substantial gap remains between this polylogarithmic lower bound and the O(\sqrt{n}) upper bound, leaving completely open whether the true complexity is polynomial n^{\Omega(1)} or polylogarithmic (\log n)^{O(1)}.

OP-137 Positive Binary Symmetric Group Identities of Maximum Element Order ScaleNot in LeanAutomata & Formal Languages

For each integer k \ge 1, let \mathfrak{S}_k be the symmetric group on k elements, and let \ell_{+,2}(k) be the minimum common length of a pair of distinct words u, v \in \{0, 1\}^* such that u(\sigma_0, \sigma_1) = v(\sigma_0, \sigma_1) for every pair of permutations \sigma_0, \sigma_1 \in \mathfrak{S}_k. Does there exist a constant C > 0 such that \log \ell_{+,2}(k) \le C \sqrt{k \log k} for all sufficiently large k?

Proposed here, building on arXiv:2610.11098, Section 5.1 — An Improved Lower Bound for Separating Words by Permutation Automata; the paper does not ask it

What is known

Theorem 1.2 constructs positive binary identities of \mathfrak{S}_k of length \exp(O(k / \log k)). In Section 5.1, the authors note that the maximum element order in \mathfrak{S}_k is Landau's function M(k) = \exp((1+o(1))\sqrt{k \log k}), and that any numerical identity has length at least M(k)/2. Constructing positive binary identities of length M(k)^{O(1)} = \exp(O(\sqrt{k \log k})) would achieve the conjectured optimal numerical identity length and yield the improved lower bound \operatorname{Sepp}(n) = \Omega((\log n)^2 / \log \log n).

OP-138 Bounded-depth minimal unique substring certificates for optimal string attractors in uniformly morphic wordsNot in LeanCombinatorics for TCS

Let $\phi \colon \Sigma^* \to \Sigma^*$ be a non-erasing uniform morphism over a finite alphabet $\Sigma$ generating an infinite fixed point $w = \phi(w)$, with finite prefixes $w_n = \phi^n(a)$ for $a \in \Sigma$. Let $\gamma(w_n)$ denote the minimum size of a string attractor of $w_n$. For $d \ge 1$, let $\mathcal{C}_n^{[d]} = \bigcup_{j=0}^{d-1} \operatorname{MUS}(w_{n-j})$ denote the candidate certificate of minimal unique substrings of the $d$ most recent generations, where each factor is evaluated by its coverage in the ambient word $w_n$. Does there exist a constant $d \in \mathbb{N}$, depending only on $\phi$, such that for all sufficiently large $n$, every subset $\Gamma \subseteq [1, |w_n|]$ with $|\Gamma| = \gamma(w_n)$ is a string attractor of $w_n$ if and only if $\Gamma \cap \operatorname{Cov}_{w_n}(x) \neq \varnothing$ for every factor $x \in \mathcal{C}_n^{[d]}$?

Posed in arXiv:2610.10950, Sec. 9.3 — Smallest String Attractors and Minimal Coverage Certificates of Thue--Morse Words

What is known

The paper establishes that for the Thue-Morse words $t_n$, three consecutive source generations of minimal unique substrings ($\operatorname{MUS}(t_n) \cup \operatorname{MUS}(t_{n-1}) \cup \operatorname{MUS}(t_{n-2})$) are necessary and sufficient to certify all minimum-cardinality string attractors for all $n \ge 6$. The authors note that the proof template relies on recognizability and occurrence-transport, raising the question whether a uniform bound on the generation depth $d$ exists for other standard morphic word families.

OP-139 Eventual constancy of the count of minimum string attractors for uniform binary morphismsNot in LeanCombinatorics for TCS

Let $\phi \colon \{0,1\}^* \to \{0,1\}^*$ be a non-trivial uniform morphism, and let $w_n = \phi^n(0)$ for $n \ge 1$. Suppose that the minimum string attractor size $\gamma(w_n)$ is eventually constant, i.e., there exist $\gamma_0 \in \mathbb{N}$ and $n_0 \in \mathbb{N}$ such that $\gamma(w_n) = \gamma_0$ for all $n \ge n_0$. Does the number of smallest string attractors $|\mathcal{A}(w_n)| = |\{\Gamma \subseteq [1, |w_n|] : |\Gamma| = \gamma_0 \text{ and } \Gamma \text{ is an attractor of } w_n\}|$ eventually stabilize to a constant value for all sufficiently large $n$?

Proposed here, building on arXiv:2610.10950, Sec. 9.1 — Smallest String Attractors and Minimal Coverage Certificates of Thue--Morse Words; the paper does not ask it

What is known

For Thue-Morse words, the minimum attractor size is known to be 4 for all $n \ge 4$, and this paper shows that the number of smallest attractors $|\mathcal{A}(t_n)|$ is 87 for $n=4$, 40 for $n=5$, and exactly 32 for every $n \ge 6$. The geometric explanation in Section 9.1 is that recursive boundary pairs become separated and scale uniformly without creating new combinatorial choices. A similar stabilization occurs for Fibonacci words and period-doubling words. It is open whether this eventual stabilization of the count of optimal attractors is a universal property of words generated by uniform morphisms with constant attractor size.

OP-140 Balanced Hellinger Conjecture for Boolean FunctionsNot in LeanInformation Theory & Coding

Let $n \ge 1$ and let $X$ be uniform on the Boolean hypercube $\{-1, 1\}^n$. For $\rho \in [0, 1]$, let $Y \in \{-1, 1\}^n$ be the output of sending $X$ through independent binary symmetric channels with crossover probability $(1-\rho)/2$, so $\mathbb{E}[X_i Y_i] = \rho$ for each $i \in [n]$. For any Boolean function $f: \{-1, 1\}^n \to \{-1, 1\}$, let $T_\rho f(y) = \mathbb{E}[f(X) \mid Y = y]$ and $\mathcal{Z}_\rho(f) = \mathbb{E}_Y \sqrt{1 - (T_\rho f(Y))^2}$. Does every balanced Boolean function $f$ (satisfying $\mathbb{E}[f(X)] = 0$) satisfy $\mathcal{Z}_\rho(f) \ge \sqrt{1 - \rho^2}$ for all $\rho \in [0, 1]$?

Posed in arXiv:2610.10618, Sec. 1 — The Hellinger Conjecture for Antipodal Boolean Functions

What is known

The paper proves the conjecture under the additional symmetry assumption that f is antipodal (f(-x) = -f(x)), or more generally sign-reversing under an involution, but leaves open the full conjecture for general balanced Boolean functions.

OP-141 Uniqueness of Extremizers for Antipodal Hellinger InequalityNot in LeanInformation Theory & Coding

Let $n \ge 1$, $\rho \in (0, 1)$, and let $f: \{-1, 1\}^n \to \{-1, 1\}$ be an antipodal Boolean function (i.e. $f(-x) = -f(x)$ for all $x \in \{-1, 1\}^n$). Suppose $\mathbb{E}_Y \sqrt{1 - (T_\rho f(Y))^2} = \sqrt{1 - \rho^2}$, where $Y$ is obtained from $X$ via coordinatewise BSC($\rho$). Are signed dictators $f(x) = \pm x_i$ (for some $i \in \{1, \ldots, n\}$) the only antipodal functions achieving equality?

Posed in arXiv:2610.10618, Sec. 6.2 — The Hellinger Conjecture for Antipodal Boolean Functions

What is known

The paper establishes that signed dictators attain the minimum affinity bound in the antipodal Hellinger inequality, but points out that classifying all extremizers for 0 < ρ < 1 remains open.

OP-143 Leading asymptotic constant for minimal sets with no unique sumsNot in LeanCombinatorics for TCS

Let $m(p)$ denote the minimum size of a subset $A \subseteq \mathbb{F}_p$ with $|A| \ge 2$ such that every element of $A + A$ has at least two representations as an unordered pair of elements of $A$. Does the limit $\lim_{p \to \infty} \frac{m(p)}{(\log p)^2}$ exist along the primes, and if so, is it equal to $\frac{1}{2 (\log 3)^2}$?

Proposed here, building on arXiv:2610.09349, Theorem 1.2 — A near-quadratic lower bound for sets with no unique sums; the paper does not ask it

What is known

Theorem 1.2 establishes the upper bound $m(p) \le \frac{1}{2(\log 3)^2} (\log p)^2 + O\left(\frac{(\log p)^2}{\log \log p}\right)$ via weakly ternary-balanced seeds, while Theorem 1.1 provides the lower bound $\Omega((\log p / \log \log p)^2)$. Even if the quadratic lower bound $\Theta((\log p)^2)$ in Question 5.1 holds, the paper leaves untouched whether the base-3 radix construction achieves the optimal asymptotic constant or whether another radix or non-radix construction can achieve a strictly smaller leading constant.

OP-145 The Almost Stacked Hypothesis for graph pebblingNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite connected graph. A configuration $c: V(G) \to \mathbb{N}$ is almost stacked if there is at most one vertex $v_0 \in V(G)$ with $c(v_0) > 1$ (so $c(u) \le 1$ for all $u \ne v_0$). (1) Is the stacking number $\operatorname{stack}(G)$ always equal to the least integer $t \ge 2$ such that every almost stacked configuration of size $t$ on $G$ is stackable? (2) If $G$ is non-bipartite, is the clearing number $\operatorname{clear}(G)$ always equal to the least integer $t \ge 2$ such that every almost stacked configuration of size $t$ on $G$ is clearable?

Posed in arXiv:2610.09650, Hypothesis 3.2 — The Almost Stacked Hypothesis: A Conjectural Analogue of Sjöstrand's Cover Pebbling Theorem

What is known

The Almost Stacked Hypothesis is the central conjectural reduction principle proposed in the paper, generalizing the spirit of cover pebbling theorems to stacking and clearing numbers.

OP-146 Asymptotic Deficit of k-Fold Sumsets in Finite Abelian GroupsNot in LeanCombinatorics for TCS

Let $k \ge 2$ be an integer. For a finite abelian group $\Gamma$ of order $n$, define the deficit $f_k(\Gamma)$ to be the maximum integer $m \ge 0$ such that every subset $B \subseteq \Gamma$ of size at least $n - m$ can be expressed as a $k$-fold sumset $kA = \{a_1 + \dots + a_k : a_i \in A\}$ for some subset $A \subseteq \Gamma$. If $\Gamma$ contains no non-trivial element whose order divides $k$, does there exist a constant $c_k > 0$ such that $f_k(\Gamma) = \widetilde{\Theta}(n^{1/k})$ as $n \to \infty$?

Posed in arXiv:2610.08629, Conjecture 5.1 — Random Cayley sum hypergraphs and $k$-fold sumsets

What is known

The paper proves that the maximum deficit satisfies $f_k(\Gamma) \le \widetilde{O}(n^{(2k-1)/(4k-3)})$ for all finite abelian groups, and $f_k(\Gamma) \ge \widetilde{\Omega}(n^{1/k})$ when $\Gamma$ has no non-trivial element of order dividing $k$. Because the number of representations of an element as a k-fold sum grows with $k$, the deficit exponent is conjectured to match the lower bound $1/k$.

OP-147 Tight Hole Number Exponent in Random Cayley Sum GraphsNot in LeanCombinatorics for TCS

Let $\Gamma$ be a finite abelian group of order $n$, let $k \ge 2$ be an integer, and let $p \in (0, 1/2]$. For a $p$-random subset $S \subseteq \Gamma$, let $\alpha_k(\mathrm{Cay}_k^+(\Gamma; S))$ be the $k$-partite hole number of the Cayley sum $k$-hypergraph, defined as the maximum integer $m$ such that there exist subsets $U_1, \dots, U_k \subseteq \Gamma$ each of size $m$ with $(U_1 + \dots + U_k) \cap S = \emptyset$. In particular for $k = 2$, is the bound $\alpha_2(\mathrm{Cay}_2^+(\Gamma; S)) \le \widetilde{O}(p^{-3/2})$ tight, or does there exist an upper bound $\alpha_2(\mathrm{Cay}_2^+(\Gamma; S)) \le \widetilde{O}(p^{-c})$ with high probability for some exponent $c < 3/2$ (such as $c = 1$)?

Proposed here, building on arXiv:2610.08629, Theorem 1.5 — Random Cayley sum hypergraphs and $k$-fold sumsets; the paper does not ask it

What is known

The paper proves in Theorem 1.5 that the k-partite hole number of a random Cayley sum k-hypergraph satisfies $\alpha_k(\mathrm{Cay}_k^+(\Gamma; p)) \le \widetilde{O}(p^{-(2k-1)/(2k-2)})$ with high probability, recovering the bound $\widetilde{O}(p^{-3/2})$ for $k = 2$ from arXiv:2509.02561. However, no matching lower bounds are established for either the independence number or the hole number. Improving the exponent from $(2k-1)/(2k-2)$ toward $1$ is the principal barrier to closing the polynomial gap in the deficit exponent.

OP-149 Order of Growth of the Turán Coefficient in Uniformity for Trace 4-CyclesNot in LeanCombinatorics for TCS

For each integer $r \ge 3$, let $\operatorname{ex}_r(m, \operatorname{Tr}(C_4))$ denote the maximum number of edges in an $r$-uniform hypergraph on $m$ vertices containing no 4-cycle trace, and let $a_r := \limsup_{m \to \infty} \frac{\operatorname{ex}_r(m, \operatorname{Tr}(C_4))}{m^{3/2}}$. What is the asymptotic order of growth of $a_r$ as $r \to \infty$? In particular, does there exist a constant $\beta \in [1/2, 3/2]$ such that $\lim_{r \to \infty} \frac{\log a_r}{\log r} = \beta$, and does $a_r = \Theta(r^{1/2})$?

Posed in arXiv:2610.08151, Sec. 4 — Polynomial-in-$r$ bounds for forbidden traces of uniform hypergraphs

What is known

The paper proves an upper bound of $O_\varepsilon(r^{3/2+\varepsilon} m^{3/2})$ for trace-$C_4$-free $r$-graphs, and constructs a family showing a lower bound of $\Omega(r^{1/2} m^{3/2})$. This leaves a polynomial gap in the uniformity $r$ for the asymptotic coefficient $a_r$.

OP-150 Elimination of Epsilon Loss in Forbidden Trace Turán BoundsNot in LeanCombinatorics for TCS

Let $H$ be a fixed hypergraph on $h \ge 1$ vertices, and let $\alpha \ge 0$. Suppose that for every fixed integer $j \ge 1$, there exists a constant $D_j > 0$ such that every trace-$H$-free $j$-uniform hypergraph on $s$ vertices has at most $D_j s^\alpha$ edges. Does there exist a constant $C_{H,\alpha} > 0$ such that for all integers $m \ge r \ge 2$, every trace-$H$-free $r$-uniform hypergraph on $m$ vertices has at most $C_{H,\alpha} r^{h-1-\alpha} m^\alpha$ edges (that is, with no $r^\varepsilon$ overhead)?

Proposed here, building on arXiv:2610.08151, Sec. 3, Theorem 1 — Polynomial-in-$r$ bounds for forbidden traces of uniform hypergraphs; the paper does not ask it

What is known

Theorem 1 establishes that if $\operatorname{ex}_j(s, \operatorname{Tr}(H)) \le D_j s^\alpha$ for all fixed $j$, then $\operatorname{ex}_r(m, \operatorname{Tr}(H)) \le C_{H,\alpha,\varepsilon} r^{h-1-\alpha+\varepsilon} m^\alpha$ for every $\varepsilon > 0$. The factor $r^\varepsilon$ is introduced by setting the restriction size $s = \lfloor m / r^{1+\delta} \rfloor$ with $\delta > 0$ so that the probability of large trace sizes decays as $r^{-\delta L}$. It remains open whether this loss can be removed to give $\operatorname{ex}_r(m, \operatorname{Tr}(H)) \le C_{H,\alpha} r^{h-1-\alpha} m^\alpha$, or at least with polylogarithmic dependence $r^{h-1-\alpha} (\log r)^c$.

OP-151 Tightness of the n^2 edge bound for simple solid bricks of order 2nNot in LeanGraph Theory & Graph Algorithms

Let $n \\ge 4$ be an integer. A connected graph $G$ is matching covered if every edge belongs to a perfect matching. A matching covered graph is a brick if it is nonbipartite and has no nontrivial tight cuts (equivalently, 3-connected and bicritical). A brick is solid if it has no two vertex-disjoint odd cycles $C_1, C_2$ such that $G - (V(C_1) \\cup V(C_2))$ has a perfect matching. Does there exist, for every integer $n \\ge 4$ (or for any integer $n \\ge 4$), a simple solid brick of order $2n$ with exactly $n^2$ edges? What is the maximum number of edges in a simple solid brick of order $2n$, and what are the extremal graphs?

Proposed here, building on arXiv:2610.07733, Theorem 1.2 — The maximum size of simple solid matching covered graphs; the paper does not ask it

What is known

Theorem 1.2 establishes that every simple solid brick of order 2n has at most n^2 edges for n >= 4. However, the authors do not determine whether this bound is tight for any or all n >= 4, nor do they characterize the extremal simple solid bricks. The extremal graphs A_n, B_n, D_n that achieve n^2 + 2 edges in Theorem 1.3 are not bricks because each contains a nontrivial tight cut for n >= 3, and complete bipartite graphs K_{n,n} are bipartite and thus not bricks. Hence, the sharpness of the n^2 bound for simple solid bricks remains open.

OP-152 Polynomial upper bound for square-difference-free setsNot in LeanElementary Number Theory

Does there exist an absolute constant $\epsilon > 0$ and a constant $C > 0$ such that for every positive integer $N$, every subset $A \subseteq \{1, \dots, N\}$ satisfying $(A - A) \cap \{n^2 : n \in \mathbb{N}_{\ge 1}\} = \emptyset$ has cardinality $|A| \le C N^{1 - \epsilon}$?

Proposed here, building on arXiv:2610.07765, Theorem 1.3 — A new bound for the Furstenberg--Sárközy theorem using the van der Corput property; the paper does not ask it

What is known

The paper proves the upper bound $|A| \ll N \exp(-c \sqrt{\log N \log \log N})$ for sets without square differences using a quantitative van der Corput method with signed coefficients. It also proves in Theorem 1.3 that any van der Corput witness trigonometric polynomial $P(\theta) = a_0 + \sum_{n \le \sqrt{N}} a_n \cos(2\pi n^2 \theta)$ with $P \ge 0$ and $P(0) = 1$ must have constant coefficient $a_0 \ge \exp(-C \sqrt{\log N \log \log N})$, demonstrating that this method cannot yield a polynomial power-saving bound $N^{1-\epsilon}$. Meanwhile, the best known lower-bound constructions give subsets of size $\gg N^{0.752796...}$. Whether square-difference-free sets satisfy a polynomial upper bound $|A| \ll N^{1-\epsilon}$ remains wide open and is beyond the reach of both the van der Corput method and existing density-increment techniques.

OP-154 Approximation ratio strictly below 6 for metric heterogeneous TSPNot in LeanApproximation & Inapproximability

Let $(V, d)$ be a finite metric space with a designated depot vertex $r \in V$ and client set $V^\circ = V \setminus \{r\}$. Given $k \in \mathbb{N}_{\ge 1}$ vehicles with positive speeds $s_1, \dots, s_k \in \mathbb{Q}_{>0}$, a feasible solution to the heterogeneous traveling salesman problem (HetTSP) is a tuple of $k$ closed walks $(T_1, \dots, T_k)$ each starting and ending at $r$ (possibly empty) such that every client $v \in V^\circ$ is visited by at least one tour $T_i$. The makespan of the solution is $\max_{1 \le i \le k} \ell(T_i) / s_i$, where $\ell(T_i) = \sum_{j=1}^m d(u_{j-1}, u_j)$ for a walk $T_i = (u_0, u_1, \dots, u_m)$ with $u_0 = u_m = r$. Let $\mathrm{OPT}_{\mathrm{HetTSP}}$ denote the infimum makespan over all feasible solutions. Does there exist a polynomial-time algorithm for HetTSP that, on every finite metric instance, outputs a feasible solution with makespan at most $\rho \cdot \mathrm{OPT}_{\mathrm{HetTSP}}$ for a constant factor $\rho < 6$?

Proposed here, building on arXiv:2610.12195, Theorem 1.1 — Improved Approximations for Vehicle Routing with Nonuniform Speeds; the paper does not ask it

What is known

Theorem 1.1 establishes the first single-digit constant-factor approximation algorithm for HetTSP with nonuniform vehicle speeds, achieving a ratio of 6 and improving upon the previous guarantee of 90(1+δ) from 2016. When all vehicle speeds are identical, the classical 1978 tour-splitting method combined with Christofides' algorithm yields an approximation ratio of 5/2. For nonuniform speeds, APX-hardness inherited from metric TSP and makespan scheduling leaves a significant gap between known lower bounds (at least 2 under standard complexity assumptions) and the upper bound of 6. Whether the layered decomposition technique or an alternative relaxation can bridge this gap to achieve an approximation ratio strictly below 6—or match the equal-speed ratio of 5/2—remains open.

OP-155 Anti-Ramsey Numbers of Spanning Forests of 4-Vertex PathsNot in LeanCombinatorics for TCS

Let $k \ge 2$ be an integer, and let $n = 4k$. Let $F = k P_4$ be the spanning linear forest on $n$ vertices consisting of $k$ vertex-disjoint paths on 4 vertices (and hence having no isolated edges $P_2$). What is the exact value of the anti-Ramsey number $\mathrm{AR}(4k, k P_4)$? In particular, is $\mathrm{AR}(4k, k P_4) = \binom{4k-2}{2} + 1$, or is it strictly larger? For the base case $k = 2$ on $n = 8$ vertices, what is $\mathrm{AR}(8, 2 P_4)$? (The general coloring with a monochromatic 2-star shows $\mathrm{AR}(8, 2P_4) \ge \binom{6}{2} + 1 = 16 > 14 = \mathrm{AR}(8, 4 P_2)$.)

Proposed here, building on arXiv:2610.11441, Theorem 3.3 — Spanning Even Linear Forests with Isolated Edges Share the Anti-Ramsey Numbers of Perfect Matchings; the paper does not ask it

What is known

Theorem 3.3 establishes that every spanning even linear forest on $n \ge 6$ vertices with at least one component isomorphic to $P_2$ satisfies $\mathrm{AR}(n, F) = \mathrm{AR}(n, (n/2)P_2)$. The proof relies fundamentally on embedding $F$ as a subgraph of $P_{n-2} \cup P_2$. However, when all path components have length at least 3 (i.e. at least 4 vertices), such as $k P_4$ with $k \ge 2$, $F$ has no $P_2$ component and cannot be embedded in $P_{n-2} \cup P_2$. Moreover, assigning a single color to all edges incident to a fixed pair of vertices $\{x, y\}$ and distinct colors to all other $\binom{n-2}{2}$ edges of $K_n$ yields a coloring with $\binom{n-2}{2} + 1$ colors that contains no rainbow copy of any spanning forest without isolated edges (since every copy must use at least two edges incident to $\{x, y\}$). This demonstrates that $\mathrm{AR}(n, F) \ge \binom{n-2}{2} + 1 > \mathrm{AR}(n, (n/2)P_2)$ whenever $F$ has no isolated edges, so the equality from Theorem 3.3 fails and the exact value of $\mathrm{AR}(4k, k P_4)$ remains undetermined.

OP-156 Tightness of conjectured worst-case efficiency bounds for public project redistribution with n >= 6Not in LeanMechanism Design & Auctions

Consider the public project problem with $n \ge 6$ agents and cost normalized to $1$. Agent $i$ reports $\theta_i \in [0, 1]$, and the social surplus under the efficient decision is $S(\theta) = \max\{s, 1\}$, where $s = \sum_{i=1}^n \theta_i$. In an anonymous Groves redistribution mechanism, agent $i$ receives a payment determined by a symmetric function $h: [0, 1]^{n-1} \to \mathbb{R}$ of the other agents' reports $\theta_{-i}$. The mechanism satisfies ex-post weak budget balance (non-deficit) if the retained revenue $L(\theta) = \sum_{i=1}^n h(\theta_{-i}) - (n-1)S(\theta) \ge 0$ for all $\theta \in [0, 1]^n$. The worst-case efficiency ratio is defined by $\alpha(M) = \inf_{\theta \in [0, 1]^n} \frac{S(\theta) - L(\theta)}{S(\theta)} = 1 - \sup_{\theta \in [0, 1]^n} \frac{L(\theta)}{S(\theta)}$. What is the exact optimal worst-case efficiency ratio $\alpha_n^* = \sup_h \alpha(M_h)$ for $n = 6$ (and for general $n \ge 6$), and do the upper bounds on $\alpha_n^*$ conjectured in 2012 match the optimal ratio for all $n \ge 6$?

Posed in arXiv:2610.10995, Sec. 7 — Asymptotically Optimal Public Project Redistribution without Bounded Precision: A Complex-Analytic Proof

What is known

The paper settles the asymptotic question as n approaches infinity without bounded precision, but highlights that exact optimal mechanisms remain open for all fixed n >= 6.

OP-157 Polynomial convergence rate for public project redistribution without bounded precisionNot in LeanMechanism Design & Auctions

For each integer $n \ge 3$, let $\alpha_n^*$ denote the supremum of the worst-case efficiency ratio $\alpha(M)$ over all deterministic, anonymous, strategy-proof, and ex-post weakly budget-balanced mechanisms $M$ for the public project problem with $n$ agents having arbitrary real valuations in $[0, 1]$. Does there exist a constant $c > 0$ such that $1 - \alpha_n^* = O(n^{-c})$ as $n \to \infty$? If not, what is the optimal convergence rate of $1 - \alpha_n^*$ (for instance, is it $\Theta(1/\log n)$ or $\Theta(1/\log\log n)$)?

Proposed here, building on arXiv:2610.10995, Thm 1.4 — Asymptotically Optimal Public Project Redistribution without Bounded Precision: A Complex-Analytic Proof; the paper does not ask it

What is known

Theorem 1.4 establishes a deterministic, anonymous, dominant-strategy incentive compatible, and non-deficit mechanism achieving worst-case efficiency ratio $1 - O(1/\log\log n)$ for arbitrary real valuations in $[0, 1]^n$. Under the restrictive bounded precision assumption, earlier work achieved $1 - O(1/n)$. The author explicitly states in Section 7 that no claim is made that $1 - O(1/\log\log n)$ is optimal. Whether the optimal convergence rate without bounded precision is polynomial, e.g. $1 - O(n^{-c})$ for some constant $c > 0$, is completely open.

OP-162 Characterization of Periodic Firing Words in Fixed-Priority Chip-FiringNot in LeanCombinatorial Games

Let $D=(V,E)$ be a finite strongly connected digraph, and let $\prec$ be a total order on $V$. Let $\Delta_D$ be the Laplacian matrix of $D$, and let $\rho \in \mathbb{N}^V$ be the primitive generator of the integer left kernel of $\Delta_D$, with $\ell_D = \sum_{v \in V} \rho_v$. Under the fixed-priority chip-firing map $\Phi$, which at each step fires the $\prec$-least vertex with at least as many chips as its out-degree, every active periodic orbit has period $\ell_D$ and vertex firing count vector $\rho$. What is the characterization of the words in $V^{\ell_D}$, up to cyclic rotation, that can occur as the firing sequence of an active periodic orbit of $\Phi$?

Posed in arXiv:2610.08949, Sec. 4, after Thm 4.1 — Primitive periods in greedy chip-firing games

What is known

Theorem 4.1 proves that every active periodic orbit has least period equal to the sum of coordinates of the primitive kernel vector and fires each vertex with that exact frequency. The specific sequential orderings of these firings that can actually appear remain uncharacterized.

OP-169 Covering bridgeless claw-free cubic graphs with four perfect matchingsNot in LeanGraph Theory & Graph Algorithms

Does every finite connected bridgeless claw-free cubic graph admit four perfect matchings whose union contains all edges of the graph?

Posed in arXiv:2610.01137, Sec. 1, after Theorem 1.5 — Covering Bridgeless Claw-Free Cubic Graphs with Perfect Matchings

OP-171 Kohayakawa-Nagle-Rödl-Schacht conjecture on homomorphism density in locally dense graphsNot in LeanGraph Theory & Graph Algorithms

Let $F$ be a finite simple graph. For every $d \in (0, 1]$ and every $\varepsilon > 0$, does there exist $\rho > 0$ and an integer $n_0 \ge 1$ such that for every finite simple graph $G$ on $n \ge n_0$ vertices that is $(\rho, d)$-dense (meaning that for every subset $U \subseteq V(G)$ of size at least $\rho n$, the induced subgraph $G[U]$ contains at least $\frac{d}{2}|U|^2$ edges), the homomorphism density $q(F, G) \coloneqq \frac{|\mathrm{Hom}(F, G)|}{|V(G)|^{|V(F)|}}$ satisfies $q(F, G) \ge d^{e(F)} - \varepsilon$?

Posed in arXiv:2610.13820, Conjecture 1.1 — Counting cographs in locally dense graphs

OP-172 Classification of uniform hypergraphs satisfying the KNRS propertyNot in LeanGraph Theory & Graph Algorithms

For $k \ge 3$, which $k$-uniform hypergraphs $F$ satisfy the hypergraph KNRS property? That is, for which $k$-uniform hypergraphs $F$ is it true that for all real numbers $d, \varepsilon > 0$, there exists $\rho > 0$ such that every $(\rho, d)$-dense weighted $k$-graph $H$ on $n$ vertices satisfies $t(F, H) \ge (d^{e(F)} - \varepsilon) n^{v(F)}$? In particular, can one determine necessary and sufficient structural conditions for a $k$-uniform hypergraph to be KNRS, given that having vanishing uniform Turán density is necessary but not sufficient (as demonstrated by the 3-uniform loose triangle)?

Posed in arXiv:2610.13820, Question 2.1 — Counting cographs in locally dense graphs

OP-174 Spectral analogue of Wegner's conjecture on graph powersNot in LeanGraph Theory & Graph Algorithms

Let $k \ge 1$ be an integer and $r \ge 1$ be a real number. For a finite simple graph $G$, let $\lambda_1(G)$ denote the spectral radius of its adjacency matrix, and let $G^k$ denote the $k$-th graph power of $G$, where distinct vertices are adjacent if and only if their shortest-path distance in $G$ is at most $k$. Define $\omega_\lambda(k, r) := \max_{\lambda_1(G) \le r} \omega(G^k)$ and $\chi_\lambda(k, r) := \max_{\lambda_1(G) \le r} \chi(G^k)$, where the maximum is over all finite simple graphs $G$ with $\lambda_1(G) \le r$, and $\omega$ and $\chi$ are the clique number and chromatic number respectively. Does the equality $\omega_\lambda(k, r) = \chi_\lambda(k, r)$ hold for all $k \ge 1$ and all real $r \ge 1$?

Posed in arXiv:2610.13852, Conjecture 6.2 — Clique and chromatic numbers of graph powers: spectral bounds and anticodes

OP-176 Upper bound of ceil(n/2) on the fault-tolerant metric dimension of maximal outerplanar graphsNot in LeanGraph Theory & Graph Algorithms

Let $G = (V, E)$ be a connected simple graph. For vertices $u, v \in V$, let $d(u, v)$ denote the shortest-path distance. A subset $W \subseteq V$ is a resolving set of $G$ if for every pair of distinct vertices $x, y \in V$, there exists $w \in W$ such that $d(w, x) \ne d(w, y)$. A resolving set $W$ is fault-tolerant if for every $w \in W$, $W \setminus \{w\}$ is also a resolving set of $G$. The fault-tolerant metric dimension $\beta'(G)$ is the minimum cardinality of a fault-tolerant resolving set of $G$. A maximal outerplanar graph (MOP) is a simple graph admitting a planar embedding where all vertices lie on the boundary of the unbounded face and every interior face is a 3-cycle. For every maximal outerplanar graph $G$ of order $n \ge 7$, is $\beta'(G) \le \lceil n/2 \rceil$?

Posed in arXiv:2610.13374, Sec. 4, Open problem 4 — On the fault-tolerant metric dimension of maximal outerplanar graphs

OP-178 Zero-Sum Multiplicity Invariant for Direct Sums C_p + C_np When p Does Not Divide nNot in LeanCombinatorics for TCS

Let $p \geq 3$ be a prime, and let $n \geq 2$ be an integer such that the smallest prime divisor of $np$ is $p$ and $p \nmid n$. Let $G = (\mathbb{Z}/p\mathbb{Z}) \oplus (\mathbb{Z}/np\mathbb{Z})$. A sequence over $G$ is a finite multiset $S$ of elements of $G$. The sequence $S$ is weak-regular if $\mathsf{v}_g(S) \leq \operatorname{ord}(g)$ for every $g \in G$, where $\mathsf{v}_g(S)$ is the multiplicity of $g$ in $S$. Let $\mathsf{N}(G)$ be the least integer $l$ such that every weak-regular sequence $S$ over $G$ with $|S| \geq l$ contains a nonempty zero-sum subsequence $T$ ($\sum_{t \in T} t = 0$) satisfying $\mathsf{v}_g(T) = \mathsf{v}_g(S)$ for some $g$ appearing in $S$. Is $\mathsf{N}(G) = 2np - 1$?

Posed in arXiv:2610.13103, Sec. 5, Conjecture — Additive bases and the zero-sum invariant $\mathsf{N}(G)$ for groups $C_p\oplus C_{np}$

What is known

Theorem 1.4 establishes N(C_p ⊕ C_{np}) = 2np - 1 when p divides n, and gives upper bounds 5np - 4 (p ≥ 5) and 4np - 3 (p = 3) when p does not divide n. The paper conjectures the exact value 2np - 1 for all n ≥ 2.

OP-180 Game Chromatic Number of Complete Multipartite Graphs with TriplesNot in LeanCombinatorial Games

Let A, C, D be non-negative integers with A + C + D ≥ 1, and let r₁ ≥ r₂ ≥ ... ≥ r_D ≥ 4 be integers. Let K_{1^A, 3^C, r₁, ..., r_D} denote the complete multipartite graph with A singleton parts, C parts of size 3, and D parts of sizes r₁, ..., r_D. In the graph coloring game played on a graph G with k colors, Alice and Bob alternate coloring uncolored vertices of G with a legal color from {1, ..., k} such that no two adjacent vertices share a color, with Alice playing first. Alice wins if all vertices are successfully colored, and Bob wins if at any point an uncolored vertex cannot be legally colored. The game chromatic number χ_g(G) is the minimum integer k for which Alice has a winning strategy. What is an exact closed-form expression for χ_g(K_{1^A, 3^C, r₁, ..., r_D}) in terms of A, C, D and the sequence (r₁, ..., r_D)?

Posed in arXiv:2610.12508, Open problem 5.1 — The Game Chromatic Number of Complete Multipartite Graphs with Singletons and Large Parts

What is known

The paper completely resolves the case C = 0 (no parts of size 3) when all non-singleton parts have size at least 4, but explicitly poses finding an exact formula when parts of size 3 are also present.

OP-183 Fully Adaptive vs. Partially Adaptive Approximation Ratios under Deferred CommitmentNot in LeanOnline Algorithms

Under a common deferred commitment rule (either deferred-to-deadline or deferred-until-stopping) in Pandora's problem with deadlines, can efficient fully adaptive algorithms achieve a strictly better worst-case approximation ratio against the fully adaptive optimum than partially adaptive algorithms?

Posed in arXiv:2610.13775, Sec. 5, para. 3 — A $1/2$-Approximation for Pandora's Problem with Deadlines

OP-187 Hamiltonicity of simple polytopes in dimension at least fourNot in LeanGraph Theory & Graph Algorithms

Let $d \ge 4$ be an integer. Is every simple $d$-polytope (that is, a convex $d$-polytope in $\mathbb{R}^d$ whose polar dual is simplicial, or equivalently whose 1-skeleton graph is $d$-regular) hamiltonian, in the sense that its 1-skeleton graph contains a Hamiltonian cycle?

Posed in arXiv:2610.12836, Conjecture 1.11 — Connectivity, toughness, and hamiltonicity of simplicial polytopes

OP-188 Two-frugal coloring bound of Delta + 5 for planar graphs of maximum degree 6 and 7Not in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite simple planar graph with maximum degree $\Delta \in \{6, 7\}$. A proper vertex coloring of $G$ is called $2$-frugal if no color appears more than twice in the open neighborhood of any vertex of $G$. Does every such planar graph admit a $2$-frugal coloring using at most $\Delta + 5$ colors (that is, at most 11 colors when $\Delta = 6$, and at most 12 colors when $\Delta = 7$)?

Posed in arXiv:2610.12640, Sec. 4 — Frugal coloring in planar graphs with maximum degree 4 and 5

OP-189 Two-frugal coloring bound for planar graphs of maximum degree at least 8Not in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite simple planar graph with maximum degree $\Delta \geq 8$. A proper vertex coloring of $G$ is $2$-frugal if no color appears more than twice in the open neighborhood of any vertex. Does every such planar graph admit a $2$-frugal coloring using at most $\lfloor \frac{3\Delta}{2} \rfloor + 1$ colors?

Posed in arXiv:2610.12640, Sec. 4, Problem 4.1 — Frugal coloring in planar graphs with maximum degree 4 and 5

OP-192 Sufficiency of structural characterization for k-tight graphsNot in LeanGraph Theory & Graph Algorithms

Let $k \ge 2$ be an integer. For a simple graph $G$ on $n \ge 2k$ vertices, the $G$-stable Kneser graph $\operatorname{KG}(G, k)$ is the graph whose vertices are the independent sets of size $k$ in $G$, with two vertices adjacent when they are disjoint. A graph $G$ on $n$ vertices is $k$-tight if the chromatic number $\chi(\operatorname{KG}(G, k)) = n - 2k + 2$. Is it true that for all $k \ge 2$, a graph $G$ on $n \ge 2k + 1$ vertices is $k$-tight if and only if either $G$ is a cycle $C_n$, or every connected component of $G$ is a path or a cycle of length at least $4k - 3$?

Posed in arXiv:2610.17884, Conjecture 1.3 — The chromatic number of $G$-stable Kneser graphs

OP-195 Smoothness conjecture on the integer decomposition property in dimension d ≥ 4Not in LeanInteger & Polyhedral Optimization

Let d ≥ 4 be an integer. Let P ⊂ ℝ^d be a smooth lattice polytope: P is the convex hull of a finite set of points in ℤ^d, and for every vertex v of P, the direction cone cone(P ∩ ℤ^d - v) is generated by a ℤ-basis of ℤ^d. Does P have the integer decomposition property: for every integer k ≥ 1 and every rational point x ∈ P ∩ (1/k)ℤ^d, do there exist lattice points x_1, ..., x_k ∈ P ∩ ℤ^d such that x_1 + ... + x_k = kx?

Posed in arXiv:2610.17270, Sec. 1, paragraph 1 — Integer decomposition property of three-dimensional smooth polytopes: a shorter proof

What is known

The paper proves the conjecture in dimension 3 using a combination of secondary fan flip classification, Cayley sums, and the 3D flatness constant bound of 3.972. The general conjecture for all dimensions d ≥ 4 remains completely open.

OP-198 Exact Davenport Constant and Minimal Support for Three-Dimensional BoxesNot in LeanElementary Number Theory

Let $m \ge 2$ be an integer. Let $B_m = \llbracket-m,m\rrbracket^3 = \{ (x, y, z) \in \mathbb{Z}^3 : -m \le x, y, z \le m \}$. The Davenport constant $\mathsf{D}(B_m)$ is the maximum length of a minimal zero-sum sequence over $B_m$, and $\mathsf{D}^{(4)}(B_m)$ is the maximum length of a minimal zero-sum sequence over $B_m$ with support of size 4. Is it true that for every integer $m \ge 2$, $\mathsf{D}(B_m) = \mathsf{D}^{(4)}(B_m) = 16m^3 - 16m^2 + 10m - 2$ when $m$ is odd, and $\mathsf{D}(B_m) = \mathsf{D}^{(4)}(B_m) = 16m^3 - 16m^2 + 8m - 1$ when $m$ is even, and that the extremal minimal zero-sum sequences are essentially unique up to the symmetries of the cube $[-m, m]^3$?

Posed in arXiv:2610.16562, Section 2, after Corollary 4 — The Davenport constant of low-dimensional boxes

OP-199 Existence of Asymptotic Davenport Ratio for High-Dimensional BoxesNot in LeanElementary Number Theory

For integers $d \ge 1$ and $m \ge 1$, let $B_{m,d} = \llbracket-m,m\rrbracket^d = \{ x \in \mathbb{Z}^d : \forall i, |x_i| \le m \}$, and let $\mathsf{D}^{(d+1)}(B_{m,d})$ denote the maximum length of a minimal zero-sum sequence over $B_{m,d}$ having a support of size $d+1$. For every integer $d \ge 4$, does the sequence of ratios $\frac{\mathsf{D}^{(d+1)}(B_{m,d})}{m^d}$ converge to a finite real limit as $m \to \infty$?

Posed in arXiv:2610.16562, Section 2, after Theorem 5 — The Davenport constant of low-dimensional boxes

OP-200 Erdos Matching Conjecture for Uniform Hypergraphs with Small Matching NumberNot in LeanCombinatorics for TCS

Let k >= 5, s >= 1, and n >= k*(s+1) be integers. Let F be a k-uniform hypergraph on n vertices with matching number nu(F) <= s (that is, containing no s+1 pairwise disjoint edges). Is it true that the number of edges in F satisfies |F| <= max { Nat.choose (k*(s+1)-1) k, Nat.choose n k - Nat.choose (n-s) k }?

Posed in arXiv:2610.16203, Section 1.2, after Conjecture 1.3 — A Proof of the Erd\H{o}s Matching Conjecture for Large Matchings via Sharp Tail Probability for Sums of i.i.d. Nonnegative Random Variables

What is known

The paper resolves Conjecture 1.3 for all sufficiently large s, but leaves open the case of small s for k >= 5 (and k = 4 for s < 6004).

OP-201 Hilton-Milner Bound for Uniform Hypergraphs with Bounded Matching Number and Cover Number Greater Than sNot in LeanCombinatorics for TCS

Let k >= 3, s >= 1, and n >= k*(s+1) be integers. Let HM_k(n,s) = Nat.choose n k - Nat.choose (n-s) k - Nat.choose (n-s-k) (k-1) + 1 and C_k(s) = Nat.choose (k*(s+1)-1) k. Let F be a k-uniform hypergraph on n vertices with matching number nu(F) <= s and vertex cover number tau(F) > s. Is it true that |F| <= max { C_k(s), HM_k(n,s) } for every s >= 1?

Posed in arXiv:2610.16203, Section 9.2.1, before Theorem 9.2 — A Proof of the Erd\H{o}s Matching Conjecture for Large Matchings via Sharp Tail Probability for Sums of i.i.d. Nonnegative Random Variables

What is known

Theorem 9.2 proves the Hilton-Milner bound max{C_k(s), HM_k(n,s)} for k >= 3 throughout n >= k*(s+1) when s is sufficiently large, but leaves open whether this holds for small matching numbers s.

OP-209 Tuza's conjecture for graphs of maximum degree at most 11Not in LeanGraph Theory & Graph Algorithms

Let $G = (V, E)$ be a finite simple graph with maximum degree $\Delta(G) \le 11$. Let $\nu(G)$ denote the maximum number of pairwise edge-disjoint triangles in $G$, and let $\tau(G)$ denote the minimum size of an edge set $T \subseteq E$ such that every triangle in $G$ contains at least one edge in $T$ (i.e., $G - T$ is triangle-free). Does every such graph satisfy $\tau(G) \le 2\nu(G)$?

Posed in arXiv:2610.15269, Sec. 6 — Tuza's Conjecture for Graphs of Maximum Degree at Most 10

What is known

The paper settles Tuza's conjecture for graphs of maximum degree at most 10, leaving the case Delta = 11 as the immediate open degree threshold.

OP-210 Surjectivity of Grundy values of trees in the Game of ArrowsNot in LeanCombinatorial Games

In the Game of Arrows on finite trees (normal-play impartial game where players alternate orienting unmarked edges without creating any sink or source, with the last player to move winning), does every non-negative integer g ∈ ℕ occur as the Grundy value g(T) of some finite tree T? Equivalently, does the set of attainable Grundy values contain an element in [2^r, 2^(r+1)) for every non-negative integer r?

Posed in arXiv:2610.15145, Conjecture 11.1 — Nim heaps in the Game of Cycles: the parity conjecture fails on trees

OP-213 Tractability frontier of degenerate graph partitioningNot in LeanGraph Theory & Graph Algorithms

Let $s \ge 2$ and let $p = (p_1, \ldots, p_s)$ be non-negative integers. For a finite graph $G$, a $p$-degenerate partition is a partition of $V(G)$ into $s$ sets $V_1, \ldots, V_s$ such that each induced subgraph $G[V_i]$ has degeneracy at most $p_i$. What is the computational complexity of determining whether a graph $G$ of maximum degree $\Delta$ admits a $p$-degenerate partition, for degrees $\Delta$ in the range $\sum_{i=1}^s p_i + s < \Delta < \sum_{i=1}^s p_i + s - 1 + f_{\min}$? In particular, for $s=2$ and $p=(1,1)$ (partition into two forests), is determining whether a graph of maximum degree $\Delta = 4$ admits such a partition polynomial-time solvable or NP-complete?

Posed in arXiv:2610.14374, Sec. 1, after Thm 3 (lines 175-177) — Greedy Coloring and Simple Exponential Strengthenings of Brooks-Type Theorems

What is known

The paper proves that p-Degenerate Partitioning is NP-complete when Δ ≥ s - 1 + ∑ p_i + f_min where f_min = Θ(k) from k-colorability, while Borodin (1976) and Bollobás-Manvel (1979) established existence of a valid partition whenever ∑ p_i ≥ Δ - s. The tractability status in the intermediate gap remains open.

OP-214 Sharp exponential lower bound base for Delta-list coloringNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a connected simple graph with maximum degree $\Delta \ge 3$ that is not a complete graph. For any list assignment $L : V(G) \to 2^{\mathbb{N}}$ such that $|L(v)| \ge \Delta$ for all $v \in V(G)$, does $G$ admit at least $\Delta^{\frac{|V(G)|(\Delta-2)}{2(\Delta-1)}}$ proper list colorings $\phi$ (i.e. proper colorings with $\phi(v) \in L(v)$ for all $v$)?

Proposed here, building on arXiv:2610.14374, Sec. 1, after Thm 2 and Sec. 3.2 — Greedy Coloring and Simple Exponential Strengthenings of Brooks-Type Theorems; the paper does not ask it

What is known

For ordinary proper Δ-coloring, Dong and Koh (2010) proved an exponential lower bound with base Δ^((Δ-2)/(2Δ-2)). The paper establishes that list coloring with lists of size Δ also has exponentially many colorings using greedy coloring, but with a base of only (⌊(Δ-q)/2⌋ + 1)^(q/(Δ+q)), which yields at best 2^((Δ-2)/(2Δ-2)) when q = Δ - 2. It remains open whether the optimal base for list coloring matches the Dong-Koh base for ordinary coloring.

OP-215 Extremal odd antihole characterization for odd-hole-free critical graphsNot in LeanGraph Theory & Graph Algorithms

Let $k \ge 3$ and $\Delta \ge k$ be integers. Let $G$ be a finite simple graph. Suppose that $G$ is $k$-critical (that is, its chromatic number is $\chi(G) = k$ and $\chi(G - v) < k$ for every vertex $v \in V(G)$), has maximum degree $\Delta$, and contains no odd holes (no induced cycles of odd length at least 5). If $G$ contains an odd antihole of length $2(\Delta-k)+7$ (an induced subgraph isomorphic to the complement of a cycle of length $2(\Delta-k)+7$), must $G$ be isomorphic to $\overline{C_{2(\Delta-k)+7}}$?

Posed in arXiv:2610.14241, Conjecture 3 — Restricting Odd Antiholes in Critical Graphs via List Coloring

What is known

Extends the known characterization for Delta = k to all Delta >= k. The authors verify this conjecture for Delta <= k and Delta >= 2k - 5, leaving open the intermediate range k < Delta < 2k - 5, where the smallest open case is (k, Delta) = (7, 8).

OP-218 Nonlinearity Upper Bound for Balanced Even-Variable Boolean FunctionsNot in LeanFoundations of Cryptography

Let $n \ge 4$ be an integer. Does every balanced Boolean function $f : \mathbb{F}_2^{2n} \to \mathbb{F}_2$ satisfy $nl(f) \le 2^{2n-1} - 2^{n-1} - 4$?

Posed in arXiv:2610.17897, Sec. 4, Open problem 4 — The Maximum Nonlinearity of 8-variable Balanced Boolean Functions is 116

What is known

The paper proves this bound for n = 4 (giving nl(f) <= 116), where it is tight. It poses the general bound for all n >= 4 as an explicit open problem.

OP-219 Dobbertin Recursion Conjecture for Maximum Balanced NonlinearityNot in LeanFoundations of Cryptography

For each integer $m \ge 1$, let $NLB_m$ denote the maximum nonlinearity among all balanced Boolean functions from $\mathbb{F}_2^m$ to $\mathbb{F}_2$. Does the recursion $NLB_{2n} = 2^{2n-1} - 2^n + NLB_n$ hold for every integer $n \ge 5$?

Posed in arXiv:2610.17897, Sec. 1, after (1) — The Maximum Nonlinearity of 8-variable Balanced Boolean Functions is 116

What is known

The paper proves the n=4 instance NLB_8 = 116, leaving the conjecture open for all n >= 5 (i.e., 2n >= 10).

OP-221 All-exp property for (2,2,3)-MCA with the flip neighborhoodNot in LeanCombinatorics for TCS

Does (2,2,3)-MCA with the single-variable flip neighborhood have the all-exp property? That is, does there exist a constant k >= 1 and an infinite family of (2,2,3)-MCA instances (where every constraint has arity at most 2, every variable appears in at most 2 constraints, and every variable has a 3-element domain) equipped with initial assignments such that every sequence of strictly improving single-variable flips ending at a local optimum has length at least 2^{(|I|)^{1/k}}?

Posed in arXiv:2610.16898, Sec. 1.2, paragraph after Theorem 2 — Exponential Local Search in Bounded-Occurrence MAX-CSP

What is known

The paper establishes the all-exp property for r >= 5 and proves an O(n^2) bound for r = 2. It notes that while the is-exp property was known for r = 3 (Kaznatcheev, Cohen, Jeavons 2020), whether all maximal improving paths are exponential remains open.

OP-224 Limit of the proportion of sustainable trees as the order growsNot in LeanGraph Theory & Graph Algorithms

For each integer $n \ge 3$, let $s_n$ be the number of isomorphism classes of sustainable trees on $n$ vertices, and let $t_n$ be the number of isomorphism classes of unlabelled trees on $n$ vertices. Define $\alpha_n = s_n / t_n$. Let $\rho \approx 0.33832185$ be the radius of convergence of the generating function of unlabelled trees. Does the sequence $(\alpha_n)_{n \ge 3}$ converge to $1 - \rho \approx 0.661$? In particular, is $\liminf_{n \to \infty} \alpha_n > 0$?

Posed in arXiv:2610.17078, Open Problem 6.3 — Sustainable trees

OP-225 Linear Piercing Bound for Axis-Parallel RectanglesNot in LeanCombinatorics for TCS

Does there exist an absolute constant C > 0 such that every nonempty finite family F of closed axis-parallel rectangles in ℝ² satisfies τ(F) ≤ C ν(F), where τ(F) is the piercing number (minimum size of a set of points meeting every member of F) and ν(F) is the packing number (maximum size of a subfamily of pairwise disjoint members of F)?

Posed in arXiv:2610.16703, Sec. 1, p. 2 — Piercing boxes and products of trees

OP-226 Subquadratic Piercing Number for Products of Planar Convex SetsNot in LeanCombinatorics for TCS

For an integer p ≥ 3, let F(p) be the minimal positive integer such that every finite family of convex sets in ℝ² in which every p members contain a triple having a point in common can be pierced by F(p) points. Let G(p) be the minimal positive integer such that every finite family of sets of the form A × B ⊂ ℝ² × ℝ², where A and B are convex sets in ℝ², in which every p members contain a triple having a point in common can be pierced by G(p) points. Is G(p) = o(F(p)²) as p → ∞, that is, lim_{p → ∞} G(p) / F(p)² = 0?

Posed in arXiv:2610.16703, Sec. 5, Question 5.1 — Piercing boxes and products of trees

OP-229 Upper bound of 2Delta - 1 on the rich-neighbor chromatic index of non-exceptional connected graphsNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite connected simple graph with maximum degree $\Delta = \Delta(G) \ge 2$. Suppose $G$ is not isomorphic to any of the five exceptional regular graphs $C_4$, $C_7$, $K_4$, $K_{2,2,2}$, or $K_6$ (each of which satisfies $\chi_{\mathrm{rn}}'(G) = 2\Delta$). Does $G$ satisfy $\chi_{\mathrm{rn}}'(G) \le 2\Delta - 1$, where $\chi_{\mathrm{rn}}'(G)$ is the rich-neighbor chromatic index (the minimum number of colors in a proper edge-coloring in which every non-isolated edge is adjacent to at least one rich edge)?

Posed in arXiv:2610.16446, Conjecture 13 — The rich-neighbor chromatic index is linear in the maximum degree

What is known

Observation 1 proves that every d-regular graph with d ≥ 2 satisfies chi'_rn(G) ≥ 2d - 1, making 2Delta - 1 tight. The five exceptional graphs require 2Delta colors. The conjecture holds for Delta = 2 and specializes for Delta = 3 to the known subcubic conjecture.

OP-231 Product-measure Fourier entropy-influence bound for weighted threshold functionsNot in LeanCircuit Complexity & Lower Bounds

Does there exist an absolute constant $C > 0$ such that for every $n \ge 1$, every product probability measure $\mu = \bigotimes_{i=1}^n \mu_i$ on $\{-1, 1\}^n$ with marginals $q_i = \mu_i(\{1\}) \in (0, 1)$, and every weighted linear threshold function $f(x) = \operatorname{sgn}(\sum_{i=1}^n w_i x_i - \theta)$ (where $w \in \mathbb{R}^n, \theta \in \mathbb{R}$), the non-empty Fourier entropy under $\mu$ satisfies $$\mathsf{H}_{\mu}^{+}(f) \le C \bigl(\mathsf{I}_{\mu}(f) - \operatorname{Var}_{\mu}(f)\bigr),$$ where $\mathsf{H}_{\mu}^{+}(f) = \sum_{S \subseteq [n], S \neq \varnothing} \widehat{f}_{\mu}(S)^2 \log_2 \frac{\prod_{i \in S} 4 q_i (1 - q_i)}{\widehat{f}_{\mu}(S)^2}$, $\mathsf{I}_{\mu}(f) = \sum_{i=1}^n \mathbb{P}_{X \sim \mu}[f(X) \neq f(X^{\oplus i})]$, and $\operatorname{Var}_{\mu}(f) = 1 - \mathbb{E}_{\mu}[f]^2$?

Posed in arXiv:2610.16069, Sec. 9.2 — Fourier entropy of threshold functions and their compositions

What is known

Theorem 6.6 settles this inequality for symmetric threshold functions with C_T = 80 + 460 / ln 2 under every product measure. The general weighted case is left open and is required to establish read-once composition with arbitrary weighted internal gates without balance assumptions.

OP-233 Virtual extension complexity of the matching polytopeNot in LeanInteger & Polyhedral Optimization

Let n be a positive even integer, and let M_n ⊂ ℝ^{n(n-1)/2} be the perfect matching polytope (or the general matching polytope) of the complete graph K_n, defined as the convex hull of indicator vectors of perfect matchings. Is the virtual extension complexity vxc(M_n) bounded above by a polynomial in n, or is vxc(M_n) exponential in n (that is, 2^{Ω(n^c)} for some c > 0)?

Posed in arXiv:2610.15909, Sec. 1, after Theorem 1.3 — Two Linear Programs are Better than One

What is known

The matching polytope was shown to have exponential extension complexity in 2017 (Rothvoß). The authors show that a related family of 0/1 polytopes (having an odd component) has polynomial virtual extension complexity despite exponential extension complexity, leaving open whether the matching polytope itself also admits a polynomial virtual extended formulation.

OP-235 Asymptotic Ratio Between Greedy and Optimal Online Assignment on the Cycle MetricNot in LeanOnline Algorithms

Consider the online facility assignment problem on a cycle metric of circumference $n$ with $n$ unit-capacity facilities located at integer vertices $\{0, 1, \ldots, n-1\}$, where $n$ requests arrive independently and uniformly at random on the cycle and each must be assigned immediately to an available facility. Let $G_n$ be the expected total assignment cost under the nearest-available greedy policy, and let $V_n^*$ be the expected total assignment cost under the optimal stochastic online policy. Does the limit $\lim_{n \to \infty} \frac{G_n}{V_n^*}$ exist, and if so, is it equal to 1 (asymptotic optimality of greedy) or strictly greater than 1?

Posed in arXiv:2610.15776, Sec. 11.1, Open Problem 1 — Exact and Asymptotic Analysis of Greedy Online Facility Assignment on Cycle Metrics

OP-236 Sharp Asymptotic Constant for Expected Offline Optimum Facility Assignment on CycleNot in LeanOnline Algorithms

Let $C_n$ be the cycle of circumference $n$ with $n$ unit-capacity facilities at integer vertices $\{0, 1, \ldots, n-1\}$, and let $X_1, \ldots, X_n$ be independent uniform random arrivals on $C_n$. Let $O_n = \mathbb{E}[\mathrm{OPT}_n^{\mathrm{off}}]$ be the expected cost of the optimal offline assignment $\min_{\sigma \in S_n} \sum_{i=1}^n d(X_i, \sigma(i))$. The paper proves that $1/\sqrt{24\pi} \le \liminf_{n \to \infty} O_n / n^{3/2} \le \limsup_{n \to \infty} O_n / n^{3/2} \le \frac{1}{4}\sqrt{\pi/2}$. Does the limit $\lim_{n \to \infty} O_n / n^{3/2}$ exist, and what is its exact value?

Posed in arXiv:2610.15776, Sec. 11.1, Open Problem 2 — Exact and Asymptotic Analysis of Greedy Online Facility Assignment on Cycle Metrics

OP-238 Universal approximation factor for weighted maximin share of choresNot in LeanFair Division

Consider the fair allocation of indivisible chores among agents with arbitrary positive weights and additive nonnegative costs. Let $\mathcal{N} = \{1, \dots, n\}$ be the set of agents with weights $w_i > 0$ satisfying $\sum_{i \in \mathcal{N}} w_i = 1$, and let $\mathcal{M} = \{1, \dots, m\}$ be a set of indivisible chores with additive cost functions $v_i : 2^\mathcal{M} \to \mathbb{R}_{\geq 0}$. The weighted maximin share of agent $i$ is defined by $\mu_i = w_i \min_{(A_1,\dots,A_n)} \max_{j \in \mathcal{N}} \frac{v_i(A_j)}{w_j}$, where the minimum is over all partitions of $\mathcal{M}$ into $n$ bundles. An allocation $A = (A_1, \dots, A_n)$ is $\alpha$-WMMS if $v_i(A_i) \leq \alpha \mu_i$ for all $i \in \mathcal{N}$. Let $\Gamma = \sup_I \min_A \max_{i \in \mathcal{N}} \frac{v_i(A_i)}{\mu_i}$ be the optimal universal WMMS approximation factor. What is the exact value of $\Gamma$, and can the gap $[e, 4.124234528]$ be narrowed?

Posed in arXiv:2610.15520, Sec. 6 — Improving the Bounds on Approximating Weighted Maximin Share for Chores

OP-243 Quasipolynomial upper bound on off-diagonal Ramsey numbers for linear 3-graphsNot in LeanCombinatorics for TCS

Let $H$ be a fixed linear $3$-uniform hypergraph (that is, any two distinct hyperedges of $H$ share at most one vertex). Does there exist a constant $C = C(H) > 0$ such that for all integers $n \ge 2$, the off-diagonal Ramsey number $r(H, n)$ satisfies $r(H, n) \le \exp((\log n)^C)$? Here $r(H, n)$ is the minimum integer $N$ such that every $3$-uniform hypergraph on $N$ vertices contains either a copy of $H$ or an independent set of size $n$.

Posed in arXiv:2610.14829, Sec. 5, Problem 5.2 — New bounds for off-diagonal hypergraph Ramsey numbers

OP-244 Superpolynomial Ramsey growth for the Fano plane minus an edgeNot in LeanCombinatorics for TCS

Let $F^-$ be the $3$-uniform hypergraph on $7$ vertices with $6$ hyperedges obtained by deleting one edge from the Fano plane (explicitly, $V(F^-) = \{1, 2, 3, 4, 5, 6, 7\}$ and $E(F^-) = \{\{1,2,3\}, \{1,4,5\}, \{1,6,7\}, \{2,4,7\}, \{3,4,6\}, \{3,5,7\}\}$). Is the off-diagonal Ramsey number $r(F^-, n)$ superpolynomial in $n$, that is, does $r(F^-, n) = n^{\omega(1)}$ as $n \to \infty$? Equivalently, does every $3$-uniform hypergraph $H$ with at most $6$ tight components that is not iterated tripartite satisfy $r(H, n) = n^{\omega(1)}$?

Posed in arXiv:2610.14829, Sec. 5, Problem 5.1 — New bounds for off-diagonal hypergraph Ramsey numbers

OP-245 Off-diagonal Ramsey polynomiality characterization for k-uniform hypergraphsNot in LeanCombinatorics for TCS

For an integer $k \ge 3$, a $k$-uniform hypergraph $H$ is iterated $k$-partite if it is a subgraph of an iterated blow-up of a single $k$-hyperedge. Is it true that for every $k$-uniform hypergraph $H$, the off-diagonal Ramsey number $r(H, K_n^{(k)})$ satisfies $r(H, K_n^{(k)}) \le n^C$ for some constant $C = C(H) > 0$ for all $n$ if and only if $H$ is iterated $k$-partite?

Posed in arXiv:2610.14829, Sec. 5, after Prop. 5.4 — New bounds for off-diagonal hypergraph Ramsey numbers

OP-248 Canonical Product Submatrix Conjecture for Forbidden ConfigurationsNot in LeanCombinatorics for TCS

Let $F$ be a fixed $(0,1)$-matrix. For any simple $(0,1)$-matrix $S$, let $\mathrm{Avoid}(S, F)$ denote the set of simple matrices obtained from $S$ by deleting zero or more columns such that $F$ is not a configuration in $A$ ($F \not\prec A$), and let $\mathrm{forb}(S, F) = \max_{A \in \mathrm{Avoid}(S, F)} \|A\|$. For non-negative integers $a, b, c$ with $p = a + b + c \ge 1$ and $n$ divisible by $p$, define the canonical product matrix $$U^{a,b,c}_{n/p} = I_{n/p}^{\times a} \times (I^c_{n/p})^{\times b} \times T_{n/p}^{\times c},$$ where $I_m$ is the $m \times m$ identity matrix, $I_m^c$ is its $(0,1)$-complement, and $T_m$ is the $m \times m$ upper triangular $(0,1)$-matrix. Is it true that for every $(0,1)$-matrix $F$, there exist non-negative integers $a, b, c$ such that $$\mathrm{forb}(n, F) = \Theta(\mathrm{forb}(U^{a,b,c}_{n/p}, F))$$ as $n \to \infty$?

Posed in arXiv:2610.13987, Conjecture 10 — Forbidding $r$-extension of $C_4$ -- a counterexample of the Anstee-Sali conjecture

What is known

The 2005 conjecture that forb(n, F) is always Theta(n^{X(F)-1}) for an integer X(F) is disproved by Theorem 4. Conjecture 10 replaces it by asserting that the extremal behavior of every forbidden configuration is achieved by taking a submatrix (deleting columns) of some canonical product of identity, complementary identity, and triangular matrices.

OP-252 Exact Glove Number of Complete Bipartite Graphs for Large nNot in LeanCombinatorics for TCS

Let $K_{n,n}$ denote the complete bipartite graph with partite sets of size $n$, and let $\mathrm{gl}(G)$ denote the glove number of a graph $G$, defined as the minimum number of reversible ambidextrous gloves needed to execute a clean handshake sequence covering all edges of $G$. Does there exist an integer $N_0$ such that for all integers $n \ge N_0$, the glove number satisfies $\mathrm{gl}(K_{n,n}) = \lfloor 3n/2 \rfloor$?

Posed in arXiv:2610.17602, Conjecture 1 — Clean handshake sequences

OP-254 Asymptotic Glove Ratio for 3-Regular GraphsNot in LeanCombinatorics for TCS

For an integer $d \ge 1$, let $\mathrm{Mgl}(d, n) = \max \{ \mathrm{gl}(G) : |V(G)| = n, G \text{ is } d\text{-regular} \}$ and define $\mathrm{Mgl}(d) = \limsup_{n \to \infty} \frac{\mathrm{Mgl}(d, n)}{n}$. Determine the exact value of $\mathrm{Mgl}(3)$, which is currently known only to lie in the range $[1/2, 4/5]$.

Posed in arXiv:2610.17602, Sec. 4, Problem 2 — Clean handshake sequences

OP-255 Complete mappings stabilizing Sylow 2-subgroups in sporadic simple groupsNot in LeanCombinatorics for TCS

Let G be any of the 13 sporadic simple groups in {Ly, Co₂, B, Th, Fi₂₂, Fi₂₃, Fi'₂₄, Ru, O'N, Co₁, Co₃, HN, M}. Does G admit a complete mapping θ : G → G that stabilizes a Sylow 2-subgroup P of G (that is, θ(P) = P)?

Posed in arXiv:2610.17631, Sec. 7 — Complete mappings stabilizing Sylow $2$-subgroups in central quotients of special linear groups

OP-257 Existence of Decay-Ramsey Failure for Superexponentially Decaying SequencesNot in LeanCombinatorics for TCS

Let $\mathcal{A}$ be the set of non-increasing sequences $\mathbf{a} = (a_i)_{i \ge 1}$ of positive real numbers such that $\sum_{i=1}^\infty a_i > 1$. For $n, k \in \mathbb{N}$, an edge-colouring $c: E(K_n) \to \mathbb{N}$ of the complete graph $K_n$ is called $\mathbf{a}$-bounded if for all $i \ge 1$, the number of edges of colour $i$ is at most $a_i \binom{n}{2}$. We write $\mathbf{a} \to K_k$ if for all sufficiently large $n$, every $\mathbf{a}$-bounded edge-colouring of $K_n$ contains a monochromatic clique $K_k$. Does there exist a sequence $\mathbf{a} \in \mathcal{A}$ satisfying $a_i \le i^{-c i}$ for some constant $c > 0$ and all sufficiently large $i$, such that $\mathbf{a} \not\to K_3$ (that is, there exist infinitely many $n \in \mathbb{N}$ admitting an $\mathbf{a}$-bounded edge-colouring of $K_n$ without monochromatic triangles)?

Posed in arXiv:2610.20577, Sec. 1, after Proposition 1.5 — Decay-Ramsey Sequences

OP-261 Existence of internal partitions in all but finitely many regular graphs of fixed degreeNot in LeanGraph Theory & Graph Algorithms

For every fixed positive integer $r$, do all but finitely many $r$-regular graphs have an internal partition? That is, does there exist an integer $n_0(r)$ such that every $r$-regular simple graph on at least $n_0(r)$ vertices admits a partition of its vertex set into two nonempty sets $A$ and $B$ where every vertex has at least $\lceil r/2 \rceil$ neighbors in its own part?

Posed in arXiv:2610.19014, Problem 1.1 — Internal partitions of $5$-regular and $8$-regular graphs

What is known

DeVos's conjecture asks whether all but finitely many r-regular graphs admit an internal partition. Prior work settled r in {3, 4, 6}, and this paper resolves r in {5, 8}. The question remains open for r = 7 and all r ≥ 9.

OP-263 Comparison of Nonnegative and Mixed Extremal Postage Stamp Bases for Higher CardinalityNot in LeanElementary Number Theory

Let $h, k$ be positive integers with $k \ge 3$. Let $n_h(A) = \max \{n \in \mathbb{N} : [0, n] \subseteq hA\}$ for any finite set $A \subset \mathbb{Z}$ containing 0 in its $h$-fold sumset $hA$. Let $n_h(k) = \max \{n_h(A) : A \subset \mathbb{N}_0, |A| = k+1\}$ and $n^\flat_h(k) = \max \{n_h(A) : A \subset \mathbb{Z}, |A| = k+1, \min(A) < 0\}$. How does $n^\flat_h(k)$ compare to $n_h(k)$ for $k \ge 3$; in particular, is $n^\flat_h(k) \le n_h(k)$ for all $h \ge 1$ and $k \ge 3$, and for which pairs $(h, k)$ does equality hold?

Posed in arXiv:2610.19470, Sec. 1, lines 183-189 — Positivity and negativity for $h$-bases for $n$

OP-267 Exact Turán numbers and extremal hypergraphs for linear stars of even degreeNot in LeanCombinatorics for TCS

Let r >= 5 and let k >= 4 be an even integer. An r-uniform hypergraph L_k^r is a linear star with k petals if it consists of k edges of size r that pairwise intersect in a unique common vertex. For an r-uniform hypergraph H, let ex_r(n, H) denote the maximum number of edges in an r-uniform hypergraph on n vertices containing no copy of H. What is the exact value of the Turán number ex_r(n, L_k^r) for all sufficiently large n, and what are all extremal r-graphs up to isomorphism? In particular, while for r = 3 the extremal family is known to be isomorphic to L_1(n,3,k,1), Claim 4.1 shows that for r >= 5 and k=4, there exists an L_4^r-free r-graph with |L_1(n,r,4,1)| + \binom{n-7}{r-4} > |L_1(n,r,4,1)| edges.

Posed in arXiv:2610.15447, Problem 4.1(a) — Tur\'an Numbers of Linear Stars and Expanded Trees

What is known

The paper proves the odd-k case for all r >= 5 (Theorem 1.2) and shows by an explicit counterexample (Claim 4.1) for k=4 that the natural candidate construction L_1(n,r,k,1) is suboptimal for even k, leaving the exact Turán numbers and extremal constructions for all even k >= 4 open.

OP-268 Exact Turán number of expanded trees when minimum degree vertices share neighborsNot in LeanCombinatorics for TCS

Let r >= 5 be an integer. Let T be a bipartite tree with color classes A and B, where |A| <= |B|. Suppose that k = min_{x in A} d_T(x) >= 3 is odd, and let A_0 = {x in A : d_T(x) = k}. Suppose further that B_0 = {y in B : |N_T(y) \cap A_0| >= 2} is nonempty (that is, some vertex in B is adjacent to at least two vertices of minimum degree in A). The r-uniform expansion T^{(r)} is the r-graph obtained by enlarging each edge of T with r-2 new, pairwise disjoint private vertices. What is the exact value of the Turán number ex_r(n, T^{(r)}) for sufficiently large n, and what are all extremal r-graphs up to isomorphism?

Posed in arXiv:2610.15447, Problem 4.1(b) — Tur\'an Numbers of Linear Stars and Expanded Trees

What is known

Theorem 1.4 determines the exact Turán number ex_r(n, T^{(r)}) = |L_2(n,r,k,a)| when B_0 is empty, but when B_0 is nonempty (i.e. some vertex in B has at least two neighbors in A of minimum degree k), only upper and lower bounds are established, leaving the exact Turán number open.

OP-271 Three-Colour Partition Regularity of Pythagorean TriplesNot in LeanElementary Number Theory

Does every 3-colouring of the positive integers contain a monochromatic Pythagorean triple, that is, three positive integers x, y, z of the same colour satisfying x^2 + y^2 = z^2? Equivalently, does there exist an integer M such that every 3-colouring of {1, 2, ..., M} contains a monochromatic Pythagorean triple?

Posed in arXiv:2610.20311, Sec. 1.1, paragraph 2 — Quantitative lower bound for Pythagorean pairs in boxes of prime powers

OP-274 Cut complexity of equal-length envy-free cake cutting for arbitrary nNot in LeanFair Division

Let $n \ge 1$ be an integer. Let $v_1, \dots, v_n$ be $n$ nonatomic Borel probability measures on $[0,1]$, representing the private valuations of $n$ agents, and let $\lambda$ denote Lebesgue measure on $[0,1]$. Does there always exist an equal-length envy-free allocation $(C_1, \dots, C_n)$ of $[0,1]$ using at most $2n-2$ cuts? That is, there exist at most $2n-2$ interior cut points partitioning $[0,1]$ into subintervals whose unions form sets $C_1, \dots, C_n$ such that $\lambda(C_i) = 1/n$ for all $i \in \{1, \dots, n\}$ and $v_i(C_i) \ge v_i(C_j)$ for all $i, j \in \{1, \dots, n\}$.

Posed in arXiv:2610.19733, Sec. 8 — Exact Cut Complexity of Equal-Length Proportional Cake Cutting

What is known

The paper establishes that 2n - 2 cuts are necessary and sufficient for equal-length proportional cake cutting for all n, and sufficient for equal-length envy-free cake cutting when n is a prime power. For general n, it proves an O(n^1.525) upper bound using a prime-gap peeling argument based on the Stromquist-Woodall theorem. Whether 2n - 2 cuts always suffice for all n (with n = 6 being the first open case) remains open.

OP-276 Simultaneous avoidance of bounded-frequency arrays by principal isotopesNot in LeanCombinatorics for TCS

Let $t \ge 1$ be a fixed positive integer. Is it true that for every sufficiently large integer $n$, whenever $L$ is a Latin square of order $n$ and $A = (A_{ij})_{i,j=1}^n$ is an $n \times n$ array of subsets of $\{1, \dots, n\}$ such that $|A_{ij}| \le t$ for all $i, j$, and each symbol $s \in \{1, \dots, n\}$ appears in at most $t$ entries of each row and each column of $A$ (that is, $|\{j : s \in A_{ij}\}| \le t$ for all $i$ and $|\{i : s \in A_{ij}\}| \le t$ for all $j$), there exist permutations $\pi, \rho \in \mathcal{S}_n$ such that $L(\pi(i), \rho(j)) \notin A_{ij}$ for all $i, j \in \{1, \dots, n\}$?

Posed in arXiv:2610.20008, Conjecture 5 — Avoiding a partial Latin square with an isotope of a given Latin square

OP-278 Separation of Majority from ACC0Not in LeanCircuit Complexity & Lower Bounds

Is the Majority function family $(\mathsf{MAJ}_n)_{n \ge 1}$ contained in the complexity class $\mathsf{ACC}^0$? That is, do there exist constants $d \in \mathbb{N}$, $c \in \mathbb{N}$, and an integer modulus $m \ge 2$ such that for every $n \ge 1$, the function $\mathsf{MAJ}_n : \{0,1\}^n \to \{0,1\}$ (where $\mathsf{MAJ}_n(x) = 1$ if $\sum_{i=1}^n x_i > n/2$ and $0$ otherwise) is computed by a Boolean circuit of depth at most $d$ and size at most $n^c$ with unbounded fan-in AND, OR, NOT, and modular gates $\mathrm{MOD}_m$?

Posed in arXiv:2610.19174, Sec. 1, lines 135-136 — Majority and Torus Polynomials: Bounded-Lift Lower Bounds and Explicit Constructions

What is known

Separating Majority from ACC0 is the overarching open question motivating the torus polynomial approximation framework introduced by Bhrushundi et al. (2019).

OP-283 Optimal Deterministic Competitive Ratio for Paging with Delay on at Least Two HolesNot in LeanOnline Algorithms

Let $k \ge 2$ and $n \ge k+2$. In the online paging problem with delay, an online algorithm manages a cache of size $k$ from a universe of $n$ pages. Requests arrive with arrival times $a_r$ and continuous, nondecreasing, unbounded delay cost functions $\operatorname{delay}_r(t - a_r)$ satisfying $\operatorname{delay}_r(0) = 0$. Serving a request requires having its page in cache at or after arrival; fetching a page into cache costs 1, evictions are free, and serving at time $s_r$ incurs delay cost $\operatorname{delay}_r(s_r - a_r)$. What is the optimal deterministic competitive ratio achievable by an online algorithm on $n \ge k+2$ pages? In particular, does there exist a deterministic online algorithm achieving competitive ratio $2k+1$, or is the optimal ratio strictly greater than $2k+1$?

Posed in arXiv:2610.18767, Sec. 7 — Two Holes Make a Difference: Deterministic Paging with Delay and Deadlines

OP-285 Optimal Leading Constant for Complementation of Two-Way Deterministic Finite AutomataNot in LeanAutomata & Formal Languages

Let $\operatorname{sc}(L)$ denote the two-way deterministic state complexity of a regular language $L \subseteq \Sigma^*$ (the minimum number of states of a 2DFA recognizing $L$ with acceptance at the left endmarker and rejection by halting or looping). For an integer $n \ge 1$, let $C(n) = \max \{ \operatorname{sc}(\Sigma^* \setminus L(A)) : A \text{ is a 2DFA with } |Q_A| \le n \}$. What is the optimal asymptotic leading constant $c = \limsup_{n \to \infty} \frac{C(n)}{n}$? In particular, is $c = 2$, or does there exist a family of $n$-state 2DFAs whose complement requires $(c - o(1))n$ states for some $c \in (2, 4]$?

Posed in arXiv:2610.18897, Sec. 9 — A Factor-Two Lower Bound for Complementing Two-Way Deterministic Finite Automata

What is known

The paper proves that direction-determinate n-state 2DFAs can be complemented in 2n states, and general n-state 2DFAs in 2n+2b <= 4n states, where b is the number of states entered from both directions. It establishes a lower bound of 2n states using a direction-determinate witness over a 3-letter alphabet, leaving open the exact leading constant for general sources between 2 and 4.

OP-287 Log-concavity of longest increasing subsequence distribution for intermediate lengthsNot in LeanCombinatorics for TCS

Let $\mathfrak{S}_n$ be the symmetric group of permutations of $\{1, \dots, n\}$. For $w \in \mathfrak{S}_n$, let $\operatorname{LIS}(w)$ denote the length of the longest increasing subsequence in $w$, and for $1 \le k \le n$, let $P_{n,k} = \#\{w \in \mathfrak{S}_n : \operatorname{LIS}(w) = k\}$, with $P_{n,0} = P_{n,n+1} = 0$. Does the log-concavity inequality $P_{n,k}^2 \ge P_{n,k-1} P_{n,k+1}$ hold for all integers $n$ in the range $51 \le n < 10^{10^{65}}$ and all $1 \le k \le n$?

Posed in arXiv:2610.18235, Sec. 4, para. 2 — On Chen's conjecture for the log-concavity of the longest increasing subsequence distribution

What is known

Theorem 1.2 proves strict log-concavity for all n >= 10^{10^65}, and prior computational work verified it for n <= 50. The intermediate range 51 <= n < 10^{10^65} remains open.

OP-288 Infinite log-concavity of the longest increasing subsequence distributionNot in LeanCombinatorics for TCS

Let $\mathfrak{S}_n$ be the symmetric group on $\{1, \dots, n\}$, and for $1 \le k \le n$, let $P_{n,k}$ count the number of permutations in $\mathfrak{S}_n$ whose longest increasing subsequence has length $k$, with $P_{n,k} = 0$ for $k \le 0$ and $k > n$. For a sequence $a = (a_k)_{k \in \mathbb{Z}}$, define the log-concavity operator $\mathcal{L}$ by $(\mathcal{L}a)_k = a_k^2 - a_{k-1} a_{k+1}$. The sequence $a$ is called infinitely log-concave if for every positive integer $m$, the $m$-th iterate $\mathcal{L}^m(a)$ is entrywise nonnegative. For every positive integer $n$, is the sequence $(P_{n,k})_{k=1}^n$ infinitely log-concave?

Posed in arXiv:2610.18235, Sec. 4, para. 3 — On Chen's conjecture for the log-concavity of the longest increasing subsequence distribution

What is known

The paper establishes first-order log-concavity for large n, but leaves higher-order and infinite log-concavity completely open. The property is known to hold only for n <= 50.

OP-289 Chromatic-choosability of claw-free graphsNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite simple graph that is claw-free (that is, $G$ contains no induced subgraph isomorphic to the complete bipartite graph $K_{1,3}$). Is $G$ chromatic-choosable, that is, does its choice number (list chromatic number) satisfy $\chi_\ell(G) = \chi(G)$?

Posed in arXiv:2610.16258, Sec. 1, lines 124-126 — Elementary graphs are chromatic-choosable

OP-290 Chromatic-choosability of claw-free perfect graphsNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite simple claw-free perfect graph (that is, $G$ contains no induced $K_{1,3}$ and every induced subgraph $H \subseteq G$ satisfies $\chi(H) = \omega(H)$). Does every such graph satisfy $\chi_\ell(G) = \chi(G)$ (and thus $\chi_\ell(G) = \chi(G) = \omega(G)$)?

Posed in arXiv:2610.16258, Sec. 1, lines 126-128 — Elementary graphs are chromatic-choosable

OP-291 Constant average degree threshold for edge-disjoint nested cycles with compatible cyclic ordersNot in LeanGraph Theory & Graph Algorithms

For every positive integer $k$, does there exist a constant $d(k) > 0$ such that every finite simple graph $G$ with average degree at least $d(k)$ contains $k$ pairwise edge-disjoint cycles $C_1, C_2, \ldots, C_k$ with nested vertex sets $V(C_1) \subseteq V(C_2) \subseteq \cdots \subseteq V(C_k)$ and compatible cyclic orders (that is, the cycles can be oriented such that for every $1 \le i < j \le k$, the cyclic order induced by $C_j$ on $V(C_i)$ coincides with the cyclic order of $C_i$)?

Posed in arXiv:2610.16572, Sec. 1, p. 2 — New tools for sparse graph embeddings: Hybrid expanders and application to nested cycles

What is known

The paper resolves Thomassen's conjecture up to a 2^{O(log* n)} factor (Theorem 1.1), leaving the original constant average degree conjecture open.

OP-293 Existence of a (5:2)-coloring in every 4-regular graphNot in LeanGraph Theory & Graph Algorithms

Let G be a finite simple 4-regular graph. Does G always admit a (5:2)-coloring, that is, a map c from the vertex set V(G) to the 2-subsets of {1, 2, 3, 4, 5} such that for every vertex v of G, the union of the color sets of the neighbors of v equals {1, 2, 3, 4, 5}, or equivalently, five total dominating sets of G such that every vertex belongs to at most two of them?

Proposed here, building on arXiv:2610.19450, Theorem 1.3 — Every cubic graph has four total dominating sets covering each vertex at most twice; the paper does not ask it

What is known

Theorem 1.3 settles the degree-3 case by proving that every cubic graph admits four total dominating sets covering each vertex at most twice, which Proposition 2.1 shows is equivalent to having a (4:2)-coloring. For degree r = 4, the natural analogue asks whether every 4-regular graph admits five total dominating sets covering each vertex at most twice, or equivalently a (5:2)-coloring. While the 1992 theorem on uniform regular hypergraphs establishes that every 4-regular graph has two disjoint total dominating sets (yielding five total dominating sets covering each vertex at most three times), reducing the vertex coverage from three to two remains open.

OP-294 Exact maximin share allocations for three types of choresNot in LeanFair Division

Let $N = \{1, \dots, n\}$ be a set of $n \ge 3$ agents and let $M$ be a finite set of indivisible chores partitioned into three types $M = C_1 \cup C_2 \cup C_3$. Each agent $i \in N$ has an additive cost function $c_i : 2^M \to \mathbb{R}_{\ge 0}$ such that chores of the same type have identical cost for agent $i$: for each $k \in \{1, 2, 3\}$ and each $o \in C_k$, $c_i(\{o\}) = d_{i,k} \ge 0$. For any partition $P = (X_1, \dots, X_n)$ of $M$, agent $i$'s worst-bundle cost is $\max_{j \in N} c_i(X_j)$, and agent $i$'s maximin share is $\mathrm{MMS}_i(M) = \min_{P = (X_1, \dots, X_n)} \max_{j \in N} c_i(X_j)$. Does there always exist an allocation (a partition of $M$ into $n$ bundles $A = (A_1, \dots, A_n)$) such that every agent receives a bundle of cost at most their maximin share, i.e., $c_i(A_i) \le \mathrm{MMS}_i(M)$ for all $i \in N$?

Posed in arXiv:2610.19099, Section 6 — Maximin share allocations for two types of items

What is known

The paper proves that exact MMS allocations always exist and can be computed in polynomial time when items are partitioned into at most two types of chores (Theorem 1). However, the proof relies fundamentally on 2D unimodular triangulations of lattice polygons (via Pick's theorem), which fails in dimension d ≥ 3. While general additive instances with many chore types can fail to admit exact MMS allocations, it remains open whether three chore types always guarantee existence.

OP-295 Finiteness of asymptotic orders of magnitude for oriented graph saturationNot in LeanGraph Theory & Graph Algorithms

Let sat(n, G) denote the oriented saturation function of a fixed finite oriented graph G, defined as the minimum number of edges in an oriented graph on n vertices that does not contain G as a subgraph, but such that adding any missing directed edge creates a copy of G. Are there only finitely many distinct asymptotic orders of magnitude attained by sat(n, G) across all finite oriented graphs G as n → ∞?

Posed in arXiv:2610.18600, Question 4.3 — Saturation and semisaturation of oriented graphs

What is known

The paper establishes four distinct orders of magnitude: O(1), Theta(n), Theta(n sqrt(log n)), and Theta(n log n), contrasting with the unordered and vertex-ordered settings where only O(1) and Theta(n) occur. Whether intermediate or higher growth rates exist remains completely open.

OP-296 Structural characterization of oriented graphs with an isolated edge having bounded saturationNot in LeanGraph Theory & Graph Algorithms

Let G be a finite oriented graph containing an isolated edge (i.e. G is isomorphic to G' + e for some oriented graph G' and a disjoint directed edge e). By Lemma 1.5, sat(n, G) is either O(1) or Theta(n). Can the class of oriented graphs containing an isolated edge that have bounded saturation function sat(n, G) = O(1) be structurally characterized?

Posed in arXiv:2610.18600, Question 4.4 — Saturation and semisaturation of oriented graphs

What is known

Lemma 1.5 proves that if G contains an isolated edge, sat(n, G) is either O(1) or Theta(n). While deletion-homogeneous supergraphs yield O(1) examples and degree gap conditions yield Theta(n) examples, a full structural characterization remains open.

OP-303 Maximum number of hops in a graph of given order and sizeNot in LeanGraph Theory & Graph Algorithms

For integers $n \ge 1$ and $0 \le m \le \binom{n}{2}$, let $M(n, m)$ denote the maximum number of hops (derangements $h \in \mathrm{Sym}(V)$ such that $\{v, h(v)\} \in E$ for all $v \in V$) across all simple graphs $G = (V, E)$ with $|V| = n$ vertices and $|E| = m$ edges. Determine $M(n, m)$ as an explicit function of $n$ and $m$, and characterize the extremal graphs achieving this maximum.

Posed in arXiv:2610.18463, Question 5.6 — The group generated by a graph's derangements

OP-304 Approximation ratio of 5/2 for Mixed-Percentile two-facility location on the lineNot in LeanMechanism Design & Auctions

In the two-facility location problem with candidate locations on the line metric (ℝ, |·|), where n agents have private positions and known approval preferences over two distinct facilities, does the universally strategyproof mechanism Mixed-Percentile achieve an expected approximation ratio of at most 5/2 with respect to the social cost?

Posed in arXiv:2610.18006, Conjecture A.2 — Truthful Two-Facility Location with Candidate Locations in Metric Spaces

What is known

The paper proves a lower bound of 5/2 for universally strategyproof mechanisms on the line for social cost and an upper bound of 3 with Serial-Pair. An LLM produced a proof candidate that Mixed-Percentile achieves 5/2, but it was too long and complex to verify by hand, so the authors posed it as Conjecture A.2.

OP-307 Erdos-Frankl-Furedi Quadratic Threshold Conjecture for Cover-Free FamiliesNot in LeanCombinatorics for TCS

For every integer $r \ge 1$, let $T(r)$ denote the minimum integer $n \ge 1$ such that there exists an $r$-cover-free family $\mathcal{F}$ of subsets of an $n$-element set with $|\mathcal{F}| > n$, where $\mathcal{F}$ is $r$-cover-free if no member $A \in \mathcal{F}$ is contained in the union of any subfamily of at most $r$ other members of $\mathcal{F}$. Is $T(r) \ge (r+1)^2$ for every $r \ge 1$?

Posed in arXiv:2610.22021, Conjecture 3.1 — The asymptotic Erd{\H{o}}s--Frankl--F\"uredi cover-free conjecture

Reported solved in the literature; not yet checked in Lean.

OP-311 Minimality of order 34 for planar hypohamiltonian graphsNot in LeanGraph Theory & Graph Algorithms

A simple undirected graph G = (V, E) is hypohamiltonian if G is not Hamiltonian (contains no Hamiltonian cycle), but for every vertex v in V, the vertex-deleted subgraph G - v is Hamiltonian. A graph is planar if it admits an embedding in the plane with no crossing edges. Is 34 the minimum order of a planar hypohamiltonian graph? That is, does every planar hypohamiltonian graph have at least 34 vertices?

Posed in arXiv:2610.21210, Conjecture 1.6 — Local modifications in planar hypohamiltonian graphs

OP-315 Krenn-Gu conjecture on the matching index of multigraphs on more than four verticesNot in LeanQuantum Computation

Let $G = (V, E)$ be a finite loopless multigraph with $|V| > 4$. An edge colouring $c : E \to \mathbb{N}$ and non-zero weight assignment $w : E \to \mathbb{C} \setminus \{0\}$ make $G$ an edge-coloured, edge-weighted graph $G_c^w$. A perfect matching $M$ of $G$ induces an inherited vertex colouring $vc_M : V \to \mathbb{N}$ where each vertex receives the colour of its incident matching edge. The weight of an inherited vertex colouring $vc$ is $w(vc) = \sum_{M \in \mathcal{M}_{vc}} \prod_{e \in M} w(e)$, where $\mathcal{M}_{vc}$ is the set of perfect matchings inducing $vc$. The graph $G_c^w$ is a GHZ graph if every feasible monochromatic inherited vertex colouring has weight $1$ and every non-monochromatic inherited vertex colouring has weight $0$. The matching index $\mu(G)$ is the maximum number of feasible monochromatic inherited vertex colourings over all GHZ weightings and colourings of $G$. Is $\mu(G) \le 2$ for every loopless multigraph $G$ with $|V| > 4$?

Posed in arXiv:2610.22190, Conjecture 5 — Connectivity Bounds for GHZ Graphs

What is known

The central open conjecture bridging photonic quantum experiments and graph theory, widely publicized with cash prizes.

OP-316 Bound of n / 2 on the matching index of monochromatic-edge GHZ graphsNot in LeanQuantum Computation

Let $G = (V, E)$ be a finite loopless multigraph with $n = |V| > 4$ vertices in the ordinary edge-colouring setting (where each edge has a single colour, without bichromatic half-edges). Let $\mu(G)$ denote the matching index of $G$, defined as the maximum number of feasible monochromatic inherited vertex colourings attainable by any GHZ edge-colouring and non-zero complex edge-weighting of $G$. Is $\mu(G) < n/2$ for every such graph $G$?

Posed in arXiv:2610.22190, Sec. 1.2, paragraph 'Absence of bichromatic edges or multi-edges' — Connectivity Bounds for GHZ Graphs

What is known

Posed by Cervera-Lierta et al. (2022) using SAT solvers; the best current general upper bound for simple graphs is $n/\sqrt{2}$ by Chandran and Gajjala (2024).

OP-318 Linear-Time Decidability of the Claw Game on Graphs with Maximum Degree 3Not in LeanCombinatorial Games

Does there exist an algorithm that, given any claw-connected finite simple graph $G$ with maximum degree $\Delta(G) \le 3$, decides whether Maker has a winning strategy in the unbiased claw Maker-Breaker game on $G$ in time $\mathcal{O}(|V(G)|)$?

Posed in arXiv:2610.21878, Sec. 6, paragraph 1 — A Linear-Time Algorithm for the Unbiased Claw Game on Graphs with Maximum Degree 4

What is known

The paper solves the unbiased claw game in linear time for all claw-connected graphs except those with maximum degree 3, reducing the general game to this case via Corollary 4.3.

OP-322 Optimal Approximation Ratio for Non-Monotone DR-Submodular Maximization over Down-Closed SetsNot in LeanSubmodular & Combinatorial Optimization

Let $K \subseteq [0, 1]^n$ be a non-empty compact convex down-closed set, and let $F : [0, 1]^n \to \mathbb{R}_{\ge 0}$ be a continuously differentiable, $L$-smooth DR-submodular function (i.e., coordinatewise $\nabla F(x) \ge \nabla F(y)$ whenever $x \le y$, and $\|\nabla F(x) - \nabla F(y)\|_2 \le L \|x - y\|_2$). An approximation ratio $\alpha \in [0, 1]$ is achievable if there exists an algorithm accessing $F$ via cube-wide value and full-gradient queries and $K$ via a linear maximization oracle that, for every $\varepsilon, \delta \in (0, 1)$, outputs $\widehat{x} \in K$ satisfying $\mathbb{E}[F(\widehat{x})] \ge (\alpha - \varepsilon) \max_{x \in K} F(x) - \delta L D^2$ (where $D = \operatorname{diam}(K)$) with query complexity polynomial in $n, \varepsilon^{-1}, \delta^{-1}$. Let $\alpha^\star$ be the supremum of achievable approximation ratios. What is the value of $\alpha^\star$, and in particular does there exist a polynomial-query algorithm achieving an approximation ratio $\alpha \ge 0.46$?

Posed in arXiv:2610.21072, Sec. 1, eq. (3) and Abstract — A 0.4584-approximation for DR-submodular maximization over down-closed convex sets

What is known

The paper improves the algorithmic lower bound for non-monotone DR-submodular maximization over down-closed convex sets from 4/9 ≈ 0.4444 to 0.4584, while the symmetry-gap hardness threshold is β* ≈ 0.470439. This leaves the exact optimal approximation ratio in [0.4584, 0.4705) open.

OP-323 Conjecture that the rich-neighbor chromatic index is at most twice the chromatic indexNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite loopless multigraph. An edge in a proper edge-coloring of $G$ is called rich if all edges adjacent to it receive pairwise distinct colors. A proper edge-coloring is a rich-neighbor edge-coloring if every non-isolated edge of $G$ is adjacent to at least one rich edge. The rich-neighbor chromatic index $\chi'_{\mathrm{rn}}(G)$ is the minimum number of colors in a rich-neighbor edge-coloring of $G$. Is it true that every loopless multigraph $G$ satisfies $\chi'_{\mathrm{rn}}(G) \le 2\chi'(G)$, where $\chi'(G)$ denotes the chromatic index of $G$?

Posed in arXiv:2610.21036, Conjecture 4.1 — Linear bounds for rich-neighbor edge-colorings

OP-324 Optimal list replicability bound of order log M log NNot in LeanComputational Learning Theory

Let $X$ be a finite set of size $N \ge 2$, and let $\mathcal{C} \subseteq \{-1, 1\}^X$ be a concept class of size $M \ge 2$. Is there an absolute constant $C > 0$, independent of $M$ and $N$, such that the list replicability number $\LR(\mathcal{C})$ satisfies $\LR(\mathcal{C}) \le C \log M \log N$? Here $\LR(\mathcal{C}) = \sup_{\varepsilon > 0} \LR(\mathcal{C}, \varepsilon)$, where $\LR(\mathcal{C}, \varepsilon)$ is the minimum positive integer $L$ such that the space $\Delta_{\mathcal{C}}$ of realizable probability distributions on $X \times \{-1, 1\}$ admits a finite closed cover $\{R_a\}_{a \in A}$ of multiplicity at most $L$ and hypotheses $h_a : X \to \mathbb{R}$ such that $\loss_\mu(h_a) \le \varepsilon$ for all $\mu \in R_a$, where $\loss_\mu(h) = \frac{1}{2}\mathbb{E}_{(x,y)\sim\mu}|h(x)-y|$.

Posed in arXiv:2610.20657, Sec. 1, paragraph 3 — A polylogarithmic bound for list replicability

OP-326 The Elphick-Wocjan conjecture bounding clique number by positive eigenvaluesNot in LeanGraph Theory & Graph Algorithms

Let $G = (V, E)$ be a finite simple graph on $n \ge 1$ vertices with clique number $\omega(G)$. Let $A$ be the adjacency matrix of $G$, and let $\lambda_1 \ge \lambda_2 \ge \dots \ge \lambda_n$ be its eigenvalues. Let $s^+(G) = \sum_{\lambda_i > 0} \lambda_i^2$ be the sum of squares of all positive eigenvalues of $G$ (counted with multiplicity). Does the inequality $\sqrt{s^+(G)} \le n \left(1 - \frac{1}{\omega(G)}\right)$ (or equivalently, $\omega(G) \ge \frac{n}{n - \sqrt{s^+(G)}}$) hold for every finite simple graph $G$?

Posed in arXiv:2610.21388, Sec. 1, eq. (3) — Stronger Spectral Bound for Clique Number

What is known

Wilf's 1967 bound states that $\lambda_1 \le n(1 - 1/\omega)$. The 2018 conjecture replaces $\lambda_1$ by the root sum of squares of all positive eigenvalues $\sqrt{s^+}$. The paper proves it for graph families $B_3$ and $B_4$, but it remains open for general graphs.

OP-328 Generalized Erdős–Ginzburg–Ziv Constant for Prime-Power Abelian Groups of Rank at Least FourNot in LeanElementary Number Theory

Let $r \ge 4$ be an integer and let $q$ be a prime power. For every integer $k \ge r$, does the generalized Erdős–Ginzburg–Ziv constant $s_{kq}(C_q^r)$ of the elementary abelian group $C_q^r = (\mathbb{Z}/q\mathbb{Z})^r$ satisfy $s_{kq}(C_q^r) = (k + r)q - r$? That is, does every sequence over $(\mathbb{Z}/q\mathbb{Z})^r$ of length $(k + r)q - r$ contain a zero-sum subsequence of length $kq$?

Posed in arXiv:2610.21577, Conjecture 1.1 — Generalized Erd\H{o}s--Ginzburg--Ziv Constants for finite abelian groups of rank three

What is known

While settled for rank r = 1, 2, and now r = 3 (by the paper under review), the conjecture remains open for all ranks r ≥ 4.

OP-329 Critical Multiplier for the Generalized Erdős–Ginzburg–Ziv ConstantNot in LeanElementary Number Theory

Let $G$ be a finite abelian group with exponent $\exp(G) = n$, and let $\mathsf{D}(G)$ be the Davenport constant of $G$. Let $\ell(G)$ be the smallest integer $t$ such that $s_{kn}(G) = kn + \mathsf{D}(G) - 1$ holds for every integer $k \ge t$. Is it true that $\ell(G) = \lceil \mathsf{D}(G) / n \rceil$ for every finite abelian group $G$?

Posed in arXiv:2610.21577, Sec. 1, lines 60-63 — Generalized Erd\H{o}s--Ginzburg--Ziv Constants for finite abelian groups of rank three

What is known

It is known that D(G)/n ≤ ℓ(G) ≤ |G|/n. Determining whether the lower ceiling bound always holds is a major open problem in zero-sum theory cited in the paper.

OP-331 Necessary and Sufficient Conditions for Subadditivity of Mutual f-InformationNot in LeanInformation Theory & Coding

Let f : [0, \infty) \to \mathbb{R} \cup \{+\infty\} be a convex function satisfying f(1) = 0. For finite discrete random variables X, Y, define the mutual f-information by \widetilde{I}_f(X; Y) = D_f(p_{XY} \| p_X p_Y) = \sum_{x, y} p_X(x) p_Y(y) f(p_{XY}(x,y) / (p_X(x) p_Y(y))). Determine necessary and sufficient conditions on f such that for all finite discrete random variables X, Y, Z satisfying p_{XYZ} = p_X p_{Y|X} p_{Z|X} (the Markov chain condition Y \to X \to Z), the subadditivity inequality \widetilde{I}_f(X; YZ) \le \widetilde{I}_f(X; Y) + \widetilde{I}_f(X; Z) holds.

Posed in arXiv:2610.21231, Sec. I — On the Subadditivity of Mutual f-Information

What is known

The paper establishes a sufficient differential condition on g(x) = x^2 f''(x) and provides several new parametric families of subadditive generators, but notes that a complete necessary and sufficient characterization of all functions f yielding subadditive mutual f-information remains open.

OP-335 The Lonely Runner ConjectureNot in LeanElementary Number Theory

Let $n \ge 1$ be an integer, and let $V \subset \mathbb{N}$ be a set of $n$ distinct positive integers. Is it true that $\mathrm{ML}(V) = \max_{t \in \mathbb{R}/\mathbb{Z}} \min_{v \in V} \|v t\| \ge \frac{1}{n+1}$, where $\|x\| = \mathrm{dist}(x, \mathbb{Z})$ denotes the distance from $x$ to the nearest integer?

Posed in arXiv:2610.23790, Sec. 1, line 135 — Near optimal gap in the Lonely Runner Conjecture

OP-338 Large Quasi-kernel ConjectureNot in LeanGraph Theory & Graph Algorithms

Let $D = (V, E)$ be a finite loopless directed graph. For any subset $Q \subseteq V$, let $N_D^+[Q] = Q \cup \{v \in V \setminus Q : \exists u \in Q, (u, v) \in E\}$ denote the closed out-neighbourhood of $Q$. Does every digraph $D$ admit a quasi-kernel $Q$ (an independent set reaching every vertex in at most two steps) such that $|N_D^+[Q]| \ge |V|/2$?

Posed in arXiv:2610.23487, Conjecture 1.2 — Small and large quasi-kernels: a weighted transfer theorem

OP-341 Sharp Hole Budget Bound for Second-Order Augmented Zarankiewicz NumbersNot in LeanCombinatorics for TCS

For all integers m, n >= 2, is the second-order augmented Zarankiewicz number bounded by the second-order Zarankiewicz number and the hole deficit according to z_{2A}(m,n) <= z_2(m,n) + floor(H_limited(m,n) / 3), where H_limited(m,n) = mn + z(m,n) - 2*z_2(m,n) is the number of unoccupied cells in a limited extremal configuration on the m x n grid?

Posed in arXiv:2610.22875, Conjecture 13 — Overtake and the recursive-line equality for second-order Zarankiewicz numbers

What is known

The paper proves that z_{2A} <= z_2 + floor((H_limited - 1)/2) and that every unit move costs 3 holes, conjecturing this sharper bound for all m,n >= 2.

OP-342 Overtake Threshold for Second-Order Zarankiewicz NumbersNot in LeanCombinatorics for TCS

For integers m, n with min(m,n) >= 3, does an overtake (the strict inequality z_{2A}(m,n) > z_2(m,n) between the second-order augmented Zarankiewicz number and the second-order Zarankiewicz number) occur if and only if H_limited(m,n) >= 5?

Posed in arXiv:2610.22875, Conjecture 14 — Overtake and the recursive-line equality for second-order Zarankiewicz numbers

OP-343 Recursive-Line Equality for Second-Order Zarankiewicz Numbers at the Four Unsettled OrdersNot in LeanCombinatorics for TCS

Does the recursive-line equality z_2(m,n) = z_RL(m,n) hold at the four open orders (m,n) in {(12,4), (14,4), (11,5), (8,7)} in the range n <= 7, yielding the exact values z_2(12,4) = 32, z_2(14,4) = z_RL(14,4), z_2(11,5) = 37, and z_2(8,7) = 38?

Posed in arXiv:2610.22875, Sec. 7, "The four open orders" — Overtake and the recursive-line equality for second-order Zarankiewicz numbers

OP-344 Tight universal EF1 approximation factor for Round-Robin pure Nash equilibriaNot in LeanFair Division

Let alpha_RR be the supremum of all constants alpha in [0, 1] such that for every instance with n agents and m indivisible goods with nonnegative additive valuations, every pure Nash equilibrium of the Round-Robin mechanism induces an alpha-EF1 allocation with respect to the agents' true valuations. What is the exact value of alpha_RR, which is currently known only to satisfy 1/2 <= alpha_RR <= 2/3?

Posed in arXiv:2610.23686, Sec. 6, first paragraph — Revisiting the Fairness of Pure Nash Equilibria of Round-Robin

What is known

The paper proves every pure Nash equilibrium of Round-Robin is 1/2-EF1 (Theorem 1) and provides a family of equilibria showing no factor strictly greater than 2/3 is guaranteed (Theorem 2). The exact value of alpha_RR in [1/2, 2/3] remains unknown.

OP-347 Closing the gap between 3/2 and O(log n) metric distortion for deterministic ordinal MSTNot in LeanAlgorithm Design & Analysis

Let V be a finite set of n vertices and d a pseudometric on V. An ordinal profile π consistent with d specifies, for each v ∈ V, a strict ranking of V \ {v} where u appears before w whenever d(v, u) < d(v, w). A deterministic ordinal algorithm takes π and outputs a spanning tree T of the complete graph on V. Its distortion is sup_{d consistent with π} cost_d(T) / cost_d(MST_d). Does there exist a deterministic ordinal algorithm with distortion o(log n) (or O(1)) on all finite metric spaces, or does every deterministic ordinal algorithm have distortion ω(1) or Ω(log n)?

Posed in arXiv:2610.23032, Sec. 10 — On the Metric Distortion of the Minimum Spanning Tree Problem

What is known

The paper establishes an upper bound of 2 ceil(log_2 n) on the metric distortion of deterministic ordinal algorithms for minimum spanning trees, and a lower bound of 3/2 - ε. Closing this exponential gap between O(log n) and 3/2 is the central open problem left by the paper.

OP-348 Minimality of g-adic Asymptotic Bases for Partitions with g at Most hNot in LeanElementary Number Theory

Let $g, h$ be integers with $2 \leq g \leq h$. For any nonempty subset $W \subseteq \mathbb{N}$, define $A_g(W) = \{\sum_{f \in F} a_f g^f : F \subseteq W \text{ finite nonempty}, 1 \leq a_f \leq g - 1\}$. Given a partition $\mathbb{N} = W_1 \sqcup \cdots \sqcup W_h$ into $h$ infinite pairwise disjoint sets, let $A = \bigcup_{i=1}^h A_g(W_i)$. Under the product probability measure on partitions $\mathbb{N} \to \{1, \dots, h\}$ where each natural number is assigned independently and uniformly at random to one of the $h$ parts with probability $1/h$, is $A$ almost surely a minimal asymptotic basis of order $h$?

Posed in arXiv:2610.23152, Problem 2 — Minimal asymptotic \(g\)-adic bases from arbitrary partitions

What is known

Theorem 1.1 settles Problem 2 affirmatively for all infinite partitions when g > h. The question remains open when 2 ≤ g ≤ h, where counterexamples exist for specific partitions and the almost-sure behavior is unknown.

OP-350 Existence of Minimal Mixed Orthogonal Arrays of Strength Two with Six Factors for Nine Parameter SetsNot in LeanCombinatorics for TCS

Let a mixed orthogonal array $\text{MOA}(N; s_1 s_2 \dots s_k, t)$ be an $N \times k$ array with entries in column $i$ from $\{0, 1, \dots, s_i - 1\}$ such that in every $N \times t$ subarray, every possible $t$-tuple of symbols occurs equally often as a row (with frequency $N / \prod_{j \in J} s_j$ for each column index subset $J$ of size $t$). For a 6-tuple of factor levels $(a,b,c,d,e,f)$ with each entry $> 1$, let $M = \operatorname{lcm}\{\alpha\beta : \{\alpha,\beta\} \subset \{a,b,c,d,e,f\}\}$. Let $\mathcal{P}$ denote the set of nine 6-tuples of factor levels: $(10, 10, 10, 10, 10, 10)$ with $M = 100$; $(10, 10, 10, 10, 10, 5)$ with $M = 100$; $(10, 10, 10, 10, 10, 2)$ with $M = 100$; $(10, 10, 10, 10, 5, 5)$ with $M = 100$; $(10, 10, 10, 10, 2, 5)$ with $M = 100$; $(22, 22, 22, 22, 22, 22)$ with $M = 484$; $(22, 22, 22, 22, 22, 11)$ with $M = 484$; $(22, 22, 22, 22, 22, 2)$ with $M = 484$; and $(22, 22, 22, 22, 11, 11)$ with $M = 484$. For each $abcdef \in \mathcal{P}$, does there exist an $\text{MOA}(M; a b c d e f, 2)$?

Posed in arXiv:2610.22775, Sec. 4, Problem 1 — On the existence of mixed orthogonal arrays of strength two with six factors

OP-351 Existence Spectrum of Minimal Mixed Orthogonal Arrays of Strength Two with Seven FactorsNot in LeanCombinatorics for TCS

Let a mixed orthogonal array $\text{MOA}(N; s_1 s_2 \dots s_7, 2)$ be an $N \times 7$ array where each column $i$ has symbols from $\{0, \dots, s_i - 1\}$ such that in every pair of distinct columns $i, j$, each pair of symbols occurs equally often as a row (namely $N / (s_i s_j)$ times). For integers $a,b,c,d,e,f,g > 1$, define the minimal necessary run size $M^* = \operatorname{lcm}\{\alpha\beta : \{\alpha,\beta\} \subset \{a,b,c,d,e,f,g\}\}$. For which 7-tuples $(a,b,c,d,e,f,g)$ does there exist an $\text{MOA}(M^*; abcdefg, 2)$?

Posed in arXiv:2610.22775, Sec. 4, Problem 2 — On the existence of mixed orthogonal arrays of strength two with six factors

OP-354 Exact Communication Complexity of OR in Multiparty Private Simultaneous MessagesNot in LeanCommunication Complexity

What is the asymptotic communication complexity of the n-party OR function OR_n(x_1, ..., x_n) = ⋁_{i=1}^n x_i (where each party holds one input bit x_i) in a perfectly correct, support-private (or perfectly private) Private Simultaneous Messages protocol? Specifically, is C(OR_n) = Θ(n log n), or does there exist a protocol with communication complexity o(n log n)?

Posed in arXiv:2610.21216, Section 1.1, below Theorem 1 — On the Complexity of Symmetric Boolean Functions in Multiparty Private Simultaneous Messages

OP-358 Decidability of Reachability for Symmetric d-Counter Machines with d >= 3Not in LeanAutomata & Formal Languages

Let d ≥ 3 be an integer. A d-counter machine M = (Q, T) consists of a finite state set Q and transitions T ⊆ Q × I × Q, where instructions I are counter updates update(w) with w ∈ ℤ^d and zero-tests zero-test(i) for i ∈ {1, ..., d}. The machine is symmetric if its update transitions are invariant under the action of the full symmetric group S_d on coordinates (with no symmetry restriction on zero-tests). Is the configuration-to-configuration reachability problem decidable for symmetric d-counter machines?

Posed in arXiv:2610.23495, Conjecture 3 — Symmetric two-counter machines

What is known

The paper proves decidability for symmetric 2-counter machines (Theorem 1) and undecidability for cyclic permutation groups of order d >= 3 (Theorem 2), but leaves open whether symmetry under the full symmetric group S_d makes reachability decidable for d >= 3.

OP-361 Competitive ratio of Greedy for online triangle-free-crossing matchingNot in LeanOnline Algorithms

Let P ⊂ ℝ² be a finite set of points in general position. A set of straight-line segments L with endpoints in P is triangle-free-crossing if no three segments in L pairwise cross (their relative interiors do not pairwise intersect). A triangle-free family L of ℓ segments blocks an unmatched point set Q ⊂ ℝ² (in general position with L) if for every pair of distinct points u, v ∈ Q, the segment uv pairwise crosses two segments of L that cross each other, so that L ∪ {uv} is not triangle-free. Let β_△(ℓ) be the maximum cardinality of a point set blocked by a triangle-free family of ℓ segments. Is it true that for every positive integer ℓ, β_△(ℓ) ≤ ℓ? Equivalently, does the deterministic Greedy algorithm for online triangle-free-crossing geometric matching have asymptotic competitive ratio at least 2/3?

Posed in arXiv:2610.23130, Sec. 5, Conjecture 5.1 — Online geometric matching and segments block points

OP-362 Deterministic online algorithm beating two-thirds competitive ratio for k-crossing matchingNot in LeanOnline Algorithms

In the online geometric k-crossing matching problem, an adversary presents a sequence of n points in ℝ² in general position one by one. Upon the arrival of each point v, an online algorithm must either irrevocably match v to an existing unmatched point u or leave v unmatched, subject to the constraint that in the resulting geometric matching L, each straight-line segment crosses the relative interior of at most k other matched segments. For every fixed integer k ≥ 1, does there exist a deterministic online algorithm that achieves an asymptotic competitive ratio strictly greater than 2/3?

Posed in arXiv:2610.23130, Sec. 5, first bullet — Online geometric matching and segments block points

OP-364 Optimal randomized competitive ratio for online noncrossing geometric matchingNot in LeanOnline Algorithms

In the online noncrossing geometric matching problem, points in ℝ² in general position arrive one by one, and an algorithm must irrevocably match arriving points with noncrossing straight-line segments. What is the supremum of competitive ratios ρ achievable by randomized online algorithms against an oblivious adversary? (The best known bounds establish that ρ lies in [0.67034, 6/7].)

Posed in arXiv:2610.23130, Sec. 5, fifth bullet — Online geometric matching and segments block points

OP-365 Simonovits-Sos Conjecture on 3-AP-Intersecting FamiliesNot in LeanCombinatorics for TCS

Let $n \ge 3$ be an integer. A non-constant 3-term arithmetic progression (3-AP) in $\{1,\dots,n\}$ is a set of the form $\{a, a+d, a+2d\}$ with $a, d \ge 1$ and $a+2d \le n$. A family $\mathcal{F} \subseteq 2^{[n]}$ is 3-AP-intersecting if for every pair of sets $F_1, F_2 \in \mathcal{F}$, the intersection $F_1 \cap F_2$ contains at least one non-constant 3-AP. Does every 3-AP-intersecting family $\mathcal{F} \subseteq 2^{[n]}$ satisfy $|\mathcal{F}| \le 2^{n-3}$ (or equivalently, does the maximum uniform density satisfy $m_3 = 1/8$)?

Posed in arXiv:2610.26243, Conjecture 1.2 — Families that intersect in an arithmetic progression

OP-366 Generalized Simonovits-Sos Conjecture on k-AP-Intersecting FamiliesNot in LeanCombinatorics for TCS

For integers $k \ge 3$ and $n \ge k$, a $k$-term arithmetic progression ($k$-AP) in $\{1, \dots, n\}$ is a set $Q(a,d) = \{a, a+d, \dots, a+(k-1)d\}$ with $a, d \ge 1$ and $a+(k-1)d \le n$. A family $\mathcal{F} \subseteq 2^{[n]}$ is $k$-AP-intersecting if $F_1 \cap F_2$ contains a $k$-AP for all $F_1, F_2 \in \mathcal{F}$. Let $m_{k,n} = \max \{|\mathcal{F}| / 2^n : \mathcal{F} \subseteq 2^{[n]} \text{ is } k\text{-AP-intersecting}\}$ and $m_k = \lim_{n \to \infty} m_{k,n}$. Is $m_k = 2^{-k}$ for all $k \ge 3$?

Posed in arXiv:2610.26243, after Conjecture 1.2 — Families that intersect in an arithmetic progression

OP-367 Multiplicative Merino-Welsh conjecture for general graphsNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite connected loopless bridgeless graph. Let $\tau(G)$ denote the number of spanning trees of $G$, $\alpha(G)$ the number of acyclic orientations of $G$, and $\alpha^*(G)$ the number of totally cyclic orientations of $G$. Is it true that $\alpha(G)\alpha^*(G) \ge \tau(G)^2$, and in particular $\max\{\alpha(G), \alpha^*(G)\} \ge \tau(G)$?

Posed in arXiv:2610.25817, Sec. 1 — The multiplicative Merino--Welsh inequality for chordal graphs

What is known

The original Merino-Welsh conjecture and its multiplicative strengthening remain open for general connected bridgeless graphs, as explicitly discussed in the paper's introduction.

OP-369 Orientation and spanning tree bounds for unions with non-clique intersectionNot in LeanGraph Theory & Graph Algorithms

Let $H$ and $J$ be connected simple graphs intersecting in a subgraph $S = H \cap J$ that is not necessarily a clique, with $p = |V(S)|$. Can upper bounds on the spanning tree count $\tau(H \cup J)$ analogous to $\tau(H \cup J)/\tau(H) \le \tau(K_p \cup J)/\tau(K_p)$, and corresponding lower bounds on acyclic and totally cyclic orientation counts of $H \cup J$, be established for non-clique intersections $S$?

Posed in arXiv:2610.25817, Sec. 7 — The multiplicative Merino--Welsh inequality for chordal graphs

OP-370 Worst-case approximation ratio of the better of separate selling and bundlingNot in LeanMechanism Design & Auctions

For an additive buyer with $m$ independent items distributed according to a product distribution $D = \prod_{j=1}^m F_j$ on $\mathbb{R}_{\ge 0}^m$ with finite monopoly revenues, let $\mathrm{REV}(D)$ denote the optimal truthful, individually rational auction revenue, $\mathrm{SREV}(D) = \sum_{j=1}^m \sup_{p \ge 0} p \Pr[V_j \ge p]$ denote the revenue from selling items separately, and $\mathrm{BREV}(D) = \sup_{p \ge 0} p \Pr[\sum_{j=1}^m V_j \ge p]$ denote the revenue from selling the grand bundle at a single price. What is the exact worst-case approximation ratio $\sup_D \frac{\mathrm{REV}(D)}{\max\{\mathrm{SREV}(D), \mathrm{BREV}(D)\}}$, currently known to lie in the interval $[2.11, 1 + \pi^2/6] \approx [2.11, 2.645]$?

Posed in arXiv:2610.24973, Sec. 7, paragraph 1 — Improved Approximation and Tight Competition for Simple Auctions

What is known

The paper narrows the worst-case approximation ratio C = sup_D REV(D) / max{SREV(D), BREV(D)} to the interval [2.11, 1 + π^2/6] ≈ [2.11, 2.645], leaving the exact tight constant open.

OP-372 Existence of a balanced 6-coloring of K_36Not in LeanCombinatorics for TCS

Does the complete graph $K_{36}$ admit a balanced 6-coloring? That is, does there exist a 6-coloring of the edges of $K_{36}$, $c : E(K_{36}) \to \{1, \dots, 6\}$, such that every subset of 7 vertices spans at least one edge of each of the 6 colors (equivalently, such that $E(K_{36})$ can be partitioned into 6 graphs each having independence number at most 6)?

Posed in arXiv:2610.24484, Sec. 8 — Erd\H{o}s-Gy\'arf\'as Balanced Five-Colorings

What is known

For prime powers $r$, an affine plane of order $r$ yields a balanced $r$-coloring of $K_{r^2}$. Because 6 is not a prime power, no affine plane of order 6 exists (Tarry 1901; Bruck-Ryser theorem). It is therefore unknown whether $K_{36}$ admits any balanced 6-coloring at all, or whether non-affine balanced colorings can reach $r^2$ when affine planes fail.

OP-373 Erdos-Gyarfas balanced coloring conjecture for r at least 6Not in LeanCombinatorics for TCS

For every integer $r \ge 6$, does there exist no balanced $r$-coloring of the complete graph $K_{r^2 + 1}$? That is, is it true that for every $r \ge 6$, every edge coloring $c : E(K_{r^2 + 1}) \to \{1, \dots, r\}$ contains a subset of $r+1$ vertices that misses at least one color?

Posed in arXiv:2610.24484, Sec. 1, Conjecture — Erd\H{o}s-Gy\'arf\'as Balanced Five-Colorings

What is known

The conjecture was posed by Erdős and Gyárfás in 1999 and proved for $r = 3$ and $r = 4$. This paper proves the $r = 5$ case ($K_{26}$ has no balanced 5-coloring). All cases $r \ge 6$ remain open.

OP-375 Eventual stabilization of the zero forcing number of generalized Petersen graphs at 2k + 2Not in LeanGraph Theory & Graph Algorithms

Let $k \ge 5$ be an integer. For an integer $n > 2k$, let $P(n,k)$ denote the generalized Petersen graph with vertex set $\{u_i, v_i : i \in \mathbb{Z}/n\mathbb{Z}\}$ and edges $u_i u_{i+1}$, $u_i v_i$, and $v_i v_{i+k}$ for all $i \in \mathbb{Z}/n\mathbb{Z}$. Let $Z(G)$ denote the zero forcing number of a graph $G$. Does there exist an integer $N(k)$ such that for every $n \ge N(k)$, $Z(P(n,k)) = 2k + 2$?

Proposed here, building on arXiv:2610.24059, Theorem 1.1 — Sharp zero forcing numbers for the generalized Petersen graphs $P(n,3)$ and $P(n,4)$; the paper does not ask it

Reported solved in the literature; not yet checked in Lean.

What is known

Prior work in 2018 proved that $Z(P(n,k)) \le 2k+2$ for all $n > 2k$. The present paper establishes that $Z(P(n,3)) = 8 = 2(3)+2$ for all $n \ge 13$ and $Z(P(n,4)) = 10 = 2(4)+2$ for all $n \ge 18$. The authors cite prior work asking for stabilization thresholds and uniform lower bounds for $k \ge 4$. However, whether $Z(P(n,k))$ eventually stabilizes at $2k+2$ for every fixed $k \ge 5$ remains open.

OP-376 Boundedness of finite Heesch numbers in the Euclidean planeNot in LeanCombinatorics for TCS

Does there exist an upper bound M in ℕ such that every planar shape T in ℝ² (a compact set equal to the closure of its interior) with a finite Heesch number satisfies H(T) ≤ M? Equivalently, are finite Heesch numbers in the Euclidean plane bounded above, or do there exist planar figures with arbitrarily large finite Heesch numbers?

Posed in arXiv:2610.24281, Sec. 1, paragraph 1 — The Heesch number in $\mathbb{E}^3$ is unbounded

What is known

Heesch's problem in dimension 2 is the seminal problem left open; this paper resolves the question in all dimensions d >= 3 by establishing that Heesch numbers are unbounded there.

OP-377 Decidability of the planar monotile tiling problemNot in LeanComputability & Recursion Theory

Is the tiling problem for a single prototile in the Euclidean plane algorithmically decidable? That is, does there exist an algorithm that, given any planar polygon with rational coordinates, decides whether congruent copies of the polygon can tile the Euclidean plane without gaps or overlaps?

Posed in arXiv:2610.24281, Sec. 1, paragraph 4 — The Heesch number in $\mathbb{E}^3$ is unbounded

What is known

The paper highlights the connection between bounds on Heesch numbers and the algorithmic decidability of tiling for a single prototile.

OP-379 Antisymmetric Z_5-flows in fixed orientations of 8-edge-connected graphsNot in LeanGraph Theory & Graph Algorithms

Let G = (V, E) be a finite multigraph with edge-connectivity at least 8. For every orientation of the edges of G, does there exist an antisymmetric circulation over the additive group Z/5Z, meaning a function f : E -> Z/5Z with non-zero net divergence zero at every vertex such that for every edge e in E, f(e) does not equal 0 and f(e) does not equal -f(e) (equivalently, f(e) in {1, 2} under standard identification of Z/5Z)?

Posed in arXiv:2610.07034, Sec. 4.4, after Table 2 — Graphic additive bases and graph flows

What is known

The paper proves that 10-edge-connected graphs admit an antisymmetric Z_5-flow in every orientation (improving the earlier bound of 12), leaving open whether 8-edge-connectivity suffices as conjectured in the literature.

OP-382 Size Ramsey numbers of star forests with at least three componentsNot in LeanGraph Theory & Graph Algorithms

Let $s, t \ge 3$ be integers, and let $n_1 \ge \cdots \ge n_s \ge 1$ and $m_1 \ge \cdots \ge m_t \ge 1$ be non-increasing sequences of positive integers. Is the size Ramsey number of the disjoint union of stars $\bigsqcup_{i=1}^s K_{1, n_i}$ versus $\bigsqcup_{j=1}^t K_{1, m_j}$ equal to $\sum_{k=2}^{s+t} \ell_k$, where $\ell_k = \max_{i+j=k} \{n_i + m_j - 1\}$?

Posed in arXiv:2610.25958, Sec. 4 — Size Ramsey numbers of star forests with two components on one side

What is known

This settles the remaining open case of the star forest conjecture (Erdős Problem #561) posed by Burr, Erdős, Faudree, Rousseau, and Schelp in 1978. The paper resolves all cases where one forest has at most two components; the case where both have at least three components is the remaining hurdle.

OP-385 Asymptotic upper bound on multi-label radio number of cyclesNot in LeanGraph Theory & Graph Algorithms

For any integers $k \ge 1$ and $m \ge 1$, does there exist an integer $n_0$ such that for every $n \ge n_0$, the $(m,k)$-radio number of the cycle graph $C_n$ of order $n$ satisfies $\lambda_k^m(C_n) \le \lceil (k+1)^2 / 2 \rceil m$?

Posed in arXiv:2610.25863, Conjecture 2 — On Multi-label radio Labelings of Graphs

What is known

Proved for k=1 and for k=2 when 2 <= m <= 4 or n is a multiple of 5. Conjectured for all k and m for sufficiently large cycles.

OP-386 Optimal polynomial-time approximation threshold for symmetric bimatrix gamesNot in LeanEquilibria in Games

Let ε_sym* be the infimum of all ε ∈ (0, 1) such that there exists a polynomial-time algorithm that, given any symmetric bimatrix game (A, Aᵀ) with payoff matrix A ∈ [0, 1]^{n × n}, computes a mixed strategy p ∈ Δ_n satisfying Reg(p) = max_{i ∈ [n]} e_iᵀ A p - pᵀ A p ≤ ε. What is the value of ε_sym*? Specifically, does ε_sym* = 0 (admitting a PTAS), or is ε_sym* strictly positive, and does it match 1 - 1/√2?

Posed in arXiv:2610.25524, Sec. 8 — Breaking the 1/3 Barrier for Approximate Nash Equilibria in Symmetric Bimatrix Games

What is known

The paper achieves a limiting factor 1 - 1/√2 ≈ 0.29289 for symmetric bimatrix games, breaking the 1/3 barrier, but leaves open what the best possible polynomial-time approximation guarantee is and whether there is a matching PPAD-hardness threshold.

OP-387 VNP-Completeness of the Vandermonde PermanentNot in LeanAlgebraic & Lattice-Based Complexity

Let $n \ge 1$ be an integer. The Vandermonde permanent in $n$ variables $x_1, \ldots, x_n$ over $\mathbb{C}$ is defined by $$\operatorname{VPer}_n(x_1, \ldots, x_n) \coloneqq \operatorname{Per}\left((x_i^j)_{i,j \in [n]}\right) = \sum_{\sigma \in S_n} \prod_{i=1}^n x_i^{\sigma(i)},$$ which equals the monomial symmetric polynomial $m_{(n, n-1, \ldots, 1)}(x_1, \ldots, x_n)$ of degree $\binom{n+1}{2}$. Is the polynomial family $(\operatorname{VPer}_n)_{n \ge 1}$ $\mathsf{VNP}$-complete under $c$-reductions (or under $p$-projections)? In particular, does computing $\operatorname{VPer}_n$ require arithmetic circuits of superpolynomial size over $\mathbb{C}$, assuming $\mathsf{VP} \ne \mathsf{VNP}$?

Posed in arXiv:2610.25181, Sec. 5, Removal of variable count restriction — When Are Monomial Symmetric Polynomials Hard?

What is known

All hardness results in the paper require the number of variables to be at least the degree because they rely on the algebraic independence of power sum symmetric polynomials. The Vandermonde permanent is the canonical test case with few variables (n) but large degree (n(n+1)/2) where this independence fails.

OP-388 Complexity of Monomial Symmetric Polynomials with Subpolynomially Many Distinct PartsNot in LeanAlgebraic & Lattice-Based Complexity

Let $\bm{\lambda}_n$ be a sequence of integer partitions with $D(\bm{\lambda}_n)$ distinct parts and degree $d(\bm{\lambda}_n)$, and let $v_n \ge d(\bm{\lambda}_n)$ be a sequence of variable counts such that $(m_{\bm{\lambda}_n}(x_1, \ldots, x_{v_n}))_{n \ge 1}$ forms a $p$-family of polynomials over $\mathbb{C}$. Suppose that $D(\bm{\lambda}_n) = \omega(1)$ as $n \to \infty$, but $D(\bm{\lambda}_n) \le n^{o(1)}$ (for example, $D(\bm{\lambda}_n) = \Theta(\log^c n)$ for some constant $c \ge 1$). What is the algebraic circuit complexity of the family $(m_{\bm{\lambda}_n})_{n \ge 1}$? Specifically, can every such family be computed by polynomial-size arithmetic circuits (i.e., is it in $\mathsf{VP}$), or are there such families that are $\mathsf{VNP}$-complete under $c$-reductions, or does parameterization by $D(\bm{\lambda})$ yield a separation under parameterized algebraic complexity assumptions such as $\mathsf{VFPT} \ne \mathsf{VW}[1]$?

Posed in arXiv:2610.25181, Sec. 5, Fine-grained complexity in the middle regime — When Are Monomial Symmetric Polynomials Hard?

What is known

The paper establishes polynomial-size circuits for O(1) distinct parts and VNP-completeness for n^Ω(1) distinct parts (when n >= deg), leaving open the intermediate subpolynomial regime such as polylogarithmic growth.

OP-389 Optimality of the Product Construction for Intersection-Union FamiliesNot in LeanCombinatorics for TCS

Let $n, p, q$ be positive integers with $p, q \ge 2$ and $n \ge p + q$. A family $\mathcal{F} \subseteq 2^{[n]}$ is $p$-intersecting if $|F \cap F'| \ge p$ for all $F, F' \in \mathcal{F}$, and $q$-union if $|F \cup F'| \le n - q$ for all $F, F' \in \mathcal{F}$. Let $w(n,p,q) = \max \{|\mathcal{F}|/2^n : \mathcal{F} \subseteq 2^{[n]} \text{ is } p\text{-intersecting and } q\text{-union}\}$. For $t \ge 1$ and $m \ge t$, let $w(m,t) = \max \{|\mathcal{A}|/2^m : \mathcal{A} \subseteq 2^{[m]} \text{ is } t\text{-intersecting}\}$. Does the product construction always maximize the uniform measure of a $(p,q)$-family, that is, does $w(n,p,q) = \max_{n_1 + n_2 = n} w(n_1,p) w(n_2,q)$ hold for all $p, q \ge 2$ and all $n \ge p + q$?

Posed in arXiv:2610.25049, Section 1, after (1.1) — Proving the optimality of the product construction for the intersection--union problem

What is known

The paper proves the conjecture for all n ≥ 2^15 (p+q-2)^3. Prior work established it for n ≤ p+q + (1/2)(p+q)^{1/3} and for p=1 or q=1. This leaves open the intermediate range p+q < n < 2^15 (p+q-2)^3 for all p, q ≥ 2.

OP-391 Value of the Growth Exponent gamma_3 for S_3-Free Poset DimensionNot in LeanCombinatorics for TCS

Let $f(3, n)$ denote the maximum dimension of an $n$-element poset containing no standard example $S_3$ of order 3 as an induced subposet (where $S_3$ consists of minimal elements $a_1, a_2, a_3$ and maximal elements $b_1, b_2, b_3$ such that $a_i \le b_j$ if and only if $i \ne j$). Define the polynomial growth exponent $\gamma_3 = \inf\{\gamma \in [0, 1] : f(3, n) = \mathcal{O}(n^\gamma)\}$. What is the exact value of $\gamma_3$? In particular, is $\gamma_3 = 1/3$, $\gamma_3 = 2/3$, or strictly between $1/3$ and $2/3$?

Posed in arXiv:2610.24774, Section 1, after Theorem 2 — On dimension of posets excluding a standard example

OP-393 Hamiltonicity of middle weight bands in binary necklace graphsNot in LeanCombinatorics for TCS

Let $n = 2m+1 \ge 5$ be an odd integer, and let $1 \le \ell \le m$ be an integer. Consider the necklace graph on $\{0, 1\}^n / \mathbb{Z}_n$, where vertices are binary necklaces of length $n$, and two necklaces are adjacent if they have representatives at Hamming distance 1. Is the induced subgraph on the set of necklaces whose Hamming weight (the number of ones in any representative) lies in the interval $[m+1-\ell, m+\ell]$ Hamiltonian?

Posed in arXiv:2610.24758, Conjecture 3 — Optimal single-track Gray codes from Gray-ordered necklaces

OP-394 Extension of rotation-invariant symmetric chain decompositions to Hamilton cycles in necklace graphsNot in LeanCombinatorics for TCS

For every prime $n$, consider the rotation-invariant symmetric chain decomposition of the Boolean lattice $\{0,1\}^n$ into saturated chains invariant under cyclic shifts (which induces a decomposition of the non-constant necklace graph $Q_n$ into paths). Do these paths extend to a Hamilton cycle of $Q_n$ by joining chain bottoms to bottoms and tops to tops?

Posed in arXiv:2610.24758, Conjecture 2 — Optimal single-track Gray codes from Gray-ordered necklaces

OP-395 Equivalence of strong sl_2-actions and symmetric chain decompositions for ranked posetsNot in LeanCombinatorics for TCS

Let $P$ be a finite ranked poset with rank function $\omega : P \to \mathbb{Z}$ satisfying $\omega(a) = \omega(b) + 2$ whenever $a \gtrdot b$, with ranks symmetric about 0 (so the minimal rank is $-n$ and the maximal rank is $n$ for some $n \in \mathbb{N}$). Is it true that $P$ admits a strong $\mathfrak{sl}_2$-action (linear operators $E, F, H$ on $\mathbb{C}P$ satisfying $[E, F] = H$, $[H, E] = 2E$, $[H, F] = -2F$, with $H x = \omega(x) x$, $E$ supported only on upward cover relations $y \gtrdot x$, and $F$ supported only on downward cover relations $y \lessdot x$) if and only if $P$ admits a symmetric chain decomposition (a partition of $P$ into disjoint saturated chains each starting at rank $-k$ and ending at rank $k$ for some $k$)?

Posed in arXiv:2610.24148, Conjecture 1.2 — Strong $\mathfrak{sl}_2$ Actions and Symmetric Chain Decompositions

OP-398 Spectrality of 16-element translational tiles in F_2^8Not in LeanCombinatorics for TCS

Let $E$ be a subset of the eight-dimensional binary vector space $\mathbb{F}_2^8$ with $|E| = 16$. Suppose there exists a subset $T \subseteq \mathbb{F}_2^8$ such that $E \oplus T = \mathbb{F}_2^8$ (that is, every element of $\mathbb{F}_2^8$ is uniquely expressible as $e + t$ with $e \in E$ and $t \in T$). Is $E$ necessarily spectral, meaning that there exists a spectrum $B \subseteq \mathbb{F}_2^8$ of size 16 such that for all distinct $b, b' \in B$, $\sum_{e \in E} (-1)^{(b + b') \cdot e} = 0$?

Posed in arXiv:2610.24022, Remark 7.2 — Fuglede's conjecture holds in $\mathbb{F}_2^7$

OP-400 Polynomial-time ranking and unranking of S-avoiding permutations for three or more offsetsNot in LeanCombinatorics for TCS

Let n be a positive integer, and let S ⊂ ℤ be a finite subset with |S| ≥ 3. A permutation π of {1, ..., n} is S-avoiding if π(i) - i - s ≢ 0 (mod n) for every i ∈ {1, ..., n} and every s ∈ S. The lexicographic ranking problem asks for the position of a given S-avoiding permutation in the lexicographic order of all S-avoiding permutations of {1, ..., n}, and the unranking problem asks for the permutation at a given index. Does there exist an algorithm that performs lexicographic ranking and unranking of S-avoiding permutations of {1, ..., n} in time polynomial in n for every fixed finite set S ⊂ ℤ with |S| ≥ 3, or in particular for S = {-1, 0, 1}?

Posed in arXiv:2610.23958, Remark 6.5 — Unranking $S$-avoiding permutations with two forbidden offsets

What is known

Kagey (Discrete Appl. Math. 355, 2024) posed Open Question 40 asking for polynomial-time ranking and unranking algorithms for S-avoiding permutations. Theorem 5.3 settles the question for all sets S with |S| ≤ 2 by showing the forbidden board graph is 2-regular. The paper explicitly remarks that for |S| ≥ 3, the graph has degree 2(|S|-1) ≥ 4, so prefix deletion can leave components of unbounded treewidth, leaving the complexity open.

OP-402 Gao-Zhuang Conjecture on the Gao Constant of Finite GroupsNot in LeanCombinatorics for TCS

Let $G$ be a finite group. Is it true that $\mathsf{E}(G) = |G| + \mathsf{d}(G)$, where $\mathsf{E}(G)$ is the Gao constant of $G$ and $\mathsf{d}(G)$ is the small Davenport constant of $G$?

Posed in arXiv:2610.26122, Conjecture 1.3 — The Erd\H{o}s--Ginzburg--Ziv theorem for finite groups

What is known

This conjecture (Conjecture 1.3 in the paper) posits that the Gao constant equals |G| + d(G) for every finite group. The paper verifies several bounds and corollaries consistent with it, but the general equality remains open.

OP-406 Sufficiency of a single chore disposal for MMS allocationsNot in LeanFair Division

Let $N = \{1, \dots, n\}$ be a set of $n \ge 4$ agents and let $M$ be a finite set of indivisible chores. Each agent $i \in N$ has a nonnegative additive cost function $c_i : 2^M \to \mathbb{R}_{\ge 0}$ with maximin share benchmark $\mu_i = \min_{X \in \Pi_n(M)} \max_{j \in [n]} c_i(X_j)$. Does there always exist a partial allocation $(X_1, \dots, X_n)$ of $M$ (with pairwise disjoint bundles $X_i \subseteq M$) leaving at most one chore unallocated (that is, $|M \setminus \bigcup_{i=1}^n X_i| \le 1$) such that $c_i(X_i) \le \mu_i$ for all $i \in N$?

Posed in arXiv:2610.25320, Sec. 5 — MMS Allocation for Chores with Item Disposals

OP-407 Asymptotic Fraction of Planar Points Avoiding Both Minimum and Maximum DistancesNot in LeanCombinatorics for TCS

Let X ⊂ ℝ² be a finite set of n points with |X| = n ≥ 2, and let a₁ and a_s denote the minimum and maximum pairwise Euclidean distances among distinct points of X, respectively. Let g(X, {a₁, a_s}) denote the maximum size of a subset Y ⊆ X such that no two points in Y are at distance a₁ or a_s, and let g(n, {a₁, a_s}) = min_{|X|=n} g(X, {a₁, a_s}). Theorem 9 establishes that (8n - 20)/47 ≤ g(n, {a₁, a_s}) ≤ 5n/16. What is the value of the asymptotic ratio lim_{n → ∞} g(n, {a₁, a_s}) / n? In particular, does lim_{n → ∞} g(n, {a₁, a_s}) / n = 5/16?

Posed in arXiv:2610.24803, Sec. 1.1, item (v) and Conjecture 19 — Avoiding Distances

What is known

Theorem 9 establishes (8n - 20)/47 ≤ g(n, {a₁, a_s}) ≤ 5n/16. Conjecture 19 conjectures that the upper bound 5n/16 - O(1) is the true value. Closing this gap is the central open problem highlighted in the paper and screening note.

OP-408 Independence Ratio of Planar Unit Distance Graphs with Minimum Degree at Least ThreeNot in LeanCombinatorics for TCS

Let X ⊂ ℝ² be a finite set of n points in the plane whose unit distance graph G(X, {1}) (the graph with vertex set X and edges between pairs of points at Euclidean distance 1) has minimum degree at least 3. Does there exist an absolute constant c < 1 (independent of n and X) such that the independence number α(G(X, {1})) ≤ c n for every such point set X?

Posed in arXiv:2610.24803, Conjecture 18 — Avoiding Distances

What is known

When the minimum degree is 2, the authors give an explicit construction achieving independence ratio 1 - Θ(n^{-1/2}), showing min degree 2 is insufficient. They conjecture that minimum degree at least 3 is sufficient to bound the independence ratio strictly below 1.

OP-409 Asymptotic Dependence of Distance Avoidance Fraction on Number of Forbidden DistancesNot in LeanCombinatorics for TCS

For positive integers n and k, let g(n, k) denote the minimum over all n-point sets X ⊂ ℝ² and all k-element distance subsets D ⊆ {dist(u, v) : u, v ∈ X, u ≠ v} of the maximum cardinality of a subset Y ⊆ X avoiding every distance in D. What is the asymptotic behavior of c_k = lim_{n → ∞} g(n, k) / n as k → ∞? Specifically, does there exist a constant C > 0 such that c_k ≥ k^{-C} for all k, or does c_k decrease exponentially in k?

Posed in arXiv:2610.24803, Sec. 6, item 2(3) — Avoiding Distances

What is known

Theorem 8 proves that (0.2293)^k n ≤ g(n, k) ≤ O(n / (k sqrt(log k))), leaving an exponential gap between the upper and lower bounds as functions of k.

OP-410 Boiling Point of Partizan Arc Kayles with Bounded DegreeNot in LeanCombinatorial Games

In the combinatorial game Partizan Arc Kayles (played on an edge-colored graph where Left removes a blue edge and both incident vertices, and Right removes a red edge and both incident vertices), does there exist a universal upper bound on the temperature of positions whose underlying graph has maximum degree at most 4, or where each vertex is incident to at most 2 blue edges and at most 2 red edges?

Posed in arXiv:2610.24117, Sec. 5.1, Degree restrictions — PArcK trees can get as hot as you want

OP-411 Boiling Point of Grid-Embeddable Partizan Arc KaylesNot in LeanCombinatorial Games

Consider the family of Partizan Arc Kayles positions whose underlying graph is a finite subgraph of the 2-dimensional Cartesian grid ℤ × ℤ, with each edge arbitrarily colored blue or red (relaxing the Domineering restriction that vertical edges are blue and horizontal edges are red). Is the temperature of every such position bounded by a universal constant, or can the temperature be arbitrarily large?

Posed in arXiv:2610.24117, Sec. 5.1, Grid structure — PArcK trees can get as hot as you want

OP-412 Unbounded Temperature of Partizan Arc Kayles in Graphs of Large GirthNot in LeanCombinatorial Games

For every fixed integer g ≥ 3, does there exist a sequence of finite edge-colored graphs G_k with girth at least g such that the temperatures of G_k in Partizan Arc Kayles satisfy temp(G_k) → ∞ as k → ∞?

Posed in arXiv:2610.24117, Sec. 5.1 — PArcK trees can get as hot as you want

OP-413 Existence of empty monochromatic pentagons in bichromatic planar point setsNot in LeanCombinatorics for TCS

Does every sufficiently large 2-colored planar point set in general position contain a monochromatic empty simple pentagon (not necessarily convex)? Equivalently, is $\lambda_5^\star(2) = 0$, where $\lambda_r^\star(c)$ denotes the minimum integer $s \ge 0$ such that every sufficiently large $c$-colored planar point set in general position contains a monochromatic simple $r$-gon with at most $s$ interior points?

Posed in arXiv:2610.23920, Question 5.1 — Almost Empty Monochromatic Polygons in Planar Point Sets

What is known

The paper shows that every sufficiently large 2-colored point set in general position contains a monochromatic pentagon with at most 1 interior point (lambda_5^*(2) <= 1), while known results establish that monochromatic empty convex pentagons can be avoided in arbitrarily large 2-colored sets. Whether allowing non-convex simple pentagons yields an empty monochromatic pentagon remains open.

OP-414 Existence of empty monochromatic hexagons in bichromatic planar point setsNot in LeanCombinatorics for TCS

Does every sufficiently large 2-colored planar point set in general position contain a monochromatic empty simple hexagon (not necessarily convex)? That is, is $\lambda_6^\star(2) = 0$?

Posed in arXiv:2610.23920, Sec. 1.1, after Thm 1.3 (line 203) — Almost Empty Monochromatic Polygons in Planar Point Sets

What is known

The paper proves lambda_6^*(2) <= 1, improving the general bound of floor((6-2)/2) = 2. It also proves that sufficiently large 2-colored Horton sets always contain monochromatic empty r-gons for all r >= 3, removing the usual source of counterexamples. However, determining whether lambda_6^*(2) = 0 holds for all point sets remains open.

OP-415 Asymptotic leading coefficient of minimum interior points in multicolored polygonsNot in LeanCombinatorics for TCS

For each fixed integer $r \ge 3$, what is the asymptotic growth rate of $\lambda_r^\star(c)$ as the number of colors $c \to \infty$? In particular, does the limit $\lim_{c \to \infty} \lambda_r^\star(c) / c$ exist, and does it equal $(r - 2)/2$, $r - 2$, or a value strictly between the two bounds?

Posed in arXiv:2610.23920, Sec. 5, closing paragraph (line 1084) — Almost Empty Monochromatic Polygons in Planar Point Sets

What is known

For fixed r >= 3 and c colors, the paper proves that (r - 2) * floor((c - 1) / 2) <= lambda_r^*(c) <= (r - 2)(c - 2) + floor((r - 2)*delta_c), where delta_c in (0, 1/2]. The leading coefficients of c are (r - 2)/2 and r - 2 respectively, leaving a factor of 2 gap for all r >= 3 (including r = 3).

OP-418 Extension of small minimum degree subgraph bounds to odd target degreesNot in LeanGraph Theory & Graph Algorithms

Let $s \ge 3$ be an odd integer. Is it true that there exists a constant $C = C(s) > 0$ such that every finite simple graph on $n$ vertices with minimum degree $d \ge s$ contains a subgraph with minimum degree at least $s$ on at most $O_s(\max\{ n d^{-s/(s-2)} (\log n)^C, \log n \})$ vertices? Equivalently, does the minimum order $u(n, d, s)$ of a subgraph of minimum degree at least $s$ guaranteed in every $n$ -vertex graph of average degree at least $d$ satisfy $u(n, d, s) \le O_s(n d^{-s/(s-2)} (\log n)^C)$ for odd $s$?

Posed in arXiv:2610.26763, Sec. 5, paragraph 1 — Small subgraphs of large minimum degree

What is known

Theorem 1.1 resolves the problem of finding small subgraphs of minimum degree s for even s >= 4 up to polylogarithmic factors, leaving the odd case open.

OP-419 Bounded-order regular subgraphs from average degree above the Turán exponent for odd degreesNot in LeanGraph Theory & Graph Algorithms

Let $s \ge 5$ be an odd integer and let $\varepsilon > 0$. Do there exist constants $t = t(s, \varepsilon)$ and $n_0 = n_0(s, \varepsilon)$ such that every finite simple graph on $n \ge n_0$ vertices with average degree at least $n^{1 - 2/s + \varepsilon}$ contains an $s$-regular subgraph on at most $t$ vertices?

Posed in arXiv:2610.26763, Sec. 5, paragraph 2 — Small subgraphs of large minimum degree

What is known

Theorem 1.2 finds a bounded-order subgraph of minimum degree at least s, but does not guarantee that the subgraph is s-regular. This was previously known for even s and for s = 3.

OP-420 Erdős-Rado Sunflower Conjecture for Bounded Set SizesNot in LeanCombinatorics for TCS

Let $k \ge 3$ be an integer. Does there exist a real constant $c_k > 1$ such that for every positive integer $r$, every family $\mathcal{F}$ of sets of size at most $r$ that does not contain a $k$-sunflower (that is, $k$ distinct sets whose pairwise intersections are all identical) satisfies $|\mathcal{F}| \le c_k^r$?

Posed in arXiv:2610.26686, Sec. 5 — Proof of the Erd\H{o}s-Szemer\'edi sunflower conjecture

What is known

The Erdős-Rado sunflower conjecture is the premier open problem in the area; while the paper proves the Erdős-Szemerédi conjecture, it notes that the Erdős-Rado conjecture remains wide open, with the current record at $O(k \log r)^r$.

OP-423 Extremal graphs achieving maximum binding number among K_k-free graphsNot in LeanGraph Theory & Graph Algorithms

Let k >= 6 be an integer, and let G be a finite nonempty K_k-free simple graph. If bind(G) = k - 2, must G be isomorphic to a complete (k-1)-partite graph K_{m,m,...,m} with equal part sizes m >= 1?

Proposed here, building on arXiv:2610.28536, Sec. 1, after Thm 1.3 — A sharp bound on the binding number of $K_k$-free graphs and the Brandt conjecture; the paper does not ask it

What is known

Theorem 1.3 proves that every K_k-free graph has binding number at most k-2 for k >= 6, and notes that complete (k-1)-partite graphs with equal part sizes attain the bound k-2. The paper leaves open whether these are the unique extremal graphs achieving equality.

OP-424 Deterministic envy-free cake cutting with polynomial Robertson-Webb queriesNot in LeanFair Division

Let the cake be the interval [0, 1]. Consider n agents where each agent i ∈ {1, ..., n} has a private valuation v_i given by a finite, nonnegative, nonatomic Borel measure on [0, 1] with v_i([0, 1]) = 1 and v_i([a, b]) > 0 whenever a < b. In the Robertson–Webb query model, a protocol interacts with the agents only through Eval queries (asking for v_i([x, y]) for given x ≤ y) and Cut queries (asking for the point y such that v_i([x, y]) = α for given x and α). An allocation is a partition of [0, 1] into n Borel sets X_1, ..., X_n (each a finite union of intervals), where bundle X_i is given to agent i. The allocation is envy-free if v_i(X_i) ≥ v_i(X_j) for all i, j ∈ {1, ..., n}. Does there exist a deterministic protocol that, for every n ≥ 1 and every such valuation profile, finds a complete and exactly envy-free allocation using a number of Robertson–Webb queries bounded by a polynomial in n?

Posed in arXiv:2610.28535, Section 8 — Exact Envy-Free Cake Cutting with Polynomial Expected Queries

What is known

The paper achieves an expected O(n^30) query bound using a randomised protocol with uniform real draws, leaving open whether a deterministic protocol can achieve any polynomial query bound.

OP-425 Existence of skew Hadamard matrices at all orders divisible by 4Not in LeanCombinatorics for TCS

Does a skew Hadamard matrix exist at every order $4n$ for all positive integers $n$? That is, for every $n \ge 1$, does there exist a matrix $H \in \{\pm 1\}^{4n \times 4n}$ such that $H H^{\mathsf{T}} = 4n I_{4n}$ and $H + H^{\mathsf{T}} = 2 I_{4n}$?

Posed in arXiv:2610.27175, Sec. 5.1, Problem 4 — Recent progress in the construction of Hadamard matrices

OP-426 Existence of fourth-root Butson Hadamard matrices at all even ordersNot in LeanCombinatorics for TCS

Does a Butson Hadamard matrix $\mathrm{BH}(n,4)$ exist at every even positive integer order $n$? That is, for every even $n \ge 2$, does there exist an $n \times n$ matrix $H$ with entries in the fourth roots of unity $\{\pm 1, \pm i\}$ such that $H H^* = n I_n$?

Posed in arXiv:2610.27175, Sec. 5.3, Problem 8 — Recent progress in the construction of Hadamard matrices

OP-427 Existence of sixth-root Butson Hadamard matrices at twice-prime ordersNot in LeanCombinatorics for TCS

Does a Butson Hadamard matrix $\mathrm{BH}(2p,6)$ exist for every prime number $p$? That is, for every prime $p$, does there exist a $(2p) \times (2p)$ matrix $H$ with entries in the sixth roots of unity such that $H H^* = 2p I_{2p}$?

Posed in arXiv:2610.27175, Sec. 5.3, Problem 9 — Recent progress in the construction of Hadamard matrices

OP-428 Existence of cocyclic Hadamard matrices at all orders divisible by 4Not in LeanCombinatorics for TCS

Does there exist a cocyclic Hadamard matrix of order $4n$ for every positive integer $n$? That is, for every $n \ge 1$, does there exist a finite group $G$ of order $4n$ and a 2-cocycle $\psi : G \times G \to \{\pm 1\}$ such that the matrix $[\psi(g, h)]_{g, h \in G}$ is a Hadamard matrix of order $4n$?

Posed in arXiv:2610.27175, Sec. 5.6, Problem 16 — Recent progress in the construction of Hadamard matrices

OP-430 Deterministic polynomial-time solvability of ARRIVALNot in LeanAlgorithm Design & Analysis

Does there exist a deterministic algorithm that solves the ARRIVAL problem on switch digraphs in polynomial time? In ARRIVAL, one is given a directed graph $G = (V, E)$ on $n$ vertices with two designated sink terminals $t, t' \in V$ of out-degree zero, an origin vertex $o \in V$, and for each non-terminal vertex $v \in V \setminus \{t, t'\}$, an ordering of its two outgoing arcs into a first (initially active) arc and a second (initially inactive) arc, such that every vertex has a directed path to $\{t, t'\}$. A token starts at $o$ and moves along the active out-arc of its current vertex, upon which the vertex switches its active out-arc. The problem is to decide whether the token reaches $t$ before $t'$.

Posed in arXiv:2610.28241, Sec. 1, p. 3 — ARRIVAL in cube-root subexponential time

What is known

ARRIVAL is one of the premier problems known to lie in NP ∩ coNP for which no polynomial-time algorithm is known. While this paper improves the upper bound from n^{O(sqrt(n))} to 2^{O(n^{1/3} log^{2/3} n)}, the existence of a deterministic polynomial-time algorithm remains open.

OP-432 MDS length bound for irreducible cyclic codes of prime lengthNot in LeanInformation Theory & Coding

Let F_q be a finite field of order q, and let n be a prime number. Let C be a nontrivial irreducible cyclic [n, k]_q MDS code of dimension k > 30 (that is, 2 <= k <= n - 2, C is an ideal in F_q[X]/(X^n - 1) generated by (X^n - 1)/h(X) with h irreducible of degree k over F_q, and the minimum Hamming distance of C is n - k + 1). Does C satisfy the MDS length bound n <= q + 1 (and n <= q - 1)?

Posed in arXiv:2610.28047, Sec. 1.3, after Theorem 1.1 — Length Bounds for Irreducible Cyclic MDS Codes

What is known

The paper proves the MDS length bound n <= q+1 (and n <= q-1 for k >= 3) for all composite lengths n in arbitrary dimension, and for all lengths when k <= 30. The case where n is prime and k > 30 remains open.

OP-436 Sufficiency of k - 1 straight-line cuts for planar two-color necklace splittingNot in LeanFair Division

Let k ≥ 2 be an integer. Let P ⊂ ℝ² be a finite set of m points in the plane with a 2-coloring c : P → {0, 1}. Suppose that the number of points of each color is divisible by k. Do there always exist at most k - 1 straight lines in ℝ² and an assignment of each point of P to one of k agents—with each point in an open cell of the line arrangement assigned to the agent receiving that cell, and each boundary point assigned to an agent receiving an incident cell—such that every agent receives an equal share of points of each color?

Posed in arXiv:2610.27956, Sec. 7 — Splitting Planar Necklaces with Few Straight Cuts

OP-438 Approximation ratio strictly greater than 2/3 for residual maximum matchingNot in LeanApproximation & Inapproximability

Let $G = (V, E)$ be a finite simple undirected graph. Let $\nu(G)$ denote the matching number of $G$, and let $\mathcal{M}(G)$ denote the set of all maximum matchings of $G$. The residual maximum matching problem asks to find a maximum matching $M \in \mathcal{M}(G)$ maximizing $\nu(G \setminus M)$, whose optimum is $L(G) = \max_{M \in \mathcal{M}(G)} \nu(G \setminus M)$. Does there exist a polynomial-time algorithm that achieves an approximation ratio strictly greater than $2/3$ for the residual maximum matching problem on general unweighted graphs? That is, does there exist a constant $\alpha > 2/3$ and a polynomial-time algorithm that, given any finite simple graph $G$, outputs a maximum matching $M \in \mathcal{M}(G)$ satisfying $\nu(G \setminus M) \ge \alpha L(G)$?

Posed in arXiv:2610.27833, Sec. 6 — A 2/3-Approximation Algorithm for the Residual Maximum Matching Problem in General Graphs

What is known

The paper proves that any maximum matching satisfying property (S), obtained via single-edge exchanges, guarantees a 2/3-approximation to the residual maximum matching number, and this bound is tight for property (S). The author poses whether stronger local improvement conditions or other polynomial-time methods can achieve an approximation ratio strictly exceeding 2/3.

OP-439 Absolute minimum size of a matroid counterexample to the multiplicative Merino-Welsh inequalityNot in LeanCombinatorics for TCS

Let $M$ be a finite loopless and coloopless matroid whose Tutte polynomial $T_M(x,y)$ satisfies $T_M(2,0)T_M(0,2) < T_M(1,1)^2$. What is the minimum possible number of elements $|E(M)|$? In particular, is the minimum size equal to 62 (achieved by the 2-thickening of the uniform matroid $U_{31,21}$), or does there exist a counterexample with $|E(M)| \le 60$?

Proposed here, building on arXiv:2610.27706, Theorem 5.9(vi) — On minimum-size matroid counterexamples to the multiplicative Merino--Welsh inequality; the paper does not ask it

What is known

Theorem 5.9 proves that if $M$ is a minimum-size loopless and coloopless matroid counterexample to the multiplicative Merino-Welsh inequality, then its ground set partitions into 2-element parallel or series classes, and its compressed core $N$ satisfies $|E(M)| = 2|E(N)|$. Theorem 4.1 shows that the smallest counterexample among uniform thickenings is $U_{31,21}^{(2)}$ of size 62. Hence either the absolute minimum size is 62, or there exists a counterexample of size at most 60. Determining whether 62 is minimal among all matroids remains open.

OP-441 Dependence on k of the achromatic number of k-th power Paley graphsNot in LeanGraph Theory & Graph Algorithms

Let $k \geq 3$ be an integer. For a prime power $q$ with $q \equiv 1 \pmod{2k}$, let $G_k(q)$ denote the $k$-th power Paley graph with vertex set $\mathbb{F}_q$, where distinct vertices $x, y$ are adjacent if and only if $x - y$ is a non-zero $k$-th power in $\mathbb{F}_q$. Determine the asymptotic dependence on $k$ of the leading coefficient of $q$ in the achromatic number $\chi_a(G_k(q))$, that is, determine the asymptotic behavior as $k \to \infty$ of $c(k) = \lim_{q \to \infty, q \equiv 1 \pmod{2k}} \frac{\chi_a(G_k(q))}{q}$ (or of the upper and lower limits). Specifically, determine whether $c(k) = \Theta(1/k)$, $c(k) = \Theta(1/\sqrt{k})$, or $c(k) = \Theta(k^{-\alpha})$ for some intermediate exponent $1/2 < \alpha < 1$.

Posed in arXiv:2610.27510, after Theorem 1.1 — The achromatic number of Paley graphs, Peisert graphs, and related Cayley graphs

OP-443 Extremal graph minimizing the average order of connected induced subgraphs with prescribed minimum degreeNot in LeanGraph Theory & Graph Algorithms

Let $n, k$ be integers with $k \geq 3$ and $n \geq k+1$. Let $m = n - k - 1$. Define the graph $H_{n,k} = K_k \vee (K_1 \cup K_m)$ and the quantity $\mu_{n,k} = \frac{n}{2} + \frac{2 + (k-1)2^m}{2(2^n - 2^m)}$. For every connected simple graph $G$ of order $n$ with minimum degree $\delta(G) = k$, is it true that the average order of connected induced subgraphs satisfies $A(G) \geq \mu_{n,k}$, with equality if and only if $G \cong H_{n,k}$?

Posed in arXiv:2610.27553, Sec. 5, Conjecture — A proof of Vince's conjecture on the average order of connected induced subgraphs

What is known

The paper settles Vince's conjecture (A(G) > n/2 for delta(G) >= 3) and proves the bound A(G) >= mu_{n,k} for graphs with a cut vertex, join graphs, and graphs with 3n <= 4(k+1). It conjectures that H_{n,k} = K_k \vee (K_1 \cup K_{n-k-1}) uniquely minimizes A(G) among all connected simple graphs of order n with delta(G) = k >= 3.

OP-445 Complexity of partitionability for Cohen-Macaulay simplicial complexesNot in LeanNP-Completeness & Reductions

Is the decision problem Partitionability—which asks whether a given finite simplicial complex $\Delta$ (presented by its facets) admits a partitioning of its face poset into boolean intervals $[\phi(\sigma), \sigma]$ indexed by its facets $\sigma$—NP-complete when the input is restricted to Cohen-Macaulay simplicial complexes?

Posed in arXiv:2610.27083, Question 6.1 — Partitionability is NP-complete

What is known

The reduction in the paper produces complexes with trivial Euler characteristic but highly nontrivial homology, so they are never Cohen-Macaulay. Whether partitionability remains NP-complete for Cohen-Macaulay complexes is explicitly posed as Question 6.1.

OP-447 NP-completeness of partitionability for two-dimensional pseudomanifoldsNot in LeanNP-Completeness & Reductions

Is the decision problem Partitionability NP-complete when restricted to pure 2-dimensional pseudomanifolds (finite pure 2-dimensional simplicial complexes in which every edge is contained in at most two triangles)?

Posed in arXiv:2610.27083, Sec. 6, after Question 6.2 — Partitionability is NP-complete

What is known

The original 1995 conjecture asked for NP-completeness on pseudomanifolds. The construction in the paper uses edges belonging to three triangles (for gluing tetrahedral boundaries and in the clause gadget), leaving the pseudomanifold case open.

OP-448 Precise Asymptotic Growth Rate of Coordinate Bounds for Higher-Dimensional Distinct Subset SumsNot in LeanCombinatorics for TCS

Fix a dimension $k \ge 1$. For a sequence of $n$ nonnegative integer vectors $\Sigma = (a_1, \ldots, a_n)$ with $a_i \in \mathbb{Z}_{\ge 0}^k$, say that $\Sigma$ is admissible if all $2^n$ subset sums $\sum_{i \in S} a_i$ for $S \subseteq \{1, \ldots, n\}$ are pairwise distinct. Let $M(\Sigma) = \max_{1 \le i \le n, 1 \le j \le k} (a_i)_j$, and define $m_k(n) = \min \{M(\Sigma) : \Sigma \text{ is an admissible sequence of length } n \text{ in } \mathbb{Z}_{\ge 0}^k\}$. Determine the precise asymptotic order of $m_k(n)$ as $n \to \infty$: in particular, is $m_k(n) = \Theta(2^{n/k})$, or is $m_k(n) = o(2^{n/k})$, or is $m_k(n) = \Theta(2^{n/k}/\sqrt{n})$?

Posed in arXiv:2610.26970, Sec. 5, first paragraph — Gaussian Lower Bounds for Distinct Subset Sums in Higher Dimensions

What is known

The paper establishes the lower bound (C_k - o(1)) 2^(n/k)/sqrt(n) and notes the simple upper bound 2^(ceil(n/k) - 1). The true asymptotic growth rate of m_k(n) remains open across all dimensions k ≥ 1.

OP-450 Characterization of graphs whose every blowup is recolorableNot in LeanGraph Theory & Graph Algorithms

Give a full structural or forbidden-induced-subgraph characterization of all finite simple graphs $G$ such that every clique blowup $G(w)$ (with positive integer vertex weights $w : V(G) \to \mathbb{N}^+$) is recolorable, meaning that for every weight function $w$ and every integer $k \ge \chi(G(w)) + 1$, the $k$-reconfiguration graph $R_k(G(w))$ of proper $k$-colorings is connected.

Posed in arXiv:2610.27527, Sec. 8 — Frozen colorings and recolorability of blowups

OP-452 Characterization of graphs whose vertex-edge domination number is invariant under any single vertex deletionNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite simple graph. A subset $S \subseteq V(G)$ is a vertex-edge dominating set if every edge of $G$ has at least one endpoint in the closed neighborhood $N_G[S] = \bigcup_{v \in S} N_G[v]$. The vertex-edge domination number $\gamma_{ve}(G)$ is the minimum size of a vertex-edge dominating set. Let $V^0(G) = \{v \in V(G) : \gamma_{ve}(G - v) = \gamma_{ve}(G)\}$. Characterize all finite simple graphs $G$ satisfying $V^0(G) = V(G)$, meaning that deleting any vertex leaves the vertex-edge domination number unchanged.

Posed in arXiv:2610.26912, Sec. 3 — Vertex Removal and Vertex-Edge Domination

What is known

The paper poses the problem of characterizing all graphs where every vertex removal preserves the vertex-edge domination number. For cycles, it notes this holds iff n = 0, 3 mod 4, but the general structural classification is left open.

OP-455 Occurrence of residual target weights 322, 326, 330, and 334 in RM(7,14)Not in LeanInformation Theory & Coding

Let RM(7,14) denote the binary Reed-Muller code of length 2^14 = 16384 and order 7, consisting of truth tables of Boolean functions on 14 variables of algebraic degree at most 7. For each target weight w in {322, 326, 330, 334}, does there exist a codeword in RM(7,14) whose Hamming weight is equal to w?

Posed in arXiv:2610.29807, Section 5 — Some Results on the Weight Spectrum of Binary Reed-Muller Codes $RM(m-7,m)$

Reported solved in the literature; not yet checked in Lean.

What is known

The paper determines that all even weights in [336, 16048] and a specific set of 22 low weights (and their complements) occur in the weight spectrum of RM(7,14). This leaves exactly four unresolved low base-code target weights: T = {322, 326, 330, 334}.

OP-457 Existence of Pareto optimal alpha-EFX allocations for some positive constantNot in LeanFair Division

Does there exist an absolute constant $\alpha > 0$ such that for every finite set $N$ of agents and finite set $M$ of indivisible goods, where each agent $i \in N$ has an additive valuation $v_i : 2^M \to \mathbb{R}_{\ge 0}$ with $v_i(g) > 0$ for all $g \in M$, there exists an allocation $A = (A_1, \dots, A_n)$ partitioning $M$ that is both $\alpha$-EFX (satisfying $v_i(A_i) \ge \alpha \cdot v_i(A_j \setminus \{g\})$ for all $i \neq j$ and all $g \in A_j$) and Pareto optimal (no allocation $B$ satisfies $v_i(B_i) \ge v_i(A_i)$ for all $i \in N$ with at least one strict inequality)?

Posed in arXiv:2610.29201, Open Problem 1 — Pareto Inefficiency of EFX

OP-463 Minimum dimension for a spherical counterexample to Gale's conjectureNot in LeanCombinatorics for TCS

For each integer n ≥ 3, let S^{n-1} = { x ∈ ℝⁿ : ‖x‖ = 1 } be the Euclidean unit sphere, and for any subset V ⊆ S^{n-1} of positive diameter, let β_{n+1}(V) = inf { max_{1 ≤ i ≤ n+1} diam(V_i) / diam(V) : ⋃_{i=1}^{n+1} V_i ⊇ V }. Let β_{n+1}(S^{n-1}) be the optimal diameter ratio for (n+1)-partitions of the full sphere. What is the smallest dimension n ≥ 3 for which there exists a subset V ⊆ S^{n-1} satisfying β_{n+1}(V) > β_{n+1}(S^{n-1})?

Posed in arXiv:2610.28828, Sec. 5, Question 3 — A counterexample to Gale's conjecture in $\mathbb{R}^3$

What is known

The 101-point counterexample in ℝ³ is substantially non-spherical (its radial projection to the sphere is no longer a counterexample). Counterexamples to the Borsuk conjecture consist of vectors of equal length and thus yield spherical counterexamples to Gale's conjecture in sufficiently high dimensions (at least 63), but the minimal dimension for a spherical counterexample is unknown.

OP-464 Optimality of regular simplex partition of Euclidean balls for n at least 4Not in LeanCombinatorics for TCS

For each integer n ≥ 4, let Bⁿ = { x ∈ ℝⁿ : ‖x‖ ≤ 1 } be the Euclidean closed unit ball, and let σ_n = sqrt((n+1)/(n+2)) when n is even, and σ_n = sqrt(1/2 + (1/2) sqrt((n-1)/(n+3))) when n is odd. The partition of S^{n-1} into n+1 congruent regular spherical simplices obtained by central projection of an inscribed regular n-simplex yields a partition of Bⁿ into n+1 parts of diameter ratio σ_n. Is β_{n+1}(Bⁿ) = σ_n for every n ≥ 4, or does there exist an integer n ≥ 4 and a partition of Bⁿ into n+1 sets each having diameter strictly less than σ_n diam(Bⁿ)?

Posed in arXiv:2610.28828, Sec. 5, Question 4 — A counterexample to Gale's conjecture in $\mathbb{R}^3$

What is known

The regular spherical simplex partition of S^{n-1} is known to achieve the optimal diameter ratio σ_n only for n = 2 and n = 3. For n ≥ 4, it is unknown whether the ball Bⁿ admits an (n+1)-partition with strictly smaller maximum diameter.

OP-466 Convexity of the standardized Laplacian eigenvalue region for orders n >= 5Not in LeanGraph Theory & Graph Algorithms

For an integer $n \ge 5$, let $\mathcal{L}_n$ be the set of all real $n \times n$ matrices $\widetilde{L} = (\ell_{ij})_{i,j=1}^n$ satisfying $\sum_{j=1}^n \ell_{ij} = 0$ for all $i \in \{1, \dots, n\}$ and $-\frac{1}{n} \le \ell_{ij} \le 0$ for all $i \ne j$. Let $\Lambda_n = \bigcup_{\widetilde{L} \in \mathcal{L}_n} \sigma(\widetilde{L}) \subset \mathbb{C}$ be the set of all complex eigenvalues of matrices in $\mathcal{L}_n$. Is $\Lambda_n$ a convex subset of $\mathbb{C}$? Equivalently, is the upper boundary curve $\eta_n: [0, 1] \to [0, \infty)$ concave?

Posed in arXiv:2610.14100, Sec. 7.3, Question 2 — Digraph Laplacian spectra: The 2005 polygon conjecture fails for all orders above four

What is known

While the paper shows that $\Lambda_n$ strictly exceeds the convex polygon $S_n$ for every $n \ge 5$, it remains an open question whether $\Lambda_n$ itself is convex.

OP-467 Maximum length of cyclic MDS codes with small quadratic gcdNot in LeanInformation Theory & Coding

Let $\mathbb{F}_q$ be a finite field of prime-power order $q$. Let $\mathcal{C} \subseteq \mathbb{F}_q^n$ be a nontrivial simple-root $[n, k]_q$ cyclic code (that is, $2 \le k \le n-2$, $\gcd(n, q) = 1$, and $\mathcal{C}$ is invariant under cyclic coordinate shifts). Suppose $\mathcal{C}$ is maximum distance separable (MDS), meaning its minimum Hamming distance is $n - k + 1$. If $\gcd(n, q^2 - 1) \le 2$ and $n$ has prime factors $\ge 11$, does $\mathcal{C}$ satisfy $n \le q + 1$?

Posed in arXiv:2610.29810, Sec. 5 — On the maximum length of cyclic MDS codes

What is known

The paper proves the bound n <= q + 1 for nontrivial cyclic MDS codes when gcd(n, q^2 - 1) > 2, when k is even and gcd(n, q^2 - 1) > 1, when 3 | n or 4 | n, and for lengths whose prime factors are in {2, 3, 5, 7}. It leaves open whether the bound n <= q + 1 holds for all cyclic lengths when gcd(n, q^2 - 1) <= 2 and n has prime factors at least 11.

OP-469 Exact nucleon computation for b-matching games with capacity at most twoNot in LeanGeneral Equilibrium & Cooperative Games

Let G = (V, E) be a finite simple undirected graph with edge weights w : E → ℚ_{≥0} and vertex capacities b : V → {1, 2}. A b-matching is a subset of edges M ⊆ E such that each vertex v ∈ V is incident to at most b(v) edges in M. The cooperative b-matching game has player set V and value function v(S) = max {w(M) : M is a b-matching in G[S]} for every coalition S ⊆ V. An imputation is a vector x ∈ ℝ_{≥0}^V satisfying ∑_{v ∈ V} x_v = v(V). For an imputation x, let θ(x) be the tuple of payoff ratios x(S)/v(S) over all proper coalitions ∅ ≠ S ⊊ V with v(S) > 0, arranged in nondecreasing order. The nucleon is the set of imputations x that lexicographically maximize θ(x). Can an exact nucleon allocation be computed in polynomial time for every b-matching game with capacities b ≤ 2, or is the problem NP-hard (even in the unit-weight case where w ≡ 1)?

Posed in arXiv:2610.29731, Sec. 6, first paragraph — Computing the Nucleon of Matching Games

OP-470 Exact nucleon computation for partitioned matching games of width at most twoNot in LeanGeneral Equilibrium & Cooperative Games

Let H = (V, E) be a finite simple undirected graph with edge weights w : E → ℚ_{≥0}, and let (V_p)_{p ∈ N} be a partition of V into subsets owned by players N such that |V_p| ≤ 2 for all p ∈ N (width at most 2). The partitioned matching game on N assigns each coalition S ⊆ N the value v(S) = max {w(M) : M is a matching in H[⋃_{p ∈ S} V_p]}. An imputation is a vector x ∈ ℝ_{≥0}^N such that ∑_{p ∈ N} x_p = v(N). The nucleon is the set of imputations lexicographically maximizing the sorted vector of ratios x(S)/v(S) over all proper non-empty coalitions with v(S) > 0. Can an exact nucleon allocation of a partitioned matching game of width at most two be computed in polynomial time, or is it NP-hard (even for unit edge weights)?

Posed in arXiv:2610.29731, Sec. 7, first paragraph — Computing the Nucleon of Matching Games

OP-471 Commonality of Apices of Connected Sidorenko GraphsNot in LeanCombinatorics for TCS

Let $H$ be a finite connected bipartite simple graph that satisfies the Sidorenko property, meaning that for every graphon $W \colon [0,1]^2 \to [0,1]$, the homomorphism density satisfies $t(H, W) \ge t(K_2, W)^{e(H)}$. For any positive integer $k$, let $H^{+k}$ be the $k$-apex of $H$, obtained by adding $k$ pairwise non-adjacent vertices each adjacent to every vertex of $H$. Is $H^{+k}$ necessarily common, that is, does $t(H^{+k}, W) + t(H^{+k}, 1-W) \ge 2^{1-e(H^{+k})}$ hold for every graphon $W$?

Posed in arXiv:2610.29469, Conjecture 1.1 — An entropy proof of the commonality of apices of trees

What is known

Grzesik, Lee, Lidický, and Volec conjectured this in 2022 after proving it for graphs on at most 5 vertices. The paper settles it for all trees and forests with average degree at least 1, but the general conjecture for arbitrary connected Sidorenko graphs remains wide open.

OP-473 Wide Partition Conjecture on Free MatroidsNot in LeanCombinatorics for TCS

Let $\lambda = (\lambda_1, \ldots, \lambda_\ell)$ be an integer partition. A subpartition of $\lambda$ is a partition $\mu \subseteq \lambda$ obtained by deleting rows of $\lambda$ (its parts are a sub-multiset of $\lambda$'s; not the containment $\mu_i \le \lambda_i$, which the source calls a lower subpartition). Dominance order $\mu \succeq \nu$ means $\sum_{j=1}^k \mu_j \ge \sum_{j=1}^k \nu_j$ for all $k \ge 1$, with $|\mu| = |\nu|$. A partition $\lambda$ is wide if every subpartition $\mu \subseteq \lambda$ dominates its conjugate $\mu'$, that is, $\mu \succeq \mu'$. A Latin tableau of shape $\lambda$ and type $\lambda'$ is a filling of the Young diagram of $\lambda$ with positive integers such that the $i$-th row contains each element of $\{1, 2, \ldots, \lambda_i\}$ exactly once and no column contains repeated elements. A partition is Latin if it admits a Latin tableau of shape $\lambda$ and type $\lambda'$. Is every wide partition Latin (so that a partition is Latin if and only if it is wide)?

Posed in arXiv:2610.29291, Conjecture 1.2 — Counting and constructing Latin tableaux

OP-475 Exact Consistency-Robustness Frontier for Non-Clairvoyant Scheduling with PredictionsNot in LeanOnline Algorithms

Consider single-machine non-clairvoyant scheduling of $n$ jobs to minimize total completion time $\sum_{i=1}^n C_i$, where job sizes $\mathbf{x} \in \mathbb{R}_{>0}^n$ are unknown in advance and predictions $\mathbf{y} \in \mathbb{R}_{>0}^n$ are provided. For a given consistency parameter $\lambda \in [0, (n-1)/(n+1)]$, let $\rho^*(n, \lambda)$ denote the optimal robustness achievable by any deterministic $(1+\lambda)$-consistent online scheduling algorithm. The paper proves that $\Phi^{(n)}(\lambda) \le \rho^*(n, \lambda) \le \Psi_n(\lambda) \le \frac{3}{2} \Phi^{(n)}(\lambda)$, where $\Phi^{(n)}(\lambda)$ is the piecewise lower bound obtained from the Order-$\alpha$ System and $\Psi_n(\lambda) = \max_{s \in [n]} \frac{2\lambda n^2 + ((n-1)/(n+1) - \lambda)s(2n+1-s)}{\lambda n(n+1) + ((n-1)/(n+1) - \lambda)s(s+1)}$ is the upper bound attained by the Modified Two-Stage Schedule (mTSS). Determine the exact value of $\rho^*(n, \lambda)$ for all $n \ge 5$ and $\lambda \in (0, (n-1)/(n+1))$, and in particular decide whether $\rho^*(n, \lambda) = \Phi^{(n)}(\lambda)$ or whether an algorithm alternating between Round-Robin and predicted-order processing strictly improves upon $\Psi_n(\lambda)$.

Posed in arXiv:2610.29037, Sec. 5, paragraph 4 — Near-Optimal Consistency-Robustness Bounds for Non-Clairvoyant Scheduling

What is known

The paper establishes that for any $n \ge 2$ and admissible $\lambda$, the upper bound $\Psi_n(\lambda)$ achieved by the Modified Two-Stage Schedule (mTSS) algorithm is at most $3/2$ times the multi-stage lower bound $\Phi^{(n)}(\lambda)$. For $n \ge 5$, closing the remaining gap between the lower bound $\Phi^{(n)}(\lambda)$ and the upper bound $\Psi_n(\lambda)$ is left open, and the authors conjecture that repeated cycles of Round-Robin and committing to the predicted order may achieve optimal robustness.

OP-476 Consistency-Robustness Tradeoff for Weighted Non-Clairvoyant Scheduling with PredictionsNot in LeanOnline Algorithms

In single-machine non-clairvoyant scheduling with known job weights $w_1, \dots, w_n > 0$, unknown processing times $x_1, \dots, x_n > 0$, and predicted processing times $y_1, \dots, y_n > 0$, the objective is to minimize the total weighted completion time $\sum_{i=1}^n w_i C_i$. For $\lambda > 0$, characterize the optimal consistency-robustness tradeoff. In particular, does there exist a deterministic online algorithm that is $(1+\lambda)$-consistent and achieves robustness $O(\sqrt{1/\lambda})$ as $\lambda \to 0$ for arbitrary job weights, matching the unweighted case?

Posed in arXiv:2610.29037, Sec. 5, paragraph 3 — Near-Optimal Consistency-Robustness Bounds for Non-Clairvoyant Scheduling

What is known

While the unweighted setting is resolved up to a factor of $3/2$ (and up to leading-order asymptotics $1/\sqrt{\lambda}$), non-clairvoyant scheduling with known job weights and predicted processing times remains open. In this setting, offline scheduling orders jobs by Smith's ratio $w_i / x_i$, so inaccurate predictions distort both the length and the priority order.

OP-477 Finiteness of sporadic simplicial line arrangements in the real projective planeNot in LeanCombinatorics for TCS

Let a line arrangement in the real projective plane ℝP² be a finite collection A of distinct projective lines. An arrangement A is called simplicial if every connected component of the complement ℝP² \ ⋃_{L ∈ A} L is an open triangle (homeomorphic to an open disk with boundary formed by segments of three lines in A). An arrangement is irreducible if no single point is incident with all or all but one of its lines. Two infinite families of irreducible simplicial arrangements are classically known: R(1), formed by the 2m lines consisting of the m side lines and m symmetry axes of a regular m-gon in ℝ² (m ≥ 3); and R(2), formed by adjoining the line at infinity to an arrangement of R(1) for an even polygon (m = 2k, yielding 4k + 1 lines). An irreducible simplicial arrangement is called sporadic if it does not belong to R(1) ∪ R(2). Are there only finitely many sporadic irreducible simplicial arrangements of lines in ℝP², up to projective equivalence?

Posed in arXiv:2610.28874, Sec. 3, after Corollary 3.2 — A sporadic simplicial arrangement of $51$ lines

What is known

A 1974 conjecture, reaffirmed in a 2019 paper on supersolvable simplicial arrangements, conjectured that every irreducible simplicial arrangement with more than 37 lines belongs to R(1) ∪ R(2), which would imply that sporadic simplicial arrangements are finite in number. The paper disproves the 37-line bound by constructing a sporadic simplicial arrangement with 51 lines possessing icosahedral symmetry. However, this construction leaves open whether the total number of sporadic simplicial line arrangements is finite, or whether an infinite family of sporadic arrangements exists.

OP-478 Maximum Size of Minor-Minimal Matroids Containing a k-Connected Set for k at Least 4Not in LeanCombinatorics for TCS

Let $k \ge 4$ be an integer. For a finite matroid $M$ with ground set $E(M)$ and connectivity function $\lambda_M(A) = r(A) + r(E(M) \setminus A) - r(M)$, a subset $Z \subseteq E(M)$ is called $k$-connected if $\lambda_M(A) \ge \min(|Z \cap A|, |Z \setminus A|, k-1)$ for all $A \subseteq E(M)$. Suppose $M$ is minor-minimal with respect to having $Z$ as a $k$-connected set, that is, for every element $x \in E(M) \setminus Z$, the set $Z$ is not $k$-connected in the deletion $M \setminus x$ and not $k$-connected in the contraction $M / x$. What is the maximum size $|E(M)|$ as a function of $k$ and $|Z|$, and what are the extremal matroids that achieve this bound?

Posed in arXiv:2610.29979, Sec. 1, after Prop. 1.2 — On $k$-connected Sets in Matroids

OP-482 The Local Dyadic Conjecture for Clutters with Integral CornersNot in LeanInteger & Polyhedral Optimization

Let $E$ be a finite set and let $\mathcal{C} \subseteq 2^E$ be a non-trivial clutter (an antichain of non-empty subsets of $E$). The covering polyhedron is $P(\mathcal{C}) = \{x \in \mathbb{R}^E : x \ge \mathbf{0}, \sum_{e \in S} x_e \ge 1 \text{ for all } S \in \mathcal{C}\}$. A vertex $v$ of $P(\mathcal{C})$ is an integral corner if $v \in \mathbb{Z}^E$ and every vertex of $P(\mathcal{C})$ adjacent to $v$ along a 1-dimensional face of $P(\mathcal{C})$ also belongs to $\mathbb{Z}^E$. A non-negative integer weight vector $w \in \mathbb{Z}_+^E$ is minimal if every element of $E$ belongs to some $w$-minimum cover of $\mathcal{C}$. Does the dual linear program $\max \{\sum_{S \in \mathcal{C}} y_S : y \ge \mathbf{0}, \sum_{S \in \mathcal{C} : e \in S} y_S \le w_e \text{ for all } e \in E\}$ always have an optimal solution $y$ whose coordinates are dyadic rationals (of the form $a / 2^b$ with $a \in \mathbb{Z}, b \in \mathbb{N}$), whenever the $w$-optimal face $\arg\min \{w^\top x : x \in P(\mathcal{C})\}$ contains an integral corner?

Posed in arXiv:2610.29197, Conjecture 2 — The Local Dyadic Conjecture

What is known

Introduced in this paper as a local strengthening of the classical dyadic conjecture, proved here for binary clutters with k(ℓ+1) ≤ 6.

OP-483 The Dyadic Conjecture for Ideal CluttersNot in LeanInteger & Polyhedral Optimization

Let $E$ be a finite set and let $\mathcal{C} \subseteq 2^E$ be an ideal clutter, meaning that every extreme point of the covering polyhedron $P(\mathcal{C}) = \{x \in \mathbb{R}^E : x \ge \mathbf{0}, \sum_{e \in S} x_e \ge 1 \text{ for all } S \in \mathcal{C}\}$ has integer coordinates. Is it true that for every weight vector $w \in \mathbb{Z}_+^E$, the dual linear program $\max \{\sum_{S \in \mathcal{C}} y_S : y \ge \mathbf{0}, \sum_{S \in \mathcal{C} : e \in S} y_S \le w_e \text{ for all } e \in E\}$ admits an optimal solution $y$ where every coordinate $y_S$ is a dyadic rational?

Posed in arXiv:2610.29197, Conjecture 1 — The Local Dyadic Conjecture

What is known

Open since 1975 (conjectured by Seymour). The Local Dyadic Conjecture implies this conjecture because every vertex of an ideal clutter's covering polyhedron is an integral corner.

OP-484 The Dyadic Conjecture for Ideal Binary CluttersNot in LeanInteger & Polyhedral Optimization

Let $E$ be a finite set and let $\mathcal{C} \subseteq 2^E$ be an ideal binary clutter, meaning that every extreme point of $P(\mathcal{C})$ is integral and $|S \cap B|$ is odd for every $S \in \mathcal{C}$ and every minimal cover $B \in b(\mathcal{C})$. For every weight vector $w \in \mathbb{Z}_+^E$, does the dual linear program $\max \{\sum_{S \in \mathcal{C}} y_S : y \ge \mathbf{0}, \sum_{S \in \mathcal{C} : e \in S} y_S \le w_e \text{ for all } e \in E\}$ always have an optimal solution that is dyadic?

Posed in arXiv:2610.29197, Sec. 1.3 — The Local Dyadic Conjecture

What is known

Binary clutters form a central class containing T-joins, T-cuts, and odd cycle clutters; the paper proves the conjecture for binary clutters under bounded corner degeneracy k(ℓ+1) ≤ 6.

OP-488 Semidefinite extension complexity of regular N-gonsNot in LeanInteger & Polyhedral Optimization

For every integer N ≥ 3, does the regular N-gon have real positive semidefinite extension complexity equal to 1 + ⌈log₂ N⌉? More generally, does every convex N-gon have positive semidefinite extension complexity at least 1 + ⌈log₂ N⌉?

Posed in arXiv:2610.04498, Sec. 8, P4 — Rank-sensitive vertex bounds for semidefinite lifts

OP-489 Uniform Boundedness of Shortest Optimal Strategy Length for Graph Water Transport on PathsNot in LeanGraph Theory & Graph Algorithms

Does there exist an absolute constant $C \in \mathbb{N}$ such that for every finite path graph $P_n$ on $n$ vertices, every target vertex $x \in V(P_n)$, and every nonnegative initial weight function $\omega: V(P_n) \to \mathbb{R}_{\ge 0}$, the minimum number of connected-set averaging operations $t(P_n, x, \omega)$ required to attain the maximum reachable weight at $x$ satisfies $t(P_n, x, \omega) \le C$?

Proposed here, building on arXiv:2610.31499, Section 1 — Water Transport on 3-Spiders: Unbounded Lengths of Shortest Optimal Strategies; the paper does not ask it

What is known

The paper establishes that the lengths of shortest optimal strategies in graph water transport cannot be bounded uniformly across graphs of maximum degree 3, disproving uniform boundedness for maximum degree at least 3. The lowest degree case where graph structure is nontrivial is maximum degree 2, corresponding to paths. While finite optimal strategies are known to exist for all paths, it remains open whether there is a uniform upper bound on the number of operations needed on paths, independent of path length and initial weights.

OP-493 List additive chromatic number bounded by maximum degree plus oneNot in LeanGraph Theory & Graph Algorithms

Let $G = (V, E)$ be a finite simple graph with maximum degree $\Delta(G)$. For each vertex $v \in V$, let $L(v) \subset \{1, 2, 3, \dots\}$ be a list of at least $\Delta(G) + 1$ positive integers. Does there always exist an additive coloring $f: V \to \{1, 2, 3, \dots\}$ choosing from the lists $L$, meaning that $f(v) \in L(v)$ for all $v \in V$ and $\sum_{w \in N(u)} f(w) \neq \sum_{w \in N(v)} f(w)$ for every edge $\{u, v\} \in E$? Equivalently, does every finite simple graph $G$ satisfy $\eta_{\ell}(G) \le \Delta(G) + 1$?

Posed in arXiv:2610.30174, Sec. 1, line 101 — An elementary proof of a tight $\Delta+1$ bound for the additive chromatic number

What is known

The paper establishes η(G) ≤ Δ(G) + 1 for ordinary additive colorings using a potential function on orientations, improving the prior bound Δ(G)² - Δ(G) + 1. However, for list additive coloring (lucky choice number η_ℓ(G)), the potential-function argument requires lists to be intervals of consecutive integers {a_v, ..., a_v + d(v)}. For general lists of size Δ(G) + 1, the best known bound remains η_ℓ(G) ≤ Δ(G)² - Δ(G) + 1 (arXiv:1104.1448). Gossett (arXiv:2404.09886) conjectured that every graph admits an Alon-Tarsi orientation for additive colorings, which would settle η_ℓ(G) ≤ Δ(G) + 1, but this remains open.

OP-497 Hash function independence required for quadratic and fixed-offset probingNot in LeanData Structures

Let $n$ be an integer table size and let $(r_0, \dots, r_{n-1})$ be a fixed offset permutation of $\mathbb{Z}/n\mathbb{Z}$ (such as quadratic probing offsets $r_i \equiv i^2 \pmod n$ or $r_i \equiv c_1 i + c_2 i^2 \pmod n$). What is the minimal independence degree $k \in \mathbb{N}$ required of a hash family $\mathcal{H} \subseteq \{h : U \to \mathbb{Z}/n\mathbb{Z}\}$ such that for every sequence of insertions at load factor $1-\epsilon$, the expected insertion time is $O(\epsilon^{-2})$ (or $O(\epsilon^{-1})$ for quadratic probing)? In particular, does 5-wise independence suffice for quadratic probing, or does there exist a 4-wise (or 5-wise) independent hash distribution under which the expected insertion time exceeds this bound?

Posed in arXiv:2610.31363, Sec. 6 — A Sharp Analysis of Fixed Offset Hash Tables

What is known

For linear probing, 5-wise independence is both necessary and sufficient for O(1) expected operation time (Pagh, Pagh, Ruzic 2009; Patrascu and Thorup 2016). Whether 5-wise independence (or any constant degree of independence) suffices to guarantee O(ε⁻²) insertion time for general fixed offset sequences or quadratic probing remains open.

OP-499 Tight Sample Complexity of Testing k-Colorability in the Dense Graph ModelNot in LeanCombinatorics for TCS

Let k ≥ 2 be an integer and ε > 0. In the dense graph model, a graph G on n vertices is ε-far from being k-colorable if at least ε n^2 edges must be removed from G to make it k-colorable. The sample complexity S_k(ε) is the smallest positive integer q such that for every ε-far graph G, a uniformly random q-vertex induced subgraph of G is non-k-colorable with probability at least 2/3. Is S_k(ε) = Θ(log k / ε), or does it grow as Θ(k / ε) or Θ(k log k / ε) as k → ∞ and ε → 0?

Posed in arXiv:2610.31489, Sec. 1, paragraph 3 — Near-Optimal Bounds for Testing k-Colorability

What is known

The paper proves an upper bound of O(k log k / ε), leaving a gap with the conjectured Θ(log k / ε) bound.

OP-504 Proper Growth Rates for Finitely Based Permutation ClassesNot in LeanCombinatorics for TCS

Let $\mathcal{C}$ be a proper permutation class (a downward-closed set of finite permutations under pattern containment that does not contain all permutations) with a finite basis $B$ (the set of minimal permutations not in $\mathcal{C}$). Does $\mathcal{C}$ necessarily have a proper growth rate, that is, does the limit $\lim_{n \to \infty} |\mathcal{C}_n|^{1/n}$ exist?

Posed in arXiv:2610.30369, Question 2.4 — Permutation classes need not have proper growth rates

OP-505 Infimum of Upper Growth Rates of Classes Without Proper Growth RatesNot in LeanCombinatorics for TCS

What is the infimum of the upper growth rates $\overline{\mathrm{gr}}(\mathcal{C}) = \limsup_{n \to \infty} |\mathcal{C}_n|^{1/n}$ over all proper permutation classes $\mathcal{C}$ that do not have a proper growth rate (classes for which $\liminf_{n \to \infty} |\mathcal{C}_n|^{1/n} < \limsup_{n \to \infty} |\mathcal{C}_n|^{1/n}$)? In particular, is this infimum strictly greater than $\xi \approx 2.30522$, and does there exist any such class with upper growth rate less than $\lambda_B \approx 2.35698$?

Posed in arXiv:2610.30369, Sec. 2, under "What remains open" — Permutation classes need not have proper growth rates

OP-508 Expectation-Threshold Lower Bound for Picker-Chooser GamesNot in LeanCombinatorial Games

Let $X$ be a finite set and let $\mathcal{F} \subseteq 2^X$ be a non-trivial increasing family ($\emptyset \notin \mathcal{F}$, $X \in \mathcal{F}$, and $A \in \mathcal{F} \implies A' \in \mathcal{F}$ whenever $A \subseteq A' \subseteq X$). Let $b(\mathcal{F})$ denote the threshold bias of the Picker-Chooser game on $X$ with winning family $\mathcal{F}$, defined as the largest positive integer $b$ such that Picker has a winning strategy in the game where Picker offers $b$ unclaimed elements per round and Chooser keeps 1 and discards $b-1$. Let $q(\mathcal{F})$ be the expectation threshold of $\mathcal{F}$, defined as the supremum of $q \in [0, 1]$ such that there exists a cover $\mathcal{G} \subseteq 2^X$ (every $A \in \mathcal{F}$ contains some $B \in \mathcal{G}$) satisfying $\sum_{T \in \mathcal{G}} q^{|T|} \le 1/2$. Does there exist an absolute constant $\alpha > 0$ such that $b(\mathcal{F}) \ge \alpha q(\mathcal{F})^{-1}$ for every finite set $X$ and every non-trivial increasing property $\mathcal{F} \subseteq 2^X$?

Posed in arXiv:2610.30730, Conjecture 1.5 — Probabilistic and game thresholds

What is known

Resolving this conjecture would show that the bias threshold b(F) is always theta(1/q(F)), completely characterizing the bias threshold for all monotone properties up to a constant factor.

OP-509 Picker-Chooser Bias Threshold for 3-Uniform Hypergraph MatchingsNot in LeanCombinatorial Games

Let $X$ be the edge set of the complete 3-uniform hypergraph $K_n^{(3)}$ on $n$ vertices, and let $\mathcal{M}_n \subseteq 2^X$ denote the property of containing a matching of maximum possible size $\lfloor n/3 \rfloor$. Does the bias threshold $b(\mathcal{M}_n)$ for the Picker-Chooser game satisfy $b(\mathcal{M}_n) = \Theta(n^2)$, or is $b(\mathcal{M}_n) = o(n^2)$ (for example, $\Theta(n^2 / \log n)$)?

Posed in arXiv:2610.30730, Section 1.1, after Theorem 1.4 — Probabilistic and game thresholds

What is known

Theorem 1.4 proves c n^2 / log n <= b(M) <= C n^2 for 3-uniform hypergraph matchings, leaving a logarithmic gap between the lower and upper bounds.

OP-513 Chromatic number of ISK_4-free graphsNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite simple graph containing no induced subdivision of $K_4$ (that is, $G$ is $\mathrm{ISK}_4$-free). Is the chromatic number of $G$ at most 4; that is, does every such graph satisfy $\chi(G) \le 4$?

Posed in arXiv:2610.32404, Conjecture 1.1 — The chromatic number of $\{\mathrm{ISK}_4, \textup{diamond}\}$-free graphs

What is known

Posed in 2012; the present paper proves the conjecture for diamond-free graphs, while the general case without forbidden induced subgraphs other than ISK_4 remains open.

OP-519 Membership of oriented matroid mutation distance in NP for binary distance bounds in rank at least 4Not in LeanNP-Completeness & Reductions

For each fixed integer r >= 4, is the problem Dist_r (deciding whether the mutation distance between two uniform chirotopes of rank r on n elements is at most K, where K is encoded in binary) in NP? Equivalently, is the diameter of every connected component of the uniform oriented matroid mutation graph G_{n,r} bounded by a polynomial in n?

Posed in arXiv:2610.03808, Sec. 9, open problem 3 — Computing distances in braid-move graphs, higher Bruhat orders, and oriented-matroid mutation graphs is NP-hard

What is known

The paper proves that Dist_r is NP-complete when K is given in unary, but binary K remains open because no polynomial bound on the diameter of components of the mutation graph is known for rank r >= 4.

OP-520 Complexity of mutation reachability in uniform oriented matroidsNot in LeanNP-Completeness & Reductions

For fixed rank r >= 7, what is the computational complexity of deciding whether two given uniform oriented matroids of rank r on n elements belong to the same connected component of the mutation graph G_{n,r}? In particular, is this reachability problem solvable in polynomial time, or is it NP-hard or PSPACE-complete?

Posed in arXiv:2610.03808, Sec. 9, open problem 4 — Computing distances in braid-move graphs, higher Bruhat orders, and oriented-matroid mutation graphs is NP-hard

What is known

Since recent work of Gu and Knauer showed that mutation graphs of uniform oriented matroids can be disconnected for r >= 7 and n >= r + 17, testing whether two uniform oriented matroids lie in the same mutation component is a natural algorithmic problem whose computational complexity is completely open.

OP-521 Erdős Distinct Subset Sums ConjectureNot in LeanElementary Number Theory

Does there exist an absolute constant $c > 0$ such that for every positive integer $n$ and every set $A \subset \mathbb{Z}^+$ of $n$ positive integers with distinct subset sums, the maximum element satisfies $\max A \ge c \cdot 2^n$?

Posed in arXiv:2610.32580, Sec. 1, lines 90-92 — New approaches to the Erd\H{o}s Distinct Subset Sums Problem

OP-523 Randomized Communication Complexity of Undirected Graph ConnectivityNot in LeanCommunication Complexity

In the two-party randomized communication model with public randomness, Alice and Bob receive edge sets $E_A, E_B \subseteq \binom{V}{2}$ of an undirected graph $G = (V, E_A \cup E_B)$ on $N$ vertices. For a fixed constant error probability $\varepsilon \in (0, 1/2)$ (such as $\varepsilon = 1/3$), does every randomized protocol deciding whether $G$ is connected require $\Omega(N \log N)$ communication, or does there exist a protocol with communication $o(N \log N)$ (or even $O(N)$)?

Posed in arXiv:2610.32346, Sec. 1, p. 1 — Settling Nondeterministic Communication Complexity of Graph Connectivity

OP-524 Three-Round Communication Complexity of Bit Pointer Chasing on Thirteen LayersNot in LeanCommunication Complexity

In the bit pointer chasing problem on permutations with $k$ layers, $\mathrm{bPC\text{-}Perm}_{n,k}$, Alice and Bob are given permutations $f_1, \dots, f_k : [n] \to [n]$ where Alice holds $f_i$ for odd $i$ and Bob holds $f_i$ for even $i$, together with a fixed starting vertex $v_0 \in [n]$. The parties must compute the parity of the final vertex $v_k = f_k(f_{k-1}(\cdots f_1(v_0)\cdots))$. For $k = 13$, does every 3-round randomized communication protocol solving $\mathrm{bPC\text{-}Perm}_{n,13}$ with error probability at most $1/3$ require $\Omega(n \log n)$ communication?

Posed in arXiv:2610.32346, Sec. 2, p. 6 — Settling Nondeterministic Communication Complexity of Graph Connectivity

OP-526 Distinguishing Caterpillars by the Fourth Principal Specialization of the t-Chromatic Symmetric FunctionNot in LeanGraph Theory & Graph Algorithms

Let $T$ and $T'$ be two finite caterpillars (trees whose non-leaf vertices induce a path). Let $\mathsf{ps}_4(Z_T(\mathbf{x}; t)) \in \mathbb{Z}[q, t]$ denote the 4th principal specialization of the $t$-chromatic symmetric function, defined by $\mathsf{ps}_4(Z_T(\mathbf{x}; t)) = \sum_{\kappa} q^{\sum_{v \in V(T)} \kappa(v)} t^{|\kappa(V(T))|}$, where the sum ranges over all proper vertex colorings $\kappa : V(T) \to \{0, 1, 2, 3\}$. Is it true that $T \cong T'$ if and only if $\mathsf{ps}_4(Z_T(\mathbf{x}; t)) = \mathsf{ps}_4(Z_{T'}(\mathbf{x}; t))$?

Posed in arXiv:2610.31785, Conjecture 6.1 — Principal specializations of the $t$-chromatic symmetric function

OP-527 Distinguishing Caterpillars by the Fourth Principal Specialization of the Chromatic Symmetric FunctionNot in LeanGraph Theory & Graph Algorithms

Let $T$ and $T'$ be two finite caterpillars. Let $\mathsf{ps}_4(X_T(\mathbf{x})) \in \mathbb{Z}[q]$ denote the 4th principal specialization of Stanley's chromatic symmetric function, given by $\mathsf{ps}_4(X_T(\mathbf{x})) = \sum_{\kappa} q^{\sum_{v \in V(T)} \kappa(v)}$, where the sum ranges over all proper vertex colorings $\kappa : V(T) \to \{0, 1, 2, 3\}$. Is it true that $T \cong T'$ if and only if $\mathsf{ps}_4(X_T(\mathbf{x})) = \mathsf{ps}_4(X_{T'}(\mathbf{x}))$?

Posed in arXiv:2610.31785, Conjecture 6.2 — Principal specializations of the $t$-chromatic symmetric function

OP-528 Distinguishing Trees of Bounded Order by the Principal Specialization of the t-Chromatic Symmetric FunctionNot in LeanGraph Theory & Graph Algorithms

For each integer $n \ge 2$, let $\mathcal{T}_n$ be the family of all finite trees with at most $n$ vertices. For any tree $T$, let $\mathsf{ps}_n(Z_T(\mathbf{x}; t)) \in \mathbb{Z}[q, t]$ be the $n$-th principal specialization of the $t$-chromatic symmetric function, defined by $\mathsf{ps}_n(Z_T(\mathbf{x}; t)) = \sum_{\kappa : V(T) \to \{0, 1, \dots, n-1\} \text{ proper}} q^{\sum_{v \in V(T)} \kappa(v)} t^{|\kappa(V(T))|}$. Is it true that for all $T, T' \in \mathcal{T}_n$, $T \cong T'$ if and only if $\mathsf{ps}_n(Z_T(\mathbf{x}; t)) = \mathsf{ps}_n(Z_{T'}(\mathbf{x}; t))$?

Posed in arXiv:2610.31785, Conjecture 6.3 — Principal specializations of the $t$-chromatic symmetric function

OP-531 Computational complexity of deciding existence of a sharp cyclic labelingNot in LeanCombinatorics for TCS

Given a finite simple undirected unweighted graph $G = (V, E)$, what is the computational complexity of the decision problem of determining whether $G$ admits a sharp cyclic labeling $\pi : \mathbb{Z}_{|V|} \to V$ (that is, a bijection under which the Fourier transform of the adjacency matrix has at most one nonzero entry per row and column)? In particular, is this decision problem NP-complete?

Posed in arXiv:2610.31807, Question 12.2 — Additive energy and Fourier complexity of graphs

What is known

The paper raises the decision problem for simple unweighted graphs following an NP-hardness result for weighted graphs by prior authors.

OP-532 Asymptotic order of maximum triangle-free sets in Hamming graphs at fixed even distancesNot in LeanCombinatorics for TCS

Let q ≥ 2 and h ≥ 1 be fixed integers. For integers n ≥ 2h, let H_q(n, 2h) be the graph on [q]^n with edges between vertices at Hamming distance 2h, and let T_q(n, 2h) denote the maximum size of a vertex subset A ⊆ [q]^n inducing a triangle-free subgraph. Does there exist a constant c = c(q, h) > 0 such that T_q(n, 2h) ≥ c · q^n / n^h for all sufficiently large n, establishing T_q(n, 2h) = Θ_{q,h}(q^n / n^h)?

Posed in arXiv:2610.32789, Conjecture 1.7 — Triangle-Free Sets in Exact-Distance Hamming Graphs

What is known

Proposition 1.2 proves T_q(n, 2h) = O_{q,h}(q^n / n^h). Theorem 1.3 matches this at h=1 for all q, and Theorem 1.6 matches it at q=3, h=2. Conjecture 1.7 asserts that this upper bound is tight in order of magnitude for all q ≥ 2 and all h ≥ 1.

OP-533 Vanishing density of triangle-free sets in ternary distance-three Hamming graphsNot in LeanCombinatorics for TCS

Let T_3(n, 3) denote the maximum size of a subset of {0, 1, 2}^n that contains no triangle in the graph whose edges connect words at Hamming distance 3. Does the density T_3(n, 3) / 3^n tend to 0 as n → ∞; that is, is T_3(n, 3) = o(3^n)?

Posed in arXiv:2610.32789, Sec. 6, open question 2 — Triangle-Free Sets in Exact-Distance Hamming Graphs

What is known

The paper proves T_3(n,3) = Ω(3^n log log n / log n) and T_3(n,3) ≤ (5/27 + O(1/n)) 3^n, establishing that T_3(n,3) is much larger than the polynomial bounds seen at even distances, but leaving open whether the density tends to zero.

OP-535 Combinatorial bijection between pattern-avoiding words for patterns with equal self-border lengthsNot in LeanCombinatorics for TCS

Let Σ be a finite alphabet and let p, q ∈ Σ^k be two words of the same length having the same self-border lengths, meaning {m < k : the prefix of p of length m equals its suffix of length m} = {m < k : the prefix of q of length m equals its suffix of length m}. For each integer n ≥ k, let A_n(p) be the set of words in Σ^n avoiding p as a contiguous subword, and B_n(q) the set of words in Σ^n avoiding q as a contiguous subword. Does there exist an explicit, natural combinatorial bijection between A_n(p) and B_n(q) for all such pairs (p, q) and all n?

Posed in arXiv:2610.31967, Sec. 1, lines 91-92 — Swapping Compatible Words

What is known

Guibas and Odlyzko (1981) proved that words of length n avoiding p and words of length n avoiding q are equinumerous iff p and q have identical self-border lengths. The question asks for an explicit combinatorial bijection without the extra restrictions of identical border sets or cross-border compatibility.

OP-548 Ando's Conjecture on Isomorphic Bisections of Cubic GraphsNot in LeanGraph Theory & Graph Algorithms

Let $G = (V, E)$ be a finite simple cubic (3-regular) graph. (By the handshaking lemma, $|V|$ is necessarily even.) Does there exist a partition of $V$ into two subsets $V_1, V_2$ of equal size $|V_1| = |V_2| = |V| / 2$ such that the induced subgraphs $G[V_1]$ and $G[V_2]$ are isomorphic? Equivalently, is every cubic graph bisectable?

Posed in arXiv:2610.35274, Abstract — Regular Graphs Without Isomorphic Bisections

What is known

Ando's conjecture (1998) asserts that every cubic graph has an isomorphic bisection. While the conjecture was established for sufficiently large connected cubic graphs in 2024, the general conjecture remains open for disconnected cubic graphs and for small connected cubic graphs below the asymptotic threshold.

OP-549 Saturation numbers of joins of complete graphs and paths for cliques of order at least 4Not in LeanGraph Theory & Graph Algorithms

Let $s \ge 4$ and $k \ge 3$ be integers. Define $a_k = k$ for $3 \le k \le 5$, $a_k = 3 \cdot 2^{t-1} - 2$ for $k = 2t \ge 6$, and $a_k = 2^{t+1} - 2$ for $k = 2t + 1 \ge 7$. For every integer $n \ge a_k + s$, is the saturation number of the join $K_s \vee P_k$ given by $\operatorname{sat}(n, K_s \vee P_k) = \binom{s}{2} + s(n-s) + \operatorname{sat}(n-s, P_k)$?

Posed in arXiv:2610.34990, Sec. 4 — Saturation numbers of $K_3 \vee P_k$

What is known

The paper determines the saturation number sat(n, K_s ∨ P_k) for s = 3, following the case s = 2 settled in earlier work, but the general conjecture remains open for every s ≥ 4.

OP-550 Period of modular linear recurrence polynomial at Mersenne exponentsNot in LeanElementary Number Theory

For an integer $k \ge 2$, let $N_C(k)$ denote the order of the polynomial $x^k + x + 1$ over $\mathbb{F}_2$, that is, the smallest positive integer $m \ge 1$ such that $x^k + x + 1$ divides $x^m - 1$ in $\mathbb{F}_2[x]$. (Equivalently, $N_C(k)$ is the minimal period of the sequence in $\mathbb{Z}/3\mathbb{Z}$ defined by $x_1 = \dots = x_{k-1} = 0$, $x_k = 1$, and $x_n = 2(x_{n-1}^2 + x_{n-1} + x_{n-k}^2 + x_{n-k}) \pmod 3$ for $n \ge k+1$.) Is it true that for every integer $j \ge 2$, $$N_C(2^j - 1) = 2^{N_C(j)} - 1?$$

Posed in arXiv:2610.34300, Conjecture 5 — Three Quadratic Recurrences Modulo 3: What We Can Prove and What We Can Guess

OP-551 Four-cycle periods for quadratic recurrence modulo 3 on quadratic and odd power sequencesNot in LeanElementary Number Theory

For an integer $k \ge 2$, consider the sequence $(x_n)_{n \ge 1}$ in $\mathbb{Z}/3\mathbb{Z}$ defined by $x_1 = \dots = x_{k-1} = 0$, $x_k = 1$, and $x_n = x_{n-1} + x_{n-k}^2 \pmod 3$ for $n \ge k+1$. Let $N_A(k)$ denote the eventual minimal period of $(x_n)$. Is it true that $N_A(4m^2 + 3) = 4$ for every integer $m \ge 0$, and that $N_A(3^{2j+1}) = 4$ for every integer $j \ge 0$?

Posed in arXiv:2610.34300, Conjecture 14 — Three Quadratic Recurrences Modulo 3: What We Can Prove and What We Can Guess

OP-552 Fixed offset between capture point and pre-period for four-periodic modular quadratic recurrenceNot in LeanElementary Number Theory

For an integer $k \ge 2$ with $k \equiv 2$ or $3 \pmod 4$, consider the sequence $(x_n)_{n \ge 1}$ in $\mathbb{Z}/3\mathbb{Z}$ defined by $x_1 = \dots = x_{k-1} = 0$, $x_k = 1$, and $x_n = x_{n-1} + x_{n-k}^2 \pmod 3$ for $n \ge k+1$. Suppose the sequence has eventual period $N_A(k) = 4$. Let $G = \lceil (k-1)/4 \rceil$. Define the capture point $z(k)$ to be the smallest index $z$ such that $x_{z - 4i} = 0$ for all $0 \le i \le G$ and $x_n \ne 0$ for all other $z - 4G < n < z$ (a run of $G$ consecutive gaps of length 4 ending at $z$). Let $\mu_A(k)$ be the pre-period, defined as the least integer $\mu \ge 0$ such that $x_{n+4} = x_n$ for all $n > \mu$. Is it true that $z(k) - \mu_A(k) = 6$ for every such $k$?

Posed in arXiv:2610.34300, Conjecture 23 — Three Quadratic Recurrences Modulo 3: What We Can Prove and What We Can Guess

OP-553 Proportional choice number of paths of order at least 6Not in LeanGraph Theory & Graph Algorithms

For every integer n >= 6, is the proportional choice number of the path graph P_n equal to 3?

Posed in arXiv:2610.33914, Conjecture 11 — Improved Bounds on Proportional Choice Numbers

What is known

The paper proves chi_pc(P_n) <= 4 for all n, while prior work showed chi_pc(P_n) = 2 for 2 <= n <= 5 and chi_pc(P_n) >= 3 for n >= 6. Conjecture 11 asserts that chi_pc(P_n) = 3 for every n >= 6.

OP-554 Proportional choice number bounded by maximum degree plus coloring number minus oneNot in LeanGraph Theory & Graph Algorithms

For every finite simple graph G with maximum degree Delta(G) >= 1, is the proportional choice number chi_pc(G) at most Delta(G) + col(G) - 1, where col(G) is the coloring number (degeneracy plus 1) of G?

Posed in arXiv:2610.33914, Conjecture 13 — Improved Bounds on Proportional Choice Numbers

What is known

The paper establishes chi_pc(G) <= 2^(chi'(G)) and constructs graphs (2d-1) K_{d,d} achieving chi_pc = 2 Delta(G) = Delta(G) + col(G) - 1, which disproves the earlier conjecture chi_pc <= Delta + 1 and matches the bound of Conjecture 13 with equality. Conjecture 13 would provide a linear upper bound on chi_pc in terms of Delta and degeneracy.

OP-555 Direct product of coprime DCI-groups is DCINot in LeanGraph Theory & Graph Algorithms

Let $G_1$ and $G_2$ be finite groups with coprime orders, i.e., $\gcd(|G_1|, |G_2|) = 1$. A finite group $G$ is called a DCI-group (directed Cayley isomorphism group) if for every pair of subsets $S, T \subseteq G$, the Cayley digraphs $\mathrm{Cay}(G, S)$ and $\mathrm{Cay}(G, T)$ are isomorphic if and only if there exists a group automorphism $\alpha \in \mathrm{Aut}(G)$ such that $\alpha(S) = T$. Is the direct product $G_1 \times G_2$ a DCI-group whenever both $G_1$ and $G_2$ are DCI-groups?

Posed in arXiv:2610.33692, Conjecture 1 — On the isomorphism problem of Cayley digraphs

OP-556 Rank bound for elementary abelian DCI-groupsNot in LeanGraph Theory & Graph Algorithms

For each prime $p$, let $r(p)$ be the supremum of all positive integers $r$ such that the elementary abelian $p$-group $(\mathbb{Z}/p\mathbb{Z})^r$ is a DCI-group. Is there a universal constant $C$ such that $r(p) \le C$ for all primes $p$, or does $r(p) \to \infty$ as $p \to \infty$? Furthermore, for the prime $p = 3$, are the elementary abelian groups $(\mathbb{Z}/3\mathbb{Z})^6$ and $(\mathbb{Z}/3\mathbb{Z})^7$ DCI-groups?

Posed in arXiv:2610.33692, Problem 1 — On the isomorphism problem of Cayley digraphs

OP-558 Sharp Threshold for Maximality of the Canonical Star in Intersecting Partitions into k PartsNot in LeanCombinatorics for TCS

For integers n ≥ k ≥ 1 and 1 ≤ t < k, let P_{n,k} denote the set of partitions of n into exactly k positive parts. Two partitions λ, μ ∈ P_{n,k} are t-intersecting if their multiset intersection contains at least t elements (counting multiplicity). The canonical t-star is T_{n,k,t} = {λ ∈ P_{n,k} : m_λ(1) ≥ t}. For each k ≥ 4 and 1 ≤ t < k, define n*(k, t) to be the minimal integer such that for all n ≥ n*(k, t), every t-intersecting family F ⊆ P_{n,k} satisfies |F| ≤ |T_{n,k,t}|. For t = 1, what is the asymptotic behavior of n*(k, 1) as k → ∞? In particular, does the limit lim_{k → ∞} n*(k, 1)/k^2 exist, and if so, what is its value?

Proposed here, building on arXiv:2610.01747, Theorem 1.2 — Intersecting integer partitions: star bounds and counterexamples at every scale; the paper does not ask it

What is known

It was proved in this paper that the canonical star is maximal whenever n ≥ A k^3 for A > 24, while counterexamples strictly larger than the canonical star are constructed at n = ⌊t k^2 / 3⌋ for 1 ≤ t ≤ ⌈k/4⌉, showing that any uniform threshold must grow at least quadratically in k. While an upper bound of order O(t k^2) is announced in Section 7, the exact leading constant and sharp threshold function n*(k, t) distinguishing the star-maximal regime from the non-star regime remain open.

OP-564 Maximum average degree threshold for strong odd 6-coloringNot in LeanGraph Theory & Graph Algorithms

For an integer $c \ge 5$, let $m_c = \inf\{\operatorname{mad}(G) : \chi_{\mathrm{so}}(G) \ge c+1\}$, where $\operatorname{mad}(G) = \max_{\emptyset \neq H \subseteq G} \frac{2|E(H)|}{|V(H)|}$ is the maximum average degree of a finite simple graph $G$, and $\chi_{\mathrm{so}}(G)$ is the strong odd chromatic number of $G$ (the minimum number of colors in a proper vertex coloring such that for every vertex $v$, each color appearing on the open neighborhood $N(v)$ appears an odd number of times). Does $m_6 = \frac{18}{7}$? That is, does every finite simple graph $G$ with $\operatorname{mad}(G) < \frac{18}{7}$ admit a strong odd 6-coloring?

Posed in arXiv:2610.34874, Sec. 7, Problem 7.1 — On strong odd colorings of sparse graphs

What is known

The paper defines the density threshold m_c = inf{mad(G) : chi_so(G) >= c+1} for strong odd c-coloring. It determines m_5 = 7/3, poses Problem 7.1 to determine m_c for all c >= 6, and specifically conjectures m_6 = 18/7 in Conjecture 7.2.

OP-566 Asymptotic Leading Constant and Partition Equivalence for Admissible Sets with Given MaximumNot in LeanCombinatorics for TCS

Let $b(N)$ denote the number of nonempty admissible subsets of $\{1, \dots, N\}$ with maximum element equal to $N$, where a finite set of positive integers $A$ is admissible if any two subsets of $A$ with equal sum have equal cardinality, and let $p(N)$ denote the number of integer partitions of $N$. Is it true that $\log b(N) = \left(\pi \sqrt{2/3} + o(1)\right)\sqrt{N}$ as $N \to \infty$, or even $b(N) \sim p(N)$ as $N \to \infty$?

Posed in arXiv:2610.34372, Sec. 1, after Thm 1.2 — Counting Admissible Sets of Integers: A Proof of the Erd\H{o}s--Nicolas--S\'ark\"ozy Conjecture

What is known

While the paper proves log b(N) ≍ √N, matching the order of magnitude conjectured by Erdős, Nicolas and Sárközy, it explicitly points out that Nicolas's proposed sharper asymptotic formula and asymptotic equivalence to the partition function remain open.

OP-568 Rearrangeability of Subsets in Finite Abelian GroupsNot in LeanCombinatorics for TCS

Let $G$ be a finite abelian group, written additively, and let $S \subseteq G \setminus \{0\}$ be any finite subset with $|S| = n \ge 1$. Does there always exist an ordering $(s_1, \dots, s_n)$ of the elements of $S$ such that the nonempty partial sums $s_1, s_1 + s_2, \dots, s_1 + \dots + s_n$ are pairwise distinct?

Posed in arXiv:2610.34424, Conjecture 1.3 — Graham's rearrangement conjecture in finite abelian groups

OP-569 Rainbow Directed Paths in Properly Edge-Colored Regular DigraphsNot in LeanGraph Theory & Graph Algorithms

Let $H$ be a finite directed graph in which every vertex has in-degree and out-degree equal to $d \ge 1$. Suppose $H$ has a proper edge-coloring with $d$ colors (that is, no two incoming edges to the same vertex share a color, and no two outgoing edges from the same vertex share a color). Does $H$ necessarily contain a rainbow directed path of length $d - 1$ (a simple directed path whose $d - 1$ edges all have pairwise distinct colors)?

Posed in arXiv:2610.34424, Problem 1.5 — Graham's rearrangement conjecture in finite abelian groups

OP-570 Optimal Additive Dimension Condition for Zero-Sum-Free Subinterval OrderingsNot in LeanCombinatorics for TCS

Let $G$ be a finite abelian group, and let $S \subseteq G \setminus \{0\}$ be a subset of size $n \ge 3$. Does there exist an absolute constant $C > 0$ such that if the additive dimension (the maximum size of a dissociated subset) satisfies $\dim_{\mathrm{diss}}(S) \ge C \log n$, then the Cayley digraph $\operatorname{Cay}(G, S)$ contains a rainbow directed path of length $n$ using every color in $S$ when $\sum_{s \in S} s \neq 0$, and a rainbow directed cycle of length $n$ using every color in $S$ when $\sum_{s \in S} s = 0$?

Proposed here, building on arXiv:2610.34424, Theorem 1.8 — Graham's rearrangement conjecture in finite abelian groups; the paper does not ask it

What is known

Theorem 1.8 proves that if an n-element subset S of a finite abelian group has dissociated dimension at least A (log n)^2 / log log n, then S has an ordering in which no proper nonempty interval of consecutive terms sums to zero. Every n-element subset in an abelian group satisfies dim_diss(S) ≥ log_3(n + 1). The paper's bound is within an O(log n / log log n) factor of this theoretical minimum, leaving open whether the condition can be relaxed to an optimal bound of order O(log n).

OP-571 Antipodal coincidences for adaptive continuous measurements on spheres of non-power-of-two dimensionNot in LeanComputational Learning Theory

Let $m \in \mathbb{N}_{\ge 3}$ be an integer that is not a power of $2$, and let $\|\cdot\|$ be a norm on $\mathbb{R}^m$. For $R > 0$, let $S_R^m = \{x \in \mathbb{R}^m : \|x\| = R\}$ be the sphere of radius $R$. Let $n = \lceil \log_2 m \rceil$, and let $N: S_R^m \to \mathbb{R}^n$ be an adaptive continuous measurement map of length $n$, where $N(x) = (\lambda_1(x), \lambda_2^{(\lambda_1(x))}(x), \dots, \lambda_n^{(\lambda_1(x), \dots, \lambda_{n-1}(x))}(x))$ with continuous $\lambda_1 : S_R^m \to \mathbb{R}$ and continuous $\lambda_k^{(y)} : S_R^m \to \mathbb{R}$ for each prefix $y \in \mathbb{R}^{k-1}$ ($2 \le k \le n$). Does there necessarily exist a point $x \in S_R^m$ such that $N(x) = N(-x)$? Equivalently, can $n = \lceil \log_2 m \rceil$ adaptive continuous measurements distinguish all antipodal pairs on $S_R^m$?

Posed in arXiv:2610.33781, Sec. 3, Remark 6 — A Borsuk-Ulam theorem for adaptive continuous measurements

What is known

Theorem 1 proves that 2^n <= m forces antipodal coincidences on S_R^m for any n adaptive continuous measurements. When m is not a power of 2, the integer n = ⌈log₂ m⌉ satisfies 2^n >= m + 1 > m, so the genus bound γ(S_R^m) = m <= 2^n - 1 does not forbid distinguishing antipodes. Whether such coincidences are nonetheless forced remains open.

OP-572 Equivalence of adaptive continuous and nonadaptive measurements in general Banach spacesNot in LeanComputational Learning Theory

Let $X$ and $Y$ be real Banach spaces, let $B_X = \{x \in X : \|x\|_X \le 1\}$ be the closed unit ball of $X$, and let $S : X \to Y$ be a bounded linear operator. For each $n \in \mathbb{N}_{\ge 1}$, let $e_n^{\rm cont}(S, B_X) = \inf_A \sup_{f \in B_X} \|S(f) - A(f)\|_Y$ be the minimal worst-case error achievable by an algorithm $A = \Phi \circ N$ using an adaptive continuous measurement map $N : X \to \mathbb{R}^n$ of length $n$ and an arbitrary reconstruction map $\Phi : \mathbb{R}^n \to Y$. Let $e_k^{\rm non}(S) = \inf_{N, \Phi} \sup_{f \in B_X} \|S(f) - \Phi(N(f))\|_Y$ be the minimal worst-case error using a continuous nonadaptive map $N : X \to \mathbb{R}^k$. Does there exist an absolute constant $c > 0$ such that $e_n^{\rm cont}(S, B_X) \ge c\, e^{\rm non}_{2^n-1}(S)$ holds for all Banach spaces $X, Y$, all bounded linear operators $S : X \to Y$, and all $n \ge 1$?

Posed in arXiv:2610.33781, Sec. 4, Remark 9 — A Borsuk-Ulam theorem for adaptive continuous measurements

What is known

In Hilbert spaces, the paper shows that the adaptive continuous measurement error e_n^{cont}(S, B_X) and nonadaptive continuous measurement error e_{2^n-1}^{non}(S) match up to indexing shifts because all s-numbers coincide. In general Banach spaces, Bernstein numbers can be strictly smaller than nonadaptive error, and it is open whether an adaptive continuous measurement map of length n must be lower bounded by the nonadaptive continuous error of length 2^n - 1 up to a constant factor.

OP-573 Supremum of circular chromatic numbers of simple planar signed graphsNot in LeanGraph Theory & Graph Algorithms

Let $\mathcal{SP}$ denote the class of all simple planar signed graphs. A signed graph $(G, \sigma)$ consists of a simple graph $G = (V, E)$ and an edge signature $\sigma : E \to \{+1, -1\}$. For a real number $r \ge 2$, a circular $r$-coloring of $(G, \sigma)$ is a mapping $\phi : V \to \mathbb{R}/r\mathbb{Z}$ such that the shortest-arc distance $d_r(\phi(u), \phi(v))$ satisfies $d_r(\phi(u), \phi(v)) \ge 1$ whenever $\sigma(uv) = -1$, and $d_r(\phi(u), \phi(v)) \le r/2 - 1$ whenever $\sigma(uv) = +1$. The circular chromatic number $\chi_{\mathrm{c}}(G, \sigma)$ is the infimum of all $r \ge 2$ for which a circular $r$-coloring exists. What is the supremum $\chi_{\mathrm{c}}(\mathcal{SP}) = \sup \{ \chi_{\mathrm{c}}(G, \sigma) : (G, \sigma) \in \mathcal{SP} \}$, which is known to satisfy $5 \le \chi_{\mathrm{c}}(\mathcal{SP}) \le 6$?

Posed in arXiv:2610.34118, Sec. 3, The supremum — A planar signed graph with circular chromatic number five

OP-575 Golomb-Welch conjecture for arbitrary tilings of integer lattices by Lee ballsNot in LeanCombinatorics for TCS

Let $n \ge 3$ and $r \ge 2$ be integers. For $x \in \mathbb{Z}^n$, let $\|x\|_1 = \sum_{i=1}^n |x_i|$, and let $B_n(r) = \{x \in \mathbb{Z}^n : \|x\|_1 \le r\}$ denote the Lee ball of radius $r$. Does there exist a subset $C \subseteq \mathbb{Z}^n$ such that the family of translates $\{c + B_n(r) : c \in C\}$ forms a partition of $\mathbb{Z}^n$?

Posed in arXiv:2610.33983, Sec. 1, lines 137-140 — The Golomb--Welch conjecture for lattice tilings

What is known

While the paper settles the conjecture for all lattice tilings (subgroups L of ℤ^n), it explicitly notes that the original conjecture posits nonexistence for arbitrary center sets.

OP-577 Communication complexity of additive singularity for Boolean matricesNot in LeanCommunication Complexity

Let n ≥ 1 be an integer. In the additive matrix singularity problem on Boolean matrices, Alice holds an n × n matrix A ∈ {0, 1}^{n × n} and Bob holds an n × n matrix B ∈ {0, 1}^{n × n}, and they communicate to decide whether A + B is singular over ℚ with worst-case error at most 1/3. Does additive singularity require quadratic communication on Boolean inputs; that is, is the bounded-error randomized communication complexity of this problem Θ(n²), or does there exist a randomized protocol solving it with o(n²) communication bits?

Posed in arXiv:2610.33521, Sec. 1.5, para. 1 — Communication Complexity of Integer Matrix Singularity

OP-578 Randomized versus entangled quantum communication for additive matrix singularityNot in LeanCommunication Complexity

For integers n ≥ 1 and 1 ≤ k ≪ n log n, let SING⁺_{n,k} denote the additive matrix singularity problem over ℚ, where Alice and Bob hold n × n matrices A, B with k-bit non-negative integer entries and communicate to decide whether A + B is singular over ℚ with error at most 1/3. Is the entangled quantum communication complexity asymptotically smaller than the public-coin randomized communication complexity, i.e., Q*_{1/3}(SING⁺_{n,k}) = o(R^pub_{1/3}(SING⁺_{n,k})), or do randomized and entangled quantum complexities coincide up to constant factors throughout the unresolved range k ≪ n log n?

Posed in arXiv:2610.33521, Sec. 1.5, para. 2 — Communication Complexity of Integer Matrix Singularity

OP-579 Polynomial chi-boundedness of P_t-free graphsNot in LeanGraph Theory & Graph Algorithms

Let $t \ge 6$ be an integer. Does there exist a constant $C = C(t) > 0$ such that every finite simple graph $G$ with no induced path on $t$ vertices satisfies $\chi(G) \le \omega(G)^C$, where $\chi(G)$ is the chromatic number and $\omega(G)$ is the clique number of $G$?

Posed in arXiv:2610.33407, Sec. 1 — A quasi-polynomial $\chi$-bound for $P_6$-free graphs

What is known

The paper proves a quasi-polynomial bound for t = 6, improving on the previous exponential bounds, but leaves polynomial chi-boundedness open for all t >= 6.

OP-581 Polynomial neighborhood bound for dominated pairs in P_t-free graphsNot in LeanGraph Theory & Graph Algorithms

Let $t \ge 7$ be an integer. Does there exist a constant $C_t > 0$ such that for every finite simple $P_t$-free graph $G$, every stable set $R \subseteq V(G)$, and every nonempty subset $Y \subseteq V(G) \setminus R$ such that every vertex in $Y$ has at least one neighbor in $R$, the chromatic number satisfies $\chi(G[Y]) \le C_t \, (\omega(G[Y]))^{C_t} \max_{r \in R} \chi(G[N(r) \cap Y])$?

Proposed here, building on arXiv:2610.33407, Thm 1.2 — A quasi-polynomial $\chi$-bound for $P_6$-free graphs; the paper does not ask it

What is known

Theorem 1.2 shows that in any $P_6$-free graph, the chromatic number of a dominated set $Y$ is bounded by a polynomial factor $55 \omega(Y)^{10}$ times the maximum chromatic number of a star $N(r) \cap Y$ for $r \in R$. The paper proves this only for $P_6$-free graphs (via Lemma 3.2). It leaves open whether an analogous polynomial reduction holds for $P_t$-free graphs for each $t \ge 7$.

OP-583 Exact Asymptotic Leading Constant for Minimum Symbols in Anonymous SlipsNot in LeanCombinatorial Games

Let r_E(S), r_L(S), c_E(S), c_L(S) denote the minimum number of symbols required to solve the anonymous-slip puzzle for S sages in a row without seat labels, in a row with labeled seats, in a circle without seat labels, and in a circle with labeled seats, respectively. It is known that all four quantities satisfy (1/e^2 + o(1)) S^2 <= f(S) <= C(S, 2) = (1/2 + o(1)) S^2 as S -> infinity. Can this gap between the lower constant 1/e^2 approx 0.1353 and the upper constant 1/2 = 0.5 be narrowed? In particular, what is the asymptotic leading constant C = lim_{S -> infinity} f(S) / S^2 for each of the four variants, and do the four constants coincide?

Posed in arXiv:2610.33032, Question 13 — Sages and Their Anonymous Slips

OP-586 Asymptotic Order of Magnitude of One-Dimensional Extremal Sets Avoiding Geometric Progressions in Distance SetsNot in LeanCombinatorics for TCS

Let $p \ge 7$ be an odd prime. For any subset $A \subseteq \mathbb{F}_p$, let $\Delta(A) = (A - A)^2 = \{(a - b)^2 : a, b \in A\}$. A nondegenerate three-term geometric progression in $\Delta(A)$ is a triple of elements $x, xr, xr^2 \in \Delta(A)$ such that $x, r \in \mathbb{F}_p^\times$ and $r^2 \neq 1$. Let $M_{\mathrm{GP},1}(p) = \max\{|A| : A \subseteq \mathbb{F}_p,\ \Delta(A)\text{ contains no nondegenerate three-term geometric progression}\}$. What is the true asymptotic exponent of $M_{\mathrm{GP},1}(p)$: does there exist an exponent $\alpha \in [7/26, 16/25]$ such that $\lim_{p \to \infty} \frac{\log M_{\mathrm{GP},1}(p)}{\log p} = \alpha$, and in particular is $\alpha \le 1/2$?

Posed in arXiv:2610.34758, Section 5.4, Question 5.4 — Geometric progressions in distance sets in odd dimensions over prime fields

OP-590 Optimal Degree-Dependent Upper Bound on Polynomial Discrete Logarithm AgreementNot in LeanFoundations of Cryptography

Let $p$ be a prime, $g$ a primitive root modulo $p$, and let $\mathsf{dlog} : \mathbb{F}_p^\times \to \{0, \dots, p-2\}$ denote the discrete logarithm base $g$. Is it true that for every integer $D \ge 1$ and every polynomial $f(X) \in \mathbb{F}_p[X]$ of degree at most $D$, $|\{x \in \mathbb{F}_p^\times \mid f(x) = \mathsf{dlog}(x)\}| \le (1 + o(1)) \cdot D \cdot \frac{\log p}{\log(D + 1)}$ as $p \to \infty$?

Posed in arXiv:2610.33452, Conjecture 1.1 — Bounds on polynomial approximations of the discrete logarithm function

What is known

The paper conjectures that the true upper bound on the number of points where a degree-$D$ polynomial over $\mathbb{F}_p$ agrees with the discrete logarithm is $(1+o(1)) D \frac{\log p}{\log(D+1)}$, matching the best known impossibility results for list-decodability of Reed-Solomon codes over prime fields.

OP-603 Additive Basis Threshold for C_p ⊕ C_pn with Odd Primes p ≥ 5Not in LeanCombinatorics for TCS

Let $p \geq 5$ be a prime, and let $n \geq 2$ be an integer such that every prime divisor of $n$ is at least $p$. Let $G = C_p \oplus C_{pn} \cong (\mathbb{Z}/p\mathbb{Z}) \oplus (\mathbb{Z}/pn\mathbb{Z})$. Is the additive basis threshold $c_0(G)$ equal to $pn + 2p - 3$? Here $c_0(G)$ is the minimum positive integer $t$ such that every regular sequence $S$ over $G$ of length $|S| \geq t$ has non-empty subset sums covering $G$ ($\Sigma(S) = G$), where $S$ is regular if for every proper subgroup $H < G$, the number of terms of $S$ in $H$ is at most $|H| - 1$.

Posed in arXiv:2610.37136, Conjecture 1.1 — On additive bases of finite abelian groups

What is known

The paper completes the proof of Conjecture 1.1 for all finite abelian groups of rank at least 3, all groups of even order or with smallest prime divisor 3, and several rank-two families, explicitly noting that the only remaining unresolved case is C_p ⊕ C_pn for primes p ≥ 5.

OP-604 Nearly diagonal book Ramsey numbers equality R(B_{n-1}, B_n) = 4n - 1Not in LeanCombinatorics for TCS

For every positive integer $n \ge 1$, is the nearly diagonal book Ramsey number $R(B_{n-1}, B_n) = 4n - 1$, where $B_k = K_2 + \overline{K_k}$ denotes the book graph consisting of $k$ triangles sharing a common edge?

Posed in arXiv:2610.36522, Conjecture 1 — Constructions for Nearly Diagonal Book Ramsey Numbers

OP-606 Sivaraman's Conjecture on Cop Number of P_k-free GraphsNot in LeanCombinatorial Games

For every integer $k \ge 5$, does every finite connected $P_k$-free graph $G$ have cop number $c(G) \le k - 3$?

Posed in arXiv:2610.36290, Conjecture 1.1 — Cops and Robbers on Graphs without Long or Short Holes

What is known

The central open conjecture in Cops and Robbers on graphs with forbidden paths. Chudnovsky, Norin, Seymour, and Turcotte (2024) proved the case k = 5, but the conjecture remains wide open for all k ≥ 6.

OP-607 Linear Bound on Cop Number for Graphs Without Long or Short HolesNot in LeanCombinatorial Games

Does there exist an integer constant $N$ such that for all integers $k \ge t \ge 4$, every finite connected $(C_4, \dots, C_t, C_k, C_{k+1}, \dots)$-free graph $G$ has cop number $c(G) \le \frac{2k}{t} + N$?

Posed in arXiv:2610.36290, Conjecture 4.1 — Cops and Robbers on Graphs without Long or Short Holes

What is known

The paper shows cop number at most ceil((k-2)/floor(t/4)) + 1 for t ≥ 13. Conjecture 4.1 conjectures that the optimal coefficient of k/t is 2 for all k ≥ t ≥ 4 with an additive constant N.

OP-608 Sharp Lower Bound on Cop Number for Graphs Without C4, C5 and Long HolesNot in LeanCombinatorial Games

Does there exist an integer constant $N$ such that for every integer $k \ge 6$, there exists a finite connected $(C_4, C_5, C_k, C_{k+1}, \dots)$-free graph $G$ with cop number $c(G) \ge \frac{k}{2} - N$?

Posed in arXiv:2610.36290, Question 4.3 — Cops and Robbers on Graphs without Long or Short Holes

What is known

The paper proves an upper bound of ceil((k-2)/2) for (C_4, C_5, C_k, C_{k+1}, ...)-free graphs. Question 4.3 asks whether this bound is asymptotically tight up to an additive constant; if true, it would also provide counterexamples to Conjecture 4.1.

OP-609 Upper Bound k/2 + N on Cop Number for Graphs Without Long HolesNot in LeanCombinatorial Games

Does there exist an integer constant $N$ such that for all integers $k$, every finite connected graph $G$ with no induced cycle of length at least $k$ has cop number $c(G) \le \frac{k}{2} + N$?

Posed in arXiv:2610.36290, Conjecture 4.4 — Cops and Robbers on Graphs without Long or Short Holes

What is known

A strengthening of Sivaraman's conjecture from k - 3 to k/2 + N for graphs with no holes of length at least k. If true, this matches known constructions up to the choice of the additive constant N.

OP-612 Tight asymptotic growth rate of the excess over Harborth's bound in higher ranksNot in LeanCombinatorics for TCS

Let $n = 2m$ where $m \ge 3$ is an odd integer, and let $E(n, r) = \mathsf{s}(C_n^r) - 2^r(n-1) - 1$ be the excess of the Erdős–Ginzburg–Ziv constant of $C_n^r = (\mathbb{Z}/n\mathbb{Z})^r$ over Harborth's bound. While $E(n, r) \ge c_n r 2^r$ for some $c_n > 0$, the subgroup bound yields an upper bound of order $C^r$ with $C > 2$ (e.g. at least $2.14^r$). Does there exist a constant $C > 2$ such that $E(n, r) \ge C^r$ for all sufficiently large $r$, or does the normalized excess $E(n, r)/2^r$ grow at most polynomially in $r$?

Posed in arXiv:2610.35819, Sec. 10, remark (1) — The Erd\H{o}s--Ginzburg--Ziv constant of $C_n^r$ for even $n$: rigid sequences, products, and growth beyond Harborth's bound

OP-616 Existence of a Turing-type fixed-point combinator in the BWI fragmentNot in LeanProof Theory

In combinatory logic, consider the combinator fragment generated by $\mathbf{B}$, $\mathbf{W}$, and $\mathbf{I}$, with weak reduction rules $\mathbf{B}xyz \to_w x(yz)$, $\mathbf{W}xy \to_w xyy$, and $\mathbf{I}x \to_w x$. Although this fragment possesses the Curry-type fixed-point combinator $Y_{\mathbf{BWI}} := \mathbf{B}(\mathbf{W}\mathbf{I})(\mathbf{B}\mathbf{W}\mathbf{B})$ satisfying $Y_{\mathbf{BWI}} x =_w x(Y_{\mathbf{BWI}} x)$, this combinator only satisfies weak equivalence rather than reduction to the fixed-point form. Does there exist a closed term $\Theta$ formed from $\mathbf{B}$, $\mathbf{W}$, and $\mathbf{I}$ under binary application such that $\Theta x \to_w^* x(\Theta x)$ for a fresh variable $x$?

Posed in arXiv:2610.37108, Problem 5.2 — Finite $\mathbf{BM}$-algebras and fixed-point combinators

What is known

The BWI-fragment admits a Curry-type fixed-point combinator Y satisfying Y x =_w x (Y x), but weak equivalence is symmetric and does not imply directed reduction. Whether directed Turing-type reduction to the fixed-point unfolds in the absence of permutative combinators like S is open.

OP-617 Finite basis problem for the variety generated by finite BM-algebrasNot in LeanProof Theory

Let $\mathcal{V}$ be the variety of magmas (sets equipped with a binary operation and two constants $B, M$) generated by the class of all finite $\mathbf{BM}$-algebras, where a $\mathbf{BM}$-algebra satisfies $((Bx)y)z = x(yz)$ and $Mx = xx$. By Birkhoff's variety theorem, $\mathcal{V}$ consists of all models of the equational theory of finite $\mathbf{BM}$-algebras, which is strictly stronger than the theory of all $\mathbf{BM}$-algebras. Does the equational theory of the class of all finite $\mathbf{BM}$-algebras admit a finite equational axiomatization (i.e., is the variety finitely based)?

Proposed here, building on arXiv:2610.37108, Corollary 4.24 — Finite $\mathbf{BM}$-algebras and fixed-point combinators; the paper does not ask it

What is known

The paper proves in Corollary 4.24 that the variety of magmas generated by all finite BM-algebras is strictly smaller than the variety of all BM-algebras, because the identity Tx = x(Tx) for T = BM(B(BM)B) holds in every finite BM-algebra but fails in an infinite BMI-algebra. The paper leaves open whether this subvariety of finite BM-algebras is finitely based (axiomatizable by finitely many identities).

OP-622 Connectivity Threshold for Unilateral 2-Linkage in Digraphs of Bounded Independence NumberNot in LeanGraph Theory & Graph Algorithms

For every positive integer $\alpha$, does there exist an integer $K^u_\alpha$ such that every $K^u_\alpha$-strong digraph $D$ with independence number $\alpha(D) \le \alpha$ is unilaterally 2-linked?

Posed in arXiv:2610.36895, Conjecture 8.2 — The unilateral 2-linkage problem

OP-625 Pairwise Negative Correlation for Forests and Connected Subgraphs of Finite GraphsNot in LeanCombinatorics for TCS

Let $G = (V, E)$ be a finite simple undirected graph. Let $\mathcal{F}(G) = \{X \subseteq E : (V, X)\text{ is acyclic}\}$ be the set of spanning forests of $G$, and let $\mathcal{C}(G) = \{X \subseteq E : (V, X)\text{ is connected}\}$ be the set of connected spanning subgraphs of $G$. For $X \subseteq E$, let $i_X(G) = |\{F \in \mathcal{F}(G) : X \subseteq F\}|$ and $j_X(G) = |\{C \in \mathcal{C}(G) : X \subseteq C\}|$, abbreviated as $i(G) = i_\emptyset(G)$, $i_e(G) = i_{\{e\}}(G)$, and $i_{ef}(G) = i_{\{e,f\}}(G)$ (and similarly for $j$). Is it true that for every finite graph $G$ and every pair of distinct edges $e, f \in E$, both $i_e(G) i_f(G) - i_{ef}(G) i(G) \ge 0$ and $j_e(G) j_f(G) - j_{ef}(G) j(G) \ge 0$?

Posed in arXiv:2610.36749, Conjecture ( [ 6 ] , Conjecture 1.1) — Negative edge correlation in complete bipartite graphs

What is known

The conjecture asserts that edge indicators under both the uniform forest measure and the uniform connected-subgraph measure are pairwise negatively correlated for any finite graph. The best general upper bound known gives a factor of 2 rather than 1.

OP-629 Linear Diameter Bound for (s, c, a, k)-Graphs with c at Least aNot in LeanGraph Theory & Graph Algorithms

For every integer $s \ge 2$, does there exist a constant $C_s$ depending only on $s$ such that every connected $(s,c,a,k)$-graph $G$ with $c > 1$ and $c \ge a$ satisfies $\operatorname{diam}(G) \le C_s \frac{k}{c}$? Here an $(s,c,a,k)$-graph is a connected graph of maximum degree $k$ and girth $2s-1$ or $2s$ such that every pair of vertices at distance $s$ has exactly $c$ common neighbors at distance $s-1$ from one and distance 1 from the other, and every pair at distance $s-1$ has exactly $a$ common neighbors at distance $s-1$ from both.

Posed in arXiv:2610.36620, Conjecture 3.4 — Diameter Bounds and Finiteness of Graphs from Local Intersection Data

OP-630 Finiteness of (s, c, a, k)-Graphs for the Remaining Parameter CasesNot in LeanGraph Theory & Graph Algorithms

Let $s, c, k \ge 2$ and $a \ge 0$ be integers. Is every connected $(s, c, a, k)$-graph finite when $(s, c) = (4, 3)$ or when $c = 2$? Specifically, does every connected graph of maximum degree $k$ and girth at least $2s - 1$ such that any two vertices at distance $s$ have exactly $c$ common neighbors at distance $s-1$ and 1 respectively, and any two vertices at distance $s-1$ have exactly $a$ common neighbors at distance $s-1$ from both, have finite vertex set in these cases?

Posed in arXiv:2610.36620, Sec. 1.3, after Thm 1.10 — Diameter Bounds and Finiteness of Graphs from Local Intersection Data

OP-631 Quasi-Polynomiality of Higher Shifted Hankel Determinants of q-Metallic NumbersNot in LeanCombinatorics for TCS

Let $n \ge 1$ be an integer. Let $\Phi_n(q) \in \mathbb{Z}[[q]]$ be the $q$-metallic power series defined by the quadratic equation $q \Phi_n(q)^2 + ((1+q^n)(1-q) - q [n]_q)\Phi_n(q) = 1$ with $\Phi_n(0) = 1$, where $[n]_q = \sum_{i=0}^{n-1} q^i$. Writing $\Phi_n(q) = \sum_{i=0}^\infty f_i q^i$, define for any integer $\ell \ge 0$ the $\ell$-shifted Hankel determinants $\Delta_j^{(\ell)} = \det(f_{\ell+a+b})_{a,b=0}^{j-1}$ for $j \ge 1$, and $\Delta_0^{(\ell)} = 1$. Let $\rho_n = 2n(n+1)$ if $n$ is even, and $\rho_n = 4n(n+1)$ if $n$ is odd. Is it true that for every integer $n \ge 1$ and every shift $\ell \ge n+3$, the sequence $(\Delta_j^{(\ell)})_{j \ge 0}$ is a quasi-polynomial in $j$ of period $\rho_n$, in the sense that there exists a family of polynomials $Q_{\ell,0}, \dots, Q_{\ell,\rho_n-1} \in \mathbb{Q}[X]$, taking integer values on the non-negative integers, such that $\Delta_{r + m\rho_n}^{(\ell)} = Q_{\ell,r}(m)$ for all $0 \le r < \rho_n$ and all integers $m \ge 0$?

Posed in arXiv:2610.36132, Conjecture C — Hankel determinants for the $(n+2)$-shifted $q$-metallic numbers

OP-634 Trace-minimality of joined graphs in R_{n+k}(2n)Not in LeanGraph Theory & Graph Algorithms

For integers $n$ and $k$ such that $n \ge 3$ and $k \in \{2, \ldots, n-1\}$, let $\mathcal{R}_{n+k}(2n)$ denote the class of simple $(n+k)$-regular graphs on $2n$ vertices, and let $(a_i(G))_{i=1}^\infty$ with $a_i(G) = \operatorname{tr}(A(G)^i)$ denote the adjacency sequence of $G$. A graph $G \in \mathcal{R}_d(m)$ is trace-minimal if its adjacency sequence is lexicographically minimal among all graphs in $\mathcal{R}_d(m)$. Let $S(n+k, 2k)$ be a trace-minimal graph in $\mathcal{R}_{2k}(n+k)$, and let $E_{n-k}$ be the edgeless graph on $n-k$ vertices. In each nonempty class $\mathcal{R}_{n+k}(2n)$, is the graph join $E_{n-k} \wedge S(n+k, 2k)$ always trace-minimal?

Posed in arXiv:2610.36127, Conjecture 23 — Trace-minimal graphs maximizing the number of spanning trees

What is known

Saegusa conjectured that in each nonempty set of regular graphs $\mathcal{R}_{n+k}(2n)$ for $k \in \{2, \ldots, n-1\}$, joining an empty graph on $n-k$ vertices with a trace-minimal graph $S(n+k, 2k)$ produces a trace-minimal graph. This conjecture is used in the paper to determine trace-minimal graphs whose complements are 7-regular.

OP-635 NP-completeness of H-coloring for every fixed connected cubic graphNot in LeanNP-Completeness & Reductions

Let $H$ be an arbitrary fixed connected cubic graph (finite, undirected, possibly with parallel edges, without loops). Consider the decision problem $H$-coloring: given an input connected cubic graph $G$, decide whether $G$ admits an $H$-coloring, that is, a mapping $f: E(G) \to E(H)$ such that for every vertex $v \in V(G)$, there exists a vertex $x \in V(H)$ with $f(\partial_G(v)) = \partial_H(x)$. Is $H$-coloring NP-complete for every fixed connected cubic graph $H$?

Posed in arXiv:2610.35794, Conjecture 4 — Computational complexity of the $H$-coloring problem in cubic graphs

OP-638 Logarithmic Factor in the Exponent of Maximum Intersecting Hypergraph SizeNot in LeanCombinatorics for TCS

Let $m(k)$ denote the maximum number of edges in an intersecting $k$-uniform hypergraph with covering number $k$. For all sufficiently large $k$, $k^k \exp(-10\sqrt{k\log k}) \le m(k) \le k^k \exp(-\sqrt{k}/5)$. Does there exist an absolute constant $C > 0$ such that $m(k) \ge k^k \exp(-C \sqrt{k})$ for all sufficiently large $k$, eliminating the $\sqrt{\log k}$ factor between the exponents?

Posed in arXiv:2610.37315, Sec. 3 — The maximum size of intersecting $k$-graphs with covering number $k$

OP-642 Exact Weight Spectrum of Reed-Muller Codes of Codimension 8Not in LeanInformation Theory & Coding

Let $n \ge 16$ be an integer, and let $\mathrm{RM}(n-8, n)$ denote the binary Reed-Muller code of order $n-8$ and length $2^n$ (consisting of truth tables of Boolean functions on $n$ variables of algebraic degree at most $n-8$). Does the weight spectrum of $\mathrm{RM}(n-8, n)$ contain all consecutive even integers in the interval $[2^9 + 2^7, 2^n - 2^9 - 2^7] = [640, 2^n - 640]$, or does the continuous weight spectrum threshold fail to begin at $2^{c+1} + 2^{c-1}$ for codimension $c = 8$ as it does for $c = 7$?

Posed in arXiv:2610.36687, Sec. 6, after Corollary 1 — The Exact Weight Spectrum of $\RM(m-7,m$): A Counterexample to the Carlet-Sol\'{e} Conjecture

OP-643 Continuous Weight Spectrum Interval for Reed-Muller Codes of General CodimensionNot in LeanInformation Theory & Coding

Let $c$ be a positive integer, and let $n \ge 2c$. Let $\mathrm{RM}(n-c, n)$ denote the binary Reed-Muller code of order $n-c$ in $n$ variables, and let $\mathcal{W}$ be its weight spectrum (the set of Hamming weights of its codewords). Is it true that every even integer $w$ in the interval $[3 \cdot 2^c, 2^n - 3 \cdot 2^c]$ belongs to $\mathcal{W}$?

Posed in arXiv:2610.36687, Sec. 6, Conjecture 2 — The Exact Weight Spectrum of $\RM(m-7,m$): A Counterexample to the Carlet-Sol\'{e} Conjecture

OP-644 Realizability of Optimal Solutions to the Integer Coil Linear ProgramNot in LeanCombinatorics for TCS

For an integer $n \ge 13$ and parameter $a \in \mathcal{A}_n = \{a > 8 : 3a^2 n \ge n^2 - 14n + 32\}$, let $(\mathrm{P}_n^{\mathrm{int}}(a))$ denote the integer program maximizing $z$ subject to $y_0, \ldots, y_{n-1} \in \mathbb{Z}_{\ge 0}$, $z \in 2\mathbb{Z}_{\ge 0}$, and the linear constraints: $\sum_{m=0}^{n-1} y_m = 2^n - z$, $\sum_{m=0}^{n-1} m y_m = (n-2)z$, $(n-1)y_{n-1} + 4y_{n-2} - y_{n-3} \le 2z$, $(n^2-3n+3)z - \sum_{m=0}^{n-1} \binom{m}{2} y_m \le \binom{n}{2} 2^{n-1}$, $\sum_{m=0}^{\lfloor 3n/4 \rfloor} m y_m \ge z/8$, and $\sum_{m=0}^{n-1} p_m y_m + 3a^2 \sum_{m=0}^{\lfloor 3n/4 \rfloor} y_m \ge \frac{a-8}{3}(z-10)$, where $p_m = m[4(n-m)/n + (4(n-m)/n - 1)_+]$. Does there exist any $n \ge 13$ and $a \in \mathcal{A}_n$ such that an optimal solution $(z^*, y_0^*, \ldots, y_{n-1}^*)$ of $(\mathrm{P}_n^{\mathrm{int}}(a))$ is realizable as the length and degree counts of a maximum-length coil in the hypercube $Q_n$?

Posed in arXiv:2610.36461, Sec. 5, par. 4 — Linear Programming Upper Bounds for the Coil-in-the-Box Problem

What is known

The paper establishes that the continuous LP optimum satisfies (C4) with equality and has $y_0 > 0$, hence is combinatorially unrealizable. It leaves open whether the optimum under integer restrictions $y_m \in \mathbb{Z}_{\ge 0}$ and $z \in 2\mathbb{Z}_{\ge 0}$ can be realized by actual coils.

OP-647 complete bipartite forest correlation coefficientwiseNot in LeanCombinatorics for TCS

For all integers m,n >= 2 and distinct edges e,f of K_{m,n}, define I_S(t) = sum_{F acyclic spanning subgraph of K_{m,n}, S subset E(F)} t^{|E(F)|}, including isolated vertices and the empty forest. Does every coefficient of I_{ {e} }(t) I_{ {f} }(t) - I_empty(t) I_{ {e,f} }(t) lie in the nonnegative integers? This is a coefficientwise statement in one variable t, not a claim about arbitrary independent edge weights.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers in negative dependence and the arboreal gas would obtain an entire activity family from a new uniform-measure theorem, together with a combinatorial coefficient inequality stronger than positivity on the positive real axis. The result would imply pairwise negative correlation for probabilities proportional to t^{|E(F)|} for every t>0, across complete bipartite graphs of arbitrary and unequal part sizes. The paper's proof of Theorem 1.1 uses the numerical restricted-forest bounds (3.4), (3.7), and (3.8) after evaluating at t=1, including deletion of paths of varying lengths; it supplies no coefficientwise comparison for those cancellations. Weighted results for K_{2,n}, and the reported finite verification for K_{3,4}, do not cover this family. The proposal is distinct from the previously dropped full-negative-association question OP-627: it only concerns two edge indicators, and has exact computations rather than a speculative upgrade to arbitrary increasing events. Evidence: Exact integer component-enumeration recurrences checked every 2<=m<=n<=12 (66 part-size pairs), for edge pairs sharing a left endpoint, sharing a right endpoint, or disjoint. All 198 correlation polynomials had nonnegative coefficients and positive support from degree 4 to degree 2(m+n-1). Independently enumerated all edge subsets of K22, K23, K33 and K34 and matched all forest, one-edge and two-edge polynomial coefficients. The recurrence also satisfies mn*I_e(1)=I_empty'(1).

OP-649 pmms matroid exact rank sensitive mms envelopeNot in LeanFair Division

For integers n>=2 and r>=1, define F(n,r) as n*(r+1)/2-1 when r is odd, and n*r/2+min(r/2,floor((n-1)/2)) when r is even. Is F(n,r) the exact maximum possible n-agent maximin share of an agent whose allocated bundle has value r, over every finite profile of matroid-rank valuations and every complete pairwise-maximin-share-fair allocation? Equivalently, must MMS_i(n,M)<=F(n,v_i(A_i)) hold for each agent in every such allocation, with equality achievable for every n,r? PMMS means v_i(A_i)>=max_{B disjoint union C=A_i union A_j} min(v_i(B),v_i(C)) for all i!=j; MMS_i(n,M) maximizes the minimum value over all n-partitions of all goods.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The coarse sharp approximation ratio conceals how much of the PMMS-to-MMS loss is an integrality effect confined to agents receiving value one. An exact two-parameter envelope would quantify the entire implication between two central fairness notions and asymptotically replace the coefficient n-1 by n/2 when own value grows, with parity and small-rank effects determined exactly. This is a family of exact extremal values, not a finite-instance improvement. The existing KB proof selects an unmarked part of an MMS partition after assigning at most one bad part to each other bundle, and bounds that one part by (n-1)r; it does not control the n-fold matroid-union rank needed for the new envelope. Computing changed the proposal twice: experiment 8110 refuted a simple floor formula, and 8113 showed that private categories already violate its attempted parity repair. The final piecewise expression matches the optimized category instances and a uniform full-profile equality family. Searches of memory, previous questions and the primary literature found no rank-sensitive envelope of this form. Evidence: Experiment 8118 checks 56 representable rank functions, exhaustively enumerating 405948 allocations on 8/9 goods and sampling 480000 allocations on 14/16/18 goods for n=3..6, with no violation of the final piecewise bound. It independently validates the matroid-union MMS formula by direct partition enumeration on seven goods. Experiment 8117 gives exact integer-program optima for 138 rank-one-category models at n=2..8,r=1..20 and 16 capacity-through-three models at n=3,4,r=1..8; its two missing n=8 rows were solver timeouts, and the unrefined single-floor candidate is too high in some even-rank cases. Experiment 8119 independently validates the final equality construction for every n=2..50,r=1..100, including all pairwise MMS values, explicit balanced MMS partitions, and PMMS of the other agents using free-matroid valuations and focal-loop padding.

OP-654 regular digraph fractional majority log free sqrt rateNot in LeanGraph Theory & Graph Algorithms

Does there exist an absolute constant C>0 such that, for every integer r>=1 and every nonempty finite loopless digraph D with no parallel arcs and with indegree(v)=outdegree(v)=r for every vertex v, the fractional majority coloring number is at most 2+C/sqrt(r)? Here opposite arcs are allowed; a set S is majority-stable when |N^+(v) intersect S|<=floor(r/2) for every v in S, and the fractional majority coloring number is the minimum sum of nonnegative weights on majority-stable sets that cover every vertex to total weight at least one. The order |V(D)| is unrestricted relative to r.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Removing the logarithm on the balanced regular class would be a new quantitative theorem about the asymptotic cost of directed majority constraints, rather than another numerical improvement to a universal constant. The known independent-sampling-and-deletion proof requires the bad-vertex probability to be as small as the sampling deficit, producing the logarithm even after indegree regularity is imposed. The cycle-factor result supplies only a fixed constant. A discrepancy argument depending on sqrt(|V|) would also not answer this question, since |V|/r is unrestricted. Computations changed the scope: simple uniform upper guesses inferred from small regular tournaments fail at order eleven, and weighted LP obstructions matter. This rate question is distinct from the existing OP-106/108 questions asking for a universal constant three. Evidence: The covering LP was solved for every regular tournament through order eleven (1,243 isomorphism classes in total), exposing an exceptional order-eleven value 5/2 despite a largest stable set of size five. Exact matching rational primal/dual certificates were additionally checked on 69 balanced regular digraphs of degrees 1..8 and orders through 18. These are finite compatibility checks, not evidence establishing the asymptotic rate; they rule out a naive cardinality-only or uniform-marginal shortcut. Recursive cyclic-tournament calculations through order 2,187 provide an additional structured benchmark.

OP-655 bridge lly scale three equality iff regular conesNot in LeanGraph Theory & Graph Algorithms

Let G be any finite connected simple graph with minimum degree delta>=2 and at least one bridge, and put kappa_3(G)=min{kappa_LLY(x,y):dist(x,y)=3}. Is kappa_3(G)=2/(3*delta) if and only if G is isomorphic to the following graph: choose two nonempty finite simple d-regular graphs H_1,H_2 with the same integer degree d>=1 (their orders may differ and they need not be connected), add a new vertex a_i adjacent to every vertex of H_i for i=1,2, and add the single edge a_1 a_2 between the two resulting cones? In this representation d=delta-1.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for a complete structural characterization of extremal curvature at the sparsest possible nontrivial edge cut. It predicts that the extremizers are much broader than two cliques, yet globally rigid: there is exactly one bridge, each of its endpoints dominates its own side, and the two interiors are regular of one common degree. The published inequality and its selected sharpness examples do not give this iff; the difficult direction must rule out vertices farther from the bridge and unequal interior degrees using the curvature of every distance-three pair. It would connect optimal-transport equality with a concrete graph decomposition valid at every order. The OP list, memory, Mathlib and literature searches found no such characterization. Evidence: Exhaustive generation of every connected graph through order nine found four bridge equality graphs, all of the predicted cone form (and three additional matching-cut equality examples with edge-connectivity two). A stress test of 1,000 random bridged pairs found 17 equality instances, all cones, and 24 larger regular-cone pairs all attained equality. An independent audit checked exact integer primal and dual LP certificates on all 1,723 distance-three pairs in the seven small equality graphs and 30 further cone pairs.

OP-659 toroidal grid edge geodesic transversal exact parity formulaNot in LeanGraph Theory & Graph Algorithms

For all integers m,n>=3, is the edge geodesic transversal number of the Cartesian product C_m square C_n equal to min(m*c(n), n*c(m)), where c(t)=2 for even t and c(t)=3 for odd t? Here an edge geodesic transversal is a subset of the edges meeting every shortest path that cannot be extended at either endpoint to a longer shortest path. In particular, the conjecture predicts gt_e(C_(2a+1) square C_(2b+1))=3*min(2a+1,2b+1) for all a,b>=1.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This gives an exact two-parameter formula for a fundamental graph product and identifies the full parity/aspect-ratio transition for the newly introduced edge transversal invariant. Lifting cyclic hitting sets gives the candidate upper bound, but the published edge-cut/packing proof does not give the lower bound. For example on the odd square C_q square C_q, an edge-disjoint packing has at most floor(2q^2/(q-1)) members, strictly fewer than the proposed 3q for q>=5; and three cyclic slices are not a single edge cut. Thus odd tori require a global obstruction beyond the paper's min-max mechanism. The source paper discusses lexicographic/corona products and does not pose this torus formula; OP-640 is about path grids, and OP-641 about coronas. Memory, all prior pitches and Mathlib were checked, with no duplicate found. Evidence: Experiment 8700 certifies the formula for all 28 pairs 3<=m<=n<=9, and for (m,11) with m in {3,4,5,6,7,9}; (11,11) has a size-33 witness but only a lower bound of 30 within the time limit. Experiment 8703 independently enumerates all maximal geodesics directly from graph distances for all 15 pairs 3<=m<=n<=7, confirming the path families and feasible values. Experiment 8699 had an invalid edge-orbit symmetry constraint and is explicitly superseded, not used as evidence.

OP-660 equitable four transversals of three uniform three regularNot in LeanCombinatorics for TCS

For every finite simple 3-uniform 3-regular hypergraph H=(V,E) with N=|V|>=4, do there exist four transversals T_1,T_2,T_3,T_4 (not required to be distinct) such that every vertex belongs to exactly two of them and each |T_i| lies in {floor(N/2),ceil(N/2)}? A transversal meets every hyperedge. For even N this requires all four sizes to equal N/2. Equivalently, can the new four-transversal twofold-cover theorem always be made equitable?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The recent theorem settles a long-standing fractional-domatic support problem by giving support four. The proposed strengthening asks whether the same optimal-size support can simultaneously have perfectly balanced service loads, including the non-2-colorable Fano obstructions. Double counting fixes only the average size N/2 and does not bound each individual set. Averaging over permutations of the four labels creates a larger support and does not produce four balanced transversals. The paper's Heawood-block induction fixes boundary labels but does not control global label frequencies, so its patching argument does not directly imply equitability. An affirmative result would also give every even-order cubic graph four total dominating sets all of size exactly half the order, with each vertex in two. This is a full-family refinement, not a finite-case exercise; the paper's own question and OP-293 concern other statements. Searches of memory, candidates, the KB, Mathlib and the literature found no duplicate. Evidence: Experiment 8708 exhausts all connected simple 3-uniform 3-regular hypergraphs through N=11 (counts 1,1,4,10,32,147,822,5551 for N=4..11), with no counterexample, using colored cubic bipartite incidence graphs and excluding repeated hyperedges. It also finds equitable covers for 13 successive Fano-plane vertex-sum constructions through N=79. Experiment 8702 succeeds on every connected cubic graph through order 16 (4681 graphs total) and on 70 random simple regular uniform hypergraphs at each N=4..35.

OP-662 four positive utility levels efx pareto existenceNot in LeanFair Division

Does every finite instance of indivisible goods with n>=2 agents and positive additive utilities taking values in one common set {a,b,c,d}, where 0<a<b<c<d are arbitrary real numbers, admit a complete allocation that is both EFX and integrally Pareto optimal? Precisely, v_i(A_i)>=v_i(A_j\{g}) for every i,j and g in A_j, and no other complete allocation weakly increases every agent's utility and strictly increases at least one. Agents may use any subset of the four values. Equivalently, is five the minimum possible number of distinct positive per-item utility values in an EFX/Pareto incompatibility instance?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for a sharp structural boundary in a central fairness/efficiency problem immediately after the general positive-valuation existence claim was refuted. An affirmative answer characterizes the smallest numerical complexity necessary for the new obstruction, while a counterexample lowers that threshold to three or four. The two-level Nash-welfare proof does not extend: tri-valued instances already destroy its EFX guarantee (Lin-Wu-Zhou, arXiv:2610.00122, Section 5), so a different Pareto point must be selected. Conversely, both published positive obstructions use separate low, small-bonus, medium, and two large levels. Our computations show that simply identifying any two levels repairs the nine-item family. This is a full class of arbitrary agent/item counts and arbitrary positive real palettes, not a search for one smaller instance. The question distinguishes numerical levels from the different restriction of three types of valuation functions. Existing questions, memory, Mathlib and live primary-literature searches found no positive three- or four-value incompatibility theorem. Evidence: Exact enumeration of all 4^8 allocations per profile found EFX+PO for all 6,612 four-valued square-incidence templates in experiment 8713. Experiment 8714 reproduces the published nine-good five-value obstruction and finds EFX+PO after all 20 directed merges of two levels for every K=3..18 (320 profiles, all 4^9 allocations each). Experiment 8725 adversarially evaluates 6,312 four-valued mutated profiles with no incompatibility, driving the surviving EFX+PO count as low as one. Experiment 8707 similarly covers 1,584 three-valued templates and 600 random profiles. Experiment 8719 independently verifies 60 EFX+PO witnesses with direct inequalities and CP-SAT infeasibility of any integral Pareto improvement.

OP-663 rank one exponential mst incident edges negative correlationNot in LeanCombinatorics for TCS

For every n>=3 and positive real vertex masses a_1,...,a_n, give each edge {u,v} of K_n an independent exponential cost of rate a_u*a_v, and let T be the almost surely unique minimum spanning tree. For every three distinct vertices i,j,k, is P({i,j} in T and {i,k} in T)<=P({i,j} in T)*P({i,k} in T)? Equivalently, ask the same inequality for the finite weighted Kruskal process: repeatedly choose an edge joining two distinct current components with probability proportional to a_u*a_v and merge them, until a spanning tree is obtained.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This connects a new finite negative-dependence theorem to an established inhomogeneous random-tree model and asks whether local competition survives arbitrary vertex heterogeneity. A positive answer gives uniform second-moment bounds for each vertex degree without moment or asymptotic assumptions. The restriction to incident pairs is essential: exact computations already refute the analogous disjoint-edge extension at n=4. Gupta's proof relies on exchangeability and on uniformly chosen merger endpoints; rank-one rates replace this by mass-biased endpoint sampling, so unweighted component degree sums no longer give his degree-functional identity. Safsafi's geometric limit theory does not imply this finite local dependence inequality. Gupta's explicit open Problem 7.4 concerns other host families such as K_(n,n) under identical edge laws; this proposal keeps a complete host, changes the edge laws in a structured way, and asks only the incident property. Memory, the question list, Mathlib and primary-literature searches found no duplicate. Evidence: Experiment 8742 checks all 5,640 incident-edge pairs with exact rational merger recurrences for all 330 sorted K4 mass vectors in {1,...,8} and all 56 K5 mass vectors in {1,2,4,8}; every difference is strictly negative. Experiment 8740 tests 293 profiles through n=8, including six orders of mass heterogeneity, with no positive incident covariance (the nearly zero cases are only numerical evidence). Experiments 8739/8742 identify disjoint positive correlation at masses (1,1,4,8), ratio 3415827054339/3409741725955>1; 8742 independently reproduces it by summing all 6! exponential edge orders and also verifies an incident-edge instance. The positive five-vertex control of Gupta's Proposition 4.3 and the uniform K4 ratio 44/45 were both reproduced.

OP-664 spider third t chromatic specialization injectiveNot in LeanGraph Theory & Graph Algorithms

For every pair of finite simple trees S and T each having exactly one vertex of degree at least three, does equality P_3(S;q,t)=P_3(T;q,t) imply S is isomorphic to T? Here P_3(G;q,t) is the sum, over all proper maps c:V(G)->{0,1,2}, of q^(sum_v c(v)) t^(|c(V(G))|). Equivalently, among spiders with arbitrarily many legs and arbitrary positive integral leg lengths, does this single bivariate polynomial recover the multiset of leg lengths? Both input trees are assumed to be spiders; recognition among all trees is not asserted.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks whether a fixed three-color compression suffices for an unbounded-degree, unbounded-order family in Stanley's tree-distinguishing program. Martin-Morin-Wagner reconstruct spiders from the full chromatic symmetric function (indeed its two-part power-sum coefficients), whereas Bingham et al. introduce the t-refined specialization and reconstruct elongated bistars and three-spine caterpillars. Neither result recovers the needed power-sum coefficients from P_3: principal specialization mixes partition types and deletes all proper colorings using four or more colors, so applying the classical spider reconstruction theorem is not justified. Arbitrary spiders with long legs are outside the new paper's reconstruction families, and this spider statement is not one of its own open problems. Exhaustive separation over more than four million spiders supports it. The restriction that both inputs are spiders is substantive: a separate exact computation found three nonisomorphic nine-vertex trees with at most two branch vertices sharing P_3, only one of them a spider. Evidence: Experiment 9035 exhaustively enumerated all 4,124,972 spiders of orders 4 through 58, without any bound on the number of legs. For each fixed order, the pair (unordered bipartition sizes, P_3(2,1) mod (2^127-1)) was distinct for every arm-length multiset, which certifies separation of the full polynomials on this range. Experiment 9039 independently enumerated all 168,120 proper three-colorings of the 103 spiders through order 11 and checked the literal bivariate definition against the transfer recurrence and bipartition coefficient. These are finite evidence, not a proof of the all-order claim. Experiments 9036-9037 ruled out the broader at-most-two-branch family with an exact order-nine collision.

OP-667 subcubic uniform matching nucleon polynomial coordinate denominatorsNot in LeanGeneral Equilibrium & Cooperative Games

Does there exist an absolute integer C>=1 such that every finite simple tree T on n>=3 vertices, with maximum degree at most three and every edge of weight one, has a rational nucleon allocation x for which the reduced denominator of every individual payoff x_v is at most n^C? Here a coalition S has value nu(T[S]), the maximum matching cardinality of its induced forest; x_v>=0 and sum_v x_v=nu(T); and the nucleon lexicographically maximizes the nondecreasing list x(S)/nu(T[S]) over all nonempty proper coalitions with positive value. The bound concerns each coordinate's reduced denominator, not the least common denominator of all coordinates.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The recent combinatorial nucleon algorithm establishes polynomial bit complexity using the determinant bound Delta=(n+Omega)^(2n), even when all weights are one. For unweighted subcubic trees this leaves an arithmetic gap between O(n log n) bits per payoff and O(log n) bits if the proposed polynomial denominator bound holds. Resolving it would expose whether successive fairness refinements create large intrinsic fractions even in the simplest acyclic partnership markets, rather than fractions inherited from input weights. A proof needs a structural constraint on how rational levels propagate through the compact pair/singleton stages; the published Cramer-Hadamard argument does not supply it. A negative answer would require a family of trees with superpolynomial denominators in a single payoff. Merely taking lcms of small denominators in different components is irrelevant. The data rule out the tempting denominator-at-most-n bound (an exactly certified 24-vertex tree has payoff 41/56), while repeated simple forks and periodic combs do not show exponential amplification. This arithmetic question is not among the paper's own open problems concerning capacity-two computation. Evidence: Experiment 9054 performed full proper-coalition sequential optimization on all unlabelled trees through order 12 and exploratory connected graphs, reconstructing rational candidates. Experiment 9058 independently implemented the paper's compact stages via forest matching DP and matched the full-coalition output on all 93 trees of orders 3..9. Experiments 9062 and 9067 inspected 171 matching-comb instances through 32 vertices and nested even-fork families through 44 vertices, explicitly distinguishing individual denominators from common lcms; no superpolynomial family emerged. Crucially, experiment 9065 replaced numerical inference by exact Fraction arithmetic for representative trees: it checked 41 rational LP primal/dual certificates, stationarity, feasibility and strong duality, exact forest matching costs, and stage-face equalities. The 24-vertex subcubic witness has a unique computed allocation including 41/56 and 15/56, with five fairness levels 1,78/77,313/308,157/154,631/616; 21 exact LP certificates verified that witness. These finite computations do not resolve the polynomial-bound question.

OP-671 uniform cycle clique blowup exact mixing thresholdNot in LeanGraph Theory & Graph Algorithms

For all integers n>=4 and t>=2, let G=C_n[K_t] be the graph on Z/nZ times {1,...,t}, where two distinct vertices are adjacent when their first coordinates are equal or adjacent on C_n. Put c=ceil(nt/floor(n/2)) and b=floor(nt/ceil(n/3)). For every integer k>=c+1, is the graph R_k(G) of all proper labelled k-colorings, joined when they differ at exactly one vertex, connected if and only if k>b? Thus the proposed exact mixing threshold above the chromatic number is max(c,b)+1.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for a two-parameter exact recoloring threshold on an infinite family, connecting reconfiguration to the independent domination number ceil(n/3) of a cycle. It would explain quantitatively how much palette slack is needed in the first blowup families beyond the positive C7 theorem. Frozen color classes are maximal independent supports, so the candidate b has a structural origin, but this only controls isolated colorings. Global disconnected components require a separate argument: computations found multiple nonfrozen components at C8[K2], k=5, and C8 itself has a disconnected 3-recoloring graph with no frozen coloring. The t>=2 hypothesis and the restriction above chi are therefore substantive. The C7 proof exploits independent triples special to C7 and does not extend to general n. The proposal differs from OP-450, which characterizes base graphs for which every blowup is recolorable, rather than giving an exact uniform-blowup threshold. Primary literature, memory and Mathlib searches found no such formula. Evidence: Experiment 9361 exactly solved all 1,544 frozen-support feasibility instances for 4<=n<=18, 2<=t<=15, c<k<=3t: a frozen coloring existed exactly for k<=b, with no unknown outcomes. Experiments 9367 and 9376 independently counted color-support orbits by Burnside and traversed every orbit, using transporters and stabilizers to check full labelled connectivity. They found connectedness at the proposed thresholds C10[K3],k=8 (310,194 orbits), C8[K4],k=11 (168,706), and C8[K5],k=14 (4,417,587), all below the general 3t+1 degree bound. Experiment 9369 independently enumerated every labelled coloring and move on six smaller instances, reproducing the lifted component counts and the nonfrozen-disconnection controls. Larger orbit spaces explicitly skipped in 9376 are not claimed checked. These are computational observations, not an all-parameter proof.

OP-672 self conjugate wide double dilation symmetric latinNot in LeanCombinatorics for TCS

For every nonempty self-conjugate wide partition lambda=(lambda_1,...,lambda_l), define its two-dimensional dilation lambda[2]=(2lambda_1,2lambda_1,2lambda_2,2lambda_2,...,2lambda_l,2lambda_l). Must lambda[2] admit a symmetric Latin tableau? Precisely, is there a filling T of its cells such that row i contains each integer 1,...,lambda[2]_i exactly once, no column repeats an integer, and T(i,j)=T(j,i) for every cell (i,j)? Here wide means that every partition obtained by deleting rows dominates its conjugate.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks whether the obstruction to symmetric Latin fillings has a universal bounded repair: replacing each cell by a 2x2 block. It would identify an infinite structural family of symmetric Latin tableaux, rather than another individually fillable shape, and provide a symmetry-sensitive counterpart to the wide partition conjecture. Dilation one already fails in the source paper. Ordinary Latin constructions do not enforce the equality coupling between transposed cells; furthermore, when both row lengths and their multiplicities are doubled, the paper's sufficient size-versus-multiplicity condition need not become true. The paper's diagonal parity test is explicitly insufficient, so merely removing odd multiplicities cannot justify the proposed conclusion. Its Section 6 questions concern monotone counts and staircase-tail enumeration, not this dilation principle. The earlier Lesage--Demoen report CW667 likewise records nonsymmetric-fillable shapes; no universal dilation answer was found in primary-literature, KB, memory or Mathlib searches. Evidence: Experiment 9384 exhaustively enumerates all 1,640 self-conjugate wide partitions of width at most 12, using Frobenius-arm subsets and the lower-subpartition dominance criterion. It constructs and literally checks symmetric Latin witnesses for 1,636 dilated shapes, with four initial solver timeouts and no infeasible dilation. Experiment 9388 resolves all four timeouts with checked witnesses, so all 1,640 dilations are verified. It also independently models the problem as Boolean exact-cover SAT and cross-checks all 72 wide self-conjugate shapes through width seven: seven original shapes are infeasible for symmetric filling, while every double dilation has a checked witness. The source's (7,7,5,5,4,2,2) obstruction is independently reproduced and repaired. These are finite observations, not a proof of the universal assertion.

OP-674 subcubic residual matching linear component barriersNot in LeanApproximation & Inapproximability

For every integer k>=1, does there exist a finite simple tree T of maximum degree at most three, on exactly 36k+1 vertices, with a maximum matching M of size 16k, such that nu(T-M)=12k, L(T)=12k+1, and every maximum matching M' of T with nu(T-M')>12k has at least 2k+2 connected components containing an edge in the graph with edge set M symmetric-difference M'? Here nu is matching number, T-M deletes only matching edges and retains all vertices, and L(T)=max{nu(T-N): N is a maximum matching of T}. Thus the question asks for a linear-size infinite family in which obtaining even the single remaining unit of residual improvement requires simultaneously changing linearly many vertex-disjoint alternating paths, with no bound on the lengths of those paths.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers extending residual-matching local search need to distinguish long alternating paths from coordination among many disjoint paths. A positive answer would rule out every fixed bound on the number of alternating components as an exact optimality certificate, even on subcubic trees where the optimization problem itself is polynomial and even when the residual objective is just one below optimum. This is a structural obstruction theorem across an infinite family, not a request for one more finite counterexample or for a complexity separation. The source paper's critical-edge argument only treats one two-edge path and its deficit charging does not compose into a bound on coordinated components. Exact tree decomposition algorithms do not supply a local improvement from an arbitrary prescribed matching. This is distinct from OP-438 and the paper's own broad better-than-2/3 approximation question: the proposed family has ratio 12k/(12k+1), and concerns exact local optimality. Computations changed the direction repeatedly: all connected graphs through nine vertices supported a one-component criterion; a ten-vertex tree refuted it, exhaustive trees then produced a nineteen-vertex three-component barrier, and grafting plus nonmatching-edge rewiring produced larger barriers. Searches of memory, existing pitches/problems, the KB, Mathlib matching files, and primary literature found no statement of a linear component barrier on trees. The finer 18k+1 parameterization was not supported at several tested indices; the proposed 36k+1 family uses the observed consecutive parameter values instead. Evidence: Independent literal enumeration audits the ten- and nineteen-vertex barriers (minimum improving component counts two and three). Exact CP-SAT and a separate two-matching tree DP agree on the initial examples at orders 19,37,73; first matching sizes 8,16,32; starting residuals 6,12,24; global residual optima 7,13,25; and minimum improving component counts 3,4,6. Each improving CP witness was also checked by constructing its actual symmetric-difference graph and counting nonempty components. The earlier exhaustive tree search checked every nonisomorphic tree of orders 13 through 18 before finding the nineteen-vertex obstruction. These are computational observations, not formal proofs or an all-k construction. Experiment 9439 additionally found a 109-vertex tree with first matching size 48, residual 36, exact DP optimum 37 and minimum improving component count eight, giving the first three consecutive values of the proposed 36k+1 family. Its CP-SAT optimization did not finish within fifteen seconds; this is not counted as independent exclusion evidence. Experiment 9444 independently reimplemented component counting as vertices minus edges of the symmetric-difference forest and matched the entire residual-by-component spectrum at orders 19,37,73,109, including the eight-component lower barrier. Additional bounded graft/rewire searches 9440 and 9443 did not find the requested barriers at orders 55,91,145; these failures are search limits, not counterexamples or exclusions.

OP-677 Nonexistence of full-dimensional line-all-even sets in dimension 3Not in LeanCombinatorics for TCS

Let $S \subset \mathbb{R}^3$ be a finite point set that affinely spans $\mathbb{R}^3$. For each direction $\ell \in \mathbb{P}(\mathbb{R}^3)$, let $n_S(\ell)$ denote the number of affine lines parallel to $\ell$ that intersect $S$. Does there always exist a direction $\ell \in \mathbb{P}(\mathbb{R}^3)$ such that $n_S(\ell)$ is odd?

Posed in arXiv:2610.38864, Conjecture 2.1 — All-even sets in $\mathbb{R}^2$ and $\mathbb{R}^3$

What is known

Origin is stated; this is the strong conjecture formulated in Section 2, equivalent to height-rigidity of all planar all-even sets, and implies the weak conjecture answering the question in dimension 3.

OP-678 Monotonically contagious triangles in planar all-even setsNot in LeanCombinatorics for TCS

A finite point set $A \subset \mathbb{R}^2$ is called all-even if for every direction $\ell \in \mathbb{P}(\mathbb{R}^2)$, the number of affine lines parallel to $\ell$ that meet $A$ is even. A non-collinear triangle $T = \{a_1, a_2, a_3\} \subseteq A$ is called monotonically contagious if the remaining points of $A$ can be enumerated as $a_4, \dots, a_n$ such that for each $r \in \{4, \dots, n\}$, there exist indices $i, j, k \in \{1, \dots, r-1\}$ with $i \neq j$ such that $a_r - a_k$ is parallel to $a_j - a_i$. Does every planar all-even set $A$ possess a monotonically contagious triangle?

Posed in arXiv:2610.38864, Conjecture 9.1 — All-even sets in $\mathbb{R}^2$ and $\mathbb{R}^3$

What is known

Origin is stated; this is the strongest conjecture in the paper's hierarchy of rigidity certificates, which would provide an algorithmic certificate of height-rigidity for all planar all-even sets.

OP-680 Exact Minimum Number of Nonempty Subset Sums for Zero-Sum-Free SetsNot in LeanCombinatorics for TCS

Let $G$ be a finite abelian group, written additively. A subset $S \subseteq G$ is zero-sum-free if for every nonempty subset $T \subseteq S$, $\sum_{x \in T} x \neq 0$. For a zero-sum-free subset $S$, let $\mathsf{N}(S) = |\{ \sum_{x \in T} x : \emptyset \neq T \subseteq S \}|$ be the number of distinct nonzero subset sums of $S$. For every positive integer $k$, define $f(k)$ as the minimum of $\mathsf{N}(S)$ over all finite abelian groups $G$ and all zero-sum-free subsets $S \subseteq G$ of size $k$. Is it true that for every integer $k \ge 8$, $$f(k) = \left\lfloor \frac{k^2}{2} \right\rfloor + 1?$$

Posed in arXiv:2610.38373, Conjecture 7.1 — A logarithmic error term for subset sums of zero-sum-free sets

OP-681 Linear Error Term for Minimum Number of Subset Sums of Zero-Sum-Free SetsNot in LeanCombinatorics for TCS

Let $G$ be a finite abelian group, written additively. A subset $S \subseteq G$ is zero-sum-free if for every nonempty subset $T \subseteq S$, $\sum_{x \in T} x \neq 0$. Let $\mathsf{N}(S) = |\{ \sum_{x \in T} x : \emptyset \neq T \subseteq S \}|$ be the number of distinct nonzero subset sums of $S$. For every positive integer $k$, let $f(k)$ be the minimum of $\mathsf{N}(S)$ over all finite abelian groups $G$ and all zero-sum-free subsets $S \subseteq G$ of size $k$. Does there exist an absolute real constant $C > 0$ such that for all integers $k \ge 1$, $$f(k) \ge \frac{k^2}{2} - C k?$$

Proposed here, building on arXiv:2610.38373, Sec. 7, after Conjecture 7.1 — A logarithmic error term for subset sums of zero-sum-free sets; the paper does not ask it

What is known

The paper proves that $f(k) \ge k^2/2 - 13k \log(k+1) - 116k$, closing the leading-term gap to $k^2/2 + O(k \log k)$ while the classical upper bound is $k^2/2 + O(1)$. The paper observes that its greedy prefix argument loses a logarithmic number of initial steps and incurs a harmonic error from reciprocal prefix sizes, leaving open whether the error term can be reduced from $O(k \log k)$ to $O(k)$. This question is open, natural, and strictly weaker than Conjecture 7.1.

OP-682 Erdős Conjecture on Arbitrarily Large Planar Crescent ConfigurationsNot in LeanCombinatorics for TCS

Does there exist an integer $N$ such that for every integer $n \ge N$, there is no crescent configuration in the Euclidean plane $\mathbb{R}^2$ with $n$ points? That is, for sufficiently large $n$, does every $n$-point subset $S \subset \mathbb{R}^2$ in general position (no three points collinear and no four points cocircular) fail to determine exactly $n-1$ distinct pairwise Euclidean distances with multiplicities $1, 2, \ldots, n-1$?

Posed in arXiv:2610.38368, Section 1, below Theorem 1.1 — Crescent configurations in three dimensions

What is known

The paper proves D(n) <= 3 for all n >= 3, reducing the minimum dimension D(n) to {2, 3}, but does not decide whether planar crescent configurations exist for arbitrarily large n, which is Erdős's conjecture from 1982.

OP-684 Linear Dimension Growth for Strong Crescent ConfigurationsNot in LeanCombinatorics for TCS

Let $D_{\mathrm{strong}}(n)$ denote the minimum dimension $d \ge 2$ in which an $n$-point strong crescent configuration exists in $\mathbb{R}^d$, where a strong crescent configuration is an $n$-point crescent configuration containing no four-point subset whose distance-equality pattern is that of four equally spaced points on a line. Is $D_{\mathrm{strong}}(n) = \Theta(n)$ as $n \to \infty$? That is, do there exist constants $c_1, c_2 > 0$ and an integer $N$ such that $c_1 n \le D_{\mathrm{strong}}(n) \le c_2 n$ for all $n \ge N$?

Posed in arXiv:2610.38368, Conjecture 5.1 — Crescent configurations in three dimensions

OP-685 Closed Formula and Asymptotic Ratio for Maximally Inflected PermutationsNot in LeanCombinatorics for TCS

Let $\mathcal{M}_n$ denote the set of maximally inflected permutations in $\mathrm{Sym}_n$, i.e., permutations $\sigma \in \mathrm{Sym}_n$ whose second derivative $\sigma''(i) = \sigma(i+1) + \sigma(i-1) - 2\sigma(i)$ alternates in sign on $\{2, \dots, n-1\}$ with no zero values (equivalently, $|\mathcal{I}(\sigma)| = n-3$). What is a closed formula or recurrence for $|\mathcal{M}_n|$ for general $n$, and does the limit $\lim_{n \to \infty} (|\mathcal{M}_n|/n!)^{1/n}$ exist?

Posed in arXiv:2610.38237, Sec. 6, before Remark 6.6 — Inflection sets of permutations

What is known

The paper proves that 2 E_n ≤ |M_n| ≤ (2/3)^{⌊n/3⌋-1} n!, where E_n is the Euler zigzag number, and gives the asymptotic upper bound limsup (|M_n|/n!)^{1/n} ≤ (2/3)^{1/3}, but leaves the exact enumeration and the asymptotic constant open.

OP-687 The Complete-Pair Conjecture for TournamentsNot in LeanGraph Theory & Graph Algorithms

For every positive integer $c$, does there exist an integer $d = d(c)$ such that every finite tournament $T$ with chromatic number $\chi(T) \ge d$ contains a complete pair of subtournaments $(A, B)$—meaning disjoint vertex subsets $A, B \subseteq V(T)$ such that every arc between $A$ and $B$ is directed from $A$ to $B$—satisfying $\chi(T[A]) \ge c$ and $\chi(T[B]) \ge c$?

Posed in arXiv:2610.37920, Sec. 1, after Conjecture 1.1 — High-chromatic tournament parts without a complete pair of cyclic triangles

What is known

Nguyen, Scott, and Seymour (2025, Conjecture 1.2; originally Nguyen-Scott-Seymour 2024) conjectured that every tournament of sufficiently large chromatic number contains a complete pair (A, B) with arbitrarily large chromatic numbers χ(T[A]), χ(T[B]). The present paper disproves the partitioned variant (Conjecture 1.1), but explicitly emphasizes that the unpartitioned complete-pair conjecture remains open.

OP-689 Sphere view-obstruction constant and extremal vectors in dimension eightNot in LeanElementary Number Theory

Let c = (1/2, ..., 1/2) ∈ ℝ^8. For any vector v ∈ ℤ^8_{>0}, define d_8(v) = inf_{t ∈ ℝ} dist(tv, c + ℤ^8)^2 = inf_{t ∈ ℝ} ∑_{i=1}^8 ‖t v_i - 1/2‖_ℤ^2, where ‖x‖_ℤ = min_{k ∈ ℤ} |x - k|. The sphere view-obstruction constant in dimension 8 is Δ_8 = sup_{v ∈ ℤ^8_{>0}} d_8(v). What is the exact value of Δ_8, and which primitive integer vectors v ∈ ℤ^8_{>0} achieve d_8(v) = Δ_8?

Posed in arXiv:2610.37711, Remark 7.3 — The View-Obstruction Problem for Spheres in Dimensions Six and Seven

OP-694 Uniqueness of the third root of the Yang-Mills resonance polynomialNot in LeanClassical Field Theory & Electromagnetism

For every integer $m \ge 3$, let $P_m \in \mathbb{Q}[z]$ be the resonance polynomial of degree $m$ defined via the Taylor recurrence $2(n+1)(n-m) a_{n+1} + [n^2 - (2m+1)n + (2m+3)] a_n - (2m+3)\sum_{i+j+k=n} a_i a_j a_k = 0$ with $a_0(c) = c$, where $K_m(c) = [-m(m+1)+(2m+3)] a_m(c) - (2m+3)\sum_{i+j+k=m} a_i a_j a_k$ and $K_m(c) = (-1)^m c(1-c^2) P_m(c^2)$. Does $P_m$ have exactly three distinct real roots in the open interval $(0, 1)$?

Posed in arXiv:2610.36784, Sec. 5, Uniqueness — Existence of a third self-similar solution of the Yang--Mills equation in high odd dimensions

What is known

The paper proves that P_m has at least three roots in (0, 1) for every m ≥ 3 (the two explicit roots and at least one additional root), but leaves uniqueness of the third root (i.e. that there are exactly three roots in total) open for general m ≥ 3. Exact computation verifies uniqueness for odd dimensions up to d = 101 (m = 48).

OP-695 Existence of a third smooth self-similar Yang-Mills profile in even dimensionsNot in LeanClassical Field Theory & Electromagnetism

For every even integer $d \ge 12$, does there exist a nonconstant smooth profile $u \in C^\infty([0, 1])$ satisfying the self-similar Yang-Mills equation $y^2(1 - y^2)u''(y) + ((d - 3)y - 2y^3)u'(y) + (d - 2)u(y)(1 - u(y)^2) = 0$ on $[0, 1]$ with $u(0) = 0$ (smoothness at the origin) such that $u$ is distinct modulo reflection $u \mapsto -u$ from both explicit profiles $u_\pm(y) = 1 - \frac{\alpha_\pm y^2}{y^2 + \beta_\pm}$, where $\alpha_\pm = 2 \pm 2\sqrt{\frac{d-4}{3(d-2)}}$ and $\beta_\pm = \frac{2}{3}(d-4) \pm \frac{1}{3}\sqrt{3(d-2)(d-4)}$?

Posed in arXiv:2610.36784, Sec. 5, Even dimensions — Existence of a third self-similar solution of the Yang--Mills equation in high odd dimensions

What is known

The algebraic reduction of the boundary value problem at the light cone to the resonance polynomial applies only to odd dimensions d ≥ 11, where the resonant Frobenius term is logarithmic. In even dimensions, non-integer powers appear whose coefficients cannot be determined purely algebraically at the light cone, leaving the existence of the third profile open for all even d ≥ 12.

OP-696 Classification of h-systems in symplectic polar spaces W(2n-1, 2)Not in LeanQuantum Computation

Let V = (Z/2Z)^(2n) be equipped with the standard non-degenerate symplectic bilinear form omega. For 0 <= h <= n-1, an h-system of the symplectic polar space W(2n-1, 2) is a family of 2^n + 1 isotropic subspaces U_1, ..., U_{2^n+1} of dimension h+1 such that U_i cap U_j^perp = {0} for all i != j. For which triples (n, h, m) with m = 2^(h+1) - 1 do h-systems exist in W(2n-1, 2), and what are their isomorphism classes under the symplectic group Sp(2n, 2)?

Posed in arXiv:2610.36076, Sec. 3.2, after Def. 5, line 792 — An algebraic characterisation of $n$-qubit pure-state invariants

OP-699 Central limit theorem for the Gaussian SYK partition function at all temperaturesNot in LeanLimit Theorems

Let q ≥ 4 be an even integer. For an even integer N ≥ q, let I_N = {I ⊂ {1, ..., N} : |I| = q} and σ_N^2 = (q - 1)! / N^(q - 1). Let (g_I)_{I ∈ I_N} be independent standard Gaussian variables, and let ψ_1, ..., ψ_N be 2^(N/2) × 2^(N/2) Hermitian Majorana matrices satisfying {ψ_i, ψ_j} = 2 δ_{ij} I. For I = {i_1 < ... < i_q}, let ψ_I = i^(q/2) ψ_{i_1} ... ψ_{i_q}, and set H_N = σ_N ∑_{I ∈ I_N} g_I ψ_I. Let Z_N(β) = 2^(-N/2) Tr(exp(-β H_N)) be the normalized partition function. For every fixed β ∈ ℝ \ {0}, does (Z_N(β) - E[Z_N(β)]) / sqrt(Var(Z_N(β))) converge in distribution to the standard Gaussian distribution N(0, 1) as N → ∞ through even integers? Furthermore, does N^(q/2 - 1)(log Z_N(β) - E[log Z_N(β)]) converge in distribution to a non-degenerate Gaussian distribution for all fixed β ≠ 0?

Posed in arXiv:2610.18440, Remark 1.4 — A Central Limit Theorem for High-Temperature SYK Model: A case study on mathematical research using AI and Lean

What is known

Theorem 1.2 and Theorem 1.3 prove a CLT for the SYK partition function and free energy only for sufficiently small inverse temperatures |β| < β_q, where higher-order polynomial chaoses are shown to be subdominant to the order-2 chaos. The paper explicitly leaves open whether Gaussian fluctuations persist at all temperatures or if a phase transition in fluctuations occurs at low temperatures.

OP-702 Asymptotic limit of two-comparison quantum minimum selectionNot in LeanQuantum Computation

Let Q_2(n, 1) denote the maximum probability of selecting the minimum element of an unknown strict total order on n elements using at most two coherent quantum pairwise comparisons. The limit c_* = lim_{n -> infty} n * Q_2(n, 1) is known to exist and lie in the interval (7.43710307, 7.43815019]. Is c_* equal to the flag-dual optimum, whose numerical value is approximately 7.43815017?

Posed in arXiv:2610.34762, Sec. 6, after (30) — Quantum ordinal selection with two comparisons

What is known

Theorem 5 bounds the unrestricted asymptotic constant c_* = lim_{n -> infty} n Q_2(n, 1) to the interval (7.43710307, 7.43815019]. Numerical complete-model solutions and polynomial extrapolation in 1/n strongly suggest that c_* coincides with the flag-positivity dual optimum (~7.43815017), but an exact analytic proof or certification remains open.

OP-703 Simultaneous optimality of quantum minimum and top-2 selection at seven objectsNot in LeanQuantum Computation

For n = 7 objects, let Q_2(7, 1) = theta_1 ~ 0.716632459 be the optimal two-comparison quantum success probability for selecting the minimum (rank 1), and let Q_2(7, 2) = theta_2 ~ 0.922214198 be the optimal two-comparison quantum success probability for selecting an object of rank at most 2. Does there exist a two-comparison quantum selection algorithm that simultaneously achieves minimum-selection probability theta_1 and top-2 selection probability theta_2?

Posed in arXiv:2610.34762, Sec. 7, para. 5 — Quantum ordinal selection with two comparisons

What is known

For n = 7 objects, the maximum probability of selecting the minimum with two quantum comparisons is theta_1 ~ 0.716632, and the maximum probability of selecting one of the top 2 objects is theta_2 ~ 0.922214. The certified minimum-optimal algorithm attains top-2 success ~ 0.8995, strictly below theta_2. It is open whether there exists an alternative minimum-optimal algorithm that simultaneously attains the top-2 optimum theta_2.

OP-704 Maximum Cardinality of Ear-Intersecting Families of Polygon TriangulationsNot in LeanCombinatorics for TCS

Let $n \ge 4$ be an integer, and let $\mathcal{T}_n$ denote the set of all triangulations of a convex $n$-gon. An ear of the $n$-gon is a chord connecting two vertices at cyclic distance 2 along the boundary. A family $\mathcal{F} \subseteq \mathcal{T}_n$ is ear-intersecting if for every pair of triangulations $T_1, T_2 \in \mathcal{F}$, there exists an ear $e$ of the $n$-gon such that $e \in T_1 \cap T_2$. Is the maximum size of an ear-intersecting family of triangulations of an $n$-gon equal to $T_{n-1} = \frac{1}{n-1}\binom{2n-4}{n-2}$?

Posed in arXiv:2610.39116, Sec. 4 — Some results on intersecting families of triangulations

OP-705 Maximum Cardinality of Intersecting Families of Polygon TriangulationsNot in LeanCombinatorics for TCS

Let $n \ge 4$ be an integer, and let $\mathcal{T}_n$ denote the set of all triangulations of a convex $n$-gon. A family $\mathcal{F} \subseteq \mathcal{T}_n$ is intersecting if for every pair of triangulations $T_1, T_2 \in \mathcal{F}$, they share at least one chord ($T_1 \cap T_2 \neq \emptyset$). Is the maximum size of an intersecting family of triangulations of an $n$-gon equal to $T_{n-1} = \frac{1}{n-1}\binom{2n-4}{n-2}$ (the number of triangulations containing a fixed ear)?

Posed in arXiv:2610.39116, Sec. 1 — Some results on intersecting families of triangulations

OP-707 Tight Asymptotic Constant for Linear-Size Crossing FamiliesNot in LeanCombinatorics for TCS

Let P ⊂ ℝ² be a set of n points in general position (no three points collinear). A crossing family on P is a set of straight-line segments with endpoints in P such that every two segments cross (intersect in their relative interiors). Let cf(P) denote the maximum size of a crossing family on P, and let cf(n) = min_{|P|=n} cf(P). What is the asymptotic constant c = lim_{n → ∞} cf(n)/n, currently known to satisfy (4 - √10)/66 ≤ c ≤ 8/41?

Posed in arXiv:2610.38658, Sec. 5 — Larger Crossing Families

What is known

The paper proves cf(n) ≥ (4 - √10)/66 · n ≈ 0.01269 n, giving the first explicit linear lower bound, while the best known upper bound construction achieves (8/41)n ≈ 0.1951 n. Determining the exact asymptotic constant remains open.

OP-708 Minimum Number of Plane Subgraphs Partitioning Complete Geometric GraphsNot in LeanCombinatorics for TCS

For a set P ⊂ ℝ² of n points in general position, let K(P) be the complete geometric graph with straight edges on P. What is the maximum over all n-point sets P of the minimum number of plane subgraphs (or plane subtrees) required to partition the edge set of K(P)? In particular, what is the asymptotic ratio lim_{n → ∞} f(n)/n, currently known to lie in [1/2, (11(5 - √10) + 1)/(12(5 - √10))]?

Posed in arXiv:2610.38658, Sec. 3, after Corollary 9 — Larger Crossing Families

What is known

The paper establishes that any n-point set in general position has complete geometric graph partitionable into at most ((11(5 - √10) + 1)/(12(5 - √10))) n ≈ 0.962 n plane subtrees, improving the upper bound below n, while n/2 + 1 subgraphs are known to be necessary. Closing the gap between n/2 and 0.962 n remains open.

OP-709 Dirac threshold for tight Hamilton cycles with odd codegree difference below matching boundNot in LeanGraph Theory & Graph Algorithms

Let $r \ge 5$ be an odd integer, and let $q_r = 1 - 2^{-r}\binom{r}{(r-1)/2}$. For every integer $k$ with $r + 1 \le k < \lceil r(3 - 2q_r) \rceil$, is the asymptotic minimum $(k-r)$-degree threshold $\delta_{k-r}^{\mathrm{HC}}(k)$ for a tight Hamilton cycle in a $k$-uniform hypergraph equal to $q_r$? That is, for every $\varepsilon > 0$, does there exist $n_0 \in \mathbb{N}$ such that every $k$-uniform hypergraph $H$ on $n \ge n_0$ vertices with minimum $(k-r)$-degree $\delta_{k-r}(H) \ge (q_r + \varepsilon)\binom{n-k+r}{r}$ contains a tight Hamilton cycle?

Posed in arXiv:2610.38560, Sec. 6 — Large tight components and Dirac thresholds for tight Hamilton cycles

What is known

The paper proves the threshold equality for odd r when k >= ceil(r(3 - 2q_r)). The restriction on k arises solely from the fractional matching estimate in selected link components; stronger matching bounds would extend the result down to k = r + 1.

OP-711 Equality of Permutation Threshold and Lattice Threshold for Semi-Magic SquaresNot in LeanCombinatorics for TCS

Let $n \ge 3$ and $N = n^2$. For an arrangement $S \in M_n(\{1,\dots,N\})$ of $\{1,\dots,N\}$, let the column-deviation vector $\gamma \in \mathbb{Z}^n$ be defined by $\gamma_j = \sum_{i=0}^{n-1} s_{ij} - M(n)$ where $M(n) = n(N+1)/2$, and similarly let $\rho \in \mathbb{Z}^n$ be the row-deviation vector $\rho_i = \sum_{j=0}^{n-1} s_{ij} - M(n)$. An arrangement satisfies the degree-$k$ conditions if $(t-1)^{k+1}$ divides both $P_\gamma(t) = \sum_{j=0}^{n-1} \gamma_j t^j$ and $P_\rho(t) = \sum_{i=0}^{n-1} \rho_i t^i$ in $\mathbb{Z}[t]$. Let $k^*(n)$ be the least positive integer $k$ such that every arrangement satisfying the degree-$k$ conditions is semi-magic ($\gamma = \rho = 0$). Let $\Lambda_{n,k} = \{\gamma \in \mathbb{Z}^n : (t-1)^{k+1} \mid P_\gamma(t)\}$, and let $U(n)$ be the least integer $k \ge 1$ such that no nonzero $\gamma \in \Lambda_{n,k}$ satisfies $|\sum_{j \in J} \gamma_j| \le \frac{pn(N-pn)}{2}$ for every subset $J \subseteq \{0,\dots,n-1\}$ of size $p = |J|$. Is $k^*(n) = U(n)$ for every integer $n \ge 3$?

Posed in arXiv:2610.38386, Conjecture 3.15 — Moments of Magic Squares: Line-Sum Conditions, a Permutation Threshold, and Random Energies

What is known

The paper shows $k^*(n) \le U(n)$ for all $n$, proves equality $k^*(n) = U(n)$ for $3 \le n \le 40$, and establishes $k^*(n) \ge U(n)$ unconditionally for $41 \le n \le 46$. Whether realisability ever restricts the threshold remains open for all $n \ge 41$.

OP-712 Asymptotic Order of the Permutation Moment Threshold for Semi-Magic SquaresNot in LeanCombinatorics for TCS

Let $k^*(n)$ denote the permutation threshold of order $n$, defined as the least integer $k \ge 1$ such that every arrangement $S$ of $\{1, \dots, n^2\}$ satisfying $\sum_{j=0}^{n-1} (j - \frac{n-1}{2})^m (\sum_{i=0}^{n-1} s_{ij} - \frac{n(n^2+1)}{2}) = 0$ and $\sum_{i=0}^{n-1} (\frac{n-1}{2} - i)^m (\sum_{j=0}^{n-1} s_{ij} - \frac{n(n^2+1)}{2}) = 0$ for all $0 \le m \le k$ has all row and column sums equal to $n(n^2+1)/2$. Does there exist an absolute constant $C > 0$ such that $k^*(n) \le C \sqrt{n}$ for all $n \ge 3$, or does $k^*(n)/\sqrt{n} \to \infty$ as $n \to \infty$?

Posed in arXiv:2610.38386, Sec. 6, open question 1 — Moments of Magic Squares: Line-Sum Conditions, a Permutation Threshold, and Random Energies

What is known

The paper proves $(\sqrt{2}-o(1))\sqrt{n} \le k^*(n) \le 2\sqrt{2}\sqrt{n\log n}$, leaving open the factor $\sqrt{\log n}$ between the square-root and square-root-logarithmic orders.

OP-714 bent pauli stabilizer third moment spectral rigidityNot in LeanQuantum Computation

For every n>=2, put V=F_2^n x F_2^n, d=2^n and omega((x,z),(x',z'))=x dot z'+z dot x'. Let f:V->F_2 be bent, meaning that every Walsh coefficient of (-1)^f has absolute value d. Let X={v:f(v)=1} and let Phi_f(rho)=|X|^(-1) sum_{v in X} W_v rho W_v^dagger, where W_(x,z)=i^(sum_j x_j z_j) tensor_j X_j^(x_j) Z_j^(z_j) are the Hermitian n-qubit Paulis. Is the following equivalence true: Tr(Phi_f(|psi><psi|)^3) has the same value for every pure stabilizer state psi if and only if f(u+v)+f(u)+f(v)+f(0)=omega(u,v) for all u,v in V (with this identity in F_2)? Here a pure stabilizer state means any common eigenvector of a maximal commuting Pauli subgroup. Thus, does a third-moment test restricted to stabilizer inputs characterize exactly the bent-supported noise channels whose entire output spectrum is independent of every pure input?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

For benchmarking and noise identification, constant output purity hides large differences in output eigenvalues and entropy. Frembs shows that all bent-supported uniform Pauli channels have isotropic second moment, and gives a distinguished family from quadratic refinements; it does not classify which bent supports have isotropic higher moments. The proposed equivalence would give an all-dimension finite-state certification theorem for that physically distinguished family. The proof of Corollary 8 only squares Pauli eigenvalues and discards precisely the sign correlations needed here. The paper's Appendix A derives cubic identities for an already given symplectic Cartan decomposition, whereas the missing direction must reconstruct that decomposition from a scalar third-moment condition on stabilizer inputs. Sergeev's constant-Frobenius-norm classification concerns second moments and does not supply this inverse assertion. It moves Frembs, arXiv:2610.36076, Section 5.2, Corollary 8 and the bent-function observation following Eq. (61) along new_setting: Classify third-moment and spectral isotropy inside the much larger bent-supported class, using only stabilizer probes; second-moment isotropy holds for every bent support and cannot distinguish these channels.. Evidence: Exact integer Walsh and stabilizer-spectrum calculations exhausted all 65,536 Boolean functions on four bits: of the 896 bent functions, exactly the 32 symplectic refinements had constant third moment across all 15 Lagrangians. All other 864 already varied on stabilizer inputs. On six bits, 2,500 sampled Maiorana-McFarland bent functions failed the test, while all 64 explicitly tested refinements passed across all 135 Lagrangians. The calculations distinguish equal purity from different spectra exactly, without floating-point comparisons.

OP-715 Existence of the Logarithmic Excess Limit for Abelian Groups with One Odd Prime DivisorNot in LeanElementary Number Theory

Let $H$ be a fixed finite abelian group whose order is divisible by exactly one odd prime. Let $E_H(r) = \mathsf{D}(H \oplus C_2^r) - \mathsf{D}^*(H \oplus C_2^r)$, where $\mathsf{D}(G)$ is the Davenport constant of $G$ and $\mathsf{D}^*(G) = 1 + \sum_{i=1}^k (n_i - 1)$ for the invariant factors $n_1 \mid \cdots \mid n_k$ of $G$. Does the sequence $E_H(r)/\log_2 r$ converge as $r \to \infty$?

Posed in arXiv:2610.38447, Sec. 11.2 — Davenport constants with growing binary rank

What is known

For any fixed finite abelian group H with t(H)=1 (exactly one odd prime dividing |H|), the paper shows that the liminf and limsup of E_H(r)/log_2(r) are finite and positive, but leaves open whether they coincide, i.e., whether the limit exists.

OP-717 Characterization of L-extendable functions on the integer latticeNot in LeanSubmodular & Combinatorial Optimization

Characterize the class of functions $f: \mathbb{Z}^n \to \mathbb{R} \cup \{+\infty\}$ on the integer lattice that are $\mathrm{L}$-extendable; that is, determine necessary and sufficient structural conditions for an integrally convex function $f$ to admit an $\mathrm{L}$-convex (i.e., $\frac{1}{2}\mathrm{UJ}$-convex) relaxation $g: (\frac{1}{2}\mathbb{Z})^n \to \mathbb{R} \cup \{+\infty\}$ agreeing with $f$ on $\mathbb{Z}^n$.

Posed in arXiv:2610.38287, Sec. 5 — A Characterization of Functions on the Integer Lattice That Are L-Extendable through Local Convex Extensions

What is known

Theorem 1 proves that every L-extendable function is integrally convex, but Example 2 shows the inclusion is strict (e.g. for indicator functions of non-majority-closed subsets of a unit cube). While Theorem 4 characterizes the subclass of functions that are L-extendable specifically through their local convex extensions, characterizing general L-extendability remains open.

OP-720 Poisson Generic Property of Codewords in Dual Melas CodesNot in LeanInformation Theory & Coding

For each integer $k \ge 3$, let $\alpha_k \in \mathbb{F}_{2^k}^*$ be a primitive element, and let $c_k \in \mathbb{F}_{2^k}^*$. Consider the periodic binary sequence $S_{c_k}^{(k)}$ of length $2^k-1$ defined by $S_{c_k}^{(k)}(i) = \mathrm{Tr}_{\mathbb{F}_{2^k}/\mathbb{F}_2}(\alpha_k^i + c_k \alpha_k^{-i})$ for $0 \le i \le 2^k - 2$. For any pattern $w \in \mathbb{F}_2^k$, let $N_w(S_{c_k}^{(k)})$ denote the number of occurrences of $w$ whose start index lies in the prefix of length $2^k-1$ (with periodic continuation). Consider the probability space $\Omega_k = \mathbb{F}_2^k$ under the uniform measure, and define the random variable $X_k(w) = N_w(S_{c_k}^{(k)})$. Does the family $\{S_{c_k}^{(k)}\}_{k \ge 3}$ satisfy the $1$-Poisson randomness postulate, that is, does $X_k$ converge in distribution to the Poisson distribution $\mathcal{P}(1)$ as $k \to \infty$, meaning that for every non-negative integer $m$, $\lim_{k \to \infty} 2^{-k} \cdot \#\{w \in \mathbb{F}_2^k : N_w(S_{c_k}^{(k)}) = m\} = e^{-1}/m!$?

Posed in arXiv:2610.38017, Conjecture 35 — On the $b$-Symbol Weight Distribution of Dual Melas Codes and a Poisson Randomness Postulate

OP-721 Maximum Pattern Occurrences in Dual Melas CodewordsNot in LeanInformation Theory & Coding

Let $k \ge 3$, let $\alpha \in \mathbb{F}_{2^k}$ be a primitive element, and let $\mathrm{Melas}(k)^\perp$ be the dual Melas code over $\mathbb{F}_2$ of length $2^k-1$ (the set of LFSR sequences with connection polynomial $M_\alpha(x) M_{\alpha^{-1}}(x)$, where $M_\alpha$ is the minimal polynomial of $\alpha$). Does there exist an absolute constant $\ell > 0$ such that for every binary pattern $w \in \mathbb{F}_2^k$ and every non-zero codeword $c \in \mathrm{Melas}(k)^\perp$, the number of occurrences of $w$ as a cyclic subword of length $k$ in $c$ is at most $2^{\frac{\ell k}{\log_2 k}(1+o(1))}$ as $k \to \infty$?

Posed in arXiv:2610.38017, Conjecture 22 — On the $b$-Symbol Weight Distribution of Dual Melas Codes and a Poisson Randomness Postulate

OP-722 Poisson Genericity of Dual 2-Error-Correcting BCH CodesNot in LeanInformation Theory & Coding

For each integer $k \ge 3$, let $\alpha_k \in \mathbb{F}_{2^k}^*$ be a primitive element, and let $c_k \in \mathbb{F}_{2^k}^*$. Consider the periodic binary sequence of length $2^k - 1$ given by $T_{c_k}^{(k)}(i) = \mathrm{Tr}_{\mathbb{F}_{2^k}/\mathbb{F}_2}(\alpha_k^i + c_k \alpha_k^{3i})$ for $0 \le i \le 2^k - 2$, which forms a codeword of the dual BCH code $\mathrm{BCH}(2,k)^\perp$. Let $X_k(w)$ count the occurrences of a uniformly chosen random pattern $w \in \mathbb{F}_2^k$ in the cyclic continuation of $T_{c_k}^{(k)}$. Does $X_k$ converge in distribution to the Poisson distribution $\mathcal{P}(1)$ as $k \to \infty$ for every sequence of choices $(c_k)_{k \ge 3}$?

Posed in arXiv:2610.38017, Conjecture 36 — On the $b$-Symbol Weight Distribution of Dual Melas Codes and a Poisson Randomness Postulate

OP-723 cycle greedy assignment two scale crt gaussian mixture limitNot in LeanOnline Algorithms

Does nearest-free greedy assignment on the circle have the following joint two-scale limit law? There are n facilities of capacity one at the integer points of a circle of circumference n, and n independent continuous uniform arrivals; each is assigned immediately to its nearest free facility in cycle distance. Let C_n be the realized total distance, let F_n be the complete ordered sequence of removed facilities, and set M_n=E[C_n|F_n] and V_n=Var(C_n|F_n). These conditional quantities have an explicit finite definition: when a facility with adjacent free gaps x,y is removed while at least two facilities remain, its contribution to M_n is mu(x,y)=(x^2+y^2)/(4(x+y)) and its contribution to V_n is v(x,y)=(x^3+y^3)/(12(x+y))-mu(x,y)^2; the final facility contributes n/4 and n^2/48. Take the Brownian continuum random tree in the normalization obtained from uniform Cayley trees by giving each edge length n^(-1/2), and cut its skeleton by a Poisson process with intensity ds times length measure. Let X_i(s) be the ranked component masses after cuts up to time s. Define A=(1/4) integral_0^infinity sum_i X_i(s)^2 ds and B=(1/48) integral_0^infinity sum_i X_i(s)^3 ds. Is it true that (C_n/n^(3/2), V_n/n^(5/2), (C_n-M_n)/n^(5/4)) converges jointly in distribution to (A,B,sqrt(B)*Z), where Z is a standard normal independent of the entire cut-tree process, B is positive and nonconstant, and A has the law of one half the area under a standard normalized Brownian excursion?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The recent assignment paper determines only the first moment and does not ask about fluctuations. A distributional theorem would describe instance-to-instance variation and separate randomness of resource depletion from randomness of arrival locations inside the selected Voronoi cells. The classical additive-coalescent/CRT limit and linear-probing Airy laws suggest the leading scale, but neither gives the conditional n^(5/4) fluctuation or its joint dependence on the leading cost. The mean calculation integrates two-vertex connectivity and loses that dependence. The missing steps are an infinite-time additive-functional limit, control of the selected-merge variance against the cubic gap functional, and a conditional central limit theorem that preserves the common random environment. The observed variance variation rules out treating the smaller-scale noise as a fixed-variance normal. It moves Rahat--Riad--Hasan, arXiv:2610.15776, Theorems 3, 5, 7 and the expected-cost asymptotic along new_setting: Pass from the exact expected cost to the joint leading random cost and the finer geometric-location noise conditional on the facility-removal history; the smaller noise has a random variance, not a universal fixed variance.. Evidence: Monte Carlo runs at n=64,256,1024,4096,16384 recorded total cost and the exact conditional mean/variance for each removal sequence. The variance of C_n/n^(3/2) stayed around 0.006, consistent with the half-excursion prediction 5/48-pi/32=0.005991896. The mean V_n/n^(5/2) decreased from 0.01539 to 0.01315, near the CRT prediction sqrt(pi/2)/96=0.01305536, while its coefficient of variation grew from 0.34 to 0.46, supporting a nondegenerate mixing variable. The standardized residual (C_n-M_n)/sqrt(V_n) had variance about one and fourth moment near three across the sizes. These are simulations, not limit-law proofs.

OP-724 Polynomial-delay avoider enumeration for all finitely based permutation classesNot in LeanAlgorithm Design & Analysis

Let $B$ be a finite set of permutations, and let $\operatorname{Av}_n(B)$ denote the set of permutations of length $n$ avoiding every pattern in $B$. Does there exist an enumeration algorithm with polynomial delay (that is, an algorithm outputting all elements of $\operatorname{Av}_n(B)$ without duplicates such that the time before the first output, between any two consecutive outputs, and after the last output is bounded by a polynomial in $n$) for every fixed finite set $B$?

Posed in arXiv:2610.37940, Sec. 8 — Enumeration Complexity of Permutation Classes

OP-727 Distillability threshold for noisy single-qubit T-states under Clifford reductionsNot in LeanQuantum Computation

Consider the single-qubit mixed states parameterized by depolarizing noise on the magic T-state: $\rho(p) = (1-p)\frac{I}{2} + p |T\rangle\langle T|$ for $p \in [0, 1]$, where $|T\rangle = \cos(\beta)|0\rangle + e^{i\pi/4}\sin(\beta)|1\rangle$ with $\cos(2\beta) = 1/\sqrt{3}$ has Bloch vector $(1/\sqrt{3}, 1/\sqrt{3}, 1/\sqrt{3})$. The stabilizer octahedron corresponds to $p \le 1/\sqrt{3}$. What is the infimum $p^* \in [1/\sqrt{3}, 1]$ of noise parameters $p$ for which there exists an integer $n \ge 1$ and an $n$-to-$1$ Clifford reduction protocol (using Clifford unitaries, ancilla $|0\rangle$ states, Pauli measurements, and postselection) that outputs a single-qubit state $\rho'$ satisfying $\|B(\rho')\|_1 > \|B(\rho(p))\|_1$? In particular, is $p^* > 1/\sqrt{3}$?

Posed in arXiv:2610.37807, Sec. 1, paragraph 4 — Lower Bound for Region of Non-Distillable Magic States

What is known

The paper determines an explicit lower bound on the region of single-qubit states outside the stabilizer octahedron that cannot be distilled via Clifford reductions, expanding on Campbell and Browne (2010), but leaves open the exact boundary between distillable and non-distillable states.

OP-731 Closed-Form Expression for Optimal Universal Coding Expansion FactorNot in LeanInformation Theory & Coding

Let $\mathcal{P}_{\mathbb{N}}$ denote the set of nonincreasing probability distributions on $\mathbb{N}=\{1, 2, \dots\}$. For any binary prefix code $\mathcal{C}$ with nondecreasing codeword lengths $L_{\mathcal{C}} : \mathbb{N} \to \mathbb{N}$, its expansion factor is $C_{\mathcal{C}}^* = \sup_{P \in \mathcal{P}_{\mathbb{N}}} \frac{\sum_{n=1}^\infty P(n) L_{\mathcal{C}}(n)}{\max\{1, H(P)\}}$, where $H(P) = -\sum_{n=1}^\infty P(n) \log_2 P(n)$, and let $C^* = \inf_{\mathcal{C}} C_{\mathcal{C}}^*$ over all binary prefix codes. The constant $C^*$ has certified decimal expansion beginning $2.00012475703610197861701176297579886254\dots$. Does $C^*$ admit a closed-form expression, or is $C^*$ an algebraic number over $\mathbb{Q}$?

Posed in arXiv:2610.01563, Sec. V — Optimal Universal Coding of Integers

What is known

The paper determines C* numerically to 38 certified digits, but notes that finding an explicit closed-form analytic or algebraic expression remains open.

OP-738 Weighted Turán densities of the 3-uniform tetrahedronNot in LeanCombinatorics for TCS

Let $K_{4}^{3}$ denote the complete 3-uniform hypergraph on 4 vertices, and let $K_{4}^{3-}$ denote the 3-uniform hypergraph on 4 vertices with 3 edges (the tetrahedron minus one edge). For an integer $t \ge 1$ and $n \ge 4$, let $\operatorname{ex}_{\mathbb{N}}(n, K_4^3, t)$ denote the maximum of $\sum_{e \in \binom{V}{3}} w(e)$ over all weight functions $w : \binom{V}{3} \to \mathbb{N}$ on an $n$-element vertex set $V$ such that for every 4-element subset $S \subseteq V$, the sum of weights of the four triples in $S$ is strictly less than $t$. Let $\pi_{\mathbb{N}}(K_4^3, t) = \lim_{n \to \infty} \operatorname{ex}_{\mathbb{N}}(n, K_4^3, t) / \binom{n}{3}$. Is it true that for every integer $k \ge 0$, $\pi_{\mathbb{N}}(K_{4}^{3}, 4k+1) = \pi_{\mathbb{N}}(K_{4}^{3}, 4k+2) = k$, $\pi_{\mathbb{N}}(K_{4}^{3}, 4k+3) = k + \pi(K_{4}^{3-})$, and $\pi_{\mathbb{N}}(K_{4}^{3}, 4k+4) = k + \pi(K_{4}^{3})$?

Posed in arXiv:2610.39085, Conjecture 1 — Weighted Tur\'an densities for hypergraphs

What is known

The authors solve the weighted Turán problem asymptotically and exactly for the generalized triangle F_5, but note that the tetrahedron K_4^3 remains completely open. They formulate Conjecture 1 relating the weighted densities to unweighted densities modulo 4.

OP-740 Single-root cover relations in extended weak order for Coxeter groups of rank at least fourNot in LeanCombinatorics for TCS

Let $(W, S)$ be a Coxeter system with geometric root system $\Phi$ and positive roots $\Phi^+$. A subset $B \subseteq \Phi^+$ is called closed if whenever $\alpha, \beta \in B$ and $\gamma \in \Phi^+ \cap (\mathbb{R}_{\ge 0}\alpha + \mathbb{R}_{\ge 0}\beta)$, we have $\gamma \in B$. A subset $B \subseteq \Phi^+$ is biclosed if both $B$ and $\Phi^+ \setminus B$ are closed. The extended weak order is the set of all biclosed subsets of $\Phi^+$ ordered by inclusion. Is it true that for every Coxeter system $(W, S)$ of rank $|S| \ge 4$, whenever $B_1 \lessdot B_2$ is a cover relation in the extended weak order, the set difference consists of a single root, that is, $|B_2 \setminus B_1| = 1$?

Posed in arXiv:2610.38849, Conjecture 3.9 — Extended weak order in all rank three Coxeter groups

OP-741 Complete lattice property of extended weak order for Coxeter groups of rank at least fourNot in LeanCombinatorics for TCS

Let $(W, S)$ be a Coxeter system of rank $|S| \ge 4$ with geometric root system $\Phi$ and positive roots $\Phi^+$. A subset $B \subseteq \Phi^+$ is closed if for all $\alpha, \beta \in B$, any root $\gamma \in \Phi^+$ in the nonnegative linear span of $\alpha$ and $\beta$ belongs to $B$. A subset $B$ is biclosed if both $B$ and $\Phi^+ \setminus B$ are closed. Partially order the collection of all biclosed subsets of $\Phi^+$ by inclusion $\subseteq$. Is this extended weak order a complete lattice for every Coxeter system of rank at least 4?

Posed in arXiv:2610.38849, Sec. 1, paragraph 3 — Extended weak order in all rank three Coxeter groups

OP-742 Weak separability of parabolic biclosed sets with a unique boundary accumulation point in rank three Coxeter groupsNot in LeanCombinatorics for TCS

Let $W = \mathrm{Cox}(p, q, r)$ be a rank-3 Coxeter group acting on the hyperbolic plane, viewed in the Klein disk model $\mathbb{D} \subset \mathbb{R}^2$, with positive roots $\Phi^+$ and rescaled roots $\widehat{\Phi}$. A subset $X \subseteq \Phi^+$ is parabolic biclosed if for every rank-2 parabolic subsystem $\Phi'$, the intersection $X \cap \Phi'^+$ is separable in $\Phi'^+$. Let $R = \Phi^+ \setminus X$, and call an ideal boundary point $x \in \partial\mathbb{D}$ purple if it is an accumulation point of the rescaled roots of both $X$ and $R$. Does there exist a rank-3 Coxeter group and a parabolic biclosed set $X \subseteq \Phi^+$ having exactly one purple point on $\partial\mathbb{D}$ such that $X$ is not weakly separable (i.e., cannot be separated from $R$ by a hyperplane)?

Posed in arXiv:2610.38849, Remark 8.5 — Extended weak order in all rank three Coxeter groups

OP-743 Upper bound on die size admitting non-transitive cycle of length equal to die sizeNot in LeanCombinatorics for TCS

For an integer $n \ge 3$, a non-standard $n$-sided die is a multiset of $n$ face values from $\{1, \dots, n\}$, represented by a non-decreasing $n$-tuple $\mathbf{x} = (x_1, \dots, x_n) \in \{1, \dots, n\}^n$ with $x_1 \le x_2 \le \dots \le x_n$. Given two such dice $\mathbf{x}$ and $\mathbf{y}$, the beat score is $S(\mathbf{x}, \mathbf{y}) = \sum_{i=1}^n \sum_{j=1}^n \mathbf{1}_{\{x_i > y_j\}}$. The minimal winning advantage target $T(n)$ is defined as $n^2 / 2 + 1$ if $n$ is even, and $(n^2 + 1) / 2$ if $n$ is odd. Let $G_n$ be the directed graph whose vertex set consists of all $\binom{2n-1}{n}$ non-standard $n$-sided dice, with a directed edge $\mathbf{x} \to \mathbf{y}$ if and only if $S(\mathbf{x}, \mathbf{y}) = T(n)$. Is $n = 6$ the largest integer $n \ge 3$ such that $G_n$ admits a directed simple cycle of length $n$ and no directed simple cycle of length strictly greater than $n$?

Posed in arXiv:2610.40321, Conjecture 1 — Computer-Assisted Results for \(n\)-Sided Non-Transitive Dice Taking Face Values in \([n]\)

What is known

The paper establishes that n=6 admits a cycle of maximum length 6, and shows computationally that for n in {7, 8, 9, 10} there exist cycles of length strictly greater than n, but leaves the general case n >= 11 open.

OP-745 Density and Infinitude of Good Primes in Column 2Not in LeanElementary Number Theory

Let $T(n,2)$ be the number of derangements of $\{1, \dots, n\}$ with no $2$-cycles (fixed-point-free permutations without transpositions). For $n \ge 3$, define the integer $Q_n = T(n,2) / ((n-1)(n-2))$. An odd prime $p$ is called good if $p \nmid Q_n$ for all $n \ge 3$ (which is equivalent to $p \nmid Q_n$ for all $3 \le n \le p+2$). Are there infinitely many good primes, and does the limit $\lim_{x \to \infty} \frac{\#\{p \le x : p \text{ is good}\}}{\pi(x)}$ exist and equal $e^{-1}$?

Posed in arXiv:2610.40342, Question 14.6 — A p-adic Valuation Calculus for Permutations with Restricted Cycle Lengths

What is known

The paper proves there are infinitely many bad primes (Theorem 14.3) and observes that 79,656 of the 216,815 odd primes up to 3*10^6 are good (frequency ~0.3674, close to 1/e), reducing the question conditionally to an arrangement of lines in the projective plane. Both infinitude and density remain open.

OP-747 Infinitude of Prime Divisors of the Form n Plus One for Coprime Cycle PermutationsNot in LeanElementary Number Theory

For an integer $n \ge 1$, let $\operatorname{cop}(n)$ denote the number of permutations of $\{1, \dots, n\}$ all of whose cycle lengths are relatively prime to $n$. Are there infinitely many positive integers $n$ such that $n+1$ is a prime number and $n+1$ divides $\operatorname{cop}(n)$?

Posed in arXiv:2610.40342, Question 14.9 — A p-adic Valuation Calculus for Permutations with Restricted Cycle Lengths

What is known

The paper proves that $(n+1) \mid \operatorname{cop}(n)$ whenever $n+1$ is composite, but when $n+1$ is prime, divisibility occurs only twice below 3*10^6 ($n=708$ and $n=92202$). Heuristics predict infinitely many such primes, but no infinite family is known.

OP-751 Exact maximum triangle count in regular graphs for even degree and large even remainderNot in LeanGraph Theory & Graph Algorithms

Let $k \ge 2$ be an even integer, and let $n > k$ be an integer such that $n = q(k+1) + r$ with $q \ge 1$ and $0 \le r < k+1$. Suppose that $r$ is even and $3r > 2(k+1)$. Let $\tau_k(n)$ denote the maximum number of triangles (copies of $K_3$) among all $k$-regular simple graphs on $n$ vertices. Determine the exact value of $\tau_k(n)$ and characterize all extremal graphs. In particular, determine the exact value of $\tau_k(n)$ within the range $[f(n,k) - r(2r-k-2)/4, \, f(n,k) - 1]$, where $f(n,k) = (n k (k-1) - r (k+1-r) (k+1+r)) / 6$.

Posed in arXiv:2610.39461, Sec. 1, before Theorem 1.2 — The maximum number of triangles in regular graphs

What is known

Theorem 1.1 completely settles the maximum triangle problem when k is odd, r is odd, or 3r <= 2(k+1). For even k and even r with 3r > 2(k+1), Theorem 1.2 establishes a gap between the lower bound f(n,k) - r(2r-k-2)/4 and the upper bound f(n,k) - 1, leaving the exact value of tau_k(n) open.

OP-753 Asymptotic tightness of the bidirectional lower bound for complete order graphsNot in LeanCombinatorics for TCS

Let E_bi*(d) denote the minimum number of edges in a complete bidirectional order graph of dimension d. Does E_bi*(d) = (1 + o(1)) LB_bi(d) as d → ∞, where LB_bi(d) = max_{1 ≤ m ≤ d} (d choose m) ⌈m/2⌉ ~ (1 / (2√(2π))) 2^d √d? That is, does the ratio E_bi*(d) / LB_bi(d) converge to 1 as d → ∞?

Posed in arXiv:2610.39311, Sec. 6, Open problem 2 — Tight Asymptotic Bounds on the Size of Order Graphs

OP-754 Existence of sublinear families of rings covering all subset-endpoint pairsNot in LeanCombinatorics for TCS

Does there exist an absolute constant C > 0 such that for every integer d ≥ 2, there is a family R of at most C · 2^d / √d cyclic orders of [d] = {1, ..., d} with the property that for every non-empty subset U ⊆ [d] and every element x ∈ U, there exists some cyclic order in R containing a contiguous arc whose set of elements is exactly U and where x is at one of the two endpoints of the arc?

Posed in arXiv:2610.39311, Sec. 6, Open problem 3 — Tight Asymptotic Bounds on the Size of Order Graphs

OP-756 Optimality of the dual-axis rotation circuit over all unitaries for all block sizesNot in LeanQuantum Computation

For an integer k >= 1, let s_k = (3 * 5^k + 3^k - 6) / 4 if k is odd and s_k = (3 * 5^k - 3^k + 2) / 4 if k is even. In the two-sided locally randomized classical shadow architecture on k qubits, where a fixed middle unitary U in U(2^k) is sandwiched between two independent layers of uniformly random single-qubit Clifford gates, the squared shadow norm for estimating any full-support Pauli operator is C_k(U) = 9^k / S_k(U), where S_k(U) = 9^k * w_k(U) and w_k(U) is the Pauli weight (the full-support channel eigenvalue of the randomized measurement channel). Is it true that for every k >= 8 and every unitary U in U(2^k), S_k(U) <= s_k (equivalently, C_k(U) >= 9^k / s_k), so that the dual-axis rotation circuit U_* = exp(i * pi * X^{\otimes k} / 4) * exp(i * pi * Z^{\otimes k} / 4) minimizes the squared shadow norm over the full unitary group U(2^k) for all k?

Posed in arXiv:2610.04621, Sec. V, second paragraph — Exact Clifford Optimality for Two-Sided Locally Randomized Classical Shadows

OP-760 Low-Rank Matrices with Three Prescribed Off-Diagonal Values Over General Finite Prime FieldsNot in LeanCombinatorics for TCS

Let $p$ be an odd prime number and let $L \subseteq \mathbb{F}_p$ be a three-element subset. Does there exist a constant $C > 0$ (depending only on $p$ and $L$) such that for every positive integer $n$, there exists an $n \times n$ matrix $M \in \mathrm{Mat}_{n}(\mathbb{F}_p)$ whose diagonal entries are all $0$, whose off-diagonal entries all belong to $L$, and whose rank satisfies $\mathrm{rank}_{\mathbb{F}_p}(M) \leq C n^{1/3}$?

Posed in arXiv:2610.39908, Sec. 1, lines 122-124 — Low-rank matrices with three prescribed off-diagonal values over $\mathbb{F}_p$

What is known

Theorem 1.1 resolves this conjecture for primes where 2 generates the multiplicative group, which is conjectured by Artin to encompass ~37.4% of primes. For primes where 2 is not a primitive root (the smallest being p = 7), the question of whether O(n^{1/3}) rank is attainable remains completely open.

OP-762 Rational Rank Bounds for Arbitrary Three-Element Sets of Prescribed Off-Diagonal ValuesNot in LeanCombinatorics for TCS

Let $L \subset \mathbb{Z} \setminus \{0\}$ be an arbitrary three-element set of nonzero integers. Does there exist a constant $C_L > 0$ such that for every integer $n \geq 1$, there exists an $n \times n$ symmetric matrix $M \in \mathrm{Mat}_n(\mathbb{Q})$ with zero diagonal, off-diagonal entries in $L$, and $\mathrm{rank}_\mathbb{Q}(M) \leq C_L n^{1/3}$?

Proposed here, building on arXiv:2610.39908, Sec. 1, after Theorem 1.3 — Low-rank matrices with three prescribed off-diagonal values over $\mathbb{F}_p$; the paper does not ask it

What is known

Theorem 1.3 constructs integer lifts L' of prescribed subsets L of F_p admitting symmetric matrices of rational rank O(n^{1/3}). However, this only applies to the specific integer triples produced by the geometric construction. For an arbitrary 3-element set of nonzero integers L, the best known general bound from the 2017 literature is rank O(n^{1/2}), leaving open whether O(n^{1/3}) rank is achievable over Q for every 3-element set of nonzero integers.

OP-763 Existence of Exact Block-Exchange Descent for Word ShufflesNot in LeanAutomata & Formal Languages

Let $\Sigma$ be an alphabet and let $u, v \in \Sigma^*$ be nonempty words. For any shuffle $w \in \operatorname{Sh}(u,v)$ with minimum insertion degree $d_{u,v}(w) = r > 1$, does there exist a minimum mask $M$ of $w$ and a block exchange $E$ of $M$ producing $z \in \operatorname{Sh}(u,v)$ such that every mask $N$ of $z$ that does not commute with $E$ has run count $\rho(N) \ge r - 1$?

Posed in arXiv:2610.39941, Sec. 10 — Block-exchange descent for insertion: commuting projections and minimum masks

What is known

The paper proves that a block exchange lowers the insertion degree by more than 1 if and only if there exists a noncommuting mask of the successor word with fewer than r-1 runs. If every shuffle admits at least one minimum mask and exchange free of such noncommuting obstructions, then exact descent always exists, which would establish the Singleton No-Gap conjecture.

OP-764 Singleton No-Gap Conjecture for Word Insertion DegreesNot in LeanAutomata & Formal Languages

Let $\Sigma$ be an alphabet and let $u, v \in \Sigma^*$ be nonempty words. Let $D(u,v) = \{d_{u,v}(w) : w \in \operatorname{Sh}(u,v)\}$ be the insertion-degree spectrum of $u$ and $v$. Is $D(u,v)$ always an initial interval of positive integers, i.e., if $r \in D(u,v)$, does $\{1, 2, \ldots, r\} \subseteq D(u,v)$?

Posed in arXiv:2610.39941, Sec. 1 — Block-exchange descent for insertion: commuting projections and minimum masks

What is known

The spectrum of attainable minimum insertion degrees D(u,v) always contains 1 (via concatenation uv). Singleton No-Gap asks whether D(u,v) is always an initial segment of positive integers {1, ..., r_max}. The paper verifies this for combined lengths up to 17 and for degree 3 up to length 30, but the general case remains open.

OP-765 Quantum query complexity of computing the uncovered set of a tournamentNot in LeanQuantum Computation

What is the bounded-error quantum query complexity of computing the uncovered set (the set of all kings) of an $N$-vertex tournament given by an edge-query oracle? In particular, can the uncovered set be computed with $o(N^2)$ quantum queries, or is $\Theta(N^2)$ queries required, closing the gap between the known $\Omega(N^{3/2})$ lower bound and the trivial $O(N^2)$ upper bound?

Posed in arXiv:2610.39702, Sec. 1, paragraph before Sec. 1.1; Table 1; Thm. 8.5 — Quantum Query Complexity of Tournament Solutions

OP-766 Deterministic query complexity of finding a king in a tournamentNot in LeanAlgorithm Design & Analysis

In the edge-query model on an $N$-vertex tournament, what is the deterministic query complexity of finding a single king (a vertex reaching every other vertex by a directed path of length at most 2)? In particular, is the query complexity $O(N^c)$ for some $c < 3/2$, or is $\Omega(N^{3/2})$ queries required?

Posed in arXiv:2610.39702, Sec. 1.2, paragraph on Kings and strong kings — Quantum Query Complexity of Tournament Solutions

OP-767 Computational complexity of Tree in Binary Tree and its Steiner variantNot in LeanNP-Completeness & Reductions

Let TBT (Tree in Binary Tree) be the decision problem: given a finite tree $T$ and an integer bound $K \in \mathbb{N}$, does there exist a binary tree $S$ with $V(S) = V(T)$ such that $\sum_{uv \in E(T)} \operatorname{dist}_S(u, v) \le K$? Let TBT-SN be the variant where $S$ is a binary tree satisfying $V(T) \subseteq V(S)$. Are TBT and TBT-SN NP-complete, or does either admit a polynomial-time exact algorithm?

Posed in arXiv:2610.39863, Sec. 1, paragraph 4 — From Trees to Binary Trees: Approximation Algorithms and a PTAS

OP-769 Leading coefficient of the Turan number of Cartesian products of two stars for the remaining congruence classNot in LeanGraph Theory & Graph Algorithms

Let $S_k = K_{1,k}$ denote the star graph with $k$ leaves (a tree with 1 center vertex and $k$ leaves, on $k+1$ vertices). For simple graphs $G = (V_1, E_1)$ and $H = (V_2, E_2)$, their Cartesian product $G \square H$ is the graph on vertex set $V_1 \times V_2$ where $(u, v)$ is adjacent to $(u', v')$ if and only if either $u = u'$ and $\{v, v'\} \in E_2$, or $v = v'$ and $\{u, u'\} \in E_1$. Let $F_{a,b} = S_a \square S_b$. For a graph $H$, the Turán number $\operatorname{ex}(n, H)$ is the maximum number of edges in a simple graph on $n$ vertices containing no subgraph isomorphic to $H$. For fixed integers $2 \le a \le b$ with $b \equiv 2 \pmod{a+1}$, determine the exact leading constant $c(a,b) = \lim_{n \to \infty} \operatorname{ex}(n, F_{a,b}) / n^{3/2}$. In particular, setting $D = a(a+b-1)/(a+1)$, does $c(a,b)$ equal $\sqrt{D(D+1)} / (\sqrt{D} + \sqrt{D+1})$ (the upper bound), or does it equal the polarity graph blowup bound $\max_{x \in [0, 1]} D(16D + 28x - 16x^2) / [4(4D + 4x)^{3/2}]$, or an intermediate value? Specifically, for the minimal case $a = 2, b = 2$ (the Cartesian product of two copies of $P_3$, i.e. the $3 \times 3$ grid $P_3 \square P_3$, where $D = 2$), what is $\lim_{n \to \infty} \operatorname{ex}(n, P_3 \square P_3) / n^{3/2}$?

Posed in arXiv:2610.39486, Sec. 1, paragraph 4 — On the Tur\'an Number of the Cartesian Product of Two Stars

OP-770 Existence of diameter-two graphs with equal chromatic and mutual-visibility chromatic numbers for all k at least 4Not in LeanGraph Theory & Graph Algorithms

For a finite simple connected graph $G$, a subset $S \subseteq V(G)$ is a mutual-visibility set if every pair of vertices in $S$ is connected by a shortest path in $G$ whose internal vertices do not belong to $S$. The mutual-visibility chromatic number $\chi_\mu(G)$ is the minimum number of mutual-visibility sets needed to partition $V(G)$. For every integer $k \ge 4$, does there exist a finite simple connected graph $G$ of diameter 2 such that $\chi_\mu(G) = \chi(G) = k$, where $\chi(G)$ denotes the chromatic number of $G$?

Posed in arXiv:2610.39430, Sec. 4, question (1) — Diameter-two graphs whose mutual-visibility chromatic number equals their chromatic number

What is known

The paper constructs the first non-bipartite diameter-two graph with equal chromatic and mutual-visibility chromatic number (having chromatic number 3), and poses as its primary open question whether such graphs exist for all higher chromatic numbers k >= 4.

OP-772 Girth-restricted Mader number for C(k,k) at digirth kNot in LeanGraph Theory & Graph Algorithms

For an integer $k \ge 3$, let $C(k,k)$ denote the digraph formed by two internally vertex-disjoint directed paths of length $k$ sharing their initial vertex and terminal vertex. Let $\text{mader}^{(k)}_{\delta^+}(C(k,k))$ denote the smallest integer $d$ such that every finite simple digraph $D$ with minimum out-degree $\delta^+(D) \ge d$ and digirth $g(D) \ge k$ contains a subdivision of $C(k,k)$. What is the exact value of $\text{mader}^{(k)}_{\delta^+}(C(k,k))$ for $k \ge 3$ (and in particular, for $k = 3$, is it 3)?

Posed in arXiv:2610.38574, Sec. 5, before Problem 5.1 — The exact digirth and out-degree bounds for $C(k,k)$-subdivision and out-forest in digraphs

What is known

The paper shows that with digirth at least k+1, minimum out-degree 2 suffices for a C(k,k)-subdivision, while known constructions show that out-degree 2 is not enough if the digirth is only k. The exact minimum out-degree required when digirth is at least k remains open.

OP-773 Minimum out-degree guaranteeing three directed cycles sharing a single arcNot in LeanGraph Theory & Graph Algorithms

Does there exist an integer $d \ge 3$ such that every finite simple digraph $D$ with minimum out-degree $\delta^+(D) \ge d$ contains three directed cycles $C_1, C_2, C_3$ whose pairwise intersection is exactly one single arc $e \in A(D)$, that is, $A(C_i) \cap A(C_j) = \{e\}$ for all $1 \le i < j \le 3$?

Proposed here, building on arXiv:2610.38574, Theorem 1.5 — The exact digirth and out-degree bounds for $C(k,k)$-subdivision and out-forest in digraphs; the paper does not ask it

What is known

Theorem 1.5 proves that every digraph with minimum out-degree 2 contains two directed cycles intersecting in exactly one arc (strengthening Thomassen's 1985 theorem on cycles sharing one vertex). A natural open question is whether a higher constant minimum out-degree guarantees three directed cycles mutually intersecting in exactly one arc.

OP-774 Learnability of Binary Erasing Equal-Length Relational Patterns with Square-Free Terminal WordsNot in LeanComputational Learning Theory

Let $\Sigma = \{a, b\}$ be a binary alphabet. Consider the subclass of erasing equal-length relational pattern languages $\varepsilon L_{\mathrm{len}}(p)$ generated by patterns $p \in (\Sigma \cup X)^+$ whose terminal word $s(p)$ does not contain $aa$ or $bb$ as a substring. Is this class learnable in the limit from positive data?

Posed in arXiv:2610.39156, Sec. 3, before Cor. 12 — Learning Erasing Equal-Length Relational Pattern Languages in the Limit from Positive Data over Binary Alphabets

What is known

The paper's non-learnability proof for binary alphabets crucially uses two adjacent equal terminal letters (such as 'aa') to allow terminal shifting. Mousawi and Zilles (2025) proved telltales exist for a large class of patterns avoiding such configurations, leaving the exact boundary open.

OP-777 Optimal matrix order for single-query noncommutative ABP hitting pointsNot in LeanAlgebraic & Lattice-Based Complexity

For a fixed alphabet size m >= 2 and vertex bound S >= 1, what is the optimal matrix order R(m, S) of a single fixed query tuple T_1, ..., T_m in M_{R(m,S)}(Q) that hits every nonzero polynomial computed by an S-vertex noncommutative algebraic branching program over Q? In particular, does there exist a family of hitting tuples with order R(m, S) = O(S) as S -> infty?

Proposed here, building on arXiv:2610.37677, Sec. C, after Prop. C.2 — Explicit matrix hitting points for noncommutative algebraic branching programs; the paper does not ask it

What is known

Proposition C.2 proves that any fixed matrix tuple hitting every S-vertex affine ncABP over the coefficient field must have order at least S. On the other hand, the paper's rectangular construction (Corollary 1.2) achieves order R = O(m^{3/2} S^2), which is quadratic in S for fixed m. The paper notes in Section C that the lower bound R >= S does not match the quadratic dependence of the upper bound and entails no optimality claim. It is open whether the true minimum order R(m, S) is linear in S or requires Omega(S^2).

OP-778 Non-collinear triple bound for 2-connected graphs of diameter at least 4 on 8 to 30 verticesNot in LeanGraph Theory & Graph Algorithms

Let $n$ be an integer such that $8 \le n \le 30$. Does every 2-connected simple graph $G$ on $n$ vertices with diameter at least 4 satisfy $\mathrm{noncol}(G) \ge 2(n-4)$, where $\mathrm{noncol}(G)$ is the number of unordered triples of pairwise distinct vertices $\{x, y, z\}$ such that no vertex lies on a shortest path between the other two?

Posed in arXiv:2610.39966, Problem 17 (a) — On the maximum interval index of a graph

OP-779 Uniqueness of the dumbbell graph maximizing interval index for n at least 9Not in LeanGraph Theory & Graph Algorithms

For an integer $n \ge 9$, let $D_n$ denote the dumbbell graph on $n$ vertices obtained by connecting two vertex-disjoint 4-cycles by a path of length $n-7$ (having $n-8$ internal vertices). For which values of $n \ge 9$ is $D_n$ the unique connected simple graph without pendant vertices (minimum degree at least 2) on $n$ vertices that maximizes the interval index $\mathrm{Int}(G) = \sum_{\{u,v\} \subset V(G)} (|I(u,v)| - 1)$?

Posed in arXiv:2610.39966, Problem 17 (b) — On the maximum interval index of a graph

OP-782 Maximum degree at most three for general e-positive treesNot in LeanCombinatorics for TCS

Let $T$ be a finite tree. If the chromatic symmetric function $X_T$ of $T$ is $e$-positive (that is, in the expansion $X_T = \sum_{\lambda \vdash |V(T)|} c_\lambda e_\lambda$ in the elementary symmetric function basis, every coefficient $c_\lambda$ is non-negative), does $T$ have maximum vertex degree at most three ($\Delta(T) \le 3$)?

Posed in arXiv:2610.39481, Conjecture 1.1 — $e$-Positive caterpillars have maximum degree at most three

What is known

Conjectured for all trees in 2020. The current paper settles this conjecture for the class of caterpillars, following earlier work settling it for spiders. The general conjecture for all trees remains open.

OP-784 Randomized competitive ratio for obligatory testing with non-uniform test timesNot in LeanOnline Algorithms

In single-machine online scheduling with obligatory testing to minimize total completion time $\sum_{j=1}^n C_j$, each of $n$ jobs has an initially known test time $t_j \ge 0$ and an unknown processing time $p_j \ge 0$ revealed only after its non-preemptive test of duration $t_j$ completes. The processing operation of duration $p_j$ can only be scheduled after the test completes, and operations cannot be preempted. What is the infimum of competitive ratios achievable by randomized online algorithms against an oblivious adversary for arbitrary (non-uniform) test times? Specifically, does there exist a randomized online algorithm achieving competitive ratio strictly less than the golden ratio $\varphi = (1 + \sqrt{5})/2 \approx 1.61803$ (the optimal deterministic index rule competitive ratio)?

Posed in arXiv:2610.40554, Sec. 5 — Exact Competitive Ratios of Index Rules for Scheduling with Obligatory Testing

OP-787 Subcube Minimality for Concave Distance-Weighted Sums on Hypercube SubsetsNot in LeanCombinatorics for TCS

Let $n$ be a positive integer and let $a_0, a_1, \dots, a_n$ be a sequence of non-negative real numbers that is non-decreasing ($a_0 \le a_1 \le \dots \le a_n$) and concave ($a_{i+1} - a_i \ge a_{i+2} - a_{i+1}$ for all $0 \le i \le n-2$). For any subset $\mathcal{F} \subseteq \{0,1\}^n$, define the weighted sum $W(\mathcal{F}) = \sum_{x \in \mathcal{F}} \sum_{y \in \mathcal{F}} a_{d_H(x,y)}$. For every $M \in \{2^{n-4}, 2^{n-3}, 2^{n-2}, 2^{n-1}\}$, does every subset $\mathcal{F} \subseteq \{0,1\}^n$ with $|\mathcal{F}| = M$ satisfy $W(\mathcal{F}) \ge W(\mathcal{C})$, where $\mathcal{C}$ is a subcube of size $M$?

Posed in arXiv:2610.40486, Question 3.2 — Average pairwise Hamming distance of a subset in a hypercube

What is known

Special cases include average Hamming distance (a_i = i) and edge isoperimetry (a_1 = -1 and all other a_j = 0). The paper asks whether concave non-decreasing weight sequences always preserve subcube optimality across the known optimal density levels {1/16, 1/8, 1/4, 1/2}.

OP-788 Universal Subcube Minimality for Infinite Distance-Weight SequencesNot in LeanCombinatorics for TCS

Characterize all infinite sequences of real constants $(a_i)_{i=0}^\infty$ such that for every positive integer $n$ and every integer $d \in \{0, 1, \dots, n\}$, every subset $\mathcal{F} \subseteq \{0,1\}^n$ of size $|\mathcal{F}| = 2^d$ satisfies $\sum_{x \in \mathcal{F}} \sum_{y \in \mathcal{F}} a_{d_H(x,y)} \ge \sum_{x \in \mathcal{C}} \sum_{y \in \mathcal{C}} a_{d_H(x,y)}$, where $\mathcal{C}$ is a $d$-dimensional subcube of $\{0,1\}^n$. In particular, is this class of sequences characterized by specific convexity/concavity or monotonicity conditions?

Posed in arXiv:2610.40486, Question 3.3 — Average pairwise Hamming distance of a subset in a hypercube

What is known

Subcubes minimize the edge boundary (corresponding to a_1 = -1, a_j = 0 otherwise), but fail to minimize average pairwise distance (a_i = i) for d = n - 5. Question 3.3 seeks an exact characterization of all distance-weight sequences for which subcubes are universally optimal across all dimensions and subcube sizes.

OP-791 Query complexity of finding the maximum of an unknown permutation under subset sum queriesNot in LeanGraph Theory & Graph Algorithms

Let n be a positive integer, and let π be an unknown permutation of {0, 1, ..., n - 1}. In each step, an algorithm queries a subset S ⊆ {0, 1, ..., n - 1} and receives the sum ∑_{i ∈ S} π(i). The algorithm must output the unique index i* such that π(i*) = n - 1. What is the minimum worst-case number of queries needed by a deterministic algorithm to find i*, and does there exist an algorithm requiring o(n) queries?

Posed in arXiv:2610.40521, Sec. 5, paragraph 1 — Directed Cut-Query Complexity of Finding a King

OP-792 Randomized directed cut-query complexity of finding a tournament kingNot in LeanGraph Theory & Graph Algorithms

Let T = (V, E) be an n-vertex tournament given by a directed cut oracle: for any S ⊆ V, the oracle returns c_T(S) = |{(u, v) ∈ S × (V \ S) : (u, v) ∈ E}|. A randomized algorithm makes adaptive cut queries and outputs a vertex v ∈ V such that, for every tournament T, v is a king in T with probability at least 2/3. Let R_{dc}(KING_n) denote the minimum worst-case number of queries made by such an algorithm. Is R_{dc}(KING_n) = o(n), or does R_{dc}(KING_n) = Ω(n)?

Posed in arXiv:2610.40521, Sec. 5, paragraph 2 — Directed Cut-Query Complexity of Finding a King

OP-795 strict latin shield extremizers are cyclicNot in LeanMatching & Market Design

For every n >= 4, let L be an n-by-n Latin square with symbols 0,...,n-1. Construct the strict Latin marriage market in which man i ranks woman j at rank L(i,j)+1 and woman j ranks man i at rank n-L(i,j), with rank 1 best. Let beta(L) be the maximum, over all perfect matchings, of the number of blocking pairs. Is beta(L) >= floor((n-1)^2/4), with equality if and only if, after independent permutations of men and women, L(i,j)=(i+j) mod n? The ranks themselves are fixed: arbitrary symbol relabeling is not an allowed equivalence.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers studying extremal instability in matching markets seek structural information beyond the Shield-Core minimax value. The proved KB node gives the cyclic construction's upper bound, and Ishida gives a matching attaining it; neither rules out other strict Latin minimizers or proves the lower bound for this class. The question asks for a full equality characterization within a natural infinite class whose rank levels are perfect matchings, adding rigidity to the larger Shield-Core problem rather than restating it. Latin profiles model complete opposition of the agents' rankings while still allowing many stable matchings. Evidence: Exhaustive enumeration up to row/column equivalence and all rank orders found 96 representatives for n=4 and 6720 for n=5: equality occurred exactly on cyclic profiles, with beta values respectively {2,3,4} and {4,5,6}. At n=6, 1500 additional noncyclic profiles all had beta >=7 versus the target 6; separate exhaustive rank-order tests on cyclic and S3 group tables found minima 6 and 8 respectively. All matchings were enumerated. The Latin-square normalization fixes the first row/column before applying every symbol permutation, so the coverage is up to row and column relabeling, not arbitrary rank relabeling.

OP-796 weighted obligatory test smith sort golden ratioNot in LeanOnline Algorithms

In single-machine scheduling with obligatory tests, every job j has known weight w_j>0 and test time t_j>=0; its processing time p_j>=0 is revealed upon completion of its test. All operations are nonpreemptive, processing follows testing, and there are no release dates. Consider the deterministic rule which, whenever the machine is free, selects a currently available test with priority t_j/w_j or a tested job's processing operation with priority p_j/w_j, choosing the lowest priority; break equal priorities by choosing a test first, then the smallest job index. Is its exact worst-case competitive ratio for sum_j w_j C_j equal to the golden ratio (1+sqrt(5))/2, compared with the offline optimum? The ratio is over all finite instances with positive offline cost.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The October 2026 obligatory-testing result proves the golden ratio for 1-SORT with unit weights; a separate 2026 paper studies weighted completion time in the harder optional-testing model. This question joins the two settings, giving a sharp guarantee for the natural weighted index rule used when job priorities differ. The unweighted sharp examples still supply a golden-ratio lower bound; the difficult part is a universal upper bound, because the unweighted instance-reduction shifts can change ratios t_j/w_j and p_j/w_j and weighted pairwise delays simultaneously. The weighted optional-testing bounds do not imply this exact value for this specific obligatory-testing rule. Evidence: An exhaustive rational grid for 2 and 3 jobs found maximum ratios 5/4 and 19/14. Random heterogeneous-weight structured cases with 10, 25, 80 and 200 jobs stayed below phi; the unit-weight long/short family gave ratios 1.5132, 1.5951, 1.6122 and 1.6169 at 10, 50, 200 and 1000 jobs, approaching the paper's sharp lower bound. The offline benchmark was independently computed by increasing (t_j+p_j)/w_j.

OP-800 tokareva obstruction family three mm bent sumNot in LeanFoundations of Cryptography

For every integer m>=4, let f_m on F_2^(2m) be the function (product_{i=1}^{m-2} x_i) times (x_{m-1}x_m+x_{m+1}x_{m+2}+x_{m+3}x_{m+4}), with all remaining variables absent. Can f_m be written as b_1+b_2+b_3, where each b_i is a Maiorana-McFarland bent function, allowing a different partition of the 2m coordinate variables for each i? Precisely, b_i(x,y)=x dot pi_i(y)+g_i(y), with x,y in F_2^m after permuting coordinates, pi_i a permutation of F_2^m, and g_i an arbitrary Boolean function.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The dropped OP-515 asked only for one eight-variable witness; the Referee said a general structural decomposition would be needed for significance. Feng et al. prove that every member of this infinite family is not a sum of two bent functions, but their lower-bound argument does not provide a three-term construction. The proposed structural upper bound would pinpoint the gap left by their counterexample uniformly in every even dimension and give explicit cryptographic building blocks, using a standard, readily checkable bent class. Different variable partitions matter: one fixed Maiorana-McFarland split cannot express the quartic in the computations. The paper's two-term impossibility does not supply an odd-length induction or the necessary permutations. Evidence: CP-SAT found three explicit Maiorana-McFarland functions for m=4 and m=5 with different coordinate partitions. Independent code exhaustively compared all 256 and 1024 truth-table values and verified that their Walsh magnitudes are respectively 16 and 32. Two different 12-variable searches timed out without finding a witness, so there is presently no evidence of failure or success beyond m=5. A separate four-bent decomposition was found for m=4.

OP-803 reset clock diophantine quantum error exponentNot in LeanQuantum Mechanics

Let p be in (0,1), q=1-p and alpha real. An unobserved reset age M has distribution Pr(M=m)=p q^m, m=0,1,... . Conditioned on M=m, L independently prepared qubits are in the pure state |phi_m>^tensor L, where |phi_m>=cos(pi m alpha)|0>-i sin(pi m alpha)|1>. Let e_L be the minimum probability of incorrectly identifying the exact integer M, optimized over all quantum measurements with countably many outcomes. Is the following arithmetic classification correct? (1) If alpha=a/b in lowest terms, e_L tends to q^b, and e_L-q^b is exponentially small in L (interpreting it as identically zero when b=1). (2) If alpha is badly approximable, meaning there exists c>0 with distance(k alpha,Z)>=c/k for every positive integer k, there exist positive constants c_1,c_2 depending on p and alpha such that exp(-c_2 L^(1/3)) <= e_L <= exp(-c_1 L^(1/3)) for all sufficiently large L.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

A reset register can serve as a clock only if its unrecorded age can be inferred reliably. This asks for the optimal operational error over all collective measurements, not the Holevo/Jensen entropy considered in the cited work. It predicts a sharp change from an irreducible aliasing floor for rational phase increments to a stretched-exponential decay for an infinite arithmetic class of irrational increments; for a finite ensemble of distinct states one ordinarily expects an exponential error rate. This is a bridge between quantum hypothesis testing and Diophantine recurrence and applies for every prior p and every badly approximable alpha, not a finite-system example. Evidence: For geometric reset probability p=0.1 and two badly approximable rotations (golden ratio conjugate and sqrt(2)-1), exact two-hypothesis Helstrom lower bounds and pretty-good-measurement upper bounds on the countable problem, truncated with an explicit 1.9e-14 prior-tail allowance, both decrease consistently with stretched exponential scaling for L=4 to 16384. At L=4096 the golden-ratio bounds are 2.10e-5 <= e_L <= 4.78e-4. Rational rotations 3/7, 5/13 and 8/21 approach their predicted q^b error floors; a rotation within 1.5e-7 of 17/29 retains a visible near-alias at a million qubits.

OP-804 golden reset clock overlap log periodic profileNot in LeanQuantum Mechanics

Let phi=(1+sqrt(5))/2, alpha=1/phi, and 0<q<1. For each integer L>=1 define F_L=sum_{k>=1} q^k cos(pi k alpha)^(2L). For every t>0, put L_n=floor(t phi^(3n)) and lambda=-log q. Is it true that lim_{n->infinity}[-log(F_{L_n})/L_n^(1/3)] equals t^(-1/3) min_{r in Z}[lambda phi^r/sqrt(5)+pi^2 t phi^(-2r)]? In particular, does the normalized logarithmic overlap have this nonconstant log-periodic family of subsequential limits, rather than an ordinary limit?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This is a sharper, measurement-free question prompted by the Referee's tractability critique of OP-803. For L identical qubits whose phase advances by pi alpha per discrete time step, cos(pi k alpha)^(2L) is the fidelity between two states k steps apart; F_L is the geometrically age-weighted return fidelity. The question predicts its exact entire continuum of scaling limits and discrete scale invariance, not just a qualitative stretched-exponential bound. It connects quantum reset-clock recurrence to Diophantine self-similarity in classical dynamical systems, and its statement uses real infinite sums and elementary functions rather than POVMs or quantum tensor formalization. Evidence: Direct log-sum-exp computations use every k up to a cutoff 32 phi^n, for four priors q=.5,.8,.9,.99 and five phase parameters t=.5,1,1.5,2,3; the normalized values at n=11,14,17 converge to the proposed q,t-dependent function. For q=.9, t=1 and 1.5 they approach distinct values .5330428 and .5574196; dominant k are successive Fibonacci denominators. At n=20 floating point limits accuracy to about 1e-6, so the n<=17 checks are the stronger numerical evidence.

OP-807 oceanic banzhaf moderate deviation crossoverNot in LeanGeneral Equilibrium & Cooperative Games

Fix positive large-player weights w_1,...,w_l with l>=2, alpha=1-sum_i w_i>0, and voting propensity p in (0,1). Let s_* be a subset sum of the large weights strictly between 0 and sum_i w_i, q_0=alpha p+s_*, and sigma=alpha sqrt(p(1-p)). For sign epsilon in {-1,+1} and real x, let the quota in the n-ocean-player game be q_n=q_0+epsilon sigma sqrt(log(n)/n)+x/sqrt(n log(n)); every ocean player has weight alpha/n, every voter independently votes yes with probability p, and winning requires total weight strictly greater than q_n. Write beta_i(n) for normalized propensity Banzhaf power. For each large player i, with S a random yes-coalition of the other large players, let B_i^+ = Pr(q_0-w_i < alpha p+sum_{j in S}w_j <= q_0) and B_i^- = Pr(q_0-w_i <= alpha p+sum_{j in S}w_j < q_0). Let A=Pr(sum_{j in S_all}w_j=s_*)/sqrt(2 pi p(1-p)), where S_all is the random yes-coalition of all large players, allowing multiple subsets with the same sum. Is it true for every such instance, epsilon and x that beta_i(n) tends to B_i^epsilon/[sum_j B_j^epsilon+A exp(-epsilon x/sigma)], and the total normalized power of the n ocean players tends to A exp(-epsilon x/sigma)/[sum_j B_j^epsilon+A exp(-epsilon x/sigma)]?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Voting-power researchers need to know how narrow a quota perturbation must be before the oceanic pitfall ceases to give most power to small voters. Theorem 4.5 of de Raaij et al. gives limits for a fixed quota, including zero large-player power at pitfall points, but does not treat a quota that approaches a pitfall with the electorate size. The proposed theorem identifies a new sqrt(log n/n) transition and its full nontrivial finite-size scaling law, including unequal large players, both sides of the pitfall, biased independent voting, and coincident subset sums. It is not a fixed-quota corollary: the small-player mass and constant-order large-player mass compete on this moving moderate-deviation scale. Evidence: Direct binomial-tail calculations at n=10^4,10^6,10^8 and 10^10 test both signs and three x values for five games with two to four large players, including repeated weights, coincident subset sums, and p=.2,.3,.5,.7,.8; results approach the predicted large-player and ocean shares. For w=(.2,.3), p=.5, epsilon=+1, x=0, the ocean share is .168255, .166257, .166318 at n=10^4,10^6,10^8 versus limit .166299. Independent direct enumeration of all coalitions for n=4,8,12 agrees with the binomial computation to 6e-17.

OP-811 random roommates minimum blocking pairs sqrt exponentNot in LeanMatching & Market Design

Let n range over even integers. Each of n agents independently ranks the other n-1 agents uniformly at random. Let B_n be the minimum, over perfect matchings, of the number of unordered pairs whose members both prefer each other to their assigned partners. Is it true that for every epsilon>0, Pr[B_n <= n^(1/2+epsilon)] tends to 1 as n tends to infinity?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Random matching-market researchers need to know how close to stability a full allocation can get when exact stability typically fails. Pittel's stable-partition argument gives a high-probability n^(3/4+o(1)) upper bound, while Chin and Michelen show B_n>0 with high probability. A square-root exponent would bridge this wide gap and requires new control on blockers introduced while resolving odd stable cycles; neither exact-solvability result nor the old upper bound gives it. Evidence: Experiment 11742 solves random instances via CP-SAT for 12 seeds per n=8,12,16,20,24,30,36: every proven optimum is 0 or 1; one n=36 run returned only a feasible value of 7 with lower bound 0. These tiny instances do not establish an asymptotic rate.

OP-815 sparse retained line metric mst apery constantNot in LeanAlgorithm Design & Analysis

For n>=2 put metric d(i,j)=|i-j| on {1,...,n}. Retain each edge of the complete graph independently with probability q in (0,1), give retained edge {i,j} weight |i-j|, and let W_(n,q) be the total weight of its minimum spanning forest (equal to the MST weight when connected). Does there exist a finite limit w(q)=lim_(n->infinity) E[W_(n,q)]/n for each q>0, and does lim_(q down to 0) q w(q)=zeta(3)/2?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This bridges the uncorrupted-edge spanning trees used in the recent semi-random metric-corruption algorithms with the mean-field zeta(3) theorem for random spanning trees. It asks for a sharp universal constant, not merely the O_q(1) estimate available when q is fixed: the edge weights here are deterministic geometric distances, not independent continuous weights, and the underlying percolated graph is spatial. The sparse-retention limit should be locally Poisson with edge-intensity two, but obtaining expected total weight also requires nontrivial uniform control of long edges and boundary effects; the standard local-weak MST theorem alone does not give convergence of means. Evidence: Experiment 11768 simulates eight independent edge-retention graphs per q on lines of 2,000 and 8,000 vertices. Experiment 11769 uses five seeds per q at n=20,000 and 80,000: for n=80,000, qE[W]/n is approximately .60815, .60531, and .60584 at q=.01,.005,.0025, while zeta(3)/2 is .601028. These are Monte Carlo finite-size estimates, not a proof of the limits.

OP-816 optimal full support clifford shadow single site rigidityNot in LeanQuantum Computation

For k>=2 let U be any k-qubit Clifford unitary. Ignoring Pauli phases, write wt(P) for the number of nonidentity factors and define S_full(U)=sum_{P in {X,Y,Z}^tensor k} 3^(k-wt(UPU^dagger)). Let s_k=(3*5^k+3^k-6)/4 for odd k and s_k=(3*5^k-3^k+2)/4 for even k, the known maximum of S_full. For every i, let S_i(U)=sum_{P in {X_i,Y_i,Z_i}} 3^(k-wt(UPU^dagger)). If S_full(U)=s_k, must S_i(U)=3 for every i when k is odd, and S_i(U)=5 for every i when k is even? Equivalently, does full-support optimality force all three single-site Pauli images to have full support in odd blocks, and force exactly one of the three to have weight k-1 and the other two weight k in even blocks?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The 2026 classical-shadow theorem finds the best full-support estimator and gives one optimal Clifford, but does not classify all optimizers. It notes that its construction has very poor partial-support performance. This asks whether that cost is unavoidable for every full-support optimal Clifford: in the paper's two-sided locally randomized architecture the single-site squared shadow norm would be exactly 3^(k+1)/3 for odd k and 3^(k+1)/5 for even k, for every site. Such a rigidity theorem would settle a physically relevant no-free-lunch tradeoff and guide experiments estimating both local and many-body observables. The existing trace sum rule controls only an average over all nonidentity Paulis and does not yield the stated per-site equalities. Evidence: Experiment 11787 exhausts all 720 two-qubit symplectic Clifford actions: all 648 maximizers have per-site scores (5,5). Experiment 11793 exhausts all 1,451,520 elements of Sp(6,2): all 15,552 maximizers have (3,3,3). Experiment 11788 samples 100,000 distinct four-qubit actions and finds all 227 maximizers have (5,5,5,5). Experiment 11791 performs random walks restricted to the exact optimal plateau through k=7; every sampled maximizer has the predicted per-site vector.

OP-817 density one eighth hamming subcube linear stabilityNot in LeanCombinatorics for TCS

For every n >= 3 and F subset {0,1}^n with |F|=2^(n-3), write D(F)=E[d_H(X,Y)] for independent uniform X,Y in F, epsilon(F)=D(F)-(n-3)/2, and delta(F)=min_C |F\C|/|F|, where C ranges over all codimension-three axis-parallel subcubes. Is there a finite absolute constant C_* such that delta(F) <= C_* epsilon(F) for every n and F? If so, what is the least such constant, or which families asymptotically attain it?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Fang and Huang's theorem determines the exact minimizers at density 1/8 but does not quantify how close a near-minimizing code must be to a subcube uniformly in n. A linear stability theorem would turn that exact extremal result into structural information useful in Boolean Fourier analysis and near-optimal code design. This is separate from their explicitly stated density-1/16 and weighted-distance questions. Their proof normalizes the level-one Fourier coefficients under a hypothesis placing their squared norm at or above the extremal value; below equality that normalization no longer gives the coefficient bound required by their Rademacher lemma. Quantifying near equality needs a new robust argument. Computing exposes genuinely competing diffuse Hamming-ball families, so simply using a dimension-dependent compactness argument or assuming a small stability constant does not settle the problem. Evidence: Experiment 11813 exhausts all density-1/8 families for n=4,5. Experiment 11807 uses symmetry-reduced exact CP-SAT optimization for distance thresholds in dimensions 5–7; n=6 has delta=3/8 with epsilon=1/8. Experiment 11809 finds a certified optimum at n=8 with delta=1/2 and epsilon=33/256, so C_* must be at least 128/33 in those computations. Experiment 11808 samples weighted Hamming halfspaces up to n=12. Experiment 11810 evaluates binomial random-shell models whose expected coordinate and face counts approach a formal Gaussian ratio about 6.077; this model is only suggestive because uniform concentration and finite-sample second moments were not established.

OP-818 random permutation inflections gaussian poisson joint limitNot in LeanCombinatorics for TCS

Let pi be uniformly random in S_n and put D_i=pi(i+1)+pi(i-1)-2pi(i), 2<=i<=n-1. Let Z_n be the number of zero D_i and let C_n be the number of sign changes in the sequence obtained by deleting those zeros (equivalently, the size of the paper's inflection set). Let U_i be independent uniform [0,1] variables and h(x1,x2,x3,x4)=1 when (x1+x3-2x2)(x2+x4-2x3)<0 and 0 otherwise. Put mu=13/18; H_j=h(U_j,U_{j+1},U_{j+2},U_{j+3}); q(t)=sum_{j=1}^4(E[h(U_1,U_2,U_3,U_4)|U_j=t]-mu); and sigma^2=Var(H_1)+2 sum_{k=1}^3 Cov(H_1,H_{1+k})-integral_0^1 q(t)^2 dt. Is sigma^2>0 and does ((C_n-mu*n)/sqrt(n), Z_n) converge jointly to an independent pair consisting of N(0,sigma^2) and Poisson(1/2)?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The recent paper introduces the full inflection set but studies the extreme cases of zero, one, and the maximum possible number of inflections; its stated counting problem OP-685 concerns the exponentially rare maximum, not the typical distribution. A joint limit would quantify the generic geometry of random permutation graphs and the role of arithmetic-progression zero curvatures, and would connect consecutive value-sensitive permutation statistics to sampling-without-replacement central limit and Poisson theory. The usual consecutive-pattern CLT does not apply directly: the sign depends on actual magnitudes rather than relative order, and disjoint windows retain weak global dependence. The explicitly subtracted projection is the finite-population correction; a vanishing number of arithmetic ties can still contribute Poisson fluctuations. Evidence: Experiment 12077 samples the actual inflection-set statistic and zero count: for n=1000, 12000 trials give variance(C_n)/n=0.15110, mean(Z_n)=0.4945, frequencies for 0,1,2 zeros 0.61175,0.29808,0.07533, and correlation -0.0284. Independent conditional integration in experiment 12076 estimates sigma^2 near 0.15096 and the finite-population correction near 0.00075936; experiment 12062 samples adjacent sign changes and estimates mean/n approaching 13/18. These are numerical indications, not a proof.

OP-820 dephased tree graph state mmi iff branchingNot in LeanQuantum Mechanics

For a finite nonempty tree T=(V,E), let |T>=(product of CZ gates on E)|+>^tensor V and let rho_p be obtained by independently applying Z to each qubit with probability p, with 0<p<1/2. For disjoint subsets A,B,C of V, let I3(A:B:C)=S(A)+S(B)+S(C)-S(AB)-S(AC)-S(BC)+S(ABC), with base-two von Neumann entropies of reduced states, and let M_p(T) be the maximum over all such triples, allowing empty regions. Is M_p(T)=0 exactly when the maximum degree of T is at most two? More strongly, does every tree with a vertex of degree at least three satisfy M_p(T)>=1-h_2(2p(1-p)), where h_2(t)=-t log_2 t-(1-t)log_2(1-t)?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks whether the tree-graph obstruction to holographic monogamy survives arbitrary independent local phase noise, with a size-independent quantitative witness. Fuentes et al. analyze pure graph states, and OP-794 conjectures a pure-state maximum in terms of disjoint claws. Their binary cut-rank formula uses purity and does not give the mixed-state entropies after dephasing. Indeed the weighted-star-packing equality suggested by the pure-state problem fails already at nine vertices, so this is not a routine replacement of ranks by noisy star weights. A noise-robust exact characterization would connect the structure of experimentally prepared tree graph states with detectable multipartite correlations across arbitrary sizes. Evidence: Experiment 12069 enumerates all trees through 8 vertices at p=0.05, 0.15, 0.3, and 0.45: maximum I3 is zero precisely for the path, and for every branched tree is at least the four-star value 1-h_2(2p(1-p)). Experiment 12074 checks all trees through 10 vertices at p=0.03, 0.2 and 0.4; the path has zero maximum, and the weighted-star packing is positive on every branched tree, with any observed packing-equality failures increasing the maximum. Experiment 12072 independently checks every reduced entropy for every tree through 6 vertices using direct density matrices, with maximum error 2.7e-15. Experiment 12068 used an invalid pure-state identity for a mixed state and is excluded.

OP-821 nearest neighbor ising odd field zeros logit cauchyNot in LeanStatistical Mechanics & Thermodynamics

For odd n>=3 define the polynomial Q_n(y)=sum_{j=1}^n (-1)^j ((1/2)_j/(2j)) S(n,j)(1-y)^j, where S(n,j) is a Stirling number of the second kind and (1/2)_j is a rising factorial. Are all n roots of Q_n simple and in [0,1], including the roots 0 and 1? If r_{n,1},...,r_{n,n} are the roots, does their empirical distribution converge as n tends to infinity through odd integers to the law with density f(y)=1/[y(1-y)(pi^2+log(y/(1-y))^2)] for 0<y<1? Equivalently, is the limiting root the logistic transform of a centered Cauchy random variable of scale pi?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Rajabpour's recent work and OP-806 study field-polynomial roots for a long-range inverse-square Ising chain. The nearest-neighbor chain has an exact transfer matrix but its comparable field coefficients exhibit a different parity phenomenon: at even order four roots already become nonreal, while odd orders display striking all-real zeros. These Q_n are nonzero scalar multiples of the K^n coefficient of log((exp(K)+sqrt(y exp(2K)+(1-y)exp(-2K)))/2), the reduced infinite-chain free energy at y=tanh(h)^2. A proof would identify an explicit limiting zero law for a whole family of high-temperature coefficients, explaining field sensitivity at high orders and supplying a solvable comparison for the long-range question. The usual Lee-Yang theorem concerns zeros of partition functions in field, not zeros of fixed coupling-series coefficients, so it does not directly yield this claim. Evidence: Exact PARI Sturm counts and squarefreeness in experiment 12085 confirm every odd order 3 through 51, with exactly n-2 zeros strictly between 0 and 1; direct transfer-series expansion in experiment 12082 independently verifies orders through 15 and shows the even-order failure. Newton-sum computations in experiment 12089 give the first six empirical moments at n=501 as approximately 0.4995005, 0.4162507, 0.3746258, 0.3482633, 0.3295321 and 0.3152772, approaching the proposed law's 0.5, 5/12, 3/8, 251/720, 95/288 and 19087/60480 computed independently in experiment 12091. Experiment 12090 also checks root quantiles through degree 61. This is numerical and finite-order evidence, not a proof.

OP-823 dephased path mmi bernstein certificateNot in LeanQuantum Mechanics

For n>=1 let P_n be the path on {0,...,n-1}. For each subset S construct an auxiliary graph with vertex set S: for each x outside S having two neighbors u,v in S add the edge uv; mark the vertex u whenever some x outside S has u as its unique neighbor in S. Call an auxiliary connected component free if it contains no marked vertex, and let N_S(j) be the number of free components of cardinality j. For disjoint A,B,C subsets of {0,...,n-1}, put a_j=N_A(j)+N_B(j)+N_C(j)-N_{A union B}(j)-N_{A union C}(j)-N_{B union C}(j)+N_{A union B union C}(j). Let d be the largest j with a_j nonzero, or d=0 if all a_j vanish. Is it true that for every k in {0,...,d}, sum_{j=1}^k a_j*binom(d-j,k-j)>=0?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This is a finite, integer-only strengthening of the path case of the previously listed dephasing question OP-820, designed to address its referee objection that density matrices, partial traces and von Neumann entropy are unavailable in the formalization. Define Q(t)=sum_j a_j t^j. The requested inequalities say that (1+x)^d Q(x/(1+x)) has nonnegative coefficients, a certificate for Q(t)>=0 on [0,1]. For a path graph state with identical independent Z-dephasing, the stabilizer-kernel equations identify each free component with an independent parity bit; the resulting entropy expansion expresses minus the tripartite information as a positive weighted sum of Q(q^{2k}), q=1-2p. Thus the finite polynomial statement would imply monogamy for all path lengths and all uniform noise strengths, without encoding quantum states in the target statement. It is stronger than numerical entropy positivity and may admit a combinatorial injection or local cancellation proof. Nonuniform dephasing can violate monogamy even on a four-vertex path, so the common-parameter feature is substantive. Evidence: Experiment 12118 checks the exact integer Bernstein coefficients for all 175275 four-region partitions of the ten-vertex path and every shorter path; no negative coefficient occurs, including polynomials that have negative monomial coefficients. Experiment 12120 checks 10000 random four-colorings each at n=15,30,60,100,200, with no violation. Experiment 12115 compares the component entropy computation against the full stabilizer calculation for every subset through n=9, and experiment 12072 independently compares the latter against direct density-matrix partial traces through n=6. These computations do not prove the inequality.

OP-824 nearest neighbor ising odd eulerian root interlacingNot in LeanStatistical Mechanics & Thermodynamics

For every odd n>=3 let S(n,j) be a Stirling number of the second kind, let (1/2)_j be a rising factorial, and define Q_n(y)=sum_{j=1}^n (-1)^j ((1/2)_j/(2j)) S(n,j)(1-y)^j and E_n(y)=sum_{j=1}^n (-1)^j (j-1)! S(n,j)(1-y)^j. Are all roots of Q_n and E_n simple and contained in [0,1], with ordered roots q_0=e_0=0, q_{n-1}=e_{n-1}=1, and q_i<e_i<q_{i+1} for every 1<=i<=n-2?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This strengthens and revises OP-821 to address its referee's concern about weak-convergence formalization. Q_n is, up to a nonzero order-dependent scalar, the odd coupling coefficient of the nearest-neighbor Ising-chain free energy. E_n is an Eulerian polynomial under a fractional-linear change of variable, and its real-rootedness is classical. The precise cross-family interlacing is a finite polynomial statement: if true it both proves the Q_n root claim and transfers the already-known Eulerian limiting root law to Q_n, with empirical distribution functions differing by at most O(1/n). Melotti's theorem therefore supplies a baseline absent from the earlier pitch, but does not by itself give interlacing with the different Ising polynomials. The assertion is genuinely parity-sensitive: Q_4 has nonreal roots. It connects a statistical-mechanics expansion with Eulerian real-root geometry and avoids requiring probability-measure convergence in the target statement. Evidence: Experiment 12132 numerically isolates all roots with 800-bit working precision and finds the stated strict alternating order for every odd n from 3 to 101. Experiment 12085 independently gives exact PARI Sturm and squarefreeness counts for Q_n through n=51. The first attempt at degree 65 used default 19-digit root output and produced spurious endpoint ties; experiment 12130 identified the precision issue and the rerun corrected it. The data do not prove interlacing.

OP-829 Seymour's conjecture on openly disjoint cycles for degree 4 and 5Not in LeanGraph Theory & Graph Algorithms

Let $r \in \{4, 5\}$. Does every finite simple $r$-regular directed graph $D$ satisfy $c(D) = r$, where $c(D)$ is the maximum number of openly disjoint directed cycles containing a common vertex?

Posed in arXiv:2610.41372, Sec. 4 — New results on openly disjoint cycles in regular digraphs

OP-830 Optimal Competitive Ratio for Online Budgeted AllocationNot in LeanOnline Algorithms

In the online budgeted allocation problem, there are $N$ advertisers with offline budgets $B_j \ge 0$ ($j \in \{1,\dots,N\}$). Items $i = 1, \dots, M$ arrive sequentially online; upon arrival of item $i$, each advertiser $j$ reveals a bid $b_{ij} \ge 0$. An online algorithm must irrevocably assign item $i$ to an advertiser $j$, earning $\min(b_{ij}, R_j)$, where $R_j$ is the remaining budget of advertiser $j$ (initialized to $B_j$), and updating $R_j \gets R_j - \min(b_{ij}, R_j)$. The competitive ratio is $\inf_{\sigma} \mathbb{E}[\ALG(\sigma)] / \OPT(\sigma)$. What is the supremum of the competitive ratio achievable by randomized online algorithms for online budgeted allocation? In particular, what is the exact constant in $[0.504, 1 - 1/e - \varepsilon]$?

Posed in arXiv:2610.41136, Section 1, paragraph after eq. (1-1/e) — The Competitive Ratio of Online Budgeted Allocation is Strictly Smaller than $1-1/e$

What is known

The paper refutes the 1 - 1/e conjecture by showing an upper bound of 1 - 1/e - ε for an absolute constant ε > 0, while the best known lower bound (algorithmic guarantee) is 0.504. Determining the exact supremum of the competitive ratio remains open.

OP-833 Competitive ratio of median paging algorithm under fresh age-zero initializationNot in LeanOnline Algorithms

In the independent inter-arrival paging model where requests for each page v are generated by independent renewal processes with known gap distributions X_v, suppose all pages start with age 0 at global time t = 0 (fresh age-zero initialization). Is the competitive ratio of the deterministic median eviction algorithm against OPT strictly less than 4, or is it equal to 4?

Posed in arXiv:2610.40824, Section 2, after paragraph on independent inter-arrival sources — Tight Lower Bounds for Distributional Paging

OP-834 Classification of tight instances for the Lonely Runner ConjectureNot in LeanElementary Number Theory

Let $n \\ge 5$ be an integer. A finite set $V \\subset \\mathbb{Z}_{>0}$ of $n$ distinct positive integers is called primitive if $\\gcd(V) = 1$, and tight for the Lonely Runner problem if $\\mathrm{ML}(V) = \\max_{t \\in \\mathbb{R}} \\min_{v \\in V} \\|v t\\| = \\frac{1}{n+1}$, where $\\|x\\| = \\min_{k \\in \\mathbb{Z}} |x - k|$. Can all primitive tight sets $V$ of size $n$ be completely classified for each $n \\ge 5$?

Posed in arXiv:2610.40694, Sec. 1, after Corollary 1.3 — Four runners that are barely lonely

What is known

The paper proves the complete classification of tight instances for n = 4 (recovering Chen's theorem that only {1,2,3,4} and {1,3,4,7} occur) and notes that classifying tight instances for general n >= 5 remains open.

OP-835 Equality of two-dimensional subtorus spectrum in dimension four with three-runner spectrumNot in LeanElementary Number Theory

Let $\\mathcal{S}_2(4)$ denote the set of loneliness values $\\operatorname{ML}(U) = \\max_{x \\in U} \\min_{1 \\le i \\le 4} \\|x_i\\|$ over all coordinate-free two-dimensional subtori $U$ of $\\mathbb{T}^4 = (\\mathbb{R}/\\mathbb{Z})^4$, and let $\\mathcal{S}(3) = \\{\\operatorname{ML}(v_1, v_2, v_3) : v_1, v_2, v_3 \\in \\mathbb{Z}_{>0}\\}$ be the spectrum of three-runner loneliness values. Is $\\mathcal{S}_2(4) = \\mathcal{S}(3)$? That is, does every coordinate-free two-dimensional subtorus of $\\mathbb{T}^4$ have loneliness equal to that of some three-runner speed set, particularly in the range $(2/5, 1/2)$?

Posed in arXiv:2610.40694, Remark 9.16 — Four runners that are barely lonely

What is known

The paper proves that the loneliness spectrum of coordinate-free two-dimensional subtori of $\\mathbb{T}^4$ below $2/5$ coincides with the three-runner spectrum $\\mathcal{S}(3) \\cap (0, 2/5]$, confirming the Giri-Kravitz conjecture up to $2/5$. But for the remaining range $(2/5, 1/2)$, Remark 9.16 and Section 10 demonstrate that slicing obstructions of unbounded order occur, leaving the full equality $\\mathcal{S}_2(4) = \\mathcal{S}(3)$ open.

OP-839 Quantum representability of almost-quantum box p-star for 14 to 17 inputsNot in LeanQuantum Computation

For each integer $N \ge 2$, consider the bipartite nonsignalling correlation box $\bm{p}^\star$ with binary inputs $x, y \in \{1, \dots, N\}$ and binary outputs $a, b \in \{0, 1\}$, whose joint probabilities are $p(0, 0 \mid x, x) = 1/17$, $p(0, 1 \mid x, x) = p(1, 0 \mid x, x) = 2/17$, $p(1, 1 \mid x, x) = 12/17$ on diagonal inputs $x = y$, and $p(0, 0 \mid x, y) = 0$, $p(0, 1 \mid x, y) = p(1, 0 \mid x, y) = 3/17$, $p(1, 1 \mid x, y) = 11/17$ on off-diagonal inputs $x \ne y$. While $\bm{p}^\star$ is local for $N \le 13$ and outside the commuting-operator set $\mathrm{C}_{\mathrm{qc}}$ for $N \ge 18$, does $\bm{p}^\star$ belong to the quantum correlation set $\mathrm{C}_{\mathrm{q}}$ (or $\mathrm{C}_{\mathrm{qc}}$) for any $N \in \{14, 15, 16, 17\}$?

Posed in arXiv:2610.41448, Sec. 6, after Proposition 1 — An Unbounded Separation of Almost-Quantum and Commuting-Operator Correlations in Zero-Error Communication

OP-841 Closing the Constant Gap for Explicit Density Bounds of Complete Graph MinorsNot in LeanGraph Theory & Graph Algorithms

Let $c(K_t)$ denote the infimum over all real numbers $c > 0$ such that every finite simple graph $G$ with density $d(G) = |E(G)|/|V(G)| \ge c$ has a complete minor $K_t$. While asymptotically $c(K_t) = (\alpha + o(1)) t \sqrt{\log t}$ with $\alpha \approx 0.3190863$, and this paper establishes $c(K_t) \le 4.5 t \sqrt{\log t}$ for every integer $t \ge 2$, can the constant 4.5 be reduced to 1? Specifically, does every finite simple graph $G$ with density $d(G) \ge t \sqrt{\log t}$ contain a $K_t$ minor for every integer $t \ge 2$?

Posed in arXiv:2610.41060, Sec. 1, Introduction, line 89 — An explicit bound on the extremal function for complete graph minors

What is known

The paper establishes c(K_t) <= 4.5 t sqrt(log t) for all t >= 2, closing the gap from the previous explicit constant of 30, but leaving a significant gap to the asymptotic constant alpha = 0.3190863... proved by Thomason.

OP-846 Explicit threshold of validity for extremal induced pentagon count polynomialsNot in LeanGraph Theory & Graph Algorithms

Let $\rho(C_5, m)$ denote the maximum number of induced pentagons in a simple graph with $m$ edges. For each fixed integer offset $j \in \mathbb{Z}$, the extremal count at $m = 40k^2 + j$ is known to be eventually an integer-coefficient polynomial in $k$ of degree 5, of the form $\rho(C_5, 40k^2+j) = 192k^5 + (12j - \Lambda(j))k^3 + a_j k^2 + b_j k + c_j$ for all integers $k \ge k_0(j)$, where $\Lambda(j), a_j, b_j, c_j$ are computable integers. Determine an explicit, computable upper bound for the threshold of validity $k_0(j)$ as a function of $j$, or determine the exact minimal threshold $k_0(j)$ for specific small offsets such as $j \in \{-2, -1, 1, 2\}$.

Posed in arXiv:2610.40691, Theorem 14.1 — Sharp bounds, stability, and arithmetic fluctuations for induced pentagons

What is known

The paper determines the eventual integer-coefficient polynomial for every fixed offset $j$ from $40k^2$ via a finite enumeration of presentations, but its proof relies on qualitative compactness in strong stability and explicitly notes that it does not provide an explicit threshold of validity or algorithm for $k_0(j)$.

OP-848 Asymptotic Order of the General Deck Reconstruction ThresholdNot in LeanCombinatorics for TCS

For each integer n ≥ 1, let r(n) denote the minimum integer k ≥ 1 such that every binary word of length n is uniquely determined by its k-deck (the multiset of all its length-k subsequences counted with multiplicity). Is r(n) bounded by n^{o(1)} as n → ∞, or does there exist ε > 0 such that r(n) = Ω(n^ε)?

Posed in arXiv:2610.41110, Sec. 5 — Deck Reconstruction for Restricted Word Classes

What is known

The gap between exp(Ω(√(log n))) and O(√n) has stood open since 1997/2003 and is the central open problem in sequence deck reconstruction.

OP-849 Sublinear Deck Reconstruction Threshold for Words with Fixed Number of OnesNot in LeanCombinatorics for TCS

Let W_s denote the set of all non-empty binary words containing exactly s ones. Let r(W_s) be the deck reconstruction threshold of W_s, defined as the minimum k such that every x ∈ W_s is uniquely determined among all binary words by its k-deck. Is r(W_s) = o(s) as s → ∞?

Proposed here, building on arXiv:2610.41110, Thm 1.1 — Deck Reconstruction for Restricted Word Classes; the paper does not ask it

What is known

Theorem 1.1 proves r(W_s) ≤ s for s ≥ 5, and Remark 3.1 states r(W_s) ≤ s - 1 for s ≥ 7, while the lower bound r(W_s) ≥ r(2s) ≥ exp(Ω(√(log s))) is far smaller. The paper leaves open the asymptotic order of r(W_s) and whether it is sublinear in s.

OP-850 Asymptotic In-Class Reconstruction Threshold for Words with Bounded RunsNot in LeanCombinatorics for TCS

For an integer ℓ ≥ 1, let B_ℓ be the class of binary words with at most ℓ runs of 1s. Let r'(B_ℓ) be the in-class reconstruction threshold of B_ℓ, the minimum k such that no two distinct words in B_ℓ have identical k-decks. Does r'(B_ℓ) grow sublinearly in ℓ, that is, r'(B_ℓ) = o(ℓ) as ℓ → ∞?

Proposed here, building on arXiv:2610.41110, Thm 1.3 — Deck Reconstruction for Restricted Word Classes; the paper does not ask it

What is known

Theorem 1.3 establishes that exp(Ω(√(log 2ℓ))) ≤ r'(B_ℓ) ≤ 2ℓ. The upper bound is 2ℓ, but the only known lower bound is the general word lower bound r(2ℓ). It is open whether the true threshold r'(B_ℓ) is linear in ℓ or sublinear.

OP-852 Polynomial-time approximation for adaptive stochastic MST identification with arbitrary probabilitiesNot in LeanAlgorithm Design & Analysis

Let $G = (V, E)$ be a finite connected graph with independent edge weights $w_e \in \{0, 1\}$, where $P(w_e = 1) = p_e \in (0, 1)$. In the adaptive stochastic MST identification problem, an algorithm queries edges sequentially, choosing each subsequent query as a function of the outcomes of all preceding queries, and terminates as soon as the queried weights certify some spanning tree $T$ as a minimum spanning tree of $G$. The goal is to minimize the expected number of queries. Does there exist a polynomial-time algorithm that achieves an $O(\log |E|)$-approximation (or any $o(|E|)$ approximation factor) for the adaptive stochastic MST identification problem on general connected graphs with arbitrary edge probabilities?

Posed in arXiv:2610.40844, Sec. 1.1 — Stochastic Minimum Spanning Tree Identification with Binary Weights

What is known

The paper gives a constant-factor approximation for simple planar graphs and a 2-approximation when all probabilities lie entirely in [0, 1/2] or [1/2, 1], but leaves general graphs with arbitrary probabilities completely open.

OP-855 Smallest output dimension for NP-hardness of stote cone membershipNot in LeanQuantum Computation

Let $\\mathcal{H}_A$ and $\\mathcal{H}_B$ be finite-dimensional Hilbert spaces of dimensions $d_A$ and $d_B$, and let $\\widehat{\\mathcal{Q}}(\\mathcal{H}_A{:}\\mathcal{H}_B) \\subset \\mathrm{Herm}(\\mathcal{H}_A \\otimes \\mathcal{H}_B)$ be the cone generated by states over time $Q = \\frac{1}{2}\\{(\\rho \\otimes \\mathbf{1}_B), J_\\mathcal{E}\\}$ for density operators $\\rho \\in \\mathcal{S}(\\mathcal{H}_A)$ and quantum channels $\\mathcal{E}: \\mathcal{B}(\\mathcal{H}_A) \\to \\mathcal{B}(\\mathcal{H}_B)$ with Jamiołkowski operator $J_\\mathcal{E}$. Is the exact membership problem for $\\widehat{\\mathcal{Q}}(\\mathcal{H}_A{:}\\mathcal{H}_B)$ NP-hard when the output dimension $d_B$ is fixed to a small constant (for example $d_B = 2$), or does there exist a polynomial-time algorithm when $d_B$ is fixed and $d_A$ varies?

Posed in arXiv:2610.34972, Sec. 5, (1) — Membership in the cone of quantum states over time is NP-hard

OP-856 Complexity of weak membership in the stote cone at constant Hilbert-Schmidt accuracyNot in LeanQuantum Computation

Let $\\mathfrak{B}(\\mathcal{H}_A{:}\\mathcal{H}_B) = \\widehat{\\mathcal{Q}}(\\mathcal{H}_A{:}\\mathcal{H}_B) \\cap \\{X : \\Tr[X] = 1\\}$ be the trace-one base of the cone of quantum states over time. For any fixed constant $\\varepsilon > 0$, independent of the dimensions $d_A = \\dim \\mathcal{H}_A$ and $d_B = \\dim \\mathcal{H}_B$, is the weak membership problem for $\\mathfrak{B}(\\mathcal{H}_A{:}\\mathcal{H}_B)$ at Hilbert–Schmidt accuracy $\\varepsilon$ solvable in polynomial time, or is it NP-hard?

Posed in arXiv:2610.34972, Sec. 5, (2) — Membership in the cone of quantum states over time is NP-hard

OP-857 Dimension scaling of facial stability for the exposed separable face of the stote coneNot in LeanQuantum Computation

Let $\\mathcal{H}_A$ and $\\mathcal{H}_R$ have dimensions $d$ and $r$ respectively, with $B = A' R$ where $A'$ is a copy of $A$. Let $W_0 = (d\\mathbf{1}_{AA'} - S_{AA'}) \\otimes \\mathbf{1}_R$, and let $F = L(\\mathrm{SEP}_+(A{:}R)) = \\widehat{\\mathcal{Q}}(A{:}A'R) \\cap \\{X : \\Tr[W_0 X] = 0\\}$. Proposition 3.6 establishes that for every $Y \\in \\widehat{\\mathcal{Q}}(A{:}A'R)$, the trace-norm distance satisfies $\\mathrm{dist}_1(Y, F) \\le 2\\sqrt{2} d^{3/2} \\sqrt{\\Tr[Y] \\Tr[W_0 Y]}$. Can the dimension prefactor $d^{3/2}$ be replaced by $C d^\\alpha$ for some exponent $\\alpha < 3/2$ and universal constant $C > 0$, or is $d^{3/2}$ optimal?

Posed in arXiv:2610.34972, Sec. 5, (3) — Membership in the cone of quantum states over time is NP-hard

OP-859 Asymptotic Minimum of Clique-Saturating Edges in the Intermediate Turan RegimeNot in LeanGraph Theory & Graph Algorithms

Let $p \ge 3$ be an integer. For a finite simple graph $G = (V, E)$, an unordered pair of distinct non-adjacent vertices $\{u, v\} \notin E$ is called $K_{p+1}$-saturating if the graph $G + uv$ contains a clique of size $p+1$. Let $f_{p+1}(G)$ denote the number of $K_{p+1}$-saturating pairs in $G$. For integers $n \ge 1$ and $0 \le m \le \binom{n}{2}$, let $f_{p+1}(n, m) = \min \{ f_{p+1}(G) : G \text{ is a } K_{p+1}\text{-free graph on } n \text{ vertices with } m \text{ edges} \}$. For a fixed edge density parameter $\alpha \in (\frac{p-2}{2(p-1)}, \frac{p-1}{2p})$, determine the asymptotic behavior of $f_{p+1}(n, \lfloor \alpha n^2 \rfloor)$. Specifically, does the limit $\lim_{n \to \infty} f_{p+1}(n, \lfloor \alpha n^2 \rfloor) / n^2$ exist for every $\alpha \in (\frac{p-2}{2(p-1)}, \frac{p-1}{2p})$, and what is its value as a function of $\alpha$ and $p$?

Posed in arXiv:2610.40696, Sec. 1, after Theorem 1.2 — Asymptotic stability of clique-saturating edges near Tur\'an thresholds

OP-865 Weak Hedetniemi Conjecture for Shannon OR-CapacityNot in LeanInformation Theory & Coding

Let C_OR(G) denote the Shannon OR-capacity of a simple graph G, and let G × H be the categorical product of graphs G and H. Is it true that for every real B > 0, there exists a real T > 0 such that for all finite simple graphs G and H, if min{C_OR(G), C_OR(H)} ≥ T, then C_OR(G × H) > B? Equivalently, does the function f_C(t) := inf { C_OR(G × H) : C_OR(G) ≥ t, C_OR(H) ≥ t } tend to infinity as t → ∞?

Posed in arXiv:2610.41977, Conjecture 2 — Hedetniemi's conjecture for Shannon OR-capacity: counterexamples and asymptotic separation

What is known

The author proves that the categorical product capacity can be subpolynomial in the smaller factor capacity (specifically exp((log m)^{1/2+o(1)}) while factor capacities exceed m), but leaves open whether the product capacity can remain uniformly bounded by a constant.

OP-866 Minimum Integer Factor Capacity Admitting a Counterexample to Hedetniemi's IdentityNot in LeanInformation Theory & Coding

Let m* be the minimum positive integer m such that there exist finite simple graphs G and H with min{C_OR(G), C_OR(H)} = m and C_OR(G × H) < m. Is m* equal to 3, 4, 5, 6, or 7, and does every integer m ≥ m* admit such a counterexample pair?

Posed in arXiv:2610.41977, Sec. 6 — Hedetniemi's conjecture for Shannon OR-capacity: counterexamples and asymptotic separation

What is known

The paper constructs counterexamples with a complete factor for every integer m ≥ 7, and proves that identity holds for m = 1, 2, leaving the exact threshold integer between 3 and 7 open.

OP-868 Strictly larger exponential denominator growth rate from non-complete tower seed graphsNot in LeanGraph Theory & Graph Algorithms

Let H be a finite simple graph, and for integers k ≥ ℓ ≥ 1 let T_{k,ℓ}(H) denote the tower graph with seed H, which has order |V(H)| k + ℓ. Does there exist a finite simple graph H and sequences of integers (k_j)_{j≥1} and (ℓ_j)_{j≥1} with k_j ≥ ℓ_j ≥ 1 and |V(H)| k_j + ℓ_j → ∞ such that limsup_{j → ∞} (den(χ_f(T_{k_j,ℓ_j}(H))))^{1 / (|V(H)| k_j + ℓ_j)} > 3^{1/3}?

Proposed here, building on arXiv:2610.41771, Theorem 1.4 — Bounds on the maximum denominator of fractional chromatic numbers; the paper does not ask it

What is known

The paper generalizes the tower graph construction of Bonamy et al. (which used H = K_2 to get limsup sd(n)^{1/n} ≥ √2) to complete seeds H = K_m, proving limsup sd(n)^{1/n} ≥ m^{1/m}, which is maximized over m ≥ 2 at m = 3 with value 3^{1/3}. The paper only evaluates tower graphs for complete seed graphs K_m; it leaves open whether choosing an incomplete seed graph H (such as an odd cycle or Mycielskian) can achieve a growth rate strictly greater than 3^{1/3}.

OP-873 Expected Intercomponent Edges in Fractional (1+p)-Out SamplingNot in LeanGraph Theory & Graph Algorithms

Let $p \in (0, 1)$ be fixed. For a simple graph $G$ on $n$ vertices, let $H_G^{(1+p)}$ be the random spanning subgraph where each vertex $v \in V$ independently samples 2 incident edges with probability $p$ and 1 incident edge with probability $1-p$ (each choice drawn uniformly with replacement from incident edges). Let $x_G(H_G^{(1+p)})$ be the number of edges of $G$ whose endpoints lie in distinct connected components of $H_G^{(1+p)}$. Does there exist a constant $C(p) > 0$ depending only on $p$ such that $\mathbb{E}[x_G(H_G^{(1+p)})] \le C(p) n$ for every simple graph $G$ on $n$ vertices?

Proposed here, building on arXiv:2610.42067, Corollary 5 — Two choices suffice: $k$-out sampling leaves $O(n/k)$ intercomponent edges for $k\geq 2$; the paper does not ask it

What is known

The paper notes that the $O(n/k)$ bound fails dramatically for $k=1$ (yielding $\Omega(n^2)$ intercomponent edges in complete graphs $K_n$) but holds for all integer $k \ge 2$. In Section 4, the authors mention extending the switching argument to real $r \ge 2$. This leaves open the intermediate regime between 1 and 2: if each vertex independently chooses 2 incident edges with probability $p$ and 1 edge with probability $1-p$ for a parameter $p \in (0, 1)$, does the expected number of intercomponent edges drop from $\Theta(n^2)$ to $O_p(n)$ for every fixed $p > 0$?

OP-874 Strong chromatic index of truncations of simple bridgeless cubic graphsNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a connected simple bridgeless cubic graph. Let the truncation $T(G)$ be the cubic graph obtained by replacing each vertex $v \in V(G)$ with a triangle $\Delta_v$ (called a canonical triangle) and replacing each edge $uv \in E(G)$ with an external edge joining a vertex of $\Delta_u$ to a vertex of $\Delta_v$ so that $T(G)$ is 3-regular. Is the strong chromatic index of $T(G)$ always equal to 6, i.e., can the edges of $T(G)$ be properly colored with 6 colors such that any two edges at distance at most 2 in the line graph $L(T(G))$ receive distinct colors?

Posed in arXiv:2610.41950, Sec. 1, below (1.1) — Strong edge-colourings of truncations of cubic graphs

OP-875 Strong chromatic index of truncations of loopless bridgeless cubic multigraphsNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a connected loopless bridgeless cubic multigraph not isomorphic to $M_0$ (the multigraph on 2 vertices with 3 parallel edges). Let $T(G)$ be the truncation of $G$, where each vertex $v \in V(G)$ is replaced by a triangle whose vertices correspond bijectively to the three edge incidences at $v$, and each edge of $G$ is replaced by an external edge connecting its two incidence ports. Does $T(G)$ satisfy $\chi'_s(T(G)) = 6$?

Posed in arXiv:2610.41950, Sec. 6.3 — Strong edge-colourings of truncations of cubic graphs

OP-876 Revised Hilton-Zhao Vertex-Splitting ConjectureNot in LeanGraph Theory & Graph Algorithms

Let $G$ be an $n$-vertex connected simple graph that is regular of degree $\Delta$ and of Class 1 (that is, its chromatic index satisfies $\chi'(G) = \Delta$), with $\Delta > n/3$. Let $G^*$ be any graph obtained from $G$ by a vertex-splitting (replacing a vertex $v$ with two adjacent vertices $v_1, v_2$ and partitioning $N_G(v)$ into two nonempty disjoint sets $N_{G^*}(v_1) \setminus \{v_2\}$ and $N_{G^*}(v_2) \setminus \{v_1\}$). If $G^*$ is not isomorphic to the graph obtained from the 8-vertex Wagner graph (the 8-vertex Möbius ladder) by subdividing one of its four opposite chords, is $G^*$ necessarily $\Delta$-critical (that is, $\chi'(G^*) = \Delta + 1$ and $\chi'(G^* - e) \le \Delta$ for every edge $e \in E(G^*)$)?

Posed in arXiv:2610.41984, Conjecture 1 — Hilton-Zhao vertex-splitting conjecture for triangle-free graphs

OP-878 Query complexity exponent for sub-2-approximation of metric Steiner treeNot in LeanApproximation & Inapproximability

In the distance-oracle model for metric Steiner tree, an algorithm has oracle access to the metric distances w(u, v) on an n-point metric space (V, w) with a given terminal subset T ⊆ V. A randomized algorithm is a (2 - ε)-approximation if on every instance it outputs an estimate C_hat satisfying st(V, T, w) ≤ C_hat ≤ (2 - ε) st(V, T, w) with probability at least 2/3, where st(V, T, w) is the minimum weight of a tree on V containing T. Does there exist a constant ε > 0, an exponent c < 5/3, and a randomized algorithm that computes a (2 - ε)-approximation using O(n^c) distance queries on all n-point instances with |T| = Θ(n)?

Posed in arXiv:2610.41666, Abstract — A Better Lower Bound for Sublinear Metric Steiner Tree

What is known

The paper improves the randomized query complexity lower bound for (2 - η)-approximation of metric Steiner tree in the distance-oracle model from n^(6/5) to n^(7/5), while the best known upper bound achieves 2 - ε_0 in O~(n^(5/3)) queries. This leaves a gap in the query complexity exponent between 7/5 and 5/3.

OP-880 Exact nonadaptive classical query complexity exponent for odd cyclic ForrelationNot in LeanQuantum Computation

Let n ≥ 1 be an integer, N = 2^n, and let k ≥ 5 be an odd integer. For Boolean functions f_1, ..., f_k : {0, 1}^n → {-1, 1}, the k-cyclic Forrelation value is defined by T_k(f_1, ..., f_k) = N^{-(k/2+1)} ∑_{x_1, ..., x_k ∈ {0, 1}^n} (∏_{j=1}^k f_j(x_j)) (-1)^{∑_{j=1}^{k-1} x_j · x_{j+1} + x_k · x_1}. In the randomized nonadaptive query model, an algorithm chooses query sets Q_1, ..., Q_k ⊆ {0, 1}^n according to a distribution independent of oracle responses, queries f_j on Q_j, and outputs an estimate T̂_k such that |T̂_k - T_k(f_1, ..., f_k)| ≤ 1/4 with probability at least 2/3 on every input. What is the exact exponent α(k) such that the nonadaptive randomized classical query complexity of estimating T_k to additive error 1/4 is Θ_k(N^{α(k)})? In particular, does α(k) = 1 - 2/(k-1) = 1 - 1/⌊k/2⌋, or does α(k) = 1 - 2/k, or does it take an intermediate value?

Posed in arXiv:2610.41694, Abstract, also Section 1 — Exponential quantum-classical query separations for cyclic Forrelation

What is known

The paper establishes a tight nonadaptive classical query complexity of Θ(N^{1-2/k}) for even k ≥ 4, but leaves an open gap for odd k ≥ 5 between the lower bound Ω(N^{1-2/(k-1)}) and the upper bound O(N^{1-2/k}). The authors suggest the true exponent may be governed by the independence number of the k-cycle, giving 1 - 2/(k-1).

OP-882 Reachable tanking equilibria under strict better-response dynamicsNot in LeanMatching & Market Design

Let (M, W, P) be a finite stable marriage market with strict complete preference profiles P = (P_M, P_W). In the men-proposing deferred acceptance mechanism where men report sincerely and women can unilaterally tank (arbitrarily lower their ranks in men's preference lists while leaving their own lists unchanged), a strict better-response sequence is a finite sequence of profiles P = Q^(0), Q^(1), ..., Q^(k) where each Q^(j+1) is obtained from Q^(j) by a unilateral tanking move by some woman w satisfying mu_M(Q^(j+1))(w) >_w mu_M(Q^(j))(w). A tanking equilibrium profile Q* is reachable if it terminates such a sequence. What is a structural characterization of the set of reachable tanking-equilibrium matchings {mu_M(Q*)} from P, and can membership of a matching in this reachable set be decided in polynomial time?

Posed in arXiv:2610.42105, Sec. 5.2, after Cor. 5.14 — Strategic Tanking in Stable Matching Markets

What is known

The paper establishes that strict better-response tanking dynamics always converge in at most n(n-1) steps and that supportable equilibria can be non-stable with respect to sincere preferences, but the exact subset of supportable outcomes reachable from sincere preferences via strictly profitable moves remains uncharacterized.

OP-888 fractional kout crossing edges sharp inverse probabilityNot in LeanGraph Theory & Graph Algorithms

Is the following sharp quantitative extension of the k-out sparsification theorem valid? There is an absolute C<infinity such that, for every n>=2, every finite simple graph G on n vertices, and every real p in (0,1], independently let each nonisolated vertex choose one uniformly random neighbor, and independently choose a second uniformly random neighbor with probability p, with replacement. Let H contain all chosen edges, and X be the number of edges of G whose endpoints lie in different connected components of H. Then E[X] <= C n/p. Moreover is the dependence 1/p sharp, in the sense that there are c,p_0>0 such that for each p in (0,p_0) some complete graph K_n has E[X] >= c n/p?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Chen and Chen prove E[X]=O(n/k) for integer k>=2 but not the fractional range, while OP-873 asks merely whether some finite C(p) exists for each fixed p. This asks for the uniform asymptotically sharp cost of reducing local random choices below two, which determines how much randomness contraction-based algorithms can save as p tends to zero. It strengthens OP-873 by predicting explicit behavior even when p depends on n; no fixed-p existence result alone yields this uniform rate. A natural sharpness test is K_n with p of order 1/n, where only a constant number of extra choices perturb a 1-out random graph. Evidence: Experiment 12783 evaluates exact subset-recursion probabilities on all connected unlabeled graphs of orders 4 through 7 at p=0,0.05,0.2,0.5,1; no failure of the stated scaling is seen, and complete graphs are not always extremizers. Experiment 12779 uses 600 independent trials per case on K_n for n=100,500,2000 and p=lambda/n with lambda=0.5,1,2,4,8; the observed p E[X]/n stays order one (e.g. 0.20-0.27 at n=2000 for lambda=2-8), supporting the 1/p scale rather than its proof.

OP-893 prime fixed offset total insertion cost stochastic maximumNot in LeanData Structures

Let p be prime and let r=(r_0,...,r_{p-1}) be any permutation of Z/pZ with r_0=0. Start with p empty hash slots and insert t keys, 0<=t<=p, whose home slots are independent uniform random elements of Z/pZ; a key probes h+r_0,h+r_1,... until finding an empty slot. Let C_r(t) be the sum of the numbers of probes used by all t insertions. Is Pr[C_r(t)>k] <= Pr[C_lin(t)>k] for every integer k>=0, where lin=(0,1,...,p-1)?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The runtime for constructing a hash table depends on accumulated probes, not only the cost of one insertion. OP-801 asks whether linear probing maximizes each individual insertion-cost tail on prime tables; those marginal comparisons do not imply a tail comparison for the sum because costs across insertions are dependent. The 2026 fixed-offset analysis bounds expected insertion cost but does not compare the full construction-cost law; the classical linear-probing Airy law gives a potentially powerful benchmark if an extremal comparison holds. The prime restriction is substantive: a computed composite n=6 example with first offset 1 already violates it. A theorem for all prime sizes, loads and thresholds would supply distributional worst-case guarantees rather than another finite instance. Evidence: Exact occupancy-and-accumulated-cost dynamic programming enumerates every normalized offset order for p=3,5,7 and all loads and tails (12863); it finds no violation for 10,000 normalized p=11 orders (12867) or 1,000 normalized p=13 orders (12865). In contrast, exhaustive composite checks in 12868 find for n=6, r=(0,1,3,4,2,5), t=5 and k=14 the tail counts 12 versus 6 for linear probing, both out of 6^5 equally likely home sequences. Normalizing r_1=1 is valid for the prime searches by multiplication by a nonzero unit. These are computations, not a proof.

OP-896 sine kernel tripartite information oscillatory inverse squareNot in LeanStatistical Mechanics & Thermodynamics

For z>0 and E a finite union of intervals, let K_{z,E} be the integral operator on L^2(E) with kernel sin(z(x-y))/(pi(x-y)), and let S_z(E)=Tr[-K log K-(1-K) log(1-K)] (natural logarithms). Define g(z)=3 S_z([0,1])-2 S_z([0,2])-S_z([0,1] union [2,3])+S_z([0,3]). Do there exist constants a and b with b<0 such that g(z)=(a+b cos(4z)+o(1))/z^2 as z tends to infinity? If so, is a=-7/180, and what is the exact value of b? Equivalently, does the first nonvanishing correction to the continuum free-fermion tripartite information have this explicit oscillatory inverse-square form?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The asymptotic decay and oscillation quantify the finite-scale deviation from extensive mutual information for a free-fermion ground state, an observable directly relevant to multipartite entanglement and monogamy. Carrasco et al. study the leading multi-block free-fermion entropy and asymptotic extensivity; that does not specify this continuum inverse-square correction or its oscillatory coefficient. Sokolovs defines the sine-kernel function and studies small z but Appendix A instead asserts a nonzero negative large-z limit. Independent numerical quadratures, finite-lattice checks, and the older extensivity result make the leading correction a particularly informative question. This asks beyond a paper's stated results, not its own open problems; the coefficient and form are conjectural, not established by numerics. Evidence: Nyström evaluations with 48-320 Gauss nodes per interval agree at matching z when discretization is adequate. Experiment 12893 gives g(8)=-0.00113778, g(16)=-0.00020690, g(24)=-0.00006330; experiment 12901 independently approaches the same values from finite tight-binding Toeplitz matrices. Over 40<=z<=150, experiment 12898 fits z^2 g(z) by a+b cos(4z) with a=-0.03888853 and b=-0.02624524 plus smaller corrections; -7/180=-0.03888889. Experiment 12902 gives distinct extrapolated fixed-phase limits about -0.06513379 and -0.01264336. These are numerical observations and do not prove the asymptotic or the constants.

OP-897 partially aligned sparse stable matching cubic root lossNot in LeanMatching & Market Design

Fix 0<rho<1 and d>0. On n men and n women independently include each potential edge with probability d/n. For each present edge e draw independent U_e,V_e,W_e uniform on [0,1]; its endpoints rank their incident edges in decreasing values of rho U_e+(1-rho)V_e and rho U_e+(1-rho)W_e respectively, and each finds every neighbor acceptable. Let u_n(rho,d) be the fraction unmatched in any stable matching. Does u_n(rho,d) converge in probability, as n tends to infinity at fixed d, to a deterministic u(rho,d)>0, and does -log u(rho,d) ~ C [d(1-rho)/rho]^(1/3) as d tends to infinity? Here C is the universal constant defined by C=integral_0^infinity t q(t) dt, where q is the unique nonnegative integrable solution of q(s)=exp(-integral_0^infinity q(t) H(s,t) dt), with H(s,t)=s*t-t^2/2 for t<=s and H(s,t)=s^2/2 for t>s. In particular, does this hold for every fixed intermediate correlation, with C approximately 1.33477941284?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

A recent limited-attention paper quantifies the unmatched cost of stability when endpoint preferences are independent; Arnosti analyzes independent and perfectly aligned endpoint preferences in the same sparse random-graph regime. A separate matching literature studies hybrid aligned/idiosyncratic utility shocks in complete markets. This question combines a sparse opportunity graph with hybrid edge utilities and predicts a new universal intermediate high-degree exponent. At rho=0 the established logarithmic loss is of order sqrt(d), while at rho=1 it is log(1+d); a cube-root law for every 0<rho<1 would show a singular and economically meaningful crossover. The cited endpoint theorems do not supply the correlated pair-mark recursion or its singular boundary asymptotics. The order of limits is essential. Evidence: Experiment 12904 simulates 10,000-by-10,000 sparse markets at d=4,...,256 and rho=0,...,1; for example rho=.6 yields unmatched fractions .0200, .00807, .00250, .00050 at d=32,64,128,256, broadly agreeing with the independent marked-tree calculation. Experiment 12907 evaluates that finite-degree recursion and validates two grid sizes; 12909 compares three grid sizes up to d=16384, where normalized exponents for rho=.2,.4,.6,.8 are 1.33474,1.33475,1.33474,1.33470. An independent scaling-equation computation, 12908, gives C=1.33477941284. The numerical fixed points and data do not prove convergence or uniqueness.

OP-898 Dictator Minimality for Alpha-Stability of Balanced Boolean Functions Below Order 7/8Not in LeanInformation Theory & Coding

Let $n \ge 1$ be an integer, and let $f: \{-1, 1\}^n \to \{0, 1\}$ be a balanced Boolean function, satisfying $\mathbb{E}[f] = 1/2$ under the uniform probability measure. For $\rho \in [0, 1]$, let $T_\rho$ denote the Boolean noise operator with correlation parameter $\rho$, defined by $T_\rho f(x) = \mathbb{E}[f(Y) \mid X = x]$ where $Y$ is obtained by flipping each coordinate of $x$ independently with probability $(1-\rho)/2$. Let $M_\alpha(\rho) = \frac{1}{2}\left[\left(\frac{1-\rho}{2}\right)^\alpha + \left(\frac{1+\rho}{2}\right)^\alpha\right]$. For which exponents $\alpha \in (0, 7/8)$ does the inequality $\mathbb{E}[(T_\rho f)^\alpha] \ge M_\alpha(\rho)$ hold for all $n \ge 1$, all balanced Boolean functions $f$, and all $\rho \in [0, 1]$? In particular, does the inequality hold for all $\alpha \in [1/2, 7/8)$?

Posed in arXiv:2611.00868, Section 1.1, after Theorem 1 — Noise Stability on the Hypercube: Order $7/8$

What is known

The paper proves that dictators minimize the alpha-stability of balanced Boolean functions for all alpha in [7/8, 1) and all correlation parameters rho in [0, 1], but leaves open whether this optimality extends down to the critical exponent alpha = 1/2 (Conjecture 1) or further to all alpha in (0, 7/8).

OP-900 Exact Maximum Order for Degrees with Second Eigenvalue 2 sqrt(d-1)Not in LeanGraph Theory & Graph Algorithms

Let $d \ge 3$ be an integer. Let $v(k, \theta)$ denote the maximum order of a connected $k$-regular simple graph whose second largest adjacency eigenvalue is at most $\theta$. Is it true that for every sufficiently large degree $k$, $v(k, 2\sqrt{d-1}) = 2k + 2d$?

Posed in arXiv:2611.00591, Question 8.2 — A spectral Moore problem and the Yang-Koolen conjecture

OP-907 Lescure-Meyniel Conjecture on Strong Complete ImmersionsNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite simple graph, and let $\chi(G)$ be its chromatic number. Does $G$ contain a strong immersion of the complete graph $K_{\chi(G)}$? That is, does there exist an injective map $\varphi : \{1, \dots, \chi(G)\} \to V(G)$ and a collection of pairwise edge-disjoint paths $(P_{uv})_{1 \le u < v \le \chi(G)}$ in $G$ such that each $P_{uv}$ has endpoints $\varphi(u)$ and $\varphi(v)$, and the internal vertices of every $P_{uv}$ are disjoint from $\varphi(\{1, \dots, \chi(G)\})$?

Posed in arXiv:2611.00956, Conjecture 1.1 — Strong complete immersions in graphs with independence number two

What is known

Lescure and Meyniel conjectured that every graph G contains a strong immersion of K_{χ(G)}. The paper resolves this conjecture for graphs with α(G) ≤ 2, but leaves the general conjecture open for graphs with independence number α(G) ≥ 3.

OP-910 Tight Adaptive Query Complexity of Estimating MAX-CUT in the Dense Graph ModelNot in LeanStreaming & Sublinear Algorithms

In the adjacency matrix (dense graph) query model, an algorithm is given query access to an unknown simple graph $G = (V, E)$ on $n$ vertices via pair queries that indicate whether an unordered pair $\{u, v\} \subseteq V$ is an edge. The MAX-CUT value $\mathrm{MC}(G)$ is the maximum over all subsets $S \subseteq V$ of the number of edges crossing between $S$ and $V \setminus S$. For $\varepsilon > 0$ and $n \ge \lceil 1/\varepsilon^2 \rceil$, an algorithm is an $\varepsilon$-additive approximation tester for MAX-CUT if, with success probability at least $2/3$, it outputs an estimate $\widehat{M}$ satisfying $|\widehat{M} - \mathrm{MC}(G)| \le \varepsilon n^2$. What is the worst-case adaptive query complexity $q(\varepsilon)$ of this problem? In particular, does there exist an adaptive randomized algorithm achieving this approximation with $O(1/\varepsilon^3)$ queries, or is the optimal adaptive query complexity $\Theta(1/\varepsilon^4)$, matching the non-adaptive bound?

Posed in arXiv:2611.00682, Abstract — Testing MAX-CUT in the Adjacency Matrix Model: Tight Non-Adaptive Bounds and a Cubic Adaptive Lower Bound

What is known

The paper closes the gap for non-adaptive testers by establishing a matching $\Theta(1/\varepsilon^4)$ bound, and proves a cubic $\Omega(1/\varepsilon^3)$ lower bound for adaptive testers. Since any non-adaptive tester is also an adaptive tester, this leaves a gap between $\Omega(1/\varepsilon^3)$ and $O(1/\varepsilon^4)$ for the worst-case adaptive query complexity.

OP-911 Four-coloring of near-triangulations with at least min(deg(v), 3) neighbor colorsNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a near-triangulation, that is, a simple plane graph in which every bounded face is bounded by a triangle. Does $G$ always admit a vertex 4-coloring $c : V(G) \to \{1, 2, 3, 4\}$ (not necessarily proper) such that every vertex $v \in V(G)$ sees at least $\min\{\deg_G(v), 3\}$ colors on its neighbors, that is, $|c(N_G(v))| \ge \min\{\deg_G(v), 3\}$?

Posed in arXiv:2611.00572, Conjecture 1.4 — Total dominating sets and four-colorings of planar triangulations

What is known

The paper proves this conjecture for all planar triangulations (where the outer face is also a triangle) in Theorem 1.5, leaving open the general case of near-triangulations where the outer face has length greater than 3.

OP-914 Reassignment complexity under upgrade recourseNot in LeanFair Division

In the online fair division of m indivisible chores among n >= 2 agents with additive costs under upgrade recourse, can an online algorithm maintain envy-freeness up to one chore (EF1) at all prefixes while performing o(m^2) total chore reassignments?

Posed in arXiv:2611.00432, Appendix A — Online Fair Division of Chores with Upgrade Recourse

What is known

While insertion provides optimal MMS and EF1 guarantees under upgrade recourse, its worst-case number of reassignments is quadratic in the horizon m.

OP-916 Uniqueness of G_36 and G_55 as Non-Transmission-Regular Graphs with Distance Spectrum {ρ, 0, -c}Not in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite connected simple graph whose distance matrix $D(G)$ has exactly three distinct real eigenvalues, one of which is $0$ (so its spectrum is of the form $\{\rho, 0, -c\}$ with integers $c \ge 2$ and $\rho > 0$). Recall that $G$ is transmission-regular if all vertices have the same transmission $\sum_{v \in V(G)} d(u, v)$ (that is, the all-ones vector is an eigenvector of $D(G)$). Is every such graph that is not transmission-regular isomorphic to either $G_{36}$ (the Seidel switch of the Cartesian product $K_6 \square K_6$ with respect to a single 6-vertex line) or $G_{55}$ (the Seidel switch of the triangular graph $T(11)$ with respect to a 10-vertex maximal clique)?

Posed in arXiv:2611.00126, Sec. 4 — Graphs with three distinct distance eigenvalues, one of which is zero

OP-922 Sharp Plank Covering Lower Bound for Square Annuli with Rotated HolesNot in LeanCombinatorics for TCS

Let $Q = [-1/2, 1/2]^2$ be the unit square in $\mathbb{R}^2$. Let $H \subset Q$ be any square of side length $1/2$ contained in $Q$, not necessarily with sides parallel to those of $Q$. A plank of width $w > 0$ and unit normal $n \in \mathbb{R}^2$ is a closed region $\{x \in \mathbb{R}^2 : |\langle n, x \rangle - s| \le w/2\}$ for some shift $s \in \mathbb{R}$. Is it true that every finite family of planks covering $Q \setminus \inter H$ has total width at least 1?

Proposed here, building on arXiv:2611.00379, Theorem 1 — A sharp plank theorem for cube annuli; the paper does not ask it

What is known

Theorem 1 of arXiv:2611.00379 settles a conjecture on square annuli by proving that whenever H is a square of side length 1/2 whose sides are parallel to those of Q, every finite plank covering of Q \ int(H) has total width at least 1. The proof critically relies on the axis-parallel orientation: Lemma 4 encloses the hole inside an axis-parallel plank whose Bang vector is invariant under coordinate rescaling. When the square hole H of side length 1/2 is rotated by an angle θ in (0, π/2), its projection onto coordinate axes is (cos θ + sin θ)/2 > 1/2, so the reduction in Lemma 4 does not apply. Whether every plank covering of Q \ int(H) still requires total width at least 1 for any orientation of a square hole of side length 1/2 contained in Q is untouched and remains open.

OP-923 Exponential Lower Bound for Pfaffian Number in Terms of Symbolic Pfaffian NumberNot in LeanCombinatorics for TCS

Let $G$ be a finite simple graph, let $\operatorname{pf}(G)$ denote its pfaffian number (the minimum integer $k$ such that $G$ admits a pfaffian $k$-orientation), and let $\operatorname{spf}(G)$ denote its symbolic pfaffian number (the minimum integer $d$ such that $G$ admits a pfaffian $d$-symbolic orientation over $\mathbb{F}_2$). Does there exist an absolute positive constant $c > 0$ such that for every finite graph $G$, $\operatorname{pf}(G) \geq 2^{c \cdot \operatorname{spf}(G)}$ (i.e., $\operatorname{pf}(G) = 2^{\Omega(\operatorname{spf}(G))}$)?

Posed in arXiv:2611.00468, Conjecture 6.1 — The symbolic pfaffian method I: A generalization of the Gallucio-Loebl-Tesler Theorem

What is known

The authors prove pf(G) <= 2^{spf(G)} for all graphs, and know that spf(G) + 1 <= pf(G). They conjecture that the true relationship is exponential, i.e., pf(G) = 2^{Ω(spf(G))}.

OP-924 Asymptotic Growth of the Pfaffian Number of Complete GraphsNot in LeanCombinatorics for TCS

For each integer $n \geq 3$, let $K_{2n}$ denote the complete graph on $2n$ vertices, and let $\operatorname{pf}(K_{2n})$ be its pfaffian number. While $\lceil (8/3)^{\lfloor n/3 \rfloor} \rceil \leq \operatorname{pf}(K_{2n}) \leq 2^{\mathcal{O}(n \log n)}$, what is the exact asymptotic order of $\log_2 \operatorname{pf}(K_{2n})$ as $n \to \infty$? In particular, is $\operatorname{pf}(K_{2n}) = 2^{\Theta(n \log n)}$ or $2^{\Theta(n)}$?

Posed in arXiv:2611.00468, Section 6, after Conjecture 6.1 — The symbolic pfaffian method I: A generalization of the Gallucio-Loebl-Tesler Theorem

What is known

Known bounds give (8/3)^{floor(n/3)} <= pf(K_{2n}) <= 2^{O(n log n)}, leaving an asymptotic gap between exponential in n and 2^{O(n log n)}.

OP-927 Existence of APN Permutations of $(\mathbb{Z}/4\mathbb{Z})^m$Not in LeanFoundations of Cryptography

Let m ≥ 1 and let A = (ℤ/4ℤ)^m. For any permutation G of A, its differential uniformity is defined as Δ(G) = max_{α ≠ 0, β} #{x ∈ A : G(x + α) - G(x) = β}. A permutation with Δ(G) = 2 is called an almost perfect nonlinear (APN) permutation. Let D_m = min_G Δ(G), where the minimum is taken over all permutations G of (ℤ/4ℤ)^m. It is known that D_1 = D_2 = 2 and 2 ≤ D_m ≤ 36 for all m ≥ 1. For every integer m ≥ 3, does there exist an APN permutation of (ℤ/4ℤ)^m, i.e., does D_m = 2 hold for all m ≥ 1?

Posed in arXiv:2611.02572, Sec. 8, Open problem (1) — Explicit permutations of $(\mathbb{Z}/4\mathbb{Z})^m$ with uniformly bounded differential uniformity

What is known

The paper shows that the minimum differential uniformity D_m over permutations of (Z/4Z)^m satisfies 2 ≤ D_m ≤ 36 for all m, and D_1 = D_2 = 2. Whether D_m = 2 (i.e., whether APN permutations exist) for all m remains completely open.

OP-929 Uniform Differential Uniformity for Doubly Exchanged PermutationsNot in LeanFoundations of Cryptography

Let m be an odd positive integer, q = 2^m, and consider the Teichmüller digit group addition on 𝔽_q × 𝔽_q given by (a,b) + (u,v) = (a+u, b+v+√(au)). Let F(a,b) = (p(a), h(a)+d(a)b) and J(a,b) = (b,a). For p(x) = x^3, d(x) = x^4 + x^2 + 1, and h(x) ∈ {0, x^2, x^3, x^5}, is the differential uniformity Δ(J ∘ F ∘ J ∘ F) of the doubly exchanged permutation J ∘ F ∘ J ∘ F bounded by an absolute constant independent of m?

Posed in arXiv:2611.02572, Sec. 8, Open problem (3) — Explicit permutations of $(\mathbb{Z}/4\mathbb{Z})^m$ with uniformly bounded differential uniformity

What is known

Theorem 5.2 establishes a uniform bound for directions with nonzero low input and output differences using a Jacobian identity, but leaves the remaining directions open for general families, particularly doubly exchanged maps J ∘ F ∘ J ∘ F.

OP-930 Differential Uniformity in Coordinate Digits with Non-Periodic OffsetsNot in LeanFoundations of Cryptography

In the coordinate digit representation of (ℤ/4ℤ)^m relative to a basis e_0=1, e_1, ..., e_{m-1} of 𝔽_{2^m} over 𝔽_2, where addition is (a,b) + (u,v) = (a+u, b+v + a ⊙ u) with coordinatewise product a ⊙ u, let F(a,b) = (p(a), h(a)+d(a)b) and J(a,b) = (b,a). Does there exist a polynomial family (p, d, h) with degrees bounded independently of m, where d has no zeros in 𝔽_{2^m} and h is not 1-periodic (i.e. h(a+1) ≠ h(a) for some a), such that the differential uniformity Δ(F ∘ J ∘ F) is bounded by an absolute constant independent of m?

Posed in arXiv:2611.02572, Sec. 8, Open problem (4) — Explicit permutations of $(\mathbb{Z}/4\mathbb{Z})^m$ with uniformly bounded differential uniformity

What is known

Proposition 6.1 shows that in coordinate digits with basis e_0 = 1, any 1-periodic (h,d) leads to Δ ≥ q/2. The paper leaves open whether non-periodic offsets h can avoid this carry-induced lower bound and achieve uniformly bounded Δ.

OP-931 Testing Submodularity with Exponent O(sqrt(n)) QueriesNot in LeanSubmodular & Combinatorial Optimization

Does there exist an absolute constant C > 0 such that for every proximity parameter ε ∈ (0, 1), there exists a randomized property tester that tests whether an unknown function f : {0, 1}^n → ℝ is submodular using at most 2^{C √(n) / ε^O(1)} queries? Specifically, can the logarithmic factor in the exponent of the known 2^{O(√(n) log n)} query upper bound for testing submodularity on the hypercube be eliminated?

Posed in arXiv:2611.02374, Sec. 1.2, The logarithmic factor — Submodularity Is Barely Testable

OP-933 Query Complexity Lower Bound for Testing k-SubmodularityNot in LeanSubmodular & Combinatorial Optimization

For an integer k ≥ 2 and constant ε ∈ (0, 1), does every randomized ε-tester for k-submodularity of functions f : {0, 1, ..., k}^n → ℝ require superpolynomially many queries (e.g. n^ω(1) or 2^{Ω(n^c)} for some c > 0)?

Posed in arXiv:2611.02374, Sec. 1.2, Lower bounds for k-submodularity — Submodularity Is Barely Testable

OP-935 Universal Lower Bound for Simple Graphs by Loopless Digraphs of the Same Degree SequenceNot in LeanGraph Theory & Graph Algorithms

Does there exist an absolute constant $C > 0$ such that for every positive integer $n$ and every graphical degree sequence $d = (d_1, \dots, d_n)$ with $d_i \ge 1$ for all $i \in \{1, \dots, n\}$ and $M = \frac{1}{2} \sum_{i=1}^n d_i$, the number $G(d)$ of simple graphs on $n$ vertices with degree sequence $d$ and the number $D(d)$ of loopless directed graphs on $n$ vertices with in-degree and out-degree both equal to $d_i$ at each vertex $i$ satisfy $G(d) \ge \sqrt{D(d)} \exp(-C n \log(2 + M/n))$?

Posed in arXiv:2611.02191, Abstract — Graphs versus loopless digraphs with a given degree sequence, and convergence of uniformly random graphs at every density

OP-937 Asymptotic Ratio Limit for Minimum Intersecting Hypergraph Size with Prescribed AvoidanceNot in LeanCombinatorics for TCS

For an integer $k \ge 2$, let $m(k)$ denote the minimum number of edges in an intersecting $k$-uniform hypergraph $\mathcal{H}$ on a finite vertex set such that every $(k-1)$-element subset of vertices is disjoint from at least $k$ edges of $\mathcal{H}$, with $m(k) = \infty$ if no such hypergraph exists. It is known that $k^2 + 1 \le m(k) \le C k^2$ for all sufficiently large $k$ and some absolute constant $C > 0$. Does the sequence $m(k)/k^2$ converge as $k \to \infty$, and if so, what is the value of $\lim_{k \to \infty} \frac{m(k)}{k^2}$?

Posed in arXiv:2611.01915, Sec. 3, after Corollary 3.5 — Quadratic bounds for intersecting hypergraphs: An affirmative answer to a question of Duke and Erd\H{o}s

OP-938 Zero Lower Density for Infinite B3 SetsNot in LeanCombinatorics for TCS

Let $A \subseteq \mathbb{N}$ be an infinite $B_3$ set (a set of positive integers where every sum of three elements with replacement has a unique multiset of summands). For each positive integer $n$, let $A(n) = |A \cap \{1, \dots, n\}|$. Does every infinite $B_3$ set satisfy $\liminf_{n\to\infty} \frac{A(n)}{n^{1/3}} = 0$?

Posed in arXiv:2611.01871, Sec. 4, after (4.3) — Infinite Generalized Sidon Sets with a Negative Answer to a Problem of Szemer\'edi

OP-941 Asymptotic Limit of the Nonnegative Linearization Threshold for Perturbed ProfilesNot in LeanCombinatorics for TCS

For an integer $N \ge 3$, a parameter $0 < \mu < 1$, and $q > 1$, define $D(i) = (1 - \mu)i + \mu [i]_q$ for $0 \le i \le N$, where $[i]_q = \sum_{j=0}^{i-1} q^j$. Let $d_i = D(i)/D(N)$ be the normalized profile, and consider the constant-ratio recurrence with $r = 1$ (so $c_i = d_i, b_i = 0, a_i = 1 - d_i$). Define $V_N = \inf\{\mu^{-1} : 0 < \mu < 1, \ \exists q > 1 \text{ such that the array fails property (P)}\}$, with $\inf \emptyset = \infty$. Does $\lim_{N \to \infty} V_N = 1$?

Posed in arXiv:2611.01561, Sec. 6, The exact boundary — A log-concavity criterion for finite nonnegative linearization

OP-942 Optimality of fourth-root exponent for complete Minimum Quartet InconsistencyNot in LeanAlgorithm Design & Analysis

Let S be a set of n taxa and let Q be a complete quartet system specifying a resolved quartet topology for every 4-element subset of S. Given an error budget k >= 0, the complete Minimum Quartet Inconsistency (MQI) problem asks whether there exists an unrooted binary phylogenetic tree T with leaf set S that disagrees with Q on at most k quartets. Complete unweighted MQI is solvable in deterministic time 2^{O(k^{1/4})} + n^{O(1)}. Does complete MQI admit a deterministic algorithm with running time 2^{o(k^{1/4})} n^{O(1)}? Under the Exponential Time Hypothesis (ETH), does every deterministic algorithm for complete MQI require time 2^{Omega(k^{1/4})} n^{O(1)}?

Posed in arXiv:2611.01569, Section 5, paragraph 3 — A logarithm-free subexponential algorithm for minimum quartet inconsistency

OP-943 Polynomial-space subexponential algorithm for complete Minimum Quartet InconsistencyNot in LeanAlgorithm Design & Analysis

Does complete unweighted Minimum Quartet Inconsistency (MQI) on n taxa with quartet error budget k admit a deterministic algorithm that runs in subexponential time 2^{O(k^{1/4})} n^{O(1)} using polynomial space (n + k)^{O(1)}? The dynamic programming algorithm of the paper maintains tables over product states of rooted restrictions, requiring 2^{O(k^{1/4})} + n^{O(1)} auxiliary space.

Posed in arXiv:2611.01569, Section 6, paragraph 2 — A logarithm-free subexponential algorithm for minimum quartet inconsistency

OP-944 Graceful supertree size bounded away from 2mNot in LeanGraph Theory & Graph Algorithms

Do there exist absolute constants $\varepsilon > 0$ and $K \in \mathbb{R}$ such that every finite tree $T$ with $m$ edges embeds as a subtree of a graceful tree with at most $(2 - \varepsilon)m + K$ edges?

Posed in arXiv:2611.01340, Sec. 5, eq. (16) — Graceful supertrees with at most $2m-\mathrm{diam}(T)$ edges

OP-945 In-span graceful completion of lobster labelingsNot in LeanGraph Theory & Graph Algorithms

Do the range-relaxed labelings of lobsters with $m$ edges and diameter $D$ constructed by Barrientos and Krop (which have span at most $(3m-D)/2$) admit completion to graceful supertrees without enlarging their label interval?

Posed in arXiv:2611.01340, Sec. 5, after eq. (16) — Graceful supertrees with at most $2m-\mathrm{diam}(T)$ edges

OP-946 Good-Slope Gap Bound for Non-Extremal Permutations of Odd Composite ModuliNot in LeanCombinatorics for TCS

Let $n \ge 3$ be an odd integer with at least two distinct prime factors, and let $q$ be the largest prime divisor of $n$. For a permutation $f$ of $\mathbb{Z}_n = \mathbb{Z}/n\mathbb{Z}$, let $D_n(f) = \{m \in \mathbb{Z}_n : x \mapsto f(x) + mx \text{ is a permutation of } \mathbb{Z}_n\}$. Is it true that every non-extremal permutation $f$ of $\mathbb{Z}_n$ (that is, every permutation satisfying $|D_n(f)| < \varphi(n)$, where $\varphi$ is Euler's totient function) satisfies $|D_n(f)| \le \varphi(n)\frac{q-2}{q-1}$?

Posed in arXiv:2611.01465, Question 11.2 — Extremal permutations of $\mathbb{Z}_n$ with many good slopes and applications to quantum Latin squares

OP-947 Good-Slope Gap Bound for Permutations of Residue Ring Modulo 105Not in LeanCombinatorics for TCS

Does every permutation $f$ of the residue ring $\mathbb{Z}/105\mathbb{Z}$ that is non-extremal (meaning that the set $D_{105}(f) = \{m \in \mathbb{Z}/105\mathbb{Z} : x \mapsto f(x) + mx \text{ is bijective}\}$ has size $|D_{105}(f)| < \varphi(105) = 48$) satisfy $|D_{105}(f)| \le 40$?

Proposed here, building on arXiv:2611.01465, Sec. 11, after Question 11.2 — Extremal permutations of $\mathbb{Z}_n$ with many good slopes and applications to quantum Latin squares; the paper does not ask it

What is known

The paper establishes the gap bound $|D_n(f)| \le \varphi(n)(q-2)/(q-1)$ for all odd prime powers, products of two distinct odd primes, products $n=mq$ with $q > m$ and $\varphi(m) \le (q-1)/2$, and all congruence-preserving permutations of odd composite $n$. Combined with companion work, this settles every odd composite modulus $n < 105$. The modulus $n = 105 = 3 \times 5 \times 7$ is the first open case, with $q = 7$ and $\varphi(105)(q-2)/(q-1) = 48 \times 5/6 = 40$. By Corollary 8.7, any potential counterexample on $\mathbb{Z}_{105}$ cannot preserve congruences modulo any proper divisor $d \in \{3, 5, 7, 15, 21, 35\}$.

OP-948 Exact maximum clique count under even degree and matching constraintsNot in LeanGraph Theory & Graph Algorithms

Let D = 2h >= 2, 3 <= t <= D+1, and M >= 0 be integers. Write M = qh + r with 0 <= r < h, and let f_r = max(choose(2r+1, t), choose(r, t) + (D+1-r)*choose(r, t-1)) for r > 0, and f_0 = 0. Is it true that every finite simple graph G with maximum degree at most D and matching number at most M has at most q * choose(D+1, t) + f_r cliques of size t? Equivalently, is F_t(D, M) = q * choose(D+1, t) + f_r for all M >= 0?

Proposed here, building on arXiv:2611.01259, Theorem 4.3 — Clique counts under degree and matching constraints; the paper does not ask it

What is known

Theorem 4.3 establishes that for even D = 2h, F_t(D, M) >= q * choose(D+1, t) + f_r, where M = qh + r with 0 <= r < h. Corollary 4.5 proves an eventual recurrence F_t(D, M) = choose(D+1, t) + F_t(D, M-h) whenever M > floor((D*a*r - b*f_r)/c). It leaves open whether the lower bound is tight for all M, i.e., whether the threshold is merely an artifact of the deficient edge counting method and F_t(D, M) = q * choose(D+1, t) + f_r holds for every M >= 0.

OP-950 Alternating Maximizers of Input Entropy for the Three-Deletion ChannelNot in LeanInformation Theory & Coding

Let $n \ge 1$ be a positive integer. Consider the binary deletion channel with 3 deletions under a uniform prior on binary input words of length $n+3$. For a received word $y \in \{0, 1\}^n$, let $e(y, x)$ denote the number of subsequence embeddings of $y$ in $x \in \{0, 1\}^{n+3}$, and let the posterior input entropy given $y$ be $H_{D,3}(y) = \log_2(8\binom{n+3}{3}) - \frac{1}{8\binom{n+3}{3}} \sum_{x \in \{0,1\}^{n+3}} f(e(y, x))$, where $f(t) = t \log_2 t$ for $t > 0$ and $f(0) = 0$. Is it true that for every $n \ge 1$, the only words $y \in \{0, 1\}^n$ maximizing $H_{D,3}(y)$ are the two alternating words $A_n = 0101\cdots$ and $\overline{A_n} = 1010\cdots$?

Posed in arXiv:2611.01064, Conjecture 6.2 — Maximal input entropy for binary two-deletion and two-insertion channels

What is known

The paper proves that alternating words uniquely maximize input entropy for two deletions at all positive lengths, determines the exact three-deletion histogram of alternating words for all lengths, and certifies the three-deletion conjecture by exhaustive exact integer comparison for all lengths through twelve. Proving optimality for arbitrary nonalternating words for all n >= 1 remains open.

OP-951 Existence of Infinitely Many F-Irregular Oriented Graphs for Any Weakly Connected MotifNot in LeanCombinatorics for TCS

Let $F$ be a finite weakly connected oriented graph (that is, an orientation of a simple undirected connected graph without 2-cycles) on at least 3 vertices. For a finite oriented graph $G$ and vertex $v \in V(G)$, the $F$-degree of $v$ is the number of subgraphs of $G$ isomorphic to $F$ that contain $v$. An oriented graph $G$ is called $F$-irregular if all vertices of $G$ have pairwise distinct $F$-degrees. Does every weakly connected oriented graph $F$ of order $|V(F)| \ge 3$ admit an infinite family of pairwise non-isomorphic $F$-irregular oriented graphs?

Posed in arXiv:2611.02760, Conjecture 3 — Every tournament $T$ of order at least 3 admits infinitely many $T$-irregular oriented graphs

What is known

Introduced in 2026 as the oriented analogue of the strong conjecture on F-irregular graphs. It was established for directed cycles in prior work and settled for all tournaments in this paper; it remains open for all other weakly connected oriented graphs.

OP-954 Agnostic query learning of Boolean halfspaces in fully polynomial timeNot in LeanComputational Learning Theory

Does there exist an agnostic learning algorithm for halfspaces on $\{\pm 1\}^n$ under the uniform distribution that, given query access to an arbitrary target function $f : \{\pm 1\}^n \to \{\pm 1\}$ and accuracy parameter $\varepsilon \in (0, 1/2)$, runs in time bounded by $\mathrm{poly}(n, 1/\varepsilon)$ (fully polynomial in both the dimension $n$ and $1/\varepsilon$) and outputs a hypothesis $h : \{\pm 1\}^n \to \{\pm 1\}$ satisfying $\mathrm{err}_f(h) \le \mathrm{OPT}_f + \varepsilon$ with probability at least $2/3$, where $\mathrm{err}_f(h) = \Pr_{\boldsymbol{x} \sim \{\pm 1\}^n}[h(\boldsymbol{x}) \ne f(\boldsymbol{x})]$ and $\mathrm{OPT}_f = \min_{g \in \mathcal{H}_n} \mathrm{err}_f(g)$?

Posed in arXiv:2611.02344, Sec. 1.3, under "Learning with Queries" — Efficient Proper Agnostic Learning of Halfspaces

OP-956 Shellability of Principal Lower Intervals in Quasisymmetric Bruhat OrderNot in LeanCombinatorics for TCS

Let $P$ be the quasisymmetric Bruhat order on indexed binary forests, where covers $F \lessdot G$ are defined by the appearance of the forest polynomial $P_G$ in $(x_1 + \dots + x_i)P_F$ for some $i \ge 1$. For any indexed binary forest $F$, is the principal lower interval $[\varnothing, F] = \{E \in P : E \le F\}$ shellable, in the sense that the order complex of the proper subposet $(\varnothing, F)$ is a shellable simplicial complex? Equivalently, is every zigzag lower interval $[\varnothing, Z]$ shellable?

Posed in arXiv:2611.02210, Conjecture 6.11 — A Quasisymmetric Analogue of the Bruhat Order

OP-959 Uniqueness of the 11-Cycle Among Graphs with Only Šoltés VerticesNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite connected simple graph. The Wiener index $W(G)$ is defined as $\sum_{\{u, v\} \subseteq V(G)} d_G(u, v)$. A vertex $v \in V(G)$ is called a Šoltés vertex if the vertex-deleted subgraph $G - v$ is connected and $W(G - v) = W(G)$. Is the 11-cycle $C_{11}$ the unique connected simple graph in which every vertex is a Šoltés vertex?

Posed in arXiv:2611.01808, Introduction, lines 112-113 — An infinite family of graphs with \v{S}olt\'es fraction uniformly above one half

What is known

Šoltés originally conjectured in 1991 that the 11-cycle is the unique connected graph whose Wiener index is invariant under the deletion of any single vertex. All exhaustive computational searches up to order 25 and structural analyses for specific graph classes have confirmed this, but the general conjecture remains wide open.

OP-960 Existence of Graphs Distinct from the 11-Cycle with Šoltés Fraction Exceeding 2/3Not in LeanGraph Theory & Graph Algorithms

Does there exist a finite connected simple graph $G$ not isomorphic to the cycle $C_{11}$ whose Šoltés fraction satisfies $R_0(G) > 2/3$, where $R_0(G) = |\{v \in V(G) : G - v \text{ is connected and } W(G - v) = W(G)\}| / |V(G)|$?

Proposed here, building on arXiv:2611.01808, Theorem 1 — An infinite family of graphs with \v{S}olt\'es fraction uniformly above one half; the paper does not ask it

Reported solved in the literature; not yet checked in Lean.

What is known

The paper constructs an infinite family of graphs with Šoltés fraction strictly greater than 1/2, decreasing from 2/3 down to (sqrt(21)-3)/3 ≈ 0.5275. Apart from the 11-cycle C_11 (which has fraction 1) and eight known graphs of order at most 12 with fraction exactly 2/3 (Cambie 2026), no connected graph with Šoltés fraction strictly greater than 2/3 is known. It remains open whether 2/3 is an absolute upper bound for all graphs other than C_11.

OP-961 Equality in Lower Bound for Generalized Schur Numbers with at Least Four ColorsNot in LeanCombinatorics for TCS

For every integer $k \ge 3$ and $r \ge 1$, let $T_k(r)$ be the least positive integer $N$ such that every $r$-coloring of the discrete interval $\{1, \dots, N\}$ contains a monochromatic solution to the equation $x + (k - 1)y = z$. While $T_k(1) = k$, $T_k(2) = k^2 + k - 1$, and $T_k(3) = k^3 + 2k^2 - 2$, the general lower bound is $T_k(r) \ge \frac{(k - 1)(k + 1)^r + 1}{k}$. Does equality $T_k(r) = \frac{(k - 1)(k + 1)^r + 1}{k}$ hold for all $k \ge 3$ and all $r \ge 4$? In particular, is $T_k(4) = k^4 + 3k^3 + 2k^2 - 2k - 3$ for all $k \ge 3$?

Posed in arXiv:2611.01714, Sec. 9, item (3) — The Three-Color Generalized Schur Number of \(x+(k-1)y=z\): A Proof for All \(k\) from a Critical Set of 33 Polynomials

OP-962 Minimum Cardinality of a Universal Critical Polynomial Set for Three-Color Generalized Schur TriplesNot in LeanCombinatorics for TCS

Let $k$ be a formal indeterminate, and let $\mathbb{Z}[k]$ be the ring of polynomials in $k$ with integer coefficients. A finite subset $X \subset \mathbb{Z}[k]$ is defined to be universal critical for 3 colors if (1) for all $p \in X$ and all integers $k \ge 3$, $1 \le p(k) \le k^3 + 2k^2 - 2$, and (2) every 3-coloring $\Delta : X \to \{1, 2, 3\}$ produces a monochromatic triple $(x, y, z) \in X^3$ satisfying $z = x + (k - 1)y$ in $\mathbb{Z}[k]$. What is the minimum cardinality $m$ of a universal critical set $X \subset \mathbb{Z}[k]$? In particular, does there exist a universal critical set with $|X| < 33$, or is $m = 33$?

Posed in arXiv:2611.01714, Sec. 9, item (1) — The Three-Color Generalized Schur Number of \(x+(k-1)y=z\): A Proof for All \(k\) from a Critical Set of 33 Polynomials

OP-965 Optimality of 45/47 for Max-4-Cut gadgets under the soundness criterionNot in LeanApproximation & Inapproximability

Let k = 4. Consider gadget reductions from balanced role-separated instances of 3Lin(ℤ₃) to Max-4-Cut using a triple of edge-weighted graphs (I₀, I₁, I₂) sharing primary vertices p₁, p₂, p₃ and global vertices g₀, g₁, g₂, g₃. For x ∈ [4]³ and y ∈ [4]⁴, let V_t(x, y) denote the maximum weight of cut edges in I_t when primaries receive colours x and globals receive colours y. Let C_t = min_{x ∈ sat_t} V_t(x, (0,1,2,3)), where sat_t = {x ∈ {0,1,2}³ : x₁ + x₂ + x₃ ≡ t mod 3}. Assuming V_t(x₁, x₂, x₃, y) = V_t(x₁, x₃, x₂, y) for each t, does every such family satisfy max_{x,y} ∑_{t=0}^2 V_t(x, y) ≥ (45/47) ∑_{t=0}^2 C_t, or does there exist a family achieving a ratio strictly less than 45/47?

Posed in arXiv:2611.01402, Section 8, paragraph 3 — Improved NP-Hardness of Approximation for Max-3-Cut and for Max-k-Cut with Small k

What is known

For k = 3, Theorem 7.1 establishes an exact barrier of 27/29 for any gadget family from 3Lin(Z_3) under the soundness criterion. For k = 4 and k = 5, the paper gives gadget families achieving 45/47 and 33/34, and extensive column generation found no improvement, but proving optimality remains open.

OP-966 Perfect completeness inapproximability for Max-3-Cut on 3-colourable graphsNot in LeanApproximation & Inapproximability

Can the negation trick be applied to a source predicate with perfect completeness to prove that Max-3-Cut on 3-colourable graphs is NP-hard to approximate within a factor strictly less than 16/17? Equivalently, does there exist a reduction from an NP-hard constraint satisfaction problem with perfect completeness to Max-3-Cut that preserves 3-colourability in the YES case and achieves a soundness-to-completeness ratio strictly less than 16/17?

Posed in arXiv:2611.01402, Section 8, paragraph 1 — Improved NP-Hardness of Approximation for Max-3-Cut and for Max-k-Cut with Small k

What is known

The paper improves the NP-hardness of approximation of Max-3-Cut on general graphs from 16/17 to 27/29, but loses completeness (29/30). On 3-colourable graphs, the best known hardness ratio remains 16/17 from 2014. The paper poses the question of whether the negation trick can be paired with an NP-hard source with perfect completeness.

OP-967 Tightness of the uniform gadget family ratio for Max-k-Cut under the soundness criterionNot in LeanApproximation & Inapproximability

Let k ≥ 3 and L = k - 3. Let Γ_L = 29 + 18L + 3 Nat.choose L 2. For every Max-k-Cut gadget family (I₀, I₁, I₂) satisfying the symmetry condition V_t(x₁, x₂, x₃, y) = V_t(x₁, x₃, x₂, y) of Theorem 4.1, is the soundness-to-completeness ratio ρ = (max_{x ∈ [k]³, y ∈ [k]^k} ∑_{t=0}^2 V_t(x, y)) / ∑_{t=0}^2 C_t bounded below by 1 - 2/Γ_L?

Proposed here, building on arXiv:2611.01402, Theorem 1.2 — Improved NP-Hardness of Approximation for Max-3-Cut and for Max-k-Cut with Small k; the paper does not ask it

What is known

Theorem 1.2 proves that for every k ≥ 3, the gadget family (2A_L, N_L, N_L) with L = k - 3 achieves ratio ρ = 1 - 2/Γ_L with Γ_L = 29 + 18L + 3 Nat.choose L 2 under Theorem 4.1. Theorem 7.1 proves this ratio is optimal for L = 0 (k = 3). For L = 1 (k = 4) and L = 2 (k = 5), extensive LP column generation found no better gadgets. It is open whether 1 - 2/Γ_L is the exact barrier under Theorem 4.1 for all L ≥ 1.

OP-968 Sharpness of universal upper bound eight for moving-target search on large gridsNot in LeanCombinatorial Games

Let $G_{M,N} = P_M \square P_N$ be the rectangular grid graph with vertex set $V = \{1,\dots,M\} \times \{1,\dots,N\}$, where two distinct vertices are adjacent if and only if their $\ell_1$-distance is 1. A hidden target follows an unknown trajectory $v_0, v_1, v_2, \dots$ in $V$ such that $\operatorname{dist}_{G_{M,N}}(v_{i-1}, v_i) \le 1$ for all $i \ge 1$ (the target may stay in place or move to an adjacent vertex). At each round $i \ge 1$, after the target moves to $v_i$, the searcher selects a query subset $T_i \subseteq V$ and receives the noiseless answer $y_i = \mathbf{1}_{\{v_i \in T_i\}}$. The searcher may adaptively choose $T_i$ and the stopping time $\tau$ based on $y_1, \dots, y_{i-1}$. Immediately after the final answer $y_\tau$ (without any subsequent target movement), the set of candidate target locations is $D_\tau$. The optimal adaptive accuracy $s^*(M,N)$ is the minimum positive integer $s$ such that there exists a finite deterministic adaptive strategy guaranteeing $|D_\tau| \le s$ for every admissible target trajectory. Is $s^*(M,N) = 8$ for all sufficiently large $M, N$ with $M, N \ge 10$? In other words, does there exist any finite adaptive strategy that localizes the target to at most 7 vertices on all sufficiently large rectangular grids?

Posed in arXiv:2611.01281, Section 7 — Two-Dimensional Search for a Moving Target on Rectangular and Cylindrical Grids

OP-971 Exact Information Complexity of Binary Inner Product at Positive ErrorNot in LeanCommunication Complexity

Let $m \ge 1$ be an integer and $\varepsilon \in (0, 1/2)$. Let $U$ denote the uniform distribution on $\mathbb{F}_2^m \times \mathbb{F}_2^m$. For a randomized two-player communication protocol $\Pi$ between Alice (receiving $X \in \mathbb{F}_2^m$) and Bob (receiving $Y \in \mathbb{F}_2^m$) where Bob outputs an estimate $\widehat{f}(X,Y) \in \mathbb{F}_2$ with average error $\Pr[\widehat{f}(X,Y) \neq X \cdot Y] \le \varepsilon$, its information cost is $I(X; \Pi \mid Y) + I(Y; \Pi \mid X)$, and the information complexity $\operatorname{IC}_U^{\mathrm{B},\mathrm{av}}(\operatorname{IP}_m, \varepsilon)$ is the infimum of information costs over all such protocols. The paper shows that $(1-2\varepsilon)m - c_0 \le \operatorname{IC}_U^{\mathrm{B},\mathrm{av}}(\operatorname{IP}_m, \varepsilon) \le (1-2\varepsilon)m$ for an absolute constant $c_0 = \log_2(16+8\sqrt{2}) < 4.772$. What is the exact value of $\operatorname{IC}_U^{\mathrm{B},\mathrm{av}}(\operatorname{IP}_m, \varepsilon)$? In particular, is $\operatorname{IC}_U^{\mathrm{B},\mathrm{av}}(\operatorname{IP}_m, \varepsilon) = (1-2\varepsilon)m$ for all $m$ and $\varepsilon \in (0, 1/2)$, or can the upper bound $(1-2\varepsilon)m$ achieved by the mixture protocol be strictly improved?

Posed in arXiv:2611.02684, Section 7 — Information Complexity of Inner Product and Matrix Multiplication via Shannon-to-Min-Entropy Conversion

What is known

The paper resolves the first-order dependence on error for binary inner product by showing the information complexity lies between $(1-2\varepsilon)m - c_0$ and $(1-2\varepsilon)m$ with $c_0 < 4.772$, but leaves open the exact value of the information complexity at positive error.

OP-972 Efficient Computation of Minimum Covers in Graphic Matroid Parity Min-Max TheoremNot in LeanAlgorithm Design & Analysis

Let G = (V, E) be an undirected multigraph whose edge set E is partitioned into m pairs of distinct edges (called lines). The min-max theorem specialized to graphic matroid parity characterizes the maximum size of a graphic matroid matching (a set of lines forming a forest) in terms of a minimum cover over subgraphs and vertex partitions. Does there exist a polynomial-time algorithm that, given G and the line partition, computes such a minimum cover achieving the optimum in the graphic matroid parity min-max theorem?

Posed in arXiv:2611.02287, Section 1.1, footnote 3 — Faster graphic matroid parity: Breaking the $nm$ time complexity barrier

What is known

The paper notes that unlike the min-max theorem for linear matroid parity, the specialized min-max theorem for graphic matroid parity is not known in an algorithmic form, preventing its direct use in fast sequential algorithms.

OP-973 Nearly-Linear Time Maximal Disjoint Shortest Augmenting Path SearchNot in LeanAlgorithm Design & Analysis

Let G = (V, E) be an undirected multigraph with n vertices and m lines (disjoint pairs of edges). Given a graphic matroid matching M ⊆ E, does there exist an algorithm that finds a maximal set of disjoint shortest augmenting paths with respect to M in O(m log^c n) time for some constant c?

Posed in arXiv:2611.02287, Section 1.1, paragraph 4 — Faster graphic matroid parity: Breaking the $nm$ time complexity barrier

What is known

The paper notes that extending the augmenting path framework to find a maximal set of disjoint shortest augmenting paths in a single nearly-linear time search, while handling blossoms and transforms, would improve the running time of graphic matroid parity.

OP-978 The delta conjecture on maximum nullity and minimum degreeNot in LeanGraph Theory & Graph Algorithms

Let $G = (V, E)$ be a finite simple graph, and let $\delta(G)$ denote its minimum degree. Let $\mathcal{S}(G)$ be the set of all real symmetric $n \times n$ matrices $A = (a_{ij})_{i,j \in V}$ (where $n = |V|$) such that for all $i \ne j$, $a_{ij} \ne 0$ if and only if $\{i, j\} \in E$. The maximum nullity $\M(G)$ is defined as $\max_{A \in \mathcal{S}(G)} \operatorname{nullity}(A)$. Is it true that $\M(G) \ge \delta(G)$ for every finite simple graph $G$?

Posed in arXiv:2611.01102, Sec. 1, after Proposition 1.1 — A matroid characterization of the combinatorially symmetric maximum nullity of a graph

What is known

The paper proves that the combinatorially symmetric analogue N(G) >= delta(G) holds, but the symmetric counterpart M(G) >= delta(G) remains open.

OP-980 Complexity transition for Tseitin formulas in depth-three Algebraic Monotone CalculusNot in LeanProof Complexity

Let G = (V, E) be a sequence of d-regular expander graphs on n vertices with constant degree d >= 3, edge expansion h > 0, girth exceeding 4/h, and odd total Tseitin charge. The depth-three proof complexity of TS_G in Algebraic Monotone Calculus (measured by the monotone tensor rank rk^\otimes_+(chi(TS_G) - \epsilon * chi(1))) is known to be 2^{\Omega(\epsilon n)} when \epsilon = \omega(\log n / n), and polynomial O(n^3) when \epsilon <= 2^{-\Theta(n \log n)}. Determine the precise asymptotic threshold function \epsilon(n) between 2^{-\Theta(n \log n)} and \Theta(\log n / n) at which the monotone tensor rank transitions from superpolynomial to polynomial.

Posed in arXiv:2611.01055, Section 5, open question 3 — Nonnegative Rank Bounds for the Algebraic Monotone Calculus

OP-981 Uniform shift lower bound for depth-three Algebraic Monotone CalculusNot in LeanProof Complexity

Does there exist an explicit, polynomial-time uniform family of tautological DNF formulas A_N on N variables whose proof size in depth-three Algebraic Monotone Calculus is superpolynomial uniformly across all shift parameters \epsilon > 0, that is, \inf_{\epsilon > 0} rk^\otimes_+(chi(A_N) - \epsilon * chi(1)) = N^{\omega(1)}?

Posed in arXiv:2611.01055, Section 5, open question 1 — Nonnegative Rank Bounds for the Algebraic Monotone Calculus

OP-982 Superpolynomial lower bounds for unbounded fan-in depth-four AMCNot in LeanProof Complexity

Does there exist an explicit family of tautological DNF formulas requiring superpolynomial size proofs in Algebraic Monotone Calculus when proofs are restricted to monotone arithmetic formulas of ordinary depth four with unbounded fan-in, even at a fixed constant shift parameter \epsilon \in (0, 1]?

Posed in arXiv:2611.01055, Section 5, open question 2 — Nonnegative Rank Bounds for the Algebraic Monotone Calculus

OP-984 Simulation relations between Algebraic Monotone Calculus and standard proof systemsNot in LeanProof Complexity

Does Algebraic Monotone Calculus (AMC), either restricted to depth three or at unrestricted depth, polynomially simulate Cutting Planes, Sums-of-Squares, or Polynomial Calculus? Conversely, does any of these standard propositional proof systems polynomially simulate AMC?

Posed in arXiv:2611.01055, Section 5, open question 6 — Nonnegative Rank Bounds for the Algebraic Monotone Calculus

OP-985 Approximation Thresholds for Clearing in General and Writer-Solvent Financial NetworksNot in LeanEquilibria in Games

Consider financial networks with ordinary debts and credit default swaps (CDS). In general networks, the approximate clearing problem under weak recovery notions (W) and (I) is known to be PPAD-hard for rational error $\varepsilon < E_I^* \approx 0.2530$ (where $E_I^*$ is the root of an explicit degree-11 polynomial $P_I$) and solvable in polynomial time for $\varepsilon > \varepsilon_{\mathrm{lad}} \approx 0.2834$. For writer-solvent networks (where every CDS writer is ex-ante solvent), the problem is PPAD-hard for $\varepsilon < \alpha = (13 - \sqrt{153})/4 \approx 0.1577$ and solvable in polynomial time for $\varepsilon > 3 - 2\sqrt{2} \approx 0.1716$. What are the exact computational complexity thresholds for these two network classes? Specifically, does there exist a sharp threshold separating PPAD-hardness from polynomial-time solvability in each case?

Posed in arXiv:2611.00855, Sec. 13, item 1 — Approximate clearing in financial networks with credit default swaps: hardness thresholds, a box algorithm, barriers, and exact solvency at bounded degree

OP-986 Polynomial-Time Resolution of Stalled Configurations in Interval Clearing AlgorithmsNot in LeanEquilibria in Games

For approximate clearing in writer-solvent CDS networks, interval propagation (Algorithm $\mathrm{BOX}(E)$) can stall inside the window $(\alpha, 3 - 2\sqrt{2}]$ on inverter cycle configurations, leaving an unsettled subset $U$ of banks with a stalled box $P = \prod_{i \in U} [lo_i, hi_i]$. Can every such stall be resolved in polynomial time? In particular, does there exist an algorithm that, given an inverter stall configuration where each unsettled bank holds CDS contracts on other unsettled banks, decides in polynomial time whether an exact clearing vector exists in $P$ and finds an (I)-$E$ approximate clearing vector?

Posed in arXiv:2611.00855, Question 10.8 — Approximate clearing in financial networks with credit default swaps: hardness thresholds, a box algorithm, barriers, and exact solvency at bounded degree

OP-987 Complexity and Totality of Clearing with Default CostsNot in LeanEquilibria in Games

In financial networks with credit default swaps where defaulting banks incur discontinuous default costs (e.g. a fraction of remaining assets or fixed bankruptcy cost), exact clearing vectors need not exist. For approximate clearing notions such as the exempted solvency notion (D^\circ) and the clipped-ratio notion (S), does every network with default costs possess an approximate clearing vector for every rational error $\varepsilon > 0$ (totality), and what is the computational complexity (e.g. in PPAD or NP-hard) of finding one?

Posed in arXiv:2611.00855, Sec. 13, item 6 — Approximate clearing in financial networks with credit default swaps: hardness thresholds, a box algorithm, barriers, and exact solvency at bounded degree

OP-988 thermomajorization universal binary probes subset sum minimumNot in LeanQuantum Mechanics

Fix n >= 2 and a strictly positive probability vector g on {1,...,n}. For a probability vector x let L_x(t) be its thermomajorization curve relative to g, and for a subset S put C_x(S)=L_x(sum_{i in S} g_i). A fixed family F of nonempty proper subsets is called universal if, for every pair of probability vectors x,y, the inequalities C_x(S) >= C_y(S) for all S in F imply L_x(t) >= L_y(t) for every t in [0,1]. Is the minimum cardinality of a universal family exactly the number of distinct values among the nontrivial subset sums sum_{i in S} g_i? Equivalently, is every distinct nontrivial subset-sum abscissa indispensable: for each such t, do there exist probability vectors x,y with L_x(t)<L_y(t) but L_x(u)>=L_y(u) at all other distinct subset-sum abscissas? If so, generic g requires 2^n-2 fixed binary probes, while uniform g requires n-1.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Experimenters and quantum thermodynamicists need to know the cost of deciding arbitrary future conversions with one fixed battery of binary probes. Meroi et al. use at most n-1 probes tailored to the target; this does not give a lower bound for one family chosen before both states are known. Sufficiency follows from the paper's capacity/Lorenz formula and the location of curve breakpoints, but necessity requires constructing pairs of allowed n-level Lorenz curves that hide a violation at any specified subset sum, including when subset sums collide. The exponential-versus-linear distinction would quantify a state-adaptivity gap. Evidence: A linear-program search over Lorenz-order regions found strict isolated violations at every distinct nontrivial subset sum for Gibbs weight vectors proportional to (1,1,1), (1,2,4), (1,1,2,2), and (1,2,4,8), including all 14 abscissas of the last case; these are numerical witnesses, not formal proofs.

OP-990 fence rank sixth root sharp imbalance zigzagNot in LeanCombinatorics for TCS

For n>=2 orient each edge of the path 1-2-...-n arbitrarily, take its transitive closure as a fence poset F, and put R_F(z)=sum_{I} z^{|I|}, the sum over its order ideals. Let zeta=exp(pi*i/3). Is the maximum of |R_F(zeta)|^2 over all such fences equal to (k+1)^2 for n=2k, and k^2+3k+3 for n=2k+1? Moreover, is equality attained exactly by the two alternating orientations (zigzag fences)?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Enumerative combinatorialists study the distribution of order-ideal sizes and hyperbinary lengths. Alekseyev's Theorem 19 and Corollary 20 give the remarkably bounded cubic-root evaluation for every fence; the sixth-root evaluation instead has a growing discrepancy. Byakuno, Ren and Yanagawa classify the specializations of the q-deformed modular group and show the sixth-root case is infinite but has special structure; the group classification alone does not provide the exact maximum at prescribed fence size or identify all maximizing orientations. This sharp extremal theorem bridges their representation with the fence/hyperbinary length statistic. Evidence: Exact arithmetic in Z[zeta] enumerated all 2^(n-1) orientations for n=1,...,19: the displayed values held and for every n>=2 the only maximizers were the two zigzag orientations. A separate root-of-unity sweep through n=16 also found bounded values for orders 3,4,5 and rapidly growing zigzag values at orders 7 and 8.

OP-991 positive trace preserving sharp spectral gap all dimensionsNot in LeanQuantum Computation

For each integer d>=3, let V_d be the maximum over complex-linear positive trace-preserving maps Phi:M_d(C)->M_d(C) of Re Tr(Phi) - d*min_{lambda in spectrum(Phi)} Re(lambda) - d^2 + d, where Tr is the trace of the d^2-dimensional superoperator. Is V_d=2/(d-1) for every d>=3? In particular, does the positive trace-preserving inequality Re Tr(Phi) <= d*min Re spectrum(Phi)+d^2-d+2/(d-1) hold universally, with equality attained by the rank-two transposition mixture from the knowledge base?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Spectral bounds distinguish positive from 2-positive maps in quantum information. The 2-positive bound has zero excess, while AFTD's proved rank-two construction exhibits excess at least 2/(d-1); knowing the exact positive-map envelope would quantify the entire gap rather than give a single counterexample. Other positive qutrit counterexamples, including indecomposable examples, already appear in Poderini et al.; neither those examples nor the cited AFTD result establish a global upper bound. This question strengthens the open-ended optimization mentioned in the OP-733 research post to a falsifiable exact all-dimensions formula. Evidence: Optimizing equal-weight transpose projections of every rank for d=3,...,30 returned rank two and excess 2/(d-1). Numerical local searches over general real one-Kraus CP plus one-Kraus co-CP trace-preserving maps in d=3,4 did not exceed it. A linear outer relaxation restricted to real self-adjoint unital qutrit maps with an antisymmetric minimum eigenvector, using sampled product-state inequalities and iterative cuts, decreased its bound toward 1.00002; it is not a proof or a certificate for all positive maps.

OP-992 degree sequence graph digraph square equality triangle certificateNot in LeanGraph Theory & Graph Algorithms

Let d=(d_1,...,d_n) be a graphical degree sequence. Write G(d) for the number of labeled simple graphs with degrees d and D(d) for the number of labeled loopless digraphs with both indegree and outdegree d, allowing both opposite arcs. Is D(d)=G(d)^2 if and only if no such digraph contains three vertices a,b,c with arcs a->b, b->c, c->a present and all three reverse arcs absent? Equivalently, whenever any same-in/out-degree realization has non-bipartite unreciprocated-edge support, must there exist some realization with an induced directed 3-cycle?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers comparing random graphs with random digraphs of the same degree sequence need to understand when their counting gap vanishes. Mehrdad studies G(d) versus sqrt(D(d)) and explicitly asks about the special case of threshold sequences, but does not classify the equality cases. Csikvari and Imolay's Eulerian-orientation versus half-graph theorem gives D(d)>=G(d)^2 after decomposing both counts by doubled and asymmetric edge support; it does not, by itself, show that a strict gap can always be detected by a directed triangle. The proposed criterion would also make equality recognizable by O(n^3) bipartite b-matching feasibility tests, avoiding either #P counting problem. Evidence: Exact enumeration of every graphical degree sequence on n<=7 vertices found no mismatch, including nonunique equalities; for example d=(1,1,1,1) has G=3 and D=9, while d=(1,1,1,1,1,1) has G=15 and D=265. Independent max-flow tests on sampled n=8,9 degree sequences found equality in all 39 cases where no such triangle exists. Searches on 81 additional triangle-free sampled sequences for n=8,9,10,12 found no realization with an asymmetric directed 5-cycle; finite evidence is not a proof.

OP-993 dicke gap mod four stabilizer magic asymptoticsNot in LeanStatistical Mechanics & Thermodynamics

Fix an integer r>=1. For n divisible by four and n>=2r, let |psi_{n,r}> be the normalized signed sum of all n-bit computational basis vectors of Hamming weight n/2 minus the sum of all those of weight n/2-r (each basis vector has amplitude +1 or -1 before normalization). Define its stabilizer purity P_2(n,r)=2^(-n) times the sum over all tensor products P of I,X,Y,Z of <psi_{n,r}|P|psi_{n,r}>^4. As n tends to infinity through multiples of four, is it true that n^2 P_2(n,r) tends to 128/pi^2 when r is odd and 1024/pi^2 when r is 2 modulo 4, while for r divisible by 4 the limit C_r=lim n^8 P_2(n,r) exists, is finite and strictly positive? Determine C_r in the latter case. In particular, does the cancellation case have a stabilizer Renyi-2 entropy 8 log_2 n + O(1), rather than the 2 log_2 n + O(1) of the other residue classes?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Quantum information and many-body researchers use stabilizer Renyi entropy to quantify magic and compare it with entanglement. These states are elementary two-level, permutation-symmetric energy filters from the KB's energy-filter family, yet their magic is a different observable from the KB's bipartite Renyi purity. The residue-dependent entropy coefficient would identify an arithmetic cancellation invisible to the central Dicke-state estimate and a failure mode of the widely useful six-coherent-state approximation. This asks for an infinite-family asymptotic classification and its constants, not a single finite instance. The existing broad bipartite energy-filter limit OP-892 remains an open crux and is not assumed as a proved theorem. Evidence: Exact integer Krawtchouk sums for gaps r=1,...,8 through n=256 show the two proposed nonzero n^2 scaling classes and substantially faster decay for r=4,8. For r=4, n^8 P_2 changes from 2.23e8 at n=192 to 1.71e8 at n=384, while the exact purity divided by the six-axis estimate rises from about 13.5 to 34.1. Grouping by Pauli-string type finds near-axis sectors beyond the six-axis approximation contribute appreciably. Independent direct Pauli enumeration agrees with the grouped calculation for signed filters through n=12.

OP-995 profitable tanking sharp blocking pair budgetNot in LeanMatching & Market Design

For integers n>=3 and 0<=k<=n, let B(n,k) be the maximum number of blocking pairs with respect to sincere preferences, over all complete strict n-by-n marriage markets and all histories satisfying: men never tank; at most k distinct women each make at most one unilateral self-demotion action; every action strictly improves its mover's sincere partner under men-proposing deferred acceptance; and the last induced profile is a tanking equilibrium against arbitrary further unilateral demotions. Is B(n,k)=k(n-2)-floor(k^2/4) for every n and k in this range? A tanking action moves the acting woman downward, possibly by different distances, in any collection of men's lists while preserving all other relative orders in those lists. The history may be empty and the maximizing market may depend on n and k.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Matching-market researchers need quantitative measures of how unstable the sincere market can become after individually profitable strategic interventions. Bailey's Proposition 5.12 exhibits one blocker and Corollary 5.14 establishes convergence, but neither quantifies the worst instability as the number of intervening agents grows. OP-882 asks for a full reachability characterization; this asks a different, sharp two-parameter extremal invariant in the one-action-per-agent regime. The naive bound k(n-2) comes from charging each sincere blocker to a mover and using strict gain; the proposed quadratic deficit captures interaction among movers and cannot be inferred from that bound. The conjecture gives a full family, including a growing-coalition regime. Evidence: Exact constraint models covering all strict profiles and intermediate proposer-optimal matchings certify: for n=4 the maxima for k=2,3 are 3,4; for n=5 the maxima for k=2,3,4 are 5,7,8. Independent DA simulations check the witness actions, strict gains, final uniqueness and blockers. Explicit rejection-chain families realize n-2, 2n-5 and 3n-8 for one, two and three movers, respectively, through n=30. A six-agent upper-bound solver timed out, so the formula for larger n and k remains a conjecture; actors in these checks move once each.

OP-996 quantum power mean sharp trace distance phase transitionNot in LeanQuantum Mechanics

For 0<p<1 and finite-dimensional density matrices rho,sigma, put T(rho,sigma)=Tr|rho-sigma|/2 and Phi_p(rho,sigma)=1-Tr[((rho^p+sigma^p)/2)^(1/p)]. Let C_p be the supremum of Phi_p(rho,sigma)/T(rho,sigma) over all dimensions and all distinct states. For 0<t<=1 define Q_p(t)=1-((1+sqrt(1-t^2))/2)^(1/p)-((1-sqrt(1-t^2))/2)^(1/p). Is C_p exactly max_{0<t<=1} Q_p(t)/t, so a pair of pure qubit states always attains the optimal dimension-free constant? Further, if a_* is the unique root greater than 2 of 2^(a-1)=a^2-a+1 and p_*=1/a_*, is the maximizing t equal to 1 for p>=p_* and strictly between 0 and 1 for 0<p<p_*? In particular does the sharp constant equal 1-2^(1-1/p) exactly for p>=p_* and become strictly larger below p_*?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Quantum information researchers compare bounded divergences with trace distance to translate operational distinguishability guarantees and quantum-state-testing thresholds. Lam and Le introduced this entire p-power mean family, and Bao, Gao and Wang estimate it efficiently but give trace-distance comparisons only for pure states and nonsharp constants. The proposed theorem would give the exact dimension-free constant for every p, identify whether pure states always suffice, and reveal a parameter transition where nonorthogonal quantum states outperform the classical orthogonal construction. The proved KB projection-expectation identity is relevant to the rank-one case; the mixed-state inequality and transition are new questions. Evidence: For p=0.1, an explicit pure pair with trace distance 0.8 has divergence about 0.89263, exceeding the classical linear value 0.79844; the pure-state optimal ratio is about 1.12532. Numerical optimization of rank-two qutrit pairs from three starts for ten p-values matches the pure-state optimum to about 1e-7, while random mixed complex states up to dimension eight give no larger ratio. Scalar optimization locates the transition at p_* about 0.16933847, consistent with the derivative-at-orthogonality equation. These optimizations are evidence, not a global certificate.

OP-997 power mean mutual information no subadditive exponentNot in LeanInformation Theory & Coding

For 0<p<1 define D_p(P,Q)=[1-sum_i((P_i^p+Q_i^p)/2)^(1/p)]/(1-p) for finite probability distributions, with D_0(P,Q)=1-sum_i sqrt(P_i Q_i) and D_1(P,Q)=JS(P,Q) (natural logarithms). Put I_p(U;V)=D_p(P_UV,P_U P_V). Is it true that for every p in [0,1], mutual I_p fails Markov-fork subadditivity I_p(X;YZ)<=I_p(X;Y)+I_p(X;Z), and indeed that a single full-support binary fork witnesses strict failure for every p? The proposed common witness has P(X=1)=1/256, P(Y=1|X=0)=1/128, P(Y=1|X=1)=1/2, P(Z=1|X=0)=1/512, P(Z=1|X=1)=1/5, and Y,Z independent conditional on X.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers studying generalized mutual information need to know which divergences preserve the basic subadditivity enjoyed by Shannon information. This is a complete parameter classification for the arithmetic-versus-power-mean family used in quantum divergence estimation, including its Hellinger and Jensen-Shannon limits. The knowledge base already refutes the Hellinger member, but that does not imply failure for the other exponents; OP-726 treats a different power-divergence family, whose behavior has a proposed golden-ratio threshold. A single full-support fork working for the entire continuum would give a strong, concise no-go theorem, not a finite-parameter calculation. Evidence: High-precision arithmetic on the stated single full-support rational fork gives a strictly positive subadditivity violation for all 1001 mesh points p=j/1000, including p=0 and the normalized p=1 limit; the smallest observed gap is 5.154265e-6 near p=0.261. Separate 450,000 random Markov-fork samples and binary-through-five-state numerical optimizations found violations for every tested exponent. The continuum claim remains to be established.

OP-1000 inverse even power ising exact ring reconstructionNot in LeanStatistical Mechanics & Thermodynamics

For every integer p>=2 and n>=1, do there exist rational coefficients c[a,b] such that, for every integer L>=2 and real h, [x^n] L^(-1) log(sum over s in {-1,1}^L of exp(h sum_i s_i + x sum_{0<=i<j<L} J_{p,L}(j-i)s_i s_j)) = sum_{a=0}^{pn} sum_{b=0}^n c[a,b] L^(-2a) tanh(h)^(2b), where J_{p,L}(r)=pi^(-2p) sum_{k in Z}|r+kL|^(-2p) for 1<=r<L? In particular, can each infinite-chain coefficient be reconstructed exactly from pn+1 distinct finite ring sizes?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Long-range statistical-mechanics researchers use high-temperature series to obtain the field-dependent thermodynamics. Rajabpour's inverse-square result gives a finite, exact ring-size interpolation rather than extrapolation; extending this to all inverse even powers would supply a family of reconstruction methods for different decay rates. The p=1 theorem does not state the p>=2 case: the Fourier kernel is B_{2p}, and the cyclotomic pole orders and graphwise L-degree bounds must be controlled for each p. Evidence: Experiment 14512 numerically computed exact spin sums at 90-digit precision for p=1,2,3 and coupling orders 1-3, h=0 and tanh h=1/3; at every order it fitted degree pn in L^-2 and an additional ring agreed to at least 90-digit-level absolute precision. Experiment 14519 extends p=2 to order 4. Interpolation is evidence, not a proof.

OP-1001 odd degree clique matching sharp densityNot in LeanGraph Theory & Graph Algorithms

For every odd integer D>=3, every integer t with 3<=t<=D+1, and every finite simple graph G of maximum degree at most D and matching number nu(G), is k_t(G) <= (binom(D+1,t)/((D+1)/2)) nu(G), where k_t counts t-vertex cliques? If so, characterize equality when nu(G)>0. In particular this would give the exact maximum q binom(D+1,t) whenever the matching bound is q(D+1)/2, attained by q disjoint K_(D+1).

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Extremal graph theorists seek clique maxima under simultaneous degree and matching constraints. Adak's recent theorem resolves the divisible-matching case for even D; the odd-degree case is left without that structural bound. His even-D proof uses a matching bound and an edge count that are tight on K_(D+1) only in the even-D parity, so it does not yield this assertion. The proposed inequality is sharp for an infinite family and would determine all divisible cases at once. Evidence: Experiment 14522 exhaustively checked all 8094 connected subcubic graphs through 11 vertices and all 7225 connected maximum-degree-5 graphs through 8 vertices for t=3 and 4; none exceeded the clique-per-matching density of K_(D+1). Disjoint unions inherit any connected counterexample or bound.

OP-1002 random graph state fixed qubit mmi violation whpNot in LeanQuantum Mechanics

Let G_n be an Erdos-Renyi random graph G(n,1/2) on {1,...,n}, and let r(S) be the rank over F_2 of the adjacency submatrix between S and its complement. For A={1} and any partition B,C,D of the remaining vertices define I_3(A:B:C)=r(A)+r(B)+r(C)-r(A union B)-r(A union C)-r(B union C)+r(A union B union C). Does the probability that there exist B,C,D with I_3(A:B:C)>=1 converge to 1 as n tends to infinity?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Graph-state entropies are binary cut ranks, and positive tripartite information violates monogamy of mutual information, a condition central to holographic entropy. Fuentes et al. study graph-state MMI violations and their graph-theoretic structure, while typical-entanglement results address randomly chosen states or fixed subsystem partitions. The adaptive search over all partitions here is different: it asks whether even a specified qubit almost surely participates in a violation. Its answer would connect typical quantum error-correcting entanglement to the existence of rare but exponentially numerous graph partitions. Evidence: In experiment 14540, all 3^(n-1) ordered partitions of the other vertices were checked for each fixed vertex of each sampled graph. Vertex 1 admitted a witness in 8/12 samples at n=12, 10/12 at n=14, and 5/5 at n=16. Experiment 14537 independently checked all four-partitions at n=8 through 12. These are small random samples, not evidence of a rate or a proof of the limit.

OP-1007 Universal agent threshold for balanced EF2 allocationsNot in LeanFair Division

Let $Q_2$ be the maximum integer such that for every positive integer $m$, every profile of $Q_2$ agents partitioned into two nonempty groups with arbitrary normalized monotone valuations on $m$ indivisible goods admits a balanced allocation (where the two bundle sizes differ by at most 1) that is envy-free up to two goods (EF2) for every agent. Equivalently, $Q_2 = \min_{n \ge 3} \chi(\mathrm{KG}(2n, n, 3)) - 1 = \lim_{n \to \infty} \chi(\mathrm{KG}(2n, n, 3)) - 1$. Determine the exact value of $Q_2 \in \{9, 10, 11, 12, 13\}$.

Posed in arXiv:2611.04486, Sec. 2, Consequences and boundary cases — Balanced Fair Division and Generalized Kneser Graphs

OP-1008 Asymptotic Growth of Extremal Functions for Permutations of Length SixNot in LeanCombinatorics for TCS

Let $S_6$ denote the set of all 720 permutations of $\{1, \dots, 6\}$. For $\pi \in S_6$, an increasing sequence $x_1 < x_2 < \dots < x_7$ of integers is a $\pi$-wave if its consecutive differences $x_{i+1} - x_i$ ($1 \le i \le 6$) are pairwise distinct and have relative order $\pi$, meaning $x_{i+1} - x_i > x_{j+1} - x_j \iff \pi(i) > \pi(j)$ for all $i, j \in \{1, \dots, 6\}$. Let $g(\pi, n)$ be the maximum cardinality of a $\pi$-wave-free subset of $\{1, \dots, n\}$, and let $P(\pi, r)$ be the least integer $N$ such that every $r$-coloring of $\{1, \dots, N\}$ contains a monochromatic $\pi$-wave. Determine, for every $\pi \in S_6$, the asymptotic orders of $g(\pi, n)$ as $n \to \infty$ and $P(\pi, r)$ as $r \to \infty$; in particular, determine whether there exists an integer $e_\pi \in \{1, 2, 3, 4, 5\}$ such that $g(\pi, n) = \Theta((\log n)^{e_\pi})$ and $P(\pi, r) = \Theta(r(\log r)^{e_\pi})$ for each $\pi \in S_6$.

Posed in arXiv:2611.04184, Sec. 6, paragraph 3 — Short permutation pattern waves: The complete length-five classification

What is known

The paper settles all 120 permutations of length five into logarithmic exponent classes 2, 3, and 4, leaving patterns of length six and beyond as the open frontier.

OP-1010 Randic Index Lower Bound by Adjacency Second EigenvalueNot in LeanGraph Theory & Graph Algorithms

Let $G = (V, E)$ be a connected simple undirected graph with $n \ge 2$ vertices. Let $R = \sum_{uv \in E} (d_u d_v)^{-1/2}$ be the Randić index of $G$, and let $\lambda_2$ be the second largest eigenvalue of the adjacency matrix $A$ of $G$. Is $R \ge \lambda_2 + 1$?

Posed in arXiv:2611.03879, Conjecture 1 (#643) — Lemmas and Conjectures in Spectral Graph Theory

OP-1014 Caporossi-Hansen Form of Randic Index Lower Bound by Graph RadiusNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a connected simple undirected graph on $n \ge 2$ vertices. Let $R = \sum_{uv \in E} (d_u d_v)^{-1/2}$ be the Randić index of $G$, and let $\rad(G) = \min_{v \in V} \max_{w \in V} \operatorname{dist}(v, w)$ be the radius of $G$. Is $R \ge \rad(G) + \sqrt{2} - \frac{3}{2}$?

Posed in arXiv:2611.03879, Conjecture 7 (Caporossi–Hansen form) — Lemmas and Conjectures in Spectral Graph Theory

OP-1015 Archdeacon's conjecture on rotation systems of complete graphsNot in LeanGraph Theory & Graph Algorithms

Let $n \\ge 3$ be an integer, and let $Z(n) := \\frac{1}{4} \\lfloor \\frac{n}{2} \\rfloor \\lfloor \\frac{n-1}{2} \\rfloor \\lfloor \\frac{n-2}{2} \\rfloor \\lfloor \\frac{n-3}{2} \\rfloor$. Let $\\Pi$ be any rotation system of the complete graph $K_n$, consisting of a cyclic permutation $\\pi(v)$ of $V(K_n) \\setminus \\{v\\}$ for each vertex $v$. For every 4-element subset $Q \\subseteq V(K_n)$, let $\\Pi|_Q$ be the induced rotation subsystem on $Q$. A 4-vertex rotation subsystem is crossing if it is realizable by a simple drawing of $K_4$ with one crossing, and non-realizable if it cannot be realized by any simple drawing of $K_4$ in the plane. Let $\\boxtimes(\\Pi)$ denote the number of 4-element subsets whose induced rotation subsystem is crossing, and let $\\mathrm{nr}(\\Pi)$ denote the number of 4-element subsets whose induced rotation subsystem is non-realizable. Is it true that $\\boxtimes(\\Pi) + \\mathrm{nr}(\\Pi) \\ge Z(n)$ for every rotation system $\\Pi$ of $K_n$?

Posed in arXiv:2611.03515, Conjecture 27 — The proof of the Harary--Hill conjecture: a detailed exposition and an extension to rotation systems

What is known

Dan Archdeacon conjectured in 1999 that every rotation system of K_n satisfies boxtimes(Pi) + nr(Pi) >= Z(n). The paper proves the weaker bound boxtimes(Pi) + 3 nr(Pi) >= Z(n) (Theorem 4), leaving Archdeacon's sharper conjecture open.

OP-1017 Size of Ill-Distributed B_k Sets for k at Least 5Not in LeanElementary Number Theory

Let k ≥ 5 be an integer, let 1/k ≤ α < 1, and let P be a set of prime numbers such that ∑_{p ∈ P} 1/p = ∞. For every ε > 0, does there exist N₀ = N₀(k, α, P, ε) such that every B_k-set A ⊆ {1, …, N} with N ≥ N₀ satisfying |{a mod p : a ∈ A}| ≤ α p for all p ∈ P satisfies |A| ≤ ε N^{1/k}?

Posed in arXiv:2611.03609, Conjecture 4.1 — On ill-distributed $B_3$ and $B_4$ sets

What is known

The paper proves the result for k = 3 and k = 4, but notes that for k ≥ 5 the comparison with modular additive energy E_Q(A) controls only the fourth power |A|^4, giving only o(N^{1/4}), which is weaker than the elementary bound O(N^{1/k}). Higher energies E_{r,Q}(A) fail to produce divergent gains.

OP-1019 Exponential Upper Bound on Non-Even-Degeneracy Probability for G(n, p)Not in LeanGraph Theory & Graph Algorithms

Let $p \in (0, 1)$ be a constant. A simple graph $G$ on $n$ vertices is even-degenerate if there exists a vertex ordering $(v_1, \dots, v_n)$ such that for every $i \in \{3, \dots, n\}$, the number of neighbors of $v_i$ in $\{v_1, \dots, v_{i-1}\}$ is even. Is the probability that the Erdős–Rényi random graph $G(n,p)$ is not even-degenerate bounded by $e^{-\Omega(n)}$ as $n \to \infty$? That is, does there exist a constant $c = c(p) > 0$ such that $\mathbb{P}(G(n,p) \text{ is not even-degenerate}) \le e^{-cn}$ for all sufficiently large $n$?

Posed in arXiv:2611.03444, Sec. 1, paragraph 3 — A nearly tight bound on the probability $G(n,p)$ is even-degenerate

What is known

The paper improves the previous bound of exp(-Omega(n^(1-alpha))) to exp(-Omega(n / log log n)), leaving only the log log n factor in the exponent to reach the trivial lower bound of 2^(-O(n)).

OP-1020 Strong fractional choice number of bipartite graphsNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite simple bipartite graph. Is the strong fractional choice number of $G$ always equal to its choice number, that is, $\operatorname{ch}_f^s(G) = \operatorname{ch}(G)$? Equivalently, is every $k$-choosable bipartite graph $(kb+1, b)$-choosable for all positive integers $b$?

Proposed here, building on arXiv:2611.03236, Sec. 1, after Question 1.3 — The strong fractional choice number can exceed the choice number; the paper does not ask it

What is known

The paper disproves the conjecture that ch_f^s(G) <= ch(G) for general graphs by constructing 3-choosable planar graphs with ch_f^s(G) >= 22/7 and k-choosable graphs with ch_f^s(G) >= k + 1/3. All counterexamples in the paper rely on gadgets containing odd cycles: the wheel W_5 has an odd rim C_5 and chromatic number 4, and the 8-vertex gadget H contains triangles. For 2-choosable graphs (which include bipartite graphs of choice number 2), equality ch_f^s(G) = ch(G) = 2 is known from the (2m, m)-choosability theorem of 1996. However, bipartite graphs can have arbitrarily large choice number (e.g. complete bipartite graphs K_{m,n}), and whether ch_f^s(G) = ch(G) holds for all bipartite graphs remains open.

OP-1022 Optimal Configurations and Maximum Pairwise Distance Product in Mordell's Problem for Ten or More PointsNot in LeanCombinatorics for TCS

For each integer $n \ge 10$, determine the maximum value $$M_n = \max \left\{ \prod_{1 \le i < j \le n} |z_i - z_j|^2 : z_1, \dots, z_n \in \mathbb{C},\; \sum_{i=1}^n |z_i|^2 = n \right\}$$ and classify all maximizing configurations $(z_1, \dots, z_n) \in \mathbb{C}^n$ up to Euclidean rotation, translation (centering), and index permutation.

Posed in arXiv:2611.03088, Sec. 7 — Optimal Configurations for Mordell's Problem

OP-1024 Existence of classical distance-regular graphs with parameters (d, 2, 1, 2^d - 2) for diameter d between 3 and 8Not in LeanGraph Theory & Graph Algorithms

Let $d$ be an integer such that $3 \le d \le 8$. Does there exist a distance-regular graph with classical parameters $(d, b, \alpha, \beta) = (d, 2, 1, 2^d-2)$, that is, a connected simple graph $\Gamma$ of diameter $d$ whose intersection numbers satisfy $b_i = (2^d - 2^i)(2^d - 2 - (2^i - 1))$ and $c_i = (2^i - 1) 2^{i-1}$ for all $0 \le i \le d$?

Posed in arXiv:2611.02986, Section 1, lines 201-205 — On local spectra of classical distance-regular graphs with $b = 2$

What is known

The paper rules out distance-regular graphs with classical parameters $(d, 2, 1, 2^d-2)$ for all $d \ge 9$ by showing that their local graphs must be isomorphic to $\Lambda_{2^d-1}$, which is impossible for $d \ge 9$. The existence for small diameters $3 \le d \le 8$ remains open.

OP-1025 Co-edge-regularity of local graphs in 1-thin classical distance-regular graphs of diameter at least 5Not in LeanGraph Theory & Graph Algorithms

Let $\Gamma$ be a distance-regular graph with classical parameters $(d, b, \alpha, \beta)$ of diameter $d \ge 5$. Suppose that $\Gamma$ is 1-thin, meaning that for every vertex $x$, all irreducible modules of the Terwilliger algebra $T(x)$ with endpoint at most 1 are thin (have 1-dimensional eigenspaces). Must the local graph $\Gamma(u)$ induced on the neighborhood of each vertex $u$ be co-edge-regular (i.e., every pair of non-adjacent vertices in $\Gamma(u)$ has the same number of common neighbors)?

Posed in arXiv:2611.02986, Section 1, lines 218-222 — On local spectra of classical distance-regular graphs with $b = 2$

What is known

Terwilliger proved that thin classical distance-regular graphs with diameter $d \ge 5$ have co-edge-regular local graphs. The authors pose generalizing this to 1-thin classical distance-regular graphs as an alternative route to ruling out $(d, 2, 1, 2^d-2)$.

OP-1026 Maximum Good Slopes of Non-Congruence-Preserving Permutations over Prime PowersNot in LeanElementary Number Theory

Let $p \ge 5$ be a prime number and $e \ge 2$ an integer. For a permutation $f$ of $\mathbb{Z}/p^e\mathbb{Z}$, an element $m \in \mathbb{Z}/p^e\mathbb{Z}$ is a good slope if $x \mapsto f(x) + mx$ is a permutation of $\mathbb{Z}/p^e\mathbb{Z}$. Let $D_{p^e}(f)$ denote the set of good slopes of $f$. The permutation $f$ is congruence-preserving if for every $0 \le i \le e$, $x \equiv y \pmod{p^i}$ implies $f(x) \equiv f(y) \pmod{p^i}$. What is the maximum of $|D_{p^e}(f)|$ over all permutations $f$ of $\mathbb{Z}/p^e\mathbb{Z}$ that are not congruence-preserving? In particular, for $p = 5$ and $e = 5$ (where the known bounds are $875 \le \max_f |D_{3125}(f)| \le 880$), is the maximum equal to 875?

Posed in arXiv:2611.04551, Question 10.1 — Good slopes, congruence preservation, and gaps over residue rings

OP-1029 Constant competitiveness of Fair-Bias on general metric spacesNot in LeanOnline Algorithms

Let $(X, d)$ be a finite metric space and let $S = (s_1, \ldots, s_n)$ be $n$ server locations in $X$. Let $\nu = \frac{1}{n} \sum_{j=1}^n \delta_{s_j}$ be the uniform distribution over the servers. For any nonempty $F \subseteq [n]$, let $\nu_F = \frac{1}{|F|} \sum_{i \in F} \delta_{s_i}$, and let $g_k = \mathbb{E}_{A \sim \mathcal{U}_k}[W_1(\nu_A, \nu)]$ where $\mathcal{U}_k$ is the uniform distribution over $k$-element subsets of $[n]$ and $W_1$ is the Wasserstein-1 distance. The Fair-Bias algorithm assigns each arriving request drawn i.i.d. from $\nu$ according to an optimal transport plan between $\nu$ and $\nu_F$ where $F$ is the set of remaining free servers, incurring total expected assignment cost $\mathbb{E}[L_n] = \sum_{k=1}^n g_k$. Let $\mathbb{E}[\mathrm{OPT}_\nu]$ be the expected cost of the minimum-weight offline perfect matching between $n$ i.i.d. samples from $\nu$ and $S$. Is there an absolute constant $C < \infty$, independent of $n$ and the metric space $(X, d)$, such that for all $n$ and all server configurations $S$, $\sum_{k=1}^n g_k \le C \cdot \mathbb{E}[\mathrm{OPT}_\nu]$?

Posed in arXiv:2611.04275, Sec. 1.1, after Thm 1.1 — Online Metric Matching with Unknown i.i.d. Arrivals

OP-1031 Periodic Product Generating Functions for Higher Width and Level Primc Coloured PartitionsNot in LeanCombinatorics for TCS

Let $w = 2\ell - 1$ be an odd width with $\ell \ge 2$, and let $k \ge 1$ be an integer level. Consider coloured partitions with parts in an array of $w$ rows, where row $i$ ($1 \le i \le w$) contains parts of the same parity as $i+1$, so that positive even parts have $\ell$ colours and odd parts have $\ell - 1$ colours. Two entries in adjacent rows whose parts differ by one are adjacent. A coloured partition is admissible of level $k$ with boundary condition $(k_0, \dots, k_\ell)$ satisfying $\sum_{i=0}^\ell k_i = k$ if the multiplicities along every downward path (a sequence of adjacent entries from row 1 to row $w$) sum to at most $k$, where boundary multiplicities $(k_0, k_1, 0, \dots, k_\ell)$ are placed at part $0$ in odd rows and part $-1$ in even rows. Does the generating function of admissible coloured partitions equal the periodic infinite product of modulus $2(\ell + k)$ given in Conjecture 4.2 of Kanade, Russell, Tsuchioka, and Warnaar (2026) for all odd widths $w \ge 5$ at level $k \ge 1$, and for width $w = 3$ at all levels $k \ge 3$?

Posed in arXiv:2611.04020, Sec. 2, after Theorem B — Automatic partition identities

OP-1033 Time-efficient deterministic algorithm for finding an approximate tournament kingNot in LeanAlgorithm Design & Analysis

Let $\varepsilon \in (0, 1)$ be a fixed constant. A tournament $T = (V, E)$ on $n$ vertices is given as input. A vertex $v \in V$ controls another vertex $u \in V \setminus \{v\}$ if $(v, u) \in E$ or there exists $w \in V$ such that $(v, w) \in E$ and $(w, u) \in E$. A vertex is a $(1-\varepsilon)$-king if it controls at least $(1-\varepsilon)(n-1)$ other vertices. Can a $(1-\varepsilon)$-king be found by a deterministic algorithm running in $O_\varepsilon(n^{4/3})$ total time?

Posed in arXiv:2611.03838, Section 6 — A King for Almost Everyone

OP-1035 Exact value of the three-colored anti-Ramsey number for K_5Not in LeanCombinatorics for TCS

For an integer $k \ge 3$, let $\xi(K_k)$ denote the maximum integer $n$ such that there exists an edge-coloring of the complete graph $K_n$ with three colors (red, blue, green) such that every complete subgraph on $k$ vertices contains all three colors (at least one red edge, at least one blue edge, and at least one green edge). Given the known bounds $19 \le \xi(K_5) \le 29$, does there exist a three-edge-coloring of $K_{20}$ in which every copy of $K_5$ contains all three colors (meaning $\xi(K_5) \ge 20$), or is $\xi(K_5) = 19$? What is the exact value of $\xi(K_5)$?

Posed in arXiv:2611.03878, Sec. 4 — On the lower- and upper bounds of three-colored anti-Ramsey numbers

OP-1037 Achievability of 1 - 1/e competitive ratio for unweighted online matching with stochastic rewardsNot in LeanOnline Algorithms

In the unweighted online matching with stochastic rewards (OMSR) problem, a set of offline resources $U$ is known in advance and arrivals $t \in \{1, \dots, T\}$ arrive sequentially, revealing success probabilities $p_{it} \in (0, 1]$ for available resources $i \in U$. Each arrival allows at most one probe, succeeding with probability $p_{it}$ and irrevocably matching $i$ to $t$. The benchmark is the adaptive offline policy, which probes each arrival at most once in any adaptive order. Does there exist a randomized online algorithm whose competitive ratio against the adaptive offline benchmark is at least $1 - 1/e \approx 0.6321$ for all unweighted OMSR instances with arbitrary edge probabilities?

Posed in arXiv:2611.03598, Sec. 6, under "The Competitive Ratio of Stochastic Rewards" — Online Matching with Arbitrary Stochastic Rewards

What is known

The paper shows Perturbed Greedy is at least 0.591-competitive for unweighted OMSR with arbitrary probabilities, while classical online bipartite matching has a tight competitive ratio of 1 - 1/e. Whether 1 - 1/e can be achieved for arbitrary edge probabilities remains open.

OP-1040 Adjacency labeling of size log n + O(k) for graphs of bounded treewidthNot in LeanData Structures

For an integer $k \ge 1$, let $\mathcal{G}_k$ denote the class of finite simple graphs of treewidth at most $k$. An adjacency labeling scheme of size $f(n, k)$ for $\mathcal{G}_k$ consists of a decoder function $D : \{0, 1\}^* \times \{0, 1\}^* \to \{0, 1\}$ and, for each $G \in \mathcal{G}_k$, a labeling $\ell : V(G) \to \{0, 1\}^*$ such that for all distinct vertices $u, v \in V(G)$, $D(\ell(u), \ell(v)) = 1 \iff \{u, v\} \in E(G)$, with $\max_{v \in V(G)} |\ell(v)| \le f(|V(G)|, k)$. Does there exist an absolute constant $C > 0$ such that for all integers $k \ge 2$ and $n \ge 1$, the class of $n$-vertex graphs of treewidth at most $k$ admits an adjacency labeling scheme of size at most $\log_2 n + C k$ bits?

Posed in arXiv:2611.03620, Sec. 6, paragraph 1 — Adjacency Labeling Schemes of Size $\log n+O(\log\log^* n)$ for Graphs of Bounded Treewidth

What is known

A 2007 result proved an upper bound of log n + O(k log log(n/k)) bits and a lower bound of log n + Omega(k) bits. This paper improves the bound to log n + 2^{O(k^3)}(log log* n + 1) bits, but whether the second-order term can be made O(k) bits independent of n remains open for every k >= 2.

OP-1041 Constant bound for prefix Komlós discrepancy up to permutationNot in LeanCombinatorics for TCS

Does there exist an absolute constant $C > 0$ such that for every positive integer $d$, every positive integer $n$, and every sequence of vectors $v_1, \ldots, v_n \in \mathbb{R}^d$ satisfying $\|v_i\|_2 \le 1$ for all $i \in \{1, \ldots, n\}$, there exists a permutation $\sigma \in S_n$ and a sequence of signs $\varepsilon_1, \ldots, \varepsilon_n \in \{-1, +1\}$ such that for all $1 \le k \le n$, $\|\sum_{i=1}^k \varepsilon_i v_{\sigma(i)}\|_\infty \le C$?

Posed in arXiv:2611.03427, Question 4.1 — Proving the Koml\'os conjecture slowly

OP-1042 Growth rate of prefix infinity discrepancy in dimension dNot in LeanCombinatorics for TCS

For each positive integer $d$, define $H(d) \coloneqq \sup_{n \ge 1} \sup_{\substack{v_1, \ldots, v_n \in \mathbb{R}^d \\ \|v_i\|_2 \le 1}} \min_{\varepsilon \in \{-1, +1\}^n} \max_{1 \le k \le n} \bigg\|\sum_{i=1}^k \varepsilon_i v_i\bigg\|_\infty$. What is the asymptotic growth rate of $H(d)$ as $d \to \infty$ (specifically, does $H(d)$ grow as $\Theta(\sqrt{\log d})$, $\Theta(\sqrt{d})$, or an intermediate rate)?

Posed in arXiv:2611.03427, Question 4.3 — Proving the Koml\'os conjecture slowly

OP-1043 Rate of probabilistic Komlós small-ball probabilityNot in LeanCombinatorics for TCS

Let $\xi_1, \ldots, \xi_n$ be independent Rademacher random variables uniformly distributed on $\{-1, +1\}$. For each integer $n \ge 1$ and real $C > 0$, let $p_n(C) \coloneqq \inf_{d \ge 1, \, v_1, \dots, v_n \in \mathbb{R}^d, \, \|v_i\|_2 \le 1} \mathbb{P}\left(\Big\|\sum_{i=1}^n \xi_i v_i\Big\|_\infty \le C\right)$. Does the limit $\lim_{C \to \infty} \lim_{n \to \infty} \frac{-C^2}{n} \log p_n(C)$ exist, and if so, what is its value?

Posed in arXiv:2611.03427, Question 4.2 — Proving the Koml\'os conjecture slowly

OP-1044 Optimal Additive Constant for Oriented Diameter with Given Minimum DegreeNot in LeanGraph Theory & Graph Algorithms

Let C be a real constant. What is the infimum of all constants C such that every finite simple bridgeless graph G of order n with minimum degree at least delta >= 2 admits a strong orientation of diameter at most 3n/(delta+1) + C? In particular, does every such graph satisfy oriented diameter at most 3n/(delta+1) - 1, matching the lower bound construction?

Posed in arXiv:2611.03169, Sec. 1, after Theorem 1.2 — An Erd\H{o}s-Pach-Pollack-Tuza theorem for oriented diameter

What is known

The paper proves that every bridgeless graph with minimum degree delta has oriented diameter at most 3n/(delta+1) + 10^17, confirming a conjecture up to an additive constant, and gives a lower bound construction of oriented diameter at least 3n/(delta+1) - 1. Determining the optimal additive constant between -1 and 10^17 remains open.

OP-1046 Order of Growth and Supremum of Strong Fractional Choice Number for Graphs of Choice Number kNot in LeanGraph Theory & Graph Algorithms

For each integer $k \ge 3$, let $F(k) = \sup \{\operatorname{ch}_f^s(G) : \operatorname{ch}(G) = k\}$, where the supremum is taken over all finite simple graphs $G$ with choice number $\operatorname{ch}(G) = k$, and $\operatorname{ch}_f^s(G)$ is the strong fractional choice number of $G$, defined as $\inf \{r \in \mathbb{R} : G \text{ is } (a:b)\text{-choosable whenever } a, b \in \mathbb{N}_{\ge 1} \text{ and } a/b \ge r \ge 1\}$. What is the exact value of $F(k)$ for each integer $k \ge 3$? In particular, what is the asymptotic order of growth of $F(k) - k$ as $k \to \infty$?

Posed in arXiv:2611.03151, Question 5 — Counterexamples to Relaxed Multiplication in List Coloring

OP-1049 unicyclic graph state tripartite claw packing one cycle defectNot in LeanQuantum Mechanics

For every finite connected simple unicyclic graph G, is its graph-state maximum tripartite information M(G) either p(G) or p(G)-1, where p(G) is the maximum number of pairwise vertex-disjoint induced claws? Precisely, for each S let r(S) be the F_2 rank of the adjacency submatrix between S and its complement; for a four-partition A,B,C,D let I_3 = r(A)+r(B)+r(C)+r(D)-r(A union B)-r(A union C)-r(B union C), and let M(G) be the maximum of I_3 over all such partitions. The claim is p(G)-1 <= M(G) <= p(G). Can the graphs in the defect-one case be characterized from the unique cycle and its attached trees?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This isolates how a single feedback loop affects multipartite entanglement: the known AFTD tree conjecture OP-794 proposes M(T)=p(T), but it cannot simply transfer to a unicyclic graph because adding the edge can change cut-matrix rank and matchings at multiple cuts. Establishing an exact one-bit bound and its equality cases would relate the geometry of cycles to monogamy failure, and provide a tractable step beyond trees and beyond the cycle-only observations of Fuentes et al. Evidence: Experiments 14822 and 14829 exhaust all connected unicyclic graphs through 10 vertices up to isomorphism (89, 240 and 657 graphs at orders 8, 9 and 10); their max I3 is always p or p-1, and both cases occur. Experiment 14824 adds 383 sampled graphs on 8-12 vertices, including defect-one cases with p=2.

OP-1050 three deletion collision excess five halves lawNot in LeanInformation Theory & Coding

For n >= 3, let e(u,w) be the number of index subsets of size n-3 whose subsequence of w is u, and define C_3(n)=min over w in {0,1}^n of sum over u in {0,1}^{n-3} of e(u,w)^2. Does there exist a finite strictly positive constant c_3 such that C_3(n)=binom(n,3)+c_3 n^(5/2)+o(n^(5/2)), and, if so, what is its exact value?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This is the optimal order-2 output collision probability for a binary channel with exactly three deletions, and its extremizers govern the most dispersed deletion output distribution. It transfers the two-deletion asymptotic and balanced defect questions OP-999 and OP-1003 to the first genuinely higher deletion number. Those are themselves conjectures, not baselines to assume: an extra deletion creates new collision types from interacting pairs and triples of edit positions, so their two-deletion formulas do not imply this law. A finite positive limiting constant would quantify a synchronization-error effect across all lengths. Evidence: Experiment 14830 exhaustively minimizes over binary input words through n=16; the optimal defect pattern at these sizes is not stable. Experiment 14831 finds 3 defects outperform 2 at n=20 and 4 outperform 3 at n=30. Experiment 14833 tests balanced-defect constructions through n=120; their normalized excess is about 2.216 at n=120, with nine defects. The large-n values are construction upper bounds, not global optima, and supply no lower bound.

OP-1051 Robust continuous-time Turing simulation by Lipschitz piecewise-affine vector fieldsNot in LeanComputability & Recursion Theory

Does there exist an integer d ≥ 1 and an autonomous Lipschitz continuous piecewise-affine vector field f : ℝ^d → ℝ^d such that the continuous flow of the differential equation dξ/dt = f(ξ) simulates a universal Turing machine in the following robust sense: for every deterministic Turing machine M and input w, there exists an initial condition ξ_0 ∈ ℝ^d, an accepting region Acc ⊆ ℝ^d, and ε > 0 such that the trajectory t ↦ ξ(t) enters the ε-neighborhood of Acc in finite time if and only if M accepts w?

Posed in arXiv:2611.02840, Sec. H.4, Two open questions — Iterated Narrow Networks: Turing Completeness at Width 4 on Convex Input Spaces and the Complexity of Verification

OP-1052 Robust verification of smooth narrow networks with binary time boundNot in LeanComplexity Classes & Machine Models

Let ρ : ℝ → ℝ be a smooth activation function satisfying the Kidger-Lyons conditions (continuous, non-polynomial, C^1 at some point with non-zero derivative) that is polynomial-time computable with a polynomial-time-computable Lipschitz constant on every bounded interval (e.g. tanh, sigmoid, GELU, Swish). For iterated width-6 networks with activation ρ, is the δ-robust T-bounded reachability problem on convex input regions with T given in binary NEXP-complete (in the sense of promise-NEXP)?

Posed in arXiv:2611.02840, Sec. 5.2, Two complements — Iterated Narrow Networks: Turing Completeness at Width 4 on Convex Input Spaces and the Complexity of Verification

OP-1054 Circular Flow Number Margins for Random 5-Regular and 7-Regular GraphsNot in LeanGraph Theory & Graph Algorithms

Let $G_{n,d}$ be a uniformly random simple $d$-regular graph on $n$ vertices, where $n \to \infty$ through even integers. For $d = 5$, does there exist a constant $\varepsilon_5 > 0$, independent of $n$, such that $\phi(G_{n,5}) \le 3 - \varepsilon_5$ asymptotically almost surely? For $d = 7$, does there exist a constant $\varepsilon_7 > 0$, independent of $n$, such that $\phi(G_{n,7}) \le \frac{8}{3} - \varepsilon_7$ asymptotically almost surely?

Posed in arXiv:2611.03763, Conjecture 7.1 — Circular flows and bisections of random regular graphs

OP-1055 Modulo (2p+1)-Orientation Conjecture for 4p-Edge-Connected GraphsNot in LeanGraph Theory & Graph Algorithms

For every positive integer $p$, does every $4p$-edge-connected finite graph $G = (V, E)$ admit an orientation in which every vertex $v \in V$ satisfies $d^+(v) \equiv d^-(v) \pmod{2p+1}$?

Posed in arXiv:2611.03763, Abstract, line 1 — Circular flows and bisections of random regular graphs

OP-1057 Completeness of Graphs with Well-Covered Cartesian Square PowersNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite connected simple graph with at least one edge. Suppose that the Cartesian square $G \mathbin{\square} G$ has the well-covered powers property, meaning that for every integer $d \ge 1$, all maximal independent sets of $(G \mathbin{\square} G)^d$ have the same cardinality. Must $G$ be a complete graph?

Posed in arXiv:2611.03956, Question 1.2 — Well-Covered Powers: Cartesian Products and Cayley Graphs

What is known

The paper shows this holds when G is chordal (Theorem 3.2) or an abelian Cayley graph (Theorem 3.7), but the general case for all connected graphs remains open.

OP-1059 envy free ef1 lottery sharp linear support boundNot in LeanFair Division

For every n >= 2 and every finite set of indivisible goods with nonnegative additive valuations for the n agents, is there a probability distribution supported on at most n complete allocations such that every allocation in the support is EF1 and the lottery is envy-free ex ante? Precisely, EF1 means that for each i != j either v_i(A_i) >= v_i(A_j), or some g in A_j has v_i(A_i) >= v_i(A_j minus {g}); ex-ante envy-freeness means E[v_i(A_i)] >= E[v_i(A_j)] for every ordered pair i,j.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for the sharp universal amount of randomization needed to give both ex-ante and ex-post fairness: with n+1 equally valued goods the EF1 bundle sizes are one 2 and n-1 ones, so ex-ante envy-freeness requires at least n supported allocations. Freeman, Shah and Vaish establish existence; Panchapakesan and Vaish Corollary 3.1 supplies n(n-1)+1 outcomes using a Caratheodory argument in the envy-comparison space. Neither argument gives the proposed linear bound, since there are n(n-1) coupled envy inequalities and eliminating arbitrary support points need not preserve their signs. Such a theorem would cut the worst-case support to the best possible order and exact constant. Evidence: Experiment 14844 uses mixed-integer optimization for 260 random positive instances with 3 or 4 agents and up to 6 goods; all had solutions with at most 2 outcomes. Experiment 14848 completed 400 near-identical 3-agent/4-good and 300 near-identical 3-agent/5-good instances with optimal numerical MILP certificates, requiring 3 outcomes in 191 and 78 cases respectively; its later 7-good section timed out. Experiment 14850 checks another 250 nonnegative instances including zeros, with no need for more than n outcomes. Experiment 14849 verifies one heterogeneous 3-outcome witness exactly using rational arithmetic. MILP outcomes and finite checks are not a proof.

OP-1062 three deletion collision exact two sqrt spacing constantNot in LeanInformation Theory & Coding

Let e(u,w) count the (n-3)-element index subsets of a binary word w of length n that spell u, and set C_3(n)=min_w sum_{u in {0,1}^{n-3}} e(u,w)^2. Is it true that lim_{n to infinity} (C_3(n)-binom(n,3))/n^(5/2)=2? Equivalently, does C_3(n)=binom(n,3)+2 n^(5/2)+o(n^(5/2))?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This is a concrete refinement of OP-1050 in direct response to the Referee: rather than leave an unspecified leading constant, it states the numerical constant and a single formalizable limit. The collision minimum determines the maximum output Renyi-2 entropy of a binary three-deletion channel and tests whether the n^(5/2) defect-spacing law survives the new interactions between three deletion positions. The proof needs a lower bound uniform over all words; a good balanced construction alone cannot supply it. This is not the two-deletion conjecture OP-999 or the three-deletion input-entropy problem OP-950. Evidence: Experiment 14864 exhaustively minimizes over binary words up to n=22, independently matching earlier brute force through n=16. Paired-deletion DP agrees with direct mask-pair enumeration on balanced constructions through n=120 and evaluates balanced words at n=10,000, 100,000, 500,000, and 1,000,000: normalized excesses 2.038408, 2.012495, 2.005626, and 2.003984, with defect counts 97, 313, 704, and 997. The large-word values are explicit construction upper bounds, not global minima. Experiment 14865 locally optimizes irregular placements through n=1000 and finds only small improvements over balanced constructions; it is heuristic and cannot certify the lower bound.

OP-1063 Improving the parity decision tree depth bound to 2^d log s(f)Not in LeanCommunication Complexity

Let $f\colon \mathbb{F}_2^n \to \{-1, +1\}$ be a Boolean function of $\mathbb{F}_2$-degree $d \ge 2$, where $f = (-1)^p$ for a multilinear polynomial $p\colon \mathbb{F}_2^n \to \mathbb{F}_2$. Let $s(f) = |\{\xi \in \mathbb{F}_2^n \colon \widehat{f}(\xi) \ne 0\}|$ be the Fourier sparsity of $f$. Does there exist a universal constant $C > 0$ such that the deterministic parity decision tree depth satisfies $\mathsf{D}_{\oplus}(f) \le C \cdot 2^d \log_2 s(f)$ for all $n \ge 1$, all $d \ge 2$, and all Boolean functions $f$ of degree $d$? More generally, can the bound be improved to $O(c^d \log s(f))$ for any $c < 4$, or to $\mathrm{poly}(d) \log s(f)$?

Posed in arXiv:2611.03452, Sec. 4 — Parity Decision Trees of Depth $O(4^d \log\|\widehat f\|_1)$ for Boolean Functions $f$ of $F_2$-Degree $d$

OP-1064 Parity decision tree depth in the intermediate degree rangeNot in LeanCommunication Complexity

For Boolean functions $f\colon \mathbb{F}_2^n \to \{-1, +1\}$ of $\mathbb{F}_2$-degree $d = \deg(p)$ in the intermediate regime $\omega(\log \log s(f)) \le d \le O(\log s(f))$, does there exist an upper bound on deterministic parity decision tree depth $\mathsf{D}_{\oplus}(f)$ that asymptotically beats both $O(4^d \log_2 s(f))$ and the unconditional bound $O(\sqrt{s(f)})$? In particular, does $\mathsf{D}_{\oplus}(f) \le \mathrm{polylog}(s(f))$ hold throughout $d \le c \log s(f)$ for some constant $c > 0$?

Posed in arXiv:2611.03452, Sec. 3.6.1 — Parity Decision Trees of Depth $O(4^d \log\|\widehat f\|_1)$ for Boolean Functions $f$ of $F_2$-Degree $d$

OP-1065 Log-rank conjecture for XOR functionsNot in LeanCommunication Complexity

Let $f\colon \mathbb{F}_2^n \to \{-1, +1\}$ be any Boolean function, and let $s(f) = |\{\xi \in \mathbb{F}_2^n \colon \widehat{f}(\xi) \ne 0\}|$ be its Fourier sparsity. Do there exist universal constants $C > 0$ and $c > 0$ such that the deterministic parity decision tree depth satisfies $\mathsf{D}_{\oplus}(f) \le C (\log_2 s(f))^c$ for all $n \ge 1$ and all Boolean functions $f$ on $\mathbb{F}_2^n$?

Posed in arXiv:2611.03452, Conjecture 1.1 — Parity Decision Trees of Depth $O(4^d \log\|\widehat f\|_1)$ for Boolean Functions $f$ of $F_2$-Degree $d$

OP-1066 Additive chi-bound for (P_t, diamond)-free graphs with t at least 8Not in LeanGraph Theory & Graph Algorithms

Let $t \ge 8$ be an integer. Does there exist a constant $c_t$ such that every finite simple graph $G$ that contains no induced subgraph isomorphic to the path $P_t$ or to the diamond graph (the complete graph $K_4$ minus an edge) satisfies $\chi(G) \le \omega(G) + c_t$, where $\chi(G)$ is the chromatic number of $G$ and $\omega(G)$ is the clique number of $G$?

Posed in arXiv:2611.03083, Problem 1.4 — An optimal $\chi$-bound for $\{P_7, \text{diamond}\}$-free graphs

OP-1068 Existence of an associahedron requiring five coloursNot in LeanGraph Theory & Graph Algorithms

Does there exist an integer $n \ge 3$ such that the associahedron $\mathcal{A}_n$ has chromatic number $\chi(\mathcal{A}_n) \ge 5$? Equivalently, is every associahedron 4-colourable (that is, is $\chi(\mathcal{A}_n) \le 4$ for all $n \ge 3$)?

Posed in arXiv:2611.05323, Sec. 1, after Theorem 2 — Associahedra are 12-colourable

OP-1069 Upper Bound on Hypergraphs Avoiding (e+3,e)-ConfigurationsNot in LeanCombinatorics for TCS

Let $e \ge 4$ be a fixed integer. For an integer $n \ge e+3$, let $f_3(n, e+3, e)$ denote the maximum number of edges in a 3-uniform hypergraph on $n$ vertices containing no $e$ distinct edges spanning at most $e+3$ vertices. Is it true that $f_3(n, e+3, e) = o(n^2)$ as $n \to \infty$; that is, for every $\varepsilon > 0$, does there exist $n_0 \in \mathbb{N}$ such that $f_3(n, e+3, e) \le \varepsilon n^2$ for all $n \ge n_0$? In particular, does this hold for the smallest open case $e=4$ (the $(7,4)$-problem)?

Posed in arXiv:2611.05261, Sec. 1, paragraph 1 — A near-quadratic lower bound for the Brown--Erd\H{o}s--S\'os $(9,6)$-problem

OP-1070 Existence of Grid-Free Steiner Triple SystemsNot in LeanCombinatorics for TCS

A Steiner triple system of order $n$, denoted $\mathrm{STS}(n)$, is a 3-uniform hypergraph on $n$ vertices in which every pair of distinct vertices is contained in exactly one edge (which requires $n \equiv 1$ or $3 \pmod 6$ and has exactly $n(n-1)/6$ edges). A $3 \times 3$ grid is a subhypergraph consisting of 6 distinct edges partitioned into three pairwise disjoint row edges $\{R_1, R_2, R_3\}$ and three pairwise disjoint column edges $\{C_1, C_2, C_3\}$ such that $|R_i \cap C_j| = 1$ for all $1 \le i, j \le 3$. Do there exist grid-free Steiner triple systems for infinitely many orders $n$ (or for all sufficiently large $n \equiv 1 \text{ or } 3 \pmod 6$)?

Posed in arXiv:2611.05261, Sec. 1, paragraph 5 — A near-quadratic lower bound for the Brown--Erd\H{o}s--S\'os $(9,6)$-problem

OP-1072 Universal constant-factor maximin share guarantee for subadditive valuationsNot in LeanFair Division

Does there exist a universal constant $c > 0$ such that for every integer $n \ge 2$, every finite set $M$ of indivisible goods, and every profile of normalized, monotone, subadditive valuation functions $v_1, \dots, v_n : 2^M \to \mathbb{R}_{\ge 0}$ (satisfying $v_i(\emptyset) = 0$, $v_i(S) \le v_i(T)$ whenever $S \subseteq T \subseteq M$, and $v_i(S \cup T) \le v_i(S) + v_i(T)$ for all $S, T \subseteq M$), there exists an allocation $(A_1, \dots, A_n)$ partitioning $M$ into $n$ pairwise disjoint bundles such that $v_i(A_i) \ge c \cdot \operatorname{MMS}_n(v_i; M)$ for every agent $i \in \{1, \dots, n\}$, where $\operatorname{MMS}_n(v_i; M) = \max_{(P_1,\dots,P_n) \in \Pi(M, n)} \min_{j \in \{1,\dots,n\}} v_i(P_j)$?

Posed in arXiv:2611.05073, Sec. 6 — Toward Constant-Factor Maximin Share Guarantees for Subadditive Valuations

OP-1075 Average Degree Threshold for Rainbow Cycles in Properly Edge-Colored GraphsNot in LeanCombinatorics for TCS

Does there exist an absolute constant $C > 0$ such that every finite properly edge-colored simple graph $G$ on $n$ vertices with average degree $d(G) \ge C \log n$ contains a rainbow cycle (that is, a simple cycle whose edges all receive pairwise distinct colors)?

Posed in arXiv:2611.05034, Section 1, paragraph 1 — A Short Proof and Generalization of the Rainbow Cycle Theorem and Improved Bounds for Binary Even-Query LCCs

What is known

The paper gives a simplified proof that average degree 9 log n log log n guarantees a rainbow cycle in properly edge-colored graphs, leaving the original O(log n) conjecture of Keevash, Mubayi, Sudakov, and Verstraete (2007) open.

OP-1077 Online packing of four largest trees into complete graphsNot in LeanGraph Theory & Graph Algorithms

Does there exist an online strategy that packs arbitrary trees $T_n, T_{n-1}, T_{n-2}, T_{n-3}$ of orders $n, n-1, n-2, n-3$, respectively, into the complete graph $K_n$ for all $n \ge 5$ (or for all sufficiently large $n$), when the trees are revealed in decreasing order of size? That is, given any tree $T_n$ of order $n$, does there exist an embedding $\varphi_1 : T_n \to K_n$ such that for every tree $T_{n-1}$ of order $n-1$, there exists an embedding $\varphi_2 : T_{n-1} \hookrightarrow K_n$ edge-disjoint from $\varphi_1(T_n)$, such that for every tree $T_{n-2}$ of order $n-2$, there exists an embedding $\varphi_3 : T_{n-2} \hookrightarrow K_n$ edge-disjoint from both $\varphi_1(T_n)$ and $\varphi_2(T_{n-1})$, such that for every tree $T_{n-3}$ of order $n-3$, there exists an embedding $\varphi_4 : T_{n-3} \hookrightarrow K_n$ edge-disjoint from $\varphi_1(T_n)$, $\varphi_2(T_{n-1})$, and $\varphi_3(T_{n-2})$?

Proposed here, building on arXiv:2611.04674, Theorem 1.1 — Online packing of the three largest trees; the paper does not ask it

What is known

The paper establishes (Theorem 1.1) that for every $n \ge 4$, arbitrary trees of the three largest orders $n, n-1, n-2$ can be packed online into $K_n$ in decreasing order of size, strengthening the classical offline 3-tree packing theorem of Hobbs, Bourgeois, and Kasiraj (1987). While offline packing of larger numbers of trees has been established for five trees (Żak 2017), seven trees (Cisiński and Żak 2024), and a linear number of trees (Janzer and Montgomery 2026), the online setting remains open for four or more trees. Packing the four largest trees $T_n, T_{n-1}, T_{n-2}, T_{n-3}$ online is the immediate next frontier.

OP-1079 Ore-type condition for oriented paths with three or more blocksNot in LeanGraph Theory & Graph Algorithms

Let $k \ge 3$ and $b \ge 3$ be integers. Let $P$ be an oriented path of length $k$ consisting of $b$ directed blocks (that is, an orientation of an undirected path of length $k$ having exactly $b$ maximal directed subpaths). Let $D$ be a finite oriented graph (a loopless directed graph containing no directed 2-cycle) satisfying the minimum total degree condition $\delta(D) \ge k$ and the Ore-type condition $d_D^+(u) + d_D^-(v) \ge k - 1$ for every ordered pair of distinct non-adjacent vertices $(u, v)$ with $(u, v) \notin A(D)$. Does $D$ necessarily contain $P$ as a subgraph?

Posed in arXiv:2611.04691, Sec. 4 — Two-block paths in oriented graphs under the Ore-type condition

What is known

The paper settles the two-block case of the Ore-type theorem for paths, matching the one-block theorem established in 1981, and explicitly raises the generalization to three or more blocks.

OP-1080 Oriented path containment in graphs of large minimum semi-degreeNot in LeanGraph Theory & Graph Algorithms

Let $k$ be a positive integer, and let $P$ be an arbitrary oriented path of length $k$ (an orientation of an undirected simple path on $k+1$ vertices). Let $D$ be a finite oriented graph with minimum semi-degree $\delta^0(D) > k/2$, where $\delta^0(D) = \min_{v \in V(D)} \min(d_D^+(v), d_D^-(v))$. Does $D$ necessarily contain $P$ as a subgraph?

Posed in arXiv:2611.04691, Conjecture 1.2 — Two-block paths in oriented graphs under the Ore-type condition

What is known

This conjecture is known for directed paths (one block) and two-block paths, but remains widely open for paths with three or more blocks.

OP-1081 Treewidth Bound for Hat Guessing NumberNot in LeanCombinatorial Games

Let $\text{tw}(G)$ denote the treewidth of a finite simple graph $G$. In the hat guessing game on $G$ with $q$ colors, each vertex $v \in V(G)$ is assigned an adversarial hat color from $\{1, \dots, q\}$. Each vertex $v$ simultaneously guesses its own hat color using only the colors seen on its open neighborhood $N_G(v)$ according to a predetermined strategy. The players win if at least one vertex guesses correctly. The hat guessing number $\text{HG}(G)$ is the largest integer $q \ge 1$ for which there exists a strategy that guarantees a win for every coloring. Does there exist a function $f : \mathbb{N} \to \mathbb{N}$ such that every finite simple graph $G$ satisfies $\text{HG}(G) \le f(\text{tw}(G))$?

Posed in arXiv:2611.04577, Question 19 — The Lov\'asz Local Lemma Is Sharp for the Hat Guessing Number

What is known

The authors pose this as Question 19 in Section 6, pointing out that known constructions of graphs with pathwidth $d$ achieve hat guessing number $s_d - 1$ where $s_d$ is Sylvester's sequence, implying that if such a bounding function $f$ exists, it must grow at least doubly exponentially.

OP-1084 Asymptotic Convergence of the Maximin Share Approximation Ratio to 1Not in LeanFair Division

Let $M$ be a finite set of indivisible goods and $N = \{1, \ldots, n\}$ a set of $n \ge 2$ agents with additive valuations $v_i : 2^M \to \mathbb{R}_{\ge 0}$. Agent $i$'s maximin share is $\mathrm{MMS}(M, v_i, n) = \max_{(P_1, \ldots, P_n) \in \mathcal{P}_n(M)} \min_{j \in [n]} v_i(P_j)$, where $\mathcal{P}_n(M)$ is the set of all partitions of $M$ into $n$ bundles. Let $\rho_n$ denote the supremum of all $\rho \in [0, 1]$ such that every fair allocation instance with $n$ additive agents admits a $\rho$-MMS allocation (a partition $(A_1, \ldots, A_n)$ of $M$ satisfying $v_i(A_i) \ge \rho \cdot \mathrm{MMS}(M, v_i, n)$ for all $i \in N$). Does $\lim_{n \to \infty} \rho_n = 1$? That is, for every $\delta \in (0, 1)$, does there exist an integer $n_\delta$ such that every instance with $n \ge n_\delta$ agents admits a $(1-\delta)$-MMS allocation?

Posed in arXiv:2611.05360, Abstract (also Conjecture 1 in Sec. 1.1) — Almost-MMS allocations with small agent redundancy

What is known

The paper investigates whether the maximin share approximation ratio rho_n tends to 1 as the number of agents n grows, proving it positively under agent redundancy (or when the number of items m <= (2 - epsilon)n), but leaving the standard setting (without redundancy, epsilon = 0) open.

OP-1089 Equality of Unweighted and Weighted Max-Cut Ratios for Odd-Girth Subcubic ClassesNot in LeanGraph Theory & Graph Algorithms

For each odd integer $g \ge 5$, let $\mathcal{G}_g$ be the class of finite simple subcubic graphs with at least one edge and odd girth at least $g$. For a graph $G \in \mathcal{G}_g$, let $b(G) = \operatorname{mc}(G)/|E(G)|$ and for edge weighting $w: E(G) \to [0,\infty)$ with total weight $w(G) > 0$, let $b(G,w) = \operatorname{mc}(G,w)/w(G)$. Define $b_g^{\mathrm{unw}} = \inf_{G \in \mathcal{G}_g} b(G)$ and $b_g^{\mathrm{wt}} = \inf_{G \in \mathcal{G}_g} \inf_{w} b(G,w)$. Is $b_g^{\mathrm{wt}} = b_g^{\mathrm{unw}}$ for every odd integer $g \ge 5$?

Posed in arXiv:2611.05178, Question 5.1 — Weighted Max Cut in Subcubic Graphs

OP-1090 Weighted Max-Cut Four-Fifths Conjecture for Triangle-Free Subcubic GraphsNot in LeanGraph Theory & Graph Algorithms

Let $G = (V, E)$ be a finite simple graph with maximum degree at most 3 that is triangle-free (contains no 3-cycle), and let $w: E \to [0,\infty)$ be a nonnegative edge weight function. Is it true that $\operatorname{mc}(G,w) \ge \frac{4}{5} \sum_{e \in E} w(e)$, where $\operatorname{mc}(G,w)$ denotes the maximum total weight of a cut in $G$?

Posed in arXiv:2611.05178, Conjecture 1.2 — Weighted Max Cut in Subcubic Graphs

OP-1091 Lovasz Cut Distance Integrality Gap ConjectureNot in LeanGraph Theory & Graph Algorithms

Let $G = (V, E_G)$ and $H = (V, E_H)$ be finite simple undirected graphs on the same vertex set $V$ of cardinality $n$. For any subset pair $S, T \subseteq V$ and bijection $\pi: V \to V$, define the cut discrepancy $D_\pi(S, T) = \frac{1}{n^2} |e_G(S, T) - e_H(\pi(S), \pi(T))|$, and let the cut distance be $\delta_\square(G, H) = \min_{\pi} \max_{S, T \subseteq V} D_\pi(S, T)$. Let $\delta_\square^{\mathrm{OT}}(G, H)$ denote the fractional cut distance defined as the minimum of the cut norm of the weighted discrepancy matrix over all doubly stochastic matrices $Q \in \mathbb{R}_{\ge 0}^{V \times V}$ with row and column sums $1/n$. Is it true that $\delta_\square(G, H) \le 2 \delta_\square^{\mathrm{OT}}(G, H)$ for all graphs $G, H$ of the same order?

Posed in arXiv:2611.05048, Conjecture 9.28 of Lovász (referenced in Sec. 1, 3.3, 5) — Graph Similarity Meets Optimal Transport

What is known

Lovász conjectured in 2012 that the cut distance is at most twice the optimal transport (fractional) cut distance. The paper improves the upper bound to an almost-linear bound O((delta_square^OT)^(1-eps)) and shows that the constant 2 would be tight by constructing graphs with equality, but whether the linear factor 2 bound holds universally remains open.

OP-1092 Exact Integrality Gap for Graph Edit DistanceNot in LeanGraph Theory & Graph Algorithms

For two finite simple graphs $G, H$ on the same vertex set of order $n$, let $\delta_{\mathrm{ed}}(G, H) = \frac{1}{n^2} \min_{\pi \in \mathrm{Bij}(V, V)} \sum_{u, v \in V} |A_G(u, v) - A_H(\pi(u), \pi(v))|$ be their normalized edit distance, and let $\delta_{\mathrm{ed}}^{\mathrm{OT}}(G, H) = \min_{Q} \sum_{u, v, u', v' \in V} |A_G(u, u') - A_H(v, v')| Q(u, v) Q(u', v')$ where $Q$ ranges over all fractional alignments (matrices with non-negative entries and row and column sums $1/n$). What is the exact value of the optimal constant $C = \sup_{G, H, \delta_{\mathrm{ed}}^{\mathrm{OT}}(G,H) > 0} \frac{\delta_{\mathrm{ed}}(G, H)}{\delta_{\mathrm{ed}}^{\mathrm{OT}}(G, H)}$, known to lie in $[4/3, 2]$?

Posed in arXiv:2611.05048, Sec. 5 — Graph Similarity Meets Optimal Transport

What is known

The paper improves the upper bound on the integrality gap of edit distance from 3 to 2, and the lower bound from 6/5 to 4/3. Determining the exact value in [4/3, 2] is explicitly stated as open in the conclusion.

OP-1093 Optimal Exponent for Spectral Distance Integrality GapNot in LeanGraph Theory & Graph Algorithms

Let $G, H$ be finite simple graphs on $n$ vertices. Let $\delta_2(G, H) = \frac{1}{n} \min_{\pi} \|A_G^\pi - A_H\|_{2\to 2}$ denote the normalized spectral distance (where $\|\cdot\|_{2\to 2}$ is the spectral norm / maximum singular value), and let $\delta_2^{\mathrm{OT}}(G, H) = \min_{Q^*} \|B_{2\to 2}(G, H, Q^*)\|_{2\to 2}$ denote its optimal transport counterpart. What is the supremum of all real numbers $\alpha$ such that there exists a constant $C_\alpha > 0$ such that $\delta_2(G, H) \le C_\alpha (\delta_2^{\mathrm{OT}}(G, H))^\alpha$ for all graphs $G, H$ of the same order? (The paper shows this supremum lies in $[1/2, 3/4]$.)

Posed in arXiv:2611.05048, Sec. 3.4 — Graph Similarity Meets Optimal Transport

OP-1096 Comparison-query complexity of EF1 under general monotone preferencesNot in LeanFair Division

Let N = {1, ..., n} be a set of n >= 2 agents and M a set of m indivisible items (goods). Each agent i in N has a monotone preference relation ⪰_i over 2^M (so S ⊆ T implies T ⪰_i S). In the comparison-query model, an algorithm may only access preferences by querying whether S ⪰_i T for any chosen S, T ⊆ M and i in N. An allocation X = (X_1, ..., X_n) is a partition of M into n pairwise disjoint bundles. An allocation X is envy-free up to one item (EF1) if for all distinct i, j in N with X_j ≠ ∅, there exists an item g in X_j such that X_i ⪰_i (X_j \ {g}). For any fixed n >= 2 (and in particular for n = 2), does there exist a deterministic comparison-query algorithm that computes an EF1 allocation in O(log m) queries for any monotone preference profile, or does every deterministic algorithm require superlogarithmic (omega(log m)) queries in the worst case?

Posed in arXiv:2611.04753, Sec. 5, open question — Logarithmic Comparison-Query Complexity for EF1 Allocations

What is known

The paper settles the comparison-query complexity for additive preferences by giving an O(n^8 log m) algorithm, matching the Omega(log m) lower bound. However, the algorithm relies heavily on additivity (binary splitting trees and balanced bundle partitions). General monotone preferences admit EF1 allocations via envy-cycle elimination in O(n^2 m) queries, leaving a large gap between O(log m) and O(m).

OP-1098 Optimal Leading Multiplicative Constant in Robust Freiman Additive Energy BoundNot in LeanCombinatorics for TCS

Let d >= 1 be an integer. For any finite set A ⊂ ℝ^d with full affine span dim(A) = d, there exists an affine basis S ⊂ A of ℝ^d (with |S| = d+1) such that E(A, S) <= (2d+3)|A| - (2d+2), where E(A, S) = |{(a1, a2, s1, s2) ∈ A × A × S × S : a1 + s1 = a2 + s2}|. When A is the standard simplex, |A| = d+1 and E(A, A) = (2d+1)|A|. Does there exist an absolute constant C < 2 such that for all sufficiently large d and all finite sets A ⊂ ℝ^d with dim(A) = d and |A| >= d^2, there exists an affine basis S ⊂ A satisfying E(A, S) <= C d |A|? Or does there exist a sequence of sets A_d ⊂ ℝ^d with |A_d|/d -> ∞ such that min_{S ⊂ A_d affine basis} E(A_d, S) >= (2 - o(1)) d |A_d| as d -> ∞?

Posed in arXiv:2611.04644, after Thm A.1 — Additive energy, Freiman's lemma, and an edge-isoperimetric problem on the boolean cube

OP-1100 Random High-Dimensional Translational Tiles as Lattice TilesNot in LeanCombinatorics for TCS

For every integer $d \ge 2$, let $\mathcal{T}(n,d)$ denote the set of subsets $A \subseteq \{1, \ldots, n\}^d$ that tile $\mathbb{Z}^d$ by translations (that is, there exists a subset $Z \subseteq \mathbb{Z}^d$ such that $\mathbb{Z}^d = A \oplus Z$, meaning every point in $\mathbb{Z}^d$ is uniquely expressed as $a + z$ with $a \in A, z \in Z$). A tile $A$ is a lattice tile if there exists a subgroup (lattice) $L \subseteq \mathbb{Z}^d$ such that $\mathbb{Z}^d = A \oplus L$. If $A$ is chosen uniformly at random from $\mathcal{T}(n,d)$, does the probability that $A$ is a lattice tile tend to 1 as $n \to \infty$ through multiples of 3?

Posed in arXiv:2611.05321, Question 6.3 — On the number of tiles in $[n]^d$

OP-1101 Asymptotics of Translational Tiles Modulo 3 in Higher DimensionsNot in LeanCombinatorics for TCS

For each fixed dimension $d \ge 2$ and each residue class $r \in \{1, 2\}$, determine the asymptotic growth order of $T(n, d)$ as $n \to \infty$ with $n \equiv r \pmod 3$, where $T(n, d)$ is the number of subsets $A \subseteq \{1, \ldots, n\}^d$ that tile $\mathbb{Z}^d$ by translations.

Posed in arXiv:2611.05321, Question 6.2 — On the number of tiles in $[n]^d$

OP-1102 Exact optimal approximation ratios of truthful-in-expectation scheduling for 4, 5, and 6 machinesNot in LeanMechanism Design & Auctions

For truthful-in-expectation scheduling of indivisible jobs on $n$ unrelated machines to minimize expected makespan relative to the minimum makespan of an integral assignment, what are the exact optimal approximation ratios $\rho(4)$, $\rho(5)$, and $\rho(6)$? In particular, do they match the general lower bound $(n+1)/2$ (giving $\rho(4)=5/2$, $\rho(5)=3$, and $\rho(6)=7/2$), or are they strictly larger?

Posed in arXiv:2611.05134, Theorem 1.2 — Sharp Bounds for Truthful-in-Expectation Scheduling

What is known

The paper establishes the general lower bound (n+1)/2 for all n, and matches it for n >= 7 (where ρ(n) = (n+1)/2), n = 2 (where ρ(2) = R_* ≈ 1.5059957), and n = 3 (where ρ(3) = 2). For n ∈ {4, 5, 6}, the upper bounds obtained from the Bounded-Square slot mechanism are 3, 105/32, and 29/8 respectively, while the lower bound gives 5/2, 3, and 7/2, leaving the exact values strictly open.

OP-1105 multileaf repeater graph state exact mmi maximumNot in LeanQuantum Mechanics

For any k>=1 and integers n_1,...,n_k>=1, let G be the multi-leaf repeater graph consisting of a k-vertex clique with n_i-1 pendant leaves attached to core vertex i. For four disjoint parts A,B,C,D partitioning all vertices, write I_3(A:B:C)=r(A)+r(B)+r(C)+r(D)-r(A union B)-r(A union C)-r(A union D), where r(S) is the binary cut rank of G. Put b=#{i:n_i>=4}, h=k-b, and t=#{i:n_i=3}. Is the maximum of I_3 over all such four-partitions exactly b+1 when h>=4 or when h>=2 and t>=1, and exactly b otherwise? Equivalently, this is the maximum tripartite-information violation, in bits, of the associated pure graph state.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Multi-leaf repeaters are concrete resources for quantum networking and their graph-state preparation is analyzed via split decomposition, but those preparation results do not quantify the strongest multipartite monogamy violation. The formula predicts both an extensive contribution from large local leaf blocks and a separate, nontrivial core effect that can occur with just two smaller blocks. It covers every size profile and every four-partition, including examples not covered by the tree-packing question OP-794. The refined threshold was forced by computation: three 3-vertex blocks contradict the simpler four-unused-blocks hypothesis. Evidence: Experiment 15049 independently computes binary adjacency-matrix ranks for hundreds of thousands of partitions on representative graphs, and exposed a counterexample to an initial simpler formula. Experiment 15051 then checks every block-size profile up to six core vertices by exhaustive dynamic programming over all 15 four-party occupancy masks; the refined formula has no mismatches in 209 profiles. Experiment 15050 exhausts occupancy-mask configurations and finds that the residual core term ranges from -3 to 1.

OP-1107 distance hereditary graph states collision controlledNot in LeanQuantum Mechanics

Is every connected distance-hereditary graph collision-controlled for arbitrary assignments of qubits to parties? Equivalently, for every finite distance-hereditary simple graph G on vertices 1,...,N, every finite field F of characteristic two, and every two vectors t,s in (F\{0})^N with t_i=t_j exactly when s_i=s_j for all i,j, do the two N-by-N matrices M_G(t), M_G(s) have equal rank over F, where M_G(t)_(ij)=t_i+t_j if ij is an edge and 0 otherwise? A yes answer would make the odd-replica rank sum a polynomial for all party assignments on these graph states.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Akella and Gadde prove collision control for graphs with no even cycle, for complete bipartite graphs, and for all graphs locally equivalent to a matching-controlled graph; Connolly et al. use the much larger distance-hereditary class for efficient graph-state preparation. Extending polynomial replica formulas to the latter class connects scalable quantum-network resource preparation with multi-entropy and its analytic continuation. The six-vertex graph consisting of a four-cycle and leaves attached at opposite cycle vertices is distance hereditary but experiment 15065 finds no matching-controlled representative in its entire 40-graph local-complementation orbit, so the paper's displayed sufficient criterion does not already cover this class. The KB's binary cut-rank definition supplies nearby graph-state infrastructure but does not express the extension-field weighted matrices. Evidence: Experiment 15058 tested 700 randomly generated distance-hereditary graphs with 4–10 vertices and many collision patterns over GF(256); 15067 tested fully distinct momenta on 600 more graphs of orders 8–16. Experiment 15066 exhausts all 759375 momentum assignments with the first coordinate normalized to 1 for the six-vertex example over GF(16), covering all 203 equality patterns, without a rank discrepancy. Experiment 15065 checks its complete local-complementation orbit and rules out the paper's matching-control criterion there. Experiment 15063 finds rank variation for generic six-vertex and larger graphs, providing a negative control. No finite-field experiment establishes the universal claim.

OP-1108 distance hereditary graph state multientropy n minus oneNot in LeanQuantum Mechanics

Let G be a connected distance-hereditary graph on n>=2 vertices. Let F be any finite field of characteristic two with at least n+1 elements, and choose pairwise distinct nonzero values t_1,...,t_n in F. For each set partition pi of [n], give every vertex in a block B the common value t_min(B), and let r_G(pi) be the F-rank of the symmetric zero-diagonal matrix with ij entry equal to the sum of the values of i and j when ij is an edge, and zero otherwise. Is sum over partitions pi with k=|pi|>=2 of (-1)^k (k-2)! r_G(pi) equal to 2(n-1), independently of F and of the chosen distinct values? When the collision-control conjecture OP-1107 holds, this is exactly the statement that the polynomial n→1 continuation of the graph state's multi-entropy, with each qubit its own party, is (n-1) log 2.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The rank-sum identity would give an exact value for an infinite family of graph states used in network preparation. Akella and Gadde prove n-1 for trees and complete bipartite graphs and give a partition formula for collision-controlled graphs, but this does not determine that sum for general distance-hereditary graphs. The question asks for a concrete field-theoretic equality independently of the still-open collision-control claim; OP-1107 alone asserts that the ranks are well-defined by collision pattern, not that their signed sum equals 2(n-1). The C5 graph has multi-entropy 3 log 2 rather than 4 log 2, so the connectivity hypothesis alone would be insufficient. Evidence: Experiment 15073 checks all 405 connected distance-hereditary graph isomorphism classes on 4–7 vertices using exact finite-field ranks and the complete set-partition sum; the result is n-1 in every case. It also checks 30 independently chosen momentum palettes on the six-vertex graph outside the matching-controlled LC closure. Experiment 15071 checks 270 further random distance-hereditary graphs through nine vertices. Experiment 15072 reproduces the paper's odd-cycle values and shows palette dependence for C10, a reminder that collision control is necessary for interpreting the sum as a physical continuation.

OP-1110 six cycle graph state odd replica rank nonpolynomialNot in LeanQuantum Mechanics

Let C6 have six vertices, each in its own party. For each odd integer k>=1 let Lambda=(Z/kZ)^5, e_1,...,e_5 its standard generators and e_6=0, and let Gamma_k be the symmetric binary matrix indexed by (a,u) in Lambda times {1,...,6} with entry 1 precisely when u,v are adjacent on C6 and delta_(a,b)+delta_(a+e_u,b+e_v) is 1 modulo 2. Let R(k) be rank_F2(Gamma_k). Is it true that there is no real polynomial P with P(k)=R(k) for every odd k>=1? This asks whether even the simplest cycle outside the collision-controlled class lacks a polynomial odd-replica rank continuation.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Akella and Gadde prove polynomial odd-replica rank sums for collision-controlled graph states, enabling a canonical continuation in their growth class. OP-1109 asks whether C6 and longer even cycles fail that sufficient hypothesis, but failing the hypothesis does not by itself show the summed ranks are nonpolynomial. An explicit C6 example would determine whether genuinely arithmetic replica dependence already obstructs their polynomial route in a simple six-qubit state. Any polynomial agreeing with R on all odd k must have degree at most five because 0<=R(k)<=6k^5; hence a finite exact-rank certificate can settle the infinite statement. Evidence: Experiment 15091 computes the exact odd-replica ranks via finite-field momentum sums at k=3,5,7,9,11,15,17,21,31. Direct F_2 elimination of the full Gamma matrices independently agrees at k=3 and k=5 in experiments 15090 and 15092. Experiment 15093 fits the unique degree-at-most-five polynomial to k=1,3,5,7,9,11: it predicts 4672696 at k=15, whereas the independently computed momentum-rank sum is 4429432. These computations motivate, but are not themselves a Lean proof of, the nonpolynomial statement.

OP-1113 even cycle graph state odd replica rank nonpolynomial familyNot in LeanQuantum Mechanics

For every integer m>=3, is the odd-replica rank sequence of the 2m-cycle graph state nonpolynomial? More precisely, write n=2m, put one qubit of C_n in each of n parties, let k range over positive odd integers, and let Lambda=(Z/kZ)^(n-1), with e_1,...,e_(n-1) its standard generators and e_n=0. Define the binary replica matrix Gamma_k indexed by (a,u) in Lambda x {1,...,n}, with entry adjacency_Cn(u,v) times (1_{a=b}+1_{a+e_u=b+e_v}) modulo 2. Is it true that there is no real polynomial P_m such that rank_F2(Gamma_k)=P_m(k) for every odd positive k?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

OP-1110 asks the six-cycle case; this asks for a uniform all-length boundary contrasting with the paper's collision-controlled odd cycles and four-cycle, whose odd-replica sequences are polynomial. A theorem would identify an entire natural family of stabilizer states for which the finite-replica data cannot have the polynomial continuation used in collision-controlled examples. OP-1109 asks only for weighted-rank variation at some momenta; that alone does not imply that the rank sum over root-of-unity momenta is nonpolynomial, so this is a genuinely stronger arithmetic question. Evidence: Experiments 15090-15093 and 15094-15096 compute six-cycle rank sums by independent methods. Experiment 15141 counts eight-cycle ranks at k=1,3,5,7,9,11,13,15,17: the last value is 3210672288, whereas degree-7 interpolation from the first eight gives 3174266016. It reproduces the earlier six-cycle sums. Experiment 15142 independently sums finite-field ranks directly for eight-cycle k=3,5,7 and ten-cycle k=3. Experiment 15143 computes the ten-cycle rank sums at k=1,3,5,7,9,11,13,15,17,21,31; degree-9 interpolation from the first ten predicts 222668027586240 at k=31, compared with 261955522703040 calculated there. These checks cover the first three cycle lengths, not the full family.

OP-1116 largest deficit fixed rates sharp harmonic discrepancyNot in LeanCombinatorial Games

For each integer d>=2, fix a positive probability vector alpha in R^d and start h(0)=0. At each t>=0 let i(t) be the least index attaining max_j h_j(t), and put h(t+1)=h(t)+alpha-e_i(t). Let D_d be the supremum of max_i h_i(t) over all such alpha and all t>=0. Is D_d equal to H_{d-1}=sum_{k=1}^{d-1} 1/k for every d>=2? Equivalently, does the harmonic upper bound hold for every fixed rate vector, and can it be approached arbitrarily closely by a family of positive rational rates?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Scheduling and fair apportionment researchers need the worst prefix lag of the concrete largest-deficit rule. Huang and Tian prove eventual periodicity and primitive period for rational rank-one hunger maps, not a sharp universal discrepancy envelope. Coppersmith et al. study the different add-then-select online rule with time-varying target vectors, whose extremal adversary need not be realizable by a single fixed target vector. This question identifies an exact dimension-dependent constant and whether time-independent inputs alone attain it. Evidence: Experiment 15399 exhaustively enumerated primitive positive rational weights through denominator 200 for d=2, 75 for d=3, and smaller denominator grids for d=4,5,6, with no harmonic violation; experiment 15401 found 1.498835 for d=3 (target 1.5), 1.814693 for d=4 (target 1.83333), and 2.003097 for d=5 (target 2.08333) using separated rates.

OP-1117 weighted tree demands steiner binary optima equalNot in LeanApproximation & Inapproximability

For every finite tree T=(V,E) with |V|>=2 and nonnegative rational edge weights w_e, is the minimum of sum_{uv in E} w_uv dist_H(u,v) over all subcubic trees H on vertex set V equal to the minimum over all finite subcubic trees H containing V, where extra vertices are allowed? Equivalently, does every Steiner host admit some terminal-only subcubic host with no larger weighted routing cost?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This is the weighted traffic version of OP-822, the unresolved unweighted equality. Network-design researchers need traffic volumes, not only unit demands. The new parameter is structurally substantive: the plausible stronger extension to arbitrary weighted graphs fails in experiment 15414, where a three-cycle couples three branches. Thus a successful result must use acyclicity of the demand support, and cannot merely delete Steiner vertices independently of the demand. The unweighted conjecture supplies neither the weighted claim nor an immediate way to encode arbitrary weights using a simple tree. Evidence: Experiment 15405 compared all terminal-only and cubic-Steiner host shapes for every non-subcubic demand tree through 6 vertices, using linear programming over all nonnegative edge weights; none gave a positive gap. Experiment 15410 used numerical LP separation for all cubic-Steiner host shapes with 7 terminals and arbitrary nonnegative pair demands and found no gap. Experiment 15414 found a contrasting 21-terminal weighted cyclic instance: a central-Steiner host has cost 78, all 1800 terminal-only hosts preserving the 18 weight-4 edges cost at least 80, and any host missing one such edge has cost at least 79. The LP and enumeration outputs are evidence, not formal certificates.

OP-1121 forest conflict common ordinal fairness degree plus oneNot in LeanFair Division

Let F be any finite forest with at least one edge and maximum degree Delta, and put k=Delta+1. For every partition of V(F) into blocks of size exactly k, except possibly one smaller block, does there exist a proper k-coloring of F that uses distinct colors inside each block? Equivalently, is Haviv's type-1 strong chromatic number of every such forest exactly Delta+1? Via the common-ordinal-preference equivalence, this would give a feasible stochastic-dominance EF1 allocation for every common weak order with k agents, and the threshold would be worst-case sharp for that forest.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers allocating indivisible items with conflicts seek sharp numbers of agents sufficient for ordinal fairness. Haviv's 2026 result gives the exact characterization in terms of type-1 strong colorability, a general 3Delta-1 upper bound, and a sharp threshold of three for paths; its general bound does not yield Delta+1 for branching forests. The problem asks for an all-forest exact characterization that, if true, also sharpens the common monotone-additive EF1 guarantee. Deleting a leaf naively does not preserve the block sizes and color constraints, so an ordinary greedy tree coloring does not settle it. Evidence: Experiment 15515 checked all 786 unlabeled trees on 11 and 12 vertices and all 3,269,731 eligible block partitions, using an exact backtracking coloring search; experiment 15511 covers all trees with at most 10 vertices. Experiment 15517 covers every unlabeled forest through 9 vertices and every such block partition. Experiment 15510 adds 48,000 randomly labeled tree/partition tests through 30 vertices with varied maximum degree. These are finite checks, not a theorem.

OP-1122 cubic entropic graph packing regime count unboundedNot in LeanStatistical Mechanics & Thermodynamics

For a finite simple graph G and 0<q<1, define F_G(q)=max_{S subset V(G)} [i(S)+q alpha_f(G[S minus iso(S)])], where iso(S) is the set of isolated vertices of the induced graph G[S], i(S)=|iso(S)|, and alpha_f(H)=max sum_v x_v subject to 0<=x_v<=1 and x_u+x_v<=1 for each edge uv of H. The function is continuous and piecewise linear. As G ranges over finite connected 3-regular simple graphs, is the number of maximal nonempty open intervals on which F_G is affine unbounded? If so, can this be realized even with G 3-vertex-connected?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

In the generalized Ising model of Andriolo et al., F_G(1/p) is the leading high-temperature partition-function exponent, so its linear pieces enumerate distinct graph-packing regimes as the interaction exponent varies. The paper anticipates that intermediate regimes can occur, but gives no quantitative control on how many are possible under regularity and connectedness. An unbounded family, or a universal bound, would settle whether complex multi-regime behavior survives uniform local coordination. The earlier linked-odd-cycle pitch was rejected because its objective decoupled into independent cycle contributions; exact cubic regularity rules out that construction, and the concrete four-regime example is 3-vertex-connected. The question is entirely finite graph optimization and does not require formalizing the countably infinite spin partition function. Evidence: Experiment 15504 exhaustively optimized sampled cubic graphs and found an 8-vertex connected example with three affine regimes. Experiment 15516 exactly enumerated the half-integral packing objectives for a 20-vertex graph and found four active lines (i,2 alpha_f)=(0,20),(5,8),(7,3),(8,0), whose distinct breakpoints occur at q=5/6,4/5,2/3. Experiment 15519 independently enumerated the original induced-sector objective at one point inside each of the four intervals. Experiment 15520 checked the example is cubic and remains connected after every deletion of at most two vertices. Experiment 15514 discovered this example but its wider numerical search timed out; the exact checks do not depend on its completion.

OP-1123 Optimal metric distortion for one-sided matchingNot in LeanSocial Choice Theory

In the one-sided metric matching problem with n agents and n items embedded in an unknown metric space, where agents report ordinal rankings of items sorted by distance, what is the optimal asymptotic worst-case metric distortion achievable by a randomized mechanism? Specifically, can the gap between the known lower bound Ω(log n) and the upper bound O(n^{log_4 3}) be closed, and in particular does there exist a randomized mechanism with polylogarithmic distortion O(polylog(n))?

Posed in arXiv:2611.05777, Section 8, paragraph 3 — Sublinear Metric Distortion for Matching

OP-1124 Distortion lower bound for truthful ex-post Pareto optimal matching mechanismsNot in LeanSocial Choice Theory

Let M be any randomized mechanism for one-sided matching of n agents to n items that is truthful-in-expectation (equivalently, SD-strategyproof) and ex-post Pareto optimal (every matching in the support of the mechanism is Pareto optimal with respect to the agents' reported rankings). Is it true that the worst-case metric distortion of M is Ω~(n) (that is, Ω(n / polylog(n)))?

Posed in arXiv:2611.05777, Section 8, Conjecture 1 — Sublinear Metric Distortion for Matching

OP-1125 Competitive ratio of the Harmonic algorithm for online k-serverNot in LeanOnline Algorithms

Let (V, d) be a metric space and let k ≥ 2 be an integer. The Harmonic algorithm for online k-server is the randomized memoryless algorithm that, on each uncovered request r in V, chooses server i in {1, ..., k} with probability proportional to 1/d(x_i, r) and moves it to r. Raghavan and Snir (1994) conjectured that Harmonic is k(k+1)/2-competitive. Does the Harmonic algorithm achieve competitive ratio at most k(k+1)/2 against adaptive online adversaries on every metric space?

Posed in arXiv:2611.05669, Section 6 — The Harmonic Online $k$-Server Algorithm Is Poly(k)-Competitive

What is known

The paper proves the first polynomial competitive ratio 2k^4 for Harmonic online k-server, improving on the exponential bound O(2^k log k) from 2000, but leaving open the conjectured k(k+1)/2 lower bound of Raghavan and Snir (1994).

OP-1127 Borodin-Kostochka Conjecture for Maximum Degree Between 9 and 749Not in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite simple graph with chromatic number $\chi(G)$, maximum degree $\Delta(G)$, and clique number $\omega(G)$. If $9 \le \Delta(G) \le 749$, does $G$ satisfy $\chi(G) \le \max\{\omega(G), \Delta(G) - 1\}$?

Posed in arXiv:2611.05423, Sec. 1, lines 208-212 — The Borodin--Kostochka inequality from degree 750

What is known

Borodin and Kostochka conjectured in 1977 that every graph with maximum degree Delta >= 9 satisfies chi(G) <= max{omega(G), Delta(G) - 1}. Reed proved this for sufficiently large maximum degree, and this paper lowers the threshold to Delta(G) >= 750, leaving the finite degree range 9 <= Delta(G) <= 749 open.

OP-1129 Continuous Unit Cube Threshold Maximality for Mutual Information under Resampling NoiseNot in LeanInformation Theory & Coding

Let $n \ge 1$ be an integer, $p \in [0, 1/2]$, and $\mu \in [0, 1]$. Let $X_\circ$ be distributed uniformly on the unit cube $[0, 1]^n$, and let $Y_\circ \in [0, 1]^n$ be obtained by independently resampling each coordinate of $X_\circ$ uniformly from $[0, 1]$ with probability $2p$. Let $C_\circ : [0, 1]^n \to \{0, 1\}$ be any measurable Boolean function with mean $\mathbb{E}[C_\circ] = \mu$, and let $T_\mu : [0, 1]^n \to \{0, 1\}$ be the threshold indicator function $T_\mu(y) = \mathbb{I}(y_1 \le \mu)$. Does the inequality $\mathbf{I}(C_\circ : X_\circ) \le \mathbf{I}(T_\mu : X_\circ)$ hold?

Posed in arXiv:2611.05430, Conjecture 1.2 — On the most informative Boolean function under noise

What is known

The paper shows that the progressive entropy bound $Q(C)$ is violated in the continuous setting on the unit cube, but conjectures that the threshold bit $T_\mu$ remains the maximizer of mutual information for every mean $\mu \in [0, 1]$.

OP-1131 Conjectured Size Bound of O(n^{2/3}p^{2/3} + n) for Distance PreserversNot in LeanGraph Theory & Graph Algorithms

Let $G = (V, E)$ be a finite simple undirected unweighted graph on $n$ vertices, and let $P \subseteq V \times V$ be a set of $p = |P|$ demand pairs. A subgraph $H = (V, E_H)$ with $E_H \subseteq E$ is called a distance preserver for $(G, P)$ if $\mathrm{dist}_H(s, t) = \mathrm{dist}_G(s, t)$ for every pair $(s, t) \in P$. Does there exist an absolute constant $C > 0$, independent of $G, P, n, p$, such that for every $n$-vertex graph $G$ and every set $P$ of $p$ demand pairs with $n^{1/2} \le p \le n$, there exists a distance preserver $H$ for $(G, P)$ with at most $C n^{2/3} p^{2/3}$ edges (or more generally, at most $C(n^{2/3} p^{2/3} + n)$ edges for all $p$)?

Posed in arXiv:2611.05878, Sec. 1, paragraph before Theorem 1 — Improved Bounds on Distance Preservers

OP-1133 Optimal polynomial approximation exponent for unweighted reachability diameter in nearly-linear timeNot in LeanAlgorithm Design & Analysis

Let G = (V, E) be an unweighted directed graph on n vertices and m edges, and let D(G) = max { dist_G(u, v) : u, v in V, dist_G(u, v) < ∞ } denote its reachability diameter. What is the infimum α >= 0 such that there exists a randomized algorithm running in O~(m + n) time that outputs an estimate D_hat satisfying D(G) / n^(α + o(1)) <= D_hat <= D(G) with probability at least 2/3? (Currently, 2/15 <= α <= 1/3).

Posed in arXiv:2611.05712, Sec. 1, after Problem 2 — Reachability Diameter: Beyond the Square-Root Barrier, with Polynomial Hardness

What is known

The paper breaks the n^(1/2) barrier by presenting an n^(1/3+o(1))-approximation algorithm in nearly-linear time, and proves an n^(2/15-ε) conditional hardness lower bound under the 3-uniform Hyperclique hypothesis, leaving a gap between 2/15 and 1/3 for the optimal exponent.

OP-1135 Intersection Size of Critical Diameter Subgraphs in Euclidean SpaceNot in LeanGraph Theory & Graph Algorithms

Let $d \ge 3$ be an integer. Let $S_1, S_2 \subset \mathbb{R}^d$ be finite non-empty subsets such that $\operatorname{diam}(S_1) = \operatorname{diam}(S_2) = \operatorname{diam}(S_1 \cup S_2) = 1$, where $\operatorname{diam}(S) = \max_{x,y \in S} \|x - y\|_2$. For a finite set $S \subset \mathbb{R}^d$ of unit diameter, let $\mathsf{DG}(S)$ denote the diameter graph with vertex set $S$ and edge set $\{\{x,y\} \subseteq S : \|x - y\|_2 = 1\}$. If both $\mathsf{DG}(S_1)$ and $\mathsf{DG}(S_2)$ are $d$-critical (that is, each has chromatic number $d$, and deleting any vertex yields a strictly $(d-1)$-colorable subgraph), is it true that $|S_1 \cap S_2| \ge d - 2$?

Posed in arXiv:2611.05631, Section 5, Question 4 — On Diameter Graphs Problems: A proof of Brass's Conjecture

OP-1136 Finiteness of Brass Numbers for Four-Dimensional Diameter GraphsNot in LeanGraph Theory & Graph Algorithms

For a finite subset $S \subset \mathbb{R}^d$, let $\mathsf{DG}(S)$ be its diameter graph, where two points are connected by an edge if and only if their Euclidean distance equals $\operatorname{diam}(S)$. Let $\mathsf{Br}_S(k)$ denote the minimum number of vertices that must be removed from $S$ such that the subgraph of $\mathsf{DG}(S)$ induced by the remaining vertices is $k$-colorable. The Brass number is defined by $\mathsf{Br}(k,d) := \sup_{S \subset \mathbb{R}^d, |S| < \infty} \mathsf{Br}_S(k) \in \mathbb{N} \cup \{\infty\}$. Is $\mathsf{Br}(4,4)$ finite (that is, does there exist an absolute constant $c$ such that from every finite set $S \subset \mathbb{R}^4$ one can remove at most $c$ points to leave a 4-colorable diameter graph)? Is $\mathsf{Br}(3,4)$ infinite?

Posed in arXiv:2611.05631, Section 4.1 — On Diameter Graphs Problems: A proof of Brass's Conjecture

OP-1137 Exact Value of the Maximum Size of an Isosceles Set in Dimension 23Not in LeanCombinatorics for TCS

A finite subset $S \subset \mathbb{R}^d$ is called isosceles if for every subset of three points $\{x, y, z\} \subseteq S$, at least two of the three Euclidean distances $\|x - y\|$, $\|y - z\|$, $\|x - z\|$ are equal. Let $\mathrm{iso}(d)$ denote the maximum cardinality of an isosceles set in $\mathbb{R}^d$. It is known that $\mathrm{iso}(23) = \max\{g(23), 278\}$, where $g(23)$ is the maximum cardinality of a two-distance set in $\mathbb{R}^{23}$, which implies $278 \le \mathrm{iso}(23) \le 575$. What is the exact value of $\mathrm{iso}(23)$?

Posed in arXiv:2611.05421, Sec. 1, Thm 1.3 — Isosceles sets in Euclidean spaces of dimension nine to twenty-two

What is known

The paper shows that the maximum size of an isosceles set in dimension 23 satisfies iso(23) = max{g(23), 278}, where g(23) is the maximum size of a two-distance set in dimension 23. Since 277 <= g(23) <= 575, this establishes 278 <= iso(23) <= 575, leaving the exact value of iso(23) open.

OP-1138 General Formula for the Maximum Size of an Isosceles Set in All DimensionsNot in LeanCombinatorics for TCS

For an integer $d \ge 1$, let $\mathrm{iso}(d)$ denote the maximum cardinality of an isosceles set in $\mathbb{R}^d$, let $g(d)$ denote the maximum cardinality of a two-distance set in $\mathbb{R}^d$, and let $M(d)$ denote the maximum cardinality of a spherical two-distance set in $\mathbb{R}^d$. Is it true that for every integer $d \ge 2$, $\mathrm{iso}(d) = \max\{g(d), M(d) + 1, M(d - 1) + 3\}$?

Posed in arXiv:2611.05421, Remark 6.1 — Isosceles sets in Euclidean spaces of dimension nine to twenty-two

What is known

The lower bound max{g(d), M(d)+1, M(d-1)+3} matches iso(d) for all d <= 22 and also holds for d = 23 (where M(23)=276 and M(22)=275, so M(22)+3 = 278). The paper leaves open whether this formula gives the exact value of iso(d) in all Euclidean dimensions d >= 24.

OP-1139 Nonexistence of q-Ary 3-Designs at Minimum Weight in Doubly-Extended Reed-Solomon CodesNot in LeanInformation Theory & Coding

Let $q \ge 3$ be a prime power, and let $\mathbb{F}_q$ be the finite field of order $q$. For an integer $k$ with $2 \le k \le q-1$, let $\mathcal{C}_k \subseteq \mathbb{F}_q^{q+1}$ be the doubly-extended Reed-Solomon (DRS) code of dimension $k$ and minimum distance $d = q - k + 2$, consisting of evaluation vectors $(f(0), f(1), f(\alpha), \dots, f(\alpha^{q-2}), f(\infty))$ for all $f \in \mathbb{F}_q[x]$ of degree at most $k-1$, where $\alpha$ is a primitive element of $\mathbb{F}_q$ and $f(\infty)$ is the coefficient of $x^{k-1}$. A set $\mathcal{A} \subseteq \mathbb{F}_q^{q+1}$ of vectors of constant Hamming weight $d$ is a $q$-ary $3$-design if every vector $\bm{x} \in \mathbb{F}_q^{q+1}$ of Hamming weight $3$ is covered by the same number of vectors in $\mathcal{A}$ (where $\bm{c}$ covers $\bm{x}$ if $c_i = x_i$ for every coordinate $i$ where $x_i \ne 0$). Is it true that for all prime powers $q \ge 3$ and all $2 \le k \le q-1$, the set $\mathcal{A}_d(\mathcal{C}_k)$ of minimum-weight codewords in $\mathcal{C}_k$ does not form a $q$-ary $3$-design?

Posed in arXiv:2611.05861, Remark 12 — A Complete Characterization of $q$-Ary $2$-Designs in Doubly-Extended Reed-Solomon Codes

What is known

The paper establishes that gcd(k-1, q-1) = 1 and (q-1)^2 | binom(q-2, k-1) are necessary for minimum-weight codewords of DRS codes to form a q-ary 3-design, and conjectures based on analysis that no DRS code with 2 <= k <= q-1 holds a q-ary 3-design at minimum weight.

OP-1141 Positive Density of Winning, Losing, and Draw Positions in Epstein's GameNot in LeanCombinatorial Games

In Epstein's put-or-take-a-square game, a player faced with a positive integer n may move to either D(n) = n - ⌊√n⌋² or U(n) = n + ⌊√n⌋², and the game terminates when 0 is reached. Positions are partitioned into winning (N-positions), losing (P-positions), and draw positions (positions of infinite remoteness, from which optimal play cycles). Does the set of losing positions (P-positions) have positive natural density in the positive integers, that is, does liminf_{X → ∞} (1/X) #{n ≤ X : n is a P-position} > 0? Likewise, does the set of winning positions have positive natural density?

Posed in arXiv:2611.05898, Sec. 6, Remark after Thm 1.6 — An Asymptotic for E. P. Stein Numbers

OP-1147 Isomorphism classification of distance-regular graphs realizing K-geodetic intersection arraysNot in LeanGraph Theory & Graph Algorithms

For every realizable intersection array {b_0, ..., b_{d-1}; c_1, ..., c_d} satisfying the K-geodetic product condition ∏_{j=1}^i c_j ≤ K for all 1 ≤ i ≤ d with K ∈ {2, 3}, classify all pairwise nonisomorphic distance-regular graphs that realize the given intersection array.

Posed in arXiv:2611.05762, Problem 9.3.1, Sec. 9.3 — Classifying K-Geodetic Graphs Via Combinatorial Designs and Distance-regularity

OP-1149 Hamiltonicity conjecture for connected bicirculantsNot in LeanGraph Theory & Graph Algorithms

Let $G = B(m; R, S, T)$ be a connected regular bicirculant graph of degree at least 2, where $m \ge 1$ and $R, S, T \subseteq \mathbb{Z}_m$ satisfy $R = -R$, $T = -T$, $0 \notin R \cup T$, $0 \in S$, and $|R| = |T|$. Is $G$ Hamiltonian, unless $G$ is isomorphic to the complete graph $K_2$ or to a generalized Petersen graph $G(m, 2)$ with $m \equiv 5 \pmod 6$?

Posed in arXiv:2611.05531, Conjecture 1 — Hamilton cycles in bicirculants with non-coprime connection sets

OP-1150 Hamiltonicity of connected cyclic Haar graphs of odd order and degree at least 4Not in LeanGraph Theory & Graph Algorithms

Let $m \ge 3$ be an odd integer and let $S \subseteq \mathbb{Z}_m$ be a subset such that $0 \in S$, $|S| \ge 4$, and $\gcd(m, S) = 1$. Does the cyclic Haar graph $H(m;S) = B(m; \emptyset, S, \emptyset)$, which is the bipartite graph on vertex set $\{u_0, \dots, u_{m-1}\} \cup \{v_0, \dots, v_{m-1}\}$ with edge set $\{u_i v_{i+s} : i \in \mathbb{Z}_m, s \in S\}$, admit a Hamilton cycle?

Posed in arXiv:2611.05531, Sec. 5, line 821 — Hamilton cycles in bicirculants with non-coprime connection sets

OP-1153 binary forbidden even distance critical scale stabilityNot in LeanCombinatorics for TCS

For even n>=16 let M_n=2 sum_{j=0}^{(n-4)/2} binom(n-1,j). For each coordinate i and centers c_0,c_1 in {0,1}^{n-1}, let E(i,c_0,c_1) consist of all x in {0,1}^n for which, writing epsilon=sum_j x_j mod 2 and deleting coordinate i, the resulting (n-1)-word is within Hamming distance (n-4)/2 of c_epsilon. Is it true that for every eta>0 there exist delta>0 and n_0 such that, for every even n>=n_0 and every F subset {0,1}^n containing no pair at Hamming distance n-2, |F|>=M_n-delta*2^n/sqrt(n) implies min_{i,c_0,c_1} |F symmetric_difference E(i,c_0,c_1)|<=eta*2^n?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Coding theorists and extremal set theorists need a robust form of Jiang and Yang's new exact extremal characterization. Their Theorem 1.2 identifies equality for n>=16 but does not control near-extremizers. The deficit scale matters: weighted-majority examples numerically have a vanishing relative deficit O(1/sqrt(n)) yet remain a positive fraction of the cube from all exact extremizers, so ordinary relative-size stability is the wrong question. The proposed stronger hypothesis probes the first nontrivial scale below that phenomenon, and permits independently chosen parity centers as required by the paper's non-anticode extremizers. Known m>=3 forbidden-intersection stability tools explicitly exclude the binary case. Evidence: Experiments 15728 and 15734 computed exact distances to all classified extremizers by Walsh-Hadamard convolution. For n=16,18,20, a code formed from weighted spin sums with half weights 1, half 2 and threshold greater than 4 had normalized symmetric distance 0.1076, 0.0911, 0.1081; its deficits in units 2^n/sqrt(n) were 0.3438, 0.1543, 0.3648. Weight pairs (2,3),(4,5),(9,10) gave a range of smaller deficits and distances. These are examples motivating the scale, not a proof of uniform stability.

OP-1154 mandelstam tamm sharp wasserstein spectral stabilityNot in LeanQuantum Mechanics

Let mu be any probability measure on R with mean 0 and variance 1, whose characteristic function has a positive zero; let t(mu) be its least positive zero. Put delta(mu)=2 t(mu)/pi-1 and nu=(delta_{-1}+delta_{+1})/2. Is the following sharp asymptotic stability law true? lim_{epsilon down to 0} sup { W_2(mu,nu)^2 / delta(mu) : 0<delta(mu)<=epsilon } = 2 pi/(4-pi), where W_2 is the quadratic Wasserstein distance. In physical terms mu is the centered and variance-normalized energy spectral measure of a pure quantum state, t is its first orthogonalization time, and nu is the unique saturating spectral measure.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks how close in a physically meaningful energy-transport metric a state must be to the unique speed-limit-saturating spectrum when its orthogonalization time is nearly minimal, with the optimal leading constant. Smolic's Theorems 4.1 and 5.1 establish equality and qualitative concentration near the auxiliary-function zero set, but do not determine the sharp W2 rate or its constant; concentration alone does not control rare high-energy tails. The three-level family suggests that the worst instability is rare population at the mean energy, rather than a small displacement of the two main peaks. The question covers general Borel spectral measures, including continuous spectra, and is mathematically equivalent to a concrete moment problem. Evidence: Experiment 15732 optimized over non-symmetric discrete spectral measures on grids spanning [-12,12], enforcing unit variance, zero mean, and zero real and imaginary survival amplitude. At excess delta=0.01, 0.002, 0.0004, 0.00008, the best W2^2/delta values were 6.7443, 7.1968, 7.2947, 7.3144, approaching 2pi/(4-pi)=7.3196. For measures with mass p at 0 and (1-p)/2 at each of +/-1/sqrt(1-p), direct evaluation gives ratios 7.2341, 7.3025, 7.3162, 7.3189 at p=0.01,0.002,0.0004,0.00008. Gridded optimization does not prove the upper bound.

OP-1155 balanced forest greedy root law sqrt three and tailNot in LeanOnline Algorithms

For every integer h>=0, start with 2^h isolated labeled vertices. At round j=0,...,h-1, join the distinguished roots of each consecutive pair of 2^j-vertex components and keep the root of the left component as the distinguished root of the merged component. Orient every new edge toward the endpoint of smaller current indegree-minus-outdegree discrepancy, using independent fair coins on ties. Let X_h be the discrepancy of the final distinguished root. Do the laws of X_{2h} and X_{2h+1} each converge in total variation to symmetric integer-valued probability laws mu_even and mu_odd, with mu_even({0})=sqrt(3)-1, and does the limit kappa=lim_{k->infinity} [-log mu_even({2k,2k+2,...})]/2^(2k) exist in (0,infinity)?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This exactly specified hierarchical forest is a canonical nontrivial benchmark for online discrepancy. OP-1106 asks whether randomized greedy has a uniform doubly exponential tail on all oblivious forest arrival sequences, but even an affirmative upper bound would neither give convergence to a parity-dependent law nor the sharp tail exponent and algebraic central mass for this balanced family. Lei's general O((log T)^(1/3)) theorem uses another algorithm and does not determine this distribution. A positive answer would identify a precise fixed point and the rare-event scale behind the log-log benchmark, useful both for analyzing greedy and for measuring possible worst-case forests. Evidence: Experiment 15737 iterated the exact distributional recurrence at 500-digit precision through h=500; P(X_h=0) differed from sqrt(3)-1 by 9.5e-214 at h=500. Experiment 15741 computed -log Pr(X_160>=k)/2^k as 0.50253,0.63193,0.66442,0.67254,0.67457,0.67508 for even k=2,4,6,8,10,12. Experiment 15739 directly simulated 25,000 runs at each h=2,4,6,8,10, agreeing with the recursion at the precision resolved. These are numerical observations, not a proof.

OP-1156 three lexicographic agents efx pareto envy free lottery three supportNot in LeanFair Division

For every finite set of indivisible goods and three agents with positive additive lexicographic valuations, does there exist an ex-ante envy-free lottery supported on at most three complete allocations, each of which is both EFX and Pareto optimal? A valuation is lexicographic if its goods can be ordered g_1,...,g_m with v(g_r)>sum_{s>r}v(g_s). Ex-ante envy-free means E[v_i(A_i)]>=E[v_i(A_j)] for all agents i,j; EFX means v_i(A_i)>=v_i(A_j minus {g}) for every i,j and every g in A_j; Pareto optimal means no complete allocation weakly improves all three agents and strictly improves one. Probabilities may be arbitrary real numbers. Is the universal support bound three sharp?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Small-support fair lotteries are easier to explain, audit, and implement. Panchapakesan and Vaish's Theorem 4.4 guarantees an ex-ante envy-free EFX+PO lottery for this three-agent domain, while their general Caratheodory argument yields at most seven support points. It gives no three-point compression, because six directed envy inequalities can interact and arbitrary convex-combination compression can leave the EFX+PO outcome set. The two-agent support-two result does not extend by pairwise decomposition. Three is necessary already for three agents with identical strongly superincreasing three-good valuations, as indicated by the exact small-instance optimization. Equal probabilities are deliberately not required: an independently enumerated instance has no uniform three-outcome solution but does admit an unequal two-outcome lottery. Evidence: Experiment 15751 exhaustively examined all 576 four-good and 14,400 five-good rankings up to simultaneous good relabeling using powers-of-two values; the minimum supports were always 1, 2, or 3, with 3 required in 4 and 36 cases respectively. Experiment 15750 examined 5,500 heterogeneous superincreasing profiles for 6–8 goods, with half forced to have a common favorite; none needed more than 3. Experiment 15749 independently enumerated all EFX+PO outcomes in the four-good profile [[1,12,6,25],[7,4,12,27],[8,4,17,31]], finding no equal-probability three-outcome lottery although an unequal two-outcome lottery exists. The computations use MILP and are not proofs.

OP-1157 clifford matchgate loop density diffusive zeta constantNot in LeanQuantum Computation

For each even L, start with the perfect matching pi_0={(2j,2j+1): 0<=j<L} of 2L labeled Majorana endpoints. At each integer layer alternately partition the line of L sites into neighboring pairs (0,1),(2,3),... and (1,2),(3,4),..., leaving boundary sites idle. On each active pair independently choose a uniform permutation of its four endpoints and apply all these permutations to the current matching. Let c_L(t) be the number of connected components of the union of the resulting matching and the initial matching, counting a doubled edge as one component. Does rho(t)=lim_{even L->infinity} E[c_L(t)]/L exist for each fixed t, and is lim_{t->infinity} sqrt(t) rho(t)=zeta(3/2)/(4 sqrt(pi))?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The number of loops controls output-probability moments for random Clifford Gaussian states, and determines how their fermionic Porter–Thomas statistics emerge in local matchgate circuits. Lami's Section IV establishes the exact perfect-matching dynamics and a single-arc projection but reports an empirical approximately 0.37 early-time loop coefficient; the projection gives only 1/(4 sqrt(pi)), about 0.141, because it omits multi-arc correlations. The proposed exact zeta value and the thermodynamic-then-long-time limit address those omitted correlations. The paper does not state this exact constant or establish the limit. It would provide an analytically testable benchmark for quantum-circuit scrambling and a precise loop-gas result. Evidence: Experiment 15759 simulated 120–400 independent circuits at L=1024,2048,4096. At depth t=256, sqrt(t) E[c_L(t)]/L was 0.4004, 0.3884, 0.3776, compared with zeta(3/2)/(4 sqrt(pi))=0.36847; an informal linear extrapolation in 1/L gives about 0.371. Experiment 15755 gives the smaller-size/time dependence, and independent exact enumeration of the L=4 Markov chain (15753) agrees with 50,000 direct simulations (15754). Finite-size and finite-time effects are substantial, so the exact constant remains conjectural.

OP-1159 Minimum Number of Bent Summands for Symmetric Counterexample Functions in Higher DimensionsNot in LeanCombinatorics for TCS

For every power of two $n = 2^k \ge 16$, let $F_n : \mathbb{F}_2^n \to \mathbb{F}_2$ be the symmetric Boolean function $F_n = \sum_{j=0}^{n/4} \sigma_{2j} = 1 + \sigma_2 + \sigma_4 + \cdots + \sigma_{n/2}$, where $\sigma_j$ is the $j$-th elementary symmetric Boolean polynomial in $n$ variables. What is the minimum integer $k(n)$ such that $F_n$ can be written as the sum $F_n = \sum_{i=1}^{k(n)} b_i$ of $k(n)$ bent functions $b_1, \dots, b_{k(n)} : \mathbb{F}_2^n \to \mathbb{F}_2$? In particular, is $k(n) = 3$ for all $n = 2^k \ge 16$, or does there exist an absolute constant $C$ such that $k(n) \le C$ for all $n$?

Posed in arXiv:2611.06744, Sec. 7, paragraph 2 — A family of symmetric counterexamples to the bent sum decomposition conjecture

OP-1161 Upper bound of 2.3^n on the maximum number of stable matchingsNot in LeanMatching & Market Design

For every positive integer $n$ and every stable marriage instance consisting of $n$ men and $n$ women with complete, strict preference lists, is the number of stable matchings strictly less than $2.3^n$?

Posed in arXiv:2611.06604, Conjecture 7.1 — A Sub-$3^n$ Upper Bound on the Number of Stable Matchings

What is known

The paper proves an upper bound of 2.999^n, improving the previous bound of 3.55^n (corrected to 4.01^n), but points out that the known lower bound construction is (2.28^n)/poly(n). The authors conjecture that the true maximum base is strictly below 2.3.

OP-1163 Gyárfás-Sumner Conjecture on Chi-Boundedness of Tree-Induced-Free GraphsNot in LeanGraph Theory & Graph Algorithms

For every finite tree $T$ and every positive integer $k$, does there exist a constant $C(T, k) > 0$ such that every finite simple graph $G$ with clique number $\omega(G) \le k$ that does not contain $T$ as an induced subgraph satisfies $\chi(G) \le C(T, k)$?

Posed in arXiv:2611.06699, Sec. 3, Concluding remarks — Polylogarithmic bound for the Gy\'arf\'as-Sumner conjecture

What is known

The paper improves the previous bound on the chromatic number of tree-induced-free graphs of bounded clique number from |G|^{o(1)} to (log |G|)^{O(1)}, but leaves the full conjecture (an absolute constant bound depending only on T and k) open.

OP-1164 Determinantal complexity of the 5x5 permanentNot in LeanAlgebraic & Lattice-Based Complexity

For an integer n ≥ 1, let per_n ∈ ℂ[x_{ij} : 1 ≤ i,j ≤ n] denote the permanent polynomial per_n(X) = ∑_{σ ∈ S_n} ∏_{i=1}^n x_{i,σ(i)}. The determinantal complexity dc(per_n) is the minimum positive integer m such that there exists an m × m matrix A whose entries are affine linear forms in (x_{ij})_{1 ≤ i,j ≤ n} with coefficients in ℂ satisfying det(A) = per_n(X). An explicit construction of 2011 established that dc(per_n) ≤ 2^n - 1. Since dc(per_3) = 7 and dc(per_4) = 15, does dc(per_n) = 2^n - 1 hold for all n ≥ 5, or starting with the first open case n = 5, is dc(per_5) = 31?

Posed in arXiv:2611.06658, Sec. 1 — The determinantal complexity of the 4*4 permanent is 15

What is known

The 2011 upper bound of 2^n - 1 is known to be optimal for representations respecting the symmetry group of the permanent, and has now been proven unconditionally optimal for n = 3 and n = 4. Whether a representation without symmetry can achieve size smaller than 2^n - 1 for n ≥ 5 remains open.

OP-1173 Frankl's Conjecture on Sperner Families with Bounded VC-Dimension for all n >= 2dNot in LeanCombinatorics for TCS

Let $d \ge 1$ and $n \ge 2d$ be integers. Let $\mathcal{F} \subseteq 2^{[n]}$ be a Sperner family (an antichain under set inclusion, meaning no element of $\mathcal{F}$ is a subset of another) with VC-dimension at most $d$ (that is, no subset $S \subseteq [n]$ with $|S| > d$ has all its subsets appearing as traces $\{F \cap S : F \in \mathcal{F}\}$). Is it true that $|\mathcal{F}| \le \binom{n}{d}$?

Posed in arXiv:2611.06860, Remark 1.3 — Largest Sperner families with bounded VC-dimension

OP-1175 Transition Threshold for Pentagon Density in Book-Free GraphsNot in LeanGraph Theory & Graph Algorithms

Let $B_k$ denote the book graph consisting of $k$ triangles sharing a common edge. For a real parameter $c > 0$, define the asymptotic pentagon density $$F(c) := \limsup_{n \to \infty} \frac{\operatorname{ex}(n, C_5, B_{\lfloor cn \rfloor})}{n^5},$$ where $\operatorname{ex}(n, C_5, B_{\lfloor cn \rfloor})$ denotes the maximum number of pentagons $C_5$ in an $n$-vertex simple graph containing no book $B_{\lfloor cn \rfloor}$ as a subgraph. What is the exact value of the transition threshold $$c^* := \sup \{ c > 0 : F(c) = 1/3125 \},$$ what is the value of $F(c)$ for $c > c^*$, and what graph families achieve the extremal values?

Posed in arXiv:2611.06753, Sec. 4, Open problem — The Exact Number of Pentagons in Book-Free Graphs

What is known

The paper proves that $F(c) = 1/3125$ for all sufficiently small $c \le \rho$ and that $F(c) > 1/3125$ for all $c \ge 0.14$, leaving the exact value of the transition threshold $c^*$ and the curve $F(c)$ open.

OP-1177 Optimal deterministic one-way communication complexity of connectivity under edge deletionsNot in LeanCommunication Complexity

Let $n \ge 1$ be an integer. In the one-way deterministic connectivity problem, Alice holds a simple graph $G_A = (V, E_A)$ on $n$ vertices and Bob holds a simple graph $G_B = (V, E_B)$ with $E_B \subseteq E_A$. Alice transmits a deterministic message $M(G_A) \in \{0, 1\}^m$ to Bob, who must deterministically output whether $G_A - G_B = (V, E_A \setminus E_B)$ is connected. Is the deterministic one-way communication complexity $m$ of this problem $\tilde{\Theta}(n^{3/2})$ bits, closing the gap with the upper bound $\widetilde{O}(n^{7/4})$?

Posed in arXiv:2611.06626, Sec. 1.5, open question 1 — Deterministic Connectivity Sketches Under Edge Deletions

What is known

The paper establishes an upper bound of O~(n^{7/4}) and a lower bound of Omega~(n^{3/2}) for deterministic one-way communication complexity of connectivity under edge deletions, leaving the exact exponent open between 1.5 and 1.75.

OP-1178 Quadratic lower bound on deterministic linear sketches for graph connectivityNot in LeanCommunication Complexity

Let $n \ge 1$ be an integer. Let $\mathcal{S} \in \mathbb{R}^{m \times \binom{n}{2}}$ be a linear sketching matrix whose entries are bounded in absolute value by $n^c$ for a constant $c > 0$. Suppose that for every pair of simple graphs $G, G'$ on $n$ vertices, if exactly one of $G$ or $G'$ is connected, then $\mathcal{S}\mathbf{1}_G \neq \mathcal{S}\mathbf{1}_{G'}$, where $\mathbf{1}_G \in \{0,1\}^{\binom{n}{2}}$ is the indicator vector of the edge set of $G$. Is $m = \widetilde{\Omega}(n^2)$?

Posed in arXiv:2611.06626, Conjecture 1.10 — Deterministic Connectivity Sketches Under Edge Deletions

What is known

While randomized dynamic streaming achieves O~(n) bits via linear sketches, the paper conjectures that deterministic linear sketches for connectivity require Omega~(n^2) measurements.

OP-1179 Upper bound on vector chromatic number of the universal connectivity graphNot in LeanGraph Theory & Graph Algorithms

Let $P_n$ be the universal graph whose vertices are the $2^{\binom{n}{2}}$ simple graphs on $n$ vertices, where two graphs $G$ and $H$ are adjacent if and only if the connected components of $G - (G \cap H)$ and $H - (G \cap H)$ are different. For a graph $\Gamma$, its vector chromatic number $\chi_v(\Gamma)$ is the infimum over real numbers $k > 1$ such that there exists an assignment of unit vectors $u_v \in \mathbb{R}^d$ (for some dimension $d$) to each vertex $v \in V(\Gamma)$ satisfying $\langle u_v, u_w \rangle \le -1/(k-1)$ for all adjacent pairs $(v, w)$. Is $\chi_v(P_n) \le 2^{O(n^{3/2})}$?

Posed in arXiv:2611.06626, Sec. 1.5, open question 2 — Deterministic Connectivity Sketches Under Edge Deletions

What is known

The paper's lower bound techniques apply directly to the vector chromatic number of the universal graph P_n. Establishing whether chi_v(P_n) <= 2^{O(n^{3/2})} determines whether these PSD-based techniques can yield any stronger lower bound.

OP-1182 Closing the Additive Gap for Universally Truthful SchedulingNot in LeanMechanism Design & Auctions

For scheduling tasks on $n$ unrelated machines to minimize makespan, does there exist a universally truthful randomized mechanism achieving a worst-case expected approximation ratio of $(n+1)/2 + O(1)$ against the optimal integral makespan? In particular, can the additive $O(\sqrt{n \log n})$ gap between the $(n+1)/2$ lower bound and the upper bound attained by the Exp-Bounded-Square mechanism be reduced to an absolute constant independent of $n$?

Posed in arXiv:2611.06642, Sec. 1, Conclusion — Tight bounds for fractional and randomized truthful scheduling

OP-1183 Minimum family size for undecidability of 2x2 integer matrix mortalityNot in LeanComputability & Recursion Theory

What is the minimum integer k ≥ 3 such that the matrix mortality problem is undecidable for families of k matrices in Mat₂(ℤ)? That is, for which minimal k is there no algorithm that takes as input a set of k integer 2 × 2 matrices {M₁, …, M_k} and decides whether there exist indices i₁, …, i_m ∈ {1, …, k} with m ≥ 1 such that M_{i_m} ⋯ M_{i₁} = 0?

Posed in arXiv:2611.06562, Appendix H, lines 2449-2453 — Mortality Is Undecidable for $2 \times 2$ Integer Matrices

What is known

Mortality is known to be decidable for k = 2 rational 2x2 matrices (Bournez & Branicky 2002) and undecidable for k = 5,799 integer 2x2 matrices (this paper). The exact boundary between decidability and undecidability remains completely open in the range 3 ≤ k ≤ 5,798.

OP-1184 Undecidability of 2x2 integer matrix mortality with determinants restricted to {2, -2}Not in LeanComputability & Recursion Theory

Can matrix mortality remain undecidable for a fixed finite family 𝒢 ⊂ Mat₂(ℤ) of nonsingular matrices and a fixed rational line L ⊂ ℚ² when the determinants of all matrices in 𝒢 are restricted to {-2, 2}, where the input is only a nonzero rank-one matrix R ∈ Mat₂(ℤ) with image L, and the question is whether 𝒢 ∪ {R} is mortal?

Posed in arXiv:2611.06562, Appendix H, lines 2464-2469 — Mortality Is Undecidable for $2 \times 2$ Integer Matrices

What is known

The paper's construction requires p > 6N where N is the total number of program states and intermediate phases, to ensure disjoint residue blocks modulo p. It is open whether p = 2 suffices or whether small determinant sets {-2, 2} render the problem decidable or require an entirely different encoding.

OP-1187 Query complexity of approximate matching LCA on general graphsNot in LeanAlgorithm Design & Analysis

Let $G = (V, E)$ be a finite simple graph of maximum degree $\Delta \ge 2$, and let $\varepsilon \in (0, 1)$. Does there exist a randomized Local Computation Algorithm (LCA) providing query access to an integral matching $M \subseteq E$ such that $\mathbb{P}\{|M| \ge (1-\varepsilon)\nu(G)\} \ge 2/3$ (where $\nu(G)$ denotes the maximum matching cardinality of $G$), such that each mate query (returning the matched partner in $M$ of a queried vertex $v \in V$, or $\bot$ if unmatched) is answered using at most $(2\Delta)^{O(1/\varepsilon)}$ graph queries and arithmetic operations in the worst case, consistent across all queries?

Posed in arXiv:2611.06024, Sec. 10, Integral matchings in general graphs — Optimal LCA and Sublinear Estimation for Bipartite Matching in $\Delta^{O(1/\varepsilon)}$ Queries

OP-1188 Sublinear estimation of matching size in unbounded-degree graphs with polynomial-exponent dependence on epsilonNot in LeanAlgorithm Design & Analysis

Let $G = (V, E)$ be an $n$-vertex simple graph given via an adjacency matrix query oracle, and let $\varepsilon \in (0, 1)$. Can the maximum matching cardinality $\nu(G)$ be estimated within an additive error of $\pm \varepsilon n$ with probability at least $2/3$ using $n^{2 - \varepsilon^c}$ adjacency matrix queries for some absolute constant $c > 0$ independent of $n$ and $\varepsilon$?

Posed in arXiv:2611.06024, Sec. 10, Graphs of unbounded degree — Optimal LCA and Sublinear Estimation for Bipartite Matching in $\Delta^{O(1/\varepsilon)}$ Queries

OP-1191 Fourier Entropy-Influence ConjectureNot in LeanCircuit Complexity & Lower Bounds

Does there exist an absolute constant $C > 0$ such that every Boolean function $f\colon \{-1,1\}^n \to \{-1,1\}$ satisfies $\mathbb{H}(\widehat{f}^2) \le C \cdot \mathsf{Inf}(f)$, where $\mathbb{H}(\widehat{f}^2) = \sum_{S \subseteq [n]} \widehat{f}(S)^2 \log_2(1/\widehat{f}(S)^2)$ is the Shannon entropy of the Fourier distribution of $f$ and $\mathsf{Inf}(f) = \sum_{S \subseteq [n]} |S| \widehat{f}(S)^2$ is the total influence of $f$?

Posed in arXiv:2611.06451, Conjecture 1 — Fourier Entropy Bounds via Approximations

What is known

Posed by Friedgut and Kalai (1996), this is the central conjecture in the analysis of Boolean functions motivating the paper's investigation of Fourier entropy bounds.

OP-1195 Sub-Cubic Ranking and Unranking for Permutations in Heap's OrderNot in LeanCombinatorics for TCS

Let $A^{(n)}_0, A^{(n)}_1, \dots, A^{(n)}_{n!-1}$ be the sequence of permutations of $\{0, 1, \dots, n-1\}$ generated by the standard iterative Heap algorithm starting from the identity array $I_n = [0, 1, \dots, n-1]$ (with counters $c[0 \dots n-1]$ initialized to $0$, iteratively outputting $A$, finding the smallest $i < n$ with $c[i] < i$, swapping $A[0]$ and $A[i]$ if $i$ is even or $A[c[i]]$ and $A[i]$ if $i$ is odd, incrementing $c[i]$, and resetting $c[0 \dots i-1]$ to $0$). The ranking problem takes a permutation $\pi \in S_n$ and returns its index $r \in \{0, \dots, n!-1\}$ in the Heap sequence; the unranking problem takes an index $r$ (or its mixed-radix factorial code $d$) and returns $A^{(n)}_r$. Can ranking and unranking for the Heap permutation order be computed in time $O(n^2)$ or $O(n \log n)$ and space $O(n)$ in the unit-cost RAM model without requiring super-polynomial precomputed tables?

Posed in arXiv:2611.05397, Sec. 7.1 — Ranking and Unranking Permutations in Heap's Order

What is known

The paper provides the first explicit Rank and Unrank algorithms for Heap's permutation generation order, running in Θ(n^3) time and O(n) space without precomputed tables. It explicitly leaves open whether this time complexity can be reduced to O(n^2) or O(n log n).

OP-1196 full hospital coalition cutoff tanking exact stable filterNot in LeanMatching & Market Design

Consider a finite many-to-one hospital-resident market with complete strict resident and hospital rankings, positive integer capacities with total capacity at least the number of residents, and responsive hospital preferences. Choose a set H of hospitals and, for each h in H, a resident threshold t_h. Suppose there is an originally stable allocation in which every h in H is full and every resident assigned to h is ranked by h at least as high as t_h. For each h in H, in any chosen order, move h to the bottom of the preference list of every resident ranked below t_h by h, leaving all other relative orders fixed. Is the resulting set of stable allocations exactly the original stable allocations in which every resident assigned to h is ranked at least t_h, simultaneously for all h in H, for every order of the tanking actions?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Market designers need to know whether strategic impression management can still be represented by a simple stable-set filter in the hospital-resident markets that motivate it. The proved KB theorem and Bailey's Theorem 4.1 cover one-to-one agents; a hospital can hold multiple residents, and tanking by multiple hospitals changes the same resident ranking. Cloning a hospital does not directly reproduce a coordinated move of all copies below the same residents while preserving the hospital's common capacity constraint. The fullness hypothesis is substantive: experiment 16104 finds a counterexample without it. Evidence: Experiment 16101 checked all 288 three-resident profiles with capacities (2,1), and 16,500 random larger balanced profiles for a single hospital; experiment 16112 checked 558,024 jointly feasible cutoff/order cases on random markets including vacancies at non-tanking hospitals. Experiment 16104 found that dropping fullness can create new stable allocations.

OP-1197 random matching graph partial transpose poisson negativityNot in LeanQuantum Mechanics

For each even d>=2, choose uniformly a perfect matching M on [d] x [d], let A_M be its adjacency matrix, and form the bipartite density matrix rho_d=(I+A_M)/d^2 on C^d tensor C^d. Let Gamma denote partial transpose on the second subsystem and N_d=(||rho_d^Gamma||_1-1)/2. Does N_d converge in probability, as even d tends to infinity, to c=integral max(0,-1-x) d mu_PGW(x)>0, where mu_PGW is the expected root spectral measure of the adjacency operator of a Poisson(1) Galton-Watson tree? Equivalently, does the empirical spectral distribution of d^2 rho_d^Gamma-I converge in probability to mu_PGW?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This would quantify typical mixed-state entanglement in a structured ensemble of orthogonal two-basis-vector states and connect it to sparse random-graph spectral theory. Lockhart and Severini study graph-encoded density matrices and asymptotic entanglement for a fixed small number of edges; Kumar and Adhikari give partial-transpose moment criteria for A-alpha graph states. Neither result supplies this extensive random-perfect-matching spectral law or its nonzero limiting negativity. Standard independent-edge random graph results do not directly apply: the original edges form a perfect matching and partial transposition couples the new edges through their grid coordinates. Evidence: Experiment 16107 sampled d=4 through 24: average negativity increased from 0.0746 to 0.0890, and adjacency fourth moments moved toward 3, the PGW(1) value. Independent Erdos-Renyi comparisons in 16110 gave negativity near 0.089–0.090 and fourth moments near 3. These are numerical evidence, not a proof of the spectral law.

OP-1198 halved cube binomial two punctured ball extremumNot in LeanCombinatorics for TCS

For every integer d>=9, let H_d have vertex set the even-cardinality subsets of {1,...,d}, with two vertices adjacent when their symmetric difference has size two. If X is any set of binom(d,2) vertices of H_d, is the number of edges induced by X at most (d-1)*binom(d,2)-2*d+3? This is the edge count of the set consisting of the empty set and all two-element subsets except one. If the bound holds, which subsets attain it up to the automorphisms of H_d?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The extremal distance-two edge problem is a basic additive-combinatorial and coding-theoretic question. Theorem 1.4 gives T(X)<=8d|X| for m=2 with T ordered; it does not identify the exact maximum or extremizers. Chepoi-Labourel-Ratel's density bounds use clique-VC dimension rather than this cardinality constraint. The cutoff d>=9 is necessary to avoid actual competing subcube constructions in d=6 and d=8; the general extremal problem OP-1099 is already listed as a broad paper question, whereas this is a concrete sharpened family suggested by computation. It moves Mudgal-Schildkraut-Zakharov, arXiv:2611.04644, Theorem 1.4, distance-two cube edge bound along quantitative: Determine the exact distance-two extremum and equality cases at the infinite family of cardinalities binom(d,2), rather than a constant-factor upper bound for arbitrary cardinalities at most binom(d,2).. Evidence: In 16126 exact CP-SAT optimization certified the proposed construction at d=4 and 5, but found d=6 has at least 70 edges versus the proposed 66. In 16135 heuristic searches found a d=8 construction with 186 versus 183, while finding no improvement over the punctured ball for d=9,10,11,12. The latter searches are not upper-bound certificates.

OP-1201 shifted downset binomial rank sum sharpNot in LeanCombinatorics for TCS

For every integer n>=8, let F be a family of subsets of {1,...,n} of cardinality binom(n+1,2), closed under taking subsets and under every left shift replacing j by i<j when i is absent. Is sum over S in F of sum over j in S of j at most n*binom(n+1,2)-2n+1, with equality if and only if F consists of the empty set, all singleton sets, and all two-element sets except {n-1,n}?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This is a concrete extremal set-theory problem and the tractable combinatorial core of the halved-cube question QC-154, which the Referee vetoed on the basis that hypercube compression and isoperimetry are absent from Mathlib. Rashtchian-Raynaud express the square-cube edge count as this rank sum for shifted downsets, but their theorem gives a general upper bound rather than this exact cardinality-specific maximum. The revised statement uses only finite subsets, closure under deletion and shifts, and natural-number sums, so it avoids the missing hypercube compression formalization in the statement itself. Together with their published compression theorem it would imply the extremal inequality part of OP-1198; uniqueness here does not by itself classify all uncompressed extremizers. It moves Rashtchian-Raynaud, Edge Isoperimetric Inequalities for Powers of the Hypercube, Proposition 4 and Lemma 9; QC-154 / OP-1198 along quantitative: Replace the Referee-vetoed unrestricted halved-cube extremum by its finite shifted-downset rank-sum core, and ask the sharp bound together with uniqueness without requiring a Lean formalization of the compression theorem.. Evidence: Experiment 16180 solved the exact shifted-ideal integer optimization for d=n+1 from 9 through 26, obtaining the conjectured maximum in each dimension. Experiment 16184 exhaustively enumerated exactly one shifted family with that rank sum for d=9 through 35, though the latter alone does not bound larger ranks beyond d=26. Experiment 16181 cross-checked the closure-count pruning against explicit shifted closures for all bitmasks through dimension nine and 2,000 additional samples.

OP-1202 domain filled fermion markov gap early time parityNot in LeanQuantum Mechanics

For each m>=1, take a length-3m open free-fermion chain with single-particle Hamiltonian h having entries h[i,i+1]=h[i+1,i]=1/2 and all others zero. Initially occupy exactly the middle m sites; let C(t)=exp(-it h) P exp(it h), where P projects onto those sites. Let A,B,C be the first, middle and last m sites, and for any Hermitian contraction K set s(K)=-tr(K log K+(I-K) log(I-K)), with 0 log 0=0. Let C_AB and C_A,C_B denote principal restrictions, and D_A the A-principal block of sqrt(C_AB(I-C_AB)). Define R_A=[[C_A,D_A],[D_A,I-C_A]] and the Markov gap M_m(t)=s(R_A)-s(C_A)-s(C_B)+s(C_AB). For odd m, does M_m(t)/t^(2m) tend to a finite strictly positive limit as t decreases to 0? For even m, does M_m(t)/(t^(2m+2)*log(1/t)) tend to a finite strictly positive limit?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The Markov gap is a diagnostic of irreducible multipartite entanglement in nonequilibrium many-body physics. The paper studies numerical onset and scaling for the same domain-filled chain; the exact finite-size small-time regime can contain tails that are invisible in the plotted onset, and does not follow from a Lieb-Robinson bound. A parity-dependent power/logarithm would identify the finite-size leakage and clarify how the small-time and large-system limits relate. The correlation-matrix definition is explicit and avoids relying on an operational threshold convention. It moves Zhou-Zhang-Zhang, Operational meaning of Markov gap in tripartite entanglement of quantum dynamics, arXiv:2607.08615, Eq. (1), Eq. (S4), and early-time analysis along quantitative: Determine the fixed-size asymptotic tail and its parity-dependent exponent and logarithm, rather than a numerically resolved onset or large-size light-cone scale.. Evidence: 100-decimal calculations 16196 and 16198 support t^(2m) for odd m and t^(2m+2) times a growing logarithm for even m through m=8; 16202 extends the pattern through m=12 at 130-digit precision. Independent Fock-space density-matrix calculations agree with the Gaussian formula for m=1,2,3 in 16199. Numerical convergence does not establish the limiting coefficients or the all-m statement.

OP-1203 quantum walk source target renyi ballistic front transitionNot in LeanQuantum Mechanics

Fix 0 < theta < pi/2. Consider the coined quantum walk on Z with coin C_theta=[[cos(theta),sin(theta)],[sin(theta),-cos(theta)]] in the (left,right) basis, followed at each step by shifting left and right components to x-1 and x+1 respectively. Start at the origin with coin (|left>+i|right>)/sqrt(2). For the state after t steps write L_t(x), R_t(x) for the amplitudes at x, define the source-target amplitude operator A_t on l2(Z) by A_t[x,x-1]=L_t(x), A_t[x,x+1]=R_t(x), and let rho_t=A_t A_t^*. For fixed q>1 put P_q(t)=Tr(rho_t^q). Are there finite positive constants C(theta,q) such that as integer t tends to infinity: (i) P_q(t) is asymptotic to C(theta,q)*t^(1-q) for 1<q<2; (ii) P_2(t) is asymptotic to C(theta,2)*(log t)/t; and (iii) P_q(t) is asymptotic to C(theta,q)*t^((1-2q)/3) for q>2? Can the constants be expressed through the bulk limit and Airy scaling functions at the two ballistic fronts?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The question asks for a family-wide critical Renyi order and exact leading asymptotics of a physically motivated entanglement measure, with a logarithmic transition between bulk and caustic regimes. Prerana and Wald introduce source-target entanglement and present a Hadamard-walk plot up to 100 steps, but do not derive its long-time Renyi moments. Existing position-distribution asymptotics do not directly give these moments: rho_t has off-diagonal coherences and its eigenvalues, rather than position probabilities, enter P_q. Evidence: For theta=pi/4, experiment 16252 evolves the walk to t=32768 and finds t*P2/log(t) around 0.728, while t^(5/3)*P3 and t^(7/3)*P4 increase toward finite-looking values. Experiment 16257 sees the same powers for theta=pi/6 through t=16384. Experiment 16255 checks q=1.5 and q=2.5 and independently verifies the tridiagonal reduced matrix against a dense partial trace for t<=16; 16258 tests adjacent odd and even times. Slow convergence leaves the constants and their existence conjectural.

OP-1204 domain filled fermion markov gap odd catalan coefficientNot in LeanQuantum Mechanics

For each odd integer m>=1, consider a length-3m open free-fermion chain with one-particle Hamiltonian h_{i,i+1}=h_{i+1,i}=1/2 and other entries zero. Initially exactly the middle m sites are occupied; write P for the middle-block projector and C(t)=exp(-it h) P exp(it h). Let A,B,C be the first, middle and last m sites, let s(K)=-tr[K log K+(I-K) log(I-K)] for a Hermitian contraction K with 0 log 0=0, and write C_A,C_B,C_AB for the corresponding restrictions. Put D_A=(sqrt(C_AB(I-C_AB)))_A and R_A=[[C_A,D_A],[D_A,I-C_A]]. Define the Markov gap M_m(t)=s(R_A)-s(C_A)-s(C_B)+s(C_AB). Is its exact leading coefficient, for every odd m, given by lim_{t down to 0} M_m(t)/t^(2m) = [Cat_{m-1}-1+2 log 2]/[4^m (m!)^2 binom(m-1,(m-1)/2)^2], where Cat_k=binom(2k,k)/(k+1)?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The Markov gap quantifies irreducible tripartite correlations and its early tail is invisible in large-system light-cone plots. A closed Catalan expression for every odd block size would identify the microscopic coefficient, not just its exponent, and invite a structural explanation in terms of propagation paths. Neither the source paper nor the earlier pitch gives the coefficient. It moves OP-1202 asks whether this limit is finite and positive for every odd m, but does not specify its value; Zhou, Zhang and Zhang, arXiv:2607.08615, study the Markov gap for domain-filled free-fermion chains. along quantitative: Determine the exact coefficient for the whole infinite odd-block family and explain the appearance of Catalan numbers, sharpening the prior existence question into a precise bridge between lattice dynamics, reflected entropy, and enumerative combinatorics.. Evidence: Experiment 16269 revealed the Catalan-minus-one sequence after factorial and central-binomial normalization. Independent experiment 16273 evaluated the full matrix-entropy expression at 220-digit precision for every odd m<=17 and two times; for m=3..17 the smaller-time ratios to the proposed formula differ from one by at most 1.2e-13, while m=1 differs by 8.6e-8. Experiment 16199 independently checks the Gaussian computation against the full Fock-space density matrix for m<=3. The limiting formula remains conjectural.

OP-1205 domain filled fermion markov gap even binomial coefficientNot in LeanQuantum Mechanics

For each even integer m>=2, consider a length-3m open free-fermion chain with one-particle Hamiltonian h_{i,i+1}=h_{i+1,i}=1/2 and other entries zero. Initially exactly the middle m sites are occupied; write P for the middle-block projector and C(t)=exp(-it h) P exp(it h). Let A,B,C be the first, middle and last m sites, let s(K)=-tr[K log K+(I-K) log(I-K)] for a Hermitian contraction K with 0 log 0=0, and write C_A,C_B,C_AB for the corresponding restrictions. Put D_A=(sqrt(C_AB(I-C_AB)))_A and R_A=[[C_A,D_A],[D_A,I-C_A]]. Define the Markov gap M_m(t)=s(R_A)-s(C_A)-s(C_B)+s(C_AB), and put B_m=binom(m,m/2). Is it true for every even m that lim_{t down to 0} M_m(t)/[t^(2m+2)*log(1/t)] = 4[binom(2m,m)-B_m^2]/[B_m^2*4^(m+1)*((m+1)!)^2]?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers using the Markov gap to diagnose irreducible multipartite entanglement need to separate finite-size leakage from dynamical onset. An exact all-m coefficient identifies the previously hidden logarithmic term and connects Gaussian entropy perturbation to binomial-square sums. The published free-fermion work studies onset and light-cone scaling, not this short-time coefficient. It moves OP-1202 asks whether this even-block limit is finite and positive without identifying it; the independent odd-block coefficient question OP-1204 concerns a different parity and has no logarithmic factor. along quantitative: Determine the exact logarithmic coefficient simultaneously for every even block size, giving a distinct binomial-square expression that complements the Catalan-and-log-two odd formula.. Evidence: Experiment 16272 estimated logarithmic slopes for even m<=12 and revealed a binomial-square pattern. In 16278, 240-digit computations for even m=2,4,...,14 use three decreasing times; the ratios of the last finite-difference slopes to the proposed formula lie between 1+0.9e-7 and 1+1.5e-7, and the preceding ratios have larger errors. Experiment 16199 independently compares the Gaussian formula with the full Fock-space density matrix for m<=3. These are finite-time numerical checks, not a proof.

OP-1207 random priority equispaced line sharp logarithmic distortionNot in LeanOnline Algorithms

For n>=2 put unit-capacity servers at 0,1,...,n-1 on the real line. Let x_1,...,x_n be arbitrary real requests with positive optimal matching cost OPT, and process the requests in a uniformly random order, assigning each to the closest unoccupied server, breaking distance ties toward the smaller server coordinate. Is the supremum D_n of E[greedy cost]/OPT over all request vectors Theta(log n)? Equivalently, are there universal positive c,C such that c log n <= D_n <= C log n for every n>=2?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Random-priority matching is both online greedy matching and the truthful random serial dictatorship. Charikar et al. obtain a nearly linear lower bound on general metrics, while Gairing and Klimm's polynomial lower bound on the line uses nonuniform server spacing. Equally spaced locations are a basic geometric regime, already studied in adversarial-order facility assignment, but neither lower-bound construction determines random-order behavior there. Experiments reject constant distortion and suggest logarithmic growth. A matching universal upper bound would establish a sharp separation from the nearly linear general-metric regime. Evidence: Experiment 16745 exhaustively enumerated half-grid request multisets and all arrival orders through n=6. Experiment 16750 computed exact expected ratios 2, 5/2, 101/36, 1163/384, 1281/400 for the periodic half-step family at n=2,4,6,8,10. Experiment 16747 samples that family to n=8192, with ratios increasing approximately linearly in log n; perturbing the half-step requests by 10^-7 gives similar values. This is finite numerical evidence for a lower-growth mechanism, not a proof of the universal upper bound.

OP-1208 stein numbers arithmetic progression local densitiesNot in LeanCombinatorial Games

For integers q>=2 and 0<=a<q, let S(X;q,a) count E. P. Stein numbers n<=X with n congruent to a modulo q, where n is a Stein number when m=floor(sqrt(n)) and both n-m^2 and n+m^2 are positive squares. Define M=lcm(q, {p^2: p is an odd prime dividing q}) and L=lcm(2,q). Choose D uniformly from residues d modulo M for which p^2 does not divide d for every odd prime p dividing q; independently choose U uniformly among odd residues modulo L and V uniformly modulo q. Let c(q,a)=Pr[D^2(U^4+4V^4) congruent to a mod q]. Is it true, for every fixed q and a, that S(X;q,a)=(c(q,a)/pi^2) X^(1/4) log X + O_q(X^(1/4)) as X tends to infinity?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Rampell's theorem gives the total number of remoteness-two losing positions in Epstein's game and a bijective squarefree parameterization, but does not determine how these positions are distributed in residue classes. The proposed local law gives an explicit rational density for every modulus, including forbidden classes and unequal allowed classes, at the same error scale as the total count. It is a quantitative arithmetic refinement relevant to researchers studying the game's Pell structure, and the global asymptotic alone cannot determine its local densities; the narrow irrational strip and squarefree weights must be controlled simultaneously in each congruence class. Evidence: Experiment 16759 counted primitive-parameter families through X=10^28, reproducing the paper's total 70,201,703 and recording all residue classes for q=3,5,7,8,11. Experiment 16760 computes the local formulas: uniform thirds mod 3; (11/15,2/15,0,0,2/15) mod 5; and 1/4 each on 0,1,4,5 mod 8. Finite-scale counts oscillate noticeably, consistent with a slowly decaying O(1/log X) relative error; they are not a proof of convergence.

OP-1210 random graph state planar purity gaussian fluctuationsNot in LeanQuantum Mechanics

For each even n=2h, sample a simple graph G_n by including every edge independently with probability 1/2. For s=0,...,h-1 let A_s={s,s+1,...,s+h-1} modulo n, let r_s be the rank over F_2 of G_n's adjacency submatrix between A_s and its complement, and set Q_n=h^(-1) sum_s 2^(h-r_s). Does sqrt(3n/10) * (Q_n-(2-2^(-h))) converge in distribution to the standard normal as n tends to infinity through even integers?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Q_n is the balanced planar purity of the random CZ graph state, multiplied by 2^(n/2); graph-state subsystem purity is 2^(-cut rank). Mirsohi derives a covariance kernel and variance for the Haar ensemble and asks about its limiting laws, whereas Zhou and Hamma analyze fluctuations for a single random CZ cut. This asks for a concrete new bridge: the distribution of the correlated average of all overlapping cuts in the graph-state ensemble. Its normalization predicts much larger state-to-state fluctuations than Haar, and the single-cut rank law alone does not determine correlations or a central limit theorem. The proposed limit is specific to the random graph-state ensemble and is not the Haar limiting-law question posed in the paper. Evidence: Experiments 16805 and 16807 independently compute overlapping-cut covariances: for offset d, with a=2^(h-d) and b=2^d, the conjectured exact covariance of K_s=2^(h-r_s) and K_(s+d) is (a^2-2a+b^2-2b+2)/(a^2 b^2), verified by explicit GF(2) constraint enumeration for h<=6 and by enumerating all graphs for n=6. Its sum predicts n Var(Q_n)->10/3. Experiments 16806 and 16808 sample 3,000-20,000 graphs at each size through n=128; n Var(Q_n) is close to 10/3 and skewness falls from about 1.26 at n=12 to 0.42 at n=128. These checks do not establish the central limit theorem.

OP-1211 random graph state sliding cut deficiency markov limitNot in LeanQuantum Mechanics

For each h>=1, let G be the random graph G(2h,1/2). For each integer t>=0 let A_t be the h consecutive vertices t,...,t+h-1 modulo 2h, and put D_t^(h)=h-rank_F2 adjacency_G[A_t,A_t^c]. Let pi_j=c*2^(-j^2)/product_{i=1}^j(1-2^(-i))^2 for j>=0, where c=product_{i>=1}(1-2^(-i)). Define q_j(j+1)=2^(-2j-1), q_j(j)=2^(1-j)-3*2^(-2j-1), q_j(j-1)=(1-2^(-j))^2 when j>=1, and all other q_j(d)=0. Define T(d,e)=sum_{j>=0} pi_j q_j(d)q_j(e)/pi_d. For every fixed k, does (D_0^(h),...,D_k^(h)) converge in distribution, as h tends to infinity, to the stationary Markov chain with initial law pi and transition matrix T?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Entanglement researchers study the cut-rank spectrum of random graph states, but the single-cut random-matrix rank law does not describe correlations between neighboring spatial cuts. A limiting Markov description would give an explicit stochastic process for the spatial fluctuations and a potential route toward the separate averaged-purity central limit question OP-1210, while also being a theorem about coupled finite-field matrix ranks. This is a fixed-window local limit; it does not itself imply the global central limit theorem. Finite rings are not exactly Markov, so the assertion cannot be reduced to a trivial finite-state observation. Evidence: Experiment 16823 computes the proposed transitions, including T(0,0)=3/8 and T(1,0)=9/32. Experiments 16813 and 16821 sample up to 2.56 million overlapping cut windows at n=64: conditional next-state frequencies agree with these values even when conditioning on two previous deficiencies. Experiment 16816 exactly counts joint kernel moments for three cuts through n=14, and 16817 finds a common cubic in 2^(-h) whose limiting value 37/4 matches the proposed Markov law. Experiment 16815 shows strong non-Markov dependence at n=6, so this is only an asymptotic conjecture.

OP-1213 random graph state log imbalance clustered entanglement defectsNot in LeanQuantum Mechanics

Let n tend to infinity and let h=h_n be positive integers with k_n=n-2h_n tending to infinity and n*2^(-k_n) tending to theta in (0,infinity). Sample G from G(n,1/2), with vertices on a cyclic order, and for each t in Z/nZ let A_t consist of the h consecutive vertices t,...,t+h-1. Put D_t=h-rank_F2 adjacency_G[A_t,A_t^c] and N_n=#{t in Z/nZ: D_t>0}. Is it true that N_n converges in distribution to sum_{i=1}^K L_i, where K is Poisson(3 theta/4), the independent L_i have geometric distribution Pr[L_i=j]=(3/4)(1/4)^(j-1) for j>=1, and K and the L_i are independent? In particular, does the probability that all n cuts are maximally entangled converge to exp(-3 theta/4)?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Quantum-information researchers need a quantitative description of the cuts that fail maximal entanglement in graph states. A single-cut rank law gives expected rare defects but does not determine the probability that all spatial cuts succeed: adjacent cuts share nearly all edges, producing clusters. A compound Poisson law would identify the finite-size threshold and the entire distribution of extreme entanglement defects. The balanced fixed-window conjecture OP-1211 cannot yield it, because k grows and a global n-cut rare-event limit requires uniform long-range dependence estimates. It moves OP-1211 asks for a fixed-window Markov limit at exactly balanced cuts; Zhou and Hamma, Phys. Rev. A 106, 012410 (2022), Appendix F, analyze a single graph-state bipartition. along new_setting: Move from balanced typical rank deficiencies to the logarithmically unbalanced rare-event window, and from a fixed number of cuts to the distribution over every cyclic cut.. Evidence: Experiment 16874 sampled 120,000 random graphs per case for n=32,48,64 and k=4,6,8; conditional continuation probabilities fall from 0.2897 at k=4 to 0.2521 at k=8, near the proposed 1/4. At n=64,k=8, theta=1/4, the observed zero-defect fraction was 0.83139 versus exp(-3/16)=0.82903, and the count variance was 0.4240 versus 5 theta/3=0.4167. Experiment 16876 sampled n=128 and k=6,8: for k=8, theta=1/2, zero-defect fraction was 0.6911 versus 0.6873 and count variance was 0.8508 versus 0.8333. Experiment 16879 independently exhausts all 32768 six-vertex graphs and verifies the one-cut rectangular-matrix mean. Finite-k effects and dependencies are visible, so none of these tests proves the limit.

OP-1216 Linear in k Edge Bound for k-Quasiplanar GraphsNot in LeanGraph Theory & Graph Algorithms

Does there exist an absolute constant C > 0 such that every k-quasiplanar topological graph on n vertices has at most C * k * n edges, for all integers k ≥ 2 and n ≥ 1? (A topological graph is a simple graph drawn in the plane with distinct points as vertices and Jordan arcs as edges whose interiors avoid vertices; it is k-quasiplanar if no k distinct edges are pairwise intersecting in their interiors.)

Posed in arXiv:2611.07314, Conjecture 1 — On the number of edges in quasiplanar graphs

OP-1218 Convergence and Value of the Asymptotic Non-Bh Set Density CoefficientNot in LeanCombinatorics for TCS

For integers $k \ge 3$, $h \ge 2$, and $q \ge k$, let $\mathcal{B}_{h,k}(q)$ denote the set of $k$-element subsets $A \subseteq \{1, \dots, q\}$ that are $B_h$-sets (that is, the iterated sumset $hA$ attains the maximum possible size $\binom{h+k-1}{k-1}$). For fixed $k \ge 4$ and $h \ge 2$, does the sequence $q\left(1 - \frac{|\mathcal{B}_{h,k}(q)|}{\binom{q}{k}}\right)$ converge as $q \to \infty$? If so, what is its limit $c_{h,k}$, and is the sequence eventually monotone in $q$?

Posed in arXiv:2611.07303, Sec. 5.2, Question 2 — Gaps in the Most Frequent Sizes of Integer Sumsets

OP-1219 Growth Rate of Sumset Order for Consecutive Simplex Gap PersistenceNot in LeanCombinatorics for TCS

Let $k \ge 3$ be an integer. For $h \ge 2$ and $0 \le \ell < h$, let $P_\ell = \binom{h+k-1}{k-1} - \binom{\ell+k-2}{k-1}$ (with $\binom{-1}{k-1} = 0$). For a subset $A \subseteq \{1, \dots, q\}$ of size $k$, let $hA$ denote its $h$-fold sumset. It is proved that if $h = o(q^{1/(2k-1)})$, then for all sufficiently large $q$, the $h$ most frequent values of $|hA|$ over $A \in \binom{[q]}{k}$ are precisely $P_0, P_1, \dots, P_{h-1}$. Can the growth condition $h = o(q^{1/(2k-1)})$ be relaxed to $h = \Theta(q^{1/(2k-1)})$ or faster (up to $h = o(q^{1/k})$) while preserving this property? Furthermore, for fixed small $h, k$, can the minimal threshold $q_0(h,k)$ beyond which this property holds for all $q \ge q_0(h,k)$ be determined (e.g., is $q_0(3,3) = 5$ and $q_0(2,4) = 8$)?

Posed in arXiv:2611.07303, Sec. 5.2, Question 1 — Gaps in the Most Frequent Sizes of Integer Sumsets

OP-1221 Intersection Size of Two Longest Cycles in k-Connected GraphsNot in LeanGraph Theory & Graph Algorithms

Let $k \ge 2$ be an integer, and let $G$ be a finite simple $k$-connected graph. Let $C$ and $D$ be two longest cycles in $G$. Does every such pair satisfy $|V(C) \cap V(D)| \ge k$?

Posed in arXiv:2611.07145, Sec. 1, paragraph 1 — An improved bound for the intersection of two longest cycles in $k$-connected graphs

What is known

Smith's conjecture is proven in this paper for all k >= (n+30)/9, improving on the previous bound of (n+16)/7, but remains open in the range k < (n+30)/9 for all k >= 9.

OP-1222 Conjectured Tight Bound for Dense Half in K4-Free GraphsNot in LeanGraph Theory & Graph Algorithms

Let $G = (V, E)$ be a finite simple $K_4$-free graph on $n$ vertices. A balanced bipartition of $V$ is a 2-partition $V = A \cup B$ such that $||A| - |B|| \le 1$. Let $e(S)$ denote the number of edges with both endpoints in $S$, and let $D^b_{2,\infty}(G) = \min_{(A, B) \text{ balanced}} \max(e(A), e(B))$. Is it true that every $K_4$-free graph $G$ on $n$ vertices satisfies $D^b_{2,\infty}(G) \le \frac{425}{6498} n^2 + o(n^2)$ as $n \to \infty$?

Posed in arXiv:2611.07082, Conjecture 2.3, Abstract — Seeking the dense half in $K_4$-free graphs

OP-1224 Sheehan's Conjecture for 4-Regular GraphsNot in LeanGraph Theory & Graph Algorithms

Does every finite simple 4-regular Hamiltonian graph contain at least two distinct Hamilton cycles?

Posed in arXiv:2611.06985, Conjecture 1.1 — Every $r$-regular Hamiltonian graph with $r\geq 17$ contains a second Hamilton cycle

OP-1225 Existence of Uniquely Hamiltonian Regular Graphs of Even Degree At Most 16Not in LeanGraph Theory & Graph Algorithms

Let $r \in \{4, 6, 8, 10, 12, 14, 16\}$ be an even integer. Can a finite simple $r$-regular graph be uniquely Hamiltonian (that is, contain exactly one Hamilton cycle)?

Posed in arXiv:2611.06985, Sec. 1, lines 92-94 — Every $r$-regular Hamiltonian graph with $r\geq 17$ contains a second Hamilton cycle

OP-1227 Johnson Radius Threshold for Super-Polynomial Reed-Solomon Lists at Arbitrary RatesNot in LeanInformation Theory & Coding

For every fixed rate $R \in (0, 1)$ and every prime $p$, does there exist an infinite family of extension fields $\mathbb{F}_{p^k}$ (with $n = p^k \to \infty$) and received words $y \in \mathbb{F}_{p^k}^n$ such that the full-length Reed-Solomon code over $\mathbb{F}_{p^k}$ of length $n$ and dimension $\lfloor R n \rfloor$ contains super-polynomially many (at least $n^{\omega(1)}$) codewords in a Hamming ball around $y$ of relative radius $1 - \sqrt{R} + o(1)$?

Posed in arXiv:2611.07607, Sec. 1, after Theorem 1.1 — Combinatorial limitations of list-decoding Reed-Solomon codes

What is known

Theorem 1.1 establishes super-polynomial lists near the Johnson radius for rates R = q^{-2} and R = (1 - q^{-1})^2, leaving open whether every fixed rate in (0, 1) exhibits this Johnson-radius barrier.

OP-1229 Worst-case approximation ratio of GreedTok above 1/2Not in LeanApproximation & Inapproximability

Does GreedTok achieve a worst-case approximation ratio strictly greater than $1/2$ for the partition-cover tokenization problem? That is, does there exist a universal constant $c > 1/2$ such that for every corpus of words with positive integer counts and every budget $k \ge 1$, GreedTok produces a vocabulary $S_k$ of size $k$ achieving $f(S_k) \ge c \cdot \mathrm{OPT}_k$, where $f(S)$ is the partition-cover objective maximizing adjacent character pairs merged under optimal segmentation?

Posed in arXiv:2611.07346, Sec. 7, Open problems — GreedTok is a Constant-Factor Approximation for Partition-Cover Tokenization

What is known

The paper proves a lower bound of 0.2752 and an adversarial tie-breaking upper bound tending to (7 - ln 2)/12 ≈ 0.5256 (and below 0.5380 with unique choices), leaving open whether the true worst-case ratio exceeds 1/2.

OP-1231 Existence and Non-Uniqueness of Perfect Partitions for All OrdersNot in LeanCombinatorics for TCS

For every integer $n \ge 2$, does the regular bipartite graph $L_{n,1} = K_{n,n} - I_{n,n}$ admit a perfect partition (that is, a partition of the set of all $d_n$ derangements of $[n]$ into $d_n/(n-1)$ perfect sets of $n-1$ pairwise mutually deranged derangements), and for every integer $n \ge 5$, does $L_{n,1}$ admit at least two distinct perfect partitions?

Posed in arXiv:2611.07118, Conjecture 5.1 — Perfect Partitions of Regular Bipartite Graphs

OP-1235 Online rule achieving additive loss at most PK on P runs in repeated rent-or-buyNot in LeanOnline Algorithms

In the repeated rent-or-buy problem with reset price $K > 0$, a session of horizon $T$ is given by non-negative increments $(a_t)_{t=1}^{T-1}$. A schedule $r \in \{0,1\}^T$ incurs total cost $C_r(S) = \sum_{t=1}^T (h_t + r_t K)$, where $h_1 = 0$ and $h_{t+1} = (1 - r_t) h_t + a_t$. A run of $S$ is a maximal contiguous block of calls with constant increment $a_t$. An online rule $\pi$ determines $r_t \in \{0,1\}$ knowing only $(a_1, \dots, a_{t-1})$. Does there exist a deterministic online rule $\pi$ such that for every $P \ge 3$ and every session $S$ with $P$ runs, $C_{r^\pi}(S) \le C_{r^\star}(S) + P K$, where $r^\star$ is an optimal offline schedule for $S$?

Posed in arXiv:2611.06955, Sec. 5, after Thm. 18 — A Sharp Additive Bound for the Threshold Rule in Repeated Rent-or-Buy

What is known

The paper proves that the classical threshold rule achieves additive loss at most (2P-1)K, which is tight for that rule. On P=2 runs, the drop-aware rule achieves 2K (which is PK for P=2), matching the lower bound for all deterministic rules. However, on P >= 3 runs, it is unknown whether any online rule can achieve additive loss bounded by PK.

OP-1236 Core nonemptiness criterion for k-distant convex games with k >= 4Not in LeanGeneral Equilibrium & Cooperative Games

Let $n \ge 4$ and $k \ge 4$ be integers. A cooperative game $(N, v)$ on player set $N$ with $|N| = n$ and $v(\emptyset) = 0$ is $k$-distant convex if for all coalitions $S, T \subseteq N$ satisfying $|S \triangle T| \ge k$, the submodular inequality $v(S \cup T) + v(S \cap T) \ge v(S) + v(T)$ holds. What is a necessary and sufficient condition on $v$ that characterizes nonemptiness of the core of $(N, v)$, and can core nonemptiness be decided in polynomial time in $n$?

Posed in arXiv:2611.07572, Sec. 5, paragraph 2 — Cores of $3$-distant convex games

OP-1238 Unimodality of Partial Petrial Polynomials for Graphs and TreesNot in LeanCombinatorics for TCS

For every simple graph $G$ (or every tree $T$), let $P_G^{\times}(z) = \sum_{F \subseteq V(G)} z^{\operatorname{rank} \mathbf{A}(G,F)}$ be its partial Petrial polynomial, where $\mathbf{A}(G,F)$ is the symmetric matrix over $\mathrm{GF}(2)$ whose off-diagonal entries are given by the adjacency matrix of $G$ and whose diagonal entry at $v$ is $1$ if $v \in F$ and $0$ otherwise. Is the sequence of nonzero coefficients of $P_G^{\times}(z)$ unimodal?

Posed in arXiv:2611.07503, Problem 15 — Strict unimodality without log-concavity for partial Petrial polynomials

What is known

The paper shows strict unimodality holds for the family of trees $R_m$ even when log-concavity fails, and asks whether unimodality holds universally for all trees or all simple graphs.

OP-1241 Strict-turnstile streaming space complexity of Min-CSPNot in LeanStreaming & Sublinear Algorithms

Let Γ be a fixed finite constraint language of Boolean relations, and let d = deg_ℤ(Γ) be its integer capturing degree. For any fixed constant ε > 0, what is the single-pass randomized strict-turnstile streaming space complexity of computing a (1+ε)-multiplicative approximation to the minimum number of unsatisfied constraints (Min-CSP(Γ)) on n variables? In particular, does every randomized strict-turnstile algorithm with this guarantee require Ω_k(n^d / log n) bits, and does there exist such an algorithm using O_k(n^d polylog n) bits of space?

Posed in arXiv:2611.07309, Sec. 1.1, page 6 — A New Characterization of Streaming Decidability of Boolean CSPs Under Deletions

OP-1242 Optimal space bound for k-XOR satisfiability with literals on binary streamsNot in LeanStreaming & Sublinear Algorithms

For each integer k ≥ 3, determine the optimal single-pass randomized streaming space complexity of deciding satisfiability of k-XOR with literals on binary streams (where after each insertion or deletion, every constraint has multiplicity in {0, 1}). In particular, for k ≥ 5, can satisfiability of k-XOR with literals on binary streams be decided in O_k(n^2 polylog n) bits of space, or is the space complexity Ω_k(n^c) for some exponent c > 2?

Posed in arXiv:2611.07309, Sec. 2.2, page 16 — A New Characterization of Streaming Decidability of Boolean CSPs Under Deletions

OP-1244 Minimum Volume Spectrum Endpoint for Maximal Partial Room SquaresNot in LeanCombinatorics for TCS

Let n = 2m ≥ 14 be an even positive integer. A partial Room square of order n is an (n - 1) × (n - 1) array whose cells are either empty or contain an unordered pair of distinct elements from an n-element set S, such that each element of S occurs at most once in each row and at most once in each column, and each 2-element subset of S occurs at most once in the array. Its volume V is the number of occupied cells. A partial Room square is maximal (an MPRS) if no unordered pair of distinct elements of S can be inserted into any empty cell without violating these conditions. Let m(n) denote the minimum volume of an MPRS of order n. Is it true that m(n) = m^2 - m when m is even, and m(n) = m^2 - m + 1 when m is odd?

Posed in arXiv:2611.07117, Sec. 1, after (1) — An improved lower bound for maximal partial Room squares

What is known

Meszka and Rosa proved that for even n = 2m >= 14, maximal partial Room squares exist for all volumes between m^2 - m (for even m) or m^2 - m + 1 (for odd m) up to binom(n, 2). They conjectured that these lower endpoints are the exact minimum volume m(n). The present paper improves the general asymptotic lower bound toward this conjecture, but leaves the exact minimum open.

OP-1246 Single Hypergraph Realization of Rational Turán Exponents up to Half UniformityNot in LeanCombinatorics for TCS

For an integer $k \ge 3$ and a $k$-uniform hypergraph $F$, let $\mathrm{ex}_k(n, F)$ denote the maximum number of edges in an $F$-free $k$-uniform hypergraph on $n$ vertices. For every integer $k \ge 3$ and every rational number $r \in [1, k/2]$, does there exist a $k$-uniform hypergraph $F$ such that $\mathrm{ex}_k(n, F) = \Theta(n^{k-r})$? That is, do there exist constants $c_1, c_2 > 0$ and $n_0 \in \mathbb{N}$ such that $c_1 n^{k-r} \le \mathrm{ex}_k(n, F) \le c_2 n^{k-r}$ for all $n \ge n_0$?

Posed in arXiv:2611.07290, Conjecture 5.1 — Rational Tur\'an exponents of a single $k$-uniform hypergraph

What is known

The paper settles r ∈ [0, 1] for all k ≥ 2 and proves that no single hypergraph achieves exponents with r > ⌈k/2⌉ for k ≥ 4, leaving the range 1 < r ≤ k/2 as the central open conjecture.

OP-1248 Steiner Shortcuts with Sub-(n^{2/9}) Diameter and Almost-Linear EdgesNot in LeanGraph Theory & Graph Algorithms

For every directed graph G = (V, E) with |V| = n and |E| = m, does there exist a Steiner shortcut G_+ = (V ∪ V_+, E ∪ E_+) with |E_+| = m^{1+o(1)} edges and directed diameter o(n^{2/9})? In particular, can one construct Steiner shortcuts with diameter O(n^γ) for some constant γ < 1/3, strictly beating the best known upper bounds for regular shortcuts?

Posed in arXiv:2611.07043, Sec. 1.1 — Polynomial Lower Bounds for Steiner Shortcuts via Test Functions

What is known

The paper establishes a diameter lower bound of n^{1/56 - O(ε)} for Steiner shortcuts of size O(m^{1+ε}), disproving the Steiner Shortcut Conjecture (which posited m^{1+o(1)} edges and n^{o(1)} diameter). However, for non-Steiner shortcuts the known lower bound is n^{2/9}, and the best upper bound is n^{1/3}. The paper leaves open whether Steiner vertices allow one to break the 2/9 barrier or even beat 1/3.

OP-1250 tree diagonal binary rank star stochastic minimumNot in LeanCombinatorics for TCS

For every integer n >= 3, every tree T on n vertices, and every integer k, does sum_{j=0}^k [z^j] P_T(z) <= sum_{j=0}^k [z^j] P_{K_{1,n-1}}(z), where P_T(z)=sum_{d in {0,1}^n} z^{rank_{F_2}(A(T)+diag(d))}? Equivalently, is the rank of A(T) plus a uniformly random binary diagonal stochastically at least the corresponding rank for the n-vertex star? Characterize the equality cases for all thresholds k in the nontrivial range.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers studying partial Petrial polynomials and binary graph matrices want a sharp distributional extremum, simultaneously controlling every rank threshold and hence every increasing rank statistic. The recent paper arXiv:2611.07503 studies the shape of these coefficients and asks unimodality, not this extremal comparison. Bacher's theorem counts only full-rank diagonal perturbations via the tree matching polynomial; it does not give the joint nullity tail, so that theorem alone does not settle the proposed family of inequalities. Evidence: Exhaustively evaluated all 2^n diagonals of each nonisomorphic tree through n=11; the star had the largest rank CDF at every threshold in all 435 trees checked. This also recovers the path as the opposite extremum in the tested range, but the question asks only the star inequality.

OP-1252 widening signed energy filter uniform merit factor purityNot in LeanStatistical Mechanics & Thermodynamics

Let n tend to infinity through multiples of 4, and let m=m(n) satisfy 1<=m<=n/2+1 and m/sqrt(n)->0. For each sign vector a=(a_0,...,a_{m-1}) in {-1,1}^m, set a_j=0 outside this range and normalize the n-qubit state |psi_a> = Z^(-1/2) sum_{x in {0,1}^n} a_{n/2-|x|}|x>. Let rho_a be its reduced state on the first n/2 qubits, and put Q(a)=1+(2/m^2) sum_{d=1}^{m-1}(sum_{j=0}^{m-1-d} a_j a_{j+d})^2. Does sup_a |sqrt(n) Tr(rho_a^2)/[(2/sqrt(pi)) Q(a)] - 1| tend to zero for every such m(n)?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The question bridges finite-size entanglement in phase-coded energy filters with Littlewood-polynomial autocorrelation and binary merit factors, in a regime where the bandwidth grows with system size. It quantifies performance for deliberately designed filters, including highly correlated signs, not merely typical random signs. OP-1152 asks for convergence under independent random signs; OP-1115 asks a fixed-filter limit and does not permit a uniform support that grows with n. Uniform relative control would also connect the optimal finite-size purity to the best merit factor at each growing bandwidth. Neither an L4 result for fixed polynomials nor average-case concentration controls the finite-n quantum trace uniformly. Evidence: Experiment 17275 evaluates exact compressed binomial-sector purities for constant, alternating, Rudin–Shapiro and random signs up to n=16384, as well as all sign patterns up to global sign for m=4,6,8 at n=256,1024,4096. At m=8 the range of purity/prediction ratios contracts from [0.9036,1.0739] to [0.9936,1.0052]. Experiment 17278 independently checks compressed purities against full state-vector partial traces for n=4,8,12; the maximum floating-point discrepancy is below 10^(-15). Relative rather than absolute error is essential because Q(a) grows linearly for constant signs.

OP-1253 opposed latin min blocking variance cyclic rigidityNot in LeanMatching & Market Design

For n>=4, let L be an n by n Latin square with symbols 0,...,n-1. Man i ranks woman j by increasing L(i,j), while woman j ranks man i by decreasing L(i,j). Choose a perfect matching uniformly from all n! matchings, and let B_L be its number of blocking pairs. Is Var(B_L) >= n(n^2+5n-11)/180, with equality if and only if, after independent permutations of rows and columns, L(i,j)=(i+j) mod n? Symbol values are ordered ranks and may not be relabeled in the equivalence.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The cyclic market already minimizes worst-case instability among the tested opposed Latin markets, but that maximum-blocking question is OP-795; this asks whether exactly the same markets minimize fluctuations of instability under a uniformly random allocation, with an explicit sharp variance for every n. OP-1212 concerns only the conjectured leading n^3/180 variance and a uniform CLT; it does not give a finite-n minimum or its equality class. Ishida's first-moment and maximum-blocker results do not control correlations between two potential blocking pairs, which are needed for variance. Evidence: Experiment 17289 exhausts 96 and 6720 rank-sensitive Latin representatives for n=4 and 5 and all matchings: the proposed variance minimum and cyclic-only equality hold. Experiment 17290 samples 2500 order-six tables, experiment 17294 checks all 720 rank relabelings of the cyclic order-six table and samples 300 at order seven, and experiment 17295 tests 400 independently constructed order-seven tables: no violation. Experiments 17284 and 17286 exhaust every matching of the cyclic market for n=4,...,11, confirming the exact proposed polynomial, including all 11! matchings. These are computational observations, not a proof.

OP-1255 sparse ccz magic fano symmetry breaking transitionNot in LeanStatistical Mechanics & Thermodynamics

For c>0 and a probability vector x=(x_v) on F_2^3, let H(x)=-sum_v x_v ln(x_v) and Phi_c(x)=H(x)-2c sum_{ {a,b,d} independent in F_2^3 } x_a x_b x_d, where the sum is over the 28 unordered independent triples. Is there exactly one transition c_*>0 such that every global maximizer of Phi_c has x_v=t for all seven nonzero v when c<c_*, while for c>c_* every global maximizer, up to GL(3,2), has x_v=t on the three nonzero points of one two-dimensional subspace and x_v=u on the remaining four, with t>u? At c=c_* are both symmetry classes global maximizers, and does the maximum have a first-order nonanalyticity? Numerical optimization suggests c_* approximately 13.536. The value of x_0 is allowed to differ from t and u in both classes.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

For the random 3-uniform CCZ circuit in the paper with each triple present with probability c/n^2, the annealed magic density -log_2 E[m_2]/n is governed by (3 ln 2 - max_x Phi_c(x))/ln 2. The finite-n formula alone does not classify its maximizers or determine its phase diagram. A symmetry-breaking theorem would identify whether increasing the linear number of non-Clifford gates changes the dominant replica configurations, and would bridge stabilizer magic with an entropy extremum for the Fano matroid. This concerns the annealed Pauli moment, not the average of the logarithmic magic entropy. It moves Chen, Yan and Zhou, Magic of quantum hypergraph states, Theorem 5 (2024) along bridge: Their exact finite-n average Pauli moment is an 8-type sum for any edge probability; the question asks for the all-density symmetry and phase diagram of the limiting entropy-minus-Fano-polynomial optimization at p=c/n^2.. Evidence: Experiment 17361 independently checks the F_2^3 type-sum expression against exact averages over all hypergraphs on n=3,4,5 vertices, with errors below 3e-15. Experiment 17362 evaluates the finite-size type sum up to n=32. Experiments 17357 and 17358 use 35-160 random starts for each of 20 density values from 0.1 to 100; experiment 17364 repeats 500-start searches at six values including both sides of the transition, finding the two stated symmetry types. Experiment 17359 computes the crossing of the two reduced branches at approximately 13.53600335. Multistart optimization and finite sizes do not certify global optimality or uniqueness.

OP-1256 seeded three move subtraction exact quadratic preperiodNot in LeanCombinatorial Games

For every integer a>=4 and every binary seed w_{-(2a+1)},...,w_{-1}, define w_n=1 exactly when at least one of w_{n-a}, w_{n-2a}, w_{n-(2a+1)} is zero, for n>=0. Let PrePer(a,w) be the least t>=0 for which there exists a positive period p with w_{n+p}=w_n for every n>=t. Is the maximum of PrePer(a,w) over all 2^(2a+1) seeds exactly 3a^2-8a+1? More specifically, does the seed represented by s=(3*4^a+7*2^a)/8, with bit i of s equal to w_{-1-i} for 0<=i<=2a, attain this maximum with eventual least period 3a+1?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Subtraction-game researchers study how arbitrary initial conditions alter eventual behavior; knowing the period does not bound the time needed to reach that period. OP-1251 asks which eventual periods occur in this same family but says nothing about its transient. The proposed exact quadratic maximum would replace an exponential-state generic cycle-search bound with a sharp polynomial bound for every parameter, and it gives a concrete worst-case seed. The source paper proves pure periodicity for all seeds in the two-move case and constructs complicated three-move behavior, but does not determine this extremal transient for the present family; its own preperiod-extension conjecture asks a different question. It moves Miklos and Post, Superpolynomial period lengths of the winning positions in the subtraction game, Theorem 13 (2024) along new_setting: Theorem 13 gives preperiod zero for every seed with two moves. This asks for the sharp worst-seed preperiod and an explicit extremizer in a non-additive three-move family.. Evidence: Experiments 17368 and 17371 exhaust every state for a=1,...,13, including all 134,217,728 seeds at a=13: from a=4 the maximum automaton entry time is 3a^2-6a+2, attained by the stated seed. Experiment 17373 independently checks the relation between the first periodic output index and the automaton entry time for every seed through a=7 and checks the stated output-preperiod formula for selected witnesses up to a=100. Experiment 17372 checks the witness for all a=4,...,30 and at a=40,50,75,100, and tests 500 random seeds each at a=12,16,20,30,40 without finding a longer transient. These are finite computations, not a proof.

OP-1259 Linear Maximum Growth Threshold for Restricted Base-ell PartitionsNot in LeanElementary Number Theory

Let $\ell \ge 2$ and $k \ge 2$ be integers, and let $b_{k,\ell}(n)$ denote the number of partitions of $n$ into powers of $\ell$ with each power appearing at most $k$ times (that is, the number of non-negative integer sequences $(a_m)_{m \ge 0}$ with $a_m \in \{0, \dots, k\}$, only finitely many non-zero, such that $\sum_{m \ge 0} a_m \ell^m = n$). For $k = \ell^2 - 1$, $b_{\ell^2-1,\ell}(n) = \lfloor n/\ell \rfloor + 1$ has linear maximum growth: $\limsup_{n \to \infty} b_{\ell^2-1,\ell}(n)/n = 1/\ell > 0$. Is $k = \ell^2 - 1$ the minimal $k \ge \ell$ with linear maximum growth? That is, for every integer $\ell \ge 2$ and every $k \in [\ell, \ell^2 - 2]$, is the maximum growth strictly sublinear: $\lim_{n \to \infty} \frac{1}{n} \max_{0 \le m \le n} b_{k,\ell}(m) = 0$?

Posed in arXiv:2611.08109, Sec. 3, CW2 discussion — The Calkin--Wilf problems on $\ell$-ary partition functions

What is known

Calkin and Wilf problem CW2 asks whether linear maximum growth first occurs at k = ell^2 - 1. While the author settles CW1, CW3, CW4, CW5, and CW8, CW2 remains open.

OP-1262 Polylogarithmic depth and matrix-multiplication size division-free circuits for characteristic polynomialNot in LeanAlgebraic & Lattice-Based Complexity

Let R be an arbitrary commutative ring with unit. For every integer n >= 1 and an indeterminate n x n matrix A = (x_ij)_{1 <= i,j <= n}, does there exist a division-free algebraic circuit over R computing the coefficients of the characteristic polynomial det(lambda I_n - A) with circuit size O(n^ω log^c n) and depth O(log^2 n), where ω is a feasible exponent for matrix multiplication and c is a universal constant?

Posed in arXiv:2611.07786, Sec. 1, lines 135-137 — On computing the determinant over a ring

What is known

The paper achieves size O(n^ω) for ω > 2 via a straight-line program but explicitly notes that it does not address Berkowitz's conjecture on depth O(log^2 n).

OP-1266 Existence of a non-row (0,1)-vector in the adjacency row space of simple graphsNot in LeanGraph Theory & Graph Algorithms

Let $G = (V, E)$ be a finite simple graph with at least one edge, and let $A$ denote the adjacency matrix of $G$ over $\mathbb{R}$. Does there exist a vector $y \in \{0, 1\}^V$ such that $y \neq 0$, $y$ lies in the row space of $A$ over $\mathbb{R}$, and $y$ is not equal to any row of $A$?

Posed in arXiv:2611.08244, Problem 1.2 — Open Problems on the Null Space and Image Space of the Adjacency Matrix

What is known

Proposed in 2004, the conjecture asserts that every finite simple graph with at least one edge has a non-row (0,1)-vector in its adjacency row space. An affirmative answer implies the maximum order m(r) of a reduced graph of rank r is strictly increasing, supporting the conjectured exact formula for m(r). It has been verified for all graphs of diameter at least 4, but remains open for diameters 2 and 3.

OP-1268 Sharpness of the General-Degree Upper Bound for Projective Reed-Muller Weight HierarchyNot in LeanInformation Theory & Coding

Let $q$ be a prime power, and let $m, d \ge 1$ be integers. Let $\operatorname{PRM}_q(d, m) \subseteq \mathbb{F}_q^{p_m}$ (where $p_m = \frac{q^{m+1}-1}{q-1}$) denote the projective Reed-Muller code of degree $d$ in $m+1$ variables over $\mathbb{F}_q$, of dimension $k_d(m) = \dim \operatorname{PRM}_q(d, m)$. For $1 \le r \le k_d(m)$, let $d_r(\operatorname{PRM}_q(d, m))$ be the $r$-th generalized Hamming weight of $\operatorname{PRM}_q(d, m)$, defined as the minimum support size of an $r$-dimensional subcode. Let $\mathcal{B}_r(q, d, m) = p_m - \max \{0 \le n \le p_m : h_d(n) \le k_d(m) - r\}$, where $h_d(n)$ is defined recursively for $n = a q^s + b$ ($1 \le a \le q-1$, $0 \le b < q^s$) by: $h_d(n) = A(a q^s, d) + h_{d-q+1}(b)$ if $b \le p_{s-1}$, and $h_d(n) = \min\{A(n, d), k_d(s) + A(n - p_s, d-1)\}$ if $b > p_{s-1}$, with $h_D(t) = 0$ for $D \le 0$, and $A(t, D)$ denoting the number of integers $0 \le i < t$ whose base-$q$ digit sum is at most $D$. Is $d_r(\operatorname{PRM}_q(d, m)) = \mathcal{B}_r(q, d, m)$ for all $m, d \ge 1$ and all $1 \le r \le k_d(m)$?

Posed in arXiv:2611.08203, Conjecture 6.9 — Common zeros of homogeneous polynomials and the weight hierarchy of projective Reed-Muller codes

What is known

The author proves that $\mathcal{B}_r(q, d, m)$ is an upper bound on the generalized Hamming weights $d_r(\operatorname{PRM}_q(d,m))$ in every degree, and proves sharpness when $d < q$ (confirming the Beelen-Datta-Ghorpade conjecture) and for dual high degrees. The general degree case remains open.

OP-1272 Hardness of approximating the log-handicap of sufficient matricesNot in LeanApproximation & Inapproximability

For an $n \times n$ sufficient matrix $M \in \mathcal{P}_\star \cap \mathbb{Q}^{n \times n}$, can $\log(2 + \hat{\kappa}(M))$ be approximated in polynomial time to within a constant factor (or polynomial factor $n^c$), or is approximating $\log(2 + \hat{\kappa}(M))$ to within any constant factor NP-hard?

Posed in arXiv:2611.07815, Sec. 1.2, after Thm 1.4 — Newton Steps are Faster for Linear Complementarity Problems

What is known

While Theorem 1.4 establishes that approximating $1+4\hat{\kappa}(M)$ within a constant factor is NP-hard (and assuming the Unique Games Conjecture, cannot be approximated within $1/0.878$), other condition measures in optimization are known to be inapproximable within $2^{\mathrm{poly}(n)}$. The logarithmic handicap measure $\log(2+\hat{\kappa}(M))$ could potentially be inapproximable within polynomial factors.

OP-1274 Existence of polynomial-sized exact multicut-mimicking networksNot in LeanGraph Theory & Graph Algorithms

Let G be a finite simple undirected graph and T ⊆ V(G) a designated terminal set with |T| = k. A terminal network (G', T) is an exact vertex multicut-mimicking network for (G, T) if for every subset T_0 ⊆ T and every partition calT of T \ T_0, the minimum size of a vertex set X ⊆ V(G) \ T disconnecting every pair of terminals in distinct parts of calT in G - T_0 is equal to the minimum size of such a vertex set in G' - T_0. Does there exist an absolute constant c > 0 such that every terminal network (G, T) admits an exact vertex multicut-mimicking network (G', T) with |V(G')| ≤ k^c? (The corresponding question also remains open for exact edge multicut-mimicking networks.)

Posed in arXiv:2611.07880, Sec. 10 — Quasi-polynomial-sized vertex multicut-mimicking networks and kernelization for Vertex Multiway Cut

What is known

The paper constructs deterministic connectivity-c vertex multicut-mimicking networks of size |T|^7 * c^{O(log c)}, giving an exact mimicker of size k^{O(log k)}. Whether this quasi-polynomial bound can be reduced to a polynomial bound k^{O(1)} remains the central open structural question in mimicking networks.

OP-1275 Polynomial kernel for Vertex Multiway Cut with undeletable terminalsNot in LeanAlgorithm Design & Analysis

In the Vertex Multiway Cut problem with undeletable terminals, the input is an undirected graph G, a set of terminals T ⊆ V(G), and an integer k ≥ 0. The goal is to decide whether there exists a subset X ⊆ V(G) \ T of size at most k such that no two distinct terminals in T belong to the same connected component of G - X. Does Vertex Multiway Cut parameterized by the deletion budget k admit a polynomial kernel, i.e., a polynomial-time algorithm that transforms any instance (G, T, k) into an equivalent instance (G', T', k') whose total encoding size is bounded by k^c for an absolute constant c > 0?

Posed in arXiv:2611.07880, Sec. 1 — Quasi-polynomial-sized vertex multicut-mimicking networks and kernelization for Vertex Multiway Cut

What is known

The paper resolves a long-standing question by providing a deterministic quasi-polynomial kernel of size k^{O(log k)} for Vertex Multiway Cut with undeletable terminals, but whether a polynomial kernel of size k^{O(1)} exists remains open.

OP-1276 Tight Query Complexity Bound of O(n log n) for Generalized SortingNot in LeanAlgorithm Design & Analysis

Let $G = (V, E)$ be an undirected graph on $n$ vertices with an unknown total ordering $\pi$ of $V$ such that $(\pi(i), \pi(i+1)) \in E$ for all $i \in [n-1]$ (i.e., $G$ contains the Hamiltonian path induced by $\pi$). An algorithm may query edges $\{u, v\} \in E$ to learn whether $u \prec_\pi v$ or $v \prec_\pi u$. Can every such hidden ordering $\pi$ be determined by a randomized algorithm using at most $O(n \log n)$ queries in expectation, or does there exist a family of graphs and hidden orders requiring $\omega(n \log n)$ queries in expectation?

Posed in arXiv:2611.08397, Sec. 1.2, item 1 — A Near-Optimal Generalized Sorting Algorithm

OP-1277 Deterministic Nearly-Linear Query Complexity for Generalized SortingNot in LeanAlgorithm Design & Analysis

Let $G = (V, E)$ be an undirected graph on $n$ vertices containing the Hamiltonian path induced by an unknown total ordering $\pi$ of $V$. Comparisons can only be made between pairs adjacent in $G$. What is the deterministic worst-case query complexity of finding $\pi$? In particular, does there exist a deterministic algorithm that recovers $\pi$ using $\tilde{O}(n) = O(n \log^c n)$ queries in the worst case for some constant $c > 0$?

Posed in arXiv:2611.08397, Sec. 1.2, item 2 — A Near-Optimal Generalized Sorting Algorithm

OP-1278 Polynomial-Time Generalized Sorting with Sub-3/2-Exponent Query ComplexityNot in LeanAlgorithm Design & Analysis

Given an undirected graph $G = (V, E)$ on $n$ vertices guaranteed to contain the Hamiltonian path induced by an unknown total ordering $\pi$, does there exist an algorithm that runs in polynomial time in $n$ (both computational time and query count) and determines $\pi$ using at most $n^{3/2 - \epsilon}$ queries (or $\tilde{O}(n)$ queries) for some constant $\epsilon > 0$?

Posed in arXiv:2611.08397, Sec. 1.2, item 3 — A Near-Optimal Generalized Sorting Algorithm

OP-1279 Upper bound on the number of layers of a flag layered familyNot in LeanCombinatorics for TCS

Let $m \ge r \ge 1$ be positive integers. A family $\mathcal{F}$ of $r$-subsets of an $m$-element finite set $V$, partitioned into nonempty layers $L_0, \dots, L_N$, is called a $1$-layered family if for every nonempty subset $S \subseteq V$, the set of indices $t \in \{0, \dots, N\}$ for which there exists $F \in L_t$ with $S \subseteq F$ is an interval $\{a, a+1, \dots, b\}$. The family $\mathcal{F}$ is called flag if no element of $\mathcal{F}$ is contained in an $(r+1)$-clique of the graph on $V$ whose edges are the pairs $\{u, v\}$ contained in some common member of $\mathcal{F}$. Is the number of layers $N + 1$ of any flag $1$-layered family of $r$-subsets of an $m$-set at most $m - r + 1$?

Posed in arXiv:2611.08071, Conjecture 7.1 — Diameter bounds for complexes that are close to flag or close to normal

OP-1280 Hirsch diameter bound for normal complexes with flag deficiency oneNot in LeanCombinatorics for TCS

Let $\Delta$ be a pure $(d-1)$-dimensional simplicial complex on $n$ vertices. The complex $\Delta$ is normal if for every face $\sigma \in \Delta$ with $|\sigma| \le d-1$, the set of facets containing $\sigma$ induces a connected subgraph of the dual graph $G(\Delta)$. The flag deficiency $\operatorname{fd}(\Delta)$ is the least integer $p \ge 0$ such that the link $\operatorname{lk}_\Delta(\sigma)$ is flag for every face $\sigma$ with $|\sigma| \ge p$. When $\operatorname{fd}(\Delta) = 1$ (every vertex link of $\Delta$ is flag), is the diameter of the dual graph $G(\Delta)$ at most $n - d$?

Posed in arXiv:2611.08071, Sec. 9, Question 9.3 — Diameter bounds for complexes that are close to flag or close to normal

OP-1281 Diameter of dual graphs of normal subflag complexesNot in LeanCombinatorics for TCS

Let $\Delta$ be a pure $(d-1)$-dimensional simplicial complex on $n$ vertices with connected dual graph that is the $(d-1)$-skeleton of a flag simplicial complex (that is, every minimal nonface of $\Delta$ has size at least $d+1$). Suppose that $\Delta$ is normal, meaning that for every face $\sigma \in \Delta$ with $|\sigma| \le d-1$, the facets containing $\sigma$ induce a connected subgraph of the dual graph $G(\Delta)$. Is the diameter of $G(\Delta)$ at most $n - d$, or at least bounded by a polynomial in $n$ independent of $d$?

Posed in arXiv:2611.08071, Sec. 9, Question 9.4 — Diameter bounds for complexes that are close to flag or close to normal

OP-1282 Limit Points of the Scaled Logarithmic Rate Increment for Perfect HashingNot in LeanCombinatorics for TCS

Let q ≥ 3 be an integer. Let M(N, q) denote the maximum size of a perfect q-hash code of length N over an alphabet of size q (that is, a subset C ⊆ {1, ..., q}^N such that for every q-element subset S ⊆ C, there exists a coordinate i ∈ {1, ..., N} such that all codewords in S take distinct values at coordinate i). Let R_q = limsup_{N → ∞} (log_2 M(N, q)) / N be the optimal asymptotic rate of perfect q-hash codes, and let B_q = - log_2(1 - q! / q^q) / (q - 1) be the classical probabilistic lower bound. What are the limit points of the sequence q⁻¹ ln(R_q - B_q) as q → ∞? In particular, is liminf_{q → ∞} q⁻¹ ln(R_q - B_q) > -2?

Posed in arXiv:2611.08230, Problem 8.1 — The probabilistic bound for perfect hashing is sharp only for binary alphabets

OP-1283 Polynomial Bound on the Number of Transversals in Latin SquaresNot in LeanCombinatorics for TCS

Does there exist an absolute constant C > 0 such that for every integer q ≥ 1, every Latin square L of order q (an array L : {1, ..., q} × {1, ..., q} → {1, ..., q} whose rows and columns are permutations) has at most q^C * (q!)^2 / q^q transversals (permutations π of {1, ..., q} such that the map i ↦ L(i, π(i)) is a bijection)?

Posed in arXiv:2611.08230, Problem 8.2 — The probabilistic bound for perfect hashing is sharp only for binary alphabets

OP-1287 Re-typing conjecture for Byte-Pair EncodingNot in LeanAlgorithm Design & Analysis

Let $s$ be a finite string and $k \ge 1$ an integer budget. Let $\mathrm{OPT}(s, k)$ denote the maximum utility (total string length reduction) achievable by any sequence of $k$ partial merges on $s$. Consider any greedy Byte-Pair Encoding run on $s$, where in step $t \in \{1, \dots, k\}$, a pair of adjacent symbols with maximum non-overlapping frequency is fully merged, achieving utility $g_t$, with cumulative utility $G_i = \sum_{t=1}^i g_t$ and $g_{i+1}$ being the maximum non-overlapping count of any adjacent pair in the resulting string $s_i$. Does the inequality $\mathrm{OPT}(s, k) \le 2 G_i + k g_{i+1}$ hold for all $s$, all $k \ge 1$, all tie-breaking rules, and all $0 \le i < k$?

Posed in arXiv:2611.08671, Conjecture 14 — Greedy Byte-Pair Encoding Achieves at Least 0.361 of the Optimal Compression

What is known

The paper conjectures that for every string s, budget k, and step i < k, OPT(s, k) <= 2 G_i + k * g_{i+1}. This inequality would imply the exact worst-case approximation ratio (1 - e^{-2})/2.

OP-1294 Sharp Additive Constant in Ore-Degree Threshold for Hypergraph MatchingsNot in LeanCombinatorics for TCS

For an integer $r \ge 3$, let $c_r = \lfloor (r-1)^{r-1}/r^{r-2} \rfloor$. Let $C_*(r)$ be the minimum nonnegative integer $C$ such that for every integer $s \ge 1$ and every $n \ge rs + C$, every $r$-uniform hypergraph $\mathcal{H}$ on $n$ vertices with Ore-degree $\sigma_r(\mathcal{H}) > r \left[ \binom{n-1}{r-1} - \binom{n-s}{r-1} \right]$ satisfies $\nu(\mathcal{H}) \ge s$. Is $C_*(r) = c_r$ for every integer $r \ge 3$?

Posed in arXiv:2611.09064, Question 5.4 — Ore-degree conditions for matchings in uniform hypergraphs

What is known

The paper proves that the additive constant $c_r = \lfloor (r-1)^{r-1}/r^{r-2} \rfloor$ is necessary and sufficient for all sufficiently large $s$, and shows that $C_*(r) \ge c_r$. It leaves open whether $n \ge rs + c_r$ suffices for all $s \ge 1$ and all $r \ge 3$.

OP-1295 Ore-Degree Condition for Matchings in Uniform Hypergraphs of Order Above 2rsNot in LeanCombinatorics for TCS

Let $r \ge 3$ and $s \ge 1$ be integers. If $\mathcal{H}$ is an $r$-uniform hypergraph on $n > 2rs$ vertices such that every nonedge $S \in \binom{V(\mathcal{H})}{r} \setminus \mathcal{H}$ satisfies $\sum_{v \in S} d_{\mathcal{H}}(v) > r \left[ \binom{n-1}{r-1} - \binom{n-s}{r-1} \right]$, does $\mathcal{H}$ contain a matching of size $s$?

Posed in arXiv:2611.09064, Conjecture 1.1 — Ore-degree conditions for matchings in uniform hypergraphs

What is known

The conjecture is due to Balogh, Palmer, and Raeisi (2026). The current paper settles it for $r=3$, and for sufficiently large $s$ for each fixed $r \ge 3$, but leaves it open for $r \ge 4$ and general values of $s$.

OP-1297 Homomorphisms of planar graphs of odd girth 4k+1 to odd cyclesNot in LeanGraph Theory & Graph Algorithms

Let $k \ge 2$ be an integer. Does every planar graph $G$ with odd girth at least $4k + 1$ (that is, with no odd cycle of length less than $4k + 1$) admit a graph homomorphism to the odd cycle $C_{2k+1}$?

Posed in arXiv:2611.08862, Sec. 7.2, Negative (odd) girth 2k+1 — Jaeger conjecture and Jaeger-Zhang conjecture

What is known

The paper proves that odd girth 4k+3 suffices for every planar graph to admit a homomorphism to C_{2k+1}, and notes counterexamples with odd girth 4k-1, leaving the 4k+1 threshold open for k >= 2.

OP-1298 Optimal upper bound on circular flow numbers for given edge connectivityNot in LeanGraph Theory & Graph Algorithms

For each integer $\lambda \ge 3$, determine the optimal upper bound (the supremum) of the circular flow number $\Phi_c(G)$ over all finite loopless multigraphs $G$ of edge connectivity at least $\lambda$.

Posed in arXiv:2611.08862, Sec. 7.1, Circular flows and modulo orientations — Jaeger conjecture and Jaeger-Zhang conjecture

What is known

The paper and prior work establish the edge-connectivity threshold 4k+2 for circular flow number strictly below 2 + 1/k, but the exact supremum of circular flow numbers for graphs of a given edge connectivity is not determined.

OP-1301 Optimal Logarithmic Competitive Ratio for Online Weighted Connectivity AugmentationNot in LeanOnline Algorithms

Let $G=(V,E)$ be a $k$-edge-connected undirected multigraph on $n$ vertices, and let $L \subseteq \binom{V}{2}$ be a set of candidate links with non-negative edge costs $c: L \to \mathbb{R}_{\ge 0}$. In the online weighted connectivity augmentation problem (OWCAP) with cut arrivals, minimum cuts $C_t \subseteq V$ of $G$ (satisfying $|\delta_E(C_t)| = k$) arrive sequentially, and an algorithm must irrevocably purchase links $F_t \subseteq L$ such that $F_t$ crosses every cut arrived by step $t$. Does there exist a randomized (or deterministic) online algorithm for OWCAP under cut arrivals achieving an expected competitive ratio of $O(\log n)$, matching the $\Omega(\log n)$ lower bound and eliminating the $O(\log \log n)$ factor in the known $O(\log n \log \log n)$ upper bound?

Posed in arXiv:2611.08570, Sec. 1, Question 2 — Weighted and Unweighted Online Connectivity Augmentation via Geometric Hitting Set

What is known

The paper establishes an $O(\log n \log \log n)$-competitive algorithm for weighted online connectivity augmentation (OWCAP) under cut arrivals, matching the lower bound up to a factor of $\log \log n$. It asks explicitly in Question 2 whether an optimal $O(\log n)$-competitive ratio can be achieved, eliminating this doubly-logarithmic gap.

OP-1303 Optimal distortion for embedding a union of k Euclidean metric spacesNot in LeanAlgorithm Design & Analysis

Let $k \ge 2$ be an integer. Let $D_k$ be the supremum over all metric spaces $(X, d)$ that can be written as the union $X = U_1 \cup \dots \cup U_k$ of $k$ subsets each isometric to a subset of Euclidean space, of the infimum distortion required to embed $(X, d)$ into $\ell_2$. Is $D_k = O(\operatorname{polylog} k)$, or is $D_k = \Omega(k^c)$ for some constant $c > 0$? In particular, is $D_k = \Theta(\log k)$?

Posed in arXiv:2611.08546, Sec. 1, p. 2 — Bourgain's Theorem for a Union of Euclidean Metric Spaces

What is known

The problem asks for the optimal distortion of embedding a union of k Euclidean metric spaces into Euclidean space. The known lower bound is Omega(log k), while this paper proves an upper bound of O(k^{1.128} log k), leaving a polynomial gap between Omega(log k) and O(k^{1.128} log k).

OP-1306 Closing the communication complexity gap for shortcut set computation at D = n^{1/3}Not in LeanCommunication Complexity

In the two-party communication model on directed graphs G = (V, E_A ∪ E_B) with |V| = n, what is the randomized communication complexity of finding a valid shortcut set H ⊆ G* of size |H| ≤ O~(n) that reduces the directed diameter to at most O~(n^{1/3})? In particular, is the optimal randomized communication complexity Θ~(n), Θ~(n^{4/3}), or strictly in between?

Proposed here, building on arXiv:2611.08978, Sec. 1.1, after Theorem 4 — On the Communication Complexity of Shortcut Set Computation; the paper does not ask it

What is known

For target diameter D = n^{1/3}, Theorem 3 provides an upper bound of O~(n^{4/3}) communication bits to find an O~(n)-size shortcut set reducing diameter to O~(n^{1/3}). Meanwhile, Theorem 4 gives a lower bound of Ω(n) bits (even for shortcut sets of unrestricted size). This leaves an n^{1/3} gap between the upper and lower bounds for the canonical D = n^{1/3} setting.

OP-1309 Containment bound for triangles under arbitrary planar rotationsNot in LeanConvex Analysis

Let $T \subset \mathbb{R}^2$ be a triangle with non-empty interior. Does there exist a constant $c > 0$ such that for every finite point set $P \subset \mathbb{R}^2$ of $n$ points in general position, there exists a pair of distinct points $p, q \in P$ such that every similar copy of $T$ (obtained by scaling, translating, and rotating by an arbitrary angle) that contains both $p$ and $q$ contains at least $c n$ other points of $P$?

Posed in arXiv:2611.08835, Sec. 8 — Containment Problems in Convex Sets

What is known

The paper solves the case where the triangle can only be translated and scaled (bound 1/12) and the case where rotations by $\pi$ radians are allowed (bound 1/768), leaving open the case of arbitrary planar rotations.

OP-1310 Optimal containment fraction for homothets of a triangleNot in LeanConvex Analysis

Let $T \subset \mathbb{R}^2$ be a triangle with non-empty interior. Let $c_T$ be the supremum of all real numbers $c > 0$ such that for every finite point set $P \subset \mathbb{R}^2$ of $n$ points with no two points on a line parallel to an edge of $T$, there exist distinct points $p, q \in P$ such that every homothet of $T$ containing $p$ and $q$ contains at least $c n$ other points of $P$. Is $c_T = 1/12$, or is $c_T > 1/12$? In particular, does $c_T = 1/5$?

Proposed here, building on arXiv:2611.08835, Theorem 9 — Containment Problems in Convex Sets; the paper does not ask it

What is known

Theorem 9 proves a lower bound of $(n-7)/12$ (a fraction of 1/12) for triangles via an average-case bound across all pairs. For axis-aligned squares, the exact tight constant is known to be 1/5. The paper leaves open whether 1/12 is tight for triangles or if the extremal constant equals 1/5 or another value between 1/12 and 1/5.

OP-1313 Eventual Uniqueness of Binary Three-Distance Extremal FamiliesNot in LeanCombinatorics for TCS

Let $n \ge 24$ be an integer. Let $\mathcal{S}_n \subseteq \{-1, 1\}^n$ be the family of all vectors with exactly one or three coordinates equal to $1$, which has distance set $\{2, 4, 6\}$ and size $n + \binom{n}{3}$. Does there exist an integer $n_0 > 24$ such that for every $n \ge n_0$, every subset $\mathcal{F} \subseteq \{-1, 1\}^n$ having at most three distinct pairwise Hamming distances and size $|\mathcal{F}| = n + \binom{n}{3}$ is isometric to $\mathcal{S}_n$ under coordinate permutations and coordinate sign changes? If such an integer exists, what is the minimum value of $n_0$?

Posed in arXiv:2611.09675, Question 7.1 — The maximum size of $3$-distance binary codes

OP-1314 Uniform Multiplicative Gap for Binary Three-Distance Codes with Non-Standard DistancesNot in LeanCombinatorics for TCS

For a finite set $D \subseteq \{1, \dots, n\}$, let $A(n, D)$ denote the maximum cardinality of a family $\mathcal{F} \subseteq \{-1, 1\}^n$ whose pairwise Hamming distances between distinct elements belong to $D$. Do there exist a constant $\varepsilon \in (0, 1)$ and an integer $n_0$ such that for every $n \ge n_0$ and every three-element set $D \subseteq \{1, \dots, n\}$ with $D \neq \{2, 4, 6\}$, we have $A(n, D) \le (1 - \varepsilon)\left(n + \binom{n}{3}\right)$?

Posed in arXiv:2611.09675, Question 7.2 — The maximum size of $3$-distance binary codes

OP-1315 Polynomial Bound on the Optimal Dimension Threshold for s-Distance Binary CodesNot in LeanCombinatorics for TCS

For each integer $s \ge 2$, let $M_s$ be the least positive integer such that for every $n \ge M_s$, every family $\mathcal{F} \subseteq \{-1, 1\}^n$ with at most $s$ distinct pairwise Hamming distances satisfies $|\mathcal{F}| \le \sum_{0 \le i \le s, \, i \equiv s \pmod 2} \binom{n}{i}$, and set $M_s = \infty$ if no such integer exists. Does there exist an absolute constant $C > 0$ such that $M_s \le s^C$ for all integers $s \ge 2$?

Posed in arXiv:2611.09675, Question 7.4 — The maximum size of $3$-distance binary codes

OP-1318 Exact Value of the Diagonal Ramsey Number of the Petersen GraphNot in LeanGraph Theory & Graph Algorithms

What is the exact value of the diagonal Ramsey number $R(\mathcal{P}, \mathcal{P})$ of the Petersen graph $\mathcal{P}$, defined as the minimum integer $N \ge 1$ such that every 2-coloring of the edges of the complete graph $K_N$ contains a monochromatic subgraph isomorphic to $\mathcal{P}$?

Posed in arXiv:2611.09347, Section 1 — A Structural Lower Bound for the Ramsey Number of the Petersen Graph

What is known

The paper improves the lower bound from 19 to 21 using an explicit 2-coloring on K_{20}, but leaves determining the exact value of the Ramsey number open.

OP-1320 Existence of Graphs Distinct from the 11-Cycle with Šoltés Fraction Exceeding 4/5Not in LeanGraph Theory & Graph Algorithms

Does there exist a finite connected simple graph $G$ not isomorphic to the cycle $C_{11}$ whose Šoltés fraction satisfies $R_0(G) > 4/5$? Here $R_0(G) = |\{v \in V(G) : G - v \text{ is connected and } W(G - v) = W(G)\}| / |V(G)|$, where $W(G) = \sum_{\{u, v\} \subseteq V(G)} d_G(u, v)$ denotes the Wiener index of $G$.

Proposed here, building on arXiv:2611.09416, Proposition 1 — A 4-regular graph with 4/5 of its vertices satisfying the \v{S}olt\'es property; the paper does not ask it

What is known

The paper constructs an explicit 4-regular graph on 2400 vertices with Šoltés fraction 4/5 = 0.8, improving the previous maximum known fraction of 2/3 (achieved by an order-12 graph and several other examples). This leaves open whether 4/5 is the maximum possible fraction strictly less than 1, or whether there exist finite connected graphs distinct from C_11 with fraction strictly greater than 4/5.

OP-1322 Fair and efficient tie resolution favoring tie-holder future turns in sequential draftsNot in LeanFair Division

In fair division of indivisible goods with weak preference orders (allowing ties), does there exist a tie-resolution rule for sequential draft sequences that favors the current picker's own future turns over subsequent turns of other agents, while guaranteeing that all resulting allocations are non-wasteful and pairwise-dominance efficient, satisfy EF1 and no-envy-toward-larger-bundles (NEL) whenever the underlying picking sequence does, and ensure neutrality and mutual indifference across all selected allocations?

Posed in arXiv:2611.09685, Sec. 4.3, after Example 3 — Who Picks First? Compensatory Fairness When Equal Division Is Impossible

What is known

The forward-looking draft resolves indifferences by committing each turn to maximal available objects and resolving ties in favor of the earliest later turn that strictly cares. Example 3 shows this can disadvantage the tie-holder compared to her own later turns. The paper asks whether an alternative tie-resolution rule that prioritizes the tie-holder's own later turns can preserve non-wastefulness, PD-efficiency, EF1, NEL, and neutrality.

OP-1324 Optimality of contention resolution efficiency with coarse clock granularity against oblivious schedulersNot in LeanDistributed & Parallel Computation

In contention resolution on a shared broadcast channel with n players who know n, have shared randomness, receive no channel feedback, and have access to a k-granular clock (reading ⌈t/k⌉ at step t), Theorem 5.2 proves that the Two-Mode protocol achieves efficiency Ω(1/max(k, log n)) against any oblivious scheduler, yielding efficiency Ω(1/k) when k ≫ log n. Is this Ω(1/k) efficiency tradeoff optimal for large k? Specifically, for k ≥ log n, does every protocol have efficiency O(1/k) (i.e., expected number of live steps E[L] = Ω(n k)) against some oblivious scheduler, or can a protocol achieve efficiency ω(1/k)?

Posed in arXiv:2611.09747, Sec. 5, after Thm 5.2 — Contention Resolution Against an Adversarial Scheduler

What is known

Theorem 5.2 establishes that the Two-Mode protocol achieves efficiency Ω(1/max(k, log n)) against an oblivious scheduler using a k-granular clock and shared randomness. When k >> log n, this gives efficiency Ω(1/k). It is open whether any protocol can achieve efficiency ω(1/k), or whether there is a matching O(1/k) upper bound against oblivious schedulers.

OP-1325 Contention resolution efficiency with global clock but private randomness onlyNot in LeanDistributed & Parallel Computation

In the adversarial contention resolution problem with n players knowing n, suppose the players have access to a synchronized global clock (so on step t, every scheduled player learns the exact step index t), but players have only private randomness (mutually independent random bit streams per player) and no shared randomness. Can any player protocol achieve efficiency ω(log n / n) (i.e., expected live steps o(n^2 / log n)) against every oblivious (or adaptive) scheduler? What is the optimal worst-case efficiency in this setting?

Proposed here, building on arXiv:2611.09747, Thm 1.3 — Contention Resolution Against an Adversarial Scheduler; the paper does not ask it

What is known

Theorem 1.1 achieves Θ(1/log n) efficiency against an adaptive scheduler using both a global clock and shared randomness. Theorem 1.3 proves that without a global clock and without shared randomness, no protocol achieves efficiency better than O(log n / n), even against an oblivious scheduler with ternary feedback. The paper identifies a global clock and shared randomness as two distinct forms of implicit shared state, but leaves open what efficiency is achievable when players have a synchronized global clock but only private randomness.

OP-1326 Optimal additive quantum query overhead beyond n/2 for general Boolean functionsNot in LeanQuantum Computation

Let $Q_{\varepsilon}(f)$ denote the bounded-error quantum query complexity of a Boolean function $f : \{0,1\}^n \to \{0,1\}$ with worst-case error at most $\varepsilon \in (0, 1/2)$. For any total Boolean function $f$, it is known that $Q_{\varepsilon}(f) \leq n/2 + O(\sqrt{n})$. Does there exist an explicit or existential family of Boolean functions $f_n : \{0,1\}^n \to \{0,1\}$ for which $Q_{\varepsilon}(f_n) \geq n/2 + \Omega(\sqrt{n})$ for some fixed constant $\varepsilon \in (0, 1/2)$, or can the universal upper bound be improved to $n/2 + o(\sqrt{n})$ for all single-bit output functions?

Posed in arXiv:2611.09809, Sec. 1.1, following Theorem 1.4 — Beyond the $n/2$ Threshold: Quantum Query Complexity for Computing Hamming Weight and Symmetric Functions

What is known

While symmetric functions require at most n/2 + O(n^{1/3}) queries, general non-symmetric Boolean functions might require up to the full n/2 + Omega(sqrt(n)) overhead of input recovery.

OP-1328 Optimal competitive ratio for deterministic online timely bin packingNot in LeanOnline Algorithms

In online Timely Bin Packing, items arrive online over time, each item p_i having an arrival time a_i ≥ 0, a deadline d_i ≥ a_i, and a size s_i ∈ (0, 1]. An online algorithm must assign each item to a unit-capacity bin and select a packing time t ∈ [a_i, d_i] for that bin, such that bins are closed once packed and cannot accept items later. The objective is to minimize the total number of bins used. Does there exist a deterministic online algorithm for online Timely Bin Packing that achieves a competitive ratio strictly less than 2? More specifically, is the infimum of achievable deterministic competitive ratios equal to 1.5, strictly between 1.5 and 2, or exactly 2?

Posed in arXiv:2611.09611, Sec. 5, 1st bullet — Online Timely Bin Packing Revisited: A Simpler Algorithm with Optimality in Special Cases

OP-1329 Competitive ratio strictly below 2 for randomized online timely bin packingNot in LeanOnline Algorithms

In online Timely Bin Packing, items arrive online over time with arrival times a_i, deadlines d_i ≥ a_i, and sizes s_i ∈ (0, 1]. Bins have unit capacity and are closed at their assigned packing time. Does there exist a randomized online algorithm against an oblivious adversary that achieves an expected competitive ratio strictly less than 2, i.e., 𝔼[ALG(I)] ≤ c · OPT(I) for some absolute constant c < 2 on all finite item sequences I?

Posed in arXiv:2611.09611, Sec. 5, 2nd bullet — Online Timely Bin Packing Revisited: A Simpler Algorithm with Optimality in Special Cases

OP-1333 Irrational Beatty Sequences as Parikh Images of Context-Free Word Subtraction GamesNot in LeanCombinatorial Games

In the standard suffix-removal word subtraction game $\mathtt{WordSubtraction}(S)$ over the alphabet $\Sigma = \{a, b\}$, where a move removes a suffix $s \in S$ from the current word under normal play, can a context-free subtraction set $S \subseteq \Sigma^+$ yield a $\mathcal{P}$-position language $L_{\mathcal{P}}(S)$ whose Parikh image (restricted to $a^* b^*$) is described by a pair of complementary irrational Beatty sequences $\{(\lfloor n \alpha \rfloor, \lfloor n \beta \rfloor) : n \ge 1\}$ with $1/\alpha + 1/\beta = 1$ and $\alpha$ irrational?

Posed in arXiv:2611.09157, Problem 5.2 — Word Subtraction Games

OP-1334 Polynomial-Time Decidability of All Nonterminal Positions Being Winning PositionsNot in LeanCombinatorial Games

Given a deterministic finite automaton $\mathbf{A}$ with state set $Q$ and input alphabet $\Sigma$ recognizing a regular language $S \subseteq \Sigma^+$, can the property that every nonterminal position in the word subtraction game $\mathtt{WordSubtraction}(S)$ is an $\mathcal{N}$-position (that is, $L_{\mathcal{P}}(S) \cap \Sigma^* S = \emptyset$) be decided in time polynomial in $|Q| \cdot |\Sigma|$?

Posed in arXiv:2611.09157, Problem 6.1 — Word Subtraction Games

OP-1335 Regularity of P-Positions in Two-Sided Word Subtraction Games with Finite Subtraction SetsNot in LeanCombinatorial Games

Let $\Sigma$ be a finite alphabet and let $S, T \subseteq \Sigma^+$ be finite nonempty subsets of words. In the two-sided word subtraction game $\mathtt{WordSubtraction}(S, T)$, from a word $w \in \Sigma^*$, a legal move replaces $w$ by $w'$ if either $w = s w'$ for some $s \in S$ or $w = w' t$ for some $t \in T$. Under normal play convention, is the language $L_{\mathcal{P}}(S, T)$ of $\mathcal{P}$-positions always a regular language over $\Sigma$?

Proposed here, building on arXiv:2611.09157, Sec. 5.1 — Word Subtraction Games; the paper does not ask it

What is known

Theorem 2.9 shows that for one-sided suffix removal with a finite subtraction set S, the position language L_P(S) is always regular. Section 5.1 introduces the two-sided game WordSubtraction(S, T) where moves remove a prefix from S or a suffix from T, and shows that when S and T are infinite regular languages, L_P(S, T) can be non-regular (e.g. Dyck language or the game in Exercise 5.1). The paper leaves open whether finite subtraction sets S, T guarantee that L_P(S, T) is regular.

OP-1336 Dominated balanced separators in tree induced minor free graphsNot in LeanGraph Theory & Graph Algorithms

For every finite tree $T$, does there exist an integer $k = k(T) \ge 1$ such that every finite simple graph $G$ excluding $T$ as an induced minor admits a $k$-dominated balanced separator? That is, for every weight function $w: V(G) \to \mathbb{R}_{\ge 0}$, does there exist a set $X \subseteq V(G)$ with $|X| \le k$ such that every connected component of $G - N[X]$ has total weight at most $\frac{1}{2} \sum_{v \in V(G)} w(v)$?

Posed in arXiv:2611.09627, Section 7, under Dominated balanced separators — What remains of the planar induced minor conjectures?

OP-1337 Equivalence of tractability of maximum weight independent set and list 3-coloring under excluded induced minorsNot in LeanGraph Theory & Graph Algorithms

Is it true that for every finite simple graph $H$, Maximum Weight Independent Set is solvable in polynomial time (respectively, quasipolynomial time) on the class of $H$-induced-minor-free graphs if and only if List 3-Coloring is solvable in polynomial time (respectively, quasipolynomial time) on the same class?

Posed in arXiv:2611.09627, Question 7.2 — What remains of the planar induced minor conjectures?

OP-1338 Optimal Regret for General CDF-Dependent Rewards in Bilateral TradeNot in LeanMechanism Design & Auctions

Let $F: [0,1]^2 \to [0,1]$ be an unknown cumulative distribution function of private valuations in repeated bilateral trade over $T$ rounds with binary feedback $Y_t = \mathbb{I}\{S_t \le p_t \land B_t \ge q_t\}$. Consider reward functions of the form $r(x) = g(x)F(x)$ for an action $x = (p, 1-q) \in [0,1]^2$, where $g: [0,1]^2 \to [0,1]$ is a known bounded $L$-Lipschitz function. Can an online learning algorithm achieve expected cumulative regret $R_T = T \sup_{x \in [0,1]^2} r(x) - \mathbb{E}\left[\sum_{t=1}^T r(x_t)\right] \le \widetilde{\mathcal{O}}(T^{2/3})$ against the best fixed action in hindsight, or is the affine margin structure $g(x) = 1 - x_1 - x_2$ essential for the $T^{2/3}$ regret rate?

Posed in arXiv:2611.09558, Sec. 10 — Optimal Regret for Profit Maximization in Bilateral Trade

OP-1339 Dimension-Free Regret for Multidimensional CDF-Based BanditsNot in LeanMechanism Design & Auctions

In a market with $d$ agents (for a fixed constant dimension $d \ge 3$), valuation vectors $X_t \in [0,1]^d$ are drawn i.i.d. from an unknown joint distribution with CDF $F(x) = \mathbb{P}(X \le x)$. In each round $t \in [T]$, the learner chooses a threshold vector $x_t \in [0,1]^d$, receives binary feedback $\mathbb{I}\{X_t \le x_t\}$, and earns expected reward $r(x_t) = (1 - \sum_{i=1}^d x_{t,i}) F(x_t)$. Can an online algorithm achieve cumulative regret $R_T = T \sup_{x \in [0,1]^d} r(x) - \mathbb{E}\left[\sum_{t=1}^T r(x_t)\right] \le \widetilde{\mathcal{O}}(T^{2/3}) = \mathcal{O}_d(T^{2/3} \operatorname{polylog}(T))$, where the regret exponent $2/3$ is independent of the dimension $d$?

Posed in arXiv:2611.09558, Sec. 1 — Optimal Regret for Profit Maximization in Bilateral Trade

OP-1341 tree binary diagonal nonsingular maximum path uniqueNot in LeanCombinatorics for TCS

For every integer n >= 3 and every n-vertex tree T, let N(T) be the number of binary diagonal matrices D for which the adjacency matrix A(T)+D is nonsingular over F_2. Is N(T) at most (2^(n+1)+(-1)^n)/3, with equality exactly when T is the n-vertex path?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for the sharp upper extremum and equality cases for the leading coefficient of the partial Petrial polynomial over every tree. Its relevance to topological graph polynomials and binary matrix rank goes beyond a small-case calculation. QC-170 / OP-1250 asks the opposite end of the stochastic order, with the star as conjectured minimum; it does not imply this path upper bound. The known characterization of paths by the support of the polynomial also does not by itself bound the leading coefficient for other trees. The formula for the path is known, but the proposed comparison and rigidity are the question. Evidence: Experiment 19548 exhaustively enumerated all nonisomorphic trees and all binary diagonal choices for every order n=3,...,12; the path uniquely maximized the number of nonsingular matrices and its count equaled (2^(n+1)+(-1)^n)/3. Experiment 19547 also checked the entire rank distribution on these trees. These checks are evidence only.

OP-1342 opposed latin minimal stable lattice consecutive hamiltonicityNot in LeanMatching & Market Design

Let L be an n by n Latin square with entries 0,...,n-1, n>=3. In the associated opposed Latin marriage market, man i ranks woman j by increasing L(i,j), while woman j ranks man i by decreasing L(i,j). For each rank r let M_r be the perfect matching consisting of cells with symbol r. Is the market's number of stable matchings exactly n if and only if, for each r=0,...,n-2, the bipartite graph M_r union M_(r+1) is a single Hamiltonian cycle?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This would characterize every minimum-size stable matching lattice in the entire opposed-Latin class by a concrete Hamiltonicity property of the square's rank factorization, connecting stable marriage theory with perfect one-factorizations. Benjamin, Converse and Krieger prove the lower bound n and exhibit an extremal cyclic ordering, but that does not classify all extremizers. The condition only requires adjacent ranks to form Hamilton cycles, which is weaker than a perfect one-factorization. It could turn an extremal matching question into a graph-structural certificate. Evidence: Experiment 19555 checked every reduced Latin square through n=5 under every symbol order: 6, 96 and 6720 normalized profiles at orders 3, 4 and 5 respectively, with no discrepancy. Experiment 19553 checked every symbol order on cyclic groups through order 6, on C2 x C2, and on S3; again no discrepancy. These are finite computational checks.

OP-1343 alternating two word subtraction exact quadratic dfaNot in LeanCombinatorial Games

For each integer m>=2, consider the normal-play word subtraction game over {0,1} with subtraction set S_m={(01)^(m-1),(10)^m}: a move removes from the current word any suffix belonging to S_m, and the empty word is losing. Is the number of states in the minimal deterministic finite automaton recognizing the losing positions exactly 8m(m-1)-2?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This gives an explicit infinite family with a sharp quadratic state-complexity lower bound in the maximum subtraction-word length, even though there are only two subtraction words over a fixed binary alphabet. Inoue and Inazu, Theorem 2.9 and Problem 2.1, give a general exponential-size construction and ask if polynomial size is possible; their general question is already OP-1332, whereas this is a new exact lower-bound family, not a restatement. Both the construction and Myhill-Nerode minimality need analysis because the P/N status depends on previous suffix patterns. Evidence: Experiment 19576 constructs and minimizes the reachable trie-subset DFA and finds 14, 46, 94, 158, 238, ... states for m=2,...,20, exactly 8m(m-1)-2. Experiment 19578 compares the trie-state transition independently with direct P/N recursion on 30,400 random binary words across m=2,...,20; they agree. Experiment 19572 also independently enumerated all pairs of binary subtraction words through maximum length 8.

OP-1344 binary alphabet greedy bpe uniform two thirdsNot in LeanAlgorithm Design & Analysis

For every binary string s and every merge budget k>=1, does every tie-breaking run of greedy byte-pair encoding achieve at least two thirds of the utility of an optimal k-step partial-merge sequence? A greedy step chooses a pair with the maximum number of nonoverlapping occurrences and replaces all its occurrences from left to right by a fresh symbol; a partial-merge step may replace any set of nonoverlapping occurrences of its chosen pair. Utility is the decrease in string length. Equivalently, is the worst-case binary-alphabet approximation ratio at least 2/3 uniformly in k?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Baliga, Xie and Byju prove a 0.361 lower bound for unrestricted alphabets and exhibit a three-merge upper bound of 7/12 using distinct separators. Whether the especially important fixed binary alphabet admits a strictly stronger all-budget guarantee is not resolved by that general bound. Binary restriction changes the charging problem because there are only four original pair types, but newly formed symbols and overlaps prevent a simple finite-alphabet counting argument. The conjecture ranges over every length and budget; it would give a new uniform approximation theorem if true and identify a structural counterexample if false. Evidence: Experiment 19566 exhaustively compared every binary string of length at most 11, all tie-breaking choices and budgets k=2,...,5 against the actual partial-merge optimum: the smallest ratio was 2/3, attained by 00100010 at k=3. Experiment 19558 compared the full-merge optimum on all binary strings through length 13 and budgets through 4, and found no smaller ratio; the latter is a weaker comparator. Experiment 19561 shows the published 7/12-style obstruction remains at large length with nine initial symbols, making the binary restriction substantive. These are finite checks, not a proof.

OP-1345 opposite alternating word games exact lcm state complexityNot in LeanCombinatorial Games

For positive integers a and b, consider the normal-play suffix-removal game on binary words with subtraction set {(01)^a,(10)^b}; a move removes one of these suffixes if present, and a position with no legal move is losing. Is the minimum number of states of any complete deterministic finite automaton recognizing the losing-position language exactly 8*lcm(a,b)-2?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The formula would expose a number-theoretic least-common-multiple law in the automata of impartial games, valid for all a and b, rather than only the adjacent-length subfamily in QC-180 / OP-1343. For coprime adjacent a,b it yields a quadratic lower bound in the maximum word length even for two words over a binary alphabet, relevant to the polynomial-DFA question of Inoue and Inazu (OP-1332). Their paper proves regularity with an exponential general construction and does not give this exact two-parameter result. The required minimality is global over every DFA, so enumerating reachable states alone would not suffice. It moves Inoue and Inazu, Word Subtraction Games, Theorem 2.9: the losing and winning languages for a finite subtraction set are regular, with a general exponential-state construction. along quantitative: Determine the exact minimum DFA size for a two-parameter family, refining the one-parameter question OP-1343 and giving an infinite quadratic lower-bound family for OP-1332.. Evidence: Experiment 19591 minimized the reachable trie-subset automaton for all 144 pairs 1<=a,b<=12, yielding exactly 8*lcm(a,b)-2; experiment 19594 tested a further 100 randomly chosen pairs with a,b<=40. Experiment 19578 independently checked the trie transition against direct game recursion on 30,400 random positions for the a=m-1,b=m subfamily. Experiment 19570 builds a separate history-window DFA and agrees on the small cases. These checks do not prove minimality for arbitrary parameters.

OP-1346 edge vertex ccz tree path maximizes integer renyi entanglementNot in LeanQuantum Mechanics

For each finite n-vertex tree T=(V,E), prepare |psi_T> by applying one CCZ gate to qubits (a_e,b_u,b_v) for every edge e={u,v}, starting from |+> on the |E| edge qubits and |V| vertex qubits. Let rho_T be the edge-side reduced density matrix. For every integer r>=3 and n>=3, is Tr(rho_T^r) >= Tr(rho_Pn^r), where Pn is the n-vertex path? Equivalently, does the path maximize the order-r Renyi entanglement entropy within this tree-indexed family?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This would give a sharp family-wide entanglement theorem for a non-stabilizer circuit and a new infinite family of graph targets for the path-minimizes-homomorphisms problem. Fajardo and Paraschiv bound Schmidt rank via restricted bilinear cores; that does not determine higher Renyi moments. For r=2 the collision target is a blow-up of the looped Widom-Rowlinson star, so the non-strict extremum already follows from Galvin et al., Theorem 4.19(b), and is intentionally excluded here. For r>=3, replica vectors s,t in {0,1}^r are adjacent exactly when their bitwise intersection is either all-zero or all-one; the resulting target has a substantially different disjointness graph. The known r=2 inequality and extremality of stars do not establish this lower bound. It moves Galvin, Marmorino, McMillon, Nir and Redlich, Theorem 4.19(b): the path minimizes the partition function of the weighted Widom-Rowlinson model among trees of fixed order. along bridge: Transfer the known two-replica purity extremum to all integer Renyi moments of a non-stabilizer CCZ hypergraph-state family, whose replica constraint graphs are not the Widom-Rowlinson graph for r>=3.. Evidence: Experiment 19617 exactly counted r-fold edge-image collisions for every nonisomorphic tree with n<=15 and r=3,4,5; no tree had a smaller moment count than the path. Experiment 19620 independently formed the quantum reduced density matrices and checked the moment identity through r=5 on every tree with n<=7. Experiment 19608 showed that a stronger spectrum-majorization approach already fails at n=4, so the question is not a trivial consequence of that ordering.

OP-1348 unicyclic binary diagonal invertibility sharp extremaNot in LeanCombinatorics for TCS

Let G be a connected simple unicyclic graph on n>=7 vertices and let N(G) be the number of diagonal n-by-n matrices D over F_2 such that A(G)+D is invertible. Are the sharp bounds 6n-15 <= N(G) <= 5*2^(n-3)+(-1)^n? Is equality in the upper bound attained only by the triangle with two pendant edges attached at two distinct triangle vertices and a path of length n-5 attached at the third triangle vertex? Is equality in the lower bound attained only by either the triangle with all n-3 other vertices pendant at one triangle vertex, or the triangle joined by one bridge to the center of a star on n-3 vertices?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Counting invertible finite-field Schrodinger operators is a natural graph invariant and the full-rank endpoint of the binary diagonal-rank distribution appearing in the petrial nodes. Cycles alter the determinant-count function, so simply transferring the tree/matching extremum is not automatic. The result would turn a 2^n-potential count into two exact graph-structural extremal theorems, with an unusual linear minimum and exponential maximum. The n>=7 restriction avoids exceptional equalities on six vertices. It moves Bacher, Theorems 1 and 2, counts invertible diagonal perturbations for all trees and for pure cycles over finite fields. The earlier tree-extremum pitch OP-1341 is likely subsumed by Bacher's tree formula and classical coefficientwise matching extremality. These results do not by themselves give extremizers and equality cases over all connected graphs with exactly one cycle. along new_setting: Find simultaneous sharp all-n minimum and maximum and all equality graphs for the entire unicyclic family, including nontrivial branching and cycle lengths, instead of evaluating trees or a single cycle.. Evidence: 19667 enumerates all unicyclic graphs up to 11 vertices and counts each invertible diagonal by direct F_2 Gaussian elimination; both formulas and claimed equality classes hold for 7<=n<=11. 19672 checks every unicyclic graph through 14 vertices (39,260 graphs at n=14) by an independently validated cycle-transfer enumeration, with no exceptions. 19670 compares that transfer computation with Gaussian elimination on small graphs and finds no bound violations in 21,000 random unicyclic graphs at sizes 12,20,30,50,80,120,200.

OP-1350 mandelstam tamm symmetric fidelity sharp spectral stabilityNot in LeanQuantum Mechanics

Fix an angle 0 < theta <= pi/2. Let mu range over symmetric Borel probability measures on R with variance 1 for which phi_mu(t)=integral cos(tx) dmu(x) first reaches cos(theta) at a finite time t_mu > theta. Put delta_mu=t_mu/theta-1 and nu=(delta_{-1}+delta_{+1})/2. Is it true that lim_{epsilon down to 0} sup{W_2(mu,nu)^2/delta_mu : 0 < delta_mu <= epsilon} equals theta*sin(theta)/(1-cos(theta)-theta*sin(theta)/2)? For theta=pi/2 this specializes to the symmetric part of OP-1154; for smaller theta it gives a sharp stability law at every nonzero target survival fidelity cos(theta)^2.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Quantum metrology and quantum control need to know how close the energy distribution must be to the ideal two-level distribution when an evolution almost reaches the speed limit at a prescribed fidelity. OP-1154 asks for the orthogonal endpoint only, and does not imply the interior-fidelity result. The standard Mandelstam–Tamm inequality bounds the time but gives no sharp quadratic Wasserstein stability constant. The symmetry assumption removes an independent phase degree of freedom and makes the optimal-transport distance an explicit radial moment, so this is a concrete moment problem rather than an unspecified physics generalization. Evidence: Experiment 19962 solved discretized linear moment problems over symmetric spectra for five angles 0.25, 0.5, 0.8, 1.2, and pi/2, and three excess times each. As excess time shrinks, the best ratios approach the proposed angle-dependent constant; optimizers place a small mass at zero and the remaining mass near a symmetric two-level spectrum. For theta=1.2 the ratios 12.5665, 13.8861, 14.1855 approach 14.2625. These finite-grid calculations are evidence, not a proof.

OP-1353 biased tie balanced forest greedy ballistic rootNot in LeanOnline Algorithms

Fix p in (1/2,1). Starting with 2^h isolated vertices, construct a balanced binary merge forest in h rounds, as in OP-1155: at each merge join the distinguished roots of two independent equal-sized components, retaining the left root. Orient the new edge toward the endpoint with smaller indegree-minus-outdegree discrepancy; on a tie orient toward the left root with probability p independently of all other ties. Let X_h be the discrepancy of the final distinguished root. Does there exist v(p)>0 such that E[X_h]/h converges to v(p) and sup_h Var(X_h)<=2? Equivalently, by concentration, does X_h/h converge in probability to a positive constant while its centered fluctuations remain uniformly bounded?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Online discrepancy algorithms often use randomized tie-breaking. OP-1106 conjectures doubly exponential discrepancy tails for fair ties, while OP-1155 investigates the symmetric balanced-forest root law. This asks whether even a small fixed bias toward a consistent endpoint produces a traveling wave of height-linear drift on that same oblivious forest. A positive answer would yield discrepancy of order log(number of vertices) with high probability and show that fair tie-breaking is a substantive hypothesis for the proposed log-log guarantee. Existing fair-tie symmetry and its parity-dependent fixed point do not control the biased nonlinear recursion. The universal variance bound is a concrete, numerically motivated formulation of a stable traveling-wave width. Evidence: Experiment 19976 iterates the distribution recurrence for 11 bias values up to 10000 generations. Experiment 19978 extends seven biases to 100000 generations: successive 25000-generation window slopes converge numerically, for example to about 0.27446 at p=3/4, while the observed variance stays below 1.145 and tie probability above 0.482 in the sampled range. Experiment 19977 directly simulates 12000 independent balanced forests for p=0.6,0.75,0.9 and heights through 10, agreeing with the recursive distributions. These computations do not prove velocity convergence or the uniform variance bound.

OP-1356 loose hypertree ccz star minimum stabilizer magicNot in LeanQuantum Computation

For each integer m >= 2, let H be a 3-uniform hypergraph with m hyperedges whose bipartite vertex-hyperedge incidence graph is a tree, so H has n=2m+1 vertices. For a in F_2^n define the symmetric zero-diagonal matrix B_H(a) over F_2 by B_ij(a) = sum_{k: {i,j,k} in E(H)} a_k for i != j. Put p(H)=2^(-n) sum_{a in F_2^n} 2^(-rank_F2 B_H(a)). Is it true that p(H) <= 1/8 + 7/2^(2m+3), with equality if and only if all hyperedges of H share a common vertex? Equivalently, among all these CCZ hypertree states, does the hyperstar uniquely minimize the stabilizer Renyi-2 magic?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers studying magic as a quantum computational resource want structural bounds that identify which interaction geometries are least nonstabilizer for a fixed number of three-body gates. Kagamihara and Tsuchiya give a rank sum for any 3-uniform hypergraph and a regular one-dimensional recurrence, but not an extremal comparison across branching hypertrees; their termwise rank bound does not order these rank sums. This asks for an exact bound and equality characterization over every size, not an evaluation of one geometry. Evidence: Experiment 20373 enumerated every incidence-tree isomorphism class for m=1,...,6 (1,1,2,4,8,19 classes), exactly evaluated the binary-rank sum, and found the star uniquely maximizes p at every size; the hyperpath fails to minimize p from m=4, making the other extremum less straightforward.

OP-1357 temporal envy sorted lowest first sharp agent ratioNot in LeanFair Division

For every n>=2 and finite nonempty multiset of nonnegative real item values, do the following two costs satisfy 2(n-1) times G <= (2n-1) times OPT? All n agents have the same additive valuation. G is the sum, after each allocation, of the largest agent load minus the smallest, when items are processed in nondecreasing value and each is assigned to a least-loaded agent. OPT is the minimum of the same sum over every ordering of the items and every irrevocable assignment to agents. If true, the exact worst-case ratio G/OPT is (2n-1)/(2n-2) for every n, as attained by two items of value 1 and n-1 of value 2.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Temporal fair-division researchers care about the cumulative magnitude and duration of envy, and the sorted least-loaded rule is an inexpensive way to control it. The paper proves a sharp 3/2 bound for two agents, but for n>=3 only proves n/(n-1) and provides examples with ratio (2n-1)/(2n-2). The current proof bounds each prefix gap separately by that item's value and loses information about the sequence of minimum loads, so it does not yield the proposed factor. A uniform sharp n-agent theorem would close a concrete multiplicative gap for this recently introduced objective. It moves Goldberg, Robinson and Teh (2026), Theorem 5.3, the n/(n-1) approximation for Identical-Lowest-First along stronger_result: Replace n/(n-1) by (2n-1)/(2n-2), matching their example for each n and extending their sharp two-agent factor to every n.. Evidence: Experiment 20374 exactly optimized the order and assignment by dynamic programming for all 494 multisets of 1-4-valued goods with at most 8 goods for each of n=2,3,4, and all 329 multisets with at most 7 goods for n=5; worst ratios were exactly 3/2, 5/4, 7/6 and 9/8. Experiment 20380 independently checked the optimizer against full order-and-assignment enumeration on four small cases, and found no violation in 120 random multisets per n=3,4,5 with values up to 10 and up to 11 items.

OP-1360 ising tree energy variance sharp cycle thresholdNot in LeanStatistical Mechanics & Thermodynamics

For n>=3 let G be a finite connected simple n-vertex graph, H_G(s)=-sum_{uv in E(G)} s_u s_v for s in {-1,+1}^n, and let V_G(t) be Var(H_G) in the Gibbs state with t=exp(-2 beta) in (0,1). For every tree T, V_T(t)=4(n-1)t/(1+t)^2. Let t_n be the infimum of t in (0,1) for which V_{C_n}(t)>4(n-1)t/(1+t)^2; equivalently use P_n(t)=(1+t)^n+(1-t)^n and V_{C_n}(t)=4(t d/dt)^2 log P_n(t). Is it true that for every n and every connected n-vertex G, V_G(t)<=4(n-1)t/(1+t)^2 for all 0<t<=t_n? In other words, as temperature rises from zero, is the n-cycle the first graph to exceed the tree fluctuation level?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Energy variance sets the equilibrium heat capacity and therefore the temperature sensitivity of finite spin systems. Trees have a standard independent-edge formula, but adding loops creates correlations and changes fluctuation rankings, so equality of their edge count does not order the variance. A sharp universal low-temperature window would identify the exact onset of a graph-induced enhancement over trees, across all finite interaction networks. The cycle formula alone does not exclude earlier crossings by graphs with several loops or dense subgraphs. It moves Zero-field Ising partition function on a tree, obtained from the AFTD canonicalPartitionFunction and boltzmannDistribution along quantitative: Determine a sharp temperature window in which the tree energy-variance value dominates the value for every connected interaction graph of the same order.. Evidence: Experiment 20416 enumerates connected graph isomorphism classes through n=7, computes the full Ising cut spectrum, and numerically scans for each graph's first crossing; C_n is first at every order. Experiment 20419 generates all 133632 extensions of seven-vertex atlas graphs, covering every eight-vertex graph up to isomorphism, and finds none above the tree value immediately below t_8, whereas the cycle exceeds it immediately above. Experiment 20421 tests over 1000 random or chorded connected candidates per order n=8,...,13 without finding an earlier violation at the sampled point. Experiment 20420 computes n*t_n tending to about 0.63923227, the positive root of 2c=1+exp(-2c). These computations are not a proof of the full interval.

OP-1361 Optimal competitive ratio for deterministic online makespan minimization on four machinesNot in LeanOnline Algorithms

What is the optimal competitive ratio c* for deterministic online makespan minimization on m = 4 identical parallel machines? Specifically, determine the infimum of c >= 1 such that there exists a deterministic online algorithm ALG satisfying ALG(J) <= c * OPT(J) for every finite sequence of positive job sizes J = (p_1, ..., p_n), where ALG assigns each job upon arrival irrevocably to one of the 4 machines, and OPT(J) is the minimum makespan over all 4-machine schedules. The ratio is known to satisfy 14350/8283 <= c* <= 26/15.

Posed in arXiv:2611.10440, Sec. 4 — Lower Bounds Above $\sqrt{3}$ for Online Makespan Minimization on Four Identical Machines

OP-1362 Optimal incremental competitive ratio for makespan minimization on four machinesNot in LeanOnline Algorithms

In the incremental makespan minimization problem on m = 4 identical machines, the entire sequence of jobs J = (p_1, ..., p_n) is known in advance, but the algorithm must place each job p_t irrevocably on one of the 4 machines at step t such that for every prefix t in {1, ..., n}, the makespan of the partial schedule on (p_1, ..., p_t) is at most c * OPT(p_1, ..., p_t). Is the optimal competitive ratio in this incremental model on 4 machines equal to sqrt(3)? Equivalently, does sqrt(3) equal the supremum of lower bounds achievable by linear adversaries on 4 machines?

Posed in arXiv:2611.10440, Sec. 1.4, after Example 1 — Lower Bounds Above $\sqrt{3}$ for Online Makespan Minimization on Four Identical Machines

OP-1363 hard core edge chromatic two sharp variance crossoverNot in LeanStatistical Mechanics & Thermodynamics

For every real fugacity x>0, is the infimum of Var(|I|)/|V(G)| over all nonempty finite simple graphs G with edge chromatic number at most two exactly min{x/(1+2x)^2, x/(1+4x)^(3/2)}? Here I is sampled from independent sets with probability proportional to x^|I|. Equivalently, does every such graph satisfy this bound, with the first term attained by disjoint edges and the second approached by even cycles of increasing length?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The exact fluctuation floor gives the first sharp even edge-chromatic case in Zhang and Xu's 2026 lower-bound program and identifies a nontrivial activity-driven change of extremal structure. Their Corollary 1.6 gives x/(1+3x)^2 for edge chromatic number two, but its equality condition is impossible for this even parameter and supplies neither the sharp gap nor the chain-versus-dimer crossover. Edge chromatic number at most two means the components are paths and even cycles, yet proving a uniform comparison of their variance fractions over all lengths and activities is not implied by the general theorem. Evidence: Exact transfer recurrences evaluated at 60-digit precision on 261 logarithmically spaced activities checked every path through 100 vertices and every even cycle through 100, without a violation. The numerical minimum switches from the long-chain limit at x=2 to isolated edges at x=3; a separate scan includes activities from 0.001 to 1000.

OP-1364 subcubic random greedy variance subdivided caterpillar extremumNot in LeanGraph Theory & Graph Algorithms

For every integer m>=1 let T_m be formed from a path on m core vertices by subdividing each path edge once, then attaching enough new leaves to each core vertex to give it degree three. Thus T_m has 3m+1 vertices. Is T_m the unique maximizer, up to graph isomorphism, of Var(X_T) over every tree T on 3m+1 vertices with maximum degree at most three, where X_T is the size of the maximal independent set produced by inspecting vertices in uniformly random order and accepting a vertex if no earlier accepted neighbor is adjacent to it?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Random sequential adsorption researchers and randomized greedy algorithm analysts seek sharp fluctuations for bounded-degree graphs. Shaikh's exact unrestricted maximizer has degree n-1 and is inadmissible for n>4; the paper's triangle-free bound and previously known O(n) bounded-degree bounds neither distinguish subcubic trees nor identify a sharp extremal family. The competitor class includes all subcubic trees, not just caterpillars, and the question predicts structure for infinitely many orders. It moves Shaikh, arXiv:2609.14826v1, Corollary 2, determines the variance-maximizing tree without a degree restriction; the unique maximizer is a star. along new_setting: Determine the unique variance-maximizing tree at each order 3m+1 when the maximum degree is restricted to three.. Evidence: The first-arrival recurrence checked all subcubic tree isomorphism classes at n=4,7,10,13,16: T_m was the unique numerical maximizer in all 2720 cases combined (2,6,37,265,2410 respectively). Further recurrence checks give its variance through 22 vertices, and branched-core competitors at 16,19,22 vertices are strictly lower. These are numerical tests, not proofs.

OP-1366 four agent bivalued chores efx pareto sharp ratio threeNot in LeanFair Division

For every real r with 1<=r<=3 and every finite set M of indivisible chores, suppose four agents have additive costs c_i(g) in {1,r}. Does there always exist a complete allocation X=(X_1,...,X_4) that is both EFX and Pareto optimal? EFX means c_i(X_i minus {g})<=c_i(X_j) for every i,j and every g in X_i. Pareto optimal means that there is no other complete allocation Y with c_i(Y_i)<=c_i(X_i) for all i and strict inequality for at least one i. If yes, r=3 is the sharp universal boundary, because for every r>3 the explicit four-agent construction of He and Tao has no EFX Pareto-optimal allocation.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Fair allocation researchers seek to know when a robustly fair allocation can also avoid Pareto waste. The endpoint r=2 result does not imply compatibility at other ratios, since both EFX comparisons and Pareto dominance change with r. He and Tao's obstruction applies only above 3; their EFX existence proof does not preserve Pareto optimality. An affirmative answer would establish the first sharp continuous ratio threshold for their four-agent incompatibility phenomenon, including arbitrarily many chores and heterogeneous profiles. It moves Lin, Wu and Zhou (IJCAI 2025) prove EFX plus fractional Pareto optimality for any number of agents at the ratio r=2; He and Tao (arXiv:2606.08872v2, Theorem 2) give four-agent EFX/PO incompatibility for every r>3 and (Theorem 3) EFX existence without efficiency at all ratios. along quantitative: Close the entire previously unaddressed real cost-ratio gap for four agents and identify an exact fairness-efficiency threshold.. Evidence: Experiment 20785 exhausts every four-agent cost profile up to relabeling of agents and chores for 5, 6, and 7 chores, at r=3/2, 5/2, and 3: 1,053, 3,250, and 9,343 distinct profile orbits per ratio, with an EFX PO allocation in each. Experiment 20774 samples 7,640 heterogeneous profiles with 7-10 chores at r=2.1, 2.5, 2.9, 3, with no failure; 20778 tests 12,500 mutated versions of the He–Tao obstruction at five ratios in [1.1,3]. Experiment 20770 enumerates that construction's 8,000 type-count allocations and finds compatibility at r=3 and incompatibility at r=3.1. Experiment 20787 finds that minimizing total cost cannot replace the Pareto requirement, even in small tested instances. These finite tests are not a proof.

OP-1367 tree graph state subsystem purity path star extremaNot in LeanQuantum Mechanics

For any n>=4 and any n-vertex tree T, write rho_T(S)=rank over F_2 of the adjacency submatrix with rows S and columns V(T) minus S, and define Q_j(T)=sum over all j-element vertex subsets S of 2^(j-rho_T(S)). Is it true for every 0<=j<=n that Q_j(P_n)<=Q_j(T)<=Q_j(K_{1,n-1})? Is equality of the entire vector (Q_0,...,Q_n) with that of P_n, respectively K_{1,n-1}, possible only when T is isomorphic to that path, respectively that star?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

For the graph state |T>, 2^(-j) Q_j(T) is the sum of reduced-state purities over j-qubit subsystems. This simultaneously predicts the tree geometries with extremal average entanglement at every subsystem size and, via the stabilizer enumerator, sharp upper and lower fidelity under every independent depolarizing channel with nonnegative Pauli attenuation. The star upper bound follows immediately because every nontrivial cut of a connected graph has positive rank; the novel substantive side is the lower bound by the path, uniformly in j. The prior edge-percolation conjecture treats independent edges and does not imply the fixed-cardinality cut distribution, whose edge indicators are dependent. Indeed the stronger stochastic order of fixed-size cut ranks is already false on ten vertices; this makes the specified inverse-rank moment a materially different target. It moves Vallée et al. (2026) compute graph-state stabilizer weight enumerator generating functions for individual path and star families; Numajiri et al. (2026) map depolarizing fidelity to a classical spin partition function. The Conjecture Engine, Part XXVIII, Conjecture 402, asks an unconditioned stochastic extremal question for the maximum matching number after independent edge percolation on a tree. along new_setting: Compare all tree geometries at every fixed subsystem cardinality, rather than evaluating individual graph families or the unconditioned independent-edge percolation law.. Evidence: Experiment 20791 checked the coefficientwise bounds and equality-vector uniqueness exactly on all 5,444 unlabeled trees of orders 4 through 14. Experiment 20794 independently reconstructs Q_j using F_2 cut ranks through order 10 and verifies its relation to the transformed stabilizer weight enumerator. Experiment 20796 checks a separate tree dynamic program against direct stabilizer enumeration through 10 vertices and tests 1,800 random trees up to 100 vertices. Experiment 20793 independently simulates four noisy graph states by density matrices, confirming the fidelity mapping. Experiments 20792 and 20800 show that the path lower bound cannot be extended unchanged to all connected graphs and that a fixed-size stochastic-rank strengthening fails on a ten-vertex tree.

OP-1368 tree graph state joint multientropy purity exponential fibersNot in LeanQuantum Mechanics

For an n-vertex tree T let c_s(T) be the number of connected induced vertex subsets of size s, and let Q_j(T)=sum over j-element vertex subsets S of 2^(j-rank_F2 A_T[S,V(T) minus S]). Let F(n) be the maximum size of a family of pairwise nonisomorphic n-vertex trees having the same entire vectors (c_1,...,c_n) and (Q_0,...,Q_n). Is F(19k) at least 2^(k-1) for every integer k>=2? Equivalently, can one construct exponentially many local-Clifford-inequivalent tree graph states that all have identical complete integer-Renyi multi-entropy spectra and identical average subsystem purity at every subsystem size?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Quantum-information researchers use multipartite multi-entropy and subsystem purities to characterize graph states. A positive answer shows that even their combined data can hide an exponential number of inequivalent tree-state geometries, placing a quantitative limit on reconstruction from these summaries. For trees, nonisomorphism implies local-Clifford inequivalence, and the cut-rank formula identifies 2^(-j) Q_j with the sum of j-party reduced-state purities. The two cited papers do not compare the joint fibers, and the original paper does not pose this question. It moves Czech et al. 2026, Theorem 3.1 and Section 3.2, give the exact complete integer-Renyi multi-entropy spectrum in terms of connected-subtree counts and exhibit a ten-qubit collision. Valle et al. 2026 relate graph-state stabilizer weight enumerators to subsystem entanglement and depolarizing fidelity. AFTD OP-828 asks for a gap in tripartite information inside a connected-subtree spectral collision family, but does not ask for equality of fixed-size purity profiles or exponentially large joint fibers. along new_setting: Require simultaneous equality of both complete invariant vectors and an exponentially growing number of pairwise inequivalent tree states, rather than one equal-spectrum pair or a gap for a different observable.. Evidence: Experiment 20868 independently enumerates all vertex subsets of the first 12-vertex joint collision. Experiment 20870 finds no joint collision through n=11 and twelve two-element joint fibers at n=17. Experiment 20876 identifies nonisomorphic 18-vertex rooted gadgets with equal transfer signatures for both invariants, and experiment 20878 independently enumerates all 2^18 vertex subsets for both seed trees. Experiment 20877 builds all binary gadget chains for k=2,...,7, finding a single joint signature each time; experiment 20880 independently checks the predicted nonisomorphism classes by graph isomorphism up to reversal. The k=1 chain collapses to one isomorphism class and is deliberately excluded.

OP-1369 Replacement Conjecture for Weakly Incomparable Uncomplemented FamiliesNot in LeanCombinatorics for TCS

Let $n \ge 2$ and $t \ge 2$ be integers. A family $\mathcal{A} \subseteq 2^{[n]}$ is uncomplemented if for every $X \in \mathcal{A}$, $[n] \setminus X \notin \mathcal{A}$. Families $\mathcal{A}_1, \dots, \mathcal{A}_t \subseteq 2^{[n]}$ are weakly incomparable if for all distinct $i, j \in \{1, \dots, t\}$, no set in $\mathcal{A}_i$ properly contains any set in $\mathcal{A}_j$ (that is, for all $A \in \mathcal{A}_i$ and $B \in \mathcal{A}_j$, $A \not\subset B$). Is it true that for every collection of uncomplemented, weakly incomparable families $\mathcal{A}_1, \dots, \mathcal{A}_t \subseteq 2^{[n]}$, $$\sum_{i=1}^t |\mathcal{A}_i| \le \max_{1 \le h \le n-1} \left\{ 2^{n-1} - \sum_{i=0}^{h-1} \binom{n-1}{i} + (t-1)\binom{n-1}{h-1}, \; t\binom{n}{\lfloor n/2 \rfloor + 1} \right\}?$$

Posed in arXiv:2611.12199, Conjecture 1.11 — Hilton's Conjecture on Uncomplemented Incomparable Families

What is known

The paper disproves the earlier Goldwasser--Hilton--Zheng conjecture for all $t \ge 3$, establishes this replacement upper bound for large $t$ (satisfying $t \binom{n}{\lfloor n/2 \rfloor + 1} \ge 2^n - 2$), but leaves the small $t$ regime (e.g. $t=3$) open.

OP-1374 Exact external information complexity of the two-overlapping-rectangles functionNot in LeanCommunication Complexity

Let $F: \{1, 2, 3\}^2 \to \{0, 1\}$ be the two-overlapping-rectangles Boolean function, defined by $F(1,1) = F(3,3) = 0$ and $F(x,y) = 1$ for all other $(x,y) \in \{1,2,3\}^2$. Let $B(F)$ denote the prior-free zero-error private-coin external information complexity of $F$ under all-input correctness: \[ B(F) = \sup_{\mu} \inf_{\Pi \in \mathcal{P}_0^{\mathrm{rnd}}(F)} I_\mu(XY : \Pi(XY)), \] where the supremum is over all probability distributions $\mu$ on $\{1, 2, 3\}^2$, $\mathcal{P}_0^{\mathrm{rnd}}(F)$ is the class of private-coin protocols that terminate almost surely and output $F(x,y)$ on all inputs $(x,y)$, and $\Pi(XY)$ is the transmitted transcript. What is the exact value of $B(F)$?

Posed in arXiv:2611.11488, Sec. 9 — A note on exact external information complexity

What is known

The paper proves that $2.1212661667 \le B(F) < 2.130998318$, leaving a gap of less than 0.009733 bits, and leaves finding the exact value as the principal open problem.

OP-1376 Unrestricted Extremality of Bipartite Clique Unions for Degree at Least Three in Graph Coupon CollectionNot in LeanGraph Theory & Graph Algorithms

Let d ≥ 3 be an integer. For all sufficiently large integers n divisible by 2d, is the disjoint union (n/(2d)) K_{d,d} the unique graph maximizing the expected coupon-collector completion time cc(G) among all finite simple d-regular graphs G on n vertices?

Proposed here, building on arXiv:2611.11345, Theorem 4.4 — Extremal graphs for Alon's graph coupon-collector conjecture; the paper does not ask it

What is known

Theorem 4.4 proves that for any fixed d ≥ 2 and L ≥ 2d, the disjoint union of complete bipartite graphs (n/(2d))K_{d,d} uniquely maximizes the expected cover time cc(G) among all d-regular graphs on n vertices whose connected components each have order at most L, for all sufficiently large n divisible by 2d. For d=2, Theorem 1.1 characterizes the extremal graphs at all orders without any component size restriction. For d ≥ 3, the paper leaves open whether the component-size restriction L in Theorem 4.4 can be dropped, namely whether (n/(2d)) K_{d,d} remains the unique maximizer among all simple d-regular graphs on n vertices for large n.

OP-1377 Order Bound on Expected Coupon-Collection Time for Regular GraphsNot in LeanGraph Theory & Graph Algorithms

Does there exist an absolute constant C > 0 such that for every integer d ≥ 1 and every finite simple d-regular graph G on n vertices, the expected coupon-collector completion time satisfies cc(G) ≤ C (n + (n log n)/d)?

Proposed here, building on arXiv:2611.11345, Proposition 5.2 — Extremal graphs for Alon's graph coupon-collector conjecture; the paper does not ask it

What is known

A 2008 conjecture proposed an additive upper bound cc(G) ≤ n + O((n log n)/d) for d-regular graphs on n vertices. Proposition 5.2 disproves this additive bound by showing that the disjoint union of two cliques 2K_m satisfies cc(2K_m) ≥ 2m + √m for degree d = m-1, exceeding n = 2m by √m while (n log n)/d = O(log m). The paper observes that the weaker multiplicative order estimate cc(G) = O(n + (n log n)/d) remains compatible with this family since 2m + √m = O(n), but leaves unsettled whether this order bound holds universally for all regular graphs.

OP-1378 Order-Wise Tightness of the Linear Lower Bound for Splitting SystemsNot in LeanCombinatorics for TCS

Let n, t be positive integers with t even and t ≤ n/2. An (n,t)-splitting system on an n-element set X is a family 𝔹 ⊆ 2^X such that for every Y ⊆ X with |Y| = t, there exists B ∈ 𝔹 such that |Y ∩ B| = t/2. Let m(n,t) denote the minimum size of an (n,t)-splitting system. Does there exist an absolute constant C > 0 such that m(n,t) ≤ C t log n for all even t ≤ n/2? More strongly, is m(n,t) of order Θ(t) when the ratio n/t is bounded?

Posed in arXiv:2611.11126, Sec. 4 — Lower bound on the size of splitting systems

OP-1380 Brualdi-Quinn conjecture on strong chromatic index of bipartite graphsNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite simple bipartite graph with bipartition $(A, B)$. Let $\Delta_A = \max_{x \in A} d(x)$ and $\Delta_B = \max_{b \in B} d(b)$. Is the strong chromatic index $\chi'_s(G)$ at most $\Delta_A \Delta_B$? That is, can the edges of $G$ be partitioned into at most $\Delta_A \Delta_B$ induced matchings?

Posed in arXiv:2611.10883, Conjecture 2 — The Brualdi--Quinn conjecture on strong edge-coloring holds fractionally and asymptotically

What is known

The paper proves that the conjecture holds fractionally (Theorem 1.1) and asymptotically (Theorem 1.2), but leaves open whether the exact bound χ'_s(G) ≤ Δ_A Δ_B holds for all finite bipartite graphs.

OP-1382 Minimum number of candidates for non-median sequential entry equilibriumNot in LeanSocial Choice Theory

In the sequential candidate entry game with n potential candidates, each candidate sequentially chooses an electoral position on the unit interval [0,1] or stays out (action OUT), observing all prior choices. Voters have ideal positions uniformly distributed on [0,1] and vote for a nearest candidate, with candidates at the same position dividing its vote cell equally. Candidates with the maximal vote share divide a unit payoff equally (payoff 1/r if r winners), losing entrants receive -1, and choosing OUT yields 0. It was conjectured in the mid-1980s that for every n ≥ 2, the unique subgame-perfect Nash equilibrium (SPNE) outcome has only players 1 and n entering at the median 1/2, while all intervening players stay out: c = (1/2, OUT, ..., OUT, 1/2). Since arXiv:2611.10591 disproves this for n = 12, what is the minimum number of potential candidates n ≥ 3 for which there exists a pure SPNE whose outcome differs from c? In particular, does any n ∈ {3, 4, ..., 11} admit a pure SPNE outcome other than c?

Posed in arXiv:2611.10591, Sec. 9 — Sequential Candidate Entry: A Counterexample to the Osborne--Kats Conjecture

OP-1383 Coexistence of canonical median outcome with non-canonical equilibria for 12 candidatesNot in LeanSocial Choice Theory

In the 12-player sequential candidate entry game on [0,1] with a uniformly distributed electorate (where candidates sequentially choose a platform in [0,1] or stay out, candidates tied for the largest vote share divide payoff 1 equally, losing entrants receive -1, and OUT yields 0), does there exist a pure-strategy subgame-perfect Nash equilibrium whose outcome on the equilibrium path is the canonical median outcome c = (1/2, OUT, OUT, OUT, OUT, OUT, OUT, OUT, OUT, OUT, OUT, 1/2)? While arXiv:2611.10591 constructs an SPNE with a non-canonical outcome (by showing that player 2 can secure payoff at least 1/10 after the entry sequence (1/2, 1/10)), it leaves open whether c can coexist as an equilibrium outcome supported by alternative off-path punishments.

Posed in arXiv:2611.10591, after Thm 1.1 — Sequential Candidate Entry: A Counterexample to the Osborne--Kats Conjecture

OP-1384 Finite-Memory Determinacy of Prioritized Borel Tree GamesNot in LeanAutomata & Formal Languages

Let $Q$ be a finite set of states and let $k \ge 1$ be an integer. Consider a two-player infinite-duration game on an arena whose positions are a subset of $2^* \times Q$, where every edge from $(v, q)$ leads to $(w, p)$ with $w \in \{v0, v1\}$, and edges carry priority labels in $\{1, \dots, k\}$. The winning condition is given by $k$ Borel subsets $W_1, \dots, W_k \subseteq 2^\omega$: along an infinite play tracing a branch $b \in 2^\omega$, Eve wins if and only if $b \in W_i$, where $i \in \{1, \dots, k\}$ is the maximal priority occurring infinitely often on the edges of the play. Does one of the two players always possess a winning strategy with finite memory? Furthermore, does there exist an upper bound on the required memory size depending only on $|Q|$ and $k$?

Posed in arXiv:2611.10136, Conjecture 19 — Automata for MSO over Infinite Trees with Quantification over Borel Sets of Branches

What is known

This conjecture is the central open problem of the paper; by Theorem 15, it implies the decidability of the Borel MSO theory of the complete binary tree with branch quantification (Shelah's Conjecture A).

OP-1386 Representability of Seven-Entropic Matroids over F7Not in LeanCombinatorics for TCS

Let M = (E, r) be a finite matroid. We say M is 7-entropic if there exists a discrete random vector (X_e)_{e in E} with coordinates taking values in a common 7-element alphabet such that for every subset A ⊆ E, the joint Shannon entropy satisfies H(X_A) = r(A) log 7 (or equivalently, M admits a partition representation of degree 7). Is every 7-entropic matroid representable over the finite field F_7?

Posed in arXiv:2611.11970, Sec. 6 — Five-Entropic Matroids Are Quinary

OP-1387 Folded Representability of All Entropic MatroidsNot in LeanCombinatorics for TCS

Let M = (E, r) be a finite matroid. We say M is t-folded representable over a finite field F_s (for an integer t ≥ 1) if there exists a subspace V of (F_s^t)^E such that for every subset A ⊆ E, dim(proj_A(V)) = t * r(A). A matroid M is entropic if there exist an integer q ≥ 2 and a random vector (X_e)_{e in E} taking values in an alphabet of size q such that H(X_A) = r(A) log q for all A ⊆ E. Is every entropic matroid t-folded representable over some finite field for some positive integer t?

Posed in arXiv:2611.11970, Sec. 1.1 — Five-Entropic Matroids Are Quinary

OP-1388 Finiteness of the Supremum of Minimum Eisenstein Isoperimetric Ratio for Primitive TriangulationsNot in LeanCombinatorics for TCS

Let E = {a + b*alpha : a, b in Z} with alpha = (1 + i*sqrt(3))/2 be the ring of Eisenstein integers. A nonzero Eisenstein integer beta = a + b*alpha is primitive if gcd(a, b) = 1. For any nonzero beta in E, let T(beta) be the sphere triangulation with degree sequence 6, ..., 6, 2, 2, 2 obtained as the quotient of the regular triangular lattice of the plane by the group G_beta generated by order-3 rotations about points of beta*E. A good coloring of T(beta) is a black-and-white coloring of its faces such that at every vertex v, the number of incident black faces minus the number of incident white faces is divisible by 3. For a good coloring C with fold count f(C) (the number of edges separating faces of different colors) on T(beta) with F = 2(a^2 + ab + b^2) faces, let eta(C) = f(C)^2 / F. Let eta_min(beta) be the minimum of eta(C) over all good colorings C of T(beta). Is the supremum of eta_min(beta) over all primitive Eisenstein integers beta finite?

Posed in arXiv:2611.12065, Sec. 6, first question — Good colorings of doubled triangles and a conjecture of Schwartz

OP-1389 Uniqueness of Minimum-Fold Good Coloring on Doubled TrianglesNot in LeanCombinatorics for TCS

Let n >= 1 be a positive integer, and let T(n) be the doubled equilateral triangle of side n, formed by gluing two copies of an equilateral triangle subdivided into n^2 unit equilateral triangles along their boundary. Let B_n be the two-sided coloring that colors all faces of the front copy black and all faces of the back copy white, achieving fold count f(B_n) = 3n. Let Aut(T(n)) be the symmetry group of T(n) generated by the dihedral symmetries of the triangle and the front-back reflection. Up to the action of Aut(T(n)) and exchanging black and white, is B_n the unique good coloring of T(n) with fold count equal to 3n?

Posed in arXiv:2611.12065, Sec. 6, second question — Good colorings of doubled triangles and a conjecture of Schwartz

OP-1390 Bound on Boolean function degree by product of non-deterministic degreesNot in LeanCircuit Complexity & Lower Bounds

Does there exist an absolute constant $C > 0$ such that for all integers $n \ge 1$ and every Boolean function $f : \{0,1\}^n \to \{0,1\}$, the multilinear polynomial degree $\deg(f)$ satisfies $\deg(f) \le C \cdot \mathsf{ndeg}(f) \cdot \mathsf{ndeg}(\neg f)$, where $\mathsf{ndeg}(f)$ is the non-deterministic degree of $f$ (the minimal degree of a polynomial $p \in \mathbb{R}[x_1, \dots, x_n]$ such that for all $x \in \{0,1\}^n$, $p(x) \ne 0 \iff f(x) = 1$) and $\neg f$ is the Boolean negation of $f$?

Posed in arXiv:2611.11966, Sec. 5, paragraph 3 — On Non-Deterministic Representation of Boolean Functions

OP-1393 Exact Sample Size Exponent for Overcomplete ICA Rotation EstimationNot in LeanMinimax Theory & Information-Theoretic Lower Bounds

In two-dimensional overcomplete independent component analysis with $q$ equally spaced mixing columns $a_j = \sqrt{2/q} u(\theta + j\pi/q)$ ($j = 0, \dots, q-1$) and i.i.d. Gram-Charlier sources with density $\phi_a(s) = \phi(s)[1 + a(s^4 - 6s^2 + 3)/24]$ for known excess kurtosis $a \in (0, 4]$, let $n^*(q)$ denote the minimax sample size required to estimate $\theta \pmod{\pi/q}$ within angular error $\pi/(8q)$ with success probability at least $3/4$. Does the limit $\lim_{q \to \infty} q^{-1} \log n^*(q)$ exist, and does it equal the complex-frequency rate constant $\Gamma_a = \inf_{v, \vartheta > 0, |\xi| < \pi/(4q)} \Gamma_a(v, \xi, \vartheta)$?

Posed in arXiv:2611.11852, Appendix A.7, Conjecture — Identifiable but Hard to Estimate: Rotation in Equally Spaced Overcomplete ICA

What is known

The paper proves that single-observation total variation decays at exact rate kappa_a, which implies that the sample size exponent liminf and limsup lie in [kappa_a, min(2*kappa_a, Gamma_a)], but does not settle whether the limit exists or equals Gamma_a.

OP-1395 Deterministic query complexity of envy-free chore divisionNot in LeanFair Division

Let $n \ge 3$. Suppose $n$ agents have private chore costs given by finite nonnegative nonatomic Borel measures $c_1, \dots, c_n$ on an interval $I = [0, 1]$. In the standard Robertson–Webb (Eval/Cut) query model, does there exist a deterministic protocol that always computes a complete exactly envy-free allocation (a partition of $I$ into finite unions of intervals $A_1, \dots, A_n$ such that $c_i(A_i) \le c_i(A_j)$ for all $i, j \in \{1, \dots, n\}$) using at most $2^{O(n)}$ queries, or more specifically $n^{O(1)} 2^n$ queries?

Posed in arXiv:2611.11424, Sec. 2.1, after Theorem 2.1 — The Query Complexity of Envy-Free Division: Cake, Chores, and Mixed Resources

OP-1397 Adjacency Labeling of Size log n + O(1) for Planar GraphsNot in LeanGraph Theory & Graph Algorithms

Does there exist an absolute constant C > 0 such that for every integer n ≥ 1, the family of n-vertex planar simple graphs admits an adjacency labeling scheme of size at most log₂ n + C? Equivalently, does there exist an absolute constant c > 0 such that for every integer n ≥ 1, there exists an undirected graph on at most c · n vertices that contains every n-vertex planar graph as an induced subgraph?

Posed in arXiv:2611.11444, Sec. 1.2, after Theorem 1.3 — Tight B-Trees for Adjacency Labeling

OP-1401 Unimodality of Zero Forcing Polynomials for Almost All GraphsNot in LeanGraph Theory & Graph Algorithms

For an integer $n \ge 1$, let $\mathcal{G}_n$ denote the set of all simple graphs on vertex set $\{1, \dots, n\}$. For $G \in \mathcal{G}_n$, let $\mathcal{Z}(G; x) = \sum_{i=1}^n z(G, i) x^i$ be the zero forcing polynomial of $G$, where $z(G, i)$ is the number of zero forcing sets of $G$ of cardinality $i$. As $n \to \infty$, does the proportion of graphs $G \in \mathcal{G}_n$ whose zero forcing polynomial $\mathcal{Z}(G; x)$ is unimodal converge to 1, i.e., does $\lim_{n \to \infty} \frac{|\{G \in \mathcal{G}_n \mid \mathcal{Z}(G; x) \text{ is unimodal}\}|}{|\mathcal{G}_n|} = 1$?

Posed in arXiv:2611.11352, Sec. 3, Question 3 — Zero forcing is not unimodal

OP-1403 Existence of a Perfect Dominating Set in the Ten-Token Graph of the Nineteen-StarNot in LeanGraph Theory & Graph Algorithms

Does the 10-token graph of the star $S_{19}$, $F_{10}(S_{19})$, possess a perfect dominating set (a subset $D$ of vertices whose closed neighborhoods partition $V(F_{10}(S_{19}))$)? Equivalently, does there exist a Steiner system $S(8, 9, 19)$, defined as a family $\mathcal{B}$ of 9-element subsets of a 19-element set such that every 8-element subset is contained in exactly one block $B \in \mathcal{B}$?

Posed in arXiv:2611.11191, Problem 7.5 — Token graphs of stars

OP-1405 Chromatic Ramsey Number of Cycles with Four or More ColoursNot in LeanCombinatorics for TCS

Let $t \ge 4$ and $\ell \ge 3$ be integers. For a simple graph $H$, let $R^t_{t-1}(H)$ denote the $(t-1)$-chromatic Ramsey number of $H$, defined as the least integer $n$ such that every edge-colouring $\phi \colon E(K_n) \to \{1, \dots, t\}$ contains a copy of $H$ whose edges use at most $t-1$ colours (a colour-avoiding copy of $H$). What is the exact value of $R^t_{t-1}(C_\ell)$ for the cycle $C_\ell$ of length $\ell$ for each $t \ge 4$ and $\ell \ge 3$? In particular, does there exist for each $t \ge 4$ a constant $c_t$ such that $R^t_{t-1}(C_\ell) = \ell + \lfloor(\ell + c_t)/(2^t - 2)\rfloor$ for all sufficiently large $\ell$?

Posed in arXiv:2611.11187, Sec. 1, after Thm 1.1 — The $(t-1)$-chromatic Ramsey number of cycles for three colours

OP-1407 Parkin–Shanks Conjecture on Partition Parity DensityNot in LeanElementary Number Theory

Let $p(n)$ denote the number of integer partitions of $n$, with $p(0) = 1$. For any $X > 0$, let $N_{\mathrm{odd}}(X) = \#\{0 \leq n < X : p(n) \equiv 1 \pmod 2\}$ and $N_{\mathrm{even}}(X) = \#\{0 \leq n < X : p(n) \equiv 0 \pmod 2\}$. Then $\lim_{X \to \infty} \frac{N_{\mathrm{odd}}(X)}{X} = \frac{1}{2}$ and $\lim_{X \to \infty} \frac{N_{\mathrm{even}}(X)}{X} = \frac{1}{2}$.

Posed in arXiv:2611.10899, Sec. 1, p. 2 — New lower bounds for even and odd values of the partition function

What is known

Posed by Parkin and Shanks (1967). Mirsky gave log log X, Nicolas-Ruzsa-Sarkozy gave X^{1/2 - o(1)}, and this paper achieves X^{3/4 - o(1)}, leaving the linear density conjectured by Parkin and Shanks open.

OP-1408 Parity of the Partition Function on Polynomial SequencesNot in LeanElementary Number Theory

Let $g(x) \in \mathbb{Z}[x]$ be a non-constant polynomial that is eventually positive on the integers. For each parity $r \in \{0, 1\}$, there exist infinitely many positive integers $n$ such that $p(g(n)) \equiv r \pmod 2$, where $p(m)$ is the partition function of $m$.

Posed in arXiv:2611.10899, Sec. 1, p. 3 — New lower bounds for even and odd values of the partition function

What is known

Generalizes Subbarao's conjecture (settled by Ono for even values and Radu for odd values) from arithmetic progressions to arbitrary integer polynomials. Settled for certain quadratic families by Ono and Swaminathan (2026), but open in general.

OP-1410 Tuza's conjecture for graphs with edge codegrees at most four and short four-triangle componentsNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite simple graph such that each edge belongs to at most 4 triangles, and every connected component of the spanning subgraph formed by edges belonging to exactly 4 triangles has at most 2 edges (that is, each component is an isolated vertex, a single edge, or a path of length two). Does $G$ satisfy Tuza's conjecture $\tau(G) \le 2\nu(G)$, where $\nu(G)$ is the maximum size of a family of pairwise edge-disjoint triangles and $\tau(G)$ is the minimum size of a set of edges meeting every triangle?

Posed in arXiv:2611.11128, Question 6.2 — Triangle-overlap cores and density bounds for Tuza's conjecture

OP-1412 Minimum order of a 4-chromatic unit-distance graph of girth 5 in the planeNot in LeanGraph Theory & Graph Algorithms

What is the minimum number of vertices of a 4-chromatic unit-distance graph in the Euclidean plane ℝ² with girth at least 5? Specifically, does there exist an injective mapping p : V → ℝ² from the vertices of a finite simple graph G such that for all distinct u, v ∈ V, ‖p(u) - p(v)‖ = 1 ↔ uv ∈ E(G), with chromatic number χ(G) = 4, girth at least 5, and |V| < 43?

Posed in arXiv:2611.10735, Sec. 4 — A 43-vertex 4-chromatic unit-distance graph in the plane with girth 5

OP-1413 Existence of APN Permutations in Even Dimension at Least EightNot in LeanFoundations of Cryptography

For an even integer $n \ge 8$, does there exist an almost perfect nonlinear (APN) permutation of $\mathbb{F}_2^n$? That is, does there exist a bijection $F: \mathbb{F}_2^n \to \mathbb{F}_2^n$ such that for every non-zero $a \in \mathbb{F}_2^n$ and every $b \in \mathbb{F}_2^n$, the equation $F(x + a) - F(x) = b$ has at most two solutions in $\mathbb{F}_2^n$?

Posed in arXiv:2611.10269, Sec. 1 — Testing CCZ-equivalence to permutations via projections of Walsh zero spaces, with applications to APN functions

OP-1414 Walsh Zero Spaces and Equivalence to Permutations of the Cubic Trace FamilyNot in LeanFoundations of Cryptography

Let $m \ge 5$ be an odd integer, $n = 2m$, $q = 2^m$, and let $C = \{x^3 : x \in \mathbb{F}_{2^n}^*\}$ be the subgroup of cubes in $\mathbb{F}_{2^n}^*$. For $a \in \mathbb{F}_{2^n}^*$, let $F_a: \mathbb{F}_{2^n} \to \mathbb{F}_{2^n}$ be defined by $F_a(x) = x^3 + a^{-1} \mathrm{Tr}(a^3 x^9)$, where $\mathrm{Tr}: \mathbb{F}_{2^n} \to \mathbb{F}_2$ is the absolute field trace. Let $\mathcal{N}_{F_a}$ denote the set of $\beta \in \mathbb{F}_{2^n}^*$ such that the Boolean component function $x \mapsto \mathrm{Tr}(\beta F_a(x))$ is non-bent. Is it true that: (1) if $3 \nmid m$, then $\mathcal{N}_{F_a} \cup \{0\}$ contains exactly one $m$-dimensional $\mathbb{F}_2$-subspace, which is a line $c\mathbb{F}_q$ of the Desarguesian spread $\{c\mathbb{F}_q : c \in \mathbb{F}_{2^n}^*\}$ and equals $a\mathbb{F}_q$ if and only if $a \in C$; and (2) if $3 \mid m$, then $\mathcal{N}_{F_a} \cup \{0\}$ contains three such $m$-dimensional subspaces if $a \in C$ and none if $a \notin C$, and none of these subspaces is the projection to the second coordinate of a Walsh zero space of $F_a$? In particular, is $F_a$ never CCZ-equivalent to a permutation for any even $n$?

Posed in arXiv:2611.10269, Conjecture 14 — Testing CCZ-equivalence to permutations via projections of Walsh zero spaces, with applications to APN functions

OP-1418 Uniform-gains characterization by efficiency, symmetry, and strategy-proofness for large populationsNot in LeanFair Division

Let $n \ge 7$ be an integer, $\beta \in \mathbb{R}$, and $H_\beta = \{x \in \mathbb{R}^n : \sum_{i=1}^n x_i = \beta\}$. Let $X \subseteq H_\beta$ be a nonempty, compact, convex set invariant under every coordinate permutation, with common coordinate projection interval $I \subseteq \mathbb{R}$. Let $\mathcal{S}(I)$ be the domain of continuous, strictly single-peaked preferences on $I$, and let $U : \mathcal{S}(I)^n \to X$ denote the uniform-gains allocation rule, which selects from $X \cap \prod_{i=1}^n [\min(\beta/n, p_i), \max(\beta/n, p_i)]$ the allocation whose coordinate gain vector $(|x_i - \beta/n|)_{i=1}^n$ is leximin-maximal. If an allocation rule $F : \mathcal{S}(I)^n \to X$ is Pareto efficient, symmetric under permutations of agents, and individually strategy-proof, must $F = U$?

Posed in arXiv:2611.12151, Sec. 6 — Individual incentives and uniform gains under symmetric constraints

What is known

Theorem 1 characterizes uniform gains for all n ≥ 2 under efficiency, symmetry, individual strategy-proofness, and own-coordinate peak-onlyness (OCPO). Theorem 2 proves that for 2 ≤ n ≤ 6 on compact feasible sets, OCPO is redundant (efficiency, symmetry, and individual strategy-proofness alone suffice). The author explicitly poses whether OCPO can be removed for larger populations n ≥ 7 on arbitrary symmetric convex feasible sets.

OP-1420 Existence of Double Optimal Uniform Wide-Gap Frequency Hopping SequencesNot in LeanInformation Theory & Coding

Let $k \ge 2$ and $s \ge 2$ be positive integers, and let $F = \{0, 1, \dots, s-1\}$. A sequence $X = (x_0, \dots, x_{ks-1}) \in F^{ks}$ is a uniform wide-gap frequency hopping sequence (WGFHS) with parameters $(ks, s, k; e)$ if each symbol $f \in F$ appears exactly $k$ times in $X$ and adjacent elements satisfy $|x_{(j+1) \bmod ks} - x_j| \ge e + 1$ for all $0 \le j < ks$, with $e > 0$. It is optimal if its maximal periodic Hamming autocorrelation satisfies $H(X) = \max_{1 \le \tau < ks} |\{0 \le j < ks : x_j = x_{(j+\tau) \bmod ks}\}| = k$. It is double optimal if in addition $e$ achieves the upper bound $e = \lfloor(s-1)/2\rfloor - 2$ when $k \ge 3$ and $s$ is odd, and $e = \lfloor(s-1)/2\rfloor - 1$ otherwise. Does a double optimal uniform WGFHS with parameters $(ks, s, k; e)$ exist if and only if $(k = 2 \text{ and } s \ge 5)$ or $(k \ge 3 \text{ and } s \ge 6)$? In particular, does one exist for every $k \ge 4$ and $s \ge 6$?

Posed in arXiv:2611.11747, Conjecture 4.2 — Bounds and Constructions for Optimal Wide-Gap Frequency Hopping Sequences

What is known

The paper settles k = 2 and k = 3 completely, and demonstrates sporadic examples for k = 4 and k = 5, but the existence for general k >= 4 remains open.

OP-1422 Super-Fibonacci and Monotonic Growth of Numerical Semigroups by GenusNot in LeanCombinatorics for TCS

Let n_g denote the number of numerical semigroups of genus g (additive submonoids S of ℕ such that ℕ \ S has cardinality g). Is it true that n_g ≤ n_{g+1} for all integers g ≥ 0 (monotonic growth)? Furthermore, is it true that n_g ≥ n_{g-1} + n_{g-2} for all integers g ≥ 2 (super-Fibonacci growth)?

Posed in arXiv:2611.11559, Abstract — Multiparameter counting of numerical semigroups by Frobenius number, genus, and multiplicity

What is known

The paper frames its multiparameter counting formula and recurrences around understanding the asymptotic and exact Fibonacci-like and doubling behaviors of numerical semigroup counts, pointing to the open monotonic and super-Fibonacci growth conjectures.

OP-1424 Unimodality of tau-polynomials and augmented tau-polynomialsNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite simple graph on $n$ vertices with chromatic polynomial $P(G, x) = \sum_{j=0}^n (-1)^{n-j} c_j(G) x^{\langle j \rangle}$ expanded in the rising factorial basis $x^{\langle j \rangle} = \prod_{i=0}^{j-1}(x+i)$, with $c_0(G)=0$. The $\tau$-polynomial and augmented $\tau$-polynomial are defined by $\tau(G, x) = \sum_{j=1}^n c_j(G) x^j$ and $\overline{\tau}(G, x) = \sum_{j=1}^n j! c_j(G) x^j$. Is the coefficient sequence $(c_1(G), c_2(G), \dots, c_n(G))$ unimodal for every simple graph $G$? In addition, is the sequence $(1! c_1(G), 2! c_2(G), \dots, n! c_n(G))$ of coefficients of $\overline{\tau}(G, x)$ unimodal for every simple graph $G$?

Posed in arXiv:2611.11056, Sec. 1, after Corollary 6 — Non-log-concave $\tau$-polynomials of regular graphs

OP-1426 Exact geometric reduction of weighted Kemeny aggregation to sparse observation graphsNot in LeanAlgorithm Design & Analysis

Let G = (V, E) be an undirected graph on n vertices. Suppose pairwise log-odds values W_ij = log(p_ij / p_ji) are given for all edges {i, j} ∈ E, and W admits a rank-two factorization W_ij = det(h_i, h_j) for vectors h_i ∈ ℝ². The sparse weighted Kemeny ranking objective is to find a permutation π ∈ S_n maximizing ∑_{{i,j} ∈ E, π⁻¹(i) < π⁻¹(j)} W_ij. For which non-trivial sparse graph families G (such as trees, paths, cycles, or complete bipartite graphs K_{m,n}) does this problem admit an exact geometric reduction to polygon-area maximization or another polynomial-time algorithm?

Posed in arXiv:2611.10538, Sec. 8, para. 1 — Close and Sort: Exact Maximum-Likelihood Aggregation of Cyclic Rank-Two Preferences

OP-1431 tree zero forcing ultra log concavityNot in LeanGraph Theory & Graph Algorithms

For every finite tree T on n >= 2 vertices, let z_k be the number of k-vertex zero forcing sets: starting with those vertices blue, repeatedly allow any blue vertex with exactly one white neighbor to force that neighbor blue. Is the normalized sequence z_k / binom(n,k), k=0,...,n, log-concave? Equivalently, does z_k^2 binom(n,k-1) binom(n,k+1) >= z_{k-1} z_{k+1} binom(n,k)^2 hold for every 1 <= k < n?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers studying zero forcing and graph polynomials seek coefficient inequalities that control the number of forcing sets across cardinalities. Newton and Brimkov disprove general unimodality and ask tree unimodality (OP-1399); normalized log-concavity is a substantially stronger assertion and is not their question. It implies ordinary log-concavity and unimodality, but neither follows from monotonicity of the family of forcing sets: their counterexamples show even unimodality fails for general graphs. The normalization relates the coefficients to success probabilities for uniformly random k-sets. This asks for a structural inequality on a natural graph class rather than another finite case. Evidence: Experiment 21165 computes the complete zero-forcing coefficient sequence of every nonisomorphic tree of orders 2 through 12 (987 trees total), finding no failure of normalized or ordinary log-concavity. Experiment 21166 tests 375 additional random labeled trees of orders 13,15,17,19,21 and finds no failure. These are finite evidence only.

OP-1432 tree graph state maximally mixed marginals path extremalNot in LeanQuantum Mechanics

For a tree T on n >= 4 vertices, let M_k(T) be the number of k-element subsets S of vertices such that the binary adjacency submatrix A_T[S,V(T)\S] has rank k. Is M_k(T) <= M_k(P_n) for every tree T and every 0 <= k <= floor(n/2), where P_n is the n-vertex path?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

For the graph state |T>, exactly these S have maximally mixed reduced density matrices, equivalently S is maximally entangled with its complement. Thus the inequality would identify the tree geometry that maximizes the frequency of maximally entangled fixed-size subsystems, relevant when graph states are used as quantum resources. OP-1367 asks for extremality of a weighted sum of purities 2^(-rank), which does not determine the number of cuts of full rank; in fact stronger full stochastic cut-rank extremality fails already on ten vertices (experiment 20800). Thus one needs to control this extreme rank tail, not merely apply the proposed purity inequality. At k=2 the path case is tied to minimizing the count of pairs with a shared neighbor, but k>=3 involves global competing matchings and is not settled by the degree-sum theorem. Evidence: Experiment 21167 computes binary cut ranks for every subset of all 2,295 nonisomorphic trees of orders 4 through 13 and finds the bound for every k. At n=12 the path uniquely maximizes for k=2,3,4,5 but 49 trees tie it for k=6, ruling out a blanket uniqueness assertion. Experiment 21168 checks 390 reduced density matrices via independent state-vector partial traces and confirms the full-rank equivalence on path, star and balanced-tree states.

OP-1433 two agent uniform block snake gap asymptotic reversalNot in LeanFair Division

For each odd m=2k+1, let agents A and B have independent item values U_{ij} uniformly distributed on [0,1], independently over agents and objects. They sincerely pick their highest-valued remaining object. Compare block-snake order (AB)^k B with the plain snake whose first k two-agent rounds alternate AB, BA, AB, BA, ..., followed by B. For an outcome set U_i to 2 times agent i's total value of her allocated objects divided by her total value for all m objects, and let D_m be E|U_A-U_B| for block-snake minus the same quantity for plain snake. Does lim_{m odd -> infinity} m D_m exist and lie strictly between 0 and infinity?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The quantity measures the average absolute disparity in shares normalized by each agent's fair share. Chernulich and Yenmez compare these exact drafts and report block-snake's smaller average absolute gap at two agents and 19 items, but do not assert an all-m asymptotic ranking. The computations find that the ranking reverses for larger m in both residue classes; a positive limiting constant would characterize the rate and eventual reversal for an entire natural stochastic economy. It goes beyond their finite simulations, and neither ordinal EF1 nor their NEL characterization controls expectations under cardinal random values. The normalization and absolute value make the result nontrivial even if unnormalized expected utilities are accessible. Evidence: Experiment 21174 gives an exploratory paired Monte Carlo comparison. Independent experiment 21177 uses 400,000 paired samples per m from 19 to 51: D_19=-0.0009454 (SE 0.0001000) but D_31=0.0005822 (SE 0.0000696) and D_51=0.0008487 (SE 0.0000465). Experiment 21181 finds positive differences at m=37,41,45,61,81,121,161,201; m D_m ranges roughly 0.031 to 0.056 at m=61 through 201, with appreciable Monte Carlo error. These estimates are evidence, not rigorous inequalities or a determination of the limit.

OP-1434 timely bin packing complementary sizes sharp greedy ratioNot in LeanOnline Algorithms

For each integer d>=3, is the exact absolute competitive ratio of Thrifty-Greedy on timely bin-packing instances with item sizes in {1/d,(d-1)/d} equal to 2d/(d+1)? An item i has a closed availability interval [a_i,b_i] and must be assigned to a unit-capacity bin closed at a common time in its interval; OPT is the minimum bin count with full future knowledge. Thrifty-Greedy waits for the earliest pending deadline, opens a bin, and scans all available pending items in nondecreasing deadline order, breaking ties by input index, placing each item that fits. The assertion is ALG(I) <= (2d/(d+1)) OPT(I) for every finite instance and that the ratio is attained or approached for every d.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers in online algorithms seek sharp and adaptive guarantees for simple deadline-aware packers. Chiang et al. prove the d=3 case exactly 3/2, and give the generic upper bound 2; neither addresses the entire complementary-size family. A naive extension of the 3/2 guarantee is already defeated in computation for d>=4. Their d=3 proof uses a special conversion and bookkeeping for small-only bins, whereas for d>3 such bins can contain several different counts of small items, so it is not an immediate corollary. This asks for an exact parameter-dependent bound for all d and explains how the generic factor 2 can emerge as d grows. Evidence: Experiment 21183 constructs, for each d=3,...,10, d time stages with one small urgent item [t,t], one small filler [t,d], and one large item [0,d+1] per stage. Greedy uses 2d bins, and an independently solved CP-SAT model finds a feasible offline schedule with d+1 bins. The solver certifies optimality for d=3,4,5 (including ratio 8/5 at d=4); for d=6,...,10 it reports feasible solutions without proving optimality, which is sufficient for the displayed lower-bound witnesses. Experiment 21176 tests 16,800 random instances of size 5..11 for d=3..8 against exact subset-DP optima; experiment 21178 tests 1,200 random instances of size 12..14 for d=4,5,8,12. None exceeded the proposed bound.

OP-1435 identical fermion pair stabilizer fidelity lattice oscillationsNot in LeanQuantum Mechanics

For each m>=1 take m identical bipartite fermion pairs (sqrt(4/5)|00>+sqrt(1/5)|11>) tensor-powered m times. For each parity eta in {0,1}, list in nonincreasing order the Schmidt amplitudes a_j^(eta)=sqrt((1/5)^w(4/5)^(m-w)) of all bitstrings of Hamming weight w congruent to eta mod 2, including multiplicities. Define F_m as the maximum of 2^(-k)(sum_{j<=2^k} a_j^(eta))^2 over eta and 0<=k<=m-1, and 2^(-k)(sum_{j<=2^(k-1)} (a_j^(0)+a_j^(1)))^2 over 1<=k<=m. Does sqrt(m) F_m fail to converge, with liminf strictly below 2.48 and limsup strictly above 2.68? Can the full set of subsequential limits be characterized?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

By Eq. (7) of Jha, Luo, Kemper and Bakalov, F_m is the optimal fidelity with any stabilizer state after parity-preserving local unitaries, measuring the best non-Gaussian local concentration of entanglement. The paper proves order 1/sqrt(m) for identical partially entangled pairs but its proposed smooth-spectrum prefactor explicitly excludes identical pairs, whose entanglement energies lie on a lattice. The computation suggests a persistent order-one oscillation in the scaled optimum caused by parity grading and the power-of-two stabilizer ranks, so a single constant prefactor does not describe this basic family. This is not the paper's own open question about the universal capacity-bound constant or SRE offset; it asks for the lattice-scale behavior of its exactly defined fidelity on a concrete physical state family. Evidence: Experiment 21187 evaluates the graded-rank formula at multiple occupations and finds substantial fluctuations for p=1/5. Experiment 21189 independently enumerates all 2^m Schmidt amplitudes for m<=12 and agrees with the compressed computation, then finds scaled minima/maxima 2.4658/2.6897 and 2.4664/2.6919 in 201-consecutive-m windows near m=20,000 and 80,000. Experiment 21190 gives 2.4676/2.6914 near m=320,000 and 2.4680/2.6848 near m=1,000,000. Floating-point scans are evidence only, not bounds on limiting values.

OP-1437 cubic coupon collector bipartite clique stochastic extremumNot in LeanGraph Theory & Graph Algorithms

Let G be any finite simple cubic graph with n vertices, and run the following continuous-time graph coupon collector: each vertex has an independent rate-one Poisson clock; when v rings, if it has uncovered neighbors choose one uniformly and mark it covered, and otherwise do nothing. Let T_G be the time when every vertex is covered and F_G(t)=P(T_G<=t). Is it true for every t>0 that F_G(t)^6 >= F_{K_{3,3}}(t)^n, with equality for some t>0 if and only if G is a disjoint union of K_{3,3}? In particular, when 6 divides n this would show that the disjoint union of n/6 copies of K_{3,3} stochastically maximizes the completion time at every n, not merely its expectation asymptotically.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The researchers studying extremal graph coupon collection would obtain the whole law of the hardest cubic graphs, simultaneously bounding all increasing completion-time functionals and implying the degree-three case of OP-1376 for every admissible n. The existing proof only compares sufficiently late component tails and integrates after taking many bounded-size components; it does not yield pointwise distribution dominance or handle a growing component. It moves Theorem 1.1 and Theorem 4.4 of Extremal graphs for Alon's graph coupon-collector conjecture, arXiv:2611.11345, prove stochastic extremality in degree two and eventual expectation extremality in degree d for components of bounded size. along stronger_conclusion: The full-time, finite-order stochastic inequality for cubic graphs with no component-size restriction; the proof of the bounded-component result controls the late tail, not the CDF at arbitrary times.. Evidence: Experiment 21473 builds the full 2^n-state continuous-time generator and computes matrix exponentials at nine times from 0.1 through 5: K4, triangular prism, cube, Petersen, and 12 random connected cubic graphs on 10 vertices all satisfy the conjectured per-vertex inequality strictly. These are numerical checks, not exact verification.

OP-1438 tree monomer dimer unit variance subdivided star correctedNot in LeanStatistical Mechanics & Thermodynamics

For every n >= 4 and every n-vertex tree T, let M be a uniformly random matching of T, including the empty matching. Is Var(|M|) maximized uniquely, up to graph isomorphism, by the following tree S_n: for odd n=2m+1, subdivide each edge of the m-edge star once; for even n=2m+2, take that subdivided star and attach one additional leaf to its center? Equivalently, is Var(|M|) <= (m-1)/4+(m+1)/(m+2)^2 for n=2m+1, and <= (m-1)/4+2/(m+4) for n=2m+2, with equality precisely at S_n?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The monomer–dimer number variance is the susceptibility and a basic fluctuation observable. Andriantiana, Razanajatovo Misanantenaina, and Wagner characterize the tree extremizers for the mean matching size; their path extremizer for the mean does not generally maximize the variance, since differentiating an inequality in fugacity is invalid. Heilmann–Lieb real-rootedness gives a generic n/8 upper bound, but not this sharp finite-n bound or uniqueness. Matchings of T are independent sets of its line graph, so hardCoreVarSize supplies the exact Gibbs variance. This is an all-orders sharp extremal theorem with an explicit equality characterization. It moves Andriantiana, Razanajatovo Misanantenaina and Wagner (2020) characterize tree extremizers for the mean matching size; matching-polynomial real-rootedness gives the generic n/8 variance bound. along quantitative: An exact sharp maximum and unique extremizer for the variance at unit activity, a second logarithmic derivative not controlled by mean-extremality.. Evidence: Exact integer matching-polynomial dynamic programming and rational variance comparisons over all nonisomorphic trees of orders 4 through 16 (19,320 trees at order 16) found S_n the unique maximizer each time; order 10 maximum is 1 and order 16 maximum is 37/22. Additional activity scans showed the path can cease to maximize variance, changing the question from a mean-occupancy analogue. The earlier entry OP-1436 was withdrawn because it misstated the even-order value; the present formula is corrected to (m-1)/4 + 2/(m+4).

OP-1442 tree low temperature matching variance parity extremizersNot in LeanStatistical Mechanics & Thermodynamics

For a tree T on n >= 4 vertices, let m_k(T) count its k-edge matchings and let nu be its matching number. Is m_(nu-1)(T)/m_nu(T) at most m(m+1)/2 for n=2m, with equality exactly for the path P_(2m), and at most m^2/2 for n=2m+1 >= 5, with equality exactly for the tree obtained from the path P_(2m) by adding a leaf adjacent to a neighbor of one endpoint? Equivalently, these are the sharp parity-dependent maxima of lim_{lambda -> infinity} lambda Var_lambda(|M|), where M is sampled with probability proportional to lambda^|M|.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for an all-orders sharp extremal ratio and equality classification, connecting monomer-dimer low-temperature fluctuations to the top two matching coefficients and, through the tree adjacency spectrum, reciprocal squared nonzero eigenvalues. The extremizers differ qualitatively from those in the unit-activity question OP-1438, so neither statement implies the other. Cambie et al. Theorem 2 already settles the even-order subcase with a perfect matching, since that matching is unique; it does not compare the top two coefficients when the maximum matching leaves more vertices unmatched, and it does not give the proposed odd-order ratio. A full parity theorem would interest researchers in matching enumeration and spectral graph theory as well as monomer-dimer models. Evidence: Exact matching-polynomial enumeration of every unlabeled tree through order 17 found the stated unique maximizers, with odd extremizers having arms 1,1,n-3. 70,000 subtree-regrafting trials at odd orders 21,31,51,71 did not exceed the predicted values. The fast two-coefficient recursion was cross-checked against full polynomials for all trees through order 12; activity scans show a change of maximizing shape.

OP-1443 Judicious r-partitions of r-uniform hypergraphs meeting at least rm/(2r-1) edgesNot in LeanGraph Theory & Graph Algorithms

Let $r \ge 2$ be an integer. Does every finite $r$-uniform hypergraph $H = (V, E)$ with $m$ edges admit a partition of its vertex set $V = V_1 \cup \cdots \cup V_r$ into $r$ pairwise disjoint classes such that for every $1 \le i \le r$, the number of edges of $H$ intersecting $V_i$ is at least $\frac{r}{2r-1} m$?

Posed in arXiv:2611.13660, Conjecture 1.1 — Judicious $r$-partitions of $r$-uniform hypergraphs

OP-1445 Directed Hamiltonicity of Vertex-Transitive Digraphs of Prime-Power OrderNot in LeanGraph Theory & Graph Algorithms

Let $p$ be a prime number and let $n \ge 6$ be an integer. Does every strongly connected vertex-transitive directed graph on $p^n$ vertices contain a directed Hamiltonian cycle?

Posed in arXiv:2611.13415, Sec. 1, p. 1 — Hamilton cycles in vertex-transitive graphs of prime-power order

OP-1451 Maximum average eccentricity of Eulerian digraphsNot in LeanGraph Theory & Graph Algorithms

Does there exist a real constant $c$ such that every Eulerian digraph $D$ of order $n$ and minimum degree $\delta$ satisfies $$\operatorname{avec}(D) \leq \frac{3n}{\delta+2} + c,$$ where $\operatorname{avec}(D) = \frac{1}{n} \sum_{v \in V(D)} \operatorname{ecc}(v)$, $\operatorname{ecc}(v) = \max_{u \in V(D)} d(v,u)$, and an Eulerian digraph is a strongly connected directed graph without loops or multiple arcs in which $\deg^+(v) = \deg^-(v) \ge \delta$ for every vertex $v$?

Posed in arXiv:2611.12951, Conjecture 4.1 — On the average eccentricity of Eulerian and bipartite Eulerian digraphs

What is known

Theorem 1 proves avec(D) ≤ 3n/(δ+1), while the known extremal family of Eulerian digraphs has avec = 3n/(δ+2) - 2. This conjecture posits that the denominator δ+2 from the lower construction is the true asymptotic maximum.

OP-1452 Maximum average eccentricity of bipartite Eulerian digraphs of minimum degree at least 3Not in LeanGraph Theory & Graph Algorithms

Does there exist a real constant $c$ such that every bipartite Eulerian digraph $D$ of order $n$ and minimum degree $\delta \geq 3$ satisfies $$\operatorname{avec}(D) \leq \frac{2n}{\delta+1} + c,$$ where $\operatorname{avec}(D) = \frac{1}{n} \sum_{v \in V(D)} \operatorname{ecc}(v)$, and a bipartite Eulerian digraph is an Eulerian digraph whose underlying undirected graph is bipartite?

Posed in arXiv:2611.12951, Conjecture 5.1 — On the average eccentricity of Eulerian and bipartite Eulerian digraphs

What is known

Theorem 2 proves avec(D) ≤ 2n/δ + 2 for bipartite Eulerian digraphs, while known extremal bipartite constructions achieve avec = 2n/(δ+1) - 5/2 for δ ≥ 2. Remark 5.2 shows that for δ = 2 the bound fails (the general 3n/4 bound applies), leaving open whether δ+1 is the correct denominator for all δ ≥ 3.

OP-1454 Codegree Turán Densities of Zycles with Period Divisible by ThreeNot in LeanCombinatorics for TCS

Let $Z_\ell$ denote the $3$-uniform zycle on vertex set $\{x_i, y_i : i \in \mathbb{Z}_\ell\}$ with edge set $\{\{x_i, y_i, x_{i+1}\}, \{x_i, y_i, y_{i+1}\} : i \in \mathbb{Z}_\ell\}$. For a $3$-uniform hypergraph $F$, let $\gamma(F) = \lim_{n \to \infty} \operatorname{ex}_2(n, F)/n$ be its codegree Turán density. Determine $\gamma(Z_\ell)$ for every odd integer $\ell \ge 3$, and for every even integer $\ell \ge 12$ that is divisible by $3$.

Posed in arXiv:2611.12582, Problem 5.2 — Exact codegree Tur\'an densities of even zycles

OP-1455 Minimum Number of Lines to Pierce an n by n ChessboardNot in LeanCombinatorics for TCS

Let n ≥ 3 be an integer. Let the n × n chessboard consist of the n² open unit squares (i, i+1) × (j, j+1) ⊂ ℝ² for i, j ∈ {0, 1, ..., n-1}. A straight line in ℝ² is said to pierce a cell if it intersects the interior of that cell. Let p_n denote the minimum number of straight lines needed to pierce every unit cell of the n × n chessboard. Is p_n = n - 1 for all n ≥ 3?

Posed in arXiv:2611.12329, Sec. 'History and the result' — Piercing a Chessboard with Restricted Slopes

What is known

Originally posed in 1980 as AMM Problem E2862, this conjecture asserts that p_n = n - 1 for all n ≥ 3. Constructions of (n-1)-piercings are known. A 2013 paper proved p_n ≥ ⌈2n/3⌉, and a 2023 paper showed p_n > 0.7n for large n. The paper under review settles the case where lines are restricted to two slope classes, but the full conjecture remains open.

OP-1457 Structure Theorem for Minimally Repetitive d-ary Rich WordsNot in LeanCombinatorics for TCS

Let $d \ge 5$ be an integer. Let $\Sigma_d = \{0, 1, \dots, d-1\}$. Define the morphism $\varphi_d : \Sigma_d^* \to \Sigma_d^*$ by $\varphi_d(i) = 0(i+1)$ for $i \in \{0, \dots, d-2\}$ and $\varphi_d(d-1) = 0(d-1)(d-1)$. Let $\mathbf{u}_d \in \Sigma_d^\omega$ be the infinite fixed point $\lim_{n \to \infty} \varphi_d^n(0)$. A finite word is rich if every factor of length $n$ contains $n+1$ distinct palindromes; an infinite word is rich if all its finite factors are rich. Does there exist a real number $t_d > E^*(\mathbf{u}_{2d-1})$ and a finite set $\mathcal{P}_{d}$ of morphisms $\pi : \Sigma_{2d-1}^* \to \Sigma_d^*$ such that every infinite $t_d$-power-free rich word $\mathbf{z} \in \Sigma_d^\omega$ contains every factor of $\pi(\mathbf{u}_{2d-1})$ for some $\pi \in \mathcal{P}_d$, where each $\pi(\mathbf{u}_{2d-1})$ is rich with critical exponent equal to the asymptotic critical exponent $E^*(\mathbf{u}_{2d-1})$?

Posed in arXiv:2611.13676, Conjecture 1.4 — An automated approach to structure theorems for minimally repetitive rich words

OP-1462 Positive Codegree Density of Generalized Daisies for Non-Prime-Power OrdersNot in LeanCombinatorics for TCS

Let $r \ge 3$ and $t \ge 4$ be integers such that $t-2$ is not a prime power (the smallest such integer being $t = 8$). Let $K_t$ denote the complete graph on $t$ vertices, and let $\mathcal{D}_{r,t} = S^r(K_t)$ be its $r$-uniform suspension, which is the $r$-uniform hypergraph on vertex set $V(K_t) \cup \{w_1, \ldots, w_{r-2}\}$ whose hyperedges are $\{u, v, w_1, \ldots, w_{r-2}\}$ for all edges $\{u, v\} \in E(K_t)$. For an $r$-uniform hypergraph $H$, the positive codegree $\delta^+(H)$ is the minimum of $|\{v \in V(H) \setminus F : F \cup \{v\} \in E(H)\}|$ over all $(r-1)$-subsets $F \subseteq V(H)$ that are contained in at least one hyperedge of $H$. The positive codegree Turán density is defined as $\gamma^+(\mathcal{D}_{r,t}) = \lim_{n \to \infty} n^{-1} \max \{ \delta^+(H) : H \text{ is a $\mathcal{D}_{r,t}$-free $r$-uniform hypergraph on $n$ vertices} \}$. It is known that $\gamma^+(\mathcal{D}_{r,t}) \le \frac{(t-3)(t-2)^{r-1}}{(t-2)^r - 1}$ for all $t \ge 4$, with equality whenever $t-2$ is a prime power. What is the value of $\gamma^+(\mathcal{D}_{r,t})$ when $t-2$ is not a prime power? In particular, for the smallest open case $r = 3$ and $t = 8$, is $\gamma^+(\mathcal{D}_{3,8})$ equal to $\frac{36}{43}$?

Posed in arXiv:2611.13380, Sec. 4, Question 1 — Positive Codegree Density of Suspensions of Graphs

OP-1463 Turán Density of the Three-Uniform DaisyNot in LeanCombinatorics for TCS

Let $\mathcal{D}_3$ be the $3$-uniform daisy, which is the $3$-uniform hypergraph on $5$ vertices $\{w, v_1, v_2, v_3, v_4\}$ whose hyperedges are $\{w, v_i, v_j\}$ for all $1 \le i < j \le 4$ (that is, the $3$-uniform suspension of $K_4$). For an integer $n \ge 5$, let $\mathrm{ex}(n, \mathcal{D}_3)$ denote the maximum number of hyperedges in a $3$-uniform hypergraph on $n$ vertices containing no subhypergraph isomorphic to $\mathcal{D}_3$. The Turán density is defined by $\pi(\mathcal{D}_3) = \lim_{n \to \infty} \frac{\mathrm{ex}(n, \mathcal{D}_3)}{\binom{n}{3}}$. Is $\pi(\mathcal{D}_3) = \frac{1}{2}$, matching the asymptotic density attained by the iterated blow-up of the complement of the Fano plane?

Posed in arXiv:2611.13380, Sec. 4, Question 3 — Positive Codegree Density of Suspensions of Graphs

OP-1464 Optimal competitive ratio for unweighted online matching with random edge arrivalsNot in LeanOnline Algorithms

In the unweighted online matching problem with random edge arrivals, an unknown finite simple graph G = (V, E) has each edge arrive independently at a timestamp drawn uniformly from [0, 1] (or edges arrive in a uniformly random permutation). The algorithm must immediately and irrevocably accept or reject each arriving edge while maintaining a matching. What is the supremum of competitive ratios α = inf_G E[|ALG(G)|] / OPT(G) achievable by randomized online algorithms on general graphs? In particular, can any online algorithm achieve a competitive ratio of at least 1 - 1/e ≈ 0.6321, or is the optimal competitive ratio strictly bounded away from 1 - 1/e, narrowing the gap between the known lower bound of 0.5445 and upper bound of 0.6964?

Posed in arXiv:2611.13571, Sec. 1.1, Fig. 1 — Improved Bounds for Online Matching with Random Edge Arrivals

OP-1468 Minimal Stabilization Threshold of Zero Forcing Number for P(n, 6)Not in LeanGraph Theory & Graph Algorithms

Let P(n,6) denote the generalized Petersen graph with vertex set {u_i, v_i : i ∈ ℤ/nℤ} and edge set consisting of outer cycle edges {u_i, u_{i+1}}, spokes {u_i, v_i}, and inner chord edges {v_i, v_{i+6}} for all i ∈ ℤ/nℤ (with n > 12). Let N_6 be the minimal integer such that for all n ≥ N_6, the zero forcing number satisfies Z(P(n,6)) = 2(6) + 2 = 14. What is the exact value of N_6? (By Proposition 4.8, 32 ≤ N_6 ≤ 79.)

Posed in arXiv:2611.13244, Sec. 4, after Table 1 — Stabilization of the zero forcing number of generalized Petersen graphs

What is known

The paper proves that N_6 lies between 32 and 79, determines N_k for k <= 5 by computer search, and explicitly notes that k = 6 is out of reach for exhaustive search, leaving the exact minimal stabilization threshold N_6 open.

OP-1471 Degree exponent in the bounded-polynomial influence conjectureNot in LeanCombinatorics for TCS

Does there exist an absolute constant $c > 0$ such that for all positive integers $n$ and $d$ with $1 \le d \le n$, and every multilinear polynomial $p : \{0,1\}^n \to [0,1]$ of degree at most $d$ having variance $v = \operatorname{Var}(p) > 0$ with respect to the uniform distribution on $\{0,1\}^n$, the maximum coordinate influence satisfies $\max_{i \in [n]} I_i(p) \ge c \cdot \frac{v^4}{d^2}$, where $I_i(p) = \mathbb{E}_{X}[(p(X) - p(X^{\{i\}}))^2]$?

Proposed here, building on arXiv:2611.12795, Theorem 7 — A short proof of the Aaronson-Ambainis Conjecture via the completion framework; the paper does not ask it

What is known

Theorem 7 settles the bounded-polynomial influence conjecture by showing that every real polynomial $p: \{0,1\}^n \to [0,1]$ of degree $d \ge 1$ with variance $v = \operatorname{Var}(p) > 0$ satisfies $\max_{i \in [n]} I_i(p) \ge c \cdot \frac{v^{12}}{d^{12}}$ for some absolute constant $c > 0$. The exponent 12 on $d$ arises from composing several polynomial reductions (the $O(d^2/v)$ bound on the classical adversary, the cubic dependence in the completion theorem, and the quadratic loss in the decision-tree covariance inequality). The optimal power of $d$ is not settled; for test functions like majority, $I_i(p) \approx 1/d$, while for products $I_i(p)$ is even larger relative to variance. It remains open whether the exponent of $d$ can be improved, potentially down to 2.

OP-1475 Polynomial-time EFX allocation achieving half of optimal social welfare for homogeneous valuationsNot in LeanFair Division

Let N = {1, ..., n} be a set of agents and M a set of m indivisible items with positive rational sizes s(g). Suppose all agents share an identical additive valuation v : 2^M -> Q_{>=0}, while each agent i has an individual budget B_i in Q_{>=0}. Let W* be the maximum social welfare sum_{i=1}^n v(O_i) over all collections of pairwise disjoint subsets (O_1, ..., O_n) of M with s(O_i) <= B_i for each agent i. For any rational epsilon in (0, 1/2), does there exist an algorithm that runs in time polynomial in the binary input length and 1/epsilon and returns a budget-feasible EFX allocation (X_1, ..., X_n, C) satisfying sum_{i=1}^n v(X_i) >= (1/2 - epsilon) W*?

Proposed here, building on arXiv:2611.12740, Sec. 7, after Theorem 7.2 — Computing EF1 Allocations under Budget Constraints in Polynomial Time; the paper does not ask it

What is known

For homogeneous valuations under budget constraints, Hu et al. (2026) established the existence of an EFX allocation with social welfare at least W*/2, but without a polynomial-time algorithm. Theorem 7.2 of this paper computes an EF1 allocation with welfare at least (1/2 - \epsilon)W* in polynomial time. Whether the same welfare approximation can be achieved in polynomial time for EFX allocations remains unresolved.

OP-1476 Nearly-linear distance-query graph reconstruction for bounded-degree graphsNot in LeanAlgorithm Design & Analysis

Let $G = (V, E)$ be an unknown connected simple undirected graph on $n$ vertices with maximum degree at most $\Delta \ge 3$, where $\Delta$ is an absolute constant. An algorithm can adaptively query the shortest-path distance $d_G(u, v) \in \mathbb{N}$ between any pair of vertices $u, v \in V$. Does there exist a randomized algorithm that reconstructs the edge set $E$ of $G$ with high probability (or in expectation) using at most $n^{1+o(1)}$ distance queries?

Posed in arXiv:2611.12619, Sec. 1, paragraph 4 — Better Bounds For Graph Reconstruction

What is known

The paper improves the upper bound for distance-query reconstruction of bounded-degree graphs from O~(n^{3/2}) to n^{4/3+o(1)}, reducing the gap to the Omega(n log n) lower bound, but leaves open whether the true complexity is nearly linear n^{1+o(1)}.

OP-1478 tree graph state negative depolarizing fidelity path star extremaNot in LeanQuantum Mechanics

For n >= 4 and each n-vertex tree T define W_T(z) = sum over S subset V(T) of z^|S union Odd_T(S)|, where Odd_T(S) is the set of vertices with an odd number of neighbors in S. For every real -1/3 <= z < 0, is W_{P_n}(z) <= W_T(z) <= W_{K_{1,n-1}}(z), with equality on the left or right only when T is isomorphic to the path or star respectively?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

For a graph state the fidelity after independent single-qubit depolarizing channels is 2^(-n) W_T(z), and negative z down to -1/3 remains completely positive: it represents a high-probability uniformly random nonidentity Pauli error. This would identify optimal and worst tree resource states throughout that physically valid noise range. The existing open problem OP-1367 compares all fixed-size average purities, which implies comparisons only for nonnegative z; the negative-z expansion in these purities has alternating coefficients, so it does not give this comparison. At z=-1/3 the result becomes an extremal theorem for full-weight stabilizer counts, relevant to entanglement detection and noise thresholds. The generating functions of Vallee et al. calculate paths and stars separately and do not compare all trees. Evidence: Experiment 21785 exactly enumerates stabilizers of every unlabeled tree through n=12 at z=-1/3,-1/4,-1/5,-1/10 and finds the path and star uniquely extremal. Independently, experiment 21786 checks every one of 2,285 unlabeled trees of orders 4 through 13 and finds nonnegative exact Bernstein coefficients for each difference divided by t^2 on z=-t/3, certifying both inequalities over the whole interval on these finite instances. These are computational results, not Lean proofs.

OP-1483 equal budget efx complete packable sharp charity countNot in LeanFair Division

For n>=2 identical agents with a common positive budget B, and indivisible goods g with positive rational sizes s_g and common positive rational values v_g, suppose all goods can be packed into n disjoint bundles of size at most B. Must there exist a budget-feasible allocation with at most n-1 goods in the charity C such that for every agent i, every other agent bundle or charity Y, every nonempty subset S of Y with sum_{g in S} s_g <= B, and every g in S, v(A_i) >= v(S minus {g})? Is n-1 sharp for every n?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Allocation designers with limited capacity need to know the smallest number of goods fairness can force them to discard even when a complete allocation is feasible. This asks for a sharp all-n count, including charity fairness, not a welfare approximation. Hu, Mei and Zhang show budget-feasible EFX existence and algorithms in special cases but do not bound the charity's cardinality conditional on full packability. The usual unconstrained partial-EFX n-2 bound does not apply: moving a good or reallocating a bundle can break the knapsack constraints, and their charity condition is different. A computed family predicts the sharper n-1 upper bound is best possible even for EF1: n-1 goods each of size n and value 1, and n goods each of size 1 and value 2, with B=n. All goods fit by putting each large good alone and all the small goods in the last bundle, yet the finite computations require n-1 discarded goods. It moves is_efx_goods along new_setting: Bound the number of unallocated goods when all goods are jointly packable, with a common knapsack constraint and EFX toward every feasible part of charity.. Evidence: Experiment 21794 exhausts multisets of goods with sizes 1..4 and values 1..3 through six goods for n=2,3 and five goods for n=4, retaining only instances with a complete feasible packing; every instance admitted the proposed bound. Experiment 21793 tests the explicit family through n=5 and randomly generated complete packings. Experiment 21795 independently enumerates labelled allocations and all feasible comparison subsets for the family through n=4. Experiment 21796 adds 1,900 targeted complete-packable instances with negatively correlated sizes and values at n=3,4, with no violation. All outputs are numerical/exact finite enumeration, not Lean proofs.

OP-1484 Kelly-Ulam reconstruction number for graphs with at least three card typesNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite simple undirected graph on $n \ge 3$ vertices. Let $t(G)$ denote the number of pairwise non-isomorphic graphs among the vertex-deleted subgraphs $\{G - v : v \in V(G)\}$. The reconstruction number $r(G)$ of $G$ is the minimum size of a submultiset of cards $\{G - v_1, \dots, G - v_k\}$ that uniquely identifies $G$ up to isomorphism among all graphs on $n$ vertices. Is it true that every graph $G$ with $t(G) \ge 3$ has reconstruction number $r(G) = 3$?

Posed in arXiv:2611.13728, Sec. 1 — Two Types of Cards in Kelly-Ulam Conjecture

What is known

The paper states this conjecture in the introduction as the third and final step of a proposed program to settle the Kelly-Ulam conjecture, having handled t(G)=1 (regular graphs) and t(G)=2 (the main theorem of this paper).

OP-1487 Determination of Minimum Spacing for Triangular Lattice Disk CoveringNot in LeanCombinatorics for TCS

Let $\mathcal{T}_d = d(\mathbb{Z} + \mathbb{Z}e^{2\pi i/3}) \subset \mathbb{C}$ be the triangular lattice with spacing $d > 0$. A point set $S \subset \mathbb{R}^2$ is coverable if there exists a set $C \subset \mathbb{R}^2$ with $\|c - c'\| \ge 2$ for all distinct $c, c' \in C$ such that $S \subseteq \bigcup_{c \in C} D(c, 1)$. Let $d_{\min} = \inf \{d > 0 : \mathcal{T}_d \text{ is coverable}\}$. Is $\mathcal{T}_d$ non-coverable for every $d \in (2/\sqrt{14}, 2/\sqrt{13})$, and is $d_{\min} = 1/\sqrt{13}$?

Posed in arXiv:2611.13535, Question 10.1 — Covering the Triangular Lattice with Non-Overlapping Unit Disks

OP-1488 Smallest Finite Point Set Uncoverable by Non-Overlapping Closed Unit DisksNot in LeanCombinatorics for TCS

Let $m^*$ be the minimum cardinality of a finite subset $S \subset \mathbb{R}^2$ that cannot be covered by pairwise non-overlapping closed unit disks (closed unit disks with pairwise disjoint interiors). Is $m^* \le 44$?

Posed in arXiv:2611.13535, Question 10.3 — Covering the Triangular Lattice with Non-Overlapping Unit Disks

OP-1489 regular graph zero forcing ultra log concavityNot in LeanGraph Theory & Graph Algorithms

For every connected finite simple regular graph G on n>=3 vertices, let z_k count its k-vertex zero-forcing sets, where a blue vertex with exactly one white neighbor forces that neighbor blue. Is the sequence z_k/binom(n,k), for 0<=k<=n, log-concave? Equivalently, does z_k^2*binom(n,k-1)*binom(n,k+1) >= z_{k-1}*z_{k+1}*binom(n,k)^2 hold for every 1<=k<n?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Zero forcing is used in graph propagation and matrix nullity, and normalized coefficient log-concavity constrains success probabilities of random fixed-cardinality seed sets and implies ordinary coefficient unimodality. Newton and Brimkov refute general unimodality using highly irregular joins; their example and the trivial lower-half monotonicity theorem do not address regular graphs. The previous OP-1431 asks about trees; connected regular graphs beyond K_2 are outside that setting, so neither question implies the other. The target is also not a direct application of matroid ultra-log-concavity: experiment 21819 finds a connected cubic graph whose minimal zero-forcing sets have different sizes, so the complements cannot be the independent sets of a matroid. It moves Newton and Brimkov, Zero forcing is not unimodal, Theorem 1 and Corollary 1 along new_setting: Identify regularity as a potential sufficient condition for the much stronger normalized log-concavity, following the recent failure of unimodality for general graphs.. Evidence: Experiment 21814 exhausts every connected regular graph through 11 vertices and all cubic, quartic and quintic connected graphs on 12 vertices. Experiment 21818 exhausts the remaining degree classes at 12 vertices, all connected 4- and 8-regular graphs on 13 vertices, and all 509 cubic and 88,168 quartic connected graphs on 14 vertices; none violate the proposed inequality. Experiment 21816 independently checks the compiled enumerator against a separate Python closure implementation on all 1,252 graph-atlas graphs through order 7, and checks symmetric examples including the Petersen, Heawood, 4-cube, and dodecahedral graphs. Experiment 21810 adds random regular graphs through order 22. Experiment 21819 exhibits the non-matroid obstacle. These are finite computations, not Lean proofs.

OP-1490 Combinatorial Constant-Factor Approximation for Heterogeneous Metric Data PlacementNot in LeanApproximation & Inapproximability

Does there exist a deterministic polynomial-time combinatorial algorithm (operating without solving a linear program) that achieves an O(1)-approximation for the metric data placement problem with heterogeneous demands w_{i\ell} ≥ 0, non-negative installation costs f_{j\ell} ≥ 0, and integer site capacities b_j ≥ 0?

Posed in arXiv:2611.13224, Sec. 6 — An Improved $(1+2e)$-Approximation Algorithm for Metric Data Placement

OP-1492 regular graph zero forcing log concavityNot in LeanGraph Theory & Graph Algorithms

For every finite connected simple regular graph G on n>=3 vertices, let z_k denote the number of k-vertex zero-forcing sets, with the standard rule that a blue vertex with exactly one white neighbor forces it blue. Is z_k^2 >= z_{k-1}*z_{k+1} for every 1<=k<n?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This is a data-driven revision of OP-1489. Experiment 21824 finds three connected 6-regular 13-vertex graphs whose normalized zero-forcing coefficients fail log-concavity, including a failure independently recounted in 21830. All three still have ordinary log-concave coefficients. Thus regularity does not support the earlier strengthened statement, and ordinary log-concavity is the next precise structural boundary to ask about. Unlike the tree questions OP-1399 and OP-1431, this concerns a distinct graph class and would imply unimodality for all connected regular graphs despite Newton and Brimkov's negative result for arbitrary graphs. It would also strengthen mere unimodality to a coefficient inequality. It moves OP-1489, the listed regular-graph normalized-log-concavity question; Newton and Brimkov, Zero forcing is not unimodal, Theorem 1 along boundary: Replace the normalized-log-concavity claim that failed in new computations by ordinary log-concavity, preserving a nontrivial regular-graph strengthening of unimodality.. Evidence: Experiment 21824 exhausts all 367,860 connected 6-regular graphs on 13 vertices and all 4,060 connected cubic graphs on 16 vertices: three fail normalized log-concavity but none fail ordinary log-concavity. Experiment 21830 independently recomputes one counterexample using a Python set-based forcing process: graph6 L?BevayvDwl[^O has coefficients z_6=22,z_7=138,z_8=650, giving normalized-inequality sides 42,058,521,648 < 42,108,580,800; its full coefficient sequence is ordinarily log-concave. Experiment 21818 checks the remaining regular degree classes through order 12, selected degrees at 13, and degrees 3 and 4 at 14; experiment 21814 covers the other smaller cases. Experiment 21816 compares the compiled enumerator with an independent Python implementation on all 1,252 graph-atlas graphs through order 7. These are exact finite computations, not Lean proofs.

OP-1494 Existence of a Polynomial Insertion Rule for Wolfe's Minimum-Norm-Point MethodNot in LeanLinear Programming & Duality

Does there exist an insertion rule for Wolfe's minimum-norm-point method such that, for every finite set of atoms $p^{(1)}, \dots, p^{(n)} \in \mathbb{R}^D$ and every initial corral $S_0$, the method terminates in a number of major cycles bounded by a polynomial in $n$ and $D$?

Posed in arXiv:2611.12680, Sec. 4, Open Problem 1 — Wolfe's Minimum-Norm-Point Method Generalizes the Simplex Method

What is known

A polynomial insertion rule from every corral would yield a polynomial pivot rule for the simplex method on bounded nondegenerate linear programs, addressing a long-standing question in optimization.

OP-1497 Polynomial bound on truncation numbers of directed multiflow topologiesNot in LeanGraph Theory & Graph Algorithms

Let $(G,H)$ be a directed multiflow topology consisting of a supply directed multigraph $G=(V,E)$ and a demand directed multigraph $H=(V,E_H)$. For an integer $M \ge 1$, condition $(C5_M)$ states that for all capacities $u \in \mathbb{R}_{\ge 0}^E$ and demands $d \in \mathbb{R}_{\ge 0}^{E_H}$, and every length vector $\ell \in \{0, 1, \dots, M\}^E$, the inequality $\sum_{e \in E} u_e \ell_e \ge \sum_{(s_i,t_i) \in E_H} d_i \mathrm{dist}_\ell(s_i, t_i)$ holds. The truncation number $J(G,H)$ is the least integer $M \ge 1$ such that every weighting satisfying $(C5_M)$ admits a feasible fractional multiflow. Is $J(G,H)$ bounded by a polynomial in the size $|V| + |E| + |E_H|$ of the topology, or can it grow super-polynomially?

Posed in arXiv:2611.12330, Appendix 0.F, after Theorem 0.F.2 — Cut Conditions, Integrality, and Obstructions for Directed Multiflows

What is known

The paper establishes that the truncation number $J(G,H)$ is at least linear (Theorem 0.F.2) and at most exponential (Theorem 0.F.1), leaving open whether a polynomial upper bound holds.

OP-1500 equal budget ef1 complete packable sharp charity countNot in LeanFair Division

For n >= 2 identical agents, indivisible goods with positive rational sizes and common positive rational values, and a common positive budget B, suppose all goods can be packed into n disjoint bundles each of total size at most B. Must there be a budget-feasible allocation leaving at most n-1 goods in charity C, such that for every agent i, every other bundle or charity Y, and every nonempty subset S of Y of total size at most B, there exists a good g in S with v(A_i) >= v(S minus {g})? Is the bound n-1 best possible for every n?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Fair allocation under capacity constraints can require leaving goods unallocated even when a complete packing exists. The capacity-aware EF1 condition compares against every budget-feasible subset of the charity, so a small charity bound would be a structural guarantee beyond existence. Experiments 21837 and 21841 numerically refute the same n-1 claim for EFX with three agents; weakening EFX to EF1 is a substantive boundary rather than ignoring that counterexample. Gan, Li and Wu's equal-budget density-greedy EF1 construction gives existence but its output can have at least n charity goods on fully packable inputs (experiment 21851), so the new bound does not follow from its output guarantee. The explicit family with n-1 goods of (size,value) (n,1), n goods of (1,2), and B=n suggests sharpness for every n; all items are packable but the computed instances force n-1 charity goods. It moves is_ef1_goods along boundary: Ask for the sharp number of charity goods under complete packability and equal budgets, with EF1 for every feasible charity subset; this revises OP-1483 after its EFX version failed.. Evidence: Experiments 21794 and 21795 enumerate small instances and independently check the sharpness family; 21793 tests that family through n=5. CP-SAT checks 21846 find no violation in 2,984 solved three-agent cases (16 unknown); 21855 finds no violation in 692 solved four-agent cases (708 unknown). The original three-agent EFX counterexample admits complete EF1 by independent enumeration 21841. Experiment 21851 shows the published density-greedy procedure alone need not achieve the proposed count. These are finite computations, not a proof.

OP-1501 biased pauli tree graph state path star fidelity extremaNot in LeanQuantum Mechanics

Let E be a single-qubit Pauli channel with Pauli eigenvalues x, y, z, and suppose 0 <= y <= min(x,z). For each n-vertex tree T let F(T) = <T| E^(tensor n)(|T><T|) |T> be its graph-state fidelity after independent identical noise. For every n >= 4, is F(P_n) <= F(T) <= F(K_{1,n-1})? Equivalently, writing Odd_T(S) for vertices with an odd number of neighbors in S, does the same inequality hold for W_T(x,y,z) = sum over S subset V(T) of x^|S minus Odd_T(S)| y^|S intersect Odd_T(S)| z^|Odd_T(S) minus S|? The parameters are restricted to the Pauli-channel tetrahedron: (1+x+y+z)/4, (1+x-y-z)/4, (1-x+y-z)/4 and (1-x-y+z)/4 are all nonnegative. Here F(T)=2^(-n) W_T(x,y,z).

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Quantum-information researchers choosing tree-graph resources under biased noise need to know how topology changes fidelity. This all-n extremal statement would give explicit worst and best tree geometries throughout a full-dimensional noise region. It is not a mere relabeling of OP-1367: experiment 21875 finds two eight-vertex trees with exactly the same isotropic stabilizer weight polynomial but different biased-channel fidelities. Experiment 21876 checks by direct density-matrix evolution that dropping y <= min(x,z) makes even the path/star envelope fail for a physical channel with positive eigenvalues (x,y,z)=(0.02,0.86,0.14). It moves OP-1367 asks tree extrema for every fixed subsystem-purity sum and therefore predicts bounds for nonnegative isotropic depolarizing noise; OP-1478 asks the negative depolarizing segment. Numajiri et al. map general iid Pauli fidelity to a spin partition function but do not establish extrema over tree geometries. along new_setting: Move from the one-parameter isotropic channel to a three-parameter family of physically admissible biased Pauli channels, with a data-selected inequality between the three eigenvalues.. Evidence: Experiment 21870 checks 1,771 physical channels with eigenvalues on a 1/20 grid and 0 <= y <= min(x,z), against every unlabeled tree through n=13, with no violation. Experiment 21873 independently checks a tree dynamic program against direct stabilizer enumeration through n=9 and finds no violation in 10,000 random tree-channel instances with 20, 40, 80, 150 or 300 vertices. Experiment 21876 validates the formula and a counterexample beyond the stated region using explicit density-matrix evolution. Experiment 21869 shows that the simplest coefficientwise argument after substituting x=y+a, z=y+b fails already for n=4. The channel-grid and large-tree checks use floating-point arithmetic.

OP-1502 equal budget efx complete packable sharp allocated fractionNot in LeanFair Division

For n >= 3 identical agents with a common positive budget B, and m indivisible goods with positive rational sizes and common positive rational values, suppose the goods have a complete packing into n bundles of total size at most B each. Must there exist a budget-feasible allocation that assigns at least ceil(m/n) goods and is EFX both between agents and toward charity in the following sense: for each agent i, each other bundle or charity Y, every nonempty subset S of Y with total size at most B, and every g in S, v(A_i) >= v(S minus {g})? Is 1/n the best asymptotic guaranteed fraction for each fixed n?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

For resource-allocation designers the number of goods actually allocated matters separately from their welfare. The earlier n-1 charity conjecture fails, and a two-type family numerically shows much more: for n>=3 and k>=2, use n-1 high goods of size 1 and value k+1, and nk low goods of size 2 and value 1, with B=2k+1. A complete packing puts k low goods in each bundle and one high good in each of n-1 bundles. Exact count-state search predicts that EFX forces at least (n-1)k unallocated, so the attainable allocated fraction approaches 1/n as k grows. Thus an n-only charity bound cannot be expected if this family is established; the substantive new question is whether the matching fraction is universally achievable. The family does not have the same behavior for n=2, so the question deliberately starts at three agents. It moves OP-1483 asked an n-1 bound on the number of unallocated goods, which fails; Hu, Mei and Zhang establish EFX existence and algorithms in settings including few distinct item values, without this cardinality guarantee. along quantitative: Replace an impossible agent-only charity bound by a sharp worst-case retained fraction as the number of goods grows, under complete packability and EFX comparisons with feasible charity subsets.. Evidence: Experiment 21908 exactly enumerates count states for the proposed obstruction for every n=3,...,6 and k=2,...,10, finding minimum charity (n-1)k. Experiments 21907 and 21911 independently enumerate all labeled allocations for its n=3, k=2 and k=3 cases and find minima 4 and 6. Experiment 21909 checks 12,657 fully packable two-type profiles for n=3,4 and finds no violation of the ceil(m/n) upper-charity formulation; experiment 21913 finds satisfying allocations on 1,096 random fully packable instances with n=3,4,5 and leaves four cases unknown. Experiment 21914 identifies that the proposed sharpness family behaves differently for n=2. These are finite computations, not a proof.

OP-1504 Tight Competitive Ratio for Randomized Online Graph ColoringNot in LeanOnline Algorithms

Does there exist a randomized online graph coloring algorithm $\mathcal{A}$ and an absolute constant $C > 0$ such that for every finite simple graph $G$ on $n \ge 2$ vertices, the expected number of colors used by $\mathcal{A}$ against an oblivious adversary satisfies $\mathbb{E}[\chi_{\mathcal{A}}(G)] \le C \cdot \frac{n}{\log^2 n} \cdot \chi(G)$?

Posed in arXiv:2611.14513, Conjecture 7.2 — Online Graph Coloring: Competitive Ratios Separating Randomized and Deterministic Algorithms

What is known

The 1994 lower bound established an Omega(n / log^2 n) lower bound on the competitive ratio of randomized online coloring against an oblivious adversary. This paper improved the upper bound from O(n / log n) to O(n (log log n)^2 / log^2 n), leaving an O((log log n)^2) factor gap, and conjectures that the Omega(n / log^2 n) lower bound is tight.

OP-1505 Super-Logarithmic Lower Bound for Deterministic Online Graph ColoringNot in LeanOnline Algorithms

Is it true that for every fixed constant $c > 0$, every deterministic online graph coloring algorithm has competitive ratio $\Omega(n / \log^c n)$, meaning that no deterministic online graph coloring algorithm can achieve a competitive ratio of $O(n / \log^c n)$ for any $c > 0$?

Posed in arXiv:2611.14513, Conjecture 7.1 — Online Graph Coloring: Competitive Ratios Separating Randomized and Deterministic Algorithms

What is known

The paper improves the deterministic lower bound to Omega(n / log n) and the deterministic upper bound to O(n / (log log n)^(2-epsilon)), leaving a wide gap. The authors conjecture that the lower bound side is closer to the truth, specifically that no deterministic online coloring algorithm can achieve a competitive ratio of O(n / log^c n) for any c > 0.

OP-1507 Collinear Eight-Point Line Avoidance in Unit-Distance-Free Plane ColoringsNot in LeanCombinatorics for TCS

Does $\mathbb{E}^2 \to (\ell_2, \ell_8)$ hold? That is, in every two-coloring $c: \mathbb{E}^2 \to \{0, 1\}$ of the Euclidean plane, does there exist either a monochromatic pair of points of color 0 at Euclidean distance 1 (an $\ell_2$), or a monochromatic set of 8 collinear points of color 1 with consecutive points at distance 1 (an $\ell_8$, formed by isometric image of $\{0, 1, \dots, 7\} \subset \mathbb{R}$)?

Posed in arXiv:2611.14131, Sec. 10, Problem 1 — Euclidean Ramsey Theory for Lines and Finite Configurations

OP-1508 Avoidance of Four-Point Collinear Lines in Three-Point-Free Planar Two-ColoringsNot in LeanCombinatorics for TCS

Does $\mathbb{E}^2 \to (\ell_3, \ell_4)$ hold? That is, in every two-coloring $c: \mathbb{E}^2 \to \{0, 1\}$ of the Euclidean plane, must there exist either three collinear points of color 0 with consecutive distance 1 (a monochromatic $\ell_3$), or four collinear points of color 1 with consecutive distance 1 (a monochromatic $\ell_4$)?

Posed in arXiv:2611.14131, Sec. 1.1, after Thm 2 — Euclidean Ramsey Theory for Lines and Finite Configurations

OP-1509 Monochromatic Unit Squares in Three-Dimensional Euclidean Space Two-ColoringsNot in LeanCombinatorics for TCS

Does $\mathbb{E}^3 \to (\mathcal{S}, \mathcal{S})$ hold? That is, in every two-coloring of three-dimensional Euclidean space $\mathbb{E}^3$, must there exist a monochromatic unit square (an isometric copy of $\{0, e_1, e_2, e_1 + e_2\} \subset \mathbb{R}^3$)?

Posed in arXiv:2611.14131, Sec. 1.2, before Thm 9 — Euclidean Ramsey Theory for Lines and Finite Configurations

OP-1510 Minimum Size and Canonical Structure of Maximal Sets of Mutually Orthogonal Partial Latin Squares for k at Least 4Not in LeanCombinatorics for TCS

Let $k \ge 4$ be an integer. For an integer $n$, let a $k$-MOPLS($n$) be a maximal set of $k$ mutually orthogonal partial Latin squares of order $n$ (viewed in superimposed form as an $n \times n$ array with empty cells and cells filled by $k$-tuples of symbols from $\{1, \dots, n\}$, such that each coordinate slice is a partial Latin square, no ordered pair of symbols appears more than once across any pair of coordinates, and no additional $k$-tuple can be placed in any empty cell without violating orthogonality or the Latin property). Let $n = (k+1)s + r$ with $0 \le r \le k$. Is it true that for every $k \ge 4$, there exists an integer $n_0(k)$ such that for all $n \ge n_0(k)$, the minimum number of filled cells in any $k$-MOPLS($n$) is exactly $(k+1-r)s^2 + r(s+1)^2$, and any $k$-MOPLS($n$) achieving this minimum can be put into the block-diagonal form of Construction 1 (comprising $k+1-r$ mutually orthogonal Latin squares of order $s$ and $r$ mutually orthogonal Latin squares of order $s+1$ on disjoint entry sets) by permuting rows and columns?

Posed in arXiv:2611.13961, Sec. 1, after Construction 1 — On the minimum number of entries in a set of maximal mutually orthogonal partial Latin squares

OP-1511 Exact Asymptotic Minimum of K4-Saturating Non-Edges at the Spectral Mantel ThresholdNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite simple graph on $n$ vertices, and let $\lambda(G)$ be the spectral radius of its adjacency matrix. A non-edge $uv \notin E(G)$ is called $K_4$-saturating if the graph $G + uv$ contains a copy of the complete graph $K_4$, and $f(G)$ denotes the total number of $K_4$-saturating non-edges. Let $T_{n,2}$ denote the balanced complete bipartite graph on $n$ vertices. Is it true that the minimum of $f(G)$ over all $K_4$-free graphs on $n$ vertices with $\lambda(G) > \lambda(T_{n,2})$ satisfies $\min \{f(G) : |V(G)| = n,\ G \text{ is } K_4\text{-free},\ \lambda(G) > \lambda(T_{n,2})\} = \left(\frac{\sqrt{6}-2}{8} + o(1)\right) n^2$ as $n \to \infty$?

Posed in arXiv:2611.13847, Sec. 6, Above the spectral Mantel threshold — Counting $K_4$-saturating non-edges in Nosal graphs

OP-1512 Asymptotic Minimum of K4-Saturating Non-Edges for Fixed Spectral Surplus Ratio Above Nosal ThresholdNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite simple graph with $m$ edges and adjacency matrix spectral radius $\lambda(G)$. A non-edge $uv \notin E(G)$ is $K_4$-saturating if $G + uv$ contains a copy of $K_4$, and let $f(G)$ be the number of $K_4$-saturating non-edges. For a fixed constant $\beta \in (1, 2/\sqrt{3}]$, determine the asymptotic minimum of $f(G)$ over all $K_4$-free graphs with $m$ edges satisfying $\lambda(G) \ge \beta \sqrt{m}$ as $m \to \infty$; specifically, determine the limit $\lim_{m \to \infty} \frac{1}{m} \min \{f(G) : e(G) = m,\ G \text{ is } K_4\text{-free},\ \lambda(G) \ge \beta \sqrt{m}\}$.

Posed in arXiv:2611.13847, Sec. 6, Further above the Nosal threshold — Counting $K_4$-saturating non-edges in Nosal graphs

OP-1513 Minimum Number of Clique-Saturating Non-Edges Above Nikiforov's Spectral Threshold for General CliquesNot in LeanGraph Theory & Graph Algorithms

Let $r \ge 3$ be an integer. For a finite simple graph $G$ with $m$ edges, a non-edge $uv \notin E(G)$ is $K_{r+2}$-saturating if $G + uv$ contains a complete subgraph on $r+2$ vertices, and let $f_{r+2}(G)$ denote the number of such non-edges. What is the asymptotic minimum of $f_{r+2}(G)$ over all $K_{r+2}$-free graphs with $m$ edges and adjacency spectral radius $\lambda(G) > \sqrt{2m(1-1/r)}$ as $m \to \infty$? Specifically, find the constant $C_r$ such that the minimum is $(C_r + o(1)) m$.

Posed in arXiv:2611.13847, Sec. 6, Saturating non-edges for larger cliques — Counting $K_4$-saturating non-edges in Nosal graphs

OP-1515 Existence of a 14-Vertex Triangulation of the Three-TorusNot in LeanCombinatorics for TCS

Does there exist a simplicial triangulation of the three-dimensional torus $T^3 = S^1 \times S^1 \times S^1$ on exactly 14 vertices? Equivalently, is the minimum number of vertices $v(T^3)$ in a simplicial complex whose geometric realization is homeomorphic to $T^3$ equal to 15?

Posed in arXiv:2611.14367, Corollary 1.2 — No 13-vertex triangulation of the three-torus

What is known

The 15-vertex neighborly triangulation of the three-dimensional torus was constructed in 1984, and was conjectured in 2005 (arXiv:math/0506372, Conjecture 22) to be vertex-minimal. Lower-bound techniques based on the g2-inequality exclude triangulations on at most 12 vertices, and this paper excludes 13 vertices, leaving 14 vertices as the sole unresolved case.

OP-1518 Optimal Exponent in Nonadaptive One-Sided Testing of Binary RankNot in LeanStreaming & Sublinear Algorithms

For nonadaptive one-sided testing of whether an $n \times m$ binary matrix has binary rank at most $d$ versus being $\epsilon$-far in normalized Hamming distance from having binary rank at most $d$, what is the optimal exponent $\gamma$ of $d$ in the worst-case query complexity for constant $\epsilon > 0$? In particular, does there exist an upper bound of $\tilde{O}(d^\gamma / \epsilon^2)$ for some $\gamma < 4$, or can the lower bound be improved from $\tilde{\Omega}(d^{3/2}/\epsilon)$ to $\tilde{\Omega}(d^\gamma/\epsilon)$ for some $\gamma > 3/2$?

Posed in arXiv:2611.14163, Sec. 6 — Nonadaptive One-Sided Testing of Binary Rank

OP-1520 Exact Value of the Zero-Sum Constant s_n^* for Odd Composite ModuliNot in LeanElementary Number Theory

Let $n \ge 3$ be an odd integer. Define $\mathsf{s}_n^*$ to be the smallest integer $l$ such that every sequence of $l$ integers coprime to $n$ contains a subsequence of length $n$ whose sum $S$ satisfies $S \equiv 0 \pmod n$ but $S \not\equiv 0 \pmod{n^2}$. Is $\mathsf{s}_n^* = 2n+1$ for all odd integers $n \ge 3$?

Proposed here, building on arXiv:2611.14248, Sec. 1, after Cor. 1.2 — The zero-sum constant $\mathsf{s}_p^*$ and inverse problem; the paper does not ask it

What is known

The paper proves Corollary 1.2, establishing that $\mathsf{s}_p^* = 2p+1$ for every odd prime $p$. For any odd integer $n \ge 3$, the sequence $1^{n-1}(1-n)(-1)^{n-1}(n-1)$ of length $2n$ consists of integers coprime to $n$ and has no $n$-term subsequence whose sum is divisible by $n$ but not $n^2$, showing $\mathsf{s}_n^* \ge 2n+1$. The paper leaves open whether $\mathsf{s}_n^* = 2n+1$ holds for all odd composite moduli $n$ (or already for odd prime powers $n = p^k$ with $k \ge 2$). This is open and cannot be answered by the prime-modulus techniques alone, as Cauchy-Davenport and Vosper theorems require prime order.

OP-1522 Row-independence of infinity-norm integer programming proximityNot in LeanInteger & Polyhedral Optimization

Let $m \geq 1$ and $\Delta \geq 1$ be positive integers. For an integer constraint matrix $A \in \mathbb{Z}^{m \times n}$ of full row rank with greatest common divisor of maximal minors $\gcd(A) = 1$ and maximum absolute $m \times m$ minor $\Delta(A) \leq \Delta$, vector $b \in \mathbb{Z}^m$, and objective vector $c \in \mathbb{R}^n$ such that the integer program $\max\{c^\top z : Az = b, z \in \mathbb{Z}_{\geq 0}^n\}$ attains a finite optimum, let $V^*(A,b,c)$ be the set of optimal vertices of the linear relaxation $\max\{c^\top x : Ax = b, x \in \mathbb{R}_{\geq 0}^n\}$ and $Z^*(A,b,c)$ the set of optimal integer solutions. Define the proximity $\pi^\infty(m, \Delta) = \sup_{A,b,c} \max_{x^* \in V^*(A,b,c)} \min_{z^* \in Z^*(A,b,c)} \|z^* - x^*\|_\infty$. Is $\pi^\infty(m, \Delta) = \Delta - 1$ for all $m \geq 1$ and all $\Delta \geq 1$, i.e., is the optimal $\ell_\infty$-norm proximity independent of the row dimension $m$?

Posed in arXiv:2611.14052, Sec. 1, p. 3 — Sharp Proximity Bounds for Integer Programs with Few Rows

OP-1523 Weak Hilbert basis representation conjecture for general row countNot in LeanInteger & Polyhedral Optimization

Let $m \geq 1$ and $n \geq m+1$ be integers, and let $A \in \mathbb{Z}^{m \times n}$ have full row rank with $\gcd(A) = 1$. For each subset $I = \{i_0, i_1, \ldots, i_m\} \subseteq [n]$ of cardinality $m+1$ with $i_0 < i_1 < \cdots < i_m$, define the normalized generator $r^I = \sum_{\ell=0}^m (-1)^\ell \det(A_{I \setminus \{i_\ell\}}) e_{i_\ell} \in \ker(A) \cap \mathbb{Z}^n$. Let $\mathcal{R}(A) = \{\pm r^I : I \subseteq [n], |I| = m+1\}$. Let $\mathcal{H}(A)$ denote the Hilbert basis of the pointed cone $\ker(A) \cap \mathbb{R}_{\geq 0}^n$, defined as the set of nonzero vectors in $\ker(A) \cap \mathbb{Z}_{\geq 0}^n$ that cannot be written as the sum of two nonzero vectors in $\ker(A) \cap \mathbb{Z}_{\geq 0}^n$. Does every Hilbert basis element $h \in \mathcal{H}(A)$ belong to the convex hull $\mathrm{conv}(\{0\} \cup \mathcal{R}(A))$?

Posed in arXiv:2611.14052, Sec. 1, p. 5 — Sharp Proximity Bounds for Integer Programs with Few Rows

OP-1526 Existence of Non-Reconstructible Signed Graphs on More Than Four VerticesNot in LeanCombinatorics for TCS

Does there exist a pair of non-isomorphic finite signed graphs $(\Gamma_1, \sigma_1)$ and $(\Gamma_2, \sigma_2)$ on $n > 4$ vertices that have the same switching deck (the multiset of isomorphism classes of single-vertex switchings)?

Posed in arXiv:2611.13901, Sec. 2.1, lines 310-313 — Switching reconstruction of signed graphs: net-degree and balance

What is known

Stanley conjectured in 1985 that all graphs on at least 5 vertices are reconstructible under vertex-switching. For general signed graphs, pairs of non-isomorphic graphs with the same switching deck are known for n = 4, but whether any exist for n > 4 remains open.

OP-1530 Parity of the Thirteenth Dedekind NumberNot in LeanCombinatorics for TCS

Is the thirteenth Dedekind number $d_{13}$ even or odd? That is, does $d_{13} \\equiv 1 \\pmod 2$ or $d_{13} \\equiv 0 \\pmod 2$, where $d_{13}$ is the number of monotone Boolean functions on $13$ variables (the cardinality of the poset of order-preserving maps from $\\{0, 1\\}^{13}$ to $\\{0, 1\\}$)?

Proposed here, building on arXiv:2611.13887, Theorem 11 — Congruences for Dedekind numbers; the paper does not ask it

What is known

Yamamoto (1953) proved that d_n is even for every even n. For odd n, parities are irregular: d₁ is odd, d₃ is even, d₅ is odd, d₇ is even, d₉ is even, and d₁₁ was claimed to be odd by Yamamoto without proof, which Theorem 11 of this paper confirms. The parity of d_n for odd n ≥ 13 remains open; d₁₃ is the first unknown case. Under the paper's framework, d₁₃ mod 2 is given by the parity of fixed points under any 2-subgroup of S₁₃ (for instance an 8-cycle), reducing the problem from size 2¹³ to a significantly smaller quotient poset.

OP-1531 cubic ising high temperature sharp heat capacity crossoverNot in LeanStatistical Mechanics & Thermodynamics

For a nonempty finite simple 3-regular graph G, put H_G(sigma) = -sum_{uv in E(G)} sigma_u sigma_v for sigma in {-1,+1}^V, and let c_G(beta) = Var_beta(H_G)/|V(G)| under the Gibbs distribution proportional to exp(-beta H_G). Define beta_* as the smallest positive beta for which c_{K_4}(beta)=c_{K_{3,3}}(beta); numerically beta_* = 0.35084272889. Is it true that c_G(beta) <= c_{K_4}(beta) for every G and every 0 < beta <= beta_*? For 0<beta<beta_*, is equality attained only by disjoint unions of K_4, and at beta_* only by disjoint unions of K_4 and K_{3,3}? The interval would be sharp because K_{3,3} has strictly larger variance immediately above beta_*.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The variance per site is the specific heat divided by beta squared, so this determines a sharp, graph-independent high-temperature fluctuation bound and its topology-changing threshold for all cubic networks. Sah, Sawhney, Stoner and Zhao prove K4 maximizes the normalized ferromagnetic Ising partition function at every temperature, but differentiating an inequality twice is invalid, and K3,3 already overtakes K4 for beta just above beta_*. The cubic heat-capacity question is distinct from OP-1360, which compares trees with all connected graphs of a fixed order at low temperature. The crossover, explicit extremizers, and entire interval are new, not a single finite instance. Evidence: Experiment 22364 enumerated all 4,680 connected cubic graphs on 6,8,10,12,14,16 vertices (plus K4), with no violations at ten beta values through 0.35; K3,3 first crosses K4 at 0.35084272889. Experiment 22365 checked 40 random cubic graphs each at orders 18,20,22,24,26 plus ladders, with no violations at six points through beta_*. It also computed the exact even-subgraph polynomials 1+4t^3+3t^4 and 1+9t^4+6t^6, t=tanh(beta); experiment 22363 independently enumerated spin configurations on all connected cubic graphs through 12. These are finite numerical checks, not a proof of the continuous or all-graph inequality.

OP-1538 cubic hard core variance complete bipartite cube sharp crossoverNot in LeanStatistical Mechanics & Thermodynamics

For every nonempty finite simple cubic graph G, let Z_G(x)=sum over independent sets I of x^|I| and v_G(x)=Var_x(|I|)/|V(G)|, where P_x(I)=x^|I|/Z_G(x). Let alpha be the unique positive root of 8x^8+46x^7+84x^6-24x^5-308x^4-441x^3-266x^2-68x-6, approximately 1.85610635. Is v_G(x) <= v_{K_3,3}(x) for every such G and every 0<x<=alpha? Is this the largest initial activity interval with that universal property, witnessed for every x>alpha by the 3-dimensional cube Q_3?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The variance fraction is the physical particle-number susceptibility and measures fluctuations rather than mean density. Davies, Jenssen, Perkins and Roberts prove K_d,d maximizes occupancy for every positive fugacity on all d-regular graphs; this does not imply a derivative bound. Zhang and Xu's 2026 work provides variance lower bounds and their later small-fugacity hypergraph upper expansions treat uniformity at least 3, not this sharp cubic graph extremum. The preceding AFTD OP-1354 asks for a Petersen lower bound on triangle-free cubic graphs and does not bound this upper envelope. A universal sharp activity window would be a substantive susceptibility analogue of the occupancy theorem, with the cube fixing its nontrivial endpoint. Evidence: Experiment 22938 enumerated all connected cubic graphs up to 16 vertices (including 4060 at order 16) and used exact independence polynomials plus numerical roots; Q_3 has the earliest observed first crossing. Experiment 22945 identifies its polynomial and computes the exact rational variance difference, with gap positive at 1 and negative at 2; the numerator polynomial has exactly one positive root. Experiment 22936 independently scanned a grid of activities and found higher-activity graphs beating K_3,3. Finite numerical root searches are evidence, not a universal proof.

OP-1540 subcubic random greedy independence sharp variance densityNot in LeanGraph Theory & Graph Algorithms

Let G be any nonempty finite simple graph of maximum degree at most three. Independently choose a uniformly random vertex order and greedily accept a vertex if it has no previously accepted neighbor; let X_G be the resulting independent-set cardinality. Is Var(X_G) <= 3|V(G)|/16? Is equality attained if and only if every connected component of G is isomorphic to the four-vertex star K_1,3?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Random sequential adsorption and random-greedy algorithm analysts seek sharp fluctuation constants at bounded degree. Shaikh's 2026 theorem gives Var(X_G)<=|E(G)|((n-2)/n)^2 on triangle-free graphs, which yields only about 3n/2 in the subcubic case and does not cover triangles; the earlier bounded-degree result gives an unspecified constant. OP-1364 asks which tree maximizes total variance at a fixed order, whereas this asks a sharp all-order density bound over arbitrary graphs, including cycles and triangles. A star has X=1 with probability 1/4 and X=3 otherwise, so it attains the proposed density; arbitrary disjoint unions then attain it at unbounded orders. An analogous star statement already fails at maximum degree four, so the subcubic threshold is a substantive structural boundary. Evidence: Experiment 22953 enumerates every connected graph of maximum degree at most three through 12 vertices and computes random-first-arrival moments by subset recursion; experiment 22956 separately checks all 69,322 such graphs at 13 vertices. The maximum density seen is 3/16, achieved only by the four-vertex star in this census. Experiment 22955 tests degree bounds through 6 and finds the naive analogous degree-four star bound 36/125 fails; experiment 22957 computes exactly a degree-four 8-vertex witness of density 551/1800 > 36/125. Floating-point enumeration is evidence, not a proof of the universal inequality or equality characterization.

OP-1541 four leg arrows odd even arm sharp period four thresholdNot in LeanCombinatorial Games

For each odd integer j>=3 and integer z>=1, form the four-legged tree S(1,2,2j,z): from a common center attach four paths whose lengths are respectively 2, 3, 2j+1, and z+1 edges. The last edge of each leg is pendant and cannot be marked. Play the Game of Arrows: alternate orienting an unmarked edge, without ever making all incident edges of any vertex point in or all point out; the last legal mover wins. Let g_j(z) be the Sprague-Grundy value of the empty position. Put T_j=max(18,4j+2). Is it true that g_j(z)=0 when z is divisible by 4 and g_j(z)=1 otherwise, for every z>=T_j, and that T_j is the least such threshold, i.e. g_j(T_j-1) differs from that formula?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Impartial-game researchers seek infinite families with exact Grundy values and eventual periodicity. Xu proves exact binary-carry formulas for three-legged spiders S(1,2j,z), and an eventual parity theorem for many other fixed pairs. Here the fourth, distinct leg changes the mex recurrence: before any central edge is marked there are four attached branches, so the three-leg proof and twin-branch cancellation do not apply. This asks for an explicit optimal transition and an exact all-j law, not another numerical small case. It also predicts a genuine period four rather than the period two of the common three-leg behavior. Evidence: Experiment 22972 evaluates the Proposition 6.1 spider-state recurrence for odd j=3,5,7,9,11,13,15 and every z<=180. The last exceptions to the proposed period-four formula are respectively 17,21,29,37,45,53,61, exactly T_j-1. Experiment 22971 computes literal legal-move Grundy values on S(1,2,6,z), z=1,...,5, and experiment 22974 independently checks the spider recurrence gives the same values. Experiment 22969 finds a different period-sixteen behavior for even j=2,4, so extending this formula to every j is not supported. The checks are finite and do not prove the conjecture.

OP-1542 subcubic random edge greedy matching sharp three quartersNot in LeanOnline Algorithms

For every finite simple graph G with maximum degree at most three, expose its edges in a uniformly random order and greedily accept an edge if neither endpoint is already matched. Let M be the resulting random matching and let nu(G) be the maximum matching size. Is E[|M|] >= 3 nu(G)/4 for every such G? Since the four-vertex graph formed from a triangle by adding a leaf to one triangle vertex has nu=2 and expected greedy size 3/2, an affirmative answer would give the exact worst-case approximation ratio 3/4, attained also by disjoint unions of this graph.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The random-edge-order greedy matching rule is a basic online matching baseline. Feng, Li and Yang study algorithms beating 1/2 on unrestricted graphs; their bound does not resolve its sharp bounded-degree performance. For maximum degree 3, the general bounded-degree lower bound of Miller and Pritikin gives (sqrt(5)-1)/2, about 0.618, whereas the data suggest the exact constant is 0.75. The problem is a finite combinatorial performance theorem over all graph sizes and is directly testable by the random-first-edge recurrence; it does not ask for the optimal online policy or assert a complexity-theoretic lower bound. Evidence: Experiment 23008 enumerates all connected subcubic simple graphs through 12 vertices and calculates the greedy expectation and exact optimum by induced-vertex subset recursion; the smallest ratio is 3/4 at the four-vertex paw, while the smallest observed at order 12 is 334589/442260. Experiment 23014 checks chains of a near-extremal 10-vertex gadget through 40 vertices, with all ratios at least 3/4. Experiment 23015 performs 2297 degree-bounded local mutations at 10,16,22 vertices and finds no smaller ratio. The floating-point searches are evidence; the paw and displayed order-12 values were also evaluated with exact rational arithmetic.

OP-1544 two agent bivalued chores sharp mms crossover above twoNot in LeanFair Division

Let rho=(3+sqrt(13))/2. For every real 2<=r<=rho, consider two agents with additive costs for finitely many indivisible chores, where agent i values each chore at either a_i or r*a_i for some a_i>0. Let mu_i be her two-agent chore maximin share. Is there always a partition S,S^c such that both bundles cost at most (1+1/r) mu_i to each agent i? Is 1+1/r the exact smallest universal factor even for arbitrary complete-allocation lotteries that give each agent each chore with probability 1/2? Further, is rho the largest endpoint of an initial interval beginning at 2 with this guarantee: for each r in (rho,4], does the five-chore profile with cost pairs (1,r),(r,1),(r,1),(r,1),(r,1) rule out every equal-marginal lottery supported on allocations at factor 1+1/r?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This continues the already proved two-agent result, which gives the exact factor (r+1)/2 only for 1<=r<=2. Above two, the same proof's factor increases while the three-chore obstruction suggests the decreasing factor 1+1/r. A sharp larger interval and its first algebraic crossover would reveal how value dispersion changes equal-marginal truthfulness and ex-post MMS fairness; beyond the crossover, the five-chore obstruction forces a new regime. The condition that one partition is safe for both agents in both orientations is a constructive strengthening of equal-marginal feasibility, whereas the stated lower bounds apply to every such lottery. Evidence: Experiment 23053 checks every four-type count profile through 13 chores at nine ratios from 2 to 3, and 23057 repeats this for 16 ratios from 3 to 3.30: the worst universally safe partition has exactly factor 1+1/r. Exact integer-model searches 23055 and 23058 find feasible safe partitions in 21,200 randomized count profiles, including ratios 3.30277 and counts up to 40 per type. Experiment 23059 enumerates all allocations using rational arithmetic: just above rho, at 7/2, and at 4, every allocation meeting 1+1/r for the five-chore profile gives the first chore to agent 1, which contradicts equal marginals; the three-chore profile forces the converse lower bound below 1+1/r. The irrational endpoint and universal upper bound remain conjectural.

OP-1545 nonlocal stabilizer magic dyadic staircase sharp profileNot in LeanQuantum Computation

For every n>=2 let m_0=m_1=1 and m_k=2^(k-1) for 2<=k<=n. Let W_n be the probability vectors w=(w_0,...,w_n) with w_0>=w_1 and 2w_k>=w_(k+1) for 1<=k<n. They define sorted dyadic-staircase Schmidt probabilities lambda_x=w_k/m_k on the shell D_0={0}, D_k={2^(k-1),...,2^k-1}. Define P=sum_k w_k^2/m_k, C_r=2(w_r/m_r)sum_(j<r)w_j+sum_(k>r)w_k^2/m_k for 1<=r<=n, and B_ab=(1/4)sum_(k>a)w_k^2/m_k+(w_a/(2m_a))sum_(b<t<a)w_t+(w_a/m_a)sqrt(w_b/m_b)sum_(j<b)sqrt(m_j w_j), for 1<=b<a<=n. Let F_n(w)=P^2+3 sum_(r=1)^n m_r C_r^2+48 sum_(1<=b<a<=n) m_a m_b B_ab^2. Is it true that (n+1)^3 min_(w in W_n) F_n(w) converges to 267+168 sqrt(2), and that for every sequence w^(n) of minimizers the shell-mass measures sum_k w_k^(n) delta_(k/(n+1)) converge weakly to the uniform probability measure on [0,1]? Equivalently, within this class, is the maximum nonlocal stabilizer Renyi-2 entropy 3 log_2(n+1)-log_2(267+168 sqrt(2))+o(1), with the stated extremizer profile?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Quantum information researchers seek the largest magic intrinsic to bipartite entanglement and the spectral shape of states that realize it. Sierant proves computational-basis optimality for every staircase and a universal 3 log_2(n+1)+4 upper bound, but does not find the maximum within staircase spectra, its sharp additive asymptotics, or the optimizer's limiting spectral profile. The problem is an all-dimensions variational characterization, not the paper's general computational-basis optimality conjecture. The finite function F_n is exactly its Pauli stabilizer purity, allowing a theorem to be formulated without quantification over growing-dimensional local unitary groups. Evidence: Constrained numerical minimization through n=100 produces a nearly uniform bulk profile with O(1/n) endpoint layers (23073,23080); equal-shell staircases through n=2000 approach the displayed constant (23078); constrained periodic profiles of periods 2,3,4,5,6,8,12 do not improve the predicted bulk constant (23081). An independent Walsh-Pauli calculation agrees with the pivot formula through n=7 and the infinite geometric bulk sum gives the displayed radical (23082). The unconstrained oscillatory optima in 23078 violate the sorted-staircase constraints and are not evidence for the conjecture.

OP-1548 online common bivalued chores three halves mmsNot in LeanFair Division

For every real r >= 1, is there a deterministic online algorithm (which may know r) with the following property? Two agents receive an unknown-length sequence of indivisible chores. On each arrival the costs to the two agents, each in {1,r}, are revealed and the chore is immediately and irrevocably assigned to one agent. After every nonempty prefix P, each agent's accumulated cost is at most 3/2 times her two-agent chores maximin share MMS_i(P) = min over S subset P of max(c_i(S),c_i(P\S)). Is the best universal factor over all r exactly 3/2?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

For online fair task assignment this would close the gap between the existing 5/3 algorithm for personalized bivalued costs and the 3/2 impossibility in a standard common-scale bivalued family, for an unbounded horizon. The paper's 3/2 lower-bound instance itself uses common costs 1 and 2; its 5/3 analysis uses arbitrary individual ratios and does not give a 3/2 upper bound for a common known ratio. The claim is an upper bound uniformly for every real r, and sharpness follows from the paper's lower-bound construction. The computations also rule out extrapolating the initially tempting pointwise formula (1+r)/2: r=6/5 gives a larger minimax ratio by 12 items. Evidence: Exact rational backward induction over all four possible arriving cost pairs and all allocation decisions, with every prefix scored, gave horizon-15 minimax values at most 3/2 for r=6/5,4/3,3/2,7/4,2,5/2,3,4; value is exactly 3/2 for r=2 and 4. Finite-horizon optimal policies may depend on the horizon, so they do not establish an infinite-horizon algorithm.

OP-1549 tree graph state fixed size mean entropy path extremaNot in LeanQuantum Mechanics

For every n >= 4 and every n-vertex tree T, let r_T(S) be the rank over F_2 of the adjacency submatrix with rows S and columns V(T)\S, and put E_k(T)=sum over k-element subsets S of r_T(S). Is E_k(K_{1,n-1}) <= E_k(T) <= E_k(P_n) for all 0 <= k <= n? Does equality of the entire E_k vector with that of the path or star characterize the corresponding tree? Equivalently, are the star and path the minimizer and maximizer, respectively, of the mean von Neumann bipartite entropy of the tree graph state at every fixed subsystem size?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Graph-state researchers use cut rank as the bipartite entanglement entropy. This asks for the optimal tree geometry across all subsystem sizes, not an isolated graph: a coefficientwise entanglement theorem applicable to arbitrary qubit number. OP-1367 conjectures extrema for the different observable sum 2^{-r_T(S)}, and its experiments found fixed-cardinality stochastic domination of the ranks is false, so neither that conjecture nor an evident pointwise coupling yields this mean-rank inequality. Nguyen and Oum's uniform average cut-rank monotonicity under vertex-minors does not compare distinct n-vertex trees, and Fuentes et al. analyze tripartite rather than average bipartite entropies. Evidence: Experiment 23481 computed every fixed-size binary cut-rank sum for every nonisomorphic tree on 4 through 12 vertices: both inequalities held in every size and only the path and star had their respective full profiles.

OP-1550 two row sharp graver coordinate four distinct columnsNot in LeanCombinatorics for TCS

Let A be any rank-two integer matrix with columns a_1,...,a_n and let Delta be the maximum absolute value of its 2-by-2 minors. Call h in Z_{>=0}^n a Hilbert atom if Ah=0, h is nonzero, and it has no proper nonzero coordinatewise subvector in the integer kernel. Whenever h_j = Delta for at least one j, must the set of distinct column vectors {a_i : h_i>0} have at most four elements? Is four attained? Repeated columns count once; there is no bound claimed on the number of indices supporting h.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for structural rigidity at equality in a sharp new determinant bound for two-row Graver/Hilbert atoms, a family relevant to integer programming and lattice optimization. Kuhlmann and Xu's Lemma 4(ii) bounds each coordinate by the maximum minor after deleting that column; it does not classify supports attaining the global bound. Their lifting goes via a one-row Hilbert decomposition, and equality can coexist with a non-circuit atom, so restricting attention to three-column circuits misses extremizers. Distinct column vectors rather than indices are essential, since duplicated columns can split an atom's multiplicities without changing its determinant bound. Evidence: Experiment 23492 exhaustively searched 37,128 distinct five-column sets from [-2,2]^2 with 2<=Delta<=6, testing every possible distinguished coordinate and all positive kernel candidates with that coordinate equal to Delta; it found no atom with five-column support. Experiment 23491 tested 1,479 random matrices with up to six distinct columns and found no support-five extremizer. Experiment 23489 found a four-distinct-column extremal atom: columns (-1,1),(0,-2),(3,0),(3,-2), h=(6,2,1,1), Delta=6. These are computational observations, not Lean proofs.

OP-1551 cactus pruned random greedy mis poly degree queriesNot in LeanAlgorithm Design & Analysis

Does there exist an absolute constant C such that the following holds for every finite connected simple cactus graph G of maximum degree Delta>=2 and every starting vertex v? Assign independent continuous uniform ranks to vertices. To query u, recursively query its lower-ranked neighbors in increasing rank order, stopping as soon as a query returns YES; return NO in that case and YES if no lower-ranked neighbor returns YES. Let Q(G,v) count all recursive calls including the initial call and repeated calls to the same vertex, with no memoization. Is E[Q(G,v)] <= (Delta+1)^C, independently of |V(G)| and the number and lengths of cycles? A cactus is a graph in which every edge belongs to at most one simple cycle.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Local computation of a greedy maximal independent set underlies sublinear matching and vertex-cover algorithms. Dalirrooyfard et al. recently proved the polynomial-in-Delta worst-vertex expectation for trees, but their proof uses independent rooted descendant subtrees and simple query paths. Cactus cycles create two paths to a vertex and repeated calls with the same sampled rank, so unfolding them into a tree does not preserve independent randomness. Extending the result uniformly to arbitrarily many cycles and all graph sizes would isolate how far the tree theorem survives beyond treewidth one; it is a structural query-complexity theorem rather than one more finite example. Evidence: Experiment 23500 exactly enumerates vertex orders and rooted cactus isomorphism classes through seven vertices; cycles already change the optimum (at four vertices C4 has expectation 2 while the tree maximum is 43/24). Experiment 23497 simulates 8,000 runs for each of 12 triangle-cactus families with branching degrees 2,4,8,12, up to eight cycles and 32,045 vertices; mean costs ranged from 2.58 to 4.89, while repeated calls were observed up to four times for one vertex. The simulations are not a proof of a polynomial bound.

OP-1554 random graph state balanced cut entropy extreme square rootNot in LeanQuantum Mechanics

For each even n, draw G from G(n,1/2) and let D_n be the maximum over all subsets S of n/2 vertices of n/2 minus the rank over F_2 of the adjacency submatrix between S and its complement. Is D_n/sqrt(n) convergent to 1 in probability as n tends to infinity? Equivalently, is the smallest balanced bipartite entanglement entropy of the associated n-qubit graph state n/2 - (1+o_P(1)) sqrt(n) bits?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The smallest balanced-cut entropy quantifies the weakest half-system entanglement of a random graph-state resource when the partition is chosen after the state is known; this is an all-bipartitions extreme rather than the typical entropy at one cut. The first-moment threshold for independent-looking cuts suggests the explicit constant 1, but these cut-rank events are strongly dependent because all submatrices come from the same symmetric adjacency matrix. Lee, Lee and Oum determine random rank-width at leading order, which optimizes over decomposition trees and examines unbalanced separators; it does not determine the square-root deficit of the minimum equal bisection. Fuentes et al. use cut rank for graph-state entropy but do not establish this extremal law. OP-1211 and OP-1213 address only a linear number of sliding cuts. The result would bridge random finite-field matrices, random graph geometry, and operational worst-cut entanglement. Evidence: Experiments 23892 and 23899 exhaust every balanced cut of 60,60,50,30,20,10,29,10,4 independent random graphs at n=8,10,12,14,16,18,20,22,24, respectively, using exact binary elimination. Mean maximum deficits are 2.02, 2.25, 2.64, 3.03, 3.05, 3.30, 3.79, 4.00 and 4.00. At n=22 every tested graph has maximum 4; at n=24 every tested graph has maximum 4. Finite sizes and the small number of larger samples do not establish the limiting constant.

OP-1555 subcubic random greedy claw sharp lower tail mgfNot in LeanGraph Theory & Graph Algorithms

For every finite simple graph G with n vertices and maximum degree at most 3, let X_G be the size of the maximal independent set produced by the random greedy vertex-order algorithm. Is it true for every real t >= 0 that E[exp(t(E[X_G]-X_G))] <= ((exp(3*t/2)+3*exp(-t/2))/4)^(n/4)? Equivalently, does the four-vertex claw maximize the centered lower-tail log moment generating function per vertex for every t >= 0?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The full exponential-moment comparison gives sharp Chernoff lower-tail bounds for random sequential adsorption and greedy graph algorithms, beyond a variance estimate. It would imply OP-1540 by the t -> 0 expansion and is attained for every t by disjoint unions of four-vertex claws, so its constant is sharp at arbitrarily large orders. The whole-parameter claim is genuinely one-sided: even a seven-vertex tree defeats the analogous upper-tail inequality at t=log 2. Shaikh's edge-based variance theorem does not control exponential moments or graphs with triangles; OP-1540 asks only for the quadratic coefficient. This supplies a concrete probabilistic strengthening of the stalled variance thread with identifiable extremizers and a precise tail consequence. It moves OP-1540 conjectures Var(X_G) <= 3|V(G)|/16; Shaikh, arXiv:2609.14826, proves a different variance upper bound for triangle-free graphs. along stronger_result: Ask for the sharp centered lower-tail exponential moment for every positive parameter, not just the second moment.. Evidence: Experiment 23908 enumerates every connected subcubic graph through 11 vertices and computes its exact finite-support distribution by random-first-vertex recursion; 23917 extends the census to all 19,430 connected graphs on 12 vertices and 69,322 on 13. At t = .02,.1,.5,1,2,4,10,20, no graph beats the proposed lower-tail bound, using floating-point evaluations. Experiment 23901 tests 898 additional random degree-constrained graphs through 16 vertices. Experiment 23924 gives an exact rational comparison at t=log 2 showing the reversed-sign upper-tail bound fails on a 7-vertex tree with edge set {05,06,15,25,36,46}; its greedy size probabilities at 2,3,5 are 2/21,1/3,4/7. These computations do not establish the all-t inequality.

OP-1556 odd dihedral cayley optimal equitable transversal partitionNot in LeanCombinatorics for TCS

For every odd integer n >= 3, does the Cayley table of the dihedral group D_n of order N=2n admit a partition into N+2 partial transversals such that exactly four have size N-1 and the remaining N-2 have size N-2? A partial transversal contains at most one cell from each row, each column and each group-product symbol.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The question is a specific new infinite nonabelian case of Cavenagh and Kuhl's earlier general equitable-coloring conjecture, not a claim that the general conjecture is new. The recent exact chromatic number makes N+2 the provably optimal number of parts. Their Theorem 5.28 constructs 2n large color classes of size 2n-1 and two smaller classes of size n, so its coloring is not equitable for n>=5. Balancing would require transferring cells without repeating a row, column or product; the cyclic-square balancing construction relies on cyclic shifts and does not directly apply to the semidirect product. This would give a structured all-orders family in Latin-square coloring and noncommutative design theory, including every equality class size rather than just a numerical chromatic bound. It moves Shokri and Akbari, arXiv:2611.13274, Theorem 5.28, prove that for odd n >= 3 the Cayley table of D_n has chromatic number 2n+2. along stronger_result: Require an equitable optimal coloring, thereby connecting the 2026 dihedral theorem to the earlier equitable-optimal-coloring conjecture for Latin squares.. Evidence: Experiment 23918 uses a constraint program to find and directly check valid equitable optimal-coloring certificates for n=3 and n=5 (table orders 6 and 10). Experiment 23936 independently verifies every cell of an explicit 14-by-14 certificate for n=7, checking all row, column and product constraints as well as the four sizes 13 and twelve sizes 12. A 180-second search for n=9 returned UNKNOWN (23948), not a negative result. These finite certificates do not prove existence for all odd n.

OP-1557 three agent snake swapped priority sharp ex ante envyNot in LeanFair Division

Fix three agents with arbitrary strict rankings of m=3r indivisible goods, r>=1. Given a priority order pi, let all agents pick their favorite remaining good for r rounds, using pi in odd-numbered rounds and the reverse order in even-numbered rounds. For distinct agents i,j and k in {1,...,m}, let D_pi(i,j,k) be the number of i's k highest-ranked goods received by j minus the number received by i. Let pi' be pi with i and j interchanged. Is D_pi(i,j,k)+D_pi'(i,j,k) <= 1 for every instance, pi, i,j,k? In particular, does uniform random priority have worst-case expected prefix envy exactly 1/2 for every r>=3?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This would quantify a sharp failure of ex-ante fairness for the widely used randomized snake draft under worst-case preferences, and give an elementary paired-order explanation of the half-good bound. Ex-post EF1 bounds each deterministic prefix difference by one but alone gives only an expected bound of one. Random serial dictatorship can fail ex-ante envy-freeness already for one round; the question is whether the maximum loss under many alternating rounds remains at most half a good. The bound would be tight for arbitrarily many goods: a nine-good preference profile achieves expected gap 1/2, and adding lower-ranked goods in multiples of three preserves its first six picks. Unlike OP-1493 and OP-1539, the preferences here are adversarial fixed rankings, not independent random utilities. The paired inequality appears special to few agents: a direct five-agent counterexample has sum 2. It moves Chernulich and Yenmez, arXiv:2611.09685, characterize the block-snake draft and prove ex-post EF1 and compensatory fairness. For equally sized bundles their schedule is the usual snake draft. along new_setting: Study worst-case ex-ante rank-prefix envy under a randomized priority order, and its sharp role-swapping inequality, rather than ex-post EF1 or expected utility under random valuations.. Evidence: Experiment 23944 independently encodes all six priority orders and preference rankings as an exact finite constraint model and finds the maximum expected-prefix difference is 2/6 for m=6 and 3/6 for m=9, with an optimal solver status for both. Experiment 23949 separately optimizes the paired-priority sum and returns 1 as its exact finite optimum at m=6 and m=9. Experiment 23942 directly verifies an explicit m=9 witness with paired gaps giving expected 1/2 and checks its padding at m=12,15,30,60. Experiment 23959 searches 30,000 ranking mutations per size through m=36 and finds no paired gap greater than 1; experiment 23945 finds that the same paired assertion fails for five agents. Solver outcomes and searches are computational evidence, not Lean proofs.

OP-1561 random snake draft sharp envy agent count frontierNot in LeanFair Division

For each integer n>=2, define alpha_n as the supremum over all integers r>=1, all strict preference profiles on nr goods, all ordered pairs i != j, and all rank cutoffs k, of the expected value of D_pi(i,j,k), where pi is uniform among the n! priority orders, the allocation is the r-round snake draft, and D_pi is the number of i's top-k goods received by j minus the number received by i. Determine alpha_n as a function of n. In particular, is alpha_4=2/3, and does alpha_n tend to 1 as n tends to infinity, or is there an absolute epsilon>0 with alpha_n <=1-epsilon for every n?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The answer quantifies how badly the widely used randomized-priority snake draft can fail ex-ante stochastic-dominance fairness, and whether a uniform improvement over deterministic EF1 survives as the market grows. OP-1557 only concerns n=3 and does not determine this agent-count frontier. Experiments reveal a genuine change of regime: four agents already attain 2/3, and five agents attain 41/60, exceeding both the conjectured three-agent half-good value and 2/3. Additional agents with private goods can embed a smaller-agent example, motivating a monotone frontier and making the large-n dichotomy meaningful. The desired result is a family-wide sharp guarantee, not an isolated four-agent calculation. It moves The deterministic snake draft is EF1, so every rank-prefix envy difference is at most one. OP-1557 asks for a much stronger half-good bound only for three agents. The cited Chernulich--Yenmez paper studies ex-post properties of the deterministic draft, rather than the worst-case ex-ante gap under randomized priority. along new_setting: Determine the sharp worst-case ex-ante stochastic-dominance envy as the number of agents varies, and whether the ex-post one-good bound can be improved by a universal positive amount.. Evidence: Experiment 24062 independently enumerates all 24 priority orders for a four-agent, 12-good instance, finding sixteen rank-prefix differences 1 and eight 0; it repeats after adding low-ranked goods through 40 goods. Experiments 24058 and 24065 find and independently check a five-agent 15-good instance with difference 1 for 82 of 120 orders, and embed it using private goods for 6, 7 and 8 agents. Experiment 24059 searches the two- and three-agent cases. These are constructions and finite searches, not proofs of the conjectured upper bound or the large-n behavior.

OP-1562 hard core degree two finite order variance phase diagramNot in LeanStatistical Mechanics & Thermodynamics

For every integer n >= 3 and real activity x > 0, let M_n(x) be the minimum of Var(|I|), over all n-vertex finite simple graphs of maximum degree at most 2, when I is an independent set sampled with probability proportional to x^|I|. For H in {K2, K3, C4, C5} write v_H(x)=Var_H(|I|), and write n=3q+r, 0<=r<3. Is M_n(x) equal to q v_K3 when r=0; (q-1)v_K3 + min(v_C4, 2v_K2) when r=1; and (q-1)v_K3 + min(v_C5, v_K3+v_K2) when r=2? In other words, is the minimum attained by triangles plus at most one C4, C5, or pair of edges as the formula specifies?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Statistical-mechanics researchers seek sharp finite-volume fluctuation bounds and phase structure for hard-core gases. Zhang and Xu, Theorem 1.3, proves only n*x/(1+3*x)^2 for maximum degree two, with equality only for a union of triangles, leaving every n not divisible by three unresolved. OP-1363 treats an infimum for edge-chromatic number at most two, excluding odd cycles and discarding the fixed-n remainder; it does not give this exact finite-order result. The answer identifies two different activity-dependent finite-size transitions, and applies uniformly to every graph order and all activities. Evidence: Experiment 24417 exhausts all unlabeled graphs through 7 vertices and shows the naive triangle-plus-remainder-clique guess fails. Experiment 24418 minimizes exactly by path/cycle dynamic programming for each n<=60 at 12 rational activities. Experiment 24419 checks the displayed formula exactly for each n=3..50 at 200 rational activities between 0.01 and 2, and identifies switchpoints x=(1+sqrt(3))/2 for r=1 and the unique positive root near 0.9004906 of 150x^5+120x^4-70x^3-100x^2-35x-4 for r=2. These are numerical/computational evidence, not proofs.

OP-1563 binary best response recursively balanced draft ef1Not in LeanFair Division

Fix any finite set of indivisible goods and a picking sequence that is a concatenation of permutations of all n agents, with the last permutation possibly truncated. Each agent submits once a strict ranking of all goods, then at each turn receives the highest-ranked remaining good. Suppose a distinguished agent i has additive true value v_i(g) in {0,1} and her submitted ranking is a best response to the fixed reports of all other agents, among all strict ranking reports. Must the resulting allocation A satisfy v_i(A_i) >= v_i(A_j)-1 for every other agent j? Equivalently, is i envy-free up to one good, and hence EFX under the usual positive-good convention? In particular, would every pure Nash equilibrium be EF1 whenever all true valuations are binary additive?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Designers of strategic fair-allocation mechanisms need to know whether exact fairness survives equilibrium on restricted but important approval valuations. Amanatidis et al. (2026), Theorem 1, gives only 1/2-EF1 at best response under additive values; their counterexample and the sharper KB example require three value levels. The KB result proves exact EF1 when the envied agent picks at most twice for general values, but says nothing when she picks three or more times. The question removes any requirement on the other agents' true valuations or equilibrium status, and asks whether one agent's binary utility closes the equilibrium fairness gap for all sizes and changing round priorities. Their potential-function bound loses a factor of two, and does not supply this integral one-good guarantee. Evidence: Experiment 24426 checks all binary valuations and all unilateral pick paths against 150 randomly drawn opponent-report profiles for each of seven fixed round-robin settings, n=3,4 and m=6..10, with no violation. Experiment 24428 repeats for 150 random recursively balanced schedules and report profiles in each of six settings, n=3,4 and m=8..10, checking 1,878,600 valuation-agent-profile cases. Experiment 24431 targeted valuations concentrating liked goods in another agent's bundle: it found no violations in completed settings up to n=4,m=16 before timing out; this is finite evidence, not a proof.

OP-1564 subcubic random greedy perfect matching exponential floorNot in LeanOnline Algorithms

For each finite simple graph G of even order n and maximum degree at most three which has a perfect matching, expose the edges in a uniformly random order and accept each edge whose endpoints are still unmatched. Let p(G) be the probability that the final matching is perfect, and let c_3 be the infimum of p(G)^(1/n) over all such G. Is c_3 at least 3/4? Determine the exact value of c_3 and identify an explicit graph family approaching it.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

In random-arrival matching and sequential adsorption, the probability of completing every demand quantifies rare total-success events, whereas the expected number of accepted edges does not. The related OP-1542 asks only for an expected-size guarantee and gives no exponential lower tail at a perfect matching. A direct fixed-matching early-edge condition gives the much weaker elementary base 1/sqrt(5), so the proposed 3/4 base would be a substantial uniform improvement. The initial guess that disjoint paws were extremal fails already at six vertices; the revised question asks for the sharp all-size exponential rate rather than privileging that wrong family. The worst observed graphs have unique perfect matchings, but the question includes all graphs with at least one perfect matching. Evidence: Experiment 24423 first shows that the paw's per-vertex success rate is not extremal. Experiment 24425 enumerates all connected subcubic graphs through 12 vertices and uses the exact first-edge recurrence; minima for orders 4,6,8,10,12 are 1/2, 11/42, 1793/12600, 719/9450, and 109327/2661120, all above (3/4)^n. Experiment 24427 samples 6,400 graphs constructed with unique perfect matchings through 20 vertices and computes exact probabilities for its best examples. Experiment 24432 uses a separate matching-subset recurrence on hundreds of unique-matching samples through 36 vertices, with minimum observed p^(1/n) about 0.75451 at n=28. These finite numerical searches neither establish the lower bound nor show sharpness.

OP-1565 random coverage greedy packing critical window clipped gaussianNot in LeanAlgorithm Design & Analysis

Fix an integer d>=2. Independently sample n uniformly random d-subsets of an n-element ground set, keeping their sample order. For each k let G_n(k) be the number of ground elements covered by the usual maximum-coverage greedy rule after selecting k sampled sets, breaking equal marginal-gain ties by earliest sample order, and let OPT_n(k) be the maximum possible coverage using k sets. Put a=d(d-1), x_d=(1+a)^(-1/(d-1)), mu_d=(1-x_d)/d, and sigma_d^2=integral from 0 to 1 of x(t)^d(1-x(t)^d)*((1+a*t)/(1+a))^(2*d/(d-1)) dt, where x(t)=(1+a*t)^(-1/(d-1)). For s in R let k_n(s)=floor(mu_d*n+s*sqrt(n)). Does P[OPT_n(k_n(s))=d*k_n(s)] tend to 1 for every fixed s, and does the process (OPT_n(k_n(s))-G_n(k_n(s)))/sqrt(n), after linear interpolation, converge in distribution on every compact s-interval to (s-Z)_+, where one common Z is normal with mean zero and variance sigma_d^2?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Average-case algorithm analysts want to understand when greedy first stops being optimal, including finite-size uncertainty around that threshold. Balkanski, Chatzitheodorou and Sentenac (ICALP 2026) study this same left-regular random maximum-coverage model and derive a first-order disjoint-phase law and expected approximation bounds, but do not give a critical-window fluctuation law or its random performance gap. Related random sequential adsorption work studies Gaussian packing fluctuations without the maximum-coverage objective and its optimum comparator. This asks for a whole family of non-Gaussian process limits, with an explicit atom at zero and a shared normal fluctuation, rather than one more approximate expected ratio. Establishing the optimum comparison requires a linear surplus of disjoint sets over greedy, and carrying the packing fluctuation through the next marginal-gain phase requires uniform control over the whole window. Evidence: Experiment 24437 simulates the exact disjoint-phase count through d=2,3,4,5, n=400,1600,6400, using 5,000 to 10,000 replicates per parameter. At n=6400 the empirical normalized variances are 0.04119, 0.02208, 0.01402 and 0.009879, versus predicted 0.04115, 0.02209, 0.01408 and 0.009875; positive-part losses also approach the displayed formula. Experiment 24438 independently executes greedy on the full set systems for d=2,3,4 and 60,200,600 elements; all 2,880 tested critical-window deficits equal max(k-M,0), where M is the final disjoint-phase count. A separate solver found d*k coverage at the central k for all but one of the 660 cases where it was run; the remaining case was not certified and is not counted as a failure. These computations are evidence rather than proofs.

OP-1566 continuous antiferromagnetic clique minimum loopless multigraphsNot in LeanStatistical Mechanics & Thermodynamics

Let D>=1 and let H be any finite loopless multigraph on m>=1 vertices, with each vertex incident to at most D edges counting multiplicity. Define Z(H)=integral over [0,1]^m of the product, over all edges ij including multiplicities, of max(x_i,x_j), with respect to Lebesgue measure. Is it true that Z(H)^(D+1) >= (2^(D+1)/(D+2)!)^m for every such H? The proposed bound is attained for disjoint unions of K_(D+1), for which Z(K_(D+1))=2^(D+1)/(D+2)!.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks whether a sharp antiferromagnetic partition-function extremum survives parallel interactions, across all degree bounds. Lee and Seo's 2026 theorem gives a degree-sensitive clique lower bound for simple source graphs and finite antiferromagnetic target matrices. Discretizations of max(x,y) have one positive eigenvalue, so their theorem covers simple H, but it does not directly cover a multigraph: parallel source edges replace the common interaction by its entrywise powers and repeat a neighbor in the deletion recurrence. The missing case has a concrete online-matching consequence. For a simple graph of maximum degree d with n vertices and a specified perfect matching M, contracting M produces a loopless multigraph of maximum degree at most 2d-2; Z is exactly the probability that random-edge-order greedy outputs M. A positive answer gives the sharp base [2^(2d-1)/(2d)!]^(1/(2(2d-1))) per original vertex, attained for all n divisible by 2(2d-1). This is a different, specified-matching question from OP-1564, whose proposed 3/4 bound for obtaining any perfect matching is numerically disproved by experiment 24440. Evidence: Experiment 24456 exhausts every labeled loopless multigraph of maximum degree <=4 through five vertices, and all 3,355 labeled 4-regular multigraphs on six vertices; no inequality fails and K5 attains 2/45. Experiment 24455 samples 1,700 regular multigraphs for each D=2,4,6,8, checks all simple graphs in the atlas through seven vertices, and finds no failure. Experiment 24457 checks odd D=1,3,5,7 on simple atlas graphs and 100 sampled regular multigraphs for each tested even order through 12. The checks use the exact first-matched-edge recurrence with floating arithmetic except for separately evaluated clique values, and are evidence, not proof.

OP-1568 quantum petz hellinger fork sharp classical factorNot in LeanQuantum Mechanics

For a finite classical register X and finite-dimensional quantum systems Y and Z, consider every state rho_XYZ=sum_x p_x |x><x| tensor rho_Y^x tensor rho_Z^x. Define H(A;B)=2-2 Tr(sqrt(rho_AB) sqrt(rho_A tensor rho_B)). Is H(X;YZ) <= C [H(X;Y)+H(X;Z)] for C=(13+5 sqrt(10))/27? Is this constant sharp over all such quantum forks? The tensor-product output in each x block is essential; the YZ marginal is the correlated mixture sum_x p_x rho_Y^x tensor rho_Z^x, not rho_Y tensor rho_Z.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Quantum communication and sensing researchers combine conditionally independent quantum outputs of a common classical source. A sharp, dimension-independent bound for Petz-Hellinger information would quantify the possible advantage of combining them, including noncommuting signals. OP-1440 asks whether factor-one subadditivity can fail for symmetric qubit forks, not the optimal universal factor. The newly pitched OP-1567 concerns classical outputs only: its likelihood-ratio argument does not directly apply to noncommuting square roots of the correlated quantum YZ marginal. Classical diagonal states are included, so their singular binary family supplies the same conjectured lower limit for any quantum constant; the question is whether quantum noncommutativity can increase it. Evidence: At 55 digits, experiment 24495 tests genuinely noncommuting symmetric qubit forks in singular regimes and finds a ratio up to 1.066997 below C=1.0670884555867. Experiment 24494 optimizes full-rank asymmetric qubit forks, 24497 and 24499 sample 216000 binary-source quantum forks with outputs of dimensions 2 through 4 including rare-source regimes, and 24498 samples 100000 forks with 3 to 5 source values and qubit or qutrit outputs: none exceed C. The classical diagonal singular family approaches C in 150-digit experiment 24477. Experiment 24493 detects numerical square-root artifacts from an earlier near-pure floating-point search; those apparent optima are not used as evidence. These computations do not establish the bound or sharpness.

OP-1570 inhomogeneous antiferromagnetic multigraph clique minimumNot in LeanStatistical Mechanics & Thermodynamics

Let G be a finite loopless multigraph, with degree d_v counting parallel edges. Let W be any finite symmetric entrywise-nonnegative matrix with at most one positive eigenvalue, and assign each vertex v a nonnegative spin-fugacity vector lambda^(v). Define Z_G=sum over spin assignments sigma of product_v lambda^(v)_{sigma(v)} times product_{uv in E(G)} W_{sigma(u),sigma(v)}, with repeated edges repeated in the product. Let Z_{K_r}(lambda) use a simple r-clique with fugacity lambda at every vertex. Is Z_G >= product_v Z_{K_{d_v+1}}(lambda^(v))^(1/(d_v+1)) for all such models and multigraphs?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Lee and Seo's 2026 Theorem 1.2 establishes exactly this sharp degree-sensitive, inhomogeneous inequality for simple source graphs, resolving a central clique-minimization conjecture for antiferromagnetic spin models. Parallel interactions are common in contracted physical networks, but they cannot be removed without changing the matrix or degrees. Extending their theorem would give one sharp graph inequality for all finite antiferromagnetic spin systems with arbitrary site fields, including nonregular graphs and repeated couplings. It would also imply the continuous max-kernel bound of OP-1566 by discretization, while additionally providing degree-sensitive and inhomogeneous refinements. This is substantially broader than OP-1566's single continuous interaction and uniform maximum-degree estimate. It is not an immediate application of the simple-graph theorem: entrywise powers of a one-positive-eigenvalue matrix can have two positive eigenvalues. Evidence: Experiments 24523 and 24524 test 33,300 irregular loopless multigraphs with 3-5 spin states, independent vertex fugacities, degrees <=4 and positive antiferromagnetic targets; none violate the inequality. Experiments 24521 and 24522 add 39,300 homogeneous cases including near-hard-constraint interactions, and 24519 adds 37,000 regular two-spin cases. Targeted doubled-edge optimization in 24526 and 24528 finds no violation. Experiment 24525 exhibits W=[[1,1,1,1],[1,3/4,1,3/4],[1,1,3/4,3/4],[1,3/4,3/4,1/2]]: its numerical eigenvalues have one positive and its entrywise square has two, showing why the original spectral hypothesis is not stable under merging parallel edges. These computations are not a proof of the inequality.

OP-1572 Cyclic Fiber Transfer Recurrence for Exponents Divisible by FourNot in LeanElementary Number Theory

Let n = Km with K = 2^a, a >= 2, and m >= 3 odd. For a finite abelian group G and integer L divisible by exp(G), let A_L(G) = s_L(G) - 1. Does there exist a dimension D >= 1 and a configuration of cyclic fibers of subgroups of C_n^D yielding a transfer inequality of the form A_n(H ⊕ C_n^D) >= ∑_{j=1}^M A_n(H ⊕ G_j) for all finite abelian groups H of exponent dividing n and proper subgroups G_j < C_n, whose characteristic polynomial root exceeds the weighted random configuration base B_{n,p} of Theorem 1.4?

Proposed here, building on arXiv:2611.15210, Remark 6.3 — Cyclic fibers and exponential lower bounds for Erd\H{o}s--Ginzburg--Ziv constants; the paper does not ask it

What is known

For n = 2m (m odd), Theorem 3.1 gives a transfer inequality A_n(H ⊕ C_n^5) >= 12 A_n(H ⊕ C_n) + 8 A_n(H ⊕ C_m) that outperforms the 18-point configuration random bound. Remark 6.3 observes that extending the cyclic-fiber transfer method to n = Km with K >= 4 to beat the weighted configuration base B_{n,p} remains open.

OP-1573 Constant competitive ratio for online graph explorationNot in LeanOnline Algorithms

Does there exist an absolute constant $\rho \ge 1$ and a deterministic online algorithm Alg for the online graph exploration problem such that for every finite connected undirected graph $G = (V, E)$ with nonnegative edge weights $w \colon E \to \mathbb{R}_{\ge 0}$ and every starting vertex $s \in V$, the total edge traversal cost incurred by Alg to visit all vertices of $G$ and return to $s$ satisfies $\textsc{Alg}(G, s) \le \rho \cdot \textsc{Opt}(G)$, where $\textsc{Opt}(G)$ is the length of an optimal traveling salesperson tour on $G$?

Posed in arXiv:2611.14827, Sec. 1, Question 1 — Sublogarithmic Online Graph Exploration

OP-1576 Merino-Welsh conjecture on Tutte polynomials of loopless and bridgeless graphsNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite connected loopless and bridgeless graph, and let $T_G(x,y)$ be its Tutte polynomial. Is it always true that $\max\{T_G(2,0), T_G(0,2)\} \ge T_G(1,1)$? Equivalently, is the maximum of the number of acyclic orientations of $G$ and the number of totally cyclic orientations of $G$ at least the number of spanning trees of $G$?

Posed in arXiv:2611.15008, Abstract — The Merino-Welsh conjecture for sparse and dense graphs

OP-1578 Additive Merino-Welsh conjecture for loopless and bridgeless graphsNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite connected loopless and bridgeless graph, and let $T_G(x,y)$ denote the Tutte polynomial of $G$. Does the additive Merino-Welsh inequality $T_G(2,0) + T_G(0,2) \ge 2 T_G(1,1)$ hold for every such graph $G$?

Posed in arXiv:2611.15008, Sec. 1 — The Merino-Welsh conjecture for sparse and dense graphs

OP-1581 Small Implicit Graph Conjecture on Adjacency Label SizeNot in LeanGraph Theory & Graph Algorithms

Let $\mathcal{C}$ be a hereditary graph class that is small, meaning that there exists a constant $c > 0$ such that for all $n \ge 1$, the number of labelled graphs in $\mathcal{C}$ with vertex set $\{1, \dots, n\}$ is at most $n! c^n$. Does $\mathcal{C}$ admit an implicit representation, that is, an adjacency labelling scheme where each vertex of every $n$-vertex graph in $\mathcal{C}$ is assigned a binary label of length $O(\log n)$ from which adjacency between any two vertices can be determined by a fixed decoder?

Posed in arXiv:2611.15299, Sec. 1.1 — Small classes have linear neighbourhood complexity

What is known

The paper improves the known upper bound on the label size for small classes from O(log^3 n) to O(log^2 n) using its main theorem, leaving the O(log n) bound of the Small Implicit Graph Conjecture open.

OP-1582 Preservation of Smallness Under Graph Powers and Hereditary ClosureNot in LeanGraph Theory & Graph Algorithms

Let $\mathcal{C}$ be a small hereditary graph class, so that the number of labelled $n$-vertex graphs in $\mathcal{C}$ is at most $n! c^n$ for some constant $c > 0$. For an integer $r \ge 1$, let $\mathcal{C}^{(r)}$ denote the hereditary closure of the family of $r$-th powers $\{G^{(r)} : G \in \mathcal{C}\}$, where $G^{(r)}$ has the same vertex set as $G$ and distinct vertices are adjacent if and only if their shortest-path distance in $G$ is at most $r$. Is $\mathcal{C}^{(r)}$ small for every integer $r \ge 1$?

Posed in arXiv:2611.15299, Problem 8 — Small classes have linear neighbourhood complexity

OP-1583 Optimal Neighbourhood Complexity Exponent for Slow Factorial Graph ClassesNot in LeanGraph Theory & Graph Algorithms

For $\varepsilon \in (0, 1)$, let $\alpha(\varepsilon)$ be the supremum of real numbers $\alpha$ such that there exists a hereditary graph class $\mathcal{C}$ with speed $|\mathcal{C}_n| = O((n!)^{1+\varepsilon})$ and neighbourhood complexity $\Omega(n^\alpha)$. Determine the exact value or optimal asymptotics of $\alpha(\varepsilon)$ as a function of $\varepsilon$, closing the gap between the lower bound $\alpha(\varepsilon) \ge 1 + \varepsilon^2 / 64$ (Proposition 2) and the upper bound $\alpha(\varepsilon) \le 1 + \varepsilon$ (Proposition 3).

Posed in arXiv:2611.15299, Sec. 1 — Small classes have linear neighbourhood complexity

OP-1586 Maximum Queue Number of Planar GraphsNot in LeanGraph Theory & Graph Algorithms

A queue layout of a finite simple undirected graph $G = (V, E)$ consists of a linear ordering $\prec$ of $V$ and a partition of $E$ into queues $Q_1, \dots, Q_k$ such that no two edges in the same queue are nested (two edges $uv$ and $xy$ with $u \prec v$ and $x \prec y$ are nested if $u \prec x \prec y \prec v$ or $x \prec u \prec v \prec y$). The queue number $\mathrm{qn}(G)$ is the minimum number of queues over all queue layouts of $G$. What is the maximum queue number $\max \{ \mathrm{qn}(G) : G \text{ is a planar graph} \}$? (Known to be an integer between 4 and 33.)

Posed in arXiv:2611.14817, Sec. 5 — Tripod Reordering: A 33-Queue Layout of Planar Graphs

What is known

The author proves that every planar graph has queue number at most 33, improving the previous bound of 49 and correcting a gap in the published 42-queue claim. A lower bound of 4 was established in 2020, leaving a wide gap between 4 and 33.

OP-1587 Exact Frustration Index of the Fully Frustrated 25-CubeNot in LeanCombinatorics for TCS

What is the exact frustration index F_{25} of the fully frustrated 25-dimensional hypercube Q_{25}? That is, what is the minimum number of negative edges in a signing of Q_{25} in which every 4-cycle has an odd number of negative edges, known to lie in the range [167772180, 168230912]?

Posed in arXiv:2611.14906, Sec. 6, "Dimension 25" — The frustration index of fully frustrated hypercubes

What is known

The paper computes F_9 = 772 and proves that for powers of four F_n achieves the spectral lower bound (n - sqrt n) 2^{n-2}. For non-powers of four n = r^2, the spectral bound is strict, and n = 25 is the smallest unresolved square dimension.

OP-1589 Monotonicity of the q-Permanent on [-1, 1] for Real Symmetric Positive Definite MatricesNot in LeanCombinatorics for TCS

Let $n \ge 4$ be an integer. For an $n \times n$ real matrix $A = (a_{ij})$ and $q \in \mathbb{R}$, define the $q$-permanent by $P_q(A) = \sum_{\sigma \in S_n} q^{\operatorname{inv}(\sigma)} \prod_{i=1}^n a_{i,\sigma(i)}$, where $\operatorname{inv}(\sigma) = \#\{(i,j) : 1 \le i < j \le n \text{ and } \sigma(i) > \sigma(j)\}$. Is $q \mapsto P_q(A)$ strictly increasing on the interval $[-1, 1]$ for every non-diagonal real symmetric positive definite matrix $A$?

Posed in arXiv:2611.14694, Sec. 1, Conjecture 1.1 and Sec. 6 — Real positive definite counterexamples to a monotonicity conjecture for the $q$-permanent

What is known

While the complex Hermitian case of Conjecture 1.1 was disproved in 2026 by an order-144 counterexample with nonreal entries, and Conjecture 1.2 for q > 1 is disproved here, the original conjecture of Bapat (1992) for real symmetric positive definite matrices on [-1, 1] remains open.

OP-1591 Matching Linear Lower Bound on the q-Permanent Monotonicity ThresholdNot in LeanCombinatorics for TCS

For each integer $n \ge 4$, let $\mathcal{P}_n$ denote the set of $n \times n$ real symmetric positive definite matrices, and let $r_n = \inf \{r > 1 : \exists A \in \mathcal{P}_n, P'_r(A) < 0\}$, where $P_q(A)$ is the $q$-permanent. While $r_n - 1 \le 5^{1/(n-4)} - 1 = O(1/n)$, does there exist a universal constant $c > 0$ such that $r_n - 1 \ge c/n$ for all $n \ge 4$?

Posed in arXiv:2611.14694, Sec. 6, after Table 3 — Real positive definite counterexamples to a monotonicity conjecture for the $q$-permanent

What is known

The paper shows that the smallest failing parameter r_n satisfies r_n - 1 <= 5^{1/(n-4)} - 1 = O(1/n), but leaves open whether a matching linear lower bound r_n - 1 = Omega(1/n) holds.

OP-1593 Existence of Maximum Non-Attacking Queens on High-Dimensional Non-Toroidal BoardsNot in LeanCombinatorics for TCS

Let d >= 2 and n >= 1 be integers. On the non-toroidal d-dimensional chessboard {1, 2, ..., n}^d, two queens at positions x, y attack each other if x - y = c * v for some nonzero integer c in Z and some nonzero vector v in {-1, 0, 1}^d. Is it true that for every dimension d >= 2, there exists an integer N_0(d) such that for all n >= N_0(d), there exists a placement of n^{d-1} mutually non-attacking queens on {1, 2, ..., n}^d? In particular, does there exist n with gcd(n, 210) > 1 admitting n^2 non-attacking queens on {1, 2, ..., n}^3, disproving van Rees's conjecture?

Posed in arXiv:2611.14754, Conjecture 4.1 — Modular $n$-queens in higher dimensions

What is known

The modular board requires all prime factors to exceed 2^d, but on non-toroidal boards boundary effects may allow complete configurations for all sufficiently large n via hypergraph matching and absorption techniques.

OP-1594 Structural Characterization of Oriented Anti-Sidorenko Directed GraphsNot in LeanCombinatorics for TCS

A finite directed graph $D$ (an orientation of a simple graph without loops or antiparallel edges) is called oriented anti-Sidorenko (OAS) if for every digraphon $W \colon [0,1]^2 \to [0,1]$, its homomorphism density satisfies $t(D, W) \leq t(D, (W + W^T)/2)$, where $(W + W^T)/2$ denotes the symmetrized digraphon. Give a necessary and sufficient structural condition on $D$ for $D$ to be OAS.

Posed in arXiv:2611.15027, Sec. 1.4.3 — Sidorenko inequalities and symmetry-forcing for graph orientations

OP-1598 Sublogarithmic Competitive Ratio for Online Graph ExplorationNot in LeanOnline Algorithms

Does there exist an online algorithm (deterministic or randomized against an oblivious adversary) for the online graph exploration problem on unknown connected weighted graphs with n vertices that achieves a competitive ratio of o(log n / log log n) as n → ∞?

Posed in arXiv:2611.14755, Sec. 7 — A Sublogarithmic Competitive Algorithm for Online Graph Exploration

OP-1602 linear degree two triple hard core density coefficient dominationNot in LeanStatistical Mechanics & Thermodynamics

For every finite nonempty simple cubic graph G with m edges, let Z_G(x)=sum over edge sets S subset E(G) with deg_S(v)<=2 for every v of x^{|S|}. Let P(x)=1+9x+36x^2+78x^3+90x^4+45x^5+6x^6, the polynomial Z_{K_{3,3}}. Are all coefficients of m x P'(x) Z_G(x) - 9 x Z'_G(x) P(x) nonnegative? In particular, does the dual K_{3,3} system maximize expected occupied-vertex density for every fugacity x>0 among all finite linear 2-regular 3-uniform hypergraphs?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The vertices of the physical hypergraph are edges of G, and its three-body exclusion constraints are the vertex stars, so this asks for a sharp all-fugacity density law in a genuinely interacting lattice gas. The K3,3 dual is an admissible linear extremizer. A coefficientwise comparison would give an exact combinatorial certificate simultaneously for all fugacities and all system sizes. Recent bounds do not identify a sharp extremizer within the linear class; the general non-linear occupancy conjecture is actually false, so neither its counting inequalities nor differentiating an upper partition-function bound gives the desired density inequality. Evidence: Exact inclusion-exclusion and integer polynomial comparison gave no negative coefficients for all 112 connected cubic graphs through 12 vertices, 96 seeded random cubic graphs at 14, 16 and 18 vertices, and a 16-vertex cubic graph with three bridges and no perfect matching. Direct activity sweeps also show the variance has different extremizers, so this question is specifically about density.

OP-1603 two agent random draft universal rank score manipulation curveNot in LeanFair Division

Fix any continuous non-increasing nonnegative function f on [0,1]. For each even m, two agents independently draw uniform strict rankings of m goods and use alternating turns A,B,...,A,B. Agent B always reports truthfully; A has additive values f((r-1)/(m-1)) for her r-th ranked good. Let U_truth be A's utility under truthful reporting, and U_best her maximum utility over all reports after observing B's ranking. Is it true that (U_truth/m,U_best/m) converges in probability to (integral_0^1 (1-t)f(t) dt, integral_0^{1/2} f(t) dt)? More sharply, is the exact probability under truthful play that A receives her r-th ranked good (m-r)/(m-1) for every even m>=2 and 1<=r<=m?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks how much information about an opponent's preferences is worth for an entire family of cardinal preferences, not just one Borda utility. It gives the complete manipulation-gain functional and reveals which ranks benefit from strategic play, a question for allocation and mechanism-design researchers. The known best-response algorithms give finite-instance computation, not a continuum limit; OP-1439 asks only the special Borda gain 1/24, so it does not determine the two utility limits or general scoring functions. The exact finite-rank identity could provide a sharply accessible anchor for the harder optimal-response limit. Evidence: Exhaustive enumeration of all opponent permutations for m=2,4,6,8,10 exactly matched every claimed truthful inclusion probability. Independently, simulations at m=200,800,3200 show truthful rank-bin inclusion near 1-t and a sharply developing optimal-response threshold at t=1/2; for f(t)=(1-t)^j, j=1,...,4, the gains approach 1/24, 1/24, 11/320 and 13/480. The fast optimal-response construction was independently checked against exact dynamic programming for 200 small random instances and three scoring functions; large-instance optimality remains conjectural.

OP-1606 balanced double star oriented anti sidorenko connector classificationNot in LeanCombinatorics for TCS

For positive integers a,b,L, form an oriented tree D(a,b,L) from a directed path v_0 -> v_1 -> ... -> v_L, by attaching a new incoming leaves and a new outgoing leaves to v_0, and b incoming leaves and b outgoing leaves to v_L. Call D oriented anti-Sidorenko if, for every measurable W:[0,1]^2->[0,1], its homomorphism density satisfies t(D,W) <= t(D,(W+W^T)/2). Is D(a,b,L) oriented anti-Sidorenko exactly when a=b and L is 1 or 2?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The question gives a complete, concrete three-parameter family between oriented paths and arbitrary trees, and exposes whether balancing can protect an orientation under symmetrization. Nie and Wei classify paths and stars but not these subdivided double stars. The previously dropped OP-1595 speculated that only balanced stars could be anti-Sidorenko; computations find non-star survivors, making its proposed classification too narrow. Equal balanced hubs joined by one or two edges survive very extensive graphon tests; longer connectors exhibit genuine weighted-host obstructions. Classifying all parameters would turn that instructive failure into a structural theorem rather than one more small example. Evidence: All 0/1 two- and three-block hosts and the three-block grid {0,1/2,1} were checked against every oriented tree through eight vertices; equal balanced double stars survive. Random nonuniform 2-, 3-, 4- and 5-block hosts support a=b with L=1,2 and find violations for many other parameters. Exact rational three-block calculations detect a=1 violations for L=3,...,10,12,16,24,32 and L=4 violations for a=1,...,10. The searches are finite and do not establish universal anti-Sidorenko inequalities or nonexistence for all parameters.

OP-1607 slow exact nim normal misere joint grundy spectrumNot in LeanCombinatorial Games

For each integer k>=3, consider slow exact k-Nim on k+1 nonnegative piles: a move removes one token from exactly k nonempty piles. Define G on positions by mex of the G-values of legal followers, with terminal value 0, and define G_minus by the same recursion with terminal value 1. Is the joint range of (G,G_minus), over every position in N^{k+1}, exactly {0,1,2,3}^2 minus {(2,3),(3,2)}?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for the complete relationship between two solution invariants under normal and misere termination, not just a numerical bound on the latter. It would sharpen the recent normal-play four-value theorem and give a uniform structural constraint on how the two conventions differ, useful in analyzing impartial-game variants. It revises the dropped OP-1601: that proposal lacked computation and asked only for the misere range; this one answers the Referee's requested small-case check and predicts the strictly stronger joint spectrum. The equality of the two high values is not a fixed relabeling of normal Grundy values, which the computations disprove. Evidence: Exact dynamic programming checked all sorted positions for k=2 through 8, with pile maxima respectively 120,50,30,20,14,10,8: the misere values were always 0-3 and the only joint pairs with both coordinates at least 2 were (2,2) and (3,3). All fourteen proposed pairs occur for k=3; two explicit families, padded by copies of their largest pile, realize the two rare pairs (2,0) and (3,1) throughout k=4,...,16, while analogous padded witnesses realize the other twelve pairs through k=16. These finite computations do not prove the joint spectrum.

OP-1609 quantum permutation walk sqrt cycle slow mode concentrationNot in LeanStatistical Mechanics & Thermodynamics

Fix c>0 and put m_n=floor(c sqrt(n)), for n sufficiently large that 2<=m_n<=n. On the Hilbert space indexed by S_n, let H_{n,m} be the average of the left-regular permutation matrices over all m-cycles, and set kappa_{n,m}(s)=sum_{g in S_n} |<g|exp(-i s H_{n,m})|e>|^2 (fix(g)-1)/(n-1). Is it true that for each T>0, sup_{|t|<=T} |kappa_{n,m_n}(t n^((m_n+1)/2)/m_n)-1| tends to zero as n tends to infinity?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks whether the standard quantum-walk slow mode remains essentially unchanged at the nominal variance-based dephasing time when the cycle length grows as sqrt(n), despite a nonvanishing scaled energy-gap variance. He et al. derive an exact variance and the nominal time scale but do not determine the characteristic-function limit in this joint regime. OP-1486 instead asks a fixed-m limit and is itself open; neither an interchange of limits nor concentration follows from it. A positive answer would expose a breakdown of the variance-based scale due to rare spectral events and change the predicted onset of coherent speedup. Evidence: Exact character sums for n=20,30,40 agree with a Plancherel-branching Monte Carlo sampler within 1.4 estimated standard errors; independent rim-hook implementations agree on 590 small cases. For c about 1, representative estimates of kappa at t=1 rise from 0.694(9) at n=640 to 0.742(10) at n=1280, 0.772(13) at n=2560 and 0.791(17) at n=5120; estimates at n=10240 in two independent runs were 0.801(28) and 0.884(14), and at n=20480 were 0.867(27). Scaled-gap median absolute values decrease, while sample second moments are unstable. Ratios near c=0.5 and 2 show the same finite-size direction. Fast floating-point scaled characters agree with exact-integer calculations in sampled diagrams up to n=10240. These are stochastic finite-size observations, not proof of the limit.

OP-1610 Upper bound of three-halves n on recoloring diameter above maximum degree plus oneNot in LeanGraph Theory & Graph Algorithms

Let $G$ be a finite simple graph with $n$ vertices and maximum degree $\Delta$. For every integer $k \ge \Delta + 2$, is the diameter of the $k$-colouring reconfiguration graph $\mathcal{R}_k(G)$ at most $\lfloor \frac{3}{2} n \rfloor$?

Posed in arXiv:2611.17022, Conjecture 19 — Large diameter for $(\Delta+2)$-colouring reconfiguration

OP-1612 Tight matching-number coefficient in lower bound on recoloring diameterNot in LeanGraph Theory & Graph Algorithms

What is the supremum of all real numbers $\eta > 0$ such that for every finite simple graph $G$ with $n$ vertices and matching number $\mu$, the $(\Delta(G)+2)$-colouring reconfiguration graph $\mathcal{R}_{\Delta(G)+2}(G)$ has diameter at least $n + \eta \mu$? In particular, does every finite simple graph $G$ satisfy $\operatorname{diam}\mathcal{R}_{\Delta(G)+2}(G) \ge n(G) + \mu(G)$?

Posed in arXiv:2611.17022, Sec. 8, open question 2 — Large diameter for $(\Delta+2)$-colouring reconfiguration

OP-1613 Optimal matching-number coefficient in upper bound on recoloring diameterNot in LeanGraph Theory & Graph Algorithms

What is the infimum of all real constants $\epsilon > 0$ such that every finite simple graph $G$ satisfies $\operatorname{diam}\mathcal{R}_{\Delta(G)+2}(G) \le |V(G)| + \epsilon \mu(G)$, where $\mu(G)$ is the matching number of $G$? In particular, does $\operatorname{diam}\mathcal{R}_{\Delta(G)+2}(G) \le |V(G)| + \frac{3}{2}\mu(G)$ hold for every finite simple graph $G$?

Posed in arXiv:2611.17022, Sec. 8, open question 1 — Large diameter for $(\Delta+2)$-colouring reconfiguration

OP-1614 Value of the Four-Dimensional Borsuk NumberNot in LeanCombinatorics for TCS

Let $b(n)$ denote the Borsuk number in dimension $n$, defined as the smallest integer $m$ such that every bounded subset of $\mathbb{R}^n$ of positive diameter can be partitioned into $m$ subsets each of strictly smaller diameter. Given that $b(4) \ge 5$ (witnessed by the regular 4-simplex) and $b(4) \le 6$ (proved in this paper), is $b(4) = 5$? In other words, can every bounded subset of $\mathbb{R}^4$ of positive diameter be partitioned into 5 sets of strictly smaller diameter?

Posed in arXiv:2611.16775, Sec. 8, Small dimensions — Novel upper bounds for Borsuk numbers from contact points and spherical partitions

OP-1616 Füredi-Lazebnik-Ustimenko Girth Conjecture for D(k,q)Not in LeanGraph Theory & Graph Algorithms

Let $q \ge 4$ be a prime power and $k \ge 2$ an integer. Let $D(k, q)$ be the bipartite graph with left vertex set $L_k = \{[l] \in \mathbb{F}_q^{k+1} : l_1 = l_2\}$ and right vertex set $R_k = \{\langle r \rangle \in \mathbb{F}_q^{k+1} : r_1 = 0\}$, where $[l]$ is adjacent to $\langle r \rangle$ if and only if for all $2 \le i \le k$, $l_i + r_i = r_0 l_{i-2}$ when $i \equiv 2, 3 \pmod 4$, and $l_i + r_i = l_0 r_{i-2}$ when $i \equiv 0, 1 \pmod 4$. Does the girth $g(D(k,q))$ equal $g_k$, where $g_k = k+4$ if $k$ is even, and $g_k = k+5$ if $k$ is odd?

Posed in arXiv:2611.16470, Conjecture 1 — On the algebraic bipartite graphs $D(4s,q)$

What is known

The celebrated Füredi-Lazebnik-Ustimenko girth conjecture (1995) governing the exact girth of the algebraic bipartite graphs D(k,q). The paper extends its validity to k = 2(p^r+1)p^t - 4 for odd p and q > 3, but the general conjecture remains open.

OP-1618 Existence of Monochromatic Antipodal Geodesics in Antipodally Colored HypercubesNot in LeanCombinatorics for TCS

Let $n \ge 2$ be an integer, and let $Q_n$ be the hypercube graph with vertex set $\{0,1\}^n$, where two vertices are adjacent if they differ in exactly one coordinate. Suppose the edges of $Q_n$ are colored red or blue such that every edge $xy$ has the opposite color to its antipodal edge $\bar{x}\bar{y}$, where $\bar{x} = (1 - x_1, \dots, 1 - x_n)$. Does there always exist a vertex $y \in \{0,1\}^n$ joined to its antipodal vertex $\bar{y}$ by a monochromatic geodesic, that is, a simple path of length $n$ that changes each coordinate exactly once?

Posed in arXiv:2611.16243, Sec. 1, paragraph 3 — Antipodal paths: a short proof by counting intersections

OP-1619 One-Switch Conjecture for Hypercube Edge ColoringsNot in LeanCombinatorics for TCS

Let $n \ge 2$ be an integer. Let the edges of the hypercube graph $Q_n$ on $\{0,1\}^n$ be colored red or blue arbitrarily (not necessarily antipodally). Does every such edge coloring contain an antipodal path—a simple path joining some vertex $y \in \{0,1\}^n$ to its antipode $\bar{y}$—with at most one color change along its edges (that is, the path is monochromatic or consists of a monochromatic subpath followed by a monochromatic subpath of the other color)?

Posed in arXiv:2611.16243, Sec. 1, paragraph 4 — Antipodal paths: a short proof by counting intersections

OP-1621 Flow-Transfer Conjecture for Cyclic GroupsNot in LeanGraph Theory & Graph Algorithms

Let k ≥ 2 be an integer. Let M = M' = ℤ/kℤ, and let B ⊆ M and B' ⊆ M' be symmetric subsets (B = -B and B' = -B'). If there exists a graph homomorphism Cay(M, B) → Cay(M', B'), does every finite graph admitting an (M, B)-flow also admit an (M', B')-flow?

Proposed here, building on arXiv:2611.16055, Thm 1.7 — Counterexample to Flow-Transfer Conjectures; the paper does not ask it

What is known

The paper disproves the general flow-transfer conjecture (Theorem 1.7) using the Petersen graph, but the counterexample crucially relies on elementary abelian 2-groups of high rank (M ≅ F₂⁶ and M' ≅ F₂⁶³) and binary cycle-space duality. It leaves untouched whether the implication holds when restricted to cyclic groups M = M' = Z/kZ (or integer flows), where the structure of Cayley graphs and tensions differs markedly from vector spaces over F₂.

OP-1626 Exact maximin share and EFX for personalized bivalued valuationsNot in LeanFair Division

Let N = {1, ..., n} be a set of n ≥ 2 agents and M a finite set of indivisible goods. Each agent i ∈ N has a personalized bivalued additive valuation v_i : 2^M → ℝ≥0, meaning there exist non-negative real values a_i ≤ b_i such that v_i(g) ∈ {a_i, b_i} for every good g ∈ M and v_i(S) = ∑_{g ∈ S} v_i(g). Does every such instance admit a complete allocation A = (A_1, ..., A_n) of M to the n agents that is simultaneously envy-free up to any good (EFX) and gives every agent her exact maximin share (1-out-of-n MMS)? That is, for all i, j ∈ N and all g ∈ A_j, v_i(A_i) ≥ v_i(A_j \ {g}), and for all i ∈ N, v_i(A_i) ≥ max_{P ∈ Π_n(M)} min_{B ∈ P} v_i(B), where Π_n(M) is the set of all partitions of M into n bundles.

Posed in arXiv:2611.15582, Sec. 5 — The Golden Ratio: EF1 and Ordinal-MMS for Additive Goods

OP-1629 Growth Rate of Clique Set-Coloring Ramsey Numbers on the Critical Density CurveNot in LeanCombinatorics for TCS

For an integer $n \ge 3$, let $\Phi_n : [0, 1] \to [0, 1]$ be the continuous piecewise-linear function obtained by linearly interpolating the points $(1 - 1/j, (j)_n / j^n)$ for $j = 1, 2, \dots$ and $\Phi_n(1) = 1$, where $(j)_n = j(j-1)\cdots(j-n+1)$. For sequences of integers $r \to \infty$, $s = s(r)$, and $t = t(r)$ satisfying $s/r \to \sigma$ and $t/r \to \tau$ with $0 < \tau \le \sigma < 1$, Theorem 6.2 establishes that $R(K_n; r, s, t) = O(1)$ when $\tau < \Phi_n(\sigma)$ and $R(K_n; r, s, t) \ge \exp(cr)$ for some $c > 0$ when $\tau > \Phi_n(\sigma)$. What is the growth rate of $R(K_n; r, s, t)$ when $(\sigma, \tau)$ lies on the critical curve $\tau = \Phi_n(\sigma)$? In particular, for $n = 3$, $\sigma = 3/5$, and $\tau = 2/15$, does $R(K_3; r, \lfloor 3r/5 \rfloor, \lfloor 2r/15 \rfloor)$ remain $O(1)$ as $r \to \infty$?

Posed in arXiv:2611.15376, Sec. 7, after Question 7.1 — Set-coloring Ramsey numbers with multiple intersections

OP-1630 Order of Magnitude of 3-Uniform Loose Triangle Ramsey NumberNot in LeanCombinatorics for TCS

For each integer $r \ge 3$, determine the asymptotic order of magnitude of the Ramsey number $R(C_3, K_t^{(r)})$ as $t \to \infty$, where $C_3$ is the $r$-uniform loose triangle (consisting of three edges pairwise intersecting in exactly one vertex with empty common intersection) and $K_t^{(r)}$ is the complete $r$-uniform hypergraph on $t$ vertices. In particular, for $r = 3$, does $R(C_3, K_t^{(3)}) = \Theta(t^{3/2} / (\log t)^{3/4})$?

Posed in arXiv:2611.16957, Sec. 1.1, after Thm 1.2 — Ramsey numbers of loose triangles versus cliques

OP-1632 Four-Colour Bound for Proper 2-Homogeneous Colourings of Cubic GraphsNot in LeanGraph Theory & Graph Algorithms

Let $G = (V, E)$ be a finite simple cubic graph. A proper vertex colouring $c : V \to \{1, \dots, k\}$ is 2-homogeneous if for every vertex $v \in V$, the open neighbourhood $N_G(v)$ contains vertices of exactly two distinct colours: $|c(N_G(v))| = 2$. If $G$ admits a proper 2-homogeneous vertex colouring for some number of colours, must $G$ admit a proper 2-homogeneous vertex colouring using at most four colours?

Posed in arXiv:2611.16649, Sec. 4, Question 4.1 — On 2-Homogeneous Colourings of Cubic Bipartite Graphs

OP-1637 Exact query complexity of Boolean function composition with exact inner correctionNot in LeanQuantum Computation

Does there exist an absolute constant $C > 0$ such that for every pair of nonconstant total Boolean functions $f : \{0,1\}^n \to \{0,1\}$ and $g : \{0,1\}^m \to \{0,1\}$, the exact quantum query complexity of their block composition $f \circ g$ satisfies $$Q_E(f \circ g) \le C \left(\deg(f) Q_E(g) + Q_E(f) Q_{1/(4\deg(f))}(g)\right),$$ where $\deg(f)$ is the polynomial degree of $f$ over $\mathbb{R}$, $Q_E$ denotes exact quantum query complexity, and $Q_{\varepsilon}$ denotes bounded-error quantum query complexity with error at most $\varepsilon$?

Posed in arXiv:2611.16412, Conjecture 12.1 — Exact Quantum Algorithms for Composed Boolean Functions

What is known

The paper proves Q_E(f ∘ g) = O(m deg(f) + Q_E(f) Q_{1/(4 deg(f))}(g)), where the exact correction pays m queries to read each of up to deg(f) inner blocks in full. The conjecture asks whether this additive m deg(f) overhead can be replaced by deg(f) Q_E(g).

OP-1639 Separation exponent between sensitivity and exact quantum query complexity beyond 3/2Not in LeanQuantum Computation

Does there exist a sequence of total Boolean functions $(f_k)_{k \ge 1}$ with $Q_E(f_k) \to \infty$ and a constant $\alpha > 3/2$ such that the sensitivity satisfies $$s(f_k) \ge Q_E(f_k)^{\alpha - o(1)}$$ as $k \to \infty$? Equivalently, does there exist a total Boolean function $h$ such that its fractional block sensitivity satisfies $\operatorname{fbs}(h) > \max\{\deg(h), \operatorname{Adv}^{\pm}(h)\}^{3/2}$?

Posed in arXiv:2611.16412, Problem 12.3 — Exact Quantum Algorithms for Composed Boolean Functions

What is known

The paper constructs an explicit family with s(f) ≥ Q_E(f)^{3/2 - o(1)}, improving Ambainis's previous exponent 1.1527..., and shows that achieving α > 3/2 is equivalent via transfer to finding a finite Boolean function h with fbs(h) > max{deg(h), Adv^±(h)}^{3/2}.

OP-1641 Core inclusion of the Shapley value for superadditive 2/3-convex gamesNot in LeanGeneral Equilibrium & Cooperative Games

Let $N$ be a finite set of players with $|N| \ge 3$, and let $v : 2^N \to \mathbb{R}$ with $v(\emptyset) = 0$ be a characteristic function. The cooperative game $(N, v)$ is $2/3$-convex if for every triple of distinct coalitions $S_1, S_2, S_3 \subseteq N$, at least two of the three pairs $\{S_i, S_j\}$ ($1 \le i < j \le 3$) satisfy the supermodular inequality $v(S_i \cup S_j) + v(S_i \cap S_j) \ge v(S_i) + v(S_j)$. The game is superadditive if $v(S \cup T) \ge v(S) + v(T)$ for all disjoint coalitions $S, T \subseteq N$. Does the Shapley value $\phi(v) \in \mathbb{R}^N$, defined by $\phi_i(v) = \sum_{S \subseteq N \setminus \{i\}} \frac{|S|!(|N|-|S|-1)!}{|N|!} (v(S \cup \{i\}) - v(S))$ for all $i \in N$, necessarily belong to the core of $(N, v)$ (meaning $\sum_{i \in N} \phi_i(v) = v(N)$ and $\sum_{i \in S} \phi_i(v) \ge v(S)$ for all $S \subseteq N$)?

Posed in arXiv:2611.16207, Sec. 5 — Core nonemptiness for $2/3$-convex games

What is known

The paper proves that every 2/3-convex game has a marginal worth vector in its core, but gives a 3-player non-superadditive example where the Shapley value lies outside the core. In cooperative game theory, superadditivity is the standard regularity condition; whether superadditivity guarantees that the Shapley value belongs to the core remains open.

OP-1645 Cubic-Time Multiple-Choice Knapsack with Small Weight RangeNot in LeanAlgorithm Design & Analysis

Let n be the total number of items partitioned into r disjoint classes, where each item (i, j) has integer weight w_{ij} and integer price p_{ij}. Let w_max = max_{i in [r]} (w_{in_i} - w_{i1}) denote the maximum weight range within a class. Can the Multiple-Choice Knapsack problem be solved deterministically in time O(n + w_max^3)?

Posed in arXiv:2611.15780, Sec. 9, para. 1 — Multiple-Choice Knapsack with Small Items

What is known

The paper presents an O(n + w_max^4) algorithm for MCKP, but notes that additive-combinatorial tools giving O(n + w_max^3) for 0-1 Knapsack do not transfer cleanly due to class constraints.

OP-1646 Optimal simultaneous competitive ratio curve for ski rental below the thresholdNot in LeanOnline Algorithms

In the continuous-time randomized ski-rental problem under input subsampling with scale ratio $\rho = q/p \in (0, \rho_{\mathrm{all}})$, where $\rho_{\mathrm{all}} \approx 0.338$ is the threshold above which no randomized algorithm achieves a simultaneous competitive ratio strictly below $e/(e-1)$, what is the exact function $C(\rho) = \inf_{F} \sup_{\mathcal{D}} \max\{CR_F(q, \mathcal{D}), CR_F(p, \mathcal{D})\}$ giving the optimal simultaneous competitive ratio against distributional adversaries as a function of $\rho$?

Posed in arXiv:2611.15711, Sec. 4, paragraph 1 — Beyond Worst-Case Online Algorithms via Input Subsampling

OP-1647 Robustness of online bipartite matching under vertex subsamplingNot in LeanOnline Algorithms

In the online bipartite matching problem where offline vertices are fixed and online vertices arrive sequentially, suppose each online vertex is retained independently with probability $r \in (0, 1]$. Can a randomized online matching algorithm achieve a simultaneous competitive ratio strictly exceeding the single-rate worst-case bound $1 - 1/e$ simultaneously at two distinct subsampling rates $0 < q < p \leq 1$, or does there exist a sequence of base bipartite graphs for which the competitive ratio approaches $1 - 1/e$ at both rates $p$ and $q$ simultaneously?

Posed in arXiv:2611.15711, Sec. 4, paragraph 3 — Beyond Worst-Case Online Algorithms via Input Subsampling

OP-1652 LU-Universality of Maximally Coherent States in Non-Product Abelian Group EigenbasisNot in LeanQuantum Computation

Let d_A, d_B ≥ 2 be integers with d = gcd(d_A, d_B) > 1, and write d_A = α d, d_B = β d with gcd(α, β) = 1. Let {|ψ_{a,b}⟩ : 0 ≤ a < αβd, 0 ≤ b < d} be the common orthonormal eigenbasis of the abelian group G = ⟨X_{d_A} ⊗ X_{d_B}, Z_{d_A}^α ⊗ Z_{d_B}^{-β}⟩ in ℂ^{d_A} ⊗ ℂ^{d_B}, given by |ψ_{a,b}⟩ = (αβd)^{-1/2} ∑_{ℓ=0}^{αβd-1} exp(2πi ℓ a / (αβd)) |ℓ mod d_A, ℓ + b mod d_B⟩. For parameters θ ∈ ℝ^{αβd × d}, let |ψ(θ)⟩ = (d_A d_B)^{-1/2} ∑_{a,b} exp(i θ_{a,b}) |ψ_{a,b}⟩ be the corresponding maximally coherent states. Is the family {|ψ(θ)⟩ : θ ∈ ℝ^{αβd × d}} LU-universal, meaning that every pure state |ϕ⟩ ∈ ℂ^{d_A} ⊗ ℂ^{d_B} is locally unitarily equivalent to some |ψ(θ)⟩?

Posed in arXiv:2611.16921, Conjecture IV.4 — When can local unitaries generate a complete orthogonal basis?

What is known

The authors verified numerically for non-coprime dimension pairs that arbitrary Schmidt coefficient vectors occur among the maximally coherent states of the non-product common eigenbasis, but an analytical proof is only established for 3 x 3.

OP-1656 Turán Density of the Six-ZycleNot in LeanCombinatorics for TCS

Let $Z_6$ denote the $3$-uniform zycle on $12$ vertices $\{x_i, y_i : i \in \mathbb{Z}_6\}$ with $12$ edges $\{\{x_i, y_i, x_{i+1}\}, \{x_i, y_i, y_{i+1}\} : i \in \mathbb{Z}_6\}$. Is the Turán density of $Z_6$ equal to $1/2$, that is, $\pi(Z_6) = \lim_{n \to \infty} \frac{\operatorname{ex}(n, Z_6)}{\binom{n}{3}} = \frac{1}{2}$?

Posed in arXiv:2611.16654, Conjecture 4.1 — Exact Tur\'an densities of even zycles

OP-1661 Uniqueness of Optimal Additive Integer Masks for a Biased BitNot in LeanInformation Theory & Coding

Let $p \in (1/2, 1)$ be a bias parameter with likelihood ratio $a = (1-p)/p \in (0, 1)$. For any probability distribution $q$ on $\mathbb{Z}$, define its one-guess vulnerability by $V_p(q) = \sum_{s \in \mathbb{Z}} \max(p q(s), (1-p) q(s-1))$. For a budget $c \in (0, c_{\mathrm{crit}}(p))$, where $c_{\mathrm{crit}}(p) = \min_{\ell \in \mathbb{Z}_{\geq 0}} (\ell + \frac{a(2a^\ell-1)}{1-a})$, let $V_p^*(c) = \inf \{ V_p(q) : q \ge 0, \sum_y q(y) = 1, \sum_y |y| q(y) \le c \}$. Assume that $p$ satisfies the non-tie condition $2a^j \ne 1 + a^k$ for all positive integers $1 \le j < k$. Is the distribution $q$ achieving $V_p(q) = V_p^*(c)$ subject to $\sum_{y \in \mathbb{Z}} |y| q(y) \le c$ unique?

Posed in arXiv:2611.16066, Sec. 6, question 1 — Optimal Additive Integer Masks for One-Guess Vulnerability under an Absolute-Moment Budget

OP-1662 Cost-Vulnerability Frontier for Additive Integer Masks with Three-Point SecretsNot in LeanInformation Theory & Coding

Let $X$ be an integer secret supported on $\{0, 1, 2\}$ with non-uniform prior probabilities $\mathbf{p} = (p_0, p_1, p_2)$ satisfying $p_0 > p_1 > p_2 > 0$ and $p_0 + p_1 + p_2 = 1$. When $X$ is masked by an independent additive integer variable $Y \sim q$ on $\mathbb{Z}$, the one-guess success probability is $V_{\mathbf{p}}(q) = \sum_{s \in \mathbb{Z}} \max_{x \in \{0, 1, 2\}} p_x q(s-x)$. For an absolute-moment budget $c \ge 0$, define $V_{\mathbf{p}}^*(c) = \inf \{ V_{\mathbf{p}}(q) : q \ge 0, \sum_{y \in \mathbb{Z}} q(y) = 1, \sum_{y \in \mathbb{Z}} |y| q(y) \le c \}$. Determine the exact trade-off function $V_{\mathbf{p}}^*(c)$ for all $c \ge 0$. In particular, is $V_{\mathbf{p}}^*(c)$ piecewise linear on $[0, c_{\mathrm{crit}}(\mathbf{p}))$ with infinitely many affine pieces accumulating at the critical cost $c_{\mathrm{crit}}(\mathbf{p}) = \inf \{ c \ge 0 : V_{\mathbf{p}}^*(c) = p_0 \}$?

Posed in arXiv:2611.16066, Sec. 6, question 2 — Optimal Additive Integer Masks for One-Guess Vulnerability under an Absolute-Moment Budget

OP-1663 Unconditional Optimal Growth Rate for Counting Near-Minimum Circuits in Regular MatroidsNot in LeanCombinatorics for TCS

Let Reg(m) denote the set of all regular matroids on at most m elements. For any regular matroid M with positive element weights w : E(M) -> (0, \infty), let g_w(M) denote its weighted girth, and let f_Reg(m, \alpha) be the maximum over all such regular matroids on at most m elements of the number of circuits of weight at most \alpha * g_w(M). For every fixed real number \alpha \ge 1 with \alpha not in (1/2) Z, does the limit lim_{m -> \infty} (log f_Reg(m, \alpha)) / (log m) equal 2\alpha unconditionally?

Posed in arXiv:2611.15755, Abstract (and Corollary 1.1) — Asymptotically Optimal Bounds for Counting Near-Minimum Circuits in Regular Matroids

OP-1666 Isomorphism Classification of Bipartite Poset Solutions of the Braid EquationNot in LeanCombinatorics for TCS

Let $P$ and $Q$ be finite, connected, non-empty posets. Let $L_P = \{(y, x) \in P \times P \mid y \le x\}$, $Z_P = P \times (\mathbb{Z}/2)$, and $X'_P = L_P \sqcup Z_P$. For each $l = (y, x) \in L_P$, let $t_l \in \mathrm{Sym}(Z_P)$ denote the transposition interchanging $(y, 0)$ and $(x, 1)$ while fixing all other elements. Let $E_P : X'_P \times X'_P \to X'_P \times X'_P$ be defined by $E_P(l, z) = (t_l(z), l)$, $E_P(z, l) = (l, t_l(z))$, and the identity on $L_P \times L_P$ and $Z_P \times Z_P$. Define $(X'_Q, E_Q)$ identically for $Q$. Is $(X'_P, E_P)$ isomorphic to $(X'_Q, E_Q)$ as a solution of the braid equation if and only if $P \cong Q$ or $P \cong Q^{\mathrm{op}}$?

Proposed here, building on arXiv:2611.15540, Theorem 3.3 — Solutions of the set-theoretic quantum Yang-Baxter equation arising from posets; the paper does not ask it

What is known

Theorem 3.3 shows that for any finite connected non-empty poset $P$, the automorphism group of $(X'_P, E_P)$ is $\mathrm{Aut}^\pm(P)$, which implies that $(X'_P, E_P) \cong (X'_{P^{\mathrm{op}}}, E_{P^{\mathrm{op}}})$. It is open whether this completely classifies the isomorphism classes of such solutions: does $(X'_P, E_P) \cong (X'_Q, E_Q)$ imply that $P \cong Q$ or $P \cong Q^{\mathrm{op}}$?

OP-1672 complete uniform hypergraph bipartite schmidt rank exactNot in LeanQuantum Computation

For integers a,b >= 1 and 2 <= k <= a+b, let H be the (a+1) by (b+1) rational matrix with H[i,j] = (-1)^(binom(i+j,k)), indexed from 0. Is rank_Q(H) exactly min{a+1, b+1, a+b-k+2, k+1-epsilon(k)}, where epsilon(k)=1 when k is a power of two and 0 otherwise? Equivalently, is this the exact bipartite Schmidt rank across the a|b cut of the complete k-uniform hypergraph state on a+b qubits, or the circuit state of the uniform matroid U_{k-1,a+b} with controlled-Z circuit operators?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Quantum-information researchers use Schmidt ranks to quantify bipartite entanglement and exact tensor-network bond dimensions. General hypergraph-state certificates supply lower bounds, not an exact all-cuts formula for arbitrary uniformity; previously studied complete three-uniform states cover k=3 only. This proposed formula covers the full three-parameter family and predicts a distinctive drop at powers of two. The explicit rational matrix supplies a compact, formalizable combinatorial core without requiring a quantum operator library. Evidence: Exact rational ranks of balanced matrices for k=2..24 agree; modular elimination checks 7056 asymmetric cases k<=32 and a,b<=24 without mismatch. Independently, 260 full computational-basis amplitude matrices through n=12 have the same rational rank as the compressed matrix and the proposed formula. A separate SVD scan covers 434 cuts through n=14, with 78 small full matrices checked exactly.

OP-1673 complete hypergraph nonlocal magic adjacent order gapNot in LeanQuantum Mechanics

Let |H(n,k)> be the n-qubit complete k-uniform hypergraph state, obtained by applying the controlled-Z gate to every k-subset of |+>^tensor n. For n=2m, let M(m,k) be its nonlocal trace-distance magic across the m|m cut, in the sense of Ebner et al., Eq. (7). Does L(k)=lim_{m->infinity} M(m,k) exist for every k, and for every integer r>=4, with q=2^r, do we have L(q-1)=2*sqrt(q-1)/q and L(q)=sqrt(1-2/(q^2*sin(pi/(2q))^2))? Consequently, can one rigorously establish the two distinct iterated limits lim_{r->infinity} L(2^r-1)=0 and lim_{r->infinity} L(2^r)=sqrt(1-8/pi^2)?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks whether adding just one body to every hyperedge changes the large-system nonlocal nonstabilizer resource from vanishing to a universal positive limit. It bridges complete-uniform hypergraph states, relevant for quantum information processing, with a recent exact nonlocal trace-distance magic formula. The latter expresses magic in terms of an arbitrary Schmidt spectrum but does not determine these spectra or perform their dyadic optimization. Prior hypergraph magic work studies stabilizer Renyi entropies, a different resource measure, and does not give this adjacent-order asymptotic dichotomy. Evidence: Residue-class singular-value calculations agree with full computational-basis matrices for 21 balanced systems through n=14 (experiment 25832). Numerical large-cut spectra for r=2..9 show the maximizing dyadic rank is 1 for k=2^r-1 when r>=4, and rank 2 for k=2^r (rank 4 also ties at r=2); the two families approach 0 and 0.4352361783. Finite cuts up to 8192|8192 qubits were checked by compressed matrices (25831).

OP-1674 refined bmv three occurrence clustered upper boundNot in LeanStatistical Mechanics & Thermodynamics

For every dimension d>=1, every pair of d by d complex Hermitian positive semidefinite matrices A,B, and every integer n>=1, is the average of Tr(W) over all words W containing n copies of A and exactly three copies of B at most Tr(A^n B^3)? Equivalently, is [t^3] Tr(A+tB)^(n+3) <= binom(n+3,3) Tr(A^n B^3)?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The original clustered upper inequality in the refined Bessis-Moussa-Villani conjecture fails for 3 by 3 positive semidefinite matrices with five copies of each letter, while Dinh proved the entire two-B family in arbitrary dimension. Three B's are the first unexplained occurrence number: triangle terms Re(B_ij B_jk B_ki) can have either sign, so the two-B proof by positive squared entries does not apply. A dimension-free answer would identify the next boundary of a trace inequality motivated by quantum statistical mechanics. The stronger old Ando-Hiai-Okubo theorem already handles pairs each having at most two distinct eigenvalues, including 2 by 2 matrices; the question concerns arbitrary spectra and dimensions, not that known special case. Evidence: Exact integer arithmetic checked 7200 averaged inequalities for dimensions 3..5 and n<=12 using Gram-matrix B, with no violations (25854). Another 30000 random complex Hermitian PSD pairs in dimensions 3..6 and n<=21 gave no violations (25856); a rank-two real Gram optimization found no robust negative gap for n up to 20 (25853). For the published one-parameter three-dimensional counterexample family, exact polynomial and positive-root counts show a nonnegative three-B gap for every x>=0 at each n=2..20 (25855).

OP-1675 two token cycle domination period ten exactNot in LeanGraph Theory & Graph Algorithms

For n>=10 let F_2(C_n) be the graph whose vertices are the 2-element subsets of the n-cycle, adjacent when exactly one token slides along a cycle edge to an unoccupied vertex. Is its domination number exactly floor(n(n+2)/10)+e(n), where e(n)=1 for n mod 10 in {2,6,9}, and e(n)=0 otherwise?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The exact all-orders domination number for two-token path graphs was settled only recently, and token-graph domination is of independent interest in graph theory and covering problems. Replacing the path by a cycle changes the triangular grid into a discrete Mobius band; the path proof's boundary treatment does not apply. Rivera's 2026 result concerns the distinct packing number and supplies only a lower bound on domination, not this quadratic quasipolynomial. The residue correction is informed by the exact 19-vertex result, which rules out the simpler uncorrected formula. Evidence: CP-SAT certified optimum values at every n=10..21, including 40 at n=19 and 48 at n=21, all matching the proposed formula (25838, 25840, 25841, 25846, 25849). Independently, feasibility searches found dominating sets at the proposed sizes for n=22..30 and n=39; these are upper-bound witnesses, not proofs of optimality (25839, 25845, 25852, 25851). The n=19 optimum invalidates the initially considered formula without the residue-9 correction. Separate 100-second searches for smaller sets at n=23,24,29 were inconclusive; they do not establish lower bounds beyond the solver bounds.

OP-1676 uniform interval secret list guess mask frontierNot in LeanInformation Theory & Coding

Fix integers m>=3 and 2<=k<m. Let X be uniform on {0,...,m-1}, Y be an independent integer-valued mask of finite first absolute moment, and S=X+Y. Let V_k(Y)=sum over s in Z of the sum of the k largest members of {P(X=x,Y=s-x): 0<=x<m}. For each c>=0, is inf_{E|Y|<=c} V_k(Y) equal to the lower convex envelope at c of the countable points (floor(L^2/4)/L, v_L), L>=1, where v_L=1 if L<k and v_L=k(m+L-k)/(mL) if L>=k? Equivalently, is it always sufficient to mix centered uniform distributions on finite intervals of integers? The lower convex envelope means the infimum of sum_L w_L v_L over finitely supported nonnegative weights w_L summing to one with sum_L w_L floor(L^2/4)/L <= c.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

A privacy designer may need to limit the probability of success when the observer gets k guesses, not only one. Pääkkönen's November 2026 Theorem 4.4 gives the exact frontier for k=1; it neither handles the top-k posterior sum nor proves this multi-guess frontier. For k>1 the contribution of an observation is a sum of order statistics, so the paper's one-guess argument using sliding maxima does not directly apply. A positive answer gives an explicit exact cost-privacy tradeoff and masks for every alphabet size and guess budget; a counterexample exposes the failure of interval noise. Evidence: Experiment 25998 solved 210 finite-support linear programs for all 3<=m<=8, 2<=k<m and ten budgets from 0 to 4 with mask support [-12,12]. The proposed interval-mixture convex envelope matched every optimum to numerical precision (maximum difference 4.5e-16); the selected LP solutions placed no mass at the support boundary. Experiment 25997 tested six Lagrange multipliers for the same m,k ranges.

OP-1677 regular word subtraction binary exponential state complexityNot in LeanCombinatorial Games

For each N>=3 define a DFA A_N over {a,b} with states q_0,q_1,...,q_N, start q_0, and sole accepting state q_2. No transition enters q_0. On a, send q_0 to q_2 and cyclically permute q_1 -> q_2 -> ... -> q_N -> q_1. On b, send q_0 to q_1, swap q_1 and q_2, and fix q_3,...,q_N. Let S_N be the regular language accepted by A_N; epsilon is not in S_N. Play the normal word-subtraction game on binary words: a move removes a nonempty suffix in S_N. Is the minimum complete DFA for its winning-position language exactly 7*2^(N-3)+1 states for every N>=3?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Inoue and Inazu's Theorem 3.8 proves that a regular subtraction set has a regular winning language using a subset automaton, but does not bound its optimal DFA size sharply or give an exponential lower-bound family. This explicit binary family would show exponential state blowup is unavoidable even when the rules have a linear-size deterministic automaton, and an exact count asks for both reachability and pairwise Myhill-Nerode distinguishability. This is a question about infinite regular subtraction sets described by DFA size, distinct from their Problem 2.1 and OP-1332 on finite sets measured by maximum word length. Evidence: Experiment 26004 explicitly constructs and minimizes the full reachable subset automaton: the exact formula holds for N=3,...,14, from 8 through 14337 states, and all reachable states are distinguishable. For N=3,...,6 an independent recursive solver agrees on every binary word of length at most eight. Experiment 26003 searched cycle/transposition families and identified the uniform construction; 26000 first found large minimal DFAs in randomized regular-rule instances.

OP-1679 inverse even power ising graph exact finite size reconstructionNot in LeanStatistical Mechanics & Thermodynamics

For integers p>=1 and L>=2, define the periodized inverse-even-power ring kernel A_{p,L}(r)=0 when r=0 mod L, and A_{p,L}(r)=pi^(-2p) sum_{k in Z} (r+kL)^(-2p) otherwise. Let G be any finite connected loopless multigraph with n>=1 edges, with repeated edges counted separately. Define its unrestricted ring amplitude F_{G,p}(L)=L^(-1) sum_{f:V(G)->Z/LZ} product_{uv in E(G)} A_{p,L}(f(u)-f(v)); graph vertices may coincide in the sum. Does there always exist Q_{G,p}(z) in Q[z] of degree at most p*n such that F_{G,p}(L)=Q_{G,p}(L^(-2)) for every integer L>=2, and such that [z^j]Q_{G,p}=0 for 1<=j<p?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

High-temperature expansions of long-range Ising systems use these connected multigraph amplitudes, including repeated bonds and coincident vertices. Rajabpour's Theorem 3.2 gives exact finite-size reconstruction for inverse-square interactions and a degree-n graph bound. The proposed result transfers the graph theorem to every even interaction exponent and predicts the stronger cancellation of all finite-size powers before L^(-2p). It would make each coefficient exactly reconstructible from finitely many rings for a whole family of long-range systems, as well as determine its first possible finite-size correction. The p=1 proof uses a special sine-square factorization and boundary cancellation for B_2; higher Bernoulli kernels and the stronger vanishing demand new control of these summations. Evidence: Experiment 26012 used exact rational Fourier flow sums for p=1,2,3 and six graph families with 2 through 6 edges, interpolated degree p*n from p*n+1 rings, and validated three further ring sizes; every polynomial fit, and the z through z^(p-1) coefficients vanished. Experiment 26013 repeated this for six further graphs, including K4 and repeated-bond examples, at p=2,3. Experiment 26014 independently compared Fourier amplitudes against high-precision position sums for K4, theta, and a repeated-edge triangle, p=1,2,3 and L=2,...,7; relative discrepancies were below 1.1e-59.

OP-1680 single adjacent tanking quadratic profitable pathsNot in LeanMatching & Market Design

For every integer h>=2, does there exist a complete strict one-to-one marriage market with n=2h men and n women and a sequence of at least h(h+1)/2 strictly profitable tanking actions with the following restrictions? Men never act; at each action exactly one woman w moves down by exactly one adjacent position in exactly one man's current preference list, leaving all other comparisons and all women's lists unchanged. After each action, rerun men-proposing deferred acceptance, and require w to strictly prefer her new partner to her previous partner according to her fixed sincere list. The initial profile and the choice of actions may depend on h.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The number of sequential profitable manipulations matters for how quickly a matching market settles. Bailey's Corollary 5.14 bounds arbitrary one-sided better-response paths by n(n-1), but does not show whether quadratic paths are possible when each action is a single local demotion. The classical maximal-rotation examples and the paper's cutoff-filter theorem do not answer this restricted question: a cutoff generally changes several rankings or moves across multiple positions. Memory experiment 16773 found that directly replacing the cutoff actions of a maximal exchange schedule by single adjacent demotions fails already for three agents. A positive answer would show that even minimal individual interventions can sustain a quadratic number of distinct strict improvements, across an infinite family. It moves Bailey, Strategic Tanking in Stable Matching Markets, Corollary 5.14 along quantitative: Establish a quadratic lower bound under one-list one-position moves, rather than only an O(n^2) convergence bound for unrestricted unilateral tanking.. Evidence: Experiment 26039 constructs even-size markets from alternating reflection exchange schedules and, using only profitable single-adjacent moves, finds paths of lengths 3,6,10,15,21,28,36,45,55 for n=4,6,...,20, exactly h(h+1)/2. Experiment 26041 independently replayed each action with a second deferred-acceptance implementation, confirmed strict improvement and same-side monotonicity, and found paths of length 76,102,115 for n=24,28,30 in just two trials each. Its greedy action choices sometimes fall short of the proposed h(h+1)/2, so the data supports existence, not a universal greedy guarantee. Experiment 16773 shows why naively splitting the unrestricted cutoff schedule does not suffice.

OP-1681 path core stabilizer multientropy optimal qubit allocationNot in LeanQuantum Computation

Fix integers k>=2, Q>=k and n>=2. For every composition a=(a_1,...,a_k) of Q into positive integers, let |psi_a> = 2^(-k/2) sum_{x in {0,1}^k} (-1)^(sum_{i=1}^{k-1} x_i x_{i+1}) tensor_{i=1}^k |x_i>^{tensor a_i}; regard each of the Q physical qubits as a separate party, and let S_n(a) be its integer-replica Renyi multi-entropy as defined in Czech et al., Definition 2.1. Write Q=kh+r with 0<=r<k. Is S_n maximized exactly by (h,...,h) if r=0, and otherwise by (h+1, h repeated k-r times, h+1 repeated r-1 times), up to reversal? Is S_n minimized exactly by (1,Q-k+1,1,...,1), up to reversal? For k=2 the latter means (1,Q-1) or its reversal. The equality cases are part of the question.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Multipartite quantum-information researchers often choose how many physical qubits to encode at nodes of a fixed interaction backbone. This asks for a universal optimal allocation and the opposite extreme, not a single size or numerical improvement. Theorem 3.1 supplies an alternating connected-subtree sum but does not optimize it; coefficientwise subtree inequalities do not control this alternating weighted sum, and the extremal arrangement of the larger balanced blocks is a nontrivial ordering question. The path state is a local-Clifford transform of a tree graph state, represented in the knowledge base by hypergraphState with two-vertex hyperedges. This is distinct from the authors' explicitly stated open questions on distinguishing states over all partitions and on monotonicity in the replica index. It moves Czech, Feng, Harper, Ju and Zhao, Renyi Multi-entropy for Stabilizer States: A Finite Field Gauss Sum Problem, arXiv:2610.26814, Theorem 3.1 and Eq. (20). along new_setting: The paper evaluates S_n for each choice of positive block sizes; ask for the exact maximizers and minimizers over all compositions at fixed qubit budget and path-core size, uniformly for all integer replica orders.. Evidence: Experiment 26093 exhaustively checked 411,990 compositions for k=2..10 and Q up to min(2k+2,20), at n=2,3,4,10, including exact equality cases. Experiment 26090 tested every balanced placement for k<=12, h in {1,2,4}, all remainders and n=2,3,5,10, together with 80 random unbalanced allocations per parameter. Experiment 26091 independently enumerated the signed order-2 replica contraction for nine small allocations and matched the subtree formula.

OP-1683 Optimal range constant in the linear subset-sum inverse theoremNot in LeanElementary Number Theory

For each integer $q \ge 2$, let $\theta_q$ denote the infimum over all real $\theta > 0$ such that the following holds: for every integer $s \ge 1$ whose least non-divisor $\operatorname{snd}(s) = \min \{d \in \mathbb{N}_{\ge 1} : d \nmid s\}$ equals $q$, and for every $\varepsilon > 0$, there exists $T_0(s, \varepsilon)$ such that for all integers $T \ge T_0$ and $E \ge 1$ satisfying $\theta E \le sT$, every subset $A \subseteq \{1, \dots, E\}$ with $|A| \ge E/q + \varepsilon T$ has a subset summing to $sT$. Proposition 3.1 proves that $\theta_2 = 1$, $\theta_3 = 2$, and $\max\{2, q - 2 + 1/q\} \le \theta_q \le 2^{q-2}$ for all $q \ge 4$. What is the value of $\theta_q$ for $q \ge 4$? In particular, is $\theta_q = O(q)$, or is $\theta_q = \max\{2, q - 2 + 1/q\}$?

Posed in arXiv:2611.17205, Problem 9.2 — Forbidden subset sums in a linear range: an inverse theorem and the Erd\H{o}s-Graham irregularity problem

What is known

Proposition 3.1 establishes θ₂ = 1, θ₃ = 2, and max{2, q - 2 + 1/q} ≤ θ_q ≤ 2^{q-2} for all q ≥ 4. Closing the gap between linear/constant lower bounds and the exponential dyadic iteration upper bound 2^{q-2} is the key to extending the asymptotic formula for f_c(n)/n to wider ranges of c.

OP-1685 Optimal Competitive Ratio for Deterministic Online TransportationNot in LeanOnline Algorithms

In the Online Transportation problem on a metric space (X, d), there are m ≥ 1 facilities G = {v₁, …, v_m} ⊆ X with known positive integer capacities c₁, …, c_m ≥ 1. A sequence of N ≤ ∑_{i=1}^m c_i requests arrives at locations x₁, …, x_N ∈ X sequentially. Upon the arrival of each request x_t, an online algorithm must immediately and irrevocably assign x_t to an available facility h ∈ G that has received fewer than c(h) previous requests, incurring cost d(x_t, h). Can a deterministic online algorithm achieve a competitive ratio of 2m - 1 against the optimal offline assignment, matching the lower bound inherited from Online Metric Matching?

Posed in arXiv:2611.17090, Section 1.1 — Online Transportation via Shifted Geometric Scales

OP-1686 Boundedness of Boxicity for Odd Graphs K(2k+1, k)Not in LeanGraph Theory & Graph Algorithms

For every integer $k \ge 2$, let $K(2k+1, k)$ denote the odd graph whose vertices are the $k$-element subsets of a $(2k+1)$-element ground set, with two vertices adjacent if and only if they are disjoint. Is the boxicity $\operatorname{box}(K(2k+1, k))$ uniformly bounded by an absolute constant $C$ independent of $k$? In particular, does $\operatorname{box}(K(2k+1, k)) = 3$ for all $k \ge 2$? If the boxicity tends to infinity with $k$, what is its true asymptotic growth rate?

Proposed here, building on arXiv:2611.17183, Theorem 1.5 — New bounds on the boxicity of Kneser graphs; the paper does not ask it

What is known

Theorem 1.5 proves that for large enough k, the boxicity of the odd graph K(2k+1,k) satisfies box(K(2k+1,k)) ≤ dim_TH(K(2k+1,k)) ≤ 3 ln(2k+1) / ln ln(2k+1). Previously, a 2020 paper conjectured box(K(n,k)) = n-k, which would give k+1 for odd graphs, but this was disproved computationally at K(7,3) where box(K(7,3)) = 3 (arXiv:2610.22241), matching box(K(5,2)) = 3 (the Petersen graph). The sublinear upper bound in Theorem 1.5 grows with k, while the lower bound from Corollary 1.3 is only 1. It remains completely open whether the boxicity of odd graphs is uniformly bounded by an absolute constant (such as 3) or tends to infinity as k grows.

OP-1690 ising cactus pi eighth stabilizer magic cycle productNot in LeanQuantum Mechanics

Let G=(V,E) be any finite simple cactus graph: every edge belongs to at most one simple cycle. Let b be its number of bridges, and let C(G) be its set of simple cycles, with lengths l(C)>=3. Define |psi_G> = exp[-i(pi/8) sum_{uv in E} Z_u Z_v] |+>^{tensor |V|} and Q(G)=2^{-|V|} sum_{P in {I,X,Y,Z}^{tensor |V|}} <psi_G|P|psi_G>^4. Is Q(G) = (3/4)^b times the product over C in C(G) of (3^{l(C)} + a_{l(C)})/4^{l(C)}, where a_l=1 for odd l and a_l=7 for even l? Thus is M_2(psi_G)=-log_2 Q(G) exactly additive over bridge and cycle blocks with these explicit parity corrections? Isolated vertices contribute 1.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Quantum information researchers seek exact many-body magic benchmarks for interacting spin systems. Jha and Gadge determine every stabilizer Renyi entropy for forests and explicitly identify cycle parity dependence as the obstruction; their independent-edge Clifford pruning cannot turn all cycle-edge rotations into single-qubit rotations. The question extends their result to arbitrarily many overlapping-at-cut-vertices loops, gives their exact finite-size parity correction, and includes every forest as a special case. The pi/8 restriction targets the paper's non-Clifford maximal-magic angle and makes an exact rational all-size theorem plausible; this specific cactus extension is not posed in the paper. The computation evaluates the full Pauli fourth moment independently of the block formula. Evidence: Experiment 26469 finds (3^l+1)/4^l for odd cycles and (3^l+7)/4^l for even cycles for every l=3,...,11 by summing Pauli fourth moments. Experiment 26471 checks the proposed bridge-cycle product for all 102 nonisomorphic connected cactus graphs on 2 through 7 vertices, including two-cycle graphs; experiment 26466 also tests several other angles and observes nontrivial parity and angle dependence. Computation uses floating-point Pauli transforms followed by integer rounding; the results are numerical evidence, not a proof.

OP-1691 deferred acceptance serial dictatorship unenvied exact lawNot in LeanMatching & Market Design

For every integer n>=1, consider n students and n unit-capacity schools. Draw each student's strict ranking of the schools independently and uniformly, and each school's strict priority ordering of students independently and uniformly. Let U_DA be the number of students whom no other student envies in the student-proposing deferred-acceptance matching: student i envies j if i ranks j's assigned school above i's own. On an independently drawn instance with the same student preference law, let U_RSD be the number unenvied under random serial dictatorship, where students choose their favorite available school in a uniform independent random order. Is the complete finite-n law of U_DA exactly equal to that of U_RSD, i.e. P(U_DA=k)=P(U_RSD=k) for every k=0,...,n? Equivalently, does RSD's unenvied count have the Myers-Wilf singleton-coupon law: the number of coupon types observed exactly once when all n uniformly sampled types have appeared?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers comparing school-choice mechanisms care about uncertainty and tail risk in who cannot be improved, not just the average. Ortega et al. prove both expected counts equal H_n, and identify DA's full law with a stopped coupon collector; their serial-dictatorship proof computes one-student probabilities only and does not establish higher joint moments or equality of laws. The striking equality of the two means may therefore reflect an unexpectedly exact distributional invariance under these distinct mechanisms. This asks for an infinite family of exact finite-market identities rather than a particular finite instance, and does not repeat a question posed in that paper. It moves Ortega, Ziegler, Arribillaga and Zhao, The Distribution of Envy in Matching Markets, Propositions 1 and 3, arXiv:2603.23385 along stronger_result: Replace the proven equality of the two expectations H_n by equality of their entire distributions for every market size.. Evidence: Experiment 26484 computes the two distributions independently with exact rational Markov recursions for every n=1,...,20 and finds equality coefficient by coefficient; at n=4 the probabilities for 1,2,3,4 unenvied agents are 97/288,97/288,67/288,3/32. Experiment 26486 directly enumerates all 46,656 three-student preference-and-priority profiles for deferred acceptance and all 216 preference profiles for serial dictatorship, giving the same exact law (7/18,7/18,2/9). These are computations, not a proof.

OP-1692 subcubic tree greedy matching path corona sharpNot in LeanOnline Algorithms

For a finite simple tree T with at least one edge, maximum degree at most 3 and matching number m=nu(T), let R(T)=E|M(T)|/m, where M(T) is obtained by exposing the edges in a uniformly random order and accepting each edge whose endpoints are still unmatched. Let C_m be the tree obtained by adjoining one new leaf to each vertex of a path on m vertices, and let r_m=E|M(C_m)|/m. Is R(T)>=r_m for every such T? In particular, is the sharp infimum of R(T) over all finite subcubic trees equal to integral_0^1 exp(t^2-2t) [1+(1-t)^2] dt = 0.7690397534563842..., approached by C_m as m tends to infinity? The claim compares all tree sizes for each fixed matching number, and asks for the limiting sharp constant as well.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This is a graph-structural performance theorem for a basic online matching rule, with exact extremizers and an explicit limiting approximation ratio. OP-1542 suggests 3/4 on all subcubic graphs, attained by a triangle with a leaf; that worst example is forbidden in a tree and does not decide the tree-only guarantee. The existing arbitrary-graph arguments cannot exploit recursive independence across the two sides of each tree edge. A positive answer identifies the exact loss from local competition in every bounded-degree tree, while a counterexample must beat a concrete infinite family. It moves OP-1542, subcubic random-edge greedy matching conjectured sharp three-quarters ratio; Feng, Li and Yang, Improved Bounds for Online Matching with Random Edge Arrivals, arXiv:2611.13571 along new_setting: Restrict from arbitrary subcubic graphs to trees and conjecture an exact extremal tree for every matching number, yielding a sharp constant strictly larger than 3/4.. Evidence: Experiment 26509 checked 20,760 nonisomorphic subcubic trees on 2 through 18 vertices using a polynomial cavity recurrence and found no violation when compared to the path corona with the same matching number; the minimizer for each m=2,...,9 was a path corona, with one tied case at m=3. Experiment 26511 independently computed its mean by exact rational first-edge recursion: r_3=37/45 and r_9=22163417/28194075. Experiment 26507 numerically follows coronas through 320 vertices, reaching 0.7699995, and tests 360 random subcubic trees at those scales. Experiment 26496 numerically evaluates the proposed limiting integral. The exhaustive tree comparisons use floating arithmetic and are evidence, not proofs.

OP-1694 slow exact nim two extra piles sharp nine rangeNot in LeanCombinatorial Games

For k>=3 consider normal-play slow exact k-Nim on k+2 nonnegative integer piles: a legal move chooses exactly k nonempty piles and removes one token from each. Let G_k(x) be the Sprague-Grundy value, recursively the mex of its legal followers' values. Is the range of G_3 exactly {0,1,2,3,4,5,6,7}, and for every k>=4 is the range of G_k exactly {0,1,2,3,4,5,6,7,8,9}? More specifically, does the position (4,5,10,11,15,...,15), with k-2 copies of 15, have Grundy value 9 for every k>=4?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Combinatorial game researchers seek ranges of Grundy values to analyze disjunctive sums, and an exact constant valid simultaneously for every k is substantially stronger than boundedness for a fixed k. Theorem 1 of Gurvich and Naumova solves the k+1-pile family; adding another omitted pile changes the option structure and their parity reduction does not extend directly. The older OP-1600 asks only whether a k-dependent bound exists, which is immediate because there are at most binom(k+2,2) legal moves: it does not address a k-independent bound or the exact range. Experiment 26561 finds failures of the specific unit-shift identity and double-shift periodicity used in the k+1 proof, so that method cannot be applied unchanged. This is an all-k, all-pile-height claim, not a request to solve a single small position. It moves Gurvich and Naumova, arXiv:2611.14546, Theorem 1 and Section 7; AFTD OP-1600 along new_setting: Move from k+1 piles, whose exact Grundy range is {0,1,2,3}, to k+2 piles and predict a sharp bound independent of k, with explicit maximizing positions.. Evidence: Exact mex enumeration in experiment 26539 checks all 96,560,646 sorted positions for k=3 with pile sizes at most 100 and finds maximum 7. Experiment 26553 exhausts k=4,5,6,7,8 at respective pile cutoffs 60,40,30,25,22, over 319 million sorted positions in total, with maximum 9 in every case. Experiment 26550 adds 106 million positions for k=9 and 10 through cutoffs 19 and 17 and finds maximum 9, attained by the displayed padded witness. Experiment 26560 adds 115 million positions for k=11 and 12 through cutoff 15, again with maximum 9 and the same padded witness. Independent Python mex recursion agrees at smaller cutoffs (26527 and 26534). Experiment 26561 finds many failures of both the k+1 paper’s unit-shift identity and its double-shift periodicity for k+2 piles. Finite search is evidence, not a proof of the universal claim.

OP-1696 greedy carpooling bounded component cycle rank double exponential tailNot in LeanOnline Algorithms

Does the forest double-exponential discrepancy bound for randomized greedy carpooling extend uniformly to graphs with bounded cycle rank per connected component? Precisely, are there absolute constants c,C,a>0 such that the following holds for every integer b>=0. Fix in advance a sequence of T>=2 distinct undirected non-loop edges whose final simple graph G has |E(H)|-|V(H)|+1<=b for every nonempty connected component H. Starting with all vertex discrepancies zero, orient each arriving edge toward its endpoint of smaller current indegree-minus-outdegree discrepancy, breaking every tie by an independent fair coin. Let M be the largest absolute discrepancy at any vertex and any prefix. For every integer D>=1, is Pr(M>=D) <= C*T*exp(-c*2^(a*max(0,D-2*b)))? In particular, for every fixed b, this would give M=O_b(log log T) with high probability, including pseudoforests when b=1.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Online discrepancy researchers need simple, efficient orientation rules with strong prefix guarantees. The proved OP-1106 theorem gives a double-exponential tail for forests, but its key independence step fails exactly when an arrival closes a cycle; Lei's all-input cube-root result uses a different algorithm and does not settle randomized greedy here. Allowing a uniform bounded number of cycles in every component covers arbitrarily many unicyclic components, so this is not a finite-instance extension. The proposed dependence on cycle rank makes quantitative how far the independence argument survives: one needs a new analysis of a cyclic component interacting through later bridge edges. The family is also a benchmark for how graph topology changes the threshold between logarithmic and log-logarithmic discrepancy. Evidence: Experiment 26612 exactly enumerated all 166,320 edge arrival orders over connected seven-edge unicyclic graphs and all 115,920 orders over seven-edge trees, summing every fair tie-breaking sequence: both classes had maximum observed prefix-discrepancy tail 1/32 at threshold 3. Experiment 26611 exhausts the analogous six-edge cases. Experiment 26613 samples 6,000 unicyclic and 6,000 tree schedules with 8 through 12 edges and computes their exact tie-breaking tails. Experiment 26625 evaluates every coin sequence in deep balanced-tree schedules with zero to three added cycle edges and observes discrepancy-four tails as large as 1/8192, giving nontrivial rare-event evidence; it also shows that a cycle can change the distribution, so direct component independence cannot simply be assumed. These finite computations do not establish the asymptotic bound or its uniform constants.

OP-1698 finite energy filter renyi purity first finite size correctionNot in LeanStatistical Mechanics & Thermodynamics

Let a: Z -> R be nonzero and finitely supported. For n=4k, let |psi_k> be the normalized n-qubit vector sum_{x in {0,1}^n} a_{2k-|x|}|x>, and let P_k be the purity of either 2k-qubit reduced state. Put S2=sum_j a_j^2, M2=sum_j j^2 a_j^2, S4=sum_{u,v,w in Z} a_u a_v a_w a_{u-v+w}. For each (u,v,w), set d=(0,u,v,v-w) and V(d)=sum_i d_i^2-(sum_i d_i)^2/4, and set R=sum_{u,v,w} a_u a_v a_w a_{u-v+w} V(0,u,v,v-w). Is it true that lim_{k->infinity} k (sqrt(4k) P_k - (2/sqrt(pi))*S4/S2^2) = (2/(sqrt(pi)*S2^2))*(-5*S4/32 - R + S4*M2/S2)?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers use energy filtering to study the emergence and magnitude of nonlocal entanglement on finite systems. This asks for an explicit filter-dependent first correction for every fixed finite signed filter, converting the proved leading trace asymptotic to a finite-size purity law; that limit gives no rate or coefficient. Unlike the existing all-Renyi leading-order question OP-1115 and general leading purity question OP-892, it measures how different energy filters approach the asymptotic regime. Evidence: Experiment 27024 computed shifted fourth-trace kernels for five signed filters and k up to 2048, converging to the quadratic-shift coefficient. Independent experiment 27025 computed spectra of the binomially weighted reduced matrix for four filters and k up to 256; the scaled purity corrections approached the stated constants.

OP-1699 odd minimum biconnected inversion permutations ladder insertionNot in LeanCombinatorics for TCS

For odd n>=5, let E_n be the set of permutations pi of [n] whose inversion graph is 2-vertex-connected and whose number of inversions is exactly (3n-3)/2. Let L_{n-1} be the unique (n-1)-permutation whose 2-connected inversion graph has the minimum number (3(n-1)/2)-2 of edges; Verkama identifies its inversion graph as a ladder. Is every pi in E_n obtained by inserting one entry into L_{n-1} in such a way that exactly two new inversions are created and the resulting graph is 2-connected? Furthermore, is |E_n|=(3n-7)/2 for every odd n>=5? Insertion means choosing a position and a value in [n], increasing existing values at least that value by one.

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for a structural classification and exact enumeration of all sharp objects for a new inversion-density theorem, extending the paper’s even-order unique extremizer to the missing odd orders. Permutation-pattern and graph-structure researchers would gain an explicit equality family useful for stability and pattern-avoidance questions. The general 2-connectivity lower bound and the even ladder classification do not by themselves classify an odd extremizer: one must show that a suitable two-degree vertex can always be removed without destroying connectivity. Evidence: Experiment 27029 exhausts all permutations up to size 10: at odd n=5,7,9 the extremal sets have 4,7,10 members, respectively. Experiment 27031 tests all insertions into the unique even ladders and obtains precisely 4,7,10,13 distinct extremizers at n=5,7,9,11; at n<=9 these counts match exhaustive enumeration.

OP-1700 bipartite generalized petersen fall three coloring classificationNot in LeanGraph Theory & Graph Algorithms

For even n>=4 and odd k with 1<=k<n/2, define the generalized Petersen graph P(n,k) on vertices u_i,v_i (i mod n), with edges u_i u_(i+1), u_i v_i, and v_i v_(i+k). Does P(n,k) admit a proper 3-coloring in which the closed neighborhood of every vertex contains all three colors if and only if either (i) k=1 and 3 divides n, or (ii) k>=3 and (n,k)!=(8,3)? Equivalently, in the remaining bipartite Petersen graphs is the 2-homogeneous chromatic number exactly four?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Hao, Liu and Romaniello establish a four-color upper bound for all cubic bipartite graphs and a three-color result for 3-connected det-extremal graphs, but neither determines the optimal number for this entire important two-parameter family. The question gives an exact structural classification across infinitely many graphs, including the Möbius–Kantor obstruction P(8,3); their det-extremal construction does not apply to the full family. It is distinct from the paper’s own question about det-extremal graphs with connectivity two. Evidence: Z3 experiments 27038 and 27039 tested every even n<=60 and every odd k<n/2 (and k>11 at n=62); the predicted classification held. Independent CP-SAT experiment 27042 checked the exceptional prism and (8,3) cases and constructed fall colorings for representative higher-step graphs. Experiment 27028 found the 16-vertex obstruction in an independent generation of 3-connected cubic bipartite graphs of girth at least six.

OP-1701 gapped three point uniform secret optimal interval mask frontierNot in LeanInformation Theory & Coding

Fix an integer d>=3. Let X be uniform on {0,1,d} and Y be an independent integer-valued mask with E|Y|<=c. Define V_d(Y)=(1/3) sum_{s in Z} max{Pr(Y=s),Pr(Y=s-1),Pr(Y=s-d)}. For k>=0 define C_k=k(k+1)/(2k+1) and V_k=[2k+2+min(2k+1,d-1)]/[3(2k+1)]. Is inf_Y V_d(Y), for every real c>=0, equal to the lower convex envelope at cost c of the points (C_k,V_k), k>=0? Equivalently, does every budget admit an optimal mask that is symmetric about zero, nonincreasing in |y|, and a mixture of at most two uniform laws on integer intervals [-k,k]?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The exact privacy/absolute-cost tradeoff determines how much additive noise is needed to protect a gapped three-value secret. The known uniform-interval result uses interval sumsets and does not cover {0,1,d}; the general three-point frontier is OP-1662. This is a concrete all-gap structural conjecture and explicit frontier, not a restatement of that general open problem. The candidate mask family is forced to be centered and unimodal, and this property fails for some other non-interval secret supports, so it is not a formal application of the interval argument. Evidence: Experiment 27058 compared unrestricted and symmetric-unimodal finite-window LPs for d=3..20 over 13 budgets. Experiment 27062 compared unrestricted LPs to the explicit centered-interval hull for d up to 80 and budgets through d, with no discrepancies. These LPs only optimize within finite windows. Experiment 27067 shows this extension cannot simply be assumed for arbitrary supports: {0,4,10} already gives a smaller unrestricted value at budgets 1 and 2.

OP-1703 summable algebraic energy filter purity convergence exponentNot in LeanStatistical Mechanics & Thermodynamics

For each real s>1 let a_j=(1+|j|)^(-s), j in Z. For n=4k, let |psi_k> be the normalized n-qubit state sum_{x in {0,1}^n} a_{2k-|x|}|x>, and let P_k be the purity of the reduced state on either 2k-qubit half. Put S2=sum_j a_j^2, S4=sum_m (sum_j a_j a_{m-j})^2, and L_s=(2/sqrt(pi))*S4/S2^2. Is |L_s-sqrt(4k)P_k| eventually positive, and does lim_{k->infinity} log |L_s-sqrt(4k)P_k|/log k = -min{s-1/2,1} for every s>1?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The leading Renyi-2 purity of summable filters is the subject of OP-892, and the finite-support first correction is OP-1698. Neither determines how slowly experimentally natural power-law filters approach the thermodynamic limit. This asks for an exact exponent across a continuum of decay rates, including the expected transition at s=3/2; the logarithmic formulation deliberately allows critical logarithmic or other subpower factors. It would identify which filter tails dominate finite-size entanglement errors. Evidence: Experiments 27153, 27157 and 27167 computed reduced-state purities at scales up to k=1,048,576 for several s. Experiment 27163 independently estimated L_s by polylogarithm Fourier quadrature. The data suggest exponents below one for s=1.1,1.2,1.4 and values approaching one for s=1.6,2.0, but the effective exponents drift substantially; the stated exponent is a tentative extrapolation, not a fitted finite-size result.

OP-1704 tree shift fixed cut edges entanglement stochastic orderNot in LeanQuantum Mechanics

Let T be a finite tree with n >= 4 vertices. Choose distinct vertices a,b such that each internal vertex of their path has degree 2 and each endpoint has at least one neighbor off the path. Form T' by moving every edge bw with w off the a-b path to aw. For each k in {0,...,n-1} and each integer r >= 0, let N_T(k,r) count the k-edge subsets F of E(T) whose maximum matching has size at least r. Must N_T'(k,r) <= N_T(k,r) hold for every such T,a,b,k,r? Equivalently, if a uniformly random bipartition S of V(T) is conditioned to have exactly k crossing edges, is the cut-rank of T' stochastically dominated by that of T under the analogous conditioning?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers studying stabilizer entanglement and bond percolation would obtain a stochastic ordering of the full entanglement spectrum along every generalized tree shift, with exact control at fixed numbers of crossing interactions. The Conjecture Engine Part XXVIII conjecture 402 asks only for star/path extremality under independent bond deletion, not a comparison along every shift or conditioning on exactly k retained edges. Conditioning removes the independent-edge weighting used by the unconditioned conjecture and gives coefficientwise inequalities; the shift order would imply the latter conjecture, so it is substantive. AFTD OP-1367 instead asks an inverse-rank moment for cuts of fixed vertex cardinality; it is a distinct conditioning, and its stronger fixed-size rank dominance fails. Evidence: Experiment 27324 enumerated all unlabeled trees of order 4 through 13 and every edge subset, finding all fixed-edge tail counts between star and path. Experiment 27328 checked all eligible ordered generalized shifts through 11 vertices (3,186 shifts at n=11), with no tail-order violation. Experiment 27329 independently checked GF(2) cut rank against crossing-forest maximum matching for every cut of every tree through n=9.

OP-1705 arbitrarily labeled tree q permanent negative interval monotoneNot in LeanCombinatorics for TCS

Let n >= 2 and let A be an n by n real symmetric positive definite matrix whose graph of nonzero off-diagonal entries is a tree, with the coordinates in an arbitrary order. For P_q(A)=sum over permutations sigma of q^(number of inversions of sigma) times product_i A[i,sigma(i)], is the derivative dP_q(A)/dq nonnegative for every real q in [-1,0]?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks whether the noncrossing labeling hypothesis in the known tree-support monotonicity theorem is necessary, a concrete support-family advance toward real Bapat monotonicity rather than the unrestricted question OP-1589. Arbitrary coordinate order is essential because q-permanents are not invariant under simultaneous relabeling. In the 2018 proof, inversion length separates over matching edges only when no two independent tree edges cross in the order; crossings destroy that derivative expansion. The 2026 counterexamples for q>1 require cycles in the support, and do not settle this tree question; for tree support nonnegative q is immediate from the matching expansion, so [-1,0] is the substantive range. Evidence: Experiment 27333 evaluates exact rational derivatives at q=-1,-3/4,-1/2,-1/4 for all 18,247 labeled trees of orders 3 through 7 using A=I+Adj(T)/(Delta(T)+1), with no negative value. Experiment 27331 samples arbitrary labelings and independently weighted tree matrices normalized to 0.999 of the positive-definite boundary, for all unlabeled trees through n=9 and five negative q values, with no numerical violation.

OP-1706 deferred acceptance unenvied proposal gumbel gaussian fluctuationsNot in LeanMatching & Market Design

For n students and n unit-capacity schools, draw every student's strict preference ordering and every school's priority ordering independently and uniformly. Run student-proposing deferred acceptance. Let L_n be the total number of genuine proposals and U_n the number of students envied by no other student. Put G_n=L_n/n-log n and Z_n=(U_n-exp(-G_n)*log n)/sqrt(log n). As n tends to infinity, does the pair (G_n,Z_n) converge in distribution to (G,exp(-G/2)Z), where G has the standard Gumbel law, Z is standard normal, and G and Z are independent?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This identifies the distribution and market-to-market uncertainty of an economically significant fairness statistic, jointly with the observed computational burden of deferred acceptance: U_n/log n would converge to an Exp(1) law rather than concentrating around its expectation, while the additional sqrt(log n) fluctuations are mixed Gaussian. Ortega et al. prove E U_n=H_n and a coupon-singleton correspondence, but not this joint fluctuation theorem. OP-1691 asks whether the one-dimensional finite-n distribution agrees with serial dictatorship; it neither studies the number of proposals nor supplies a joint second-order law. Myers-Wilf give a coupon joint counting formula, not a statement in terms of actual DA proposals, which exclude repeated raw draws. Evidence: Experiment 27336 used 200,000 exact Poissonized coupon samples at each n from 10^3 to 10^9, finding central-G residual variances 0.995 to 1.011 after normalization by exp(-G/2), and separately simulated discrete coupons. Experiment 27337 simulated 8,300 random DA markets with n=10,40,100,300: singleton and unenvied counts agreed in every run, and the central-G standardized residual variance moved from 0.376 to 0.831 as n increased. These are finite-sample diagnostics, not a proof of the limit.

OP-1707 fixed rate hedge periodic worst case regret growthNot in LeanComputational Learning Theory

For every integer N>=2 and q in (0,1), run Hedge with fixed learning rate eta=-log(q), initially uniform weights, and binary loss vectors in {0,1}^N. Let R_N(q) be limsup as T goes to infinity of 1/T times the maximum over all length-T binary loss sequences of Hedge's cumulative expected loss minus the loss of the best fixed expert. Is R_N(q) always attained as the limiting per-round regret of some eventually periodic binary loss sequence? In particular, is R_5(1/5)=352484/1839825?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The proved Hedge bound gives R_N(q)<=-log(q)/8 but neither its exact value nor the structure of worst adversaries at fixed N and learning rate. An affirmative periodicity theorem would reduce an infinite-horizon online-learning optimization to a finite cycle certificate for every fixed parameter and would quantify exactly how pessimistic the general potential bound is. Simple two-round alternation is insufficient: five experts at q=1/5 admit a specific five-round cycle with a higher average regret than any genuinely two-period loss sequence. The case N=5 is a test of the family-level statement, not an isolated finite-horizon calculation. Evidence: Experiment 27348 independently checks the fixed-label periodic loss sets {0,1,2},{0,1,3},{4},{2,3},{4}, giving each expert exactly two losses per period and exact per-round regret 352484/1839825. Experiment 27344 computes maximum mean cycles on all sorted relative-loss states with spread <=d for each d=2,...,9 at N=5 and q=1/5, obtaining this same value throughout. Experiment 27340 found that two-cycles are not always optimal, while experiment 27347 ruled out an overly small proposed universal bound on relative-loss spread; the question therefore permits periods and spreads depending on N and q.

OP-1708 random graph state uniformity minimum degree hitting timeNot in LeanQuantum Mechanics

Fix an integer k>=2. For each n>=2k, form the random graph process G_0,...,G_{n choose 2} by starting with n isolated vertices and adding uniformly random missing edges one at a time. Let tau_deg be the first step when the minimum degree is at least k. Let tau_unif be the first step at which every k-element vertex set S has rank_F2 of the S by V\S adjacency submatrix equal to k. Does Pr(tau_unif=tau_deg) tend to 1 as n tends to infinity? Equivalently, is the graph state at the minimum-degree hitting time asymptotically almost surely k-uniform, meaning every k-qubit reduced density matrix is maximally mixed?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Quantum-information researchers use k-uniform graph states for secret sharing and error correction; this would identify the precise moment in a natural sparse entangling-gate process when all k-qubit subsystems become maximally mixed, for every fixed k. Burchardt and Hahn characterize 2-uniformity through foliage partitions, and Bollobas-Thomason prove minimum-degree and k-connectivity hitting times coincide, but k-connectivity does not force F_2 cut rank k on every k-set. Unlike connectivity, graph-state k-uniformity can be destroyed by adding edges, so the graph-process assertion needs its own argument. The result would transfer the classical minimum-degree hitting-time law to an entanglement property beyond the cited papers. Evidence: Experiment 27355 simulates the actual graph process: for k=2 the failure counts at n=30,80,200,500 were 8/500, 1/500, 0/250, 0/100; for k=3 at n=24,48,96,160 they were 27/400, 1/250, 0/120, 0/50. Experiment 27358 independently compares the odd-neighborhood criterion used in the simulation with direct binary cut-rank elimination for every unlabeled graph through 7 vertices and every admissible k, finding no discrepancy. These samples do not prove the asymptotic limit.

OP-1709 ising tree shift lee yang edge strict monotonicityNot in LeanStatistical Mechanics & Thermodynamics

Let T be a tree on n>=4 vertices and let 0<t<1. Its ferromagnetic Ising field polynomial is Z_T(t,z)=sum over A subset V(T) of t^(number of edges with exactly one endpoint in A) z^|A|. Let theta_T(t) in (0,pi] be the smallest positive argument of a zero of Z_T(t,z), whose zeros lie on the unit circle. Choose distinct vertices a,b such that both have neighbors off their a-b path and every internal vertex of that path has degree 2. Form T' by moving all edges from b to its off-path neighbors so they instead meet a. Is theta_T'(t) strictly smaller than theta_T(t) for every such T, shift, and t? In particular, are the star and path the unique minimizing and maximizing n-vertex trees?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The Lee-Yang edge controls the complex-field analyticity gap and finite-size precursor of magnetic criticality. The circle theorem locates zeros on the unit circle but does not order the first zero as tree interactions are rewired. A strict shift monotonicity theorem would settle the extremal graph geometry uniformly in n and temperature and give a structural comparison along the entire tree-shift poset, beyond computing one tree family. It is distinct from AFTD OP-1360, which compares zero-field energy variance, and from OP-1704, whose shifts concern graph-state cut-rank distributions rather than Ising field zeros. Standard positive-real-field comparison does not directly compare complex-field zeros. Evidence: Experiment 27367 compares every ordered nontrivial generalized shift of every unlabeled tree through n=11 at t=0.2,0.5,0.8, with no numerical violations. Experiment 27369 independently isolates exact real roots of the Chebyshev-transformed polynomial for every shift through n=9 at t=1/2 and 2/3, verifying strict separation of root intervals. Experiment 27365 checks exact strict star/path extremality for all trees through n=10 at t=1/3,1/2,2/3; experiment 27363 checks four numerical temperatures through n=12.

OP-1711 cayley tree kuramoto brownian excursion bridge limitNot in LeanLagrangian & Hamiltonian Mechanics

Let T_n be a uniformly random labeled tree on n vertices, independent of iid oscillator frequencies of finite mean and variance sigma^2 in (0,infinity). For each edge e let C_e be either component after its removal, and set K_n = max_e |sum_{v in C_e}(omega_v - mean(omega))|, the critical coupling for a stable phase-locked state in the uniformly edge-coupled Kuramoto model. Let E be a standard Brownian excursion and B an independent standard Brownian bridge. Is K_n/(sigma sqrt(n)) convergent in distribution to the supremum of |B(b)-B(a)| over every component interval (a,b) of {t in (0,1): E(t)>h}, for rational h>0?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Network-dynamics researchers seek the threshold distribution for synchronization on a natural random tree ensemble, not just bounds for a fixed path or star. The finite-tree formula for K_n, the path's Brownian-bridge law, and conditioned Galton-Watson excursion limits do not by themselves identify the extreme of correlated component imbalances or establish its universality under arbitrary finite-variance frequencies. OP-1710 instead asks for stochastic monotonicity under deterministic tree shifts. Evidence: Uniform Cayley tree simulations at n=100 to 30000 give a nondegenerate sqrt(n)-scaled distribution; normal, binary, Laplace, and Student-t3 frequencies give consistent distributions within simulation error. Independently simulated excursion/bridge functionals have comparable means and quantiles, with discretization and Monte Carlo error.

OP-1713 random tree graph state ising cut entanglement gaussian lawNot in LeanQuantum Mechanics

Fix p in (0,1]. Draw a uniform labeled tree T_n on n vertices. Independently choose a fair root spin and, along every edge, flip the spin with probability p, independently; the spins define a random bipartition A and A^c. Prepare the graph state of T_n and let S_n be its bipartite von Neumann entropy in bits. Let a be the unique positive solution of a=exp(-p a), and set mu=1-a and v=1-a-(1-a/(1+p a))^2. Do S_n/n converge in probability to mu and (S_n-n mu)/sqrt(n) converge in law to a centered normal of variance v?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This asks for a full, parameter-dependent entanglement law for a natural random quantum network, with an ordinary uniform random bipartition at p=1/2 and an Ising-correlated bipartition for other p. Graph-state cut entropy is binary cut rank; for trees this equals the maximum matching of the cut forest, and the cuts are independent bond percolation. The uncut case p=1 is related to the known random-tree matching distribution, but the percolated family and its explicit variance are not supplied by that result. OP-1704 instead compares two fixed tree shapes at a fixed number of cut edges. Evidence: Across p=0.1, 0.3, 0.5, 0.8, 1 and n up to 10000, simulated entropy means and variances match the stated functions, and standardized quantiles and skew approach normal values. An independent computation checked binary cut rank against forest maximum matching on 1350 random samples.

OP-1714 quenched tree graph state entanglement variance decompositionNot in LeanQuantum Mechanics

For fixed 0<p<1, let T_n be a uniform labeled n-vertex tree, and conditionally on T_n independently mark each edge as crossing with probability p; those marks determine a bipartition up to global spin flip. Let S_n be the graph-state entanglement entropy in bits across the resulting bipartition, and M_n=E[S_n|T_n]. Let a be the unique solution in (0,1) of a=exp(-p a), b the unique solution in (0,1) of b=exp(-2 p a+p^2 b), mu=1-a, v_cut=(a-b)(1-p a)/(1+p a), and v_tree=1-a-(1-a/(1+p a))^2-v_cut. Is it true that, in probability over T_n, the conditional law of (S_n-M_n)/sqrt(n) converges to N(0,v_cut), while (M_n-n mu)/sqrt(n) converges to N(0,v_tree), with these two fluctuations asymptotically independent?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

OP-1713 asks for the annealed entanglement law averaging over both tree geometry and cuts. Quantum-network users also need the distribution for a typical fixed network and the variability across networks; an annealed central limit theorem alone does not determine either conditional law or the variance split. This question supplies explicit, independently testable formulas for both contributions; at p=1/2 their predicted asymptotic variance densities are approximately 0.06364 from the cut and 0.00289 from topology. Evidence: Exact enumeration of every labeled tree and cut through n=7, and nested sampling of 600-4000 independent trees with 100 cuts each up to n=5000, agree with the two variance predictions at p=0.3, 0.5, 0.8. Further simulations show cut-centered skew near zero and kurtosis near three, and small skew for tree-dependent means.

OP-1715 cayley percolation matching number poisson binomial lawNot in LeanCombinatorics for TCS

For each integer n>=2 and p in [0,1], take a uniformly random labeled tree T on n vertices and retain each of its edges independently with probability p. Let M be the maximum matching cardinality of the retained forest, and F_{n,p}(z)=E[z^M]. Are all zeros of F_{n,p} real and nonpositive? Equivalently, is M distributed as a sum of independent Bernoulli random variables, with parameters depending on n and p?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

A positive answer gives the complete finite-size distribution a strong Poisson-binomial structure, concentration inequalities, and a new approach to the graph-state entanglement questions OP-1713 and OP-1714. It is substantially stronger and more general than the log-concavity observation suggested by Wastlund for the unpercolated endpoint p=1: this asks for real-rootedness and the full p-family, including uniformly random graph-state bipartitions at p=1/2. The analogous fixed-tree assertion is false, so random-tree averaging is an essential feature rather than an immediate consequence of a fixed-tree theorem. Evidence: Exact automorphism-weighted enumeration of all labeled trees through n=15, for p=1/2,3/10,4/5,1, gave only real nonpositive zeros. A proposed labeled-tree coefficient formula, independently checked against those distributions, gives the same outcome up to n=30 for 30 rational p values including near both endpoints. For a specific seven-vertex fixed tree and p=1/2, the distribution polynomial is (1+13z+30z^2+20z^3)/64 and has two nonreal zeros.

OP-1717 uniform random subgraph matching number log concavityNot in LeanCombinatorics for TCS

For any finite simple graph G, let c_k(G) be the number of edge subsets F contained in E(G) whose maximum matching has size exactly k. Must the sequence c_k(G) be log-concave: c_k(G)^2 >= c_{k-1}(G)c_{k+1}(G) for every k>=1? Equivalently, is the maximum matching size in a uniformly random spanning subgraph always log-concavely distributed?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The result would give a shape theorem for a central observable in stochastic matching and reliability, and for random-bipartition graph-state entanglement when G is a tree. Heilmann-Lieb concerns the number of individual matchings of each size, whereas c_k counts all subgraphs according to their maximum matching size, so that theorem does not directly settle this question. The probability 1/2 is essential to the proposed statement: its straightforward extension to other equal retention probabilities fails even for a seven-vertex tree, and its generating polynomial can have nonreal zeros already at p=1/2. Evidence: Exact enumeration found no failure among 773 connected graph-atlas graphs on seven vertices with at most 14 edges, all smaller connected atlas graphs, 3000 random graphs with 16-20 edges, or the tested complete-bipartite, wheel, and ladder families. Exact tree dynamic programming found no failure at p=1/2 through 17 vertices. For the seven-vertex tree consisting of three length-two branches, equal retention probability 99/100 instead gives coefficients proportional to [1,1029699,591000300,999407970000], which fail log-concavity.

OP-1718 algebraic energy filter min entropy singular kernel constantNot in LeanStatistical Mechanics & Thermodynamics

Fix 1/2 < s < 1. For each k >= 1 let |psi_k> be the normalized 4k-qubit state sum_{x in {0,1}^{4k}} (1+|2k-|x||)^(-s)|x>, and let lambda_max(k,s) be the largest eigenvalue of its 2k-qubit reduced density matrix. Let K_s be the bounded integral operator on L^2(R) with kernel exp(-(x^2+y^2)/2)|x+y|^(-s), and C_s = sum_{j in Z}(1+|j|)^(-2s) = 2 zeta(2s)-1. Is it true that k^(s-1/2) lambda_max(k,s) tends to sqrt(2/pi) ||K_s||_op^2/C_s?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The min-entropy controls the largest Schmidt coefficient and one-shot entanglement concentration for energy-filtered many-body states. Memory records that the ambitious Renyi-2 five-regime question was retired as out of reach; this asks for one spectral edge, with a specified operator-limit constant, on the unsummable but square-summable interval. The proved quartic trace theorem requires l^(4/3), and even there a fourth moment does not determine the top eigenvalue. The already-asked finite-support Renyi law does not cover this long-range filter. Evidence: Experiment 27632 diagonalized the Dicke-sector matrix at n=256 to 16384 across four s and several Renyi orders. Experiment 27633 used n=1024 to 65536 and independent singular-cell-averaged Nystrom discretizations of K_s: for s=5/8 the rescaled eigenvalue rose from 1.51346 to 1.74773 versus predicted 1.78007; s=3/4 and 7/8 approached their predictions much more slowly. Computations are floating point with Gaussian-tail truncation, not a proof.

OP-1720 tree percolation matching logconcavity low retentionNot in LeanCombinatorics for TCS

For every finite tree T and every real p with 0 <= p <= 1/2, retain each edge of T independently with probability p and let M be the maximum matching size of the retained forest. Are the probabilities a_k=Pr(M=k) log-concave, meaning a_k^2 >= a_(k-1)*a_(k+1) for every integer k>=1, with probabilities outside the support taken as zero?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Matching size under bond percolation is a basic reliability statistic and on forests controls cut-rank statistics of tree graph states. OP-1717 asks log-concavity at p=1/2 for arbitrary graphs; that single marginal does not imply the distribution at other p, because log-concavity need not survive mixing over subgraphs. The restriction on p is substantive: earlier memory and new calculations find homogeneous-percolation counterexamples for p close to one. The usual stronger route through real-rootedness is unavailable even at p=1/2. It moves OP-1717 (uniform random subgraph matching-number log-concavity) along new_setting: Restrict to trees but extend retention from the uniform-subgraph point p=1/2 to the whole low-retention interval; allow no unsupported extension above 1/2.. Evidence: Experiment 27651 used exact integer arithmetic on every unlabeled tree through 16 vertices at p=1/2, 7/10, 4/5 and 9/10 and saw no log-concavity violations; it did find 16-vertex violations at 37/40 and 93/100. Experiment 27638 sampled 65,000+ heterogeneous percolation assignments on trees through 11 vertices without a violation. Experiment 27634 found the seven-vertex subdivided three-star has a non-real-rooted matching polynomial at p=1/2. Experiment 27653 found an exact-rational homogeneous p=9/10 counterexample on a two-level 115-vertex tree and examples near p=0.8787; these are computational evidence, not Lean-verified results.

OP-1722 bounded ratio efx ordinal mms discontinuous staircaseNot in LeanFair Division

Fix a real R>1. For n>=2 let D_n(R) be the largest integer d for which there is a finite additive-goods instance with n agents, where each agent i has two positive item values a_i,b_i with a_i<=b_i<=R*a_i, and a complete EFX allocation A in which some agent receives strictly less than her 1-out-of-d maximin share. Is lim_{n->infinity} D_n(R)/n = 2(ceil(R)+1)/(ceil(R)+3)? In particular, is the worst asymptotic ordinal loss constant on each interval m-1<R<=m and discontinuous immediately to the right of every positive integer m?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This would quantify the ordinal fairness guaranteed by every EFX allocation as a function of an economically meaningful bound on valuation heterogeneity. The integer-ratio conjecture OP-1719 does not cover nonintegral values or prove a uniform bound for ratios below R. The computed staircase is qualitatively surprising: arbitrarily small departures from equal item values appear sufficient for an asymptotic 6/5 loss, with further jumps when R crosses an integer. The related recent paper constructs a favorable allocation and does not bound arbitrary EFX outcomes. It moves OP-1719, bounded_bivalued_efx_ordinal_mms_sharp_asymptotic along new_assumption: Extend the fixed integer value ratio to arbitrary real upper bounds and personalized scales, predicting an explicit discontinuous staircase; the integer case of OP-1719 is included.. Evidence: Experiments 27668 and 27669 solved fractional two-resource bundle-packing relaxations over a range of integer and rational value ratios and thousands of thresholds, including ratios 1.001, 1.999 and 2.001. In every case the optimum agreed with the ceiling staircase; searches cover finite rational ratios and bounded thresholds, not irrational parameters or a uniform proof. Experiment 27670 found that a tempting finite-n floor-plus-one bound is false, so the question asks only for the asymptotic constant. A matching identical-valuation family exists computationally: put K=ceil R, n=1+(K+3)h; give one agent K low goods, (K+1)h agents two high goods each, and 2h agents K+1 low goods each. Pairing one high and one low produces 2(K+1)h bundles each worth more than K.

OP-1723 fixed edge tree matching rare tail ensemble equivalenceNot in LeanCombinatorics for TCS

Fix p in (0,1) and put q=1-p. For integer d>=1 let ell=2d, r=ceil(d*q^(-d)), and let T_d be the depth-two tree with one root, r branch vertices, and ell private leaves at each branch. Let E_d=r(ell+1), and choose a uniformly random subset of exactly floor(p E_d) edges. For j>=0 write b_j(d) for the probability that its maximum matching has size r-j. Does b_d(d)^2/(b_(d-1)(d)*b_(d+1)(d)) tend to 4q/(1+q)^2 as d tends to infinity?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Random-edge-budget reliability and graph-state entanglement can be modeled in a microcanonical ensemble with an exact edge budget. OP-1721 asks about independent edge retention; conditioning creates global dependence and requires relative local-limit control at a far-tail event, so ordinary equivalence of ensembles does not supply this limit. Because the predicted constant is below one for every p in (0,1), a positive answer would also rule out universal log-concavity at fixed edge count, a plausible rescue for the earlier OP-1717 conjecture. It moves OP-1721, tree_matching_percolation_rare_tail_all_p_counterexample_family along new_setting: Condition on an exact number of retained edges instead of independent retention, and ask whether the same rare-tail ratio persists.. Evidence: Experiment 27688 computed high-precision inclusion-exclusion for p=1/4,2/5,1/2,7/10,9/10 and d=10,15,20,30,40; for p=1/2 the ratio falls from 1.00444 at d=10 to 0.91817 at d=40, consistent with 8/9. Experiment 27686 independently matched the inclusion-exclusion expression to exact generating-polynomial counts on four smaller trees. Experiment 27689 used full exact integer counting for r=544, ell=22 and half the 12512 edges, finding the ratio at matching size 527 is about 0.997547 < 1. Experiments 27685 and 27688 are finite computations, and no instance or limit has been verified in Lean.

OP-1724 algebraic filter min entropy correction exponent crossoverNot in LeanStatistical Mechanics & Thermodynamics

Fix 1/2<s<1. Let lambda_k(s) be the largest half-chain reduced-density eigenvalue of the normalized 4k-qubit state sum_x (1+|2k-|x||)^(-s)|x>. Let K_s on L2(R) have kernel exp(-(x^2+y^2)/2)|x+y|^(-s), let mu_s=||K_s||, and let phi_s be its normalized positive top eigenfunction. Set C_s=2*zeta(2s)-1, L_s=sqrt(2/pi)*mu_s^2/C_s, A_s=2^(1-(2s-1)/2)*Gamma(1-(2s-1)/2)/(2s-1), B_s=2*(2*zeta(s)-1)*integral(phi_s(x)^2*exp(-x^2),x in R)/mu_s, and e(s)=min(s-1/2,(1-s)/2). Is it true that k^e(s)*(k^(s-1/2)*lambda_k(s)-L_s) tends to L_s*A_s/C_s for s<2/3, to L_s*(A_s/C_s+B_s) for s=2/3, and to L_s*B_s for s>2/3?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The leading min-entropy limit in OP-1718 does not say how rapidly the asymptotic prediction becomes accurate for finite quantum systems. Two effects appear to compete: the algebraic tail missing from the normalization and the discretization of the singular Hankel kernel. Their powers cross at s=2/3, predicting a sign and exponent transition relevant to finite-size resource estimates. The existing energy-filter finite-size question OP-1698 concerns finite-support Renyi-2 purity, not a long-range filter's largest eigenvalue. It moves OP-1718, algebraic_energy_filter_min_entropy_singular_kernel_constant along quantitative: Determine the first finite-size correction to the proposed spectral-edge law, including an explicit change of exponent and coefficient at s=2/3.. Evidence: Experiment 27692 used FFT-based matrix-free iteration up to k=2^28 and independent singular-cell Nystrom estimates. At s=2/3 the normalized correction changes from -3.281 at k=2^14 to -3.449 at k=2^28; experiment 27702 predicts -3.472 from the displayed operator coefficient. For s=0.6 the observed normalized value grows to +0.995 versus predicted +1.226, and for s=0.75 it reaches -16.11 versus predicted -17.61. At s=0.65, however, all sampled corrections remain negative even though the conjectured eventual leading coefficient is positive: the two powers are close and convergence is very slow. All values use floating point and finite quadrature and do not establish the sign change or limit.

OP-1725 bounded ratio efx ordinal mms exact finite denominatorNot in LeanFair Division

Fix n>=2 and real R>1. Let D_n(R) be the largest integer d such that some finite additive-goods instance with n agents, each agent i valuing each item at one of two positive values a_i,b_i with a_i<=b_i<=R*a_i, has a complete EFX allocation in which some agent receives strictly less than her 1-out-of-d maximin share. Put K=ceil R and h=ceil(n*(K+1)/(K+3))-1. Is D_n(R) exactly n-1+h-floor(2h/(K+1))?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

This gives researchers an exact ordinal guarantee for every EFX allocation at every market size and value-ratio bound, including rounding effects that the asymptotic OP-1722 omits. It addresses the Referee's request to isolate a finite combinatorial upper bound and matching construction, while implying both OP-1719 and OP-1722 on taking n to infinity. Hosseini and Pathak's recent algorithmic existence theorem does not bound all EFX allocations. A simple floor-plus-one guess fails even for three agents, so the proposed expression contains genuine finite-size arithmetic. It moves OP-1722, bounded_ratio_efx_ordinal_mms_discontinuous_staircase along stronger_result: Replace the conjectured asymptotic limit by an explicit exact denominator for every n and every real ratio bound R>1, with a finite construction and a discrete packing upper bound.. Evidence: Experiment 27731 exactly enumerated compressed integer-ratio bundle configurations for R=2,...,10, n<=35 and disadvantaged-bundle values t<=6R, with no value exceeding the construction at t=R. Experiment 27727 used exact integer packing for fourteen nonintegral rational ratios, n<=12 and t<=8aK, again without exceeding the formula. Experiment 27726 checked the reduction of the critical-threshold maximization to the displayed expression for K=2,...,30 and n<=100. Experiment 27728 checked the explicit identical-valuation EFX construction for K=2,...,30, n<=200 and high values K and K-1/2. These are finite computations, not proofs for arbitrary parameters.

OP-1726 period doubling all attractors irredundant coverage countNot in LeanCombinatorics for TCS

Let w_0=0 and w_{n+1} be obtained from w_n by simultaneously replacing 0 by 01 and 1 by 00. For each nonempty factor u of w_n let C_n(u) be the set of positions lying in at least one occurrence of u. Let H_n be the family of distinct C_n(u) that are inclusion-minimal among all nonempty factors. Is |H_n| = floor((7n-11)/2) for every n >= 4? Can these inclusion-minimal coverages be described recursively, yielding an explicit irredundant certificate for every string attractor of w_n, regardless of its size?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Researchers studying word compression and morphic combinatorics need short exact certificates for arbitrary candidate attractors. Existing work classifies the two size-minimum period-doubling attractors, which does not characterize larger attractors, and establishes the full coverage antichain for Thue-Morse, whose morphism and critical substring structure differ. The general KB theorem identifies inclusion-minimal coverages as the exact certificate but does not count or construct them. The observed period-doubling minimal constraints include many factors that are not minimal unique substrings, so the Thue-Morse classification cannot simply be transplanted. It moves Faro, Marino and Pavone, arXiv:2610.10950, all-cardinality Thue-Morse minimal-coverage classification; Banbara et al., arXiv:2602.16152, minimum-cardinality period-doubling attractors along new_setting: Transfer the full all-cardinality irredundant coverage classification to period-doubling words and determine its exact count; the period-doubling factor families require new non-unique-substring constraints.. Evidence: Experiments 28066 and 28067 independently enumerate factor coverages for n=4,...,9, obtaining 8,12,15,19,22,26, matching the formula; n=3 is an exception with 6 rather than 5. For n=3,4 all subsets were checked against the proposed minimal-coverage certificate. Many minimal coverages have no representative that is a minimal unique substring.

OP-1727 thermomajorization sparse probe sharp missed trace errorNot in LeanQuantum Mechanics

Fix n >= 2 and a set F of probe ranks in {1,...,n-1}. Let x and y range over probability vectors of length n sorted in nonincreasing order, D_j = sum_{i=1}^j (y_i-x_i), and E_F = max({0} union {D_k : k in F}). For each 1 <= j < n not in F, let a = max({0} union {k in F : k<j}) and b = min({n} union {k in F : k>j}). Is sup_{x,y}(D_j-E_F) exactly (j-a)(b-j)/(j(b-a))? In particular, is the sharp worst-case underestimation of optimal conversion error, sup_{x,y}(max(0,D_1,...,D_{n-1})-E_F), the maximum of this expression over all unprobed j?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Quantum thermodynamicists comparing noisy finite-level state conversions need error guarantees when only a small fixed selection of binary work probes can be optimized. At uniform Gibbs weights, population capacity depends only on subset cardinality and the optimal trace-distance error is max(0,D_j). Existing OP-988 studies exact yes/no certification; it does not quantify how much error missing probes can hide. The proposed formula is a tight, dimension-uniform additive guarantee for every probe family and every pair of states, not a particular finite instance. Meroi et al. give the full-scan error but not this sharp sparse-scan comparison. It moves Meroi et al., arXiv:2610.35433, trace-distance capacity-deficit theorem and target-dependent binary-probe certificate; OP-988, universal exact-probe question along quantitative: Determine the sharp loss from any incomplete fixed probe family at uniform Gibbs weights, including explicit dependence on all gaps between probed ranks.. Evidence: Experiment 28069 solves 4,894 numerical linear programs for every n=3,...,10, every probe subset of size at most four and every j, with no failure of the formula. Experiments 28063 and 28065 optimize probe locations and show nonuniform optimal choices; calculations use floating-point LP and do not constitute a proof.

OP-1729 unicyclic corona greedy perfect matching extremaNot in LeanOnline Algorithms

Let H be a connected simple unicyclic graph on m>=4 vertices. Form its corona H+ by adding one private leaf adjacent to each vertex of H. Expose all edges of H+ in a uniformly random order and greedily accept an edge exactly when both endpoints are unmatched; write p(H) for the probability that the resulting matching is perfect. Let C_m be the m-cycle and F_m be a triangle with all m-3 additional vertices attached as leaves to the same triangle vertex. Is p(C_m) <= p(H) <= p(F_m), with equality only when H is isomorphic to the corresponding extremizer? Furthermore, if alpha is the unique positive solution of alpha*tanh(alpha)=1, are the sharp extremal rates lim_{m->infinity} p(C_m)^(1/m)=alpha^(-2) and lim_{m->infinity} m*p(F_m)=2/3?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Random-order matching and sequential adsorption researchers care about the chance of completing all demands, not only expected matching size. Every private leaf forces the perfect matching, and the probability can be expressed as the graph integral integral_[0,1]^m product_{ij in E(H)} max(x_i,x_j) dx; the topology of H can then change the decay from exponential to polynomial. OP-1564 concerns a lower bound on subcubic graphs, whereas this family can have unbounded degree and asks for both sharp finite-m extremizers and rates. Dyer-Frieze's forest result is about expected size; Galvin et al. compare tree sources, whereas a unicyclic source has a persistent cycle that cannot be removed by their tree-shift ordering, so neither result gives the proposed classification. It moves OP-1564 studies random greedy perfect-matching success on arbitrary subcubic graphs; Dyer and Frieze, Randomized greedy matching (1991), study expected matching size on forests; Galvin et al., arXiv:2512.23828, Theorem 1.5 gives tree homomorphism comparisons for increasing-column target matrices. along new_setting: Characterize exact success-probability extremizers and two different asymptotic regimes for every unicyclic core, using a max-kernel partition function rather than expected matching size.. Evidence: Experiment 28093 uses exact rational subset dynamic programming and enumerates all 396 nonisomorphic connected simple unicyclic cores for m=3,...,9, finding the cycle and triangle-star uniquely minimize and maximize at every m>=4. Experiment 28094 independently computes greedy success by the exact first-edge recursion for every such core through m=7 and agrees with the kernel integral. Experiment 28095 numerically estimates alpha=1.1996786403 and alpha^(-2)=0.6948165381, checks the cycle transfer operator, and finds m*p(F_m)=0.66733534 at m=1000. The extremal claims are conjectural.

OP-1731 frustrated hypercube ground state equitable fields all oddNot in LeanStatistical Mechanics & Thermodynamics

For every odd integer r >= 3, does the fully frustrated Ising model on the n = r^2+1 dimensional hypercube have a ground-state spin configuration f : {0,1}^n -> {-1,1} whose two local-field classes form an equitable bipartition? Precisely, use the canonical couplings J(x,x xor e_i)=(-1)^(x_0+...+x_{i-1}), and write h(x)=f(x) sum_i J(x,x xor e_i) f(x xor e_i). Require h(x) in {r-1,r+1} for every x and exactly n/2 neighbors y of every x to have h(y) != h(x). The first parameter not covered by the known explicit family is r=11 (n=122).

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Ground-state researchers and Boolean-function theorists would obtain a strongly regular spatial organization of the two excitation energies, far beyond the exact ground energy. Wang's local-field second moment yields the two values and equal global populations but does not force the neighbor counts. Proposition 3.3 gives equal coordinate influences and half the vertices with equal neighbor counts for all odd r; Corollary 3.4 proves full equitability only for r=2^k±1. Generic Boolean lifts need not preserve the desired local neighbor constraint, so the existence extension is not an immediate application of the lifting theorem. This specific equitability extension is not one of the paper's indexed open problems. Evidence: Experiments 28277 and 28278 evaluate local-field labels of randomly selected exact Boolean lifts: sampled constant neighbor counts appear for r=3,5,7,9,15, whereas none of 1,000 tested r=11 lifts passed 12 sampled vertices; this is computational evidence of a genuine construction gap, not a nonexistence claim.

OP-1732 geometric prior additive mask exact rescaled bit frontierNot in LeanInformation Theory & Coding

Fix m>=3, 0<a<1, and c>=0. Let X_m be supported on {0,...,m-1} with P(X_m=j)=(1-a)a^j/(1-a^m). For an independent integer-valued mask Y with E|Y|<=c, let V_m(a,c) be the infimum of the one-guess success probability sum_s max_{0<=j<m} P(X_m=j)P(Y=s-j). Let V_2(a,c) be the same infimum for the two-point prior (1,a)/(1+a). Is V_m(a,c) = (1-a)/(1-a^m) + [(1+a)(1-a^(m-1))/(1-a^m)] [V_2(a,c)-1/(1+a)] for every m,a,c? In particular, do the same cost-optimally shifted truncated-geometric masks and their adjacent mixtures attain the entire frontier below the common critical cost?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

The answer would transfer an exact privacy-cost law from biased bits to all finite geometric priors, directly usable for additive masking with a multi-level secret. Pääkkönen's Theorem 5.8 solves m=2; its single-step layer-cake proof does not extend directly because the m-step posterior maximum can merge separated level-set components. The stated affine identity is a concrete all-m quantitative conjecture, not the paper's general question about arbitrary larger priors. It predicts the complete curve and optimal masks, not only a critical budget. Evidence: Experiment 28283 compared finite-window linear programs with the hull of 150 shifted truncated geometrics for m=3,4,5,8, a=0.3,0.5,0.7,0.8, and 21 budgets up to 98% of the geometric critical cost: discrepancies were at numerical roundoff. Experiment 28282 probes six further three-point biases. These are finite-window numerical checks, not global certificates.

OP-1733 hedge many experts sharp mixability gap rateNot in LeanComputational Learning Theory

Fix any q in (0,1) and eta=-log(q). Run Hedge with N>=2 experts, initially uniform weights, constant learning rate eta, and arbitrary binary loss vectors. Let R_N(q)=limsup_{T->infinity} T^(-1) times the maximum, over all length-T loss sequences, of cumulative Hedge loss minus the best fixed expert's cumulative loss. Put p_q=1/(1-q)-1/eta and G(q)=p_q-log(eta/(1-q))/eta. Is there a constant C_q<infinity such that 0<=G(q)-R_N(q)<=C_q/N for every N>=2? In particular does the many-expert long-run worst-case regret rate equal the sharp single-round mixability gap G(q)?

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Online-learning researchers would obtain the exact worst-case regret density for each fixed learning rate and an explicit finite-expert convergence rate, tightening the general eta/8 estimate. OP-1707 asks whether a worst adversary is periodic for each fixed N; this complementary large-N limit does not assume fixed-N periodic attainment and is a potential route to an explicit sharp benchmark. Single-round maximization gives G(q) as an upper envelope but does not by itself construct a long sequence in which the best expert keeps pace with the mix loss. Evidence: Experiment 28295 builds finite equal-loss cyclic expert families whose regret rates approach G(q) for q=0.2,0.5,0.8,0.95; experiment 28296 rounds their group sizes to each N=8,...,4096 and observes N times the gap bounded in the tested examples. Experiment 28290 shows why a two-expert extremal guess fails for larger N. The calculations are numerical and supply lower bounds, not optimality certificates.

OP-1734 random ising graph magic concentration sharp varianceNot in LeanQuantum Mechanics

For each n>=1 let G_n be the Erdos-Renyi graph on [n] with each edge independent and present with probability 1/2. Put |psi_G>=exp[-i(pi/8) sum_{uv in E(G)} Z_u Z_v]|+>^{tensor n} and Q(G)=2^{-n} sum_{P in {I,X,Y,Z}^{tensor n} <psi_G|P|psi_G>^4. For X_n=2^n Q(G_n), is E[X_n]=16-32(3/4)^n+24(1/2)^n-8(1/4)^n and Var(X_n)=2048(11/16)^n+O((5/8)^n) as n tends to infinity? In particular X_n tends to 16 in L2, giving an explicit typical stabilizer-Renyi magic M_2=n-4+o_P(1).

Proposed here, building on knowledgebase; the paper does not ask it

What is known

Quantum-information and many-body researchers would get an explicit concentration law and sharp variance for commuting non-Clifford Ising circuits on dense random interaction networks, complementing the exact forest law. OP-1695 proposes a 16-spin identity for each fixed graph; it does not give a random-graph mean or fluctuation scale, and its main identity is presently stated rather than proved. This problem can use that identity if established, or a direct four-replica calculation. The variance constant probes correlations of two replicas of Q and cannot be obtained from its first moment alone. Evidence: Experiment 28302 exhaustively checks the stated mean against direct Pauli moments for every labeled graph through n=5 and computes exact variances; experiment 28299 checks random examples through n=10. Experiment 28301 enumerates the finite second-moment compatibility graph: maximal supports have sizes 16, 11, 8 with respective counts 256, 2048, 4992; each size-11 support intersects all other maximal supports in at most 10 vertices. This suggests the 2048 and 11/16 variance term; the computation is not a proof of the graph-state identity.

Other Unproved Lean Statements

4694

Statements in the knowledgebase that Lean has checked as well-formed but nobody has proved, and that belong to none of the problems above: the machine's own conjectures and the steps it filed towards other results. If you can see how to prove one, say so in the discussions.

ghz_phase_invariant_nonzero_haar_averageIn Leananalysis

For identity pair matrices and the displayed three-term real tensor, the SO(3) Haar average of the GHZ phase invariant is -16/45. The Euler-angle integral shown has normalization 8π². Thus a universal zero-average sign-change argument fails for arbitrary tensors.

theorem ghz_phase_invariant_nonzero_haar_average :(∫ α in (0:ℝ)..(2*Real.pi), ∫ β in (0:ℝ)..Real.pi,
    ∫ γ in (0:ℝ)..(2*Real.pi), GhzHaarCounterexample.phase α β γ * Real.sin β) =
      -(128/45:ℝ)*Real.pi^2
fractional_scd_cramer_denominator_boundIn Leanlinear_algebra

Let 𝒞 be a finite family of subsets of a finite type α with τ > 0 on 𝒞, ℚ-linearly independent incidence vectors, and ∑_{C ∋ x} τ C = 1 for every x. Then there is D ≥ 1 with D ≤ |α|^(2|α|) and every τ C is of the form k/D for a natural number k.

open scoped Classical BigOperators in
theorem fractional_scd_cramer_denominator_bound
    {α : Type*} [Fintype α] (𝒞 : Finset (Set α)) (τ : Set α → ℚ)
    (hpos : ∀ C ∈ 𝒞, 0 < τ C)
    (hind : LinearIndependent ℚ (fun C : {D // D ∈ 𝒞} => fun x : α => if x ∈ (C : Set α) then (1:ℚ) else 0))
    (hsum : ∀ x : α, ∑ C ∈ 𝒞 with x ∈ C, τ C = 1) :
    ∃ D : ℕ, 0 < D ∧ D ≤ (Fintype.card α) ^ (2 * Fintype.card α) ∧
      ∀ C ∈ 𝒞, ∃ k : ℕ, τ C = (k : ℚ) / (D : ℚ)
int_matrix_cramer_natAbs_denominatorIn Leanlinear_algebra

Let M be an integer matrix with nonzero determinant and b an integer vector. If a rational vector x with x_j ≥ 0 for all j solves M x = b, then with D = |det M| (a positive natural) every x_j is of the form k_j / D with k_j a natural number.

theorem int_matrix_cramer_natAbs_denominator
    {ι : Type*} [Fintype ι] [DecidableEq ι]
    (M : Matrix ι ι ℤ) (b : ι → ℤ) (x : ι → ℚ)
    (hdet : M.det ≠ 0)
    (hx : (M.map (Int.cast : ℤ → ℚ)) *ᵥ x = fun j => (b j : ℚ))
    (hpos : ∀ j, 0 ≤ x j) :
    ∃ D : ℕ, 0 < D ∧ D = M.det.natAbs ∧ ∀ j, ∃ k : ℕ, x j = (k : ℚ) / (D : ℚ)
int_matrix_det_natAbs_le_factorial_mul_powIn Leanlinear_algebra

Leibniz-formula determinant estimate: if every entry of an integer matrix M has absolute value at most c, then |det M| ≤ (card ι)! * c^(card ι).

theorem int_matrix_det_natAbs_le_factorial_mul_pow
    {ι : Type*} [Fintype ι] [DecidableEq ι] (M : Matrix ι ι ℤ) (c : ℕ)
    (h : ∀ i j, (M i j).natAbs ≤ c) :
    M.det.natAbs ≤ Nat.factorial (Fintype.card ι) * c ^ (Fintype.card ι)
three_qubit_alternating_harmonic_normIn Leanlinear_algebra

For any three pairwise perpendicular unit axes and any orthonormal transverse frames around them, the complex determinant of the three transverse vectors has squared modulus 2.

theorem three_qubit_alternating_harmonic_norm :
let dot := fun (a b : Fin 3 → ℝ) => ∑ i, a i*b i
    let frame := fun (x y a : Fin 3 → ℝ) =>
      dot x x = 1 ∧ dot y y = 1 ∧ dot a a = 1 ∧
      dot x y = 0 ∧ dot x a = 0 ∧ dot y a = 0
    let z := fun (x y : Fin 3 → ℝ) (i : Fin 3) => (x i : ℂ) + Complex.I * (y i : ℂ)
    let det := fun (u v w : Fin 3 → ℂ) =>
      u 0*(v 1*w 2-v 2*w 1)-u 1*(v 0*w 2-v 2*w 0)+u 2*(v 0*w 1-v 1*w 0)
    ∀ x y a X Y b u v c : Fin 3 → ℝ,
      frame x y a → frame X Y b → frame u v c →
      dot a b = 0 → dot a c = 0 → dot b c = 0 →
      Complex.normSq (det (z x y) (z X Y) (z u v)) = 2
arrows_grundy_sum_empty_comparisonIn LeanCombinatorial Games

If the empty position on the disjoint sum G ⊔ H has Grundy value 0 at sufficient fuel, then the empty positions of G and of H have the same Grundy value at that fuel.

open scoped Classical in
theorem arrows_grundy_sum_empty_comparison {V W : Type*} [DecidableEq V] [Fintype V]
    [DecidableEq W] [Fintype W] (G : SimpleGraph V) [DecidableRel G.Adj]
    (H : SimpleGraph W) [DecidableRel H.Adj] (fuel : ℕ)
    (hfuel : (G.sum H).edgeFinset.card + 1 ≤ fuel)
    (h : arrows_pos_grundy (G.sum H) fuel (ArrowsEmptyPos (V ⊕ W)) = 0) :
    arrows_pos_grundy G fuel (ArrowsEmptyPos V) = arrows_pos_grundy H fuel (ArrowsEmptyPos W)
arrows_legal_move_sumIn LeanCombinatorial Games

From the sum position (p,q) on G ⊔ H, a legal move is either a legal move of G applied to p, or a legal move of H applied to q.

open scoped Classical in
theorem arrows_legal_move_sum {V W : Type*} [DecidableEq V] [Fintype V] [DecidableEq W] [Fintype W]
    (G : SimpleGraph V) [DecidableRel G.Adj] (H : SimpleGraph W) [DecidableRel H.Adj]
    (p p' : ArrowsPos V) (q q' : ArrowsPos W) :
    ArrowsLegalMove (G.sum H) (arrows_sum_pos p q) (arrows_sum_pos p' q') ↔
      (ArrowsLegalMove G p p' ∧ q' = q) ∨ (ArrowsLegalMove H q q' ∧ p' = p)
arrows_legal_move_tail_head_iffIn LeanCombinatorial Games

q is a legal option of p in the Game of Arrows on G if and only if there are adjacent u, v with the edge uv unmarked at p, q differing from p only by marking u->v, and u not a source and v not a sink in q.

theorem arrows_legal_move_tail_head_iff {V : Type*} [DecidableEq V] [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (p q : ArrowsPos V) :
    ArrowsLegalMove G p q ↔
      ∃ u v, ArrowsUnmarked G p u v ∧
        (∀ x y, q.1 x y = if x = u ∧ y = v then true else p.1 x y) ∧
        ¬ ArrowsIsSource G q u ∧ ¬ ArrowsIsSink G q v
arrows_nat_mex_set_lt_iffIn LeanCombinatorial Games

For a set S of naturals with a missing element, a is below nat_mex_set S if and only if every i ≤ a lies in S.

theorem arrows_nat_mex_set_lt_iff {S : Set ℕ} (hne : ∃ n, n ∉ S) (a : ℕ) :
    a < nat_mex_set S ↔ ∀ i ≤ a, i ∈ S
arrows_num_markable_edges_twin_parityIn LeanCombinatorial Games

The number of markable edges of T is congruent modulo 2 to that of the reduced tree T'.

open scoped Classical in
theorem arrows_num_markable_edges_twin_parity
    {V : Type*} [Fintype V] [DecidableEq V] (T : SimpleGraph V) [DecidableRel T.Adj]
    (hT : T.IsTree) (c : V) (B₁ B₂ : Set V)
    (hB₁ : ∃ C₁ : (T.induce ({c} : Set V)ᶜ).ConnectedComponent,
      B₁ = {v : V | ∃ h : v ≠ c, ⟨v, h⟩ ∈ C₁.supp})
    (hB₂ : ∃ C₂ : (T.induce ({c} : Set V)ᶜ).ConnectedComponent,
      B₂ = {v : V | ∃ h : v ≠ c, ⟨v, h⟩ ∈ C₂.supp})
    (hdiff : B₁ ≠ B₂)
    (φ : T.induce (B₁ ∪ {c}) ≃g T.induce (B₂ ∪ {c}))
    (hφc : φ ⟨c, Or.inr rfl⟩ = ⟨c, Or.inr rfl⟩)
    (hc : c ∉ B₁ ∪ B₂) :
    arrows_num_markable_edges T ≡
      arrows_num_markable_edges (add_pendant_edge (T.induce (B₁ ∪ B₂)ᶜ) ⟨c, hc⟩) [MOD 2]
arrows_op602_grundy_gt_three_iffIn LeanCombinatorial Games

In the Game of Arrows on a nonempty finite graph, the initial Grundy value exceeds 3 if and only if from the empty position there are legal moves to positions with fuel-(card^2-1) values exactly 0, 1, 2, and 3.

theorem arrows_op602_grundy_gt_three_iff {V : Type*} [DecidableEq V] [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hpos : 0 < Fintype.card V * Fintype.card V) :
    3 < arrows_tree_grundy G ↔
      ∀ i ≤ 3, ∃ q : ArrowsPos V, ArrowsLegalMove G (ArrowsEmptyPos V) q ∧
        arrows_pos_grundy G (Fintype.card V * Fintype.card V - 1) q = i
arrows_op602_refutation_tree_grundy_gt_threeIn LeanCombinatorial Games

The Game of Arrows Grundy value of the explicit 26-vertex tree from experiment #7652 is strictly greater than 3 (it equals 4).

theorem arrows_op602_refutation_tree_grundy_gt_three :
    ∀ (T : SimpleGraph (Fin 26)) [DecidableRel T.Adj],
      T = SimpleGraph.fromRel (fun u v : Fin 26 => (u, v) ∈ [((1 : Fin 26), (10 : Fin 26)), (1, 2), (1, 12), (0, 11), (0, 13), (0, 9), (2, 3), (2, 15), (4, 16), (5, 12), (6, 14), (6, 17), (6, 18), (7, 17), (8, 19), (10, 11), (13, 14), (15, 16), (18, 19), (3, 20), (4, 21), (5, 22), (7, 23), (8, 24), (9, 25)]) →
      3 < arrows_tree_grundy T
arrows_op602_refutation_tree_structureIn LeanCombinatorial Games

The explicit 26-vertex tree defined by the 25 edges from experiment #7652 is a tree of maximum degree at most 3, all of whose piece threads have length at most 3.

theorem arrows_op602_refutation_tree_structure :
    ∃ (T : SimpleGraph (Fin 26)) (_ : DecidableRel T.Adj),
      T.IsTree ∧
      T.maxDegree ≤ 3 ∧
      (∀ (u v : Fin 26) (p : T.Walk u v), is_piece_thread T p → p.length ≤ 3) ∧
      T = SimpleGraph.fromRel (fun u v : Fin 26 => (u, v) ∈ [((1 : Fin 26), (10 : Fin 26)), (1, 2), (1, 12), (0, 11), (0, 13), (0, 9), (2, 3), (2, 15), (4, 16), (5, 12), (6, 14), (6, 17), (6, 18), (7, 17), (8, 19), (10, 11), (13, 14), (15, 16), (18, 19), (3, 20), (4, 21), (5, 22), (7, 23), (8, 24), (9, 25)])
arrows_op602_witness_four_valuesIn LeanCombinatorial Games

On the explicit 26-vertex OP-602 tree, the positions in which only one of the arrows 1->12, 6->14, 2->15, 0->11 is marked have Game of Arrows Grundy values 0, 1, 2, 3 respectively (at fuel 675 = 26*26-1).

theorem arrows_op602_witness_four_values :
    ∀ (T : SimpleGraph (Fin 26)) [DecidableRel T.Adj],
      T = SimpleGraph.fromRel (fun u v : Fin 26 => (u, v) ∈ [((1 : Fin 26), (10 : Fin 26)), (1, 2), (1, 12), (0, 11), (0, 13), (0, 9), (2, 3), (2, 15), (4, 16), (5, 12), (6, 14), (6, 17), (6, 18), (7, 17), (8, 19), (10, 11), (13, 14), (15, 16), (18, 19), (3, 20), (4, 21), (5, 22), (7, 23), (8, 24), (9, 25)]) →
      arrows_pos_grundy T 675
          ⟨fun x y => if x = (1 : Fin 26) ∧ y = (12 : Fin 26) then true else false, by decide⟩ = 0 ∧
        arrows_pos_grundy T 675
          ⟨fun x y => if x = (6 : Fin 26) ∧ y = (14 : Fin 26) then true else false, by decide⟩ = 1 ∧
        arrows_pos_grundy T 675
          ⟨fun x y => if x = (2 : Fin 26) ∧ y = (15 : Fin 26) then true else false, by decide⟩ = 2 ∧
        arrows_pos_grundy T 675
          ⟨fun x y => if x = (0 : Fin 26) ∧ y = (11 : Fin 26) then true else false, by decide⟩ = 3
arrows_op602_witness_moves_legalIn LeanCombinatorial Games

On the explicit 26-vertex OP-602 tree, marking exactly one of the edges 1->12, 6->14, 2->15, 0->11 is a legal move from the empty position.

theorem arrows_op602_witness_moves_legal :
    ∀ (T : SimpleGraph (Fin 26)) [DecidableRel T.Adj],
      T = SimpleGraph.fromRel (fun u v : Fin 26 => (u, v) ∈ [((1 : Fin 26), (10 : Fin 26)), (1, 2), (1, 12), (0, 11), (0, 13), (0, 9), (2, 3), (2, 15), (4, 16), (5, 12), (6, 14), (6, 17), (6, 18), (7, 17), (8, 19), (10, 11), (13, 14), (15, 16), (18, 19), (3, 20), (4, 21), (5, 22), (7, 23), (8, 24), (9, 25)]) →
      ArrowsLegalMove T (ArrowsEmptyPos (Fin 26))
          ⟨fun x y => if x = (1 : Fin 26) ∧ y = (12 : Fin 26) then true else false, by decide⟩ ∧
        ArrowsLegalMove T (ArrowsEmptyPos (Fin 26))
          ⟨fun x y => if x = (6 : Fin 26) ∧ y = (14 : Fin 26) then true else false, by decide⟩ ∧
        ArrowsLegalMove T (ArrowsEmptyPos (Fin 26))
          ⟨fun x y => if x = (2 : Fin 26) ∧ y = (15 : Fin 26) then true else false, by decide⟩ ∧
        ArrowsLegalMove T (ArrowsEmptyPos (Fin 26))
          ⟨fun x y => if x = (0 : Fin 26) ∧ y = (11 : Fin 26) then true else false, by decide⟩
arrows_pos_grundy_le_fuelIn LeanCombinatorial Games

In the Game of Arrows on a finite graph, the fuel-bounded Grundy value of any position is at most the fuel.

theorem arrows_pos_grundy_le_fuel {V : Type*} [DecidableEq V] [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (f : ℕ) (p : ArrowsPos V) :
    arrows_pos_grundy G f p ≤ f
arrows_pos_grundy_le_of_all_options_neIn LeanCombinatorial Games

If every legal option q of p satisfies g(q) ≠ a, then the Grundy value of p is at most a.

theorem arrows_pos_grundy_le_of_all_options_ne {V : Type*} [DecidableEq V] [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (fuel a : ℕ) (p : ArrowsPos V)
    (h : ∀ q, ArrowsLegalMove G p q → arrows_pos_grundy G fuel q ≠ a) :
    arrows_pos_grundy G (fuel + 1) p ≤ a
arrows_pos_grundy_lt_iffIn LeanCombinatorial Games

In the Game of Arrows, a is strictly below the fuel-(f+1) Grundy value of p if and only if for every i ≤ a there is a legal option of p whose fuel-f value is exactly i.

theorem arrows_pos_grundy_lt_iff {V : Type*} [DecidableEq V] [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (f a : ℕ) (p : ArrowsPos V) :
    a < arrows_pos_grundy G (f + 1) p ↔
      ∀ i ≤ a, ∃ q, ArrowsLegalMove G p q ∧ arrows_pos_grundy G f q = i
arrows_pos_grundy_ne_of_legal_moveIn LeanCombinatorial Games

If q is a legal option of p, then the Grundy value of p at fuel fuel+1 differs from the Grundy value of q at fuel.

theorem arrows_pos_grundy_ne_of_legal_move {V : Type*} [DecidableEq V] [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (fuel : ℕ) (p q : ArrowsPos V)
    (h : ArrowsLegalMove G p q) :
    arrows_pos_grundy G (fuel + 1) p ≠ arrows_pos_grundy G fuel q
arrows_pos_grundy_stabilizesIn LeanCombinatorial Games

If the number of unmarked edges of p is at most k and k ≤ f, then the Grundy values of p at fuel f and at fuel k coincide.

theorem arrows_pos_grundy_stabilizes {V : Type*} [DecidableEq V] [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (p : ArrowsPos V) {k f : ℕ}
    (hk : arrows_unmarked_count G p ≤ k) (hkf : k ≤ f) :
    arrows_pos_grundy G f p = arrows_pos_grundy G k p
arrows_pos_grundy_succIn LeanCombinatorial Games

In the Game of Arrows, the fuel-bounded Grundy value of a position at fuel n+1 is the mex of the fuel-n values of its legal options.

theorem arrows_pos_grundy_succ {V : Type*} [DecidableEq V] [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (n : ℕ) (p : ArrowsPos V) :
    arrows_pos_grundy G (n + 1) p
      = nat_mex_set { m : ℕ | ∃ q, ArrowsLegalMove G p q ∧ m = arrows_pos_grundy G n q }
arrows_pos_grundy_zeroIn LeanCombinatorial Games

In the Game of Arrows on a finite graph, the fuel-bounded Grundy value of any position at fuel 0 is 0.

theorem arrows_pos_grundy_zero {V : Type*} [DecidableEq V] [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (p : ArrowsPos V) :
    arrows_pos_grundy G 0 p = 0
arrows_pos_grundy_zero_of_reply_strategy_of_fuelIn LeanCombinatorial Games

In the Game of Arrows on a finite graph G, let P be a set of positions such that from every position in P, every legal move has a legal reply back into P. Then every position p in P has fuel-bounded Grundy value 0 at any fuel at least the number of unmarked edges of p.

theorem arrows_pos_grundy_zero_of_reply_strategy_of_fuel {V : Type*} [DecidableEq V] [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (P : ArrowsPos V → Prop)
    (hreply : ∀ q r, P q → ArrowsLegalMove G q r → ∃ s, ArrowsLegalMove G r s ∧ P s)
    (fuel : ℕ) (p : ArrowsPos V) (hp : P p) (hfuel : arrows_unmarked_count G p ≤ fuel) :
    arrows_pos_grundy G fuel p = 0
arrows_twin_branch_reductionIn LeanCombinatorial Games

Let c be a vertex of a tree T, and let B₁, B₂ be distinct components of T - c that are isomorphic via an isomorphism φ from T[B₁ + c] to T[B₂ + c] fixing c. Let T' be obtained from T by deleting B₁ ∪ B₂ and attaching a new pendant edge at c. Then the Grundy value of T equals the Grundy value of T' and the number of markable edges in T is congruent modulo 2 to that in T'.

open scoped Classical in
theorem arrows_twin_branch_reduction
    {V : Type*} [Fintype V] [DecidableEq V] (T : SimpleGraph V) [DecidableRel T.Adj] (hT : T.IsTree)
    (c : V) (B₁ B₂ : Set V)
    (hB₁ : ∃ C₁ : (T.induce ({c} : Set V)ᶜ).ConnectedComponent, B₁ = {v : V | ∃ h : v ≠ c, ⟨v, h⟩ ∈ C₁.supp})
    (hB₂ : ∃ C₂ : (T.induce ({c} : Set V)ᶜ).ConnectedComponent, B₂ = {v : V | ∃ h : v ≠ c, ⟨v, h⟩ ∈ C₂.supp})
    (hdiff : B₁ ≠ B₂)
    (φ : T.induce (B₁ ∪ {c}) ≃g T.induce (B₂ ∪ {c}))
    (hφc : φ ⟨c, Or.inr rfl⟩ = ⟨c, Or.inr rfl⟩)
    (hc : c ∉ B₁ ∪ B₂) :
    arrows_tree_grundy T =
      arrows_tree_grundy (add_pendant_edge (T.induce (B₁ ∪ B₂)ᶜ) ⟨c, hc⟩) ∧
    arrows_num_markable_edges T ≡
      arrows_num_markable_edges (add_pendant_edge (T.induce (B₁ ∪ B₂)ᶜ) ⟨c, hc⟩) [MOD 2]
arrows_twin_invariant_initialIn LeanCombinatorial Games

At the empty position of the sum of T with its reduced tree, all arrows are absent, so the three clauses of the twin invariant hold trivially.

open scoped Classical in
theorem arrows_twin_invariant_initial {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) [DecidableRel T.Adj] (c : V) (B₁ B₂ : Set V)
    (φ : T.induce (B₁ ∪ {c}) ≃g T.induce (B₂ ∪ {c}))
    (hc : c ∉ B₁ ∪ B₂) :
    arrows_twin_invariant T c B₁ B₂ φ (ArrowsEmptyPos V)
      (ArrowsEmptyPos (Option ↥((B₁ ∪ B₂)ᶜ : Set V)))
arrows_twin_reply_existsIn LeanCombinatorial Games

If the twin invariant holds at a position of the sum of T with its reduced tree, then after any legal move there is a legal reply restoring the invariant.

open scoped Classical in
theorem arrows_twin_reply_exists
    {V : Type*} [Fintype V] [DecidableEq V] (T : SimpleGraph V) [DecidableRel T.Adj]
    (hT : T.IsTree) (c : V) (B₁ B₂ : Set V)
    (hB₁ : ∃ C₁ : (T.induce ({c} : Set V)ᶜ).ConnectedComponent,
      B₁ = {v : V | ∃ h : v ≠ c, ⟨v, h⟩ ∈ C₁.supp})
    (hB₂ : ∃ C₂ : (T.induce ({c} : Set V)ᶜ).ConnectedComponent,
      B₂ = {v : V | ∃ h : v ≠ c, ⟨v, h⟩ ∈ C₂.supp})
    (hdiff : B₁ ≠ B₂)
    (φ : T.induce (B₁ ∪ {c}) ≃g T.induce (B₂ ∪ {c}))
    (hφc : φ ⟨c, Or.inr rfl⟩ = ⟨c, Or.inr rfl⟩)
    (hc : c ∉ B₁ ∪ B₂)
    (p p' : ArrowsPos V) (q q' : ArrowsPos (Option ↥((B₁ ∪ B₂)ᶜ : Set V)))
    (hP : arrows_twin_invariant T c B₁ B₂ φ p q)
    (hmove : ArrowsLegalMove (T.sum (add_pendant_edge (T.induce (B₁ ∪ B₂)ᶜ) ⟨c, hc⟩))
      (arrows_sum_pos p q) (arrows_sum_pos p' q')) :
    ∃ p₂ q₂, ArrowsLegalMove (T.sum (add_pendant_edge (T.induce (B₁ ∪ B₂)ᶜ) ⟨c, hc⟩))
      (arrows_sum_pos p' q') (arrows_sum_pos p₂ q₂) ∧
      arrows_twin_invariant T c B₁ B₂ φ p₂ q₂
arrows_twin_sum_grundy_zero_of_fuelIn LeanCombinatorial Games

Let c be a vertex of a finite tree T and B1, B2 two distinct components of T - c with an isomorphism of T[B1 + c] onto T[B2 + c] fixing c. Let T' be T with B1 and B2 deleted and a pendant edge attached at c. Then, at any fuel exceeding the number of edges of the disjoint union of T and T', the empty position of the Game of Arrows on that union has Grundy value 0.

open scoped Classical in
theorem arrows_twin_sum_grundy_zero_of_fuel
    {V : Type*} [Fintype V] [DecidableEq V] (T : SimpleGraph V) [DecidableRel T.Adj]
    (hT : T.IsTree) (c : V) (B₁ B₂ : Set V)
    (hB₁ : ∃ C₁ : (T.induce ({c} : Set V)ᶜ).ConnectedComponent,
      B₁ = {v : V | ∃ h : v ≠ c, ⟨v, h⟩ ∈ C₁.supp})
    (hB₂ : ∃ C₂ : (T.induce ({c} : Set V)ᶜ).ConnectedComponent,
      B₂ = {v : V | ∃ h : v ≠ c, ⟨v, h⟩ ∈ C₂.supp})
    (hdiff : B₁ ≠ B₂)
    (φ : T.induce (B₁ ∪ {c}) ≃g T.induce (B₂ ∪ {c}))
    (hφc : φ ⟨c, Or.inr rfl⟩ = ⟨c, Or.inr rfl⟩)
    (hc : c ∉ B₁ ∪ B₂) (fuel : ℕ)
    (hfuel : (T.sum (add_pendant_edge (T.induce (B₁ ∪ B₂)ᶜ) ⟨c, hc⟩)).edgeFinset.card + 1 ≤ fuel) :
    arrows_pos_grundy (T.sum (add_pendant_edge (T.induce (B₁ ∪ B₂)ᶜ) ⟨c, hc⟩)) fuel
      (ArrowsEmptyPos (V ⊕ Option ((B₁ ∪ B₂)ᶜ : Set V))) = 0
arrows_unmarked_count_le_card_edgeFinsetIn LeanCombinatorial Games

The unmarked edges of a position on G form a subset of the edges of G.

theorem arrows_unmarked_count_le_card_edgeFinset {V : Type*} [DecidableEq V] [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (p : ArrowsPos V) :
    arrows_unmarked_count G p ≤ G.edgeFinset.card
arrows_unmarked_count_legal_moveIn LeanCombinatorial Games

A legal move marks one previously unmarked edge and nothing else, so the number of unmarked edges of q is one less than that of p.

theorem arrows_unmarked_count_legal_move {V : Type*} [DecidableEq V] [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (p q : ArrowsPos V)
    (h : ArrowsLegalMove G p q) :
    arrows_unmarked_count G q + 1 = arrows_unmarked_count G p
arrows_unmarked_count_sumIn LeanCombinatorial Games

The unmarked edges of the sum position (p,q) on the disjoint sum G ⊔ H are those of p on G together with those of q on H.

open scoped Classical in
theorem arrows_unmarked_count_sum {V W : Type*} [DecidableEq V] [Fintype V] [DecidableEq W] [Fintype W]
    (G : SimpleGraph V) [DecidableRel G.Adj] (H : SimpleGraph W) [DecidableRel H.Adj]
    (p : ArrowsPos V) (q : ArrowsPos W) :
    arrows_unmarked_count (G.sum H) (arrows_sum_pos p q) =
      arrows_unmarked_count G p + arrows_unmarked_count H q
arrows_unmarked_empty_posIn LeanCombinatorial Games

In the Game of Arrows on G, if u and v are adjacent in G then the edge uv is unmarked at the empty position.

theorem arrows_unmarked_empty_pos {V : Type*} (G : SimpleGraph V) (u v : V) (huv : G.Adj u v) :
    ArrowsUnmarked G (ArrowsEmptyPos V) u v
catalan_succ_eq_choose_divIn LeanCombinatorial Games

For every natural number n, the (n + 1)-th Catalan number satisfies catalan (n + 1) = Nat.choose (2 * n + 2) (n + 1) / (n + 2).

theorem catalan_succ_eq_choose_div (n : ℕ) :
    catalan (n + 1) = Nat.choose (2 * n + 2) (n + 1) / (n + 2)
catch_up_value_aux_icc_after_opening_lt_ne_lossIn LeanCombinatorial Games

In Catch-Up played on {1, ..., N} with N(N+1)/2 even, Player 2 does not lose after any opening move x < N by Player 1.

theorem catch_up_value_aux_icc_after_opening_lt_ne_loss (N : ℕ) (h_even : Even (N * (N + 1) / 2))
    (x : ℕ) (hx : x ∈ Finset.Icc 1 N) (hlt : x < N) :
    catch_up_value_aux ((Finset.Icc 1 N).erase x) 0 x false ≠ CatchUpOutcome.loss
catch_up_value_aux_icc_after_opening_max_ne_lossIn LeanCombinatorial Games

In Catch-Up played on {1, ..., N} with N(N+1)/2 even and N > 0, Player 2 does not lose after Player 1 opens with the maximum piece N.

theorem catch_up_value_aux_icc_after_opening_max_ne_loss (N : ℕ) (h_even : Even (N * (N + 1) / 2))
    (hN : 0 < N) :
    catch_up_value_aux ((Finset.Icc 1 N).erase N) 0 N false ≠ CatchUpOutcome.loss
catch_up_value_aux_icc_after_opening_ne_lossIn LeanCombinatorial Games

In Catch-Up played on {1, ..., N} with N(N+1)/2 even, Player 2 does not lose after any opening move x ∈ {1, ..., N} by Player 1.

theorem catch_up_value_aux_icc_after_opening_ne_loss (N : ℕ) (h_even : Even (N * (N + 1) / 2))
    (x : ℕ) (hx : x ∈ Finset.Icc 1 N) :
    catch_up_value_aux ((Finset.Icc 1 N).erase x) 0 x false ≠ CatchUpOutcome.loss
catch_up_value_aux_icc_initial_ne_lossIn LeanCombinatorial Games

In Catch-Up played on {1, ..., N} with N(N+1)/2 even, Player 1 does not lose from the initial position with equal scores 0.

theorem catch_up_value_aux_icc_initial_ne_loss (N : ℕ) (h_even : Even (N * (N + 1) / 2)) :
    catch_up_value_aux (Finset.Icc 1 N) 0 0 false ≠ CatchUpOutcome.loss
catch_up_value_aux_icc_opening_one_ne_winIn LeanCombinatorial Games

In Catch-Up played on {1, ..., N} with N > 0 and N(N+1)/2 even, Player 2 does not win after Player 1 opens with 1.

theorem catch_up_value_aux_icc_opening_one_ne_win (N : ℕ) (hN : 0 < N)
    (h_even : Even (N * (N + 1) / 2)) :
    catch_up_value_aux ((Finset.Icc 1 N).erase 1) 0 1 false ≠ CatchUpOutcome.win
catch_up_value_aux_icc_opening_one_response_lt_ne_lossIn LeanCombinatorial Games

In Catch-Up on {1, ..., N} with even triangular sum, if Player 1 opens with 1 and Player 2 responds with y < N, Player 1 does not lose from the resulting position with scores (1, y).

theorem catch_up_value_aux_icc_opening_one_response_lt_ne_loss (N : ℕ)
    (h_even : Even (N * (N + 1) / 2)) (y : ℕ) (hy : y ∈ (Finset.Icc 1 N).erase 1) (hlt : y < N) :
    catch_up_value_aux (((Finset.Icc 1 N).erase 1).erase y) 1 y false ≠ CatchUpOutcome.loss
catch_up_value_aux_icc_opening_one_response_max_ne_lossIn LeanCombinatorial Games

In Catch-Up on {1, ..., N} with even triangular sum and N > 0, if Player 1 opens with 1 and Player 2 responds with N, Player 1 does not lose from the resulting position with scores (1, N).

theorem catch_up_value_aux_icc_opening_one_response_max_ne_loss (N : ℕ) (hN : 0 < N)
    (h_even : Even (N * (N + 1) / 2)) :
    catch_up_value_aux (((Finset.Icc 1 N).erase 1).erase N) 1 N false ≠ CatchUpOutcome.loss
circle_protocol_solves_of_injectiveIn LeanCombinatorial Games

If a protocol with announcements in α solves the circle puzzle for S ≥ 3 sages, then composing it with any injective map f : α → β yields a protocol with announcements in β that still solves the puzzle.

theorem circle_protocol_solves_of_injective {S : ℕ} {α β : Type*} (hS : 3 ≤ S)
    (f : α → β) (hf : Function.Injective f) (p : CircleLocalView (Fin S) → α)
    (hp : CircleProtocolSolves S hS p) :
    CircleProtocolSolves S hS (fun v => f (p v))
cycle_closed_neighborhood_cardIn LeanCombinatorial Games

In the cycle C_n (n ≥ 3), the closed neighbourhood of a nonempty set of S vertices has at least min(n, |S|+2) vertices (a nonempty proper subset of a cycle has at least two boundary points).

theorem cycle_closed_neighborhood_card (n : ℕ) (hn : 3 ≤ n) (S : Finset (Fin n)) (hS : S.Nonempty) : min n (S.card + 2) ≤ (closed_neighborhood (SimpleGraph.cycleGraph n) S).card
cyclic_permutation_subtraction_set_mem_lengthIn LeanCombinatorial Games

Every word in the cyclic permutation subtraction set has length a * d or b * d, where d is the alphabet size.

theorem cyclic_permutation_subtraction_set_mem_length (d s a b : ℕ) {w : List (Fin d)}
    (hw : w ∈ cyclic_permutation_subtraction_set d s a b) : w.length = a * d ∨ w.length = b * d
dfa_state_complexity_complIn LeanCombinatorial Games

For any language L over alphabet α, the deterministic state complexity of the complement language Lᶜ is equal to the deterministic state complexity of L.

theorem dfa_state_complexity_compl {α : Type*} (L : Language α) :
    dfa_state_complexity Lᶜ = dfa_state_complexity L
epstein_level_one_mem_iff_is_squareIn LeanCombinatorial Games

A position n is in remoteness level 1 of Epstein's game if and only if n is a positive perfect square.

theorem epstein_level_one_mem_iff_is_square (n : ℕ) :
    n ∈ epstein_remoteness_level 1 ↔ 0 < n ∧ IsSquare n
epstein_level_three_count_le_pow_seven_eighthsIn LeanCombinatorial Games

The number of n ≤ Y in remoteness level 3 of Epstein's game is O(Y^{7/8}).

theorem epstein_level_three_count_le_pow_seven_eighths :
    ∃ C : ℝ, 0 < C ∧ ∀ Y : ℕ,
      (Set.ncard ({n : ℕ | n ∈ epstein_remoteness_level 3} ∩ Set.Iic Y) : ℝ) ≤
        C * ((Y : ℝ) + 1) ^ ((7 : ℝ) / 8)
epstein_level_three_iffIn LeanCombinatorial Games

A position n is in remoteness level 3 of Epstein's game if and only if n is nonzero, neither move of n is zero, and at least one of the two moves is a Stein number.

theorem epstein_level_three_iff (n : ℕ) :
    n ∈ epstein_remoteness_level 3 ↔
      n ≠ 0 ∧ epstein_down n ≠ 0 ∧ epstein_up n ≠ 0 ∧
        (is_stein_number (epstein_down n) ∨ is_stein_number (epstein_up n))
epstein_level_two_mem_iff_is_stein_numberIn LeanCombinatorial Games

A position n is in remoteness level 2 of Epstein's game if and only if n is an E. P. Stein number.

theorem epstein_level_two_mem_iff_is_stein_number (n : ℕ) :
    n ∈ epstein_remoteness_level 2 ↔ is_stein_number n
epstein_pell_family_movesIn LeanCombinatorial Games

If T^2 + 1 = 2 S^2 with T ≥ 2, then for n = (2S)^2 + 1 the square root is 2S so the down-move is 1 and the up-move is (2T)^2 + 5, and for that up-move the square root is 2T so its down-move is 5.

theorem epstein_pell_family_moves (S T : ℕ) (hT : 2 ≤ T) (h : T * T + 1 = 2 * S * S) :
    Nat.sqrt ((2 * S) ^ 2 + 1) = 2 * S ∧ epstein_down ((2 * S) ^ 2 + 1) = 1 ∧
      epstein_up ((2 * S) ^ 2 + 1) = (2 * T) ^ 2 + 5 ∧
      Nat.sqrt ((2 * T) ^ 2 + 5) = 2 * T ∧ epstein_down ((2 * T) ^ 2 + 5) = 5
epstein_remoteness_eq_four_iffIn LeanCombinatorial Games

A natural number n has remoteness 4 in Epstein's game if and only if n belongs to level 4 of epstein_remoteness_level.

theorem epstein_remoteness_eq_four_iff (n : ℕ) :
  epstein_remoteness n = 4 ↔ n ∈ epstein_remoteness_level 4
epstein_remoteness_four_count_eq_ncardIn LeanCombinatorial Games

The number of n ≤ X with remoteness 4, counted by filtering the range, equals the cardinality of the set of such n intersected with the initial segment up to X.

theorem epstein_remoteness_four_count_eq_ncard (X : ℕ) :
    (Finset.filter (fun n => epstein_remoteness n = 4) (Finset.range (X + 1))).card
      = Set.ncard ({n : ℕ | epstein_remoteness n = 4} ∩ Set.Iic X)
epstein_remoteness_four_count_le_pow_fifteen_sixteenthsIn LeanCombinatorial Games

The number of n ≤ X with remoteness 4 in Epstein's game is O(X^{15/16}).

theorem epstein_remoteness_four_count_le_pow_fifteen_sixteenths :
    ∃ C : ℝ, 0 < C ∧ ∀ X : ℕ,
      ((Finset.filter (fun n => epstein_remoteness n = 4) (Finset.range (X + 1))).card : ℝ) ≤
        C * ((X : ℝ) + 1) ^ ((15 : ℝ) / 16)
epstein_remoteness_four_infiniteIn LeanCombinatorial Games

The set of natural numbers n with remoteness epstein_remoteness n = 4 is infinite.

theorem epstein_remoteness_four_infinite :
  Set.Infinite {n : ℕ | epstein_remoteness n = 4}
epstein_remoteness_four_infinite_of_pellIn LeanCombinatorial Games

Infinitely many Pell-parameters plus the Pell family being level 4 gives that the set of n with remoteness 4 is infinite.

theorem epstein_remoteness_four_infinite_of_pell
    (hsol : Set.Infinite {S : ℕ | ∃ T : ℕ, 2 ≤ T ∧ T * T + 1 = 2 * S * S})
    (hfam : ∀ S T : ℕ, 2 ≤ T → T * T + 1 = 2 * S * S →
      epstein_remoteness ((2 * S) ^ 2 + 1) = 4) :
    Set.Infinite {n : ℕ | epstein_remoteness n = 4}
epstein_remoteness_four_pell_familyIn LeanCombinatorial Games

If T^2 + 1 = 2 S^2 with T ≥ 2, then the position (2S)^2 + 1 has remoteness 4.

theorem epstein_remoteness_four_pell_family (S T : ℕ) (hT : 2 ≤ T)
    (h : T * T + 1 = 2 * S * S) : epstein_remoteness ((2 * S) ^ 2 + 1) = 4
epstein_remoteness_four_zero_densityIn LeanCombinatorial Games

The set of natural numbers n with epstein_remoteness n = 4 has natural asymptotic density zero.

theorem epstein_remoteness_four_zero_density :
  Filter.Tendsto
    (fun X : ℕ => ((Finset.filter (fun n => epstein_remoteness n = 4) (Finset.range (X + 1))).card : ℝ) / (X : ℝ))
    Filter.atTop (nhds (0 : ℝ))
epstein_remoteness_four_zero_density_of_subpolyIn LeanCombinatorial Games

If the number of n ≤ X with remoteness 4 is O((X+1)^e) for some exponent e < 1, then the natural density of those n is zero.

theorem epstein_remoteness_four_zero_density_of_subpoly
    (C e : ℝ) (hC : 0 < C) (he : e < 1)
    (hbound : ∀ X : ℕ,
      ((Finset.filter (fun n => epstein_remoteness n = 4) (Finset.range (X + 1))).card : ℝ)
        ≤ C * ((X : ℝ) + 1) ^ e) :
    Filter.Tendsto
      (fun X : ℕ => ((Finset.filter (fun n => epstein_remoteness n = 4) (Finset.range (X + 1))).card : ℝ) / (X : ℝ))
      Filter.atTop (nhds (0 : ℝ))
epstein_remoteness_level_four_eqIn LeanCombinatorial Games

In Epstein's game, a position n ≠ 0 belongs to remoteness level 4 if and only if both down(n) and up(n) belong to level 1 ∪ level 3, and at least one of down(n) or up(n) belongs to level 3.

theorem epstein_remoteness_level_four_eq :
  epstein_remoteness_level 4 = {n | n ≠ 0 ∧
    epstein_down n ∈ epstein_remoteness_level 1 ∪ epstein_remoteness_level 3 ∧
    epstein_up n ∈ epstein_remoteness_level 1 ∪ epstein_remoteness_level 3 ∧
    (epstein_down n ∈ epstein_remoteness_level 3 ∨ epstein_up n ∈ epstein_remoteness_level 3)}
eventual_period_value_of_mod_eqIn LeanCombinatorial Games

If w is eventually periodic with period p from index N on, then for x, y ≥ N that are congruent mod p, w x = w y.

theorem eventual_period_value_of_mod_eq (w : ℕ → Bool) (p N : ℕ)
    (hper : ∀ n, N ≤ n → w (n + p) = w n) :
    ∀ x y : ℕ, N ≤ x → N ≤ y → x % p = y % p → w x = w y
exists_odd_sq_dvd_mu_starIn LeanCombinatorial Games

Every positive integer g can be factored as g = d * k^2 where d, k > 0, k is odd, and mu_star d holds.

theorem exists_odd_sq_dvd_mu_star (g : ℕ) (hg : 0 < g) :
    ∃ d k : ℕ, 0 < d ∧ 0 < k ∧ Odd k ∧ mu_star d ∧ g = d * k ^ 2
finset_mex_insert_xor_oneIn LeanCombinatorial Games

For any finite set of natural numbers U, the mex of the set obtained by inserting the mex of U into the image of U under bitwise exclusive-or with 1 equals the mex of U bitwise exclusive-or 1.

theorem finset_mex_insert_xor_one (U : Finset ℕ) :
    finset_mex (insert (finset_mex U) (U.image (· ^^^ 1))) = finset_mex U ^^^ 1
hunger3_closure_tile_eq_iUnion_cellIn LeanCombinatorial Games

For a real 3-by-3 row-stochastic symmetric matrix Q with positive off-diagonal entries, the closure of its zero-sum recurrent hunger tile is the union over the six permutations e of the cells hunger3_firing_cell Q e.

theorem hunger3_closure_tile_eq_iUnion_cell (Q : Matrix (Fin 3) (Fin 3) ℝ)
    (hstoch : Q ∈ Matrix.rowStochastic ℝ (Fin 3)) (hsymm : Q.IsSymm)
    (hpos : ∀ i j, i ≠ j → 0 < Q i j) :
    closure (hunger_zero_sum_recurrent_tile Q) =
      ⋃ e : Equiv.Perm (Fin 3), hunger3_firing_cell Q e
hunger3_nonultrametric_not_convexIn LeanCombinatorial Games

For a real 3-by-3 row-stochastic symmetric matrix Q with positive off-diagonal entries that does not satisfy the ultrametric transition property, the union of the six firing cells hunger3_firing_cell Q e is not convex: there are points of two cells whose midpoint lies in no cell.

theorem hunger3_nonultrametric_not_convex (Q : Matrix (Fin 3) (Fin 3) ℝ)
    (hstoch : Q ∈ Matrix.rowStochastic ℝ (Fin 3)) (hsymm : Q.IsSymm)
    (hpos : ∀ i j, i ≠ j → 0 < Q i j) (hnot : ¬ is_ultrametric_transition Q) :
    ¬ Convex ℝ (⋃ e : Equiv.Perm (Fin 3), hunger3_firing_cell Q e)
hunger3_ultrametric_convexIn LeanCombinatorial Games

For a real 3-by-3 row-stochastic symmetric matrix Q with positive off-diagonal entries satisfying the ultrametric transition property, the union of the six firing cells hunger3_firing_cell Q e is convex in ℝ³.

theorem hunger3_ultrametric_convex (Q : Matrix (Fin 3) (Fin 3) ℝ)
    (hstoch : Q ∈ Matrix.rowStochastic ℝ (Fin 3)) (hsymm : Q.IsSymm)
    (hpos : ∀ i j, i ≠ j → 0 < Q i j) (hultra : is_ultrametric_transition Q) :
    Convex ℝ (⋃ e : Equiv.Perm (Fin 3), hunger3_firing_cell Q e)
hunger_eventually_periodic_of_finite_value_setIn LeanCombinatorial Games

For n : ℕ with [NeZero n], a rational matrix P, h : Fin n → ℚ and a finite set S of rational vectors containing every iterate hunger_iter P t h, there exist N and L with 0 < L such that hunger_iter P (N + L) h = hunger_iter P N h; that is, the orbit is eventually periodic. Combined with hunger_iter_mem_denominator_lattice and any a priori box bound on the iterates, S can be taken to be the finite set of lattice points in the box.

theorem hunger_eventually_periodic_of_finite_value_set {n : ℕ} [NeZero n]
    (P : Matrix (Fin n) (Fin n) ℚ) (h : Fin n → ℚ) (S : Set (Fin n → ℚ))
    (hS : S.Finite) (hmem : ∀ t : ℕ, hunger_iter P t h ∈ S) :
    ∃ N L : ℕ, 0 < L ∧ hunger_iter P (N + L) h = hunger_iter P N h
hunger_firing_state_eq_iff_first_maxIn LeanCombinatorial Games

A vector h : Fin n → α (α linearly ordered) has hunger firing state i if and only if h i is a maximum of h and no index smaller than i ties with it at the maximum.

theorem hunger_firing_state_eq_iff_first_max {n : ℕ} [NeZero n] {α : Type*} [LinearOrder α]
    (h : Fin n → α) (i : Fin n) :
    hunger_firing_state h = i ↔ (∀ j, h j ≤ h i) ∧ (∀ j, h i ≤ h j → i ≤ j)
hunger_firing_state_is_maxIn LeanCombinatorial Games

For n : ℕ with [NeZero n], a linearly ordered type α and any vector h : Fin n → α, the coordinate selected by the hunger rule, hunger_firing_state h, is a coordinate at which h attains its maximum: h i ≤ h (hunger_firing_state h) for every i.

theorem hunger_firing_state_is_max {n : ℕ} [NeZero n] {α : Type*} [LinearOrder α]
    (h : Fin n → α) (i : Fin n) : h i ≤ h (hunger_firing_state h)
hunger_iter_eq_fire_countsIn LeanCombinatorial Games

For n : ℕ with [NeZero n], a rational matrix P, a natural number t and h : Fin n → ℚ, there is a count vector c : Fin n → ℕ with ∑ i, c i = t such that for every coordinate j, hunger_iter P t h j = h j + ∑ i, ((c i : ℚ) * P i j) - (c j : ℚ). That is, the state after t firings depends only on how many times each state was fired, and equals h + ∑_i c_i (P_i - e_i).

theorem hunger_iter_eq_fire_counts {n : ℕ} [NeZero n] (P : Matrix (Fin n) (Fin n) ℚ)
    (t : ℕ) (h : Fin n → ℚ) :
    ∃ c : Fin n → ℕ, (∑ i, c i = t) ∧
      ∀ j, hunger_iter P t h j = h j + ∑ i, ((c i : ℚ) * P i j) - (c j : ℚ)
hunger_iter_eq_fire_counts_realIn LeanCombinatorial Games

For a real n-by-n matrix P, a time t and a vector h, there is a firing-count vector c : Fin n → ℕ with ∑ c = t such that the t-th hunger iterate is h j plus the total weight ∑ c i * P i j received, minus the number c j of times j itself fired.

theorem hunger_iter_eq_fire_counts_real {n : ℕ} [NeZero n] (P : Matrix (Fin n) (Fin n) ℝ)
    (t : ℕ) (h : Fin n → ℝ) :
    ∃ c : Fin n → ℕ, (∑ i, c i = t) ∧
      ∀ j, hunger_iter P t h j = h j + ∑ i, ((c i : ℝ) * P i j) - (c j)
hunger_iter_mem_denominator_latticeIn LeanCombinatorial Games

For n : ℕ with [NeZero n], a rational matrix P and h : Fin n → ℚ, there is a positive natural number D such that for every t : ℕ and every coordinate j, D * hunger_iter P t h j is an integer: ∃ D, 0 < D ∧ ∀ t j, ∃ z : ℤ, (D : ℚ) * hunger_iter P t h j = (z : ℚ). Explicitly D = (∏ j, (h j).den) * (∏ ij, (P ij.1 ij.2).den) works, so D depends only on h and P and is bounded by the product of the denominators.

theorem hunger_iter_mem_denominator_lattice {n : ℕ} [NeZero n]
    (P : Matrix (Fin n) (Fin n) ℚ) (h : Fin n → ℚ) :
    ∃ D : ℕ, 0 < D ∧ ∀ (t : ℕ) (j : Fin n), ∃ z : ℤ, (D : ℚ) * hunger_iter P t h j = (z : ℚ)
hunger_iter_succ_and_addIn LeanCombinatorial Games

For n : ℕ with [NeZero n], a rational matrix P, a natural number t and h : Fin n → ℚ, the (t+1)-th iterate equals one hunger step applied to the t-th iterate, hunger_iter P (t+1) h = hunger_step P (hunger_iter P t h); and iterates compose additively, hunger_iter P (a+b) h = hunger_iter P a (hunger_iter P b h).

theorem hunger_iter_succ_and_add {n : ℕ} [NeZero n] (P : Matrix (Fin n) (Fin n) ℚ) :
    (∀ (t : ℕ) (h : Fin n → ℚ), hunger_iter P (t + 1) h = hunger_step P (hunger_iter P t h)) ∧
    (∀ (a b : ℕ) (h : Fin n → ℚ), hunger_iter P (a + b) h = hunger_iter P a (hunger_iter P b h))
hunger_iter_sum_invariantIn LeanCombinatorial Games

For n : ℕ with [NeZero n], a row-stochastic rational matrix P, any rational h and every t : ℕ, the sum of the coordinates of the t-th iterate is the sum of the coordinates of h: ∑ j, hunger_iter P t h j = ∑ j, h j. In particular, if ∑ i, h i = 0 then every iterate has coordinate sum 0.

theorem hunger_iter_sum_invariant {n : ℕ} [NeZero n] (P : Matrix (Fin n) (Fin n) ℚ)
    (hP : P ∈ Matrix.rowStochastic ℚ (Fin n)) (t : ℕ) (h : Fin n → ℚ) :
    ∑ j, hunger_iter P t h j = ∑ j, h j
hunger_period_dvd_minimal_integral_periodIn LeanCombinatorial Games

For n : ℕ with [NeZero n], an irreducible row-stochastic rational matrix P, a stationary distribution π of P, and T the minimal integral period of π, every periodic orbit point y : Fin n → ℚ of positive period T' has T dividing T'. Equivalently (Theorem 2.2 of arXiv:2610.08949): every recurrent orbit of an irreducible rational hunger game has least period exactly T.

theorem hunger_period_dvd_minimal_integral_period {n : ℕ} [NeZero n]
    (P : Matrix (Fin n) (Fin n) ℚ) (hP_stoch : P ∈ Matrix.rowStochastic ℚ (Fin n))
    (hP_irred : is_irreducible_matrix P) (π : Fin n → ℚ)
    (hπ : is_stationary_distribution P π) (T : ℕ) (hT : is_minimal_integral_period π T)
    (y : Fin n → ℚ) (T' : ℕ) (hT' : 0 < T') (hper : hunger_iter P T' y = y) :
    T ∣ T'
hunger_step_sum_invariantIn LeanCombinatorial Games

For n : ℕ with [NeZero n], a rational matrix P : Matrix (Fin n) (Fin n) ℚ that is row-stochastic and any rational vector h : Fin n → ℚ, one hunger firing preserves the total hunger: ∑ j, hunger_step P h j = ∑ j, h j.

theorem hunger_step_sum_invariant {n : ℕ} [NeZero n] (P : Matrix (Fin n) (Fin n) ℚ)
    (hP : P ∈ Matrix.rowStochastic ℚ (Fin n)) (h : Fin n → ℚ) :
    ∑ j, hunger_step P h j = ∑ j, h j
hunger_symm_stochastic_kernel_constIn LeanCombinatorial Games

If a real n-by-n matrix P is row-stochastic, symmetric, and has strictly positive off-diagonal entries, then every vector v with ∑ i, v i * P i j = v j for all j is constant.

theorem hunger_symm_stochastic_kernel_const {n : ℕ} [NeZero n] (P : Matrix (Fin n) (Fin n) ℝ)
    (hstoch : P ∈ Matrix.rowStochastic ℝ (Fin n)) (hsymm : P.IsSymm)
    (hpos : ∀ i j, i ≠ j → 0 < P i j) (v : Fin n → ℝ)
    (hv : ∀ j, ∑ i, v i * P i j = v j) :
    ∀ i j, v i = v j
hunger_three_firing_cell_eq_weakIn LeanCombinatorial Games

For a real 3-by-3 row-stochastic symmetric matrix Q with positive off-diagonal entries and a permutation e, the closure of the set of zero-sum states firing e 0, e 1, e 2 in that order consists exactly of the zero-sum h such that h is weakly maximised at e 0, then h + row (e 0) - e_{e 0} is weakly maximised at e 1, and then h + row (e 0) - e_{e 0} + row (e 1) - e_{e 1} is weakly maximised at e 2.

theorem hunger_three_firing_cell_eq_weak (Q : Matrix (Fin 3) (Fin 3) ℝ)
    (hstoch : Q ∈ Matrix.rowStochastic ℝ (Fin 3)) (hsymm : Q.IsSymm)
    (hpos : ∀ i j, i ≠ j → 0 < Q i j) (e : Equiv.Perm (Fin 3)) :
    hunger3_firing_cell Q e =
      {h | (∑ i, h i = 0) ∧ (∀ j, h j ≤ h (e 0)) ∧
        (∀ j, hunger3_fire Q (e 0) h j ≤ hunger3_fire Q (e 0) h (e 1)) ∧
        (∀ j, hunger3_fire Q (e 1) (hunger3_fire Q (e 0) h) j ≤
          hunger3_fire Q (e 1) (hunger3_fire Q (e 0) h) (e 2))}
hunger_three_recurrent_fire_permIn LeanCombinatorial Games

If Q is a real 3-by-3 row-stochastic symmetric matrix with positive off-diagonal entries and hunger_iter Q 3 h = h, then there is a permutation e of the three states such that the states fired at times 0, 1, 2 are e 0, e 1, e 2.

theorem hunger_three_recurrent_fire_perm (Q : Matrix (Fin 3) (Fin 3) ℝ)
    (hstoch : Q ∈ Matrix.rowStochastic ℝ (Fin 3)) (hsymm : Q.IsSymm)
    (hpos : ∀ i j, i ≠ j → 0 < Q i j) (h : Fin 3 → ℝ)
    (hrec : hunger_iter Q 3 h = h) :
    ∃ e : Equiv.Perm (Fin 3), hunger_firing_state h = e 0 ∧
      hunger_firing_state (hunger_step Q h) = e 1 ∧
      hunger_firing_state (hunger_step Q (hunger_step Q h)) = e 2
hunger_three_recurrent_iff_firing_orderIn LeanCombinatorial Games

For a real 3-by-3 row-stochastic symmetric matrix Q with positive off-diagonal entries there exists h : Fin 3 → ℝ with ∑ i, h i = 0 and h in the zero-sum recurrent hunger tile of Q if and only if some permutation e lists the firing states of the first three hunger steps of h; concretely, h with zero sum lies in the tile iff for some e the states fired at times 0, 1, 2 are e 0, e 1, e 2.

theorem hunger_three_recurrent_iff_firing_order (Q : Matrix (Fin 3) (Fin 3) ℝ)
    (hstoch : Q ∈ Matrix.rowStochastic ℝ (Fin 3)) (hsymm : Q.IsSymm)
    (hpos : ∀ i j, i ≠ j → 0 < Q i j) (h : Fin 3 → ℝ) (hsum : ∑ i, h i = 0) :
    h ∈ hunger_zero_sum_recurrent_tile Q ↔
      ∃ e : Equiv.Perm (Fin 3), hunger_firing_state h = e 0 ∧
        hunger_firing_state (hunger_step Q h) = e 1 ∧
        hunger_firing_state (hunger_step Q (hunger_step Q h)) = e 2
hunger_transient_time_le_of_mem_basinIn LeanCombinatorial Games

For n : ℕ with [NeZero n], P : Matrix (Fin n) (Fin n) ℚ, T N : ℕ, h : Fin n → ℚ, if the N-th iterate lies in the recurrent basin of period T, i.e. hunger_recurrent_basin P T (which is the fixed-point set of the T-fold iterate), then hunger_transient_time P T h ≤ N and for every k the trajectory from N on is T-periodic in the sense hunger_iter P (N + k) h = hunger_iter P (N + k % T) h. Only 0 < T is not needed for this; the statement is unconditional.

theorem hunger_transient_time_le_of_mem_basin {n : ℕ} [NeZero n]
    (P : Matrix (Fin n) (Fin n) ℚ) (T N : ℕ) (h : Fin n → ℚ)
    (hN : hunger_iter P N h ∈ hunger_recurrent_basin P T) :
    hunger_transient_time P T h ≤ N ∧ ∀ k : ℕ, hunger_iter P (N + k) h = hunger_iter P (N + k % T) h
hunger_transient_time_le_of_returnIn LeanCombinatorial Games

For n : ℕ with [NeZero n], a rational matrix P, a positive period T, a time N and h : Fin n → ℚ, if hunger_iter P (N + T) h = hunger_iter P N h then hunger_transient_time P T h ≤ N.

theorem hunger_transient_time_le_of_return {n : ℕ} [NeZero n]
    (P : Matrix (Fin n) (Fin n) ℚ) (T N : ℕ) (h : Fin n → ℚ)
    (hper : hunger_iter P (N + T) h = hunger_iter P N h) :
    hunger_transient_time P T h ≤ N
hunger_transient_time_le_polynomial_explicitIn LeanCombinatorial Games

There is a natural number K such that for every n with [NeZero n], every irreducible row-stochastic rational P, every stationary π with minimal integral period T, and every h with ∑ i, h i = 0, the hunger transient time is at most (n + T + max-norm h + max-denominator P)^K.

theorem hunger_transient_time_le_polynomial_explicit :
    ∃ K : ℕ, ∀ (n : ℕ) [NeZero n]
      (P : Matrix (Fin n) (Fin n) ℚ)
      (hP_stoch : P ∈ Matrix.rowStochastic ℚ (Fin n))
      (hP_irred : is_irreducible_matrix P)
      (π : Fin n → ℚ)
      (hπ : is_stationary_distribution P π)
      (T : ℕ)
      (hT : is_minimal_integral_period π T)
      (h : Fin n → ℚ)
      (h_sum : ∑ i, h i = 0),
      (hunger_transient_time P T h : ℚ) ≤
        ((n : ℚ) + (T : ℚ) + hunger_max_norm h + (rational_matrix_max_denominator P : ℚ)) ^ K
hunger_transient_time_le_preperiodIn LeanCombinatorial Games

For n : ℕ with [NeZero n], a rational matrix P, a positive T and h : Fin n → ℚ, if D is a positive integer with D * hunger_iter P t h j integral for all t and j, and if N, L are the pre-period and period of the orbit in the sense hunger_iter P (N + L) h = hunger_iter P N h, then hunger_transient_time P T h ≤ N when T divides L. In particular, when the eventual cycle length L is exactly T, the transient time is at most the pre-period N.

theorem hunger_transient_time_le_preperiod {n : ℕ} [NeZero n]
    (P : Matrix (Fin n) (Fin n) ℚ) (T N L : ℕ) (hT : 0 < T) (hL : 0 < L)
    (h : Fin n → ℚ) (hdiv : T ∣ L)
    (hper : hunger_iter P (N + L) h = hunger_iter P N h) :
    hunger_transient_time P T h ≤ N
is_eventual_period_addIn LeanCombinatorial Games

If p and q are eventual periods of a Boolean sequence w, then p + q is an eventual period of w.

theorem is_eventual_period_add (w : ℕ → Bool) (p q : ℕ) (hp : is_eventual_period w p) (hq : is_eventual_period w q) : is_eventual_period w (p + q)
is_eventual_period_gcdIn LeanCombinatorial Games

If p and q are both eventual periods of a Boolean sequence w, then gcd p q is an eventual period of w.

theorem is_eventual_period_gcd (w : ℕ → Bool) (p q : ℕ) (hp : is_eventual_period w p) (hq : is_eventual_period w q) : is_eventual_period w (Nat.gcd p q)
is_eventual_period_mulIn LeanCombinatorial Games

If p is an eventual period of w, then every positive multiple k * p (k ≥ 1) is an eventual period of w.

theorem is_eventual_period_mul (w : ℕ → Bool) (p k : ℕ) (hk : 1 ≤ k) (hp : is_eventual_period w p) : is_eventual_period w (k * p)
is_eventual_period_sub_of_ltIn LeanCombinatorial Games

If p < q are both eventual periods of w, then q - p is an eventual period of w.

theorem is_eventual_period_sub_of_lt (w : ℕ → Bool) (p q : ℕ) (hp : is_eventual_period w p) (hq : is_eventual_period w q) (hlt : p < q) : is_eventual_period w (q - p)
is_stein_number_iff_pell_formIn LeanCombinatorial Games

A natural number n is an E. P. Stein number if and only if n = m^2 + a^2 for positive integers m, a, b satisfying a^2 ≤ 2m and the Pell equation 2m^2 + a^2 = b^2.

theorem is_stein_number_iff_pell_form (n : ℕ) :
    is_stein_number n ↔ ∃ m a b : ℕ, 0 < a ∧ a ^ 2 ≤ 2 * m ∧ 2 * m ^ 2 + a ^ 2 = b ^ 2 ∧ n = m ^ 2 + a ^ 2
is_ultrametric_transition_three_iff_maxIn LeanCombinatorial Games

A symmetric 3-by-3 matrix P over a linear order satisfies the ultrametric transition property if and only if P 0 1 ≤ max (P 0 2) (P 1 2), P 0 2 ≤ max (P 0 1) (P 1 2) and P 1 2 ≤ max (P 0 1) (P 0 2).

theorem is_ultrametric_transition_three_iff_max {α : Type*} [LinearOrder α]
    (P : Matrix (Fin 3) (Fin 3) α) (hsymm : P.IsSymm) :
    is_ultrametric_transition P ↔
      (P 0 1 ≤ max (P 0 2) (P 1 2) ∧ P 0 2 ≤ max (P 0 1) (P 1 2) ∧
        P 1 2 ≤ max (P 0 1) (P 0 2))
least_eventual_period_dvdIn LeanCombinatorial Games

For any eventual period p of w, the least eventual period of w divides p.

theorem least_eventual_period_dvd (w : ℕ → Bool) (p : ℕ) (hp : is_eventual_period w p) : least_eventual_period w ∣ p
least_eventual_period_is_eventual_periodIn LeanCombinatorial Games

If w has at least one eventual period, then the infimum of the set of eventual periods of w is again an eventual period of w.

theorem least_eventual_period_is_eventual_period (w : ℕ → Bool) (h : ∃ p, is_eventual_period w p) : is_eventual_period w (least_eventual_period w)
least_eventual_period_posIn LeanCombinatorial Games

If w has an eventual period, then its least eventual period is positive.

theorem least_eventual_period_pos (w : ℕ → Bool) (h : ∃ p, is_eventual_period w p) : 0 < least_eventual_period w
list_isSuffix_iff_getElem?_reverseIn LeanCombinatorial Games

s is a suffix of l if and only if, for every i below the length of s, the i-th letter of l from the right equals the i-th letter of s from the right.

theorem list_isSuffix_iff_getElem?_reverse {α : Type*} {s l : List α} :
    s <:+ l ↔ ∀ i : ℕ, i < s.length → l.reverse[i]? = s.reverse[i]?
list_take_append_singleton_takeIn LeanCombinatorial Games

Dropping the last j letters (j ≥ 1) from w ++ [c] gives the same word as dropping the last j-1 letters from w.

theorem list_take_append_singleton_take {α : Type*} (w : List α) (c : α) {j : ℕ} (hj : 1 ≤ j) :
    (w ++ [c]).take ((w ++ [c]).length - j) = w.take (w.length - (j - 1))
moving_target_lower_bound_of_expansionIn LeanCombinatorial Games

For any simple graph G on a finite type V, if every subset D of vertices of cardinality at least K satisfies 2 * K ≤ |closed_neighborhood G D| + 1, then any successful moving target strategy starting from a set D with |D| ≥ K must have accuracy threshold s ≥ K.

theorem moving_target_lower_bound_of_expansion
    {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (K : ℕ)
    (h_exp : ∀ D : Finset V, K ≤ D.card → 2 * K ≤ (closed_neighborhood G D).card + 1)
    (S : MovingTargetStrategy V) :
    ∀ (D : Finset V) (s : ℕ), K ≤ D.card →
      moving_target_strategy_successful G s S D → K ≤ s
moving_target_strategy_successful_mono_of_subsetIn LeanCombinatorial Games

A strategy that succeeds with accuracy s on a candidate set D also succeeds with accuracy s on every subset D' ⊆ D (a larger candidate set can only hurt).

theorem moving_target_strategy_successful_mono_of_subset {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (s : ℕ) (S : MovingTargetStrategy V) {D D' : Finset V} (hsub : D' ⊆ D) : moving_target_strategy_successful G s S D → moving_target_strategy_successful G s S D'
moving_target_strategy_successful_of_neighborhood_card_leIn LeanCombinatorial Games

If the closed neighbourhood of the candidate set D has at most 2s vertices, one query suffices to win with accuracy s: query a subset of N[D] of size |N[D]| - s (or stop if |N[D]| ≤ s), leaving both answer branches with at most s candidates.

theorem moving_target_strategy_successful_of_neighborhood_card_le {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (s : ℕ) (D : Finset V) (h : (closed_neighborhood G D).card ≤ 2 * s) : ∃ S : MovingTargetStrategy V, moving_target_strategy_successful G s S D
not_op_1643_pyranim_collision_prob_decayIn LeanCombinatorial Games

The statement op_1643_pyranim_collision_prob_decay is false: The statement claims that Filter.Tendsto (fun n => (pyranim_collision_prob n) ^ (1 / n)) Filter.atTop (nhds 1), i.e., that the n-th root of the game isomorphism collision probability converges to 1. This is mathematically false: 1. Provenance: The informal provenance cites arXiv:2611.16153 Sec. 5.3, Question 4 as a 'published theorem'. In fact, Section 5.3 of that paper is the Open Questions section, and Question 4 merely asks what the collision probability is. The paper does not state, let alone prove, that (P(n))^(1/n) -> 1. 2. Theoretical upper bound: The total number of stable positions is |T_n| = C_{n+1} ~ 4^(n+1) / (sqrt(pi) * n^(3/2)). Game isomorphism coincides with unit interval graph isomorphism (pyranim_game_iso_iff_graph_iso). Since connected unit interval graphs have essentially unique interval representations (at most 2 up to reversal by Roberts 1969), each isomorphism class C_i has size |C_i| <= 2^n. Thus: P(n) = (sum |C_i|^2) / |T_n|^2 <= max |C_i| / |T_n| <= 2^n / C_{n+1} = O(n^(3/2) * 2^(-n)). Taking n-th roots yields limsup_{n -> infty} (P(n))^(1/n) <= 1/2 < 1. 3. Numerical evidence (experiment #25564): - n=1: P(1) = 0.500000, P(1)^(1/1) = 0.500000 - n=2: P(2) = 0.280000, P(2)^(1/2) = 0.529150 - n=3: P(3) = 0.153061, P(3)^(1/3) = 0.534919 - n=4: P(4) = 0.083900, P(4)^(1/4) = 0.538196 - n=5: P(5) = 0.044995, P(5)^(1/5) = 0.537816 - n=6: P(6) = 0.023565, P(6)^(1/6) = 0.535442 - n=7: P(7) = 0.012129, P(7)^(1/7) = 0.532426 - n=8: P(8) = 0.006171, P(8)^(1/8) = 0.529415 The sequence (P(n))^(1/n) stays near 0.53 and decreases for n >= 4. It does not converge to 1.

theorem not_op_1643_pyranim_collision_prob_decay : ¬ (Filter.Tendsto (fun n : ℕ => (pyranim_collision_prob n) ^ (1 / (n : ℝ))) Filter.atTop (nhds 1))
op_1349_cyclic_distinguishable_familyIn LeanCombinatorial Games

Lower-bound milestone for OP-1349: there are 4*d*lcm(a,b)-d words over Fin d that are pairwise distinguished by the P-position language, i.e. no two have the same left quotient.

theorem op_1349_cyclic_distinguishable_family
    (d : ℕ) (hd : 2 ≤ d) (s : ℕ) (hs1 : 1 ≤ s) (hsd : s < d) (a b : ℕ) (ha : 1 ≤ a) (hb : 1 ≤ b) :
    ∃ f : Fin (4 * d * Nat.lcm a b - d) → List (Fin d),
      ∀ i j, i ≠ j →
        (word_subtraction_N (cyclic_permutation_subtraction_set d s a b))ᶜ.leftQuotient (f i) ≠
        (word_subtraction_N (cyclic_permutation_subtraction_set d s a b))ᶜ.leftQuotient (f j)
op_1349_cyclic_explicit_dfaIn LeanCombinatorial Games

Upper-bound milestone for OP-1349: there is a DFA over the alphabet Fin d with exactly 4*d*lcm(a,b)-d states accepting precisely the P-position language, i.e. the complement of word_subtraction_N of the cyclic-permutation subtraction set.

theorem op_1349_cyclic_explicit_dfa
    (d : ℕ) (hd : 2 ≤ d) (s : ℕ) (hs1 : 1 ≤ s) (hsd : s < d) (a b : ℕ) (ha : 1 ≤ a) (hb : 1 ≤ b) :
    ∃ (σ : Type) (_ : Fintype σ) (M : DFA (Fin d) σ),
      Fintype.card σ = 4 * d * Nat.lcm a b - d ∧
      M.accepts = (word_subtraction_N (cyclic_permutation_subtraction_set d s a b))ᶜ
op_1349_cyclic_permutation_word_game_state_complexity_geIn LeanCombinatorial Games

Open Problem OP-1349 (lower bound): For every integer d ≥ 2, rotation 1 ≤ s < d, and positive exponents a, b ≥ 1, the deterministic state complexity of word_subtraction_N (cyclic_permutation_subtraction_set d s a b) is at least 4 * d * Nat.lcm a b - d.

theorem op_1349_cyclic_permutation_word_game_state_complexity_ge
    (d : ℕ) (hd : 2 ≤ d) (s : ℕ) (hs1 : 1 ≤ s) (hsd : s < d) (a b : ℕ) (ha : 1 ≤ a) (hb : 1 ≤ b) :
    4 * d * Nat.lcm a b - d ≤
      dfa_state_complexity (word_subtraction_N (cyclic_permutation_subtraction_set d s a b))
op_1349_cyclic_permutation_word_game_state_complexity_leIn LeanCombinatorial Games

Open Problem OP-1349 (upper bound): For every integer d ≥ 2, rotation 1 ≤ s < d, and positive exponents a, b ≥ 1, the deterministic state complexity of word_subtraction_N (cyclic_permutation_subtraction_set d s a b) is at most 4 * d * Nat.lcm a b - d.

theorem op_1349_cyclic_permutation_word_game_state_complexity_le
    (d : ℕ) (hd : 2 ≤ d) (s : ℕ) (hs1 : 1 ≤ s) (hsd : s < d) (a b : ℕ) (ha : 1 ≤ a) (hb : 1 ≤ b) :
    dfa_state_complexity (word_subtraction_N (cyclic_permutation_subtraction_set d s a b)) ≤
      4 * d * Nat.lcm a b - d
op_1349_partial_binary_case_geIn LeanCombinatorial Games

Open Problem OP-1349 (binary case lower bound): For the binary alphabet with d = 2, rotation s = 1, and positive exponents a, b ≥ 1, the deterministic state complexity of word_subtraction_N (cyclic_permutation_subtraction_set 2 1 a b) is at least 8 * Nat.lcm a b - 2.

theorem op_1349_partial_binary_case_ge
    (a b : ℕ) (ha : 1 ≤ a) (hb : 1 ≤ b) :
    8 * Nat.lcm a b - 2 ≤
      dfa_state_complexity (word_subtraction_N (cyclic_permutation_subtraction_set 2 1 a b))
op_1349_partial_binary_case_leIn LeanCombinatorial Games

Open Problem OP-1349 (binary case upper bound): For the binary alphabet with d = 2, rotation s = 1, and positive exponents a, b ≥ 1, the deterministic state complexity of word_subtraction_N (cyclic_permutation_subtraction_set 2 1 a b) is at most 8 * Nat.lcm a b - 2.

theorem op_1349_partial_binary_case_le
    (a b : ℕ) (ha : 1 ≤ a) (hb : 1 ≤ b) :
    dfa_state_complexity (word_subtraction_N (cyclic_permutation_subtraction_set 2 1 a b)) ≤
      8 * Nat.lcm a b - 2
op_1349_partial_unit_exponents_geIn LeanCombinatorial Games

Open Problem OP-1349 (unit exponents lower bound): For every integer d ≥ 2 and shift 1 ≤ s < d, the deterministic state complexity of word_subtraction_N (cyclic_permutation_subtraction_set d s 1 1) is at least 3 * d.

theorem op_1349_partial_unit_exponents_ge
    (d : ℕ) (hd : 2 ≤ d) (s : ℕ) (hs1 : 1 ≤ s) (hsd : s < d) :
    3 * d ≤
      dfa_state_complexity (word_subtraction_N (cyclic_permutation_subtraction_set d s 1 1))
op_1349_partial_unit_exponents_leIn LeanCombinatorial Games

Open Problem OP-1349 (unit exponents upper bound): For every integer d ≥ 2 and shift 1 ≤ s < d, the deterministic state complexity of word_subtraction_N (cyclic_permutation_subtraction_set d s 1 1) is at most 3 * d.

theorem op_1349_partial_unit_exponents_le
    (d : ℕ) (hd : 2 ≤ d) (s : ℕ) (hs1 : 1 ≤ s) (hsd : s < d) :
    dfa_state_complexity (word_subtraction_N (cyclic_permutation_subtraction_set d s 1 1)) ≤
      3 * d
op_1349_smallest_instance_state_complexityIn LeanCombinatorial Games

The smallest instance of OP-1349: for d = 2, s = 1, a = b = 1 the deterministic state complexity of the P-position language is exactly 6, agreeing with both 4*d*lcm(a,b)-d and 3*d.

theorem op_1349_smallest_instance_state_complexity :
    dfa_state_complexity (word_subtraction_N (cyclic_permutation_subtraction_set 2 1 1 1))ᶜ = 6
pell_solution_stein_paramIn LeanCombinatorial Games

Any solution to the Pell equation 2m^2 + a^2 = b^2 with 0 < a and a^2 ≤ 2m yields positive integers g, U, V with U odd such that m^2 + a^2 = g^2 (U^4 + 4V^4) and g (U^2 - 2V^2)^2 ≤ 4UV.

theorem pell_solution_stein_param (m a b : ℕ) (ha : 0 < a) (hle : a ^ 2 ≤ 2 * m) (hpell : 2 * m ^ 2 + a ^ 2 = b ^ 2) :
    ∃ g U V : ℕ, 0 < g ∧ 0 < U ∧ 0 < V ∧ Odd U ∧
      m ^ 2 + a ^ 2 = g ^ 2 * (U ^ 4 + 4 * V ^ 4) ∧
      (g : ℤ) * ((U : ℤ) ^ 2 - 2 * (V : ℤ) ^ 2) ^ 2 ≤ 4 * (U : ℤ) * (V : ℤ)
pell_two_neg_one_solutions_infiniteIn LeanCombinatorial Games

The negative Pell equation T^2 + 1 = 2 S^2 has infinitely many solutions (S, T) in natural numbers with T ≥ 2.

theorem pell_two_neg_one_solutions_infinite :
    Set.Infinite {S : ℕ | ∃ T : ℕ, 2 ≤ T ∧ T * T + 1 = 2 * S * S}
pell_unit_squared_gt_oneIn LeanCombinatorial Games

The squared fundamental Pell unit pell_unit_squared = 17 + 12 * sqrt(2) is strictly greater than 1.

theorem pell_unit_squared_gt_one : 1 < pell_unit_squared
pyranim_between_mem_iff_joinIn LeanCombinatorial Games

In an order ideal X, the chip (min u v, max u v) spanned by u and v lies in X if and only if the two diagonal chips (u,u) and (v,v) have a common upper bound in X. Thus adjacency in pyranim_gamma is the existence of a join of two minimal chips.

theorem pyranim_between_mem_iff_join (X : Finset (ℕ × ℕ)) (hX : pyranim_is_order_ideal X)
    (u v : ℕ) :
    (min u v, max u v) ∈ X ↔
      ∃ w ∈ X, pyranim_chip_sub (u, u) w ∧ pyranim_chip_sub (v, v) w
pyranim_card_stable_positions_card_eq_seqIn LeanCombinatorial Games

The number of stable positions of the n-tier Pyranim pyramid equals the number of weakly increasing sequences l : Fin n → Fin (n+2) with 1 ≤ l i ≤ i+2: a position is recovered from, and determined by, the minima of its columns.

theorem pyranim_card_stable_positions_card_eq_seq (n : ℕ) :
    (pyranim_stable_positions n).card = (pyranim_seq n).card
pyranim_card_stable_positions_of_equivIn LeanCombinatorial Games

If the set of stable positions pyranim_stable_positions n in an n-tier Pyranim game is in bijection with the type of Dyck words of semilength n + 1, then its cardinality equals the Catalan number catalan (n + 1).

theorem pyranim_card_stable_positions_of_equiv (n : ℕ)
    (h : Nonempty (pyranim_stable_positions n ≃ { p : DyckWord // p.semilength = n + 1 })) :
    (pyranim_stable_positions n).card = catalan (n + 1)
pyranim_catalan_succ_recIn LeanCombinatorial Games

The Catalan numbers satisfy catalan (n+2) = 2 * catalan (n+1) + ∑_{i<n} catalan (i+1) * catalan (n-i); this is the standard convolution recursion with the two end terms (both equal to catalan (n+1)) peeled off.

theorem pyranim_catalan_succ_rec (n : ℕ) :
    catalan (n + 2) = 2 * catalan (n + 1) + ∑ i ∈ Finset.range n, catalan (i + 1) * catalan (n - i)
pyranim_chip_sub_antisymmIn LeanCombinatorial Games

Chip containment is antisymmetric: if p is contained in q and q in p, then p = q. So pyranim_chip_sub is a genuine partial order and "positions isomorphic as posets" is a well-posed notion.

theorem pyranim_chip_sub_antisymm {p q : ℕ × ℕ} (h₁ : pyranim_chip_sub p q) (h₂ : pyranim_chip_sub q p) : p = q
pyranim_game_iso_imp_poset_isoIn LeanCombinatorial Games

The bisimulation type of a stable position determines its chip poset: game-isomorphic stable positions are isomorphic as chip posets.

theorem pyranim_game_iso_imp_poset_iso {n : ℕ} {X Y : Finset (ℕ × ℕ)}
    (hX : X ∈ pyranim_stable_positions n) (hY : Y ∈ pyranim_stable_positions n)
    (h : pyranim_game_iso X Y) : pyranim_poset_iso X Y
pyranim_game_iso_reflIn LeanCombinatorial Games

Every Pyranim position X is game-isomorphic to itself.

theorem pyranim_game_iso_refl (X : Finset (ℕ × ℕ)) : pyranim_game_iso X X
pyranim_game_iso_symmIn LeanCombinatorial Games

If Pyranim position X is game-isomorphic to position Y, then Y is game-isomorphic to X.

theorem pyranim_game_iso_symm {X Y : Finset (ℕ × ℕ)} (h : pyranim_game_iso X Y) : pyranim_game_iso Y X
pyranim_game_iso_transIn LeanCombinatorial Games

If X is game-isomorphic to Y and Y is game-isomorphic to Z, then X is game-isomorphic to Z.

theorem pyranim_game_iso_trans {X Y Z : Finset (ℕ × ℕ)} (hXY : pyranim_game_iso X Y) (hYZ : pyranim_game_iso Y Z) : pyranim_game_iso X Z
pyranim_gamma_iso_imp_poset_isoIn LeanCombinatorial Games

An isomorphism of the unit interval graphs pyranim_gamma X and pyranim_gamma Y of two stable positions comes from an isomorphism of their chip posets.

theorem pyranim_gamma_iso_imp_poset_iso {n : ℕ} {X Y : Finset (ℕ × ℕ)}
    (hX : X ∈ pyranim_stable_positions n) (hY : Y ∈ pyranim_stable_positions n)
    (h : Nonempty (pyranim_gamma X ≃g pyranim_gamma Y)) : pyranim_poset_iso X Y
pyranim_minimal_iff_diagonalIn LeanCombinatorial Games

In an order ideal all of whose chips are intervals, a chip c is minimal for chip containment (nothing in X lies strictly below it) if and only if it is a diagonal chip with c.1 = c.2.

theorem pyranim_minimal_iff_diagonal (X : Finset (ℕ × ℕ)) (hX : pyranim_is_order_ideal X)
    (hI : ∀ p ∈ X, p.1 ≤ p.2) (c : ℕ × ℕ) (hc : c ∈ X) :
    (∀ d ∈ X, pyranim_chip_sub d c → pyranim_chip_sub c d) ↔ c.1 = c.2
pyranim_poset_iso_imp_game_isoIn LeanCombinatorial Games

An isomorphism of chip posets between two stable positions is a game isomorphism.

theorem pyranim_poset_iso_imp_game_iso {n : ℕ} {X Y : Finset (ℕ × ℕ)}
    (hX : X ∈ pyranim_stable_positions n) (hY : Y ∈ pyranim_stable_positions n)
    (h : pyranim_poset_iso X Y) : pyranim_game_iso X Y
pyranim_poset_iso_imp_gamma_isoIn LeanCombinatorial Games

If two stable positions are isomorphic as chip posets, their unit interval graphs pyranim_gamma are isomorphic.

theorem pyranim_poset_iso_imp_gamma_iso {n : ℕ} {X Y : Finset (ℕ × ℕ)}
    (hX : X ∈ pyranim_stable_positions n) (hY : Y ∈ pyranim_stable_positions n)
    (h : pyranim_poset_iso X Y) : Nonempty (pyranim_gamma X ≃g pyranim_gamma Y)
pyranim_poset_iso_reflIn LeanCombinatorial Games

Every position is isomorphic to itself as a chip poset.

theorem pyranim_poset_iso_refl (X : Finset (ℕ × ℕ)) : pyranim_poset_iso X X
pyranim_seq_card_eq_catalanIn LeanCombinatorial Games

The number of weakly increasing sequences l : Fin n → Fin (n+2) with 1 ≤ l i ≤ i+2 is the Catalan number catalan (n+1).

theorem pyranim_seq_card_eq_catalan (n : ℕ) : (pyranim_seq n).card = catalan (n + 1)
pyranim_seq_first_empty_specIn LeanCombinatorial Games

Let l be a sequence of pyranim_seq (n+1) with l 0 = 1 (so the first column is nonempty) and suppose some later column is empty, i.e. l i = i+2 for some 0 < i < n+1. Then j = pyranim_seq_first_empty n l satisfies l(j) = j+2, 0 < j < n+1, and every column with 0 < i < j is nonempty, i.e. l i ≤ i+1.

theorem pyranim_seq_first_empty_spec (n : ℕ) {l : Fin (n + 1) → Fin (n + 3)}
    (hl : l ∈ pyranim_seq (n + 1)) (h0 : l ⟨0, Nat.succ_pos n⟩ = 1)
    (h : ∃ i : Fin (n + 1), 0 < (i : ℕ) ∧ (l i : ℕ) = (i : ℕ) + 2) :
    pyranim_fin_lookup (n + 1) l (pyranim_seq_first_empty n l) = pyranim_seq_first_empty n l + 2 ∧
      0 < pyranim_seq_first_empty n l ∧ pyranim_seq_first_empty n l < n + 1 ∧
      ∀ j, 0 < j → j < pyranim_seq_first_empty n l → pyranim_fin_lookup (n + 1) l j ≤ j + 1
pyranim_seq_ideal_injectiveIn LeanCombinatorial Games

If two weakly increasing sequences 1 ≤ l i ≤ i+2 give the same position, then they are equal: the least element of column b of the position recovers l(b-1).

theorem pyranim_seq_ideal_injective (n : ℕ) {l l' : Fin n → Fin (n + 2)}
    (hl : l ∈ pyranim_seq n) (hl' : l' ∈ pyranim_seq n)
    (h : pyranim_seq_ideal n l = pyranim_seq_ideal n l') : l = l'
pyranim_seq_ideal_mem_iffIn LeanCombinatorial Games

For a sequence l : Fin n → Fin (n+2) and 1 ≤ b ≤ n, the chip (a,b) belongs to pyranim_seq_ideal n l if and only if 1 ≤ a, a ≤ b, and l(b-1) ≤ a.

theorem pyranim_seq_ideal_mem_iff (n : ℕ) (l : Fin n → Fin (n + 2)) {a b : ℕ}
    (hb1 : 1 ≤ b) (hbn : b ≤ n) :
    (a, b) ∈ pyranim_seq_ideal n l ↔ 1 ≤ a ∧ a ≤ b ∧ pyranim_fin_lookup n l (b - 1) ≤ a
pyranim_seq_ideal_mem_stableIn LeanCombinatorial Games

If l is a weakly increasing sequence with 1 ≤ l i ≤ i+2 for i < n, then pyranim_seq_ideal n l is a stable position of the n-tier pyramid (a subset of the pyramid closed under taking subintervals).

theorem pyranim_seq_ideal_mem_stable (n : ℕ) {l : Fin n → Fin (n + 2)} (hl : l ∈ pyranim_seq n) :
    pyranim_seq_ideal n l ∈ pyranim_stable_positions n
pyranim_seq_ideal_stable_seqIn LeanCombinatorial Games

For a stable position X of the n-tier pyramid, the position attached to its column-minimum sequence is X again: pyranim_seq_ideal n (pyranim_stable_seq n X) = X.

theorem pyranim_seq_ideal_stable_seq (n : ℕ) {X : Finset (ℕ × ℕ)} (hX : X ∈ pyranim_stable_positions n) :
    pyranim_seq_ideal n (pyranim_stable_seq n X) = X
pyranim_seq_succ_cardIn LeanCombinatorial Games

The number B(n+1) of sequences in pyranim_seq (n+1) satisfies B(n+1) = 2·B(n) + ∑_{i<n} B(i)·B(n-1-i), the three cases being: first column empty, first column nonempty with no empty column later, and first column nonempty with a first empty column j > 1.

theorem pyranim_seq_succ_card (n : ℕ) :
    (pyranim_seq (n + 1)).card = 2 * (pyranim_seq n).card +
      ∑ i ∈ Finset.range n, (pyranim_seq i).card * (pyranim_seq (n - 1 - i)).card
pyranim_seq_succ_card_fullIn LeanCombinatorial Games

The number of sequences in pyranim_seq (n+1) that have l 0 = 1 and satisfy l i ≤ i+1 for every i (no empty column) equals the number of sequences in pyranim_seq n: it is the bijection that deletes the first entry.

theorem pyranim_seq_succ_card_full (n : ℕ) :
    ((pyranim_seq (n + 1)).filter (fun l => l ⟨0, Nat.succ_pos n⟩ = 1 ∧
      ∀ i : Fin (n + 1), (l i : ℕ) ≤ (i : ℕ) + 1)).card = (pyranim_seq n).card
pyranim_seq_succ_card_splitIn LeanCombinatorial Games

The number of sequences in pyranim_seq (n+1) with l 0 = 1 and some column i > 0 empty (l i = i+2) equals ∑_{i<n} B(i)·B(n-1-i), where B(m) is the number of sequences of length m: splitting at the first empty column j gives a bijection with a pair of sequences of lengths j-1 and n-j.

theorem pyranim_seq_succ_card_split (n : ℕ) :
    ((pyranim_seq (n + 1)).filter (fun l => l ⟨0, Nat.succ_pos n⟩ = 1 ∧
      ∃ i : Fin (n + 1), 0 < (i : ℕ) ∧ (l i : ℕ) = (i : ℕ) + 2)).card
      = ∑ i ∈ Finset.range n, (pyranim_seq i).card * (pyranim_seq (n - 1 - i)).card
pyranim_seq_succ_card_topIn LeanCombinatorial Games

The number of sequences in pyranim_seq (n+1) with l 0 = 2 (first column empty) equals the number of sequences in pyranim_seq n: the bijection drops the first entry and subtracts one from all the others.

theorem pyranim_seq_succ_card_top (n : ℕ) :
    ((pyranim_seq (n + 1)).filter (fun l => l ⟨0, Nat.succ_pos n⟩ = 2)).card = (pyranim_seq n).card
pyranim_stable_column_iffIn LeanCombinatorial Games

Let X be a stable position in the n-tier pyramid (an order ideal). For 1 ≤ a ≤ b ≤ n, the chip (a,b) belongs to X if and only if b + 1 - (the number of a' in {1,...,b} with (a',b) in X) ≤ a; that is, each column of X is a final segment of {1,...,b}.

theorem pyranim_stable_column_iff (n : ℕ) {X : Finset (ℕ × ℕ)} (hX : X ∈ pyranim_stable_positions n)
    {a b : ℕ} (ha : a ∈ Finset.Icc 1 b) (hbn : b ≤ n) :
    (a, b) ∈ X ↔ b + 1 - ((Finset.Icc 1 b).filter (fun a' => (a', b) ∈ X)).card ≤ a
pyranim_stable_positions_equiv_dyck_wordIn LeanCombinatorial Games

For every natural number n, the set of stable positions pyranim_stable_positions n in an n-tier Pyranim game is in bijection with the type of Dyck words of semilength n + 1.

theorem pyranim_stable_positions_equiv_dyck_word (n : ℕ) :
    Nonempty (pyranim_stable_positions n ≃ { p : DyckWord // p.semilength = n + 1 })
pyranim_stable_positions_equiv_of_card_eqIn LeanCombinatorial Games

If the cardinality of pyranim_stable_positions n equals catalan (n + 1), then there exists a bijection between pyranim_stable_positions n and the type of Dyck words of semilength n + 1.

theorem pyranim_stable_positions_equiv_of_card_eq (n : ℕ)
    (h : (pyranim_stable_positions n).card = catalan (n + 1)) :
    Nonempty (pyranim_stable_positions n ≃ { p : DyckWord // p.semilength = n + 1 })
pyranim_stable_seq_memIn LeanCombinatorial Games

If X is a stable position of the n-tier pyramid, its column-minimum sequence l i = (i+2) - (size of column i+1) is weakly increasing with 1 ≤ l i ≤ i+2, i.e. it belongs to pyranim_seq n.

theorem pyranim_stable_seq_mem (n : ℕ) {X : Finset (ℕ × ℕ)} (hX : X ∈ pyranim_stable_positions n) :
    pyranim_stable_seq n X ∈ pyranim_seq n
pyranim_upper_set_card_iffIn LeanCombinatorial Games

Let S be a finite set of natural numbers contained in {1, ..., b} and upward closed inside it: if a ∈ S and a ≤ a' ≤ b then a' ∈ S. Then for every a in {1, ..., b}, a belongs to S if and only if b + 1 - (card S) ≤ a; equivalently a finite upward closed subset of {1, ..., b} is exactly {b + 1 - card S, ..., b}.

theorem pyranim_upper_set_card_iff {b : ℕ} {S : Finset ℕ} (hsub : S ⊆ Finset.Icc 1 b)
    (hup : ∀ a ∈ S, ∀ a' ∈ Finset.Icc a b, a' ∈ S) {a : ℕ} (ha : a ∈ Finset.Icc 1 b) :
    a ∈ S ↔ b + 1 - S.card ≤ a
real_hunger_add_shift_sum_eqIn LeanCombinatorial Games

For a row-stochastic real matrix P, any vector x and any real vector v, the coordinate sum of x + v * (P - I) equals the coordinate sum of x. No hypothesis on v is needed: every row of P - I sums to 0.

theorem real_hunger_add_shift_sum_eq {n : ℕ} [NeZero n] (P : Matrix (Fin n) (Fin n) ℝ) (hP : P ∈ Matrix.rowStochastic ℝ (Fin n)) (v x : Fin n → ℝ) : ∑ j, (x j + Matrix.vecMul v (P - 1) j) = ∑ j, x j
real_hunger_coalescence_transIn LeanCombinatorial Games

Coalescence of hunger trajectories is transitive: if the trajectories from h1 and h2 meet at time t1 and those from h2 and h3 meet at time t2, then those from h1 and h3 meet.

theorem real_hunger_coalescence_trans {n : ℕ} [NeZero n] (P : Matrix (Fin n) (Fin n) ℝ) {h1 h2 h3 : Fin n → ℝ} {t1 t2 : ℕ} (h12 : hunger_iter P t1 h1 = hunger_iter P t1 h2) (h23 : hunger_iter P t2 h2 = hunger_iter P t2 h3) : ∃ t, hunger_iter P t h1 = hunger_iter P t h3
real_hunger_elementary_shift_coalescenceIn LeanCombinatorial Games

For n ≥ 3, irreducible row-stochastic real P, zero-sum h, and distinct p q, the hunger trajectories from h and from h + (e_p - e_q) * (P - I) eventually coincide.

theorem real_hunger_elementary_shift_coalescence : ∀ (n : ℕ) [NeZero n] (hn : 3 ≤ n) (P : Matrix (Fin n) (Fin n) ℝ) (hP_stoch : P ∈ Matrix.rowStochastic ℝ (Fin n)) (hP_irred : is_irreducible_real_matrix P) (h : Fin n → ℝ) (h_sum : ∑ i, h i = 0) (p q : Fin n) (hpq : p ≠ q), ∃ t : ℕ, hunger_iter P t h = hunger_iter P t (h + Matrix.vecMul (fun j => ((if j = p then (1:ℝ) else 0) - (if j = q then 1 else 0))) (P - 1))
real_hunger_elementary_shift_reductionIn LeanCombinatorial Games

If every elementary shift e_p - e_q coalesces (at zero-sum starts), then every zero-sum integer shift z coalesces: the target's conclusion holds, with no irreducibility or n ≥ 3 hypothesis.

theorem real_hunger_elementary_shift_reduction {n : ℕ} [NeZero n] (P : Matrix (Fin n) (Fin n) ℝ) (hP : P ∈ Matrix.rowStochastic ℝ (Fin n)) (helem : ∀ (x : Fin n → ℝ), (∑ i, x i = 0) → ∀ p q : Fin n, p ≠ q → ∃ t, hunger_iter P t x = hunger_iter P t (x + Matrix.vecMul (fun j => ((if j = p then (1:ℝ) else 0) - (if j = q then 1 else 0))) (P - 1))) (h : Fin n → ℝ) (h_sum : ∑ i, h i = 0) (z : Fin n → ℤ) (hz_sum : ∑ i, z i = 0) : ∃ t, hunger_iter P t h = hunger_iter P t (h + Matrix.vecMul (fun j => (z j : ℝ)) (P - 1))
real_hunger_erase_sum_eqIn LeanCombinatorial Games

Every zero-sum integer vector z equals the sum over i ≠ q0 of z i * (e_i - e_{q0}), because ∑_{i ≠ q0} z i = -z_{q0}.

theorem real_hunger_erase_sum_eq {n : ℕ} [NeZero n] (z : Fin n → ℤ) (hz : ∑ i, z i = 0) (q0 : Fin n) : (fun j => ∑ i ∈ Finset.univ.erase q0, (z i : ℝ) * ((if j = i then (1:ℝ) else 0) - (if j = q0 then (1:ℝ) else 0))) = fun j => (z j : ℝ)
real_hunger_finset_shift_coalescenceIn LeanCombinatorial Games

Assume coalescence for every elementary shift. Then for any finite set S of indices, any multiplicities c : S → ℕ and any choice of distinct directions (pp i, qq i) for i in S, the trajectories from h and h + (∑_{i∈S} c i * (e_{pp i} - e_{qq i})) * (P - I) coalesce.

theorem real_hunger_finset_shift_coalescence {n : ℕ} [NeZero n] (P : Matrix (Fin n) (Fin n) ℝ) (hP : P ∈ Matrix.rowStochastic ℝ (Fin n)) (helem : ∀ (x : Fin n → ℝ), (∑ i, x i = 0) → ∀ p q : Fin n, p ≠ q → ∃ t, hunger_iter P t x = hunger_iter P t (x + Matrix.vecMul (fun j => ((if j = p then (1:ℝ) else 0) - (if j = q then 1 else 0))) (P - 1))) (h : Fin n → ℝ) (h_sum : ∑ i, h i = 0) : ∀ (S : Finset (Fin n)) (c : Fin n → ℕ) (pp qq : Fin n → Fin n), (∀ i ∈ S, pp i ≠ qq i) → ∃ t, hunger_iter P t h = hunger_iter P t (h + Matrix.vecMul (fun j => ∑ i ∈ S, (c i : ℝ) * ((if j = pp i then (1:ℝ) else 0) - (if j = qq i then 1 else 0))) (P - 1))
real_hunger_iter_succIn LeanCombinatorial Games

For an n-by-n real matrix P and any vector h, the (t+1)-th hunger iterate equals hunger_step P applied to the t-th iterate.

theorem real_hunger_iter_succ (n : ℕ) [NeZero n] (P : Matrix (Fin n) (Fin n) ℝ) (t : ℕ) (h : Fin n → ℝ) : hunger_iter P (t + 1) h = hunger_step P (hunger_iter P t h)
real_hunger_iter_sum_invariantIn LeanCombinatorial Games

For any row-stochastic real matrix P, time t, and vector h, the coordinate sum of hunger_iter P t h equals that of h.

theorem real_hunger_iter_sum_invariant (n : ℕ) [NeZero n] (P : Matrix (Fin n) (Fin n) ℝ) (hP : P ∈ Matrix.rowStochastic ℝ (Fin n)) (t : ℕ) (h : Fin n → ℝ) : ∑ j, hunger_iter P t h j = ∑ j, h j
real_hunger_multiple_shift_coalescenceIn LeanCombinatorial Games

Assume coalescence for every elementary shift e_p - e_q. Then for any c ≥ 1, the trajectories from h and h + c*(e_p - e_q)*(P - I) coalesce.

theorem real_hunger_multiple_shift_coalescence {n : ℕ} [NeZero n] (P : Matrix (Fin n) (Fin n) ℝ) (hP : P ∈ Matrix.rowStochastic ℝ (Fin n)) (helem : ∀ (x : Fin n → ℝ), (∑ i, x i = 0) → ∀ p q : Fin n, p ≠ q → ∃ t, hunger_iter P t x = hunger_iter P t (x + Matrix.vecMul (fun j => ((if j = p then (1:ℝ) else 0) - (if j = q then 1 else 0))) (P - 1))) (h : Fin n → ℝ) (h_sum : ∑ i, h i = 0) (p q : Fin n) (hpq : p ≠ q) : ∀ c : ℕ, ∃ t, hunger_iter P t h = hunger_iter P t (h + Matrix.vecMul (fun j => (c : ℝ) * ((if j = p then (1:ℝ) else 0) - (if j = q then 1 else 0))) (P - 1))
real_hunger_step_eq_add_rowIn LeanCombinatorial Games

For a real matrix P and vector h, one hunger step equals h plus the row of P - I selected by the firing state: hunger_step P h = h + fun j => (P - 1) (hunger_firing_state h) j.

theorem real_hunger_step_eq_add_row {n : ℕ} [NeZero n] (P : Matrix (Fin n) (Fin n) ℝ) (h : Fin n → ℝ) : hunger_step P h = h + fun j => (P - 1) (hunger_firing_state h) j
real_hunger_step_sum_invariantIn LeanCombinatorial Games

For any row-stochastic real matrix P and vector h, the sum of coordinates of hunger_step P h equals the sum of coordinates of h.

theorem real_hunger_step_sum_invariant (n : ℕ) [NeZero n] (P : Matrix (Fin n) (Fin n) ℝ) (hP : P ∈ Matrix.rowStochastic ℝ (Fin n)) (h : Fin n → ℝ) : ∑ j, hunger_step P h j = ∑ j, h j
run_grundy_eq_run_valIn LeanCombinatorial Games

In the Game of Arrows, the Grundy value of a run of length k with boundary conditions α and β matches the closed-form valuation run_val k α β for all k ≥ 0.

theorem run_grundy_eq_run_val (k : ℕ) (α β : RunBoundary) :
    run_grundy k α β = run_val k α β
run_grundy_one_blocked_endIn LeanCombinatorial Games

In the Game of Arrows, for all k ≥ 0, a run of length k with one free end and one end blocked inward has Grundy value k, and is therefore equivalent to a nim heap of size k.

theorem run_grundy_one_blocked_end (k : ℕ) :
    run_grundy k RunBoundary.free RunBoundary.blocked_in = k
run_grundy_valuesIn LeanCombinatorial Games

In the Game of Arrows, for all k ≥ 0, the Grundy values of runs satisfy: a run with both ends free has Grundy value k mod 2, a run with both ends blocked inward has Grundy value k mod 2, a run with one end free and one end blocked inward has Grundy value k, and a run with one end blocked inward and the other blocked outward has Grundy value 1 if k ≥ 2 is even and 0 otherwise.

theorem run_grundy_values (k : ℕ) :
    run_grundy k RunBoundary.free RunBoundary.free = k % 2 ∧
    run_grundy k RunBoundary.blocked_in RunBoundary.blocked_in = k % 2 ∧
    run_grundy k RunBoundary.free RunBoundary.blocked_in = k ∧
    run_grundy k RunBoundary.blocked_in RunBoundary.blocked_out =
      if k ≥ 2 ∧ Even k then 1 else 0
run_options_val_memIn LeanCombinatorial Games

A natural number x occurs in the option-value list of a run of length k with boundaries α and β iff x is the nim-sum of the two sub-run values produced by some legal move, i.e. iff there are an edge j with 1 ≤ j ≤ k and a direction δ ∉ {free} such that the move is legal and x = run_val (j-1) α δ ⊕ run_val (k-j) δ β.

theorem run_options_val_mem (k : ℕ) (α β : RunBoundary) (x : ℕ) :
    x ∈ run_options_val k α β ↔
      ∃ (j : ℕ) (δ : RunBoundary), 1 ≤ j ∧ j ≤ k ∧ δ ≠ RunBoundary.free ∧
        run_move_legal k α β j δ = true ∧
        x = run_val (j - 1) α δ ^^^ run_val (k - j) δ β
run_val_eq_mex_optionsIn LeanCombinatorial Games

For any k > 0 and boundary conditions α and β, the mex of the list of option values computed under run_val equals run_val k α β.

theorem run_val_eq_mex_options (k : ℕ) (hk : 0 < k) (α β : RunBoundary) :
    run_val k α β = nat_mex_list (run_options_val k α β)
run_val_mex_both_blocked_oppositeIn LeanCombinatorial Games

For k ≥ 1 and boundary conditions α ≠ β with neither end free (so the pair is (blocked_in, blocked_out) or (blocked_out, blocked_in)), the mex of the option-value list is 1 if k ≥ 2 is even and 0 otherwise.

theorem run_val_mex_both_blocked_opposite (k : ℕ) (hk : 1 ≤ k) (α β : RunBoundary) (hne : α ≠ β)
    (hα : α ≠ RunBoundary.free) (hβ : β ≠ RunBoundary.free) :
    nat_mex_list (run_options_val k α β) = if k ≥ 2 ∧ Even k then 1 else 0
run_val_mex_equal_endsIn LeanCombinatorial Games

For k ≥ 1 and any boundary condition α, the mex of the option-value list of the run of length k with both ends α (same condition at both ends) is k mod 2.

theorem run_val_mex_equal_ends (k : ℕ) (hk : 1 ≤ k) (α : RunBoundary) :
    nat_mex_list (run_options_val k α α) = k % 2
run_val_mex_one_free_endIn LeanCombinatorial Games

For k ≥ 1, boundary conditions α ≠ β with at least one end free, the mex of the option-value list of the run of length k is k.

theorem run_val_mex_one_free_end (k : ℕ) (hk : 1 ≤ k) (α β : RunBoundary) (hne : α ≠ β)
    (hfree : α = RunBoundary.free ∨ β = RunBoundary.free) :
    nat_mex_list (run_options_val k α β) = k
sages_circle_pair_protocol_solvesIn LeanCombinatorial Games

For S ≥ 3 sages in a circle, there exists a protocol taking local views to 2-element subsets of Fin S that solves the anonymous-slip circle puzzle.

theorem sages_circle_pair_protocol_solves (S : ℕ) (hS : 3 ≤ S) :
    ∃ p : CircleLocalView (Fin S) → {s : Finset (Fin S) // s.card = 2},
      CircleProtocolSolves S hS p
sages_circle_upper_bound_binomialIn LeanCombinatorial Games

For every natural number S and hypothesis hS : 3 ≤ S, the anonymous-slip puzzle for S sages in a circle with unlabeled seats can be solved using Nat.choose S 2 symbols, that is, CircleProblemSolvable S (Nat.choose S 2) hS.

theorem sages_circle_upper_bound_binomial (S : ℕ) (hS : 3 ≤ S) :
    CircleProblemSolvable S (Nat.choose S 2) hS
sages_row_chain_injIn LeanCombinatorial Games

If two row seatings of S ≥ 3 sages have the same set of adjacent pairs and the same sage at the right end, then they are the same seating.

theorem sages_row_chain_inj {S : ℕ} (hS : 3 ≤ S) (π₁ π₂ : Equiv.Perm (Fin S))
    (hset : sages_row_edge_set π₁ = sages_row_edge_set π₂)
    (hlastv : π₁ ⟨S - 1, by omega⟩ = π₂ ⟨S - 1, by omega⟩) :
    π₁ = π₂
sages_row_chain_stepIn LeanCombinatorial Games

Let two row seatings of S ≥ 3 sages have the same set of adjacent pairs. If the sages in position S-1-k coincide in the two seatings (for k+1 ≤ S-1), then the sages in position S-2-k coincide as well.

theorem sages_row_chain_step {S : ℕ} (hS : 3 ≤ S) (π₁ π₂ : Equiv.Perm (Fin S))
    (hset : sages_row_edge_set π₁ = sages_row_edge_set π₂) (k : ℕ) (hk : k + 1 ≤ S - 1)
    (hmatch : π₁ ⟨S - 1 - k, by omega⟩ = π₂ ⟨S - 1 - k, by omega⟩) :
    π₁ ⟨S - 1 - (k + 1), by omega⟩ = π₂ ⟨S - 1 - (k + 1), by omega⟩
sages_row_edge_at_vertexIn LeanCombinatorial Games

If an adjacent pair of the seating π contains the sage at position i, then that pair is either the pair with the sage at position i+1 (when i is not the last position) or the pair with the sage at position i-1 (when i is not the first position).

theorem sages_row_edge_at_vertex {S : ℕ} (π : Equiv.Perm (Fin S)) (i : Fin S)
    {s : Finset (Fin S)} (hs : s ∈ sages_row_edge_set π) (hi : π i ∈ s) :
    (∃ h : i.val + 1 < S, s = ({π i, π ⟨i.val + 1, h⟩} : Finset (Fin S))) ∨
      (i.val ≠ 0 ∧ s = ({π ⟨i.val - 1, by omega⟩, π i} : Finset (Fin S)))
sages_row_edge_degreeIn LeanCombinatorial Games

In a row seating π of S sages, the number of adjacent pairs containing the sage in position i is 1 if i is the first or last position, and 2 otherwise.

theorem sages_row_edge_degree {S : ℕ} (hS : 2 ≤ S) (π : Equiv.Perm (Fin S)) (i : Fin S) :
    ((sages_row_edge_set π).filter (fun s => π i ∈ s)).card =
      (if i.val + 1 = S then 1 else if i.val = 0 then 1 else 2)
sages_row_last_edge_alignsIn LeanCombinatorial Games

If two row seatings of S ≥ 3 sages have the same set of adjacent pairs and their rightmost adjacent pairs are equal as 2-element sets of sages, then the rightmost sage is the same in both seatings.

theorem sages_row_last_edge_aligns {S : ℕ} (hS : 3 ≤ S) (π₁ π₂ : Equiv.Perm (Fin S))
    (hset : sages_row_edge_set π₁ = sages_row_edge_set π₂)
    (hlast : ({π₁ ⟨S - 2, by omega⟩, π₁ ⟨S - 1, by omega⟩} : Finset (Fin S))
           = ({π₂ ⟨S - 2, by omega⟩, π₂ ⟨S - 1, by omega⟩} : Finset (Fin S))) :
    π₁ ⟨S - 1, by omega⟩ = π₂ ⟨S - 1, by omega⟩
sages_row_pair_multiset_countIn LeanCombinatorial Games

For a row seating π: a 2-element set occurs in the announced multiset if and only if it is an adjacent pair of the row; the last adjacent pair {π(S-2), π(S-1)} occurs exactly twice; and any pair occurring at least twice is that last pair.

theorem sages_row_pair_multiset_count {S : ℕ} (hS : 2 ≤ S) (π : Equiv.Perm (Fin S)) :
    (∀ s : Finset (Fin S),
        s ∈ (rowMultiset hS (sages_row_pair_protocol hS) π).map (fun t => t.val) ↔
          s ∈ sages_row_edge_set π) ∧
      Multiset.count ({π ⟨S - 2, by omega⟩, π ⟨S - 1, by omega⟩} : Finset (Fin S))
          ((rowMultiset hS (sages_row_pair_protocol hS) π).map (fun t => t.val)) = 2 ∧
      (∀ s : Finset (Fin S),
        2 ≤ Multiset.count s ((rowMultiset hS (sages_row_pair_protocol hS) π).map (fun t => t.val)) →
          s = ({π ⟨S - 2, by omega⟩, π ⟨S - 1, by omega⟩} : Finset (Fin S)))
sages_row_pair_multiset_eqIn LeanCombinatorial Games

For a row seating π, the multiset of announced pairs is the multiset of the S-1 adjacent pairs, except that the last pair {π(S-2), π(S-1)} occurs twice.

theorem sages_row_pair_multiset_eq {S : ℕ} (hS : 2 ≤ S) (π : Equiv.Perm (Fin S)) :
    (rowMultiset hS (sages_row_pair_protocol hS) π).map (fun s => s.val) =
      Multiset.map (fun i : {i : Fin S // i.val + 1 < S} =>
          ({π i.1, π ⟨i.1.val + 1, i.2⟩} : Finset (Fin S)))
          (Finset.univ : Finset {i : Fin S // i.val + 1 < S}).val
        + ({({π ⟨S - 2, by omega⟩, π ⟨S - 1, by omega⟩} : Finset (Fin S))} : Multiset (Finset (Fin S)))
sages_row_pair_protocol_eval_lastIn LeanCombinatorial Games

The sage in the last position of the row, having no right neighbour, announces the pair of themselves and their left neighbour.

theorem sages_row_pair_protocol_eval_last {S : ℕ} (hS : 2 ≤ S) (π : Equiv.Perm (Fin S)) (i : Fin S)
    (h : i.val + 1 = S) :
    (sages_row_pair_protocol hS (rowView hS π i)).val
      = ({π ⟨i.val - 1, by omega⟩, π i} : Finset (Fin S))
sages_row_pair_protocol_eval_succIn LeanCombinatorial Games

A sage in position i of the row who has a right neighbour announces the pair of themselves and the sage in position i+1.

theorem sages_row_pair_protocol_eval_succ {S : ℕ} (hS : 2 ≤ S) (π : Equiv.Perm (Fin S)) (i : Fin S)
    (h : i.val + 1 < S) :
    (sages_row_pair_protocol hS (rowView hS π i)).val
      = ({π i, π ⟨i.val + 1, h⟩} : Finset (Fin S))
sages_row_pair_protocol_solvesIn LeanCombinatorial Games

For S ≥ 3, the protocol in which each sage announces the 2-element set of themselves and their right neighbour (the rightmost sage using their left neighbour) solves the anonymous-slip puzzle for S sages in a row with unlabeled seats.

theorem sages_row_pair_protocol_solves (S : ℕ) (hS : 3 ≤ S) :
    RowProtocolSolves S (by omega) (sages_row_pair_protocol (S := S) (by omega))
sages_row_two_element_subsets_cardIn LeanCombinatorial Games

The number of 2-element subsets of Fin S is Nat.choose S 2.

theorem sages_row_two_element_subsets_card (S : ℕ) : Fintype.card {s : Finset (Fin S) // s.card = 2} = Nat.choose S 2
sages_universal_upper_bound_binomialIn LeanCombinatorial Games

For every natural number S and hypothesis hS : 3 ≤ S, both the row problem RowProblemSolvable S (Nat.choose S 2) (by omega) and the circle problem CircleProblemSolvable S (Nat.choose S 2) hS hold in the anonymous-slip puzzle with unlabeled seats.

theorem sages_universal_upper_bound_binomial (S : ℕ) (hS : 3 ≤ S) :
    RowProblemSolvable S (Nat.choose S 2) (by omega) ∧
    CircleProblemSolvable S (Nat.choose S 2) hS
seeded_subtraction_cycle_coverIn LeanCombinatorial Games

Let c be a cyclic 0/1 word on Z/p with c n = ¬c(n-a) ∨ ¬c(n-2a) ∨ ¬c(n-2a-1). Then every n with c n = true has c(n-a) = false or c(n-2a) = false or c(n-2a-1) = false.

theorem seeded_subtraction_cycle_cover (a p : ℕ) (c : ZMod p → Bool)
    (hrec : ∀ n : ZMod p, c n = (!c (n - a) || !c (n - 2 * a) || !c (n - (2 * a + 1)))) :
    ∀ n : ZMod p, c n = true → c (n - a) = false ∨ c (n - 2 * a) = false ∨ c (n - (2 * a + 1)) = false
seeded_subtraction_cycle_period_dvdIn LeanCombinatorial Games

For a ≥ 1, p > 0 and a cyclic word c : Z/p → {0,1} satisfying c n = ¬c(n-a) ∨ ¬c(n-2a) ∨ ¬c(n-2a-1) for all n, there is a positive period q of c (c(n+q) = c n for all n) dividing 3a or 3a+1.

theorem seeded_subtraction_cycle_period_dvd (a p : ℕ) (ha : 1 ≤ a) (hp : 0 < p) (c : ZMod p → Bool)
    (hrec : ∀ n : ZMod p, c n = (!c (n - a) || !c (n - 2 * a) || !c (n - (2 * a + 1)))) :
    ∃ q : ℕ, 0 < q ∧ (∀ n : ZMod p, c (n + q) = c n) ∧ (q ∣ 3 * a ∨ q ∣ 3 * a + 1)
seeded_subtraction_cycle_zeros_avoidIn LeanCombinatorial Games

Let c be a cyclic 0/1 word on Z/p satisfying c n = ¬c(n-a) ∨ ¬c(n-2a) ∨ ¬c(n-2a-1). Then the zero set Z is disjoint from its translates Z+a, Z+2a and Z+(2a+1): if c n = false then c(n+a) = c(n+2a) = c(n+2a+1) = true.

theorem seeded_subtraction_cycle_zeros_avoid (a p : ℕ) (c : ZMod p → Bool)
    (hrec : ∀ n : ZMod p, c n = (!c (n - a) || !c (n - 2 * a) || !c (n - (2 * a + 1)))) :
    ∀ n : ZMod p, c n = false → c (n + a) = true ∧ c (n + 2 * a) = true ∧ c (n + (2 * a + 1)) = true
seeded_subtraction_eventual_period_tail_cycleIn LeanCombinatorial Games

If w is eventually periodic with period p > 0 from index N on, and w obeys the subtraction recursion for n ≥ 2a+1, then there is a threshold m and a cyclic word c : ZMod p → Bool obeying the same recursion on Z/p, with w n = c(n mod p) for all n ≥ m.

theorem seeded_subtraction_eventual_period_tail_cycle (a p N : ℕ) (ha : 1 ≤ a) (hp : 0 < p) (w : ℕ → Bool)
    (hrec : ∀ n, 2 * a + 1 ≤ n → w n = (!w (n - a) || !w (n - 2 * a) || !w (n - (2 * a + 1))))
    (hper : ∀ n, N ≤ n → w (n + p) = w n) :
    ∃ m : ℕ, ∃ c : ZMod p → Bool,
      (∀ n : ZMod p, c n = (!c (n - a) || !c (n - 2 * a) || !c (n - (2 * a + 1)))) ∧
      (∀ n, m ≤ n → w n = c ((n : ℕ) : ZMod p))
seeded_subtraction_least_period_dividesIn LeanCombinatorial Games

For any binary seed of length 2a+1 and any integer a ≥ 1, the least eventual period of the generated subtraction sequence divides 3a or divides 3a + 1.

theorem seeded_subtraction_least_period_divides (a : ℕ) (ha : 1 ≤ a)
    (seed : Fin (2 * a + 1) → Bool) :
    least_eventual_period (seeded_subtraction_seq a seed) ∣ 3 * a ∨
    least_eventual_period (seeded_subtraction_seq a seed) ∣ 3 * a + 1
seeded_subtraction_least_period_leIn LeanCombinatorial Games

For every a ≥ 1 and every binary seed of length 2a+1, the least eventual period of the generated subtraction sequence is at most 3a+1.

theorem seeded_subtraction_least_period_le (a : ℕ) (ha : 1 ≤ a) (seed : Fin (2 * a + 1) → Bool) : least_eventual_period (seeded_subtraction_seq a seed) ≤ 3 * a + 1
seeded_subtraction_seq_stepIn LeanCombinatorial Games

For n ≥ 2a + 1 and a ≥ 1, the seeded subtraction sequence satisfies the recurrence w_n = ¬w_{n-a} ∨ ¬w_{n-2a} ∨ ¬w_{n-(2a+1)}.

theorem seeded_subtraction_seq_step (a : ℕ) (seed : Fin (2 * a + 1) → Bool) (n : ℕ)
    (hn : 2 * a + 1 ≤ n) (ha : 1 ≤ a) :
    seeded_subtraction_seq a seed n =
      (!seeded_subtraction_seq a seed (n - a) ||
       !seeded_subtraction_seq a seed (n - 2 * a) ||
       !seeded_subtraction_seq a seed (n - (2 * a + 1)))
seeded_subtraction_zero_seed_formulaIn LeanCombinatorial Games

For the all-zero seed, the sequence is identically false for n < 2a+1, and for n ≥ 2a+1 alternates between 2a+1 ones and a zeros with period 3a+1.

theorem seeded_subtraction_zero_seed_formula (a : ℕ) (ha : 1 ≤ a) (n : ℕ) :
    seeded_subtraction_seq a (fun _ => false) n =
      if n < 2 * a + 1 then false
      else decide ((n - (2 * a + 1)) % (3 * a + 1) < 2 * a + 1)
slow_exact_nim_followers_eq_empty_of_pos_card_ltIn LeanCombinatorial Games

If the number of positive piles of x is strictly less than k, then slow_exact_nim_followers k n x = ∅.

theorem slow_exact_nim_followers_eq_empty_of_pos_card_lt (k n : ℕ) (x : Fin n → ℕ)
    (h : (Finset.filter (fun i => 0 < x i) Finset.univ).card < k) :
    slow_exact_nim_followers k n x = ∅
slow_exact_nim_grundy_comp_eq_of_geIn LeanCombinatorial Games

For natural numbers k and n, any position x on n piles, and any fuel at least the sum of piles of x, the fuel-bounded Sprague-Grundy value slow_exact_nim_grundy_comp k n fuel x equals slow_exact_nim_grundy k n x.

theorem slow_exact_nim_grundy_comp_eq_of_ge (k n : ℕ) (fuel : ℕ) (x : Fin n → ℕ)
    (hfuel : ∑ i, x i ≤ fuel) :
    slow_exact_nim_grundy_comp k n fuel x = slow_exact_nim_grundy k n x
slow_exact_nim_grundy_comp_eq_zero_of_followers_emptyIn LeanCombinatorial Games

If slow_exact_nim_followers k n x = ∅, then slow_exact_nim_grundy_comp k n fuel x = 0 for any fuel.

theorem slow_exact_nim_grundy_comp_eq_zero_of_followers_empty (k n : ℕ) (fuel : ℕ) (x : Fin n → ℕ)
    (h : slow_exact_nim_followers k n x = ∅) :
    slow_exact_nim_grundy_comp k n fuel x = 0
slow_exact_nim_grundy_comp_witness_twoIn LeanCombinatorial Games

For k ≥ 2 and fuel ≥ 2, slow_exact_nim_grundy_comp k (k+1) fuel (slow_exact_nim_witness_two k) = 2.

theorem slow_exact_nim_grundy_comp_witness_two (k : ℕ) (hk : 2 ≤ k) (fuel : ℕ) (hfuel : 2 ≤ fuel) :
    slow_exact_nim_grundy_comp k (k + 1) fuel (slow_exact_nim_witness_two k) = 2
slow_exact_nim_grundy_eq_finset_mex_followersIn LeanCombinatorial Games

In slow exact k-Nim on n piles with k ≥ 1, the Sprague-Grundy value of any position x equals the mex of the set of Sprague-Grundy values of its legal followers.

theorem slow_exact_nim_grundy_eq_finset_mex_followers (k n : ℕ) (hk : 1 ≤ k) (x : Fin n → ℕ) :
    slow_exact_nim_grundy k n x =
      finset_mex ((slow_exact_nim_followers k n x).image (slow_exact_nim_grundy k n))
slow_exact_nim_grundy_witness_threeIn LeanCombinatorial Games

For k ≥ 2, slow_exact_nim_grundy k (k+1) (slow_exact_nim_witness_three k) = 3.

theorem slow_exact_nim_grundy_witness_three (k : ℕ) (hk : 2 ≤ k) :
    slow_exact_nim_grundy k (k + 1) (slow_exact_nim_witness_three k) = 3
slow_exact_nim_grundy_witness_twoIn LeanCombinatorial Games

For k ≥ 2, slow_exact_nim_grundy k (k+1) (slow_exact_nim_witness_two k) = 2.

theorem slow_exact_nim_grundy_witness_two (k : ℕ) (hk : 2 ≤ k) :
    slow_exact_nim_grundy k (k + 1) (slow_exact_nim_witness_two k) = 2
slow_exact_nim_grundy_witnessesIn LeanCombinatorial Games

For every integer k ≥ 2, the positions (0, ..., 0), (1, ..., 1), slow_exact_nim_witness_two k, and slow_exact_nim_witness_three k have Sprague-Grundy values 0, 1, 2, and 3 respectively in slow exact k-Nim on k+1 piles.

theorem slow_exact_nim_grundy_witnesses (k : ℕ) (hk : 2 ≤ k) :
    slow_exact_nim_grundy k (k + 1) (fun _ => 0) = 0 ∧
    slow_exact_nim_grundy k (k + 1) (fun _ => 1) = 1 ∧
    slow_exact_nim_grundy k (k + 1) (slow_exact_nim_witness_two k) = 2 ∧
    slow_exact_nim_grundy k (k + 1) (slow_exact_nim_witness_three k) = 3
slow_exact_nim_grundy_zero_onesIn LeanCombinatorial Games

For k ≥ 2, slow_exact_nim_grundy k (k+1) (fun _ => 0) = 0 and slow_exact_nim_grundy k (k+1) (fun _ => 1) = 1.

theorem slow_exact_nim_grundy_zero_ones (k : ℕ) (hk : 2 ≤ k) :
    slow_exact_nim_grundy k (k + 1) (fun _ => 0) = 0 ∧
    slow_exact_nim_grundy k (k + 1) (fun _ => 1) = 1
spider_blocked_free_leg_opts_eqIn LeanCombinatorial Games

The option contribution of the free leg (1,free) in (in;{(r,β),(1,free)}) evaluates to the two-element list [spider_rho r outward β, spider_rho_star r β], because ρ(0;δ,free) = 0 and the one-leg sub-states are given by the singleton lemma.

theorem spider_blocked_free_leg_opts_eq (r : ℕ) (beta : SpiderLegEnd) :
    spider_blocked_free_leg_opts r beta
      = [spider_rho r SpiderLegEnd.outward beta, spider_rho_star r beta]
spider_blocked_incoming_one_inwardIn LeanCombinatorial Games

For the configuration κ = (in;{(1,inward)}), the blocked family V^φ_κ(r) of Table 6 is r mod 2 when φ = inward and 1 - r mod 2 when φ = outward, for every r ≥ 1.

theorem spider_blocked_incoming_one_inward (r : ℕ) (hr : 1 ≤ r) (φ : SpiderLegEnd) (hφ : φ ≠ SpiderLegEnd.free) :
    spider_gamma (r + 2) CentreStatus.incoming [(1, SpiderLegEnd.inward), (r, φ)] =
      if φ = SpiderLegEnd.inward then r % 2 else 1 - r % 2
spider_blocked_incoming_one_inward_options_all_eqIn LeanCombinatorial Games

Every option generated by the two-legged spider state [(1, inward), (r, φ)] at fuel r + 2 with centre status incoming equals the bit (if φ = inward then 1 - r % 2 else r % 2), assuming the induction hypothesis for r' < r.

theorem spider_blocked_incoming_one_inward_options_all_eq (r : ℕ) (hr : 1 ≤ r) (φ : SpiderLegEnd) (hφ : φ ≠ SpiderLegEnd.free)
    (ih : ∀ r' < r, 1 ≤ r' → ∀ φ' ≠ SpiderLegEnd.free, spider_gamma (r' + 2) CentreStatus.incoming [(1, SpiderLegEnd.inward), (r', φ')] = (if φ' = SpiderLegEnd.inward then r' % 2 else 1 - r' % 2))
    (x : ℕ) (hx : x ∈ ([(1, SpiderLegEnd.inward), (r, φ)].zipIdx.flatMap (fun ⟨⟨h, phi⟩, idx⟩ =>
      let rest := [(1, SpiderLegEnd.inward), (r, φ)].eraseIdx idx
      (List.range h).flatMap (fun j_zero =>
        let j := j_zero + 1
        [SpiderLegEnd.inward, SpiderLegEnd.outward].filterMap (fun delta =>
          if j == h ∧ phi ≠ SpiderLegEnd.free ∧ delta ≠ phi then none
          else
            let d := spider_rho (h - j) delta phi
            if j ≥ 2 then
              let new_L := (j - 1, delta) :: rest
              some (d ^^^ spider_gamma (r + 1) CentreStatus.incoming new_L)
            else
              let new_s := spider_update_centre CentreStatus.incoming delta
              some (d ^^^ spider_gamma (r + 1) new_s rest)
        )
      )
    ))) :
    x = if φ = SpiderLegEnd.inward then 1 - r % 2 else r % 2
spider_blocked_leg0_opts_eqIn LeanCombinatorial Games

For r ≥ 2, β ≠ free, assuming the closed form at all smaller leg lengths, the options generated by cuts of the blocked leg (r,β) in (in;{(r,β),(1,free)}) evaluate to the range-block of spider_blocked_optionvals followed by the single end-cut term ρ(0;β,β) xor spider_blocked_val β (r-1).

theorem spider_blocked_leg0_opts_eq (r : ℕ) (hr : 2 ≤ r) (beta : SpiderLegEnd)
    (hβ : beta ≠ SpiderLegEnd.free)
    (ih : ∀ r' < r, 1 ≤ r' → ∀ β' ≠ SpiderLegEnd.free,
      spider_gamma (r' + 2) CentreStatus.incoming [(r', β'), (1, SpiderLegEnd.free)]
        = spider_blocked_val β' r') :
    spider_blocked_leg0_opts r beta
      = (List.range (r - 1)).flatMap (fun idx =>
          let j := idx + 1
          [SpiderLegEnd.inward, SpiderLegEnd.outward].map
            (fun delta => spider_rho (r - j) delta beta ^^^ spider_blocked_val delta (j - 1)))
        ++ [spider_rho 0 beta beta ^^^ spider_blocked_val beta (r - 1)]
spider_blocked_none_one_inward_one_inwardIn LeanCombinatorial Games

For the configuration κ = (none;{(1,inward),(1,inward)}), the blocked family V^φ_κ(r) of Table 6 equals 1 - r mod 2 when φ = inward and r mod 2 when φ = outward, for every r ≥ 1.

theorem spider_blocked_none_one_inward_one_inward (r : ℕ) (hr : 1 ≤ r) (φ : SpiderLegEnd) (hφ : φ ≠ SpiderLegEnd.free) :
    spider_gamma (r + 3) CentreStatus.none [(1, SpiderLegEnd.inward), (1, SpiderLegEnd.inward), (r, φ)] =
      if φ = SpiderLegEnd.inward then 1 - r % 2 else r % 2
spider_blocked_none_one_outward_one_outwardIn LeanCombinatorial Games

For the configuration κ = (none;{(1,outward),(1,outward)}), the blocked family V^φ_κ(r) of Table 6 equals r mod 2 when φ = inward and 1 - r mod 2 when φ = outward, for every r ≥ 1.

theorem spider_blocked_none_one_outward_one_outward (r : ℕ) (hr : 1 ≤ r) (φ : SpiderLegEnd) (hφ : φ ≠ SpiderLegEnd.free) :
    spider_gamma (r + 3) CentreStatus.none [(1, SpiderLegEnd.outward), (1, SpiderLegEnd.outward), (r, φ)] =
      if φ = SpiderLegEnd.inward then r % 2 else 1 - r % 2
spider_blocked_options_closed_formIn LeanCombinatorial Games

For r ≥ 2 and β ≠ free, assuming the closed form at all smaller leg lengths, spider_gamma (r+2) incoming [(r,β),(1,free)] equals nat_mex_list (spider_blocked_optionvals r β).

theorem spider_blocked_options_closed_form (r : ℕ) (hr : 2 ≤ r) (beta : SpiderLegEnd)
    (hβ : beta ≠ SpiderLegEnd.free)
    (ih : ∀ r' < r, 1 ≤ r' → ∀ β' ≠ SpiderLegEnd.free,
      spider_gamma (r' + 2) CentreStatus.incoming [(r', β'), (1, SpiderLegEnd.free)]
        = spider_blocked_val β' r') :
    spider_gamma (r + 2) CentreStatus.incoming [(r, beta), (1, SpiderLegEnd.free)]
      = nat_mex_list (spider_blocked_optionvals r beta)
spider_blocked_raw_mex_eqIn LeanCombinatorial Games

The Grundy value of the state (in;{(r,β),(1,free)}) at fuel r+2 equals the mex of the raw option list spider_blocked_raw_opts r β.

theorem spider_blocked_raw_mex_eq (r : ℕ) (beta : SpiderLegEnd) :
    spider_gamma (r + 2) CentreStatus.incoming [(r, beta), (1, SpiderLegEnd.free)]
      = nat_mex_list (spider_blocked_raw_opts r beta)
spider_blocked_raw_opts_eqIn LeanCombinatorial Games

For r ≥ 2 and β ≠ free, assuming the closed form at all smaller leg lengths, the raw option list of the state (in;{(r,β),(1,free)}) at fuel r+2 is literally the list spider_blocked_optionvals r β (list equality, not mere membership).

theorem spider_blocked_raw_opts_eq (r : ℕ) (hr : 2 ≤ r) (beta : SpiderLegEnd)
    (hβ : beta ≠ SpiderLegEnd.free)
    (ih : ∀ r' < r, 1 ≤ r' → ∀ β' ≠ SpiderLegEnd.free,
      spider_gamma (r' + 2) CentreStatus.incoming [(r', β'), (1, SpiderLegEnd.free)]
        = spider_blocked_val β' r') :
    spider_blocked_raw_opts r beta = spider_blocked_optionvals r beta
spider_blocked_type_p_none_boundedIn LeanCombinatorial Games

For each of the twelve reachable configurations κ = (none;K) whose two attached legs K are listed (the type-P configurations with free centre of the paper's Table 6), every blocked family V^φ_κ(r) with φ ≠ free and r ≥ 1 has value at most 7.

theorem spider_blocked_type_p_none_bounded (r : ℕ) (hr : 1 ≤ r) (φ : SpiderLegEnd) (hφ : φ ≠ SpiderLegEnd.free)
    (K : List (ℕ × SpiderLegEnd))
    (hK : K = [(2, SpiderLegEnd.free), (1, SpiderLegEnd.inward)] ∨
      K = [(2, SpiderLegEnd.free), (1, SpiderLegEnd.outward)] ∨
      K = [(2, SpiderLegEnd.free), (2, SpiderLegEnd.inward)] ∨
      K = [(2, SpiderLegEnd.free), (2, SpiderLegEnd.outward)] ∨
      K = [(1, SpiderLegEnd.inward), (3, SpiderLegEnd.free)] ∨
      K = [(1, SpiderLegEnd.outward), (3, SpiderLegEnd.free)] ∨
      K = [(1, SpiderLegEnd.inward), (1, SpiderLegEnd.inward)] ∨
      K = [(1, SpiderLegEnd.outward), (1, SpiderLegEnd.outward)] ∨
      K = [(1, SpiderLegEnd.inward), (2, SpiderLegEnd.inward)] ∨
      K = [(1, SpiderLegEnd.inward), (2, SpiderLegEnd.outward)] ∨
      K = [(1, SpiderLegEnd.outward), (2, SpiderLegEnd.inward)] ∨
      K = [(1, SpiderLegEnd.outward), (2, SpiderLegEnd.outward)]) :
    spider_gamma ((K.map Prod.fst).sum + r + 1) CentreStatus.none (K ++ [(r, φ)]) ≤ 7
spider_blocked_val_zeroIn LeanCombinatorial Games

For δ = inward or outward, the closed form spider_blocked_val δ 0 equals 1.

theorem spider_blocked_val_zero (delta : SpiderLegEnd) (h : delta ≠ SpiderLegEnd.free) :
    spider_blocked_val delta 0 = 1
spider_eventual_parity_two_three_option_analysisIn LeanCombinatorial Games

For z ≥ 14 the main state's option set meets {0,1} exactly as the parity decision requires: if z is even, neither 0 nor 1 is an option and the mex is 0; if z is odd, 0 is an option and 1 is not, so the mex is 1.

theorem spider_eventual_parity_two_three_option_analysis (z : ℕ) (hz : 14 ≤ z) :
    (z % 2 = 0 →
      spider_gamma (z + 6) CentreStatus.none
        [(2, SpiderLegEnd.free), (3, SpiderLegEnd.free), (z, SpiderLegEnd.free)] = 0) ∧
    (z % 2 = 1 →
      spider_gamma (z + 6) CentreStatus.none
        [(2, SpiderLegEnd.free), (3, SpiderLegEnd.free), (z, SpiderLegEnd.free)] = 1)
spider_free_family_bounds_fourIn LeanCombinatorial Games

For every level h ≥ 14, the free families V^*_{(i;{2^*})}(h) and V^*_{(o;{2^*})}(h) are at least 4; in particular they are not 2 and not 3.

theorem spider_free_family_bounds_four (h : ℕ) (hh : 14 ≤ h) :
    spider_gamma (h + 3) CentreStatus.incoming [(2, SpiderLegEnd.free), (h, SpiderLegEnd.free)] ≥ 4 ∧
    spider_gamma (h + 3) CentreStatus.outgoing [(2, SpiderLegEnd.free), (h, SpiderLegEnd.free)] ≥ 4
spider_free_family_bounds_twoIn LeanCombinatorial Games

For every level h ≥ 14, the free families V^*_σ(h) for σ = (i;{3^*}), (o;{3^*}), (n;{1^in,3^*}), (n;{1^out,3^*}), (n;{1^in,2^*}), (n;{1^out,2^*}), (n;{2^in,2^*}), (n;{2^out,2^*}) are all at least 2.

theorem spider_free_family_bounds_two (h : ℕ) (hh : 14 ≤ h) :
    spider_gamma (h + 4) CentreStatus.incoming [(3, SpiderLegEnd.free), (h, SpiderLegEnd.free)] ≥ 2 ∧
    spider_gamma (h + 4) CentreStatus.outgoing [(3, SpiderLegEnd.free), (h, SpiderLegEnd.free)] ≥ 2 ∧
    spider_gamma (h + 5) CentreStatus.none
      [(1, SpiderLegEnd.inward), (3, SpiderLegEnd.free), (h, SpiderLegEnd.free)] ≥ 2 ∧
    spider_gamma (h + 5) CentreStatus.none
      [(1, SpiderLegEnd.outward), (3, SpiderLegEnd.free), (h, SpiderLegEnd.free)] ≥ 2 ∧
    spider_gamma (h + 4) CentreStatus.none
      [(1, SpiderLegEnd.inward), (2, SpiderLegEnd.free), (h, SpiderLegEnd.free)] ≥ 2 ∧
    spider_gamma (h + 4) CentreStatus.none
      [(1, SpiderLegEnd.outward), (2, SpiderLegEnd.free), (h, SpiderLegEnd.free)] ≥ 2 ∧
    spider_gamma (h + 5) CentreStatus.none
      [(2, SpiderLegEnd.inward), (2, SpiderLegEnd.free), (h, SpiderLegEnd.free)] ≥ 2 ∧
    spider_gamma (h + 5) CentreStatus.none
      [(2, SpiderLegEnd.outward), (2, SpiderLegEnd.free), (h, SpiderLegEnd.free)] ≥ 2
spider_gamma_singleton_valIn LeanCombinatorial Games

For a one-legged state, the Grundy value at any successor fuel is determined by the centre status: incoming gives spider_rho h outward φ, outgoing gives spider_rho h inward φ, and free gives spider_rho_star h φ.

theorem spider_gamma_singleton_val (F h : ℕ) (phi : SpiderLegEnd) :
    spider_gamma (F + 1) CentreStatus.incoming [(h, phi)] = spider_rho h SpiderLegEnd.outward phi ∧
    spider_gamma (F + 1) CentreStatus.outgoing [(h, phi)] = spider_rho h SpiderLegEnd.inward phi ∧
    spider_gamma (F + 1) CentreStatus.free [(h, phi)] = spider_rho_star h phi
spider_has_eventual_parity_one_oddIn LeanCombinatorial Games

For every odd natural number y, the spider pair (1, y) has eventual parity: there exists z₀ such that for all z ≥ z₀, the Grundy value spider_grundy_val 1 y z is equal to z % 2.

theorem spider_has_eventual_parity_one_odd (y : ℕ) (hy : Odd y) : spider_has_eventual_parity 1 y
spider_has_eventual_parity_twinsIn LeanCombinatorial Games

For every positive integer x, the twin-legged spider pair (x, x) has eventual parity: there exists z₀ such that for all z ≥ z₀, the Grundy value spider_grundy_val x x z is equal to z % 2.

theorem spider_has_eventual_parity_twins (x : ℕ) (hx : 1 ≤ x) : spider_has_eventual_parity x x
spider_has_eventual_parity_two_le_ltIn LeanCombinatorial Games

For all natural numbers x and y with 2 ≤ x and x < y, the spider pair (x, y) has eventual parity: there exists z₀ such that for all z ≥ z₀, the Grundy value spider_grundy_val x y z is equal to z % 2.

theorem spider_has_eventual_parity_two_le_lt (x y : ℕ) (hx : 2 ≤ x) (hxy : x < y) : spider_has_eventual_parity x y
spider_three_leg_one_shortIn LeanCombinatorial Games

With free centre, one short leg of length 1 whose far end is blocked (δ inward or outward), together with the two free legs 1 and k, has value k for odd k and k-2 for even k, i.e. k - 2*(1 - k%2). This supplies the "c"-options of the root.

theorem spider_three_leg_one_short (k : ℕ) (δ : SpiderLegEnd)
    (hδ : δ = SpiderLegEnd.inward ∨ δ = SpiderLegEnd.outward) :
    spider_gamma (k + 3) CentreStatus.none
      [(1, δ), (1, SpiderLegEnd.free), (k, SpiderLegEnd.free)] = k - 2 * (1 - k % 2)
spider_two_leg_blocked_incoming_inward_valIn LeanCombinatorial Games

For incoming centre status and inward end condition on the blocked leg of length r, the Grundy value at canonical fuel r + 2 with a free leg of length 1 equals r - 1 if r % 4 = 3, and r + 1 otherwise.

theorem spider_two_leg_blocked_incoming_inward_val (r : ℕ) :
    spider_gamma (r + 2) CentreStatus.incoming [(r, SpiderLegEnd.inward), (1, SpiderLegEnd.free)] =
      if r % 4 = 3 then r - 1 else r + 1
spider_two_leg_blocked_incoming_outward_valIn LeanCombinatorial Games

For incoming centre status and outward end condition on the blocked leg of length r, the Grundy value at canonical fuel r + 2 with a free leg of length 1 equals r - 1 if r % 4 = 1, and r + 1 otherwise.

theorem spider_two_leg_blocked_incoming_outward_val (r : ℕ) :
    spider_gamma (r + 2) CentreStatus.incoming [(r, SpiderLegEnd.outward), (1, SpiderLegEnd.free)] =
      if r % 4 = 1 then r - 1 else r + 1
spider_two_leg_blocked_incoming_valIn LeanCombinatorial Games

For incoming centre status and canonical fuel r + 2, a blocked leg of length r with end condition inward has Grundy value r - 1 if r % 4 = 3 and r + 1 otherwise; with end condition outward it has Grundy value r - 1 if r % 4 = 1 and r + 1 otherwise.

theorem spider_two_leg_blocked_incoming_val (r : ℕ) :
    spider_gamma (r + 2) CentreStatus.incoming [(r, SpiderLegEnd.inward), (1, SpiderLegEnd.free)] =
      (if r % 4 = 3 then r - 1 else r + 1) ∧
    spider_gamma (r + 2) CentreStatus.incoming [(r, SpiderLegEnd.outward), (1, SpiderLegEnd.free)] =
      (if r % 4 = 1 then r - 1 else r + 1)
spider_two_leg_blocked_one_free_parityIn LeanCombinatorial Games

For incoming or outgoing centre, a blocked leg of length r with end condition inward or outward together with a free leg of length 1 has Grundy value of parity (r + 1) % 2 for any fuel at least r + 2.

theorem spider_two_leg_blocked_one_free_parity (F r : ℕ) (s : CentreStatus) (δ : SpiderLegEnd)
    (hs : s = CentreStatus.incoming ∨ s = CentreStatus.outgoing)
    (hδ : δ = SpiderLegEnd.inward ∨ δ = SpiderLegEnd.outward)
    (hF : r + 2 ≤ F) :
    spider_gamma F s [(r, δ), (1, SpiderLegEnd.free)] % 2 = (r + 1) % 2
spider_two_leg_free_freeIn LeanCombinatorial Games

For incoming or outgoing centre, the two free legs 2 and k give Grundy value k for odd k and k-2 for even k, i.e. k - 2*(1 - k%2), for any fuel at least k+3.

theorem spider_two_leg_free_free (F k : ℕ) (s : CentreStatus)
    (hs : s = CentreStatus.incoming ∨ s = CentreStatus.outgoing) (hk : k + 3 ≤ F) :
    spider_gamma F s [(2, SpiderLegEnd.free), (k, SpiderLegEnd.free)] = k - 2 * (1 - k % 2)
spider_two_leg_one_freeIn LeanCombinatorial Games

For incoming or outgoing centre, the two free legs 1 and k give Grundy value 1 - k%2 (i.e. (k+1) mod 2), for any fuel at least k+2. This is paper Lemma 9.4's Γ(i;(1,*),(i,*)) = (i+1) mod 2.

theorem spider_two_leg_one_free (F k : ℕ) (s : CentreStatus)
    (hs : s = CentreStatus.incoming ∨ s = CentreStatus.outgoing) (hk : k + 2 ≤ F) :
    spider_gamma F s [(1, SpiderLegEnd.free), (k, SpiderLegEnd.free)] = 1 - k % 2
stein_number_count_le_pow_three_quartersIn LeanCombinatorial Games

The number of E. P. Stein numbers up to Z is O(Z^{3/4}).

theorem stein_number_count_le_pow_three_quarters :
    ∃ C : ℝ, 0 < C ∧ ∀ Z : ℕ,
      (Set.ncard ({n : ℕ | is_stein_number n} ∩ Set.Iic Z) : ℝ) ≤
        C * ((Z : ℝ) + 1) ^ ((3 : ℝ) / 4)
stein_number_parameterization_bijectiveIn LeanCombinatorial Games

The map sending (d, u, v) to d^2 * (u^4 + 4 * v^4) is a bijection (Set.BijOn) from stein_param_set to the set of natural numbers satisfying is_stein_number.

theorem stein_number_parameterization_bijective :
    Set.BijOn (fun (d, u, v) => d^2 * (u^4 + 4 * v^4)) stein_param_set {n | is_stein_number n}
stein_param_surj_onIn LeanCombinatorial Games

The map sending (d, u, v) to d^2 * (u^4 + 4 * v^4) maps stein_param_set surjectively onto the set of natural numbers satisfying is_stein_number.

theorem stein_param_surj_on :
    Set.SurjOn (fun (d, u, v) => d^2 * (u^4 + 4 * v^4)) stein_param_set {n | is_stein_number n}
stein_pell_unit_step_primitive_normIn LeanCombinatorial Games

For natural parameters u and v, the unit step (u,v) -> (u+2v,u+v) preserves coprimality and the parity of u and reverses the sign of u squared minus twice v squared.

theorem stein_pell_unit_step_primitive_norm (u v : ℕ) : (Nat.Coprime (u + 2 * v) (u + v) ↔ Nat.Coprime u v) ∧ ((u + 2 * v) % 2 = u % 2) ∧ (((u : ℤ) + 2 * (v : ℤ)) ^ 2 - 2 * ((u : ℤ) + (v : ℤ)) ^ 2 = -((u : ℤ) ^ 2 - 2 * (v : ℤ) ^ 2))
stein_periodic_fluctuation_nonconstantIn LeanCombinatorial Games

Any function F : ℝ → ℝ that approximates stein_residual Y with log-period pell_unit_squared along Filter.atTop must be nonconstant.

theorem stein_periodic_fluctuation_nonconstant (F : ℝ → ℝ)
    (h_lim : Filter.Tendsto (fun Y : ℝ => stein_residual Y - F (Real.log Y / Real.log pell_unit_squared))
      Filter.atTop (nhds 0)) :
    ∃ s t : ℝ, F s ≠ F t
stein_residual_converges_to_periodic_limitIn LeanCombinatorial Games

There exists a continuous 1-periodic function F : ℝ → ℝ such that stein_residual Y - F(log Y / log pell_unit_squared) tends to 0 along Filter.atTop.

theorem stein_residual_converges_to_periodic_limit :
    ∃ F : ℝ → ℝ, Continuous F ∧ Function.Periodic F 1 ∧
      Filter.Tendsto (fun Y : ℝ => stein_residual Y - F (Real.log Y / Real.log pell_unit_squared))
        Filter.atTop (nhds 0)
three_by_cycle_torus_moving_target_accuracy_le_sevenIn LeanCombinatorial Games

For any integer n ≥ 5, there exists an adaptive search strategy for a moving target on the 3-by-n torus C_3 □ C_n achieving accuracy at most 7 starting from the set of all vertices.

theorem three_by_cycle_torus_moving_target_accuracy_le_seven (n : ℕ) (hn : 5 ≤ n) :
    ∃ S : MovingTargetStrategy (Fin 3 × Fin n),
      moving_target_strategy_successful (torus_graph 3 n) 7 S Finset.univ
three_by_cycle_torus_neighborhood_expansionIn LeanCombinatorial Games

On the 3-by-n torus graph C_3 □ C_n for every n ≥ 3, every subset D of vertices with |D| ≥ min 7 ((3*n+1)/2) satisfies 2 * min 7 ((3*n+1)/2) ≤ |closed_neighborhood D| + 1.

theorem three_by_cycle_torus_neighborhood_expansion (n : ℕ) (hn : 3 ≤ n) (D : Finset (Fin 3 × Fin n)) :
    min 7 ((3 * n + 1) / 2) ≤ D.card →
    2 * min 7 ((3 * n + 1) / 2) ≤ (closed_neighborhood (torus_graph 3 n) D).card + 1
three_row_arithmeticIn LeanCombinatorial Games

Arithmetic core: for three row sizes a, b, c ≤ n with n ≥ 5 and a + b + c ≥ 7, the sum over the three rows of max(adjacent row sizes, (own size = 0 ? 0 : min n (own size + 2))) is at least 13.

theorem three_row_arithmetic (n a b c : ℕ) (hn : 5 ≤ n) (ha : a ≤ n) (hb : b ≤ n) (hc : c ≤ n) (h : 7 ≤ a + b + c) : 13 ≤ max (max b c) (if a = 0 then 0 else min n (a + 2)) + max (max a c) (if b = 0 then 0 else min n (b + 2)) + max (max a b) (if c = 0 then 0 else min n (c + 2))
torus_arc_cardIn LeanCombinatorial Games

A column arc of width L ≤ n has exactly 3L vertices: the L columns (a+i) mod n, i < L, are distinct.

theorem torus_arc_card (n : ℕ) (hn : 5 ≤ n) (a L : ℕ) (hL : L ≤ n) : (torusArc n a L).card = 3 * L
torus_arc_neighborhood_subsetIn LeanCombinatorial Games

The closed neighbourhood of a width-L column arc is contained in the width-(min n (L+2)) arc starting one column earlier: after the target moves it can only occupy the arc itself plus the two adjacent columns (all columns once L+2 ≥ n).

theorem torus_arc_neighborhood_subset (n : ℕ) (hn : 5 ≤ n) (a L : ℕ) (hL : L ≤ n) : closed_neighborhood (torus_graph 3 n) (torusArc n a L) ⊆ torusArc n (a + n - 1) (min n (L + 2))
torus_arc_univIn LeanCombinatorial Games

The full width-n column arc covers every column, hence the whole vertex set.

theorem torus_arc_univ (n : ℕ) (hn : 5 ≤ n) (a : ℕ) : torusArc n a n = Finset.univ
torus_arc_winnableIn LeanCombinatorial Games

On the 3-by-n torus with n ≥ 5, every column arc of width L ≤ n is winnable with accuracy 7.

theorem torus_arc_winnable (n : ℕ) (hn : 5 ≤ n) (a L : ℕ) (hL : L ≤ n) : ∃ S : MovingTargetStrategy (Fin 3 × Fin n), moving_target_strategy_successful (torus_graph 3 n) 7 S (torusArc n a L)
torus_neighborhood_card_ge_elevenIn LeanCombinatorial Games

On the 3-by-4 torus, every set D of at least 6 vertices has a closed neighbourhood of at least 11 vertices.

theorem torus_neighborhood_card_ge_eleven (D : Finset (Fin 3 × Fin 4)) (hD : 6 ≤ D.card) : 11 ≤ (closed_neighborhood (torus_graph 3 4) D).card
torus_neighborhood_card_ge_nineIn LeanCombinatorial Games

On the 3-by-3 torus, every set D of at least 5 vertices has closed neighbourhood equal to the whole vertex set (9 vertices).

theorem torus_neighborhood_card_ge_nine (D : Finset (Fin 3 × Fin 3)) (hD : 5 ≤ D.card) : 9 ≤ (closed_neighborhood (torus_graph 3 3) D).card
torus_neighborhood_card_ge_thirteenIn LeanCombinatorial Games

On the 3-by-n torus with n ≥ 5, every set D of at least 7 vertices has a closed neighbourhood of at least 13 vertices.

theorem torus_neighborhood_card_ge_thirteen (n : ℕ) (hn : 5 ≤ n) (D : Finset (Fin 3 × Fin n)) (hD : 7 ≤ D.card) : 13 ≤ (closed_neighborhood (torus_graph 3 n) D).card
torus_neighborhood_card_rowsIn LeanCombinatorial Games

The closed neighbourhood of D on the 3-by-n torus has at least, summed over the three rows r, the maximum of (i) the number of D-vertices in the two adjacent rows and (ii) the row-wise closed neighbourhood in C_n of the set of columns occupied in row r.

theorem torus_neighborhood_card_rows (n : ℕ) (hn : 5 ≤ n) (D : Finset (Fin 3 × Fin n)) : (closed_neighborhood (torus_graph 3 n) D).card ≥ ∑ r : Fin 3, max (max ((D.filter (fun v => v.1 = r - 1)).card) ((D.filter (fun v => v.1 = r + 1)).card)) ((closed_neighborhood (SimpleGraph.cycleGraph n) ((D.filter (fun v => v.1 = r)).image (fun v => v.2))).card)
word_subtraction_N_iff_existsIn LeanCombinatorial Games

Recursion characterisation of winning positions: w is winning iff it splits as u ++ s with s in S and u not winning.

theorem word_subtraction_N_iff_exists {α : Type*} (S : Finset (List α)) (hne : ∀ s ∈ S, s ≠ []) (w : List α) :
    w ∈ word_subtraction_N S ↔ ∃ s ∈ S, ∃ u : List α, w = u ++ s ∧ u ∉ word_subtraction_N S
word_subtraction_N_length_oneIn LeanCombinatorial Games

A single-letter word [a] is in word_subtraction_N S if and only if [a] ∈ S.

theorem word_subtraction_N_length_one {α : Type*} (S : Finset (List α)) (hne : ∀ s ∈ S, s ≠ []) (a : α) : [a] ∈ word_subtraction_N S ↔ [a] ∈ S
word_subtraction_N_nilIn LeanCombinatorial Games

The empty word has no legal moves in normal play with nonempty subtraction set S, hence [] ∉ word_subtraction_N S.

theorem word_subtraction_N_nil {α : Type*} (S : Finset (List α)) (hne : ∀ s ∈ S, s ≠ []) : ([] : List α) ∉ word_subtraction_N S
word_subtraction_N_nil_not_memIn LeanCombinatorial Games

The empty word is a P-position: the empty word is not in word_subtraction_N S.

theorem word_subtraction_N_nil_not_mem {α : Type*} (S : Finset (List α)) :
    ([] : List α) ∉ word_subtraction_N S
word_subtraction_N_not_mem_of_length_ltIn LeanCombinatorial Games

If every word in the subtraction set S has length at least ℓ, then every word shorter than ℓ is a P-position, i.e. not in word_subtraction_N S.

theorem word_subtraction_N_not_mem_of_length_lt {α : Type*} (S : Finset (List α)) (ℓ : ℕ)
    (hℓ : ∀ s ∈ S, ℓ ≤ s.length) {w : List α} (hw : w.length < ℓ) : w ∉ word_subtraction_N S
word_subtraction_buffer_appendIn LeanCombinatorial Games

The reverse window of w ++ [c] is obtained by putting c at index 0 and moving the i-th entry of the reverse window of w to index i+1.

theorem word_subtraction_buffer_append {α : Type*} (n : ℕ) (w : List α) (c : α) (i : Fin n) :
    word_subtraction_buffer n (w ++ [c]) i =
      (if (i : ℕ) = 0 then some c
        else word_subtraction_buffer n w ⟨(i : ℕ) - 1, by have := i.isLt; omega⟩)
word_subtraction_dfa_existsIn LeanCombinatorial Games

There exists a DFA M on a finite state set σ recognizing word_subtraction_N S whose state count is exactly the sum over n from 0 to ℓ - 1 of 2^(n + 1) * |α|^n.

theorem word_subtraction_dfa_exists (α : Type*) [Fintype α] (S : Finset (List α)) (hS : S.Nonempty) (hne : ∀ s ∈ S, s ≠ []) : ∃ (σ : Type) (_ : Fintype σ) (M : DFA α σ), Fintype.card σ = ∑ n ∈ Finset.range (S.sup List.length), 2 ^ (n + 1) * (Fintype.card α) ^ n ∧ M.accepts = word_subtraction_N S
word_subtraction_dfa_state_cardIn LeanCombinatorial Games

The cardinality of the disjoint union state space Σ n : Fin ℓ, (Fin n → α) × (Fin (n + 1) → Bool) equals the sum over n from 0 to ℓ - 1 of 2^(n + 1) * |α|^n.

theorem word_subtraction_dfa_state_card (α : Type*) [Fintype α] (ℓ : ℕ) : Fintype.card (Σ n : Fin ℓ, (Fin (n : ℕ) → α) × (Fin ((n : ℕ) + 1) → Bool)) = ∑ n ∈ Finset.range ℓ, 2 ^ (n + 1) * (Fintype.card α) ^ n
word_subtraction_dfa_state_complexity_le_oneIn LeanCombinatorial Games

For any finite alphabet α and nonempty subtraction set S of nonempty words with maximum length at most 1, the deterministic state complexity of word_subtraction_N S is at most 2.

theorem word_subtraction_dfa_state_complexity_le_one {α : Type*} [Fintype α] (S : Finset (List α)) (hS : S.Nonempty) (hne : ∀ s ∈ S, s ≠ []) (hℓ : S.sup List.length ≤ 1) : dfa_state_complexity (word_subtraction_N S) ≤ 2
word_subtraction_foldl_invIn LeanCombinatorial Games

Folding the transition over the letters of w from the start state yields a state correct for w.

theorem word_subtraction_foldl_inv {α : Type*} (S : Finset (List α)) (n : ℕ)
    (hn : ∀ s ∈ S, s.length ≤ n) (hne : ∀ s ∈ S, s ≠ []) (w : List α) :
    word_subtraction_inv S n w
      (w.foldl (fun st c => word_subtraction_step S n hn st c) (word_subtraction_start n))
word_subtraction_language_N_iff_existsIn LeanCombinatorial Games

For a subtraction set S containing only nonempty words, a word w is an N-position in the word subtraction game if and only if there exist a word s in S and a prefix u such that w = u ++ s and u is not an N-position.

theorem word_subtraction_language_N_iff_exists {α : Type*} (S : Language α)
    (hne : ∀ s ∈ S, s ≠ []) (w : List α) :
    w ∈ word_subtraction_language_N S ↔
      ∃ s ∈ S, ∃ u : List α, w = u ++ s ∧ u ∉ word_subtraction_language_N S
word_subtraction_language_N_nilIn LeanCombinatorial Games

The empty word is not an N-position in the word subtraction game with subtraction set S.

theorem word_subtraction_language_N_nil {α : Type*} (S : Language α) :
    ([] : List α) ∉ word_subtraction_language_N S
word_subtraction_regular_language_is_regularIn LeanCombinatorial Games

Let Σ be an alphabet and S ⊆ Σ⁺ be a regular language (so every word in S is nonempty). Then, the N-position language word_subtraction_language_N S of the word subtraction game with subtraction set S is regular.

theorem word_subtraction_regular_language_is_regular {α : Type*}
    (S : Language α) (hne : ∀ s ∈ S, s ≠ []) (hreg : S.IsRegular) :
    (word_subtraction_language_N S).IsRegular
word_subtraction_regular_language_p_positions_is_regularIn LeanCombinatorial Games

Let Σ be an alphabet and S ⊆ Σ⁺ be a regular language (so every word in S is nonempty). Then, the P-position language (the complement of the N-position language) of the word subtraction game with subtraction set S is regular.

theorem word_subtraction_regular_language_p_positions_is_regular {α : Type*}
    (S : Language α) (hne : ∀ s ∈ S, s ≠ []) (hreg : S.IsRegular) :
    (word_subtraction_language_N S)ᶜ.IsRegular
word_subtraction_start_invIn LeanCombinatorial Games

The start state (empty buffer, bits true exactly from index 1 on) is correct for the empty word.

theorem word_subtraction_start_inv {α : Type*} (S : Finset (List α)) (n : ℕ) :
    word_subtraction_inv S n [] (word_subtraction_start n)
word_subtraction_step_invIn LeanCombinatorial Games

If the state is correct for w, then the transition on the letter c yields a state correct for w ++ [c].

theorem word_subtraction_step_inv {α : Type*} (S : Finset (List α)) (n : ℕ)
    (hn : ∀ s ∈ S, s.length ≤ n) (hne : ∀ s ∈ S, s ≠ []) (w : List α) (c : α)
    (st : (Fin n → Option α) × (Fin (n + 1) → Bool)) (hinv : word_subtraction_inv S n w st) :
    word_subtraction_inv S n (w ++ [c]) (word_subtraction_step S n hn st c)
word_subtraction_step_snd_succIn LeanCombinatorial Games

After reading c, the bit at index j+1 equals the previous bit j, which is correct for the longer word.

theorem word_subtraction_step_snd_succ {α : Type*} (S : Finset (List α)) (n : ℕ)
    (hn : ∀ s ∈ S, s.length ≤ n) (w : List α) (c : α) (j : Fin n)
    (st : (Fin n → Option α) × (Fin (n + 1) → Bool)) (hinv : word_subtraction_inv S n w st) :
    (word_subtraction_step S n hn st c).2 ⟨(j : ℕ) + 1, by have := j.isLt; omega⟩ = true ↔
      (((j : ℕ) + 1) > (w ++ [c]).length ∨
        (w ++ [c]).take ((w ++ [c]).length - ((j : ℕ) + 1)) ∈ word_subtraction_N S)
word_subtraction_step_snd_zeroIn LeanCombinatorial Games

After a step, bit 0 is true iff the extended word w ++ [c] is a winning position.

theorem word_subtraction_step_snd_zero {α : Type*} (S : Finset (List α)) (n : ℕ)
    (hn : ∀ s ∈ S, s.length ≤ n) (hne : ∀ s ∈ S, s ≠ []) (w : List α) (c : α)
    (st : (Fin n → Option α) × (Fin (n + 1) → Bool)) (hinv : word_subtraction_inv S n w st) :
    (word_subtraction_step S n hn st c).2 ⟨0, Nat.succ_pos n⟩ = true ↔ w ++ [c] ∈ word_subtraction_N S
chordal_exists_clique_separatorIn LeanEquilibria in Games

A finite chordal graph that is not a clique can be written as the union of two proper parts A and B whose intersection C is a clique, such that every edge of G has both endpoints in A or both endpoints in B.

theorem chordal_exists_clique_separator {V : Type} [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (h : is_chordal G)
    (hne : ¬ G.IsClique (Set.univ : Set V)) :
    ∃ (A B C : Set V), A ∪ B = Set.univ ∧ A ∩ B = C ∧ G.IsClique C ∧
      A ≠ Set.univ ∧ B ≠ Set.univ ∧
      ∀ a b : V, G.Adj a b → (a ∈ A ∧ b ∈ A) ∨ (a ∈ B ∧ b ∈ B)
chordal_induceIn LeanEquilibria in Games

Every induced subgraph of a chordal graph is chordal: if a cycle graph embeds induced into the induced subgraph on a set s, then composing with the induced embedding of G.induce s into G gives an induced embedding into G, contradicting chordality of G.

theorem chordal_induce {V : Type} (G : SimpleGraph V) (h : is_chordal G) (s : Set V) :
    is_chordal (G.induce s)
chordal_maxcut_boundary_strongIn LeanEquilibria in Games

Let G be a finite chordal graph, k ≥ 3, K a clique, β a colouring of V and σ a colouring with σ = β on K that is optimal among all colourings agreeing with β on K. Then no nonempty coalition S disjoint from K has a strong deviation from σ.

theorem chordal_maxcut_boundary_strong {V : Type} [Fintype V] (G : SimpleGraph V)
    [DecidableRel G.Adj] (k : ℕ) (hchord : is_chordal G) (hk : 3 ≤ k)
    (K : Set V) (hK : G.IsClique K) (β : V → Fin k) (σ : V → Fin k)
    (hfix : ∀ c : V, c ∈ K → σ c = β c)
    (hopt : ∀ τ : V → Fin k, (∀ c : V, c ∈ K → τ c = β c) →
      maxcut_welfare G τ ≤ maxcut_welfare G σ) :
    ∀ (S : Finset V) (τ : V → Fin k), (∀ v ∈ S, v ∉ K) →
      ¬ is_maxcut_strong_deviation G σ S τ
maxcut_deviation_from_optimal_card_ge_threeIn LeanEquilibria in Games

Every strong deviation from an optimal coloring must involve a coalition of size at least 3. In particular, optimal colorings are 2-strong on every finite simple graph.

theorem maxcut_deviation_from_optimal_card_ge_three {V : Type} [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {k : ℕ} (σ : V → Fin k)
    (hopt : is_maxcut_optimal G σ) (S : Finset V) (τ : V → Fin k)
    (hdev : is_maxcut_strong_deviation G σ S τ) : 3 ≤ S.card
maxcut_deviation_from_optimal_internal_edges_boundIn LeanEquilibria in Games

For any strong deviation from an optimal coloring in the Max-k-Cut game, the total internal bichromatic edge count must be at least twice the size of the coalition.

theorem maxcut_deviation_from_optimal_internal_edges_bound {V : Type} [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {k : ℕ} (σ τ : V → Fin k)
    (hopt : is_maxcut_optimal G σ) (S : Finset V)
    (hdev : is_maxcut_strong_deviation G σ S τ) :
    2 * S.card ≤ ∑ v ∈ S, ∑ w ∈ S, (if G.Adj v w ∧ τ w ≠ τ v then 1 else 0 : ℕ)
maxcut_exists_optimalIn LeanEquilibria in Games

For k ≥ 1 every finite simple graph has an optimal k-colouring, since the colourings form a nonempty finite set and welfare is a natural number.

theorem maxcut_exists_optimal {V : Type} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj] {k : ℕ} (hk : 0 < k) : ∃ σ : V → Fin k, is_maxcut_optimal G σ
maxcut_exists_unused_color_or_safe_pivotIn LeanEquilibria in Games

Given a finite graph with a strong equilibrium and a vertex subset of size less than twice the number of colors, some strong equilibrium either omits a color on the subset or uses a color exactly once there at a neutral-pivot-safe vertex.

theorem maxcut_exists_unused_color_or_safe_pivot
    {V : Type} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (N : Finset V) (k : ℕ) (hN : N.card < 2 * k)
    (hse : ∃ s : V → Fin k, is_maxcut_strong_equilibrium G s) :
    ∃ s : V → Fin k, is_maxcut_strong_equilibrium G s ∧
      ∃ c : Fin k, (N.filter fun w => s w = c).card = 0 ∨
        ∃ u : V, (N.filter fun w => s w = c) = {u} ∧ is_maxcut_neutral_pivot_safe G s u
maxcut_has_optimal_strong_of_forall_optimalIn LeanEquilibria in Games

For k ≥ 1, if every optimal k-colouring of a finite simple graph G is a strong equilibrium, then G admits an optimal colouring that is a strong equilibrium.

theorem maxcut_has_optimal_strong_of_forall_optimal {V : Type} [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (k : ℕ) (hk : 0 < k)
    (h : ∀ σ : V → Fin k, is_maxcut_optimal G σ → is_maxcut_strong_equilibrium G σ) :
    maxcut_has_optimal_strong_equilibrium G k
maxcut_large_complete_parts_defect_color_rigidityIn LeanEquilibria in Games

If k vertex sets each have more than k d vertices, all cross-set pairs are adjacent, and every vertex has at most d same-colored neighbors, then each set is monochromatic and the k set colors are all distinct.

theorem maxcut_large_complete_parts_defect_color_rigidity
    {V : Type} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (k d : ℕ) (A : Fin k → Finset V) (σ : V → Fin k)
    (hsize : ∀ i, k * d < (A i).card)
    (hcross : ∀ i j : Fin k, i ≠ j → ∀ v ∈ A i, ∀ w ∈ A j, G.Adj v w)
    (hdefect : ∀ v : V, (Finset.univ.filter fun w => G.Adj v w ∧ σ w = σ v).card ≤ d) :
    ∃ π : Equiv.Perm (Fin k), ∀ i : Fin k, ∀ v ∈ A i, σ v = π i
maxcut_no_infinite_strong_deviation_chain_two_colorsIn LeanEquilibria in Games

For every finite simple graph, the strong-deviation relation on 2-colourings has no infinite chain: welfare strictly increases along every step and is bounded.

theorem maxcut_no_infinite_strong_deviation_chain_two_colors (V : Type) [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj] : ¬ ∃ f : ℕ → (V → Fin 2), ∀ n, is_maxcut_strong_deviation G (f n) (Finset.univ.filter fun v => f (n+1) v ≠ f n v) (f (n+1))
maxcut_no_mutual_strong_deviationIn LeanEquilibria in Games

Two colourings can never be strong deviations from each other: the relation σ → τ (τ changes a nonempty set of vertices and strictly improves every changed player) is antisymmetric. Hence the deviation digraph has no 2-cycles, for every k.

theorem maxcut_no_mutual_strong_deviation {V : Type} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj] {k : ℕ} {σ τ : V → Fin k} : ¬ (is_maxcut_strong_deviation G σ (Finset.univ.filter fun v => τ v ≠ σ v) τ ∧ is_maxcut_strong_deviation G τ (Finset.univ.filter fun v => σ v ≠ τ v) σ)
maxcut_op89_exists_of_not_colorableNeeds helpEquilibria in Games

Every finite simple graph G that is not k-colourable (χ(G) > k) on at least 2k+2 vertices admits an optimal colouring of the unweighted Max-k-Cut game that is a strong equilibrium, for every k ≥ 3.

theorem maxcut_op89_exists_of_not_colorable {V : Type} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj] (k : ℕ) (hk : 3 ≤ k) (hV : 2 * k + 2 ≤ Fintype.card V) (hchi : ¬ G.Colorable k) : maxcut_has_optimal_strong_equilibrium G k
maxcut_op89_residual_existsIn LeanEquilibria in Games

In the unweighted Max-k-Cut game with k ≥ 3, every non-k-colorable finite simple graph on at least 2k+2 vertices having maximum degree at least 2k admits an optimal coloring that is a strong equilibrium (residual open core of OP-89).

theorem maxcut_op89_residual_exists {V : Type} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj] (k : ℕ) (hk : 3 ≤ k) (hV : 2 * k + 2 ≤ Fintype.card V) (hchi : ¬ G.Colorable k) (hdeg : ∃ v, 2 * k ≤ G.degree v) : maxcut_has_optimal_strong_equilibrium G k
maxcut_optimal_induce_of_agrees_on_separatorIn LeanEquilibria in Games

Let A ∪ B = univ, A ∩ B = C and every edge of G lie inside A or inside B. If σ is an optimal colouring of G and ρ is a colouring of G that agrees with σ on C, then the restriction of ρ to A has welfare at most that of the restriction of σ to A, computed in the induced graph G[A].

theorem maxcut_optimal_induce_of_agrees_on_separator {V : Type} [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {k : ℕ} (σ ρ : V → Fin k)
    (hopt : is_maxcut_optimal G σ)
    (A B C : Set V) [Fintype A] [Fintype B] [Fintype C]
    (hunion : A ∪ B = Set.univ) (hinter : A ∩ B = C)
    (hedge : ∀ a b : V, G.Adj a b → (a ∈ A ∧ b ∈ A) ∨ (a ∈ B ∧ b ∈ B))
    (hagree : ∀ c : V, c ∈ C → ρ c = σ c) :
    maxcut_welfare (G.induce A) (fun a : A => ρ a.1) ≤
      maxcut_welfare (G.induce A) (fun a : A => σ a.1)
maxcut_optimal_no_singleton_deviationIn LeanEquilibria in Games

Every optimal coloring is a pure Nash equilibrium: no singleton coalition has a strong deviation.

theorem maxcut_optimal_no_singleton_deviation {V : Type} [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {k : ℕ} (σ : V → Fin k)
    (hopt : is_maxcut_optimal G σ) (v : V) (τ : V → Fin k) :
    ¬ is_maxcut_strong_deviation G σ {v} τ
maxcut_optimal_strong_of_isClique_univIn LeanEquilibria in Games

If the whole vertex set of a finite simple graph is a clique (that is, the graph is complete), then every optimal colouring of the Max-k-Cut game is a strong equilibrium.

theorem maxcut_optimal_strong_of_isClique_univ {V : Type} [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {k : ℕ} (σ : V → Fin k)
    (hclique : G.IsClique (Set.univ : Set V)) (hopt : is_maxcut_optimal G σ) :
    is_maxcut_strong_equilibrium G σ
maxcut_pinned_twins_initial_defect_eight_nashIn LeanEquilibria in Games

The initial pinned-twins coloring is a Nash equilibrium and each vertex has at most eight same-colored neighbors.

theorem maxcut_pinned_twins_initial_defect_eight_nash
    [DecidableRel maxcut_pinned_twins_graph.Adj] :
    (∀ v : ((Fin 16 ⊕ (Fin 3 × Fin 25)) × Fin 2),
      (Finset.univ.filter fun w => maxcut_pinned_twins_graph.Adj v w ∧
        maxcut_anchor_three_initial_coloring w.1 = maxcut_anchor_three_initial_coloring v.1).card ≤ 8) ∧
    ∀ v : ((Fin 16 ⊕ (Fin 3 × Fin 25)) × Fin 2), ∀ c : Fin 3,
      ¬ is_maxcut_strong_deviation maxcut_pinned_twins_graph
        (fun v : ((Fin 16 ⊕ (Fin 3 × Fin 25)) × Fin 2) => maxcut_anchor_three_initial_coloring v.1) {v} (Function.update (fun v : ((Fin 16 ⊕ (Fin 3 × Fin 25)) × Fin 2) => maxcut_anchor_three_initial_coloring v.1) v c)
maxcut_pinned_twins_minimum_max_defect_nash_not_strongIn LeanEquilibria in Games

The pinned-twins graph has a Nash profile with maximum monochromatic degree eight, but no strong equilibrium with maximum monochromatic degree at most eight; therefore minimizing that maximum, or its sorted vector, among Nash profiles cannot select a strong equilibrium.

theorem maxcut_pinned_twins_minimum_max_defect_nash_not_strong
    [DecidableRel maxcut_pinned_twins_graph.Adj] :
    (∃ σ : ((Fin 16 ⊕ (Fin 3 × Fin 25)) × Fin 2) → Fin 3,
      (∀ v : ((Fin 16 ⊕ (Fin 3 × Fin 25)) × Fin 2), (Finset.univ.filter fun w => maxcut_pinned_twins_graph.Adj v w ∧ σ w = σ v).card ≤ 8) ∧ (∀ v : ((Fin 16 ⊕ (Fin 3 × Fin 25)) × Fin 2), ∀ c : Fin 3, ¬ is_maxcut_strong_deviation maxcut_pinned_twins_graph σ {v} (Function.update σ v c))) ∧
    ∀ σ : ((Fin 16 ⊕ (Fin 3 × Fin 25)) × Fin 2) → Fin 3,
      (∀ v : ((Fin 16 ⊕ (Fin 3 × Fin 25)) × Fin 2), (Finset.univ.filter fun w => maxcut_pinned_twins_graph.Adj v w ∧ σ w = σ v).card ≤ 8) →
      ¬ is_maxcut_strong_equilibrium maxcut_pinned_twins_graph σ
maxcut_pinned_twins_nash_defect_eight_rigidityIn LeanEquilibria in Games

Every Nash coloring of the pinned-twins graph with maximum monochromatic degree at most eight is a global color permutation of the initial coloring.

theorem maxcut_pinned_twins_nash_defect_eight_rigidity
    [DecidableRel maxcut_pinned_twins_graph.Adj]
    (σ : ((Fin 16 ⊕ (Fin 3 × Fin 25)) × Fin 2) → Fin 3)
    (hdefect : ∀ v : ((Fin 16 ⊕ (Fin 3 × Fin 25)) × Fin 2), (Finset.univ.filter fun w => maxcut_pinned_twins_graph.Adj v w ∧ σ w = σ v).card ≤ 8)
    (hnash : ∀ v : ((Fin 16 ⊕ (Fin 3 × Fin 25)) × Fin 2), ∀ c : Fin 3, ¬ is_maxcut_strong_deviation maxcut_pinned_twins_graph σ {v} (Function.update σ v c)) :
    ∃ π : Equiv.Perm (Fin 3), ∀ v : ((Fin 16 ⊕ (Fin 3 × Fin 25)) × Fin 2),
      σ v = π (maxcut_anchor_three_initial_coloring v.1)
maxcut_proper_coloring_strong_equilibriumIn LeanEquilibria in Games

Any colouring in which adjacent vertices get different colours is a strong equilibrium: every player already attains its full degree as utility, so nobody can gain.

theorem maxcut_proper_coloring_strong_equilibrium {V : Type} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj] {k : ℕ} (σ : V → Fin k) (h : ∀ v w, G.Adj v w → σ w ≠ σ v) : is_maxcut_strong_equilibrium G σ
maxcut_single_conflict_deviation_pivotIn LeanEquilibria in Games

Let a restored vertex play a best response with exactly one monochromatic neighbor, and suppose the deletion profile is strongly stable. Every profitable coalition in the full graph moves that unique neighbor, whose utility in the deletion stays unchanged, while all other coalition members in the deletion strictly improve; the initial monochromatic edge becomes cut.

theorem maxcut_single_conflict_deviation_pivot
    {V : Type} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    {k : ℕ} (v : V) (σ : V → Fin k) (u : (↑(Finset.univ.erase v) : Set V))
    (huniq : (Finset.univ.filter fun w => G.Adj v w ∧ σ w = σ v) = {u.1})
    (hbest : ∀ c : Fin k, (Finset.univ.filter fun w => G.Adj v w ∧ σ w = σ v).card ≤
      (Finset.univ.filter fun w => G.Adj v w ∧ σ w = c).card)
    (hsub : is_maxcut_strong_equilibrium (G.induce (↑(Finset.univ.erase v) : Set V)) (fun x : (↑(Finset.univ.erase v) : Set V) => σ x.1))
    (C : Finset V) (τ : V → Fin k) (hdev : is_maxcut_strong_deviation G σ C τ) :
    u.1 ∈ C ∧ τ u.1 ≠ σ u.1 ∧ τ u.1 ≠ τ v ∧
    maxcut_utility (G.induce (↑(Finset.univ.erase v) : Set V)) (fun x : (↑(Finset.univ.erase v) : Set V) => σ x.1) u = maxcut_utility (G.induce (↑(Finset.univ.erase v) : Set V)) (fun x : (↑(Finset.univ.erase v) : Set V) => τ x.1) u ∧
    ∀ x : (↑(Finset.univ.erase v) : Set V), x.1 ∈ C → x ≠ u →
      maxcut_utility (G.induce (↑(Finset.univ.erase v) : Set V)) (fun x : (↑(Finset.univ.erase v) : Set V) => σ x.1) x < maxcut_utility (G.induce (↑(Finset.univ.erase v) : Set V)) (fun x : (↑(Finset.univ.erase v) : Set V) => τ x.1) x
maxcut_strong_deviation_induce_of_nbrs_subsetIn LeanEquilibria in Games

Suppose T is a coalition inside A every member of which has all of its G-neighbours in A (this holds automatically for subsets of A \ B when every edge of G lies inside A or inside B). If τ is a strong deviation from σ for the coalition of the underlying vertices of T in G, then restricting both colourings to A gives a strong deviation in the game on the induced graph G[A].

theorem maxcut_strong_deviation_induce_of_nbrs_subset {V : Type} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {k : ℕ} (σ τ : V → Fin k)
    (A : Set V) [Fintype A] (T : Finset A)
    (hN : ∀ t : A, t ∈ T → ∀ w : V, G.Adj t.1 w → w ∈ A)
    (hdev : is_maxcut_strong_deviation G σ (T.image (fun t : A => t.1)) τ) :
    is_maxcut_strong_deviation (G.induce A) (fun a : A => σ a.1) T (fun a : A => τ a.1)
maxcut_strong_deviation_no_cycleNeeds helpEquilibria in Games

For every finite simple graph and every k, the strong-deviation relation on k-colourings has no directed cycle of any length, hence no infinite chain; consequently some colouring is a strong equilibrium.

theorem maxcut_strong_deviation_no_cycle (V : Type) [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj] (k : ℕ) : ∀ (m : ℕ) (f : ℕ → (V → Fin k)), 0 < m → ¬ (∀ i : ℕ, is_maxcut_strong_deviation G (f i) (Finset.univ.filter fun v => f (i+1) v ≠ f i v) (f (i+1)) ∧ f m = f 0)
maxcut_strong_deviation_welfare_lt_two_colorsIn LeanEquilibria in Games

With two colours, every strong deviation strictly increases the social welfare; hence a welfare-maximising 2-colouring is a strong equilibrium and every graph has a strong equilibrium in the 2-colour Max-k-Cut game.

theorem maxcut_strong_deviation_welfare_lt_two_colors {V : Type} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (σ τ : V → Fin 2) (S : Finset V) (h : is_maxcut_strong_deviation G σ S τ) : maxcut_welfare G σ < maxcut_welfare G τ
maxcut_strong_equilibrium_exists_two_colorsIn LeanEquilibria in Games

Every finite simple graph has a strong equilibrium in the 2-colour Max-k-Cut game: take a welfare-maximising 2-colouring.

theorem maxcut_strong_equilibrium_exists_two_colors {V : Type} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj] : ∃ σ : V → Fin 2, is_maxcut_strong_equilibrium G σ
maxcut_strong_equilibrium_iffIn LeanEquilibria in Games

σ is a strong equilibrium iff for every other colouring τ some vertex whose colour changes under τ fails to strictly improve its utility.

theorem maxcut_strong_equilibrium_iff {V : Type} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj] {k : ℕ} (σ : V → Fin k) : is_maxcut_strong_equilibrium G σ ↔ ∀ τ : V → Fin k, (∃ v, τ v ≠ σ v) → ∃ v, τ v ≠ σ v ∧ maxcut_utility G τ v ≤ maxcut_utility G σ v
maxcut_strong_equilibrium_of_colorableIn LeanEquilibria in Games

If G admits a proper colouring with k colours then the k-colour Max-k-Cut game on G has a strong equilibrium.

theorem maxcut_strong_equilibrium_of_colorable {V : Type} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj] {k : ℕ} (h : G.Colorable k) : ∃ σ : V → Fin k, is_maxcut_strong_equilibrium G σ
maxcut_strong_equilibrium_of_neutral_pivot_safeIn LeanEquilibria in Games

A deletion strong equilibrium extends across a best-responding vertex with exactly one monochromatic neighbor if that neighbor is neutral-pivot safe in the deletion.

theorem maxcut_strong_equilibrium_of_neutral_pivot_safe
    {V : Type} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    {k : ℕ} (v : V) (σ : V → Fin k) (u : (↑(Finset.univ.erase v) : Set V))
    (huniq : (Finset.univ.filter fun w => G.Adj v w ∧ σ w = σ v) = {u.1})
    (hbest : ∀ c : Fin k, (Finset.univ.filter fun w => G.Adj v w ∧ σ w = σ v).card ≤
      (Finset.univ.filter fun w => G.Adj v w ∧ σ w = c).card)
    (hsub : is_maxcut_strong_equilibrium (G.induce (↑(Finset.univ.erase v) : Set V)) (fun x : (↑(Finset.univ.erase v) : Set V) => σ x.1))
    (hsafe : is_maxcut_neutral_pivot_safe (G.induce (↑(Finset.univ.erase v) : Set V)) (fun x : (↑(Finset.univ.erase v) : Set V) => σ x.1) u) :
    is_maxcut_strong_equilibrium G σ
maxcut_strong_equilibrium_of_no_deviation_chainIn LeanEquilibria in Games

If there is no infinite chain σ₀ → σ₁ → … of strong deviations (each step changing exactly the players whose colour changes), then a strong equilibrium exists.

theorem maxcut_strong_equilibrium_of_no_deviation_chain {V : Type} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj] {k : ℕ} (hk : 0 < k) (h : ¬ ∃ f : ℕ → (V → Fin k), ∀ n, is_maxcut_strong_deviation G (f n) (Finset.univ.filter fun v => f (n+1) v ≠ f n v) (f (n+1))) : ∃ σ : V → Fin k, is_maxcut_strong_equilibrium G σ
maxcut_strong_equilibrium_some_extension_degree_lt_two_kIn LeanEquilibria in Games

If a vertex has degree less than twice the number of colors and the deleted graph has a strong equilibrium, then some strong equilibrium of the deleted graph extends to a strong equilibrium of the original graph.

theorem maxcut_strong_equilibrium_some_extension_degree_lt_two_k
    {V : Type} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (v : V) (k : ℕ) (hd : G.degree v < 2 * k)
    (hsub : ∃ s : (↑(Finset.univ.erase v) : Set V) → Fin k,
      is_maxcut_strong_equilibrium (G.induce (↑(Finset.univ.erase v) : Set V)) s) :
    ∃ σ : V → Fin k, is_maxcut_strong_equilibrium G σ ∧
      is_maxcut_strong_equilibrium (G.induce (↑(Finset.univ.erase v) : Set V))
        (fun x : (↑(Finset.univ.erase v) : Set V) => σ x.1)
maxcut_utility_induce_of_nbrs_subsetIn LeanEquilibria in Games

If every neighbour of a vertex t of the induced subgraph G.induce A (viewed as a vertex of G) lies in A, then t's utility in the game on the induced subgraph G.induce A equals its utility in the game on G.

theorem maxcut_utility_induce_of_nbrs_subset {V : Type} [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {k : ℕ} (σ : V → Fin k)
    (A : Set V) [Fintype A] (t : A) (hN : ∀ w : V, G.Adj t.1 w → w ∈ A) :
    maxcut_utility (G.induce A) (fun a : A => σ a.1) t = maxcut_utility G σ t.1
maxcut_welfare_separator_decompIn LeanEquilibria in Games

If A ∪ B is everything, A ∩ B = C, and every edge of G lies inside A or inside B, then for every colouring rho the welfare of rho on G plus the welfare on the shared part C equals the welfare on G[A] plus the welfare on G[B].

theorem maxcut_welfare_separator_decomp {V : Type} [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {k : ℕ} (ρ : V → Fin k)
    (A B C : Set V) [Fintype A] [Fintype B] [Fintype C]
    (hunion : A ∪ B = Set.univ) (hinter : A ∩ B = C)
    (hedge : ∀ a b : V, G.Adj a b → (a ∈ A ∧ b ∈ A) ∨ (a ∈ B ∧ b ∈ B)) :
    maxcut_welfare G ρ + maxcut_welfare (G.induce C) (fun c : C => ρ c.1) =
      maxcut_welfare (G.induce A) (fun a : A => ρ a.1) +
        maxcut_welfare (G.induce B) (fun b : B => ρ b.1)
pure_best_response_payoff_le_oneIn LeanEquilibria in Games

Let n be a positive natural number. If every entry of the square matrix A : Matrix (Fin n) (Fin n) ℝ is at most 1, then for any strategy p in stdSimplex ℝ (Fin n) and any row index i in Fin n, Matrix.mulVec A p.val i ≤ 1.

theorem pure_best_response_payoff_le_one {n : ℕ} [NeZero n] (A : Matrix (Fin n) (Fin n) ℝ) (p : stdSimplex ℝ (Fin n)) (hA : ∀ i j, A i j ≤ 1) (i : Fin n) : Matrix.mulVec A p.val i ≤ 1
regret_le_one_sub_two_eps_of_self_payoffIn LeanEquilibria in Games

Let n be a positive natural number. If every entry of A : Matrix (Fin n) (Fin n) ℝ is at most 1 and strategy p in stdSimplex ℝ (Fin n) satisfies dotProduct p.val (Matrix.mulVec A p.val) ≥ 2 * ε, then symmetric_game_regret A p ≤ 1 - 2 * ε.

theorem regret_le_one_sub_two_eps_of_self_payoff {n : ℕ} [NeZero n] (A : Matrix (Fin n) (Fin n) ℝ) (p : stdSimplex ℝ (Fin n)) (ε : ℝ) (hA : ∀ i j, A i j ≤ 1) (h_self : dotProduct p.val (Matrix.mulVec A p.val) ≥ 2 * ε) : symmetric_game_regret A p ≤ 1 - 2 * ε
saddle_gap_first_marginal_boundsIn LeanEquilibria in Games

Let n be a positive natural number. For any matrix A : Matrix (Fin n) (Fin n) ℝ with non-negative entries and any optimal row strategy σ in (saddle_gap_game A).optimalRowStrategies, its first marginal a = saddle_gap_first_marginal σ satisfies Matrix.vecMul a.val A j ≥ (saddle_gap_game A).value for all j in Fin n, and dotProduct a.val (Matrix.mulVec A a.val) ≥ 2 * (saddle_gap_game A).value.

theorem saddle_gap_first_marginal_bounds {n : ℕ} [NeZero n] (A : Matrix (Fin n) (Fin n) ℝ) (hA_nonneg : ∀ i j, 0 ≤ A i j) (σ : stdSimplex ℝ (Fin n × Fin n)) (hσ : σ ∈ (saddle_gap_game A).optimalRowStrategies) : let a := saddle_gap_first_marginal σ; (∀ j : Fin n, Matrix.vecMul a.val A j ≥ (saddle_gap_game A).value) ∧ dotProduct a.val (Matrix.mulVec A a.val) ≥ 2 * (saddle_gap_game A).value
saddle_gap_first_marginal_guaranteeIn LeanEquilibria in Games

Let n be a positive natural number, and let A : Matrix (Fin n) (Fin n) ℝ have entries in [0, 1]. If the value of the saddle-gap game satisfies (saddle_gap_game A).value > ε, then for any optimal row strategy σ in (saddle_gap_game A).optimalRowStrategies, its first marginal p₀ = saddle_gap_first_marginal σ satisfies symmetric_game_regret A p₀ ≤ 1 - 2 * ε and Matrix.vecMul p₀.val A j ≥ ε for all j in Fin n.

theorem saddle_gap_first_marginal_guarantee {n : ℕ} [NeZero n] (A : Matrix (Fin n) (Fin n) ℝ) (hA_nonneg : ∀ i j, 0 ≤ A i j) (hA_le_one : ∀ i j, A i j ≤ 1) (ε : ℝ) (h_val : (saddle_gap_game A).value > ε) (σ : stdSimplex ℝ (Fin n × Fin n)) (hσ : σ ∈ (saddle_gap_game A).optimalRowStrategies) : let p₀ := saddle_gap_first_marginal σ; symmetric_game_regret A p₀ ≤ 1 - 2 * ε ∧ ∀ j : Fin n, Matrix.vecMul p₀.val A j ≥ ε
additive_valuation_bivalued_cardIn LeanFair Division

If every chore costs either 1 or r, the cost of a bundle S is |S| + (r-1) times the number of r-cost chores in S.

theorem additive_valuation_bivalued_card {m : ℕ} (r : ℝ) (u : Fin m → ℝ)
    (hu : ∀ g, u g = 1 ∨ u g = r) (S : Finset (Fin m)) :
  additive_valuation u S = (S.card : ℝ) + (r - 1) * ((S.filter fun g => u g = r).card : ℝ)
adversary_forces_ratio_antitone_factorIn LeanFair Division

For 1 ≤ r, if the adversary can force factor β by prefix H then it can force every smaller factor α ≤ β by prefix H; so the set of forcible factors is a down-set and adversary_forces_ratio is antitone in the factor.

theorem adversary_forces_ratio_antitone_factor {r α β : ℝ} (hr : 1 ≤ r) (H : ℕ) (hαβ : α ≤ β)
    (h : adversary_forces_ratio r β H) : adversary_forces_ratio r α H
allocation_rule_unique_ownerIn LeanFair Division

For an allocation rule that is non-wasteful, every object has exactly one owner at every profile: there is a unique agent whose bundle contains it.

theorem allocation_rule_unique_owner {Agent Object : Type*} [Fintype Agent] [Fintype Object]
    [DecidableEq Agent] [DecidableEq Object]
    (f : (Agent → LinearOrder Object) → Agent → Finset Object)
    (h_alloc : is_allocation_rule f) (h_nw : is_non_wasteful_rule f)
    (succ : Agent → LinearOrder Object) (y : Object) :
    ∃! i : Agent, y ∈ f succ i
almost_mms_base_case_allocationIn LeanFair Division

For a single agent u and a finite set of items E with valuation v, if the total value ∑_{e ∈ E} v(u, e) ≥ 1, then there exists an allocation assigning a subset of E to each agent in {u} such that u receives a bundle of value at least 1.

theorem almost_mms_base_case_allocation
    {Agent Item : Type*} [DecidableEq Agent] [DecidableEq Item]
    (u : Agent) (E : Finset Item)
    (v : Agent → Item → ℝ)
    (hv : 1 ≤ ∑ e ∈ E, v u e) :
    ∃ B : Agent → Finset Item,
      (∀ a ∈ ({u} : Finset Agent), B a ⊆ E) ∧
      (({u} : Finset Agent) : Set Agent).PairwiseDisjoint B ∧
      ∀ a ∈ ({u} : Finset Agent), 1 ≤ ∑ e ∈ B a, v a e
almost_mms_exists_prefix_bundle_ge_one_all_le_twoIn LeanFair Division

For any non-empty finite set of agents U and finite set of items E, if each agent u ∈ U has non-negative item valuations v(u, e) ≤ 1 for all e ∈ E, and some agent in U values E at least 1, then there exists a subset B ⊆ E and an agent u* ∈ U such that u* values B at least 1, and every agent in U values B at most 2.

theorem almost_mms_exists_prefix_bundle_ge_one_all_le_two
    {Agent Item : Type*} [DecidableEq Agent] [DecidableEq Item]
    (U : Finset Agent) (hU : U.Nonempty) (E : Finset Item)
    (v : Agent → Item → ℝ)
    (hv_nonneg : ∀ u ∈ U, ∀ e ∈ E, 0 ≤ v u e)
    (hv_le_one : ∀ u ∈ U, ∀ e ∈ E, v u e ≤ 1)
    (hex : ∃ u ∈ U, 1 ≤ ∑ e ∈ E, v u e) :
    ∃ B : Finset Item, B ⊆ E ∧
      (∃ ustar ∈ U, 1 ≤ ∑ e ∈ B, v ustar e) ∧
      ∀ u ∈ U, ∑ e ∈ B, v u e ≤ 2
almost_mms_guaranteed_allocation_of_value_ge_two_mul_card_sub_oneIn LeanFair Division

Let U be a finite non-empty set of agents, and let E be a finite set of items. Suppose each agent u ∈ U has an additive valuation given by non-negative item values v(u, e) ≤ 1 for all e ∈ E such that ∑_{e ∈ E} v(u, e) ≥ 2 * |U| - 1 for all u ∈ U. Then there exists an allocation (B_u)_{u ∈ U} of a subset of E to U of pairwise disjoint bundles such that ∑_{e ∈ B_u} v(u, e) ≥ 1 for every u ∈ U.

theorem almost_mms_guaranteed_allocation_of_value_ge_two_mul_card_sub_one
    {Agent Item : Type*} [DecidableEq Agent] [DecidableEq Item]
    (U : Finset Agent) (hU : U.Nonempty) (E : Finset Item)
    (v : Agent → Item → ℝ)
    (hv_nonneg : ∀ u ∈ U, ∀ e ∈ E, 0 ≤ v u e)
    (hv_le_one : ∀ u ∈ U, ∀ e ∈ E, v u e ≤ 1)
    (hv_total : ∀ u ∈ U, 2 * (U.card : ℝ) - 1 ≤ ∑ e ∈ E, v u e) :
    ∃ B : Agent → Finset Item,
      (∀ u ∈ U, B u ⊆ E) ∧
      (U : Set Agent).PairwiseDisjoint B ∧
      ∀ u ∈ U, 1 ≤ ∑ e ∈ B u, v u e
almost_mms_remaining_items_value_geIn LeanFair Division

For a finite set of items E, a subset B ⊆ E, a valuation v on items, and a positive integer n ≥ 1, if ∑_{e ∈ E} v(e) ≥ 2 * n - 1 and ∑_{e ∈ B} v(e) ≤ 2, then the remaining items satisfy ∑_{e ∈ E \ B} v(e) ≥ 2 * (n - 1) - 1.

theorem almost_mms_remaining_items_value_ge
    {Item : Type*} [DecidableEq Item]
    (E B : Finset Item) (hB : B ⊆ E) (v : Item → ℝ)
    (n : ℕ) (hn : 1 ≤ n)
    (h_total : 2 * (n : ℝ) - 1 ≤ ∑ e ∈ E, v e)
    (h_bundle : ∑ e ∈ B, v e ≤ 2) :
    2 * ((n - 1 : ℕ) : ℝ) - 1 ≤ ∑ e ∈ E \ B, v e
almost_mms_residual_allocation_after_removing_low_value_setIn LeanFair Division

Let M be a finite set of items and N a finite set of agents with additive valuations given by item values v(i, e) ∈ [0, 1] such that ∑_{e ∈ M} v(i, e) ≥ d. Let F ⊆ M satisfy ∑_{e ∈ F} v(i, e) ≤ |N| + 1 for all i ∈ N. Then for any subset U ⊆ N with |U| ≤ (d - |N|)/2, there exists an allocation assigning each agent u ∈ U a pairwise disjoint bundle B(u) ⊆ M \ F such that ∑_{e ∈ B(u)} v(u, e) ≥ 1.

theorem almost_mms_residual_allocation_after_removing_low_value_set
    {Agent Item : Type*} [DecidableEq Agent] [DecidableEq Item]
    (N : Finset Agent) (M : Finset Item) (d : ℝ)
    (v : Agent → Item → ℝ)
    (hv_nonneg : ∀ i ∈ N, ∀ e ∈ M, 0 ≤ v i e)
    (hv_le_one : ∀ i ∈ N, ∀ e ∈ M, v i e ≤ 1)
    (hv_M : ∀ i ∈ N, d ≤ ∑ e ∈ M, v i e)
    (F : Finset Item) (hF : F ⊆ M)
    (hF_val : ∀ i ∈ N, ∑ e ∈ F, v i e ≤ (N.card : ℝ) + 1)
    (U : Finset Agent) (hU_sub : U ⊆ N)
    (hU_card : (U.card : ℝ) ≤ (d - (N.card : ℝ)) / 2) :
    ∃ B : Agent → Finset Item,
      (∀ u ∈ U, B u ⊆ M \ F) ∧
      (U : Set Agent).PairwiseDisjoint B ∧
      ∀ u ∈ U, 1 ≤ ∑ e ∈ B u, v u e
almost_mms_residual_value_geIn LeanFair Division

For a finite set of agents N and items M, an item subset F ⊆ M, additive valuations v with total value ∑_{e ∈ M} v(u, e) ≥ d and subset value ∑_{e ∈ F} v(u, e) ≤ |N| + 1 for each agent, and a subset of agents U ⊆ N with |U| ≤ (d - |N|)/2, every agent u ∈ U values the residual items M \ F at least 2 * |U| - 1.

theorem almost_mms_residual_value_ge
    {Agent Item : Type*} [DecidableEq Agent] [DecidableEq Item]
    (N : Finset Agent) (M : Finset Item) (d : ℝ)
    (v : Agent → Item → ℝ)
    (hv_M : ∀ i ∈ N, d ≤ ∑ e ∈ M, v i e)
    (F : Finset Item) (hF : F ⊆ M)
    (hF_val : ∀ i ∈ N, ∑ e ∈ F, v i e ≤ (N.card : ℝ) + 1)
    (U : Finset Agent) (hU_sub : U ⊆ N)
    (hU_card : (U.card : ℝ) ≤ (d - (N.card : ℝ)) / 2)
    (u : Agent) (hu : u ∈ U) :
    2 * (U.card : ℝ) - 1 ≤ ∑ e ∈ M \ F, v u e
balanced_bivalued_two_bundle_mms_boundIn LeanFair Division

For a positive two-valued chore cost, if a bipartition balances both the total number of chores and the number of high-cost chores to within one, both bundles cost at most (r+1)/2 times the two-agent maximin share.

theorem balanced_bivalued_two_bundle_mms_bound
    (m : ℕ) (r a : ℝ) (hr : 1 ≤ r) (ha : 0 < a)
    (u : Fin m → ℝ) (H S : Finset (Fin m))
    (hu : ∀ g, u g = if g ∈ H then r * a else a)
    (hs : S.card ≤ (m + 1) / 2)
    (hsc : (Finset.univ \ S).card ≤ (m + 1) / 2)
    (hh : (S ∩ H).card ≤ (H.card + 1) / 2)
    (hhc : (H \ S).card ≤ (H.card + 1) / 2) :
    additive_valuation u S ≤ ((r + 1) / 2) * chore_maximin_share 2 u ∧
    additive_valuation u (Finset.univ \ S) ≤
      ((r + 1) / 2) * chore_maximin_share 2 u
balanced_draft_fixed_values_independentIn LeanFair Division

Fix any deterministic picking schedule and, for each agent, any strictly increasing list of real values. Independently assign each agent a uniformly random permutation of the good labels. Then the agents' normalized sincere-draft utilities are jointly independent; zero total value uses division by zero equal to zero.

theorem balanced_draft_fixed_values_independent :
  ∀ (n m : ℕ) (s : Fin m → Fin n) (w : Fin n → Fin m → ℝ),
    (∀ i, StrictMono (w i)) →
    iIndepFun
      (fun i (π : Fin n → Equiv.Perm (Fin m)) =>
        balanced_draft_normalized_utility n m s (fun j g => w j (π j g)) i)
      (Measure.pi (fun _ : Fin n => uniformOn (Set.univ : Set (Equiv.Perm (Fin m)))))
balanced_draft_scaled_utilities_independentIn LeanFair Division

For every deterministic picking schedule, including unbalanced schedules, the scaled normalized utilities of the agents are jointly independent under independent uniform unit-interval valuations.

theorem balanced_draft_scaled_utilities_independent : ∀ (n m : ℕ) (s : Fin m → Fin n), iIndepFun (fun i v => balanced_draft_scaled_utility n m s v i) (balanced_draft_input_law n m : Measure (Fin n → Fin m → ℝ))
balanced_draft_threshold_imbalance_boundIn LeanFair Division

For a balanced deterministic schedule and one agent, let T be a nonnegative threshold starting at at most one that can decrease only on that agent's turns. The absolute difference between n-1 times the sum of the post-pick thresholds on that agent's turns and the sum of the thresholds on all other turns is at most n-1.

theorem balanced_draft_threshold_imbalance_bound :
  ∀ (n m : ℕ) (s : Fin m → Fin n) (i : Fin n) (T : ℕ → ℝ),
    is_balanced_schedule n m s → T 0 ≤ 1 →
    (∀ t, t ≤ m → 0 ≤ T t) →
    (∀ t, t < m → T (t+1) ≤ T t) →
    (∀ t (ht : t < m), s ⟨t,ht⟩ ≠ i → T (t+1) = T t) →
    |((n : ℝ)-1) * (∑ t : Fin m, if s t = i then T (t.val+1) else 0) -
      (∑ t : Fin m, if s t ≠ i then T t.val else 0)| ≤ (n : ℝ)-1
balanced_high_count_few_chores_mms_boundIn LeanFair Division

For n at least two and at most 2n bivalued chores with ratio r at least one and positive base a, a bundle whose total and high-cost counts each round their population averages up by less than one costs at most (r+1)/2 times the n-agent chore maximin share.

theorem balanced_high_count_few_chores_mms_bound (n m : ℕ) (hn : 2 ≤ n) (hm : m ≤ 2*n) (r : ℝ) (hr : 1 ≤ r) (a : ℝ) (ha : 0 < a) (u : Fin m → ℝ) (hu : ∀ g, u g = a ∨ u g = r*a) (S : Finset (Fin m)) (hs : n * S.card ≤ m + n - 1) (hh : n * ((S.filter fun g => u g = r*a).card) ≤ ((Finset.univ.filter fun g => u g = r*a).card) + n - 1) : additive_valuation u S ≤ ((r+1)/2) * chore_maximin_share n u
balanced_high_count_large_ratio_mms_boundIn LeanFair Division

For n at least two and m bivalued chores with ratio r at least two and positive base a, a bundle whose total and high-cost counts each round their population averages up by less than one costs at most (r+1)/2 times the n-agent chore maximin share.

theorem balanced_high_count_large_ratio_mms_bound (n m : ℕ) (hn : 2 ≤ n) (r : ℝ) (hr : 2 ≤ r) (a : ℝ) (ha : 0 < a) (u : Fin m → ℝ) (hu : ∀ g, u g = a ∨ u g = r*a) (S : Finset (Fin m)) (hs : n * S.card ≤ m + n - 1) (hh : n * ((S.filter fun g => u g = r*a).card) ≤ ((Finset.univ.filter fun g => u g = r*a).card) + n - 1) : additive_valuation u S ≤ ((r+1)/2) * chore_maximin_share n u
balanced_high_count_many_chores_mms_boundIn LeanFair Division

Let n be at least two, r at least one and a positive. Suppose there are m bivalued chores of costs a or r*a, with (r-1)*m at least 2*r*n. A bundle whose total and high-cost counts each round their population averages up by less than one costs at most (r+1)/2 times the n-agent chore maximin share.

theorem balanced_high_count_many_chores_mms_bound (n m : ℕ) (hn : 2 ≤ n) (r : ℝ) (hr : 1 ≤ r) (hm : (r-1)*(m:ℝ) ≥ 2*r*(n:ℝ)) (a : ℝ) (ha : 0 < a) (u : Fin m → ℝ) (hu : ∀ g, u g = a ∨ u g = r*a) (S : Finset (Fin m)) (hs : n * S.card ≤ m + n - 1) (hh : n * ((S.filter fun g => u g = r*a).card) ≤ ((Finset.univ.filter fun g => u g = r*a).card) + n - 1) : additive_valuation u S ≤ ((r+1)/2) * chore_maximin_share n u
balanced_high_count_two_sub_inv_ratio_mms_boundIn LeanFair Division

For n at least two and m bivalued chores with ratio r at least one and positive base a, a bundle whose total and high-cost counts each round their population averages up by less than one costs at most (2-1/r) times the n-agent chore maximin share.

theorem balanced_high_count_two_sub_inv_ratio_mms_bound (n m : ℕ) (hn : 2 ≤ n) (r : ℝ) (hr : 1 ≤ r) (a : ℝ) (ha : 0 < a) (u : Fin m → ℝ) (hu : ∀ g, u g = a ∨ u g = r*a) (S : Finset (Fin m)) (hs : n * S.card ≤ m + n - 1) (hh : n * ((S.filter fun g => u g = r*a).card) ≤ ((Finset.univ.filter fun g => u g = r*a).card) + n - 1) : additive_valuation u S ≤ (2-1/r) * chore_maximin_share n u
bivalued_agent_balanced_exact_mms_partitionIn LeanFair Division

Let r = 1 + 1/k with k >= 1, and let a two-agent chore cost u take only the values 1 and r. Then there is a set S of chores with both |S| and its complement of size at most (m+1)/2, and with both sides costing the agent at most her two-agent chore maximin share.

theorem bivalued_agent_balanced_exact_mms_partition (r : ℝ) (hr1 : 1 ≤ r) (hr2 : r ≤ 2)
    (hr : r = 1 ∨ ∃ k : ℕ, 1 ≤ k ∧ r = 1 + 1 / (k : ℝ))
    (m : ℕ) (u : Fin m → ℝ) (hu : ∀ g, u g = 1 ∨ u g = r) :
  ∃ S : Finset (Fin m),
    S.card ≤ (m + 1) / 2 ∧ (Finset.univ \ S).card ≤ (m + 1) / 2 ∧
    additive_valuation u S ≤ chore_maximin_share 2 u ∧
    additive_valuation u (Finset.univ \ S) ≤ chore_maximin_share 2 u
bivalued_balanced_count_no_worse_evenIn LeanFair Division

Let h and l be the numbers of a r-cost chores and of 1-cost chores (h + l even). For any way of taking a of the h and b of the l, there is a balanced way (2(a'+b') = h+l, a' <= h, b' <= l) whose more expensive side, costed as a'*(1+1/k) + b' versus (h-a')*(1+1/k) + (l-b'), is no larger.

theorem bivalued_balanced_count_no_worse_even (k h l : ℕ) (hk : 1 ≤ k) (hpar : (h + l) % 2 = 0)
    (a b : ℕ) (ha : a ≤ h) (hb : b ≤ l) :
  ∃ a' b' : ℕ, a' ≤ h ∧ b' ≤ l ∧ 2 * (a' + b') = h + l ∧
    max ((a' : ℝ) * (1 + 1 / (k : ℝ)) + (b' : ℝ))
        (((h - a' : ℕ) : ℝ) * (1 + 1 / (k : ℝ)) + ((l - b' : ℕ) : ℝ)) ≤
      max ((a : ℝ) * (1 + 1 / (k : ℝ)) + (b : ℝ))
        (((h - a : ℕ) : ℝ) * (1 + 1 / (k : ℝ)) + ((l - b : ℕ) : ℝ))
bivalued_balanced_count_no_worse_oddIn LeanFair Division

Let h and l be the numbers of r-cost and 1-cost chores with h + l odd. For any way of taking a of the h and b of the l, there is an almost-balanced way (2(a'+b') is h+l-1 or h+l+1, a' <= h, b' <= l) whose more expensive side is no larger.

theorem bivalued_balanced_count_no_worse_odd (k h l : ℕ) (hk : 1 ≤ k) (hpar : (h + l) % 2 = 1)
    (a b : ℕ) (ha : a ≤ h) (hb : b ≤ l) :
  ∃ a' b' : ℕ, a' ≤ h ∧ b' ≤ l ∧ (2 * (a' + b') + 1 = h + l ∨ 2 * (a' + b') = h + l + 1) ∧
    max ((a' : ℝ) * (1 + 1 / (k : ℝ)) + (b' : ℝ))
        (((h - a' : ℕ) : ℝ) * (1 + 1 / (k : ℝ)) + ((l - b' : ℕ) : ℝ)) ≤
      max ((a : ℝ) * (1 + 1 / (k : ℝ)) + (b : ℝ))
        (((h - a : ℕ) : ℝ) * (1 + 1 / (k : ℝ)) + ((l - b : ℕ) : ℝ))
bivalued_efx_gadget_allocation_existsIn LeanFair Division

For any R ≥ 2 and h ≥ 1, with n = 1 + (R + 3)h and d = 2(R + 1)h, there exists an allocation σ of the 2d goods among the n agents such that σ is EFX for the bivalued valuation u and agent 0's bundle has additive value at most R.

theorem bivalued_efx_gadget_allocation_exists (R : ℕ) (hR : 2 ≤ R) (h : ℕ) (hh : 1 ≤ h) :
    let n := 1 + (R + 3) * h
    let d := 2 * (R + 1) * h
    let u : Fin n → Fin (2 * d) → ℝ := fun _ g => if (g : ℕ) < d then (R : ℝ) else 1
    ∃ σ : Fin (2 * d) → Fin n,
      is_efx_goods u σ ∧
      additive_valuation (u 0) (bundle_of σ 0) ≤ (R : ℝ)
bivalued_efx_gadget_mms_lowerIn LeanFair Division

On 2d goods where the first d goods have value R and the remaining d goods have value 1, the 1-out-of-d maximin share under additive valuation is at least R + 1, certified by the partition pairing good k with good d + k.

theorem bivalued_efx_gadget_mms_lower (d R : ℕ) (hd : 1 ≤ d) :
    (R : ℝ) + 1 ≤ maximin_share (additive_valuation (fun (g : Fin (2 * d)) => if (g : ℕ) < d then (R : ℝ) else 1)) d
bivalued_efx_sub_mms_instance_le_const_mul_agentsIn LeanFair Division

For R ≥ 2, any bivalued instance with n agents admitting an EFX allocation in which some agent's bundle is worth less than her 1-out-of-d maximin share satisfies d ≤ n · 2(R+1)/(R+3).

theorem bivalued_efx_sub_mms_instance_le_const_mul_agents (n R d : ℕ) (hR : 2 ≤ R)
    (h : has_bivalued_efx_sub_mms_instance n R d) :
    (d : ℝ) ≤ (n : ℝ) * (2 * ((R : ℝ) + 1) / ((R : ℝ) + 3))
bivalued_efx_sub_mms_instance_witness_sanityIn LeanFair Division

With two agents and item values in {1,2}, there is an instance whose complete EFX allocation leaves an agent below her 1-out-of-1 maximin share; concretely with a single item of value 1 for one agent and the other agent's bundle, an agent is envious only up to a good but still fails 1-out-of-1 MMS.

theorem bivalued_efx_sub_mms_instance_witness_sanity :
    has_bivalued_efx_sub_mms_instance 2 2 1
bivalued_efx_sub_mms_lower_boundIn LeanFair Division

For R ≥ 2 and n ≥ 4R+10, the extremal denominator is at least n·2(R+1)/(R+3) minus (2(R+1)+2).

theorem bivalued_efx_sub_mms_lower_bound (n R : ℕ) (hR : 2 ≤ R) (hn : 4 * R + 10 ≤ n) :
    (n : ℝ) * (2 * ((R : ℝ) + 1) / ((R : ℝ) + 3)) - (2 * ((R : ℝ) + 1) + 2)
      ≤ (bivalued_efx_sub_mms_max_d n R : ℝ)
bivalued_efx_sub_mms_max_d_ge_of_constructionIn LeanFair Division

If there is a bivalued instance with n = 1+(R+3)h agents and d = 2(R+1)h bundles, then max_d n R ≥ 2(R+1)h.

theorem bivalued_efx_sub_mms_max_d_ge_of_construction (R h : ℕ) (hR : 2 ≤ R) (hh : 1 ≤ h)
    (hinst : has_bivalued_efx_sub_mms_instance (1 + (R + 3) * h) R (2 * (R + 1) * h)) :
    2 * (R + 1) * h ≤ bivalued_efx_sub_mms_max_d (1 + (R + 3) * h) R
bivalued_efx_sub_mms_max_d_mono_agentsIn LeanFair Division

The extremal ordinal MMS denominator for bivalued EFX instances is monotone in the number of agents: for R ≥ 2 and n ≤ n', max_d n R ≤ max_d n' R.

theorem bivalued_efx_sub_mms_max_d_mono_agents (R : ℕ) (hR : 2 ≤ R) {n n' : ℕ} (hnn : n ≤ n') :
    bivalued_efx_sub_mms_max_d n R ≤ bivalued_efx_sub_mms_max_d n' R
bivalued_efx_sub_mms_tendsto_of_boundsIn LeanFair Division

If max_d n R ≤ n·α for all n and max_d n R ≥ n·α − C for all n ≥ 4R+10, then max_d n R / n tends to α = 2(R+1)/(R+3).

theorem bivalued_efx_sub_mms_tendsto_of_bounds (R : ℕ) (hR : 2 ≤ R)
    (hupper : ∀ n : ℕ, (bivalued_efx_sub_mms_max_d n R : ℝ)
      ≤ (n : ℝ) * (2 * ((R : ℝ) + 1) / ((R : ℝ) + 3)))
    (hlower : ∀ n : ℕ, 4 * R + 10 ≤ n →
      (n : ℝ) * (2 * ((R : ℝ) + 1) / ((R : ℝ) + 3)) - (2 * ((R : ℝ) + 1) + 2)
        ≤ (bivalued_efx_sub_mms_max_d n R : ℝ)) :
    Filter.Tendsto (fun n : ℕ => ((bivalued_efx_sub_mms_max_d n R : ℝ)) / (n : ℝ))
      Filter.atTop (nhds (2 * (R + 1 : ℝ) / (R + 3 : ℝ)))
bivalued_efx_sub_mms_upper_boundIn LeanFair Division

For R ≥ 2 and every n, bivalued_efx_sub_mms_max_d n R ≤ n · 2(R+1)/(R+3).

theorem bivalued_efx_sub_mms_upper_bound (n R : ℕ) (hR : 2 ≤ R) :
    (bivalued_efx_sub_mms_max_d n R : ℝ) ≤ (n : ℝ) * (2 * ((R : ℝ) + 1) / ((R : ℝ) + 3))
bivalued_sharp_lower_bound_mms_le_twoIn LeanFair Division

For any n ≥ 2, 1 < r ≤ 2, and agent i, the chore maximin share in the bivalued lower-bound instance is at most 2, achieved by a partition that pairs agent i's two cost-1 chores together in bundle 0 and gives each remaining chore its own bundle.

theorem bivalued_sharp_lower_bound_mms_le_two
    (n : ℕ) (hn : 2 ≤ n) (r : ℝ) (hr1 : 1 < r) (hr2 : r ≤ 2) (i : Fin n) :
    chore_maximin_share n (bivalued_sharp_lower_bound_cost n r i) ≤ 2
bivalued_sharp_lower_bound_mms_nonnegIn LeanFair Division

For any n ≥ 2 and r > 1, each agent's chore maximin share in the bivalued lower-bound instance is nonnegative because every chore cost is positive.

theorem bivalued_sharp_lower_bound_mms_nonneg
    (n : ℕ) (hn : 2 ≤ n) (r : ℝ) (hr1 : 1 < r) (i : Fin n) :
    0 ≤ chore_maximin_share n (bivalued_sharp_lower_bound_cost n r i)
bivalued_sharp_lower_bound_not_assigned_last_cost_geIn LeanFair Division

For n ≥ 2 and r > 1, any allocation σ assigning chore 1 to agent n-1 has some agent i whose bundle has total cost at least r + 1: either agent n-1 receives at least 2 chores (one being chore 1 of cost r), or agent n-1 receives only chore 1, in which case by pigeonhole some agent j < n-1 receives at least 2 chores (chore 1 is not in j's bundle, so at most one chore has cost 1).

theorem bivalued_sharp_lower_bound_not_assigned_last_cost_ge
    (n : ℕ) (hn : 2 ≤ n) (r : ℝ) (hr1 : 1 < r)
    (σ : Fin (n + 1) → Fin n) (hσ : σ ⟨1, by omega⟩ = ⟨n - 1, by omega⟩) :
    ∃ i : Fin n, r + 1 ≤ additive_valuation (bivalued_sharp_lower_bound_cost n r i) (bundle_of σ i)
bivalued_two_agent_efx_envy_free_one_sideIn LeanFair Division

For real r > 1 and natural numbers n1, n2, n3, n4, unless n1 = n2 = n4 = 0 and n3 is odd, there is a two-agent allocation in one of three weight-tie families in which agent 1 is envy-free, agent 0 is envy-free up to any good, and the unweighted welfare difference is nonnegative. Goods are of four types LL, LH, HL, HH, worth (1,1), (1,r), (r,1), (r,r) to agents 0 and 1, with n1, n2, n3, n4 goods of each type; agent 0 receives a ≤ n1, b ≤ n2, c ≤ n3, d ≤ n4 of them, inside one of the three weight-tie families (b = 0 ∧ c = n3) ∨ (a = 0 ∧ b = 0 ∧ d = 0) ∨ (a = n1 ∧ c = n3 ∧ d = n4). U0 = a + b + r·c + r·d and U1 = (n1−a) + (n2−b) + r·(n3−c) + r·(n4−d) are agent 0's values of its own and of agent 1's bundle (natural-number subtractions cast to ℝ); V0 = a + r·b + c + r·d and V1 = (n1−a) + r·(n2−b) + (n3−c) + r·(n4−d) are agent 1's values of agent 0's and of its own bundle. L0 = 1 if (n1 − a) + (n2 − b) ≥ 1, else r if (n3 − c) + (n4 − d) ≥ 1, else 0 (agent 0's value of the least valuable good in agent 1's bundle). Conclusion: U1 ≤ U0 + L0 ∧ V0 ≤ V1 ∧ 0 ≤ (U0 − U1) + (V1 − V0).

theorem bivalued_two_agent_efx_envy_free_one_side (n1 n2 n3 n4 : ℕ) (r : ℝ) (hr : 1 < r)
    (hn : ¬ (n1 = 0 ∧ n2 = 0 ∧ n4 = 0 ∧ n3 % 2 = 1)) :
    ∃ a b c d : ℕ, a ≤ n1 ∧ b ≤ n2 ∧ c ≤ n3 ∧ d ≤ n4 ∧
    ((b = 0 ∧ c = n3) ∨ (a = 0 ∧ b = 0 ∧ d = 0) ∨ (a = n1 ∧ c = n3 ∧ d = n4)) ∧
    (let U0 : ℝ := (a : ℝ) + (b : ℝ) + r * (c : ℝ) + r * (d : ℝ)
     let U1 : ℝ := ((n1 - a : ℕ) : ℝ) + ((n2 - b : ℕ) : ℝ) + r * ((n3 - c : ℕ) : ℝ)
       + r * ((n4 - d : ℕ) : ℝ)
     let V0 : ℝ := (a : ℝ) + r * (b : ℝ) + (c : ℝ) + r * (d : ℝ)
     let V1 : ℝ := ((n1 - a : ℕ) : ℝ) + r * ((n2 - b : ℕ) : ℝ) + ((n3 - c : ℕ) : ℝ)
       + r * ((n4 - d : ℕ) : ℝ)
     let L0 : ℝ := if (n1 - a) + (n2 - b) ≥ 1 then 1 else if (n3 - c) + (n4 - d) ≥ 1 then r else 0
     U1 ≤ U0 + L0 ∧ V0 ≤ V1 ∧ 0 ≤ (U0 - U1) + (V1 - V0))
bivalued_two_agent_efx_envy_free_zero_sideIn LeanFair Division

For real r > 1 and natural numbers n1, n2, n3, n4, unless n1 = n3 = n4 = 0 and n2 is odd, there is a two-agent allocation in one of three weight-tie families in which agent 0 is envy-free, agent 1 is envy-free up to any good, and the unweighted welfare difference is nonnegative. Goods are of four types LL, LH, HL, HH, worth (1,1), (1,r), (r,1), (r,r) to agents 0 and 1, with n1, n2, n3, n4 goods of each type; agent 0 receives a ≤ n1, b ≤ n2, c ≤ n3, d ≤ n4 of them, inside one of the three weight-tie families (b = 0 ∧ c = n3) ∨ (a = 0 ∧ b = 0 ∧ d = 0) ∨ (a = n1 ∧ c = n3 ∧ d = n4). U0 = a + b + r·c + r·d and U1 = (n1−a) + (n2−b) + r·(n3−c) + r·(n4−d) are agent 0's values of its own and of agent 1's bundle (natural-number subtractions cast to ℝ); V0 = a + r·b + c + r·d and V1 = (n1−a) + r·(n2−b) + (n3−c) + r·(n4−d) are agent 1's values of agent 0's and of its own bundle. L1 = 1 if a + c ≥ 1, else r if b + d ≥ 1, else 0 (agent 1's value of the least valuable good in agent 0's bundle). Conclusion: U1 ≤ U0 ∧ V0 ≤ V1 + L1 ∧ 0 ≤ (U0 − U1) + (V1 − V0).

theorem bivalued_two_agent_efx_envy_free_zero_side (n1 n2 n3 n4 : ℕ) (r : ℝ) (hr : 1 < r)
    (hn : ¬ (n1 = 0 ∧ n3 = 0 ∧ n4 = 0 ∧ n2 % 2 = 1)) :
    ∃ a b c d : ℕ, a ≤ n1 ∧ b ≤ n2 ∧ c ≤ n3 ∧ d ≤ n4 ∧
    ((b = 0 ∧ c = n3) ∨ (a = 0 ∧ b = 0 ∧ d = 0) ∨ (a = n1 ∧ c = n3 ∧ d = n4)) ∧
    (let U0 : ℝ := (a : ℝ) + (b : ℝ) + r * (c : ℝ) + r * (d : ℝ)
     let U1 : ℝ := ((n1 - a : ℕ) : ℝ) + ((n2 - b : ℕ) : ℝ) + r * ((n3 - c : ℕ) : ℝ)
       + r * ((n4 - d : ℕ) : ℝ)
     let V0 : ℝ := (a : ℝ) + r * (b : ℝ) + (c : ℝ) + r * (d : ℝ)
     let V1 : ℝ := ((n1 - a : ℕ) : ℝ) + r * ((n2 - b : ℕ) : ℝ) + ((n3 - c : ℕ) : ℝ)
       + r * ((n4 - d : ℕ) : ℝ)
     let L1 : ℝ := if a + c ≥ 1 then 1 else if b + d ≥ 1 then r else 0
     U1 ≤ U0 ∧ V0 ≤ V1 + L1 ∧ 0 ≤ (U0 - U1) + (V1 - V0))
bivalued_two_agent_efx_envy_free_zero_side_f1In LeanFair Division

For real r > 1 and natural numbers n1, n2, n3, n4, in the intermediate regime where Family 2 contains no envy-free allocation for agent 0 but allocating all LL, HL, and HH goods makes agent 0 envy-free, there exists an allocation in Family 1 (b=0, c=n3) satisfying agent 0 envy-freeness, agent 1 EFX, and nonnegative welfare difference.

theorem bivalued_two_agent_efx_envy_free_zero_side_f1
    (n1 n2 n3 n4 : ℕ) (r : ℝ) (hr : 1 < r)
    (hf2 : ∀ c ≤ n3, r * (c : ℝ) < (n1 : ℝ) + (n2 : ℝ) + r * ((n3 - c : ℕ) : ℝ) + r * (n4 : ℝ))
    (hf3 : (n2 : ℝ) ≤ (n1 : ℝ) + r * (n3 : ℝ) + r * (n4 : ℝ)) :
    ∃ a b c d : ℕ, a ≤ n1 ∧ b ≤ n2 ∧ c ≤ n3 ∧ d ≤ n4 ∧
    ((b = 0 ∧ c = n3) ∨ (a = 0 ∧ b = 0 ∧ d = 0) ∨ (a = n1 ∧ c = n3 ∧ d = n4)) ∧
    (let U0 : ℝ := (a : ℝ) + (b : ℝ) + r * (c : ℝ) + r * (d : ℝ)
     let U1 : ℝ := ((n1 - a : ℕ) : ℝ) + ((n2 - b : ℕ) : ℝ) + r * ((n3 - c : ℕ) : ℝ)
       + r * ((n4 - d : ℕ) : ℝ)
     let V0 : ℝ := (a : ℝ) + r * (b : ℝ) + (c : ℝ) + r * (d : ℝ)
     let V1 : ℝ := ((n1 - a : ℕ) : ℝ) + r * ((n2 - b : ℕ) : ℝ) + ((n3 - c : ℕ) : ℝ)
       + r * ((n4 - d : ℕ) : ℝ)
     let L1 : ℝ := if a + c ≥ 1 then 1 else if b + d ≥ 1 then r else 0
     U1 ≤ U0 ∧ V0 ≤ V1 + L1 ∧ 0 ≤ (U0 - U1) + (V1 - V0))
bivalued_two_agent_efx_envy_free_zero_side_f2In LeanFair Division

For real r > 1 and natural numbers n1, n2, n3, n4, if some allocation in Family 2 (a=0, b=0, d=0, c <= n3) makes agent 0 envy-free, then there exists an allocation in the three families satisfying agent 0 envy-freeness, agent 1 EFX, and nonnegative welfare difference.

theorem bivalued_two_agent_efx_envy_free_zero_side_f2
    (n1 n2 n3 n4 : ℕ) (r : ℝ) (hr : 1 < r)
    (hc : ∃ c ≤ n3,
      ((n1 : ℝ) + (n2 : ℝ) + r * ((n3 - c : ℕ) : ℝ) + r * (n4 : ℝ) ≤ r * (c : ℝ))) :
    ∃ a b c d : ℕ, a ≤ n1 ∧ b ≤ n2 ∧ c ≤ n3 ∧ d ≤ n4 ∧
    ((b = 0 ∧ c = n3) ∨ (a = 0 ∧ b = 0 ∧ d = 0) ∨ (a = n1 ∧ c = n3 ∧ d = n4)) ∧
    (let U0 : ℝ := (a : ℝ) + (b : ℝ) + r * (c : ℝ) + r * (d : ℝ)
     let U1 : ℝ := ((n1 - a : ℕ) : ℝ) + ((n2 - b : ℕ) : ℝ) + r * ((n3 - c : ℕ) : ℝ)
       + r * ((n4 - d : ℕ) : ℝ)
     let V0 : ℝ := (a : ℝ) + r * (b : ℝ) + (c : ℝ) + r * (d : ℝ)
     let V1 : ℝ := ((n1 - a : ℕ) : ℝ) + r * ((n2 - b : ℕ) : ℝ) + ((n3 - c : ℕ) : ℝ)
       + r * ((n4 - d : ℕ) : ℝ)
     let L1 : ℝ := if a + c ≥ 1 then 1 else if b + d ≥ 1 then r else 0
     U1 ≤ U0 ∧ V0 ≤ V1 + L1 ∧ 0 ≤ (U0 - U1) + (V1 - V0))
bivalued_two_agent_efx_envy_free_zero_side_f3In LeanFair Division

For real r > 1 and natural numbers n1, n2, n3, n4, if agent 0 remains envious even after receiving all LL, HL, and HH goods, choosing minimal b in Family 3 (a=n1, c=n3, d=n4) satisfies agent 0 envy-freeness, agent 1 EFX, and nonnegative welfare difference, using hn to avoid the excluded odd all-LH case.

theorem bivalued_two_agent_efx_envy_free_zero_side_f3
    (n1 n2 n3 n4 : ℕ) (r : ℝ) (hr : 1 < r)
    (hn : ¬ (n1 = 0 ∧ n3 = 0 ∧ n4 = 0 ∧ n2 % 2 = 1))
    (h_cond : (n1 : ℝ) + r * (n3 : ℝ) + r * (n4 : ℝ) < (n2 : ℝ)) :
    ∃ a b c d : ℕ, a ≤ n1 ∧ b ≤ n2 ∧ c ≤ n3 ∧ d ≤ n4 ∧
    ((b = 0 ∧ c = n3) ∨ (a = 0 ∧ b = 0 ∧ d = 0) ∨ (a = n1 ∧ c = n3 ∧ d = n4)) ∧
    (let U0 : ℝ := (a : ℝ) + (b : ℝ) + r * (c : ℝ) + r * (d : ℝ)
     let U1 : ℝ := ((n1 - a : ℕ) : ℝ) + ((n2 - b : ℕ) : ℝ) + r * ((n3 - c : ℕ) : ℝ)
       + r * ((n4 - d : ℕ) : ℝ)
     let V0 : ℝ := (a : ℝ) + r * (b : ℝ) + (c : ℝ) + r * (d : ℝ)
     let V1 : ℝ := ((n1 - a : ℕ) : ℝ) + r * ((n2 - b : ℕ) : ℝ) + ((n3 - c : ℕ) : ℝ)
       + r * ((n4 - d : ℕ) : ℝ)
     let L1 : ℝ := if a + c ≥ 1 then 1 else if b + d ≥ 1 then r else 0
     U1 ≤ U0 ∧ V0 ≤ V1 + L1 ∧ 0 ≤ (U0 - U1) + (V1 - V0))
bivalued_two_agent_efx_family_feasible_allIn LeanFair Division

For every r > 1, every positive scales a0, a1 and every type counts n1, n2, n3, n4, the EFX two-agent family arithmetic bivalued_two_agent_efx_family_feasible n1 n2 n3 n4 r a0 a1 holds: some allocation from one of the three weight-tie families is EFX for the normalized values and meets the subsidy aggregate inequality.

theorem bivalued_two_agent_efx_family_feasible_all (r a0 a1 : ℝ) (hr : 1 < r) (h0 : 0 < a0) (h1 : 0 < a1)
    (n1 n2 n3 n4 : ℕ) : bivalued_two_agent_efx_family_feasible n1 n2 n3 n4 r a0 a1
bivalued_two_agent_family_feasible_sanityIn LeanFair Division

Non-vacuity of the arithmetic predicate: it holds for one good of each of the four types with r = 2 and equal scales, and it holds for the empty instance.

theorem bivalued_two_agent_family_feasible_sanity :
    bivalued_two_agent_family_feasible 1 1 1 1 2 1 1 ∧ bivalued_two_agent_family_feasible 0 0 0 0 2 1 1
block_snake_draft_rule_satisfies_ef1_nel_aauIn LeanFair Division

For any natural numbers n, k, and r with r < n, and any draw permutation π of Fin n, the draft rule induced by the block-snake sequence block_snake_seq n k r hr π with agent type Fin n and object type Fin (k * n + r) satisfies is_ef1_rule, is_nel_rule, and is_aau_rule.

theorem block_snake_draft_rule_satisfies_ef1_nel_aau (n k r : ℕ) (hr : r < n)
    (π : Equiv.Perm (Fin n)) :
    is_ef1_rule (draft_rule (Agent := Fin n) (Object := Fin (k * n + r)) (block_snake_seq n k r hr π)) ∧
    is_nel_rule (draft_rule (Agent := Fin n) (Object := Fin (k * n + r)) (block_snake_seq n k r hr π)) ∧
    is_aau_rule (draft_rule (Agent := Fin n) (Object := Fin (k * n + r)) (block_snake_seq n k r hr π))
bundle_card_succ_countIn LeanFair Division

For n > 0, r < n, a non-wasteful EF1 rule on n agents and k * n + r objects gives exactly r agents bundles of size k + 1, and the remaining n - r agents bundles of size k.

theorem bundle_card_succ_count (n k r : ℕ) (hn : 0 < n) (hr : r < n)
    (f : (Fin n → LinearOrder (Fin (k * n + r))) → Fin n → Finset (Fin (k * n + r)))
    (h_alloc : is_allocation_rule f) (h_nw : is_non_wasteful_rule f) (h_ef1 : is_ef1_rule f)
    (succ : Fin n → LinearOrder (Fin (k * n + r))) :
    (Finset.univ.filter (fun i : Fin n => (f succ i).card = k + 1)).card = r
card_fun_perm_eqIn LeanFair Division

The number of preference profiles for n agents each ranking m goods strictly is (m!)^n.

theorem card_fun_perm_eq (n m : ℕ) :
    Fintype.card (Fin n → Fin m ≃ Fin m) = (Nat.factorial m) ^ n
chore_insertion_bundle_valuation_eq_sumIn LeanFair Division

The additive valuation of agent j's bundle under chore_insertion_allocation σ c m from the perspective of agent i equals the sum of costs c i (slots k) over all slots k < m owned by agent j (where σ k = j).

theorem chore_insertion_bundle_valuation_eq_sum {n : ℕ} (σ : ℕ → Fin n) (c : Fin n → ℕ → ℝ) (m : ℕ) (i j : Fin n) :
    additive_valuation (fun (d : Fin m) => c i d.val) (bundle_of (chore_insertion_allocation σ c m) j) =
      ∑ k ∈ (Finset.range m).filter (fun k => σ k = j), c i (chore_insertion_slots σ c m k)
chore_insertion_slots_cost_le_of_ltIn LeanFair Division

For any picking sequence σ, cost profile c, and prefix length m, any earlier slot k < l < m holds a chore that is weakly cheaper for slot k's owner σ k than the chore in slot l.

theorem chore_insertion_slots_cost_le_of_lt {n : ℕ} (σ : ℕ → Fin n) (c : Fin n → ℕ → ℝ) (m : ℕ) (k l : ℕ) (hkl : k < l) (hl : l < m) :
    c (σ k) (chore_insertion_slots σ c m k) ≤ c (σ k) (chore_insertion_slots σ c m l)
collinear_six_class_convexIn LeanFair Division

If two bit functions b1, b2 on {0,...,5} are each monotone or antitone, then every class of the pair (b1,b2) is an interval: if indices i ≤ j ≤ k have the same pair of bits at i and at k, they have that pair at j as well.

theorem collinear_six_class_convex (b1 b2 : Fin 6 → Bool)
    (h1 : Monotone b1 ∨ Antitone b1) (h2 : Monotone b2 ∨ Antitone b2) :
    ∀ i j k : Fin 6, i ≤ j → j ≤ k → (b1 i, b2 i) = (b1 k, b2 k) →
      (b1 j, b2 j) = (b1 i, b2 i)
collinear_six_not_two_cuts_carrierIn LeanFair Division

Let ℓ contain all six points (0,0),...,(5,0) -- so ℓ is the x-axis and its side bit is free at every point -- and let m be another line that does not contain them all. Then no choice of bits s and allocation α consistent with (ℓ,m) gives every agent exactly one red and one blue point.

theorem collinear_six_not_two_cuts_carrier (ℓ m : StraightLine) (α : (ℝ × ℝ) → Fin 3)
    (s : StraightLine → (ℝ × ℝ) → Bool)
    (hcarrier : ∀ i : Fin 6, ℓ.cut ((((i : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) = 0)
    (hne_m : ∃ i : Fin 6, m.cut ((((i : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) ≠ 0)
    (hsign : ∀ (ℓ' : StraightLine), (ℓ' = ℓ ∨ ℓ' = m) → ∀ i : Fin 6,
      (0 < ℓ'.cut ((((i : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) →
        s ℓ' ((((i : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) = true) ∧
      (ℓ'.cut ((((i : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) < 0 →
        s ℓ' ((((i : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) = false))
    (hcons : ∀ i j : Fin 6,
      s ℓ ((((i : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) = s ℓ ((((j : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) →
      s m ((((i : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) = s m ((((j : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) →
      α ((((i : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) = α ((((j : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ))
    (hfair : ∀ a : Fin 3,
      (collinear_six_points.filter (fun p => α p = a ∧ collinear_six_coloring p = 0)).card = 1 ∧
      (collinear_six_points.filter (fun p => α p = a ∧ collinear_six_coloring p = 1)).card = 1) :
    False
collinear_six_not_two_cuts_non_carrierIn LeanFair Division

Let ℓ and m be two straight lines, neither of which contains any of the six points (0,0),...,(5,0) -- equivalently both cut functionals are nonzero at all six points. If s is a choice of side bits consistent with ℓ and m, α is an allocation consistent with (ℓ,m) on the six points, and every agent gets exactly one red and one blue point, then contradiction.

theorem collinear_six_not_two_cuts_non_carrier (ℓ m : StraightLine) (α : (ℝ × ℝ) → Fin 3)
    (s : StraightLine → (ℝ × ℝ) → Bool)
    (hne_ℓ : ∃ i : Fin 6, ℓ.cut ((((i : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) ≠ 0)
    (hne_m : ∃ i : Fin 6, m.cut ((((i : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) ≠ 0)
    (hsign : ∀ (ℓ' : StraightLine), (ℓ' = ℓ ∨ ℓ' = m) → ∀ i : Fin 6,
      (0 < ℓ'.cut ((((i : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) →
        s ℓ' ((((i : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) = true) ∧
      (ℓ'.cut ((((i : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) < 0 →
        s ℓ' ((((i : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) = false))
    (hcons : ∀ i j : Fin 6,
      s ℓ ((((i : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) = s ℓ ((((j : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) →
      s m ((((i : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) = s m ((((j : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) →
      α ((((i : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) = α ((((j : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ))
    (hfair : ∀ a : Fin 3,
      (collinear_six_points.filter (fun p => α p = a ∧ collinear_six_coloring p = 0)).card = 1 ∧
      (collinear_six_points.filter (fun p => α p = a ∧ collinear_six_coloring p = 1)).card = 1) :
    False
collinear_six_points_card_and_colorsIn LeanFair Division

The set {(0,0),...,(5,0)} has six elements, of which exactly three are coloured red (x < 3) and three blue (x ≥ 3).

theorem collinear_six_points_card_and_colors :
    collinear_six_points.card = 6 ∧
    (collinear_six_points.filter (fun p => collinear_six_coloring p = 0)).card = 3 ∧
    (collinear_six_points.filter (fun p => collinear_six_coloring p = 1)).card = 3
collinear_six_sign_bit_monotoneIn LeanFair Division

Let ℓ be a straight line and s a choice of side bit consistent with ℓ (true strictly above, false strictly below). If ℓ does not contain all six points (0,0),...,(5,0), then the six bits s ℓ (i,0), for i = 0..5, are either nondecreasing or nonincreasing in i. In other words each line induces at most one side change along the collinear set, not an arbitrary pattern.

theorem collinear_six_sign_bit_monotone (ℓ : StraightLine)
    (s : StraightLine → (ℝ × ℝ) → Bool)
    (hs : ∀ i : Fin 6,
      (0 < ℓ.cut ((((i : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) →
        s ℓ ((((i : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) = true) ∧
      (ℓ.cut ((((i : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) < 0 →
        s ℓ ((((i : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) = false))
    (hne : ∃ i : Fin 6, ℓ.cut ((((i : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ) ≠ 0) :
    Monotone (fun i : Fin 6 => s ℓ ((((i : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ)) ∨
    Antitone (fun i : Fin 6 => s ℓ ((((i : ℕ) : ℝ), (0 : ℝ)) : ℝ × ℝ))
const_zero_is_consistentIn LeanFair Division

In the two-agent chore allocation setting, the algorithm assigning every chore to agent 0 is a consistent online allocator.

lemma const_zero_is_consistent :
    is_consistent_online_allocator (fun _m _c _t => 0)
critical_balanced_chore_splitIn LeanFair Division

For n at least four, there are 2n+1 chores and each of n agents designates n+1 chores high. There exist a chore e that is low for at least one agent and a set A of n other chores such that: every agent for whom e is high has at least two low chores in A and at least two low chores outside A and e; every agent for whom e is low has at least one low chore in each of those two sets.

theorem critical_balanced_chore_split (n : ℕ) (hn : 4 ≤ n) (H : Fin n → Finset (Fin (2*n+1))) (hH : ∀ i, (H i).card = n+1) : ∃ (e : Fin (2*n+1)) (A : Finset (Fin (2*n+1))), A.card = n ∧ e ∉ A ∧ (∃ i, e ∉ H i) ∧ ∀ i, (if e ∈ H i then 2 else 1) ≤ (((Finset.univ \ H i) ∩ A).card) ∧ (if e ∈ H i then 2 else 1) ≤ (((Finset.univ \ H i) \ (insert e A)).card)
critical_balanced_chore_split_fourIn LeanFair Division

For n equal to four, there are 2n+1 chores and each of n agents designates n+1 chores high. There exist a chore e that is low for at least one agent and a set A of n other chores such that: every agent for whom e is high has at least two low chores in A and at least two low chores outside A and e; every agent for whom e is low has at least one low chore in each of those two sets.

theorem critical_balanced_chore_split_four (n : ℕ) (hn : n = 4) (H : Fin n → Finset (Fin (2*n+1))) (hH : ∀ i, (H i).card = n+1) : ∃ (e : Fin (2*n+1)) (A : Finset (Fin (2*n+1))), A.card = n ∧ e ∉ A ∧ (∃ i, e ∉ H i) ∧ ∀ i, (if e ∈ H i then 2 else 1) ≤ (((Finset.univ \ H i) ∩ A).card) ∧ (if e ∈ H i then 2 else 1) ≤ (((Finset.univ \ H i) \ (insert e A)).card)
critical_equal_weight_allocation_familyIn LeanFair Division

For n at least three and 2n+1 chores, suppose every agent designates n+1 chores high. There exist n allocations such that every chore goes once to each agent across the allocations, agent i receives three chores in round i and two in every other round, and her three-chore bundle in round i contains at most one chore she designates high.

theorem critical_equal_weight_allocation_family (n : ℕ) (hn : 3 ≤ n) (H : Fin n → Finset (Fin (2*n+1))) (hH : ∀ i, (H i).card = n+1) : ∃ F : Fin n → Fin (2*n+1) → Fin n, (∀ g, Function.Bijective (fun t => F t g)) ∧ (∀ t i, (bundle_of (F t) i).card = if i = t then 3 else 2) ∧ ∀ t, ((bundle_of (F t) t) ∩ H t).card ≤ 1
critical_equal_weight_allocation_family_at_least_fourIn LeanFair Division

For n at least four and 2n+1 chores, suppose every agent designates n+1 chores high. There exist n allocations such that every chore goes once to each agent across the allocations, agent i receives three chores in round i and two in every other round, and her three-chore bundle in round i contains at most one chore she designates high.

theorem critical_equal_weight_allocation_family_at_least_four (n : ℕ) (hn : 4 ≤ n) (H : Fin n → Finset (Fin (2*n+1))) (hH : ∀ i, (H i).card = n+1) : ∃ F : Fin n → Fin (2*n+1) → Fin n, (∀ g, Function.Bijective (fun t => F t g)) ∧ (∀ t i, (bundle_of (F t) i).card = if i = t then 3 else 2) ∧ ∀ t, ((bundle_of (F t) t) ∩ H t).card ≤ 1
critical_good_pairing_at_least_elevenIn LeanFair Division

For n at least eleven with 2n+1 chores and n+1 high chores per agent, one can choose an extra chore that is low for some agent and pair all remaining chores so that every agent has at least two pairs which, together with the extra chore, contain at most one high chore.

theorem critical_good_pairing_at_least_eleven (n : ℕ) (hn : 11 ≤ n) (H : Fin n → Finset (Fin (2*n+1))) (hH : ∀ i, (H i).card = n+1) : ∃ (e : Fin (2*n+1)) (p : Equiv.Perm (Fin (2*n+1))), p e = e ∧ (∀ g, g ≠ e → p g ≠ g) ∧ (∀ g, p (p g) = g) ∧ (∃ i, e ∉ H i) ∧ ∀ i, 2 ≤ (Finset.univ.filter (fun g => g < p g ∧ if e ∈ H i then g ∉ H i ∧ p g ∉ H i else g ∉ H i ∨ p g ∉ H i)).card
cyclic_remainder_low_quota_allocation_familyIn LeanFair Division

For n at least three, K at least two and 1<=s<n, let m=(K-1)n+s and let every agent designate an arbitrary set of low chores. There are n allocations in which each chore visits each agent once, agent i receives K chores in round t exactly when (i+n-t) modulo n is less than s and K-1 otherwise, and every K-chore bundle of agent i contains at least max(0, min(K,floor(number of her designated lows / s))-floor(K/2)) designated lows.

theorem cyclic_remainder_low_quota_allocation_family (n K s : ℕ) (hn : 3 ≤ n) (hK : 2 ≤ K) (hs1 : 1 ≤ s) (hsn : s < n) (L : Fin n → Finset (Fin ((K-1)*n+s))) : ∃ F : Fin n → Fin ((K-1)*n+s) → Fin n, (∀ g, Function.Bijective (fun t => F t g)) ∧ (∀ t i, (bundle_of (F t) i).card = if (i.val+n-t.val)%n < s then K else K-1) ∧ ∀ t i, (i.val+n-t.val)%n < s → min K ((L i).card / s) - K/2 ≤ ((bundle_of (F t) i ∩ L i).card)
draft_alloc_biUnionIn LeanFair Division

The draft never wastes an object: if the picking list is exactly as long as the set of remaining objects, the union of all final bundles is the whole remaining set.

theorem draft_alloc_biUnion {Agent Object : Type*} [Fintype Agent] [DecidableEq Agent]
    [DecidableEq Object] (succ : Agent → LinearOrder Object) (l : List Agent)
    (rem : Finset Object) (hlen : l.length = rem.card) :
    Finset.univ.biUnion (draft_alloc succ l rem) = rem
draft_alloc_objectwise_mmIn LeanFair Division

Objectwise Maskin monotonicity for the draft: if every agent ranks every object strictly below each object she actually receives exactly as before, the draft produces the same allocation.

theorem draft_alloc_objectwise_mm {Agent Object : Type*} [DecidableEq Agent] [DecidableEq Object]
    (succ succ' : Agent → LinearOrder Object) (l : List Agent) (rem : Finset Object)
    (h : ∀ (i : Agent), ∀ y ∈ draft_alloc succ l rem i, ∀ z : Object,
      (succ i).lt z y → (succ' i).lt z y) :
    draft_alloc succ' l rem = draft_alloc succ l rem
draft_alloc_relabelIn LeanFair Division

Relabelling objects by a permutation σ and relabelling every preference order by σ.symm commutes with the draft: the resulting bundle is the σ-image of the original bundle.

theorem draft_alloc_relabel {Agent Object : Type*} [DecidableEq Agent] [DecidableEq Object]
    (σ : Equiv.Perm Object) (succ : Agent → LinearOrder Object) (l : List Agent)
    (rem : Finset Object) (i : Agent) :
    draft_alloc (fun j => @Equiv.linearOrder Object Object σ.symm (succ j) _)
        l (rem.map σ.toEmbedding) i
      = (draft_alloc succ l rem i).map σ.toEmbedding
draft_enum_order_ltIn LeanFair Division

In the order of a unanimous profile induced by e, x is strictly below y exactly when y has the smaller index, i.e. y is the better object.

theorem draft_enum_order_lt {Object : Type*} [DecidableEq Object] {T : ℕ} (e : Object ≃ Fin T) (x y : Object) :
    (draft_enum_order e).lt x y ↔ e y < e x
draft_pick_list_specIn LeanFair Division

If the picking list has as many entries as the remaining set has objects, then the draft makes exactly that many picks, no object is picked twice, and the picks are exactly the remaining objects.

theorem draft_pick_list_spec {Agent Object : Type*} [DecidableEq Agent] [DecidableEq Object]
    (succ : Agent → LinearOrder Object) (l : List Agent) (rem : Finset Object)
    (hlen : l.length = rem.card) :
    (draft_pick_list succ l rem).length = l.length ∧
      (draft_pick_list succ l rem).Nodup ∧
      (draft_pick_list succ l rem).toFinset = rem
draft_rule_axiomsIn LeanFair Division

Every draft rule is non-wasteful, neutral, and satisfies objectwise Maskin monotonicity.

theorem draft_rule_axioms {Agent Object : Type*} [Fintype Agent] [Fintype Object]
    [DecidableEq Agent] [DecidableEq Object] (s : Fin (Fintype.card Object) → Agent) :
    is_non_wasteful_rule (draft_rule (Agent := Agent) (Object := Object) s) ∧
      is_neutral_rule (draft_rule (Agent := Agent) (Object := Object) s) ∧
      satisfies_objectwise_mm (draft_rule (Agent := Agent) (Object := Object) s)
draft_rule_block_snake_characterizationIn LeanFair Division

For any natural numbers n, k, and r with r < n, a draft rule induced by a picking sequence s : Fin (k * n + r) → Fin n (with agent type Fin n and object type Fin (k * n + r)) satisfies is_ef1_rule, is_nel_rule, and is_aau_rule if and only if there exists a permutation π : Equiv.Perm (Fin n) such that s equals the block-snake sequence block_snake_seq n k r hr π.

theorem draft_rule_block_snake_characterization (n k r : ℕ) (hr : r < n)
    (s : Fin (k * n + r) → Fin n) :
    is_ef1_rule (draft_rule (Agent := Fin n) (Object := Fin (k * n + r)) s) ∧
    is_nel_rule (draft_rule (Agent := Fin n) (Object := Fin (k * n + r)) s) ∧
    is_aau_rule (draft_rule (Agent := Fin n) (Object := Fin (k * n + r)) s) ↔
    ∃ π : Equiv.Perm (Fin n), s = block_snake_seq n k r hr π
draft_rule_characterizationIn LeanFair Division

Given finite types Agent and Object with decidable equality on both, a rule f : (Agent -> LinearOrder Object) -> Agent -> Finset Object satisfying is_allocation_rule f is non-wasteful (is_non_wasteful_rule f), neutral (is_neutral_rule f), and satisfies object-wise Maskin monotonicity (satisfies_objectwise_mm f) if and only if there exists a picking sequence s : Fin (Fintype.card Object) -> Agent such that f = draft_rule s.

theorem draft_rule_characterization {Agent Object : Type*}
    [Fintype Agent] [Fintype Object] [DecidableEq Agent] [DecidableEq Object]
    (f : (Agent → LinearOrder Object) → Agent → Finset Object)
    (h_alloc : is_allocation_rule f) :
    is_non_wasteful_rule f ∧ is_neutral_rule f ∧ satisfies_objectwise_mm f ↔
      ∃ s : Fin (Fintype.card Object) → Agent, f = draft_rule s
draft_rule_manipulable_of_separated_picksIn LeanFair Division

If a picking sequence s has an agent i with non-consecutive picks (turns p < q with s p = s q = i separated by an intervening turn m with s m ≠ i), then the draft rule induced by s is not weakly strategy-proof under pairwise dominance.

theorem draft_rule_manipulable_of_separated_picks (n k r : ℕ)
    (s : Fin (k * n + r) → Fin n)
    (hsep : ∃ (i : Fin n) (p q : Fin (k * n + r)), p < q ∧ s p = i ∧ s q = i ∧
      ∃ (m : Fin (k * n + r)), p < m ∧ m < q ∧ s m ≠ i) :
    ¬ is_weakly_strategy_proof_rule (draft_rule (Agent := Fin n) (Object := Fin (k * n + r)) s)
draft_rule_of_axiomsIn LeanFair Division

Any allocation rule that is non-wasteful, neutral, and satisfies object-wise Maskin monotonicity is a draft rule for some picking sequence.

theorem draft_rule_of_axioms {Agent Object : Type*}
    [Fintype Agent] [Fintype Object] [DecidableEq Agent] [DecidableEq Object]
    (f : (Agent → LinearOrder Object) → Agent → Finset Object)
    (h_alloc : is_allocation_rule f)
    (h_nw : is_non_wasteful_rule f)
    (h_neut : is_neutral_rule f)
    (h_mm : satisfies_objectwise_mm f) :
    ∃ s : Fin (Fintype.card Object) → Agent, f = draft_rule s
ef1_bundle_card_le_succIn LeanFair Division

If a rule is EF1, then at every profile any agent's bundle has cardinality at most one more than any other agent's bundle.

theorem ef1_bundle_card_le_succ {Agent Object : Type*} [DecidableEq Object]
    (f : (Agent → LinearOrder Object) → Agent → Finset Object)
    (h_ef1 : is_ef1_rule f) (succ : Agent → LinearOrder Object) (i j : Agent) :
    (f succ j).card ≤ (f succ i).card + 1
ef1_draft_rule_has_separated_picksIn LeanFair Division

For n ≥ 3, k ≥ 2, and r < n, any picking sequence s inducing an EF1 draft rule must contain separated picks (some agent i picks at turns p < q with an intervening turn m belonging to another agent).

theorem ef1_draft_rule_has_separated_picks (n k r : ℕ) (hn : 3 ≤ n) (hk : 2 ≤ k) (hr : r < n)
    (s : Fin (k * n + r) → Fin n)
    (hef1 : is_ef1_rule (draft_rule (Agent := Fin n) (Object := Fin (k * n + r)) s)) :
    ∃ (i : Fin n) (p q : Fin (k * n + r)), p < q ∧ s p = i ∧ s q = i ∧
      ∃ (m : Fin (k * n + r)), p < m ∧ m < q ∧ s m ≠ i
efx_allsource_pair_no_0_natIn LeanFair Division

No EFX completion can split only pair 0.

theorem efx_allsource_pair_no_0_nat (q : Fin 6 → Fin 4) : ¬ efx_allsource_pair_feasible_nat (efx_allsource_pair_code 0 q)
efx_allsource_pair_no_1_natIn LeanFair Division

No EFX completion can split only pair 1.

theorem efx_allsource_pair_no_1_nat (q : Fin 6 → Fin 4) : ¬ efx_allsource_pair_feasible_nat (efx_allsource_pair_code 1 q)
efx_allsource_pair_no_2_natIn LeanFair Division

No EFX completion can split only pair 2.

theorem efx_allsource_pair_no_2_nat (q : Fin 6 → Fin 4) : ¬ efx_allsource_pair_feasible_nat (efx_allsource_pair_code 2 q)
efx_allsource_pair_no_3_natIn LeanFair Division

No EFX completion can split only pair 3.

theorem efx_allsource_pair_no_3_nat (q : Fin 6 → Fin 4) : ¬ efx_allsource_pair_feasible_nat (efx_allsource_pair_code 3 q)
efx_allsource_pair_two_splitsIn LeanFair Division

Every complete EFX allocation splits at least two old pairs, even without a utility-preservation condition.

theorem efx_allsource_pair_two_splits (σ : Fin 9 → Fin 4)
  (hefx : is_efx_goods (fun i g => (efx_allsource_pair_values i g : ℝ)) σ) :
  ∃ a b : Fin 4, a ≠ b ∧
    σ (![0,2,4,6] a) ≠ σ (![1,3,5,7] a) ∧
    σ (![0,2,4,6] b) ≠ σ (![1,3,5,7] b)
efx_allsource_three_pair_no_0_natIn LeanFair Division

No EFX completion splits only the original pairs designated by index 0.

theorem efx_allsource_three_pair_no_0_nat (q : Fin 7 → Fin 4) : ¬ efx_allsource_three_pair_feasible_nat (efx_allsource_three_pair_code 0 q)
efx_allsource_three_pair_no_1_natIn LeanFair Division

No EFX completion splits only the original pairs designated by index 1.

theorem efx_allsource_three_pair_no_1_nat (q : Fin 7 → Fin 4) : ¬ efx_allsource_three_pair_feasible_nat (efx_allsource_three_pair_code 1 q)
efx_allsource_three_pair_no_2_natIn LeanFair Division

No EFX completion splits only the original pairs designated by index 2.

theorem efx_allsource_three_pair_no_2_nat (q : Fin 7 → Fin 4) : ¬ efx_allsource_three_pair_feasible_nat (efx_allsource_three_pair_code 2 q)
efx_allsource_three_pair_no_3_natIn LeanFair Division

No EFX completion splits only the original pairs designated by index 3.

theorem efx_allsource_three_pair_no_3_nat (q : Fin 7 → Fin 4) : ¬ efx_allsource_three_pair_feasible_nat (efx_allsource_three_pair_code 3 q)
efx_allsource_three_pair_no_4_natIn LeanFair Division

No EFX completion splits only the original pairs designated by index 4.

theorem efx_allsource_three_pair_no_4_nat (q : Fin 7 → Fin 4) : ¬ efx_allsource_three_pair_feasible_nat (efx_allsource_three_pair_code 4 q)
efx_allsource_three_pair_no_5_natIn LeanFair Division

No EFX completion splits only the original pairs designated by index 5.

theorem efx_allsource_three_pair_no_5_nat (q : Fin 7 → Fin 4) : ¬ efx_allsource_three_pair_feasible_nat (efx_allsource_three_pair_code 5 q)
efx_allsource_three_pair_perturbed_requires_threeIn LeanFair Division

Every complete EFX allocation of the nondegenerate perturbed instance splits at least three old pairs.

theorem efx_allsource_three_pair_perturbed_requires_three (σ : Fin 9 → Fin 4)
  (hσ : is_efx_goods (fun i g => (efx_allsource_three_pair_perturbed_values i g : ℝ)) σ) :
  ∀ a b : Fin 4, a ≠ b →
    σ (![0,2,4,6] a) ≠ σ (![1,3,5,7] a) ∨
    σ (![0,2,4,6] b) ≠ σ (![1,3,5,7] b)
efx_allsource_three_pair_requires_threeIn LeanFair Division

Every complete EFX allocation splits at least three of the four original pairs.

theorem efx_allsource_three_pair_requires_three (σ : Fin 9 → Fin 4)
  (hefx : is_efx_goods (fun i g => (efx_allsource_three_pair_values i g : ℝ)) σ) :
  ∀ a b : Fin 4, a ≠ b →
    σ (![0,2,4,6] a) ≠ σ (![1,3,5,7] a) ∨
    σ (![0,2,4,6] b) ≠ σ (![1,3,5,7] b)
efx_anchor_family_forces_structureIn LeanFair Division

Any individually rational partial EFX allocation in the anchor family has the original seven-good ownership, assigns every lock to agent 3, and assigns exactly r anchors to each original agent.

theorem efx_anchor_family_forces_structure (r s : ℕ) (hr : 0 < r) (hs : 2 ≤ s)
  (σ : Fin ((7+(r+r+r))+s) → Fin 5)
  (hσ : efx_partial_nat (efx_anchor_family_values r s) σ)
  (hir : ∀ i : Fin 4, efx_anchor_family_baseline r s i ≤
    efx_partial_nat_utility (efx_anchor_family_values r s) σ i) :
  (∀ g : Fin 7, σ (Fin.castAdd s (Fin.castAdd (r+r+r) g)) =
    ![(1 : Fin 5),0,0,0,1,2,4] g) ∧
  (∀ g : Fin s, σ (Fin.natAdd (7+(r+r+r)) g) = 3) ∧
  (∀ i : Fin 3, (Finset.univ.filter (fun g : Fin (r+r+r) =>
    σ (Fin.castAdd s (Fin.natAdd 7 g)) = i.castSucc.castSucc)).card = r)
efx_anchor_family_fourth_losesIn LeanFair Division

Every complete EFX allocation of the arbitrary-size anchor family strictly lowers the fourth agent’s utility from her initial level, even if the other agents may lose utility.

theorem efx_anchor_family_fourth_loses (r s : ℕ) (hr : 0 < r) (hs : 2 ≤ s)
  (σ : Fin ((7+(r+r+r))+s) → Fin 4)
  (hσ : is_efx_goods (fun i g => (efx_anchor_family_values r s i g : ℝ)) σ) :
  additive_valuation (fun g => (efx_anchor_family_values r s (3 : Fin 4) g : ℝ)) (bundle_of σ 3) <
    (efx_anchor_family_baseline r s 3 : ℝ)
efx_anchor_family_no_ir_completionIn LeanFair Division

Every complete EFX allocation of the nondegenerate anchor family makes at least one agent strictly worse off than in the starting one-charity allocation.

theorem efx_anchor_family_no_ir_completion (r s : ℕ) (hr : 0 < r) (hs : 2 ≤ s)
  (p : Fin 4 → Fin ((7+(r+r+r))+s) → ℕ)
  (hinj : ∀ i, Function.Injective (p i))
  (hbound : ∀ i g, p i g < (7+(r+r+r))+s)
  (hhigh : ∀ (i : Fin 3) (a b : Fin (r+r+r)),
    efx_anchor_family_start r s (Fin.castAdd s (Fin.natAdd 7 a)) = i.castSucc.castSucc →
    efx_anchor_family_start r s (Fin.castAdd s (Fin.natAdd 7 b)) ≠ i.castSucc.castSucc →
    p i.castSucc (Fin.castAdd s (Fin.natAdd 7 b)) < p i.castSucc (Fin.castAdd s (Fin.natAdd 7 a)))
  (σ : Fin ((7+(r+r+r))+s) → Fin 4)
  (hσ : is_efx_goods (fun i g => (efx_anchor_family_perturbed_values r s p i g : ℝ)) σ) :
  ∃ i : Fin 4, additive_valuation (fun g => (efx_anchor_family_perturbed_values r s p i g : ℝ)) (bundle_of σ i) <
    (efx_partial_nat_utility (efx_anchor_family_perturbed_values r s p) (efx_anchor_family_start r s) i : ℝ)
efx_anchor_family_pareto_maximalIn LeanFair Division

For every r ≥ 1 and s ≥ 2, every partial EFX allocation weakly preserving the starting utilities has exactly those utilities. The starting bundle sizes are r+3, r+2, r+1 and s, so all four can be made arbitrarily large.

theorem efx_anchor_family_pareto_maximal (r s : ℕ) (hr : 0 < r) (hs : 2 ≤ s)
  (σ : Fin ((7+(r+r+r))+s) → Fin 5)
  (hσ : efx_partial_nat (efx_anchor_family_values r s) σ)
  (hir : ∀ i : Fin 4, efx_anchor_family_baseline r s i ≤
    efx_partial_nat_utility (efx_anchor_family_values r s) σ i) :
  ∀ i : Fin 4, efx_partial_nat_utility (efx_anchor_family_values r s) σ i =
    efx_anchor_family_baseline r s i
efx_anchor_family_perturbed_envy_graphIn LeanFair Division

The perturbed anchor-family starting allocation has precisely the envy edges 0→2, 0→3, 1→3, and 2→3, so its sources are 0 and 1.

theorem efx_anchor_family_perturbed_envy_graph (r s : ℕ) (hr : 0 < r) (hs : 2 ≤ s)
  (p : Fin 4 → Fin ((7+(r+r+r))+s) → ℕ)
  (hinj : ∀ i, Function.Injective (p i))
  (hbound : ∀ i g, p i g < (7+(r+r+r))+s) :
  ∀ i j : Fin 4, i ≠ j →
    (efx_partial_nat_utility (efx_anchor_family_perturbed_values r s p) (efx_anchor_family_start r s) i <
      (∑ g, if efx_anchor_family_start r s g = j.castSucc then efx_anchor_family_perturbed_values r s p i g else 0) ↔
      (i = 0 ∧ j = 2) ∨ ((i = 0 ∨ i = 1 ∨ i = 2) ∧ j = 3))
efx_anchor_family_perturbed_fourth_losesIn LeanFair Division

Every complete EFX allocation of any injective bounded binary perturbation of the arbitrary-size anchor family strictly lowers the fourth agent’s utility from her initial level.

theorem efx_anchor_family_perturbed_fourth_loses (r s : ℕ) (hr : 0 < r) (hs : 2 ≤ s)
  (p : Fin 4 → Fin ((7+(r+r+r))+s) → ℕ)
  (hinj : ∀ i, Function.Injective (p i))
  (hbound : ∀ i g, p i g < (7+(r+r+r))+s)
  (σ : Fin ((7+(r+r+r))+s) → Fin 4)
  (hσ : is_efx_goods (fun i g => (efx_anchor_family_perturbed_values r s p i g : ℝ)) σ) :
  additive_valuation (fun g => (efx_anchor_family_perturbed_values r s p (3 : Fin 4) g : ℝ)) (bundle_of σ 3) <
    (efx_partial_nat_utility (efx_anchor_family_perturbed_values r s p) (efx_anchor_family_start r s) 3 : ℝ)
efx_anchor_family_perturbed_no_selfIn LeanFair Division

In the nondegenerate arbitrary-size anchor family no agent self-champions, even under inclusion-minimality: every preferred subset of her bundle plus an unallocated good is strongly envied by some agent.

theorem efx_anchor_family_perturbed_no_self (r s : ℕ) (hr : 0 < r) (hs : 2 ≤ s)
  (p : Fin 4 → Fin ((7+(r+r+r))+s) → ℕ)
  (hinj : ∀ i, Function.Injective (p i))
  (hbound : ∀ i g, p i g < (7+(r+r+r))+s)
  (hhigh : ∀ (i : Fin 3) (a b : Fin (r+r+r)),
    efx_anchor_family_start r s (Fin.castAdd s (Fin.natAdd 7 a)) = i.castSucc.castSucc →
    efx_anchor_family_start r s (Fin.castAdd s (Fin.natAdd 7 b)) ≠ i.castSucc.castSucc →
    p i.castSucc (Fin.castAdd s (Fin.natAdd 7 b)) < p i.castSucc (Fin.castAdd s (Fin.natAdd 7 a)))
  (i : Fin 4) (g : Fin ((7+(r+r+r))+s))
  (hg : efx_anchor_family_start r s g = Fin.last 4)
  (T : Finset (Fin ((7+(r+r+r))+s)))
  (hT : T ⊆ insert g (efx_partial_nat_bundle (efx_anchor_family_start r s) i))
  (hbetter : efx_partial_nat_utility (efx_anchor_family_perturbed_values r s p)
      (efx_anchor_family_start r s) i < ∑ h ∈ T, efx_anchor_family_perturbed_values r s p i h) :
  ∃ (j : Fin 4) (h : Fin ((7+(r+r+r))+s)), h ∈ T ∧
    efx_partial_nat_utility (efx_anchor_family_perturbed_values r s p) (efx_anchor_family_start r s) j <
      ∑ x ∈ T.erase h, efx_anchor_family_perturbed_values r s p j x
efx_anchor_family_perturbed_start_efxIn LeanFair Division

Every perturbed valuation is positive and any injective bounded binary perturbation preserves all strict EFX inequalities of the anchor-family starting allocation.

theorem efx_anchor_family_perturbed_start_efx (r s : ℕ) (hr : 0 < r) (hs : 2 ≤ s)
  (p : Fin 4 → Fin ((7+(r+r+r))+s) → ℕ)
  (hinj : ∀ i, Function.Injective (p i))
  (hbound : ∀ i g, p i g < (7+(r+r+r))+s) :
  (∀ i g, 0 < efx_anchor_family_perturbed_values r s p i g) ∧
  efx_partial_nat (efx_anchor_family_perturbed_values r s p) (efx_anchor_family_start r s) ∧
  ∀ i j : Fin 4, i ≠ j → ∀ g, efx_anchor_family_start r s g = j.castSucc →
    (∑ h, if efx_anchor_family_start r s h = j.castSucc then efx_anchor_family_perturbed_values r s p i h else 0) <
      efx_partial_nat_utility (efx_anchor_family_perturbed_values r s p) (efx_anchor_family_start r s) i +
        efx_anchor_family_perturbed_values r s p i g
efx_anchor_family_perturbed_uniqueIn LeanFair Division

For exponents satisfying the injectivity, bound, and own-anchor priority conditions, the perturbed anchor-family starting allocation is the unique partial EFX allocation weakly preserving all starting utilities.

theorem efx_anchor_family_perturbed_unique (r s : ℕ) (hr : 0 < r) (hs : 2 ≤ s)
  (p : Fin 4 → Fin ((7+(r+r+r))+s) → ℕ)
  (hinj : ∀ i, Function.Injective (p i))
  (hbound : ∀ i g, p i g < (7+(r+r+r))+s)
  (hhigh : ∀ (i : Fin 3) (a b : Fin (r+r+r)),
    efx_anchor_family_start r s (Fin.castAdd s (Fin.natAdd 7 a)) = i.castSucc.castSucc →
    efx_anchor_family_start r s (Fin.castAdd s (Fin.natAdd 7 b)) ≠ i.castSucc.castSucc →
    p i.castSucc (Fin.castAdd s (Fin.natAdd 7 b)) < p i.castSucc (Fin.castAdd s (Fin.natAdd 7 a)))
  (σ : Fin ((7+(r+r+r))+s) → Fin 5)
  (hσ : efx_partial_nat (efx_anchor_family_perturbed_values r s p) σ)
  (hir : ∀ i : Fin 4, efx_partial_nat_utility (efx_anchor_family_perturbed_values r s p)
      (efx_anchor_family_start r s) i ≤
    efx_partial_nat_utility (efx_anchor_family_perturbed_values r s p) σ i) :
  σ = efx_anchor_family_start r s
efx_anchor_family_sanityIn LeanFair Division

For every r ≥ 1 and s ≥ 2, the constructed one-charity partial allocation has positive values, the claimed utilities, and strictly satisfies every EFX inequality.

theorem efx_anchor_family_sanity (r s : ℕ) (hr : 0 < r) (hs : 2 ≤ s) :
  (∀ i g, 0 < efx_anchor_family_values r s i g) ∧
  efx_partial_nat (efx_anchor_family_values r s) (efx_anchor_family_start r s) ∧
  (∀ i : Fin 4, efx_partial_nat_utility (efx_anchor_family_values r s) (efx_anchor_family_start r s) i =
    efx_anchor_family_baseline r s i) ∧
  (∀ i j : Fin 4, i ≠ j → ∀ g, efx_anchor_family_start r s g = j.castSucc →
    (∑ h, if efx_anchor_family_start r s h = j.castSucc then efx_anchor_family_values r s i h else 0) <
      efx_partial_nat_utility (efx_anchor_family_values r s) (efx_anchor_family_start r s) i + efx_anchor_family_values r s i g)
efx_anchor_family_unperturbed_envy_graphIn LeanFair Division

In the anchor family with unperturbed valuations, the starting allocation has exactly the envy edges 0→2, 0→3, 1→3, and 2→3.

theorem efx_anchor_family_unperturbed_envy_graph (r s : ℕ) (hr : 0 < r) (hs : 2 ≤ s) :
  ∀ i j : Fin 4, i ≠ j →
    (efx_partial_nat_utility (efx_anchor_family_values r s) (efx_anchor_family_start r s) i <
      (∑ g, if efx_anchor_family_start r s g = j.castSucc then efx_anchor_family_values r s i g else 0) ↔
      (i = 0 ∧ j = 2) ∨ ((i = 0 ∨ i = 1 ∨ i = 2) ∧ j = 3))
efx_anchor_family_unperturbed_neIn LeanFair Division

In the anchor family with unperturbed valuations, no agent has equal utility for her own bundle and any distinct agent's bundle: every comparison is a strict inequality.

theorem efx_anchor_family_unperturbed_ne (r s : ℕ) (hr : 0 < r) (hs : 2 ≤ s) :
  ∀ i j : Fin 4, i ≠ j →
    efx_partial_nat_utility (efx_anchor_family_values r s) (efx_anchor_family_start r s) i ≠
      (∑ g, if efx_anchor_family_start r s g = j.castSucc then efx_anchor_family_values r s i g else 0)
efx_anchor_lock_base_classificationIn LeanFair Division

Every partial EFX allocation weakly preserving the four original utilities has the original seven-good ownership and both locks assigned to agent 3, and differs only by a permutation of the three anchors among agents 0,1,2.

theorem efx_anchor_lock_base_classification (σ : Fin 12 → Fin 5)
  (hσ : efx_partial_nat efx_anchor_lock_values σ)
  (hir : ∀ i : Fin 4, efx_anchor_lock_baseline i ≤ efx_partial_nat_utility efx_anchor_lock_values σ i) :
  σ = ![(1 : Fin 5),0,0,0,1,2,4,0,1,2,3,3] ∨
  σ = ![(1 : Fin 5),0,0,0,1,2,4,0,2,1,3,3] ∨
  σ = ![(1 : Fin 5),0,0,0,1,2,4,1,0,2,3,3] ∨
  σ = ![(1 : Fin 5),0,0,0,1,2,4,1,2,0,3,3] ∨
  σ = ![(1 : Fin 5),0,0,0,1,2,4,2,0,1,3,3] ∨
  σ = ![(1 : Fin 5),0,0,0,1,2,4,2,1,0,3,3]
efx_anchor_lock_nondegenerateIn LeanFair Division

Every agent assigns distinct values to distinct subsets in the perturbed anchor-and-lock instance.

theorem efx_anchor_lock_nondegenerate (i : Fin 4) (S T : Finset (Fin 12))
  (h : (∑ g ∈ S, efx_anchor_lock_perturbed_values i g) =
       (∑ g ∈ T, efx_anchor_lock_perturbed_values i g)) : S = T
efx_anchor_lock_perturb_boundsIn LeanFair Division

Each exponent row is injective, all exponents are below 12, and every row’s total binary perturbation is below 8192.

theorem efx_anchor_lock_perturb_bounds :
  (∀ i : Fin 4, Function.Injective (efx_anchor_lock_exponents i)) ∧
  (∀ i g, efx_anchor_lock_exponents i g < 12) ∧
  (∀ i : Fin 4, (∑ g : Fin 12, 2 ^ efx_anchor_lock_exponents i g) < 8192)
efx_anchor_lock_perturbed_uniqueIn LeanFair Division

The starting allocation is the only partial EFX allocation weakly preserving all four starting utilities in the nondegenerate instance, and is therefore Pareto-maximal.

theorem efx_anchor_lock_perturbed_unique (σ : Fin 12 → Fin 5)
  (hσ : efx_partial_nat efx_anchor_lock_perturbed_values σ)
  (hir : ∀ i : Fin 4, efx_anchor_lock_perturbed_baseline i ≤ efx_partial_nat_utility efx_anchor_lock_perturbed_values σ i) :
  σ = efx_anchor_lock_start
efx_equal_pairs_blocked_dichotomyIn LeanFair Division

If every old pair has more than one blocking agent, then every old pair is blocked by two distinct agents, neither of which is the pair's owner.

theorem efx_equal_pairs_blocked_dichotomy (v : Fin 4 → Fin 9 → ℝ)
  (hsmall : ∀ i : Fin 4,
    v i 8 ≤ v i (![0,2,4,6] i) ∧ v i 8 ≤ v i (![1,3,5,7] i))
  (h : ∀ p m : Fin 4, ∃ i : Fin 4, i ≠ m ∧ efx_pair_blocked v i p) :
  ∀ p : Fin 4, ∃ i j : Fin 4,
    i ≠ p ∧ j ≠ p ∧ i ≠ j ∧ efx_pair_blocked v i p ∧ efx_pair_blocked v j p
efx_four_agents_crux_positiveIn LeanFair Division

For m > 4 goods and four agents where every agent values at least one good positively, an EFX allocation exists.

theorem efx_four_agents_crux_positive (m : ℕ) (hm : 4 < m) (u : Fin 4 → Fin m → ℝ) (hu : ∀ i g, 0 ≤ u i g)
    (hpos : ∀ i, ∃ g, 0 < u i g) : ∃ σ : Fin m → Fin 4, is_efx_goods u σ
efx_four_agents_of_le_fourIn LeanFair Division

For m ≤ 4 goods, the canonical injective allocation where good g is assigned to agent g is EFX for any nonnegative additive valuations.

theorem efx_four_agents_of_le_four (m : ℕ) (hm : m ≤ 4) (u : Fin 4 → Fin m → ℝ) (hu : ∀ i g, 0 ≤ u i g) :
    ∃ σ : Fin m → Fin 4, is_efx_goods u σ
efx_four_agents_of_zero_agentIn LeanFair Division

If one agent values all goods at 0 and the other three agents have an EFX allocation, then embedding that 3-agent allocation into 4 agents gives an EFX allocation.

theorem efx_four_agents_of_zero_agent (m : ℕ) (u : Fin 4 → Fin m → ℝ) (hu : ∀ i g, 0 ≤ u i g) (i₀ : Fin 4)
    (h_zero : ∀ g, u i₀ g = 0) (τ : Fin m → Fin 3) (hτ : is_efx_goods (fun k g => u (i₀.succAbove k) g) τ) :
    ∃ σ : Fin m → Fin 4, is_efx_goods u σ
efx_locked_good_equivalenceIn LeanFair Division

For a nonempty original agent set, EFX exists in the original instance exactly when it exists in the locked-good lift with the new agent receiving at least her original utility m+1.

theorem efx_locked_good_equivalence {n m : ℕ} (hn : 0 < n)
  (v : Fin n → Fin m → ℝ) (hv : ∀ i g, 0 ≤ v i g) :
  (∃ τ : Fin m → Fin n, is_efx_goods v τ) ↔
  ∃ σ : Fin (m+1) → Fin (n+1), is_efx_goods (efx_locked_agent_values v) σ ∧
    (m : ℝ) + 1 ≤ additive_valuation (efx_locked_agent_values v (Fin.last n))
      (bundle_of σ (Fin.last n))
efx_locked_good_extensionIn LeanFair Division

Any EFX allocation of the original goods extends to an EFX allocation of the locked-good lift by giving the new agent the locked good alone, while preserving all original agents’ utilities.

theorem efx_locked_good_extension {n m : ℕ}
  (v : Fin n → Fin m → ℝ) (hv : ∀ i g, 0 ≤ v i g)
  (τ : Fin m → Fin n) (hτ : is_efx_goods v τ) :
  ∃ σ : Fin (m+1) → Fin (n+1), is_efx_goods (efx_locked_agent_values v) σ ∧
    σ (Fin.last m) = Fin.last n ∧
    additive_valuation (efx_locked_agent_values v (Fin.last n)) (bundle_of σ (Fin.last n)) = (m : ℝ) + 1 ∧
    ∀ i : Fin n, additive_valuation (v i) (bundle_of τ i) =
      additive_valuation (efx_locked_agent_values v i.castSucc) (bundle_of σ i.castSucc)
efx_locked_good_forces_singletonIn LeanFair Division

If the new agent receives utility at least m+1 in an EFX allocation of the locked-good extension, then she owns the locked good and no old good.

theorem efx_locked_good_forces_singleton {n m : ℕ} (hn : 0 < n)
  (v : Fin n → Fin m → ℝ) (hv : ∀ i g, 0 ≤ v i g)
  (σ : Fin (m+1) → Fin (n+1))
  (hσ : is_efx_goods (efx_locked_agent_values v) σ)
  (hnew : (m : ℝ) + 1 ≤ additive_valuation (efx_locked_agent_values v (Fin.last n))
    (bundle_of σ (Fin.last n))) :
  σ (Fin.last m) = Fin.last n ∧ ∀ g : Fin m, σ g.castSucc ≠ Fin.last n
efx_locked_good_projectionIn LeanFair Division

An EFX allocation of the locked-good extension that preserves the new agent’s initial utility projects to an EFX allocation of the original goods, preserving every original agent’s utility exactly.

theorem efx_locked_good_projection {n m : ℕ} (hn : 0 < n)
  (v : Fin n → Fin m → ℝ) (hv : ∀ i g, 0 ≤ v i g)
  (σ : Fin (m+1) → Fin (n+1))
  (hσ : is_efx_goods (efx_locked_agent_values v) σ)
  (hnew : (m : ℝ) + 1 ≤ additive_valuation (efx_locked_agent_values v (Fin.last n))
    (bundle_of σ (Fin.last n))) :
  ∃ τ : Fin m → Fin n,
    (∀ g, σ g.castSucc = (τ g).castSucc) ∧ is_efx_goods v τ ∧
    ∀ i : Fin n, additive_valuation (v i) (bundle_of τ i) =
      additive_valuation (efx_locked_agent_values v i.castSucc) (bundle_of σ i.castSucc)
efx_no_self_three_split_no_0_natIn LeanFair Division

No EFX completion exists among the allocations with the two old triples selected by pattern 0 kept intact.

theorem efx_no_self_three_split_no_0_nat (q : Fin 9 → Fin 4) : ¬ efx_no_self_three_split_nat (efx_no_self_three_split_code 0 q)
efx_no_self_three_split_no_1_natIn LeanFair Division

No EFX completion exists among the allocations with the two old triples selected by pattern 1 kept intact.

theorem efx_no_self_three_split_no_1_nat (q : Fin 9 → Fin 4) : ¬ efx_no_self_three_split_nat (efx_no_self_three_split_code 1 q)
efx_no_self_three_split_no_2_natIn LeanFair Division

No EFX completion exists among the allocations with the two old triples selected by pattern 2 kept intact.

theorem efx_no_self_three_split_no_2_nat (q : Fin 9 → Fin 4) : ¬ efx_no_self_three_split_nat (efx_no_self_three_split_code 2 q)
efx_no_self_three_split_no_3_natIn LeanFair Division

No EFX completion exists among the allocations with the two old triples selected by pattern 3 kept intact.

theorem efx_no_self_three_split_no_3_nat (q : Fin 9 → Fin 4) : ¬ efx_no_self_three_split_nat (efx_no_self_three_split_code 3 q)
efx_no_self_three_split_no_4_natIn LeanFair Division

No EFX completion exists among the allocations with the two old triples selected by pattern 4 kept intact.

theorem efx_no_self_three_split_no_4_nat (q : Fin 9 → Fin 4) : ¬ efx_no_self_three_split_nat (efx_no_self_three_split_code 4 q)
efx_no_self_three_split_no_5_natIn LeanFair Division

No EFX completion exists among the allocations with the two old triples selected by pattern 5 kept intact.

theorem efx_no_self_three_split_no_5_nat (q : Fin 9 → Fin 4) : ¬ efx_no_self_three_split_nat (efx_no_self_three_split_code 5 q)
efx_no_self_three_split_perturb_boundsIn LeanFair Division

Every exponent row is injective with exponents below 13, and the total binary perturbation in each row is smaller than 16384.

theorem efx_no_self_three_split_perturb_bounds :
  (∀ i : Fin 4, Function.Injective (efx_no_self_three_split_exponents i)) ∧
  (∀ i g, efx_no_self_three_split_exponents i g < 13) ∧
  (∀ i : Fin 4, (∑ g : Fin 13, 2 ^ efx_no_self_three_split_exponents i g) < 16384)
efx_no_self_three_split_perturbed_no_selfIn LeanFair Division

No source self-champions in the nondegenerate perturbation, even under inclusion-minimality.

theorem efx_no_self_three_split_perturbed_no_self (i : Fin 4) (T : Finset (Fin 13))
  (hT : T ⊆ insert 12 (efx_no_self_three_split_old i))
  (hprefer : (∑ g ∈ efx_no_self_three_split_old i, efx_no_self_three_split_perturbed_values i g) <
    (∑ g ∈ T, efx_no_self_three_split_perturbed_values i g)) :
  ∃ (j : Fin 4) (g : Fin 13), g ∈ T ∧
    (∑ h ∈ efx_no_self_three_split_old j, efx_no_self_three_split_perturbed_values j h) <
    (∑ h ∈ T.erase g, efx_no_self_three_split_perturbed_values j h)
efx_no_self_three_split_perturbed_nondegenerateIn LeanFair Division

Every agent assigns distinct values to distinct subsets in the perturbed thirteen-good instance.

theorem efx_no_self_three_split_perturbed_nondegenerate (i : Fin 4) (S T : Finset (Fin 13))
  (h : (∑ g ∈ S, efx_no_self_three_split_perturbed_values i g) =
       (∑ g ∈ T, efx_no_self_three_split_perturbed_values i g)) : S = T
efx_no_self_three_split_perturbed_requires_threeIn LeanFair Division

Every complete EFX allocation of the nondegenerate perturbation splits at least three old triples.

theorem efx_no_self_three_split_perturbed_requires_three (σ : Fin 13 → Fin 4)
  (hσ : is_efx_goods (fun i g => (efx_no_self_three_split_perturbed_values i g : ℝ)) σ) :
  ∀ a b : Fin 4, a ≠ b →
    (σ (![0,3,6,9] a) ≠ σ (![1,4,7,10] a) ∨ σ (![0,3,6,9] a) ≠ σ (![2,5,8,11] a)) ∨
    (σ (![0,3,6,9] b) ≠ σ (![1,4,7,10] b) ∨ σ (![0,3,6,9] b) ≠ σ (![2,5,8,11] b))
efx_no_self_three_split_perturbed_sanityIn LeanFair Division

All perturbed values are positive, every agent strictly prefers her own old triple to every other old triple, every own item is worth at least charity to its owner, and for each target a foreign agent strongly envies its triple plus charity.

theorem efx_no_self_three_split_perturbed_sanity :
  (∀ i g, 0 < efx_no_self_three_split_perturbed_values i g) ∧
  (∀ i j : Fin 4, i ≠ j →
    (∑ g ∈ efx_no_self_three_split_old j, efx_no_self_three_split_perturbed_values i g) <
    (∑ g ∈ efx_no_self_three_split_old i, efx_no_self_three_split_perturbed_values i g)) ∧
  (∀ i g, g ∈ efx_no_self_three_split_old i →
    efx_no_self_three_split_perturbed_values i 12 ≤ efx_no_self_three_split_perturbed_values i g) ∧
  (∀ j, ∃ i : Fin 4, i ≠ j ∧ ∃ g ∈ efx_no_self_three_split_old j,
    (∑ h ∈ efx_no_self_three_split_old i, efx_no_self_three_split_perturbed_values i h) + efx_no_self_three_split_perturbed_values i g <
    (∑ h ∈ efx_no_self_three_split_old j, efx_no_self_three_split_perturbed_values i h) + efx_no_self_three_split_perturbed_values i 12)
efx_no_self_three_split_requires_threeIn LeanFair Division

Every complete EFX allocation of the explicit matrix splits at least three of the four old triples.

theorem efx_no_self_three_split_requires_three (σ : Fin 13 → Fin 4)
  (hσ : is_efx_goods (fun i g => (efx_no_self_three_split_values i g : ℝ)) σ) :
  ∀ a b : Fin 4, a ≠ b →
    (σ (![0,3,6,9] a) ≠ σ (![1,4,7,10] a) ∨ σ (![0,3,6,9] a) ≠ σ (![2,5,8,11] a)) ∨
    (σ (![0,3,6,9] b) ≠ σ (![1,4,7,10] b) ∨ σ (![0,3,6,9] b) ≠ σ (![2,5,8,11] b))
efx_nondeg_cycle_nondegenerateIn LeanFair Division

Each agent assigns distinct values to distinct subsets in the nondegenerate cycle instance.

theorem efx_nondeg_cycle_nondegenerate (i : Fin 4) (S T : Finset (Fin 13))
  (h : (∑ g ∈ S, efx_nondeg_cycle_values i g) = (∑ g ∈ T, efx_nondeg_cycle_values i g)) : S = T
efx_nondeg_cycle_perturb_boundsIn LeanFair Division

Each exponent row is injective with exponents below 13 and total binary perturbation below 16384.

theorem efx_nondeg_cycle_perturb_bounds :
  (∀ i : Fin 4, Function.Injective (efx_nondeg_cycle_exponents i)) ∧
  (∀ i g, efx_nondeg_cycle_exponents i g < 13) ∧
  (∀ i : Fin 4, (∑ g : Fin 13, 2 ^ efx_nondeg_cycle_exponents i g) < 16384)
efx_pair_blocked_not_selfIn LeanFair Division

No agent blocks her own old pair: if charity is worth no more to her than either good of her own pair, she cannot value charity strictly more than one of them.

theorem efx_pair_blocked_not_self (v : Fin 4 → Fin 9 → ℝ)
  (hsmall : ∀ i : Fin 4,
    v i 8 ≤ v i (![0,2,4,6] i) ∧ v i 8 ≤ v i (![1,3,5,7] i)) (i : Fin 4) :
  ¬ efx_pair_blocked v i i
efx_pareto_almost_all_sourcesIn LeanFair Division

For every number of agents at least three, a positive partial EFX allocation on 2n+1 goods with one unallocated good and all but one agent a source can be the unique individually rational partial EFX state, with no individually rational complete EFX allocation.

theorem efx_pareto_almost_all_sources (n : ℕ) (hn : 3 ≤ n) :
  ∃ (m : ℕ) (v : Fin n → Fin m → ℕ) (σ : Fin m → Fin (n+1)) (sink : Fin n),
    m = n+n+1 ∧
    (∀ i g, 0 < v i g) ∧
    (∀ i, 0 < efx_partial_nat_utility v σ i) ∧
    efx_partial_nat v σ ∧
    (∃ g, σ g = Fin.last n ∧ ∀ h, σ h = Fin.last n → h = g) ∧
    (∀ i, efx_partial_nat_source v σ i ↔ i ≠ sink) ∧
    (∀ τ : Fin m → Fin (n+1), efx_partial_nat v τ →
      (∀ i, efx_partial_nat_utility v σ i ≤ efx_partial_nat_utility v τ i) → τ = σ) ∧
    (∀ τ : Fin m → Fin (n+1), efx_partial_nat v τ →
      (∀ i, efx_partial_nat_utility v σ i ≤ efx_partial_nat_utility v τ i) →
      ∀ i, efx_partial_nat_utility v τ i ≤ efx_partial_nat_utility v σ i) ∧
    (∀ τ : Fin m → Fin (n+1), efx_partial_nat v τ →
      (∀ i, efx_partial_nat_utility v σ i ≤ efx_partial_nat_utility v τ i) →
      ∃ g, τ g = Fin.last n)
efx_pareto_incompatible_pos_additiveIn LeanFair Division

In the fair division instance with 4 agents and 8 goods with valuations efx_po_val_real, there is no allocation of the goods that is simultaneously EFX and Pareto optimal.

theorem efx_pareto_incompatible_pos_additive :
    ¬ ∃ σ : Fin 8 → Fin 4, is_efx_goods efx_po_val_real σ ∧ is_pareto_optimal_goods efx_po_val_real σ
efx_pareto_lock_encoded_uniqueIn LeanFair Division

Any feasible encoded partial allocation is the original one.

theorem efx_pareto_lock_encoded_unique (q : Fin 7 → Fin 4)
  (hq : efx_pareto_lock_feasible (efx_pareto_lock_encode q)) :
  q = ![(1 : Fin 4),0,0,0,1,2,3]
efx_pareto_lock_forces_dedicatedIn LeanFair Division

In every feasible partial allocation, agent 3 must receive the locked good 7 and cannot receive any other good.

theorem efx_pareto_lock_forces_dedicated (σ : Fin 8 → Fin 5)
  (hσ : efx_pareto_lock_feasible σ) :
  σ 7 = 3 ∧ ∀ g : Fin 7, σ g.castSucc ≠ 3
efx_pareto_lock_padded_maximalIn LeanFair Division

In every padded partial EFX allocation weakly preserving all four starting utilities, all four utilities are equal to their starting values. Consequently the padded starting allocation is Pareto-maximal for every k.

theorem efx_pareto_lock_padded_maximal (k : ℕ)
  (σ : Fin (8+(k+k)) → Fin 5)
  (hσ : efx_partial_nat (efx_pareto_lock_padded_values k) σ)
  (hir : ∀ i : Fin 4, efx_pareto_lock_padded_baseline k i ≤
    efx_partial_nat_utility (efx_pareto_lock_padded_values k) σ i) :
  ∀ i : Fin 4, efx_partial_nat_utility (efx_pareto_lock_padded_values k) σ i =
    efx_pareto_lock_padded_baseline k i
efx_pareto_lock_three_no_near_efxIn LeanFair Division

No complete EFX allocation of the three-agent seven-good base gives every agent at least her starting utility minus one.

theorem efx_pareto_lock_three_no_near_efx (τ : Fin 7 → Fin 3) : ¬ efx_pareto_lock_three_near_feasible τ
efx_pareto_lock_uniqueIn LeanFair Division

The only partial EFX allocation weakly preserving all four original utilities is the starting allocation, with good 6 unallocated.

theorem efx_pareto_lock_unique (σ : Fin 8 → Fin 5)
  (hσ : efx_pareto_lock_feasible σ) :
  σ = ![(1 : Fin 5),0,0,0,1,2,4,3]
efx_pareto_lock_unique_0In LeanFair Division

Among encoded partial allocations with q 0 = 0, feasibility forces the unique original assignment.

theorem efx_pareto_lock_unique_0 (q : Fin 7 → Fin 4) (h : q 0 = 0)
  (hq : efx_pareto_lock_feasible (efx_pareto_lock_encode q)) :
  q = ![(1 : Fin 4),0,0,0,1,2,3]
efx_pareto_lock_unique_1In LeanFair Division

Among encoded partial allocations with q 0 = 1, feasibility forces the unique original assignment.

theorem efx_pareto_lock_unique_1 (q : Fin 7 → Fin 4) (h : q 0 = 1)
  (hq : efx_pareto_lock_feasible (efx_pareto_lock_encode q)) :
  q = ![(1 : Fin 4),0,0,0,1,2,3]
efx_pareto_lock_unique_2In LeanFair Division

Among encoded partial allocations with q 0 = 2, feasibility forces the unique original assignment.

theorem efx_pareto_lock_unique_2 (q : Fin 7 → Fin 4) (h : q 0 = 2)
  (hq : efx_pareto_lock_feasible (efx_pareto_lock_encode q)) :
  q = ![(1 : Fin 4),0,0,0,1,2,3]
efx_pareto_lock_unique_3In LeanFair Division

Among encoded partial allocations with q 0 = 3, feasibility forces the unique original assignment.

theorem efx_pareto_lock_unique_3 (q : Fin 7 → Fin 4) (h : q 0 = 3)
  (hq : efx_pareto_lock_feasible (efx_pareto_lock_encode q)) :
  q = ![(1 : Fin 4),0,0,0,1,2,3]
efx_pareto_three_base_propertiesIn LeanFair Division

The three-agent base is positive, has a unique individually rational partial EFX state, and has exactly two sources.

theorem efx_pareto_three_base_properties :
  (∀ i g, 0 < efx_pareto_three_values i g) ∧
  (∀ i, 0 < efx_partial_nat_utility efx_pareto_three_values efx_pareto_three_start i) ∧
  efx_partial_nat efx_pareto_three_values efx_pareto_three_start ∧
  (∀ τ : Fin 7 → Fin 4, efx_partial_nat efx_pareto_three_values τ →
    (∀ i, efx_partial_nat_utility efx_pareto_three_values efx_pareto_three_start i ≤
      efx_partial_nat_utility efx_pareto_three_values τ i) → τ = efx_pareto_three_start) ∧
  (∀ i : Fin 3, efx_partial_nat_source efx_pareto_three_values efx_pareto_three_start i ↔ i ≠ 2)
efx_pareto_three_forces_024In LeanFair Division

Once agent 2 owns good 5, IR and EFX force goods 2, 4 and 0 to their original owners.

theorem efx_pareto_three_forces_024 (τ : Fin 7 → Fin 4)
  (hτ : efx_partial_nat efx_pareto_three_values τ)
  (hir : ∀ i : Fin 3, efx_partial_nat_utility efx_pareto_three_values efx_pareto_three_start i ≤
    efx_partial_nat_utility efx_pareto_three_values τ i)
  (h5 : τ 5 = 2) :
  τ 2 = 0 ∧ τ 4 = 1 ∧ τ 0 = 1
efx_pareto_three_forces_136In LeanFair Division

The last two old goods remain with agent 0 and good 6 must remain unallocated.

theorem efx_pareto_three_forces_136 (τ : Fin 7 → Fin 4)
  (hτ : efx_partial_nat efx_pareto_three_values τ)
  (hir : ∀ i : Fin 3, efx_partial_nat_utility efx_pareto_three_values efx_pareto_three_start i ≤
    efx_partial_nat_utility efx_pareto_three_values τ i)
  (h5 : τ 5 = 2) (h2 : τ 2 = 0) (h4 : τ 4 = 1) (h0 : τ 0 = 1) :
  τ 1 = 0 ∧ τ 3 = 0 ∧ τ 6 = 3
efx_pareto_three_forces_5In LeanFair Division

The third agent must retain good 5 in any IR partial EFX allocation.

theorem efx_pareto_three_forces_5 (τ : Fin 7 → Fin 4)
  (hτ : efx_partial_nat efx_pareto_three_values τ)
  (hir : ∀ i : Fin 3, efx_partial_nat_utility efx_pareto_three_values efx_pareto_three_start i ≤
    efx_partial_nat_utility efx_pareto_three_values τ i) :
  τ 5 = 2
efx_partial_nat_self_champion_progressIn LeanFair Division

If an agent strictly prefers a universally trim-safe subset of her bundle plus an unallocated good, there is a partial EFX allocation that weakly improves every agent and strictly improves her.

theorem efx_partial_nat_self_champion_progress {n m : ℕ}
  (v : Fin n → Fin m → ℕ) (σ : Fin m → Fin (n+1)) (hσ : efx_partial_nat v σ)
  (i : Fin n) (g : Fin m) (hg : σ g = Fin.last n) (T : Finset (Fin m))
  (hT : T ⊆ insert g (efx_partial_nat_bundle σ i))
  (hbetter : efx_partial_nat_utility v σ i < ∑ h ∈ T, v i h)
  (htrim : ∀ (j : Fin n) (h : Fin m), h ∈ T →
    (∑ x ∈ T.erase h, v j x) ≤ efx_partial_nat_utility v σ j) :
  ∃ τ : Fin m → Fin (n+1), efx_partial_nat v τ ∧
    (∀ j, efx_partial_nat_utility v σ j ≤ efx_partial_nat_utility v τ j) ∧
    efx_partial_nat_utility v σ i < efx_partial_nat_utility v τ i
efx_partial_scaled_perturbation_irIn LeanFair Division

If perturbed partial-allocation utility is at least K times an original natural threshold, and total perturbation is below K, original utility meets that threshold.

theorem efx_partial_scaled_perturbation_ir {n m : ℕ} (K : ℕ)
  (v d : Fin n → Fin m → ℕ) (hsmall : ∀ i, (∑ g : Fin m, d i g) < K)
  (σ : Fin m → Fin (n+1)) (b : Fin n → ℕ)
  (hir : ∀ i, K * b i ≤ efx_partial_nat_utility (fun i g => K * v i g + d i g) σ i) :
  ∀ i, b i ≤ efx_partial_nat_utility v σ i
efx_partial_scaled_perturbation_restrictIn LeanFair Division

If each agent’s total perturbation is less than K, any partial EFX allocation for K times the base natural valuations plus that perturbation is partial EFX for the base valuations.

theorem efx_partial_scaled_perturbation_restrict {n m : ℕ} (K : ℕ)
  (v d : Fin n → Fin m → ℕ) (hsmall : ∀ i, (∑ g : Fin m, d i g) < K)
  (σ : Fin m → Fin (n+1))
  (hσ : efx_partial_nat (fun i g => K * v i g + d i g) σ) :
  efx_partial_nat v σ
efx_partial_scaled_tail_irIn LeanFair Division

If every agent gets at least K times her original threshold and the whole tail is worth less than K, projection to original goods preserves each original natural threshold.

theorem efx_partial_scaled_tail_ir {n m k : ℕ} (K : ℕ)
  (v : Fin n → Fin m → ℕ) (d : Fin n → Fin k → ℕ)
  (hsmall : ∀ i, (∑ g : Fin k, d i g) < K)
  (σ : Fin (m+k) → Fin (n+1)) (b : Fin n → ℕ)
  (hir : ∀ i, K * b i ≤ efx_partial_nat_utility (efx_partial_scaled_tail K v d) σ i) :
  ∀ i, b i ≤ efx_partial_nat_utility v (fun g => σ (Fin.castAdd k g)) i
efx_partial_scaled_tail_restrictIn LeanFair Division

If the total tail value of each agent is less than the positive scaling factor K, every partial EFX allocation projects to a partial EFX allocation of the original natural-valued goods.

theorem efx_partial_scaled_tail_restrict {n m k : ℕ} (K : ℕ)
  (v : Fin n → Fin m → ℕ) (d : Fin n → Fin k → ℕ)
  (hsmall : ∀ i, (∑ g : Fin k, d i g) < K)
  (σ : Fin (m+k) → Fin (n+1)) (hσ : efx_partial_nat (efx_partial_scaled_tail K v d) σ) :
  efx_partial_nat v (fun g => σ (Fin.castAdd k g))
efx_pert_sum_filter_ltIn LeanFair Division

The sum of 2^(p g) over any subset of goods in Fin M is strictly less than 2^M whenever p is injective and has values strictly less than M.

theorem efx_pert_sum_filter_lt (M : ℕ) (p : Fin M → ℕ)
    (hinj : Function.Injective p) (hbound : ∀ g, p g < M)
    (Q : Fin M → Prop) [DecidablePred Q] :
    (∑ g : Fin M, if Q g then 2 ^ p g else 0) < 2 ^ M
efx_po_additive_valuation_castIn LeanFair Division

In the 4-agent 8-good instance, an agent's real-valued utility for any bundle equals the natural-number sum of her integer values over that bundle, cast to real.

lemma efx_po_additive_valuation_cast (i : Fin 4) (S : Finset (Fin 8)) :
    additive_valuation (efx_po_val_real i) S = ((∑ g ∈ S, efx_po_values i g : ℕ) : ℝ)
efx_po_bv_nat_eq_sumIn LeanFair Division

In the 4-agent 8-good instance, the natural-number bundle value efx_po_bv_nat σ i j equals the sum of efx_po_values i over j's bundle.

lemma efx_po_bv_nat_eq_sum (σ : Fin 8 → Fin 4) (i j : Fin 4) :
    efx_po_bv_nat σ i j = ∑ g ∈ bundle_of σ j, efx_po_values i g
efx_po_efx_imp_dominatedIn LeanFair Division

Every EFX allocation of the 4-agent 8-good instance efx_po_val_real is Pareto dominated by some allocation.

lemma efx_po_efx_imp_dominated (σ : Fin 8 → Fin 4)
    (h : is_efx_goods efx_po_val_real σ) :
    ∃ τ : Fin 8 → Fin 4, pareto_dominates_goods efx_po_val_real τ σ
efx_po_efx_nat_iffIn LeanFair Division

In the 4-agent 8-good instance, an allocation is EFX (with real-valued bundles) if and only if it satisfies the natural-number EFX condition efx_po_efx_nat.

lemma efx_po_efx_nat_iff (σ : Fin 8 → Fin 4) :
    is_efx_goods efx_po_val_real σ ↔ efx_po_efx_nat σ
efx_po_family_efx_imp_dominated_natIn LeanFair Division

Every EFX allocation of the 4-agent 8-good instance that lies in the singleton family is Pareto dominated, in the natural-number sense, by some allocation of the goods.

lemma efx_po_family_efx_imp_dominated_nat (σ : Fin 8 → Fin 4)
    (h : efx_po_in_singleton_family σ) (hefx : efx_po_efx_nat σ) :
    ∃ τ : Fin 8 → Fin 4, efx_po_dominates_nat τ σ
efx_po_in_singleton_family_of_efxIn LeanFair Division

Every EFX allocation of the 4-agent 8-good instance lies in the singleton family: goods 0 and 1 are singletons with distinct owners.

lemma efx_po_in_singleton_family_of_efx (σ : Fin 8 → Fin 4)
    (h : is_efx_goods efx_po_val_real σ) : efx_po_in_singleton_family σ
efx_po_in_singleton_family_witnessIn LeanFair Division

The singleton family is nonempty: the allocation (0, 1, 2, 3, 2, 3, 2, 3) is in it, while the allocation (0, 0, 2, 3, 2, 3, 2, 3) is not.

lemma efx_po_in_singleton_family_witness :
    efx_po_in_singleton_family ![0, 1, 2, 3, 2, 3, 2, 3] ∧
      ¬ efx_po_in_singleton_family ![0, 0, 2, 3, 2, 3, 2, 3]
efx_po_pareto_nat_iffIn LeanFair Division

In the 4-agent 8-good instance, τ Pareto-dominates σ (in real utilities) if and only if efx_po_dominates_nat τ σ holds.

lemma efx_po_pareto_nat_iff (τ σ : Fin 8 → Fin 4) :
    pareto_dominates_goods efx_po_val_real τ σ ↔ efx_po_dominates_nat τ σ
efx_po_small_goods_value_boundIn LeanFair Division

In the 4-agent 8-good instance, among the six non-large goods (goods 2 through 7) every agent values every good at most 3, so for any set R of such goods the total value actually realised by giving each good to its owner is at most 3 |R|.

lemma efx_po_small_goods_value_bound (σ : Fin 8 → Fin 4) (R : Finset (Fin 8))
    (h0 : (0 : Fin 8) ∉ R) (h1 : (1 : Fin 8) ∉ R) :
    ∑ g ∈ R, efx_po_values (σ g) g ≤ 3 * R.card
efx_po_step1_singletonsIn LeanFair Division

In every EFX allocation of the 4-agent 8-good instance, goods 0 and 1 are each allocated as singletons to distinct agents.

lemma efx_po_step1_singletons (σ : Fin 8 → Fin 4) (h : is_efx_goods efx_po_val_real σ) :
    bundle_of σ (σ 0) = {0} ∧ bundle_of σ (σ 1) = {1} ∧ σ 0 ≠ σ 1
efx_scale_pert_lt_iffIn LeanFair Division

For positive natural numbers, scaling integers by K and adding perturbations strictly less than K preserves the strict inequality between distinct integers: K * A + dA < K * B + dB ↔ A < B whenever dA, dB < K and A ≠ B.

theorem efx_scale_pert_lt_iff (K A B dA dB : ℕ) (hdA : dA < K) (hdB : dB < K) (hne : A ≠ B) :
    K * A + dA < K * B + dB ↔ A < B
efx_scaled_perturbation_restrictIn LeanFair Division

If each agent’s total additive perturbation is below K, any EFX allocation for the scaled and perturbed natural valuations is EFX for the original natural valuations.

theorem efx_scaled_perturbation_restrict {n m : ℕ} (K : ℕ)
  (v d : Fin n → Fin m → ℕ) (hsmall : ∀ i, (∑ g : Fin m, d i g) < K)
  (σ : Fin m → Fin n)
  (hσ : is_efx_goods (fun i g => (efx_scaled_perturbation K v d i g : ℝ)) σ) :
  is_efx_goods (fun i g => (v i g : ℝ)) σ
efx_source_lift_new_sourceIn LeanFair Division

The new agent is an unenvied source.

theorem efx_source_lift_new_source {n m : ℕ}
  (v : Fin n → Fin m → ℕ) (σ : Fin m → Fin (n+1))
  (hown : ∀ i, 0 < efx_partial_nat_utility v σ i) :
  efx_partial_nat_source (efx_source_lift_values v (efx_partial_nat_utility v σ))
    (efx_source_lift_start σ) (Fin.last n)
efx_source_lift_old_source_iffIn LeanFair Division

The two-lock lift preserves exactly which old agents are sources.

theorem efx_source_lift_old_source_iff {n m : ℕ}
  (v : Fin n → Fin m → ℕ) (σ : Fin m → Fin (n+1)) (i : Fin n) :
  efx_partial_nat_source (efx_source_lift_values v (efx_partial_nat_utility v σ))
    (efx_source_lift_start σ) i.castSucc ↔ efx_partial_nat_source v σ i
efx_source_lift_sanityIn LeanFair Division

The lifted starting allocation is EFX and the new agent is an isolated source.

theorem efx_source_lift_sanity {n m : ℕ}
  (v : Fin n → Fin m → ℕ) (σ : Fin m → Fin (n+1))
  (hpos : ∀ i g, 0 < v i g)
  (hown : ∀ i, 0 < efx_partial_nat_utility v σ i)
  (hσ : efx_partial_nat v σ) :
  efx_partial_nat (efx_source_lift_values v (efx_partial_nat_utility v σ)) (efx_source_lift_start σ) ∧
  (∀ i : Fin n,
    (∑ g : Fin (m+2), if (efx_source_lift_start σ) g = (Fin.last n).castSucc then (efx_source_lift_values v (efx_partial_nat_utility v σ)) i.castSucc g else 0) <
      efx_partial_nat_utility (efx_source_lift_values v (efx_partial_nat_utility v σ)) (efx_source_lift_start σ) i.castSucc ∧
    (∑ g : Fin (m+2), if (efx_source_lift_start σ) g = i.castSucc.castSucc then (efx_source_lift_values v (efx_partial_nat_utility v σ)) (Fin.last n) g else 0) <
      efx_partial_nat_utility (efx_source_lift_values v (efx_partial_nat_utility v σ)) (efx_source_lift_start σ) (Fin.last n))
efx_source_lift_source_losesIn LeanFair Division

Any complete EFX allocation of the lifted instance lowers the isolated source’s utility.

theorem efx_source_lift_source_loses {n m : ℕ}
  (hn : 0 < n)
  (v : Fin n → Fin m → ℕ) (σ : Fin m → Fin (n+1))
  (hpos : ∀ i g, 0 < v i g)
  (hown : ∀ i, 0 < efx_partial_nat_utility v σ i)
  (hσ : efx_partial_nat v σ)
  (hchar : ∃ g : Fin m, σ g = Fin.last n ∧ ∀ h : Fin m, σ h = Fin.last n → h = g)
  (hunique : ∀ τ : Fin m → Fin (n+1), efx_partial_nat v τ →
    (∀ i, efx_partial_nat_utility v σ i ≤ efx_partial_nat_utility v τ i) → τ = σ)
  (τ : Fin (m+2) → Fin ((n+1)+1))
  (hτ : efx_partial_nat (efx_source_lift_values v (efx_partial_nat_utility v σ)) τ)
  (hcomplete : ∀ g, τ g ≠ Fin.last (n+1)) :
  efx_partial_nat_utility (efx_source_lift_values v (efx_partial_nat_utility v σ)) τ (Fin.last n) <
    efx_partial_nat_utility (efx_source_lift_values v (efx_partial_nat_utility v σ)) (efx_source_lift_start σ) (Fin.last n)
efx_source_lift_unique_irIn LeanFair Division

A unique individually rational partial EFX state lifts to a unique one while adding an isolated source.

theorem efx_source_lift_unique_ir {n m : ℕ}
  (hn : 0 < n)
  (v : Fin n → Fin m → ℕ) (σ : Fin m → Fin (n+1))
  (hpos : ∀ i g, 0 < v i g)
  (hown : ∀ i, 0 < efx_partial_nat_utility v σ i)
  (hσ : efx_partial_nat v σ)
  (hchar : ∃ g : Fin m, σ g = Fin.last n ∧ ∀ h : Fin m, σ h = Fin.last n → h = g)
  (hunique : ∀ τ : Fin m → Fin (n+1), efx_partial_nat v τ →
    (∀ i, efx_partial_nat_utility v σ i ≤ efx_partial_nat_utility v τ i) → τ = σ)
  (τ : Fin (m+2) → Fin ((n+1)+1))
  (hτ : efx_partial_nat (efx_source_lift_values v (efx_partial_nat_utility v σ)) τ)
  (hir : ∀ i, efx_partial_nat_utility (efx_source_lift_values v (efx_partial_nat_utility v σ)) (efx_source_lift_start σ) i ≤
    efx_partial_nat_utility (efx_source_lift_values v (efx_partial_nat_utility v σ)) τ i) : τ = (efx_source_lift_start σ)
efx_source_two_fourth_losesIn LeanFair Division

Every complete EFX allocation strictly lowers the utility of the initially isolated source.

theorem efx_source_two_fourth_loses (σ : Fin 9 → Fin 4)
  (hσ : is_efx_goods (fun i g => (efx_source_two_values i g : ℝ)) σ) :
  additive_valuation (fun g => (efx_source_two_values (3 : Fin 4) g : ℝ)) (bundle_of σ 3) < 16
efx_source_two_no_self_championIn LeanFair Division

The starting state has no self champions.

theorem efx_source_two_no_self_champion (i : Fin 4) (T : Finset (Fin 9))
  (hT : T ⊆ insert 6 (efx_partial_nat_bundle efx_source_two_start i))
  (hprefer : efx_partial_nat_utility efx_source_two_values efx_source_two_start i <
    ∑ g ∈ T, efx_source_two_values i g) :
  ∃ (j : Fin 4) (g : Fin 9), g ∈ T ∧
    efx_partial_nat_utility efx_source_two_values efx_source_two_start j <
      ∑ h ∈ T.erase g, efx_source_two_values j h
efx_source_two_start_sanityIn LeanFair Division

The starting state is positive and strictly EFX, and agent 3 is an isolated source: she strictly neither envies nor is envied.

theorem efx_source_two_start_sanity :
  efx_partial_nat efx_source_two_values efx_source_two_start ∧
  (∀ i : Fin 4, ∀ g : Fin 9, 0 < efx_source_two_values i g) ∧
  (∀ i : Fin 3,
    (∑ g : Fin 9, if efx_source_two_start g = (3 : Fin 5) then efx_source_two_values i.castSucc g else 0) <
      efx_partial_nat_utility efx_source_two_values efx_source_two_start i.castSucc ∧
    (∑ g : Fin 9, if efx_source_two_start g = i.castSucc.castSucc then efx_source_two_values (3 : Fin 4) g else 0) <
      efx_partial_nat_utility efx_source_two_values efx_source_two_start (3 : Fin 4)) ∧
  (∀ (i j : Fin 4), i ≠ j → ∀ g : Fin 9, efx_source_two_start g = j.castSucc →
    (∑ h : Fin 9, if efx_source_two_start h = j.castSucc ∧ h ≠ g then efx_source_two_values i h else 0) <
      efx_partial_nat_utility efx_source_two_values efx_source_two_start i)
efx_source_two_unique_irIn LeanFair Division

The starting allocation is the unique partial EFX allocation preserving all four starting utilities.

theorem efx_source_two_unique_ir (σ : Fin 9 → Fin 5)
  (hσ : efx_partial_nat efx_source_two_values σ)
  (hir : ∀ i : Fin 4, efx_partial_nat_utility efx_source_two_values efx_source_two_start i ≤
    efx_partial_nat_utility efx_source_two_values σ i) : σ = efx_source_two_start
efx_three_agents_additive_existsIn LeanFair Division

For three agents with nonnegative additive valuations, an EFX allocation of indivisible goods always exists.

theorem efx_three_agents_additive_exists (m : ℕ) (u : Fin 3 → Fin m → ℝ) (hu : ∀ i g, 0 ≤ u i g) :
    ∃ σ : Fin m → Fin 3, is_efx_goods u σ
efx_three_pair_anchor_countIn LeanFair Division

Individual rationality forces exactly r anchors for each agent.

theorem efx_three_pair_anchor_count (r : ℕ) (σ : Fin (9+4*r) → Fin 4)
  (hir : ∀ i : Fin 4, 100*r+10 ≤ ∑ g, if σ g = i then efx_three_pair_anchor_values r i g else 0) :
  ∀ i : Fin 4, (Finset.univ.filter (fun g : Fin (4*r) => σ (Fin.natAdd 9 g) = i)).card = r
efx_three_pair_anchor_projectionIn LeanFair Division

If each agent receives r anchors, EFX projects to the nine original goods.

theorem efx_three_pair_anchor_projection (r : ℕ) (σ : Fin (9+4*r) → Fin 4)
  (hcount : ∀ i : Fin 4, (Finset.univ.filter (fun g : Fin (4*r) => σ (Fin.natAdd 9 g) = i)).card = r)
  (hefx : is_efx_goods (fun i g => (efx_three_pair_anchor_values r i g : ℝ)) σ) :
  is_efx_goods (fun i g => (efx_allsource_three_pair_values i g : ℝ)) (fun g => σ (Fin.castAdd (4*r) g))
efx_three_pair_anchor_requires_threeIn LeanFair Division

Every utility-preserving complete EFX allocation splits at least three original enlarged bundles, for every anchor count.

theorem efx_three_pair_anchor_requires_three (r : ℕ) (σ : Fin (9+4*r) → Fin 4)
  (hir : ∀ i : Fin 4, 100*r+10 ≤ ∑ g, if σ g = i then efx_three_pair_anchor_values r i g else 0)
  (hefx : is_efx_goods (fun i g => (efx_three_pair_anchor_values r i g : ℝ)) σ) :
  ∀ a b : Fin 4, a ≠ b →
    σ (Fin.castAdd (4*r) (![0,2,4,6] a)) ≠ σ (Fin.castAdd (4*r) (![1,3,5,7] a)) ∨
    σ (Fin.castAdd (4*r) (![0,2,4,6] b)) ≠ σ (Fin.castAdd (4*r) (![1,3,5,7] b))
efx_three_split_no_two_intactIn LeanFair Division

Every complete EFX allocation in the explicit instance splits at least three of the four old adjacent pairs: for every two distinct old pairs, at least one is split.

theorem efx_three_split_no_two_intact (σ : Fin 9 → Fin 4)
    (hefx : is_efx_goods (fun i g => (efx_three_split_values i g : ℝ)) σ) :
    ∀ a b : Fin 4, a ≠ b →
      σ (![0,2,4,6] a) ≠ σ (![1,3,5,7] a) ∨
      σ (![0,2,4,6] b) ≠ σ (![1,3,5,7] b)
efx_three_split_no_two_intact_0_natIn LeanFair Division

For the explicit instance, no natural EFX allocation encoded by two-intact-pair pattern 0 exists.

theorem efx_three_split_no_two_intact_0_nat (q : Fin 7 → Fin 4) : ¬ efx_three_split_efx_nat (efx_three_split_two_intact_code 0 q)
efx_three_split_no_two_intact_0_nat_case_0In LeanFair Division

For the explicit four-agent instance and intact-pair pattern 0, no natural EFX allocation exists with q 0 = 0.

theorem efx_three_split_no_two_intact_0_nat_case_0 (q : Fin 7 → Fin 4) (hq : q 0 = 0) : ¬ efx_three_split_efx_nat (efx_three_split_two_intact_code 0 q)
efx_three_split_no_two_intact_0_nat_case_1In LeanFair Division

For the explicit four-agent instance and intact-pair pattern 0, no natural EFX allocation exists with q 0 = 1.

theorem efx_three_split_no_two_intact_0_nat_case_1 (q : Fin 7 → Fin 4) (hq : q 0 = 1) : ¬ efx_three_split_efx_nat (efx_three_split_two_intact_code 0 q)
efx_three_split_no_two_intact_0_nat_case_2In LeanFair Division

For the explicit four-agent instance and intact-pair pattern 0, no natural EFX allocation exists with q 0 = 2.

theorem efx_three_split_no_two_intact_0_nat_case_2 (q : Fin 7 → Fin 4) (hq : q 0 = 2) : ¬ efx_three_split_efx_nat (efx_three_split_two_intact_code 0 q)
efx_three_split_no_two_intact_0_nat_case_3In LeanFair Division

For the explicit four-agent instance and intact-pair pattern 0, no natural EFX allocation exists with q 0 = 3.

theorem efx_three_split_no_two_intact_0_nat_case_3 (q : Fin 7 → Fin 4) (hq : q 0 = 3) : ¬ efx_three_split_efx_nat (efx_three_split_two_intact_code 0 q)
efx_three_split_no_two_intact_1_natIn LeanFair Division

For the explicit instance, no natural EFX allocation encoded by two-intact-pair pattern 1 exists.

theorem efx_three_split_no_two_intact_1_nat (q : Fin 7 → Fin 4) : ¬ efx_three_split_efx_nat (efx_three_split_two_intact_code 1 q)
efx_three_split_no_two_intact_2_natIn LeanFair Division

For the explicit instance, no natural EFX allocation encoded by two-intact-pair pattern 2 exists.

theorem efx_three_split_no_two_intact_2_nat (q : Fin 7 → Fin 4) : ¬ efx_three_split_efx_nat (efx_three_split_two_intact_code 2 q)
efx_three_split_no_two_intact_3_natIn LeanFair Division

For the explicit instance, no natural EFX allocation encoded by two-intact-pair pattern 3 exists.

theorem efx_three_split_no_two_intact_3_nat (q : Fin 7 → Fin 4) : ¬ efx_three_split_efx_nat (efx_three_split_two_intact_code 3 q)
efx_three_split_no_two_intact_4_natIn LeanFair Division

For the explicit instance, no natural EFX allocation encoded by two-intact-pair pattern 4 exists.

theorem efx_three_split_no_two_intact_4_nat (q : Fin 7 → Fin 4) : ¬ efx_three_split_efx_nat (efx_three_split_two_intact_code 4 q)
efx_three_split_no_two_intact_5_natIn LeanFair Division

For the explicit instance, no natural EFX allocation encoded by two-intact-pair pattern 5 exists.

theorem efx_three_split_no_two_intact_5_nat (q : Fin 7 → Fin 4) : ¬ efx_three_split_efx_nat (efx_three_split_two_intact_code 5 q)
efx_three_split_with_small_tailIn LeanFair Division

For the explicit nine-good instance, append any finite number of nonnegative goods whose total value is less than one for each agent. Every EFX allocation of all goods still splits at least three of the four original pairs.

theorem efx_three_split_with_small_tail {k : ℕ}
    (w : Fin 4 → Fin (9+k) → ℝ)
    (hw : ∀ i g, 0 ≤ w i g)
    (hbase : ∀ i (g : Fin 9), w i (Fin.castAdd k g) = (efx_three_split_values i g : ℝ))
    (htail : ∀ i, (∑ g : Fin k, w i (Fin.natAdd 9 g)) < 1)
    (σ : Fin (9+k) → Fin 4) (hσ : is_efx_goods w σ) :
    ∀ a b : Fin 4, a ≠ b →
      σ (Fin.castAdd k (![0,2,4,6] a)) ≠ σ (Fin.castAdd k (![1,3,5,7] a)) ∨
      σ (Fin.castAdd k (![0,2,4,6] b)) ≠ σ (Fin.castAdd k (![1,3,5,7] b))
envy_free_with_subsidy_of_aggregate_two_agentsIn LeanFair Division

For two agents, if the sum of the two agents' envy differences is nonnegative, v_0(A_0) - v_0(A_1) + v_1(A_1) - v_1(A_0) >= 0, then the allocation admits nonnegative subsidies making it envy-free.

theorem envy_free_with_subsidy_of_aggregate_two_agents {m : ℕ}
    (v : Fin 2 → Finset (Fin m) → ℝ) (σ : Fin m → Fin 2)
    (h : 0 ≤ (v 0 (bundle_of σ 0) - v 0 (bundle_of σ 1))
           + (v 1 (bundle_of σ 1) - v 1 (bundle_of σ 0))) :
    ∃ s : Fin 2 → ℝ, is_envy_free_with_subsidy v σ s
equal_marginal_balanced_high_count_allocations_paddedIn LeanFair Division

For at least two agents and any finite number m of chores, each agent has an arbitrary set of high chores. There are n allocations such that each chore goes once to each agent across the n allocations; in each allocation every agent's chore count times n is at most m+n-1, and her high chore count times n is at most her total number of high chores plus n-1.

theorem equal_marginal_balanced_high_count_allocations_padded (n m : ℕ) (hn : 2 ≤ n) (H : Fin n → Finset (Fin m)) : ∃ F : Fin n → Fin m → Fin n, (∀ g, Function.Bijective (fun t => F t g)) ∧ ∀ t i, n * (bundle_of (F t) i).card ≤ m + n - 1 ∧ n * ((bundle_of (F t) i ∩ H i).card) ≤ (H i).card + n - 1
ex_post_five_fourths_mms_chore_lottery_existsIn LeanFair Division

For any n >= 1 agents and m indivisible chores with nonnegative additive costs, there exists an allocation lottery that is simultaneously ex-ante proportional and ex-post 5/4-MMS.

theorem ex_post_five_fourths_mms_chore_lottery_exists
  (n m : ℕ) [NeZero n] (c : Fin n → Fin m → ℝ) (hc : ∀ i e, 0 ≤ c i e) :
  ∃ p ∈ stdSimplex ℝ (Fin m → Fin n),
    is_ex_ante_proportional_chores c p ∧
    is_ex_post_alpha_mms_chores (5 / 4) c p
ex_post_one_mms_chore_lottery_two_agentsIn LeanFair Division

For two agents and any m indivisible chores with nonnegative additive costs, there exists an allocation lottery that is simultaneously ex-ante proportional and ex-post 1-MMS.

theorem ex_post_one_mms_chore_lottery_two_agents (m : ℕ) (c : Fin 2 → Fin m → ℝ)
  (hc : ∀ i e, 0 ≤ c i e) :
  ∃ p ∈ stdSimplex ℝ (Fin m → Fin 2),
    is_ex_ante_proportional_chores c p ∧
    is_ex_post_alpha_mms_chores 1 c p
exists_finset_prescribed_countsIn LeanFair Division

Given a subset H of chores and counts a <= |H|, b <= |univ \ H|, there is a set S with exactly a elements of H and exactly b elements outside H, hence |S| = a + b.

theorem exists_finset_prescribed_counts {m : ℕ} (H : Finset (Fin m)) (a b : ℕ)
    (ha : a ≤ H.card) (hb : b ≤ (Finset.univ \ H).card) :
  ∃ S : Finset (Fin m), S.card = a + b ∧ (S ∩ H).card = a
exists_fpo_two_type_choresIn LeanFair Division

For n ≥ 2 agents, any chore totals a, b and strictly positive costs p, q, there exists an integer two-type allocation (sum x = a, sum y = b) that is fractionally Pareto optimal; explicitly, giving every chore to a single agent works.

theorem exists_fpo_two_type_chores {n : ℕ} (hn : 2 ≤ n) (a b : ℕ) (p q : Fin n → ℝ)
    (hp : ∀ i, 0 < p i) (hq : ∀ i, 0 < q i) :
    ∃ x y : Fin n → ℕ, is_two_type_allocation n a b x y ∧
      is_fractionally_pareto_optimal_two_type_chores p q x y
exists_maxmin_value_identical_valuationIn LeanFair Division

For any valuation w and at least one agent, some allocation σ attains the max-min bundle value mu: every bundle of σ is worth at least mu, and every allocation has some bundle worth at most mu.

theorem exists_maxmin_value_identical_valuation {m n : ℕ} (hn : 0 < n)
    (w : Fin m → ℝ) :
    ∃ (mu : ℝ) (sigma : Fin m → Fin n),
      (∀ i, mu ≤ additive_valuation w (bundle_of sigma i)) ∧
      (∀ tau : Fin m → Fin n, ∃ i, additive_valuation w (bundle_of tau i) ≤ mu)
exists_potential_of_no_positive_simple_cycleIn LeanFair Division

If every simple cycle of a finite weighted digraph (weights c : α → α → ℝ on the complete digraph) has nonpositive total weight, then there is a real potential s with c i j ≤ s i - s j for all i j.

theorem exists_potential_of_no_positive_simple_cycle {α : Type*} [Fintype α]
    (c : α → α → ℝ)
    (h : ∀ (k : ℕ) (f : Fin (k + 1) → α),
      Function.Injective (fun t : Fin k => f (Fin.castSucc t)) →
      f 0 = f (Fin.last k) →
      ∑ t : Fin k, c (f (Fin.castSucc t)) (f (Fin.succ t)) ≤ 0) :
    ∃ s : α → ℝ, ∀ i j, c i j ≤ s i - s j
finset_card_filter_deviation_div_leIn LeanFair Division

Finite Chebyshev–Markov bound: for a real function X on a finite type with centre c, the proportion of points with |X - c| ≥ ε is at most ε^{-2} times the mean squared deviation from c.

theorem finset_card_filter_deviation_div_le {α : Type*} [Fintype α]
    (X : α → ℝ) (c ε : ℝ) (hε : 0 < ε) :
    ((Finset.univ.filter (fun a => ε ≤ |X a - c|)).card : ℝ) / (Fintype.card α : ℝ) ≤
      (1 / ε^2) * ((∑ a, (X a - c)^2) / (Fintype.card α : ℝ))
finset_prod_prod_erase_powIn LeanFair Division

In any commutative monoid, the product of products over all elements j distinct from i in a finite set s equals the total product raised to the power (|s| - 1).

theorem finset_prod_prod_erase_pow {α M : Type*} [CommMonoid M] [DecidableEq α] (s : Finset α) (f : α → M) :
    ∏ i ∈ s, ∏ j ∈ s.erase i, f j = (∏ i ∈ s, f i) ^ (s.card - 1)
four_agent_critical_equal_weight_allocation_familyIn LeanFair Division

For four agents and nine chores, suppose each agent designates five chores high. There exist four allocations such that every chore goes once to each agent across the allocations, agent i receives three chores in round i and two in every other round, and her three-chore bundle in round i contains at most one chore she designates high.

theorem four_agent_critical_equal_weight_allocation_family (H : Fin 4 → Finset (Fin 9)) (hH : ∀ i, (H i).card = 5) : ∃ F : Fin 4 → Fin 9 → Fin 4, (∀ g, Function.Bijective (fun t => F t g)) ∧ (∀ t i, (bundle_of (F t) i).card = if i = t then 3 else 2) ∧ ∀ t, ((bundle_of (F t) t) ∩ H t).card ≤ 1
fpo_of_weight_tie_two_agentsIn LeanFair Division

If an allocation of goods to two agents is optimal for some positive weighted sum of the two additive utilities — equivalently, there is t > 0 such that agent 0 gets only goods with t*u_1(g) ≤ u_0(g) and agent 1 gets only goods with u_0(g) ≤ t*u_1(g) — then the allocation is fractionally Pareto optimal.

theorem fpo_of_weight_tie_two_agents {m : ℕ} (u : Fin 2 → Fin m → ℝ) (σ : Fin m → Fin 2)
    (h : ∃ t : ℝ, 0 < t ∧ ∀ g : Fin m,
      (σ g = 1 → u 0 g ≤ t * u 1 g) ∧ (σ g = 0 → t * u 1 g ≤ u 0 g)) :
    is_fractionally_pareto_optimal u σ
has_consistent_online_alpha_mms_mono_factorIn LeanFair Division

For 1 ≤ r, if a consistent online allocator guarantees α-MMS after every bivalued prefix then it also guarantees β-MMS for every β ≥ α; so has_consistent_online_alpha_mms is monotone in the factor.

theorem has_consistent_online_alpha_mms_mono_factor {r α β : ℝ} (hr : 1 ≤ r) (hαβ : α ≤ β)
    (h : has_consistent_online_alpha_mms r α) : has_consistent_online_alpha_mms r β
has_consistent_online_alpha_mms_twoIn LeanFair Division

For every r ≥ 1 there is a consistent deterministic online allocator for two agents guaranteeing a 2-MMS allocation after every prefix of every length whenever each agent's cost for each chore lies in {1, r}: the allocator that gives every arriving chore to agent 0.

theorem has_consistent_online_alpha_mms_two (r : ℝ) (hr : 1 ≤ r) :
    has_consistent_online_alpha_mms r 2
high_slack_small_bundle_sharp_mms_boundIn LeanFair Division

For positive n, nonnegative integer d and at least 2n(d+1) chores, ratio r>=1 and positive scale a, let every chore cost a or r*a. Any bundle of size at most floor(m/n) with at most ceil(the total number of high-cost chores/n)+d high-cost chores costs at most (r+1)/2 times the agent’s n-agent chore maximin share.

theorem high_slack_small_bundle_sharp_mms_bound (n m d : ℕ) (hn : 1 ≤ n) (hm : 2*n*(d+1) ≤ m) (r a : ℝ) (hr : 1 ≤ r) (ha : 0 < a) (u : Fin m → ℝ) (hu : ∀ g, u g = a ∨ u g = r*a) (S : Finset (Fin m)) (hs : n*S.card ≤ m) (hh : n*((S.filter fun g => u g = r*a).card) ≤ (Finset.univ.filter fun g => u g = r*a).card+n*(d+1)-1) : additive_valuation u S ≤ ((r+1)/2)*chore_maximin_share n u
is_alpha_mms_chores_mono_alphaIn LeanFair Division

For any m, n, cost matrix c and allocation σ, if every agent's maximin share is nonnegative then being α-MMS implies being β-MMS for every β ≥ α.

theorem is_alpha_mms_chores_mono_alpha {m n : ℕ} {α β : ℝ} (hαβ : α ≤ β)
    {c : Fin n → Fin m → ℝ} {σ : Fin m → Fin n}
    (hmms : ∀ i, 0 ≤ chore_maximin_share n (c i))
    (h : is_alpha_mms_chores α c σ) : is_alpha_mms_chores β c σ
is_alpha_pmms_of_pair_half_boundIn LeanFair Division

If alpha ≥ 0 and an allocation (x,y) is such that every agent i's own bundle cost is at most (alpha/2) times the cost to i of the bundle she shares with any other agent j (bundle (x_i+x_j, y_i+y_j)), then (x,y) is alpha-PMMS.

theorem is_alpha_pmms_of_pair_half_bound {α : ℝ} (hα : 0 ≤ α)
    {n : ℕ} {p q : Fin n → ℝ} (hp : ∀ i, 0 < p i) (hq : ∀ i, 0 < q i)
    (x y : Fin n → ℕ)
    (h : ∀ (i j : Fin n), i ≠ j →
        p i * (x i : ℝ) + q i * (y i : ℝ) ≤
          (α / 2) * (p i * ((x i + x j : ℕ) : ℝ) + q i * ((y i + y j : ℕ) : ℝ))) :
    is_alpha_pmms_two_type_chores α p q x y
is_efx_goods_nat_restrict_of_small_tailIn LeanFair Division

For natural-valued base goods and nonnegative real-valued additional goods whose total value is less than one for every agent, the restriction of any EFX allocation of all goods to the base goods is EFX.

theorem is_efx_goods_nat_restrict_of_small_tail {n m k : ℕ}
    (v : Fin n → Fin m → ℕ) (w : Fin n → Fin (m+k) → ℝ)
    (hw : ∀ i g, 0 ≤ w i g)
    (hbase : ∀ i (g : Fin m), w i (Fin.castAdd k g) = (v i g : ℝ))
    (htail : ∀ i, (∑ g : Fin k, w i (Fin.natAdd m g)) < 1)
    (σ : Fin (m+k) → Fin n) (hσ : is_efx_goods w σ) :
    is_efx_goods (fun i g => (v i g : ℝ)) (fun g => σ (Fin.castAdd k g))
is_efx_goods_of_bundle_boundsIn LeanFair Division

For identical additive valuations, if every agent's bundle is worth at least R and removing any item from any bundle leaves value at most R, then the allocation is EFX.

theorem is_efx_goods_of_bundle_bounds {m n : ℕ} (u : Fin m → ℝ) (σ : Fin m → Fin n) (R : ℝ)
    (h_ge : ∀ i : Fin n, R ≤ additive_valuation u (bundle_of σ i))
    (h_le : ∀ j : Fin n, ∀ g ∈ bundle_of σ j, additive_valuation u ((bundle_of σ j).erase g) ≤ R) :
    is_efx_goods (fun _ => u) σ
is_efx_goods_of_maxmin_bundle_valueIn LeanFair Division

If all agents share one valuation w with w ≥ 0, and the allocation σ has every bundle worth at least mu while no allocation gives every agent strictly more than mu (so mu is the max-min value), then σ is EFX.

theorem is_efx_goods_of_maxmin_bundle_value {m n : ℕ}
    (w : Fin m → ℝ) (hw : ∀ g, 0 ≤ w g)
    (sigma : Fin m → Fin n) (mu : ℝ)
    (hsigma : ∀ i, mu ≤ additive_valuation w (bundle_of sigma i))
    (hmu : ∀ tau : Fin m → Fin n, ∃ i, additive_valuation w (bundle_of tau i) ≤ mu) :
    is_efx_goods (fun _ => w) sigma
is_envy_free_with_subsidy_exists_iff_perm_welfare_maxIn LeanFair Division

An allocation admits a nonnegative subsidy vector making it envy-free if and only if it maximises utilitarian welfare among all permutations of its own bundles.

theorem is_envy_free_with_subsidy_exists_iff_perm_welfare_max {m n : ℕ}
    (v : Fin n → Finset (Fin m) → ℝ) (sigma : Fin m → Fin n) :
    (∃ s : Fin n → ℝ, is_envy_free_with_subsidy v sigma s) ↔
      ∀ pi : Equiv.Perm (Fin n),
        ∑ i, v i (bundle_of sigma (pi i)) ≤ ∑ i, v i (bundle_of sigma i)
is_guaranteed_round_robin_ef1_factor_antitoneIn LeanFair Division

The property of being a guaranteed Round-Robin EF1 factor is antitone: if β is guaranteed and α ≤ β, then α is also guaranteed.

theorem is_guaranteed_round_robin_ef1_factor_antitone (n : ℕ) [NeZero n] {α β : ℝ} (h : α ≤ β)
    (hβ : is_guaranteed_round_robin_ef1_factor n β) :
    is_guaranteed_round_robin_ef1_factor n α
is_two_pmms_twoIn LeanFair Division

Every two-chore-type allocation is 2-PMMS: each agent's bundle costs at most twice her pairwise maximin share against any other agent.

theorem is_two_pmms_two {n : ℕ} {p q : Fin n → ℝ} (hp : ∀ i, 0 < p i) (hq : ∀ i, 0 < q i)
    (x y : Fin n → ℕ) : is_alpha_pmms_two_type_chores 2 p q x y
iterated_round_robin_two_agents_item_preserving_swaps_leIn LeanFair Division

For two agents with additive utilities consistent with strict rankings, iterated Round Robin from truthful bids, where at each step an agent with a strictly profitable item-preserving swap replaces its bid by a best response among its item-preserving swaps, makes at most m(m-1)/2 manipulations.

theorem iterated_round_robin_two_agents_item_preserving_swaps_le (m : ℕ)
    (pref : Fin 2 → Fin m ≃ Fin m) (v : Fin 2 → Fin m → ℝ) (hv : ∀ i g, 0 ≤ v i g)
    (hcons : ∀ (i : Fin 2) (k l : Fin m), k < l → v i (pref i l) < v i (pref i k))
    (f : ℕ → (Fin 2 → Fin m ≃ Fin m)) (hf0 : f 0 = pref) (T : ℕ)
    (hf : ∀ t < T, irr_step v (round_robin_sequence 2 m)
      (is_item_preserving_swap_bid (round_robin_sequence 2 m)) (f t) (f (t + 1))) :
    T ≤ m * (m - 1) / 2
maximin_share_additive_antitone_agentsIn LeanFair Division

For a nonnegative additive valuation, the 1-out-of-d maximin share is antitone in d: asking for fewer bundles (a 1-out-of-d guarantee with smaller d) can only make the guarantee larger.

theorem maximin_share_additive_antitone_agents {m : ℕ} (u : Fin m → ℝ) (hu : ∀ g, 0 ≤ u g)
    {d d' : ℕ} (hd : 1 ≤ d) (hdd : d ≤ d') :
    maximin_share (additive_valuation u) d' ≤ maximin_share (additive_valuation u) d
maximin_share_additive_le_averageIn LeanFair Division

For an additive valuation, the 1-out-of-d maximin share is at most the total value divided by d: in every partition some bundle is worth at most the average.

theorem maximin_share_additive_le_average {m d : ℕ} (u : Fin m → ℝ) (hd : 1 ≤ d) :
    maximin_share (additive_valuation u) d ≤ (∑ g, u g) / (d : ℝ)
maximin_share_ge_of_bundle_partitionIn LeanFair Division

If a single partition of the items into d bundles makes every bundle worth at least X, then the 1-out-of-d maximin share is at least X.

theorem maximin_share_ge_of_bundle_partition {m d : ℕ} (u : Fin m → ℝ) (hd : 1 ≤ d)
    (P : Fin m → Fin d) {X : ℝ} (hP : ∀ k, X ≤ additive_valuation u (bundle_of P k)) :
    X ≤ maximin_share (additive_valuation u) d
mms_bad_cover_asymptoticIn LeanFair Division

Upper-bound partition family of arXiv:2610.06125 Section 3: there is g(n) = n + log₂ n + o(log₂ n) such that for all large n the n agents' partitions of the g(n) goods admit no covering allocation (no rainbow/transversal choice of one block per agent).

theorem mms_bad_cover_asymptotic :
    ∃ g : ℕ → ℕ,
      (fun n : ℕ => (g n : ℝ) - (n : ℝ) - Real.logb 2 (n : ℝ)) =o[Filter.atTop]
        (fun n : ℕ => Real.logb 2 (n : ℝ)) ∧
      ∀ᶠ n in Filter.atTop, mms_has_bad_cover n (g n)
mms_bad_cover_not_existsIn LeanFair Division

A bad cover yields no MMS allocation: if the n partitions admit no choice of one block per agent with pairwise disjoint blocks, then taking v_i(S) = #{blocks of P_i contained in S} gives maximin share 1 for every agent, and no allocation reaches 1 for all agents.

theorem mms_bad_cover_not_exists {n m : ℕ} (hn : 1 ≤ n) {P : Fin n → Fin m → Fin n}
    (h : mms_bad_cover n m P) : ¬ mms_exists_monotone n m
mms_bad_cover_three_fiveIn LeanFair Division

With three agents and five goods there is a bad cover with no covering allocation, so no MMS allocation exists there and μ(3) ≤ 4.

theorem mms_bad_cover_three_five : mms_has_bad_cover 3 5
mms_bad_cover_two_fourIn LeanFair Division

With two agents and four goods there are two partitions of the four goods into two nonempty blocks with no covering allocation: the two crossing pairings {0,1}/{2,3} and {0,2}/{1,3}. So μ(2) ≤ 3, matching the known μ(2) = 3.

theorem mms_bad_cover_two_four : mms_has_bad_cover 2 4
mms_block_count_valuation_ge_oneIn LeanFair Division

For the block-count valuation, a bundle is worth at least 1 exactly when it contains one of the partition's blocks.

theorem mms_block_count_valuation_ge_one {m n : ℕ} (P : Fin m → Fin n) (S : Finset (Fin m)) :
    1 ≤ mms_block_count_valuation P S ↔ ∃ k : Fin n, bundle_of P k ⊆ S
mms_block_count_valuation_is_monotoneIn LeanFair Division

The block-count valuation of a partition with all blocks nonempty is a monotone valuation with value 0 on the empty set.

theorem mms_block_count_valuation_is_monotone {m n : ℕ} (P : Fin m → Fin n)
    (hsurj : Function.Surjective P) :
    is_monotone_valuation (mms_block_count_valuation P) ∧ mms_block_count_valuation P ∅ = 0
mms_block_count_valuation_maximin_shareIn LeanFair Division

For the block-count valuation of a partition into n nonempty blocks, the maximin share among n agents is exactly 1: the MMS is at most 1 because for any partition the n blocks of the original partition can be counted in at most n bundles in total, and at least 1 because the original partition itself gives every bundle 1.

theorem mms_block_count_valuation_maximin_share {m n : ℕ} (P : Fin m → Fin n) (hn : 1 ≤ n)
    (hsurj : Function.Surjective P) :
    maximin_share (mms_block_count_valuation P) n = 1
mms_no_bad_cover_two_threeIn LeanFair Division

Sanity check that the bad-cover predicate is not vacuous: with two agents and only three goods there is no bad cover, i.e. every pair of 2-block partitions of three goods admits a covering allocation.

theorem mms_no_bad_cover_two_three : ¬ mms_has_bad_cover 2 3
mms_not_exists_monotone_eventuallyIn LeanFair Division

For all sufficiently large n, there exists some number of goods K where an MMS allocation fails to exist, ensuring the set defining μ(n) is bounded above.

theorem mms_not_exists_monotone_eventually :
    ∀ᶠ n : ℕ in Filter.atTop, ∃ K : ℕ, ¬ mms_exists_monotone n K
mms_not_exists_of_bad_cover_of_leIn LeanFair Division

A bad cover for n agents on m goods also defeats MMS with any larger number of goods: passing to more goods by putting the extra items anywhere keeps the obstruction.

theorem mms_not_exists_of_bad_cover_of_le {n m m' : ℕ} (hn : 1 ≤ n)
    (h : mms_has_bad_cover n m) (hle : m ≤ m') : ¬ mms_exists_monotone n m'
mms_threshold_monotone_lower_asymptoticIn LeanFair Division

Conjectured asymptotic lower bound on μ(n) (OP-87, arXiv:2610.06125, Section 3): the threshold μ(n) is at least n + log₂ n - o(log₂ n) as n → ∞.

theorem mms_threshold_monotone_lower_asymptotic :
    (fun n : ℕ => max 0 ((n : ℝ) + Real.logb 2 (n : ℝ) - (mms_threshold_monotone n : ℝ))) =o[Filter.atTop]
      (fun n : ℕ => Real.logb 2 (n : ℝ))
mms_threshold_monotone_lower_asymptotic_of_sequenceIn LeanFair Division

If a sequence f(n) is eventually at most the MMS threshold μ(n) and deviates from n + log₂ n by o(log₂ n), then max 0 (n + log₂ n - μ(n)) is o(log₂ n).

theorem mms_threshold_monotone_lower_asymptotic_of_sequence (f : ℕ → ℝ)
    (hle : ∀ᶠ n : ℕ in Filter.atTop, f n ≤ (mms_threshold_monotone n : ℝ))
    (hdiff : (fun n : ℕ => (n : ℝ) + Real.logb 2 (n : ℝ) - f n) =o[Filter.atTop]
      (fun n : ℕ => Real.logb 2 (n : ℝ))) :
    (fun n : ℕ => max 0 ((n : ℝ) + Real.logb 2 (n : ℝ) - (mms_threshold_monotone n : ℝ))) =o[Filter.atTop]
      (fun n : ℕ => Real.logb 2 (n : ℝ))
mms_threshold_monotone_lower_asymptotic_sequence_existsIn LeanFair Division

There exists an integer sequence f(n) such that MMS allocations exist for all m' ≤ f(n) and f(n) is asymptotically n + log₂ n - o(log₂ n).

theorem mms_threshold_monotone_lower_asymptotic_sequence_exists :
    ∃ f : ℕ → ℕ,
      (∀ᶠ n : ℕ in Filter.atTop, ∀ m' ≤ f n, mms_exists_monotone n m') ∧
      ((fun n : ℕ => (n : ℝ) + Real.logb 2 (n : ℝ) - (f n : ℝ)) =o[Filter.atTop]
        (fun n : ℕ => Real.logb 2 (n : ℝ)))
mms_threshold_monotone_lower_asymptotic_threshold_of_existsIn LeanFair Division

If for all m' ≤ m every monotone instance with n agents and m' goods has an MMS allocation, and the threshold set is bounded above by a counterexample at K goods, then m ≤ μ(n).

theorem mms_threshold_monotone_lower_asymptotic_threshold_of_exists (n m : ℕ)
    (hK : ∃ K : ℕ, ¬ mms_exists_monotone n K)
    (hm : ∀ m' ≤ m, mms_exists_monotone n m') :
    m ≤ mms_threshold_monotone n
mms_threshold_monotone_lt_of_not_existsIn LeanFair Division

If there is no MMS allocation with K goods, then the threshold μ(n) is strictly below K.

theorem mms_threshold_monotone_lt_of_not_exists {n K : ℕ} (hK : 1 ≤ K)
    (h : ¬ mms_exists_monotone n K) : mms_threshold_monotone n < K
mms_threshold_monotone_upper_asymptoticIn LeanFair Division

Asymptotic upper bound on μ(n) from arXiv:2610.06125 (Section 3): the threshold μ(n) is at most n + log₂ n + o(log₂ n) as n → ∞.

theorem mms_threshold_monotone_upper_asymptotic :
    (fun n : ℕ => max 0 ((mms_threshold_monotone n : ℝ) - (n : ℝ) - Real.logb 2 (n : ℝ))) =o[Filter.atTop]
      (fun n : ℕ => Real.logb 2 (n : ℝ))
mms_threshold_upper_asymptotic_of_not_existsIn LeanFair Division

Assembly: if g(n) − n − log₂ n = o(log₂ n) and for all large n there is no MMS allocation with g(n) goods, then max 0 (μ(n) − n − log₂ n) = o(log₂ n).

theorem mms_threshold_upper_asymptotic_of_not_exists (g : ℕ → ℕ)
    (hg : (fun n : ℕ => (g n : ℝ) - (n : ℝ) - Real.logb 2 (n : ℝ)) =o[Filter.atTop]
      (fun n : ℕ => Real.logb 2 (n : ℝ)))
    (hbad : ∀ᶠ n in Filter.atTop, ¬ mms_exists_monotone n (g n)) :
    (fun n : ℕ => max 0 ((mms_threshold_monotone n : ℝ) - (n : ℝ) - Real.logb 2 (n : ℝ)))
      =o[Filter.atTop] (fun n : ℕ => Real.logb 2 (n : ℝ))
no_deterministic_online_upgrade_recourse_alpha_efx_choresIn LeanFair Division

Theorem 6.1 of arXiv:2611.00432: for every number of agents n ≥ 2 and finite approximation factor α ≥ 1, and for every deterministic prediction-free online chore algorithm alg with upgrade recourse, there exist a horizon m and an arrival sequence of identical strictly positive chore costs c such that alg's allocation at horizon m fails α-EFX (¬ is_alpha_efx_chores α ...), and the final instance admits an allocation σ that is both exactly EFX (is_alpha_efx_chores 1) and exactly MMS (is_alpha_mms_chores 1).

theorem no_deterministic_online_upgrade_recourse_alpha_efx_chores
    (n : ℕ) (hn : 2 ≤ n) (α : ℝ) (hα : 1 ≤ α) (alg : DeterministicOnlineChoreRule n) :
    ∃ (m : ℕ) (c : Fin n → ℕ → ℝ),
      (∀ i t, 0 < c i t) ∧ (∀ i j t, c i t = c j t) ∧
      ¬ is_alpha_efx_chores α (fun i (d : Fin m) => c i d.val) (alg.alloc c m) ∧
      ∃ σ : Fin m → Fin n,
        is_alpha_efx_chores 1 (fun i (d : Fin m) => c i d.val) σ ∧
        is_alpha_mms_chores 1 (fun i (d : Fin m) => c i d.val) σ
non_wasteful_card_sumIn LeanFair Division

For a non-wasteful allocation rule on n agents and k * n + r objects, the bundle cardinalities sum to k * n + r.

theorem non_wasteful_card_sum (n k r : ℕ)
    (f : (Fin n → LinearOrder (Fin (k * n + r))) → Fin n → Finset (Fin (k * n + r)))
    (h_alloc : is_allocation_rule f) (h_nw : is_non_wasteful_rule f)
    (succ : Fin n → LinearOrder (Fin (k * n + r))) :
    ∑ i, (f succ i).card = k * n + r
not_adversary_forces_ratio_of_two_leIn LeanFair Division

For r ≥ 1 and any horizon H, and any α ≥ 2, no adversary forces factor α by prefix H: the constant allocator that puts every chore on agent 0 is online and achieves 2-MMS after every bivalued prefix, and 2-MMS implies α-MMS.

theorem not_adversary_forces_ratio_of_two_le (r α : ℝ) (hr : 1 ≤ r) (H : ℕ) (hα : 2 ≤ α) :
    ¬ adversary_forces_ratio r α H
not_fpo_of_cross_goodsIn LeanFair Division

If an allocation gives an LL good to agent 0 and an HH good to agent 1, it admits a fractional trade improving agent 0 while keeping agent 1's utility unchanged, and is therefore not fractionally Pareto optimal.

theorem not_fpo_of_cross_goods {m : ℕ} (a b : ℝ) (u : Fin 2 → Fin m → ℝ) (σ : Fin m → Fin 2)
    (g1 g2 : Fin m) (hne : g1 ≠ g2) (hg1 : σ g1 = 1) (hg2 : σ g2 = 0)
    (h_u0_g1 : u 0 g1 = a) (h_u0_g2 : u 0 g2 = 1)
    (h_u1_g1 : u 1 g1 = b) (h_u1_g2 : u 1 g2 = 1)
    (hb : 1 < b) (hba : b < a) :
    ¬ is_fractionally_pareto_optimal u σ
not_is_guaranteed_round_robin_ef1_factor_of_witnessIn LeanFair Division

If there exists an instance with n agents and m goods with nonnegative weights admitting a pure Nash equilibrium under Round-Robin whose outcome is not α-EF1, then α is not guaranteed for n agents.

theorem not_is_guaranteed_round_robin_ef1_factor_of_witness (n : ℕ) [NeZero n] (α : ℝ)
    (m : ℕ) (w : Fin n → Fin m → ℝ) (hw : ∀ i g, 0 ≤ w i g)
    (rank : Fin n → Fin m ≃ Fin m)
    (hpne : is_picking_sequence_pne
      (SocialChoice.FairDivision.Indivisible.AdditiveValuation.toValuation ⟨w⟩)
      (round_robin_sequence n m) rank)
    (hnot : ¬ is_alpha_ef1 α
      (SocialChoice.FairDivision.Indivisible.AdditiveValuation.toValuation ⟨w⟩)
      (picking_sequence_outcome (round_robin_sequence n m) rank)) :
    ¬ is_guaranteed_round_robin_ef1_factor n α
not_planar_necklace_three_agents_two_cutsIn LeanFair Division

The statement planar_necklace_three_agents_two_cuts is false: The statement is false. Counterexample: the six collinear points P = {(0,0),(1,0),(2,0),(3,0),(4,0),(5,0)} on the x-axis, coloured by c p = 0 (red) if p.1 < 3 and c p = 1 (blue) otherwise. Then #red = 3 and #blue = 3, so both divisibility hypotheses hold, and each of the three agents must receive exactly one red and one blue point, i.e. exactly two points of P. Why no two straight lines can do this. (1) alpha is surjective on P (all three agents get points), and alpha is constant on sign classes, so the number of sign classes is at least 3, hence |L| >= 2; combined with |L| <= 2 this gives L = {l1, l2} with l1 ≠ l2. (2) For a straight line l, the function x ↦ l.cut (x,0) is affine, x ↦ A x + C with A = l.cut.linear (1,0), C = l.cut 0. Consequently the sign data of l on the six points is one of only these patterns: (a) l contains all six points (only possible for the x-axis, in which case that sign bit is free at every point); (b) all six points lie strictly on one side (constant bit); (c) a threshold pattern — for some t the indices < t are on one side, the indices > t on the other, and at most the single index equal to t lies on l (that one point has a free bit). Two distinct lines cannot both have pattern (a), because both would have to be the x-axis. (3) Given data of these two kinds, the plane is divided into at most three sign cells with respect to the six points (as i = 0..5 increases, each bit flips at most once, monotonically), and only the at most two points lying on a line may be moved to an adjacent cell. Enumerating all 29 x 29 admissible sign-data pairs together with all maps from the four possible sign cells to the three agents and all red-blue pairings shows that no arrangement admits a fair allocation: exactly zero feasible pairs remain once the sole spurious pair (both lines = the x-axis) is discarded. This enumeration was carried out and machine-checked in Lean (experiment 4536: ((idxPairs.filter fun p => ... && Feas (getD p.1) (getD p.2)).length evaluates to 0). The human-readable reason for the hardest case (one line = the x-axis, so that bit is free everywhere): the second line then splits the indices into a prefix and a suffix, one agent would have to take its whole (1,1) share from the prefix and another its whole (1,1) share from the suffix, but any prefix of R,R,R,B,B,B that contains a blue contains three reds, and any suffix that contains a red contains three blues. Note also that the natural "parallel two-cut" reduction is genuinely weaker than the statement and cannot rescue it: with two parallel cuts the 1-D problem also fails on the ordering R,R,R,B,B,B (machine-checked, experiment 4520); it succeeds there only through a linear functional that vanishes on the carrier line, which requires the two "lines" to coincide and hence yields only two sign classes. For the record, the following structural lemma in this topic is true and was proved in full in Lean during this attempt (it is the statement of the existing node is_straight_line_cut_consistent_of_parallel_cuts): if phi ≠ 0 is a linear functional, t1 < t2, and alpha : ℝ×ℝ → Fin 3 satisfies alpha p = 0 → phi p ≤ t1, alpha p = 1 → t1 ≤ phi p ≤ t2, alpha p = 2 → t2 ≤ phi p, then some L with L.card ≤ 2 is consistent with alpha on P (take the two lines phi = t1 and phi = t2, and let s put a point strictly above a line on the true side, strictly below on the false side, and on a line send it to its own agent).

theorem not_planar_necklace_three_agents_two_cuts : ¬ (∀ (P : Finset (ℝ × ℝ)) (c : (ℝ × ℝ) → Fin 2)
    (h_red : 3 ∣ (P.filter (fun p => c p = 0)).card)
    (h_blue : 3 ∣ (P.filter (fun p => c p = 1)).card), ∃ (L : Finset StraightLine) (α : (ℝ × ℝ) → Fin 3),
      L.card ≤ 2 ∧
      is_straight_line_cut_consistent P L α ∧
      ∀ i : Fin 3,
        (P.filter (fun p => α p = i ∧ c p = 0)).card = (P.filter (fun p => c p = 0)).card / 3 ∧
        (P.filter (fun p => α p = i ∧ c p = 1)).card = (P.filter (fun p => c p = 1)).card / 3)
not_reciprocal_between_consecutive_reciprocalsIn LeanFair Division

Every ratio r in [1,2] which is not 1 and not of the form 1 + 1/k for a positive integer k lies strictly between two consecutive reciprocal values: there is t ≥ 2 with 1 + 1/t < r < 1 + 1/(t-1).

theorem not_reciprocal_between_consecutive_reciprocals (r : ℝ) (hr1 : 1 ≤ r) (hr2 : r ≤ 2)
    (h1 : r ≠ 1) (h2 : ∀ k : ℕ, 1 ≤ k → r ≠ 1 + 1 / (k : ℝ)) :
  ∃ t : ℕ, 2 ≤ t ∧ 1 + 1 / (t : ℝ) < r ∧ r < 1 + 1 / ((t - 1 : ℕ) : ℝ)
not_two_cuts_collinear_sixIn LeanFair Division

There is no set L of at most two straight lines and no allocation α consistent with L on the six collinear points (0,0),...,(5,0), coloured R,R,R,B,B,B, such that each of the three agents receives exactly one red and one blue point.

theorem not_two_cuts_collinear_six (L : Finset StraightLine) (α : (ℝ × ℝ) → Fin 3)
    (hcard : L.card ≤ 2)
    (hcons : is_straight_line_cut_consistent collinear_six_points L α)
    (hfair : ∀ a : Fin 3,
      (collinear_six_points.filter (fun p => α p = a ∧ collinear_six_coloring p = 0)).card = 1 ∧
      (collinear_six_points.filter (fun p => α p = a ∧ collinear_six_coloring p = 1)).card = 1) :
    False
objectwise_mm_of_single_agent_stepsIn LeanFair Division

If a rule is unchanged whenever one agent alone replaces her preference by an objectwise Maskin improvement of it, then the rule satisfies objectwise Maskin monotonicity outright.

theorem objectwise_mm_of_single_agent_steps {Agent Object : Type*} [DecidableEq Agent] [Fintype Agent]
    (f : (Agent → LinearOrder Object) → Agent → Finset Object)
    (h_step : ∀ (succ : Agent → LinearOrder Object) (i : Agent) (o : LinearOrder Object),
      (∀ y ∈ f succ i, ∀ z : Object, (succ i).lt z y → o.lt z y) →
      f (Function.update succ i o) = f succ) :
    satisfies_objectwise_mm f
offline_identical_costs_efx_and_mmsIn LeanFair Division

For any number of agents n ≥ 2, any k with 1 ≤ k ≤ n + 1, and any cost ε with 0 < ε ≤ 1/2, the instance of k + 1 chores where chore k has cost 1 and chores 0 through k - 1 have cost ε for all agents admits an allocation σ that is both exactly EFX (is_alpha_efx_chores 1) and exactly MMS (is_alpha_mms_chores 1).

theorem offline_identical_costs_efx_and_mms (n : ℕ) (hn : 2 ≤ n) (k : ℕ) (hk : 1 ≤ k) (hkn : k ≤ n + 1)
    (ε : ℝ) (hε0 : 0 < ε) (hε : ε ≤ 1 / 2) :
    ∃ σ : Fin (k + 1) → Fin n,
      is_alpha_efx_chores 1 (fun _ (d : Fin (k + 1)) => if d.val = k then 1 else ε) σ ∧
      is_alpha_mms_chores 1 (fun _ (d : Fin (k + 1)) => if d.val = k then 1 else ε) σ
op561_four_agents_two_fifths_algorithmIn LeanFair Division

There is a deterministic online algorithm for four agents with additive nonnegative valuations and exact frequency predictions (sorted-marginal predictions) that always produces a (2/5)-EF1 allocation. Since (3 - sqrt 5)/2 < 2/5, this is a concrete constant strictly above the published (3 - sqrt 5)/2.

theorem op561_four_agents_two_fifths_algorithm : has_online_alpha_ef1_algorithm 4 (2 / 5 : ℝ)
op561_ratio_gt_sqrt5In LeanFair Division

Open problem OP-561 (arXiv:2610.34625, Sec. 5): the online EF1 approximation ratio for four agents strictly exceeds (3 - sqrt 5)/2.

theorem op561_ratio_gt_sqrt5 :
    (3 - Real.sqrt 5) / 2 < online_ef1_approximation_ratio 4
op562_additive_valuation_monoIn LeanFair Division

For an additive valuation with nonnegative item values, the value of a sub-bundle is at most the value of the containing bundle.

theorem op562_additive_valuation_mono {m : ℕ} (u : Fin m → ℝ) (hu : ∀ g, 0 ≤ u g) {A B : Finset (Fin m)} (h : A ⊆ B) : additive_valuation u A ≤ additive_valuation u B
op562_critical_threshold_separates_reductionIn LeanFair Division

Assembly lemma: if the error factor is achievable for every ρ in [1, L) and unachievable for every ρ ≥ U, then the threshold eefx_overestimate_threshold n lies in [L, U], every ρ in [1, threshold) is achievable, and no ρ above the threshold is achievable.

theorem op562_critical_threshold_separates_reduction (n : ℕ) (L U : ℝ) (hL : 1 < L) (hex : ∀ ρ : ℝ, 1 ≤ ρ → ρ < L → has_consistent_eefx_algorithm n ρ) (hnon : ∀ ρ : ℝ, U ≤ ρ → ¬ has_consistent_eefx_algorithm n ρ) : L ≤ eefx_overestimate_threshold n ∧ eefx_overestimate_threshold n ≤ U ∧ (∀ ρ : ℝ, 1 ≤ ρ → ρ < eefx_overestimate_threshold n → has_consistent_eefx_algorithm n ρ) ∧ (∀ ρ : ℝ, eefx_overestimate_threshold n < ρ → ¬ has_consistent_eefx_algorithm n ρ)
op562_eefx_bundle_of_rest_boundIn LeanFair Division

If a bundle is worth at least α times the whole complement, it is α-EEFX (the complement is a valid single part of the n-1 part repartition).

theorem op562_eefx_bundle_of_rest_bound {m n : ℕ} (hn : 2 ≤ n) {v : Finset (Fin m) → ℝ} {α : ℝ} (hα : 0 ≤ α) (hmono : ∀ A B : Finset (Fin m), A ⊆ B → v A ≤ v B) (S : Finset (Fin m)) (h : α * v (Finset.univ \ S) ≤ v S) : is_alpha_eefx_bundle v n α S
op562_eefx_bundle_of_sparse_complementIn LeanFair Division

If an agent's bundle leaves at most n-1 items unassigned and the valuation is nonnegative with v(∅) = 0, the bundle is α-EEFX for every α ≥ 0.

theorem op562_eefx_bundle_of_sparse_complement {m n : ℕ} {v : Finset (Fin m) → ℝ} {α : ℝ} (hα : 0 ≤ α) (hzero : v ∅ = 0) (S : Finset (Fin m)) (hcard : (Finset.univ \ S).card ≤ n - 1) (hS : 0 ≤ v S) : is_alpha_eefx_bundle v n α S
op562_one_lt_lower_bound_ratioIn LeanFair Division

For n ≥ 3 the lower bound (2n-2)/(2n-3) is strictly greater than 1, so the interval [1, L) is nonempty.

theorem op562_one_lt_lower_bound_ratio (n : ℕ) (hn : 3 ≤ n) : (1 : ℝ) < (2 * (n : ℝ) - 2) / (2 * n - 3)
op562_overestimate_prediction_monoIn LeanFair Division

A prediction that overestimates with error factor ρ also overestimates with any larger error factor ρ' ≥ ρ (for nonnegative valuations).

theorem op562_overestimate_prediction_mono {m n : ℕ} {ρ ρ' : ℝ} {v a_hat : Fin n → Fin m → ℝ} (hρ : ρ ≤ ρ') (hv : ∀ i g, 0 ≤ v i g) (h : is_overestimate_prediction ρ v a_hat) : is_overestimate_prediction ρ' v a_hat
op562_threshold_mono_of_error_factorIn LeanFair Division

The set of achievable error factors is downward closed: if a consistent online algorithm achieves a positive EEFX guarantee under error factor ρ, it achieves one under every smaller error factor ρ' ≤ ρ (same algorithm, same α).

theorem op562_threshold_mono_of_error_factor (n : ℕ) {ρ ρ' : ℝ} (hρ : ρ' ≤ ρ) (h : has_consistent_eefx_algorithm n ρ) : has_consistent_eefx_algorithm n ρ'
op562_two_agents_consistent_of_lt_twoIn LeanFair Division

For two agents and any error factor rho with 1 <= rho < 2, there exists a consistent online algorithm guaranteeing a positive approximation of EEFX.

theorem op562_two_agents_consistent_of_lt_two (ρ : ℝ) (hρ1 : 1 ≤ ρ) (hρ2 : ρ < 2) :
    has_consistent_eefx_algorithm 2 ρ
op562_two_agents_not_consistent_at_twoIn LeanFair Division

For two agents and error factor rho = 2, no consistent online algorithm can guarantee any positive approximation of EEFX.

theorem op562_two_agents_not_consistent_at_two :
    ¬ has_consistent_eefx_algorithm 2 2
op562_two_agents_not_consistent_of_ge_twoIn LeanFair Division

For two agents and any error factor rho >= 2, no consistent online algorithm can guarantee any positive approximation of EEFX.

theorem op562_two_agents_not_consistent_of_ge_two (ρ : ℝ) (hρ : 2 ≤ ρ) :
    ¬ has_consistent_eefx_algorithm 2 ρ
op819_online_single_high_alpha_efx_largeIn LeanFair Division

For any natural number R >= 4 and any number of goods m >= 3 ceil(sqrt R), there exists a deterministic online allocator for 3 agents achieving (sqrt R + 1)⁻¹-EFX on all single-high valuation profiles with ratio R.

theorem op819_online_single_high_alpha_efx_large (R : ℕ) (hR : 4 ≤ R) (m : ℕ)
    (hm : 3 * Nat.ceil (Real.sqrt (R : ℝ)) ≤ m) :
    has_online_single_high_alpha_efx 3 m (R : ℝ) (Real.sqrt (R : ℝ) + 1)⁻¹
op819_online_single_high_alpha_efx_smallIn LeanFair Division

For any natural number R >= 4 and any number of goods m with 1 <= m < 3 ceil(sqrt R), there exists a deterministic online allocator for 3 agents achieving (sqrt R + 1)⁻¹-EFX on all single-high valuation profiles with ratio R.

theorem op819_online_single_high_alpha_efx_small (R : ℕ) (hR : 4 ≤ R) (m : ℕ)
    (hm_pos : 1 ≤ m) (hm_lt : m < 3 * Nat.ceil (Real.sqrt (R : ℝ))) :
    has_online_single_high_alpha_efx 3 m (R : ℝ) (Real.sqrt (R : ℝ) + 1)⁻¹
op819_online_single_high_efx_ratio_ge_of_forall_mIn LeanFair Division

If an approximation ratio alpha in [0, 1] satisfies has_online_single_high_alpha_efx 3 m R alpha for every number of goods m >= 1, then alpha is at most the competitive ratio online_single_high_efx_ratio R.

theorem op819_online_single_high_efx_ratio_ge_of_forall_m (R α : ℝ) (h0 : 0 ≤ α) (h1 : α ≤ 1)
    (hall : ∀ (m : ℕ), 1 ≤ m → has_online_single_high_alpha_efx 3 m R α) :
    α ≤ online_single_high_efx_ratio R
op819_online_single_high_efx_ratio_lower_boundIn LeanFair Division

For any natural number R >= 4, the online single-high EFX competitive ratio for three agents is at least 1 / (sqrt(R) + 1).

theorem op819_online_single_high_efx_ratio_lower_bound :
    ∀ (R : ℕ), 4 ≤ R → (Real.sqrt (R : ℝ) + 1)⁻¹ ≤ online_single_high_efx_ratio (R : ℝ)
op819_online_single_high_efx_ratio_upper_boundNeeds helpFair Division

For any natural number R >= 4, the online single-high EFX competitive ratio for three agents is at most 1 / (sqrt(R) - 1).

theorem op819_online_single_high_efx_ratio_upper_bound :
    ∀ (R : ℕ), 4 ≤ R → online_single_high_efx_ratio (R : ℝ) ≤ (Real.sqrt (R : ℝ) - 1)⁻¹
op826_single_high_efx_of_high_dataIn LeanFair Division

Present a single-high profile with ratio R by the map h sending each agent i to her unique high good h i (value R on h i, value 1 elsewhere). If, for all distinct agents i, j and every good g in j's bundle, alpha times the cardinality of j's bundle without g, plus a bonus R-1 exactly when i's high good survives, is at most the cardinality of i's own bundle plus a bonus R-1 exactly when i's high good lies in it, then the allocation is alpha-EFX for this profile.

theorem op826_single_high_efx_of_high_data (R α : ℝ) {m : ℕ} (h : Fin 3 → Fin m) (σ : Fin m → Fin 3)
    (hcond : ∀ i j : Fin 3, i ≠ j → ∀ g ∈ bundle_of σ j,
        α * (((bundle_of σ j).erase g).card + (R - 1) * (if h i ∈ (bundle_of σ j).erase g then (1:ℝ) else 0))
        ≤ (bundle_of σ i).card + (R - 1) * (if h i ∈ bundle_of σ i then (1:ℝ) else 0)) :
    is_alpha_efx_goods (fun i g => if g = h i then R else 1) α σ
op_1005_find_tIn LeanFair Division

For real numbers 1 < b < a where no k >= 1 satisfies b <= 1 + 1/k <= a, there exists an integer t such that t * a < t + 1 and t + 2 < (t + 1) * b.

theorem op_1005_find_t (a b : ℝ) (hb : 1 < b) (hba : b < a)
    (hnot : ¬ ∃ k : ℕ, 1 ≤ k ∧ b ≤ 1 + 1 / (k : ℝ) ∧ 1 + 1 / (k : ℝ) ≤ a) :
    ∃ t : ℕ, (t : ℝ) * a < (t : ℝ) + 1 ∧ (t : ℝ) + 2 < ((t : ℝ) + 1) * b
op_1005_obstruction_no_efx_fpoIn LeanFair Division

For the 2t+4 goods instance with t+2 HH goods and t+2 LL goods, when t*a < t+1 and t+2 < (t+1)*b, no allocation can be simultaneously EFX and fractionally Pareto optimal.

theorem op_1005_obstruction_no_efx_fpo (t : ℕ) (a b : ℝ)
    (hb : 1 < b) (hba : b < a)
    (hta : (t : ℝ) * a < (t : ℝ) + 1)
    (htb : (t : ℝ) + 2 < ((t : ℝ) + 1) * b) :
    ∀ σ : Fin (2 * t + 4) → Fin 2,
      ¬ (is_efx_goods (fun i g => if (g : ℕ) < t + 2 then (if i = 0 then a else b) else 1) σ ∧
         is_fractionally_pareto_optimal (fun i g => if (g : ℕ) < t + 2 then (if i = 0 then a else b) else 1) σ)
op_1553_sharp_alpha_normal_formIn LeanFair Division

For p ≥ 19 the conjectured factor (3p+1)/(2p) equals 3/2 + 1/(4r) with r = p/2, is strictly smaller than the proved 5/3 bound, and at p = 19 it reads 29/19 with horizon (p+3)/2 = 11.

theorem op_1553_sharp_alpha_normal_form (p : ℕ) (hp : 19 ≤ p) :
    (3 * (p : ℝ) + 1) / (2 * (p : ℝ)) = 3 / 2 + 1 / (4 * ((p : ℝ) / 2)) ∧
      (3 * (p : ℝ) + 1) / (2 * (p : ℝ)) < 5 / 3 ∧
      ((3 * (19 : ℝ) + 1) / (2 * (19 : ℝ)) = 29 / 19) ∧ ((19 + 3) / 2 = 11)
op_1553_upper_bound_sharp_mmsIn LeanFair Division

For every p ≥ 19 with p ≡ 3 (mod 4), r = p/2 and α = (3p+1)/(2p), there is a consistent deterministic online allocator for two agents producing an α-MMS allocation after every prefix of every length whenever each agent's cost for each chore lies in {1, r}.

theorem op_1553_upper_bound_sharp_mms (p : ℕ) (hp : 19 ≤ p) (hmod : p % 4 = 3) :
    has_consistent_online_alpha_mms ((p : ℝ) / 2) ((3 * (p : ℝ) + 1) / (2 * (p : ℝ)))
pair_split_max_ge_half_totalIn LeanFair Division

For a two-type bundle with X type-A and Y type-B chores, costs p, q > 0 per chore, and any integral split of it into (s,t) and (X-s,Y-t), the more expensive of the two parts costs at least half the whole bundle, i.e. max(p*s+q*t, p*(X-s)+q*(Y-t)) >= (p*X+q*Y)/2.

theorem pair_split_max_ge_half_total (p q : ℝ) (X Y s t : ℕ) (hs : s ≤ X) (ht : t ≤ Y) :
    (p * (X : ℝ) + q * (Y : ℝ)) / 2 ≤
      max (p * (s : ℝ) + q * (t : ℝ))
          (p * ((X - s : ℕ) : ℝ) + q * ((Y - t : ℕ) : ℝ))
pairwise_dominates_card_leIn LeanFair Division

If a bundle S pairwise-dominates a bundle S' (for an arbitrary relation le), then S' has at most as many elements as S.

theorem pairwise_dominates_card_le {α : Type*} (le : α → α → Prop) (S S' : Finset α)
    (h : pairwise_dominates le S S') : S'.card ≤ S.card
parabola_necklace_card_and_colorsIn LeanFair Division

The point set P = {(i, i²) : i ∈ ZMod m} in ℝ² has cardinality r + b, and the coloring c(p) = (if p.1 < r then 0 else 1) assigns color 0 to exactly r points and color 1 to exactly b points.

theorem parabola_necklace_card_and_colors (m r b : ℕ) [NeZero m]
    (hm : m = r + b) :
    let P : Finset (ℝ × ℝ) := Finset.univ.image (fun (j : ZMod m) => ((j.val : ℝ), (j.val : ℝ)^2))
    let c : (ℝ × ℝ) → Fin 2 := fun p => if p.1 < (r : ℝ) then 0 else 1
    P.card = r + b ∧
    (P.filter (fun p => c p = 0)).card = r ∧
    (P.filter (fun p => c p = 1)).card = b
parabola_necklace_fair_transitions_geIn LeanFair Division

Any fair allocation α giving each of k agents r/k points of color 0 (indices < r) and b/k points of color 1 (indices ≥ r) on the parabola point set induces at least 2(k - 1) cyclic transitions where α(pt(i)) ≠ α(pt(i+1)).

theorem parabola_necklace_fair_transitions_ge (m k r b : ℕ) [NeZero m]
    (hm : m = r + b) (hk : 2 ≤ k) (hr : k ≤ r) (hb : k ≤ b)
    (α : (ℝ × ℝ) → Fin k)
    (h_fair : ∀ i : Fin k,
      ((Finset.univ.image (fun (j : ZMod m) => ((j.val : ℝ), (j.val : ℝ)^2))).filter
        (fun p => α p = i ∧ (if p.1 < (r : ℝ) then (0 : Fin 2) else 1) = 0)).card = r / k ∧
      ((Finset.univ.image (fun (j : ZMod m) => ((j.val : ℝ), (j.val : ℝ)^2))).filter
        (fun p => α p = i ∧ (if p.1 < (r : ℝ) then (0 : Fin 2) else 1) = 1)).card = b / k) :
    2 * (k - 1) ≤ (Finset.univ.filter (fun (i : ZMod m) =>
      α ((i.val : ℝ), (i.val : ℝ)^2) ≠ α (((i + 1 : ZMod m).val : ℝ), ((i + 1 : ZMod m).val : ℝ)^2))).card
picking_alloc_prefix_image_of_monotoneIn LeanFair Division

If a permutation g of the goods is order-compatible with every agent's ranking on that agent's turns (the good g t ranks above g u for every later turn u), then the first s turns of the picking sequence allocate exactly the goods g 0, ..., g (s-1).

theorem picking_alloc_prefix_image_of_monotone
    {n m : ℕ} (seq : List (Fin n)) (hlen : seq.length = m)
    (r : Fin n → Fin m ≃ Fin m) (g : Fin m ≃ Fin m)
    (hg : ∀ i : Fin n, ∀ t ∈ picking_turn_set seq hlen i, ∀ u : Fin m, t < u →
      (g.trans (r i).symm) t < (g.trans (r i).symm) u)
    (s : ℕ) (hs : s ≤ m) :
    (picking_prefix_state seq r s).2 =
      (Finset.univ.filter (fun t : Fin m => t.val < s)).image g
picking_block_perm_countIn LeanFair Division

The number of permutations of Fin m that are increasing on each up-set of a set T of positions (π t < π u whenever t ∈ T and t < u) equals the product over k outside T of (m - k).

theorem picking_block_perm_count {m : ℕ} (T : Finset (Fin m)) :
    ((Finset.univ : Finset (Fin m ≃ Fin m)).filter
      (fun π => ∀ t ∈ T, ∀ u : Fin m, t < u → π t < π u)).card
    = ∏ k ∈ (Finset.univ.filter (fun k : Fin m => k ∉ T)), (m - k.val)
picking_block_perm_prod_eqIn LeanFair Division

If the sets T_1, ..., T_n partition Fin m, the product over i of the number of permutations increasing on the up-sets of T_i equals (m!)^(n-1).

theorem picking_block_perm_prod_eq {n m : ℕ} (T : Fin n → Finset (Fin m))
    (hdisj : ∀ i j : Fin n, i ≠ j → Disjoint (T i) (T j))
    (hcover : ∀ k : Fin m, ∃ i : Fin n, k ∈ T i) :
    ∏ i : Fin n,
        ((Finset.univ : Finset (Fin m ≃ Fin m)).filter
          (fun π => ∀ t ∈ T i, ∀ u : Fin m, t < u → π t < π u)).card
      = (Nat.factorial m) ^ (n - 1)
picking_consumption_perm_existsIn LeanFair Division

For every profile of rankings there is a single permutation g of the goods (the order in which goods are physically consumed) such that the goods allocated after s turns are g 0, ..., g (s-1), agent i's bundle is g applied to agent i's turn set T_i, and g is order-compatible with every agent's ranking on that agent's turns.

theorem picking_consumption_perm_exists
    {n m : ℕ} (seq : List (Fin n)) (hlen : seq.length = m)
    (r : Fin n → Fin m ≃ Fin m) :
    ∃ g : Fin m ≃ Fin m,
      (∀ s : ℕ, s ≤ m → (picking_prefix_state seq r s).2 =
        (Finset.univ.filter (fun t : Fin m => t.val < s)).image g) ∧
      (∀ i : Fin n, picking_sequence_outcome seq r i = (picking_turn_set seq hlen i).image g) ∧
      (∀ i : Fin n, ∀ t ∈ picking_turn_set seq hlen i, ∀ u : Fin m, t < u →
        (g.trans (r i).symm) t < (g.trans (r i).symm) u)
picking_prefix_grab_achievableIn LeanFair Division

In a three-agent Round-Robin run (no equilibrium hypothesis needed), if g is still unallocated just before agent i's (r+1)-th turn, then some reported ranking of i yields i a bundle whose value to i is at least the value of i's first r goods plus w i g.

theorem picking_prefix_grab_achievable
    (m : ℕ) (w : Fin 3 → Fin m → ℝ) (hw : ∀ i g, 0 ≤ w i g)
    (rank : Fin 3 → Fin m ≃ Fin m)
    (i : Fin 3) (r : ℕ) (hs : i.val + 3 * r < m) (g : Fin m)
    (hg : g ∉ (picking_prefix_state (round_robin_sequence 3 m) rank (i.val + 3 * r)).2) :
    ∃ r' : Fin m ≃ Fin m,
      (∑ x ∈ (picking_prefix_state (round_robin_sequence 3 m) rank (i.val + 3 * r)).1 i, w i x)
          + w i g
        ≤ ∑ x ∈ picking_sequence_outcome (round_robin_sequence 3 m) (Function.update rank i r') i,
            w i x
picking_prefix_grab_deviationIn LeanFair Division

In a three-agent Round-Robin pure Nash equilibrium, if g is unallocated just before agent i's (r+1)-th turn, then the value of i's first r goods plus w i g is at most the value of i's final bundle; otherwise i would profit by deviating to grab g.

theorem picking_prefix_grab_deviation
    (m : ℕ) (w : Fin 3 → Fin m → ℝ) (hw : ∀ i g, 0 ≤ w i g)
    (rank : Fin 3 → Fin m ≃ Fin m)
    (h : is_picking_sequence_pne
      (SocialChoice.FairDivision.Indivisible.AdditiveValuation.toValuation ⟨w⟩)
      (round_robin_sequence 3 m) rank)
    (i : Fin 3) (r : ℕ) (hs : i.val + 3 * r < m) (g : Fin m)
    (hg : g ∉ (picking_prefix_state (round_robin_sequence 3 m) rank (i.val + 3 * r)).2) :
    (∑ x ∈ (picking_prefix_state (round_robin_sequence 3 m) rank (i.val + 3 * r)).1 i, w i x)
        + w i g
      ≤ ∑ x ∈ picking_sequence_outcome (round_robin_sequence 3 m) rank i, w i x
picking_prefix_state_bundle_subsetIn LeanFair Division

A good allocated to agent a in the first s turns of a picking-sequence run is still in a's final bundle: the partial allocation is monotone in time.

theorem picking_prefix_state_bundle_subset {N G : Type*} [DecidableEq N] [DecidableEq G]
    {m : ℕ} (seq : List N) (rank : N → Fin m ≃ G) (s : ℕ) (a : N) :
    (picking_prefix_state seq rank s).1 a ⊆ picking_sequence_outcome seq rank a
picking_rank_trajectory_fibre_countsIn LeanFair Division

Writing A_j for the number of permutations increasing on the up-sets of T_j, and a_i for those of them whose image of T_i sorts to the prescribed list s i: the joint count of profiles realising all lists s i is m! times the product of the a_i, and the marginal count for agent i alone is m! times a_i times the product of A_j over j ≠ i.

theorem picking_rank_trajectory_fibre_counts
    {n m : ℕ} (seq : List (Fin n)) (hlen : seq.length = m) (s : Fin n → List (Fin m)) :
    (let A : Fin n → ℕ := fun j =>
        ((Finset.univ : Finset (Fin m ≃ Fin m)).filter
          (fun (π : Fin m ≃ Fin m) => ∀ t ∈ picking_turn_set seq hlen j, ∀ u : Fin m, t < u → π t < π u)).card
     let a : Fin n → ℕ := fun i =>
        ((Finset.univ : Finset (Fin m ≃ Fin m)).filter
          (fun (π : Fin m ≃ Fin m) => (∀ t ∈ picking_turn_set seq hlen i, ∀ u : Fin m, t < u → π t < π u)
            ∧ ((picking_turn_set seq hlen i).image (fun x => π x)).sort (· ≤ ·) = s i)).card
     ((Finset.univ : Finset (Fin n → Fin m ≃ Fin m)).filter
        (fun r => ∀ i, ((picking_sequence_outcome seq r i).image (r i).symm).sort (· ≤ ·) = s i)).card
       = Nat.factorial m * ∏ i : Fin n, a i
     ∧ ∀ i : Fin n,
        ((Finset.univ : Finset (Fin n → Fin m ≃ Fin m)).filter
          (fun r => ((picking_sequence_outcome seq r i).image (r i).symm).sort (· ≤ ·) = s i)).card
        = Nat.factorial m * a i * ∏ j ∈ (Finset.univ.erase i), A j)
picking_sequence_outcome_card_eq_countIn LeanFair Division

If a picking sequence has at most as many turns as there are goods, then every turn consumes exactly one good, so agent a's final bundle has exactly as many goods as the number of times a appears in the sequence.

theorem picking_sequence_outcome_card_eq_count {N G : Type*} [DecidableEq N] [DecidableEq G]
    {m : ℕ} (seq : List N) (rank : N → Fin m ≃ G) (a : N) (hlen : seq.length ≤ m) :
    (picking_sequence_outcome seq rank a).card = seq.count a
picking_trajectory_algebra_identityIn LeanFair Division

If the product of the sequence block counts A i equals (m!)^(n-1), then (m! * ∏ a_i)/(m!)^n equals the product over i of (m! * a_i * ∏_{j ≠ i} A_j)/(m!)^n.

theorem picking_trajectory_algebra_identity (n m : ℕ) (hn : 2 ≤ n) (hm : 1 ≤ m)
    (A a : Fin n → ℕ)
    (hA : ∏ i : Fin n, A i = (Nat.factorial m) ^ (n - 1)) :
    (((Nat.factorial m : ℚ) * ∏ i : Fin n, (a i : ℚ)) / ((Nat.factorial m : ℚ) ^ n)) =
    ∏ i : Fin n,
      (((Nat.factorial m : ℚ) * (a i : ℚ) * ∏ j ∈ Finset.univ.erase i, (A j : ℚ)) / ((Nat.factorial m : ℚ) ^ n))
picking_turn_set_partitionIn LeanFair Division

When the picking sequence has length m, the turn sets T_i (turns at which agent i acts) are pairwise disjoint and cover all of Fin m.

theorem picking_turn_set_partition
    {n m : ℕ} (seq : List (Fin n)) (hlen : seq.length = m) :
    (∀ i j : Fin n, i ≠ j →
        Disjoint (picking_turn_set seq hlen i) (picking_turn_set seq hlen j)) ∧
    (∀ k : Fin m, ∃ i : Fin n, k ∈ picking_turn_set seq hlen i)
planar_necklace_straight_line_cut_lower_boundIn LeanFair Division

For any natural numbers k, r, b with 2 ≤ k, 0 < r, 0 < b, and k dividing both r and b, there exists a finite set P of r + b points in ℝ² and a coloring c : (ℝ × ℝ) → Fin 2 with exactly r points of P colored 0 and b points of P colored 1, such that for any finite set L of straight lines (StraightLine) and any allocation α : (ℝ × ℝ) → Fin k consistent with L on P (is_straight_line_cut_consistent P L α), if each agent i : Fin k receives exactly r / k points of color 0 and b / k points of color 1 in P, then L must contain at least k - 1 lines: k - 1 ≤ L.card.

theorem planar_necklace_straight_line_cut_lower_bound (k r b : ℕ)
    (hk : 2 ≤ k) (hr : 0 < r) (hb : 0 < b) (hkr : k ∣ r) (hkb : k ∣ b) :
    ∃ (P : Finset (ℝ × ℝ)) (c : (ℝ × ℝ) → Fin 2),
      P.card = r + b ∧
      (P.filter (fun p => c p = 0)).card = r ∧
      (P.filter (fun p => c p = 1)).card = b ∧
      ∀ (L : Finset StraightLine) (α : (ℝ × ℝ) → Fin k),
        is_straight_line_cut_consistent P L α →
        (∀ i : Fin k,
          (P.filter (fun p => α p = i ∧ c p = 0)).card = r / k ∧
          (P.filter (fun p => α p = i ∧ c p = 1)).card = b / k) →
        k - 1 ≤ L.card
planar_necklace_three_agents_two_cuts_general_positionIn LeanFair Division

For any finite set P of points in the plane ℝ × ℝ coloured red/blue, with the number of red points and the number of blue points both divisible by 3, and with at most two points of P on any straight line, there exist at most two straight lines and an allocation consistent with them giving each of three agents exactly one-third of the red and one-third of the blue points.

theorem planar_necklace_three_agents_two_cuts_general_position
    (P : Finset (ℝ × ℝ)) (c : (ℝ × ℝ) → Fin 2)
    (h_red : 3 ∣ (P.filter (fun p => c p = 0)).card)
    (h_blue : 3 ∣ (P.filter (fun p => c p = 1)).card)
    (hgp : ∀ ℓ : StraightLine, (P.filter (fun p => ℓ.cut p = 0)).card ≤ 2) :
    ∃ (L : Finset StraightLine) (α : (ℝ × ℝ) → Fin 3),
      L.card ≤ 2 ∧
      is_straight_line_cut_consistent P L α ∧
      ∀ i : Fin 3,
        (P.filter (fun p => α p = i ∧ c p = 0)).card = (P.filter (fun p => c p = 0)).card / 3 ∧
        (P.filter (fun p => α p = i ∧ c p = 1)).card = (P.filter (fun p => c p = 1)).card / 3
ratio_two_large_bundle_low_quota_mms_boundIn LeanFair Division

For positive n, K at least two and 1<=s<n, let m=(K-1)n+s. An agent designates low set L among the chores, with positive low cost a and high cost 2a. Any bundle of at most K chores containing at least max(0,min(K,floor(|L|/s))-floor(K/2)) lows costs at most 3/2 times her n-agent chore maximin share.

theorem ratio_two_large_bundle_low_quota_mms_bound (n K s : ℕ) (hn : 1 ≤ n) (hK : 2 ≤ K) (hs1 : 1 ≤ s) (hsn : s < n) (a : ℝ) (ha : 0 < a) (L : Finset (Fin ((K-1)*n+s))) (u : Fin ((K-1)*n+s) → ℝ) (hu : ∀ g, u g = if g ∈ L then a else 2*a) (S : Finset (Fin ((K-1)*n+s))) (hsize : S.card ≤ K) (hquota : min K (L.card / s) - K/2 ≤ (S ∩ L).card) : additive_valuation u S ≤ (3/2 : ℝ)*chore_maximin_share n u
remainder_bivalued_mms_minimum_lower_boundIn LeanFair Division

Let n be positive, K at least two and 1<=s<n. Among (K-1)n+s chores an agent designates a low-cost set L; each designated chore costs a>0 and each other chore costs r*a with r>=1. Put Q=min(K,floor(|L|/s)). Her n-agent chore maximin share is at least a times the minimum of K*r-(r-1)Q and K+1.

theorem remainder_bivalued_mms_minimum_lower_bound (n K s : ℕ) (hn : 1 ≤ n) (hK : 2 ≤ K) (hs1 : 1 ≤ s) (hsn : s < n) (r a : ℝ) (hr : 1 ≤ r) (ha : 0 < a) (L : Finset (Fin ((K-1)*n+s))) (u : Fin ((K-1)*n+s) → ℝ) (hu : ∀ g, u g = if g ∈ L then a else r*a) : a*min ((K : ℝ)*r-(r-1)*(min K (L.card / s) : ℕ)) (K+1) ≤ chore_maximin_share n u
round_robin_chore_insertion_ef1In LeanFair Division

For any n ≥ 2 agents with [NeZero n], picking sequence σ : ℕ → Fin n satisfying is_round_robin_picking_sequence n σ, and nonnegative chore costs c : Fin n → ℕ → ℝ (with ∀ i t, 0 ≤ c i t), the allocation chore_insertion_allocation σ c m is EF1 (is_ef1_chores) for every prefix length m : ℕ.

theorem round_robin_chore_insertion_ef1 (n : ℕ) [NeZero n] (hn : 2 ≤ n) (σ : ℕ → Fin n) (hrr : is_round_robin_picking_sequence n σ) (c : Fin n → ℕ → ℝ) (hc : ∀ i t, 0 ≤ c i t) (m : ℕ) : is_ef1_chores (fun i (d : Fin m) => c i d.val) (chore_insertion_allocation σ c m)
round_robin_chore_insertion_ef1_mmsIn LeanFair Division

For any n ≥ 2 agents with [NeZero n], any round-robin picking sequence σ : ℕ → Fin n satisfying is_round_robin_picking_sequence n σ, and any nonnegative arrival costs c : Fin n → ℕ → ℝ (with ∀ i t, 0 ≤ c i t), chore insertion has upgrade recourse (has_upgrade_recourse n c (chore_insertion_allocation σ c)), and at every prefix m : ℕ maintains an allocation that is EF1 (is_ef1_chores) and (2 - 1/n)-MMS (is_alpha_mms_chores (2 - 1 / (n : ℝ))).

theorem round_robin_chore_insertion_ef1_mms (n : ℕ) [NeZero n] (hn : 2 ≤ n) (σ : ℕ → Fin n) (hrr : is_round_robin_picking_sequence n σ) (c : Fin n → ℕ → ℝ) (hc : ∀ i t, 0 ≤ c i t) : has_upgrade_recourse n c (chore_insertion_allocation σ c) ∧ ∀ m : ℕ, is_ef1_chores (fun i (d : Fin m) => c i d.val) (chore_insertion_allocation σ c m) ∧ is_alpha_mms_chores (2 - 1 / (n : ℝ)) (fun i (d : Fin m) => c i d.val) (chore_insertion_allocation σ c m)
round_robin_expected_best_utility_tendstoIn LeanFair Division

For m = 2(k+1), the expected best-response Borda utility of agent A, normalised by m^2, converges to 3/8.

theorem round_robin_expected_best_utility_tendsto :
    Filter.Tendsto (fun k : ℕ =>
      ((∑ p : (Fin (2 * (k + 1)) ≃ Fin (2 * (k + 1))) × (Fin (2 * (k + 1)) ≃ Fin (2 * (k + 1))),
          round_robin_u_best (2 * (k + 1)) p.1 p.2) : ℝ) /
        ((Fintype.card (Fin (2 * (k + 1)) ≃ Fin (2 * (k + 1))))^2 : ℝ) /
        (2 * (k + 1) : ℝ)^2)
      Filter.atTop (nhds (3 / 8))
round_robin_expected_manipulation_gain_eqIn LeanFair Division

Linearity: the expected normalized gain equals (expected best-response utility / m^2) − (expected truthful utility / m^2), i.e. each average of the finite sums of U_best and U_truth divided by (m!)^2 and by m^2.

theorem round_robin_expected_manipulation_gain_eq (m : ℕ) (hm : 0 < m) :
    round_robin_expected_manipulation_gain m =
      ((∑ p : (Fin m ≃ Fin m) × (Fin m ≃ Fin m), round_robin_u_best m p.1 p.2) : ℝ) /
        ((Fintype.card (Fin m ≃ Fin m))^2 : ℝ) / (m : ℝ)^2
      - ((∑ p : (Fin m ≃ Fin m) × (Fin m ≃ Fin m), round_robin_u_truth m p.1 p.2) : ℝ) /
        ((Fintype.card (Fin m ≃ Fin m))^2 : ℝ) / (m : ℝ)^2
round_robin_expected_manipulation_gain_tendstoIn LeanFair Division

The expected normalised strategic gain round_robin_expected_manipulation_gain(2(k+1)) converges to 1/24. This is exactly the second conjunct of the target (law of large numbers for the mean gain).

theorem round_robin_expected_manipulation_gain_tendsto :
    Filter.Tendsto (fun k : ℕ => round_robin_expected_manipulation_gain (2 * (k + 1)))
      Filter.atTop (nhds (1 / 24))
round_robin_expected_truthful_utility_two_mulIn LeanFair Division

With m = 2n goods and both agents truthful, the expected Borda utility of the first picker A is m(m+1)/3, i.e. the finite average of U_truth over all ranking pairs equals (2n)(2n+1)/3 = 2/3 of the total Borda value m(m+1)/2.

theorem round_robin_expected_truthful_utility_two_mul (n : ℕ) :
    ((∑ p : (Fin (2 * n) ≃ Fin (2 * n)) × (Fin (2 * n) ≃ Fin (2 * n)),
        round_robin_u_truth (2 * n) p.1 p.2) : ℝ) /
      ((Fintype.card (Fin (2 * n) ≃ Fin (2 * n)))^2 : ℝ)
    = (2 * n : ℝ) * (2 * n + 1) / 3
round_robin_manipulation_gain_converges_in_probabilityIn LeanFair Division

For every ε > 0, the proportion of ranking pairs whose normalised strategic gain differs from 1/24 by at least ε tends to 0 as k → ∞ (m = 2(k+1)). This is exactly the first conjunct of the target (convergence in probability).

theorem round_robin_manipulation_gain_converges_in_probability :
    ∀ ε > 0, Filter.Tendsto
      (fun k : ℕ =>
        let m := 2 * (k + 1)
        ((Finset.univ.filter (fun p : (Fin m ≃ Fin m) × (Fin m ≃ Fin m) =>
          ε ≤ |round_robin_borda_manipulation_gain m p.1 p.2 - (1 / 24 : ℝ)|)).card : ℝ) /
          ((Fintype.card (Fin m ≃ Fin m))^2 : ℝ))
      Filter.atTop (nhds 0)
round_robin_manipulation_gain_second_moment_tendstoIn LeanFair Division

For m = 2(k+1), the second moment of the normalised strategic gain round_robin_borda_manipulation_gain converges to (1/24)^2, i.e. the variance of the gain tends to 0 (concentration).

theorem round_robin_manipulation_gain_second_moment_tendsto :
    Filter.Tendsto (fun k : ℕ =>
      (∑ p : (Fin (2 * (k + 1)) ≃ Fin (2 * (k + 1))) × (Fin (2 * (k + 1)) ≃ Fin (2 * (k + 1))),
          (round_robin_borda_manipulation_gain (2 * (k + 1)) p.1 p.2)^2) /
        ((Fintype.card (Fin (2 * (k + 1)) ≃ Fin (2 * (k + 1))))^2 : ℝ))
      Filter.atTop (nhds ((1 / 24)^2))
round_robin_outcome_card_eq_countIn LeanFair Division

In Round-Robin with n agents and m goods, agent a's bundle contains exactly as many goods as the number of times a occurs in the picking sequence (so with three agents and count_j ≥ 3, agent j owns at least three goods).

theorem round_robin_outcome_card_eq_count (n m : ℕ) [NeZero n]
    (rank : Fin n → Fin m ≃ Fin m) (a : Fin n) :
    (picking_sequence_outcome (round_robin_sequence n m) rank a).card =
      (round_robin_sequence n m).count a
round_robin_outcome_coverIn LeanFair Division

Every good is allocated to some agent by Round-Robin: the bundles of the n agents cover all m goods.

theorem round_robin_outcome_cover (n m : ℕ) [NeZero n] (rank : Fin n → Fin m ≃ Fin m)
    (g : Fin m) :
    ∃ a : Fin n, g ∈ picking_sequence_outcome (round_robin_sequence n m) rank a
round_robin_slots_cost_le_imp_ef1In LeanFair Division

If slot assignments satisfy that earlier slots are weakly cheaper for their owners and bundle valuations match the slot sums, then round-robin ordering guarantees that chore_insertion_allocation is EF1.

theorem round_robin_slots_cost_le_imp_ef1 (n : ℕ) [NeZero n] (hn : 2 ≤ n) (σ : ℕ → Fin n)
    (hrr : is_round_robin_picking_sequence n σ) (c : Fin n → ℕ → ℝ) (hc : ∀ i t, 0 ≤ c i t) (m : ℕ)
    (hle : ∀ k l, k < l → l < m → c (σ k) (chore_insertion_slots σ c m k) ≤ c (σ k) (chore_insertion_slots σ c m l))
    (hval : ∀ i j, additive_valuation (fun (d : Fin m) => c i d.val) (bundle_of (chore_insertion_allocation σ c m) j) =
      ∑ k ∈ (Finset.range m).filter (fun k => σ k = j), c i (chore_insertion_slots σ c m k)) :
    is_ef1_chores (fun i (d : Fin m) => c i d.val) (chore_insertion_allocation σ c m)
round_robin_sup_achievable_le_u_bestIn LeanFair Division

Sufficiency half of the ballot characterisation: every ballot subset S is realisable as agent A's bundle for some ranking report, hence the maximum Borda utility over ballot subsets is at most A's best-response utility.

theorem round_robin_sup_achievable_le_u_best (m : ℕ) (hm : Even m) (rA rB : Fin m ≃ Fin m) :
      (Finset.univ.filter (fun S : Finset (Fin m) =>
        S.card = m / 2 ∧ ∀ k : Fin (m + 1),
          (S.filter (fun g => (rB.symm g).val < k.val)).card ≤ (k.val + 1) / 2)).sup
        (borda_bundle_utility m rA) ≤
    round_robin_u_best m rA rB
round_robin_three_agents_high_count_two_thirds_ef1In LeanFair Division

In a three-agent Round-Robin pure Nash equilibrium with nonnegative additive valuations, if the envied agent j is picked at least three times in the picking sequence, then every other agent i satisfies 2/3-EF1 towards j: some good g of j's bundle can be removed so that i's value for the rest is at most 3/2 times i's value for her own bundle.

theorem round_robin_three_agents_high_count_two_thirds_ef1
    (m : ℕ) (w : Fin 3 → Fin m → ℝ) (hw : ∀ i g, 0 ≤ w i g)
    (rank : Fin 3 → Fin m ≃ Fin m)
    (h : is_picking_sequence_pne
      (SocialChoice.FairDivision.Indivisible.AdditiveValuation.toValuation ⟨w⟩)
      (round_robin_sequence 3 m) rank)
    (i j : Fin 3) (hij : i ≠ j)
    (hj : 3 ≤ (round_robin_sequence 3 m).count j)
    (hne : (picking_sequence_outcome (round_robin_sequence 3 m) rank j).Nonempty) :
    ∃ g ∈ picking_sequence_outcome (round_robin_sequence 3 m) rank j,
      (2 / 3) *
          (∑ x ∈ (picking_sequence_outcome (round_robin_sequence 3 m) rank j) \ {g}, w i x)
        ≤ ∑ x ∈ picking_sequence_outcome (round_robin_sequence 3 m) rank i, w i x
round_robin_three_agents_not_guaranteed_above_two_thirdsIn LeanFair Division

For every α > 2/3 there is a three-agent Round-Robin instance with nonnegative additive valuations that admits a pure Nash equilibrium whose outcome is not α-EF1.

theorem round_robin_three_agents_not_guaranteed_above_two_thirds :
    ∀ α : ℝ, 2 / 3 < α → ¬ is_guaranteed_round_robin_ef1_factor 3 α
round_robin_three_agents_pne_arbitrarily_close_to_two_thirdsIn LeanFair Division

For every α > 2/3, there exists an instance with 3 agents and m goods admitting a pure Nash equilibrium under Round-Robin whose outcome is not α-EF1.

theorem round_robin_three_agents_pne_arbitrarily_close_to_two_thirds :
    ∀ α : ℝ, 2 / 3 < α → ∃ (m : ℕ) (w : Fin 3 → Fin m → ℝ) (rank : Fin 3 → Fin m ≃ Fin m),
      (∀ i g, 0 ≤ w i g) ∧
      is_picking_sequence_pne
        (SocialChoice.FairDivision.Indivisible.AdditiveValuation.toValuation ⟨w⟩)
        (round_robin_sequence 3 m) rank ∧
      ¬ is_alpha_ef1 α
        (SocialChoice.FairDivision.Indivisible.AdditiveValuation.toValuation ⟨w⟩)
        (picking_sequence_outcome (round_robin_sequence 3 m) rank)
round_robin_three_agents_two_thirds_guaranteedIn LeanFair Division

For three agents, every pure Nash equilibrium of Round-Robin with nonnegative additive valuations induces a (2/3)-EF1 allocation; equivalently 2/3 is a guaranteed EF1 factor.

theorem round_robin_three_agents_two_thirds_guaranteed :
    is_guaranteed_round_robin_ef1_factor 3 (2 / 3)
round_robin_u_best_eq_sup_achievableIn LeanFair Division

Ballot characterisation: agent A's best response utility equals the maximum Borda utility over the family of ballot subsets S (|S| = m/2, and |S ∩ first k of B's order| ≤ ceil(k/2) for all k). Equivalently the achievable bundles are exactly the ballot subsets.

theorem round_robin_u_best_eq_sup_achievable (m : ℕ) (hm : Even m) (rA rB : Fin m ≃ Fin m) :
    round_robin_u_best m rA rB =
      (Finset.univ.filter (fun S : Finset (Fin m) =>
        S.card = m / 2 ∧ ∀ k : Fin (m + 1),
          (S.filter (fun g => (rB.symm g).val < k.val)).card ≤ (k.val + 1) / 2)).sup
        (borda_bundle_utility m rA)
round_robin_u_best_le_sup_achievableIn LeanFair Division

Necessity half of the ballot characterisation: agent A's best-response utility is at most the maximum Borda utility over all ballot subsets S (|S| = m/2 and, in every prefix of B's order, |S ∩ prefix| ≤ ceil(k/2)).

theorem round_robin_u_best_le_sup_achievable (m : ℕ) (hm : Even m) (rA rB : Fin m ≃ Fin m) :
    round_robin_u_best m rA rB ≤
      (Finset.univ.filter (fun S : Finset (Fin m) =>
        S.card = m / 2 ∧ ∀ k : Fin (m + 1),
          (S.filter (fun g => (rB.symm g).val < k.val)).card ≤ (k.val + 1) / 2)).sup
        (borda_bundle_utility m rA)
rr3_target_ordered_leftIn LeanFair Division

Target statement of the parent in the relative-order case where agent i's turn precedes agent j's in every round (i.val < j.val, so count_i ≥ count_j ≥ 3).

theorem rr3_target_ordered_left
    (m : ℕ) (w : Fin 3 → Fin m → ℝ) (hw : ∀ i g, 0 ≤ w i g)
    (rank : Fin 3 → Fin m ≃ Fin m)
    (h : is_picking_sequence_pne
      (SocialChoice.FairDivision.Indivisible.AdditiveValuation.toValuation ⟨w⟩)
      (round_robin_sequence 3 m) rank)
    (i j : Fin 3) (hij : i ≠ j) (hlt : i.val < j.val)
    (hj : 3 ≤ (round_robin_sequence 3 m).count j)
    (hne : (picking_sequence_outcome (round_robin_sequence 3 m) rank j).Nonempty) :
    ∃ g ∈ picking_sequence_outcome (round_robin_sequence 3 m) rank j,
      (2 / 3) *
          (∑ x ∈ (picking_sequence_outcome (round_robin_sequence 3 m) rank j) \ {g}, w i x)
        ≤ ∑ x ∈ picking_sequence_outcome (round_robin_sequence 3 m) rank i, w i x
rr3_target_ordered_rightIn LeanFair Division

Target statement of the parent in the relative-order case where agent j's turn precedes agent i's in every round (j.val < i.val, so count_i ≤ count_j); this is the geometry of the eight-good counterexample.

theorem rr3_target_ordered_right
    (m : ℕ) (w : Fin 3 → Fin m → ℝ) (hw : ∀ i g, 0 ≤ w i g)
    (rank : Fin 3 → Fin m ≃ Fin m)
    (h : is_picking_sequence_pne
      (SocialChoice.FairDivision.Indivisible.AdditiveValuation.toValuation ⟨w⟩)
      (round_robin_sequence 3 m) rank)
    (i j : Fin 3) (hij : i ≠ j) (hgt : j.val < i.val)
    (hj : 3 ≤ (round_robin_sequence 3 m).count j)
    (hne : (picking_sequence_outcome (round_robin_sequence 3 m) rank j).Nonempty) :
    ∃ g ∈ picking_sequence_outcome (round_robin_sequence 3 m) rank j,
      (2 / 3) *
          (∑ x ∈ (picking_sequence_outcome (round_robin_sequence 3 m) rank j) \ {g}, w i x)
        ≤ ∑ x ∈ picking_sequence_outcome (round_robin_sequence 3 m) rank i, w i x
rr4_agent_zero_bundle_of_first_pickIn LeanFair Division

For the Round-Robin sequence [0,1,2,0] on 3 agents and 4 goods, changing only agent 0's report to a new report r that has the same first-ranked good as its current report (r 0 = (b 0) 0) leaves agent 0's bundle unchanged, because agent 0's bundle is determined entirely by its first pick and the (unchanged) reports of agents 1 and 2.

theorem rr4_agent_zero_bundle_of_first_pick (b : Fin 3 → Fin 4 ≃ Fin 4)
    (r : Fin 4 ≃ Fin 4) (h : r 0 = (b 0) 0) :
    picking_sequence_outcome (round_robin_sequence 3 4) (Function.update b 0 r) 0
      = picking_sequence_outcome (round_robin_sequence 3 4) b 0
rr4_irr_step_agent_zeroIn LeanFair Division

For the Round-Robin sequence [0,1,2,0] on 3 agents and 4 goods, any irr_step under item-preserving swap bids is carried out by agent 0: the resulting profile is obtained by replacing only agent 0's report by an item-preserving swap r, and agent 0 strictly increases its additive value.

theorem rr4_irr_step_agent_zero (v : Fin 3 → Fin 4 → ℝ)
    (b b' : Fin 3 → Fin 4 ≃ Fin 4)
    (h : irr_step v (round_robin_sequence 3 4)
      (is_item_preserving_swap_bid (round_robin_sequence 3 4)) b b') :
    ∃ r : Fin 4 ≃ Fin 4, b' = Function.update b 0 r ∧
      is_item_preserving_swap_bid (round_robin_sequence 3 4) b 0 r ∧
      ∑ g ∈ picking_sequence_outcome (round_robin_sequence 3 4) b 0, v 0 g
        < ∑ g ∈ picking_sequence_outcome (round_robin_sequence 3 4) b' 0, v 0 g
rr4_no_two_consecutive_steps_from_truthfulIn LeanFair Division

For the Round-Robin sequence [0,1,2,0] on 3 agents and 4 goods, from a profile b whose agent 0 first-picks its true top good ((b 0) 0 = (pref 0) 0) there are no two consecutive irr_step steps under item-preserving swap bids: no b' then b'' can both be reached.

theorem rr4_no_two_consecutive_steps_from_truthful
    (pref : Fin 3 → Fin 4 ≃ Fin 4) (v : Fin 3 → Fin 4 → ℝ)
    (hcons : ∀ (i : Fin 3) (k l : Fin 4), k < l → v i (pref i l) < v i (pref i k))
    (b b' b'' : Fin 3 → Fin 4 ≃ Fin 4) (hb : (b 0) 0 = (pref 0) 0)
    (h1 : irr_step v (round_robin_sequence 3 4)
      (is_item_preserving_swap_bid (round_robin_sequence 3 4)) b b')
    (h2 : irr_step v (round_robin_sequence 3 4)
      (is_item_preserving_swap_bid (round_robin_sequence 3 4)) b' b'') :
    False
rr4_round_robin_outcome_structureIn LeanFair Division

For the Round-Robin sequence [0,1,2,0] on 3 agents and 4 goods, for ANY report profile b, agent 0's bundle has exactly 2 goods, agents 1 and 2 have exactly 1 each, and agent 0's first-ranked good (b 0) 0 lies in agent 0's own bundle.

theorem rr4_round_robin_outcome_structure (b : Fin 3 → Fin 4 ≃ Fin 4) :
    (picking_sequence_outcome (round_robin_sequence 3 4) b 0).card = 2 ∧
    (picking_sequence_outcome (round_robin_sequence 3 4) b 1).card = 1 ∧
    (picking_sequence_outcome (round_robin_sequence 3 4) b 2).card = 1 ∧
    (b 0) 0 ∈ picking_sequence_outcome (round_robin_sequence 3 4) b 0
rr4_side_agent_item_preserving_bundle_eqIn LeanFair Division

For the Round-Robin sequence [0,1,2,0] on 3 agents and 4 goods, an item-preserving swap bid by a side agent i (i = 1 or 2) leaves that agent's bundle unchanged, because such an agent always ends up with exactly one good and the item-preserving swap must keep the demoted good in the bundle both before and after.

theorem rr4_side_agent_item_preserving_bundle_eq (b : Fin 3 → Fin 4 ≃ Fin 4)
    (i : Fin 3) (hi : i ≠ 0) (r : Fin 4 ≃ Fin 4)
    (hr : is_item_preserving_swap_bid (round_robin_sequence 3 4) b i r) :
    picking_sequence_outcome (round_robin_sequence 3 4) (Function.update b i r) i
      = picking_sequence_outcome (round_robin_sequence 3 4) b i
rule_eq_draft_of_pick_seqIn LeanFair Division

If an allocation rule f that satisfies objectwise Maskin monotonicity agrees with the draft of a picking sequence s on every unanimous profile, then f agrees with that draft on every profile.

theorem rule_eq_draft_of_pick_seq {Agent Object : Type*} [Fintype Object]
    [DecidableEq Agent] [DecidableEq Object]
    (f : (Agent → LinearOrder Object) → Agent → Finset Object)
    (h_mm : satisfies_objectwise_mm f) (s : Fin (Fintype.card Object) → Agent)
    (hs : ∀ (e : Object ≃ Fin (Fintype.card Object)) (i : Agent),
      (f (fun _ => draft_enum_order e) i).map e.toEmbedding = Finset.univ.filter (fun m => s m = i)) :
    f = draft_rule (Agent := Agent) (Object := Object) s
rule_pick_seq_existsIn LeanFair Division

A non-wasteful, neutral allocation rule is a draft rule on every unanimous profile: there is a picking sequence s such that at every unanimous profile, agent i's bundle consists exactly of the objects she owns at the turns where she picks.

theorem rule_pick_seq_exists {Agent Object : Type*} [Fintype Agent] [Fintype Object]
    [DecidableEq Agent] [DecidableEq Object]
    (f : (Agent → LinearOrder Object) → Agent → Finset Object)
    (h_alloc : is_allocation_rule f) (h_nw : is_non_wasteful_rule f) (h_neut : is_neutral_rule f) :
    ∃ s : Fin (Fintype.card Object) → Agent,
      ∀ (e : Object ≃ Fin (Fintype.card Object)) (i : Agent),
        (f (fun _ => draft_enum_order e) i).map e.toEmbedding = Finset.univ.filter (fun m => s m = i)
rule_unanimous_position_indepIn LeanFair Division

A neutral rule's outcome at a unanimous profile, transported to indices along the enumeration, does not depend on which enumeration realises the common order: the index-sets of the bundles are the same for every enumeration.

theorem rule_unanimous_position_indep {Agent Object : Type*} [Fintype Object]
    [DecidableEq Agent] [DecidableEq Object]
    (f : (Agent → LinearOrder Object) → Agent → Finset Object) (h_neut : is_neutral_rule f)
    (e₁ e₂ : Object ≃ Fin (Fintype.card Object)) (i : Agent) :
    (f (fun _ => draft_enum_order e₁) i).map e₁.toEmbedding =
      (f (fun _ => draft_enum_order e₂) i).map e₂.toEmbedding
rule_wsp_ef1_deviator_card_eq_of_r_zeroIn LeanFair Division

With k * n objects, n ≥ 3 agents and r = 0, under non-wastefulness, neutrality, weak strategy-proofness and EF1, a single agent's bundle keeps cardinality k after she replaces her preference by an objectwise Maskin improvement.

theorem rule_wsp_ef1_deviator_card_eq_of_r_zero (n k : ℕ) (hn : 3 ≤ n)
    (f : (Fin n → LinearOrder (Fin (k * n))) → Fin n → Finset (Fin (k * n)))
    (h_alloc : is_allocation_rule f) (h_nw : is_non_wasteful_rule f) (h_neut : is_neutral_rule f)
    (h_wsp : is_weakly_strategy_proof_rule f) (h_ef1 : is_ef1_rule f)
    (succ : Fin n → LinearOrder (Fin (k * n))) (i : Fin n) (o : LinearOrder (Fin (k * n))) :
    (f (Function.update succ i o) i).card = (f succ i).card
rule_wsp_ef1_satisfies_objectwise_mmIn LeanFair Division

Any allocation rule that is non-wasteful, neutral, weakly strategy-proof, and EF1 satisfies objectwise Maskin monotonicity when n ≥ 3, k ≥ 2, and r < n.

theorem rule_wsp_ef1_satisfies_objectwise_mm (n k r : ℕ) (hn : 3 ≤ n) (hk : 2 ≤ k) (hr : r < n)
    (f : (Fin n → LinearOrder (Fin (k * n + r))) → Fin n → Finset (Fin (k * n + r)))
    (h_alloc : is_allocation_rule f) (h_nw : is_non_wasteful_rule f) (h_neut : is_neutral_rule f)
    (h_wsp : is_weakly_strategy_proof_rule f) (h_ef1 : is_ef1_rule f) :
    satisfies_objectwise_mm f
rule_wsp_ef1_single_agent_card_eqIn LeanFair Division

Under non-wastefulness, neutrality, weak strategy-proofness and EF1 (n ≥ 3, k ≥ 2, r < n), if a single agent's preference is an objectwise Maskin improvement of her truthful preference with respect to her own bundle, then the cardinality of her bundle is the same under the two profiles.

theorem rule_wsp_ef1_single_agent_card_eq (n k r : ℕ) (hn : 3 ≤ n) (hk : 2 ≤ k) (hr : r < n)
    (f : (Fin n → LinearOrder (Fin (k * n + r))) → Fin n → Finset (Fin (k * n + r)))
    (h_alloc : is_allocation_rule f) (h_nw : is_non_wasteful_rule f) (h_neut : is_neutral_rule f)
    (h_wsp : is_weakly_strategy_proof_rule f) (h_ef1 : is_ef1_rule f)
    (succ : Fin n → LinearOrder (Fin (k * n + r))) (i : Fin n) (o : LinearOrder (Fin (k * n + r)))
    (hMM : ∀ y ∈ f succ i, ∀ z : Fin (k * n + r), (succ i).lt z y → o.lt z y) :
    (f (Function.update succ i o) i).card = (f succ i).card
rule_wsp_ef1_single_agent_eq_of_card_eqIn LeanFair Division

Under non-wastefulness, neutrality, weak strategy-proofness and EF1 (n ≥ 3, k ≥ 2, r < n), if a single agent's preference is an objectwise Maskin improvement of her truthful preference and her bundle has the same cardinality under the two profiles, then the whole allocation is unchanged.

theorem rule_wsp_ef1_single_agent_eq_of_card_eq (n k r : ℕ) (hn : 3 ≤ n) (hk : 2 ≤ k) (hr : r < n)
    (f : (Fin n → LinearOrder (Fin (k * n + r))) → Fin n → Finset (Fin (k * n + r)))
    (h_alloc : is_allocation_rule f) (h_nw : is_non_wasteful_rule f) (h_neut : is_neutral_rule f)
    (h_wsp : is_weakly_strategy_proof_rule f) (h_ef1 : is_ef1_rule f)
    (succ : Fin n → LinearOrder (Fin (k * n + r))) (i : Fin n) (o : LinearOrder (Fin (k * n + r)))
    (hMM : ∀ y ∈ f succ i, ∀ z : Fin (k * n + r), (succ i).lt z y → o.lt z y)
    (hcard : (f (Function.update succ i o) i).card = (f succ i).card) :
    f (Function.update succ i o) = f succ
rule_wsp_ef1_single_agent_mm_stepIn LeanFair Division

Under non-wastefulness, neutrality, weak strategy-proofness and EF1 (n ≥ 3, k ≥ 2, r < n), if a single agent's preference is an objectwise Maskin improvement of her truthful preference with respect to her own bundle, then the whole allocation is unchanged.

theorem rule_wsp_ef1_single_agent_mm_step (n k r : ℕ) (hn : 3 ≤ n) (hk : 2 ≤ k) (hr : r < n)
    (f : (Fin n → LinearOrder (Fin (k * n + r))) → Fin n → Finset (Fin (k * n + r)))
    (h_alloc : is_allocation_rule f) (h_nw : is_non_wasteful_rule f) (h_neut : is_neutral_rule f)
    (h_wsp : is_weakly_strategy_proof_rule f) (h_ef1 : is_ef1_rule f)
    (succ : Fin n → LinearOrder (Fin (k * n + r))) (i : Fin n) (o : LinearOrder (Fin (k * n + r)))
    (hMM : ∀ y ∈ f succ i, ∀ z : Fin (k * n + r), (succ i).lt z y → o.lt z y) :
    f (Function.update succ i o) = f succ
scaled_common_ratio_bivalued_efx_fpo_envyfreeable_two_agents_core_of_countsIn LeanFair Division

Normalized two-agent bivalued core from the arithmetic: if both agents' values lie in {1, r} and for every choice of the four type multiplicities the arithmetic feasibility predicate holds, then there is an allocation that is EFX, has nonnegative aggregate (a_0*(v_0(A_0)-v_0(A_1)) + a_1*(v_1(A_1)-v_1(A_0)) >= 0) and admits a positive weight tie (t > 0, with u_0(g) <= t*u_1(g) on agent 1's goods and t*u_1(g) <= u_0(g) on agent 0's goods).

theorem scaled_common_ratio_bivalued_efx_fpo_envyfreeable_two_agents_core_of_counts
    (m : ℕ) (r : ℝ) (hr : 1 < r) (a0 a1 : ℝ) (h0 : 0 < a0) (hpos : 0 < a1)
    (u : Fin 2 → Fin m → ℝ) (hu : ∀ i g, u i g = 1 ∨ u i g = r)
    (harith : ∀ n1 n2 n3 n4 : ℕ, bivalued_two_agent_family_feasible n1 n2 n3 n4 r a0 a1) :
    ∃ σ : Fin m → Fin 2, is_efx_goods u σ ∧
      (0 ≤ a0 * (additive_valuation (u 0) (bundle_of σ 0) - additive_valuation (u 0) (bundle_of σ 1))
         + a1 * (additive_valuation (u 1) (bundle_of σ 1) - additive_valuation (u 1) (bundle_of σ 0))) ∧
      ∃ t : ℝ, 0 < t ∧ ∀ g : Fin m,
        (σ g = 1 → u 0 g ≤ t * u 1 g) ∧ (σ g = 0 → t * u 1 g ≤ u 0 g)
scaled_common_ratio_bivalued_efx_fpo_envyfreeable_two_agents_counts_highIn LeanFair Division

Arithmetic core, regime r*a_0 <= a_1 (agent 1's scale is at least r times agent 0's): for goods of the four types LL, LH, HL, HH with multiplicities n1..n4 and ratio r > 1, some allocation from one of the three weight-tie families is EFX and satisfies the subsidy aggregate inequality.

theorem scaled_common_ratio_bivalued_efx_fpo_envyfreeable_two_agents_counts_high
    (n1 n2 n3 n4 : ℕ) (r : ℝ) (hr : 1 < r) (a0 a1 : ℝ) (h0 : 0 < a0) (hpos : 0 < a1)
    (hhigh : r * a0 ≤ a1) :
    bivalued_two_agent_family_feasible n1 n2 n3 n4 r a0 a1
scaled_common_ratio_bivalued_efx_fpo_envyfreeable_two_agents_counts_lowIn LeanFair Division

Arithmetic core, regime r*a_1 <= a_0 (agent 0's scale is at least r times agent 1's): for goods of the four types LL, LH, HL, HH with multiplicities n1..n4 and ratio r > 1, some allocation from one of the three weight-tie families is EFX and satisfies the subsidy aggregate inequality.

theorem scaled_common_ratio_bivalued_efx_fpo_envyfreeable_two_agents_counts_low
    (n1 n2 n3 n4 : ℕ) (r : ℝ) (hr : 1 < r) (a0 a1 : ℝ) (h0 : 0 < a0) (hpos : 0 < a1)
    (hlow : r * a1 ≤ a0) :
    bivalued_two_agent_family_feasible n1 n2 n3 n4 r a0 a1
scaled_common_ratio_bivalued_efx_fpo_envyfreeable_two_agents_counts_low_dominantIn LeanFair Division

Arithmetic core, regime r*a_1 <= a_0 (agent 0's scale is at least r times agent 1's): for goods of the four types LL, LH, HL, HH with multiplicities n1..n4 and ratio r > 1, some allocation from one of the three weight-tie families is EFX and satisfies the subsidy aggregate inequality.

theorem scaled_common_ratio_bivalued_efx_fpo_envyfreeable_two_agents_counts_low_dominant
    (n1 n2 n3 n4 : ℕ) (r : ℝ) (hr : 1 < r) (a0 a1 : ℝ) (h0 : 0 < a0) (hpos : 0 < a1)
    (hlow : r * a1 ≤ a0) :
    bivalued_two_agent_family_feasible n1 n2 n3 n4 r a0 a1
scaled_common_ratio_bivalued_efx_fpo_envyfreeable_two_agents_counts_low_midIn LeanFair Division

Arithmetic core, regime a_0 < r*a_1 and a_1 <= a_0 (agent 1's scale lies in (a_0/r, a_0]): for goods of the four types LL, LH, HL, HH with multiplicities n1..n4 and ratio r > 1, some allocation from one of the three weight-tie families is EFX and satisfies the subsidy aggregate inequality.

theorem scaled_common_ratio_bivalued_efx_fpo_envyfreeable_two_agents_counts_low_mid
    (n1 n2 n3 n4 : ℕ) (r : ℝ) (hr : 1 < r) (a0 a1 : ℝ) (h0 : 0 < a0) (hpos : 0 < a1)
    (hlo : a0 < r * a1) (hhi : a1 ≤ a0) :
    bivalued_two_agent_family_feasible n1 n2 n3 n4 r a0 a1
scaled_common_ratio_bivalued_efx_fpo_envyfreeable_two_agents_counts_midIn LeanFair Division

Arithmetic core, regime a_0 < a_1 < r*a_0 (the two scales differ by a factor strictly between 1 and r): for goods of the four types LL, LH, HL, HH with multiplicities n1..n4 and ratio r > 1, some allocation from one of the three weight-tie families is EFX and satisfies the subsidy aggregate inequality.

theorem scaled_common_ratio_bivalued_efx_fpo_envyfreeable_two_agents_counts_mid
    (n1 n2 n3 n4 : ℕ) (r : ℝ) (hr : 1 < r) (a0 a1 : ℝ) (h0 : 0 < a0) (hpos : 0 < a1)
    (hlo : a0 < a1) (hhi : a1 < r * a0) :
    bivalued_two_agent_family_feasible n1 n2 n3 n4 r a0 a1
scaled_common_ratio_bivalued_efx_fpo_envyfreeable_two_agents_of_normalized_coreIn LeanFair Division

Assembly step: if, in the normalized valuations v_i/a_i, an allocation is EFX, satisfies the weighted aggregate inequality with weights a_0, a_1, and admits a positive weight tie, then the original profile admits an allocation with nonnegative subsidies that is EFX, envy-free with subsidies and fractionally Pareto optimal.

theorem scaled_common_ratio_bivalued_efx_fpo_envyfreeable_two_agents_of_normalized_core
    (m : ℕ) (r : ℝ) (hr : 1 < r)
    (a : Fin 2 → ℝ) (ha : ∀ i, 0 < a i)
    (v : Fin 2 → Fin m → ℝ) (hv : ∀ i g, v i g = a i ∨ v i g = r * a i)
    (σ : Fin m → Fin 2) (t : ℝ) (ht : 0 < t)
    (hefx : is_efx_goods (fun i g => v i g / a i) σ)
    (htie : ∀ g : Fin m, (σ g = 1 → v 0 g / a 0 ≤ t * (v 1 g / a 1))
        ∧ (σ g = 0 → t * (v 1 g / a 1) ≤ v 0 g / a 0))
    (hagg : 0 ≤ a 0 * (additive_valuation (fun g => v 0 g / a 0) (bundle_of σ 0)
              - additive_valuation (fun g => v 0 g / a 0) (bundle_of σ 1))
           + a 1 * (additive_valuation (fun g => v 1 g / a 1) (bundle_of σ 1)
              - additive_valuation (fun g => v 1 g / a 1) (bundle_of σ 0))) :
    ∃ (σ' : Fin m → Fin 2) (s : Fin 2 → ℝ),
      is_efx_goods v σ' ∧
      is_envy_free_with_subsidy (fun i => additive_valuation (v i)) σ' s ∧
      is_fractionally_pareto_optimal v σ'
scaled_common_ratio_bivalued_exists_efx_weighted_max_perm_welfare_maxIn LeanFair Division

For every n ≥ 2, finite set of m goods, real ratio r > 1 and positive scales a_i, if v_i(g) is in {a_i, r * a_i}, then there are a complete allocation sigma and positive weights lambda such that sigma is EFX, every good sits with a lambda-weighted-maximising agent, and sigma maximises utilitarian welfare among all permutations of its own bundles.

theorem scaled_common_ratio_bivalued_exists_efx_weighted_max_perm_welfare_max
    (n : ℕ) (hn : 2 ≤ n) (m : ℕ)
    (r : ℝ) (hr : 1 < r)
    (a : Fin n → ℝ) (ha : ∀ i, 0 < a i)
    (v : Fin n → Fin m → ℝ) (hv : ∀ i g, v i g = a i ∨ v i g = r * a i) :
    ∃ (sigma : Fin m → Fin n) (lam : Fin n → ℝ),
      (∀ i, 0 < lam i) ∧
      (∀ (g : Fin m) (j : Fin n), lam j * v j g ≤ lam (sigma g) * v (sigma g) g) ∧
      is_efx_goods v sigma ∧
      ∀ pi : Equiv.Perm (Fin n),
        ∑ i, additive_valuation (v i) (bundle_of sigma (pi i)) ≤
          ∑ i, additive_valuation (v i) (bundle_of sigma i)
scaled_common_ratio_bivalued_identical_exists_efx_fpo_perm_welfare_maxIn LeanFair Division

If all agents share the same normalised valuation, v_i(g) = a_i * w(g) with w(g) in {1, r}, then there is an allocation that is EFX, fractionally Pareto optimal, and maximises utilitarian welfare over all permutations of its own bundles.

theorem scaled_common_ratio_bivalued_identical_exists_efx_fpo_perm_welfare_max
    (n : ℕ) (hn : 2 ≤ n) (m : ℕ)
    (r : ℝ) (hr : 1 < r)
    (a : Fin n → ℝ) (ha : ∀ i, 0 < a i)
    (w : Fin m → ℝ) (hw : ∀ g, w g = 1 ∨ w g = r)
    (v : Fin n → Fin m → ℝ) (hv : ∀ i g, v i g = a i * w g) :
    ∃ sigma : Fin m → Fin n,
      is_efx_goods v sigma ∧
      is_fractionally_pareto_optimal v sigma ∧
      ∀ pi : Equiv.Perm (Fin n),
        ∑ i, additive_valuation (v i) (bundle_of sigma (pi i)) ≤
          ∑ i, additive_valuation (v i) (bundle_of sigma i)
single_high_additive_valuation_eqIn LeanFair Division

If agent i has a single-high valuation with ratio R and high good a (value R on a, 1 elsewhere), then the additive value of a bundle S is |S| + (R-1) if a lies in S, and |S| otherwise.

theorem single_high_additive_valuation_eq {m : ℕ} (R : ℝ) (a : Fin m) (S : Finset (Fin m)) :
    additive_valuation (fun x : Fin m => if x = a then R else 1) S
      = (S.card : ℝ) + (R - 1) * (if a ∈ S then (1:ℝ) else 0)
social_welfare_bound_from_charity_guaranteeIn LeanFair Division

Under homogeneous nonnegative additive valuations v on Fin m, strictly positive item sizes s, and individual budgets B_i ≥ 0, let O : Fin n → Finset (Fin m) be an optimal budget-feasible allocation maximizing social welfare among all budget-feasible allocations. If a budget-feasible allocation X : Fin n → Finset (Fin m) satisfies γ * knapsack_opt v s (B i) (charity X) ≤ additive_valuation v (X i) for every agent i for some γ in (0, 1], then (γ / (1 + γ)) * social_welfare v O ≤ social_welfare v X.

theorem social_welfare_bound_from_charity_guarantee {m n : ℕ}
    (v : Fin m → ℝ) (hv : ∀ g, 0 ≤ v g)
    (s : Fin m → ℝ) (hs : ∀ g, 0 < s g)
    (B : Fin n → ℝ) (hB : ∀ i, 0 ≤ B i)
    (X : Fin n → Finset (Fin m)) (hX : is_budget_feasible s B X)
    (O : Fin n → Finset (Fin m)) (hO : is_budget_feasible s B O)
    (hO_opt : ∀ O' : Fin n → Finset (Fin m), is_budget_feasible s B O' → social_welfare v O' ≤ social_welfare v O)
    (γ : ℝ) (hγ0 : 0 < γ) (hγ1 : γ ≤ 1)
    (h_guarantee : ∀ i : Fin n, γ * knapsack_opt v s (B i) (charity X) ≤ additive_valuation v (X i)) :
    (γ / (1 + γ)) * social_welfare v O ≤ social_welfare v X
social_welfare_bound_from_charity_guarantee_of_feasibleIn LeanFair Division

Let X : Fin n → Finset (Fin m) and let O : Fin n → Finset (Fin m) be a budget-feasible allocation under item sizes s and budgets B. If valuations are given by a homogeneous nonnegative additive valuation v on Fin m and for some γ > 0, every agent i satisfies γ * knapsack_opt v s (B i) (charity X) ≤ additive_valuation v (X i), then (γ / (1 + γ)) * social_welfare v O ≤ social_welfare v X.

theorem social_welfare_bound_from_charity_guarantee_of_feasible {m n : ℕ}
    (v : Fin m → ℝ) (hv : ∀ g, 0 ≤ v g)
    (s : Fin m → ℝ) (B : Fin n → ℝ)
    (X : Fin n → Finset (Fin m))
    (O : Fin n → Finset (Fin m)) (hO : is_budget_feasible s B O)
    (γ : ℝ) (hγ0 : 0 < γ)
    (h_guarantee : ∀ i : Fin n, γ * knapsack_opt v s (B i) (charity X) ≤ additive_valuation v (X i)) :
    (γ / (1 + γ)) * social_welfare v O ≤ social_welfare v X
straight_line_cut_collinear_affineIn LeanFair Division

The restriction of a straight line's affine functional to the x-axis is affine: there are reals A and C with ℓ.cut (x,0) = A * x + C for every x, namely A = ℓ.cut.linear (1,0) and C = ℓ.cut 0.

theorem straight_line_cut_collinear_affine (ℓ : StraightLine) (x : ℝ) :
    ℓ.cut (x, 0) = x * ℓ.cut.linear ((1 : ℝ), 0) + ℓ.cut 0
straight_line_cut_collinear_monotone_or_antitoneIn LeanFair Division

For any straight line ℓ, the function x ↦ ℓ.cut (x,0) on the x-axis is either nondecreasing or nonincreasing.

theorem straight_line_cut_collinear_monotone_or_antitone (ℓ : StraightLine) :
    Monotone (fun x : ℝ => ℓ.cut (x, 0)) ∨ Antitone (fun x : ℝ => ℓ.cut (x, 0))
straight_line_parabola_transitions_le_twoIn LeanFair Division

For any straight line ℓ and any boolean assignment s consistent with ℓ on the parabola points pt(i) = (i, i²) for i ∈ ZMod m, the number of cyclic transitions where s(ℓ, pt(i)) ≠ s(ℓ, pt(i+1)) is at most 2.

theorem straight_line_parabola_transitions_le_two (m : ℕ) [NeZero m]
    (s : StraightLine → (ℝ × ℝ) → Bool) (ℓ : StraightLine)
    (hs : ∀ i : ZMod m,
      (0 < ℓ.cut ((i.val : ℝ), (i.val : ℝ)^2) → s ℓ ((i.val : ℝ), (i.val : ℝ)^2) = true) ∧
      (ℓ.cut ((i.val : ℝ), (i.val : ℝ)^2) < 0 → s ℓ ((i.val : ℝ), (i.val : ℝ)^2) = false)) :
    (Finset.univ.filter (fun (i : ZMod m) =>
      s ℓ ((i.val : ℝ), (i.val : ℝ)^2) ≠ s ℓ (((i + 1 : ZMod m).val : ℝ), ((i + 1 : ZMod m).val : ℝ)^2))).card ≤ 2
strengthened_large_low_quota_sharp_mms_boundIn LeanFair Division

For positive n, K at least two, 1<=s<n, and m=(K-1)n+s, an agent has positive low cost a and high cost r*a for 1<=r<=2. A bundle of at most K chores containing at least max(0,min(K,floor(|L|/s))+1-floor(K/2)) low chores costs at most (r+1)/2 times her n-agent chore maximin share.

theorem strengthened_large_low_quota_sharp_mms_bound (n K s : ℕ) (hn : 1 ≤ n) (hK : 2 ≤ K) (hs1 : 1 ≤ s) (hsn : s < n) (r a : ℝ) (hr1 : 1 ≤ r) (hr2 : r ≤ 2) (ha : 0 < a) (L : Finset (Fin ((K-1)*n+s))) (u : Fin ((K-1)*n+s) → ℝ) (hu : ∀ g, u g = if g ∈ L then a else r*a) (S : Finset (Fin ((K-1)*n+s))) (hsize : S.card ≤ K) (hquota : min K (L.card / s) + 1 - K/2 ≤ (S ∩ L).card) : additive_valuation u S ≤ ((r+1)/2)*chore_maximin_share n u
tendstoInDistribution_sub_of_tendstoInDistribution_zeroIn LeanFair Division

For random variables on varying probability spaces (Ω_i, μ_i), if X_i converges in distribution to a probability measure μ' on ℝ and Y_i converges in distribution to the Dirac measure at 0, then X_i - Y_i converges in distribution to μ'.

theorem tendstoInDistribution_sub_of_tendstoInDistribution_zero
  {ι : Type*} {Ω : ι → Type*} [∀ i, MeasurableSpace (Ω i)]
  (μ : (i : ι) → MeasureTheory.Measure (Ω i)) [∀ i, MeasureTheory.IsProbabilityMeasure (μ i)]
  (l : Filter ι) [l.IsCountablyGenerated]
  (μ' : MeasureTheory.ProbabilityMeasure ℝ)
  (X Y : (i : ι) → Ω i → ℝ)
  (hX : MeasureTheory.TendstoInDistribution X l (fun x => x) μ (μ' : MeasureTheory.Measure ℝ))
  (hY : MeasureTheory.TendstoInDistribution Y l (fun _ => (0 : ℝ)) μ (MeasureTheory.Measure.dirac 0)) :
  MeasureTheory.TendstoInDistribution (fun i ω => X i ω - Y i ω) l (fun x => x) μ (μ' : MeasureTheory.Measure ℝ)
two_agent_alternating_draft_welfare_regret_limitIn LeanFair Division

There exists a probability measure μ on ℝ supported on [0, ∞), not concentrated on any single point, with expectation 1/3, such that the utilitarian welfare regret of two-agent alternating drafting converges in distribution to μ.

theorem two_agent_alternating_draft_welfare_regret_limit :
  ∃ (μ : MeasureTheory.ProbabilityMeasure ℝ),
    (μ : MeasureTheory.Measure ℝ) (Set.Iio 0) = 0 ∧
    (∀ c : ℝ, (μ : MeasureTheory.Measure ℝ) {c} ≠ 1) ∧
    (∫ x, x ∂(μ : MeasureTheory.Measure ℝ)) = 1 / 3 ∧
    MeasureTheory.TendstoInDistribution
      (fun m v => two_agent_welfare_regret m (two_agent_alternating_schedule m) v)
      Filter.atTop
      (fun x : ℝ => x)
      (fun m => (balanced_draft_input_law 2 m : MeasureTheory.Measure (Fin 2 → Fin m → ℝ)))
      (μ : MeasureTheory.Measure ℝ)
two_agent_balanced_draft_welfare_asymptotic_invarianceIn LeanFair Division

For every sequence of balanced schedules s for two agents, the difference between draft welfare under s m and under the alternating schedule converges in distribution to the Dirac measure at 0 under independent uniform [0, 1] valuations.

theorem two_agent_balanced_draft_welfare_asymptotic_invariance :
  ∀ (s : (m : ℕ) → Fin m → Fin 2), (∀ m, is_balanced_schedule 2 m (s m)) →
    MeasureTheory.TendstoInDistribution
      (fun m v => two_agent_draft_welfare m (s m) v -
        two_agent_draft_welfare m (two_agent_alternating_schedule m) v)
      Filter.atTop
      (fun _ => (0 : ℝ))
      (fun m => (balanced_draft_input_law 2 m : MeasureTheory.Measure (Fin 2 → Fin m → ℝ)))
      (MeasureTheory.Measure.dirac 0)
two_agent_const_one_mms_ge_halfIn LeanFair Division

For the all-ones two-agent chore instance on m chores, the maximin share is at least (m+1)/2 (integer division), because in every partition the more expensive of the two bundles has size at least (m+1)/2.

theorem two_agent_const_one_mms_ge_half (m : ℕ) :
  ((m + 1) / 2 : ℕ) ≤ chore_maximin_share 2 (fun _ : Fin m => (1 : ℝ))
two_agent_divide_and_choose_weight_existsIn LeanFair Division

For two agents with nonnegative additive chore costs, there exist two 1-MMS divide-and-choose allocations σ and τ and a mixing weight w in [0, 1] whose expected costs do not exceed either agent's proportional share.

theorem two_agent_divide_and_choose_weight_exists (m : ℕ) (c : Fin 2 → Fin m → ℝ)
  (hc : ∀ i e, 0 ≤ c i e) :
  ∃ (σ τ : Fin m → Fin 2) (w : ℝ),
    0 ≤ w ∧ w ≤ 1 ∧
    is_alpha_mms_chores 1 c σ ∧
    is_alpha_mms_chores 1 c τ ∧
    w * additive_valuation (c 0) (bundle_of σ 0) +
      (1 - w) * additive_valuation (c 0) (bundle_of τ 0) ≤ (∑ e : Fin m, c 0 e) / 2 ∧
    w * additive_valuation (c 1) (bundle_of σ 1) +
      (1 - w) * additive_valuation (c 1) (bundle_of τ 1) ≤ (∑ e : Fin m, c 1 e) / 2
two_agent_mms_partition_existsIn LeanFair Division

For any m chores and additive chore costs u, there exists a 2-way partition P where both bundles cost at most the chore maximin share chore_maximin_share 2 u.

theorem two_agent_mms_partition_exists (m : ℕ) (u : Fin m → ℝ) :
  ∃ P : Fin m → Fin 2, ∀ k : Fin 2,
    additive_valuation u (bundle_of P k) ≤ chore_maximin_share 2 u
two_agent_two_allocation_mixture_lotteryIn LeanFair Division

Given two 1-MMS allocations σ and τ, and a convex weight w in [0, 1] whose mixture satisfies the ex-ante proportional share bounds for both agents, the convex mixture lottery w δ_σ + (1 - w) δ_τ is in stdSimplex, ex-ante proportional, and ex-post 1-MMS.

theorem two_agent_two_allocation_mixture_lottery (m : ℕ) (c : Fin 2 → Fin m → ℝ)
  (σ τ : Fin m → Fin 2) (hσ : is_alpha_mms_chores 1 c σ) (hτ : is_alpha_mms_chores 1 c τ)
  (w : ℝ) (hw0 : 0 ≤ w) (hw1 : w ≤ 1)
  (hprop0 : w * additive_valuation (c 0) (bundle_of σ 0) +
    (1 - w) * additive_valuation (c 0) (bundle_of τ 0) ≤ (∑ e : Fin m, c 0 e) / 2)
  (hprop1 : w * additive_valuation (c 1) (bundle_of σ 1) +
    (1 - w) * additive_valuation (c 1) (bundle_of τ 1) ≤ (∑ e : Fin m, c 1 e) / 2) :
  ∃ p ∈ stdSimplex ℝ (Fin m → Fin 2),
    is_ex_ante_proportional_chores c p ∧
    is_ex_post_alpha_mms_chores 1 c p
two_agent_welfare_regret_eq_subIn LeanFair Division

For any number of goods m, schedule s, and valuations v, two_agent_welfare_regret m s v = two_agent_welfare_regret m (two_agent_alternating_schedule m) v - (two_agent_draft_welfare m s v - two_agent_draft_welfare m (two_agent_alternating_schedule m) v).

theorem two_agent_welfare_regret_eq_sub (m : ℕ) (s : Fin m → Fin 2) (v : Fin 2 → Fin m → ℝ) :
  two_agent_welfare_regret m s v =
    two_agent_welfare_regret m (two_agent_alternating_schedule m) v -
      (two_agent_draft_welfare m s v -
        two_agent_draft_welfare m (two_agent_alternating_schedule m) v)
two_agents_round_alternating_not_wspIn LeanFair Division

For 2 agents and k * 2 + r objects with k ≥ 2 and r < 2, any allocation rule that is non-wasteful, neutral, EF1, and whose unanimous picking sequence is round-alternating is not weakly strategy-proof.

theorem two_agents_round_alternating_not_wsp (k r : ℕ) (hk : 2 ≤ k) (hr : r < 2)
    (f : (Fin 2 → LinearOrder (Fin (k * 2 + r))) → Fin 2 → Finset (Fin (k * 2 + r)))
    (h_alloc : is_allocation_rule f)
    (h_nw : is_non_wasteful_rule f)
    (h_neut : is_neutral_rule f)
    (h_ef1 : is_ef1_rule f)
    (s : Fin (k * 2 + r) → Fin 2)
    (hs : ∀ (e : Fin (k * 2 + r) ≃ Fin (k * 2 + r)) (i : Fin 2),
      (f (fun _ => draft_enum_order e) i).map e.toEmbedding =
        Finset.univ.filter (fun m => s m = i))
    (halt : ∀ (t : ℕ) (ht : t < k), s ⟨2 * t, by omega⟩ ≠ s ⟨2 * t + 1, by omega⟩) :
    ¬ is_weakly_strategy_proof_rule f
two_agents_rule_pick_seqIn LeanFair Division

A non-wasteful, neutral allocation rule on 2 agents and k * 2 + r objects acts as a picking sequence s at every unanimous profile.

theorem two_agents_rule_pick_seq (k r : ℕ)
    (f : (Fin 2 → LinearOrder (Fin (k * 2 + r))) → Fin 2 → Finset (Fin (k * 2 + r)))
    (h_alloc : is_allocation_rule f) (h_nw : is_non_wasteful_rule f) (h_neut : is_neutral_rule f) :
    ∃ s : Fin (k * 2 + r) → Fin 2,
      ∀ (e : Fin (k * 2 + r) ≃ Fin (k * 2 + r)) (i : Fin 2),
        (f (fun _ => draft_enum_order e) i).map e.toEmbedding =
          Finset.univ.filter (fun m => s m = i)
two_agents_unanimous_round_balanceIn LeanFair Division

If an allocation rule on 2 agents and k * 2 + r objects is EF1 and agrees with picking sequence s at unanimous profiles, then s must be round-alternating: for every round t < k, s(2t) ≠ s(2t+1).

theorem two_agents_unanimous_round_balance (k r : ℕ) (hk : 2 ≤ k) (hr : r < 2)
    (f : (Fin 2 → LinearOrder (Fin (k * 2 + r))) → Fin 2 → Finset (Fin (k * 2 + r)))
    (h_ef1 : is_ef1_rule f)
    (s : Fin (k * 2 + r) → Fin 2)
    (hs : ∀ (e : Fin (k * 2 + r) ≃ Fin (k * 2 + r)) (i : Fin 2),
      (f (fun _ => draft_enum_order e) i).map e.toEmbedding =
        Finset.univ.filter (fun m => s m = i)) :
    ∀ (t : ℕ) (ht : t < k), s ⟨2 * t, by omega⟩ ≠ s ⟨2 * t + 1, by omega⟩
two_type_chores_alpha_below_four_thirds_failsIn LeanFair Division

For every real alpha < 4/3, the universal existence property two_type_chores_have_alpha_pmms_fpo alpha fails.

theorem two_type_chores_alpha_below_four_thirds_fails :
    ∀ α : ℝ, α < 4 / 3 → ¬ two_type_chores_have_alpha_pmms_fpo α
two_type_chores_alpha_between_one_and_four_thirds_failsIn LeanFair Division

For every real alpha with 1 < alpha < 4/3, the universal existence property two_type_chores_have_alpha_pmms_fpo alpha fails: there is an instance with no fractionally Pareto optimal allocation that is alpha-PMMS.

theorem two_type_chores_alpha_between_one_and_four_thirds_fails :
    ∀ α : ℝ, 1 < α → α < 4 / 3 → ¬ two_type_chores_have_alpha_pmms_fpo α
two_type_chores_alpha_four_thirds_existsIn LeanFair Division

The universal existence property two_type_chores_have_alpha_pmms_fpo holds at alpha = 4/3: for every n ≥ 2, chore totals a, b and strictly positive costs p, q, there is an integer allocation that is both fractionally Pareto optimal and (4/3)-PMMS.

theorem two_type_chores_alpha_four_thirds_exists : two_type_chores_have_alpha_pmms_fpo (4 / 3)
two_type_chores_alpha_le_one_failsIn LeanFair Division

For every real alpha ≤ 1, the universal existence property two_type_chores_have_alpha_pmms_fpo alpha fails.

theorem two_type_chores_alpha_le_one_fails :
    ∀ α : ℝ, α ≤ 1 → ¬ two_type_chores_have_alpha_pmms_fpo α
two_type_chores_have_alpha_pmms_fpo_twoIn LeanFair Division

The universal existence property two_type_chores_have_alpha_pmms_fpo holds at alpha = 2, so it is non-vacuous and the sharp constant is at most 2.

theorem two_type_chores_have_alpha_pmms_fpo_two : two_type_chores_have_alpha_pmms_fpo 2
uniform_bivalued_agent_zero_balanced_safeIn LeanFair Division

In a two-agent chore instance where agent 0 assigns cost 1 to every chore, any cardinality-balanced subset S (both |S| and |univ \ S| at most (m+1)/2) gives both bundles additive cost at most agent 0's two-agent chore maximin share.

theorem uniform_bivalued_agent_zero_balanced_safe
    (m : ℕ) (c : Fin 2 → Fin m → ℝ)
    (hc0 : ∀ g, c 0 g = 1) (S : Finset (Fin m))
    (hs : S.card ≤ (m + 1) / 2) (hsc : (Finset.univ \ S).card ≤ (m + 1) / 2) :
    additive_valuation (c 0) S ≤ chore_maximin_share 2 (c 0) ∧
    additive_valuation (c 0) (Finset.univ \ S) ≤ chore_maximin_share 2 (c 0)
uniform_bivalued_exact_mms_necessityIn LeanFair Division

If every two-agent uniform bivalued chores instance of ratio r admits an equal-marginal exact-MMS lottery, then r = 1 or r = 1 + 1/k for some positive integer k.

theorem uniform_bivalued_exact_mms_necessity (r : ℝ) (hr1 : 1 ≤ r) (hr2 : r ≤ 2)
    (h : ∀ (m : ℕ) (c : Fin 2 → Fin m → ℝ), is_uniform_bivalued_chores r c →
      ∃ p ∈ stdSimplex ℝ (Fin m → Fin 2),
        is_equal_marginal_lottery p ∧ is_ex_post_alpha_mms_chores 1 c p) :
  r = 1 ∨ ∃ k : ℕ, 1 ≤ k ∧ r = 1 + 1 / (k : ℝ)
uniform_bivalued_exact_mms_sufficiencyIn LeanFair Division

If r = 1 or r = 1 + 1/k with k >= 1, every two-agent uniform bivalued chores instance admits an equal-marginal lottery all of whose allocations are exactly MMS.

theorem uniform_bivalued_exact_mms_sufficiency (r : ℝ) (hr1 : 1 ≤ r) (hr2 : r ≤ 2)
    (hr : r = 1 ∨ ∃ k : ℕ, 1 ≤ k ∧ r = 1 + 1 / (k : ℝ)) :
  ∀ (m : ℕ) (c : Fin 2 → Fin m → ℝ), is_uniform_bivalued_chores r c →
    ∃ p ∈ stdSimplex ℝ (Fin m → Fin 2),
      is_equal_marginal_lottery p ∧ is_ex_post_alpha_mms_chores 1 c p
uniform_bivalued_obstruction_cost_is_uniformIn LeanFair Division

The obstruction cost profile is a uniform bivalued chores instance of ratio r: agent 0 pays 1 on every chore, and agent 1 pays either r or 1 on every chore.

theorem uniform_bivalued_obstruction_cost_is_uniform (t : ℕ) (r : ℝ) :
  is_uniform_bivalued_chores r (uniform_bivalued_obstruction_cost t r)
upgrade_feasible_exists_cost_increase_agentIn LeanFair Division

Lemma 2.2 of arXiv:2611.00432: in every upgrade-feasible update from an allocation A of m chores to an allocation A' of m + 1 chores with costs c, there exist an agent r and a chore h in r's new bundle (A' h = r) such that for all agents i ≠ r, agent i's total cost under A' is at most her total cost under A, and agent r's total cost under A' without h is at most her total cost under A.

theorem upgrade_feasible_exists_cost_increase_agent {m n : ℕ}
    (c : Fin n → Fin (m + 1) → ℝ) (A : Fin m → Fin n) (A' : Fin (m + 1) → Fin n)
    (hfeas : is_upgrade_feasible c A A') :
    ∃ (r : Fin n) (h : Fin (m + 1)),
      A' h = r ∧
      (∀ i : Fin n, i ≠ r →
        additive_valuation (c i) (bundle_of A' i) ≤
          additive_valuation (fun d => c i d.castSucc) (bundle_of A i)) ∧
      additive_valuation (c r) ((bundle_of A' r).erase h) ≤
        additive_valuation (fun d => c r d.castSucc) (bundle_of A r)
wsp_bundle_no_strict_subsetIn LeanFair Division

For a weakly strategy-proof rule, a single agent's misreport can never give her a bundle that strictly contains, or is strictly contained in, her truthful bundle.

theorem wsp_bundle_no_strict_subset {Agent Object : Type*} [DecidableEq Agent]
    (f : (Agent → LinearOrder Object) → Agent → Finset Object)
    (h_wsp : is_weakly_strategy_proof_rule f)
    (succ : Agent → LinearOrder Object) (i : Agent) (o : LinearOrder Object) :
    ¬ (f (Function.update succ i o) i ⊂ f succ i) ∧
      ¬ (f succ i ⊂ f (Function.update succ i o) i)
Ug_cardIn LeanGeneral Equilibrium & Cooperative Games

For 2g+1 < n the number of orderings satisfying Ug for the fixed group g is (n-1)!/(2g+1).

theorem Ug_card (n g : ℕ) (hg : 2 * g + 1 < n) :
    (Nat.card {e : Fin (Fintype.card (Fin n)) ≃ Fin n // Ug e g} : ℝ)
      = (Nat.factorial (n - 1) : ℝ) / (2 * g + 1)
Ug_inter_cardIn LeanGeneral Equilibrium & Cooperative Games

For g < g' with 2g'+1 < n, at most 4(n-2)!/(2g') orderings satisfy both Ug g and Ug g'.

theorem Ug_inter_card (n g g' : ℕ) (hgg : g < g') (hg' : 2 * g' + 1 < n) :
    (Nat.card {e : Fin (Fintype.card (Fin n)) ≃ Fin n // Ug e g ∧ Ug e g'} : ℝ)
      ≤ 4 * (Nat.factorial (n - 2) : ℝ) / (2 * g' + 1)
crossPairCount_defectIn LeanGeneral Equilibrium & Cooperative Games

For coalitions A, B the supermodularity defect of N is the number of ordered cross-group pairs separated by A and B.

theorem crossPairCount_defect {n : ℕ} (A B : Finset (Fin n)) :
    crossPairCount (A ∪ B) + crossPairCount (A ∩ B) - crossPairCount A - crossPairCount B
      = (cutPairCount A B : ℝ)
crossPairCount_defect_eq_zero_iffIn LeanGeneral Equilibrium & Cooperative Games

N(A∪B) + N(A∩B) - N(A) - N(B) = 0 if and only if every element of A\B lies in the same group as every element of B\A.

theorem crossPairCount_defect_eq_zero_iff {n : ℕ} (A B : Finset (Fin n)) :
    crossPairCount (A ∪ B) + crossPairCount (A ∩ B) - crossPairCount A - crossPairCount B = 0 ↔
    (∀ a ∈ A, a ∉ B → ∀ b ∈ B, b ∉ A → a.val / 2 = b.val / 2)
ell_defect_leIn LeanGeneral Equilibrium & Cooperative Games

ell(A∪B) + ell(A∩B) - ell(A) - ell(B) is at most numGroups n, in particular bounded independently of the coalitions.

theorem ell_defect_le {n : ℕ} (A B : Finset (Fin n)) :
    ((ell (A ∪ B) : ℝ) + (ell (A ∩ B) : ℝ)) - ((ell A : ℝ) + (ell B : ℝ)) ≤ (numGroups n : ℝ)
ell_ge_iffIn LeanGeneral Equilibrium & Cooperative Games

For g ≤ numGroups n, ell(S) ≥ g if and only if every group h < g is fully contained in S.

theorem ell_ge_iff {n : ℕ} (S : Finset (Fin n)) (g : ℕ) (hg : g ≤ numGroups n) :
    (g ≤ ell S ↔ ∀ h < g, groupSet h ⊆ S)
exists_violated_pair_of_marginal_not_in_coreIn LeanGeneral Equilibrium & Cooperative Games

Let v be a game with v(∅) = 0 on a finite player set and e a player ordering. If the marginal vector of e is not in the core, there are coalitions A, B and a player i such that (A,B) violates supermodularity, B \ A = {i}, and A is exactly the set of players preceding i in e.

theorem exists_violated_pair_of_marginal_not_in_core {α : Type*} [DecidableEq α] [Fintype α]
    (v : Finset α → ℝ) (hv0 : v ∅ = 0) (e : Fin (Fintype.card α) ≃ α)
    (h : ¬ is_in_core v (marginal_vector v e)) :
    ∃ (A B : Finset α) (i : α),
      violates_supermodularity v A B ∧ B \ A = {i} ∧ predecessors e i = A
gameV_bad_pair_shapeIn LeanGeneral Equilibrium & Cooperative Games

If v_n(S∪U) + v_n(S∩U) < v_n(S) + v_n(U), then S and U differ only inside a single pair-group g, by complementary singletons {a} and {b}, and every group h < g is fully contained in S.

theorem gameV_bad_pair_shape {n : ℕ} (S U : Finset (Fin n))
    (h : gameV n (S ∪ U) + gameV n (S ∩ U) - gameV n S - gameV n U < 0) :
    ∃ (a b : Fin n) (g : ℕ), a ≠ b ∧ a.val / 2 = g ∧ b.val / 2 = g ∧
      S \ U = {a} ∧ U \ S = {b} ∧ (∀ h' < g, groupSet h' ⊆ S)
gameV_bad_partner_uniqueIn LeanGeneral Equilibrium & Cooperative Games

For a fixed coalition S there is at most one coalition U with v_n(S∪U) + v_n(S∩U) < v_n(S) + v_n(U).

theorem gameV_bad_partner_unique {n : ℕ} (S U U' : Finset (Fin n))
    (hU : gameV n (S ∪ U) + gameV n (S ∩ U) - gameV n S - gameV n U < 0)
    (hU' : gameV n (S ∪ U') + gameV n (S ∩ U') - gameV n S - gameV n U' < 0) :
    U = U'
gameV_defect_neg_iffIn LeanGeneral Equilibrium & Cooperative Games

The supermodularity defect of v_n on (A,B) is negative if and only if the cross-group pair count defect vanishes and ell strictly increases in the sense ell(A∪B)+ell(A∩B) > ell(A)+ell(B).

theorem gameV_defect_neg_iff {n : ℕ} (A B : Finset (Fin n)) :
    gameV n (A ∪ B) + gameV n (A ∩ B) - gameV n A - gameV n B < 0 ↔
    (crossPairCount (A ∪ B) + crossPairCount (A ∩ B) - crossPairCount A - crossPairCount B = 0 ∧
      (ell A : ℝ) + (ell B : ℝ) < (ell (A ∪ B) : ℝ) + (ell (A ∩ B) : ℝ))
gameV_emptyIn LeanGeneral Equilibrium & Cooperative Games

The constructed game assigns value 0 to the empty coalition.

theorem gameV_empty (n : ℕ) : gameV n ∅ = 0
gameV_two_thirds_convexIn LeanGeneral Equilibrium & Cooperative Games

The game v_n(S) = (4n+1)N(S) - ell(S) is 2/3-convex.

theorem gameV_two_thirds_convex (n : ℕ) : is_two_thirds_convex (gameV n)
gameV_violationIn LeanGeneral Equilibrium & Cooperative Games

If an ordering e satisfies Ug for some group g, then the marginal vector of v_n along e is not in the core.

theorem gameV_violation (n : ℕ) (e : Fin (Fintype.card (Fin n)) ≃ Fin n) (g : ℕ) (h : Ug e g) :
    ¬ is_in_core (gameV n) (marginal_vector (gameV n) e)
groupSet_card_le_twoIn LeanGeneral Equilibrium & Cooperative Games

Each group of players contains at most two elements.

theorem groupSet_card_le_two (n g : ℕ) : (groupSet (n := n) g).card ≤ 2
hierarchical_game_emptyIn LeanGeneral Equilibrium & Cooperative Games

The hierarchical game evaluates to 0 on the empty coalition.

theorem hierarchical_game_empty (n : ℕ) :
    (fun S : Finset (Fin n) => (4 * (n : ℝ) + 1) * crossPairCount S - (ell S : ℝ)) ∅ = 0
hierarchical_game_two_thirds_convexIn LeanGeneral Equilibrium & Cooperative Games

The hierarchical game on Fin n is 2/3-convex.

theorem hierarchical_game_two_thirds_convex (n : ℕ) :
    is_two_thirds_convex (fun S : Finset (Fin n) => (4 * (n : ℝ) + 1) * crossPairCount S - (ell S : ℝ))
hierarchical_game_violation_of_UgIn LeanGeneral Equilibrium & Cooperative Games

Any player ordering satisfying the event Ug e g produces a marginal vector outside the core.

theorem hierarchical_game_violation_of_Ug {n : ℕ}
    (e : Fin (Fintype.card (Fin n)) ≃ Fin n) (g : ℕ) (hg : Ug e g) :
    ¬ is_in_core (fun S : Finset (Fin n) => (4 * (n : ℝ) + 1) * crossPairCount S - (ell S : ℝ))
      (marginal_vector (fun S : Finset (Fin n) => (4 * (n : ℝ) + 1) * crossPairCount S - (ell S : ℝ)) e)
marginal_vector_sum_eqIn LeanGeneral Equilibrium & Cooperative Games

For any game v and ordering e, the sum over players of the marginal vector equals v(univ) - v(∅); the values along e telescope through the prefixes.

theorem marginal_vector_sum_eq {α : Type*} [DecidableEq α] [Fintype α] (v : Finset α → ℝ)
    (e : Fin (Fintype.card α) ≃ α) :
    (∑ i : α, marginal_vector v e i) = v Finset.univ - v ∅
marginal_vector_sum_univIn LeanGeneral Equilibrium & Cooperative Games

For any game with v(∅) = 0 and ordering e, the total payoff of the marginal vector over all players equals v(univ).

theorem marginal_vector_sum_univ {α : Type*} [DecidableEq α] [Fintype α]
    (v : Finset α → ℝ) (hv0 : v ∅ = 0) (e : Fin (Fintype.card α) ≃ α) :
    ∑ i : α, marginal_vector v e i = v Finset.univ
noncore_ordering_fraction_le_oneIn LeanGeneral Equilibrium & Cooperative Games

For any game v on a finite player set, the fraction of orderings whose marginal vector is outside the core is at most 1.

theorem noncore_ordering_fraction_le_one {α : Type*} [DecidableEq α] [Fintype α] (v : Finset α → ℝ) :
    noncore_ordering_fraction v ≤ 1
order_prefix_cardIn LeanGeneral Equilibrium & Cooperative Games

For any ordering bijection e of a finite type α and k ≤ |α|, the prefix of length k has cardinality k.

theorem order_prefix_card {α : Type*} [DecidableEq α] [Fintype α]
    (e : Fin (Fintype.card α) ≃ α) (k : ℕ) (hk : k ≤ Fintype.card α) :
    (order_prefix e k).card = k
order_prefix_monoIn LeanGeneral Equilibrium & Cooperative Games

Order prefixes are monotone with respect to their length: for any j ≤ k, order_prefix e j ⊆ order_prefix e k.

theorem order_prefix_mono {α : Type*} [DecidableEq α] [Fintype α]
    (e : Fin (Fintype.card α) ≃ α) {j k : ℕ} (hjk : j ≤ k) :
    order_prefix e j ⊆ order_prefix e k
three_distant_convex_blocking_sdiff_card_le_oneIn LeanGeneral Equilibrium & Cooperative Games

In a 3-distant convex game, if S ⊆ order_prefix(k+1) contains player e(k) and its marginal contribution of e(k) strictly exceeds that in the prefix, then the complement of S in order_prefix(k) has cardinality at most 1.

theorem three_distant_convex_blocking_sdiff_card_le_one
    {α : Type*} [DecidableEq α] [Fintype α]
    (v : Finset α → ℝ) (hv : is_three_distant_convex v)
    (e : Fin (Fintype.card α) ≃ α) (k : ℕ) (hk : k < Fintype.card α)
    (S : Finset α) (hS : S ⊆ order_prefix e (k + 1))
    (h_mem : e ⟨k, hk⟩ ∈ S)
    (h_excess : v S - v (S \ {e ⟨k, hk⟩}) > v (order_prefix e (k + 1)) - v (order_prefix e k)) :
    (order_prefix e k \ S).card ≤ 1
three_distant_convex_marginal_vector_in_core_iff_local_no_swapIn LeanGeneral Equilibrium & Cooperative Games

Let v be a 3-distant convex cooperative game with v(∅) = 0 on a finite player set α, and let e be an ordering bijection of the players. Then the marginal worth vector marginal_vector v e belongs to the core of v (is_in_core v (marginal_vector v e)) if and only if the local no-swap condition local_no_swap v e holds.

theorem three_distant_convex_marginal_vector_in_core_iff_local_no_swap
    {α : Type*} [DecidableEq α] [Fintype α]
    (v : Finset α → ℝ) (hv0 : v ∅ = 0) (hv : is_three_distant_convex v)
    (e : Fin (Fintype.card α) ≃ α) :
    is_in_core v (marginal_vector v e) ↔ local_no_swap v e
two_thirds_convex_Ug_fraction_lower_boundIn LeanGeneral Equilibrium & Cooperative Games

The fraction of player orderings satisfying Ug e g for some group g is at least c * log(n) / n for all large n.

theorem two_thirds_convex_Ug_fraction_lower_bound :
    ∃ c > 0, ∃ n₀ : ℕ, ∀ n ≥ n₀,
      c * Real.log (n : ℝ) / (n : ℝ) ≤ (UgCount n : ℝ) / (n.factorial : ℝ)
two_thirds_convex_core_nonemptyIn LeanGeneral Equilibrium & Cooperative Games

For every cooperative game v : Finset α → ℝ on a finite type α with decidable equality and at least 3 players (3 ≤ Fintype.card α) satisfying v(∅) = 0, if v is 2/3-convex, then the core of v is nonempty (there exists an allocation x : α → ℝ such that is_in_core v x).

theorem two_thirds_convex_core_nonempty {α : Type*} [DecidableEq α] [Fintype α]
    (v : Finset α → ℝ) (hv0 : v ∅ = 0) (h_card : 3 ≤ Fintype.card α)
    (h_conv : is_two_thirds_convex v) :
    ∃ x : α → ℝ, is_in_core v x
two_thirds_convex_implies_three_distant_convexIn LeanGeneral Equilibrium & Cooperative Games

Every 2/3-convex cooperative game is 3-distant convex.

theorem two_thirds_convex_implies_three_distant_convex {α : Type*} [DecidableEq α]
    (v : Finset α → ℝ) (h : is_two_thirds_convex v) :
    is_three_distant_convex v
two_thirds_convex_marginal_vector_in_coreIn LeanGeneral Equilibrium & Cooperative Games

For every cooperative game v : Finset α → ℝ on a finite type α with decidable equality and at least 3 players (3 ≤ Fintype.card α) satisfying v(∅) = 0, if v is 2/3-convex, then there exists an ordering bijection e : Fin (Fintype.card α) ≃ α such that the marginal worth vector marginal_vector v e belongs to the core of v (is_in_core v (marginal_vector v e)).

theorem two_thirds_convex_marginal_vector_in_core {α : Type*} [DecidableEq α] [Fintype α]
    (v : Finset α → ℝ) (hv0 : v ∅ = 0) (h_card : 3 ≤ Fintype.card α)
    (h_conv : is_two_thirds_convex v) :
    ∃ e : Fin (Fintype.card α) ≃ α, is_in_core v (marginal_vector v e)
two_thirds_convex_max_noncore_fraction_tendsto_of_sharp_boundsIn LeanGeneral Equilibrium & Cooperative Games

Assume every 2/3-convex game on n players with v(∅)=0 has non-core ordering fraction at most (2+ε)log n/n eventually, and that eventually some such game attains at least (2−ε)log n/n. Then n·max_noncore_fraction(n)/log n tends to 2.

theorem two_thirds_convex_max_noncore_fraction_tendsto_of_sharp_bounds
    (hupper : ∀ ε : ℝ, 0 < ε → ∀ᶠ n : ℕ in Filter.atTop,
      ∀ v : Finset (Fin n) → ℝ, v ∅ = 0 → is_two_thirds_convex v →
        (n : ℝ) * noncore_ordering_fraction v / Real.log (n : ℝ) ≤ 2 + ε)
    (hlower : ∀ ε : ℝ, 0 < ε → ∀ᶠ n : ℕ in Filter.atTop,
      ∃ v : Finset (Fin n) → ℝ, v ∅ = 0 ∧ is_two_thirds_convex v ∧
        2 - ε ≤ (n : ℝ) * noncore_ordering_fraction v / Real.log (n : ℝ)) :
    Filter.Tendsto (fun n : ℕ => (n : ℝ) * two_thirds_convex_max_noncore_fraction n / Real.log (n : ℝ))
      Filter.atTop (nhds 2)
two_thirds_convex_noncore_fraction_lower_sharpIn LeanGeneral Equilibrium & Cooperative Games

For every ε > 0 and all sufficiently large n there is a 2/3-convex game v on n players with v(∅) = 0 whose non-core ordering fraction is at least (2−ε)log n/n.

theorem two_thirds_convex_noncore_fraction_lower_sharp :
    ∀ ε : ℝ, 0 < ε → ∀ᶠ n : ℕ in Filter.atTop,
      ∃ v : Finset (Fin n) → ℝ, v ∅ = 0 ∧ is_two_thirds_convex v ∧
        2 - ε ≤ (n : ℝ) * noncore_ordering_fraction v / Real.log (n : ℝ)
two_thirds_convex_noncore_fraction_upper_sharpIn LeanGeneral Equilibrium & Cooperative Games

For every ε > 0 and all sufficiently large n, every 2/3-convex game v on n players with v(∅) = 0 has at most a (2+ε)log n/n fraction of player orderings whose marginal vector lies outside the core.

theorem two_thirds_convex_noncore_fraction_upper_sharp :
    ∀ ε : ℝ, 0 < ε → ∀ᶠ n : ℕ in Filter.atTop,
      ∀ v : Finset (Fin n) → ℝ, v ∅ = 0 → is_two_thirds_convex v →
        (n : ℝ) * noncore_ordering_fraction v / Real.log (n : ℝ) ≤ 2 + ε
two_thirds_convex_pairwise_singleton_superadditive_permutationally_convexIn LeanGeneral Equilibrium & Cooperative Games

Let v be a 2/3-convex cooperative game on a finite set of players α with at least 3 players (3 ≤ Fintype.card α) satisfying v ∅ = 0. If v satisfies pairwise singleton superadditivity (v {i} + v {j} ≤ v {i, j} for all distinct i j : α), then v is permutationally convex.

theorem two_thirds_convex_pairwise_singleton_superadditive_permutationally_convex
    {α : Type*} [DecidableEq α] [Fintype α]
    (v : Finset α → ℝ) (hv0 : v ∅ = 0) (h_card : 3 ≤ Fintype.card α)
    (h_conv : is_two_thirds_convex v)
    (h_pair : ∀ i j : α, i ≠ j → v {i} + v {j} ≤ v {i, j}) :
    is_permutationally_convex v
two_thirds_convex_violation_witnessIn LeanGeneral Equilibrium & Cooperative Games

There is a 2/3-convex game on two players with v(∅) = 0 that has a violated supermodularity pair, so violates_supermodularity is neither vacuous nor implied by 2/3-convexity.

theorem two_thirds_convex_violation_witness :
    ∃ (v : Finset (Fin 2) → ℝ) (S T : Finset (Fin 2)),
      v ∅ = 0 ∧ is_two_thirds_convex v ∧ violates_supermodularity v S T
violates_supermodularity_unique_partnerIn LeanGeneral Equilibrium & Cooperative Games

For a 2/3-convex game the violated supermodularity pairs form a matching: if both {S,T} and {S,U} violate supermodularity then T = U.

theorem violates_supermodularity_unique_partner {α : Type*} [DecidableEq α] (v : Finset α → ℝ)
    (h : is_two_thirds_convex v) {S T U : Finset α}
    (hST : violates_supermodularity v S T) (hSU : violates_supermodularity v S U) : T = U
cyclic_latin_is_stable_matching_iffIn LeanMatching & Market Design

In the opposed cyclic Latin market determined by an ordering bijection a of Z/nZ, a matching μ is stable exactly when no pair of men x, z makes the label a.symm(z + μ x) of the edge (z, μ x) lie strictly between the rank a.symm(x + μ x) that woman μ x pays under μ and the rank a.symm(z + μ z) that man z pays under μ.

theorem cyclic_latin_is_stable_matching_iff (n : ℕ) (a : Fin n ≃ ZMod n) (μ : Equiv.Perm (ZMod n)) :
    is_stable_matching (cyclic_latin_market n a) μ ↔
      ∀ x z : ZMod n, ¬ (a.symm (x + μ x) < a.symm (z + μ x) ∧ a.symm (z + μ x) < a.symm (z + μ z))
cyclic_latin_stable_matching_gcd_sequence_transportIn LeanMatching & Market Design

If two ordering bijections a and b of Z/nZ (n >= 3) have the same consecutive gcd sequence, then there is a bijection Φ of the set of all matchings that carries the stable matchings of the a-market onto the stable matchings of the b-market, and that preserves each matching's aggregate proposer rank: μ is a-stable iff Φ μ is b-stable, and for a-stable μ the two rank sums agree.

theorem cyclic_latin_stable_matching_gcd_sequence_transport (n : ℕ) (hn : 3 ≤ n)
    (a b : Fin n ≃ ZMod n) (h_gcd : cyclic_consecutive_gcd_eq a b) :
    haveI : NeZero n := ⟨by omega⟩
    ∃ Φ : Equiv.Perm (ZMod n) ≃ Equiv.Perm (ZMod n),
      (∀ μ : Equiv.Perm (ZMod n),
        is_stable_matching (cyclic_latin_market n a) μ ↔
          is_stable_matching (cyclic_latin_market n b) (Φ μ)) ∧
      (∀ μ : Equiv.Perm (ZMod n), is_stable_matching (cyclic_latin_market n a) μ →
        cyclic_latin_rank_sum n a μ = cyclic_latin_rank_sum n b (Φ μ))
cyclic_latin_stable_matching_of_coprime_stepsIn LeanMatching & Market Design

If every consecutive difference of the ordering a is coprime to n (equivalently every consecutive gcd is 1), then the only stable matchings of the cyclic Latin market are the n rotations μ_r(i) = a r - i.

theorem cyclic_latin_stable_matching_of_coprime_steps (n : ℕ) (a : Fin n ≃ ZMod n)
    (hcop : ∀ (r : ℕ) (hr : r + 1 < n), Nat.gcd n (a ⟨r + 1, hr⟩ - a ⟨r, by omega⟩).val = 1)
    (μ : Equiv.Perm (ZMod n)) (hμ : is_stable_matching (cyclic_latin_market n a) μ) :
    ∃ r : Fin n, μ = cyclic_latin_rank_matching n a r
cyclic_latin_stable_rank_polynomial_add_constIn LeanMatching & Market Design

Translating the cyclic order by a constant (replacing a r by a r + c) does not change the stable-matching rank polynomial.

theorem cyclic_latin_stable_rank_polynomial_add_const (n : ℕ) [NeZero n] (a : Fin n ≃ ZMod n) (c : ZMod n) :
    cyclic_latin_rank_polynomial n a = cyclic_latin_rank_polynomial n (a.trans (Equiv.addRight c))
cyclic_latin_stable_rank_polynomial_unit_mulIn LeanMatching & Market Design

If the ordering b is obtained from a by multiplying pointwise by a unit u of ZMod n (b r = u * a r), then a and b have the same stable-matching rank polynomial.

theorem cyclic_latin_stable_rank_polynomial_unit_mul (n : ℕ) [NeZero n] (a b : Fin n ≃ ZMod n)
    (u : (ZMod n)ˣ) (hb : ∀ r : Fin n, b r = (u : ZMod n) * a r) :
    cyclic_latin_rank_polynomial n a = cyclic_latin_rank_polynomial n b
cyclic_latin_stable_rank_vector_coset_constantIn LeanMatching & Market Design

If every consecutive difference of the ordering a has gcd (with n) dividing L, and L divides n, then the rank vector i ↦ a.symm(i + μ i) of any stable matching μ is constant on the cosets of the subgroup of ZMod n generated by L: whenever L divides the representative of x - y, one has a.symm(x + μ x) = a.symm(y + μ y).

theorem cyclic_latin_stable_rank_vector_coset_constant (n : ℕ) [NeZero n] (a : Fin n ≃ ZMod n)
    (L : ℕ) (hL : ∀ (r : ℕ) (hr : r + 1 < n), Nat.gcd n (a ⟨r + 1, hr⟩ - a ⟨r, by omega⟩).val ∣ L)
    (hdvd : L ∣ n) (μ : Equiv.Perm (ZMod n)) (hμ : is_stable_matching (cyclic_latin_market n a) μ)
    (x y : ZMod n) (hxy : L ∣ (x - y).val) :
    a.symm (x + μ x) = a.symm (y + μ y)
opposed_latin_blocking_eq_sum_block_weightIn LeanMatching & Market Design

For every complete matching μ of the opposed Latin marriage market of an n × n array L, the number of blocking pairs of μ equals the sum over all ordered pairs of men (i,k) of latin_block_weight L i k (μ i) (μ k): since k ↦ μ k runs over all women, this is just the count of blocking pairs re-indexed over ordered pairs of men.

theorem opposed_latin_blocking_eq_sum_block_weight {n : ℕ} (L : Fin n → Fin n → Fin n)
    (μ : Equiv.Perm (Fin n)) :
    {p : Fin n × Fin n | is_blocking_pair (opposed_latin_market L) μ p.1 p.2}.ncard
      = ∑ i : Fin n, ∑ k : Fin n, latin_block_weight L i k (μ i) (μ k)
opposed_latin_blocking_second_moment_bigOIn LeanMatching & Market Design

There is an absolute constant C such that for every n ≥ 2 and every Latin square L of order n, the second moment E[B^2] of the number of blocking pairs of a uniformly random complete matching in the opposed Latin market of L equals n^4/36 − 19n^3/180 up to an error of at most C·n^2. Together with the exact first moment n(n−2)/6 this gives Var = n^3/180 + O(n^2) uniformly in L, hence the n^3/180 limit.

theorem opposed_latin_blocking_second_moment_bigO :
    ∃ C : ℝ, 0 ≤ C ∧ ∀ (n : ℕ) (hn : 2 ≤ n) (L : Fin n → Fin n → Fin n), latin_square_is L →
      |(∑ μ : Equiv.Perm (Fin n),
          ((({p : Fin n × Fin n | is_blocking_pair (opposed_latin_market L) μ p.1 p.2}.ncard : ℝ)) ^ 2))
          / (n.factorial : ℝ)
        - ((n : ℝ) ^ 4 / 36 - 19 * (n : ℝ) ^ 3 / 180)| ≤ C * (n : ℝ) ^ 2
opposed_latin_blocking_variance_tendsto_of_momentsIn LeanMatching & Market Design

Suppose that, uniformly over all n ≥ 2 and all Latin squares L of order n, the mean number of blocking pairs of a uniformly random complete matching is exactly n(n−2)/6 and its second moment is n^4/36 − 19n^3/180 up to an error of at most C·n^2. Then for any sequence of Latin squares L_n, Var(B_n)/n^3 tends to 1/180.

theorem opposed_latin_blocking_variance_tendsto_of_moments
    (C : ℝ)
    (hmean : ∀ (n : ℕ), 2 ≤ n → ∀ (L : Fin n → Fin n → Fin n), latin_square_is L →
      (∑ μ : Equiv.Perm (Fin n),
          (({p : Fin n × Fin n | is_blocking_pair (opposed_latin_market L) μ p.1 p.2}.ncard : ℝ)))
        = (n.factorial : ℝ) * ((n : ℝ) * ((n : ℝ) - 2) / 6))
    (hsecond : ∀ (n : ℕ), 2 ≤ n → ∀ (L : Fin n → Fin n → Fin n), latin_square_is L →
      |(∑ μ : Equiv.Perm (Fin n),
          ((({p : Fin n × Fin n | is_blocking_pair (opposed_latin_market L) μ p.1 p.2}.ncard : ℝ)) ^ 2))
          / (n.factorial : ℝ)
        - ((n : ℝ) ^ 4 / 36 - 19 * (n : ℝ) ^ 3 / 180)| ≤ C * (n : ℝ) ^ 2)
    (L : (n : ℕ) → Fin n → Fin n → Fin n) (hL : ∀ n, latin_square_is (L n)) :
    Filter.Tendsto (fun n : ℕ =>
      (∑ μ : Equiv.Perm (Fin n),
          (({p : Fin n × Fin n |
              is_blocking_pair (opposed_latin_market (L n)) μ p.1 p.2}.ncard : ℝ)
            - (∑ ν : Equiv.Perm (Fin n),
                ({p : Fin n × Fin n |
                  is_blocking_pair (opposed_latin_market (L n)) ν p.1 p.2}.ncard : ℝ)) /
                (n.factorial : ℝ)) ^ 2) / (n.factorial : ℝ) / (n : ℝ) ^ 3)
      Filter.atTop (nhds (1 / 180))
bilateral_trade_grid_approximation_boundIn LeanMechanism Design & Auctions

For every integer K ≥ 2, let grid be the uniform K × K grid on [0,1]² with points (i/(K-1), j/(K-1)) for i, j ∈ {0, ..., K-1}. For any function F : ℝ² → ℝ that is coordinatewise non-decreasing on [0,1]² with values in [0,1], define the expected profit function r(x) = (1 - x₁ - x₂) F(x) and let OPT = max_{x ∈ grid} r(x). Then 0 ≤ sup_{x ∈ [0,1]²} r(x) - OPT ≤ 2/(K-1).

theorem bilateral_trade_grid_approximation_bound (K : ℕ) (hK : 2 ≤ K)
    (F : ℝ × ℝ → ℝ)
    (hF_mono : MonotoneOn F (Set.Icc 0 1 ×ˢ Set.Icc 0 1))
    (hF_range : ∀ x ∈ Set.Icc (0 : ℝ) 1 ×ˢ Set.Icc (0 : ℝ) 1, 0 ≤ F x ∧ F x ≤ 1) :
    let r := fun (x : ℝ × ℝ) => (1 - x.1 - x.2) * F x
    let grid : Finset (ℝ × ℝ) :=
      (Finset.image (fun (i : Fin K) => (i.val : ℝ) / (K - 1 : ℝ)) Finset.univ) ×ˢ
      (Finset.image (fun (i : Fin K) => (i.val : ℝ) / (K - 1 : ℝ)) Finset.univ)
    let s := Set.Icc (0 : ℝ) 1 ×ˢ Set.Icc (0 : ℝ) 1
    ∀ (hgrid : grid.Nonempty),
      let opt := grid.sup' hgrid r
      0 ≤ sSup (r '' s) - opt ∧ sSup (r '' s) - opt ≤ 2 / (K - 1 : ℝ)
bilateral_trade_profit_diff_decompIn LeanMechanism Design & Auctions

For any real-valued function F on ℝ², the profit difference r(x) - r(u) between points x and u decomposes as (1 - x₁ - x₂)(F(x) - F(u)) + (u₁ - x₁ + u₂ - x₂) F(u), where r(x) = (1 - x₁ - x₂) F(x).

theorem bilateral_trade_profit_diff_decomp (F : ℝ × ℝ → ℝ) (x u : ℝ × ℝ) :
    (1 - x.1 - x.2) * F x - (1 - u.1 - u.2) * F u =
      (1 - x.1 - x.2) * (F x - F u) + (u.1 - x.1 + u.2 - x.2) * F u
bilateral_trade_profit_round_diff_leIn LeanMechanism Design & Auctions

For any integer K ≥ 2, any function F : ℝ × ℝ → ℝ, and points x, u ∈ ℝ × ℝ satisfying x₁ + x₂ ≤ 1, F(x) ≤ F(u), 0 ≤ F(u) ≤ 1, 0 ≤ u₁ - x₁ ≤ 1/(K-1), and 0 ≤ u₂ - x₂ ≤ 1/(K-1), it holds that (1 - x₁ - x₂) F(x) - (1 - u₁ - u₂) F(u) ≤ 2/(K-1).

theorem bilateral_trade_profit_round_diff_le (K : ℕ) (hK : 2 ≤ K) (F : ℝ × ℝ → ℝ) (x u : ℝ × ℝ)
    (hx : x.1 + x.2 ≤ 1) (hF_mono : F x ≤ F u) (hFu : F u ≤ 1) (hFu0 : 0 ≤ F u)
    (hu1_ge : 0 ≤ u.1 - x.1) (hu2_ge : 0 ≤ u.2 - x.2)
    (hu1 : u.1 - x.1 ≤ 1 / (K - 1 : ℝ)) (hu2 : u.2 - x.2 ≤ 1 / (K - 1 : ℝ)) :
    (1 - x.1 - x.2) * F x - (1 - u.1 - u.2) * F u ≤ 2 / (K - 1 : ℝ)
bit_persuasion_even_binom_identityIn LeanMechanism Design & Auctions

For any m ≥ 1, (m + 1) * ((2m).choose(m-1) - (2m-2).choose(m-1)) + 3m * ((2m).choose m - (2m-2).choose m) = 3m * (2m).choose m.

open Finset in
lemma bit_persuasion_even_binom_identity (m : ℕ) (hm : 1 ≤ m) :
    ((m + 1 : ℝ) * (((2 * m).choose (m - 1) : ℝ) - ((2 * m - 2).choose (m - 1) : ℝ)) +
      (3 * (m : ℝ)) * (((2 * m).choose m : ℝ) - ((2 * m - 2).choose m : ℝ))) =
      3 * (m : ℝ) * ((2 * m).choose m : ℝ)
bit_persuasion_even_coupling_sumIn LeanMechanism Design & Auctions

For any payoff function g, the expectation under bit_persuasion_even_coupling m equals the average over all s ≠ t of g(v s, v t).

open Finset in
lemma bit_persuasion_even_coupling_sum (m : ℕ)
    (g : (bit_persuasion_even_coord m → Bool) → (bit_persuasion_even_coord m → Bool) → ℝ) :
    ∑ x, ∑ y, bit_persuasion_even_coupling m x y * g x y =
      ∑ s : Fin (2 * m), ∑ t : Fin (2 * m),
        if s ≠ t then 1 / (2 * (m : ℝ) * (2 * (m : ℝ) - 1)) *
          g (bit_persuasion_even_state m s) (bit_persuasion_even_state m t)
        else 0
bit_persuasion_even_scheme_receiver_le_maxIn LeanMechanism Design & Auctions

For any natural number m ≥ 1, if bit_persuasion_even_scheme m is a sender-optimal scheme for bit_persuasion_even_prior m, then its receiver utility is at most persuasion_max_receiver_utility (bit_persuasion_even_prior m).

open Finset in
lemma bit_persuasion_even_scheme_receiver_le_max (m : ℕ) (hm : 1 ≤ m)
    (hopt : is_sender_optimal_scheme (bit_persuasion_even_prior m) (bit_persuasion_even_scheme m)) :
    persuasion_receiver_utility (bit_persuasion_even_scheme m) ≤
      persuasion_max_receiver_utility (bit_persuasion_even_prior m)
bit_persuasion_even_scheme_sender_optimalIn LeanMechanism Design & Auctions

For every natural number m with 2 ≤ m, the pair-OR scheme bit_persuasion_even_scheme m is a sender-optimal obedient scheme for the two-layer prior bit_persuasion_even_prior m.

theorem bit_persuasion_even_scheme_sender_optimal (m : ℕ) (hm : 2 ≤ m) :
    is_sender_optimal_scheme (bit_persuasion_even_prior m) (bit_persuasion_even_scheme m)
bit_persuasion_even_state_or_cardIn LeanMechanism Design & Auctions

For any m ≥ 1 and any distinct s ≠ t in Fin (2m), the cardinality of coordinates where bit_persuasion_even_state m s or bit_persuasion_even_state m t is true is 3m * (2m).choose m.

open Finset in
lemma bit_persuasion_even_state_or_card (m : ℕ) (hm : 1 ≤ m) (s t : Fin (2 * m)) (hst : s ≠ t) :
    ((Finset.univ.filter (fun i : bit_persuasion_even_coord m =>
      (bit_persuasion_even_state m s i || bit_persuasion_even_state m t i) = true)).card : ℝ) =
      3 * (m : ℝ) * ((2 * m).choose m : ℝ)
not_open_problem_1546In LeanMechanism Design & Auctions

The statement open_problem_1546 is false: The first conjunct of the theorem is false for m = 4. It asserts that every bit prior μ supported on at most 2m states satisfies persuasion_max_receiver_utility μ ≤ ((6m - 1)/(4m + 1)) * persuasion_prior_utility μ. For m = 4, the claimed upper bound factor is 23/17 ≈ 1.3529412. However, for non-uniform bit priors supported on 8 states, experiment #23120 provides an explicit 8-state rational prior with 40 coordinate types and prior probabilities [17/200, 137/1000, 13/125, 17/250, 39/250, 147/1000, 53/500, 197/1000] whose sender-optimal scheme achieves an exact receiver utility ratio of 9666430498775 / 7142886093019 ≈ 1.3532948 > 23/17, refuting the bound.

open Finset in
theorem not_open_problem_1546 : ¬ (∀ (m : ℕ) (hm : 1 ≤ m), (∀ (ι : Type*) [Fintype ι] [DecidableEq ι] (μ : (ι → Bool) → ℝ),
      is_bit_prior μ →
      (univ.filter (fun x => μ x ≠ 0)).card ≤ 2 * m →
        persuasion_max_receiver_utility μ ≤
          ((6 * (m : ℝ) - 1) / (4 * (m : ℝ) + 1)) * persuasion_prior_utility μ) ∧
    (2 ≤ m →
      is_sender_optimal_scheme (bit_persuasion_even_prior m) (bit_persuasion_even_scheme m) ∧
      (4 * (m : ℝ) + 1) * persuasion_max_receiver_utility (bit_persuasion_even_prior m) =
        (6 * (m : ℝ) - 1) * persuasion_prior_utility (bit_persuasion_even_prior m)))
redistribution_cosine_kernel_integralIn LeanMechanism Design & Auctions

For every real frequency b, the improper integral over (0,∞) of (1 − cos(b·u))/u² equals π|b|/2. Equivalently, ∫_0^∞ (1−cos(bu))/u² du = π|b|/2, the standard Dirichlet-type cosine kernel integral.

theorem redistribution_cosine_kernel_integral (b : ℝ) :
    (∫ u : ℝ in Set.Ioi (0:ℝ), (1 - Real.cos (b*u)) / u^2) = Real.pi * |b| / 2
redistribution_poisson_inequality_halfplaneIn LeanMechanism Design & Auctions

Half-plane Poisson inequality for the negative log of the empirical characteristic function: for nonnegative reports and every y > 0, the Poisson integral of −log q against the upper half-plane kernel y/(u²+y²) is at most −log‖χ(iy)‖, where q(u) = ‖χ(u)‖² on the real line.

theorem redistribution_poisson_inequality_halfplane {n : ℕ} (hn : 0 < n) (θ : Fin n → ℝ)
    (hθ : ∀ j, 0 ≤ θ j) (y : ℝ) (hy : 0 < y) :
    MeasureTheory.IntegrableOn
        (fun u : ℝ => (-Real.log (redistribution_trade_multiplier θ u)) * (y / (u^2 + y^2)))
        (Set.Ioi 0) ∧
      (1/Real.pi) * (∫ u : ℝ in Set.Ioi (0:ℝ),
          (-Real.log (redistribution_trade_multiplier θ u)) * (y / (u^2 + y^2))) ≤
        -Real.log ‖redistribution_characteristic θ ((y : ℂ)*Complex.I)‖
redistribution_poisson_jensen_log_boundIn LeanMechanism Design & Auctions

Half-plane Poisson–Jensen log bound: for nonnegative reports, −log q over u² is integrable on (0,∞) and (1/π)∫_0^∞ (−log q(u))/u² du ≤ (Σθ)/n, where q = ‖χ‖².

theorem redistribution_poisson_jensen_log_bound {n : ℕ} (hn : 0 < n) (θ : Fin n → ℝ)
    (hθ : ∀ j, 0 ≤ θ j) :
    MeasureTheory.IntegrableOn
        (fun u : ℝ => (-Real.log (redistribution_trade_multiplier θ u))/u^2) (Set.Ioi 0) ∧
      (1/Real.pi) * (∫ u : ℝ in Set.Ioi (0:ℝ),
          (-Real.log (redistribution_trade_multiplier θ u))/u^2) ≤ (∑ j, θ j)/n
redistribution_residual_power_integrableIn LeanMechanism Design & Auctions

For every natural number m ≥ 1 and every report profile θ on a nonempty player set, the function u ↦ (1 − q(u))^m / u² is integrable on (0, ∞), where q is the squared empirical multiplier. (For m = 0 the function 1/u² is not integrable near 0, so the hypothesis m ≥ 1 is essential.)

theorem redistribution_residual_power_integrable {n : ℕ} (hn : 0 < n) (θ : Fin n → ℝ)
    (m : ℕ) (hm : 1 ≤ m) :
    MeasureTheory.IntegrableOn (fun u : ℝ => (1 - redistribution_trade_multiplier θ u)^m / u^2) (Set.Ioi 0)
redistribution_residual_power_integral_le_logIn LeanMechanism Design & Auctions

For m ≥ 1 and nonnegative reports, ∫_0^∞ (1 − q(u))^m/u² du ≤ (1/H_m)∫_0^∞ (−log q(u))/u² du, where H_m is the m-th harmonic number.

theorem redistribution_residual_power_integral_le_log {n : ℕ} (hn : 0 < n) (θ : Fin n → ℝ)
    (m : ℕ) (hm : 1 ≤ m) (hθ : ∀ j, 0 ≤ θ j) :
    (∫ u : ℝ in Set.Ioi (0:ℝ), (1 - redistribution_trade_multiplier θ u)^m / u^2) ≤
      (1/(harmonic m : ℝ)) * (∫ u : ℝ in Set.Ioi (0:ℝ),
        (-Real.log (redistribution_trade_multiplier θ u))/u^2)
redistribution_shortfall_cosine_representationIn LeanMechanism Design & Auctions

The shortfall function G(t) = max(1 − t, 0) equals |t−1|/2 − (t−1)/2, equivalently (1/π)∫_0^∞ (1 − cos((t−1)u))/u² du − (t−1)/2.

theorem redistribution_shortfall_cosine_representation (t : ℝ) :
    redistribution_shortfall t =
      (1/Real.pi) * (∫ u : ℝ in Set.Ioi (0:ℝ), (1 - Real.cos ((t-1)*u))/u^2) - (t-1)/2
redistribution_trade_cosineIn LeanMechanism Design & Auctions

Every cosine at a fixed frequency is an eigenfunction of the symmetric trade operator, with the squared empirical multiplier. The phase center c is arbitrary; no nonempty or report bounds are needed.

theorem redistribution_trade_cosine {n : ℕ} (θ : Fin n → ℝ) (u c t : ℝ) :
    redistribution_trade θ (fun x => Real.cos ((x-c)*u)) t =
      redistribution_trade_multiplier θ u * Real.cos ((t-c)*u)
redistribution_trade_error_cosine_representationIn LeanMechanism Design & Auctions

The m-th order residual error evaluated at s equals −(1/π)∫_0^∞ (1 − q(u))^m cos((s−1)u)/u² du, where q is the squared empirical multiplier (the paper's equation (22)).

theorem redistribution_trade_error_cosine_representation {n : ℕ} (hn : 0 < n) (θ : Fin n → ℝ)
    (m : ℕ) (hm : 1 ≤ m) (s : ℝ) :
    redistribution_trade_error θ m s =
      -(1/Real.pi) * (∫ u : ℝ in Set.Ioi (0:ℝ),
        (1 - redistribution_trade_multiplier θ u)^m * Real.cos ((s-1)*u) / u^2)
redistribution_trade_multiplier_boundsIn LeanMechanism Design & Auctions

The squared empirical characteristic multiplier lies in [0,1]. Reports may be arbitrary real numbers; only nonemptiness of the finite profile is needed.

theorem redistribution_trade_multiplier_bounds {n : ℕ} (hn : 0 < n)
    (θ : Fin n → ℝ) (u : ℝ) :
    0 ≤ redistribution_trade_multiplier θ u ∧ redistribution_trade_multiplier θ u ≤ 1
redistribution_trade_multiplier_pos_aeIn LeanMechanism Design & Auctions

For a nonempty finite report profile, the empirical multiplier is positive almost everywhere for Lebesgue measure, although it can vanish at isolated points. No report bounds are needed.

theorem redistribution_trade_multiplier_pos_ae {n : ℕ} (hn : 0 < n)
    (θ : Fin n → ℝ) :
    ∀ᵐ u : ℝ, 0 < redistribution_trade_multiplier θ u
redistribution_trade_residual_cosineIn LeanMechanism Design & Auctions

Iterating the residual operator on a cosine multiplies it by the m-th power of one minus the trade multiplier.

theorem redistribution_trade_residual_cosine {n : ℕ} (θ : Fin n → ℝ)
    (m : ℕ) (u c t : ℝ) :
    ((fun (f : ℝ → ℝ) (x : ℝ) => f x - redistribution_trade θ f x)^[m]
      (fun x => Real.cos ((x-c)*u))) t =
        (1-redistribution_trade_multiplier θ u)^m * Real.cos ((t-c)*u)
two_facility_closest_pair_cost_leIn LeanMechanism Design & Auctions

For an agent at y and candidate set C, if t is a closest candidate to y in C and s is a closest candidate to y in C.erase t, then the pair {t,s} minimises the sum of both distances: dist y t + dist y s ≤ dist y (o 0) + dist y (o 1) for every feasible candidate pair o.

theorem two_facility_closest_pair_cost_le
    {X : Type*} [MetricSpace X] [DecidableEq X] (C : Finset X) (y : X)
    (t s : X) (ht : IsClosestCandidate C y t) (hs : IsClosestCandidate (C.erase t) y s)
    (o : Fin 2 → X) (ho : IsTwoFacilityFeasible C o) :
    dist y t + dist y s ≤ dist y (o 0) + dist y (o 1)
two_facility_dictator_mechanism_ratio_threeIn LeanMechanism Design & Auctions

If some agent approves both facilities, or all agents approve only the single facility k (and someone approves it), then there is a deterministic mechanism that is strategyproof for p, always outputs two distinct candidates, and has max-cost ratio at most 3.

theorem two_facility_dictator_mechanism_ratio_three
    {X : Type*} [MetricSpace X] [DecidableEq X] (C : Finset X) (hC : 2 ≤ C.card)
    {ι : Type*} [DecidableEq ι] [Fintype ι] [Nonempty ι]
    (p : ι → Fin 2 → Bool) (hp : ∀ i, p i 0 = true ∨ p i 1 = true)
    (hcase : (∃ i, p i 0 = true ∧ p i 1 = true) ∨
      (∃ k : Fin 2, (∀ a, p a (1 - k) = false) ∧ (∃ i, p i k = true))) :
    ∃ mech : (ι → X) → Fin 2 → X,
      IsTwoFacilityStrategyproof p mech ∧
      (∀ x : ι → X, IsTwoFacilityFeasible C (mech x)) ∧
      (∀ (x : ι → X) (o : Fin 2 → X), IsTwoFacilityFeasible C o →
        two_facility_max_cost x p (mech x) ≤ 3 * two_facility_max_cost x p o)
two_facility_guarded_theta_arithmeticIn LeanMechanism Design & Auctions

Lemma 4.18 of arXiv:2610.18006 in variable form. Let A = d(i_j,t(i_j)), B = d(i_j,s(i_j)), M = MC(o) ≥ A and D a distance from the first facility to a candidate c that is discarded for a parameter θ ∈ [1,4/3], meaning 2B ≤ θ(A+B) and D ≤ (1+θ)(A+B). Then B ≤ θM/(2-θ), A+B ≤ 2M/(2-θ) and D ≤ 2(1+θ)M/(2-θ).

theorem two_facility_guarded_theta_arithmetic
    (A B D θ M : ℝ) (_ : 0 ≤ A) (_ : 0 ≤ B) (_ : 0 ≤ M)
    (_ : 1 ≤ θ) (_ : θ ≤ 4 / 3) (_ : A ≤ M)
    (_ : 2 * B ≤ θ * (A + B))
    (_ : D ≤ (1 + θ) * (A + B)) :
    B ≤ θ * M / (2 - θ) ∧ A + B ≤ 2 * M / (2 - θ) ∧
      D ≤ 2 * (1 + θ) * M / (2 - θ)
two_facility_max_cost_le_of_first_facilityIn LeanMechanism Design & Auctions

Equation (9) of arXiv:2610.18006 in the two-facility setting, general k. In a singleton profile, suppose facility k is placed at a closest candidate w_k of an agent i approving k, and facility 1-k is placed at a closest candidate w_{1-k} of an agent j approving 1-k subject to the single restriction that some candidate c ≠ w_k is still available (dist (x j) (w (1-k)) ≤ dist (x j) c). Then the max cost of w is at most max(3·MC(o), 2·MC(o) + dist (x j) c).

theorem two_facility_max_cost_le_of_first_facility
    {X : Type*} [MetricSpace X] (C : Finset X)
    {ι : Type*} [Fintype ι] [Nonempty ι]
    (x : ι → X) (p : ι → Fin 2 → Bool)
    (hp : ∀ a, p a 0 = true ∨ p a 1 = true)
    (hnd : ∀ a, ¬(p a 0 = true ∧ p a 1 = true))
    (k : Fin 2) (i : ι) (hi : p i k = true)
    (w : Fin 2 → X) (hw : IsClosestCandidate C (x i) (w k))
    (j : ι) (hj : p j (1 - k) = true)
    (c : X) (hc : c ∈ C) (hcne : c ≠ w k)
    (hw1 : dist (x j) (w (1 - k)) ≤ dist (x j) c)
    (o : Fin 2 → X) (ho : IsTwoFacilityFeasible C o) :
    two_facility_max_cost x p w ≤
      max (3 * two_facility_max_cost x p o) (2 * two_facility_max_cost x p o + dist (x j) c)
two_facility_ratio_assemblyIn LeanMechanism Design & Auctions

If every approval profile falls into one of two cases — one handled by a ratio-3 deterministic mechanism, and the singleton case handled with some α_sing < 19/5 — then the original existential statement with α < 19/5 holds.

theorem two_facility_ratio_assembly
    (hsing : ∃ α : ℝ, α < 19 / 5 ∧
      ∀ {X : Type*} [MetricSpace X] (C : Finset X) (_ : 2 ≤ C.card)
        {ι : Type*} [DecidableEq ι] [Fintype ι] [Nonempty ι] (_ : 2 ≤ Fintype.card ι)
        (p : ι → Fin 2 → Bool)
        (_ : ∀ i, (p i 0 = true ∨ p i 1 = true) ∧ ¬(p i 0 = true ∧ p i 1 = true))
        (_ : ∃ i, p i 0 = true) (_ : ∃ i, p i 1 = true),
        ∃ (K : Type) (_ : Fintype K) (_ : Nonempty K)
          (M : TwoFacilityUniversalMechanism C p K),
          TwoFacilityUniversalMechanismHasApproxRatio M α) :
    ∃ α : ℝ, α < 19 / 5 ∧
      ∀ {X : Type*} [MetricSpace X] (C : Finset X) (_ : 2 ≤ C.card)
        {ι : Type*} [DecidableEq ι] [Fintype ι] [Nonempty ι] (_ : 2 ≤ Fintype.card ι)
        (p : ι → Fin 2 → Bool) (_ : ∀ i, p i 0 = true ∨ p i 1 = true),
        ∃ (K : Type) (_ : Fintype K) (_ : Nonempty K)
          (M : TwoFacilityUniversalMechanism C p K), TwoFacilityUniversalMechanismHasApproxRatio M α
two_facility_serial_dictator_strategyproofIn LeanMechanism Design & Auctions

In a singleton profile (no agent approves both facilities), fix two anchors, one approving facility k and one approving facility 1-k. The serial mechanism that places facility k at a closest candidate to the first anchor and facility 1-k at a closest candidate, avoiding the first placed location, to the second anchor is strategyproof: the anchor whose facility is placed first gets a location minimising her own distance and does not care where the other facility goes, while the second anchor's available set does not depend on her report and she gets the best available location.

theorem two_facility_serial_dictator_strategyproof
    {X : Type*} [MetricSpace X] [DecidableEq X] (C : Finset X)
    {ι : Type*} [DecidableEq ι] (p : ι → Fin 2 → Bool)
    (hnd : ∀ a, ¬(p a 0 = true ∧ p a 1 = true))
    (anchor : Fin 2 → ι) (k : Fin 2)
    (hk : p (anchor k) k = true) (hk' : p (anchor (1 - k)) (1 - k) = true)
    (f : X → X) (hf : ∀ y, IsClosestCandidate C y (f y))
    (g : X → X → X) (hg : ∀ y z, IsClosestCandidate (C.erase (f y)) z (g y z)) :
    IsTwoFacilityStrategyproof p
      (fun x (j : Fin 2) =>
        if j = k then f (x (anchor k)) else g (x (anchor k)) (x (anchor (1 - k))))
two_facility_singleton_universal_ratio_below_19_5In LeanMechanism Design & Auctions

There is a single α < 19/5 such that in every singleton-approval instance (no agent approves both facilities, both groups nonempty, at least two agents, at least two candidates) on any metric space there is a finite nonempty K and a universally strategyproof mechanism with max-cost ratio α.

theorem two_facility_singleton_universal_ratio_below_19_5 :
    ∃ α : ℝ, α < 19 / 5 ∧
      ∀ {X : Type*} [MetricSpace X] (C : Finset X) (_ : 2 ≤ C.card)
        {ι : Type*} [DecidableEq ι] [Fintype ι] [Nonempty ι] (_ : 2 ≤ Fintype.card ι)
        (p : ι → Fin 2 → Bool)
        (_ : ∀ i, (p i 0 = true ∨ p i 1 = true) ∧ ¬(p i 0 = true ∧ p i 1 = true))
        (_ : ∃ i, p i 0 = true) (_ : ∃ i, p i 1 = true),
        ∃ (K : Type*) (_ : Fintype K) (_ : Nonempty K)
          (M : TwoFacilityUniversalMechanism C p K),
          TwoFacilityUniversalMechanismHasApproxRatio M α
two_facility_universal_of_deterministicIn LeanMechanism Design & Auctions

Packaging lemma: if a single deterministic mechanism mech is feasible in C, strategyproof for p, and α-approximates the max cost, then there is a finite nonempty index type K (namely PUnit) and a universally strategyproof mechanism M : TwoFacilityUniversalMechanism C p K with TwoFacilityUniversalMechanismHasApproxRatio M α.

theorem two_facility_universal_of_deterministic
    {ι : Type*} [DecidableEq ι] [Fintype ι] [Nonempty ι]
    {X : Type*} [MetricSpace X] {C : Finset X} {p : ι → Fin 2 → Bool}
    (mech : (ι → X) → Fin 2 → X)
    (hfeas : ∀ x, IsTwoFacilityFeasible C (mech x))
    (hsp : IsTwoFacilityStrategyproof p mech) (α : ℝ)
    (hratio : ∀ (x : ι → X) (o : Fin 2 → X), IsTwoFacilityFeasible C o →
      two_facility_max_cost x p (mech x) ≤ α * two_facility_max_cost x p o) :
    ∃ (K : Type) (_ : Fintype K) (_ : Nonempty K)
      (M : TwoFacilityUniversalMechanism C p K),
      TwoFacilityUniversalMechanismHasApproxRatio M α
condorcet_dimension_le_three_balancedIn LeanSocial Choice Theory

Open sub-problem: every election with at least one voter and at least one candidate in which every set of three candidates is the top choice of at most half of the voters has a Condorcet winning set of size at most three.

theorem condorcet_dimension_le_three_balanced (n m : ℕ) (P : Fin n → Equiv.Perm (Fin m))
    (hn : 0 < n) (hm : 0 < m)
    (hbal : ∀ S : Finset (Fin m), S.card = 3 →
      2 * (Finset.univ.filter fun v => (P v).symm ⟨0, hm⟩ ∈ S).card ≤ n) :
    ∃ S : Finset (Fin m), S.card ≤ 3 ∧ is_condorcet_winning_set P S
condorcet_dimension_le_three_balanced_of_six_leIn LeanSocial Choice Theory

Every election with at least 6 candidates and at least one voter in which every 3-set of candidates has at most n/2 top choices has a Condorcet winning set of size at most 3.

theorem condorcet_dimension_le_three_balanced_of_six_le (n m : ℕ) (P : Fin n → Equiv.Perm (Fin m))
    (hn : 0 < n) (hm : 6 ≤ m)
    (hbal : ∀ S : Finset (Fin m), S.card = 3 →
      2 * (Finset.univ.filter fun v => (P v).symm ⟨0, by omega⟩ ∈ S).card ≤ n) :
    ∃ S : Finset (Fin m), S.card ≤ 3 ∧ is_condorcet_winning_set P S
ejr_chain_residual_profileIn LeanSocial Choice Theory

Residual case of the EJR-chain problem: if every candidate is approved by at least an n/m fraction of the voters and every ballot is nonempty with at most m-2 candidates, then an EJR chain exists. This is the open crux left after the two profile reductions.

theorem ejr_chain_residual_profile (n m : ℕ) (A : Fin n → Finset (Fin m)) (hn : 0 < n)
    (hdense : ∀ c : Fin m, n ≤ m * (Finset.univ.filter fun i => c ∈ A i).card)
    (hnonempty : ∀ i, A i ≠ ∅)
    (hsmall : ∀ i, (A i).card ≤ m - 2) :
    ∃ σ : Equiv.Perm (Fin m), ∀ k, k ≤ m →
      is_ejr_committee A k (Finset.univ.filter fun c => (σ c : ℕ) < k)
ejr_chain_two_voters_ordering_existsIn LeanSocial Choice Theory

For two approval ballots on m candidates, there is a permutation σ of Fin m such that every prefix W_k = {c | σ c < k} has size k, contains (or is contained in) A 0 ∩ A 1 according to whether k ≥ |A 0 ∩ A 1|, and satisfies k ≤ 2 * |A i ∩ W_k| + 1 whenever voter i is not fully satisfied.

theorem ejr_chain_two_voters_ordering_exists {m : ℕ} (A : Fin 2 → Finset (Fin m)) :
    ∃ σ : Equiv.Perm (Fin m), ∀ k, k ≤ m →
      let W := Finset.univ.filter fun c => (σ c : ℕ) < k
      W.card = k ∧
      (k ≤ (A 0 ∩ A 1).card → W ⊆ A 0 ∩ A 1) ∧
      ((A 0 ∩ A 1).card ≤ k → A 0 ∩ A 1 ⊆ W) ∧
      ((A 0 ∩ W).card < (A 0).card → k ≤ 2 * (A 0 ∩ W).card + 1) ∧
      ((A 1 ∩ W).card < (A 1).card → k ≤ 2 * (A 1 ∩ W).card + 1)
exists_cascade_tie_breaking_prefIn LeanSocial Choice Theory

For the cascade agent configuration at 0, 1, ..., n-2, n - 3/2, there exists a preference profile sorting items by distance with ties broken toward smaller index items.

theorem exists_cascade_tie_breaking_pref (n : ℕ) :
    ∃ pref : Fin n → Equiv.Perm (Fin n),
      ∀ (i k k' : Fin n), k < k' →
        |((if i.val < n - 1 then (i : ℝ) else (n : ℝ) - 3 / 2) - ((pref i k : Fin n) : ℝ))| <
          |((if i.val < n - 1 then (i : ℝ) else (n : ℝ) - 3 / 2) - ((pref i k' : Fin n) : ℝ))| ∨
        (|((if i.val < n - 1 then (i : ℝ) else (n : ℝ) - 3 / 2) - ((pref i k : Fin n) : ℝ))| =
          |((if i.val < n - 1 then (i : ℝ) else (n : ℝ) - 3 / 2) - ((pref i k' : Fin n) : ℝ))| ∧
          pref i k < pref i k')
line_min_matching_cost_cascadeIn LeanSocial Choice Theory

The minimum matching cost for the cascade agent configuration at 0, 1, ..., n-2, n - 3/2 and equispaced items at 0, 1, ..., n-1 is exactly 1/2.

theorem line_min_matching_cost_cascade (n : ℕ) (hn : 2 ≤ n) :
    line_min_matching_cost
      (fun (i : Fin n) => if i.val < n - 1 then (i : ℝ) else (n : ℝ) - 3 / 2)
      (fun (j : Fin n) => (j : ℝ)) = 1 / 2
plackett_luce_entropy_asymptotic_const_oneIn LeanSocial Choice Theory

The first conjunct of the target in the special case of the constant weight profile w = 1 (equivalently w(i/n) = 1).

theorem plackett_luce_entropy_asymptotic_const_one :
    Filter.Tendsto (fun n : ℕ =>
      (plackett_luce_entropy (fun _ : ℕ => (1 : ℝ)) (Finset.range n) - (n : ℝ) * Real.log (n : ℝ)) / (n : ℝ))
      Filter.atTop (nhds (plackett_luce_limiting_entropy_offset (fun _ : ℝ => (1 : ℝ))))
plackett_luce_entropy_const_oneIn LeanSocial Choice Theory

For the constant weight profile, all n! rankings are equally likely, so the Plackett-Luce entropy on n items is log(n!).

theorem plackett_luce_entropy_const_one (n : ℕ) :
    plackett_luce_entropy (fun _ : ℕ => (1 : ℝ)) (Finset.range n) = Real.log ((Nat.factorial n : ℕ) : ℝ)
plackett_luce_entropy_eq_expectation_partial_weightsIn LeanSocial Choice Theory

The Plackett-Luce entropy on {0,...,n-1} is the expectation, under the Plackett-Luce law, of the sum of the logarithms of the partial remaining weight sums, minus the sum of the logarithms of the weights.

lemma plackett_luce_entropy_eq_expectation_partial_weights (w : ℕ → ℝ) (n : ℕ)
    (hw : ∀ i ∈ Finset.range n, 0 < w i) :
    plackett_luce_entropy w (Finset.range n) =
      (∑ l ∈ rankings_of (Finset.range n), plackett_luce_prob w l *
        (∑ k ∈ Finset.range n, Real.log (∑ j ∈ (l.drop k).toFinset, w j))) -
          ∑ i ∈ Finset.range n, Real.log (w i)
plackett_luce_laplace_profile_riemann_uniformIn LeanSocial Choice Theory

The finite-n Laplace sums (1/n) Σ_{i<n} w(i/n) exp(-t w(i/n)) converge to the Laplace profile L(t) = ∫_0^1 w(x) exp(-t w(x)) dx, uniformly in t ≥ 0 and with an error O(1/n) in the un-normalised sums.

theorem plackett_luce_laplace_profile_riemann_uniform (w : ℝ → ℝ)
    (hw_diff : ContDiffOn ℝ 1 w (Set.Icc (0 : ℝ) 1))
    (hw_pos : ∀ x ∈ Set.Icc (0 : ℝ) 1, 0 < w x) :
    ∃ C : ℝ, 0 ≤ C ∧ ∀ (n : ℕ), 0 < n → ∀ t : ℝ, 0 ≤ t →
      |(∑ i ∈ Finset.range n, w ((i : ℝ) / (n : ℝ)) * Real.exp (-t * w ((i : ℝ) / (n : ℝ))))
        - (n : ℝ) * plackett_luce_laplace_profile w t| ≤ C
plackett_luce_limiting_entropy_offset_const_oneIn LeanSocial Choice Theory

For the constant weight profile w = 1, the limiting entropy offset is -1.

theorem plackett_luce_limiting_entropy_offset_const_one :
    plackett_luce_limiting_entropy_offset (fun _ : ℝ => (1 : ℝ)) = -1
plackett_luce_log_factorial_asymptoticIn LeanSocial Choice Theory

Stirling's formula in the normalised form used by the entropy limit: (log(n!) - n log n)/n tends to -1 along atTop.

theorem plackett_luce_log_factorial_asymptotic :
    Filter.Tendsto (fun n : ℕ => (Real.log ((Nat.factorial n : ℕ) : ℝ) - (n : ℝ) * Real.log (n : ℝ)) / (n : ℝ))
      Filter.atTop (nhds (-1))
plackett_luce_log_weight_riemann_sumIn LeanSocial Choice Theory

The left Riemann sums of log w over the uniform grid i/n converge: (1/n) Σ_{i<n} log w(i/n) tends to the integral of log w over [0,1].

theorem plackett_luce_log_weight_riemann_sum (w : ℝ → ℝ)
    (hw_cont : ContinuousOn w (Set.Icc (0 : ℝ) 1))
    (hw_pos : ∀ x ∈ Set.Icc (0 : ℝ) 1, 0 < w x) :
    Filter.Tendsto (fun n : ℕ => (∑ i ∈ Finset.range n, Real.log (w ((i : ℝ) / (n : ℝ)))) / (n : ℝ))
      Filter.atTop (nhds (∫ x in Set.Icc (0 : ℝ) 1, Real.log (w x)))
plackett_luce_prob_posIn LeanSocial Choice Theory

With positive weights, every ranking of S has strictly positive Plackett-Luce probability.

lemma plackett_luce_prob_pos (w : ℕ → ℝ) (S : Finset ℕ) (l : List ℕ)
    (hl : l ∈ rankings_of S) (hw : ∀ b ∈ S, 0 < w b) : 0 < plackett_luce_prob w l
plackett_luce_profile_entropy_asymptoticIn LeanSocial Choice Theory

First half of the target, isolated: (H_n - n log n)/n tends to the limiting entropy offset mu(w).

theorem plackett_luce_profile_entropy_asymptotic (w : ℝ → ℝ)
    (hw_diff : ContDiffOn ℝ 1 w (Set.Icc (0 : ℝ) 1))
    (hw_pos : ∀ x ∈ Set.Icc (0 : ℝ) 1, 0 < w x) :
    Filter.Tendsto (fun n : ℕ =>
      (plackett_luce_entropy (fun i => w ((i : ℝ) / (n : ℝ))) (Finset.range n) - (n : ℝ) * Real.log (n : ℝ)) / (n : ℝ))
      Filter.atTop (nhds (plackett_luce_limiting_entropy_offset w))
plackett_luce_profile_surprisal_weak_convergenceIn LeanSocial Choice Theory

Second half of the target, isolated: the standardized surprisal measure converges weakly to the centred Gaussian with variance V(w).

theorem plackett_luce_profile_surprisal_weak_convergence (w : ℝ → ℝ)
    (hw_diff : ContDiffOn ℝ 1 w (Set.Icc (0 : ℝ) 1))
    (hw_pos : ∀ x ∈ Set.Icc (0 : ℝ) 1, 0 < w x) :
    ∀ f : BoundedContinuousFunction ℝ ℝ,
      Filter.Tendsto (fun n : ℕ =>
        ∫ x, f x ∂(plackett_luce_surprisal_measure (fun i => w ((i : ℝ) / (n : ℝ))) n))
        Filter.atTop (nhds (∫ x, f x ∂(ProbabilityTheory.gaussianReal 0 (Real.toNNReal (plackett_luce_surprisal_variance_profile w)))))
plackett_luce_surprisal_eq_sum_log_partial_weightsIn LeanSocial Choice Theory

Pathwise surprisal identity: the surprisal -log P(l) of a ranking l of {0,...,n-1} equals the sum over the positions k of the logarithm of the total remaining weight of the items ranked at position k or later, minus the sum of the logarithms of all the weights.

lemma plackett_luce_surprisal_eq_sum_log_partial_weights (w : ℕ → ℝ) (n : ℕ) (l : List ℕ)
    (hl : l ∈ rankings_of (Finset.range n)) (hw : ∀ i ∈ Finset.range n, 0 < w i) :
    -Real.log (plackett_luce_prob w l) =
      (∑ k ∈ Finset.range n, Real.log (∑ j ∈ (l.drop k).toFinset, w j)) -
        ∑ i ∈ Finset.range n, Real.log (w i)
plackett_luce_surprisal_measure_const_oneIn LeanSocial Choice Theory

For the constant weight profile w = 1 all rankings have equal probability, so the standardized surprisal is identically 0 and the standardized surprisal measure is the Dirac mass at 0.

theorem plackett_luce_surprisal_measure_const_one (n : ℕ) :
    plackett_luce_surprisal_measure (fun _ : ℕ => (1 : ℝ)) n = MeasureTheory.Measure.dirac 0
plackett_luce_surprisal_measure_integralIn LeanSocial Choice Theory

Integrating against the standardized surprisal measure is the finite sum over rankings of the probability times f evaluated at the standardized surprisal.

theorem plackett_luce_surprisal_measure_integral (w : ℕ → ℝ) (n : ℕ) (f : ℝ → ℝ) :
    ∫ x, f x ∂(plackett_luce_surprisal_measure w n) =
      ∑ l ∈ rankings_of (Finset.range n), plackett_luce_prob w l *
        f ((-Real.log (plackett_luce_prob w l) - plackett_luce_entropy w (Finset.range n)) / Real.sqrt (n : ℝ))
plurality_veto_core_containmentIn LeanSocial Choice Theory

For all m ≥ 3 and n ≥ max(8, m), for any election profile on n voters and m candidates and any 0 < ε < plurality_regularization_threshold n m, the regularized plurality veto core at strength ε is contained in the base unregularized core at strength 0.

theorem plurality_veto_core_containment (m n : ℕ) (hm : 3 ≤ m) (hn : max 8 m ≤ n)
    (prof : Fin n → LinearOrder (Fin m)) (ε : ℝ)
    (hε_pos : 0 < ε) (hε_lt : ε < plurality_regularization_threshold n m) (a : Fin m) :
    in_regularized_plurality_veto_core prof ε a → in_regularized_plurality_veto_core prof 0 a
plurality_veto_core_containment_of_small_epsilonIn LeanSocial Choice Theory

For m ≥ 3 and n ≥ 1, if ε ≥ 0 and ε·(m−1)·n < 1, then every candidate in the regularized plurality veto core at strength ε is also in the unregularized core. In particular the core at strength ε is contained in the base core, which is what the exact-threshold target asserts for the strictly smaller range ε < 1/((m−1)n) (note 1/((m−1)n) < 1/((m−2)n − 2m)).

theorem plurality_veto_core_containment_of_small_epsilon {m n : ℕ} (hm : 3 ≤ m) (hn : 1 ≤ n)
    (prof : Fin n → LinearOrder (Fin m)) {ε : ℝ} (hε0 : 0 ≤ ε)
    (hε : ε * ((m : ℝ) - 1) * n < 1) (a : Fin m)
    (ha : in_regularized_plurality_veto_core prof ε a) :
    in_regularized_plurality_veto_core prof 0 a
plurality_veto_core_membership_iff_countIn LeanSocial Choice Theory

For ε ≥ 0 and at least one voter, a candidate a lies in the regularized plurality veto core at strength ε if and only if for every set N of candidates, k(N) minus the total plurality score of N is at most (n·|N| − m·k(N))·ε, where k(N) is the number of voters whose veto down-set below a lies inside N.

theorem plurality_veto_core_membership_iff_count {V C : Type*} [Fintype V] [Fintype C] [DecidableEq C]
    (prof : V → LinearOrder C) (a : C) {ε : ℝ} (hε : 0 ≤ ε) (hV : 0 < Fintype.card V) :
    in_regularized_plurality_veto_core prof ε a ↔
      ∀ N : Finset C, (plurality_veto_inside_count prof a N : ℝ) - (∑ c ∈ N, (plurality_votes prof c : ℝ))
        ≤ ((Fintype.card V : ℝ) * N.card - (Fintype.card C : ℝ) * (plurality_veto_inside_count prof a N : ℝ)) * ε
plurality_veto_core_sharpnessIn LeanSocial Choice Theory

For all m ≥ 3 and n ≥ max(8, m), there exists a profile on n voters and m candidates with a candidate in the regularized plurality veto core at the regularization threshold 1/((m-2)n - 2m) who is not in the unregularized core at strength 0.

theorem plurality_veto_core_sharpness (m n : ℕ) (hm : 3 ≤ m) (hn : max 8 m ≤ n) :
    ∃ (prof : Fin n → LinearOrder (Fin m)) (a : Fin m),
      in_regularized_plurality_veto_core prof (plurality_regularization_threshold n m) a ∧
      ¬ in_regularized_plurality_veto_core prof 0 a
plurality_veto_core_threshold_of_extremalIn LeanSocial Choice Theory

Fix m ≥ 3 and n ≥ max(8,m). If (i) every profile with some violating candidate set also has one satisfying the tight inequality n·|N| − m·k(N) ≤ ((m−2)n − 2m)(k(N) − ℓ(N)), and (ii) there is a profile and candidate with a violating set and the reverse inequality for all sets, then the exact regularization threshold conclusion holds for this (m,n): containment for all 0 < ε < plurality_regularization_threshold n m and sharpness at the threshold.

theorem plurality_veto_core_threshold_of_extremal (m n : ℕ) (hm : 3 ≤ m) (hn : max 8 m ≤ n)
    (htight : ∀ (prof : Fin n → LinearOrder (Fin m)) (a : Fin m),
      (∃ N : Finset (Fin m), (∑ c ∈ N, plurality_votes prof c) < plurality_veto_inside_count prof a N) →
      ∃ N : Finset (Fin m), (∑ c ∈ N, plurality_votes prof c) < plurality_veto_inside_count prof a N ∧
        (n : ℝ) * N.card - (m : ℝ) * (plurality_veto_inside_count prof a N : ℝ)
          ≤ (((m : ℝ) - 2) * n - 2 * m) * ((plurality_veto_inside_count prof a N : ℝ) - (∑ c ∈ N, (plurality_votes prof c : ℝ))))
    (hwit : ∃ (prof : Fin n → LinearOrder (Fin m)) (a : Fin m),
      (∃ N : Finset (Fin m), (∑ c ∈ N, plurality_votes prof c) < plurality_veto_inside_count prof a N) ∧
      ∀ N : Finset (Fin m), (((m : ℝ) - 2) * n - 2 * m) * ((plurality_veto_inside_count prof a N : ℝ) - (∑ c ∈ N, (plurality_votes prof c : ℝ))) ≤ (n : ℝ) * N.card - (m : ℝ) * (plurality_veto_inside_count prof a N : ℝ)) :
    (∀ (prof : Fin n → LinearOrder (Fin m)) (ε : ℝ), 0 < ε → ε < plurality_regularization_threshold n m →
      ∀ a : Fin m, in_regularized_plurality_veto_core prof ε a → in_regularized_plurality_veto_core prof 0 a) ∧
    (∃ (prof : Fin n → LinearOrder (Fin m)) (a : Fin m),
      in_regularized_plurality_veto_core prof (plurality_regularization_threshold n m) a ∧
      ¬ in_regularized_plurality_veto_core prof 0 a)
plurality_veto_core_threshold_witnessIn LeanSocial Choice Theory

For m ≥ 3 and n ≥ max(8,m) there is a profile on n voters and m candidates and a candidate a having a set N with more veto-down-set voters than plurality score, while for every set N one has ((m−2)n − 2m)(k(N) − ∑_{c∈N} votes) ≤ n·|N| − m·k(N). This is the sharpness half: at ε = 1/((m−2)n − 2m) it puts a in the regularized core but not in the base core.

theorem plurality_veto_core_threshold_witness {m n : ℕ} (hm : 3 ≤ m) (hn : max 8 m ≤ n) :
    ∃ (prof : Fin n → LinearOrder (Fin m)) (a : Fin m),
      (∃ N : Finset (Fin m), (∑ c ∈ N, plurality_votes prof c) < plurality_veto_inside_count prof a N) ∧
      ∀ N : Finset (Fin m), (((m : ℝ) - 2) * n - 2 * m) * ((plurality_veto_inside_count prof a N : ℝ) - (∑ c ∈ N, (plurality_votes prof c : ℝ))) ≤ (n : ℝ) * N.card - (m : ℝ) * (plurality_veto_inside_count prof a N : ℝ)
plurality_veto_core_tight_of_small_setIn LeanSocial Choice Theory

For m ≥ 3 and n ≥ max(8,m), if a candidate set N has more veto-down-set voters than plurality score (∑_{c∈N} votes < k(N)), has at most m−2 elements, and k(N) ≥ 2, then n·|N| − m·k(N) ≤ ((m−2)n − 2m)(k(N) − ∑_{c∈N} votes).

theorem plurality_veto_core_tight_of_small_set {m n : ℕ} (hm : 3 ≤ m) (hn : max 8 m ≤ n)
    (prof : Fin n → LinearOrder (Fin m)) (a : Fin m) (N : Finset (Fin m))
    (hviol : (∑ c ∈ N, plurality_votes prof c) < plurality_veto_inside_count prof a N)
    (hcard : N.card ≤ m - 2)
    (hk : 2 ≤ plurality_veto_inside_count prof a N) :
    (n : ℝ) * N.card - (m : ℝ) * (plurality_veto_inside_count prof a N : ℝ)
      ≤ (((m : ℝ) - 2) * n - 2 * m) * ((plurality_veto_inside_count prof a N : ℝ) - (∑ c ∈ N, (plurality_votes prof c : ℝ)))
plurality_veto_core_tight_set_existsIn LeanSocial Choice Theory

For m ≥ 3 and n ≥ max(8,m): if for some profile and candidate a there is a candidate set N with more veto-down-set voters than plurality score, then there is such an N which additionally satisfies n·|N| − m·k(N) ≤ ((m−2)n − 2m)(k(N) − ∑_{c∈N} votes). This is the sharp extremal inequality behind the threshold 1/((m−2)n − 2m); it is the containment half of the target.

theorem plurality_veto_core_tight_set_exists {m n : ℕ} (hm : 3 ≤ m) (hn : max 8 m ≤ n)
    (prof : Fin n → LinearOrder (Fin m)) (a : Fin m)
    (h : ∃ N : Finset (Fin m), (∑ c ∈ N, plurality_votes prof c) < plurality_veto_inside_count prof a N) :
    ∃ N : Finset (Fin m), (∑ c ∈ N, plurality_votes prof c) < plurality_veto_inside_count prof a N ∧
      (n : ℝ) * N.card - (m : ℝ) * (plurality_veto_inside_count prof a N : ℝ)
        ≤ (((m : ℝ) - 2) * n - 2 * m) * ((plurality_veto_inside_count prof a N : ℝ) - (∑ c ∈ N, (plurality_votes prof c : ℝ)))
plurality_veto_core_violating_set_saturateIn LeanSocial Choice Theory

If a candidate set N has strictly more veto-down-set voters than plurality score, then some N' ⊆ N is a union of voter veto down-sets below a, still has strictly more such voters than score, has exactly the same inside count k(N') = k(N), and satisfies n·|N'| − m·k(N') ≤ n·|N| − m·k(N).

theorem plurality_veto_core_violating_set_saturate {m n : ℕ}
    (prof : Fin n → LinearOrder (Fin m)) (a : Fin m) (N : Finset (Fin m))
    (hviol : (∑ c ∈ N, plurality_votes prof c) < plurality_veto_inside_count prof a N) :
    ∃ N' : Finset (Fin m), N' ⊆ N ∧
      (∑ c ∈ N', plurality_votes prof c) < plurality_veto_inside_count prof a N' ∧
      plurality_veto_inside_count prof a N' = plurality_veto_inside_count prof a N ∧
      (n : ℝ) * N'.card - (m : ℝ) * (plurality_veto_inside_count prof a N' : ℝ)
        ≤ (n : ℝ) * N.card - (m : ℝ) * (plurality_veto_inside_count prof a N : ℝ)
plurality_veto_threshold_witness_three_eightIn LeanSocial Choice Theory

There is a profile on 8 voters and 3 candidates and a candidate a in the regularized plurality veto core at strength plurality_regularization_threshold 8 3 = 1/2 which is not in the unregularized plurality veto core. This is the sharpness half of the exact-threshold theorem at m = 3, n = 8.

theorem plurality_veto_threshold_witness_three_eight :
    ∃ (prof : Fin 8 → LinearOrder (Fin 3)) (a : Fin 3),
      in_regularized_plurality_veto_core prof (plurality_regularization_threshold 8 3) a ∧
      ¬ in_regularized_plurality_veto_core prof 0 a
probabilistic_serial_cascade_costIn LeanSocial Choice Theory

Under the left-biased tie-breaking preference profile, the probabilistic serial line cost of the cascade agent configuration is exactly (1 + H_floor(n/2) + H_floor((n-1)/2)) * (1/2).

theorem probabilistic_serial_cascade_cost (n : ℕ) (hn : 2 ≤ n)
    (pref : Fin n → Equiv.Perm (Fin n))
    (hpref : ∀ (i k k' : Fin n), k < k' →
      |((if i.val < n - 1 then (i : ℝ) else (n : ℝ) - 3 / 2) - ((pref i k : Fin n) : ℝ))| <
        |((if i.val < n - 1 then (i : ℝ) else (n : ℝ) - 3 / 2) - ((pref i k' : Fin n) : ℝ))| ∨
      (|((if i.val < n - 1 then (i : ℝ) else (n : ℝ) - 3 / 2) - ((pref i k : Fin n) : ℝ))| =
        |((if i.val < n - 1 then (i : ℝ) else (n : ℝ) - 3 / 2) - ((pref i k' : Fin n) : ℝ))| ∧
        pref i k < pref i k')) :
    probabilistic_serial_line_cost
      (fun (i : Fin n) => if i.val < n - 1 then (i : ℝ) else (n : ℝ) - 3 / 2)
      (fun (j : Fin n) => (j : ℝ)) pref =
      (1 + (harmonic (n / 2) : ℝ) + (harmonic ((n - 1) / 2) : ℝ)) * (1 / 2)
probabilistic_serial_equispaced_items_wait_sum_leIn LeanSocial Choice Theory

For n >= 2 equispaced items at 0, 1, ..., n-1 on the real line and any distance preference profile, the sum of item wait costs in probabilistic serial is at most (H_floor(n/2) + H_floor((n-1)/2)) times the minimum matching cost OPT.

theorem probabilistic_serial_equispaced_items_wait_sum_le (n : ℕ) (hn : 2 ≤ n)
    (a : Fin n → ℝ) (pref : Fin n → Equiv.Perm (Fin n))
    (h : is_line_distance_preference_profile a (fun (j : Fin n) => (j : ℝ)) pref) :
    ∑ j, probabilistic_serial_line_item_wait (fun (j : Fin n) => (j : ℝ)) pref j ≤
      ((harmonic (n / 2) : ℝ) + (harmonic ((n - 1) / 2) : ℝ)) *
        line_min_matching_cost a (fun (j : Fin n) => (j : ℝ))
probabilistic_serial_line_item_wait_sum_le_line_min_matching_costNeeds helpSocial Choice Theory

For n >= 2 agents at real positions a and n items at real positions b ranked by distance, the total waiting cost of all n items under probabilistic serial is at most (n-1) times OPT, the minimum perfect-matching cost.

theorem probabilistic_serial_line_item_wait_sum_le_line_min_matching_cost (n : ℕ) (hn : 2 ≤ n) (a b : Fin n → ℝ) (pref : Fin n → Equiv.Perm (Fin n)) (h : is_line_distance_preference_profile a b pref) : ∑ j, probabilistic_serial_line_item_wait b pref j ≤ (n - 1 : ℝ) * line_min_matching_cost a b
rank_score_veto_core_side_count_boundNeeds helpSocial Choice Theory

For a candidate a in the rank-score veto core and any candidate c*, put G = #{v : c* <_v a} (voters preferring c*) and D = #{v : a <_v c*} (voters preferring a). If the last-place score is positive then G <= (||s||_1 - s_last) * D. Equivalently: the weight-awarding side cannot outweigh the opposing side by more than the factor Delta.

theorem rank_score_veto_core_side_count_bound :
    ∀ (C : Type*) [Fintype C] [DecidableEq C] (hm : 3 ≤ Fintype.card C)
      (s : Fin (Fintype.card C) → ℚ) (hs : is_positional_scoring_vector (Fintype.card C) s)
      (hs_last : 0 < scoring_last (Fintype.card C) (by omega) s)
      (V : Type*) [Fintype V] [Nonempty V]
      (prof : V → LinearOrder C)
      (a : C) (ha : is_rank_score_veto_core s prof a)
      (c_star : C),
      ((Finset.univ.filter (fun v : V => (prof v).lt c_star a)).card : ℝ) ≤
        (((scoring_norm_one s - scoring_last (Fintype.card C) (by omega) s) : ℚ) : ℝ) *
          ((Finset.univ.filter (fun v : V => (prof v).lt a c_star)).card : ℝ)
sum_plurality_votes_eq_cardIn LeanSocial Choice Theory

The plurality counts of all candidates sum to the number of voters.

theorem sum_plurality_votes_eq_card {V C : Type*} [Fintype V] [Fintype C] [Nonempty C]
    (prof : V → LinearOrder C) : ∑ c : C, plurality_votes prof c = Fintype.card V
sum_regularized_plurality_weight_mulIn LeanSocial Choice Theory

Multiplying the sum over N of the regularized plurality weights by 1 + |C|·ε gives the unregularized total plurality score of N divided by the number of voters, plus |N|·ε.

theorem sum_regularized_plurality_weight_mul {V C : Type*} [Fintype V] [Fintype C] [DecidableEq C]
    (prof : V → LinearOrder C) (ε : ℝ) (N : Finset C) :
    (1 + (Fintype.card C : ℝ) * ε) * (∑ c ∈ N, regularized_plurality_weight prof ε c)
      = (∑ c ∈ N, (plurality_votes prof c : ℝ)) / (Fintype.card V) + (N.card : ℝ) * ε
swf_interleaved_profile_existsNeeds helpSocial Choice Theory

There exists an interleaved cut-count profile P mapping utility streams in [0, 1]^ℕ into lexicographic streams of extended naturals that simultaneously satisfies monotonicity, stationarity, finite anonymity, upper restricted dominance, and lower restricted dominance.

theorem swf_interleaved_profile_exists :
    ∃ P : Stream' (Set.Icc (0 : ℝ) 1) → Lex (ℕ → WithTop ℕ),
      (∀ x y : Stream' (Set.Icc (0 : ℝ) 1), (∀ t, x t ≤ y t) → P x ≤ P y) ∧
      (∀ x y : Stream' (Set.Icc (0 : ℝ) 1), x 0 = y 0 → (P x ≥ P y ↔ P x.tail ≥ P y.tail)) ∧
      (∀ (x : Stream' (Set.Icc (0 : ℝ) 1)) (π : Equiv.Perm ℕ), {t | π t ≠ t}.Finite → P (x ∘ ⇑π) = P x) ∧
      (∀ (a b : Set.Icc (0 : ℝ) 1), a < b → P (Stream'.cons a (Stream'.const b)) < P (Stream'.const b)) ∧
      (∀ (a b : Set.Icc (0 : ℝ) 1), a < b → P (Stream'.const a) < P (Stream'.cons b (Stream'.const a)))
swf_lower_profile_existsIn LeanSocial Choice Theory

There exists an upper cut-count profile P mapping utility streams in [0, 1]^ℕ into lexicographic streams of extended naturals that satisfies monotonicity, stationarity, finite anonymity, and lower restricted dominance.

theorem swf_lower_profile_exists :
    ∃ P : Stream' (Set.Icc (0 : ℝ) 1) → Lex (ℕ → WithTop ℕ),
      (∀ x y : Stream' (Set.Icc (0 : ℝ) 1), (∀ t, x t ≤ y t) → P x ≤ P y) ∧
      (∀ x y : Stream' (Set.Icc (0 : ℝ) 1), x 0 = y 0 → (P x ≥ P y ↔ P x.tail ≥ P y.tail)) ∧
      (∀ (x : Stream' (Set.Icc (0 : ℝ) 1)) (π : Equiv.Perm ℕ), {t | π t ≠ t}.Finite → P (x ∘ ⇑π) = P x) ∧
      (∀ (a b : Set.Icc (0 : ℝ) 1), a < b → P (Stream'.const a) < P (Stream'.cons b (Stream'.const a)))
swf_upper_dominance_of_lower_swfIn LeanSocial Choice Theory

Given a monotone, stationary, finitely anonymous SWF satisfying lower restricted dominance, the SWF obtained by complementing each utility (v ↦ 1 - v) and negating is monotone, stationary, finitely anonymous, and satisfies upper restricted dominance.

theorem swf_upper_dominance_of_lower_swf (W : Stream' (Set.Icc (0 : ℝ) 1) → ℝ)
    (hmono : swf_is_monotone W) (hstat : swf_is_stationary W)
    (hanon : swf_is_finitely_anonymous W) (hdom : swf_lower_restricted_dominance W) :
    swf_is_monotone (fun x => - W (swf_stream_complement x)) ∧
    swf_is_stationary (fun x => - W (swf_stream_complement x)) ∧
    swf_is_finitely_anonymous (fun x => - W (swf_stream_complement x)) ∧
    swf_upper_restricted_dominance (fun x => - W (swf_stream_complement x))
swf_value_complement_iffIn LeanSocial Choice Theory

On the unit interval, complementation v ↦ 1 − v reverses both ≤ and <: 1 − a ≤ 1 − b iff b ≤ a, and 1 − a < 1 − b iff b < a.

theorem swf_value_complement_iff (a b : Set.Icc (0 : ℝ) 1) :
    ((1 - (a : ℝ) ≤ 1 - (b : ℝ)) ↔ b ≤ a) ∧ ((1 - (a : ℝ) < 1 - (b : ℝ)) ↔ b < a)
arithmetic_fourier_bound_fiveIn LeanElementary Number Theory

The arithmetic Fourier bound lambda_5 in dimension 5 equals 11.

theorem arithmetic_fourier_bound_five : arithmetic_fourier_bound 5 = 11
binary_form_compression_bound_recurrenceIn LeanElementary Number Theory

For all integers $a \ge 2$ and $k \ge 1$, the compression bound satisfies the recurrence $h_a(k) = h_a(k-1) + h_{a-1}(k-1)$.

theorem binary_form_compression_bound_recurrence (a k : ℕ) (ha : 2 ≤ a) (hk : 1 ≤ k) :
    binary_form_compression_bound a k =
      binary_form_compression_bound a (k - 1) + binary_form_compression_bound (a - 1) (k - 1)
brown_criterion_of_pos_monoIn LeanElementary Number Theory

Brown's criterion (1961): a positive, nondecreasing integer sequence H starting with H(0)=0 and H(1)=1 is complete if and only if every term H(n+1) is at most 1 plus the sum of all preceding terms.

theorem brown_criterion_of_pos_mono (H : ℕ → ℤ) (h0 : H 0 = 0) (h1 : H 1 = 1)
    (hpos : ∀ n ≥ 1, 1 ≤ H n) (hmono : ∀ n ≥ 1, H n ≤ H (n + 1)) :
    is_complete_sequence H ↔ ∀ n ≥ 1, H (n + 1) ≤ 1 + ∑ i ∈ Finset.range (n + 1), H i
canonical_max_halving_partition_is_halvingIn LeanElementary Number Theory

For every integer $n \ge 1$, the list formed by $\lfloor n / 2^{i+1} \rfloor$ for $0 \le i < \lfloor \log_2 n \rfloor$ followed by $s_2(n)$ copies of $1$ is a halving partition of $n$.

theorem canonical_max_halving_partition_is_halving (n : ℕ) (hn : 1 ≤ n) :
    is_halving_partition n
      ((List.range (Nat.log 2 n)).map (fun i => n / 2 ^ (i + 1)) ++
        List.replicate ((Nat.digits 2 n).sum) 1)
compression_of_normalized_binary_linear_formsIn LeanElementary Number Theory

Let $V$ be a vector space over $\mathbb{F}_2$ of dimension $k+1$, and let $u \in V \setminus \{0\}$. For every integer $a \ge 1$, any integer-weighted sum $\sum_{i \in \iota} c_i \nu_i(x)$ of linear functionals $\nu_i : V \to \mathbb{F}_2$ normalized at $u$ (with $\nu_i(u) = 1$) can be represented modulo $2^a$ by at most $h_a(k)$ normalized forms: there exist $m \le h_a(k)$, linear functionals $\eta_1, \dots, \eta_m : V \to \mathbb{F}_2$ normalized at $u$ ($\eta_j(u) = 1$), and integer coefficients $d_1, \dots, d_m \in \mathbb{Z}$ such that for all $x \in V$, $\sum_{i \in \iota} c_i \nu_i(x) \equiv \sum_{j=1}^m d_j \eta_j(x) \pmod{2^a}$.

theorem compression_of_normalized_binary_linear_forms
    {V : Type*} [AddCommGroup V] [Module (ZMod 2) V]
    (k : ℕ) (hdim : Module.finrank (ZMod 2) V = k + 1)
    (u : V) (hu : u ≠ 0)
    (a : ℕ) (ha : 1 ≤ a)
    {ι : Type*} [Fintype ι]
    (c : ι → ℤ) (ν : ι → (V →ₗ[ZMod 2] ZMod 2))
    (hν : ∀ i, is_normalized_binary_form u (ν i)) :
    ∃ (m : ℕ) (hm : m ≤ binary_form_compression_bound a k)
      (d : Fin m → ℤ) (η : Fin m → (V →ₗ[ZMod 2] ZMod 2))
      (hη : ∀ j, is_normalized_binary_form u (η j)),
      ∀ x : V, (∑ i, c i * ((ν i x).val : ℤ)) ≡ (∑ j, d j * ((η j x).val : ℤ)) [ZMOD (2 ^ a : ℤ)]
coprime_matching_base_pow_injectiveIn LeanElementary Number Theory

Let S be the support of F, all members prime, and let the base at p be p when p ∣ b and ζ_p^b otherwise. If k and k' are bounded by F and F p < p whenever p ∤ b, then ∏ p ∈ S, base_p^(k p) = ∏ p ∈ S, base_p^(k' p) forces k = k'.

theorem coprime_matching_base_pow_injective (b : Nat) (hb : 0 < b) (S : Finset Nat) (F : Nat →₀ Nat)
    (hFs : F.support = S) (hprime : ∀ p ∈ S, p.Prime) (y : Nat → Complex)
    (hy : ∀ p ∈ S, ¬ p ∣ b → IsPrimitiveRoot (y p) p)
    (hlt : ∀ p ∈ S, ¬ p ∣ b → F p < p) (k k' : Nat →₀ Nat) (hk : k ≤ F) (hk' : k' ≤ F)
    (h : (∏ p ∈ S, (coprime_matching_base b y p) ^ (k p))
          = ∏ p ∈ S, (coprime_matching_base b y p) ^ (k' p)) : k = k'
coprime_matching_det_ne_zeroIn LeanElementary Number Theory

With ζ_p a primitive p-th root of unity for each prime p dividing m and not b, and m.factorization p < p at those primes, the N×N matrix whose (t,j) entry is the product over the prime factors of m of the row value raised to the exponent of the j-th divisor has nonzero determinant.

theorem coprime_matching_det_ne_zero (m a b : Nat) (hm : 0 < m) (hcop : Nat.Coprime a b)
    (z y : Nat → Complex) (hz : ∀ p ∈ m.factorization.support, p.Prime → IsPrimitiveRoot (z p) p)
    (hy : ∀ p ∈ m.factorization.support, ¬ p ∣ b → IsPrimitiveRoot (y p) p)
    (hlt : ∀ p ∈ m.factorization.support, ¬ p ∣ b → m.factorization p < p)
    {N : Nat} (kOf : Fin N ≃ ↥(Finset.Iic m.factorization)) (hN : N = (Nat.divisors m).card) :
    (Matrix.of (fun (t : Fin N) (j : Fin N) =>
      ∏ p ∈ m.factorization.support, (coprime_matching_row_value a b z p (t : Nat)) ^ ((kOf j).val p))).det ≠ 0
coprime_matching_entry_ne_zero_iffIn LeanElementary Number Theory

Let p be prime and ζ a primitive p-th root of unity for each prime p in S, where S is the support of the factorization of a positive m. Then for any exponent vector j ≤ m.factorization, the row-t entry of the matrix is nonzero exactly when the divisor prod p^(j p) is coprime to a + b*t.

theorem coprime_matching_entry_ne_zero_iff (m a b : Nat) (hm : 0 < m) (hcop : Nat.Coprime a b)
    (ζ : Nat → Complex) (hζ : ∀ p ∈ m.factorization.support, p.Prime → IsPrimitiveRoot (ζ p) p)
    (j : Nat →₀ Nat) (hj : j ≤ m.factorization) (t : Nat) :
    (∏ p ∈ m.factorization.support, (coprime_matching_row_value a b ζ p t) ^ (j p)) ≠ 0
      ↔ Nat.Coprime (j.prod (fun p e => p ^ e)) (a + b * t)
coprime_matching_of_exponent_lt_primeIn LeanElementary Number Theory

Let m be a positive natural number, and let a and b be coprime natural numbers with 0 < b. If for every prime p dividing m such that ¬(p ∣ b), the p-adic exponent m.factorization p < p, then there exists an equivalence e : Fin (Nat.divisors m).card ≃ Nat.divisors m such that for all i : Fin (Nat.divisors m).card, (e i : ℕ) and a + b * (i : ℕ) are coprime.

theorem coprime_matching_of_exponent_lt_prime (m : ℕ) (hm : 0 < m) (a b : ℕ) (hb : 0 < b)
    (hcop : Nat.Coprime a b)
    (hexp : ∀ p : ℕ, p.Prime → p ∣ m → ¬ p ∣ b → m.factorization p < p) :
    ∃ e : Fin (Nat.divisors m).card ≃ Nat.divisors m,
      ∀ i : Fin (Nat.divisors m).card, Nat.Coprime (e i : ℕ) (a + b * (i : ℕ))
coprime_matching_of_nonzero_detIn LeanElementary Number Theory

Suppose ζ_p is a primitive p-th root of unity at each prime p | m, the constructed N×N matrix of row values has nonzero determinant, and divisors of m are enumerated by exponent vectors via the box bijection. Then there is a bijection between positions 0..N−1 and the divisors of m such that each divisor is coprime to the corresponding term a + b*t.

theorem coprime_matching_of_nonzero_det (m a b : Nat) (hm : 0 < m) (hcop : Nat.Coprime a b)
    (z : Nat → Complex) (hz : ∀ p ∈ m.factorization.support, p.Prime → IsPrimitiveRoot (z p) p)
    {N : Nat} (kOf : Fin N ≃ ↥(Finset.Iic m.factorization)) (hN : N = (Nat.divisors m).card)
    (hdet : (Matrix.of (fun (t : Fin N) (j : Fin N) =>
      ∏ p ∈ m.factorization.support, (coprime_matching_row_value a b z p (t : Nat)) ^ ((kOf j).val p))).det ≠ 0) :
    ∃ e : Fin (Nat.divisors m).card ≃ Nat.divisors m,
      ∀ i : Fin (Nat.divisors m).card, Nat.Coprime (e i : Nat) (a + b * (i : Nat))
coprime_matching_pow_sub_one_eq_zero_iffIn LeanElementary Number Theory

For a prime p, a primitive p-th root of unity ζ, and naturals a, b, t, j: (ζ^(a+bt) − 1)^j = 0 if and only if p divides a + b*t and j ≠ 0.

theorem coprime_matching_pow_sub_one_eq_zero_iff (p a b t j : Nat) (ζ : Complex)
    (hζ : IsPrimitiveRoot ζ p) : (ζ ^ (a + b * t) - 1) ^ j = 0 ↔ p ∣ a + b * t ∧ j ≠ 0
coprime_matching_prime_not_dvd_progressionIn LeanElementary Number Theory

If p is prime, p divides b, and a and b are coprime, then p does not divide a + b*t for any t.

theorem coprime_matching_prime_not_dvd_progression (a b t p : Nat) (hp : p.Prime) (hb : p ∣ b)
    (hcop : Nat.Coprime a b) : ¬ p ∣ a + b * t
coprime_matching_vandermonde_factorizationIn LeanElementary Number Theory

For every row t and exponent vector j, the product over p of the row value raised to j p equals the sum over k ≤ j of (prod over p of base_p^(k p))^t times the change-of-basis coefficient of k and j.

theorem coprime_matching_vandermonde_factorization (a b : Nat) (S : Finset Nat) (F : Nat →₀ Nat)
    (hFs : F.support = S) (z y : Nat → Complex) (t : Nat) (j : Nat →₀ Nat) (hj : j ≤ F) :
    (∏ p ∈ S, (coprime_matching_row_value a b z p t) ^ (j p))
      = ∑ k ∈ Finset.Iic j,
          (∏ p ∈ S, (coprime_matching_base b y p) ^ (k p)) ^ t * coprime_matching_coeff a b z S k j
crystal_components_uniqueIn LeanElementary Number Theory

Crystals have unique components (arXiv:1601.03081, open): if n is a crystal with components a, b and also with components c, d, then {a, b} = {c, d}.

theorem crystal_components_unique (n a b c d : ℕ)
    (hab : is_crystal_with_components n a b) (hcd : is_crystal_with_components n c d) :
    ({a, b} : Finset ℕ) = {c, d}
crystal_dvd_pred_sqIn LeanElementary Number Theory

If n is a crystal with components a, b, then (a+1) divides (b-1)^2 and (b+1) divides (a-1)^2.

theorem crystal_dvd_pred_sq (n a b : ℕ) (hab : is_crystal_with_components n a b) :
    (a + 1) ∣ (b - 1) ^ 2 ∧ (b + 1) ∣ (a - 1) ^ 2
crystal_dvd_prod_sqIn LeanElementary Number Theory

If n is a crystal with components a, b, then (a+1)(b+1) divides (ab+1)^2.

theorem crystal_dvd_prod_sq (n a b : ℕ) (hab : is_crystal_with_components n a b) :
    (a + 1) * (b + 1) ∣ (a * b + 1) ^ 2
crystal_dvd_succ_sqIn LeanElementary Number Theory

If n is a crystal with components a, b, then (a+1)(b+1) divides (n+1)^2.

theorem crystal_dvd_succ_sq (n a b : ℕ) (hab : is_crystal_with_components n a b) :
    (a + 1) * (b + 1) ∣ (n + 1) ^ 2
crystal_dvd_sum_sqIn LeanElementary Number Theory

If n is a crystal with components a, b, then (a+1)(b+1) divides (a+b)^2.

theorem crystal_dvd_sum_sq (n a b : ℕ) (hab : is_crystal_with_components n a b) :
    (a + 1) * (b + 1) ∣ (a + b) ^ 2
crystal_lt_sq_of_ltIn LeanElementary Number Theory

If n is a crystal with components a < b, then b < a^2.

theorem crystal_lt_sq_of_lt (n a b : ℕ) (hab : is_crystal_with_components n a b) (hlt : a < b) :
    b < a ^ 2
crystal_symmIn LeanElementary Number Theory

If n is a crystal with components a, b, then n is also a crystal with components b, a.

theorem crystal_symm (n a b : ℕ) (hab : is_crystal_with_components n a b) :
    is_crystal_with_components n b a
davenport_box_corner_deficitIn LeanElementary Number Theory

For m at least two and integers s, t with 1 <= s, t <= 2m, if the three numbers m(s+t)-st, mt, ms have gcd 1, then 4m squared minus the corner area 2m(s+t)-st is at least the smallest prime not dividing m.

theorem davenport_box_corner_deficit (m s t : ℕ) (hm : 2 ≤ m) (hs : 1 ≤ s) (hs2 : s ≤ 2*m)
    (ht : 1 ≤ t) (ht2 : t ≤ 2*m)
    (hgcd : ((m*(s + t) - s*t).gcd (m*t)).gcd (m*s) = 1) :
    4*m^2 - (2*m*(s + t) - s*t) ≥ nat_least_prime_not_dvd m
davenport_box_extremal_sequence_minimalIn LeanElementary Number Theory

For every natural m at least two, the displayed canonical multiset S(m) is a minimal zero-sum multiset.

theorem davenport_box_extremal_sequence_minimal (m : ℕ) (hm : 2 ≤ m) :
    multiset_is_minimal_zero_sum (davenport_box_extremal_sequence m)
davenport_box_extremal_sequence_uniqueIn LeanElementary Number Theory

For m ≥ 2, any minimal zero-sum sequence over ⟦−m, m⟧² whose length equals D(⟦−m, m⟧²) is the image of S(m) under one of the eight symmetries of the square.

theorem davenport_box_extremal_sequence_unique (m : ℕ) (hm : 2 ≤ m)
    (s : Multiset (ℤ × ℤ)) (hbox : ∀ x ∈ s, x ∈ int_box_two m)
    (hmin : multiset_is_minimal_zero_sum s)
    (hcard : (Multiset.card s : ℕ∞) = davenport_constant (↑(int_box_two m) : Set (ℤ × ℤ))) :
    ∃ e₁ e₂ : ℤˣ, ∃ sw : Bool,
      s = (davenport_box_extremal_sequence m).map (int_square_symmetry e₁ e₂ sw)
davenport_box_four_support_near_extremalIn LeanElementary Number Theory

For every natural m at least two there exists a minimal zero-sum multiset in the square [-m,m]^2 with exactly four distinct support points and length 4m squared minus q(m) minus one.

theorem davenport_box_four_support_near_extremal (m : ℕ) (hm : 2 ≤ m) :
    ∃ s : Multiset (ℤ × ℤ),
      multiset_is_minimal_zero_sum s ∧
      (∀ v ∈ s, v ∈ int_box_two m) ∧
      s.toFinset.card = 4 ∧
      s.card = 4*m^2 - nat_least_prime_not_dvd m - 1
davenport_box_minimal_zero_sum_card_leIn LeanElementary Number Theory

Every minimal zero-sum sequence over ⟦−m, m⟧² (m ≥ 2) has length at most 4m² − q(m).

theorem davenport_box_minimal_zero_sum_card_le (m : ℕ) (hm : 2 ≤ m)
    (s : Multiset (ℤ × ℤ)) (hmin : multiset_is_minimal_zero_sum s)
    (hbox : ∀ v ∈ s, v ∈ int_box_two m) :
    s.card ≤ 4 * m ^ 2 - nat_least_prime_not_dvd m
davenport_box_minimal_zero_sum_card_le_of_support_ge_fourIn LeanElementary Number Theory

A minimal zero-sum sequence over ⟦−m, m⟧² (m ≥ 2) with at least four distinct terms has length at most 4m² − q(m) − 1, i.e. strictly shorter than the extremal length.

theorem davenport_box_minimal_zero_sum_card_le_of_support_ge_four (m : ℕ) (hm : 2 ≤ m)
    (s : Multiset (ℤ × ℤ)) (hmin : multiset_is_minimal_zero_sum s)
    (hbox : ∀ v ∈ s, v ∈ int_box_two m) (hsupport : 4 ≤ s.toFinset.card) :
    s.card ≤ 4 * m ^ 2 - nat_least_prime_not_dvd m - 1
davenport_box_minimal_zero_sum_card_le_of_support_le_twoIn LeanElementary Number Theory

A minimal zero-sum sequence over the box ⟦−m, m⟧² (m ≥ 2) whose set of distinct terms has at most two elements has length at most 2m − 1.

theorem davenport_box_minimal_zero_sum_card_le_of_support_le_two (m : ℕ) (hm : 2 ≤ m)
    (s : Multiset (ℤ × ℤ)) (hmin : multiset_is_minimal_zero_sum s)
    (hbox : ∀ v ∈ s, v ∈ int_box_two m) (hsupport : s.toFinset.card ≤ 2) :
    s.card ≤ 2 * m - 1
davenport_box_minimal_zero_sum_card_le_of_support_threeIn LeanElementary Number Theory

Every minimal zero-sum multiset over the integer square [-m,m]^2, for m at least two, with exactly three distinct support points has length at most 4m squared minus the smallest prime not dividing m.

theorem davenport_box_minimal_zero_sum_card_le_of_support_three (m : ℕ) (hm : 2 ≤ m)
    (s : Multiset (ℤ × ℤ)) (hmin : multiset_is_minimal_zero_sum s)
    (hbox : ∀ v ∈ s, v ∈ int_box_two m) (hsupport : s.toFinset.card = 3) :
    s.card ≤ 4*m^2-nat_least_prime_not_dvd m
davenport_box_primitive_triangle_boundIn LeanElementary Number Theory

If a, b, c lie in the box [-m,m]^2 and their three determinants are nonzero with a common sign, then the sum of the absolute determinants divided by their gcd is at most 4m squared minus the smallest prime not dividing m.

theorem davenport_box_primitive_triangle_bound (m : ℕ) (hm : 2 ≤ m) (a b c : ℤ × ℤ)
    (ha : a ∈ int_box_two m) (hb : b ∈ int_box_two m) (hc : c ∈ int_box_two m)
    (hd : (0 < davenport_det b c ∧ 0 < davenport_det c a ∧ 0 < davenport_det a b) ∨
      (davenport_det b c < 0 ∧ davenport_det c a < 0 ∧ davenport_det a b < 0)) :
    ((davenport_det b c).natAbs + (davenport_det c a).natAbs + (davenport_det a b).natAbs) /
      (((davenport_det b c).natAbs.gcd (davenport_det c a).natAbs).gcd
        (davenport_det a b).natAbs) ≤ 4*m^2 - nat_least_prime_not_dvd m
davenport_box_three_det_corner_normal_formIn LeanElementary Number Theory

If a, b, c lie in the box [-m,m]^2, their three determinants are nonzero with a common sign, and the sum of absolute determinants exceeds 4m squared minus 2m, then that sum has the corner form 2m(s+t) - st for integers s, t with 1 <= s, t <= 2m, and the gcd of (2m(s+t)-st, mt, ms) equals the gcd of the three absolute determinants.

theorem davenport_box_three_det_corner_normal_form (m : ℕ) (hm : 2 ≤ m) (a b c : ℤ × ℤ)
    (ha : a ∈ int_box_two m) (hb : b ∈ int_box_two m) (hc : c ∈ int_box_two m)
    (hsign : (0 < davenport_det b c ∧ 0 < davenport_det c a ∧ 0 < davenport_det a b) ∨
      (davenport_det b c < 0 ∧ davenport_det c a < 0 ∧ davenport_det a b < 0))
    (hbig : 4*m^2 - 2*m < (davenport_det b c).natAbs + (davenport_det c a).natAbs +
      (davenport_det a b).natAbs) :
    ∃ s t : ℕ, 1 ≤ s ∧ s ≤ 2*m ∧ 1 ≤ t ∧ t ≤ 2*m ∧
      (davenport_det b c).natAbs + (davenport_det c a).natAbs + (davenport_det a b).natAbs =
        2*m*(s + t) - s*t ∧
      ((m*(s + t) - s*t).gcd (m*t)).gcd (m*s) =
        ((davenport_det b c).natAbs.gcd (davenport_det c a).natAbs).gcd
          (davenport_det a b).natAbs
davenport_box_three_support_extremal_classificationIn LeanElementary Number Theory

A minimal zero-sum sequence over ⟦−m, m⟧² (m ≥ 2) with exactly three distinct terms and extremal length 4m² − q(m) is the image of S(m) under one of the eight symmetries of the square.

theorem davenport_box_three_support_extremal_classification (m : ℕ) (hm : 2 ≤ m)
    (s : Multiset (ℤ × ℤ)) (hmin : multiset_is_minimal_zero_sum s)
    (hbox : ∀ v ∈ s, v ∈ int_box_two m) (hsupport : s.toFinset.card = 3)
    (hcard : s.card = 4 * m ^ 2 - nat_least_prime_not_dvd m) :
    ∃ e₁ e₂ : ℤˣ, ∃ sw : Bool,
      s = (davenport_box_extremal_sequence m).map (int_square_symmetry e₁ e₂ sw)
davenport_box_three_support_minimality_transferIn LeanElementary Number Theory

If a multiset α·a + β·b + γ·c with a, b, c pairwise distinct is a minimal zero-sum sequence, then any nonzero sub-count vector (i,j,k) ≤ (α,β,γ) with i·a + j·b + k·c = 0 must be the full vector (α,β,γ).

theorem davenport_box_three_support_minimality_transfer
    (a b c : ℤ × ℤ) (α β γ : ℕ)
    (hab : a ≠ b) (hac : a ≠ c) (hbc : b ≠ c)
    (hmin : multiset_is_minimal_zero_sum
      (Multiset.replicate α a + Multiset.replicate β b + Multiset.replicate γ c)) :
    ∀ i j k : ℕ, i ≤ α → j ≤ β → k ≤ γ → (i, j, k) ≠ (0, 0, 0) →
      (i : ℤ) • a + (j : ℤ) • b + (k : ℤ) • c = 0 → i = α ∧ j = β ∧ k = γ
davenport_box_three_support_rank_one_boundIn LeanElementary Number Theory

If the three support points are collinear with the origin (all three determinants vanish), then the length alpha+beta+gamma is at most 2m-1, hence at most 4m squared minus the smallest prime not dividing m.

theorem davenport_box_three_support_rank_one_bound (m : ℕ) (hm : 2 ≤ m) (a b c : ℤ × ℤ)
    (α β γ : ℕ) (hα : 0 < α) (hβ : 0 < β) (hγ : 0 < γ)
    (ha : a ∈ int_box_two m) (hb : b ∈ int_box_two m) (hc : c ∈ int_box_two m)
    (hrel : (α : ℤ) • a + (β : ℤ) • b + (γ : ℤ) • c = 0)
    (hmin : ∀ i j k : ℕ, i ≤ α → j ≤ β → k ≤ γ → (i, j, k) ≠ (0, 0, 0) →
      (i : ℤ) • a + (j : ℤ) • b + (k : ℤ) • c = 0 → i = α ∧ j = β ∧ k = γ)
    (hzero : davenport_det b c = 0 ∧ davenport_det c a = 0 ∧ davenport_det a b = 0) :
    α + β + γ ≤ 4*m^2 - nat_least_prime_not_dvd m
davenport_box_three_support_rank_two_formulaIn LeanElementary Number Theory

Let a, b, c be plane points with alpha, beta, gamma positive counts summing (with the points) to zero, satisfying the minimality transfer, and at least one determinant nonzero. Then the three determinants det(b,c), det(c,a), det(a,b) are all nonzero with a common sign, and alpha+beta+gamma equals the sum of their absolute values divided by their gcd.

theorem davenport_box_three_support_rank_two_formula (a b c : ℤ × ℤ) (α β γ : ℕ)
    (hα : 0 < α) (hβ : 0 < β) (hγ : 0 < γ)
    (hrel : (α : ℤ) • a + (β : ℤ) • b + (γ : ℤ) • c = 0)
    (hmin : ∀ i j k : ℕ, i ≤ α → j ≤ β → k ≤ γ → (i, j, k) ≠ (0, 0, 0) →
      (i : ℤ) • a + (j : ℤ) • b + (k : ℤ) • c = 0 → i = α ∧ j = β ∧ k = γ)
    (hne : davenport_det b c ≠ 0 ∨ davenport_det c a ≠ 0 ∨ davenport_det a b ≠ 0) :
    ((0 < davenport_det b c ∧ 0 < davenport_det c a ∧ 0 < davenport_det a b) ∨
      (davenport_det b c < 0 ∧ davenport_det c a < 0 ∧ davenport_det a b < 0)) ∧
    α + β + γ = ((davenport_det b c).natAbs + (davenport_det c a).natAbs +
      (davenport_det a b).natAbs) /
      (((davenport_det b c).natAbs.gcd (davenport_det c a).natAbs).gcd
        (davenport_det a b).natAbs)
davenport_box_three_support_structureIn LeanElementary Number Theory

A minimal zero-sum multiset over the box with exactly three distinct support points is, up to naming, alpha copies of a, beta copies of b and gamma copies of c, with a, b, c distinct points of the box, alpha, beta, gamma positive, alpha a + beta b + gamma c = 0, and the transfer of minimality: any nonzero sub-combination (i,j,k) ≤ (alpha,beta,gamma) with i a + j b + k c = 0 must be the full one.

theorem davenport_box_three_support_structure (m : ℕ) (s : Multiset (ℤ × ℤ))
    (hmin : multiset_is_minimal_zero_sum s) (hbox : ∀ v ∈ s, v ∈ int_box_two m)
    (hsupport : s.toFinset.card = 3) :
    ∃ a b c : ℤ × ℤ, ∃ α β γ : ℕ,
      a ∈ int_box_two m ∧ b ∈ int_box_two m ∧ c ∈ int_box_two m ∧
      a ≠ b ∧ a ≠ c ∧ b ≠ c ∧ 0 < α ∧ 0 < β ∧ 0 < γ ∧
      s.card = α + β + γ ∧
      s = Multiset.replicate α a + Multiset.replicate β b + Multiset.replicate γ c ∧
      ((α : ℤ) • a + (β : ℤ) • b + (γ : ℤ) • c = 0) ∧
      (∀ i j k : ℕ, i ≤ α → j ≤ β → k ≤ γ → (i, j, k) ≠ (0, 0, 0) →
        (i : ℤ) • a + (j : ℤ) • b + (k : ℤ) • c = 0 → i = α ∧ j = β ∧ k = γ)
davenport_constant_int_box_two_eq_valueIn LeanElementary Number Theory

For m ≥ 2, D(⟦−m, m⟧²) = 4m² − q(m).

theorem davenport_constant_int_box_two_eq_value (m : ℕ) (hm : 2 ≤ m) :
    davenport_constant (↑(int_box_two m) : Set (ℤ × ℤ)) =
      ((4 * m ^ 2 - nat_least_prime_not_dvd m : ℕ) : ℕ∞)
davenport_constant_int_box_two_leIn LeanElementary Number Theory

For m ≥ 2, the Davenport constant of ⟦−m, m⟧² is at most 4m² − q(m).

theorem davenport_constant_int_box_two_le (m : ℕ) (hm : 2 ≤ m) :
    davenport_constant (↑(int_box_two m) : Set (ℤ × ℤ)) ≤
      ((4 * m ^ 2 - nat_least_prime_not_dvd m : ℕ) : ℕ∞)
davenport_det_relationIn LeanElementary Number Theory

For three points a, b, c of the integer plane, det(b,c) a + det(c,a) b + det(a,b) c = 0.

theorem davenport_det_relation (a b c : ℤ × ℤ) :
    davenport_det b c • a + davenport_det c a • b + davenport_det a b • c = 0
davenport_int_minimal_zero_sum_card_leIn LeanElementary Number Theory

One-dimensional Davenport bound: a minimal zero-sum multiset of integers, all entries lying in [-m, m], has length at most 2m - 1.

theorem davenport_int_minimal_zero_sum_card_le (m : ℕ) (hm : 1 ≤ m) (s : Multiset ℤ)
    (hmin : multiset_is_minimal_zero_sum s) (hbox : ∀ x ∈ s, x ∈ Finset.Icc (-(m:ℤ)) (m:ℤ)) :
    s.card ≤ 2*m - 1
davenport_three_point_det_sum_le_spreadIn LeanElementary Number Theory

If the three points have x-coordinate spread at most W and y-coordinate spread at most H, and the three determinants det(b,c), det(c,a), det(a,b) are nonzero with a common sign, then the sum of their absolute values is at most W times H. (An inscribed triangle has area at most half the enclosing rectangle.)

theorem davenport_three_point_det_sum_le_spread (a b c : ℤ × ℤ) (W H : ℕ)
    (hWab : |a.1 - b.1| ≤ (W:ℤ)) (hWac : |a.1 - c.1| ≤ (W:ℤ)) (hWbc : |b.1 - c.1| ≤ (W:ℤ))
    (hHab : |a.2 - b.2| ≤ (H:ℤ)) (hHac : |a.2 - c.2| ≤ (H:ℤ)) (hHbc : |b.2 - c.2| ≤ (H:ℤ))
    (hsign : (0 < davenport_det b c ∧ 0 < davenport_det c a ∧ 0 < davenport_det a b) ∨
      (davenport_det b c < 0 ∧ davenport_det c a < 0 ∧ davenport_det a b < 0)) :
    (davenport_det b c).natAbs + (davenport_det c a).natAbs + (davenport_det a b).natAbs ≤ W * H
derangements_no_two_cycles_count_antiperiodicIn LeanElementary Number Theory

Lemma 2.2 of arXiv:2610.40342 at S = {1,2}: for every prime p ≥ 3 and every n, the number a(n) of permutations of Fin n with no cycles of length 1 or 2 satisfies a(n+p) ≡ -a(n) (mod p).

theorem derangements_no_two_cycles_count_antiperiodic (p n : ℕ) (hp : p.Prime) (hp_odd : Odd p) : (derangements_no_two_cycles_count (n + p) : ZMod p) = - (derangements_no_two_cycles_count n : ZMod p)
derangements_no_two_cycles_count_dvdIn LeanElementary Number Theory

Theorem 3.1(i) of arXiv:2610.40342 at r = 2: the falling factorial (n-1)(n-2) divides the number of permutations of Fin n with no cycles of length 1 or 2, for n ≥ 3.

theorem derangements_no_two_cycles_count_dvd (n : ℕ) (hn : 3 ≤ n) : (n - 1) * (n - 2) ∣ derangements_no_two_cycles_count n
derangements_no_two_cycles_count_recurrence_three_termIn LeanElementary Number Theory

The number a(n) of permutations of Fin n with no cycles of length 1 or 2 satisfies a(n) = (n-1)·a(n-1) + (n-1)(n-2)·a(n-3) for all n ≥ 1.

theorem derangements_no_two_cycles_count_recurrence_three_term (n : ℕ) (hn : 1 ≤ n) : derangements_no_two_cycles_count n = (n - 1) * derangements_no_two_cycles_count (n - 1) + (n - 1) * (n - 2) * derangements_no_two_cycles_count (n - 3)
derangements_no_two_cycles_quotient_antiperiodicIn LeanElementary Number Theory

For every odd prime p and every natural number n ≥ 3, the quotient Q_n of derangements without 2-cycles satisfies Q_{n+p} = -Q_n in ZMod p.

theorem derangements_no_two_cycles_quotient_antiperiodic (p n : ℕ) (hp : p.Prime) (hp_odd : Odd p) (hn : 3 ≤ n) : (derangements_no_two_cycles_quotient (n + p) : ZMod p) = - (derangements_no_two_cycles_quotient n : ZMod p)
derangements_no_two_cycles_quotient_baseIn LeanElementary Number Theory

The three seed cases of the anti-periodicity, for every odd prime p: Q_{3+p} ≡ -Q_3, Q_{4+p} ≡ -Q_4, Q_{5+p} ≡ -Q_5 in ZMod p.

theorem derangements_no_two_cycles_quotient_base (p : ℕ) (hp : p.Prime) (hp_odd : Odd p) : (derangements_no_two_cycles_quotient (3 + p) : ZMod p) = - (derangements_no_two_cycles_quotient 3 : ZMod p) ∧ (derangements_no_two_cycles_quotient (4 + p) : ZMod p) = - (derangements_no_two_cycles_quotient 4 : ZMod p) ∧ (derangements_no_two_cycles_quotient (5 + p) : ZMod p) = - (derangements_no_two_cycles_quotient 5 : ZMod p)
derangements_no_two_cycles_quotient_odd_prime_divisorsIn LeanElementary Number Theory

An odd prime p divides derangements_no_two_cycles_quotient n for some n ≥ 3 if and only if it divides derangements_no_two_cycles_quotient n for some n with 3 ≤ n ≤ p + 2, and the set of odd primes that divide derangements_no_two_cycles_quotient n for some n ≥ 3 is infinite.

theorem derangements_no_two_cycles_quotient_odd_prime_divisors :
    (∀ p : ℕ, p.Prime → Odd p →
      ((∃ n ≥ 3, p ∣ derangements_no_two_cycles_quotient n) ↔
       (∃ n, 3 ≤ n ∧ n ≤ p + 2 ∧ p ∣ derangements_no_two_cycles_quotient n))) ∧
    {p : ℕ | p.Prime ∧ Odd p ∧ ∃ n ≥ 3, p ∣ derangements_no_two_cycles_quotient n}.Infinite
derangements_no_two_cycles_quotient_prime_dvd_iffIn LeanElementary Number Theory

For every odd prime p, p divides derangements_no_two_cycles_quotient n for some n ≥ 3 if and only if p divides derangements_no_two_cycles_quotient n for some n with 3 ≤ n ≤ p + 2.

theorem derangements_no_two_cycles_quotient_prime_dvd_iff (p : ℕ) (hp : p.Prime) (hp_odd : Odd p) : (∃ n ≥ 3, p ∣ derangements_no_two_cycles_quotient n) ↔ ∃ n, 3 ≤ n ∧ n ≤ p + 2 ∧ p ∣ derangements_no_two_cycles_quotient n
derangements_no_two_cycles_quotient_recurrenceIn LeanElementary Number Theory

The quotient Q_n = a(n)/((n-1)(n-2)) satisfies Q_n = (n-3)·Q_{n-1} + (n-4)(n-5)·Q_{n-3} for n ≥ 6.

theorem derangements_no_two_cycles_quotient_recurrence (n : ℕ) (hn : 6 ≤ n) : derangements_no_two_cycles_quotient n = (n - 3) * derangements_no_two_cycles_quotient (n - 1) + (n - 4) * (n - 5) * derangements_no_two_cycles_quotient (n - 3)
derangements_no_two_cycles_quotient_small_valuesIn LeanElementary Number Theory

The small values: Q_4 = 1, Q_5 = 2, Q_6 = 8, Q_7 = 38, Q_8 = 214.

theorem derangements_no_two_cycles_quotient_small_values : derangements_no_two_cycles_quotient 4 = 1 ∧ derangements_no_two_cycles_quotient 5 = 2 ∧ derangements_no_two_cycles_quotient 6 = 8 ∧ derangements_no_two_cycles_quotient 7 = 38 ∧ derangements_no_two_cycles_quotient 8 = 214
designated_odd_part_gen_fun_low_coeffsIn LeanElementary Number Theory

The odd-part designated-summand generating function G (the one used to define B_k(n)) begins 1 + X + 2X^2 + 4X^3: its coefficients in degrees 0, 1, 2, 3 are 1, 1, 2, 4.

theorem designated_odd_part_gen_fun_low_coeffs :
    (PowerSeries.coeff 0) designated_odd_part_gen_fun = 1 ∧
    (PowerSeries.coeff 1) designated_odd_part_gen_fun = 1 ∧
    (PowerSeries.coeff 2) designated_odd_part_gen_fun = 2 ∧
    (PowerSeries.coeff 3) designated_odd_part_gen_fun = 4
designated_odd_part_gen_fun_pow_const_coeffIn LeanElementary Number Theory

For every k, the constant coefficient of G^k is 1, where G is the odd-part designated-summand generating function.

theorem designated_odd_part_gen_fun_pow_const_coeff (k : ℕ) :
    (PowerSeries.coeff 0) (designated_odd_part_gen_fun ^ k) = 1
designated_odd_part_gen_fun_pow_one_coeffIn LeanElementary Number Theory

For every k, the coefficient of X in G^k is k.

theorem designated_odd_part_gen_fun_pow_one_coeff (k : ℕ) :
    (PowerSeries.coeff 1) (designated_odd_part_gen_fun ^ k) = k
designated_odd_part_gen_fun_pow_three_coeff_sixIn LeanElementary Number Theory

For every k, 6 * [X^3] G^k = k(k+2)(k+7).

theorem designated_odd_part_gen_fun_pow_three_coeff_six (k : ℕ) :
    6 * (PowerSeries.coeff 3) (designated_odd_part_gen_fun ^ k) = k * (k + 2) * (k + 7)
designated_odd_part_gen_fun_pow_two_coeff_twiceIn LeanElementary Number Theory

For every k, 2 * [X^2] G^k = k^2 + 3k.

theorem designated_odd_part_gen_fun_pow_two_coeff_twice (k : ℕ) :
    2 * (PowerSeries.coeff 2) (designated_odd_part_gen_fun ^ k) = k * k + 3 * k
designated_odd_partition_b3_formulaIn LeanElementary Number Theory

For every k ≥ 1, the number of designated odd partition k-tuples of size 3 equals k(k+2)(k+7)/6.

theorem designated_odd_partition_b3_formula (k : ℕ) (hk : 1 ≤ k) : designated_odd_partition_k_tuple k 3 = designated_odd_partition_b3 k
designated_odd_partition_b3_two_adicIn LeanElementary Number Theory

Class-by-class 2-adic valuation of b3 k = k(k+2)(k+7)/6: it equals v2(k) when 4 divides k, 2 when k ≡ 2 mod 8, 1 when k ≡ 5 mod 8, is odd when k ≡ 3 or 7 mod 8, and equals 2 when k ≡ 1 mod 16 and 3 when k ≡ 6 mod 16.

theorem designated_odd_partition_b3_two_adic (k : ℕ) (hk : 1 ≤ k) : (4 ∣ k → padicValNat 2 (designated_odd_partition_b3 k) = padicValNat 2 k) ∧ (k % 8 = 2 → padicValNat 2 (designated_odd_partition_b3 k) = 2) ∧ (k % 8 = 5 → padicValNat 2 (designated_odd_partition_b3 k) = 1) ∧ (k % 8 = 3 ∨ k % 8 = 7 → designated_odd_partition_b3 k % 2 = 1) ∧ (k % 16 = 1 → padicValNat 2 (designated_odd_partition_b3 k) = 2) ∧ (k % 16 = 6 → padicValNat 2 (designated_odd_partition_b3 k) = 3)
designated_odd_partition_four_dvd_exact_valuationIn LeanElementary Number Theory

For every k ≥ 1 divisible by 4: for all n, the predicted valuation is at most the 2-adic valuation of B_k(4n+3), and that valuation is attained at some n (namely n = 0). This is the k ≡ 0,4 mod 8 half of the target.

theorem designated_odd_partition_four_dvd_exact_valuation (k : ℕ) (hk : 1 ≤ k) (hk4 : 4 ∣ k) : (∀ n : ℕ, designated_odd_partition_predicted_valuation k ≤ padicValNat 2 (designated_odd_partition_k_tuple k (4 * n + 3))) ∧ (∃ n : ℕ, padicValNat 2 (designated_odd_partition_k_tuple k (4 * n + 3)) = designated_odd_partition_predicted_valuation k)
designated_odd_partition_four_dvd_k_tuple_two_adicIn LeanElementary Number Theory

For every k divisible by 4 and every n, 2^(v_2(k)) divides the number of designated odd partition k-tuples of 4n+3; i.e. the 2-adic valuation of B_k(4n+3) is at least v_2(k).

theorem designated_odd_partition_four_dvd_k_tuple_two_adic (k n : ℕ) (hk : 4 ∣ k) : 2 ^ padicValNat 2 k ∣ designated_odd_partition_k_tuple k (4 * n + 3)
designated_odd_partition_pow_two_odd_coeff_two_adicIn LeanElementary Number Theory

For any integer power series f, any s ≥ 1 and any odd m, the coefficient of X^m in f^(2^s) is divisible by 2^s.

theorem designated_odd_partition_pow_two_odd_coeff_two_adic (f : PowerSeries ℤ) (s m : ℕ) (hs : 1 ≤ s) (hm : Odd m) : (2 : ℤ) ^ s ∣ PowerSeries.coeff m (f ^ 2 ^ s)
designated_odd_partition_three_seven_mod_eight_exact_valuationIn LeanElementary Number Theory

For every k with k ≡ 3 or 7 mod 8: for all n, the predicted valuation (which is 0) is at most the 2-adic valuation of B_k(4n+3), and some n (namely n = 0) attains it. This is the k ≡ 3,7 mod 8 half of the target.

theorem designated_odd_partition_three_seven_mod_eight_exact_valuation (k : ℕ) (hk : k % 8 = 3 ∨ k % 8 = 7) : (∀ n : ℕ, designated_odd_partition_predicted_valuation k ≤ padicValNat 2 (designated_odd_partition_k_tuple k (4 * n + 3))) ∧ (∃ n : ℕ, padicValNat 2 (designated_odd_partition_k_tuple k (4 * n + 3)) = designated_odd_partition_predicted_valuation k)
designated_odd_partition_tuple_b3_oddIn LeanElementary Number Theory

For k ≡ 3 mod 4, B_k(3) is odd.

theorem designated_odd_partition_tuple_b3_odd (k : ℕ) (hmod : k % 4 = 3) :
    ¬ (2 ∣ designated_odd_partition_tuple_coeff k 3)
designated_odd_partition_tuple_coeff_eq_k_tupleIn LeanElementary Number Theory

The two definitions of B_k(n) in this topic, designated_odd_partition_tuple_coeff and designated_odd_partition_k_tuple, are the same function: both are the nth coefficient of the kth power of the generating function of partitions into odd parts with designated summands.

theorem designated_odd_partition_tuple_coeff_eq_k_tuple : designated_odd_partition_tuple_coeff = designated_odd_partition_k_tuple
designated_odd_partition_tuple_coeff_threeIn LeanElementary Number Theory

B_k(3) = k(k+2)(k+7)/6, for every k.

theorem designated_odd_partition_tuple_coeff_three (k : ℕ) :
    designated_odd_partition_tuple_coeff k 3 = k * (k + 2) * (k + 7) / 6
designated_partition_a3_two_adicIn LeanElementary Number Theory

The 2-adic valuation of designated_partition_a3 k equals v_2(k) when 4 divides k, and equals 0 when k ≡ 1 mod 4.

theorem designated_partition_a3_two_adic (k : ℕ) (hk : 1 ≤ k) :
    (4 ∣ k → padicValNat 2 (designated_partition_a3 k) = padicValNat 2 k) ∧
    (k % 4 = 1 → padicValNat 2 (designated_partition_a3 k) = 0)
designated_partition_four_dvd_exact_valuationIn LeanElementary Number Theory

For every k ≥ 1 divisible by 4, the 2-adic valuation of designated_partition_k_tuple k (4 * n + 3) is at least predicted_valuation k for all n, and equals predicted_valuation k at some n.

theorem designated_partition_four_dvd_exact_valuation (k : ℕ) (hk : 1 ≤ k) (hk4 : 4 ∣ k) :
    (∀ n : ℕ, designated_partition_predicted_valuation k ≤ padicValNat 2 (designated_partition_k_tuple k (4 * n + 3))) ∧
    (∃ n : ℕ, padicValNat 2 (designated_partition_k_tuple k (4 * n + 3)) = designated_partition_predicted_valuation k)
designated_partition_mod_four_eq_one_exact_valuationIn LeanElementary Number Theory

For every k with k % 4 = 1, the 2-adic valuation of designated_partition_k_tuple k (4 * n + 3) is at least predicted_valuation k for all n, and equals predicted_valuation k at n = 0.

theorem designated_partition_mod_four_eq_one_exact_valuation (k : ℕ) (hk : k % 4 = 1) :
    (∀ n : ℕ, designated_partition_predicted_valuation k ≤ padicValNat 2 (designated_partition_k_tuple k (4 * n + 3))) ∧
    (∃ n : ℕ, padicValNat 2 (designated_partition_k_tuple k (4 * n + 3)) = designated_partition_predicted_valuation k)
designated_partition_mod_four_eq_three_exact_valuationIn LeanElementary Number Theory

For every k ≥ 1 with k % 4 = 3, the 2-adic valuation of designated_partition_k_tuple k (4 * n + 3) is at least predicted_valuation k for all n, and equals predicted_valuation k at some n.

theorem designated_partition_mod_four_eq_three_exact_valuation (k : ℕ) (hk : 1 ≤ k) (h3 : k % 4 = 3) :
    (∀ n : ℕ, designated_partition_predicted_valuation k ≤ padicValNat 2 (designated_partition_k_tuple k (4 * n + 3))) ∧
    (∃ n : ℕ, padicValNat 2 (designated_partition_k_tuple k (4 * n + 3)) = designated_partition_predicted_valuation k)
designated_partition_mod_four_eq_two_exact_valuationIn LeanElementary Number Theory

For every k ≥ 1 with k % 4 = 2, the 2-adic valuation of designated_partition_k_tuple k (4 * n + 3) is at least predicted_valuation k for all n, and equals predicted_valuation k at some n.

theorem designated_partition_mod_four_eq_two_exact_valuation (k : ℕ) (hk : 1 ≤ k) (h2 : k % 4 = 2) :
    (∀ n : ℕ, designated_partition_predicted_valuation k ≤ padicValNat 2 (designated_partition_k_tuple k (4 * n + 3))) ∧
    (∃ n : ℕ, padicValNat 2 (designated_partition_k_tuple k (4 * n + 3)) = designated_partition_predicted_valuation k)
designated_partition_mod_four_ge_two_exact_valuationIn LeanElementary Number Theory

For every k ≥ 1 with k % 4 = 2 or k % 4 = 3, the 2-adic valuation of designated_partition_k_tuple k (4 * n + 3) is at least predicted_valuation k for all n, and equals predicted_valuation k at some n.

theorem designated_partition_mod_four_ge_two_exact_valuation (k : ℕ) (hk : 1 ≤ k) (hk23 : k % 4 = 2 ∨ k % 4 = 3) :
    (∀ n : ℕ, designated_partition_predicted_valuation k ≤ padicValNat 2 (designated_partition_k_tuple k (4 * n + 3))) ∧
    (∃ n : ℕ, padicValNat 2 (designated_partition_k_tuple k (4 * n + 3)) = designated_partition_predicted_valuation k)
designated_partition_predicted_valuation_of_mod_four_eq_threeIn LeanElementary Number Theory

For every natural number k with k % 4 = 3, the predicted valuation of k is equal to the 2-adic valuation of designated_partition_a3 k.

theorem designated_partition_predicted_valuation_of_mod_four_eq_three (k : ℕ) (h : k % 4 = 3) :
    designated_partition_predicted_valuation k = padicValNat 2 (designated_partition_a3 k)
designated_partition_predicted_valuation_of_mod_sixteen_eq_twoIn LeanElementary Number Theory

For every natural number k with k % 16 = 2, the predicted valuation of k is equal to 3.

theorem designated_partition_predicted_valuation_of_mod_sixteen_eq_two (k : ℕ) (h : k % 16 = 2) :
    designated_partition_predicted_valuation k = 3
designated_partition_six_tuple_universal_mod_243Needs helpElementary Number Theory

For every natural number n, 243 divides the number of designated partition 6-tuples of size 12n + 10.

theorem designated_partition_six_tuple_universal_mod_243 :
    ∀ n : ℕ, 243 ∣ designated_partition_k_tuple 6 (12 * n + 10)
exists_int_vec_orthogonal_no_zero_coord_outside_lineIn LeanElementary Number Theory

Let n ≥ 2, let U ⊆ ℝ^n be the real span of integer vectors w_1,...,w_k with dim U ≤ n - 2, and let z be an integer vector. Then U^⊥ contains an integer vector s with no zero coordinate whose image is not on the real line spanned by z.

open Submodule in
theorem exists_int_vec_orthogonal_no_zero_coord_outside_line {k n : ℕ} (hn : 2 ≤ n)
    (w : Fin k → Fin n → ℤ) (U : Submodule ℝ (EuclideanSpace ℝ (Fin n)))
    (hU : U = Submodule.span ℝ (Set.range fun i => int_to_euclidean n (w i)))
    (h_dim : Module.finrank ℝ U ≤ n - 2) (z : Fin n → ℤ) :
    ∃ s : Fin n → ℤ, (∀ i, s i ≠ 0) ∧ int_to_euclidean n s ∈ Uᗮ ∧
      int_to_euclidean n s ∉ Submodule.span ℝ {int_to_euclidean n z}
factorization_factorial_le_prod_mul_add_oneIn LeanElementary Number Theory

For a prime $q$ not dividing $d$, the $q$-adic valuation of $k!$ is at most that of $\prod_{j<k}(dj+1)$: each factor $dj+1$ runs through one residue class modulo $q^e$, and every residue class modulo $q^e$ is met by at least $k/q^e$ indices $j<k$.

theorem factorization_factorial_le_prod_mul_add_one (d k q : ℕ) (hd : 0 < d) (hq : q.Prime) (hqd : ¬ q ∣ d) :
    (k.factorial).factorization q ≤ (∏ i ∈ Finset.range k, (d * i + 1)).factorization q
falling_factorial_dvd_restricted_cycle_perms_countIn LeanElementary Number Theory

Theorem 3.1(i) of arXiv:2610.40342 at r = 3: if 1, 2, 3 ∈ S then the falling factorial (n-1)(n-2)(n-3) divides a_S(n) = restricted_cycle_perms_count n S, for n ≥ 1.

theorem falling_factorial_dvd_restricted_cycle_perms_count (n : ℕ) (S : Finset ℕ) (hn : 1 ≤ n) (h1 : 1 ∈ S) (h2 : 2 ∈ S) (h3 : 3 ∈ S) : (n - 1) * (n - 2) * (n - 3) ∣ restricted_cycle_perms_count n S
finset_int_card_threeIn LeanElementary Number Theory

Every 3-element set of integers A can be written in the form {a, a+x, a+y} where a is the minimum element and 0 < x < y.

theorem finset_int_card_three (A : Finset ℤ) (hA : A.card = 3) :
    ∃ a x y : ℤ, 0 < x ∧ x < y ∧ A = {a, a + x, a + y}
finsupp_box_sum_eq_piFinset_sumIn LeanElementary Number Theory

A sum over the exponent box Iic k of a product over the support of F of G p (j p) equals the sum over the product of the coordinate ranges range (k p + 1) of the same product.

theorem finsupp_box_sum_eq_piFinset_sum (F k : Nat →₀ Nat) (hk : k ≤ F) (G : Nat → Nat → Complex) :
    (∑ j ∈ Finset.Iic k, ∏ p ∈ F.support, G p (j p))
      = ∑ x ∈ Fintype.piFinset (fun p : {p // p ∈ F.support} => Finset.range (k p.1 + 1)),
          ∏ p : {p // p ∈ F.support}, G p.1 (x p)
fourier_threshold_nu_five_le_elevenIn LeanElementary Number Theory

The explicit dimension-5 witness has unique zero at 0 and Fourier support at most 11, hence nu(5) ≤ 11.

theorem fourier_threshold_nu_five_le_eleven : fourier_threshold_nu 5 ≤ 11
fourier_threshold_nu_le_card_of_witnessIn LeanElementary Number Theory

Any explicit function f : (ZMod 2)^d → ZMod 3 with unique zero at 0 whose Fourier support has size at most N shows that the Fourier threshold satisfies nu(d) ≤ N.

theorem fourier_threshold_nu_le_card_of_witness (d N : ℕ)
    (f : (Fin d → ZMod 2) → ZMod 3)
    (hf : ∀ x, f x = 0 ↔ x = 0)
    (hN : (Finset.univ.filter (fun u : Fin d → ZMod 2 =>
      ((-1 : ZMod 3) ^ d * ∑ x, f x * (if ∑ i, u i * x i = 0 then 1 else -1)) ≠ 0)).card ≤ N) :
    fourier_threshold_nu d ≤ N
fourier_threshold_nu_odd_le_arithmetic_boundIn LeanElementary Number Theory

For every integer m >= 1, the arithmetic bound lambda_{2m+1} is an upper bound on the Fourier threshold nu(2m+1).

theorem fourier_threshold_nu_odd_le_arithmetic_bound (m : ℕ) (hm : 1 ≤ m) :
    fourier_threshold_nu (2 * m + 1) ≤ arithmetic_fourier_bound (2 * m + 1)
fourier_threshold_nu_odd_le_arithmetic_bound_oneIn LeanElementary Number Theory

The first instance m = 1 of the target: nu(3) ≤ lambda_3.

theorem fourier_threshold_nu_odd_le_arithmetic_bound_one :
    fourier_threshold_nu (2 * 1 + 1) ≤ arithmetic_fourier_bound (2 * 1 + 1)
fourier_threshold_nu_odd_le_arithmetic_bound_twoIn LeanElementary Number Theory

The instance m = 2 of the target: nu(5) ≤ lambda_5 = 11.

theorem fourier_threshold_nu_odd_le_arithmetic_bound_two :
    fourier_threshold_nu (2 * 2 + 1) ≤ arithmetic_fourier_bound (2 * 2 + 1)
global_gcd_agreement_r_ge_fourIn LeanElementary Number Theory

For every r ≥ 4 and n ≥ r + 2, restricted_cycle_global_gcd r n = restricted_cycle_one_param_gcd r n.

theorem global_gcd_agreement_r_ge_four (r : ℕ) (hr : 4 ≤ r) (n : ℕ) (hn : r + 2 ≤ n) : restricted_cycle_global_gcd r n = restricted_cycle_one_param_gcd r n
global_gcd_agreement_r_three_eqIn LeanElementary Number Theory

For r = 3 and n ≥ 5, if ¬(111 ≤ n ∧ n % 81 = 30), then restricted_cycle_global_gcd 3 n = restricted_cycle_one_param_gcd 3 n.

theorem global_gcd_agreement_r_three_eq (n : ℕ) (hn : 5 ≤ n) (h : ¬ (111 ≤ n ∧ n % 81 = 30)) : restricted_cycle_global_gcd 3 n = restricted_cycle_one_param_gcd 3 n
global_gcd_agreement_r_three_neIn LeanElementary Number Theory

For r = 3, if 111 ≤ n and n % 81 = 30, then restricted_cycle_global_gcd 3 n ≠ restricted_cycle_one_param_gcd 3 n.

theorem global_gcd_agreement_r_three_ne (n : ℕ) (hn : 111 ≤ n) (hmod : n % 81 = 30) : restricted_cycle_global_gcd 3 n ≠ restricted_cycle_one_param_gcd 3 n
good_slopes_105_extract_rectangleIn LeanElementary Number Theory

If a non-extremal permutation modulo 105 has more than 40 good slopes and admits the unit-cover shift, then one of its 35-point CRT fibers has width at most three, a bad unit direction, and all unit directions good outside a two-by-three rectangle of the specified form.

theorem good_slopes_105_extract_rectangle (f : Equiv.Perm (ZMod 105)) (hf : ¬ is_extremal_perm 105 f) (hlarge : 40 < (good_slopes 105 f).card) (hcover : ∃ c : ZMod 105, IsUnit c ∧ ∀ m ∈ good_slopes 105 f, IsUnit (m+c)) : ∃ (S : Finset (ZMod 35 × ZMod 35)) (a₁ a₂ : ZMod 5) (t : ZMod 7), S.card = 35 ∧ (∀ x : ZMod 35, (S.filter fun p => p.1 = x).card ≤ 3) ∧ a₁ ≠ 0 ∧ a₂ ≠ 0 ∧ a₁ ≠ a₂ ∧ t ≠ 0 ∧ (∀ b : ZMod 35, IsUnit b → (((ZMod.castHom (by decide : 5 ∣ 35) (ZMod 5) b ≠ a₁) ∧ (ZMod.castHom (by decide : 5 ∣ 35) (ZMod 5) b ≠ a₂)) ∨ ((ZMod.castHom (by decide : 7 ∣ 35) (ZMod 7) b ≠ t) ∧ (ZMod.castHom (by decide : 7 ∣ 35) (ZMod 7) b ≠ 2*t) ∧ (ZMod.castHom (by decide : 7 ∣ 35) (ZMod 7) b ≠ 4*t))) → b ∈ good_slopes_point_directions 35 S) ∧ (∃ b : ZMod 35, IsUnit b ∧ b ∉ good_slopes_point_directions 35 S)
good_slopes_fiber35_anchored_cross_neighborsIn LeanElementary Number Theory

For a 35-point set containing the normalized bad-line anchors with difference 1, 5 or 7 and having at most three points on that line, at least one of the three neighboring directions sharing its residue modulo 7 is bad, and at least two of the five neighboring directions sharing its residue modulo 5 are bad.

theorem good_slopes_fiber35_anchored_cross_neighbors (S : Finset (ZMod 35 × ZMod 35)) (hcard : S.card = 35) (d : ZMod 35) (hd : d = 1 ∨ d = 5 ∨ d = 7) (h0 : (0,0) ∈ S) (h1 : (d,-d) ∈ S) (hline : (S.filter (fun p => p.2 + p.1 = 0)).card ≤ 3) : (∃ a ∈ ({8,22,29} : Finset (ZMod 35)), a ∉ good_slopes_point_directions 35 S) ∧ ((good_slopes_point_directions 35 S).filter (fun a => a ∈ ({6,11,16,26,31} : Finset (ZMod 35)))).card ≤ 3
good_slopes_fiber35_rectangle_linear_casesIn LeanElementary Number Theory

No 35-point set containing (0,0) and (1,34) has all unit directions good outside a rectangle whose two residues modulo 5 are 1 and either 2 or 4 and whose three residues modulo 7 are one of {1,2,3}, {1,2,5}, or {1,2,6}.

theorem good_slopes_fiber35_rectangle_linear_cases (S : Finset (ZMod 35 × ZMod 35)) (hcard : S.card = 35) (h0 : (0,0) ∈ S) (h1 : (1,34) ∈ S) (ratio : ℕ) (hratio : ratio = 2 ∨ ratio = 4) (columns : Finset ℕ) (hcolumns : columns = {1,2,3} ∨ columns = {1,2,5} ∨ columns = {1,2,6}) (hgood : ∀ a : ZMod 35, IsUnit a → ¬ ((a.val % 5 = 1 ∨ a.val % 5 = ratio) ∧ a.val % 7 ∈ columns) → a ∈ good_slopes_point_directions 35 S) : False
good_slopes_fiber55_bad_neighborsIn LeanElementary Number Theory

For any 55 points over Z/55Z and any bad unit direction, at least three of its twelve other unit directions sharing a residue modulo 5 or modulo 11 are also bad.

theorem good_slopes_fiber55_bad_neighbors (S : Finset (ZMod 55 × ZMod 55)) (hcard : S.card = 55) (a : ZMod 55) (ha : IsUnit a) (hbad : a ∉ good_slopes_point_directions 55 S) : ((good_slopes_point_directions 55 S).filter (fun b => b ≠ a ∧ (b.val % 5 = a.val % 5 ∨ b.val % 11 = a.val % 11))).card ≤ 9
good_slopes_fiber55_colored_gap_structuralIn LeanElementary Number Theory

A three-colored 55-point set over Z/55 with any bad unit direction has at most 32 good unit directions.

theorem good_slopes_fiber55_colored_gap_structural (S : Finset (ZMod 55 × ZMod 55)) (color : (ZMod 55 × ZMod 55) → Fin 3) (hcard : S.card = 55) (hx : ∀ p ∈ S, ∀ q ∈ S, color p = color q → p.1 = q.1 → p = q) (hc : ∀ b : ZMod 55, IsUnit b → ∀ p ∈ S, ∀ q ∈ S, color p = color q → p.2 + b*p.1 = q.2 + b*q.1 → p = q) (hbad : ∃ b : ZMod 55, IsUnit b ∧ b ∉ good_slopes_point_directions 55 S) : (good_slopes_point_directions 55 S).card ≤ 32
good_slopes_fiber55_many_good_rows_fullIn LeanElementary Number Theory

A three-colored 55-point set over Z/55 with at least 33 good unit directions has at least three fully good mod-5 unit rows.

theorem good_slopes_fiber55_many_good_rows_full (S : Finset (ZMod 55 × ZMod 55)) (color : (ZMod 55 × ZMod 55) → Fin 3) (hcard : S.card = 55) (hx : ∀ p ∈ S, ∀ q ∈ S, color p = color q → p.1 = q.1 → p = q) (hc : ∀ b : ZMod 55, IsUnit b → ∀ p ∈ S, ∀ q ∈ S, color p = color q → p.2 + b*p.1 = q.2 + b*q.1 → p = q) (hgood : 33 ≤ (good_slopes_point_directions 55 S).card) : 3 ≤ ((Finset.univ : Finset (ZMod 5)).filter fun a => IsUnit a ∧ ∀ b : ZMod 55, IsUnit b → b.val % 5 = a.val → b ∈ good_slopes_point_directions 55 S).card
good_slopes_fiber55_three_full_rows_force_allIn LeanElementary Number Theory

For a three-colored 55-point set over Z/55, if three of the four mod-5 unit rows are entirely good, all unit directions are good.

theorem good_slopes_fiber55_three_full_rows_force_all (S : Finset (ZMod 55 × ZMod 55)) (color : (ZMod 55 × ZMod 55) → Fin 3) (hcard : S.card = 55) (hx : ∀ p ∈ S, ∀ q ∈ S, color p = color q → p.1 = q.1 → p = q) (hc : ∀ b : ZMod 55, IsUnit b → ∀ p ∈ S, ∀ q ∈ S, color p = color q → p.2 + b*p.1 = q.2 + b*q.1 → p = q) (hrows : 3 ≤ ((Finset.univ : Finset (ZMod 5)).filter fun a => IsUnit a ∧ ∀ b : ZMod 55, IsUnit b → b.val % 5 = a.val → b ∈ good_slopes_point_directions 55 S).card) : ∀ b : ZMod 55, IsUnit b → b ∈ good_slopes_point_directions 55 S
good_slopes_fiber55_unit_gapIn LeanElementary Number Theory

For any 55 points over Z/55Z, if at least one unit direction fails to be injective, then at most 36 of the 40 unit directions are injective.

theorem good_slopes_fiber55_unit_gap (S : Finset (ZMod 55 × ZMod 55)) (hcard : S.card = 55) (hbad : ∃ a : ZMod 55, IsUnit a ∧ a ∉ good_slopes_point_directions 55 S) : (good_slopes_point_directions 55 S).card ≤ 36
good_slopes_field_units_force_axisIn LeanElementary Number Theory

Let K be a field and S a finite set of points in K squared. If y+b*x is injective on S for every nonzero b in K, then all points of S have a common first coordinate or all points have a common second coordinate.

theorem good_slopes_field_units_force_axis (K : Type*) [Field K] [DecidableEq K] (S : Finset (K × K)) (h : ∀ b : K, b ≠ 0 → Set.InjOn (fun p : K × K => p.2 + b*p.1) S) : (∃ x : K, ∀ p ∈ S, p.1 = x) ∨ (∃ y : K, ∀ p ∈ S, p.2 = y)
good_slopes_full_row_column_axis_parameterizationIn LeanElementary Number Theory

Let K and L be finite fields and S a set of |K|·|L| points in (K×L) squared. Suppose all directions with a nonzero K coordinate and L coordinate 1, and all directions with K coordinate 1 and a nonzero L coordinate, are injective on S. Then the pair (yK+xK,yL+xL) labels the points of S uniquely, and there are choices of a horizontal or vertical axis line and an offset for each fiber over each field such that the input coordinates are given by the corresponding axis-line formulas.

theorem good_slopes_full_row_column_axis_parameterization (K L : Type*) [Field K] [Field L] [Fintype K] [Fintype L] [DecidableEq K] [DecidableEq L] (S : Finset ((K × L) × (K × L))) (hcard : S.card = Fintype.card K * Fintype.card L) (hcol : ∀ a : K, a ≠ 0 → Set.InjOn (fun p : (K × L) × (K × L) => (p.2.1 + a*p.1.1, p.2.2 + p.1.2)) S) (hrow : ∀ b : L, b ≠ 0 → Set.InjOn (fun p : (K × L) × (K × L) => (p.2.1 + p.1.1, p.2.2 + b*p.1.2)) S) : ∃ (verticalK : L → Bool) (offsetK : L → K) (verticalL : K → Bool) (offsetL : K → L), (∀ p ∈ S, let s := p.2.1 + p.1.1; let t := p.2.2 + p.1.2; p.1.1 = (if verticalK t then offsetK t else s - offsetK t) ∧ p.1.2 = (if verticalL s then offsetL s else t - offsetL s)) ∧ (∀ (s : K) (t : L), ∃! p : (K × L) × (K × L), p ∈ S ∧ p.2.1 + p.1.1 = s ∧ p.2.2 + p.1.2 = t)
good_slopes_full_row_column_force_axis_fibersIn LeanElementary Number Theory

Let K and L be fields and let S be a finite set of points in (K×L) squared. Suppose all directions whose K coordinate is nonzero and whose L coordinate is 1 are injective on S, and all directions whose K coordinate is 1 and whose L coordinate is nonzero are injective on S. Then every fiber of yL+xL has all of its K-projected points on one horizontal or vertical line, and every fiber of yK+xK has all of its L-projected points on one horizontal or vertical line.

theorem good_slopes_full_row_column_force_axis_fibers (K L : Type*) [Field K] [Field L] [DecidableEq K] [DecidableEq L] (S : Finset ((K × L) × (K × L))) (hcol : ∀ a : K, a ≠ 0 → Set.InjOn (fun p : (K × L) × (K × L) => (p.2.1 + a*p.1.1, p.2.2 + p.1.2)) S) (hrow : ∀ b : L, b ≠ 0 → Set.InjOn (fun p : (K × L) × (K × L) => (p.2.1 + p.1.1, p.2.2 + b*p.1.2)) S) : (∀ t : L, (∃ x : K, ∀ p ∈ S, p.2.2 + p.1.2 = t → p.1.1 = x) ∨ (∃ y : K, ∀ p ∈ S, p.2.2 + p.1.2 = t → p.2.1 = y)) ∧ (∀ s : K, (∃ x : L, ∀ p ∈ S, p.2.1 + p.1.1 = s → p.1.2 = x) ∨ (∃ y : L, ∀ p ∈ S, p.2.1 + p.1.1 = s → p.2.2 = y))
good_slopes_gap105_from_fiber_boundsIn LeanElementary Number Theory

Assume the unit-cover property for permutations modulo 105, the 35-point unit-direction gap of 20, and the three-color 35-point gap of 16 under the indicated color-wise injectivity conditions. Then every non-extremal permutation modulo 105 has at most 40 good slopes.

theorem good_slopes_gap105_from_fiber_bounds (hcover : ∀ f : Equiv.Perm (ZMod 105), ∃ c : ZMod 105, IsUnit c ∧ ∀ m ∈ good_slopes 105 f, IsUnit (m+c)) (hgap : ∀ S : Finset (ZMod 35 × ZMod 35), S.card = 35 → (∃ a : ZMod 35, IsUnit a ∧ a ∉ good_slopes_point_directions 35 S) → (good_slopes_point_directions 35 S).card ≤ 20) (hcolored : ∀ (S : Finset (ZMod 35 × ZMod 35)) (c : (ZMod 35 × ZMod 35) → Fin 3), S.card = 35 → (∀ p ∈ S, ∀ q ∈ S, c p = c q → p.1 = q.1 → p = q) → (∀ a : ZMod 35, IsUnit a → ∀ p ∈ S, ∀ q ∈ S, c p = c q → p.2 + a*p.1 = q.2 + a*q.1 → p = q) → (∃ a : ZMod 35, IsUnit a ∧ a ∉ good_slopes_point_directions 35 S) → (good_slopes_point_directions 35 S).card ≤ 16) (f : Equiv.Perm (ZMod 105)) (hf : ¬ is_extremal_perm 105 f) : (good_slopes 105 f).card ≤ 40
good_slopes_gap_three_primes_conditionalIn LeanElementary Number Theory

For primes 5≤p and q≥2p−1 with 3(p+1)<2q, the conjectured gap for a nonextremal permutation modulo 3pq follows from the two finite-field direction classifications and the unit-cover normalization.

theorem good_slopes_gap_three_primes_conditional (p q : ℕ)
    [Fact (Nat.Prime p)] [Fact (Nat.Prime q)] (hp : 5 ≤ p) (hsep : 2*p-1 ≤ q)
    (hsize : (p+1)*3 < 2*q) (hdirP : (∀ T : Finset (ZMod p × ZMod p), T.card = p →
      (∃ G : Finset (ZMod p), (p+1)/2 ≤ G.card ∧ ∀ a ∈ G, Set.InjOn (fun z : ZMod p × ZMod p => z.2 + a*z.1) T) →
      (∃ x : ZMod p, ∀ z ∈ T, z.1 = x) ∨ (∃ a t : ZMod p, ∀ z ∈ T, z.2 + a*z.1 = t))) (hdirQ : (∀ T : Finset (ZMod q × ZMod q), T.card = q →
      (∃ G : Finset (ZMod q), (q+1)/2 ≤ G.card ∧ ∀ a ∈ G, Set.InjOn (fun z : ZMod q × ZMod q => z.2 + a*z.1) T) →
      (∃ x : ZMod q, ∀ z ∈ T, z.1 = x) ∨ (∃ a t : ZMod q, ∀ z ∈ T, z.2 + a*z.1 = t)))
    (f : Equiv.Perm (ZMod (3*(p*q)))) (hf : ¬ is_extremal_perm (3*(p*q)) f)
    (hcover : ∃ c : ZMod (3*(p*q)), ∀ m ∈ good_slopes (3*(p*q)) f, IsUnit (m+c)) :
    (good_slopes (3*(p*q)) f).card ≤ 2*(p-1)*(q-2)
good_slopes_missing_primeIn LeanElementary Number Theory

For every natural number n >= 2, every prime divisor p of n, and every permutation f of ZMod n, the set of good slopes of f misses at least one residue modulo p under the reduction map.

theorem good_slopes_missing_prime (n : ℕ) [NeZero n] (p : ℕ) (hp : p.Prime) (hd : p ∣ n) (f : Equiv.Perm (ZMod n)) : ∃ a : ZMod p, ∀ m ∈ good_slopes n f, ZMod.castHom hd (ZMod p) m ≠ a
good_slopes_missing_prime165In LeanElementary Number Theory

For a permutation modulo 165 and each prime divisor p, some residue modulo p is not attained by any good slope.

theorem good_slopes_missing_prime165 (p : ℕ) [NeZero p] (hp : p = 3 ∨ p = 5 ∨ p = 11) (hd : p ∣ 165) (f : Equiv.Perm (ZMod 165)) : ∃ a : ZMod p, ∀ m ∈ good_slopes 165 f, ZMod.castHom hd (ZMod p) m ≠ a
good_slopes_prime11_six_good_linesIn LeanElementary Number Theory

Any eleven-point set in the affine plane over the field of eleven elements with six good finite directions is a line.

theorem good_slopes_prime11_six_good_lines (S : Finset (ZMod 11 × ZMod 11)) (G : Finset (ZMod 11)) (hcard : S.card = 11) (hgood : 6 ≤ G.card) (hinj : ∀ a ∈ G, Set.InjOn (fun p : ZMod 11 × ZMod 11 => p.2 + a*p.1) S) : (∃ x : ZMod 11, ∀ p ∈ S, p.1 = x) ∨ (∃ a t : ZMod 11, ∀ p ∈ S, p.2 + a*p.1 = t)
good_slopes_rook_bad_shapesIn LeanElementary Number Theory

A nonempty subset of a four-by-six grid with at most seven cells, each having at least three other selected cells in its row or column, is contained in one row or one column, contains a two-by-three or three-by-two rectangle, or contains a cell with at least four selected cells in both its row and its column.

theorem good_slopes_rook_bad_shapes : ∀ B : Finset (Fin 4 × Fin 6), B.Nonempty → B.card ≤ 7 →
    (∀ p ∈ B, 3 ≤ (B.filter fun q => q ≠ p ∧ (q.1 = p.1 ∨ q.2 = p.2)).card) →
    (∃ row : Fin 4, ∀ p ∈ B, p.1 = row) ∨
    (∃ col : Fin 6, ∀ p ∈ B, p.2 = col) ∨
    (∃ rows : Finset (Fin 4), ∃ cols : Finset (Fin 6),
      rows.card = 2 ∧ cols.card = 3 ∧ rows.product cols ⊆ B) ∨
    (∃ rows : Finset (Fin 4), ∃ cols : Finset (Fin 6),
      rows.card = 3 ∧ cols.card = 2 ∧ rows.product cols ⊆ B) ∨
    (∃ p ∈ B, 4 ≤ (B.filter fun q => q.1 = p.1).card ∧
      4 ≤ (B.filter fun q => q.2 = p.2).card)
good_slopes_unit_cover_generalIn LeanElementary Number Theory

For every natural number n at least 2 and every permutation f of Z/nZ, there is a unit c modulo n such that m+c is a unit modulo n for every good slope m of f.

theorem good_slopes_unit_cover_general (n : ℕ) [NeZero n] (hn : 2 ≤ n) (f : Equiv.Perm (ZMod n)) : ∃ c : ZMod n, IsUnit c ∧ ∀ m ∈ good_slopes n f, IsUnit (m+c)
good_slopes_unit_cover_mod165In LeanElementary Number Theory

For every permutation modulo 165, a unit c exists such that adding c to each good slope yields a unit modulo 165.

theorem good_slopes_unit_cover_mod165 (f : Equiv.Perm (ZMod 165)) : ∃ c : ZMod 165, IsUnit c ∧ ∀ m ∈ good_slopes 165 f, IsUnit (m+c)
halving_partition_length_le_maxIn LeanElementary Number Theory

Every halving partition of $n$ has length at most $\lfloor \log_2 n \rfloor + s_2(n)$, where $s_2(n)$ is the sum of the binary digits of $n$.

theorem halving_partition_length_le_max (n : ℕ) (p : List ℕ)
    (hp : is_halving_partition n p) :
    p.length ≤ Nat.log 2 n + (Nat.digits 2 n).sum
halving_partition_max_length_uniqueIn LeanElementary Number Theory

For every integer $n \ge 1$, every halving partition of $n$ has length at most $\lfloor \log_2 n \rfloor + s_2(n)$ (where $s_2(n)$ is the sum of digits in the binary representation of $n$), and there exists a unique halving partition of $n$ with length exactly $\lfloor \log_2 n \rfloor + s_2(n)$.

theorem halving_partition_max_length_unique (n : ℕ) (hn : 1 ≤ n) :
    (∀ p : List ℕ, is_halving_partition n p → p.length ≤ Nat.log 2 n + (Nat.digits 2 n).sum) ∧
    ∃! p : List ℕ, is_halving_partition n p ∧ p.length = Nat.log 2 n + (Nat.digits 2 n).sum
halving_partition_part_ge_div_pow_twoIn LeanElementary Number Theory

In any halving partition $p$ of $n$, the part at 0-based index $i$ is at least $\lfloor n / 2^{i+1} \rfloor$.

theorem halving_partition_part_ge_div_pow_two (n : ℕ) (p : List ℕ)
    (hp : is_halving_partition n p) (i : ℕ) (hi : i < p.length) :
    n / 2 ^ (i + 1) ≤ p[i]
halving_partition_stable_submodule_existsNeeds helpElementary Number Theory

There exists a finitely generated ℤ-submodule N of ℤ^ℕ containing the sequence n ↦ halving_partition_count n that is stable under decimation by 2n and 2n+1.

theorem halving_partition_stable_submodule_exists :
    ∃ (N : Submodule ℤ (ℕ → ℤ)), N.FG ∧
      (fun n => (halving_partition_count n : ℤ)) ∈ N ∧
      (∀ g ∈ N, (fun n => g (2 * n)) ∈ N) ∧
      (∀ g ∈ N, (fun n => g (2 * n + 1)) ∈ N)
hyperbinary_aeval_omega_eq_countsIn LeanElementary Number Theory

Evaluating H_m(z) at ω expresses in terms of the modular counts as (N_0(m) - N_2(m)) + (N_1(m) - N_2(m)) * ω.

theorem hyperbinary_aeval_omega_eq_counts (m : ℕ) :
    Polynomial.aeval eisensteinOmega (hyperbinaryLengthPoly m) =
      ((hyperbinaryCountMod3 m 0 - hyperbinaryCountMod3 m 2 : ℤ) : ℂ) +
      ((hyperbinaryCountMod3 m 1 - hyperbinaryCountMod3 m 2 : ℤ) : ℂ) * eisensteinOmega
hyperbinary_count_mod3_sumIn LeanElementary Number Theory

The sum of the three modular counts N_0(m) + N_1(m) + N_2(m) equals H_m(1).

theorem hyperbinary_count_mod3_sum (m : ℕ) :
    hyperbinaryCountMod3 m 0 + hyperbinaryCountMod3 m 1 + hyperbinaryCountMod3 m 2 =
      (hyperbinaryLengthPoly m).eval 1
hyperbinary_divisibility_by_cyclotomic_threeIn LeanElementary Number Theory

The cyclotomic polynomial 1 + z + z² divides H_m(z) in ℤ[z] if and only if 3 divides the Stern diatomic sequence term s(m+1).

theorem hyperbinary_divisibility_by_cyclotomic_three (m : ℕ) :
    Polynomial.cyclotomic 3 ℤ ∣ hyperbinaryLengthPoly m ↔ 3 ∣ sternDiatomic (m + 1)
hyperbinary_eval_oneIn LeanElementary Number Theory

Evaluating the hyperbinary length polynomial H_m(z) at z = 1 gives the Stern diatomic sequence term s(m+1).

theorem hyperbinary_eval_one (m : ℕ) :
    (hyperbinaryLengthPoly m).eval 1 = (sternDiatomic (m + 1) : ℤ)
hyperbinary_expansion_lengths_mod_three_equidistributionIn LeanElementary Number Theory

For every m ≥ 0, evaluating the hyperbinary length polynomial H_m(z) at the primitive cube root of unity ω satisfies H_m(ω) ∈ {0, ±1, ±ω, ±ω²}, the counts N_0(m), N_1(m), N_2(m) of hyperbinary expansions of m modulo 3 differ pairwise by at most 1, and the multiset {N_0(m), N_1(m), N_2(m)} equals {q, q, q} if s(m+1) ≡ 0 mod 3, {q+1, q, q} if s(m+1) ≡ 1 mod 3, and {q+1, q+1, q} if s(m+1) ≡ 2 mod 3, where q = ⌊s(m+1)/3⌋.

theorem hyperbinary_expansion_lengths_mod_three_equidistribution (m : ℕ) :
    (Polynomial.aeval eisensteinOmega (hyperbinaryLengthPoly m) ∈
      ({0, 1, -1, eisensteinOmega, -eisensteinOmega, eisensteinOmega ^ 2, -eisensteinOmega ^ 2} : Set ℂ)) ∧
    (∀ r s : Fin 3, |hyperbinaryCountMod3 m r.val - hyperbinaryCountMod3 m s.val| ≤ 1) ∧
    (let q : ℤ := sternDiatomic (m + 1) / 3
     let ε := sternDiatomic (m + 1) % 3
     ({hyperbinaryCountMod3 m 0, hyperbinaryCountMod3 m 1, hyperbinaryCountMod3 m 2} : Multiset ℤ) =
       if ε = 0 then ({q, q, q} : Multiset ℤ)
       else if ε = 1 then ({q + 1, q, q} : Multiset ℤ)
       else ({q + 1, q + 1, q} : Multiset ℤ))
int_mem_h_fold_sumset_three_eqIn LeanElementary Number Theory

Every element m in the h-fold sumset of {a, a+x, a+y} can be written in the form m = ha + sx + ty with s, t ≥ 0 and s + t ≤ h.

theorem int_mem_h_fold_sumset_three_eq (h : ℕ) (a x y : ℤ)
    (m : ℤ) (hm : int_mem_h_fold_sumset h {a, a + x, a + y} m) :
    ∃ s t : ℕ, s + t ≤ h ∧ m = (h : ℤ) * a + (s : ℤ) * x + (t : ℤ) * y
int_vec_gcd_factorization_primitiveIn LeanElementary Number Theory

An integer vector z ∈ ℤ^n with no zero coordinate is a positive integer multiple of a primitive integer vector, which again has no zero coordinate: z = g·u with g > 0 and u primitive.

theorem int_vec_gcd_factorization_primitive (n : ℕ) (z : Fin n → ℤ) (hz : ∀ i, z i ≠ 0) :
    ∃ (g : ℕ) (u : Fin n → ℤ), 0 < g ∧ is_primitive_int_vec n u ∧ (∀ i, u i ≠ 0) ∧
      ∀ i, z i = (g : ℤ) * u i
int_vec_mem_orthogonal_iff_rat_equationsIn LeanElementary Number Theory

If U is the real span of integer vectors w_1,...,w_k, then an integer vector z lies in U^⊥ iff for every i the rational dot product of w_i and z vanishes.

open Submodule in
theorem int_vec_mem_orthogonal_iff_rat_equations {k n : ℕ} (w : Fin k → Fin n → ℤ)
    (U : Submodule ℝ (EuclideanSpace ℝ (Fin n)))
    (hU : U = Submodule.span ℝ (Set.range fun i => int_to_euclidean n (w i))) (z : Fin n → ℤ) :
    int_to_euclidean n z ∈ Uᗮ ↔ ∀ i, ∑ j, (w i j : ℚ) * (z j : ℚ) = 0
is_rational_subspace_finite_int_spanIn LeanElementary Number Theory

If U ⊆ ℝ^n is the real span of some set of integer vectors, then U is the real span of finitely many integer vectors.

theorem is_rational_subspace_finite_int_span (n : ℕ) (U : Submodule ℝ (EuclideanSpace ℝ (Fin n)))
    (h : is_rational_subspace n U) :
    ∃ (k : ℕ) (w : Fin k → Fin n → ℤ), U = Submodule.span ℝ (Set.range fun i => int_to_euclidean n (w i))
is_weakly_consecutive_iff_leIn LeanElementary Number Theory

A permutation is weakly consecutive iff the condition holds for all m <= k, making the property bounded and decidable.

theorem is_weakly_consecutive_iff_le {k : ℕ} (σ : Equiv.Perm (Fin k)) :
    is_weakly_consecutive σ ↔
    ∀ (m : ℕ), m ≤ k → ∀ (i j : Fin k), m ∣ (σ i : ℕ) + 1 → (m : ℤ) ∣ (i : ℤ) - (j : ℤ) → m ∣ (σ j : ℕ) + 1
krawtchouk_critical_zeros_classificationIn LeanElementary Number Theory

Let $m \in \{3, 4\}$ and let $n, k, \ell$ be positive integers. Then $k + \ell = m + n - 2$ and $P_{m-1}^{k+\ell}(k) = 0$ if and only if, up to interchanging $k$ and $\ell$, one of the following holds: (i) $m = 3$, $n = t^2 - 1$, $k = t(t-1)/2$, $\ell = t(t+1)/2$ for some integer $t \ge 2$; (ii) $m = 4$, $n = 2t - 2$, $k = t$, $\ell = t$ for some integer $t \ge 2$; (iii) $m = 4$, $n = 3t^2 + 2t - 1$, $k = (3t^2 - t)/2$, $\ell = (3t^2 + 5t + 2)/2$ for some integer $t \ge 1$; (iv) $m = 4$, $n = 3s^2 + 4s$, $k = (3s^2 + s)/2$, $\ell = (3s^2 + 7s + 4)/2$ for some integer $s \ge 1$.

theorem krawtchouk_critical_zeros_classification
    (m n k ℓ : ℕ) (hm : m = 3 ∨ m = 4)
    (hn : 0 < n) (hk : 0 < k) (hℓ : 0 < ℓ) :
    (k + ℓ = m + n - 2 ∧ krawtchouk (k + ℓ) (m - 1) k = 0) ↔
      ((m = 3 ∧ ∃ t ≥ 2, n = t ^ 2 - 1 ∧
          ((k = t * (t - 1) / 2 ∧ ℓ = t * (t + 1) / 2) ∨
           (k = t * (t + 1) / 2 ∧ ℓ = t * (t - 1) / 2))) ∨
       (m = 4 ∧ ∃ t ≥ 2, n = 2 * t - 2 ∧ k = t ∧ ℓ = t) ∨
       (m = 4 ∧ ∃ t ≥ 1, n = 3 * t ^ 2 + 2 * t - 1 ∧
          ((k = (3 * t ^ 2 - t) / 2 ∧ ℓ = (3 * t ^ 2 + 5 * t + 2) / 2) ∨
           (k = (3 * t ^ 2 + 5 * t + 2) / 2 ∧ ℓ = (3 * t ^ 2 - t) / 2))) ∨
       (m = 4 ∧ ∃ s ≥ 1, n = 3 * s ^ 2 + 4 * s ∧
          ((k = (3 * s ^ 2 + s) / 2 ∧ ℓ = (3 * s ^ 2 + 7 * s + 4) / 2) ∨
           (k = (3 * s ^ 2 + 7 * s + 4) / 2 ∧ ℓ = (3 * s ^ 2 + s) / 2))))
krawtchouk_critical_zeros_m_fourIn LeanElementary Number Theory

For positive integers $n, k, \ell$ with $k \le \ell$, the conditions $k + \ell = 4 + n - 2$ and $P_3^{k+\ell}(k) = 0$ hold if and only if one of the following holds: (ii) $n = 2t - 2$, $k = t$, $\ell = t$ for some integer $t \ge 2$; (iii) $n = 3t^2 + 2t - 1$, $k = (3t^2 - t)/2$, $\ell = (3t^2 + 5t + 2)/2$ for some integer $t \ge 1$; or (iv) $n = 3s^2 + 4s$, $k = (3s^2 + s)/2$, $\ell = (3s^2 + 7s + 4)/2$ for some integer $s \ge 1$.

theorem krawtchouk_critical_zeros_m_four
    (n k ℓ : ℕ) (hn : 0 < n) (hk : 0 < k) (hℓ : 0 < ℓ) (hkℓ : k ≤ ℓ) :
    (k + ℓ = 4 + n - 2 ∧ krawtchouk (k + ℓ) 3 k = 0) ↔
      ((∃ t ≥ 2, n = 2 * t - 2 ∧ k = t ∧ ℓ = t) ∨
       (∃ t ≥ 1, n = 3 * t ^ 2 + 2 * t - 1 ∧ k = (3 * t ^ 2 - t) / 2 ∧ ℓ = (3 * t ^ 2 + 5 * t + 2) / 2) ∨
       (∃ s ≥ 1, n = 3 * s ^ 2 + 4 * s ∧ k = (3 * s ^ 2 + s) / 2 ∧ ℓ = (3 * s ^ 2 + 7 * s + 4) / 2))
krawtchouk_critical_zeros_m_threeIn LeanElementary Number Theory

For positive integers $n, k, \ell$ with $k \le \ell$, the conditions $k + \ell = 3 + n - 2$ and $P_2^{k+\ell}(k) = 0$ hold if and only if $n = t^2 - 1$, $k = t(t-1)/2$, and $\ell = t(t+1)/2$ for some integer $t \ge 2$.

theorem krawtchouk_critical_zeros_m_three
    (n k ℓ : ℕ) (hn : 0 < n) (hk : 0 < k) (hℓ : 0 < ℓ) (hkℓ : k ≤ ℓ) :
    (k + ℓ = 3 + n - 2 ∧ krawtchouk (k + ℓ) 2 k = 0) ↔
      (∃ t ≥ 2, n = t ^ 2 - 1 ∧ k = t * (t - 1) / 2 ∧ ℓ = t * (t + 1) / 2)
krawtchouk_three_formulaIn LeanElementary Number Theory

For any natural numbers $k$ and $\ell$, the binary Krawtchouk polynomial of degree 3 satisfies $P_3^{k+\ell}(k) = (\ell - k)((\ell - k)^2 - 3(k + \ell) + 2) / 6$.

theorem krawtchouk_three_formula (k ℓ : ℕ) :
    krawtchouk (k + ℓ) 3 k = ((ℓ : ℝ) - (k : ℝ)) * (((ℓ : ℝ) - (k : ℝ)) ^ 2 - 3 * ((k : ℝ) + (ℓ : ℝ)) + 2) / 6
krawtchouk_two_formulaIn LeanElementary Number Theory

For any natural numbers $k$ and $\ell$, the binary Krawtchouk polynomial of degree 2 satisfies $P_2^{k+\ell}(k) = ((\ell - k)^2 - (k + \ell)) / 2$.

theorem krawtchouk_two_formula (k ℓ : ℕ) :
    krawtchouk (k + ℓ) 2 k = (((ℓ : ℝ) - (k : ℝ)) ^ 2 - ((k : ℝ) + (ℓ : ℝ))) / 2
krawtchouk_zero_swap_k_ellIn LeanElementary Number Theory

For $m \in \{3, 4\}$ and natural numbers $k$ and $\ell$, the binary Krawtchouk polynomial vanishing condition $P_{m-1}^{k+\ell}(k) = 0$ is symmetric under interchanging $k$ and $\ell$, that is, $P_{m-1}^{k+\ell}(k) = 0 \iff P_{m-1}^{k+\ell}(\ell) = 0$.

theorem krawtchouk_zero_swap_k_ell
    (m k ℓ : ℕ) (hm : m = 3 ∨ m = 4) :
    krawtchouk (k + ℓ) (m - 1) k = 0 ↔ krawtchouk (k + ℓ) (m - 1) ℓ = 0
leading_unit_a_stepIn LeanElementary Number Theory

For positive integers g ≥ 1 and m ≥ g + 1, the coefficients of A_g satisfy a_m - 2 a_{m-1} + a_{m-(g+1)} = 1.

theorem leading_unit_a_step (g m : ℕ) (hg : 1 ≤ g) (hm : g + 1 ≤ m) :
    leading_unit_a g m - 2 * leading_unit_a g (m - 1) + leading_unit_a g (m - (g + 1)) = 1
leading_unit_ag_mul_denomIn LeanElementary Number Theory

The formal power series A_g(X) satisfies A_g(X) * ((1 - X)^2 Q_g(X)) = 1.

theorem leading_unit_ag_mul_denom (g : ℕ) :
    leading_unit_ag g * ((1 - PowerSeries.X : PowerSeries ℚ) ^ 2 * leading_unit_qg g) = 1
leading_unit_brown_condition_of_leIn LeanElementary Number Theory

If (N : ℚ) ≤ leading_unit_m g k, then the Brown condition H(n+1) ≤ 1 + ∑_{i=0}^n H_i holds for all n ≥ 1.

theorem leading_unit_brown_condition_of_le (g k N : ℕ) (hg : 1 ≤ g) (hk : 1 ≤ k) (hN : 1 ≤ N)
    (h : (N : ℚ) ≤ leading_unit_m g k) (n : ℕ) (hn : 1 ≤ n) :
    leading_unit_h g k N (n + 1) ≤ 1 + ∑ i ∈ Finset.range (n + 1), leading_unit_h g k N i
leading_unit_brown_gap_criticalIn LeanElementary Number Theory

At the critical index n = 2g + k + 1, the Brown gap (1 + ∑_{i=0}^n H_i) - H_{n+1} equals (a_{g+k}^{(g)} + 1) - 2^g * N.

theorem leading_unit_brown_gap_critical (g k N : ℕ) (hg : 1 ≤ g) (hk : 1 ≤ k) :
    ((1 + ∑ i ∈ Finset.range (2 * g + k + 2), leading_unit_h g k N i : ℤ) - leading_unit_h g k N (2 * g + k + 2) : ℚ) =
      (leading_unit_a g (g + k) + 1) - (2 : ℚ) ^ g * (N : ℚ)
leading_unit_diff_identityIn LeanElementary Number Theory

For g, k ≥ 1, (a_{g+1+k}^{(g+1)} + 1) - 2 (a_{g+k}^{(g)} + 1) = 2 (a_{g+k}^{(g+1)} - a_{g+k}^{(g)}) - a_{k-1}^{(g+1)}.

theorem leading_unit_diff_identity (g k : ℕ) (hg : 1 ≤ g) (hk : 1 ≤ k) :
    leading_unit_a (g + 1) (g + 1 + k) + 1 - 2 * (leading_unit_a g (g + k) + 1) =
      2 * (leading_unit_a (g + 1) (g + k) - leading_unit_a g (g + k)) - leading_unit_a (g + 1) (k - 1)
leading_unit_exact_completeness_thresholdIn LeanElementary Number Theory

For all natural numbers g, k, N with 1 ≤ g, 1 ≤ k, and 1 ≤ N, the integer sequence leading_unit_h g k N is complete (satisfies is_complete_sequence) if and only if (N : ℚ) ≤ leading_unit_m g k.

theorem leading_unit_exact_completeness_threshold (g k N : ℕ) (hg : 1 ≤ g) (hk : 1 ≤ k) (hN : 1 ≤ N) :
    is_complete_sequence (leading_unit_h g k N) ↔ (N : ℚ) ≤ leading_unit_m g k
leading_unit_h_monoIn LeanElementary Number Theory

The sequence leading_unit_h g k N is nondecreasing for all n ≥ 1.

theorem leading_unit_h_mono (g k N : ℕ) (hg : 1 ≤ g) (hk : 1 ≤ k) (hN : 1 ≤ N) (n : ℕ) (hn : 1 ≤ n) :
    leading_unit_h g k N n ≤ leading_unit_h g k N (n + 1)
leading_unit_h_posIn LeanElementary Number Theory

The sequence leading_unit_h g k N is strictly positive (at least 1) for all n ≥ 1.

theorem leading_unit_h_pos (g k N : ℕ) (hg : 1 ≤ g) (hk : 1 ≤ k) (hN : 1 ≤ N) (n : ℕ) (hn : 1 ≤ n) :
    1 ≤ leading_unit_h g k N n
leading_unit_monotonicityIn LeanElementary Number Theory

For all natural numbers g, k with 1 ≤ g and 1 ≤ k, the unrounded completeness thresholds satisfy leading_unit_m g k < leading_unit_m (g + 1) k, and consequently, for all natural numbers N ≥ 1, if the integer sequence leading_unit_h g k N is complete, then leading_unit_h (g + 1) k N is also complete.

theorem leading_unit_monotonicity (g k : ℕ) (hg : 1 ≤ g) (hk : 1 ≤ k) :
    leading_unit_m g k < leading_unit_m (g + 1) k ∧
    (∀ N : ℕ, 1 ≤ N → is_complete_sequence (leading_unit_h g k N) → is_complete_sequence (leading_unit_h (g + 1) k N))
leading_unit_qg_one_sub_XIn LeanElementary Number Theory

For g ≥ 1, (1 - X) * Q_g(X) = 1 - 2X + X^{g+1}.

theorem leading_unit_qg_one_sub_X (g : ℕ) (hg : 1 ≤ g) :
    (1 - PowerSeries.X : PowerSeries ℚ) * leading_unit_qg g = 1 - 2 * PowerSeries.X + PowerSeries.X ^ (g + 1)
leading_unit_qg_subIn LeanElementary Number Theory

The difference between consecutive polynomials Q_g(X) and Q_{g+1}(X) is X^{g+1}.

theorem leading_unit_qg_sub (g : ℕ) :
    leading_unit_qg g - leading_unit_qg (g + 1) = (PowerSeries.X : PowerSeries ℚ) ^ (g + 1)
leading_unit_threshold_diff_posIn LeanElementary Number Theory

For positive integers g, k ≥ 1, the completeness threshold numerators satisfy 2 * (a_{g+k}^{(g)} + 1) < a_{g+1+k}^{(g+1)} + 1.

theorem leading_unit_threshold_diff_pos (g k : ℕ) (hg : 1 ≤ g) (hk : 1 ≤ k) :
    2 * (leading_unit_a g (g + k) + 1) < leading_unit_a (g + 1) (g + 1 + k) + 1
leading_unit_threshold_strict_monoIn LeanElementary Number Theory

For all positive integers g, k ≥ 1, the unrounded completeness thresholds satisfy M_{g+1,k} > M_{g,k}.

theorem leading_unit_threshold_strict_mono (g k : ℕ) (hg : 1 ≤ g) (hk : 1 ≤ k) :
    leading_unit_m g k < leading_unit_m (g + 1) k
linear_subset_sum_avoiding_limit_regularIn LeanElementary Number Theory

For every real $c \ge 1$, the ratio $f_c(n) / n$ converges to $c - 1/2$ as $n \to \infty$.

theorem linear_subset_sum_avoiding_limit_regular (c : ℝ) (hc : 1 ≤ c) : Filter.Tendsto (fun n : ℕ => ((linear_max_subset_sum_avoiding_size c n : ℝ) / (n : ℝ))) Filter.atTop (nhds (c - 1 / 2))
linear_subset_sum_avoiding_max_card_regularIn LeanElementary Number Theory

For every real $c \ge 1$ and every integer $n \ge 1$, the maximum cardinality $f_c(n)$ of a subset of $\{1, \dots, \lfloor cn \rfloor\}$ avoiding subset sum $n$ equals $\lfloor cn \rfloor - \lceil n/2 \rceil$.

theorem linear_subset_sum_avoiding_max_card_regular (c : ℝ) (n : ℕ) (hc : 1 ≤ c) (hn : 1 ≤ n) : linear_max_subset_sum_avoiding_size c n = ⌊c * (n : ℝ)⌋₊ - ⌈(n : ℝ) / 2⌉₊
matchable_condition_le_of_dvdIn LeanElementary Number Theory

For natural numbers d, n, and p, if 0 < d, d divides n, p is prime, and p ≤ padicValNat p d, then (padicValNat p d + 1 - p) * (Nat.divisors (d / p ^ padicValNat p d)).card ≤ (padicValNat p n + 1 - p) * (Nat.divisors (n / p ^ padicValNat p n)).card.

theorem matchable_condition_le_of_dvd {d n p : ℕ} (hd : 0 < d) (hdn : d ∣ n) (hp : p.Prime)
    (hpd : p ≤ padicValNat p d) :
    (padicValNat p d + 1 - p) * (Nat.divisors (d / p ^ padicValNat p d)).card ≤
      (padicValNat p n + 1 - p) * (Nat.divisors (n / p ^ padicValNat p n)).card
matrix_det_eq_prod_diag_of_le_zeroIn LeanElementary Number Theory

If A i j = 0 whenever not (i ≤ j), then det A is the product of the diagonal entries.

theorem matrix_det_eq_prod_diag_of_le_zero {R : Type*} [CommRing R] {α : Type*} [PartialOrder α]
    [Fintype α] [DecidableEq α] (A : Matrix α α R) (hA : ∀ i j : α, ¬ i ≤ j → A i j = 0) :
    A.det = ∏ i, A i i
matrix_exists_perm_of_det_ne_zeroIn LeanElementary Number Theory

A square matrix over a field whose determinant is nonzero has a permutation σ of the index set such that every entry M i (σ i) is nonzero.

theorem matrix_exists_perm_of_det_ne_zero {n : Nat} {R : Type*} [Field R] (M : Matrix (Fin n) (Fin n) R) (hM : M.det ≠ 0) : ∃ σ : Equiv.Perm (Fin n), ∀ i, M i (σ i) ≠ 0
moebius_odd_squarefree_indicatorIn LeanElementary Number Theory

For any positive integer $d$, the odd square-free indicator $\mu^*(d)$ is equal to the sum of the Möbius function $\mu(k)$ over all positive divisors $k$ of $d$ such that $k^2$ divides $d$ and $k$ is odd.

open Finset in
theorem moebius_odd_squarefree_indicator (d : ℕ) (hd : 0 < d) :
    odd_squarefree_indicator d =
      ∑ k ∈ (Nat.divisors d).filter (fun k => k ^ 2 ∣ d ∧ Odd k), ArithmeticFunction.moebius k
moebius_odd_squarefree_sum_eq_powersetIn LeanElementary Number Theory

For any positive integer $d$, the sum of $\mu(k)$ over divisors $k$ of $d$ such that $k^2 \mid d$ and $k$ is odd equals the alternating sum $\sum_{t \subseteq S} (-1)^{|t|}$, where $S = \{p \in d.\text{primeFactors} : p \neq 2 \wedge p^2 \mid d\}$.

open Finset in
theorem moebius_odd_squarefree_sum_eq_powerset (d : ℕ) (hd : 0 < d) :
    ∑ k ∈ (Nat.divisors d).filter (fun k => k ^ 2 ∣ d ∧ Odd k), ArithmeticFunction.moebius k =
      ∑ t ∈ ((d.primeFactors).filter (fun p => p ≠ 2 ∧ p ^ 2 ∣ d)).powerset, (-1 : ℤ) ^ t.card
multiset_is_minimal_zero_sum_merge_pairIn LeanElementary Number Theory

Replacing two selected terms a and b of a minimal zero-sum multiset by the single term a+b preserves minimal zero-sum status. The two terms may have the same value.

theorem multiset_is_minimal_zero_sum_merge_pair {G : Type*} [AddCommMonoid G]
    (s : Multiset G) (a b : G)
    (h : multiset_is_minimal_zero_sum (a ::ₘ b ::ₘ s)) :
    multiset_is_minimal_zero_sum ((a+b) ::ₘ s)
nat_card_Iic_factorizationIn LeanElementary Number Theory

For m > 0 the number of exponent vectors k with k ≤ m.factorization equals the number of divisors of m.

theorem nat_card_Iic_factorization (m : Nat) (hm : 0 < m) :
    Fintype.card ↥(Finset.Iic m.factorization) = (Nat.divisors m).card
nat_iic_factorization_divisors_equivIn LeanElementary Number Theory

For m > 0 there is an equivalence between the exponent vectors k ≤ m.factorization and the divisors of m, whose value at k is the product of p^(k p) over the support of k.

theorem nat_iic_factorization_divisors_equiv (m : Nat) (hm : 0 < m) :
    ∃ e : ↥(Finset.Iic m.factorization) ≃ Nat.divisors m,
      ∀ k : ↥(Finset.Iic m.factorization), ((e k : Nat.divisors m) : Nat) = k.val.prod (fun p e => p ^ e)
nat_least_prime_not_dvd_le_two_mulIn LeanElementary Number Theory

For m ≥ 1 the smallest prime not dividing m is at most 2m: by Bertrand there is a prime p with m < p ≤ 2m, and such a p cannot divide m.

theorem nat_least_prime_not_dvd_le_two_mul (m : ℕ) (hm : 1 ≤ m) :
    nat_least_prime_not_dvd m ≤ 2 * m
nat_least_prime_not_dvd_spec_and_boundsIn LeanElementary Number Theory

For m ≥ 2 the number q(m) is prime, does not divide m, and satisfies q(m) ≤ 2m and q(m) ≤ m squared.

theorem nat_least_prime_not_dvd_spec_and_bounds (m : ℕ) (hm : 2 ≤ m) :
    Nat.Prime (nat_least_prime_not_dvd m) ∧ ¬ (nat_least_prime_not_dvd m) ∣ m ∧
      nat_least_prime_not_dvd m ≤ 2 * m ∧ nat_least_prime_not_dvd m ≤ m^2
not_avoids_subset_sum_of_memIn LeanElementary Number Theory

If a finite set of natural numbers contains $n$, then it does not avoid $n$.

lemma not_avoids_subset_sum_of_mem {A : Finset ℕ} {n : ℕ} (hA : n ∈ A) : ¬ avoids_subset_sum A n
op_153_cosine_polynomial_small_constantIn LeanElementary Number Theory

For a degree-2 intersective integer polynomial g strictly positive on the positive integers and every sufficiently large N there are a modulus M with 2N < M <= 4N, a finite set S of positive integers at most N each of which is a value g(k) with k > 0, and weights phi on {0} \u222a S \u222a (-S), such that the trigonometric polynomial F(n) = sum_x phi(x)*exp(2*pi*I*x*n/M) has sum of coefficients 1, has nonnegative real part at every n = 0, ..., M-1, and has constant term Re phi(0) <= exp(-c*sqrt(log N * log log N)).

theorem op_153_cosine_polynomial_small_constant (g : Polynomial ℤ)
    (hdeg : g.degree = 2) (hint : is_intersective g)
    (hpos : ∀ n : ℕ, 0 < n → 0 < g.eval (n : ℤ)) :
    ∃ c > 0, ∃ N₀ : ℕ, ∀ N : ℕ, N₀ ≤ N →
      ∃ (M : ℕ) (S : Finset ℕ) (φ : ℤ → ℂ), 2 * N < M ∧ M ≤ 4 * N ∧
      (∀ s ∈ S, 0 < s ∧ s ≤ N ∧ ∃ k : ℕ, 0 < k ∧ g.eval (k : ℤ) = (s : ℤ)) ∧
      (∀ x : ℤ, x ≠ 0 → (∀ s ∈ S, x ≠ (s : ℤ) ∧ x ≠ -(s : ℤ)) → φ x = 0) ∧
      (∑ x ∈ (insert (0 : ℤ) (S.image (fun s : ℕ => (s : ℤ)) ∪ S.image (fun s : ℕ => -(s : ℤ)))), φ x) = 1 ∧
      (∀ n ∈ Finset.range M, 0 ≤ (∑ x ∈ (insert (0 : ℤ) (S.image (fun s : ℕ => (s : ℤ)) ∪ S.image (fun s : ℕ => -(s : ℤ)))),
          φ x * Complex.exp (2 * Real.pi * Complex.I * (x : ℂ) * (n : ℂ) / (M : ℂ))).re) ∧
      (φ 0).re ≤ Real.exp (-c * Real.sqrt (Real.log (N : ℝ) * Real.log (Real.log (N : ℝ))))
op_153_eventually_subexp_bound_positive_quadraticIn LeanElementary Number Theory

For a degree-2 intersective integer polynomial g that is strictly positive on all positive integers, there are constants c, C > 0 and a threshold N₀ such that for every N ≥ N₀, every subset A ⊆ {1, ..., N} whose distinct elements never differ by a value g(n) with n a positive integer has cardinality at most C·N·exp(−c√(log N · log log N)).

theorem op_153_eventually_subexp_bound_positive_quadratic (g : Polynomial ℤ)
    (hdeg : g.degree = 2) (hint : is_intersective g)
    (hpos : ∀ n : ℕ, 0 < n → 0 < g.eval (n : ℤ)) :
    ∃ c > 0, ∃ C > 0, ∃ N₀ : ℕ, ∀ N : ℕ, N₀ ≤ N →
      ∀ A ⊆ Finset.Icc 1 N,
      (∀ a ∈ A, ∀ b ∈ A, a ≠ b → ¬ ∃ n : ℕ, 0 < n ∧ (a : ℤ) - b = g.eval (n : ℤ)) →
      (A.card : ℝ) ≤ C * (N : ℝ) * Real.exp (-c * Real.sqrt (Real.log (N : ℝ) * Real.log (Real.log (N : ℝ))))
op_153_quadratic_coefficientsIn LeanElementary Number Theory

A degree-2 integer polynomial that is strictly positive on the positive integers has the form a·x² + b·x + c with a > 0.

theorem op_153_quadratic_coefficients (g : Polynomial ℤ) (hdeg : g.degree = 2)
    (hpos : ∀ n : ℕ, 0 < n → 0 < g.eval (n : ℤ)) :
    ∃ a b c : ℤ, 0 < a ∧ ∀ x : ℤ, g.eval x = a * x ^ 2 + b * x + c
op_153_quadratic_cosine_construction_normal_formIn LeanElementary Number Theory

The analytic core: for integers a > 0, b, c whose quadratic is intersective, and every large N, there are M in (2N, 4N], a set S of values a·k²+b·k+c (k > 0) at most N, and weights φ supported on {0} ∪ S ∪ (-S) with total weight 1, nonnegative real part at every n < M, and constant term at most exp(-c'√(log N · log log N)). This is the same content as the target, but with the degree-2 polynomial and its positivity hypothesis replaced by an explicit quadratic, so that only the analysis is visible; the target follows from it and op_153_quadratic_coefficients by pure bookkeeping. It is flagged open: the construction (arXiv:2610.07765, Theorem 1.1 and Proposition 5.1) needs signed averaging over smooth dilations plus a complete-sum sector estimate, for which Mathlib has no machinery.

theorem op_153_quadratic_cosine_construction_normal_form (a b c : ℤ) (ha : 0 < a)
    (hint : is_intersective (Polynomial.C c + Polynomial.C b * Polynomial.X + Polynomial.C a * Polynomial.X ^ 2)) :
    ∃ c' > 0, ∃ N₀ : ℕ, ∀ N : ℕ, N₀ ≤ N →
      ∃ (M : ℕ) (S : Finset ℕ) (φ : ℤ → ℂ), 2 * N < M ∧ M ≤ 4 * N ∧
      (∀ s ∈ S, 0 < s ∧ s ≤ N ∧ ∃ k : ℕ, 0 < k ∧ a * (k : ℤ) ^ 2 + b * (k : ℤ) + c = (s : ℤ)) ∧
      (∀ x : ℤ, x ≠ 0 → (∀ s ∈ S, x ≠ (s : ℤ) ∧ x ≠ -(s : ℤ)) → φ x = 0) ∧
      (∑ x ∈ (insert (0 : ℤ) (S.image (fun s : ℕ => (s : ℤ)) ∪ S.image (fun s : ℕ => -(s : ℤ)))), φ x) = 1 ∧
      (∀ n ∈ Finset.range M, 0 ≤ (∑ x ∈ (insert (0 : ℤ) (S.image (fun s : ℕ => (s : ℤ)) ∪ S.image (fun s : ℕ => -(s : ℤ)))),
          φ x * Complex.exp (2 * Real.pi * Complex.I * (x : ℂ) * (n : ℂ) / (M : ℂ))).re) ∧
      (φ 0).re ≤ Real.exp (-c' * Real.sqrt (Real.log (N : ℝ) * Real.log (Real.log (N : ℝ))))
op_153_quadratic_gauss_sum_coprimeIn LeanElementary Number Theory

For a degree-2 integer polynomial g there is C > 0 such that for every q ≥ 1 and every t coprime to q, the complete sum Σ_{k<q} exp(2πi·t·g(k)/q) has modulus at most C·√q.

theorem op_153_quadratic_gauss_sum_coprime (g : Polynomial ℤ) (hdeg : g.degree = 2) :
    ∃ C : ℝ, 0 < C ∧ ∀ (q : ℕ), 0 < q → ∀ t : ℤ, Nat.Coprime t.natAbs q →
      ‖∑ k ∈ Finset.range q,
        Complex.exp (2 * Real.pi * Complex.I * (t : ℂ) * (((g.eval (k : ℤ) : ℤ) : ℂ)) / (q : ℂ))‖
        ≤ C * Real.sqrt (q : ℝ)
op_153_quadratic_gauss_sum_gcdIn LeanElementary Number Theory

For a degree-2 integer polynomial g there is C > 0 such that for every q ≥ 1 and every integer t, the complete sum Σ_{k<q} exp(2πi·t·g(k)/q) has modulus at most C·√(q·gcd(t,q)).

theorem op_153_quadratic_gauss_sum_gcd (g : Polynomial ℤ) (hdeg : g.degree = 2) :
    ∃ C : ℝ, 0 < C ∧ ∀ (q : ℕ), 0 < q → ∀ t : ℤ,
      ‖∑ k ∈ Finset.range q,
        Complex.exp (2 * Real.pi * Complex.I * (t : ℂ) * (((g.eval (k : ℤ) : ℤ) : ℂ)) / (q : ℂ))‖
        ≤ C * Real.sqrt ((q : ℝ) * ((Int.gcd t (q : ℤ) : ℕ) : ℝ))
op_153_quadratic_gauss_sum_second_differenceIn LeanElementary Number Theory

For integers A, B, C, q > 0 and t, the squared modulus of the complete sum Σ_{k<q} exp(2πi·t·(Ak²+Bk+C)/q) is at most q·gcd(2tA, q).

theorem op_153_quadratic_gauss_sum_second_difference (A B C : ℤ) (q : ℕ) (hq : 0 < q) (t : ℤ) :
    ‖∑ k ∈ Finset.range q,
        Complex.exp (2 * Real.pi * Complex.I * (t : ℂ)
          * (((A * (k : ℤ) ^ 2 + B * (k : ℤ) + C : ℤ)) : ℂ) / (q : ℂ))‖ ^ 2
      ≤ (q : ℝ) * ((Int.gcd (2 * t * A) (q : ℤ) : ℕ) : ℝ)
op_153_re_fourier_sum_eq_cosine_sumIn LeanElementary Number Theory

If all weights are real, the real part of the trigonometric sum Σ_x φ(x)·exp(2πi·x·n/M) is the cosine sum Σ_x φ(x)·cos(2π·x·n/M).

theorem op_153_re_fourier_sum_eq_cosine_sum (M n : ℕ) (T : Finset ℤ) (φ : ℤ → ℝ) :
    (∑ x ∈ T, (φ x : ℂ) * Complex.exp (2 * Real.pi * Complex.I * (x : ℂ) * (n : ℂ) / (M : ℂ))).re
      = ∑ x ∈ T, φ x * Real.cos (2 * Real.pi * (x : ℝ) * (n : ℝ) / (M : ℝ))
op_153_three_point_cosine_witnessIn LeanElementary Number Theory

For any modulus M and any s > 0 there are weights supported on {0, s, -s} with total weight 1, nonnegative real part at every n < M, and constant term 2/3. Instantiating s ≤ N and 2N < M < 4N these are admissible data for the target's constraint bundle, with 2/3 in place of exp(-c√(log N · log log N)).

theorem op_153_three_point_cosine_witness (M s : ℕ) (hs : 0 < s) :
    ∃ φ : ℤ → ℂ,
      (∀ x : ℤ, x ≠ 0 → x ≠ (s : ℤ) → x ≠ -(s : ℤ) → φ x = 0) ∧
      (∑ x ∈ ({(0:ℤ), (s:ℤ), -(s:ℤ)} : Finset ℤ), φ x) = 1 ∧
      (∀ n ∈ Finset.range M,
        0 ≤ (∑ x ∈ ({(0:ℤ), (s:ℤ), -(s:ℤ)} : Finset ℤ),
          φ x * Complex.exp (2 * Real.pi * Complex.I * (x : ℂ) * (n : ℂ) / (M : ℂ))).re) ∧
      (φ 0).re = 2/3
perm_cycle_gcd_count_eq_sum_moebiusIn LeanElementary Number Theory

Möbius inversion over the divisors of n/g (equivalently, inversion of $b_m(n) = \sum_{m \mid h} C(n,h)$) expresses the number of permutations whose cycle-length gcd is exactly g as $\sum_{j \mid n/g} \mu(j)\, b_{gj}(n)$, where $b_m(n)$ counts the permutations whose cycle-length gcd is a multiple of $m$.

theorem perm_cycle_gcd_count_eq_sum_moebius (n g : ℕ) (hg : 0 < g) (hgn : g ∣ n) :
    (perm_cycle_gcd_count n g : ℤ)
      = ∑ j ∈ (n / g).divisors, (ArithmeticFunction.moebius j : ℤ) * (perm_cycle_gcd_mult_count n (j * g) : ℤ)
perm_cycle_gcd_count_modEq_neg_mult_count_primeIn LeanElementary Number Theory

For a prime p dividing n, C(n,1) ≡ -(number of permutations of Fin n with all cycle lengths divisible by p) modulo p.

theorem perm_cycle_gcd_count_modEq_neg_mult_count_prime (n p : ℕ) (hn : 0 < n) (hp : p.Prime) (hpn : p ∣ n) :
    ((perm_cycle_gcd_count n 1 : ℤ) ≡ (-(perm_cycle_gcd_mult_count n p : ℤ)) [ZMOD p])
perm_cycle_gcd_divisibility_and_coprimalityIn LeanElementary Number Theory

For each natural number n with n at least 4, both of the following conclusions hold. First, for every natural number g dividing n and satisfying n/g at least 3, n squared minus 1 divides C(n,g). Second, independently of g, gcd(C(n,1),n) equals 1. Here C(n,g) is the number of permutations of Fin n whose full cycle lengths have greatest common divisor g, with every fixed point counted as a cycle of length 1.

theorem perm_cycle_gcd_divisibility_and_coprimality (n : ℕ) (hn : 4 ≤ n) :
    (∀ g : ℕ, g ∣ n → 3 ≤ n / g → n ^ 2 - 1 ∣ perm_cycle_gcd_count n g) ∧
      Nat.gcd (perm_cycle_gcd_count n 1) n = 1
perm_cycle_gcd_dvd_cardIn LeanElementary Number Theory

The gcd of the cycle lengths of a permutation of a finite type divides the cardinality of that type, because it divides every cycle length and hence their sum (the fixed points contributing the remaining 1s).

theorem perm_cycle_gcd_dvd_card {α : Type*} [Fintype α] [DecidableEq α] (σ : Equiv.Perm α) : perm_cycle_gcd σ ∣ Fintype.card α
perm_cycle_gcd_dvd_predIn LeanElementary Number Theory

Let $n \\ge 2$ and let $g$ be a divisor of $n$. Then $n - 1$ divides $C(n, g)$, the number of permutations of $\{1, \\dots, n\}$ whose cycle lengths have greatest common divisor $g$.

theorem perm_cycle_gcd_dvd_pred (n g : ℕ) (hn : 2 ≤ n) (hg : g ∣ n) :
    n - 1 ∣ perm_cycle_gcd_count n g
perm_cycle_gcd_dvd_sq_sub_oneIn LeanElementary Number Theory

Let $n \\ge 4$ and let $g$ be a divisor of $n$ such that $n/g \\ge 3$. Then $n^2 - 1$ divides $C(n, g)$, the number of permutations of $\{1, \\dots, n\}$ whose cycle lengths have greatest common divisor $g$.

theorem perm_cycle_gcd_dvd_sq_sub_one (n g : ℕ) (hn : 4 ≤ n) (hg : g ∣ n) (hkg : 3 ≤ n / g) :
    n ^ 2 - 1 ∣ perm_cycle_gcd_count n g
perm_cycle_gcd_dvd_succIn LeanElementary Number Theory

Let $g$ be a divisor of $n$ such that $n/g \\ge 3$. Then $n + 1$ divides $C(n, g)$, the number of permutations of $\{1, \\dots, n\}$ whose cycle lengths have greatest common divisor $g$.

theorem perm_cycle_gcd_dvd_succ (n g : ℕ) (hg : g ∣ n) (hkg : 3 ≤ n / g) :
    n + 1 ∣ perm_cycle_gcd_count n g
perm_cycle_gcd_mult_count_closed_formIn LeanElementary Number Theory

The number of permutations of Fin (d*k) all of whose cycle lengths are divisible by d is $(dk)! \prod_{j<k}(dj+1) \big/ (d^k k!)$, stated division-free as $b\cdot d^k k! = (dk)! \prod_{j<k}(dj+1)$. This is Lemma 6.4 of the source paper (arXiv:2610.40342, proved in Appendix A.11.5 via the exponential formula; the exponential formula is replaced here by the elementary cycle-stripping recursion).

theorem perm_cycle_gcd_mult_count_closed_form (d k : ℕ) (hd : 0 < d) :
    perm_cycle_gcd_mult_count (d * k) d * (d ^ k * k.factorial) = (d * k).factorial * ∏ i ∈ Finset.range k, (d * i + 1)
perm_cycle_gcd_mult_count_closed_form_stepIn LeanElementary Number Theory

The candidate closed form $k \mapsto (dk)!\prod_{j<k}(dj+1)/(d^k k!)$ satisfies the cycle-stripping recursion of perm_cycle_gcd_mult_count_recurrence, stated over $\mathbb{Q}$: $(dk)!\prod_{j<k}(dj+1)/(d^k k!) = \sum_{j<k} \binom{dk-1}{d(j+1)-1}(d(j+1)-1)! \cdot \frac{(d(k-j-1))!\prod_{i<k-j-1}(di+1)}{d^{k-j-1}(k-j-1)!}$.

theorem perm_cycle_gcd_mult_count_closed_form_step (d k : ℕ) (hd : 0 < d) (hk : 0 < k) :
    ((d * k).factorial : ℚ) * ((∏ i ∈ Finset.range k, (d * i + 1) : ℕ) : ℚ) / ((d ^ k * k.factorial : ℕ) : ℚ)
      = ∑ j ∈ Finset.range k,
          ((Nat.choose (d * k - 1) (d * (j + 1) - 1) * (d * (j + 1) - 1).factorial : ℕ) : ℚ)
            * (((d * (k - (j + 1))).factorial : ℚ) * ((∏ i ∈ Finset.range (k - (j + 1)), (d * i + 1) : ℕ) : ℚ)
                / ((d ^ (k - (j + 1)) * (k - (j + 1)).factorial : ℕ) : ℚ))
perm_cycle_gcd_mult_count_dvd_of_ne_primeIn LeanElementary Number Theory

For a prime p dividing n and a squarefree divisor d of n with d ≠ p, the number of permutations of Fin n all of whose cycle lengths are divisible by d is divisible by p.

theorem perm_cycle_gcd_mult_count_dvd_of_ne_prime (n p d : ℕ) (hn : 0 < n) (hp : p.Prime) (hpn : p ∣ n)
    (hd : d ∈ n.divisors) (hdne : d ≠ p) (hsf : Squarefree d) :
    p ∣ perm_cycle_gcd_mult_count n d
perm_cycle_gcd_mult_count_dvd_predIn LeanElementary Number Theory

If g divides n ≥ 2 and g > 0, then n-1 divides the number of permutations of {1, ..., n} all of whose cycle lengths are divisible by g (equivalently, whose cycle-length gcd is a multiple of g). This is Theorem 6.1(a) of arXiv:2610.40342 for a single term of its Möbius sum.

theorem perm_cycle_gcd_mult_count_dvd_pred (n g : ℕ) (hn : 2 ≤ n) (hg : 0 < g) (hgn : g ∣ n) :
    n - 1 ∣ perm_cycle_gcd_mult_count n g
perm_cycle_gcd_mult_count_eq_prodIn LeanElementary Number Theory

The number of permutations of Fin(d*k) all of whose cycle lengths are divisible by d equals (∏ of i in {1,…,dk} with d∤i, i) · (∏_{j<k} (d*j+1)). This is the integer product form P_d·Q_d of the closed form.

theorem perm_cycle_gcd_mult_count_eq_prod (d k : ℕ) (hd : 0 < d) :
    perm_cycle_gcd_mult_count (d * k) d
      = (∏ i ∈ (Finset.Icc 1 (d * k)).filter (fun i => ¬ d ∣ i), i)
        * (∏ j ∈ Finset.range k, (d * j + 1))
perm_cycle_gcd_mult_count_eq_sumIn LeanElementary Number Theory

Partitioning the permutations whose cycle-length gcd is a multiple of m according to the exact value k of that gcd: the value k is necessarily a divisor of n and a multiple of m, so the multiples-of-m count equals the sum of the exact counts over k ranging over the divisors of n that are multiples of m.

theorem perm_cycle_gcd_mult_count_eq_sum (n m : ℕ) (hn : 0 < n) (hm : 0 < m) :
    perm_cycle_gcd_mult_count n m = ∑ k ∈ n.divisors.filter (fun k => m ∣ k), perm_cycle_gcd_count n k
perm_cycle_gcd_mult_count_eq_zero_of_not_dvdIn LeanElementary Number Theory

If m does not divide n then no permutation of Fin n has cycle-length gcd divisible by m, because the gcd always divides n; so the count is 0.

theorem perm_cycle_gcd_mult_count_eq_zero_of_not_dvd (n m : ℕ) (h : ¬ m ∣ n) :
    perm_cycle_gcd_mult_count n m = 0
perm_cycle_gcd_mult_count_one_eq_factorialIn LeanElementary Number Theory

For m = 1 the condition is vacuous, so the number of permutations of Fin n whose cycle-length gcd is a multiple of 1 is n!.

theorem perm_cycle_gcd_mult_count_one_eq_factorial (n : ℕ) :
    perm_cycle_gcd_mult_count n 1 = n.factorial
perm_cycle_gcd_mult_count_prime_not_dvdIn LeanElementary Number Theory

For a prime p dividing n, the number of permutations of Fin n with every cycle length divisible by p is NOT divisible by p.

theorem perm_cycle_gcd_mult_count_prime_not_dvd (n p : ℕ) (hn : 0 < n) (hp : p.Prime) (hpn : p ∣ n) :
    ¬ p ∣ perm_cycle_gcd_mult_count n p
perm_cycle_gcd_mult_count_recurrenceIn LeanElementary Number Theory

Removing the cycle through one fixed point of Fin (d*k) gives the recursion $b_d(dk) = \sum_{j=0}^{k-1} \binom{dk-1}{d(j+1)-1}\,(d(j+1)-1)!\, b_d(d(k-j-1))$ for the number b_d of permutations all of whose cycle lengths are divisible by d.

theorem perm_cycle_gcd_mult_count_recurrence (d k : ℕ) (hd : 0 < d) (hk : 0 < k) :
    perm_cycle_gcd_mult_count (d * k) d
      = ∑ j ∈ Finset.range k, (Nat.choose (d * k - 1) (d * (j + 1) - 1)) * (d * (j + 1) - 1).factorial * perm_cycle_gcd_mult_count (d * (k - (j + 1))) d
perm_cycle_gcd_one_coprimeIn LeanElementary Number Theory

Let $n \\ge 4$. The number $C(n, 1)$ of permutations of $\{1, \\dots, n\}$ whose cycle lengths have greatest common divisor 1 satisfies $\\gcd(C(n, 1), n) = 1$.

theorem perm_cycle_gcd_one_coprime (n : ℕ) (hn : 4 ≤ n) :
    (perm_cycle_gcd_count n 1).Coprime n
plrs_leading_unit_exact_completeness_thresholdIn LeanElementary Number Theory

For all natural numbers g, k, N with 1 ≤ g, 1 ≤ k, and 1 ≤ N, the positive linear recurrence sequence associated with coefficient list [1^g, 0^k, N] is complete if and only if (N : ℚ) ≤ leading_unit_m g k.

theorem plrs_leading_unit_exact_completeness_threshold (g k N : ℕ) (hg : 1 ≤ g) (hk : 1 ≤ k) (hN : 1 ≤ N) :
    is_complete_sequence (plrs_seq (List.replicate g 1 ++ List.replicate k 0 ++ [N])) ↔ (N : ℚ) ≤ leading_unit_m g k
plrs_seq_one_N_le_two_of_completeIn LeanElementary Number Theory

If the recurrence sequence plrs_seq [1, N] is complete with 1 ≤ N, then N ≤ 2, because for N ≥ 3 the value 4 cannot be represented as a sum of terms.

theorem plrs_seq_one_N_le_two_of_complete (N : ℕ) (hN : 1 ≤ N)
    (hcomp : is_complete_sequence (plrs_seq [1, N])) : N ≤ 2
plrs_seq_one_one_one_completeIn LeanElementary Number Theory

The recurrence sequence plrs_seq [1, 1, 1] is complete.

theorem plrs_seq_one_one_one_complete : is_complete_sequence (plrs_seq [1, 1, 1])
plrs_seq_one_one_two_completeIn LeanElementary Number Theory

The recurrence sequence plrs_seq [1, 1, 2] is complete.

theorem plrs_seq_one_one_two_complete : is_complete_sequence (plrs_seq [1, 1, 2])
postage_stamp_basis_range_le_of_card_threeIn LeanElementary Number Theory

For every h ≥ 1 and every 3-element set A of integers (negative elements allowed), the h-range n_h(A) -- the largest n with [0, n] contained in the h-fold sumset hA -- is at most ⌊(h² + 6h + 1)/4⌋.

theorem postage_stamp_basis_range_le_of_card_three (h : ℕ) (hh : 1 ≤ h) (A : Finset ℤ)
    (hA : A.card = 3) :
    postage_stamp_basis_range h A ≤ (h ^ 2 + 6 * h + 1) / 4
postage_stamp_basis_range_three_core_boundIn LeanElementary Number Theory

If 0 < x < y, gcd(x, y) = 1, y ≤ h+1, and [0, N] is contained in the h-fold sumset of {a, a+x, a+y}, then N ≤ (h² + 6h + 1)/4.

theorem postage_stamp_basis_range_three_core_bound (h : ℕ) (hh : 1 ≤ h) (a x y : ℤ)
    (hx : 0 < x) (hy : x < y) (hcop : IsCoprime x y) (hyh : y ≤ (h : ℤ) + 1)
    (N : ℕ) (hsub : ∀ m : ℕ, m ≤ N → int_mem_h_fold_sumset h {a, a + x, a + y} m) :
    N ≤ (h ^ 2 + 6 * h + 1) / 4
postage_stamp_lemma_two_twoIn LeanElementary Number Theory

If [0, N] is contained in the h-fold sumset of {a, a+x, a+y} with 0 < x < y and N ≥ h+1, then x and y are coprime, and y ≤ h + 1.

theorem postage_stamp_lemma_two_two (h : ℕ) (a x y : ℤ) (hx : 0 < x) (hy : x < y)
    (N : ℕ) (hN : h + 1 ≤ N)
    (hsub : ∀ m : ℕ, m ≤ N → int_mem_h_fold_sumset h {a, a + x, a + y} m) :
    IsCoprime x y ∧ y ≤ (h : ℤ) + 1
postage_stamp_number_neg_two_eq_of_mod_four_eq_zeroIn LeanElementary Number Theory

If h ≥ 8 and h ≡ 0 (mod 4), then n♭_h(2) = n_h(2) = (h² + 6h)/4.

theorem postage_stamp_number_neg_two_eq_of_mod_four_eq_zero (h : ℕ) (hh : 8 ≤ h) (h4 : h % 4 = 0) :
    postage_stamp_number_neg h 2 = (h ^ 2 + 6 * h) / 4 ∧ postage_stamp_number h 2 = (h ^ 2 + 6 * h) / 4
pow_sub_one_eq_sum_chooseIn LeanElementary Number Theory

The product over the support of F of (y p − 1)^(k p) expands as the sum over all exponent vectors j ≤ k of the product over p of binom(k p, j p) y p^(j p) (−1)^(k p − j p).

theorem pow_sub_one_eq_sum_choose (F k : Nat →₀ Nat) (hk : k ≤ F) (y : Nat → Complex) :
    ∏ p ∈ F.support, (y p - 1) ^ (k p)
      = ∑ j ∈ Finset.Iic k, ∏ p ∈ F.support,
          ((k p).choose (j p) : Complex) * (y p) ^ (j p) * (-1 : Complex) ^ (k p - j p)
rat_row_kernel_finrank_ge_twoIn LeanElementary Number Theory

Let w_1,...,w_k be integer vectors in ℤ^n whose real span U ⊆ ℝ^n has dimension at most n - 2, with n ≥ 2. Then the space of rational vectors orthogonal to all of them has ℚ-dimension at least 2.

theorem rat_row_kernel_finrank_ge_two {k n : ℕ} (hn : 2 ≤ n) (w : Fin k → Fin n → ℤ)
    (U : Submodule ℝ (EuclideanSpace ℝ (Fin n)))
    (hU : U = Submodule.span ℝ (Set.range fun i => int_to_euclidean n (w i)))
    (h_dim : Module.finrank ℝ U ≤ n - 2) :
    2 ≤ Module.finrank ℚ (rat_row_kernel w)
rat_subspace_has_vector_outside_spanIn LeanElementary Number Theory

A ℚ-subspace of ℚ^n of dimension at least 2 contains a vector outside ℚ·y₀ for any prescribed y₀.

theorem rat_subspace_has_vector_outside_span {n : ℕ} (V : Submodule ℚ (Fin n → ℚ))
    (hV : 2 ≤ Module.finrank ℚ V) (y₀ : Fin n → ℚ) : ∃ y ∈ V, y ∉ Submodule.span ℚ {y₀}
restricted_base_ell_partition_count_oneIn LeanElementary Number Theory

For any integers k >= 1 and ell >= 2, the restricted base-ell partition count of 1 is 1.

theorem restricted_base_ell_partition_count_one (k ℓ : ℕ) (hk : 1 ≤ k) (hℓ : 2 ≤ ℓ) :
    restricted_base_ell_partition_count k ℓ 1 = 1
restricted_base_ell_partition_count_zeroIn LeanElementary Number Theory

For any natural numbers $k$ and $\ell$ with $\ell \ge 2$, the restricted base-$\ell$ partition count of $0$ with bound $k$ is $1$.

theorem restricted_base_ell_partition_count_zero (k ℓ : ℕ) (hℓ : 2 ≤ ℓ) :
    restricted_base_ell_partition_count k ℓ 0 = 1
restricted_base_ell_partition_lt_succ_of_not_dvdIn LeanElementary Number Theory

For integers k, ell >= 2, if ell does not divide k + 1, then the restricted base-ell partition count of k + 1 is strictly less than the restricted base-ell partition count of k.

theorem restricted_base_ell_partition_lt_succ_of_not_dvd (k ℓ : ℕ) (hk : 2 ≤ k) (hℓ : 2 ≤ ℓ)
    (hdiv : ¬ ℓ ∣ k + 1) :
    restricted_base_ell_partition_count k ℓ (k + 1) < restricted_base_ell_partition_count k ℓ k
restricted_base_ell_partition_monotone_iff_and_not_strict_monoIn LeanElementary Number Theory

For integers k, ell >= 2, the restricted base-ell partition function n |-> restricted_base_ell_partition_count k ell n is monotone if and only if ell divides k + 1, and it is never strictly monotone.

theorem restricted_base_ell_partition_monotone_iff_and_not_strict_mono (k ℓ : ℕ) (hk : 2 ≤ k) (hℓ : 2 ≤ ℓ) :
    (Monotone (restricted_base_ell_partition_count k ℓ) ↔ ℓ ∣ k + 1) ∧
    ¬ StrictMono (restricted_base_ell_partition_count k ℓ)
restricted_base_ell_partition_monotone_of_dvdIn LeanElementary Number Theory

For integers k, ell >= 2, if ell divides k + 1, then the sequence n |-> restricted_base_ell_partition_count k ell n is monotone.

theorem restricted_base_ell_partition_monotone_of_dvd (k ℓ : ℕ) (hk : 2 ≤ k) (hℓ : 2 ≤ ℓ)
    (hdiv : ℓ ∣ k + 1) :
    Monotone (restricted_base_ell_partition_count k ℓ)
restricted_base_ell_partition_not_eventually_log_convexIn LeanElementary Number Theory

Let k, ℓ ≥ 2 be integers with k ≠ ℓ - 1. Then the sequence n ↦ b_{k,ℓ}(n) is not eventually log-convex; that is, there does not exist n₀ such that b_{k,ℓ}(n)² ≤ b_{k,ℓ}(n - 1) * b_{k,ℓ}(n + 1) for all n ≥ n₀.

theorem restricted_base_ell_partition_not_eventually_log_convex
    (k ℓ : ℕ) (hk : 2 ≤ k) (hℓ : 2 ≤ ℓ) (hne : k ≠ ℓ - 1) :
    ¬ ∃ n₀ : ℕ, ∀ n : ℕ, n₀ ≤ n →
      (restricted_base_ell_partition k ℓ n) ^ 2 ≤
        restricted_base_ell_partition k ℓ (n - 1) * restricted_base_ell_partition k ℓ (n + 1)
restricted_base_ell_partition_not_eventually_log_convex_of_gtIn LeanElementary Number Theory

Let k, ℓ ≥ 2 be integers with k > ℓ - 1. Then the sequence n ↦ b_{k,ℓ}(n) is not eventually log-convex; that is, there does not exist n₀ such that b_{k,ℓ}(n)² ≤ b_{k,ℓ}(n - 1) * b_{k,ℓ}(n + 1) for all n ≥ n₀.

theorem restricted_base_ell_partition_not_eventually_log_convex_of_gt
    (k ℓ : ℕ) (hk : 2 ≤ k) (hℓ : 2 ≤ ℓ) (hgt : ℓ - 1 < k) :
    ¬ ∃ n₀ : ℕ, ∀ n : ℕ, n₀ ≤ n →
      (restricted_base_ell_partition k ℓ n) ^ 2 ≤
        restricted_base_ell_partition k ℓ (n - 1) * restricted_base_ell_partition k ℓ (n + 1)
restricted_base_ell_partition_not_eventually_log_convex_of_ltIn LeanElementary Number Theory

Let k, ℓ ≥ 2 be integers with k < ℓ - 1. Then the sequence n ↦ b_{k,ℓ}(n) is not eventually log-convex; that is, there does not exist n₀ such that b_{k,ℓ}(n)² ≤ b_{k,ℓ}(n - 1) * b_{k,ℓ}(n + 1) for all n ≥ n₀.

theorem restricted_base_ell_partition_not_eventually_log_convex_of_lt
    (k ℓ : ℕ) (hk : 2 ≤ k) (hℓ : 2 ≤ ℓ) (hlt : k < ℓ - 1) :
    ¬ ∃ n₀ : ℕ, ∀ n : ℕ, n₀ ≤ n →
      (restricted_base_ell_partition k ℓ n) ^ 2 ≤
        restricted_base_ell_partition k ℓ (n - 1) * restricted_base_ell_partition k ℓ (n + 1)
restricted_base_ell_partition_not_monotone_of_not_dvdIn LeanElementary Number Theory

For integers k, ell >= 2, if ell does not divide k + 1, then the sequence n |-> restricted_base_ell_partition_count k ell n is not monotone.

theorem restricted_base_ell_partition_not_monotone_of_not_dvd (k ℓ : ℕ) (hk : 2 ≤ k) (hℓ : 2 ≤ ℓ)
    (hdiv : ¬ ℓ ∣ k + 1) :
    ¬ Monotone (restricted_base_ell_partition_count k ℓ)
restricted_base_ell_partition_not_strict_monoIn LeanElementary Number Theory

For integers k, ell >= 2, the restricted base-ell partition function n |-> restricted_base_ell_partition_count k ell n is not strictly monotone.

theorem restricted_base_ell_partition_not_strict_mono (k ℓ : ℕ) (hk : 2 ≤ k) (hℓ : 2 ≤ ℓ) :
    ¬ StrictMono (restricted_base_ell_partition_count k ℓ)
restricted_cycle_global_gcd_eq_one_param_gcd_3_6In LeanElementary Number Theory

For r = 3 and n = 6 the global and one-parameter gcds agree (both equal 120).

theorem restricted_cycle_global_gcd_eq_one_param_gcd_3_6 : restricted_cycle_global_gcd 3 6 = restricted_cycle_one_param_gcd 3 6
restricted_cycle_one_param_gcd_three_factorizationIn LeanElementary Number Theory

Theorem 5.1 of arXiv:2610.40342 at r = 3: for n ≥ 5 the one-parameter gcd factors as the falling factorial (n-1)(n-2)(n-3) times a 3-smooth number 2^a·3^b.

theorem restricted_cycle_one_param_gcd_three_factorization (n : ℕ) (hn : 5 ≤ n) : ∃ a b : ℕ, restricted_cycle_one_param_gcd 3 n = (n - 1) * (n - 2) * (n - 3) * 2 ^ a * 3 ^ b
restricted_cycle_perms_count_recurrenceIn LeanElementary Number Theory

Cycle-stripping recurrence ((2.1) of arXiv:2610.40342): for n ≥ 1, the number a_S(n) of permutations of Fin n with all cycle lengths outside S equals the sum, over allowed cycle lengths m ∈ [1,n]∖S, of ((n-1)!/(n-m)!)·a_S(n-m), obtained by stripping off the cycle through a fixed basepoint.

theorem restricted_cycle_perms_count_recurrence (n : ℕ) (S : Finset ℕ) (hn : 0 < n) : restricted_cycle_perms_count n S = Finset.sum ((Finset.Icc 1 n).filter (fun m => m ∉ S)) (fun m => (n - 1).factorial / (n - m).factorial * restricted_cycle_perms_count (n - m) S)
subset_sum_avoiding_card_le_regularIn LeanElementary Number Theory

For integers $1 \le n \le M$, every subset of $\{1, \dots, M\}$ avoiding subset sum $n$ has cardinality at most $M - \lceil n/2 \rceil$.

lemma subset_sum_avoiding_card_le_regular (M n : ℕ) (hn : 1 ≤ n) (hM : n ≤ M) (A : Finset ℕ) (hA : A ⊆ Finset.Icc 1 M) (havoid : avoids_subset_sum A n) : A.card ≤ M - ⌈(n : ℝ) / 2⌉₊
subset_sum_avoiding_max_card_regularIn LeanElementary Number Theory

For all integers $1 \le n \le M$, the maximum cardinality $F(M, n)$ of a subset of $\{1, \dots, M\}$ avoiding subset sum $n$ is equal to $M - \lceil n/2 \rceil$.

theorem subset_sum_avoiding_max_card_regular (M n : ℕ) (hn : 1 ≤ n) (hM : n ≤ M) : max_subset_sum_avoiding_size M n = M - ⌈(n : ℝ) / 2⌉₊
sum_div_pow_two_eq_sub_binary_digit_sumIn LeanElementary Number Theory

For every natural number $n$, the sum of $\lfloor n / 2^i \rfloor$ for $i$ from $1$ to $\lfloor \log_2 n \rfloor$ equals $n$ minus the sum of the digits in the binary representation of $n$.

open BigOperators in
theorem sum_div_pow_two_eq_sub_binary_digit_sum (n : ℕ) :
    ∑ i ∈ Finset.Icc 1 (Nat.log 2 n), n / 2 ^ i = n - (Nat.digits 2 n).sum
three_power_dvd_restricted_cycle_perms_countIn LeanElementary Number Theory

The 3-primary part of the one-parameter gcd divides a_S(n) for every excluded set S = {1,2,3} ∪ T, for n ≥ 5 outside the exceptional class n ≥ 111, n ≡ 30 (mod 81). This is the p = 3 half of Proposition 11.3(iv) at r = 3 and the open core of Question 14.10 / OP-746.

theorem three_power_dvd_restricted_cycle_perms_count (n : ℕ) (hn : 5 ≤ n) (h : ¬ (111 ≤ n ∧ n % 81 = 30)) (e : ℕ) (he : 3 ^ e ∣ restricted_cycle_one_param_gcd 3 n) (S : Finset ℕ) (hS : S ∈ restricted_cycle_excluded_family 3 n) : 3 ^ e ∣ restricted_cycle_perms_count n S
two_mul_le_four_mul_sq_subIn LeanElementary Number Theory

For m ≥ 2, 2m is at most 4m² − q(m), where q(m) is the smallest prime not dividing m.

theorem two_mul_le_four_mul_sq_sub (m : ℕ) (hm : 2 ≤ m) :
    2 * m ≤ 4 * m ^ 2 - nat_least_prime_not_dvd m
two_mul_sub_one_le_four_mul_sq_subIn LeanElementary Number Theory

For m at least two, 2m - 1 is at most 4m squared minus the smallest prime not dividing m.

theorem two_mul_sub_one_le_four_mul_sq_sub (m : ℕ) (hm : 2 ≤ m) :
    2*m - 1 ≤ 4*m^2 - nat_least_prime_not_dvd m
two_power_dvd_restricted_cycle_perms_countIn LeanElementary Number Theory

The 2-primary part of the one-parameter gcd divides a_S(n) = restricted_cycle_perms_count n S for every excluded set S = {1,2,3} ∪ T, for n ≥ 5 (the p = 2 half of Proposition 11.3(iv) at r = 3).

theorem two_power_dvd_restricted_cycle_perms_count (n : ℕ) (hn : 5 ≤ n) (e : ℕ) (he : 2 ^ e ∣ restricted_cycle_one_param_gcd 3 n) (S : Finset ℕ) (hS : S ∈ restricted_cycle_excluded_family 3 n) : 2 ^ e ∣ restricted_cycle_perms_count n S
view_obstruction_unresolved_node_infinite_witnessesIn LeanElementary Number Theory

Let U be a rational subspace of ℝ^n with dim U ≤ n - 2 such that U^⊥ contains an integer vector with no zero coordinate, and let T > 0. If the offset δ_U^2 satisfies T ≤ δ_U^2, then the set of primitive vectors v ∈ ℤ^n with strictly positive coordinates satisfying view_obstruction_offset n U ≤ d_n(v) is infinite.

open Submodule in
theorem view_obstruction_unresolved_node_infinite_witnesses
    (n : ℕ) (U : Submodule ℝ (EuclideanSpace ℝ (Fin n)))
    (h_rat : is_rational_subspace n U)
    (h_dim : Module.finrank ℝ U ≤ n - 2)
    (h_nz : ∃ z : Fin n → ℤ, int_to_euclidean n z ∈ Uᗮ ∧ ∀ i, z i ≠ 0)
    (T : ℝ) (hT : 0 < T) (h_offset : T ≤ view_obstruction_offset n U) :
    {v : Fin n → ℤ | (∀ i, 0 < v i) ∧ is_primitive_int_vec n v ∧
      view_obstruction_offset n U ≤ view_obstruction_ray_dist n v}.Infinite
view_obstruction_witness_set_infinite_of_independent_pairIn LeanElementary Number Theory

If z and s are integer vectors in U^⊥, z has no zero coordinate, and s is not on the real line through z, then there are infinitely many primitive integer vectors v with strictly positive coordinates such that δ_U^2 ≤ d_n(v).

open Submodule in
theorem view_obstruction_witness_set_infinite_of_independent_pair
    (n : ℕ) (U : Submodule ℝ (EuclideanSpace ℝ (Fin n))) (z s : Fin n → ℤ)
    (hz : int_to_euclidean n z ∈ Uᗮ) (hs : int_to_euclidean n s ∈ Uᗮ)
    (hz0 : ∀ i, z i ≠ 0)
    (hind : int_to_euclidean n s ∉ Submodule.span ℝ {int_to_euclidean n z}) :
    {v : Fin n → ℤ | (∀ i, 0 < v i) ∧ is_primitive_int_vec n v ∧
      view_obstruction_offset n U ≤ view_obstruction_ray_dist n v}.Infinite
weakly_consecutive_dvd_iff_modIn LeanElementary Number Theory

Lemma 2.2 of arXiv:2401.09497: the positions holding multiples of m form a single residue class modulo m.

theorem weakly_consecutive_dvd_iff_mod {k : ℕ} (σ : Equiv.Perm (Fin k))
    (hσ : is_weakly_consecutive σ) {m : ℕ} (hm : 0 < m) (hmk : m ≤ k)
    {i : Fin k} (hi : m ∣ (σ i : ℕ) + 1) (j : Fin k) :
    m ∣ (σ j : ℕ) + 1 ↔ (m : ℤ) ∣ (i : ℤ) - (j : ℤ)
weakly_consecutive_interior_one_neighbors_evenIn LeanElementary Number Theory

If 1 is at an interior position i, both adjacent positions i-1 and i+1 must hold even values.

theorem weakly_consecutive_interior_one_neighbors_even {k : ℕ} (σ : Equiv.Perm (Fin k))
    (hσ : is_weakly_consecutive σ) (i : Fin k) (hi : (σ i : ℕ) = 0)
    (h0 : 0 < (i : ℕ)) (hk : (i : ℕ) + 1 < k) :
    2 ∣ (σ ⟨(i : ℕ) - 1, by omega⟩ : ℕ) + 1 ∧ 2 ∣ (σ ⟨(i : ℕ) + 1, by omega⟩ : ℕ) + 1
weakly_consecutive_mod_geIn LeanElementary Number Theory

Any position i holding a multiple of m satisfies k % m <= i % m, ensuring the residue class has size exactly floor(k/m).

theorem weakly_consecutive_mod_ge {k : ℕ} (σ : Equiv.Perm (Fin k))
    (hσ : is_weakly_consecutive σ) {m : ℕ} (hm : 0 < m) (hmk : m ≤ k)
    {i : Fin k} (hi : m ∣ (σ i : ℕ) + 1) :
    k % m ≤ (i : ℕ) % m
zero_sum_constant_s_star_eqIn LeanElementary Number Theory

For every odd prime $p$, the zero-sum constant $\mathsf{s}_p^*$ is equal to $2p + 1$.

theorem zero_sum_constant_s_star_eq (p : ℕ) (hp : p.Prime) (hp_odd : p ≠ 2) :
    zero_sum_constant_s_star p = 2 * p + 1
zero_sum_constant_s_star_upper_boundIn LeanElementary Number Theory

For every odd prime $p$, every multiset $W$ of size $2p + 1$ of units in $\mathbb{Z}/p^2\mathbb{Z}$ has a sub-multiset $T \le W$ of cardinality $p$ with (T.sum : ZMod (p^2)).val % p = 0 and (T.sum : ZMod (p^2)).val % p^2 ≠ 0.

theorem zero_sum_constant_s_star_upper_bound (p : ℕ) (hp : p.Prime) (hp_odd : p ≠ 2)
    (W : Multiset (ZMod (p ^ 2))) (hW_card : W.card = 2 * p + 1) (hW_unit : ∀ x ∈ W, IsUnit x) :
    ∃ T ≤ W, T.card = p ∧ T.sum.val % p = 0 ∧ T.sum.val % p ^ 2 ≠ 0
zero_sum_constant_s_star_upper_bound_count_vector_coreIn LeanElementary Number Theory

Let $p$ be an odd prime and let $n : \mathbb{Z}/p\mathbb{Z} \to \mathbb{N}$ count the terms of a sequence of $2p+1$ nonzero residues, i.e. $n(0) = 0$ and $\sum_r n(r) = 2p+1$. Then there is a profile $t \le n$ of total mass $p$ whose weighted sum $\sum_r t(r)\,r$ vanishes in $\mathbb{Z}/p\mathbb{Z}$, which moreover uses some class only partially ($0 < t(r) < n(r)$).

theorem zero_sum_constant_s_star_upper_bound_count_vector_core (p : ℕ) [NeZero p] (hp : p.Prime) (hp_odd : p ≠ 2)
    (n : ZMod p → ℕ) (h0 : n 0 = 0) (hsum : ∑ r : ZMod p, n r = 2 * p + 1) :
    ∃ t : ZMod p → ℕ, (∀ r : ZMod p, t r ≤ n r) ∧ (∑ r : ZMod p, t r = p) ∧
      (∑ r : ZMod p, (t r : ZMod p) * r = 0) ∧
      ∃ r : ZMod p, 0 < t r ∧ t r < n r
zero_sum_constant_s_star_upper_bound_residue_partitionIn LeanElementary Number Theory

The residue classes modulo $p$ partition a multiset $W$ of units of $\mathbb{Z}/p^2\mathbb{Z}$: the cardinalities of the fibres of $x \mapsto x \bmod p$ sum to W.card, and the fibre over $0$ is empty.

theorem zero_sum_constant_s_star_upper_bound_residue_partition (p : ℕ) [NeZero p] (hp : p.Prime)
    (W : Multiset (ZMod (p ^ 2))) (hW_unit : ∀ x ∈ W, IsUnit x) :
    (∑ r : ZMod p, (W.filter fun x => (ZMod.cast x : ZMod p) = r).card = W.card) ∧
      (W.filter fun x => (ZMod.cast x : ZMod p) = 0).card = 0
zero_sum_constant_s_star_upper_bound_subset_of_countsIn LeanElementary Number Theory

If a profile $t$ of total mass $p$ with vanishing weighted sum fits inside the residue-class counts of a multiset $W$ of units of $\mathbb{Z}/p^2\mathbb{Z}$ and uses some class only partially, then $W$ has a sub-multiset $T$ of cardinality $p$ whose sum reduces to $0$ modulo $p$ but is a nonzero element of $\mathbb{Z}/p^2\mathbb{Z}$.

theorem zero_sum_constant_s_star_upper_bound_subset_of_counts (p : ℕ) [NeZero p] (hp : p.Prime)
    (W : Multiset (ZMod (p ^ 2))) (t : ZMod p → ℕ)
    (hle : ∀ r : ZMod p, t r ≤ (W.filter fun x => (ZMod.cast x : ZMod p) = r).card)
    (hcard : ∑ r : ZMod p, t r = p) (hzero : ∑ r : ZMod p, (t r : ZMod p) * r = 0)
    (hpart : ∃ r : ZMod p, 0 < t r ∧
      t r < (W.filter fun x => (ZMod.cast x : ZMod p) = r).card) :
    ∃ T ≤ W, T.card = p ∧ (ZMod.cast T.sum : ZMod p) = 0 ∧ T.sum ≠ 0
zmod_chinese_remainder_primesIn LeanElementary Number Theory

Given prescribed residues r_p in ZMod p for each prime divisor p of n, there exists an element c in ZMod n reducing to r_p modulo p for all prime divisors p of n.

theorem zmod_chinese_remainder_primes (n : ℕ) [NeZero n] (r : (p : ℕ) → p.Prime → p ∣ n → ZMod p) : ∃ c : ZMod n, ∀ (p : ℕ) (hp : p.Prime) (hd : p ∣ n), ZMod.castHom hd (ZMod p) c = r p hp hd
zmod_isUnit_iff_castHom_ne_zero_all_primeIn LeanElementary Number Theory

An element x of ZMod n is a unit if and only if its reduction modulo each prime divisor p of n is nonzero.

theorem zmod_isUnit_iff_castHom_ne_zero_all_prime (n : ℕ) [NeZero n] (x : ZMod n) : IsUnit x ↔ ∀ (p : ℕ) (hp : p.Prime) (hd : p ∣ n), ZMod.castHom hd (ZMod p) x ≠ 0
zmod_pow_two_val_mod_criterionIn LeanElementary Number Theory

For a prime $p$ and $x \in \mathbb{Z}/p^2\mathbb{Z}$, the reduction of $x$ modulo $p$ vanishes exactly when x.val % p = 0, and x.val % p^2 is nonzero exactly when x ≠ 0.

theorem zmod_pow_two_val_mod_criterion (p : ℕ) (hp : p.Prime) (x : ZMod (p ^ 2)) :
    ((ZMod.cast x : ZMod p) = 0 ↔ x.val % p = 0) ∧ (x.val % p ^ 2 ≠ 0 ↔ x ≠ 0)
triangle_homothet_average_containmentIn LeanConvex Analysis

Let $P \subset \mathbb{R}^2$ be a finite set of at least 2 points in general position. The average over all pairs $(p, q) \in P.\text{offDiag}$ of the number of points in $(P \cap \text{triangle\_homothet}(p, q)) \setminus \{p, q\}$, given by $(1 / (|P|(|P|-1))) \sum_{(p,q) \in P.\text{offDiag}} |(P \cap \text{triangle\_homothet}(p, q)) \setminus \{p, q\}|$, is at least $(|P|-7)/12$.

theorem triangle_homothet_average_containment (P : Finset (ℝ × ℝ))
    (hgen : triangle_general_position P) (hn : 2 ≤ P.card) :
    open scoped Classical in
    (1 / ((P.card : ℝ) * ((P.card : ℝ) - 1))) *
      ∑ pair ∈ P.offDiag,
        (((P.filter (· ∈ triangle_homothet pair.1 pair.2) \ {pair.1, pair.2}).card : ℝ)) ≥
    ((P.card : ℝ) - 7) / 12
triangle_homothet_containmentIn LeanConvex Analysis

Let $P \subset \mathbb{R}^2$ be a finite set in general position with respect to the triangle. Then there exists a pair of distinct points $p, q \in P$ such that any triangle homothet $\triangle(a,b,c)$ containing both $p$ and $q$ contains at least $(|P|-7)/12$ other points of $P$.

open Classical in
theorem triangle_homothet_containment (P : Finset (ℝ × ℝ))
    (hgen : triangle_general_position P) :
    ∃ p ∈ P, ∃ q ∈ P, p ≠ q ∧
      ∀ a b c : ℝ, p ∈ canonical_triangle a b c → q ∈ canonical_triangle a b c →
        (P.card - 7 : ℝ) / 12 ≤
          ((P.filter (fun r => r ∈ canonical_triangle a b c ∧ r ≠ p ∧ r ≠ q)).card : ℝ)
triangle_homothet_subset_canonicalIn LeanConvex Analysis

Let $a, b, c \in \mathbb{R}$ and $p, q \in \mathbb{R}^2$. If $p$ and $q$ both belong to $\triangle(a,b,c)$, then the minimal homothet $T(p,q)$ is a subset of $\triangle(a,b,c)$.

theorem triangle_homothet_subset_canonical (a b c : ℝ) (p q : ℝ × ℝ)
    (hp : p ∈ canonical_triangle a b c) (hq : q ∈ canonical_triangle a b c) :
    triangle_homothet p q ⊆ canonical_triangle a b c
triangle_homothet_sum_containmentIn LeanConvex Analysis

Let $P \subset \mathbb{R}^2$ be a finite set of at least 2 points in general position. The sum over all pairs $(p, q) \in P.\text{offDiag}$ of the number of points in $(P \cap \text{triangle\_homothet}(p, q)) \setminus \{p, q\}$ is at least $(|P|(|P|-1)(|P|-7))/12$.

theorem triangle_homothet_sum_containment (P : Finset (ℝ × ℝ))
    (hgen : triangle_general_position P) (hn : 2 ≤ P.card) :
    open scoped Classical in
    (∑ pair ∈ P.offDiag,
      (((P.filter (· ∈ triangle_homothet pair.1 pair.2) \ {pair.1, pair.2}).card : ℝ))) ≥
    ((P.card : ℝ) * ((P.card : ℝ) - 1) * ((P.card : ℝ) - 7)) / 12
triangle_minimal_homothet_containmentIn LeanConvex Analysis

Let $P \subset \mathbb{R}^2$ be a finite set in general position with respect to the triangle. Then there exist distinct points $p, q \in P$ such that the minimal homothet $T(p,q)$ contains at least $(|P|-7)/12$ points of $P$ distinct from $p$ and $q$.

open Classical in
theorem triangle_minimal_homothet_containment (P : Finset (ℝ × ℝ))
    (hgen : triangle_general_position P) :
    ∃ p ∈ P, ∃ q ∈ P, p ≠ q ∧
      (P.card - 7 : ℝ) / 12 ≤
        ((P.filter (fun r => r ∈ triangle_homothet p q ∧ r ≠ p ∧ r ≠ q)).card : ℝ)
finset_sum_eq_choose_two_iffIn LeanInteger & Polyhedral Optimization

A finite set T of natural numbers satisfies ∑ T = card T * (card T - 1) / 2 if and only if T = {0, 1, …, card T - 1}.

theorem finset_sum_eq_choose_two_iff (T : Finset ℕ) : T.sum id = T.card.choose 2 ↔ T = Finset.range T.card
matrix_has_psd_factorization_monoIn LeanInteger & Polyhedral Optimization

If a real matrix M has a positive semidefinite factorization of size r₁ and r₁ ≤ r₂, then M has a positive semidefinite factorization of size r₂.

theorem matrix_has_psd_factorization_mono {m n : Type*} (M : Matrix m n ℝ) {r₁ r₂ : ℕ} (hle : r₁ ≤ r₂) (h : matrix_has_psd_factorization M r₁) : matrix_has_psd_factorization M r₂
matrix_psd_factorization_zero_entry_rank_add_leIn LeanInteger & Polyhedral Optimization

In a size-r PSD factorization M_ij = tr(A_i B_j) with all factors positive semidefinite, every zero entry M_ij = 0 forces rank A_i + rank B_j ≤ r.

theorem matrix_psd_factorization_zero_entry_rank_add_le {m n : Type*} {M : Matrix m n ℝ} {r : ℕ} {A : m → Matrix (Fin r) (Fin r) ℝ} {B : n → Matrix (Fin r) (Fin r) ℝ} (hA : ∀ i, (A i).PosSemidef) (hB : ∀ j, (B j).PosSemidef) (hM : ∀ i j, M i j = (A i * B j).trace) {i : m} {j : n} (h : M i j = 0) : (A i).rank + (B j).rank ≤ r
matrix_psd_mul_eq_zero_of_trace_mul_eq_zeroIn LeanInteger & Polyhedral Optimization

If A and B are positive semidefinite real matrices and the trace of A * B is zero, then A * B = 0.

theorem matrix_psd_mul_eq_zero_of_trace_mul_eq_zero {r : ℕ} {A B : Matrix (Fin r) (Fin r) ℝ} (hA : A.PosSemidef) (hB : B.PosSemidef) (h : (A * B).trace = 0) : A * B = 0
matrix_psd_trace_mul_nonnegIn LeanInteger & Polyhedral Optimization

The trace of the product of two positive semidefinite real matrices is nonnegative.

theorem matrix_psd_trace_mul_nonneg {r : ℕ} {A B : Matrix (Fin r) (Fin r) ℝ} (hA : A.PosSemidef) (hB : B.PosSemidef) : 0 ≤ (A * B).trace
octagon_section_convexHull_eqIn LeanInteger & Polyhedral Optimization

The convex hull of the eight octagon vertices equals the intersection of the eight half-planes {X | 0 ≤ 1 - (a_i X_0 + b_i X_1)}: convexHull(range v) = {x | ∀ i, 0 ≤ facets_val i x}.

theorem octagon_section_convexHull_eq :
    convexHull ℝ (Set.range octagon_section_plane_vertices)
      = {x : Fin 2 → ℝ | ∀ i, 0 ≤ octagon_section_plane_facets_val i x}
octagon_section_convex_polygon_slackIn LeanInteger & Polyhedral Optimization

octagon_section_slack_matrix is the slack matrix of a convex octagon in the plane (the polygon P_2).

theorem octagon_section_convex_polygon_slack :
    is_convex_polygon_slack_matrix 8 octagon_section_slack_matrix
octagon_section_extremePointsIn LeanInteger & Polyhedral Optimization

Every octagon vertex is an extreme point of the octagon's convex hull, and conversely: extremePoints(convexHull(range v)) = range v.

theorem octagon_section_extremePoints :
    (convexHull ℝ (Set.range octagon_section_plane_vertices)).extremePoints ℝ
      = Set.range octagon_section_plane_vertices
octagon_section_slack_psd_fourIn LeanInteger & Polyhedral Optimization

octagon_section_slack_matrix has a positive semidefinite factorization of size 4, built from the octahedron lift: A_i = q_i q_iᵀ and B_j = Σ_k μ_jk c_k c_kᵀ.

theorem octagon_section_slack_psd_four :
    matrix_has_psd_factorization octagon_section_slack_matrix 4
octagon_section_slack_psd_identityIn LeanInteger & Polyhedral Optimization

For all i, j, the octagon slack entry equals the μ-weighted sum of the squared octahedron facet–vertex inner products: S_ij = Σ_k μ_jk (q_i · c_k)^2. Equivalently, (q_i · c_k)^2 equals the octahedron slack m_ik in {0,1,2,3}, and S_ij = Σ_k μ_jk m_ik.

theorem octagon_section_slack_psd_identity (i j : Fin 8) :
    octagon_section_slack_matrix i j
      = ∑ k : Fin 6, octagon_vertex_weights j k
          * (octahedron_facet_vectors i ⬝ᵥ octahedron_vertex_vectors k)^2
permutahedron_five_not_has_psd_factorization_sixIn LeanInteger & Polyhedral Optimization

The slack matrix of the standard five-element permutahedron has no positive semidefinite factorization of size 6.

theorem permutahedron_five_not_has_psd_factorization_six : ¬ matrix_has_psd_factorization (permutahedron_slack_matrix 5) 6
permutahedron_five_slack_matrix_has_psd_factorizationIn LeanInteger & Polyhedral Optimization

The slack matrix of the standard five-element permutahedron has a positive semidefinite factorization of some finite size.

theorem permutahedron_five_slack_matrix_has_psd_factorization : ∃ r, matrix_has_psd_factorization (permutahedron_slack_matrix 5) r
permutahedron_five_slack_matrix_rankIn LeanInteger & Polyhedral Optimization

The slack matrix of the standard five-element permutahedron has ordinary rank 5.

theorem permutahedron_five_slack_matrix_rank : (permutahedron_slack_matrix 5).rank = 5
permutahedron_slack_matrix_eq_zero_iffIn LeanInteger & Polyhedral Optimization

The slack matrix entry at (S, σ) vanishes exactly when σ maps S onto the initial segment {0, 1, …, |S| - 1}.

theorem permutahedron_slack_matrix_eq_zero_iff (n : ℕ) (S : {S : Finset (Fin n) // S.Nonempty ∧ S ≠ Finset.univ}) (σ : Equiv.Perm (Fin n)) : permutahedron_slack_matrix n S σ = 0 ↔ S.val.image (fun i => (σ i).val) = Finset.range S.val.card
permutahedron_slack_matrix_zero_column_cardIn LeanInteger & Polyhedral Optimization

For every permutation σ of Fin n, exactly n-1 rows S of the slack matrix have zero entry in column σ.

theorem permutahedron_slack_matrix_zero_column_card (n : ℕ) (σ : Equiv.Perm (Fin n)) : {S : {S : Finset (Fin n) // S.Nonempty ∧ S ≠ Finset.univ} | permutahedron_slack_matrix n S σ = 0}.ncard = n - 1
polygon_eleven_gon_not_psd_factorization_fourIn LeanInteger & Polyhedral Optimization

For every real matrix S : Matrix (Fin 11) (Fin 11) ℝ, if is_convex_polygon_slack_matrix 11 S holds, then ¬ matrix_has_psd_factorization S 4.

theorem polygon_eleven_gon_not_psd_factorization_four :
    ∀ (S : Matrix (Fin 11) (Fin 11) ℝ),
      is_convex_polygon_slack_matrix 11 S →
      ¬ matrix_has_psd_factorization S 4
polygon_ten_gon_not_psd_factorization_fourIn LeanInteger & Polyhedral Optimization

For every real matrix S : Matrix (Fin 10) (Fin 10) ℝ, if is_convex_polygon_slack_matrix 10 S holds, then ¬ matrix_has_psd_factorization S 4.

theorem polygon_ten_gon_not_psd_factorization_four :
    ∀ (S : Matrix (Fin 10) (Fin 10) ℝ),
      is_convex_polygon_slack_matrix 10 S →
      ¬ matrix_has_psd_factorization S 4
polygon_twelve_gon_not_psd_factorization_fourIn LeanInteger & Polyhedral Optimization

For every real matrix S : Matrix (Fin 12) (Fin 12) ℝ, if is_convex_polygon_slack_matrix 12 S holds, then ¬ matrix_has_psd_factorization S 4.

theorem polygon_twelve_gon_not_psd_factorization_four :
    ∀ (S : Matrix (Fin 12) (Fin 12) ℝ),
      is_convex_polygon_slack_matrix 12 S →
      ¬ matrix_has_psd_factorization S 4
opnorm_bound_imp_p_star_kappaIn LeanLinear Programming & Duality

Let M be an n-by-n real matrix and κ ≥ 0. If for every positive diagonal matrix D in pos_diag_matrices n, 1 + D * M * D is nonsingular and its operator norm ‖(1 + D * M * D)⁻¹‖ is at most Real.sqrt (1 + κ^2 / (1 / 4 + κ)), then M belongs to P*(κ).

lemma opnorm_bound_imp_p_star_kappa (n : ℕ) (M : Matrix (Fin n) (Fin n) ℝ) (κ : ℝ) (hκ : 0 ≤ κ)
    (h : ∀ D ∈ pos_diag_matrices n, IsUnit (1 + D * M * D) ∧ Matrix.opNorm (1 + D * M * D)⁻¹ ≤ Real.sqrt (1 + κ ^ 2 / (1 / 4 + κ))) :
    is_p_star_kappa n M κ
p_star_iff_opnorm_characterizationIn LeanLinear Programming & Duality

Let n be a natural number and M an n-by-n real matrix. Then is_p_star n M holds if and only if for every matrix D in pos_diag_matrices n, 1 + D * M * D is invertible (IsUnit) and the set { Matrix.opNorm (1 + D * M * D)⁻¹ | (D : Matrix (Fin n) (Fin n) ℝ) (_ : D ∈ pos_diag_matrices n) } is bounded above (BddAbove). Moreover, if is_p_star n M holds, then the supremum sSup of that set equals Real.sqrt (1 + (handicap_number n M) ^ 2 / (1 / 4 + handicap_number n M)).

theorem p_star_iff_opnorm_characterization (n : ℕ) (M : Matrix (Fin n) (Fin n) ℝ) :
    (is_p_star n M ↔
      (∀ D ∈ pos_diag_matrices n, IsUnit (1 + D * M * D)) ∧
      BddAbove { Matrix.opNorm (1 + D * M * D)⁻¹ | (D : Matrix (Fin n) (Fin n) ℝ) (_ : D ∈ pos_diag_matrices n) }) ∧
    (is_p_star n M →
      sSup { Matrix.opNorm (1 + D * M * D)⁻¹ | (D : Matrix (Fin n) (Fin n) ℝ) (_ : D ∈ pos_diag_matrices n) } =
        Real.sqrt (1 + (handicap_number n M) ^ 2 / (1 / 4 + handicap_number n M)))
p_star_kappa_opnorm_boundIn LeanLinear Programming & Duality

For every natural number n, real n-by-n matrix M, and real number κ such that is_p_star_kappa n M κ holds, and for every matrix D in pos_diag_matrices n, 1 + D * M * D is invertible (IsUnit) and Matrix.opNorm (1 + D * M * D)⁻¹ ≤ Real.sqrt (1 + κ ^ 2 / (1 / 4 + κ)).

lemma p_star_kappa_opnorm_bound (n : ℕ) (M : Matrix (Fin n) (Fin n) ℝ) (κ : ℝ)
    (hM : is_p_star_kappa n M κ) (D : Matrix (Fin n) (Fin n) ℝ) (hD : D ∈ pos_diag_matrices n) :
    IsUnit (1 + D * M * D) ∧
    Matrix.opNorm (1 + D * M * D)⁻¹ ≤ Real.sqrt (1 + κ ^ 2 / (1 / 4 + κ))
sufficient_matrix_rearrangement_iffIn LeanLinear Programming & Duality

Let κ ≥ 0 and P, N ≥ 0 be scalars. Then (1 + 4 * κ) * P - N ≥ 0 if and only if P - N ≥ - (2 * κ / (1 + 2 * κ)) * (P + N).

lemma sufficient_matrix_rearrangement_iff (κ P N : ℝ) (hκ : 0 ≤ κ) (hP : 0 ≤ P) (hN : 0 ≤ N) :
    0 ≤ (1 + 4 * κ) * P - N ↔ - (2 * κ / (1 + 2 * κ)) * (P + N) ≤ P - N
base_polytope_extreme_bases_finiteIn LeanSubmodular & Combinatorial Optimization

The set of greedy bases of any set function f on Finset (Fin n) is finite, being the image of the finite symmetric group Equiv.Perm (Fin n).

theorem base_polytope_extreme_bases_finite {n : ℕ} (f : Finset (Fin n) → ℝ) :
    (base_polytope_extreme_bases f).Finite
base_polytope_extreme_bases_subsetIn LeanSubmodular & Combinatorial Optimization

For any normalized submodular function f, every greedy base generated by Edmonds' algorithm lies in the submodular base polytope B(f).

theorem base_polytope_extreme_bases_subset {n : ℕ} {f : Finset (Fin n) → ℝ}
    (hf_zero : f ∅ = 0) (hf_sub : is_submodular f) :
    base_polytope_extreme_bases f ⊆ base_polytope_submodular f
base_polytope_lorenz_subset_thermally_reachableIn LeanSubmodular & Combinatorial Optimization

For any natural number n, population vector x in stdSimplex ℝ (Fin n), and strictly positive Gibbs vector γ in stdSimplex ℝ (Fin n), the base polytope submodular_base_polytope of the set function S ↦ relative_lorenz_curve x γ (∑ i ∈ S, γ i) is a subset of thermally_reachable_populations γ x.

theorem base_polytope_lorenz_subset_thermally_reachable {n : ℕ} {x γ : Fin n → ℝ}
    (hx : x ∈ stdSimplex ℝ (Fin n)) (hγ : γ ∈ stdSimplex ℝ (Fin n)) (hγ_pos : ∀ i, 0 < γ i) :
    submodular_base_polytope (fun S => relative_lorenz_curve x γ (∑ i ∈ S, γ i)) ⊆
      thermally_reachable_populations γ x
capacity_deficit_le_prefix_supIn LeanSubmodular & Combinatorial Optimization

For any natural number n > 0, population vectors x, y in stdSimplex ℝ (Fin n), strictly positive Gibbs vector γ in stdSimplex ℝ (Fin n), permutation π sorting y / γ antitonically, and subset S of Fin n, the capacity deficit population_capacity γ y S - population_capacity γ x S is at most the supremum over k : Fin n of the deficit at the prefix thermomajorization_prefix π (k.val + 1).

theorem capacity_deficit_le_prefix_sup {n : ℕ} (hn : 0 < n)
    {x y γ : Fin n → ℝ}
    (hx : x ∈ stdSimplex ℝ (Fin n)) (hy : y ∈ stdSimplex ℝ (Fin n))
    (hγ : γ ∈ stdSimplex ℝ (Fin n)) (hγ_pos : ∀ i, 0 < γ i)
    (π : Equiv.Perm (Fin n))
    (hπ : Antitone (fun i : Fin n => y (π i) / γ (π i)))
    (S : Finset (Fin n)) :
    population_capacity γ y S - population_capacity γ x S ≤
      ⨆ k : Fin n, (population_capacity γ y (thermomajorization_prefix π (k.val + 1)) -
        population_capacity γ x (thermomajorization_prefix π (k.val + 1)))
cube_dist_le_oneIn LeanSubmodular & Combinatorial Optimization

For any two functions f and g from the n-dimensional Boolean cube into {0, ..., k}, their normalized Hamming distance cube_dist f g is at most 1.

theorem cube_dist_le_one {n k : ℕ} (f g : CubeFunc n k) :
    cube_dist f g ≤ 1
cube_dist_triangleIn LeanSubmodular & Combinatorial Optimization

For any functions f, g, h from the Boolean hypercube into {0, ..., k}, the normalized Hamming distance satisfies cube_dist f h ≤ cube_dist f g + cube_dist g h.

theorem cube_dist_triangle {n k : ℕ} (f g h : CubeFunc n k) :
    cube_dist f h ≤ cube_dist f g + cube_dist g h
greedy_base_sumIn LeanSubmodular & Combinatorial Optimization

For any set function f on Finset (Fin n), the coordinates of every greedy base p sum to f(Finset.univ) - f(∅), by telescoping along the chain of prefixes.

theorem greedy_base_sum {n : ℕ} (f : Finset (Fin n) → ℝ) (p : Fin n → ℝ)
    (hp : p ∈ base_polytope_extreme_bases f) :
    (∑ i : Fin n, p i) = f Finset.univ - f ∅
is_far_from_submodular_monoIn LeanSubmodular & Combinatorial Optimization

If f is ε₂-far from submodular and ε₁ ≤ ε₂, then f is ε₁-far from submodular.

theorem is_far_from_submodular_mono {n k : ℕ} {ε₁ ε₂ : ℝ}
    (h : ε₁ ≤ ε₂) (f : CubeFunc n k) (hf : is_far_from_submodular ε₂ f) :
    is_far_from_submodular ε₁ f
is_submodular_cube_not_farIn LeanSubmodular & Combinatorial Optimization

If f : {0, 1}^n → {0, ..., k} is submodular and ε > 0, then f is not ε-far from submodular.

theorem is_submodular_cube_not_far {n k : ℕ} (f : CubeFunc n k)
    (hf : is_submodular_cube f) (ε : ℝ) (hε : 0 < ε) :
    ¬ is_far_from_submodular ε f
is_wolfe_corral_uniqueIn LeanSubmodular & Combinatorial Optimization

A Wolfe corral S uniquely determines its affine minimizer w: if w1 and w2 both satisfy the corral optimality conditions for S, then w1 = w2.

theorem is_wolfe_corral_unique {n : ℕ} {S : Finset (Fin n → ℝ)} {w1 w2 : Fin n → ℝ}
    (h1 : is_wolfe_corral S w1) (h2 : is_wolfe_corral S w2) :
    w1 = w2
matroid_symmetry_gap_integral_lt_eight_seventeenthsIn LeanSubmodular & Combinatorial Optimization

Sharper form of the open question of arXiv:2610.07387: there is a strongly symmetric instance — non-negative submodular f on a finite ground set, matroid M, group G of permutations with f invariant and independence determined by the symmetrized indicator vector — such that the symmetrized fractional optimum sup_{x∈P(M)} F(x̄) is strictly less than 8/17 times the best *integral* value max{f(S) : S independent in M}. This is stronger than the parent statement, whose denominator is the best fractional value sup_{x∈P(M)} F(x).

theorem matroid_symmetry_gap_integral_lt_eight_seventeenths :
    ∃ (m : ℕ) (M : Matroid (Fin m)) (f : Finset (Fin m) → ℝ) (G : Subgroup (Equiv.Perm (Fin m))),
      (∀ S, 0 ≤ f S) ∧ is_submodular f ∧ is_strongly_symmetric_instance M f G ∧
      sSup ((fun x => multilinear_extension f (perm_group_symmetrize G x)) '' matroid_polytope M) <
        8 / 17 * sSup (f '' {S : Finset (Fin m) | M.Indep ↑S})
op737_block_capacity_eq_micro_capacityIn LeanSubmodular & Combinatorial Optimization

For any subset S of the blocks, block_population_capacity proj γ x S equals the micro-capacity of the union of the fibers over S.

theorem op737_block_capacity_eq_micro_capacity {n m : ℕ} (proj : Fin n → Fin m) (γ x : Fin n → ℝ) (hx : x ∈ stdSimplex ℝ (Fin n)) (S : Finset (Fin m)) : block_population_capacity proj γ x S = op737_micro_capacity γ x (op737_fiber_union proj S)
op737_block_reachable_eq_base_polytopeIn LeanSubmodular & Combinatorial Optimization

Under the OP-737 hypotheses, the thermally reachable block populations equal the base polytope of the block population capacity.

theorem op737_block_reachable_eq_base_polytope {n m : ℕ} (hnm : m < n) (proj : Fin n → Fin m) (hsurj : Function.Surjective proj) (γ : Fin n → ℝ) (hγ_simplex : γ ∈ stdSimplex ℝ (Fin n)) (hγ_pos : ∀ i, 0 < γ i) (hγ_block : ∀ i j, proj i = proj j → γ i = γ j) (x : Fin n → ℝ) (hx : x ∈ stdSimplex ℝ (Fin n)) : thermally_reachable_block_populations proj γ x = submodular_base_polytope (block_population_capacity proj γ x)
op737_concave_marginal_antitoneIn LeanSubmodular & Combinatorial Optimization

For a function L concave on [0,1] and reals 0 ≤ a ≤ b, c ≥ 0 with b + c ≤ 1, the marginal increment L(b+c) - L(b) is at most L(a+c) - L(a).

theorem op737_concave_marginal_antitone {L : ℝ → ℝ} (hL : ConcaveOn ℝ (Set.Icc 0 1) L) {a b c : ℝ} (ha : 0 ≤ a) (hab : a ≤ b) (hc : 0 ≤ c) (hbc : b + c ≤ 1) : L (b + c) - L b ≤ L (a + c) - L a
op737_fiber_capacity_submodularIn LeanSubmodular & Combinatorial Optimization

If f is submodular and monotone, then the induced block capacity S ↦ f(union of fibers over S) is submodular.

theorem op737_fiber_capacity_submodular {n m : ℕ} {proj : Fin n → Fin m} {f : Finset (Fin n) → ℝ} (hmono : Monotone f) (hsub : is_submodular f) : is_submodular (op737_fiber_capacity proj f)
op737_fiber_sum_image_base_polytopeIn LeanSubmodular & Combinatorial Optimization

The image of the base polytope of a monotone submodular f with f(empty)=0, f(univ)=1 under the fiber-sum projection is the base polytope of the induced block capacity.

theorem op737_fiber_sum_image_base_polytope {n m : ℕ} (proj : Fin n → Fin m) (hsurj : Function.Surjective proj) {f : Finset (Fin n) → ℝ} (hsub : is_submodular f) (hmono : Monotone f) (h0 : f ∅ = 0) (h1 : f Finset.univ = 1) : fiber_sum_vec proj '' submodular_base_polytope f = submodular_base_polytope (op737_fiber_capacity proj f)
op737_gibbs_stochastic_image_mem_simplexIn LeanSubmodular & Combinatorial Optimization

If T is Gibbs-stochastic with respect to γ and x lies in the standard simplex, then the image vector i ↦ ∑_j T i j * x j again lies in the standard simplex.

theorem op737_gibbs_stochastic_image_mem_simplex {n : ℕ} {γ x : Fin n → ℝ} {T : Fin n → Fin n → ℝ} (hT : is_gibbs_stochastic γ T) (hx : x ∈ stdSimplex ℝ (Fin n)) : (fun i => ∑ j, T i j * x j) ∈ stdSimplex ℝ (Fin n)
op737_mem_micro_reach_selfIn LeanSubmodular & Combinatorial Optimization

The x-identity map (Kronecker delta) is Gibbs-stochastic, hence x is reachable from itself; in particular the reachable set is nonempty.

theorem op737_mem_micro_reach_self {n : ℕ} (γ x : Fin n → ℝ) : x ∈ op737_micro_reach γ x
op737_micro_capacity_emptyIn LeanSubmodular & Combinatorial Optimization

The micro-capacity of the empty set of microstates vanishes.

theorem op737_micro_capacity_empty {n : ℕ} (γ x : Fin n → ℝ) : op737_micro_capacity γ x ∅ = 0
op737_micro_capacity_monotoneIn LeanSubmodular & Combinatorial Optimization

For A inside B, the micro-capacity of A is at most the micro-capacity of B.

theorem op737_micro_capacity_monotone {n : ℕ} {γ x : Fin n → ℝ} (hx : x ∈ stdSimplex ℝ (Fin n)) : Monotone (op737_micro_capacity γ x)
op737_micro_capacity_submodularIn LeanSubmodular & Combinatorial Optimization

The micro-capacity f(A) = sup over reachable z of the population of A is submodular, for a strictly positive Gibbs vector in the simplex and x in the simplex.

theorem op737_micro_capacity_submodular {n : ℕ} {γ x : Fin n → ℝ} (hγ : γ ∈ stdSimplex ℝ (Fin n)) (hγ_pos : ∀ i, 0 < γ i) (hx : x ∈ stdSimplex ℝ (Fin n)) : is_submodular (op737_micro_capacity γ x)
op737_micro_capacity_univIn LeanSubmodular & Combinatorial Optimization

The micro-capacity of the full set of microstates equals 1, because every reachable microstate is a probability vector.

theorem op737_micro_capacity_univ {n : ℕ} {γ x : Fin n → ℝ} (hx : x ∈ stdSimplex ℝ (Fin n)) : op737_micro_capacity γ x Finset.univ = 1
op737_micro_reach_mem_simplexIn LeanSubmodular & Combinatorial Optimization

If z is reachable from x by a Gibbs-stochastic map and x is in the standard simplex, then z is in the standard simplex.

theorem op737_micro_reach_mem_simplex {n : ℕ} {γ x z : Fin n → ℝ} (hx : x ∈ stdSimplex ℝ (Fin n)) (hz : z ∈ op737_micro_reach γ x) : z ∈ stdSimplex ℝ (Fin n)
op737_micro_reachable_eq_base_polytopeIn LeanSubmodular & Combinatorial Optimization

The reachable microstates are exactly the base polytope of the micro-capacity: z is reachable from x by a Gibbs-stochastic map iff every population bound ∑_{i∈A} z i ≤ f(A) holds and the total mass is 1.

theorem op737_micro_reachable_eq_base_polytope {n : ℕ} {γ x : Fin n → ℝ} (hγ : γ ∈ stdSimplex ℝ (Fin n)) (hγ_pos : ∀ i, 0 < γ i) (hx : x ∈ stdSimplex ℝ (Fin n)) : op737_micro_reach γ x = submodular_base_polytope (op737_micro_capacity γ x)
op737_reachable_block_eq_fiber_sum_imageIn LeanSubmodular & Combinatorial Optimization

The thermally reachable block populations equal the image of the reachable microstates under the fiber-sum map.

theorem op737_reachable_block_eq_fiber_sum_image {n m : ℕ} (proj : Fin n → Fin m) (γ x : Fin n → ℝ) (hx : x ∈ stdSimplex ℝ (Fin n)) : thermally_reachable_block_populations proj γ x = fiber_sum_vec proj '' op737_micro_reach γ x
op737_submodular_of_concave_compIn LeanSubmodular & Combinatorial Optimization

If L is concave on [0,1] and g ≥ 0 has total mass at most 1, then the set function S ↦ L(sum of g over S) is submodular.

theorem op737_submodular_of_concave_comp {n : ℕ} {L : ℝ → ℝ} {g : Fin n → ℝ} (hL : ConcaveOn ℝ (Set.Icc 0 1) L) (hg : ∀ k, 0 ≤ g k) (hg1 : ∑ k, g k ≤ 1) : is_submodular (fun S : Finset (Fin n) => L (∑ k ∈ S, g k))
op737_sum_fiber_sum_vecIn LeanSubmodular & Combinatorial Optimization

For any vector y and any set S of blocks, the sum over k in S of the k-th fiber sum of y equals the sum of y over all microstates i whose block proj i lies in S.

theorem op737_sum_fiber_sum_vec {n m : ℕ} (proj : Fin n → Fin m) (y : Fin n → ℝ) (S : Finset (Fin m)) : ∑ k ∈ S, fiber_sum_vec proj y k = ∑ i ∈ op737_fiber_union proj S, y i
op_737_base_polytope_subset_reachableIn LeanSubmodular & Combinatorial Optimization

For any natural numbers m < n, any surjective block-assignment map proj : Fin n → Fin m, any Gibbs vector γ in stdSimplex ℝ (Fin n) with strictly positive entries that is constant on the fibers of proj, and any initial vector x in stdSimplex ℝ (Fin n), the base polytope of the block population capacity is contained in the thermally reachable block populations.

theorem op_737_base_polytope_subset_reachable {n m : ℕ} (hnm : m < n) (proj : Fin n → Fin m) (hsurj : Function.Surjective proj) (γ : Fin n → ℝ) (hγ_simplex : γ ∈ stdSimplex ℝ (Fin n)) (hγ_pos : ∀ i, 0 < γ i) (hγ_block : ∀ i j, proj i = proj j → γ i = γ j) (x : Fin n → ℝ) (hx : x ∈ stdSimplex ℝ (Fin n)) : submodular_base_polytope (block_population_capacity proj γ x) ⊆ thermally_reachable_block_populations proj γ x
op_737_block_capacity_submodularIn LeanSubmodular & Combinatorial Optimization

For any natural numbers m < n, any surjective block-assignment map proj : Fin n → Fin m, any Gibbs vector γ in stdSimplex ℝ (Fin n) with strictly positive entries that is constant on the fibers of proj, and any initial vector x in stdSimplex ℝ (Fin n), the block population capacity block_population_capacity proj γ x is submodular.

theorem op_737_block_capacity_submodular {n m : ℕ} (hnm : m < n) (proj : Fin n → Fin m) (hsurj : Function.Surjective proj) (γ : Fin n → ℝ) (hγ_simplex : γ ∈ stdSimplex ℝ (Fin n)) (hγ_pos : ∀ i, 0 < γ i) (hγ_block : ∀ i j, proj i = proj j → γ i = γ j) (x : Fin n → ℝ) (hx : x ∈ stdSimplex ℝ (Fin n)) : is_submodular (block_population_capacity proj γ x)
op_853_polynomial_submodular_goal_value_bound_exists_goal_function_polyIn LeanSubmodular & Combinatorial Optimization

There are constants c, d such that every connected finite simple graph G admits a submodular goal function whose goal value Q is at most c·|E(G)|^d.

open scoped Classical in
theorem op_853_polynomial_submodular_goal_value_bound_exists_goal_function_poly :
    ∃ c d : ℕ, ∀ (V : Type) [Fintype V] (G : SimpleGraph V), G.Connected →
      ∃ (g : (G.edgeSet → Option Bool) → ℕ) (Q : ℕ),
        is_submodular_goal_function G g Q ∧ Q ≤ c * (Fintype.card G.edgeSet) ^ d
optimal_trace_distance_error_ge_capacity_deficitIn LeanSubmodular & Combinatorial Optimization

For any population vectors x, y in stdSimplex ℝ (Fin n), Gibbs vector γ, and subset S of Fin n, (∑ i ∈ S, y i) - population_capacity γ x S ≤ optimal_trace_distance_error γ x y.

theorem optimal_trace_distance_error_ge_capacity_deficit {n : ℕ}
    {x y γ : Fin n → ℝ} (hx : x ∈ stdSimplex ℝ (Fin n)) (hy : y ∈ stdSimplex ℝ (Fin n))
    (S : Finset (Fin n)) :
    (∑ i ∈ S, y i) - population_capacity γ x S ≤ optimal_trace_distance_error γ x y
optimal_trace_distance_error_le_prefix_supIn LeanSubmodular & Combinatorial Optimization

For any natural number n > 0, population vectors x, y in stdSimplex ℝ (Fin n), strictly positive Gibbs vector γ in stdSimplex ℝ (Fin n), and permutation π sorting y / γ antitonically, the optimal trace distance error optimal_trace_distance_error γ x y is at most the supremum over k : Fin n of the capacity difference on thermomajorization_prefix π (k.val + 1).

theorem optimal_trace_distance_error_le_prefix_sup {n : ℕ} (hn : 0 < n)
    {x y γ : Fin n → ℝ}
    (hx : x ∈ stdSimplex ℝ (Fin n)) (hy : y ∈ stdSimplex ℝ (Fin n))
    (hγ : γ ∈ stdSimplex ℝ (Fin n)) (hγ_pos : ∀ i, 0 < γ i)
    (π : Equiv.Perm (Fin n))
    (hπ : Antitone (fun i : Fin n => y (π i) / γ (π i))) :
    optimal_trace_distance_error γ x y ≤
      ⨆ k : Fin n, (population_capacity γ y (thermomajorization_prefix π (k.val + 1)) -
        population_capacity γ x (thermomajorization_prefix π (k.val + 1)))
population_capacity_eq_relative_lorenzIn LeanSubmodular & Combinatorial Optimization

For any natural number n, population vector x in stdSimplex ℝ (Fin n), strictly positive Gibbs vector γ in stdSimplex ℝ (Fin n), and subset S of Fin n, population_capacity γ x S equals relative_lorenz_curve x γ (∑ i ∈ S, γ i).

theorem population_capacity_eq_relative_lorenz {n : ℕ} {x γ : Fin n → ℝ}
    (hx : x ∈ stdSimplex ℝ (Fin n)) (hγ : γ ∈ stdSimplex ℝ (Fin n)) (hγ_pos : ∀ i, 0 < γ i)
    (S : Finset (Fin n)) :
    population_capacity γ x S = relative_lorenz_curve x γ (∑ i ∈ S, γ i)
population_capacity_relative_lorenz_polymatroid_base_polytopeIn LeanSubmodular & Combinatorial Optimization

Let n be a natural number, x a population vector in stdSimplex ℝ (Fin n), and γ a strictly positive Gibbs population vector in stdSimplex ℝ (Fin n). Then population_capacity γ x S = relative_lorenz_curve x γ (∑ i ∈ S, γ i) for all subsets S of Fin n, is_polymatroid_rank (population_capacity γ x) with population_capacity γ x Finset.univ = 1, and thermally_reachable_populations γ x = submodular_base_polytope (population_capacity γ x).

theorem population_capacity_relative_lorenz_polymatroid_base_polytope {n : ℕ} {x γ : Fin n → ℝ}
    (hx : x ∈ stdSimplex ℝ (Fin n)) (hγ : γ ∈ stdSimplex ℝ (Fin n)) (hγ_pos : ∀ i, 0 < γ i) :
    (∀ S : Finset (Fin n), population_capacity γ x S = relative_lorenz_curve x γ (∑ i ∈ S, γ i)) ∧
    (is_polymatroid_rank (population_capacity γ x) ∧ population_capacity γ x Finset.univ = 1) ∧
    thermally_reachable_populations γ x = submodular_base_polytope (population_capacity γ x)
randomized_submod_tester_accept_prob_boundsIn LeanSubmodular & Combinatorial Optimization

For any randomized tester A and function f on the Boolean cube, randomized_submod_tester_accept_prob A f lies in the interval [0, 1].

theorem randomized_submod_tester_accept_prob_bounds {n k q : ℕ}
    (A : RandomizedSubmodTester n k q) (f : CubeFunc n k) :
    0 ≤ randomized_submod_tester_accept_prob A f ∧ randomized_submod_tester_accept_prob A f ≤ 1
submodular_goal_function_min_truncationIn LeanSubmodular & Combinatorial Optimization

If φ is a monotone submodular potential on partial assignments with φ(empty assignment) = 0 and φ(β) ≥ Q exactly on the MST identification certificates, then its truncation min(φ, Q) is a submodular goal function with goal value Q.

open scoped Classical in
theorem submodular_goal_function_min_truncation {V : Type*} [Fintype V]
    (G : SimpleGraph V) (φ : (G.edgeSet → Option Bool) → ℕ) (Q : ℕ)
    (h0 : φ (fun _ => none) = 0)
    (hmono : ∀ β γ, partial_assignment_le β γ → φ β ≤ φ γ)
    (hsub : ∀ β γ e s, partial_assignment_le β γ → γ e = none →
      φ (Function.update γ e (some s)) + φ β ≤ φ (Function.update β e (some s)) + φ γ)
    (hcert : ∀ β, Q ≤ φ β ↔ is_mst_certificate G β) :
    is_submodular_goal_function G (fun β => min (φ β) Q) Q
submodular_goal_value_le_of_goal_functionIn LeanSubmodular & Combinatorial Optimization

If g is a submodular goal function for a finite graph G with goal value Q, then the submodular goal value of G is at most Q.

open scoped Classical in
theorem submodular_goal_value_le_of_goal_function {V : Type*} [Fintype V] (G : SimpleGraph V)
    (g : (G.edgeSet → Option Bool) → ℕ) (Q : ℕ) (h : is_submodular_goal_function G g Q) :
    stochastic_mst_submodular_goal_value G ≤ Q
thermally_reachable_subset_base_polytope_lorenzIn LeanSubmodular & Combinatorial Optimization

For any natural number n, population vector x in stdSimplex ℝ (Fin n), and strictly positive Gibbs vector γ in stdSimplex ℝ (Fin n), thermally_reachable_populations γ x is a subset of the base polytope submodular_base_polytope of the set function S ↦ relative_lorenz_curve x γ (∑ i ∈ S, γ i).

theorem thermally_reachable_subset_base_polytope_lorenz {n : ℕ} {x γ : Fin n → ℝ}
    (hx : x ∈ stdSimplex ℝ (Fin n)) (hγ : γ ∈ stdSimplex ℝ (Fin n)) (hγ_pos : ∀ i, 0 < γ i) :
    thermally_reachable_populations γ x ⊆
      submodular_base_polytope (fun S => relative_lorenz_curve x γ (∑ i ∈ S, γ i))
thermomajorization_capacity_rankIn LeanSubmodular & Combinatorial Optimization

For any natural number n, population vector x in stdSimplex ℝ (Fin n), and strictly positive Gibbs vector γ in stdSimplex ℝ (Fin n), the set function S ↦ relative_lorenz_curve x γ (∑ i ∈ S, γ i) on subsets of Fin n is a polymatroid rank function (is_polymatroid_rank) satisfying relative_lorenz_curve x γ (∑ i : Fin n, γ i) = 1.

theorem thermomajorization_capacity_rank {n : ℕ} {x γ : Fin n → ℝ}
    (hx : x ∈ stdSimplex ℝ (Fin n)) (hγ : γ ∈ stdSimplex ℝ (Fin n)) (hγ_pos : ∀ i, 0 < γ i) :
    is_polymatroid_rank (fun S : Finset (Fin n) => relative_lorenz_curve x γ (∑ i ∈ S, γ i)) ∧
      relative_lorenz_curve x γ (∑ i : Fin n, γ i) = 1
trace_distance_error_characterizationIn LeanSubmodular & Combinatorial Optimization

For any natural number n with 0 < n, population vectors x, y in stdSimplex ℝ (Fin n), Gibbs vector γ in stdSimplex ℝ (Fin n) with strictly positive entries (∀ i, 0 < γ i), and permutation π of Fin n satisfying Antitone (fun i : Fin n => y (π i) / γ (π i)), the optimal trace-distance approximation error optimal_trace_distance_error γ x y satisfies: (1) it equals ⨆ S : Finset (Fin n), (∑ i ∈ S, y i) - population_capacity γ x S; (2) it equals ⨆ S : Finset (Fin n), population_capacity γ y S - population_capacity γ x S; and (3) it equals ⨆ k : Fin n, population_capacity γ y (thermomajorization_prefix π (k.val + 1)) - population_capacity γ x (thermomajorization_prefix π (k.val + 1)).

theorem trace_distance_error_characterization {n : ℕ} (hn : 0 < n)
    {x y γ : Fin n → ℝ}
    (hx : x ∈ stdSimplex ℝ (Fin n)) (hy : y ∈ stdSimplex ℝ (Fin n))
    (hγ : γ ∈ stdSimplex ℝ (Fin n)) (hγ_pos : ∀ i, 0 < γ i)
    (π : Equiv.Perm (Fin n))
    (hπ : Antitone (fun i : Fin n => y (π i) / γ (π i))) :
    optimal_trace_distance_error γ x y =
      (⨆ S : Finset (Fin n), (∑ i ∈ S, y i) - population_capacity γ x S) ∧
    optimal_trace_distance_error γ x y =
      (⨆ S : Finset (Fin n), population_capacity γ y S - population_capacity γ x S) ∧
    optimal_trace_distance_error γ x y =
      (⨆ k : Fin n, (population_capacity γ y (thermomajorization_prefix π (k.val + 1)) -
        population_capacity γ x (thermomajorization_prefix π (k.val + 1))))
wolfe_corral_sum_eqIn LeanSubmodular & Combinatorial Optimization

The affine minimizer w of a Wolfe corral S preserves any constant coordinate sum shared by all atoms in S.

theorem wolfe_corral_sum_eq {n : ℕ} (S : Finset (Fin n → ℝ)) (w : Fin n → ℝ) (c : ℝ)
    (hcorral : is_wolfe_corral S w) (hall : ∀ p ∈ S, ∑ i : Fin n, p i = c) :
    (∑ i : Fin n, w i) = c
wolfe_linopt_run_w_ne_of_ltIn LeanSubmodular & Combinatorial Optimization

In any Wolfe linopt run, the affine minimizers w at distinct steps i < j are distinct, due to strict Euclidean norm decrease across major cycles.

theorem wolfe_linopt_run_w_ne_of_lt {n : ℕ} {atoms : Set (Fin n → ℝ)} {k : ℕ}
    {S : Fin (k + 1) → Finset (Fin n → ℝ)} {w : Fin (k + 1) → (Fin n → ℝ)}
    (hrun : wolfe_linopt_run atoms k S w) {i j : Fin (k + 1)} (hij : i < j) :
    w i ≠ w j
yang_mills_b_list_agreesIn LeanClassical Field Theory & Electromagnetism

For all m and a, the length-(a+1) coefficient list b_list m a generated inside the definition of yang_mills_residual_polynomial is the same as the one generated inside yang_mills_resonance_polynomial.

theorem yang_mills_b_list_agrees (m a : ℕ) : yang_mills_residual_polynomial.b_list m a = yang_mills_resonance_polynomial.b_list m a
yang_mills_cube_sum_agreesIn LeanClassical Field Theory & Electromagnetism

The auxiliary cube-sum function used inside the definition of yang_mills_residual_polynomial is exactly the same function as the one used inside yang_mills_resonance_polynomial.

theorem yang_mills_cube_sum_agrees : yang_mills_residual_polynomial.cube_sum = yang_mills_resonance_polynomial.cube_sum
yang_mills_quadratic_monicIn LeanClassical Field Theory & Electromagnetism

For any rationals b and c, the polynomial X^2 + C b * X + C c over ℚ is monic.

theorem yang_mills_quadratic_monic (b c : ℚ) : (Polynomial.X ^ 2 + (Polynomial.C b) * Polynomial.X + Polynomial.C c : Polynomial ℚ).Monic
yang_mills_reduction_coreIn LeanClassical Field Theory & Electromagnetism

Let Q, P be rational polynomials with Q monic, Q dividing P, and Q coprime to P' (so no root of Q is a multiple root of P). Then for any real root z of Q, the quotient P /ₘ Q does not vanish at z.

theorem yang_mills_reduction_core (Q P : Polynomial ℚ) (hmonic : Q.Monic) (hfac : Q ∣ P) (hd : IsCoprime Q P.derivative) (z : ℝ) (hz : Q.aeval z = 0) : (P /ₘ Q).aeval z ≠ 0
yang_mills_residual_eq_divByMonicIn LeanClassical Field Theory & Electromagnetism

Yes.

theorem yang_mills_residual_eq_divByMonic (m : ℕ) :
    let d : ℚ := 2 * m + 5
    let b_coeff : ℚ := -2 * (d^3 - 16 * d^2 + 89 * d - 146) / ((d - 2) * (d - 1)^2)
    let c_coeff : ℚ := ((d - 10) * (d - 5) / ((d - 2) * (d - 1)))^2
    let Q : Polynomial ℚ := Polynomial.X ^ 2 + (Polynomial.C b_coeff) * Polynomial.X + Polynomial.C c_coeff
    yang_mills_residual_polynomial m = yang_mills_resonance_polynomial m /ₘ Q
yang_mills_resonance_extra_roots_simpleIn LeanClassical Field Theory & Electromagnetism

For every m ≥ 12, the two explicit profile roots (the roots of Q_m) are simple roots of the resonance polynomial P_m: Q_m is coprime to the derivative P_m'.

theorem yang_mills_resonance_extra_roots_simple (m : ℕ) (hm : 12 ≤ m) :
    let d : ℚ := 2 * m + 5
    let b_coeff : ℚ := -2 * (d^3 - 16 * d^2 + 89 * d - 146) / ((d - 2) * (d - 1)^2)
    let c_coeff : ℚ := ((d - 10) * (d - 5) / ((d - 2) * (d - 1)))^2
    let Q : Polynomial ℚ := Polynomial.X ^ 2 + (Polynomial.C b_coeff) * Polynomial.X + Polynomial.C c_coeff
    IsCoprime Q (yang_mills_resonance_polynomial m).derivative
yang_mills_resonance_quadratic_dvdIn LeanClassical Field Theory & Electromagnetism

For every m ≥ 2, with d = 2m+5, the monic quadratic Q_m = X^2 + b_coeff * X + c_coeff whose roots are the two explicit self-similar profile roots divides the rational resonance polynomial P_m = yang_mills_resonance_polynomial m.

theorem yang_mills_resonance_quadratic_dvd (m : ℕ) (hm : 2 ≤ m) :
    let d : ℚ := 2 * m + 5
    let b_coeff : ℚ := -2 * (d^3 - 16 * d^2 + 89 * d - 146) / ((d - 2) * (d - 1)^2)
    let c_coeff : ℚ := ((d - 10) * (d - 5) / ((d - 2) * (d - 1)))^2
    let Q : Polynomial ℚ := Polynomial.X ^ 2 + (Polynomial.C b_coeff) * Polynomial.X + Polynomial.C c_coeff
    Q ∣ yang_mills_resonance_polynomial m
addChar_pi_zmod_two_reconstructionIn LeanQuantum Mechanics

For a finite type ι, an additive character χ of the group (ι → ZMod 2) with values in the multiplicative monoid ℝ satisfies χ x = ∏ i, χ (Pi.single i (x i)) for every x. That is, χ is determined by its values on the single-coordinate vectors.

theorem addChar_pi_zmod_two_reconstruction {ι : Type*} [Fintype ι] [DecidableEq ι]
    (χ : AddChar (ι → ZMod 2) ℝ) (x : ι → ZMod 2) :
    χ x = ∏ i, χ (Pi.single i (x i))
addChar_pi_zmod_two_surjIn LeanQuantum Mechanics

For a finite type ι and a family of signs c : ι → ℝ with c i ∈ {1, -1}, there is an additive character χ of (ι → ZMod 2) into ℝ with χ (Pi.single i 1) = c i for every i.

theorem addChar_pi_zmod_two_surj {ι : Type*} [Fintype ι] [DecidableEq ι]
    (c : ι → ℝ) (hc : ∀ i, c i = 1 ∨ c i = -1) :
    ∃ χ : AddChar (ι → ZMod 2) ℝ, ∀ i, χ (Pi.single i 1) = c i
balanced_multipartite_max_tripartite_info_ge_two_mul_halfIn LeanQuantum Mechanics

For natural numbers k ≥ 2 and s ≥ 4, the maximum tripartite information balanced_multipartite_max_tripartite_info k s is at least 2 * (k / 2), witnessed by the colouring that assigns to the j-th vertex of every part the colour j mod 4.

theorem balanced_multipartite_max_tripartite_info_ge_two_mul_half (k s : ℕ) (hk : 2 ≤ k) (hs : 4 ≤ s) :
    2 * ((k / 2 : ℕ) : ℤ) ≤ balanced_multipartite_max_tripartite_info k s
balanced_multipartite_max_tripartite_info_le_two_mul_halfIn LeanQuantum Mechanics

For natural numbers k and s > 0, the maximum tripartite information balanced_multipartite_max_tripartite_info k s of the complete multipartite graph with k parts each of size s is at most 2 * (k / 2).

theorem balanced_multipartite_max_tripartite_info_le_two_mul_half (k s : ℕ) (hs : 0 < s) :
    balanced_multipartite_max_tripartite_info k s ≤ 2 * ((k / 2 : ℕ) : ℤ)
balanced_multipartite_part_size_two_max_tripartite_info_ge_oneIn LeanQuantum Mechanics

For any k ≥ 3, the complete multipartite graph with k parts of size 2 has maximum tripartite information at least 1.

theorem balanced_multipartite_part_size_two_max_tripartite_info_ge_one (k : ℕ) (hk : 3 ≤ k) :
  1 ≤ balanced_multipartite_max_tripartite_info k 2
balanced_multipartite_part_size_two_max_tripartite_info_le_oneIn LeanQuantum Mechanics

For any k ≥ 3, the complete multipartite graph with k parts of size 2 has maximum tripartite information at most 1.

theorem balanced_multipartite_part_size_two_max_tripartite_info_le_one (k : ℕ) (hk : 3 ≤ k) :
  balanced_multipartite_max_tripartite_info k 2 ≤ 1
balanced_multipartite_three_three_max_tripartite_info_ge_twoIn LeanQuantum Mechanics

The complete tripartite graph K_{3,3,3} has maximum tripartite information at least 2, witnessed by a four-coloring with parts of sizes {2,1}, {1,2}, {1,1,1}.

theorem balanced_multipartite_three_three_max_tripartite_info_ge_two :
    2 ≤ balanced_multipartite_max_tripartite_info 3 3
balanced_multipartite_three_three_max_tripartite_info_le_twoIn LeanQuantum Mechanics

The complete tripartite graph K_{3,3,3} has maximum tripartite information at most 2, following from the general upper bound 2 * floor(k/2) with k = 3 and s = 3.

theorem balanced_multipartite_three_three_max_tripartite_info_le_two :
    balanced_multipartite_max_tripartite_info 3 3 ≤ 2
balanced_multipartite_two_two_max_tripartite_info_eq_zeroIn LeanQuantum Mechanics

The maximum tripartite information of the balanced complete multipartite graph K_{2,2} (isomorphic to the 4-cycle C_4) is 0.

theorem balanced_multipartite_two_two_max_tripartite_info_eq_zero :
  balanced_multipartite_max_tripartite_info 2 2 = 0
cauchy_of_block_subadditiveIn LeanQuantum Mechanics

For any real sequence M on ℕ bounded by C n^2 satisfying the 2D block subadditivity bounds |M(mk) - m^2 M(k)| ≤ C m^2 k and remainder bounds |M(n) - M(n - n % k)| ≤ C n k, the sequence M(n)/n^2 is Cauchy.

theorem cauchy_of_block_subadditive
    (M : ℕ → ℝ) (C : ℝ) (hC : 0 ≤ C)
    (h_block : ∀ (m k : ℕ), 0 < k → |M (m * k) - (m : ℝ) ^ 2 * M k| ≤ C * (m : ℝ) ^ 2 * (k : ℝ))
    (h_rem : ∀ (n k : ℕ), 0 < k → |M n - M (n - n % k)| ≤ C * (n : ℝ) * (k : ℝ))
    (h_bound : ∀ (n : ℕ), |M n| ≤ C * (n : ℝ) ^ 2) :
    CauchySeq (fun n : ℕ => M n / (n : ℝ) ^ 2)
ccz_edge_distribution_decidableRel_irrelIn LeanQuantum Mechanics

The CCZ edge-distribution atom of an edge set does not depend on which DecidableRel G.Adj instance is used, since Decidable is a subsingleton.

theorem ccz_edge_distribution_decidableRel_irrel {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (i j : DecidableRel G.Adj) (F : Finset (Sym2 V)) :
    @ccz_edge_distribution V _ _ G i F = @ccz_edge_distribution V _ _ G j F
ccz_edge_distribution_eq_zero_of_not_subsetIn LeanQuantum Mechanics

An edge set that is not a subset of the edge set of G has probability zero as an induced edge set.

theorem ccz_edge_distribution_eq_zero_of_not_subset {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {F : Finset (Sym2 V)}
    (hF : ¬ F ⊆ G.edgeFinset) : ccz_edge_distribution G F = 0
ccz_edge_distribution_nonnegIn LeanQuantum Mechanics

Every atom of the CCZ induced-edge distribution is nonnegative: for a graph G on a finite type V and any edge set F, ccz_edge_distribution G F ≥ 0.

theorem ccz_edge_distribution_nonneg {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (F : Finset (Sym2 V)) :
    0 ≤ ccz_edge_distribution G F
ccz_path_graph_four_rpow_half_sumIn LeanQuantum Mechanics

For the path graph on 4 vertices, the sum over all edge sets of (induced-edge probability)^(1/2) equals 1 + √2.

theorem ccz_path_graph_four_rpow_half_sum :
    letI : DecidableRel (SimpleGraph.pathGraph 4).Adj := inferInstance
    (∑ F : Finset (Sym2 (Fin 4)), ccz_edge_distribution (SimpleGraph.pathGraph 4) F ^ ((1 : ℝ) / 2))
      = 1 + Real.sqrt 2
ccz_path_graph_four_rpow_half_supportIn LeanQuantum Mechanics

For the path on 4 vertices, the order-1/2 power sum over all edge subsets equals the sum restricted to the seven edge sets that arise as induced edge sets.

theorem ccz_path_graph_four_rpow_half_support :
    letI : DecidableRel (SimpleGraph.pathGraph 4).Adj := inferInstance
    (∑ F : Finset (Sym2 (Fin 4)), ccz_edge_distribution (SimpleGraph.pathGraph 4) F ^ ((1 : ℝ) / 2))
      = ∑ F ∈ ({∅, {s(0,1)}, {s(1,2)}, {s(2,3)}, {s(0,1),s(1,2)}, {s(1,2),s(2,3)}, {s(0,1),s(1,2),s(2,3)}} : Finset (Finset (Sym2 (Fin 4)))),
          ccz_edge_distribution (SimpleGraph.pathGraph 4) F ^ ((1 : ℝ) / 2)
ccz_path_graph_four_rpow_half_termIn LeanQuantum Mechanics

For the path on 4 vertices and any edge set F whose induced-edge fibre has size k, the term (probability)^(1/2) equals √k / 4.

theorem ccz_path_graph_four_rpow_half_term (F : Finset (Sym2 (Fin 4))) (k : ℕ)
    (hk : (Finset.univ.filter (fun S : Finset (Fin 4) =>
      ccz_induced_edges (SimpleGraph.pathGraph 4) S = F)).card = k) :
    letI : DecidableRel (SimpleGraph.pathGraph 4).Adj := inferInstance
    ccz_edge_distribution (SimpleGraph.pathGraph 4) F ^ ((1 : ℝ) / 2) = Real.sqrt k / 4
ccz_path_rpow_sum_large_deviationIn LeanQuantum Mechanics

For every real α with 0 < α < 1 there is ε > 0 and N such that for all n ≥ N the order-α power sum of the path graph's induced-edge distribution is at most 2^{(1-α-ε)n}. Equivalently the random induced-edge set of a uniformly random vertex subset of the path has Rényi rate strictly below log 2.

theorem ccz_path_rpow_sum_large_deviation (α : ℝ) (hα0 : 0 < α) (hα1 : α < 1) :
    ∃ ε : ℝ, 0 < ε ∧ ∀ᶠ (n : ℕ) in Filter.atTop,
      ∑ F : Finset (Sym2 (Fin n)),
          (ccz_edge_distribution (SimpleGraph.pathGraph n) F) ^ α
        ≤ (2 : ℝ) ^ ((1 - α - ε) * (n : ℝ))
ccz_path_rpow_sum_trivial_boundIn LeanQuantum Mechanics

For n ≥ 1 and 0 < α ≤ 1, the order-α power sum of the path graph's induced-edge distribution is at most 2^{(n-1)(1-α)}: the distribution is supported on the at most 2^{n-1} subsets of the n-1 edges of the path, and each atom is at most 1.

theorem ccz_path_rpow_sum_trivial_bound (n : ℕ) (hn : 1 ≤ n) {α : ℝ}
    (hα0 : 0 < α) (hα1 : α ≤ 1) :
    ∑ F : Finset (Sym2 (Fin n)),
        (ccz_edge_distribution (SimpleGraph.pathGraph n) F) ^ α
      ≤ (2 : ℝ) ^ (((n : ℝ) - 1) * (1 - α))
ccz_renyi_entropy_congr_isoIn LeanQuantum Mechanics

Graph isomorphism preserves CCZ Rényi entropy: isomorphic graphs have identical induced-edge distributions up to vertex permutation, and hence equal Rényi entropy.

theorem ccz_renyi_entropy_congr_iso {V W : Type*} [Fintype V] [DecidableEq V] [Fintype W] [DecidableEq W]
    (α : ℝ) (G : SimpleGraph V) (H : SimpleGraph W) [DecidableRel G.Adj] [DecidableRel H.Adj]
    (e : G ≃g H) :
    ccz_renyi_entropy α G = ccz_renyi_entropy α H
ccz_renyi_entropy_half_eq_two_log_rpow_sumIn LeanQuantum Mechanics

At order α = 1/2 the CCZ Rényi entropy equals twice the logarithm of the order-1/2 power sum of the induced-edge distribution, since log(∑ p^(1/2))/(1 - 1/2) = 2 log(∑ p^(1/2)).

theorem ccz_renyi_entropy_half_eq_two_log_rpow_sum {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] :
    ccz_renyi_entropy (1 / 2) G
      = 2 * Real.log (∑ F : Finset (Sym2 V), ccz_edge_distribution G F ^ ((1 : ℝ) / 2))
ccz_renyi_entropy_le_of_refl_trans_gen_tree_shiftIn LeanQuantum Mechanics

If T₂ is reachable from T₁ by a sequence of generalized tree shifts, then for every α ≥ 1, the CCZ Rényi entropy of T₂ is at most that of T₁.

theorem ccz_renyi_entropy_le_of_refl_trans_gen_tree_shift
    (α : ℝ) (hα : 1 ≤ α) (n : ℕ) (T₁ T₂ : SimpleGraph (Fin n))
    [DecidableRel T₁.Adj] [DecidableRel T₂.Adj]
    (h : Relation.ReflTransGen is_generalized_tree_shift T₁ T₂) :
    ccz_renyi_entropy α T₂ ≤ ccz_renyi_entropy α T₁
ccz_renyi_entropy_le_of_rpow_sum_geIn LeanQuantum Mechanics

For α > 1, if the α-power sum of the induced-edge distribution of G is at most that of G', then H_α(G') ≤ H_α(G).

theorem ccz_renyi_entropy_le_of_rpow_sum_ge {V : Type*} [Fintype V] [DecidableEq V]
    (G G' : SimpleGraph V) [DecidableRel G.Adj] [DecidableRel G'.Adj] {α : ℝ} (hα : 1 < α)
    (hG : 0 < ∑ F : Finset (Sym2 V), (ccz_edge_distribution G F) ^ α)
    (h : ∑ F : Finset (Sym2 V), (ccz_edge_distribution G F) ^ α ≤
         ∑ F : Finset (Sym2 V), (ccz_edge_distribution G' F) ^ α) :
    ccz_renyi_entropy α G' ≤ ccz_renyi_entropy α G
ccz_renyi_entropy_lt_of_rpow_sum_ltIn LeanQuantum Mechanics

For 0 < α < 1, if the α-power sum of the induced-edge distribution of G' is strictly smaller than that of G, then H_α(G') < H_α(G).

theorem ccz_renyi_entropy_lt_of_rpow_sum_lt {V : Type*} [Fintype V] [DecidableEq V]
    (G G' : SimpleGraph V) [DecidableRel G.Adj] [DecidableRel G'.Adj] {α : ℝ}
    (hα0 : 0 < α) (hα1 : α < 1)
    (hG' : 0 < ∑ F : Finset (Sym2 V), (ccz_edge_distribution G' F) ^ α)
    (h : ∑ F : Finset (Sym2 V), (ccz_edge_distribution G' F) ^ α <
         ∑ F : Finset (Sym2 V), (ccz_edge_distribution G F) ^ α) :
    ccz_renyi_entropy α G' < ccz_renyi_entropy α G
ccz_rpow_sum_posIn LeanQuantum Mechanics

For α > 0 the sum over all edge sets F of ccz_edge_distribution G F to the power α is strictly positive.

theorem ccz_rpow_sum_pos {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {α : ℝ} (hα : 0 < α) :
    0 < ∑ F : Finset (Sym2 V), (ccz_edge_distribution G F) ^ α
ccz_star_graph_edge_distribution_emptyIn LeanQuantum Mechanics

For the star on n ≥ 1 vertices, exactly 2^{n-1} + 1 vertex subsets induce no edge (the 2^{n-1} subsets avoiding the centre, plus the subset {centre}), so the empty edge set carries mass (2^{n-1}+1)/2^n.

theorem ccz_star_graph_edge_distribution_empty {n : ℕ} (hn : 1 ≤ n) :
    letI : DecidableRel (ccz_star_graph n).Adj := Classical.decRel _
    ccz_edge_distribution (ccz_star_graph n) (∅ : Finset (Sym2 (Fin n)))
      = ((2 : ℝ) ^ (n - 1) + 1) / (2 : ℝ) ^ n
ccz_star_graph_edge_distribution_of_nonemptyIn LeanQuantum Mechanics

For the star on n ≥ 1 vertices, every nonempty subset F of its edge set is the induced edge set of exactly one vertex subset (the centre together with the leaves named by F), and any other nonempty edge set has probability zero.

theorem ccz_star_graph_edge_distribution_of_nonempty {n : ℕ} (hn : 1 ≤ n)
    (F : Finset (Sym2 (Fin n))) (hF : F.Nonempty) :
    letI : DecidableRel (ccz_star_graph n).Adj := Classical.decRel _
    ccz_edge_distribution (ccz_star_graph n) F
      = if F ⊆ (ccz_star_graph n).edgeFinset then 1 / (2 : ℝ) ^ n else 0
ccz_star_graph_four_rpow_half_sumIn LeanQuantum Mechanics

For the star graph on 4 vertices (knowledge-base ccz_star_graph 4), the sum over all edge sets of (induced-edge probability)^(1/2) equals 5/2, for any DecidableRel instance.

theorem ccz_star_graph_four_rpow_half_sum (i : DecidableRel (ccz_star_graph 4).Adj) :
    letI : DecidableRel (ccz_star_graph 4).Adj := i
    (∑ F : Finset (Sym2 (Fin 4)), ccz_edge_distribution (ccz_star_graph 4) F ^ ((1 : ℝ) / 2)) = 5 / 2
ccz_star_graph_rpow_sumIn LeanQuantum Mechanics

For n ≥ 1 and α > 0, the order-α power sum of the star's induced-edge distribution is 2^{n-1}-1 atoms of size 2^{-n} plus one atom of size (2^{n-1}+1)/2^n.

theorem ccz_star_graph_rpow_sum {n : ℕ} (hn : 1 ≤ n) {α : ℝ} (hα : 0 < α) :
    letI : DecidableRel (ccz_star_graph n).Adj := Classical.decRel _
    ∑ F : Finset (Sym2 (Fin n)), (ccz_edge_distribution (ccz_star_graph n) F) ^ α
      = ((2 : ℝ) ^ (n - 1) - 1) * ((2 : ℝ) ^ n) ^ (-α)
        + (((2 : ℝ) ^ (n - 1) + 1) / (2 : ℝ) ^ n) ^ α
ccz_star_graph_rpow_sum_geIn LeanQuantum Mechanics

For n ≥ 2 and every real α > 0, the order-α power sum of the star's induced-edge distribution is at least 2^{(1-α)n}/4.

theorem ccz_star_graph_rpow_sum_ge {n : ℕ} (hn : 2 ≤ n) {α : ℝ} (hα : 0 < α) :
    letI : DecidableRel (ccz_star_graph n).Adj := Classical.decRel _
    (2 : ℝ) ^ ((1 - α) * (n : ℝ)) / 4 ≤
      ∑ F : Finset (Sym2 (Fin n)), (ccz_edge_distribution (ccz_star_graph n) F) ^ α
cfc_rpow_conj_transposeIn LeanQuantum Mechanics

For a symmetric matrix A and an orthogonal matrix U (UᵀU = 1), the rpow functional calculus commutes with conjugation by U: cfc (x ↦ x^β) (UᵀAU) = Uᵀ · cfc (x ↦ x^β) A · U.

theorem cfc_rpow_conj_transpose {n : Type*} [Fintype n] [DecidableEq n]
    (β : ℝ) (A U : Matrix n n ℝ) (hA : A.IsSymm) (hU : U.transpose * U = 1) :
    cfc (fun x : ℝ => x ^ β) (U.transpose * A * U) =
      U.transpose * cfc (fun x : ℝ => x ^ β) A * U
cfc_rpow_smulIn LeanQuantum Mechanics

For c > 0 and a positive semidefinite matrix A, the rpow functional calculus scales: cfc (x ↦ x^β) (c • A) = c^β • cfc (x ↦ x^β) A.

theorem cfc_rpow_smul {n : Type*} [Fintype n] [DecidableEq n] (β : ℝ)
    (c : ℝ) (hc : 0 < c) (A : Matrix n n ℝ) (hA : A.PosSemidef) :
    cfc (fun x : ℝ => x ^ β) (c • A) = c ^ β • cfc (fun x : ℝ => x ^ β) A
claw_free_tree_degree_le_twoIn LeanQuantum Mechanics

If a finite tree T admits no induced claw (maximum claw packing 0), then every vertex of T has degree at most 2.

theorem claw_free_tree_degree_le_two {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) [DecidableRel T.Adj] (hT : T.IsTree) (hclaw : max_claw_packing T = 0) :
    ∀ v : V, T.degree v ≤ 2
complete_bipartite_graph_connected_clique_free_threeIn LeanQuantum Mechanics

The complete bipartite graph with both parts nonempty is connected, triangle-free, and has exactly a*b edges.

theorem complete_bipartite_graph_connected_clique_free_three (a b : ℕ) (ha : 1 ≤ a) (hb : 1 ≤ b) :
    (completeBipartiteGraph (Fin a) (Fin b)).Connected ∧
      (completeBipartiteGraph (Fin a) (Fin b)).CliqueFree 3 ∧
      Nat.card (completeBipartiteGraph (Fin a) (Fin b)).edgeSet = a * b
core_constant_b_attainedIn LeanQuantum Mechanics

For any integers d >= 2 and c >= 0, the core constant B(d, c) is attained by some marked core graph (J, s).

theorem core_constant_b_attained (d c : ℕ) (hd : 2 ≤ d) :
    ∃ (J : SimpleGraph (Fin (sparse_graph_state_fisher_core_k d c + 1)))
      (s : Fin (sparse_graph_state_fisher_core_k d c + 1)),
      is_marked_core_graph (sparse_graph_state_fisher_core_k d c) d c J s ∧
      graph_state_fisher_q J - 1 = core_constant_b d c
core_k_satisfies_ineqIn LeanQuantum Mechanics

For any non-negative integers d and c, the core size k = sparse_graph_state_fisher_core_k d c satisfies d * k + c <= k^2 / 4.

theorem core_k_satisfies_ineq (d c : ℕ) :
    d * sparse_graph_state_fisher_core_k d c + c ≤ (sparse_graph_state_fisher_core_k d c) ^ 2 / 4
cycle_weighted_adjacency_matrix_mulVec_applyIn LeanQuantum Mechanics

For any commutative ring α, natural number n ≥ 3, weights t : Fin n → α, and vector v : Fin n → α, the matrix-vector multiplication (cycle_weighted_adjacency_matrix n t).mulVec v at index i equals (t i + t (i - 1)) * v (i - 1) + (t i + t (i + 1)) * v (i + 1).

theorem cycle_weighted_adjacency_matrix_mulVec_apply
    {α : Type*} [CommRing α] (n : ℕ) (hn : 3 ≤ n) (t : Fin n → α) (v : Fin n → α) (i : Fin n) :
    letI : NeZero n := ⟨by omega⟩
    (cycle_weighted_adjacency_matrix n t).mulVec v i =
      (t i + t (i - 1)) * v (i - 1) + (t i + t (i + 1)) * v (i + 1)
cycle_weighted_adjacency_matrix_rank_full_of_differing_productsIn LeanQuantum Mechanics

For any field F of characteristic 2, natural number m ≥ 3, and injective nonzero function t : Fin (2 * m) → F, if the alternating edge weight products along the 2m-cycle differ, then the cycle weighted adjacency matrix has full rank 2m.

theorem cycle_weighted_adjacency_matrix_rank_full_of_differing_products
    (m : ℕ) (hm : 3 ≤ m) {F : Type*} [Field F] [CharP F 2]
    (t : Fin (2 * m) → F) (ht_inj : Function.Injective t) (ht_nz : ∀ i, t i ≠ 0)
    (h_diff : (∏ i : Fin m, (t ⟨2 * i.val, by omega⟩ + t ⟨2 * i.val + 1, by omega⟩)) ≠
              (∏ i : Fin m, (t ⟨2 * i.val + 1, by omega⟩ + t ⟨(2 * i.val + 2) % (2 * m), Nat.mod_lt _ (by omega)⟩))) :
    (cycle_weighted_adjacency_matrix (2 * m) t).rank = 2 * m
cycle_weighted_adjacency_matrix_rank_sub_two_of_matching_productsIn LeanQuantum Mechanics

For any field F of characteristic 2, natural number m ≥ 3, and injective nonzero function s : Fin (2 * m) → F, if the alternating edge weight products along the 2m-cycle are equal, then the cycle weighted adjacency matrix has rank 2m - 2.

theorem cycle_weighted_adjacency_matrix_rank_sub_two_of_matching_products
    (m : ℕ) (hm : 3 ≤ m) {F : Type*} [Field F] [CharP F 2]
    (s : Fin (2 * m) → F) (hs_inj : Function.Injective s) (hs_nz : ∀ i, s i ≠ 0)
    (h_match : (∏ i : Fin m, (s ⟨2 * i.val, by omega⟩ + s ⟨2 * i.val + 1, by omega⟩)) =
               (∏ i : Fin m, (s ⟨2 * i.val + 1, by omega⟩ + s ⟨(2 * i.val + 2) % (2 * m), Nat.mod_lt _ (by omega)⟩))) :
    (cycle_weighted_adjacency_matrix (2 * m) s).rank = 2 * m - 2
dephased_binary_kernel_gap_one_lipschitzIn LeanQuantum Mechanics

Adding one supported vertex changes the tripartite cut-kernel dimension gap by at most one, for any finite graph.

theorem dephased_binary_kernel_gap_one_lipschitz {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (P A B C : Finset V) (hAB : Disjoint A B) (hAC : Disjoint A C) (hBC : Disjoint B C) (v : V) : |dephased_binary_kernel_gap G (insert v P) A B C - dephased_binary_kernel_gap G P A B C| ≤ 1
dephased_entropy_eq_supported_entropyIn LeanQuantum Mechanics

For a valid dephasing profile, the subsystem entropy is unchanged when the full cut kernel is replaced by its subspace supported on nonzero-parameter vertices, with the corresponding dimension and character distribution.

theorem dephased_entropy_eq_supported_entropy {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (q : V → ℝ) (hq : ∀ v, q v ∈ Set.Icc (0 : ℝ) 1) (S : Finset V) : dephased_tree_entropy G q S = dephased_supported_entropy G q S
dephased_graph_disconnected_entropy_additiveIn LeanQuantum Mechanics

If a finite graph has no edges between a vertex subset and its complement, the dephased entropy of any subsystem is the sum of its entropies in the two induced components.

theorem dephased_graph_disconnected_entropy_additive {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (q : V → ℝ) (hq : ∀ v, q v ∈ Set.Icc (0 : ℝ) 1) (L S : Finset V) (hsep : ∀ u ∈ L, ∀ v ∉ L, ¬ G.Adj u v) : dephased_tree_entropy G q S = dephased_tree_entropy (G.induce (↑L : Set V)) (fun v => q v.1) (Finset.univ.filter fun v : ↥L => v.1 ∈ S) + dephased_tree_entropy (G.induce (↑(Lᶜ : Finset V) : Set V)) (fun v => q v.1) (Finset.univ.filter fun v : ↥(Lᶜ : Finset V) => v.1 ∈ S)
dephased_graph_zero_edge_entropy_invariantIn LeanQuantum Mechanics

Removing an edge between two vertices whose dephasing parameters are zero leaves every subsystem entropy unchanged, for any finite simple graph.

theorem dephased_graph_zero_edge_entropy_invariant {V : Type*} [Fintype V] [DecidableEq V] (G G' : SimpleGraph V) [DecidableRel G.Adj] [DecidableRel G'.Adj] (u v : V) (hedge : ∀ x y : V, G'.Adj x y ↔ G.Adj x y ∧ ¬ ((x = u ∧ y = v) ∨ (x = v ∧ y = u))) (q : V → ℝ) (hq : ∀ w, q w ∈ Set.Icc (0 : ℝ) 1) (hu : q u = 0) (hv : q v = 0) (S : Finset V) : dephased_tree_entropy G q S = dephased_tree_entropy G' q S
dephased_path_active_position_add_greedy_countIn LeanQuantum Mechanics

Among the positions of S ∩ P, those not struck by the greedy scan and right-compatible, plus the number of edges the greedy matching chose, equals |S ∩ P|. In words: the greedy matching is maximal on the active-edge path, and every active vertex is either the endpoint of a chosen edge or counted once by the filter.

open scoped Classical in
theorem dephased_path_active_position_add_greedy_count
    (n : ℕ) (S P : Finset (Fin n)) (left right : Bool) :
    (Finset.univ.filter (fun b : Fin n =>
        dephased_path_active_position n (S.image Fin.val) (P.image Fin.val) left right b.val)).card
      + (dephased_path_greedy_state n (S.image Fin.val) (P.image Fin.val) left right (n + 1)).2
      = (S ∩ P).card
dephased_path_aux_adj_iffIn LeanQuantum Mechanics

Two vertices u, w of the subsystem are adjacent in the auxiliary equality graph of the path exactly when they are two apart with the intervening vertex outside the subsystem.

theorem dephased_path_aux_adj_iff (n : ℕ) (S : Finset (Fin n)) (u w : ↥S) :
    (dephased_path_aux_graph n S).Adj u w ↔
      ∃ k : Fin n, k ∉ S ∧
        ((u.1.val + 1 = k.val ∧ k.val + 1 = w.1.val) ∨
         (w.1.val + 1 = k.val ∧ k.val + 1 = u.1.val))
dephased_path_aux_reachable_fillIn LeanQuantum Mechanics

If k lies between u and w and has the parity of u, and u is reachable from w in the auxiliary graph, then k is in the subsystem and in u's connected component.

theorem dephased_path_aux_reachable_fill (n : ℕ) (S : Finset (Fin n)) (u w : ↥S)
    (hle : u.1.val ≤ w.1.val) (h : (dephased_path_aux_graph n S).Reachable u w)
    (k : Fin n) (hk1 : u.1.val ≤ k.val) (hk2 : k.val ≤ w.1.val)
    (hk : k.val % 2 = u.1.val % 2) :
    ∃ hkS : k ∈ S, (dephased_path_aux_graph n S).connectedComponentMk ⟨k, hkS⟩ =
      (dephased_path_aux_graph n S).connectedComponentMk u
dephased_path_aux_reachable_of_step_chainIn LeanQuantum Mechanics

Two subsystem vertices of the same parity, with every vertex strictly between them of the opposite parity outside the subsystem, are reachable in the auxiliary equality graph.

theorem dephased_path_aux_reachable_of_step_chain (n : ℕ) (S : Finset (Fin n)) (u w : ↥S)
    (hpar : u.1.val % 2 = w.1.val % 2)
    (hhole : ∀ k : Fin n, min u.1.val w.1.val < k.val → k.val < max u.1.val w.1.val →
      k.val % 2 ≠ u.1.val % 2 → k ∉ S) :
    (dephased_path_aux_graph n S).Reachable u w
dephased_path_aux_reachable_parity_holesIn LeanQuantum Mechanics

Vertices joined in the auxiliary equality graph of a path have the same parity, and every vertex strictly between them of the opposite parity lies outside the subsystem.

theorem dephased_path_aux_reachable_parity_holes (n : ℕ) (S : Finset (Fin n)) (u w : ↥S)
    (h : (dephased_path_aux_graph n S).Reachable u w) :
    u.1.val % 2 = w.1.val % 2 ∧
      ∀ k : Fin n, min u.1.val w.1.val < k.val → k.val < max u.1.val w.1.val →
        k.val % 2 ≠ u.1.val % 2 → k ∉ S
dephased_path_block_card_eq_active_position_cardIn LeanQuantum Mechanics

The unpinned alternating blocks are in bijection with the active positions, via the right endpoint; hence the two cardinalities agree. No nonemptiness of the path is needed.

open scoped Classical in
theorem dephased_path_block_card_eq_active_position_card
    (n : ℕ) (S P : Finset (Fin n)) (left right : Bool) :
    (Finset.univ.filter fun ab : Fin n × Fin n =>
        let a := ab.1
        let b := ab.2
        a.val ≤ b.val ∧ a.val % 2 = b.val % 2 ∧
        dephased_path_interval_block n a b ⊆ (S ∩ P) ∧
        (∀ k : Fin n, a.val < k.val → k.val < b.val → k.val % 2 ≠ a.val % 2 → k ∉ S) ∧
        (∀ k : Fin n, k.val + 1 = a.val ∨ b.val + 1 = k.val → k ∈ S) ∧
        (a.val = 0 → left = false) ∧ (b.val + 1 = n → right = false)).card
      = (Finset.univ.filter (fun b : Fin n =>
          dephased_path_active_position n (S.image Fin.val) (P.image Fin.val) left right b.val)).card
dephased_path_block_image_sndIn LeanQuantum Mechanics

A position b is the right endpoint of an unpinned alternating block if and only if b lies in S ∩ P, the greedy scan did not choose the edge at b+1, and b is right-compatible (b+1 = n with right = false, or b+1 ∈ S).

open scoped Classical in
theorem dephased_path_block_image_snd
    (n : ℕ) (S P : Finset (Fin n)) (left right : Bool) :
    (Finset.univ.filter fun ab : Fin n × Fin n =>
        let a := ab.1
        let b := ab.2
        a.val ≤ b.val ∧ a.val % 2 = b.val % 2 ∧
        dephased_path_interval_block n a b ⊆ (S ∩ P) ∧
        (∀ k : Fin n, a.val < k.val → k.val < b.val → k.val % 2 ≠ a.val % 2 → k ∉ S) ∧
        (∀ k : Fin n, k.val + 1 = a.val ∨ b.val + 1 = k.val → k ∈ S) ∧
        (a.val = 0 → left = false) ∧ (b.val + 1 = n → right = false)).image Prod.snd
      = Finset.univ.filter (fun b : Fin n =>
          dephased_path_active_position n (S.image Fin.val) (P.image Fin.val) left right b.val)
dephased_path_block_right_endpoint_injectiveIn LeanQuantum Mechanics

If (a,b) and (a',b') are both unpinned alternating blocks and b = b', then a = a'. Equivalently, the second projection is injective on the set of blocks.

open scoped Classical in
theorem dephased_path_block_right_endpoint_injective
    (n : ℕ) (S P : Finset (Fin n)) (left right : Bool) :
    Set.InjOn (fun ab : Fin n × Fin n => ab.2)
      ↑((Finset.univ : Finset (Fin n × Fin n)).filter fun ab =>
        let a := ab.1
        let b := ab.2
        a.val ≤ b.val ∧ a.val % 2 = b.val % 2 ∧
        dephased_path_interval_block n a b ⊆ (S ∩ P) ∧
        (∀ k : Fin n, a.val < k.val → k.val < b.val → k.val % 2 ≠ a.val % 2 → k ∉ S) ∧
        (∀ k : Fin n, k.val + 1 = a.val ∨ b.val + 1 = k.val → k ∈ S) ∧
        (a.val = 0 → left = false) ∧ (b.val + 1 = n → right = false))
dephased_path_canonical_sites_certificateIn LeanQuantum Mechanics

The canonical segment selection bounds every binary path interval gap by its sum of local defects.

open scoped Classical BigOperators in
theorem dephased_path_canonical_sites_certificate (n : ℕ) (color : Fin n → Fin 4) (left right : Finset (Fin 4)) (P : Finset (Fin n)) : (∑ i ∈ dephased_path_canonical_sites n color, (dephased_path_binary_weight n P i.val - dephased_path_binary_weight n P (i.val - 1) * dephased_path_binary_weight n P (i.val + 1))) ≤ dephased_path_interval_polynomial n color left right (fun i => if i ∈ P then 1 else 0)
dephased_path_constant_gap_certificateIn LeanQuantum Mechanics

For every colored path with arbitrary endpoint leaf colors there is a set of internal sites whose local-gap sum bounds the interval polynomial from below on every binary support.

open scoped Classical BigOperators in
theorem dephased_path_constant_gap_certificate (n : ℕ) (color : Fin n → Fin 4) (left right : Finset (Fin 4)) : ∃ E : Finset (Fin n), (∀ i ∈ E, 0 < i.val ∧ i.val + 1 < n) ∧ ∀ P : Finset (Fin n), (∑ i ∈ E, (dephased_path_binary_weight n P i.val - dephased_path_binary_weight n P (i.val - 1) * dephased_path_binary_weight n P (i.val + 1))) ≤ dephased_path_interval_polynomial n color left right (fun i => if i ∈ P then 1 else 0)
dephased_path_entropy_internal_singletonIn LeanQuantum Mechanics

For n : ℕ, q : Fin n → ℝ, and 1 ≤ i with i + 1 < n, the dephased path entropy of the singleton {i} equals 1.

theorem dephased_path_entropy_internal_singleton
    (n : ℕ) (q : Fin n → ℝ) (i : ℕ) (h1 : 1 ≤ i) (h2 : i + 1 < n) :
    dephased_path_entropy n q {⟨i, by omega⟩} = 1
dephased_path_entropy_punctured_pathIn LeanQuantum Mechanics

For n : ℕ, q : Fin n → ℝ, and 1 ≤ i with i + 1 < n, the dephased path entropy of the punctured path {j : Fin n | j.val ≠ i} equals 1 + binaryEntropy ((1 - q ⟨i - 1, by omega⟩ * q ⟨i + 1, by omega⟩) / 2) + ∑_{j + 1 < i} binaryEntropy ((1 - q j) / 2) + ∑_{i + 1 < j} binaryEntropy ((1 - q j) / 2).

theorem dephased_path_entropy_punctured_path
    (n : ℕ) (q : Fin n → ℝ) (i : ℕ) (h1 : 1 ≤ i) (h2 : i + 1 < n) :
    dephased_path_entropy n q (Finset.univ.filter (fun j => j.val ≠ i)) =
      1 + binaryEntropy ((1 - q ⟨i - 1, by omega⟩ * q ⟨i + 1, by omega⟩) / 2) +
        ∑ j ∈ Finset.univ.filter (fun j => j.val + 1 < i), binaryEntropy ((1 - q j) / 2) +
        ∑ j ∈ Finset.univ.filter (fun j => i + 1 < j.val), binaryEntropy ((1 - q j) / 2)
dephased_path_entropy_three_block_AIn LeanQuantum Mechanics

For n : ℕ, q : Fin n → ℝ, and 1 ≤ i with i + 1 < n, the dephased path entropy of the initial block {j : Fin n | j.val < i} equals 1 + ∑_{j + 1 < i} binaryEntropy ((1 - q j) / 2).

theorem dephased_path_entropy_three_block_A
    (n : ℕ) (q : Fin n → ℝ) (i : ℕ) (h1 : 1 ≤ i) (h2 : i + 1 < n) :
    dephased_path_entropy n q (Finset.univ.filter (fun j => j.val < i)) =
      1 + ∑ j ∈ Finset.univ.filter (fun j => j.val + 1 < i), binaryEntropy ((1 - q j) / 2)
dephased_path_entropy_three_block_ABIn LeanQuantum Mechanics

For n : ℕ, q : Fin n → ℝ, and 1 ≤ i with i + 1 < n, the dephased path entropy of {j : Fin n | j.val < i + 1} equals 1 + binaryEntropy ((1 - q ⟨i - 1, by omega⟩) / 2) + ∑_{j + 1 < i} binaryEntropy ((1 - q j) / 2).

theorem dephased_path_entropy_three_block_AB
    (n : ℕ) (q : Fin n → ℝ) (i : ℕ) (h1 : 1 ≤ i) (h2 : i + 1 < n) :
    dephased_path_entropy n q (Finset.univ.filter (fun j => j.val < i + 1)) =
      1 + binaryEntropy ((1 - q ⟨i - 1, by omega⟩) / 2) +
        ∑ j ∈ Finset.univ.filter (fun j => j.val + 1 < i), binaryEntropy ((1 - q j) / 2)
dephased_path_entropy_three_block_BCIn LeanQuantum Mechanics

For n : ℕ, q : Fin n → ℝ, and 1 ≤ i with i + 1 < n, the dephased path entropy of {j : Fin n | i ≤ j.val} equals 1 + binaryEntropy ((1 - q ⟨i + 1, by omega⟩) / 2) + ∑_{i + 1 < j} binaryEntropy ((1 - q j) / 2).

theorem dephased_path_entropy_three_block_BC
    (n : ℕ) (q : Fin n → ℝ) (i : ℕ) (h1 : 1 ≤ i) (h2 : i + 1 < n) :
    dephased_path_entropy n q (Finset.univ.filter (fun j => i ≤ j.val)) =
      1 + binaryEntropy ((1 - q ⟨i + 1, by omega⟩) / 2) +
        ∑ j ∈ Finset.univ.filter (fun j => i + 1 < j.val), binaryEntropy ((1 - q j) / 2)
dephased_path_entropy_three_block_CIn LeanQuantum Mechanics

For n : ℕ, q : Fin n → ℝ, and 1 ≤ i with i + 1 < n, the dephased path entropy of the final block {j : Fin n | i < j.val} equals 1 + ∑_{i + 1 < j} binaryEntropy ((1 - q j) / 2).

theorem dephased_path_entropy_three_block_C
    (n : ℕ) (q : Fin n → ℝ) (i : ℕ) (h1 : 1 ≤ i) (h2 : i + 1 < n) :
    dephased_path_entropy n q (Finset.univ.filter (fun j => i < j.val)) =
      1 + ∑ j ∈ Finset.univ.filter (fun j => i + 1 < j.val), binaryEntropy ((1 - q j) / 2)
dephased_path_entropy_univ_three_block_partitionIn LeanQuantum Mechanics

For n : ℕ, q : Fin n → ℝ, and 1 ≤ i with i + 1 < n, the dephased path entropy of Finset.univ equals binaryEntropy ((1 - q ⟨i, by omega⟩) / 2) + binaryEntropy ((1 - q ⟨i - 1, by omega⟩) / 2) + binaryEntropy ((1 - q ⟨i + 1, by omega⟩) / 2) + ∑_{j + 1 < i} binaryEntropy ((1 - q j) / 2) + ∑_{i + 1 < j} binaryEntropy ((1 - q j) / 2).

theorem dephased_path_entropy_univ_three_block_partition
    (n : ℕ) (q : Fin n → ℝ) (i : ℕ) (h1 : 1 ≤ i) (h2 : i + 1 < n) :
    dephased_path_entropy n q Finset.univ =
      binaryEntropy ((1 - q ⟨i, by omega⟩) / 2) +
      binaryEntropy ((1 - q ⟨i - 1, by omega⟩) / 2) +
      binaryEntropy ((1 - q ⟨i + 1, by omega⟩) / 2) +
      ∑ j ∈ Finset.univ.filter (fun j => j.val + 1 < i), binaryEntropy ((1 - q j) / 2) +
      ∑ j ∈ Finset.univ.filter (fun j => i + 1 < j.val), binaryEntropy ((1 - q j) / 2)
dephased_path_free_component_indicator_mem_supported_kernelIn LeanQuantum Mechanics

If every vertex of a connected component of the auxiliary graph is unmarked and has nonzero parameter, the indicator of that component lies in the supported cut kernel.

open scoped Classical in
theorem dephased_path_free_component_indicator_mem_supported_kernel
    (n : ℕ) (q : Fin n → ℝ) (S : Finset (Fin n))
    (c : (dephased_path_aux_graph n S).ConnectedComponent)
    (hc : dephased_path_free_component n S c)
    (hq : ∀ u : ↥S, (dephased_path_aux_graph n S).connectedComponentMk u = c → q u.1 ≠ 0) :
    (fun i : ↥S => if (dephased_path_aux_graph n S).connectedComponentMk i = c then (1 : ZMod 2) else 0)
      ∈ dephased_supported_kernel (SimpleGraph.pathGraph n) q S
dephased_path_greedy_chosen_succIn LeanQuantum Mechanics

chosen(b+1) = (edge(b+1) and not chosen(b)), where chosen(b) records whether the edge at position b was chosen by the left-to-right greedy scan.

open scoped Classical in
theorem dephased_path_greedy_chosen_succ (n : ℕ) (I D : Finset ℕ) (left right : Bool) (b : ℕ) :
    dephased_path_greedy_chosen n I D left right (b + 1) =
      (dephased_path_active_edge n I D left right (b + 1) &&
        !dephased_path_greedy_chosen n I D left right b)
dephased_path_interval_block_minimalIn LeanQuantum Mechanics

If a supported kernel vector is the indicator of the alternating block of an interval [a,b] contained in the subsystem with all intervening opposite-parity vertices outside it, then it is nonzero and minimal among nonzero supported vectors whose 1-set is contained in its own.

open scoped Classical in
theorem dephased_path_interval_block_minimal
    (n : ℕ) (q : Fin n → ℝ) (S : Finset (Fin n))
    (x : dephased_supported_kernel (SimpleGraph.pathGraph n) q S) (a b : Fin n)
    (hab : a.val ≤ b.val) (hpar : a.val % 2 = b.val % 2)
    (hsub : dephased_path_interval_block n a b ⊆ S)
    (hout : ∀ k : Fin n, a.val < k.val → k.val < b.val →
      k.val % 2 ≠ a.val % 2 → k ∉ S)
    (hx : ∀ i : ↥S, x.1 i = 1 ↔ i.1 ∈ dephased_path_interval_block n a b) :
    x ≠ 0 ∧ ∀ y : dephased_supported_kernel (SimpleGraph.pathGraph n) q S,
      y ≠ 0 → (∀ i : ↥S, y.1 i = 1 → x.1 i = 1) → y = x
dephased_path_interval_eq_block_gapIn LeanQuantum Mechanics

For an ordinary path, the alternating-interval polynomial is exactly the tripartite gap of supported-kernel block weights.

open scoped Classical in
theorem dephased_path_interval_eq_block_gap (n : ℕ) (color : Fin n → Fin 4) (q : Fin n → ℝ) : let A := Finset.univ.filter (fun i : Fin n => color i = 0); let B := Finset.univ.filter (fun i : Fin n => color i = 1); let C := Finset.univ.filter (fun i : Fin n => color i = 2); let weight := dephased_kernel_block_weight (SimpleGraph.pathGraph n) q; dephased_path_interval_polynomial n color ∅ ∅ q = weight A + weight B + weight C - weight (A ∪ B) - weight (A ∪ C) - weight (B ∪ C) + weight (A ∪ B ∪ C)
dephased_path_interval_equal_color_splitIn LeanQuantum Mechanics

Cutting an edge between two equally colored path vertices splits the interval polynomial into the sum of the two smaller interval polynomials, with the opposite endpoint color recorded as a leaf.

open scoped Classical in
theorem dephased_path_interval_equal_color_split (m k : ℕ) (hm : 0 < m) (hk : 0 < k) (cl : Fin m → Fin 4) (cr : Fin k → Fin 4) (ql : Fin m → ℝ) (qr : Fin k → ℝ) (left right : Finset (Fin 4)) (hcolor : cl ⟨m - 1, by omega⟩ = cr ⟨0, hk⟩) : dephased_path_interval_polynomial (m + k) (Fin.addCases cl cr) left right (Fin.addCases ql qr) = dephased_path_interval_polynomial m cl left {cr ⟨0, hk⟩} ql + dephased_path_interval_polynomial k cr {cl ⟨m - 1, by omega⟩} right qr
dephased_path_interval_polynomial_nonnegativeIn LeanQuantum Mechanics

For any path coloring and endpoint leaf colors, the explicit alternating-interval polynomial is nonnegative under the local noise inequalities.

theorem dephased_path_interval_polynomial_nonnegative (n : ℕ) (color : Fin n → Fin 4) (left right : Finset (Fin 4)) (q : Fin n → ℝ) (hq : ∀ i, q i ∈ Set.Icc (0 : ℝ) 1) (hlocal : ∀ i j k : Fin n, i.val + 1 = j.val → j.val + 1 = k.val → q j ≥ q i * q k) : 0 ≤ dephased_path_interval_polynomial n color left right q
dephased_path_kernel_aux_adj_eqIn LeanQuantum Mechanics

If two vertices u, w of the subsystem have a common neighbour v outside the subsystem, then any cut-kernel vector takes the same value at u and at w.

open scoped Classical in
theorem dephased_path_kernel_aux_adj_eq (n : ℕ) (S : Finset (Fin n)) (y : ↥S → ZMod 2)
    (hy : y ∈ tree_submatrix_ker (SimpleGraph.pathGraph n) S) {u w : ↥S}
    (h : (dephased_path_aux_graph n S).Adj u w) : y u = y w
dephased_path_kernel_eq_of_reachableIn LeanQuantum Mechanics

Vertices joined by a path in the auxiliary equality graph have equal entries in every cut-kernel vector.

open scoped Classical in
theorem dephased_path_kernel_eq_of_reachable (n : ℕ) (S : Finset (Fin n)) (y : ↥S → ZMod 2)
    (hy : y ∈ tree_submatrix_ker (SimpleGraph.pathGraph n) S) {u w : ↥S}
    (h : (dephased_path_aux_graph n S).Reachable u w) : y u = y w
dephased_path_kernel_interval_block_constIn LeanQuantum Mechanics

If the alternating block of the interval [a,b] lies in the subsystem and every intervening opposite-parity vertex is outside it, then every cut-kernel vector takes the same value at any two positions of the block.

open scoped Classical in
theorem dephased_path_kernel_interval_block_const (n : ℕ) (S : Finset (Fin n)) (y : ↥S → ZMod 2)
    (hy : y ∈ tree_submatrix_ker (SimpleGraph.pathGraph n) S)
    (a b : Fin n) (hab : a.val ≤ b.val) (hpar : a.val % 2 = b.val % 2)
    (hsub : dephased_path_interval_block n a b ⊆ S)
    (hout : ∀ k : Fin n, a.val < k.val → k.val < b.val → k.val % 2 ≠ a.val % 2 → k ∉ S)
    (i j : ↥S) (hi : i.1 ∈ dephased_path_interval_block n a b)
    (hj : j.1 ∈ dephased_path_interval_block n a b) : y i = y j
dephased_path_kernel_marked_zeroIn LeanQuantum Mechanics

If u in the subsystem is the only subsystem neighbour of some vertex outside the subsystem, then every cut-kernel vector vanishes at u.

open scoped Classical in
theorem dephased_path_kernel_marked_zero (n : ℕ) (S : Finset (Fin n)) (y : ↥S → ZMod 2)
    (hy : y ∈ tree_submatrix_ker (SimpleGraph.pathGraph n) S) {u : ↥S}
    (hu : u.1 ∈ dephased_path_marked n S) : y u = 0
dephased_path_kernel_row_sumIn LeanQuantum Mechanics

A binary vector on the subsystem S lies in the cut kernel of the path graph exactly when, for every vertex v outside S, the sum of its entries at the S-neighbours of v (counted with multiplicity 1 over ZMod 2) is zero.

open scoped Classical in
theorem dephased_path_kernel_row_sum (n : ℕ) (S : Finset (Fin n)) (y : ↥S → ZMod 2) :
    y ∈ tree_submatrix_ker (SimpleGraph.pathGraph n) S ↔
      ∀ v : Fin n, v ∉ S →
        (∑ u : ↥S, (if (SimpleGraph.pathGraph n).Adj v u.1 then (1 : ZMod 2) else 0) * y u) = 0
dephased_path_min_support_is_free_componentIn LeanQuantum Mechanics

A nonzero supported cut-kernel vector whose 1-set is minimal among those of nonzero supported vectors is the indicator of a single free component of the auxiliary equality graph.

open scoped Classical in
theorem dephased_path_min_support_is_free_component
    (n : ℕ) (q : Fin n → ℝ) (S : Finset (Fin n))
    (x : dephased_supported_kernel (SimpleGraph.pathGraph n) q S)
    (hx : x ≠ 0 ∧ ∀ y : dephased_supported_kernel (SimpleGraph.pathGraph n) q S,
      y ≠ 0 → (∀ i : ↥S, y.1 i = 1 → x.1 i = 1) → y = x) :
    ∃ c : (dephased_path_aux_graph n S).ConnectedComponent,
      dephased_path_free_component n S c ∧
        ∀ i : ↥S, x.1 i = 1 ↔ (dephased_path_aux_graph n S).connectedComponentMk i = c
dephased_path_min_support_is_interval_blockIn LeanQuantum Mechanics

A nonzero supported cut-kernel vector minimal among such vectors has its support equal to the alternating block of an interval [a,b] contained in the subsystem, all of whose intervening opposite-parity vertices lie outside the subsystem.

open scoped Classical in
theorem dephased_path_min_support_is_interval_block
    (n : ℕ) (q : Fin n → ℝ) (S : Finset (Fin n))
    (x : dephased_supported_kernel (SimpleGraph.pathGraph n) q S)
    (hx : x ≠ 0 ∧ ∀ y : dephased_supported_kernel (SimpleGraph.pathGraph n) q S,
      y ≠ 0 → (∀ i : ↥S, y.1 i = 1 → x.1 i = 1) → y = x) :
    ∃ a b : Fin n, a.val ≤ b.val ∧ a.val % 2 = b.val % 2 ∧
      dephased_path_interval_block n a b ⊆ S ∧
      (∀ k : Fin n, a.val < k.val → k.val < b.val →
        k.val % 2 ≠ a.val % 2 → k ∉ S) ∧
      ∀ i : ↥S, x.1 i = 1 ↔ i.1 ∈ dephased_path_interval_block n a b
dephased_path_minimal_supported_kernel_intervalIn LeanQuantum Mechanics

For a path cut and any real parameter profile, a supported binary cut-kernel vector has minimal nonempty support exactly when that support consists of alternating vertices in a path interval whose intervening vertices are outside the subsystem.

theorem dephased_path_minimal_supported_kernel_interval
    (n : ℕ) (q : Fin n → ℝ) (S : Finset (Fin n))
    (x : dephased_supported_kernel (SimpleGraph.pathGraph n) q S) :
    (x ≠ 0 ∧ ∀ y : dephased_supported_kernel (SimpleGraph.pathGraph n) q S,
      y ≠ 0 → (∀ i : ↥S, y.1 i = 1 → x.1 i = 1) → y = x) ↔
    ∃ a b : Fin n, a.val ≤ b.val ∧ a.val % 2 = b.val % 2 ∧
      dephased_path_interval_block n a b ⊆ S ∧
      (∀ k : Fin n, a.val < k.val → k.val < b.val →
        k.val % 2 ≠ a.val % 2 → k ∉ S) ∧
      ∀ i : ↥S, x.1 i = 1 ↔ i.1 ∈ dephased_path_interval_block n a b
dephased_path_tripartite_info_n_eq_three_le_zero_iffIn LeanQuantum Mechanics

For n = 3, tripartite information is nonpositive for all pairwise disjoint triples if and only if it is nonpositive for the singleton triple {0}, {1}, {2}.

theorem dephased_path_tripartite_info_n_eq_three_le_zero_iff (q : Fin 3 → ℝ) :
    (∀ A B C : Finset (Fin 3), Disjoint A B → Disjoint A C → Disjoint B C →
      dephased_path_tripartite_info 3 q A B C ≤ 0) ↔
    dephased_path_tripartite_info 3 q {⟨0, by decide⟩} {⟨1, by decide⟩} {⟨2, by decide⟩} ≤ 0
dephased_path_tripartite_info_n_eq_three_singletonIn LeanQuantum Mechanics

The tripartite information of the three singleton sets {0}, {1}, {2} for a path of length 3 equals binaryEntropy ((1 - q 1) / 2) - binaryEntropy ((1 - q 0 * q 2) / 2).

theorem dephased_path_tripartite_info_n_eq_three_singleton (q : Fin 3 → ℝ) :
    dephased_path_tripartite_info 3 q {⟨0, by decide⟩} {⟨1, by decide⟩} {⟨2, by decide⟩} =
      binaryEntropy ((1 - q ⟨1, by decide⟩) / 2) -
      binaryEntropy ((1 - q ⟨0, by decide⟩ * q ⟨2, by decide⟩) / 2)
dephased_path_unpinned_intervals_add_greedy_matchingIn LeanQuantum Mechanics

On a nonempty path, the number of unpinned alternating blocks of active subsystem vertices plus the number of edges chosen by the left-to-right greedy matching of active cut edges equals the number of active subsystem vertices. The two Boolean flags encode possible pin edges at the ends.

open scoped Classical in
theorem dephased_path_unpinned_intervals_add_greedy_matching
    (n : ℕ) (hn : 0 < n) (S P : Finset (Fin n)) (left right : Bool) :
    let I : Finset ℕ := S.image Fin.val
    let D : Finset ℕ := P.image Fin.val
    let blocks : Finset (Fin n × Fin n) := Finset.univ.filter fun ab =>
      let a := ab.1
      let b := ab.2
      a.val ≤ b.val ∧ a.val % 2 = b.val % 2 ∧
      dephased_path_interval_block n a b ⊆ (S ∩ P) ∧
      (∀ k : Fin n, a.val < k.val → k.val < b.val → k.val % 2 ≠ a.val % 2 → k ∉ S) ∧
      (∀ k : Fin n, k.val + 1 = a.val ∨ b.val + 1 = k.val → k ∈ S) ∧
      (a.val = 0 → left = false) ∧ (b.val + 1 = n → right = false)
    let edge : ℕ → Bool := fun e =>
      if e = 0 then left && decide (0 ∈ I ∧ 0 ∈ D)
      else if e = n then right && decide (n - 1 ∈ I ∧ n - 1 ∈ D)
      else decide (((e - 1 ∈ I ∧ e - 1 ∈ D) ∧ e ∉ I) ∨
        ((e ∈ I ∧ e ∈ D) ∧ e - 1 ∉ I))
    let scan : Bool × ℕ := (List.range (n + 1)).foldl
      (fun acc e => if edge e && !acc.1 then (true, acc.2 + 1) else (false, acc.2))
      (false, 0)
    blocks.card + scan.2 = (S ∩ P).card
dephased_periodic_path_interval_formulaIn LeanQuantum Mechanics

For a path colored cyclically with the three party colors and no endpoint leaves, the interval polynomial is the sum of internal weights minus the sum of products at distance two.

open scoped Classical BigOperators in
theorem dephased_periodic_path_interval_formula (n : ℕ) (q : ℕ → ℝ) : dephased_path_interval_polynomial n (fun i : Fin n => ⟨i.val % 3, by omega⟩) ∅ ∅ (fun i => q i.val) = (∑ i ∈ Finset.range (n - 2), q (i + 1)) - (∑ i ∈ Finset.range (n - 2), q i * q (i + 2))
dephased_pruned_zero_vertex_degree_le_oneIn LeanQuantum Mechanics

After removing all zero-zero edges, every zero-parameter vertex has degree at most one under the local criterion.

theorem dephased_pruned_zero_vertex_degree_le_one {V : Type*} [Fintype V] [DecidableEq V] (G H : SimpleGraph V) [DecidableRel G.Adj] [DecidableRel H.Adj] (q : V → ℝ) (hq : ∀ v, q v ∈ Set.Icc (0 : ℝ) 1) (hlocal : dephased_tree_local_noise_criterion G q) (hedge : ∀ x y, H.Adj x y ↔ G.Adj x y ∧ (q x ≠ 0 ∨ q y ≠ 0)) (v : V) (hv : q v = 0) : H.degree v ≤ 1
dephased_reduced_even_binary_nonnegativeIn LeanQuantum Mechanics

Every even-length reduced four-color path has nonnegative binary interval gap, for arbitrary endpoint leaves.

open scoped Classical in
theorem dephased_reduced_even_binary_nonnegative (n : ℕ) (color : Fin n → Fin 4) (left right : Finset (Fin 4)) (P : Finset (Fin n)) (hproper : ∀ i j : Fin n, i.val + 1 = j.val → color i ≠ color j) (heven : n % 2 = 0) : 0 ≤ dephased_path_interval_polynomial n color left right (fun i => if i ∈ P then 1 else 0)
dephased_reduced_odd_binary_local_gapIn LeanQuantum Mechanics

Every odd-position rainbow site supplies a binary local-gap certificate on a reduced odd-length path.

open scoped Classical in
theorem dephased_reduced_odd_binary_local_gap (n : ℕ) (color : Fin n → Fin 4) (left right : Finset (Fin 4)) (P : Finset (Fin n)) (hproper : ∀ i j : Fin n, i.val + 1 = j.val → color i ≠ color j) (hodd : n % 2 = 1) (j : Fin n) (hjodd : j.val % 2 = 1) (hrainbow : dephased_path_rainbow_site n color j) : dephased_path_binary_weight n P j.val - dephased_path_binary_weight n P (j.val - 1) * dephased_path_binary_weight n P (j.val + 1) ≤ dephased_path_interval_polynomial n color left right (fun i => if i ∈ P then 1 else 0)
dephased_reduced_odd_binary_no_rainbowIn LeanQuantum Mechanics

A reduced odd-length path with no odd-position rainbow site has nonnegative binary interval gap.

open scoped Classical in
theorem dephased_reduced_odd_binary_no_rainbow (n : ℕ) (color : Fin n → Fin 4) (left right : Finset (Fin 4)) (P : Finset (Fin n)) (hproper : ∀ i j : Fin n, i.val + 1 = j.val → color i ≠ color j) (hodd : n % 2 = 1) (hnone : ∀ j : Fin n, j.val % 2 = 1 → ¬ dephased_path_rainbow_site n color j) : 0 ≤ dephased_path_interval_polynomial n color left right (fun i => if i ∈ P then 1 else 0)
dephased_tree_binary_entropy_eq_nullityIn LeanQuantum Mechanics

For a zero-one noise profile, the entropy equals the subsystem size minus the cut-kernel dimension restricted to the one-parameter support.

open scoped Classical in
theorem dephased_tree_binary_entropy_eq_nullity {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (P S : Finset V) : dephased_tree_entropy G (fun v => if v ∈ P then 1 else 0) S = (S.card : ℝ) - (dephased_binary_kernel_nullity G P S : ℝ)
dephased_tree_block_polynomial_mmiIn LeanQuantum Mechanics

For a locally admissible noise profile on a finite tree, the inclusion-minimal supported-kernel product sum has nonnegative tripartite alternating sum on every three disjoint regions.

theorem dephased_tree_block_polynomial_mmi {V : Type*} [Fintype V] [DecidableEq V] (T : SimpleGraph V) [DecidableRel T.Adj] (hT : T.IsTree) (q : V → ℝ) (hq : ∀ v, q v ∈ Set.Icc (0 : ℝ) 1) (hlocal : dephased_tree_local_noise_criterion T q) (A B C : Finset V) (hAB : Disjoint A B) (hAC : Disjoint A C) (hBC : Disjoint B C) : 0 ≤ dephased_kernel_block_weight T q A + dephased_kernel_block_weight T q B + dephased_kernel_block_weight T q C - dephased_kernel_block_weight T q (A ∪ B) - dephased_kernel_block_weight T q (A ∪ C) - dephased_kernel_block_weight T q (B ∪ C) + dephased_kernel_block_weight T q (A ∪ B ∪ C)
dephased_tree_block_series_implies_mmiIn LeanQuantum Mechanics

If the block-polynomial tripartite inequality holds at every positive even power of the noise profile, then the dephased tripartite information is nonpositive.

theorem dephased_tree_block_series_implies_mmi {V : Type*} [Fintype V] [DecidableEq V] (T : SimpleGraph V) [DecidableRel T.Adj] (q : V → ℝ) (hq : ∀ v, q v ∈ Set.Icc (0 : ℝ) 1) (hlocal : dephased_tree_local_noise_criterion T q) (A B C : Finset V) (hAB : Disjoint A B) (hAC : Disjoint A C) (hBC : Disjoint B C) (hpoly : ∀ n : ℕ, let z : V → ℝ := fun v => (q v) ^ (2*(n+1)); 0 ≤ dephased_kernel_block_weight T z A + dephased_kernel_block_weight T z B + dephased_kernel_block_weight T z C - dephased_kernel_block_weight T z (A ∪ B) - dephased_kernel_block_weight T z (A ∪ C) - dephased_kernel_block_weight T z (B ∪ C) + dephased_kernel_block_weight T z (A ∪ B ∪ C)) : dephased_tree_tripartite_info T q A B C ≤ 0
dephased_tree_entropy_of_no_constraintsIn LeanQuantum Mechanics

If every row of the cut matrix of S is zero (no vertex outside S is adjacent to any vertex of S), then the kernel is everything and the dephased entropy of S is the sum of the binary entropies bin((1-q s)/2) over s in S.

theorem dephased_tree_entropy_of_no_constraints
    {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) [DecidableRel T.Adj]
    (q : V → ℝ) (hq : ∀ v : V, q v ∈ Set.Icc (0 : ℝ) 1)
    (S : Finset V)
    (hrow : ∀ r : V, r ∉ S → ∀ s ∈ S, ¬ T.Adj r s) :
    dephased_tree_entropy T q S = ∑ s ∈ S, binaryEntropy ((1 - q s) / 2)
dephased_tree_entropy_of_pair_constraintIn LeanQuantum Mechanics

If every row of the cut matrix is supported on {u,w} (with u ≠ w, both in S) and every row adjacent to u is also adjacent to w, and some row is adjacent to both, then the kernel is {x : x u = x w} and the dephased entropy of S equals 1 + bin((1-q u q w)/2) plus the sum of bin((1-q s)/2) over the remaining coordinates.

theorem dephased_tree_entropy_of_pair_constraint
    {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) [DecidableRel T.Adj]
    (q : V → ℝ) (hq : ∀ v : V, q v ∈ Set.Icc (0 : ℝ) 1)
    (S : Finset V) (u w : V) (huS : u ∈ S) (hwS : w ∈ S) (huw : u ≠ w)
    (hrow : ∀ r : V, r ∉ S → ∀ s ∈ S, T.Adj r s → (s = u ∨ s = w))
    (hpair : ∀ r : V, r ∉ S → (T.Adj r u ↔ T.Adj r w))
    (hex : ∃ r : V, r ∉ S ∧ T.Adj r u ∧ T.Adj r w) :
    dephased_tree_entropy T q S =
      1 + binaryEntropy ((1 - q u * q w) / 2) +
        ∑ s ∈ (S.erase u).erase w, binaryEntropy ((1 - q s) / 2)
dephased_tree_entropy_of_single_constraintIn LeanQuantum Mechanics

If every row of the cut matrix is supported on the single coordinate v (and some row is nonzero), the kernel is {x : x v = 0}, and the dephased entropy of S equals 1 plus the sum of bin((1-q s)/2) over S \ {v}.

theorem dephased_tree_entropy_of_single_constraint
    {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) [DecidableRel T.Adj]
    (q : V → ℝ) (hq : ∀ v : V, q v ∈ Set.Icc (0 : ℝ) 1)
    (S : Finset V) (v : V) (hvS : v ∈ S)
    (hrow : ∀ r : V, r ∉ S → ∀ s ∈ S, T.Adj r s → s = v)
    (hex : ∃ r : V, r ∉ S ∧ T.Adj r v) :
    dephased_tree_entropy T q S = 1 + ∑ s ∈ S.erase v, binaryEntropy ((1 - q s) / 2)
dephased_tree_entropy_zeroIn LeanQuantum Mechanics

For the zero noise profile q = fun _ => 0, the dephased tree entropy of any subset S is equal to the cardinality of S.

theorem dephased_tree_entropy_zero
    {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) [DecidableRel T.Adj] (S : Finset V) :
    dephased_tree_entropy T (fun _ => 0) S = (S.card : ℝ)
dephased_tree_prob_eq_supported_prob_scaledIn LeanQuantum Mechanics

A full-kernel character probability is the corresponding supported-kernel probability scaled by the reciprocal number of character extensions.

theorem dephased_tree_prob_eq_supported_prob_scaled {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (q : V → ℝ) (S : Finset V) (χ : AddChar (tree_submatrix_ker G S) ℝ) : dephased_tree_prob G q S χ = (1 / 2 : ℝ) ^ (tree_submatrix_dim G S - Module.finrank (ZMod 2) (dephased_supported_kernel G q S)) * dephased_supported_prob G q S (dephased_supported_character_restrict G q S χ)
dephased_tree_prob_zeroIn LeanQuantum Mechanics

For the zero noise profile q = fun _ => 0, the dephased tree probability for any subset S and character χ is exactly (1/2)^(tree_submatrix_dim T S).

theorem dephased_tree_prob_zero
    {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) [DecidableRel T.Adj] (S : Finset V)
    (χ : AddChar (tree_submatrix_ker T S) ℝ) :
    dephased_tree_prob T (fun _ => 0) S χ = (1 / 2 : ℝ) ^ (tree_submatrix_dim T S)
dephased_tree_tripartite_info_branch_degree_twoIn LeanQuantum Mechanics

At a degree-two vertex v with neighbours u,w, the tripartite information of the three blocks (branch at w, {v}, branch at u) equals bin((1-q v)/2) - bin((1-q u q w)/2).

theorem dephased_tree_tripartite_info_branch_degree_two
    {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) [DecidableRel T.Adj] (hT : T.IsTree)
    (q : V → ℝ) (hq : ∀ v : V, q v ∈ Set.Icc (0 : ℝ) 1)
    {v u w : V} (hdeg : T.degree v = 2) (hu : T.Adj v u) (hw : T.Adj v w) (huw : u ≠ w)
    (U W : Finset V) (huU : u ∈ U) (hwW : w ∈ W)
    (hvU : v ∉ U) (hvW : v ∉ W) (hdUW : Disjoint U W)
    (hUclos : ∀ x ∈ U, ∀ y : V, T.Adj x y → y ∈ U ∨ y = v)
    (hUuniq : ∀ x ∈ U, T.Adj x v → x = u)
    (hWclos : ∀ x ∈ W, ∀ y : V, T.Adj x y → y ∈ W ∨ y = v)
    (hWuniq : ∀ x ∈ W, T.Adj x v → x = w)
    (hcover : U ∪ W ∪ {v} = Finset.univ) :
    dephased_tree_tripartite_info T q W {v} U =
      binaryEntropy ((1 - q v) / 2) - binaryEntropy ((1 - q u * q w) / 2)
dephased_tree_tripartite_info_branch_high_degreeIn LeanQuantum Mechanics

At a vertex v of degree at least three with two distinct neighbours u,w, the tripartite information of the three blocks ({v}, branch at u, branch at w) equals 1 - bin((1-q u q w)/2).

theorem dephased_tree_tripartite_info_branch_high_degree
    {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) [DecidableRel T.Adj] (hT : T.IsTree)
    (q : V → ℝ) (hq : ∀ v : V, q v ∈ Set.Icc (0 : ℝ) 1)
    {v u w : V} (hdeg : 3 ≤ T.degree v) (hu : T.Adj v u) (hw : T.Adj v w) (huw : u ≠ w)
    (U W : Finset V) (huU : u ∈ U) (hwW : w ∈ W)
    (hvU : v ∉ U) (hvW : v ∉ W) (hdUW : Disjoint U W)
    (hUclos : ∀ x ∈ U, ∀ y : V, T.Adj x y → y ∈ U ∨ y = v)
    (hUuniq : ∀ x ∈ U, T.Adj x v → x = u)
    (hWclos : ∀ x ∈ W, ∀ y : V, T.Adj x y → y ∈ W ∨ y = v)
    (hWuniq : ∀ x ∈ W, T.Adj x v → x = w)
    (hthird : ∃ z : V, z ∉ U ∪ W ∪ {v} ∧ T.Adj v z) :
    dephased_tree_tripartite_info T q {v} U W = 1 - binaryEntropy ((1 - q u * q w) / 2)
exists_claw_of_max_claw_packing_ge_oneIn LeanQuantum Mechanics

If a finite simple graph G satisfies max_claw_packing G ≥ 1, then there exists a finite subset of vertices s : Finset V such that s induces a claw (is_induced_claw G s).

theorem exists_claw_of_max_claw_packing_ge_one
    {V : Type*} [Fintype V] (G : SimpleGraph V) (hclaw : 1 ≤ max_claw_packing G) :
    ∃ s : Finset V, is_induced_claw G s
exists_connected_spanning_subgraph_card_eqIn LeanQuantum Mechanics

A connected finite simple graph has, for every edge count between |V|-1 and |E|, a connected spanning subgraph with exactly that many edges.

theorem exists_connected_spanning_subgraph_card_eq {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (hG : G.Connected) (e : ℕ) (h₁ : Fintype.card V - 1 ≤ e)
    (h₂ : e ≤ Nat.card G.edgeSet) :
    ∃ G' : SimpleGraph V, G' ≤ G ∧ G'.Connected ∧ Nat.card G'.edgeSet = e
exists_connected_triangle_free_graph_on_fin_edge_cardIn LeanQuantum Mechanics

For k ≥ 2 and k−1 ≤ e ≤ ⌊k²/4⌋ there exists a connected triangle-free simple graph on Fin k with exactly e edges.

theorem exists_connected_triangle_free_graph_on_fin_edge_card (k e : ℕ) (hk : 2 ≤ k)
    (h₁ : k - 1 ≤ e) (h₂ : e ≤ k ^ 2 / 4) :
    ∃ G : SimpleGraph (Fin k), G.Connected ∧ G.CliqueFree 3 ∧ Nat.card G.edgeSet = e
exists_even_cycle_matching_and_differing_vectorsIn LeanQuantum Mechanics

For every integer m ≥ 3, there exists a finite field F of characteristic 2 and two injective functions t, s : Fin (2*m) → F taking nonzero values such that the alternating cycle edge weight products differ for t and match for s.

theorem exists_even_cycle_matching_and_differing_vectors (m : ℕ) (hm : 3 ≤ m) :
    ∃ (F : Type) (_ : Field F) (_ : Fintype F) (_ : CharP F 2)
      (t s : Fin (2 * m) → F),
      Function.Injective t ∧ (∀ i, t i ≠ 0) ∧
      Function.Injective s ∧ (∀ i, s i ≠ 0) ∧
      ((∏ i : Fin m, (t ⟨2 * i.val, by omega⟩ + t ⟨2 * i.val + 1, by omega⟩)) ≠
       (∏ i : Fin m, (t ⟨2 * i.val + 1, by omega⟩ + t ⟨(2 * i.val + 2) % (2 * m), Nat.mod_lt _ (by omega)⟩))) ∧
      ((∏ i : Fin m, (s ⟨2 * i.val, by omega⟩ + s ⟨2 * i.val + 1, by omega⟩)) =
       (∏ i : Fin m, (s ⟨2 * i.val + 1, by omega⟩ + s ⟨(2 * i.val + 2) % (2 * m), Nat.mod_lt _ (by omega)⟩)))
exists_field_char_two_six_tuplesIn LeanQuantum Mechanics

There exists a finite field F of characteristic 2 and two injective nonzero 6-tuples t, s : Fin 6 → F whose alternating edge weight products along C_6 differ for t and are equal for s.

theorem exists_field_char_two_six_tuples :
  ∃ (F : Type) (_ : Field F) (_ : Fintype F) (_ : CharP F 2)
    (t s : Fin 6 → F),
    Function.Injective t ∧ (∀ i, t i ≠ 0) ∧
    Function.Injective s ∧ (∀ i, s i ≠ 0) ∧
    ((∏ i : Fin 3, (t ⟨2 * i.val, by omega⟩ + t ⟨2 * i.val + 1, by omega⟩)) ≠
     (∏ i : Fin 3, (t ⟨2 * i.val + 1, by omega⟩ + t ⟨(2 * i.val + 2) % 6, Nat.mod_lt _ (by omega)⟩))) ∧
    ((∏ i : Fin 3, (s ⟨2 * i.val, by omega⟩ + s ⟨2 * i.val + 1, by omega⟩)) =
     (∏ i : Fin 3, (s ⟨2 * i.val + 1, by omega⟩ + s ⟨(2 * i.val + 2) % 6, Nat.mod_lt _ (by omega)⟩)))
exists_fin_representation_expand_coreIn LeanQuantum Mechanics

For k < n, expanding the marked vertex s of a marked core graph (J, s) by n - k independent vertices preserves connectivity and triangle-freeness, has d*n + c edges, and can be represented on Fin n with Q = (n - k)^2 + (Q(J) - 1).

theorem exists_fin_representation_expand_core
    {k d c n : ℕ} (hkn : k < n)
    (J : SimpleGraph (Fin (k + 1))) (s : Fin (k + 1))
    (hJ : is_marked_core_graph k d c J s) :
    ∃ (G : SimpleGraph (Fin n)),
      G.Connected ∧
      G.CliqueFree 3 ∧
      Nat.card G.edgeSet = d * n + c ∧
      graph_state_fisher_q G = (n - k) ^ 2 + (graph_state_fisher_q J - 1) ∧
      Nonempty (G ≃g expand_vertex (W := Fin (n - k)) J s)
f2_real_character_extension_cardIn LeanQuantum Mechanics

The extensions of a real-valued character from a binary subspace form a fiber with two to the codimension elements.

theorem f2_real_character_extension_card {M : Type*} [AddCommGroup M] [Module (ZMod 2) M] [Fintype M] (L : Submodule (ZMod 2) M) (χ : AddChar L ℝ) : Nat.card {ψ : AddChar M ℝ // ∀ x : L, ψ x.1 = χ x} = 2 ^ (Module.finrank (ZMod 2) M - Module.finrank (ZMod 2) L)
false_twin_not_adjacentIn LeanQuantum Mechanics

Two vertices of a simple graph with the same neighbour finset are not adjacent (fibres of the neighbour map are independent sets).

theorem false_twin_not_adjacent {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {u v : V}
    (h : G.neighborFinset u = G.neighborFinset v) : ¬ G.Adj u v
four_partition_empty_tripartite_info_zeroIn LeanQuantum Mechanics

For any simple graph G and four-partition A, B, C, D of its vertices, if any part is empty, the cut ranks in tree_graph_state_tripartite_info cancel pairwise by complement symmetry (simple_graph_cut_rank_compl) and cut rank of empty set being zero, resulting in 0.

theorem four_partition_empty_tripartite_info_zero {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (A B C D : Finset V)
    (hpart : is_four_partition A B C D) (hempty : A = ∅ ∨ B = ∅ ∨ C = ∅ ∨ D = ∅) :
    tree_graph_state_tripartite_info G A B C D = 0
graph_state_fisher_deficit_three_halves_lower_boundIn LeanQuantum Mechanics

The deficit n² - Q_max(n, ⌊3n/2⌋) is at least 2√2·n^(3/2) minus a linear error, for all large n.

theorem graph_state_fisher_deficit_three_halves_lower_bound :
    ∃ C : ℝ, ∀ᶠ (n : ℕ) in Filter.atTop,
      2 * Real.sqrt 2 * (n : ℝ) ^ (3 / 2 : ℝ) - C * (n : ℝ) ≤
        (n : ℝ) ^ 2 - (graph_state_max_fisher_info n ⌊(3 / 2 : ℝ) * (n : ℝ)⌋₊ : ℝ)
graph_state_fisher_deficit_three_halves_upper_boundIn LeanQuantum Mechanics

The deficit n² - Q_max(n, ⌊3n/2⌋) is at most 2√2·n^(3/2) plus a linear error, for all large n.

theorem graph_state_fisher_deficit_three_halves_upper_bound :
    ∃ C : ℝ, ∀ᶠ (n : ℕ) in Filter.atTop,
      (n : ℝ) ^ 2 - (graph_state_max_fisher_info n ⌊(3 / 2 : ℝ) * (n : ℝ)⌋₊ : ℝ) ≤
        2 * Real.sqrt 2 * (n : ℝ) ^ (3 / 2 : ℝ) + C * (n : ℝ)
graph_state_fisher_info_eq_sum_fiber_sqIn LeanQuantum Mechanics

For any finite simple graph G, its graph-state Fisher information equals the sum over all distinct neighbor finsets s of the square of the size of the fiber {v | G.neighborFinset v = s}.

theorem graph_state_fisher_info_eq_sum_fiber_sq {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] :
    graph_state_fisher_info G =
      ∑ s ∈ Finset.univ.image (fun v => G.neighborFinset v),
        (Finset.univ.filter (fun v => G.neighborFinset v = s)).card ^ 2
graph_state_fisher_info_ge_cardIn LeanQuantum Mechanics

For any finite simple graph G on vertex type V, the collective-X quantum Fisher information graph_state_fisher_info G is at least Fintype.card V.

theorem graph_state_fisher_info_ge_card {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] :
    Fintype.card V ≤ graph_state_fisher_info G
graph_state_fisher_info_le_sqIn LeanQuantum Mechanics

For any finite simple graph G on vertex type V, the collective-X quantum Fisher information graph_state_fisher_info G is at most (Fintype.card V)^2.

theorem graph_state_fisher_info_le_sq {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] :
    graph_state_fisher_info G ≤ (Fintype.card V) ^ 2
inhomogeneous_dephased_path_local_noise_criterion_implies_mmiIn LeanQuantum Mechanics

For n ≥ 3 and q : Fin n → [0, 1], if q satisfies the local noise criterion dephased_path_local_noise_criterion n q, then dephased_path_tripartite_info n q A B C ≤ 0 for all pairwise disjoint triples A, B, C.

theorem inhomogeneous_dephased_path_local_noise_criterion_implies_mmi
    (n : ℕ) (hn : 3 ≤ n) (q : Fin n → ℝ) (hq : ∀ i : Fin n, q i ∈ Set.Icc (0 : ℝ) 1) :
    dephased_path_local_noise_criterion n q →
    ∀ A B C : Finset (Fin n), Disjoint A B → Disjoint A C → Disjoint B C →
      dephased_path_tripartite_info n q A B C ≤ 0
inhomogeneous_dephased_path_mmi_implies_local_noise_criterionIn LeanQuantum Mechanics

For n ≥ 3 and q : Fin n → [0, 1], if dephased_path_tripartite_info n q A B C ≤ 0 for all pairwise disjoint triples A, B, C, then q satisfies the local noise criterion dephased_path_local_noise_criterion n q.

theorem inhomogeneous_dephased_path_mmi_implies_local_noise_criterion
    (n : ℕ) (hn : 3 ≤ n) (q : Fin n → ℝ) (hq : ∀ i : Fin n, q i ∈ Set.Icc (0 : ℝ) 1) :
    (∀ A B C : Finset (Fin n), Disjoint A B → Disjoint A C → Disjoint B C →
      dephased_path_tripartite_info n q A B C ≤ 0) →
    dephased_path_local_noise_criterion n q
is_induced_claw_of_tree_three_neighborsIn LeanQuantum Mechanics

In a tree T, a vertex v together with three distinct neighbours a, b, c spans an induced claw: the induced subgraph on {v,a,b,c} is isomorphic to K_{1,3}.

theorem is_induced_claw_of_tree_three_neighbors {V : Type*} [DecidableEq V]
    (T : SimpleGraph V) (hT : T.IsTree) {v a b c : V}
    (ha : T.Adj v a) (hb : T.Adj v b) (hc : T.Adj v c)
    (hab : a ≠ b) (hac : a ≠ c) (hbc : b ≠ c) :
    is_induced_claw T ({v, a, b, c} : Finset V)
ising_amplitude_scalar_eightIn LeanQuantum Mechanics

The eighth power of the normalisation constant 1/√(2^n) of the Ising graph state is 1/16^n.

theorem ising_amplitude_scalar_eight (n : ℕ) :
    ((1 / Real.sqrt (2 ^ n : ℝ) : ℝ) : ℂ) ^ 8 = 1 / (16 ^ n : ℂ)
ising_diff_addIn LeanQuantum Mechanics

For bitstrings x, y : Fin n → Fin 2 and vertices u, v, the difference bit of x + y at (u,v) is the sum in Fin 2 of the difference bits of x and of y at (u,v).

theorem ising_diff_add {n : ℕ} (x y : Fin n → Fin 2) (u v : Fin n) :
    (if (x + y) u = (x + y) v then (0:Fin 2) else 1) =
      (if x u = x v then (0:Fin 2) else 1) + (if y u = y v then (0:Fin 2) else 1)
ising_edge_prod_replica_weight_eq_spin_weightIn LeanQuantum Mechanics

For every graph G, edge angle function θ and bitstrings a, x1, x2, x3, the product over the edges of the four-replica edge weight evaluated at the difference pattern of (a,x1,x2,x3) equals the product over the edges of the sixteen-spin edge weight evaluated at the transformed pattern (d₃, d₂+d₃, d₁+d₃, d₀).

open scoped BigOperators Classical in
theorem ising_edge_prod_replica_weight_eq_spin_weight (n : ℕ) (G : SimpleGraph (Fin n))
    [DecidableRel G.Adj] (θ : Sym2 (Fin n) → ℝ) (a x1 x2 x3 : Fin n → Fin 2) :
    (∏ e ∈ G.edgeFinset,
        ising_replica_edge_weight (θ e) (Sym2.lift ⟨fun u v =>
          ![if a u = a v then (0:Fin 2) else 1, if x1 u = x1 v then (0:Fin 2) else 1,
            if x2 u = x2 v then (0:Fin 2) else 1, if x3 u = x3 v then (0:Fin 2) else 1],
          fun u v => by funext i; fin_cases i <;> simp [eq_comm]⟩ e))
      = ∏ e ∈ G.edgeFinset,
        sixteen_spin_weight (θ e) (Sym2.lift ⟨fun u v =>
          ![if x3 u = x3 v then (0:Fin 2) else 1,
            (if x2 u = x2 v then (0:Fin 2) else 1) + (if x3 u = x3 v then (0:Fin 2) else 1),
            (if x1 u = x1 v then (0:Fin 2) else 1) + (if x3 u = x3 v then (0:Fin 2) else 1),
            if a u = a v then (0:Fin 2) else 1],
          fun u v => by funext i; fin_cases i <;> simp [eq_comm]⟩ e)
ising_eight_fold_product_eq_edge_prodIn LeanQuantum Mechanics

For every graph G, edge angle function θ and bitstrings a, x1, x2, x3 with x4 = x1+x2+x3, the product of the eight amplitudes conj ψ(x1), ψ(x1+a), ψ(x2), conj ψ(x2+a), conj ψ(x3), ψ(x3+a), ψ(x4), conj ψ(x4+a) equals (1/16^n) times the product over the edges of the four-replica edge weight evaluated at the four difference bits of (a,x1,x2,x3) at that edge.

open scoped BigOperators Classical in
theorem ising_eight_fold_product_eq_edge_prod (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj]
    (θ : Sym2 (Fin n) → ℝ) (a x1 x2 x3 : Fin n → Fin 2) :
    (let x4 : Fin n → Fin 2 := fun v => x1 v + x2 v + x3 v
     starRingEnd ℂ ((ising_graph_state n G θ) x1) * (ising_graph_state n G θ) (fun v => x1 v + a v) *
     (ising_graph_state n G θ) x2 * starRingEnd ℂ ((ising_graph_state n G θ) (fun v => x2 v + a v)) *
     starRingEnd ℂ ((ising_graph_state n G θ) x3) * (ising_graph_state n G θ) (fun v => x3 v + a v) *
     (ising_graph_state n G θ) x4 * starRingEnd ℂ ((ising_graph_state n G θ) (fun v => x4 v + a v)))
    = (1 / (16 ^ n : ℂ)) * ∏ e ∈ G.edgeFinset,
        ising_replica_edge_weight (θ e) (Sym2.lift ⟨fun u v =>
          ![if a u = a v then (0:Fin 2) else 1, if x1 u = x1 v then (0:Fin 2) else 1,
            if x2 u = x2 v then (0:Fin 2) else 1, if x3 u = x3 v then (0:Fin 2) else 1],
          fun u v => by funext i; fin_cases i <;> simp [eq_comm]⟩ e)
ising_eight_fold_product_exp_formIn LeanQuantum Mechanics

For every graph G, edge angle function θ and bitstrings a, x1, x2, x3 with x4 = x1+x2+x3, the product of the eight amplitudes conj ψ(x1), ψ(x1+a), ψ(x2), conj ψ(x2+a), conj ψ(x3), ψ(x3+a), ψ(x4), conj ψ(x4+a) equals (1/16^n) exp(i ∑_{e ∈ E} θ_e (1-δ_e)(s¹_e - s²_e + s³_e - s¹_e s²_e s³_e)), where δ_e, s¹_e, s²_e, s³_e are the ±1 agreement signs of a, x1, x2, x3 at the endpoints of e.

open scoped BigOperators Classical in
theorem ising_eight_fold_product_exp_form (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj]
    (θ : Sym2 (Fin n) → ℝ) (a x1 x2 x3 : Fin n → Fin 2) :
    (let x4 : Fin n → Fin 2 := fun v => x1 v + x2 v + x3 v
     starRingEnd ℂ ((ising_graph_state n G θ) x1) * (ising_graph_state n G θ) (fun v => x1 v + a v) *
     (ising_graph_state n G θ) x2 * starRingEnd ℂ ((ising_graph_state n G θ) (fun v => x2 v + a v)) *
     starRingEnd ℂ ((ising_graph_state n G θ) x3) * (ising_graph_state n G θ) (fun v => x3 v + a v) *
     (ising_graph_state n G θ) x4 * starRingEnd ℂ ((ising_graph_state n G θ) (fun v => x4 v + a v)))
    = (1 / (16 ^ n : ℂ)) * Complex.exp (Complex.I * (∑ e ∈ G.edgeFinset,
        ((θ e : ℂ) * Sym2.lift ⟨fun u v =>
          (1 - (if a u = a v then (1:ℝ) else -1)) *
            ((if x1 u = x1 v then (1:ℝ) else -1) - (if x2 u = x2 v then (1:ℝ) else -1) +
             (if x3 u = x3 v then (1:ℝ) else -1) - (if x1 u = x1 v then (1:ℝ) else -1) *
               (if x2 u = x2 v then (1:ℝ) else -1) * (if x3 u = x3 v then (1:ℝ) else -1)),
          fun u v => by simp [eq_comm]⟩ e)))
ising_four_replica_edge_sum_eq_partition_fnIn LeanQuantum Mechanics

(1/16^n) times the sum over all (a,x1,x2,x3) of the product over the edges of the sixteen-spin edge weight evaluated at the transformed pattern (d₃, d₂+d₃, d₁+d₃, d₀) equals the sixteen-spin partition function of G at θ.

open scoped BigOperators Classical in
theorem ising_four_replica_edge_sum_eq_partition_fn (n : ℕ) (G : SimpleGraph (Fin n))
    [DecidableRel G.Adj] (θ : Sym2 (Fin n) → ℝ) :
    (1 / (16 ^ n : ℂ)) * (∑ a : Fin n → Fin 2, ∑ x1 : Fin n → Fin 2,
        ∑ x2 : Fin n → Fin 2, ∑ x3 : Fin n → Fin 2,
        ∏ e ∈ G.edgeFinset,
        sixteen_spin_weight (θ e) (Sym2.lift ⟨fun u v =>
          ![if x3 u = x3 v then (0:Fin 2) else 1,
            (if x2 u = x2 v then (0:Fin 2) else 1) + (if x3 u = x3 v then (0:Fin 2) else 1),
            (if x1 u = x1 v then (0:Fin 2) else 1) + (if x3 u = x3 v then (0:Fin 2) else 1),
            if a u = a v then (0:Fin 2) else 1],
          fun u v => by funext i; fin_cases i <;> simp [eq_comm]⟩ e))
      = sixteen_spin_partition_fn G θ
ising_four_replica_sum_reindexIn LeanQuantum Mechanics

Summing an arbitrary function of four bitstrings a, x1, x2, x3 over all of them is the same as summing over all spin configurations s : Fin n → Fin 4 → Fin 2 the function evaluated at a = s(-)(3), x1 = s(-)(2) + s(-)(0), x2 = s(-)(1) + s(-)(0), x3 = s(-)(0).

open scoped BigOperators Classical in
theorem ising_four_replica_sum_reindex (n : ℕ)
    (F : (Fin n → Fin 2) → (Fin n → Fin 2) → (Fin n → Fin 2) → (Fin n → Fin 2) → ℂ) :
    (∑ a : Fin n → Fin 2, ∑ x1 : Fin n → Fin 2, ∑ x2 : Fin n → Fin 2, ∑ x3 : Fin n → Fin 2,
        F a x1 x2 x3)
      = ∑ s : Fin n → Fin 4 → Fin 2,
          F (fun v => s v 3) (fun v => s v 2 + s v 0) (fun v => s v 1 + s v 0) (fun v => s v 0)
ising_graph_state_applyIn LeanQuantum Mechanics

Evaluating the Ising graph state on a computational basis bitstring x gives (1/√(2^n)) exp(-i ∑_{e ∈ E} θ_e σ_x(e)), where σ_x(e) is +1 if the two endpoints of e carry equal bits in x and -1 otherwise, applied through Sym2.lift.

theorem ising_graph_state_apply (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj]
    (θ : Sym2 (Fin n) → ℝ) (x : Fin n → Fin 2) :
    (ising_graph_state n G θ) x = (1 / Real.sqrt (2 ^ n : ℝ) : ℂ) *
      Complex.exp (- Complex.I * ∑ e ∈ G.edgeFinset,
        ((θ e : ℂ) * Sym2.lift ⟨fun u v => if x u = x v then (1 : ℂ) else (-1 : ℂ),
          fun u v => by simp [eq_comm]⟩ e))
ising_graph_state_conjIn LeanQuantum Mechanics

Conjugating the amplitude of the Ising graph state on a bitstring x gives (1/√(2^n)) exp(+i ∑_{e ∈ E} θ_e σ_x(e)), the exponential of the edge phase with the sign flipped.

theorem ising_graph_state_conj (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj]
    (θ : Sym2 (Fin n) → ℝ) (x : Fin n → Fin 2) :
    starRingEnd ℂ ((ising_graph_state n G θ) x) = (1 / Real.sqrt (2 ^ n : ℝ) : ℂ) *
      Complex.exp (Complex.I * ∑ e ∈ G.edgeFinset,
        ((θ e : ℂ) * Sym2.lift ⟨fun u v => if x u = x v then (1 : ℂ) else (-1 : ℂ),
          fun u v => by simp [eq_comm]⟩ e))
ising_graph_state_four_replica_sum_eq_sixteen_spin_partition_fnIn LeanQuantum Mechanics

For every simple graph G on Fin n and edge angle function θ, the 4-replica correlation sum of ising_graph_state n G θ factors edge-by-edge over G.edgeFinset and equals sixteen_spin_partition_fn G θ.

open scoped BigOperators Classical in
theorem ising_graph_state_four_replica_sum_eq_sixteen_spin_partition_fn (n : ℕ)
    (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (θ : Sym2 (Fin n) → ℝ) :
    (∑ a : Fin n → Fin 2,
     ∑ x1 : Fin n → Fin 2,
     ∑ x2 : Fin n → Fin 2,
     ∑ x3 : Fin n → Fin 2,
       let x4 : Fin n → Fin 2 := fun v => x1 v + x2 v + x3 v
       starRingEnd ℂ ((ising_graph_state n G θ) x1) * (ising_graph_state n G θ) (fun v => x1 v + a v) *
       (ising_graph_state n G θ) x2 * starRingEnd ℂ ((ising_graph_state n G θ) (fun v => x2 v + a v)) *
       starRingEnd ℂ ((ising_graph_state n G θ) x3) * (ising_graph_state n G θ) (fun v => x3 v + a v) *
       (ising_graph_state n G θ) x4 * starRingEnd ℂ ((ising_graph_state n G θ) (fun v => x4 v + a v))) =
    sixteen_spin_partition_fn G θ
ising_replica_edge_weight_eq_sixteen_spin_weightIn LeanQuantum Mechanics

For every angle θ and every difference pattern d in (Fin 2)^4, the four-replica edge weight exp(i θ (1-δ)(s₁-s₂+s₃-s₁s₂s₃)) equals the sixteen-spin edge weight of the transformed pattern (d₃, d₂+d₃, d₁+d₃, d₀). This is the crux local identity: 96 of the 20160 matrices in GL(4,F2) work, and this one is the cleanest.

theorem ising_replica_edge_weight_eq_sixteen_spin_weight (θ : ℝ) (d : Fin 4 → Fin 2) :
    ising_replica_edge_weight θ d = sixteen_spin_weight θ ![d 3, d 2 + d 3, d 1 + d 3, d 0]
ising_replica_edge_weight_sanityIn LeanQuantum Mechanics

The replica edge weight is 1 whenever the a-replica pair agrees at the endpoints, and it equals exp(-8 i θ) on the difference pattern (1,1,0,1); so the weight is neither constantly 1 nor vacuous.

theorem ising_replica_edge_weight_sanity (θ : ℝ) :
    ising_replica_edge_weight θ (fun _ => 0) = 1 ∧
      ising_replica_edge_weight θ ![1, 1, 0, 1] = Complex.exp (-8 * Complex.I * θ)
ising_signed_agree_addIn LeanQuantum Mechanics

For bitstrings x, y : Fin n → Fin 2 and vertices u, v, the agreement sign ±1 of x + y (pointwise mod-2 addition) at the pair (u,v) is the product of the agreement signs of x and of y at (u,v).

theorem ising_signed_agree_add {n : ℕ} (x y : Fin n → Fin 2) (u v : Fin n) :
    (if (x + y) u = (x + y) v then (1:ℝ) else -1) =
      (if x u = x v then (1:ℝ) else -1) * (if y u = y v then (1:ℝ) else -1)
ladder_graph_state_tripartite_info_lower_bound_base_largeIn LeanQuantum Mechanics

For 6 ≤ n ≤ 10 the witness colouring attains tripartite information floor((n-2)/3).

theorem ladder_graph_state_tripartite_info_lower_bound_base_large (n : ℕ) (h6 : 6 ≤ n) (h10 : n ≤ 10) :
    tree_graph_state_tripartite_info (SimpleGraph.pathGraph n □ SimpleGraph.completeGraph (Fin 2))
      (ladder_graph_state_tripartite_info_lower_bound_part n 0)
      (ladder_graph_state_tripartite_info_lower_bound_part n 1)
      (ladder_graph_state_tripartite_info_lower_bound_part n 2)
      (ladder_graph_state_tripartite_info_lower_bound_part n 3) = (((n - 2) / 3 : ℕ) : ℤ)
ladder_graph_state_tripartite_info_lower_bound_base_smallIn LeanQuantum Mechanics

For 2 ≤ n ≤ 5 the witness colouring attains tripartite information floor((n-2)/3).

theorem ladder_graph_state_tripartite_info_lower_bound_base_small (n : ℕ) (h2 : 2 ≤ n) (h5 : n ≤ 5) :
    tree_graph_state_tripartite_info (SimpleGraph.pathGraph n □ SimpleGraph.completeGraph (Fin 2))
      (ladder_graph_state_tripartite_info_lower_bound_part n 0)
      (ladder_graph_state_tripartite_info_lower_bound_part n 1)
      (ladder_graph_state_tripartite_info_lower_bound_part n 2)
      (ladder_graph_state_tripartite_info_lower_bound_part n 3) = (((n - 2) / 3 : ℕ) : ℤ)
ladder_graph_state_tripartite_info_lower_bound_formulaIn LeanQuantum Mechanics

For every n ≥ 2 the witness four-partition attains tree_graph_state_tripartite_info = floor((n-2)/3).

theorem ladder_graph_state_tripartite_info_lower_bound_formula (n : ℕ) (hn : 2 ≤ n) :
    tree_graph_state_tripartite_info (SimpleGraph.pathGraph n □ SimpleGraph.completeGraph (Fin 2))
      (ladder_graph_state_tripartite_info_lower_bound_part n 0)
      (ladder_graph_state_tripartite_info_lower_bound_part n 1)
      (ladder_graph_state_tripartite_info_lower_bound_part n 2)
      (ladder_graph_state_tripartite_info_lower_bound_part n 3) = (((n - 2) / 3 : ℕ) : ℤ)
ladder_graph_state_tripartite_info_lower_bound_partitionIn LeanQuantum Mechanics

The four colour classes of the witness colouring are pairwise disjoint and cover all vertices of the 2-by-n ladder.

theorem ladder_graph_state_tripartite_info_lower_bound_partition (n : ℕ) :
    is_four_partition (ladder_graph_state_tripartite_info_lower_bound_part n 0)
      (ladder_graph_state_tripartite_info_lower_bound_part n 1)
      (ladder_graph_state_tripartite_info_lower_bound_part n 2)
      (ladder_graph_state_tripartite_info_lower_bound_part n 3)
ladder_graph_state_tripartite_info_lower_bound_stepIn LeanQuantum Mechanics

For the witness colouring, each of the seven relevant cut ranks on the (n+9)-ladder equals the corresponding rank on the n-ladder plus 5, 5, 5, 3, 5, 5, 5 respectively.

theorem ladder_graph_state_tripartite_info_lower_bound_step (n : ℕ) (hn : 2 ≤ n) :
  (simple_graph_cut_rank (SimpleGraph.pathGraph (n + 9) □ SimpleGraph.completeGraph (Fin 2))
      (ladder_graph_state_tripartite_info_lower_bound_part (n + 9) 0)
    = simple_graph_cut_rank (SimpleGraph.pathGraph n □ SimpleGraph.completeGraph (Fin 2))
      (ladder_graph_state_tripartite_info_lower_bound_part n 0) + 5) ∧
  (simple_graph_cut_rank (SimpleGraph.pathGraph (n + 9) □ SimpleGraph.completeGraph (Fin 2))
      (ladder_graph_state_tripartite_info_lower_bound_part (n + 9) 1)
    = simple_graph_cut_rank (SimpleGraph.pathGraph n □ SimpleGraph.completeGraph (Fin 2))
      (ladder_graph_state_tripartite_info_lower_bound_part n 1) + 5) ∧
  (simple_graph_cut_rank (SimpleGraph.pathGraph (n + 9) □ SimpleGraph.completeGraph (Fin 2))
      (ladder_graph_state_tripartite_info_lower_bound_part (n + 9) 2)
    = simple_graph_cut_rank (SimpleGraph.pathGraph n □ SimpleGraph.completeGraph (Fin 2))
      (ladder_graph_state_tripartite_info_lower_bound_part n 2) + 5) ∧
  (simple_graph_cut_rank (SimpleGraph.pathGraph (n + 9) □ SimpleGraph.completeGraph (Fin 2))
      (ladder_graph_state_tripartite_info_lower_bound_part (n + 9) 3)
    = simple_graph_cut_rank (SimpleGraph.pathGraph n □ SimpleGraph.completeGraph (Fin 2))
      (ladder_graph_state_tripartite_info_lower_bound_part n 3) + 3) ∧
  (simple_graph_cut_rank (SimpleGraph.pathGraph (n + 9) □ SimpleGraph.completeGraph (Fin 2))
      (ladder_graph_state_tripartite_info_lower_bound_part (n + 9) 0 ∪
        ladder_graph_state_tripartite_info_lower_bound_part (n + 9) 1)
    = simple_graph_cut_rank (SimpleGraph.pathGraph n □ SimpleGraph.completeGraph (Fin 2))
      (ladder_graph_state_tripartite_info_lower_bound_part n 0 ∪
        ladder_graph_state_tripartite_info_lower_bound_part n 1) + 5) ∧
  (simple_graph_cut_rank (SimpleGraph.pathGraph (n + 9) □ SimpleGraph.completeGraph (Fin 2))
      (ladder_graph_state_tripartite_info_lower_bound_part (n + 9) 0 ∪
        ladder_graph_state_tripartite_info_lower_bound_part (n + 9) 2)
    = simple_graph_cut_rank (SimpleGraph.pathGraph n □ SimpleGraph.completeGraph (Fin 2))
      (ladder_graph_state_tripartite_info_lower_bound_part n 0 ∪
        ladder_graph_state_tripartite_info_lower_bound_part n 2) + 5) ∧
  (simple_graph_cut_rank (SimpleGraph.pathGraph (n + 9) □ SimpleGraph.completeGraph (Fin 2))
      (ladder_graph_state_tripartite_info_lower_bound_part (n + 9) 1 ∪
        ladder_graph_state_tripartite_info_lower_bound_part (n + 9) 2)
    = simple_graph_cut_rank (SimpleGraph.pathGraph n □ SimpleGraph.completeGraph (Fin 2))
      (ladder_graph_state_tripartite_info_lower_bound_part n 1 ∪
        ladder_graph_state_tripartite_info_lower_bound_part n 2) + 5)
matrix_cfc_eq_affine_of_spectrum_subsetIn LeanQuantum Mechanics

If a real symmetric matrix X has spectrum contained in the two-point set {l1, l2} with l1 ≠ l2, then for every f : ℝ → ℝ its continuous functional calculus is the affine function of X that interpolates f at l1 and l2: cfc f X = ((f l1 − f l2)/(l1 − l2)) • X + ((l1·f l2 − l2·f l1)/(l1 − l2)) • 1.

theorem matrix_cfc_eq_affine_of_spectrum_subset {n : Type*} [Fintype n] [DecidableEq n]
    (f : ℝ → ℝ) (X : Matrix n n ℝ) (hX : X.IsSymm) (l1 l2 : ℝ) (hne : l1 ≠ l2)
    (hsp : spectrum ℝ X ⊆ {l1, l2}) :
    cfc f X = ((f l1 - f l2) / (l1 - l2)) • X + ((l1 * f l2 - l2 * f l1) / (l1 - l2)) • 1
matrix_charpoly_eq_of_trace_pow_eqIn LeanQuantum Mechanics

Two complex square matrices of the same size whose power traces agree for all 1 ≤ k ≤ size have the same characteristic polynomial.

theorem matrix_charpoly_eq_of_trace_pow_eq {ι κ : Type*} [Fintype ι] [DecidableEq ι] [Fintype κ] [DecidableEq κ] (hcard : Fintype.card ι = Fintype.card κ) (M : Matrix ι ι ℂ) (N : Matrix κ κ ℂ) (h : ∀ k : ℕ, 1 ≤ k → k ≤ Fintype.card ι → Matrix.trace (M ^ k) = Matrix.trace (N ^ k)) : Matrix.charpoly M = Matrix.charpoly N
matrix_le_rank_of_submatrix_det_ne_zeroIn LeanQuantum Mechanics

For any matrix M over ZMod 2 and any square submatrix of size k, if the determinant of the submatrix is nonzero, then the rank of M is at least k.

theorem matrix_le_rank_of_submatrix_det_ne_zero {α β : Type*} [Fintype α] [Fintype β]
    [DecidableEq α] [DecidableEq β] {k : ℕ} (M : Matrix α β (ZMod 2))
    (r : Fin k → α) (c : Fin k → β) (h : (M.submatrix r c).det ≠ 0) : k ≤ M.rank
matrix_rank_eq_of_factorization_and_minorIn LeanQuantum Mechanics

If M = A * B where A has k columns and B has k rows, and some k×k submatrix of M (rows r, columns c) has nonzero determinant over a field, then the rank of M is k.

theorem matrix_rank_eq_of_factorization_and_minor {m n : Type*} [Fintype m] [Fintype n]
    {K : Type*} [Field K] (M : Matrix m n K) (k : ℕ)
    (A : Matrix m (Fin k) K) (B : Matrix (Fin k) n K) (hAB : M = A * B)
    (r : Fin k → m) (c : Fin k → n) (hdet : (M.submatrix r c).det ≠ 0) :
    M.rank = k
matrix_rank_le_of_factorIn LeanQuantum Mechanics

For any matrix M over ZMod 2, if M factors as U * V with inner dimension k, then the rank of M is at most k.

theorem matrix_rank_le_of_factor {α β : Type*} [Fintype α] [Fintype β] [DecidableEq α] [DecidableEq β]
    {k : ℕ} (M : Matrix α β (ZMod 2)) (U : Matrix α (Fin k) (ZMod 2)) (V : Matrix (Fin k) β (ZMod 2))
    (h : M = U * V) : M.rank ≤ k
matrix_rank_submatrix_leIn LeanQuantum Mechanics

For any matrix M over ZMod 2 and any row/column index maps, the rank of the submatrix is at most the rank of M.

theorem matrix_rank_submatrix_le {α β l o : Type*} [Fintype α] [Fintype β] [Fintype l] [Fintype o]
    [DecidableEq α] [DecidableEq β] [DecidableEq l] [DecidableEq o]
    (M : Matrix α β (ZMod 2)) (r : l → α) (c : o → β) :
    (M.submatrix r c).rank ≤ M.rank
matrix_trace_pow_kroneckerIn LeanQuantum Mechanics

For square matrices A (indexed by ι) and B (indexed by κ) over ℂ and every k, the trace of the k-th power of Matrix.kronecker A B equals the product of the k-th power traces: tr((A ⊗ B)^k) = tr(A^k) * tr(B^k).

theorem matrix_trace_pow_kronecker {ι κ : Type*} [Fintype ι] [DecidableEq ι] [Fintype κ] [DecidableEq κ] (A : Matrix ι ι ℂ) (B : Matrix κ κ ℂ) (k : ℕ) : Matrix.trace ((Matrix.kronecker A B) ^ k) = Matrix.trace (A ^ k) * Matrix.trace (B ^ k)
max_claw_packing_monoIn LeanQuantum Mechanics

If every induced claw of G is an induced claw of H, then max_claw_packing G is at most max_claw_packing H.

theorem max_claw_packing_mono {V : Type*} [Fintype V]
    (G H : SimpleGraph V)
    (h : ∀ s : Finset V, is_induced_claw G s → is_induced_claw H s) :
    max_claw_packing G ≤ max_claw_packing H
multipartite_color_cut_alt_sum_le_two_mul_halfIn LeanQuantum Mechanics

For any finite family of nonempty colour sets T i on four colours, the alternating seven-term sum of multipartite_upper_bound_color_cut at {0},{1},{2},{3} minus {0,1},{0,2},{1,2} is at most 2 * floor(|ι| / 2).

theorem multipartite_color_cut_alt_sum_le_two_mul_half {ι : Type*} [Fintype ι]
    (T : ι → Finset (Fin 4)) (hne : ∀ i, (T i).Nonempty) :
    multipartite_upper_bound_color_cut T ({0} : Finset (Fin 4))
        + multipartite_upper_bound_color_cut T {1}
        + multipartite_upper_bound_color_cut T {2}
        + multipartite_upper_bound_color_cut T {3}
      - multipartite_upper_bound_color_cut T {0, 1}
      - multipartite_upper_bound_color_cut T {0, 2}
      - multipartite_upper_bound_color_cut T {1, 2}
      ≤ 2 * (((Fintype.card ι) / 2 : ℕ) : ℤ)
multipartite_exists_coloring_tripartite_info_geIn LeanQuantum Mechanics

For any complete multipartite graph with nonempty parts, there exists a four-coloring achieving tripartite information at least 2 * (a / 2), where a is the number of parts of size at least 4.

theorem multipartite_exists_coloring_tripartite_info_ge
    {ι : Type*} [Fintype ι] [DecidableEq ι]
    (V : ι → Type*) [∀ i, Fintype (V i)] [∀ i, DecidableEq (V i)] [∀ i, Nonempty (V i)] :
    ∃ c : ((i : ι) × V i) → Fin 4,
      2 * ((complete_multipartite_num_large_parts V / 2 : ℕ) : ℤ) ≤
        tree_graph_state_tripartite_info (SimpleGraph.completeMultipartiteGraph (V := V))
          (Finset.univ.filter (fun v => c v = 0))
          (Finset.univ.filter (fun v => c v = 1))
          (Finset.univ.filter (fun v => c v = 2))
          (Finset.univ.filter (fun v => c v = 3))
multipartite_graph_state_tripartite_info_four_uniformIn LeanQuantum Mechanics

For any natural number a, the complete multipartite graph with a parts each of size 4 achieves maximum tripartite information equal to 2 * (a / 2).

theorem multipartite_graph_state_tripartite_info_four_uniform (a : ℕ) :
    simple_graph_max_tripartite_info
      (SimpleGraph.completeMultipartiteGraph (fun _ : Fin a => Fin 4)) =
      2 * ((a / 2 : ℕ) : ℤ)
multipartite_graph_state_tripartite_info_lower_sharpIn LeanQuantum Mechanics

For every natural number a, there exists a complete multipartite graph with a parts of size at least 4 achieving maximum tripartite information equal to 2 * (a / 2).

theorem multipartite_graph_state_tripartite_info_lower_sharp (a : ℕ) :
    ∃ (ι : Type) (_ : Fintype ι) (_ : DecidableEq ι)
      (V : ι → Type) (_ : ∀ i, Fintype (V i)) (_ : ∀ i, DecidableEq (V i)) (_ : ∀ i, Nonempty (V i)),
      complete_multipartite_num_large_parts V = a ∧
      simple_graph_max_tripartite_info (SimpleGraph.completeMultipartiteGraph V) =
        2 * ((a / 2 : ℕ) : ℤ)
multipartite_sharp_even_config_valueIn LeanQuantum Mechanics

For even a, the colour-set family consisting of a parts carrying all four colours, two copies of the 3-element colour set {0,1,2} and one copy each of {0,1,3}, {0,2,3}, {1,2,3} has alternating seven-term colour-cut sum exactly a + 3.

theorem multipartite_sharp_even_config_value (a : ℕ) (ha : a % 2 = 0) :
    let T : (Fin a ⊕ Fin 5) → Finset (Fin 4) :=
      fun i => match i with
        | Sum.inl _ => Finset.univ
        | Sum.inr j => if j = 0 then ({0,1,2} : Finset (Fin 4)) else if j = 1 then {0,1,2}
                        else if j = 2 then {0,1,3} else if j = 3 then {0,2,3} else {1,2,3}
    multipartite_upper_bound_color_cut T ({0} : Finset (Fin 4)) + multipartite_upper_bound_color_cut T {1} +
      multipartite_upper_bound_color_cut T {2} + multipartite_upper_bound_color_cut T {3} -
      multipartite_upper_bound_color_cut T {0,1} - multipartite_upper_bound_color_cut T {0,2} -
      multipartite_upper_bound_color_cut T {1,2} = (a : ℤ) + 3
multipartite_sharp_lower_boundIn LeanQuantum Mechanics

For every natural number a there is a finite complete multipartite graph with nonempty parts, exactly a of size at least 4, carrying a four-colouring whose tripartite information equals a + 3.

theorem multipartite_sharp_lower_bound (a : ℕ) :
    ∃ (ι : Type) (_ : Fintype ι) (_ : DecidableEq ι)
      (V : ι → Type) (_ : ∀ i, Fintype (V i)) (_ : ∀ i, DecidableEq (V i)) (_ : ∀ i, Nonempty (V i)),
      complete_multipartite_num_large_parts V = a ∧
      ∃ c : (Σ i, V i) → Fin 4,
        tree_graph_state_tripartite_info (SimpleGraph.completeMultipartiteGraph V)
            (multipartite_upper_bound_color_class V c {0})
            (multipartite_upper_bound_color_class V c {1})
            (multipartite_upper_bound_color_class V c {2})
            (multipartite_upper_bound_color_class V c {3}) = (a : ℤ) + 3
multipartite_sharp_odd_config_valueIn LeanQuantum Mechanics

For odd a, the colour-set family consisting of a parts carrying all four colours together with one copy each of the 3-element colour sets {0,1,2}, {0,1,3}, {0,2,3}, {1,2,3} has alternating seven-term colour-cut sum exactly a + 3.

theorem multipartite_sharp_odd_config_value (a : ℕ) (ha : a % 2 = 1) :
    let T : (Fin a ⊕ Fin 4) → Finset (Fin 4) :=
      fun i => match i with
        | Sum.inl _ => Finset.univ
        | Sum.inr j => if j = 0 then ({0,1,2} : Finset (Fin 4)) else if j = 1 then {0,1,3}
                        else if j = 2 then {0,2,3} else {1,2,3}
    multipartite_upper_bound_color_cut T ({0} : Finset (Fin 4)) + multipartite_upper_bound_color_cut T {1} +
      multipartite_upper_bound_color_cut T {2} + multipartite_upper_bound_color_cut T {3} -
      multipartite_upper_bound_color_cut T {0,1} - multipartite_upper_bound_color_cut T {0,2} -
      multipartite_upper_bound_color_cut T {1,2} = (a : ℤ) + 3
multipartite_tripartite_info_eq_color_cut_sumIn LeanQuantum Mechanics

For a finite complete multipartite graph with nonempty finite parts and any four-colouring c of its vertex set, the tripartite information of the four colour classes equals the alternating seven-term sum of the colour-cut values multipartite_upper_bound_color_cut of the part colour sets, at the index sets {0},{1},{2},{3},{0,1},{0,2},{1,2}.

theorem multipartite_tripartite_info_eq_color_cut_sum
    {ι : Type*} [Fintype ι] [DecidableEq ι]
    (V : ι → Type*) [∀ i, Fintype (V i)] [∀ i, DecidableEq (V i)] [∀ i, Nonempty (V i)]
    (c : (Σ i, V i) → Fin 4) :
    tree_graph_state_tripartite_info (SimpleGraph.completeMultipartiteGraph V)
        (multipartite_upper_bound_color_class V c {0})
        (multipartite_upper_bound_color_class V c {1})
        (multipartite_upper_bound_color_class V c {2})
        (multipartite_upper_bound_color_class V c {3})
      = multipartite_upper_bound_color_cut (multipartite_upper_bound_part_color_set V c) ({0} : Finset (Fin 4))
        + multipartite_upper_bound_color_cut (multipartite_upper_bound_part_color_set V c) {1}
        + multipartite_upper_bound_color_cut (multipartite_upper_bound_part_color_set V c) {2}
        + multipartite_upper_bound_color_cut (multipartite_upper_bound_part_color_set V c) {3}
        - multipartite_upper_bound_color_cut (multipartite_upper_bound_part_color_set V c) {0, 1}
        - multipartite_upper_bound_color_cut (multipartite_upper_bound_part_color_set V c) {0, 2}
        - multipartite_upper_bound_color_cut (multipartite_upper_bound_part_color_set V c) {1, 2}
multipartite_upper_bound_color_cut_boundIn LeanQuantum Mechanics

For any family of nonempty colour sets T i on four colours, the alternating sum of multipartite_upper_bound_color_cut over the seven sets {0},{1},{2},{3},{0,1},{0,2},{1,2} is at most 3 plus the number of parts on which all four colours occur.

theorem multipartite_upper_bound_color_cut_bound {ι : Type*} [Fintype ι]
    (T : ι → Finset (Fin 4)) (hne : ∀ i, (T i).Nonempty) :
    multipartite_upper_bound_color_cut T ({0} : Finset (Fin 4))
        + multipartite_upper_bound_color_cut T {1}
        + multipartite_upper_bound_color_cut T {2}
        + multipartite_upper_bound_color_cut T {3}
      - multipartite_upper_bound_color_cut T {0, 1}
      - multipartite_upper_bound_color_cut T {0, 2}
      - multipartite_upper_bound_color_cut T {1, 2}
      ≤ ((Finset.univ.filter (fun i => T i = Finset.univ)).card : ℤ) + 3
multipartite_upper_bound_cut_rank_le_splitIn LeanQuantum Mechanics

For a complete multipartite graph with nonempty parts and a colouring c, the GF(2) cut rank at the colour class of X is at most the number of parts split by X, plus one.

theorem multipartite_upper_bound_cut_rank_le_split
    {ι : Type*} [Fintype ι] [DecidableEq ι]
    (V : ι → Type*) [∀ i, Fintype (V i)] [∀ i, DecidableEq (V i)] [∀ i, Nonempty (V i)]
    (c : (Σ i, V i) → Fin 4) (X : Finset (Fin 4)) :
    simple_graph_cut_rank (SimpleGraph.completeMultipartiteGraph V)
        (multipartite_upper_bound_color_class V c X)
      ≤ (multipartite_upper_bound_split_parts (multipartite_upper_bound_part_color_set V c) X).card + 1
multipartite_upper_bound_cut_rank_sevenIn LeanQuantum Mechanics

For a four-colouring c of a complete multipartite graph with nonempty parts, and any X : Finset (Fin 4), the GF(2) cut rank at the colour class of X equals multipartite_upper_bound_color_cut applied to the part colour sets.

theorem multipartite_upper_bound_cut_rank_seven
    {ι : Type*} [Fintype ι] [DecidableEq ι]
    (V : ι → Type*) [∀ i, Fintype (V i)] [∀ i, DecidableEq (V i)] [∀ i, Nonempty (V i)]
    (c : (Σ i, V i) → Fin 4) :
    (∀ X : Finset (Fin 4),
      (simple_graph_cut_rank (SimpleGraph.completeMultipartiteGraph V)
          (multipartite_upper_bound_color_class V c X) : ℤ)
        = multipartite_upper_bound_color_cut (multipartite_upper_bound_part_color_set V c) X)
multipartite_upper_bound_four_coloringIn LeanQuantum Mechanics

For a complete multipartite graph with nonempty parts and any four-colouring c, the tripartite information tree_graph_state_tripartite_info at the four colour classes is at most the number of parts on which all four colours occur, plus 3.

theorem multipartite_upper_bound_four_coloring
    {ι : Type*} [Fintype ι] [DecidableEq ι]
    (V : ι → Type*) [∀ i, Fintype (V i)] [∀ i, DecidableEq (V i)] [∀ i, Nonempty (V i)]
    (c : (Σ i, V i) → Fin 4) :
    tree_graph_state_tripartite_info (SimpleGraph.completeMultipartiteGraph V)
        (multipartite_upper_bound_color_class V c {0})
        (multipartite_upper_bound_color_class V c {1})
        (multipartite_upper_bound_color_class V c {2})
        (multipartite_upper_bound_color_class V c {3})
      ≤ ((Finset.univ.filter
          (fun i => multipartite_upper_bound_part_color_set V c i = Finset.univ)).card : ℤ) + 3
multipartite_upper_bound_max_all_fourIn LeanQuantum Mechanics

For a complete multipartite graph with nonempty parts, the maximum tripartite information is at most the number of parts carrying all four colours, plus three.

theorem multipartite_upper_bound_max_all_four
    {ι : Type*} [Fintype ι] [DecidableEq ι]
    (V : ι → Type*) [∀ i, Fintype (V i)] [∀ i, DecidableEq (V i)] [∀ i, Nonempty (V i)] :
    simple_graph_max_tripartite_info (SimpleGraph.completeMultipartiteGraph V) ≤
      ((Finset.univ.filter (fun i => 4 ≤ Fintype.card (V i))).card : ℤ) + 3
multipartite_upper_bound_part_color_set_univ_cardIn LeanQuantum Mechanics

If every one of the four colours occurs on the part V i, then V i has at least four vertices.

theorem multipartite_upper_bound_part_color_set_univ_card
    {ι : Type*} [Fintype ι]
    (V : ι → Type*) [∀ i, Fintype (V i)]
    (c : (Σ i, V i) → Fin 4) {i : ι}
    (hi : multipartite_upper_bound_part_color_set V c i = Finset.univ) :
    4 ≤ Fintype.card (V i)
multipartite_upper_bound_part_trichotomyIn LeanQuantum Mechanics

For any part colour sets T and any X : Finset (Fin 4), every index i is in exactly one of the three classes: T i ⊆ X, T i ∩ X = ∅, or i ∈ split_parts T X. Moreover if T i is nonempty and neither T i ⊆ X nor T i ∩ X = ∅ then i ∈ split_parts T X.

theorem multipartite_upper_bound_part_trichotomy {ι : Type*} [Fintype ι]
    (T : ι → Finset (Fin 4)) (X : Finset (Fin 4)) (i : ι) :
    (T i ⊆ X → i ∉ multipartite_upper_bound_split_parts T X) ∧
    (T i ∩ X = ∅ → i ∉ multipartite_upper_bound_split_parts T X) ∧
    ((T i).Nonempty → ¬ T i ⊆ X → T i ∩ X ≠ ∅ → i ∈ multipartite_upper_bound_split_parts T X)
op1347_monotone_halfIn LeanQuantum Mechanics

For every real α ≥ 1, every generalized tree shift T → T' between trees on a finite vertex set satisfies H_α(T') ≤ H_α(T).

theorem op1347_monotone_half :
    ∀ (α : ℝ) (hα : 1 ≤ α) {V : Type} [Fintype V] [DecidableEq V]
      (T T' : SimpleGraph V) [DecidableRel T.Adj] [DecidableRel T'.Adj]
      (hshift : is_generalized_tree_shift T T'),
      ccz_renyi_entropy α T' ≤ ccz_renyi_entropy α T
op1347_subunit_halfIn LeanQuantum Mechanics

For every real order 0 < α < 1 there is n ≥ 1 such that H_α(P_n) < H_α(S_n).

theorem op1347_subunit_half :
    ∀ (α : ℝ) (hα0 : 0 < α) (hα1 : α < 1),
      ∃ (n : ℕ) (_hn : 1 ≤ n),
        letI : DecidableRel (SimpleGraph.pathGraph n).Adj := inferInstance
        letI : DecidableRel (ccz_star_graph n).Adj := Classical.decRel _
        ccz_renyi_entropy α (SimpleGraph.pathGraph n) < ccz_renyi_entropy α (ccz_star_graph n)
op_1440_four_fifths_scalar_gapIn LeanQuantum Mechanics

With the closed scalar expressions A (from the bipartite value) and B (from the tripartite value) at p = 1/2, a = q = 1/1600, t = 180/8099, one has 1 - 2·A + B < 0; equivalently the subadditivity slack 2·I(X:Y) - I(X:YZ) of the Petz (4/5)-power information is strictly negative (it equals (1 - 2A + B)/((4/5)(1-4/5)) ≈ -2.7220155969930917e-5).

theorem op_1440_four_fifths_scalar_gap :
    1 - 2 * (let u : ℝ := (8099 / 8101 : ℝ) ^ 2 * (1599 / 1600) + (180 / 8101 : ℝ) ^ 2 * (1 / 1600)
             let w : ℝ := (180 / 8101 : ℝ) ^ 2 * (1599 / 1600) + (8099 / 8101 : ℝ) ^ 2 * (1 / 1600)
             let alpha : ℝ := ((1599 / 1600 : ℝ) ^ ((4 : ℝ) / 5) + (1 / 1600 : ℝ) ^ ((4 : ℝ) / 5)) / 2
             let delta : ℝ := ((1599 / 1600 : ℝ) ^ ((4 : ℝ) / 5) - (1 / 1600 : ℝ) ^ ((4 : ℝ) / 5)) / (799 / 800)
             (alpha + delta * ((u - w) / 2)) * u ^ ((1 : ℝ) / 5) +
               (alpha - delta * ((u - w) / 2)) * w ^ ((1 : ℝ) / 5))
      + (let u : ℝ := (8099 / 8101 : ℝ) ^ 2 * (1599 / 1600) + (180 / 8101 : ℝ) ^ 2 * (1 / 1600)
         let w : ℝ := (180 / 8101 : ℝ) ^ 2 * (1599 / 1600) + (8099 / 8101 : ℝ) ^ 2 * (1 / 1600)
         let v : ℝ := (8099 / 8101 : ℝ) * (180 / 8101) * (799 / 800)
         let alpha : ℝ := ((1599 / 1600 : ℝ) ^ ((4 : ℝ) / 5) + (1 / 1600 : ℝ) ^ ((4 : ℝ) / 5)) / 2
         let delta : ℝ := ((1599 / 1600 : ℝ) ^ ((4 : ℝ) / 5) - (1 / 1600 : ℝ) ^ ((4 : ℝ) / 5)) / (799 / 800)
         let e1 : ℝ := alpha + delta * ((u - w) / 2)
         let e2 : ℝ := alpha - delta * ((u - w) / 2)
         let disc : ℝ := Real.sqrt ((u ^ 2 - w ^ 2) ^ 2 + 4 * v ^ 4)
         let lp : ℝ := (u ^ 2 + w ^ 2 + disc) / 2
         let lm : ℝ := (u ^ 2 + w ^ 2 - disc) / 2
         let AA : ℝ := (lp ^ ((1 : ℝ) / 5) + lm ^ ((1 : ℝ) / 5)) / 2
         let BB : ℝ := (lp ^ ((1 : ℝ) / 5) - lm ^ ((1 : ℝ) / 5)) / disc
         let nu1 : ℝ := AA + BB * (u ^ 2 - w ^ 2) / 2
         let nu2 : ℝ := BB * v ^ 2
         let nu3 : ℝ := AA - BB * (u ^ 2 - w ^ 2) / 2
         let eta1 : ℝ := ((u * w + v ^ 2) ^ ((1 : ℝ) / 5) + (u * w - v ^ 2) ^ ((1 : ℝ) / 5)) / 2
         let eta2 : ℝ := ((u * w + v ^ 2) ^ ((1 : ℝ) / 5) - (u * w - v ^ 2) ^ ((1 : ℝ) / 5)) / 2
         nu1 * e1 ^ 2 + nu3 * e2 ^ 2 + 2 * (nu2 + eta2) * (delta * v) ^ 2 + 2 * eta1 * e1 * e2) < 0
op_1440_four_fifths_xy_petz_valueIn LeanQuantum Mechanics

For p = 1/2, a = q = 1/1600 and t = 180/8099, the Petz (4/5)-power information of the bipartite symmetric qubit fork equals (1 - A)/c with c = (4/5)(1 - 4/5), where A is the explicit closed scalar expression: with u = (8099/8101)^2·(1599/1600) + (180/8101)^2·(1/1600), w = (180/8101)^2·(1599/1600) + (8099/8101)^2·(1/1600) (the diagonal entries of the W-conjugated single-qubit state, u + w = 1), alpha = ((1599/1600)^(4/5) + (1/1600)^(4/5))/2 and delta = ((1599/1600)^(4/5) - (1/1600)^(4/5))/(799/800) (the two-point interpolation of x ↦ x^(4/5) at the eigenvalues 1599/1600 and 1/1600), one has A = (alpha + delta·((u - w)/2))·u^(1/5) + (alpha - delta·((u - w)/2))·w^(1/5).

theorem op_1440_four_fifths_xy_petz_value :
    petz_power_information (4 / 5)
        (symmetric_qubit_fork_xy (1 / 2 : ℝ) (1 / 1600 : ℝ) (1 / 1600 : ℝ) (180 / 8099 : ℝ))
      = (let u : ℝ := (8099 / 8101 : ℝ) ^ 2 * (1599 / 1600) + (180 / 8101 : ℝ) ^ 2 * (1 / 1600)
         let w : ℝ := (180 / 8101 : ℝ) ^ 2 * (1599 / 1600) + (8099 / 8101 : ℝ) ^ 2 * (1 / 1600)
         let alpha : ℝ := ((1599 / 1600 : ℝ) ^ ((4 : ℝ) / 5) + (1 / 1600 : ℝ) ^ ((4 : ℝ) / 5)) / 2
         let delta : ℝ := ((1599 / 1600 : ℝ) ^ ((4 : ℝ) / 5) - (1 / 1600 : ℝ) ^ ((4 : ℝ) / 5)) / (799 / 800)
         (1 - ((alpha + delta * ((u - w) / 2)) * u ^ ((1 : ℝ) / 5) +
               (alpha - delta * ((u - w) / 2)) * w ^ ((1 : ℝ) / 5))) / ((4 / 5) * (1 - 4 / 5)))
op_1440_four_fifths_xyz_petz_valueIn LeanQuantum Mechanics

For p = 1/2, a = q = 1/1600 and t = 180/8099, the Petz (4/5)-power information of the tripartite symmetric qubit fork equals (1 - B)/c with the same c = (4/5)(1 - 4/5), where B is the explicit closed scalar expression built from: u, w, v (entries of the W-conjugated single-qubit state, u + w = 1), alpha, delta (two-point interpolation of x^(4/5) at 1599/1600 and 1/1600), e1 = alpha + delta(u-w)/2, e2 = alpha - delta(u-w)/2 (the diagonal of cfc(x^(4/5)) of that state), disc = sqrt((u²-w²)² + 4v⁴), lp, lm the two eigenvalues of M = [[u²,v²],[v²,w²]], AA, BB the two-point interpolation of x^(1/5) at lp, lm, nu1, nu2, nu3 the entries of cfc(x^(1/5))(M), and eta1, eta2 the entries of cfc(x^(1/5))(N) with N = [[u·w,v²],[v²,u·w]]; then B = nu1·e1² + nu3·e2² + 2·(nu2 + eta2)·(delta·v)² + 2·eta1·e1·e2.

theorem op_1440_four_fifths_xyz_petz_value :
    petz_power_information (4 / 5)
        (symmetric_qubit_fork_xyz (1 / 2 : ℝ) (1 / 1600 : ℝ) (1 / 1600 : ℝ) (180 / 8099 : ℝ))
      = (let u : ℝ := (8099 / 8101 : ℝ) ^ 2 * (1599 / 1600) + (180 / 8101 : ℝ) ^ 2 * (1 / 1600)
         let w : ℝ := (180 / 8101 : ℝ) ^ 2 * (1599 / 1600) + (8099 / 8101 : ℝ) ^ 2 * (1 / 1600)
         let v : ℝ := (8099 / 8101 : ℝ) * (180 / 8101) * (799 / 800)
         let alpha : ℝ := ((1599 / 1600 : ℝ) ^ ((4 : ℝ) / 5) + (1 / 1600 : ℝ) ^ ((4 : ℝ) / 5)) / 2
         let delta : ℝ := ((1599 / 1600 : ℝ) ^ ((4 : ℝ) / 5) - (1 / 1600 : ℝ) ^ ((4 : ℝ) / 5)) / (799 / 800)
         let e1 : ℝ := alpha + delta * ((u - w) / 2)
         let e2 : ℝ := alpha - delta * ((u - w) / 2)
         let disc : ℝ := Real.sqrt ((u ^ 2 - w ^ 2) ^ 2 + 4 * v ^ 4)
         let lp : ℝ := (u ^ 2 + w ^ 2 + disc) / 2
         let lm : ℝ := (u ^ 2 + w ^ 2 - disc) / 2
         let AA : ℝ := (lp ^ ((1 : ℝ) / 5) + lm ^ ((1 : ℝ) / 5)) / 2
         let BB : ℝ := (lp ^ ((1 : ℝ) / 5) - lm ^ ((1 : ℝ) / 5)) / disc
         let nu1 : ℝ := AA + BB * (u ^ 2 - w ^ 2) / 2
         let nu2 : ℝ := BB * v ^ 2
         let nu3 : ℝ := AA - BB * (u ^ 2 - w ^ 2) / 2
         let eta1 : ℝ := ((u * w + v ^ 2) ^ ((1 : ℝ) / 5) + (u * w - v ^ 2) ^ ((1 : ℝ) / 5)) / 2
         let eta2 : ℝ := ((u * w + v ^ 2) ^ ((1 : ℝ) / 5) - (u * w - v ^ 2) ^ ((1 : ℝ) / 5)) / 2
         (1 - (nu1 * e1 ^ 2 + nu3 * e2 ^ 2 + 2 * (nu2 + eta2) * (delta * v) ^ 2 +
               2 * eta1 * e1 * e2)) / ((4 / 5) * (1 - 4 / 5)))
op_1440_petz_power_information_subadditivity_violation_tenthIn LeanQuantum Mechanics

Partial result for OP-1440 at a single small exponent: there exist rational p, a, q, t in (0,1) with 2·I(X:Y) < I(X:YZ) at β = 1/10, where I is the Petz power information of the symmetric qubit forks. (Witness: a = 1/2, p = 1/4, q = 1/25, t = 1/2.)

theorem op_1440_petz_power_information_subadditivity_violation_tenth :
    ∃ (p a q t : ℚ), (0 : ℚ) < p ∧ p < 1 ∧ (0 : ℚ) < a ∧ a < 1 ∧ (0 : ℚ) < q ∧ q < 1 ∧ (0 : ℚ) < t ∧ t < 1 ∧
      2 * petz_power_information (1 / 10) (symmetric_qubit_fork_xy (p : ℝ) (a : ℝ) (q : ℝ) (t : ℝ)) <
        petz_power_information (1 / 10) (symmetric_qubit_fork_xyz (p : ℝ) (a : ℝ) (q : ℝ) (t : ℝ))
op_1668_binom_weight_sqrt_ratio_leIn LeanQuantum Mechanics

For 0 < p < 1/2 and w ≤ n, the binomial weight p^w (1-p)^(n-w) times (√(p/(1-p)))^|n-2w| is at most (√(p(1-p)))^n.

theorem op_1668_binom_weight_sqrt_ratio_le (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) (n w : ℕ) (hw : w ≤ n) : p ^ w * (1 - p) ^ (n - w) * (Real.sqrt (p / (1 - p))) ^ ((n : ℤ) - 2 * (w : ℤ)).natAbs ≤ (Real.sqrt (p * (1 - p))) ^ n
op_1668_central_binomial_two_sidedIn LeanQuantum Mechanics

There are positive constants a, b with a·2^n/√n ≤ C(n,⌊n/2⌋) ≤ b·2^n/√n for every n ≥ 1. (Explicitly a = 1/2 and b = 1 work.)

theorem op_1668_central_binomial_two_sided : ∃ a > (0:ℝ), ∃ b > (0:ℝ), ∀ n : ℕ, 1 ≤ n → a * 2 ^ n / Real.sqrt (n : ℝ) ≤ (Nat.choose n (n / 2) : ℝ) ∧ (Nat.choose n (n / 2) : ℝ) ≤ b * 2 ^ n / Real.sqrt (n : ℝ)
op_1668_hypergraph_deficit_h_ratio_boundsIn LeanQuantum Mechanics

For 0 < p < 1/2 and every natural j, the kernel hypergraph_deficit_h p j is trapped between the j-th powers of the ratio t = p/(1-p): t^j ≤ hypergraph_deficit_h p j ≤ 4 t^j.

theorem op_1668_hypergraph_deficit_h_ratio_bounds (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) (j : ℕ) : (p / (1 - p)) ^ j ≤ hypergraph_deficit_h p j ∧ hypergraph_deficit_h p j ≤ 4 * (p / (1 - p)) ^ j
op_1668_hypergraph_deficit_lower_coreIn LeanQuantum Mechanics

For 0 < p < 1/2 there is k > 0 with k·n·C(n,⌊n/2⌋)·(√(p(1-p)))^n ≤ hypergraph_binomial_deficit n p for all n ≥ 3.

theorem op_1668_hypergraph_deficit_lower_core (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) : ∃ k > (0:ℝ), ∀ n : ℕ, 3 ≤ n → k * (n : ℝ) * (Nat.choose n (n / 2) : ℝ) * (Real.sqrt (p * (1 - p))) ^ n ≤ hypergraph_binomial_deficit n p
op_1668_hypergraph_deficit_upper_coreIn LeanQuantum Mechanics

For 0 < p < 1/2 there is K > 0 with hypergraph_binomial_deficit n p ≤ K·n·C(n,⌊n/2⌋)·(√(p(1-p)))^n for all n ≥ 3.

theorem op_1668_hypergraph_deficit_upper_core (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) : ∃ K > (0:ℝ), ∀ n : ℕ, 3 ≤ n → hypergraph_binomial_deficit n p ≤ K * (n : ℝ) * (Nat.choose n (n / 2) : ℝ) * (Real.sqrt (p * (1 - p))) ^ n
op_1693_bessel_I0_continuousIn LeanQuantum Mechanics

The modified Bessel function I_0, defined as the series Σ_j (z^2/4)^j/(j!)^2, is continuous on ℝ.

theorem op_1693_bessel_I0_continuous : Continuous bessel_I0
op_1693_bessel_I0_le_expIn LeanQuantum Mechanics

For z ≥ 0, the modified Bessel function is dominated by the exponential: I_0(z) ≤ exp z.

theorem op_1693_bessel_I0_le_exp (z : ℝ) (hz : 0 ≤ z) : bessel_I0 z ≤ Real.exp z
op_1693_bessel_I0_posIn LeanQuantum Mechanics

The modified Bessel function is strictly positive at every real argument: 0 < I_0(z) for all z.

theorem op_1693_bessel_I0_pos (z : ℝ) : 0 < bessel_I0 z
op_1693_bessel_I0_strictMonoOnIn LeanQuantum Mechanics

The modified Bessel function is strictly increasing on the non-negative axis: 0 ≤ a < b implies I_0(a) < I_0(b).

theorem op_1693_bessel_I0_strictMonoOn : StrictMonoOn bessel_I0 (Set.Ici 0)
op_1693_bessel_I0_summableIn LeanQuantum Mechanics

The defining series of the modified Bessel function I_0 converges at every real argument: for every real z the family j ↦ (z^2/4)^j / (j!)^2 is summable.

theorem op_1693_bessel_I0_summable (z : ℝ) :
    Summable (fun j : ℕ => (z ^ 2 / 4) ^ j / ((j.factorial : ℝ) ^ 2))
op_1693_bessel_I0_zeroIn LeanQuantum Mechanics

The modified Bessel function at the origin is one: I_0(0) = 1.

theorem op_1693_bessel_I0_zero : bessel_I0 0 = 1
op_1693_bessel_cross_cauchy_schwarzIn LeanQuantum Mechanics

For a, b ≥ 0, the mixed Bessel term is bounded by the geometric mean of the two collision probabilities: exp(-(a+b)) I_0(2√(ab)) ≤ √(G(a) G(b)), where G(a) = exp(-2a) I_0(2a).

theorem op_1693_bessel_cross_cauchy_schwarz (a b : ℝ) (ha : 0 ≤ a) (hb : 0 ≤ b) :
    Real.exp (-(a + b)) * bessel_I0 (2 * Real.sqrt (a * b)) ≤
      Real.sqrt ((Real.exp (-2 * a) * bessel_I0 (2 * a)) *
        (Real.exp (-2 * b) * bessel_I0 (2 * b)))
op_1693_bessel_g_collision_identityIn LeanQuantum Mechanics

For a ≥ 0, the collision probability G(a) = exp(-2a) I_0(2a) equals the ℓ²-norm squared of the Poisson mass function: G(a) = Σ_j (exp(-a) a^j/j!)^2. In particular G(0) = 1.

theorem op_1693_bessel_g_collision_identity (a : ℝ) (ha : 0 ≤ a) :
    Real.exp (-2 * a) * bessel_I0 (2 * a) =
      ∑' j : ℕ, (Real.exp (-a) * a ^ j / (j.factorial : ℝ)) ^ 2
op_1693_bessel_g_strictAntiOnIn LeanQuantum Mechanics

The Poisson collision probability a ↦ Σ_j (exp(-a) a^j/j!)^2 = exp(-2a) I_0(2a) is strictly decreasing in a on [0, ∞).

theorem op_1693_bessel_g_strictAntiOn :
    StrictAntiOn (fun a : ℝ => Real.exp (-2 * a) * bessel_I0 (2 * a)) (Set.Ici 0)
op_1693_bessel_g_summableIn LeanQuantum Mechanics

For a ≥ 0 the sequence of squared Poisson masses j ↦ (exp(-a) a^j/j!)^2 is summable.

theorem op_1693_bessel_g_summable (a : ℝ) (ha : 0 ≤ a) :
    Summable (fun j : ℕ => (Real.exp (-a) * a ^ j / (j.factorial : ℝ)) ^ 2)
op_1693_bessel_g_tendsto_zeroIn LeanQuantum Mechanics

The Poisson collision probability exp(-2a) I_0(2a) tends to 0 as a → +∞ (it is asymptotic to 1/√(4πa)).

theorem op_1693_bessel_g_tendsto_zero :
    Filter.Tendsto (fun a : ℝ => Real.exp (-2 * a) * bessel_I0 (2 * a)) Filter.atTop (nhds 0)
op_1693_bessel_poisson_product_identityIn LeanQuantum Mechanics

For a, b ≥ 0, the mixed Bessel term equals the inner product of the two Poisson mass functions: exp(-(a+b)) I_0(2√(ab)) = Σ_j (exp(-a) a^j/j!) (exp(-b) b^j/j!).

theorem op_1693_bessel_poisson_product_identity (a b : ℝ) (ha : 0 ≤ a) (hb : 0 ≤ b) :
    Real.exp (-(a + b)) * bessel_I0 (2 * Real.sqrt (a * b)) =
      ∑' j : ℕ, (Real.exp (-a) * a ^ j / (j.factorial : ℝ)) *
        (Real.exp (-b) * b ^ j / (j.factorial : ℝ))
op_1693_bessel_poisson_shift_identityIn LeanQuantum Mechanics

For a ≥ 0 and every j, the Poisson mass function satisfies a ⋅ (exp(-a) a^j/j!) = (j+1) ⋅ (exp(-a) a^(j+1)/(j+1)!).

theorem op_1693_bessel_poisson_shift_identity (a : ℝ) (ha : 0 ≤ a) (j : ℕ) :
    a * (Real.exp (-a) * a ^ j / (j.factorial : ℝ)) =
      ((j : ℝ) + 1) * (Real.exp (-a) * a ^ (j + 1) / ((j + 1).factorial : ℝ))
op_1693_factorial_two_mul_le_four_powIn LeanQuantum Mechanics

For every natural number j, (2j)! ≤ 4^j (j!)^2; equivalently the central binomial coefficient C(2j,j) is at most 4^j.

theorem op_1693_factorial_two_mul_le_four_pow (j : ℕ) :
    (2 * j).factorial ≤ 4 ^ j * j.factorial ^ 2
op_1693_noon_binomial_sum_oneIn LeanQuantum Mechanics

For every natural number N and every real x, the binomial masses sum to one: ∑_{k=0}^{N} C(N,k) x^k (1-x)^{N-k} = 1.

theorem op_1693_noon_binomial_sum_one (N : ℕ) (x : ℝ) :
    ∑ k ∈ Finset.range (N + 1), (Nat.choose N k : ℝ) * x ^ k * (1 - x) ^ (N - k) = 1
op_1693_noon_binomial_summand_nonnegIn LeanQuantum Mechanics

For x ∈ [0,1] the binomial masses are non-negative: 0 ≤ C(N,k) x^k (1-x)^{N-k}.

theorem op_1693_noon_binomial_summand_nonneg (N k : ℕ) (x : ℝ) (hx : x ∈ Set.Icc 0 1) :
    0 ≤ (Nat.choose N k : ℝ) * x ^ k * (1 - x) ^ (N - k)
op_1693_noon_realign_witness_at_one_oneIn LeanQuantum Mechanics

At x = y = 1 every binomial summand of W_N(q, x, y) vanishes except k = N, where it equals 1; hence W_N(q, 1, 1) = 1 + 4q(1-q), the same value as the scaling surface at the origin.

theorem op_1693_noon_realign_witness_at_one_one (N : ℕ) (q : ℝ) :
    noon_realign_witness N q 1 1 = 1 + 4 * q * (1 - q)
op_1693_noon_realign_witness_continuousIn LeanQuantum Mechanics

For every natural number N and real q, the map (x, y) ↦ W_N(q, x, y) is continuous on ℝ²; it is a finite sum of polynomials in x and y.

theorem op_1693_noon_realign_witness_continuous (N : ℕ) (q : ℝ) :
    Continuous (fun p : ℝ × ℝ => noon_realign_witness N q p.1 p.2)
op_1693_noon_realign_witness_nonnegIn LeanQuantum Mechanics

For q ∈ [0,1] and transmissivities x, y ∈ [0,1], the realignment witness is non-negative: 0 ≤ W_N(q, x, y).

theorem op_1693_noon_realign_witness_nonneg (N : ℕ) (q x y : ℝ)
    (hq : q ∈ Set.Icc 0 1) (hx : x ∈ Set.Icc 0 1) (hy : y ∈ Set.Icc 0 1) :
    0 ≤ noon_realign_witness N q x y
op_1693_noon_scaling_surface_at_originIn LeanQuantum Mechanics

At zero loss the scaling surface equals 1 + 4q(1-q): F_q(0,0) = q² + (1-q)² + 2q(1-q) + 4q(1-q).

theorem op_1693_noon_scaling_surface_at_origin (q : ℝ) :
    noon_scaling_surface q 0 0 = 1 + 4 * q * (1 - q)
op_1693_noon_scaling_surface_continuousIn LeanQuantum Mechanics

For every q, the scaling surface (a,b) ↦ F_q(a,b) is continuous on ℝ².

theorem op_1693_noon_scaling_surface_continuous (q : ℝ) :
    Continuous (fun p : ℝ × ℝ => noon_scaling_surface q p.1 p.2)
op_1693_noon_scaling_surface_unique_ray_crossingIn LeanQuantum Mechanics

For every real q in the open interval (0, 1) and all real numbers u ≥ 0, v ≥ 0 with (u, v) ≠ (0, 0), there exists a unique real number t > 0 such that noon_scaling_surface q (t * u) (t * v) = 1.

theorem op_1693_noon_scaling_surface_unique_ray_crossing :
    ∀ (q : ℝ) (hq : q ∈ Set.Ioo 0 1) (u v : ℝ)
      (hu : 0 ≤ u) (hv : 0 ≤ v) (hnz : (u, v) ≠ (0, 0)),
      ∃! t : ℝ, 0 < t ∧ noon_scaling_surface q (t * u) (t * v) = 1
op_1693_noon_witness_deriv_nonnegIn LeanQuantum Mechanics

For every natural number N ≥ 1 and all real numbers q, x, y in the open interval (0, 1), if noon_realign_witness N q x y > 1, then 0 ≤ deriv (fun u => noon_realign_witness N q u y) x and 0 ≤ deriv (fun v => noon_realign_witness N q x v) y.

theorem op_1693_noon_witness_deriv_nonneg :
    ∀ (N : ℕ) (hN : 1 ≤ N) (q x y : ℝ)
      (hq : q ∈ Set.Ioo 0 1) (hx : x ∈ Set.Ioo 0 1) (hy : y ∈ Set.Ioo 0 1),
      noon_realign_witness N q x y > 1 →
        0 ≤ deriv (fun u => noon_realign_witness N q u y) x ∧
        0 ≤ deriv (fun v => noon_realign_witness N q x v) y
op_1693_noon_witness_detection_upward_closedIn LeanQuantum Mechanics

For every natural number N ≥ 1, real number q in (0, 1), and transmissivities 0 < x ≤ x' < 1 and 0 < y ≤ y' < 1, if noon_realign_witness N q x y > 1, then noon_realign_witness N q x' y' > 1.

theorem op_1693_noon_witness_detection_upward_closed :
    ∀ (N : ℕ) (hN : 1 ≤ N) (q x y x' y' : ℝ)
      (hq : q ∈ Set.Ioo 0 1)
      (hx : 0 < x ∧ x ≤ x' ∧ x' < 1) (hy : 0 < y ∧ y ≤ y' ∧ y' < 1),
      noon_realign_witness N q x y > 1 →
        noon_realign_witness N q x' y' > 1
op_1693_noon_witness_uniform_scaling_convergenceIn LeanQuantum Mechanics

For every real q in the open interval (0, 1) and every compact subset K ⊆ Set.Ici 0 ×ˢ Set.Ici 0, there exist C > 0 and N₀ ∈ ℕ such that for all N ≥ N₀ and all p ∈ K, |noon_realign_witness N q (1 - p.1 / (N : ℝ)) (1 - p.2 / (N : ℝ)) - noon_scaling_surface q p.1 p.2| ≤ C / (N : ℝ).

theorem op_1693_noon_witness_uniform_scaling_convergence :
    ∀ (q : ℝ) (hq : q ∈ Set.Ioo 0 1) (K : Set (ℝ × ℝ)) (hK : IsCompact K)
      (hKpos : K ⊆ Set.Ici 0 ×ˢ Set.Ici 0),
      ∃ (C : ℝ) (hC : 0 < C) (N₀ : ℕ), ∀ (N : ℕ) (hN : N₀ ≤ N) (p : ℝ × ℝ) (hp : p ∈ K),
        |noon_realign_witness N q (1 - p.1 / (N : ℝ)) (1 - p.2 / (N : ℝ)) -
          noon_scaling_surface q p.1 p.2| ≤ C / (N : ℝ)
op_1695_bipartite_magic_castIn LeanQuantum Mechanics

Coercing the real number bipartite_subgraph_magic_poly G to a complex number gives 8^{-|V|} times the complex subset sum over edge subsets A ⊆ E that are bipartite, of (-2)^{|A|} 8^{k(V,A)}.

open scoped Classical in
theorem op_1695_bipartite_magic_cast {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] :
    (bipartite_subgraph_magic_poly G : ℂ)
      = (1 / (8 : ℂ) ^ Fintype.card V) * ∑ A ∈ G.edgeFinset.powerset,
          (if (SimpleGraph.fromEdgeSet (↑A : Set (Sym2 V))).IsBipartite then
            (-2 : ℂ) ^ A.card *
              (8 : ℂ) ^ Fintype.card (SimpleGraph.fromEdgeSet (↑A : Set (Sym2 V))).ConnectedComponent
          else 0)
op_1695_spin_config_countIn LeanQuantum Mechanics

For an edge subset A ⊆ E(G) of a finite simple graph G, summing over all sixteen-spin configurations the product over e ∈ A of the π/8 weight factor (-2)·[pattern] gives (-2)^{|A|} · 2^{|V|} · 8^{k} if the spanning subgraph (V, A) is bipartite, and 0 otherwise, where k is its number of connected components.

open scoped Classical in
theorem op_1695_spin_config_count {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (A : Finset (Sym2 V)) (hA : A ⊆ G.edgeFinset) :
    (∑ sp : V → Fin 4 → Fin 2,
        ∏ e ∈ A, (-2 : ℂ) * (if sixteen_spin_diff_pattern sp e then (1 : ℂ) else 0))
      = if (SimpleGraph.fromEdgeSet (A : Set (Sym2 V))).IsBipartite then
          (-2 : ℂ) ^ A.card * (2 : ℂ) ^ Fintype.card V *
            (8 : ℂ) ^ Fintype.card (SimpleGraph.fromEdgeSet (A : Set (Sym2 V))).ConnectedComponent
        else 0
op_1695_spin_partition_complexIn LeanQuantum Mechanics

At constant edge angle π/8, the sixteen-spin partition function of a finite simple graph G equals 8^{-|V|} times the sum over edge subsets A ⊆ E(G) of (-2)^{|A|} 8^{k(V,A)} when the spanning subgraph (V, A) is bipartite and 0 otherwise.

open scoped Classical in
theorem op_1695_spin_partition_complex {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] :
    sixteen_spin_partition_fn G (fun _ => Real.pi / 8)
      = (1 / (8 : ℂ) ^ Fintype.card V) * ∑ A ∈ G.edgeFinset.powerset,
          (if (SimpleGraph.fromEdgeSet (↑A : Set (Sym2 V))).IsBipartite then
            (-2 : ℂ) ^ A.card *
              (8 : ℂ) ^ Fintype.card (SimpleGraph.fromEdgeSet (↑A : Set (Sym2 V))).ConnectedComponent
          else 0)
op_1695_spin_pattern_iffIn LeanQuantum Mechanics

For an edge subset A of a simple graph G and a sixteen-spin configuration sp, the pattern holds on every e ∈ A exactly when, on every edge {u,v} of the spanning subgraph (V, A), component 1 differs, component 2 agrees and component 3 differs. The hypothesis A ⊆ E(G) is needed to know that the edges of A are not loops.

open scoped Classical in
theorem op_1695_spin_pattern_iff {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (A : Finset (Sym2 V)) (hA : A ⊆ G.edgeFinset)
    (sp : V → Fin 4 → Fin 2) :
    (∀ e ∈ A, sixteen_spin_diff_pattern sp e) ↔
      ((∀ u v : V, (SimpleGraph.fromEdgeSet (A : Set (Sym2 V))).Adj u v → sp u 1 ≠ sp v 1) ∧
       (∀ u v : V, (SimpleGraph.fromEdgeSet (A : Set (Sym2 V))).Adj u v → sp u 2 = sp v 2) ∧
       (∀ u v : V, (SimpleGraph.fromEdgeSet (A : Set (Sym2 V))).Adj u v → sp u 3 ≠ sp v 3))
op_1695_spin_triple_countIn LeanQuantum Mechanics

For a finite simple graph H, the number of sixteen-spin configurations whose components 1 and 3 are proper 2-colourings of H and whose component 2 is constant on every edge of H equals 2^{|V|} times 8^{k} if H is bipartite and 0 otherwise, where k is the number of connected components of H.

open scoped Classical in
theorem op_1695_spin_triple_count {V : Type*} [Fintype V] [DecidableEq V]
    (H : SimpleGraph V) [DecidableRel H.Adj] :
    (∑ sp : V → Fin 4 → Fin 2,
        (if (∀ u v : V, H.Adj u v → sp u 1 ≠ sp v 1) ∧
            (∀ u v : V, H.Adj u v → sp u 2 = sp v 2) ∧
            (∀ u v : V, H.Adj u v → sp u 3 ≠ sp v 3) then (1 : ℂ) else 0))
      = (2 : ℂ) ^ Fintype.card V *
          (if H.IsBipartite then (8 : ℂ) ^ Fintype.card H.ConnectedComponent else 0)
pathGraph_tripartite_info_nonposIn LeanQuantum Mechanics

For the path P_n and every four-partition A,B,C,D of its vertices, the tripartite information of the path at A,B,C,D is at most 0.

theorem pathGraph_tripartite_info_nonpos (n : ℕ) (A B C D : Finset (Fin n))
    (hpart : is_four_partition A B C D) :
    tree_graph_state_tripartite_info (SimpleGraph.pathGraph n) A B C D ≤ 0
path_graph_cut_rank_two_mulIn LeanQuantum Mechanics

For the path P_n and any vertex subset S, twice the GF(2) rank of the cut matrix of S equals the number of edges crossing the cut plus the number of maximal odd-length runs of crossing edges.

theorem path_graph_cut_rank_two_mul (n : ℕ) (S : Finset (Fin n)) :
    2 * simple_graph_cut_rank (SimpleGraph.pathGraph n) S =
      (path_cut_word n S).countP id + odd_run_count (path_cut_word n S)
petz_power_information_diagonalIn LeanQuantum Mechanics

For a diagonal joint state diag(P) (P : u × v → ℝ, P ≥ 0), the Petz power information equals (1 − Σ_{ij} P_ij^β · ((Σ_j' P_ij')·(Σ_i' P_i'j))^{1−β}) / (β(1−β)).

theorem petz_power_information_diagonal {u v : Type*} [Fintype u] [Fintype v] [DecidableEq u] [DecidableEq v]
    (β : ℝ) (P : u × v → ℝ) (hP : ∀ i, 0 ≤ P i) :
    petz_power_information β (Matrix.diagonal P) =
      (1 - ∑ i : u × v, (P i) ^ β * ((∑ j : v, P (i.1, j)) * (∑ j : u, P (j, i.2))) ^ (1 - β)) /
        (β * (1 - β))
simple_graph_constant_two_coloring_countIn LeanQuantum Mechanics

For a finite simple graph H, the number of maps c : V → Fin 2 that are constant on every edge of H equals 2 to the number of connected components of H.

open scoped Classical in
theorem simple_graph_constant_two_coloring_count {V : Type*} [Fintype V] [DecidableEq V]
    (H : SimpleGraph V) [DecidableRel H.Adj] :
    (∑ c : V → Fin 2, (if ∀ u v : V, H.Adj u v → c u = c v then (1 : ℂ) else 0))
      = (2 : ℂ) ^ Fintype.card H.ConnectedComponent
simple_graph_cut_rank_complIn LeanQuantum Mechanics

For any finite simple graph G and subset X of vertices, the cut rank of Xᶜ equals the cut rank of X, because adjacency is symmetric and the cut matrix of Xᶜ is the transpose of the cut matrix of X up to index equivalence.

theorem simple_graph_cut_rank_compl {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (X : Finset V) :
    simple_graph_cut_rank G Xᶜ = simple_graph_cut_rank G X
simple_graph_cut_rank_delete_edge_geIn LeanQuantum Mechanics

The GF(2) cut rank of G.deleteEdges {e} at X is at most 1 plus the GF(2) cut rank of G at X.

theorem simple_graph_cut_rank_delete_edge_ge {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (e : Sym2 V) (X : Finset V)
    [DecidableRel (G.deleteEdges {e}).Adj] :
    simple_graph_cut_rank (G.deleteEdges {e}) X ≤ simple_graph_cut_rank G X + 1
simple_graph_cut_rank_delete_edge_leIn LeanQuantum Mechanics

The GF(2) cut rank of G at X is at most 1 plus the GF(2) cut rank of G.deleteEdges {e} at X.

theorem simple_graph_cut_rank_delete_edge_le {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (e : Sym2 V) (X : Finset V)
    [DecidableRel (G.deleteEdges {e}).Adj] :
    simple_graph_cut_rank G X ≤ simple_graph_cut_rank (G.deleteEdges {e}) X + 1
simple_graph_cut_rank_ge_two_of_cross_minorIn LeanQuantum Mechanics

If u1, u2 lie in X, w1, w2 outside X, u1 is adjacent to w1 but not w2, and u2 is adjacent to w2 but not w1, then the cut rank of X is at least 2.

theorem simple_graph_cut_rank_ge_two_of_cross_minor {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (X : Finset V) (u₁ u₂ w₁ w₂ : V)
    (hu₁ : u₁ ∈ X) (hu₂ : u₂ ∈ X) (hw₁ : w₁ ∉ X) (hw₂ : w₂ ∉ X)
    (h11 : G.Adj u₁ w₁) (h22 : G.Adj u₂ w₂) (h12 : ¬ G.Adj u₁ w₂) (h21 : ¬ G.Adj u₂ w₁) :
    2 ≤ simple_graph_cut_rank G X
simple_graph_cut_rank_le_cardIn LeanQuantum Mechanics

For any finite simple graph G on vertex type V and any vertex subset X, the cut rank simple_graph_cut_rank G X is bounded by the cardinality of V.

theorem simple_graph_cut_rank_le_card {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (X : Finset V) :
    simple_graph_cut_rank G X ≤ Fintype.card V
simple_graph_cut_rank_le_card_leftIn LeanQuantum Mechanics

For any finite simple graph G and vertex subset X, the cut rank of X is at most the cardinality of X.

theorem simple_graph_cut_rank_le_card_left {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (X : Finset V) :
    simple_graph_cut_rank G X ≤ X.card
simple_graph_cut_rank_pos_of_cross_edgeIn LeanQuantum Mechanics

If u lies in X, v lies outside X, and u is adjacent to v, then the cut rank of X is at least 1.

theorem simple_graph_cut_rank_pos_of_cross_edge {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (X : Finset V) {u v : V}
    (hu : u ∈ X) (hv : v ∉ X) (hadj : G.Adj u v) :
    1 ≤ simple_graph_cut_rank G X
simple_graph_proper_two_coloring_countIn LeanQuantum Mechanics

For a finite simple graph H, the number of proper 2-colourings c : V → Fin 2 (colourings with c u ≠ c v on every edge) equals 2 to the number of connected components of H if H is bipartite, and 0 otherwise.

open scoped Classical in
theorem simple_graph_proper_two_coloring_count {V : Type*} [Fintype V] [DecidableEq V]
    (H : SimpleGraph V) [DecidableRel H.Adj] :
    (∑ c : V → Fin 2, (if ∀ u v : V, H.Adj u v → c u ≠ c v then (1 : ℂ) else 0))
      = if H.IsBipartite then (2 : ℂ) ^ Fintype.card H.ConnectedComponent else 0
simple_graph_triangle_free_edge_card_le_sq_div_fourIn LeanQuantum Mechanics

Mantel's theorem: a triangle-free finite simple graph on n vertices has at most n²/4 edges, equivalently 4 * |E| ≤ n².

theorem simple_graph_triangle_free_edge_card_le_sq_div_four {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hG : G.CliqueFree 3) :
    4 * G.edgeFinset.card ≤ (Fintype.card V) ^ 2
sixteen_spin_diff_pattern_witnessIn LeanQuantum Mechanics

The π/8 difference pattern is neither always true nor always false: on the pair (false, true) of Bool, the spin configuration that flips in components 1 and 3 and preserves component 2 satisfies it, while the constant spin configuration does not.

theorem sixteen_spin_diff_pattern_witness :
    sixteen_spin_diff_pattern (fun (x : Bool) (i : Fin 4) => if i = 1 ∨ i = 3 then (if x then 1 else 0) else 0)
        s(false, true) ∧
      ¬ sixteen_spin_diff_pattern (fun (_ : Bool) (_ : Fin 4) => (0 : Fin 2)) s(false, true)
sixteen_spin_weight_pair_pi_div_eightIn LeanQuantum Mechanics

At θ = π/8, the edge weight attached by a sixteen-spin configuration sp to an unordered pair {u, v} is 1 - 2·[the π/8 difference pattern holds on {u, v}], i.e. it is -1 exactly when components 1 and 3 flip and component 2 is preserved.

open scoped Classical in
theorem sixteen_spin_weight_pair_pi_div_eight {V : Type*} (sp : V → Fin 4 → Fin 2) (u v : V) :
    sixteen_spin_weight (Real.pi / 8) (fun i => if sp u i = sp v i then (0 : Fin 2) else 1)
      = 1 + (-2 : ℂ) * (if sixteen_spin_diff_pattern sp s(u, v) then 1 else 0)
sixteen_spin_weight_pi_div_eightIn LeanQuantum Mechanics

At θ = π/8 the sixteen-spin edge weight of a difference vector d equals 1 - 2·[d₁ = 1 ∧ d₂ = 0 ∧ d₃ = 1]; that is, both exponentials collapse to exp(±iπ) = -1, so the weight is -1 exactly when the first three components read (1,0,1).

theorem sixteen_spin_weight_pi_div_eight (d : Fin 4 → Fin 2) :
    sixteen_spin_weight (Real.pi / 8) d
      = 1 + (-2 : ℂ) * (if d 1 = 1 ∧ d 2 = 0 ∧ d 3 = 1 then 1 else 0)
sparse_graph_state_fisher_core_k_eventually_lt_nIn LeanQuantum Mechanics

When c_n = o(n), the core size k(d, c_n) is strictly less than n for all sufficiently large n.

theorem sparse_graph_state_fisher_core_k_eventually_lt_n
    (d : ℕ) (c : ℕ → ℕ)
    (hc : (fun n => (c n : ℝ)) =o[Filter.atTop] fun n => (n : ℝ)) :
    ∀ᶠ (n : ℕ) in Filter.atTop, sparse_graph_state_fisher_core_k d (c n) < n
sparse_graph_state_fisher_q_max_asymptotic_classificationIn LeanQuantum Mechanics

For large n with c_n = o(n), every valid connected triangle-free graph G on n vertices with d*n + c_n edges satisfies Q(G) <= (n - k)^2 + B(d, c_n), and equality forces G to be isomorphic to the expansion of an optimal marked core graph.

theorem sparse_graph_state_fisher_q_max_asymptotic_classification
    (d : ℕ) (hd : 2 ≤ d) (c : ℕ → ℕ)
    (hc : (fun n => (c n : ℝ)) =o[Filter.atTop] fun n => (n : ℝ)) :
    ∀ᶠ (n : ℕ) in Filter.atTop,
      let k := sparse_graph_state_fisher_core_k d (c n)
      (∀ (G : SimpleGraph (Fin n)),
        G.Connected → G.CliqueFree 3 → Nat.card G.edgeSet = d * n + c n →
        graph_state_fisher_q G ≤ (n - k) ^ 2 + core_constant_b d (c n)) ∧
      (∀ (G : SimpleGraph (Fin n)),
        G.Connected → G.CliqueFree 3 → Nat.card G.edgeSet = d * n + c n →
        graph_state_fisher_q G = (n - k) ^ 2 + core_constant_b d (c n) →
        ∃ (J : SimpleGraph (Fin (k + 1))) (s : Fin (k + 1)),
          is_marked_core_graph k d (c n) J s ∧
          graph_state_fisher_q J - 1 = core_constant_b d (c n) ∧
          Nonempty (G ≃g expand_vertex (W := Fin (n - k)) J s))
square_grid_graph_max_tripartite_info_abs_leIn LeanQuantum Mechanics

For every natural number n, the maximum tripartite information square_grid_graph_max_tripartite_info n of the n-by-n square grid graph state satisfies |square_grid_graph_max_tripartite_info n| ≤ 28 n^2.

theorem square_grid_graph_max_tripartite_info_abs_le (n : ℕ) :
    |(square_grid_graph_max_tripartite_info n : ℝ)| ≤ 28 * (n : ℝ) ^ 2
square_grid_graph_max_tripartite_info_block_leIn LeanQuantum Mechanics

For all m and k > 0, |square_grid_graph_max_tripartite_info (m * k) - m^2 * square_grid_graph_max_tripartite_info k| ≤ 28 * m^2 * k.

theorem square_grid_graph_max_tripartite_info_block_le (m k : ℕ) (hk : 0 < k) :
  |(square_grid_graph_max_tripartite_info (m * k) : ℝ) - (m : ℝ) ^ 2 * (square_grid_graph_max_tripartite_info k : ℝ)| ≤
    28 * (m : ℝ) ^ 2 * (k : ℝ)
square_grid_graph_max_tripartite_info_rem_leIn LeanQuantum Mechanics

For all n and k > 0, |square_grid_graph_max_tripartite_info n - square_grid_graph_max_tripartite_info (n - n % k)| ≤ 28 * n * k.

theorem square_grid_graph_max_tripartite_info_rem_le (n k : ℕ) (hk : 0 < k) :
  |(square_grid_graph_max_tripartite_info n : ℝ) - (square_grid_graph_max_tripartite_info (n - n % k) : ℝ)| ≤
    28 * (n : ℝ) * (k : ℝ)
square_grid_two_cut_rank_pair_ge_oneIn LeanQuantum Mechanics

On the 2-by-2 grid graph, the cut rank of any two distinct vertices is at least 1.

theorem square_grid_two_cut_rank_pair_ge_one (a b : Fin 2 × Fin 2) (hab : a ≠ b) :
    1 ≤ simple_graph_cut_rank (SimpleGraph.pathGraph 2 □ SimpleGraph.pathGraph 2)
      ({a, b} : Finset (Fin 2 × Fin 2))
square_grid_two_cut_rank_pair_of_adjIn LeanQuantum Mechanics

On the 2-by-2 grid graph, the cut rank of a pair of adjacent vertices is exactly 2.

theorem square_grid_two_cut_rank_pair_of_adj (a b : Fin 2 × Fin 2)
    (h : (SimpleGraph.pathGraph 2 □ SimpleGraph.pathGraph 2).Adj a b) :
    simple_graph_cut_rank (SimpleGraph.pathGraph 2 □ SimpleGraph.pathGraph 2)
      ({a, b} : Finset (Fin 2 × Fin 2)) = 2
square_grid_two_cut_rank_singletonIn LeanQuantum Mechanics

On the 2-by-2 grid graph, the cut rank of a single vertex is 1.

theorem square_grid_two_cut_rank_singleton (u : Fin 2 × Fin 2) :
    simple_graph_cut_rank (SimpleGraph.pathGraph 2 □ SimpleGraph.pathGraph 2)
      ({u} : Finset (Fin 2 × Fin 2)) = 1
square_grid_two_four_parts_card_dichotomyIn LeanQuantum Mechanics

For any four-partition A, B, C, D of the four vertices of the 2-by-2 grid, either one of the parts is empty or all four parts are singletons.

theorem square_grid_two_four_parts_card_dichotomy (A B C D : Finset (Fin 2 × Fin 2))
    (hpart : is_four_partition A B C D) :
    (A = ∅ ∨ B = ∅ ∨ C = ∅ ∨ D = ∅) ∨
      (A.card = 1 ∧ B.card = 1 ∧ C.card = 1 ∧ D.card = 1)
square_grid_two_four_parts_tripartite_info_le_zeroIn LeanQuantum Mechanics

For the 2-by-2 grid graph (a 4-cycle) and every four-partition A, B, C, D of its vertices, the tripartite information is at most 0.

theorem square_grid_two_four_parts_tripartite_info_le_zero (A B C D : Finset (Fin 2 × Fin 2))
    (hpart : is_four_partition A B C D) :
    tree_graph_state_tripartite_info (SimpleGraph.pathGraph 2 □ SimpleGraph.pathGraph 2)
      A B C D ≤ 0
square_grid_two_pair_cuts_sum_ge_fourIn LeanQuantum Mechanics

For three distinct vertices a, b, c of the 2-by-2 grid, the sum of the cut ranks of the three unordered pairs {a,b}, {a,c}, {b,c} is at least 4.

theorem square_grid_two_pair_cuts_sum_ge_four (a b c : Fin 2 × Fin 2)
    (hab : a ≠ b) (hac : a ≠ c) (hbc : b ≠ c) :
    4 ≤ simple_graph_cut_rank (SimpleGraph.pathGraph 2 □ SimpleGraph.pathGraph 2)
          ({a, b} : Finset (Fin 2 × Fin 2)) +
        simple_graph_cut_rank (SimpleGraph.pathGraph 2 □ SimpleGraph.pathGraph 2)
          ({a, c} : Finset (Fin 2 × Fin 2)) +
        simple_graph_cut_rank (SimpleGraph.pathGraph 2 □ SimpleGraph.pathGraph 2)
          ({b, c} : Finset (Fin 2 × Fin 2))
square_grid_two_singletons_tripartite_info_nonposIn LeanQuantum Mechanics

For four vertices a, b, c, d of the 2-by-2 grid with a, b, c pairwise distinct, the tripartite information of the parts {a}, {b}, {c}, {d} is at most 0.

theorem square_grid_two_singletons_tripartite_info_nonpos (a b c d : Fin 2 × Fin 2)
    (hab : a ≠ b) (hac : a ≠ c) (hbc : b ≠ c) :
    tree_graph_state_tripartite_info (SimpleGraph.pathGraph 2 □ SimpleGraph.pathGraph 2)
      ({a} : Finset (Fin 2 × Fin 2)) ({b} : Finset (Fin 2 × Fin 2))
      ({c} : Finset (Fin 2 × Fin 2)) ({d} : Finset (Fin 2 × Fin 2)) ≤ 0
square_grid_two_three_distinct_has_adjacent_pairIn LeanQuantum Mechanics

Among any three distinct vertices of the 2-by-2 grid (a 4-cycle) some two are adjacent.

theorem square_grid_two_three_distinct_has_adjacent_pair (a b c : Fin 2 × Fin 2)
    (hab : a ≠ b) (hac : a ≠ c) (hbc : b ≠ c) :
    (SimpleGraph.pathGraph 2 □ SimpleGraph.pathGraph 2).Adj a b ∨
      (SimpleGraph.pathGraph 2 □ SimpleGraph.pathGraph 2).Adj a c ∨
      (SimpleGraph.pathGraph 2 □ SimpleGraph.pathGraph 2).Adj b c
square_grid_two_tripartite_info_le_zeroIn LeanQuantum Mechanics

For every four-coloring c of the 2-by-2 square grid graph state, the tripartite information is at most 0.

theorem square_grid_two_tripartite_info_le_zero
    (c : Fin 2 × Fin 2 → Fin 4) :
    square_grid_graph_tripartite_info 2 c ≤ 0
sum_ccz_edge_distribution_eq_oneIn LeanQuantum Mechanics

The induced-edge distribution of a uniformly random vertex subset is a probability distribution: its total mass is 1.

theorem sum_ccz_edge_distribution_eq_one {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] :
    ∑ F : Finset (Sym2 V), ccz_edge_distribution G F = 1
sum_rpow_le_sum_fiber_rpowIn LeanQuantum Mechanics

For α ≥ 1 and nonnegative weights p, coarsening the weight vector by pushing it forward along any map does not decrease the sum of α-th powers: ∑_i p_i^α ≤ ∑_k (∑_{i : g i = k} p_i)^α.

theorem sum_rpow_le_sum_fiber_rpow {ι κ : Type*} [Fintype ι] [Fintype κ] [DecidableEq κ]
    (p : ι → ℝ) (hp : ∀ i, 0 ≤ p i) (g : ι → κ) {α : ℝ} (hα : 1 ≤ α) :
    ∑ i : ι, p i ^ α ≤
      ∑ k : κ, (∑ i ∈ Finset.univ.filter (fun i => g i = k), p i) ^ α
symmetric_qubit_fork_diagonal_halfIn LeanQuantum Mechanics

At parameter a = 1/2, qubit_state_0 (1/2) t is 1/2 • 1, and both forks become fully diagonal: the XY fork is diagonal with entries (p/2) for the first index 0 and (1−p)·(1−q or q) for first index 1, and the XYZ fork is diagonal with entries p/4 or (1−p)·s1_j·s1_k.

theorem symmetric_qubit_fork_diagonal_half (p q t : ℝ) :
    qubit_state_0 (1 / 2) t = (1 / 2 : ℝ) • (1 : Matrix (Fin 2) (Fin 2) ℝ) ∧
    symmetric_qubit_fork_xy p (1 / 2) q t =
      Matrix.diagonal (fun ij : Fin 2 × Fin 2 => if ij.1 = 0 then p * (1 / 2) else (1 - p) * (if ij.2 = 0 then 1 - q else q)) ∧
    symmetric_qubit_fork_xyz p (1 / 2) q t =
      Matrix.diagonal (fun ijk : Fin 2 × (Fin 2 × Fin 2) =>
        if ijk.1 = 0 then p * (1 / 4) else (1 - p) * (if ijk.2.1 = 0 then 1 - q else q) * (if ijk.2.2 = 0 then 1 - q else q))
symmetric_qubit_fork_posSemidef_traceIn LeanQuantum Mechanics

Both symmetric qubit forks are density matrices: positive semidefinite with trace 1, for parameters p, a, q in [0,1] and arbitrary real t.

theorem symmetric_qubit_fork_posSemidef_trace (p a q t : ℝ) (hp : 0 ≤ p) (hp1 : p ≤ 1)
    (ha0 : 0 ≤ a) (ha1 : a ≤ 1) (hq0 : 0 ≤ q) (hq1 : q ≤ 1) :
    (symmetric_qubit_fork_xy p a q t).PosSemidef ∧ (symmetric_qubit_fork_xy p a q t).trace = 1 ∧
      (symmetric_qubit_fork_xyz p a q t).PosSemidef ∧ (symmetric_qubit_fork_xyz p a q t).trace = 1
tendsto_deficit_three_halves_of_linear_errorIn LeanQuantum Mechanics

If a sequence f(n) is asymptotically bounded between L * n^(3/2) - C₁ * n and L * n^(3/2) + C₂ * n, then f(n) / n^(3/2) tends to L.

theorem tendsto_deficit_three_halves_of_linear_error
    (f : ℕ → ℝ) (L C₁ C₂ : ℝ)
    (h_lower : ∀ᶠ (n : ℕ) in Filter.atTop, L * (n : ℝ) ^ (3 / 2 : ℝ) - C₁ * (n : ℝ) ≤ f n)
    (h_upper : ∀ᶠ (n : ℕ) in Filter.atTop, f n ≤ L * (n : ℝ) ^ (3 / 2 : ℝ) + C₂ * (n : ℝ)) :
    Filter.Tendsto (fun n : ℕ => f n / (n : ℝ) ^ (3 / 2 : ℝ)) Filter.atTop (nhds L)
thermomajorization_diff_le_oneIn LeanQuantum Mechanics

For any dimension n, probability vectors x and y in the standard simplex, and any rank j, thermomajorization_diff x y j is at most 1.

lemma thermomajorization_diff_le_one {n : ℕ} (x y : Fin n → ℝ)
    (hx : x ∈ stdSimplex ℝ (Fin n)) (hy : y ∈ stdSimplex ℝ (Fin n)) (j : ℕ) :
    thermomajorization_diff x y j ≤ 1
thermomajorization_diff_univIn LeanQuantum Mechanics

For any dimension n and probability vectors x and y in the standard simplex, the thermomajorization difference thermomajorization_diff x y n equals 0.

lemma thermomajorization_diff_univ {n : ℕ} {x y : Fin n → ℝ}
    (hx : x ∈ stdSimplex ℝ (Fin n)) (hy : y ∈ stdSimplex ℝ (Fin n)) :
    thermomajorization_diff x y n = 0
thermomajorization_fixed_budget_scalingIn LeanQuantum Mechanics

For each fixed integer budget m ≥ 1, the deficit 1 - thermomajorization_minimax_error n m in optimal nonadaptive binary probe testing of thermomajorization at uniform Gibbs weights is asymptotically equivalent along Filter.atTop to 4^(m/(2m+1)) * n^(-1/(2m+1)).

theorem thermomajorization_fixed_budget_scaling :
    ∀ (m : ℕ) (_ : 1 ≤ m),
      Asymptotics.IsEquivalent Filter.atTop
        (fun (n : ℕ) => (1 : ℝ) - thermomajorization_minimax_error n m)
        (fun (n : ℕ) => 4 ^ ((m : ℝ) / (2 * (m : ℝ) + 1)) * (n : ℝ) ^ (- (1 : ℝ) / (2 * (m : ℝ) + 1)))
thermomajorization_log_budget_scalingIn LeanQuantum Mechanics

For each fixed c > 0, the minimax missed error under a logarithmic probe budget ⌊c * Real.log n⌋₊ converges along Filter.atTop to Real.tanh (1 / (4 * c)).

theorem thermomajorization_log_budget_scaling :
    ∀ (c : ℝ) (_ : 0 < c),
      Filter.Tendsto
        (fun (n : ℕ) => thermomajorization_minimax_error n ⌊c * Real.log (n : ℝ)⌋₊)
        Filter.atTop
        (nhds (Real.tanh (1 / (4 * c))))
thermomajorization_probe_error_monoIn LeanQuantum Mechanics

For any dimension n, probe sets F₁ ⊆ F₂, and vectors x and y, thermomajorization_probe_error n F₁ x y ≤ thermomajorization_probe_error n F₂ x y.

lemma thermomajorization_probe_error_mono (n : ℕ) {F₁ F₂ : Finset ℕ} (hF : F₁ ⊆ F₂) (x y : Fin n → ℝ) :
    thermomajorization_probe_error n F₁ x y ≤ thermomajorization_probe_error n F₂ x y
thermomajorization_probe_error_nonnegIn LeanQuantum Mechanics

For any dimension n, probe set F, and vectors x and y, the detected conversion error thermomajorization_probe_error n F x y is nonnegative.

lemma thermomajorization_probe_error_nonneg (n : ℕ) (F : Finset ℕ) (x y : Fin n → ℝ) :
    0 ≤ thermomajorization_probe_error n F x y
tree_branch_parts_exists_degree_twoIn LeanQuantum Mechanics

In a tree, the two components of T - v at a degree-two vertex v, together with {v}, partition the vertex set; each component is closed except for the edge to v, and only its attachment vertex is adjacent to v.

theorem tree_branch_parts_exists_degree_two
    {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) [DecidableRel T.Adj] (hT : T.IsTree)
    {v u w : V} (hdeg : T.degree v = 2) (hu : T.Adj v u) (hw : T.Adj v w) (huw : u ≠ w) :
    ∃ U W : Finset V,
      u ∈ U ∧ w ∈ W ∧ v ∉ U ∧ v ∉ W ∧ Disjoint U W ∧
      (∀ x ∈ U, ∀ y : V, T.Adj x y → y ∈ U ∨ y = v) ∧
      (∀ x ∈ U, T.Adj x v → x = u) ∧
      (∀ x ∈ W, ∀ y : V, T.Adj x y → y ∈ W ∨ y = v) ∧
      (∀ x ∈ W, T.Adj x v → x = w) ∧
      U ∪ W ∪ {v} = Finset.univ
tree_branch_parts_exists_high_degreeIn LeanQuantum Mechanics

In a tree, at a vertex v of degree at least three, two of the components of T - v satisfy the same closure properties (closed except for the edge to v, unique attachment vertex), and there is a further neighbour of v outside both of them.

theorem tree_branch_parts_exists_high_degree
    {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) [DecidableRel T.Adj] (hT : T.IsTree)
    {v u w : V} (hdeg : 3 ≤ T.degree v) (hu : T.Adj v u) (hw : T.Adj v w) (huw : u ≠ w) :
    ∃ U W : Finset V,
      u ∈ U ∧ w ∈ W ∧ v ∉ U ∧ v ∉ W ∧ Disjoint U W ∧
      (∀ x ∈ U, ∀ y : V, T.Adj x y → y ∈ U ∨ y = v) ∧
      (∀ x ∈ U, T.Adj x v → x = u) ∧
      (∀ x ∈ W, ∀ y : V, T.Adj x y → y ∈ W ∨ y = v) ∧
      (∀ x ∈ W, T.Adj x v → x = w) ∧
      (∃ z : V, z ∉ U ∪ W ∪ {v} ∧ T.Adj v z)
tree_degree_le_two_tripartite_info_nonposIn LeanQuantum Mechanics

For a finite tree T in which every vertex has degree at most 2, and every four-partition A,B,C,D of its vertices, the tripartite information of T at A,B,C,D is at most 0.

theorem tree_degree_le_two_tripartite_info_nonpos {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) [DecidableRel T.Adj] (hT : T.IsTree)
    (hdeg : ∀ v : V, T.degree v ≤ 2)
    (A B C D : Finset V) (hpart : is_four_partition A B C D) :
    tree_graph_state_tripartite_info T A B C D ≤ 0
tree_degree_sq_sum_pathIn LeanQuantum Mechanics

For n ≥ 3, the degree-square sum of the path graph P_n on Fin n equals 4n-6.

theorem tree_degree_sq_sum_path (n : ℕ) (hn : 3 ≤ n) : tree_degree_sq_sum (SimpleGraph.pathGraph n) = 4*(n:ℤ)-6
tree_degree_sq_sum_starIn LeanQuantum Mechanics

For n ≥ 1, the degree-square sum of the star graph S_n (starGraph 0 on Fin n) equals n(n-1).

theorem tree_degree_sq_sum_star (n : ℕ) [NeZero n] : tree_degree_sq_sum (SimpleGraph.starGraph (0:Fin n)) = (n:ℤ)*((n:ℤ)-1)
tree_from_claw_tripartite_info_posIn LeanQuantum Mechanics

For every finite tree T with decidable equality and decidable adjacency, and every finite subset s : Finset V that induces a claw in T, there exists a four-partition A, B, C, D : Finset V satisfying is_four_partition A B C D such that tree_graph_state_tripartite_info T A B C D ≥ 1.

theorem tree_from_claw_tripartite_info_pos
    {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) [DecidableRel T.Adj] (hT : T.IsTree)
    (s : Finset V) (hs : is_induced_claw T s) :
    ∃ A B C D : Finset V, is_four_partition A B C D ∧
      1 ≤ tree_graph_state_tripartite_info T A B C D
tree_graph_state_tripartite_info_exists_eq_max_claw_packingIn LeanQuantum Mechanics

For every finite tree T with decidable equality and decidable adjacency, there exists a four-partition A, B, C, D : Finset V satisfying is_four_partition A B C D such that tree_graph_state_tripartite_info T A B C D = max_claw_packing T.

theorem tree_graph_state_tripartite_info_exists_eq_max_claw_packing
    {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) [DecidableRel T.Adj] (hT : T.IsTree) :
    ∃ A B C D : Finset V, is_four_partition A B C D ∧
      tree_graph_state_tripartite_info T A B C D = (max_claw_packing T : ℤ)
tree_graph_state_tripartite_info_induction_stepIn LeanQuantum Mechanics

For any finite tree T with max_claw_packing T ≥ 1 and four-partition A, B, C, D, there exists a tree T' with max_claw_packing T' < max_claw_packing T and a four-partition A', B', C', D' such that I_3(T) ≤ I_3(T') + 1.

universe u in
theorem tree_graph_state_tripartite_info_induction_step
    {V : Type u} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) [DecidableRel T.Adj] (hT : T.IsTree)
    (A B C D : Finset V) (hpart : is_four_partition A B C D)
    (hclaw : 1 ≤ max_claw_packing T) :
    ∃ (W : Type u) (_ : Fintype W) (_ : DecidableEq W)
      (T' : SimpleGraph W) (_ : DecidableRel T'.Adj) (_ : T'.IsTree)
      (A' B' C' D' : Finset W) (_ : is_four_partition A' B' C' D'),
      max_claw_packing T' < max_claw_packing T ∧
      tree_graph_state_tripartite_info T A B C D ≤
        tree_graph_state_tripartite_info T' A' B' C' D' + 1
tree_graph_state_tripartite_info_isoIn LeanQuantum Mechanics

The tripartite information is invariant under graph isomorphism: if e : G ≃g H is an isomorphism of finite simple graphs, then for every four-partition A,B,C,D of the vertices of G the images of A,B,C,D under e are again a four-partition, and the tripartite information of G at A,B,C,D equals that of H at the images.

theorem tree_graph_state_tripartite_info_iso {V W : Type*} [Fintype V] [Fintype W]
    [DecidableEq V] [DecidableEq W]
    (G : SimpleGraph V) [DecidableRel G.Adj] (H : SimpleGraph W) [DecidableRel H.Adj]
    (e : G ≃g H) (A B C D : Finset V) (hpart : is_four_partition A B C D) :
    is_four_partition (A.map e.toEquiv.toEmbedding) (B.map e.toEquiv.toEmbedding)
        (C.map e.toEquiv.toEmbedding) (D.map e.toEquiv.toEmbedding) ∧
      tree_graph_state_tripartite_info G A B C D =
        tree_graph_state_tripartite_info H (A.map e.toEquiv.toEmbedding) (B.map e.toEquiv.toEmbedding)
          (C.map e.toEquiv.toEmbedding) (D.map e.toEquiv.toEmbedding)
tree_graph_state_tripartite_info_le_max_claw_packingIn LeanQuantum Mechanics

For every finite tree T with decidable equality and decidable adjacency, and every four-partition A, B, C, D : Finset V (satisfying is_four_partition A B C D), the tripartite information tree_graph_state_tripartite_info T A B C D is at most max_claw_packing T.

theorem tree_graph_state_tripartite_info_le_max_claw_packing
    {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) [DecidableRel T.Adj] (hT : T.IsTree)
    (A B C D : Finset V) (hpart : is_four_partition A B C D) :
    tree_graph_state_tripartite_info T A B C D ≤ (max_claw_packing T : ℤ)
tree_graph_state_tripartite_info_le_simple_graph_maxIn LeanQuantum Mechanics

For any finite simple graph G and four-coloring c, the tripartite information of the partition induced by c is at most simple_graph_max_tripartite_info G.

theorem tree_graph_state_tripartite_info_le_simple_graph_max
    {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (c : V → Fin 4) :
    tree_graph_state_tripartite_info G
      (Finset.univ.filter (fun v => c v = 0))
      (Finset.univ.filter (fun v => c v = 1))
      (Finset.univ.filter (fun v => c v = 2))
      (Finset.univ.filter (fun v => c v = 3)) ≤
    simple_graph_max_tripartite_info G
tree_katz_ising_F_pathIn LeanQuantum Mechanics

For n ≥ 3, the invariant F(P_n) of the path graph equals 6440 - 3120n.

theorem tree_katz_ising_F_path (n : ℕ) (hn : 3 ≤ n) : tree_katz_ising_F (SimpleGraph.pathGraph n) = 6440 - 3120*(n:ℤ)
tree_katz_ising_F_starIn LeanQuantum Mechanics

For n ≥ 1, the invariant F(S_n) of the star graph (starGraph 0 on Fin n) equals 140n^3 - 1480n^2 + 2640n - 1300.

theorem tree_katz_ising_F_star (n : ℕ) [NeZero n] : tree_katz_ising_F (SimpleGraph.starGraph (0:Fin n)) = 140*(n:ℤ)^3 - 1480*(n:ℤ)^2 + 2640*(n:ℤ) - 1300
tree_max_claw_packing_delete_edges_leIn LeanQuantum Mechanics

For every finite tree T and edge set s, the maximum claw packing number of T.deleteEdges s is at most that of T.

theorem tree_max_claw_packing_delete_edges_le {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) (hT : T.IsTree) (s : Set (Sym2 V)) :
    max_claw_packing (T.deleteEdges s) ≤ max_claw_packing T
tree_secant_functional_eqIn LeanQuantum Mechanics

For every tree T on n ≥ 4 vertices, N(T)=N(P_n) holds (with N as above) if and only if T is isomorphic to the path P_n or to the star S_n.

theorem tree_secant_functional_eq (n : ℕ) [NeZero n] (hn : 4 ≤ n) (T : SimpleGraph (Fin n)) [DecidableRel T.Adj] (hT : T.IsTree) :
    ((n - 2 : ℤ) * tree_katz_ising_F T - 20 * (7 * (n:ℤ)^2 - 53 * (n:ℤ) + 129) * tree_degree_sq_sum T = (n - 2 : ℤ) * tree_katz_ising_F (SimpleGraph.pathGraph n) - 20 * (7 * (n:ℤ)^2 - 53 * (n:ℤ) + 129) * tree_degree_sq_sum (SimpleGraph.pathGraph n))
      ↔ Nonempty (T ≃g SimpleGraph.pathGraph n) ∨ Nonempty (T ≃g SimpleGraph.starGraph (0:Fin n))
tree_secant_functional_ineqIn LeanQuantum Mechanics

For every tree T on n ≥ 4 vertices, N(T) ≤ N(P_n) where N(G)=(n-2)F(G)-20(7n^2-53n+129)D(G); i.e. the sharp degree-invariant tree inequality tight at the path (and star).

theorem tree_secant_functional_ineq (n : ℕ) [NeZero n] (hn : 4 ≤ n) (T : SimpleGraph (Fin n)) [DecidableRel T.Adj] (hT : T.IsTree) :
    (n - 2 : ℤ) * tree_katz_ising_F T - 20 * (7 * (n:ℤ)^2 - 53 * (n:ℤ) + 129) * tree_degree_sq_sum T
      ≤ (n - 2 : ℤ) * tree_katz_ising_F (SimpleGraph.pathGraph n) - 20 * (7 * (n:ℤ)^2 - 53 * (n:ℤ) + 129) * tree_degree_sq_sum (SimpleGraph.pathGraph n)
tree_secant_gap_identityIn LeanQuantum Mechanics

For n ≥ 4 and any graph T on Fin n, the difference between the two sides of the target's secant inequality, (F(T)-F(P))·(D(S)-D(P)) - (F(S)-F(P))·(D(T)-D(P)), equals (n-3) times N(T)-N(P), where N(G)=(n-2)F(G)-20(7n^2-53n+129)D(G). So the target inequality is equivalent (n≥4) to N(T)≤N(P), and its equality to N(T)=N(P).

theorem tree_secant_gap_identity (n : ℕ) [NeZero n] (hn : 4 ≤ n)
    (T : SimpleGraph (Fin n)) [DecidableRel T.Adj] :
    (tree_katz_ising_F T - tree_katz_ising_F (SimpleGraph.pathGraph n)) *
        (tree_degree_sq_sum (SimpleGraph.starGraph (0:Fin n)) - tree_degree_sq_sum (SimpleGraph.pathGraph n)) -
      (tree_katz_ising_F (SimpleGraph.starGraph (0:Fin n)) - tree_katz_ising_F (SimpleGraph.pathGraph n)) *
        (tree_degree_sq_sum T - tree_degree_sq_sum (SimpleGraph.pathGraph n)) =
    (n - 3 : ℤ) *
      ((n - 2 : ℤ) * (tree_katz_ising_F T - tree_katz_ising_F (SimpleGraph.pathGraph n)) -
        20 * (7 * (n:ℤ)^2 - 53 * (n:ℤ) + 129) * (tree_degree_sq_sum T - tree_degree_sq_sum (SimpleGraph.pathGraph n)))
tree_submatrix_card_addChar_kerIn LeanQuantum Mechanics

The number of additive characters from the kernel tree_submatrix_ker T S into ℝ is 2^(tree_submatrix_dim T S).

theorem tree_submatrix_card_addChar_ker
    {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) [DecidableRel T.Adj] (S : Finset V) :
    Fintype.card (AddChar (tree_submatrix_ker T S) ℝ) = 2 ^ (tree_submatrix_dim T S)
triangle_free_neighbor_set_independentIn LeanQuantum Mechanics

In a triangle-free simple graph, the open neighbor set of any vertex is an independent set.

theorem triangle_free_neighbor_set_independent {V : Type*} [DecidableEq V]
    (G : SimpleGraph V) (hG : G.CliqueFree 3) (v : V) :
    ∀ u w : V, u ∈ G.neighborSet v → w ∈ G.neighborSet v → ¬G.Adj u w
two_qubit_bell_fidelity_ge_candidateIn LeanQuantum Mechanics

For every real number ε with 0 ≤ ε and ε ≤ Real.log 2, two_qubit_candidate_fidelity_bound ε ≤ two_qubit_min_bell_fidelity ε.

theorem two_qubit_bell_fidelity_ge_candidate (ε : ℝ) (hε0 : 0 ≤ ε) (hε1 : ε ≤ Real.log 2) :
    two_qubit_candidate_fidelity_bound ε ≤ two_qubit_min_bell_fidelity ε
two_qubit_candidate_state_fully_entangled_fractionIn LeanQuantum Mechanics

For all real numbers p and q satisfying 0 ≤ p ≤ 1 and 0 ≤ q ≤ 1, the fully entangled fraction of candidate_density_matrix p q equals max (p * (1 + 2 * Real.sqrt (q * (1 - q))) / 2) ((1 - p) / 2).

theorem two_qubit_candidate_state_fully_entangled_fraction (p q : ℝ) (hp0 : 0 ≤ p) (hp1 : p ≤ 1)
    (hq0 : 0 ≤ q) (hq1 : q ≤ 1) :
    fully_entangled_fraction (candidate_density_matrix p q) =
      max (p * (1 + 2 * Real.sqrt (q * (1 - q))) / 2) ((1 - p) / 2)
two_qubit_candidate_state_trace_left_entropyIn LeanQuantum Mechanics

For all real numbers p and q satisfying 0 ≤ p ≤ 1 and 0 ≤ q ≤ 1, the von Neumann entropy of the partial trace of candidate_density_matrix p q is equal to binary_entropy_nats (p * q).

theorem two_qubit_candidate_state_trace_left_entropy (p q : ℝ) (hp0 : 0 ≤ p) (hp1 : p ≤ 1)
    (hq0 : 0 ≤ q) (hq1 : q ≤ 1) :
    von_neumann_entropy (Matrix.traceLeft (candidate_density_matrix p q)) = binary_entropy_nats (p * q)
two_qubit_candidate_state_von_neumann_entropyIn LeanQuantum Mechanics

For all real numbers p and q satisfying 0 ≤ p ≤ 1 and 0 ≤ q ≤ 1, the von Neumann entropy of candidate_density_matrix p q is equal to binary_entropy_nats p.

theorem two_qubit_candidate_state_von_neumann_entropy (p q : ℝ) (hp0 : 0 ≤ p) (hp1 : p ≤ 1)
    (hq0 : 0 ≤ q) (hq1 : q ≤ 1) :
    von_neumann_entropy (candidate_density_matrix p q) = binary_entropy_nats p
xz_matrix_a_applyIn LeanQuantum Mechanics

For all s t : Fin L → Fin 2, the (s,t) entry of xz_matrix_a L is 2^{-L} times the product over sites j of the xz_pauli matrix entry at (s j, t j) for the label determined by whether s and t agree at j and at the cyclic successor of j.

theorem xz_matrix_a_apply (L : ℕ) (s t : Fin L → Fin 2) : (xz_matrix_a L) s t = (1 / (2 : ℂ) ^ L) * ∏ j : Fin L, (xz_pauli (if s j = t j then 1 else 0) (if s (xz_cyclic_succ j) = t (xz_cyclic_succ j) then 1 else 0)).toMatrix (s j) (t j)
xz_purity_eq_trace_transfer_matrix_powIn LeanQuantum Mechanics

For every natural number L ≥ 1, the purity Matrix.trace ((xz_rho L) * (xz_rho L)) equals (1 / (16 : ℂ) ^ L) * Matrix.trace (xz_transfer_matrix ^ L).

theorem xz_purity_eq_trace_transfer_matrix_pow (L : ℕ) (hL : 1 ≤ L) : Matrix.trace ((xz_rho L) * (xz_rho L)) = (1 / (16 : ℂ) ^ L) * Matrix.trace (xz_transfer_matrix ^ L)
xz_replica_transfer_matrix_one_trace_powIn LeanQuantum Mechanics

For every 1 ≤ L, the trace of the L-th power of the q = 1 replica transfer matrix is 4^L.

theorem xz_replica_transfer_matrix_one_trace_pow (L : ℕ) (hL : 1 ≤ L) : Matrix.trace ((xz_replica_transfer_matrix 1) ^ L) = (4 : ℂ) ^ L
xz_replica_transfer_trace_doublingIn LeanQuantum Mechanics

For 1 ≤ q and odd L, the trace of the (2*L)-th power of the q-replica transfer matrix equals the square of the trace of its L-th power.

theorem xz_replica_transfer_trace_doubling (q L : ℕ) (hq : 1 ≤ q) (hodd : Odd L) : Matrix.trace ((xz_replica_transfer_matrix q) ^ (2 * L)) = (Matrix.trace ((xz_replica_transfer_matrix q) ^ L)) ^ 2
xz_scar_reduced_spectrum_doubling_power_sumsIn LeanQuantum Mechanics

For odd L ≥ 1 and every q ≥ 1: tr((xz_rho (2*L))^q) = (tr((xz_rho L)^q))^2. The full moment tower, not just the purity q = 2.

theorem xz_scar_reduced_spectrum_doubling_power_sums (L q : ℕ) (hL : 1 ≤ L) (hq : 1 ≤ q) (hodd : Odd L) : Matrix.trace ((xz_rho (2 * L)) ^ q) = (Matrix.trace ((xz_rho L) ^ q)) ^ 2
xz_trace_rho_pow_eq_replica_transferIn LeanQuantum Mechanics

For 1 ≤ L and 1 ≤ q: tr((xz_rho L)^q) = 2^(-(2qL)) * tr((xz_replica_transfer_matrix q)^L).

theorem xz_trace_rho_pow_eq_replica_transfer (L q : ℕ) (hL : 1 ≤ L) (hq : 1 ≤ q) : Matrix.trace ((xz_rho L) ^ q) = (1 / (2 : ℂ) ^ (2 * q * L)) * Matrix.trace ((xz_replica_transfer_matrix q) ^ L)
xz_transfer_matrix_trace_doubling_of_oddIn LeanQuantum Mechanics

For every odd natural number L, the trace of the (2 * L)-th power of the 16x16 Pauli transfer matrix xz_transfer_matrix equals the square of the trace of its L-th power.

theorem xz_transfer_matrix_trace_doubling_of_odd (L : ℕ) (hodd : Odd L) : Matrix.trace (xz_transfer_matrix ^ (2 * L)) = (Matrix.trace (xz_transfer_matrix ^ L)) ^ 2
cubic_card_edgesIn LeanStatistical Mechanics & Thermodynamics

In any finite 3-regular simple graph, twice the number of edges equals three times the number of vertices.

theorem cubic_card_edges {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hreg : G.IsRegularOfDegree 3) :
    2 * (G.edgeFinset.card : ℝ) = 3 * (Fintype.card V : ℝ)
cubic_divergence_of_signs_sq_sum_geIn LeanStatistical Mechanics & Thermodynamics

For any assignment of ±1 signs to the edges of an oriented 3-regular simple graph, the vertex divergence at each vertex is an odd integer (hence has absolute value at least 1), so the sum of squared vertex divergences is at least |V|.

theorem cubic_divergence_of_signs_sq_sum_ge
    {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hreg : G.IsRegularOfDegree 3)
    (o : SimpleGraphOrientation G)
    (s : G.edgeFinset → ℝ)
    (hs : ∀ e, s e = 1 ∨ s e = -1) :
    (∑ v : V, (∑ e, ((if (o.dir e).1 = v then s e else 0) - if (o.dir e).2 = v then s e else 0))^2) ≥
      (Fintype.card V : ℝ)
cubic_edge_entropy_asymptotic_oneIn LeanStatistical Mechanics & Thermodynamics

The edge entropy phi(t)=|t|log((1+|t|)/(1-|t|)) satisfies phi(t)/log(1/(1-t)) -> 1 as t -> 1 from below.

theorem cubic_edge_entropy_asymptotic_one :
    Filter.Tendsto
      (fun t : ℝ => cubic_edge_entropy t / Real.log (1 / (1 - t)))
      (nhdsWithin (1:ℝ) (Set.Iio (1:ℝ))) (nhds (1:ℝ))
cubic_edge_entropy_scaled_vanishesIn LeanStatistical Mechanics & Thermodynamics

The half-edge entropy term phi(t/2)/log(1/(1-t)) -> 0 as t -> 1 from below (phi(1/2) is finite while the log diverges).

theorem cubic_edge_entropy_scaled_vanishes :
    Filter.Tendsto
      (fun t : ℝ => cubic_edge_entropy (t/2) / Real.log (1 / (1 - t)))
      (nhdsWithin (1:ℝ) (Set.Iio (1:ℝ))) (nhds (0:ℝ))
cubic_gradient_sq_sum_leIn LeanStatistical Mechanics & Thermodynamics

For any potential phi on the vertices of a finite 3-regular simple graph with orientation o, the sum of (phi(u) - phi(v))^2 over all edges is at most 6 times the sum of phi(v)^2 over all vertices.

theorem cubic_gradient_sq_sum_le
    {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hreg : G.IsRegularOfDegree 3)
    (o : SimpleGraphOrientation G)
    (phi : V → ℝ) :
    (∑ e : G.edgeFinset, (phi (o.dir e).1 - phi (o.dir e).2)^2) ≤
      6 * ∑ v : V, (phi v)^2
cubic_half_integral_current_existsIn LeanStatistical Mechanics & Thermodynamics

Every finite bridgeless cubic simple graph admits a half-integral stationary current whose absolute edge currents sum to the number of vertices.

theorem cubic_half_integral_current_exists
    {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hreg : G.IsRegularOfDegree 3)
    (hbridge : ∀ e ∈ G.edgeSet, ¬ G.IsBridge e)
    (o : SimpleGraphOrientation G) :
    ∃ j : G.edgeFinset → ℝ,
      is_stationary_current G o j ∧
      is_half_integral_current G j ∧
      ∑ e : G.edgeFinset, |j e| = Fintype.card V
cubic_half_integral_cycle_bipartite_coloringIn LeanStatistical Mechanics & Thermodynamics

For any finite simple cubic graph G with orientation o and any half-integral stationary current j on G.edgeFinset with sum of |j(e)| equal to the number of vertices n, there exists a 2-coloring of the vertices such that every edge e with |j(e)| = 1/2 has different colors on its endpoints.

theorem cubic_half_integral_cycle_bipartite_coloring
    {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hreg : G.IsRegularOfDegree 3)
    (o : SimpleGraphOrientation G)
    (j : G.edgeFinset → ℝ)
    (hj_stat : is_stationary_current G o j)
    (hj_half : is_half_integral_current G j)
    (hj_sum : ∑ e : G.edgeFinset, |j e| = Fintype.card V) :
    ∃ c : V → Bool, ∀ e : G.edgeFinset, |j e| = 1/2 →
      Sym2.lift ⟨fun u v => c u == c v, fun _ _ => by dsimp; rw [Bool.beq_comm]⟩ e.1 = false
cubic_half_integral_saturated_edges_ge_bipartite_frustration_boundIn LeanStatistical Mechanics & Thermodynamics

For any finite bridgeless cubic simple graph G with orientation o, the minimal number of saturated edges b(G) among half-integral stationary currents of total capacity n is at least ceil((n + f(G))/2).

theorem cubic_half_integral_saturated_edges_ge_bipartite_frustration_bound
    {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hreg : G.IsRegularOfDegree 3)
    (hbridge : ∀ e ∈ G.edgeSet, ¬ G.IsBridge e)
    (o : SimpleGraphOrientation G) :
    ⌈((Fintype.card V : ℝ) + (bipartite_frustration G : ℝ)) / 2⌉₊ ≤
      cubic_half_integral_saturated_edges_min G o
cubic_half_integral_saturated_edges_min_nullIn LeanStatistical Mechanics & Thermodynamics

For the empty graph (card V = 0) the invariant b(G) equals 0.

theorem cubic_half_integral_saturated_edges_min_null
    {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (o : SimpleGraphOrientation G)
    (h : Fintype.card V = 0) :
    cubic_half_integral_saturated_edges_min G o = 0
cubic_half_integral_vertex_abs_sumIn LeanStatistical Mechanics & Thermodynamics

For a half-integral stationary current with total |j| = n on a cubic graph, at every vertex the sum of |j_e| over the three incident edges equals exactly 2.

theorem cubic_half_integral_vertex_abs_sum
    {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hreg : G.IsRegularOfDegree 3)
    (o : SimpleGraphOrientation G)
    (j : ↥G.edgeFinset → ℝ)
    (hj_stat : is_stationary_current G o j)
    (hj_half : is_half_integral_current G j)
    (hj_sum : ∑ e : G.edgeFinset, |j e| = (Fintype.card V : ℝ))
    (v : V) :
    (∑ e : G.edgeFinset, if (o.dir e).1 = v then |j e| else 0) +
    (∑ e : G.edgeFinset, if (o.dir e).2 = v then |j e| else 0) = 2
cubic_signing_potential_dissipation_energyIn LeanStatistical Mechanics & Thermodynamics

Combinatorial core of the sharp inequality: for every signing s of the edges of a cubic graph with |s_e| ≤ 1 there is a potential u : V → ℝ whose squared deviation from matching s on the edges is at most 4n/3 − f/6, where f is the bipartite frustration index of G.

theorem cubic_signing_potential_dissipation_energy
    {V : Type*} [Fintype V] [Nonempty V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hreg : G.IsRegularOfDegree 3)
    (o : SimpleGraphOrientation G)
    (s : G.edgeFinset → ℝ) (hs : ∀ e, |s e| ≤ 1) :
    ∃ u : V → ℝ, ∑ e : G.edgeFinset,
        (u (o.dir e).1 - u (o.dir e).2 - s e)^2 ≤
      (4 * (Fintype.card V : ℝ) / 3 - (bipartite_frustration G : ℝ) / 6)
cubic_stationary_current_gradient_orthogonalityIn LeanStatistical Mechanics & Thermodynamics

A stationary current is orthogonal to every gradient: for any potential u : V → ℝ, the sum over the edges of j_e times the oriented difference of u vanishes.

theorem cubic_stationary_current_gradient_orthogonality
    {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (o : SimpleGraphOrientation G)
    (j : G.edgeFinset → ℝ)
    (hj : is_stationary_current G o j)
    (u : V → ℝ) :
    ∑ e : G.edgeFinset, j e * (u (o.dir e).1 - u (o.dir e).2) = 0
cubic_stationary_current_naive_dissipation_boundIn LeanStatistical Mechanics & Thermodynamics

For any nonempty finite simple cubic graph G on n vertices, any orientation o of G, and any stationary current j on G, the squared sum of |j_e| over all edges e is at most (4n/3) times the sum of j_e^2 over all edges e.

theorem cubic_stationary_current_naive_dissipation_bound
    {V : Type*} [Fintype V] [Nonempty V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hreg : G.IsRegularOfDegree 3)
    (o : SimpleGraphOrientation G)
    (j : G.edgeFinset → ℝ)
    (hj : is_stationary_current G o j) :
    (∑ e : G.edgeFinset, |j e|)^2 ≤
      (4 * (Fintype.card V : ℝ) / 3) * ∑ e : G.edgeFinset, (j e)^2
cubic_stationary_current_reduces_to_signing_potentialIn LeanStatistical Mechanics & Thermodynamics

If every signing s with |s_e| ≤ 1 admits a potential u with ∑_e (u_{e.1} - u_{e.2} - s_e)^2 ≤ 4n/3 - f/6, then the sharp dissipation bound holds for every stationary current: (∑_e |j_e|)^2 ≤ (4n/3 - f/6) · ∑_e j_e^2.

theorem cubic_stationary_current_reduces_to_signing_potential
    {V : Type*} [Fintype V] [Nonempty V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hreg : G.IsRegularOfDegree 3)
    (o : SimpleGraphOrientation G)
    (hsign : ∀ (s : G.edgeFinset → ℝ), (∀ e, |s e| ≤ 1) →
      ∃ u : V → ℝ, ∑ e : G.edgeFinset,
        (u (o.dir e).1 - u (o.dir e).2 - s e)^2 ≤
      (4 * (Fintype.card V : ℝ) / 3 - (bipartite_frustration G : ℝ) / 6)) :
    ∀ (j : G.edgeFinset → ℝ), is_stationary_current G o j →
    (∑ e : G.edgeFinset, |j e|)^2 ≤
      (4 * (Fintype.card V : ℝ) / 3 - (bipartite_frustration G : ℝ) / 6) *
        ∑ e : G.edgeFinset, (j e)^2
cubic_stationary_entropy_ratio_lower_boundIn LeanStatistical Mechanics & Thermodynamics

Lower limit bound: eventually (as J -> n from below), the infimal stationary entropy production S_G(J) is at least (b(G)-eps)*log(1/(1-J/n)). Equivalently liminf of the ratio is >= b(G).

theorem cubic_stationary_entropy_ratio_lower_bound
    {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hreg : G.IsRegularOfDegree 3)
    (hbridge : ∀ e ∈ G.edgeSet, ¬ G.IsBridge e)
    (o : SimpleGraphOrientation G) :
    ∀ ε : ℝ, 0 < ε → ∀ᶠ J : ℝ in
      nhdsWithin (Fintype.card V : ℝ) (Set.Iio (Fintype.card V : ℝ)),
      ((cubic_half_integral_saturated_edges_min G o : ℝ) - ε) *
          Real.log (1 / (1 - J / (Fintype.card V : ℝ))) ≤
        cubic_stationary_entropy_inf G o J
cubic_stationary_entropy_ratio_tendsto_half_integral_saturatedIn LeanStatistical Mechanics & Thermodynamics

For any finite bridgeless cubic simple graph G on n vertices with orientation o, the ratio of the infimal stationary entropy production S_G(J) to log(1/(1-J/n)) tends to b(G) as J approaches n from below within the interval (-infinity, n).

theorem cubic_stationary_entropy_ratio_tendsto_half_integral_saturated
    {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hreg : G.IsRegularOfDegree 3)
    (hbridge : ∀ e ∈ G.edgeSet, ¬ G.IsBridge e)
    (o : SimpleGraphOrientation G) :
    Filter.Tendsto
      (fun J : ℝ => cubic_stationary_entropy_inf G o J /
        Real.log (1 / (1 - J / (Fintype.card V : ℝ))))
      (nhdsWithin (Fintype.card V : ℝ) (Set.Iio (Fintype.card V : ℝ)))
      (nhds (cubic_half_integral_saturated_edges_min G o : ℝ))
cubic_stationary_entropy_ratio_upper_boundIn LeanStatistical Mechanics & Thermodynamics

Upper limit bound: eventually (as J -> n from below), the infimal stationary entropy production S_G(J) is at most (b(G)+eps)*log(1/(1-J/n)).

theorem cubic_stationary_entropy_ratio_upper_bound
    {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hreg : G.IsRegularOfDegree 3)
    (hbridge : ∀ e ∈ G.edgeSet, ¬ G.IsBridge e)
    (o : SimpleGraphOrientation G) :
    ∀ ε : ℝ, 0 < ε → ∀ᶠ J : ℝ in
      nhdsWithin (Fintype.card V : ℝ) (Set.Iio (Fintype.card V : ℝ)),
      cubic_stationary_entropy_inf G o J ≤
        ((cubic_half_integral_saturated_edges_min G o : ℝ) + ε) *
          Real.log (1 / (1 - J / (Fintype.card V : ℝ)))
energy_filter_centered_binomial_shift_correlationIn LeanStatistical Mechanics & Thermodynamics

For natural k and h, the autocorrelation at nonnegative shift h of the zero-extended centered weights is choose(4k,2k+h) divided by choose(2k,k)².

theorem energy_filter_centered_binomial_shift_correlation (k h : ℕ) :
    (∑' t : ℤ, energy_filter_centered_binomial_weight k t *
      energy_filter_centered_binomial_weight k (t + (h : ℤ))) =
      (Nat.choose (4 * k) (2 * k + h) : ℝ) / (Nat.choose (2 * k) k : ℝ) ^ 2
energy_filter_centered_binomial_shift_l2_vanishIn LeanStatistical Mechanics & Thermodynamics

For any fixed integer h, the sum of squared differences between the centered binomial weights and their shift by h, divided by √k, tends to zero.

theorem energy_filter_centered_binomial_shift_l2_vanish (h : ℤ) :
    Filter.Tendsto (fun k : ℕ =>
      (∑' t : ℤ, (energy_filter_centered_binomial_weight k (t + h) -
        energy_filter_centered_binomial_weight k t) ^ 2) / Real.sqrt (k : ℝ))
      Filter.atTop (nhds 0)
energy_filter_centered_binomial_square_mass_asymptoticIn LeanStatistical Mechanics & Thermodynamics

The sum of squared centered binomial weights divided by √k tends to √(π/2).

theorem energy_filter_centered_binomial_square_mass_asymptotic :
    Filter.Tendsto (fun k : ℕ =>
      (∑' t : ℤ, energy_filter_centered_binomial_weight k t ^ 2) / Real.sqrt (k : ℝ))
      Filter.atTop (nhds (Real.sqrt (Real.pi / 2)))
energy_filter_char_sumIn LeanStatistical Mechanics & Thermodynamics

Character sum of the two-species energies: for every t, the sum over all configurations s of exp(I * e(s) * t) equals (2 cos t)^k * (2 cos(alpha t))^k, where e(s) = sum_j (if s.1 j then 1 else -1) + alpha * sum_j (if s.2 j then 1 else -1).

theorem energy_filter_char_sum (k : ℕ) (α t : ℝ) :
    let e : (Fin k → Bool) × (Fin k → Bool) → ℝ :=
      fun s => (∑ j, if s.1 j then (1:ℝ) else -1) + α * ∑ j, if s.2 j then (1:ℝ) else -1;
    (∑ s : (Fin k → Bool) × (Fin k → Bool),
        Complex.exp (Complex.I * ((e s : ℝ) : ℂ) * (t : ℂ)))
      = (((2 * Real.cos t) ^ k * (2 * Real.cos (α * t)) ^ k : ℝ) : ℂ)
energy_filter_cos_abs_eq_one_iffIn LeanStatistical Mechanics & Thermodynamics

For any real x, |cos x| = 1 if and only if x = n * pi for some integer n.

theorem energy_filter_cos_abs_eq_one_iff (x : ℝ) :
    |Real.cos x| = 1 ↔ ∃ n : ℤ, x = (n : ℝ) * Real.pi
energy_filter_critical_gaussian_kernel_integral_fourIn LeanStatistical Mechanics & Thermodynamics

The integral of the fourth power of the critical Gaussian kernel g(x)^4 over the real line equals 4 / (pi * sqrt pi).

theorem energy_filter_critical_gaussian_kernel_integral_four :
    ∫ x : ℝ, (energy_filter_critical_gaussian_kernel x) ^ 4 = 4 / (Real.pi * Real.sqrt Real.pi)
energy_filter_critical_gaussian_kernel_integral_sqIn LeanStatistical Mechanics & Thermodynamics

The integral of the squared critical Gaussian kernel g(x)^2 over the real line equals sqrt(2 / pi).

theorem energy_filter_critical_gaussian_kernel_integral_sq :
    ∫ x : ℝ, (energy_filter_critical_gaussian_kernel x) ^ 2 = Real.sqrt (2 / Real.pi)
energy_filter_critical_overlap_integral_tendstoIn LeanStatistical Mechanics & Thermodynamics

As c approaches 0 from above, the scaled overlap integral D_c / c converges to sqrt(2 / pi).

theorem energy_filter_critical_overlap_integral_tendsto :
    Filter.Tendsto (fun c => energy_filter_critical_overlap_integral c / c)
      (nhdsWithin 0 (Set.Ioi 0))
      (nhds (Real.sqrt (2 / Real.pi)))
energy_filter_critical_window_integral_sq_tendstoIn LeanStatistical Mechanics & Thermodynamics

As c approaches 0 from above, the scaled numerator integral (∫ g^2 F_c^2) / c^2 converges to 4 / (pi * sqrt pi).

theorem energy_filter_critical_window_integral_sq_tendsto :
    Filter.Tendsto
      (fun c => (∫ x, (energy_filter_critical_gaussian_kernel x) ^ 2 *
        (energy_filter_critical_window_integral c x) ^ 2) / c ^ 2)
      (nhdsWithin 0 (Set.Ioi 0))
      (nhds (4 / (Real.pi * Real.sqrt Real.pi)))
energy_filter_crossover_linvIn LeanStatistical Mechanics & Thermodynamics

The inverse of the 3x3 matrix L with diagonal 2 and adjacent off-diagonal entries -1 is (1/4) times the matrix with rows (3,2,1), (2,4,2), (1,2,3).

theorem energy_filter_crossover_linv :
    (let L : Matrix (Fin 3) (Fin 3) ℝ := !![2, -1, 0; -1, 2, -1; 0, -1, 2]
     L⁻¹) = (1/4 : ℝ) • (!![3,2,1; 2,4,2; 1,2,3] : Matrix (Fin 3) (Fin 3) ℝ)
energy_filter_crossover_quad_form_coerciveIn LeanStatistical Mechanics & Thermodynamics

For every v in R^3, v_1^2 + v_2^2 + v_3^2 <= 4 * (v^T L^{-1} v); hence the quadratic form is coercive and dominates the Euclidean norm.

theorem energy_filter_crossover_quad_form_coercive (v : Fin 3 → ℝ) :
    (v 0)^2 + (v 1)^2 + (v 2)^2
      ≤ 4 * (let L : Matrix (Fin 3) (Fin 3) ℝ := !![2, -1, 0; -1, 2, -1; 0, -1, 2]
             dotProduct v (Matrix.mulVec L⁻¹ v))
energy_filter_crossover_quad_form_neg_middleIn LeanStatistical Mechanics & Thermodynamics

For all reals a, b, c, the quadratic form v^T L^{-1} v (L the 3x3 matrix with diagonal 2 and adjacent off-diagonals -1) evaluated at the vector (a, -b, c) equals (3/4)a^2 + b^2 + (3/4)c^2 - ab + (1/2)ac - bc.

theorem energy_filter_crossover_quad_form_neg_middle (a b c : ℝ) :
    (let L : Matrix (Fin 3) (Fin 3) ℝ := !![2, -1, 0; -1, 2, -1; 0, -1, 2]
     let v : Fin 3 → ℝ := ![a, -b, c]
     dotProduct v (Matrix.mulVec L⁻¹ v))
    = (3/4) * a^2 + b^2 + (3/4) * c^2 - a * b + (1/2) * a * c - b * c
energy_filter_crossover_quad_form_sosIn LeanStatistical Mechanics & Thermodynamics

For every v in R^3, the quadratic form v^T L^{-1} v equals ((v_1+v_2)^2 + (v_2+v_3)^2)/2 + (v_1+v_3)^2/4, an explicit sum of squares.

theorem energy_filter_crossover_quad_form_sos (v : Fin 3 → ℝ) :
    (let L : Matrix (Fin 3) (Fin 3) ℝ := !![2, -1, 0; -1, 2, -1; 0, -1, 2]
     dotProduct v (Matrix.mulVec L⁻¹ v))
    = ((v 0 + v 1)^2 + (v 1 + v 2)^2) / 2 + (v 0 + v 2)^2 / 4
energy_filter_crossover_s4_posIn LeanStatistical Mechanics & Thermodynamics

For tau > 0, coprime positive p, q and real c, the three-dimensional theta sum S_4 = sum over v in Z^3 of exp(-pi^2 q^2 (v^T L^{-1} v)/tau^2 - pi^2 c^2 q^4 (v^2 + (v_1+v_2+v_3)^2)/(8(p^2+q^2))) is strictly positive.

theorem energy_filter_crossover_s4_pos
    (τ : ℝ) (hτ : 0 < τ) (p q : ℕ) (hp : 0 < p) (hq : 0 < q) (c : ℝ) :
    let L : Matrix (Fin 3) (Fin 3) ℝ := !![2, -1, 0; -1, 2, -1; 0, -1, 2]
    let D : ℝ := (p : ℝ)^2 + (q : ℝ)^2
    let S4 : ℝ := ∑' (v : Fin 3 → ℤ),
      let vR : Fin 3 → ℝ := fun i => (v i : ℝ)
      let vT_Linv_v := dotProduct vR (Matrix.mulVec L⁻¹ vR)
      let quad2 := dotProduct vR vR + (∑ i : Fin 3, vR i)^2
      Real.exp (- (Real.pi^2 * (q:ℝ)^2 * vT_Linv_v / τ^2) -
        (Real.pi^2 * c^2 * (q:ℝ)^4 * quad2 / (8 * D)))
    0 < S4
energy_filter_crossover_s4_summableIn LeanStatistical Mechanics & Thermodynamics

For tau > 0 and coprime positive p, q and real c, the summand v : Z^3 |-> exp(-pi^2 q^2 (v^T L^{-1} v)/tau^2 - pi^2 c^2 q^4 (v^T v + (v_1+v_2+v_3)^2)/(8(p^2+q^2))) is summable.

theorem energy_filter_crossover_s4_summable
    (τ : ℝ) (hτ : 0 < τ) (p q : ℕ) (hp : 0 < p) (hq : 0 < q) (c : ℝ) :
    let L : Matrix (Fin 3) (Fin 3) ℝ := !![2, -1, 0; -1, 2, -1; 0, -1, 2]
    let D : ℝ := (p : ℝ)^2 + (q : ℝ)^2
    Summable (fun v : Fin 3 → ℤ =>
      let vR : Fin 3 → ℝ := fun i => (v i : ℝ)
      let vT_Linv_v := dotProduct vR (Matrix.mulVec L⁻¹ vR)
      let quad2 := dotProduct vR vR + (∑ i : Fin 3, vR i)^2
      Real.exp (- (Real.pi^2 * (q:ℝ)^2 * vT_Linv_v / τ^2) -
        (Real.pi^2 * c^2 * (q:ℝ)^4 * quad2 / (8 * D))))
energy_filter_delta_memlp_four_thirdsIn LeanStatistical Mechanics & Thermodynamics

The Kronecker delta sequence on Z (1 at 0, 0 elsewhere) belongs to the weighted Lebesgue space l^{4/3}.

theorem energy_filter_delta_memlp_four_thirds : Memℓp (fun j : ℤ => if j = 0 then (1 : ℝ) else 0) ((4 / 3 : ENNReal))
energy_filter_delta_purity_limit_of_universalIn LeanStatistical Mechanics & Thermodynamics

If the universal lattice-purity limit holds for every nonzero l^{4/3} sequence a, then the scaled purity of the Kronecker delta filter converges to 2 / sqrt(pi).

theorem energy_filter_delta_purity_limit_of_universal
    (huni : ∀ (a : ℤ → ℝ), a ≠ 0 → Memℓp a ((4 / 3 : ENNReal)) →
      Filter.Tendsto
        (fun k : ℕ => Real.sqrt (4 * (k : ℝ)) * energy_filter_sequence_purity a k)
        Filter.atTop (nhds (energy_filter_sequence_purity_constant a))) :
    let delta : ℤ → ℝ := fun j => if j = 0 then 1 else 0
    Filter.Tendsto
      (fun k : ℕ => Real.sqrt (4 * (k : ℝ)) * energy_filter_sequence_purity delta k)
      Filter.atTop
      (nhds (2 / Real.sqrt Real.pi))
energy_filter_fourier_exp_orthogonalityIn LeanStatistical Mechanics & Thermodynamics

The interval integral of exp(i * n * θ) over [0, 2 pi] equals 2 pi if n = 0 and 0 otherwise.

theorem energy_filter_fourier_exp_orthogonality (n : ℤ) :
    ∫ θ in (0 : ℝ)..(2 * Real.pi), Complex.exp (Complex.I * (n : ℝ) * (θ : ℝ)) =
      if n = 0 then (2 * Real.pi : ℂ) else 0
energy_filter_fourier_integral_four_eq_s4In LeanStatistical Mechanics & Thermodynamics

For any finitely supported real sequence a on Z, the normalized L^4 integral of its Fourier symbol over [0, 2 pi] equals the fourth-moment discrete convolution sum.

theorem energy_filter_fourier_integral_four_eq_s4 (a : ℤ → ℝ) (ha_fin : Function.HasFiniteSupport a) :
    (1 / (2 * Real.pi)) * ∫ θ in (0 : ℝ)..(2 * Real.pi),
      ‖energy_filter_fourier_symbol a θ‖ ^ (2 * (2 : ℝ)) =
      ∑' m : ℤ, (∑' j : ℤ, a j * a (m - j))^2
energy_filter_laplace_one_dim_irrationalIn LeanStatistical Mechanics & Thermodynamics

For irrational alpha > 0 the scaled one-dimensional Gaussian integral satisfies sqrt(k) * I1(k,tau,alpha) / 16^k -> sqrt(pi/(1 + alpha^2)).

theorem energy_filter_laplace_one_dim_irrational (τ α : ℝ) (hτ : 0 < τ) (hirr : Irrational α) :
    Filter.Tendsto
      (fun k : ℕ => Real.sqrt (k:ℝ) * energy_filter_integral_1d k τ α / 16 ^ k)
      Filter.atTop (nhds (Real.sqrt (Real.pi / (1 + α^2))))
energy_filter_laplace_one_dim_rationalIn LeanStatistical Mechanics & Thermodynamics

For alpha = p/q in lowest terms, sqrt(k) * I1(k,tau,p/q)/16^k tends to sqrt(pi/(1+(p/q)^2)) times P2 = sum over m in Z of exp(-(pi m)^2/(2 tau^2 (1/q)^2)).

theorem energy_filter_laplace_one_dim_rational (τ : ℝ) (hτ : 0 < τ) (p q : ℕ) (hp : 0 < p)
    (hq : 0 < q) (hcop : Nat.Coprime p q) :
    let P2 : ℝ := ∑' m : ℤ, Real.exp (-((Real.pi * (m:ℝ))^2 / (2 * τ^2 * (1/(q:ℝ))^2)));
    Filter.Tendsto
      (fun k : ℕ => Real.sqrt (k:ℝ) * energy_filter_integral_1d k τ ((p:ℝ)/(q:ℝ)) / 16 ^ k)
      Filter.atTop (nhds (Real.sqrt (Real.pi / (1 + ((p:ℝ)/(q:ℝ))^2)) * P2))
energy_filter_laplace_three_dim_irrationalIn LeanStatistical Mechanics & Thermodynamics

For irrational alpha > 0 the scaled three-dimensional Gaussian integral satisfies k^(3/2) * I3(k,tau,alpha) / 256^k -> sqrt(2) * (pi/(1+alpha^2))^(3/2).

theorem energy_filter_laplace_three_dim_irrational (τ α : ℝ) (hτ : 0 < τ) (hirr : Irrational α) :
    Filter.Tendsto
      (fun k : ℕ => ((k:ℝ) * Real.sqrt (k:ℝ)) * energy_filter_integral_3d k τ α / 256 ^ k)
      Filter.atTop (nhds (Real.sqrt 2 * (Real.pi / (1 + α^2)) ^ (3/2 : ℝ)))
energy_filter_laplace_three_dim_rationalIn LeanStatistical Mechanics & Thermodynamics

For alpha = p/q in lowest terms, k^(3/2) * I3(k,tau,p/q)/256^k tends to sqrt(2) (pi/(1+(p/q)^2))^(3/2) times P4 = sum over v in Z^3 of exp(-(pi^2/(tau^2 (1/q)^2)) Q(v)).

theorem energy_filter_laplace_three_dim_rational (τ : ℝ) (hτ : 0 < τ) (p q : ℕ) (hp : 0 < p)
    (hq : 0 < q) (hcop : Nat.Coprime p q) :
    let P4 : ℝ := ∑' v : ℤ × ℤ × ℤ, Real.exp (-(Real.pi^2 / (τ^2 * (1/(q:ℝ))^2) *
      ((3/4) * (v.1:ℝ)^2 + (v.2.1:ℝ)^2 + (3/4) * (v.2.2:ℝ)^2 - (v.1:ℝ) * (v.2.1:ℝ)
        + (1/2) * (v.1:ℝ) * (v.2.2:ℝ) - (v.2.1:ℝ) * (v.2.2:ℝ))));
    Filter.Tendsto
      (fun k : ℕ => ((k:ℝ) * Real.sqrt (k:ℝ)) * energy_filter_integral_3d k τ ((p:ℝ)/(q:ℝ)) / 256 ^ k)
      Filter.atTop (nhds (Real.sqrt 2 * (Real.pi / (1 + ((p:ℝ)/(q:ℝ))^2)) ^ (3/2 : ℝ) * P4))
energy_filter_lattice_ratio_continuum_limitIn LeanStatistical Mechanics & Thermodynamics

As h approaches 0 from above, the ratio h S_4(tau, h) / S_2(tau, h)^2 converges to sqrt(pi) / tau.

theorem energy_filter_lattice_ratio_continuum_limit (τ : ℝ) (hτ : 0 < τ) :
    Filter.Tendsto
      (fun h : ℝ => h * energy_filter_lattice_s4 τ h / (energy_filter_lattice_s2 τ h)^2)
      (nhdsWithin 0 (Set.Ioi 0))
      (nhds (Real.sqrt Real.pi / τ))
energy_filter_lattice_s4_eq_even_oddIn LeanStatistical Mechanics & Thermodynamics

The discrete fourth-moment sum S_4 decomposes into an even-parity convolution part equal to S_2^2 * Theta(4 tau^2 h^2) and an odd-parity part equal to the product of odd Gaussian sums.

theorem energy_filter_lattice_s4_eq_even_odd (τ h : ℝ) (hτ : 0 < τ) (hh : 0 < h) :
    energy_filter_lattice_s4 τ h =
      (energy_filter_lattice_s2 τ h)^2 * (∑' (j : ℤ), Real.exp (- 4 * τ^2 * h^2 * (j : ℝ)^2)) +
      (∑' (j : ℤ), Real.exp (- τ^2 * h^2 * ((2 * j + 1 : ℤ) : ℝ)^2)) *
        (∑' (n : ℤ), Real.exp (- (τ^2 * h^2 / 2) * ((2 * n - 1 : ℤ) : ℝ)^2))^2
energy_filter_lattice_s4_theta_identityIn LeanStatistical Mechanics & Thermodynamics

For tau, h > 0, put c = tau^2 h^2 and Theta(x) = sum over n in Z of exp(-x n^2). Then twice the fourth-moment convolution sum S_4(tau,h) equals Theta(c)^3 + (2 Theta(4c) - Theta(c))^3.

theorem energy_filter_lattice_s4_theta_identity (τ h : ℝ) (hτ : 0 < τ) (hh : 0 < h) :
    2 * energy_filter_lattice_s4 τ h
      = (∑' n : ℤ, Real.exp (-(τ^2 * h^2) * (n : ℝ)^2))^3
        + (2 * (∑' n : ℤ, Real.exp (-4 * (τ^2 * h^2) * (n : ℝ)^2))
            - (∑' n : ℤ, Real.exp (-(τ^2 * h^2) * (n : ℝ)^2)))^3
energy_filter_peak_set_irrationalIn LeanStatistical Mechanics & Thermodynamics

For irrational alpha the only points where |cos x * cos(alpha x)| attains its maximum 1 are the origin: {x : |cos x * cos(alpha x)| = 1} = {0}.

theorem energy_filter_peak_set_irrational (α : ℝ) (hirr : Irrational α) :
    {x : ℝ | |Real.cos x * Real.cos (α * x)| = 1} = {0}
energy_filter_peak_set_rationalIn LeanStatistical Mechanics & Thermodynamics

For alpha = p/q in lowest terms with p, q > 0, the maximum set {x : |cos x * cos((p/q) x)| = 1} is exactly the lattice pi * q * Z.

theorem energy_filter_peak_set_rational (p q : ℕ) (hp : 0 < p) (hq : 0 < q)
    (hcop : Nat.Coprime p q) :
    {x : ℝ | |Real.cos x * Real.cos ((p:ℝ)/(q:ℝ) * x)| = 1}
      = {x : ℝ | ∃ n : ℤ, x = Real.pi * (q:ℝ) * (n:ℝ)}
energy_filter_purity_limit_of_integral_asymptoticsIn LeanStatistical Mechanics & Thermodynamics

Abstract assembly step: if sqrt(k) * I1(k,tau,alpha)/16^k tends to A > 0 and k^(3/2) * I3(k,tau,alpha)/256^k tends to B > 0, then sqrt(4k) * two_species_purity(k,tau,alpha) tends to 2B/(tau sqrt(pi) A^2). This is the exact algebraic combination of the trace reduction, the two integral representations and the exponential growth rates 16^k, 256^k = 16^(2k).

theorem energy_filter_purity_limit_of_integral_asymptotics
    (τ α : ℝ) (hτ : 0 < τ) (A B : ℝ) (hA : 0 < A) (hB : 0 < B)
    (h1 : Filter.Tendsto
      (fun k : ℕ => Real.sqrt (k:ℝ) * energy_filter_integral_1d k τ α / 16 ^ k)
      Filter.atTop (nhds A))
    (h3 : Filter.Tendsto
      (fun k : ℕ => ((k:ℝ) * Real.sqrt (k:ℝ)) * energy_filter_integral_3d k τ α / 256 ^ k)
      Filter.atTop (nhds B)) :
    Filter.Tendsto (fun k : ℕ => Real.sqrt (4 * (k : ℝ)) * two_species_purity k τ α)
      Filter.atTop (nhds (2 * B / (τ * Real.sqrt Real.pi * A^2)))
energy_filter_qform_cyclic_sq_decompositionIn LeanStatistical Mechanics & Thermodynamics

The quartic form Q(a,b,c) = (3/4)a^2 + b^2 + (3/4)c^2 - ab + (1/2)ac - bc coming from the four cyclic energy sums equals (a-b)^2/2 + (c-b)^2/2 + (a+c)^2/4.

theorem energy_filter_qform_cyclic_sq_decomposition (a b c : ℝ) :
    (3/4) * a^2 + b^2 + (3/4) * c^2 - a * b + (1/2) * a * c - b * c
      = (a - b)^2 / 2 + (c - b)^2 / 2 + (a + c)^2 / 4
energy_filter_rational_resonance_const_algebraIn LeanStatistical Mechanics & Thermodynamics

For tau > 0, positive p, q and any reals S2, S4: 2 (sqrt 2 (pi q^2/(p^2+q^2))^(3/2) S4) / (tau sqrt(pi) (sqrt(pi q^2/(p^2+q^2)) S2)^2) equals (2 sqrt 2 q /(tau sqrt(p^2+q^2))) (S4/S2^2).

theorem energy_filter_rational_resonance_const_algebra
    (τ : ℝ) (hτ : 0 < τ) (p q : ℕ) (hp : 0 < p) (hq : 0 < q) (S2 S4 : ℝ) :
    (let D : ℝ := (p:ℝ)^2 + (q:ℝ)^2
     2 * (Real.sqrt 2 * (Real.pi * (q:ℝ)^2 / D)^(3/2:ℝ) * S4) /
      (τ * Real.sqrt Real.pi * (Real.sqrt (Real.pi * (q:ℝ)^2 / D) * S2)^2))
    = (let D : ℝ := (p:ℝ)^2 + (q:ℝ)^2
       (2 * Real.sqrt 2 * (q:ℝ) / (τ * Real.sqrt D)) * (S4 / S2^2))
energy_filter_rational_resonance_purity_assemblyIn LeanStatistical Mechanics & Thermodynamics

If S2 > 0, sqrt(k) I1(k,tau,alpha_k)/16^k tends to sqrt(pi q^2/D) S2 and k^(3/2) I3(k,tau,alpha_k)/256^k tends to sqrt 2 (pi q^2/D)^(3/2) S4, with alpha_k = p/q + c/sqrt(4k), then sqrt(4k) two_species_purity(k,tau,alpha_k) tends to (2 sqrt 2 q/(tau sqrt D)) (S4/S2^2).

theorem energy_filter_rational_resonance_purity_assembly
    (τ : ℝ) (hτ : 0 < τ) (p q : ℕ) (hp : 0 < p) (hq : 0 < q) (hcop : Nat.Coprime p q) (c : ℝ) :
    let L : Matrix (Fin 3) (Fin 3) ℝ := !![2, -1, 0; -1, 2, -1; 0, -1, 2]
    let D : ℝ := (p : ℝ)^2 + (q : ℝ)^2
    let u : ℝ := Real.pi^2 * (q : ℝ)^2 / (2 * τ^2) + Real.pi^2 * c^2 * (q : ℝ)^4 / (4 * D)
    let S2 : ℝ := ∑' (k : ℤ), Real.exp (- u * (k : ℝ)^2)
    let S4 : ℝ := ∑' (v : Fin 3 → ℤ),
      let vR : Fin 3 → ℝ := fun i => (v i : ℝ)
      let vT_Linv_v := dotProduct vR (Matrix.mulVec L⁻¹ vR)
      let quad2 := dotProduct vR vR + (∑ i : Fin 3, vR i)^2
      Real.exp (- (Real.pi^2 * (q:ℝ)^2 * vT_Linv_v / τ^2) -
        (Real.pi^2 * c^2 * (q:ℝ)^4 * quad2 / (8 * D)))
    (0 < S2) →
    (Filter.Tendsto
      (fun k : ℕ => Real.sqrt (k : ℝ) * energy_filter_integral_1d k τ
        ((p : ℝ) / (q : ℝ) + c / Real.sqrt (4 * (k : ℝ))) / 16 ^ k)
      Filter.atTop
      (nhds (Real.sqrt (Real.pi * (q : ℝ)^2 / D) * S2))) →
    (Filter.Tendsto
      (fun k : ℕ => ((k : ℝ) * Real.sqrt (k : ℝ)) *
        energy_filter_integral_3d k τ
          ((p : ℝ) / (q : ℝ) + c / Real.sqrt (4 * (k : ℝ))) / 256 ^ k)
      Filter.atTop
      (nhds (Real.sqrt 2 * (Real.pi * (q : ℝ)^2 / D) ^ (3/2 : ℝ) * S4))) →
    Filter.Tendsto
      (fun k : ℕ => Real.sqrt (4 * (k : ℝ)) *
        two_species_purity k τ ((p : ℝ) / (q : ℝ) + c / Real.sqrt (4 * (k : ℝ))))
      Filter.atTop
      (nhds ((2 * Real.sqrt 2 * (q : ℝ) / (τ * Real.sqrt D)) * (S4 / S2^2)))
energy_filter_rational_resonance_s2_asymptoticsIn LeanStatistical Mechanics & Thermodynamics

With the k-dependent frequency alpha_k = p/q + c/sqrt(4k), sqrt(k) times the one-dimensional energy-filter integral I1(k,tau,alpha_k) divided by 16^k tends to sqrt(pi q^2/(p^2+q^2)) times S_2 = sum over n in Z of exp(-u n^2) with u = pi^2 q^2/(2 tau^2) + pi^2 c^2 q^4/(4(p^2+q^2)).

theorem energy_filter_rational_resonance_s2_asymptotics
    (τ : ℝ) (hτ : 0 < τ) (p q : ℕ) (hp : 0 < p) (hq : 0 < q) (hcop : Nat.Coprime p q) (c : ℝ) :
    let D : ℝ := (p : ℝ)^2 + (q : ℝ)^2
    let u : ℝ := Real.pi^2 * (q : ℝ)^2 / (2 * τ^2) + Real.pi^2 * c^2 * (q : ℝ)^4 / (4 * D)
    let S2 : ℝ := ∑' (k : ℤ), Real.exp (- u * (k : ℝ)^2)
    Filter.Tendsto
      (fun k : ℕ => Real.sqrt (k : ℝ) * energy_filter_integral_1d k τ
        ((p : ℝ) / (q : ℝ) + c / Real.sqrt (4 * (k : ℝ))) / 16 ^ k)
      Filter.atTop
      (nhds (Real.sqrt (Real.pi * (q : ℝ)^2 / D) * S2))
energy_filter_rational_resonance_s2_posIn LeanStatistical Mechanics & Thermodynamics

The one-dimensional theta sum S_2 = sum over k in Z of exp(-u k^2) with u = pi^2 q^2/(2 tau^2) + pi^2 c^2 q^4/(4(p^2+q^2)) is strictly positive.

theorem energy_filter_rational_resonance_s2_pos
    (τ : ℝ) (hτ : 0 < τ) (p q : ℕ) (hp : 0 < p) (hq : 0 < q) (c : ℝ) :
    let D : ℝ := (p : ℝ)^2 + (q : ℝ)^2
    let u : ℝ := Real.pi^2 * (q : ℝ)^2 / (2 * τ^2) + Real.pi^2 * c^2 * (q : ℝ)^4 / (4 * D)
    let S2 : ℝ := ∑' (k : ℤ), Real.exp (- u * (k : ℝ)^2)
    0 < S2
energy_filter_rational_resonance_s4_asymptoticsIn LeanStatistical Mechanics & Thermodynamics

With alpha_k = p/q + c/sqrt(4k), k^(3/2) times the three-dimensional energy-filter integral I3(k,tau,alpha_k) divided by 256^k tends to sqrt 2 times (pi q^2/(p^2+q^2))^(3/2) times S_4 = sum over v in Z^3 of exp(-pi^2 q^2 (v^T L^{-1} v)/tau^2 - pi^2 c^2 q^4 (v^T v + (v_1+v_2+v_3)^2)/(8(p^2+q^2))), where L has diagonal 2 and adjacent off-diagonals -1.

theorem energy_filter_rational_resonance_s4_asymptotics
    (τ : ℝ) (hτ : 0 < τ) (p q : ℕ) (hp : 0 < p) (hq : 0 < q) (hcop : Nat.Coprime p q) (c : ℝ) :
    let L : Matrix (Fin 3) (Fin 3) ℝ := !![2, -1, 0; -1, 2, -1; 0, -1, 2]
    let D : ℝ := (p : ℝ)^2 + (q : ℝ)^2
    let S4 : ℝ := ∑' (v : Fin 3 → ℤ),
      let vR : Fin 3 → ℝ := fun i => (v i : ℝ)
      let vT_Linv_v := dotProduct vR (Matrix.mulVec L⁻¹ vR)
      let quad2 := dotProduct vR vR + (∑ i : Fin 3, vR i)^2
      Real.exp (- (Real.pi^2 * (q:ℝ)^2 * vT_Linv_v / τ^2) -
        (Real.pi^2 * c^2 * (q:ℝ)^4 * quad2 / (8 * D)))
    Filter.Tendsto
      (fun k : ℕ => ((k : ℝ) * Real.sqrt (k : ℝ)) *
        energy_filter_integral_3d k τ
          ((p : ℝ) / (q : ℝ) + c / Real.sqrt (4 * (k : ℝ))) / 256 ^ k)
      Filter.atTop
      (nhds (Real.sqrt 2 * (Real.pi * (q : ℝ)^2 / D) ^ (3/2 : ℝ) * S4))
energy_filter_reduced_entropy_eventually_pos_traceIn LeanStatistical Mechanics & Thermodynamics

For any nonzero finitely supported sequence a and growing bipartition, the trace of M M^T is eventually strictly positive.

theorem energy_filter_reduced_entropy_eventually_pos_trace
    (a : ℤ → ℝ) (hsupp : (Function.support a).Finite) (ha : a ≠ 0)
    (n m : ℕ → ℕ) (heven : ∀ k, Even (n k))
    (hm_lt : ∀ k, 1 ≤ m k ∧ m k < n k)
    (hm_inf : Filter.Tendsto m Filter.atTop Filter.atTop)
    (hnm_inf : Filter.Tendsto (fun k => n k - m k) Filter.atTop Filter.atTop) :
    Filter.Eventually
      (fun k =>
        let l := n k - m k
        let wA : (Fin (m k) → Bool) → ℤ := fun s => ∑ j : Fin (m k), if s j then 1 else 0
        let wB : (Fin l → Bool) → ℤ := fun s => ∑ j : Fin l, if s j then 1 else 0
        let M : Matrix (Fin (m k) → Bool) (Fin l → Bool) ℝ :=
          fun sA sB => a ((n k : ℤ) / 2 - wA sA - wB sB)
        let hR := Matrix.isHermitian_mul_conjTranspose_self M
        0 < ∑ s, hR.eigenvalues s)
      Filter.atTop
energy_filter_reduced_entropy_sum_eigenvalues_eq_traceIn LeanStatistical Mechanics & Thermodynamics

For any sequence a and dimensions n, m, the sum of eigenvalues of the Gram matrix M M^T in the reduced state definition equals the matrix trace Tr(M M^T).

theorem energy_filter_reduced_entropy_sum_eigenvalues_eq_trace
    (a : ℤ → ℝ) (n m : ℕ) :
    let l := n - m
    let wA : (Fin m → Bool) → ℤ := fun s => ∑ j : Fin m, if s j then 1 else 0
    let wB : (Fin l → Bool) → ℤ := fun s => ∑ j : Fin l, if s j then 1 else 0
    let M : Matrix (Fin m → Bool) (Fin l → Bool) ℝ :=
      fun sA sB => a ((n : ℤ) / 2 - wA sA - wB sB)
    let hR := Matrix.isHermitian_mul_conjTranspose_self M
    ∑ s, hR.eigenvalues s = (M * M.transpose).trace
energy_filter_renyi_denominator_asymptoticIn LeanStatistical Mechanics & Thermodynamics

For any nonzero finitely supported sequence a, the normalized eigenvalue sum sqrt(2 pi k) / 2^(4k) * (∑ s, λ_s) converges to the lattice sum S_2(a) as k tends to infinity.

theorem energy_filter_renyi_denominator_asymptotic
    (a : ℤ → ℝ) (ha_ne : a ≠ 0) (ha_fin : Function.HasFiniteSupport a) :
    Filter.Tendsto
      (fun k : ℕ =>
        let w : (Fin (2 * k) → Bool) → ℤ := fun s => ∑ j : Fin (2 * k), if s j then 1 else 0
        let M : Matrix (Fin (2 * k) → Bool) (Fin (2 * k) → Bool) ℝ :=
          fun sA sB => a (2 * (k : ℤ) - w sA - w sB)
        let hR := Matrix.isHermitian_mul_conjTranspose_self M
        Real.sqrt (2 * Real.pi * (k : ℝ)) / ((2 : ℝ) ^ (4 * k)) * (∑ s, hR.eigenvalues s))
      Filter.atTop
      (nhds (energy_filter_sequence_lattice_s2 a))
energy_filter_renyi_moment_limit_assemblyIn LeanStatistical Mechanics & Thermodynamics

Combines the asymptotic convergence of the normalized numerator and denominator via the quotient law for limits and definition unfolding to deduce the convergence of the scaled Renyi moment to the Renyi constant.

theorem energy_filter_renyi_moment_limit_assembly
    (a : ℤ → ℝ) (q : ℝ)
    (h_num : Filter.Tendsto
      (fun k : ℕ =>
        let w : (Fin (2 * k) → Bool) → ℤ := fun s => ∑ j : Fin (2 * k), if s j then 1 else 0
        let M : Matrix (Fin (2 * k) → Bool) (Fin (2 * k) → Bool) ℝ :=
          fun sA sB => a (2 * (k : ℤ) - w sA - w sB)
        let hR := Matrix.isHermitian_mul_conjTranspose_self M
        ((4 * (k : ℝ)) ^ ((q - 1) / 2)) * (∑ s, (hR.eigenvalues s) ^ q) /
          ((((2 : ℝ) ^ (4 * k)) / Real.sqrt (2 * Real.pi * (k : ℝ))) ^ q))
      Filter.atTop
      (nhds ((4 / Real.sqrt (2 * Real.pi)) ^ q * Real.sqrt (Real.pi / (8 * q)) *
        ((1 / (2 * Real.pi)) * ∫ θ in (0 : ℝ)..(2 * Real.pi),
          ‖energy_filter_fourier_symbol a θ‖ ^ (2 * q)))))
    (h_den : Filter.Tendsto
      (fun k : ℕ =>
        let w : (Fin (2 * k) → Bool) → ℤ := fun s => ∑ j : Fin (2 * k), if s j then 1 else 0
        let M : Matrix (Fin (2 * k) → Bool) (Fin (2 * k) → Bool) ℝ :=
          fun sA sB => a (2 * (k : ℤ) - w sA - w sB)
        let hR := Matrix.isHermitian_mul_conjTranspose_self M
        Real.sqrt (2 * Real.pi * (k : ℝ)) / ((2 : ℝ) ^ (4 * k)) * (∑ s, hR.eigenvalues s))
      Filter.atTop
      (nhds (energy_filter_sequence_lattice_s2 a)))
    (hS_pos : 0 < energy_filter_sequence_lattice_s2 a) :
    Filter.Tendsto
      (fun k : ℕ => ((4 * (k : ℝ)) ^ ((q - 1) / 2)) * energy_filter_renyi_moment a k q)
      Filter.atTop
      (nhds (energy_filter_renyi_constant a q))
energy_filter_renyi_moment_sum_eigenvalues_eq_traceIn LeanStatistical Mechanics & Thermodynamics

For any filter sequence a and parameter k, the sum of the eigenvalues of the Gram matrix M M† in the definition of the Renyi moment equals the matrix trace Tr(M M^T).

theorem energy_filter_renyi_moment_sum_eigenvalues_eq_trace (a : ℤ → ℝ) (k : ℕ) :
  let w : (Fin (2 * k) → Bool) → ℤ := fun s => ∑ j : Fin (2 * k), if s j then 1 else 0
  let M : Matrix (Fin (2 * k) → Bool) (Fin (2 * k) → Bool) ℝ :=
    fun sA sB => a (2 * (k : ℤ) - w sA - w sB)
  let hR := Matrix.isHermitian_mul_conjTranspose_self M
  ∑ s, hR.eigenvalues s = (M * M.transpose).trace
energy_filter_renyi_numerator_asymptoticIn LeanStatistical Mechanics & Thermodynamics

For any nonzero finitely supported sequence a and real q > 1, the scaled and normalized spectral power sum (4k)^((q-1)/2) * (∑ s, λ_s^q) / (2^(4k) / sqrt(2 pi k))^q converges to C_q * (1 / (2 pi)) * ∫_0^{2 pi} ‖A(θ)‖^(2q) dθ.

theorem energy_filter_renyi_numerator_asymptotic
    (a : ℤ → ℝ) (ha_ne : a ≠ 0) (ha_fin : Function.HasFiniteSupport a)
    (q : ℝ) (hq : 1 < q) :
    let Cq := (4 / Real.sqrt (2 * Real.pi)) ^ q * Real.sqrt (Real.pi / (8 * q))
    let integ := (1 / (2 * Real.pi)) * ∫ θ in (0 : ℝ)..(2 * Real.pi),
      ‖energy_filter_fourier_symbol a θ‖ ^ (2 * q)
    Filter.Tendsto
      (fun k : ℕ =>
        let w : (Fin (2 * k) → Bool) → ℤ := fun s => ∑ j : Fin (2 * k), if s j then 1 else 0
        let M : Matrix (Fin (2 * k) → Bool) (Fin (2 * k) → Bool) ℝ :=
          fun sA sB => a (2 * (k : ℤ) - w sA - w sB)
        let hR := Matrix.isHermitian_mul_conjTranspose_self M
        ((4 * (k : ℝ)) ^ ((q - 1) / 2)) * (∑ s, (hR.eigenvalues s) ^ q) /
          ((((2 : ℝ) ^ (4 * k)) / Real.sqrt (2 * Real.pi * (k : ℝ))) ^ q))
      Filter.atTop
      (nhds (Cq * integ))
energy_filter_renyi_prefactor_twoIn LeanStatistical Mechanics & Thermodynamics

The Renyi-2 prefactor (4 / sqrt(2 pi))^2 * sqrt(pi / 16) simplifies to 2 / sqrt(pi).

theorem energy_filter_renyi_prefactor_two :
    (4 / Real.sqrt (2 * Real.pi)) ^ (2 : ℝ) * Real.sqrt (Real.pi / (8 * 2)) = 2 / Real.sqrt Real.pi
energy_filter_sequence_binomial_gaussian_pointwiseIn LeanStatistical Mechanics & Thermodynamics

For fixed offset s, C(2k, k+s) * sqrt(pi k) / 2^(2k) tends to e^(-s^2/k) in the limit, i.e. the normalized binomial weight tends to 1 for each fixed offset.

theorem energy_filter_sequence_binomial_gaussian_pointwise (s : ℤ) :
    Filter.Tendsto
      (fun k : ℕ => (Nat.choose (2 * k) ((k : ℤ) + s).toNat : ℝ) * Real.sqrt (Real.pi * (k : ℝ))
        / (2 : ℝ) ^ (2 * k))
      Filter.atTop (nhds 1)
energy_filter_sequence_gaussian_lattice_sum_limitIn LeanStatistical Mechanics & Thermodynamics

For a nonzero l^{4/3} sequence a, (2/sqrt(pi k)) times the four-fold Gaussian-weighted lattice sum of the cyclic a-products converges to S4 = sum over m of the squared convolution.

theorem energy_filter_sequence_gaussian_lattice_sum_limit (a : ℤ → ℝ)
    (ha_ne : a ≠ 0) (ha_lp : Memℓp a (4 / 3)) :
    Filter.Tendsto
      (fun k : ℕ => (2 / Real.sqrt (Real.pi * (k : ℝ))) *
        (∑' α : ℤ, ∑' β : ℤ, ∑' γ : ℤ, ∑' δ : ℤ,
          Real.exp (-((((α : ℝ) ^ 2 + (β : ℝ) ^ 2 + (γ : ℝ) ^ 2 + (δ : ℝ) ^ 2)) / (k : ℝ))) *
            (a (-α - β) * a (-β - γ) * a (-γ - δ) * a (-δ - α))))
      Filter.atTop (nhds (energy_filter_sequence_lattice_s4 a))
energy_filter_sequence_lattice_s2_posIn LeanStatistical Mechanics & Thermodynamics

If a is a nonzero l^{4/3} sequence then the second lattice sum S2 = sum of a j^2 is strictly positive.

theorem energy_filter_sequence_lattice_s2_pos (a : ℤ → ℝ) (ha_ne : a ≠ 0) (ha_lp : Memℓp a (4 / 3)) :
    0 < energy_filter_sequence_lattice_s2 a
energy_filter_sequence_lattice_s2_pos_of_finitely_supportedIn LeanStatistical Mechanics & Thermodynamics

For any nonzero finitely supported real sequence a on ℤ, the second-moment lattice sum S_2(a) = ∑' j : ℤ, (a j)^2 is strictly positive.

theorem energy_filter_sequence_lattice_s2_pos_of_finitely_supported
    (a : ℤ → ℝ) (ha_ne : a ≠ 0) (ha_fin : Function.HasFiniteSupport a) :
    0 < energy_filter_sequence_lattice_s2 a
energy_filter_sequence_lattice_s2_summableIn LeanStatistical Mechanics & Thermodynamics

If a is in l^{4/3} then the squares a j^2 are summable over Z.

theorem energy_filter_sequence_lattice_s2_summable (a : ℤ → ℝ) (ha_lp : Memℓp a (4 / 3)) :
    Summable (fun j : ℤ => (a j) ^ 2)
energy_filter_sequence_lattice_s4_rademacher_filterIn LeanStatistical Mechanics & Thermodynamics

The lattice S4 energy of a length-m Rademacher filter equals the finite four-fold sum over indices in Fin m with i1 + i2 = i3 + i4 of the four-sign product.

theorem energy_filter_sequence_lattice_s4_rademacher_filter (m : ℕ) (s : Fin m → Bool) :
    energy_filter_sequence_lattice_s4 (rademacher_filter m s) =
      ∑ i1 : Fin m, ∑ i2 : Fin m, ∑ i3 : Fin m, ∑ i4 : Fin m,
        if i1.val + i2.val = i3.val + i4.val then
          (if s i1 = true then (1 : ℝ) else -1) *
          (if s i2 = true then (1 : ℝ) else -1) *
          (if s i3 = true then (1 : ℝ) else -1) *
          (if s i4 = true then (1 : ℝ) else -1)
        else 0
energy_filter_sequence_purity_delta_eq_choose_fourthIn LeanStatistical Mechanics & Thermodynamics

For the Kronecker delta filter the purity is the Franel-type quotient (sum_p C(2k,p)^4)/C(4k,2k)^2.

theorem energy_filter_sequence_purity_delta_eq_choose_fourth (k : ℕ) :
    energy_filter_sequence_purity (fun j => if j = 0 then (1 : ℝ) else 0) k
      = (∑ p ∈ Finset.range (2 * k + 1), (Nat.choose (2 * k) p : ℝ) ^ 4) /
        (Nat.choose (4 * k) (2 * k) : ℝ) ^ 2
energy_filter_sequence_purity_eq_hamming_sumsIn LeanStatistical Mechanics & Thermodynamics

For any sequence a and k, the purity equals the ratio of the raw 4-fold trace of M^4 to the square of the raw 2-fold trace of M^2, where the matrix entries are indexed by spin configurations sA, sB in Fin (2k) -> Bool and M sA sB = a (2k - w sA - w sB) with w s the Hamming weight of s.

theorem energy_filter_sequence_purity_eq_hamming_sums (a : ℤ → ℝ) (k : ℕ) :
    energy_filter_sequence_purity a k =
      (∑ sA : Fin (2 * k) → Bool, ∑ sB : Fin (2 * k) → Bool,
        ∑ sC : Fin (2 * k) → Bool, ∑ sD : Fin (2 * k) → Bool,
        a (2 * (k : ℤ) - (∑ i, if sA i = true then (1 : ℤ) else 0) - (∑ i, if sB i = true then (1 : ℤ) else 0)) *
        a (2 * (k : ℤ) - (∑ i, if sB i = true then (1 : ℤ) else 0) - (∑ i, if sC i = true then (1 : ℤ) else 0)) *
        a (2 * (k : ℤ) - (∑ i, if sC i = true then (1 : ℤ) else 0) - (∑ i, if sD i = true then (1 : ℤ) else 0)) *
        a (2 * (k : ℤ) - (∑ i, if sD i = true then (1 : ℤ) else 0) - (∑ i, if sA i = true then (1 : ℤ) else 0)))
      / (∑ sA : Fin (2 * k) → Bool, ∑ sB : Fin (2 * k) → Bool,
        (a (2 * (k : ℤ) - (∑ i, if sA i = true then (1 : ℤ) else 0) - (∑ i, if sB i = true then (1 : ℤ) else 0))) ^ 2) ^ 2
energy_filter_sequence_purity_limit_assemblyIn LeanStatistical Mechanics & Thermodynamics

If the purity reduces to Tr4/Tr2^2 and the two normalized traces converge to S2 > 0 and S4 respectively, then sqrt(4k) times the purity converges to the purity constant (2/sqrt pi) S4/S2^2.

theorem energy_filter_sequence_purity_limit_assembly (a : ℤ → ℝ) (ha_ne : a ≠ 0) (ha_lp : Memℓp a (4 / 3))
    (hred : ∀ k : ℕ, energy_filter_sequence_purity a k =
      (∑ p ∈ Finset.range (2 * k + 1), ∑ q ∈ Finset.range (2 * k + 1),
        ∑ r ∈ Finset.range (2 * k + 1), ∑ s ∈ Finset.range (2 * k + 1),
          (Nat.choose (2 * k) p : ℝ) * (Nat.choose (2 * k) q : ℝ) *
            (Nat.choose (2 * k) r : ℝ) * (Nat.choose (2 * k) s : ℝ) *
            (a (2 * (k : ℤ) - (p : ℤ) - (q : ℤ)) * a (2 * (k : ℤ) - (q : ℤ) - (r : ℤ)) *
             a (2 * (k : ℤ) - (r : ℤ) - (s : ℤ)) * a (2 * (k : ℤ) - (s : ℤ) - (p : ℤ))))
      / (∑ p ∈ Finset.range (2 * k + 1), ∑ q ∈ Finset.range (2 * k + 1),
          (Nat.choose (2 * k) p : ℝ) * (Nat.choose (2 * k) q : ℝ) *
            (a (2 * (k : ℤ) - (p : ℤ) - (q : ℤ))) ^ 2) ^ 2)
    (h2 : Filter.Tendsto
      (fun k : ℕ =>
        (∑ p ∈ Finset.range (2 * k + 1), ∑ q ∈ Finset.range (2 * k + 1),
          (Nat.choose (2 * k) p : ℝ) * (Nat.choose (2 * k) q : ℝ) *
            (a (2 * (k : ℤ) - (p : ℤ) - (q : ℤ))) ^ 2)
        * Real.sqrt (2 * Real.pi * (k : ℝ)) / (2 : ℝ) ^ (4 * k))
      Filter.atTop (nhds (energy_filter_sequence_lattice_s2 a)))
    (h2pos : 0 < energy_filter_sequence_lattice_s2 a)
    (h4 : Filter.Tendsto
      (fun k : ℕ =>
        (∑ p ∈ Finset.range (2 * k + 1), ∑ q ∈ Finset.range (2 * k + 1),
         ∑ r ∈ Finset.range (2 * k + 1), ∑ s ∈ Finset.range (2 * k + 1),
          (Nat.choose (2 * k) p : ℝ) * (Nat.choose (2 * k) q : ℝ) *
            (Nat.choose (2 * k) r : ℝ) * (Nat.choose (2 * k) s : ℝ) *
            (a (2 * (k : ℤ) - (p : ℤ) - (q : ℤ)) * a (2 * (k : ℤ) - (q : ℤ) - (r : ℤ)) *
             a (2 * (k : ℤ) - (r : ℤ) - (s : ℤ)) * a (2 * (k : ℤ) - (s : ℤ) - (p : ℤ))))
        * (2 * Real.pi ^ (3 / 2 : ℝ) * (k : ℝ) ^ (3 / 2 : ℝ)) / (2 : ℝ) ^ (8 * k))
      Filter.atTop (nhds (energy_filter_sequence_lattice_s4 a))) :
    Filter.Tendsto
      (fun k : ℕ => Real.sqrt (4 * (k : ℝ)) * energy_filter_sequence_purity a k)
      Filter.atTop
      (nhds (energy_filter_sequence_purity_constant a))
energy_filter_sequence_purity_limit_of_trace_asymptoticsIn LeanStatistical Mechanics & Thermodynamics

If T2*sqrt(2 pi k)/2^(4k) tends to S2 > 0 and T4*2pi^(3/2)k^(3/2)/2^(8k) tends to S4, then sqrt(4k)*T4/T2^2 tends to (2/sqrt pi) S4/S2^2.

theorem energy_filter_sequence_purity_limit_of_trace_asymptotics
    (T2 T4 : ℕ → ℝ) (S2 S4 : ℝ) (hS2 : 0 < S2)
    (h2 : Filter.Tendsto
      (fun k : ℕ => T2 k * Real.sqrt (2 * Real.pi * (k : ℝ)) / (2 : ℝ) ^ (4 * k))
      Filter.atTop (nhds S2))
    (h4 : Filter.Tendsto
      (fun k : ℕ => T4 k * (2 * Real.pi ^ (3 / 2 : ℝ) * (k : ℝ) ^ (3 / 2 : ℝ)) / (2 : ℝ) ^ (8 * k))
      Filter.atTop (nhds S4)) :
    Filter.Tendsto
      (fun k : ℕ => Real.sqrt (4 * (k : ℝ)) * (T4 k / (T2 k) ^ 2))
      Filter.atTop (nhds (2 / Real.sqrt Real.pi * S4 / S2 ^ 2))
energy_filter_sequence_purity_normalization_identityIn LeanStatistical Mechanics & Thermodynamics

For k >= 1 with T2 nonzero, sqrt(4k) * T4/T2^2 equals (2/sqrt pi) times the ratio of the two normalized traces T4*2pi^(3/2)k^(3/2)/2^(8k) and (T2*sqrt(2 pi k)/2^(4k))^2.

theorem energy_filter_sequence_purity_normalization_identity (T2 T4 : ℝ) (k : ℕ) (hk : k ≠ 0)
    (hT2 : T2 ≠ 0) :
    Real.sqrt (4 * (k : ℝ)) * (T4 / T2 ^ 2) =
      (2 / Real.sqrt Real.pi) *
        (T4 * (2 * Real.pi ^ (3 / 2 : ℝ) * (k : ℝ) ^ (3 / 2 : ℝ)) / (2 : ℝ) ^ (8 * k)) /
        ((T2 * Real.sqrt (2 * Real.pi * (k : ℝ)) / (2 : ℝ) ^ (4 * k)) ^ 2)
energy_filter_sequence_purity_trace_reductionIn LeanStatistical Mechanics & Thermodynamics

Since M is symmetric, the purity is the ratio of the four-fold cyclic binomial-weighted sum of a-products to the square of the two-fold binomial-weighted sum of a-squares.

theorem energy_filter_sequence_purity_trace_reduction (a : ℤ → ℝ) (k : ℕ) :
    energy_filter_sequence_purity a k =
      (∑ p ∈ Finset.range (2 * k + 1), ∑ q ∈ Finset.range (2 * k + 1),
        ∑ r ∈ Finset.range (2 * k + 1), ∑ s ∈ Finset.range (2 * k + 1),
          (Nat.choose (2 * k) p : ℝ) * (Nat.choose (2 * k) q : ℝ) *
            (Nat.choose (2 * k) r : ℝ) * (Nat.choose (2 * k) s : ℝ) *
            (a (2 * (k : ℤ) - (p : ℤ) - (q : ℤ)) * a (2 * (k : ℤ) - (q : ℤ) - (r : ℤ)) *
             a (2 * (k : ℤ) - (r : ℤ) - (s : ℤ)) * a (2 * (k : ℤ) - (s : ℤ) - (p : ℤ))))
      / (∑ p ∈ Finset.range (2 * k + 1), ∑ q ∈ Finset.range (2 * k + 1),
          (Nat.choose (2 * k) p : ℝ) * (Nat.choose (2 * k) q : ℝ) *
            (a (2 * (k : ℤ) - (p : ℤ) - (q : ℤ))) ^ 2) ^ 2
energy_filter_sequence_sum_fin_bool_hamming_weightIn LeanStatistical Mechanics & Thermodynamics

For any n and any function f of an integer, summing f of the Hamming weight over all spin configurations in Fin n -> Bool equals the binomial-weighted sum of f over p in range (n+1).

theorem energy_filter_sequence_sum_fin_bool_hamming_weight (n : ℕ) (f : ℤ → ℝ) :
    (∑ s : Fin n → Bool, f (∑ i, if s i = true then (1 : ℤ) else 0)) =
      ∑ p ∈ Finset.range (n + 1), (Nat.choose n p : ℝ) * f (p : ℤ)
energy_filter_sequence_trace2_asymptoticIn LeanStatistical Mechanics & Thermodynamics

The normalized second trace converges to the second lattice sum S2.

theorem energy_filter_sequence_trace2_asymptotic (a : ℤ → ℝ) (ha_ne : a ≠ 0) (ha_lp : Memℓp a (4 / 3)) :
    Filter.Tendsto
      (fun k : ℕ =>
        (∑ p ∈ Finset.range (2 * k + 1), ∑ q ∈ Finset.range (2 * k + 1),
          (Nat.choose (2 * k) p : ℝ) * (Nat.choose (2 * k) q : ℝ) *
            (a (2 * (k : ℤ) - (p : ℤ) - (q : ℤ))) ^ 2)
        * Real.sqrt (2 * Real.pi * (k : ℝ)) / (2 : ℝ) ^ (4 * k))
      Filter.atTop (nhds (energy_filter_sequence_lattice_s2 a))
energy_filter_sequence_trace2_vandermondeIn LeanStatistical Mechanics & Thermodynamics

The two-fold binomial trace sum equals the single sum over t in range (4k+1) of C(4k,t) a(2k-t)^2.

theorem energy_filter_sequence_trace2_vandermonde (a : ℤ → ℝ) (k : ℕ) :
    (∑ p ∈ Finset.range (2 * k + 1), ∑ q ∈ Finset.range (2 * k + 1),
      (Nat.choose (2 * k) p : ℝ) * (Nat.choose (2 * k) q : ℝ) *
        (a (2 * (k : ℤ) - (p : ℤ) - (q : ℤ))) ^ 2)
    = ∑ t ∈ Finset.range (4 * k + 1), (Nat.choose (4 * k) t : ℝ) * (a (2 * (k : ℤ) - (t : ℤ))) ^ 2
energy_filter_single_species_char_sumIn LeanStatistical Mechanics & Thermodynamics

For every k and t, the sum over all configurations s : Fin k -> Bool of exp(I * (sum_j if s j then 1 else -1) * t) equals (2 cos t)^k.

theorem energy_filter_single_species_char_sum (k : ℕ) (t : ℝ) :
    (∑ s : Fin k → Bool, Complex.exp (Complex.I * ((∑ j, if s j then (1:ℝ) else (-1:ℝ)) : ℂ) * (t : ℂ)))
      = (((2 * Real.cos t) ^ k : ℝ) : ℂ)
energy_filter_theta_qform_lattice_sumIn LeanStatistical Mechanics & Thermodynamics

For lam > 0, the sum over v in Z^3 of exp(-lam * Q(v)), where Q(a,b,c) = (3/4)a^2 + b^2 + (3/4)c^2 - ab + (1/2)ac - bc, equals Theta(lam)^3 + Theta_odd(lam)^3, where Theta(lam) = sum over n in Z of exp(-lam n^2) and Theta_odd(lam) = sum over n in Z of exp(-(lam/4)(2n+1)^2) (the latter being sum over odd m of exp(-lam m^2/4)).

theorem energy_filter_theta_qform_lattice_sum (lam : ℝ) (hlam : 0 < lam) :
    (∑' v : ℤ × ℤ × ℤ, Real.exp (-lam * ((3/4) * (v.1 : ℝ)^2 + (v.2.1 : ℝ)^2 + (3/4) * (v.2.2 : ℝ)^2
        - (v.1 : ℝ) * (v.2.1 : ℝ) + (1/2) * (v.1 : ℝ) * (v.2.2 : ℝ) - (v.2.1 : ℝ) * (v.2.2 : ℝ))))
      = (∑' n : ℤ, Real.exp (-lam * (n : ℝ)^2))^3
        + (∑' n : ℤ, Real.exp (-(lam / 4) * ((2 * n + 1 : ℤ) : ℝ)^2))^3
energy_filter_theta_s2In LeanStatistical Mechanics & Thermodynamics

The one-dimensional Jacobi theta transformation: for tau, h > 0, the sum over m in Z of exp(-(pi m)^2/(2 tau^2 h^2)) equals tau sqrt(2) h / sqrt(pi) times energy_filter_lattice_s2(tau,h) = sum over k in Z of exp(-2 tau^2 h^2 k^2).

theorem energy_filter_theta_s2 (τ h : ℝ) (hτ : 0 < τ) (hh : 0 < h) :
    (∑' m : ℤ, Real.exp (-((Real.pi * (m:ℝ))^2 / (2 * τ^2 * h^2))))
      = τ * Real.sqrt 2 * h / Real.sqrt Real.pi * energy_filter_lattice_s2 τ h
energy_filter_theta_s4In LeanStatistical Mechanics & Thermodynamics

For tau, h > 0, the sum over v in Z^3 of exp(-(pi^2/(tau^2 h^2)) Q(v)), with Q(a,b,c) = (3/4)a^2 + b^2 + (3/4)c^2 - ab + (1/2)ac - bc, equals 2 tau^3 h^3 / sqrt(pi)^3 times energy_filter_lattice_s4(tau,h).

theorem energy_filter_theta_s4 (τ h : ℝ) (hτ : 0 < τ) (hh : 0 < h) :
    (∑' v : ℤ × ℤ × ℤ, Real.exp (-(Real.pi^2 / (τ^2 * h^2) *
      ((3/4) * (v.1:ℝ)^2 + (v.2.1:ℝ)^2 + (3/4) * (v.2.2:ℝ)^2 - (v.1:ℝ) * (v.2.1:ℝ)
        + (1/2) * (v.1:ℝ) * (v.2.2:ℝ) - (v.2.1:ℝ) * (v.2.2:ℝ)))))
      = 2 * τ^3 * h^3 / Real.sqrt Real.pi ^ 3 * energy_filter_lattice_s4 τ h
energy_filter_trace2_integralIn LeanStatistical Mechanics & Thermodynamics

Exact one-dimensional Gaussian-integral representation of Tr(M M^T): the sum over a, b of exp(-tau^2 (e a + e b)^2/2) equals 1/(sqrt2 tau sqrt pi) times the integral over R of exp(-s^2/(2 tau^2)) (4 cos s cos(alpha s))^(2k) ds.

theorem energy_filter_trace2_integral (k : ℕ) (τ α : ℝ) (hτ : 0 < τ) :
    let e : (Fin k → Bool) × (Fin k → Bool) → ℝ :=
      fun s => (∑ j, if s.1 j then (1:ℝ) else -1) + α * ∑ j, if s.2 j then (1:ℝ) else -1;
    (∑ a : (Fin k → Bool) × (Fin k → Bool), ∑ b, Real.exp (-(τ^2 * (e a + e b)^2 / 2)))
      = 1 / (Real.sqrt 2 * τ * Real.sqrt Real.pi) * energy_filter_integral_1d k τ α
energy_filter_trace4_integralIn LeanStatistical Mechanics & Thermodynamics

Exact three-dimensional Gaussian-integral representation of Tr((M M^T)^2): the four-fold cyclic energy sum equals 1/(2 tau^3 sqrt(pi)^3) times the integral over R^3 of exp(-Q(p)/tau^2) times the four factors (4 cos p_i cos(alpha p_i))^k and (4 cos(p1+p3-p2) cos(alpha(p1+p3-p2)))^k, with Q(a,b,c) = (3/4)a^2 + b^2 + (3/4)c^2 - ab + (1/2)ac - bc.

theorem energy_filter_trace4_integral (k : ℕ) (τ α : ℝ) (hτ : 0 < τ) :
    let e : (Fin k → Bool) × (Fin k → Bool) → ℝ :=
      fun s => (∑ j, if s.1 j then (1:ℝ) else -1) + α * ∑ j, if s.2 j then (1:ℝ) else -1;
    (∑ a : (Fin k → Bool) × (Fin k → Bool), ∑ b, ∑ c, ∑ d,
        Real.exp (-(τ^2 * ((e a + e b)^2 + (e b + e c)^2 + (e c + e d)^2 + (e d + e a)^2) / 4)))
      = 1 / (2 * τ^3 * Real.sqrt Real.pi ^ 3) * energy_filter_integral_3d k τ α
energy_filter_trace_reductionIn LeanStatistical Mechanics & Thermodynamics

The purity equals Tr(M^4)/Tr(M^2)^2 written as energy sums: two_species_purity k tau alpha is the four-fold cyclic sum of exp(-(tau^2/4)[(e a + e b)^2 + (e b + e c)^2 + (e c + e d)^2 + (e d + e a)^2]) divided by the square of the two-fold sum of exp(-tau^2 (e a + e b)^2/2).

theorem energy_filter_trace_reduction (k : ℕ) (τ α : ℝ) :
    let e : (Fin k → Bool) × (Fin k → Bool) → ℝ :=
      fun s => (∑ j, if s.1 j then (1:ℝ) else -1) + α * ∑ j, if s.2 j then (1:ℝ) else -1;
    two_species_purity k τ α
      = (∑ a : (Fin k → Bool) × (Fin k → Bool), ∑ b, ∑ c, ∑ d,
          Real.exp (-(τ^2 * ((e a + e b)^2 + (e b + e c)^2 + (e c + e d)^2 + (e d + e a)^2) / 4)))
        / (∑ a : (Fin k → Bool) × (Fin k → Bool), ∑ b,
            Real.exp (-(τ^2 * (e a + e b)^2 / 2)))^2
energy_filter_unbalanced_spectral_entropy_asymptoticIn LeanStatistical Mechanics & Thermodynamics

The normalized eigenvalue Shannon entropy difference converges to (1/2) log(2 pi e V_k) - C as k tends to infinity.

theorem energy_filter_unbalanced_spectral_entropy_asymptotic
    (a : ℤ → ℝ) (hsupp : (Function.support a).Finite) (ha : a ≠ 0)
    (n m : ℕ → ℕ) (heven : ∀ k, Even (n k))
    (hm_lt : ∀ k, 1 ≤ m k ∧ m k < n k)
    (hm_inf : Filter.Tendsto m Filter.atTop Filter.atTop)
    (hnm_inf : Filter.Tendsto (fun k => n k - m k) Filter.atTop Filter.atTop) :
    let V : ℕ → ℝ := fun k => (m k : ℝ) * ((n k - m k : ℕ) : ℝ) / (4 * (n k : ℝ))
    let C := energy_filter_fourier_entropy_constant a
    Filter.Tendsto
      (fun k =>
        let l := n k - m k
        let wA : (Fin (m k) → Bool) → ℤ := fun s => ∑ j : Fin (m k), if s j then 1 else 0
        let wB : (Fin l → Bool) → ℤ := fun s => ∑ j : Fin l, if s j then 1 else 0
        let M : Matrix (Fin (m k) → Bool) (Fin l → Bool) ℝ :=
          fun sA sB => a ((n k : ℤ) / 2 - wA sA - wB sB)
        let hR := Matrix.isHermitian_mul_conjTranspose_self M
        let tr := ∑ s, hR.eigenvalues s
        (∑ s, Real.negMulLog (hR.eigenvalues s / tr)) -
          ((1 / 2 : ℝ) * Real.log (2 * Real.pi * Real.exp 1 * V k) - C))
      Filter.atTop (nhds 0)
energy_filter_unbalanced_trace_asymptoticIn LeanStatistical Mechanics & Thermodynamics

For any nonzero finitely supported sequence a, the normalized trace of M M^T converges to the lattice sum S_2(a) as k tends to infinity.

theorem energy_filter_unbalanced_trace_asymptotic
    (a : ℤ → ℝ) (hsupp : (Function.support a).Finite) (ha : a ≠ 0)
    (n m : ℕ → ℕ) (heven : ∀ k, Even (n k))
    (hm_inf : Filter.Tendsto m Filter.atTop Filter.atTop)
    (hnm_inf : Filter.Tendsto (fun k => n k - m k) Filter.atTop Filter.atTop) :
    Filter.Tendsto
      (fun k =>
        let l := n k - m k
        let wA : (Fin (m k) → Bool) → ℤ := fun s => ∑ j : Fin (m k), if s j then 1 else 0
        let wB : (Fin l → Bool) → ℤ := fun s => ∑ j : Fin l, if s j then 1 else 0
        let M : Matrix (Fin (m k) → Bool) (Fin l → Bool) ℝ :=
          fun sA sB => a ((n k : ℤ) / 2 - wA sA - wB sB)
        Real.sqrt (Real.pi * (n k : ℝ) / 2) / ((2 : ℝ) ^ (n k)) * (M * M.transpose).trace)
      Filter.atTop
      (nhds (energy_filter_sequence_lattice_s2 a))
energy_filter_unbalanced_von_neumann_assemblyIn LeanStatistical Mechanics & Thermodynamics

Assembles the spectral entropy convergence and eventual trace positivity to conclude convergence of the full reduced entropy energy_filter_reduced_entropy.

theorem energy_filter_unbalanced_von_neumann_assembly
    (a : ℤ → ℝ) (n m : ℕ → ℕ)
    (V : ℕ → ℝ) (C : ℝ)
    (h_entropy_diff : Filter.Tendsto
      (fun k =>
        let l := n k - m k
        let wA : (Fin (m k) → Bool) → ℤ := fun s => ∑ j : Fin (m k), if s j then 1 else 0
        let wB : (Fin l → Bool) → ℤ := fun s => ∑ j : Fin l, if s j then 1 else 0
        let M : Matrix (Fin (m k) → Bool) (Fin l → Bool) ℝ :=
          fun sA sB => a ((n k : ℤ) / 2 - wA sA - wB sB)
        let hR := Matrix.isHermitian_mul_conjTranspose_self M
        let tr := ∑ s, hR.eigenvalues s
        (∑ s, Real.negMulLog (hR.eigenvalues s / tr)) -
          ((1 / 2 : ℝ) * Real.log (2 * Real.pi * Real.exp 1 * V k) - C))
      Filter.atTop (nhds 0))
    (h_pos : Filter.Eventually
      (fun k =>
        let l := n k - m k
        let wA : (Fin (m k) → Bool) → ℤ := fun s => ∑ j : Fin (m k), if s j then 1 else 0
        let wB : (Fin l → Bool) → ℤ := fun s => ∑ j : Fin l, if s j then 1 else 0
        let M : Matrix (Fin (m k) → Bool) (Fin l → Bool) ℝ :=
          fun sA sB => a ((n k : ℤ) / 2 - wA sA - wB sB)
        let hR := Matrix.isHermitian_mul_conjTranspose_self M
        0 < ∑ s, hR.eigenvalues s)
      Filter.atTop) :
    Filter.Tendsto
      (fun k => energy_filter_reduced_entropy a (n k) (m k) -
        ((1 / 2 : ℝ) * Real.log (2 * Real.pi * Real.exp 1 * V k) - C))
      Filter.atTop (nhds 0)
fin_pairing_sumIn LeanStatistical Mechanics & Thermodynamics

The sum over (Fin m)^4 of the pairing indicator (i1 = i3 ∧ i2 = i4) ∨ (i1 = i4 ∧ i2 = i3) equals 2 * m^2 - m.

theorem fin_pairing_sum (m : ℕ) :
    (∑ i1 : Fin m, ∑ i2 : Fin m, ∑ i3 : Fin m, ∑ i4 : Fin m,
      if (i1 = i3 ∧ i2 = i4) ∨ (i1 = i4 ∧ i2 = i3) then (1 : ℝ) else 0) =
    2 * (m : ℝ)^2 - (m : ℝ)
gaussian_lattice_sum_odd_shiftIn LeanStatistical Mechanics & Thermodynamics

The odd-integer lattice sum with parameter 2n-1 equals the odd sum with parameter 2j+1 via the index reflection j = -n.

theorem gaussian_lattice_sum_odd_shift (c : ℝ) :
    (∑' (n : ℤ), Real.exp (- c * ((2 * n - 1 : ℤ) : ℝ)^2)) =
      (∑' (j : ℤ), Real.exp (- c * ((2 * j + 1 : ℤ) : ℝ)^2))
gaussian_lattice_sum_odd_splitIn LeanStatistical Mechanics & Thermodynamics

The sum of exp(-c (2j+1)^2) over odd integers equals the full Gaussian lattice sum over all integers minus the even sum sum_j exp(-4c j^2).

theorem gaussian_lattice_sum_odd_split (c : ℝ) (hc : 0 < c) :
    (∑' (j : ℤ), Real.exp (- c * ((2 * j + 1 : ℤ) : ℝ)^2)) =
      (∑' (k : ℤ), Real.exp (- c * (k : ℝ)^2)) - (∑' (j : ℤ), Real.exp (- 4 * c * (j : ℝ)^2))
gaussian_lattice_sum_tendsto_zeroIn LeanStatistical Mechanics & Thermodynamics

The scaled 1D Gaussian lattice sum h sum_{n in Z} exp(-c h^2 n^2) converges to sqrt(pi / c) as h -> 0+ from above.

theorem gaussian_lattice_sum_tendsto_zero (c : ℝ) (hc : 0 < c) :
    Filter.Tendsto (fun h : ℝ => h * ∑' (n : ℤ), Real.exp (- c * h^2 * (n : ℝ)^2))
      (nhdsWithin 0 (Set.Ioi 0)) (nhds (Real.sqrt Real.pi / Real.sqrt c))
hard_core_closed_neighborhood_bound_congrIn LeanStatistical Mechanics & Thermodynamics

For any two simple graphs G1 and G2 on a finite type V with decidable equality and vertex fugacities lam, if G1 = G2 then hardCoreClosedNeighborhoodBound G1 lam = hardCoreClosedNeighborhoodBound G2 lam.

theorem hard_core_closed_neighborhood_bound_congr {V : Type*} [Fintype V] [DecidableEq V]
    (G1 G2 : SimpleGraph V) [DecidableRel G1.Adj] [DecidableRel G2.Adj] (h : G1 = G2)
    (lam : V → ℝ) :
    hardCoreClosedNeighborhoodBound G1 lam = hardCoreClosedNeighborhoodBound G2 lam
hard_core_singleton_ge_closed_neighborhood_boundIn LeanStatistical Mechanics & Thermodynamics

For positive heterogeneous fugacities, the sum of squared occupancy probabilities divided by fugacities is at least the closed-neighborhood expression.

theorem hard_core_singleton_ge_closed_neighborhood_bound {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (lam : V → ℝ) (hlam : ∀ v, 0 < lam v) : hardCoreClosedNeighborhoodBound G lam ≤ hardCoreSingletonVarianceLowerBound G lam
hard_core_var_size_congrIn LeanStatistical Mechanics & Thermodynamics

For any two simple graphs G1 and G2 on a finite type V with decidable equality and vertex fugacities lam, if G1 = G2 then hardCoreVarSize G1 lam = hardCoreVarSize G2 lam.

theorem hard_core_var_size_congr {V : Type*} [Fintype V] [DecidableEq V]
    (G1 G2 : SimpleGraph V) [DecidableRel G1.Adj] [DecidableRel G2.Adj] (h : G1 = G2)
    (lam : V → ℝ) :
    hardCoreVarSize G1 lam = hardCoreVarSize G2 lam
hard_core_variance_ge_singleton_and_cluster_equalityIn LeanStatistical Mechanics & Thermodynamics

For positive fugacities, the hard-core variance is at least the sum of squared occupancy probabilities divided by fugacities, with equality exactly on disjoint unions of cliques.

theorem hard_core_variance_ge_singleton_and_cluster_equality {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (lam : V → ℝ) (hlam : ∀ v, 0 < lam v) : hardCoreSingletonVarianceLowerBound G lam ≤ hardCoreVarSize G lam ∧ (hardCoreVarSize G lam = hardCoreSingletonVarianceLowerBound G lam ↔ ∀ c : G.ConnectedComponent, G.IsClique c.supp)
ising_inverse_square_bulk_field_polynomial_at_most_one_nonpositive_rootIn LeanStatistical Mechanics & Thermodynamics

For every order n at least 2 and every representing polynomial P, any two complex zeros of P with real part at most 0 coincide.

theorem ising_inverse_square_bulk_field_polynomial_at_most_one_nonpositive_root (n : ℕ) (hn : 2 ≤ n) (P : Polynomial ℝ) (hP : ising_inverse_square_bulk_field_polynomial n P) : ∀ z w : ℂ, (P.map (algebraMap ℝ ℂ)).IsRoot z → (P.map (algebraMap ℝ ℂ)).IsRoot w → z.re ≤ 0 → w.re ≤ 0 → z = w
ising_inverse_square_bulk_field_polynomial_eval_oneIn LeanStatistical Mechanics & Thermodynamics

For every order n at least 2 and every representing polynomial P, P evaluated at 1 is 0.

theorem ising_inverse_square_bulk_field_polynomial_eval_one (n : ℕ) (hn : 2 ≤ n) (P : Polynomial ℝ) (hP : ising_inverse_square_bulk_field_polynomial n P) : P.eval 1 = 0
ising_inverse_square_bulk_field_polynomial_existsIn LeanStatistical Mechanics & Thermodynamics

For every natural number n at least 2 there is a real polynomial P such that at every real field h the finite-ring order-n coefficients tend to P(tanh(h)^2) as the ring size tends to infinity.

theorem ising_inverse_square_bulk_field_polynomial_exists (n : ℕ) (hn : 2 ≤ n) : ∃ P : Polynomial ℝ, ising_inverse_square_bulk_field_polynomial n P
ising_inverse_square_bulk_field_polynomial_leading_coefficientIn LeanStatistical Mechanics & Thermodynamics

For every order n at least 1 and every real polynomial P representing the order-n bulk field coefficient, the coefficient of y^n in P is (-1)^(n+1)/(2n(2n+1)).

theorem ising_inverse_square_bulk_field_polynomial_leading_coefficient (n : ℕ) (hn : 1 ≤ n) (P : Polynomial ℝ) (hP : ising_inverse_square_bulk_field_polynomial n P) : P.coeff n = (-1 : ℝ) ^ (n + 1) / ((2 * (n : ℝ)) * (2 * (n : ℝ) + 1))
ising_inverse_square_bulk_field_polynomial_ne_zeroIn LeanStatistical Mechanics & Thermodynamics

For every order n at least 2, every real polynomial representing the order-n bulk field coefficient is nonzero.

theorem ising_inverse_square_bulk_field_polynomial_ne_zero (n : ℕ) (hn : 2 ≤ n) (P : Polynomial ℝ) (hP : ising_inverse_square_bulk_field_polynomial n P) : P ≠ 0
ising_inverse_square_bulk_field_polynomial_roots_le_oneIn LeanStatistical Mechanics & Thermodynamics

For every order n at least 2 and every representing polynomial P, every complex zero of P has real part at most 1.

theorem ising_inverse_square_bulk_field_polynomial_roots_le_one (n : ℕ) (hn : 2 ≤ n) (P : Polynomial ℝ) (hP : ising_inverse_square_bulk_field_polynomial n P) : ∀ z : ℂ, (P.map (algebraMap ℝ ℂ)).IsRoot z → z.re ≤ 1
ising_inverse_square_bulk_field_polynomial_roots_realIn LeanStatistical Mechanics & Thermodynamics

For every order n at least 2 and every representing polynomial P, every complex zero of P is real.

theorem ising_inverse_square_bulk_field_polynomial_roots_real (n : ℕ) (hn : 2 ≤ n) (P : Polynomial ℝ) (hP : ising_inverse_square_bulk_field_polynomial n P) : ∀ z : ℂ, (P.map (algebraMap ℝ ℂ)).IsRoot z → z.im = 0
ising_inverse_square_bulk_field_polynomial_roots_simpleIn LeanStatistical Mechanics & Thermodynamics

For every order n at least 2 and every representing polynomial P, the derivative of P does not vanish at any complex zero of P.

theorem ising_inverse_square_bulk_field_polynomial_roots_simple (n : ℕ) (hn : 2 ≤ n) (P : Polynomial ℝ) (hP : ising_inverse_square_bulk_field_polynomial n P) : ∀ z : ℂ, (P.map (algebraMap ℝ ℂ)).IsRoot z → (P.map (algebraMap ℝ ℂ)).derivative.eval z ≠ 0
ising_inverse_square_bulk_field_polynomial_uniqueIn LeanStatistical Mechanics & Thermodynamics

At each order there is at most one real polynomial representing the bulk field coefficient at every real field.

theorem ising_inverse_square_bulk_field_polynomial_unique (n : ℕ) (P Q : Polynomial ℝ) (hP : ising_inverse_square_bulk_field_polynomial n P) (hQ : ising_inverse_square_bulk_field_polynomial n Q) : P = Q
ising_inverse_square_ring_coefficient_two_formulaIn LeanStatistical Mechanics & Thermodynamics

For each natural ring size L at least 2 and each real field h, the second coupling coefficient of the finite-ring reduced free energy equals (1-y²)b/4 + y(1-y)(a²-b)/2, where y=tanh(h)², a=(1-L⁻²)/3, and b=(1+10L⁻²-11L⁻⁴)/45.

theorem ising_inverse_square_ring_coefficient_two_formula (L : ℕ) (hL : 2 ≤ L) (h : ℝ) :
  ising_inverse_square_ring_coefficient 2 L h =
    let u : ℝ := (L : ℝ)⁻¹
    let a := (1-u^2)/3
    let b := (1+10*u^2-11*u^4)/45
    let y := (Real.tanh h)^2
    (1-y^2)/4*b + y*(1-y)/2*(a^2-b)
ising_inverse_square_ring_coefficient_zeroIn LeanStatistical Mechanics & Thermodynamics

For every ring size L at least 1 and every real h, the zeroth coupling coefficient of the finite-ring reduced free energy equals log(2 cosh h).

theorem ising_inverse_square_ring_coefficient_zero (L : ℕ) (hL : 1 ≤ L) (h : ℝ) : ising_inverse_square_ring_coefficient 0 L h = Real.log (2 * Real.cosh h)
ising_inverse_square_ring_energy_half_sumIn LeanStatistical Mechanics & Thermodynamics

For every spin configuration, the ordered interaction energy sum over i with i.val < j.val equals one half of the symmetric double sum over all distinct pairs.

theorem ising_inverse_square_ring_energy_half_sum (L : ℕ) (s : Fin L → Bool) : (∑ i : Fin L, ∑ j : Fin L, if i.val < j.val then ising_inverse_square_ring_kernel L i j * ising_ring_spin (s i) * ising_ring_spin (s j) else 0) = (1/2) * (∑ i : Fin L, ∑ j : Fin L, if i ≠ j then ising_inverse_square_ring_kernel L i j * ising_ring_spin (s i) * ising_ring_spin (s j) else 0)
ising_inverse_square_ring_kernel_symmIn LeanStatistical Mechanics & Thermodynamics

The periodized inverse-square ring kernel is symmetric in its two sites.

theorem ising_inverse_square_ring_kernel_symm (L : ℕ) (i j : Fin L) : ising_inverse_square_ring_kernel L i j = ising_inverse_square_ring_kernel L j i
ising_two_layer_abs_div_sub_leIn LeanStatistical Mechanics & Thermodynamics

If |y − K| < ε₁ ≤ K/2 and |x − K·T| < ε₂ then |x/y − T| ≤ (2/K)(ε₂ + |T|·ε₁).

theorem ising_two_layer_abs_div_sub_le (x y T K ε₁ ε₂ : ℝ) (hK : 0 < K) (hε₁ : ε₁ ≤ K / 2)
    (hy : |y - K| < ε₁) (hx : |x - K * T| < ε₂) :
    |x / y - T| ≤ (2 / K) * (ε₂ + |T| * ε₁)
ising_two_layer_bad_fraction_eq_deviation_fractionIn LeanStatistical Mechanics & Thermodynamics

The bad fraction of the two-layer Gibbs expectation equals the deviation fraction of E_0[tilt·f]/E_0[tilt] from the quartic expectation T.

theorem ising_two_layer_bad_fraction_eq_deviation_fraction (d n : ℕ) (c ε : ℝ) (f : BoundedContinuousFunction (ℝ × ℝ) ℝ) :
    ising_two_layer_bad_fraction d n c ε f =
      ising_two_layer_deviation_fraction d n ε (fun p => ising_two_layer_uncoupled_expectation d n p.1 p.2 (fun σ τ => ising_two_layer_tilt n c σ τ * f (ising_two_layer_observable n σ τ)) / ising_two_layer_uncoupled_expectation d n p.1 p.2 (ising_two_layer_tilt n c) - ising_two_layer_quartic_expectation d c f)
ising_two_layer_deviation_fraction_le_addIn LeanStatistical Mechanics & Thermodynamics

If on every regular pair with |Φ| ≥ ε either |Ψ₁| ≥ ε₁ or |Ψ₂| ≥ ε₂, then the Φ-deviation fraction is at most the sum of the Ψ₁- and Ψ₂-deviation fractions.

theorem ising_two_layer_deviation_fraction_le_add (d n : ℕ) (ε ε₁ ε₂ : ℝ)
    (Φ Ψ₁ Ψ₂ : SimpleGraph (Fin n) × SimpleGraph (Fin n) → ℝ)
    (h : ∀ p, p ∈ ising_regular_pair_base d n → ε ≤ |Φ p| → ε₁ ≤ |Ψ₁ p| ∨ ε₂ ≤ |Ψ₂ p|) :
    ising_two_layer_deviation_fraction d n ε Φ ≤
      ising_two_layer_deviation_fraction d n ε₁ Ψ₁ + ising_two_layer_deviation_fraction d n ε₂ Ψ₂
ising_two_layer_gibbs_expectation_eq_uncoupled_tilt_ratioIn LeanStatistical Mechanics & Thermodynamics

The two-layer Gibbs expectation equals E_0[tilt·f(obs)] / E_0[tilt], where E_0 is the product of the two single-layer Gibbs laws.

theorem ising_two_layer_gibbs_expectation_eq_uncoupled_tilt_ratio (d n : ℕ) (c : ℝ) (G H : SimpleGraph (Fin n)) (f : BoundedContinuousFunction (ℝ × ℝ) ℝ) :
    ising_two_layer_gibbs_expectation d n c G H f =
      ising_two_layer_uncoupled_expectation d n G H (fun σ τ => ising_two_layer_tilt n c σ τ * f (ising_two_layer_observable n σ τ)) /
      ising_two_layer_uncoupled_expectation d n G H (ising_two_layer_tilt n c)
ising_two_layer_gibbs_expectation_mem_IccIn LeanStatistical Mechanics & Thermodynamics

If the test function f takes values in [lo,hi] then its two-layer Gibbs expectation also lies in [lo,hi].

theorem ising_two_layer_gibbs_expectation_mem_Icc (d n : ℕ) (c : ℝ) (G H : SimpleGraph (Fin n)) (f : BoundedContinuousFunction (ℝ × ℝ) ℝ) {lo hi : ℝ} (hlo : ∀ x, lo ≤ f x) (hhi : ∀ x, f x ≤ hi) :
    lo ≤ ising_two_layer_gibbs_expectation d n c G H f ∧ ising_two_layer_gibbs_expectation d n c G H f ≤ hi
ising_two_layer_ratio_boundIn LeanStatistical Mechanics & Thermodynamics

If B is within K/2 of K > 0, then the error |A/B - T| of the ratio is bounded by (2/K) times the sum of the numerator perturbation |A - K*T| and |T| times the denominator perturbation |B - K|.

theorem ising_two_layer_ratio_bound (A B K T : ℝ) (hK : 0 < K)
    (hB : |B - K| < K / 2) :
    |A / B - T| ≤ (2 / K) * (|A - K * T| + |T| * |B - K|)
ising_two_layer_tilt_convergesIn LeanStatistical Mechanics & Thermodynamics

Quenched two-layer tilt crossover: there is a positive constant K (depending only on d and c) such that, over a uniformly random ordered pair of d-regular graphs, both E_0[exp(c n^{-1/2}⟨σ,τ⟩) f(x,y)] − K·(quartic expectation of f) and E_0[exp(c n^{-1/2}⟨σ,τ⟩)] − K tend to 0 in probability, along n with d·n even.

theorem ising_two_layer_tilt_converges (d : ℕ) (hd : 3 ≤ d) (c : ℝ) (hc : 0 ≤ c) :
    ∃ K : ℝ, 0 < K ∧ ∀ (f : BoundedContinuousFunction (ℝ × ℝ) ℝ) (ε δ : ℝ), 0 < ε → 0 < δ →
      ∃ N : ℕ, ∀ n : ℕ, N ≤ n → Even (d * n) →
        ising_two_layer_deviation_fraction d n ε (fun p => ising_two_layer_uncoupled_expectation d n p.1 p.2 (fun σ τ => ising_two_layer_tilt n c σ τ * f (ising_two_layer_observable n σ τ)) - K * ising_two_layer_quartic_expectation d c f) < δ ∧
        ising_two_layer_deviation_fraction d n ε (fun p => ising_two_layer_uncoupled_expectation d n p.1 p.2 (ising_two_layer_tilt n c) - K) < δ
ising_two_layer_uncoupled_expectation_const_oneIn LeanStatistical Mechanics & Thermodynamics

The uncoupled reference measure is normalized: E_0[1] = 1.

theorem ising_two_layer_uncoupled_expectation_const_one (d n : ℕ) (G H : SimpleGraph (Fin n)) :
    ising_two_layer_uncoupled_expectation d n G H (fun _ _ => 1) = 1
ising_two_layer_weak_matching_of_tilt_convergenceIn LeanStatistical Mechanics & Thermodynamics

Given the tilt-convergence input at a positive constant K, the quartic crossover holds: the bad fraction of the two-layer Gibbs expectation tends to 0 in probability.

theorem ising_two_layer_weak_matching_of_tilt_convergence
    (d : ℕ) (hd : 3 ≤ d) (c : ℝ) (hc : 0 ≤ c) (K : ℝ) (hK : 0 < K)
    (hconv : ∀ (f : BoundedContinuousFunction (ℝ × ℝ) ℝ) (ε δ : ℝ), 0 < ε → 0 < δ →
        ∃ N : ℕ, ∀ n : ℕ, N ≤ n → Even (d * n) →
          ising_two_layer_deviation_fraction d n ε (fun p => ising_two_layer_uncoupled_expectation d n p.1 p.2 (fun σ τ => ising_two_layer_tilt n c σ τ * f (ising_two_layer_observable n σ τ)) - K * ising_two_layer_quartic_expectation d c f) < δ ∧
          ising_two_layer_deviation_fraction d n ε (fun p => ising_two_layer_uncoupled_expectation d n p.1 p.2 (ising_two_layer_tilt n c) - K) < δ) :
    ∀ (f : BoundedContinuousFunction (ℝ × ℝ) ℝ) (ε δ : ℝ), 0 < ε → 0 < δ →
      ∃ N : ℕ, ∀ n : ℕ, N ≤ n → Even (d * n) → ising_two_layer_bad_fraction d n c ε f < δ
ising_two_layer_weight_factorizesIn LeanStatistical Mechanics & Thermodynamics

The two-layer Gibbs weight factors as w_G(σ)·w_H(τ)·tilt(σ,τ): the product of the two critical single-layer weights and the overlap tilt.

theorem ising_two_layer_weight_factorizes (d n : ℕ) (c : ℝ) (G H : SimpleGraph (Fin n)) (σ τ : Fin n → Bool) :
    ising_two_layer_weight d n c G H σ τ =
      ising_single_layer_gibbs_weight d n G σ * ising_single_layer_gibbs_weight d n H τ * ising_two_layer_tilt n c σ τ
lift20_variance_crossover_existsIn LeanStatistical Mechanics & Thermodynamics

For every upper endpoint x_end strictly greater than the crossover root petersen_lift20_crossover_root, there exists an activity x in (0, x_end] where the per-vertex variance of the 20-vertex Petersen 2-lift is strictly less than that of the Petersen graph.

theorem lift20_variance_crossover_exists (x_end : ℝ) (h : petersen_lift20_crossover_root < x_end) :
    ∃ x : ℝ, 0 < x ∧ x ≤ x_end ∧ lift20_poly_variance_per_vertex x < petersen_poly_variance_per_vertex x
op_1340_closed_neighborhood_bound_component_sumIn LeanStatistical Mechanics & Thermodynamics

For any finite simple graph G and vertex fugacities lam, hardCoreClosedNeighborhoodBound G lam is the sum over connected components c of hardCoreClosedNeighborhoodBound on G.induce c.supp.

theorem op_1340_closed_neighborhood_bound_component_sum
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (lam : V → ℝ) :
    hardCoreClosedNeighborhoodBound G lam =
    open scoped Classical in
    ∑ c : G.ConnectedComponent,
      hardCoreClosedNeighborhoodBound (G.induce c.supp) (fun v => lam v.val)
op_1340_connected_closed_neighborhood_variance_boundIn LeanStatistical Mechanics & Thermodynamics

For any connected finite simple graph G and positive vertex fugacities lam, the hard-core variance hardCoreVarSize G lam is at least hardCoreClosedNeighborhoodBound G lam, with equality if and only if G is a clique.

theorem op_1340_connected_closed_neighborhood_variance_bound
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (lam : V → ℝ) (hlam : ∀ v, 0 < lam v) (hconn : G.Connected) :
    hardCoreClosedNeighborhoodBound G lam ≤ hardCoreVarSize G lam ∧
    (hardCoreVarSize G lam = hardCoreClosedNeighborhoodBound G lam ↔
      G.IsClique Set.univ)
op_1340_connected_component_induce_connectedIn LeanStatistical Mechanics & Thermodynamics

For any simple graph G on type V and any connected component c of G, the induced subgraph on c.supp is connected.

theorem op_1340_connected_component_induce_connected
    {V : Type*} (G : SimpleGraph V) (c : G.ConnectedComponent) :
    (G.induce c.supp).Connected
op_1340_var_size_component_sumIn LeanStatistical Mechanics & Thermodynamics

For any finite simple graph G and positive fugacities lam, the variance hardCoreVarSize G lam is the sum over connected components c of hardCoreVarSize on G.induce c.supp.

theorem op_1340_var_size_component_sum
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (lam : V → ℝ) (hlam : ∀ v, 0 < lam v) :
    hardCoreVarSize G lam =
    open scoped Classical in
    ∑ c : G.ConnectedComponent,
      hardCoreVarSize (G.induce c.supp) (fun v => lam v.val)
op_1354_triangle_free_cubic_petersen_variance_lower_boundIn LeanStatistical Mechanics & Thermodynamics

For every nonempty finite simple triangle-free cubic graph G and every activity x with 0 < x ≤ petersen_lift20_crossover_root, the per-vertex hard-core variance hardCoreVarSize G (fun _ => x) / |V(G)| is at least hardCoreVarSize petersen_graph (fun _ => x) / 10.

theorem op_1354_triangle_free_cubic_petersen_variance_lower_bound :
    letI : DecidableRel petersen_graph.Adj := fun s t => inferInstanceAs (Decidable (Disjoint s.1 t.1))
    ∀ {V : Type} [Fintype V] [Nonempty V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
      (hreg : G.IsRegularOfDegree 3) (htri : G.CliqueFree 3) (x : ℝ)
      (hx_pos : 0 < x) (hx_le : x ≤ petersen_lift20_crossover_root),
      hardCoreVarSize petersen_graph (fun _ => x) / 10 ≤
        hardCoreVarSize G (fun _ => x) / (Fintype.card V : ℝ)
op_1355_claw_free_local_partition_quadraticIn LeanStatistical Mechanics & Thermodynamics

For a claw-free graph and nonnegative vertex activities, the independent-set partition function of any open neighborhood is at most the square of one plus its activity sum.

open scoped Classical BigOperators in
theorem op_1355_claw_free_local_partition_quadratic
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (hclaw : IsClawFree G) (c : V) (lam : V → ℝ) (hlam : ∀ x, 0 ≤ lam x) :
    (∑ I ∈ (G.neighborFinset c).powerset.filter (fun I => G.IsIndepSet (I : Set V)), ∏ x ∈ I, lam x) ≤
      (1 + ∑ x ∈ G.neighborFinset c, lam x)^2
op_1355_claw_free_single_vertex_boundIn LeanStatistical Mechanics & Thermodynamics

For any claw-free graph and positive vertex activities, the weighted local variance bound holds when the observable counts one specified vertex.

open scoped Classical BigOperators in
theorem op_1355_claw_free_single_vertex_bound
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (hclaw : IsClawFree G) (lam : V → ℝ) (hlam : ∀ x, 0 < lam x) (c : V) :
    hardCoreWeightedClosedNeighborhoodBound G lam (fun x => if x = c then 1 else 0) ≤
      hardCoreWeightedVar G lam (fun x => if x = c then 1 else 0)
petersen_lift20_graph_existsIn LeanStatistical Mechanics & Thermodynamics

There exists a 20-vertex simple graph G (the Petersen 2-lift / dodecahedron) with decidable adjacency which is 3-regular, triangle-free, and whose per-vertex hard-core variance equals lift20_poly_variance_per_vertex x for all activities x.

theorem petersen_lift20_graph_exists :
    ∃ (G : SimpleGraph (Fin 20)) (_ : DecidableRel G.Adj),
      G.IsRegularOfDegree 3 ∧ G.CliqueFree 3 ∧
      ∀ x : ℝ, hardCoreVarSize G (fun _ => x) / 20 = lift20_poly_variance_per_vertex x
polynomial_alternating_coeffs_at_most_one_nonpositive_rootIn LeanStatistical Mechanics & Thermodynamics

If the coefficients p_0,...,p_n of a real polynomial are all nonzero and alternate in sign, then for every strictly negative y the polynomial's values alternate in sign with...

theorem polynomial_alternating_coeffs_at_most_one_nonpositive_root (P : Polynomial ℝ) (n : ℕ) (hdeg : P.natDegree = n) (hne : ∀ m : ℕ, m ≤ n → P.coeff m ≠ 0) (halt : ∀ m : ℕ, m + 1 ≤ n → (P.coeff (m + 1) < 0 ↔ 0 < P.coeff m)) : ∀ x y : ℝ, x ≤ 0 → y ≤ 0 → P.eval x = 0 → P.eval y = 0 → x = y
polynomial_alternating_nonconstant_coeffs_at_most_one_nonpositive_rootIn LeanStatistical Mechanics & Thermodynamics

If the nonconstant coefficients of a real polynomial alternate in sign (starting positive at degree 1) and the constant term is nonzero, then the polynomial has at most one root on (-infinity, 0].

theorem polynomial_alternating_nonconstant_coeffs_at_most_one_nonpositive_root (P : Polynomial ℝ) (n : ℕ) (hdeg : P.natDegree ≤ n) (h0 : P.coeff 0 ≠ 0) (h1 : P.coeff 1 ≠ 0) (halt : ∀ m : ℕ, 1 ≤ m → m + 1 ≤ n → (P.coeff (m + 1) < 0 ↔ 0 < P.coeff m)) : ∀ x y : ℝ, x ≤ 0 → y ≤ 0 → P.eval x = 0 → P.eval y = 0 → x = y
rademacher_autocorr_energy_eq_shift_sumIn LeanStatistical Mechanics & Thermodynamics

The aperiodic autocorrelation energy equals the three-index signed sum sum_{u,v,w} a(u) a(v) a(w) a(u+w-v).

theorem rademacher_autocorr_energy_eq_shift_sum (m : ℕ) (s : Fin m → Bool) :
    rademacher_autocorr_energy m s =
      ∑ u ∈ Finset.range m, ∑ v ∈ Finset.range m, ∑ w ∈ Finset.range m,
        rademacher_filter m s (u : ℤ) * rademacher_filter m s (v : ℤ) *
        rademacher_filter m s (w : ℤ) * rademacher_filter m s ((u : ℤ) + (w : ℤ) - (v : ℤ))
rademacher_autocorr_energy_expectedIn LeanStatistical Mechanics & Thermodynamics

For any positive integer m, the uniform expectation of rademacher_autocorr_energy m s over s : Fin m → Bool equals 2 * m^2 - m.

theorem rademacher_autocorr_energy_expected (m : ℕ) (hm : 0 < m) :
    rademacher_expect m (fun s => rademacher_autocorr_energy m s) = 2 * (m : ℝ)^2 - (m : ℝ)
rademacher_autocorr_energy_ge_sqIn LeanStatistical Mechanics & Thermodynamics

The autocorrelation energy is at least m^2 (the zero-shift term alone contributes m^2).

theorem rademacher_autocorr_energy_ge_sq (m : ℕ) (s : Fin m → Bool) :
    (m : ℝ) ^ 2 ≤ rademacher_autocorr_energy m s
rademacher_autocorr_energy_mean_sq_tendstoIn LeanStatistical Mechanics & Thermodynamics

The uniform expectation of (rademacher_autocorr_energy m s / m^2 - 2)^2 converges to 0 as m tends to infinity.

theorem rademacher_autocorr_energy_mean_sq_tendsto :
    Filter.Tendsto
      (fun m : ℕ => rademacher_expect m (fun s => (rademacher_autocorr_energy m s / ((m : ℝ)^2) - 2)^2))
      Filter.atTop
      (nhds 0)
rademacher_autocorr_energy_tendstoIn LeanStatistical Mechanics & Thermodynamics

For any δ > 0, the probability under uniform Rademacher signs that |rademacher_autocorr_energy m s / m^2 - 2| > δ tends to 0 as m tends to infinity.

theorem rademacher_autocorr_energy_tendsto (δ : ℝ) (hδ : 0 < δ) :
    Filter.Tendsto
      (fun m : ℕ => rademacher_prob m (fun s => δ < |rademacher_autocorr_energy m s / ((m : ℝ)^2) - 2|))
      Filter.atTop
      (nhds 0)
rademacher_autocorr_energy_uniform_quadratic_boundIn LeanStatistical Mechanics & Thermodynamics

There is a constant C with rademacher_autocorr_energy m s / m^2 <= C for all m and all sign configurations s.

theorem rademacher_autocorr_energy_uniform_quadratic_bound :
    ∃ C : ℝ, 0 < C ∧ ∀ (m : ℕ) (s : Fin m → Bool),
      rademacher_autocorr_energy m s / ((m : ℝ) ^ 2) ≤ C
rademacher_expect_four_sign_productIn LeanStatistical Mechanics & Thermodynamics

For any four indices in Fin m summing to the same total, the uniform expectation of their sign product is 1 if they pair up and 0 otherwise.

theorem rademacher_expect_four_sign_product (m : ℕ) (i1 i2 i3 i4 : Fin m)
    (h_sum : i1.val + i2.val = i3.val + i4.val) :
    rademacher_expect m (fun s =>
      (if s i1 = true then (1 : ℝ) else -1) *
      (if s i2 = true then (1 : ℝ) else -1) *
      (if s i3 = true then (1 : ℝ) else -1) *
      (if s i4 = true then (1 : ℝ) else -1)) =
    if (i1 = i3 ∧ i2 = i4) ∨ (i1 = i4 ∧ i2 = i3) then 1 else 0
rademacher_expect_prod_apply_factorizationIn LeanStatistical Mechanics & Thermodynamics

For any family of univariate real functions f j : Bool → ℝ indexed by the coordinates j : Fin m, the uniform expectation over the Boolean cube of the product of the coordinate values factorizes: E[∏_j f j (s j)] = ∏_j ((f j true + f j false) / 2).

theorem rademacher_expect_prod_apply_factorization (m : ℕ) (f : (j : Fin m) → Bool → ℝ) :
    rademacher_expect m (fun s => ∏ j, f j (s j)) =
      ∏ j, ((f j true + f j false) / 2)
rademacher_expect_sq_sub_constIn LeanStatistical Mechanics & Thermodynamics

For any real random variable X on the Boolean cube Fin m → Bool and any real constant c, the uniform mean squared deviation expands as E[(X - c)^2] = E[X^2] - 2 c E[X] + c^2 (linearity of the uniform expectation together with E[1] = 1).

theorem rademacher_expect_sq_sub_const (m : ℕ) (X : (Fin m → Bool) → ℝ) (c : ℝ) :
    rademacher_expect m (fun s => (X s - c) ^ 2) =
      rademacher_expect m (fun s => X s ^ 2) - 2 * c * rademacher_expect m X + c ^ 2
rademacher_expect_sumIn LeanStatistical Mechanics & Thermodynamics

The uniform expectation over sign configurations distributes over finite sums.

theorem rademacher_expect_sum {ι : Type*} [Fintype ι] (m : ℕ) (F : ι → (Fin m → Bool) → ℝ) :
    rademacher_expect m (fun s => ∑ i : ι, F i s) = ∑ i : ι, rademacher_expect m (fun s => F i s)
rademacher_filter_abs_and_supportIn LeanStatistical Mechanics & Thermodynamics

A Rademacher filter takes values in {1, -1} on its window 0 <= j < m and vanishes outside it.

theorem rademacher_filter_abs_and_support (m : ℕ) (s : Fin m → Bool) :
    (∀ j : ℤ, |rademacher_filter m s j| ≤ 1) ∧
      (∀ j : ℤ, rademacher_filter m s j ≠ 0 → 0 ≤ j ∧ j < (m : ℤ))
rademacher_filter_expect_prod_fourIn LeanStatistical Mechanics & Thermodynamics

For four integers i₁, i₂, i₃, i₄ inside the window of the Rademacher filter, the uniform expectation of the product of the four filter entries is 1 if the four positions split into two equal pairs — that is, if (i₁ = i₂ ∧ i₃ = i₄) or (i₁ = i₃ ∧ i₂ = i₄) or (i₁ = i₄ ∧ i₂ = i₃), equivalently if every position is hit an even number of times — and 0 otherwise. No hypothesis relating the sum i₁ + i₂ to i₃ + i₄ is needed; the three-way disjunction is the general condition.

theorem rademacher_filter_expect_prod_four (m : ℕ) (i₁ i₂ i₃ i₄ : ℤ)
    (h₁ : 0 ≤ i₁ ∧ i₁ < (m : ℤ)) (h₂ : 0 ≤ i₂ ∧ i₂ < (m : ℤ))
    (h₃ : 0 ≤ i₃ ∧ i₃ < (m : ℤ)) (h₄ : 0 ≤ i₄ ∧ i₄ < (m : ℤ)) :
    rademacher_expect m (fun s =>
        rademacher_filter m s i₁ * rademacher_filter m s i₂ *
          rademacher_filter m s i₃ * rademacher_filter m s i₄)
      = if (i₁ = i₂ ∧ i₃ = i₄) ∨ (i₁ = i₃ ∧ i₂ = i₄) ∨ (i₁ = i₄ ∧ i₂ = i₃)
        then 1 else 0
rademacher_filter_pair_expectIn LeanStatistical Mechanics & Thermodynamics

For two integers j and l inside the window of the Rademacher filter (0 ≤ j, l < m), the uniform expectation of the product of the two filter entries is 1 if j = l and 0 otherwise: distinct Rademacher coordinates are orthogonal, equal ones are perfectly correlated.

theorem rademacher_filter_pair_expect (m : ℕ) (j l : ℤ)
    (hj : 0 ≤ j ∧ j < (m : ℤ)) (hl : 0 ≤ l ∧ l < (m : ℤ)) :
    rademacher_expect m (fun s => rademacher_filter m s j * rademacher_filter m s l)
      = if j = l then 1 else 0
rademacher_filter_purity_denom_eq_window_sumIn LeanStatistical Mechanics & Thermodynamics

The purity denominator for a Rademacher filter collapses to the deterministic sum over its window of C(4k, 2k-j), independent of the sign configuration.

theorem rademacher_filter_purity_denom_eq_window_sum (m : ℕ) (s : Fin m → Bool) (k : ℕ) :
    (∑ p ∈ Finset.range (2 * k + 1), ∑ q ∈ Finset.range (2 * k + 1),
        (Nat.choose (2 * k) p : ℝ) * (Nat.choose (2 * k) q : ℝ) *
          (rademacher_filter m s (2 * (k : ℤ) - (p : ℤ) - (q : ℤ))) ^ 2)
      = ∑ j ∈ (Finset.range m).filter (fun j => j ≤ 2 * k),
          (Nat.choose (4 * k) (2 * k - j) : ℝ)
rademacher_filter_purity_denominator_asymptoticIn LeanStatistical Mechanics & Thermodynamics

For c > 0 and m_k = floor(c √(4k)), the window sum Σ_{j < m_k} C(4k, 2k - j), normalised by C(4k, 2k) √k, converges to the interval integral ∫_0^{2c} exp(-y²/2) dy. Equivalently, the ratio (Σ_{j<m_k} C(4k,2k-j)) / C(4k,2k) grows like √k times that integral; m_k/√k tends to 2c, so [0, m_k/√k] exhausts [0, 2c] at the CLT scale j = O(√k).

theorem rademacher_filter_purity_denominator_asymptotic
    (c : ℝ) (hc : 0 < c) :
    Filter.Tendsto
      (fun k : ℕ =>
        (∑ j ∈ Finset.range (Nat.floor (c * Real.sqrt (4 * (k : ℝ)))),
            (Nat.choose (4 * k) (2 * k - j) : ℝ)) /
          ((Nat.choose (4 * k) (2 * k) : ℝ) * Real.sqrt (k : ℝ)))
      Filter.atTop
      (nhds (∫ y in (0 : ℝ)..(2 * c), Real.exp (- y ^ 2 / 2)))
rademacher_filter_purity_mean_tendstoIn LeanStatistical Mechanics & Thermodynamics

For c > 0, the uniform mean over sign configurations of the scaled purity √(4k) * Tr(rho_n^2) of the random signed energy filter with m_k = floor(c √(4k)) Rademacher signs on n = 4k spins converges to the critical purity constant energy_filter_critical_purity_constant c.

theorem rademacher_filter_purity_mean_tendsto
    (c : ℝ) (hc : 0 < c) :
    Filter.Tendsto
      (fun k : ℕ => rademacher_expect
        (Nat.floor (c * Real.sqrt (4 * (k : ℝ))))
        (fun s => Real.sqrt (4 * (k : ℝ)) *
          energy_filter_sequence_purity
            (rademacher_filter (Nat.floor (c * Real.sqrt (4 * (k : ℝ)))) s) k))
      Filter.atTop
      (nhds (energy_filter_critical_purity_constant c))
rademacher_filter_purity_numer_uniform_decouplingIn LeanStatistical Mechanics & Thermodynamics

Uniformly over all 2^m sign configurations, the purity numerator (the four-fold cyclic binomial-weighted a-product sum) equals the Franel sum times the autocorrelation energy up to a vanishing relative error.

theorem rademacher_filter_purity_numer_uniform_decoupling
    (m : ℕ → ℕ) (hm_pos : ∀ k, 0 < m k)
    (hm_top : Filter.Tendsto (fun k => (m k : ℝ)) Filter.atTop Filter.atTop)
    (hm_sub : Filter.Tendsto (fun k => (m k : ℝ) / Real.sqrt (4 * (k : ℝ))) Filter.atTop (nhds 0))
    (η : ℝ) (hη : 0 < η) :
    ∀ᶠ k in Filter.atTop, ∀ s : Fin (m k) → Bool,
      |(∑ p ∈ Finset.range (2 * k + 1), ∑ q ∈ Finset.range (2 * k + 1),
          ∑ r ∈ Finset.range (2 * k + 1), ∑ t ∈ Finset.range (2 * k + 1),
            (Nat.choose (2 * k) p : ℝ) * (Nat.choose (2 * k) q : ℝ) *
              (Nat.choose (2 * k) r : ℝ) * (Nat.choose (2 * k) t : ℝ) *
              (rademacher_filter (m k) s (2 * (k : ℤ) - (p : ℤ) - (q : ℤ)) *
               rademacher_filter (m k) s (2 * (k : ℤ) - (q : ℤ) - (r : ℤ)) *
               rademacher_filter (m k) s (2 * (k : ℤ) - (r : ℤ) - (t : ℤ)) *
               rademacher_filter (m k) s (2 * (k : ℤ) - (t : ℤ) - (p : ℤ)))) -
        (∑ p ∈ Finset.range (2 * k + 1), (Nat.choose (2 * k) p : ℝ) ^ 4) *
          rademacher_autocorr_energy (m k) s| ≤
        η * (∑ p ∈ Finset.range (2 * k + 1), (Nat.choose (2 * k) p : ℝ) ^ 4) *
          rademacher_autocorr_energy (m k) s
rademacher_filter_purity_second_moment_tendstoIn LeanStatistical Mechanics & Thermodynamics

For c > 0, the uniform second moment over sign configurations of the scaled purity √(4k) * Tr(rho_n^2) of the random signed energy filter with m_k = floor(c √(4k)) Rademacher signs on n = 4k spins converges to the square of the critical purity constant energy_filter_critical_purity_constant c. Together with the mean limit this says the scaled purity concentrates around K(c).

theorem rademacher_filter_purity_second_moment_tendsto
    (c : ℝ) (hc : 0 < c) :
    Filter.Tendsto
      (fun k : ℕ => rademacher_expect
        (Nat.floor (c * Real.sqrt (4 * (k : ℝ))))
        (fun s => (Real.sqrt (4 * (k : ℝ)) *
          energy_filter_sequence_purity
            (rademacher_filter (Nat.floor (c * Real.sqrt (4 * (k : ℝ)))) s) k) ^ 2))
      Filter.atTop
      (nhds (energy_filter_critical_purity_constant c ^ 2))
rademacher_filter_sq_indicatorIn LeanStatistical Mechanics & Thermodynamics

For any m, any sign configuration s : Fin m → Bool and any integer j, the square of the Rademacher filter entry rademacher_filter m s j is 1 when 0 ≤ j < m and 0 otherwise. In particular every entry lies in {-1, 0, 1} and the square of the filter is the indicator function of its supporting window.

theorem rademacher_filter_sq_indicator (m : ℕ) (s : Fin m → Bool) (j : ℤ) :
    rademacher_filter m s j ^ 2 = if 0 ≤ j ∧ j < (m : ℤ) then 1 else 0
rademacher_franel_shift_symmetryIn LeanStatistical Mechanics & Thermodynamics

Every symmetric shift has the same Franel-weighted mass: sum_p C(2k,p)^3 C(2k,p+d) = sum_p C(2k,p)^4 for each d with |d| <= 2k. This is the exact oddness cancellation that kills the shift-linear term.

theorem rademacher_franel_shift_symmetry (k : ℕ) :
    ∑ p ∈ Finset.range (2 * k + 1),
        (Nat.choose (2 * k) p : ℝ) ^ 4 * ((k : ℝ) - (p : ℝ)) = 0
rademacher_prob_le_expect_sqIn LeanStatistical Mechanics & Thermodynamics

For any random variable X on the boolean cube Fin m → Bool, constant c, and δ > 0, the uniform probability that |X - c| > δ is at most E[(X - c)^2] / δ^2.

theorem rademacher_prob_le_expect_sq (m : ℕ) (X : (Fin m → Bool) → ℝ) (c : ℝ) (δ : ℝ) (hδ : 0 < δ) :
    rademacher_prob m (fun s => δ < |X s - c|) ≤
      rademacher_expect m (fun s => (X s - c)^2) / δ^2
rademacher_prob_tendsto_zero_of_mean_sq_tendstoIn LeanStatistical Mechanics & Thermodynamics

Let m : ℕ → ℕ, let X_k be a real random variable on the sign cube Fin (m k) → Bool and let K be a real constant. If the uniform mean squared deviation E[(X_k - K)^2] tends to 0, then for every ε > 0 the probability that |X_k - K| > ε tends to 0, i.e. X_k converges to K in probability under the uniform Rademacher measure.

theorem rademacher_prob_tendsto_zero_of_mean_sq_tendsto
    (m : ℕ → ℕ) (X : (k : ℕ) → (Fin (m k) → Bool) → ℝ) (K : ℝ)
    (h : Filter.Tendsto
      (fun k : ℕ => rademacher_expect (m k) (fun s => (X k s - K) ^ 2))
      Filter.atTop (nhds 0)) :
    ∀ ε : ℝ, 0 < ε →
      Filter.Tendsto
        (fun k : ℕ => rademacher_prob (m k) (fun s => ε < |X k s - K|))
        Filter.atTop (nhds 0)
random_signed_widening_energy_filter_scaled_purity_coupling_eventuallyIn LeanStatistical Mechanics & Thermodynamics

In the subdiffusive window m(k) / sqrt(4k) -> 0, the scaled purity of rademacher_filter (m k) s couples uniformly across all sign configurations s to the product of the scaled delta-filter purity and the normalized autocorrelation energy.

theorem random_signed_widening_energy_filter_scaled_purity_coupling_eventually
    (m : ℕ → ℕ) (hm_pos : ∀ k, 0 < m k)
    (hm_top : Filter.Tendsto (fun k => (m k : ℝ)) Filter.atTop Filter.atTop)
    (hm_sub : Filter.Tendsto (fun k => (m k : ℝ) / Real.sqrt (4 * (k : ℝ))) Filter.atTop (nhds 0))
    (ε : ℝ) (hε : 0 < ε) :
    let delta : ℤ → ℝ := fun j => if j = 0 then 1 else 0
    ∀ᶠ k in Filter.atTop, ∀ s : Fin (m k) → Bool,
      |Real.sqrt (4 * (k : ℝ)) * energy_filter_sequence_purity (rademacher_filter (m k) s) k -
        (Real.sqrt (4 * (k : ℝ)) * energy_filter_sequence_purity delta k) * (rademacher_autocorr_energy (m k) s / ((m k : ℝ)^2))| < ε
real_tanh_sq_range_infiniteIn LeanStatistical Mechanics & Thermodynamics

The set of real numbers of the form tanh(h)^2 for real h is infinite.

theorem real_tanh_sq_range_infinite : (Set.range fun h : ℝ => (Real.tanh h) ^ 2).Infinite
sum_gradient_mul_stationary_current_eq_zeroIn LeanStatistical Mechanics & Thermodynamics

For any potential phi on the vertices and any stationary current j on an oriented finite simple graph, the sum of (phi(u) - phi(v)) * j(e) over all edges is zero.

theorem sum_gradient_mul_stationary_current_eq_zero
    {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (o : SimpleGraphOrientation G)
    (phi : V → ℝ) (j : G.edgeFinset → ℝ)
    (hj : is_stationary_current G o j) :
    ∑ e : G.edgeFinset, (phi (o.dir e).1 - phi (o.dir e).2) * j e = 0
sum_vertex_abs_currentIn LeanStatistical Mechanics & Thermodynamics

For any finite simple graph G with orientation o and any current j on G.edgeFinset, the sum over all vertices of the absolute current on incident edges equals twice the total sum of |j(e)| over all edges.

theorem sum_vertex_abs_current {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (o : SimpleGraphOrientation G) (j : G.edgeFinset → ℝ) :
    ∑ v : V, ∑ e : G.edgeFinset,
      ((if (o.dir e).1 = v then |j e| else 0) + (if (o.dir e).2 = v then |j e| else 0)) =
      2 * ∑ e : G.edgeFinset, |j e|
three_real_sum_zero_abs_eq_two_maxIn LeanStatistical Mechanics & Thermodynamics

The sum of the absolute values of three real numbers that sum to zero equals twice the largest of the three absolute values.

theorem three_real_sum_zero_abs_eq_two_max (a b c : ℝ) (h : a + b + c = 0) :
    |a| + |b| + |c| = 2 * max (max |a| |b|) |c|
three_real_sum_zero_sq_ge_max_sqIn LeanStatistical Mechanics & Thermodynamics

Three real numbers summing to zero have sum of squares at least 3/2 times the square of the largest absolute value.

theorem three_real_sum_zero_sq_ge_max_sq (a b c : ℝ) (h : a + b + c = 0) :
    (3 / 2 : ℝ) * (max (max |a| |b|) |c|)^2 ≤ a^2 + b^2 + c^2
two_species_purity_zeroIn LeanStatistical Mechanics & Thermodynamics

For any tau and alpha, two_species_purity(0, tau, alpha) = 1.

theorem two_species_purity_zero (τ α : ℝ) : two_species_purity 0 τ α = 1
coin_problem_dominance_of_unequal_allocationsIn LeanConcentration of Measure

Let a, b ≥ 1 be positive integers and δ ∈ (0,1). Let X_A and X_B be independent binomial random variables with parameters a and 1/2, and b and 1/2, respectively, on a probability space (Ω, μ). Let A = 2 * X_A - a, B = 2 * X_B - b, and C_AB = A + B. If b ≤ 0.02 * a * δ^2 / ln(4/δ), then the probability that the sign of C_AB equals the sign of A is at least 1 - δ. Conversely, if a ≤ 0.02 * b * δ^2 / ln(4/δ), then the probability that the sign of C_AB equals the sign of B is at least 1 - δ.

open MeasureTheory ProbabilityTheory
open scoped unitInterval

theorem coin_problem_dominance_of_unequal_allocations
    {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} [IsProbabilityMeasure μ]
    (a b : ℕ) (ha : 1 ≤ a) (hb : 1 ≤ b)
    (X_A X_B : Ω → ℕ)
    (hX_A : HasLaw X_A (binomial a ⟨1/2, by norm_num⟩) μ)
    (hX_B : HasLaw X_B (binomial b ⟨1/2, by norm_num⟩) μ)
    (h_indep : IndepFun X_A X_B μ)
    (δ : ℝ) (hδ_pos : 0 < δ) (hδ_lt_one : δ < 1) :
    let A : Ω → ℝ := fun ω ↦ 2 * (X_A ω : ℝ) - a
    let B : Ω → ℝ := fun ω ↦ 2 * (X_B ω : ℝ) - b
    let C_AB : Ω → ℝ := fun ω ↦ A ω + B ω
    ((b : ℝ) ≤ 0.02 * a * δ ^ 2 / Real.log (4 / δ) →
      1 - δ ≤ μ.real {ω | SignType.sign (C_AB ω) = SignType.sign (A ω)}) ∧
    ((a : ℝ) ≤ 0.02 * b * δ ^ 2 / Real.log (4 / δ) →
      1 - δ ≤ μ.real {ω | SignType.sign (C_AB ω) = SignType.sign (B ω)})
f2_nonzero_outer_product_rigidIn LeanAlgebraic & Lattice-Based Complexity

Two equal outer products over the two-element field with the first pair of factors nonzero have equal corresponding factors.

theorem f2_nonzero_outer_product_rigid {I J : Type*}
    (u w : I → ZMod 2) (v z : J → ZMod 2)
    (hu : u ≠ 0) (hv : v ≠ 0)
    (h : ∀ i j, u i * v j = w i * z j) : u = w ∧ v = z
koszul_binom_marginIn LeanAlgebraic & Lattice-Based Complexity

For n ≥ 4, setting p = ⌊(n-1)/2⌋, the maximal Koszul rank n·binom(n,p) strictly exceeds (2n-4)·binom(n-1,p).

theorem koszul_binom_margin (n : ℕ) (hn : 4 ≤ n) :
    (2 * n - 4) * (n - 1).choose ((n - 1) / 2) < n * n.choose ((n - 1) / 2)
koszul_flattening_pure_rank_leIn LeanAlgebraic & Lattice-Based Complexity

For every pure tensor x ⊗ y ⊗ z in (ℂⁿ)⊗³, the Koszul flattening K_p has rank at most binom(n-1, p).

theorem koszul_flattening_pure_rank_le (n p : ℕ) (x y z : Fin n → ℂ) :
    ((koszul_flattening n p) (tensor3_pure x y z)).rank ≤ (n - 1).choose p
koszul_flattening_rank_witnessIn LeanAlgebraic & Lattice-Based Complexity

For 2p+1 ≤ n there is a tensor T in (ℂⁿ)⊗³ whose Koszul flattening K_p has rank at least n·binom(n,p) (the maximal possible, since the format is n·binom(n,p) × n·binom(n,p+1)).

theorem koszul_flattening_rank_witness (n p : ℕ) (hp : 2 * p + 1 ≤ n) :
    ∃ T : Fin n → Fin n → Fin n → ℂ,
      n * n.choose p ≤ ((koszul_flattening n p) T).rank
linear_flattening_testable_even_dimensionIn LeanAlgebraic & Lattice-Based Complexity

For every even natural number n ≥ 6, the secant variety σ_{2n-2}((ℂⁿ)⊗³) is testable by the linear flattening method.

theorem linear_flattening_testable_even_dimension (n : ℕ) (hn : 6 ≤ n) (heven : Even n) : linear_flattening_testable n (2 * n - 2)
linear_flattening_testable_even_stepIn LeanAlgebraic & Lattice-Based Complexity

For every even integer k ≥ 4, if the secant variety σ_{2k-2}((ℂᵏ)⊗³) is testable by the linear flattening method, then σ_{2(k+2)-2}((ℂ^{k+2})⊗³) is also testable.

theorem linear_flattening_testable_even_step (k : ℕ) (hk : 4 ≤ k) (heven : Even k) :
    linear_flattening_testable k (2 * k - 2) →
    linear_flattening_testable (k + 2) (2 * (k + 2) - 2)
linear_flattening_testable_odd_dimensionIn LeanAlgebraic & Lattice-Based Complexity

For every odd natural number n ≥ 5, the secant variety σ_{2n-2}((ℂⁿ)⊗³) is testable by the linear flattening method.

theorem linear_flattening_testable_odd_dimension (n : ℕ) (hn : 5 ≤ n) (hodd : ¬ Even n) : linear_flattening_testable n (2 * n - 2)
linear_flattening_testable_order_gap_fourIn LeanAlgebraic & Lattice-Based Complexity

At the fixed dimension n = k+2 (k ≥ 4), testability at order 2k-2 upgrades to testability at order 2k+2 = 2(k+2)-2; i.e. if the optimal potency at dimension k+2 exceeds 2k-2 then it exceeds 2(k+2)-2.

theorem linear_flattening_testable_order_gap_four (k : ℕ) (hk : 4 ≤ k)
    (h : linear_flattening_testable (k + 2) (2 * k - 2)) :
    linear_flattening_testable (k + 2) (2 * (k + 2) - 2)
linear_flattening_testable_order_gap_twoIn LeanAlgebraic & Lattice-Based Complexity

At dimension n = k+2 with k ≥ 4, testability by linear flattenings at order 2k - 2 implies testability at order 2k.

theorem linear_flattening_testable_order_gap_two (k : ℕ) (hk : 4 ≤ k)
    (h : linear_flattening_testable (k + 2) (2 * k - 2)) :
    linear_flattening_testable (k + 2) (2 * k)
linear_flattening_testable_order_gap_two_secondIn LeanAlgebraic & Lattice-Based Complexity

At dimension n = k+2 with k ≥ 4, testability by linear flattenings at order 2k implies testability at order 2(k+2) - 2 = 2k + 2.

theorem linear_flattening_testable_order_gap_two_second (k : ℕ) (hk : 4 ≤ k)
    (h : linear_flattening_testable (k + 2) (2 * k)) :
    linear_flattening_testable (k + 2) (2 * (k + 2) - 2)
linear_flattening_testable_order_two_mul_sub_fourIn LeanAlgebraic & Lattice-Based Complexity

For every n ≥ 6, σ_{2n-4}((ℂⁿ)⊗³) is testable by the linear flattening method (the central Koszul flattening has potency greater than 2n-4).

theorem linear_flattening_testable_order_two_mul_sub_four (n : ℕ) (hn : 6 ≤ n) :
    linear_flattening_testable n (2 * n - 4)
matrix3_eval_decomposition_appendIn LeanAlgebraic & Lattice-Based Complexity

Evaluating a concatenation of two lists of triads gives the sum of the two evaluations: eval (L₁ ++ L₂) A B = eval L₁ A B + eval L₂ A B, over any commutative semiring.

theorem matrix3_eval_decomposition_append {R : Type*} [CommSemiring R] (L₁ L₂ : List (Matrix3Triad R)) (A B : Matrix (Fin 3) (Fin 3) R) : eval_matrix3_decomposition (L₁ ++ L₂) A B = eval_matrix3_decomposition L₁ A B + eval_matrix3_decomposition L₂ A B
matrix3_eval_decomposition_erase_dup_of_two_eq_zeroIn LeanAlgebraic & Lattice-Based Complexity

In a commutative ring of characteristic 2 (2 = 0), two occurrences of the same triad cancel: for every list split L₁ ++ t :: L₂ ++ t :: L₃, deleting both copies gives the same evaluation on all inputs, eval (L₁ ++ t :: L₂ ++ t :: L₃) A B = eval (L₁ ++ L₂ ++ L₃) A B.

theorem matrix3_eval_decomposition_erase_dup_of_two_eq_zero {R : Type*} [CommRing R] (h2 : (2 : R) = 0) (L₁ L₂ L₃ : List (Matrix3Triad R)) (t : Matrix3Triad R) (A B : Matrix (Fin 3) (Fin 3) R) : eval_matrix3_decomposition (L₁ ++ t :: L₂ ++ t :: L₃) A B = eval_matrix3_decomposition (L₁ ++ L₂ ++ L₃) A B
matrix3_eval_decomposition_erase_of_eval_zeroIn LeanAlgebraic & Lattice-Based Complexity

If a triad evaluates to the zero matrix on every pair of inputs (in particular if its u, v or w component is zero), then deleting it from a decomposition does not change the evaluation: eval (L₁ ++ t :: L₂) A B = eval (L₁ ++ L₂) A B for all A, B.

theorem matrix3_eval_decomposition_erase_of_eval_zero {R : Type*} [CommSemiring R] (L₁ L₂ : List (Matrix3Triad R)) (t : Matrix3Triad R) (h : ∀ A B, eval_matrix3_triad t A B = 0) (A B : Matrix (Fin 3) (Fin 3) R) : eval_matrix3_decomposition (L₁ ++ t :: L₂) A B = eval_matrix3_decomposition (L₁ ++ L₂) A B
matrix3_gram_change_basisIn LeanAlgebraic & Lattice-Based Complexity

The rank-one-defect Gram equations are preserved by the displayed invertible changes of bases in all three slots, with the displayed changes of defect vectors.

theorem matrix3_gram_change_basis {K : Type*} [Field K]
    {I : Type*} [DecidableEq I]
    (a b c : I → Matrix (Fin 3) (Fin 3) K) (l m : I → Fin 3 → K)
    (hg : ∀ t s, a t*b s*c t*a s=
      (if t=s then a s else 0)+Matrix.vecMulVec (l t) (m s))
    (P Q R : Matrix (Fin 3) (Fin 3) K)
    (hP : IsUnit P.det) (hQ : IsUnit Q.det) (hR : IsUnit R.det) :
    ∀ t s,
      (P*a t*Q)*(Q⁻¹*b s*R)*(R⁻¹*c t*P⁻¹)*(P*a s*Q)=
        (if t=s then P*a s*Q else 0)+
          Matrix.vecMulVec (P.mulVec (l t)) (Qᵀ.mulVec (m s))
matrix3_gram_excess_one_invertible_pair_ranksIn LeanAlgebraic & Lattice-Based Complexity

In a rank-one-defect Gram family over the two-element field, two invertible first factors at different indices force the four corresponding second and third factors to have rank two.

theorem matrix3_gram_excess_one_invertible_pair_ranks {r : ℕ}
    (a b c : Fin r → Matrix (Fin 3) (Fin 3) (ZMod 2))
    (l m : Fin r → Fin 3 → ZMod 2)
    (hg : ∀ t s, a t*b s*c t*a s =
      (if t=s then a s else 0) + Matrix.vecMulVec (l t) (m s))
    (t s : Fin r) (hts : t ≠ s) (ht : (a t).det ≠ 0) (hs : (a s).det ≠ 0) :
    (b t).rank = 2 ∧ (c t).rank = 2 ∧ (b s).rank = 2 ∧ (c s).rank = 2
matrix3_gram_reindexIn LeanAlgebraic & Lattice-Based Complexity

The rank-one-defect Gram equations are preserved by simultaneous reindexing of all matrix and vector coordinates.

theorem matrix3_gram_reindex {K : Type*} [Field K]
    {I : Type*} [DecidableEq I]
    (a b c : I → Matrix (Fin 3) (Fin 3) K) (l m : I → Fin 3 → K)
    (hg : ∀ t s, a t*b s*c t*a s=
      (if t=s then a s else 0)+Matrix.vecMulVec (l t) (m s))
    (e : Fin 3 ≃ Fin 3) :
    ∀ t s,
      (a t).submatrix e e*(b s).submatrix e e*(c t).submatrix e e*(a s).submatrix e e=
        (if t=s then (a s).submatrix e e else 0)+
          Matrix.vecMulVec ((l t) ∘ e) ((m s) ∘ e)
matrix3_rank_two_diagonal_reindexIn LeanAlgebraic & Lattice-Based Complexity

Every rank-two diagonal projection given by a reindexing of the two-plus-one block form can be reindexed to diag(0,1,1).

theorem matrix3_rank_two_diagonal_reindex :
    ∀ e : Fin 3 ≃ (Fin 2 ⊕ Fin 1), ∃ p : Fin 3 ≃ Fin 3,
      (((Matrix.fromBlocks (1 : Matrix (Fin 2) (Fin 2) (ZMod 2)) 0 0
        (0 : Matrix (Fin 1) (Fin 1) (ZMod 2))).submatrix e e).submatrix p p) =
        Matrix.diagonal ![0,1,1]
matrix3_singular_rank_le_twoIn LeanAlgebraic & Lattice-Based Complexity

A singular 3-by-3 matrix over a field has rank at most two.

theorem matrix3_singular_rank_le_two {K : Type*} [Field K]
    (A : Matrix (Fin 3) (Fin 3) K) (hd : A.det = 0) : A.rank ≤ 2
matrix3_tensor_rank_int_ge_9In LeanAlgebraic & Lattice-Based Complexity

The tensor rank of 3x3 matrix multiplication over ℤ is at least 9.

theorem matrix3_tensor_rank_int_ge_9 : matrix3_tensor_rank_ge ℤ 9
matrix3_tensor_rank_le_zmod2_iff_reduced_unit_checkIn LeanAlgebraic & Lattice-Based Complexity

For every r, 3x3 matrix multiplication over ZMod 2 has a valid decomposition with at most r triads if and only if there is a list L of at most r triads over ZMod 2 that is duplicate-free, has no triad with a zero u, v or w component, and passes the computable unit check matrix3_unit_check. This is an equivalence, not the open bound itself: it says the search for a 22-product algorithm may be restricted to subsets (of size at most r) of the 2^27 triads over ZMod 2, each triad having all three components nonzero.

theorem matrix3_tensor_rank_le_zmod2_iff_reduced_unit_check (r : ℕ) : matrix3_tensor_rank_le (ZMod 2) r ↔ ∃ L : List (Matrix3Triad (ZMod 2)), L.length ≤ r ∧ L.Nodup ∧ (∀ t ∈ L, t.u ≠ 0 ∧ t.v ≠ 0 ∧ t.w ≠ 0) ∧ matrix3_unit_check L = true
matrix3_trace_cyclic_rotateIn LeanAlgebraic & Lattice-Based Complexity

Cyclic rotation (a, b, c) ↦ (b, c, a) of any finite indexed family satisfying the cyclic trace coefficient identities of 3x3 matrix multiplication satisfies the same identities.

theorem matrix3_trace_cyclic_rotate {R : Type*} [CommSemiring R] {r : ℕ} (a b c : Fin r → Matrix (Fin 3) (Fin 3) R)
    (h : ∀ i j j' k k' i' : Fin 3,
      ∑ s, a s i j * b s j' k * c s k' i' =
        if j = j' ∧ k = k' ∧ i = i' then 1 else 0) :
    ∀ i j j' k k' i' : Fin 3,
      ∑ s, b s i j * c s j' k * a s k' i' =
        if j = j' ∧ k = k' ∧ i = i' then 1 else 0
matrix3_trace_excess_one_invertible_pair_ranksIn LeanAlgebraic & Lattice-Based Complexity

In a cyclic trace decomposition over the two-element field with first-factor rank sum 28, two invertible first factors at different indices force the four corresponding second and third factors to have rank two.

theorem matrix3_trace_excess_one_invertible_pair_ranks {r : ℕ}
    (a b c : Fin r → Matrix (Fin 3) (Fin 3) (ZMod 2))
    (hc : ∀ i j j' k k' i' : Fin 3,
      ∑ q, a q i j * b q j' k * c q k' i' =
        if j=j' ∧ k=k' ∧ i=i' then 1 else 0)
    (hd : ∑ q, (a q).rank = 28)
    (t s : Fin r) (hts : t ≠ s) (ht : (a t).det ≠ 0) (hs : (a s).det ≠ 0) :
    (b t).rank = 2 ∧ (c t).rank = 2 ∧ (b s).rank = 2 ∧ (c s).rank = 2
matrix3_trace_length_ge_9In LeanAlgebraic & Lattice-Based Complexity

Every cyclic trace decomposition of 3x3 matrix multiplication over a field K has length at least 9.

theorem matrix3_trace_length_ge_9 {K : Type*} [Field K] {r : ℕ} (a b c : Fin r → Matrix (Fin 3) (Fin 3) K)
    (h : ∀ i j j' k k' i' : Fin 3,
      ∑ s, a s i j * b s j' k * c s k' i' =
        if j = j' ∧ k = k' ∧ i = i' then 1 else 0) :
    9 ≤ r
matrix3_trace_total_rank_sum_ge_81In LeanAlgebraic & Lattice-Based Complexity

For any cyclic trace decomposition of 3x3 matrix multiplication over a field K, the sum of all matrix ranks across all three factor positions is at least 81.

theorem matrix3_trace_total_rank_sum_ge_81 {K : Type*} [Field K] {r : ℕ} (a b c : Fin r → Matrix (Fin 3) (Fin 3) K)
    (h : ∀ i j j' k k' i' : Fin 3,
      ∑ s, a s i j * b s j' k * c s k' i' =
        if j = j' ∧ k = k' ∧ i = i' then 1 else 0) :
    81 ≤ ∑ s, ((a s).rank + (b s).rank + (c s).rank)
matrix3_trace_transpose_swapIn LeanAlgebraic & Lattice-Based Complexity

Transpose-swap (a, b, c) ↦ (bᵀ, aᵀ, cᵀ) of any family satisfying the cyclic trace identities satisfies the same identities.

theorem matrix3_trace_transpose_swap {R : Type*} [CommSemiring R] {r : ℕ} (a b c : Fin r → Matrix (Fin 3) (Fin 3) R)
    (h : ∀ i j j' k k' i' : Fin 3,
      ∑ s, a s i j * b s j' k * c s k' i' =
        if j = j' ∧ k = k' ∧ i = i' then 1 else 0) :
    ∀ i j j' k k' i' : Fin 3,
      ∑ s, (b s).transpose i j * (a s).transpose j' k * (c s).transpose k' i' =
        if j = j' ∧ k = k' ∧ i = i' then 1 else 0
matrix3_unit_sandwich_injectiveIn LeanAlgebraic & Lattice-Based Complexity

Multiplication on both sides by matrices with unit determinant is injective.

theorem matrix3_unit_sandwich_injective {K : Type*} [Field K]
    (P Q A B : Matrix (Fin 3) (Fin 3) K) (hP : IsUnit P.det) (hQ : IsUnit Q.det)
    (h : P*A*Q=P*B*Q) : A=B
matrix3_valid_erase_dup_of_two_eq_zeroIn LeanAlgebraic & Lattice-Based Complexity

In a commutative ring of characteristic 2, if the list L₁ ++ t :: L₂ ++ t :: L₃ is a valid decomposition of matrix multiplication (contains two copies of the same triad t), then deleting both copies gives a valid decomposition: is_valid (L₁ ++ L₂ ++ L₃).

theorem matrix3_valid_erase_dup_of_two_eq_zero {R : Type*} [CommRing R] (h2 : (2 : R) = 0) (L₁ L₂ L₃ : List (Matrix3Triad R)) (t : Matrix3Triad R) (hv : is_valid_matrix3_decomposition (L₁ ++ t :: L₂ ++ t :: L₃)) : is_valid_matrix3_decomposition (L₁ ++ L₂ ++ L₃)
matrix3_valid_erase_of_zero_slotIn LeanAlgebraic & Lattice-Based Complexity

If L₁ ++ t :: L₂ is a valid decomposition of 3x3 matrix multiplication over a commutative semiring and the triad t has a zero u, zero v or zero w component, then L₁ ++ L₂ is a valid decomposition too.

theorem matrix3_valid_erase_of_zero_slot {R : Type*} [CommSemiring R] (L₁ L₂ : List (Matrix3Triad R)) (t : Matrix3Triad R) (hv : is_valid_matrix3_decomposition (L₁ ++ t :: L₂)) (h0 : t.u = 0 ∨ t.v = 0 ∨ t.w = 0) : is_valid_matrix3_decomposition (L₁ ++ L₂)
matrix3_valid_reduced_normal_formIn LeanAlgebraic & Lattice-Based Complexity

Every valid decomposition of 3x3 matrix multiplication over ZMod 2 can be replaced by one that is no longer, still valid, contains no repeated triad, and contains no triad with a zero u, v or w component. (Minimal-length valid decompositions have both properties, because a zero-slot triad can be deleted and in characteristic 2 two copies of one triad cancel.)

theorem matrix3_valid_reduced_normal_form (L : List (Matrix3Triad (ZMod 2))) (h : is_valid_matrix3_decomposition L) : ∃ L' : List (Matrix3Triad (ZMod 2)), L'.length ≤ L.length ∧ is_valid_matrix3_decomposition L' ∧ L'.Nodup ∧ ∀ t ∈ L', t.u ≠ 0 ∧ t.v ≠ 0 ∧ t.w ≠ 0
matrix_rank_add_le_sumIn LeanAlgebraic & Lattice-Based Complexity

The rank of a sum of two finite matrices over a field is at most the sum of their ranks.

theorem matrix_rank_add_le_sum {K : Type*} [Field K]
    {I J : Type*} [Fintype I] [Fintype J] (A B : Matrix I J K) :
    (A+B).rank ≤ A.rank+B.rank
ncabp_eval_poly_of_sink_lt_sourceIn LeanAlgebraic & Lattice-Based Complexity

For any ncABP A over a commutative semiring F, if A.sink < A.source, then ncabp_eval_poly A = 0.

theorem ncabp_eval_poly_of_sink_lt_source {F : Type*} [CommSemiring F] {m S : ℕ}
    (A : NcABP F m S) (h : A.sink < A.source) : ncabp_eval_poly A = 0
ncabp_eval_poly_of_source_eq_sinkIn LeanAlgebraic & Lattice-Based Complexity

For any ncABP A over a commutative semiring F, if A.source = A.sink, then ncabp_eval_poly A = 1.

theorem ncabp_eval_poly_of_source_eq_sink {F : Type*} [CommSemiring F] {m S : ℕ}
    (A : NcABP F m S) (h : A.source = A.sink) : ncabp_eval_poly A = 1
ncabp_hitting_tuple_of_kernel_trivialIn LeanAlgebraic & Lattice-Based Complexity

A matrix tuple T is an ncABP hitting tuple if for every ncABP A with S vertices on m variables, (FreeAlgebra.lift F T) (ncabp_eval_poly A) = 0 implies ncabp_eval_poly A = 0.

theorem ncabp_hitting_tuple_of_kernel_trivial {F : Type*} [Field F] (m S R : ℕ)
    (T : Fin m → Matrix (Fin R) (Fin R) F)
    (h : ∀ (A : NcABP F m S), (FreeAlgebra.lift F T) (ncabp_eval_poly A) = 0 → ncabp_eval_poly A = 0) :
    is_ncabp_hitting_tuple m S R T
ncabp_hitting_tuple_s_oneIn LeanAlgebraic & Lattice-Based Complexity

For any field F and natural number m, the 1-by-1 zero matrix tuple is an ncABP hitting tuple for ncABPs with 1 vertex on m variables.

theorem ncabp_hitting_tuple_s_one {F : Type*} [Field F] (m : ℕ) :
    is_ncabp_hitting_tuple m 1 1 (fun _ : Fin m => (0 : Matrix (Fin 1) (Fin 1) F))
ncabp_matrix_entry_of_leIn LeanAlgebraic & Lattice-Based Complexity

For any ncABP A over a commutative semiring F, if v ≤ u then the (u, v) entry of the transition matrix ncabp_matrix A is 0.

theorem ncabp_matrix_entry_of_le {F : Type*} [CommSemiring F] {m S : ℕ}
    (A : NcABP F m S) (u v : Fin S) (h : v ≤ u) : ncabp_matrix A u v = 0
ncabp_matrix_pow_entry_of_lt_addIn LeanAlgebraic & Lattice-Based Complexity

For any ncABP A over a commutative semiring F, natural number k, and vertices u, v, if v < u + k then (ncabp_matrix A ^ k) u v = 0.

theorem ncabp_matrix_pow_entry_of_lt_add {F : Type*} [CommSemiring F] {m S : ℕ}
    (A : NcABP F m S) (k : ℕ) (u v : Fin S) (h : (v : ℕ) < (u : ℕ) + k) :
    (ncabp_matrix A ^ k) u v = 0
ncabp_matrix_pow_ge_dim_eq_zeroIn LeanAlgebraic & Lattice-Based Complexity

For any ncABP A of size S over a commutative semiring F, and k ≥ S, the k-th power of ncabp_matrix A is zero.

theorem ncabp_matrix_pow_ge_dim_eq_zero {F : Type*} [CommSemiring F] {m S : ℕ}
    (A : NcABP F m S) (k : ℕ) (hk : S ≤ k) :
    ncabp_matrix A ^ k = 0
not_matrix3_tensor_rank_zmod2_le_22In LeanAlgebraic & Lattice-Based Complexity

The statement matrix3_tensor_rank_zmod2_le_22 is false: The statement asserts rank <= 22 of the 3x3 matrix-multiplication tensor over F2. Unfolding the KB definitions: eval_matrix3_triad t A B = ((Σ u_ij A_ij)*(Σ v_ij B_ij)) • w and is_valid_matrix3_decomposition L = ∀ A B, eval L A B = A * B, so matrix3_tensor_rank_le (ZMod 2) 22 says exactly that A*B over ZMod 2 has a bilinear algorithm with at most 22 products. Per this knowledge base's recorded literature (arXiv:2610.11823, "The rank of 3x3 matrix multiplication over F2 is 23", rev. 2026-10-19) the rank over F2 is 23, so the statement is false: the negation (rank >= 23) holds. A kernel-only Lean 4 development accompanies that paper (github.com/tejasvi/rank333-f2-kernel at 0c7c6173c3dc91cf63972f1fe8980b726dd6a8e6, final theorem R22K.Final.rank_ge_23 : Top.RankGe23), but its final dependency graph is 14,185,917 generated modules (public import closure 17,017 modules, most proof bodies withheld) on Lean/Mathlib 4.30.0, with a reported source-regeneration cost of ~529,504 CPU-hours; it can be neither imported nor rebuilt in this environment (Lean 4.33.1, no network), so no verified local refutation is available. Concretely, in this KB the target is equivalent to the finite statement ∃ L : List (Matrix3Triad (ZMod 2)), L.length ≤ 22 ∧ matrix3_unit_check L = true (proved node matrix3_tensor_rank_le_zmod2_iff_unit_check applied to r = 22): a witness check on 729 cubic F2 identities among 2^594 candidate lists, with no witness existing. I verified first-hand this session that the only known 23-triad scheme matrix3_triads_23 (ZMod 2) passes matrix3_unit_check and that no drop-one sublist does (the indices whose removal still passes evaluate to []), consistent with the KB's exhaustive refutations of all local shortenings (no mergeable pairs; none of 1771 triples is replaceable by 2 products; none of 350 quadruples by 3; all 2,831,323 subset replacements of sizes 5..10 obstructed). The statement is not merely unproved but false; the missing object (a 22-triad scheme) does not exist, and a Lean proof of the negation is a research-scale verified exhaustive computation. Note also that the negation would immediately give rank >= 23 over Z via the proved transfer matrix3_tensor_rank_int_ge_of_zmod2, i.e. it would settle the integer case too.

theorem not_matrix3_tensor_rank_zmod2_le_22 : ¬ (matrix3_tensor_rank_le (ZMod 2) 22)
step_function_sigma_cubed_sub_leIn LeanAlgebraic & Lattice-Based Complexity

For all real numbers t, the difference |t^3 - σ(t)| between t^3 and the step function σ(t) is bounded by 3 t^2 |t^2 - 1|.

lemma step_function_sigma_cubed_sub_le (t : ℝ) : |t ^ 3 - (step_function_sigma t : ℝ)| ≤ 3 * t ^ 2 * |t ^ 2 - 1|
step_function_sigma_zeroIn LeanAlgebraic & Lattice-Based Complexity

The step function evaluates to 0 at 0.

lemma step_function_sigma_zero : step_function_sigma 0 = 0
symmetric_oct_f_ge_of_power_sum_one_ne_zeroIn LeanAlgebraic & Lattice-Based Complexity

For any vector x with non-zero first power sum p_1(x) ≠ 0, the degree-8 symmetric function satisfies F(x) ≥ 16 p_1(x)^8.

lemma symmetric_oct_f_ge_of_power_sum_one_ne_zero {n : ℕ} (x : Fin n → ℝ) (h : symmetric_power_sum 1 x ≠ 0) : 16 * (symmetric_power_sum 1 x) ^ 8 ≤ symmetric_oct_f x
symmetric_oct_f_of_power_sum_one_zeroIn LeanAlgebraic & Lattice-Based Complexity

If the first power sum p_1(x) vanishes, then the degree-8 symmetric function F(x) simplifies to 9 p_2(x) p_6(x).

lemma symmetric_oct_f_of_power_sum_one_zero {n : ℕ} (x : Fin n → ℝ) (h : symmetric_power_sum 1 x = 0) : symmetric_oct_f x = 9 * symmetric_power_sum 2 x * symmetric_power_sum 6 x
symmetric_oct_f_pos_defIn LeanAlgebraic & Lattice-Based Complexity

The homogeneous degree-8 symmetric function F is any-dimensional positive definite: for every natural number n and every non-zero vector x : Fin n → ℝ, F(x) > 0.

theorem symmetric_oct_f_pos_def {n : ℕ} (x : Fin n → ℝ) (hx : x ≠ 0) : 0 < symmetric_oct_f x
symmetric_oct_f_pos_of_power_sum_one_zeroIn LeanAlgebraic & Lattice-Based Complexity

For any non-zero vector x with vanishing first power sum p_1(x) = 0, the degree-8 symmetric function F(x) is strictly positive.

lemma symmetric_oct_f_pos_of_power_sum_one_zero {n : ℕ} (x : Fin n → ℝ) (hne : x ≠ 0) (h : symmetric_power_sum 1 x = 0) : 0 < symmetric_oct_f x
symmetric_oct_f_zeroIn LeanAlgebraic & Lattice-Based Complexity

The degree-8 symmetric function evaluates to 0 at the zero vector.

lemma symmetric_oct_f_zero {n : ℕ} : symmetric_oct_f (0 : Fin n → ℝ) = 0
symmetric_power_sum_zeroIn LeanAlgebraic & Lattice-Based Complexity

For any positive integer r and dimension n, the r-th power sum of the zero vector in Fin n → ℝ is zero.

lemma symmetric_power_sum_zero {n : ℕ} {r : ℕ} (hr : 0 < r) : symmetric_power_sum r (0 : Fin n → ℝ) = 0
augmented_cycle_area_eq_kemenyIn LeanAlgorithm Design & Analysis

For any factor vectors h_1, ..., h_n in R^2 and any item permutation π in S_n, the doubled signed area of the closed polygon formed by augmenting the cycle with the closing vector h_0 = -∑_i h_i equals the weighted Kemeny objective ∑_{r < s} det(h_{π_r}, h_{π_s}).

theorem augmented_cycle_area_eq_kemeny {n : ℕ} (h : Fin n → ℝ × ℝ) (π : Equiv.Perm (Fin n)) :
    (let g : Fin (n + 1) → ℝ × ℝ := Fin.cases (-∑ i, h i) (fun r => h (π r))
    ∑ a : Fin (n + 1), ∑ b : Fin (n + 1),
      if a < b then (g a).1 * (g b).2 - (g a).2 * (g b).1 else 0) =
    ∑ r : Fin n, ∑ s : Fin n,
      if r < s then (h (π r)).1 * (h (π s)).2 - (h (π r)).2 * (h (π s)).1 else 0
boruvka_round_cost_leIn LeanAlgorithm Design & Analysis

In any Borůvka round from F to F' under profile π : V → LinearOrder V consistent with pseudometric d : V → V → ℝ on finite type V, the cost difference graph_cost d F' - graph_cost d F is at most 2 * graph_cost d T_mst, where T_mst is a minimum spanning tree under d.

theorem boruvka_round_cost_le
    {V : Type*} [Fintype V] [DecidableEq V]
    (d : V → V → ℝ) (hd : is_pseudometric d)
    (π : V → LinearOrder V) (hπ : ordinal_profile_consistent d π)
    (F F' : SimpleGraph V) (h_round : boruvka_round π F F')
    (T_mst : SimpleGraph V) (h_mst : is_mst d T_mst) :
    graph_cost d F' - graph_cost d F ≤ 2 * graph_cost d T_mst
boruvka_round_edges_sum_le_two_mst_costIn LeanAlgorithm Design & Analysis

For any forest F and tree T, charging each proposed edge (r(c), g(c)) to the prefix of the path in T from r(c) to g(c) up to the first vertex outside c implies that the sum of costs of the proposed edges is at most 2 * graph_cost d T.

theorem boruvka_round_edges_sum_le_two_mst_cost
    {V : Type*} [Fintype V] [DecidableEq V]
    (d : V → V → ℝ) (hd : is_pseudometric d)
    (π : V → LinearOrder V) (hπ : ordinal_profile_consistent d π)
    (F : SimpleGraph V) (hF : F.IsAcyclic)
    (r g : F.ConnectedComponent → V)
    (hr : ∀ c, F.connectedComponentMk (r c) = c)
    (hg : ∀ c, is_globally_best_outside F π (r c) (g c))
    (T : SimpleGraph V) (hT : T.IsTree) :
    (∑ c : F.ConnectedComponent, d (r c) (g c)) ≤ 2 * graph_cost d T
bpe_deviation_prob_le_oneIn LeanAlgorithm Design & Analysis

For any source bias p ∈ (0, 1), step count k, input length N, target constant c, and tolerance ε, the deviation probability bpe_deviation_prob p hp k N c ε is ≤ 1.

theorem bpe_deviation_prob_le_one (p : ℝ) (hp : 0 < p ∧ p < 1) (k N : ℕ) (c ε : ℝ) : bpe_deviation_prob p hp k N c ε ≤ 1
bpe_greedy_run_length_posIn LeanAlgorithm Design & Analysis

If s is a non-empty string and t is obtained by k greedy BPE merge steps from s, then t is also non-empty (0 < t.length).

theorem bpe_greedy_run_length_pos (k : ℕ) (s t : List ℕ) (h : bpe_greedy_run k s t) (hs : 0 < s.length) : 0 < t.length
bpe_run_token_length_boundsIn LeanAlgorithm Design & Analysis

Given any binary sequence w : Fin N → Bool and any k-step greedy BPE run t on its list representation, the output length satisfies N ≤ 2^k * t.length and t.length ≤ N.

theorem bpe_run_token_length_bounds (k N : ℕ) (w : Fin N → Bool) (t : List ℕ) (h : bpe_greedy_run k (List.ofFn (fun i => if w i then 1 else 0)) t) : N ≤ 2^k * t.length ∧ t.length ≤ N
bpe_worst_case_ratio_three_matching_lower_boundIn LeanAlgorithm Design & Analysis

The worst-case ratio of greedy Byte-Pair Encoding to optimal partial-merge utility for three merges is at least 7/12.

theorem bpe_worst_case_ratio_three_matching_lower_bound : (7 : ℝ) / 12 ≤ bpe_worst_ratio 3
bpe_worst_ratio_bdd_belowIn LeanAlgorithm Design & Analysis

For any budget k, the set of greedy-to-optimal length reduction ratios is bounded below by 0.

theorem bpe_worst_ratio_bdd_below (k : ℕ) :
    BddBelow {r : ℝ | ∃ s t : List ℕ, bpe_steps bpe_greedy_step k s t ∧
      0 < bpe_optimal_utility s k ∧ r = ((s.length - t.length : ℕ) : ℝ) / bpe_optimal_utility s k}
bpe_worst_ratio_le_runIn LeanAlgorithm Design & Analysis

For any budget k, any k-step greedy run from s to t with positive optimal utility bounds bpe_worst_ratio k from above.

theorem bpe_worst_ratio_le_run (k : ℕ) (s t : List ℕ)
    (h_step : bpe_steps bpe_greedy_step k s t)
    (h_opt : 0 < bpe_optimal_utility s k) :
    bpe_worst_ratio k ≤ ((s.length - t.length : ℕ) : ℝ) / bpe_optimal_utility s k
closesort_exact_weighted_kemenyIn LeanAlgorithm Design & Analysis

Let W be a real n × n skew-symmetric matrix (W.transpose = -W) of rank at most 2. There exist factor vectors h : Fin n → ℝ × ℝ such that W i j = (h i).1 * (h j).2 - (h i).2 * (h j).1 for all i, j : Fin n. For u : ℝ × ℝ, define the polar angle θ(u) ∈ [0, 2π) by letting a = Complex.arg ⟨u.1, u.2⟩ and returning a + 2π if a < 0 else a, and define the relative polar angle rel(u) ∈ [0, 2π) by letting d = θ(u) - θ(-∑ i, h i) and returning d + 2π if d < 0 else d. Then for every permutation π : Equiv.Perm (Fin n) such that the map r ↦ rel(h (π r)) is Monotone, and for every permutation σ : Equiv.Perm (Fin n), the sum over all r, s : Fin n of (if r < s then W (σ r) (σ s) else 0) is at most the sum over all r, s : Fin n of (if r < s then W (π r) (π s) else 0).

theorem closesort_exact_weighted_kemeny {n : ℕ} (W : Matrix (Fin n) (Fin n) ℝ)
    (h_skew : W.transpose = -W) (h_rank : W.rank ≤ 2) :
    ∃ h : Fin n → ℝ × ℝ,
      (∀ i j : Fin n, W i j = (h i).1 * (h j).2 - (h i).2 * (h j).1) ∧
      (let θ (u : ℝ × ℝ) : ℝ :=
        let a := Complex.arg ⟨u.1, u.2⟩
        if a < 0 then a + 2 * Real.pi else a
      let rel (u : ℝ × ℝ) : ℝ :=
        let d := θ u - θ (-∑ i, h i)
        if d < 0 then d + 2 * Real.pi else d
      ∀ π : Equiv.Perm (Fin n), Monotone (fun r : Fin n => rel (h (π r))) →
        ∀ σ : Equiv.Perm (Fin n),
          (∑ r : Fin n, ∑ s : Fin n, if r < s then W (σ r) (σ s) else 0) ≤
          ∑ r : Fin n, ∑ s : Fin n, if r < s then W (π r) (π s) else 0)
closesort_maximizes_kemeny_from_factorsIn LeanAlgorithm Design & Analysis

For any natural number n and any factor vectors h : Fin n → ℝ × ℝ, define the polar angle θ(u) for u : ℝ × ℝ by letting a = Complex.arg ⟨u.1, u.2⟩ and returning a + 2π if a < 0 else a, and define the relative angle rel(u) by letting d = θ(u) - θ(-∑ i, h i) and returning d + 2π if d < 0 else d. If π : Equiv.Perm (Fin n) satisfies that the map r ↦ rel(h (π r)) is Monotone, then for every permutation σ : Equiv.Perm (Fin n), the sum over all r, s : Fin n of (if r < s then (h (σ r)).1 * (h (σ s)).2 - (h (σ r)).2 * (h (σ s)).1 else 0) is at most the sum over all r, s : Fin n of (if r < s then (h (π r)).1 * (h (π s)).2 - (h (π r)).2 * (h (π s)).1 else 0).

theorem closesort_maximizes_kemeny_from_factors {n : ℕ} (h : Fin n → ℝ × ℝ)
    (π : Equiv.Perm (Fin n))
    (hπ : let θ (u : ℝ × ℝ) : ℝ :=
      let a := Complex.arg ⟨u.1, u.2⟩
      if a < 0 then a + 2 * Real.pi else a
    let rel (u : ℝ × ℝ) : ℝ :=
      let d := θ u - θ (-∑ i, h i)
      if d < 0 then d + 2 * Real.pi else d
    Monotone (fun r : Fin n => rel (h (π r))))
    (σ : Equiv.Perm (Fin n)) :
    (∑ r : Fin n, ∑ s : Fin n,
      if r < s then (h (σ r)).1 * (h (σ s)).2 - (h (σ r)).2 * (h (σ s)).1 else 0) ≤
    ∑ r : Fin n, ∑ s : Fin n,
      if r < s then (h (π r)).1 * (h (π s)).2 - (h (π r)).2 * (h (π s)).1 else 0
closure_span_embedding_of_isometric_embeddingIn LeanAlgorithm Design & Analysis

Let V be a metric space with a base point v₀ and f : V → H an isometric embedding into a complete real inner product space H with f v₀ = 0. Then there is a complete real inner product space H' and an isometric embedding φ : V → H' with φ v₀ = 0 whose image has dense linear span in H'.

theorem closure_span_embedding_of_isometric_embedding.{u}
    {V : Type u} [MetricSpace V] (v₀ : V)
    {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H]
    (f : V → H) (hf : ∀ a b : V, dist (f a) (f b) = dist a b) (hf₀ : f v₀ = 0) :
    ∃ (H' : Type u) (_ : NormedAddCommGroup H') (_ : InnerProductSpace ℝ H') (_ : CompleteSpace H'),
      ∃ φ : V → H', (∀ a b : V, dist (φ a) (φ b) = dist a b) ∧ φ v₀ = 0 ∧
        Submodule.topologicalClosure (Submodule.span ℝ (Set.range φ)) = ⊤
dist_best_outside_leIn LeanAlgorithm Design & Analysis

Given an ordinal profile π consistent with pseudometric d, if g is globally best outside for r, then d(r, g) ≤ d(r, w) for any vertex w outside the component of r.

theorem dist_best_outside_le
    {V : Type*} (d : V → V → ℝ)
    (π : V → LinearOrder V) (hπ : ordinal_profile_consistent d π)
    (F : SimpleGraph V) (r g w : V)
    (h_best : is_globally_best_outside F π r g)
    (hw : F.connectedComponentMk w ≠ F.connectedComponentMk r) :
    d r g ≤ d r w
exact_terminal_embedding_of_two_strongly_euclideanIn LeanAlgorithm Design & Analysis

Let X be a metric space and let V be a nonempty subset of X. If V is 2-strongly Euclidean in X, then there exists a real Hilbert space H and a map φ from X to H such that φ is a terminal embedding for V, meaning that φ is 1-Lipschitz and for every x in V and every y in X, dist (φ x) (φ y) = dist x y.

theorem exact_terminal_embedding_of_two_strongly_euclidean.{u}
    {X : Type u} [MetricSpace X] (V : Set X) (hV : V.Nonempty)
    (hE : IsTwoStronglyEuclidean V) :
    ∃ (H : Type u) (_ : NormedAddCommGroup H) (_ : InnerProductSpace ℝ H) (_ : CompleteSpace H),
      ∃ φ : X → H, IsTerminalEmbedding V φ
finite_metric_hilbert_distortion_compactnessIn LeanAlgorithm Design & Analysis

If every finite subset of a metric space embeds into a real Hilbert space with a common distortion bound D, then the whole space embeds into a real Hilbert space with the same distortion bound.

theorem finite_metric_hilbert_distortion_compactness.{u} (X : Type u) [MetricSpace X] [DecidableEq X] (D : ℝ) (hD : 0 ≤ D) (hfin : ∀ F : Finset X, EmbedsIntoHilbertWithDistortion {x // x ∈ F} D) : EmbedsIntoHilbertWithDistortion X D
graph_cost_sub_le_sum_boruvka_edgesIn LeanAlgorithm Design & Analysis

In a Borůvka round from F to F', the cost difference graph_cost d F' - graph_cost d F is at most the sum of distances of proposed round edges d(r(c), g(c)).

theorem graph_cost_sub_le_sum_boruvka_edges
    {V : Type*} [Fintype V] [DecidableEq V]
    (d : V → V → ℝ) (hd : is_pseudometric d)
    (π : V → LinearOrder V) (F F' : SimpleGraph V)
    (h_round : boruvka_round π F F')
    (r g : F.ConnectedComponent → V)
    (hr : ∀ c, F.connectedComponentMk (r c) = c)
    (hg : ∀ c, is_globally_best_outside F π (r c) (g c))
    (h_edges : ∀ u v, F'.Adj u v → F.Adj u v ∨ ∃ c, (u = r c ∧ v = g c) ∨ (u = g c ∧ v = r c)) :
    graph_cost d F' - graph_cost d F ≤ ∑ c : F.ConnectedComponent, d (r c) (g c)
height_eq_zero_of_memIn LeanAlgorithm Design & Analysis

If u x = φ x for x ∈ V, φ is isometric with φ v₀ = 0, and dist x v₀ ² = ‖u x‖² + a x² with a x ≥ 0, then a x = 0.

theorem height_eq_zero_of_mem.{u}
    {X : Type u} [MetricSpace X] (V : Set X) (v₀ : V)
    {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℝ H]
    (φ : V → H) (hφ : ∀ a b : V, dist (φ a) (φ b) = dist a b) (hφ₀ : φ v₀ = 0)
    (u : X → H) (a : X → ℝ) (ha0 : ∀ x : X, 0 ≤ a x)
    (ha : ∀ x : X, dist x (v₀ : X) ^ 2 = ‖u x‖ ^ 2 + a x ^ 2)
    {x : X} (hx : x ∈ V) (hu : u x = φ ⟨x, hx⟩) : a x = 0
height_family_of_two_strongly_euclideanIn LeanAlgorithm Design & Analysis

Let V be 2-strongly Euclidean in a metric space X, v₀ ∈ V, and φ : V → H an isometric embedding into a complete real inner product space with φ v₀ = 0 and dense linear span. Then there are u : X → H and a : X → ℝ with ‖u x‖ ≤ dist x v₀, 0 ≤ a x, dist x v₀ ² = ‖u x‖² + a x², the inner products ⟪u x, φ v⟫ prescribed by the squared distances, and with u x = φ x and a x = 0 whenever x ∈ V.

theorem height_family_of_two_strongly_euclidean.{u}
    {X : Type u} [MetricSpace X] (V : Set X) (v₀ : V) (hE : IsTwoStronglyEuclidean V)
    {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H]
    (φ : V → H) (hφ : ∀ a b : V, dist (φ a) (φ b) = dist a b) (hφ₀ : φ v₀ = 0)
    (hden : DenseRange φ) :
    ∃ (u : X → H) (a : X → ℝ),
      (∀ x : X, ‖u x‖ ≤ dist x (v₀ : X)) ∧
      (∀ x : X, 0 ≤ a x) ∧
      (∀ x : X, dist x (v₀ : X) ^ 2 = ‖u x‖ ^ 2 + a x ^ 2) ∧
      (∀ (x : X) (v : V),
        inner ℝ (u x) (φ v) = (‖φ v‖ ^ 2 - dist x (v : X) ^ 2 + dist x (v₀ : X) ^ 2) / 2) ∧
      (∀ (x : X) (hx : x ∈ V), u x = φ ⟨x, hx⟩ ∧ a x = 0)
height_lipschitz_of_ambient_decompositionIn LeanAlgorithm Design & Analysis

Let S : H → K be a linear isometry, p, r ∈ K, u, u' ∈ H realised from p, r as in the Riesz decomposition, and let a = ‖p - S u‖, a' = ‖r - S u'‖. Then ‖u - u'‖² + (a - a')² ≤ ‖p - r‖².

theorem height_lipschitz_of_ambient_decomposition.{u}
    {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℝ H]
    {K : Type u} [NormedAddCommGroup K] [InnerProductSpace ℝ K]
    (S : H →ₗᵢ[ℝ] K) (p r : K) (u u' : H) (a a' : ℝ)
    (hu : ∀ y : H, inner ℝ u y = inner ℝ p (S y))
    (hu' : ∀ y : H, inner ℝ u' y = inner ℝ r (S y))
    (ha : a = ‖p - S u‖) (ha' : a' = ‖r - S u'‖) :
    ‖u - u'‖ ^ 2 + (a - a') ^ 2 ≤ ‖p - r‖ ^ 2
height_lipschitz_of_two_strongly_euclideanIn LeanAlgorithm Design & Analysis

Let V be 2-strongly Euclidean in X, v₀ ∈ V, φ : V → H an isometric embedding into a complete real inner product space with φ v₀ = 0 and dense linear span, and let u : X → H, a : X → ℝ be the height family. Then for all x, y ∈ X, ‖u x - u y‖² + (a x - a y)² ≤ dist x y ².

theorem height_lipschitz_of_two_strongly_euclidean.{u}
    {X : Type u} [MetricSpace X] (V : Set X) (v₀ : V)
    {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H]
    (φ : V → H) (hφ : ∀ a b : V, dist (φ a) (φ b) = dist a b) (hφ₀ : φ v₀ = 0)
    (hden : DenseRange φ) (u : X → H) (a : X → ℝ)
    (ha : ∀ x : X, dist x (v₀ : X) ^ 2 = ‖u x‖ ^ 2 + a x ^ 2)
    (ha0 : ∀ x : X, 0 ≤ a x)
    (hin : ∀ (x : X) (v : V),
      inner ℝ (u x) (φ v) = (‖φ v‖ ^ 2 - dist x (v : X) ^ 2 + dist x (v₀ : X) ^ 2) / 2)
    (hE : IsTwoStronglyEuclidean V) :
    ∀ x y : X, ‖u x - u y‖ ^ 2 + (a x - a y) ^ 2 ≤ dist x y ^ 2
inner_eq_of_dense_spanIn LeanAlgorithm Design & Analysis

Let φ : V → H have dense linear span in H, S : H → K a linear isometry, u ∈ H, w ∈ K. If ⟪u, φ v⟫ = ⟪w, S (φ v)⟫ for all v, then ⟪u, y⟫ = ⟪w, S y⟫ for all y ∈ H.

theorem inner_eq_of_dense_span.{u}
    {V : Type u} {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℝ H]
    {K : Type u} [NormedAddCommGroup K] [InnerProductSpace ℝ K]
    (φ : V → H) (hφ : (Submodule.span ℝ (Set.range φ)).topologicalClosure = ⊤)
    (S : H →ₗᵢ[ℝ] K) (u : H) (w : K)
    (h : ∀ v : V, inner ℝ u (φ v) = inner ℝ w (S (φ v))) :
    ∀ y : H, inner ℝ u y = inner ℝ w (S y)
isometric_embedding_zero_of_two_strongly_euclideanIn LeanAlgorithm Design & Analysis

Let X be a metric space, V a subset of X and v₀ a point of V. If V is 2-strongly Euclidean in X, then there is a real Hilbert space H and an isometric embedding f : V → H with f v₀ = 0.

theorem isometric_embedding_zero_of_two_strongly_euclidean.{u}
    {X : Type u} [MetricSpace X] (V : Set X) (v₀ : V) (hE : IsTwoStronglyEuclidean V) :
    ∃ (H : Type u) (_ : NormedAddCommGroup H) (_ : InnerProductSpace ℝ H) (_ : CompleteSpace H),
      ∃ f : V → H, (∀ a b : V, dist (f a) (f b) = dist a b) ∧ f v₀ = 0
kmeans_lemma_local_factor_fiveIn LeanAlgorithm Design & Analysis

For every target set P and center c₁ with positive cost kmeans_cost_one P c₁ > 0, sampling a second center x in P with probability proportional to ||x - c₁||² yields an expected 2-means cost on P of at most 5 * OPT₁(P).

theorem kmeans_lemma_local_factor_five {E : Type*} [NormedAddCommGroup E] (P : Finset E) (c₁ : E) (hS : 0 < kmeans_cost_one P c₁) : (kmeans_cost_one P c₁)⁻¹ * ∑ x ∈ P, ‖x - c₁‖^2 * kmeans_cost_two P c₁ x ≤ 5 * kmeans_opt_one P
kmeans_opt_one_pos_implies_card_ge_twoIn LeanAlgorithm Design & Analysis

If a finite point set P has strictly positive optimal 1-means cost OPT₁(P) > 0, then P contains at least two distinct points.

theorem kmeans_opt_one_pos_implies_card_ge_two {E : Type*} [NormedAddCommGroup E] (P : Finset E) (h : 0 < kmeans_opt_one P) : 2 ≤ P.card
kmeans_plus_plus_two_competitive_ratio_upperIn LeanAlgorithm Design & Analysis

For every finite set of points X with OPT₂(X) > 0, the expected cost of the two centers chosen by k-means++ satisfies E[Phi₂] <= (5 - 2/|X|) * OPT₂(X).

theorem kmeans_plus_plus_two_competitive_ratio_upper {E : Type*} [NormedAddCommGroup E] (X : Finset E) (hopt : 0 < kmeans_opt_two X) : kmeans_plus_plus_two_expected_cost X ≤ (5 - 2 / (X.card : ℝ)) * kmeans_opt_two X
kmeans_plus_plus_two_ratioIn LeanAlgorithm Design & Analysis

For every finite set X subset R^d of n = |X| distinct points with OPT_2(X) > 0, the expected cost of the two centers chosen by k-means++ satisfies E[Phi_2] <= (5 - 2/n) OPT_2(X). Furthermore, the worst-case ratio satisfies R_2 = sup_{X, OPT_2(X)>0} E[Phi_2] / OPT_2(X) = 5, and this supremum is not attained.

theorem kmeans_plus_plus_two_ratio : (∀ (d : ℕ) (X : Finset (EuclideanSpace ℝ (Fin d))), 0 < kmeans_opt_two X → kmeans_plus_plus_two_expected_cost X ≤ (5 - 2 / (X.card : ℝ)) * kmeans_opt_two X) ∧ kmeans_two_worst_case_ratio = 5 ∧ ∀ r ∈ kmeans_two_competitive_ratios, r < 5
kmeans_prop_uniform_one_center_costIn LeanAlgorithm Design & Analysis

For any nonempty finite set P in a real inner product space, the uniform average over c in P of the 1-means cost kmeans_cost_one P c equals 2 * OPT₁(P).

theorem kmeans_prop_uniform_one_center_cost {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] (P : Finset E) (hP : P.Nonempty) : (P.card : ℝ)⁻¹ * ∑ c ∈ P, kmeans_cost_one P c = 2 * kmeans_opt_one P
linear_isometry_extend_of_dense_submoduleIn LeanAlgorithm Design & Analysis

Let S be a submodule of a complete real inner product space H whose closure is everything, and K a complete real inner product space. Every linear isometry S → K extends to a linear isometry H → K.

theorem linear_isometry_extend_of_dense_submodule.{u}
    {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H]
    {K : Type u} [NormedAddCommGroup K] [InnerProductSpace ℝ K] [CompleteSpace K]
    (S : Submodule ℝ H) (hS : S.topologicalClosure = ⊤)
    (L : ↥S →ₗᵢ[ℝ] K) :
    ∃ L' : H →ₗᵢ[ℝ] K, ∀ y : ↥S, L' (y : H) = L y
linear_isometry_on_span_of_isometric_embeddingsIn LeanAlgorithm Design & Analysis

Let V be a metric space with base point v₀, and let φ : V → H, g : V → K be isometric embeddings into real inner product spaces with φ v₀ = 0. Then there is a linear isometry from the span of range φ to K sending φ v to g v - g v₀.

theorem linear_isometry_on_span_of_isometric_embeddings.{u}
    {V : Type u} [MetricSpace V] (v₀ : V)
    {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℝ H]
    {K : Type u} [NormedAddCommGroup K] [InnerProductSpace ℝ K]
    (φ : V → H) (g : V → K)
    (hφ : ∀ a b : V, dist (φ a) (φ b) = dist a b) (hφ₀ : φ v₀ = 0)
    (hg : ∀ a b : V, dist (g a) (g b) = dist a b) :
    ∃ L : Submodule.span ℝ (Set.range φ) →ₗᵢ[ℝ] K,
      ∀ v : V, L ⟨φ v, Submodule.subset_span ⟨v, rfl⟩⟩ = g v - g v₀
one_point_height_of_two_strongly_euclideanIn LeanAlgorithm Design & Analysis

Let V be 2-strongly Euclidean in X, v₀ ∈ V, and φ : V → H an isometric embedding into a complete real inner product space with φ v₀ = 0 and dense linear span. For every x ∈ X there is u ∈ H with ⟪u, φ v⟫ = (‖φ v‖² - dist x v ² + dist x v₀²)/2 for all v ∈ V, ‖u‖ ≤ dist x v₀, and u = φ x when x ∈ V.

theorem one_point_height_of_two_strongly_euclidean.{u}
    {X : Type u} [MetricSpace X] (V : Set X) (v₀ : V) (hE : IsTwoStronglyEuclidean V)
    {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H]
    (φ : V → H) (hφ : ∀ a b : V, dist (φ a) (φ b) = dist a b) (hφ₀ : φ v₀ = 0)
    (hspan : (Submodule.span ℝ (Set.range φ)).topologicalClosure = ⊤) (x : X) :
    ∃ u : H,
      (∀ v : V, inner ℝ u (φ v) = (‖φ v‖ ^ 2 - dist x (v : X) ^ 2 + dist x (v₀ : X) ^ 2) / 2) ∧
      ‖u‖ ≤ dist x (v₀ : X) ∧ (∀ (hx : x ∈ V), u = φ ⟨x, hx⟩)
one_strongly_euclidean_bounded_projection_unboundedNeeds helpAlgorithm Design & Analysis

For every real C, a finite metric space is the union of two 1-strongly Euclidean sets. One is isometric to points on the unit sphere at mutual distances at least one, and the two points x,y of the other set have unit-height one-point realizations with projections in the core’s affine span and of norm at most one, but those projections are farther than C times d(x,y) apart.

theorem one_strongly_euclidean_bounded_projection_unbounded : ∀ C : ℝ,
    ∃ (n : ℕ) (M : MetricSpace (Fin (n+2))) (A : Set (Fin (n+2)))
      (u : A → EuclideanSpace ℝ (Fin n))
      (x y : Fin (n+2)) (px py : EuclideanSpace ℝ (Fin n)),
      letI := M
      IsOneStronglyEuclidean A ∧ IsOneStronglyEuclidean ({x,y} : Set (Fin (n+2))) ∧
      A ∪ {x,y} = Set.univ ∧
      (∀ a b : A, dist (u a) (u b) = dist a b) ∧
      (∀ a : A, ‖u a‖ = 1) ∧
      (∀ a b : A, a ≠ b → 1 ≤ dist (u a) (u b)) ∧
      ‖px‖ ≤ 1 ∧ ‖py‖ ≤ 1 ∧
      px ∈ affineSpan ℝ (Set.range u) ∧ py ∈ affineSpan ℝ (Set.range u) ∧
      (∀ a : A, dist (a : Fin (n+2)) x ^ 2 = dist (u a) px ^ 2 + 1) ∧
      (∀ a : A, dist (a : Fin (n+2)) y ^ 2 = dist (u a) py ^ 2 + 1) ∧
      C * dist x y < dist px py
optimal_stochastic_mst_strategy_aux_is_tutteIn LeanAlgorithm Design & Analysis

From any state (Z, D), every strategy that is optimal for the subproblem from state (Z, D) is a Tutte strategy from state (Z, D).

theorem optimal_stochastic_mst_strategy_aux_is_tutte {V : Type*} [DecidableEq V]
    (G : SimpleGraph V) (p : Sym2 V → ℝ)
    (hp : ∀ e ∈ G.edgeSet, 0 < p e ∧ p e < 1)
    (Z D : Finset (Sym2 V)) (T : StochasticMstStrategy (Sym2 V))
    (hT : stochastic_mst_solves_aux G Z D T ∧
      ∀ T', stochastic_mst_solves_aux G Z D T' →
        stochastic_mst_strategy_cost p T ≤ stochastic_mst_strategy_cost p T') :
    stochastic_mst_is_tutte_aux G Z D T
optimal_stochastic_mst_strategy_continuation_optimalIn LeanAlgorithm Design & Analysis

If a strategy querying edge e with children s₀ and s₁ is optimal at state (Z, D), then continuation s₀ is optimal at state (insert e Z, D) and s₁ is optimal at state (Z, insert e D).

theorem optimal_stochastic_mst_strategy_continuation_optimal {V : Type*} [DecidableEq V]
    (G : SimpleGraph V) (p : Sym2 V → ℝ)
    (hp : ∀ e ∈ G.edgeSet, 0 < p e ∧ p e < 1)
    (Z D : Finset (Sym2 V)) (e : Sym2 V)
    (s₀ s₁ : StochasticMstStrategy (Sym2 V))
    (hT : stochastic_mst_solves_aux G Z D (StochasticMstStrategy.query e s₀ s₁) ∧
      ∀ T', stochastic_mst_solves_aux G Z D T' →
        stochastic_mst_strategy_cost p (StochasticMstStrategy.query e s₀ s₁) ≤ stochastic_mst_strategy_cost p T') :
    (stochastic_mst_solves_aux G (insert e Z) D s₀ ∧
      ∀ T', stochastic_mst_solves_aux G (insert e Z) D T' →
        stochastic_mst_strategy_cost p s₀ ≤ stochastic_mst_strategy_cost p T') ∧
    (stochastic_mst_solves_aux G Z (insert e D) s₁ ∧
      ∀ T', stochastic_mst_solves_aux G Z (insert e D) T' →
        stochastic_mst_strategy_cost p s₁ ≤ stochastic_mst_strategy_cost p T')
optimal_stochastic_mst_strategy_is_tutteIn LeanAlgorithm Design & Analysis

Consider an instance of the adaptive MST-ID problem on a connected graph G with edge probabilities p taking values strictly between 0 and 1. If T is an optimal strategy solving this instance, then T is a Tutte strategy for G.

theorem optimal_stochastic_mst_strategy_is_tutte {V : Type*} [DecidableEq V]
    (G : SimpleGraph V) (hG : G.Connected) (p : Sym2 V → ℝ)
    (hp : ∀ e ∈ G.edgeSet, 0 < p e ∧ p e < 1)
    (T : StochasticMstStrategy (Sym2 V))
    (hT : is_optimal_stochastic_mst_strategy G p T) :
    stochastic_mst_is_tutte G T
optimal_stochastic_mst_strategy_query_eligibleIn LeanAlgorithm Design & Analysis

If a strategy querying edge e with children s₀ and s₁ is optimal at state (Z, D), then e is query-eligible at state (Z, D).

theorem optimal_stochastic_mst_strategy_query_eligible {V : Type*} [DecidableEq V]
    (G : SimpleGraph V) (p : Sym2 V → ℝ)
    (hp : ∀ e ∈ G.edgeSet, 0 < p e ∧ p e < 1)
    (Z D : Finset (Sym2 V)) (e : Sym2 V)
    (s₀ s₁ : StochasticMstStrategy (Sym2 V))
    (hT : stochastic_mst_solves_aux G Z D (StochasticMstStrategy.query e s₀ s₁) ∧
      ∀ T', stochastic_mst_solves_aux G Z D T' →
        stochastic_mst_strategy_cost p (StochasticMstStrategy.query e s₀ s₁) ≤ stochastic_mst_strategy_cost p T') :
    stochastic_mst_query_eligible G Z D e
ordinal_mst_boruvka_distortion_leIn LeanAlgorithm Design & Analysis

Let V be a finite type with at least 2 vertices, d : V → V → ℝ a pseudometric, and π : V → LinearOrder V an ordinal profile consistent with d. If F is an output of Algorithm 1 on π and T_mst is a minimum spanning tree under d, then graph_cost d F ≤ 2 * (Nat.clog 2 (Fintype.card V) : ℝ) * graph_cost d T_mst.

theorem ordinal_mst_boruvka_distortion_le
    {V : Type*} [Fintype V] [DecidableEq V]
    (d : V → V → ℝ) (hd : is_pseudometric d)
    (π : V → LinearOrder V) (hπ : ordinal_profile_consistent d π)
    (F : SimpleGraph V) (hF : is_algorithm1_output π F)
    (T_mst : SimpleGraph V) (h_mst : is_mst d T_mst)
    (hn : 2 ≤ Fintype.card V) :
    graph_cost d F ≤ 2 * (Nat.clog 2 (Fintype.card V) : ℝ) * graph_cost d T_mst
ordinal_mst_round_cost_and_contractionIn LeanAlgorithm Design & Analysis

In Algorithm 1 on finite vertex type V with decidable equality, for any round from forest F to forest F' (boruvka_round π F F') under profile π : V → LinearOrder V consistent with pseudometric d : V → V → ℝ, and any minimum spanning tree T_mst under d (is_mst d T_mst), the cost difference graph_cost d F' - graph_cost d F is at most 2 * graph_cost d T_mst, and the number of connected components Fintype.card F'.ConnectedComponent is at most Fintype.card F.ConnectedComponent / 2.

theorem ordinal_mst_round_cost_and_contraction
    {V : Type*} [Fintype V] [DecidableEq V]
    (d : V → V → ℝ) (hd : is_pseudometric d)
    (π : V → LinearOrder V) (hπ : ordinal_profile_consistent d π)
    (F F' : SimpleGraph V) (h_round : boruvka_round π F F')
    (T_mst : SimpleGraph V) (h_mst : is_mst d T_mst) :
    graph_cost d F' - graph_cost d F ≤ 2 * graph_cost d T_mst ∧
    Fintype.card F'.ConnectedComponent ≤ Fintype.card F.ConnectedComponent / 2
pseudometric_nonnegIn LeanAlgorithm Design & Analysis

For any pseudometric d and vertices u, v, d(u, v) ≥ 0.

theorem pseudometric_nonneg {V : Type*} {d : V → V → ℝ} (hd : is_pseudometric d) (u v : V) : 0 ≤ d u v
riesz_vector_of_linear_isometryIn LeanAlgorithm Design & Analysis

Let S : H → K be a linear isometry between real inner product spaces with H complete, and let w ∈ K. Then there is u ∈ H with ⟪u, y⟫ = ⟪w, S y⟫ for all y ∈ H, ‖u‖ ≤ ‖w‖, and ‖w‖² = ‖u‖² + ‖w - S u‖².

theorem riesz_vector_of_linear_isometry.{u}
    {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H]
    {K : Type u} [NormedAddCommGroup K] [InnerProductSpace ℝ K]
    (S : H →ₗᵢ[ℝ] K) (w : K) :
    ∃ u : H, (∀ y : H, inner ℝ u y = inner ℝ w (S y)) ∧ ‖u‖ ≤ ‖w‖ ∧
      ‖w‖ ^ 2 = ‖u‖ ^ 2 + ‖w - S u‖ ^ 2
skew_rank_two_factor_representationIn LeanAlgorithm Design & Analysis

Every skew-symmetric real n × n matrix of rank at most 2 admits a factor representation by vectors h₁, ..., hₙ ∈ ℝ² such that W_{ij} = (h_i)₁ (h_j)₂ - (h_i)₂ (h_j)₁ for all i, j ∈ {1, ..., n}.

theorem skew_rank_two_factor_representation {n : ℕ} (W : Matrix (Fin n) (Fin n) ℝ)
    (h_skew : W.transpose = -W) (h_rank : W.rank ≤ 2) :
    ∃ h : Fin n → ℝ × ℝ, ∀ i j, W i j = (h i).1 * (h j).2 - (h i).2 * (h j).1
stochastic_mst_adaptive_cost_aux_le_queryIn LeanAlgorithm Design & Analysis

If the edge e is eligible at the state (Z,D), then the optimal adaptive cost of k+1 further queries is at most 1 + p e * (value at fuel k from (Z, insert e D)) + (1 - p e) * (value at fuel k from (insert e Z, D)): querying e is one admissible first move.

open Classical in
theorem stochastic_mst_adaptive_cost_aux_le_query {V : Type*} [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (p : Sym2 V → ℝ) (k : ℕ) (Z D : Finset (Sym2 V))
    {e : Sym2 V} (he : stochastic_mst_query_eligible G Z D e) :
    stochastic_mst_adaptive_cost_aux G p (k+1) Z D ≤
      1 + p e * stochastic_mst_adaptive_cost_aux G p k Z (insert e D)
        + (1 - p e) * stochastic_mst_adaptive_cost_aux G p k (insert e Z) D
stochastic_mst_adaptive_cost_aux_succIn LeanAlgorithm Design & Analysis

For any graph G, probability function p, fuel k+1 and state of queried edge sets (Z, D), the optimal adaptive cost of k+1 further queries equals 0 if no edge of G is eligible at (Z,D), and otherwise equals the minimum over the eligible edges e of 1 + p e * (value at fuel k from state (Z, insert e D)) + (1 - p e) * (value at fuel k from (insert e Z, D)).

open Classical in
theorem stochastic_mst_adaptive_cost_aux_succ {V : Type*} [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (p : Sym2 V → ℝ) (k : ℕ) (Z D : Finset (Sym2 V)) :
    stochastic_mst_adaptive_cost_aux G p (k+1) Z D =
      (if h : (G.edgeFinset.filter (fun e => stochastic_mst_query_eligible G Z D e)).Nonempty then
        (G.edgeFinset.filter (fun e => stochastic_mst_query_eligible G Z D e)).inf' h
          (fun e => 1 + p e * stochastic_mst_adaptive_cost_aux G p k Z (insert e D)
            + (1 - p e) * stochastic_mst_adaptive_cost_aux G p k (insert e Z) D)
      else 0)
stochastic_mst_priority_cost_aux_succIn LeanAlgorithm Design & Analysis

For any graph G, probability function p, edge ordering pi, fuel k+1 and state of queried edge sets (Z, D), the expected number of further queries of the fixed-priority strategy is 0 if pi contains no edge eligible at (Z,D), and otherwise is 1 + p e * (value at fuel k from (Z, insert e D)) + (1 - p e) * (value at fuel k from (insert e Z, D)), where e is the first eligible edge of pi.

open Classical in
theorem stochastic_mst_priority_cost_aux_succ {V : Type*} [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (p : Sym2 V → ℝ) (π : List (Sym2 V)) (k : ℕ)
    (Z D : Finset (Sym2 V)) :
    stochastic_mst_priority_cost_aux G p π (k+1) Z D =
      (match π.find? (fun e => decide (stochastic_mst_query_eligible G Z D e)) with
       | none => 0
       | some e => 1 + p e * stochastic_mst_priority_cost_aux G p π k Z (insert e D)
           + (1 - p e) * stochastic_mst_priority_cost_aux G p π k (insert e Z) D)
stochastic_mst_priority_cost_eq_minIn LeanAlgorithm Design & Analysis

There is an ordering pi of the edges of G at which the infimum defining P(G,p) is attained: the fixed-priority cost P(G,p) equals stochastic_mst_priority_cost_aux G p pi (card of edges) ∅ ∅.

theorem stochastic_mst_priority_cost_eq_min {V : Type*} [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (p : Sym2 V → ℝ) :
    ∃ π : List (Sym2 V), π.Perm G.edgeFinset.toList ∧
      stochastic_mst_priority_cost G p = stochastic_mst_priority_cost_aux G p π G.edgeFinset.card ∅ ∅
stochastic_mst_priority_cost_le_aux_of_permIn LeanAlgorithm Design & Analysis

For every ordering pi of the edges of G, the fixed-priority cost P(G,p) is at most the expected number of queries of that particular order, stochastic_mst_priority_cost_aux G p pi (card of edges) ∅ ∅.

theorem stochastic_mst_priority_cost_le_aux_of_perm {V : Type*} [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (p : Sym2 V → ℝ) (π : List (Sym2 V))
    (hπ : π.Perm G.edgeFinset.toList) :
    stochastic_mst_priority_cost G p ≤ stochastic_mst_priority_cost_aux G p π G.edgeFinset.card ∅ ∅
stochastic_mst_priority_cost_value_set_finiteIn LeanAlgorithm Design & Analysis

The set of real numbers x for which some permutation pi of the edge list of G satisfies x = stochastic_mst_priority_cost_aux G p pi (card of edges) ∅ ∅ (the set whose infimum defines P(G,p)) is finite and nonempty.

theorem stochastic_mst_priority_cost_value_set_finite {V : Type*} [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (p : Sym2 V → ℝ) :
    ({x : ℝ | ∃ π : List (Sym2 V), π.Perm G.edgeFinset.toList ∧
      x = stochastic_mst_priority_cost_aux G p π G.edgeFinset.card ∅ ∅}).Finite ∧
    ({x : ℝ | ∃ π : List (Sym2 V), π.Perm G.edgeFinset.toList ∧
      x = stochastic_mst_priority_cost_aux G p π G.edgeFinset.card ∅ ∅}).Nonempty
stochastic_mst_priority_find_none_iffIn LeanAlgorithm Design & Analysis

If the list pi is a permutation of the edge list of G, then the fixed-priority rule finds no eligible edge in pi at state (Z,D) if and only if G has no edge at all that is eligible at (Z,D).

open Classical in
theorem stochastic_mst_priority_find_none_iff {V : Type*} [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (Z D : Finset (Sym2 V)) (π : List (Sym2 V))
    (hπ : π.Perm G.edgeFinset.toList) :
    (π.find? (fun e => decide (stochastic_mst_query_eligible G Z D e)) = none) ↔
      ¬ (G.edgeFinset.filter (fun e => stochastic_mst_query_eligible G Z D e)).Nonempty
stochastic_mst_priority_gap_of_not_cactusIn LeanAlgorithm Design & Analysis

If G is connected and not a cactus then some p with 0 < p e < 1 on the edges of G makes the optimal adaptive cost strictly smaller than the optimal fixed-priority cost.

theorem stochastic_mst_priority_gap_of_not_cactus {V : Type*} [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hG : G.Connected) (hc : ¬ simple_graph_is_cactus G) :
    ∃ p : Sym2 V → ℝ, (∀ e ∈ G.edgeSet, 0 < p e ∧ p e < 1) ∧
      stochastic_mst_adaptive_cost G p < stochastic_mst_priority_cost G p
stochastic_mst_priority_optimal_of_cactusIn LeanAlgorithm Design & Analysis

If G is a connected cactus then for every p with 0 < p e < 1 on the edges of G the optimal fixed-priority cost equals the optimal adaptive cost.

theorem stochastic_mst_priority_optimal_of_cactus {V : Type*} [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hG : G.Connected) (hc : simple_graph_is_cactus G) :
    ∀ p : Sym2 V → ℝ, (∀ e ∈ G.edgeSet, 0 < p e ∧ p e < 1) →
      stochastic_mst_priority_cost G p = stochastic_mst_adaptive_cost G p
strong_euclidean_extension_exponent_product_boundIn LeanAlgorithm Design & Analysis

At exponent 179/200, the multiplicative extension factor in equation (14) of arXiv:2611.08546 is at most exp(179/200) times (m+1) to that exponent.

theorem strong_euclidean_extension_exponent_product_bound (m : ℕ) : (∏ r ∈ Finset.range m, (1 + (179 / 200 : ℝ) / ((r : ℝ) + 1))) ≤ Real.exp (179 / 200 : ℝ) * ((m : ℝ) + 1) ^ (179 / 200 : ℝ)
strong_euclidean_one_point_energy_scalar_boundIn LeanAlgorithm Design & Analysis

For nonnegative internal and crossing energies, the scalar upper bound in equation (17) of arXiv:2611.08546 is bounded by the quadratic extension factors associated with exponent 179/200.

theorem strong_euclidean_one_point_energy_scalar_bound (I J : ℝ) (hI : 0 ≤ I) (hJ : 0 ≤ J) : (1/2 : ℝ) * (Real.sqrt J + Real.sqrt (J + I + Real.sqrt (I * (I + J))))^2 ≤ (1 + (179/200 : ℝ))^2 * I + (1 + (179/400 : ℝ))^2 * J
strong_euclidean_resolvent_scalar_inequalityIn LeanAlgorithm Design & Analysis

The scalar inequalities m² ≤ I(m−v) and 0 ≤ v ≤ m ≤ I imply the numerical estimate used for the one-strongly-Euclidean elimination energy in arXiv:2611.08546, Section 4.7.

theorem strong_euclidean_resolvent_scalar_inequality (I J m v : ℝ) (hI : 0 ≤ I) (hJ : 0 ≤ J) (hv : 0 ≤ v) (hvm : v ≤ m) (hmI : m ≤ I) (hquad : m^2 ≤ I * (m-v)) : 2*m + 2*Real.sqrt (J*v) ≤ I + Real.sqrt (I*(I+J))
tarski_box_query_le_five_log_sqIn LeanAlgorithm Design & Analysis

The residual open content of the target, in box form: five-dimensional Tarski search has O(log² n) query complexity on every box, uniformly in the box.

theorem tarski_box_query_le_five_log_sq :
    ∃ C : ℝ, ∀ n : ℕ, 2 ≤ n → ∃ q : ℕ,
      tarski_box_query_le n 5 q ∧ (q : ℝ) ≤ C * Real.logb 2 n ^ 2
terminal_embedding_of_height_lipschitzIn LeanAlgorithm Design & Analysis

Let φ : V → H be isometric, u : X → H, a : X → ℝ, with u x = φ x and a x = 0 on V, dist x v₀ ² = ‖u x‖² + a x², the prescribed inner products, and the Lipschitz inequality ‖u x - u y‖² + (a x - a y)² ≤ dist x y ². Then x ↦ (u x, a x) into WithLp 2 (H × ℝ) is a terminal embedding for V.

theorem terminal_embedding_of_height_lipschitz.{u}
    {X : Type u} [MetricSpace X] (V : Set X) (v₀ : V)
    {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H]
    (φ : V → H) (hφ : ∀ a b : V, dist (φ a) (φ b) = dist a b)
    (u : X → H) (a : X → ℝ)
    (huV : ∀ (x : X) (hx : x ∈ V), u x = φ ⟨x, hx⟩ ∧ a x = 0)
    (ha : ∀ x : X, dist x (v₀ : X) ^ 2 = ‖u x‖ ^ 2 + a x ^ 2)
    (hin : ∀ (x : X) (v : V),
      inner ℝ (u x) (φ v) = (‖φ v‖ ^ 2 - dist x (v : X) ^ 2 + dist x (v₀ : X) ^ 2) / 2)
    (hlip : ∀ x y : X, ‖u x - u y‖ ^ 2 + (a x - a y) ^ 2 ≤ dist x y ^ 2) :
    IsTerminalEmbedding V (fun x : X => WithLp.toLp 2 (u x, a x))
two_point_decomposition_in_ambientIn LeanAlgorithm Design & Analysis

Let S : H → K be a linear isometry, p, r ∈ K, and u, u' ∈ H with ⟪u, y⟫ = ⟪p, S y⟫ and ⟪u', y⟫ = ⟪r, S y⟫ for all y. Then dist p r squared equals ‖u - u'‖² + ‖(p - S u) - (r - S u')‖².

theorem two_point_decomposition_in_ambient.{u}
    {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H]
    {K : Type u} [NormedAddCommGroup K] [InnerProductSpace ℝ K]
    (S : H →ₗᵢ[ℝ] K) (p r : K) (u u' : H)
    (hu : ∀ y : H, inner ℝ u y = inner ℝ p (S y))
    (hu' : ∀ y : H, inner ℝ u' y = inner ℝ r (S y)) :
    dist p r ^ 2 = ‖u - u'‖ ^ 2 + ‖(p - S u) - (r - S u')‖ ^ 2
v_selection_sixteen_eight_le_twenty_eightNeeds helpAlgorithm Design & Analysis

The worst-case comparison complexity of finding the 8th smallest element among 16 elements is at most 28, that is, V_8(16) ≤ 28.

theorem v_selection_sixteen_eight_le_twenty_eight : v_selection 16 8 ≤ 28
dist_induce_compl_eq_of_leafIn LeanApproximation & Inapproximability

If w is a leaf of the subcubic tree H and u, v are distinct from w, then the distance between u and v in the induced subgraph on W \ {w} equals their distance in H.

theorem dist_induce_compl_eq_of_leaf {W : Type} [Fintype W] (H : SimpleGraph W)
    (hH : is_subcubic_tree H) {w : W} (hleaf : open Classical in H.degree w = 1)
    (u v : {x : W // x ≠ w}) :
    (H.induce {x : W | x ≠ w}).dist u v = H.dist u.val v.val
exists_min_vertex_coverIn LeanApproximation & Inapproximability

Every finite simple graph G has a minimum vertex cover U as a Finset of vertices whose cardinality equals G.vertexCoverNum.toNat.

theorem exists_min_vertex_cover
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) :
    ∃ U : Finset V, G.IsVertexCover (U : Set V) ∧ U.card = G.vertexCoverNum.toNat
generating_rank_corpus_lower_boundIn LeanApproximation & Inapproximability

For any connected finite simple graph G, the generating rank of corpus_words G is at least 3 * |E(G)| + vertexCoverNum(G).

theorem generating_rank_corpus_lower_bound
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (hG : G.Connected) :
    3 * G.edgeFinset.card + G.vertexCoverNum.toNat ≤ word_generating_rank (corpus_words G)
generating_rank_corpus_upper_boundIn LeanApproximation & Inapproximability

The generating rank of corpus_words G is at most 3 * |E(G)| + vertexCoverNum(G).

theorem generating_rank_corpus_upper_bound
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] :
    word_generating_rank (corpus_words G) ≤ 3 * G.edgeFinset.card + G.vertexCoverNum.toNat
generating_rank_corpus_vertex_coverIn LeanApproximation & Inapproximability

For any simple undirected connected finite graph G with decidable equality and decidable adjacency, the generating rank word_generating_rank (corpus_words G) of the reduction corpus equals 3 * G.edgeFinset.card + G.vertexCoverNum.toNat, where G.vertexCoverNum.toNat is the minimum vertex cover size of G.

theorem generating_rank_corpus_vertex_cover
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (hG : G.Connected) :
    word_generating_rank (corpus_words G) = 3 * G.edgeFinset.card + G.vertexCoverNum.toNat
greedy_rc_compression_halfIn LeanApproximation & Inapproximability

Let cm be an involution on a type Γ with decidable equality and T an RC-substring-free finite set of lists. If some execution of GREEDY-RC (greedy_rc_step, any tie-breaking) leads from T to the singleton {t}, then 2·|t| ≤ (Σ_{u ∈ T} |u|) + scs_rc_opt cm T; equivalently the compression Σ|u| − |t| is at least half the optimal compression Σ|u| − |OPT(T)|.

theorem greedy_rc_compression_half {Γ : Type*} [DecidableEq Γ] (cm : Γ → Γ)
    (hcm : Function.Involutive cm) (T : Finset (List Γ)) (hfree : rc_substring_free cm T)
    (t : List Γ) (hrun : Relation.ReflTransGen (greedy_rc_step cm) T {t}) :
    2 * t.length ≤ (∑ u ∈ T, u.length) + scs_rc_opt cm T
le_spanning_tree_congestionIn LeanApproximation & Inapproximability

If H has at least one spanning tree and every spanning tree of H has some fundamental cut of load at least c, then the weighted spanning tree congestion of H is at least c.

theorem le_spanning_tree_congestion {α : Type*} [Fintype α] [DecidableEq α]
    (H : SimpleGraph α) [DecidableRel H.Adj] (w : Sym2 α → ℕ)
    (hne : ∃ T : SimpleGraph α, T ≤ H ∧ T.IsTree) (c : ℕ)
    (h : ∀ T : SimpleGraph α, T ≤ H → T.IsTree →
      c ≤ (open scoped Classical in T.edgeFinset.sup (fundamental_cut_load H w T))) :
    c ≤ spanning_tree_congestion H w
mgreedy_rc_output_length_sum_le_three_optIn LeanApproximation & Inapproximability

Let cm be an involution on a type Γ with decidable equality and S an RC-substring-free finite set of lists. If some execution of MGREEDY-RC (mgreedy_rc_step, any tie-breaking) leads from (S, ∅) to (∅, T), then Σ_{u ∈ T} |u| ≤ 3 · scs_rc_opt cm S: the concatenation of T, which is MGREEDY-RC's output, has length at most three times the optimum.

theorem mgreedy_rc_output_length_sum_le_three_opt {Γ : Type*} [DecidableEq Γ] (cm : Γ → Γ)
    (hcm : Function.Involutive cm) (S T : Finset (List Γ)) (hfree : rc_substring_free cm S)
    (hrun : Relation.ReflTransGen (mgreedy_rc_step cm) (S, ∅) (∅, T)) :
    (∑ u ∈ T, u.length) ≤ 3 * scs_rc_opt cm S
mgreedy_rc_output_rc_substring_freeIn LeanApproximation & Inapproximability

Let cm be an involution on a type Γ with decidable equality and S an RC-substring-free finite set of lists. If some execution of MGREEDY-RC (mgreedy_rc_step, any tie-breaking) leads from (S, ∅) to (∅, T), then T is RC-substring-free: no element of T is an infix of another element or of its reverse complement.

theorem mgreedy_rc_output_rc_substring_free {Γ : Type*} [DecidableEq Γ] (cm : Γ → Γ)
    (hcm : Function.Involutive cm) (S T : Finset (List Γ)) (hfree : rc_substring_free cm S)
    (hrun : Relation.ReflTransGen (mgreedy_rc_step cm) (S, ∅) (∅, T)) :
    rc_substring_free cm T
mgreedy_rc_output_scs_rc_opt_le_two_optIn LeanApproximation & Inapproximability

Let cm be an involution on a type Γ with decidable equality and S an RC-substring-free finite set of lists. If some execution of MGREEDY-RC leads from (S, ∅) to (∅, T), then scs_rc_opt cm T ≤ 2 · scs_rc_opt cm S.

theorem mgreedy_rc_output_scs_rc_opt_le_two_opt {Γ : Type*} [DecidableEq Γ] (cm : Γ → Γ)
    (hcm : Function.Involutive cm) (S T : Finset (List Γ)) (hfree : rc_substring_free cm S)
    (hrun : Relation.ReflTransGen (mgreedy_rc_step cm) (S, ∅) (∅, T)) :
    scs_rc_opt cm T ≤ 2 * scs_rc_opt cm S
op_98_degree_step_packing_boundIn LeanApproximation & Inapproximability

Inductive step extending the (9/4)-approximation bound from packings with maximum conflict degree ≤ d to conflict degree ≤ d + 1 for any d ≥ 2.

theorem op_98_degree_step_packing_bound {α : Type*} [DecidableEq α]
    (inst : WeightedSetPackingInstance α 4) (A O : Finset (Finset α))
    (hA : is_square_locally_optimal inst 4 A) (hO : is_packing inst O) (d : ℕ) (hd : 2 ≤ d)
    (hind : ∀ (O' : Finset (Finset α)), is_packing inst O' →
      (∀ o ∈ O', (conflict_neighborhood A {o}).card ≤ d) →
      packing_weight inst O' ≤ (9 / 4 : ℚ) * packing_weight inst A)
    (h_deg : ∀ o ∈ O, (conflict_neighborhood A {o}).card ≤ d + 1) :
    packing_weight inst O ≤ (9 / 4 : ℚ) * packing_weight inst A
op_98_degree_three_step_packing_boundIn LeanApproximation & Inapproximability

In any weighted 4-set packing instance inst where A is square locally optimal for size-4 exchanges, if every packing O' of maximum conflict degree ≤ 3 satisfies weight(O') ≤ (9/4)·weight(A), then any packing O of maximum conflict degree ≤ 4 satisfies weight(O) ≤ (9/4)·weight(A).

theorem op_98_degree_three_step_packing_bound {α : Type*} [DecidableEq α]
    (inst : WeightedSetPackingInstance α 4) (A O : Finset (Finset α))
    (hA : is_square_locally_optimal inst 4 A) (hO : is_packing inst O)
    (hind : ∀ (O' : Finset (Finset α)), is_packing inst O' →
      (∀ o ∈ O', (conflict_neighborhood A {o}).card ≤ 3) →
      packing_weight inst O' ≤ (9 / 4 : ℚ) * packing_weight inst A)
    (h_deg : ∀ o ∈ O, (conflict_neighborhood A {o}).card ≤ 4) :
    packing_weight inst O ≤ (9 / 4 : ℚ) * packing_weight inst A
op_98_degree_two_step_packing_boundIn LeanApproximation & Inapproximability

In any weighted 4-set packing instance inst where A is square locally optimal for size-4 exchanges, if every packing O' of maximum conflict degree ≤ 2 satisfies weight(O') ≤ (9/4)·weight(A), then any packing O of maximum conflict degree ≤ 3 satisfies weight(O) ≤ (9/4)·weight(A).

theorem op_98_degree_two_step_packing_bound {α : Type*} [DecidableEq α]
    (inst : WeightedSetPackingInstance α 4) (A O : Finset (Finset α))
    (hA : is_square_locally_optimal inst 4 A) (hO : is_packing inst O)
    (hind : ∀ (O' : Finset (Finset α)), is_packing inst O' →
      (∀ o ∈ O', (conflict_neighborhood A {o}).card ≤ 2) →
      packing_weight inst O' ≤ (9 / 4 : ℚ) * packing_weight inst A)
    (h_deg : ∀ o ∈ O, (conflict_neighborhood A {o}).card ≤ 3) :
    packing_weight inst O ≤ (9 / 4 : ℚ) * packing_weight inst A
op_98_empty_repairs_reductionIn LeanApproximation & Inapproximability

If there is c < 5/2 with weight(O) ≤ c·weight(A) for every packing O, then the target holds: take R = ∅, which is a compatible repair family vacuously, and apply_repairs A ∅ = A.

theorem op_98_empty_repairs_reduction
    (h : ∃ c : ℚ, c < 5 / 2 ∧ ∀ (α : Type) [DecidableEq α] (inst : WeightedSetPackingInstance α 4)
      (A : Finset (Finset α)), is_square_locally_optimal inst 4 A → ∀ O, is_packing inst O →
      packing_weight inst O ≤ c * packing_weight inst A) :
    ∃ c : ℚ, c < 5 / 2 ∧ ∀ (α : Type) [DecidableEq α] (inst : WeightedSetPackingInstance α 4)
      (A : Finset (Finset α)), is_square_locally_optimal inst 4 A → ∃ R : Finset (Finset (Finset α)),
      (∀ X ∈ R, is_repair inst A X) ∧ is_compatible_repair_family R ∧ ∀ O, is_packing inst O →
      packing_weight inst O ≤ c * packing_weight inst (apply_repairs A R)
op_98_repairs_free_boundIn LeanApproximation & Inapproximability

There is a rational c < 5/2 such that for every weighted 4-set packing instance and every square locally optimal packing A, every packing O satisfies weight(O) ≤ c·weight(A).

theorem op_98_repairs_free_bound :
    ∃ c : ℚ, c < 5 / 2 ∧ ∀ (α : Type) [DecidableEq α] (inst : WeightedSetPackingInstance α 4)
      (A : Finset (Finset α)), is_square_locally_optimal inst 4 A → ∀ O, is_packing inst O →
      packing_weight inst O ≤ c * packing_weight inst A
op_98_two_cluster_degree_boundIn LeanApproximation & Inapproximability

Each a ∈ A conflicts with at most 4 sets of the packing O.

theorem op_98_two_cluster_degree_bound {α : Type*} [DecidableEq α]
    (inst : WeightedSetPackingInstance α 4) (A O : Finset (Finset α))
    (hA : is_square_locally_optimal inst 4 A) (hO : is_packing inst O)
    (a : Finset α) (ha : a ∈ A) :
    (O.filter (fun o => ¬ Disjoint a o)).card ≤ 4
op_98_two_cluster_exchange_subsetIn LeanApproximation & Inapproximability

For any sub-packing X ⊆ O with at most 4 sets, the squared weight of X is at most the squared weight of its conflict neighbourhood in A.

theorem op_98_two_cluster_exchange_subset {α : Type*} [DecidableEq α]
    (inst : WeightedSetPackingInstance α 4) (A O X : Finset (Finset α))
    (hA : is_square_locally_optimal inst 4 A) (hO : is_packing inst O)
    (hX : X ⊆ O) (hXc : X.card ≤ 4) :
    ∑ o ∈ X, (inst.weight o) ^ 2 ≤ ∑ a ∈ conflict_neighborhood A X, (inst.weight a) ^ 2
op_98_two_cluster_packing_boundIn LeanApproximation & Inapproximability

When every set o in a packing O has at most 2 conflict neighbors in A, packing_weight inst O ≤ (9/4) * packing_weight inst A under square local optimality.

theorem op_98_two_cluster_packing_bound {α : Type*} [DecidableEq α]
    (inst : WeightedSetPackingInstance α 4) (A O : Finset (Finset α))
    (hA : is_square_locally_optimal inst 4 A) (hO : is_packing inst O)
    (h2 : ∀ o ∈ O, (conflict_neighborhood A {o}).card ≤ 2) :
    packing_weight inst O ≤ (9 / 4 : ℚ) * packing_weight inst A
op_98_two_cluster_subset_packingIn LeanApproximation & Inapproximability

Any sub-collection X of a packing O is again a packing.

theorem op_98_two_cluster_subset_packing {α : Type*} [DecidableEq α] {k : ℕ}
    (inst : WeightedSetPackingInstance α k) {O X : Finset (Finset α)}
    (hO : is_packing inst O) (hX : X ⊆ O) : is_packing inst X
op_98_two_cluster_weight_aggregationIn LeanApproximation & Inapproximability

Abstract two-cluster aggregation: given nonnegative weights u on A and v on O, every o ∈ O having at most 2 conflict-neighbours in A, empty conflict neighbourhood forcing v ≤ 0, every a ∈ A having conflict degree ≤ 4 in O, and the squared 4-exchange inequalities for all sub-collections of O of size at most 4, one has weight(O) ≤ (9/4)·weight(A). Equivalently: on the multigraph with vertices A and edges O (each edge touching its 1 or 2 conflict-neighbours), with max degree ≤ 4 and ∑_{e∈S} v_e² ≤ ∑_{a∈V(S)} u_a² for every |S| ≤ 4, one has ∑_e v_e ≤ (9/4) ∑_a u_a.

theorem op_98_two_cluster_weight_aggregation {α : Type*} [DecidableEq α]
    (A O : Finset (Finset α)) (u v : Finset α → ℚ)
    (hu : ∀ a ∈ A, 0 ≤ u a) (hv : ∀ o ∈ O, 0 ≤ v o)
    (hT : ∀ o ∈ O, (conflict_neighborhood A {o}).card ≤ 2)
    (hzero : ∀ o ∈ O, conflict_neighborhood A {o} = ∅ → v o ≤ 0)
    (hdeg : ∀ a ∈ A, (O.filter (fun o => ¬ Disjoint a o)).card ≤ 4)
    (hex : ∀ X : Finset (Finset α), X ⊆ O → X.card ≤ 4 →
      ∑ o ∈ X, (v o) ^ 2 ≤ ∑ a ∈ conflict_neighborhood A X, (u a) ^ 2) :
    ∑ o ∈ O, v o ≤ (9 / 4 : ℚ) * ∑ a ∈ A, u a
op_98_two_cluster_zero_neighborhood_weightIn LeanApproximation & Inapproximability

If a set o ∈ O has empty conflict neighbourhood in A, then its weight is at most 0.

theorem op_98_two_cluster_zero_neighborhood_weight {α : Type*} [DecidableEq α]
    (inst : WeightedSetPackingInstance α 4) (A O : Finset (Finset α))
    (hA : is_square_locally_optimal inst 4 A) (hO : is_packing inst O)
    (o : Finset α) (ho : o ∈ O)
    (hzero : conflict_neighborhood A {o} = ∅) :
    inst.weight o ≤ 0
spanning_tree_congestion_le_of_witnessIn LeanApproximation & Inapproximability

If some spanning tree of H has all fundamental-cut loads at most c, then the weighted spanning tree congestion of H is at most c.

theorem spanning_tree_congestion_le_of_witness {α : Type*} [Fintype α] [DecidableEq α]
    (H : SimpleGraph α) [DecidableRel H.Adj] (w : Sym2 α → ℕ)
    (T : SimpleGraph α) (hT : T ≤ H) (htree : T.IsTree) (c : ℕ)
    (hc : (open scoped Classical in T.edgeFinset.sup (fundamental_cut_load H w T)) ≤ c) :
    spanning_tree_congestion H w ≤ c
star_routing_distance_sum_lower_boundIn LeanApproximation & Inapproximability

If H is a subcubic tree, w is a vertex of degree at most 3, and A is a finite set of vertices not containing w, then the sum over a in A of dist_H(w,a) is at least 2|A| − 3.

theorem star_routing_distance_sum_lower_bound {W : Type} [Fintype W] (H : SimpleGraph W)
    (hH : is_subcubic_tree H) (w : W) (A : Finset W) (hw : w ∉ A) :
    2 * A.card - 3 ≤ ∑ a ∈ A, H.dist w a
stc_reduction_gadget_adj_iffIn LeanApproximation & Inapproximability

Two vertices of H_A are adjacent iff they are adjacent in Q, or one is s_i (resp. t_i) and the other is w_{ij} for some j.

theorem stc_reduction_gadget_adj_iff {V : Type*} (Q : SimpleGraph V) {p : ℕ}
    (s t : Fin p → V) (A : ℕ) (x y : Sum V (Fin p × Fin A)) :
    (stc_reduction_gadget Q s t A).Adj x y ↔
      (match x, y with
       | Sum.inl u, Sum.inl v => Q.Adj u v
       | Sum.inl u, Sum.inr (i, _) => u = s i ∨ u = t i
       | Sum.inr (i, _), Sum.inl u => u = s i ∨ u = t i
       | Sum.inr _, Sum.inr _ => False)
stc_reduction_gadget_connectedIn LeanApproximation & Inapproximability

If Q is connected then H_A is connected.

theorem stc_reduction_gadget_connected {V : Type*} (Q : SimpleGraph V) (hQ : Q.Connected)
    {p : ℕ} (s t : Fin p → V) (A : ℕ) :
    (stc_reduction_gadget Q s t A).Connected
stc_reduction_weight_aux_edgesIn LeanApproximation & Inapproximability

For s i ≠ t i, the weight of the heavy edge joining w_{ij} to t_i is A + 1, and the weight of the light edge joining w_{ij} to s_i is 1.

theorem stc_reduction_weight_aux_edges {V : Type*} [DecidableEq V] {p : ℕ}
    (s t : Fin p → V) (A : ℕ) (i : Fin p) (j : Fin A) (h : s i ≠ t i) :
    stc_reduction_weight s t A (Sym2.mk (Sum.inl (t i)) (Sum.inr (i, j))) = A + 1 ∧
      stc_reduction_weight s t A (Sym2.mk (Sum.inl (s i)) (Sum.inr (i, j))) = 1
steiner_elimination_for_hostIn LeanApproximation & Inapproximability

For any graph T on V, any subcubic tree H on W and any injection f : V ↪ W, there is a subcubic tree H' on V whose routing cost is at most that of H under f.

theorem steiner_elimination_for_host {V : Type} [Fintype V] [Nonempty V]
    {W : Type} [Fintype W] (T : SimpleGraph V) (H : SimpleGraph W) (hH : is_subcubic_tree H)
    (f : V ↪ W) :
    ∃ (H' : SimpleGraph V), is_subcubic_tree H' ∧
      tree_routing_cost T H' id ≤ tree_routing_cost T H f
steiner_elimination_for_host_of_all_nont_degree_threeIn LeanApproximation & Inapproximability

Let T be a graph on V, H a subcubic tree on W, f : V ↪ W injective, and suppose every vertex of W outside the image of f has degree exactly 3 in H. Then there is a subcubic tree H' on V with tree_routing_cost T H' id ≤ tree_routing_cost T H f.

theorem steiner_elimination_for_host_of_all_nont_degree_three {V : Type} [Fintype V]
    [Nonempty V] {W : Type} [Fintype W] (T : SimpleGraph V) (H : SimpleGraph W)
    (hH : is_subcubic_tree H) (f : V ↪ W)
    (h3 : ∀ w : W, w ∉ Set.range f → (open Classical in H.degree w = 3)) :
    ∃ (H' : SimpleGraph V), is_subcubic_tree H' ∧ tree_routing_cost T H' id ≤ tree_routing_cost T H f
steiner_elimination_for_host_of_surjectiveIn LeanApproximation & Inapproximability

If the injection f : V ↪ W is surjective, then H is (up to the bijection f) already a subcubic tree on the terminal set, so there is a subcubic tree H' on V with tree_routing_cost T H' id = tree_routing_cost T H f.

theorem steiner_elimination_for_host_of_surjective {V : Type} [Fintype V] [Nonempty V]
    {W : Type} [Fintype W] (T : SimpleGraph V) (H : SimpleGraph W) (hH : is_subcubic_tree H)
    (f : V ↪ W) (hsurj : Function.Surjective f) :
    ∃ (H' : SimpleGraph V), is_subcubic_tree H' ∧ tree_routing_cost T H' id = tree_routing_cost T H f
steiner_host_nont_degree_two_eliminationIn LeanApproximation & Inapproximability

If H is a subcubic tree on W, w is not in the image of f, and H.degree w = 2 with neighbours a and b, then the graph obtained from H by deleting w and adding the edge ab is a subcubic tree on W \ {w} (retaining the same embedding, restricted) whose routing cost is at most that of H, using strictly fewer vertices.

theorem steiner_host_nont_degree_two_elimination {V : Type} [Fintype V] [Nonempty V]
    {W : Type} [Fintype W] (T : SimpleGraph V) (H : SimpleGraph W) (hH : is_subcubic_tree H)
    (f : V ↪ W) (w : W) (hnont : ∀ v, f v ≠ w) (hdeg : open Classical in H.degree w = 2) :
    ∃ (W' : Type) (_ : Fintype W') (H' : SimpleGraph W') (_ : is_subcubic_tree H') (f' : V ↪ W'),
      tree_routing_cost T H' f' ≤ tree_routing_cost T H f ∧ Fintype.card W' < Fintype.card W
steiner_host_nont_leaf_eliminationIn LeanApproximation & Inapproximability

If H is a subcubic tree on W, f : V ↪ W is injective, and w ∈ W is not in the image of f and is a leaf of H, then the induced subgraph of H on W \ {w} is a subcubic tree and, with the same embedding f, has exactly the same routing cost, using strictly fewer vertices.

theorem steiner_host_nont_leaf_elimination {V : Type} [Fintype V] [Nonempty V] {W : Type} [Fintype W]
    (T : SimpleGraph V) (H : SimpleGraph W) (hH : is_subcubic_tree H) (f : V ↪ W) (w : W)
    (hnont : ∀ v, f v ≠ w) (hleaf : open Classical in H.degree w = 1) :
    ∃ (W' : Type) (_ : Fintype W') (H' : SimpleGraph W') (_ : is_subcubic_tree H') (f' : V ↪ W'),
      tree_routing_cost T H' f' = tree_routing_cost T H f ∧ Fintype.card W' < Fintype.card W
steiner_host_reduce_to_cubic_nontIn LeanApproximation & Inapproximability

Given a tree T on V and a subcubic tree host H on W with terminals embedded by f, there is another subcubic tree host H' on W' with embedding f' whose routing cost is at most that of H, in which every vertex not in the image of f' has degree exactly 3 in H'.

theorem steiner_host_reduce_to_cubic_nont {V : Type} [Fintype V] [Nonempty V]
    {W : Type} [Fintype W] (T : SimpleGraph V) (H : SimpleGraph W) (hH : is_subcubic_tree H)
    (f : V ↪ W) :
    ∃ (W' : Type) (_ : Fintype W') (H' : SimpleGraph W') (_ : is_subcubic_tree H') (f' : V ↪ W'),
      tree_routing_cost T H' f' ≤ tree_routing_cost T H f ∧
        (∀ w : W', w ∉ Set.range f' → (open Classical in H'.degree w = 3))
subcubic_tree_existsIn LeanApproximation & Inapproximability

Every finite non-empty type admits a subcubic tree.

theorem subcubic_tree_exists (V : Type) [Fintype V] [Nonempty V] :
    ∃ (H : SimpleGraph V), is_subcubic_tree H
subcubic_tree_leaf_count_eq_degree_three_count_add_twoIn LeanApproximation & Inapproximability

For a subcubic tree H on W with |W| ≥ 2 in which no vertex has degree 2, the number of degree-1 vertices equals the number of degree-3 vertices plus 2.

theorem subcubic_tree_leaf_count_eq_degree_three_count_add_two {W : Type} [Fintype W]
    [DecidableEq W] (H : SimpleGraph W) [DecidableRel H.Adj] (hH : is_subcubic_tree H)
    (hcard : 2 ≤ Fintype.card W) (hno2 : ∀ w, H.degree w ≠ 2) :
    (Finset.univ.filter (fun w => H.degree w = 1)).card =
      (Finset.univ.filter (fun w => H.degree w = 3)).card + 2
tbt_opt_le_tree_routing_costIn LeanApproximation & Inapproximability

Every subcubic tree H on V is an admissible terminal-only host, so its routing cost is an upper bound for the terminal-only optimum: tbt_opt T <= tree_routing_cost T H id.

theorem tbt_opt_le_tree_routing_cost {V : Type} [Fintype V] (T : SimpleGraph V)
    {H : SimpleGraph V} (hH : is_subcubic_tree H) :
    tbt_opt T ≤ tree_routing_cost T H id
tbt_sn_opt_le_tree_routing_cost_of_hostIn LeanApproximation & Inapproximability

Any subcubic tree H on any finite type W together with an injection f : V ↪ W is an admissible Steiner host, so tbt_sn_opt T <= tree_routing_cost T H f.

theorem tbt_sn_opt_le_tree_routing_cost_of_host {V : Type} [Fintype V] (T : SimpleGraph V)
    {W : Type} [Fintype W] {H : SimpleGraph W} (hH : is_subcubic_tree H) (f : V ↪ W) :
    tbt_sn_opt T ≤ tree_routing_cost T H f
tgreedy_rc_two_point_five_approxIn LeanApproximation & Inapproximability

Let Γ be a type with decidable equality, cm : Γ → Γ an involution, and S : Finset (List Γ) with rc_substring_free cm S. If t : List Γ satisfies tgreedy_rc_output cm S t (t is an output of some execution of TGREEDY-RC on S, with the knowledge-base definitions of MGREEDY-RC and GREEDY-RC steps), then 2 * t.length ≤ 5 * scs_rc_opt cm S in ℕ, i.e. |t| ≤ 2.5 · |OPT(S)| where scs_rc_opt cm S is the least length of a list containing s or rev_comp cm s as an infix for every s ∈ S.

theorem tgreedy_rc_two_point_five_approx {Γ : Type*} [DecidableEq Γ] (cm : Γ → Γ)
    (hcm : Function.Involutive cm) (S : Finset (List Γ)) (hfree : rc_substring_free cm S)
    (t : List Γ) (ht : tgreedy_rc_output cm S t) :
    2 * t.length ≤ 5 * scs_rc_opt cm S
tree_binary_embedding_steiner_optimum_equality_of_eliminationIn LeanApproximation & Inapproximability

If every subcubic tree host with injective terminal map can be replaced by a terminal-only subcubic tree of no larger routing cost, then tbt_opt T = tbt_sn_opt T for every finite tree T on V with at least two vertices.

theorem tree_binary_embedding_steiner_optimum_equality_of_elimination
    (h : ∀ {V : Type} [Fintype V], ∀ (T : SimpleGraph V),
      ∀ {W : Type} [Fintype W], ∀ (H : SimpleGraph W), is_subcubic_tree H → ∀ (f : V ↪ W),
        ∃ (H' : SimpleGraph V), is_subcubic_tree H' ∧
          tree_routing_cost T H' id ≤ tree_routing_cost T H f)
    {V : Type} [Fintype V] (T : SimpleGraph V) (hT : T.IsTree) (hn : 2 ≤ Fintype.card V) :
    tbt_opt T = tbt_sn_opt T
tree_routing_cost_le_of_dist_leIn LeanApproximation & Inapproximability

If two graphs H, H' on the same vertex type W satisfy dist_{H'}(x,y) ≤ dist_H(x,y) for all x, y, then tree_routing_cost T H' f ≤ tree_routing_cost T H f for every graph T and every f.

theorem tree_routing_cost_le_of_dist_le {V : Type} [Fintype V] {W : Type}
    (T : SimpleGraph V) (H H' : SimpleGraph W) (f : V → W)
    (h : ∀ u v : W, H'.dist u v ≤ H.dist u v) :
    tree_routing_cost T H' f ≤ tree_routing_cost T H f
tsp_opt_boundsIn LeanApproximation & Inapproximability

For every TSP instance on a finite set V with at least 3 vertices and symmetric edge weights ℓ, assuming there exists a tour, the optimal tour length OPT satisfies ∑_{v ∈ V} short(v) ≤ OPT ≤ ∑_{v ∈ V} long(v).

theorem tsp_opt_bounds {V : Type*} [Fintype V] [DecidableEq V] (hn : 3 ≤ Fintype.card V) (ℓ : V → V → ℝ) (h_symm : ∀ u v, ℓ u v = ℓ v u) (h_exists : ∃ σ : Equiv.Perm V, is_tsp_tour σ) : ∑ v : V, tsp_short ℓ v ≤ tsp_opt ℓ ∧ tsp_opt ℓ ≤ ∑ v : V, tsp_long ℓ v
tsp_tour_length_ge_sum_shortIn LeanApproximation & Inapproximability

For any tour σ on a finite vertex set V and any edge weights ℓ, the sum of tsp_short ℓ v over all v ∈ V is at most the length of the tour σ.

theorem tsp_tour_length_ge_sum_short {V : Type*} [Fintype V] [DecidableEq V] (ℓ : V → V → ℝ) (σ : Equiv.Perm V) (hσ : is_tsp_tour σ) : ∑ v : V, tsp_short ℓ v ≤ tsp_tour_length ℓ σ
tsp_tour_length_le_sum_longIn LeanApproximation & Inapproximability

For any tour σ on a finite vertex set V and any edge weights ℓ, the length of the tour σ is at most the sum of long(v) over all v ∈ V.

theorem tsp_tour_length_le_sum_long {V : Type*} [Fintype V] [DecidableEq V] (ℓ : V → V → ℝ) (σ : Equiv.Perm V) (hσ : is_tsp_tour σ) : tsp_tour_length ℓ σ ≤ ∑ v : V, tsp_long ℓ v
weighted_spanning_tree_congestion_hardness_gapIn LeanApproximation & Inapproximability

Let V be a finite type with decidable equality, and let Q be a connected simple graph on V where every vertex has degree at most 3. Let p be a natural number, and let s, t : Fin p -> V be endpoints of p disjoint pairs such that all 2p vertices are distinct and have degree 1 in Q. Let B = max(|E(Q)|, 2), and fix an integer A >= 2. Let H_A be the simple graph on V ⊕ (Fin p × Fin A) with edges of Q on V, and auxiliary edges between s(i) and (i, j) and between t(i) and (i, j) for all i and j. Let w : Sym2 (V ⊕ (Fin p × Fin A)) -> ℕ assign weight 1 to edges of Q, weight 1 to edges {s(i), (i, j)}, weight A + 1 to edges {t(i), (i, j)}, and 0 elsewhere. Let STC_w(H_A) be the infimum in ℕ of the maximum fundamental cut load in H_A with weights w over all spanning trees of H_A. Let DisjointPathsExist be the proposition that there exists a tuple of paths in Q connecting each s_i to t_i that are pairwise vertex-disjoint. Then DisjointPathsExist implies STC_w(H_A) <= A + B, and (not DisjointPathsExist) implies 2 * A <= STC_w(H_A).

theorem weighted_spanning_tree_congestion_hardness_gap
    {V : Type*} [Fintype V] [DecidableEq V]
    (Q : SimpleGraph V) [DecidableRel Q.Adj] (hQ_conn : Q.Connected) (hQ_deg : ∀ v, Q.degree v ≤ 3)
    (p : ℕ) (s t : Fin p → V)
    (h_term_inj : Function.Injective (Sum.elim s t))
    (h_deg_s : ∀ i, Q.degree (s i) = 1)
    (h_deg_t : ∀ i, Q.degree (t i) = 1)
    (A : ℕ) (hA : 2 ≤ A) :
    let B := max (open scoped Classical in Q.edgeFinset.card) 2
    let H_adj : Sum V (Fin p × Fin A) → Sum V (Fin p × Fin A) → Prop := fun
      | Sum.inl u, Sum.inl v => Q.Adj u v
      | Sum.inl u, Sum.inr (i, _) => u = s i ∨ u = t i
      | Sum.inr (i, _), Sum.inl u => u = s i ∨ u = t i
      | Sum.inr _, Sum.inr _ => False
    let H : SimpleGraph (Sum V (Fin p × Fin A)) :=
      ⟨H_adj, ⟨fun x y h => by
        rcases x with u | ⟨i, j⟩ <;> rcases y with v | ⟨i', j'⟩
        · exact h.symm
        · exact h
        · exact h
        · contradiction⟩,
       ⟨fun x h => by
        rcases x with u | ⟨i, j⟩
        · exact Q.irrefl h
        · contradiction⟩⟩
    let w_aux : Sum V (Fin p × Fin A) → Sum V (Fin p × Fin A) → ℕ := fun
      | Sum.inl _, Sum.inl _ => 1
      | Sum.inl u, Sum.inr (i, _) => if u = t i then A + 1 else 1
      | Sum.inr (i, _), Sum.inl u => if u = t i then A + 1 else 1
      | Sum.inr _, Sum.inr _ => 0
    let w : Sym2 (Sum V (Fin p × Fin A)) → ℕ :=
      Sym2.lift ⟨w_aux, fun x y => by cases x <;> cases y <;> rfl⟩
    let cut_load (T : SimpleGraph (Sum V (Fin p × Fin A))) (e : Sym2 (Sum V (Fin p × Fin A))) : ℕ :=
      open scoped Classical in
      ∑ uv ∈ H.edgeFinset,
        if Sym2.lift ⟨fun u v => ¬ (T.deleteEdges {e}).Reachable u v,
          fun _ _ => propext ⟨fun h hr => h hr.symm, fun h hr => h hr.symm⟩⟩ uv
        then w uv else 0
    let stc : ℕ :=
      sInf {c : ℕ | ∃ T : SimpleGraph (Sum V (Fin p × Fin A)),
        T ≤ H ∧ T.IsTree ∧ (open scoped Classical in T.edgeFinset.sup (cut_load T)) = c}
    let has_vdp : Prop :=
      ∃ P : (i : Fin p) → Q.Walk (s i) (t i),
        (∀ i, (P i).IsPath) ∧ ∀ i j, i ≠ j → (P i).support.Disjoint (P j).support
    (has_vdp → stc ≤ A + B) ∧ (¬ has_vdp → 2 * A ≤ stc)
weighted_spanning_tree_congestion_no_boundIn LeanApproximation & Inapproximability

Let V be a finite type with decidable equality, and let Q be a connected simple graph on V where every vertex has degree at most 3. Let p be a natural number, and let s, t : Fin p -> V be endpoints of p disjoint pairs such that all 2p vertices are distinct and have degree 1 in Q. Let B = max(|E(Q)|, 2), and fix an integer A >= 2. Let H_A be the simple graph on V ⊕ (Fin p × Fin A) with edges of Q on V, and auxiliary edges between s(i) and (i, j) and between t(i) and (i, j) for all i and j. Let w : Sym2 (V ⊕ (Fin p × Fin A)) -> ℕ assign weight 1 to edges of Q, weight 1 to edges {s(i), (i, j)}, weight A + 1 to edges {t(i), (i, j)}, and 0 elsewhere. Let STC_w(H_A) be the infimum in ℕ of the maximum fundamental cut load in H_A with weights w over all spanning trees of H_A. Let DisjointPathsExist be the proposition that there exists a tuple of paths in Q connecting each s_i to t_i that are pairwise vertex-disjoint. Then (not DisjointPathsExist) implies that STC_w(H_A) >= 2 * A.

theorem weighted_spanning_tree_congestion_no_bound
    {V : Type*} [Fintype V] [DecidableEq V]
    (Q : SimpleGraph V) [DecidableRel Q.Adj] (hQ_conn : Q.Connected) (hQ_deg : ∀ v, Q.degree v ≤ 3)
    (p : ℕ) (s t : Fin p → V)
    (h_term_inj : Function.Injective (Sum.elim s t))
    (h_deg_s : ∀ i, Q.degree (s i) = 1)
    (h_deg_t : ∀ i, Q.degree (t i) = 1)
    (A : ℕ) (hA : 2 ≤ A) :
    let B := max (open scoped Classical in Q.edgeFinset.card) 2
    let H_adj : Sum V (Fin p × Fin A) → Sum V (Fin p × Fin A) → Prop := fun
      | Sum.inl u, Sum.inl v => Q.Adj u v
      | Sum.inl u, Sum.inr (i, _) => u = s i ∨ u = t i
      | Sum.inr (i, _), Sum.inl u => u = s i ∨ u = t i
      | Sum.inr _, Sum.inr _ => False
    let H : SimpleGraph (Sum V (Fin p × Fin A)) :=
      ⟨H_adj, ⟨fun x y h => by
        rcases x with u | ⟨i, j⟩ <;> rcases y with v | ⟨i', j'⟩
        · exact h.symm
        · exact h
        · exact h
        · contradiction⟩,
       ⟨fun x h => by
        rcases x with u | ⟨i, j⟩
        · exact Q.irrefl h
        · contradiction⟩⟩
    let w_aux : Sum V (Fin p × Fin A) → Sum V (Fin p × Fin A) → ℕ := fun
      | Sum.inl _, Sum.inl _ => 1
      | Sum.inl u, Sum.inr (i, _) => if u = t i then A + 1 else 1
      | Sum.inr (i, _), Sum.inl u => if u = t i then A + 1 else 1
      | Sum.inr _, Sum.inr _ => 0
    let w : Sym2 (Sum V (Fin p × Fin A)) → ℕ :=
      Sym2.lift ⟨w_aux, fun x y => by cases x <;> cases y <;> rfl⟩
    let cut_load (T : SimpleGraph (Sum V (Fin p × Fin A))) (e : Sym2 (Sum V (Fin p × Fin A))) : ℕ :=
      open scoped Classical in
      ∑ uv ∈ H.edgeFinset,
        if Sym2.lift ⟨fun u v => ¬ (T.deleteEdges {e}).Reachable u v,
          fun _ _ => propext ⟨fun h hr => h hr.symm, fun h hr => h hr.symm⟩⟩ uv
        then w uv else 0
    let stc : ℕ :=
      sInf {c : ℕ | ∃ T : SimpleGraph (Sum V (Fin p × Fin A)),
        T ≤ H ∧ T.IsTree ∧ (open scoped Classical in T.edgeFinset.sup (cut_load T)) = c}
    let has_vdp : Prop :=
      ∃ P : (i : Fin p) → Q.Walk (s i) (t i),
        (∀ i, (P i).IsPath) ∧ ∀ i j, i ≠ j → (P i).support.Disjoint (P j).support
    ¬ has_vdp → 2 * A ≤ stc
weighted_spanning_tree_congestion_yes_boundIn LeanApproximation & Inapproximability

Let V be a finite type with decidable equality, and let Q be a connected simple graph on V where every vertex has degree at most 3. Let p be a natural number, and let s, t : Fin p -> V be endpoints of p disjoint pairs such that all 2p vertices are distinct and have degree 1 in Q. Let B = max(|E(Q)|, 2), and fix an integer A >= 2. Let H_A be the simple graph on V ⊕ (Fin p × Fin A) with edges of Q on V, and auxiliary edges between s(i) and (i, j) and between t(i) and (i, j) for all i and j. Let w : Sym2 (V ⊕ (Fin p × Fin A)) -> ℕ assign weight 1 to edges of Q, weight 1 to edges {s(i), (i, j)}, weight A + 1 to edges {t(i), (i, j)}, and 0 elsewhere. Let STC_w(H_A) be the infimum in ℕ of the maximum fundamental cut load in H_A with weights w over all spanning trees of H_A. Let DisjointPathsExist be the proposition that there exists a tuple of paths in Q connecting each s_i to t_i that are pairwise vertex-disjoint. Then DisjointPathsExist implies that STC_w(H_A) <= A + B.

theorem weighted_spanning_tree_congestion_yes_bound
    {V : Type*} [Fintype V] [DecidableEq V]
    (Q : SimpleGraph V) [DecidableRel Q.Adj] (hQ_conn : Q.Connected) (hQ_deg : ∀ v, Q.degree v ≤ 3)
    (p : ℕ) (s t : Fin p → V)
    (h_term_inj : Function.Injective (Sum.elim s t))
    (h_deg_s : ∀ i, Q.degree (s i) = 1)
    (h_deg_t : ∀ i, Q.degree (t i) = 1)
    (A : ℕ) (hA : 2 ≤ A) :
    let B := max (open scoped Classical in Q.edgeFinset.card) 2
    let H_adj : Sum V (Fin p × Fin A) → Sum V (Fin p × Fin A) → Prop := fun
      | Sum.inl u, Sum.inl v => Q.Adj u v
      | Sum.inl u, Sum.inr (i, _) => u = s i ∨ u = t i
      | Sum.inr (i, _), Sum.inl u => u = s i ∨ u = t i
      | Sum.inr _, Sum.inr _ => False
    let H : SimpleGraph (Sum V (Fin p × Fin A)) :=
      ⟨H_adj, ⟨fun x y h => by
        rcases x with u | ⟨i, j⟩ <;> rcases y with v | ⟨i', j'⟩
        · exact h.symm
        · exact h
        · exact h
        · contradiction⟩,
       ⟨fun x h => by
        rcases x with u | ⟨i, j⟩
        · exact Q.irrefl h
        · contradiction⟩⟩
    let w_aux : Sum V (Fin p × Fin A) → Sum V (Fin p × Fin A) → ℕ := fun
      | Sum.inl _, Sum.inl _ => 1
      | Sum.inl u, Sum.inr (i, _) => if u = t i then A + 1 else 1
      | Sum.inr (i, _), Sum.inl u => if u = t i then A + 1 else 1
      | Sum.inr _, Sum.inr _ => 0
    let w : Sym2 (Sum V (Fin p × Fin A)) → ℕ :=
      Sym2.lift ⟨w_aux, fun x y => by cases x <;> cases y <;> rfl⟩
    let cut_load (T : SimpleGraph (Sum V (Fin p × Fin A))) (e : Sym2 (Sum V (Fin p × Fin A))) : ℕ :=
      open scoped Classical in
      ∑ uv ∈ H.edgeFinset,
        if Sym2.lift ⟨fun u v => ¬ (T.deleteEdges {e}).Reachable u v,
          fun _ _ => propext ⟨fun h hr => h hr.symm, fun h hr => h hr.symm⟩⟩ uv
        then w uv else 0
    let stc : ℕ :=
      sInf {c : ℕ | ∃ T : SimpleGraph (Sum V (Fin p × Fin A)),
        T ≤ H ∧ T.IsTree ∧ (open scoped Classical in T.edgeFinset.sup (cut_load T)) = c}
    let has_vdp : Prop :=
      ∃ P : (i : Fin p) → Q.Walk (s i) (t i),
        (∀ i, (P i).IsPath) ∧ ∀ i j, i ≠ j → (P i).support.Disjoint (P j).support
    has_vdp → stc ≤ A + B
word_generating_rank_leIn LeanApproximation & Inapproximability

If a finite set of words Y can generate every word in X by concatenation, then the generating rank of X is at most the cardinality of Y.

theorem word_generating_rank_le {α : Type*} (X : Finset (List α)) (Y : Finset (List α))
    (h : ∀ w ∈ X, ∃ L : List (List α), w = L.flatten ∧ ∀ y ∈ L, y ∈ Y) :
    word_generating_rank X ≤ Y.card
binary_extremizer_convolution_sumIn LeanAutomata & Formal Languages

For n ≥ 3, the convolution sum of the zeros run count and ones run count over Fin n equals (n + 2) * 2^(n - 3).

open Classical in
theorem binary_extremizer_convolution_sum (n : ℕ) (hn : 3 ≤ n) :
    (∑ s : Fin n,
      (if s.val = 0 then 1 else 2 ^ (s.val - 1)) *
      (if s.val + 1 = n then 1 else 2 ^ (n - 2 - s.val)))
      = (n + 2) * 2 ^ (n - 3)
binary_extremizer_ones_run_countIn LeanAutomata & Formal Languages

For n ≥ 3, the number of runs of 1^(n-1) from state s to state n - 1 in binary_extremizer_nfa n is 1 if s = n - 1 and 2^(n - 2 - s) if s < n - 1.

open Classical in
theorem binary_extremizer_ones_run_count (n : ℕ) (hn : 3 ≤ n) (s : Fin n) :
    nfa_run_count_list (binary_extremizer_nfa n) (List.replicate (n - 1) (1 : Fin 2))
      s ⟨n - 1, by omega⟩ = if s.val + 1 = n then 1 else 2 ^ (n - 2 - s.val)
binary_extremizer_word_run_countIn LeanAutomata & Formal Languages

The extremizer word 0^(n-1) ++ 1^(n-1) has exactly (n + 2) * 2^(n - 3) runs from state 0 to state n - 1 in binary_extremizer_nfa n.

open Classical in
theorem binary_extremizer_word_run_count (n : ℕ) (hn : 3 ≤ n) :
    nfa_run_count_list (binary_extremizer_nfa n)
      (List.replicate (n - 1) (0 : Fin 2) ++ List.replicate (n - 1) (1 : Fin 2))
      ⟨0, by omega⟩ ⟨n - 1, by omega⟩ = (n + 2) * 2 ^ (n - 3)
binary_extremizer_zeros_run_countIn LeanAutomata & Formal Languages

For n ≥ 3, the number of runs of 0^(n-1) from state 0 to state q in binary_extremizer_nfa n is 1 if q = 0 and 2^(q - 1) if q > 0.

open Classical in
theorem binary_extremizer_zeros_run_count (n : ℕ) (hn : 3 ≤ n) (q : Fin n) :
    nfa_run_count_list (binary_extremizer_nfa n) (List.replicate (n - 1) (0 : Fin 2))
      ⟨0, by omega⟩ q = if q.val = 0 then 1 else 2 ^ (q.val - 1)
bipartite_cactus_nfa_color_flipIn LeanAutomata & Formal Languages

For a loop-free bipartite cactus NFA there is a 2-colouring of the states under which every transition of the automaton connects two differently coloured states.

theorem bipartite_cactus_nfa_color_flip {α : Type*} {σ : Type} (A : NFA α σ) (hc : is_bipartite_cactus_nfa A) (hloop : ∀ (q : σ) (a : α), ¬ (q ∈ A.step q a)) : ∃ χ : σ → ZMod 2, ∀ (q : σ) (a : α) (r : σ), r ∈ A.step q a → χ r = χ q + 1
bipartite_cactus_nfa_unionIn LeanAutomata & Formal Languages

If L₁ and L₂ are each accepted by a bipartite cactus NFA, then L₁ ∪ L₂ is accepted by a bipartite cactus NFA.

theorem bipartite_cactus_nfa_union {α : Type*} {L₁ L₂ : Language α}
    (h₁ : ∃ (σ : Type) (_ : Fintype σ) (A : NFA α σ), A.accepts = L₁ ∧ is_bipartite_cactus_nfa A)
    (h₂ : ∃ (τ : Type) (_ : Fintype τ) (B : NFA α τ), B.accepts = L₂ ∧ is_bipartite_cactus_nfa B) :
    ∃ (ρ : Type) (_ : Fintype ρ) (C : NFA α ρ), C.accepts = L₁ + L₂ ∧ is_bipartite_cactus_nfa C
dfa_box_prod_eval_fromIn LeanAutomata & Formal Languages

Evaluating the sequential box product A₁ □ A₂ from state (q₁, q₂) on a word w in (α₁ ⊕ α₂)* results in the pair (A₁.evalFrom q₁ (w.filterMap Sum.getLeft?), A₂.evalFrom q₂ (w.filterMap Sum.getRight?)).

theorem dfa_box_prod_eval_from {α₁ α₂ σ₁ σ₂ : Type*} (A₁ : DFA α₁ σ₁) (A₂ : DFA α₂ σ₂)
    (q₁ : σ₁) (q₂ : σ₂) (w : List (Sum α₁ α₂)) :
    (dfa_box_prod A₁ A₂).evalFrom (q₁, q₂) w =
      (A₁.evalFrom q₁ (w.filterMap Sum.getLeft?), A₂.evalFrom q₂ (w.filterMap Sum.getRight?))
dfa_box_prod_is_synchronizable_iffIn LeanAutomata & Formal Languages

The sequential box product A₁ □ A₂ of two DFAs is synchronizable if and only if both A₁ and A₂ are synchronizable.

theorem dfa_box_prod_is_synchronizable_iff {α₁ α₂ σ₁ σ₂ : Type*}
    (A₁ : DFA α₁ σ₁) (A₂ : DFA α₂ σ₂) :
    dfa_is_synchronizable (dfa_box_prod A₁ A₂) ↔
      dfa_is_synchronizable A₁ ∧ dfa_is_synchronizable A₂
dfa_box_prod_is_synchronizing_iffIn LeanAutomata & Formal Languages

A word w in (α₁ ⊕ α₂)* is synchronizing for the sequential box product A₁ □ A₂ if and only if the projection w.filterMap Sum.getLeft? is synchronizing for A₁ and the projection w.filterMap Sum.getRight? is synchronizing for A₂.

theorem dfa_box_prod_is_synchronizing_iff {α₁ α₂ σ₁ σ₂ : Type*}
    (A₁ : DFA α₁ σ₁) (A₂ : DFA α₂ σ₂) (w : List (Sum α₁ α₂)) :
    dfa_is_synchronizing (dfa_box_prod A₁ A₂) w ↔
      dfa_is_synchronizing A₁ (w.filterMap Sum.getLeft?) ∧
      dfa_is_synchronizing A₂ (w.filterMap Sum.getRight?)
dfa_box_prod_reset_threshold_and_synchronizable_iffIn LeanAutomata & Formal Languages

For any two DFAs A₁ and A₂ with disjoint input alphabets, their sequential box product A₁ □ A₂ is synchronizable if and only if both A₁ and A₂ are synchronizable, and the reset threshold of A₁ □ A₂ equals the sum of the reset thresholds of A₁ and A₂ in WithTop ℕ.

theorem dfa_box_prod_reset_threshold_and_synchronizable_iff {α₁ α₂ σ₁ σ₂ : Type*}
    (A₁ : DFA α₁ σ₁) (A₂ : DFA α₂ σ₂) :
    (dfa_is_synchronizable (dfa_box_prod A₁ A₂) ↔
      dfa_is_synchronizable A₁ ∧ dfa_is_synchronizable A₂) ∧
    dfa_reset_threshold (dfa_box_prod A₁ A₂) =
      dfa_reset_threshold A₁ + dfa_reset_threshold A₂
dfa_box_prod_reset_threshold_eqIn LeanAutomata & Formal Languages

The reset threshold of the sequential box product A₁ □ A₂ of two DFAs equals the sum of the reset thresholds of A₁ and A₂ in WithTop ℕ.

theorem dfa_box_prod_reset_threshold_eq {α₁ α₂ σ₁ σ₂ : Type*}
    (A₁ : DFA α₁ σ₁) (A₂ : DFA α₂ σ₂) :
    dfa_reset_threshold (dfa_box_prod A₁ A₂) =
      dfa_reset_threshold A₁ + dfa_reset_threshold A₂
dfa_is_seq_subset_sync_choice_iffIn LeanAutomata & Formal Languages

Unfolding: ws is a sequential subset synchronization choice iff for every stage i the word ws i subset-synchronizes the image set of the flattened previous choices and its length equals that set's subset reset threshold.

theorem dfa_is_seq_subset_sync_choice_iff {α : Type*} {k : ℕ} {σ : Fin k → Type*}
    (A : (i : Fin k) → DFA α (σ i)) (ws : Fin k → List α) :
    dfa_is_seq_subset_sync_choice A ws ↔
      ∀ i : Fin k,
        dfa_is_subset_synchronizing (A i)
            (Set.range fun q : σ i =>
              (A i).evalFrom q (List.take (i : ℕ) (List.ofFn ws)).flatten) (ws i) ∧
          ((ws i).length : WithTop ℕ) =
            dfa_subset_reset_threshold (A i)
              (Set.range fun q : σ i =>
                (A i).evalFrom q (List.take (i : ℕ) (List.ofFn ws)).flatten)
dfa_parallel_prod_evalFromIn LeanAutomata & Formal Languages

For any two deterministic finite automata A₁ : DFA α₁ σ₁ and A₂ : DFA α₂ σ₂, states q₁ : σ₁ and q₂ : σ₂, and word w : List (α₁ × α₂), evaluating w from (q₁, q₂) in dfa_parallel_prod A₁ A₂ yields (A₁.evalFrom q₁ w.unzip.1, A₂.evalFrom q₂ w.unzip.2).

theorem dfa_parallel_prod_evalFrom {α₁ α₂ σ₁ σ₂ : Type*} (A₁ : DFA α₁ σ₁) (A₂ : DFA α₂ σ₂) (q₁ : σ₁) (q₂ : σ₂) (w : List (α₁ × α₂)) : (dfa_parallel_prod A₁ A₂).evalFrom (q₁, q₂) w = (A₁.evalFrom q₁ w.unzip.1, A₂.evalFrom q₂ w.unzip.2)
dfa_parallel_prod_is_synchronizable_iffIn LeanAutomata & Formal Languages

The parallel two-tape product dfa_parallel_prod A₁ A₂ of two deterministic finite automata over nonempty alphabets is synchronizable if and only if both A₁ and A₂ are synchronizable.

theorem dfa_parallel_prod_is_synchronizable_iff {α₁ α₂ σ₁ σ₂ : Type*} [Nonempty α₁] [Nonempty α₂] (A₁ : DFA α₁ σ₁) (A₂ : DFA α₂ σ₂) : dfa_is_synchronizable (dfa_parallel_prod A₁ A₂) ↔ dfa_is_synchronizable A₁ ∧ dfa_is_synchronizable A₂
dfa_parallel_prod_is_synchronizing_iffIn LeanAutomata & Formal Languages

A word w : List (α₁ × α₂) is synchronizing for the parallel two-tape product dfa_parallel_prod A₁ A₂ if and only if its first projection w.unzip.1 is synchronizing for A₁ and its second projection w.unzip.2 is synchronizing for A₂.

theorem dfa_parallel_prod_is_synchronizing_iff {α₁ α₂ σ₁ σ₂ : Type*} (A₁ : DFA α₁ σ₁) (A₂ : DFA α₂ σ₂) (w : List (α₁ × α₂)) : dfa_is_synchronizing (dfa_parallel_prod A₁ A₂) w ↔ dfa_is_synchronizing A₁ w.unzip.1 ∧ dfa_is_synchronizing A₂ w.unzip.2
dfa_parallel_prod_is_synchronizing_zip_paddedIn LeanAutomata & Formal Languages

If w₁ is a synchronizing word for A₁, w₂ is a synchronizing word for A₂, w₂.length ≤ w₁.length, and a₂ : α₂ is any letter, then the zipped word w₁.zip (List.replicate (w₁.length - w₂.length) a₂ ++ w₂) is synchronizing for the parallel two-tape product dfa_parallel_prod A₁ A₂.

theorem dfa_parallel_prod_is_synchronizing_zip_padded {α₁ α₂ σ₁ σ₂ : Type*} (A₁ : DFA α₁ σ₁) (A₂ : DFA α₂ σ₂) (w₁ : List α₁) (w₂ : List α₂) (hw₁ : dfa_is_synchronizing A₁ w₁) (hw₂ : dfa_is_synchronizing A₂ w₂) (hle : w₂.length ≤ w₁.length) (a₂ : α₂) : dfa_is_synchronizing (dfa_parallel_prod A₁ A₂) (w₁.zip (List.replicate (w₁.length - w₂.length) a₂ ++ w₂))
dfa_parallel_prod_reset_thresholdIn LeanAutomata & Formal Languages

For any two deterministic finite automata A₁ : DFA α₁ σ₁ and A₂ : DFA α₂ σ₂ over nonempty alphabets, the reset threshold of their parallel two-tape product dfa_parallel_prod A₁ A₂ equals the maximum of the reset thresholds of A₁ and A₂: dfa_reset_threshold (dfa_parallel_prod A₁ A₂) = max (dfa_reset_threshold A₁) (dfa_reset_threshold A₂).

theorem dfa_parallel_prod_reset_threshold {α₁ α₂ σ₁ σ₂ : Type*} [Nonempty α₁] [Nonempty α₂] (A₁ : DFA α₁ σ₁) (A₂ : DFA α₂ σ₂) : dfa_reset_threshold (dfa_parallel_prod A₁ A₂) = max (dfa_reset_threshold A₁) (dfa_reset_threshold A₂)
dfa_reset_threshold_eq_of_exists_and_leIn LeanAutomata & Formal Languages

For any deterministic finite automaton A and natural number k, if there exists a synchronizing word of length k and all synchronizing words have length at least k, then the reset threshold of A is k.

theorem dfa_reset_threshold_eq_of_exists_and_le {α σ : Type*} (A : DFA α σ) (k : ℕ)
    (hex : ∃ w : List α, dfa_is_synchronizing A w ∧ w.length = k)
    (hle : ∀ w : List α, dfa_is_synchronizing A w → k ≤ w.length) :
    dfa_reset_threshold A = (k : WithTop ℕ)
dfa_simultaneous_reset_threshold_eq_iff_forall_length_leIn LeanAutomata & Formal Languages

A simultaneously synchronizing word w is optimal (its length equals the simultaneous reset threshold) if and only if every simultaneously synchronizing word is at least as long.

theorem dfa_simultaneous_reset_threshold_eq_iff_forall_length_le {α : Type*}
    {k : ℕ} {σ : Fin k → Type*} (A : (i : Fin k) → DFA α (σ i)) (w : List α)
    (h : dfa_is_simultaneously_synchronizing A w) :
    ((w.length : WithTop ℕ) = dfa_simultaneous_reset_threshold A) ↔
      ∀ v : List α, dfa_is_simultaneously_synchronizing A v → w.length ≤ v.length
dfa_simultaneous_reset_threshold_le_of_simultaneously_synchronizingIn LeanAutomata & Formal Languages

The simultaneous reset threshold of A is at most the length of any simultaneously synchronizing word.

theorem dfa_simultaneous_reset_threshold_le_of_simultaneously_synchronizing {α : Type*}
    {k : ℕ} {σ : Fin k → Type*} (A : (i : Fin k) → DFA α (σ i)) (w : List α)
    (h : dfa_is_simultaneously_synchronizing A w) :
    dfa_simultaneous_reset_threshold A ≤ (w.length : WithTop ℕ)
dfa_state_complexity_attainedIn LeanAutomata & Formal Languages

For every regular language L there is a DFA whose number of states is exactly dfa_state_complexity L and which recognizes L.

theorem dfa_state_complexity_attained {α : Type*} (L : Language α) (hL : L.IsRegular) : ∃ (σ : Type) (x : Fintype σ) (M : DFA α σ), @Fintype.card σ x = dfa_state_complexity L ∧ M.accepts = L
dfa_state_complexity_eq_nat_card_left_quotientIn LeanAutomata & Formal Languages

For a regular language L, the deterministic state complexity of L equals the number of distinct left quotients of L.

theorem dfa_state_complexity_eq_nat_card_left_quotient {α : Type*} {L : Language α}
    (hL : L.IsRegular) : dfa_state_complexity L = Nat.card (Set.range L.leftQuotient)
dfa_state_complexity_le_of_acceptsIn LeanAutomata & Formal Languages

If a DFA M on state set σ in Type recognizes language L, then the deterministic state complexity of L is at most the cardinality of σ.

theorem dfa_state_complexity_le_of_accepts {α : Type*} (L : Language α) (σ : Type) [Fintype σ] (M : DFA α σ) (hM : M.accepts = L) : dfa_state_complexity L ≤ Fintype.card σ
dfa_state_complexity_le_of_dfaIn LeanAutomata & Formal Languages

If a DFA M with finite state type σ accepts exactly the language L, then the deterministic state complexity of L is at most the number of states of M.

theorem dfa_state_complexity_le_of_dfa {α : Type*} {L : Language α} {σ : Type} [Fintype σ]
    (M : DFA α σ) (hM : M.accepts = L) : dfa_state_complexity L ≤ Fintype.card σ
dfa_subset_reset_threshold_eq_iff_forall_length_leIn LeanAutomata & Formal Languages

A subset-synchronizing word w for S in A is optimal (its length equals the subset reset threshold) if and only if every subset-synchronizing word for S is at least as long.

theorem dfa_subset_reset_threshold_eq_iff_forall_length_le {α σ : Type*}
    (A : DFA α σ) (S : Set σ) (w : List α)
    (h : dfa_is_subset_synchronizing A S w) :
    ((w.length : WithTop ℕ) = dfa_subset_reset_threshold A S) ↔
      ∀ v : List α, dfa_is_subset_synchronizing A S v → w.length ≤ v.length
dfa_subset_reset_threshold_le_of_subset_synchronizingIn LeanAutomata & Formal Languages

The subset reset threshold of S in A is at most the length of any word that subset-synchronizes S.

theorem dfa_subset_reset_threshold_le_of_subset_synchronizing {α σ : Type*}
    (A : DFA α σ) (S : Set σ) (w : List α)
    (h : dfa_is_subset_synchronizing A S w) :
    dfa_subset_reset_threshold A S ≤ (w.length : WithTop ℕ)
dfa_to_bipartite_cactus_nfa_poly_sizeIn LeanAutomata & Formal Languages

There are constants C and D such that every DFA with n states has an equivalent bipartite cactus NFA with at most C·n^D + C states.

theorem dfa_to_bipartite_cactus_nfa_poly_size : ∃ (C D : ℕ), ∀ (α : Type) [Fintype α] (σ : Type) (x : Fintype σ) (M : DFA α σ), ∃ (τ : Type) (y : Fintype τ) (A : NFA α τ), A.accepts = M.accepts ∧ is_bipartite_cactus_nfa A ∧ @Fintype.card τ y ≤ C * (@Fintype.card σ x) ^ D + C
dfa_to_bipartite_cactus_nfa_poly_size_implies_targetIn LeanAutomata & Formal Languages

If there are constants C and D such that every DFA on n states has an equivalent bipartite cactus NFA on at most C·n^D + C states, then the minimum number of states of a bipartite cactus NFA for a regular language L is at most C·(dfa_state_complexity L)^D + C.

theorem dfa_to_bipartite_cactus_nfa_poly_size_implies_target (h : ∃ (C D : ℕ), ∀ (α : Type) [Fintype α] (σ : Type) (x : Fintype σ) (M : DFA α σ), ∃ (τ : Type) (y : Fintype τ) (A : NFA α τ), A.accepts = M.accepts ∧ is_bipartite_cactus_nfa A ∧ @Fintype.card τ y ≤ C * (@Fintype.card σ x) ^ D + C) : ∃ (c d : ℕ), ∀ (α : Type) [Fintype α] (L : Language α), L.IsRegular → min_bipartite_cactus_nfa_states L ≤ c * (dfa_state_complexity L) ^ d + c
dfa_to_nfa_acceptsIn LeanAutomata & Formal Languages

The NFA obtained from a DFA by replacing each deterministic step δ(q,a) with the singleton set {δ(q,a)} accepts exactly the same language as the DFA.

theorem dfa_to_nfa_accepts {α : Type*} {σ : Type} (M : DFA α σ) : (DFA.toNFA M).accepts = M.accepts
diag_two_counter_boundary_update_reach_nonemptyIn LeanAutomata & Formal Languages

The diagonal symmetric 2-counter machine (a single update (1,1) from false to true) has an update-only run from the boundary configuration (false, (0,0)) to the boundary configuration (true, (1,1)).

theorem diag_two_counter_boundary_update_reach_nonempty : two_counter_machine_boundary ((false : Bool), (0, 0)) ∧ Relation.ReflTransGen (two_counter_machine_update_step (⟨{(false, TwoCounterInstr.update 1 1, true)}⟩ : TwoCounterMachine Bool)) (false, ((0, 0) : ℕ × ℕ)) (true, ((1, 1) : ℕ × ℕ))
has_strongly_cactus_nfa_atomicIn LeanAutomata & Formal Languages

The empty language has a strongly cactus automaton of either parity, the language {[]} one of parity 0, and {[a]} one of parity 1 for every letter a.

theorem has_strongly_cactus_nfa_atomic {α : Type*} :
    (∀ p : ZMod 2, has_strongly_cactus_nfa (0 : Language α) p) ∧
    has_strongly_cactus_nfa (1 : Language α) 0 ∧
    (∀ a : α, has_strongly_cactus_nfa ({([a] : List α)} : Language α) 1)
has_strongly_cactus_nfa_kstarIn LeanAutomata & Formal Languages

If L has a strongly cactus automaton of parity 0, then L* has a strongly cactus automaton of parity 0.

theorem has_strongly_cactus_nfa_kstar {α : Type*} {L : Language α}
    (h : has_strongly_cactus_nfa L 0) : has_strongly_cactus_nfa (KStar.kstar L) 0
has_strongly_cactus_nfa_mulIn LeanAutomata & Formal Languages

If L₁ has a strongly cactus automaton of parity p and L₂ one of parity q, then the concatenation L₁L₂ has one of parity p+q.

theorem has_strongly_cactus_nfa_mul {α : Type*} {L₁ L₂ : Language α} {p q : ZMod 2}
    (h₁ : has_strongly_cactus_nfa L₁ p) (h₂ : has_strongly_cactus_nfa L₂ q) :
    has_strongly_cactus_nfa (L₁ * L₂) (p + q)
has_strongly_cactus_nfa_unionIn LeanAutomata & Formal Languages

If L₁ and L₂ both have strongly cactus automata of the same parity p, then L₁ ∪ L₂ has one of parity p.

theorem has_strongly_cactus_nfa_union {α : Type*} {L₁ L₂ : Language α} {p : ZMod 2}
    (h₁ : has_strongly_cactus_nfa L₁ p) (h₂ : has_strongly_cactus_nfa L₂ p) :
    has_strongly_cactus_nfa (L₁ + L₂) p
isSemilinearSet_boundary_configurationsIn LeanAutomata & Formal Languages

The set of pairs (u, v) of counter vectors such that at least one coordinate of u is zero and at least one coordinate of v is zero is a semilinear subset of (ℕ × ℕ) × (ℕ × ℕ).

theorem isSemilinearSet_boundary_configurations : IsSemilinearSet { p : (ℕ × ℕ) × (ℕ × ℕ) | (p.1.1 = 0 ∨ p.1.2 = 0) ∧ (p.2.1 = 0 ∨ p.2.2 = 0) }
is_regular_iff_exists_regular_expressionIn LeanAutomata & Formal Languages

A language L over α is regular if and only if there is a regular expression r with L(r) = L.

theorem is_regular_iff_exists_regular_expression {α : Type*} (L : Language α) :
    L.IsRegular ↔ ∃ r : RegularExpression α, r.matches' = L
list_isSuffix_of_isSuffix_of_length_leIn LeanAutomata & Formal Languages

If r and s are both suffixes of u and r is no longer than s, then r is a suffix of s.

theorem list_isSuffix_of_isSuffix_of_length_le {α : Type*} {r s u : List α}
    (hu : r <:+ u) (hs : s <:+ u) (h : r.length ≤ s.length) : r <:+ s
list_longest_suffix_mem_specIn LeanAutomata & Formal Languages

list_longest_suffix_mem B h0 u lies in B, is a suffix of u, and is at least as long as every member of B that is a suffix of u.

theorem list_longest_suffix_mem_spec {α : Type*} [DecidableEq α]
    (B : Finset (List α)) (h0 : ([] : List α) ∈ B) (u : List α) :
    list_longest_suffix_mem B h0 u ∈ B ∧ list_longest_suffix_mem B h0 u <:+ u ∧
      ∀ t : List α, t ∈ B → t <:+ u → t.length ≤ (list_longest_suffix_mem B h0 u).length
list_longest_suffix_mem_uniqueIn LeanAutomata & Formal Languages

The longest member of B that is a suffix of u is unique: any t ∈ B that is a suffix of u and has that length equals it.

theorem list_longest_suffix_mem_unique {α : Type*} [DecidableEq α] (B : Finset (List α))
    (h0 : ([] : List α) ∈ B) (u t : List α) (ht : t ∈ B) (htu : t <:+ u)
    (hlen : t.length = (list_longest_suffix_mem B h0 u).length) :
    t = list_longest_suffix_mem B h0 u
min_bipartite_cactus_nfa_states_le_of_bipartite_cactus_dfaIn LeanAutomata & Formal Languages

If the symmetrised transition graph of a DFA M with n states is a bipartite cactus, then min_bipartite_cactus_nfa_states of the language of M is at most n.

theorem min_bipartite_cactus_nfa_states_le_of_bipartite_cactus_dfa {α : Type*} {σ : Type} [Fintype σ] (M : DFA α σ) (hg : simple_graph_is_cactus (SimpleGraph.fromRel (fun u v => ∃ a, M.step u a = v))) (hcol : (SimpleGraph.fromRel (fun u v => ∃ a, M.step u a = v)).Colorable 2) : min_bipartite_cactus_nfa_states M.accepts ≤ Fintype.card σ
min_bipartite_cactus_nfa_states_le_of_nfaIn LeanAutomata & Formal Languages

If an epsilon-free NFA A with finite state type τ of cardinality k recognizes L and its transition graph is a bipartite cactus, then min_bipartite_cactus_nfa_states L ≤ k.

theorem min_bipartite_cactus_nfa_states_le_of_nfa {α : Type*} {L : Language α} {τ : Type} (x : Fintype τ) (A : NFA α τ) (h : A.accepts = L) (hc : is_bipartite_cactus_nfa A) : min_bipartite_cactus_nfa_states L ≤ @Fintype.card τ x
min_bipartite_cactus_nfa_states_univ_le_oneIn LeanAutomata & Formal Languages

The language of all words over α is recognized by a bipartite cactus NFA with one state, so min_bipartite_cactus_nfa_states ⊤ ≤ 1.

theorem min_bipartite_cactus_nfa_states_univ_le_one (α : Type*) : min_bipartite_cactus_nfa_states (⊤ : Language α) ≤ 1
nat_card_range_left_quotient_ge_of_pairwiseIn LeanAutomata & Formal Languages

If k words have pairwise distinct left quotients with respect to a regular language L, then L has at least k left quotients.

theorem nat_card_range_left_quotient_ge_of_pairwise {α : Type*} {L : Language α} (hL : L.IsRegular)
    (k : ℕ) (f : Fin k → List α) (h : ∀ i j, i ≠ j → L.leftQuotient (f i) ≠ L.leftQuotient (f j)) :
    k ≤ Nat.card (Set.range L.leftQuotient)
nfa_accepting_run_encard_le_of_wordIn LeanAutomata & Formal Languages

For every natural number n ≥ 3, every trim finitely ambiguous binary NFA M with n states, singleton strongly connected components, one initial state s and one distinct accepting state t, and every word w, the number of accepting runs of M on w is at most (n+2)·2^(n−3).

theorem nfa_accepting_run_encard_le_of_word (n : ℕ) (hn : 3 ≤ n) {σ : Type*} [Fintype σ]
    [DecidableEq σ] (hcard : Fintype.card σ = n) (M : NFA (Fin 2) σ)
    (htrim : nfa_is_trim M) (hscc : nfa_has_singleton_sccs M)
    (hfin : nfa_is_finitely_ambiguous M) {s t : σ} (hst : s ≠ t)
    (hstart : M.start = {s}) (haccept : M.accept = {t}) (w : List (Fin 2)) :
    {r : Fin (w.length + 1) → σ |
        r 0 ∈ M.start ∧ r (Fin.last w.length) ∈ M.accept ∧
        ∀ i : Fin w.length, r i.succ ∈ M.step (r i.castSucc) (w.get i)}.encard
      ≤ ((n + 2) * 2 ^ (n - 3) : ℕ∞)
nfa_eval_parity_of_color_flipIn LeanAutomata & Formal Languages

If a colouring of the states of an NFA flips along every transition, then the colour of any state reachable from a set S after reading a word w differs from the colour of some state of S by the length of w modulo 2. Equivalently: every accepted word of a bipartite cactus NFA has a well-defined parity, determined by the colours of the initial and accepting states.

theorem nfa_eval_parity_of_color_flip {α : Type*} {σ : Type} (A : NFA α σ) (χ : σ → ZMod 2) (hχ : ∀ (q : σ) (a : α) (r : σ), r ∈ A.step q a → χ r = χ q + 1) : ∀ (S : Set σ) (w : List α) (q : σ), q ∈ A.evalFrom S w → ∃ p ∈ S, χ q = χ p + (w.length : ZMod 2)
nfa_max_ambiguity_asymptotic_upper_boundIn LeanAutomata & Formal Languages

Sharp asymptotic upper bound: for every ε > 0 and all sufficiently large n, the maximum degree of ambiguity M(n) of trim finitely ambiguous n-state NFAs is at most (1 + √2 + ε)^n.

theorem nfa_max_ambiguity_asymptotic_upper_bound :
    ∀ ε : ℝ, 0 < ε → ∀ᶠ n : ℕ in Filter.atTop,
      ENNReal.toReal (nfa_max_ambiguity n) ≤ (1 + Real.sqrt 2 + ε) ^ n
nfa_max_ambiguity_limit_of_eventual_boundsIn LeanAutomata & Formal Languages

Reduction of the asymptotic base constant to two one-sided bounds: if M(n) dominates twice the (n-2)-nd Pell number eventually, and if for every ε > 0 one has M(n) ≤ (1+√2+ε)^n eventually, then M(n)^(1/n) → 1+√2.

theorem nfa_max_ambiguity_limit_of_eventual_bounds
    (hlower : ∀ᶠ n : ℕ in Filter.atTop,
      (2 * (pell_number (n - 2) : ℝ)) ≤ ENNReal.toReal (nfa_max_ambiguity n))
    (hupper : ∀ ε : ℝ, 0 < ε → ∀ᶠ n : ℕ in Filter.atTop,
      ENNReal.toReal (nfa_max_ambiguity n) ≤ (1 + Real.sqrt 2 + ε) ^ n) :
    Filter.Tendsto (fun n : ℕ => (ENNReal.toReal (nfa_max_ambiguity n)) ^ ((1 : ℝ) / (n : ℝ)))
      Filter.atTop (nhds (1 + Real.sqrt 2))
nfa_max_ambiguity_pell_lower_boundIn LeanAutomata & Formal Languages

Pell lower bound for the maximum ambiguity: for all sufficiently large n, twice the (n-2)-nd Pell number is at most the maximum degree of ambiguity M(n) of trim finitely ambiguous n-state NFAs.

theorem nfa_max_ambiguity_pell_lower_bound :
    ∀ᶠ n : ℕ in Filter.atTop,
      (2 * (pell_number (n - 2) : ℝ)) ≤ ENNReal.toReal (nfa_max_ambiguity n)
nfa_no_ida_of_trim_finitely_ambiguousIn LeanAutomata & Formal Languages

A trim NFA that is finitely ambiguous does not comply with IDA. If there were distinct states p, q and a word v with p reached from p, q from p, and q from q by v, then any word α·v^k·β — where α leads from an initial state to p and β leads from q to an accepting state, which trim provides — has at least k distinct accepting runs, one for each choice of the copy of v that performs the switch p → q, contradicting a uniform bound on the number of accepting runs.

theorem nfa_no_ida_of_trim_finitely_ambiguous {α σ : Type*} (M : NFA α σ)
    (htrim : nfa_is_trim M) (hfin : nfa_is_finitely_ambiguous M) :
    ¬ nfa_complies_ida M
nfa_no_ida_run_count_image_le_cardIn LeanAutomata & Formal Languages

Let M be a binary NFA with singleton strongly connected components that does not comply with IDA. Fix a word w and a set C of states which is a chain for reachability and contains s and t. Then at most |C| runs of M on w go from s to t while visiting exactly the states of C. This is tight: in the extremal automaton every chain C has exactly |C| such runs.

theorem nfa_no_ida_run_count_image_le_card
    {σ : Type*} [Fintype σ] (M : NFA (Fin 2) σ)
    (hscc : nfa_has_singleton_sccs M) (hida : ¬ nfa_complies_ida M)
    {s t : σ} {C : Finset σ} (hsC : s ∈ C) (htC : t ∈ C)
    (hchain : ∀ p ∈ C, ∀ q ∈ C, p ≠ q →
      (∃ w : List (Fin 2), q ∈ M.evalFrom {p} w) ∨ (∃ w : List (Fin 2), p ∈ M.evalFrom {q} w))
    (w : List (Fin 2)) :
    {r : Fin (w.length + 1) → σ |
        r 0 = s ∧ r (Fin.last w.length) = t ∧
        (∀ i : Fin w.length, r i.succ ∈ M.step (r i.castSucc) (w.get i)) ∧
        Set.range r = (C : Set σ)}.ncard ≤ C.card
nfa_no_ida_single_letterIn LeanAutomata & Formal Languages

If an NFA does not comply with IDA, then no single letter can simultaneously loop at a state p, move p to a different state q, and loop at q: for p ≠ q with p in step p c and q in step p c, we have q not in step q c.

theorem nfa_no_ida_single_letter {σ : Type*} (M : NFA (Fin 2) σ)
    (hida : ¬ nfa_complies_ida M) {p q : σ} (hpq : p ≠ q) {c : Fin 2}
    (hloop : p ∈ M.step p c) (hstep : q ∈ M.step p c) :
    q ∉ M.step q c
nfa_run_count_list_appendIn LeanAutomata & Formal Languages

The number of runs of a concatenated word u ++ v from state p to state q in an NFA M equals the convolution sum over all intermediate states s of the runs of u from p to s times the runs of v from s to q.

open Classical in
theorem nfa_run_count_list_append {α σ : Type*} [Fintype σ] (M : NFA α σ)
    (u v : List α) (p q : σ) :
    nfa_run_count_list M (u ++ v) p q =
      ∑ s : σ, nfa_run_count_list M u p s * nfa_run_count_list M v s q
nfa_run_image_is_chainIn LeanAutomata & Formal Languages

In an NFA with singleton strongly connected components, the set of states visited by a single run is a chain for reachability: any two distinct states of the image of a run are comparable by reachability.

theorem nfa_run_image_is_chain {σ : Type*} (M : NFA (Fin 2) σ)
    (hscc : nfa_has_singleton_sccs M) {w : List (Fin 2)} {r : Fin (w.length + 1) → σ}
    (hr : ∀ i : Fin w.length, r i.succ ∈ M.step (r i.castSucc) (w.get i))
    {C : Finset σ} (hC : Set.range r = (C : Set σ)) :
    ∀ p ∈ C, ∀ q ∈ C, p ≠ q →
      (∃ u : List (Fin 2), q ∈ M.evalFrom {p} u) ∨
        (∃ u : List (Fin 2), p ∈ M.evalFrom {q} u)
nfa_run_segment_mem_evalFromIn LeanAutomata & Formal Languages

Any segment of a run of an NFA witnesses reachability: if a state sequence r follows the transitions of a word w and i ≤ j, then r j is reached from r i by the subword of w between positions i and j.

theorem nfa_run_segment_mem_evalFrom {α σ : Type*} (M : NFA α σ) {w : List α}
    {r : Fin (w.length + 1) → σ}
    (hr : ∀ i : Fin w.length, r i.succ ∈ M.step (r i.castSucc) (w.get i))
    {i j : Fin (w.length + 1)} (hij : i ≤ j) :
    r j ∈ M.evalFrom {r i} ((w.drop i.val).take (j.val - i.val))
nfa_run_visit_times_convexIn LeanAutomata & Formal Languages

In an NFA with singleton strongly connected components, the set of times at which a run visits a given state is convex: if r i = r j = p and i ≤ k ≤ j, then r k = p. Consequently a run never returns to a state after leaving it except through self-loops inside one contiguous block, so every run decomposes into p_1^{e_1} … p_h^{e_h} with all p_i distinct.

theorem nfa_run_visit_times_convex {α σ : Type*} (M : NFA α σ)
    (hscc : nfa_has_singleton_sccs M) {w : List α} {r : Fin (w.length + 1) → σ}
    (hr : ∀ i : Fin w.length, r i.succ ∈ M.step (r i.castSucc) (w.get i))
    {p : σ} {i j : Fin (w.length + 1)} (hi : r i = p) (hj : r j = p) :
    ∀ k : Fin (w.length + 1), i ≤ k → k ≤ j → r k = p
nfa_transition_graph_dfa_to_nfaIn LeanAutomata & Formal Languages

The undirected transition graph of the NFA associated with a DFA is the symmetrised graph on the DFA states joining u and v whenever some input letter maps u to v.

theorem nfa_transition_graph_dfa_to_nfa {α : Type*} {σ : Type} (M : DFA α σ) : nfa_transition_graph (DFA.toNFA M) = SimpleGraph.fromRel (fun u v => ∃ a, M.step u a = v)
op1716_exists_family_exact_lengthsIn LeanAutomata & Formal Languages

For any natural numbers k ≥ 2 and L ≥ k + 5, there exists a family of k finite-state synchronizable DFAs over Bool, a sequential subset synchronization choice ws where every stage has a unique shortest choice, and an optimal simultaneously synchronizing word w_opt of length L + 1 whose length equals the simultaneous reset threshold, such that the sum of stage choice lengths is exactly k * L - (k - 1).

theorem op1716_exists_family_exact_lengths :
    ∀ (k : ℕ) (hk : 2 ≤ k) (L : ℕ) (hL : k + 5 ≤ L),
      ∃ (σ : Fin k → Type) (_ : ∀ i, Fintype (σ i)) (A : (i : Fin k) → DFA Bool (σ i)),
        (∀ i, dfa_is_synchronizable (A i)) ∧
        ∃ (ws : Fin k → List Bool),
          dfa_is_seq_subset_sync_choice A ws ∧
          (∀ i, dfa_stage_has_unique_shortest_choice A ws i) ∧
          ∃ (w_opt : List Bool),
            dfa_is_simultaneously_synchronizing A w_opt ∧
            (w_opt.length : WithTop ℕ) = dfa_simultaneous_reset_threshold A ∧
            w_opt.length = L + 1 ∧
            (∑ i : Fin k, (ws i).length) = k * L - (k - 1)
op1716_length_arithmeticIn LeanAutomata & Formal Languages

For every k ≥ 2 and ε > 0 there is L ≥ k+5 with (k - ε)(L+1) ≤ kL - (k-1).

theorem op1716_length_arithmetic (k : ℕ) (hk : 2 ≤ k) (ε : ℝ) (hε : 0 < ε) :
    ∃ L : ℕ, k + 5 ≤ L ∧ ((k : ℝ) - ε) * ((L : ℝ) + 1) ≤ ((k * L - (k - 1) : ℕ) : ℝ)
op_1667_opposite_cerny_direct_product_exists_sync_wordIn LeanAutomata & Formal Languages

For every integer n ≥ 2, there exists a binary word of length 2(n-1)(n-2) + 2 that synchronizes the direct product of the Černý automaton C_n and its letter-swapped counterpart C_n^swap.

theorem op_1667_opposite_cerny_direct_product_exists_sync_word (n : ℕ) (hn : 2 ≤ n) :
    ∃ w : List Bool, dfa_is_synchronizing (dfa_prod (cerny_dfa n) (cerny_swap_dfa n)) w ∧
      w.length = 2 * (n - 1) * (n - 2) + 2
op_1667_opposite_cerny_direct_product_exists_sync_word_ge_fourIn LeanAutomata & Formal Languages

For every integer n ≥ 4, there exists a binary word of length 2(n-1)(n-2) + 2 that synchronizes the direct product of the Černý automaton C_n and its letter-swapped counterpart C_n^swap.

theorem op_1667_opposite_cerny_direct_product_exists_sync_word_ge_four (n : ℕ) (hn : 4 ≤ n) :
    ∃ w : List Bool, dfa_is_synchronizing (dfa_prod (cerny_dfa n) (cerny_swap_dfa n)) w ∧
      w.length = 2 * (n - 1) * (n - 2) + 2
op_1667_opposite_cerny_direct_product_sync_word_length_geIn LeanAutomata & Formal Languages

For every integer n ≥ 2, every binary word synchronizing the direct product of C_n and C_n^swap has length at least 2(n-1)(n-2) + 2.

theorem op_1667_opposite_cerny_direct_product_sync_word_length_ge (n : ℕ) (hn : 2 ≤ n)
    (w : List Bool) (hw : dfa_is_synchronizing (dfa_prod (cerny_dfa n) (cerny_swap_dfa n)) w) :
    2 * (n - 1) * (n - 2) + 2 ≤ w.length
op_1667_opposite_cerny_product_three_is_synchronizingIn LeanAutomata & Formal Languages

The binary word [false, true, true, false, false, true] of length 6 synchronizes the direct product of the 3-state Černý automaton and its letter-swapped counterpart.

theorem op_1667_opposite_cerny_product_three_is_synchronizing :
    dfa_is_synchronizing (dfa_prod (cerny_dfa 3) (cerny_swap_dfa 3))
      [false, true, true, false, false, true]
op_1670_opposite_cerny_product_exists_sync_wordIn LeanAutomata & Formal Languages

For all natural numbers n and m with 2 ≤ n and n ≤ m, there exists a binary word of length (m - 1)^2 + max (n - 2) ((n - 1) * (n - 2) + 3 - m) that synchronizes the direct product of the Černý automaton C_n and the letter-swapped Černý automaton C_m^swap.

theorem op_1670_opposite_cerny_product_exists_sync_word
    (n m : ℕ) (hn : 2 ≤ n) (hmn : n ≤ m) :
    ∃ w : List Bool, dfa_is_synchronizing (dfa_prod (cerny_dfa n) (cerny_swap_dfa m)) w ∧
      w.length = (m - 1) ^ 2 + max (n - 2) ((n - 1) * (n - 2) + 3 - m)
op_1670_opposite_cerny_product_large_factor_exists_sync_wordIn LeanAutomata & Formal Languages

For any natural numbers n and m with 2 ≤ n ≤ m and n^2 - 4*n + 7 ≤ m, there exists a binary word of length (m - 1)^2 + (n - 2) that synchronizes the direct product of the Černý automaton C_n and the swapped Černý automaton C_m^swap.

theorem op_1670_opposite_cerny_product_large_factor_exists_sync_word
    (n m : ℕ) (hn : 2 ≤ n) (hmn : n ≤ m) (hm : n ^ 2 - 4 * n + 7 ≤ m) :
    ∃ w : List Bool, dfa_is_synchronizing (dfa_prod (cerny_dfa n) (cerny_swap_dfa m)) w ∧
      w.length = (m - 1) ^ 2 + (n - 2)
op_1670_opposite_cerny_product_large_factor_sync_word_length_geIn LeanAutomata & Formal Languages

For any natural numbers n and m with 2 ≤ n ≤ m and n^2 - 4*n + 7 ≤ m, every binary word synchronizing the direct product of C_n and C_m^swap has length at least (m - 1)^2 + (n - 2).

theorem op_1670_opposite_cerny_product_large_factor_sync_word_length_ge
    (n m : ℕ) (hn : 2 ≤ n) (hmn : n ≤ m) (hm : n ^ 2 - 4 * n + 7 ≤ m)
    (w : List Bool) (hw : dfa_is_synchronizing (dfa_prod (cerny_dfa n) (cerny_swap_dfa m)) w) :
    (m - 1) ^ 2 + (n - 2) ≤ w.length
op_1670_opposite_cerny_product_sync_word_length_geIn LeanAutomata & Formal Languages

For all natural numbers n and m with 2 ≤ n and n ≤ m, every binary word synchronizing the direct product of C_n and C_m^swap has length at least (m - 1)^2 + max (n - 2) ((n - 1) * (n - 2) + 3 - m).

theorem op_1670_opposite_cerny_product_sync_word_length_ge
    (n m : ℕ) (hn : 2 ≤ n) (hmn : n ≤ m)
    (w : List Bool) (hw : dfa_is_synchronizing (dfa_prod (cerny_dfa n) (cerny_swap_dfa m)) w) :
    (m - 1) ^ 2 + max (n - 2) ((n - 1) * (n - 2) + 3 - m) ≤ w.length
parity_typed_regular_expression_has_strongly_cactus_nfaIn LeanAutomata & Formal Languages

Every regular expression typed with parity p is matched by a language that has a strongly cactus automaton of parity p.

theorem parity_typed_regular_expression_has_strongly_cactus_nfa {α : Type*} (r : RegularExpression α)
    (p : ZMod 2) (hr : regular_expression_typed_parity r p) : has_strongly_cactus_nfa r.matches' p
pell_nfa_ambiguity_lower_boundIn LeanAutomata & Formal Languages

For every natural number n ≥ 3, there exists an NFA M with alphabet Fin 5 and states Fin n, and a word u : List (Fin 5), such that M is trim, M does not comply with IDA, M has singleton strongly connected components, and the number of accepting runs of M on u (measured by Set.encard) is at least 2 * pell_number (n - 2).

theorem pell_nfa_ambiguity_lower_bound (n : ℕ) (hn : 3 ≤ n) :
    ∃ (M : NFA (Fin 5) (Fin n)) (u : List (Fin 5)),
      nfa_is_trim M ∧
      ¬ nfa_complies_ida M ∧
      nfa_has_singleton_sccs M ∧
      ((2 * pell_number (n - 2) : ℕ) : ℕ∞) ≤
        Set.encard {r : Fin (u.length + 1) → Fin n |
          r 0 ∈ M.start ∧
          r (Fin.last u.length) ∈ M.accept ∧
          ∀ i : Fin u.length, r i.succ ∈ M.step (r i.castSucc) (u.get i)}
pell_nfa_degree_lower_boundIn LeanAutomata & Formal Languages

The degree of ambiguity of the n-state Pell NFA pell_nfa n in ℕ∞ is at least 2 * pell_number (n - 2).

theorem pell_nfa_degree_lower_bound (n : ℕ) (hn : 3 ≤ n) : (2 * pell_number (n - 2) : ℕ∞) ≤ nfa_degree_of_ambiguity (pell_nfa n)
pell_nfa_run_count_lower_boundIn LeanAutomata & Formal Languages

In the n-state automaton A_n, the word u_n = c_1c_2c_2c_3…c_(n-2)c_(n-1) has at least 2·P(n-2) accepting runs from the initial state q_1 to the final state q_n.

theorem pell_nfa_run_count_lower_bound (n : ℕ) (hn : 3 ≤ n) :
    ((2 * pell_number (n - 2) : ℕ) : ℕ∞) ≤
      Set.encard {r : Fin ((pell_word n).length + 1) → Fin n |
        r 0 ∈ (pell_nfa n).start ∧
        r (Fin.last (pell_word n).length) ∈ (pell_nfa n).accept ∧
        ∀ i : Fin (pell_word n).length,
          r i.succ ∈ (pell_nfa n).step (r i.castSucc) ((pell_word n).get i)}
pell_prefix_block_stepIn LeanAutomata & Formal Languages

Appending one two-letter block to a prefix whose run counts vanish off q_i, q_(i+1) with x runs at q_i and y at q_(i+1) gives a vector vanishing off q_(i+1), q_(i+2) with x+y runs at q_(i+1) and 2x+y at q_(i+2).

open Classical in
theorem pell_prefix_block_step (n i : ℕ) (hn : 3 ≤ n) (h1 : 1 ≤ i) (hi : i + 1 ≤ n - 2)
    (hzero : ∀ s : Fin n, s.val ≠ i → s.val ≠ i + 1 → s.val ≠ i + 2 →
      nfa_run_count_list (pell_nfa n) (pell_word_prefix i) ⟨0, by omega⟩ s = 0)
    (hx : nfa_run_count_list (pell_nfa n) (pell_word_prefix i) ⟨0, by omega⟩
      ⟨i, by omega⟩ = pell_number (i + 1) - pell_number i)
    (hy : nfa_run_count_list (pell_nfa n) (pell_word_prefix i) ⟨0, by omega⟩
      ⟨i + 1, by omega⟩ = 2 * pell_number i) :
    (∀ s : Fin n, s.val ≠ i + 1 → s.val ≠ i + 2 → s.val ≠ i + 3 →
      nfa_run_count_list (pell_nfa n) (pell_word_prefix (i + 1)) ⟨0, by omega⟩ s = 0)
    ∧ nfa_run_count_list (pell_nfa n) (pell_word_prefix (i + 1)) ⟨0, by omega⟩
        ⟨i + 1, by omega⟩ = pell_number (i + 2) - pell_number (i + 1)
    ∧ nfa_run_count_list (pell_nfa n) (pell_word_prefix (i + 1)) ⟨0, by omega⟩
        ⟨i + 2, by omega⟩ = 2 * pell_number (i + 1)
pell_prefix_count_vectorIn LeanAutomata & Formal Languages

After i two-letter blocks the number of runs from q_1 vanishes off q_i, q_(i+1), q_(i+2), equals P(i+1)-P(i) at q_i and 2P(i) at q_(i+1).

open Classical in
theorem pell_prefix_count_vector (n i : ℕ) (hn : 3 ≤ n) (h1 : 1 ≤ i) (hi : i ≤ n - 2) :
    (∀ s : Fin n, s.val ≠ i → s.val ≠ i + 1 → s.val ≠ i + 2 →
      nfa_run_count_list (pell_nfa n) (pell_word_prefix i) ⟨0, by omega⟩ s = 0)
    ∧ nfa_run_count_list (pell_nfa n) (pell_word_prefix i) ⟨0, by omega⟩
        ⟨i, by omega⟩ = pell_number (i + 1) - pell_number i
    ∧ nfa_run_count_list (pell_nfa n) (pell_word_prefix i) ⟨0, by omega⟩
        ⟨i + 1, by omega⟩ = 2 * pell_number i
pell_prefix_two_letter_vectorIn LeanAutomata & Formal Languages

From the one-letter vector (x at q_i, y at q_(i+1), x+y at q_(i+2)), appending c_(i+2) yields the block-step conclusion: vanish off q_(i+1),q_(i+2),q_(i+3); P(i+2)-P(i+1) at q_(i+1); 2P(i+1) at q_(i+2).

open Classical in
theorem pell_prefix_two_letter_vector (n i : ℕ) (hn : 3 ≤ n) (h1 : 1 ≤ i) (hi : i + 1 ≤ n - 2)
    (hV1 : ∀ s : Fin n,
      nfa_run_count_list (pell_nfa n) (pell_word_prefix i ++ [⟨(i + 1) % 5, by omega⟩])
        ⟨0, by omega⟩ s
      = (if s.val = i then (pell_number (i + 1) - pell_number i) else 0)
        + (if s.val = i + 1 then (2 * pell_number i) else 0)
        + (if s.val = i + 2 then ((pell_number (i + 1) - pell_number i) + 2 * pell_number i) else 0)) :
    (∀ s : Fin n, s.val ≠ i + 1 → s.val ≠ i + 2 → s.val ≠ i + 3 →
      nfa_run_count_list (pell_nfa n) (pell_word_prefix (i + 1)) ⟨0, by omega⟩ s = 0)
    ∧ nfa_run_count_list (pell_nfa n) (pell_word_prefix (i + 1)) ⟨0, by omega⟩
        ⟨i + 1, by omega⟩ = pell_number (i + 2) - pell_number (i + 1)
    ∧ nfa_run_count_list (pell_nfa n) (pell_word_prefix (i + 1)) ⟨0, by omega⟩
        ⟨i + 2, by omega⟩ = 2 * pell_number (i + 1)
pell_runs_exact_countIn LeanAutomata & Formal Languages

The word u_n has exactly 2·P(n-2) runs from q_1 to q_n in A_n.

open Classical in
theorem pell_runs_exact_count (n : ℕ) (hn : 3 ≤ n) :
    nfa_run_count_list (pell_nfa n) (pell_word n) ⟨0, by omega⟩ ⟨n - 1, by omega⟩
      = 2 * pell_number (n - 2)
prioritized_borel_adam_to_dual_eveIn LeanAutomata & Formal Languages

An arbitrary-memory winning strategy for Adam in a three-priority game transfers, without changing its memory type, to a winning strategy for Eve in the dual game.

theorem prioritized_borel_adam_to_dual_eve {Q : Type} (G : PrioritizedBorelGame Q 3) {M : Type} (σ : FiniteMemoryStrategy G BorelGamePlayer.Adam M) (hwin : PrioritizedBorelStrategyWins G BorelGamePlayer.Adam σ) : ∃ τ : FiniteMemoryStrategy (prioritized_borel_dual_game G) BorelGamePlayer.Eve M, PrioritizedBorelStrategyWins (prioritized_borel_dual_game G) BorelGamePlayer.Eve τ
prioritized_borel_bounded_state_history_one_state_reductionIn LeanAutomata & Formal Languages

Consider a finite-state three-priority tree game. Suppose that for every tree node and current state, at most d distinct state sequences of legal finite plays reach that node and state; priority histories are not counted. If every one-state three-priority game has a winning strategy using at most b memory states, then the given game has a winning strategy using at most b times d memory states.

theorem prioritized_borel_bounded_state_history_one_state_reduction {Q : Type} [Fintype Q] (G : PrioritizedBorelGame Q 3) (d b : ℕ) (hfinite : ∀ (v : List Bool) (q : Q), Set.ncard {h : Fin (v.length + 1) → Q | h 0 = G.init_state ∧ h (Fin.last v.length) = q ∧ ∀ i : Fin v.length, ∃ e ∈ G.edges, e.source_node = v.take i.val ∧ e.source_state = h i.castSucc ∧ e.dir = v.get i ∧ e.target_state = h i.succ} ≤ d) (hone : ∀ H : PrioritizedBorelGame Unit 3, HasWinningStrategyInMem H b) : HasWinningStrategyInMem G (b * d)
prioritized_borel_branch_width_recodeIn LeanAutomata & Formal Languages

Fix a three-priority tree game, a node-dependent invariant R of its reachable states, and a node-dependent encoding of those states into Fin w that is injective on R. If every three-priority game with state type Fin w has a winning strategy with at most b memory states, then the original game also has a winning strategy with at most b memory states. The invariant must contain the initial state and be closed under every game edge from an invariant state.

theorem prioritized_borel_branch_width_recode {Q : Type} (G : PrioritizedBorelGame Q 3) (w b : ℕ) (R : List Bool → Q → Prop) (encode : List Bool → Q → Fin w) (hinit : R [] G.init_state) (hclosed : ∀ e ∈ G.edges, R e.source_node e.source_state → R (e.source_node ++ [e.dir]) e.target_state) (hinj : ∀ v q q', R v q → R v q' → encode v q = encode v q' → q = q') (hbound : ∀ H : PrioritizedBorelGame (Fin w) 3, HasWinningStrategyInMem H b) : HasWinningStrategyInMem G b
prioritized_borel_dual_eve_to_adamIn LeanAutomata & Formal Languages

An arbitrary-memory winning strategy for Eve in the dual game transfers, without changing its memory type, to a winning strategy for Adam in the original three-priority game.

theorem prioritized_borel_dual_eve_to_adam {Q : Type} (G : PrioritizedBorelGame Q 3) {M : Type} (τ : FiniteMemoryStrategy (prioritized_borel_dual_game G) BorelGamePlayer.Eve M) (hwin : PrioritizedBorelStrategyWins (prioritized_borel_dual_game G) BorelGamePlayer.Eve τ) : ∃ σ : FiniteMemoryStrategy G BorelGamePlayer.Adam M, PrioritizedBorelStrategyWins G BorelGamePlayer.Adam σ
prioritized_borel_game_witness_existsIn LeanAutomata & Formal Languages

There exists a prioritized Borel game G with state space Unit and 1 priority, and a winning strategy using at most 1 memory state (HasWinningStrategyInMem G 1).

theorem prioritized_borel_game_witness_exists : ∃ G : PrioritizedBorelGame Unit 1, HasWinningStrategyInMem G 1
prioritized_borel_reverse_deterministic_one_state_reductionIn LeanAutomata & Formal Languages

In a finite-state three-priority tree game, suppose that at each parent node and child direction, any two legal edges with the same target state also have the same source state. If every three-priority one-state game has a winning strategy with at most b memory states, then this game has a winning strategy with at most b memory states. Distinct priorities on otherwise identical edges remain allowed.

theorem prioritized_borel_reverse_deterministic_one_state_reduction {Q : Type} [Fintype Q] (G : PrioritizedBorelGame Q 3) (b : ℕ) (hback : ∀ e ∈ G.edges, ∀ e' ∈ G.edges, e.source_node = e'.source_node → e.dir = e'.dir → e.target_state = e'.target_state → e.source_state = e'.source_state) (hone : ∀ H : PrioritizedBorelGame Unit 3, HasWinningStrategyInMem H b) : HasWinningStrategyInMem G b
prioritized_borel_strategy_histories_finiteIn LeanAutomata & Formal Languages

For a finite state space, only finitely many encoded histories consistent with an arbitrary-memory strategy reach a fixed public node and state.

theorem prioritized_borel_strategy_histories_finite {Q : Type} [Fintype Q] {k : ℕ} (G : PrioritizedBorelGame Q k) (pl : BorelGamePlayer) {M : Type} (σ : FiniteMemoryStrategy G pl M) (v : List Bool) (q : Q) : Set.Finite {h : List (Bool × Q × Fin k) | ∃ m, PrioritizedBorelStrategyHistory G pl σ h m v q}
prioritized_borel_strategy_history_directionsIn LeanAutomata & Formal Languages

The directions recorded in a consistent encoded history are precisely its current public node.

theorem prioritized_borel_strategy_history_directions {Q : Type} {k : ℕ} {G : PrioritizedBorelGame Q k} {pl : BorelGamePlayer} {M : Type} {σ : FiniteMemoryStrategy G pl M} {h : List (Bool × Q × Fin k)} {m : M} {v : List Bool} {q : Q} (hh : PrioritizedBorelStrategyHistory G pl σ h m v q) : h.map Prod.fst = v
prioritized_borel_threshold_controller_guaranteesIn LeanAutomata & Formal Languages

Every infinite sequence of inputs between 1 and s admits a memory sequence taking values from 0 through s under the threshold update; resets occur infinitely often and the maximal recurrent input triggers an even action infinitely often.

theorem prioritized_borel_threshold_controller_guarantees
    (s : ℕ) (f : ℕ → ℕ) (hf : ∀ n, 1 ≤ f n ∧ f n ≤ s) :
    ∃ m : ℕ → ℕ,
      m 0 = 0 ∧ (∀ n, m n ≤ s) ∧
      (∀ n, m (n+1) = if m n < f n then f n else 0) ∧
      (∀ N, ∃ n ≥ N, f n ≤ m n) ∧
      (∀ I N0, 0 < I → (∀ n, N0 ≤ n → f n ≤ I) →
        (∀ N, ∃ n ≥ N, f n = I) →
        ∀ K, ∃ n ≥ K, f n = I ∧ m n < I)
prioritized_borel_two_priorities_two_memory_from_strategyIn LeanAutomata & Formal Languages

For every finite type Q, every two-priority prioritized Borel game G on Q, every player pl, every memory type M, and every strategy σ for pl with memory M, if σ wins then there exist a type M' equipped with a Fintype instance and cardinality at most two and a strategy τ for pl with memory M' that wins. The conclusion allows any such finite type M'; it does not require M' to be Fin 2.

theorem prioritized_borel_two_priorities_two_memory_from_strategy (Q : Type) [Fintype Q] (G : PrioritizedBorelGame Q 2) (pl : BorelGamePlayer) (M : Type) (σ : FiniteMemoryStrategy G pl M) (hwin : PrioritizedBorelStrategyWins G pl σ) : ∃ (M' : Type) (_ : Fintype M'), Fintype.card M' ≤ 2 ∧ ∃ τ : FiniteMemoryStrategy G pl M', PrioritizedBorelStrategyWins G pl τ
simple_graph_cactus_cycle_toSubgraph_eq_of_not_mem_edgeIn LeanAutomata & Formal Languages

Any two simple cycles in G ⊔ {{x, y}} that do not contain {x, y} and share an edge have equal subgraphs.

theorem simple_graph_cactus_cycle_toSubgraph_eq_of_not_mem_edge {V : Type*} {G : SimpleGraph V} {x y : V}
    (hG : simple_graph_is_cactus G)
    {u₁ u₂ : V}
    (c₁ : (G ⊔ SimpleGraph.fromEdgeSet {Sym2.mk x y}).Walk u₁ u₁)
    (c₂ : (G ⊔ SimpleGraph.fromEdgeSet {Sym2.mk x y}).Walk u₂ u₂)
    (hc₁ : c₁.IsCycle) (hc₂ : c₂.IsCycle)
    (h₁ : Sym2.mk x y ∉ c₁.edges) (h₂ : Sym2.mk x y ∉ c₂.edges)
    (he : ∃ e, e ∈ c₁.edges ∧ e ∈ c₂.edges) :
    c₁.toSubgraph = c₂.toSubgraph
simple_graph_cycle_not_share_edge_of_unique_path_mixedIn LeanAutomata & Formal Languages

In the graph obtained by adding {x, y} to G, a simple cycle containing {x, y} and a simple cycle not containing {x, y} cannot share any edge.

theorem simple_graph_cycle_not_share_edge_of_unique_path_mixed {V : Type*} {G : SimpleGraph V} {x y : V}
    (hxy : x ≠ y)
    (huniq : ∀ (w₁ w₂ : G.Walk x y), w₁.IsPath → w₂.IsPath → w₁.support = w₂.support)
    {u₁ u₂ : V}
    (c₁ : (G ⊔ SimpleGraph.fromEdgeSet {Sym2.mk x y}).Walk u₁ u₁)
    (c₂ : (G ⊔ SimpleGraph.fromEdgeSet {Sym2.mk x y}).Walk u₂ u₂)
    (hc₁ : c₁.IsCycle) (hc₂ : c₂.IsCycle)
    (h₁ : Sym2.mk x y ∈ c₁.edges) (h₂ : Sym2.mk x y ∉ c₂.edges) :
    ¬ ∃ e, e ∈ c₁.edges ∧ e ∈ c₂.edges
simple_graph_cycle_toSubgraph_eq_of_unique_path_and_mem_edgeIn LeanAutomata & Formal Languages

Any two simple cycles in G ⊔ {{x, y}} that both contain {x, y} have equal subgraphs under the unique simple path hypothesis.

theorem simple_graph_cycle_toSubgraph_eq_of_unique_path_and_mem_edge {V : Type*} {G : SimpleGraph V} {x y : V}
    (hxy : x ≠ y)
    (huniq : ∀ (w₁ w₂ : G.Walk x y), w₁.IsPath → w₂.IsPath → w₁.support = w₂.support)
    {u₁ u₂ : V}
    (c₁ : (G ⊔ SimpleGraph.fromEdgeSet {Sym2.mk x y}).Walk u₁ u₁)
    (c₂ : (G ⊔ SimpleGraph.fromEdgeSet {Sym2.mk x y}).Walk u₂ u₂)
    (hc₁ : c₁.IsCycle) (hc₂ : c₂.IsCycle)
    (h₁ : Sym2.mk x y ∈ c₁.edges) (h₂ : Sym2.mk x y ∈ c₂.edges) :
    c₁.toSubgraph = c₂.toSubgraph
simple_graph_is_cactus_sumIn LeanAutomata & Formal Languages

If G and H are cacti then their disjoint sum is a cactus.

theorem simple_graph_is_cactus_sum {V W : Type*} {G : SimpleGraph V} {H : SimpleGraph W}
    (hG : simple_graph_is_cactus G) (hH : simple_graph_is_cactus H) :
    simple_graph_is_cactus (SimpleGraph.sum G H)
simple_graph_is_cactus_sup_edge_of_unique_pathIn LeanAutomata & Formal Languages

If a simple graph G is a cactus and x ≠ y are the endpoints of a unique simple path in G, then the graph obtained by adding the edge {x,y} is again a cactus.

theorem simple_graph_is_cactus_sup_edge_of_unique_path {V : Type*} {G : SimpleGraph V} {x y : V}
    (hxy : x ≠ y) (hG : simple_graph_is_cactus G)
    (huniq : ∀ (w₁ w₂ : G.Walk x y), w₁.IsPath → w₂.IsPath → w₁.support = w₂.support) :
    simple_graph_is_cactus (G ⊔ SimpleGraph.fromEdgeSet {Sym2.mk x y})
strongly_cactus_nfa_is_bipartite_cactus_nfaIn LeanAutomata & Formal Languages

If A is a strongly cactus NFA of parity p with initial state s, then its transition graph is a cactus and 2-colourable, i.e. A is a bipartite cactus NFA.

theorem strongly_cactus_nfa_is_bipartite_cactus_nfa {α σ : Type*} {A : NFA α σ} {s : σ} {p : ZMod 2}
    (h : strongly_cactus_nfa A s p) : is_bipartite_cactus_nfa A
sum_card_subsets_containing_two_leIn LeanAutomata & Formal Languages

Let σ be a finite type with n = |σ| elements and let s ≠ t be two of them. Then the sum of |C| over all subsets C of σ containing both s and t is at most (n+2)·2^(n−3).

theorem sum_card_subsets_containing_two_le {σ : Type*} [Fintype σ] [DecidableEq σ]
    (s t : σ) (hst : s ≠ t) (n : ℕ) (hcard : Fintype.card σ = n) :
    (∑ C ∈ Finset.univ.filter (fun C : Finset σ => s ∈ C ∧ t ∈ C), C.card)
      ≤ (n + 2) * 2 ^ (n - 3)
sum_range_mul_choose_leIn LeanAutomata & Formal Languages

For every natural number n ≥ 3, the sum over k from 2 to n of k times the binomial coefficient (n−2 choose k−2) is at most (n+2)·2^(n−3); in fact the two sides are equal.

theorem sum_range_mul_choose_le (n : ℕ) (hn : 3 ≤ n) :
    (∑ k ∈ Finset.Icc 2 n, k * (n - 2).choose (k - 2)) ≤ (n + 2) * 2 ^ (n - 3)
symmetric_two_counter_boundary_reachability_semilinearIn LeanAutomata & Formal Languages

For every symmetric 2-counter machine M with finite state type Q and states q, q', the reachability relation restricted to source and target boundary configurations (where at least one counter is zero) is semilinear.

theorem symmetric_two_counter_boundary_reachability_semilinear {Q : Type*} [Finite Q] (M : TwoCounterMachine Q) (hM : two_counter_machine_is_symmetric M) (q q' : Q) : IsSemilinearSet { p : (ℕ × ℕ) × (ℕ × ℕ) | (p.1.1 = 0 ∨ p.1.2 = 0) ∧ (p.2.1 = 0 ∨ p.2.2 = 0) ∧ Relation.ReflTransGen (two_counter_machine_step M) (q, p.1) (q', p.2) }
symmetric_two_counter_boundary_update_reach_semilinearIn LeanAutomata & Formal Languages

For a symmetric 2-counter machine M, the update-only reachability relation from a boundary configuration to a boundary configuration is semilinear.

theorem symmetric_two_counter_boundary_update_reach_semilinear {Q : Type*} [Finite Q] (M : TwoCounterMachine Q) (hM : two_counter_machine_is_symmetric M) (q q' : Q) : IsSemilinearSet { p : (ℕ × ℕ) × (ℕ × ℕ) | (p.1.1 = 0 ∨ p.1.2 = 0) ∧ (p.2.1 = 0 ∨ p.2.2 = 0) ∧ Relation.ReflTransGen (two_counter_machine_update_step M) (q, p.1) (q', p.2) }
two_counter_machine_reach_split_at_zero_testIn LeanAutomata & Formal Languages

Reachability from c to c' either consists entirely of update steps, or factors as an update-only run from c to some configuration m, followed by a single zero test from m to m', followed by reachability from m' to c'.

theorem two_counter_machine_reach_split_at_zero_test {Q : Type*} (M : TwoCounterMachine Q) (c c' : Q × ℕ × ℕ) : Relation.ReflTransGen (two_counter_machine_step M) c c' ↔ Relation.ReflTransGen (two_counter_machine_update_step M) c c' ∨ ∃ m m' : Q × ℕ × ℕ, Relation.ReflTransGen (two_counter_machine_update_step M) c m ∧ two_counter_machine_zero_test_step M m m' ∧ Relation.ReflTransGen (two_counter_machine_step M) m' c'
two_counter_machine_step_iff_update_or_zero_testIn LeanAutomata & Formal Languages

A one-step transition of a 2-counter machine is either an update step or a zero test.

theorem two_counter_machine_step_iff_update_or_zero_test {Q : Type*} (M : TwoCounterMachine Q) (c₁ c₂ : Q × ℕ × ℕ) : two_counter_machine_step M c₁ c₂ ↔ (two_counter_machine_update_step M c₁ c₂ ∨ two_counter_machine_zero_test_step M c₁ c₂)
two_counter_machine_update_reach_swapIn LeanAutomata & Formal Languages

For a symmetric 2-counter machine M, update-only reachability from c₁ to c₂ implies update-only reachability from the coordinate swap of c₁ to the coordinate swap of c₂.

theorem two_counter_machine_update_reach_swap {Q : Type*} (M : TwoCounterMachine Q) (hM : two_counter_machine_is_symmetric M) {c₁ c₂ : Q × ℕ × ℕ} (h : Relation.ReflTransGen (two_counter_machine_update_step M) c₁ c₂) : Relation.ReflTransGen (two_counter_machine_update_step M) (c₁.1, (c₁.2.2, c₁.2.1)) (c₂.1, (c₂.2.2, c₂.2.1))
two_counter_machine_update_step_swapIn LeanAutomata & Formal Languages

For a symmetric 2-counter machine M, if c₂ is reachable from c₁ by one update step, then the coordinate-swapped c₂ is reachable from the coordinate-swapped c₁ by one update step.

theorem two_counter_machine_update_step_swap {Q : Type*} (M : TwoCounterMachine Q) (hM : two_counter_machine_is_symmetric M) {c₁ c₂ : Q × ℕ × ℕ} (h : two_counter_machine_update_step M c₁ c₂) : two_counter_machine_update_step M (c₁.1, (c₁.2.2, c₁.2.1)) (c₂.1, (c₂.2.2, c₂.2.1))
two_counter_machine_zero_test_state_reach_semilinearIn LeanAutomata & Formal Languages

For any 2-counter machine M the set of boundary counter vectors p at which q' is reachable from q by zero tests alone is a semilinear subset of ℕ × ℕ.

theorem two_counter_machine_zero_test_state_reach_semilinear {Q : Type*} (M : TwoCounterMachine Q) (q q' : Q) : IsSemilinearSet { p : ℕ × ℕ | (p.1 = 0 ∨ p.2 = 0) ∧ two_counter_machine_zero_test_state_reach M p q q' }
two_counter_machine_zero_test_state_reach_zero_patternIn LeanAutomata & Formal Languages

Whether q' is zero-test reachable from q at counter vector p depends only on which coordinates of p are zero: if p and p' agree on the vanishing of both coordinates then q' is reachable from q at p iff it is at p'.

theorem two_counter_machine_zero_test_state_reach_zero_pattern {Q : Type*} (M : TwoCounterMachine Q) (q q' : Q) {p p' : ℕ × ℕ} (h₁ : p.1 = 0 ↔ p'.1 = 0) (h₂ : p.2 = 0 ↔ p'.2 = 0) : (two_counter_machine_zero_test_state_reach M p q q' ↔ two_counter_machine_zero_test_state_reach M p' q q')
two_counter_machine_zero_test_step_boundaryIn LeanAutomata & Formal Languages

If c₂ is reached from c₁ by a zero test then c₂ and c₁ have the same counter vector and c₁ is a boundary configuration.

theorem two_counter_machine_zero_test_step_boundary {Q : Type*} (M : TwoCounterMachine Q) {c₁ c₂ : Q × ℕ × ℕ} (h : two_counter_machine_zero_test_step M c₁ c₂) : c₂.2 = c₁.2 ∧ two_counter_machine_boundary c₁
walk_isPath_edge_not_mem_cycle_of_unique_pathIn LeanAutomata & Formal Languages

Under the uniqueness hypothesis for paths between x and y, no edge of any simple path between x and y lies on a simple cycle in G.

theorem walk_isPath_edge_not_mem_cycle_of_unique_path {V : Type*} {G : SimpleGraph V} {x y : V}
    (huniq : ∀ (w₁ w₂ : G.Walk x y), w₁.IsPath → w₂.IsPath → w₁.support = w₂.support)
    {p : G.Walk x y} (hp : p.IsPath) {u : V} {c : G.Walk u u} (hc : c.IsCycle) {e : Sym2 V}
    (he_p : e ∈ p.edges) (he_c : e ∈ c.edges) : False
word_a_gaps_append_replicateIn LeanAutomata & Formal Languages

Concatenating a block of p copies of a between l and m merges the last gap of l with the first gap of m, adding p to their total.

theorem word_a_gaps_append_replicate {α : Type*} [DecidableEq α] (a : α) (l m : List α) (p : ℕ) :
    word_a_gaps a (l ++ List.replicate p a ++ m) =
      (word_a_gaps a l).dropLast ++
        [(word_a_gaps a l).getLastD 0 + p + (word_a_gaps a m).headD 0] ++
        (word_a_gaps a m).tail
word_a_gaps_mask_count_true_le_runsIn LeanAutomata & Formal Languages

For a unary source u = a^n with n > 0, the number of gaps of a mask of w that contain a true-labelled copy of a is at most the number of U-runs of the mask.

theorem word_a_gaps_mask_count_true_le_runs {α : Type*} [DecidableEq α] (a : α) (n : ℕ) (hn : 0 < n)
    (v w : List α) (M : List Bool) (hM : is_word_mask (List.replicate n a) v w M) :
    (word_a_gaps_mask a w M).countP (fun q => decide (0 < q.2)) ≤ mask_u_runs M
word_a_gaps_mask_fstIn LeanAutomata & Formal Languages

If u is a nonempty power of a and M is a mask of w with respect to u and v, then the first components of the masked gap profile of w under M give the 'a'-gap profile of v.

theorem word_a_gaps_mask_fst {α : Type*} [DecidableEq α] (a : α) (n : ℕ) (hn : 0 < n)
    (v w : List α) (M : List Bool) (hM : is_word_mask (List.replicate n a) v w M) :
    (word_a_gaps_mask a w M).map Prod.fst = word_a_gaps a v
word_a_gaps_mask_sumIn LeanAutomata & Formal Languages

Adding the false-labelled and true-labelled counts of a in each gap of the masked gap profile recovers the 'a'-gap profile of w.

theorem word_a_gaps_mask_sum {α : Type*} [DecidableEq α] (a : α) (w : List α) (M : List Bool) :
    (word_a_gaps_mask a w M).map (fun q => q.1 + q.2) = word_a_gaps a w
word_block_exchange_after_insertion_degree_leIn LeanAutomata & Formal Languages

For any words u, v and pure block exchange E with respect to a mask M having run count r, the insertion degree of the exchanged word is at most r - 1.

theorem word_block_exchange_after_insertion_degree_le {α : Type*}
    (u v : List α) (E : WordBlockExchange α) (M : List Bool) (r : ℕ)
    (hM_mask : is_word_mask u v (word_block_exchange_before E) M)
    (hM_deg : mask_u_runs M = r)
    (h_pure : word_block_exchange_is_pure E M) :
    word_insertion_degree u v (word_block_exchange_after E) ≤ ((r - 1 : ℕ) : WithTop ℕ)
word_block_exchange_exact_obstructionIn LeanAutomata & Formal Languages

For nonempty words u and v, a block exchange E = (X, A, B, Y), and a minimum mask M of word_block_exchange_before E with run count r > 1 such that word_insertion_degree u v (word_block_exchange_before E) = r and word_block_exchange_is_pure E M: the commuting minimum c_E(z) equals r - 1, the insertion degree of the exchanged word z = word_block_exchange_after E is min (r - 1) (b_E(z)), and the exchange is exact (degree equals r - 1) if and only if b_E(z) ≥ r - 1.

theorem word_block_exchange_exact_obstruction {α : Type*}
    (u v : List α) (hu : u ≠ []) (hv : v ≠ [])
    (E : WordBlockExchange α) (M : List Bool) (r : ℕ) (hr : 1 < r)
    (hM_mask : is_word_mask u v (word_block_exchange_before E) M)
    (hM_deg : mask_u_runs M = r)
    (h_min : word_insertion_degree u v (word_block_exchange_before E) = (r : WithTop ℕ))
    (h_pure : word_block_exchange_is_pure E M) :
    word_block_exchange_c E u v = ((r - 1 : ℕ) : WithTop ℕ) ∧
    word_insertion_degree u v (word_block_exchange_after E) =
      min ((r - 1 : ℕ) : WithTop ℕ) (word_block_exchange_b E u v) ∧
    (word_insertion_degree u v (word_block_exchange_after E) = ((r - 1 : ℕ) : WithTop ℕ) ↔
      word_block_exchange_b E u v ≥ ((r - 1 : ℕ) : WithTop ℕ))
word_block_exchange_pure_slice_replicateIn LeanAutomata & Formal Languages

If u = a^n and M is a valid mask of XABY whose A-slice is all true, then A = a^{|A|}, and likewise for B.

theorem word_block_exchange_pure_slice_replicate {α : Type*} (a : α) (n : ℕ)
    (u v : List α) (E : WordBlockExchange α) (M : List Bool)
    (hu : u = List.replicate n a)
    (hM : is_word_mask u v (word_block_exchange_before E) M) :
    (is_pure_mask (List.take E.A.length (List.drop E.X.length M)) true →
        E.A = List.replicate E.A.length a) ∧
      (is_pure_mask (List.take E.B.length (List.drop (E.X.length + E.A.length) M)) true →
        E.B = List.replicate E.B.length a)
word_block_exchange_transport_back_mask_u_runs_leIn LeanAutomata & Formal Languages

For any words u, v and block exchange E, if N is a mask of XBAY, then backward transport to XABY satisfies mask_u_runs (word_block_exchange_transport_back E N) ≤ mask_u_runs N + 1.

theorem word_block_exchange_transport_back_mask_u_runs_le {α : Type*}
    (E : WordBlockExchange α) (u v : List α) (N : List Bool)
    (hN : is_word_mask u v (word_block_exchange_after E) N) :
    mask_u_runs (word_block_exchange_transport_back E N) ≤ mask_u_runs N + 1
word_block_exchange_transport_forward_maskIn LeanAutomata & Formal Languages

If M is a valid mask of XABY and E is pure for M, then the forward transport of M is a valid mask of XBAY with mask_u_runs equal to mask_u_runs M - 1.

theorem word_block_exchange_transport_forward_mask {α : Type*} (u v : List α)
    (E : WordBlockExchange α) (M : List Bool)
    (hM : is_word_mask u v (word_block_exchange_before E) M)
    (hpure : word_block_exchange_is_pure E M) :
    is_word_mask u v (word_block_exchange_after E) (word_block_exchange_transport_forward E M) ∧
      mask_u_runs (word_block_exchange_transport_forward E M) = mask_u_runs M - 1
word_block_exchange_transport_forward_pure_is_commuting_maskIn LeanAutomata & Formal Languages

For any words u, v and block exchange E, if M is a valid mask of XABY and E is pure for M, then the forward transport of M is a valid mask of XBAY and is commuting for E.

theorem word_block_exchange_transport_forward_pure_is_commuting_mask {α : Type*}
    (u v : List α) (E : WordBlockExchange α) (M : List Bool)
    (hM : is_word_mask u v (word_block_exchange_before E) M)
    (hpure : word_block_exchange_is_pure E M) :
    is_word_mask u v (word_block_exchange_after E) (word_block_exchange_transport_forward E M) ∧
    word_block_exchange_is_commuting E (word_block_exchange_transport_forward E M)
word_gap_occ_le_mask_u_runsIn LeanAutomata & Formal Languages

For a unary source u = a^n with n > 0, every valid mask M of w has at least word_gap_occ a v w U-runs.

theorem word_gap_occ_le_mask_u_runs {α : Type*} [DecidableEq α] (a : α) (n : ℕ) (hn : 0 < n)
    (v w : List α) (M : List Bool) (hM : is_word_mask (List.replicate n a) v w M) :
    word_gap_occ a v w ≤ mask_u_runs M
word_gap_occ_le_runs_exists_maskIn LeanAutomata & Formal Languages

For a unary source u = a^n with n > 0, if w has a mask at all then it has one whose U-run count is exactly word_gap_occ a v w, hence the minimum is word_gap_occ a v w.

theorem word_gap_occ_le_runs_exists_mask {α : Type*} [DecidableEq α] (a : α) (n : ℕ) (hn : 0 < n)
    (v w : List α) (M₀ : List Bool) (hM₀ : is_word_mask (List.replicate n a) v w M₀) :
    ∃ M, is_word_mask (List.replicate n a) v w M ∧ mask_u_runs M = word_gap_occ a v w
word_gap_occ_swap_leIn LeanAutomata & Formal Languages

For any v, X, B, Y and p, word_gap_occ a v of X ++ a^p ++ B ++ Y and of X ++ B ++ a^p ++ Y differ by at most 1 (in both directions).

theorem word_gap_occ_swap_le {α : Type*} [DecidableEq α] (a : α) (v X B Y : List α) (p : ℕ) :
    word_gap_occ a v (X ++ List.replicate p a ++ B ++ Y) ≤
        word_gap_occ a v (X ++ B ++ List.replicate p a ++ Y) + 1 ∧
      word_gap_occ a v (X ++ B ++ List.replicate p a ++ Y) ≤
        word_gap_occ a v (X ++ List.replicate p a ++ B ++ Y) + 1
word_insertion_degree_eq_gap_occIn LeanAutomata & Formal Languages

For a unary source u = a^n with n > 0 and a word w that admits a mask, word_insertion_degree (a^n) v w = word_gap_occ a v w.

theorem word_insertion_degree_eq_gap_occ {α : Type*} [DecidableEq α] (a : α) (n : ℕ) (hn : 0 < n)
    (v w : List α) (M : List Bool) (hM : is_word_mask (List.replicate n a) v w M) :
    word_insertion_degree (List.replicate n a) v w = (word_gap_occ a v w : WithTop ℕ)
word_insertion_degree_eq_min_c_bIn LeanAutomata & Formal Languages

For any source words u, v and block exchange E, the insertion degree of word_block_exchange_after E is min (word_block_exchange_c E u v) (word_block_exchange_b E u v).

theorem word_insertion_degree_eq_min_c_b {α : Type*}
    (u v : List α) (E : WordBlockExchange α) :
    word_insertion_degree u v (word_block_exchange_after E) =
      min (word_block_exchange_c E u v) (word_block_exchange_b E u v)
word_insertion_degree_le_mask_u_runsIn LeanAutomata & Formal Languages

For any valid mask M of w the insertion degree of w is at most mask_u_runs M.

theorem word_insertion_degree_le_mask_u_runs {α : Type*} (u v w : List α) (M : List Bool)
    (hM : is_word_mask u v w M) :
    word_insertion_degree u v w ≤ (mask_u_runs M : WithTop ℕ)
word_le_word_insertion_degreeIn LeanAutomata & Formal Languages

If every valid mask of w has at least k U-runs, then k is a lower bound for the insertion degree of w.

theorem word_le_word_insertion_degree {α : Type*} (u v w : List α) (k : ℕ)
    (h : ∀ M, is_word_mask u v w M → k ≤ mask_u_runs M) :
    (k : WithTop ℕ) ≤ word_insertion_degree u v w
word_occp_le_count_posIn LeanAutomata & Formal Languages

If a list of pairs L has first components gv and componentwise sums gw, then the number of indices where gw exceeds gv is at most the number of pairs in L with positive second component.

theorem word_occp_le_count_pos (gv gw : List ℕ) (L : List (ℕ × ℕ))
    (h1 : L.map Prod.fst = gv) (h2 : L.map (fun q => q.1 + q.2) = gw) :
    word_occp gw gv ≤ L.countP (fun q => decide (0 < q.2))
word_occp_swap_leIn LeanAutomata & Formal Languages

For lists A M Z gv of naturals and naturals α β p, the over-full count of A ++ [α+p] ++ M ++ [β] ++ Z against gv exceeds that of A ++ [α] ++ M ++ [β+p] ++ Z against gv by at most 1, and conversely.

theorem word_occp_swap_le (A M Z gv : List ℕ) (α β p : ℕ) :
    word_occp (A ++ [α + p] ++ M ++ [β] ++ Z) gv ≤
        word_occp (A ++ [α] ++ M ++ [β + p] ++ Z) gv + 1 ∧
      word_occp (A ++ [α] ++ M ++ [β + p] ++ Z) gv ≤
        word_occp (A ++ [α + p] ++ M ++ [β] ++ Z) gv + 1
word_unary_base_block_exchange_after_insertion_degree_geIn LeanAutomata & Formal Languages

For a nonempty word u, unary base word v, and pure block exchange E of a minimum mask M of run count r > 1, the insertion degree of the exchanged word is at least r - 1.

theorem word_unary_base_block_exchange_after_insertion_degree_ge {α : Type*}
    (u v : List α) (hu : u ≠ [])
    (hunary : word_is_unary v)
    (E : WordBlockExchange α) (M : List Bool) (r : ℕ) (hr : 1 < r)
    (hM_mask : is_word_mask u v (word_block_exchange_before E) M)
    (hM_deg : mask_u_runs M = r)
    (h_min : word_insertion_degree u v (word_block_exchange_before E) = (r : WithTop ℕ))
    (h_pure : word_block_exchange_is_pure E M) :
    word_insertion_degree u v (word_block_exchange_after E) ≥ ((r - 1 : ℕ) : WithTop ℕ)
word_unary_base_block_exchange_exactIn LeanAutomata & Formal Languages

Let u and v be words over an alphabet α such that u is nonempty (hu : u ≠ []) and v is unary (word_is_unary v). For any block exchange E, if M is a minimum mask of the word w = word_block_exchange_before E with run count r > 1 (so is_word_mask u v w M, mask_u_runs M = r, and word_insertion_degree u v w = r) and word_block_exchange_is_pure E M, then the exchanged word z = word_block_exchange_after E has minimum insertion degree word_insertion_degree u v z = r - 1.

theorem word_unary_base_block_exchange_exact {α : Type*}
    (u v : List α) (hu : u ≠ [])
    (hunary : word_is_unary v)
    (E : WordBlockExchange α) (M : List Bool) (r : ℕ) (hr : 1 < r)
    (hM_mask : is_word_mask u v (word_block_exchange_before E) M)
    (hM_deg : mask_u_runs M = r)
    (h_min : word_insertion_degree u v (word_block_exchange_before E) = (r : WithTop ℕ))
    (h_pure : word_block_exchange_is_pure E M) :
    word_insertion_degree u v (word_block_exchange_after E) = ((r - 1 : ℕ) : WithTop ℕ)
word_unary_block_exchange_exactIn LeanAutomata & Formal Languages

Let u and v be nonempty words over an alphabet α (hu : u ≠ [], hv : v ≠ []) such that either u or v is unary (word_is_unary u ∨ word_is_unary v). For any block exchange E, if M is a minimum mask of the word w = word_block_exchange_before E with run count r > 1 (so is_word_mask u v w M, mask_u_runs M = r, and word_insertion_degree u v w = r) and word_block_exchange_is_pure E M, then the exchanged word z = word_block_exchange_after E has minimum insertion degree word_insertion_degree u v z = r - 1.

theorem word_unary_block_exchange_exact {α : Type*}
    (u v : List α) (hu : u ≠ []) (hv : v ≠ [])
    (hunary : word_is_unary u ∨ word_is_unary v)
    (E : WordBlockExchange α) (M : List Bool) (r : ℕ) (hr : 1 < r)
    (hM_mask : is_word_mask u v (word_block_exchange_before E) M)
    (hM_deg : mask_u_runs M = r)
    (h_min : word_insertion_degree u v (word_block_exchange_before E) = (r : WithTop ℕ))
    (h_pure : word_block_exchange_is_pure E M) :
    word_insertion_degree u v (word_block_exchange_after E) = ((r - 1 : ℕ) : WithTop ℕ)
word_unary_inserted_block_exchange_exactIn LeanAutomata & Formal Languages

Let u and v be words over an alphabet α such that u is unary (word_is_unary u) and v is nonempty (hv : v ≠ []). For any block exchange E, if M is a minimum mask of the word w = word_block_exchange_before E with run count r > 1 (so is_word_mask u v w M, mask_u_runs M = r, and word_insertion_degree u v w = r) and word_block_exchange_is_pure E M, then the exchanged word z = word_block_exchange_after E has minimum insertion degree word_insertion_degree u v z = r - 1.

theorem word_unary_inserted_block_exchange_exact {α : Type*}
    (u v : List α) (hv : v ≠ [])
    (hunary : word_is_unary u)
    (E : WordBlockExchange α) (M : List Bool) (r : ℕ) (hr : 1 < r)
    (hM_mask : is_word_mask u v (word_block_exchange_before E) M)
    (hM_deg : mask_u_runs M = r)
    (h_min : word_insertion_degree u v (word_block_exchange_before E) = (r : WithTop ℕ))
    (h_pure : word_block_exchange_is_pure E M) :
    word_insertion_degree u v (word_block_exchange_after E) = ((r - 1 : ℕ) : WithTop ℕ)
acceptingCount_strictMajority_of_oddIn LeanCircuit Complexity & Lower Bounds

For any odd integer n, the number of accepting inputs of the strict Majority function on n Boolean variables is exactly 2^(n - 1).

theorem acceptingCount_strictMajority_of_odd (n : ℕ) (hn : Odd n) :
    acceptingCount (strictMajority n) = 2 ^ (n - 1)
acceptingCount_strictMajority_two_mulIn LeanCircuit Complexity & Lower Bounds

For m ≥ 1, the number of accepting inputs of the strict Majority function on 2m Boolean variables is 2^(2m-1) - C(2m-1,m).

theorem acceptingCount_strictMajority_two_mul (m : ℕ) (hm : 0 < m) :
    acceptingCount (strictMajority (2 * m)) = 2 ^ (2 * m - 1) - (2 * m - 1).choose m
bool_anf_coeff_false_of_card_gt_of_top_layers_zeroIn LeanCircuit Complexity & Lower Bounds

For n ≥ 2 and a Boolean function f on n variables, if the top ANF coefficient (at Finset.univ) is false and boolNextToTopAnfCount f = 0, then every subset S : Finset (Fin n) with card S > n - 2 has boolAnfCoefficient f S = false.

theorem bool_anf_coeff_false_of_card_gt_of_top_layers_zero (n : ℕ) (hn : 2 ≤ n)
    (f : (Fin n → Bool) → Bool)
    (hb : boolAnfCoefficient f Finset.univ = false)
    (hk : boolNextToTopAnfCount f = 0)
    {S : Finset (Fin n)} (hS : n - 2 < S.card) :
    boolAnfCoefficient f S = false
bool_anf_sum_half_mem_degreeSpaceIn LeanCircuit Complexity & Lower Bounds

If every ANF coefficient of degree greater than d vanishes, then the function sending x to half of the integer ANF sum (the sum over S of the 0/1 coefficient times ∏_{i∈S} (if x i then 1 else 0), cast to ℝ and divided by 2) belongs to degreeSpace ℝ (Fin n) d.

theorem bool_anf_sum_half_mem_degreeSpace (n d : ℕ) (f : (Fin n → Bool) → Bool)
    (h : ∀ S : Finset (Fin n), d < S.card → boolAnfCoefficient f S = false) :
    (fun x : Fin n → Bool => ((∑ S : Finset (Fin n), (if boolAnfCoefficient f S then 1 else 0) *
      ∏ i ∈ S, (if x i = true then 1 else 0) : ℕ) : ℝ) / 2) ∈ degreeSpace (K := ℝ) (Fin n) d
bool_anf_sum_half_rat_mem_degreeSpaceIn LeanCircuit Complexity & Lower Bounds

If every ANF coefficient of degree greater than d vanishes, then the function sending x to half of the integer ANF sum (cast to ℚ and divided by 2) belongs to degreeSpace ℚ (Fin n) d.

theorem bool_anf_sum_half_rat_mem_degreeSpace (n d : ℕ) (f : (Fin n → Bool) → Bool)
    (h : ∀ S : Finset (Fin n), d < S.card → boolAnfCoefficient f S = false) :
    (fun x : Fin n → Bool => ((∑ S : Finset (Fin n), (if boolAnfCoefficient f S then 1 else 0) *
      ∏ i ∈ S, (if x i = true then 1 else 0) : ℕ) : ℚ) / 2) ∈ degreeSpace (K := ℚ) (Fin n) d
bool_anf_sum_int_parityIn LeanCircuit Complexity & Lower Bounds

For every Boolean function f on n variables and point x, the integer ANF sum (over ℕ, cast to ℤ) is congruent modulo 2 to the 0/1 bit of f x.

theorem bool_anf_sum_int_parity (n : ℕ) (f : (Fin n → Bool) → Bool) (x : Fin n → Bool) :
    ((∑ S : Finset (Fin n), (if boolAnfCoefficient f S then 1 else 0) *
      ∏ i ∈ S, (if x i = true then 1 else 0) : ℕ) : ℤ) ≡
    ((if f x then 1 else 0 : ℕ) : ℤ) [ZMOD 2]
bool_anf_sum_zmod2In LeanCircuit Complexity & Lower Bounds

The ANF (algebraic normal form) expansion over GF(2): for every Boolean function f on n variables and every point x, the sum over all S : Finset (Fin n) of (boolAnfCoefficient f S as 0/1) times the monomial product ∏_{i∈S} (if x i then 1 else 0), reduced to ZMod 2, equals (if f x then 1 else 0).

theorem bool_anf_sum_zmod2 (n : ℕ) (f : (Fin n → Bool) → Bool) (x : Fin n → Bool) :
    ((∑ S : Finset (Fin n), (if boolAnfCoefficient f S then 1 else 0) *
      ∏ i ∈ S, (if x i = true then 1 else 0) : ℕ) : ZMod 2) =
    (if f x = true then 1 else 0)
explicit_optimal_torus_approximationIn LeanCircuit Complexity & Lower Bounds

For any Boolean function f : (Fin n → Bool) → Bool on n > 0 variables, explicitApproximant f belongs to degreeSpace (K := ℝ) (Fin n) (n - 1), satisfies torusDistance (explicitApproximant f x - bit (f x) / 2) = explicitError f at every x : Fin n → Bool, achieves the optimal degree-(n-1) torus approximation error optimalTorusError f (n - 1) = explicitError f, and satisfies explicitApproximant f (x ∘ e) = explicitApproximant f x for any permutation e : Equiv.Perm (Fin n) under which f is invariant.

theorem explicit_optimal_torus_approximation {n : ℕ} (hn : 0 < n) (f : (Fin n → Bool) → Bool) :
    (explicitApproximant f ∈ degreeSpace (K := ℝ) (Fin n) (n - 1)) ∧
    (∀ x : Fin n → Bool, torusDistance (explicitApproximant f x - bit (f x) / 2) = explicitError f) ∧
    (optimalTorusError f (n - 1) = explicitError f) ∧
    (∀ (e : Equiv.Perm (Fin n)), (∀ x, f (x ∘ e) = f x) → (∀ x, explicitApproximant f (x ∘ e) = explicitApproximant f x))
fourier_entropy_bound_from_orthogonal_decompIn LeanCircuit Complexity & Lower Bounds

Let f : {-1,1}^n → ℂ decompose as a sum of pairwise orthogonal non-zero functions g_1, ..., g_m. Then the Fourier entropy ℍ(f_hat^2) is at most 2 * ∑_{i=1}^m p_i * log_2(L_i / p_i), where p_i = ||g_i||_2^2 and L_i = ||g_i_hat||_1.

theorem fourier_entropy_bound_from_orthogonal_decomp
    {n m : ℕ} (f : (Fin n → Bool) → ℂ) (g : Fin m → (Fin n → Bool) → ℂ)
    (h_sum : f = ∑ i : Fin m, g i)
    (h_nz : ∀ i : Fin m, g i ≠ 0)
    (h_ortho : ∀ i j : Fin m, i ≠ j → inner_product_c (g i) (g j) = 0) :
    unnormalized_fourier_entropy f ≤
      2 * ∑ i : Fin m, l2_norm_sq_c (g i) * Real.logb 2 (spectral_norm_c (g i) / l2_norm_sq_c (g i))
fourier_entropy_from_moment_boundIn LeanCircuit Complexity & Lower Bounds

Entropy transfer (paper Theorem 4.2, the differentiation step). Assume f = Σ_i g_i with the non-zero g_i pairwise L2-orthogonal, and assume the sharp moment bound Σ_S |f̂(S)|^r ≤ Σ_i L_i^{2-r} p_i^{r-1} holds for every 1 ≤ r ≤ 2. Then the Fourier entropy satisfies ℍ(f̂²) ≤ 2 Σ_i p_i log₂(L_i / p_i).

theorem fourier_entropy_from_moment_bound
    {n m : ℕ} (f : (Fin n → Bool) → ℂ) (g : Fin m → (Fin n → Bool) → ℂ)
    (h_sum : f = ∑ i : Fin m, g i)
    (h_nz : ∀ i : Fin m, g i ≠ 0)
    (h_ortho : ∀ i j : Fin m, i ≠ j → inner_product_c (g i) (g j) = 0)
    (h_moment : ∀ r : ℝ, 1 ≤ r → r ≤ 2 →
        (∑ S : Finset (Fin n),
          ‖(1 / (2 : ℂ) ^ n) * ∑ x : Fin n → Bool, f x * (∏ i ∈ S, if x i then (-1 : ℂ) else 1)‖ ^ r)
        ≤ ∑ i : Fin m, (spectral_norm_c (g i)) ^ (2 - r) * (l2_norm_sq_c (g i)) ^ (r - 1)) :
    unnormalized_fourier_entropy f ≤
      2 * ∑ i : Fin m, l2_norm_sq_c (g i) * Real.logb 2 (spectral_norm_c (g i) / l2_norm_sq_c (g i))
fourier_moment_interpolation_boundIn LeanCircuit Complexity & Lower Bounds

Moment interpolation for an orthogonal decomposition (paper Theorem 4.1). If f = Σ_i g_i with the non-zero g_i pairwise orthogonal in L2, then for every 1 ≤ r ≤ 2, Σ_S |f̂(S)|^r ≤ Σ_i L_i^{2-r} p_i^{r-1}, where p_i = ‖g_i‖₂² and L_i = ‖ĝ_i‖₁.

theorem fourier_moment_interpolation_bound
    {n m : ℕ} (f : (Fin n → Bool) → ℂ) (g : Fin m → (Fin n → Bool) → ℂ)
    (h_sum : f = ∑ i : Fin m, g i)
    (h_nz : ∀ i : Fin m, g i ≠ 0)
    (h_ortho : ∀ i j : Fin m, i ≠ j → inner_product_c (g i) (g j) = 0)
    {r : ℝ} (hr1 : 1 ≤ r) (hr2 : r ≤ 2) :
    (∑ S : Finset (Fin n),
        ‖(1 / (2 : ℂ) ^ n) * ∑ x : Fin n → Bool, f x * (∏ i ∈ S, if x i then (-1 : ℂ) else 1)‖ ^ r)
      ≤ ∑ i : Fin m, (spectral_norm_c (g i)) ^ (2 - r) * (l2_norm_sq_c (g i)) ^ (r - 1)
fourier_parseval_orthogonal_decompIn LeanCircuit Complexity & Lower Bounds

If f = Σ_i g_i on the Boolean cube with the g_i pairwise orthogonal in the complex L2 inner product, then the sum over S of |f̂(S)|² equals Σ_i ‖g_i‖₂² (the r = 2 endpoint of the moment inequality).

theorem fourier_parseval_orthogonal_decomp
    {n m : ℕ} (f : (Fin n → Bool) → ℂ) (g : Fin m → (Fin n → Bool) → ℂ)
    (h_sum : f = ∑ i : Fin m, g i)
    (h_ortho : ∀ i j : Fin m, i ≠ j → inner_product_c (g i) (g j) = 0) :
    (∑ S : Finset (Fin n),
        ‖(1 / (2 : ℂ) ^ n) * ∑ x : Fin n → Bool, f x * (∏ i ∈ S, if x i then (-1 : ℂ) else 1)‖ ^ 2)
      = ∑ i : Fin m, l2_norm_sq_c (g i)
hasRationalTorusApproximation_of_anf_high_coeffs_zeroIn LeanCircuit Complexity & Lower Bounds

If every ANF coefficient of degree greater than d vanishes, then f has a degree-d rational torus approximation with error exactly 0 (HasRationalTorusApproximation f d 0).

theorem hasRationalTorusApproximation_of_anf_high_coeffs_zero (n d : ℕ) (f : (Fin n → Bool) → Bool)
    (h : ∀ S : Finset (Fin n), d < S.card → boolAnfCoefficient f S = false) :
    HasRationalTorusApproximation f d 0
hasTorusApproximation_error_nonnegIn LeanCircuit Complexity & Lower Bounds

Any error ε admitting a degree-d torus approximation of f is nonnegative: 0 ≤ ε. No vanishing-coefficient hypothesis is needed.

theorem hasTorusApproximation_error_nonneg {n d : ℕ} (f : (Fin n → Bool) → Bool) {ε : ℝ}
    (h : HasTorusApproximation f d ε) : 0 ≤ ε
hasTorusApproximation_explicitErrorIn LeanCircuit Complexity & Lower Bounds

For any Boolean function f : (Fin n → Bool) → Bool on n > 0 variables, HasTorusApproximation f (n - 1) (explicitError f) holds.

theorem hasTorusApproximation_explicitError {n : ℕ} (hn : 0 < n) (f : (Fin n → Bool) → Bool) :
    HasTorusApproximation f (n - 1) (explicitError f)
hasTorusApproximation_ge_explicitErrorIn LeanCircuit Complexity & Lower Bounds

For any Boolean function f : (Fin n → Bool) → Bool on n > 0 variables and any real ε, if HasTorusApproximation f (n - 1) ε holds, then explicitError f ≤ ε.

theorem hasTorusApproximation_ge_explicitError {n : ℕ} (hn : 0 < n) (f : (Fin n → Bool) → Bool)
    (ε : ℝ) (h : HasTorusApproximation f (n - 1) ε) :
    explicitError f ≤ ε
hasTorusApproximation_of_anf_high_coeffs_zeroIn LeanCircuit Complexity & Lower Bounds

If every ANF coefficient of degree greater than d vanishes, then f has a degree-d torus approximation with error exactly 0 (i.e. HasTorusApproximation f d 0).

theorem hasTorusApproximation_of_anf_high_coeffs_zero (n d : ℕ) (f : (Fin n → Bool) → Bool)
    (h : ∀ S : Finset (Fin n), d < S.card → boolAnfCoefficient f S = false) :
    HasTorusApproximation f d 0
ndeg_const_falseIn LeanCircuit Complexity & Lower Bounds

For any natural number n, the constant false Boolean function on n variables has non-deterministic degree equal to 0.

theorem ndeg_const_false (n : ℕ) : ndeg (fun (_ : Fin n → Bool) => false) = 0
ndeg_const_trueIn LeanCircuit Complexity & Lower Bounds

For any natural number n, the constant true Boolean function on n variables has non-deterministic degree equal to 0.

theorem ndeg_const_true (n : ℕ) : ndeg (fun (_ : Fin n → Bool) => true) = 0
odd_acceptingCount_strictMajority_iffIn LeanCircuit Complexity & Lower Bounds

For any integer n ≥ 1, the number of accepting inputs of the strict Majority function on n Boolean variables is odd if and only if n is a power of 2.

theorem odd_acceptingCount_strictMajority_iff (n : ℕ) (hn : 0 < n) :
    Odd (acceptingCount (strictMajority n)) ↔ ∃ k : ℕ, n = 2 ^ k
odd_acceptingCount_strictMajority_two_mulIn LeanCircuit Complexity & Lower Bounds

For any m > 0, the parity of the number of accepting inputs of the strict Majority function on 2m Boolean variables equals the parity of the binomial coefficient (2m - 1 choose m).

theorem odd_acceptingCount_strictMajority_two_mul (m : ℕ) (hm : 0 < m) :
    Odd (acceptingCount (strictMajority (2 * m))) ↔ Odd (Nat.choose (2 * m - 1) m)
odd_choose_two_mul_sub_one_iffIn LeanCircuit Complexity & Lower Bounds

For any positive integer m, the binomial coefficient (2m - 1 choose m) is odd if and only if m is a power of 2.

theorem odd_choose_two_mul_sub_one_iff (m : ℕ) (hm : 0 < m) :
    Odd (Nat.choose (2 * m - 1) m) ↔ ∃ k : ℕ, m = 2 ^ k
op_729_case_n_three_achievableIn LeanCircuit Complexity & Lower Bounds

Every Boolean function on 3 variables has a degree-1 rational torus approximation of error exactly predictedTorusError 3 f.

theorem op_729_case_n_three_achievable (f : (Fin 3 → Bool) → Bool) :
    HasRationalTorusApproximation f 1 (predictedTorusError 3 f)
op_729_case_n_three_lower_boundIn LeanCircuit Complexity & Lower Bounds

For every Boolean function f on 3 variables and every real ε, a degree-1 torus approximation of f with error ε forces predictedTorusError 3 f ≤ ε.

theorem op_729_case_n_three_lower_bound (f : (Fin 3 → Bool) → Bool) (ε : ℝ)
    (h : HasTorusApproximation f 1 ε) : predictedTorusError 3 f ≤ ε
op_729_case_n_three_lower_bound_k_one_threeIn LeanCircuit Complexity & Lower Bounds

If the top ANF coefficient of f on 3 variables is false and f has one or three true next-to-top ANF coefficients, then every degree-1 real polynomial P is at torus distance at least 1/8 from f/2 at some cube point.

theorem op_729_case_n_three_lower_bound_k_one_three (f : (Fin 3 → Bool) → Bool)
    (hb : boolAnfCoefficient f Finset.univ = false)
    (hk : boolNextToTopAnfCount f = 1 ∨ boolNextToTopAnfCount f = 3)
    (P : (Fin 3 → Bool) → ℝ) (hP : P ∈ degreeSpace (K := ℝ) (Fin 3) 1) :
    ∃ x : Fin 3 → Bool, 1 / 8 ≤ torusDistance (P x - bit (f x) / 2)
op_729_case_n_three_lower_bound_k_twoIn LeanCircuit Complexity & Lower Bounds

If the top ANF coefficient of f on 3 variables is false and f has exactly two true next-to-top ANF coefficients, then every degree-1 real polynomial P is at torus distance at least 1/4 from f/2 at some cube point.

theorem op_729_case_n_three_lower_bound_k_two (f : (Fin 3 → Bool) → Bool)
    (hb : boolAnfCoefficient f Finset.univ = false)
    (hk : boolNextToTopAnfCount f = 2)
    (P : (Fin 3 → Bool) → ℝ) (hP : P ∈ degreeSpace (K := ℝ) (Fin 3) 1) :
    ∃ x : Fin 3 → Bool, 1 / 4 ≤ torusDistance (P x - bit (f x) / 2)
op_729_case_n_three_lower_bound_topIn LeanCircuit Complexity & Lower Bounds

If the top ANF coefficient of f on 3 variables is true, then every degree-1 real polynomial P is at torus distance at least 1/6 from f/2 at some cube point.

theorem op_729_case_n_three_lower_bound_top (f : (Fin 3 → Bool) → Bool)
    (hb : boolAnfCoefficient f Finset.univ = true)
    (P : (Fin 3 → Bool) → ℝ) (hP : P ∈ degreeSpace (K := ℝ) (Fin 3) 1) :
    ∃ x : Fin 3 → Bool, 1 / 6 ≤ torusDistance (P x - bit (f x) / 2)
op_729_dual_lower_boundIn LeanCircuit Complexity & Lower Bounds

For every natural number n ≥ 2, every Boolean function f on n variables, and every error ε, if f has a degree-(n-2) torus approximation with error ε, then predictedTorusError n f ≤ ε.

theorem op_729_dual_lower_bound (n : ℕ) (hn : 2 ≤ n)
    (f : (Fin n → Bool) → Bool) (ε : ℝ)
    (h : HasTorusApproximation f (n - 2) ε) :
    predictedTorusError n f ≤ ε
op_729_predicted_torus_error_threeIn LeanCircuit Complexity & Lower Bounds

At n = 3 the predicted torus error reduces to five explicit cases: it is 1/6 when the top ANF coefficient is true, and otherwise 0, 1/8, 1/4, 1/8 according as the next-to-top ANF count is 0, 1, 2, 3.

theorem op_729_predicted_torus_error_three (f : (Fin 3 → Bool) → Bool) :
    predictedTorusError 3 f =
      if boolAnfCoefficient f Finset.univ then 1 / 6
      else if boolNextToTopAnfCount f = 0 then 0
      else if boolNextToTopAnfCount f = 1 then 1 / 8
      else if boolNextToTopAnfCount f = 2 then 1 / 4
      else 1 / 8
optimalTorusError_predIn LeanCircuit Complexity & Lower Bounds

For any Boolean function f : (Fin n → Bool) → Bool on n > 0 variables, optimalTorusError f (n - 1) equals explicitError f.

theorem optimalTorusError_pred {n : ℕ} (hn : 0 < n) (f : (Fin n → Bool) → Bool) :
    optimalTorusError f (n - 1) = explicitError f
optimalTorusError_strictMajorityIn LeanCircuit Complexity & Lower Bounds

For any integer n ≥ 1, the optimal degree-(n-1) torus approximation error of the strict Majority function on n variables equals 2^{-n-1} if n is a power of two, and 0 otherwise.

open Classical in
theorem optimalTorusError_strictMajority (n : ℕ) (hn : 0 < n) :
    optimalTorusError (strictMajority n) (n - 1) =
    if ∃ k : ℕ, n = 2 ^ k then 1 / (2 : ℝ) ^ (n + 1) else 0
parityCharacter_degreeSpace_orthogonalIn LeanCircuit Complexity & Lower Bounds

For any n > 0 and any polynomial P in degreeSpace ℝ (Fin n) (n - 1), the inner product of P with parityCharacter is zero: ∑ x, parityCharacter x * P x = 0.

theorem parityCharacter_degreeSpace_orthogonal {n : ℕ} (hn : 0 < n) (P : (Fin n → Bool) → ℝ)
    (hP : P ∈ degreeSpace ℝ (Fin n) (n - 1)) :
    (∑ x : Fin n → Bool, parityCharacter x * P x) = 0
riesz_thorin_lp_interpolationIn LeanCircuit Complexity & Lower Bounds

Finite-dimensional Riesz–Thorin interpolation (paper Theorem 2.5). Let T : ℂ^I → ℂ^J be ℂ-linear and ν_i > 0 with ‖Tu‖₁ ≤ Σ_i ν_i|u_i| and ‖Tu‖₂² ≤ Σ_i ν_i|u_i|² for all u. Then for every 1 ≤ r ≤ 2, ‖Tu‖_r^r = Σ_j |(Tu)_j|^r ≤ Σ_i ν_i|u_i|^r for all u.

theorem riesz_thorin_lp_interpolation
    {ι κ : Type*} [Fintype ι] [Fintype κ]
    (T : (ι → ℂ) →ₗ[ℂ] (κ → ℂ)) (ν : ι → ℝ)
    (hν : ∀ i, 0 < ν i)
    (h1 : ∀ u : ι → ℂ, ∑ j, ‖T u j‖ ≤ ∑ i, ν i * ‖u i‖)
    (h2 : ∀ u : ι → ℂ, ∑ j, ‖T u j‖ ^ (2:ℝ) ≤ ∑ i, ν i * ‖u i‖ ^ (2:ℝ))
    {r : ℝ} (hr1 : 1 ≤ r) (hr2 : r ≤ 2) :
    ∀ u : ι → ℂ, ∑ j, ‖T u j‖ ^ r ≤ ∑ i, ν i * ‖u i‖ ^ r
strictMajority_accepting_count_eq_sum_chooseIn LeanCircuit Complexity & Lower Bounds

The accepting inputs of the strict Majority function on n Boolean variables are exactly those of Hamming weight k with 2k > n, i.e. with n/2 + 1 ≤ k, and there are C(n,k) inputs of weight k. Hence the accepting count is the sum of C(n,k) over n/2 + 1 ≤ k ≤ n.

theorem strictMajority_accepting_count_eq_sum_choose (n : ℕ) :
    acceptingCount (strictMajority n) = ∑ k ∈ Finset.Ico (n / 2 + 1) (n + 1), Nat.choose n k
strictMajority_degree_ge_of_small_errorIn LeanCircuit Complexity & Lower Bounds

For any integer n ≥ 1 that is a power of two, every torus polynomial approximating the strict Majority function on n variables with error strictly below 2^{-n-1} has degree at least n.

theorem strictMajority_degree_ge_of_small_error (n : ℕ) (hn : 0 < n)
    (hpow : ∃ k : ℕ, n = 2 ^ k) {d : ℕ} {ε : ℝ}
    (hε : ε < 1 / (2 : ℝ) ^ (n + 1))
    (h : HasTorusApproximation (strictMajority n) d ε) : n ≤ d
sum_Ico_choose_two_mul_add_one_upper_halfIn LeanCircuit Complexity & Lower Bounds

The upper half of row 2m+1 of Pascal's triangle, namely the sum of C(2m+1,k) over m+1 ≤ k ≤ 2m+1, equals 4^m.

theorem sum_Ico_choose_two_mul_add_one_upper_half (m : ℕ) :
    ∑ k ∈ Finset.Ico (m + 1) (2 * m + 2), (2 * m + 1).choose k = 4 ^ m
two_mul_sum_Ico_choose_two_mul_add_chooseIn LeanCircuit Complexity & Lower Bounds

Middle-layer symmetry for row 2m: twice the sum of C(2m,k) over m+1 ≤ k ≤ 2m, plus the central coefficient C(2m,m), equals the full row sum 2^(2m).

theorem two_mul_sum_Ico_choose_two_mul_add_choose (m : ℕ) :
    2 * (∑ k ∈ Finset.Ico (m + 1) (2 * m + 1), (2 * m).choose k) + (2 * m).choose m = 2 ^ (2 * m)
abs_exp_neg_sub_exp_neg_leIn LeanCombinatorics for TCS

For all nonnegative reals x and y, |exp(-x) - exp(-y)| ≤ |x - y|.

theorem abs_exp_neg_sub_exp_neg_le {x y : ℝ} (hx : 0 ≤ x) (hy : 0 ≤ y) :
  |Real.exp (-x) - Real.exp (-y)| ≤ |x - y|
add_self_injective_of_odd_cardIn LeanCombinatorics for TCS

In a finite abelian group of odd order the doubling map x ↦ x + x is injective; equivalently the group has no element of order two, so a linear equation 2x = c has at most one solution.

theorem add_self_injective_of_odd_card {G : Type*} [AddCommGroup G] [Fintype G] (hodd : Fintype.card G % 2 = 1) : Function.Injective (fun x : G => x + x)
admissible_diagonal_selection_isometric_path_coverIn LeanCombinatorics for TCS

For every natural number k ≥ 1 and every admissible selection M of unit diagonals on the grid V_{2k-1} = {0, ..., 2k-1}^2 (represented as M : Finset (Sym2 (Fin (2 * k) × Fin (2 * k))) satisfying is_admissible_diagonal_selection k M), there exists a natural number p ≤ 2 * k^2 - M.card and an indexed family of walks w_i (for i : Fin p) between endpoints u_i, v_i in the k × k Cartesian grid graph Γ_k = SimpleGraph.pathGraph k □ SimpleGraph.pathGraph k (on vertices Fin k × Fin k) such that each walk w_i is a geodesic path (its length equals the graph distance between u_i and v_i and it has no duplicate vertices) and every vertex of Fin k × Fin k belongs to the support of at least one walk w_i.

theorem admissible_diagonal_selection_isometric_path_cover (k : ℕ) (hk : 1 ≤ k)
    (M : Finset (Sym2 (Fin (2 * k) × Fin (2 * k))))
    (hM : is_admissible_diagonal_selection k M) :
    ∃ (p : ℕ) (hp : p ≤ 2 * k ^ 2 - M.card) (u v : Fin p → Fin k × Fin k)
      (w : (i : Fin p) → ((SimpleGraph.pathGraph k) □ (SimpleGraph.pathGraph k)).Walk (u i) (v i)),
      (∀ i, (w i).IsPath ∧ (w i).length = ((SimpleGraph.pathGraph k) □ (SimpleGraph.pathGraph k)).dist (u i) (v i)) ∧
      (∀ x : Fin k × Fin k, ∃ i, x ∈ (w i).support)
affine_line_eq_translate_spanIn LeanCombinatorics for TCS

For a point Q and direction v, the affine line through Q in direction v equals the set of points x whose translate x − Q lies in the span of v.

theorem affine_line_eq_translate_span
    (p : ℕ) (Q v : Fin 3 → ZMod p) :
    affine_line Q v = {x : Fin 3 → ZMod p | x - Q ∈ Submodule.span (ZMod p) {v}}
affine_line_p_minus_one_exists_full_lineIn LeanCombinatorics for TCS

Let p ≥ 3 be a prime, and let S ⊆ (ℤ/pℤ)³ be an admissible plane set. If S meets the affine line through P in nonzero direction v in p - 1 points, then S contains a full affine line: there exist a point Q and a nonzero direction w such that the affine line through Q in direction w is contained in S.

theorem affine_line_p_minus_one_exists_full_line
    (p : ℕ) [Fact p.Prime] (hp : 3 ≤ p)
    (S : Set (Fin 3 → ZMod p)) (hS : admissible_plane_set p S)
    (P v : Fin 3 → ZMod p) (hv : v ≠ 0)
    (hℓ : (S ∩ affine_line P v).ncard = p - 1) :
    ∃ (Q w : Fin 3 → ZMod p), w ≠ 0 ∧ affine_line Q w ⊆ S
affine_line_p_minus_one_forces_cylinderIn LeanCombinatorics for TCS

Let p ≥ 3 be a prime, and let S ⊆ (ℤ/pℤ)³ be an admissible plane set. If S meets the affine line through P in nonzero direction v in p - 1 points, then S contains a full affine line and is a cylinder in its direction: there exist a point Q and a nonzero direction w such that the affine line through Q in direction w is contained in S, and S is a cylinder in direction w.

theorem affine_line_p_minus_one_forces_cylinder
    (p : ℕ) [Fact p.Prime] (hp : 3 ≤ p)
    (S : Set (Fin 3 → ZMod p)) (hS : admissible_plane_set p S)
    (P v : Fin 3 → ZMod p) (hv : v ≠ 0)
    (hℓ : (S ∩ affine_line P v).ncard = p - 1) :
    ∃ (Q w : Fin 3 → ZMod p), w ≠ 0 ∧ affine_line Q w ⊆ S ∧ is_cylinder_in_direction p S w
affine_line_p_minus_one_light_planes_existIn LeanCombinatorics for TCS

Let p ≥ 3 be a prime, and let S ⊆ (ℤ/pℤ)³ be an admissible plane set. If S meets the affine line through P in nonzero direction v in p - 1 points, then there exist two nonzero linear functionals f₁, f₂ defining distinct affine planes containing the line, each meeting S in exactly p points.

theorem affine_line_p_minus_one_light_planes_exist
    (p : ℕ) [Fact p.Prime] (hp : 3 ≤ p)
    (S : Set (Fin 3 → ZMod p)) (hS : admissible_plane_set p S)
    (P v : Fin 3 → ZMod p) (hv : v ≠ 0)
    (hℓ : (S ∩ affine_line P v).ncard = p - 1) :
    ∃ (f₁ f₂ : (Fin 3 → ZMod p) →ₗ[ZMod p] ZMod p),
      f₁ ≠ 0 ∧ f₂ ≠ 0 ∧
      affine_line P v ⊆ affine_plane f₁ (f₁ P) ∧
      affine_line P v ⊆ affine_plane f₂ (f₂ P) ∧
      affine_plane f₁ (f₁ P) ≠ affine_plane f₂ (f₂ P) ∧
      (S ∩ affine_plane f₁ (f₁ P)).ncard = p ∧
      (S ∩ affine_plane f₂ (f₂ P)).ncard = p
affine_line_sub_plane_iff_vanishingIn LeanCombinatorics for TCS

An affine line through P in nonzero direction v is contained in the affine plane defined by f(x) = f(P) if and only if f(v) = 0.

theorem affine_line_sub_plane_iff_vanishing
    (p : ℕ) [Fact p.Prime] (P v : Fin 3 → ZMod p)
    (f : (Fin 3 → ZMod p) →ₗ[ZMod p] ZMod p) :
    affine_line P v ⊆ affine_plane f (f P) ↔ f v = 0
affine_plane_fiber_card_leIn LeanCombinatorics for TCS

For any nonzero linear functional f on (ZMod p)^3, at most p - 1 nonzero functionals g satisfy affine_plane g (g P) = affine_plane f (f P).

theorem affine_plane_fiber_card_le
    (p : ℕ) [Fact p.Prime] (P : Fin 3 → ZMod p)
    (f : (Fin 3 → ZMod p) →ₗ[ZMod p] ZMod p) (hf : f ≠ 0) :
    Nat.card {g : (Fin 3 → ZMod p) →ₗ[ZMod p] ZMod p // g ≠ 0 ∧ affine_plane g (g P) = affine_plane f (f P)} ≤ p - 1
affine_planes_containing_line_intersection_sumIn LeanCombinatorics for TCS

Let p be a prime with [Fact p.Prime], S : Set (Fin 3 → ZMod p) an admissible plane set (admissible_plane_set p S), P ∈ S, and v : Fin 3 → ZMod p a non-zero direction (v ≠ 0). The sum over all H ∈ affine_planes_containing_line p (affine_line P v) of ((S ∩ H).ncard : ℤ) equals (p : ℤ)^2 + (p : ℤ) * ((S ∩ affine_line P v).ncard : ℤ).

open Classical in
theorem affine_planes_containing_line_intersection_sum
    (p : ℕ) [Fact p.Prime] (S : Set (Fin 3 → ZMod p)) (hS : admissible_plane_set p S)
    (P v : Fin 3 → ZMod p) (hv : v ≠ 0) (hP : P ∈ S) :
    (∑ H ∈ affine_planes_containing_line p (affine_line P v), ((S ∩ H).ncard : ℤ)) =
      (p : ℤ) ^ 2 + (p : ℤ) * ((S ∩ affine_line P v).ncard : ℤ)
affine_planes_through_point_intersection_sumIn LeanCombinatorics for TCS

Let p be a prime with [Fact p.Prime], S : Set (Fin 3 → ZMod p) an admissible plane set (admissible_plane_set p S), and P ∈ S. The sum over all H ∈ affine_planes_through p P of ((S ∩ H).ncard : ℤ) equals (p : ℤ)^3 + 2 * (p : ℤ)^2.

open Classical in
theorem affine_planes_through_point_intersection_sum
    (p : ℕ) [Fact p.Prime] (S : Set (Fin 3 → ZMod p)) (hS : admissible_plane_set p S)
    (P : Fin 3 → ZMod p) (hP : P ∈ S) :
    (∑ H ∈ affine_planes_through p P, ((S ∩ H).ncard : ℤ)) = (p : ℤ) ^ 3 + 2 * (p : ℤ) ^ 2
alpha_lexical_adjacent_nondivisible_elementary_stepIn LeanCombinatorics for TCS

For adjacent positive lexical sequences of the same degree n−1 whose meet has degree m−1 with m not dividing n, the later sequence is obtained from the earlier by one elementary operation at a negative cell.

theorem alpha_lexical_adjacent_nondivisible_elementary_step
    (n : ℕ) (a b : List ℕ)
    (ha : alpha_is_lexical a) (hb : alpha_is_lexical b)
    (hsa : a.sum + 1 = n) (hsb : b.sum + 1 = n)
    (hab : alpha_lexical_lt a b)
    (hadj : ∀ c : List ℕ, alpha_is_lexical c → c.sum + 1 = n →
      ¬ (alpha_lexical_lt a c ∧ alpha_lexical_lt c b))
    (hnondvd : ¬ ((alpha_lexical_meet a b).sum + 1) ∣ n) :
    ∃ i : ℕ, i % 2 = 1 ∧ alpha_elementary_cell_step a b i
alpha_lexical_conjugate_of_upper_branchIn LeanCombinatorics for TCS

If two lexical sequences share an even-length prefix p and continue respectively with (x,1) and (y), where y exceeds x+1, then increasing x by one and deleting the following one from the first sequence leaves a lexical sequence. The remaining suffixes may differ and the sequences need not have equal degree.

theorem alpha_lexical_conjugate_of_upper_branch
    (p s t : List ℕ) (x y : ℕ) (heven : p.length % 2 = 0)
    (hxy : x + 1 < y)
    (ha : alpha_is_lexical (p ++ [x, 1] ++ s))
    (hb : alpha_is_lexical (p ++ [y] ++ t)) :
    alpha_is_lexical (p ++ [x + 1] ++ s)
alpha_lexical_failed_even_split_has_later_step_of_primeIn LeanCombinatorics for TCS

At prime degree parameter n, let a be lexical of degree n−1 and let i be a positive even zero-based index with cell value greater than one and a lexical preceding prefix. If splitting cell i does not yield a lexical sequence, then some later even-indexed elementary split or conjugation does yield a lexical sequence.

theorem alpha_lexical_failed_even_split_has_later_step_of_prime
    (n : ℕ) (a : List ℕ) (i : ℕ) (hn : n.Prime)
    (ha : alpha_is_lexical a) (hs : a.sum + 1 = n)
    (hi : 0 < i ∧ i < a.length) (heven : i % 2 = 0)
    (hc : 1 < a.getD i 0) (hp : alpha_is_lexical (a.take i))
    (hfail : ¬ alpha_is_lexical
      (a.take i ++ [a.getD i 0 - 1, 1] ++ a.drop (i + 1))) :
    ∃ j : ℕ, i < j ∧ j % 2 = 0 ∧
      ∃ b : List ℕ, alpha_elementary_cell_step a b j ∧ alpha_is_lexical b
alpha_lexical_negative_split_of_lexical_prefixIn LeanCombinatorics for TCS

Let a be a lexical positive sequence, and let i be an odd zero-based index in range with cell value greater than one. If the prefix of length i is lexical, then splitting cell i into its value minus one followed by one produces a lexical sequence.

theorem alpha_lexical_negative_split_of_lexical_prefix
    (a : List ℕ) (i : ℕ) (ha : alpha_is_lexical a)
    (hi : i < a.length) (hodd : i % 2 = 1)
    (hc : 1 < a.getD i 0) (hp : alpha_is_lexical (a.take i)) :
    alpha_is_lexical (a.take i ++ [a.getD i 0 - 1, 1] ++ a.drop (i + 1))
anti_ramsey_numeric_coreIn LeanCombinatorics for TCS

For every integer n ≥ 22, 3^(n+1) · n^n · 2^(C(n,2)) < 3^(C(n,2)), where C(n,2)=n(n-1)/2.

theorem anti_ramsey_numeric_core (n : ℕ) (hn : 22 ≤ n) : 3 ^ (n + 1) * n ^ n * 2 ^ (n.choose 2) < 3 ^ (n.choose 2)
anti_ramsey_quadratic_grid_lower_bound_and_k3In LeanCombinatorics for TCS

For every integer n ≥ 3, the complete graph on (n - 1)^2 vertices admits a 3-edge-coloring in which every complete subgraph on n vertices contains at least one edge of each color, and the three-colored anti-Ramsey number of K_3 is equal to 4 (realized by K_4 admitting such a coloring and K_5 not admitting one).

theorem anti_ramsey_quadratic_grid_lower_bound_and_k3 :
  (∀ n : ℕ, 3 ≤ n → has_three_colored_anti_ramsey ((n - 1) ^ 2) n) ∧
  (has_three_colored_anti_ramsey 4 3 ∧ ¬ has_three_colored_anti_ramsey 5 3)
anti_ramsey_strict_improvement_fiveIn LeanCombinatorics for TCS

The n = 5 case: N = 19 > 16 admits a 3-colouring of K_19 whose every 5-subset sees all three colours.

theorem anti_ramsey_strict_improvement_five : ∃ N : ℕ, (5 - 1) ^ 2 < N ∧ has_three_colored_anti_ramsey N 5
anti_ramsey_strict_improvement_largeIn LeanCombinatorics for TCS

For every n ≥ 22 there is N > (n-1)^2 admitting a 3-edge-colouring of K_N whose every n-subset sees all three colours (witness N = (n-1)^2+1, via the probabilistic method).

theorem anti_ramsey_strict_improvement_large : ∀ n : ℕ, 22 ≤ n → ∃ N : ℕ, (n - 1) ^ 2 < N ∧ has_three_colored_anti_ramsey N n
anti_ramsey_strict_improvement_seven_to_twentyoneIn LeanCombinatorics for TCS

For each 7 ≤ n ≤ 21 there is N > (n-1)^2 admitting a 3-edge-colouring of K_N whose every n-subset sees all three colours.

theorem anti_ramsey_strict_improvement_seven_to_twentyone : ∀ n : ℕ, 7 ≤ n → n ≤ 21 → ∃ N : ℕ, (n - 1) ^ 2 < N ∧ has_three_colored_anti_ramsey N n
anti_ramsey_strict_improvement_sixIn LeanCombinatorics for TCS

The n = 6 case: N = 26 > 25 admits a 3-colouring of K_26 whose every 6-subset sees all three colours.

theorem anti_ramsey_strict_improvement_six : ∃ N : ℕ, (6 - 1) ^ 2 < N ∧ has_three_colored_anti_ramsey N 6
anti_ramsey_union_bound_numericIn LeanCombinatorics for TCS

For every n ≥ 22, 3 · C((n-1)^2+1, n) · 2^(C(n,2)) < 3^(C(n,2)) — the counting criterion at N = (n-1)^2+1.

theorem anti_ramsey_union_bound_numeric (n : ℕ) (hn : 22 ≤ n) : 3 * (((n - 1) ^ 2 + 1).choose n) * 2 ^ (n.choose 2) < 3 ^ (n.choose 2)
anti_ribbon_map_bij_onIn LeanCombinatorics for TCS

For any standard Young tableau T on a finite diagram D, anti_ribbon_map T is a bijection from standardization_block T onto the set of semi-standard fillings of anti_ribbon_diagram D.card (standard_young_tableau_descent_set T).

theorem anti_ribbon_map_bij_on
    (D : Finset (ℕ × ℕ)) (T : StandardYoungTableau D) :
    Set.BijOn (anti_ribbon_map T) (standardization_block T)
      { M' | is_semistandard (anti_ribbon_diagram D.card (standard_young_tableau_descent_set T)) M' }
anti_ribbon_map_bounds_iffIn LeanCombinatorics for TCS

For any standard Young tableau T on a finite diagram D and any filling M : D → ℕ, all entries of anti_ribbon_map T M lie in {1, ..., m} if and only if all entries of M lie in {1, ..., m}.

theorem anti_ribbon_map_bounds_iff
    {D : Finset (ℕ × ℕ)} (T : StandardYoungTableau D) (M : D → ℕ) (m : ℕ) :
    (∀ p : anti_ribbon_diagram D.card (standard_young_tableau_descent_set T),
      1 ≤ anti_ribbon_map T M p ∧ anti_ribbon_map T M p ≤ m) ↔
    (∀ u : D, 1 ≤ M u ∧ M u ≤ m)
anti_ribbon_map_ssyt_bounded_bij_onIn LeanCombinatorics for TCS

For any finite corner-crossed diagram D : Finset (ℕ × ℕ), any standard Young tableau T on D, and any bound m : ℕ, the anti-ribbon map anti_ribbon_map T is a bijection from the intersection of the bounded semi-standard fillings ssyt_bounded D m with the standardization block standardization_block T onto the bounded semi-standard fillings ssyt_bounded (anti_ribbon_diagram D.card (standard_young_tableau_descent_set T)) m of the anti-ribbon diagram.

theorem anti_ribbon_map_ssyt_bounded_bij_on
    (D : Finset (ℕ × ℕ)) (hD : is_corner_crossed D)
    (T : StandardYoungTableau D) (m : ℕ) :
    Set.BijOn (anti_ribbon_map T)
      { M : D → ℕ | M ∈ ssyt_bounded D m ∧ M ∈ standardization_block T }
      { M' : (anti_ribbon_diagram D.card (standard_young_tableau_descent_set T)) → ℕ |
        M' ∈ ssyt_bounded (anti_ribbon_diagram D.card (standard_young_tableau_descent_set T)) m }
anti_ribbon_map_tableau_entriesIn LeanCombinatorics for TCS

For any standard Young tableau T on D and any filling M in standardization_block T, the anti-ribbon filling anti_ribbon_map T M has the same multiset of entries as M.

theorem anti_ribbon_map_tableau_entries
    (D : Finset (ℕ × ℕ)) (T : StandardYoungTableau D)
    (M : D → ℕ) (hM : M ∈ standardization_block T) :
    tableau_entries (anti_ribbon_map T M) = tableau_entries M
anti_ribbon_schur_expansionIn LeanCombinatorics for TCS

Let D be a finite corner-crossed diagram and let m ≥ 1. Then the Schur polynomial schur_polynomial D m expands as the sum over all standard Young tableaux T : StandardYoungTableau D of the anti-ribbon Schur polynomials anti_ribbon_schur_polynomial D.card (standard_young_tableau_descent_set T) m.

open scoped BigOperators in
theorem anti_ribbon_schur_expansion
    (D : Finset (ℕ × ℕ)) (hD : is_corner_crossed D) (m : ℕ) (hm : 1 ≤ m) :
    schur_polynomial D m =
      ∑ T : StandardYoungTableau D,
        anti_ribbon_schur_polynomial D.card (standard_young_tableau_descent_set T) m
anti_ribbon_ssyt_decompositionIn LeanCombinatorics for TCS

For any corner-crossed finite diagram D : Finset (ℕ × ℕ), a filling M : D → ℕ is semi-standard (is_semistandard D M) if and only if there exists a unique standard Young tableau T on D such that M ∈ standardization_block T. Furthermore, for every standard Young tableau T on D, the map anti_ribbon_map T is a bijection from standardization_block T onto the set of semi-standard fillings of anti_ribbon_diagram D.card (standard_young_tableau_descent_set T), and preserves the multiset of entries (tableau_entries).

theorem anti_ribbon_ssyt_decomposition
    (D : Finset (ℕ × ℕ)) (hD : is_corner_crossed D) :
    (∀ M : D → ℕ, is_semistandard D M ↔ ∃! T : StandardYoungTableau D, M ∈ standardization_block T) ∧
    (∀ (T : StandardYoungTableau D),
      Set.BijOn (anti_ribbon_map T) (standardization_block T)
        { M' | is_semistandard (anti_ribbon_diagram D.card (standard_young_tableau_descent_set T)) M' } ∧
      ∀ M ∈ standardization_block T,
        tableau_entries (anti_ribbon_map T M) = tableau_entries M)
ap_tile_step_card_eqIn LeanCombinatorics for TCS

Given a natural number k with [NeZero k] and a finite subset A : Finset ℕ, if is_ap_tile_step k A holds, then the cardinality of A is k.

theorem ap_tile_step_card_eq (k : ℕ) [NeZero k] (A : Finset ℕ)
    (h : is_ap_tile_step k A) : A.card = k
ap_tile_step_class_countsIn LeanCombinatorics for TCS

For positive integers k ≤ n, exactly n - k * (n / k) residue classes modulo k have n / k + 1 representatives in {1, ..., n}, and the remaining k - (n - k * (n / k)) classes have n / k representatives.

theorem ap_tile_step_class_counts (n k : ℕ) [NeZero k] (hk : k ≤ n) :
    ((Finset.univ : Finset (ZMod k)).filter (fun c =>
      ((Finset.Icc 1 n).filter (fun (a : ℕ) => (a : ZMod k) = c)).card = n / k + 1)).card = n - k * (n / k) ∧
    ((Finset.univ : Finset (ZMod k)).filter (fun c =>
      ((Finset.Icc 1 n).filter (fun (a : ℕ) => (a : ZMod k) = c)).card = n / k)).card = k - (n - k * (n / k))
ap_tile_step_count_fixedIn LeanCombinatorics for TCS

For natural numbers n and k with [NeZero k] and k ≤ n, the number of subsets A of Finset.Icc 1 n satisfying is_ap_tile_step k A is (n / k)^(k - (n - k * (n / k))) * (n / k + 1)^(n - k * (n / k)).

theorem ap_tile_step_count_fixed (n k : ℕ) [NeZero k] (hk : k ≤ n) :
    open scoped Classical in
    (((Finset.Icc 1 n).powerset).filter (fun A => is_ap_tile_step k A)).card =
      (n / k) ^ (k - (n - k * (n / k))) * (n / k + 1) ^ (n - k * (n / k))
as_dt_chessboard_covering_lower_boundIn LeanCombinatorics for TCS

Let n ≥ 3 be a natural number. For any natural numbers p and q, any p ascending shallow paths and q descending steep paths whose traces together cover chessboard n satisfy p + q ≥ n - 1.

theorem as_dt_chessboard_covering_lower_bound (n : ℕ) (hn : 3 ≤ n)
    (p q : ℕ) (as_paths : Fin p → (ℤ → ℤ)) (dt_paths : Fin q → (ℤ → ℤ))
    (has : ∀ i, IsASPath (as_paths i)) (hdt : ∀ j, IsASPath (dt_paths j))
    (hcover : chessboard n ⊆ (Finset.univ.biUnion fun i => asTrace n (as_paths i)) ∪
                            (Finset.univ.biUnion fun j => dtTrace n (dt_paths j))) :
    n - 1 ≤ p + q
avg_pairwise_hamming_dist_eq_half_n_sub_sum_biasIn LeanCombinatorics for TCS

For any finite $F \subseteq (\mathrm{Fin}\ n \to \mathrm{Bool})$ with $|F| \ne 0$, writing $p_i = \#\{x \in F : x(i) = \mathrm{true}\}$ and $M = |F|$, the average pairwise Hamming distance satisfies $\mathrm{avg}(F) = \frac{1}{2}\left(n - \sum_i \left(\frac{M - 2p_i}{M}\right)^2\right)$.

theorem avg_pairwise_hamming_dist_eq_half_n_sub_sum_bias
    (n : ℕ) (F : Finset (Fin n → Bool)) (hF : F.card ≠ 0) :
    avg_pairwise_hamming_dist F =
      ((n : ℝ) - ∑ i : Fin n,
        (((F.card : ℝ) - 2 * ((F.filter (fun x => x i = true)).card : ℝ)) ^ 2 / (F.card : ℝ) ^ 2)) / 2
avg_pairwise_hamming_dist_eq_sum_coordinate_marginalIn LeanCombinatorics for TCS

For any natural number n and any finite subset F ⊆ (Fin n → Bool), the average pairwise Hamming distance of F is equal to the sum over all coordinates i : Fin n of 2 * |{x ∈ F | x(i) = true}| * |{x ∈ F | x(i) = false}| / |F|^2.

theorem avg_pairwise_hamming_dist_eq_sum_coordinate_marginal
    (n : ℕ) (F : Finset (Fin n → Bool)) :
    avg_pairwise_hamming_dist F =
      ∑ i : Fin n, (2 : ℝ) * (F.filter (fun x => x i = true)).card * (F.filter (fun x => x i = false)).card / (F.card : ℝ)^2
avg_pairwise_hamming_dist_ge_half_of_sum_bias_sq_leIn LeanCombinatorics for TCS

If $F \subseteq (\mathrm{Fin}\ n \to \mathrm{Bool})$ is nonempty with coordinate biases $b_i = 1 - 2p_i/|F|$ satisfying $\sum_i b_i^2 \le n - m$, then $\mathrm{avg}(F) \ge m/2$.

theorem avg_pairwise_hamming_dist_ge_half_of_sum_bias_sq_le
    (n m : ℕ) (F : Finset (Fin n → Bool)) (hF : F.card ≠ 0)
    (h : ∑ i : Fin n,
        ((1 : ℝ) - 2 * ((F.filter (fun x => x i = true)).card : ℝ) / (F.card : ℝ)) ^ 2 ≤ (n : ℝ) - m) :
    (m : ℝ) / 2 ≤ avg_pairwise_hamming_dist F
avg_pairwise_hamming_dist_of_card_twoIn LeanCombinatorics for TCS

Let $F \subseteq (\mathrm{Fin}\ n \to \mathrm{Bool})$ have exactly two points. Then $\mathrm{avg}(F) \ge 1/2$, with equality if and only if $F$ is a $1$-dimensional subcube, i.e. its two points differ in exactly one coordinate.

theorem avg_pairwise_hamming_dist_of_card_two
    (n : ℕ) (F : Finset (Fin n → Bool)) (hF : F.card = 2) :
    (1 : ℝ) / 2 ≤ avg_pairwise_hamming_dist F ∧
      (avg_pairwise_hamming_dist F = 1 / 2 ↔ is_subcube 1 F)
avg_pairwise_hamming_dist_of_is_subcubeIn LeanCombinatorics for TCS

If $F \subseteq (\mathrm{Fin}\ n \to \mathrm{Bool})$ is an $m$-dimensional subcube and $|F| = 2^m$, then $\mathrm{avg}(F) = m/2$. In particular this is the achievability direction of the target at every density $2^{m-n}$.

theorem avg_pairwise_hamming_dist_of_is_subcube
    (n m : ℕ) (F : Finset (Fin n → Bool)) (hcube : is_subcube m F) (hcard : F.card = 2 ^ m) :
    avg_pairwise_hamming_dist F = (m : ℝ) / 2
b_zero_no_zero_sum_sixIn LeanCombinatorics for TCS

Let C_0 be the subset of (Fin 6 → Fin 2) consisting of 0, the all-ones vector, and the standard basis vectors, and let B_0 be the subset of (Fin 7 → Fin 2) formed by extending each element of C_0 with 0 and with 1. Every 6-element subset of B_0 has nonzero sum.

theorem b_zero_no_zero_sum_six
    (c_zero : Finset (Fin 6 → Fin 2))
    (hc0 : c_zero = insert 0 (insert (fun _ => 1) (Finset.image (fun i : Fin 6 => Pi.single i (1 : Fin 2)) Finset.univ)))
    (b_zero : Finset (Fin 7 → Fin 2))
    (hb0 : b_zero = Finset.biUnion c_zero (fun c => {Fin.snoc c 0, Fin.snoc c 1}))
    (Y : Finset (Fin 7 → Fin 2)) (hY : Y ⊆ b_zero)
    (hcard : Y.card = 6) :
    ∑ y ∈ Y, y ≠ 0
bh_dense_set_counting_lowerIn LeanCombinatorics for TCS

Lower bound at the checkpoints (paper (3.4)): for h ≥ 2, the counting function of A = ⋃_k S_k at the checkpoint M_k + D_k is at least (1/h - ε) (M_k + D_k)^{1/h} for infinitely many n; this is the "frequently" lower bound with constant 1/h.

open scoped Classical in
theorem bh_dense_set_counting_lower (h : ℕ) (h2 : 2 ≤ h) :
    ∀ ε : ℝ, 0 < ε → ∃ᶠ n : ℕ in Filter.atTop,
      (1 / (h : ℝ) - ε) * (n : ℝ) ^ ((1 : ℝ) / (h : ℝ))
        ≤ (((Finset.Icc 1 n).filter (· ∈ bh_dense_set h)).card : ℝ)
bh_dense_set_counting_upperIn LeanCombinatorics for TCS

Upper bound on the counting function (paper (3.6)): for h ≥ 2 and every ε > 0, all sufficiently large n satisfy A(n) ≤ (1/h + ε) n^{1/h} for A = ⋃_k S_k.

open scoped Classical in
theorem bh_dense_set_counting_upper (h : ℕ) (h2 : 2 ≤ h) :
    ∀ ε : ℝ, 0 < ε → ∀ᶠ n : ℕ in Filter.atTop,
      (((Finset.Icc 1 n).filter (· ∈ bh_dense_set h)).card : ℝ)
        ≤ (1 / (h : ℝ) + ε) * (n : ℝ) ^ ((1 : ℝ) / (h : ℝ))
bh_dense_set_density_eqIn LeanCombinatorics for TCS

Glue: the two counting bounds imply bh_upper_density h (bh_dense_set h) = 1/h, and together with the structural facts this yields the target existence statement.

theorem bh_dense_set_density_eq (h : ℕ) (h2 : 2 ≤ h) :
    bh_upper_density h (bh_dense_set h) = (1 : ℝ) / (h : ℝ)
bh_dense_set_is_bhIn LeanCombinatorics for TCS

The constructed set A = ⋃_k S_k is infinite and is a B_h set, for every h ≥ 2.

theorem bh_dense_set_is_bh (h : ℕ) (h2 : 2 ≤ h) :
    (bh_dense_set h).Infinite ∧ is_bh h (bh_dense_set h)
bh_dense_stage_card_smallIn LeanCombinatorics for TCS

Negligibility of accumulated elements (paper (3.5)): for h ≥ 2 and every ε > 0, for all sufficiently large k, the number of elements in the stage S_k is at most ε q_k, where q_k is the prime chosen for the next block.

theorem bh_dense_stage_card_small (h : ℕ) (h2 : 2 ≤ h) :
    ∀ ε : ℝ, 0 < ε → ∀ᶠ k : ℕ in Filter.atTop,
      ((bh_dense_stage h k).card : ℝ)
        ≤ ε * ((bh_dense_prime h ((bh_dense_stage h k).sup id) : ℝ))
bh_dense_stage_is_bhIn LeanCombinatorics for TCS

Correctness of the recursion: for h ≥ 2 every stage S_k is a finite B_h set, and the stages are nested with strictly increasing maxima.

theorem bh_dense_stage_is_bh (h : ℕ) (h2 : 2 ≤ h) (k : ℕ) :
    is_bh h ((bh_dense_stage h k : Finset ℕ) : Set ℕ)
bh_dense_stage_succ_geometryIn LeanCombinatorics for TCS

Stage geometry: for h ≥ 2 and any k, put n = max S_k, q = bh_dense_prime h n, D = h^(h-1) q^h, M = (h-1)D + q. Then every element of S_k is ≤ n, every element of the newly appended block M + B_q lies strictly between n and M + D, the stage grows by exactly q elements, and the new maximum exceeds n. Consequently the stages are nested with sup S_k strictly increasing.

theorem bh_dense_stage_succ_geometry (h k : ℕ) (h2 : 2 ≤ h) :
    (∀ x ∈ bh_dense_stage h k, x ≤ (bh_dense_stage h k).sup id) ∧
    (let q := bh_dense_prime h ((bh_dense_stage h k).sup id)
     let D := h ^ (h - 1) * q ^ h
     let M := (h - 1) * D + q
     ((bh_dense_stage h k).sup id < M ∧ M + D = M + D ∧
      (∀ x ∈ (moment_block h q).image (fun y => M + y), (bh_dense_stage h k).sup id < x ∧ x ≤ M + D) ∧
      (bh_dense_stage h (k + 1)).card = (bh_dense_stage h k).card + q ∧
      (bh_dense_stage h k).sup id < (bh_dense_stage h (k + 1)).sup id))
bh_set_extend_by_blockIn LeanCombinatorics for TCS

Extension lemma (paper Lemma 3.1): let h ≥ 2, let S ⊆ [1,n] and B ⊆ [0,D) be finite B_h sets, suppose q > h·n and suppose distinct r-element multisets from B with 1 ≤ r ≤ h-1 have sums differing by at least q in absolute value. Then S ∪ ((h-1)D + q + B) is again a B_h set.

theorem bh_set_extend_by_block (h n D q : ℕ) (h2 : 2 ≤ h) (S B : Finset ℕ)
    (hSne : S.Nonempty) (hS1 : ∀ x ∈ S, 1 ≤ x) (hSn : ∀ x ∈ S, x ≤ n)
    (hBne : B.Nonempty) (hB0 : ∀ x ∈ B, x < D)
    (hSbh : is_bh h (S : Set ℕ)) (hBbh : is_bh h (B : Set ℕ))
    (hsep : ∀ (r : ℕ), 1 ≤ r → r ≤ h - 1 → ∀ m m' : Multiset ℕ,
      (∀ x ∈ m, x ∈ B) → (∀ x ∈ m', x ∈ B) → m.card = r → m'.card = r → m ≠ m' →
      q ≤ ((m.sum : ℤ) - (m'.sum : ℤ)).natAbs)
    (hqn : h * n < q) :
    is_bh h (((S ∪ B.image (fun x => (h - 1) * D + q + x)) : Finset ℕ) : Set ℕ)
bijection_reduced_latin_squares_perfect_setsIn LeanCombinatorics for TCS

For every natural number n with n ≥ 2, the map reduced_latin_square_to_perfect_set is a bijection (in the sense of Set.BijOn) from the set of reduced Latin squares of order n onto the set of perfect sets of order n.

theorem bijection_reduced_latin_squares_perfect_sets (n : ℕ) [NeZero n] (hn : 2 ≤ n) :
    Set.BijOn (reduced_latin_square_to_perfect_set (n := n))
      {R | is_reduced_latin_square R}
      {S | is_perfect_set n S}
binary_tree_height_le_card_labelsIn LeanCombinatorics for TCS

For any type α with decidable equality and any binary tree t : BinaryTree α, if binary_tree_no_ancestor_descendant_repeat t holds, then t.height ≤ (binary_tree_labels t).card.

theorem binary_tree_height_le_card_labels {α : Type*} [DecidableEq α] (t : BinaryTree α)
    (h : binary_tree_no_ancestor_descendant_repeat t) :
    t.height ≤ (binary_tree_labels t).card
binary_tree_num_nodes_le_pow_heightIn LeanCombinatorics for TCS

For any type α and any binary tree t : BinaryTree α, the number of nodes t.numNodes is at most 2 ^ t.height - 1.

theorem binary_tree_num_nodes_le_pow_height {α : Type*} (t : BinaryTree α) :
    t.numNodes ≤ 2 ^ t.height - 1
bipartite_common_neighbors_sum_eqIn LeanCombinatorics for TCS

Let G be a bipartite simple graph on L ⊕ R with edges only between L and R. Then the sum over all pairs (u, v) of distinct vertices in L of the number of common neighbors of u and v in G equals the sum over w in R of deg(w) * (deg(w) - 1).

theorem bipartite_common_neighbors_sum_eq
    {L R : Type*} [Fintype L] [Fintype R] [DecidableEq L] [DecidableEq R]
    (G : SimpleGraph (L ⊕ R)) [DecidableRel G.Adj]
    (hG : G ≤ completeBipartiteGraph L R) :
    (∑ p ∈ (Finset.univ : Finset L).offDiag,
      Fintype.card (G.commonNeighbors (Sum.inl p.1) (Sum.inl p.2))) =
    ∑ w : R, G.degree (Sum.inr w) * (G.degree (Sum.inr w) - 1)
bipartite_four_cycle_tuples_card_eq_four_mul_copyCountIn LeanCombinatorics for TCS

The number of 4-tuples ((u, v), (x, y)) in (L × L) × (R × R) with u ≠ v, x ≠ y, and all 4 edges between {u, v} and {x, y} present in G equals 4 times the number of subgraphs of G isomorphic to cycleGraph 4.

theorem bipartite_four_cycle_tuples_card_eq_four_mul_copyCount
    {L R : Type*} [Fintype L] [Fintype R] [DecidableEq L] [DecidableEq R]
    (G : SimpleGraph (L ⊕ R)) [DecidableRel G.Adj]
    (hG : G ≤ completeBipartiteGraph L R) :
    (Finset.filter (fun p : (L × L) × (R × R) =>
      p.1.1 ≠ p.1.2 ∧ p.2.1 ≠ p.2.2 ∧
      G.Adj (Sum.inl p.1.1) (Sum.inr p.2.1) ∧
      G.Adj (Sum.inl p.1.1) (Sum.inr p.2.2) ∧
      G.Adj (Sum.inl p.1.2) (Sum.inr p.2.1) ∧
      G.Adj (Sum.inl p.1.2) (Sum.inr p.2.2))
      (Finset.univ : Finset ((L × L) × (R × R)))).card =
      4 * G.copyCount (SimpleGraph.cycleGraph 4)
bipartite_four_cycle_tuples_card_eq_sum_common_neighborsIn LeanCombinatorics for TCS

The number of 4-tuples ((u, v), (x, y)) in (L × L) × (R × R) with u ≠ v, x ≠ y, and all 4 edges between {u, v} and {x, y} present in G equals the sum over distinct pairs (u, v) in L of c(u, v) * (c(u, v) - 1), where c(u, v) is the number of common neighbors of u and v in G.

theorem bipartite_four_cycle_tuples_card_eq_sum_common_neighbors
    {L R : Type*} [Fintype L] [Fintype R] [DecidableEq L] [DecidableEq R]
    (G : SimpleGraph (L ⊕ R)) [DecidableRel G.Adj]
    (hG : G ≤ completeBipartiteGraph L R) :
    (Finset.filter (fun p : (L × L) × (R × R) =>
      p.1.1 ≠ p.1.2 ∧ p.2.1 ≠ p.2.2 ∧
      G.Adj (Sum.inl p.1.1) (Sum.inr p.2.1) ∧
      G.Adj (Sum.inl p.1.1) (Sum.inr p.2.2) ∧
      G.Adj (Sum.inl p.1.2) (Sum.inr p.2.1) ∧
      G.Adj (Sum.inl p.1.2) (Sum.inr p.2.2))
      (Finset.univ : Finset ((L × L) × (R × R)))).card =
      ∑ p ∈ (Finset.univ : Finset L).offDiag,
        Fintype.card (G.commonNeighbors (Sum.inl p.1) (Sum.inl p.2)) *
        (Fintype.card (G.commonNeighbors (Sum.inl p.1) (Sum.inl p.2)) - 1)
bipartite_four_cycles_count_eq_sum_common_neighborsIn LeanCombinatorics for TCS

Let G be a bipartite simple graph on L ⊕ R with edges only between L and R. Then four times the number of subgraphs of G isomorphic to the 4-cycle cycleGraph 4 equals the sum over all pairs (u, v) of distinct vertices in L of the product c(u, v) * (c(u, v) - 1), where c(u, v) is the number of common neighbors of u and v in G.

theorem bipartite_four_cycles_count_eq_sum_common_neighbors
    {L R : Type*} [Fintype L] [Fintype R] [DecidableEq L] [DecidableEq R]
    (G : SimpleGraph (L ⊕ R)) [DecidableRel G.Adj]
    (hG : G ≤ completeBipartiteGraph L R) :
    4 * G.copyCount (SimpleGraph.cycleGraph 4) =
      ∑ p ∈ (Finset.univ : Finset L).offDiag,
        Fintype.card (G.commonNeighbors (Sum.inl p.1) (Sum.inl p.2)) *
        (Fintype.card (G.commonNeighbors (Sum.inl p.1) (Sum.inl p.2)) - 1)
bipartite_four_cycles_lower_boundIn LeanCombinatorics for TCS

Let G be a bipartite simple graph on L ⊕ R with edges only between L and R, where |L| = a ≥ 2, |R| = b ≥ 2, and m is the number of edges in G. If m ≥ 2 * (a * Real.sqrt b + b * Real.sqrt a), then the number of subgraphs of G isomorphic to the 4-cycle cycleGraph 4 is at least m^4 / (32 * a^2 * b^2).

theorem bipartite_four_cycles_lower_bound
    {L R : Type*} [Fintype L] [Fintype R] [DecidableEq L] [DecidableEq R]
    (G : SimpleGraph (L ⊕ R)) [DecidableRel G.Adj]
    (hG : G ≤ completeBipartiteGraph L R)
    (ha : 2 ≤ Fintype.card L) (hb : 2 ≤ Fintype.card R)
    (hm : 2 * ((Fintype.card L : ℝ) * Real.sqrt (Fintype.card R) +
               (Fintype.card R : ℝ) * Real.sqrt (Fintype.card L)) ≤ (G.edgeFinset.card : ℝ)) :
    ((G.edgeFinset.card : ℝ) ^ 4) /
      (32 * (Fintype.card L : ℝ) ^ 2 * (Fintype.card R : ℝ) ^ 2) ≤
    (G.copyCount (SimpleGraph.cycleGraph 4) : ℝ)
bipartite_regular_fibre_perfect_matchingIn LeanCombinatorics for TCS

A d-regular bipartite multigraph, in fibre form, has a perfect matching: if d ≥ 1 and every fibre of f and of g is either empty or of size exactly d, then there is a finite set S of edges which is injective on f-fibres and on g-fibres and which meets every occurring fibre of f, and every occurring fibre of g, exactly once.

theorem bipartite_regular_fibre_perfect_matching {α : Type*} [Fintype α] (f g : α → ℕ) (d : ℕ)
    (hd : 1 ≤ d)
    (hf : ∀ γ : ℕ, {e | f e = γ}.ncard = d ∨ {e | f e = γ}.ncard = 0)
    (hg : ∀ γ : ℕ, {e | g e = γ}.ncard = d ∨ {e | g e = γ}.ncard = 0) :
    ∃ S : Finset α,
      (∀ e₁ ∈ S, ∀ e₂ ∈ S, f e₁ = f e₂ → e₁ = e₂) ∧
      (∀ e₁ ∈ S, ∀ e₂ ∈ S, g e₁ = g e₂ → e₁ = e₂) ∧
      (∀ e : α, ∃ e' ∈ S, f e' = f e) ∧
      (∀ e : α, ∃ e' ∈ S, g e' = g e)
bipartite_sum_degrees_right_eq_card_edgesIn LeanCombinatorics for TCS

Let G be a bipartite simple graph on L ⊕ R with edges only between L and R. Then the sum over all w in R of the degree of w in G equals the number of edges in G.

theorem bipartite_sum_degrees_right_eq_card_edges
    {L R : Type*} [Fintype L] [Fintype R] [DecidableEq L] [DecidableEq R]
    (G : SimpleGraph (L ⊕ R)) [DecidableRel G.Adj]
    (hG : G ≤ completeBipartiteGraph L R) :
    (∑ w : R, G.degree (Sum.inr w)) = G.edgeFinset.card
bitword_rotate_fixed_imp_constantIn LeanCombinatorics for TCS

For prime n, if an n-bit word x is fixed by a nontrivial rotation (0<r<n) then x is constant (all zeros or all ones); equivalently every nonconstant n-bit word has exactly n distinct rotations.

theorem bitword_rotate_fixed_imp_constant (n x r : ℕ) (hn : n.Prime) (hx : x < 2 ^ n) (hr0 : 0 < r) (hrn : r < n) (hfix : (bitword_rotate n)^[r] x = x) : x = 0 ∨ x = 2 ^ n - 1
bitword_rotate_iterate_testBitIn LeanCombinatorics for TCS

Bit j of the r-fold rotation of an n-bit word x is bit (j+n−r mod n) of x, for r ≤ n and j < n.

theorem bitword_rotate_iterate_testBit (n x r j : ℕ) (hx : x < 2 ^ n) (hr : r ≤ n) (hj : j < n) : ((bitword_rotate n)^[r] x).testBit j = x.testBit ((j + n - r) % n)
bitword_rotate_ltIn LeanCombinatorics for TCS

Rotating an n-bit word (n ≥ 1) by one position keeps it an n-bit word.

theorem bitword_rotate_lt (n x : ℕ) (hn : 1 ≤ n) (hx : x < 2 ^ n) : bitword_rotate n x < 2 ^ n
bitword_rotate_right_one_xor_one_rotate_leftIn LeanCombinatorics for TCS

For an odd n-bit word x (n ≥ 2), rotating right once, flipping the lowest bit, and rotating left once yields x XOR 2.

theorem bitword_rotate_right_one_xor_one_rotate_left (n x : ℕ) (hn : 2 ≤ n)
    (hx : x < 2 ^ n) (hxodd : x % 2 = 1) :
    bitword_rotate n (((bitword_rotate n)^[n - 1] x) ^^^ 1) = x ^^^ 2
bitword_rotate_testBitIn LeanCombinatorics for TCS

Bit j (j<n) of the rotation of an n-bit word x is bit (j+n−1 mod n) of x.

theorem bitword_rotate_testBit (n x j : ℕ) (hx : x < 2 ^ n) (hj : j < n) : (bitword_rotate n x).testBit j = x.testBit ((j + n - 1) % n)
bitword_rotate_two_powIn LeanCombinatorics for TCS

Rotating 2^k (k < n) yields 2^k' for some k' < n.

theorem bitword_rotate_two_pow (n k : ℕ) (hn : 1 ≤ n) (hk : k < n) : ∃ k' < n, bitword_rotate n (2 ^ k) = 2 ^ k'
bitword_rotate_xorIn LeanCombinatorics for TCS

For n-bit words x,y, rotation of (x xor y) equals (rotation of x) xor (rotation of y).

theorem bitword_rotate_xor (n x y : ℕ) (hx : x < 2 ^ n) (hy : y < 2 ^ n) : bitword_rotate n (x ^^^ y) = bitword_rotate n x ^^^ bitword_rotate n y
block_latin_filling_is_latinIn LeanCombinatorics for TCS

For a Young diagram $\mu$ with $w = \text{young\_diagram\_part\_gcd}(\mu) > 0$, if the maximum multiplicity of any part length in $\mu$ is at most $w$, then the block filling with width $w$ is a Latin tableau of shape $\mu$ and type $\mu'$, satisfying is_latin_tableau μ (block_latin_filling μ w).

theorem block_latin_filling_is_latin (μ : YoungDiagram) (w : ℕ)
    (hw : w = young_diagram_part_gcd μ) (hw_pos : 0 < w)
    (hm : young_diagram_max_multiplicity μ ≤ w) :
    is_latin_tableau μ (block_latin_filling μ w)
book_facets_cohen_macaulayIn LeanCombinatorics for TCS

Let a < b in a linearly ordered vertex set and let C be a nonempty set of vertices all above b. Then the book complex with spine {a,b} and pages {a,b,c} (c in C) is Cohen-Macaulay over every field: it is pure of dimension 2, its 1-skeleton is connected, the links of a and of b are stars, the link of every c is a single edge, and the complex is contractible so H_1 = 0.

theorem book_facets_cohen_macaulay {V : Type*} [DecidableEq V] [LinearOrder V] (a b : V)
    (C : Finset V) (k : Type*) [Field k] (hab : a < b) (hC : ∀ c ∈ C, b < c)
    (hne : C.Nonempty) :
    is_cohen_macaulay_two_complex (C.image (fun c => ({a, b, c} : Finset V))) k
book_facets_partitionableIn LeanCombinatorics for TCS

The book complex with spine {a,b} and pages {a,b,c} for c in C (a != b and no c in C equal to a or b) is partitionable: the interval of one page is the whole boolean lattice on that page, and every other page contributes only the interval from its private vertex c up to itself.

theorem book_facets_partitionable {V : Type*} [DecidableEq V] (a b : V) (C : Finset V)
    (hab : a ≠ b) (hC : ∀ c ∈ C, c ≠ a ∧ c ≠ b) :
    is_partitionable_two_complex (C.image (fun c => ({a, b, c} : Finset V)))
boolean_affine_restriction_degree_le_finrankIn LeanCombinatorics for TCS

For any natural number n, Boolean function p : (Fin n → ZMod 2) → ZMod 2, vector a : Fin n → ZMod 2, and subspace U : Submodule (ZMod 2) (Fin n → ZMod 2), the degree booleanDegree (booleanAffineRestriction p a U) of the affine restriction is at most Module.finrank (ZMod 2) U.

theorem boolean_affine_restriction_degree_le_finrank {n : ℕ}
    (p : (Fin n → ZMod 2) → ZMod 2) (a : Fin n → ZMod 2)
    (U : Submodule (ZMod 2) (Fin n → ZMod 2)) :
    booleanDegree (booleanAffineRestriction p a U) ≤ Module.finrank (ZMod 2) U
boolean_cube_dist_two_isoperimetricIn LeanCombinatorics for TCS

Let m, d be natural numbers such that 1 ≤ m and m ≤ d / 2, and let X : Finset (Fin d → Fin 2) be a finite subset satisfying X.card ≤ Nat.choose d m. Then boolean_cube_dist_two_pairs X ≤ 4 * m * d * X.card.

theorem boolean_cube_dist_two_isoperimetric (d m : ℕ) (hm : 1 ≤ m) (hmd : m ≤ d / 2)
    (X : Finset (Fin d → Fin 2)) (hX : X.card ≤ Nat.choose d m) :
    boolean_cube_dist_two_pairs X ≤ 4 * m * d * X.card
boolean_cube_dist_two_pairs_le_trivialIn LeanCombinatorics for TCS

For any dimension d : ℕ and any finite subset X : Finset (Fin d → Fin 2), the number of ordered pairs boolean_cube_dist_two_pairs X is at most Nat.choose d 2 * X.card.

theorem boolean_cube_dist_two_pairs_le_trivial (d : ℕ) (X : Finset (Fin d → Fin 2)) :
    boolean_cube_dist_two_pairs X ≤ Nat.choose d 2 * X.card
boolean_cube_factorial_choose_lt_powIn LeanCombinatorics for TCS

For all natural numbers m and d such that 1 ≤ m and m ≤ d / 2, the product of m!, Nat.choose (2 * m) m, and Nat.choose d m is strictly less than 4^m * d^m.

theorem boolean_cube_factorial_choose_lt_pow (d m : ℕ) (hm : 1 ≤ m) (hmd : m ≤ d / 2) :
    m.factorial * Nat.choose (2 * m) m * Nat.choose d m < 4 ^ m * d ^ m
boolean_degree_le_dimIn LeanCombinatorics for TCS

For any natural number n and Boolean function p : (Fin n → ZMod 2) → ZMod 2, the degree booleanDegree p is at most n.

theorem boolean_degree_le_dim {n : ℕ} (p : (Fin n → ZMod 2) → ZMod 2) :
    booleanDegree p ≤ n
boolean_relation_capturing_add_selection_degree_geIn LeanCombinatorics for TCS

Let R ⊆ {0, 1}^k be a Boolean relation and b ∉ R an unsatisfying tuple. Let d_R(b) be the minimum total degree of an integer polynomial p vanishing on R with p(b) ≠ 0, and s_R(b) the minimum total degree of an integer polynomial q with q(b) ≠ 0 and q(a) = 0 for all a ∉ R with a ≠ b. Then k ≤ d_R(b) + s_R(b).

theorem boolean_relation_capturing_add_selection_degree_ge
    {k : ℕ} (R : Set (Fin k → Bool)) (b : Fin k → Bool) (hb : b ∉ R) :
    let dR := sInf {d : ℕ | ∃ p : MvPolynomial (Fin k) ℤ,
      (∀ a ∈ R, MvPolynomial.eval (fun i => if a i then (1 : ℤ) else 0) p = 0) ∧
      MvPolynomial.eval (fun i => if b i then (1 : ℤ) else 0) p ≠ 0 ∧
      p.totalDegree = d}
    let sR := sInf {d : ℕ | ∃ q : MvPolynomial (Fin k) ℤ,
      MvPolynomial.eval (fun i => if b i then (1 : ℤ) else 0) q ≠ 0 ∧
      (∀ a, a ∉ R → a ≠ b → MvPolynomial.eval (fun i => if a i then (1 : ℤ) else 0) q = 0) ∧
      q.totalDegree = d}
    k ≤ dR + sR
boolean_relation_capturing_selection_dualityIn LeanCombinatorics for TCS

Let R ⊊ {0, 1}^k be a nonempty proper Boolean relation of arity k. For any unsatisfying tuple b ∉ R, let d_R(b) be the minimum total degree of an integer polynomial p vanishing on R with p(b) ≠ 0, and let s_R(b) be the minimum total degree of an integer polynomial q with q(b) ≠ 0 and q(a) = 0 for every unsatisfying tuple a ∉ R with a ≠ b. Then d_R(b) + s_R(b) = k for every b ∉ R. Furthermore, if d is the minimum total degree of an integer polynomial capturing R (vanishing on R and nonvanishing outside R), then there exists an unsatisfying tuple b ∉ R and an integer multilinear polynomial q of total degree k - d that selects b with q(b) > 0.

theorem boolean_relation_capturing_selection_duality
    {k : ℕ} (R : Set (Fin k → Bool)) (hR_nonempty : R.Nonempty) (hR_proper : R ≠ Set.univ) :
    let dR := fun (b : Fin k → Bool) => sInf {d : ℕ | ∃ p : MvPolynomial (Fin k) ℤ,
      (∀ a ∈ R, MvPolynomial.eval (fun i => if a i then (1 : ℤ) else 0) p = 0) ∧
      MvPolynomial.eval (fun i => if b i then (1 : ℤ) else 0) p ≠ 0 ∧
      p.totalDegree = d}
    let sR := fun (b : Fin k → Bool) => sInf {d : ℕ | ∃ q : MvPolynomial (Fin k) ℤ,
      MvPolynomial.eval (fun i => if b i then (1 : ℤ) else 0) q ≠ 0 ∧
      (∀ a, a ∉ R → a ≠ b → MvPolynomial.eval (fun i => if a i then (1 : ℤ) else 0) q = 0) ∧
      q.totalDegree = d}
    let degZ := sInf {d : ℕ | ∃ p : MvPolynomial (Fin k) ℤ,
      (∀ a, MvPolynomial.eval (fun i => if a i then (1 : ℤ) else 0) p = 0 ↔ a ∈ R) ∧
      p.totalDegree = d}
    (∀ b, b ∉ R → dR b + sR b = k) ∧
    (∃ b, b ∉ R ∧ ∃ q : MvPolynomial (Fin k) ℤ,
      (∀ i : Fin k, q.degreeOf i ≤ 1) ∧
      MvPolynomial.eval (fun i => if b i then (1 : ℤ) else 0) q > 0 ∧
      (∀ a, a ∉ R → a ≠ b → MvPolynomial.eval (fun i => if a i then (1 : ℤ) else 0) q = 0) ∧
      q.totalDegree = k - degZ)
boolean_relation_selection_degree_leIn LeanCombinatorics for TCS

Let R ⊆ {0, 1}^k be a Boolean relation and b ∉ R an unsatisfying tuple. Let d_R(b) be the minimum total degree of an integer polynomial p vanishing on R with p(b) ≠ 0, and s_R(b) the minimum total degree of an integer polynomial q with q(b) ≠ 0 and q(a) = 0 for all a ∉ R with a ≠ b. Then s_R(b) ≤ k - d_R(b).

theorem boolean_relation_selection_degree_le
    {k : ℕ} (R : Set (Fin k → Bool)) (b : Fin k → Bool) (hb : b ∉ R) :
    let dR := sInf {d : ℕ | ∃ p : MvPolynomial (Fin k) ℤ,
      (∀ a ∈ R, MvPolynomial.eval (fun i => if a i then (1 : ℤ) else 0) p = 0) ∧
      MvPolynomial.eval (fun i => if b i then (1 : ℤ) else 0) p ≠ 0 ∧
      p.totalDegree = d}
    let sR := sInf {d : ℕ | ∃ q : MvPolynomial (Fin k) ℤ,
      MvPolynomial.eval (fun i => if b i then (1 : ℤ) else 0) q ≠ 0 ∧
      (∀ a, a ∉ R → a ≠ b → MvPolynomial.eval (fun i => if a i then (1 : ℤ) else 0) q = 0) ∧
      q.totalDegree = d}
    sR ≤ k - dR
box_prod_dist_eqIn LeanCombinatorics for TCS

In the Cartesian product P_k □ P_k of two paths on Fin k, the graph distance between (i,j) and (i',j') is |i-i'| + |j-j'|.

theorem box_prod_dist_eq (k : ℕ) (x y : Fin k × Fin k) :
    ((SimpleGraph.pathGraph k) □ (SimpleGraph.pathGraph k)).dist x y
      = Nat.dist x.1.val y.1.val + Nat.dist x.2.val y.2.val
brgc_first_rank_word_ne_two_pow_sub_threeIn LeanCombinatorics for TCS

For length at least 3, no first-occurrence Gray rank encodes 2^n - 3: rotating 2^n - 3 left by n-2 positions yields a word beginning with 0 whose inverse Gray rank is strictly less than 2^{n-1}, whereas the rank of 2^n - 3 is at least 2^{n-1}, contradicting minimality.

theorem brgc_first_rank_word_ne_two_pow_sub_three (n t : ℕ) (hn : 3 ≤ n) (ht : brgc_necklace_first_rank n t) :
    brgc_word t ≠ 2 ^ n - 3
brgc_inverse_rotation_max_uniqueIn LeanCombinatorics for TCS

Two rotations in the same necklace that both maximize inverse Gray rank are equal.

theorem brgc_inverse_rotation_max_unique (n x y : ℕ) (hn : 2 ≤ n)
    (hx : x < 2 ^ n) (hy : y < 2 ^ n)
    (hrot : bitword_is_rotation n x y) (hrot' : bitword_is_rotation n y x)
    (hmax_x : ∀ r < n, brgc_inverse n ((bitword_rotate n)^[r] x) ≤ brgc_inverse n x)
    (hmax_y : ∀ r < n, brgc_inverse n ((bitword_rotate n)^[r] y) ≤ brgc_inverse n y) :
    x = y
brgc_necklace_first_rank_pair_of_primeIn LeanCombinatorics for TCS

For prime length at least three, first-occurrence ranks come in the consecutive pairs 4k+1 and 4k+2.

theorem brgc_necklace_first_rank_pair_of_prime (n t : ℕ) (hn : n.Prime) (hn3 : 3 ≤ n) (ht : brgc_necklace_first_rank n t) : brgc_necklace_first_rank n (t ^^^ 3)
c_two_pow_seven_prod_c_six_zero_sum_constant_ge_thirty_threeIn LeanCombinatorics for TCS

The minimal integer k such that every multiset of size k over (Fin 7 → Fin 2) × ZMod 6 contains a submultiset of cardinality 6 summing to 0 is at least 33.

theorem c_two_pow_seven_prod_c_six_zero_sum_constant_ge_thirty_three :
    33 ≤ erdos_ginzburg_ziv_constant ((Fin 7 → Fin 2) × ZMod 6) 6
c_zero_even_zero_sum_eq_eightIn LeanCombinatorics for TCS

Let C_0 be the subset of (Fin 6 → Fin 2) consisting of 0, the all-ones vector, and the standard basis vectors. Every nonempty subset X of C_0 of even cardinality that sums to 0 has cardinality 8.

theorem c_zero_even_zero_sum_eq_eight
    (c_zero : Finset (Fin 6 → Fin 2))
    (hc0 : c_zero = insert 0 (insert (fun _ => 1) (Finset.image (fun i : Fin 6 => Pi.single i (1 : Fin 2)) Finset.univ)))
    (X : Finset (Fin 6 → Fin 2)) (hX : X ⊆ c_zero)
    (hne : X.Nonempty) (heven : Even X.card)
    (hsum : ∑ x ∈ X, x = 0) :
    X.card = 8
canonical_partition_star_56_cardIn LeanCombinatorics for TCS

The canonical t-star T_{t+56,t} (partitions of t+56 with at least t ones) has exactly p(56) = 526823 members: deleting t of the ones is a bijection with the partitions of 56.

theorem canonical_partition_star_56_card (t : ℕ) (ht : 1 ≤ t) :
    (canonical_partition_star (t + 56) t).card = 526823
card_affine_planes_containing_lineIn LeanCombinatorics for TCS

For any prime p with [Fact p.Prime], point P : Fin 3 → ZMod p, and non-zero direction v : Fin 3 → ZMod p (with v ≠ 0), the cardinality of the Finset affine_planes_containing_line p (affine_line P v) is p + 1.

open Classical in
theorem card_affine_planes_containing_line
    (p : ℕ) [Fact p.Prime] (P v : Fin 3 → ZMod p) (hv : v ≠ 0) :
    (affine_planes_containing_line p (affine_line P v)).card = p + 1
card_affine_planes_throughIn LeanCombinatorics for TCS

For any prime p with [Fact p.Prime] and point P : Fin 3 → ZMod p, the cardinality of the Finset affine_planes_through p P is p^2 + p + 1.

open Classical in
theorem card_affine_planes_through
    (p : ℕ) [Fact p.Prime] (P : Fin 3 → ZMod p) :
    (affine_planes_through p P).card = p ^ 2 + p + 1
card_affine_planes_through_two_pointsIn LeanCombinatorics for TCS

For any prime p with [Fact p.Prime] and distinct points P, Q : Fin 3 → ZMod p with P ≠ Q, the number of planes in affine_planes_through p P containing Q (i.e. the cardinality of (affine_planes_through p P).filter (fun H => Q ∈ H)) is p + 1.

open Classical in
theorem card_affine_planes_through_two_points
    (p : ℕ) [Fact p.Prime] (P Q : Fin 3 → ZMod p) (hPQ : P ≠ Q) :
    ((affine_planes_through p P).filter (fun H => Q ∈ H)).card = p + 1
card_edgeSet_completeGraphIn LeanCombinatorics for TCS

The edge set of $K_n$ is the set of unordered non-diagonal pairs, so $K_n$ has $\binom{n}{2}$ edges; in particular $K_5$ has 10.

theorem card_edgeSet_completeGraph (n : ℕ) :
    (SimpleGraph.completeGraph (Fin n)).edgeSet.ncard = n.choose 2
card_filter_add_mem_geIn LeanCombinatorics for TCS

Let G be a finite abelian group of odd order, A ⊆ G, g ∉ Σ₃(A), and d ∈ A - A. Then the number of u ∈ A with u + d ∈ A is at least 3|A| - |G| - 6.

open scoped Pointwise in
theorem card_filter_add_mem_ge {G : Type*} [AddCommGroup G] [Fintype G] [DecidableEq G]
    {A : Finset G} {g d : G} (hodd : Fintype.card G % 2 = 1) (hg : g ∉ restrictedSumset A 3)
    (hd : d ∈ A - A) :
    3 * A.card ≤ (A.filter (fun u => u + d ∈ A)).card + Fintype.card G + 6
card_filter_range_eq_min_of_injIn LeanCombinatorics for TCS

Let f : ℕ → ℕ be injective on {0,…,R−1} with 1 ≤ f j ≤ R there. Then the values f j (j < R) are exactly {1,…,R}, so exactly min(R, t) of the indices j < R satisfy f j ≤ t.

theorem card_filter_range_eq_min_of_inj {R t : ℕ} {f : ℕ → ℕ}
    (hinj : ∀ j₁, j₁ < R → ∀ j₂, j₂ < R → f j₁ = f j₂ → j₁ = j₂)
    (hlo : ∀ j, j < R → 1 ≤ f j) (hhi : ∀ j, j < R → f j ≤ R) :
    ((Finset.range R).filter (fun j => f j ≤ t)).card = min R t
card_filter_range_le_min_of_injIn LeanCombinatorics for TCS

Let f : ℕ → ℕ be injective on {0,…,R−1} and satisfy f j ≥ 1 there. Then for every t at most min(R, t) of the indices j < R have f j ≤ t: those values are distinct members of {1,…,t}, and there are only R indices in all.

theorem card_filter_range_le_min_of_inj {R t : ℕ} {f : ℕ → ℕ}
    (hinj : ∀ j₁, j₁ < R → ∀ j₂, j₂ < R → f j₁ = f j₂ → j₁ = j₂)
    (hlo : ∀ j, j < R → 1 ≤ f j) :
    ((Finset.range R).filter (fun j => f j ≤ t)).card ≤ min R t
card_inter_translate_neg_le_threeIn LeanCombinatorics for TCS

Let G be a finite abelian group of odd order, A a finite subset, g ∉ Σ₃(A) and a ∈ A. Then the intersection of the translate a - g + A with -A has at most 3 elements.

theorem card_inter_translate_neg_le_three {G : Type*} [AddCommGroup G] [Fintype G] [DecidableEq G] {A : Finset G} {g a : G} (hodd : Fintype.card G % 2 = 1) (ha : a ∈ A) (hg : g ∉ restrictedSumset A 3) : ((A.image (fun s => a - g + s)) ∩ (A.image (fun t => -t))).card ≤ 3
card_of_is_subcubeIn LeanCombinatorics for TCS

An $d$-dimensional subcube of $(\mathrm{Fin}\ n \to \mathrm{Bool})$ has exactly $2^d$ points.

theorem card_of_is_subcube
    (n d : ℕ) (F : Finset (Fin n → Bool)) (h : is_subcube d F) :
    F.card = 2 ^ d
cayley_table_graph_central_involution_cliqueIn LeanCombinatorics for TCS

Let G be a group, z a central element with z² = 1 and z ≠ 1. Then for all g h : G the four cells (g,h), (g,hz), (gz,h), (gz,hz) of the Cayley table are pairwise adjacent in the Latin square graph.

theorem cayley_table_graph_central_involution_clique (G : Type*) [Group G] (z : G)
    (hcen : ∀ g : G, z * g = g * z) (hsq : z * z = 1) (hne : z ≠ 1) (g h : G) :
    (cayley_table_graph G).IsClique ({(g, h), (g, h * z), (g * z, h), (g * z, h * z)} : Set (G × G))
cayley_table_graph_quaternion_adj_iffIn LeanCombinatorics for TCS

Two distinct quadrant cells (ε, i, j) and (ε', i', j') of the Cayley table of QuaternionGroup N are adjacent in the Latin square graph if and only if they share a row (ε = ε' and i = i'), a column (η = η' and j = j'), or a product symbol (quaternion_table_symbol N ε η i j = quaternion_table_symbol N ε' η' i' j').

theorem cayley_table_graph_quaternion_adj_iff (N : ℕ) (ε η ε' η' : Bool)
    (i j i' j' : ZMod (2 * N)) :
    (cayley_table_graph (QuaternionGroup N)).Adj
        (quaternion_table_cell N ε η i j) (quaternion_table_cell N ε' η' i' j') ↔
      quaternion_table_cell N ε η i j ≠ quaternion_table_cell N ε' η' i' j' ∧
        ((ε = ε' ∧ i = i') ∨ (η = η' ∧ j = j') ∨
          quaternion_table_symbol N ε η i j = quaternion_table_symbol N ε' η' i' j')
cayley_table_graph_quaternion_chromatic_number_of_colorableIn LeanCombinatorics for TCS

If the Cayley table graph of QuaternionGroup (2n+1) is (8n+6)-colourable then its chromatic number is exactly 8n+6, by the already-proved lower bound.

theorem cayley_table_graph_quaternion_chromatic_number_of_colorable (n : ℕ) (hn : 1 ≤ n)
    (h : (cayley_table_graph (QuaternionGroup (2 * n + 1))).Colorable (8 * n + 6)) :
    (cayley_table_graph (QuaternionGroup (2 * n + 1))).chromaticNumber = 8 * n + 6
cayley_table_graph_quaternion_colorableIn LeanCombinatorics for TCS

For every integer n ≥ 1, the Cayley table Latin square graph of the generalized quaternion group QuaternionGroup (2 * n + 1) is (8 * n + 6)-colorable.

theorem cayley_table_graph_quaternion_colorable (n : ℕ) (hn : 1 ≤ n) :
    (cayley_table_graph (QuaternionGroup (2 * n + 1))).Colorable (8 * n + 6)
cayley_table_graph_quaternion_three_chromatic_number_geIn LeanCombinatorics for TCS

The chromatic number of the Cayley table graph of the generalized quaternion group QuaternionGroup 3 is at least 14.

theorem cayley_table_graph_quaternion_three_chromatic_number_ge :
    (14 : ℕ∞) ≤ (cayley_table_graph (QuaternionGroup 3)).chromaticNumber
cayley_table_graph_quaternion_three_colorable_fourteenIn LeanCombinatorics for TCS

The Cayley table Latin square graph of QuaternionGroup 3 is 14-colorable.

theorem cayley_table_graph_quaternion_three_colorable_fourteen :
    (cayley_table_graph (QuaternionGroup 3)).Colorable 14
cayley_table_graph_zmod_even_colorableIn LeanCombinatorics for TCS

For m ≥ 1 the Cayley table Latin square graph of the cyclic group ZMod (2m) (written multiplicatively) admits a proper colouring with 2m+2 colours, namely (i,j) ↦ (i + 2j mod (2m+1), [i = 2m−1]) into ZMod (2m+1) × Bool.

theorem cayley_table_graph_zmod_even_colorable (m : ℕ) (hm : 1 ≤ m) :
    (cayley_table_graph (Multiplicative (ZMod (2 * m)))).Colorable (4 * m + 2)
chain_energy_boundIn LeanCombinatorics for TCS

For any starting point s, direction v, and length m, the quadratic energy along the chain {s + kv : k < m} in direction v is at least (1/2)(m-1)‖v‖^4.

theorem chain_energy_bound (d : ℕ) (s v : EuclideanSpace ℝ (Fin d)) (m : ℕ) :
    (1 / 2 : ℝ) * ((m : ℝ) - 1) * ‖v‖ ^ 4 ≤
      ∑ k ∈ Finset.range m, (inner (𝕜 := ℝ) (s + (k : ℝ) • v) v) ^ 2
choose_three_cubic_boundIn LeanCombinatorics for TCS

For every natural number $r$, $6 \binom{r+3}{3} \leq (r+3)^3$.

theorem choose_three_cubic_bound (r : ℕ) :
    6 * Nat.choose (r + 3) 3 ≤ (r + 3) ^ 3
circulant_zmod8_degree_three_not_bipartiteIn LeanCombinatorics for TCS

No circulant graph on ZMod 8 in which the vertex 0 has degree 3 is bipartite; equivalently every 3-regular circulant graph on ZMod 8 contains an odd cycle (a triangle or a 5-cycle).

theorem circulant_zmod8_degree_three_not_bipartite (s : Set (ZMod 8)) [DecidablePred (· ∈ s)]
    (hdeg : (SimpleGraph.circulantGraph s).degree 0 = 3) :
    ¬ (SimpleGraph.circulantGraph s).IsBipartite
clean_handshake_seq_edges_card_le_of_all_doubleIn LeanCombinatorics for TCS

When all handshakes in a clean sequence are double-gloved, the total number of distinct edges covered is at most $k(k-1) = 2\binom{k}{2}$.

theorem clean_handshake_seq_edges_card_le_of_all_double {V Γ : Type*} [DecidableEq V] [DecidableEq Γ] [Fintype Γ]
    (seq : List (Handshake V Γ)) (hc : CleanHandshakeSeq seq (fun _ => (∅ : Set V)))
    (hall : ∀ h ∈ seq, ∃ x a b y, h = Handshake.double x a b y) :
    (seq.map handshake_edge).toFinset.card ≤ Fintype.card Γ * (Fintype.card Γ - 1)
clean_handshake_seq_edges_card_le_of_all_singleIn LeanCombinatorics for TCS

When all handshakes in a clean sequence are single-gloved, the total number of distinct edges covered is at most $k = |\Gamma|$, which is strictly less than $\binom{k+2}{2}$ for all $k \ge 0$.

theorem clean_handshake_seq_edges_card_le_of_all_single {V Γ : Type*} [DecidableEq V] [DecidableEq Γ] [Fintype Γ]
    (seq : List (Handshake V Γ)) (hc : CleanHandshakeSeq seq (fun _ => (∅ : Set V)))
    (hall : ∀ h ∈ seq, ∃ x a y, h = Handshake.single x a y) :
    (seq.map handshake_edge).toFinset.card ≤ Fintype.card Γ
clean_handshake_seq_edges_card_lt_choose_twoIn LeanCombinatorics for TCS

A clean handshake sequence over $k$ gloves starting from the empty contamination map covers strictly fewer than $\binom{k+2}{2}$ distinct edges.

theorem clean_handshake_seq_edges_card_lt_choose_two {V : Type*} [DecidableEq V] {Γ : Type*}
    [DecidableEq Γ] [Fintype Γ] (seq : List (Handshake V Γ)) (hc : CleanHandshakeSeq seq (fun _ => (∅ : Set V))) :
    (seq.map handshake_edge).toFinset.card < (Fintype.card Γ + 2) * (Fintype.card Γ + 1) / 2
clean_handshake_seq_edges_card_lt_choose_two_of_card_le_threeIn LeanCombinatorics for TCS

For at most 3 gloves, any clean handshake sequence covers strictly fewer than $\binom{k+2}{2}$ edges.

theorem clean_handshake_seq_edges_card_lt_choose_two_of_card_le_three {V : Type*} [DecidableEq V] {Γ : Type*}
    [DecidableEq Γ] [Fintype Γ] (hk : Fintype.card Γ ≤ 3)
    (seq : List (Handshake V Γ)) (hc : CleanHandshakeSeq seq (fun _ => (∅ : Set V))) :
    (seq.map handshake_edge).toFinset.card < (Fintype.card Γ + 2) * (Fintype.card Γ + 1) / 2
cohen_macaulay_two_complex_cycle_is_boundaryIn LeanCombinatorics for TCS

Every 1-cycle over k supported on ordered edges of a Cohen-Macaulay 2-complex is the boundary of a 2-chain over k supported on ordered triangles.

theorem cohen_macaulay_two_complex_cycle_is_boundary
    {V : Type*} [DecidableEq V] [LinearOrder V] (facets : Finset (Finset V)) (k : Type*) [Field k]
    (hCM : is_cohen_macaulay_two_complex facets k)
    (c : V × V → k)
    (hsupp : ∀ e, e ∉ (facets.biUnion id ×ˢ facets.biUnion id).filter
      (fun ⟨u, v⟩ => u < v ∧ {u, v} ∈ facets.biUnion Finset.powerset) → c e = 0)
    (hcycle : ∀ x ∈ facets.biUnion id,
      ((facets.biUnion id ×ˢ facets.biUnion id).filter
        (fun ⟨u, v⟩ => u < v ∧ {u, v} ∈ facets.biUnion Finset.powerset)).sum
        (fun ⟨u, v⟩ => (if u = x then c (u, v) else 0) - (if v = x then c (u, v) else 0)) = 0) :
    ∃ b : V × V × V → k,
      ∀ e ∈ (facets.biUnion id ×ˢ facets.biUnion id).filter
        (fun ⟨u, v⟩ => u < v ∧ {u, v} ∈ facets.biUnion Finset.powerset),
        c e = ((facets.biUnion id ×ˢ (facets.biUnion id ×ˢ facets.biUnion id)).filter
          (fun ⟨u, v, w⟩ => u < v ∧ v < w ∧ {u, v, w} ∈ facets)).sum
          (fun ⟨u, v, w⟩ =>
            (if e = (v, w) then b (u, v, w) else 0) -
            (if e = (u, w) then b (u, v, w) else 0) +
            (if e = (u, v) then b (u, v, w) else 0))
cohen_macaulay_two_complex_face_card_le_threeIn LeanCombinatorics for TCS

Every face of a 2-dimensional Cohen-Macaulay complex has cardinality at most 3.

theorem cohen_macaulay_two_complex_face_card_le_three
    {V : Type*} [DecidableEq V] [LinearOrder V] (facets : Finset (Finset V)) (k : Type*) [Field k]
    (hCM : is_cohen_macaulay_two_complex facets k)
    (τ : Finset V) (hτ : τ ∈ facets.biUnion Finset.powerset) :
    τ.card ≤ 3
cohen_macaulay_two_complex_link_reachableIn LeanCombinatorics for TCS

For every vertex in a 2-dimensional Cohen-Macaulay complex, its link graph is connected on vertices that share an edge with it.

theorem cohen_macaulay_two_complex_link_reachable
    {V : Type*} [DecidableEq V] [LinearOrder V] (facets : Finset (Finset V)) (k : Type*) [Field k]
    (hCM : is_cohen_macaulay_two_complex facets k)
    (v : V) (hv : v ∈ facets.biUnion id) (u w : V)
    (hu : {u, v} ∈ facets.biUnion Finset.powerset)
    (hw : {w, v} ∈ facets.biUnion Finset.powerset)
    (huv : u ≠ v) (hwv : w ≠ v) :
    (SimpleGraph.fromRel (fun a b => {a, b, v} ∈ facets)).Reachable u w
cohen_macaulay_two_complex_skel_reachableIn LeanCombinatorics for TCS

The 1-skeleton graph of a 2-dimensional Cohen-Macaulay complex is connected on its vertices.

theorem cohen_macaulay_two_complex_skel_reachable
    {V : Type*} [DecidableEq V] [LinearOrder V] (facets : Finset (Finset V)) (k : Type*) [Field k]
    (hCM : is_cohen_macaulay_two_complex facets k)
    (u w : V) (hu : u ∈ facets.biUnion id) (hw : w ∈ facets.biUnion id) :
    (SimpleGraph.fromRel (fun a b => ∃ σ ∈ facets, a ∈ σ ∧ b ∈ σ)).Reachable u w
color_avoiding_cycle_pred_of_succIn LeanCombinatorics for TCS

For all t ≥ 4 and ℓ ≥ 4, if a t-edge-colouring of K_n contains an (ℓ+1)-cycle avoiding some colour j, then it contains an ℓ-cycle avoiding some colour j'.

theorem color_avoiding_cycle_pred_of_succ (t ℓ n : ℕ) (ht : 4 ≤ t) (hℓ : 4 ≤ ℓ)
    (c : (SimpleGraph.completeGraph (Fin n)).edgeSet → Fin t)
    (h : ∃ j : Fin t, (SimpleGraph.cycleGraph (ℓ + 1)).IsContained (color_avoiding_subgraph (SimpleGraph.completeGraph (Fin n)) c j)) :
    ∃ j : Fin t, (SimpleGraph.cycleGraph ℓ).IsContained (color_avoiding_subgraph (SimpleGraph.completeGraph (Fin n)) c j)
color_avoiding_cycle_pred_of_succ_three_colorsIn LeanCombinatorics for TCS

For all ℓ ≥ 4, if a 3-edge-colouring of K_n contains an (ℓ+1)-cycle avoiding some colour j, then it contains an ℓ-cycle avoiding some colour j'.

theorem color_avoiding_cycle_pred_of_succ_three_colors (ℓ n : ℕ) (hℓ : 4 ≤ ℓ)
    (c : (SimpleGraph.completeGraph (Fin n)).edgeSet → Fin 3)
    (h : ∃ j : Fin 3, (SimpleGraph.cycleGraph (ℓ + 1)).IsContained (color_avoiding_subgraph (SimpleGraph.completeGraph (Fin n)) c j)) :
    ∃ j : Fin 3, (SimpleGraph.cycleGraph ℓ).IsContained (color_avoiding_subgraph (SimpleGraph.completeGraph (Fin n)) c j)
color_avoiding_subgraph_leIn LeanCombinatorics for TCS

For any edge colouring c of G and colour j, the j-avoiding subgraph color_avoiding_subgraph G c j is a subgraph of G.

theorem color_avoiding_subgraph_le {V C : Type*} (G : SimpleGraph V) (c : G.edgeSet → C) (j : C) :
    color_avoiding_subgraph G c j ≤ G
compatibility_lemma_for_return_words_to_palindromesIn LeanCombinatorics for TCS

Let w be a recurrent rich word over a finite alphabet and q a palindrome. If rq and r'q are two complete return words to q in w containing a palindrome s, then the longest common prefix of rq and r'q contains s as a factor.

theorem compatibility_lemma_for_return_words_to_palindromes
    {α : Type*} [Fintype α] [DecidableEq α] (w : ℕ → α)
    (hw_rec : is_recurrent_word w) (hw_rich : is_rich_word w)
    (q : List α) (hq : q.Palindrome)
    (r r' : List α)
    (hr : is_complete_return_word (r ++ q) q ∧ ∃ i : ℕ, r ++ q = (List.range (r ++ q).length).map (fun j => w (i + j)))
    (hr' : is_complete_return_word (r' ++ q) q ∧ ∃ i : ℕ, r' ++ q = (List.range (r' ++ q).length).map (fun j => w (i + j)))
    (s : List α) (hs : s.Palindrome)
    (hs_in_r : s <:+: r ++ q) (hs_in_r' : s <:+: r' ++ q) :
    s <:+: longest_common_prefix (r ++ q) (r' ++ q)
compatible_of_strong_eliminationIn LeanCombinatorics for TCS

If a finite collection C of finite sets has the strong elimination property, then C is a compatible collection.

theorem compatible_of_strong_elimination {V : Type*} [DecidableEq V] {C : Finset (Finset V)}
    (h : has_strong_elimination C) : is_compatible_collection C
complete_bipartite_connected_spanning_subgraphs_strict_negative_correlationIn LeanCombinatorics for TCS

For integers m, n ≥ 2 and distinct edges e, f of the complete bipartite graph K_{m,n}, the number of connected spanning subgraphs j(K_{m,n}), the number containing e, j_e(K_{m,n}), and the number containing both e and f, j_{ef}(K_{m,n}), satisfy j_{ef}(K_{m,n}) * j(K_{m,n}) < j_e(K_{m,n}) * j_f(K_{m,n}).

theorem complete_bipartite_connected_spanning_subgraphs_strict_negative_correlation
    (m n : ℕ) (hm : 2 ≤ m) (hn : 2 ≤ n)
    (e f : Sym2 (Fin m ⊕ Fin n))
    (he : e ∈ (completeBipartiteGraph (Fin m) (Fin n)).edgeSet)
    (hf : f ∈ (completeBipartiteGraph (Fin m) (Fin n)).edgeSet)
    (hne : e ≠ f) :
    simple_graph_j_ef (completeBipartiteGraph (Fin m) (Fin n)) e f *
      simple_graph_j (completeBipartiteGraph (Fin m) (Fin n)) <
    simple_graph_j_e (completeBipartiteGraph (Fin m) (Fin n)) e *
      simple_graph_j_e (completeBipartiteGraph (Fin m) (Fin n)) f
complete_bipartite_two_connected_spanning_subgraphs_countIn LeanCombinatorics for TCS

For any integer n ≥ 2, the number of connected spanning subgraphs of the complete bipartite graph K_{2,n} is 3^n - 2^n.

theorem complete_bipartite_two_connected_spanning_subgraphs_count (n : ℕ) (hn : 2 ≤ n) :
    simple_graph_j (completeBipartiteGraph (Fin 2) (Fin n)) = 3 ^ n - 2 ^ n
conjecture_subsequence_sums_cover_all_nonzero_bridgeIn LeanCombinatorics for TCS

For an additive commutative monoid G with decidable equality, the finite set of sums of length-n submultisets obtained via powersetCard equals subsequence_sums n S.

theorem conjecture_subsequence_sums_cover_all_nonzero_bridge
    {G : Type} [AddCommMonoid G] [DecidableEq G] (n : ℕ) (S : Multiset G) :
    ((S.powersetCard n).map Multiset.sum).toFinset = subsequence_sums n S
controlled_nonface_overlap_dual_graph_diameterIn LeanCombinatorics for TCS

Let Δ be an abstract simplicial complex on an n-element vertex set V, pure of facet size d, with connected dual graph. Let g ∈ ℕ and suppose there is a subset X ⊆ V of size |X| = g such that M ∩ M' ⊆ X for every pair of distinct minimal nonfaces M, M' of Δ. Let traces be the set of distinct subsets F ∩ X as F ranges over all facets of Δ, and let κ = |traces|. Then the diameter of the dual graph of Δ satisfies diam(G(Δ)) ≤ κ(n - d + 1) - 1 ≤ 2^g(n - d + 1) - 1.

theorem controlled_nonface_overlap_dual_graph_diameter
    {V : Type*} [DecidableEq V] [Fintype V]
    (Δ : AbstractSimplicialComplex V) (n d g κ : ℕ)
    (hn : Fintype.card V = n) (hpure : simplicial_is_pure Δ d)
    (hconn : (simplicial_dual_graph Δ d).Connected)
    (X : Finset V) (hg : X.card = g)
    (hX : ∀ M M' : Finset V, simplicial_is_minimal_nonface Δ M →
      simplicial_is_minimal_nonface Δ M' → M ≠ M' → M ∩ M' ⊆ X)
    (traces : Finset (Finset V))
    (htraces : ∀ Y, Y ∈ traces ↔ ∃ F, simplicial_is_facet Δ F ∧ F ∩ X = Y)
    (hκ : traces.card = κ) :
    (simplicial_dual_graph Δ d).diam ≤ κ * (n - d + 1) - 1 ∧
    κ * (n - d + 1) - 1 ≤ 2 ^ g * (n - d + 1) - 1
coord_shift_hypergraph_no_loose_triangleIn LeanCombinatorics for TCS

Let p > 3 be prime, d ≥ 2, and S ⊆ ZMod p a subset containing no nontrivial three-term arithmetic progression. Then the coordinate-shift hypergraph H(p, d, S) contains no loose triangle: no three edges e₁, e₂, e₃ in H(p, d, S) form a loose triangle.

theorem coord_shift_hypergraph_no_loose_triangle
    (p d : ℕ) [Fact (Nat.Prime p)] (hp : 3 < p) (hd : 2 ≤ d)
    (S : Set (ZMod p)) (hS : ThreeAPFree S)
    (e₁ e₂ e₃ : Finset (Fin 3 × (Fin d → ZMod p)))
    (h₁ : e₁ ∈ coord_shift_hypergraph p d S)
    (h₂ : e₂ ∈ coord_shift_hypergraph p d S)
    (h₃ : e₃ ∈ coord_shift_hypergraph p d S) :
    ¬ is_loose_triangle e₁ e₂ e₃
coord_shift_hypergraph_no_three_by_three_gridIn LeanCombinatorics for TCS

Let p > 3 be a prime, d >= 2, and S a subset of ZMod p containing no nontrivial three-term arithmetic progression. Then the coordinate-shift hypergraph H(p, d, S) contains no 3x3 grid.

theorem coord_shift_hypergraph_no_three_by_three_grid (p d : ℕ) [Fact p.Prime] (hp : 3 < p)
    (hd : 2 ≤ d) (S : Set (ZMod p)) (hS : ThreeAPFree S) :
    ¬ has_three_by_three_grid (coord_shift_hypergraph p d S)
coord_shift_z_eq_at_least_diffIn LeanCombinatorics for TCS

For vectors x, x', y, y' over ZMod p and a coordinate t, if x and x' agree and y and y' agree on all coordinates j < t, and the coordinate-shift vectors z(x, y') and z(x', y) agree at t, then x_t + y'_t = x'_t + y_t.

theorem coord_shift_z_eq_at_least_diff {p d : ℕ} (x x' y y' : Fin d → ZMod p) (t : Fin d)
    (hprev : ∀ (j : Fin d), j < t → x j = x' j ∧ y j = y' j)
    (hz : coord_shift_z x y' t = coord_shift_z x' y t) :
    x t + y' t = x' t + y t
corner_crossed_exists_consecutive_admissible_pairIn LeanCombinatorics for TCS

Every finite diagram $D \subset \mathbb{N}^2$ that is corner-crossed and has no implicit boxes, and contains at least one pair of crossing cells, contains a consecutive admissible pair $(b_1, b_2)$.

theorem corner_crossed_exists_consecutive_admissible_pair (D : Finset (ℕ × ℕ))
    (hcc : is_corner_crossed D) (hnoimp : diagram_has_no_implicit_boxes D)
    (hcross : ∃ u ∈ D, ∃ v ∈ D, diagram_crossing u v) :
    ∃ b₁ ∈ D, ∃ b₂ ∈ D, diagram_is_consecutive_admissible_pair D b₁ b₂
corner_crossed_row_col_le_iffIn LeanCombinatorics for TCS

For a corner-crossed finite diagram D : Finset (ℕ × ℕ) and cells u, v ∈ D, row_col_le D u v holds if and only if u.1 ≤ v.1 and u.2 ≤ v.2.

theorem corner_crossed_row_col_le_iff
    (D : Finset (ℕ × ℕ)) (hD : is_corner_crossed D) (u v : ℕ × ℕ) (hu : u ∈ D) (hv : v ∈ D) :
    row_col_le D u v ↔ u.1 ≤ v.1 ∧ u.2 ≤ v.2
corner_crossed_slide_preservesIn LeanCombinatorics for TCS

For any finite corner-crossed diagram $D$ without implicit boxes and any consecutive admissible pair $(b_1, b_2)$, both the vertical slide and horizontal slide diagrams are corner-crossed and have no implicit boxes.

theorem corner_crossed_slide_preserves (D : Finset (ℕ × ℕ)) (b₁ b₂ : ℕ × ℕ)
    (hcc : is_corner_crossed D) (hnoimp : diagram_has_no_implicit_boxes D)
    (hcap : diagram_is_consecutive_admissible_pair D b₁ b₂) :
    (is_corner_crossed (diagram_vertical_slide D b₁ b₂) ∧
     diagram_has_no_implicit_boxes (diagram_vertical_slide D b₁ b₂)) ∧
    (is_corner_crossed (diagram_horizontal_slide D b₁ b₂) ∧
     diagram_has_no_implicit_boxes (diagram_horizontal_slide D b₁ b₂))
cp_cnp_theorem_three_five_bound_le_ceil_of_ge_fiveIn LeanCombinatorics for TCS

For p ≥ 5 prime and n ≥ 2 with (np).minFac = p and p ∤ n, the two-term threshold max{np + 2p² − p − 1, np(p+1)/(np).minFac − p + (np).minFac − 2} of Theorem 3.5 of arXiv:2610.13103 (at q = p) is at most ⌈(25np − 20)/6⌉.

theorem cp_cnp_theorem_three_five_bound_le_ceil_of_ge_five (p : ℕ) (hp : p.Prime) (hp5 : 5 ≤ p) (n : ℕ) (hn : 2 ≤ n) (hmin : (n * p).minFac = p) (hndvd : ¬ p ∣ n) : max (n * p + 2 * p ^ 2 - p - 1) (n * p * (p + 1) / (n * p).minFac - p + (n * p).minFac - 2) ≤ Nat.ceil ((25 * (n * p : ℝ) - 20) / 6)
critical_split_central_binomial_boundIn LeanCombinatorics for TCS

For every natural number n at least five, 2(n-1)(1+n²)+2(n+1) is strictly less than the central binomial coefficient (2n choose n).

theorem critical_split_central_binomial_bound (n : ℕ) (hn : 5 ≤ n) : 2*(n-1)*(1+n^2)+2*(n+1) < Nat.centralBinom n
cubic_poly_strict_mono_of_minors_lt_oneIn LeanCombinatorics for TCS

For any real numbers x, y, z satisfying x^2 < 1, y^2 < 1, and (x, y, z) ≠ (0, 0, 0), the cubic polynomial function mapping q to 1 + (x^2 + y^2) * q + 2 * x * y * z * q^2 + z^2 * q^3 is strictly increasing on ℝ.

theorem cubic_poly_strict_mono_of_minors_lt_one
    (x y z : ℝ) (hx : x ^ 2 < 1) (hy : y ^ 2 < 1) (hne : (x, y, z) ≠ (0, 0, 0)) :
    StrictMono (fun q : ℝ => 1 + (x ^ 2 + y ^ 2) * q + 2 * x * y * z * q ^ 2 + z ^ 2 * q ^ 3)
cycle_power_dyadic_alternating_defective_halvesIn LeanCombinatorics for TCS

Parity reindexing of an alternating model with only its two possible middle defects yields the two defective half models, with phases zero and half the half-span.

theorem cycle_power_dyadic_alternating_defective_halves (t : ℕ) (ht : 2 ≤ t) (x : ℤ → ℕ → Bool)
    (htight : ∀ p, cycle_power_dyadic_class_weight (t+1) (x p) =
      (Finset.range (2^(t+1))).sum (fun a => (x p a).toNat))
    (hexact : ∀ j < t+1, ∀ v : ℤ, (Finset.range (2^j)).sum (fun a =>
      (x (v-(a : ℤ)) a && x (v-(a : ℤ)) (a+2^(t+1)-2^j)).toNat) = 1)
    (hcover : ∀ d : ℕ, 1 ≤ d → d < 2^(t+1) → ∀ v : ℤ,
      ∃ a : ℕ, a < 2^(t+1)-d ∧ x (v-(a : ℤ)) a = true ∧
        x (v-(a : ℤ)) (a+d) = true)
    (hcount : ∀ v : ℤ, (Finset.range (2^(t+1))).sum (fun a =>
      (x (v-(a : ℤ)) a).toNat) = (t+1)+1)
    (halt : ∀ p : ℤ, x (p+1) 1 = !x p 1)
    (hpart : ∀ p : ℤ, x p 1 = false → ∀ j, 0 < j → j < 2^(t+1) - 1 → j ≠ 2^t - 1 → j ≠ 2^t → x p j = false) (s : ℤ) (hs : x s 1 = false) :
    cycle_power_dyadic_defective_half_model t (fun q a => x (s + 2*q + 1) (2*a))
      (fun v => x (s + 2*v + 2 - ((2^t : ℕ) : ℤ)) (2^t - 1)) 0 ∧
    cycle_power_dyadic_defective_half_model t (fun q a => x (s + 2*q + 1) (2*a+1))
      (fun v => x (s + 2*v + 2 - ((2^t : ℕ) : ℤ)) (2^t)) ((2 : ℤ)^(t-1))
cycle_power_dyadic_endpoint_overlapIn LeanCombinatorics for TCS

Conjectured uniform endpoint-overlap core: every class other than the ending class that is active at its last vertex intersects the class starting immediately afterward, in a periodic tight dyadic model with constant optimal count and full coverage.

theorem cycle_power_dyadic_endpoint_overlap
    (m n : ℕ) (hm : 1 ≤ m) (hn : 0 < n) (x : ℤ → ℕ → Bool)
    (hperiod : ∀ p a, x (p + (n : ℤ)) a = x p a)
    (htight : ∀ p, cycle_power_dyadic_class_weight m (x p) =
      (Finset.range (2 ^ m)).sum (fun a => (x p a).toNat))
    (hcount : ∀ v : ℤ, (Finset.range (2 ^ m)).sum
      (fun a => (x (v - (a : ℤ)) a).toNat) = m + 1)
    (hexact : ∀ j < m, ∀ v : ℤ, (Finset.range (2 ^ j)).sum (fun a =>
      (x (v - (a : ℤ)) a && x (v - (a : ℤ)) (a + 2 ^ m - 2 ^ j)).toNat) = 1)
    (hcover : ∀ d : ℕ, 1 ≤ d → d < 2 ^ m → ∀ v : ℤ,
      ∃ a : ℕ, a < 2 ^ m - d ∧ x (v - (a : ℤ)) a = true ∧
        x (v - (a : ℤ)) (a + d) = true) :
    ∀ (p : ℤ) (q : ℕ), 1 ≤ q → q < 2 ^ m →
      x (p + (q : ℤ)) (2 ^ m - 1 - q) = true →
      ∃ a : ℕ, a < q ∧ x (p + (q : ℤ)) (2 ^ m - q + a) = true ∧
        x (p + ((2 ^ m : ℕ) : ℤ)) a = true
cycle_power_dyadic_middle_bits_from_defective_halvesIn LeanCombinatorics for TCS

If both phase variants of the defective half model are defect-free, the middle bits in the alternating model vanish.

theorem cycle_power_dyadic_middle_bits_from_defective_halves (t : ℕ) (ht : 2 ≤ t) (x : ℤ → ℕ → Bool)
    (htight : ∀ p, cycle_power_dyadic_class_weight (t+1) (x p) =
      (Finset.range (2^(t+1))).sum (fun a => (x p a).toNat))
    (hexact : ∀ j < t+1, ∀ v : ℤ, (Finset.range (2^j)).sum (fun a =>
      (x (v-(a : ℤ)) a && x (v-(a : ℤ)) (a+2^(t+1)-2^j)).toNat) = 1)
    (hcover : ∀ d : ℕ, 1 ≤ d → d < 2^(t+1) → ∀ v : ℤ,
      ∃ a : ℕ, a < 2^(t+1)-d ∧ x (v-(a : ℤ)) a = true ∧
        x (v-(a : ℤ)) (a+d) = true)
    (hcount : ∀ v : ℤ, (Finset.range (2^(t+1))).sum (fun a =>
      (x (v-(a : ℤ)) a).toNat) = (t+1)+1)
    (halt : ∀ p : ℤ, x (p+1) 1 = !x p 1)
    (hpart : ∀ p : ℤ, x p 1 = false → ∀ j, 0 < j → j < 2^(t+1) - 1 → j ≠ 2^t - 1 → j ≠ 2^t → x p j = false)
    (hnodefect : ∀ (y : ℤ → ℕ → Bool) (e : ℤ → Bool) (shift : ℤ),
      (shift = 0 ∨ shift = (2 : ℤ)^(t-1)) → cycle_power_dyadic_defective_half_model t y e shift → ∀ v, e v = false) :
    ∀ p : ℤ, x p 1 = false → x p (2^t - 1) = false ∧ x p (2^t) = false
cycle_power_dyadic_middle_bits_of_alternatingIn LeanCombinatorics for TCS

Conjecture: in a tight, exactly dyadically covered, fully covered integer Boolean class model at exponent t+1 (t ≥ 2) with t+2 active classes per vertex, with alternating bit 1 and with all inner bits other than 2^t-1 and 2^t vanishing in the classes without bit 1, those two middle bits vanish there as well.

theorem cycle_power_dyadic_middle_bits_of_alternating (t : ℕ) (ht : 2 ≤ t) (x : ℤ → ℕ → Bool)
    (htight : ∀ p, cycle_power_dyadic_class_weight (t+1) (x p) =
      (Finset.range (2^(t+1))).sum (fun a => (x p a).toNat))
    (hexact : ∀ j < t+1, ∀ v : ℤ, (Finset.range (2^j)).sum (fun a =>
      (x (v-(a : ℤ)) a && x (v-(a : ℤ)) (a+2^(t+1)-2^j)).toNat) = 1)
    (hcover : ∀ d : ℕ, 1 ≤ d → d < 2^(t+1) → ∀ v : ℤ,
      ∃ a : ℕ, a < 2^(t+1)-d ∧ x (v-(a : ℤ)) a = true ∧
        x (v-(a : ℤ)) (a+d) = true)
    (hcount : ∀ v : ℤ, (Finset.range (2^(t+1))).sum (fun a =>
      (x (v-(a : ℤ)) a).toNat) = (t+1)+1)
    (halt : ∀ p : ℤ, x (p+1) 1 = !x p 1)
    (hpart : ∀ p : ℤ, x p 1 = false → ∀ j, 0 < j → j < 2^(t+1) - 1 → j ≠ 2^t - 1 → j ≠ 2^t →
      x p j = false) :
    ∀ p : ℤ, x p 1 = false → x p (2^t - 1) = false ∧ x p (2^t) = false
cycle_power_dyadic_optimal_count_class_no_islandIn LeanCombinatorics for TCS

Conjectured local classification under optimal scalar counts: every class is the union of an initial and terminal interval. This version assumes exact pointwise optimal active counts and removes periodicity; it differs from the existing count-free periodic shape conjecture.

theorem cycle_power_dyadic_optimal_count_class_no_island
    (m : ℕ) (hm : 1 ≤ m) (x : ℤ → ℕ → Bool)
    (htight : ∀ p, cycle_power_dyadic_class_weight m (x p) =
      (Finset.range (2^m)).sum (fun a => (x p a).toNat))
    (hexact : ∀ j < m, ∀ v : ℤ, (Finset.range (2^j)).sum (fun a =>
      (x (v-(a : ℤ)) a && x (v-(a : ℤ)) (a+2^m-2^j)).toNat) = 1)
    (hcover : ∀ d : ℕ, 1 ≤ d → d < 2^m → ∀ v : ℤ,
      ∃ a : ℕ, a < 2^m-d ∧ x (v-(a : ℤ)) a = true ∧
        x (v-(a : ℤ)) (a+d) = true)
    (hcount : ∀ v : ℤ, (Finset.range (2^m)).sum (fun a =>
      (x (v-(a : ℤ)) a).toNat) = m+1) :
    ∀ (p : ℤ) (a b c : ℕ), a < b → b < c → c < 2^m →
      x p a = false → x p b = true → x p c = true
cycle_power_dyadic_periodic_class_no_islandIn LeanCombinatorics for TCS

Conjectured count-free periodic shape classification: every tight rooted dyadic class in a periodic full-cover model is the union of an initial and terminal interval, with possibly unequal widths. Equivalently a selected bit cannot lie between two missing bits.

theorem cycle_power_dyadic_periodic_class_no_island
    (m : ℕ) (hm : 1 ≤ m) (x : ℤ → ℕ → Bool)
    (htight : ∀ p, cycle_power_dyadic_class_weight m (x p) =
      (Finset.range (2 ^ m)).sum (fun a => (x p a).toNat))
    (hexact : ∀ j < m, ∀ v : ℤ, (Finset.range (2 ^ j)).sum (fun a =>
      (x (v - (a : ℤ)) a && x (v - (a : ℤ)) (a + 2 ^ m - 2 ^ j)).toNat) = 1)
    (hcover : ∀ d : ℕ, 1 ≤ d → d < 2 ^ m → ∀ v : ℤ,
      ∃ a : ℕ, a < 2 ^ m - d ∧ x (v - (a : ℤ)) a = true ∧
        x (v - (a : ℤ)) (a + d) = true)
    (n : ℕ) (hn : 0 < n)
    (hperiod : ∀ p a, x (p + (n : ℤ)) a = x p a) :
    ∀ (p : ℤ) (a b c : ℕ), a < b → b < c → c < 2 ^ m →
      x p a = false → x p b = true → x p c = true
cycle_power_dyadic_zero_phase_half_no_defectsIn LeanCombinatorics for TCS

Conjecture: a tight zero-phase dyadic defective half model at exponent at least two has no defects.

theorem cycle_power_dyadic_zero_phase_half_no_defects (t : ℕ) (ht : 2 ≤ t) (y : ℤ → ℕ → Bool) (e : ℤ → Bool) (hmodel : cycle_power_dyadic_defective_half_model t y e 0) : ∀ v : ℤ, e v = false
cycle_rook_matrix_detIn LeanCombinatorics for TCS

The Fibonacci matrix M = !![1, X; 1, 0] has determinant -X, so det(M^n) = (-X)^n.

theorem cycle_rook_matrix_det : cycle_rook_matrix.det = -Polynomial.X
cycle_rook_matrix_sqIn LeanCombinatorics for TCS

The Fibonacci matrix M = !![1, X; 1, 0] satisfies M^2 = M + X·1, the matrix form of t^2 = t + x.

theorem cycle_rook_matrix_sq : cycle_rook_matrix ^ 2 = cycle_rook_matrix + (Polynomial.X : Polynomial ℚ) • (1 : Matrix (Fin 2) (Fin 2) (Polynomial ℚ))
cycle_rook_matrix_trace_recurrenceIn LeanCombinatorics for TCS

For M = !![1, X; 1, 0] and every n, tr(M^(n+2)) = tr(M^(n+1)) + X · tr(M^n).

theorem cycle_rook_matrix_trace_recurrence (n : ℕ) :
    Matrix.trace (cycle_rook_matrix ^ (n + 2)) =
      Matrix.trace (cycle_rook_matrix ^ (n + 1)) + Polynomial.X * Matrix.trace (cycle_rook_matrix ^ n)
cycle_rook_matrix_trace_sqIn LeanCombinatorics for TCS

For M = !![1, X; 1, 0] and every n, (tr(M^n))^2 = tr(M^(2n)) + 2(-X)^n.

theorem cycle_rook_matrix_trace_sq (n : ℕ) :
    Matrix.trace (cycle_rook_matrix ^ n) ^ 2 =
      Matrix.trace (cycle_rook_matrix ^ (2 * n)) + Polynomial.C 2 * (-Polynomial.X) ^ n
cycle_rook_poly_add_twoIn LeanCombinatorics for TCS

The cycle rook polynomial satisfies the second-order linear recurrence Q_{n+2}(X) = Q_{n+1}(X) + X * Q_n(X) for all n ≥ 1.

theorem cycle_rook_poly_add_two (n : ℕ) (hn : 1 ≤ n) :
    cycle_rook_poly (n + 2) = cycle_rook_poly (n + 1) + Polynomial.X * cycle_rook_poly n
cycle_rook_poly_eq_matrix_traceIn LeanCombinatorics for TCS

For every m ≥ 1, the rook polynomial of an m-cycle equals tr(M^m), where M = !![1, X; 1, 0].

theorem cycle_rook_poly_eq_matrix_trace (n : ℕ) (hn : 1 ≤ n) :
    cycle_rook_poly n = Matrix.trace (cycle_rook_matrix ^ n)
cycle_rook_poly_sq_subIn LeanCombinatorics for TCS

For every positive integer n, the square of the rook polynomial of an n-cycle satisfies Q_n(x)^2 = Q_{2n}(x) + 2(-x)^n in ℚ[x].

theorem cycle_rook_poly_sq_sub (n : ℕ) (hn : 1 ≤ n) :
    cycle_rook_poly n ^ 2 = cycle_rook_poly (2 * n) + Polynomial.C 2 * (-Polynomial.X : Polynomial ℚ) ^ n
cycle_rook_poly_sq_sub_of_evenIn LeanCombinatorics for TCS

For every even positive integer n, the difference between the squared rook polynomial Q_n(x)^2 of an n-cycle and the rook polynomial Q_{2n}(x) of a 2n-cycle equals 2 x^n in ℚ[x].

theorem cycle_rook_poly_sq_sub_of_even (n : ℕ) (hn : 1 ≤ n) (he : Even n) :
    cycle_rook_poly n ^ 2 - cycle_rook_poly (2 * n) = Polynomial.C 2 * (Polynomial.X : Polynomial ℚ) ^ n
cycle_rook_poly_twoIn LeanCombinatorics for TCS

The rook polynomial of a 2-cycle is equal to 1 + 2X in ℚ[x].

theorem cycle_rook_poly_two : cycle_rook_poly 2 = 1 + Polynomial.C 2 * Polynomial.X
cyclic_exp_char_sumIn LeanCombinatorics for TCS

Orthogonality of the standard exponential additive character on ZMod N: the sum over m of exp(2πi * (m * d) / N) equals N if d = 0 and 0 otherwise.

theorem cyclic_exp_char_sum (N : ℕ) [NeZero N] (d : ZMod N) :
    ∑ m : ZMod N, Complex.exp (2 * Real.pi * Complex.I * ((m * d).val / (N : ℂ))) =
      if d = 0 then (N : ℂ) else 0
cyclic_matrix_fourier_antidiagonal_iff_circulantIn LeanCombinatorics for TCS

A complex matrix M indexed by ZMod N has its two-dimensional cyclic Fourier transform supported on the anti-diagonal m + n = 0 if and only if M is a circulant matrix.

theorem cyclic_matrix_fourier_antidiagonal_iff_circulant (N : ℕ) [NeZero N]
    (M : Matrix (ZMod N) (ZMod N) ℂ) :
    (∀ m n : ZMod N, m + n ≠ 0 → cyclic_matrix_fourier N M m n = 0) ↔
    ∃ v : ZMod N → ℂ, M = Matrix.circulant v
cyclic_matrix_fourier_inversionIn LeanCombinatorics for TCS

The two-dimensional cyclic Fourier inversion formula: reconstructing a complex matrix M on ZMod N from its cyclic matrix Fourier transform.

theorem cyclic_matrix_fourier_inversion (N : ℕ) [NeZero N]
    (M : Matrix (ZMod N) (ZMod N) ℂ) (x y : ZMod N) :
    (1 / (N : ℂ)) * ∑ m : ZMod N, ∑ n : ZMod N,
      cyclic_matrix_fourier N M m n *
        Complex.exp (2 * Real.pi * Complex.I * ((m * x + n * y).val / (N : ℂ))) = M x y
d2_tilde_is_oasIn LeanCombinatorics for TCS

For every function W : ℝ → ℝ → ℝ satisfying is_digraphon W, the density satisfies d2_tilde_density W ≤ d2_tilde_density (digraphon_symmetrization W).

theorem d2_tilde_is_oas (W : ℝ → ℝ → ℝ) (hW : is_digraphon W) :
    d2_tilde_density W ≤ d2_tilde_density (digraphon_symmetrization W)
davenport_card_threshold_leIn LeanCombinatorics for TCS

For p ≥ 3 and n ≥ 5, the Davenport length p + (np) − 1 is at most ⌈(4np − 2)/3⌉, so the target's cardinality bound meets the Davenport-constant hypothesis when applied to C_p × C_np.

theorem davenport_card_threshold_le (p n : ℕ) (hp3 : 3 ≤ p) (hn : 5 ≤ n) : p + n * p - 1 ≤ Nat.ceil ((4 * (n * p : ℝ) - 2) / 3)
decay_ramsey_product_colouring_baseIn LeanCombinatorics for TCS

Base case ℓ = 1: if K_m has an r-colouring c₀ with no monochromatic K_k, then K_{m^1} has an a-bounded colouring with no monochromatic K_k, where a(i) = m^(1 - i/r).

theorem decay_ramsey_product_colouring_base (m r k : ℕ) (hm : 2 ≤ m) (hr : 2 ≤ r) (hk : 2 ≤ k)
    (c₀ : (SimpleGraph.completeGraph (Fin m)).edgeSet → ℕ+)
    (hc₀_range : ∀ e, (c₀ e : ℕ) ≤ r)
    (hc₀_free : ¬ op_258_has_mono_clique m c₀ k) :
    ∃ c : (SimpleGraph.completeGraph (Fin (m ^ 1))).edgeSet → ℕ+,
      op_258_bounded (fun (i : ℕ+) => (m : ℝ) ^ (1 - (i : ℝ) / (r : ℝ))) (m ^ 1) c ∧
      ¬ op_258_has_mono_clique (m ^ 1) c k
decay_ramsey_product_colouring_boundIn LeanCombinatorics for TCS

Let m, r, k ≥ 2 be integers. If there exists an edge-colouring c₀ : E(K_m) → {1, ..., r} containing no monochromatic clique K_k, then the sequence a defined by a i = m^(1 - i/r) satisfies a ↛ K_k (that is, ¬ (a → K_k)).

theorem decay_ramsey_product_colouring_bound (m r k : ℕ) (hm : 2 ≤ m) (hr : 2 ≤ r) (hk : 2 ≤ k)
    (c₀ : (SimpleGraph.completeGraph (Fin m)).edgeSet → ℕ+)
    (hc₀_range : ∀ e, (c₀ e : ℕ) ≤ r)
    (hc₀_free : ¬ op_258_has_mono_clique m c₀ k) :
    ¬ decay_ramsey_arrow (fun (i : ℕ+) => (m : ℝ) ^ (1 - (i : ℝ) / (r : ℝ))) k
decay_ramsey_product_colouring_existsIn LeanCombinatorics for TCS

Let m, r, k ≥ 2 and ℓ ≥ 1 be integers. If the complete graph K_m admits an edge-colouring using colours at most r with no monochromatic K_k, then the complete graph K_{m^ℓ} admits an a-bounded edge-colouring with no monochromatic K_k, where the sequence a is defined by a i = m^(1 - i/r).

theorem decay_ramsey_product_colouring_exists (m r k : ℕ) (hm : 2 ≤ m) (hr : 2 ≤ r) (hk : 2 ≤ k)
    (c₀ : (SimpleGraph.completeGraph (Fin m)).edgeSet → ℕ+)
    (hc₀_range : ∀ e, (c₀ e : ℕ) ≤ r)
    (hc₀_free : ¬ op_258_has_mono_clique m c₀ k)
    (ℓ : ℕ) (hℓ : 1 ≤ ℓ) :
    ∃ c : (SimpleGraph.completeGraph (Fin (m ^ ℓ))).edgeSet → ℕ+,
      op_258_bounded (fun (i : ℕ+) => (m : ℝ) ^ (1 - (i : ℝ) / (r : ℝ))) (m ^ ℓ) c ∧
      ¬ op_258_has_mono_clique (m ^ ℓ) c k
decay_ramsey_product_colouring_stepIn LeanCombinatorics for TCS

Inductive step: if K_{m^ℓ} admits an a-bounded colouring with no monochromatic K_k, then the product graph K_{m^{ℓ+1}} also admits an a-bounded colouring with no monochromatic K_k, where a(i) = m^(1 - i/r).

theorem decay_ramsey_product_colouring_step (m r k ℓ : ℕ) (hm : 2 ≤ m) (hr : 2 ≤ r) (hk : 2 ≤ k)
    (c₀ : (SimpleGraph.completeGraph (Fin m)).edgeSet → ℕ+)
    (hc₀_range : ∀ e, (c₀ e : ℕ) ≤ r)
    (hc₀_free : ¬ op_258_has_mono_clique m c₀ k)
    (hℓ : 1 ≤ ℓ)
    (ih : ∃ c : (SimpleGraph.completeGraph (Fin (m ^ ℓ))).edgeSet → ℕ+,
      op_258_bounded (fun (i : ℕ+) => (m : ℝ) ^ (1 - (i : ℝ) / (r : ℝ))) (m ^ ℓ) c ∧
      ¬ op_258_has_mono_clique (m ^ ℓ) c k) :
    ∃ c' : (SimpleGraph.completeGraph (Fin (m ^ (ℓ + 1)))).edgeSet → ℕ+,
      op_258_bounded (fun (i : ℕ+) => (m : ℝ) ^ (1 - (i : ℝ) / (r : ℝ))) (m ^ (ℓ + 1)) c' ∧
      ¬ op_258_has_mono_clique (m ^ (ℓ + 1)) c' k
dedekind_card_order_hom_three_mul_mod_threeIn LeanCombinatorics for TCS

For all non-negative integers n and k, the number of monotone functions from the 3k-dimensional Boolean lattice to the poset of monotone Boolean functions on n variables is congruent modulo 3 to the number of monotone functions from the k-th Cartesian power of the 4-element chain to that poset.

lemma dedekind_card_order_hom_three_mul_mod_three (n k : ℕ) : Fintype.card ((Fin (3 * k) → Bool) →o ((Fin n → Bool) →o Bool)) ≡ Fintype.card ((Fin k → Fin 4) →o ((Fin n → Bool) →o Bool)) [MOD 3]
dedekind_number_add_eq_card_order_homIn LeanCombinatorics for TCS

For all non-negative integers n and m, the (n + m)-th Dedekind number equals the cardinality of the poset of monotone functions from the m-dimensional Boolean lattice to the poset of monotone Boolean functions on n variables.

lemma dedekind_number_add_eq_card_order_hom (n m : ℕ) : dedekind_number (n + m) = Fintype.card ((Fin m → Bool) →o ((Fin n → Bool) →o Bool))
dedekind_number_add_three_mul_mod_threeIn LeanCombinatorics for TCS

For all non-negative integers n and k, the (n + 3k)-th Dedekind number is congruent modulo 3 to the cardinality of the poset of monotone functions from the k-th Cartesian power of the 4-element chain to the poset of monotone Boolean functions on n variables.

theorem dedekind_number_add_three_mul_mod_three (n k : ℕ) : dedekind_number (n + 3 * k) ≡ Fintype.card ((Fin k → Fin 4) →o ((Fin n → Bool) →o Bool)) [MOD 3]
dedekind_poset_add_order_isoIn LeanCombinatorics for TCS

For all non-negative integers n and m, the poset of monotone Boolean functions on n + m variables is isomorphic to the poset of monotone functions from the m-dimensional Boolean lattice to the poset of monotone Boolean functions on n variables.

theorem dedekind_poset_add_order_iso (n m : ℕ) : Nonempty (((Fin (n + m) → Bool) →o Bool) ≃o ((Fin m → Bool) →o ((Fin n → Bool) →o Bool)))
diagram_slide_preserves_vertical_syt_and_descentsIn LeanCombinatorics for TCS

Vertical slide along a consecutive admissible pair $(b_1, b_2)$ maps any standard Young tableau list on $D$ in which $b_2$ precedes $b_1$ to a standard Young tableau list on the vertical slide diagram, preserving all row descents.

theorem diagram_slide_preserves_vertical_syt_and_descents
    (D : Finset (ℕ × ℕ)) (b₁ b₂ : ℕ × ℕ)
    (hcap : diagram_is_consecutive_admissible_pair D b₁ b₂)
    (l : List (ℕ × ℕ)) (hl : is_standard_young_tableau_list D l)
    (hsplit : List.idxOf b₂ l < List.idxOf b₁ l) :
    is_standard_young_tableau_list (diagram_vertical_slide D b₁ b₂) (List.map (diagram_vertical_slide_box D b₁ b₂) l) ∧
    (∀ k, list_descent_at (List.map (diagram_vertical_slide_box D b₁ b₂) l) k ↔ list_descent_at l k)
diagram_slide_tree_node_agreesIn LeanCombinatorics for TCS

If a consecutive admissible pair $(b_1, b_2)$ in a diagram $D$ has child sliding trees $t_v$ and $t_h$ satisfying descent agreement, and if vertical and horizontal slides preserve standard Young tableaux and row descent locations, then the node tree constructed from $(b_1, b_2)$, $t_v$, and $t_h$ also satisfies descent agreement.

theorem diagram_slide_tree_node_agrees
    (D : Finset (ℕ × ℕ)) (b₁ b₂ : ℕ × ℕ)
    (hcap : diagram_is_consecutive_admissible_pair D b₁ b₂)
    (left : DiagramSlidingTree (diagram_vertical_slide D b₁ b₂))
    (right : DiagramSlidingTree (diagram_horizontal_slide D b₁ b₂))
    (hleft : diagram_slide_expansion_agrees_with_descents (diagram_vertical_slide D b₁ b₂) left)
    (hright : diagram_slide_expansion_agrees_with_descents (diagram_horizontal_slide D b₁ b₂) right)
    (hpres_v : ∀ l, is_standard_young_tableau_list D l → List.idxOf b₂ l < List.idxOf b₁ l →
      is_standard_young_tableau_list (diagram_vertical_slide D b₁ b₂) (l.map (diagram_vertical_slide_box D b₁ b₂)) ∧
      (∀ k, list_descent_at (l.map (diagram_vertical_slide_box D b₁ b₂)) k ↔ list_descent_at l k))
    (hpres_h : ∀ l, is_standard_young_tableau_list D l → ¬ (List.idxOf b₂ l < List.idxOf b₁ l) →
      is_standard_young_tableau_list (diagram_horizontal_slide D b₁ b₂) (l.map (diagram_horizontal_slide_box D b₁ b₂)) ∧
      (∀ k, list_descent_at (l.map (diagram_horizontal_slide_box D b₁ b₂)) k ↔ list_descent_at l k)) :
    diagram_slide_expansion_agrees_with_descents D (DiagramSlidingTree.node D b₁ b₂ hcap left right)
diff_card_le_high_rep_card_of_large_countIn LeanCombinatorics for TCS

Let G be a finite abelian group of odd order, A ⊆ G, g ∉ Σ₃(A), and σ ∈ G with ν_A(σ) > N - 2|A| + 9. Then σ + (A - A) is contained in the high-representation set P(A), hence |A - A| ≤ |P(A)|.

open scoped Pointwise in
theorem diff_card_le_high_rep_card_of_large_count {G : Type*} [AddCommGroup G] [Fintype G]
    [DecidableEq G] {A : Finset G} {g σ : G} (hodd : Fintype.card G % 2 = 1)
    (hg : g ∉ restrictedSumset A 3)
    (hσ : (Fintype.card G : ℤ) - 2 * (A.card : ℤ) + 9 < (orderedPairSumCount A σ : ℤ)) :
    (A - A).card ≤ (highRepSet A).card
digraph_d2_tilde_graph_has_triangleIn LeanCombinatorics for TCS

There exists a 3-element subset of vertices of the underlying simple graph of D̃₂ that forms a 3-clique: ∃ s : Finset DigraphD2TildeVertex, digraph_d2_tilde_graph.IsNClique 3 s.

theorem digraph_d2_tilde_graph_has_triangle :
    ∃ s : Finset DigraphD2TildeVertex, digraph_d2_tilde_graph.IsNClique 3 s
digraph_d2_tilde_graph_not_isBipartiteIn LeanCombinatorics for TCS

The underlying simple graph digraph_d2_tilde_graph is not bipartite: ¬ digraph_d2_tilde_graph.IsBipartite.

theorem digraph_d2_tilde_graph_not_isBipartite :
    ¬ digraph_d2_tilde_graph.IsBipartite
directed_cycle_entropy_boundIn LeanCombinatorics for TCS

Let n ≥ 1 be an integer, and let P be a probability distribution on the cyclic group ZMod n. For each r in ZMod n, let d_r be the expected clockwise distance ∑_s P(s) c(s, r), and let H(P) = -∑_s P(s) log_2 P(s) be the Shannon entropy of P in bits. Then 2^(H(P)) * ∑_r 2^(-d_r) ≤ 6 + 4 * sqrt(2).

theorem directed_cycle_entropy_bound
    (n : ℕ) [NeZero n]
    (P : ZMod n → ℝ) (hP_nonneg : ∀ s, 0 ≤ P s) (hP_sum : ∑ s, P s = 1) :
    let d : ZMod n → ℝ := fun r ↦ ∑ s, P s * zmod_clockwise_dist s r
    let HP : ℝ := - ∑ s, P s * Real.logb 2 (P s)
    (2 : ℝ) ^ HP * ∑ r, (2 : ℝ) ^ (- d r) ≤ 6 + 4 * Real.sqrt 2
disjoint_of_strongly_incomparableIn LeanCombinatorics for TCS

If an indexed family of finset families 𝒜 : ι → Finset (Finset α) is strongly incomparable, then for any distinct indices i ≠ j, the finsets 𝒜 i and 𝒜 j are disjoint.

lemma disjoint_of_strongly_incomparable {ι α : Type*} (𝒜 : ι → Finset (Finset α)) (h : strongly_incomparable 𝒜) {i j : ι} (hij : i ≠ j) : Disjoint (𝒜 i) (𝒜 j)
distinct_subset_sums_certificate_det_boundIn LeanCombinatorics for TCS

For a positive definite real k × k matrix A with k ≥ 1, (k+1)·det A ≤ (W/k)^k where W = ∑ᵢ ∑ⱼ (if i = j then 2 else 1)·A i j.

theorem distinct_subset_sums_certificate_det_bound (k : ℕ) (hk : 1 ≤ k)
  (A : Matrix (Fin k) (Fin k) ℝ) (hA : Matrix.PosDef A) :
  ((k : ℝ) + 1) * A.det ≤
    ((∑ i, ∑ j, (if i = j then (2 : ℝ) else 1) * A i j) / (k : ℝ)) ^ k
distinct_subset_sums_certificate_weightsIn LeanCombinatorics for TCS

There is a probability distribution w on the 2^k cube vertices (encoded as subsets of Fin k) whose uncentred second moment matrix E[V Vᵀ] is c·(I + 11ᵀ) with c = floor((k+1)^2/4) / (k(k+1)): that is, E[V_i V_j] = c·(2 if i = j else 1).

theorem distinct_subset_sums_certificate_weights (k : ℕ) (hk : 1 ≤ k) :
  ∃ w : Finset (Fin k) → ℝ,
    (∀ T, 0 ≤ w T) ∧
    (∑ T : Finset (Fin k), w T = 1) ∧
    (∀ i j : Fin k, ∑ T : Finset (Fin k),
        w T * (if i ∈ T then (1 : ℝ) else 0) * (if j ∈ T then (1 : ℝ) else 0) =
      (Nat.floor (((k : ℝ) + 1) ^ 2 / 4) : ℝ) / ((k : ℝ) * ((k : ℝ) + 1)) *
        (if i = j then 2 else 1))
distinct_subset_sums_indicator_quad_formIn LeanCombinatorics for TCS

For any real k × k matrix A and any subset S of the index set, the quadratic form of A at the indicator vector of S equals ∑_{i ∈ S} ∑_{j ∈ S} A i j.

theorem distinct_subset_sums_indicator_quad_form (k : ℕ) (A : Matrix (Fin k) (Fin k) ℝ)
  (S : Finset (Fin k)) :
  (fun i => if i ∈ S then (1 : ℝ) else 0) ⬝ᵥ A.mulVec (fun i => if i ∈ S then (1 : ℝ) else 0)
    = ∑ i ∈ S, ∑ j ∈ S, A i j
distinct_subset_sums_matrix_constant_leIn LeanCombinatorics for TCS

For any natural number k ≥ 1 and any real symmetric positive definite k × k matrix A (satisfying Matrix.PosDef A), distinct_subset_sums_matrix_constant k A ≤ distinct_subset_sums_constant k.

theorem distinct_subset_sums_matrix_constant_le (k : ℕ) (hk : 1 ≤ k)
  (A : Matrix (Fin k) (Fin k) ℝ) (hA : Matrix.PosDef A) :
  distinct_subset_sums_matrix_constant k A ≤ distinct_subset_sums_constant k
distinct_subset_sums_matrix_constant_le_of_quad_max_boundIn LeanCombinatorics for TCS

If distinct_subset_sums_quad_max k A is at least floor((k+1)^2/4)·(det A)^(1/k)/(k+1)^((k-1)/k), then distinct_subset_sums_matrix_constant k A ≤ distinct_subset_sums_constant k.

theorem distinct_subset_sums_matrix_constant_le_of_quad_max_bound (k : ℕ) (hk : 1 ≤ k)
  (A : Matrix (Fin k) (Fin k) ℝ) (hA : Matrix.PosDef A)
  (h : ((Nat.floor (((k : ℝ) + 1) ^ 2 / 4) : ℝ) * A.det ^ ((1 : ℝ) / (k : ℝ))) /
    ((k : ℝ) + 1) ^ (((k : ℝ) - 1) / (k : ℝ)) ≤ distinct_subset_sums_quad_max k A) :
  distinct_subset_sums_matrix_constant k A ≤ distinct_subset_sums_constant k
distinct_subset_sums_quad_max_det_rpow_lower_boundIn LeanCombinatorics for TCS

For positive definite A, distinct_subset_sums_quad_max k A is at least floor((k+1)^2/4)·(det A)^(1/k)/(k+1)^((k-1)/k). Equality holds at the root lattice matrix.

theorem distinct_subset_sums_quad_max_det_rpow_lower_bound (k : ℕ) (hk : 1 ≤ k)
  (A : Matrix (Fin k) (Fin k) ℝ) (hA : Matrix.PosDef A) :
  ((Nat.floor (((k : ℝ) + 1) ^ 2 / 4) : ℝ) * A.det ^ ((1 : ℝ) / (k : ℝ))) /
    ((k : ℝ) + 1) ^ (((k : ℝ) - 1) / (k : ℝ)) ≤ distinct_subset_sums_quad_max k A
distinct_subset_sums_quad_max_ge_certificate_traceIn LeanCombinatorics for TCS

For any real k × k matrix A with k ≥ 1, the sum of the entries of A weighted by (2 on the diagonal, 1 off it) is at most (k(k+1)/floor((k+1)^2/4)) times distinct_subset_sums_quad_max k A.

theorem distinct_subset_sums_quad_max_ge_certificate_trace (k : ℕ) (hk : 1 ≤ k)
  (A : Matrix (Fin k) (Fin k) ℝ) :
  ∑ i, ∑ j, (if i = j then (2 : ℝ) else 1) * A i j ≤
    ((k : ℝ) * ((k : ℝ) + 1) / (Nat.floor (((k : ℝ) + 1) ^ 2 / 4) : ℝ)) *
      distinct_subset_sums_quad_max k A
distinct_subset_sums_quad_max_ge_cube_quad_formIn LeanCombinatorics for TCS

Every value of the quadratic form q_A(u) = uᵀAu at a point u of the unit cube [0,1]^k is at most distinct_subset_sums_quad_max k A.

theorem distinct_subset_sums_quad_max_ge_cube_quad_form (k : ℕ) (A : Matrix (Fin k) (Fin k) ℝ)
  (u : Fin k → ℝ) (hu : u ∈ Set.Icc (0 : Fin k → ℝ) 1) :
  u ⬝ᵥ A.mulVec u ≤ distinct_subset_sums_quad_max k A
distinct_subset_sums_root_matrix_constant_eqIn LeanCombinatorics for TCS

For any natural number k ≥ 1, the constant distinct_subset_sums_matrix_constant k applied to the root lattice matrix distinct_subset_sums_root_matrix k equals distinct_subset_sums_constant k.

theorem distinct_subset_sums_root_matrix_constant_eq (k : ℕ) (hk : 1 ≤ k) :
  distinct_subset_sums_matrix_constant k (distinct_subset_sums_root_matrix k) =
    distinct_subset_sums_constant k
distinct_subset_sums_root_matrix_detIn LeanCombinatorics for TCS

For any natural number k ≥ 1, the determinant of distinct_subset_sums_root_matrix k is 1 / (k + 1).

theorem distinct_subset_sums_root_matrix_det (k : ℕ) (hk : 1 ≤ k) :
  Matrix.det (distinct_subset_sums_root_matrix k) = 1 / ((k : ℝ) + 1)
distinct_subset_sums_root_matrix_optimalIn LeanCombinatorics for TCS

For any natural number k ≥ 1, the constant distinct_subset_sums_matrix_constant k evaluated at the root lattice matrix distinct_subset_sums_root_matrix k equals distinct_subset_sums_constant k, and distinct_subset_sums_constant k is the greatest element of the set of all real numbers c for which there exists a positive definite matrix A with c = distinct_subset_sums_matrix_constant k A.

theorem distinct_subset_sums_root_matrix_optimal (k : ℕ) (hk : 1 ≤ k) :
  distinct_subset_sums_matrix_constant k (distinct_subset_sums_root_matrix k) =
    distinct_subset_sums_constant k ∧
  IsGreatest {c | ∃ (A : Matrix (Fin k) (Fin k) ℝ), Matrix.PosDef A ∧
    c = distinct_subset_sums_matrix_constant k A} (distinct_subset_sums_constant k)
distinct_subset_sums_root_matrix_quad_formIn LeanCombinatorics for TCS

For any natural number k and any real vector x : Fin k → ℝ, the quadratic form dotProduct x (distinct_subset_sums_root_matrix k *ᵥ x) equals ∑ i, (x i)^2 - (1 / (k + 1)) * (∑ i, x i)^2.

theorem distinct_subset_sums_root_matrix_quad_form (k : ℕ) (x : Fin k → ℝ) :
  dotProduct x (Matrix.mulVec (distinct_subset_sums_root_matrix k) x) =
    ∑ i, (x i) ^ 2 - (1 / ((k : ℝ) + 1)) * (∑ i, x i) ^ 2
distinct_subset_sums_root_matrix_quad_maxIn LeanCombinatorics for TCS

For any natural number k ≥ 1, the maximum of the quadratic form of distinct_subset_sums_root_matrix k over the unit cube [0, 1]^k is Nat.floor ((k + 1)^2 / 4) / (k + 1).

theorem distinct_subset_sums_root_matrix_quad_max (k : ℕ) (hk : 1 ≤ k) :
  distinct_subset_sums_quad_max k (distinct_subset_sums_root_matrix k) =
    (Nat.floor (((k : ℝ) + 1) ^ 2 / 4) : ℝ) / ((k : ℝ) + 1)
doubled_triangle_fold_count_lower_bound_and_minimum_isoperimetric_ratioIn LeanCombinatorics for TCS

Let n >= 1 be an integer. Every good coloring C of the doubled equilateral triangle triangulation T(n) satisfies f(C) >= 3 * n and eta(C) >= 9 / 2 in Q. Moreover, the two-sided coloring B_n is a good coloring with f(B_n) = 3 * n and eta(B_n) = 9 / 2 in Q.

theorem doubled_triangle_fold_count_lower_bound_and_minimum_isoperimetric_ratio
    {n : ℕ} (hn : 0 < n) :
    (∀ C : DoubledTriangleFace n → Bool, doubled_triangle_is_good_coloring C →
      doubled_triangle_fold_count C ≥ 3 * n ∧
      doubled_triangle_isoperimetric_ratio n C ≥ 9 / 2) ∧
    doubled_triangle_is_good_coloring (doubled_triangle_two_sided_coloring n) ∧
    doubled_triangle_fold_count (doubled_triangle_two_sided_coloring n) = 3 * n ∧
    doubled_triangle_isoperimetric_ratio n (doubled_triangle_two_sided_coloring n) = 9 / 2
doubled_triangle_good_coloring_majority_sixIn LeanCombinatorics for TCS

At any vertex v of degree 6 in T(n) under a good coloring C, if at least 4 incident faces have color c, then all incident faces of v have color c.

theorem doubled_triangle_good_coloring_majority_six
    {n : ℕ} (C : DoubledTriangleFace n → Bool)
    (hC : doubled_triangle_is_good_coloring C)
    (v : DoubledTriangleVertex n)
    (h_card : (doubled_triangle_vertex_faces v).card = 6)
    (c : Bool)
    (h_ge : 4 ≤ ((doubled_triangle_vertex_faces v).filter (fun f => C f = c)).card) :
    ∀ f ∈ doubled_triangle_vertex_faces v, C f = c
doubled_triangle_good_coloring_no_ring_monochromaticIn LeanCombinatorics for TCS

Let n ≥ 1 and let C be a good coloring of the doubled equilateral triangle triangulation T(n). Then no ring R : DoubledTriangleRing n of T(n) is monochromatic under C, meaning that doubled_triangle_ring_is_monochromatic C R is false.

theorem doubled_triangle_good_coloring_no_ring_monochromatic
    {n : ℕ} (hn : 1 ≤ n) (C : DoubledTriangleFace n → Bool)
    (hC : doubled_triangle_is_good_coloring C)
    (R : DoubledTriangleRing n) :
    ¬ doubled_triangle_ring_is_monochromatic C R
doubled_triangle_interior_vertex_faces_cardIn LeanCombinatorics for TCS

In the doubled equilateral triangle triangulation T(n), every interior vertex is incident to exactly 6 faces.

theorem doubled_triangle_interior_vertex_faces_card {n : ℕ} (front : Bool) (i j : Fin (n + 1))
    (hi : 0 < (i : ℕ)) (hj : 0 < (j : ℕ)) (h_lt : (i : ℕ) + j < n) :
    (doubled_triangle_vertex_faces (DoubledTriangleVertex.interior front i j hi hj h_lt)).card = 6
doubled_triangle_point_to_vertex_eq_interior_iffIn LeanCombinatorics for TCS

doubled_triangle_point_to_vertex maps (f_front, a, b) to an interior vertex (front, i, j) if and only if f_front = front, a = i, and b = j.

theorem doubled_triangle_point_to_vertex_eq_interior_iff {n : ℕ} {front f_front : Bool}
    {i j : Fin (n + 1)} {hi : 0 < (i : ℕ)} {hj : 0 < (j : ℕ)} {h_lt : (i : ℕ) + j < n}
    {a b : Fin (n + 1)} (hab : (a : ℕ) + b ≤ n) :
    doubled_triangle_point_to_vertex f_front a b hab = DoubledTriangleVertex.interior front i j hi hj h_lt ↔
    f_front = front ∧ (a : ℕ) = i ∧ (b : ℕ) = j
doubled_triangle_two_sided_coloring_boundary_card_eqIn LeanCombinatorics for TCS

For any boundary vertex of the doubled triangle T(n), the reflection across front and back is an involution preserving incidence to the vertex and toggling face color, so the number of black incident faces equals the number of white incident faces.

theorem doubled_triangle_two_sided_coloring_boundary_card_eq {n : ℕ}
    (i j : Fin (n + 1)) (h : (i : ℕ) + j ≤ n) (h_bd : (i : ℕ) = 0 ∨ (j : ℕ) = 0 ∨ (i : ℕ) + j = n) :
    {f ∈ doubled_triangle_vertex_faces (DoubledTriangleVertex.boundary i j h h_bd) |
      doubled_triangle_two_sided_coloring n f = true}.card =
    {f ∈ doubled_triangle_vertex_faces (DoubledTriangleVertex.boundary i j h h_bd) |
      doubled_triangle_two_sided_coloring n f = false}.card
doubled_triangle_two_sided_coloring_is_goodIn LeanCombinatorics for TCS

For any integer n >= 1, the two-sided coloring B_n of T(n) is a good coloring.

theorem doubled_triangle_two_sided_coloring_is_good {n : ℕ} (hn : 0 < n) :
    doubled_triangle_is_good_coloring (doubled_triangle_two_sided_coloring n)
doubled_triangle_x_ring_monochromatic_propagationIn LeanCombinatorics for TCS

For 0 ≤ k and k + 1 < n, if all faces of the x-ring DoubledTriangleRing.x (n := n) ⟨k, by omega⟩ have color c under a good coloring C of T(n), then all faces of the adjacent x-ring DoubledTriangleRing.x (n := n) ⟨k + 1, hk⟩ also have color c under C.

theorem doubled_triangle_x_ring_monochromatic_propagation
    {n : ℕ} (k : ℕ) (hk : k + 1 < n) (C : DoubledTriangleFace n → Bool)
    (hC : doubled_triangle_is_good_coloring C) (c : Bool)
    (h_mono : ∀ f ∈ doubled_triangle_ring_faces (DoubledTriangleRing.x (n := n) ⟨k, by omega⟩), C f = c) :
    ∀ f ∈ doubled_triangle_ring_faces (DoubledTriangleRing.x (n := n) ⟨k + 1, hk⟩), C f = c
doubled_triangle_x_ring_step_inductiveIn LeanCombinatorics for TCS

If all faces of ring k have color c under a good coloring C, and the up-face at (k+1, j) has color c, then the down-face at (k+1, j) and the up-face at (k+1, j+1) both have color c.

theorem doubled_triangle_x_ring_step_inductive
    {n : ℕ} (k : ℕ) (hk : k + 1 < n) (C : DoubledTriangleFace n → Bool)
    (hC : doubled_triangle_is_good_coloring C) (c : Bool)
    (h_mono : ∀ f ∈ doubled_triangle_ring_faces (DoubledTriangleRing.x (n := n) ⟨k, by omega⟩), C f = c)
    (front : Bool) (j : ℕ) (hj : (k + 1 : ℕ) + j + 1 < n)
    (h_prev : C (DoubledTriangleFace.up front ⟨k + 1, hk⟩ ⟨j, by omega⟩ (by show (k + 1 : ℕ) + j < n; omega)) = c) :
    C (DoubledTriangleFace.down front ⟨k + 1, hk⟩ ⟨j, by omega⟩ (by show (k + 1 : ℕ) + j + 1 < n; omega)) = c ∧
    C (DoubledTriangleFace.up front ⟨k + 1, hk⟩ ⟨j + 1, by omega⟩ (by show (k + 1 : ℕ) + (j + 1) < n; omega)) = c
doubled_triangle_x_ring_step_up_zeroIn LeanCombinatorics for TCS

If all faces of the x-ring k have color c under a good coloring C of T(n), then the up-face at lattice position (k+1, 0) has color c for both front and back.

theorem doubled_triangle_x_ring_step_up_zero
    {n : ℕ} (k : ℕ) (hk : k + 1 < n) (C : DoubledTriangleFace n → Bool)
    (hC : doubled_triangle_is_good_coloring C) (c : Bool)
    (h_mono : ∀ f ∈ doubled_triangle_ring_faces (DoubledTriangleRing.x (n := n) ⟨k, by omega⟩), C f = c)
    (front : Bool) (h : (k + 1 : ℕ) + 0 < n) :
    C (DoubledTriangleFace.up front ⟨k + 1, hk⟩ ⟨0, by omega⟩ (by show (k + 1 : ℕ) + 0 < n; omega)) = c
dual_notvanishing_ncardIn LeanCombinatorics for TCS

Let p be a prime and v ≠ 0 in (ZMod p)^3. Then the number of linear functionals f on (ZMod p)^3 with f(v) ≠ 0 is p^3 − p^2.

theorem dual_notvanishing_ncard
    (p : ℕ) [Fact p.Prime] (v : Fin 3 → ZMod p) (hv : v ≠ 0) :
    Nat.card {f : (Fin 3 → ZMod p) →ₗ[ZMod p] ZMod p // f v ≠ 0} = p ^ 3 - p ^ 2
dual_vanishing_at_vector_cardIn LeanCombinatorics for TCS

For any nonzero vector v in (ZMod p)^3, the space of linear functionals f with f(v) = 0 has cardinality p^2.

theorem dual_vanishing_at_vector_card
    (p : ℕ) [Fact p.Prime] (v : Fin 3 → ZMod p) (hv : v ≠ 0) :
    Nat.card {f : (Fin 3 → ZMod p) →ₗ[ZMod p] ZMod p // f v = 0} = p ^ 2
dual_vanishing_off_span_ncardIn LeanCombinatorics for TCS

Let p be a prime, v ≠ 0, and u not in the span of v (so u, v are linearly independent). Then exactly p(p−1) functionals f satisfy f(u) = 0 and f(v) ≠ 0.

theorem dual_vanishing_off_span_ncard
    (p : ℕ) [Fact p.Prime] (v u : Fin 3 → ZMod p) (hv : v ≠ 0)
    (hu : u ∉ Submodule.span (ZMod p) {v}) :
    Nat.card {f : (Fin 3 → ZMod p) →ₗ[ZMod p] ZMod p // f v ≠ 0 ∧ f u = 0} = p * (p - 1)
dual_vanishing_on_span_ncardIn LeanCombinatorics for TCS

Let p be a prime, v ≠ 0, and u ≠ 0 with u in the span of v. Then no functional is simultaneously nonzero at v and zero at u, so the count of such functionals is 0.

theorem dual_vanishing_on_span_ncard
    (p : ℕ) [Fact p.Prime] (v u : Fin 3 → ZMod p) (hv : v ≠ 0)
    (hu : u ∈ Submodule.span (ZMod p) {v}) (hu0 : u ≠ 0) :
    Nat.card {f : (Fin 3 → ZMod p) →ₗ[ZMod p] ZMod p // f v ≠ 0 ∧ f u = 0} = 0
elem_symm_on_alternating_partial_posIn LeanCombinatorics for TCS

For a finite set s of indices, a natural number K with K < |s|, and u : ι → ℝ with u i ≥ 1 for all i in s, the alternating sum ∑_{m=0}^{K} (-1)^m e_m(u over s) has the strict sign (-1)^K: that is, (-1)^K times it is strictly positive.

theorem elem_symm_on_alternating_partial_pos {ι : Type*} [DecidableEq ι] (s : Finset ι) (K : ℕ)
    (hK : K < s.card) (u : ι → ℝ) (hu : ∀ k ∈ s, 1 ≤ u k) :
    0 < (-1 : ℝ)^K * ∑ m ∈ Finset.range (K + 1), (-1 : ℝ)^m * elem_symm_on s m u
elem_symm_on_insertIn LeanCombinatorics for TCS

For a finite set s of indices, an index i not in s, a natural number k and v : ι → ℝ, the (k+1)-st elementary symmetric sum of v over insert i s equals the (k+1)-st elementary symmetric sum over s plus v i times the k-th elementary symmetric sum over s.

theorem elem_symm_on_insert {ι : Type*} [DecidableEq ι] (s : Finset ι) (i : ι) (hi : i ∉ s) (k : ℕ) (v : ι → ℝ) :
    elem_symm_on (insert i s) (k + 1) v = elem_symm_on s (k + 1) v + v i * elem_symm_on s k v
elem_symm_on_posIn LeanCombinatorics for TCS

For a finite set s of indices, a natural number k with k ≤ |s|, and v : ι → ℝ with v i > 0 for all i in s, the k-th elementary symmetric sum of v over s is strictly positive.

theorem elem_symm_on_pos {ι : Type*} [DecidableEq ι] (s : Finset ι) (k : ℕ) (v : ι → ℝ)
    (hv : ∀ i ∈ s, 0 < v i) (hk : k ≤ s.card) : 0 < elem_symm_on s k v
elem_symm_on_two_coordIn LeanCombinatorics for TCS

For natural numbers n and r with 2 ≤ r, distinct i j : Fin n and w : Fin n → ℝ, writing R = (univ \ {i}) \ {j} for the remaining indices, the r-th elementary symmetric sum of w over univ equals e_r(w over R) + (w i + w j) * e_{r-1}(w over R) + (w i * w j) * e_{r-2}(w over R).

theorem elem_symm_on_two_coord {n : ℕ} (r : ℕ) (hr : 2 ≤ r) (i j : Fin n) (hij : i ≠ j) (w : Fin n → ℝ) :
    elem_symm_on (Finset.univ : Finset (Fin n)) r w =
      elem_symm_on ((Finset.univ.erase i).erase j) r w +
        (w i + w j) * elem_symm_on ((Finset.univ.erase i).erase j) (r - 1) w +
        w i * w j * elem_symm_on ((Finset.univ.erase i).erase j) (r - 2) w
elem_symm_on_univIn LeanCombinatorics for TCS

For natural numbers n and k and v : Fin n → ℝ, the k-th elementary symmetric sum of v over the whole index set univ equals elem_symm k v.

theorem elem_symm_on_univ {n : ℕ} (k : ℕ) (v : Fin n → ℝ) :
    elem_symm_on (Finset.univ : Finset (Fin n)) k v = elem_symm k v
equal_weight_family_item_countIn LeanCombinatorics for TCS

If every chore visits every agent once across n rounds, then for any agent and set of chores the sum over rounds of the number of those chores assigned to that agent equals the set’s cardinality.

theorem equal_weight_family_item_count (n m : ℕ) (F : Fin n → Fin m → Fin n) (hbij : ∀ g, Function.Bijective (fun t => F t g)) (i : Fin n) (H : Finset (Fin m)) : (∑ t : Fin n, ((bundle_of (F t) i) ∩ H).card) = H.card
equidistant_sets_direction_orthogonalIn LeanCombinatorics for TCS

Let $X$ and $Y$ be finite nonempty subsets of a real inner product space $V$ such that every point $y \in Y$ is equidistant from all points of $X$. Then for all $x, x' \in X$ and $y, y' \in Y$, the inner product $\langle y - y', x - x'\rangle = 0$.

theorem equidistant_sets_direction_orthogonal {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V]
    (X Y : Finset V) (hX : X.Nonempty) (hY : Y.Nonempty)
    (h_dist : ∀ y ∈ Y, ∃ r : ℝ, ∀ x ∈ X, ‖y - x‖ = r)
    (x : V) (hx : x ∈ X) (x' : V) (hx' : x' ∈ X)
    (y : V) (hy : y ∈ Y) (y' : V) (hy' : y' ∈ Y) :
    @inner ℝ V _ (y - y') (x - x') = 0
euclidean_avoids_ap_of_radialIn LeanCombinatorics for TCS

Radial transfer lemma. Let α > 0 and S ⊆ ℝ. Suppose (hA) that for all r ≥ 0 and all t with t² ≤ r² at least one of r², r² + 2t + 1, r² + 4t + 4 lies in S, and (hB) that for all r ≥ 0 and all t with t² ≤ r² some member r² + 2kαt + k²α² with 0 ≤ k ≤ 20 lies outside S. Then the radial colouring x ↦ (‖x‖² ∈ S) has no all-false unit-spaced 3-term arithmetic progression and no all-true α-spaced 21-term arithmetic progression in any dimension n, i.e. euclidean_avoids_ap n 3 1 21 α.

theorem euclidean_avoids_ap_of_radial (α : ℝ) (hα : 0 < α) (S : Set ℝ)
    (hA : ∀ r t : ℝ, 0 ≤ r → t ^ 2 ≤ r ^ 2 →
      r ^ 2 ∈ S ∨ r ^ 2 + 2 * t + 1 ∈ S ∨ r ^ 2 + 4 * t + 4 ∈ S)
    (hB : ∀ r t : ℝ, 0 ≤ r → t ^ 2 ≤ r ^ 2 →
      ∃ k : Fin 21, r ^ 2 + 2 * (k : ℝ) * α * t + (k : ℝ) ^ 2 * α ^ 2 ∉ S)
    (n : ℕ) : euclidean_avoids_ap n 3 1 21 α
euclidean_avoids_ap_of_radial_acIn LeanCombinatorics for TCS

Second form of the radial transfer lemma, in the coordinates used by the periodic-certificate search: writing a = ‖x₀‖² − c² (≥ 0) and c = ⟨x₀, v⟩, the conclusion euclidean_avoids_ap n 3 1 21 α follows from (hA) for all a ≥ 0 and all c one of a + c², a + (c+1)², a + (c+2)² lies in S, and (hB) for all a ≥ 0 and all c some a + (c + kα)² with 0 ≤ k ≤ 20 lies outside S.

theorem euclidean_avoids_ap_of_radial_ac (α : ℝ) (hα : 0 < α) (S : Set ℝ)
    (hA : ∀ a c : ℝ, 0 ≤ a → a + c ^ 2 ∈ S ∨ a + (c + 1) ^ 2 ∈ S ∨ a + (c + 2) ^ 2 ∈ S)
    (hB : ∀ a c : ℝ, 0 ≤ a → ∃ k : Fin 21, a + (c + (k : ℝ) * α) ^ 2 ∉ S)
    (n : ℕ) : euclidean_avoids_ap n 3 1 21 α
even_component_satisfies_recurrence_2_1In LeanCombinatorics for TCS

Let N ≥ 2, and let a, c : Fin (2 * N + 1) → ℝ satisfy condition (2.1) of size 2N with b = fun _ => 0. Then (even_component_a N a, even_component_b N a c, even_component_c N a c) satisfies condition (2.1) of size N.

theorem even_component_satisfies_recurrence_2_1
    (N : ℕ) (hN : 2 ≤ N) (a c : Fin (2 * N + 1) → ℝ)
    (hrec : satisfies_recurrence_2_1 (2 * N) a (fun _ => 0) c) :
    satisfies_recurrence_2_1 N (even_component_a N a) (even_component_b N a c) (even_component_c N a c)
even_le_seven_implies_le_sixIn LeanCombinatorics for TCS

If n is an even natural number and n ≤ 7, then n ≤ 6.

theorem even_le_seven_implies_le_six (n : ℕ) (heven : Even n) (hle : n ≤ 7) : n ≤ 6
exact_hirsch_diameter_of_disjoint_minimal_nonfacesIn LeanCombinatorics for TCS

Let Δ be an abstract simplicial complex on an n-element vertex set V, pure of facet size d, with connected dual graph. If the minimal nonfaces of Δ are pairwise disjoint and there are s such minimal nonfaces, then d = n - s, Δ is normal, and the diameter of the dual graph of Δ is exactly s = n - d.

theorem exact_hirsch_diameter_of_disjoint_minimal_nonfaces {V : Type*} [DecidableEq V] [Fintype V] (Δ : AbstractSimplicialComplex V) (n d s : ℕ) (hn : Fintype.card V = n) (hpure : simplicial_is_pure Δ d) (hconn : (simplicial_dual_graph Δ d).Connected) (M_set : Finset (Finset V)) (hs : M_set.card = s) (hM_all : ∀ M, simplicial_is_minimal_nonface Δ M ↔ M ∈ M_set) (hM_disj : ∀ M₁ ∈ M_set, ∀ M₂ ∈ M_set, M₁ ≠ M₂ → Disjoint M₁ M₂) : d = n - s ∧ simplicial_is_normal Δ d ∧ (simplicial_dual_graph Δ d).diam = s ∧ s = n - d
exists_disjoint_finset_card_eqIn LeanCombinatorics for TCS

In an infinite type with decidable equality, for every finite set s and every natural number k, there exists a finite subset A of cardinality k disjoint from s.

theorem exists_disjoint_finset_card_eq {α : Type*} [DecidableEq α] [Infinite α]
    (s : Finset α) (k : ℕ) :
    ∃ A : Finset α, A.card = k ∧ Disjoint A s
exists_edge_and_unique_vertex_of_not_min_degree_twoIn LeanCombinatorics for TCS

If in a finite hypergraph some vertex of the union of the edges is contained in at most one edge, then there is an edge e and a vertex v ∈ e such that v belongs to no edge other than e.

theorem exists_edge_and_unique_vertex_of_not_min_degree_two {V : Type*} [DecidableEq V]
    (F : Finset (Finset V))
    (hfails : ¬ ∀ v ∈ F.biUnion id, 2 ≤ (F.filter (fun e => v ∈ e)).card) :
    ∃ e ∈ F, ∃ v ∈ e, ∀ f ∈ F, v ∈ f → f = e
exists_high_rep_count_gt_of_not_memIn LeanCombinatorics for TCS

Let G be a finite abelian group of odd order N ≥ 21, A ⊆ G with |A| > N/2, and suppose g ∉ Σ₃(A). Then there is σ ∈ G with more than two ordered restricted pair representations from A, and indeed ν_A(σ) > N - 2|A| + 9.

theorem exists_high_rep_count_gt_of_not_mem {G : Type*} [AddCommGroup G] [Fintype G] [DecidableEq G] {A : Finset G} {g : G} (hN : 21 ≤ Fintype.card G) (hodd : Fintype.card G % 2 = 1) (hA : Fintype.card G / 2 < A.card) (hg : g ∉ restrictedSumset A 3) : ∃ σ : G, 2 < orderedPairSumCount A σ ∧ (Fintype.card G : ℤ) - 2 * (A.card : ℤ) + 9 < (orderedPairSumCount A σ : ℤ)
exists_nonbipartite_oas_digraphIn LeanCombinatorics for TCS

The directed graph D̃₂ is an oriented anti-Sidorenko directed graph whose underlying simple graph contains a 3-clique and is not bipartite: for every digraphon W satisfying is_digraphon W, d2_tilde_density W ≤ d2_tilde_density (digraphon_symmetrization W), there exists a 3-clique in digraph_d2_tilde_graph, and digraph_d2_tilde_graph is not bipartite.

theorem exists_nonbipartite_oas_digraph :
    (∀ W, is_digraphon W → d2_tilde_density W ≤ d2_tilde_density (digraphon_symmetrization W)) ∧
    (∃ s : Finset DigraphD2TildeVertex, digraph_d2_tilde_graph.IsNClique 3 s) ∧
    ¬ digraph_d2_tilde_graph.IsBipartite
exists_nonempty_zero_sum_zmod_prodIn LeanCombinatorics for TCS

Olson's theorem on the Davenport constant: when m divides n, every multiset of m + n − 1 elements of ZMod m × ZMod n contains a nonempty submultiset with sum zero; i.e. the Davenport constant of C_m × C_n is m + n − 1.

theorem exists_nonempty_zero_sum_zmod_prod (m n : ℕ) (hm : 1 ≤ m) (hn : 1 ≤ n) (hmn : m ∣ n) (S : Multiset (ZMod m × ZMod n)) (hcard : m + n - 1 ≤ S.card) : ∃ T : Multiset (ZMod m × ZMod n), T ≤ S ∧ T ≠ 0 ∧ T.sum = 0
exists_palette_record_indicesIn LeanCombinatorics for TCS

Given T ≥ 1 and D : ℕ → ℝ on [1, T] with sum at most kn, there exists a sequence of record minima indices r_0 = 1 < r_1 < ... < r_m ≤ T with D(r_l) non-increasing, step sum at most kn, and D(r_m) ≤ kn/T.

theorem exists_palette_record_indices (T k : ℕ) (n : ℝ) (hT : 0 < T) (D : ℕ → ℝ)
    (hD_range : ∀ t ∈ Finset.Icc 1 T, 0 ≤ D t ∧ D t ≤ n)
    (hD_sum : ∑ t ∈ Finset.Icc 1 T, D t ≤ k * n) :
    ∃ (m : ℕ) (r : ℕ → ℕ),
      r 0 = 1 ∧
      (∀ l ≤ m, 1 ≤ r l ∧ r l ≤ T) ∧
      (∀ l < m, r l < r (l + 1)) ∧
      (∀ l < m, D (r (l + 1)) ≤ D (r l)) ∧
      (∀ l < m, (r (l + 1) - r l : ℝ) * D (r l) ≤ ∑ t ∈ Finset.Ico (r l) (r (l + 1)), D t) ∧
      (∑ l ∈ Finset.range m, ((r (l + 1) : ℝ) - (r l : ℝ)) * D (r l) ≤ k * n) ∧
      D (r m) ≤ k * n / T
exists_perm_two_inflection_sign_patternNeeds helpCombinatorics for TCS

For any natural numbers k₁, m₁, k₂, m₂ satisfying 2 ≤ k₁ < m₁ < k₂ < m₂, there exists n : ℕ and a permutation σ : Equiv.Perm (Fin n) satisfying the two-inflection sign pattern.

theorem exists_perm_two_inflection_sign_pattern
    (k₁ m₁ k₂ m₂ : ℕ) (hk1 : 2 ≤ k₁) (h1 : k₁ < m₁) (h12 : m₁ < k₂) (h2 : k₂ < m₂) :
    ∃ (n : ℕ) (σ : Equiv.Perm (Fin n)),
      m₂ ≤ n - 1 ∧
      0 < perm_second_derivative σ k₁ ∧
      (∀ ℓ ∈ Finset.Ioo k₁ m₁, perm_second_derivative σ ℓ = 0) ∧
      perm_second_derivative σ m₁ < 0 ∧
      (∀ ℓ ∈ Finset.Ioo m₁ k₂, perm_second_derivative σ ℓ ≤ 0) ∧
      perm_second_derivative σ k₂ < 0 ∧
      (∀ ℓ ∈ Finset.Ioo k₂ m₂, perm_second_derivative σ ℓ = 0) ∧
      0 < perm_second_derivative σ m₂ ∧
      (∀ ℓ ∈ Finset.Ico 2 k₁, 0 ≤ perm_second_derivative σ ℓ) ∧
      (∀ ℓ ∈ Finset.Ioc m₂ (n - 1), 0 ≤ perm_second_derivative σ ℓ)
exists_sequence_length_thirty_two_no_zero_sum_sixIn LeanCombinatorics for TCS

There exists a multiset of 32 elements over (Fin 7 → Fin 2) × ZMod 6 that contains no submultiset of cardinality 6 with sum 0.

theorem exists_sequence_length_thirty_two_no_zero_sum_six :
    ∃ S : Multiset ((Fin 7 → Fin 2) × ZMod 6),
      Multiset.card S = 32 ∧ ¬ ∃ T ≤ S, Multiset.card T = 6 ∧ Multiset.sum T = 0
exists_two_pow_between_of_two_mul_leIn LeanCombinatorics for TCS

For real numbers 1 ≤ a and b with 2a ≤ b, there is a natural number r with a ≤ 2^r ≤ b.

theorem exists_two_pow_between_of_two_mul_le (a b : ℝ) (ha : 1 ≤ a) (h : 2 * a ≤ b) :
    ∃ r : ℕ, a ≤ (2 : ℝ) ^ r ∧ (2 : ℝ) ^ r ≤ b
exists_two_roots_second_deriv_of_four_rootsIn LeanCombinatorics for TCS

If f, g, h are functions on ℝ with f' = g and g' = h everywhere, and f has four ordered roots t₁ < t₂ < t₃ < t₄ in (a, b), then h has two ordered roots v₁ < v₂ in (a, b).

theorem exists_two_roots_second_deriv_of_four_roots (f g h : ℝ → ℝ)
    (hfg : ∀ t, HasDerivAt f (g t) t) (hgh : ∀ t, HasDerivAt g (h t) t)
    (a b : ℝ) (t₁ t₂ t₃ t₄ : ℝ)
    (ha₁ : a < t₁) (h₁₂ : t₁ < t₂) (h₂₃ : t₂ < t₃) (h₃₄ : t₃ < t₄) (h₄b : t₄ < b)
    (hf₁ : f t₁ = 0) (hf₂ : f t₂ = 0) (hf₃ : f t₃ = 0) (hf₄ : f t₄ = 0) :
    ∃ v₁ v₂ : ℝ, v₁ ∈ Set.Ioo a b ∧ v₂ ∈ Set.Ioo a b ∧ v₁ < v₂ ∧ h v₁ = 0 ∧ h v₂ = 0
extension_depth_bound_of_pattern_containmentIn LeanCombinatorics for TCS

Let B be a set of lists of natural numbers. If π and σ are standard permutations of natural numbers from 1 to their length that avoid all patterns in B, and σ pattern-contains π, and all standard B-avoiding extensions of π have depth at most D (every standard B-avoiding permutation π' with π'.filter (· ≤ π.length) = π satisfies π'.length - π.length ≤ D), then every standard B-avoiding extension σ' of σ with σ'.filter (· ≤ σ.length) = σ satisfies σ'.length - σ.length ≤ D.

theorem extension_depth_bound_of_pattern_containment
    (B : Set (List ℕ)) (π σ : List ℕ)
    (hπ_perm : π.Perm (List.range' 1 π.length))
    (hπ_av : ∀ β ∈ B, ¬ pattern_contains π β)
    (hσ_perm : σ.Perm (List.range' 1 σ.length))
    (hσ_av : ∀ β ∈ B, ¬ pattern_contains σ β)
    (hle : pattern_contains σ π) (D : ℕ)
    (hD : ∀ π' : List ℕ, π'.Perm (List.range' 1 π'.length) →
      (∀ β ∈ B, ¬ pattern_contains π' β) →
      π'.filter (· ≤ π.length) = π →
      π'.length - π.length ≤ D) :
    ∀ σ' : List ℕ, σ'.Perm (List.range' 1 σ'.length) →
      (∀ β ∈ B, ¬ pattern_contains σ' β) →
      σ'.filter (· ≤ σ.length) = σ →
      σ'.length - σ.length ≤ D
extension_depth_mono_of_pattern_containmentIn LeanCombinatorics for TCS

Let B be a set of lists of natural numbers. If π and σ are standard permutations of natural numbers from 1 to their length (π.Perm (List.range' 1 π.length) and σ.Perm (List.range' 1 σ.length)) that avoid all patterns in B (∀ β ∈ B, ¬ pattern_contains · β), and σ pattern-contains π (pattern_contains σ π), then for every natural number k, if σ has a standard B-avoiding extension of depth k (a standard B-avoiding permutation σ' with σ'.filter (· ≤ σ.length) = σ and σ'.length = σ.length + k), then π also has a standard B-avoiding extension of depth k (a standard B-avoiding permutation π' with π'.filter (· ≤ π.length) = π and π'.length = π.length + k).

theorem extension_depth_mono_of_pattern_containment
    (B : Set (List ℕ)) (π σ : List ℕ)
    (hπ_perm : π.Perm (List.range' 1 π.length))
    (hπ_av : ∀ β ∈ B, ¬ pattern_contains π β)
    (hσ_perm : σ.Perm (List.range' 1 σ.length))
    (hσ_av : ∀ β ∈ B, ¬ pattern_contains σ β)
    (hle : pattern_contains σ π) (k : ℕ)
    (h_ext : ∃ σ' : List ℕ, σ'.Perm (List.range' 1 σ'.length) ∧
      (∀ β ∈ B, ¬ pattern_contains σ' β) ∧
      σ'.filter (· ≤ σ.length) = σ ∧ σ'.length = σ.length + k) :
    ∃ π' : List ℕ, π'.Perm (List.range' 1 π'.length) ∧
      (∀ β ∈ B, ¬ pattern_contains π' β) ∧
      π'.filter (· ≤ π.length) = π ∧ π'.length = π.length + k
extremal_exchange_nterm_zero_sumIn LeanCombinatorics for TCS

Let S be a sequence over (Z/nZ)^r of length s(G)-1 with no n-term zero sum. If a occurs in S and y + z = a, then the sequence obtained by replacing one occurrence of a by the two terms y, z has length s(G) and hence contains a submultiset T of cardinality n with sum 0; moreover every such T uses the copy of y or the copy of z, because a zero-sum T avoiding both would already be an n-term zero sum of S.

theorem extremal_exchange_nterm_zero_sum
    (n r : ℕ) [NeZero n] (S : Multiset (Fin r → ZMod n))
    (hS_card : S.card = sInf { k : ℕ | ∀ S' : Multiset (Fin r → ZMod n), S'.card = k → ∃ T ≤ S', T.card = n ∧ T.sum = 0 } - 1)
    (hS_zs : 0 ∉ ((S.powersetCard n).map Multiset.sum).toFinset)
    {a y z : Fin r → ZMod n} (ha : a ∈ S) (hyz : y + z = a) :
    ∃ T ≤ S - {a} + {y, z}, T.card = n ∧ T.sum = 0 ∧ (y ∈ T ∨ z ∈ T)
extremal_is_maximal_zero_sum_freeIn LeanCombinatorics for TCS

An extremal sequence S of length s(G) - 1 with no n-term zero-sum subsequence is maximal zero-sum free.

theorem extremal_is_maximal_zero_sum_free
    (n r : ℕ) [NeZero n] (S : Multiset (Fin r → ZMod n))
    (hS_card : S.card = sInf { k : ℕ | ∀ S' : Multiset (Fin r → ZMod n), S'.card = k → ∃ T ≤ S', T.card = n ∧ T.sum = 0 } - 1)
    (hS_zs : 0 ∉ ((S.powersetCard n).map Multiset.sum).toFinset) :
    is_maximal_zero_sum_free n S
extremal_number_eq_choose_three_of_lt_two_mulIn LeanCombinatorics for TCS

If n < 2ℓ then no 3-uniform hypergraph on Fin n contains the zycle Z_ℓ (which has 2ℓ vertices), so the extremal number equals the number of all triples: extremal_number n (zycle ℓ) = n.choose 3.

theorem extremal_number_eq_choose_three_of_lt_two_mul (ℓ n : ℕ) [NeZero ℓ] (h : n < 2 * ℓ) : extremal_number n (zycle ℓ) = n.choose 3
extremal_number_four_zycle_four_ne_turan_cardIn LeanCombinatorics for TCS

For ℓ = 4 the equality extremal_number n (zycle 4) = (turan_hypergraph n).card fails at n = 4: Z_4 has 8 vertices, so every 3-uniform hypergraph on 4 vertices is Z_4-free and extremal_number 4 (zycle 4) = C(4,3) = 4, whereas (turan_hypergraph 4).card = 3. Hence the 'eventually in n' quantifier in the target is essential and cannot be dropped.

theorem extremal_number_four_zycle_four_ne_turan_card : extremal_number 4 (zycle 4) ≠ (turan_hypergraph 4).card
extremal_number_ge_of_freeIn LeanCombinatorics for TCS

Every F-free 3-uniform hypergraph H on Fin n has at most extremal_number n F edges, because the extremal number is a supremum over exactly these hypergraphs.

theorem extremal_number_ge_of_free {n : ℕ} {W : Type*} (F : Finset (Finset W)) (H : Finset (Finset (Fin n))) (h_uniform : is_three_uniform H) (h_free : is_hypergraph_free H F) : H.card ≤ extremal_number n F
extremal_number_le_choose_threeIn LeanCombinatorics for TCS

A 3-uniform hypergraph on Fin n has at most C(n,3) edges, so the extremal number extremal_number n F is at most n.choose 3 for any forbidden family F.

theorem extremal_number_le_choose_three (n : ℕ) {W : Type*} (F : Finset (Finset W)) : extremal_number n F ≤ n.choose 3
extremal_sequence_has_term_multiplicity_predIn LeanCombinatorics for TCS

Weak Property D: Every extremal zero-sum-free sequence S of length s(G) - 1 over (Z/nZ)^r contains at least one term of multiplicity n - 1.

theorem extremal_sequence_has_term_multiplicity_pred
    (n r : ℕ) [NeZero n] (hr : 1 ≤ r) (S : Multiset (Fin r → ZMod n))
    (hS_card : S.card = sInf { k : ℕ | ∀ S' : Multiset (Fin r → ZMod n), S'.card = k → ∃ T ≤ S', T.card = n ∧ T.sum = 0 } - 1)
    (hS_zs : 0 ∉ ((S.powersetCard n).map Multiset.sum).toFinset) :
    ∃ t : Fin r → ZMod n, S.count t = n - 1
extremal_subsequence_sums_cover_of_term_mul_predIn LeanCombinatorics for TCS

Let S be a sequence over (Z/nZ)^r of length s(G)-1 (in the sInf form) with no n-term zero sum, and suppose in addition that some element occurs exactly n-1 times in S. Then the set of sums of all length-n subsequences of S equals (Z/nZ)^r \ {0}.

theorem extremal_subsequence_sums_cover_of_term_mul_pred
    (n r : ℕ) [NeZero n] (hr : 1 ≤ r) (S : Multiset (Fin r → ZMod n))
    (hS_card : S.card = sInf { k : ℕ | ∀ S' : Multiset (Fin r → ZMod n), S'.card = k → ∃ T ≤ S', T.card = n ∧ T.sum = 0 } - 1)
    (hS_zs : 0 ∉ ((S.powersetCard n).map Multiset.sum).toFinset)
    (hcount : ∃ t : Fin r → ZMod n, S.count t = n - 1) :
    ((S.powersetCard n).map Multiset.sum).toFinset = Finset.univ \ {0}
extremal_vertex_bound_bounded_child_subtree_label_overlapIn LeanCombinatorics for TCS

Fix natural numbers C and q. For any type α with decidable equality and any binary tree t : BinaryTree α, if (binary_tree_labels t).card ≤ q, binary_tree_no_ancestor_descendant_repeat t, and binary_tree_bounded_child_overlap C t, then t.numNodes ≤ extremal_tree_vertex_bound C q.

theorem extremal_vertex_bound_bounded_child_subtree_label_overlap
    (C q : ℕ) {α : Type*} [DecidableEq α] (t : BinaryTree α)
    (hq : (binary_tree_labels t).card ≤ q)
    (h_anc : binary_tree_no_ancestor_descendant_repeat t)
    (h_overlap : binary_tree_bounded_child_overlap C t) :
    t.numNodes ≤ extremal_tree_vertex_bound C q
f2_character_sum_seven_plus_one_eq_zero_iffIn LeanCombinatorics for TCS

For any vector v in Fin 7 → ZMod 2, the character sum 1 + ∑ i, (-1)^(v i) vanishes if and only if v has Hamming weight 4.

open scoped BigOperators in
theorem f2_character_sum_seven_plus_one_eq_zero_iff (v : Fin 7 → ZMod 2) :
    (1 : ℤ) + ∑ i : Fin 7, (-1 : ℤ) ^ (v i).val = 0 ↔
      (Finset.univ.filter (fun i : Fin 7 => v i = 1)).card = 4
f2_character_sum_split_pointIn LeanCombinatorics for TCS

For any subset T of Fin d → ZMod 2, element t0 ∈ T, and x in Fin d → ZMod 2, the character sum factors into (-1)^(x · t0) times (1 + ∑ t in T \ {t0}, (-1)^(x · (t - t0))).

open scoped Matrix BigOperators in
theorem f2_character_sum_split_point (d : ℕ) (T : Finset (Fin d → ZMod 2))
    (t0 : Fin d → ZMod 2) (ht0 : t0 ∈ T) (x : Fin d → ZMod 2) :
    ∑ t ∈ T, (-1 : ℤ) ^ (dotProduct x t).val =
      (-1 : ℤ) ^ (dotProduct x t0).val *
        (1 + ∑ t ∈ T.erase t0, (-1 : ℤ) ^ (dotProduct x (t - t0)).val)
f2_eval_map_finrank_ge_threeIn LeanCombinatorics for TCS

For any 7 distinct nonzero vectors in Fin d → ZMod 2, the evaluation linear map from Fin d → ZMod 2 to Fin 7 → ZMod 2 has rank at least 3.

open scoped Matrix in
theorem f2_eval_map_finrank_ge_three (d : ℕ) (v : Matrix (Fin 7) (Fin d) (ZMod 2))
    (hinj : Function.Injective v) (hzero : ∀ i, v i ≠ 0) :
    3 ≤ Module.finrank (ZMod 2) (LinearMap.range v.mulVecLin)
f2_linear_map_fiber_liftIn LeanCombinatorics for TCS

Given a linear map f from Fin d → ZMod 2 to Fin 7 → ZMod 2 with image dimension r and a subset S of the image of cardinality 2^(r - 3), S can be lifted to a subset B in Fin d → ZMod 2 of cardinality 2^(d - 3) such that differences in B map either to distinct elements of S or to 0.

open scoped Classical in
theorem f2_linear_map_fiber_lift (d : ℕ)
    (f : (Fin d → ZMod 2) →ₗ[ZMod 2] (Fin 7 → ZMod 2))
    (S : Finset (Fin 7 → ZMod 2)) (hS : ↑S ⊆ (LinearMap.range f : Set (Fin 7 → ZMod 2)))
    (r : ℕ) (hr : Module.finrank (ZMod 2) (LinearMap.range f) = r)
    (hScard : S.card = 2 ^ (r - 3)) (hrd : 3 ≤ r) (hdr : r ≤ d) :
    ∃ B : Finset (Fin d → ZMod 2), B.card = 2 ^ (d - 3) ∧
      (∀ b ∈ B, f b ∈ S) ∧
      ∀ b ∈ B, ∀ b' ∈ B, b ≠ b' →
        (f b ≠ f b' ∧ f (b + b') = f b + f b') ∨ (f b = f b' ∧ f (b + b') = 0)
f2_simplex_antipodal_diff_weight_ne_fourIn LeanCombinatorics for TCS

There exists a subset B of Fin 7 → ZMod 2 of cardinality 16 such that any two distinct elements differ by a vector of Hamming weight not equal to 4.

theorem f2_simplex_antipodal_diff_weight_ne_four :
    ∃ B : Finset (Fin 7 → ZMod 2), B.card = 16 ∧
      ∀ x ∈ B, ∀ y ∈ B, x ≠ y →
        (Finset.univ.filter (fun i : Fin 7 => (x + y) i = 1)).card ≠ 4
f2_submodule_coset_pigeonholeIn LeanCombinatorics for TCS

For any subspace U in Fin 7 → ZMod 2 of dimension r ≥ 3 and any 16-element subset S, there exists a coset of U containing at least 2^(r - 3) elements of S.

open scoped Classical in
theorem f2_submodule_coset_pigeonhole
    (U : Submodule (ZMod 2) (Fin 7 → ZMod 2)) (hU : 3 ≤ Module.finrank (ZMod 2) U)
    (S : Finset (Fin 7 → ZMod 2)) (hS : S.card = 16) :
    ∃ c : Fin 7 → ZMod 2, 2 ^ (Module.finrank (ZMod 2) U - 3) ≤
      (S.filter (fun x => x - c ∈ U)).card
f2_subset_eight_universal_spectrumIn LeanCombinatorics for TCS

Let d ≥ 3. For every subset T of Fin d → ZMod 2 with cardinality 8, there exists a subset B of Fin d → ZMod 2 of cardinality 2^(d - 3) such that for all distinct b, b' ∈ B, the character sum ∑ t ∈ T, (-1 : ℤ) ^ (dotProduct (b + b') t).val is nonzero.

open scoped Matrix in
theorem f2_subset_eight_universal_spectrum (d : ℕ) (hd : 3 ≤ d)
    (T : Finset (Fin d → ZMod 2)) (hT : T.card = 8) :
    ∃ B : Finset (Fin d → ZMod 2), B.card = 2 ^ (d - 3) ∧
      ∀ b ∈ B, ∀ b' ∈ B, b ≠ b' → ∑ t ∈ T, (-1 : ℤ) ^ (dotProduct (b + b') t).val ≠ 0
factorial_mul_pow_le_pow_two_mulIn LeanCombinatorics for TCS

For natural numbers k ≤ n, k! * n^k ≤ n^(2n).

theorem factorial_mul_pow_le_pow_two_mul (k n : ℕ) (h : k ≤ n) :
    Nat.factorial k * n ^ k ≤ n ^ (2 * n)
fano_cube_sum_eq_double_countIn LeanCombinatorics for TCS

Double counting: for a 3-uniform H, ∑ x A(x)^3 = 2 · ∑_{e ∈ H} ∑_{x ∈ e} A(x)^2, since A(x) is twice the number of edges containing x.

theorem fano_cube_sum_eq_double_count {V : Type*} [Fintype V] [DecidableEq V]
    (H : Finset (Finset V)) (hunif : is_three_uniform H) :
    (∑ x : V, (∑ y : V, ∑ z : V, fano_triple_indicator H x y z) ^ 3)
      = 2 * (∑ e ∈ H, ∑ x ∈ e, (∑ y : V, ∑ z : V, fano_triple_indicator H x y z) ^ 2)
fano_degree_cube_sum_leIn LeanCombinatorics for TCS

For a 3-uniform Fano-free hypergraph H on n vertices, if A(x) = ∑ y ∑ z [insert x {y,z} ∈ H] (= twice the degree of x) then ∑ x A(x)^3 ≤ 4 n^4 |H|.

theorem fano_degree_cube_sum_le {V : Type*} [Fintype V] [DecidableEq V]
    (H : Finset (Finset V)) (hunif : is_three_uniform H) (hfree : is_fano_free H) :
    (∑ x : V, (∑ y : V, ∑ z : V, fano_triple_indicator H x y z) ^ 3)
      ≤ 4 * (Fintype.card V : ℝ) ^ 4 * (H.card : ℝ)
fano_degree_eq_two_mul_card_filterIn LeanCombinatorics for TCS

In a 3-uniform hypergraph H, the number A(x) = ∑ y ∑ z [insert x {y,z} ∈ H] of ordered pairs (y,z) with {x,y,z} ∈ H equals twice the degree of x, i.e. twice the number of hyperedges of H containing x.

theorem fano_degree_eq_two_mul_card_filter {V : Type*} [Fintype V] [DecidableEq V]
    (H : Finset (Finset V)) (hunif : is_three_uniform H) (x : V) :
    (∑ y : V, ∑ z : V, fano_triple_indicator H x y z)
      = 2 * ((H.filter (fun e => x ∈ e)).card : ℝ)
fano_edge_quad_boundIn LeanCombinatorics for TCS

Local Fano bound: for a 3-uniform Fano-free H, an edge {x,y,z} ∈ H and vertices a,b,c,d, the sum [x,a,b][x,c,d] + [y,a,c][y,b,d] + [z,a,d][z,b,c] of three products of edge indicators is at most 2 — the value 3 would exhibit a Fano plane.

theorem fano_edge_quad_bound {V : Type*} [DecidableEq V]
    (H : Finset (Finset V)) (hunif : is_three_uniform H) (hfree : is_fano_free H)
    (x y z a b c d : V) (hxyz : {x, y, z} ∈ H) :
    fano_triple_indicator H x a b * fano_triple_indicator H x c d
      + fano_triple_indicator H y a c * fano_triple_indicator H y b d
      + fano_triple_indicator H z a d * fano_triple_indicator H z b c ≤ 2
fano_edge_sq_sum_boundIn LeanCombinatorics for TCS

For a 3-uniform Fano-free H and an edge {x,y,z} ∈ H: A(x)^2 + A(y)^2 + A(z)^2 ≤ 2·|V|^4, where A(u) = ∑ p ∑ q [insert u {p,q} ∈ H]. Obtained by summing the local 6-term bound over all (a,b,c,d) ∈ V^4.

theorem fano_edge_sq_sum_bound {V : Type*} [Fintype V] [DecidableEq V]
    (H : Finset (Finset V)) (hunif : is_three_uniform H) (hfree : is_fano_free H)
    (x y z : V) (hxyz : {x, y, z} ∈ H) :
    (∑ p : V, ∑ q : V, fano_triple_indicator H x p q) ^ 2
      + (∑ p : V, ∑ q : V, fano_triple_indicator H y p q) ^ 2
      + (∑ p : V, ∑ q : V, fano_triple_indicator H z p q) ^ 2
      ≤ 2 * (Fintype.card V : ℝ) ^ 4
fano_erase_fiber_twoIn LeanCombinatorics for TCS

In a 3-uniform hypergraph H, for a hyperedge e ∈ H and a vertex x ∈ e, the number of ordered pairs (y,z) with {x,y,z} = e is exactly 2: the fibre of (y,z) ↦ insert x {y,z} over e has two elements.

theorem fano_erase_fiber_two {V : Type*} [Fintype V] [DecidableEq V]
    (H : Finset (Finset V)) (hunif : is_three_uniform H) (x : V) (e : Finset V)
    (he : e ∈ H) (hxe : x ∈ e) :
    (∑ y : V, ∑ z : V, (if insert x ({y, z} : Finset V) = e then (1:ℝ) else 0)) = 2
fano_free_three_uniform_hypergraph_edge_boundIn LeanCombinatorics for TCS

Every 3-uniform hypergraph H : Finset (Finset V) on a finite vertex type V with decidable equality that is Fano-free (is_fano_free H) has cardinality at most Real.sqrt (2 / 3) * (Fintype.card V : ℝ) ^ 3 / 6.

theorem fano_free_three_uniform_hypergraph_edge_bound
    {V : Type*} [Fintype V] [DecidableEq V]
    (H : Finset (Finset V)) (hunif : is_three_uniform H) (hfree : is_fano_free H) :
    (H.card : ℝ) ≤ Real.sqrt (2 / 3) * (Fintype.card V : ℝ) ^ 3 / 6
fano_holder_assemblyIn LeanCombinatorics for TCS

Real-arithmetic assembly: if A : V → ℝ is nonnegative with ∑ x A(x) = 6|H| and ∑ x A(x)^3 ≤ 4|V|^4|H|, then |H| ≤ sqrt(2/3) * |V|^3 / 6.

theorem fano_holder_assembly {V : Type*} [Fintype V]
    (H : Finset (Finset V)) (A : V → ℝ)
    (hnn : ∀ x, 0 ≤ A x)
    (h1 : (∑ x : V, A x) = 6 * (H.card : ℝ))
    (h2 : (∑ x : V, (A x) ^ 3) ≤ 4 * (Fintype.card V : ℝ) ^ 4 * (H.card : ℝ)) :
    (H.card : ℝ) ≤ Real.sqrt (2 / 3) * (Fintype.card V : ℝ) ^ 3 / 6
fano_triple_sum_eq_six_mul_cardIn LeanCombinatorics for TCS

In a 3-uniform hypergraph H, the number of ordered triples (x,y,z) of vertices with {x,y,z} ∈ H, counted as ∑ x ∑ y ∑ z [insert x {y,z} ∈ H], equals 6|H|, because every hyperedge has exactly three elements and hence exactly six orderings.

theorem fano_triple_sum_eq_six_mul_card {V : Type*} [Fintype V] [DecidableEq V]
    (H : Finset (Finset V)) (hunif : is_three_uniform H) :
    (∑ x : V, ∑ y : V, ∑ z : V, fano_triple_indicator H x y z) = 6 * (H.card : ℝ)
fibonacci_attractor_basis_coverage_antichainIn LeanCombinatorics for TCS

For every integer n ≥ 7, the occurrence coverages of the basis words in fibonacci_attractor_basis n form an antichain under inclusion: if Cov(u) ⊆ Cov(v) for u, v ∈ B_n, then u = v.

theorem fibonacci_attractor_basis_coverage_antichain (n : ℕ) (hn : 7 ≤ n) :
    ∀ u ∈ fibonacci_attractor_basis n, ∀ v ∈ fibonacci_attractor_basis n,
      word_occurrence_coverage (fibonacci_word n) u ⊆ word_occurrence_coverage (fibonacci_word n) v → u = v
fibonacci_attractor_basis_coverage_antichain_boundaryIn LeanCombinatorics for TCS

For n ≥ 7 and indices a, b in [3, n − 4] of the same parity as n, if the coverage of the boundary word E_a in F_n is contained in the coverage of E_b, then a = b.

theorem fibonacci_attractor_basis_coverage_antichain_boundary (n a b : ℕ) (hn : 7 ≤ n)
    (ha : a ∈ Finset.Icc 3 (n - 4)) (hpa : a % 2 = n % 2)
    (hb : b ∈ Finset.Icc 3 (n - 4)) (hpb : b % 2 = n % 2)
    (hsub : word_occurrence_coverage (fibonacci_word n) (fibonacci_boundary_word a) ⊆
      word_occurrence_coverage (fibonacci_word n) (fibonacci_boundary_word b)) : a = b
fibonacci_attractor_basis_coverage_antichain_singularIn LeanCombinatorics for TCS

For n ≥ 7 and indices a, b < n − 1, if the coverage of the singular word S_a in F_n is contained in the coverage of S_b, then a = b.

theorem fibonacci_attractor_basis_coverage_antichain_singular (n a b : ℕ) (hn : 7 ≤ n)
    (ha : a < n - 1) (hb : b < n - 1)
    (hsub : word_occurrence_coverage (fibonacci_word n) (fibonacci_singular_word a) ⊆
      word_occurrence_coverage (fibonacci_word n) (fibonacci_singular_word b)) : a = b
fibonacci_attractor_basis_coverage_incomparable_crossIn LeanCombinatorics for TCS

For n ≥ 7, an index a < n − 1 and an index b in [3, n − 4] with b ≡ n (mod 2), neither the coverage of the singular word S_a contains nor is contained in the coverage of the boundary word E_b.

theorem fibonacci_attractor_basis_coverage_incomparable_cross (n a b : ℕ) (hn : 7 ≤ n)
    (ha : a < n - 1) (hb : b ∈ Finset.Icc 3 (n - 4)) (hpb : b % 2 = n % 2) :
    ¬ (word_occurrence_coverage (fibonacci_word n) (fibonacci_singular_word a) ⊆
        word_occurrence_coverage (fibonacci_word n) (fibonacci_boundary_word b)) ∧
    ¬ (word_occurrence_coverage (fibonacci_word n) (fibonacci_boundary_word b) ⊆
        word_occurrence_coverage (fibonacci_word n) (fibonacci_singular_word a))
fibonacci_attractor_basis_ne_nilIn LeanCombinatorics for TCS

For any natural number n, every word in fibonacci_attractor_basis n is nonempty.

theorem fibonacci_attractor_basis_ne_nil (n : ℕ) (u : List Bool) (hu : u ∈ fibonacci_attractor_basis n) : u ≠ []
fibonacci_attractor_basis_subset_factorsIn LeanCombinatorics for TCS

For every integer n ≥ 7, every word u in fibonacci_attractor_basis n is nonempty and occurs as a factor (infix) of the n-th Fibonacci word fibonacci_word n.

theorem fibonacci_attractor_basis_subset_factors (n : ℕ) (hn : 7 ≤ n) :
    ∀ u ∈ fibonacci_attractor_basis n, u ≠ [] ∧ u <:+: fibonacci_word n
fibonacci_boundary_word_factorIn LeanCombinatorics for TCS

If j + 3 ≤ n then the j-th boundary word E_j occurs as a factor of the n-th Fibonacci word F_n.

theorem fibonacci_boundary_word_factor (j n : ℕ) (h : j + 3 ≤ n) :
    fibonacci_boundary_word j <:+: fibonacci_word n
fibonacci_factor_coverage_contains_basis_coverageIn LeanCombinatorics for TCS

For every integer n ≥ 7 and every nonempty factor x of the n-th Fibonacci word F_n, there exists a word u in the attractor basis B_n whose occurrence coverage in F_n is contained in that of x.

theorem fibonacci_factor_coverage_contains_basis_coverage (n : ℕ) (hn : 7 ≤ n) :
    ∀ x : List Bool, x ≠ [] → x <:+: fibonacci_word n →
      ∃ u ∈ fibonacci_attractor_basis n,
        word_occurrence_coverage (fibonacci_word n) u ⊆ word_occurrence_coverage (fibonacci_word n) x
fibonacci_long_factor_coverage_contains_basis_coverageIn LeanCombinatorics for TCS

For n ≥ 7, every factor x of F_n with |x| ≥ 4 has an occurrence that contains an occurrence of some word of the attractor basis B_n, with the basis occurrence starting at least one position before x's end; equivalently, x's coverage contains the coverage of some basis word. (The hypothesis |x| ≥ 4 is the crux case; shorter factors are covered separately.)

theorem fibonacci_long_factor_coverage_contains_basis_coverage (n : ℕ) (hn : 7 ≤ n)
    (x : List Bool) (hx : 4 ≤ x.length) (hxw : x <:+: fibonacci_word n) :
    ∃ u ∈ fibonacci_attractor_basis n,
      word_occurrence_coverage (fibonacci_word n) u ⊆ word_occurrence_coverage (fibonacci_word n) x
fibonacci_short_factor_coverage_contains_basis_coverageIn LeanCombinatorics for TCS

For n ≥ 7, every nonempty factor x of F_n with |x| ≤ 3 contains the coverage of a word of the attractor basis B_n.

theorem fibonacci_short_factor_coverage_contains_basis_coverage (n : ℕ) (hn : 7 ≤ n)
    (x : List Bool) (hx : x ≠ []) (hxl : x.length ≤ 3) (hxw : x <:+: fibonacci_word n) :
    ∃ u ∈ fibonacci_attractor_basis n,
      word_occurrence_coverage (fibonacci_word n) u ⊆ word_occurrence_coverage (fibonacci_word n) x
fibonacci_singular_word_factorIn LeanCombinatorics for TCS

If j + 2 ≤ n then the j-th singular word S_j occurs as a factor of the n-th Fibonacci word F_n.

theorem fibonacci_singular_word_factor (j n : ℕ) (h : j + 2 ≤ n) :
    fibonacci_singular_word j <:+: fibonacci_word n
fibonacci_word_lengthIn LeanCombinatorics for TCS

The n-th Fibonacci word has length the (n+2)-nd Fibonacci number: |F_n| = fib (n+2).

theorem fibonacci_word_length (n : ℕ) : (fibonacci_word n).length = Nat.fib (n + 2)
fibonacci_word_ne_nilIn LeanCombinatorics for TCS

Every Fibonacci word is nonempty.

theorem fibonacci_word_ne_nil (n : ℕ) : fibonacci_word n ≠ []
fibonacci_word_prefixIn LeanCombinatorics for TCS

If j ≤ n then the j-th Fibonacci word F_j is a prefix of the n-th Fibonacci word F_n.

theorem fibonacci_word_prefix (j n : ℕ) (h : j ≤ n) : fibonacci_word j <+: fibonacci_word n
fibre_k_regular_extensionIn LeanCombinatorics for TCS

Regularisation of a bipartite multigraph in fibre form: if every fibre of f and of g has at most k elements, then the multigraph embeds into a k-regular bipartite multigraph, i.e. there are a finite type β, an injection ι : α → β and fibre maps f', g' on β with f' ∘ ι = f, g' ∘ ι = g, and every fibre of f' and of g' either empty or of size exactly k.

theorem fibre_k_regular_extension {α : Type*} [Fintype α] (f g : α → ℕ) (k : ℕ)
    (hf : ∀ γ : ℕ, {e | f e = γ}.ncard ≤ k) (hg : ∀ γ : ℕ, {e | g e = γ}.ncard ≤ k) :
    ∃ (β : Type) (_ : Fintype β) (f' g' : β → ℕ) (ι : α → β),
      Function.Injective ι ∧ (∀ e, f' (ι e) = f e) ∧ (∀ e, g' (ι e) = g e) ∧
      (∀ γ : ℕ, {b : β | f' b = γ}.ncard = k ∨ {b : β | f' b = γ}.ncard = 0) ∧
      (∀ γ : ℕ, {b : β | g' b = γ}.ncard = k ∨ {b : β | g' b = γ}.ncard = 0)
fin_r_zmod_exponentIn LeanCombinatorics for TCS

For r ≥ 1 and n ≥ 1, the exponent of the additive abelian group (Z/nZ)^r is n.

theorem fin_r_zmod_exponent (n r : ℕ) [NeZero n] (hr : 1 ≤ r) :
    AddMonoid.exponent (Fin r → ZMod n) = n
finite_bh_counting_boundIn LeanCombinatorics for TCS

The standard finite counting bound for B_h sets (paper (1.1)): if h ≥ 1 and S ⊆ [1,n] is a finite B_h set, then |S|^h ≤ h! · h · n. Equivalently C(|S|+h-1, h) ≤ h n, since the h-term sums of S are all distinct and lie in [h, hn].

open scoped Classical in
theorem finite_bh_counting_bound (h n : ℕ) (h1 : 1 ≤ h) (S : Finset ℕ) (hS1 : ∀ x ∈ S, 1 ≤ x)
    (hSn : ∀ x ∈ S, x ≤ n) (hSbh : is_bh h (S : Set ℕ)) :
    (S.card) ^ h ≤ h.factorial * (h * n)
finite_bipartite_surplus_crownIn LeanCombinatorics for TCS

Given finite sets I and E with |I|>|E| and a nonempty subset N(x) of E for each x in I, there are nonempty C⊆I and H=N(C)⊆E with |H|<|C| and an injective choice of a neighboring member of C for every element of H.

theorem finite_bipartite_surplus_crown {α β : Type*} [DecidableEq α] [DecidableEq β] (I : Finset α) (E : Finset β) (N : α → Finset β) (hN : ∀ x ∈ I, N x ⊆ E ∧ (N x).Nonempty) (hsurplus : E.card < I.card) : ∃ (C : Finset α) (H : Finset β), C ⊆ I ∧ H ⊆ E ∧ H = C.biUnion N ∧ H.Nonempty ∧ H.card < C.card ∧ ∃ f : {e : β // e ∈ H} → {x : α // x ∈ C}, Function.Injective f ∧ ∀ e, e.val ∈ N (f e).val
finite_cycle_edge_three_coloring_from_tip_setIn LeanCombinatorics for TCS

A cyclic sequence of at least three edges can be properly colored from any finite set of at least three tips: adjacent positions, including the last and first, receive different tips.

theorem finite_cycle_edge_three_coloring_from_tip_set {α : Type*} [DecidableEq α] (k : ℕ) (hk : 3 ≤ k) (C : Finset α) (hC : 3 ≤ C.card) : ∃ f : Fin k → α, (∀ i, f i ∈ C) ∧ ∀ i : Fin k, f i ≠ f ⟨(i.val + 1) % k, Nat.mod_lt _ (by omega)⟩
finite_edge_family_coloring_from_two_disjoint_pairsIn LeanCombinatorics for TCS

A finite family of unordered pairs with two vertex-disjoint pairs of distinct members can be properly colored from any set containing at least two fewer colors than members.

theorem finite_edge_family_coloring_from_two_disjoint_pairs {V α : Type*} [DecidableEq V] [DecidableEq α] (E : Finset (Sym2 V)) (C : Finset α) (hC : E.card ≤ C.card + 2) (hpair : ∃ e₁ ∈ E, ∃ e₂ ∈ E, ∃ e₃ ∈ E, ∃ e₄ ∈ E, ({e₁,e₂,e₃,e₄} : Finset (Sym2 V)).card = 4 ∧ Disjoint e₁.toFinset e₂.toFinset ∧ Disjoint e₃.toFinset e₄.toFinset) : ∃ f : Sym2 V → α, (∀ e ∈ E, f e ∈ C) ∧ ∀ e ∈ E, ∀ g ∈ E, e ≠ g → ¬ Disjoint e.toFinset g.toFinset → f e ≠ f g
finite_functional_star_graph_half_independenceIn LeanCombinatorics for TCS

There are two vertices for every index i. Each index makes at most one directed choice of a different index and one of its vertices. Edges may join both vertices of i to the chosen vertex, and a mutually choosing pair may additionally be completely joined. Every such graph has an independent set of size at least the number of indices.

theorem finite_functional_star_graph_half_independence (n : ℕ) (H : SimpleGraph (Fin n × Bool)) (target : Fin n → Option (Fin n × Bool)) (hself : ∀ i j b, target i = some (j,b) → i ≠ j) (hwithin : ∀ i, ¬ H.Adj (i,false) (i,true)) (hcross : ∀ i j b c, i ≠ j → H.Adj (i,b) (j,c) → target i = some (j,c) ∨ target j = some (i,b) ∨ ((∃ x, target i = some (j,x)) ∧ (∃ y, target j = some (i,y)))) : ∃ I : Finset (Fin n × Bool), n ≤ I.card ∧ ∀ x ∈ I, ∀ y ∈ I, ¬ H.Adj x y
finite_linear_intersecting_triples_eight_common_vertexIn LeanCombinatorics for TCS

Any family of at least eight distinct three-element sets whose distinct members intersect in exactly one element has a vertex common to every member.

theorem finite_linear_intersecting_triples_eight_common_vertex {V : Type*} [DecidableEq V] (P : Finset (Finset V)) (hcard : ∀ t ∈ P, t.card = 3) (hpair : (P : Set (Finset V)).Pairwise (fun s t => (s ∩ t).card = 1)) (hlarge : 8 ≤ P.card) : ∃ r, ∀ t ∈ P, r ∈ t
finite_two_choice_no_near_constantIn LeanCombinatorics for TCS

For n at least four, if every index i has at least two available symbols from Fin n, one can choose an available symbol for every i so that no symbol is chosen more than n-2 times.

theorem finite_two_choice_no_near_constant (n : ℕ) (hn : 4 ≤ n) (A : Fin n → Finset (Fin n)) (hA : ∀ i, 2 ≤ (A i).card) : ∃ f : Fin n → Fin n, (∀ i, f i ∈ A i) ∧ ∀ v, (Finset.univ.filter fun i => f i = v).card ≤ n-2
finset_card_union_fourIn LeanCombinatorics for TCS

Inclusion-exclusion for four finite sets, in a form that needs no truncated subtraction: the cardinality of the union plus the six pairwise intersections plus the fourfold intersection equals the sum of the four cardinalities plus the four threefold intersections.

theorem finset_card_union_four {α : Type*} [DecidableEq α] (A B C D : Finset α) :
    (A ∪ B ∪ C ∪ D).card + (A ∩ B).card + (A ∩ C).card + (A ∩ D).card + (B ∩ C).card
      + (B ∩ D).card + (C ∩ D).card + (A ∩ B ∩ C ∩ D).card
      = A.card + B.card + C.card + D.card + (A ∩ B ∩ C).card + (A ∩ B ∩ D).card
        + (A ∩ C ∩ D).card + (B ∩ C ∩ D).card
finset_esymm_newton_degree_threeIn LeanCombinatorics for TCS

The first three elementary symmetric sums of nonnegative weights satisfy binomial-normalized log-concavity.

theorem finset_esymm_newton_degree_three {V : Type*} [DecidableEq V] (s : Finset V) (w : V → ℕ) (hn : 3 ≤ s.card) : let e := fun k : ℕ => ∑ A ∈ s.powersetCard k, ∏ i ∈ A, w i; e 1 * e 3 * Nat.choose s.card 2 ^ 2 ≤ (e 2) ^ 2 * s.card * Nat.choose s.card 3
finset_exists_four_le_of_card_ge_fourIn LeanCombinatorics for TCS

If s is a finite subset of ℝ with card s ≥ 4, then there exist four elements t₁ < t₂ < t₃ < t₄ in s.

theorem finset_exists_four_le_of_card_ge_four (s : Finset ℝ) (hs : 4 ≤ s.card) :
    ∃ (t₁ t₂ t₃ t₄ : ℝ), t₁ ∈ s ∧ t₂ ∈ s ∧ t₃ ∈ s ∧ t₄ ∈ s ∧ t₁ < t₂ ∧ t₂ < t₃ ∧ t₃ < t₄
finset_intersection_bound_along_directionIn LeanCombinatorics for TCS

For any finite set A ⊂ ℝ^d and any direction v, the directional quadratic energy ∑_{a ∈ A} (a · v)^2 is at least (1/2) |A ∩ (v + A)| ‖v‖^4.

open scoped Pointwise in
theorem finset_intersection_bound_along_direction (d : ℕ) (A : Finset (EuclideanSpace ℝ (Fin d)))
    (v : EuclideanSpace ℝ (Fin d)) :
    (1 / 2 : ℝ) * ((A ∩ (v +ᵥ A)).card : ℝ) * ‖v‖ ^ 4 ≤
      ∑ a ∈ A, (inner (𝕜 := ℝ) a v) ^ 2
five_diamond_ramsey_property_at_four_mulIn LeanCombinatorics for TCS

For k ≥ 2, every k-colouring of the subsets of Fin (4k) contains a monochromatic induced copy of the 5-diamond.

theorem five_diamond_ramsey_property_at_four_mul (k : ℕ) (hk : 2 ≤ k) :
    poset_ramsey_property (DiamondPoset 5) k (4 * k)
five_diamond_ramsey_property_stepIn LeanCombinatorics for TCS

If every k-colouring of the subsets of Fin (4k) contains a monochromatic induced copy of the 5-diamond, then every (k+1)-colouring of the subsets of Fin (4(k+1)) also contains one.

theorem five_diamond_ramsey_property_step (k : ℕ) (hk : 2 ≤ k)
    (ih : poset_ramsey_property (DiamondPoset 5) k (4 * k)) :
    poset_ramsey_property (DiamondPoset 5) (k + 1) (4 * (k + 1))
five_diamond_ramsey_property_two_eightIn LeanCombinatorics for TCS

Every 2-colouring of the subsets of Fin 8 contains a monochromatic induced copy of the 5-diamond.

theorem five_diamond_ramsey_property_two_eight :
    poset_ramsey_property (DiamondPoset 5) 2 8
five_diamond_step_colour_free_copyIn LeanCombinatorics for TCS

Colour-free copy (crux): for k ≥ 2, any (k+1)-colouring of the subsets of Fin(4(k+1)) with no monochromatic order-embedded 5-diamond contains an order embedding of Finset(Fin(4k)) into Finset(Fin(4(k+1))) on whose image one colour never appears.

theorem five_diamond_step_colour_free_copy (k : ℕ) (hk : 2 ≤ k)
    (c : Finset (Fin (4 * (k + 1))) → Fin (k + 1))
    (hno : ∀ (f : DiamondPoset 5 ↪o Finset (Fin (4 * (k + 1)))) (col : Fin (k + 1)),
      ∃ x : DiamondPoset 5, c (f x) ≠ col) :
    ∃ (e : Finset (Fin (4 * k)) ↪o Finset (Fin (4 * (k + 1)))) (a : Fin (k + 1)),
      ∀ A : Finset (Fin (4 * k)), c (e A) ≠ a
five_vertex_cover_edges_witnessIn LeanCombinatorics for TCS

Each of the six representative graphs (index 0..5) carries a cover witness family J, given explicitly by the tables in the plan.

theorem five_vertex_cover_edges_witness (i : Fin 6) :
    ∃ J : Fin 5 → Finset (Fin 5),
      GraphCoverWitness (SimpleGraph.fromEdgeSet (↑(five_vertex_cover_edges i) : Set (Sym2 (Fin 5)))) J
five_vertex_cover_relabelIn LeanCombinatorics for TCS

Every triangle-free five-vertex graph with no isolated vertex that is not 2-regular is isomorphic, by a permutation of the vertices, to one of the six representatives (index 0..5).

theorem five_vertex_cover_relabel (T : SimpleGraph (Fin 5)) [DecidableRel T.Adj]
    (htri : T.CliqueFree 3) (hnoisolates : ∀ t, ∃ u, T.Adj t u) (hnoncycle : ¬ ∀ t, T.degree t = 2) :
    ∃ (σ : Equiv.Perm (Fin 5)) (i : Fin 6),
      ∀ x y : Fin 5, T.Adj x y ↔
        (SimpleGraph.fromEdgeSet (↑(five_vertex_cover_edges i) : Set (Sym2 (Fin 5)))).Adj (σ x) (σ y)
five_vertex_cover_relabel_deg_fourIn LeanCombinatorics for TCS

A triangle-free five-vertex graph with a vertex of degree 4 is the 4-star K_{1,4}; it is a relabelling of representative 1.

theorem five_vertex_cover_relabel_deg_four (T : SimpleGraph (Fin 5)) [DecidableRel T.Adj]
    (htri : T.CliqueFree 3) (h4 : ∃ v, T.degree v = 4) :
    ∃ (σ : Equiv.Perm (Fin 5)) (i : Fin 6),
      ∀ x y : Fin 5, T.Adj x y ↔
        (SimpleGraph.fromEdgeSet (↑(five_vertex_cover_edges i) : Set (Sym2 (Fin 5)))).Adj (σ x) (σ y)
five_vertex_cover_relabel_deg_threeIn LeanCombinatorics for TCS

A triangle-free five-vertex graph with no isolated vertex and maximum degree 3 is, up to relabelling, one of: K_{2,3}, the 5-edge type, or the 3-star with a pendant (representatives 5, 4, 2 respectively), according to the degree of the leftover vertex.

theorem five_vertex_cover_relabel_deg_three (T : SimpleGraph (Fin 5)) [DecidableRel T.Adj]
    (htri : T.CliqueFree 3) (hnoisolates : ∀ t, ∃ u, T.Adj t u)
    (hmax : ∀ v, T.degree v ≤ 3) (h3 : ∃ v, T.degree v = 3) :
    ∃ (σ : Equiv.Perm (Fin 5)) (i : Fin 6),
      ∀ x y : Fin 5, T.Adj x y ↔
        (SimpleGraph.fromEdgeSet (↑(five_vertex_cover_edges i) : Set (Sym2 (Fin 5)))).Adj (σ x) (σ y)
five_vertex_cover_relabel_deg_twoIn LeanCombinatorics for TCS

A triangle-free five-vertex graph with no isolated vertex, maximum degree ≤ 2, and not 2-regular is a disjoint union of paths P5 or P3 ∪ P2, i.e. up to relabelling representative 3 or 0.

theorem five_vertex_cover_relabel_deg_two (T : SimpleGraph (Fin 5)) [DecidableRel T.Adj]
    (htri : T.CliqueFree 3) (hnoisolates : ∀ t, ∃ u, T.Adj t u)
    (hnoncycle : ¬ ∀ t, T.degree t = 2) (hmax : ∀ v, T.degree v ≤ 2) :
    ∃ (σ : Equiv.Perm (Fin 5)) (i : Fin 6),
      ∀ x y : Fin 5, T.Adj x y ↔
        (SimpleGraph.fromEdgeSet (↑(five_vertex_cover_edges i) : Set (Sym2 (Fin 5)))).Adj (σ x) (σ y)
foldl_range_add_eq_finset_sumIn LeanCombinatorics for TCS

Running the left fold of addition over the list 0, 1, …, k−1 starting from 0 gives the sum of f over those indices.

theorem foldl_range_add_eq_finset_sum (f : ℕ → ℕ) (k : ℕ) :
    (List.range k).foldl (fun s r => s + f r) 0 = ∑ i ∈ Finset.range k, f i
four_cycle_bound_algebraIn LeanCombinatorics for TCS

Let a, b, m, S, and C4 be real numbers with 2 ≤ a, 2 ≤ b, 2 * (a * Real.sqrt b + b * Real.sqrt a) ≤ m, m^2 / (2 * b) - m / 2 ≤ S, and (1 / 2) * (2 * S^2 / a^2 - S) ≤ C4. Then m^4 / (32 * a^2 * b^2) ≤ C4.

theorem four_cycle_bound_algebra (a b m S C4 : ℝ)
    (ha : 2 ≤ a) (hb : 2 ≤ b)
    (hm : 2 * (a * Real.sqrt b + b * Real.sqrt a) ≤ m)
    (hS : m ^ 2 / (2 * b) - m / 2 ≤ S)
    (hC : (1 / 2) * (2 * S ^ 2 / a ^ 2 - S) ≤ C4) :
    m ^ 4 / (32 * a ^ 2 * b ^ 2) ≤ C4
four_cycle_graph_code_asymptotic_density_eventually_geIn LeanCombinatorics for TCS

For every real number ε > 0, for eventually all natural numbers n in Filter.atTop, 1 - ε ≤ (n : ℝ) * kst_code_max_density 2 2 n.

theorem four_cycle_graph_code_asymptotic_density_eventually_ge (ε : ℝ) (hε : 0 < ε) :
    ∀ᶠ (n : ℕ) in Filter.atTop, 1 - ε ≤ (n : ℝ) * kst_code_max_density 2 2 n
four_point_chain_lemmaIn LeanCombinatorics for TCS

Chain construction of the two-point recurrence. Let a = 2n-1, b = 2n+1 (n ≥ 4) and let gamma be any integer with (a*gamma) % (2b) = 1 % (2b). Then there is a {0,1}-valued u : ℤ → ℤ with u(t) + u(t-a) = [(gamma t) mod 2b < b] for all t in [0, ab).

theorem four_point_chain_lemma (n gamma : ℤ) (hn : 4 ≤ n)
    (hinv : (2 * n - 1) * gamma % (2 * (2 * n + 1)) = 1 % (2 * (2 * n + 1))) :
    ∃ u : ℤ → ℤ,
      (∀ t : ℤ, u t = 0 ∨ u t = 1) ∧
      (∀ t : ℤ, 0 ≤ t → t < (2 * n - 1) * (2 * n + 1) →
         u t + u (t - (2 * n - 1))
           = (if (gamma * t) % (2 * (2 * n + 1)) < 2 * n + 1 then (1:ℤ) else 0))
four_point_chain_square_waveIn LeanCombinatorics for TCS

Square-wave chain seed existence. Let b = 2n+1 (n ≥ 4) and let C be an integer with 0 ≤ C < 2b. Then there is a {0,1}-valued function g : ℤ → ℤ with g(k) + g(k-1) = [(C+k) mod 2b < b] for every k in [0, b). In words: the alternating recursion driven by a square wave whose "on" block is a cyclic half [C, C+b) admits a seed g(-1) ∈ {0,1} keeping every value in {0,1}.

theorem four_point_chain_square_wave (n : ℤ) (hn : 4 ≤ n) (C : ℤ)
    (hC0 : 0 ≤ C) (hC2 : C < 2 * (2 * n + 1)) :
    ∃ g : ℤ → ℤ,
      (∀ k : ℤ, g k = 0 ∨ g k = 1) ∧
      (∀ k : ℤ, 0 ≤ k → k < 2 * n + 1 →
         g k + g (k - 1) = (if (C + k) % (2 * (2 * n + 1)) < 2 * n + 1 then (1:ℤ) else 0))
four_point_chain_weight_shiftIn LeanCombinatorics for TCS

Modular reduction of the weight along a residue class mod a: if a = 2n-1, b = 2n+1 and (a*gamma) % (2b) = 1 % (2b), then for all r, k one has (gamma*(r + k*a)) % (2b) = (gamma*r + k) % (2b). Equivalently v(r+ka) = [(gamma r + k) mod (2b) < b] for the weight v(t) = [(gamma t) mod 2b < b], so v restricted to any residue class is a square wave in k.

theorem four_point_chain_weight_shift (n gamma : ℤ) (hn : 4 ≤ n)
    (hinv : (2 * n - 1) * gamma % (2 * (2 * n + 1)) = 1 % (2 * (2 * n + 1)))
    (r k : ℤ) :
    gamma * (r + k * (2 * n - 1)) % (2 * (2 * n + 1))
      = (gamma * r + k) % (2 * (2 * n + 1))
four_point_set_alternating_weight_existsIn LeanCombinatorics for TCS

For any integer n ≥ 4, with a = 2n - 1 and b = 2n + 1, there exists a {0, 1}-valued function u : ℤ → ℤ such that for all t in [b, ab - 1], the four-point sum u(t) + u(t - a) + u(t - b) + u(t - a - b) equals 1.

theorem four_point_set_alternating_weight_exists (n : ℤ) (hn : 4 ≤ n) :
    let a : ℤ := 2 * n - 1
    let b : ℤ := 2 * n + 1
    ∃ u : ℤ → ℤ,
      (∀ t, u t = 0 ∨ u t = 1) ∧
      (∀ t, b ≤ t → t ≤ a * b - 1 → u t + u (t - a) + u (t - b) + u (t - a - b) = 1)
four_point_set_quadratic_packing_intervalIn LeanCombinatorics for TCS

Let n ≥ 4 be an integer, and let a = 2n - 1 and b = 2n + 1. Then there exists a finite subset C ⊆ ℤ such that the translates of F = {0, a, b, a + b} by elements of C are pairwise disjoint, and their union covers the integer interval [a + 2b, ab - 1 - a - b].

open Pointwise in
theorem four_point_set_quadratic_packing_interval (n : ℤ) (hn : 4 ≤ n) :
    let a : ℤ := 2 * n - 1
    let b : ℤ := 2 * n + 1
    let F : Finset ℤ := {0, a, b, a + b}
    ∃ C : Finset ℤ,
      (∀ c₁ ∈ C, ∀ c₂ ∈ C, c₁ ≠ c₂ → Disjoint (c₁ +ᵥ F) (c₂ +ᵥ F)) ∧
      Finset.Icc (a + 2 * b) (a * b - 1 - a - b) ⊆ C.biUnion (fun c => c +ᵥ F)
four_point_weight_antiperiodicIn LeanCombinatorics for TCS

Anti-periodicity of the weight. Let b = 2n+1 (n ≥ 4) and let gamma be odd. Then for every t, v(t) + v(t-b) = 1 where v(t) = [(gamma*t) mod 2b < b]. I.e. the two complementary half-turns of the weight shift by b sum to 1.

theorem four_point_weight_antiperiodic (n gamma : ℤ) (hn : 4 ≤ n)
    (hodd : Odd gamma) (t : ℤ) :
    (if (gamma * t) % (2 * (2 * n + 1)) < 2 * n + 1 then (1:ℤ) else 0)
      + (if (gamma * (t - (2 * n + 1))) % (2 * (2 * n + 1)) < 2 * n + 1 then (1:ℤ) else 0)
      = 1
fourier_card_supp_le_cardIn LeanCombinatorics for TCS

For any complex-valued function $f : H \to \mathbb{C}$ on a finite abelian group $H$, the cardinality of the support of its Fourier transform is at most the order of $H$, $|\operatorname{card}(H)|$.

theorem fourier_card_supp_le_card {H : Type*} [AddCommGroup H] [Fintype H]
    (f : H → ℂ) :
    ((Finset.univ.filter (fun γ : AddChar H ℂ => fourier_transform f γ ≠ 0)).card : ℝ) ≤ (Fintype.card H : ℝ)
fourier_collision_dim_eq_ratio_sq_iffIn LeanCombinatorics for TCS

For every nonzero complex-valued function $f : H \to \mathbb{C}$ on a finite abelian group $H$, the equality $D_4(f) = \operatorname{FR}(f)^2$ holds if and only if for all additive characters $\gamma_1, \gamma_2$, if $\widehat{f}(\gamma_1) \ne 0$ and $\widehat{f}(\gamma_2) \ne 0$, then $\|\widehat{f}(\gamma_1)\| = \|\widehat{f}(\gamma_2)\|$.

theorem fourier_collision_dim_eq_ratio_sq_iff {H : Type*} [AddCommGroup H] [Fintype H]
    (f : H → ℂ) (hf : f ≠ 0) :
    fourier_collision_dim f = fourier_ratio f ^ 2 ↔
      ∀ γ₁ γ₂ : AddChar H ℂ, fourier_transform f γ₁ ≠ 0 → fourier_transform f γ₂ ≠ 0 →
        ‖fourier_transform f γ₁‖ = ‖fourier_transform f γ₂‖
fourier_collision_dim_ge_oneIn LeanCombinatorics for TCS

For every nonzero complex-valued function $f : H \to \mathbb{C}$ on a finite abelian group $H$, its Fourier collision dimension satisfies $1 \le D_4(f)$.

theorem fourier_collision_dim_ge_one {H : Type*} [AddCommGroup H] [Fintype H]
    (f : H → ℂ) (hf : f ≠ 0) :
    1 ≤ fourier_collision_dim f
fourier_collision_dim_le_ratio_sqIn LeanCombinatorics for TCS

For every nonzero complex-valued function $f : H \to \mathbb{C}$ on a finite abelian group $H$, its Fourier collision dimension satisfies $D_4(f) \le \operatorname{FR}(f)^2$.

theorem fourier_collision_dim_le_ratio_sq {H : Type*} [AddCommGroup H] [Fintype H]
    (f : H → ℂ) (hf : f ≠ 0) :
    fourier_collision_dim f ≤ fourier_ratio f ^ 2
fourier_collision_hierarchyIn LeanCombinatorics for TCS

For every nonzero complex-valued function $f : H \to \mathbb{C}$ on a finite abelian group $H$, we have $1 \le D_4(f) \le \operatorname{FR}(f)^2 \le |\{\gamma \in \widehat{H} : \widehat{f}(\gamma) \ne 0\}| \le |H|$, and equality $D_4(f) = \operatorname{FR}(f)^2$ holds if and only if all nonzero Fourier coefficients have the same modulus.

theorem fourier_collision_hierarchy {H : Type*} [AddCommGroup H] [Fintype H]
    (f : H → ℂ) (hf : f ≠ 0) :
    (1 ≤ fourier_collision_dim f ∧
     fourier_collision_dim f ≤ fourier_ratio f ^ 2 ∧
     fourier_ratio f ^ 2 ≤ ((Finset.univ.filter (fun γ : AddChar H ℂ => fourier_transform f γ ≠ 0)).card : ℝ) ∧
     ((Finset.univ.filter (fun γ : AddChar H ℂ => fourier_transform f γ ≠ 0)).card : ℝ) ≤ (Fintype.card H : ℝ)) ∧
    (fourier_collision_dim f = fourier_ratio f ^ 2 ↔
      ∀ γ₁ γ₂ : AddChar H ℂ, fourier_transform f γ₁ ≠ 0 → fourier_transform f γ₂ ≠ 0 →
        ‖fourier_transform f γ₁‖ = ‖fourier_transform f γ₂‖)
fourier_ratio_sq_le_card_suppIn LeanCombinatorics for TCS

For every nonzero complex-valued function $f : H \to \mathbb{C}$ on a finite abelian group $H$, the square of its Fourier ratio is at most the cardinality of the support of its Fourier transform: $\operatorname{FR}(f)^2 \le |\{\gamma \in \widehat{H} : \widehat{f}(\gamma) \ne 0\}|$.

theorem fourier_ratio_sq_le_card_supp {H : Type*} [AddCommGroup H] [Fintype H]
    (f : H → ℂ) (hf : f ≠ 0) :
    fourier_ratio f ^ 2 ≤ ((Finset.univ.filter (fun γ : AddChar H ℂ => fourier_transform f γ ≠ 0)).card : ℝ)
fractional_scd_bounded_denominator_of_independentIn LeanCombinatorics for TCS

Let (𝒞, τ) be a fractional SCD with τ > 0 on 𝒞 whose incidence vectors are ℚ-linearly independent. Then there is D with 0 < D, D ≤ |α|^(2|α|), and the poset admits a fractional SCD with denominator D.

open scoped Classical BigOperators in
theorem fractional_scd_bounded_denominator_of_independent
    {α : Type*} [Fintype α] [PartialOrder α] (rank : α → ℤ)
    (𝒞 : Finset (Set α)) (τ : Set α → ℚ)
    (hchain : ∀ C ∈ 𝒞, is_symmetric_saturated_chain rank C)
    (hpos : ∀ C ∈ 𝒞, 0 < τ C)
    (hind : LinearIndependent ℚ (fun C : {D // D ∈ 𝒞} => fun x : α => if x ∈ (C : Set α) then (1:ℚ) else 0))
    (hsum : ∀ x : α, ∑ C ∈ 𝒞 with x ∈ C, τ C = 1) :
    ∃ D : ℕ, 0 < D ∧ D ≤ (Fintype.card α) ^ (2 * Fintype.card α) ∧
      has_fractional_scd_with_denominator rank D
fractional_scd_dependent_support_perturbIn LeanCombinatorics for TCS

If (𝒞, τ) is a fractional symmetric chain decomposition with τ > 0 on 𝒞 and the incidence vectors of 𝒞 are ℚ-linearly dependent, then there is another fractional symmetric chain decomposition with strictly positive weights whose underlying chain collection has strictly smaller cardinality.

open scoped Classical BigOperators in
theorem fractional_scd_dependent_support_perturb
    {α : Type*} [PartialOrder α] (rank : α → ℤ) (𝒞 : Finset (Set α)) (τ : Set α → ℚ)
    (hchain : ∀ C ∈ 𝒞, is_symmetric_saturated_chain rank C)
    (hpos : ∀ C ∈ 𝒞, 0 < τ C)
    (hsum : ∀ x : α, ∑ C ∈ 𝒞 with x ∈ C, τ C = 1)
    (hdep : ¬ LinearIndependent ℚ (fun C : {D // D ∈ 𝒞} => fun x : α => if x ∈ (C : Set α) then (1:ℚ) else 0)) :
    ∃ (𝒞' : Finset (Set α)) (τ' : Set α → ℚ), 𝒞'.card < 𝒞.card ∧
      (∀ C ∈ 𝒞', is_symmetric_saturated_chain rank C) ∧
      (∀ C ∈ 𝒞', 0 < τ' C) ∧
      ∀ x : α, ∑ C ∈ 𝒞' with x ∈ C, τ' C = 1
fractional_scd_independent_supportIn LeanCombinatorics for TCS

If a finite poset admits a fractional symmetric chain decomposition, then it admits one whose weights are strictly positive on the support and whose chain incidence vectors are linearly independent over ℚ.

open scoped Classical BigOperators in
theorem fractional_scd_independent_support
    {α : Type*} [PartialOrder α] (rank : α → ℤ)
    (h : has_fractional_symmetric_chain_decomposition rank) :
    ∃ (𝒞 : Finset (Set α)) (τ : Set α → ℚ),
      (∀ C ∈ 𝒞, is_symmetric_saturated_chain rank C) ∧
      (∀ C ∈ 𝒞, 0 < τ C) ∧
      LinearIndependent ℚ (fun C : {D // D ∈ 𝒞} => fun x : α => if x ∈ (C : Set α) then (1:ℚ) else 0) ∧
      ∀ x : α, ∑ C ∈ 𝒞 with x ∈ C, τ C = 1
fractional_scd_positive_supportIn LeanCombinatorics for TCS

If a finite poset admits a fractional symmetric chain decomposition, then it admits one in which every chain in the collection carries strictly positive weight.

open scoped Classical BigOperators in
theorem fractional_scd_positive_support
    {α : Type*} [PartialOrder α] (rank : α → ℤ)
    (h : has_fractional_symmetric_chain_decomposition rank) :
    ∃ (𝒞 : Finset (Set α)) (τ : Set α → ℚ),
      (∀ C ∈ 𝒞, is_symmetric_saturated_chain rank C) ∧
      (∀ C ∈ 𝒞, 0 < τ C) ∧
      ∀ x : α, ∑ C ∈ 𝒞 with x ∈ C, τ C = 1
full_affine_line_forces_cylinderIn LeanCombinatorics for TCS

Let p be a prime and S an admissible plane set in (ZMod p)^3. If S contains an affine line through P in direction v ≠ 0, then S is a cylinder in direction v.

theorem full_affine_line_forces_cylinder
    (p : ℕ) [Fact p.Prime] (S : Set (Fin 3 → ZMod p)) (hS : admissible_plane_set p S)
    (P v : Fin 3 → ZMod p) (hv : v ≠ 0) (hline : affine_line P v ⊆ S) :
    is_cylinder_in_direction p S v
gallai_color_card_le_two_of_card_le_threeIn LeanCombinatorics for TCS

On a finite vertex set V with |V| ≤ 3, any edge colouring of the complete graph on V such that no triangle receives three distinct colours uses at most 2 distinct colours on the edges of the complete graph.

theorem gallai_color_card_le_two_of_card_le_three
    {V α : Type*} [Fintype V] [DecidableEq V] [DecidableEq α]
    (hV : Fintype.card V ≤ 3)
    (c : Sym2 V → α)
    (h_gallai : ∀ u v w : V, c s(u, v) = c s(v, w) ∨ c s(v, w) = c s(w, u) ∨ c s(u, v) = c s(w, u)) :
    ((⊤ : SimpleGraph V).edgeFinset.image c).card ≤ 2
gallai_coloring_disconnected_monochromatic_subgraphIn LeanCombinatorics for TCS

Let V be a finite vertex set with |V| ≥ 2, and let the edges of the complete graph on V be coloured such that no triangle receives three distinct colours. If at least three colours are used on the edges of the complete graph, then there exists a colour k used on an edge such that the spanning subgraph formed by the edges of colour k is disconnected.

theorem gallai_coloring_disconnected_monochromatic_subgraph
    {V α : Type*} [Fintype V] [DecidableEq V] [DecidableEq α]
    (hV : 2 ≤ Fintype.card V)
    (c : Sym2 V → α)
    (h_gallai : ∀ u v w : V, c s(u, v) = c s(v, w) ∨ c s(v, w) = c s(w, u) ∨ c s(u, v) = c s(w, u))
    (h_colors : 3 ≤ ((⊤ : SimpleGraph V).edgeFinset.image c).card) :
    ∃ k ∈ (⊤ : SimpleGraph V).edgeFinset.image c,
      ¬ (SimpleGraph.fromRel (fun u v => c s(u, v) = k)).Connected
gallai_triangle_same_colorIn LeanCombinatorics for TCS

In any edge colouring of the complete graph where no triangle receives three distinct colours, if an edge between vertices x and x' has colour c0, and a vertex u forms edges with x and x' of colours different from c0, then the edge between u and x has the same colour as the edge between u and x'.

theorem gallai_triangle_same_color
    {V α : Type*} (c : Sym2 V → α) (c0 : α) (u x x' : V)
    (h_gallai : ∀ u v w : V, c s(u, v) = c s(v, w) ∨ c s(v, w) = c s(w, u) ∨ c s(u, v) = c s(w, u))
    (hxx' : c s(x, x') = c0)
    (hux : c s(u, x) ≠ c0)
    (hux' : c s(u, x') ≠ c0) :
    c s(u, x) = c s(u, x')
galvin_bipartite_multigraph_list_edge_colouringIn LeanCombinatorics for TCS

Galvin's theorem in matroid-free form (list edge colouring of bipartite multigraphs): view the finite set α as the edge set of the bipartite multigraph whose left and right endpoints of e are the labels f e and g e. If every fibre of f and every fibre of g has at most k elements (so the maximum degree is at most k), then for every list assignment L with |L e| ≥ k there is a choice c e ∈ L e such that each colour class meets every fibre of f and every fibre of g in at most one element, i.e. is a matching. This is Galvin's theorem χ'_ℓ = Δ for bipartite multigraphs (1995); it is a strictly weaker statement than the target (two unit-capacity partition matroids are strongly base orderable), k = 1 is trivial and k = 2 is proved here.

theorem galvin_bipartite_multigraph_list_edge_colouring {α : Type*} [Finite α] (f g : α → ℕ) (k : ℕ)
    (hf : ∀ γ : ℕ, {e | f e = γ}.ncard ≤ k) (hg : ∀ γ : ℕ, {e | g e = γ}.ncard ≤ k)
    (L : α → Finset ℕ) (hL : ∀ e : α, k ≤ (L e).card) :
    ∃ c : α → ℕ, (∀ e : α, c e ∈ L e) ∧
      ∀ γ : ℕ, (∀ e₁ e₂ : α, c e₁ = γ → c e₂ = γ → f e₁ = f e₂ → e₁ = e₂) ∧
        ∀ e₁ e₂ : α, c e₁ = γ → c e₂ = γ → g e₁ = g e₂ → e₁ = e₂
galvin_bipartite_multigraph_list_edge_colouring_three_setIn LeanCombinatorics for TCS

Given fibers of size at most 3 for f and g on a subset E, and lists L(e) of size at least 3 for all e ∈ E, there exists an L-coloring c on E whose color classes meet each f-fiber and each g-fiber at most once.

theorem galvin_bipartite_multigraph_list_edge_colouring_three_set {α : Type*} [Finite α] (E : Set α)
    (f g : α → ℕ)
    (hf : ∀ γ : ℕ, {e | e ∈ E ∧ f e = γ}.ncard ≤ 3)
    (hg : ∀ γ : ℕ, {e | e ∈ E ∧ g e = γ}.ncard ≤ 3)
    (L : α → Finset ℕ) (hL : ∀ e ∈ E, 3 ≤ (L e).card) :
    ∃ c : α → ℕ, (∀ e ∈ E, c e ∈ L e) ∧
      ∀ γ : ℕ, (∀ e₁ ∈ E, ∀ e₂ ∈ E, c e₁ = γ → c e₂ = γ → f e₁ = f e₂ → e₁ = e₂) ∧
        ∀ e₁ ∈ E, ∀ e₂ ∈ E, c e₁ = γ → c e₂ = γ → g e₁ = g e₂ → e₁ = e₂
galvin_bipartite_orientation_kernel_perfectIn LeanCombinatorics for TCS

Galvin's orientation step (1995): given a proper k-edge-colouring m of the bipartite multigraph with endpoints f, g (all colours < k, injective on fibres of f and of g), there is an orientation arc of the conflict graph (distinct edges sharing a left or a right endpoint) which contains no loops, stays inside the conflict graph, gives every edge fewer than k out-neighbours, and is kernel-perfect: every finite induced subgraph has an independent, arc-absorbing set.

theorem galvin_bipartite_orientation_kernel_perfect {α : Type*} [Fintype α] (f g : α → ℕ) (k : ℕ)
    (m : α → ℕ) (hm : ∀ e : α, m e < k)
    (hf : ∀ e₁ e₂ : α, m e₁ = m e₂ → f e₁ = f e₂ → e₁ = e₂)
    (hg : ∀ e₁ e₂ : α, m e₁ = m e₂ → g e₁ = g e₂ → e₁ = e₂) :
    ∃ (arc : α → α → Prop) (_ : DecidableRel arc),
      (∀ e₁ e₂ : α, arc e₁ e₂ → e₁ ≠ e₂ ∧ (f e₁ = f e₂ ∨ g e₁ = g e₂)) ∧
      (∀ e : α, {e' | arc e e'}.ncard < k) ∧
      ∀ F : Finset α, ∃ K : Finset α,
        K ⊆ F ∧ (∀ u ∈ K, ∀ v ∈ K, u ≠ v → ¬ (f u = f v ∨ g u = g v)) ∧
        ∀ u ∈ F, u ∉ K → ∃ v ∈ K, arc u v
galvin_conflict_arc_kernel_perfectIn LeanCombinatorics for TCS

Kernel-perfectness of Galvin's orientation: for a proper edge-colouring m of the bipartite multigraph (injective on f-fibres and on g-fibres), every finite induced subgraph of the conflict graph has a kernel — an independent set of edges K (no two sharing a left or a right endpoint) such that every edge of F outside K has an arc of galvin_conflict_arc into K.

theorem galvin_conflict_arc_kernel_perfect {α : Type*} [Fintype α] (f g m : α → ℕ)
    (hf : ∀ e₁ e₂ : α, m e₁ = m e₂ → f e₁ = f e₂ → e₁ = e₂)
    (hg : ∀ e₁ e₂ : α, m e₁ = m e₂ → g e₁ = g e₂ → e₁ = e₂) :
    ∀ F : Finset α, ∃ K : Finset α, K ⊆ F ∧
      (∀ u ∈ K, ∀ v ∈ K, u ≠ v → ¬ (f u = f v ∨ g u = g v)) ∧
      ∀ u ∈ F, u ∉ K → ∃ v ∈ K, galvin_conflict_arc f g m u v
galvin_conflict_arc_outdeg_ltIn LeanCombinatorics for TCS

In Galvin's orientation of the conflict graph, every edge has fewer than k out-neighbours, where k bounds the colour values: if m is a proper k-edge-colouring (values < k, injective on f-fibres and on g-fibres) then each edge has at most k − 1 arc-successors.

theorem galvin_conflict_arc_outdeg_lt {α : Type*} [Fintype α] (f g m : α → ℕ) (k : ℕ)
    (hm : ∀ e, m e < k)
    (hf : ∀ e₁ e₂ : α, m e₁ = m e₂ → f e₁ = f e₂ → e₁ = e₂)
    (hg : ∀ e₁ e₂ : α, m e₁ = m e₂ → g e₁ = g e₂ → e₁ = e₂) :
    ∀ e : α, {e' | galvin_conflict_arc f g m e e'}.ncard < k
galvin_kernel_lemmaIn LeanCombinatorics for TCS

Galvin's kernel lemma (Borodin–Kostochka–Woodall form). Let adj be a loopless symmetric-free adjacency on a finite set V, let arc be an orientation of a subgraph of adj, and suppose the digraph (adj, arc) is kernel-perfect: every finite induced subgraph has a kernel, i.e. an independent set meeting every vertex outside it by an outgoing arc. If every vertex v carries a list L v of at least (number of arc-out-neighbours of v) + 1 colours, then there is a choice c v ∈ L v which is proper for adj: adj u v implies c u ≠ c v.

theorem galvin_kernel_lemma {V : Type*} [Fintype V] [DecidableEq V]
    (adj arc : V → V → Prop) [DecidableRel adj] [DecidableRel arc]
    (hloop : ∀ v, ¬ adj v v)
    (hsub : ∀ u v, arc u v → adj u v)
    (hker : ∀ F : Finset V, ∃ K : Finset V, K ⊆ F ∧
      (∀ u ∈ K, ∀ v ∈ K, u ≠ v → ¬ adj u v) ∧
      (∀ u ∈ F, u ∉ K → ∃ v ∈ K, arc u v))
    (L : V → Finset ℕ) (hL : ∀ v, {u | arc v u}.ncard + 1 ≤ (L v).card) :
    ∃ c : V → ℕ, (∀ v, c v ∈ L v) ∧ ∀ u v, adj u v → c u ≠ c v
geometric_entropy_constant_eqIn LeanCombinatorics for TCS

The identity (1 - 2^(-1/2))^(-2) = 6 + 4 * sqrt(2) holds for real numbers.

theorem geometric_entropy_constant_eq :
    (1 - (2 : ℝ) ^ (-(1 : ℝ) / 2)) ^ (-2 : ℝ) = 6 + 4 * Real.sqrt 2
glove_number_complete_graph_choose_two_le_sqIn LeanCombinatorics for TCS

For $n \ge 2$, the number of edges $\binom{n}{2}$ of $K_n$ is at most the square of its glove number: $\mathrm{gl}(K_n) \ge \sqrt{n(n-1)/2}$.

theorem glove_number_complete_graph_choose_two_le_sq (n : ℕ) (hn : 2 ≤ n) :
    n.choose 2 ≤ glove_number (SimpleGraph.completeGraph (Fin n)) ^ 2
glove_number_k4_no_one_gloveIn LeanCombinatorics for TCS

There is no clean handshake sequence with exactly one glove that covers all six edges of $K_4$: with one glove all covered edges coincide, and $K_4$ has two distinct edges.

theorem glove_number_k4_no_one_glove :
    ¬ has_clean_handshake_seq (SimpleGraph.completeGraph (Fin 4)) 1
glove_number_k4_no_two_glovesIn LeanCombinatorics for TCS

There is no clean handshake sequence with exactly two gloves covering all six edges of $K_4$, i.e. two gloves are not enough for $K_4$.

theorem glove_number_k4_no_two_gloves :
    ¬ has_clean_handshake_seq (SimpleGraph.completeGraph (Fin 4)) 2
glove_number_k4_no_zero_glovesIn LeanCombinatorics for TCS

There is no clean handshake sequence with zero gloves covering all edges of $K_4$: the glove type Fin 0 is empty, so there is no handshake at all, hence the sequence is empty and covers no edge, while $K_4$ has the edge $\{0,1\}$.

theorem glove_number_k4_no_zero_gloves :
    ¬ has_clean_handshake_seq (SimpleGraph.completeGraph (Fin 4)) 0
glove_number_k4_two_gloves_all_sides_touchedIn LeanCombinatorics for TCS

If a clean two-glove sequence covers all six edges of $K_4$, then each of the four glove sides is directly touched by some vertex. Reason: a pair of sides has fixed touchers and hence can serve for at most one edge, while the six edges of $K_4$ need six distinct pairs of touched sides, and there are exactly $\binom{4}{2} = 6$ pairs of sides.

theorem glove_number_k4_two_gloves_all_sides_touched
    (seq : List (Handshake (Fin 4) (Fin 2)))
    (hclean : CleanHandshakeSeq seq (fun _ => (∅ : Set (Fin 4))))
    (hcover : ∀ e ∈ (SimpleGraph.completeGraph (Fin 4)).edgeSet, ∃ h ∈ seq, handshake_edge h = e) :
    ∀ s : Fin 2 × Bool, (seq_touchers seq s).Nonempty
glove_number_k4_two_gloves_touchers_eq_singletonIn LeanCombinatorics for TCS

If a clean two-glove sequence covers all edges of $K_4$, there is a bijection $u$ from the four glove sides to the four vertices with the property that the set of vertices directly touching a side $s$ anywhere in the sequence is exactly $\{u(s)\}$.

theorem glove_number_k4_two_gloves_touchers_eq_singleton
    (seq : List (Handshake (Fin 4) (Fin 2)))
    (hclean : CleanHandshakeSeq seq (fun _ => (∅ : Set (Fin 4))))
    (hcover : ∀ e ∈ (SimpleGraph.completeGraph (Fin 4)).edgeSet, ∃ h ∈ seq, handshake_edge h = e) :
    ∃ u : (Fin 2 × Bool) → Fin 4, Function.Injective u ∧ ∀ s, seq_touchers seq s = {u s}
glove_number_k5_no_small_glovesIn LeanCombinatorics for TCS

For every $k \le 3$ there is no clean handshake sequence with $k$ gloves covering every edge of $K_5$: $k$ gloves cover at most $k^2 \le 9$ edges, while $K_5$ has 10.

theorem glove_number_k5_no_small_gloves :
    ∀ k : ℕ, k ≤ 3 → ¬ has_clean_handshake_seq (SimpleGraph.completeGraph (Fin 5)) k
glove_number_k5_no_three_glovesIn LeanCombinatorics for TCS

There is no clean handshake sequence with at most three gloves covering every edge of $K_5$: with $k$ gloves at most $k^2$ edges are covered, but $K_5$ has 10 edges and $3^2 = 9 < 10$.

theorem glove_number_k5_no_three_gloves :
    ¬ has_clean_handshake_seq (SimpleGraph.completeGraph (Fin 5)) 3
good_slopes_colored_product_rows_conditionalIn LeanCombinatorics for TCS

For fields of cardinalities p<q and r colors with r<p and (p+1)r<2q, assume the two finite-field direction classification bounds. If at least max(2,(p+1)/2) nonzero p-coordinate rows each have at least (q+1)/2 good nonzero q-coordinate slopes, then every unit-coordinate direction is good.

theorem good_slopes_colored_product_rows_conditional
    (K L : Type*) [Field K] [Field L] [Fintype K] [Fintype L] [DecidableEq K] [DecidableEq L]
    (p q r : ℕ) (hp : Fintype.card K = p) (hq : Fintype.card L = q)
    (hrp : r < p) (hpq : p < q) (hsize : (p+1)*r < 2*q)
    (hdirK : ∀ T : Finset (K × K), T.card = p →
      (∃ G : Finset K, (p+1)/2 ≤ G.card ∧ ∀ a ∈ G, Set.InjOn (fun z : K × K => z.2 + a*z.1) T) →
      (∃ x : K, ∀ z ∈ T, z.1 = x) ∨ (∃ a t : K, ∀ z ∈ T, z.2 + a*z.1 = t))
    (hdirL : ∀ T : Finset (L × L), T.card = q →
      (∃ G : Finset L, (q+1)/2 ≤ G.card ∧ ∀ b ∈ G, Set.InjOn (fun z : L × L => z.2 + b*z.1) T) →
      (∃ x : L, ∀ z ∈ T, z.1 = x) ∨ (∃ b t : L, ∀ z ∈ T, z.2 + b*z.1 = t))
    (S : Finset ((K × L) × (K × L))) (color : ((K × L) × (K × L)) → Fin r)
    (hcard : S.card = p*q)
    (hx : ∀ u ∈ S, ∀ v ∈ S, color u = color v → u.1 = v.1 → u = v)
    (hc : ∀ a : K, a ≠ 0 → ∀ b : L, b ≠ 0 → ∀ u ∈ S, ∀ v ∈ S, color u = color v →
      (u.2.1 + a*u.1.1, u.2.2 + b*u.1.2) = (v.2.1 + a*v.1.1, v.2.2 + b*v.1.2) → u = v)
    (hrows : max 2 ((p+1)/2) ≤ ((Finset.univ : Finset K).filter fun a => a ≠ 0 ∧
      (q+1)/2 ≤ ((Finset.univ : Finset L).filter fun b => b ≠ 0 ∧
        Set.InjOn (fun z : ((K × L) × (K × L)) => (z.2.1 + a*z.1.1, z.2.2 + b*z.1.2)) S).card).card) :
    ∀ a : K, a ≠ 0 → ∀ b : L, b ≠ 0 →
      Set.InjOn (fun z : ((K × L) × (K × L)) => (z.2.1 + a*z.1.1, z.2.2 + b*z.1.2)) S
good_slopes_product_strong_rows_bad_column_conditionalIn LeanCombinatorics for TCS

For finite fields of sizes p<q, assume the q-point direction classification. If every nonzero p-coordinate row has at least (q+1)/2 good nonzero q-coordinate directions, then any bad direction forces its entire q-coordinate column of unit directions to be bad.

theorem good_slopes_product_strong_rows_bad_column_conditional
    (K L : Type*) [Field K] [Field L] [Fintype K] [Fintype L] [DecidableEq K] [DecidableEq L]
    (p q : ℕ) (hp : Fintype.card K = p) (hq : Fintype.card L = q) (hpq : p < q)
    (hdirL : ∀ T : Finset (L × L), T.card = q →
      (∃ G : Finset L, (q+1)/2 ≤ G.card ∧ ∀ b ∈ G, Set.InjOn (fun z : L × L => z.2 + b*z.1) T) →
      (∃ x : L, ∀ z ∈ T, z.1 = x) ∨ (∃ b t : L, ∀ z ∈ T, z.2 + b*z.1 = t))
    (S : Finset ((K × L) × (K × L))) (hcard : S.card = p*q)
    (hrows : ∀ a : K, a ≠ 0 → (q+1)/2 ≤ ((Finset.univ : Finset L).filter fun b => b ≠ 0 ∧
      Set.InjOn (fun z : ((K × L) × (K × L)) => (z.2.1 + a*z.1.1, z.2.2 + b*z.1.2)) S).card)
    (a : K) (ha : a ≠ 0) (b : L) (hb : b ≠ 0)
    (hbad : ¬ Set.InjOn (fun z : ((K × L) × (K × L)) => (z.2.1 + a*z.1.1, z.2.2 + b*z.1.2)) S) :
    ∀ a' : K, a' ≠ 0 → ¬ Set.InjOn (fun z : ((K × L) × (K × L)) => (z.2.1 + a'*z.1.1, z.2.2 + b*z.1.2)) S
good_slopes_product_three_color_gap_conditionalIn LeanCombinatorics for TCS

For finite fields of odd sizes 5≤p and q≥2p−1 with 3(p+1)<2q, assume both finite-field direction classifications. A three-colored pq-point set with a bad unit-coordinate direction has at most (p−1)(q−3) good unit-coordinate directions.

theorem good_slopes_product_three_color_gap_conditional (K L : Type*) [Field K] [Field L] [Fintype K] [Fintype L] [DecidableEq K] [DecidableEq L]
    (p q : ℕ) (hp : Fintype.card K = p) (hq : Fintype.card L = q)
    (hp5 : 5 ≤ p) (hpodd : p % 2 = 1) (hqodd : q % 2 = 1) (hsep : 2*p-1 ≤ q) (hsize : (p+1)*3 < 2*q)
    (hdirK : (∀ T : Finset (K × K), T.card = p →
      (∃ G : Finset K, (p+1)/2 ≤ G.card ∧ ∀ b ∈ G, Set.InjOn (fun z : K × K => z.2 + b*z.1) T) →
      (∃ x : K, ∀ z ∈ T, z.1 = x) ∨ (∃ b t : K, ∀ z ∈ T, z.2 + b*z.1 = t))) (hdirL : (∀ T : Finset (L × L), T.card = q →
      (∃ G : Finset L, (q+1)/2 ≤ G.card ∧ ∀ b ∈ G, Set.InjOn (fun z : L × L => z.2 + b*z.1) T) →
      (∃ x : L, ∀ z ∈ T, z.1 = x) ∨ (∃ b t : L, ∀ z ∈ T, z.2 + b*z.1 = t))) (S : Finset ((K × L) × (K × L))) (color : ((K × L) × (K × L)) → Fin 3) (hcard : S.card = p*q)
    (hx : ∀ u ∈ S, ∀ v ∈ S, color u = color v → u.1 = v.1 → u = v)
    (hc : ∀ a : K, a ≠ 0 → ∀ b : L, b ≠ 0 → ∀ u ∈ S, ∀ v ∈ S, color u = color v →
      (u.2.1 + a*u.1.1, u.2.2 + b*u.1.2) = (v.2.1 + a*v.1.1, v.2.2 + b*v.1.2) → u = v)
    (hbad : ∃ a : K, a ≠ 0 ∧ ∃ b : L, b ≠ 0 ∧ ¬ Set.InjOn (fun z : ((K × L) × (K × L)) => (z.2.1 + a*z.1.1, z.2.2 + b*z.1.2)) S) :
    ((Finset.univ : Finset (K × L)).filter fun ab => ab.1 ≠ 0 ∧ ab.2 ≠ 0 ∧ Set.InjOn (fun z : ((K × L) × (K × L)) => (z.2.1 + ab.1*z.1.1, z.2.2 + ab.2*z.1.2)) S).card ≤ (p-1)*(q-1)-2*(p-1)
good_slopes_product_uncolored_gap_conditionalIn LeanCombinatorics for TCS

For finite fields of odd sizes 5≤p and q≥2p−1, assuming the q-point finite-field direction theorem, a pq-point set with a bad unit-coordinate direction has at most (p−1)(q−2) good unit-coordinate directions.

theorem good_slopes_product_uncolored_gap_conditional (K L : Type*) [Field K] [Field L] [Fintype K] [Fintype L] [DecidableEq K] [DecidableEq L]
    (p q : ℕ) (hp : Fintype.card K = p) (hq : Fintype.card L = q)
    (hp5 : 5 ≤ p) (hpodd : p % 2 = 1) (hqodd : q % 2 = 1) (hsep : 2*p-1 ≤ q)
    (hdirL : (∀ T : Finset (L × L), T.card = q →
      (∃ G : Finset L, (q+1)/2 ≤ G.card ∧ ∀ b ∈ G, Set.InjOn (fun z : L × L => z.2 + b*z.1) T) →
      (∃ x : L, ∀ z ∈ T, z.1 = x) ∨ (∃ b t : L, ∀ z ∈ T, z.2 + b*z.1 = t))) (S : Finset ((K × L) × (K × L))) (hcard : S.card = p*q)
    (hbad : ∃ a : K, a ≠ 0 ∧ ∃ b : L, b ≠ 0 ∧ ¬ Set.InjOn (fun z : ((K × L) × (K × L)) => (z.2.1 + a*z.1.1, z.2.2 + b*z.1.2)) S) :
    ((Finset.univ : Finset (K × L)).filter fun ab => ab.1 ≠ 0 ∧ ab.2 ≠ 0 ∧ Set.InjOn (fun z : ((K × L) × (K × L)) => (z.2.1 + ab.1*z.1.1, z.2.2 + ab.2*z.1.2)) S).card ≤ (p-1)*(q-1)-(p-1)
graph_cover_witness_relabelIn LeanCombinatorics for TCS

The cover-witness property is invariant under relabelling of the vertices: if σ is a permutation with T.Adj x y ↔ G.Adj (σ x) (σ y) for all x y, and G has a cover witness J, then T has one, namely J'(t) = {x | σ x ∈ J (σ t)}.

theorem graph_cover_witness_relabel (T G : SimpleGraph (Fin 5)) (σ : Equiv.Perm (Fin 5))
    (h : ∀ x y : Fin 5, T.Adj x y ↔ G.Adj (σ x) (σ y))
    (hG : ∃ J : Fin 5 → Finset (Fin 5), GraphCoverWitness G J) :
    ∃ J : Fin 5 → Finset (Fin 5), GraphCoverWitness T J
grid_antitone_sequence_geodesicIn LeanCombinatorics for TCS

If c_0, ..., c_{n-1} is a sequence of blocks in Fin k × Fin k such that consecutive terms are distinct, the column never decreases and the row never increases, with each coordinate changing by at most one per step, then there is a simple path in P_k □ P_k from c_0 to c_{n-1} of length equal to their Manhattan distance whose vertex set contains all the c_i.

theorem grid_antitone_sequence_geodesic (k : ℕ) {n : ℕ} (hn : 1 ≤ n) (c : Fin n → Fin k × Fin k)
    (hcol : ∀ (i : ℕ) (h : i + 1 < n),
      (c ⟨i, by omega⟩).2.val ≤ (c ⟨i + 1, h⟩).2.val ∧
      (c ⟨i + 1, h⟩).2.val ≤ (c ⟨i, by omega⟩).2.val + 1)
    (hrow : ∀ (i : ℕ) (h : i + 1 < n),
      (c ⟨i + 1, h⟩).1.val ≤ (c ⟨i, by omega⟩).1.val ∧
      (c ⟨i, by omega⟩).1.val ≤ (c ⟨i + 1, h⟩).1.val + 1)
    (hne : ∀ (i : ℕ) (h : i + 1 < n), c ⟨i, by omega⟩ ≠ c ⟨i + 1, h⟩) :
    ∃ w : ((SimpleGraph.pathGraph k) □ (SimpleGraph.pathGraph k)).Walk
        (c ⟨0, by omega⟩) (c ⟨n - 1, by omega⟩),
      w.IsPath ∧
      w.length = ((SimpleGraph.pathGraph k) □ (SimpleGraph.pathGraph k)).dist
        (c ⟨0, by omega⟩) (c ⟨n - 1, by omega⟩) ∧
      (∀ i : Fin n, c i ∈ w.support)
grid_monotone_sequence_geodesicIn LeanCombinatorics for TCS

If c_0, ..., c_{n-1} is a sequence of blocks in Fin k × Fin k such that consecutive terms are distinct, both coordinates never decrease, and each coordinate increases by at most one per step, then there is a simple path in P_k □ P_k from c_0 to c_{n-1} whose length is their Manhattan distance and whose vertex set contains all the c_i.

theorem grid_monotone_sequence_geodesic (k : ℕ) {n : ℕ} (hn : 1 ≤ n) (c : Fin n → Fin k × Fin k)
    (hmono : ∀ (i : ℕ) (h : i + 1 < n),
      (c ⟨i, by omega⟩).1.val ≤ (c ⟨i + 1, h⟩).1.val ∧
      (c ⟨i, by omega⟩).2.val ≤ (c ⟨i + 1, h⟩).2.val)
    (hne : ∀ (i : ℕ) (h : i + 1 < n), c ⟨i, by omega⟩ ≠ c ⟨i + 1, h⟩)
    (hstep : ∀ (i : ℕ) (h : i + 1 < n),
      (c ⟨i + 1, h⟩).1.val ≤ (c ⟨i, by omega⟩).1.val + 1 ∧
      (c ⟨i + 1, h⟩).2.val ≤ (c ⟨i, by omega⟩).2.val + 1) :
    ∃ w : ((SimpleGraph.pathGraph k) □ (SimpleGraph.pathGraph k)).Walk
        (c ⟨0, by omega⟩) (c ⟨n - 1, by omega⟩),
      w.IsPath ∧
      w.length = ((SimpleGraph.pathGraph k) □ (SimpleGraph.pathGraph k)).dist
        (c ⟨0, by omega⟩) (c ⟨n - 1, by omega⟩) ∧
      (∀ i : Fin n, c i ∈ w.support)
grid_vandermonde_shift_detIn LeanCombinatorics for TCS

For any commutative ring R and vectors a, b with b_i = a_i + D, the determinant of the 3x3 matrix with rows 1, a, and b^2 equals (a_1 - a_0) * (a_2 - a_0) * (a_2 - a_1).

theorem grid_vandermonde_shift_det {R : Type*} [CommRing R] (a b : Fin 3 → R) (D : R)
    (hb : ∀ i, b i = a i + D) :
    Matrix.det (![fun _ => 1, fun j => a j, fun j => (b j) ^ 2] : Matrix (Fin 3) (Fin 3) R) =
      (a 1 - a 0) * (a 2 - a 0) * (a 2 - a 1)
hamming_inertia_boundIn LeanCombinatorics for TCS

Let n be a natural number, and let F be a finite subset of (Fin n → ℝ) such that (x i)^2 = 1 for all x ∈ F and all i : Fin n. Let k : Finset (Fin n) → ℝ be a family of coefficients, and let lambda > 0. If for all x, y ∈ F the kernel ∑ T, k T * (∏ i ∈ T, x i) * (∏ i ∈ T, y i) equals lambda when x = y and 0 when x ≠ y, then F.card ≤ (Finset.univ.filter (fun T => 0 < k T)).card.

theorem hamming_inertia_bound {n : ℕ} (F : Finset (Fin n → ℝ))
    (hF : ∀ x ∈ F, ∀ i : Fin n, (x i) ^ 2 = 1)
    (k : Finset (Fin n) → ℝ) (lambda : ℝ) (hlambda : 0 < lambda)
    (hK : ∀ x ∈ F, ∀ y ∈ F, (∑ T : Finset (Fin n), k T * (∏ i ∈ T, x i) * (∏ i ∈ T, y i)) = if x = y then lambda else 0) :
    F.card ≤ (Finset.univ.filter (fun T : Finset (Fin n) => 0 < k T)).card
handshake_seq_double_edges_card_leIn LeanCombinatorics for TCS

In a clean handshake sequence over $k$ gloves, double handshakes collectively cover at most $k(k-1)$ distinct edges, since each of the $\binom{k}{2}$ glove pairs supports at most 2 distinct double handshake edges.

theorem handshake_seq_double_edges_card_le {V Γ : Type*} [DecidableEq V] [DecidableEq Γ] [Fintype Γ]
    (seq : List (Handshake V Γ)) (hc : CleanHandshakeSeq seq (fun _ => (∅ : Set V))) :
    (seq.filterMap (fun h => match h with
      | .double _ _ _ _ => some (handshake_edge h)
      | .single _ _ _ => none)).toFinset.card ≤ Fintype.card Γ * (Fintype.card Γ - 1)
handshake_seq_edge_eq_of_sides_eqIn LeanCombinatorics for TCS

Two handshakes of the same clean sequence that directly touch the same pair of glove sides cover the same edge, because each glove side is directly touched by at most one vertex.

theorem handshake_seq_edge_eq_of_sides_eq {V Γ : Type*} [DecidableEq Γ]
    (seq : List (Handshake V Γ)) (t : Γ × Bool → Set V) (hc : CleanHandshakeSeq seq t)
    {h₁ h₂ : Handshake V Γ} (hm₁ : h₁ ∈ seq) (hm₂ : h₂ ∈ seq)
    (hl : handshake_left_side h₁ = handshake_left_side h₂)
    (hr : handshake_right_side h₁ = handshake_right_side h₂) :
    handshake_edge h₁ = handshake_edge h₂
handshake_seq_edge_eq_of_sym2_sides_eqIn LeanCombinatorics for TCS

Two handshakes of the same clean sequence that touch the same unordered pair of sides in $\mathrm{Sym}^2(\Gamma \times \mathrm{Bool})$ cover the same edge, since each side has at most one toucher along the sequence.

theorem handshake_seq_edge_eq_of_sym2_sides_eq {V Γ : Type*} [DecidableEq Γ]
    (seq : List (Handshake V Γ)) (t : Γ × Bool → Set V) (hc : CleanHandshakeSeq seq t)
    {h₁ h₂ : Handshake V Γ} (hm₁ : h₁ ∈ seq) (hm₂ : h₂ ∈ seq)
    (hsides : (s(handshake_left_side h₁, handshake_right_side h₁) : Sym2 (Γ × Bool)) =
              s(handshake_left_side h₂, handshake_right_side h₂)) :
    handshake_edge h₁ = handshake_edge h₂
handshake_seq_edges_card_le_sqIn LeanCombinatorics for TCS

A clean handshake sequence using $k$ gloves covers at most $k^2$ distinct edges: at most $k$ edges come from single-gloved handshakes, and for each of the $\binom{k}{2}$ pairs of gloves at most $2$ further edges come from double-gloved handshakes between them (besides the two edges already counted for those gloves), giving $k + 2\binom{k}{2} = k^2$.

theorem handshake_seq_edges_card_le_sq {V Γ : Type*} [DecidableEq V] [DecidableEq Γ] [Fintype Γ]
    (seq : List (Handshake V Γ)) (hc : CleanHandshakeSeq seq (fun _ => (∅ : Set V))) :
    (seq.map handshake_edge).toFinset.card ≤ Fintype.card Γ ^ 2
handshake_seq_one_glove_edges_eqIn LeanCombinatorics for TCS

If seq is a clean handshake sequence over the one-element glove type Fin 1 starting from the empty contamination map, then all handshakes in seq cover one and the same edge of V; in particular such a sequence covers at most one edge, whatever V is.

theorem handshake_seq_one_glove_edges_eq {V : Type*} (seq : List (Handshake V (Fin 1)))
    (h : CleanHandshakeSeq seq (fun _ => (∅ : Set V))) :
    ∃ e : Sym2 V, ∀ g ∈ seq, handshake_edge g = e
handshake_seq_single_edges_card_leIn LeanCombinatorics for TCS

In a clean sequence over $k$ gloves starting from the empty contamination map, all single-gloved handshakes together cover at most $k$ distinct edges: a single handshake on glove $g$ touches both sides of $g$, and each side is touched by at most one vertex, so every single handshake on $g$ covers the same edge.

theorem handshake_seq_single_edges_card_le {V Γ : Type*} [DecidableEq V] [DecidableEq Γ] [Fintype Γ]
    (seq : List (Handshake V Γ)) (hc : CleanHandshakeSeq seq (fun _ => (∅ : Set V))) :
    (seq.filterMap (fun h => match h with
      | .single _ _ _ => some (handshake_edge h)
      | .double _ _ _ _ => none)).toFinset.card ≤ Fintype.card Γ
handshake_sides_ne_of_cleanIn LeanCombinatorics for TCS

In any clean handshake sequence, the left and right glove sides of each handshake are distinct (single handshakes use opposite sides of the same glove; double handshakes use sides of distinct gloves).

theorem handshake_sides_ne_of_clean {V Γ : Type*} [DecidableEq Γ]
    (seq : List (Handshake V Γ)) (t : Γ × Bool → Set V) (hc : CleanHandshakeSeq seq t)
    {h : Handshake V Γ} (hm : h ∈ seq) :
    handshake_left_side h ≠ handshake_right_side h
handshake_touchers_subset_seq_touchersIn LeanCombinatorics for TCS

If a handshake $h$ is in the sequence seq, the vertices directly touching side $s$ during $h$ are contained in the sequence touchers of $s$.

theorem handshake_touchers_subset_seq_touchers {V Γ : Type*} [DecidableEq Γ]
    (seq : List (Handshake V Γ)) (h : Handshake V Γ) (s : Γ × Bool)
    (hm : h ∈ seq) : handshake_touchers h s ⊆ seq_touchers seq s
hankel_fourier_eq_zeroIn LeanCombinatorics for TCS

The two-dimensional cyclic Fourier transform of a Hankel matrix (x, y) ↦ φ(x + y) is diagonal: every entry with m ≠ n vanishes.

theorem hankel_fourier_eq_zero {N : ℕ} [NeZero N] (φ : ZMod N → ℂ) {m n : ZMod N} (hmn : m ≠ n) :
    cyclic_matrix_fourier N (Matrix.of fun x y => φ (x + y)) m n = 0
harborth_bound_rank_three_mul_twoIn LeanCombinatorics for TCS

If Harborth's bound holds for (ZMod k)^3, it holds for (ZMod (2k))^3 by 2-adic fiber pairing.

theorem harborth_bound_rank_three_mul_two (k : ℕ) (hk : 1 ≤ k) (h : ∀ (S : Multiset (Fin 3 → ZMod k)), S.card = 8 * k - 7 → ∃ T : Multiset (Fin 3 → ZMod k), T ≤ S ∧ T.card = k ∧ T.sum = 0) (S : Multiset (Fin 3 → ZMod (2 * k))) (hS : S.card = 8 * (2 * k) - 7) : ∃ T : Multiset (Fin 3 → ZMod (2 * k)), T ≤ S ∧ T.card = 2 * k ∧ T.sum = 0
harborth_bound_rank_three_two_mul_oddIn LeanCombinatorics for TCS

For every odd integer m ≥ 3, every multiset of 8(2m) - 7 elements in (ZMod (2m))^3 contains a submultiset of size 2m whose sum is 0.

theorem harborth_bound_rank_three_two_mul_odd (m : ℕ) (hm : 3 ≤ m) (hodd : Odd m) (S : Multiset (Fin 3 → ZMod (2 * m))) (hS : S.card = 8 * (2 * m) - 7) : ∃ T : Multiset (Fin 3 → ZMod (2 * m)), T ≤ S ∧ T.card = 2 * m ∧ T.sum = 0
harborth_double_hom_halfIn LeanCombinatorics for TCS

The halving map is a right inverse of the doubling map on even residues: if w is 0 mod 2 then doubling ⌊w.val/2⌋ gives back w.

theorem harborth_double_hom_half (k : ℕ) (hk : 1 ≤ k) (w : ZMod (2 * k)) (h : ZMod.cast w = (0 : ZMod 2)) : harborth_double_hom k (harborth_half k w) = w
harborth_double_hom_nat_castIn LeanCombinatorics for TCS

The doubling map sends the class of a natural number n to the class of 2n.

theorem harborth_double_hom_nat_cast (k n : ℕ) : harborth_double_hom k (n : ZMod k) = (2 * n : ℕ)
harborth_pair_key_specIn LeanCombinatorics for TCS

If the two members of a pair have the same parity, doubling the pair's key gives the sum of the two members.

theorem harborth_pair_key_spec (k : ℕ) (hk : 1 ≤ k) (p : (Fin 3 → ZMod (2 * k)) × (Fin 3 → ZMod (2 * k))) (h : harborth_parity k p.1 = harborth_parity k p.2) : harborth_double_pi k (harborth_pair_key k p) = p.1 + p.2
has_three_colored_anti_ramsey_monoIn LeanCombinatorics for TCS

Induced-subgraph monotonicity: if K_N admits a 3-edge-colouring whose every n-subset sees all three colours, then so does every induced subgraph K_M with n ≤ M ≤ N.

theorem has_three_colored_anti_ramsey_mono (N M n : ℕ) (h : has_three_colored_anti_ramsey N n) (hn : n ≤ M) (hMN : M ≤ N) : has_three_colored_anti_ramsey M n
has_three_colored_anti_ramsey_of_countingIn LeanCombinatorics for TCS

First-moment (union-bound) reduction: if 3 · C(N,n) · 2^(C(n,2)) < 3^(C(n,2)), then there is a 3-edge-colouring of K_N in which every n-subset sees all three colours.

theorem has_three_colored_anti_ramsey_of_counting (N n : ℕ) (h : 3 * N.choose n * 2 ^ (n.choose 2) < 3 ^ (n.choose 2)) : has_three_colored_anti_ramsey N n
heap_block_base_last_injectiveIn LeanCombinatorics for TCS

For every natural number k and block indices q₁, q₂ : Fin (k + 2), if the block base permutations heapBlockBase (k + 1) q₁.val and heapBlockBase (k + 1) q₂.val map Fin.last (k + 1) to the same element, then q₁ = q₂.

theorem heap_block_base_last_injective (k : ℕ) (q₁ q₂ : Fin (k + 2))
    (h : heapBlockBase (k + 1) q₁.val (Fin.last (k + 1)) = heapBlockBase (k + 1) q₂.val (Fin.last (k + 1))) :
    q₁ = q₂
heap_final_perm_cycle_dichotomyIn LeanCombinatorics for TCS

Let m ≥ 2. The permutation induced by the final arrangement of the order-m Heap algorithm satisfies a strict dichotomy: if m is even and 4 ≤ m, it is a single m-cycle whose order is m; if m is odd and 3 ≤ m, it is the transposition swapping 0 and m - 1.

theorem heap_final_perm_cycle_dichotomy (m : ℕ) (hm : 2 ≤ m) :
    (Even m ∧ 4 ≤ m → (heap_final_perm m).IsCycle ∧ orderOf (heap_final_perm m) = m) ∧
    (Odd m ∧ 3 ≤ m → heap_final_perm m = Equiv.swap (⟨0, by omega⟩ : Fin m) ⟨m - 1, by omega⟩)
heap_final_perm_even_cycleIn LeanCombinatorics for TCS

For any even m ≥ 4, the final permutation of the order-m Heap algorithm is a single m-cycle whose m-th power is the identity.

theorem heap_final_perm_even_cycle (m : ℕ) (hm_even : Even m) (hm4 : 4 ≤ m) :
    (heap_final_perm m).IsCycle ∧ (heap_final_perm m) ^ m = 1
heap_final_perm_oddIn LeanCombinatorics for TCS

For any odd m ≥ 3, the final permutation of the order-m Heap algorithm is the transposition swapping 0 and m - 1.

theorem heap_final_perm_odd (m : ℕ) (hm_odd : Odd m) (hm3 : 3 ≤ m) :
    heap_final_perm m = Equiv.swap (⟨0, by omega⟩ : Fin m) ⟨m - 1, by omega⟩
heap_unrank_bijectiveIn LeanCombinatorics for TCS

For every integer n ≥ 2, the Heap unranking map heapUnrank n from HeapCode n to Equiv.Perm (Fin n) is bijective.

theorem heap_unrank_bijective (n : ℕ) (hn : 2 ≤ n) :
    Function.Bijective (heapUnrank n)
heap_unrank_bijective_and_index_consistentIn LeanCombinatorics for TCS

For every integer n ≥ 2, the Heap permutation unranking map heapUnrank n is a bijection from the factorial-base code space HeapCode n to the permutation space Equiv.Perm (Fin n), and for every code vector d : HeapCode n, heapUnrank n d equals the permutation heapPermSeq n (heapCodeIndex d) in the Heap output sequence.

theorem heap_unrank_bijective_and_index_consistent (n : ℕ) (hn : 2 ≤ n) :
    Function.Bijective (heapUnrank n) ∧
    ∀ d : HeapCode n, heapUnrank n d = heapPermSeq n (heapCodeIndex d)
heap_unrank_eq_heapPermSeqIn LeanCombinatorics for TCS

For every natural number n and every code vector d : HeapCode n, heapUnrank n d equals heapPermSeq n (heapCodeIndex d).

theorem heap_unrank_eq_heapPermSeq (n : ℕ) :
    ∀ d : HeapCode n, heapUnrank n d = heapPermSeq n (heapCodeIndex d)
helical_affine_independent_fourIn LeanCombinatorics for TCS

For every natural number n, every 4-element subset s of helical_config n in EuclideanSpace ℝ (Fin 3) is affine independent.

theorem helical_affine_independent_four (n : ℕ) (s : Finset (EuclideanSpace ℝ (Fin 3)))
    (hs : s ⊆ helical_config n) (hcard : s.card = 4) :
    AffineIndependent ℝ ((↑) : s → EuclideanSpace ℝ (Fin 3))
helical_arc_general_positionIn LeanCombinatorics for TCS

Let h ≠ 0, and let (a, b) be an open interval of length less than π. Among the points (cos t, sin t, ht) for t ∈ (a, b), no four are coplanar and no five are cospherical.

theorem helical_arc_general_position (h : ℝ) (hh : h ≠ 0) (a b : ℝ) (hab : b - a < Real.pi)
    (s : Finset (EuclideanSpace ℝ (Fin 3))) (hs : (s : Set (EuclideanSpace ℝ (Fin 3))) ⊆ helical_curve h '' Set.Ioo a b) :
    (s.card = 4 → ¬ Coplanar ℝ (s : Set (EuclideanSpace ℝ (Fin 3)))) ∧
    (s.card = 5 → ¬ EuclideanGeometry.Cospherical (s : Set (EuclideanSpace ℝ (Fin 3))))
helical_arc_not_coplanar_fourIn LeanCombinatorics for TCS

For any nonzero h ∈ ℝ and open interval (a, b) of length less than π, no four points on the helical arc (cos t, sin t, ht) for t ∈ (a, b) are coplanar.

theorem helical_arc_not_coplanar_four (h : ℝ) (hh : h ≠ 0) (a b : ℝ) (hab : b - a < Real.pi)
    (s : Finset (EuclideanSpace ℝ (Fin 3))) (hs : (s : Set (EuclideanSpace ℝ (Fin 3))) ⊆ helical_curve h '' Set.Ioo a b)
    (hcard : s.card = 4) : ¬ Coplanar ℝ (s : Set (EuclideanSpace ℝ (Fin 3)))
helical_arc_not_cospherical_fiveIn LeanCombinatorics for TCS

For any nonzero h ∈ ℝ and open interval (a, b) of length less than π, no five points on the helical arc (cos t, sin t, ht) for t ∈ (a, b) are cospherical.

theorem helical_arc_not_cospherical_five (h : ℝ) (hh : h ≠ 0) (a b : ℝ) (hab : b - a < Real.pi)
    (s : Finset (EuclideanSpace ℝ (Fin 3))) (hs : (s : Set (EuclideanSpace ℝ (Fin 3))) ⊆ helical_curve h '' Set.Ioo a b)
    (hcard : s.card = 5) : ¬ EuclideanGeometry.Cospherical (s : Set (EuclideanSpace ℝ (Fin 3)))
helical_crescent_configurationIn LeanCombinatorics for TCS

For every natural number n with 3 ≤ n, the helical configuration helical_config n satisfies is_crescent_configuration (helical_config n), and the minimum crescent dimension crescent_min_dimension n is at most 3.

theorem helical_crescent_configuration (n : ℕ) (hn : 3 ≤ n) :
    is_crescent_configuration (helical_config n) ∧ crescent_min_dimension n ≤ 3
helical_in_general_positionIn LeanCombinatorics for TCS

For every natural number n with 3 ≤ n, the configuration helical_config n in EuclideanSpace ℝ (Fin 3) satisfies in_general_position 3.

theorem helical_in_general_position (n : ℕ) (hn : 3 ≤ n) :
    in_general_position 3 (helical_config n)
helical_not_cospherical_fiveIn LeanCombinatorics for TCS

For every natural number n, no 5-element subset s of helical_config n in EuclideanSpace ℝ (Fin 3) lies on a metric sphere in EuclideanSpace ℝ (Fin 3).

theorem helical_not_cospherical_five (n : ℕ) (s : Finset (EuclideanSpace ℝ (Fin 3)))
    (hs : s ⊆ helical_config n) (hcard : s.card = 5) :
    ¬∃ (c : EuclideanSpace ℝ (Fin 3)) (r : ℝ), ∀ x ∈ s, dist x c = r
high_rep_set_nonemptyIn LeanCombinatorics for TCS

If |A|(|A| - 1) > 2|G| then some group element has more than two ordered restricted pair representations from A, i.e. the high-representation set P(A) is nonempty.

theorem high_rep_set_nonempty {G : Type*} [AddCommGroup G] [Fintype G] [DecidableEq G] {A : Finset G} (h : 2 * Fintype.card G < A.card * (A.card - 1)) : (highRepSet A).Nonempty
hypercube_coil_c4_identityIn LeanCombinatorics for TCS

For any maximum coil S in the hypercube Q_n with 13 ≤ n, the following equality holds in the integers ℤ: (n^2 - 3*n + 3 : ℤ) * S.card - ∑ m ∈ Finset.range n, (m.choose 2 : ℤ) * hypercube_degree_count n S m = (n.choose 2 : ℤ) * (2 : ℤ)^(n - 1) - 2 * (hypercube_disjoint_squares_count n S : ℤ).

open scoped Classical BigOperators in
theorem hypercube_coil_c4_identity (n : ℕ) (hn : 13 ≤ n) (S : Finset (Fin n → Bool))
    (hS : is_max_hypercube_coil n S) :
    ((n ^ 2 - 3 * n + 3 : ℤ) * S.card -
      ∑ m ∈ Finset.range n, (m.choose 2 : ℤ) * (hypercube_degree_count n S m : ℤ)) =
    (n.choose 2 : ℤ) * (2 : ℤ) ^ (n - 1) - 2 * (hypercube_disjoint_squares_count n S : ℤ)
hypercube_degree_count_sum_rangeIn LeanCombinatorics for TCS

For any maximum coil S in Q_n with 13 ≤ n, the sum of degree counts y_m over m ∈ {0, ..., n-1} is 2^n - |S|, because the total number of non-coil vertices is 2^n - |S| and y_n = 0.

open scoped Classical BigOperators in
theorem hypercube_degree_count_sum_range (n : ℕ) (hn : 13 ≤ n)
    (S : Finset (Fin n → Bool)) (hS : is_max_hypercube_coil n S) :
    ∑ m ∈ Finset.range n, (hypercube_degree_count n S m : ℤ) = (2 : ℤ) ^ n - (S.card : ℤ)
hypercube_degree_count_weighted_sum_rangeIn LeanCombinatorics for TCS

For any maximum coil S in Q_n with 13 ≤ n, the weighted sum of degree counts m * y_m over m ∈ {0, ..., n-1} is (n - 2)|S|, counting edges between the coil and its complement.

open scoped Classical BigOperators in
theorem hypercube_degree_count_weighted_sum_range (n : ℕ) (hn : 13 ≤ n)
    (S : Finset (Fin n → Bool)) (hS : is_max_hypercube_coil n S) :
    ∑ m ∈ Finset.range n, (m : ℤ) * (hypercube_degree_count n S m : ℤ) = (n - 2 : ℤ) * (S.card : ℤ)
hypercube_disjoint_squares_eliminated_identityIn LeanCombinatorics for TCS

For a maximum coil S in Q_n (n ≥ 13), combining the C4 square counts across families F1 through F5 yields 4 * F5 = ∑_{m=0}^{n-1} binom(n-m, 2) y_m - binom(n-2, 2) |S| + ∑_{m=0}^{n-1} binom(m, 2) y_m - |S|.

open scoped Classical BigOperators in
theorem hypercube_disjoint_squares_eliminated_identity (n : ℕ) (hn : 13 ≤ n)
    (S : Finset (Fin n → Bool)) (hS : is_max_hypercube_coil n S) :
    4 * (hypercube_disjoint_squares_count n S : ℤ) =
      ∑ m ∈ Finset.range n, ((n - m).choose 2 : ℤ) * (hypercube_degree_count n S m : ℤ) -
      ((n - 2).choose 2 : ℤ) * (S.card : ℤ) +
      ∑ m ∈ Finset.range n, (m.choose 2 : ℤ) * (hypercube_degree_count n S m : ℤ) -
      (S.card : ℤ)
hypercube_max_coil_c4_strictIn LeanCombinatorics for TCS

Let n ≥ 13 and let S be a maximum-length coil in the hypercube Q_n with degree counts y_m. If y_0 > 0, then in ℤ, (n^2 - 3*n + 3 : ℤ) * S.card - ∑ m ∈ Finset.range n, (m.choose 2 : ℤ) * y_m < (n.choose 2 : ℤ) * (2 : ℤ)^(n - 1).

open scoped Classical BigOperators in
theorem hypercube_max_coil_c4_strict (n : ℕ) (hn : 13 ≤ n) (S : Finset (Fin n → Bool))
    (hS : is_max_hypercube_coil n S) (hy0 : 0 < hypercube_degree_count n S 0) :
    ((n ^ 2 - 3 * n + 3 : ℤ) * S.card -
      ∑ m ∈ Finset.range n, (m.choose 2 : ℤ) * (hypercube_degree_count n S m : ℤ)) <
    (n.choose 2 : ℤ) * (2 : ℤ) ^ (n - 1)
hypergraph_card_le_quill_edges_add_base_edgesIn LeanCombinatorics for TCS

In any finite hypergraph S, the number of edges is at most the number of quill-bearing edges plus the number of base edges (edges containing only vertices of degree at least 2).

theorem hypergraph_card_le_quill_edges_add_base_edges
    {α : Type*} [DecidableEq α] (S : Finset (Finset α)) :
    S.card ≤
      (S.filter (fun s => ∃ x ∈ s, (S.filter (x ∈ ·)).card = 1)).card +
      (S.filter (fun s => ∀ x ∈ s, 2 ≤ (S.filter (x ∈ ·)).card)).card
hypergraph_free_of_vertex_card_ltIn LeanCombinatorics for TCS

If the forbidden hypergraph F has more vertices than the n-element ground set Fin n, then every hypergraph H on Fin n is F-free, since there is no embedding of F's vertex set into Fin n.

theorem hypergraph_free_of_vertex_card_lt {W : Type*} [Fintype W] {n : ℕ} (H : Finset (Finset (Fin n))) (F : Finset (Finset W)) (h : n < Fintype.card W) : is_hypergraph_free H F
hypergraph_quill_edges_le_quillsIn LeanCombinatorics for TCS

In any finite hypergraph S, the number of edges containing at least one vertex of degree 1 (quill) is at most the total number of vertices of degree 1 in the hypergraph.

theorem hypergraph_quill_edges_le_quills {α : Type*} [DecidableEq α] (S : Finset (Finset α)) :
    (S.filter (fun s => ∃ x ∈ s, (S.filter (x ∈ ·)).card = 1)).card ≤
    ((S.biUnion id).filter (fun x => (S.filter (x ∈ ·)).card = 1)).card
infinite_depth_criterionIn LeanCombinatorics for TCS

Let B be a finite nonempty set of nonempty standard permutations of 1, ..., |β| (so B : Set (List ℕ) satisfies B.Finite, B.Nonempty, and each β ∈ B satisfies β.Perm (List.range' 1 β.length) with β ≠ []), and let ρ be a standard permutation of 1, ..., n (so ρ.Perm (List.range' 1 n) with n = ρ.length) that avoids every pattern in B. Then the following conditions are equivalent (asserted as (i) ↔ (ii) and (ii) ↔ (iii)): (i) for every k : ℕ, there exists a standard permutation σ of 1, ..., n + k (with σ.Perm (List.range' 1 σ.length) and σ.length = n + k) avoiding every pattern in B such that σ.filter (· ≤ n) = ρ; (ii) there exists a gap g ≤ n such that inserting the increasing block of new maxima [n + 1, ..., n + m] or the decreasing block [n + m, ..., n + 1] into gap g of ρ yields a standard permutation of 1, ..., n + m avoiding every pattern in B, where m = ||B|| = sSup (List.length '' B); (iii) there exists a standard permutation σ of 1, ..., σ.length (with σ.Perm (List.range' 1 σ.length)) avoiding every pattern in B such that σ.filter (· ≤ n) = ρ and σ.length ≥ n + (m - 1)^2 * (n + 1) + 1.

theorem infinite_depth_criterion
    (B : Set (List ℕ)) (hB_fin : B.Finite) (hB_ne : B.Nonempty)
    (hB_perm : ∀ β ∈ B, β.Perm (List.range' 1 β.length) ∧ β ≠ [])
    (ρ : List ℕ) (hρ : ρ.Perm (List.range' 1 ρ.length))
    (hρ_av : ∀ β ∈ B, ¬ ∃ s : List ℕ, s.Sublist ρ ∧ ∃ h : s.length = β.length,
      ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast h] < β[j.cast h]) :
    let m := sSup (List.length '' B)
    let n := ρ.length
    ((∀ k : ℕ, ∃ σ : List ℕ,
        σ.Perm (List.range' 1 σ.length) ∧
        (∀ β ∈ B, ¬ ∃ s : List ℕ, s.Sublist σ ∧ ∃ h : s.length = β.length,
          ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast h] < β[j.cast h]) ∧
        σ.filter (· ≤ n) = ρ ∧ σ.length = n + k) ↔
      (∃ g ≤ n,
        ((ρ.take g ++ List.range' (n + 1) m ++ ρ.drop g).Perm (List.range' 1 (n + m)) ∧
         ∀ β ∈ B, ¬ ∃ s : List ℕ,
           s.Sublist (ρ.take g ++ List.range' (n + 1) m ++ ρ.drop g) ∧
           ∃ h : s.length = β.length,
           ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast h] < β[j.cast h]) ∨
        ((ρ.take g ++ (List.range' (n + 1) m).reverse ++ ρ.drop g).Perm (List.range' 1 (n + m)) ∧
         ∀ β ∈ B, ¬ ∃ s : List ℕ,
           s.Sublist (ρ.take g ++ (List.range' (n + 1) m).reverse ++ ρ.drop g) ∧
           ∃ h : s.length = β.length,
           ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast h] < β[j.cast h]))) ∧
    ((∃ g ≤ n,
        ((ρ.take g ++ List.range' (n + 1) m ++ ρ.drop g).Perm (List.range' 1 (n + m)) ∧
         ∀ β ∈ B, ¬ ∃ s : List ℕ,
           s.Sublist (ρ.take g ++ List.range' (n + 1) m ++ ρ.drop g) ∧
           ∃ h : s.length = β.length,
           ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast h] < β[j.cast h]) ∨
        ((ρ.take g ++ (List.range' (n + 1) m).reverse ++ ρ.drop g).Perm (List.range' 1 (n + m)) ∧
         ∀ β ∈ B, ¬ ∃ s : List ℕ,
           s.Sublist (ρ.take g ++ (List.range' (n + 1) m).reverse ++ ρ.drop g) ∧
           ∃ h : s.length = β.length,
           ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast h] < β[j.cast h])) ↔
      (∃ σ : List ℕ,
        σ.Perm (List.range' 1 σ.length) ∧
        (∀ β ∈ B, ¬ ∃ s : List ℕ, s.Sublist σ ∧ ∃ h : s.length = β.length,
          ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast h] < β[j.cast h]) ∧
        σ.filter (· ≤ n) = ρ ∧
        σ.length ≥ n + (m - 1) ^ 2 * (n + 1) + 1))
inner_product_norm_sq_add_smulIn LeanCombinatorics for TCS

In any real inner product space V, for any vectors x₀ and v, and any real scalar k, the squared norm of x₀ + k • v is ||x₀ + k • v||^2 = ||v||^2 * k^2 + 2 * ⟪x₀, v⟫ * k + ||x₀||^2.

theorem inner_product_norm_sq_add_smul {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V]
    (x₀ v : V) (k : ℝ) :
    ‖x₀ + k • v‖ ^ 2 = ‖v‖ ^ 2 * k ^ 2 + 2 * inner ℝ x₀ v * k + ‖x₀‖ ^ 2
inner_product_norm_sq_apIn LeanCombinatorics for TCS

Let V be a real inner product space, let M ≥ 2, and let x : Fin M → V form an arithmetic progression with consecutive points at distance √U (that is, there exists v ∈ V with ||v||^2 = U such that x k = x 0 + k • v for all k ∈ Fin M). Then there exist real numbers β and γ such that ||x k||^2 = U * k^2 + β * k + γ for all k ∈ Fin M.

theorem inner_product_norm_sq_ap {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V]
    {M : ℕ} (hM : 2 ≤ M) (x : Fin M → V) (U : ℝ)
    (h_ap : ∃ v : V, ‖v‖ ^ 2 = U ∧ ∀ k : Fin M, x k = x ⟨0, by omega⟩ + (k : ℝ) • v) :
    ∃ β γ : ℝ, ∀ k : Fin M, ‖x k‖ ^ 2 = U * (k : ℝ) ^ 2 + β * (k : ℝ) + γ
inner_product_norm_sq_three_apIn LeanCombinatorics for TCS

In any real inner product space V, three consecutive points x, y, z in an arithmetic progression with common difference vector v satisfying ||v||^2 = R (so y = x + v and z = x + 2 • v) satisfy ||x||^2 - 2 * ||y||^2 + ||z||^2 = 2 * R.

theorem inner_product_norm_sq_three_ap {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V]
    (x y z v : V) (R : ℝ) (hv : ‖v‖ ^ 2 = R)
    (hy : y = x + v) (hz : z = x + (2 : ℝ) • v) :
    ‖x‖ ^ 2 - 2 * ‖y‖ ^ 2 + ‖z‖ ^ 2 = 2 * R
inner_sub_of_norm_sub_eqIn LeanCombinatorics for TCS

In a real inner product space, if a vector $y$ satisfies $\|y - x\| = \|y - x'\|$, then $2\langle y, x' - x\rangle = \|x'\|^2 - \|x\|^2$.

theorem inner_sub_of_norm_sub_eq {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V]
    (y x x' : V) (h : ‖y - x‖ = ‖y - x'‖) :
    2 * @inner ℝ V _ y (x' - x) = ‖x'‖ ^ 2 - ‖x‖ ^ 2
inner_sub_sub_eq_zero_of_equidistantIn LeanCombinatorics for TCS

In a real inner product space, if two vectors $y$ and $y'$ each satisfy $\|y - x\| = \|y - x'\|$ and $\|y' - x\| = \|y' - x'\|$, then $\langle y - y', x - x'\rangle = 0$.

theorem inner_sub_sub_eq_zero_of_equidistant {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V]
    (y y' x x' : V) (hy : ‖y - x‖ = ‖y - x'‖) (hy' : ‖y' - x‖ = ‖y' - x'‖) :
    @inner ℝ V _ (y - y') (x - x') = 0
int_crescent_config_is_crescentIn LeanCombinatorics for TCS

For every integer n ≥ 3, the embedded configuration of int_crescent_config n in EuclideanSpace ℝ (Fin 3) under int_to_euclidean 3 is a crescent configuration.

theorem int_crescent_config_is_crescent (n : ℕ) (hn : 3 ≤ n) :
    is_crescent_configuration ((int_crescent_config n).image (int_to_euclidean 3))
int_crescent_distancesIn LeanCombinatorics for TCS

For every integer n ≥ 3, the embedded configuration of int_crescent_config n in EuclideanSpace ℝ (Fin 3) under int_to_euclidean 3 has n - 1 distinct pairwise distances with multiplicities 1, ..., n - 1.

theorem int_crescent_distances (n : ℕ) (hn : 3 ≤ n) :
    ∃ D : Finset ℝ,
      D.card = ((int_crescent_config n).image (int_to_euclidean 3)).card - 1 ∧
      (∀ u ∈ ((int_crescent_config n).image (int_to_euclidean 3)).powersetCard 2,
        ∃ r ∈ D, ∃ x ∈ u, ∃ y ∈ u, x ≠ y ∧ dist x y = r) ∧
      D.image (distance_multiplicity ((int_crescent_config n).image (int_to_euclidean 3))) =
        Finset.Icc 1 (((int_crescent_config n).image (int_to_euclidean 3)).card - 1)
int_crescent_in_general_positionIn LeanCombinatorics for TCS

For every integer n ≥ 3, the embedded configuration of int_crescent_config n in EuclideanSpace ℝ (Fin 3) under int_to_euclidean 3 is in general position.

theorem int_crescent_in_general_position (n : ℕ) (hn : 3 ≤ n) :
    in_general_position 3 ((int_crescent_config n).image (int_to_euclidean 3))
int_sign_sub_pm_one_of_abs_ge_twoIn LeanCombinatorics for TCS

If u is an integer with |u| ≥ 2 and s ∈ {-1, 1}, then the sign of u - s equals the sign of u.

theorem int_sign_sub_pm_one_of_abs_ge_two (u : ℤ) (s : ℤ) (hu : 2 ≤ |u|) (hs : s = 1 ∨ s = -1) :
    Int.sign (u - s) = Int.sign u
integer_crescent_configurationIn LeanCombinatorics for TCS

For every integer n ≥ 3, there exists a finite subset S of Fin 3 → ℤ of cardinality n such that the embedded image of S in EuclideanSpace ℝ (Fin 3) under int_to_euclidean 3 is a crescent configuration and every coordinate of every point in S has absolute value at most 2 * (n - 1) * (4 * n^2 + 1)^(n - 1).

theorem integer_crescent_configuration (n : ℕ) (hn : 3 ≤ n) :
    ∃ S : Finset (Fin 3 → ℤ),
      S.card = n ∧
      is_crescent_configuration (S.image (int_to_euclidean 3)) ∧
      ∀ p ∈ S, ∀ i : Fin 3, |p i| ≤ 2 * ((n : ℤ) - 1) * (4 * (n : ℤ)^2 + 1) ^ (n - 1)
isSunflower_kernel_empty_of_disjoint_membersIn LeanCombinatorics for TCS

If a finite family F of finite sets is a sunflower with kernel C and contains two distinct disjoint members, then C is empty.

theorem isSunflower_kernel_empty_of_disjoint_members {α : Type*} [DecidableEq α]
    {F : Finset (Finset α)} {C : Finset α} (hF : IsSunflower F C)
    {A B : Finset α} (hA : A ∈ F) (hB : B ∈ F) (hne : A ≠ B) (hdisj : Disjoint A B) :
    C = ∅
is_additive_basis_iff_subset_sums_eq_univIn LeanCombinatorics for TCS

A multiset S over a finite additive commutative group is an additive basis if and only if the finset of all nonempty submultiset sums equals the universal finset.

theorem is_additive_basis_iff_subset_sums_eq_univ {G : Type*} [AddCommGroup G] [DecidableEq G] [Fintype G] (S : Multiset G) : IsAdditiveBasis S ↔ ((S.powerset.filter (· ≠ 0)).map Multiset.sum).toFinset = Finset.univ
is_additive_basis_of_coverage_and_zero_sumIn LeanCombinatorics for TCS

If every element of a finite additive commutative group is the sum of some submultiset of S (allowing the empty sum), and S also has a nonempty zero-sum submultiset, then S is an additive basis: every group element is the sum of a nonempty submultiset of S.

theorem is_additive_basis_of_coverage_and_zero_sum {G : Type*} [AddCommGroup G] [DecidableEq G] [Fintype G] (S : Multiset G) (hcover : multiset_sum_finset S = Finset.univ) (hzero : ∃ T : Multiset G, T ≤ S ∧ T ≠ 0 ∧ T.sum = 0) : IsAdditiveBasis S
is_iterated_tripartite_insert_of_new_vertexIn LeanCombinatorics for TCS

If a hypergraph F is iterated tripartite and e is a 3-element set of vertices at least one of which is not incident to any edge of F, then F together with e is again iterated tripartite.

theorem is_iterated_tripartite_insert_of_new_vertex {V : Type*} [DecidableEq V]
    (F : Finset (Finset V)) {e : Finset V} (hF : is_iterated_tripartite F)
    (hcard : e.card = 3) (hnew : ∃ v ∈ e, v ∉ F.biUnion id) :
    is_iterated_tripartite (insert e F)
is_perfect_set_punctured_zpowersIn LeanCombinatorics for TCS

Let p be a prime and σ be a permutation of Fin p of order p. The punctured cyclic subgroup generated by σ (removing the identity) is a perfect set of order p.

open Equiv Perm Subgroup Classical in
theorem is_perfect_set_punctured_zpowers {p : ℕ} (hp : p.Prime) {σ : Perm (Fin p)}
    (hσ : orderOf σ = p) :
    is_perfect_set p ((zpowers σ : Set (Perm (Fin p))).toFinset \ {1})
is_regular_sequence_not_mem_zeroIn LeanCombinatorics for TCS

A regular sequence in a nontrivial additive commutative group cannot contain the zero element.

theorem is_regular_sequence_not_mem_zero {G : Type*} [AddCommGroup G] [Nontrivial G] {S : Multiset G} (h : IsRegularSequence S) : 0 ∉ S
is_spiny_of_forall_not_subset_erase_biUnionIn LeanCombinatorics for TCS

Let α have decidable equality. If S is a finite collection of finite subsets of α such that for every A ∈ S, A is not a subset of (S.erase A).biUnion id, then S is spiny (IsSpiny S).

theorem is_spiny_of_forall_not_subset_erase_biUnion {α : Type*} [DecidableEq α]
    (S : Finset (Finset α))
    (h : ∀ A ∈ S, ¬ A ⊆ (S.erase A).biUnion id) :
    IsSpiny S
is_subcube_of_avg_pairwise_hamming_dist_eq_density_one_sixteenthIn LeanCombinatorics for TCS

Let n ≥ 4. For any subset F ⊆ (Fin n → Bool) of cardinality 2^(n-4), if avg_pairwise_hamming_dist F = (n - 4) / 2, then F is an (n - 4)-dimensional subcube.

theorem is_subcube_of_avg_pairwise_hamming_dist_eq_density_one_sixteenth
    (n : ℕ) (hn : 4 ≤ n) (F : Finset (Fin n → Bool)) (hF : F.card = 2 ^ (n - 4))
    (heq : avg_pairwise_hamming_dist F = (n - 4 : ℝ) / 2) :
    is_subcube (n - 4) F
is_subcube_of_avg_pairwise_hamming_dist_eq_dyadic_shortIn LeanCombinatorics for TCS

Let $F \subseteq (\mathrm{Fin}\ n \to \mathrm{Bool})$ with $|F| = 2^m$, $m \le n$, $n - m \le 4$. If $\mathrm{avg}(F) = m/2$ then $F$ is an $m$-dimensional subcube.

theorem is_subcube_of_avg_pairwise_hamming_dist_eq_dyadic_short
    (n m : ℕ) (hm : m ≤ n) (hclose : n - m ≤ 4) (F : Finset (Fin n → Bool))
    (hcard : F.card = 2 ^ m) (havg : avg_pairwise_hamming_dist F = (m : ℝ) / 2) :
    is_subcube m F
is_weighted_partial_permutation_of_off_diagonal_zeroIn LeanCombinatorics for TCS

A square complex matrix all of whose off-diagonal entries vanish is a weighted partial permutation matrix.

theorem is_weighted_partial_permutation_of_off_diagonal_zero {n : Type*} (M : Matrix n n ℂ)
    (h : ∀ i j, i ≠ j → M i j = 0) : is_weighted_partial_permutation M
isosceles_set_partition_of_three_distancesIn LeanCombinatorics for TCS

Let S be a finite isosceles set in a metric space in which at least three distinct nonzero distances occur. Then there is a partition S = X ∪ Y with X and Y disjoint, |X| ≥ 2, and |Y| ≥ 1 such that every y ∈ Y is equidistant from all points of X.

theorem isosceles_set_partition_of_three_distances {M : Type*} [MetricSpace M] [DecidableEq M] (S : Finset M) (h_iso : ∀ x ∈ S, ∀ y ∈ S, ∀ z ∈ S, dist x y = dist y z ∨ dist y z = dist x z ∨ dist x z = dist x y) (h_dist : 3 ≤ (S.offDiag.image (fun p => dist p.1 p.2)).card) : ∃ X Y : Finset M, S = X ∪ Y ∧ Disjoint X Y ∧ 2 ≤ X.card ∧ 1 ≤ Y.card ∧ ∀ y ∈ Y, ∃ r : ℝ, ∀ x ∈ X, dist y x = r
k22_code_dense_anchor_of_bounded_multiple_anchorIn LeanCombinatorics for TCS

Reduction step. Fix a multiplier bound c₀ ≥ 1 and ε in (0,1) with 2(1-ε) ≤ c₀·ε. If for every c in [1, c₀] and all sufficiently large r the order c·2^r admits a K_{2,2}-code of density at least 1/(c·2^r), then the anchor statement holds for this ε: every large enough n has an anchor order N ≥ n with N ≤ n/(1-ε) and a K_{2,2}-code of density at least 1/N.

theorem k22_code_dense_anchor_of_bounded_multiple_anchor
    (c₀ : ℕ) (hc₀ : 1 ≤ c₀) (ε : ℝ) (hε : 0 < ε) (hε1 : ε < 1)
    (hratio : 2 * (1 - ε) ≤ (c₀ : ℝ) * ε)
    (H : ∀ c : ℕ, 1 ≤ c → c ≤ c₀ → ∀ᶠ r : ℕ in Filter.atTop,
      ∃ C : Set (SimpleGraph (Fin (c * 2 ^ r))),
        is_kst_code 2 2 (c * 2 ^ r) C ∧
        1 / ((c * 2 ^ r : ℕ) : ℝ) ≤
          (C.ncard : ℝ) / (2 ^ ((c * 2 ^ r).choose 2) : ℝ)) :
    ∃ n₀ : ℕ, ∀ n ≥ n₀, ∃ N ≥ n,
      (N : ℝ) ≤ (n : ℝ) / (1 - ε) ∧
      ∃ C : Set (SimpleGraph (Fin N)),
        is_kst_code 2 2 N C ∧
        1 / (N : ℝ) ≤ (C.ncard : ℝ) / (2 ^ (N.choose 2) : ℝ)
k22_code_dense_anchor_of_fixed_multiple_anchorIn LeanCombinatorics for TCS

If for every positive integer c and all sufficiently large r the order c·2^r admits a K_{2,2}-code of density at least 1/(c·2^r), then the anchor statement holds: for every ε in (0,1) and all large enough n there is an anchor order N ≥ n with N ≤ n/(1-ε) and a K_{2,2}-code of density at least 1/N.

theorem k22_code_dense_anchor_of_fixed_multiple_anchor
    (H : ∀ c : ℕ, 1 ≤ c → ∀ᶠ r : ℕ in Filter.atTop,
      ∃ C : Set (SimpleGraph (Fin (c * 2 ^ r))),
        is_kst_code 2 2 (c * 2 ^ r) C ∧
        1 / ((c * 2 ^ r : ℕ) : ℝ) ≤
          (C.ncard : ℝ) / (2 ^ ((c * 2 ^ r).choose 2) : ℝ))
    (ε : ℝ) (hε : 0 < ε) (hε1 : ε < 1) :
    ∃ n₀ : ℕ, ∀ n ≥ n₀, ∃ N ≥ n,
      (N : ℝ) ≤ (n : ℝ) / (1 - ε) ∧
      ∃ C : Set (SimpleGraph (Fin N)),
        is_kst_code 2 2 N C ∧
        1 / (N : ℝ) ≤ (C.ncard : ℝ) / (2 ^ (N.choose 2) : ℝ)
k22_code_dense_anchor_of_half_le_epsIn LeanCombinatorics for TCS

The anchor statement holds in the easy regime ε ≥ 1/2: for every ε in (0,1) with 1/2 ≤ ε there is n₀ such that every n ≥ n₀ has an anchor order N ≥ n with N ≤ n/(1-ε) carrying a K_{2,2}-code of density at least 1/N.

theorem k22_code_dense_anchor_of_half_le_eps (ε : ℝ) (hε : 0 < ε) (hε1 : ε < 1) (hε2 : 1 / 2 ≤ ε) :
    ∃ n₀ : ℕ, ∀ n ≥ n₀, ∃ N ≥ n,
      (N : ℝ) ≤ (n : ℝ) / (1 - ε) ∧
      ∃ C : Set (SimpleGraph (Fin N)),
        is_kst_code 2 2 N C ∧
        1 / (N : ℝ) ≤ (C.ncard : ℝ) / (2 ^ (N.choose 2) : ℝ)
k22_code_exists_dense_anchorIn LeanCombinatorics for TCS

For every ε in (0, 1) and all sufficiently large n, there exists an anchor order N ≥ n with N ≤ n / (1 - ε) admitting a K_{2,2}-code of density at least 1 / N.

theorem k22_code_exists_dense_anchor (ε : ℝ) (hε : 0 < ε) (hε1 : ε < 1) :
    ∃ n₀ : ℕ, ∀ n ≥ n₀, ∃ N ≥ n,
      (N : ℝ) ≤ (n : ℝ) / (1 - ε) ∧
      ∃ C : Set (SimpleGraph (Fin N)),
        is_kst_code 2 2 N C ∧
        1 / (N : ℝ) ≤ (C.ncard : ℝ) / (2 ^ (N.choose 2) : ℝ)
k22_code_exists_dense_familyIn LeanCombinatorics for TCS

For every real ε > 0, for all sufficiently large n, there exists a K_{2,2}-code on Fin n with density at least (1 - ε) / n.

theorem k22_code_exists_dense_family (ε : ℝ) (hε : 0 < ε) :
    ∃ n₀ : ℕ, ∀ n ≥ n₀, ∃ C : Set (SimpleGraph (Fin n)),
      is_kst_code 2 2 n C ∧ (1 - ε) / (n : ℝ) ≤ (C.ncard : ℝ) / (2 ^ (n.choose 2) : ℝ)
k22_code_exists_dense_family_of_dense_anchorIn LeanCombinatorics for TCS

An anchor statement of the form 'for every ε in (0,1) every large n has an anchor order N ≥ n with N ≤ n/(1-ε) carrying a K_{2,2}-code of density at least 1/N' implies the density statement: for every ε > 0 and all large n there is a K_{2,2}-code on Fin n of density at least (1-ε)/n.

theorem k22_code_exists_dense_family_of_dense_anchor
    (H : ∀ ε : ℝ, 0 < ε → ε < 1 → ∃ n₀ : ℕ, ∀ n ≥ n₀, ∃ N ≥ n,
      (N : ℝ) ≤ (n : ℝ) / (1 - ε) ∧
      ∃ C : Set (SimpleGraph (Fin N)),
        is_kst_code 2 2 N C ∧
        1 / (N : ℝ) ≤ (C.ncard : ℝ) / (2 ^ (N.choose 2) : ℝ))
    (ε : ℝ) (hε : 0 < ε) :
    ∃ n₀ : ℕ, ∀ n ≥ n₀, ∃ C : Set (SimpleGraph (Fin n)),
      is_kst_code 2 2 n C ∧
      (1 - ε) / (n : ℝ) ≤ (C.ncard : ℝ) / (2 ^ (n.choose 2) : ℝ)
k22_code_exists_fixed_multiple_anchorIn LeanCombinatorics for TCS

For every fixed positive integer c and all sufficiently large r, the order c * 2^r admits a K_{2,2}-code of density at least 1/(c * 2^r).

theorem k22_code_exists_fixed_multiple_anchor (c : ℕ) (hc : 1 ≤ c) :
    ∃ r₀ : ℕ, ∀ r ≥ r₀,
      ∃ C : Set (SimpleGraph (Fin (c * 2 ^ r))),
        is_kst_code 2 2 (c * 2 ^ r) C ∧
        1 / ((c * 2 ^ r : ℕ) : ℝ) ≤
          (C.ncard : ℝ) / (2 ^ ((c * 2 ^ r).choose 2) : ℝ)
k22_code_exists_fixed_multiple_anchor_pow_twoIn LeanCombinatorics for TCS

For every k and all sufficiently large r, the order 2^k * 2^r admits a K_{2,2}-code of density at least 1/(2^k * 2^r).

theorem k22_code_exists_fixed_multiple_anchor_pow_two (k : ℕ) :
    ∃ r₀ : ℕ, ∀ r ≥ r₀,
      ∃ C : Set (SimpleGraph (Fin (2 ^ k * 2 ^ r))),
        is_kst_code 2 2 (2 ^ k * 2 ^ r) C ∧
        1 / ((2 ^ k * 2 ^ r : ℕ) : ℝ) ≤
          (C.ncard : ℝ) / (2 ^ ((2 ^ k * 2 ^ r).choose 2) : ℝ)
kneser_subset_sum_multisetIn LeanCombinatorics for TCS

Kneser's addition theorem, sequence form: for a multiset S over a finite abelian group G, letting H be the stabilizer (period subgroup) of the set of all submultiset sums, it holds that |H| times (1 + the number of terms of S outside H) is at most the number of distinct submultiset sums.

open scoped Classical in
theorem kneser_subset_sum_multiset {G : Type*} [AddCommGroup G] [DecidableEq G] [Fintype G] (S : Multiset G) : Nat.card (multiset_sum_stabilizer S) * (1 + (S.filter (fun x => x ∉ multiset_sum_stabilizer S)).card) ≤ (multiset_sum_finset S).card
konig_bipartite_multigraph_edge_colouringIn LeanCombinatorics for TCS

König's line-colouring theorem in fibre form: if every fibre of f and every fibre of g has at most k elements, then the edges admit a proper colouring with k colours, i.e. there is m : α → ℕ with m e < k that is injective on every fibre of f and on every fibre of g.

theorem konig_bipartite_multigraph_edge_colouring {α : Type*} [Fintype α] (f g : α → ℕ) (k : ℕ)
    (hf : ∀ γ : ℕ, {e | f e = γ}.ncard ≤ k) (hg : ∀ γ : ℕ, {e | g e = γ}.ncard ≤ k) :
    ∃ m : α → ℕ, (∀ e : α, m e < k) ∧
      (∀ e₁ e₂ : α, m e₁ = m e₂ → f e₁ = f e₂ → e₁ = e₂) ∧
      ∀ e₁ e₂ : α, m e₁ = m e₂ → g e₁ = g e₂ → e₁ = e₂
konig_regular_bipartite_multigraph_edge_colouringIn LeanCombinatorics for TCS

König's edge-colouring theorem, regular case: if every fibre of f and of g is either empty or of size exactly d, then the edges can be properly coloured with d colours, i.e. there is m : α → ℕ with m e < d for all e, injective on every fibre of f and on every fibre of g.

theorem konig_regular_bipartite_multigraph_edge_colouring {α : Type*} [Fintype α]
    (f g : α → ℕ) (d : ℕ)
    (hf : ∀ γ : ℕ, {e | f e = γ}.ncard = d ∨ {e | f e = γ}.ncard = 0)
    (hg : ∀ γ : ℕ, {e | g e = γ}.ncard = d ∨ {e | g e = γ}.ncard = 0) :
    ∃ m : α → ℕ, (∀ e : α, m e < d) ∧
      (∀ e₁ e₂ : α, m e₁ = m e₂ → f e₁ = f e₂ → e₁ = e₂) ∧
      ∀ e₁ e₂ : α, m e₁ = m e₂ → g e₁ = g e₂ → e₁ = e₂
large_depth_implies_monotone_gap_insertIn LeanCombinatorics for TCS

Let B be a nonempty finite set of nonempty permutations and ρ a B-avoiding permutation of length n. If ρ has a B-avoiding extension of depth at least (||B|| - 1)^2 * (n + 1) + 1 (where ||B|| = max_{β ∈ B} |β|), then inserting ||B|| new maxima in monotone order (increasing or decreasing) into some gap g ≤ n of ρ produces a permutation in Av(B).

theorem large_depth_implies_monotone_gap_insert
    (B : Set (List ℕ)) (hB_fin : B.Finite) (hB_ne : B.Nonempty)
    (hB_perm : ∀ β ∈ B, β.Perm (List.range' 1 β.length) ∧ β ≠ [])
    (ρ : List ℕ) (hρ : ρ.Perm (List.range' 1 ρ.length))
    (hρ_av : ∀ β ∈ B, ¬ ∃ s : List ℕ, s.Sublist ρ ∧ ∃ h : s.length = β.length,
      ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast h] < β[j.cast h]) :
    let m := sSup (List.length '' B)
    let n := ρ.length
    (∃ σ : List ℕ,
        σ.Perm (List.range' 1 σ.length) ∧
        (∀ β ∈ B, ¬ ∃ s : List ℕ, s.Sublist σ ∧ ∃ h : s.length = β.length,
          ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast h] < β[j.cast h]) ∧
        σ.filter (· ≤ n) = ρ ∧
        σ.length ≥ n + (m - 1) ^ 2 * (n + 1) + 1) →
    ∃ g ≤ n,
      ((ρ.take g ++ List.range' (n + 1) m ++ ρ.drop g).Perm (List.range' 1 (n + m)) ∧
       ∀ β ∈ B, ¬ ∃ s : List ℕ,
         s.Sublist (ρ.take g ++ List.range' (n + 1) m ++ ρ.drop g) ∧
         ∃ h : s.length = β.length,
         ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast h] < β[j.cast h]) ∨
      ((ρ.take g ++ (List.range' (n + 1) m).reverse ++ ρ.drop g).Perm (List.range' 1 (n + m)) ∧
       ∀ β ∈ B, ¬ ∃ s : List ℕ,
         s.Sublist (ρ.take g ++ (List.range' (n + 1) m).reverse ++ ρ.drop g) ∧
         ∃ h : s.length = β.length,
         ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast h] < β[j.cast h])
latin_square_prescribed_diagonal_no_near_constantIn LeanCombinatorics for TCS

For n at least two, if a sequence of n symbols from Fin n contains no symbol exactly n-1 times, there is an n by n Latin square on Fin n whose diagonal is exactly that sequence. A Latin square is a function for which every row and every column is a bijection.

theorem latin_square_prescribed_diagonal_no_near_constant (n : ℕ) (hn : 2 ≤ n) (d : Fin n → Fin n) (hd : ∀ v, (Finset.univ.filter fun i => d i = v).card ≠ n-1) : ∃ L : Fin n → Fin n → Fin n, (∀ i, Function.Bijective (L i)) ∧ (∀ j, Function.Bijective (fun i => L i j)) ∧ ∀ i, L i i = d i
latin_tableau_subpartition_col_boundIn LeanCombinatorics for TCS

Let T be a Latin tableau of shape μ and ν a subpartition whose row k is read in row φ k of μ, with φ injective (μ.rowLen (φ k) = ν.rowLen k). Then for every t the number of cells of ν with entry ≤ t is at most ∑_{j < rowLen 0 of ν} min(ν.colLen j, t): in each column of ν the entries are distinct positive integers, so at most min(colLen j, t) of them are ≤ t.

theorem latin_tableau_subpartition_col_bound (μ ν : YoungDiagram) (T : ℕ → ℕ → ℕ) (φ : ℕ → ℕ)
    (hT : is_latin_tableau μ T) (hφ : Function.Injective φ)
    (hrow : ∀ k, k < ν.colLen 0 → μ.rowLen (φ k) = ν.rowLen k) (t : ℕ) :
    (ν.cells.filter (fun c => T (φ c.1) c.2 ≤ t)).card
      ≤ ∑ j ∈ Finset.range (ν.rowLen 0), min (ν.colLen j) t
latin_tableau_subpartition_row_countIn LeanCombinatorics for TCS

Let T be a Latin tableau of shape μ, let ν be a subpartition of μ whose row k is read in row φ k of μ (μ.rowLen (φ k) = ν.rowLen k). Restricted to the rows of ν, the number of cells with entry ≤ t, counted row by row, is exactly ∑_{i < colLen 0 of ν} min(ν.rowLen i, t): row i of ν holds ν.rowLen i distinct entries, all of them in 1, …, ν.rowLen i.

theorem latin_tableau_subpartition_row_count (μ ν : YoungDiagram) (T : ℕ → ℕ → ℕ) (φ : ℕ → ℕ)
    (hT : is_latin_tableau μ T)
    (hrow : ∀ k, k < ν.colLen 0 → μ.rowLen (φ k) = ν.rowLen k) (t : ℕ) :
    (ν.cells.filter (fun c => T (φ c.1) c.2 ≤ t)).card
      = ∑ i ∈ Finset.range (ν.colLen 0), min (ν.rowLen i) t
latin_wide_of_part_gcd_ge_max_multiplicityIn LeanCombinatorics for TCS

Let $\mu$ be a Young diagram. If the maximum multiplicity of any part length of $\mu$ (young_diagram_max_multiplicity μ) is at most the greatest common divisor of all part lengths of $\mu$ (young_diagram_part_gcd μ), then $\mu$ is Latin (is_latin_partition μ) and wide (is_wide_partition μ).

theorem latin_wide_of_part_gcd_ge_max_multiplicity (μ : YoungDiagram)
    (h : young_diagram_max_multiplicity μ ≤ young_diagram_part_gcd μ) :
    is_latin_partition μ ∧ is_wide_partition μ
level_one_to_three_witness_card_indicatorIn LeanCombinatorics for TCS

For any subset T of {0,1,2}: the sum of the indicators of "T is {0}", "T is {1}", "T is {2}" equals the indicator of "T has exactly one element"; and the indicator of "T is the full set" equals the indicator of "T has exactly three elements".

lemma level_one_to_three_witness_card_indicator :
    (∀ T : Finset (Fin 3), ((if ({0} : Finset (Fin 3)) = T then (1:ℝ) else 0)
        + (if ({1} : Finset (Fin 3)) = T then 1 else 0) + (if ({2} : Finset (Fin 3)) = T then 1 else 0))
      = (if T.card = 1 then 1 else 0)) ∧
    (∀ T : Finset (Fin 3), (if Finset.univ = T then (1:ℝ) else 0) = (if T.card = 3 then 1 else 0))
level_one_to_three_witness_cross_levelIn LeanCombinatorics for TCS

For the witness pair f = -chi_0 - chi_1 - chi_2 - chi_{012} and g = -chi_0 - chi_1 - chi_2 + chi_{012} on {0,1}^3, the first cross Fourier level is W_1[f,g] = 3 and the third is W_3[f,g] = -1 (these are 3 and -lambda^2 at lambda = 1 in arXiv:2611.08289 equation (53)).

lemma level_one_to_three_witness_cross_level :
    fourier_cross_level 1 level_one_to_three_witness_f level_one_to_three_witness_g = 3 ∧
    fourier_cross_level 3 level_one_to_three_witness_f level_one_to_three_witness_g = -1
level_one_to_three_witness_fourier_coeff_cardIn LeanCombinatorics for TCS

For every subset T of {0,1,2}, the Fourier coefficient of f at T is -(1 if T has one element) - (1 if T has three elements), and the Fourier coefficient of g at T is -(1 if T has one element) + (1 if T has three elements).

lemma level_one_to_three_witness_fourier_coeff_card :
    (∀ T : Finset (Fin 3), BooleanAnalysis.fourierCoeff level_one_to_three_witness_f T
      = -(if T.card = 1 then (1:ℝ) else 0) - (if T.card = 3 then 1 else 0)) ∧
    (∀ T : Finset (Fin 3), BooleanAnalysis.fourierCoeff level_one_to_three_witness_g T
      = -(if T.card = 1 then (1:ℝ) else 0) + (if T.card = 3 then 1 else 0))
level_one_to_three_witness_fourier_coeff_indicatorIn LeanCombinatorics for TCS

The Fourier-Walsh coefficients of the two witnesses are: f-hat(T) = -(1 if T = {0}) - (1 if T = {1}) - (1 if T = {2}) - (1 if T = univ), and g-hat(T) = -(1 if T = {0}) - (1 if T = {1}) - (1 if T = {2}) + (1 if T = univ).

lemma level_one_to_three_witness_fourier_coeff_indicator :
    (∀ T : Finset (Fin 3), BooleanAnalysis.fourierCoeff level_one_to_three_witness_f T
      = -((if ({0} : Finset (Fin 3)) = T then (1:ℝ) else 0) + (if ({1} : Finset (Fin 3)) = T then 1 else 0)
          + (if ({2} : Finset (Fin 3)) = T then 1 else 0)) - (if Finset.univ = T then 1 else 0)) ∧
    (∀ T : Finset (Fin 3), BooleanAnalysis.fourierCoeff level_one_to_three_witness_g T
      = -((if ({0} : Finset (Fin 3)) = T then (1:ℝ) else 0) + (if ({1} : Finset (Fin 3)) = T then 1 else 0)
          + (if ({2} : Finset (Fin 3)) = T then 1 else 0)) + (if Finset.univ = T then 1 else 0))
level_one_to_three_witness_monotoneIn LeanCombinatorics for TCS

Both witness functions f = -chi_0 - chi_1 - chi_2 - chi_{012} and g = -chi_0 - chi_1 - chi_2 + chi_{012} on {0,1}^3 are coordinatewise increasing: x <= y (bitwise) implies f x <= f y and g x <= g y.

lemma level_one_to_three_witness_monotone :
    Monotone level_one_to_three_witness_f ∧ Monotone level_one_to_three_witness_g
level_one_to_three_witness_varianceIn LeanCombinatorics for TCS

For the witness pair on {0,1}^3, Var(f) = Var(g) = 4, i.e. the sum of squared non-empty Fourier coefficients is 4 for each.

lemma level_one_to_three_witness_variance :
    fourier_variance level_one_to_three_witness_f = 4 ∧
    fourier_variance level_one_to_three_witness_g = 4
lifted_partition_family_57_cardIn LeanCombinatorics for TCS

For t ≥ 1, the lifted family of partitions of t + 56 obtained by adding t - 1 ones to each member of A_57 has exactly as many members as A_57, namely 527254.

theorem lifted_partition_family_57_card (t : ℕ) (ht : 1 ≤ t) :
    (lifted_partition_family_57 t ht).card = 527254
line_incidence_valuationIn LeanCombinatorics for TCS

For a finite set S in (ZMod p)^3, a nonzero direction v, and a point Q, the sum over x in S of the number of functionals f with f(v) ≠ 0 and f(x) = f(Q) equals (#{x in S : x = Q})·(p^3 − p^2) + (#{x in S : x − Q not in span{v}}) · p(p−1).

theorem line_incidence_valuation
    (p : ℕ) [Fact p.Prime] (S : Set (Fin 3 → ZMod p)) [Fintype ↥S]
    (v : Fin 3 → ZMod p) (hv : v ≠ 0) (Q : Fin 3 → ZMod p) :
    (∑ x ∈ S.toFinset, Nat.card {f : (Fin 3 → ZMod p) →ₗ[ZMod p] ZMod p // f v ≠ 0 ∧ f x = f Q})
      = Nat.card {x : ↥S // (x : Fin 3 → ZMod p) = Q} * (p ^ 3 - p ^ 2)
        + Nat.card {x : ↥S // (x : Fin 3 → ZMod p) - Q ∉ Submodule.span (ZMod p) {v}} * (p * (p - 1))
line_pencil_light_functionals_geIn LeanCombinatorics for TCS

Let S be an admissible plane set meeting an affine line ℓ in p - 1 points. Then there are at least 3(p - 1) nonzero linear functionals f with f(v) = 0 such that (S ∩ affine_plane f (f P)).ncard = p.

theorem line_pencil_light_functionals_ge
    (p : ℕ) [Fact p.Prime] (hp : 3 ≤ p)
    (S : Set (Fin 3 → ZMod p)) (hS : admissible_plane_set p S)
    (P v : Fin 3 → ZMod p) (hv : v ≠ 0)
    (hℓ : (S ∩ affine_line P v).ncard = p - 1) :
    3 * (p - 1) ≤ Nat.card {f : (Fin 3 → ZMod p) →ₗ[ZMod p] ZMod p // f ≠ 0 ∧ f v = 0 ∧ (S ∩ affine_plane f (f P)).ncard = p}
linear_independent_of_eval_diagonalIn LeanCombinatorics for TCS

Let $K$ be a field, $\iota$ a type with decidable equality, and $X$ a type. If a family of functions $f : \iota \to X \to K$ and points $v : \iota \to X$ satisfy $f_i(v_i) \neq 0$ for all $i$ and $f_i(v_j) = 0$ for all $i \neq j$, then the family $f$ is linearly independent over $K$.

theorem linear_independent_of_eval_diagonal {K : Type*} [Field K] {ι : Type*} [DecidableEq ι]
    {X : Type*} (f : ι → X → K) (v : ι → X)
    (h_diag : ∀ i, f i (v i) ≠ 0)
    (h_off : ∀ i j, i ≠ j → f i (v j) = 0) :
    LinearIndependent K f
linear_three_graph_le_five_edges_is_iterated_tripartiteIn LeanCombinatorics for TCS

Every linear 3-uniform hypergraph F with at most 5 hyperedges is iterated tripartite.

theorem linear_three_graph_le_five_edges_is_iterated_tripartite
    {V : Type*} [DecidableEq V] (F : Finset (Finset V))
    (hunif : is_three_uniform F) (hlin : is_linear_hypergraph F) (hcard : F.card ≤ 5) :
    is_iterated_tripartite F
linear_three_uniform_five_edges_min_degree_two_is_iterated_tripartiteIn LeanCombinatorics for TCS

A 3-uniform linear hypergraph with exactly 5 hyperedges, 7 vertices, one vertex of degree 3 and all other vertices of degree 2 is iterated tripartite.

theorem linear_three_uniform_five_edges_min_degree_two_is_iterated_tripartite {V : Type*}
    [DecidableEq V] (F : Finset (Finset V)) (hunif : is_three_uniform F)
    (hlin : is_linear_hypergraph F) (hcard : F.card = 5) (hverts : (F.biUnion id).card = 7)
    (hstruct : ∃ v ∈ F.biUnion id, (F.filter (fun e => v ∈ e)).card = 3 ∧
      ∀ u ∈ F.biUnion id, u ≠ v → (F.filter (fun e => u ∈ e)).card = 2) :
    is_iterated_tripartite F
linear_three_uniform_four_edges_min_degree_two_is_iterated_tripartiteIn LeanCombinatorics for TCS

A 3-uniform linear hypergraph with exactly 4 hyperedges, 6 vertices and every vertex of degree 2 is iterated tripartite.

theorem linear_three_uniform_four_edges_min_degree_two_is_iterated_tripartite {V : Type*}
    [DecidableEq V] (F : Finset (Finset V)) (hunif : is_three_uniform F)
    (hlin : is_linear_hypergraph F) (hcard : F.card = 4) (hverts : (F.biUnion id).card = 6)
    (hdeg : ∀ v ∈ F.biUnion id, (F.filter (fun e => v ∈ e)).card = 2) :
    is_iterated_tripartite F
linear_three_uniform_min_degree_two_card_and_vertex_boundIn LeanCombinatorics for TCS

If a linear 3-uniform hypergraph with at most 5 edges has every vertex of degree at least 2, then either (4 edges, 6 vertices, all degrees 2) or (5 edges, 7 vertices, exactly one vertex of degree 3 and all others of degree 2).

theorem linear_three_uniform_min_degree_two_card_and_vertex_bound {V : Type*} [DecidableEq V]
    (F : Finset (Finset V)) (hunif : is_three_uniform F) (hlin : is_linear_hypergraph F)
    (hpos : 1 ≤ F.card) (hcard : F.card ≤ 5)
    (hmindeg : ∀ v ∈ F.biUnion id, 2 ≤ (F.filter (fun e => v ∈ e)).card) :
    (F.card = 4 ∧ (F.biUnion id).card = 6 ∧
        ∀ v ∈ F.biUnion id, (F.filter (fun e => v ∈ e)).card = 2) ∨
      (F.card = 5 ∧ (F.biUnion id).card = 7 ∧
        ∃ v ∈ F.biUnion id, (F.filter (fun e => v ∈ e)).card = 3 ∧
          ∀ u ∈ F.biUnion id, u ≠ v → (F.filter (fun e => u ∈ e)).card = 2)
linear_three_uniform_min_degree_two_is_iterated_tripartiteIn LeanCombinatorics for TCS

A nonempty linear 3-uniform hypergraph with at most 5 hyperedges all of whose vertices have degree at least 2 is iterated tripartite.

theorem linear_three_uniform_min_degree_two_is_iterated_tripartite {V : Type*} [DecidableEq V]
    (F : Finset (Finset V)) (hunif : is_three_uniform F) (hlin : is_linear_hypergraph F)
    (hcard : F.card ≤ 5) (hpos : 1 ≤ F.card)
    (hmindeg : ∀ v ∈ F.biUnion id, 2 ≤ (F.filter (fun e => v ∈ e)).card) :
    is_iterated_tripartite F
linear_three_uniform_two_edges_is_iterated_tripartiteIn LeanCombinatorics for TCS

Every linear 3-uniform hypergraph with at most 2 hyperedges is iterated tripartite.

theorem linear_three_uniform_two_edges_is_iterated_tripartite {V : Type*} [DecidableEq V]
    (F : Finset (Finset V)) (hunif : is_three_uniform F) (hlin : is_linear_hypergraph F)
    (hcard : F.card ≤ 2) :
    is_iterated_tripartite F
linear_three_uniform_vertex_boundIn LeanCombinatorics for TCS

A linear 3-uniform hypergraph with at most 5 hyperedges and at least one hyperedge has at least |F| + 2 vertices in the union of its edges.

theorem linear_three_uniform_vertex_bound {V : Type*} [DecidableEq V]
    (F : Finset (Finset V)) (hunif : is_three_uniform F) (hlin : is_linear_hypergraph F)
    (h1 : 1 ≤ F.card) (h5 : F.card ≤ 5) :
    F.card + 2 ≤ (F.biUnion id).card
linearization_coeff_band_boundIn LeanCombinatorics for TCS

If the (n,k) entry of R_m(J) (equivalently the linearization coefficient g(m,n;k)) is nonzero, then |n - k| ≤ m: the entries of R_m(J) vanish outside the band of width m around the diagonal.

theorem linearization_coeff_band_bound (N : ℕ) (a b c : Fin (N + 1) → ℝ)
    (hrec : satisfies_recurrence_2_1 N a b c) (m n k : Fin (N + 1))
    (hcoeff : linearization_coeff N a b c m n k ≠ 0) :
    |(n.val : ℤ) - (k.val : ℤ)| ≤ (m.val : ℤ)
linearization_coeff_reflection_boundIn LeanCombinatorics for TCS

If the (n,k) entry of R_m(J) (equivalently the linearization coefficient g(m,n;k)) is nonzero, then m ≤ n + k.

theorem linearization_coeff_reflection_bound (N : ℕ) (a b c : Fin (N + 1) → ℝ)
    (hrec : satisfies_recurrence_2_1 N a b c) (m n k : Fin (N + 1))
    (hcoeff : linearization_coeff N a b c m n k ≠ 0) :
    (m.val : ℤ) ≤ (n.val : ℤ) + (k.val : ℤ)
linearization_coeff_supportIn LeanCombinatorics for TCS

For any recurrence satisfying (2.1), the linearization coefficient g(m, n; k) = [R_m(J)]_{n, k} vanishes unless |m - n| ≤ k ≤ min(m + n, N).

theorem linearization_coeff_support (N : ℕ) (a b c : Fin (N + 1) → ℝ)
    (hrec : satisfies_recurrence_2_1 N a b c) (m n k : Fin (N + 1))
    (hcoeff : linearization_coeff N a b c m n k ≠ 0) :
    |(m.val : ℤ) - (n.val : ℤ)| ≤ (k.val : ℤ) ∧ k.val ≤ min (m.val + n.val) N
list_drop_last_consIn LeanCombinatorics for TCS

For a nonempty list l, the drop-last of a :: l is a :: l.dropLast.

theorem list_drop_last_cons {α : Type*} (a : α) (l : List α) (h : l ≠ []) :
    (a :: l).dropLast = a :: l.dropLast
list_filter_not_mem_cons_eraseIn LeanCombinatorics for TCS

For a duplicate-free list l', filtering l' by the predicate "not in a :: l" equals filtering l'.erase a by the predicate "not in l".

theorem list_filter_not_mem_cons_erase {α : Type*} [DecidableEq α] (l' : List α) (a : α)
    (l : List α) (h : l'.Nodup) :
    l'.filter (fun y => decide (y ∉ a :: l)) = (l'.erase a).filter (fun y => decide (y ∉ l))
local_plane_weight_identitiesIn LeanCombinatorics for TCS

Let p be a prime with [Fact p.Prime], S : Set (Fin 3 → ZMod p) an admissible plane set (admissible_plane_set p S), and P ∈ S. Then: (1) for every H ∈ affine_planes_through p P, 0 ≤ local_plane_weight p S H; (2) the sum of local_plane_weight p S H over H ∈ affine_planes_through p P equals (p : ℤ) - 1; (3) for every non-zero v : Fin 3 → ZMod p (v ≠ 0), the sum of local_plane_weight p S H over H ∈ affine_planes_containing_line p (affine_line P v) equals ((S ∩ affine_line P v).ncard : ℤ) - 1; and (4) S is contained in the union of all planes H in (affine_planes_through p P).filter (fun H => 1 ≤ local_plane_weight p S H).

open Classical in
theorem local_plane_weight_identities
    (p : ℕ) [Fact p.Prime] (S : Set (Fin 3 → ZMod p)) (hS : admissible_plane_set p S)
    (P : Fin 3 → ZMod p) (hP : P ∈ S) :
    (∀ H ∈ affine_planes_through p P, 0 ≤ local_plane_weight p S H) ∧
    (∑ H ∈ affine_planes_through p P, local_plane_weight p S H = (p : ℤ) - 1) ∧
    (∀ (v : Fin 3 → ZMod p) (_ : v ≠ 0),
      ∑ H ∈ affine_planes_containing_line p (affine_line P v), local_plane_weight p S H =
        ((S ∩ affine_line P v).ncard : ℤ) - 1) ∧
    S ⊆ ⋃ H ∈ (affine_planes_through p P).filter (fun H => 1 ≤ local_plane_weight p S H), H
matrix_det_mul_det_le_trace_mul_div_powIn LeanCombinatorics for TCS

For positive semidefinite real k × k matrices A and S with k ≥ 1, det A · det S is at most (tr(A S) / k)^k.

theorem matrix_det_mul_det_le_trace_mul_div_pow (k : ℕ) (hk : 1 ≤ k)
  (A S : Matrix (Fin k) (Fin k) ℝ) (hA : Matrix.PosSemidef A) (hS : Matrix.PosSemidef S) :
  A.det * S.det ≤ (Matrix.trace (A * S) / (k : ℝ)) ^ k
matrix_mulVec_indicator_eqIn LeanCombinatorics for TCS

For an m × n matrix A with entries in {-1, 1} and x the indicator vector of a subset Y ⊆ [n], the i-th entry of A x equals 2 * |Y ∩ B_i| - |Y|, where B_i = {j ∈ [n] : A_{i, j} = 1}.

theorem matrix_mulVec_indicator_eq {m n : ℕ} (A : Matrix (Fin m) (Fin n) ℤ)
    (hA : ∀ i j, A i j = 1 ∨ A i j = -1) (i : Fin m) (Y : Finset (Fin n)) :
    Matrix.mulVec A (fun j => if j ∈ Y then (1 : ℤ) else 0) i =
      2 * ((Y ∩ Finset.filter (fun j => A i j = 1) Finset.univ).card : ℤ) - (Y.card : ℤ)
matrix_possemidef_det_le_trace_div_powIn LeanCombinatorics for TCS

For a positive semidefinite real k × k matrix M with k ≥ 1, the determinant of M is at most (tr M / k)^k.

theorem matrix_possemidef_det_le_trace_div_pow (k : ℕ) (hk : 1 ≤ k)
  (M : Matrix (Fin k) (Fin k) ℝ) (hM : Matrix.PosSemidef M) :
  M.det ≤ (Matrix.trace M / (k : ℝ)) ^ k
matrix_q_permanent_strict_mono_of_order_le_threeIn LeanCombinatorics for TCS

If A is a non-diagonal real positive definite matrix of order n ≤ 3, then the function mapping q to the q-permanent of A is strictly increasing on all of ℝ.

theorem matrix_q_permanent_strict_mono_of_order_le_three
    (n : ℕ) (hn : n ≤ 3) (A : Matrix (Fin n) (Fin n) ℝ)
    (hpos : A.PosDef) (hnondiag : ¬ A.IsDiag) :
    StrictMono (fun q : ℝ => matrix_q_permanent q A)
matrix_q_permanent_three_of_diag_oneIn LeanCombinatorics for TCS

For any real symmetric 3-by-3 matrix A with all diagonal entries equal to 1, writing x = A 0 1, y = A 1 2, and z = A 0 2, the q-permanent of A at q equals 1 + (x^2 + y^2) * q + 2 * x * y * z * q^2 + z^2 * q^3.

theorem matrix_q_permanent_three_of_diag_one (A : Matrix (Fin 3) (Fin 3) ℝ)
    (hsymm : A.IsSymm) (hdiag : ∀ i, A i i = 1) (q : ℝ) :
    let x := A 0 1
    let y := A 1 2
    let z := A 0 2
    matrix_q_permanent q A = 1 + (x ^ 2 + y ^ 2) * q + 2 * x * y * z * q ^ 2 + z ^ 2 * q ^ 3
matrix_trace_sq_fin_twoIn LeanCombinatorics for TCS

For every 2x2 matrix A over a commutative ring, (tr A)^2 = tr(A^2) + 2 det A.

theorem matrix_trace_sq_fin_two (R : Type*) [CommRing R] (A : Matrix (Fin 2) (Fin 2) R) :
    Matrix.trace A ^ 2 = Matrix.trace (A ^ 2) + 2 * A.det
matroid_all_pairs_not_two_codim_oneIn LeanCombinatorics for TCS

On at least four elements, a matroid in which all pairs are independent cannot have exactly two independent sets of size one less than the ground set.

theorem matroid_all_pairs_not_two_codim_one {V : Type*} [Fintype V] [DecidableEq V] (M : Matroid V) (hn : 4 ≤ Fintype.card V) (h2 : {W : Finset V | W.card = 2 ∧ M.Indep (W : Set V)}.ncard = Nat.choose (Fintype.card V) 2) : {W : Finset V | W.card = Fintype.card V - 1 ∧ M.Indep (W : Set V)}.ncard ≠ 2
matroid_common_colorable_self_of_common_colorableIn LeanCombinatorics for TCS

If two matroids M₁ and M₂ on a common ground set have a common k-coloring, then each matroid has a k-coloring individually (matroid_common_colorable M M k).

theorem matroid_common_colorable_self_of_common_colorable {α : Type*} (M₁ M₂ : Matroid α)
    (hE : M₁.E = M₂.E) (k : ℕ) (h : matroid_common_colorable M₁ M₂ k) :
    matroid_common_colorable M₁ M₁ k ∧ matroid_common_colorable M₂ M₂ k
matroid_common_list_colorable_succ_of_common_colorableIn LeanCombinatorics for TCS

One-step list-lifting (the C = 1 case): if two loopless matroids on a common finite ground set have a common coloring with k colors, then they are (k+1)-list-colorable. This is a matroid analogue of Galvin's theorem for the general (non-strongly-base-orderable) pair case, and is exactly the C = 1 form of Question 3.1 (arXiv:2610.07318), strictly stronger than the parent's existence-of-some-C statement.

theorem matroid_common_list_colorable_succ_of_common_colorable {α : Type*} (M₁ M₂ : Matroid α) [Finite α] (h₁ : M₁.Loopless) (h₂ : M₂.Loopless) (hE : M₁.E = M₂.E) (k : ℕ) (h : matroid_common_colorable M₁ M₂ k) :
    matroid_common_list_colorable M₁ M₂ (k + 1)
matroid_common_list_colorable_three_of_colorable_twoIn LeanCombinatorics for TCS

The k = 2 case of Question 3.1 (arXiv:2610.07318): any pair of loopless matroids on a common finite ground set with a common 2-coloring is 3-list-colorable. This is the first nontrivial open case beyond k ≤ 1.

theorem matroid_common_list_colorable_three_of_colorable_two {α : Type*} (M₁ M₂ : Matroid α) [Finite α]
    (h₁ : M₁.Loopless) (h₂ : M₂.Loopless) (hE : M₁.E = M₂.E)
    (h : matroid_common_colorable M₁ M₂ 2) :
    matroid_common_list_colorable M₁ M₂ 3
matroid_reduction_partition_classes_three_of_colorable_twoIn LeanCombinatorics for TCS

Every finite loopless matroid with chromatic number at most 2 admits a reduction to a unit-capacity partition matroid whose classes have cardinality at most 3. This generalizes the graphic case (Bérczi, Schwarcz, Yamaguchi 2021) to general loopless matroids.

theorem matroid_reduction_partition_classes_three_of_colorable_two {α : Type*} (M : Matroid α) [Finite α]
    (hM : M.Loopless) (hc : matroid_common_colorable M M 2) :
    ∃ f : α → ℕ, (∀ γ : ℕ, {e | e ∈ M.E ∧ f e = γ}.ncard ≤ 3) ∧
      ∀ T ⊆ M.E, (∀ e₁ ∈ T, ∀ e₂ ∈ T, f e₁ = f e₂ → e₁ = e₂) → M.Indep T
matroid_sbo_reduction_partition_classes_of_colourableIn LeanCombinatorics for TCS

Generalised partition-matroid reduction for strongly base-orderable matroids (Proposition 2.2 of arXiv:2610.07318 with 2 replaced by k): let M be a finite strongly base-orderable matroid whose ground set is the union of k independent sets (equivalently M is k-colourable). Then M has a reduction to a unit-capacity partition matroid with classes of size at most k: there is a class map f : α → ℕ whose fibres meet E in at most k elements and such that every T ⊆ E containing no two distinct elements with the same f-value is independent in M. The case k = 2 is proved here (matroid_sbo_reduction_pairs_of_two_indep, involution form, used for matroid_sbo_common_list_chromatic_eq_of_le_two); the case k ≥ 3 is a conjecture and is the crux of Question 3.2.

theorem matroid_sbo_reduction_partition_classes_of_colourable {α : Type*} (M : Matroid α) [M.Finite]
    (hM : matroid_strongly_base_orderable M) (k : ℕ) (hc : matroid_common_colorable M M k) :
    ∃ f : α → ℕ, (∀ γ : ℕ, {e | e ∈ M.E ∧ f e = γ}.ncard ≤ k) ∧
      ∀ T ⊆ M.E, (∀ e₁ ∈ T, ∀ e₂ ∈ T, f e₁ = f e₂ → e₁ = e₂) → M.Indep T
matroid_sbo_reduction_partition_classes_of_colourable_le_twoIn LeanCombinatorics for TCS

Let M be a finite strongly base-orderable matroid that is k-colourable with k ≤ 2. Then M has a reduction to a unit-capacity partition matroid with classes of size at most k.

theorem matroid_sbo_reduction_partition_classes_of_colourable_le_two {α : Type*} (M : Matroid α) [M.Finite]
    (hM : matroid_strongly_base_orderable M) (k : ℕ) (hk : k ≤ 2) (hc : matroid_common_colorable M M k) :
    ∃ f : α → ℕ, (∀ γ : ℕ, {e | e ∈ M.E ∧ f e = γ}.ncard ≤ k) ∧
      ∀ T ⊆ M.E, (∀ e₁ ∈ T, ∀ e₂ ∈ T, f e₁ = f e₂ → e₁ = e₂) → M.Indep T
matroid_sbo_reduction_partition_classes_of_colourable_oneIn LeanCombinatorics for TCS

For k = 1, any 1-colourable finite matroid has its entire ground set independent. An injection of the finite ground set into ℕ yields fibres of size at most 1 on M.E, and all transversals are independent.

theorem matroid_sbo_reduction_partition_classes_of_colourable_one {α : Type*} (M : Matroid α) [M.Finite]
    (hM : matroid_strongly_base_orderable M) (hc : matroid_common_colorable M M 1) :
    ∃ f : α → ℕ, (∀ γ : ℕ, {e | e ∈ M.E ∧ f e = γ}.ncard ≤ 1) ∧
      ∀ T ⊆ M.E, (∀ e₁ ∈ T, ∀ e₂ ∈ T, f e₁ = f e₂ → e₁ = e₂) → M.Indep T
matroid_sbo_reduction_partition_classes_of_colourable_twoIn LeanCombinatorics for TCS

Proposition 2.2 of arXiv:2610.07318: let M be a finite strongly base-orderable matroid whose ground set is the union of two independent sets. Then M has a reduction to a unit-capacity partition matroid with classes of size at most 2.

theorem matroid_sbo_reduction_partition_classes_of_colourable_two {α : Type*} (M : Matroid α) [M.Finite]
    (hM : matroid_strongly_base_orderable M) (hc : matroid_common_colorable M M 2) :
    ∃ f : α → ℕ, (∀ γ : ℕ, {e | e ∈ M.E ∧ f e = γ}.ncard ≤ 2) ∧
      ∀ T ⊆ M.E, (∀ e₁ ∈ T, ∀ e₂ ∈ T, f e₁ = f e₂ → e₁ = e₂) → M.Indep T
matroid_sbo_reduction_partition_classes_of_colourable_zeroIn LeanCombinatorics for TCS

For k = 0, any strongly base-orderable finite matroid whose ground set is 0-colourable has an empty ground set, hence vacuously admits a reduction to partition classes of size 0.

theorem matroid_sbo_reduction_partition_classes_of_colourable_zero {α : Type*} (M : Matroid α) [M.Finite]
    (hM : matroid_strongly_base_orderable M) (hc : matroid_common_colorable M M 0) :
    ∃ f : α → ℕ, (∀ γ : ℕ, {e | e ∈ M.E ∧ f e = γ}.ncard ≤ 0) ∧
      ∀ T ⊆ M.E, (∀ e₁ ∈ T, ∀ e₂ ∈ T, f e₁ = f e₂ → e₁ = e₂) → M.Indep T
max_partial_transversal_complement_filledIn LeanCombinatorics for TCS

Let δ and t be natural numbers with t ≤ δ, and let Δ be a finset of filled cells in Fin δ × Fin δ. Suppose the prefix of the diagonal {(k, k) : k < t} is a maximum partial transversal of empty cells univ \ Δ. Then for all i, j : Fin δ with t ≤ i.val and t ≤ j.val, the cell (i, j) is in Δ.

theorem max_partial_transversal_complement_filled (δ t : ℕ) (ht : t ≤ δ) (Δ : Finset (Fin δ × Fin δ)) (hT : is_max_partial_transversal (Finset.univ \ Δ) (Finset.univ.filter (fun (p : Fin δ × Fin δ) => p.1 = p.2 ∧ p.1.val < t))) (i j : Fin δ) (hi : t ≤ i.val) (hj : t ≤ j.val) : (i, j) ∈ Δ
max_partial_transversal_replacement_orIn LeanCombinatorics for TCS

Let δ and t be natural numbers with t ≤ δ, and let Δ be a finset of filled cells in Fin δ × Fin δ. Suppose the prefix of the diagonal {(k, k) : k < t} is a maximum partial transversal of empty cells univ \ Δ. Then for all i, j : Fin δ with t ≤ i.val and t ≤ j.val, and every k : Fin δ with k.val < t, at least one of (i, k) or (k, j) belongs to Δ.

theorem max_partial_transversal_replacement_or (δ t : ℕ) (ht : t ≤ δ) (Δ : Finset (Fin δ × Fin δ)) (hT : is_max_partial_transversal (Finset.univ \ Δ) (Finset.univ.filter (fun (p : Fin δ × Fin δ) => p.1 = p.2 ∧ p.1.val < t))) (i j k : Fin δ) (hi : t ≤ i.val) (hj : t ≤ j.val) (hk : k.val < t) : (i, k) ∈ Δ ∨ (k, j) ∈ Δ
maximal_flower_free_system_contains_empty_kernel_flowerIn LeanCombinatorics for TCS

Let α be an infinite type with decidable equality. Let k ≥ 1 and r ≥ 2 be natural numbers. Let S be a finite k-uniform family of finite subsets of α containing no r-flower. Suppose S is maximal in the sense that for every finite subset A of α of cardinality k with A ∉ S, the family insert A S contains an r-flower. Then S contains an (r - 1)-flower with empty kernel (that is, r - 1 pairwise disjoint sets in S).

theorem maximal_flower_free_system_contains_empty_kernel_flower
    {α : Type*} [DecidableEq α] [Infinite α]
    (k r : ℕ) (hk : 1 ≤ k) (hr : 2 ≤ r)
    (S : Finset (Finset α))
    (h_unif : ∀ A ∈ S, A.card = k)
    (h_free : ¬ ∃ F ⊆ S, F.card = r ∧ ∃ C, IsSunflower F C)
    (h_max : ∀ A : Finset α, A.card = k → A ∉ S →
      ∃ F ⊆ insert A S, F.card = r ∧ ∃ C, IsSunflower F C) :
    ∃ F ⊆ S, F.card = r - 1 ∧ IsSunflower F ∅
mem_multiset_sum_finsetIn LeanCombinatorics for TCS

For a multiset S over an additive commutative group with decidable equality, an element g lies in the finset of submultiset sums of S if and only if there is a submultiset T ≤ S with T.sum = g.

theorem mem_multiset_sum_finset {G : Type*} [AddCommGroup G] [DecidableEq G] (S : Multiset G) (g : G) : g ∈ multiset_sum_finset S ↔ ∃ T : Multiset G, T ≤ S ∧ T.sum = g
mem_ssyt_bounded_iffIn LeanCombinatorics for TCS

For any finite diagram D : Finset (ℕ × ℕ), any bound m : ℕ, and any filling M : D → ℕ, M belongs to ssyt_bounded D m if and only if M is semi-standard on D and for all u ∈ D, 1 ≤ M(u) ≤ m.

open Classical in
theorem mem_ssyt_bounded_iff (D : Finset (ℕ × ℕ)) (m : ℕ) (M : D → ℕ) :
    M ∈ ssyt_bounded D m ↔ is_semistandard D M ∧ ∀ u : D, 1 ≤ M u ∧ M u ≤ m
min_avg_pairwise_hamming_dist_density_one_sixteenth_leIn LeanCombinatorics for TCS

Let n ≥ 4. For any subset F ⊆ (Fin n → Bool) of cardinality 2^(n-4), the average pairwise Hamming distance avg_pairwise_hamming_dist F is at least (n - 4) / 2.

theorem min_avg_pairwise_hamming_dist_density_one_sixteenth_le
    (n : ℕ) (hn : 4 ≤ n) (F : Finset (Fin n → Bool)) (hF : F.card = 2 ^ (n - 4)) :
    (n - 4 : ℝ) / 2 ≤ avg_pairwise_hamming_dist F
missing_nterm_sum_count_shift_eqIn LeanCombinatorics for TCS

Let S be a multiset over an additive commutative group and suppose g is not the sum of any submultiset of S of cardinality n. Then for every U ⊆ S with U.card = n-1, every occurrence of g - U.sum in S already belongs to U: S.count (g - U.sum) = U.count (g - U.sum).

theorem missing_nterm_sum_count_shift_eq {G : Type*} [AddCommGroup G] [DecidableEq G] {n : ℕ} [NeZero n]
    (S U : Multiset G) (g : G)
    (hg : g ∉ ((S.powersetCard n).map Multiset.sum).toFinset)
    (hU : U ≤ S) (hUc : U.card = n - 1) :
    S.count (g - U.sum) = U.count (g - U.sum)
missing_sum_arith_inequalityIn LeanCombinatorics for TCS

The arithmetic inequality behind the paper's step (5)-(6): if N is odd, N ≥ 21 and N/2 < m ≤ N, then (N - 2m + 7)(N - m) + 2N < m(m - 1).

theorem missing_sum_arith_inequality (N m : ℕ) (hN : 21 ≤ N) (hodd : N % 2 = 1) (hm : N / 2 < m) (hmN : m ≤ N) : ((N : ℤ) - 2 * (m : ℤ) + 7) * ((N : ℤ) - (m : ℤ)) + 2 * (N : ℤ) < (m : ℤ) * ((m : ℤ) - 1)
moment_block_card_and_ltIn LeanCombinatorics for TCS

Paper Proposition 2.3(1): for 1 ≤ h and q ≥ 2 the block B_q has exactly q elements and all of them lie in [0, h^(h-1) q^h).

theorem moment_block_card_and_lt (h q : ℕ) (hh : 1 ≤ h) (hq : 2 ≤ q) :
    (moment_block h q).card = q ∧ ∀ x ∈ moment_block h q, x < h ^ (h - 1) * q ^ h
moment_block_shorter_sums_separatedIn LeanCombinatorics for TCS

Paper Proposition 2.3(3), the key separation property: let q > h ≥ 2 be prime. Any two distinct r-element multisets of elements of the block B_q, with 1 ≤ r ≤ h-1, have sums differing by at least q in absolute value.

theorem moment_block_shorter_sums_separated (h q r : ℕ) (hh : 2 ≤ h) (hq : h < q) (hprime : q.Prime)
    (m m' : Multiset ℕ) (hm : ∀ x ∈ m, x ∈ moment_block h q) (hm' : ∀ x ∈ m', x ∈ moment_block h q)
    (hc : m.card = r) (hc' : m'.card = r) (hr1 : 1 ≤ r) (hr : r ≤ h - 1) (hne : m ≠ m') :
    q ≤ ((m.sum : ℤ) - (m'.sum : ℤ)).natAbs
moment_elem_strictMonoOnIn LeanCombinatorics for TCS

For 1 ≤ h, 0 < q and 1 ≤ ℓ, the ℓ-digit moment-curve encoding a ↦ moment_elem h q ℓ a is strictly increasing on the residues {0, …, q-1}; in particular it is injective there.

theorem moment_elem_strictMonoOn (h q ℓ : ℕ) (hh : 1 ≤ h) (hq : 0 < q) (hℓ : 1 ≤ ℓ) :
    StrictMonoOn (moment_elem h q ℓ) (Set.Iio q)
moment_elem_sum_digitsIn LeanCombinatorics for TCS

No-carry lemma for digit sums: if two multisets A, A' of residues < q, each of cardinality r ≤ ℓ ≤ h, give the same ℓ-digit encoded sum, then for every digit position j < ℓ the j-th digits a^(j+1) mod q have the same sum over A and over A'. (Each of these digit sums is at most r(q-1) < h*q, so no carries occur.)

theorem moment_elem_sum_digits (h q ℓ r : ℕ) (hh : 1 ≤ h) (hq : 0 < q) (hℓ : ℓ ≤ h)
    (A A' : Multiset ℕ) (hA : ∀ a ∈ A, a < q) (hA' : ∀ a ∈ A', a < q)
    (hc : A.card = r) (hc' : A'.card = r) (hr : r ≤ ℓ)
    (hs : (A.map (moment_elem h q ℓ)).sum = (A'.map (moment_elem h q ℓ)).sum)
    (j : ℕ) (hj : j < ℓ) :
    (A.map (fun a => a ^ (j + 1) % q)).sum = (A'.map (fun a => a ^ (j + 1) % q)).sum
moment_trunc_is_bhIn LeanCombinatorics for TCS

Paper Lemma 2.2: for a prime q > h and 1 ≤ ℓ ≤ h, the truncated block {moment_elem h q ℓ a | 0 ≤ a < q} is a B_ℓ set, i.e. ℓ-term sums of its elements determine the multiset of summands.

theorem moment_trunc_is_bh (h q ℓ : ℕ) (hh : 1 ≤ h) (hq : h < q) (hprime : q.Prime)
    (hℓ1 : 1 ≤ ℓ) (hℓ : ℓ ≤ h) :
    is_bh ℓ (((Finset.range q).image (moment_elem h q ℓ) : Finset ℕ) : Set ℕ)
monotone_gap_insert_implies_infinite_depthIn LeanCombinatorics for TCS

Let B be a nonempty finite set of nonempty permutations and ρ a B-avoiding permutation of length n. If inserting ||B|| new maxima in monotone order (increasing or decreasing) into some gap g ≤ n of ρ produces a permutation in Av(B) (where ||B|| = max_{β ∈ B} |β|), then ρ has B-avoiding extensions of arbitrarily large depth (for every k, an extension σ with σ.filter (· ≤ n) = ρ of length n + k).

theorem monotone_gap_insert_implies_infinite_depth
    (B : Set (List ℕ)) (hB_fin : B.Finite) (hB_ne : B.Nonempty)
    (hB_perm : ∀ β ∈ B, β.Perm (List.range' 1 β.length) ∧ β ≠ [])
    (ρ : List ℕ) (hρ : ρ.Perm (List.range' 1 ρ.length))
    (hρ_av : ∀ β ∈ B, ¬ ∃ s : List ℕ, s.Sublist ρ ∧ ∃ h : s.length = β.length,
      ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast h] < β[j.cast h]) :
    let m := sSup (List.length '' B)
    let n := ρ.length
    (∃ g ≤ n,
      ((ρ.take g ++ List.range' (n + 1) m ++ ρ.drop g).Perm (List.range' 1 (n + m)) ∧
       ∀ β ∈ B, ¬ ∃ s : List ℕ,
         s.Sublist (ρ.take g ++ List.range' (n + 1) m ++ ρ.drop g) ∧
         ∃ h : s.length = β.length,
         ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast h] < β[j.cast h]) ∨
      ((ρ.take g ++ (List.range' (n + 1) m).reverse ++ ρ.drop g).Perm (List.range' 1 (n + m)) ∧
       ∀ β ∈ B, ¬ ∃ s : List ℕ,
         s.Sublist (ρ.take g ++ (List.range' (n + 1) m).reverse ++ ρ.drop g) ∧
         ∃ h : s.length = β.length,
         ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast h] < β[j.cast h])) →
    ∀ k : ℕ, ∃ σ : List ℕ,
      σ.Perm (List.range' 1 σ.length) ∧
      (∀ β ∈ B, ¬ ∃ s : List ℕ, s.Sublist σ ∧ ∃ h : s.length = β.length,
        ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast h] < β[j.cast h]) ∧
      σ.filter (· ≤ n) = ρ ∧ σ.length = n + k
mopls2_filled_cells_lower_boundIn LeanCombinatorics for TCS

Let M be a 2-MOPLS(n) with F filled cells. Then F ≥ n²/3, with equality if and only if every frequency (the number of filled cells in each row and each column, and the number of occurrences of each first entry and each second entry) is equal to n/3.

theorem mopls2_filled_cells_lower_bound {n : ℕ}
    (M : Fin n → Fin n → Option (Fin n × Fin n)) (hM : is_mopls2 M) :
    (opl2_filled_count M : ℚ) ≥ (n : ℚ)^2 / 3 ∧
    ((opl2_filled_count M : ℚ) = (n : ℚ)^2 / 3 ↔
      (∀ r : Fin n, (opl2_row_freq M r : ℚ) = (n : ℚ) / 3) ∧
      (∀ c : Fin n, (opl2_col_freq M c : ℚ) = (n : ℚ) / 3) ∧
      (∀ x : Fin n, (opl2_first_freq M x : ℚ) = (n : ℚ) / 3) ∧
      (∀ y : Fin n, (opl2_second_freq M y : ℚ) = (n : ℚ) / 3))
mopls2_sum_identityIn LeanCombinatorics for TCS

For any rational numbers n, m, and t, the polynomial identity 2m² + t(n - m) + (n - m - t)(2(n - m) - t) = (n - m - t)² + (n - 3m)²/3 + 2n²/3 holds.

theorem mopls2_sum_identity (n m t : ℚ) :
    2 * m^2 + t * (n - m) + (n - m - t) * (2 * (n - m) - t) =
    (n - m - t)^2 + (n - 3 * m)^2 / 3 + 2 * n^2 / 3
mopls_partial_transversal_frequency_sum_boundIn LeanCombinatorics for TCS

Let δ and t be natural numbers with t ≤ δ, and let Δ be a finset of filled cells in Fin δ × Fin δ. Suppose the prefix of the diagonal {(k, k) : k < t} is a maximum partial transversal of empty cells univ \ Δ. Then for all i, j : Fin δ with t ≤ i.val and t ≤ j.val, the cell (i, j) belongs to Δ, and 2 * δ - t ≤ array_row_frequency Δ i + array_col_frequency Δ j.

theorem mopls_partial_transversal_frequency_sum_bound (δ t : ℕ) (ht : t ≤ δ) (Δ : Finset (Fin δ × Fin δ)) (hT : is_max_partial_transversal (Finset.univ \ Δ) (Finset.univ.filter (fun (p : Fin δ × Fin δ) => p.1 = p.2 ∧ p.1.val < t))) (i j : Fin δ) (hi : t ≤ i.val) (hj : t ≤ j.val) : (i, j) ∈ Δ ∧ 2 * δ - t ≤ array_row_frequency Δ i + array_col_frequency Δ j
mopls_partial_transversal_frequency_sum_bound_diagonalIn LeanCombinatorics for TCS

Let δ and t be natural numbers with t ≤ δ, and let Δ be a finset of filled cells in Fin δ × Fin δ. Suppose the prefix of the diagonal {(k, k) : k < t} is a maximum partial transversal of empty cells univ \ Δ. Then for every diagonal index i : Fin δ with t ≤ i.val, the diagonal cell (i, i) belongs to Δ, and 2 * δ - t ≤ array_row_frequency Δ i + array_col_frequency Δ i.

theorem mopls_partial_transversal_frequency_sum_bound_diagonal (δ t : ℕ) (ht : t ≤ δ) (Δ : Finset (Fin δ × Fin δ)) (hT : is_max_partial_transversal (Finset.univ \ Δ) (Finset.univ.filter (fun (p : Fin δ × Fin δ) => p.1 = p.2 ∧ p.1.val < t))) (i : Fin δ) (hi : t ≤ i.val) : (i, i) ∈ Δ ∧ 2 * δ - t ≤ array_row_frequency Δ i + array_col_frequency Δ i
multiset_bind_card_finsetIn LeanCombinatorics for TCS

The cardinality of the multiset union of a Finset-indexed family of multisets is the sum of the cardinalities.

theorem multiset_bind_card_finset {α β : Type*} (s : Finset β) (Q : β → Multiset α) : (s.val.bind Q).card = ∑ c ∈ s, (Q c).card
multiset_bind_le_bindIn LeanCombinatorics for TCS

Binding a fixed map is monotone for the multiset submultiset order: if A ≤ B then A.bind g ≤ B.bind g.

theorem multiset_bind_le_bind {α β : Type*} {g : α → Multiset β} {A B : Multiset α} (h : A ≤ B) : A.bind g ≤ B.bind g
multiset_eight_class_pairingIn LeanCombinatorics for TCS

Pairing reduction: a multiset of 16k-7 elements over a type with at most 8 elements yields 8k-7 disjoint same-class pairs, where the 8 possible classes are the fibers of a map p from the type.

theorem multiset_eight_class_pairing {α β : Type*} [Fintype β] [DecidableEq β] [DecidableEq α] (p : α → β) (hp : Fintype.card β ≤ 8) (k : ℕ) (hk : 1 ≤ k) (S : Multiset α) (hS : S.card = 16 * k - 7) : ∃ P : Multiset (α × α), P.card = 8 * k - 7 ∧ (∀ q ∈ P, p q.1 = p q.2) ∧ P.bind (fun q => ({q.1, q.2} : Multiset α)) ≤ S
multiset_exists_le_of_le_mapIn LeanCombinatorics for TCS

A submultiset of the image of s under f lifts to a submultiset of s with exactly that image.

theorem multiset_exists_le_of_le_map {α β : Type*} [DecidableEq β] (f : α → β) (s : Multiset α) (t : Multiset β) (h : t ≤ s.map f) : ∃ s' : Multiset α, s' ≤ s ∧ s'.map f = t
multiset_fiber_partitionIn LeanCombinatorics for TCS

A multiset is the multiset union of its fibers of a map f into a finite type.

theorem multiset_fiber_partition {α β : Type*} [Fintype β] [DecidableEq β] (f : α → β) (s : Multiset α) : (Finset.univ.val.bind (fun c => s.filter (fun a => f a = c))) = s
multiset_newton_identityIn LeanCombinatorics for TCS

Newton's identity for a multiset over a commutative ring: for 1 ≤ k ≤ card m, k · e_k(m) = Σ_{j=1}^{k} (-1)^{j-1} e_{k-j}(m) · p_j(m), where e_j(m) is the j-th elementary symmetric function of the multiset m and p_j(m) = Σ_{a ∈ m} a^j is the j-th power sum.

theorem multiset_newton_identity (R : Type*) [CommRing R] (m : Multiset R) (k : ℕ) (hk : 1 ≤ k)
    (hkm : k ≤ m.card) :
    (k : R) * m.esymm k =
      ∑ j ∈ Finset.Icc 1 k, (-1 : R) ^ (j - 1) * m.esymm (k - j) * (m.map (fun a => a ^ j)).sum
multiset_pair_bind_cardIn LeanCombinatorics for TCS

Expanding |P| pairs into their two members gives 2|P| elements.

theorem multiset_pair_bind_card {α : Type*} (P : Multiset (α × α)) : (P.bind (fun p => ({p.1, p.2} : Multiset α))).card = 2 * P.card
multiset_pair_bind_sumIn LeanCombinatorics for TCS

The sum of the 2|P| elements obtained by expanding the pairs of P equals the sum of the pair sums.

theorem multiset_pair_bind_sum {α : Type*} [AddCommMonoid α] (P : Multiset (α × α)) : (P.bind (fun p => ({p.1, p.2} : Multiset α))).sum = (P.map (fun p => p.1 + p.2)).sum
multiset_pairing_fiber_cardIn LeanCombinatorics for TCS

Every multiset G can be partitioned into ⌊|G|/2⌋ disjoint pairs of its elements: there is P with |P| = |G|/2 and the expansion of P is a submultiset of G.

theorem multiset_pairing_fiber_card {α : Type*} (G : Multiset α) : ∃ Q : Multiset (α × α), Q.card = G.card / 2 ∧ Q.bind (fun p => ({p.1, p.2} : Multiset α)) ≤ G
multiset_subset_sum_separationIn LeanCombinatorics for TCS

Let A and B be two multisets of positive integers such that the sum of elements of A equals the sum of elements of B, denoted by s = sum(A) = sum(B), and such that their sets of positive subset sums intersect only at s: multiset_positive_subset_sums A ∩ multiset_positive_subset_sums B = {A.sum}. Then |A| ≤ max(B) and |B| ≤ max(A). Moreover, for every integer w ≥ 2 such that max(A) ≤ w and max(B) ≤ w, we have s ≤ w(w - 1).

theorem multiset_subset_sum_separation
    (A B : Multiset ℕ)
    (hA_pos : ∀ x ∈ A, 0 < x)
    (hB_pos : ∀ x ∈ B, 0 < x)
    (h_sum : A.sum = B.sum)
    (h_sep : multiset_positive_subset_sums A ∩ multiset_positive_subset_sums B = {A.sum}) :
    A.card ≤ multiset_max B ∧ B.card ≤ multiset_max A ∧
      (∀ w : ℕ, 2 ≤ w → multiset_max A ≤ w → multiset_max B ≤ w → A.sum ≤ w * (w - 1))
multiset_subset_sum_separation_card_leIn LeanCombinatorics for TCS

Let A and B be multisets of positive integers with the same sum s = sum(A) = sum(B) whose positive subset sums intersect only at s: multiset_positive_subset_sums A ∩ multiset_positive_subset_sums B = {A.sum}. Then the cardinality of A is at most the maximum element of B.

theorem multiset_subset_sum_separation_card_le
    (A B : Multiset ℕ)
    (hA_pos : ∀ x ∈ A, 0 < x)
    (hB_pos : ∀ x ∈ B, 0 < x)
    (h_sum : A.sum = B.sum)
    (h_sep : multiset_positive_subset_sums A ∩ multiset_positive_subset_sums B = {A.sum}) :
    A.card ≤ multiset_max B
multiset_sum_stabilizer_zero_memIn LeanCombinatorics for TCS

The zero element lies in the stabilizer of the submultiset-sum set of any multiset S, so multiset_sum_stabilizer S is a genuine (nonempty) additive subgroup.

theorem multiset_sum_stabilizer_zero_mem {G : Type*} [AddCommGroup G] [DecidableEq G] (S : Multiset G) : (0 : G) ∈ multiset_sum_stabilizer S
nat_partition_bounded_count_redundantIn LeanCombinatorics for TCS

If m ≤ k then bounding the parts by k is no restriction for a partition of m: a partition of m has no part larger than m. So the number of partitions of m with parts at most k equals the number with parts at most m.

theorem nat_partition_bounded_count_redundant (k m : ℕ) (h : m ≤ k) :
    nat_partition_bounded_count k m = nat_partition_bounded_count m m
nat_partition_bounded_count_succ_addIn LeanCombinatorics for TCS

One-copy recurrence for the bounded partition count: for k+1 ≤ m, a partition of m with all parts at most k+1 either has no part equal to k+1 (then all its parts are at most k) or has at least one; in the second case deleting one copy of the part k+1 is a bijection with the partitions of m-(k+1) with all parts at most k+1. Hence N(k+1,m) = N(k,m) + N(k+1,m-(k+1)).

theorem nat_partition_bounded_count_succ_add (k m : ℕ) (hk : k + 1 ≤ m) :
    nat_partition_bounded_count (k + 1) m
      = nat_partition_bounded_count k m + nat_partition_bounded_count (k + 1) (m - (k + 1))
nat_partition_bounded_count_succ_sumIn LeanCombinatorics for TCS

Fibre recurrence for the bounded partition count: the number of partitions of m with all parts at most k+1 equals the sum, over j from 0 to m/(k+1), of the number of partitions of m - j*(k+1) with all parts at most k (j is the number of copies of the part k+1 that are removed).

theorem nat_partition_bounded_count_succ_sum (k m : ℕ) :
    nat_partition_bounded_count (k + 1) m
      = ∑ j ∈ Finset.range (m / (k + 1) + 1), nat_partition_bounded_count k (m - j * (k + 1))
nat_partition_bounded_table_entryIn LeanCombinatorics for TCS

The dynamic-programme table really computes the bounded partition counts: for m ≤ N, the m-th entry of the k-th row equals the number of partitions of m with all parts at most k.

theorem nat_partition_bounded_table_entry (N k m : ℕ) (hN : m ≤ N) :
    (nat_partition_bounded_table N k).getD m 0 = nat_partition_bounded_count k m
nat_partition_bounded_table_fifty_sixIn LeanCombinatorics for TCS

The dynamic-programme table at k = N = 56, written out: its m-th entry is the partition number p(m) for m = 0, 1, ..., 56, so the table is 1, 1, 2, 3, 5, 7, ..., 451276, 526823.

theorem nat_partition_bounded_table_fifty_six :
    nat_partition_bounded_table 56 56 =
      [1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 42, 56, 77, 101, 135, 176, 231, 297, 385, 490, 627, 792,
       1002, 1255, 1575, 1958, 2436, 3010, 3718, 4565, 5604, 6842, 8349, 10143, 12310, 14883,
       17977, 21637, 26015, 31185, 37338, 44583, 53174, 63261, 75175, 89134, 105558, 124754,
       147273, 173525, 204226, 239943, 281589, 329931, 386155, 451276, 526823]
nat_partition_card_contains_finsetIn LeanCombinatorics for TCS

Number of partitions containing a prescribed finite set of parts: if R is a finite set of positive integers with sum at most n, then the partitions of n in which every element of R occurs at least once are in bijection with the partitions of n - sum(R), by deleting one copy of each element of R.

theorem nat_partition_card_contains_finset (n : ℕ) (R : Finset ℕ) (hR : ∀ r ∈ R, 0 < r)
    (hsum : ∑ r ∈ R, r ≤ n) :
    (Finset.univ.filter (fun p : Nat.Partition n => ∀ r ∈ R, r ∈ p.parts)).card
      = Fintype.card (Nat.Partition (n - ∑ r ∈ R, r))
nat_partition_card_contains_multisetIn LeanCombinatorics for TCS

Deleting a prescribed multiset of parts is a bijection. Let mu be a finite multiset of positive integers with mu.sum ≤ n, all of whose members are ≤ c. Then the partitions of n that contain mu has a sub-multiset of parts (and whose parts are all ≤ c) are in bijection with the partitions of n - mu.sum with all parts ≤ c, by deleting one copy of each part of mu. Hence the two finite cardinalities agree.

theorem nat_partition_card_contains_multiset (n c : ℕ) (μ : Multiset ℕ)
    (hpos : ∀ x ∈ μ, 0 < x) (hbound : ∀ x ∈ μ, x ≤ c) (hsum : μ.sum ≤ n) :
    Fintype.card {p : Nat.Partition n // μ ≤ p.parts ∧ ∀ x ∈ p.parts, x ≤ c} =
      Fintype.card {q : Nat.Partition (n - μ.sum) // ∀ x ∈ q.parts, x ≤ c}
nat_partition_card_le_fifty_sixIn LeanCombinatorics for TCS

For every m ≤ 56, the number of partitions of m is the m-th entry of the dynamic-programme table: p(m) = nat_partition_bounded_table 56 56 at index m. In particular p(56) = 526823.

theorem nat_partition_card_le_fifty_six (m : ℕ) (hm : m ≤ 56) :
    Fintype.card (Nat.Partition m) = (nat_partition_bounded_table 56 56).getD m 0
nat_sInf_le_sInf_of_subsetIn LeanCombinatorics for TCS

For any two predicates P and Q on ℕ, if Q implies P point-wise and there exists n satisfying Q, then the infimum of {n | P n} is at most the infimum of {n | Q n}.

theorem nat_sInf_le_sInf_of_subset (P Q : ℕ → Prop) (h_imp : ∀ n, Q n → P n) (h_nonempty : ∃ n, Q n) :
    sInf {n | P n} ≤ sInf {n | Q n}
necklace_cycle_lift_closingIn LeanCombinatorics for TCS

From a Hamilton cycle of the nonconstant-necklace graph Q_n (n prime ≥ 3) one can choose, in the cycle order, one nonconstant representative per necklace so that consecutive representatives differ in exactly one bit, the representatives lie in pairwise distinct necklaces, and there is a closing shift σ with 0<σ<n such that rotating u_0 by σ gives a word one flip from u_{m-1}.

theorem necklace_cycle_lift_closing (n : ℕ) (hn : n.Prime) (hge : 3 ≤ n)
    (hcycle : necklace_graph_has_hamilton_cycle n) :
    ∃ (u : ℕ → ℕ) (σ : ℕ),
      (∀ i < (2 ^ n - 2) / n, u i < 2 ^ n ∧ u i ≠ 0 ∧ u i ≠ 2 ^ n - 1) ∧
      (∀ i < (2 ^ n - 2) / n, ∀ j < (2 ^ n - 2) / n,
        i ≠ j → ¬ bitword_is_rotation n (u i) (u j)) ∧
      (∀ i < (2 ^ n - 2) / n - 1, ∃ k < n, u i ^^^ u (i + 1) = 2 ^ k) ∧
      (0 < σ ∧ σ < n) ∧
      (∃ k < n, (bitword_rotate n)^[σ] (u 0) ^^^ u ((2 ^ n - 2) / n - 1) = 2 ^ k)
no_strict_domination_injective_sum_eqIn LeanCombinatorics for TCS

Let $V$ be a finite nonempty type, $f : V \to V$ an injective map, and $g, h : V \to \mathbb{N}$ functions whose sums over $V$ are equal. Then it is not the case that $g(f(v)) < h(v)$ for all $v \in V$.

open Classical in
theorem no_strict_domination_injective_sum_eq {V : Type*} [Fintype V] [Nonempty V]
    (f : V → V) (hf : Function.Injective f) (g h : V → ℕ)
    (hsum : ∑ v : V, g v = ∑ v : V, h v) :
    ¬ (∀ v : V, g (f v) < h v)
nonnegative_quadratic_splitIn LeanCombinatorics for TCS

For nonnegative b and 0≤t≤1, there are nonnegative real x and y with x+y=b+1 and xy=tb.

theorem nonnegative_quadratic_split (b t : ℝ) (hb : 0 ≤ b) (ht0 : 0 ≤ t) (ht1 : t ≤ 1) :
    ∃ x y : ℝ, 0 ≤ x ∧ 0 ≤ y ∧ x + y = b + 1 ∧ x * y = t * b
not_has_clean_handshake_seq_complete_graphIn LeanCombinatorics for TCS

For every natural number $n$, there is no clean handshake sequence using $n$ gloves that covers all edges of the complete graph $K_{n+2}$.

theorem not_has_clean_handshake_seq_complete_graph (n : ℕ) :
    ¬ has_clean_handshake_seq (SimpleGraph.completeGraph (Fin (n + 2))) n
not_has_three_colored_anti_ramsey_five_threeIn LeanCombinatorics for TCS

The complete graph on 5 vertices does not admit a 3-edge-coloring such that every 3-vertex complete subgraph contains edges of all three colors.

theorem not_has_three_colored_anti_ramsey_five_three :
  ¬ has_three_colored_anti_ramsey 5 3
not_is_splitting_system_emptyIn LeanCombinatorics for TCS

The empty family of blocks is not an (n, t)-splitting system on [n] whenever t ≤ n.

theorem not_is_splitting_system_empty (n t : ℕ) (ht : t ≤ n) :
    ¬ is_splitting_system n t ∅
not_near_minimum_cycle_counting_bound_real_exponentIn LeanCombinatorics for TCS

The statement near_minimum_cycle_counting_bound_real_exponent is false: The statement is FALSE as formalized. The hypothesis hgirth : ∀ C ∈ D, gw ≤ ∑ e ∈ C, ω e constrains only the cycles that happen to lie in D. The paper's Lemma B.1 requires that EVERY cycle (circuit) of the graph has weight ≥ gw (gw is a lower bound on all cycle weights — essentially the weighted girth). Because D is an arbitrary family, one can simply exclude the short cycles and keep only the long ones, so the count exceeds (2m)^{2α}. Explicit counterexample: • V = Fin 9, G = ⊤ : SimpleGraph (Fin 9) (complete graph K_9). Then |E(G)| = C(9,2) = 36, so take m = 36 (hm : 1 ≤ 36, hm_edges : edgeFinset.card = 36 ≤ 36 both hold; Lean: (⊤ : SimpleGraph (Fin 9)).edgeFinset.card = 36 by decide). • ω : Sym2 V → ℝ, ω ≡ 1, so hω (0 ≤ ω e) holds. • gw = 9 > 0 (hgw), α = 1 (hα : 1 ≤ 1). • D = the Finset of edge sets of all Hamiltonian cycles of K_9. Each is p.toSubgraph.edgeSet for a Hamiltonian cycle walk p (closed walk through all 9 vertices), which is a cycle, i.e. p.IsCycle holds — so hD holds. • Each C ∈ D is a 9-cycle with all edges of weight 1, so ∑_{e∈C} ω e = 9 = gw ≥ gw: hgirth holds (all cycles IN D have weight exactly 9). • For α = 1 the filter keeps every C ∈ D, since 9 ≤ 1·9. Hence the filtered family is all of D, whose cardinality is the number of (undirected) Hamiltonian cycles of K_9 = (9−1)!/2 = 8!/2 = 20160. • But the claimed bound is (2m)^{2α} = (2·36)^{2·1} = 72² = 5184. • 20160 ≤ 5184 is FALSE, so the conclusion fails. Machine evidence (Lean, this session): experiment 26081 evaluates (with Lean's own evaluator) exactly 20160 distinct Hamiltonian-cycle edge sets from the 8! = 40320 cyclic orderings, and 20160 > (2*36)^2 = 5184 returns true; the arithmetic (2*(36:ℝ))^(2*(1:ℝ)) = 5184 and (20160:ℝ) > 5184 are proved by norm_num; and (⊤ : SimpleGraph (Fin 9)).edgeFinset.card = 36 is proved by decide. A SymPy search (experiment 26054) shows K_9 is the smallest complete graph where some fixed cycle length exceeds (2m)²: K_8's largest fixed-length cycle count is 2880 < 3136, so m = 36 is minimal. Root cause: with the D-only hypothesis, the 84 triangles of K_9 (weight 3 < 9) are simply not in D, so the unique-short-path lemma simple_graph_unique_path_of_weight_lt_half_girth (whose hypothesis is that ALL cycles have weight ≥ gw) does not apply to this graph at gw = 9. The paper's bound presupposes exactly that no shorter cycles exist to "beat" the chosen ones; removing them from D invalidates it.

open scoped BigOperators in
open Classical in
theorem not_near_minimum_cycle_counting_bound_real_exponent : ¬ (∀ {V : Type*} (G : SimpleGraph V)
    [Fintype G.edgeSet] (m : ℕ) (hm : 1 ≤ m) (hm_edges : G.edgeFinset.card ≤ m)
    (ω : Sym2 V → ℝ) (hω : ∀ e ∈ G.edgeSet, 0 ≤ ω e)
    (gw : ℝ) (hgw : 0 < gw)
    (D : Finset (Finset (Sym2 V)))
    (hD : ∀ C ∈ D, ∃ (u : V) (p : G.Walk u u), p.IsCycle ∧ (C : Set (Sym2 V)) = p.toSubgraph.edgeSet)
    (hgirth : ∀ C ∈ D, gw ≤ ∑ e ∈ C, ω e)
    (α : ℝ) (hα : 1 ≤ α), ((D.filter (fun C => ∑ e ∈ C, ω e ≤ α * gw)).card : ℝ) ≤
      (2 * (m : ℝ)) ^ (2 * α))
nterm_zero_sum_free_count_le_predIn LeanCombinatorics for TCS

Let G be an additive commutative monoid of exponent n ≥ 1 and let S be a multiset over G containing no submultiset of cardinality n whose sum is 0. Then no element occurs n times in S: every multiplicity is at most n-1.

theorem nterm_zero_sum_free_count_le_pred {G : Type*} [AddCommMonoid G] [DecidableEq G] {n : ℕ} [NeZero n]
    (hexp : AddMonoid.exponent G = n) (S : Multiset G)
    (hS_zs : 0 ∉ ((S.powersetCard n).map Multiset.sum).toFinset) (x : G) :
    S.count x ≤ n - 1
nterm_zero_sum_threshold_sInf_specIn LeanCombinatorics for TCS

Let K = {k : ℕ | every multiset of k elements of (Z/nZ)^r has a submultiset of cardinality n whose sum is 0}, i.e. K is the set of lengths that force an n-term zero-sum (sInf K = s(G), the Erdős–Ginzburg–Ziv constant of (Z/nZ)^r). Then K is nonempty, its infimum belongs to K, and sInf K ≥ 1.

theorem nterm_zero_sum_threshold_sInf_spec (n r : ℕ) [NeZero n] :
    (sInf { k : ℕ | ∀ S' : Multiset (Fin r → ZMod n), S'.card = k → ∃ T ≤ S', T.card = n ∧ T.sum = 0 }
      ∈ { k : ℕ | ∀ S' : Multiset (Fin r → ZMod n), S'.card = k → ∃ T ≤ S', T.card = n ∧ T.sum = 0 })
    ∧ 1 ≤ sInf { k : ℕ | ∀ S' : Multiset (Fin r → ZMod n), S'.card = k → ∃ T ≤ S', T.card = n ∧ T.sum = 0 }
numerical_semigroup_eq_of_subset_genus_eqIn LeanCombinatorics for TCS

If S1 and S2 are numerical semigroups with S1 ⊆ S2 and both have the same genus, then S1 = S2.

theorem numerical_semigroup_eq_of_subset_genus_eq
    (S1 S2 : NumericalSemigroup)
    (hsub : (S1.toAddSubmonoid : Set ℕ) ⊆ (S2.toAddSubmonoid : Set ℕ))
    (hgen : numerical_semigroup_genus S1 = numerical_semigroup_genus S2) :
    S1 = S2
numerical_semigroup_exists_iff_frobenius_multiplicity_genusIn LeanCombinatorics for TCS

Let F, m, g be positive integers. There exists a numerical semigroup S with Frobenius number F, multiplicity m, and genus g if and only if either: (1) g = F and m = F + 1; or (2) F + 1 ≤ 2 * g, g ≤ F - 1, 2 ≤ m ≤ F - 1, m ≤ g ≤ F - F / m, and m does not divide F.

theorem numerical_semigroup_exists_iff_frobenius_multiplicity_genus
    (F m g : ℕ) (hF : 0 < F) (hm : 0 < m) (hg : 0 < g) :
    (∃ S : NumericalSemigroup,
      numerical_semigroup_frobenius_number S = F ∧
      numerical_semigroup_multiplicity S = m ∧
      numerical_semigroup_genus S = g) ↔
    (g = F ∧ m = F + 1) ∨
    (F + 1 ≤ 2 * g ∧ g ≤ F - 1 ∧ 2 ≤ m ∧ m ≤ F - 1 ∧ m ≤ g ∧ g ≤ F - F / m ∧ ¬ m ∣ F)
numerical_semigroup_high_mult_candidate_invariantsIn LeanCombinatorics for TCS

If a numerical semigroup S has carrier {0} ∪ Set.Ico m F ∪ Set.Ici (F + 1) with 2 ≤ m ≤ F - 1, then its Frobenius number is F, its multiplicity is m, and its genus is m.

theorem numerical_semigroup_high_mult_candidate_invariants
    (F m : ℕ) (hm : 2 ≤ m) (hmF : m ≤ F - 1)
    (S : NumericalSemigroup)
    (hS : (S.toAddSubmonoid : Set ℕ) = {0} ∪ Set.Ico m F ∪ Set.Ici (F + 1)) :
    numerical_semigroup_frobenius_number S = F ∧
    numerical_semigroup_multiplicity S = m ∧
    numerical_semigroup_genus S = m
numerical_semigroup_high_mult_candidate_is_semigroup_iffIn LeanCombinatorics for TCS

Let F and m be natural numbers with 2 ≤ m ≤ F - 1, and let S = {0} ∪ Set.Ico m F ∪ Set.Ici (F + 1). Then S is a numerical semigroup (i.e. the carrier of some NumericalSemigroup) if and only if F + 1 ≤ 2 * m.

theorem numerical_semigroup_high_mult_candidate_is_semigroup_iff
    (F m : ℕ) (hm : 2 ≤ m) (hmF : m ≤ F - 1) :
    let S : Set ℕ := {0} ∪ Set.Ico m F ∪ Set.Ici (F + 1)
    (∃ S_ns : NumericalSemigroup, (S_ns.toAddSubmonoid : Set ℕ) = S) ↔ F + 1 ≤ 2 * m
numerical_semigroup_high_multiplicity_minimal_genus_uniqueIn LeanCombinatorics for TCS

Let F and m be natural numbers with 2 ≤ m ≤ F - 1, and consider the set S = {0} ∪ Set.Ico m F ∪ Set.Ici (F + 1). Then: (1) S is a numerical semigroup if and only if F + 1 ≤ 2 * m; (2) If F + 1 ≤ 2 * m, then there exists a numerical semigroup with carrier S having Frobenius number F, multiplicity m, and genus m, and any numerical semigroup with Frobenius number F, multiplicity m, and genus m has carrier S.

theorem numerical_semigroup_high_multiplicity_minimal_genus_unique
    (F m : ℕ) (hm : 2 ≤ m) (hmF : m ≤ F - 1) :
    let S : Set ℕ := {0} ∪ Set.Ico m F ∪ Set.Ici (F + 1)
    ((∃ S_ns : NumericalSemigroup, (S_ns.toAddSubmonoid : Set ℕ) = S) ↔ F + 1 ≤ 2 * m) ∧
    (F + 1 ≤ 2 * m →
      (∃ S_ns : NumericalSemigroup,
        (S_ns.toAddSubmonoid : Set ℕ) = S ∧
        numerical_semigroup_frobenius_number S_ns = F ∧
        numerical_semigroup_multiplicity S_ns = m ∧
        numerical_semigroup_genus S_ns = m) ∧
      ∀ S' : NumericalSemigroup,
        numerical_semigroup_frobenius_number S' = F →
        numerical_semigroup_multiplicity S' = m →
        numerical_semigroup_genus S' = m →
        (S'.toAddSubmonoid : Set ℕ) = S)
numerical_semigroup_subset_high_mult_candidateIn LeanCombinatorics for TCS

Every numerical semigroup S with Frobenius number F and multiplicity m satisfying 2 ≤ m ≤ F - 1 is contained in {0} ∪ Set.Ico m F ∪ Set.Ici (F + 1).

theorem numerical_semigroup_subset_high_mult_candidate
    (S : NumericalSemigroup) (F m : ℕ) (hm : 2 ≤ m) (hmF : m ≤ F - 1)
    (hfrob : numerical_semigroup_frobenius_number S = F)
    (hmult : numerical_semigroup_multiplicity S = m) :
    (S.toAddSubmonoid : Set ℕ) ⊆ {0} ∪ Set.Ico m F ∪ Set.Ici (F + 1)
nus_min_card_ge_near_quadraticIn LeanCombinatorics for TCS

There is an absolute constant C > 0 (explicitly C = 2⁻⁸⁰) with m(p) ≥ C (log p / log log p)² for every prime p ≥ 64. Published theorem of Hou–Yang; not yet formalized anywhere.

theorem nus_min_card_ge_near_quadratic :
    ∃ C : ℝ, 0 < C ∧ ∃ p₀ : ℕ, ∀ p : ℕ, p₀ ≤ p → p.Prime →
      C * (Real.log p / Real.log (Real.log p)) ^ 2 ≤ (nus_min_card p : ℝ)
nus_min_card_rank_hadamard_boundIn LeanCombinatorics for TCS

There is an absolute constant K ≥ 1 such that for every prime p and every A ⊆ Z/pZ with no unique sums, log p ≤ K(√|A| + |A|/log p)·log|A|.

theorem nus_min_card_rank_hadamard_bound :
    ∃ K : ℝ, 1 ≤ K ∧ ∀ (p : ℕ), p.Prime → ∀ A : Finset (ZMod p), finset_has_no_unique_sums A →
      Real.log p ≤ K * (Real.sqrt (A.card : ℝ) + (A.card : ℝ) / Real.log p) * Real.log (A.card : ℝ)
odd_component_satisfies_recurrence_2_1In LeanCombinatorics for TCS

Let N ≥ 2, and let a, c : Fin (2 * N + 1) → ℝ satisfy condition (2.1) of size 2N with b = fun _ => 0. Then (odd_component_a N a, odd_component_b N a c, odd_component_c N a c) satisfies condition (2.1) of size N - 1.

theorem odd_component_satisfies_recurrence_2_1
    (N : ℕ) (hN : 2 ≤ N) (a c : Fin (2 * N + 1) → ℝ)
    (hrec : satisfies_recurrence_2_1 (2 * N) a (fun _ => 0) c) :
    satisfies_recurrence_2_1 (N - 1) (odd_component_a N a) (odd_component_b N a c) (odd_component_c N a c)
one_dim_ap_tile_enumerationIn LeanCombinatorics for TCS

For every positive natural number n, one_dim_ap_tile_count n equals the sum over k ∈ Finset.Icc 1 n of (n / k)^(k - (n - k * (n / k))) * (n / k + 1)^(n - k * (n / k)).

open scoped BigOperators in
theorem one_dim_ap_tile_enumeration (n : ℕ) (hn : 0 < n) :
    one_dim_ap_tile_count n =
      ∑ k ∈ Finset.Icc 1 n,
        (n / k) ^ (k - (n - k * (n / k))) * (n / k + 1) ^ (n - k * (n / k))
one_uniform_flower_free_card_leIn LeanCombinatorics for TCS

Let S be a 1-uniform family of finite sets (every member of S has cardinality 1) that contains no r-flower (no subfamily F of S of cardinality r is a sunflower with some kernel C). Then S.card ≤ r - 1.

theorem one_uniform_flower_free_card_le {α : Type*} [DecidableEq α] {r : ℕ} (S : Finset (Finset α))
    (h1 : ∀ A ∈ S, A.card = 1)
    (hfree : ¬ ∃ F ⊆ S, F.card = r ∧ ∃ C, IsSunflower F C) :
    S.card ≤ r - 1
one_uniform_ground_set_cardIn LeanCombinatorics for TCS

Let S be a finite family of singletons (that is, every A in S has cardinality 1). Then the ground set (S.biUnion id) has cardinality equal to S.card.

theorem one_uniform_ground_set_card {α : Type*} [DecidableEq α] (S : Finset (Finset α))
    (h1 : ∀ A ∈ S, A.card = 1) :
    (S.biUnion id).card = S.card
op1370_lifting_config_baseIn LeanCombinatorics for TCS

There exists an inductive lifting configuration in dimension 6 satisfying all 19 invariants of op1370_lifting_config.

theorem op1370_lifting_config_base : op1370_lifting_config 6
op1370_lifting_config_stepIn LeanCombinatorics for TCS

If an inductive lifting configuration exists in dimension n (with n ≥ 6), then one exists in dimension n+1.

theorem op1370_lifting_config_step (n : ℕ) (hn : 6 ≤ n) (h : op1370_lifting_config n) : op1370_lifting_config (n + 1)
op1525_lower_incidence_descendsIn LeanCombinatorics for TCS

If an integer function on finite subsets is supported on k-element sets and its sum over supersets is zero at every (k−1)-element set, then the same sum vanishes at every set of cardinality less than k.

theorem op1525_lower_incidence_descends {V : Type} [DecidableEq V] [Fintype V]
    (f : Finset V → ℤ) (k : ℕ)
    (hsupport : ∀ T, f T ≠ 0 → T.card = k)
    (htop : ∀ R : Finset V, R.card + 1 = k →
      (∑ T ∈ (Finset.univ : Finset V).powerset, if R ⊆ T then f T else 0) = 0) :
    ∀ R : Finset V, R.card < k →
      (∑ T ∈ (Finset.univ : Finset V).powerset, if R ⊆ T then f T else 0) = 0
op1525_odd_subset_complement_countsIn LeanCombinatorics for TCS

For two equally indexed families of k-element subsets of a finite set, with k odd, equality of the number of family members containing each (k−1)-element subset implies that, for every subset S, the number of members contained in S or in its complement, counted with multiplicity, agrees between the families.

theorem op1525_odd_subset_complement_counts
    {V I : Type} [DecidableEq V] [Fintype V] [Fintype I]
    (A B : I → Finset V) (k : ℕ)
    (hodd : Odd k)
    (hcardA : ∀ i, (A i).card = k) (hcardB : ∀ i, (B i).card = k)
    (hlow : ∀ R : Finset V, R.card + 1 = k →
      (∑ i, if R ⊆ A i then (1 : ℤ) else 0) =
        ∑ i, if R ⊆ B i then (1 : ℤ) else 0) :
    ∀ S : Finset V,
      (∑ i, ((if A i ⊆ S then (1 : ℤ) else 0) +
             (if A i ⊆ (Finset.univ \ S) then 1 else 0))) =
      ∑ i, ((if B i ⊆ S then (1 : ℤ) else 0) +
             (if B i ⊆ (Finset.univ \ S) then 1 else 0))
op314_end_antichain_caseIn LeanCombinatorics for TCS

If α is an antichain (a ≤ b implies b ≤ a) and the endomorphism posets of the finite nonempty partial orders α and β are order-isomorphic, then α and β are order-isomorphic.

theorem op314_end_antichain_case {α β : Type*} [PartialOrder α] [Fintype α] [Nonempty α] [PartialOrder β] [Fintype β] [Nonempty β] (hanti : ∀ a b : α, a ≤ b → b ≤ a) (h : Nonempty ((α →o α) ≃o (β →o β))) : Nonempty (α ≃o β)
op314_end_height_size_invariantIn LeanCombinatorics for TCS

If α and β are finite nonempty partial orders with order-isomorphic endomorphism posets and 1 ≤ height(α), then 1 ≤ height(β) and |α| · height(α) = |β| · height(β).

theorem op314_end_height_size_invariant {α β : Type*} [PartialOrder α] [Fintype α] [Nonempty α] [PartialOrder β] [Fintype β] [Nonempty β] (h : Nonempty ((α →o α) ≃o (β →o β))) (hh : 1 ≤ poset_height α) : 1 ≤ poset_height β ∧ Nat.card α * poset_height α = Nat.card β * poset_height β
op314_poset_tower_two_iso_endIn LeanCombinatorics for TCS

For partial orders α and β, there is an order-isomorphism poset_tower α 2 ≃o poset_tower β 2 if and only if there is an order-isomorphism (α →o α) ≃o (β →o β) between the endomorphism posets.

theorem op314_poset_tower_two_iso_end {α β : Type*} [PartialOrder α] [PartialOrder β] : Nonempty (poset_tower α 2 ≃o poset_tower β 2) ↔ Nonempty ((α →o α) ≃o (β →o β))
op462_exists_gale_counterexample_lt_sixty_fiveIn LeanCombinatorics for TCS

There exists a finite counterexample to Gale's conjecture in dimension 3 with cardinality strictly less than 65.

theorem op462_exists_gale_counterexample_lt_sixty_five : ∃ V : Finset (EuclideanSpace ℝ (Fin 3)), V.card < 65 ∧ is_gale_counterexample_three V
op462_lt65_of_integer_witnessIn LeanCombinatorics for TCS

An integer coordinate certificate on fewer than 65 indexed points, with unit diameter bound, a strict threshold gap, and a non-four-colorable edge graph, implies min_gale_counterexample_card_three < 65.

theorem op462_lt65_of_integer_witness (n : ℕ) (hn : n < 65) (S Q : ℤ) (hS : 0 < S) (P : Fin n → Fin 3 → ℤ) (E : List (Fin n × Fin n)) (hunit : ∀ i j, (∑ k : Fin 3, (P i k - P j k)^2) ≤ S^2) (hedge : E.all (fun e => decide (Q ≤ ∑ k : Fin 3, (P e.1 k - P e.2 k)^2)) = true) (hgap : gale_sigma_three^2 < (Q : ℝ) / (S : ℝ)^2) (hnotcolor : ∀ c : Fin n → Fin 4, (∀ e ∈ E, c e.1 ≠ c e.2) → False) (a b : Fin n) (hab : (a,b) ∈ E) : min_gale_counterexample_card_three < 65
op462_lt_sixty_five_of_exists_counterexampleIn LeanCombinatorics for TCS

If there exists a finite counterexample to Gale's conjecture in dimension 3 with cardinality strictly less than 65, then min_gale_counterexample_card_three < 65.

theorem op462_lt_sixty_five_of_exists_counterexample (h : ∃ V : Finset (EuclideanSpace ℝ (Fin 3)), V.card < 65 ∧ is_gale_counterexample_three V) : min_gale_counterexample_card_three < 65
op_1370_global_uncomplemented_boundIn LeanCombinatorics for TCS

For at least two nonempty mutually strongly incomparable families of subsets of an n-element set, if their entire union is uncomplemented, then their total size is at most 2^(n-1)-1.

theorem op_1370_global_uncomplemented_bound (n t : ℕ) (ht : 2 ≤ t) (𝒜 : Fin t → Finset (Finset (Fin n))) (hne : ∀ i, (𝒜 i).Nonempty) (hinc : strongly_incomparable 𝒜) (hunc : is_uncomplemented (Finset.univ.biUnion 𝒜)) : ∑ i, (𝒜 i).card ≤ 2 ^ (n - 1) - 1
op_1370_no_private_fiber_countIn LeanCombinatorics for TCS

Let at least two nonempty families of subsets of Fin n be mutually strongly incomparable, and suppose the element x occurs in sets in at least two different families and is absent from sets in at least two different families. Count one double fiber for each set containing x whose deletion of x is also in the union of the families. Then the total number of members plus two is at most 2^(n-1) plus the number of double fibers. No uncomplementedness assumption is required.

theorem op_1370_no_private_fiber_count (n t : ℕ) (ht : 2 ≤ t) (𝒜 : Fin t → Finset (Finset (Fin n))) (hne : ∀ i, (𝒜 i).Nonempty) (hinc : strongly_incomparable 𝒜) (x : Fin n) (hpos : ∃ i j : Fin t, i ≠ j ∧ (∃ S ∈ 𝒜 i, x ∈ S) ∧ (∃ T ∈ 𝒜 j, x ∈ T)) (hneg : ∃ i j : Fin t, i ≠ j ∧ (∃ S ∈ 𝒜 i, x ∉ S) ∧ (∃ T ∈ 𝒜 j, x ∉ T)) : let U := Finset.univ.biUnion 𝒜; (∑ i, (𝒜 i).card) + 2 ≤ 2 ^ (n - 1) + (U.filter fun S => x ∈ S ∧ S.erase x ∈ U).card
op_1370_no_private_stabilityIn LeanCombinatorics for TCS

For nonempty uncomplemented mutually strongly incomparable families in the range of OP-1370, suppose every ground element appears in sets of at least two families and is absent from sets of at least two families. Then their total size is at most 2^(n-1)-2.

theorem op_1370_no_private_stability (n t : ℕ) (hn : 3 ≤ n) (ht : 3 ≤ t) (htn : t ≤ n) (𝒜 : Fin t → Finset (Finset (Fin n))) (hne : ∀ i, (𝒜 i).Nonempty) (hunc : ∀ i, is_uncomplemented (𝒜 i)) (hinc : strongly_incomparable 𝒜) (hpos : ∀ x, ∃ i j : Fin t, i ≠ j ∧ (∃ S ∈ 𝒜 i, x ∈ S) ∧ (∃ T ∈ 𝒜 j, x ∈ T)) (hneg : ∀ x, ∃ i j : Fin t, i ≠ j ∧ (∃ S ∈ 𝒜 i, x ∉ S) ∧ (∃ T ∈ 𝒜 j, x ∉ T)) : ∑ i, (𝒜 i).card ≤ 2 ^ (n - 1) - 2
op_1370_shatterer_complement_closure_cardIn LeanCombinatorics for TCS

For every finite set family on Fin n, the number of sets in the family or its set-complement image is at most the number of sets in the family of shattered sets or its set-complement image.

theorem op_1370_shatterer_complement_closure_card (n : ℕ) (F : Finset (Finset (Fin n))) : (F ∪ F.image compl).card ≤ (F.shatterer ∪ F.shatterer.image compl).card
op_1370_uncomplemented_group_private_boundIn LeanCombinatorics for TCS

For nonempty mutually strongly incomparable families, suppose a nonempty group of families has uncomplemented union, at least two families lie outside the group, and a ground element occurs only within the group. Then the total size is at most 2^(n-1)-1.

theorem op_1370_uncomplemented_group_private_bound (n t : ℕ) (𝒜 : Fin t → Finset (Finset (Fin n))) (hne : ∀ i, (𝒜 i).Nonempty) (hinc : strongly_incomparable 𝒜) (s : Finset (Fin t)) (hs : s.Nonempty) (hout : 2 ≤ (Finset.univ \ s).card) (x : Fin n) (hunc : is_uncomplemented (s.biUnion 𝒜)) (hx : ∀ j, j ∉ s → ∀ S ∈ 𝒜 j, x ∉ S) : ∑ j, (𝒜 j).card ≤ 2 ^ (n - 1) - 1
op_1423_admissible_triple_closureIn LeanCombinatorics for TCS

The union A ∪ B ∪ C of an admissible triple consists of elements of [1,F), is nonempty (it contains m), and is closed under sums at most F.

theorem op_1423_admissible_triple_closure (F m g : ℕ) (hm : 1 ≤ m) (hlow : 3*m ≤ F) (hhigh : F < 4*m)
    (t : (Finset ℕ × Finset ℕ) × Finset ℕ) (ht : t ∈ op_1423_admissible_triples F m g) :
    (∀ x ∈ t.1.1 ∪ t.1.2 ∪ t.2, 1 ≤ x ∧ x < F) ∧
    (t.1.1 ∪ t.1.2 ∪ t.2).Nonempty ∧
    (∀ x ∈ t.1.1 ∪ t.1.2 ∪ t.2, ∀ y ∈ t.1.1 ∪ t.1.2 ∪ t.2,
      x + y ≤ F → x + y ∈ t.1.1 ∪ t.1.2 ∪ t.2)
op_1423_admissible_triple_exists_semigroupIn LeanCombinatorics for TCS

Every admissible triple is the band trace triple of some numerical semigroup with Frobenius number F, multiplicity m and genus g.

theorem op_1423_admissible_triple_exists_semigroup (F m g : ℕ) (hm : 1 ≤ m) (hlow : 3*m ≤ F) (hhigh : F < 4*m)
    (t : (Finset ℕ × Finset ℕ) × Finset ℕ) (ht : t ∈ op_1423_admissible_triples F m g) :
    ∃ S : NumericalSemigroup, numerical_semigroup_frobenius_number S = F ∧
      numerical_semigroup_multiplicity S = m ∧ numerical_semigroup_genus S = g ∧
      op_1423_trace_triple F m S = t
op_1423_card_fiber_eq_chooseIn LeanCombinatorics for TCS

For fixed A (a subset of [m,2m) containing m) and B ⊆ [2m,3m), the number of admissible triples with those two components equals the target summand: zero when the guard fails, and otherwise C(F − 3m − |P|, F − g − |A| − |B| − |P|) where P is the set of forced third-band sums.

theorem op_1423_card_fiber_eq_choose (F m g : ℕ) (hm : 1 ≤ m) (hlow : 3*m ≤ F)
    (A B : Finset ℕ) (hA : A ⊆ Finset.Ico m (2*m)) (hmA : m ∈ A) (hB : B ⊆ Finset.Ico (2*m) (3*m)) :
    ((op_1423_admissible_triples F m g).filter (fun t => t.1 = (A, B))).card =
      (let AA := Finset.image₂ (fun a b : ℕ => a+b) A A
       let AB := Finset.image₂ (fun a b : ℕ => a+b) A B
       let P := (AA ∪ AB).filter (fun x => 3*m ≤ x ∧ x < F)
       if F ∉ AA ∧ F ∉ AB ∧ AA ∩ Finset.Ico (2*m) (3*m) ⊆ B ∧
          g + A.card + B.card + P.card ≤ F then
         Nat.choose (F - 3*m - P.card) (F - (g + A.card + B.card + P.card))
       else 0)
op_1423_card_powerset_card_subsetIn LeanCombinatorics for TCS

For P ⊆ s and |P| ≤ k, the number of k-element subsets of s containing P is C(|s| − |P|, k − |P|).

theorem op_1423_card_powerset_card_subset (s P : Finset ℕ) (k : ℕ) (hP : P ⊆ s) (hk : P.card ≤ k) :
    (s.powerset.filter (fun C => P ⊆ C ∧ C.card = k)).card = Nat.choose (s.card - P.card) (k - P.card)
op_1423_eq_of_trace_eqIn LeanCombinatorics for TCS

Two numerical semigroups with the same Frobenius number F > 0 and the same members below F are equal.

theorem op_1423_eq_of_trace_eq (S T : NumericalSemigroup) (F : ℕ) (hF : 0 < F)
    (hS : numerical_semigroup_frobenius_number S = F)
    (hT : numerical_semigroup_frobenius_number T = F)
    (h : ∀ n, n < F → (n ∈ (S.toAddSubmonoid : Set ℕ) ↔ n ∈ (T.toAddSubmonoid : Set ℕ))) :
    S = T
op_1423_exists_closure_semigroupIn LeanCombinatorics for TCS

If T ⊆ [1,F) is closed under sums at most F, then there is a numerical semigroup whose carrier is exactly {0} ∪ T ∪ (F,∞).

theorem op_1423_exists_closure_semigroup (F : ℕ) (T : Finset ℕ)
    (hlo : ∀ x ∈ T, 1 ≤ x) (hhi : ∀ x ∈ T, x < F)
    (hcl : ∀ x ∈ T, ∀ y ∈ T, x + y ≤ F → x + y ∈ T) :
    ∃ S : NumericalSemigroup, (S.toAddSubmonoid : Set ℕ) = {n : ℕ | n = 0 ∨ n ∈ T ∨ F < n}
op_1423_gaps_eqIn LeanCombinatorics for TCS

For a numerical semigroup S with positive Frobenius number F: the gap set (complement of S) is exactly Ico 1 (F+1) minus S, every gap is ≤ F, F itself is a gap, and every n > F lies in S.

theorem op_1423_gaps_eq (S : NumericalSemigroup) (F : ℕ) (hF : 0 < F)
    (hfrob : numerical_semigroup_frobenius_number S = F) :
    ((S.toAddSubmonoid : Set ℕ)ᶜ) = (((Finset.Ico 1 (F+1) : Finset ℕ) : Set ℕ) \ (S.toAddSubmonoid : Set ℕ)) ∧
    (∀ n, n ∉ (S.toAddSubmonoid : Set ℕ) → n ≤ F) ∧
    F ∉ (S.toAddSubmonoid : Set ℕ) ∧
    (∀ n, F < n → n ∈ (S.toAddSubmonoid : Set ℕ))
op_1423_genus_eqIn LeanCombinatorics for TCS

For a numerical semigroup S with Frobenius number F > 0, the genus equals F minus the number of nongaps in Ico 1 F.

theorem op_1423_genus_eq (S : NumericalSemigroup) (F : ℕ) (hF : 0 < F)
    (hfrob : numerical_semigroup_frobenius_number S = F) :
    numerical_semigroup_genus S = F - ((((Finset.Ico 1 F : Finset ℕ) : Set ℕ)) ∩ (S.toAddSubmonoid : Set ℕ)).ncard
op_1423_mult_propsIn LeanCombinatorics for TCS

If m > 0 is the multiplicity of a numerical semigroup S, then m ∈ S and m is the least positive element of S.

theorem op_1423_mult_props (S : NumericalSemigroup) (m : ℕ) (hm : 0 < m)
    (hmult : numerical_semigroup_multiplicity S = m) :
    m ∈ (S.toAddSubmonoid : Set ℕ) ∧ ∀ x ∈ (S.toAddSubmonoid : Set ℕ), 0 < x → m ≤ x
op_1423_ncard_eq_card_triplesIn LeanCombinatorics for TCS

Numerical semigroups with Frobenius number F, multiplicity m and genus g are in bijection with the admissible band triples, so the two cardinalities agree.

theorem op_1423_ncard_eq_card_triples (F m g : ℕ) (hm : 1 ≤ m) (hlow : 3*m ≤ F) (hhigh : F < 4*m) :
    {S : NumericalSemigroup | numerical_semigroup_frobenius_number S = F ∧
      numerical_semigroup_multiplicity S = m ∧ numerical_semigroup_genus S = g}.ncard
    = (op_1423_admissible_triples F m g).card
op_1423_sum_eq_card_triplesIn LeanCombinatorics for TCS

The cardinality of the admissible triple set equals the displayed double sum of binomial coefficients over A and B.

theorem op_1423_sum_eq_card_triples (F m g : ℕ) (hm : 1 ≤ m) (hlow : 3*m ≤ F) :
    (op_1423_admissible_triples F m g).card =
      ∑ A ∈ (Finset.Ico m (2*m)).powerset.filter (fun A => m ∈ A),
        ∑ B ∈ (Finset.Ico (2*m) (3*m)).powerset,
          (let AA := Finset.image₂ (fun a b : ℕ => a+b) A A
           let AB := Finset.image₂ (fun a b : ℕ => a+b) A B
           let P := (AA ∪ AB).filter (fun x => 3*m ≤ x ∧ x < F)
           if F ∉ AA ∧ F ∉ AB ∧ AA ∩ Finset.Ico (2*m) (3*m) ⊆ B ∧
              g + A.card + B.card + P.card ≤ F then
             Nat.choose (F - 3*m - P.card) (F - (g + A.card + B.card + P.card))
           else 0)
op_1423_trace_card_sumIn LeanCombinatorics for TCS

Under 1 ≤ m and 3m ≤ F, the three band cards of the trace triple of a numerical semigroup of multiplicity m add up to the number of nongaps in [1,F).

theorem op_1423_trace_card_sum (F m : ℕ) (hm : 1 ≤ m) (hlow : 3*m ≤ F)
    (S : NumericalSemigroup) (hmult : numerical_semigroup_multiplicity S = m) :
    (op_1423_trace_triple F m S).1.1.card + (op_1423_trace_triple F m S).1.2.card
      + (op_1423_trace_triple F m S).2.card
      = (((Finset.Ico 1 F : Finset ℕ) : Set ℕ) ∩ (S.toAddSubmonoid : Set ℕ)).ncard
op_1423_trace_propsIn LeanCombinatorics for TCS

If a numerical semigroup S has carrier exactly {0} ∪ T ∪ (F,∞) with ∅ ≠ T ⊆ [1,F) and F ≥ 1, then its Frobenius number is F, its genus is F − |T|, and its multiplicity is min T.

theorem op_1423_trace_props (F : ℕ) (hF : 1 ≤ F) (S : NumericalSemigroup) (T : Finset ℕ)
    (hT : T ⊆ Finset.Ico 1 F) (hne : T.Nonempty)
    (hS : (S.toAddSubmonoid : Set ℕ) = {n : ℕ | n = 0 ∨ n ∈ T ∨ F < n}) :
    numerical_semigroup_frobenius_number S = F ∧
    numerical_semigroup_genus S = F - T.card ∧
    numerical_semigroup_multiplicity S = T.min' hne
op_1423_trace_triple_mem_admissibleIn LeanCombinatorics for TCS

The band trace triple of a numerical semigroup with Frobenius number F, multiplicity m and genus g (where 1 ≤ m and 3m ≤ F < 4m) is an admissible triple.

theorem op_1423_trace_triple_mem_admissible (F m g : ℕ) (hm : 1 ≤ m) (hlow : 3*m ≤ F) (hhigh : F < 4*m)
    (S : NumericalSemigroup) (hfrob : numerical_semigroup_frobenius_number S = F)
    (hmult : numerical_semigroup_multiplicity S = m) (hgen : numerical_semigroup_genus S = g) :
    op_1423_trace_triple F m S ∈ op_1423_admissible_triples F m g
op_1423_trace_triple_specIn LeanCombinatorics for TCS

For m ≤ n < F, n lies in one of the three bands of the trace triple of S iff n lies in S.

theorem op_1423_trace_triple_spec (F m : ℕ) (S : NumericalSemigroup) (n : ℕ) (h1 : m ≤ n) (h2 : n < F) :
    (n ∈ (op_1423_trace_triple F m S).1.1 ∨ n ∈ (op_1423_trace_triple F m S).1.2 ∨
      n ∈ (op_1423_trace_triple F m S).2) ↔ n ∈ (S.toAddSubmonoid : Set ℕ)
op_1430_leafy_tree_cardIn LeanCombinatorics for TCS

For m ≥ 1 and n ≥ 1, the number of m-leafy trees with n internal vertices and mn + 1 leaves is ((m + 1) * Nat.choose ((m + 1)^2 * n + m) (n - 1)) / (n * (m * n + 1)).

theorem op_1430_leafy_tree_card (m n : ℕ) (hm : 1 ≤ m) (hn : 1 ≤ n) [Fintype (MLeafyTree m n)] :
    Fintype.card (MLeafyTree m n) = ((m + 1) * Nat.choose ((m + 1)^2 * n + m) (n - 1)) / (n * (m * n + 1))
op_1453_zycle_four_codegree_density_geIn LeanCombinatorics for TCS

For any ε > 0, for all sufficiently large n, the normalized codegree extremal number of the 4-zycle Z₄ is at least 1/3 - ε. This lower bound comes from the cyclic 3-part construction of Piga and Schülke (2026).

theorem op_1453_zycle_four_codegree_density_ge :
    ∀ ε > 0, ∀ᶠ (n : ℕ) in Filter.atTop, (1 / 3 : ℝ) - ε ≤ codegree_extremal_number n (zycle 4) / (n : ℝ)
op_1453_zycle_four_codegree_density_leIn LeanCombinatorics for TCS

For any ε > 0, for all sufficiently large n, the normalized codegree extremal number of the 4-zycle Z₄ is at most 1/3 + ε. This is an open problem (Problem 5.1 in arXiv:2611.12582).

theorem op_1453_zycle_four_codegree_density_le :
    ∀ ε > 0, ∀ᶠ (n : ℕ) in Filter.atTop, codegree_extremal_number n (zycle 4) / (n : ℝ) ≤ (1 / 3 : ℝ) + ε
op_1453_zycle_six_codegree_density_existsIn LeanCombinatorics for TCS

There exists a real number γ such that the sequence codegree_extremal_number n (zycle 6) / n converges to γ along Filter.atTop. The existence of this limit for any fixed 3-graph is guaranteed by the Mubayi–Zhao limit theorem (2007).

theorem op_1453_zycle_six_codegree_density_exists :
    ∃ γ : ℝ, Filter.Tendsto (fun n : ℕ => codegree_extremal_number n (zycle 6) / (n : ℝ)) Filter.atTop (nhds γ)
op_1453_zycle_six_codegree_density_leIn LeanCombinatorics for TCS

For any ε > 0, for all sufficiently large n, the normalized codegree extremal number of the 6-zycle Z₆ is at most 1/3 + ε. This is an open problem (Problem 5.1 in arXiv:2611.12582).

theorem op_1453_zycle_six_codegree_density_le :
    ∀ ε > 0, ∀ᶠ (n : ℕ) in Filter.atTop, codegree_extremal_number n (zycle 6) / (n : ℝ) ≤ (1 / 3 : ℝ) + ε
op_1459_binary_critical_exponent_eq_zero_or_ge_twoIn LeanCombinatorics for TCS

Every binary critical exponent is either 0 or at least 2: every infinite binary word contains a square (either two equal adjacent letters, or, if the word never has two equal adjacent letters, it alternates and contains (ab)²), and a square contributes the ratio 2 to the ratio set. This refines the d = 2 instance of the pigeonhole bound from 3/2 to 2.

theorem op_1459_binary_critical_exponent_eq_zero_or_ge_two (w : ℕ → Fin 2) : word_critical_exponent w = 0 ∨ 2 ≤ word_critical_exponent w
op_1459_critical_exponent_eq_zero_or_pigeonhole_boundIn LeanCombinatorics for TCS

Every critical exponent of a d-ary infinite word is either 0 (the ratio set is unbounded) or at least (d+1)/d: among the d+1 letters w 0, …, w d two coincide, and the corresponding length-(p+1) block is a prefix of the square of the length-p block, giving the ratio (p+1)/p ≥ (d+1)/d. This is the Lean shadow of "the repetition threshold is isolated in S_d" and is the best bound available without the rich-word structure theory.

theorem op_1459_critical_exponent_eq_zero_or_pigeonhole_bound (d : ℕ) (w : ℕ → Fin d) : word_critical_exponent w = 0 ∨ ((d : ℝ) + 1) / d ≤ word_critical_exponent w
op_1459_rich_threshold_eq_zeroIn LeanCombinatorics for TCS

For every positive d, the rich-word repetition threshold RT(C_d) = sInf S_d is 0.

theorem op_1459_rich_threshold_eq_zero (d : ℕ) (hd : 0 < d) : rich_repetition_threshold d = 0
op_1459_second_smallest_attained_fourIn LeanCombinatorics for TCS

The positive critical exponents of uniformly recurrent 4-ary rich words have a least element: there is v in S_4 with 0 < v and v ≤ x for every x in S_4 with 0 < x. (The value is RT(C_4) = E*(u_7) ≈ 2.1197196907, attained by one of the seven projections π_i(u_7).)

theorem op_1459_second_smallest_attained_four :
    ∃ v ∈ rich_word_critical_exponents 4, 0 < v ∧ ∀ x ∈ rich_word_critical_exponents 4, 0 < x → v ≤ x
op_1459_second_smallest_attained_threeIn LeanCombinatorics for TCS

The positive critical exponents of uniformly recurrent ternary rich words have a least element: there is v in S_3 with 0 < v and v ≤ x for every x in S_3 with 0 < x. (The value is RT(C_3) = E*(u_5) = 1 + 1/(3 - Λ_5) ≈ 2.25876, where Λ_5 is the spectral radius of the incidence matrix of φ_5, attained by π(u_5).)

theorem op_1459_second_smallest_attained_three :
    ∃ v ∈ rich_word_critical_exponents 3, 0 < v ∧ ∀ x ∈ rich_word_critical_exponents 3, 0 < x → v ≤ x
op_1459_second_smallest_attained_twoIn LeanCombinatorics for TCS

The positive critical exponents of uniformly recurrent binary rich words have a least element: there is v in S_2 with 0 < v and v ≤ x for every x in S_2 with 0 < x. (The value is RT(C_2) = E*(u_3) = 2 + √2/2 ≈ 2.70711, attained by the image π_1(u_3).)

theorem op_1459_second_smallest_attained_two :
    ∃ v ∈ rich_word_critical_exponents 2, 0 < v ∧ ∀ x ∈ rich_word_critical_exponents 2, 0 < x → v ≤ x
op_1459_word_critical_exponent_nonnegIn LeanCombinatorics for TCS

Every critical exponent is nonnegative, for words over an arbitrary alphabet.

theorem op_1459_word_critical_exponent_nonneg {α : Type*} (w : ℕ → α) : 0 ≤ word_critical_exponent w
op_1459_zero_is_least_rich_critical_exponentIn LeanCombinatorics for TCS

For 0 < d, 0 is the least element of S_d: the constant d-ary word 000… is uniformly recurrent and rich and its ratio set contains every natural number (x = [0], y = 0^n, m = n), hence is unbounded, so its critical exponent is 0 by Lean's sSup convention; and every critical exponent is nonnegative.

theorem op_1459_zero_is_least_rich_critical_exponent (d : ℕ) (hd : 0 < d) : IsLeast (rich_word_critical_exponents d) 0
op_1481_avoidance_three_twenty_one_sqrt_three_fourthsIn LeanCombinatorics for TCS

For every positive integer n, euclidean_avoids_ap n 3 1 21 (Real.sqrt (3 / 4)) holds: there exists a two-coloring of n-dimensional Euclidean space containing neither a monochromatic 3-term arithmetic progression with unit spacing of color false nor a monochromatic 21-term arithmetic progression with spacing √(3/4) of color true.

theorem op_1481_avoidance_three_twenty_one_sqrt_three_fourths (n : ℕ) (hn : 0 < n) :
    euclidean_avoids_ap n 3 1 21 (Real.sqrt (3 / 4))
op_1481_avoidance_three_twenty_one_sqrt_two_fifteenthsIn LeanCombinatorics for TCS

For every positive integer n, euclidean_avoids_ap n 3 1 21 (Real.sqrt (2 / 15)) holds: there exists a two-coloring of n-dimensional Euclidean space containing neither a monochromatic 3-term arithmetic progression with unit spacing of color false nor a monochromatic 21-term arithmetic progression with spacing √(2/15) of color true.

theorem op_1481_avoidance_three_twenty_one_sqrt_two_fifteenths (n : ℕ) (hn : 0 < n) :
    euclidean_avoids_ap n 3 1 21 (Real.sqrt (2 / 15))
op_1481_radial_certificate_one_halfIn LeanCombinatorics for TCS

There is a set S ⊆ ℝ such that (hA) for every a ≥ 0 and every c, one of a + c², a + (c+1)², a + (c+2)² lies in S, and (hB) for every a ≥ 0 and every c, some a + (c + k/2)² with 0 ≤ k ≤ 20 lies outside S. (This is the 1-D radial certificate for spacing α = 1/2: sufficient for the α = 1/2 case of the target via euclidean_avoids_ap_of_radial_ac, but not necessary.)

theorem op_1481_radial_certificate_one_half :
    ∃ S : Set ℝ,
      (∀ a c : ℝ, 0 ≤ a → a + c ^ 2 ∈ S ∨ a + (c + 1) ^ 2 ∈ S ∨ a + (c + 2) ^ 2 ∈ S) ∧
      (∀ a c : ℝ, 0 ≤ a → ∃ k : Fin 21, a + (c + (k : ℝ) * (1 / 2)) ^ 2 ∉ S)
op_1481_radial_certificate_one_thirdIn LeanCombinatorics for TCS

There is a set S ⊆ ℝ such that (hA) for every a ≥ 0 and every c, one of a + c², a + (c+1)², a + (c+2)² lies in S, and (hB) for every a ≥ 0 and every c, some a + (c + k/3)² with 0 ≤ k ≤ 20 lies outside S. (This is the 1-D radial certificate for spacing α = 1/3: sufficient for the α = 1/3 case of the target via euclidean_avoids_ap_of_radial_ac, but not necessary.)

theorem op_1481_radial_certificate_one_third :
    ∃ S : Set ℝ,
      (∀ a c : ℝ, 0 ≤ a → a + c ^ 2 ∈ S ∨ a + (c + 1) ^ 2 ∈ S ∨ a + (c + 2) ^ 2 ∈ S) ∧
      (∀ a c : ℝ, 0 ≤ a → ∃ k : Fin 21, a + (c + (k : ℝ) * (1 / 3)) ^ 2 ∉ S)
op_1481_sq_mem_exceptional_casesIn LeanCombinatorics for TCS

If α > 0 and α^2 ∈ {1/4, 1/9, 2/15, 3/4}, then α is 1/2, 1/3, √(2/15), or √(3/4).

theorem op_1481_sq_mem_exceptional_cases (α : ℝ) (hα : 0 < α)
    (h_sq : α ^ 2 ∈ ({1 / 4, 1 / 9, 2 / 15, 3 / 4} : Set ℝ)) :
    α = 1 / 2 ∨ α = 1 / 3 ∨ α = Real.sqrt (2 / 15) ∨ α = Real.sqrt (3 / 4)
op_1592_complete_homogeneous_roots_vanishIn LeanCombinatorics for TCS

For r distinct nth roots of unity, where 2≤r≤n, the complete homogeneous symmetric polynomial of degree n−r+1 evaluates to zero.

theorem op_1592_complete_homogeneous_roots_vanish (n r : ℕ) (hr : 2 ≤ r) (hrn : r ≤ n) (z : Fin r → ℂ) (hinj : Function.Injective z) (hz : ∀ i, z i ^ n = 1) : MvPolynomial.eval z (MvPolynomial.hsymm (Fin r) ℂ (n-r+1)) = 0
op_1592_exists_test_functionIn LeanCombinatorics for TCS

There exists an integer-valued test function g on (Z/nZ)^d with total sum choose(n, p) whose Fourier transform vanishes on all non-zero characters that do not evaluate to 1 on any non-zero queen direction.

theorem op_1592_exists_test_function {d n p : ℕ} [NeZero n] (hd : 2 ≤ d) (hn : 2 ≤ n) (hp : Nat.Prime p) (hpn : p ∣ n) (hpd : p < 2^d) : ∃ g : (Fin d → ZMod n) → ℤ, (∑ x, g x = Nat.choose n p) ∧ (∀ chi : AddChar (Fin d → ZMod n) ℂ, chi ≠ 0 → (∀ v : Fin d → SignType, v ≠ 0 → chi (fun i => (SignType.cast (v i) : ZMod n)) ≠ 1) → ∑ x, (g x : ℂ) * chi x = 0)
op_1592_fourier_support_zero_implies_constantIn LeanCombinatorics for TCS

If a complex-valued function on a finite abelian group has zero Fourier transform at all non-zero characters, then it is constant.

theorem op_1592_fourier_support_zero_implies_constant {G : Type*} [AddCommGroup G] [Fintype G] (f : G → ℂ) (hf : ∀ ψ : AddChar G ℂ, ψ ≠ 0 → ∑ x, f x * ψ x = 0) : ∃ C : ℂ, ∀ x, f x = C
op_1592_maximal_configuration_meets_each_line_onceIn LeanCombinatorics for TCS

A non-attacking configuration of n^(d−1) points meets each line in each nonzero queen direction in exactly one point.

theorem op_1592_maximal_configuration_meets_each_line_once {d n : ℕ} [NeZero n] (hd : 2 ≤ d) (hn : 2 ≤ n) (s : Finset (Fin d → ZMod n)) (hs : is_non_attacking_queens s) (hcard : s.card = n^(d-1)) (v : Fin d → SignType) (hv : v ≠ 0) (x : Fin d → ZMod n) : ∃! t : ZMod n, (fun i => x i + t * (SignType.cast (v i) : ZMod n)) ∈ s
op_1592_prime_does_not_divide_predecessor_chooseIn LeanCombinatorics for TCS

If p is prime and divides a positive integer n, then p does not divide the binomial coefficient choosing p−1 elements from n−1.

theorem op_1592_prime_does_not_divide_predecessor_choose (n p : ℕ) (hn : 0 < n) (hp : Nat.Prime p) (hpn : p ∣ n) : ¬ p ∣ Nat.choose (n-1) (p-1)
op_1657_turan_hypergraph_zycle_four_freeIn LeanCombinatorics for TCS

The balanced cyclic 3-partite Turán hypergraph T_n contains no copy of the 4-zycle Z_4 for every n (Lemma 3.3 of arXiv:2611.16654 specialized to ℓ = 4).

theorem op_1657_turan_hypergraph_zycle_four_free (n : ℕ) :
    is_hypergraph_free (turan_hypergraph n) (zycle 4)
op_1657_turan_hypergraph_zycle_freeIn LeanCombinatorics for TCS

For every even ℓ ≥ 4 with 3 ∤ ℓ and every n, the balanced 3-partite Turán hypergraph T_n is Z_ℓ-free: there is no injective map of the 2ℓ zycle vertices into Fin n sending every zycle edge to an edge of T_n. This is Lemma 3.3 of arXiv:2611.16654 (the construction is valid precisely when 3 ∤ ℓ).

theorem op_1657_turan_hypergraph_zycle_free (ℓ n : ℕ) [NeZero ℓ] (hℓ_even : Even ℓ) (hℓ_ge : 4 ≤ ℓ) (hℓ_not_dvd : ¬ 3 ∣ ℓ) : is_hypergraph_free (turan_hypergraph n) (zycle ℓ)
op_1657_upper_bound_extremal_le_turan_cardIn LeanCombinatorics for TCS

For every even ℓ ≥ 4 with 3 ∤ ℓ, every 3-uniform Z_ℓ-free hypergraph on Fin n has at most |T_n| edges for all sufficiently large n, i.e. extremal_number n (zycle ℓ) ≤ (turan_hypergraph n).card eventually along Filter.atTop.

theorem op_1657_upper_bound_extremal_le_turan_card (ℓ : ℕ) [NeZero ℓ] (hℓ_even : Even ℓ) (hℓ_ge : 4 ≤ ℓ) (hℓ_not_dvd : ¬ 3 ∣ ℓ) : ∀ᶠ (n : ℕ) in Filter.atTop, extremal_number n (zycle ℓ) ≤ (turan_hypergraph n).card
op_1657_upper_bound_extremal_zycle_four_le_turan_cardIn LeanCombinatorics for TCS

For all sufficiently large n, every 3-uniform Z_4-free hypergraph on n vertices has at most (turan_hypergraph n).card edges, i.e., extremal_number n (zycle 4) ≤ (turan_hypergraph n).card eventually along Filter.atTop (Problem 4.2 of arXiv:2611.16654 for ℓ = 4).

theorem op_1657_upper_bound_extremal_zycle_four_le_turan_card :
    ∀ᶠ (n : ℕ) in Filter.atTop, extremal_number n (zycle 4) ≤ (turan_hypergraph n).card
op_1721_ratio_eventually_eqIn LeanCombinatorics for TCS

For any p in (0,1), eventually as d tends to infinity, the rare-tail ratio algebraically factors into the binomial coefficient ratio B(d) and the perturbation factor (1 + S1(d))^2 / ((1 + S0(d)) * (1 + S2(d))).

theorem op_1721_ratio_eventually_eq (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1) :
    let q := 1 - p
    let r (d : ℕ) := Nat.ceil ((d : ℝ) / q ^ d)
    let u (d : ℕ) := q ^ (2 * d)
    let b (d : ℕ) (j : ℕ) :=
      (r d).choose j * u d ^ j * (1 - u d) ^ (r d - j) * q ^ j +
        (r d).choose (j + 1) * u d ^ (j + 1) * (1 - u d) ^ (r d - (j + 1)) * (1 - q ^ (j + 1))
    let ratio (d : ℕ) := (b d d) ^ 2 / (b d (d - 1) * b d (d + 1))
    let B (d : ℕ) := ((r d).choose d : ℝ) ^ 2 / (((r d).choose (d - 1) : ℝ) * ((r d).choose (d + 1) : ℝ))
    let S0 (d : ℕ) := ((r d - (d - 1) : ℝ) / (d : ℝ)) * (q ^ (d + 1) / (1 - q ^ (2 * d))) * (1 - q ^ d)
    let S1 (d : ℕ) := ((r d - d : ℝ) / ((d : ℝ) + 1)) * (q ^ d / (1 - q ^ (2 * d))) * (1 - q ^ (d + 1))
    let S2 (d : ℕ) := ((r d - (d + 1) : ℝ) / ((d : ℝ) + 2)) * (q ^ (d - 1) / (1 - q ^ (2 * d))) * (1 - q ^ (d + 2))
    ratio =ᶠ[Filter.atTop] fun d => B d * ((1 + S1 d) ^ 2 / ((1 + S0 d) * (1 + S2 d)))
op_1721_tendsto_BIn LeanCombinatorics for TCS

For any p in (0,1), the squared binomial ratio B(d) = choose(r(d), d)^2 / (choose(r(d), d-1) * choose(r(d), d+1)) tends to 1 as d tends to infinity.

theorem op_1721_tendsto_B (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1) :
    let q := 1 - p
    let r (d : ℕ) := Nat.ceil ((d : ℝ) / q ^ d)
    let B (d : ℕ) := ((r d).choose d : ℝ) ^ 2 / (((r d).choose (d - 1) : ℝ) * ((r d).choose (d + 1) : ℝ))
    Filter.Tendsto B Filter.atTop (nhds 1)
op_1721_tendsto_SIn LeanCombinatorics for TCS

For any p in (0,1), the correction factors S0(d), S1(d), S2(d) converge to q, 1, and 1/q respectively as d tends to infinity.

theorem op_1721_tendsto_S (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1) :
    let q := 1 - p
    let r (d : ℕ) := Nat.ceil ((d : ℝ) / q ^ d)
    let S0 (d : ℕ) := ((r d - (d - 1) : ℝ) / (d : ℝ)) * (q ^ (d + 1) / (1 - q ^ (2 * d))) * (1 - q ^ d)
    let S1 (d : ℕ) := ((r d - d : ℝ) / ((d : ℝ) + 1)) * (q ^ d / (1 - q ^ (2 * d))) * (1 - q ^ (d + 1))
    let S2 (d : ℕ) := ((r d - (d + 1) : ℝ) / ((d : ℝ) + 2)) * (q ^ (d - 1) / (1 - q ^ (2 * d))) * (1 - q ^ (d + 2))
    Filter.Tendsto S0 Filter.atTop (nhds q) ∧
    Filter.Tendsto S1 Filter.atTop (nhds 1) ∧
    Filter.Tendsto S2 Filter.atTop (nhds (1 / q))
op_1721_tendsto_ratio_of_partsIn LeanCombinatorics for TCS

If B(d) -> 1, S0(d) -> q, S1(d) -> 1, and S2(d) -> 1/q as d -> infinity with q > 0, then B(d) * (1 + S1(d))^2 / ((1 + S0(d)) * (1 + S2(d))) tends to 4q / (1 + q)^2.

theorem op_1721_tendsto_ratio_of_parts (q : ℝ) (hq : 0 < q)
    {B S0 S1 S2 : ℕ → ℝ}
    (hB : Filter.Tendsto B Filter.atTop (nhds 1))
    (hS0 : Filter.Tendsto S0 Filter.atTop (nhds q))
    (hS1 : Filter.Tendsto S1 Filter.atTop (nhds 1))
    (hS2 : Filter.Tendsto S2 Filter.atTop (nhds (1 / q))) :
    Filter.Tendsto (fun d => B d * ((1 + S1 d) ^ 2 / ((1 + S0 d) * (1 + S2 d))))
      Filter.atTop (nhds (4 * q / (1 + q) ^ 2))
op_258_forces_stepIn LeanCombinatorics for TCS

Let a : ℕ+ → ℝ be positive, antitone, with Σ a i > 1, and let k ≥ 3. If a forces a monochromatic K_k, then a forces a monochromatic K_{k+1}.

theorem op_258_forces_step (a : ℕ+ → ℝ) (hpos : ∀ i, 0 < a i) (hanti : Antitone a)
    (hsum : 1 < ∑' i : ℕ+, ENNReal.ofReal (a i)) :
    ∀ k : ℕ, 3 ≤ k → op_258_forces a k → op_258_forces a (k + 1)
op_518_bruhat_order_three_graph_connectedIn LeanCombinatorics for TCS

For every m, the higher Bruhat order B(Fin m, 2) is connected: any two rank-3 signotopes on Fin m are joined by a sequence of single-triple flips. Equivalently, the constant +1 signotope is reachable from every signotope by flipping its negative triples one at a time.

theorem op_518_bruhat_order_three_graph_connected (m : ℕ) : (bruhat_order_three_graph (Fin m)).Connected
op_518_chirotope_dist_ge_supportIn LeanCombinatorics for TCS

Hamming lower bound for mutation walks of rank-3 uniform chirotopes: if two chirotopes on a linearly ordered Ω are connected in chirotope_three_graph Ω, the number of ordered triples on which they differ is at most their graph distance. (Any walk of length L changes at most L coordinates.)

theorem op_518_chirotope_dist_ge_support {Ω : Type*} [LinearOrder Ω] (c₁ c₂ : { chi : OrderedTriple Ω → ℤˣ // is_rank_three_uniform_chirotope chi }) (h : (chirotope_three_graph Ω).Reachable c₁ c₂) : {t : OrderedTriple Ω | c₁.val t ≠ c₂.val t}.ncard ≤ (chirotope_three_graph Ω).dist c₁ c₂
op_518_constant_signotope_positive_fibre_chirotopeIn LeanCombinatorics for TCS

The constant signotope (+1 on every ordered triple of a linearly ordered type) is a rank-3 signotope, and its positive fibre on WithTop α is a uniform rank-3 chirotope. This supplies a witness that both vertex types are inhabited, so the target statement is not vacuous.

theorem op_518_constant_signotope_positive_fibre_chirotope {α : Type*} [LinearOrder α] : is_rank_three_signotope (fun _ : OrderedTriple α => (1 : ℤˣ)) ∧ is_rank_three_uniform_chirotope (positive_fibre_three (fun _ : OrderedTriple α => (1 : ℤˣ)))
op_518_dist_le_of_adj_or_eq_mapIn LeanCombinatorics for TCS

A map of simple graphs that sends every edge to an edge or to a loop (equal images) does not increase the graph distance: if f : V → W with G.Adj a b → H.Adj (f a) (f b) ∨ f a = f b for all a, b, then for any G-walk from u to v, H.dist (f u) (f v) ≤ G.dist u v.

theorem op_518_dist_le_of_adj_or_eq_map {V W : Type*} {G : SimpleGraph V} {H : SimpleGraph W} (f : V → W) (hf : ∀ v w, G.Adj v w → H.Adj (f v) (f w) ∨ f v = f w) {u v : V} (h : G.Reachable u v) : H.dist (f u) (f v) ≤ G.dist u v
op_518_minimal_walk_flips_only_in_supportIn LeanCombinatorics for TCS

Let seq be a sequence of sign vectors with seq k and seq (k+1) differing at exactly one index, starting at f and ending at g, of length equal to the number of indices where f and g differ. Then every coordinate flipped at any step is a coordinate where f and g differ; equivalently, coordinates where f and g agree are constant along the whole sequence. (Forgetful, graph-free form of the no-excess argument.)

theorem op_518_minimal_walk_flips_only_in_support {ι : Type*} (seq : ℕ → ι → ℤˣ) (L : ℕ) (hstep : ∀ k, k < L → differs_at_one (seq k) (seq (k + 1))) (hlen : L = {i : ι | seq 0 i ≠ seq L i}.ncard) : ∀ k, k < L → ∀ i : ι, seq 0 i = seq L i → seq k i = seq (k + 1) i
op_518_positive_fibre_dist_geIn LeanCombinatorics for TCS

For every m > 0 and any rank-3 signotopes u, v on Fin m, the distance between u and v in the higher Bruhat order bruhat_order_three_graph (Fin m) is at most the mutation walk distance between their positive fibres in chirotope_three_graph (WithTop (Fin m)).

theorem op_518_positive_fibre_dist_ge (m : ℕ) (hm : 0 < m) (u v : OrderedTriple (Fin m) → ℤˣ) (hu : is_rank_three_signotope u) (hv : is_rank_three_signotope v) (hu_chi : is_rank_three_uniform_chirotope (positive_fibre_three u)) (hv_chi : is_rank_three_uniform_chirotope (positive_fibre_three v)) : (bruhat_order_three_graph (Fin m)).dist ⟨u, hu⟩ ⟨v, hv⟩ ≤ (chirotope_three_graph (WithTop (Fin m))).dist ⟨positive_fibre_three u, hu_chi⟩ ⟨positive_fibre_three v, hv_chi⟩
op_518_positive_fibre_dist_le_of_reachableIn LeanCombinatorics for TCS

If two rank-3 signotopes u, v on a linearly ordered α are connected in the higher Bruhat order, then the mutation walk distance between their positive fibres in chirotope_three_graph (WithTop α) is at most their distance in bruhat_order_three_graph α.

theorem op_518_positive_fibre_dist_le_of_reachable {α : Type*} [LinearOrder α] (u v : OrderedTriple α → ℤˣ) (hu : is_rank_three_signotope u) (hv : is_rank_three_signotope v) (hu_chi : is_rank_three_uniform_chirotope (positive_fibre_three u)) (hv_chi : is_rank_three_uniform_chirotope (positive_fibre_three v)) (h : (bruhat_order_three_graph α).Reachable ⟨u, hu⟩ ⟨v, hv⟩) : (chirotope_three_graph (WithTop α)).dist ⟨positive_fibre_three u, hu_chi⟩ ⟨positive_fibre_three v, hv_chi⟩ ≤ (bruhat_order_three_graph α).dist ⟨u, hu⟩ ⟨v, hv⟩
op_518_positive_fibre_no_excessIn LeanCombinatorics for TCS

Suppose the chirotope mutation distance between the positive fibres of two signotopes u, v equals the Hamming distance (number of differing triples) between u and v. Then the reverse inequality holds: the higher Bruhat distance from u to v is at most the chirotope distance (in fact equal to it).

theorem op_518_positive_fibre_no_excess {α : Type*} [LinearOrder α] (u v : OrderedTriple α → ℤˣ) (hu : is_rank_three_signotope u) (hv : is_rank_three_signotope v) (hu_chi : is_rank_three_uniform_chirotope (positive_fibre_three u)) (hv_chi : is_rank_three_uniform_chirotope (positive_fibre_three v)) (hreach : (chirotope_three_graph (WithTop α)).Reachable ⟨positive_fibre_three u, hu_chi⟩ ⟨positive_fibre_three v, hv_chi⟩) (hnoex : (chirotope_three_graph (WithTop α)).dist ⟨positive_fibre_three u, hu_chi⟩ ⟨positive_fibre_three v, hv_chi⟩ = {t : OrderedTriple α | u t ≠ v t}.ncard) : (bruhat_order_three_graph α).dist ⟨u, hu⟩ ⟨v, hv⟩ ≤ (chirotope_three_graph (WithTop α)).dist ⟨positive_fibre_three u, hu_chi⟩ ⟨positive_fibre_three v, hv_chi⟩
op_518_positive_fibre_of_positive_chirotopeIn LeanCombinatorics for TCS

Let chi be a uniform rank-3 chirotope on WithTop α that is positive at the point at infinity, i.e. chi takes the value +1 on every ordered triple whose largest element is ⊤. Then chi is the positive fibre of a rank-3 signotope u on α.

theorem op_518_positive_fibre_of_positive_chirotope {α : Type*} [LinearOrder α] (chi : OrderedTriple (WithTop α) → ℤˣ) (hchi : is_rank_three_uniform_chirotope chi) (hpos : ∀ t : OrderedTriple (WithTop α), t.c = ⊤ → chi t = 1) : ∃ u : OrderedTriple α → ℤˣ, is_rank_three_signotope u ∧ chi = positive_fibre_three u
op_518_positive_fibre_three_injectiveIn LeanCombinatorics for TCS

The positive-fibre map u ↦ positive_fibre_three u from functions on ordered triples of α to functions on ordered triples of WithTop α is injective: evaluate at a triple of coerced elements.

theorem op_518_positive_fibre_three_injective {α : Type*} [LinearOrder α] : Function.Injective (positive_fibre_three (α := α))
op_518_positive_fibre_three_signotopeIn LeanCombinatorics for TCS

If u : OrderedTriple α → ℤˣ is a rank-3 signotope on a linearly ordered α, then its positive fibre positive_fibre_three u (a function on OrderedTriple (WithTop α)) is also a rank-3 signotope: its packets either are packets of u, or are (u(Q), +1, +1).

theorem op_518_positive_fibre_three_signotope {α : Type*} [LinearOrder α] {u : OrderedTriple α → ℤˣ} (h : is_rank_three_signotope u) : is_rank_three_signotope (positive_fibre_three u)
op_518_positive_fibre_three_support_ncardIn LeanCombinatorics for TCS

The positive fibre preserves Hamming distance: the set of ordered triples of WithTop α on which positive_fibre_three u and positive_fibre_three v differ has the same cardinality as the set of triples of α on which u and v differ (all triples through ⊤ agree, both being +1).

theorem op_518_positive_fibre_three_support_ncard {α : Type*} [LinearOrder α] (u v : OrderedTriple α → ℤˣ) : {t : OrderedTriple (WithTop α) | positive_fibre_three u t ≠ positive_fibre_three v t}.ncard = {t : OrderedTriple α | u t ≠ v t}.ncard
op_518_positive_fibre_walk_mapIn LeanCombinatorics for TCS

Mapping a flip-path of rank-3 signotopes on α through the positive fibre gives a mutation walk of rank-3 uniform chirotopes on WithTop α of the same length: each signotope flip becomes a chirotope flip (all triples through ⊤ agree), so the image walk has exactly the original length.

theorem op_518_positive_fibre_walk_map {α : Type*} [LinearOrder α] {u v : OrderedTriple α → ℤˣ} {hu : is_rank_three_signotope u} {hv : is_rank_three_signotope v} {hu_chi : is_rank_three_uniform_chirotope (positive_fibre_three u)} {hv_chi : is_rank_three_uniform_chirotope (positive_fibre_three v)} (p : (bruhat_order_three_graph α).Walk ⟨u, hu⟩ ⟨v, hv⟩) : ∃ q : (chirotope_three_graph (WithTop α)).Walk ⟨positive_fibre_three u, hu_chi⟩ ⟨positive_fibre_three v, hv_chi⟩, q.length ≤ p.length
op_518_signotope_positive_fibre_chirotopeIn LeanCombinatorics for TCS

If u : OrderedTriple α → ℤˣ is a rank-3 signotope on a linearly ordered α, then its positive fibre is a uniform rank-3 chirotope on WithTop α. In particular the hypotheses hu_chi, hv_chi of the target are implied by hu, hv.

theorem op_518_signotope_positive_fibre_chirotope {α : Type*} [LinearOrder α] {u : OrderedTriple α → ℤˣ} (h : is_rank_three_signotope u) : is_rank_three_uniform_chirotope (positive_fibre_three u)
op_639_complementary_doubleton_fibers_cross_interIn LeanCombinatorics for TCS

In an intersecting hypergraph F, if e1, e2 in F have traces S and T \ S on T respectively, then their differences e1 \ T and e2 \ T are not disjoint.

theorem op_639_complementary_doubleton_fibers_cross_inter
    {V : Type*} [DecidableEq V] (F : Finset (Finset V))
    (hinter : (F : Set (Finset V)).Intersecting)
    (T : Finset V) (S : Finset V)
    (e1 e2 : Finset V) (he1 : e1 ∈ F) (he2 : e2 ∈ F)
    (he1S : e1 ∩ T = S) (he2S : e2 ∩ T = T \ S) :
    ¬Disjoint (e1 \ T) (e2 \ T)
op_639_doubleton_and_disjoint_singleton_fiber_cross_interIn LeanCombinatorics for TCS

In an intersecting hypergraph F, if e1 in F has trace S on T and e2 in F has trace {x} on T with x ∈ T \ S, then e1 \ T and e2 \ T are not disjoint.

theorem op_639_doubleton_and_disjoint_singleton_fiber_cross_inter
    {V : Type*} [DecidableEq V] (F : Finset (Finset V))
    (hinter : (F : Set (Finset V)).Intersecting)
    (T : Finset V) (S : Finset V) (x : V) (hx : x ∈ T \ S)
    (e1 e2 : Finset V) (he1 : e1 ∈ F) (he2 : e2 ∈ F)
    (he1S : e1 ∩ T = S) (he2x : e2 ∩ T = {x}) :
    ¬Disjoint (e1 \ T) (e2 \ T)
op_639_fiber_sdiff_injectiveIn LeanCombinatorics for TCS

Let T and S be finite sets in V. If e1 and e2 both have intersection S with T and identical difference outside T, e1 \ T = e2 \ T, then e1 = e2.

theorem op_639_fiber_sdiff_injective
    {V : Type*} [DecidableEq V]
    (T : Finset V) (S : Finset V)
    (e1 e2 : Finset V)
    (he1 : e1 ∩ T = S) (he2 : e2 ∩ T = S)
    (h_sdiff : e1 \ T = e2 \ T) :
    e1 = e2
op_639_fiber_trace_sdiff_cardIn LeanCombinatorics for TCS

In a 4-uniform hypergraph F, if an edge e in F satisfies e ∩ T = S, then the cardinality of e \ T is 4 - |S|.

theorem op_639_fiber_trace_sdiff_card
    {V : Type*} [DecidableEq V] (F : Finset (Finset V))
    (hunif : ∀ e ∈ F, e.card = 4)
    (T : Finset V) (S : Finset V)
    (e : Finset V) (he : e ∈ F) (heS : e ∩ T = S) :
    (e \ T).card = 4 - S.card
op_639_singleton_fibers_cross_interIn LeanCombinatorics for TCS

In an intersecting hypergraph F, if e1, e2 in F have traces {x} and {y} on T with x ≠ y, then e1 \ T and e2 \ T are not disjoint.

theorem op_639_singleton_fibers_cross_inter
    {V : Type*} [DecidableEq V] (F : Finset (Finset V))
    (hinter : (F : Set (Finset V)).Intersecting)
    (T : Finset V) (x y : V) (hxy : x ≠ y)
    (e1 e2 : Finset V) (he1 : e1 ∈ F) (he2 : e2 ∈ F)
    (he1x : e1 ∩ T = {x}) (he2y : e2 ∩ T = {y}) :
    ¬Disjoint (e1 \ T) (e2 \ T)
op_686_single_inflection_characterizationIn LeanCombinatorics for TCS

For a permutation σ of Fin n and naturals 2 ≤ k < m ≤ n-1, the inflection set of σ equals the singleton {(k,m)} if and only if, writing D = perm_second_derivative σ: D(k)·D(m) < 0, D vanishes on the open interval (k,m), every nonzero value D(l) with 2 ≤ l < k has the same sign as D(k) (i.e. D(l)·D(k) ≥ 0), and every nonzero value D(l) with m < l ≤ n-1 has the same sign as D(m) (i.e. D(l)·D(m) ≥ 0).

theorem op_686_single_inflection_characterization (k m n : ℕ) (σ : Equiv.Perm (Fin n))
    (hk : 2 ≤ k) (hkm : k < m) (hmn : m ≤ n - 1) :
    perm_inflection_set σ = {(k, m)} ↔
      perm_second_derivative σ k * perm_second_derivative σ m < 0 ∧
      (∀ l, k < l → l < m → perm_second_derivative σ l = 0) ∧
      (∀ l, 2 ≤ l → l < k → perm_second_derivative σ l * perm_second_derivative σ k ≥ 0) ∧
      (∀ l, m < l → l ≤ n - 1 → perm_second_derivative σ l * perm_second_derivative σ m ≥ 0)
op_686_single_inflection_nonvanishing_infiniteIn LeanCombinatorics for TCS

If m ≤ 2*k (with 2 ≤ k < m), then there are infinitely many n for which some permutation σ : Equiv.Perm (Fin n) has perm_inflection_set σ = {(k,m)}. This is the non-vanishing half of the vanishing statement.

theorem op_686_single_inflection_nonvanishing_infinite (k m : ℕ) (hk : 2 ≤ k) (hkm : k < m)
    (hm : m ≤ 2 * k) :
    Set.Infinite {n : ℕ | ∃ σ : Equiv.Perm (Fin n), perm_inflection_set σ = {(k, m)}}
op_686_single_inflection_vanishing_bddAboveIn LeanCombinatorics for TCS

If 2*k+1 ≤ m (with 2 ≤ k < m), then the sizes n of permutations whose inflection set is exactly {(k,m)} are bounded above: there is N (in fact the sharp bound is n ≤ 2m-k+2, so N = 2m suffices) such that every σ : Equiv.Perm (Fin n) with perm_inflection_set σ = {(k,m)} satisfies n ≤ N. This is the finiteness half of the vanishing statement.

theorem op_686_single_inflection_vanishing_bddAbove (k m : ℕ) (hk : 2 ≤ k) (hkm : k < m)
    (h2k : 2 * k + 1 ≤ m) :
    ∃ N : ℕ, ∀ (n : ℕ) (σ : Equiv.Perm (Fin n)),
      perm_inflection_set σ = {(k, m)} → n ≤ N
optimal_one_uniform_flower_free_systemIn LeanCombinatorics for TCS

Let r ≥ 2 be an integer, and let S be a 1-uniform r-flower-free set system on ground set G = ⋃ S (every set in S has cardinality 1 and no subfamily of size r is a sunflower). Then |S| ≤ r - 1, |G| ≤ r - 1, the aura |G| + (r - 1) * |S| satisfies |G| + (r - 1) * |S| ≤ r * (r - 1), and equality |G| + (r - 1) * |S| = r * (r - 1) holds if and only if |S| = r - 1.

theorem optimal_one_uniform_flower_free_system {α : Type*} [DecidableEq α] (r : ℕ) (hr : 2 ≤ r)
    (S : Finset (Finset α))
    (h1 : ∀ A ∈ S, A.card = 1)
    (hfree : ¬ ∃ F ⊆ S, F.card = r ∧ ∃ C, IsSunflower F C) :
    S.card ≤ r - 1 ∧
    (S.biUnion id).card ≤ r - 1 ∧
    (S.biUnion id).card + (r - 1) * S.card ≤ r * (r - 1) ∧
    ((S.biUnion id).card + (r - 1) * S.card = r * (r - 1) ↔ S.card = r - 1)
optimal_one_uniform_system_existsIn LeanCombinatorics for TCS

For any integer r ≥ 2, there exists a 1-uniform r-flower-free set system S on Fin (r - 1) with |S| = r - 1, ground set cardinality r - 1, and aura |⋃ S| + (r - 1) * |S| = r * (r - 1).

theorem optimal_one_uniform_system_exists (r : ℕ) (hr : 2 ≤ r) :
    ∃ S : Finset (Finset (Fin (r - 1))),
      (∀ A ∈ S, A.card = 1) ∧
      (¬ ∃ F ⊆ S, F.card = r ∧ ∃ C, IsSunflower F C) ∧
      S.card = r - 1 ∧
      (S.biUnion id).card = r - 1 ∧
      (S.biUnion id).card + (r - 1) * S.card = r * (r - 1)
optimal_single_track_gray_code_equally_spaced_of_necklace_hamilton_cycleIn LeanCombinatorics for TCS

For any prime n ≥ 3, if the non-constant binary necklace graph Q_n has a Hamilton cycle, then there exists an optimal single-track Gray code of length n and period 2^n - 2 with equally spaced heads, where the head positions are multiples of (2^n - 2) / n and pairwise distinct modulo 2^n - 2.

theorem optimal_single_track_gray_code_equally_spaced_of_necklace_hamilton_cycle
    (n : ℕ) (hn : n.Prime) (hge : 3 ≤ n)
    (hcycle : necklace_graph_has_hamilton_cycle n) :
    ∃ w : ℕ → ℕ,
      is_single_track_gray_code n (2 ^ n - 2) w ∧
      ∃ h : ℕ → ℕ, h 0 = 0 ∧
        (∀ t, ∀ j < n, Nat.testBit (w t) j = Nat.testBit (w (t + h j)) 0) ∧
        (∀ j < n, ((2 ^ n - 2) / n) ∣ h j) ∧
        ∀ j₁ < n, ∀ j₂ < n, h j₁ % (2 ^ n - 2) = h j₂ % (2 ^ n - 2) → j₁ = j₂
optimal_single_track_gray_code_of_gray_necklace_pathIn LeanCombinatorics for TCS

Let n >= 7 be prime. If the list of non-constant binary necklaces of length n, ordered by the rank of their first occurrences in the binary reflected Gray code, forms a Gray path in the necklace graph, then the necklace graph has a Hamilton cycle, and an optimal single-track Gray code of length n and period 2^n - 2 exists.

theorem optimal_single_track_gray_code_of_gray_necklace_path
    (n : ℕ) (hn : n.Prime) (hge : 7 ≤ n)
    (hpath : gray_ordered_necklaces_is_gray_path n) :
    necklace_graph_has_hamilton_cycle n ∧
      ∃ w : ℕ → ℕ, is_single_track_gray_code n (2 ^ n - 2) w
optimal_single_track_gray_code_of_necklace_hamilton_cycleIn LeanCombinatorics for TCS

For any prime n at least 3, if the necklace graph has a Hamilton cycle of length (2^n - 2) / n visiting every non-constant necklace, then there exists an optimal single-track Gray code of length n and period 2^n - 2.

theorem optimal_single_track_gray_code_of_necklace_hamilton_cycle
    (n : ℕ) (hn : n.Prime) (hge : 3 ≤ n)
    (hcycle : necklace_graph_has_hamilton_cycle n) :
    ∃ w : ℕ → ℕ, is_single_track_gray_code n (2 ^ n - 2) w
order_five_q_permanent_monotonicity_counterexampleIn LeanCombinatorics for TCS

The 5-by-5 integer matrix A with diagonal (5, 5, 1, 5, 5) and nonzero off-diagonal entries a_{14} = a_{41} = 4, a_{15} = a_{51} = 1, a_{24} = a_{42} = -1, a_{25} = a_{52} = 4 is symmetric and positive definite over the reals, its q-permanent equals 625 + 25q^3 + 800q^5 + 25q^7 + 256q^8 - 32q^9 + q^10 for every real q, its q-permanent at q = 14 is 8968822249, its q-permanent at q = 15 is 7441960000, and its q-permanent at q = 14 is strictly greater than its q-permanent at q = 15, disproving the monotonicity conjecture for the q-permanent.

theorem order_five_q_permanent_monotonicity_counterexample :
    let A := q_perm_counterexample_matrix.map (algebraMap ℤ ℝ)
    A.IsSymm ∧ A.PosDef ∧
    (∀ q : ℝ, matrix_q_permanent q A =
      625 + 25 * q ^ 3 + 800 * q ^ 5 + 25 * q ^ 7 + 256 * q ^ 8 - 32 * q ^ 9 + q ^ 10) ∧
    matrix_q_permanent (14 : ℝ) A = 8968822249 ∧
    matrix_q_permanent (15 : ℝ) A = 7441960000 ∧
    matrix_q_permanent (14 : ℝ) A > matrix_q_permanent (15 : ℝ) A
order_foldl_move_to_front_elemsIn LeanCombinatorics for TCS

Successively moving the labels of a duplicate-free list l to the front of an order ν, in the order they appear in l, yields the element list l.reverse ++ (ν.elems filtered away from l).

theorem order_foldl_move_to_front_elems {d : ℕ} (ν : Order d) (l : List (Fin d)) (hl : l.Nodup) :
    (l.foldl (fun ν a => order_move_to_front a ν) ν).elems =
      l.reverse ++ ν.elems.filter (fun y => decide (y ∉ l))
order_graph_card_edges_lower_boundIn LeanCombinatorics for TCS

For any complete order graph G = (V, E) of dimension d ≥ 1 in the bidirectional model, the total number of edges satisfies |E| ≥ (d choose m) ⌈m/2⌉ for every m ∈ {1, ..., d}.

theorem order_graph_card_edges_lower_bound {d : ℕ} (hd : 1 ≤ d) (G : OrderGraph d)
    (hG : order_graph_is_complete G) (m : ℕ) (hm1 : 1 ≤ m) (hmd : m ≤ d) :
    Nat.choose d m * ((m + 1) / 2) ≤ G.E.card
order_graph_card_edges_lower_bound_uniIn LeanCombinatorics for TCS

Let d ≥ 1 be an integer. If G is an order graph of dimension d that is complete in the unidirectional model, then the total number of edges satisfies |E| ≥ d * Nat.choose (d - 1) ((d - 1) / 2).

theorem order_graph_card_edges_lower_bound_uni {d : ℕ} (hd : 1 ≤ d) (G : OrderGraph d)
    (hG : order_graph_is_complete_uni G) :
    d * Nat.choose (d - 1) ((d - 1) / 2) ≤ G.E.card
order_graph_chain_getLast_posIn LeanCombinatorics for TCS

For a nonempty chain p with duplicate-free labels, the number of edges is at most pos of the last edge's label in the last edge's source order.

theorem order_graph_chain_getLast_pos {d : ℕ} (p : List (Order d × Fin d)) (h : p ≠ [])
    (hc : List.IsChain (fun e1 e2 : Order d × Fin d => e2.1 = order_move_to_front e1.2 e1.1) p)
    (hn : (p.map Prod.snd).Nodup) :
    p.length ≤ order_pos (p.getLast h).1 (p.getLast h).2
order_graph_chain_head_labelIn LeanCombinatorics for TCS

For a chain p with duplicate-free labels and at least two edges, the source order of the last edge has the first edge's label at index p.length - 2.

theorem order_graph_chain_head_label {d : ℕ} (p : List (Order d × Fin d)) (h : p ≠ [])
    (hc : List.IsChain (fun e1 e2 : Order d × Fin d => e2.1 = order_move_to_front e1.2 e1.1) p)
    (hn : (p.map Prod.snd).Nodup) (h2 : 2 ≤ p.length) :
    (p.getLast h).1.elems[p.length - 2]? = some (p.head h).2
order_graph_chain_last_elemsIn LeanCombinatorics for TCS

For a nonempty chain p of edges (with e2.1 = order_move_to_front e1.2 e1.1) whose labels are duplicate-free, the element list of the last edge's source equals the reverse of the chain's labels with the last one dropped, followed by the first edge's source order filtered to remove all those labels.

theorem order_graph_chain_last_elems {d : ℕ} (p : List (Order d × Fin d)) (h : p ≠ [])
    (hc : List.IsChain (fun e1 e2 : Order d × Fin d => e2.1 = order_move_to_front e1.2 e1.1) p)
    (hn : (p.map Prod.snd).Nodup) :
    (p.getLast h).1.elems = (p.map Prod.snd).dropLast.reverse ++
      (p.head h).1.elems.filter (fun y => decide (y ∉ (p.map Prod.snd).dropLast))
order_graph_chain_top_setIn LeanCombinatorics for TCS

For a nonempty chain p with duplicate-free labels, the top set U_{|p|}(last edge) equals the set of labels of p.

theorem order_graph_chain_top_set {d : ℕ} (p : List (Order d × Fin d)) (h : p ≠ [])
    (hc : List.IsChain (fun e1 e2 : Order d × Fin d => e2.1 = order_move_to_front e1.2 e1.1) p)
    (hn : (p.map Prod.snd).Nodup) :
    order_graph_top_set p.length (p.getLast h) = (p.map Prod.snd).toFinset
order_graph_edges_ge_lower_boundIn LeanCombinatorics for TCS

Let d ≥ 1 be an integer. Let G = (V, E) be a complete order graph of dimension d in the bidirectional model, and for each m ∈ {1, ..., d}, let E_{≥m} = {(ν, a) ∈ E : pos_ν(a) ≥ m}. Then for every m ∈ {1, ..., d}, |E_{≥m}| ≥ (d choose m) ⌈m/2⌉.

theorem order_graph_edges_ge_lower_bound {d : ℕ} (hd : 1 ≤ d) (G : OrderGraph d)
    (hG : order_graph_is_complete G) (m : ℕ) (hm1 : 1 ≤ m) (hmd : m ≤ d) :
    Nat.choose d m * ((m + 1) / 2) ≤ (order_graph_edges_ge G m).card
order_graph_edges_ge_lower_bound_uniIn LeanCombinatorics for TCS

Let d ≥ 1 be an integer. If G is an order graph of dimension d that is complete in the unidirectional model, then for every m ∈ {1, ..., d}, the number of edges with pos_ν(a) ≥ m satisfies m * Nat.choose d m ≤ |E_{≥m}|.

theorem order_graph_edges_ge_lower_bound_uni {d : ℕ} (hd : 1 ≤ d) (G : OrderGraph d)
    (hG : order_graph_is_complete_uni G) (m : ℕ) (hm1 : 1 ≤ m) (hmd : m ≤ d) :
    m * Nat.choose d m ≤ (order_graph_edges_ge G m).card
order_graph_fiber_boundIn LeanCombinatorics for TCS

For every m-subset U of Fin d with m ≥ 1, at least ceil(m/2) edges e of E_{>=m} satisfy U_m(e) = U.

theorem order_graph_fiber_bound {d : ℕ} (hd : 1 ≤ d) (G : OrderGraph d)
    (hG : order_graph_is_complete G) (m : ℕ) (hm1 : 1 ≤ m) (hmd : m ≤ d)
    (U : Finset (Fin d)) (hU : U.card = m) :
    (m + 1) / 2 ≤ ((order_graph_edges_ge G m).filter
      (fun e => order_graph_top_set m e = U)).card
order_graph_fiber_bound_uniIn LeanCombinatorics for TCS

Let d ≥ 1 be an integer, and let G be an order graph of dimension d that is complete in the unidirectional model. For every m ∈ {1, ..., d} and every subset U ⊆ Fin d with |U| = m, the number of edges e in E_{≥m} with top set U_m(e) = U is at least m.

theorem order_graph_fiber_bound_uni {d : ℕ} (hd : 1 ≤ d) (G : OrderGraph d)
    (hG : order_graph_is_complete_uni G) (m : ℕ) (hm1 : 1 ≤ m) (hmd : m ≤ d)
    (U : Finset (Fin d)) (hU : U.card = m) :
    m ≤ ((order_graph_edges_ge G m).filter (fun e => order_graph_top_set m e = U)).card
order_graph_fiber_sumIn LeanCombinatorics for TCS

For m ≥ 1, the sum over all m-subsets U of Fin d of the number of edges of E_{>=m} with top set U equals the total number of edges of E_{>=m}.

theorem order_graph_fiber_sum {d : ℕ} (G : OrderGraph d) (m : ℕ) (hm1 : 1 ≤ m) :
    (∑ U ∈ Finset.univ.powersetCard m,
        ((order_graph_edges_ge G m).filter
          (fun e => order_graph_top_set m e = U)).card) = (order_graph_edges_ge G m).card
order_graph_serves_chain_dataIn LeanCombinatorics for TCS

If G serves requirement (S, x) and x ∉ S, then there is a nonempty chain of edges of G.E of length |S|+1 whose labels are duplicate-free and whose label set is S ∪ {x}.

theorem order_graph_serves_chain_data {d : ℕ} (G : OrderGraph d) (S : Finset (Fin d))
    (x : Fin d) (hx : x ∉ S) (hserv : order_graph_serves G S x) :
    ∃ p : List (Order d × Fin d), p ≠ [] ∧ (∀ e ∈ p, e ∈ G.E) ∧
      List.IsChain (fun e1 e2 : Order d × Fin d => e2.1 = order_move_to_front e1.2 e1.1) p ∧
      p.length = S.card + 1 ∧ (p.map Prod.snd).Nodup ∧
      (p.map Prod.snd).toFinset = insert x S
order_graph_top_set_cardIn LeanCombinatorics for TCS

If m ≥ 1 and m ≤ pos_ν(a) for an edge e = (ν, a), then U_m(e) has exactly m elements.

theorem order_graph_top_set_card {d : ℕ} (m : ℕ) (e : Order d × Fin d) (hm : 1 ≤ m)
    (h : m ≤ order_pos e.1 e.2) : (order_graph_top_set m e).card = m
order_graph_uni_serves_edgeIn LeanCombinatorics for TCS

In an order graph G of dimension d that is complete in the unidirectional model, for every m ∈ {1, ..., d}, every m-element subset U ⊆ Fin d, and every x ∈ U, there exists an edge e ∈ E_{≥m} such that U_m(e) = U and e.2 = x.

theorem order_graph_uni_serves_edge {d : ℕ} (G : OrderGraph d)
    (hG : order_graph_is_complete_uni G) (m : ℕ) (hm1 : 1 ≤ m) (hmd : m ≤ d)
    (U : Finset (Fin d)) (hU : U.card = m) (x : Fin d) (hx : x ∈ U) :
    ∃ e ∈ order_graph_edges_ge G m, order_graph_top_set m e = U ∧ e.2 = x
order_graph_unidirectional_lower_boundIn LeanCombinatorics for TCS

Let d ≥ 1 be an integer. If G is an order graph of dimension d that is complete in the unidirectional model, then for every m ∈ {1, ..., d}, the number of edges with pos_ν(a) ≥ m satisfies |E_{≥m}| ≥ m * Nat.choose d m, and consequently the total number of edges satisfies |E| ≥ d * Nat.choose (d - 1) ((d - 1) / 2).

theorem order_graph_unidirectional_lower_bound {d : ℕ} (hd : 1 ≤ d) (G : OrderGraph d)
    (hG : order_graph_is_complete_uni G) :
    (∀ m : ℕ, 1 ≤ m → m ≤ d → m * Nat.choose d m ≤ (order_graph_edges_ge G m).card) ∧
    d * Nat.choose (d - 1) ((d - 1) / 2) ≤ G.E.card
order_iso_of_down_setsIn LeanCombinatorics for TCS

If P and Q are finite partially ordered sets and α, β : P ≃ Q satisfy y ≤ x ↔ α y ≤ β x for all x, y, then P and Q are order isomorphic.

theorem order_iso_of_down_sets {P Q : Type*} [PartialOrder P] [PartialOrder Q]
    [Fintype P] [Fintype Q] [DecidableRel ((· ≤ ·) : Q → Q → Prop)]
    (α β : P ≃ Q) (h : ∀ y x, y ≤ x ↔ α y ≤ β x) :
    Nonempty (P ≃o Q)
order_mem_elemsIn LeanCombinatorics for TCS

Every element of Fin d occurs in the element list of an order of dimension d.

theorem order_mem_elems {d : ℕ} (π : Order d) (a : Fin d) : a ∈ π.elems
order_move_to_front_elemsIn LeanCombinatorics for TCS

Moving a label a to the front of an order π gives the element list a :: π.elems.erase a.

theorem order_move_to_front_elems {d : ℕ} (a : Fin d) (π : Order d) :
    (order_move_to_front a π).elems = a :: π.elems.erase a
order_of_mem_zpowers_of_primeIn LeanCombinatorics for TCS

Let p be a prime and σ be a permutation of Fin p of order p. Every non-identity element in the cyclic subgroup generated by σ has order p.

open Equiv Perm Subgroup in
theorem order_of_mem_zpowers_of_prime {p : ℕ} (hp : p.Prime) {σ : Perm (Fin p)}
    (hσ : orderOf σ = p) {τ : Perm (Fin p)} (hτ : τ ∈ zpowers σ) (hτ1 : τ ≠ 1) :
    orderOf τ = p
order_reflecting_of_injective_down_set_preservingIn LeanCombinatorics for TCS

If a map α : P → Q between preordered types is injective and preserves principal down-sets (that is, the image of Set.Iic x under α is Set.Iic (α x) for all x in P), then α preserves and reflects the order: α x ≤ α y ↔ x ≤ y for all x, y in P.

theorem order_reflecting_of_injective_down_set_preserving
    {P Q : Type*} [Preorder P] [Preorder Q] (α : P → Q) (hα : Function.Injective α)
    (h_down : ∀ x : P, α '' Set.Iic x = Set.Iic (α x)) (x y : P) :
    α x ≤ α y ↔ x ≤ y
ordered_pair_sum_count_pairIn LeanCombinatorics for TCS

For distinct a and b, the element a + b has exactly two ordered restricted representations from the two-element set {a, b}, namely (a, b) and (b, a).

theorem ordered_pair_sum_count_pair {G : Type*} [AddCommGroup G] [DecidableEq G] {a b : G} (h : a ≠ b) : orderedPairSumCount ({a, b} : Finset G) (a + b) = 2
oriented_star_both_degrees_not_osIn LeanCombinatorics for TCS

An oriented star whose centre has positive in-degree and positive out-degree is not OS.

theorem oriented_star_both_degrees_not_os {V : Type*} [Fintype V] (D : Digraph V)
    [DecidableRel D.Adj] (c : V)
    (hstar : is_oriented_star D c)
    (hin : 1 ≤ digraph_in_degree D c) (hout : 1 ≤ digraph_out_degree D c) :
    ¬ is_os_oriented_star D c
oriented_star_degree_sumIn LeanCombinatorics for TCS

In an oriented star, the in-degree plus the out-degree of the centre equals |V| - 1.

theorem oriented_star_degree_sum {V : Type*} [Fintype V] (D : Digraph V)
    [DecidableRel D.Adj] (c : V)
    (hloop : ∀ v, ¬ D.Adj v v) (hasym : ∀ u v, D.Adj u v → ¬ D.Adj v u)
    (hconn : ∀ u, u ≠ c → D.Adj c u ∨ D.Adj u c) :
    digraph_in_degree D c + digraph_out_degree D c = Fintype.card V - 1
oriented_star_ge_two_edges_not_osIn LeanCombinatorics for TCS

If an oriented star D has at least two edges (at least three vertices), then D is not OS.

theorem oriented_star_ge_two_edges_not_os
    {V : Type*} [Fintype V] (D : Digraph V) [DecidableRel D.Adj] (c : V)
    (hstar : is_oriented_star D c) (hcard : 3 ≤ Fintype.card V) :
    ¬ is_os_oriented_star D c
oriented_star_oas_of_equal_degreesIn LeanCombinatorics for TCS

An oriented star whose center has equal in-degree and out-degree is oriented anti-Sidorenko (OAS).

theorem oriented_star_oas_of_equal_degrees
    {V : Type*} [Fintype V] (D : Digraph V) [DecidableRel D.Adj] (c : V)
    (heq : digraph_in_degree D c = digraph_out_degree D c) :
    is_oas_oriented_star D c
oriented_star_zero_in_degree_not_osIn LeanCombinatorics for TCS

An oriented star with at least three vertices whose centre has in-degree 0 is not OS.

theorem oriented_star_zero_in_degree_not_os {V : Type*} [Fintype V] (D : Digraph V)
    [DecidableRel D.Adj] (c : V)
    (hstar : is_oriented_star D c) (hcard : 3 ≤ Fintype.card V)
    (hin : digraph_in_degree D c = 0) :
    ¬ is_os_oriented_star D c
oriented_star_zero_out_degree_not_osIn LeanCombinatorics for TCS

An oriented star with at least three vertices whose centre has out-degree 0 is not OS.

theorem oriented_star_zero_out_degree_not_os {V : Type*} [Fintype V] (D : Digraph V)
    [DecidableRel D.Adj] (c : V)
    (hstar : is_oriented_star D c) (hcard : 3 ≤ Fintype.card V)
    (hout : digraph_out_degree D c = 0) :
    ¬ is_os_oriented_star D c
os_witness_digraphonsIn LeanCombinatorics for TCS

The rectangle digraphon W(x,y) = g(y), its transpose, and the split product digraphon 1_A x 1_B are all digraphons.

theorem os_witness_digraphons :
    is_digraphon os_witness_rect ∧ is_digraphon (Function.swap os_witness_rect) ∧
      is_digraphon os_witness_split
os_witness_rect_integralsIn LeanCombinatorics for TCS

For the rectangle digraphon and its transpose: the d-th power integral of the relevant (out-, resp. in-) marginal is (1/4)^d, while the d-th power integral of either symmetrized marginal equals (5/8)^d/4 + 3*(1/8)^d/4, written as (1/8)^d + ((5/8)^d - (1/8)^d)*(1/4).

theorem os_witness_rect_integrals :
    (∀ d : ℕ, ∫ x in Set.Icc (0:ℝ) 1, (1 / 4 : ℝ) ^ d = (1 / 4) ^ d) ∧
    (∀ d : ℕ, ∫ x in Set.Icc (0:ℝ) 1,
        (digraphon_out_marginal os_witness_rect x) ^ d = (1 / 4) ^ d) ∧
    (∀ d : ℕ, ∫ x in Set.Icc (0:ℝ) 1,
        (digraphon_in_marginal (Function.swap os_witness_rect) x) ^ d = (1 / 4) ^ d) ∧
    (∀ d : ℕ, ∫ x in Set.Icc (0:ℝ) 1,
        (digraphon_out_marginal (digraphon_symmetrization os_witness_rect) x) ^ d =
      (1 / 8) ^ d + ((5 / 8) ^ d - (1 / 8) ^ d) * (1 / 4)) ∧
    (∀ d : ℕ, ∫ x in Set.Icc (0:ℝ) 1,
        (digraphon_in_marginal (digraphon_symmetrization (Function.swap os_witness_rect)) x) ^ d =
      (1 / 8) ^ d + ((5 / 8) ^ d - (1 / 8) ^ d) * (1 / 4))
os_witness_rect_marginalsIn LeanCombinatorics for TCS

For the rectangle digraphon W = g(y): W^+ is the constant 1/4 and W^- = g, hence both marginals of the symmetrization (W + W^T)/2 equal (g + 1/4)/2; the transposed rectangle digraphon has the in- and out-marginals exchanged, with the same symmetrized marginals.

theorem os_witness_rect_marginals :
    digraphon_out_marginal os_witness_rect = (fun _ => (1 / 4 : ℝ)) ∧
    digraphon_in_marginal os_witness_rect = os_witness_rect_g ∧
    digraphon_out_marginal (digraphon_symmetrization os_witness_rect) =
      (fun x => (os_witness_rect_g x + 1 / 4) / 2) ∧
    digraphon_in_marginal (digraphon_symmetrization os_witness_rect) =
      (fun x => (os_witness_rect_g x + 1 / 4) / 2) ∧
    digraphon_out_marginal (Function.swap os_witness_rect) = os_witness_rect_g ∧
    digraphon_in_marginal (Function.swap os_witness_rect) = (fun _ => (1 / 4 : ℝ)) ∧
    digraphon_out_marginal (digraphon_symmetrization (Function.swap os_witness_rect)) =
      (fun x => (os_witness_rect_g x + 1 / 4) / 2) ∧
    digraphon_in_marginal (digraphon_symmetrization (Function.swap os_witness_rect)) =
      (fun x => (os_witness_rect_g x + 1 / 4) / 2)
os_witness_rect_num_ineqIn LeanCombinatorics for TCS

For every d ≥ 2, (1/4)^d < (1/8)^d + ((5/8)^d - (1/8)^d)*(1/4), i.e. (1/4)^d < (5/8)^d/4 + 3*(1/8)^d/4.

theorem os_witness_rect_num_ineq (d : ℕ) (hd : 2 ≤ d) :
    (1 / 4 : ℝ) ^ d < (1 / 8) ^ d + ((5 / 8) ^ d - (1 / 8) ^ d) * (1 / 4)
os_witness_split_integralsIn LeanCombinatorics for TCS

For the split digraphon W = 1_A x 1_B: if a, b ≥ 1 then the integral of (W^-)^a (W^+)^b is 0, and for d ≥ 1 the integral of the d-th power of the symmetrized marginal equals (1/4)^d.

theorem os_witness_split_integrals :
    (∀ d : ℕ, 1 ≤ d → ∫ x in Set.Icc (0:ℝ) 1,
        (digraphon_out_marginal (digraphon_symmetrization os_witness_split) x) ^ d =
      (1 / 4) ^ d) ∧
    (∀ a b : ℕ, 1 ≤ a → 1 ≤ b → ∫ x in Set.Icc (0:ℝ) 1,
        (digraphon_in_marginal os_witness_split x) ^ a *
          (digraphon_out_marginal os_witness_split x) ^ b = 0)
os_witness_split_marginalsIn LeanCombinatorics for TCS

For the split digraphon W = 1_A x 1_B with A = (0,1/2), B = (1/2,1): W^+ = (1/2)*1_A and W^- = (1/2)*1_B, and the two marginals of (W + W^T)/2 coincide.

theorem os_witness_split_marginals :
    digraphon_out_marginal os_witness_split =
        (fun x => Set.indicator (Set.Ioo (0:ℝ) (1/2)) (fun _ => (1:ℝ)) x / 2) ∧
    digraphon_in_marginal os_witness_split =
        (fun x => Set.indicator (Set.Ioo (1/2:ℝ) 1) (fun _ => (1:ℝ)) x / 2) ∧
    digraphon_in_marginal (digraphon_symmetrization os_witness_split) =
      digraphon_out_marginal (digraphon_symmetrization os_witness_split)
palette_coloring_monochromatic_edges_leIn LeanCombinatorics for TCS

Given a graph G, nested palettes P, and a strictly increasing sequence of indices r_0 = 1 < ... < r_m ≤ T with degree bounds D(r_l), there exists a coloring c with at most (n - A_0)n + ∑ (A_l - A_{l+1}) D(r_l) + A_m D(r_m) monochromatic edges.

theorem palette_coloring_monochromatic_edges_le {V : Type*} [Fintype V] (G : SimpleGraph V) (k T : ℕ) (hk : 0 < k)
    (P : ℕ → V → Finset (Fin k)) (hP_nested : ∀ t < T, ∀ v, P (t + 1) v ⊆ P t v)
    (D : ℕ → ℝ) (m : ℕ) (r : ℕ → ℕ)
    (hr0 : r 0 = 1)
    (hr_mono : ∀ l < m, r l < r (l + 1))
    (hr_bound : ∀ l ≤ m, 1 ≤ r l ∧ r l ≤ T)
    (h_deg : ∀ l ≤ m, ∀ v ∈ palette_active_vertices (P (r l)),
      ∃ i ∈ P (r l) v, (palette_degree G (P (r l)) v i : ℝ) ≤ D (r l)) :
    ∃ c : V → Fin k, ((monochromatic_edges G c).card : ℝ) ≤
      ((Fintype.card V : ℝ) - ((palette_active_vertices (P 1)).card : ℝ)) * (Fintype.card V : ℝ) +
      (∑ l ∈ Finset.range m, (((palette_active_vertices (P (r l))).card : ℝ) -
        ((palette_active_vertices (P (r (l + 1)))).card : ℝ)) * D (r l)) +
      ((palette_active_vertices (P (r m))).card : ℝ) * D (r m)
palette_reconstruction_lemmaIn LeanCombinatorics for TCS

Let G be a simple graph on a finite vertex set V. Let P be a sequence of palette systems P 0 ⊇ P 1 ⊇ ... ⊇ P T with P 0 v = Finset.univ for all v : V, where 0 < k and 0 < T. Suppose that for every 1 ≤ t ≤ T and every v in palette_active_vertices (P t), there is a color i ∈ P t v with palette degree palette_degree G (P t) v i ≤ D t, where D t ∈ [0, Fintype.card V] and ∑_{t=1}^T D t ≤ k * Fintype.card V. If Fintype.card V - (palette_active_vertices (P t)).card ≤ α * t * Fintype.card V for all 1 ≤ t ≤ T, then there exists a coloring c : V → Fin k with at most (α * (k + 1) + k / T) * (Fintype.card V)^2 monochromatic edges in monochromatic_edges G c.

theorem palette_reconstruction_lemma {V : Type*} [Fintype V] (G : SimpleGraph V) (k T : ℕ) (hk : 0 < k) (hT : 0 < T) (P : ℕ → V → Finset (Fin k)) (hP0 : ∀ v, P 0 v = Finset.univ) (hP_nested : ∀ t < T, ∀ v, P (t + 1) v ⊆ P t v) (D : ℕ → ℝ) (hD_range : ∀ t ∈ Finset.Icc 1 T, 0 ≤ D t ∧ D t ≤ Fintype.card V) (hD_sum : ∑ t ∈ Finset.Icc 1 T, D t ≤ (k * Fintype.card V : ℝ)) (h_deg : ∀ t ∈ Finset.Icc 1 T, ∀ v ∈ palette_active_vertices (P t), ∃ i ∈ P t v, (palette_degree G (P t) v i : ℝ) ≤ D t) (α : ℝ) (hB : ∀ t ∈ Finset.Icc 1 T, ((Fintype.card V - (palette_active_vertices (P t)).card : ℕ) : ℝ) ≤ α * (t : ℝ) * (Fintype.card V : ℝ)) : ∃ c : V → Fin k, ((monochromatic_edges G c).card : ℝ) ≤ (α * (k + 1) + (k : ℝ) / T) * (Fintype.card V : ℝ)^2
palette_summation_by_partsIn LeanCombinatorics for TCS

Summation by parts bound for real sequences: given non-increasing D, non-decreasing r with r_0 = 1, and bounds on n - A_l and the step sum of (r_{l+1} - r_l) D_l, the layered sum (n - A_0) n + ∑_{l=0}^{m-1} (A_l - A_{l+1}) D_l + A_m D_m is bounded by (α(k+1) + k/T) n^2.

theorem palette_summation_by_parts (m : ℕ) (A D r : ℕ → ℝ) (n α k T : ℝ)
    (hr0 : r 0 = 1)
    (hD_dec : ∀ l < m, D (l + 1) ≤ D l)
    (hrm_nonneg : 0 ≤ r m)
    (hD_nonneg : 0 ≤ D m)
    (hn_D0 : 0 ≤ n - D 0)
    (hA0 : n - A 0 ≤ α * n)
    (hA : ∀ l < m, n - A (l + 1) ≤ α * r (l + 1) * n)
    (h_sum_r : ∑ l ∈ Finset.range m, (r (l + 1) - r l) * D l ≤ k * n)
    (hDm : D m ≤ k * n / T)
    (hn : 0 ≤ n)
    (hα : 0 ≤ α) :
    (n - A 0) * n + (∑ l ∈ Finset.range m, (A l - A (l + 1)) * D l) + A m * D m ≤
    (α * (k + 1) + k / T) * n^2
parallel_line_intersection_dichotomyIn LeanCombinatorics for TCS

Let p be a prime, S an admissible plane set in (ZMod p)^3 containing the affine line through P in direction v ≠ 0. Then for every point Q, the affine line through Q in direction v meets S in either 0 or p points.

theorem parallel_line_intersection_dichotomy
    (p : ℕ) [Fact p.Prime] (S : Set (Fin 3 → ZMod p)) (hS : admissible_plane_set p S)
    (P v : Fin 3 → ZMod p) (hv : v ≠ 0) (hline : affine_line P v ⊆ S)
    (Q : Fin 3 → ZMod p) :
    (S ∩ affine_line Q v).ncard = 0 ∨ (S ∩ affine_line Q v).ncard = p
parallel_mw_alpha_posIn LeanCombinatorics for TCS

For natural numbers n and r with 1 ≤ r, parallel_mw_alpha n r is strictly positive.

theorem parallel_mw_alpha_pos (n r : ℕ) (hr : 1 ≤ r) : 0 < parallel_mw_alpha n r
parallel_mw_ratio_lt_iff_coreIn LeanCombinatorics for TCS

For natural numbers n and r, profiles q q' : Fin n → ℕ, if parallel_mw_alpha n r > 0 and parallel_mw_tau r q > 0 and parallel_mw_tau r q' > 0, then parallel_mw_ratio r q' < parallel_mw_ratio r q holds if and only if parallel_mw_star r q' * (parallel_mw_tau r q)^2 < parallel_mw_star r q * (parallel_mw_tau r q')^2.

theorem parallel_mw_ratio_lt_iff_core {n : ℕ} (r : ℕ) (q q' : Fin n → ℕ)
    (ha : 0 < parallel_mw_alpha n r) (hq : 0 < parallel_mw_tau r q) (hq' : 0 < parallel_mw_tau r q') :
    (parallel_mw_ratio r q' < parallel_mw_ratio r q ↔
      parallel_mw_star r q' * (parallel_mw_tau r q) ^ 2 <
        parallel_mw_star r q * (parallel_mw_tau r q') ^ 2)
parallel_mw_star_transfer_formulaIn LeanCombinatorics for TCS

For natural numbers n and r, a profile q : Fin n → ℕ, distinct i j : Fin n with q j ≥ 1: parallel_mw_star r (parallel_mw_transfer q i j) = parallel_mw_star r q + 2 * (2^(q j - 1) - 2^(q i)) * (sum from m = 0 to r-2 of (-1)^(r-m) * elem_symm_on (univ \ {i,j}) m (fun k => 2^(q k) - 1)).

theorem parallel_mw_star_transfer_formula {n : ℕ} (r : ℕ) (q : Fin n → ℕ) (i j : Fin n)
    (hij : i ≠ j) (hj : 1 ≤ q j) :
    parallel_mw_star r (parallel_mw_transfer q i j) =
      parallel_mw_star r q + 2 * ((2 : ℝ) ^ (q j - 1) - (2 : ℝ) ^ (q i)) *
        (∑ m ∈ Finset.range (r - 1), (-1 : ℝ) ^ (r - m) *
          elem_symm_on ((Finset.univ.erase i).erase j) m (fun k => (2 : ℝ) ^ (q k) - 1))
parallel_mw_star_transfer_gtIn LeanCombinatorics for TCS

For natural numbers n ≥ 3 and r with 2 ≤ r < n, a profile q : Fin n → ℕ with q k > 0 for all k, and indices i j with q i + 2 ≤ q j, the star value of the transferred profile is strictly larger than that of q.

theorem parallel_mw_star_transfer_gt {n r : ℕ} (hn : 3 ≤ n) (hr : 2 ≤ r) (hrn : r < n)
    (q : Fin n → ℕ) (hq : ∀ i, 0 < q i) (i j : Fin n) (hij : q i + 2 ≤ q j) :
    parallel_mw_star r q < parallel_mw_star r (parallel_mw_transfer q i j)
parallel_mw_tau_posIn LeanCombinatorics for TCS

For natural numbers n and r with r ≤ n, and q : Fin n → ℕ with q i > 0 for all i, parallel_mw_tau r q is strictly positive.

theorem parallel_mw_tau_pos {n : ℕ} (r : ℕ) (q : Fin n → ℕ) (hq : ∀ i, 0 < q i) (hrn : r ≤ n) :
    0 < parallel_mw_tau r q
parallel_mw_tau_transfer_formulaIn LeanCombinatorics for TCS

For natural numbers n and r with 2 ≤ r, a profile q : Fin n → ℕ, distinct i j : Fin n with q j ≥ 1: parallel_mw_tau r (parallel_mw_transfer q i j) = parallel_mw_tau r q + (q j - q i - 1) * elem_symm_on (univ \ {i, j}) (r-2) q, where the subtraction in the coefficient is in ℝ.

theorem parallel_mw_tau_transfer_formula {n : ℕ} (r : ℕ) (hr : 2 ≤ r) (q : Fin n → ℕ) (i j : Fin n)
    (hij : i ≠ j) (hj : 1 ≤ q j) :
    parallel_mw_tau r (parallel_mw_transfer q i j) =
      parallel_mw_tau r q + ((q j : ℝ) - (q i : ℝ) - 1) *
        elem_symm_on ((Finset.univ.erase i).erase j) (r - 2) (fun k => (q k : ℝ))
parallel_mw_tau_transfer_gtIn LeanCombinatorics for TCS

For natural numbers n and r with 2 ≤ r < n, a profile q : Fin n → ℕ with q k > 0 for all k, and indices i j with q i + 2 ≤ q j, the r-th elementary symmetric sum of the transferred profile is strictly larger than that of q.

theorem parallel_mw_tau_transfer_gt {n r : ℕ} (hr : 2 ≤ r) (hrn : r < n)
    (q : Fin n → ℕ) (hq : ∀ k, 0 < q k) (i j : Fin n) (hij : q i + 2 ≤ q j) :
    parallel_mw_tau r q < parallel_mw_tau r (parallel_mw_transfer q i j)
parallel_mw_transfer_coreIn LeanCombinatorics for TCS

For natural numbers n ≥ 3 and r with 2 ≤ r < n, a profile q : Fin n → ℕ with q k > 0 for all k, and indices i j with q i + 2 ≤ q j: parallel_mw_star r (parallel_mw_transfer q i j) * (parallel_mw_tau r q)^2 < parallel_mw_star r q * (parallel_mw_tau r (parallel_mw_transfer q i j))^2.

theorem parallel_mw_transfer_core {n r : ℕ} (hn : 3 ≤ n) (hr : 2 ≤ r) (hrn : r < n)
    (q : Fin n → ℕ) (hq : ∀ i, 0 < q i) (i j : Fin n) (hij : q i + 2 ≤ q j) :
    parallel_mw_star r (parallel_mw_transfer q i j) * (parallel_mw_tau r q) ^ 2 <
      parallel_mw_star r q * (parallel_mw_tau r (parallel_mw_transfer q i j)) ^ 2
partition_A_57_cardIn LeanCombinatorics for TCS

The family A_57 of partitions of 57 whose multiset of parts contains {1,2} or {1,3} or {1,4} or {2,3,4} has exactly 527254 members.

theorem partition_A_57_card : (partition_A 57).card = 527254
partition_merge_mixture_ulc_counterexampleIn LeanCombinatorics for TCS

A positive mixture of the coefficient sequences of the partition matroid polynomial (1+2X)(1+X) and the free matroid polynomial (1+X)^4 violates binomial-normalized log-concavity at rank two.

theorem partition_merge_mixture_ulc_counterexample : let a : ℕ → ℚ := fun k => if k = 0 then 1 else if k = 1 then 3 else if k = 2 then 2 else 0; let u : ℕ → ℚ := fun k => (Nat.choose 4 k : ℚ); let v : ℕ → ℚ := fun k => a k + 3 * u k; v 1 * v 3 * (Nat.choose 4 2 : ℚ)^2 > v 2^2 * 4 * (Nat.choose 4 3 : ℚ)
partitionable_faces_card_eq_sumIn LeanCombinatorics for TCS

If a selection map phi partitions the face set of a finite simplicial complex into boolean intervals, each face lying in a unique interval [phi sigma, sigma] whose top is a facet sigma, then the number of faces equals the sum over facets sigma of 2^(|sigma| - |phi sigma|).

theorem partitionable_faces_card_eq_sum {V : Type*} [DecidableEq V] {facets : Finset (Finset V)}
    {phi : Finset V → Finset V}
    (hsub : ∀ σ ∈ facets, phi σ ⊆ σ)
    (huniq : ∀ τ ∈ facets.biUnion Finset.powerset,
      ∃! σ, σ ∈ facets ∧ phi σ ⊆ τ ∧ τ ⊆ σ) :
    (facets.biUnion Finset.powerset).card
      = facets.sum (fun σ => 2 ^ (σ.card - (phi σ).card))
partitionable_of_intervals_cover_and_disjointIn LeanCombinatorics for TCS

A finite simplicial complex is partitionable if there exists a selection map phi whose Boolean intervals are pairwise disjoint and cover all faces.

theorem partitionable_of_intervals_cover_and_disjoint
    {V : Type*} [DecidableEq V] (facets : Finset (Finset V))
    (phi : Finset V → Finset V)
    (hsub : ∀ σ ∈ facets, phi σ ⊆ σ)
    (hdisj : ∀ σ₁ ∈ facets, ∀ σ₂ ∈ facets, σ₁ ≠ σ₂ →
      ∀ τ, (phi σ₁ ⊆ τ ∧ τ ⊆ σ₁) → ¬ (phi σ₂ ⊆ τ ∧ τ ⊆ σ₂))
    (hcov : ∀ τ ∈ facets.biUnion Finset.powerset, ∃ σ ∈ facets, phi σ ⊆ τ ∧ τ ⊆ σ) :
    is_partitionable_two_complex facets
pattern_contains_of_standardizeIn LeanCombinatorics for TCS

If l is duplicate-free and the standardization of l pattern-contains τ, then l itself pattern-contains τ.

theorem pattern_contains_of_standardize {l τ : List ℕ} (h : l.Nodup) (h1 : pattern_contains (pattern_standardize l) τ) : pattern_contains l τ
pattern_contains_of_sublistIn LeanCombinatorics for TCS

A sublist l₁ of l₂ is a pattern contained in l₂.

theorem pattern_contains_of_sublist {l₁ l₂ : List ℕ} (h : l₁.Sublist l₂) : pattern_contains l₂ l₁
pattern_contains_standardize_selfIn LeanCombinatorics for TCS

A duplicate-free list l pattern-contains its own standardization (using the whole list as the witnessing sublist).

theorem pattern_contains_standardize_self (l : List ℕ) (h : l.Nodup) : pattern_contains l (pattern_standardize l)
pattern_contains_transIn LeanCombinatorics for TCS

Pattern containment is transitive: if π contains σ and σ contains τ then π contains τ.

theorem pattern_contains_trans (π σ τ : List ℕ) (h1 : pattern_contains π σ) (h2 : pattern_contains σ τ) : pattern_contains π τ
pattern_standardize_eq_of_order_isoIn LeanCombinatorics for TCS

If s is duplicate-free, π is a standard permutation, |s| = |π|, and s is order-isomorphic to π entrywise, then the standardization of s is exactly π.

theorem pattern_standardize_eq_of_order_iso {s π : List ℕ} (hs : s.Nodup) (hπ : π.Perm (List.range' 1 π.length)) (hlen : s.length = π.length) (hord : ∀ (i j : Fin s.length), s[i] < s[j] ↔ π[Fin.cast hlen i] < π[Fin.cast hlen j]) : pattern_standardize s = π
pattern_standardize_filter_lengthIn LeanCombinatorics for TCS

If σ' is duplicate-free, its entries ≤ |σ| form exactly σ (a standard permutation), s is a sublist of σ, and |σ'| = |σ| + k, then the entries of σ' that are either above |σ| or lie in s number |s| + k.

theorem pattern_standardize_filter_length {σ' σ s : List ℕ} {k : ℕ} (hσ' : σ'.Nodup) (hkeep : σ'.filter (fun x => decide (x ≤ σ.length)) = σ) (hperm : σ.Perm (List.range' 1 σ.length)) (hsub : s.Sublist σ) (hlen' : σ'.length = σ.length + k) : (σ'.filter (fun x => decide (x ≤ σ.length → x ∈ s))).length = s.length + k
pattern_standardize_filter_of_sublistIn LeanCombinatorics for TCS

If s is a sublist of σ', every entry of σ' outside s exceeds every entry of s, and the standardization of s is π, then filtering the standardization of σ' to the values ≤ |π| yields π.

theorem pattern_standardize_filter_of_sublist {σ' s π : List ℕ} (hsub : s.Sublist σ') (hbig : ∀ x ∈ σ', x ∉ s → ∀ y ∈ s, y < x) (hπ : pattern_standardize s = π) : (pattern_standardize σ').filter (fun z => decide (z ≤ π.length)) = π
pattern_standardize_permIn LeanCombinatorics for TCS

The standardization of a duplicate-free list is a permutation of 1, …, |l|.

theorem pattern_standardize_perm (l : List ℕ) (h : l.Nodup) : (pattern_standardize l).Perm (List.range' 1 l.length)
pattern_standardize_rank_lt_iffIn LeanCombinatorics for TCS

For a duplicate-free list l and elements x, y of l, the rank of x is strictly smaller than the rank of y (rank z = number of entries ≤ z) if and only if x < y.

theorem pattern_standardize_rank_lt_iff (l : List ℕ) (h : l.Nodup) {x y : ℕ} (hx : x ∈ l) (hy : y ∈ l) : (l.filter (fun z => z ≤ x)).length < (l.filter (fun z => z ≤ y)).length ↔ x < y
perfect_set_to_reduced_latin_square_memIn LeanCombinatorics for TCS

For every natural number n with n ≥ 2 and every finite set S of permutations of Fin n satisfying is_perfect_set n S, the array perfect_set_to_reduced_latin_square S is a reduced Latin square.

theorem perfect_set_to_reduced_latin_square_mem (n : ℕ) [NeZero n] (hn : 2 ≤ n)
    (S : Finset (Equiv.Perm (Fin n))) (hS : is_perfect_set n S) :
    is_reduced_latin_square (perfect_set_to_reduced_latin_square S)
perm_eq_of_get_lt_iffIn LeanCombinatorics for TCS

If two lists are both permutations of {1, …, n} (with the same length n) and have the same pairwise < pattern, then they are equal.

theorem perm_eq_of_get_lt_iff {p q : List ℕ} (hp : p.Perm (List.range' 1 p.length)) (hq : q.Perm (List.range' 1 q.length)) (hlen : p.length = q.length) (hpat : ∀ i j : Fin p.length, p[i] < p[j] ↔ q[Fin.cast hlen i] < q[Fin.cast hlen j]) : p = q
perm_offset_rook_number_neg_one_one_eq_menage_of_ltIn LeanCombinatorics for TCS

For every natural number n ≥ 4 such that n is even, and every natural number k < n, the rook numbers for {-1, 1} and {-1, 0} are equal: perm_offset_rook_number n {-1, 1} k = perm_offset_rook_number n {-1, 0} k.

theorem perm_offset_rook_number_neg_one_one_eq_menage_of_lt (n : ℕ) (hn : 4 ≤ n) (he : Even n)
    (k : ℕ) (hk : k < n) :
    perm_offset_rook_number n {-1, 1} k = perm_offset_rook_number n {-1, 0} k
perm_offset_rook_number_neg_one_one_top_eq_menage_add_twoIn LeanCombinatorics for TCS

For every natural number n ≥ 4 such that n is even, the n-th rook number for {-1, 1} is equal to the n-th rook number for {-1, 0} plus 2: perm_offset_rook_number n {-1, 1} n = perm_offset_rook_number n {-1, 0} n + 2.

theorem perm_offset_rook_number_neg_one_one_top_eq_menage_add_two (n : ℕ) (hn : 4 ≤ n) (he : Even n) :
    perm_offset_rook_number n {-1, 1} n = perm_offset_rook_number n {-1, 0} n + 2
petrial_log_concave_of_petrial_nullity_poly_pointwiseIn LeanCombinatorics for TCS

If for every k the nullity generating polynomial of G satisfies a_k * a_{k+2} ≤ a_{k+1}^2, then G has a log-concave partial Petrial polynomial.

theorem petrial_log_concave_of_petrial_nullity_poly_pointwise {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (h : ∀ k : ℕ, (petrial_nullity_poly G).coeff k * (petrial_nullity_poly G).coeff (k + 2)
      ≤ (petrial_nullity_poly G).coeff (k + 1) * (petrial_nullity_poly G).coeff (k + 1)) :
    petrial_log_concave G
petrial_nullity_poly_coeff_eq_petrial_coeffIn LeanCombinatorics for TCS

For every finite graph G on V and every k ≤ |V|, the coefficient of w^(|V| - k) in the nullity generating polynomial equals petrial_coeff G k (the number of vertex subsets F whose partial Petrial matrix has rank k).

theorem petrial_nullity_poly_coeff_eq_petrial_coeff {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {k : ℕ} (hk : k ≤ Fintype.card V) :
    (petrial_nullity_poly G).coeff (Fintype.card V - k) = petrial_coeff G k
petrial_nullity_poly_eval_oneIn LeanCombinatorics for TCS

For every finite graph G on V, the nullity generating polynomial evaluated at w = 1 equals 2^|V| (the number of vertex subsets).

theorem petrial_nullity_poly_eval_one {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] :
    (petrial_nullity_poly G).eval 1 = 2 ^ Fintype.card V
petrial_nullity_poly_leaf_recIn LeanCombinatorics for TCS

For a finite graph G with a degree-one vertex v whose neighbour is u, the nullity generating polynomial of G equals the nullity generating polynomial of G with v deleted, plus twice the nullity generating polynomial of G with u and v deleted.

theorem petrial_nullity_poly_leaf_rec {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) [DecidableRel T.Adj] {v u : V}
    (hv : T.degree v = 1) (hu : T.Adj v u) :
    petrial_nullity_poly T
      = petrial_nullity_poly (T.induce ({v}ᶜ : Set V))
        + 2 * petrial_nullity_poly (T.induce (({u} ∪ {v})ᶜ : Set V))
petrial_nullity_poly_log_concave_of_acyclic_maxDegree_threeIn LeanCombinatorics for TCS

For every acyclic graph G on a finite type V with maximum degree at most 3, the coefficient sequence of the nullity generating polynomial of G is log-concave (a_k * a_{k+2} ≤ a_{k+1}^2 for all k) and has interval support.

theorem petrial_nullity_poly_log_concave_of_acyclic_maxDegree_three
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (hacyc : G.IsAcyclic) (hdeg : G.maxDegree ≤ 3) :
    poly_log_concave_with_interval_support (petrial_nullity_poly G)
petrial_nullity_poly_mul_of_cutIn LeanCombinatorics for TCS

If no edge of G joins a vertex of s to a vertex outside s, then the nullity generating polynomial of G is the product of the nullity generating polynomials of the induced subgraphs on s and on its complement.

theorem petrial_nullity_poly_mul_of_cut {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (s : Set V) [DecidablePred (· ∈ s)]
    (hcut : ∀ a b : V, a ∈ s → b ∉ s → ¬ G.Adj a b) :
    petrial_nullity_poly G
      = petrial_nullity_poly (G.induce s) * petrial_nullity_poly (G.induce sᶜ)
planar_admissible_height_eq_of_generating_subsetIn LeanCombinatorics for TCS

If two admissible heights agree on a subset S ⊆ A containing, for every point x outside S, an outgoing segment x − y parallel to a segment between two points of S, then they agree everywhere.

theorem planar_admissible_height_eq_of_generating_subset (A : Finset (EuclideanSpace ℝ (Fin 2))) (S : Finset (EuclideanSpace ℝ (Fin 2))) (hS : S ⊆ A) (z z' : ↥A → ℝ) (hz : planar_admissible_height A z) (hz' : planar_admissible_height A z') (hagree : ∀ x : ↥A, (↑x : EuclideanSpace ℝ (Fin 2)) ∈ S → z x = z' x) (hgen : ∀ x : ↥A, (↑x : EuclideanSpace ℝ (Fin 2)) ∉ S → ∃ y : ↥A, ∃ a b : ↥A, ∃ c : ℝ, c ≠ 0 ∧ (↑x - ↑y : EuclideanSpace ℝ (Fin 2)) = c • ((↑b - ↑a : EuclideanSpace ℝ (Fin 2))) ∧ (↑y : EuclideanSpace ℝ (Fin 2)) ∈ S ∧ (↑a : EuclideanSpace ℝ (Fin 2)) ∈ S ∧ (↑b : EuclideanSpace ℝ (Fin 2)) ∈ S) : ∀ x : ↥A, z x = z' x
planar_all_even_affine_imageIn LeanCombinatorics for TCS

Being all-even is invariant under affine bijections of the plane.

theorem planar_all_even_affine_image (A : Finset (EuclideanSpace ℝ (Fin 2))) (f : EuclideanSpace ℝ (Fin 2) ≃ᵃ[ℝ] EuclideanSpace ℝ (Fin 2)) : planar_all_even (A.image f.toEquiv.toEmbedding) ↔ planar_all_even A
planar_all_even_exists_occupied_lines_le_sixIn LeanCombinatorics for TCS

Every finite planar all-even set A with A.card ≤ 8 has a non-zero direction u in which at most six lines meet A.

theorem planar_all_even_exists_occupied_lines_le_six
    (A : Finset (EuclideanSpace ℝ (Fin 2)))
    (hA : planar_all_even A) (hcard : A.card ≤ 8) :
    ∃ u : EuclideanSpace ℝ (Fin 2), u ≠ 0 ∧ planar_occupied_lines A u ≤ 6
planar_all_even_height_rigid_of_occupied_lines_eq_eightIn LeanCombinatorics for TCS

Every all-even planar set meeting exactly eight lines perpendicular to some non-zero direction is height-rigid.

theorem planar_all_even_height_rigid_of_occupied_lines_eq_eight (A : Finset (EuclideanSpace ℝ (Fin 2))) (hA : planar_all_even A) (u : EuclideanSpace ℝ (Fin 2)) (hu : u ≠ 0) (h8 : planar_occupied_lines A u = 8) : planar_height_rigid A
planar_all_even_height_rigid_of_occupied_lines_eq_fourIn LeanCombinatorics for TCS

Every finite planar all-even set A for which there exists a non-zero vector u with planar_occupied_lines A u = 4 is height-rigid (planar_height_rigid A).

theorem planar_all_even_height_rigid_of_occupied_lines_eq_four
    (A : Finset (EuclideanSpace ℝ (Fin 2)))
    (hA : planar_all_even A)
    (u : EuclideanSpace ℝ (Fin 2)) (hu : u ≠ 0)
    (h4 : planar_occupied_lines A u = 4) :
    planar_height_rigid A
planar_all_even_height_rigid_of_occupied_lines_eq_sixIn LeanCombinatorics for TCS

Every finite planar all-even set A for which there exists a non-zero vector u with planar_occupied_lines A u = 6 is height-rigid (planar_height_rigid A).

theorem planar_all_even_height_rigid_of_occupied_lines_eq_six
    (A : Finset (EuclideanSpace ℝ (Fin 2)))
    (hA : planar_all_even A)
    (u : EuclideanSpace ℝ (Fin 2)) (hu : u ≠ 0)
    (h6 : planar_occupied_lines A u = 6) :
    planar_height_rigid A
planar_all_even_occupied_lines_le_eight_casesIn LeanCombinatorics for TCS

For an all-even set A and a non-zero direction u, if at most 8 lines perpendicular to u meet A then exactly 4, 6 or 8 do.

theorem planar_all_even_occupied_lines_le_eight_cases (A : Finset (EuclideanSpace ℝ (Fin 2))) (hA : planar_all_even A) (u : EuclideanSpace ℝ (Fin 2)) (hu : u ≠ 0) (h8 : planar_occupied_lines A u ≤ 8) : planar_occupied_lines A u = 4 ∨ planar_occupied_lines A u = 6 ∨ planar_occupied_lines A u = 8
planar_all_even_occupied_lines_le_six_casesIn LeanCombinatorics for TCS

For an all-even set A and a non-zero direction u, if at most 6 lines perpendicular to u meet A then exactly 4 or 6 do.

theorem planar_all_even_occupied_lines_le_six_cases
    (A : Finset (EuclideanSpace ℝ (Fin 2)))
    (hA : planar_all_even A)
    (u : EuclideanSpace ℝ (Fin 2)) (hu : u ≠ 0)
    (h6 : planar_occupied_lines A u ≤ 6) :
    planar_occupied_lines A u = 4 ∨ planar_occupied_lines A u = 6
planar_height_rigid_affine_imageIn LeanCombinatorics for TCS

Height-rigidity is invariant under affine bijections of the plane.

theorem planar_height_rigid_affine_image (A : Finset (EuclideanSpace ℝ (Fin 2))) (f : EuclideanSpace ℝ (Fin 2) ≃ᵃ[ℝ] EuclideanSpace ℝ (Fin 2)) : planar_height_rigid (A.image f.toEquiv.toEmbedding) ↔ planar_height_rigid A
planar_height_rigid_of_card_le_threeIn LeanCombinatorics for TCS

Every finite planar set with at most three points is height-rigid.

theorem planar_height_rigid_of_card_le_three (A : Finset (EuclideanSpace ℝ (Fin 2))) (h : A.card ≤ 3) : planar_height_rigid A
planar_height_rigid_of_gridIn LeanCombinatorics for TCS

A complete parallelogram grid {p + i·v + j·w : i < n, j < m} of points is height-rigid.

theorem planar_height_rigid_of_grid (A : Finset (EuclideanSpace ℝ (Fin 2))) (p v w : EuclideanSpace ℝ (Fin 2)) (n m : ℕ) (hn : 0 < n) (hm : 0 < m) (hind : ∀ a b : ℝ, a • v + b • w = 0 → a = 0 ∧ b = 0) (hA : ∀ x, x ∈ A ↔ ∃ i : ℕ, ∃ j : ℕ, i < n ∧ j < m ∧ x = p + i • v + j • w) : planar_height_rigid A
planar_occupied_lines_affine_imageIn LeanCombinatorics for TCS

Under an affine bijection f, the number of lines perpendicular to u meeting the image set equals the number of lines perpendicular to the adjoint of the linear part of f meeting the original set.

theorem planar_occupied_lines_affine_image (A : Finset (EuclideanSpace ℝ (Fin 2))) (f : EuclideanSpace ℝ (Fin 2) ≃ᵃ[ℝ] EuclideanSpace ℝ (Fin 2)) (u : EuclideanSpace ℝ (Fin 2)) : planar_occupied_lines (A.image f.toEquiv.toEmbedding) u = planar_occupied_lines A (f.linear.adjoint u)
planar_occupied_lines_le_cardIn LeanCombinatorics for TCS

The number of lines perpendicular to any direction u that meet a finite planar set A is at most the cardinality of A.

theorem planar_occupied_lines_le_card (A : Finset (EuclideanSpace ℝ (Fin 2))) (u : EuclideanSpace ℝ (Fin 2)) :
    planar_occupied_lines A u ≤ A.card
planar_occupied_lines_le_card_sub_one_of_inner_eqIn LeanCombinatorics for TCS

If two distinct points p, q of A have the same inner product with u, then the lines perpendicular to u meeting A number at most |A| - 1.

theorem planar_occupied_lines_le_card_sub_one_of_inner_eq
    (A : Finset (EuclideanSpace ℝ (Fin 2))) (u : EuclideanSpace ℝ (Fin 2))
    {p q : EuclideanSpace ℝ (Fin 2)} (hp : p ∈ A) (hq : q ∈ A) (hpq : p ≠ q)
    (hin : inner ℝ p u = inner ℝ q u) :
    planar_occupied_lines A u ≤ A.card - 1
planar_occupied_lines_smulIn LeanCombinatorics for TCS

Scaling the direction by a non-zero real does not change the number of occupied lines.

theorem planar_occupied_lines_smul (A : Finset (EuclideanSpace ℝ (Fin 2))) (u : EuclideanSpace ℝ (Fin 2)) (c : ℝ) (hc : c ≠ 0) : planar_occupied_lines A (c • u) = planar_occupied_lines A u
plane_exists_ne_zero_orthogonalIn LeanCombinatorics for TCS

Every non-zero vector v in the plane admits a non-zero vector u orthogonal to it.

theorem plane_exists_ne_zero_orthogonal {v : EuclideanSpace ℝ (Fin 2)} (hv : v ≠ 0) :
    ∃ u : EuclideanSpace ℝ (Fin 2), u ≠ 0 ∧ inner ℝ v u = 0
plane_tree_inductionIn LeanCombinatorics for TCS

Structural induction on plane trees: if P holds of the leaf and holds of node cs whenever it holds of every child c ∈ cs, then P holds of every plane tree.

theorem plane_tree_induction {P : PlaneTree → Prop} (hleaf : P PlaneTree.leaf)
    (hnode : ∀ cs : List PlaneTree, (∀ c ∈ cs, P c) → P (PlaneTree.node cs)) :
    ∀ t : PlaneTree, P t
pocket_append_max_rangeIn LeanCombinatorics for TCS

For a standard permutation ρ of 1..|ρ| and any k, the list ρ followed by (|ρ|+1, …, |ρ|+k) is again a standard permutation, filtering it by (· ≤ |ρ|) recovers ρ, and it has length |ρ| + k.

theorem pocket_append_max_range (ρ : List ℕ) (hρ : ρ.Perm (List.range' 1 ρ.length)) (k : ℕ) :
    (ρ ++ List.range' (ρ.length + 1) k).Perm (List.range' 1 (ρ.length + k)) ∧
    (ρ ++ List.range' (ρ.length + 1) k).filter (· ≤ ρ.length) = ρ ∧
    (ρ ++ List.range' (ρ.length + 1) k).length = ρ.length + k
pocket_depth_bound_from_omitted_max_typesIn LeanCombinatorics for TCS

Let B be a finite set of nonempty permutations of natural numbers from 1 to their length. If B contains no pattern whose maximum entry is at the leftmost position, or contains no pattern whose maximum entry is at the rightmost position, then every B-avoiding permutation has extensions by new maxima of arbitrary depth (so Av(B) has no pockets in its insert-maximum tree). If B is nonempty and contains no pattern whose maximum entry is in an interior position, then for every mortal B-avoiding permutation ρ (which cannot be extended by arbitrarily many new maxima), every B-avoiding extension σ of ρ has depth |σ| - |ρ| at most (||B||-1)^2, where ||B|| = max_{β ∈ B} |β|.

theorem pocket_depth_bound_from_omitted_max_types
    (B : Set (List ℕ)) (hB_fin : B.Finite)
    (hB_perm : ∀ β ∈ B, β.Perm (List.range' 1 β.length) ∧ β ≠ []) :
    ((¬ ∃ β ∈ B, ∃ h : β ≠ [], ∀ x ∈ β, x ≤ β.head h) ∨
     (¬ ∃ β ∈ B, ∃ h : β ≠ [], ∀ x ∈ β, x ≤ β.getLast h) →
      ∀ ρ : List ℕ, ρ.Perm (List.range' 1 ρ.length) →
        (∀ β ∈ B, ¬ ∃ s : List ℕ, s.Sublist ρ ∧ ∃ h : s.length = β.length,
          ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast h] < β[j.cast h]) →
        ∀ k : ℕ, ∃ σ : List ℕ,
          σ.Perm (List.range' 1 σ.length) ∧
          (∀ β ∈ B, ¬ ∃ s : List ℕ, s.Sublist σ ∧ ∃ h : s.length = β.length,
            ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast h] < β[j.cast h]) ∧
          σ.filter (· ≤ ρ.length) = ρ ∧ σ.length = ρ.length + k) ∧
    (B.Nonempty ∧ (¬ ∃ β ∈ B, ∃ h : β ≠ [], (∃ x ∈ β, β.head h < x) ∧ (∃ x ∈ β, β.getLast h < x)) →
      ∀ ρ : List ℕ, ρ.Perm (List.range' 1 ρ.length) →
        (∀ β ∈ B, ¬ ∃ s : List ℕ, s.Sublist ρ ∧ ∃ h : s.length = β.length,
          ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast h] < β[j.cast h]) →
        (¬ ∀ k : ℕ, ∃ σ : List ℕ,
          σ.Perm (List.range' 1 σ.length) ∧
          (∀ β ∈ B, ¬ ∃ s : List ℕ, s.Sublist σ ∧ ∃ h : s.length = β.length,
            ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast h] < β[j.cast h]) ∧
          σ.filter (· ≤ ρ.length) = ρ ∧ σ.length = ρ.length + k) →
        ∀ σ : List ℕ, σ.Perm (List.range' 1 σ.length) →
          (∀ β ∈ B, ¬ ∃ s : List ℕ, s.Sublist σ ∧ ∃ h : s.length = β.length,
            ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast h] < β[j.cast h]) →
          σ.filter (· ≤ ρ.length) = ρ →
          σ.length - ρ.length ≤ (sSup (List.length '' B) - 1) ^ 2)
pocket_depth_bound_of_omitted_interior_max_typeIn LeanCombinatorics for TCS

Let B be a finite nonempty set of nonempty permutations of 1..|β| containing no pattern whose maximum is in an interior position, and m = ||B|| = max_{β ∈ B} |β|. If ρ is a B-avoiding standard permutation that is mortal (its B-avoiding extensions obtained by inserting new maxima have bounded length), then every B-avoiding standard extension σ of ρ with σ.filter (· ≤ |ρ|) = ρ satisfies |σ| - |ρ| ≤ (m-1)^2.

theorem pocket_depth_bound_of_omitted_interior_max_type
    (B : Set (List ℕ)) (hB_fin : B.Finite)
    (hB_perm : ∀ β ∈ B, β.Perm (List.range' 1 β.length) ∧ β ≠ [])
    (hB_ne : B.Nonempty)
    (hnoM : ¬ ∃ β ∈ B, ∃ h : β ≠ [], (∃ x ∈ β, β.head h < x) ∧ (∃ x ∈ β, β.getLast h < x)) :
    ∀ ρ : List ℕ, ρ.Perm (List.range' 1 ρ.length) →
      (∀ β ∈ B, ¬ ∃ s : List ℕ, s.Sublist ρ ∧ ∃ h : s.length = β.length,
        ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast h] < β[j.cast h]) →
      (¬ ∀ k : ℕ, ∃ σ : List ℕ,
        σ.Perm (List.range' 1 σ.length) ∧
        (∀ β ∈ B, ¬ ∃ s : List ℕ, s.Sublist σ ∧ ∃ h : s.length = β.length,
          ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast h] < β[j.cast h]) ∧
        σ.filter (· ≤ ρ.length) = ρ ∧ σ.length = ρ.length + k) →
      ∀ σ : List ℕ, σ.Perm (List.range' 1 σ.length) →
        (∀ β ∈ B, ¬ ∃ s : List ℕ, s.Sublist σ ∧ ∃ h : s.length = β.length,
          ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast h] < β[j.cast h]) →
        σ.filter (· ≤ ρ.length) = ρ →
        σ.length - ρ.length ≤ (sSup (List.length '' B) - 1) ^ 2
pocket_depth_uniform_bound_of_wqoIn LeanCombinatorics for TCS

Let B be a finite set of nonempty standard permutations of natural numbers from 1 to their length. If the class of standard B-avoiding permutations is partially well-ordered under the pattern containment relation (where σ contains π), then there exists a constant D : ℕ such that for every mortal standard B-avoiding permutation ρ (which does not have standard B-avoiding extensions of arbitrary depth), every standard B-avoiding extension σ of ρ (satisfying σ.filter (· ≤ ρ.length) = ρ) has depth σ.length - ρ.length ≤ D.

theorem pocket_depth_uniform_bound_of_wqo
    (B : Set (List ℕ)) (hB_fin : B.Finite)
    (hB_perm : ∀ β ∈ B, β.Perm (List.range' 1 β.length) ∧ β ≠ [])
    (hwqo : Set.PartiallyWellOrderedOn
      {π : List ℕ | π.Perm (List.range' 1 π.length) ∧ ∀ β ∈ B, ¬ pattern_contains π β}
      (fun π σ => pattern_contains σ π)) :
    ∃ D : ℕ, ∀ ρ : List ℕ, ρ.Perm (List.range' 1 ρ.length) →
      (∀ β ∈ B, ¬ pattern_contains ρ β) →
      (¬ ∀ k : ℕ, ∃ σ : List ℕ,
        σ.Perm (List.range' 1 σ.length) ∧
        (∀ β ∈ B, ¬ pattern_contains σ β) ∧
        σ.filter (· ≤ ρ.length) = ρ ∧ σ.length = ρ.length + k) →
      ∀ σ : List ℕ, σ.Perm (List.range' 1 σ.length) →
        (∀ β ∈ B, ¬ pattern_contains σ β) →
        σ.filter (· ≤ ρ.length) = ρ →
        σ.length - ρ.length ≤ D
pocket_list_erdos_szekeresIn LeanCombinatorics for TCS

Erdős–Szekeres for a list of distinct natural numbers: if a list with no repeated entries has no strictly increasing sublist of length p and no strictly decreasing sublist of length q, then its length is at most (p-1)(q-1).

theorem pocket_list_erdos_szekeres (x : List ℕ) (p q : ℕ) (hnd : x.Nodup)
    (hinc : ¬ ∃ s : List ℕ, s.Sublist x ∧ s.length = p ∧ s.Pairwise (· < ·))
    (hdec : ¬ ∃ s : List ℕ, s.Sublist x ∧ s.length = q ∧ s.Pairwise (· > ·)) :
    x.length ≤ (p - 1) * (q - 1)
pocket_none_of_omitted_endpoint_max_typeIn LeanCombinatorics for TCS

Let B be a finite set of nonempty permutations of 1..|β|. If B contains no pattern whose maximum is leftmost, or contains no pattern whose maximum is rightmost, then every B-avoiding standard permutation ρ has B-avoiding standard extensions of every larger length obtained by inserting new maxima, whose small entries (those ≤ |ρ|) are exactly ρ.

theorem pocket_none_of_omitted_endpoint_max_type
    (B : Set (List ℕ)) (hB_fin : B.Finite)
    (hB_perm : ∀ β ∈ B, β.Perm (List.range' 1 β.length) ∧ β ≠ [])
    (hL_or_R : (¬ ∃ β ∈ B, ∃ h : β ≠ [], ∀ x ∈ β, x ≤ β.head h) ∨
      (¬ ∃ β ∈ B, ∃ h : β ≠ [], ∀ x ∈ β, x ≤ β.getLast h)) :
    ∀ ρ : List ℕ, ρ.Perm (List.range' 1 ρ.length) →
      (∀ β ∈ B, ¬ ∃ s : List ℕ, s.Sublist ρ ∧ ∃ h : s.length = β.length,
        ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast h] < β[j.cast h]) →
      ∀ k : ℕ, ∃ σ : List ℕ,
        σ.Perm (List.range' 1 σ.length) ∧
        (∀ β ∈ B, ¬ ∃ s : List ℕ, s.Sublist σ ∧ ∃ h : s.length = β.length,
          ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast h] < β[j.cast h]) ∧
        σ.filter (· ≤ ρ.length) = ρ ∧ σ.length = ρ.length + k
pocket_pattern_occurs_append_of_last_maxIn LeanCombinatorics for TCS

Let a be larger than every entry of τ. If the list τ ++ [a] contains an occurrence of β, then either τ already contains an occurrence of β, or β is nonempty and its maximum is its last entry.

theorem pocket_pattern_occurs_append_of_last_max {a : ℕ} {τ β : List ℕ} (ha : ∀ x ∈ τ, x < a)
    (hocc : ∃ s : List ℕ, s.Sublist (τ ++ [a]) ∧ ∃ hlen : s.length = β.length,
      ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast hlen] < β[j.cast hlen]) :
    (∃ s : List ℕ, s.Sublist τ ∧ ∃ hlen : s.length = β.length,
      ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast hlen] < β[j.cast hlen]) ∨
    (∃ hβ : β ≠ [], ∀ x ∈ β, x ≤ β.getLast hβ)
pocket_pattern_occurs_cons_of_head_maxIn LeanCombinatorics for TCS

Let a be larger than every entry of τ. If the list a :: τ contains an occurrence of β, then either τ already contains an occurrence of β, or β is nonempty and its maximum is its first entry.

theorem pocket_pattern_occurs_cons_of_head_max {a : ℕ} {τ β : List ℕ} (ha : ∀ x ∈ τ, x < a)
    (hocc : ∃ s : List ℕ, s.Sublist (a :: τ) ∧ ∃ hlen : s.length = β.length,
      ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast hlen] < β[j.cast hlen]) :
    (∃ s : List ℕ, s.Sublist τ ∧ ∃ hlen : s.length = β.length,
      ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast hlen] < β[j.cast hlen]) ∨
    (∃ hβ : β ≠ [], ∀ x ∈ β, x ≤ β.head hβ)
pocket_pattern_occurs_sublistIn LeanCombinatorics for TCS

If a list σ contains an occurrence of a pattern β (a sublist of σ that is order-isomorphic to β), and σ is a sublist of τ, then τ contains an occurrence of β.

theorem pocket_pattern_occurs_sublist {σ τ β : List ℕ} (hsub : σ.Sublist τ)
    (hocc : ∃ s : List ℕ, s.Sublist σ ∧ ∃ hlen : s.length = β.length,
      ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast hlen] < β[j.cast hlen]) :
    ∃ s : List ℕ, s.Sublist τ ∧ ∃ hlen : s.length = β.length,
      ∀ (i j : Fin s.length), s[i] < s[j] ↔ β[i.cast hlen] < β[j.cast hlen]
pocket_prepend_max_rangeIn LeanCombinatorics for TCS

For a standard permutation ρ of 1..|ρ| and any k, the list (|ρ|+k, |ρ|+k-1, …, |ρ|+1) followed by ρ is again a standard permutation, filtering it by (· ≤ |ρ|) recovers ρ, and it has length |ρ| + k.

theorem pocket_prepend_max_range (ρ : List ℕ) (hρ : ρ.Perm (List.range' 1 ρ.length)) (k : ℕ) :
    ((List.range' (ρ.length + 1) k).reverse ++ ρ).Perm (List.range' 1 (ρ.length + k)) ∧
    ((List.range' (ρ.length + 1) k).reverse ++ ρ).filter (· ≤ ρ.length) = ρ ∧
    ((List.range' (ρ.length + 1) k).reverse ++ ρ).length = ρ.length + k
poly_interval_support_add_two_mulIn LeanCombinatorics for TCS

If p and q have interval coefficient support and their constant coefficients are positive, then p + 2*q has interval coefficient support.

theorem poly_interval_support_add_two_mul {p q : Polynomial ℕ}
    (hp0 : 0 < p.coeff 0) (hq0 : 0 < q.coeff 0)
    (hp : poly_interval_support p) (hq : poly_interval_support q) :
    poly_interval_support (p + 2 * q)
poly_log_concave_with_interval_support_mulIn LeanCombinatorics for TCS

If p and q have nonnegative integer coefficients with interval support and satisfy a_k * a_{k+2} ≤ a_{k+1}^2 at every index, then p * q does too.

theorem poly_log_concave_with_interval_support_mul {p q : Polynomial ℕ}
    (hp : poly_log_concave_with_interval_support p)
    (hq : poly_log_concave_with_interval_support q) :
    poly_log_concave_with_interval_support (p * q)
poly_log_concave_with_interval_support_witnessIn LeanCombinatorics for TCS

The polynomial 1 + X + X^2 is log-concave with interval support; 1 + X + 2X^2 is not log-concave with interval support; and 1 + X^2 does not have interval support.

theorem poly_log_concave_with_interval_support_witness :
    poly_log_concave_with_interval_support ((1 : Polynomial ℕ) + Polynomial.X + Polynomial.X ^ 2) ∧
      ¬ poly_log_concave_with_interval_support
        ((1 : Polynomial ℕ) + Polynomial.X + 2 * Polynomial.X ^ 2) ∧
      ¬ poly_interval_support ((1 : Polynomial ℕ) + Polynomial.X ^ 2)
polynomial_method_rank_cubic_bound_three_off_diagonalIn LeanCombinatorics for TCS

Let $K$ be a field and let $a, b, c \in K \setminus \{0\}$ be pairwise distinct. Every $n \times n$ $L$-matrix $M$ over $K$ with $L = \{a, b, c\}$ satisfies $6n \leq (\mathrm{rank}_K(M) + 3)^3$.

theorem polynomial_method_rank_cubic_bound_three_off_diagonal
    {n : ℕ} {K : Type*} [Field K]
    (a b c : K) (ha : a ≠ 0) (hb : b ≠ 0) (hc : c ≠ 0)
    (hab : a ≠ b) (hbc : b ≠ c) (hca : a ≠ c)
    (M : Matrix (Fin n) (Fin n) K)
    (hM : is_l_matrix M {a, b, c}) :
    6 * n ≤ (M.rank + 3) ^ 3
polynomial_method_rank_lower_bound_three_off_diagonalIn LeanCombinatorics for TCS

Let $K$ be a field and let $a, b, c \in K \setminus \{0\}$ be pairwise distinct. Every $n \times n$ $L$-matrix $M$ over $K$ with $L = \{a, b, c\}$ satisfies $n \leq \binom{\mathrm{rank}_K(M) + 3}{3}$.

theorem polynomial_method_rank_lower_bound_three_off_diagonal
    {n : ℕ} {K : Type*} [Field K]
    (a b c : K) (ha : a ≠ 0) (hb : b ≠ 0) (hc : c ≠ 0)
    (hab : a ≠ b) (hbc : b ≠ c) (hca : a ≠ c)
    (M : Matrix (Fin n) (Fin n) K)
    (hM : is_l_matrix M {a, b, c}) :
    n ≤ Nat.choose (M.rank + 3) 3
poset_braid_iso_induces_down_set_equivIn LeanCombinatorics for TCS

Let P and Q be finite non-empty posets with decidable orders. Any braid isomorphism e between their poset braid maps induces bijections α, β : P ≃ Q such that y ≤ x ↔ α y ≤ β x for all x, y.

theorem poset_braid_iso_induces_down_set_equiv {P Q : Type*} [PartialOrder P] [PartialOrder Q]
    [Fintype P] [Fintype Q] [Nonempty P] [Nonempty Q]
    [DecidableRel ((· ≤ ·) : P → P → Prop)] [DecidableRel ((· ≤ ·) : Q → Q → Prop)]
    (e : (P ⊕ (P × ZMod 2)) ≃ (Q ⊕ (Q × ZMod 2)))
    (h_iso : Prod.map e e ∘ poset_braid_map = poset_braid_map ∘ Prod.map e e) :
    ∃ (α β : P ≃ Q), ∀ y x, y ≤ x ↔ α y ≤ β x
poset_braid_iso_preserves_tagsIn LeanCombinatorics for TCS

Let P and Q be finite non-empty posets with decidable orders. Any braid isomorphism e between their poset braid maps preserves the Sum.inl and Sum.inr components: e (.inl x) is left for all x in P, and e (.inr z) is right for all z in P × ZMod 2.

theorem poset_braid_iso_preserves_tags {P Q : Type*} [PartialOrder P] [PartialOrder Q]
    [Fintype P] [Fintype Q] [Nonempty P] [Nonempty Q]
    [DecidableRel ((· ≤ ·) : P → P → Prop)] [DecidableRel ((· ≤ ·) : Q → Q → Prop)]
    (e : (P ⊕ (P × ZMod 2)) ≃ (Q ⊕ (Q × ZMod 2)))
    (h_iso : Prod.map e e ∘ poset_braid_map = poset_braid_map ∘ Prod.map e e) :
    (∀ x : P, (e (.inl x)).isLeft) ∧ (∀ z : P × ZMod 2, (e (.inr z)).isRight)
poset_braid_map_fixed_iffIn LeanCombinatorics for TCS

For any poset P with decidable order, poset_braid_map fixes a pair (u, v) in (P ⊕ (P × ZMod 2))² if and only if u and v are either both in the left component or both in the right component.

theorem poset_braid_map_fixed_iff {P : Type*} [PartialOrder P]
    [DecidableRel ((· ≤ ·) : P → P → Prop)]
    (u v : P ⊕ (P × ZMod 2)) :
    poset_braid_map (u, v) = (u, v) ↔ (u.isLeft ∧ v.isLeft) ∨ (u.isRight ∧ v.isRight)
poset_comparable_count_delete_addIn LeanCombinatorics for TCS

For y ≠ x, the comparability count of y in P equals its comparability count in the card P − x plus one if x is comparable with y (and nothing otherwise): the neighbours of y other than x are exactly the points comparable with y inside P − x.

theorem poset_comparable_count_delete_add (P : Type) [Fintype P] [PartialOrder P] (x y : P) (hy : y ≠ x) : poset_comparable_count P y = poset_comparable_count {z : P // z ≠ x} ⟨y, hy⟩ + Nat.card {z : P // z = x ∧ (z < y ∨ y < z)}
poset_comparable_count_eq_of_order_isoIn LeanCombinatorics for TCS

Comparability counts are preserved by order isomorphisms: if e : P ≃o Q then x has as many comparable partners in P as e x has in Q.

theorem poset_comparable_count_eq_of_order_iso (P Q : Type) [PartialOrder P] [PartialOrder Q] (e : P ≃o Q) (x : P) : poset_comparable_count P x = poset_comparable_count Q (e x)
poset_comparable_fibre_cardIn LeanCombinatorics for TCS

Write N_k for the number of points of P with k comparable partners, M_k for the same number inside the card P − x, E_k for the number of points comparable with x having k comparable partners in P, and δ_k for 1 if x itself has k partners. Then M_k + E_k + δ_k = N_k + E_{k+1}: deleting x lowers the count of each of its neighbours by exactly one, which is the whole content.

theorem poset_comparable_fibre_card (P : Type) [Fintype P] [PartialOrder P] (x : P) (k : ℕ) : Nat.card {y : {y : P // y ≠ x} // poset_comparable_count {y : P // y ≠ x} y = k} + Nat.card {y : P // (y < x ∨ x < y) ∧ poset_comparable_count P y = k} + Nat.card {y : P // y = x ∧ poset_comparable_count P y = k} = Nat.card {y : P // poset_comparable_count P y = k} + Nat.card {y : P // (y < x ∨ x < y) ∧ poset_comparable_count P y = k + 1}
poset_height_eq_zero_iffIn LeanCombinatorics for TCS

A finite partial order α has height 0 if and only if it is an antichain: whenever a ≤ b, also b ≤ a.

theorem poset_height_eq_zero_iff {α : Type*} [PartialOrder α] [Fintype α] : poset_height α = 0 ↔ ∀ a b : α, a ≤ b → b ≤ a
poset_height_one_exists_unique_min_ltIn LeanCombinatorics for TCS

If a height-one poset has exactly one minimal element u, then u < y for every y ≠ u: any other point y is non-minimal, so some z < y, and z is minimal by height one, so z = u.

theorem poset_height_one_exists_unique_min_lt (P : Type) [Fintype P] [PartialOrder P] (hP : poset_height_one P) (hmin : Nat.card {y : P // IsMin y} = 1) : ∃ u : P, IsMin u ∧ ∀ y : P, y ≠ u → u < y
poset_height_one_min_max_dichotomyIn LeanCombinatorics for TCS

In a height-one poset in which nothing is isolated, every point is minimal-but-not-maximal or maximal-but-not-minimal; these two classes are the bipartition of the associated bipartite graph.

theorem poset_height_one_min_max_dichotomy (P : Type) [PartialOrder P] (hP : poset_height_one P) (hnil : ∀ x : P, ∃ y : P, x < y ∨ y < x) (x : P) : (IsMin x ∧ ¬ IsMax x) ∨ (IsMax x ∧ ¬ IsMin x)
poset_height_one_reconstructible_of_has_isolatedIn LeanCombinatorics for TCS

If finite ordered sets P, Q are hypomorphic, P has height one, |P| ≥ 4, and P has at least one isolated point, then P ≅ Q.

theorem poset_height_one_reconstructible_of_has_isolated (P Q : Type) [Fintype P] [Fintype Q] [PartialOrder P] [PartialOrder Q] (hn : 4 ≤ Fintype.card P) (hP : poset_height_one P) (hQ : poset_height_one Q) (h : poset_hypomorphic P Q) (hPiso : ∃ x : P, ∀ y : P, ¬ (x < y ∨ y < x)) : Nonempty (P ≃o Q)
poset_height_one_reconstructible_of_inj_comparable_count_of_sideIn LeanCombinatorics for TCS

If P, Q are hypomorphic height-one posets with |P| ≥ 4 and no isolated points, the comparability counts of P are pairwise distinct, and the deck correspondence σ maps minimal elements to minimal elements, then P ≅ Q.

theorem poset_height_one_reconstructible_of_inj_comparable_count_of_side (P Q : Type) [Fintype P] [Fintype Q] [PartialOrder P] [PartialOrder Q] (hn : 4 ≤ Fintype.card P) (hP : poset_height_one P) (hQ : poset_height_one Q) (σ : P ≃ Q) (hσ : ∀ x : P, Nonempty ({y : P // y ≠ x} ≃o {y : Q // y ≠ σ x})) (hPnil : ∀ x : P, ∃ y : P, x < y ∨ y < x) (hQnil : ∀ x : Q, ∃ y : Q, x < y ∨ y < x) (hinj : Function.Injective (poset_comparable_count P)) (hside : ∀ x : P, IsMin x ↔ IsMin (σ x)) : Nonempty (P ≃o Q)
poset_height_one_reconstructible_of_min_card_oneIn LeanCombinatorics for TCS

If P, Q are hypomorphic height-one posets with |P| ≥ 4, no isolated points, and P has exactly one minimal element (so P is a star), then P ≅ Q.

theorem poset_height_one_reconstructible_of_min_card_one (P Q : Type) [Fintype P] [Fintype Q] [PartialOrder P] [PartialOrder Q] (hn : 4 ≤ Fintype.card P) (hP : poset_height_one P) (hQ : poset_height_one Q) (h : poset_hypomorphic P Q) (hPnil : ∀ x : P, ∃ y : P, x < y ∨ y < x) (hQnil : ∀ x : Q, ∃ y : Q, x < y ∨ y < x) (hmin : Nat.card {y : P // IsMin y} = 1) : Nonempty (P ≃o Q)
poset_height_one_reconstructible_of_no_isolatedIn LeanCombinatorics for TCS

If finite ordered sets P, Q of height one, |P| ≥ 4, with every element of P and of Q comparable to something, have the same deck, then P ≅ Q. Equivalently: a bipartite graph with no isolated vertex is determined by the deck of vertex-deleted induced subgraphs.

theorem poset_height_one_reconstructible_of_no_isolated (P Q : Type) [Fintype P] [Fintype Q] [PartialOrder P] [PartialOrder Q] (hn : 4 ≤ Fintype.card P) (hP : poset_height_one P) (hQ : poset_height_one Q) (h : poset_hypomorphic P Q) (hPnil : ∀ x : P, ∃ y : P, x < y ∨ y < x) (hQnil : ∀ x : Q, ∃ y : Q, x < y ∨ y < x) : Nonempty (P ≃o Q)
poset_height_orderHomIn LeanCombinatorics for TCS

For finite partial orders X and Y, the height of the poset (Y →o X) of order-preserving maps with the pointwise order is |Y| · height(X).

theorem poset_height_orderHom {α β : Type*} [PartialOrder α] [Fintype α] [PartialOrder β] [Fintype β] : poset_height (β →o α) = Nat.card β * poset_height α
poset_height_prod_of_nonemptyIn LeanCombinatorics for TCS

For finite nonempty partial orders X and Y, the height of the product order X × Y is height(X) + height(Y).

theorem poset_height_prod_of_nonempty {α β : Type*} [PartialOrder α] [Fintype α] [Nonempty α] [PartialOrder β] [Fintype β] [Nonempty β] : poset_height (α × β) = poset_height α + poset_height β
poset_hypomorphic_comparable_count_eqIn LeanCombinatorics for TCS

If σ is a bijection matching the cards of P and Q (P − x ≅ Q − σ x for every x) and |P| ≥ 3, then x has as many comparable partners in P as σ x has in Q.

theorem poset_hypomorphic_comparable_count_eq (P Q : Type) [Fintype P] [Fintype Q] [PartialOrder P] [PartialOrder Q] (hn : 3 ≤ Fintype.card P) (σ : P ≃ Q) (hσ : ∀ x : P, Nonempty ({y : P // y ≠ x} ≃o {y : Q // y ≠ σ x})) (x : P) : poset_comparable_count P x = poset_comparable_count Q (σ x)
poset_hypomorphic_comparable_fibre_eqIn LeanCombinatorics for TCS

If P, Q are hypomorphic (σ matching cards), |P| ≥ 3, and no point of P or Q is isolated, then for every k the same number of points of P and of Q have exactly k comparable partners: the deck determines the degree multiset.

theorem poset_hypomorphic_comparable_fibre_eq (P Q : Type) [Fintype P] [Fintype Q] [PartialOrder P] [PartialOrder Q] (hn : 3 ≤ Fintype.card P) (σ : P ≃ Q) (hσ : ∀ x : P, Nonempty ({y : P // y ≠ x} ≃o {y : Q // y ≠ σ x})) (hPnil : ∀ x : P, ∃ y : P, x < y ∨ y < x) (hQnil : ∀ x : Q, ∃ y : Q, x < y ∨ y < x) : ∀ k : ℕ, Nat.card {y : P // poset_comparable_count P y = k} = Nat.card {z : Q // poset_comparable_count Q z = k}
poset_hypomorphic_comparable_iff_of_inj_comparable_countIn LeanCombinatorics for TCS

If no two points of P have the same comparability count and σ matches the cards, then x and y are comparable in P exactly when σ x and σ y are comparable in Q.

theorem poset_hypomorphic_comparable_iff_of_inj_comparable_count (P Q : Type) [Fintype P] [Fintype Q] [PartialOrder P] [PartialOrder Q] (hn : 3 ≤ Fintype.card P) (σ : P ≃ Q) (hσ : ∀ x : P, Nonempty ({y : P // y ≠ x} ≃o {y : Q // y ≠ σ x})) (hPnil : ∀ x : P, ∃ y : P, x < y ∨ y < x) (hQnil : ∀ x : Q, ∃ y : Q, x < y ∨ y < x) (hinj : Function.Injective (poset_comparable_count P)) (x y : P) : (x < y ∨ y < x) ↔ (σ x < σ y ∨ σ y < σ x)
poset_hypomorphic_neighbour_profile_eqIn LeanCombinatorics for TCS

If P, Q are hypomorphic height-one posets with |P| ≥ 3 and no isolated points, then for every x and k the number of neighbours of x in P having exactly k comparable partners equals the corresponding number for σ x in Q.

theorem poset_hypomorphic_neighbour_profile_eq (P Q : Type) [Fintype P] [Fintype Q] [PartialOrder P] [PartialOrder Q] (hn : 3 ≤ Fintype.card P) (σ : P ≃ Q) (hσ : ∀ x : P, Nonempty ({y : P // y ≠ x} ≃o {y : Q // y ≠ σ x})) (hPnil : ∀ x : P, ∃ y : P, x < y ∨ y < x) (hQnil : ∀ x : Q, ∃ y : Q, x < y ∨ y < x) (x : P) (k : ℕ) : Nat.card {y : P // (y < x ∨ x < y) ∧ poset_comparable_count P y = k} = Nat.card {z : Q // (z < σ x ∨ σ x < z) ∧ poset_comparable_count Q z = k}
poset_j_card_finIn LeanCombinatorics for TCS

The chain Fin (n+1) has exactly n elements with a unique lower cover (namely 1, …, n, whose unique lower cover is k−1).

theorem poset_j_card_fin (n : ℕ) : Nat.card (poset_j (Fin (n+1))) = n
poset_j_orderHom_isoIn LeanCombinatorics for TCS

Let B be a finite bounded partial order (bottom ⊥, top ⊤) and Y a finite partial order. The elements of the pointwise-ordered poset (Y →o B) of order-preserving maps that have exactly one lower cover are exactly the maps f_{j,y} which take the value j on the up-set ↑y and ⊥ elsewhere, for j ∈ J(B) and y ∈ Y. Consequently J(B^Y) is order-isomorphic to J(B) × Y^∂, where Y^∂ is the order dual of Y.

theorem poset_j_orderHom_iso {α β : Type*} [PartialOrder α] [Fintype α] [OrderBot α] [OrderTop α] [PartialOrder β] [Fintype β] : Nonempty (poset_j (β →o α) ≃o (poset_j α × βᵒᵈ))
poset_lt_pair_count_deleteIn LeanCombinatorics for TCS

The number of comparable pairs of P equals the number of comparable pairs of the card P − x plus the comparability count of x: the pairs through x are indexed by the points comparable with x, one pair each.

theorem poset_lt_pair_count_delete (P : Type) [Fintype P] [PartialOrder P] (x : P) : poset_lt_pair_count P = poset_lt_pair_count {y : P // y ≠ x} + poset_comparable_count P x
poset_min_max_card_eq_of_order_isoIn LeanCombinatorics for TCS

An order isomorphism maps minimal elements to minimal elements and maximal elements to maximal elements, so it preserves both counts.

theorem poset_min_max_card_eq_of_order_iso (P Q : Type) [PartialOrder P] [PartialOrder Q] (e : P ≃o Q) : Nat.card {y : P // IsMin y} = Nat.card {z : Q // IsMin z} ∧ Nat.card {y : P // IsMax y} = Nat.card {z : Q // IsMax z}
poset_order_iso_of_side_and_comparableIn LeanCombinatorics for TCS

Let P, Q be height-one posets and σ : P ≃ Q a bijection that preserves the side of every point and preserves comparability. Then σ is an order isomorphism; consequently P ≅ Q. This isolates the two hypotheses that a reconstruction proof must supply.

theorem poset_order_iso_of_side_and_comparable (P Q : Type) [PartialOrder P] [PartialOrder Q] (hP : poset_height_one P) (hQ : poset_height_one Q) (σ : P ≃ Q) (hside : ∀ x : P, IsMin x ↔ IsMin (σ x)) (hcmp : ∀ x y : P, (x < y ∨ y < x) ↔ (σ x < σ y ∨ σ y < σ x)) : Nonempty (P ≃o Q)
poset_sum_neighbour_fibre_cardIn LeanCombinatorics for TCS

Σ_x #{y comparable with x : comp(y) = k} = k · #{y : comp(y) = k}: both sides count the pairs (x, y) with x comparable with y and comp(y) = k, using the symmetry of comparability and the definition of comp.

theorem poset_sum_neighbour_fibre_card (P : Type) [Fintype P] [PartialOrder P] (k : ℕ) : (∑ x : P, Nat.card {y : P // (y < x ∨ x < y) ∧ poset_comparable_count P y = k}) = k * Nat.card {y : P // poset_comparable_count P y = k}
prime_order_cycles_partition_into_perfect_setsIn LeanCombinatorics for TCS

Let p be a prime number. The set of all permutations of Fin p of order p can be partitioned into (p - 2)! pairwise disjoint sets of size p - 1, each of which is a perfect set of order p, satisfies the regular action property that for any distinct elements i and j there is a unique permutation in the set mapping i to j, and whose union is the set of all permutations of order p.

open Equiv Perm Subgroup in
theorem prime_order_cycles_partition_into_perfect_sets (p : ℕ) (hp : p.Prime) :
    ∃ P : Finset (Finset (Perm (Fin p))),
      P.card = Nat.factorial (p - 2) ∧
      (∀ S ∈ P, S.card = p - 1) ∧
      (∀ S ∈ P, is_perfect_set p S) ∧
      (∀ S ∈ P, ∀ i j : Fin p, i ≠ j → ∃! τ ∈ S, τ i = j) ∧
      (∀ S ∈ P, ∀ T ∈ P, S ≠ T → Disjoint S T) ∧
      P.biUnion id = Finset.univ.filter (fun σ => orderOf σ = p)
prime_two_pow_sub_two_div_mulIn LeanCombinatorics for TCS

For any prime n ≥ 3, n divides 2^n - 2 by Fermat's Little Theorem, so ((2^n - 2) / n) * n = 2^n - 2.

theorem prime_two_pow_sub_two_div_mul (n : ℕ) (hn : n.Prime) (hge : 3 ≤ n) :
    ((2 ^ n - 2) / n) * n = 2 ^ n - 2
pyramid_polytope_apices_subsetIn LeanCombinatorics for TCS

Given natural numbers n and m, a subset B of Fin n → ℝ, and a family of vertices v : Fin (m + 1) → (Fin m → ℝ), the apices {(0, v_1), ..., (0, v_m)} form a subset of the pyramid polytope pyramid_polytope B v in Fin (n + m) → ℝ.

theorem pyramid_polytope_apices_subset {n m : ℕ} (B : Set (Fin n → ℝ))
    (v : Fin (m + 1) → (Fin m → ℝ)) :
    Set.range (fun j : Fin m => Fin.append 0 (v j.succ)) ⊆ pyramid_polytope B v
q_perm_counterexample_matrix_eval_14_gt_15In LeanCombinatorics for TCS

The q-permanent of the 5-by-5 integer counterexample matrix evaluates to 8968822249 at q = 14, evaluates to 7441960000 at q = 15, and its value at q = 14 is strictly greater than its value at q = 15.

theorem q_perm_counterexample_matrix_eval_14_gt_15 :
    matrix_q_permanent 14 q_perm_counterexample_matrix = 8968822249 ∧
    matrix_q_permanent 15 q_perm_counterexample_matrix = 7441960000 ∧
    matrix_q_permanent 14 q_perm_counterexample_matrix >
      matrix_q_permanent 15 q_perm_counterexample_matrix
q_perm_counterexample_matrix_is_symmIn LeanCombinatorics for TCS

The 5-by-5 counterexample matrix is symmetric.

theorem q_perm_counterexample_matrix_is_symm :
    q_perm_counterexample_matrix.IsSymm
q_perm_counterexample_matrix_pos_defIn LeanCombinatorics for TCS

The 5-by-5 counterexample matrix is positive definite as a real matrix.

theorem q_perm_counterexample_matrix_pos_def :
    (q_perm_counterexample_matrix.map (algebraMap ℤ ℝ)).PosDef
quadratic_decomposition_nonnegative_linearizationIn LeanCombinatorics for TCS

Let N ≥ 2, and let a, c : Fin (2 * N + 1) → ℝ satisfy condition (2.1) of size 2N with b = fun _ => 0. Then (even_component_a N a, even_component_b N a c, even_component_c N a c) satisfies condition (2.1) of size N, (odd_component_a N a, odd_component_b N a c, odd_component_c N a c) satisfies condition (2.1) of size N - 1, and if both components have nonnegative linearization (property P), then the symmetric array (a, fun _ => 0, c) has nonnegative linearization (property P) of size 2N.

theorem quadratic_decomposition_nonnegative_linearization
    (N : ℕ) (hN : 2 ≤ N) (a c : Fin (2 * N + 1) → ℝ)
    (hrec : satisfies_recurrence_2_1 (2 * N) a (fun _ => 0) c) :
    satisfies_recurrence_2_1 N (even_component_a N a) (even_component_b N a c) (even_component_c N a c) ∧
    satisfies_recurrence_2_1 (N - 1) (odd_component_a N a) (odd_component_b N a c) (odd_component_c N a c) ∧
    (has_property_p N (even_component_a N a) (even_component_b N a c) (even_component_c N a c) →
     has_property_p (N - 1) (odd_component_a N a) (odd_component_b N a c) (odd_component_c N a c) →
     has_property_p (2 * N) a (fun _ => 0) c)
quaternion_group_central_involutionIn LeanCombinatorics for TCS

For N ≥ 1, the element a^N of QuaternionGroup N is central, has square 1, and is not the identity, so it is the (unique) central involution; consequently every cell of the quaternion table has a scale-4 clique {(g,h),(g,hz),(gz,h),(gz,hz)} around it and the chromatic number of the table is at least |G|... (the quantitative form is the existing lower bound node).

theorem quaternion_group_central_involution (N : ℕ) (hN : 1 ≤ N) :
    (∀ g : QuaternionGroup N,
        QuaternionGroup.a ((N : ℕ) : ZMod (2 * N)) * g =
          g * QuaternionGroup.a ((N : ℕ) : ZMod (2 * N))) ∧
      QuaternionGroup.a ((N : ℕ) : ZMod (2 * N)) *
        QuaternionGroup.a ((N : ℕ) : ZMod (2 * N)) = 1 ∧
      QuaternionGroup.a ((N : ℕ) : ZMod (2 * N)) ≠ 1
r_ext_c4_is_config_in_all_productsIn LeanCombinatorics for TCS

For any r >= 4, the boolean incidence matrix of the r-extension of C4 embeds as a configuration in every r-fold product of matrices from {I_m, I_m^c, T_m} for all sufficiently large m.

theorem r_ext_c4_is_config_in_all_products (r : ℕ) (hr : 4 ≤ r) :
    is_config_in_all_products (r_ext_c4_matrix r) r
r_ext_c4_matrix_col0_trueIn LeanCombinatorics for TCS

For any r >= 4 and any row index k < r, the entry at row k and column 0 of the incidence matrix of the r-extension of C4 is true.

theorem r_ext_c4_matrix_col0_true (r : ℕ) (hr : 4 ≤ r) (k : ℕ) (hk : k < r) :
    r_ext_c4_matrix r ⟨k, by omega⟩ ⟨0, by omega⟩ = true
r_ext_c4_product_invariantIn LeanCombinatorics for TCS

For any natural number r at least 4, the product invariant matrix_product_invariant of the boolean incidence matrix r_ext_c4_matrix r of the r-extension of the 4-cycle graph equals r.

theorem r_ext_c4_product_invariant (r : ℕ) (hr : 4 ≤ r) :
    matrix_product_invariant (r_ext_c4_matrix r) = r
r_ext_c4_product_invariant_geIn LeanCombinatorics for TCS

If the incidence matrix of the r-extension of C4 embeds as a configuration in all p-fold products of matrices from {I_m, I_m^c, T_m}, then r <= p.

theorem r_ext_c4_product_invariant_ge (r : ℕ) (hr : 4 ≤ r) (p : ℕ) (hp : 1 ≤ p)
    (h : is_config_in_all_products (r_ext_c4_matrix r) p) : r ≤ p
radial_certificate_hypotheses_not_vacuousIn LeanCombinatorics for TCS

The hA hypothesis of the radial transfer lemma is satisfiable (take S = Set.univ: every point lies in S), but the hB hypothesis is not implied by hA, since for S = Set.univ no point is outside S and hence the hB condition fails for any α. So hA and hB together are a genuine two-sided constraint and the existence statements for α = 1/2, 1/3 are not vacuous.

theorem radial_certificate_hypotheses_not_vacuous (α : ℝ) :
    (∀ a c : ℝ, 0 ≤ a →
        a + c ^ 2 ∈ (Set.univ : Set ℝ) ∨ a + (c + 1) ^ 2 ∈ Set.univ ∨ a + (c + 2) ^ 2 ∈ Set.univ) ∧
      ¬ (∀ a c : ℝ, 0 ≤ a → ∃ k : Fin 21, a + (c + (k : ℝ) * α) ^ 2 ∉ (Set.univ : Set ℝ))
radial_hA_forces_no_complement_gap_one_or_twoIn LeanCombinatorics for TCS

Necessary conditions on a radial certificate. If S satisfies the hA condition (for every a ≥ 0 and every c, one of a + c², a + (c+1)², a + (c+2)² lies in S), then (i) for every v ≥ 0 one of v, v+1, v+4 lies in S — so the complement of S contains no two points at distance 1 in [0,∞) — and (ii) for every v ≥ 1/4 one of v, v+2 lies in S — so the complement of S contains no two points at distance 2 in [1/4,∞).

theorem radial_hA_forces_no_complement_gap_one_or_two (S : Set ℝ)
    (hA : ∀ a c : ℝ, 0 ≤ a → a + c ^ 2 ∈ S ∨ a + (c + 1) ^ 2 ∈ S ∨ a + (c + 2) ^ 2 ∈ S) :
    (∀ v : ℝ, 0 ≤ v → v ∈ S ∨ v + 1 ∈ S ∨ v + 4 ∈ S) ∧
      (∀ v : ℝ, 1 / 4 ≤ v → v ∈ S ∨ v + 2 ∈ S)
ramsey_254_seidel_iff_codegreeIn LeanCombinatorics for TCS

For any simple graph G on 254 vertices with decidable adjacency, the two Seidel conditions (all row sums of the Seidel matrix equal 1, and (S^2)_{ij} ≤ 0 for all i ≠ j) hold if and only if G is 126-regular, every adjacent pair has at most 62 common neighbours, and every pair of distinct non-adjacent vertices has at most 63 common neighbours in the complement graph.

theorem ramsey_254_seidel_iff_codegree
    (G : SimpleGraph (Fin 254)) [DecidableRel G.Adj] :
    ((∀ i : Fin 254, ∑ j : Fin 254, seidel_matrix G i j = 1) ∧
     (∀ i j : Fin 254, i ≠ j → (seidel_matrix G * seidel_matrix G) i j ≤ 0)) ↔
    ((∀ i : Fin 254, Fintype.card (G.neighborSet i) = 126) ∧
     (∀ u v : Fin 254, G.Adj u v → Fintype.card (G.commonNeighbors u v) ≤ 62) ∧
     (∀ u v : Fin 254, u ≠ v → ¬ G.Adj u v → Fintype.card (Gᶜ.commonNeighbors u v) ≤ 63))
ramsey_254_seidel_row_sum_iff_regularIn LeanCombinatorics for TCS

For a simple graph G on 254 vertices with decidable adjacency, all row sums of the Seidel matrix are equal to 1 if and only if every vertex of G has exactly 126 neighbours. In particular the Seidel condition of the target already forces 126-regularity, so no hypothesis is lost when passing to the 126-regular case.

theorem ramsey_254_seidel_row_sum_iff_regular
    (G : SimpleGraph (Fin 254)) [DecidableRel G.Adj] :
    (∀ i : Fin 254, ∑ j : Fin 254, seidel_matrix G i j = 1) ↔
    (∀ i : Fin 254, Fintype.card (G.neighborSet i) = 126)
ramsey_b63_b64_regular_codegree_graph_existsIn LeanCombinatorics for TCS

There exists a simple graph G on 254 vertices with decidable adjacency that is 126-regular, in which every adjacent pair has at most 62 common neighbours and every pair of distinct non-adjacent vertices has at most 63 common neighbours in the complement graph. Together with ramsey_254_seidel_iff_codegree this is exactly the parent statement (existence of a Seidel-conditioned graph on 254 vertices), written as a construction of an explicit 126-regular (B_63, B_64)-free graph; it is strictly stronger than op_605_ramsey_b63_b64_graph_exists (which does not require regularity) and it is the literature's open case n = 64, OP-605 of arXiv:2610.36522.

theorem ramsey_b63_b64_regular_codegree_graph_exists :
    ∃ (G : SimpleGraph (Fin 254)) (_ : DecidableRel G.Adj),
      (∀ i : Fin 254, Fintype.card (G.neighborSet i) = 126) ∧
      (∀ u v : Fin 254, G.Adj u v → Fintype.card (G.commonNeighbors u v) ≤ 62) ∧
      (∀ u v : Fin 254, u ≠ v → ¬ G.Adj u v → Fintype.card (Gᶜ.commonNeighbors u v) ≤ 63)
ramsey_b63_b64_seidel_graph_existsIn LeanCombinatorics for TCS

There exists a simple graph G on 254 vertices with decidable adjacency whose Seidel matrix S has all row sums equal to 1 and (S^2)_{ij} ≤ 0 for all distinct vertices i ≠ j.

theorem ramsey_b63_b64_seidel_graph_exists :
    ∃ (G : SimpleGraph (Fin 254)) (_ : DecidableRel G.Adj),
      (∀ i : Fin 254, ∑ j : Fin 254, seidel_matrix G i j = 1) ∧
      (∀ i j : Fin 254, i ≠ j → (seidel_matrix G * seidel_matrix G) i j ≤ 0)
recurrence_matrix_distinct_real_eigenvaluesIn LeanCombinatorics for TCS

For any recurrence satisfying (2.1), the tridiagonal recurrence matrix J has N + 1 distinct real eigenvalues.

theorem recurrence_matrix_distinct_real_eigenvalues (N : ℕ) (a b c : Fin (N + 1) → ℝ)
    (hrec : satisfies_recurrence_2_1 N a b c) :
    ∃ S : Finset ℝ, S.card = N + 1 ∧
      ∀ x ∈ S, Module.End.HasEigenvalue (Matrix.toLin' (recurrence_matrix N a b c)) x
recurrence_matrix_eigenvectors_proportionalIn LeanCombinatorics for TCS

If v and v' are both eigenvectors of the recurrence matrix J for the same eigenvalue x (J v = x • v, J v' = x • v') and v is nonzero, then v' is a scalar multiple of v, namely v' = (v' 0 / v 0) • v. Hence every eigenspace of J is at most one dimensional.

theorem recurrence_matrix_eigenvectors_proportional (N : ℕ) (a b c : Fin (N + 1) → ℝ)
    (hrec : satisfies_recurrence_2_1 N a b c) (x : ℝ) (v v' : Fin (N + 1) → ℝ)
    (hv : Matrix.mulVec (recurrence_matrix N a b c) v = x • v)
    (hv' : Matrix.mulVec (recurrence_matrix N a b c) v' = x • v')
    (hne : v ≠ 0) :
    v' = (v' 0 / v 0) • v
recurrence_matrix_frame_weight_normalizationIn LeanCombinatorics for TCS

If the vectors u y are orthonormal (∑_y u y i * u y j = δ_ij) and π > 0, then the rescaled vectors i ↦ u y i / sqrt(π i) are orthonormal for the weight π: ∑_y π i * (u y i / sqrt(π i)) * (u y j / sqrt(π j)) = δ_ij.

theorem recurrence_matrix_frame_weight_normalization (N : ℕ) (π : Fin (N + 1) → ℝ)
    (hπ : ∀ i, 0 < π i) (u : Fin (N + 1) → Fin (N + 1) → ℝ)
    (horth : ∀ i j : Fin (N + 1), ∑ y, u y i * u y j = if i = j then 1 else 0)
    (i j : Fin (N + 1)) :
    ∑ y, π i * (u y i / Real.sqrt (π i)) * (u y j / Real.sqrt (π j))
      = if i = j then 1 else 0
recurrence_matrix_hermitian_eigenframeIn LeanCombinatorics for TCS

Let π be a positive function with π_i * J_ij = π_j * J_ji. Then there are N+1 real numbers eig y, pairwise distinct, and a real matrix u with orthonormal rows (∑_y u y i * u y j = δ_ij and ∑_i u y i^2 = 1) such that for each y the vector v_i = u y i / sqrt(π i) is an eigenvector of J with eigenvalue eig y: J v = eig y • v.

theorem recurrence_matrix_hermitian_eigenframe (N : ℕ) (a b c : Fin (N + 1) → ℝ)
    (hrec : satisfies_recurrence_2_1 N a b c) (π : Fin (N + 1) → ℝ) (hπ : ∀ i, 0 < π i)
    (hsym : ∀ i j : Fin (N + 1), π i * recurrence_matrix N a b c i j
        = π j * recurrence_matrix N a b c j i) :
    ∃ (eig : Fin (N + 1) → ℝ) (u : Fin (N + 1) → Fin (N + 1) → ℝ),
      (∀ y, Matrix.mulVec (recurrence_matrix N a b c) (fun i => u y i / Real.sqrt (π i))
        = eig y • (fun i => u y i / Real.sqrt (π i))) ∧
      (∀ i j : Fin (N + 1), ∑ y, u y i * u y j = if i = j then 1 else 0) ∧
      (∀ y, ∑ i, u y i * u y i = 1)
recurrence_matrix_spectral_frameIn LeanCombinatorics for TCS

If π is positive with π_i * J_ij = π_j * J_ji, then there are N+1 pairwise distinct real numbers x (forming a Finset S of cardinality N+1) and a nonzero eigenvector v x of J for each x, such that the frame is π-orthonormal: ∑_{x∈S} π_i * (v x)_i * (v x)_j = δ_ij for all i, j.

theorem recurrence_matrix_spectral_frame (N : ℕ) (a b c : Fin (N + 1) → ℝ)
    (hrec : satisfies_recurrence_2_1 N a b c) (π : Fin (N + 1) → ℝ) (hπ : ∀ i, 0 < π i)
    (hsym : ∀ i j : Fin (N + 1), π i * recurrence_matrix N a b c i j
        = π j * recurrence_matrix N a b c j i) :
    ∃ (S : Finset ℝ) (v : ℝ → Fin (N + 1) → ℝ), S.card = N + 1 ∧
      (∀ x ∈ S, Matrix.mulVec (recurrence_matrix N a b c) (v x) = x • v x) ∧
      (∀ x ∈ S, v x ≠ 0) ∧
      (∀ i j : Fin (N + 1), ∑ x ∈ S, π i * v x i * v x j = if i = j then 1 else 0)
recurrence_poly_aeval_mulVec_single_eq_smul_singleIn LeanCombinatorics for TCS

For m ≤ N, the recurrence polynomial R_m applied to J sends the 0-th basis vector e_0 to a nonzero scalar multiple of the m-th basis vector: R_m(J) e_0 = λ e_m with λ ≠ 0. In particular the 0-th column of R_m(J) is supported exactly at row m.

theorem recurrence_poly_aeval_mulVec_single_eq_smul_single (N : ℕ) (a b c : Fin (N + 1) → ℝ)
    (hrec : satisfies_recurrence_2_1 N a b c) (m : Fin (N + 1)) :
    ∃ lam : ℝ, lam ≠ 0 ∧
      Matrix.mulVec ((Polynomial.aeval (recurrence_matrix N a b c))
        (recurrence_poly N a b c m.val)) (Pi.single (0 : Fin (N + 1)) 1)
        = lam • Pi.single m 1
recurrence_poly_eigenvector_componentsIn LeanCombinatorics for TCS

If v is an eigenvector of the recurrence matrix J with eigenvalue x (i.e. J v = x • v), then every component of v is the 0-th component times a recurrence polynomial: v i = v 0 * R_i(x), where R_n = recurrence_poly N a b c n.

theorem recurrence_poly_eigenvector_components (N : ℕ) (a b c : Fin (N + 1) → ℝ)
    (hrec : satisfies_recurrence_2_1 N a b c) (x : ℝ) (v : Fin (N + 1) → ℝ)
    (hv : Matrix.mulVec (recurrence_matrix N a b c) v = x • v) (i : Fin (N + 1)) :
    v i = v 0 * Polynomial.eval x (recurrence_poly N a b c i.val)
recurrence_potential_weights_symmetryIn LeanCombinatorics for TCS

Let a, b, c satisfy (2.1) and let π_i = ∏_{j<i} a_j / c_{j+1} be the potential weights. Then the tridiagonal recurrence matrix J is self-adjoint for π: π_i * J_ij = π_j * J_ji for all i, j : Fin (N+1).

theorem recurrence_potential_weights_symmetry (N : ℕ) (a b c : Fin (N + 1) → ℝ)
    (hrec : satisfies_recurrence_2_1 N a b c) (i j : Fin (N + 1)) :
    recurrence_potential_weights N a c i * recurrence_matrix N a b c i j
      = recurrence_potential_weights N a c j * recurrence_matrix N a b c j i
reduced_latin_square_to_perfect_set_memIn LeanCombinatorics for TCS

For every natural number n with n ≥ 2 and every array R : Fin n → Fin n → Fin n that is a reduced Latin square, the finite set reduced_latin_square_to_perfect_set R is a perfect set of order n.

theorem reduced_latin_square_to_perfect_set_mem (n : ℕ) [NeZero n] (hn : 2 ≤ n)
    (R : Fin n → Fin n → Fin n) (hR : is_reduced_latin_square R) :
    is_perfect_set n (reduced_latin_square_to_perfect_set R)
regular_action_punctured_zpowersIn LeanCombinatorics for TCS

Let p be a prime and σ be a permutation of Fin p of order p. For any distinct elements i and j in Fin p, there is a unique non-identity element in the cyclic subgroup generated by σ mapping i to j.

open Equiv Perm Subgroup in
theorem regular_action_punctured_zpowers {p : ℕ} (hp : p.Prime) {σ : Perm (Fin p)}
    (hσ : orderOf σ = p) {i j : Fin p} (hij : i ≠ j) :
    ∃! τ : Perm (Fin p), τ ∈ zpowers σ ∧ τ ≠ 1 ∧ τ i = j
regular_four_degree_le_threeIn LeanCombinatorics for TCS

A simple graph on ZMod 4 that is regular of degree d satisfies d ≤ 3.

theorem regular_four_degree_le_three (G : SimpleGraph (ZMod 4)) [DecidableRel G.Adj]
    (d : ℕ) (h : G.IsRegularOfDegree d) : d ≤ 3
regular_four_degree_one_circulantIn LeanCombinatorics for TCS

A simple graph on ZMod 4 that is 1-regular (a perfect matching) is a circulant graph on ZMod 4: it is isomorphic to the circulant graph with jump set {2}.

theorem regular_four_degree_one_circulant (G : SimpleGraph (ZMod 4)) [DecidableRel G.Adj]
    (h : G.IsRegularOfDegree 1) : is_circulant_graph 4 G
regular_four_degree_three_circulantIn LeanCombinatorics for TCS

A simple graph on ZMod 4 that is 3-regular is the complete graph K4, which is the circulant graph on ZMod 4 with jump set {1,2,3}, hence a circulant graph.

theorem regular_four_degree_three_circulant (G : SimpleGraph (ZMod 4)) [DecidableRel G.Adj]
    (h : G.IsRegularOfDegree 3) : is_circulant_graph 4 G
regular_four_degree_two_circulantIn LeanCombinatorics for TCS

A simple graph on ZMod 4 that is 2-regular (a 4-cycle together with possibly its complement, i.e. C4) is a circulant graph on ZMod 4: it is isomorphic to the circulant graph with jump set {1}.

theorem regular_four_degree_two_circulant (G : SimpleGraph (ZMod 4)) [DecidableRel G.Adj]
    (h : G.IsRegularOfDegree 2) : is_circulant_graph 4 G
regular_graph_four_vertex_circulantIn LeanCombinatorics for TCS

Every regular simple graph on ZMod 4 of positive degree is a circulant graph on ZMod 4.

theorem regular_graph_four_vertex_circulant (G : SimpleGraph (ZMod 4)) [DecidableRel G.Adj]
    (d : ℕ) (hd : 1 ≤ d) (h : G.IsRegularOfDegree d) : is_circulant_graph 4 G
regular_sequence_additive_basis_c3_cn3_of_card_geIn LeanCombinatorics for TCS

For n ≥ 5 with (3n).minFac = 3 and ¬ 3 ∣ n, every regular sequence of cardinality at least ⌈(16 * 3n - 12)/5⌉ over C_3 × C_{3n} is an additive basis.

theorem regular_sequence_additive_basis_c3_cn3_of_card_ge (n : ℕ) (hn : 5 ≤ n) (hmin : (3 * n).minFac = 3) (hndvd : ¬ 3 ∣ n) (S : Multiset (ZMod 3 × ZMod (n * 3))) (hreg : IsRegularSequence S) (hcard : Nat.ceil ((16 * (n * 3 : ℝ) - 12) / 5) ≤ S.card) : IsAdditiveBasis S
regular_sequence_additive_basis_c3_cn3_of_not_dvdIn LeanCombinatorics for TCS

For n ≥ 2 with (3 * n).minFac = 3 and ¬ 3 ∣ n, every regular sequence of cardinality ⌈(16 * 3n - 12)/5⌉ over (ZMod 3) × (ZMod (n * 3)) is an additive basis.

theorem regular_sequence_additive_basis_c3_cn3_of_not_dvd (n : ℕ) (hn : 2 ≤ n) (hmin : (3 * n).minFac = 3) (hndvd : ¬ 3 ∣ n) (S : Multiset (ZMod 3 × ZMod (n * 3))) (hreg : IsRegularSequence S) (hcard : S.card = Nat.ceil ((16 * (n * 3 : ℝ) - 12) / 5)) : IsAdditiveBasis S
regular_sequence_additive_basis_cp_cnpIn LeanCombinatorics for TCS

For p ≥ 3 prime and n ≥ 2 with (np).minFac = p and p ∤ n, every regular sequence of cardinality ⌈(4np-2)/3⌉ over (ZMod p) × (ZMod (np)) is an additive basis.

theorem regular_sequence_additive_basis_cp_cnp (p : ℕ) (hp : p.Prime) (hp3 : 3 ≤ p) (n : ℕ) (hn : 2 ≤ n) (hmin : (n * p).minFac = p) (hndvd : ¬ p ∣ n) (S : Multiset (ZMod p × ZMod (n * p))) (hreg : IsRegularSequence S) (hcard : S.card = Nat.ceil ((4 * (n * p : ℝ) - 2) / 3)) : IsAdditiveBasis S
regular_sequence_additive_basis_cp_cnp_of_card_geIn LeanCombinatorics for TCS

For p ≥ 3 prime and n ≥ 5 with (np).minFac = p and p ∤ n, every regular sequence of cardinality at least ⌈(4np-2)/3⌉ over (ZMod p) × (ZMod (np)) is an additive basis.

theorem regular_sequence_additive_basis_cp_cnp_of_card_ge (p : ℕ) (hp : p.Prime) (hp3 : 3 ≤ p) (n : ℕ) (hn : 5 ≤ n) (hmin : (n * p).minFac = p) (hndvd : ¬ p ∣ n) (S : Multiset (ZMod p × ZMod (n * p))) (hreg : IsRegularSequence S) (hcard : Nat.ceil ((4 * (n * p : ℝ) - 2) / 3) ≤ S.card) : IsAdditiveBasis S
regular_sequence_additive_basis_cp_cnp_of_dvdIn LeanCombinatorics for TCS

For p ≥ 3 prime and n ≥ 2 with (np).minFac = p and p ∣ n, every regular sequence of cardinality ⌈(4np-2)/3⌉ over (ZMod p) × (ZMod (np)) is an additive basis.

theorem regular_sequence_additive_basis_cp_cnp_of_dvd (p : ℕ) (hp : p.Prime) (hp3 : 3 ≤ p) (n : ℕ) (hn : 2 ≤ n) (hmin : (n * p).minFac = p) (hdvd : p ∣ n) (S : Multiset (ZMod p × ZMod (n * p))) (hreg : IsRegularSequence S) (hcard : S.card = Nat.ceil ((4 * (n * p : ℝ) - 2) / 3)) : IsAdditiveBasis S
regular_sequence_additive_basis_cp_cnp_of_dvd_of_card_geIn LeanCombinatorics for TCS

For p ≥ 3 prime and p ≤ n with (np).minFac = p and p ∣ n, every regular sequence of cardinality at least ⌈(4np-2)/3⌉ over (ZMod p) × (ZMod (np)) is an additive basis.

theorem regular_sequence_additive_basis_cp_cnp_of_dvd_of_card_ge (p : ℕ) (hp : p.Prime) (hp3 : 3 ≤ p) (n : ℕ) (hn : p ≤ n) (hmin : (n * p).minFac = p) (hdvd : p ∣ n) (S : Multiset (ZMod p × ZMod (n * p))) (hreg : IsRegularSequence S) (hcard : Nat.ceil ((4 * (n * p : ℝ) - 2) / 3) ≤ S.card) : IsAdditiveBasis S
regular_sequence_additive_basis_cp_cnp_of_ge_fiveIn LeanCombinatorics for TCS

For p ≥ 5 prime and n ≥ 2 with (np).minFac = p and p ∤ n, every regular sequence of cardinality ⌈(25np - 20)/6⌉ over (ZMod p) × (ZMod (np)) is an additive basis.

theorem regular_sequence_additive_basis_cp_cnp_of_ge_five (p : ℕ) (hp : p.Prime) (hp5 : 5 ≤ p) (n : ℕ) (hn : 2 ≤ n) (hmin : (n * p).minFac = p) (hndvd : ¬ p ∣ n) (S : Multiset (ZMod p × ZMod (n * p))) (hreg : IsRegularSequence S) (hcard : S.card = Nat.ceil ((25 * (n * p : ℝ) - 20) / 6)) : IsAdditiveBasis S
regular_sequence_additive_basis_cq_cnq_of_card_geIn LeanCombinatorics for TCS

Theorem 3.5 of arXiv:2610.13103: let q be prime, n ≥ 2, and p = (nq).minFac ≥ 3. Then every regular sequence S over (ZMod q) × (ZMod (nq)) with S.card ≥ max{nq + 2q² − q − 1, nq(q+1)/p − q + p − 2} is an additive basis of the group.

theorem regular_sequence_additive_basis_cq_cnq_of_card_ge (q : ℕ) (hq : q.Prime) (n : ℕ) (hn : 2 ≤ n) (hp3 : 3 ≤ (n * q).minFac) (S : Multiset (ZMod q × ZMod (n * q))) (hreg : IsRegularSequence S) (hcard : max (n * q + 2 * q ^ 2 - q - 1) (n * q * (q + 1) / (n * q).minFac - q + (n * q).minFac - 2) ≤ S.card) : IsAdditiveBasis S
regular_sequence_c3_cn3_countingIn LeanCombinatorics for TCS

Every regular sequence of cardinality at least ⌈(16 * 3n - 12)/5⌉ over C_3 × C_{3n} has at least 2 elements outside every proper subgroup H.

open scoped Classical in
theorem regular_sequence_c3_cn3_counting (n : ℕ) (hn : 2 ≤ n) (hmin : (3 * n).minFac = 3) (hndvd : ¬ 3 ∣ n) (S : Multiset (ZMod 3 × ZMod (n * 3))) (hreg : IsRegularSequence S) (hcard : Nat.ceil ((16 * (n * 3 : ℝ) - 12) / 5) ≤ S.card) (H : AddSubgroup (ZMod 3 × ZMod (n * 3))) (hH : H < ⊤) : 2 ≤ (S.filter (fun x => x ∉ H)).card
regular_sequence_c3_cn3_davenport_leIn LeanCombinatorics for TCS

The Olson Davenport constant D(C_3 × C_{3n}) = 3 + 3n - 1 is at most the threshold ⌈(16 * 3n - 12)/5⌉ for all n ≥ 5.

theorem regular_sequence_c3_cn3_davenport_le (n : ℕ) (hn : 5 ≤ n) : 3 + n * 3 - 1 ≤ Nat.ceil ((16 * (n * 3 : ℝ) - 12) / 5)
regular_sequence_c3_cn3_n_ge_fiveIn LeanCombinatorics for TCS

For n ≥ 2 with (3 * n).minFac = 3 and ¬ 3 ∣ n, we have 5 ≤ n.

theorem regular_sequence_c3_cn3_n_ge_five (n : ℕ) (hn : 2 ≤ n) (hmin : (3 * n).minFac = 3) (hndvd : ¬ 3 ∣ n) : 5 ≤ n
regular_sequence_cp_cnp_countingIn LeanCombinatorics for TCS

For p ≥ 3 prime and n ≥ 2 with (np).minFac = p and p does not divide n, every regular sequence S over ZMod p × ZMod (np) of cardinality at least ⌈(4np−2)/3⌉ has at least p − 1 terms outside every proper additive subgroup H (strictly smaller than the whole group).

open scoped Classical in
theorem regular_sequence_cp_cnp_counting (p : ℕ) (hp : p.Prime) (hp3 : 3 ≤ p) (n : ℕ) (hn : 2 ≤ n) (hmin : (n * p).minFac = p) (hndvd : ¬ p ∣ n) (S : Multiset (ZMod p × ZMod (n * p))) (hreg : IsRegularSequence S) (hcard : Nat.ceil ((4 * (n * p : ℝ) - 2) / 3) ≤ S.card) (H : AddSubgroup (ZMod p × ZMod (n * p))) (hH : H < ⊤) : p - 1 ≤ (S.filter (fun x => x ∉ H)).card
regular_sequence_cp_cnp_n_ge_fiveIn LeanCombinatorics for TCS

For p ≥ 3 prime and n ≥ 2 with (np).minFac = p and p ∤ n, we have 5 ≤ n.

theorem regular_sequence_cp_cnp_n_ge_five (p : ℕ) (hp : p.Prime) (hp3 : 3 ≤ p) (n : ℕ) (hn : 2 ≤ n) (hmin : (n * p).minFac = p) (hndvd : ¬ p ∣ n) : 5 ≤ n
regular_sequence_cp_cnp_p_le_nIn LeanCombinatorics for TCS

For p ≥ 3 and n ≥ 2 with p ∣ n, we have p ≤ n.

theorem regular_sequence_cp_cnp_p_le_n (p : ℕ) (hp3 : 3 ≤ p) (n : ℕ) (hn : 2 ≤ n) (hdvd : p ∣ n) : p ≤ n
restricted_diff_card_le_of_missingIn LeanCombinatorics for TCS

Let G be a finite abelian group of odd order at least 21, and let A be a finite subset of G with |A| > |G| / 2. If the 3-fold restricted sumset of A (the set of sums of 3 distinct elements of A) does not equal all of G, then the difference set A - A has cardinality at most |G| - |A|.

open scoped Pointwise in
theorem restricted_diff_card_le_of_missing {G : Type*} [AddCommGroup G] [Fintype G] [DecidableEq G]
    (hN_odd : Fintype.card G % 2 = 1) (hN : 21 ≤ Fintype.card G)
    {A : Finset G} (hA : Fintype.card G / 2 < A.card)
    (h_not_all : (A.powersetCard 3).image (fun s => ∑ x ∈ s, x) ≠ Finset.univ) :
    (A - A).card ≤ Fintype.card G - A.card
restricted_sumset_eq_empty_of_card_ltIn LeanCombinatorics for TCS

If A has fewer than k elements then the k-fold restricted sumset of A is empty, since there is no k-element subset to sum over.

theorem restricted_sumset_eq_empty_of_card_lt {G : Type*} [AddCommGroup G] [DecidableEq G] {A : Finset G} {k : ℕ} (h : A.card < k) : restrictedSumset A k = ∅
restricted_sumset_oneIn LeanCombinatorics for TCS

The one-fold restricted sumset of A is A itself: Σ₁(A) = A.

theorem restricted_sumset_one {G : Type*} [AddCommGroup G] [DecidableEq G] (A : Finset G) : restrictedSumset A 1 = A
rigid_sequence_product_zero_sum_free_of_exact_lightIn LeanCombinatorics for TCS

Let n = 2^a * m with a >= 1 and odd m >= 3. Let t >= 1 and let r : Fin t -> ℕ. If for each i in Fin t, S(i) is a rigid sequence in Multiset (Fin (r i) -> ZMod n) with parameters n and m such that every term in S(i) has multiplicity n - 1 or m - 1, then the rigid sequence tensor product of S with parameters n and m has no zero-sum subsequence of length n.

theorem rigid_sequence_product_zero_sum_free_of_exact_light {a : ℕ} (ha : 1 ≤ a) {m : ℕ} (hm : Odd m) (hm3 : 3 ≤ m) {n : ℕ} (hn : n = 2 ^ a * m)
    {t : ℕ} (ht : 1 ≤ t) (r : Fin t → ℕ)
    (S : (i : Fin t) → Multiset (Fin (r i) → ZMod n))
    (hS : ∀ i, is_rigid_sequence n m (S i))
    (h_exact : ∀ (i : Fin t) (x : Fin (r i) → ZMod n), x ∈ S i → (S i).count x = n - 1 ∨ (S i).count x = m - 1) :
    ¬ ∃ W : Multiset ((i : Fin t) → Fin (r i) → ZMod n),
      W ≤ rigid_sequence_tensor_product n m S ∧ W.card = n ∧ W.sum = 0
rigid_sequence_tensor_product_count_leIn LeanCombinatorics for TCS

Let n and m be natural numbers with m <= n, and let S be a family of sequences in Multiset (G i) for i in Fin t. For any tuple x, the count of x in rigid_sequence_tensor_product n m S is at most n - 1.

lemma rigid_sequence_tensor_product_count_le {n m t : ℕ} {G : Fin t → Type*} [∀ i, DecidableEq (G i)]
    (S : (i : Fin t) → Multiset (G i)) (x : (i : Fin t) → G i) (hmn : m ≤ n) :
    Multiset.count x (rigid_sequence_tensor_product n m S) ≤ n - 1
rigid_sequence_tensor_product_count_of_light_leIn LeanCombinatorics for TCS

Let n and m be natural numbers, and let S be a family of sequences in Multiset (G i) for i in Fin t. If x is a tuple having at least one light coordinate j in S(j), then the count of x in rigid_sequence_tensor_product n m S is at most m - 1.

lemma rigid_sequence_tensor_product_count_of_light_le {n m t : ℕ} {G : Fin t → Type*} [∀ i, DecidableEq (G i)]
    (S : (i : Fin t) → Multiset (G i)) (x : (i : Fin t) → G i) (j : Fin t)
    (hl : 0 < (S j).count (x j) ∧ (S j).count (x j) ≤ m - 1 ∧ ¬(S j).count (x j) = n - 1) :
    Multiset.count x (rigid_sequence_tensor_product n m S) ≤ m - 1
rigid_sequence_tensor_product_heavy_of_ne_lightIn LeanCombinatorics for TCS

Let x be an element of rigid_sequence_tensor_product n m S. If coordinate j is light in S(j), then for any coordinate i ≠ j, x(i) is heavy in S(i) (i.e. count in S(i) equals n - 1).

lemma rigid_sequence_tensor_product_heavy_of_ne_light {n m t : ℕ} {G : Fin t → Type*} [∀ i, DecidableEq (G i)]
    (S : (i : Fin t) → Multiset (G i)) (x : (i : Fin t) → G i)
    (hx : x ∈ rigid_sequence_tensor_product n m S)
    (j : Fin t) (hl : 0 < (S j).count (x j) ∧ (S j).count (x j) ≤ m - 1 ∧ ¬(S j).count (x j) = n - 1)
    (i : Fin t) (hij : i ≠ j) :
    (S i).count (x i) = n - 1
ring_diamond_block_routeIn LeanCombinatorics for TCS

In the ring of 20 diamonds, for every block i and every choice set S, the ring vertex (i,0) is adjacent to the midpoint (i,2) if i ∈ S and to (i,1) otherwise, and that midpoint is adjacent to the next ring vertex (i+1,0). Hence each block carries a 2-edge route between consecutive ring vertices.

theorem ring_diamond_block_route (S : Finset (Fin 20)) (i : Fin 20) :
    ring_diamond_graph.Adj (i, (0 : Fin 3)) (if i ∈ S then (i, (2 : Fin 3)) else (i, (1 : Fin 3))) ∧
    ring_diamond_graph.Adj (if i ∈ S then (i, (2 : Fin 3)) else (i, (1 : Fin 3))) (i + 1, (0 : Fin 3))
ring_diamond_cycle_edges_cardIn LeanCombinatorics for TCS

Each of the 20 blocks contributes exactly two edges to the ring cycle determined by S (one edge from the ring vertex (i,0) to the chosen midpoint, one from that midpoint to (i+1,0)), and the 20 blocks share no edges, so the cycle has 20·2 = 40 edges.

theorem ring_diamond_cycle_edges_card (S : Finset (Fin 20)) :
    (ring_diamond_cycle_edges S).card = 40
ring_diamond_cycle_edges_injectiveIn LeanCombinatorics for TCS

The map sending a 10-element set S of blocks to the edge set of its ring cycle is injective: the edge joining (i,0) to (i,2) lies in that edge set exactly when i ∈ S.

theorem ring_diamond_cycle_edges_injective (S T : Finset (Fin 20)) (hS : S.card = 10) (hT : T.card = 10)
    (h : ring_diamond_cycle_edges S = ring_diamond_cycle_edges T) : S = T
ring_diamond_cycle_family_cardIn LeanCombinatorics for TCS

The image of the 10-element subsets of the 20 blocks under the ring-cycle edge-set map has cardinality C(20,10) = 184756, because there are C(20,10) such subsets and the map is injective on them.

theorem ring_diamond_cycle_family_card :
    ((Finset.univ.filter (fun S : Finset (Fin 20) => S.card = 10)).image ring_diamond_cycle_edges).card = 184756
ring_diamond_cycle_walkIn LeanCombinatorics for TCS

For every set S of blocks there is a vertex u and a cycle walk in the ring of 20 diamonds whose edge set is exactly the 40 edges of the ring cycle determined by S (walk once around the ring, taking the route through (i,2) when i ∈ S and through (i,1) otherwise).

theorem ring_diamond_cycle_walk (S : Finset (Fin 20)) :
    ∃ (u : Fin 20 × Fin 3) (p : ring_diamond_graph.Walk u u), p.IsCycle ∧
      (↑(ring_diamond_cycle_edges S) : Set (Sym2 (Fin 20 × Fin 3))) = p.toSubgraph.edgeSet
ring_diamond_graph_edge_finset_card_leIn LeanCombinatorics for TCS

The ring of 20 diamonds has at most m = 80 edges (in fact exactly 80), so it satisfies the edge bound of the counting statement with m = 80.

theorem ring_diamond_graph_edge_finset_card_le : ring_diamond_graph.edgeFinset.card ≤ 80
root_lattice_form_boolean_leIn LeanCombinatorics for TCS

For any boolean vector v ∈ {0,1}^k with k ≥ 1, the quadratic form ∑ v_i² − (∑ v_i)²/(k+1) is at most ⌊(k+1)²/4⌋/(k+1).

theorem root_lattice_form_boolean_le (k : ℕ) (hk : 1 ≤ k) (v : Fin k → ℝ)
    (hv : ∀ i, v i = 0 ∨ v i = 1) :
    (∑ i, (v i)^2) - (1 / ((k : ℝ) + 1)) * (∑ i, v i)^2 ≤
      ((((k + 1) ^ 2 / 4 : ℕ) : ℝ) / ((k : ℝ) + 1))
root_lattice_form_coord_leIn LeanCombinatorics for TCS

For any u : Fin k → ℝ and coordinate j with u_j ∈ [0, 1], q(u) ≤ max (q(u[j ↦ 0])) (q(u[j ↦ 1])).

theorem root_lattice_form_coord_le (k : ℕ) (hk : 1 ≤ k) (u : Fin k → ℝ) (j : Fin k)
    (hj : u j ∈ Set.Icc (0 : ℝ) 1) :
    (∑ i, (u i)^2) - (1 / ((k : ℝ) + 1)) * (∑ i, u i)^2 ≤
      max ((∑ i, ((Function.update u j 0) i)^2) - (1 / ((k : ℝ) + 1)) * (∑ i, (Function.update u j 0) i)^2)
          ((∑ i, ((Function.update u j 1) i)^2) - (1 / ((k : ℝ) + 1)) * (∑ i, (Function.update u j 1) i)^2)
root_lattice_form_cube_leIn LeanCombinatorics for TCS

For any u in the cube [0, 1]^k with k ≥ 1, the quadratic form ∑ u_i² − (∑ u_i)²/(k+1) is at most ⌊(k+1)²/4⌋/(k+1).

theorem root_lattice_form_cube_le (k : ℕ) (hk : 1 ≤ k) (u : Fin k → ℝ)
    (hu : ∀ i, u i ∈ Set.Icc (0 : ℝ) 1) :
    (∑ i, (u i)^2) - (1 / ((k : ℝ) + 1)) * (∑ i, u i)^2 ≤
      ((((k + 1) ^ 2 / 4 : ℕ) : ℝ) / ((k : ℝ) + 1))
root_lattice_form_cube_maxIn LeanCombinatorics for TCS

The maximum of uᵀHu over the cube [0,1]^k, H = I_k − 11ᵀ/(k+1), is ⌊(k+1)²/4⌋/(k+1), attained at a 0/1 vector with ⌊(k+1)/2⌋ ones.

theorem root_lattice_form_cube_max (k : ℕ) (hk : 1 ≤ k) :
    IsGreatest ((fun u : Fin k → ℝ =>
        dotProduct u (Matrix.mulVec (1 - (1 / ((k : ℝ) + 1)) • Matrix.of (fun _ _ : Fin k => (1 : ℝ))) u)) ''
        {u | ∀ i, u i ∈ Set.Icc (0 : ℝ) 1})
      ((((k + 1) ^ 2 / 4 : ℕ) : ℝ) / ((k : ℝ) + 1))
root_lattice_form_exists_boolean_geIn LeanCombinatorics for TCS

For any u in the cube [0, 1]^k, there exists a boolean vector v ∈ {0, 1}^k with q(u) ≤ q(v).

theorem root_lattice_form_exists_boolean_ge (k : ℕ) (hk : 1 ≤ k) (u : Fin k → ℝ)
    (hu : ∀ i, u i ∈ Set.Icc (0 : ℝ) 1) :
    ∃ v : Fin k → ℝ, (∀ i, v i = 0 ∨ v i = 1) ∧
      (∑ i, (u i)^2) - (1 / ((k : ℝ) + 1)) * (∑ i, u i)^2 ≤
      (∑ i, (v i)^2) - (1 / ((k : ℝ) + 1)) * (∑ i, v i)^2
root_lattice_form_pos_def_det_cube_maxIn LeanCombinatorics for TCS

For k ≥ 1 and H = I_k − 11ᵀ/(k+1): H is positive definite, det H = 1/(k+1), and b_H = max_{u ∈ [0,1]^k} uᵀHu = ⌊(k+1)²/4⌋/(k+1).

theorem root_lattice_form_pos_def_det_cube_max (k : ℕ) (hk : 1 ≤ k) :
    (1 - (1 / ((k : ℝ) + 1)) • Matrix.of (fun _ _ : Fin k => (1 : ℝ))).PosDef ∧
    (1 - (1 / ((k : ℝ) + 1)) • Matrix.of (fun _ _ : Fin k => (1 : ℝ))).det = 1 / ((k : ℝ) + 1) ∧
    IsGreatest ((fun u : Fin k → ℝ =>
        dotProduct u (Matrix.mulVec (1 - (1 / ((k : ℝ) + 1)) • Matrix.of (fun _ _ : Fin k => (1 : ℝ))) u)) ''
        {u | ∀ i, u i ∈ Set.Icc (0 : ℝ) 1})
      ((((k + 1) ^ 2 / 4 : ℕ) : ℝ) / ((k : ℝ) + 1))
seidel_graph_exists_six_verticesIn LeanCombinatorics for TCS

There is a graph on 6 vertices whose Seidel matrix has all row sums equal to 1 and non-positive off-diagonal entries in its square: the 6-cycle. This is the n = 2 case (4n - 2 = 6) of the family the target belongs to and shows the Seidel condition class is non-empty.

theorem seidel_graph_exists_six_vertices :
    ∃ (G : SimpleGraph (Fin 6)) (_ : DecidableRel G.Adj),
      (∀ i : Fin 6, ∑ j : Fin 6, seidel_matrix G i j = 1) ∧
      (∀ i j : Fin 6, i ≠ j → (seidel_matrix G * seidel_matrix G) i j ≤ 0)
seidel_matrix_book_ramsey_lower_boundIn LeanCombinatorics for TCS

Let n ≥ 2 be an integer, and let G be a simple graph on a finite vertex set V of cardinality 4n - 2 with Seidel matrix S. If every row sum of S is 1 and (S^2)_{ij} ≤ 0 for all distinct vertices i ≠ j, then every pair of adjacent vertices in G has at most n - 2 common neighbors, every pair of adjacent vertices in the complement Gᶜ has at most n - 1 common neighbors, G contains no subgraph isomorphic to the book graph B_{n-1}, Gᶜ contains no subgraph isomorphic to the book graph B_n, and the two-color Ramsey property for (B_{n-1}, B_n) fails on 4n - 2 vertices.

theorem seidel_matrix_book_ramsey_lower_bound {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (n : ℕ) (hn : 2 ≤ n)
    (hV : Fintype.card V = 4 * n - 2)
    (h_row : ∀ i : V, ∑ j : V, seidel_matrix G i j = 1)
    (h_sq : ∀ i j : V, i ≠ j → (seidel_matrix G * seidel_matrix G) i j ≤ 0) :
    (∀ u v : V, G.Adj u v → Fintype.card (G.commonNeighbors u v) ≤ n - 2) ∧
    (∀ u v : V, Gᶜ.Adj u v → Fintype.card (Gᶜ.commonNeighbors u v) ≤ n - 1) ∧
    ¬ (book_graph (n - 1)).IsContained G ∧
    ¬ (book_graph n).IsContained Gᶜ ∧
    ¬ simple_graph_ramsey_property (book_graph (n - 1)) (book_graph n) (4 * n - 2)
seq_contam_mono_appendIn LeanCombinatorics for TCS

Contamination is monotone along a clean sequence: if a vertex's germs are on a glove side after the prefix $l_1$, they are still there after the prefix $l_1$ followed by $l_2$.

theorem seq_contam_mono_append {V Γ : Type*} [DecidableEq Γ]
    (l₁ l₂ : List (Handshake V Γ)) (t : Γ × Bool → Set V) (s : Γ × Bool) :
    seq_contam l₁ t s ⊆ seq_contam (l₁ ++ l₂) t s
set_family_ulc_at_two_of_parallel_pairsIn LeanCombinatorics for TCS

A hereditary family whose excluded pairs of permitted vertices form equivalence classes satisfies binomial-normalized log-concavity at rank two.

theorem set_family_ulc_at_two_of_parallel_pairs {V : Type*} [Fintype V] [DecidableEq V] (family : Set (Finset V)) (hdown : ∀ A ∈ family, ∀ B : Finset V, B ⊆ A → B ∈ family) (hpar : ∀ a b c : V, a ≠ b → b ≠ c → a ≠ c → ({a} : Finset V) ∈ family → ({b} : Finset V) ∈ family → ({c} : Finset V) ∈ family → ({a,b} : Finset V) ∉ family → ({b,c} : Finset V) ∉ family → ({a,c} : Finset V) ∉ family) : let f := fun k : ℕ => {A : Finset V | A ∈ family ∧ A.card = k}.ncard; f 1 * f 3 * Nat.choose (Fintype.card V) 2 ^ 2 ≤ f 2 ^ 2 * Fintype.card V * Nat.choose (Fintype.card V) 3
set_family_weighted_ulc_at_two_parallel_pairsIn LeanCombinatorics for TCS

A hereditary family with parallel-class excluded pairs satisfies the rank-two normalized log-concavity inequality for any nonnegative vertex product weights.

theorem set_family_weighted_ulc_at_two_parallel_pairs {V : Type*} [Fintype V] [DecidableEq V] (family : Set (Finset V)) [DecidablePred (fun A : Finset V => A ∈ family)] (w : V → ℕ) (hdown : ∀ A ∈ family, ∀ B : Finset V, B ⊆ A → B ∈ family) (hpar : ∀ a b c : V, a ≠ b → b ≠ c → a ≠ c → ({a} : Finset V) ∈ family → ({b} : Finset V) ∈ family → ({c} : Finset V) ∈ family → ({a,b} : Finset V) ∉ family → ({b,c} : Finset V) ∉ family → ({a,c} : Finset V) ∉ family) : let f := fun k : ℕ => ∑ A ∈ Finset.univ.filter (fun A : Finset V => A ∈ family ∧ A.card = k), ∏ v ∈ A, w v; f 1 * f 3 * Nat.choose (Fintype.card V) 2 ^ 2 ≤ f 2 ^ 2 * Fintype.card V * Nat.choose (Fintype.card V) 3
sharp_cyclic_and_compl_iff_circulantIn LeanCombinatorics for TCS

Let G be a simple graph on ZMod N, and let G^c be its complement graph. Suppose that both G and G^c have at least one edge. The standard cyclic labeling is sharp for both G and G^c if and only if the adjacency matrix of G is circulant.

theorem sharp_cyclic_and_compl_iff_circulant (N : ℕ) [NeZero N]
    (G : SimpleGraph (ZMod N)) [DecidableRel G.Adj]
    (he : ∃ u v, G.Adj u v) (hec : ∃ u v, Gᶜ.Adj u v) :
    (is_sharp_cyclic_labeling N G (Equiv.refl (ZMod N)) ∧
     is_sharp_cyclic_labeling N Gᶜ (Equiv.refl (ZMod N))) ↔
    ∃ v : ZMod N → ℂ, G.adjMatrix ℂ = Matrix.circulant v
sharp_cyclic_four_fourier_row_vanishIn LeanCombinatorics for TCS

If a simple graph on ZMod 4 admits a sharp cyclic labeling π, then all but at most one of the discrete Fourier coefficients of the degree vector (y ↦ deg (π y)) vanish: the exponential sums ∑_y deg(π y) · exp(−2πi·(n·y)/4) are zero for every n except possibly one distinguished n₀.

theorem sharp_cyclic_four_fourier_row_vanish (G : SimpleGraph (ZMod 4)) [DecidableRel G.Adj]
    (π : ZMod 4 ≃ ZMod 4) (hπ : is_sharp_cyclic_labeling 4 G π) :
    ∃ n₀ : ZMod 4, ∀ n : ZMod 4, n ≠ n₀ →
      ∑ y : ZMod 4, (G.degree (π y) : ℂ) *
        Complex.exp (-2 * ↑Real.pi * Complex.I * (↑((n * y).val) / ↑(4 : ℕ))) = 0
sharp_cyclic_four_regularIn LeanCombinatorics for TCS

Every simple graph G on ZMod 4 with at least one edge that admits a sharp cyclic labeling is regular of some positive degree d.

theorem sharp_cyclic_four_regular (G : SimpleGraph (ZMod 4)) [DecidableRel G.Adj]
    (he : ∃ u v, G.Adj u v) (hs : admits_sharp_cyclic_labeling 4 G) :
    ∃ d : ℕ, 1 ≤ d ∧ G.IsRegularOfDegree d
shift_mul_bijective_zmodIn LeanCombinatorics for TCS

For prime n and σ not divisible by n, multiplication by σ is a bijection of ZMod n.

theorem shift_mul_bijective_zmod (n : ℕ) (hn : n.Prime) (σ : ℕ) (hσ : σ % n ≠ 0) : Function.Bijective (fun k : ZMod n => k * (σ : ZMod n))
sign_invertible_implies_splitting_systemIn LeanCombinatorics for TCS

Let m, n, t be positive natural numbers with t even. Let A be an m × n matrix with entries in {-1, 1} (for all i and j, A_{i, j} = 1 ∨ A_{i, j} = -1). For each i, let B_i = {j ∈ Fin n : A_{i, j} = 1}, and let 𝔹 = {B_i : i ∈ Fin m}. Let V_{≤ t} = {x : Fin n → ℤ | (∀ j, x j = 0 ∨ x j = 1) ∧ |{j : x j ≠ 0}| ≤ t} be the set of t-sparse binary vectors. If the map x ↦ Int.sign ∘ (Matrix.mulVec A x) is injective on V_{≤ t}, then 𝔹 is an (n, t)-splitting system on Fin n.

theorem sign_invertible_implies_splitting_system
    {m n t : ℕ} (hm : 0 < m) (hn : 0 < n) (ht : 0 < t) (ht_even : Even t)
    (A : Matrix (Fin m) (Fin n) ℤ) (hA : ∀ i j, A i j = 1 ∨ A i j = -1)
    (h_inj : Set.InjOn (fun x => Int.sign ∘ (Matrix.mulVec A x))
      {x : Fin n → ℤ | (∀ j, x j = 0 ∨ x j = 1) ∧ (Finset.filter (fun j => x j ≠ 0) Finset.univ).card ≤ t}) :
    is_splitting_system n t
      (Finset.image (fun i => Finset.filter (fun j => A i j = 1) Finset.univ) Finset.univ)
signed_graph_balance_partition_transportsIn LeanCombinatorics for TCS

A signed graph isomorphic to a balanced signed graph has a balance partition.

theorem signed_graph_balance_partition_transports {V W : Type*}
    [DecidableEq V] [Fintype V] [DecidableEq W] [Fintype W]
    (G : SignedGraph V) (H : SignedGraph W) (A B : Finset V)
    (hbal : G.IsBalancedPartition A B) (hiso : G.IsIsomorphic H) :
    ∃ C D : Finset W, H.IsBalancedPartition C D
signed_graph_netDegree_switchIn LeanCombinatorics for TCS

Switching G at v negates the net-degree of v and subtracts twice the extended edge sign s(u,v) from the net-degree of every other vertex u.

theorem signed_graph_netDegree_switch {V : Type*} [DecidableEq V] [Fintype V] (G : SignedGraph V) (u v : V) : (G.switch v).netDegree u = if u = v then -G.netDegree v else G.netDegree u - 2 * G.edgeSign u v
signed_graph_nonreconstructible_has_switch_partnerIn LeanCombinatorics for TCS

If G is not reconstructible from its switching deck, then every vertex v of G has a switch partner w: a vertex w ≠ v such that the double switch of G at v and w is not isomorphic to G but has the same switching deck as G.

theorem signed_graph_nonreconstructible_has_switch_partner {V : Type*} [DecidableEq V] [Fintype V] (G : SignedGraph V) (h : ¬ G.IsReconstructible) : ∀ v : V, ∃ w : V, G.IsSwitchPartner v w
signed_graph_reconstructible_of_all_neg_net_degreesIn LeanCombinatorics for TCS

Let G be a signed graph on a finite vertex set V with cardinality not equal to 4. If every vertex v of G has strictly negative net-degree, then G is reconstructible from its switching deck.

theorem signed_graph_reconstructible_of_all_neg_net_degrees {V : Type*} [DecidableEq V] [Fintype V] (G : SignedGraph V) (h_card : Fintype.card V ≠ 4) (h_neg : ∀ v : V, G.netDegree v < 0) : G.IsReconstructible
signed_graph_reconstructible_of_all_pos_net_degreesIn LeanCombinatorics for TCS

Let G be a signed graph on a finite vertex set V with cardinality not equal to 4. If every vertex v of G has strictly positive net-degree, then G is reconstructible from its switching deck.

theorem signed_graph_reconstructible_of_all_pos_net_degrees {V : Type*} [DecidableEq V] [Fintype V] (G : SignedGraph V) (h_card : Fintype.card V ≠ 4) (h_pos : ∀ v : V, 0 < G.netDegree v) : G.IsReconstructible
signed_graph_reconstructible_of_disjoint_netDegreeIn LeanCombinatorics for TCS

Let G be a signed graph on a finite vertex set V with cardinality not equal to 4. If there exists a vertex v such that no vertex w of G has net-degree equal to -G.netDegree v - 2, -G.netDegree v, or -G.netDegree v + 2, then G is reconstructible from its switching deck.

theorem signed_graph_reconstructible_of_disjoint_netDegree {V : Type*} [DecidableEq V] [Fintype V] (G : SignedGraph V) (h_card : Fintype.card V ≠ 4) (v : V) (h_disj : ∀ w : V, G.netDegree w ≠ -G.netDegree v - 2 ∧ G.netDegree w ≠ -G.netDegree v ∧ G.netDegree w ≠ -G.netDegree v + 2) : G.IsReconstructible
signed_graph_reconstructible_of_netDegree_ge_threeIn LeanCombinatorics for TCS

Let G be a signed graph on a vertex set of cardinality different from 4 in which every net-degree is non-negative and some vertex has net-degree at least 3. Then G is reconstructible from its switching deck.

theorem signed_graph_reconstructible_of_netDegree_ge_three {V : Type*} [DecidableEq V] [Fintype V] (G : SignedGraph V) (h_card : Fintype.card V ≠ 4) (h_nonneg : ∀ v : V, G.netDegree v ≥ 0) (h_big : ∃ v : V, G.netDegree v ≥ 3) : G.IsReconstructible
signed_graph_reconstructible_of_netDegree_le_twoIn LeanCombinatorics for TCS

Let G be a connected balanced signed graph on a finite vertex set of cardinality different from 4, all of whose net-degrees are non-negative and at most 2. Then G is reconstructible from its switching deck.

theorem signed_graph_reconstructible_of_netDegree_le_two {V : Type*} [DecidableEq V] [Fintype V] (G : SignedGraph V) (h_conn : G.graph.Connected) (h_card : Fintype.card V ≠ 4) (A B : Finset V) (h_bal : G.IsBalancedPartition A B) (h_nonneg : ∀ v : V, G.netDegree v ≥ 0) (h_le : ∀ v : V, G.netDegree v ≤ 2) : G.IsReconstructible
signed_graph_reconstructible_of_netDegree_zero_or_twoIn LeanCombinatorics for TCS

Let G be a connected balanced signed graph on a finite vertex set of cardinality different from 4, and suppose every vertex has net-degree 0 or 2. Then G is reconstructible from its switching deck.

theorem signed_graph_reconstructible_of_netDegree_zero_or_two {V : Type*} [DecidableEq V] [Fintype V] (G : SignedGraph V) (h_conn : G.graph.Connected) (h_card : Fintype.card V ≠ 4) (A B : Finset V) (h_bal : G.IsBalancedPartition A B) (h_vals : ∀ v : V, G.netDegree v = 0 ∨ G.netDegree v = 2) : G.IsReconstructible
signed_graph_reconstructible_of_net_regularIn LeanCombinatorics for TCS

Every net-regular signed graph G on a finite vertex set V with cardinality not equal to 4 is reconstructible from its switching deck.

theorem signed_graph_reconstructible_of_net_regular {V : Type*} [DecidableEq V] [Fintype V] (G : SignedGraph V) (h_card : Fintype.card V ≠ 4) (h_reg : G.IsNetRegular) : G.IsReconstructible
signed_graph_reconstructible_of_strict_sign_net_degreesIn LeanCombinatorics for TCS

Let G be a signed graph on a finite vertex set V with cardinality not equal to 4. If all net-degrees of G are strictly positive, or all are strictly negative, then G is reconstructible from its switching deck.

theorem signed_graph_reconstructible_of_strict_sign_net_degrees {V : Type*} [DecidableEq V] [Fintype V] (G : SignedGraph V) (h_card : Fintype.card V ≠ 4) (h_sign : (∀ v : V, 0 < G.netDegree v) ∨ (∀ v : V, G.netDegree v < 0)) : G.IsReconstructible
signed_graph_sameDeck_netDegreeIn LeanCombinatorics for TCS

If G and G' have the same switching deck (via π : V ≃ V') and |V| ≠ 4, then every vertex's net-degree is recovered from the deck: G'.netDegree (π v) = G.netDegree v for all v. In particular the net-degree multisets agree, so if all net-degrees of G are non-negative so are all of G'.

theorem signed_graph_sameDeck_netDegree {V V' : Type*} [DecidableEq V] [DecidableEq V'] [Fintype V] [Fintype V'] (G : SignedGraph V) (G' : SignedGraph V') (h_deck : G.SameDeck G') (h_card : Fintype.card V ≠ 4) : ∃ π : V ≃ V', ∀ v : V, G'.netDegree (π v) = G.netDegree v
signed_graph_switch_balance_partitionIn LeanCombinatorics for TCS

Switching a balanced signed graph at v gives the balance partition obtained by moving v to the other part.

theorem signed_graph_switch_balance_partition {V : Type*} [DecidableEq V] [Fintype V]
    (G : SignedGraph V) (A B : Finset V) (hbal : G.IsBalancedPartition A B) (v : V) :
    (G.switch v).IsBalancedPartition ((A \ {v}) ∪ ({v} \ A)) ((B \ {v}) ∪ ({v} \ B))
signed_graph_switch_netDegree_sumIn LeanCombinatorics for TCS

The net-degrees of the card G.switch v sum to (sum over all vertices of G.netDegree) minus 4 * G.netDegree v.

theorem signed_graph_switch_netDegree_sum {V : Type*} [DecidableEq V] [Fintype V] (G : SignedGraph V) (v : V) : (∑ u, (G.switch v).netDegree u) = (∑ u, G.netDegree u) - 4 * G.netDegree v
signed_graph_switch_partner_netDegreeIn LeanCombinatorics for TCS

If w is a switch partner of v in a signed graph G on a vertex set of cardinality different from 4, then G.netDegree v + G.netDegree w = 2 * G.edgeSign v w.

theorem signed_graph_switch_partner_netDegree {V : Type*} [DecidableEq V] [Fintype V] (G : SignedGraph V) (h_card : Fintype.card V ≠ 4) {v w : V} (h : G.IsSwitchPartner v w) : G.netDegree v + G.netDegree w = 2 * G.edgeSign v w
signed_graph_vertex_switch_involutionIn LeanCombinatorics for TCS

Switching a signed graph twice at the same vertex returns the original signed graph.

theorem signed_graph_vertex_switch_involution {V : Type*} [DecidableEq V]
    (G : SignedGraph V) (v : V) : (G.switch v).switch v = G
simple_graph_cycle_power_dyadic_cover_class_tightIn LeanCombinatorics for TCS

In an optimal (m+1)-layer dyadic cover, each colour class of each layer has layer weight exactly equal to its cardinality.

theorem simple_graph_cycle_power_dyadic_cover_class_tight
    (m n : ℕ) [NeZero n] (hm : 1 ≤ m)
    (hn : 3 * (2 ^ m - 1) + 1 ≤ n)
    (c : Fin (m + 1) → ZMod n → ZMod n)
    (hc : ∀ s u v, u ≠ v → c s u = c s v →
      (simple_graph_cycle_power n (2 ^ m - 1)).Adj u v)
    (hcov : ∀ u v, (simple_graph_cycle_power n (2 ^ m - 1)).Adj u v →
      ∃ s, c s u = c s v)
    (s : Fin (m + 1)) (i : ZMod n) :
    (∑ j ∈ Finset.univ.filter (fun j => c s j = c s i),
      (2 * (if c s j = c s (j + ((2 ^ m - 1 : ℕ) : ZMod n)) then 1 else 0) +
        (Finset.range m).sum (fun k => if k = 0 then 0 else
          if c s j = c s (j + ((2 ^ m - 2 ^ k : ℕ) : ZMod n)) then 1 else 0)))
    = (Finset.univ.filter (fun j => c s j = c s i)).card
simple_graph_cycle_power_dyadic_cover_total_layer_weightIn LeanCombinatorics for TCS

The total dyadic layer weight of an optimal (m+1)-layer cover of C_n^{2^m-1} is exactly n(m+1): twice n for the endpoint-distance pairs plus once n for each of the m-1 other dyadic distances.

theorem simple_graph_cycle_power_dyadic_cover_total_layer_weight
    (m n : ℕ) [NeZero n] (hm : 1 ≤ m)
    (hn : 3 * (2 ^ m - 1) + 1 ≤ n)
    (c : Fin (m + 1) → ZMod n → ZMod n)
    (hc : ∀ s u v, u ≠ v → c s u = c s v →
      (simple_graph_cycle_power n (2 ^ m - 1)).Adj u v)
    (hcov : ∀ u v, (simple_graph_cycle_power n (2 ^ m - 1)).Adj u v →
      ∃ s, c s u = c s v) :
    (∑ s : Fin (m + 1), ∑ i : ZMod n,
      (2 * (if c s i = c s (i + ((2 ^ m - 1 : ℕ) : ZMod n)) then 1 else 0) +
        (Finset.range m).sum (fun j => if j = 0 then 0 else
          if c s i = c s (i + ((2 ^ m - 2 ^ j : ℕ) : ZMod n)) then 1 else 0)))
      = n * (m + 1)
simple_graph_cycle_power_dyadic_layer_weight_fiber_leIn LeanCombinatorics for TCS

In a clique labelling of the cycle power with dyadic bandwidth 2^m-1, the total layer weight of a single colour fibre is at most the size of that fibre.

theorem simple_graph_cycle_power_dyadic_layer_weight_fiber_le
    (m n : ℕ) [NeZero n] (hm : 1 ≤ m)
    (hn : 3 * (2 ^ m - 1) + 1 ≤ n)
    (c : ZMod n → ZMod n)
    (hc : ∀ u v, u ≠ v → c u = c v →
      (simple_graph_cycle_power n (2 ^ m - 1)).Adj u v)
    (q : ZMod n) :
    (∑ i ∈ Finset.univ.filter (fun i => c i = q),
      (2 * (if c i = c (i + ((2 ^ m - 1 : ℕ) : ZMod n)) then 1 else 0) +
        (Finset.range m).sum (fun j => if j = 0 then 0 else
          if c i = c (i + ((2 ^ m - 2 ^ j : ℕ) : ZMod n)) then 1 else 0)))
    ≤ (Finset.univ.filter (fun i => c i = q)).card
simple_graph_cycle_power_fifteen_cover_five_local_periodsIn LeanCombinatorics for TCS

In a tight five-layer equivalence cover of C_n^15, n at least 46, the class-type bits repeat after 8 positions and the layer chosen for the distance-15 class at each start repeats after 16 positions.

theorem simple_graph_cycle_power_fifteen_cover_five_local_periods (n : ℕ) [NeZero n] (hn : 46 ≤ n)
    (c : Fin 5 → ZMod n → ZMod n)
    (hc : ∀ s u v, u ≠ v → c s u = c s v → (simple_graph_cycle_power n 15).Adj u v)
    (hcov : ∀ u v, (simple_graph_cycle_power n 15).Adj u v → ∃ s, c s u = c s v)
    (h15 : ∀ i, ∃! s, c s i = c s (i + 15))
    (h14 : ∀ i, ∃! s, c s i = c s (i + 14))
    (h12 : ∀ i, ∃! s, c s i = c s (i + 12))
    (h8 : ∀ i, ∃! s, c s i = c s (i + 8))
    (hspan : ∀ s i, ∃ d : ℕ, d ≤ 15 ∧ c s (i - d) = c s (i - d + 15) ∧ c s (i - d) = c s i)
    (σ : ZMod n → Fin 5) (hσ : ∀ p, c (σ p) p = c (σ p) (p + 15)) :
    (∀ (p : ZMod n) (j : Fin 16),
      (c (σ (p + 8)) (p + 8) = c (σ (p + 8)) (p + 8 + ((j : ℕ) : ZMod n))) ↔
      (c (σ p) p = c (σ p) (p + ((j : ℕ) : ZMod n)))) ∧
      ∀ p, σ (p + 16) = σ p
simple_graph_cycle_power_fifteen_cover_five_tightIn LeanCombinatorics for TCS

Every five-layer equivalence cover of C_n^15, n at least 46, covers every distance-15,14,12,8 pair exactly once, and every class is spanned by a distance-15 pair.

theorem simple_graph_cycle_power_fifteen_cover_five_tight (n : ℕ) [NeZero n] (hn : 46 ≤ n)
    (c : Fin 5 → ZMod n → ZMod n)
    (hc : ∀ s u v, u ≠ v → c s u = c s v → (simple_graph_cycle_power n 15).Adj u v)
    (hcov : ∀ u v, (simple_graph_cycle_power n 15).Adj u v → ∃ s, c s u = c s v) :
    (∀ i, ∃! s, c s i = c s (i + 15)) ∧ (∀ i, ∃! s, c s i = c s (i + 14)) ∧
      (∀ i, ∃! s, c s i = c s (i + 12)) ∧ (∀ i, ∃! s, c s i = c s (i + 8)) ∧
      ∀ s i, ∃ d : ℕ, d ≤ 15 ∧ c s (i - d) = c s (i - d + 15) ∧ c s (i - d) = c s i
simple_graph_cycle_power_fifteen_cover_five_tight_dvdIn LeanCombinatorics for TCS

A tight five-layer equivalence cover of C_n^15, n at least 46, forces 16 to divide n.

theorem simple_graph_cycle_power_fifteen_cover_five_tight_dvd (n : ℕ) [NeZero n] (hn : 46 ≤ n)
    (c : Fin 5 → ZMod n → ZMod n)
    (hc : ∀ s u v, u ≠ v → c s u = c s v → (simple_graph_cycle_power n 15).Adj u v)
    (hcov : ∀ u v, (simple_graph_cycle_power n 15).Adj u v → ∃ s, c s u = c s v)
    (h15 : ∀ i, ∃! s, c s i = c s (i + 15))
    (h14 : ∀ i, ∃! s, c s i = c s (i + 14))
    (h12 : ∀ i, ∃! s, c s i = c s (i + 12))
    (h8 : ∀ i, ∃! s, c s i = c s (i + 8))
    (hspan : ∀ s i, ∃ d : ℕ, d ≤ 15 ∧ c s (i - d) = c s (i - d + 15) ∧ c s (i - d) = c s i) :
    16 ∣ n
simple_graph_cycle_power_fifteen_int_weight_le_cardIn LeanCombinatorics for TCS

For any finite set of integers S with diameter at most 15, the weighted count of forward pairs at distances 15, 14, 12, 8 with weights 2, 1, 1, 1 is at most the cardinality of S.

theorem simple_graph_cycle_power_fifteen_int_weight_le_card (S : Finset ℤ)
    (hdiam : ∀ a ∈ S, ∀ b ∈ S, |a - b| ≤ 15) :
    ∑ e ∈ S, (2 * (if e + 15 ∈ S then 1 else 0) + (if e + 14 ∈ S then 1 else 0)
      + (if e + 12 ∈ S then 1 else 0) + (if e + 8 ∈ S then 1 else 0)) ≤
      Finset.card S
simple_graph_cycle_power_fifteen_int_weight_le_card_of_subset_IccIn LeanCombinatorics for TCS

For a subset S of Icc 0 15 in the integers, the weighted count of forward pairs at distances 15, 14, 12, 8 with weights 2, 1, 1, 1 is at most the cardinality of S.

theorem simple_graph_cycle_power_fifteen_int_weight_le_card_of_subset_Icc (S : Finset ℤ)
    (hS : S ⊆ Finset.Icc 0 15) :
    ∑ e ∈ S, (2 * (if e + 15 ∈ S then 1 else 0) + (if e + 14 ∈ S then 1 else 0)
      + (if e + 12 ∈ S then 1 else 0) + (if e + 8 ∈ S then 1 else 0)) ≤
      Finset.card S
simple_graph_cycle_power_fifteen_layer_weight_fiber_leIn LeanCombinatorics for TCS

For any label class in C_n^15 with n ≥ 46, the fiber sum of the layer weights is at most the cardinality of the fiber.

theorem simple_graph_cycle_power_fifteen_layer_weight_fiber_le (n : ℕ) [NeZero n] (hn : 46 ≤ n)
    (c : ZMod n → ZMod n)
    (hc : ∀ u v, u ≠ v → c u = c v → (simple_graph_cycle_power n 15).Adj u v)
    (ℓ : ZMod n) :
    ∑ i ∈ Finset.univ.filter (fun x => c x = ℓ),
      (2 * (if c i = c (i + 15) then 1 else 0) + (if c i = c (i + 14) then 1 else 0)
        + (if c i = c (i + 12) then 1 else 0) + (if c i = c (i + 8) then 1 else 0)) ≤
      Finset.card (Finset.univ.filter (fun x => c x = ℓ))
simple_graph_cycle_power_fifteen_layer_weight_leIn LeanCombinatorics for TCS

For a clique partition of C_n^15 with n at least 46, the total weighted count of same-class forward pairs at distances 15, 14, 12, 8, weighted 2, 1, 1, 1, is at most n.

theorem simple_graph_cycle_power_fifteen_layer_weight_le (n : ℕ) [NeZero n] (hn : 46 ≤ n)
    (c : ZMod n → ZMod n)
    (hc : ∀ u v, u ≠ v → c u = c v → (simple_graph_cycle_power n 15).Adj u v) :
    ∑ i : ZMod n, (2 * (if c i = c (i + 15) then 1 else 0) + (if c i = c (i + 14) then 1 else 0)
      + (if c i = c (i + 12) then 1 else 0) + (if c i = c (i + 8) then 1 else 0)) ≤ n
simple_graph_not_has_equivalence_cover_cycle_power_fifteen_of_not_dvdIn LeanCombinatorics for TCS

For n at least 46 not divisible by 16, C_n^15 has no equivalence cover by five layers; this is the lower-bound half of the k = 15 case of OP-205.

theorem simple_graph_not_has_equivalence_cover_cycle_power_fifteen_of_not_dvd (n : ℕ) (hn : 46 ≤ n)
    (h16 : ¬ 16 ∣ n) : ¬ simple_graph_has_equivalence_cover (simple_graph_cycle_power n 15) 5
simple_graph_ramsey_three_ten_forty_of_degree_lt_nineNeeds helpCombinatorics for TCS

A triangle-free simple graph on 40 vertices with maximum degree at most 9, having a vertex of degree less than 9 whose closed non-neighbourhood satisfies 2·e(outer) + 18·deg v ≤ 360, has an independent set of 10 vertices (its complement is not 10-clique-free). This is the non-regular branch; it is open.

theorem simple_graph_ramsey_three_ten_forty_of_degree_lt_nine (g : SimpleGraph (Fin 40))
    [DecidableRel g.Adj] (htri : g.CliqueFree 3) (hmax : ∀ v, g.degree v ≤ 9)
    (hlow : ∃ v, g.degree v < 9 ∧
      2 * (g.induce {u | u ≠ v ∧ ¬ g.Adj v u}).edgeFinset.card + 18 * g.degree v ≤ 360) :
    ¬ gᶜ.CliqueFree 10
simple_graph_ramsey_three_ten_forty_of_max_degree_le_nineIn LeanCombinatorics for TCS

Every simple graph on 40 vertices with maximum degree at most 9 contains a triangle or an independent set of 10 vertices.

theorem simple_graph_ramsey_three_ten_forty_of_max_degree_le_nine (g : SimpleGraph (Fin 40))
    [DecidableRel g.Adj] (h : ∀ v, g.degree v ≤ 9) :
    ¬ g.CliqueFree 3 ∨ ¬ gᶜ.CliqueFree 10
simple_graph_ramsey_three_ten_forty_of_nine_regularNeeds helpCombinatorics for TCS

A triangle-free simple graph on 40 vertices all of whose vertex degrees equal 9 has an independent set of 10 vertices (its complement is not 10-clique-free). This is the 9-regular core case of R(3,10) ≤ 40; it is open, since R(3,10) is only known to lie in [40,41].

theorem simple_graph_ramsey_three_ten_forty_of_nine_regular (g : SimpleGraph (Fin 40))
    [DecidableRel g.Adj] (htri : g.CliqueFree 3) (hreg : ∀ v, g.degree v = 9) :
    ¬ gᶜ.CliqueFree 10
simplicial_dual_graph_diam_of_disjoint_minimal_nonfacesIn LeanCombinatorics for TCS

In an abstract simplicial complex Δ with pure facet size d and connected dual graph, if the minimal nonfaces are pairwise disjoint and number s, then the diameter of the dual graph is s.

theorem simplicial_dual_graph_diam_of_disjoint_minimal_nonfaces {V : Type*} [DecidableEq V] [Fintype V] (Δ : AbstractSimplicialComplex V) (n d s : ℕ) (hn : Fintype.card V = n) (hpure : simplicial_is_pure Δ d) (hconn : (simplicial_dual_graph Δ d).Connected) (M_set : Finset (Finset V)) (hs : M_set.card = s) (hM_all : ∀ M, simplicial_is_minimal_nonface Δ M ↔ M ∈ M_set) (hM_disj : ∀ M₁ ∈ M_set, ∀ M₂ ∈ M_set, M₁ ≠ M₂ → Disjoint M₁ M₂) : (simplicial_dual_graph Δ d).diam = s
simplicial_dual_graph_dist_of_same_traceIn LeanCombinatorics for TCS

Let Δ be an abstract simplicial complex on an n-element vertex set V, pure of facet size d, with connected dual graph. Suppose there is a subset X ⊆ V such that every pair of distinct minimal nonfaces M, M' of Δ satisfies M ∩ M' ⊆ X. Then any two facets F₁, F₂ of Δ having the same trace on X (that is, F₁ ∩ X = F₂ ∩ X) are at distance at most n - d in the dual graph of Δ.

theorem simplicial_dual_graph_dist_of_same_trace
    {V : Type*} [DecidableEq V] [Fintype V]
    (Δ : AbstractSimplicialComplex V) (n d : ℕ)
    (hn : Fintype.card V = n) (hpure : simplicial_is_pure Δ d)
    (hconn : (simplicial_dual_graph Δ d).Connected)
    (X : Finset V)
    (hX : ∀ M M' : Finset V, simplicial_is_minimal_nonface Δ M →
      simplicial_is_minimal_nonface Δ M' → M ≠ M' → M ∩ M' ⊆ X)
    (F₁ F₂ : {F : Finset V // simplicial_is_facet Δ F})
    (htrace : F₁.1 ∩ X = F₂.1 ∩ X) :
    (simplicial_dual_graph Δ d).dist F₁ F₂ ≤ n - d
simplicial_normal_of_disjoint_minimal_nonfacesIn LeanCombinatorics for TCS

In an abstract simplicial complex Δ with pure facet size d and connected dual graph, if the minimal nonfaces are pairwise disjoint, then Δ is normal.

theorem simplicial_normal_of_disjoint_minimal_nonfaces {V : Type*} [DecidableEq V] [Fintype V] (Δ : AbstractSimplicialComplex V) (n d s : ℕ) (hn : Fintype.card V = n) (hpure : simplicial_is_pure Δ d) (hconn : (simplicial_dual_graph Δ d).Connected) (M_set : Finset (Finset V)) (hs : M_set.card = s) (hM_all : ∀ M, simplicial_is_minimal_nonface Δ M ↔ M ∈ M_set) (hM_disj : ∀ M₁ ∈ M_set, ∀ M₂ ∈ M_set, M₁ ≠ M₂ → Disjoint M₁ M₂) : simplicial_is_normal Δ d
single_facet_is_cohen_macaulayIn LeanCombinatorics for TCS

The simplicial complex consisting of the single triangle {0,1,2} on Fin 3 is Cohen-Macaulay over every field: it is pure of dimension 2, its 1-skeleton is complete, all its vertex links are complete graphs, and being a single disk it has H_1 = 0.

theorem single_facet_is_cohen_macaulay (k : Type*) [Field k] :
    is_cohen_macaulay_two_complex ({Finset.univ} : Finset (Finset (Fin 3))) k
single_interval_gap_certificateIn LeanCombinatorics for TCS

For every t in [0, 1/2], the nineteen points −t·k²−β·k leave a circular gap of length greater than min(t, 1/2−t) for some real β.

theorem single_interval_gap_certificate (t : ℝ) (h0 : (0 : ℝ) ≤ t) (h1 : t ≤ ((1 : ℝ) / 2)) : ∃ β a b : ℝ, min t (((1 : ℝ) / 2) - t) < b - a ∧ ∀ k : Fin 19, ∃ z : ℤ, b ≤ -(k.val : ℝ)^2 * t - β * (k.val : ℝ) + z ∧ -(k.val : ℝ)^2 * t - β * (k.val : ℝ) + z ≤ a + 1
single_interval_gap_five_sixteenths_to_three_eighthsIn LeanCombinatorics for TCS

On t ∈ [5/16, 3/8), the nineteen points −t·k²−β·k leave a circular gap of length greater than 1/2 − t for some real β.

theorem single_interval_gap_five_sixteenths_to_three_eighths (t : ℝ) (hl : ((5 : ℝ) / 16) ≤ t) (hu : t < ((3 : ℝ) / 8)) : ∃ β a b : ℝ, ((1 : ℝ) / 2) - t < b - a ∧ ∀ k : Fin 19, ∃ z : ℤ, b ≤ -(k.val : ℝ)^2 * t - β * (k.val : ℝ) + z ∧ -(k.val : ℝ)^2 * t - β * (k.val : ℝ) + z ≤ a + 1
single_interval_gap_quarter_to_five_sixteenthsIn LeanCombinatorics for TCS

On t ∈ [1/4, 5/16), the nineteen points −t·k²−β·k leave a circular gap of length greater than 1/2 − t for some real β.

theorem single_interval_gap_quarter_to_five_sixteenths (t : ℝ) (hl : ((1 : ℝ) / 4) ≤ t) (hu : t < ((5 : ℝ) / 16)) : ∃ β a b : ℝ, ((1 : ℝ) / 2) - t < b - a ∧ ∀ k : Fin 19, ∃ z : ℤ, b ≤ -(k.val : ℝ)^2 * t - β * (k.val : ℝ) + z ∧ -(k.val : ℝ)^2 * t - β * (k.val : ℝ) + z ≤ a + 1
single_interval_gap_scale_reductionIn LeanCombinatorics for TCS

If the nineteen points at the reduced scale t = frac(2d)/2 leave a circular gap of length > s (in the arc form b ≤ −k²t−βk+z ≤ a+1), then the nineteen points at the original scale d leave a circular gap of length > s in the same arc form.

theorem single_interval_gap_scale_reduction (d s : ℝ) (hd : 0 < d) (h : ∃ β a b : ℝ, s < b - a ∧ ∀ k : Fin 19, ∃ z : ℤ, b ≤ -(k.val : ℝ)^2 * (Int.fract (2 * d) / 2) - β * (k.val : ℝ) + z ∧ -(k.val : ℝ)^2 * (Int.fract (2 * d) / 2) - β * (k.val : ℝ) + z ≤ a + 1) : ∃ β a b : ℝ, s < b - a ∧ ∀ k : Fin 19, ∃ z : ℤ, b ≤ -(k.val : ℝ)^2 * d - β * (k.val : ℝ) + z ∧ -(k.val : ℝ)^2 * d - β * (k.val : ℝ) + z ≤ a + 1
single_interval_gap_three_eighths_to_halfIn LeanCombinatorics for TCS

On t ∈ [3/8, 1/2], the nineteen points −t·k²−β·k leave a circular gap of length greater than 1/2 − t for some real β.

theorem single_interval_gap_three_eighths_to_half (t : ℝ) (hl : ((3 : ℝ) / 8) ≤ t) (hu : t ≤ ((1 : ℝ) / 2)) : ∃ β a b : ℝ, ((1 : ℝ) / 2) - t < b - a ∧ ∀ k : Fin 19, ∃ z : ℤ, b ≤ -(k.val : ℝ)^2 * t - β * (k.val : ℝ) + z ∧ -(k.val : ℝ)^2 * t - β * (k.val : ℝ) + z ≤ a + 1
single_interval_gap_two_elevenths_to_quarterIn LeanCombinatorics for TCS

On t ∈ [2/11, 1/4), the nineteen points −t·k²−β·k leave a circular gap of length greater than t for some real β.

theorem single_interval_gap_two_elevenths_to_quarter (t : ℝ) (hl : ((2 : ℝ) / 11) ≤ t) (hu : t < ((1 : ℝ) / 4)) : ∃ β a b : ℝ, t < b - a ∧ ∀ k : Fin 19, ∃ z : ℤ, b ≤ -(k.val : ℝ)^2 * t - β * (k.val : ℝ) + z ∧ -(k.val : ℝ)^2 * t - β * (k.val : ℝ) + z ≤ a + 1
single_track_gray_code_of_necklace_liftIn LeanCombinatorics for TCS

Given n prime ≥ 3, m = (2^n−2)/n with m*n = 2^n−2, a unit-distance chain u of nonconstant words in pairwise distinct necklaces, and a closing shift σ (0<σ<n) taking u_0 to a word one flip from u_{m−1}, the interleaved sequence w defined by w(k·m+i) = ρ^{kσ}(u_i) is a single-track Gray code of length n and period 2^n−2, with equally spaced head positions h_j = c_j·m (c_j ≡ −j·σ^{-1} mod n) that are multiples of m and pairwise distinct mod 2^n−2.

theorem single_track_gray_code_of_necklace_lift (n : ℕ) (hn : n.Prime) (hge : 3 ≤ n)
    (hmul : ((2 ^ n - 2) / n) * n = 2 ^ n - 2)
    (u : ℕ → ℕ) (σ : ℕ)
    (hu : ∀ i < (2 ^ n - 2) / n, u i < 2 ^ n ∧ u i ≠ 0 ∧ u i ≠ 2 ^ n - 1)
    (hne : ∀ i < (2 ^ n - 2) / n, ∀ j < (2 ^ n - 2) / n, i ≠ j → ¬ bitword_is_rotation n (u i) (u j))
    (hstep : ∀ i < (2 ^ n - 2) / n - 1, ∃ k < n, u i ^^^ u (i + 1) = 2 ^ k)
    (hσ : 0 < σ ∧ σ < n)
    (hclose : ∃ k < n, (bitword_rotate n)^[σ] (u 0) ^^^ u ((2 ^ n - 2) / n - 1) = 2 ^ k) :
    ∃ w : ℕ → ℕ,
      is_single_track_gray_code n (2 ^ n - 2) w ∧
      ∃ h : ℕ → ℕ, h 0 = 0 ∧
        (∀ t, ∀ j < n, Nat.testBit (w t) j = Nat.testBit (w (t + h j)) 0) ∧
        (∀ j < n, ((2 ^ n - 2) / n) ∣ h j) ∧
        ∀ j₁ < n, ∀ j₂ < n, h j₁ % (2 ^ n - 2) = h j₂ % (2 ^ n - 2) → j₁ = j₂
song_aux_matching_cardIn LeanCombinatorics for TCS

The auxiliary matching consists of exactly two edges in each of the k^2 blocks, and different blocks give disjoint sets of corners, hence |N| = 2k^2.

theorem song_aux_matching_card (k : ℕ) (M : Finset (Sym2 (Fin (2 * k) × Fin (2 * k)))) :
    (song_aux_matching k M).card = 2 * k ^ 2
song_aux_matching_coversIn LeanCombinatorics for TCS

Every vertex of the (2k)x(2k) grid is an endpoint of (exactly) one edge of the auxiliary matching N: in each block the two chosen N-edges cover the four corners.

theorem song_aux_matching_covers (k : ℕ) (M : Finset (Sym2 (Fin (2 * k) × Fin (2 * k)))) :
    ∀ x : Fin (2 * k) × Fin (2 * k), ∃ e ∈ song_aux_matching k M, x ∈ e
song_aux_matching_disjointIn LeanCombinatorics for TCS

For an admissible selection M no edge of the auxiliary matching belongs to M: an N-edge of a block is either horizontal (ab or cd), which is never a unit diagonal because a unit diagonal changes both coordinates, or it is one of the two diagonals of the block, and the branch condition guarantees that the diagonal used is not in M.

theorem song_aux_matching_disjoint (k : ℕ) (M : Finset (Sym2 (Fin (2 * k) × Fin (2 * k))))
    (hM : is_admissible_diagonal_selection k M) : Disjoint M (song_aux_matching k M)
song_aux_matching_perfectIn LeanCombinatorics for TCS

The auxiliary matching pairs up all four corners of every block, so the edges of N form a perfect matching of the grid V_{2k-1}: every vertex is incident with exactly one N-edge.

theorem song_aux_matching_perfect (k : ℕ) (M : Finset (Sym2 (Fin (2 * k) × Fin (2 * k)))) :
    ∀ x : Fin (2 * k) × Fin (2 * k),
      ∃! e : Sym2 (Fin (2 * k) × Fin (2 * k)), e ∈ song_aux_matching k M ∧ x ∈ e
song_block_infrastructureIn LeanCombinatorics for TCS

The block projection and the corner label are inverse to the block parametrisation: pi(2i+u, 2j+v) = (i,j), the label of (2i+u, 2j+v) is (u,v), and every grid vertex x is the corner of its own block indexed by its label.

theorem song_block_infrastructure (k : ℕ) :
    (∀ (i j : Fin k) (u v : Fin 2), song_block_proj k (song_block_vertex k i j u v) = (i, j)) ∧
    (∀ (i j : Fin k) (u v : Fin 2), song_corner_label k (song_block_vertex k i j u v) = (u, v)) ∧
    (∀ x : Fin (2 * k) × Fin (2 * k),
      song_block_vertex k (song_block_proj k x).1 (song_block_proj k x).2
        (song_corner_label k x).1 (song_corner_label k x).2 = x)
song_component_block_chainIn LeanCombinatorics for TCS

For every connected component C of H there is a nonempty sequence of blocks c_0, ..., c_{n-1} listing the blocks of all vertices of C, such that consecutive entries are distinct, the column never decreases and grows by at most one per step, and the row is monotone (either never decreases, or never increases) with steps of size at most one.

theorem song_component_block_chain (k : ℕ) (M : Finset (Sym2 (Fin (2 * k) × Fin (2 * k))))
    (hM : is_admissible_diagonal_selection k M) (C : (song_edge_graph k M).ConnectedComponent) :
    ∃ (n : ℕ) (hn : 1 ≤ n) (c : Fin n → Fin k × Fin k),
      (∀ x : Fin (2 * k) × Fin (2 * k), x ∈ C.supp → ∃ i, song_block_proj k x = c i) ∧
      (∀ (i : ℕ) (h : i + 1 < n), c ⟨i, by omega⟩ ≠ c ⟨i + 1, h⟩) ∧
      (∀ (i : ℕ) (h : i + 1 < n),
        (c ⟨i, by omega⟩).2.val ≤ (c ⟨i + 1, h⟩).2.val ∧
        (c ⟨i + 1, h⟩).2.val ≤ (c ⟨i, by omega⟩).2.val + 1) ∧
      ((∀ (i : ℕ) (h : i + 1 < n),
          (c ⟨i, by omega⟩).1.val ≤ (c ⟨i + 1, h⟩).1.val ∧
          (c ⟨i + 1, h⟩).1.val ≤ (c ⟨i, by omega⟩).1.val + 1) ∨
       (∀ (i : ℕ) (h : i + 1 < n),
          (c ⟨i + 1, h⟩).1.val ≤ (c ⟨i, by omega⟩).1.val ∧
          (c ⟨i, by omega⟩).1.val ≤ (c ⟨i + 1, h⟩).1.val + 1))
song_component_projected_walkIn LeanCombinatorics for TCS

For every connected component C of H there are blocks a, b in Fin k × Fin k and a simple path w in P_k □ P_k from a to b whose length is the graph distance between a and b and whose vertex set contains the block of every original vertex of C.

theorem song_component_projected_walk (k : ℕ) (M : Finset (Sym2 (Fin (2 * k) × Fin (2 * k))))
    (hM : is_admissible_diagonal_selection k M) (C : (song_edge_graph k M).ConnectedComponent) :
    ∃ (a b : Fin k × Fin k)
      (w : ((SimpleGraph.pathGraph k) □ (SimpleGraph.pathGraph k)).Walk a b),
      w.IsPath ∧
      w.length = ((SimpleGraph.pathGraph k) □ (SimpleGraph.pathGraph k)).dist a b ∧
      (∀ x : Fin (2 * k) × Fin (2 * k), x ∈ C.supp → song_block_proj k x ∈ w.support)
song_degree_one_countIn LeanCombinatorics for TCS

In the alternating graph H the vertices of degree one are exactly those not covered by the selection M; since M is a matching on the 4k^2 grid vertices this gives exactly 4k^2 - 2|M| vertices of degree one.

theorem song_degree_one_count (k : ℕ) (M : Finset (Sym2 (Fin (2 * k) × Fin (2 * k))))
    (hM : is_admissible_diagonal_selection k M) :
    Set.ncard {v : Fin (2 * k) × Fin (2 * k) |
        1 = Set.ncard ((song_edge_graph k M).neighborSet v)} = 4 * k ^ 2 - 2 * M.card
song_edge_graph_acyclicIn LeanCombinatorics for TCS

The alternating graph H = (V_{2k-1}, M ∪ N) has no cycle; along a cycle the block potential of a type A component (i+j) resp. a type B component (j-i) would be nondecreasing and would strictly increase on the external edges.

theorem song_edge_graph_acyclic (k : ℕ) (M : Finset (Sym2 (Fin (2 * k) × Fin (2 * k))))
    (hM : is_admissible_diagonal_selection k M) : (song_edge_graph k M).IsAcyclic
song_edge_graph_component_cardIn LeanCombinatorics for TCS

The alternating graph H = (V_{2k-1}, M ∪ N) has exactly 2k^2 - |M| connected components, and each component is a path with at least one edge, hence has exactly two vertices of degree one.

theorem song_edge_graph_component_card (k : ℕ) (M : Finset (Sym2 (Fin (2 * k) × Fin (2 * k))))
    (hM : is_admissible_diagonal_selection k M) :
    Fintype.card (song_edge_graph k M).ConnectedComponent = 2 * k ^ 2 - M.card
song_edge_graph_degree_le_twoIn LeanCombinatorics for TCS

In the alternating graph H every vertex has at most two neighbours: M is a matching and N is a perfect matching, so a vertex is an endpoint of at most one M-edge and exactly one N-edge, and the two matchings are edge-disjoint.

theorem song_edge_graph_degree_le_two (k : ℕ) (M : Finset (Sym2 (Fin (2 * k) × Fin (2 * k))))
    (hM : is_admissible_diagonal_selection k M) (v : Fin (2 * k) × Fin (2 * k)) :
    Set.ncard ((song_edge_graph k M).neighborSet v) ≤ 2
song_edge_graph_min_degree_oneIn LeanCombinatorics for TCS

Every vertex of H = (V_{2k-1}, M ∪ N) has at least one neighbour, since it is covered by the auxiliary matching N.

theorem song_edge_graph_min_degree_one (k : ℕ) (M : Finset (Sym2 (Fin (2 * k) × Fin (2 * k))))
    (v : Fin (2 * k) × Fin (2 * k)) : 1 ≤ Set.ncard ((song_edge_graph k M).neighborSet v)
song_edge_route_type_uniformIn LeanCombinatorics for TCS

For every edge of the alternating graph H the two endpoints have the same route type (both type A or both type B), which is the vertex-level content of Lemma 3.1 of arXiv:2610.33042.

theorem song_edge_route_type_uniform (k : ℕ) (M : Finset (Sym2 (Fin (2 * k) × Fin (2 * k))))
    (hM : is_admissible_diagonal_selection k M) {x y : Fin (2 * k) × Fin (2 * k)}
    (h : (song_edge_graph k M).Adj x y) : song_route_type k M x = song_route_type k M y
span_erase_of_subset_biUnionIn LeanCombinatorics for TCS

If A ∈ S and A is a subset of the union of S.erase A, then the union of S.erase A equals the union of S.

theorem span_erase_of_subset_biUnion {α : Type*} [DecidableEq α]
    {S : Finset (Finset α)} {A : Finset α} (hA : A ∈ S)
    (hcov : A ⊆ (S.erase A).biUnion id) :
    (S.erase A).biUnion id = S.biUnion id
spectral_realization_and_support_of_finite_orthogonal_linearization_coefficientsIn LeanCombinatorics for TCS

Let N ≥ 1 and let a, b, c : Fin (N + 1) → ℝ satisfy condition (2.1): a 0 = 1, b 0 = 0, c 0 = 0, a N = 0, a i + b i + c i = 1 for all i, a i > 0 for i.val < N, and c i > 0 for 0 < i.val. Then the tridiagonal recurrence matrix J has N + 1 distinct real eigenvalues, and there exists a positive orthogonality measure on these N + 1 points with respect to which R_0, ..., R_N are orthogonal (satisfying is_positive_orthogonality_measure). Furthermore, the linearization coefficients g(m, n; k) = [R_m(J)]_{n, k} vanish unless |m - n| ≤ k ≤ min(m + n, N).

theorem spectral_realization_and_support_of_finite_orthogonal_linearization_coefficients
    (N : ℕ) (hN : 1 ≤ N) (a b c : Fin (N + 1) → ℝ)
    (hrec : satisfies_recurrence_2_1 N a b c) :
    (∃ (S : Finset ℝ) (w : ℝ → ℝ),
      S.card = N + 1 ∧
      (∀ x ∈ S, Module.End.HasEigenvalue (Matrix.toLin' (recurrence_matrix N a b c)) x) ∧
      is_positive_orthogonality_measure N (recurrence_poly N a b c) S w) ∧
    (∀ (m n k : Fin (N + 1)),
      linearization_coeff N a b c m n k ≠ 0 →
        |(m.val : ℤ) - (n.val : ℤ)| ≤ (k.val : ℤ) ∧ k.val ≤ min (m.val + n.val) N)
spherical_mod29_card_le_sevenIn LeanCombinatorics for TCS

The maximum independent set in the Cayley graph on ZMod 29 avoiding connection set {7, 8, 13, 14, 15, 16, 21, 22} has size at most 7.

theorem spherical_mod29_card_le_seven (S : Finset (ZMod 29))
    (hdiff : ∀ x ∈ S, ∀ y ∈ S, x ≠ y →
      x - y ≠ 7 ∧ x - y ≠ 8 ∧ x - y ≠ 13 ∧ x - y ≠ 14 ∧
      x - y ≠ 15 ∧ x - y ≠ 16 ∧ x - y ≠ 21 ∧ x - y ≠ 22) :
    S.card ≤ 7
spherical_mod29_forbidden_diff_of_hrIn LeanCombinatorics for TCS

Setting z = x and y = x in hr forces x - y to avoid the 8 differences 7, 8, 13, 14, 15, 16, 21, 22 mod 29.

theorem spherical_mod29_forbidden_diff_of_hr (S : Finset (ZMod 29))
    (hr : ∀ x y z : ZMod 29, x ∈ S → y ∈ S → z ∈ S → x - 2*y + z ≠ 13 ∧ x - 2*y + z ≠ 14 ∧ x - 2*y + z ≠ 15)
    (x y : ZMod 29) (hx : x ∈ S) (hy : y ∈ S) :
    x - y ≠ 7 ∧ x - y ≠ 8 ∧ x - y ≠ 13 ∧ x - y ≠ 14 ∧ x - y ≠ 15 ∧ x - y ≠ 16 ∧ x - y ≠ 21 ∧ x - y ≠ 22
spherical_mod29_small_subset_disjoint_quadIn LeanCombinatorics for TCS

Any subset of ZMod 29 of size at most 7 satisfying hr is disjoint from some quadratic sequence 7k² + ak + b for k in 0..16.

theorem spherical_mod29_small_subset_disjoint_quad (S : Finset (ZMod 29))
    (hcard : S.card ≤ 7)
    (hr : ∀ x y z : ZMod 29, x ∈ S → y ∈ S → z ∈ S → x - 2*y + z ≠ 13 ∧ x - 2*y + z ≠ 14 ∧ x - 2*y + z ≠ 15) :
    ∃ a b : ZMod 29, ∀ k : Fin 17, 7 * (k.val : ZMod 29)^2 + a * k.val + b ∉ S
ssyt_exists_standardizationIn LeanCombinatorics for TCS

For any corner-crossed finite diagram D and any semi-standard filling M on D, there exists a standard Young tableau T on D such that M belongs to the standardization block of T.

theorem ssyt_exists_standardization
    (D : Finset (ℕ × ℕ)) (hD : is_corner_crossed D)
    (M : D → ℕ) (hM : is_semistandard D M) :
    ∃ T : StandardYoungTableau D, M ∈ standardization_block T
standardization_block_subset_ssytIn LeanCombinatorics for TCS

For a corner-crossed finite diagram D : Finset (ℕ × ℕ) and any standard Young tableau T on D, every filling M : D → ℕ in standardization_block T satisfies is_semistandard D M.

theorem standardization_block_subset_ssyt
    (D : Finset (ℕ × ℕ)) (hD : is_corner_crossed D)
    (T : StandardYoungTableau D) (M : D → ℕ) (hM : M ∈ standardization_block T) :
    is_semistandard D M
standardization_blocks_pairwise_disjointIn LeanCombinatorics for TCS

For a corner-crossed finite diagram D : Finset (ℕ × ℕ), if two standard Young tableaux T₁, T₂ on D have a common filling M in their standardization blocks, then T₁ = T₂.

theorem standardization_blocks_pairwise_disjoint
    (D : Finset (ℕ × ℕ)) (hD : is_corner_crossed D)
    (T₁ T₂ : StandardYoungTableau D) (M : D → ℕ)
    (h₁ : M ∈ standardization_block T₁) (h₂ : M ∈ standardization_block T₂) :
    T₁ = T₂
strict_counterexample_family_canonical_star_boundIn LeanCombinatorics for TCS

For every integer t ≥ 1, the family of partitions of t + 56 obtained by adding t - 1 ones to each partition in A_57 is t-intersecting and has 527254 members, strictly exceeding the size 526823 of the canonical t-star T_{t+56, t}.

theorem strict_counterexample_family_canonical_star_bound (t : ℕ) (ht : 1 ≤ t) :
    is_t_intersecting_partition_family t (lifted_partition_family_57 t ht) ∧
    (lifted_partition_family_57 t ht).card = 527254 ∧
    (canonical_partition_star (t + 56) t).card = 526823 ∧
    (canonical_partition_star (t + 56) t).card < (lifted_partition_family_57 t ht).card
strong_elimination_iff_compatible_and_union_min_of_not_mem_emptyIn LeanCombinatorics for TCS

Let C be a collection of subsets of a finite set V such that the empty set is not in C. Then C satisfies the strong elimination property if and only if C is compatible and every nonempty set in C can be written as a union of sets in collection_min_nonempty C (the minimal nonempty sets in C).

theorem strong_elimination_iff_compatible_and_union_min_of_not_mem_empty {V : Type*} [DecidableEq V]
    (C : Finset (Finset V)) (h_empty : ∅ ∉ C) :
    has_strong_elimination C ↔
      is_compatible_collection C ∧
        ∀ F ∈ C, F.Nonempty → ∃ U ⊆ collection_min_nonempty C, F = U.biUnion id
strong_elimination_of_compatible_and_union_minIn LeanCombinatorics for TCS

If a finite collection C of finite sets does not contain the empty set, is compatible, and each of its nonempty sets is a union of sets in collection_min_nonempty C, then C has the strong elimination property.

theorem strong_elimination_of_compatible_and_union_min {V : Type*} [DecidableEq V]
    {C : Finset (Finset V)} (h_empty : ∅ ∉ C) (h_compat : is_compatible_collection C)
    (h_union : ∀ F ∈ C, F.Nonempty → ∃ U ⊆ collection_min_nonempty C, F = U.biUnion id) :
    has_strong_elimination C
sum_bias_sq_le_of_card_eq_two_pow_density_shortIn LeanCombinatorics for TCS

Let $F \subseteq (\mathrm{Fin}\ n \to \mathrm{Bool})$ with $|F| = 2^m$, where $m \le n$ and $n - m \le 4$ (so the density of $F$ is at least $2^{-4}$). Then the coordinate biases $b_i = 1 - 2p_i/|F|$ satisfy $\sum_i b_i^2 \le n - m$; equivalently the level-1 Fourier weight of the indicator of $F$ is at most $(n-m)/4 \cdot \mu^2$-scale, i.e. $W_1(1_F) \le \frac{n-m}{4}$, and for $n - m = 4$ exactly $W_1(1_F) \le 1/64$.

theorem sum_bias_sq_le_of_card_eq_two_pow_density_short
    (n m : ℕ) (hm : m ≤ n) (hclose : n - m ≤ 4) (F : Finset (Fin n → Bool))
    (hcard : F.card = 2 ^ m) :
    ∑ i : Fin n,
      ((1 : ℝ) - 2 * ((F.filter (fun x => x i = true)).card : ℝ) / (F.card : ℝ)) ^ 2 ≤ (n : ℝ) - m
sum_diagonal_kernel_mul_mulIn LeanCombinatorics for TCS

For any finite set F with decidable equality, scalar lambda : ℝ, kernel K : α → α → ℝ satisfying K x y = (if x = y then lambda else 0) for all x, y ∈ F, and function z : α → ℝ, the double sum ∑ x ∈ F, ∑ y ∈ F, K x y * z x * z y equals lambda * ∑ x ∈ F, (z x)^2.

theorem sum_diagonal_kernel_mul_mul {α : Type*} [DecidableEq α] (F : Finset α)
    (K : α → α → ℝ) (lambda : ℝ)
    (hK : ∀ x ∈ F, ∀ y ∈ F, K x y = if x = y then lambda else 0)
    (z : α → ℝ) :
    (∑ x ∈ F, ∑ y ∈ F, K x y * z x * z y) = lambda * ∑ x ∈ F, (z x) ^ 2
sum_hamming_kernel_mul_mulIn LeanCombinatorics for TCS

For any natural number n, finite subset F ⊆ ℝ^n, coefficient family k : Finset (Fin n) → ℝ, and function z : (Fin n → ℝ) → ℝ, the double sum ∑ x ∈ F, ∑ y ∈ F, (∑ T, k T * (∏ i ∈ T, x i) * (∏ i ∈ T, y i)) * z x * z y equals ∑ T, k T * (∑ x ∈ F, z x * (∏ i ∈ T, x i))^2.

theorem sum_hamming_kernel_mul_mul {n : ℕ} (F : Finset (Fin n → ℝ))
    (k : Finset (Fin n) → ℝ) (z : (Fin n → ℝ) → ℝ) :
    (∑ x ∈ F, ∑ y ∈ F, (∑ T : Finset (Fin n), k T * (∏ i ∈ T, x i) * (∏ i ∈ T, y i)) * z x * z y) =
      ∑ T : Finset (Fin n), k T * (∑ x ∈ F, z x * (∏ i ∈ T, x i)) ^ 2
sum_ordered_pair_sum_countIn LeanCombinatorics for TCS

Double counting: the restricted representation counts ν_A(x), summed over all x in G, equal |A|(|A| - 1), the number of ordered pairs of distinct elements of A.

theorem sum_ordered_pair_sum_count {G : Type*} [AddCommGroup G] [Fintype G] [DecidableEq G] (A : Finset G) : ∑ x : G, orderedPairSumCount A x = A.card * (A.card - 1)
sumset_collision_iff_null_vectorIn LeanCombinatorics for TCS

Let k ≥ 3 and h ≥ 2, and let A : Fin k → ℤ. There exist distinct x, y ∈ sumset_sum_vectors h k such that dotProduct x A = dotProduct y A if and only if there exists d ∈ sumset_null_vectors h k such that dotProduct d A = 0.

theorem sumset_collision_iff_null_vector
    (k h : ℕ) (hk : 3 ≤ k) (hh : 2 ≤ h) (A : Fin k → ℤ) :
    (∃ x ∈ sumset_sum_vectors h k, ∃ y ∈ sumset_sum_vectors h k, x ≠ y ∧ dotProduct x A = dotProduct y A) ↔
      ∃ d ∈ sumset_null_vectors h k, dotProduct d A = 0
sumset_collision_of_null_vectorIn LeanCombinatorics for TCS

Let k ≥ 3, h ≥ 2, and A : Fin k → ℤ. If there exists d ∈ sumset_null_vectors h k such that dotProduct d A = 0, then there exist distinct x, y ∈ sumset_sum_vectors h k such that dotProduct x A = dotProduct y A.

theorem sumset_collision_of_null_vector
    (k h : ℕ) (hk : 3 ≤ k) (hh : 2 ≤ h) (A : Fin k → ℤ)
    (h_null : ∃ d ∈ sumset_null_vectors h k, dotProduct d A = 0) :
    ∃ x ∈ sumset_sum_vectors h k, ∃ y ∈ sumset_sum_vectors h k, x ≠ y ∧ dotProduct x A = dotProduct y A
sumset_null_vector_of_collisionIn LeanCombinatorics for TCS

Let k ≥ 3, h ≥ 2, and A : Fin k → ℤ. If there exist distinct x, y ∈ sumset_sum_vectors h k such that dotProduct x A = dotProduct y A, then there exists d ∈ sumset_null_vectors h k such that dotProduct d A = 0.

theorem sumset_null_vector_of_collision
    (k h : ℕ) (hk : 3 ≤ k) (hh : 2 ≤ h) (A : Fin k → ℤ)
    (h_coll : ∃ x ∈ sumset_sum_vectors h k, ∃ y ∈ sumset_sum_vectors h k, x ≠ y ∧ dotProduct x A = dotProduct y A) :
    ∃ d ∈ sumset_null_vectors h k, dotProduct d A = 0
sumset_rep_count_k3_h2_mul3_add1_upper_boundIn LeanCombinatorics for TCS

For sufficiently large m, the normalized representation count along q = 3m + 1 is at most 7/10.

theorem sumset_rep_count_k3_h2_mul3_add1_upper_bound :
  ∃ M : ℕ, ∀ m : ℕ, M ≤ m →
    (sumset_rep_count 2 3 (3 * m + 1) (3 * m + 1 : ℤ) : ℝ) / ((3 * (m : ℝ) + 1) ^ 2) ≤ (7 : ℝ) / 10
sumset_rep_count_k3_h2_mul3_lower_boundIn LeanCombinatorics for TCS

For sufficiently large m, the normalized representation count along q = 3m is at least 9/10.

theorem sumset_rep_count_k3_h2_mul3_lower_bound :
  ∃ M : ℕ, ∀ m : ℕ, M ≤ m →
    (9 : ℝ) / 10 ≤ (sumset_rep_count 2 3 (3 * m) (3 * m : ℤ) : ℝ) / ((3 * (m : ℝ)) ^ 2)
sunflower_free_reduce_to_spinyIn LeanCombinatorics for TCS

Let r ≥ 2 be a natural number and let α have decidable equality. Let S be a finite collection of finite subsets of α containing no r-flower (i.e. no subfamily F ⊆ S with F.card = r is a sunflower with any kernel C). Then there exists a subfamily S' ⊆ S such that S'.biUnion id = S.biUnion id, S' contains no r-flower, and S' is spiny (IsSpiny S').

theorem sunflower_free_reduce_to_spiny {α : Type*} [DecidableEq α]
    (r : ℕ) (hr : 2 ≤ r) (S : Finset (Finset α))
    (hfree : ¬ ∃ F ⊆ S, F.card = r ∧ ∃ C, IsSunflower F C) :
    ∃ S' ⊆ S, S'.biUnion id = S.biUnion id ∧
      (¬ ∃ F ⊆ S', F.card = r ∧ ∃ C, IsSunflower F C) ∧
      IsSpiny S'
sunflower_free_subfamilyIn LeanCombinatorics for TCS

Any subfamily S' of an r-flower-free finite family of finite sets S is also r-flower-free: if S contains no r-element subfamily that is a sunflower with some kernel C, then neither does S'.

theorem sunflower_free_subfamily {α : Type*} [DecidableEq α] {r : ℕ}
    {S S' : Finset (Finset α)} (hsub : S' ⊆ S)
    (hfree : ¬ ∃ F ⊆ S, F.card = r ∧ ∃ C, IsSunflower F C) :
    ¬ ∃ F ⊆ S', F.card = r ∧ ∃ C, IsSunflower F C
sup_poisson_of_small_meanIn LeanCombinatorics for TCS

If for every fixed C₀ > 0 the two region bounds hold eventually in n for all k with μ_n(k) ≤ C₀, and P is nondecreasing in k, μ nonincreasing and halving, μ → 0 in k for fixed n, and 0 ≤ P ≤ 1, 0 ≤ μ, then sup_k |P_n(k) − exp(−μ_n(k))| → 0.

theorem sup_poisson_of_small_mean (μ P : ℕ → ℕ → ℝ)
    (hPmono : ∀ n k, P n k ≤ P n (k+1))
    (hμmono : ∀ n k, μ n (k+1) ≤ μ n k)
    (hμhalf : ∀ n k, μ n k / 2 ≤ μ n (k+1))
    (hμtendsto : ∀ n, Filter.Tendsto (fun k => μ n k) Filter.atTop (nhds 0))
    (hP01 : ∀ n k, P n k ∈ Set.Icc (0:ℝ) 1)
    (hμ0 : ∀ n k, 0 ≤ μ n k)
    (hupper : ∀ C₀ : ℝ, 0 < C₀ → ∀ᶠ n in Filter.atTop, ∀ k, μ n k ≤ C₀ →
      P n k ≤ Real.exp (-(μ n k)) + 1/C₀)
    (hlower : ∀ C₀ : ℝ, 0 < C₀ → ∀ᶠ n in Filter.atTop, ∀ k, μ n k ≤ C₀ →
      Real.exp (-(μ n k)) ≤ P n k + 1/C₀) :
    Filter.Tendsto (fun n : ℕ => ⨆ k : ℕ, |P n k - Real.exp (-(μ n k))|)
      Filter.atTop (nhds 0)
support_graph_density_bound_ramseyIn LeanCombinatorics for TCS

Given a finite simple graph G on a type V, and natural numbers r, s, t with 1 ≤ t, t ≤ s, and s ≤ r, let α : ℝ = (r.choose t : ℝ) / (s.choose t : ℝ). If a natural number N satisfies (SimpleGraph.extremalNumber N G : ℝ) < (N.choose 2 : ℝ) / α, then set_coloring_ramsey_number G r s t ≤ N. Consequently, if for a real number c, (SimpleGraph.extremalNumber N G : ℝ) ≤ c * (N : ℝ) / 2 holds for all natural numbers N, then set_coloring_ramsey_number G r s t ≤ ⌊α * c⌋₊ + 2.

open scoped Classical in
theorem support_graph_density_bound_ramsey
    {V : Type*} [Fintype V] (G : SimpleGraph V)
    (r s t : ℕ) (hr : 1 ≤ t) (hs : t ≤ s) (hrs : s ≤ r) :
    let α : ℝ := (r.choose t : ℝ) / (s.choose t : ℝ)
    (∀ N : ℕ, (SimpleGraph.extremalNumber N G : ℝ) < (N.choose 2 : ℝ) / α →
      set_coloring_ramsey_number G r s t ≤ N) ∧
    (∀ c : ℝ, (∀ N : ℕ, (SimpleGraph.extremalNumber N G : ℝ) ≤ c * (N : ℝ) / 2) →
      set_coloring_ramsey_number G r s t ≤ ⌊α * c⌋₊ + 2)
support_graph_edge_sumIn LeanCombinatorics for TCS

Given natural numbers N, r, s, t, and an edge-labeling ϕ : (⊤ : SimpleGraph (Fin N)).edgeSet → Finset (Fin r) such that each edge receives a finite subset of cardinality s, the sum over all finite subsets T ∈ (Finset.univ : Finset (Fin r)).powersetCard t of the number of edges in support_graph ϕ T equals s.choose t * N.choose 2.

open scoped Classical in
lemma support_graph_edge_sum {N r s t : ℕ}
    (ϕ : (⊤ : SimpleGraph (Fin N)).edgeSet → Finset (Fin r))
    (hϕ : ∀ e, (ϕ e).card = s) :
    ∑ T ∈ (Finset.univ : Finset (Fin r)).powersetCard t,
      (support_graph ϕ T).edgeFinset.card = s.choose t * N.choose 2
surjection_number_log_supermodularIn LeanCombinatorics for TCS

For any natural numbers a ≤ b and s ≤ t, the surjection numbers satisfy U_a(t) U_b(s) ≤ U_a(s) U_b(t), expressing the log-supermodularity of surjection numbers.

theorem surjection_number_log_supermodular {a b s t : ℕ} (hab : a ≤ b) (hst : s ≤ t) :
    surjection_number a t * surjection_number b s ≤
    surjection_number a s * surjection_number b t
surjection_number_mul_le_mul_of_zero_sIn LeanCombinatorics for TCS

For any natural numbers a ≤ b and any t, surjection numbers satisfy U_a(t) U_b(0) ≤ U_a(0) U_b(t).

theorem surjection_number_mul_le_mul_of_zero_s {a b t : ℕ} (hab : a ≤ b) :
    surjection_number a t * surjection_number b 0 ≤
    surjection_number a 0 * surjection_number b t
surjection_number_succIn LeanCombinatorics for TCS

For any natural numbers l and t, surjection numbers satisfy the recurrence U_{l+1}(t+1) = (l+1) (U_{l+1}(t) + U_l(t)).

theorem surjection_number_succ (l t : ℕ) :
    surjection_number (l + 1) (t + 1) =
      (l + 1) * (surjection_number (l + 1) t + surjection_number l t)
symmetric_counterexample_eight_min_three_bentIn LeanCombinatorics for TCS

The minimum number of bent functions on (Fin 8 → ZMod 2) whose sum is the eight-variable symmetric Boolean function symmetric_counterexample_func_eight is exactly three: there exist three bent functions b₁, b₂, b₃ on (Fin 8 → ZMod 2) whose sum b₁ + b₂ + b₃ equals symmetric_counterexample_func_eight, no two bent functions on (Fin 8 → ZMod 2) sum to symmetric_counterexample_func_eight, and symmetric_counterexample_func_eight is not bent.

theorem symmetric_counterexample_eight_min_three_bent :
    (∃ b₁ b₂ b₃ : (Fin 8 → ZMod 2) → ZMod 2,
      is_bent b₁ ∧ is_bent b₂ ∧ is_bent b₃ ∧ b₁ + b₂ + b₃ = symmetric_counterexample_func_eight) ∧
    (¬ ∃ b₁ b₂ : (Fin 8 → ZMod 2) → ZMod 2,
      is_bent b₁ ∧ is_bent b₂ ∧ b₁ + b₂ = symmetric_counterexample_func_eight) ∧
    ¬ is_bent symmetric_counterexample_func_eight
symmetric_counterexample_eight_not_sum_of_two_bentIn LeanCombinatorics for TCS

The eight-variable symmetric Boolean function F_8 cannot be decomposed into a sum of two bent functions.

theorem symmetric_counterexample_eight_not_sum_of_two_bent :
    ¬ ∃ b₁ b₂ : (Fin 8 → ZMod 2) → ZMod 2,
      is_bent b₁ ∧ is_bent b₂ ∧ b₁ + b₂ = symmetric_counterexample_func_eight
symmetric_counterexample_eight_sum_three_bentIn LeanCombinatorics for TCS

The eight-variable symmetric Boolean function symmetric_counterexample_func_eight can be written as the sum of three bent functions on (Fin 8 → ZMod 2): there exist bent functions b₁, b₂, b₃ on (Fin 8 → ZMod 2) such that b₁ + b₂ + b₃ = symmetric_counterexample_func_eight.

theorem symmetric_counterexample_eight_sum_three_bent :
    ∃ b₁ b₂ b₃ : (Fin 8 → ZMod 2) → ZMod 2,
      is_bent b₁ ∧ is_bent b₂ ∧ is_bent b₃ ∧ b₁ + b₂ + b₃ = symmetric_counterexample_func_eight
symmetric_counterexample_has_degree_leIn LeanCombinatorics for TCS

For any integer n = 2^k ≥ 8, the symmetric Boolean function symmetric_counterexample_func n has algebraic degree at most n / 2.

theorem symmetric_counterexample_has_degree_le (n : ℕ) (k : ℕ) (hn : n = 2 ^ k) (hn8 : 8 ≤ n) : has_degree_le (symmetric_counterexample_func n) (n / 2)
symmetric_counterexample_infinite_familyIn LeanCombinatorics for TCS

For every integer n = 2^k ≥ 8, the symmetric Boolean function F_n = 1 + σ₂ + σ₄ + ⋯ + σ_{n/2} on (Fin n → ZMod 2) has algebraic degree n / 2 and cannot be written as the sum of at most two bent functions in n variables: it has algebraic degree at most n / 2, does not have algebraic degree strictly less than n / 2, cannot be written as the sum of two bent functions, is not bent, and is not zero.

theorem symmetric_counterexample_infinite_family (n : ℕ) (k : ℕ) (hn : n = 2 ^ k) (hn8 : 8 ≤ n) : has_degree_le (symmetric_counterexample_func n) (n / 2) ∧ (∀ d < n / 2, ¬ has_degree_le (symmetric_counterexample_func n) d) ∧ (¬ ∃ b₁ b₂ : (Fin n → ZMod 2) → ZMod 2, is_bent b₁ ∧ is_bent b₂ ∧ b₁ + b₂ = symmetric_counterexample_func n) ∧ ¬ is_bent (symmetric_counterexample_func n) ∧ symmetric_counterexample_func n ≠ 0
symmetric_counterexample_not_bentIn LeanCombinatorics for TCS

For any integer n = 2^k ≥ 8, the symmetric Boolean function symmetric_counterexample_func n on (Fin n → ZMod 2) is not bent.

theorem symmetric_counterexample_not_bent (n : ℕ) (k : ℕ) (hn : n = 2 ^ k) (hn8 : 8 ≤ n) : ¬ is_bent (symmetric_counterexample_func n)
symmetric_counterexample_not_has_degree_ltIn LeanCombinatorics for TCS

For any integer n = 2^k ≥ 8 and any d < n / 2, the symmetric Boolean function symmetric_counterexample_func n does not have algebraic degree at most d.

theorem symmetric_counterexample_not_has_degree_lt (n : ℕ) (k : ℕ) (hn : n = 2 ^ k) (hn8 : 8 ≤ n) : ∀ d < n / 2, ¬ has_degree_le (symmetric_counterexample_func n) d
symmetric_counterexample_not_sum_of_two_bentIn LeanCombinatorics for TCS

For any integer n = 2^k ≥ 8, the symmetric Boolean function symmetric_counterexample_func n on (Fin n → ZMod 2) cannot be written as the sum of two bent functions.

theorem symmetric_counterexample_not_sum_of_two_bent (n : ℕ) (k : ℕ) (hn : n = 2 ^ k) (hn8 : 8 ≤ n) : ¬ ∃ b₁ b₂ : (Fin n → ZMod 2) → ZMod 2, is_bent b₁ ∧ is_bent b₂ ∧ b₁ + b₂ = symmetric_counterexample_func n
symmetric_linearization_coeff_evenIn LeanCombinatorics for TCS

Let N ≥ 2, and let a, c : Fin (2 * N + 1) → ℝ satisfy condition (2.1) of size 2N with b = fun _ => 0. Then for all ma, na, ka : Fin (N + 1), the linearization coefficient linearization_coeff (2 * N) a (fun _ => 0) c at indices ⟨2 * ma.val, _⟩, ⟨2 * na.val, _⟩, ⟨2 * ka.val, _⟩ equals linearization_coeff N (even_component_a N a) (even_component_b N a c) (even_component_c N a c) ma na ka.

theorem symmetric_linearization_coeff_even
    (N : ℕ) (hN : 2 ≤ N) (a c : Fin (2 * N + 1) → ℝ)
    (hrec : satisfies_recurrence_2_1 (2 * N) a (fun _ => 0) c)
    (ma na ka : Fin (N + 1)) :
    linearization_coeff (2 * N) a (fun _ => 0) c
      ⟨2 * ma.val, by omega⟩ ⟨2 * na.val, by omega⟩ ⟨2 * ka.val, by omega⟩ =
    linearization_coeff N (even_component_a N a) (even_component_b N a c) (even_component_c N a c)
      ma na ka
symmetric_linearization_coeff_odd_sum_zeroIn LeanCombinatorics for TCS

Let N ≥ 2, and let a, c : Fin (2 * N + 1) → ℝ satisfy condition (2.1) of size 2N with b = fun _ => 0. Then for all m, n, k : Fin (2 * N + 1) with (m.val + n.val + k.val) % 2 = 1, the linearization coefficient linearization_coeff (2 * N) a (fun _ => 0) c m n k = 0.

theorem symmetric_linearization_coeff_odd_sum_zero
    (N : ℕ) (hN : 2 ≤ N) (a c : Fin (2 * N + 1) → ℝ)
    (hrec : satisfies_recurrence_2_1 (2 * N) a (fun _ => 0) c)
    (m n k : Fin (2 * N + 1))
    (hodd : (m.val + n.val + k.val) % 2 = 1) :
    linearization_coeff (2 * N) a (fun _ => 0) c m n k = 0
ternary_affine_hyperplane_line_unique_hitIn LeanCombinatorics for TCS

If the normal vector a has all coordinates nonzero, then every axis-parallel line of direction i meets the affine hyperplane {x | ∑ a j * x j = b} in exactly one point.

theorem ternary_affine_hyperplane_line_unique_hit (m : ℕ) (a : Fin m → ZMod 3) (ha : ∀ i, a i ≠ 0) (b : ZMod 3) (p : Fin m → ZMod 3) (i : Fin m) : ∃! t : ZMod 3, Function.update p i t ∈ ternary_affine_hyperplane m a b
ternary_affine_hyperplanes_meet_card_ge_twoIn LeanCombinatorics for TCS

Two affine hyperplanes of (Fin m → ZMod 3), m ≥ 3, one of them with all coordinates of its normal nonzero, that have a common point have at least two common points: the intersection of two affine hyperplanes is never a single point.

theorem ternary_affine_hyperplanes_meet_card_ge_two (m : ℕ) (hm : 3 ≤ m) (a1 a2 : Fin m → ZMod 3) (ha1 : ∀ i, a1 i ≠ 0) (b1 b2 : ZMod 3) (h : (ternary_affine_hyperplane m a1 b1 ∩ ternary_affine_hyperplane m a2 b2).Nonempty) : 2 ≤ (ternary_affine_hyperplane m a1 b1 ∩ ternary_affine_hyperplane m a2 b2).card
ternary_axis_line_cardIn LeanCombinatorics for TCS

Every axis-parallel ternary line has exactly three points: (ternary_axis_line n i c).card = 3.

theorem ternary_axis_line_card (n : ℕ) (i : Fin n) (c : Fin n → ZMod 3) : (ternary_axis_line n i c).card = 3
ternary_cover_excess_one_missed_lines_concurrentIn LeanCombinatorics for TCS

Let B be a ternary line cover and Γ ⊆ B a sub-finset with exactly one point more in B than in Γ. Then B \ Γ is a single point q, and every axis-parallel line that is disjoint from Γ contains q — i.e. all lines missed by the sub-cover Γ are concurrent at q.

theorem ternary_cover_excess_one_missed_lines_concurrent (n : ℕ) (B Γ : Finset (Fin n → ZMod 3)) (hB : is_ternary_line_cover n B) (hΓsub : Γ ⊆ B) (hcard : B.card = Γ.card + 1) : ∃ q : Fin n → ZMod 3, B \ Γ = {q} ∧ ∀ (j : Fin n) (p : Fin n → ZMod 3), Disjoint (ternary_axis_line n j p) Γ → q ∈ ternary_axis_line n j p
ternary_hyperplanes_third_cover_contradictionIn LeanCombinatorics for TCS

Let m ≥ 3 and let H1, H2 be affine hyperplanes of (Fin m → ZMod 3) with all normal coordinates nonzero. Let Q be a set of 3^(m-1) + 1 points such that every point lies in H1, or in H2, or in Q, and such that every point of Q that lies on H1 or H2 has a private axis-parallel line inside Q. Then contradiction.

theorem ternary_hyperplanes_third_cover_contradiction (m : ℕ) (hm : 3 ≤ m) (a1 a2 : Fin m → ZMod 3) (ha1 : ∀ i, a1 i ≠ 0) (ha2 : ∀ i, a2 i ≠ 0) (b1 b2 : ZMod 3) (Q : Finset (Fin m → ZMod 3)) (hQcard : Q.card = 3 ^ (m - 1) + 1) (hunion : ∀ y : Fin m → ZMod 3, y ∈ ternary_affine_hyperplane m a1 b1 ∨ y ∈ ternary_affine_hyperplane m a2 b2 ∨ y ∈ Q) (hess : ∀ z : Fin m → ZMod 3, (z ∈ ternary_affine_hyperplane m a1 b1 ∨ z ∈ ternary_affine_hyperplane m a2 b2) → z ∈ Q → ∃ i : Fin m, ternary_axis_line m i z ∩ Q = {z}) : False
ternary_line_cover_fiber_excessIn LeanCombinatorics for TCS

For a ternary line cover B and any direction i, summing |B ∩ L| - 1 over the 3^(n-1) lines L of direction i gives |B| - 3^(n-1): the excess of B is the same number in every direction.

theorem ternary_line_cover_fiber_excess (n : ℕ) (i : Fin n) (B : Finset (Fin n → ZMod 3)) (hB : is_ternary_line_cover n B) : ∑ c ∈ (Finset.univ.filter (fun c : Fin n → ZMod 3 => c i = 0)), ((ternary_axis_line n i c ∩ B).card - 1) = B.card - 3 ^ (n - 1)
ternary_line_cover_min_card_is_hyperplaneIn LeanCombinatorics for TCS

Every ternary line cover of minimum size 3^(n-1) is an affine hyperplane with all coordinates of the normal nonzero (minimality is not assumed).

theorem ternary_line_cover_min_card_is_hyperplane (n : ℕ) (hn : 1 ≤ n) (B : Finset (Fin n → ZMod 3)) (hB : is_ternary_line_cover n B) (hcard : B.card = 3 ^ (n - 1)) : ∃ (a : Fin n → ZMod 3) (ha : ∀ i, a i ≠ 0) (b : ZMod 3), B = ternary_affine_hyperplane n a b
ternary_minimal_line_cover_erase_characterizationIn LeanCombinatorics for TCS

A finite set B is an inclusion-minimal ternary line cover if and only if B is a ternary line cover and deleting any one of its points destroys the covering property.

theorem ternary_minimal_line_cover_erase_characterization (n : ℕ) (B : Finset (Fin n → ZMod 3)) : is_minimal_ternary_line_cover n B ↔ is_ternary_line_cover n B ∧ ∀ p ∈ B, ¬ is_ternary_line_cover n (B.erase p)
ternary_minimal_line_cover_first_excess_eq_repairIn LeanCombinatorics for TCS

For every integer n ≥ 6, every inclusion-minimal ternary line cover B in (Fin n → ZMod 3) of cardinality 3^(n - 1) + n - 1 is a single-point repair ternary_single_point_repair n (ternary_affine_hyperplane n a b) p ε for some affine hyperplane and offset vector ε with all coordinates nonzero.

theorem ternary_minimal_line_cover_first_excess_eq_repair (n : ℕ) (hn : 6 ≤ n) (B : Finset (Fin n → ZMod 3)) (hB : is_minimal_ternary_line_cover n B) (hcard : B.card = 3 ^ (n - 1) + n - 1) : ∃ (a : Fin n → ZMod 3) (ha : ∀ i, a i ≠ 0) (b : ZMod 3), let H := ternary_affine_hyperplane n a b; ∃ (p : Fin n → ZMod 3) (hp : p ∈ H) (ε : Fin n → ZMod 3) (hε : ∀ i, ε i ≠ 0), B = ternary_single_point_repair n H p ε
ternary_minimal_line_cover_first_gap_emptyIn LeanCombinatorics for TCS

For every integer n ≥ 6, there does not exist an inclusion-minimal ternary line cover B in (Fin n → ZMod 3) with cardinality strictly between 3^(n - 1) and 3^(n - 1) + n - 1.

theorem ternary_minimal_line_cover_first_gap_empty (n : ℕ) (hn : 6 ≤ n) (B : Finset (Fin n → ZMod 3)) (hB : is_minimal_ternary_line_cover n B) (hlo : 3 ^ (n - 1) < B.card) (hhi : B.card < 3 ^ (n - 1) + n - 1) : False
ternary_minimal_line_cover_private_lineIn LeanCombinatorics for TCS

A finite set B is an inclusion-minimal ternary line cover if and only if B is a cover and every point p of B has a private axis-parallel line: a direction i in which the line of direction i through p meets B exactly in p.

theorem ternary_minimal_line_cover_private_line (n : ℕ) (B : Finset (Fin n → ZMod 3)) : is_minimal_ternary_line_cover n B ↔ is_ternary_line_cover n B ∧ ∀ p ∈ B, ∃ i : Fin n, ternary_axis_line n i p ∩ B = {p}
ternary_minimal_line_cover_slice_reductionIn LeanCombinatorics for TCS

For n ≥ 6, an inclusion-minimal ternary line cover B with 3^(n-1) < |B| < 3^(n-1) + n - 1 slices into three covers S_0, S_1, S_2 of (Fin (n-1) → ZMod 3) — the tails of the points with first coordinate 0, 1, 2 — such that the union is everything, the total cardinality is |B| (hence still in the window), and every point occurring in at least two slices has a private line inside each slice containing it.

theorem ternary_minimal_line_cover_slice_reduction (n : ℕ) (hn : 6 ≤ n) (B : Finset (Fin n → ZMod 3)) (hB : is_minimal_ternary_line_cover n B) (hlo : 3 ^ (n - 1) < B.card) (hhi : B.card < 3 ^ (n - 1) + n - 1) : ∃ S : ZMod 3 → Finset (Fin (n - 1) → ZMod 3), (∀ c, is_ternary_line_cover (n - 1) (S c)) ∧ (∀ y : Fin (n - 1) → ZMod 3, y ∈ S 0 ∨ y ∈ S 1 ∨ y ∈ S 2) ∧ 3 ^ (n - 1) < (∑ c : ZMod 3, (S c).card) ∧ (∑ c : ZMod 3, (S c).card) < 3 ^ (n - 1) + n - 1 ∧ (∀ y : Fin (n - 1) → ZMod 3, 2 ≤ (Finset.univ.filter (fun c : ZMod 3 => y ∈ S c)).card → ∀ c, y ∈ S c → ∃ i : Fin (n - 1), ternary_axis_line (n - 1) i y ∩ S c = {y})
ternary_three_slices_excess_one_rigidityIn LeanCombinatorics for TCS

For n ≥ 6 there are no three ternary line covers S_0, S_1, S_2 of (Fin (n-1) → ZMod 3) with union everything, total cardinality exactly 3^(n-1) + 1, and such that every point lying in at least two slices has a private line inside each slice containing it. Together with the slice reduction this says: there is no inclusion-minimal ternary line cover of size 3^(n-1) + 1.

theorem ternary_three_slices_excess_one_rigidity (n : ℕ) (hn : 6 ≤ n) (S : ZMod 3 → Finset (Fin (n - 1) → ZMod 3)) (hcov : ∀ c, is_ternary_line_cover (n - 1) (S c)) (hunion : ∀ y : Fin (n - 1) → ZMod 3, y ∈ S 0 ∨ y ∈ S 1 ∨ y ∈ S 2) (hlo : 3 ^ (n - 1) < (∑ c : ZMod 3, (S c).card)) (hhi : (∑ c : ZMod 3, (S c).card) < 3 ^ (n - 1) + 2) (hess : ∀ y : Fin (n - 1) → ZMod 3, 2 ≤ (Finset.univ.filter (fun c : ZMod 3 => y ∈ S c)).card → ∀ c, y ∈ S c → ∃ i : Fin (n - 1), ternary_axis_line (n - 1) i y ∩ S c = {y}) : False
ternary_three_slices_small_excess_rigidityIn LeanCombinatorics for TCS

For n ≥ 6 there are no three ternary line covers S_0, S_1, S_2 of (Fin (n-1) → ZMod 3) with union everything, total cardinality in the open window (3^(n-1), 3^(n-1) + n - 1), and such that every point lying in at least two slices has a private line inside each slice containing it.

theorem ternary_three_slices_small_excess_rigidity (n : ℕ) (hn : 6 ≤ n) (S : ZMod 3 → Finset (Fin (n - 1) → ZMod 3)) (hcov : ∀ c, is_ternary_line_cover (n - 1) (S c)) (hunion : ∀ y : Fin (n - 1) → ZMod 3, y ∈ S 0 ∨ y ∈ S 1 ∨ y ∈ S 2) (hlo : 3 ^ (n - 1) < (∑ c : ZMod 3, (S c).card)) (hhi : (∑ c : ZMod 3, (S c).card) < 3 ^ (n - 1) + n - 1) (hess : ∀ y : Fin (n - 1) → ZMod 3, 2 ≤ (Finset.univ.filter (fun c : ZMod 3 => y ∈ S c)).card → ∀ c, y ∈ S c → ∃ i : Fin (n - 1), ternary_axis_line (n - 1) i y ∩ S c = {y}) : False
tetrahedron_boundary_is_cohen_macaulayIn LeanCombinatorics for TCS

The boundary of a tetrahedron, the complex with the four triangular facets {0,1,2}, {0,1,3}, {0,2,3}, {1,2,3} on Fin 4, is Cohen-Macaulay over every field: it is pure of dimension 2, its 1-skeleton and all its vertex links are complete graphs, and it is a 2-sphere so H_1 = 0.

theorem tetrahedron_boundary_is_cohen_macaulay (k : Type*) [Field k] :
    is_cohen_macaulay_two_complex ({ {0, 1, 2}, {0, 1, 3}, {0, 2, 3}, {1, 2, 3} } : Finset (Finset (Fin 4))) k
three_ap_free_delta_eq_zeroIn LeanCombinatorics for TCS

If S is a 3AP-free subset of ZMod p, and a, a + δ, a - δ all belong to S, then δ = 0.

theorem three_ap_free_delta_eq_zero {p : ℕ} (S : Set (ZMod p)) (hS : ThreeAPFree S)
    (a δ : ZMod p) (ha : a ∈ S) (hplus : a + δ ∈ S) (hminus : a - δ ∈ S) :
    δ = 0
three_ap_free_shift_distinctIn LeanCombinatorics for TCS

In an additive commutative group, if a subset S is 3-AP free, b_i = a_i + D for all i, and the three differences b_1 - a_0, b_2 - a_0, and b_0 - a_2 all belong to S, then a_0 = a_1 implies a_0 = a_2.

theorem three_ap_free_shift_distinct {α : Type*} [AddCommGroup α] (S : Set α)
    (hS : ThreeAPFree S) (a b : Fin 3 → α) (D : α)
    (hb : ∀ i, b i = a i + D)
    (hS1 : b 1 - a 0 ∈ S)
    (hS2 : b 2 - a 0 ∈ S)
    (hS3 : b 0 - a 2 ∈ S)
    (ha : a 0 = a 1) :
    a 0 = a 2
three_k4_common_list_colorable_threeIn LeanCombinatorics for TCS

The pair of loopless matroids (three_k4_matroid, three_k4_partition_matroid) with common chromatic number 2 has common list chromatic number at most 3 (hence exactly 3). This settles the concrete counterexample instance of Question 3.1.

theorem three_k4_common_list_colorable_three :
    matroid_common_list_colorable three_k4_matroid three_k4_partition_matroid 3
three_terms_mem_restricted_sumsetIn LeanCombinatorics for TCS

A sum a + b + c of three pairwise distinct elements of A belongs to the three-fold restricted sumset of A.

theorem three_terms_mem_restricted_sumset {G : Type*} [AddCommGroup G] [DecidableEq G] {A : Finset G} {a b c : G} (ha : a ∈ A) (hb : b ∈ A) (hc : c ∈ A) (hab : a ≠ b) (hac : a ≠ c) (hbc : b ≠ c) : a + b + c ∈ restrictedSumset A 3
three_uniform_four_flower_free_base_edges_boundIn LeanCombinatorics for TCS

In any 3-uniform 4-flower-free hypergraph S on Fin 39 with span Fin 39, the number of edges containing only vertices of degree at least 2 is at most 3.

theorem three_uniform_four_flower_free_base_edges_bound
    (S : Finset (Finset (Fin 39)))
    (h3 : ∀ s ∈ S, s.card = 3)
    (hspan : S.biUnion id = Finset.univ)
    (hfree : ¬ ∃ F ⊆ S, F.card = 4 ∧ ∃ C, IsSunflower F C) :
    (S.filter (fun s => ∀ x ∈ s, 2 ≤ (S.filter (x ∈ ·)).card)).card ≤ 3
three_uniform_four_flower_free_quill_count_leIn LeanCombinatorics for TCS

In any 3-uniform 4-flower-free hypergraph S on Fin 39 with span Fin 39, the number of vertices of degree 1 (quills) is at most 30.

theorem three_uniform_four_flower_free_quill_count_le
    (S : Finset (Finset (Fin 39)))
    (h3 : ∀ s ∈ S, s.card = 3)
    (hspan : S.biUnion id = Finset.univ)
    (hfree : ¬ ∃ F ⊆ S, F.card = 4 ∧ ∃ C, IsSunflower F C) :
    (Finset.univ.filter (fun (x : Fin 39) => (S.filter (x ∈ ·)).card = 1)).card ≤ 30
three_uniform_span_bound_iffIn LeanCombinatorics for TCS

For any natural numbers r and a, every 3-uniform r-flower-free system on any type α with decidable equality has span at most a if and only if every 3-uniform r-flower-free system on Fin n has span at most a.

theorem three_uniform_span_bound_iff (r a : ℕ) :
    (∀ {α : Type*} [DecidableEq α] (S : Finset (Finset α)),
      (∀ A ∈ S, A.card = 3) →
      (¬ ∃ F ⊆ S, F.card = r ∧ ∃ C, IsSunflower F C) →
      (S.biUnion id).card ≤ a) ↔
    (∀ (n : ℕ) (S : Finset (Finset (Fin n))),
      (∀ A ∈ S, A.card = 3) →
      (¬ ∃ F ⊆ S, F.card = r ∧ ∃ C, IsSunflower F C) →
      (S.biUnion id).card ≤ a)
three_uniform_to_two_uniform_systemIn LeanCombinatorics for TCS

For any r ≥ 3 and any 3-uniform r-flower-free system S on Fin n, there exists m and a 2-uniform r-flower-free system S' on Fin m whose aura is at least the span of S, i.e., |⋃ S| ≤ |⋃ S'| + (r - 1) * |S'|.

theorem three_uniform_to_two_uniform_system (r : ℕ) (hr : 3 ≤ r)
    (n : ℕ) (S : Finset (Finset (Fin n)))
    (h3 : ∀ A ∈ S, A.card = 3)
    (hfree : ¬ ∃ F ⊆ S, F.card = r ∧ ∃ C, IsSunflower F C) :
    ∃ (m : ℕ) (S' : Finset (Finset (Fin m))),
      (∀ A ∈ S', A.card = 2) ∧
      (¬ ∃ F ⊆ S', F.card = r ∧ ∃ C, IsSunflower F C) ∧
      (S.biUnion id).card ≤ (S'.biUnion id).card + (r - 1) * S'.card
thue_morse_min_factor_coverages_card_boundIn LeanCombinatorics for TCS

For n ≥ 5, H_min(t_n) has exactly 8n-22 members.

theorem thue_morse_min_factor_coverages_card_bound (n : ℕ) (hn : 5 ≤ n) :
    (thue_morse_min_factor_coverages_finset n).card = 8 * n - 22
thue_morse_min_factor_coverages_size_ge_eighth_lengthIn LeanCombinatorics for TCS

Every inclusion-minimal factor coverage of t_n has at least 2^(n-3)+2 positions, i.e. at least 1/8 of the length, for n ≥ 5.

theorem thue_morse_min_factor_coverages_size_ge_eighth_length (n : ℕ) (hn : 5 ≤ n) :
    ∀ C ∈ thue_morse_min_factor_coverages_finset n, 2 ^ n / 8 + 2 ≤ C.card
thue_morse_min_factor_coverages_size_le_half_lengthIn LeanCombinatorics for TCS

Every inclusion-minimal factor coverage of the n-th Thue-Morse word has cardinality at most 2^(n-1), i.e. 2|C| ≤ 2^n, for n ≥ 5.

theorem thue_morse_min_factor_coverages_size_le_half_length (n : ℕ) (hn : 5 ≤ n) :
    ∀ C ∈ thue_morse_min_factor_coverages_finset n, 2 * C.card ≤ 2 ^ n
thue_morse_min_factor_coverages_subset_IccIn LeanCombinatorics for TCS

Every inclusion-minimal factor coverage of the n-th Thue–Morse word consists of positions in [1, 2^n].

theorem thue_morse_min_factor_coverages_subset_Icc (n : ℕ) :
    ∀ C ∈ thue_morse_min_factor_coverages_finset n, C ⊆ Finset.Icc 1 (2 ^ n)
thue_morse_poisson_lower_small_meanIn LeanCombinatorics for TCS

For each C₀ > 0, for all large n and all k with μ_n(k) ≤ C₀, exp(−μ_n(k)) ≤ P_n(k) + 1/C₀.

theorem thue_morse_poisson_lower_small_mean (C₀ : ℝ) (hC₀ : 0 < C₀) :
    ∀ᶠ n in Filter.atTop, ∀ k : ℕ, thue_morse_unhit_mean n k ≤ C₀ →
      Real.exp (-(thue_morse_unhit_mean n k)) ≤ thue_morse_random_attractor_prob n k + 1 / C₀
thue_morse_poisson_uniformIn LeanCombinatorics for TCS

The supremum over k of |P_n(k) - exp(-μ_n(k))| tends to 0, where μ_n(k) is the expected number of unhit inclusion-minimal factor coverages of t_n.

theorem thue_morse_poisson_uniform :
    Filter.Tendsto (fun n : ℕ => ⨆ k : ℕ,
      |thue_morse_random_attractor_prob n k - Real.exp (-(thue_morse_unhit_mean n k))|)
      Filter.atTop (nhds 0)
thue_morse_poisson_upper_small_meanIn LeanCombinatorics for TCS

For each C₀ > 0, for all large n and all k with μ_n(k) ≤ C₀, P_n(k) ≤ exp(−μ_n(k)) + 1/C₀.

theorem thue_morse_poisson_upper_small_mean (C₀ : ℝ) (hC₀ : 0 < C₀) :
    ∀ᶠ n in Filter.atTop, ∀ k : ℕ, thue_morse_unhit_mean n k ≤ C₀ →
      thue_morse_random_attractor_prob n k ≤ Real.exp (-(thue_morse_unhit_mean n k)) + 1 / C₀
thue_morse_random_attractor_prob_eq_hit_allIn LeanCombinatorics for TCS

The probability that k uniformly random positions of t_n form a string attractor equals the fraction of k-tuples of positions in [1, 2^n] whose image meets every inclusion-minimal factor coverage of t_n.

theorem thue_morse_random_attractor_prob_eq_hit_all (n k : ℕ) :
    thue_morse_random_attractor_prob n k =
      ((Finset.univ.filter (fun f : Fin k → ↥(Finset.Icc 1 (2 ^ n)) =>
        ∀ C ∈ thue_morse_min_factor_coverages_finset n, ∃ i : Fin k, (f i).val ∈ C)).card : ℝ)
        / ((2 : ℝ) ^ n) ^ k
thue_morse_random_attractor_prob_monoIn LeanCombinatorics for TCS

Appending one more position to a k-tuple cannot destroy the attractor property, so P_n(k) ≤ P_n(k+1).

theorem thue_morse_random_attractor_prob_mono (n k : ℕ) :
    thue_morse_random_attractor_prob n k ≤ thue_morse_random_attractor_prob n (k + 1)
thue_morse_random_attractor_prob_union_boundIn LeanCombinatorics for TCS

For all n and k, thue_morse_random_attractor_prob n k ≥ 1 - thue_morse_unhit_mean n k: the probability that k uniform positions of t_n form a string attractor is at least one minus the expected number of unhit inclusion-minimal factor coverages.

theorem thue_morse_random_attractor_prob_union_bound (n k : ℕ) :
    1 - thue_morse_unhit_mean n k ≤ thue_morse_random_attractor_prob n k
thue_morse_sup_lattice_gumbel_of_poisson_and_meanIn LeanCombinatorics for TCS

If the sup over k of |P_n(k) - exp(-μ_n(k))| and the sup over k of |exp(-μ_n(k)) - exp(-8n(5/6)^k)| both tend to 0, and the expected unhit counts are nonnegative, then the sup over k of |P_n(k) - exp(-8n(5/6)^k)| tends to 0.

theorem thue_morse_sup_lattice_gumbel_of_poisson_and_mean
    (hP : ∀ n k, thue_morse_random_attractor_prob n k ∈ Set.Icc (0 : ℝ) 1)
    (hμ : ∀ n k, 0 ≤ thue_morse_unhit_mean n k)
    (h1 : Filter.Tendsto (fun n : ℕ => ⨆ k : ℕ,
      |thue_morse_random_attractor_prob n k - Real.exp (-(thue_morse_unhit_mean n k))|)
      Filter.atTop (nhds 0))
    (h2 : Filter.Tendsto (fun n : ℕ => ⨆ k : ℕ,
      |Real.exp (-(thue_morse_unhit_mean n k)) - Real.exp (-8 * ((n : ℕ) : ℝ) * (5 / 6 : ℝ) ^ k)|)
      Filter.atTop (nhds 0)) :
    Filter.Tendsto (fun n : ℕ => ⨆ k : ℕ,
      |thue_morse_random_attractor_prob n k - Real.exp (-8 * (n : ℝ) * (5 / 6 : ℝ) ^ k)|)
      Filter.atTop (nhds 0)
thue_morse_unhit_mean_antitoneIn LeanCombinatorics for TCS

The expected number of unhit minimal coverages μ_n(k) is nonincreasing in the number of sampled positions k.

theorem thue_morse_unhit_mean_antitone (n : ℕ) :
    Antitone (fun k => thue_morse_unhit_mean n k)
thue_morse_unhit_mean_halvingIn LeanCombinatorics for TCS

For all n and k, μ_n(k)/2 ≤ μ_n(k+1).

theorem thue_morse_unhit_mean_halving (n k : ℕ) :
    thue_morse_unhit_mean n k / 2 ≤ thue_morse_unhit_mean n (k + 1)
thue_morse_unhit_mean_large_tailIn LeanCombinatorics for TCS

When 8n(5/6)^k > M, M/2 ≤ μ_n(k) for large n.

theorem thue_morse_unhit_mean_large_tail (M : ℝ) (hM : 0 < M) :
    ∀ᶠ (n : ℕ) in Filter.atTop, ∀ k : ℕ,
      M < 8 * (n : ℝ) * (5 / 6 : ℝ) ^ k → M / 2 ≤ thue_morse_unhit_mean n k
thue_morse_unhit_mean_nearIn LeanCombinatorics for TCS

In the window ε ≤ 8n(5/6)^k ≤ 1/ε, μ_n(k) is within ε of 8n(5/6)^k for large n.

theorem thue_morse_unhit_mean_near (ε : ℝ) (hε : 0 < ε) :
    ∀ᶠ (n : ℕ) in Filter.atTop, ∀ k : ℕ,
      ε ≤ 8 * (n : ℝ) * (5 / 6 : ℝ) ^ k → 8 * (n : ℝ) * (5 / 6 : ℝ) ^ k ≤ 1 / ε →
      |thue_morse_unhit_mean n k - 8 * (n : ℝ) * (5 / 6 : ℝ) ^ k| ≤ ε
thue_morse_unhit_mean_small_tailIn LeanCombinatorics for TCS

When 8n(5/6)^k < ε, μ_n(k) ≤ 2ε for large n.

theorem thue_morse_unhit_mean_small_tail (ε : ℝ) (hε : 0 < ε) :
    ∀ᶠ (n : ℕ) in Filter.atTop, ∀ k : ℕ,
      8 * (n : ℝ) * (5 / 6 : ℝ) ^ k < ε → thue_morse_unhit_mean n k ≤ 2 * ε
thue_morse_unhit_mean_tendsto_zeroIn LeanCombinatorics for TCS

For fixed n, μ_n(k) → 0 as k → ∞.

theorem thue_morse_unhit_mean_tendsto_zero (n : ℕ) :
    Filter.Tendsto (fun k => thue_morse_unhit_mean n k) Filter.atTop (nhds 0)
thue_morse_unhit_mean_uniformIn LeanCombinatorics for TCS

The supremum over k of |exp(-μ_n(k)) - exp(-8n(5/6)^k)| tends to 0, i.e. the expected unhit count μ_n(k) is asymptotic to 8n(5/6)^k uniformly in the exponent sup-norm.

theorem thue_morse_unhit_mean_uniform :
    Filter.Tendsto (fun n : ℕ => ⨆ k : ℕ,
      |Real.exp (-(thue_morse_unhit_mean n k)) - Real.exp (-8 * ((n : ℕ) : ℝ) * (5 / 6 : ℝ) ^ k)|)
      Filter.atTop (nhds 0)
thue_morse_unhit_mean_window_reductionIn LeanCombinatorics for TCS

Analytical supremum reduction for approximating exp(-8n(5/6)^k) in sup-norm across k.

theorem thue_morse_unhit_mean_window_reduction
    (a : ℕ → ℕ → ℝ) (ha_nonneg : ∀ n k, 0 ≤ a n k)
    (h_near : ∀ ε > 0, ∀ᶠ (n : ℕ) in Filter.atTop, ∀ k : ℕ,
      ε ≤ 8 * (n : ℝ) * (5 / 6 : ℝ) ^ k → 8 * (n : ℝ) * (5 / 6 : ℝ) ^ k ≤ 1 / ε →
      |a n k - 8 * (n : ℝ) * (5 / 6 : ℝ) ^ k| ≤ ε)
    (h_small : ∀ ε > 0, ∀ᶠ (n : ℕ) in Filter.atTop, ∀ k : ℕ,
      8 * (n : ℝ) * (5 / 6 : ℝ) ^ k < ε → a n k ≤ 2 * ε)
    (h_large : ∀ M > 0, ∀ᶠ (n : ℕ) in Filter.atTop, ∀ k : ℕ,
      M < 8 * (n : ℝ) * (5 / 6 : ℝ) ^ k → M / 2 ≤ a n k) :
    Filter.Tendsto (fun n : ℕ => ⨆ k : ℕ,
      |Real.exp (-(a n k)) - Real.exp (-8 * ((n : ℕ) : ℝ) * (5 / 6 : ℝ) ^ k)|)
      Filter.atTop (nhds 0)
thue_morse_unhit_term_exp_boundIn LeanCombinatorics for TCS

For 0 ≤ x ≤ 1 and every k, (1-x)^k ≤ exp(-x k).

theorem thue_morse_unhit_term_exp_bound {x : ℝ} (h0 : 0 ≤ x) (h1 : x ≤ 1) (k : ℕ) :
    (1 - x) ^ k ≤ Real.exp (-(x * k))
tournament_not_reaches_out_degree_ltIn LeanCombinatorics for TCS

In two tournaments $T_1$ and $T_2$ on a finite type $V$, if a vertex $x$ does not reach a vertex $v$ via $x = v$, an arc in $T_1$, an arc in $T_2$, or an arc in $T_1$ followed by an arc in $T_2$, then the out-degree of $x$ in $T_1$ is strictly less than the out-degree of $v$ in $T_2$.

open Classical in
theorem tournament_not_reaches_out_degree_lt {V : Type*} [Fintype V] (T₁ T₂ : Digraph V)
    (hT₁ : digraph_is_tournament T₁) (hT₂ : digraph_is_tournament T₂)
    (x v : V)
    (hnot : ¬ (x = v ∨ T₁.Adj x v ∨ T₂.Adj x v ∨ ∃ w, T₁.Adj x w ∧ T₂.Adj w v)) :
    digraph_out_degree T₁ x < digraph_out_degree T₂ v
tournament_sum_out_degreeIn LeanCombinatorics for TCS

In any tournament $T$ on a finite type $V$, the sum over all vertices of their out-degrees in $T$ equals $|V|(|V|-1)/2$.

open Classical in
theorem tournament_sum_out_degree {V : Type*} [Fintype V] (T : Digraph V)
    (hT : digraph_is_tournament T) :
    ∑ i : V, digraph_out_degree T i = (Fintype.card V) * (Fintype.card V - 1) / 2
transverse_plane_incidence_double_countIn LeanCombinatorics for TCS

Let p be a prime, S an admissible plane set in (ZMod p)^3 containing the affine line through P in direction v ≠ 0, and Q any point. Then the total, over x in S, of the number of functionals f with f(v) ≠ 0 and f(x) = f(Q), equals p times the number of functionals f with f(v) ≠ 0.

theorem transverse_plane_incidence_double_count
    (p : ℕ) [Fact p.Prime] (S : Set (Fin 3 → ZMod p)) [Fintype ↥S]
    (hS : admissible_plane_set p S) (P v : Fin 3 → ZMod p) (hv : v ≠ 0)
    (hline : affine_line P v ⊆ S) (Q : Fin 3 → ZMod p) :
    (∑ x ∈ S.toFinset, Nat.card {f : (Fin 3 → ZMod p) →ₗ[ZMod p] ZMod p // f v ≠ 0 ∧ f x = f Q})
      = p * Nat.card {f : (Fin 3 → ZMod p) →ₗ[ZMod p] ZMod p // f v ≠ 0}
tree_exists_leaf_with_good_neighborIn LeanCombinatorics for TCS

For every tree T on at least 3 vertices with maximum degree at most 3, there are vertices v, u with v a leaf adjacent to u such that either u has degree 2, or u is adjacent to a second leaf w ≠ v.

theorem tree_exists_leaf_with_good_neighbor {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) [DecidableRel T.Adj] (hT : T.IsTree) (hdeg : T.maxDegree ≤ 3)
    (hcard : 3 ≤ Fintype.card V) :
    ∃ v u : V, T.degree v = 1 ∧ T.Adj v u ∧
      (T.degree u = 2 ∨ ∃ w : V, w ≠ v ∧ T.Adj u w ∧ T.degree w = 1)
tree_max_degree_two_petrial_ker_finrank_le_oneIn LeanCombinatorics for TCS

For any tree T with maximum degree at most 2 and any subset F of vertices, the nullspace of petrial_matrix T F has dimension at most 1 over ZMod 2.

theorem tree_max_degree_two_petrial_ker_finrank_le_one
    {V : Type*} [Fintype V] [DecidableEq V] (T : SimpleGraph V) [DecidableRel T.Adj]
    (hT : T.IsTree) (hdeg : T.maxDegree ≤ 2) (F : Finset V) :
    Module.finrank (ZMod 2) ↥(petrial_matrix T F).mulVecLin.ker ≤ 1
tree_max_degree_two_petrial_ker_zeroIn LeanCombinatorics for TCS

In a tree T with maximum degree at most 2, any vector z in the kernel of the partial Petrial matrix petrial_matrix T F that vanishes at a leaf v0 must be identically zero.

theorem tree_max_degree_two_petrial_ker_zero
    {V : Type*} [Fintype V] [DecidableEq V] (T : SimpleGraph V) [DecidableRel T.Adj]
    (hT : T.IsTree) (hdeg : T.maxDegree ≤ 2) (F : Finset V)
    (z : V → ZMod 2) (hz : (petrial_matrix T F).mulVec z = 0)
    (v0 : V) (hv0 : T.degree v0 = 1) (hz0 : z v0 = 0) :
    z = 0
tree_max_degree_two_petrial_matrix_rank_geIn LeanCombinatorics for TCS

For any tree T with maximum degree at most 2 and any subset F of vertices, the rank of petrial_matrix T F over ZMod 2 is at least |V| - 1.

theorem tree_max_degree_two_petrial_matrix_rank_ge
    {V : Type*} [Fintype V] [DecidableEq V] (T : SimpleGraph V) [DecidableRel T.Adj]
    (hT : T.IsTree) (hdeg : T.maxDegree ≤ 2) (F : Finset V) :
    Fintype.card V - 1 ≤ (petrial_matrix T F).rank
trig_poly_affine_four_rootsIn LeanCombinatorics for TCS

If a function f(t) = c₀ + c₁ * t + c₂ * cos t + c₃ * sin t has at least four roots in an open interval (a, b) of length less than π, then c₁ = 0, c₂ = 0, and c₃ = 0.

theorem trig_poly_affine_four_roots (c₀ c₁ c₂ c₃ a b : ℝ) (hab : b - a < Real.pi)
    (s : Finset ℝ) (hs : ∀ t ∈ s, t ∈ Set.Ioo a b)
    (hroot : ∀ t ∈ s, c₀ + c₁ * t + c₂ * Real.cos t + c₃ * Real.sin t = 0)
    (hcard : 4 ≤ s.card) : c₁ = 0 ∧ c₂ = 0 ∧ c₃ = 0
turan_hypergraph_zycle_free_of_lt_two_mulIn LeanCombinatorics for TCS

For n < 2ℓ the balanced Turán hypergraph T_n is automatically Z_ℓ-free, because Z_ℓ has 2ℓ vertices and therefore cannot be embedded into Fin n. This is the vacuous small-n half of the Z_ℓ-freeness of the Turán construction.

theorem turan_hypergraph_zycle_free_of_lt_two_mul (ℓ n : ℕ) [NeZero ℓ] (h : n < 2 * ℓ) : is_hypergraph_free (turan_hypergraph n) (zycle ℓ)
two_tournaments_reachabilityIn LeanCombinatorics for TCS

Let $T_1, T_2$ be tournaments on a common finite nonempty vertex set $V$. Then there exists a vertex $v \in V$ such that every vertex in $V$ is reached from $v$ by an arc in $T_1$, an arc in $T_2$, or an arc in $T_1$ followed by an arc in $T_2$; that is, for all $u \in V$, $u = v$, or $T_1.Adj\ v\ u$, or $T_2.Adj\ v\ u$, or there exists $w \in V$ such that $T_1.Adj\ v\ w$ and $T_2.Adj\ w\ u$.

open Classical in
theorem two_tournaments_reachability {V : Type*} [Fintype V] [Nonempty V]
    (T₁ T₂ : Digraph V) (hT₁ : digraph_is_tournament T₁) (hT₂ : digraph_is_tournament T₂) :
    ∃ v : V, ∀ u : V, u = v ∨ T₁.Adj v u ∨ T₂.Adj v u ∨ ∃ w : V, T₁.Adj v w ∧ T₂.Adj w u
two_tournaments_sum_out_degree_eqIn LeanCombinatorics for TCS

For any two tournaments $T_1$ and $T_2$ on the same finite vertex type $V$, the sum of the out-degrees of all vertices in $T_1$ equals the sum of the out-degrees of all vertices in $T_2$.

open Classical in
theorem two_tournaments_sum_out_degree_eq {V : Type*} [Fintype V] (T₁ T₂ : Digraph V)
    (hT₁ : digraph_is_tournament T₁) (hT₂ : digraph_is_tournament T₂) :
    ∑ v : V, digraph_out_degree T₁ v = ∑ v : V, digraph_out_degree T₂ v
two_triangles_sharing_vertex_not_cohen_macaulayIn LeanCombinatorics for TCS

Two triangles sharing exactly one vertex, the complex with facets {0,1,2} and {0,3,4} on Fin 5, is not Cohen-Macaulay over any field: the link of the shared vertex 0 is the two disjoint edges {1,2} and {3,4}, hence disconnected.

theorem two_triangles_sharing_vertex_not_cohen_macaulay (k : Type*) [Field k] :
    ¬ is_cohen_macaulay_two_complex ({ {0, 1, 2}, {0, 3, 4} } : Finset (Finset (Fin 5))) k
two_uniform_aura_bound_iffIn LeanCombinatorics for TCS

For any natural numbers r and a, every 2-uniform r-flower-free system on any type α with decidable equality has aura at most a if and only if every 2-uniform r-flower-free system on Fin n has aura at most a.

theorem two_uniform_aura_bound_iff (r a : ℕ) :
    (∀ {α : Type*} [DecidableEq α] (S : Finset (Finset α)),
      (∀ A ∈ S, A.card = 2) →
      (¬ ∃ F ⊆ S, F.card = r ∧ ∃ C, IsSunflower F C) →
      (S.biUnion id).card + (r - 1) * S.card ≤ a) ↔
    (∀ (n : ℕ) (S : Finset (Finset (Fin n))),
      (∀ A ∈ S, A.card = 2) →
      (¬ ∃ F ⊆ S, F.card = r ∧ ∃ C, IsSunflower F C) →
      (S.biUnion id).card + (r - 1) * S.card ≤ a)
two_uniform_aura_finite_boundIn LeanCombinatorics for TCS

For every natural number r ≥ 3, there exists a finite constant M such that every 2-uniform r-flower-free system S on any type α with decidable equality satisfies |⋃ S| + (r - 1) * |S| ≤ M.

theorem two_uniform_aura_finite_bound (r : ℕ) (hr : 3 ≤ r) :
    ∃ M : ℕ,
      ∀ {α : Type*} [DecidableEq α] (S : Finset (Finset α)),
        (∀ A ∈ S, A.card = 2) →
        (¬ ∃ F ⊆ S, F.card = r ∧ ∃ C, IsSunflower F C) →
        (S.biUnion id).card + (r - 1) * S.card ≤ M
two_uniform_max_aura_existsIn LeanCombinatorics for TCS

For every natural number r ≥ 3, there exists a natural number a such that every 2-uniform r-flower-free system S on any type α with decidable equality satisfies |⋃ S| + (r - 1) * |S| ≤ a, and there exists a natural number n and a 2-uniform r-flower-free system on Fin n attaining aura exactly a.

theorem two_uniform_max_aura_exists (r : ℕ) (hr : 3 ≤ r) :
    ∃ a : ℕ,
      (∀ {α : Type*} [DecidableEq α] (S : Finset (Finset α)),
        (∀ A ∈ S, A.card = 2) →
        (¬ ∃ F ⊆ S, F.card = r ∧ ∃ C, IsSunflower F C) →
        (S.biUnion id).card + (r - 1) * S.card ≤ a) ∧
      (∃ (n : ℕ) (S : Finset (Finset (Fin n))),
        (∀ A ∈ S, A.card = 2) ∧
        (¬ ∃ F ⊆ S, F.card = r ∧ ∃ C, IsSunflower F C) ∧
        (S.biUnion id).card + (r - 1) * S.card = a)
two_uniform_to_three_uniform_systemIn LeanCombinatorics for TCS

For any r ≥ 3 and any 2-uniform r-flower-free system S on Fin n, there exists m and a 3-uniform r-flower-free system S' on Fin m with span equal to the aura of S, i.e., |⋃ S'| = |⋃ S| + (r - 1) * |S|.

theorem two_uniform_to_three_uniform_system (r : ℕ) (hr : 3 ≤ r)
    (n : ℕ) (S : Finset (Finset (Fin n)))
    (h2 : ∀ A ∈ S, A.card = 2)
    (hfree : ¬ ∃ F ⊆ S, F.card = r ∧ ∃ C, IsSunflower F C) :
    ∃ (m : ℕ) (S' : Finset (Finset (Fin m))),
      (∀ A ∈ S', A.card = 3) ∧
      (¬ ∃ F ⊆ S', F.card = r ∧ ∃ C, IsSunflower F C) ∧
      (S'.biUnion id).card = (S.biUnion id).card + (r - 1) * S.card
union_min_of_strong_eliminationIn LeanCombinatorics for TCS

If a finite collection C of finite sets has the strong elimination property, then every nonempty set F in C is a union of sets in collection_min_nonempty C.

theorem union_min_of_strong_elimination {V : Type*} [DecidableEq V]
    {C : Finset (Finset V)} (h : has_strong_elimination C)
    (F : Finset V) (hF : F ∈ C) (hne : F.Nonempty) :
    ∃ U ⊆ collection_min_nonempty C, F = U.biUnion id
unique_path_of_weight_lt_half_girthIn LeanCombinatorics for TCS

In a graph with nonnegative edge weights where every cycle has weight at least gw, between any two vertices u and v there is at most one path of weight strictly less than gw / 2.

open scoped BigOperators Classical in
theorem unique_path_of_weight_lt_half_girth {V : Type*}
    (G : SimpleGraph V) (ω : Sym2 V → ℝ) (hω : ∀ e ∈ G.edgeSet, 0 ≤ ω e)
    (gw : ℝ)
    (hgirth : ∀ (w : V) (c : G.Walk w w), c.IsCycle → gw ≤ (c.edges.map ω).sum)
    {u v : V} (p q : G.Walk u v) (hp : p.IsPath) (hq : q.IsPath)
    (hpw : (p.edges.map ω).sum < gw / 2)
    (hqw : (q.edges.map ω).sum < gw / 2) :
    p = q
weakened_cycle_ramsey_property_nonemptyIn LeanCombinatorics for TCS

For any number of colours t ≥ 2 and cycle length ℓ ≥ 3, there exists an integer n such that every t-edge-colouring of K_n contains an ℓ-cycle avoiding at least one colour.

theorem weakened_cycle_ramsey_property_nonempty (t ℓ : ℕ) (ht : 2 ≤ t) (hℓ : 3 ≤ ℓ) :
    ∃ n : ℕ, weakened_cycle_ramsey_property t ℓ n
weakened_cycle_ramsey_property_succ_impIn LeanCombinatorics for TCS

For all integers t ≥ 4, ℓ ≥ 4, and n, if every t-edge-colouring of K_n contains an (ℓ+1)-cycle avoiding at least one colour, then every t-edge-colouring of K_n contains an ℓ-cycle avoiding at least one colour.

theorem weakened_cycle_ramsey_property_succ_imp (t ℓ n : ℕ) (ht : 4 ≤ t) (hℓ : 4 ≤ ℓ)
    (h : weakened_cycle_ramsey_property t (ℓ + 1) n) :
    weakened_cycle_ramsey_property t ℓ n
weakened_cycle_ramsey_property_three_colors_succ_impIn LeanCombinatorics for TCS

For all ℓ ≥ 4 and n, if every 3-edge-colouring of K_n contains an (ℓ+1)-cycle avoiding at least one colour, then every 3-edge-colouring of K_n contains an ℓ-cycle avoiding at least one colour.

theorem weakened_cycle_ramsey_property_three_colors_succ_imp (ℓ n : ℕ) (hℓ : 4 ≤ ℓ)
    (h : weakened_cycle_ramsey_property 3 (ℓ + 1) n) :
    weakened_cycle_ramsey_property 3 ℓ n
weighted_esymm_three_sos_identityIn LeanCombinatorics for TCS

For integer variables indexed by a finite set, the degree-three Newton expression equals a sum over pairs of squared differences times a nonnegative complete homogeneous quadratic on the remaining variables.

theorem weighted_esymm_three_sos_identity {V : Type*} [DecidableEq V] (s : Finset V) (w : V → ℤ) : let e := fun k : ℕ => ∑ A ∈ s.powersetCard k, ∏ i ∈ A, w i; 2 * ((s.card : ℤ) - 2) * (e 2) ^ 2 - 3 * ((s.card : ℤ) - 1) * e 1 * e 3 = ∑ A ∈ s.powersetCard 2, (((∑ i ∈ A, w i) ^ 2 - 4 * (∏ i ∈ A, w i)) * ((∑ z ∈ s \ A, (w z) ^ 2) + ∑ B ∈ (s \ A).powersetCard 2, ∏ z ∈ B, w z))
word_min_factor_coverages_eq_of_absorbing_antichainIn LeanCombinatorics for TCS

Let w be a finite word and B a finite set of words such that (L1) every u ∈ B is a nonempty factor of w, (L2) every nonempty factor x of w has Cov_w(u) ⊆ Cov_w(x) for some u ∈ B, and (L3) the covariances Cov_w(u) for u ∈ B are an antichain: if Cov_w(u) ⊆ Cov_w(v) for u, v ∈ B then u = v. Then the inclusion-minimal factor coverages of w are exactly {Cov_w(u) | u ∈ B}, and u ↦ Cov_w(u) is injective on B.

theorem word_min_factor_coverages_eq_of_absorbing_antichain {α : Type*} [DecidableEq α]
    (w : List α) (B : Finset (List α))
    (h1 : ∀ u ∈ B, u ≠ [] ∧ u <:+: w)
    (h2 : ∀ x : List α, x ≠ [] → x <:+: w →
      ∃ u ∈ B, word_occurrence_coverage w u ⊆ word_occurrence_coverage w x)
    (h3 : ∀ u ∈ B, ∀ v ∈ B, word_occurrence_coverage w u ⊆ word_occurrence_coverage w v → u = v) :
    word_min_factor_coverages w = {word_occurrence_coverage w u | u ∈ B} ∧
      Set.InjOn (word_occurrence_coverage w) ↑B
word_occurrence_coverage_subset_of_located_occurrencesIn LeanCombinatorics for TCS

If every occurrence of u in w starting at p is matched by an occurrence of x in w starting at some q ≤ p with p + |u| ≤ q + |x|, then the coverage of u in w is contained in the coverage of x in w.

theorem word_occurrence_coverage_subset_of_located_occurrences {α : Type*} [DecidableEq α]
    (w x u : List α)
    (h : ∀ p ∈ Finset.Icc 1 w.length, (w.drop (p - 1)).take u.length = u →
      ∃ q ∈ Finset.Icc 1 w.length, (w.drop (q - 1)).take x.length = x ∧
        q ≤ p ∧ p + u.length ≤ q + x.length) :
    word_occurrence_coverage w u ⊆ word_occurrence_coverage w x
young_diagram_dominates_iff_row_min_sum_leIn LeanCombinatorics for TCS

A Young diagram ν dominates its conjugate diagram if and only if, for every t, the truncated sum ∑_{i < colLen 0} min(ν.rowLen i, t) is at most the truncated sum ∑_{j < rowLen 0} min(ν.colLen j, t). Equivalently: the prefix sums of row lengths are at least the prefix sums of column lengths, tested by their staircase truncations.

theorem young_diagram_dominates_iff_row_min_sum_le (ν : YoungDiagram) :
    young_diagram_dominates_conjugate ν ↔ ∀ t : ℕ,
      (∑ i ∈ Finset.range (ν.colLen 0), min (ν.rowLen i) t)
        ≤ ∑ j ∈ Finset.range (ν.rowLen 0), min (ν.colLen j) t
young_diagram_dvd_rowLenIn LeanCombinatorics for TCS

The greatest common divisor of the row lengths of a Young diagram μ divides the length of any row in μ.

theorem young_diagram_dvd_rowLen (μ : YoungDiagram) (i : ℕ) (hi : i < μ.colLen 0) :
    young_diagram_part_gcd μ ∣ μ.rowLen i
young_diagram_filter_card_eq_sum_colIn LeanCombinatorics for TCS

Double counting along columns: for any predicate P on cells, the number of cells of a Young diagram ν satisfying P is the sum, over the columns j = 0, …, rowLen 0 − 1, of the number of cells of column j satisfying P.

theorem young_diagram_filter_card_eq_sum_col (ν : YoungDiagram) (P : ℕ → ℕ → Prop) [DecidableRel P] :
    (ν.cells.filter (fun c => P c.1 c.2)).card
      = ∑ j ∈ Finset.range (ν.rowLen 0), ((ν.col j).filter (fun c => P c.1 c.2)).card
young_diagram_filter_card_eq_sum_rowIn LeanCombinatorics for TCS

Double counting along rows: for any predicate P on cells, the number of cells of a Young diagram ν satisfying P is the sum, over the rows i = 0, …, colLen 0 − 1, of the number of cells of row i satisfying P.

theorem young_diagram_filter_card_eq_sum_row (ν : YoungDiagram) (P : ℕ → ℕ → Prop) [DecidableRel P] :
    (ν.cells.filter (fun c => P c.1 c.2)).card
      = ∑ i ∈ Finset.range (ν.colLen 0), ((ν.row i).filter (fun c => P c.1 c.2)).card
young_diagram_same_len_rows_below_lt_max_multiplicityIn LeanCombinatorics for TCS

The number of rows in a Young diagram μ strictly below row i of the same length is strictly less than the maximum multiplicity of any row length in μ.

theorem young_diagram_same_len_rows_below_lt_max_multiplicity (μ : YoungDiagram) (i : ℕ) (hi : i < μ.colLen 0) :
    young_diagram_same_len_rows_below μ i < young_diagram_max_multiplicity μ
young_diagram_same_len_rows_below_strict_antiIn LeanCombinatorics for TCS

For two rows i₁ < i₂ of equal length in a Young diagram μ, the number of equal-length rows strictly below i₂ is strictly less than that strictly below i₁.

theorem young_diagram_same_len_rows_below_strict_anti (μ : YoungDiagram) (i₁ i₂ : ℕ)
    (hi : i₁ < i₂) (heq : μ.rowLen i₁ = μ.rowLen i₂) (h₂ : i₂ < μ.colLen 0) :
    young_diagram_same_len_rows_below μ i₂ < young_diagram_same_len_rows_below μ i₁
young_diagram_sum_min_col_lenIn LeanCombinatorics for TCS

The cells of a Young diagram ν that lie in one of the first t rows, counted column by column, give ∑_{j} min(ν.colLen j, t); counted row by row they give ∑_{i<t} ν.rowLen i. Hence the two sums agree.

theorem young_diagram_sum_min_col_len (ν : YoungDiagram) (t : ℕ) :
    (∑ j ∈ Finset.range (ν.rowLen 0), min (ν.colLen j) t) = ∑ i ∈ Finset.range t, ν.rowLen i
young_diagram_sum_min_row_lenIn LeanCombinatorics for TCS

The cells of a Young diagram ν that lie in one of the first t columns, counted row by row, give ∑_{i} min(ν.rowLen i, t); counted column by column they give ∑_{j<t} ν.colLen j. Hence the two sums agree.

theorem young_diagram_sum_min_row_len (ν : YoungDiagram) (t : ℕ) :
    (∑ i ∈ Finset.range (ν.colLen 0), min (ν.rowLen i) t) = ∑ j ∈ Finset.range t, ν.colLen j
zero_rank_l_matrix_order_le_oneIn LeanCombinatorics for TCS

If $M$ is an $n \times n$ $L$-matrix over a field $K$ with $0 \notin L$, and the rank of $M$ is 0, then $n \leq 1$.

theorem zero_rank_l_matrix_order_le_one {n : ℕ} {K : Type*} [Field K]
    (L : Set K) (hL0 : (0 : K) ∉ L)
    (M : Matrix (Fin n) (Fin n) K) (hM : is_l_matrix M L) (hrank : M.rank = 0) :
    n ≤ 1
zero_sum_w_bad_length_le_two_mul_rankIn LeanCombinatorics for TCS

Every w-bad sequence of vectors in ℤ^r has length at most 2*r*(n-1).

theorem zero_sum_w_bad_length_le_two_mul_rank (r n : ℕ) (hn : 1 < n) (A : List (Fin r → ℤ)) (hbad : zero_sum_w_bad n A) : A.length ≤ 2 * r * (n - 1)
zero_sum_w_bad_replicate_leIn LeanCombinatorics for TCS

A constant sequence of length k is w-bad only if k ≤ n - 1.

theorem zero_sum_w_bad_replicate_le (n r k : ℕ) (hn : 1 < n) (x : Fin r → ℤ) (hk : 1 ≤ k) (hbad : zero_sum_w_bad n (List.replicate k x)) : k ≤ n - 1
zero_sum_w_bad_sublistIn LeanCombinatorics for TCS

Any sublist of a w-bad sequence is also w-bad.

theorem zero_sum_w_bad_sublist {n r : ℕ} {A B : List (Fin r → ℤ)} (hsub : B.Sublist A) (hbad : zero_sum_w_bad n A) : zero_sum_w_bad n B
zmod8_cube_graph_bipartiteIn LeanCombinatorics for TCS

The cube graph Q_3 on ZMod 8 is bipartite, with the parity of the residue of a vertex as 2-colouring; an edge x ~ y has (x + y).val odd.

theorem zmod8_cube_graph_bipartite : zmod8_cube_graph.IsBipartite
zmod8_cube_graph_degreeIn LeanCombinatorics for TCS

Every vertex of the cube graph Q_3 on ZMod 8 has degree 3.

theorem zmod8_cube_graph_degree (v : ZMod 8) : zmod8_cube_graph.degree v = 3
zmod8_cube_graph_has_edgeIn LeanCombinatorics for TCS

The Hankel cube graph on ZMod 8 has at least one edge (witnessed by the pair (0, 1) since (0 + 1).val = 1).

theorem zmod8_cube_graph_has_edge : ∃ u v : ZMod 8, zmod8_cube_graph.Adj u v
zmod8_cube_graph_not_circulantIn LeanCombinatorics for TCS

The cube graph Q_3 on ZMod 8 is not isomorphic to any circulant graph on ZMod 8: it is bipartite but 3-regular, whereas every 3-regular circulant graph on ZMod 8 has an odd cycle.

theorem zmod8_cube_graph_not_circulant : ¬ is_circulant_graph 8 zmod8_cube_graph
zmod8_cube_graph_sharpIn LeanCombinatorics for TCS

The Hankel cube graph on ZMod 8 admits a sharp cyclic labeling, witnessed by the identity bijection since its adjacency matrix is Hankel and therefore its 2D Fourier transform is diagonal.

theorem zmod8_cube_graph_sharp : admits_sharp_cyclic_labeling 8 zmod8_cube_graph
zmod8_neg_closed_three_cardIn LeanCombinatorics for TCS

Every 3-element subset T of ZMod 8 that is closed under negation and does not contain 0 has the form {a, -a, 4} where a ≠ 0 and a ≠ 4 (so uniquely, the pair of nonzero, non-antipodal residues is determined by T).

theorem zmod8_neg_closed_three_card (T : Finset (ZMod 8)) (hcard : T.card = 3)
    (hsym : ∀ w ∈ T, -w ∈ T) (h0 : (0 : ZMod 8) ∉ T) :
    ∃ a : ZMod 8, a ≠ 0 ∧ a ≠ 4 ∧ T = {a, -a, 4}
zmod_four_dft_single_frequency_constantIn LeanCombinatorics for TCS

Let c : ZMod 4 → ℕ. If all but at most one of its Fourier coefficients ∑_y c y · exp(−2πi·(n·y)/4) vanish, then c is constant; in particular the corresponding "graph" is regular.

theorem zmod_four_dft_single_frequency_constant (c : ZMod 4 → ℕ) (n₀ : ZMod 4)
    (h : ∀ n : ZMod 4, n ≠ n₀ →
      ∑ y : ZMod 4, (c y : ℂ) *
        Complex.exp (-2 * ↑Real.pi * Complex.I * (↑((n * y).val) / ↑(4 : ℕ))) = 0) :
    ∃ d : ℕ, ∀ y : ZMod 4, c y = d
zmod_power_sums_determine_multisetIn LeanCombinatorics for TCS

Paper Lemma 2.1: over the prime field ZMod q, a multiset of r elements with r < q is determined by its first r power sums Σ a, Σ a², …, Σ a^r.

theorem zmod_power_sums_determine_multiset (q r : ℕ) [Fact q.Prime] (hr : r < q)
    (m m' : Multiset (ZMod q)) (hm : m.card = r) (hm' : m'.card = r)
    (hp : ∀ j : ℕ, 1 ≤ j → j ≤ r → (m.map (fun a => a ^ j)).sum = (m'.map (fun a => a ^ j)).sum) :
    m = m'
zmod_sub_reverse_bijectiveIn LeanCombinatorics for TCS

For any element r in ZMod n, the map s ↦ r - s is a bijection on ZMod n.

theorem zmod_sub_reverse_bijective {n : ℕ} (r : ZMod n) :
    Function.Bijective (fun s : ZMod n ↦ r - s)
zycle_vertex_cardIn LeanCombinatorics for TCS

The zycle Z_ℓ has exactly 2ℓ vertices: its vertex set is ZMod ℓ × Fin 2.

theorem zycle_vertex_card (ℓ : ℕ) [NeZero ℓ] : Fintype.card (ZMod ℓ × Fin 2) = 2 * ℓ
CommunicationComplexity.two_overlapping_rectangles_zeros_length_sum_geIn LeanCommunication Complexity

In any deterministic protocol computing the two-overlapping-rectangles function, the sum of communication lengths on inputs (0, 0) and (2, 2) is at least 5.

theorem CommunicationComplexity.two_overlapping_rectangles_zeros_length_sum_ge
    (p : CommunicationComplexity.Deterministic.Protocol (Fin 3) (Fin 3) Bool)
    (hcomp : p.Computes CommunicationComplexity.two_overlapping_rectangles) :
    5 ≤ p.length 0 0 + p.length 2 2
apex_graph_connected_iffIn LeanCommunication Complexity

Let n ≥ 1. The apex graph on Fin (n + 1) formed by adding an apex vertex adjacent to a subset S ⊆ Fin n of a graph H on Fin n is connected if and only if S intersects every connected component of H.

theorem apex_graph_connected_iff (n : ℕ) (hn : 1 ≤ n) (H : SimpleGraph (Fin n)) (S : Finset (Fin n)) :
    (apex_graph_fin n H S).Connected ↔ ∀ u : Fin n, ∃ s ∈ S, H.Reachable u s
commuting_quantum_efficiency_bddAboveIn LeanCommunication Complexity

The set of conclusive efficiencies achieved by zero-error commuting-operator protocols with K messages for equality on N labels is bounded above.

theorem commuting_quantum_efficiency_bddAbove (K N : ℕ) :
    BddAbove {c : ℝ | ∃ (p : Fin N → Fin N × Fin K → Fin K → Option Bool → ℝ),
      is_commuting_quantum p ∧
      (∀ (s t : Fin N), if s = t then ∑ a, p s (t, a) a (some false) = 0
        else ∑ a, p s (t, a) a (some true) = 0) ∧
      ∀ (s t : Fin N), c ≤ ∑ a, p s (t, a) a (some (decide (s = t)))}
commuting_quantum_one_bit_zero_error_vanishingIn LeanCommunication Complexity

Let $\psi$ be a unit vector of a real Hilbert space on which Alice's effects $A^m_s$ and Bob's effects $B^{o}_{t,m}$ act as commuting projections with all Alice operators commuting with all Bob operators. If the total probability of the forbidden answer vanishes on every input pair — $\sum_m \langle\psi, A^m_s B^{\mathrm{false}}_{s,m}\psi\rangle = 0$ on equal inputs and $\sum_m \langle\psi, A^m_s B^{\mathrm{true}}_{t,m}\psi\rangle = 0$ on unequal inputs — then each term vanishes separately, i.e. $A^m_s B^{\mathrm{false}}_{s,m}\psi = 0$ for all $s,m$ and $A^m_s B^{\mathrm{true}}_{t,m}\psi = 0$ whenever $s \ne t$.

theorem commuting_quantum_one_bit_zero_error_vanishing
    {E : Type} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E]
    {N : ℕ} (ψ : E)
    (A : Fin N → Fin 2 → E →L[ℝ] E) (B : Fin N → Fin 2 → Option Bool → E →L[ℝ] E)
    (hAproj : ∀ (s : Fin N) (m : Fin 2), IsStarProjection (A s m))
    (hBproj : ∀ (t : Fin N) (m : Fin 2) (o : Option Bool), IsStarProjection (B t m o))
    (hcomm : ∀ (s : Fin N) (m : Fin 2) (t : Fin N) (m' : Fin 2) (o : Option Bool),
      (A s m) * (B t m' o) = (B t m' o) * (A s m))
    (hz1 : ∀ s : Fin N, ∑ a : Fin 2, inner ℝ ψ (A s a (B s a (some false) ψ)) = 0)
    (hz2 : ∀ s t : Fin N, s ≠ t → ∑ a : Fin 2, inner ℝ ψ (A s a (B t a (some true) ψ)) = 0) :
    (∀ (s : Fin N) (a : Fin 2), A s a (B s a (some false) ψ) = 0) ∧
      ∀ (s t : Fin N) (a : Fin 2), s ≠ t → A s a (B t a (some true) ψ) = 0
const_vec_norm_eq_oneIn LeanCommunication Complexity

The normalized constant vector has norm 1.

theorem const_vec_norm_eq_one {ι : Type*} [Fintype ι] [Nonempty ι] : ‖const_vec ι‖ = 1
coord_proj_is_star_projectionIn LeanCommunication Complexity

A sum of standard-basis rank-one projections is a star projection.

theorem coord_proj_is_star_projection {ι : Type*} [Fintype ι] [DecidableEq ι] (S : Finset ι) :
    IsStarProjection (coord_proj S)
coord_proj_mulIn LeanCommunication Complexity

The product of the coordinate projections onto S and onto T is the coordinate projection onto S ∩ T; in particular coordinate projections commute.

theorem coord_proj_mul {ι : Type*} [Fintype ι] [DecidableEq ι] (S T : Finset ι) :
    coord_proj S * coord_proj T = coord_proj (S ∩ T)
equality_classical_behaviour_successIn LeanCommunication Complexity

The worst-case conclusive success probability of the shared-random-subset protocol equals (K−1)/N: the conclusive answer is always the correct one, and it is given for exactly those r with (s + r) mod N < K − 1 in Fin K, of which there are K − 1.

theorem equality_classical_behaviour_success (K N : ℕ) [NeZero N] (hK : 1 ≤ K) (hN : K ≤ N)
    (s t : Fin N) :
    ∑ a : Fin K, equality_classical_behaviour N K hK s (t, a) a (some (decide (s = t)))
      = ((K : ℝ) - 1) / (N : ℝ)
equality_classical_behaviour_sum_oneIn LeanCommunication Complexity

For every pair of inputs (s, t), the shares of randomness realizing each (message, output) pair sum to one: ∑_a ∑_o p(s,(t,a),a,o) = 1.

theorem equality_classical_behaviour_sum_one (K N : ℕ) [NeZero N] (hK : 1 ≤ K)
    (s t : Fin N) :
    ∑ a : Fin K, ∑ o : Option Bool, equality_classical_behaviour N K hK s (t, a) a o = 1
equality_classical_behaviour_zero_errorIn LeanCommunication Complexity

The protocol never errs: on equal inputs no conclusive 'false' output occurs, and on unequal inputs no conclusive 'true' output occurs.

theorem equality_classical_behaviour_zero_error (K N : ℕ) [NeZero N] (hK : 1 ≤ K) (hN : K ≤ N)
    (s t : Fin N) :
    (if s = t then ∑ a : Fin K, equality_classical_behaviour N K hK s (t, a) a (some false) = 0
     else ∑ a : Fin K, equality_classical_behaviour N K hK s (t, a) a (some true) = 0)
gaussian_majority_error_cubic_asymptoticsIn LeanCommunication Complexity

For any sequence lam_q of worst-variance maximizers for q ≥ 2, the rescaled excess error q^3 * (gaussian_majority_error q (lam_q q) - 1 / (4 * (q : ℝ))) tends to gaussian_majority_zeta_constant^2 / 8 as q → ∞.

theorem gaussian_majority_error_cubic_asymptotics (lam_q : ℕ → ℝ)
    (h_max : ∀ q ≥ 2, 1 < lam_q q ∧ ∀ lam > 0, lam ≠ lam_q q →
      gaussian_majority_error q lam < gaussian_majority_error q (lam_q q)) :
    Filter.Tendsto (fun q : ℕ ↦ (q : ℝ) ^ 3 * (gaussian_majority_error q (lam_q q) - 1 / (4 * (q : ℝ))))
      Filter.atTop (nhds (gaussian_majority_zeta_constant ^ 2 / 8))
gaussian_majority_worst_variance_at_one_ltIn LeanCommunication Complexity

For q ≥ 2 the equal-variance error is strictly smaller than the error at the worst-variance maximizer: gaussian_majority_error q 1 < gaussian_majority_error q (lam_q q).

theorem gaussian_majority_worst_variance_at_one_lt (lam_q : ℕ → ℝ)
    (h_max : ∀ q ≥ 2, 1 < lam_q q ∧ ∀ lam > 0, lam ≠ lam_q q →
      gaussian_majority_error q lam < gaussian_majority_error q (lam_q q)) :
    ∀ (q : ℕ), 2 ≤ q → gaussian_majority_error q 1 < gaussian_majority_error q (lam_q q)
gaussian_majority_worst_variance_comparisonIn LeanCommunication Complexity

A worst-variance maximizer weakly dominates every positive variance parameter: for every q ≥ 2 and every lam > 0, the error at lam is at most the error at the maximizer lam_q q.

theorem gaussian_majority_worst_variance_comparison (lam_q : ℕ → ℝ)
    (h_max : ∀ q ≥ 2, 1 < lam_q q ∧ ∀ lam > 0, lam ≠ lam_q q →
      gaussian_majority_error q lam < gaussian_majority_error q (lam_q q)) :
    ∀ (q : ℕ), 2 ≤ q → ∀ lam > 0, gaussian_majority_error q lam ≤ gaussian_majority_error q (lam_q q)
gaussian_majority_worst_variance_lower_bound_trivialIn LeanCommunication Complexity

The lower eventual bound holds outside the interesting region: for every ε ≥ c, for all sufficiently large q, c − ε < q · (lam_q q − 1).

theorem gaussian_majority_worst_variance_lower_bound_trivial (lam_q : ℕ → ℝ)
    (h_max : ∀ q ≥ 2, 1 < lam_q q ∧ ∀ lam > 0, lam ≠ lam_q q →
      gaussian_majority_error q lam < gaussian_majority_error q (lam_q q)) :
    ∀ ε ≥ gaussian_majority_zeta_constant, ∀ᶠ (q : ℕ) in Filter.atTop,
      gaussian_majority_zeta_constant - ε < (q : ℝ) * (lam_q q - 1)
gaussian_majority_worst_variance_rescaled_posIn LeanCommunication Complexity

For every q ≥ 2 the rescaled deviation is strictly positive: 0 < q · (lam_q q − 1).

theorem gaussian_majority_worst_variance_rescaled_pos (lam_q : ℕ → ℝ)
    (h_max : ∀ q ≥ 2, 1 < lam_q q ∧ ∀ lam > 0, lam ≠ lam_q q →
      gaussian_majority_error q lam < gaussian_majority_error q (lam_q q)) :
    ∀ (q : ℕ), 2 ≤ q → 0 < (q : ℝ) * (lam_q q - 1)
gaussian_majority_worst_variance_tendstoIn LeanCommunication Complexity

For any sequence lam_q of worst-variance maximizers for q ≥ 2, the rescaled deviation q * (lam_q q - 1) tends to the Gaussian majority zeta constant as q → ∞.

theorem gaussian_majority_worst_variance_tendsto (lam_q : ℕ → ℝ)
    (h_max : ∀ q ≥ 2, 1 < lam_q q ∧ ∀ lam > 0, lam ≠ lam_q q →
      gaussian_majority_error q lam < gaussian_majority_error q (lam_q q)) :
    Filter.Tendsto (fun q : ℕ ↦ (q : ℝ) * (lam_q q - 1)) Filter.atTop
      (nhds gaussian_majority_zeta_constant)
gaussian_majority_worst_variance_tendsto_iff_eventual_boundsIn LeanCommunication Complexity

The rescaled deviation q · (lam_q q − 1) tends to the constant c if and only if for every ε > 0 it is eventually below c + ε and eventually above c − ε.

theorem gaussian_majority_worst_variance_tendsto_iff_eventual_bounds (lam_q : ℕ → ℝ) :
    Filter.Tendsto (fun q : ℕ ↦ (q : ℝ) * (lam_q q - 1)) Filter.atTop
        (nhds gaussian_majority_zeta_constant) ↔
      (∀ ε > 0, ∀ᶠ (q : ℕ) in Filter.atTop,
          (q : ℝ) * (lam_q q - 1) < gaussian_majority_zeta_constant + ε) ∧
      (∀ ε > 0, ∀ᶠ (q : ℕ) in Filter.atTop,
          gaussian_majority_zeta_constant - ε < (q : ℝ) * (lam_q q - 1))
gaussian_majority_worst_variance_tendsto_lower_boundIn LeanCommunication Complexity

For every ε > 0, for all sufficiently large q, c − ε < q · (lam_q q − 1), where c is the Gaussian majority zeta constant.

theorem gaussian_majority_worst_variance_tendsto_lower_bound (lam_q : ℕ → ℝ)
    (h_max : ∀ q ≥ 2, 1 < lam_q q ∧ ∀ lam > 0, lam ≠ lam_q q →
      gaussian_majority_error q lam < gaussian_majority_error q (lam_q q)) :
    ∀ ε > 0, ∀ᶠ (q : ℕ) in Filter.atTop,
      gaussian_majority_zeta_constant - ε < (q : ℝ) * (lam_q q - 1)
gaussian_majority_worst_variance_tendsto_upper_boundIn LeanCommunication Complexity

For every ε > 0, for all sufficiently large q, q · (lam_q q − 1) < c + ε, where c is the Gaussian majority zeta constant.

theorem gaussian_majority_worst_variance_tendsto_upper_bound (lam_q : ℕ → ℝ)
    (h_max : ∀ q ≥ 2, 1 < lam_q q ∧ ∀ lam > 0, lam ≠ lam_q q →
      gaussian_majority_error q lam < gaussian_majority_error q (lam_q q)) :
    ∀ ε > 0, ∀ᶠ (q : ℕ) in Filter.atTop,
      (q : ℝ) * (lam_q q - 1) < gaussian_majority_zeta_constant + ε
gaussian_majority_worst_variance_uniqueIn LeanCommunication Complexity

For every natural number q ≥ 2, there exists a unique variance ratio λ > 1 that strictly maximizes the distributed Gaussian majority error over all positive variance parameters μ ≠ λ.

theorem gaussian_majority_worst_variance_unique (q : ℕ) (hq : 2 ≤ q) :
    ∃! lam : ℝ, 1 < lam ∧ ∀ μ > 0, μ ≠ lam → gaussian_majority_error q μ < gaussian_majority_error q lam
gaussian_majority_zeta_constant_posIn LeanCommunication Complexity

The Gaussian coin majority zeta constant c = 7 · Re ζ(3) / π² is strictly positive.

theorem gaussian_majority_zeta_constant_pos : 0 < gaussian_majority_zeta_constant
hitting_oracle_reconstruct_reachable_setoidIn LeanCommunication Complexity

There exists a uniform decoder that, given any predicate f : Finset (Fin n) → Bool indicating whether T hits all connected components of a graph H on Fin n (for n ≥ 1), outputs H.reachableSetoid.

theorem hitting_oracle_reconstruct_reachable_setoid (n : ℕ) :
    ∃ dec : (Finset (Fin n) → Bool) → Setoid (Fin n),
      ∀ (H : SimpleGraph (Fin n)) (hn : 1 ≤ n) (f : Finset (Fin n) → Bool),
        (∀ T : Finset (Fin n), f T = true ↔ ∀ u : Fin n, ∃ s ∈ T, H.Reachable u s) →
        dec f = H.reachableSetoid
inner_const_vec_coord_projIn LeanCommunication Complexity

For the normalized constant vector ψ and coordinate projections onto S and T, ⟪ψ, P_S P_T ψ⟫ = |S ∩ T| / card ι.

theorem inner_const_vec_coord_proj {ι : Type*} [Fintype ι] [DecidableEq ι] [Nonempty ι]
    (S T : Finset ι) :
    inner ℝ (const_vec ι) (coord_proj S (coord_proj T (const_vec ι)))
      = ((S ∩ T).card : ℝ) / (Fintype.card ι)
is_commuting_quantum_equality_classical_behaviourIn LeanCommunication Complexity

The shared-random-subset behaviour is realized by a commuting-operator quantum strategy: on E = EuclideanSpace ℝ (ZMod N) with the constant unit vector ψ, Alice's measurement for input s and message a is the coordinate projection onto {r : message(s,r) = a}, and Bob's for input t, message a and output o is the coordinate projection onto {r : output(t,a,r) = o}.

theorem is_commuting_quantum_equality_classical_behaviour (K N : ℕ) [NeZero N] (hK : 1 ≤ K) :
    is_commuting_quantum (equality_classical_behaviour N K hK)
oneway_connected_components_reduction_from_connectivityIn LeanCommunication Complexity

Let n ≥ 1. If there exists a deterministic one-way communication protocol P : CommunicationComplexity.Deterministic.OneWay.Protocol (SimpleGraph (Fin (n + 1))) (SimpleGraph (Fin (n + 1))) Bool that decides whether G'_A \ G'_B is connected (returning true if and only if (G'_A \ G'_B).Connected) for any graphs G'_B ≤ G'_A on Fin (n + 1), then there exists a deterministic one-way communication protocol P' : CommunicationComplexity.Deterministic.OneWay.Protocol (SimpleGraph (Fin n)) (SimpleGraph (Fin n)) (Setoid (Fin n)) on Fin n with communication cost P'.cost ≤ P.cost that outputs the reachability setoid (G_A \ G_B).reachableSetoid for any subgraphs G_B ≤ G_A on Fin n.

theorem oneway_connected_components_reduction_from_connectivity
    (n : ℕ) (hn : 1 ≤ n)
    (P : CommunicationComplexity.Deterministic.OneWay.Protocol
      (SimpleGraph (Fin (n + 1))) (SimpleGraph (Fin (n + 1))) Bool)
    (hP : ∀ (GA GB : SimpleGraph (Fin (n + 1))), GB ≤ GA →
      (P.run GA GB = true ↔ (GA \ GB).Connected)) :
    ∃ P' : CommunicationComplexity.Deterministic.OneWay.Protocol
      (SimpleGraph (Fin n)) (SimpleGraph (Fin n)) (Setoid (Fin n)),
      P'.cost ≤ P.cost ∧
      ∀ (GA GB : SimpleGraph (Fin n)), GB ≤ GA →
        P'.run GA GB = (GA \ GB).reachableSetoid
op_840_commuting_quantum_efficiency_classical_lower_boundIn LeanCommunication Complexity

Classical shared-randomness lower bound for OP-840: for all integers k ≥ 2 and N > 2^k, the optimal zero-error commuting-operator quantum efficiency with 2^k messages is at least (2^k - 1) / N.

theorem op_840_commuting_quantum_efficiency_classical_lower_bound (k : ℕ) (hk : 2 ≤ k) (N : ℕ) (hN : 2 ^ k < N) :
    ((2 ^ k : ℝ) - 1) / (N : ℝ) ≤ commuting_quantum_efficiency (2 ^ k) N
op_840_commuting_quantum_efficiency_multibit_upper_boundIn LeanCommunication Complexity

Open Problem OP-840 upper bound (arXiv:2610.41448 Sec. 9): for all integers k ≥ 2 and N > 2^k, the optimal zero-error commuting-operator quantum efficiency with 2^k messages is at most (2^k - 1) / N, closing the gap from Theorem 5's bound (2^k - 1) / (N - 1).

theorem op_840_commuting_quantum_efficiency_multibit_upper_bound (k : ℕ) (hk : 2 ≤ k) (N : ℕ) (hN : 2 ^ k < N) :
    commuting_quantum_efficiency (2 ^ k) N ≤ ((2 ^ k : ℝ) - 1) / (N : ℝ)
sum_coord_proj_fiberIn LeanCommunication Complexity

Summing, over the values of a function f, the coordinate projections onto the fibre of each value, gives the identity operator.

theorem sum_coord_proj_fiber {ι α : Type*} [Fintype ι] [DecidableEq ι] [Fintype α] [DecidableEq α]
    (f : ι → α) :
    (∑ a : α, coord_proj (Finset.univ.filter (fun i => f i = a))) = 1
two_overlapping_rectangles_fooling_cornersIn LeanCommunication Complexity

The four corner inputs $\{(0,0), (0,2), (2,0), (2,2)\}$ form a fooling set for the two-overlapping-rectangles function $\mathrm{CommunicationComplexity.two\_overlapping\_rectangles}$.

theorem two_overlapping_rectangles_fooling_corners :
    CommunicationComplexity.Rectangle.IsFoolingSet ({(0, 0), (0, 2), (2, 0), (2, 2)} : Set (Fin 3 × Fin 3))
      CommunicationComplexity.two_overlapping_rectangles
two_overlapping_rectangles_proposition_5_1In LeanCommunication Complexity

For the two-overlapping-rectangles Boolean function $\mathrm{CommunicationComplexity.two\_overlapping\_rectangles} : \mathrm{Fin}\;3 \to \mathrm{Fin}\;3 \to \mathrm{Bool}$, the minimum cover numbers are $C_0(F) = 2$, $C_1(F) = 2$, and $C_{\rm all}(F) = 4$. Moreover, the prior-free rectangle-size bound is $\operatorname{RS}_0(F) = 2$, the minimum number of leaves in any correct deterministic protocol is $\ell(F) = 5$, and the deterministic communication complexity is $D(F) = 3$.

theorem two_overlapping_rectangles_proposition_5_1 :
    cover_number CommunicationComplexity.two_overlapping_rectangles false = 2 ∧
    cover_number CommunicationComplexity.two_overlapping_rectangles true = 2 ∧
    cover_number_all CommunicationComplexity.two_overlapping_rectangles = 4 ∧
    rectangle_size_bound CommunicationComplexity.two_overlapping_rectangles = 2 ∧
    min_leaf_count CommunicationComplexity.two_overlapping_rectangles = 5 ∧
    CommunicationComplexity.Deterministic.communicationComplexity CommunicationComplexity.two_overlapping_rectangles = 3
two_overlapping_rectangles_proposition_5_2In LeanCommunication Complexity

Under the zero-error expected communication cost model, the public-coin communication complexity CommunicationComplexity.PublicCoin.zeroErrorCommunicationComplexity of the two-overlapping-rectangles function CommunicationComplexity.two_overlapping_rectangles is (5 : ℝ) / 2, and its private-coin communication complexity CommunicationComplexity.PrivateCoin.zeroErrorCommunicationComplexity is 3.

theorem two_overlapping_rectangles_proposition_5_2 :
    CommunicationComplexity.PublicCoin.zeroErrorCommunicationComplexity
      CommunicationComplexity.two_overlapping_rectangles = (5 : ℝ) / 2 ∧
    CommunicationComplexity.PrivateCoin.zeroErrorCommunicationComplexity
      CommunicationComplexity.two_overlapping_rectangles = 3
two_overlapping_rectangles_zero_error_priv_geIn LeanCommunication Complexity

The zero-error private-coin expected communication complexity CommunicationComplexity.PrivateCoin.zeroErrorCommunicationComplexity of the two-overlapping-rectangles Boolean function CommunicationComplexity.two_overlapping_rectangles is at least 3.

lemma two_overlapping_rectangles_zero_error_priv_ge :
    (3 : ℝ) ≤ CommunicationComplexity.PrivateCoin.zeroErrorCommunicationComplexity
      CommunicationComplexity.two_overlapping_rectangles
two_overlapping_rectangles_zero_error_priv_leIn LeanCommunication Complexity

The zero-error private-coin expected communication complexity CommunicationComplexity.PrivateCoin.zeroErrorCommunicationComplexity of the two-overlapping-rectangles Boolean function CommunicationComplexity.two_overlapping_rectangles is at most 3.

lemma two_overlapping_rectangles_zero_error_priv_le :
    CommunicationComplexity.PrivateCoin.zeroErrorCommunicationComplexity
      CommunicationComplexity.two_overlapping_rectangles ≤ 3
two_overlapping_rectangles_zero_error_pub_geIn LeanCommunication Complexity

The zero-error public-coin expected communication complexity CommunicationComplexity.PublicCoin.zeroErrorCommunicationComplexity of the two-overlapping-rectangles Boolean function CommunicationComplexity.two_overlapping_rectangles is at least (5 : ℝ) / 2.

lemma two_overlapping_rectangles_zero_error_pub_ge :
    (5 : ℝ) / 2 ≤ CommunicationComplexity.PublicCoin.zeroErrorCommunicationComplexity
      CommunicationComplexity.two_overlapping_rectangles
two_overlapping_rectangles_zero_error_pub_leIn LeanCommunication Complexity

The zero-error public-coin expected communication complexity CommunicationComplexity.PublicCoin.zeroErrorCommunicationComplexity of the two-overlapping-rectangles Boolean function CommunicationComplexity.two_overlapping_rectangles is at most (5 : ℝ) / 2.

lemma two_overlapping_rectangles_zero_error_pub_le :
    CommunicationComplexity.PublicCoin.zeroErrorCommunicationComplexity
      CommunicationComplexity.two_overlapping_rectangles ≤ (5 : ℝ) / 2
absolute_trace_character_additiveIn LeanFoundations of Cryptography

The absolute-trace character chi(x) = 1 if Tr x = 0 and -1 otherwise is multiplicative: chi(x+y) = chi(x) * chi(y).

theorem absolute_trace_character_additive (m : ℕ) (x y : GaloisField 2 m) :
    (if Algebra.trace (ZMod 2) (GaloisField 2 m) (x + y) = 0 then (1 : ℤ) else -1)
      = (if Algebra.trace (ZMod 2) (GaloisField 2 m) x = 0 then (1 : ℤ) else -1)
        * (if Algebra.trace (ZMod 2) (GaloisField 2 m) y = 0 then (1 : ℤ) else -1)
absolute_trace_linear_character_sumIn LeanFoundations of Cryptography

For w in GaloisField 2 m the sum over b of the trace character of w*b equals 2^m if w = 0 and 0 otherwise.

theorem absolute_trace_linear_character_sum (m : ℕ) [Fintype (GaloisField 2 m)]
    [DecidableEq (GaloisField 2 m)] (hm : 1 ≤ m) (w : GaloisField 2 m) :
    (∑ b : GaloisField 2 m,
      (if Algebra.trace (ZMod 2) (GaloisField 2 m) (w * b) = 0 then (1 : ℤ) else -1))
      = if w = 0 then (2 : ℤ) ^ m else 0
absolute_trace_quadratic_character_sumIn LeanFoundations of Cryptography

For m ≥ 1 and A, B in GaloisField 2 m, the sum over b of the trace character of (A*b^2 + B*b) equals 2^m if A^(2^(m-1)) + B = 0, and 0 otherwise.

theorem absolute_trace_quadratic_character_sum (m : ℕ) [Fintype (GaloisField 2 m)]
    [DecidableEq (GaloisField 2 m)] (hm : 1 ≤ m) (A B : GaloisField 2 m) :
    (∑ b : GaloisField 2 m,
      (if Algebra.trace (ZMod 2) (GaloisField 2 m) (A * b ^ 2 + B * b) = 0 then (1 : ℤ) else -1))
      = if A ^ 2 ^ (m - 1) + B = 0 then (2 : ℤ) ^ m else 0
bent_comp_linear_equivIn LeanFoundations of Cryptography

If g is a bent function on (Fin 8 → ZMod 2) and L is an invertible linear endomorphism of (Fin 8 → ZMod 2), then x ↦ g (L x) is bent.

theorem bent_comp_linear_equiv (L : (Fin 8 → ZMod 2) ≃ₗ[ZMod 2] (Fin 8 → ZMod 2)) (g : (Fin 8 → ZMod 2) → ZMod 2) (hg : is_bent g) :
    is_bent (fun x => g (L x))
bent_dim_eight_anf_coeff_zeroIn LeanFoundations of Cryptography

Every bent function on (Fin 8 → ZMod 2) has vanishing algebraic normal form coefficients on all subsets of cardinality greater than 4.

theorem bent_dim_eight_anf_coeff_zero (g : (Fin 8 → ZMod 2) → ZMod 2) (hg : is_bent g)
    (S : Finset (Fin 8)) (hS : 4 < S.card) : anf_coeff g S = 0
bent_dim_eight_has_degree_le_fourIn LeanFoundations of Cryptography

Every bent function on (Fin 8 → ZMod 2) has algebraic degree at most 4 (Rothaus' theorem for dimension 8).

theorem bent_dim_eight_has_degree_le_four (g : (Fin 8 → ZMod 2) → ZMod 2) (hg : is_bent g) : has_degree_le g 4
bent_dim_eight_subcube_character_sumIn LeanFoundations of Cryptography

For any Boolean function g on (Fin 8 → ZMod 2) and any subset S, the sum of Walsh transform values of g on the subcube complementary to S equals 2^(8 - card S) times the character sum of g on the subcube S.

theorem bent_dim_eight_subcube_character_sum (g : (Fin 8 → ZMod 2) → ZMod 2) (S : Finset (Fin 8)) :
    (∑ B ∈ (Finset.univ \ S).powerset,
      (∑ x : Fin 8 → ZMod 2, if g x + (∑ i, x i * if i ∈ B then 1 else 0) = 0 then (1 : ℤ) else -1)) =
    (2 : ℤ) ^ (8 - S.card) *
      (∑ A ∈ S.powerset, if g (fun i => if i ∈ A then 1 else 0) = 0 then (1 : ℤ) else -1)
bent_sum_counterexample_E_collapseIn LeanFoundations of Cryptography

For any integer-valued weight g and frequency w, the weighted Walsh sum of the counterexample function collapses over the product block: only the all-ones block contributes, and the result is χ_{w_A}(all-ones) times the weighted Walsh sum of the quadratic block.

theorem bent_sum_counterexample_E_collapse (m : ℕ) (hm : 4 ≤ m)
    (g : (Fin (2 * m) → ZMod 2) → ℤ) (w : Fin (2 * m) → ZMod 2) :
    (∑ x : Fin (2 * m) → ZMod 2,
        g x * (if bent_sum_counterexample_func m hm x = 0 then (0 : ℤ) else 1)
          * (if (∑ i : Fin (2 * m), w i * x i) = 0 then (1 : ℤ) else -1))
      = (if (∑ i : Fin (m - 2), w ⟨i.val, by omega⟩) = 0 then (1 : ℤ) else -1) *
        ∑ u : Fin (m + 2) → ZMod 2,
          g (fun k => if h : k.val < m - 2 then (1 : ZMod 2)
                      else u ⟨k.val - (m - 2), by omega⟩)
            * (if (u ⟨0, by omega⟩ * u ⟨1, by omega⟩ + u ⟨2, by omega⟩ * u ⟨3, by omega⟩
                + u ⟨4, by omega⟩ * u ⟨5, by omega⟩ : ZMod 2) = 0 then (0 : ℤ) else 1)
            * (if (∑ j : Fin (m + 2), w ⟨(m - 2) + j.val, by omega⟩ * u j) = 0 then (1 : ℤ) else -1)
bent_sum_counterexample_chi_addIn LeanFoundations of Cryptography

The sign character x ↦ (if a·x = 0 then 1 else -1) on (Fin n → ZMod 2) is multiplicative in the frequency: χ_{a+b}(x) = χ_a(x)·χ_b(x).

theorem bent_sum_counterexample_chi_add {n : ℕ} (a b x : Fin n → ZMod 2) :
    (if (∑ i, (a i + b i) * x i) = 0 then (1 : ℤ) else -1)
      = (if (∑ i, a i * x i) = 0 then (1 : ℤ) else -1) * (if (∑ i, b i * x i) = 0 then (1 : ℤ) else -1)
bent_sum_counterexample_chi_orthogonalityIn LeanFoundations of Cryptography

Walsh character orthogonality on (Fin n → ZMod 2): the characters x ↦ (if a·x = 0 then 1 else -1) are orthogonal with squared norm 2^n.

theorem bent_sum_counterexample_chi_orthogonality {n : ℕ} (a b : Fin n → ZMod 2) :
    ∑ x : Fin n → ZMod 2,
      (if (∑ i, a i * x i) = 0 then (1 : ℤ) else -1) * (if (∑ i, b i * x i) = 0 then (1 : ℤ) else -1)
      = if a = b then 2 ^ n else 0
bent_sum_counterexample_chi_point_addIn LeanFoundations of Cryptography

The sign character is also multiplicative in its point argument: χ_a(x + y) = χ_a(x)·χ_a(y).

theorem bent_sum_counterexample_chi_point_add {n : ℕ} (a x y : Fin n → ZMod 2) :
    (if (∑ i, a i * (x i + y i)) = 0 then (1 : ℤ) else -1)
      = (if (∑ i, a i * x i) = 0 then (1 : ℤ) else -1) * (if (∑ i, a i * y i) = 0 then (1 : ℤ) else -1)
bent_sum_counterexample_is_bent_walshIn LeanFoundations of Cryptography

For a bent Boolean function b on (Fin n → ZMod 2), every Walsh coefficient Σ_x (-1)^{b(x) + w·x}, written as a product of sign factors, has absolute value 2^(n/2).

theorem bent_sum_counterexample_is_bent_walsh {n : ℕ} (b : (Fin n → ZMod 2) → ZMod 2) (hb : is_bent b) :
    ∀ w : Fin n → ZMod 2,
      |∑ x : Fin n → ZMod 2, (if b x = 0 then (1 : ℤ) else -1) * (if (∑ i, w i * x i) = 0 then (1 : ℤ) else -1)|
        = 2 ^ (n / 2)
bent_sum_counterexample_not_sum_of_two_bentIn LeanFoundations of Cryptography

Let n ≥ 8 be even and write n = 2m. The Boolean function f_n on (Fin (2 * m) → ZMod 2) defined by the product of the first m - 2 variables and the sum of three quadratic products on the next 6 variables has algebraic degree m and cannot be written as a sum of two bent functions.

theorem bent_sum_counterexample_not_sum_of_two_bent (m : ℕ) (hm : 4 ≤ m) :
    let f : (Fin (2 * m) → ZMod 2) → ZMod 2 := fun x =>
      (∏ i : Fin (m - 2), x ⟨i.val, by omega⟩) *
        (x ⟨m - 2, by omega⟩ * x ⟨m - 1, by omega⟩ +
         x ⟨m, by omega⟩ * x ⟨m + 1, by omega⟩ +
         x ⟨m + 2, by omega⟩ * x ⟨m + 3, by omega⟩)
    has_degree_le f m ∧
    (∀ k < m, ¬ has_degree_le f k) ∧
    ¬ ∃ b₁ b₂ : (Fin (2 * m) → ZMod 2) → ZMod 2,
      is_bent b₁ ∧ is_bent b₂ ∧ b₁ + b₂ = f
bent_sum_counterexample_not_sum_of_two_bent_auxIn LeanFoundations of Cryptography

For m ≥ 4, the product of the first m-2 coordinates with the three-quadratic-term form on the next 6 coordinates is not the sum of two bent functions on (Fin (2*m) → ZMod 2).

theorem bent_sum_counterexample_not_sum_of_two_bent_aux (m : ℕ) (hm : 4 ≤ m) :
    ¬ ∃ b₁ b₂ : (Fin (2 * m) → ZMod 2) → ZMod 2,
      is_bent b₁ ∧ is_bent b₂ ∧ b₁ + b₂ = bent_sum_counterexample_func m hm
bent_sum_counterexample_rest_block_evalIn LeanFoundations of Cryptography

In block coordinates x = (x_A, x_R) with x_A : Fin (m-2) → ZMod 2 and x_R : Fin (m+2) → ZMod 2, the counterexample function is the product of the coordinates of x_A with the six-variable quadratic form on the first six coordinates of x_R.

theorem bent_sum_counterexample_rest_block_eval (m : ℕ) (hm : 4 ≤ m)
    (p : (Fin (m - 2) → ZMod 2) × (Fin (m + 2) → ZMod 2)) :
    bent_sum_counterexample_func m hm
        (fun k => if h : k.val < m - 2 then p.1 ⟨k.val, h⟩ else p.2 ⟨k.val - (m - 2), by omega⟩)
      = (∏ i : Fin (m - 2), p.1 i) *
        (p.2 ⟨0, by omega⟩ * p.2 ⟨1, by omega⟩ + p.2 ⟨2, by omega⟩ * p.2 ⟨3, by omega⟩
          + p.2 ⟨4, by omega⟩ * p.2 ⟨5, by omega⟩)
bent_sum_counterexample_rest_weightIn LeanFoundations of Cryptography

The number of points x_R : Fin (m+2) → ZMod 2 with x_R 0·x_R 1 + x_R 2·x_R 3 + x_R 4·x_R 5 = 1 is 28·2^(m-4), because the last m-4 coordinates are free.

theorem bent_sum_counterexample_rest_weight (m : ℕ) (hm : 4 ≤ m) :
    (Finset.filter (fun u : Fin (m + 2) → ZMod 2 =>
      (u ⟨0, by omega⟩ * u ⟨1, by omega⟩ + u ⟨2, by omega⟩ * u ⟨3, by omega⟩
        + u ⟨4, by omega⟩ * u ⟨5, by omega⟩ : ZMod 2) = 1) Finset.univ).card
      = 28 * 2 ^ (m - 4)
bent_sum_counterexample_walsh_inversionIn LeanFoundations of Cryptography

Walsh inversion on (Fin n → ZMod 2): for every integer-valued F, summing the Walsh transform of F against the characters recovers 2^n·F.

theorem bent_sum_counterexample_walsh_inversion {n : ℕ} (F : (Fin n → ZMod 2) → ℤ) (y : Fin n → ZMod 2) :
    ∑ b : Fin n → ZMod 2,
      (∑ x : Fin n → ZMod 2, F x * (if (∑ i, b i * x i) = 0 then (1 : ℤ) else -1))
        * (if (∑ i, b i * y i) = 0 then (1 : ℤ) else -1)
      = 2 ^ n * F y
bent_sum_counterexample_walsh_parsevalIn LeanFoundations of Cryptography

Parseval on (Fin n → ZMod 2): the sum of squares of the Walsh coefficients of an integer-valued F equals 2^n times the sum of squares of F.

theorem bent_sum_counterexample_walsh_parseval {n : ℕ} (F : (Fin n → ZMod 2) → ℤ) :
    ∑ b : Fin n → ZMod 2,
      (∑ x : Fin n → ZMod 2, F x * (if (∑ i, b i * x i) = 0 then (1 : ℤ) else -1)) ^ 2
      = 2 ^ n * ∑ x : Fin n → ZMod 2, (F x) ^ 2
bent_sum_parity_obstructionIn LeanFoundations of Cryptography

If F is the Walsh transform of a {0,±1}-valued weight G on (Fin N → ZMod 2), if every value of F is in {0, ±2^K}, if Σ F^2 = 7·2^(2K) and N = K+2, then we get a contradiction.

theorem bent_sum_parity_obstruction {N K : ℕ} (F G : (Fin N → ZMod 2) → ℤ)
    (hFG : ∀ u : Fin N → ZMod 2,
      F u = ∑ y : Fin N → ZMod 2, G y * (if (∑ i, u i * y i) = 0 then (1 : ℤ) else -1))
    (hG : ∀ y : Fin N → ZMod 2, G y = 0 ∨ G y = 1 ∨ G y = -1)
    (hF : ∀ u : Fin N → ZMod 2, F u = 0 ∨ F u = 2 ^ K ∨ F u = -(2 ^ K))
    (hsum : ∑ u : Fin N → ZMod 2, (F u) ^ 2 = 7 * 2 ^ (2 * K))
    (hN : N = K + 2) : False
boolean_derivative_bent_partner_existsIn LeanFoundations of Cryptography

For every balanced Boolean function f on (Fin 8 → ZMod 2) of algebraic degree at most 3 having a nonzero period v, there exists a bent function g on (Fin 8 → ZMod 2) such that D_v g = f.

theorem boolean_derivative_bent_partner_exists (f : (Fin 8 → ZMod 2) → ZMod 2) (hf_bal : is_balanced f) (hf_deg : has_degree_le f 3) (v : Fin 8 → ZMod 2) (hv : v ≠ 0) (hfv : ∀ x, f (x + v) = f x) : ∃ g : (Fin 8 → ZMod 2) → ZMod 2, is_bent g ∧ boolean_derivative v g = f
boolean_derivative_bent_partner_of_semi_bent_signingIn LeanFoundations of Cryptography

Assume every balanced Boolean function of degree at most 3 on (Fin 7 → ZMod 2) has a flat signing. Then every balanced f on (Fin 8 → ZMod 2) of degree at most 3 with a nonzero period v is the derivative D_v g of a bent function g.

theorem boolean_derivative_bent_partner_of_semi_bent_signing (core : ∀ h : (Fin 7 → ZMod 2) → ZMod 2, is_balanced h → has_degree_le h 3 → ∃ a : (Fin 7 → ZMod 2) → ZMod 2, boolean_derivative_signing_flat h a) (f : (Fin 8 → ZMod 2) → ZMod 2) (hf_bal : is_balanced f) (hf_deg : has_degree_le f 3) (v : Fin 8 → ZMod 2) (hv : v ≠ 0) (hfv : ∀ x, f (x + v) = f x) :
    ∃ g : (Fin 8 → ZMod 2) → ZMod 2, is_bent g ∧ boolean_derivative v g = f
boolean_derivative_exists_linear_equiv_of_ne_zeroIn LeanFoundations of Cryptography

For every nonzero vector v in (Fin 8 → ZMod 2) there is an invertible linear map L with L e₇ = v, where e₇ is the last standard basis vector.

theorem boolean_derivative_exists_linear_equiv_of_ne_zero (v : Fin 8 → ZMod 2) (hv : v ≠ 0) :
    ∃ L : (Fin 8 → ZMod 2) ≃ₗ[ZMod 2] (Fin 8 → ZMod 2), L (fun i => if i = 7 then (1 : ZMod 2) else 0) = v
boolean_derivative_semi_bent_signing_existsIn LeanFoundations of Cryptography

Every balanced Boolean function h on (Fin 7 → ZMod 2) of algebraic degree at most 3 admits a flat signing a: on each level set of h the signed Walsh sums Σ (-1)^(a u + w·u) have absolute value 8.

theorem boolean_derivative_semi_bent_signing_exists (h : (Fin 7 → ZMod 2) → ZMod 2) (hh_bal : is_balanced h) (hh_deg : has_degree_le h 3) :
    ∃ a : (Fin 7 → ZMod 2) → ZMod 2, boolean_derivative_signing_flat h a
boolean_derivative_signing_flat_balancedIn LeanFoundations of Cryptography

If (h, a) is a flat signing on (Fin 7 → ZMod 2), then h is balanced, i.e. each level set of h has 64 points.

theorem boolean_derivative_signing_flat_balanced (h a : (Fin 7 → ZMod 2) → ZMod 2) (hf : boolean_derivative_signing_flat h a) : is_balanced h
digit_exchange_walsh_cond_iffIn LeanFoundations of Cryptography

With A = t*a*(a^2+a+c)^2 and B = v + s*(a^2+a+c) + t*a*(a^2+a+c), the condition A^(2^(m-1)) + B = 0 is equivalent to the root polynomial vanishing at a.

theorem digit_exchange_walsh_cond_iff
    (m : ℕ) (hm : 1 ≤ m) (c v s t a : GaloisField 2 m) :
    ((t * a * (a ^ 2 + a + c) ^ 2) ^ 2 ^ (m - 1) +
        (v + s * (a ^ 2 + a + c) + t * a * (a ^ 2 + a + c)) = 0) ↔
      (Polynomial.C (v ^ 2) + (Polynomial.X ^ 2 + Polynomial.X + Polynomial.C c) ^ 2 *
        (Polynomial.C (s ^ 2) + Polynomial.C (t ^ 2) * Polynomial.X ^ 2 + Polynomial.C t * Polynomial.X)
        : Polynomial (GaloisField 2 m)).eval a = 0
digit_exchange_walsh_inner_sumIn LeanFoundations of Cryptography

Inner-sum collapse: for fixed a, summing the digit-exchange character over b gives 2^m times the character of u*a + t*a*c if the root polynomial vanishes at a, and 0 otherwise.

theorem digit_exchange_walsh_inner_sum
    (m : ℕ) [Fintype (GaloisField 2 m)] [DecidableEq (GaloisField 2 m)]
    (hm : 1 ≤ m) (c u v s t a : GaloisField 2 m) :
    (∑ b : GaloisField 2 m,
      (if Algebra.trace (ZMod 2) (GaloisField 2 m)
        (u * a + v * b + s * ((a ^ 2 + a + c) * b) +
          t * (((a ^ 2 + a + c) * b) ^ 2 + (a ^ 2 + a + c) * b + c) * a) = 0
       then (1 : ℤ) else -1))
      = if (Polynomial.C (v ^ 2) + (Polynomial.X ^ 2 + Polynomial.X + Polynomial.C c) ^ 2 *
            (Polynomial.C (s ^ 2) + Polynomial.C (t ^ 2) * Polynomial.X ^ 2 + Polynomial.C t * Polynomial.X)
            : Polynomial (GaloisField 2 m)).eval a = 0
        then (2 : ℤ) ^ m *
          (if Algebra.trace (ZMod 2) (GaloisField 2 m) (u * a + t * a * c) = 0 then (1 : ℤ) else -1)
        else 0
digit_exchange_walsh_reductionIn LeanFoundations of Cryptography

The digit-exchange Walsh sum collapses: W = ∑ over a of, if the root polynomial vanishes at a, 2^m times the character of u*a + t*a*c, else 0.

theorem digit_exchange_walsh_reduction
    (m : ℕ) [Fintype (GaloisField 2 m)] [DecidableEq (GaloisField 2 m)]
    (hm : 1 ≤ m) (c u v s t : GaloisField 2 m) :
    digit_exchange_walsh m c u v s t
      = ∑ a : GaloisField 2 m,
          (if (Polynomial.C (v ^ 2) + (Polynomial.X ^ 2 + Polynomial.X + Polynomial.C c) ^ 2 *
              (Polynomial.C (s ^ 2) + Polynomial.C (t ^ 2) * Polynomial.X ^ 2 + Polynomial.C t * Polynomial.X)
              : Polynomial (GaloisField 2 m)).eval a = 0
           then (2 : ℤ) ^ m *
             (if Algebra.trace (ZMod 2) (GaloisField 2 m) (u * a + t * a * c) = 0 then 1 else -1)
           else 0)
digit_exchange_walsh_root_poly_natDegree_fourIn LeanFoundations of Cryptography

If t = 0 and s ≠ 0, the root polynomial C(v^2) + (X^2+X+C c)^2 * (C(s^2) + C(t^2) X^2 + C t X) has natDegree 4.

theorem digit_exchange_walsh_root_poly_natDegree_four
    (m : ℕ) (c v s t : GaloisField 2 m) (ht : t = 0) (hs : s ≠ 0) :
    (Polynomial.C (v ^ 2) + (Polynomial.X ^ 2 + Polynomial.X + Polynomial.C c) ^ 2 *
      (Polynomial.C (s ^ 2) + Polynomial.C (t ^ 2) * Polynomial.X ^ 2 + Polynomial.C t * Polynomial.X)
      : Polynomial (GaloisField 2 m)).natDegree = 4
digit_exchange_walsh_root_poly_natDegree_sixIn LeanFoundations of Cryptography

If t ≠ 0, the root polynomial C(v^2) + (X^2+X+C c)^2 * (C(s^2) + C(t^2) X^2 + C t X) has natDegree 6.

theorem digit_exchange_walsh_root_poly_natDegree_six
    (m : ℕ) (c v s t : GaloisField 2 m) (ht : t ≠ 0) :
    (Polynomial.C (v ^ 2) + (Polynomial.X ^ 2 + Polynomial.X + Polynomial.C c) ^ 2 *
      (Polynomial.C (s ^ 2) + Polynomial.C (t ^ 2) * Polynomial.X ^ 2 + Polynomial.C t * Polynomial.X)
      : Polynomial (GaloisField 2 m)).natDegree = 6
digit_exchange_walsh_root_sum_abs_leIn LeanFoundations of Cryptography

Final triangle-inequality assembly: the collapsed digit-exchange sum has absolute value at most 6 * 2^m.

theorem digit_exchange_walsh_root_sum_abs_le
    (m : ℕ) [Fintype (GaloisField 2 m)] [DecidableEq (GaloisField 2 m)]
    (hm : 1 ≤ m) (c u v s t : GaloisField 2 m) (hst : (s, t) ≠ (0, 0)) :
    |∑ a : GaloisField 2 m,
        (if (Polynomial.C (v ^ 2) + (Polynomial.X ^ 2 + Polynomial.X + Polynomial.C c) ^ 2 *
            (Polynomial.C (s ^ 2) + Polynomial.C (t ^ 2) * Polynomial.X ^ 2 + Polynomial.C t * Polynomial.X)
            : Polynomial (GaloisField 2 m)).eval a = 0
         then (2 : ℤ) ^ m *
           (if Algebra.trace (ZMod 2) (GaloisField 2 m) (u * a + t * a * c) = 0 then 1 else -1)
         else 0)|
      ≤ 6 * (2 : ℤ) ^ m
galois_field_pow_two_pow_eq_selfIn LeanFoundations of Cryptography

Every element x of the field GaloisField 2 m satisfies x^(2^m) = x.

theorem galois_field_pow_two_pow_eq_self (m : ℕ) (x : GaloisField 2 m) : x ^ 2 ^ m = x
galois_field_trace_quadratic_formIn LeanFoundations of Cryptography

For m ≥ 1, A, b in GaloisField 2 m: Tr(A * b^2) = Tr(A^(2^(m-1)) * b).

theorem galois_field_trace_quadratic_form (m : ℕ) (hm : 1 ≤ m) (A b : GaloisField 2 m) :
    Algebra.trace (ZMod 2) (GaloisField 2 m) (A * b ^ 2)
      = Algebra.trace (ZMod 2) (GaloisField 2 m) (A ^ 2 ^ (m - 1) * b)
galois_field_trace_sqIn LeanFoundations of Cryptography

For m ≥ 1 the absolute trace to ZMod 2 on GaloisField 2 m is invariant under squaring: Tr(y^2) = Tr(y).

theorem galois_field_trace_sq (m : ℕ) (hm : 1 ≤ m) (y : GaloisField 2 m) :
    Algebra.trace (ZMod 2) (GaloisField 2 m) (y ^ 2) = Algebra.trace (ZMod 2) (GaloisField 2 m) y
has_degree_le_of_anf_coeff_zeroIn LeanFoundations of Cryptography

A Boolean function whose algebraic normal form coefficients vanish for all subsets of cardinality greater than d has algebraic degree at most d.

theorem has_degree_le_of_anf_coeff_zero {n d : ℕ} (f : (Fin n → ZMod 2) → ZMod 2)
    (h_zero : ∀ S : Finset (Fin n), d < S.card → anf_coeff f S = 0) :
    has_degree_le f d
op928_de_fiber_general_le_twentyIn LeanFoundations of Cryptography

For u ∉ {0, 1} and any v, any solution set S to the differential system has cardinality at most 20 (Fukui arXiv:2611.02572, Section 8, Open Problem (2)).

theorem op928_de_fiber_general_le_twenty {F : Type*} [Field F] [Fintype F] [DecidableEq F] :
    (2 : F) = 0 →
      ∀ (N : ℕ),
        (∀ (t : F), (t ^ N) ^ 2 = t) →
          ∀ (c : F),
            (∀ (t : F), t ^ 2 + t + c ≠ 0) →
              ∀ (u v β1 β2 : F),
                u ≠ 0 →
                  u ≠ 1 →
                    ∀ (S : Finset (F × F)),
                      (∀ x ∈ S,
                          ((x.1 + u) ^ 2 + (x.1 + u) + c) * (x.2 + v + (x.1 * u) ^ N) + (x.1 ^ 2 + x.1 + c) * x.2 = β1 ∧
                            ((((x.1 + u) ^ 2 + (x.1 + u) + c) * (x.2 + v + (x.1 * u) ^ N)) ^ 2 +
                                          ((x.1 + u) ^ 2 + (x.1 + u) + c) * (x.2 + v + (x.1 * u) ^ N) +
                                        c) *
                                      (x.1 + u) +
                                    (x.1 ^ 2 + x.1 + c) * x.2 +
                                  (((x.1 ^ 2 + x.1 + c) * x.2) ^ 2 + (x.1 ^ 2 + x.1 + c) * x.2 + c) * x.1 +
                                (((x.1 + u) ^ 2 + (x.1 + u) + c) * (x.2 + v + (x.1 * u) ^ N) *
                                    ((x.1 ^ 2 + x.1 + c) * x.2)) ^
                                  N =
                              β2) →
                        S.card ≤ 20
op928_de_fiber_le_twentyIn LeanFoundations of Cryptography

For any non-zero difference pair (u, v) ≠ (0, 0) in a field of characteristic 2 with squaring bijection t ↦ t^N, the fiber size of the differential system is at most 20.

theorem op928_de_fiber_le_twenty {F : Type*} [Field F] [Fintype F] [DecidableEq F] :
    (2 : F) = 0 →
      ∀ (N : ℕ),
        (∀ (t : F), (t ^ N) ^ 2 = t) →
          ∀ (c : F),
            (∀ (t : F), t ^ 2 + t + c ≠ 0) →
              ∀ (u v β1 β2 : F),
                ¬(u = 0 ∧ v = 0) →
                  ∀ (S : Finset (F × F)),
                    (∀ x ∈ S,
                        ((x.1 + u) ^ 2 + (x.1 + u) + c) * (x.2 + v + (x.1 * u) ^ N) + (x.1 ^ 2 + x.1 + c) * x.2 = β1 ∧
                          ((((x.1 + u) ^ 2 + (x.1 + u) + c) * (x.2 + v + (x.1 * u) ^ N)) ^ 2 +
                                        ((x.1 + u) ^ 2 + (x.1 + u) + c) * (x.2 + v + (x.1 * u) ^ N) +
                                      c) *
                                    (x.1 + u) +
                                  (x.1 ^ 2 + x.1 + c) * x.2 +
                                (((x.1 ^ 2 + x.1 + c) * x.2) ^ 2 + (x.1 ^ 2 + x.1 + c) * x.2 + c) * x.1 +
                              (((x.1 + u) ^ 2 + (x.1 + u) + c) * (x.2 + v + (x.1 * u) ^ N) *
                                  ((x.1 ^ 2 + x.1 + c) * x.2)) ^
                                N =
                            β2) →
                      S.card ≤ 20
op928_de_fiber_one_le_twentyIn LeanFoundations of Cryptography

For u = 1 and any v, any solution set S to the differential system has cardinality at most 20.

theorem op928_de_fiber_one_le_twenty {F : Type*} [Field F] [Fintype F] [DecidableEq F] :
    (2 : F) = 0 →
      ∀ (N : ℕ),
        (∀ (t : F), (t ^ N) ^ 2 = t) →
          ∀ (c : F),
            (∀ (t : F), t ^ 2 + t + c ≠ 0) →
              ∀ (v β1 β2 : F),
                ∀ (S : Finset (F × F)),
                  (∀ x ∈ S,
                      ((x.1 + 1) ^ 2 + (x.1 + 1) + c) * (x.2 + v + x.1 ^ N) + (x.1 ^ 2 + x.1 + c) * x.2 = β1 ∧
                        ((((x.1 + 1) ^ 2 + (x.1 + 1) + c) * (x.2 + v + x.1 ^ N)) ^ 2 +
                                      ((x.1 + 1) ^ 2 + (x.1 + 1) + c) * (x.2 + v + x.1 ^ N) +
                                    c) *
                                  (x.1 + 1) +
                                (x.1 ^ 2 + x.1 + c) * x.2 +
                              (((x.1 ^ 2 + x.1 + c) * x.2) ^ 2 + (x.1 ^ 2 + x.1 + c) * x.2 + c) * x.1 +
                            (((x.1 + 1) ^ 2 + (x.1 + 1) + c) * (x.2 + v + x.1 ^ N) *
                                ((x.1 ^ 2 + x.1 + c) * x.2)) ^
                              N =
                          β2) →
                    S.card ≤ 20
op928_de_fiber_zero_le_twoIn LeanFoundations of Cryptography

For u = 0 and v ≠ 0, any solution set S to the differential system has cardinality at most 2.

theorem op928_de_fiber_zero_le_two {F : Type*} [Field F] [Fintype F] [DecidableEq F] :
    (2 : F) = 0 →
      ∀ (N : ℕ),
        (∀ (t : F), (t ^ N) ^ 2 = t) →
          ∀ (c : F),
            (∀ (t : F), t ^ 2 + t + c ≠ 0) →
              ∀ (v β1 β2 : F),
                v ≠ 0 →
                  ∀ (S : Finset (F × F)),
                    (∀ x ∈ S,
                        (x.1 ^ 2 + x.1 + c) * (x.2 + v) + (x.1 ^ 2 + x.1 + c) * x.2 = β1 ∧
                          (((x.1 ^ 2 + x.1 + c) * (x.2 + v)) ^ 2 + (x.1 ^ 2 + x.1 + c) * (x.2 + v) + c) * x.1 +
                              (x.1 ^ 2 + x.1 + c) * x.2 +
                            (((x.1 ^ 2 + x.1 + c) * x.2) ^ 2 + (x.1 ^ 2 + x.1 + c) * x.2 + c) * x.1 +
                          (((x.1 ^ 2 + x.1 + c) * (x.2 + v) * ((x.1 ^ 2 + x.1 + c) * x.2)) ^ N) = β2) →
                      S.card ≤ 2
op_1608_char_two_trace_sqIn LeanFoundations of Cryptography

For every element x in GaloisField 2 m, the absolute trace to ZMod 2 of x^2 equals the trace of x.

theorem op_1608_char_two_trace_sq (m : ℕ) (x : GaloisField 2 m) :
    Algebra.trace (ZMod 2) (GaloisField 2 m) (x ^ 2) = Algebra.trace (ZMod 2) (GaloisField 2 m) x
op_1608_digit_exchange_walsh_le_six_poly_natDegree_leIn LeanFoundations of Cryptography

For (s,t) ≠ (0,0) the root polynomial is nonzero and has natDegree at most 6.

theorem op_1608_digit_exchange_walsh_le_six_poly_natDegree_le
    (m : ℕ) (c v s t : GaloisField 2 m) (hst : (s, t) ≠ (0, 0)) :
    (Polynomial.C (v ^ 2) + (Polynomial.X ^ 2 + Polynomial.X + Polynomial.C c) ^ 2 *
      (Polynomial.C (s ^ 2) + Polynomial.C (t ^ 2) * Polynomial.X ^ 2 + Polynomial.C t * Polynomial.X)
      : Polynomial (GaloisField 2 m)).natDegree ≤ 6
op_1608_digit_exchange_walsh_le_six_poly_ne_zeroIn LeanFoundations of Cryptography

For (s,t) ≠ (0,0) the root polynomial C(v^2) + (X^2+X+C c)^2 * (C(s^2) + C(t^2) X^2 + C t X) is nonzero.

theorem op_1608_digit_exchange_walsh_le_six_poly_ne_zero
    (m : ℕ) (c v s t : GaloisField 2 m) (hst : (s, t) ≠ (0, 0)) :
    (Polynomial.C (v ^ 2) + (Polynomial.X ^ 2 + Polynomial.X + Polynomial.C c) ^ 2 *
      (Polynomial.C (s ^ 2) + Polynomial.C (t ^ 2) * Polynomial.X ^ 2 + Polynomial.C t * Polynomial.X)
      : Polynomial (GaloisField 2 m)) ≠ 0
op_1608_digit_exchange_walsh_le_six_root_countIn LeanFoundations of Cryptography

For (s,t) ≠ (0,0), the number of a in GaloisField 2 m at which the root polynomial vanishes is at most 6.

theorem op_1608_digit_exchange_walsh_le_six_root_count
    (m : ℕ) [Fintype (GaloisField 2 m)] [DecidableEq (GaloisField 2 m)]
    (c v s t : GaloisField 2 m) (hst : (s, t) ≠ (0, 0)) :
    (Finset.univ.filter (fun a : GaloisField 2 m =>
      (Polynomial.C (v ^ 2) + (Polynomial.X ^ 2 + Polynomial.X + Polynomial.C c) ^ 2 *
        (Polynomial.C (s ^ 2) + Polynomial.C (t ^ 2) * Polynomial.X ^ 2 + Polynomial.C t * Polynomial.X)
        : Polynomial (GaloisField 2 m)).eval a = 0)).card ≤ 6
op_1608_walsh_mag_ne_fiveIn LeanFoundations of Cryptography

For every integer m ≥ 1, every element c in GaloisField 2 m with absolute trace 1, all input masks u, v, and all nonzero output masks (s, t) ≠ (0, 0), the absolute value of digit_exchange_walsh m c u v s t cannot equal 5 * 2^m.

theorem op_1608_walsh_mag_ne_five (m : ℕ) (hm : 1 ≤ m) (c : GaloisField 2 m)
    (hc : Algebra.trace (ZMod 2) (GaloisField 2 m) c = 1)
    (u v s t : GaloisField 2 m) (hst : (s, t) ≠ (0, 0)) :
    |digit_exchange_walsh m c u v s t| ≠ 5 * (2 : ℤ) ^ m
two_pow_sub_one_mul_twoIn LeanFoundations of Cryptography

For m ≥ 1, 2^(m-1) * 2 = 2^m as natural numbers.

theorem two_pow_sub_one_mul_two (m : ℕ) (hm : 1 ≤ m) : 2 ^ (m - 1) * 2 = 2 ^ m
flag_hash_offset_bijectiveIn LeanData Structures

For any finite group G equipped with a prime composition series and flag representatives reps, flag_hash_offset reps is a bijective function from Fin (∏ i, p i) to G.

theorem flag_hash_offset_bijective {k : ℕ} {p : Fin k → ℕ}
    {G : Type*} [Group G] [Fintype G] [DecidableEq G]
    {series : GroupPrimeCompositionSeries G k p} (reps : FlagRepresentatives series) :
    Function.Bijective (flag_hash_offset reps)
flag_hash_offset_digit_eq_zeroIn LeanData Structures

If j is below the product of the first m quotient orders, then for every digit position i ≥ m the corresponding mixed-radix digit of j is zero.

theorem flag_hash_offset_digit_eq_zero {k : ℕ} (p : Fin k → ℕ) (hp : ∀ i, 0 < p i)
    (m : ℕ) (j : ℕ) (i : Fin k)
    (hj : j < ∏ a ∈ Finset.univ.filter (fun a : Fin k => (a : ℕ) < m), p a)
    (hi : m ≤ (i : ℕ)) :
    j / (∏ a ∈ Finset.univ.filter (fun a : Fin k => (a : ℕ) < i), p a) % p i = 0
flag_hash_offset_prefix_memIn LeanData Structures

For a prime composition series and flag representatives, every flag offset whose mixed-radix value is below prod over the first m quotient orders lies in the subgroup H m of the chain.

theorem flag_hash_offset_prefix_mem {G : Type*} [Group G] {k : ℕ} {p : Fin k → ℕ}
    {series : GroupPrimeCompositionSeries G k p} (reps : FlagRepresentatives series)
    (m : ℕ) (hm : m ≤ k) (j : Fin (∏ i : Fin k, p i))
    (hj : (j : ℕ) < ∏ a ∈ Finset.univ.filter (fun a : Fin k => (a : ℕ) < m), p a) :
    flag_hash_offset reps j ∈ series.H ⟨m, by omega⟩
flagprobe_reduced_count_invariantIn LeanData Structures

For two groups with prime composition series of the same length and quotient orders, the number of length-t insertion sequences whose occupied set contains all of the first c flag offsets is the same in both groups.

theorem flagprobe_reduced_count_invariant {k : ℕ} (p : Fin k → ℕ)
    (G₁ : Type*) [Group G₁] [Fintype G₁] [DecidableEq G₁]
    (series₁ : GroupPrimeCompositionSeries G₁ k p) (reps₁ : FlagRepresentatives series₁)
    (G₂ : Type*) [Group G₂] [Fintype G₂] [DecidableEq G₂]
    (series₂ : GroupPrimeCompositionSeries G₂ k p) (reps₂ : FlagRepresentatives series₂)
    (t c : ℕ) :
    (Finset.univ.filter (fun A : Fin t → G₁ => ∀ j : Fin (∏ i : Fin k, p i),
        (j : ℕ) < c → flag_hash_offset reps₁ j ∈
          group_hash_occupied_slots (∏ i : Fin k, p i) (flag_hash_offset reps₁) (List.ofFn A))).card =
    (Finset.univ.filter (fun A : Fin t → G₂ => ∀ j : Fin (∏ i : Fin k, p i),
        (j : ℕ) < c → flag_hash_offset reps₂ j ∈
          group_hash_occupied_slots (∏ i : Fin k, p i) (flag_hash_offset reps₂) (List.ofFn A))).card
group_hash_insert_step_card_of_ltIn LeanData Structures

For any group G with decidable equality, table size n, injective offset sequence r : Fin n → G, and occupied set T with card < n, inserting an element a increases the occupied count by exactly 1.

theorem group_hash_insert_step_card_of_lt {G : Type*} [Group G] [DecidableEq G]
    (n : ℕ) (r : Fin n → G) (hr : Function.Injective r) (T : Finset G) (hT : T.card < n) (a : G) :
    (group_hash_insert_step n r T a).card = T.card + 1
group_hash_insert_step_mul_leftIn LeanData Structures

Left translation commutes with one insertion step: translating the occupied set and the key by the same element c on the left gives the translate of the updated occupied set.

theorem group_hash_insert_step_mul_left {G : Type*} [Group G] [DecidableEq G]
    (n : ℕ) (r : Fin n → G) (T : Finset G) (a c : G) :
    (group_hash_insert_step n r T a).image (fun x => c * x) =
      group_hash_insert_step n r (T.image (fun x => c * x)) (c * a)
group_hash_occupied_slots_cardIn LeanData Structures

For any group G with decidable equality, table size n, injective offset sequence r : Fin n → G, and insertion list A of length at most n, the number of occupied slots after inserting A is exactly A.length.

theorem group_hash_occupied_slots_card {G : Type*} [Group G] [DecidableEq G]
    (n : ℕ) (r : Fin n → G) (hr : Function.Injective r) (A : List G) (hA : A.length ≤ n) :
    (group_hash_occupied_slots n r A).card = A.length
group_hash_occupied_slots_map_mul_leftIn LeanData Structures

Inserting a list A into an occupied set T and then translating the result by c equals inserting the translated list c·A into the translated set c·T.

theorem group_hash_occupied_slots_map_mul_left {G : Type*} [Group G] [DecidableEq G]
    (n : ℕ) (r : Fin n → G) (T : Finset G) (A : List G) (c : G) :
    (A.foldl (group_hash_insert_step n r) T).image (fun x => c * x) =
      (A.map (fun x => c * x)).foldl (group_hash_insert_step n r) (T.image (fun x => c * x))
group_hash_probe_tail_count_eq_card_mulIn LeanData Structures

For any finite group G with decidable equality, the check that the first c offsets are occupied costs a factor of exactly |G|: the probe tail count of G at n, r, t, c is |G| times the number of length-t insertion sequences A whose occupied set contains every offset r j with j < c.

theorem group_hash_probe_tail_count_eq_card_mul {G : Type*} [Group G] [Fintype G] [DecidableEq G]
    (n : ℕ) (r : Fin n → G) (t c : ℕ) :
    group_hash_probe_tail_count G n r t c =
      Fintype.card G * (Finset.univ.filter (fun B : Fin t → G =>
        ∀ j : Fin n, (j : ℕ) < c →
          r j ∈ group_hash_occupied_slots n r (List.ofFn B))).card
group_hash_probe_tail_count_eq_of_card_and_reduced_eqIn LeanData Structures

For two finite groups of the same cardinality and with equal reduced counts (for the given n, r1/r2, t and c), the probe tail counts are equal.

theorem group_hash_probe_tail_count_eq_of_card_and_reduced_eq
    {G₁ : Type*} [Group G₁] [Fintype G₁] [DecidableEq G₁]
    {G₂ : Type*} [Group G₂] [Fintype G₂] [DecidableEq G₂]
    (hcard : Fintype.card G₁ = Fintype.card G₂)
    (n : ℕ) (r₁ : Fin n → G₁) (r₂ : Fin n → G₂) (t c : ℕ)
    (hred : (Finset.univ.filter (fun B : Fin t → G₁ =>
        ∀ j : Fin n, (j : ℕ) < c → r₁ j ∈ group_hash_occupied_slots n r₁ (List.ofFn B))).card =
      (Finset.univ.filter (fun B : Fin t → G₂ =>
        ∀ j : Fin n, (j : ℕ) < c → r₂ j ∈ group_hash_occupied_slots n r₂ (List.ofFn B))).card) :
    group_hash_probe_tail_count G₁ n r₁ t c = group_hash_probe_tail_count G₂ n r₂ t c
group_hash_probe_tail_count_of_gtIn LeanData Structures

For any finite group G with decidable equality, table size n, injective offset sequence r : Fin n → G, and natural numbers t, c with t < n and t < c, the probe tail count is 0.

theorem group_hash_probe_tail_count_of_gt (G : Type*) [Group G] [Fintype G] [DecidableEq G]
    (n : ℕ) (r : Fin n → G) (hr : Function.Injective r) (t c : ℕ) (ht : t < n) (hc : t < c) :
    group_hash_probe_tail_count G n r t c = 0
group_hash_probe_tail_count_oneIn LeanData Structures

For any finite group G with decidable equality, table size n > 0, injective offset sequence r with r ⟨0, hn⟩ = 1, and insertion length t < n, the probe tail count group_hash_probe_tail_count G n r t 1 equals t * (Fintype.card G)^t.

theorem group_hash_probe_tail_count_one (G : Type*) [Group G] [Fintype G] [DecidableEq G]
    (n : ℕ) (hn : 0 < n) (r : Fin n → G) (hr : Function.Injective r) (hr0 : r ⟨0, hn⟩ = 1)
    (t : ℕ) (ht : t < n) :
    group_hash_probe_tail_count G n r t 1 = t * (Fintype.card G) ^ t
group_hash_reduced_count_of_gtIn LeanData Structures

For an injective offset sequence, table size n, and t < c with t < n, no length-t insertion sequence can occupy c distinct offsets, so the reduced count is zero.

theorem group_hash_reduced_count_of_gt {G : Type*} [Group G] [Fintype G] [DecidableEq G]
    (n : ℕ) (r : Fin n → G) (hr : Function.Injective r) (t c : ℕ) (ht : t < n) (hc : t < c) :
    (Finset.univ.filter (fun B : Fin t → G =>
      ∀ j : Fin n, (j : ℕ) < c → r j ∈ group_hash_occupied_slots n r (List.ofFn B))).card = 0
group_hash_reduced_count_t_zeroIn LeanData Structures

If the table is nonempty and the threshold c is positive, no length-0 insertion sequence occupies any offset, so the reduced count is zero.

theorem group_hash_reduced_count_t_zero {G : Type*} [Group G] [Fintype G] [DecidableEq G]
    (n : ℕ) (hn : 0 < n) (r : Fin n → G) (c : ℕ) (hc : 0 < c) :
    (Finset.univ.filter (fun B : Fin 0 → G =>
      ∀ j : Fin n, (j : ℕ) < c → r j ∈ group_hash_occupied_slots n r (List.ofFn B))).card = 0
group_prime_composition_series_cardIn LeanData Structures

For any finite group G with a prime composition series of length k and quotient orders p : Fin k → ℕ, the cardinality of G is equal to ∏ i : Fin k, p i.

theorem group_prime_composition_series_card {k : ℕ} (p : Fin k → ℕ)
    (G : Type*) [Group G] [Fintype G]
    (series : GroupPrimeCompositionSeries G k p) :
    Fintype.card G = ∏ i : Fin k, p i
group_prime_composition_series_monoIn LeanData Structures

The subgroups of a prime composition series are monotone along the chain: H i ≤ H j whenever i ≤ j.

theorem group_prime_composition_series_mono {G : Type*} [Group G] {k : ℕ} {p : Fin k → ℕ}
    (series : GroupPrimeCompositionSeries G k p) {i j : Fin (k + 1)} (h : i ≤ j) :
    series.H i ≤ series.H j
hash_coordinate_deleted_seqs_cardIn LeanData Structures

For any table size n, offset sequence r, slot subset S, length t, and coordinate i : Fin t, the fiber of sequences H : Fin t → ZMod n whose deletion of coordinate i fully occupies S has cardinality n * hash_count_fully_occupied n r S (t - 1).

theorem hash_coordinate_deleted_seqs_card
    (n : ℕ) [NeZero n] (r : Fin n → ZMod n)
    (S : Finset (ZMod n)) (t : ℕ) (i : Fin t) :
    (Finset.univ.filter (fun H : Fin t → ZMod n => hash_occupy_count n r S ((List.ofFn H).eraseIdx i.val) = S.card)).card =
      n * hash_count_fully_occupied n r S (t - 1)
hash_coordinate_deleted_seqs_subsetIn LeanData Structures

For any table size n, offset sequence r, slot subset S, length t, and coordinate i : Fin t, any sequence H : Fin t → ZMod n whose deletion of coordinate i fully occupies S must also belong to hash_fully_occupied_seqs n r S t.

theorem hash_coordinate_deleted_seqs_subset
    (n : ℕ) [NeZero n] (r : Fin n → ZMod n)
    (S : Finset (ZMod n)) (t : ℕ) (i : Fin t) :
    Finset.univ.filter (fun H : Fin t → ZMod n => hash_occupy_count n r S ((List.ofFn H).eraseIdx i.val) = S.card) ⊆
      hash_fully_occupied_seqs n r S t
hash_fiber_sum_reindexIn LeanData Structures

Summing a function of (deleted sequence, deleted value) over all sequences whose coordinate-i deletion fully occupies S equals summing, over all length-m sequences fully occupying S, the sum over the deleted slot value.

theorem hash_fiber_sum_reindex (n : ℕ) [NeZero n] (r : Fin n → ZMod n) (S : Finset (ZMod n))
    (m : ℕ) (i : Fin (m + 1)) (f : List (ZMod n) → ZMod n → ℝ) :
    ∑ H ∈ Finset.univ.filter (fun H : Fin (m + 1) → ZMod n =>
        hash_occupy_count n r S (List.ofFn (i.removeNth H)) = S.card),
      f (List.ofFn (i.removeNth H)) (H i) =
    ∑ B ∈ hash_fully_occupied_seqs n r S m, ∑ e : ZMod n, f (List.ofFn B) e
hash_insertNth_filter_fiberIn LeanData Structures

The set of sequences H whose coordinate-i deletion fully occupies S is exactly the image of (slot value) × (fully occupying sequences of length m) under re-inserting coordinate i.

theorem hash_insertNth_filter_fiber (n : ℕ) [NeZero n] (r : Fin n → ZMod n) (S : Finset (ZMod n))
    (m : ℕ) (i : Fin (m + 1)) :
    Finset.univ.filter (fun H : Fin (m + 1) → ZMod n =>
        hash_occupy_count n r S (List.ofFn (i.removeNth H)) = S.card) =
      ((Finset.univ : Finset (ZMod n)) ×ˢ hash_fully_occupied_seqs n r S m).map
        (Fin.insertNthEquiv (fun _ : Fin (m + 1) => ZMod n) i).toEmbedding
hash_insert_step_closeIn LeanData Structures

If T ⊆ T' and T' differs from T by at most one element c, then one insert step from T' lands within one element of one insert step from T (with the extra element allowed to change).

theorem hash_insert_step_close (n : ℕ) (r : Fin n → ZMod n) (T T' : Finset (ZMod n)) (a c : ZMod n)
    (h1 : T ⊆ T') (h2 : T' ⊆ T ∪ {c}) :
    ∃ c', hash_insert_step n r T' a ⊆ hash_insert_step n r T a ∪ {c'}
hash_occupied_slots_add_shiftIn LeanData Structures

Shifting every key of an insertion sequence by a constant c shifts the set of occupied slots by the same c: inserting the list A, keywise translated by c, occupies exactly the slots Occ(A) + c.

theorem hash_occupied_slots_add_shift (n : ℕ) (r : Fin n → ZMod n) (A : List (ZMod n)) (c : ZMod n) : hash_occupied_slots n r (A.map (fun a => a + c)) = (hash_occupied_slots n r A).image (fun x => x + c)
hash_occupy_count_append_le_insertIn LeanData Structures

Inserting one element anywhere never decreases the number of occupied slots of S: occ(P ++ Q) ≤ occ(P ++ e :: Q).

theorem hash_occupy_count_append_le_insert (n : ℕ) (r : Fin n → ZMod n) (S : Finset (ZMod n))
    (P Q : List (ZMod n)) (e : ZMod n) :
    hash_occupy_count n r S (P ++ Q) ≤ hash_occupy_count n r S (P ++ e :: Q)
hash_occupy_count_insert_le_appendIn LeanData Structures

occ(P ++ e :: Q) ≤ occ(P ++ Q) + 1.

theorem hash_occupy_count_insert_le_append (n : ℕ) (r : Fin n → ZMod n) (S : Finset (ZMod n))
    (P Q : List (ZMod n)) (e : ZMod n) :
    hash_occupy_count n r S (P ++ e :: Q) ≤ hash_occupy_count n r S (P ++ Q) + 1
hash_occupy_count_swap_leIn LeanData Structures

occ(P ++ e :: Q) ≤ occ(P ++ x :: Q) + 1.

theorem hash_occupy_count_swap_le (n : ℕ) (r : Fin n → ZMod n) (S : Finset (ZMod n))
    (P Q : List (ZMod n)) (e x : ZMod n) :
    hash_occupy_count n r S (P ++ e :: Q) ≤ hash_occupy_count n r S (P ++ x :: Q) + 1
hash_ofFn_eraseIdx_eq_removeNthIn LeanData Structures

For a sequence H : Fin (m+1) → ZMod n, deleting the i-th entry of the list of values of H is the same as listing the values of the sequence with coordinate i removed.

theorem hash_ofFn_eraseIdx_eq_removeNth (n m : ℕ) (H : Fin (m + 1) → ZMod n) (i : Fin (m + 1)) :
    (List.ofFn H).eraseIdx i.val = List.ofFn (i.removeNth H)
hash_potential_delta_le_oneIn LeanData Structures

For any table size n, offset sequence r, slot subset S, length t, prefix A, and next element e, hash_potential_delta n r S t A e ≤ 1.

theorem hash_potential_delta_le_one
    (n : ℕ) [NeZero n] (r : Fin n → ZMod n)
    (S : Finset (ZMod n)) (t : ℕ) (A : List (ZMod n)) (e : ZMod n) :
    hash_potential_delta n r S t A e ≤ 1
hash_potential_delta_sum_eq_zeroIn LeanData Structures

For A shorter than t, ∑ over e : ZMod n of hash_potential_delta n r S t A e is 0.

theorem hash_potential_delta_sum_eq_zero (n : ℕ) [NeZero n] (r : Fin n → ZMod n) (S : Finset (ZMod n))
    (t : ℕ) (A : List (ZMod n)) (hA : A.length < t) :
    ∑ e : ZMod n, hash_potential_delta n r S t A e = 0
hash_potential_harmonicIn LeanData Structures

For a prefix A shorter than the target length t, the potential of A is the average over the next inserted element of the potentials of A ++ [e].

theorem hash_potential_harmonic (n : ℕ) [NeZero n] (r : Fin n → ZMod n) (S : Finset (ZMod n))
    (t : ℕ) (A : List (ZMod n)) (hA : A.length < t) :
    ∑ e : ZMod n, hash_potential n r S t (A ++ [e]) = (n : ℝ) * hash_potential n r S t A
hash_prefix_occupancy_aggregate_eq_sum_exact_occupiedIn LeanData Structures

Summing over k the number of length-t insertion sequences whose occupied set contains the first k offsets of r equals the sum over sets S of slots of (number of sequences with occupied set exactly S) times (number of k for which r(0),...,r(k-1) all lie in S).

theorem hash_prefix_occupancy_aggregate_eq_sum_exact_occupied (n : ℕ) [NeZero n] (r : Fin n → ZMod n) (t : ℕ) : (∑ k ∈ Finset.range (n + 1), (Finset.univ.filter (fun A : Fin t → ZMod n => ∀ j : Fin n, j.val < k → r j ∈ hash_occupied_slots n r (List.ofFn A))).card) = ∑ S : Finset (ZMod n), (Finset.univ.filter (fun A : Fin t → ZMod n => hash_occupied_slots n r (List.ofFn A) = S)).card * ((Finset.range (n + 1)).filter (fun k => ∀ j : Fin n, j.val < k → r j ∈ S)).card
hash_prefix_occupancy_aggregate_le_linearIn LeanData Structures

For n ≥ 2, a bijective offset sequence r with r 0 = 0 and r 1 a unit, and t < n, the total over k of the number of length-t insertion sequences whose occupied set contains r(0),...,r(k-1) is at most the corresponding total for linear probing: linear probing maximises the expected length of the occupied initial segment of the probe order.

theorem hash_prefix_occupancy_aggregate_le_linear (n : ℕ) [NeZero n] (hn : 2 ≤ n) (r : Fin n → ZMod n) (hr_bij : Function.Bijective r) (hr0 : r 0 = 0) (hr1 : IsUnit (r 1)) (t : ℕ) (ht : t < n) : (∑ k ∈ Finset.range (n + 1), (Finset.univ.filter (fun A : Fin t → ZMod n => ∀ j : Fin n, j.val < k → r j ∈ hash_occupied_slots n r (List.ofFn A))).card) ≤ (∑ k ∈ Finset.range (n + 1), (Finset.univ.filter (fun A : Fin t → ZMod n => ∀ j : Fin n, j.val < k → linear_probe_offset n j ∈ hash_occupied_slots n (linear_probe_offset n) (List.ofFn A))).card)
hash_probe_expected_cost_eq_tail_count_sum_divIn LeanData Structures

The expected probe cost equals the total over k of the probe tail counts, divided by n^(t+1): the aggregation of the tail probabilities is a single normalised integer sum.

theorem hash_probe_expected_cost_eq_tail_count_sum_div (n : ℕ) [NeZero n] (r : Fin n → ZMod n) (t : ℕ) : hash_probe_expected_cost n r t = ((∑ k ∈ Finset.range (n + 1), hash_probe_tail_count n r t k : ℕ) : ℝ) / (n : ℝ) ^ (t + 1)
hash_probe_expected_cost_le_of_tail_count_sum_leIn LeanData Structures

If the total probe tail count of r at load t is at most that of linear probing, then the expected probe cost of r is at most that of linear probing.

theorem hash_probe_expected_cost_le_of_tail_count_sum_le (n : ℕ) [NeZero n] (r : Fin n → ZMod n) (t : ℕ) (h : (∑ k ∈ Finset.range (n + 1), hash_probe_tail_count n r t k) ≤ ∑ k ∈ Finset.range (n + 1), hash_probe_tail_count n (linear_probe_offset n) t k) : hash_probe_expected_cost n r t ≤ hash_probe_expected_cost n (linear_probe_offset n) t
hash_probe_expected_cost_oneIn LeanData Structures

For any table size n ≥ 2 with [NeZero n], and any bijective offset sequence r with r 0 = 0, the expected probe cost to insert an additional key at load t = 1 is exactly 1 + 1 / (n : ℝ).

theorem hash_probe_expected_cost_one (n : ℕ) [NeZero n] (hn : 2 ≤ n)
    (r : Fin n → ZMod n) (hr : Function.Bijective r) (hr0 : r 0 = 0) :
    hash_probe_expected_cost n r 1 = 1 + 1 / (n : ℝ)
hash_probe_expected_cost_one_freeIn LeanData Structures

With exactly one free slot, the expected insertion cost is (n+1)/2 for any bijective offset order.

theorem hash_probe_expected_cost_one_free (n : ℕ) [NeZero n]
  (r : Fin n → ZMod n) (hr : Function.Bijective r) :
  hash_probe_expected_cost n r (n-1) = ((n : ℝ) + 1) / 2
hash_probe_expected_cost_unit_scalingIn LeanData Structures

Multiplying every offset of a probe sequence by a unit c of ZMod n leaves the expected probe cost unchanged; in particular one may normalise r 1 to 1.

theorem hash_probe_expected_cost_unit_scaling (n : ℕ) [NeZero n] (r : Fin n → ZMod n) (c : ZMod n) (hc : IsUnit c) (t : ℕ) : hash_probe_expected_cost n (fun j => c * r j) t = hash_probe_expected_cost n r t
hash_probe_tail_count_translation_reductionIn LeanData Structures

The number of (insertion sequence, query slot) pairs whose insertion cost exceeds k equals n times the number of length-t insertion sequences whose occupied set contains r(0),...,r(k-1) — because summing over the query slot is cancelled by translating the keys.

theorem hash_probe_tail_count_translation_reduction (n : ℕ) [NeZero n] (r : Fin n → ZMod n) (t k : ℕ) : hash_probe_tail_count n r t k = n * (Finset.univ.filter (fun A : Fin t → ZMod n => ∀ j : Fin n, j.val < k → r j ∈ hash_occupied_slots n r (List.ofFn A))).card
hash_step_delta_sum_fiber_eq_zeroIn LeanData Structures

For any table size n, offset sequence r, slot subset S, length t, and coordinate i : Fin t, the sum of hash_potential_delta over sequences H in the coordinate-i deletion fiber is 0.

theorem hash_step_delta_sum_fiber_eq_zero
    (n : ℕ) [NeZero n] (r : Fin n → ZMod n)
    (S : Finset (ZMod n)) (t : ℕ) (i : Fin t) :
    ∑ H ∈ Finset.univ.filter (fun H : Fin t → ZMod n => hash_occupy_count n r S ((List.ofFn H).eraseIdx i.val) = S.card),
      hash_potential_delta n r S t ((List.ofFn H).take i.val) (H i) = 0
hash_step_delta_sum_fully_occupied_leIn LeanData Structures

For any slot subset S and index i : Fin t, the sum of potential changes hash_potential_delta n r S t ((List.ofFn H).take i.val) (H i) over all sequences H in hash_fully_occupied_seqs n r S t is at most (hash_count_fully_occupied n r S t : ℝ) - (n : ℝ) * hash_count_fully_occupied n r S (t - 1).

theorem hash_step_delta_sum_fully_occupied_le
    (n : ℕ) [NeZero n] (r : Fin n → ZMod n)
    (S : Finset (ZMod n)) (t : ℕ) (i : Fin t) :
    ∑ H ∈ hash_fully_occupied_seqs n r S t,
      hash_potential_delta n r S t ((List.ofFn H).take i.val) (H i) ≤
        (hash_count_fully_occupied n r S t : ℝ) - (n : ℝ) * hash_count_fully_occupied n r S (t - 1)
hash_unit_first_truncated_probe_cost_maximumIn LeanData Structures

Every capped expected insertion cost is conjectured no greater than linear probing for unit-first offsets.

theorem hash_unit_first_truncated_probe_cost_maximum
  (n : ℕ) [NeZero n] (hn : 2 ≤ n) (r : Fin n → ZMod n)
  (hr : Function.Bijective r) (hr0 : r 0 = 0) (hr1 : IsUnit (r 1))
  (t K : ℕ) (ht : t < n) (hK : K ≤ n) :
  (∑ k ∈ Finset.range (K+1), hash_probe_tail_prob n r t k) ≤
    ∑ k ∈ Finset.range (K+1), hash_probe_tail_prob n (linear_probe_offset n) t k
mixed_radix_offset_even_double_zero_permIn LeanData Structures

For any even table size n > 2, there exists a permutation P of the prime factors of n such that doubling the offset mixed_radix_offset n P 1 gives 0 in ZMod n.

theorem mixed_radix_offset_even_double_zero_perm (n : ℕ) [NeZero n] (hn : 2 < n) (heven : 2 ∣ n) :
    ∃ P : List ℕ, P.Perm (Nat.primeFactorsList n) ∧
      mixed_radix_offset n P 1 + mixed_radix_offset n P 1 = 0
mixed_radix_offset_worst_mean_probe_normalizedIn LeanData Structures

For any table size n ≥ 2, any load t < n, and any normalized bijective probe sequence r with r 0 = 0, there exists an ordering P of the prime factors of n such that the expected probe cost under r is at most that under mixed_radix_offset n P.

theorem mixed_radix_offset_worst_mean_probe_normalized
    (n : ℕ) [NeZero n] (hn : 2 ≤ n)
    (r : Fin n → ZMod n) (hr_bij : Function.Bijective r) (hr0 : r 0 = 0)
    (t : ℕ) (ht : t < n) :
    ∃ P : List ℕ, P.Perm (Nat.primeFactorsList n) ∧
      hash_probe_expected_cost n r t ≤ hash_probe_expected_cost n (mixed_radix_offset n P) t
mixed_radix_offset_worst_mean_probe_normalized_endpointIn LeanData Structures

For any table size n ≥ 2, any load t < n satisfying t ≤ 2 or t = n - 1, and any normalized bijective probe sequence r with r 0 = 0, there exists a permutation P of the prime factors of n such that the expected probe cost under r is at most that under mixed_radix_offset n P.

theorem mixed_radix_offset_worst_mean_probe_normalized_endpoint
    (n : ℕ) [NeZero n] (hn : 2 ≤ n)
    (r : Fin n → ZMod n) (hr_bij : Function.Bijective r) (hr0 : r 0 = 0)
    (t : ℕ) (ht : t < n) (ht_cases : t ≤ 2 ∨ t = n - 1) :
    ∃ P : List ℕ, P.Perm (Nat.primeFactorsList n) ∧
      hash_probe_expected_cost n r t ≤ hash_probe_expected_cost n (mixed_radix_offset n P) t
mixed_radix_offset_worst_mean_probe_normalized_middleIn LeanData Structures

For any table size n ≥ 5, any intermediate load 3 ≤ t ≤ n - 2, and any normalized bijective probe sequence r with r 0 = 0, there exists a permutation P of the prime factors of n such that the expected probe cost under r is at most that under mixed_radix_offset n P.

theorem mixed_radix_offset_worst_mean_probe_normalized_middle
    (n : ℕ) [NeZero n] (hn : 5 ≤ n)
    (r : Fin n → ZMod n) (hr_bij : Function.Bijective r) (hr0 : r 0 = 0)
    (t : ℕ) (ht_lo : 3 ≤ t) (ht_hi : t ≤ n - 2) :
    ∃ P : List ℕ, P.Perm (Nat.primeFactorsList n) ∧
      hash_probe_expected_cost n r t ≤ hash_probe_expected_cost n (mixed_radix_offset n P) t
mixed_radix_offset_zeroIn LeanData Structures

For any table size n > 0 and any list of factors P, the mixed-radix reversed offset at index 0 is 0 in ZMod n.

theorem mixed_radix_offset_zero (n : ℕ) (P : List ℕ) (hn : 0 < n) :
    mixed_radix_offset n P ⟨0, hn⟩ = 0
odd_probe_offset_double_ne_zeroIn LeanData Structures

For an odd table size n > 2, any bijective offset sequence r with r 0 = 0 satisfies r 1 + r 1 ≠ 0 in ZMod n.

theorem odd_probe_offset_double_ne_zero (n : ℕ) [NeZero n] (hn : 2 < n) (hodd : ¬ 2 ∣ n)
    (r : Fin n → ZMod n) (hr : Function.Bijective r) (hr0 : r 0 = 0) :
    r 1 + r 1 ≠ 0
prime_fixed_offset_linear_probe_tail_prob_interior_leIn LeanData Structures

For prime p, any bijective offset sequence r with r 0 = 0, and load t < p, in the interior regime 2 ≤ k ≤ t, the probe tail probability under r is bounded by that under linear probing.

theorem prime_fixed_offset_linear_probe_tail_prob_interior_le
    (p : ℕ) [Fact (Nat.Prime p)]
    (r : Fin p → ZMod p) (hr_bij : Function.Bijective r) (hr0 : r 0 = 0)
    (t k : ℕ) (ht : t < p) (hk2 : 2 ≤ k) (hkt : k ≤ t) :
    hash_probe_tail_prob p r t k ≤ hash_probe_tail_prob p (linear_probe_offset p) t k
unit_first_fixed_offset_mean_probe_eq_oneIn LeanData Structures

For every table size n ≥ 2 with NeZero n and every bijective probe sequence r with r 0 = 0 and IsUnit (r 1), the expected probe cost at load t = 1 matches that of linear probing.

theorem unit_first_fixed_offset_mean_probe_eq_one
    (n : ℕ) [NeZero n] (hn : 2 ≤ n)
    (r : Fin n → ZMod n) (hr_bij : Function.Bijective r)
    (hr0 : r 0 = 0) (hr1 : IsUnit (r 1)) :
    hash_probe_expected_cost n r 1 = hash_probe_expected_cost n (linear_probe_offset n) 1
unit_first_fixed_offset_tail_count_sum_le_linear_fourIn LeanData Structures

For a 4-slot table, every bijective offset sequence with r 0 = 0 and r 1 a unit has, at every load t < 4, a total probe tail count at most that of linear probing; equivalently the expected-cost inequality holds at n = 4.

theorem unit_first_fixed_offset_tail_count_sum_le_linear_four : ∀ (r : Fin 4 → ZMod 4), Function.Bijective r → r 0 = 0 → IsUnit (r 1) → ∀ t : ℕ, t < 4 → (∑ k ∈ Finset.range 5, hash_probe_tail_count 4 r t k) ≤ ∑ k ∈ Finset.range 5, hash_probe_tail_count 4 (linear_probe_offset 4) t k
adjacency_lambda2_eq_adjMatrix_eigenvalues0In LeanGraph Theory & Graph Algorithms

For a simple graph G on a finite vertex type with 2 ≤ |V| and decidable adjacency, adjacency_lambda2 G equals the eigenvalue at index 1 of the Hermitian adjacency matrix G.adjMatrix ℝ.

theorem adjacency_lambda2_eq_adjMatrix_eigenvalues0 {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hn : 2 ≤ Fintype.card V) :
    adjacency_lambda2 G = (SimpleGraph.isHermitian_adjMatrix ℝ G).eigenvalues₀ ⟨1, hn⟩
adjacency_lambda2_le_of_degree_boundIn LeanGraph Theory & Graph Algorithms

For a finite graph G with 2 ≤ |V|, if every vertex satisfies deg(v) + 2 ≤ mu1(G), then lambda2(A(G)) ≤ mu1(G) - 2.

theorem adjacency_lambda2_le_of_degree_bound {V : Type*} [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hn : 2 ≤ Fintype.card V)
    (hdeg : ∀ v : V, (G.degree v : ℝ) + 2 ≤ laplacian_mu1 G) :
    adjacency_lambda2 G ≤ laplacian_mu1 G - 2
adjacency_lambda2_le_of_small_laplacian_spectral_radiusIn LeanGraph Theory & Graph Algorithms

The target inequality holds in the crux regime where the Laplacian spectral radius is smaller than max degree + 2: for a finite graph G with 2 ≤ |V| and some vertex v with mu1(G) < deg(v) + 2, we have lambda2(A(G)) ≤ mu1(G) - 2.

theorem adjacency_lambda2_le_of_small_laplacian_spectral_radius {V : Type*} [Fintype V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hn : 2 ≤ Fintype.card V)
    (h : ∃ v : V, laplacian_mu1 G < (G.degree v : ℝ) + 2) :
    adjacency_lambda2 G ≤ laplacian_mu1 G - 2
adjacency_rank_laplacian_second_eigenvalue_le_two_mul_edge_count_of_card_le_edge_cardIn LeanGraph Theory & Graph Algorithms

If G is a connected simple graph on n >= 2 vertices with at least n edges (so in particular G is not a tree), then mu_2 + rank(A) <= 2m.

theorem adjacency_rank_laplacian_second_eigenvalue_le_two_mul_edge_count_of_card_le_edge_card
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (hconn : G.Connected) (hn : 2 ≤ Fintype.card V)
    (hm : (Fintype.card V : ℝ) ≤ (G.edgeFinset.card : ℝ)) :
    simple_graph_laplacian_second_eigenvalue G + (Matrix.rank (G.adjMatrix ℝ) : ℝ) ≤
      2 * (G.edgeFinset.card : ℝ)
adjacency_rank_laplacian_second_eigenvalue_le_two_mul_edge_count_of_isTreeIn LeanGraph Theory & Graph Algorithms

For a tree G on n >= 2 vertices, mu_2 + rank(A) <= 2m, i.e. the target conjecture in the tree case.

theorem adjacency_rank_laplacian_second_eigenvalue_le_two_mul_edge_count_of_isTree
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (hTree : G.IsTree) (hn : 2 ≤ Fintype.card V) :
    simple_graph_laplacian_second_eigenvalue G + (Matrix.rank (G.adjMatrix ℝ) : ℝ) ≤
      2 * (G.edgeFinset.card : ℝ)
adjacency_rayleigh_indicator_eq_avg_degreeIn LeanGraph Theory & Graph Algorithms

The Rayleigh quotient of the adjacency matrix of G at the indicator vector of a vertex set s equals the average degree of the induced subgraph G[s].

attribute [local instance] Classical.propDecidable in
theorem adjacency_rayleigh_indicator_eq_avg_degree {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (s : Set V) :
    (∑ i, Set.indicator s (fun _ => (1 : ℝ)) i *
        Matrix.mulVec (G.adjMatrix ℝ) (Set.indicator s (fun _ => (1 : ℝ))) i) /
      (∑ i, (Set.indicator s (fun _ => (1 : ℝ)) i) ^ 2)
      = (∑ v : s, ((G.induce s).degree v : ℝ)) / (Fintype.card s : ℝ)
adjacency_rayleigh_quotient_le_spectral_radiusIn LeanGraph Theory & Graph Algorithms

The Rayleigh quotient of the adjacency matrix of a finite simple graph at a vector of strictly positive squared length is at most the adjacency spectral radius.

attribute [local instance] Classical.propDecidable in
theorem adjacency_rayleigh_quotient_le_spectral_radius
    {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (x : V → ℝ) (hx : 0 < ∑ i, x i ^ 2) :
    ENNReal.ofReal ((∑ i, x i * Matrix.mulVec (G.adjMatrix ℝ) x i) / (∑ i, x i ^ 2))
      ≤ adjacency_spectral_radius G
adjacency_spectral_radius_ge_of_eigenvectorIn LeanGraph Theory & Graph Algorithms

If w is a nonzero real vector whose adjacency-matrix image is lam times w with lam ≥ 0, then ofReal lam is at most the adjacency spectral radius of G.

open scoped Classical in
theorem adjacency_spectral_radius_ge_of_eigenvector {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (w : V → ℝ) (lam : ℝ) (hlam : 0 ≤ lam) (hw : w ≠ 0)
    (h : (G.adjMatrix ℝ).mulVec w = lam • w) :
    ENNReal.ofReal lam ≤ adjacency_spectral_radius G
adjacency_spectral_radius_ne_topIn LeanGraph Theory & Graph Algorithms

The adjacency spectral radius of a finite simple graph is finite (not ∞).

theorem adjacency_spectral_radius_ne_top {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) : adjacency_spectral_radius G ≠ ⊤
alternating_orientation_minimizes_arborescence_countIn LeanGraph Theory & Graph Algorithms

In a 3-vertex-connected simple plane graph with all degrees even, every alternating orientation D₀ minimises a_r over the Eulerian orientations: a_r(D₀) ≤ a_r(D) for every Eulerian orientation D and every root r.

theorem alternating_orientation_minimizes_arborescence_count {n : ℕ}
    (G : SimpleGraph (Fin n)) [DecidableRel G.Adj]
    (h3 : simple_graph_three_vertex_connected G) (heven : ∀ v, Even (G.degree v))
    (σ : Equiv.Perm G.Dart) (hσ : simple_graph_is_plane_rotation_system G σ)
    (D₀ D : Digraph (Fin n)) [DecidableRel D₀.Adj] [DecidableRel D.Adj]
    (hD₀ : digraph_is_alternating_orientation G σ D₀) (hD : digraph_is_eulerian_orientation G D)
    (r : Fin n) :
    digraph_arborescence_count_at D₀ r ≤ digraph_arborescence_count_at D r
amply_regular_diam_le_of_radial_driftIn LeanGraph Theory & Graph Algorithms

If the radial-drift inequality holds for every triple (v,p,q) with v reachable from p, d(p,q) = 2 and d(v,q) = d(v,p) + 2, then an amply regular graph with parameters (k,ℓ,μ) and diameter at least 3 has diameter at most 2k/(ℓ+2).

theorem amply_regular_diam_le_of_radial_drift {V : Type*} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj]
    {k ℓ μ : ℕ} (hG : IsAmplyRegular G k ℓ μ) (h3 : 3 ≤ G.diam)
    (hdrift : ∀ (v p q : V), G.Reachable v p → G.dist p q = 2 → G.dist v q = G.dist v p + 2 →
       (∑ y ∈ G.neighborFinset q, ((G.dist v y : ℤ) - (G.dist v q : ℤ)))
         ≤ (∑ y ∈ G.neighborFinset p, ((G.dist v y : ℤ) - (G.dist v p : ℤ))) - 2 * ((ℓ : ℤ) + 2)) :
    G.diam ≤ 2 * k / (ℓ + 2)
amply_regular_diameter_bound_of_mu_ge_lambdaIn LeanGraph Theory & Graph Algorithms

Let G be an amply regular graph on a finite vertex set with parameters (k, ℓ, μ), where 1 < μ and ℓ ≤ μ. Then G.diam ≤ if Even G.diam then 2 * k / μ else (2 * k - ℓ - 2) / μ + 1.

theorem amply_regular_diameter_bound_of_mu_ge_lambda {V : Type*} [Fintype V] (G : SimpleGraph V)
    [DecidableRel G.Adj] {k ℓ μ : ℕ} (hG : IsAmplyRegular G k ℓ μ) (hμ1 : 1 < μ) (hμℓ : ℓ ≤ μ) :
    G.diam ≤ if Even G.diam then 2 * k / μ else (2 * k - ℓ - 2) / μ + 1
amply_regular_diameter_bound_of_three_le_diamIn LeanGraph Theory & Graph Algorithms

Conjecture 3.7 of arXiv:2610.36620 in the case of diameter at least 3: an amply regular graph with parameters (k, ℓ, μ), μ > 2, and diameter at least 3 has diameter at most 2k/(ℓ+2).

theorem amply_regular_diameter_bound_of_three_le_diam {V : Type*} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj]
    {k ℓ μ : ℕ} (hG : IsAmplyRegular G k ℓ μ) (hμ : 2 < μ) (h3 : 3 ≤ G.diam) :
    G.diam ≤ 2 * k / (ℓ + 2)
amply_regular_ell_add_mu_add_one_le_k_of_dist_two_adj_dist_threeIn LeanGraph Theory & Graph Algorithms

In an amply regular graph with parameters (k, ℓ, μ), if x and y are at distance 2 and z is at distance 3 from x with y adjacent to z, then ℓ + μ + 1 ≤ k. Proof: the μ common neighbors of x and y in N(y), the ℓ common neighbors of y and z in N(y), and z itself are pairwise disjoint subsets of N(y), so their sum of cardinalities μ + ℓ + 1 is at most deg(y) = k.

theorem amply_regular_ell_add_mu_add_one_le_k_of_dist_two_adj_dist_three
    {V : Type*} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj]
    {k ℓ μ : ℕ} (hG : IsAmplyRegular G k ℓ μ)
    {x y z : V} (hxy : G.dist x y = 2) (hxz : G.dist x z = 3) (hyz : G.Adj y z) :
    ℓ + μ + 1 ≤ k
amply_regular_icosahedron_cartesian_powerIn LeanGraph Theory & Graph Algorithms

For every integer m ≥ 2, the m-fold Cartesian power of the icosahedron graph is an amply regular graph with parameters (v, k, λ, μ) = (12^m, 5m, 2, 2) and diameter 3m, satisfying μ > 1 and diam(G) > 2k/(λ+2), while having order strictly greater than 12.

theorem amply_regular_icosahedron_cartesian_power (m : ℕ) (hm : 2 ≤ m)
    [DecidableRel (cartesian_power_graph icosahedron_graph m).Adj] :
    IsAmplyRegular (cartesian_power_graph icosahedron_graph m) (5 * m) 2 2 ∧
    (cartesian_power_graph icosahedron_graph m).diam = 3 * m ∧
    Fintype.card (Fin m → Fin 12) = 12 ^ m ∧
    2 * (5 * m) / (2 + 2) < (cartesian_power_graph icosahedron_graph m).diam ∧
    1 < (2 : ℕ) ∧
    12 < Fintype.card (Fin m → Fin 12)
amply_regular_neighborFinset_common_cardIn LeanGraph Theory & Graph Algorithms

In an amply regular graph with parameters (k,ℓ,μ), every vertex of N(p) has exactly ℓ neighbours inside N(p); equivalently the neighbourhood of p induces an ℓ-regular graph on k vertices.

theorem amply_regular_neighborFinset_common_card {V : Type*} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj]
    {k ℓ μ : ℕ} (hG : IsAmplyRegular G k ℓ μ) {x p : V} (hxp : G.Adj x p) :
    ((G.neighborFinset p).filter (fun y => G.Adj x y)).card = ℓ
amply_regular_radial_driftIn LeanGraph Theory & Graph Algorithms

Radial drift: in an amply regular graph with parameters (k,ℓ,μ) and μ > 2, if v is reachable from p, d(p,q) = 2 and d(v,q) = d(v,p) + 2, then the outward Laplacian of f = d(v,·) drops by at least 2(ℓ+2) from p to q: the sum over N(q) of (f − f(q)) is at most the sum over N(p) of (f − f(p)) minus 2(ℓ+2). With b, c, μ', γ the counts of level-(i+1), level-(i−1) neighbours of p and level-(i+1), level-(i+3) neighbours of q (i = d(v,p)), this says b + μ' ≥ γ + c + 2ℓ + 4.

theorem amply_regular_radial_drift {V : Type*} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj]
    {k ℓ μ : ℕ} (hG : IsAmplyRegular G k ℓ μ) (hμ : 2 < μ)
    {v p q : V} (hvp : G.Reachable v p) (hpq : G.dist p q = 2) (hvq : G.dist v q = G.dist v p + 2) :
    (∑ y ∈ G.neighborFinset q, ((G.dist v y : ℤ) - (G.dist v q : ℤ)))
      ≤ (∑ y ∈ G.neighborFinset p, ((G.dist v y : ℤ) - (G.dist v p : ℤ))) - 2 * ((ℓ : ℤ) + 2)
amply_regular_radial_drift_of_mu_ge_lambdaIn LeanGraph Theory & Graph Algorithms

In an amply regular graph G on a finite vertex set with parameters (k, ℓ, μ) satisfying 1 < μ and ℓ ≤ μ, if G.Reachable v p, G.dist p q = 2, and G.dist v q = G.dist v p + 2, then the integer sum ∑ y ∈ G.neighborFinset q, ((G.dist v y : ℤ) - (G.dist v q : ℤ)) is at most (∑ y ∈ G.neighborFinset p, ((G.dist v y : ℤ) - (G.dist v p : ℤ))) - 2 * (μ : ℤ).

theorem amply_regular_radial_drift_of_mu_ge_lambda {V : Type*} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj]
    {k ℓ μ : ℕ} (hG : IsAmplyRegular G k ℓ μ) (hμ1 : 1 < μ) (hμℓ : ℓ ≤ μ)
    {v p q : V} (hvp : G.Reachable v p) (hpq : G.dist p q = 2) (hvq : G.dist v q = G.dist v p + 2) :
    (∑ y ∈ G.neighborFinset q, ((G.dist v y : ℤ) - (G.dist v q : ℤ)))
      ≤ (∑ y ∈ G.neighborFinset p, ((G.dist v y : ℤ) - (G.dist v p : ℤ))) - 2 * (μ : ℤ)
amply_regular_radial_drift_of_two_mu_geIn LeanGraph Theory & Graph Algorithms

In an amply regular graph with parameters (k,ℓ,μ) where k + ℓ + 2 ≤ 2μ, the radial-drift inequality holds for every v reachable from p with d(p,q) = 2 and d(v,q) = d(v,p) + 2.

theorem amply_regular_radial_drift_of_two_mu_ge {V : Type*} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj]
    {k ℓ μ : ℕ} (hG : IsAmplyRegular G k ℓ μ) (hμ : k + ℓ + 2 ≤ 2 * μ)
    {v p q : V} (hvp : G.Reachable v p) (hpq : G.dist p q = 2) (hvq : G.dist v q = G.dist v p + 2) :
    (∑ y ∈ G.neighborFinset q, ((G.dist v y : ℤ) - (G.dist v q : ℤ)))
      ≤ (∑ y ∈ G.neighborFinset p, ((G.dist v y : ℤ) - (G.dist v p : ℤ))) - 2 * ((ℓ : ℤ) + 2)
amply_regular_radial_sum_of_adjIn LeanGraph Theory & Graph Algorithms

If v and p are adjacent, the radial sum of f = d(v,·) at p equals k − ℓ − 2: exactly one neighbour of p (namely v) lies one level closer than p, and exactly k − 1 − ℓ neighbours of p lie one level further (the neighbours of p other than v that are not common neighbours of v and p).

theorem amply_regular_radial_sum_of_adj {V : Type*} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj]
    {k ℓ μ : ℕ} (hG : IsAmplyRegular G k ℓ μ) {v p : V} (h : G.Adj v p) :
    ∑ y ∈ G.neighborFinset p, ((G.dist v y : ℤ) - (G.dist v p : ℤ)) = (k : ℤ) - (ℓ : ℤ) - 2
bicirculant_3465_column_cycle_bijectiveIn LeanGraph Theory & Graph Algorithms

The closed-form column cycle (i ↦ -387*(i/3) - (0/35/112 depending on i mod 3)) is a bijection from Fin 1155 onto ZMod 1155.

theorem bicirculant_3465_column_cycle_bijective :
    Function.Bijective bicirculant_3465_column_cycle
bicirculant_3465_column_cycle_stepIn LeanGraph Theory & Graph Algorithms

Integer carry relation along the column cycle: for each i, the representative of the current column equals that of the next column plus the step (35, 77 or 275 according to i mod 3) minus 1155 times the carry (1 exactly when the current representative is smaller than the step).

theorem bicirculant_3465_column_cycle_step (i : Fin 1155) :
    (bicirculant_3465_column_cycle i).val =
      (bicirculant_3465_column_cycle (i + 1)).val
        + (if i.val % 3 = 0 then 35 else if i.val % 3 = 1 then 77 else 275)
        - 1155 * (if (bicirculant_3465_column_cycle i).val
                    < (if i.val % 3 = 0 then 35 else if i.val % 3 = 1 then 77 else 275) then 1 else 0)
bicirculant_3465_ham_vertices_adjacentIn LeanGraph Theory & Graph Algorithms

Consecutive images in the explicit enumeration are adjacent in the bicirculant graph, cyclically (the last, index 6929, is adjacent back to index 0).

theorem bicirculant_3465_ham_vertices_adjacent :
    ∀ i : Fin 6930,
      bicirculant_3465_graph.Adj (bicirculant_3465_ham_vertices i)
        (bicirculant_3465_ham_vertices (i + 1))
bicirculant_3465_ham_vertices_injectiveIn LeanGraph Theory & Graph Algorithms

The explicit enumeration bicirculant_3465_ham_vertices of the 6930 vertices is injective (so it is a bijective listing of the whole vertex set).

theorem bicirculant_3465_ham_vertices_injective :
    Function.Injective bicirculant_3465_ham_vertices
binary_nonzero_common_difference_octuple_bijectionIn LeanGraph Theory & Graph Algorithms

In any commutative exponent-two group, the set of injective nonzero functions f : Fin 8 → G with equal pair sums f(2k) + f(2k+1) = δ ≠ 0 is in bijection with the set of 5-tuples (d, a0, a1, a2, a3) where d ≠ 0 and each a_k avoids {0, d} and previous pairs {a_j, a_j + d}.

theorem binary_nonzero_common_difference_octuple_bijection
    {G : Type*} [AddCommGroup G] [Fintype G] [DecidableEq G]
    (h2 : ∀ a : G, a + a = 0) :
    ((Finset.univ : Finset (Fin 8 → G)).filter (fun f =>
      Function.Injective f ∧ (∀ i, f i ≠ 0) ∧ (∃ δ : G, δ ≠ 0 ∧ f 0 + f 1 = δ ∧ f 2 + f 3 = δ ∧ f 4 + f 5 = δ ∧ f 6 + f 7 = δ))).card =
    ((Finset.univ : Finset (G × G × G × G × G)).filter (fun ⟨d, a0, a1, a2, a3⟩ =>
      d ≠ 0 ∧
      a0 ∉ ({0, d} : Finset G) ∧
      a1 ∉ (insert a0 (insert (a0 + d) {0, d}) : Finset G) ∧
      a2 ∉ (insert a1 (insert (a1 + d) (insert a0 (insert (a0 + d) {0, d}))) : Finset G) ∧
      a3 ∉ (insert a2 (insert (a2 + d) (insert a1 (insert (a1 + d) (insert a0 (insert (a0 + d) {0, d}))))) : Finset G))).card
binary_nonzero_common_difference_octuple_countIn LeanGraph Theory & Graph Algorithms

In any finite commutative exponent-two group with at least8 elements, the number of injective nonzero ordered8-tuples satisfying the stated zero-sum/common-nonzero-difference constraint equals the stated product of group-cardinality factors.

theorem binary_nonzero_common_difference_octuple_count
    {G : Type*} [AddCommGroup G] [Fintype G] [DecidableEq G]
    (h2 : ∀ a : G, a + a = 0) (hcard : 8 ≤ Fintype.card G) :
    ((Finset.univ : Finset (Fin 8 → G)).filter (fun f =>
      Function.Injective f ∧ (∀ i, f i ≠ 0) ∧ (∃ δ : G, δ ≠ 0 ∧ f 0 + f 1 = δ ∧ f 2 + f 3 = δ ∧ f 4 + f 5 = δ ∧ f 6 + f 7 = δ))).card =
      (Fintype.card G - 1) * (Fintype.card G - 2) * (Fintype.card G - 4) * (Fintype.card G - 6) * (Fintype.card G - 8)
binary_nonzero_common_difference_tuple_countIn LeanGraph Theory & Graph Algorithms

In any finite commutative exponent-two group with at least 8 elements, the number of 5-tuples (d, a0, a1, a2, a3) with d ≠ 0, a0 ∉ {0, d}, and each subsequent a_k avoiding the union of {0, d} and all previous pairs {a_j, a_j + d} equals (|G|-1)(|G|-2)(|G|-4)(|G|-6)(|G|-8).

theorem binary_nonzero_common_difference_tuple_count
    {G : Type*} [AddCommGroup G] [Fintype G] [DecidableEq G]
    (h2 : ∀ a : G, a + a = 0) (hcard : 8 ≤ Fintype.card G) :
    ((Finset.univ : Finset (G × G × G × G × G)).filter (fun ⟨d, a0, a1, a2, a3⟩ =>
      d ≠ 0 ∧
      a0 ∉ ({0, d} : Finset G) ∧
      a1 ∉ (insert a0 (insert (a0 + d) {0, d}) : Finset G) ∧
      a2 ∉ (insert a1 (insert (a1 + d) (insert a0 (insert (a0 + d) {0, d}))) : Finset G) ∧
      a3 ∉ (insert a2 (insert (a2 + d) (insert a1 (insert (a1 + d) (insert a0 (insert (a0 + d) {0, d}))))) : Finset G))).card =
      (Fintype.card G - 1) * (Fintype.card G - 2) * (Fintype.card G - 4) * (Fintype.card G - 6) * (Fintype.card G - 8)
bipartite_column_lemma_coloringIn LeanGraph Theory & Graph Algorithms

Given a bipartite graph G ≤ completeBipartiteGraph α β and a nonempty subset V_j ⊆ β where each vertex has a neighbor in α, there exists a coloring of β using K = sup_{x ∈ α} |N(x) ∩ V_j| colors such that any two vertices in V_j whose canonical edges conflict receive distinct colors.

theorem bipartite_column_lemma_coloring
    {α β : Type*} [Fintype α] [Fintype β] [DecidableEq α] [DecidableEq β] [LinearOrder α]
    (G : SimpleGraph (α ⊕ β)) [DecidableRel G.Adj] (hG : G ≤ completeBipartiteGraph α β)
    (V_j : Finset β) (hne : ∀ b ∈ V_j, ∃ a : α, G.Adj (Sum.inl a) (Sum.inr b))
    (hV : V_j.Nonempty) :
    ∃ col : β → Fin (Finset.univ.sup (fun x : α => (Finset.filter (fun b => G.Adj (Sum.inl x) (Sum.inr b)) V_j).card)),
      ∀ (b : β) (hb : b ∈ V_j) (b' : β) (hb' : b' ∈ V_j),
        simple_graph_edge_conflict G
          ⟨s(Sum.inl ((Finset.filter (fun a => G.Adj (Sum.inl a) (Sum.inr b)) Finset.univ).min' (by obtain ⟨a, ha⟩ := hne b hb; exact ⟨a, Finset.mem_filter.mpr ⟨Finset.mem_univ a, ha⟩⟩)), Sum.inr b), by
            have hmem := Finset.min'_mem _ (by obtain ⟨a, ha⟩ := hne b hb; exact ⟨a, Finset.mem_filter.mpr ⟨Finset.mem_univ a, ha⟩⟩)
            exact (Finset.mem_filter.mp hmem).2⟩
          ⟨s(Sum.inl ((Finset.filter (fun a => G.Adj (Sum.inl a) (Sum.inr b')) Finset.univ).min' (by obtain ⟨a, ha⟩ := hne b' hb'; exact ⟨a, Finset.mem_filter.mpr ⟨Finset.mem_univ a, ha⟩⟩)), Sum.inr b'), by
            have hmem := Finset.min'_mem _ (by obtain ⟨a, ha⟩ := hne b' hb'; exact ⟨a, Finset.mem_filter.mpr ⟨Finset.mem_univ a, ha⟩⟩)
            exact (Finset.mem_filter.mp hmem).2⟩ →
        col b ≠ col b'
bipartite_column_lemma_conflict_neighborIn LeanGraph Theory & Graph Algorithms

Let G be a bipartite graph with parts α and β, with a linear order on α. If two canonical column edges e_b = (c(b), b) and e_{b'} = (c(b'), b') conflict in G, and c(b') ≤ c(b), then b ≠ b' and G.Adj (Sum.inl c(b)) (Sum.inr b').

theorem bipartite_column_lemma_conflict_neighbor
    {α β : Type*} [Fintype α] [Fintype β] [DecidableEq α] [DecidableEq β] [LinearOrder α]
    (G : SimpleGraph (α ⊕ β)) [DecidableRel G.Adj] (hG : G ≤ completeBipartiteGraph α β)
    {b b' : β}
    (h_nonempty : (Finset.filter (fun a => G.Adj (Sum.inl a) (Sum.inr b)) Finset.univ).Nonempty)
    (h_nonempty' : (Finset.filter (fun a => G.Adj (Sum.inl a) (Sum.inr b')) Finset.univ).Nonempty)
    (h_le : (Finset.filter (fun a => G.Adj (Sum.inl a) (Sum.inr b')) Finset.univ).min' h_nonempty' ≤
            (Finset.filter (fun a => G.Adj (Sum.inl a) (Sum.inr b)) Finset.univ).min' h_nonempty)
    (h_conflict : simple_graph_edge_conflict G
      ⟨s(Sum.inl ((Finset.filter (fun a => G.Adj (Sum.inl a) (Sum.inr b)) Finset.univ).min' h_nonempty), Sum.inr b), by
        have hmem := Finset.min'_mem _ h_nonempty
        exact (Finset.mem_filter.mp hmem).2⟩
      ⟨s(Sum.inl ((Finset.filter (fun a => G.Adj (Sum.inl a) (Sum.inr b')) Finset.univ).min' h_nonempty'), Sum.inr b'), by
        have hmem := Finset.min'_mem _ h_nonempty'
        exact (Finset.mem_filter.mp hmem).2⟩) :
    b ≠ b' ∧ G.Adj (Sum.inl ((Finset.filter (fun a => G.Adj (Sum.inl a) (Sum.inr b)) Finset.univ).min' h_nonempty)) (Sum.inr b')
bipartite_column_lemma_partitionIn LeanGraph Theory & Graph Algorithms

Let G be a finite bipartite graph with parts A and B, let σ be a linear order of A, and let V_j ⊆ B such that every vertex in V_j has a neighbor in A. For each b ∈ V_j, let c(b) = min_σ N(b), and let E_j = {c(b)b : b ∈ V_j}. Then the edge set E_j can be partitioned into at most max_{x ∈ A} |N(x) ∩ V_j| induced matchings of G.

theorem bipartite_column_lemma_partition
    {α β : Type*} [Fintype α] [Fintype β] [DecidableEq α] [DecidableEq β] [LinearOrder α]
    (G : SimpleGraph (α ⊕ β)) [DecidableRel G.Adj] (hG : G ≤ completeBipartiteGraph α β)
    (V_j : Finset β) (hne : ∀ b ∈ V_j, ∃ a : α, G.Adj (Sum.inl a) (Sum.inr b)) :
    ∃ (M : Fin (Finset.univ.sup (fun x : α => (Finset.filter (fun b => G.Adj (Sum.inl x) (Sum.inr b)) V_j).card)) → Set G.edgeSet),
      (∀ i, simple_graph_is_induced_matching G (M i)) ∧
      (∀ i, M i ⊆ { e | ∃ (b : β) (hb : b ∈ V_j)
        (h : (Finset.filter (fun a => G.Adj (Sum.inl a) (Sum.inr b)) Finset.univ).Nonempty),
          e.1 = s(Sum.inl ((Finset.filter (fun a => G.Adj (Sum.inl a) (Sum.inr b)) Finset.univ).min' h), Sum.inr b) }) ∧
      (∀ i j, i ≠ j → Disjoint (M i) (M j)) ∧
      ⋃ i, M i = { e | ∃ (b : β) (hb : b ∈ V_j)
        (h : (Finset.filter (fun a => G.Adj (Sum.inl a) (Sum.inr b)) Finset.univ).Nonempty),
          e.1 = s(Sum.inl ((Finset.filter (fun a => G.Adj (Sum.inl a) (Sum.inr b)) Finset.univ).min' h), Sum.inr b) }
bipartite_cut_obstructs_edge_disjoint_perfect_matchingsIn LeanGraph Theory & Graph Algorithms

Min-cut obstruction for edge-disjoint perfect matchings: if G is a bipartite simple graph on α ⊕ β with no same-side edges, and for some X ⊆ α, Y ⊆ β the number of edges from X into β ∖ Y is less than k·(|X| − |Y|), then G does not have k pairwise edge-disjoint perfect matchings.

theorem bipartite_cut_obstructs_edge_disjoint_perfect_matchings {α β : Type*} [Fintype α] [Fintype β] [DecidableEq α] [DecidableEq β] (G : SimpleGraph (α ⊕ β)) [DecidableRel G.Adj] (hα : ∀ a b : α, ¬ G.Adj (Sum.inl a) (Sum.inl b)) (hβ : ∀ a b : β, ¬ G.Adj (Sum.inr a) (Sum.inr b)) (X : Finset α) (Y : Finset β) (k : ℕ) (hcut : ((X.product (Finset.univ \ Y)).filter (fun p : α × β => G.Adj (Sum.inl p.1) (Sum.inr p.2))).card < k * (X.card - Y.card)) : ¬ simple_graph_has_edge_disjoint_perfect_matchings G k
bipartite_subset_colorable_iff_cross_intersectingIn LeanGraph Theory & Graph Algorithms

For k positive, the standard-list coloring exists exactly when, for each color i, there are two families of (k−1)-subsets avoiding i, each side's families cover all (k−1)-subsets, and the two families indexed by i are cross-r-intersecting.

theorem bipartite_subset_colorable_iff_cross_intersecting (k r : ℕ) (hk : 1 ≤ k) : bipartite_subset_standard_list_colorable k r ↔ ∃ (F G : Fin (2*k-1) → Set {B : Finset (Fin (2*k-1)) // B.card = k-1}), (∀ i B, B ∈ F i → i ∉ B.1) ∧ (∀ i B, B ∈ G i → i ∉ B.1) ∧ (∀ B, ∃ i, B ∈ F i) ∧ (∀ B, ∃ i, B ∈ G i) ∧ (∀ i B C, B ∈ F i → C ∈ G i → r ≤ (B.1 ∩ C.1).card)
bipartite_subset_colorable_iff_cross_intersecting_coversIn LeanGraph Theory & Graph Algorithms

The standard list coloring exists exactly when, for each color i, there are two families of k-subsets, with every set on each side covered by a family whose color it contains, and with the two families for each color cross-(r+1)-intersecting.

theorem bipartite_subset_colorable_iff_cross_intersecting_covers (k r : ℕ) : bipartite_subset_standard_list_colorable k r ↔ ∃ (A B : Fin (2*k-1) → Set {S : Finset (Fin (2*k-1)) // S.card = k}), (∀ S, ∃ i ∈ S.val, S ∈ A i) ∧ (∀ T, ∃ i ∈ T.val, T ∈ B i) ∧ ∀ i S T, S ∈ A i → T ∈ B i → r < (S.val ∩ T.val).card
bipartite_subset_colorable_iff_selectorsIn LeanGraph Theory & Graph Algorithms

The subset graph is colorable from its standard lists exactly when there are selectors for the two sides, each choosing an element of its set, whose choices differ whenever the sets meet in at most r elements.

theorem bipartite_subset_colorable_iff_selectors (k r : ℕ) : bipartite_subset_standard_list_colorable k r ↔ ∃ (f g : {S : Finset (Fin (2 * k - 1)) // S.card = k} → Fin (2 * k - 1)), (∀ S, f S ∈ S.1) ∧ (∀ T, g T ∈ T.1) ∧ (∀ S T, (S.1 ∩ T.1).card ≤ r → f S ≠ g T)
bipartite_subset_colorable_of_core_majoritiesIn LeanGraph Theory & Graph Algorithms

If each color has a core of at most k ground elements, and every k-set S contains a color i whose core meets S in more than half of k+r, then the standard lists admit a proper coloring.

theorem bipartite_subset_colorable_of_core_majorities (k r : ℕ) (C : Fin (2*k-1) → Finset (Fin (2*k-1))) (hC : ∀ i, (C i).card ≤ k) (hcover : ∀ S : {S : Finset (Fin (2*k-1)) // S.card = k}, ∃ i ∈ S.val, k+r+1 ≤ 2*(S.val ∩ C i).card) : bipartite_subset_standard_list_colorable k r
bipartite_subset_delete_one_disjoint_palettesIn LeanGraph Theory & Graph Algorithms

For positive k, after deleting any chosen k-subset on one side, there are list selectors on the remaining side and the entire other side whose color ranges are disjoint: the first avoids the deleted set and the second uses only colors in it.

theorem bipartite_subset_delete_one_disjoint_palettes (k : ℕ) (hk : 1 ≤ k) (S₀ : {S : Finset (Fin (2*k-1)) // S.card = k}) : ∃ (leftChoice rightChoice : {S : Finset (Fin (2*k-1)) // S.card = k} → Fin (2*k-1)), (∀ S, S ≠ S₀ → leftChoice S ∈ S.1 ∧ leftChoice S ∉ S₀.1) ∧ (∀ T, rightChoice T ∈ T.1 ∧ rightChoice T ∈ S₀.1)
boxProd_completeGraph_powers_well_covered_of_sphere_boundIn LeanGraph Theory & Graph Algorithms

If G has the well-covered powers property and every independent set of G^{d-1} meets the radius-d sphere around any vertex in fewer than t vertices, then G □ K_t has the well-covered powers property.

theorem boxProd_completeGraph_powers_well_covered_of_sphere_bound
    {V : Type*} [Fintype V] (G : SimpleGraph V)
    (hwc : simple_graph_has_well_covered_powers G)
    (t : ℕ) (ht : 1 ≤ t)
    (hsphere : ∀ (d : ℕ) (hd : 1 ≤ d) (I : Finset V) (hI : (simple_graph_power G (d - 1)).IsIndepSet (I : Set V))
      (v : V), (I.filter (fun w => G.edist v w = (d : ℕ∞))).card < t) :
    simple_graph_has_well_covered_powers (G □ SimpleGraph.completeGraph (Fin t))
boxProd_is_well_covered_factor_is_well_coveredIn LeanGraph Theory & Graph Algorithms

For any finite connected simple graphs G and H, if their Cartesian product G □ H is well-covered, then at least one of G and H is well-covered (Hartnell and Rall, 1998).

theorem boxProd_is_well_covered_factor_is_well_covered
    {V W : Type*} [Fintype V] [Fintype W]
    (G : SimpleGraph V) (H : SimpleGraph W)
    (hG : G.Connected) (hH : H.Connected)
    (hwc : simple_graph_is_well_covered (G □ H)) :
    simple_graph_is_well_covered G ∨ simple_graph_is_well_covered H
boxProd_wcp_factor_diam_boundIn LeanGraph Theory & Graph Algorithms

If the Cartesian product G □ H of finite connected simple graphs has the well-covered powers property and diam(G) ≥ 3, then diam(H) ≤ 1.

theorem boxProd_wcp_factor_diam_bound
    {V W : Type*} [Fintype V] [Fintype W]
    (G : SimpleGraph V) (H : SimpleGraph W)
    (hG : G.Connected) (hH : H.Connected)
    (hprod : simple_graph_has_well_covered_powers (G □ H))
    (hdG : 3 ≤ G.diam) :
    H.diam ≤ 1
c7_box_k3_connected_and_diamIn LeanGraph Theory & Graph Algorithms

C_7 (box) C_3 is connected and has diameter 4: every pair of vertices is at distance at most 4, and diam = 4.

theorem c7_box_k3_connected_and_diam :
    c7_box_k3_graph.Connected ∧ c7_box_k3_graph.diam = 4
c7_box_k3_distance_basicIn LeanGraph Theory & Graph Algorithms

Basic metric facts for c7_box_k3_distance: it vanishes exactly at equal vertices, satisfies the triangle inequality, is 1 across every edge, is bounded by 4, and from any vertex one can step to a vertex one unit closer to a prescribed target (greedy step).

theorem c7_box_k3_distance_basic :
    (∀ u : ZMod 7 × Fin 3, c7_box_k3_distance u u = 0) ∧
    (∀ u v : ZMod 7 × Fin 3, c7_box_k3_distance u v = 0 → u = v) ∧
    (∀ u v w : ZMod 7 × Fin 3, c7_box_k3_distance u v ≤ c7_box_k3_distance u w + c7_box_k3_distance w v) ∧
    (∀ u v : ZMod 7 × Fin 3, c7_box_k3_graph.Adj u v → c7_box_k3_distance u v = 1) ∧
    (∀ u v : ZMod 7 × Fin 3, 1 ≤ c7_box_k3_distance u v →
      ∃ w, c7_box_k3_graph.Adj u w ∧ c7_box_k3_distance w v = c7_box_k3_distance u v - 1) ∧
    (∀ u v : ZMod 7 × Fin 3, c7_box_k3_distance u v ≤ 4)
c7_box_k3_edistIn LeanGraph Theory & Graph Algorithms

The graph distance in C_7 (box) C_3 equals c7_box_k3_distance: for all u v, edist u v = (c7_box_k3_distance u v : ENat).

theorem c7_box_k3_edist (u v : ZMod 7 × Fin 3) :
    c7_box_k3_graph.edist u v = (c7_box_k3_distance u v : ℕ∞)
c7_box_k3_independent_set_boundsIn LeanGraph Theory & Graph Algorithms

Packing bounds in C_7 (box) C_3 at thresholds 3 and 4: (a) a set of columns of Z/7 pairwise at cyclic distance at least 2 has at most 3 elements; (b) pairwise at cyclic distance at least 3, at most 2 elements; (c) every vertex has a vertex at distance at least 3; (d) every vertex has a vertex at distance at least 4 (an antipodal pair).

theorem c7_box_k3_independent_set_bounds :
    (∀ J : Finset (ZMod 7), (∀ a ∈ J, ∀ b ∈ J, a ≠ b → 2 ≤ cyclic_distance_seven a b) → J.card ≤ 3) ∧
    (∀ J : Finset (ZMod 7), (∀ a ∈ J, ∀ b ∈ J, a ≠ b → 3 ≤ cyclic_distance_seven a b) → J.card ≤ 2) ∧
    (∀ u : ZMod 7 × Fin 3, ∃ w, 3 ≤ c7_box_k3_distance w u) ∧
    (∀ u : ZMod 7 × Fin 3, ∃ w, 4 ≤ c7_box_k3_distance w u)
c7_box_k3_pair_extensionIn LeanGraph Theory & Graph Algorithms

Extension of independent pairs at threshold 3 in C_7 (box) C_3: any two vertices at distance at least 3 are extended by a third vertex at distance at least 3 from both (and distinct from both). This is what makes every maximal independent set of the square have exactly 3 vertices.

theorem c7_box_k3_pair_extension :
    ∀ u v : ZMod 7 × Fin 3, 3 ≤ c7_box_k3_distance u v →
      ∃ w : ZMod 7 × Fin 3, 3 ≤ c7_box_k3_distance w u ∧ 3 ≤ c7_box_k3_distance w v ∧
        w ≠ u ∧ w ≠ v
c7_box_k3_power_well_covered_largeIn LeanGraph Theory & Graph Algorithms

For d ≥ 4 every power (C_7 (box) C_3)^d is well-covered (it is the complete graph on 21 vertices, all maximal independent sets of size 1).

theorem c7_box_k3_power_well_covered_large (d : ℕ) (hd : 4 ≤ d) :
    simple_graph_is_well_covered (simple_graph_power c7_box_k3_graph d)
c7_box_k3_power_well_covered_oneIn LeanGraph Theory & Graph Algorithms

C_7 (box) C_3 is well-covered: every maximal independent set has exactly 7 vertices.

theorem c7_box_k3_power_well_covered_one :
    simple_graph_is_well_covered (simple_graph_power c7_box_k3_graph 1)
c7_box_k3_power_well_covered_threeIn LeanGraph Theory & Graph Algorithms

The third power (C_7 (box) C_3)^3 is well-covered: every maximal independent set has exactly 2 vertices.

theorem c7_box_k3_power_well_covered_three :
    simple_graph_is_well_covered (simple_graph_power c7_box_k3_graph 3)
c7_box_k3_power_well_covered_twoIn LeanGraph Theory & Graph Algorithms

The second power (C_7 (box) C_3)^2 is well-covered: every maximal independent set has exactly 3 vertices.

theorem c7_box_k3_power_well_covered_two :
    simple_graph_is_well_covered (simple_graph_power c7_box_k3_graph 2)
card_biUnion_ve_comp_partIn LeanGraph Theory & Graph Algorithms

If each D C is contained in the part of C, the union over all components C has cardinality the sum of the cardinalities |D C|.

lemma card_biUnion_ve_comp_part {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (v : V)
    (D : (G.induce ({v}ᶜ : Set V)).ConnectedComponent → Finset V)
    (hsub : ∀ C, (D C : Set V) ⊆ ve_comp_part G v C) :
    (Finset.univ.biUnion D).card = ∑ C, (D C).card
card_disjoint_unions_of_card_eqIn LeanGraph Theory & Graph Algorithms

If A₁, B₁, A₂, B₂ are k-element finsets with A₁ ≠ B₁ and A₂ ≠ B₂, and the unions A₁ ∪ B₁ and A₂ ∪ B₂ are disjoint, then the cardinality of (A₁ ∪ B₁) ∪ (A₂ ∪ B₂) is at least 2k + 2.

theorem card_disjoint_unions_of_card_eq {α : Type*} [DecidableEq α]
    (k : ℕ) (A₁ B₁ A₂ B₂ : Finset α)
    (hA₁ : A₁.card = k) (hB₁ : B₁.card = k) (hne₁ : A₁ ≠ B₁)
    (hA₂ : A₂.card = k) (hB₂ : B₂.card = k) (hne₂ : A₂ ≠ B₂)
    (hdisj : Disjoint (A₁ ∪ B₁) (A₂ ∪ B₂)) :
    2 * k + 2 ≤ ((A₁ ∪ B₁) ∪ (A₂ ∪ B₂)).card
card_edgeFinset_turanGraph_128_3In LeanGraph Theory & Graph Algorithms

The Turán graph T(128, 3) has 5461 edges.

theorem card_edgeFinset_turanGraph_128_3 : (SimpleGraph.turanGraph 128 3).edgeFinset.card = 5461
card_edges_diff_induce_eq_of_not_mem_ZIn LeanGraph Theory & Graph Algorithms

For any graphs G ≤ H where all added edges have both endpoints in Z, removing a vertex x ∉ Z preserves the number of added edges: the added edges in H - x not in G - x are in bijection with the added edges in H not in G.

theorem card_edges_diff_induce_eq_of_not_mem_Z
    {V : Type*} [Fintype V] [DecidableEq V]
    (G H : SimpleGraph V) (Z : Set V)
    (hGH_edges : ∀ u v, H.Adj u v → G.Adj u v ∨ (u ∈ Z ∧ v ∈ Z))
    (x : V) (hxZ : x ∉ Z) :
    Nat.card ↑((H.induce {x}ᶜ).edgeSet \ (G.induce {x}ᶜ).edgeSet) =
      Nat.card ↑(H.edgeSet \ G.edgeSet)
card_eq_one_add_sum_ve_comp_part_interIn LeanGraph Theory & Graph Algorithms

For a finite vertex set S containing v, |S| = 1 + the sum over connected components C of G - v of |S ∩ V(C)|.

lemma card_eq_one_add_sum_ve_comp_part_inter {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (v : V) (S : Finset V) (hv : v ∈ S) :
    S.card = 1 + ∑ C : (G.induce ({v}ᶜ : Set V)).ConnectedComponent,
      ((S : Set V) ∩ ve_comp_part G v C).ncard
card_induce_edgeFinset_eq_add_boundaryIn LeanGraph Theory & Graph Algorithms

For S ⊆ U, the number of edges of G[U] is the sum of the edges of G[S], edges of G[U \\ S], and edges with one endpoint in S and one in U \\ S.

open scoped Classical in
theorem card_induce_edgeFinset_eq_add_boundary
    {V : Type*} [Fintype V] (G : SimpleGraph V)
    (U S : Finset V) (hS : S ⊆ U) :
    (G.induce (U : Set V)).edgeFinset.card =
      (G.induce (S : Set V)).edgeFinset.card +
      (G.induce ((U \ S) : Set V)).edgeFinset.card +
      (graph_edge_boundary G U S).card
cartesian_power_graph_adj_iffIn LeanGraph Theory & Graph Algorithms

Two vertices f, g of the n-fold Cartesian power of G on Fin n → V are adjacent if and only if there is a coordinate i where they are adjacent in G and they agree in every other coordinate.

theorem cartesian_power_graph_adj_iff {V : Type*} (G : SimpleGraph V) (n : ℕ) (f g : Fin n → V) :
    (cartesian_power_graph G n).Adj f g ↔ ∃ i : Fin n, G.Adj (f i) (g i) ∧ ∀ j : Fin n, j ≠ i → f j = g j
cartesian_power_graph_common_card_singleIn LeanGraph Theory & Graph Algorithms

If two vertices f, g of the n-fold Cartesian power agree off a single coordinate i, then the number of common neighbours of f and g in the power equals the number of common neighbours of f i and g i in G.

theorem cartesian_power_graph_common_card_single {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (n : ℕ) [DecidableRel (cartesian_power_graph G n).Adj]
    {i : Fin n} {f g : Fin n → V} (hagree : ∀ j : Fin n, j ≠ i → f j = g j) (hne : f i ≠ g i) :
    Fintype.card ((cartesian_power_graph G n).commonNeighbors f g)
      = Fintype.card (G.commonNeighbors (f i) (g i))
cartesian_power_graph_common_card_two_coordIn LeanGraph Theory & Graph Algorithms

If two vertices f, g of the n-fold Cartesian power are adjacent in two distinct coordinates i and j and agree elsewhere, then they have exactly 2 common neighbours in the power.

theorem cartesian_power_graph_common_card_two_coord {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (n : ℕ) [DecidableRel (cartesian_power_graph G n).Adj]
    {i j : Fin n} (hij : i ≠ j) {f g : Fin n → V}
    (hi : G.Adj (f i) (g i)) (hj : G.Adj (f j) (g j))
    (hagree : ∀ l : Fin n, l ≠ i → l ≠ j → f l = g l) :
    Fintype.card ((cartesian_power_graph G n).commonNeighbors f g) = 2
cartesian_power_graph_diam_eq_mulIn LeanGraph Theory & Graph Algorithms

If G is a graph with nonempty vertex set and finite diameter, then for every n the n-fold Cartesian power of G has diameter n times the diameter of G.

theorem cartesian_power_graph_diam_eq_mul {V : Type*} [Nonempty V] (G : SimpleGraph V)
    (hG : G.ediam ≠ ⊤) (n : ℕ) : (cartesian_power_graph G n).diam = n * G.diam
cartesian_power_graph_dist_eq_sumIn LeanGraph Theory & Graph Algorithms

If G has finite diameter, then the graph distance in the n-fold Cartesian power between two vertices f, g equals the sum over the coordinates i of the distance in G between f i and g i.

theorem cartesian_power_graph_dist_eq_sum {V : Type*} (G : SimpleGraph V) (hG : G.ediam ≠ ⊤) (n : ℕ)
    (f g : Fin n → V) :
    (cartesian_power_graph G n).dist f g = ∑ i : Fin n, G.dist (f i) (g i)
cartesian_power_graph_dist_two_classificationIn LeanGraph Theory & Graph Algorithms

If two vertices f, g of a Cartesian power of G are at distance 2, then either they differ in exactly one coordinate, at distance 2 in G, or they differ in exactly two coordinates, being adjacent in G at each of them.

theorem cartesian_power_graph_dist_two_classification {V : Type*} (G : SimpleGraph V) (hG : G.ediam ≠ ⊤)
    (n : ℕ) {f g : Fin n → V} (hfg : (cartesian_power_graph G n).dist f g = 2) :
    (∃ i : Fin n, G.dist (f i) (g i) = 2 ∧ ∀ j : Fin n, j ≠ i → f j = g j) ∨
    (∃ i j : Fin n, i ≠ j ∧ G.Adj (f i) (g i) ∧ G.Adj (f j) (g j) ∧
      ∀ l : Fin n, l ≠ i → l ≠ j → f l = g l)
cartesian_power_graph_edist_eq_sumIn LeanGraph Theory & Graph Algorithms

The extended graph distance in the n-fold Cartesian power of G between two vertices f and g equals the sum over the coordinates i of the extended distance in G between f i and g i (with ⊤ for disconnected pairs, the sum being ⊤ as soon as one term is).

theorem cartesian_power_graph_edist_eq_sum {V : Type*} (G : SimpleGraph V) (n : ℕ) (f g : Fin n → V) :
    (cartesian_power_graph G n).edist f g = ∑ i : Fin n, G.edist (f i) (g i)
cartesian_power_graph_isAmplyRegular_of_mu_twoIn LeanGraph Theory & Graph Algorithms

If a finite graph G with decidable adjacency is amply regular with parameters (k, ℓ, 2), then for every n its n-fold Cartesian power is amply regular with parameters (n*k, ℓ, 2).

theorem cartesian_power_graph_isAmplyRegular_of_mu_two {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {k ℓ : ℕ} (hG : IsAmplyRegular G k ℓ 2) (n : ℕ)
    [DecidableRel (cartesian_power_graph G n).Adj] :
    IsAmplyRegular (cartesian_power_graph G n) (n * k) ℓ 2
cartesian_power_graph_isRegularOfDegreeIn LeanGraph Theory & Graph Algorithms

If a graph G is regular of degree k, then for every n its n-fold Cartesian power is regular of degree n * k.

theorem cartesian_power_graph_isRegularOfDegree {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (n : ℕ) [DecidableRel (cartesian_power_graph G n).Adj]
    {k : ℕ} (hG : G.IsRegularOfDegree k) :
    (cartesian_power_graph G n).IsRegularOfDegree (n * k)
cartesian_product_complete_graphs_edistIn LeanGraph Theory & Graph Algorithms

In the Cartesian product G = K_{a 0} □ ⋯ □ K_{a (t-1)} of complete graphs, graph distance is Hamming distance: for all vertices u, v, G.edist u v = hammingDist u v.

theorem cartesian_product_complete_graphs_edist {t : ℕ} (a : Fin t → ℕ)
    (u v : (i : Fin t) → Fin (a i)) :
    (cartesian_product_complete_graphs a).edist u v = (hammingDist u v : ℕ∞)
cartesian_product_complete_graphs_exists_maximal_indep_cardIn LeanGraph Theory & Graph Algorithms

For 2 ≤ a 0 ≤ … ≤ a (t-1), with j the last index (j = t-1), the Cartesian product F = K_{a 0} □ … □ K_{a (t-1)} has a maximal independent set of cardinality ∏_{i ∈ Iio j} a i, namely the diagonal transversal {(x, (∑_i x_i) mod a_j) : x a front point}.

theorem cartesian_product_complete_graphs_exists_maximal_indep_card
    (t : ℕ) (a : Fin t → ℕ) (h_ge : ∀ i, 2 ≤ a i) (h_mono : Monotone a)
    (j : Fin t) (hj : (j : ℕ) = t - 1) :
    ∃ s : Finset ((i : Fin t) → Fin (a i)),
      Maximal (fun u : Finset ((i : Fin t) → Fin (a i)) =>
        (cartesian_product_complete_graphs a).IsIndepSet (u : Set _)) s ∧
      s.card = ∏ i ∈ Finset.Iio j, a i
cartesian_product_complete_graphs_exists_small_maximal_indepIn LeanGraph Theory & Graph Algorithms

If a j ≤ ∑_{i ∈ Iio j} (a i − 1), then F = K_{a 0} □ … □ K_{a (t-1)} has a maximal independent set of cardinality strictly less than ∏_{i ∈ Iio j} a i; equivalently F is not well-covered.

theorem cartesian_product_complete_graphs_exists_small_maximal_indep
    (t : ℕ) (ht : 2 ≤ t) (a : Fin t → ℕ) (h_ge : ∀ i, 2 ≤ a i) (h_mono : Monotone a)
    (j : Fin t) (hj : (j : ℕ) = t - 1)
    (hle : a j ≤ ∑ i ∈ Finset.Iio j, (a i - 1)) :
    ∃ s : Finset ((i : Fin t) → Fin (a i)),
      Maximal (fun u : Finset ((i : Fin t) → Fin (a i)) =>
        (cartesian_product_complete_graphs a).IsIndepSet (u : Set _)) s ∧
      s.card < ∏ i ∈ Finset.Iio j, a i
cartesian_product_complete_graphs_origin_star_indepIn LeanGraph Theory & Graph Algorithms

If a j ≤ ∑_{i ∈ Iio j} (a i − 1) (top factor no larger than the front degree), then F = K_{a 0} □ … □ K_{a (t-1)} has an independent set T which dominates the whole origin fibre {v : v i = 0 for all i ≠ j}: every origin-fibre vertex is adjacent to some element of T.

theorem cartesian_product_complete_graphs_origin_star_indep
    (t : ℕ) (ht : 2 ≤ t) (a : Fin t → ℕ) (h_ge : ∀ i, 2 ≤ a i) (h_mono : Monotone a)
    (j : Fin t) (hj : (j : ℕ) = t - 1)
    (hle : a j ≤ ∑ i ∈ Finset.Iio j, (a i - 1)) :
    ∃ T : Finset ((i : Fin t) → Fin (a i)),
      (cartesian_product_complete_graphs a).IsIndepSet (T : Set _) ∧
      (∀ v : (i : Fin t) → Fin (a i),
        (∀ i, i ≠ j → (v i : ℕ) = 0) →
        ∃ w ∈ T, (cartesian_product_complete_graphs a).Adj v w)
cartesian_product_complete_graphs_power_adjIn LeanGraph Theory & Graph Algorithms

For G = K_{a 0} □ ⋯ □ K_{a (t-1)} and d ≥ 0, two vertices are adjacent in the d-th power G^d if and only if they are distinct and their Hamming distance is at most d.

theorem cartesian_product_complete_graphs_power_adj {t : ℕ} (a : Fin t → ℕ) (d : ℕ)
    (u v : (i : Fin t) → Fin (a i)) :
    (simple_graph_power (cartesian_product_complete_graphs a) d).Adj u v ↔
      u ≠ v ∧ hammingDist u v ≤ d
cartesian_product_complete_graphs_succ_nonempty_isoIn LeanGraph Theory & Graph Algorithms

The Cartesian product graph K_{a 0} □ ... □ K_{a n} is isomorphic to (K_{a 0} □ ... □ K_{a (n-1)}) □ K_{a n}.

theorem cartesian_product_complete_graphs_succ_nonempty_iso {n : ℕ} (a : Fin (n + 1) → ℕ) :
    Nonempty (cartesian_product_complete_graphs a ≃g
      (cartesian_product_complete_graphs (fun i => a (Fin.castSucc i)) □
       SimpleGraph.completeGraph (Fin (a (Fin.last n)))))
cartesian_product_complete_graphs_top_bound_of_wcpIn LeanGraph Theory & Graph Algorithms

If K_{b 0} □ ... □ K_{b (m-1)} has well-covered powers (with m ≥ 3 and b monotone with values ≥ 2), then the top coordinate satisfies 1 + ∑_{i < m-1} (b i - 1) ≤ b (m-1).

theorem cartesian_product_complete_graphs_top_bound_of_wcp
    (m : ℕ) (hm : 3 ≤ m) (b : Fin m → ℕ) (h_ge : ∀ i, 2 ≤ b i) (h_mono : Monotone b)
    (hwcp : simple_graph_has_well_covered_powers (cartesian_product_complete_graphs b))
    (k : Fin m) (hk : (k : ℕ) = m - 1) :
    1 + ∑ i ∈ Finset.Iio k, (b i - 1) ≤ b k
cartesian_product_complete_graphs_wcp_prefixIn LeanGraph Theory & Graph Algorithms

If a Cartesian product of complete graphs has well-covered powers, then any prefix sub-product obtained by restricting to the first m coordinates also has well-covered powers.

theorem cartesian_product_complete_graphs_wcp_prefix
    (t : ℕ) (m : ℕ) (hm : 3 ≤ m) (hmt : m ≤ t) (a : Fin t → ℕ)
    (h_ge : ∀ i, 2 ≤ a i) (h_mono : Monotone a)
    (hwcp : simple_graph_has_well_covered_powers (cartesian_product_complete_graphs a)) :
    simple_graph_has_well_covered_powers
      (cartesian_product_complete_graphs (fun i : Fin m => a (Fin.castLE hmt i)))
cartesian_product_four_mid_bound_of_wcpIn LeanGraph Theory & Graph Algorithms

For four complete graphs with sizes 2 ≤ a 0 ≤ a 1 ≤ a 2 ≤ a 3, if their Cartesian product has the well-covered powers property, then 1 + (a 0 - 1) + (a 1 - 1) ≤ a 2.

theorem cartesian_product_four_mid_bound_of_wcp
    (a : Fin 4 → ℕ) (h_ge : ∀ i, 2 ≤ a i) (h_mono : Monotone a)
    (hwcp : simple_graph_has_well_covered_powers (cartesian_product_complete_graphs a)) :
    1 + (a 0 - 1) + (a 1 - 1) ≤ a 2
cartesian_product_four_top_bound_of_wcpIn LeanGraph Theory & Graph Algorithms

For four complete graphs with sizes 2 ≤ a 0 ≤ a 1 ≤ a 2 ≤ a 3, if their Cartesian product has the well-covered powers property, then 1 + (a 0 - 1) + (a 1 - 1) + (a 2 - 1) ≤ a 3.

theorem cartesian_product_four_top_bound_of_wcp
    (a : Fin 4 → ℕ) (h_ge : ∀ i, 2 ≤ a i) (h_mono : Monotone a)
    (hwcp : simple_graph_has_well_covered_powers (cartesian_product_complete_graphs a)) :
    1 + (a 0 - 1) + (a 1 - 1) + (a 2 - 1) ≤ a 3
cayley_graph_lift_power_of_two_cycleIn LeanGraph Theory & Graph Algorithms

Let $G$ be a group generated by an inverse-closed set $S \subseteq G \setminus \{1\}$, and let $P \triangleleft G$ be a normal 2-subgroup. Define $\overline{S} = \{sP : s \in S\} \setminus \{P\} \subseteq G/P$. If the Cayley graph $\operatorname{Cay}(G/P, \overline{S})$ contains a simple cycle of length $2^k$ for some integer $k \ge 2$, then $\operatorname{Cay}(G, S)$ contains a simple cycle of length $2^m$ for some integer $m \ge 2$.

theorem cayley_graph_lift_power_of_two_cycle
    {G : Type*} [Group G] (S : Set G) (hS_gen : Subgroup.closure S = ⊤)
    (hS_inv : S⁻¹ = S) (hS_one : (1 : G) ∉ S)
    (P : Subgroup G) [P.Normal] (hP : IsPGroup 2 P)
    (hk : ∃ (k : ℕ) (_ : 2 ≤ k) (u : G ⧸ P)
      (p : (SimpleGraph.mulCayley (QuotientGroup.mk '' S \ {1} : Set (G ⧸ P))).Walk u u),
      p.IsCycle ∧ p.length = 2 ^ k) :
    ∃ (m : ℕ) (_ : 2 ≤ m) (v : G) (q : (SimpleGraph.mulCayley S).Walk v v),
      q.IsCycle ∧ q.length = 2 ^ m
cayley_graph_power_of_two_cycle_of_distinct_same_cosetIn LeanGraph Theory & Graph Algorithms

Let $G$ be a group, $S \subseteq G \setminus \{1\}$ an inverse-closed subset, $P \le G$ a 2-subgroup, and $s, t \in S$ distinct elements satisfying $sP = tP$ in $G/P$. Then $\operatorname{Cay}(G, S)$ contains a simple cycle of length $2^m$ for some integer $m \ge 2$.

theorem cayley_graph_power_of_two_cycle_of_distinct_same_coset
    {G : Type*} [Group G] (S : Set G) (hS_inv : S⁻¹ = S) (hS_one : (1 : G) ∉ S)
    (P : Subgroup G) (hP : IsPGroup 2 P)
    (s t : G) (hs : s ∈ S) (ht : t ∈ S) (hst : s ≠ t)
    (h_eq : (QuotientGroup.mk s : G ⧸ P) = QuotientGroup.mk t) :
    ∃ (m : ℕ) (_ : 2 ≤ m) (v : G) (q : (SimpleGraph.mulCayley S).Walk v v),
      q.IsCycle ∧ q.length = 2 ^ m
cayley_graph_power_of_two_cycle_of_involution_and_mem_sdiffIn LeanGraph Theory & Graph Algorithms

Let $G$ be a group, $S \subseteq G \setminus \{1\}$ an inverse-closed subset, $P \triangleleft G$ a normal 2-subgroup, $s \in S \cap P$ an element of order 2, and $t \in S \setminus P$. Then $\operatorname{Cay}(G, S)$ contains a simple cycle of length $2^m$ for some integer $m \ge 2$.

theorem cayley_graph_power_of_two_cycle_of_involution_and_mem_sdiff
    {G : Type*} [Group G] (S : Set G) (hS_inv : S⁻¹ = S) (hS_one : (1 : G) ∉ S)
    (P : Subgroup G) [P.Normal] (hP : IsPGroup 2 P)
    (s : G) (hsS : s ∈ S) (hsP : s ∈ P) (hs_inv : orderOf s = 2)
    (t : G) (htS : t ∈ S) (htP : t ∉ P) :
    ∃ (m : ℕ) (_ : 2 ≤ m) (v : G) (q : (SimpleGraph.mulCayley S).Walk v v),
      q.IsCycle ∧ q.length = 2 ^ m
cayley_graph_power_of_two_cycle_of_mem_inter_order_ge_fourIn LeanGraph Theory & Graph Algorithms

Let $G$ be a group, $S \subseteq G \setminus \{1\}$ an inverse-closed subset, $P \le G$ a 2-subgroup, and $s \in S \cap P$ an element of order at least 4. Then $\operatorname{Cay}(G, S)$ contains a simple cycle of length $2^m$ for some integer $m \ge 2$.

theorem cayley_graph_power_of_two_cycle_of_mem_inter_order_ge_four
    {G : Type*} [Group G] (S : Set G) (hS_inv : S⁻¹ = S) (hS_one : (1 : G) ∉ S)
    (P : Subgroup G) (hP : IsPGroup 2 P)
    (s : G) (hsS : s ∈ S) (hsP : s ∈ P) (hs_order : 4 ≤ orderOf s) :
    ∃ (m : ℕ) (_ : 2 ≤ m) (v : G) (q : (SimpleGraph.mulCayley S).Walk v v),
      q.IsCycle ∧ q.length = 2 ^ m
chain_graph_balanced_minimal_k_star_forming_card_le_k_independence_numberIn LeanGraph Theory & Graph Algorithms

For a finite chain graph G with bipartition (A, V \ A), k ≥ 3, and a minimal k-star-forming set S with |S| larger than both |A| and |V \ A|, we have |S| ≤ β_k(G).

theorem chain_graph_balanced_minimal_k_star_forming_card_le_k_independence_number {V : Type*}
    [Fintype V] (G : SimpleGraph V) (A : Set V) (hG : simple_graph_is_chain_graph G A) (k : ℕ)
    (hk : 3 ≤ k) (S : Finset V) (hS : simple_graph_is_minimal_k_star_forming G k S)
    (hbig : max A.ncard Aᶜ.ncard < S.card) :
    S.card ≤ simple_graph_k_independence_number G k
chain_graph_card_le_k_independence_number_of_card_le_max_partIn LeanGraph Theory & Graph Algorithms

For a finite chain graph G with bipartition (A, V \ A), k ≥ 1, and any vertex set S with |S| ≤ max(|A|, |V \ A|), we have |S| ≤ β_k(G).

theorem chain_graph_card_le_k_independence_number_of_card_le_max_part {V : Type*} [Fintype V]
    (G : SimpleGraph V) (A : Set V) (hG : simple_graph_is_chain_graph G A)
    (k : ℕ) (hk : 1 ≤ k) (S : Finset V) (h : S.card ≤ max A.ncard Aᶜ.ncard) :
    S.card ≤ simple_graph_k_independence_number G k
chain_graph_is_k_independent_union_of_partsIn LeanGraph Theory & Graph Algorithms

In a chain graph with bipartition (A, V \ A), if A' ⊆ A and B' ⊆ V \ A are such that every vertex of A' has fewer than k neighbours in B' and every vertex of B' has fewer than k neighbours in A', then A' ∪ B' is k-independent.

theorem chain_graph_is_k_independent_union_of_parts {V : Type*} [DecidableEq V] (G : SimpleGraph V)
    (A : Set V) (hG : simple_graph_is_chain_graph G A) (k : ℕ) (A' B' : Finset V)
    (hA' : ∀ x ∈ A', x ∈ A) (hB' : ∀ x ∈ B', x ∉ A)
    (h1 : ∀ a ∈ A', ({b | b ∈ B' ∧ G.Adj a b} : Set V).ncard < k)
    (h2 : ∀ b ∈ B', ({a | a ∈ A' ∧ G.Adj b a} : Set V).ncard < k) :
    simple_graph_is_k_independent G k (A' ∪ B')
chain_graph_k_independence_number_ge_ncard_partIn LeanGraph Theory & Graph Algorithms

For a finite chain graph G with bipartition (A, V \ A) and k ≥ 1, both |A| and |V \ A| are at most β_k(G).

theorem chain_graph_k_independence_number_ge_ncard_part {V : Type*} [Fintype V]
    (G : SimpleGraph V) (A : Set V) (hG : simple_graph_is_chain_graph G A) (k : ℕ) (hk : 1 ≤ k) :
    A.ncard ≤ simple_graph_k_independence_number G k ∧
      Aᶜ.ncard ≤ simple_graph_k_independence_number G k
chain_graph_k_independence_number_ge_two_mul_k_sub_twoIn LeanGraph Theory & Graph Algorithms

For a finite chain graph G with bipartition (A, V \ A) and k ≥ 1, if both sides have at least k - 1 vertices then 2k - 2 ≤ β_k(G).

theorem chain_graph_k_independence_number_ge_two_mul_k_sub_two {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (A : Set V) (hG : simple_graph_is_chain_graph G A) (k : ℕ)
    (hk : 1 ≤ k) (hA : k - 1 ≤ A.ncard) (hB : k - 1 ≤ Aᶜ.ncard) :
    2 * k - 2 ≤ simple_graph_k_independence_number G k
chain_graph_minimal_k_star_forming_card_le_k_independence_numberIn LeanGraph Theory & Graph Algorithms

For a finite chain graph G with bipartition (A, V \ A), k ≥ 3, and every minimal k-star-forming set S, we have |S| ≤ β_k(G).

theorem chain_graph_minimal_k_star_forming_card_le_k_independence_number {V : Type*} [Fintype V]
    (G : SimpleGraph V) (A : Set V) (hG : simple_graph_is_chain_graph G A) (k : ℕ) (hk : 3 ≤ k)
    (S : Finset V) (hS : simple_graph_is_minimal_k_star_forming G k S) :
    S.card ≤ simple_graph_k_independence_number G k
chain_graph_parts_edge_freeIn LeanGraph Theory & Graph Algorithms

In a chain graph with bipartition (A, V \ A) no edge joins two vertices of A, and no edge joins two vertices outside A.

theorem chain_graph_parts_edge_free {V : Type*} (G : SimpleGraph V) (A : Set V)
    (hG : simple_graph_is_chain_graph G A) :
    (∀ u ∈ A, ∀ v ∈ A, ¬ G.Adj u v) ∧ (∀ u, u ∉ A → ∀ v, v ∉ A → ¬ G.Adj u v)
choosability_lifting_lemma_for_list_uncolorable_graphsIn LeanGraph Theory & Graph Algorithms

Choosability lifting lemma for list-uncolorable graphs (Lemma 9 of arXiv:2611.03151): Let k, a, b be positive integers with a ≥ b. If a finite simple graph G is k-choosable but not (a:b)-choosable, then there exists a finite simple graph G' on 1 + binom(a+b, b) * |V(G)| vertices that is (k+1)-choosable but not (a+b:b)-choosable. Moreover, if χ(G) = k, then χ(G') = ch(G') = k+1.

theorem choosability_lifting_lemma_for_list_uncolorable_graphs
    {V : Type} [Fintype V] (G : SimpleGraph V)
    (k a b : ℕ) (hk : 0 < k) (ha : 0 < a) (hb : 0 < b) (hab : b ≤ a)
    (h_choosable : simple_graph_is_choosable G k)
    (h_not_ab : ¬ simple_graph_is_multiple_choosable G a b) :
    ∃ (V' : Type) (_ : Fintype V') (G' : SimpleGraph V'),
      Fintype.card V' = 1 + (a + b).choose b * Fintype.card V ∧
      simple_graph_is_choosable G' (k + 1) ∧
      ¬ simple_graph_is_multiple_choosable G' (a + b) b ∧
      (G.chromaticNumber = k → G'.chromaticNumber = k + 1 ∧ simple_graph_choice_number G' = k + 1)
choose_three_eq_cube_subIn LeanGraph Theory & Graph Algorithms

For every n, the binomial coefficient (n+1 choose 3) equals (n^3 - n) / 6.

theorem choose_three_eq_cube_sub (n : ℕ) : (n + 1).choose 3 = (n ^ 3 - n) / 6
chromaticNumber_induce_leIn LeanGraph Theory & Graph Algorithms

Deleting vertices cannot increase the chromatic number: for any graph G and any subset s of its vertices, the chromatic number of the induced subgraph G[s] is at most the chromatic number of G.

theorem chromaticNumber_induce_le {V : Type*} (G : SimpleGraph V) (s : Set V) :
    (G.induce s).chromaticNumber ≤ G.chromaticNumber
chvatal_hanson_edge_boundIn LeanGraph Theory & Graph Algorithms

Let D and M be natural numbers with 1 ≤ D. Every finite simple graph G with maximum degree G.maxDegree ≤ D and matching number graph_matching_num G ≤ M has at most D * M + (D / 2) * (M / ((D + 1) / 2)) edges.

theorem chvatal_hanson_edge_bound
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (D M : ℕ) (hD : 1 ≤ D)
    (hΔ : G.maxDegree ≤ D) (hν : graph_matching_num G ≤ M) :
    G.edgeFinset.card ≤ D * M + (D / 2) * (M / ((D + 1) / 2))
claw_free_three_neighbours_span_edgeIn LeanGraph Theory & Graph Algorithms

In a claw-free graph, if a vertex u is adjacent to all three vertices of a 3-element set S, then S spans at least one edge.

theorem claw_free_three_neighbours_span_edge {V : Type*} (G : SimpleGraph V) (hclaw : IsClawFree G)
    (u : V) (S : Finset V) (hS : S.card = 3) (h : ∀ w ∈ S, G.Adj u w) :
    ∃ a ∈ S, ∃ b ∈ S, G.Adj a b
claw_free_type_ii_configuration_has_K4In LeanGraph Theory & Graph Algorithms

If G is claw-free, u and v are adjacent, S is a 3-element set, N(u) = {v} ∪ S and N(v) = {u} ∪ S, then some 4-element vertex set K containing both u and v induces a complete graph.

theorem claw_free_type_ii_configuration_has_K4 {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hclaw : IsClawFree G)
    (u v : V) (huv : G.Adj u v) (S : Finset V) (hS : S.card = 3)
    (hNu : ∀ w : V, G.Adj u w ↔ w = v ∨ w ∈ S)
    (hNv : ∀ w : V, G.Adj v w ↔ w = u ∨ w ∈ S) :
    ∃ K : Finset V, K.card = 4 ∧ u ∈ K ∧ v ∈ K ∧ (∀ a ∈ K, ∀ b ∈ K, a ≠ b → G.Adj a b)
claw_type_ii_claw_free_iff_no_claw_quadrupleIn LeanGraph Theory & Graph Algorithms

A graph G is claw-free if and only if there are no four pairwise distinct vertices b, c, d all adjacent to a common vertex a with b, c, d pairwise non-adjacent.

theorem claw_type_ii_claw_free_iff_no_claw_quadruple {V : Type*} (G : SimpleGraph V) :
    IsClawFree G ↔ ¬ ∃ a b c d : V, G.Adj a b ∧ G.Adj a c ∧ G.Adj a d ∧
      b ≠ c ∧ b ≠ d ∧ c ≠ d ∧ ¬ G.Adj b c ∧ ¬ G.Adj b d ∧ ¬ G.Adj c d
claw_type_ii_connected_component_supp_ncard_eq_filter_cardIn LeanGraph Theory & Graph Algorithms

In a finite graph, the support of a connected component has cardinality equal to the number of vertices whose connected component it is.

theorem claw_type_ii_connected_component_supp_ncard_eq_filter_card {V : Type*} [Fintype V]
    (G : SimpleGraph V) [DecidableEq G.ConnectedComponent] (C : G.ConnectedComponent) :
    C.supp.ncard = (Finset.univ.filter (fun v : V => G.connectedComponentMk v = C)).card
claw_type_ii_odd_components_ncard_eq_filter_cardIn LeanGraph Theory & Graph Algorithms

In a finite graph, the number of odd connected components equals the number of connected components whose support has odd cardinality, counted as a Finset filter over the components using the vertex-count restatement of the support.

theorem claw_type_ii_odd_components_ncard_eq_filter_card {V : Type*} [Fintype V]
    (G : SimpleGraph V) [DecidableEq G.ConnectedComponent] :
    G.oddComponents.ncard =
      (Finset.univ.filter (fun C : G.ConnectedComponent =>
        Odd (Finset.univ.filter (fun v : V => G.connectedComponentMk v = C)).card)).card
claw_type_ii_perfect_matching_iff_involutive_mapIn LeanGraph Theory & Graph Algorithms

A finite simple graph H has a perfect matching (a spanning matching subgraph) if and only if there is a fixed-point-free involutive map f on its vertices sending every vertex to a neighbour.

theorem claw_type_ii_perfect_matching_iff_involutive_map {V : Type*} [Fintype V] (H : SimpleGraph V) :
    (∃ M : H.Subgraph, M.IsPerfectMatching) ↔
      ∃ f : V → V, (∀ x, f (f x) = x) ∧ (∀ v, f v ≠ v) ∧ ∀ v, H.Adj v (f v)
clique_count_le_floor_boundIn LeanGraph Theory & Graph Algorithms

Let D, M, and t be natural numbers with 1 ≤ D and 2 ≤ t ≤ D + 1. Every finite simple graph G with maximum degree G.maxDegree ≤ D and matching number graph_matching_num G ≤ M satisfies (G.cliqueFinset t).card ≤ (D - 1).choose (t - 2) * (D * M + (D / 2) * (M / ((D + 1) / 2))) / t.choose 2.

theorem clique_count_le_floor_bound
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (D M t : ℕ) (hD : 1 ≤ D) (ht2 : 2 ≤ t) (htD : t ≤ D + 1)
    (hΔ : G.maxDegree ≤ D) (hν : graph_matching_num G ≤ M) :
    (G.cliqueFinset t).card ≤
      (D - 1).choose (t - 2) * (D * M + (D / 2) * (M / ((D + 1) / 2))) / t.choose 2
clique_count_mul_choose_two_le_edge_countIn LeanGraph Theory & Graph Algorithms

For any finite simple graph G with maximum degree at most D and any integer 2 <= t <= D + 1, choose(t, 2) times the number of t-cliques of G is at most choose(D - 1, t - 2) times the number of edges of G.

theorem clique_count_mul_choose_two_le_edge_count
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (D t : ℕ) (hD : 1 ≤ D) (ht2 : 2 ≤ t) (htD : t ≤ D + 1)
    (hΔ : G.maxDegree ≤ D) :
    t.choose 2 * (G.cliqueFinset t).card ≤ (D - 1).choose (t - 2) * G.edgeFinset.card
clique_count_upper_bound_chvatal_hansonIn LeanGraph Theory & Graph Algorithms

Let D, M, and t be natural numbers with 1 ≤ D and 2 ≤ t ≤ D + 1. Every finite simple graph G with maximum degree G.maxDegree ≤ D and matching number graph_matching_num G ≤ M satisfies ((G.cliqueFinset t).card : ℝ) ≤ ((D - 1).choose (t - 2) : ℝ) / (t.choose 2 : ℝ) * (D * M + (D / 2) * (M / ((D + 1) / 2)) : ℝ).

theorem clique_count_upper_bound_chvatal_hanson
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (D M t : ℕ) (hD : 1 ≤ D) (ht2 : 2 ≤ t) (htD : t ≤ D + 1)
    (hΔ : G.maxDegree ≤ D) (hν : graph_matching_num G ≤ M) :
    ((G.cliqueFinset t).card : ℝ) ≤
      ((D - 1).choose (t - 2) : ℝ) / (t.choose 2 : ℝ) * (D * M + (D / 2) * (M / ((D + 1) / 2)) : ℝ)
closed_walk_exists_connected_subgraph_le_factorIn LeanGraph Theory & Graph Algorithms

For any closed walk p visiting all vertices in an edge-weighted graph on n ≥ 2 vertices with positive edge weights, there exists a connected subgraph H ≤ G of total edge weight at most ((n-1)/n) times the total weight of p.

theorem closed_walk_exists_connected_subgraph_le_factor {V : Type*} [Fintype V]
    (G : SimpleGraph V) (hn : 2 ≤ Fintype.card V)
    (w : Sym2 V → ℝ) (hw : ∀ e ∈ G.edgeSet, 0 < w e)
    (u : V) (p : G.Walk u u) (hp : ∀ v, v ∈ p.support) :
    open scoped Classical in
    ∃ H : SimpleGraph V, H ≤ G ∧ H.Connected ∧
      ∑ e ∈ H.edgeFinset, w e ≤ ((Fintype.card V - 1 : ℝ) / (Fintype.card V : ℝ)) * (p.edges.map w).sum
colorable_induce_insert_of_card_ltIn LeanGraph Theory & Graph Algorithms

If the induced subgraph of G on s is c-colourable and a vertex v outside s has strictly fewer than c neighbours inside s, then G[s ∪ {v}] is c-colourable.

attribute [local instance] Classical.propDecidable in
theorem colorable_induce_insert_of_card_lt {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (s : Set V) (v : V) (hv : v ∉ s) (c : ℕ)
    (hc : (G.induce s).Colorable c)
    (hlt : Nat.card {u : V // u ∈ s ∧ G.Adj v u} < c) :
    (G.induce (insert v s)).Colorable c
coloring_fin_three_sum_one_edges_incidentIn LeanGraph Theory & Graph Algorithms

If a proper 3-colouring of a finite graph has colour sum 1, then there is a vertex v₀ such that every edge of the graph has an endpoint equal to v₀.

theorem coloring_fin_three_sum_one_edges_incident {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (c : G.Coloring (Fin 3))
    (hsum : ∑ v, ((c v : Fin 3) : ℕ) = 1) :
    ∃ v₀ : V, ∀ x y : V, G.Adj x y → x = v₀ ∨ y = v₀
coloring_fin_three_sum_one_exists_of_edges_incidentIn LeanGraph Theory & Graph Algorithms

If a vertex v₀ of a finite graph with at least two vertices is incident to every edge, then the graph has a proper 3-colouring that is 1 at v₀ and 0 elsewhere; in particular its colour sum is 1 and it uses exactly 2 colours.

theorem coloring_fin_three_sum_one_exists_of_edges_incident {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {v₀ : V}
    (hv : ∀ x y : V, G.Adj x y → x = v₀ ∨ y = v₀) (hcard : 2 ≤ Fintype.card V) :
    ∃ c : G.Coloring (Fin 3), (∑ w, ((c w : Fin 3) : ℕ)) = 1 ∧
      (Finset.univ.image c).card = 2
complete_equipartite_four_connectedIn LeanGraph Theory & Graph Algorithms

For any n ≥ 1, the complete equipartite graph with 4 parts of size n is connected.

theorem complete_equipartite_four_connected (n : ℕ) (hn : 1 ≤ n) :
    (SimpleGraph.completeEquipartiteGraph 4 n).Connected
complete_graph_balanced_split_le_two_mul_triangle_packingIn LeanGraph Theory & Graph Algorithms

For K_n, the balanced-split edge count (n/2).choose 2 + ((n+1)/2).choose 2 is at most 2·ν(K_n). For even n = 2m this count is m.choose 2 + m.choose 2 = 2·m.choose 2 ≤ 2ν by the even packing lemma. For odd n = 2m+1 it is m.choose 2 + (m+1).choose 2 = m² ≤ 2ν by the odd packing lemma.

theorem complete_graph_balanced_split_le_two_mul_triangle_packing (n : ℕ) :
    (n / 2).choose 2 + ((n + 1) / 2).choose 2 ≤
      2 * simple_graph_triangle_packing_number (⊤ : SimpleGraph (Fin n))
complete_graph_even_triangle_packing_number_geIn LeanGraph Theory & Graph Algorithms

The complete graph K_{2m} contains C(m,2) pairwise edge-disjoint triangles, so ν(K_{2m}) ≥ m.choose 2.

theorem complete_graph_even_triangle_packing_number_ge (m : ℕ) :
    m.choose 2 ≤ simple_graph_triangle_packing_number (⊤ : SimpleGraph (Fin (2 * m)))
complete_graph_odd_triangle_packing_number_two_mul_geIn LeanGraph Theory & Graph Algorithms

Twice the triangle packing number of K_{2m+1} is at least m²: split the vertices into A (size m) and B (size m+1); properly edge-colour K_{m+1} on B with m+1 colours, discard a colour class with at most half the average (some class has 2·|class| ≤ m by pigeonhole), and join every edge of the remaining m classes to a distinct vertex of A. This gives ≥ (m+1).choose 2 − ⌊m/2⌋ edge-disjoint triangles, whose doubled count is ≥ m².

theorem complete_graph_odd_triangle_packing_number_two_mul_ge (m : ℕ) :
    m * m ≤ 2 * simple_graph_triangle_packing_number (⊤ : SimpleGraph (Fin (2 * m + 1)))
complete_graph_triangle_cover_number_le_balanced_splitIn LeanGraph Theory & Graph Algorithms

For the complete graph K_n, deleting all edges inside either side of a balanced bipartition into parts of sizes ⌊n/2⌋ and ⌈n/2⌉ leaves a complete bipartite (triangle-free) graph, so those internal edges form a triangle cover: τ(K_n) ≤ C(⌊n/2⌋,2) + C(⌈n/2⌉,2) = (n/2).choose 2 + ((n+1)/2).choose 2.

theorem complete_graph_triangle_cover_number_le_balanced_split (n : ℕ) :
    simple_graph_triangle_cover_number (⊤ : SimpleGraph (Fin n)) ≤
      (n / 2).choose 2 + ((n + 1) / 2).choose 2
complete_split_graph_one_greedy_step_cardIn LeanGraph Theory & Graph Algorithms

For the star complete_split_graph n 1 (centre vertex 0) and any ordering of the vertices, the random greedy independent set is {0} when the centre is the first vertex of the ordering, and the set of all n-1 leaves otherwise; in particular its cardinality is 1 in the first case and n-1 in the second.

open Classical in
theorem complete_split_graph_one_greedy_step_card (n : ℕ) (hn : 1 ≤ n) (σ : Equiv.Perm (Fin n)) :
    (List.foldl (fun I v => if ∀ u ∈ I, ¬(complete_split_graph n 1).Adj u v then insert v I else I)
        (∅ : Finset (Fin n)) (List.ofFn ⇑σ)).card = if σ ⟨0, hn⟩ = ⟨0, hn⟩ then 1 else n - 1
cone_necklace_cover_numberIn LeanGraph Theory & Graph Algorithms

For odd m at least five, the cone-necklace graph has triangle cover number m+(m+1)/2.

open scoped Classical in
theorem cone_necklace_cover_number (m : ℕ) (hm : 5 ≤ m) (hodd : m % 2 = 1) :
  simple_graph_triangle_cover_number (cone_necklace_graph m) = m + (m + 1) / 2
cone_necklace_edge_avoidanceIn LeanGraph Theory & Graph Algorithms

For odd m at least five, every edge of the cone-necklace graph is avoided by some triangle packing of size m.

open scoped Classical in
theorem cone_necklace_edge_avoidance (m : ℕ) (hm : 5 ≤ m) (hodd : m % 2 = 1) :
  ∀ e ∈ (cone_necklace_graph m).edgeSet,
    ∃ Q : Finset (Finset (Sym2 (Fin (2 * m + 1)))),
      Q ⊆ simple_graph_triangle_edge_family (cone_necklace_graph m) ∧
      Q.card = m ∧
      (Q : Set (Finset (Sym2 (Fin (2 * m + 1))))).Pairwise Disjoint ∧
      e ∉ Q.biUnion id
cone_necklace_edge_cardIn LeanGraph Theory & Graph Algorithms

For odd m at least five, the cone-necklace graph has exactly 5m edges.

open scoped Classical in
theorem cone_necklace_edge_card (m : ℕ) (hm : 5 ≤ m) (hodd : m % 2 = 1) :
  (cone_necklace_graph m).edgeFinset.card = 5 * m
cone_necklace_edge_triangle_codegreesIn LeanGraph Theory & Graph Algorithms

For odd m at least five, every cone-necklace graph edge lies in at least two and at most four triangles.

open scoped Classical in
theorem cone_necklace_edge_triangle_codegrees (m : ℕ) (hm : 5 ≤ m) (hodd : m % 2 = 1) :
  ∀ e ∈ (cone_necklace_graph m).edgeSet,
    2 ≤ ((simple_graph_triangle_edge_family (cone_necklace_graph m)).filter (fun t => e ∈ t)).card ∧
    ((simple_graph_triangle_edge_family (cone_necklace_graph m)).filter (fun t => e ∈ t)).card ≤ 4
cone_necklace_marked_packing_conflict_cycleIn LeanGraph Theory & Graph Algorithms

For odd m at least five, the graph has a size-m triangle packing with one marked edge per triangle containing all singleton-forced edges, and the unmarked conflict graph has the designated m-cycle.

open scoped Classical in
theorem cone_necklace_marked_packing_conflict_cycle (m : ℕ) (hm : 5 ≤ m) (hodd : m % 2 = 1) :
  ∃ (P : Finset (Finset (Sym2 (Fin (2 * m + 1)))))
    (M : Finset (Sym2 (Fin (2 * m + 1)))),
    let F := simple_graph_triangle_edge_family (cone_necklace_graph m)
    let U := P.biUnion id
    P ⊆ F ∧ P.card = m ∧
    (P : Set (Finset (Sym2 (Fin (2 * m + 1))))).Pairwise Disjoint ∧
    M ⊆ U ∧ (∀ p ∈ P, (M ∩ p).card = 1) ∧
    (((F.filter (fun t => (t ∩ U).card = 1)).biUnion id) ∩ U) ⊆ M ∧
    ∃ f : Fin m → Sym2 (Fin (2 * m + 1)), Function.Injective f ∧
      (∀ i, f i ∈ U \ M) ∧
      (∀ i : Fin m, ∃ j : Fin m, j.val = (i.val + 1) % m ∧
        ∃ t ∈ F, f i ∈ t ∧ f j ∈ t ∧ ¬ t ⊆ U)
cone_necklace_packing_numberIn LeanGraph Theory & Graph Algorithms

For odd m at least five, the cone-necklace graph has triangle packing number m.

open scoped Classical in
theorem cone_necklace_packing_number (m : ℕ) (hm : 5 ≤ m) (hodd : m % 2 = 1) :
  simple_graph_triangle_packing_number (cone_necklace_graph m) = m
cone_necklace_three_vertex_connectedIn LeanGraph Theory & Graph Algorithms

For odd m at least five, deleting any at most two vertices leaves the induced cone-necklace graph connected.

open scoped Classical in
theorem cone_necklace_three_vertex_connected (m : ℕ) (hm : 5 ≤ m) (hodd : m % 2 = 1) :
  ∀ R : Finset (Fin (2 * m + 1)), R.card ≤ 2 →
    ((cone_necklace_graph m).induce {v | v ∉ R}).Connected
cone_necklace_triangle_cardIn LeanGraph Theory & Graph Algorithms

For odd m at least five, the cone-necklace graph has exactly 4m triangles.

open scoped Classical in
theorem cone_necklace_triangle_card (m : ℕ) (hm : 5 ≤ m) (hodd : m % 2 = 1) :
  (simple_graph_triangle_edge_family (cone_necklace_graph m)).card = 4 * m
conn_set_poly_Q_nonneg_implies_mean_order_geIn LeanGraph Theory & Graph Algorithms

If Q_G is nonnegative on [1,infinity), then for every lambda >= 1 the weighted mean order of G is at least that of K_n.

open scoped BigOperators Polynomial Classical in
theorem conn_set_poly_Q_nonneg_implies_mean_order_ge {V : Type*} [Fintype V] (G : SimpleGraph V)
    (hG : G.Connected)
    (hQnn : ∀ lam : ℝ, 1 ≤ lam → 0 ≤ (conn_set_poly_Q G).eval lam) :
    ∀ lam : ℝ, 1 ≤ lam →
      weighted_clique_mean (Fintype.card V) lam ≤ connected_induced_mean_order G lam
conn_set_poly_Q_top_eq_zeroIn LeanGraph Theory & Graph Algorithms

For the complete graph, Q_G vanishes identically: Z_K = (1+X)^n - 1 has derivative n(1+X)^(n-1), and the two terms of Q cancel.

open scoped BigOperators Polynomial Classical in
theorem conn_set_poly_Q_top_eq_zero {V : Type*} [Fintype V] :
    conn_set_poly_Q (⊤ : SimpleGraph V) = 0
conn_set_poly_Q_zero_implies_completeIn LeanGraph Theory & Graph Algorithms

If Q_G(lambda) = 0 for some lambda >= 1 forces G to be complete, then equality of the weighted mean orders at any lambda >= 1 forces G to be complete.

open scoped BigOperators Polynomial Classical in
theorem conn_set_poly_Q_zero_implies_complete {V : Type*} [Fintype V] (G : SimpleGraph V)
    (hG : G.Connected)
    (hQ0 : ∀ lam : ℝ, 1 ≤ lam → (conn_set_poly_Q G).eval lam = 0 → G = ⊤) :
    ∀ lam : ℝ, 1 ≤ lam →
      (connected_induced_mean_order G lam = weighted_clique_mean (Fintype.card V) lam → G = ⊤)
conn_set_poly_eval_posIn LeanGraph Theory & Graph Algorithms

For a nonempty finite vertex set and any real lambda >= 1, the connected-set generating polynomial evaluates to a strictly positive number at lambda; hence the mean-order ratio has a nonzero denominator.

open scoped BigOperators Polynomial Classical in
theorem conn_set_poly_eval_pos {V : Type*} [Fintype V] [Nonempty V]
    (G : SimpleGraph V) {lam : ℝ} (hlam : 1 ≤ lam) : 0 < (conn_set_poly G).eval lam
conn_set_poly_topIn LeanGraph Theory & Graph Algorithms

For the complete graph on a finite vertex type, the connected-set generating polynomial equals (1+X)^|V| - 1.

open scoped BigOperators Polynomial Classical in
theorem conn_set_poly_top {V : Type*} [Fintype V] :
    conn_set_poly (⊤ : SimpleGraph V) = (Polynomial.X + 1) ^ Fintype.card V - 1
connected_exists_closed_walk_spanningIn LeanGraph Theory & Graph Algorithms

In any finite connected simple graph on at least 2 vertices, there exists a closed walk that visits every vertex.

theorem connected_exists_closed_walk_spanning {V : Type*} [Fintype V]
    (G : SimpleGraph V) (hG : G.Connected) (hn : 2 ≤ Fintype.card V) :
    ∃ (u : V) (p : G.Walk u u), ∀ v, v ∈ p.support
connected_exists_distance_two_to_cliqueIn LeanGraph Theory & Graph Algorithms

Let G be connected, let Q be a clique with at least two vertices and let some vertex have no neighbour in Q. Then there are vertices y, x and a vertex q of Q such that y is not in Q and has no neighbour in Q, y is adjacent to x, and x is adjacent to q.

theorem connected_exists_distance_two_to_clique {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hconn : G.Connected)
    {Q : Finset V} (hQcl : G.IsClique (Q : Set V)) (hQ2 : 2 ≤ Q.card)
    (h : ∃ v : V, ∀ u ∈ Q, ¬ G.Adj v u) :
    ∃ y : V, y ∉ Q ∧ (∀ u ∈ Q, ¬ G.Adj y u) ∧
      ∃ x : V, G.Adj y x ∧ ∃ q ∈ Q, G.Adj x q
connected_indepNum_eq_radius_claw_freeIn LeanGraph Theory & Graph Algorithms

Every connected finite graph whose independence number equals its radius is claw-free: among any three distinct neighbours of a vertex, two are adjacent.

theorem connected_indepNum_eq_radius_claw_free {V : Type*} [Fintype V] (G : SimpleGraph V)
    (hconn : G.Connected) (hα : (G.indepNum : ℕ∞) = G.radius) :
    ∀ v a b c : V, G.Adj v a → G.Adj v b → G.Adj v c → a ≠ b → a ≠ c → b ≠ c →
      G.Adj a b ∨ G.Adj a c ∨ G.Adj b c
cops_can_win_if_robber_coveredIn LeanGraph Theory & Graph Algorithms

If, from a position with the cops on C and the robber on R, every vertex the robber could occupy after its next move (namely R itself or a neighbour of R) is at distance at most one from some cop, then the cops can force capture from that position.

theorem cops_can_win_if_robber_covered {V : Type*} (G : SimpleGraph V) {c : ℕ}
    (C : Fin c → V) (R : V)
    (h : ∀ R' : V, R' = R ∨ G.Adj R R' → ∃ i, C i = R' ∨ G.Adj (C i) R') :
    CopsCanWinFrom G c C R
corona_k1_base_edge_hits_of_transversalIn LeanGraph Theory & Graph Algorithms

If S is an edge geodesic transversal of corona_k1 G and neither pendant edge at u nor at v belongs to S (u ≠ v), then for every geodesic p of G from u to v some edge of S is the image under Sym2.map Sum.inl of an edge of p.

theorem corona_k1_base_edge_hits_of_transversal
    {V : Type*} [Fintype V] (G : SimpleGraph V)
    (S : Finset (Sym2 (V ⊕ V))) (hS : is_edge_geodesic_transversal (corona_k1 G) S)
    {u v : V} (huv : u ≠ v)
    (hu : s(Sum.inl u, Sum.inr u) ∉ S) (hv : s(Sum.inl v, Sum.inr v) ∉ S)
    {p : G.Walk u v} (hp : p.IsPath) (hlen : p.length = G.dist u v) :
    ∃ e ∈ S, ∃ e' ∈ p.edges, e = Sym2.map Sum.inl e'
corona_k1_dist_ge_of_pathIn LeanGraph Theory & Graph Algorithms

In corona_k1 G, any path from the leaf Sum.inr u to the leaf Sum.inr v with u ≠ v has length at least G.dist u v + 2. (No connectivity is needed: if u and v lie in different components there is no such path.)

theorem corona_k1_dist_ge_of_path
    {V : Type*} (G : SimpleGraph V) {u v : V} (huv : u ≠ v)
    (q : (corona_k1 G).Walk (Sum.inr u) (Sum.inr v)) (hq : q.IsPath) :
    G.dist u v + 2 ≤ q.length
corona_k1_dist_leavesIn LeanGraph Theory & Graph Algorithms

In the corona product G ⊙ K₁ of a connected finite graph G the distance between two distinct pendant leaves Sum.inr u and Sum.inr v equals G.dist u v + 2.

theorem corona_k1_dist_leaves
    {V : Type*} (G : SimpleGraph V) (hG : G.Connected) {u v : V} (huv : u ≠ v) :
    (corona_k1 G).dist (Sum.inr u) (Sum.inr v) = G.dist u v + 2
corona_k1_edge_geodesic_transversal_card_geIn LeanGraph Theory & Graph Algorithms

For every finite type V with 2 ≤ Fintype.card V and every connected simple graph G on V, every edge geodesic transversal S of the corona product corona_k1 G satisfies Fintype.card V - 1 ≤ S.card.

theorem corona_k1_edge_geodesic_transversal_card_ge
    {V : Type*} [Fintype V] (G : SimpleGraph V) (hG : G.Connected) (hn : 2 ≤ Fintype.card V)
    (S : Finset (Sym2 (V ⊕ V))) (hS : is_edge_geodesic_transversal (corona_k1 G) S) :
    Fintype.card V - 1 ≤ S.card
corona_k1_edge_geodesic_transversal_card_ge_of_cruxIn LeanGraph Theory & Graph Algorithms

Assume the pure-graph hitting bound (OP-641, in the form of a hypothesis quantifying over all finite vertex types). Then every edge geodesic transversal S of corona_k1 G satisfies |V| - 1 ≤ |S|.

theorem corona_k1_edge_geodesic_transversal_card_ge_of_crux
    (hCrux : ∀ {W : Type*} [Fintype W] (H : SimpleGraph W), H.Connected →
      ∀ (U : Finset W), 2 ≤ U.card → ∀ F : Finset (Sym2 W),
        (∀ e ∈ F, e ∈ H.edgeSet) →
        (∀ u ∈ U, ∀ v ∈ U, u ≠ v → ∀ p : H.Walk u v,
          p.IsPath → p.length = H.dist u v → ∃ e ∈ F, e ∈ p.edges) →
        U.card - 1 ≤ F.card)
    {V : Type*} [Fintype V] (G : SimpleGraph V) (hG : G.Connected) (hn : 2 ≤ Fintype.card V)
    (S : Finset (Sym2 (V ⊕ V))) (hS : is_edge_geodesic_transversal (corona_k1 G) S) :
    Fintype.card V - 1 ≤ S.card
corona_k1_edge_type_dichotomyIn LeanGraph Theory & Graph Algorithms

Every edge of the corona product corona_k1 G is either a pendant edge s(inl a, inr a) for some a, or a base edge s(inl a, inl b) inherited from G.

theorem corona_k1_edge_type_dichotomy
    {V : Type*} (G : SimpleGraph V) {e : Sym2 (V ⊕ V)}
    (he : e ∈ (corona_k1 G).edgeSet) :
    (∃ a : V, e = s(Sum.inl a, Sum.inr a)) ∨ (∃ a b : V, e = s(Sum.inl a, Sum.inl b))
corona_k1_pendant_countIn LeanGraph Theory & Graph Algorithms

For any set S of edges of corona_k1 G, the number of pendant edges in S equals |V| minus the number of vertices a whose pendant edge s(inl a, inr a) is not in S (and every pendant edge occurring in S is of this form).

theorem corona_k1_pendant_count
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (S : Finset (Sym2 (V ⊕ V))) :
    (S.filter (fun e => ∃ a : V, e = s(Sum.inl a, Sum.inr a))).card
      = Fintype.card V - (Finset.univ.filter (fun a : V => s(Sum.inl a, Sum.inr a) ∉ S)).card
corona_k1_pendant_edge_injectiveIn LeanGraph Theory & Graph Algorithms

The pendant edges of the corona product are pairwise distinct: if s(inl u, inr u) = s(inl v, inr v) as edges of the corona, then u = v.

theorem corona_k1_pendant_edge_injective
    {V : Type*} {u v : V}
    (h : s(Sum.inl u, Sum.inr u) = s(Sum.inl v, Sum.inr v)) : u = v
corona_k1_transversal_split_cardIn LeanGraph Theory & Graph Algorithms

For any set S of edges of corona_k1 G, the number of pendant edges of S plus the number of base edges of S equals |S|.

theorem corona_k1_transversal_split_card
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (S : Finset (Sym2 (V ⊕ V)))
    (hS : ∀ e ∈ S, e ∈ (corona_k1 G).edgeSet) :
    (S.filter (fun e => ∃ a : V, e = s(Sum.inl a, Sum.inr a))).card
      + (S.filter (fun e => ∃ a b : V, e = s(Sum.inl a, Sum.inl b))).card = S.card
corona_k1_walk_of_base_walkIn LeanGraph Theory & Graph Algorithms

For a walk p : G.Walk u v with u ≠ v, there is a walk in corona_k1 G from Sum.inr u to Sum.inr v obtained by putting a pendant edge at each end of (the image of) p inside the Sum.inl copy; it has length p.length + 2, is a path whenever p is, every edge of it is either a pendant edge or the image Sym2.map Sum.inl of an edge of p, and its only pendant edges are those at u and v.

theorem corona_k1_walk_of_base_walk
    {V : Type*} (G : SimpleGraph V) {u v : V} (huv : u ≠ v) (p : G.Walk u v) :
    ∃ q : (corona_k1 G).Walk (Sum.inr u) (Sum.inr v),
      q.length = p.length + 2 ∧ (p.IsPath → q.IsPath) ∧
      (∀ e ∈ q.edges, (∃ a : V, e = s(Sum.inl a, Sum.inr a)) ∨
        (∃ e' ∈ p.edges, e = Sym2.map Sum.inl e')) ∧
      (∀ a : V, s(Sum.inl a, Sum.inr a) ∈ q.edges → a = u ∨ a = v)
corona_k1_walk_of_path_inlIn LeanGraph Theory & Graph Algorithms

A path in corona_k1 G whose two endpoints both lie in the first copy (Sum.inl u and Sum.inl v) never visits a vertex of the second copy, and projects to a walk in G from u to v of the same length.

theorem corona_k1_walk_of_path_inl
    {V : Type*} (G : SimpleGraph V) {u v : V}
    (p : (corona_k1 G).Walk (Sum.inl u) (Sum.inl v)) (hp : p.IsPath) :
    ∃ q : G.Walk u v, q.length = p.length
crown_uniform_lists_overlap_obstructionIn LeanGraph Theory & Graph Algorithms

If m is at least four, p is at least two, and 2p is at most m+1, then any two selectors on all p-element subsets of an m-element ground set agree on some two distinct sets.

theorem crown_uniform_lists_overlap_obstruction (m p : ℕ) (hm : 4 ≤ m) (hp : 2 ≤ p) (hmp : 2*p ≤ m+1) (f g : {S : Finset (Fin m) // S.card = p} → Fin m) (hf : ∀ S, f S ∈ S.val) (hg : ∀ S, g S ∈ S.val) : ∃ S T, S ≠ T ∧ f S = g T
cycleGraph_adj_val_iffIn LeanGraph Theory & Graph Algorithms

For n ≥ 2 and x, y : Fin n, x and y are adjacent in the cycle graph on n vertices exactly when their values are consecutive (x.val = y.val + 1 or y.val = x.val + 1) or one of them is 0 and the other is n - 1.

theorem cycleGraph_adj_val_iff {n : ℕ} (hn : 2 ≤ n) {x y : Fin n} :
    (SimpleGraph.cycleGraph n).Adj x y ↔
      x.val = y.val + 1 ∨ y.val = x.val + 1 ∨
      (x.val = 0 ∧ y.val = n - 1) ∨ (y.val = 0 ∧ x.val = n - 1)
cycleGraph_dist_eqIn LeanGraph Theory & Graph Algorithms

For n ≥ 3 and vertices u, v of the cycle C_n, the graph distance between u and v is the minimum of the two cyclic separations: dist u v = min (((v + n - u) % n)) (((u + n - v) % n)), computed on the natural-number representatives of u and v.

theorem cycleGraph_dist_eq (n : ℕ) (hn : 3 ≤ n) (u v : Fin n) :
    (SimpleGraph.cycleGraph n).dist u v =
      min (((v : ℕ) + n - (u : ℕ)) % n) (((u : ℕ) + n - (v : ℕ)) % n)
cycle_cover_card_eq_sum_componentsIn LeanGraph Theory & Graph Algorithms

The sum of the sizes of the mutual-reachability classes is the number of vertices.

theorem cycle_cover_card_eq_sum_components {V : Type} [Fintype V] (R : V → V → Prop)
    [DecidableEq (Quotient (cycle_cover_mutual_reach_setoid R))] :
    (∑ q : Quotient (cycle_cover_mutual_reach_setoid R),
      Fintype.card {v // Quotient.mk (cycle_cover_mutual_reach_setoid R) v = q}) = Fintype.card V
cycle_cover_diameter_of_strongly_connected_componentsIn LeanGraph Theory & Graph Algorithms

A quadratic signed-diameter bound for the cycle-cover group of every strongly connected reflexive relation implies the same bound (with the same constant) for the cycle-cover group of every reflexive relation, by summing over the strongly connected components of R.

theorem cycle_cover_diameter_of_strongly_connected_components :
    ∀ (D : ℕ),
    (∀ (W : Type) [Fintype W] [DecidableEq W] (R' : W → W → Prop),
      (∀ w, R' w w) → (∀ u v : W, Relation.ReflTransGen R' u v) →
      ∀ k ∈ Subgroup.closure {p : Equiv.Perm W | ∀ w, R' w (p w)},
        ∃ w : List (Equiv.Perm W),
          (∀ p ∈ w, (∀ v, R' v (p v)) ∨ (∀ v, R' (p v) v)) ∧
            w.length ≤ D * (Fintype.card W) ^ 2 ∧ w.prod = k) →
    ∀ (V : Type) [Fintype V] [DecidableEq V] (R : V → V → Prop), (∀ v, R v v) →
      ∀ k ∈ Subgroup.closure {p : Equiv.Perm V | ∀ v, R v (p v)},
        ∃ w : List (Equiv.Perm V),
          (∀ p ∈ w, (∀ v, R v (p v)) ∨ (∀ v, R (p v) v)) ∧
            w.length ≤ D * (Fintype.card V) ^ 2 ∧ w.prod = k
cycle_cover_fiber_strong_connectedIn LeanGraph Theory & Graph Algorithms

Each mutual-reachability class, viewed as a subtype with the restricted relation, is strongly connected: any two points of the class are joined by a restricted path that never leaves the class.

theorem cycle_cover_fiber_strong_connected {V : Type} (R : V → V → Prop)
    (q : Quotient (cycle_cover_mutual_reach_setoid R))
    (a b : {v // Quotient.mk (cycle_cover_mutual_reach_setoid R) v = q}) :
    Relation.ReflTransGen
      (fun x y : {v // Quotient.mk (cycle_cover_mutual_reach_setoid R) v = q} => R x.val y.val) a b
cycle_cover_flat_length_boundIn LeanGraph Theory & Graph Algorithms

If each component of a relation has a word of length at most D times the square of its size, then concatenating the words over all mutual-reachability classes gives a word of length at most D times the square of the number of vertices.

theorem cycle_cover_flat_length_bound {V : Type} [Fintype V] (R : V → V → Prop)
    [DecidableEq (Quotient (cycle_cover_mutual_reach_setoid R))] (D : ℕ)
    (F : Quotient (cycle_cover_mutual_reach_setoid R) → List (Equiv.Perm V))
    (hF : ∀ q : Quotient (cycle_cover_mutual_reach_setoid R),
      (F q).length ≤ D * (Fintype.card {v // Quotient.mk (cycle_cover_mutual_reach_setoid R) v = q}) ^ 2) :
    ((((Finset.univ : Finset (Quotient (cycle_cover_mutual_reach_setoid R))).toList).map F).flatten).length
      ≤ D * (Fintype.card V) ^ 2
cycle_cover_flat_prod_eq_of_blockwiseIn LeanGraph Theory & Graph Algorithms

The assembly step: if the block of each class acts on the points of that class exactly as a fixed permutation k does (and blocks preserve classes and fix other classes pointwise), then the flattened product over all classes is k.

theorem cycle_cover_flat_prod_eq_of_blockwise {V : Type} (s : Setoid V) [Fintype (Quotient s)]
    [DecidableEq (Quotient s)]
    (F : Quotient s → List (Equiv.Perm V))
    (hpres : ∀ (q : Quotient s) (g : Equiv.Perm V), g ∈ F q → ∀ v : V,
      Quotient.mk s (g v) = Quotient.mk s v)
    (hfix : ∀ (q : Quotient s) (g : Equiv.Perm V), g ∈ F q → ∀ v : V, Quotient.mk s v ≠ q → g v = v)
    (k : Equiv.Perm V)
    (hblock : ∀ (q : Quotient s) (x : V), Quotient.mk s x = q → (F q).prod x = k x) :
    ((((Finset.univ : Finset (Quotient s)).toList).map F).flatten).prod = k
cycle_cover_flat_prod_not_memIn LeanGraph Theory & Graph Algorithms

Given a family of permutations block-indexed by the classes of a setoid, where the q-th block fixes pointwise everything outside class q: if the class of x is not in a nodup list of classes, the flattened product over that list fixes x.

theorem cycle_cover_flat_prod_not_mem {V : Type} (s : Setoid V)
    (F : Quotient s → List (Equiv.Perm V))
    (hfix : ∀ (q : Quotient s) (g : Equiv.Perm V), g ∈ F q → ∀ v : V, Quotient.mk s v ≠ q → g v = v)
    (q0 : Quotient s) :
    ∀ {l : List (Quotient s)}, l.Nodup → q0 ∉ l → ∀ x : V, Quotient.mk s x = q0 →
      ((l.map F).flatten).prod x = x
cycle_cover_flat_prod_of_memIn LeanGraph Theory & Graph Algorithms

Given a family of permutations block-indexed by the classes of a setoid, where every block element preserves classes and fixes everything outside its own class: if the class of x appears in a nodup list of classes, the flattened product over that list acts on x exactly as the block of x's class does.

theorem cycle_cover_flat_prod_of_mem {V : Type} (s : Setoid V)
    (F : Quotient s → List (Equiv.Perm V))
    (hpres : ∀ (q : Quotient s) (g : Equiv.Perm V), g ∈ F q → ∀ v : V,
      Quotient.mk s (g v) = Quotient.mk s v)
    (hfix : ∀ (q : Quotient s) (g : Equiv.Perm V), g ∈ F q → ∀ v : V, Quotient.mk s v ≠ q → g v = v)
    (q0 : Quotient s) :
    ∀ {l : List (Quotient s)}, l.Nodup → q0 ∈ l → ∀ x : V, Quotient.mk s x = q0 →
      ((l.map F).flatten).prod x = (F q0).prod x
cycle_cover_group_preserves_classIn LeanGraph Theory & Graph Algorithms

Every element k of the cycle-cover group of R maps each mutual-reachability class onto itself: k x lies in the class of x.

theorem cycle_cover_group_preserves_class {V : Type} [Fintype V] (R : V → V → Prop)
    (k : Equiv.Perm V) (hk : k ∈ Subgroup.closure {p : Equiv.Perm V | ∀ v, R v (p v)}) (x : V) :
    Quotient.mk (cycle_cover_mutual_reach_setoid R) (k x)
      = Quotient.mk (cycle_cover_mutual_reach_setoid R) x
cycle_cover_list_prod_fixes_atIn LeanGraph Theory & Graph Algorithms

If every permutation in a list fixes a point x, then the product of the list fixes x.

theorem cycle_cover_list_prod_fixes_at {V : Type} {x : V} :
    ∀ l : List (Equiv.Perm V), (∀ g ∈ l, g x = x) → l.prod x = x
cycle_cover_ofSubtype_is_coverIn LeanGraph Theory & Graph Algorithms

A permutation of one mutual-reachability class, extended by the identity off the class, is a cycle cover of R on the whole type (resp. its inverse is) provided it is a cycle cover (resp. reverse cycle cover) of the restricted relation, using reflexivity off the class.

theorem cycle_cover_ofSubtype_is_cover {V : Type} (R : V → V → Prop) (hR : ∀ v, R v v)
    [DecidableEq (Quotient (cycle_cover_mutual_reach_setoid R))]
    (q : Quotient (cycle_cover_mutual_reach_setoid R))
    (g : Equiv.Perm {v // Quotient.mk (cycle_cover_mutual_reach_setoid R) v = q}) :
    ((∀ w, R w.val (g w).val) → ∀ v, R v (Equiv.Perm.ofSubtype g v)) ∧
    ((∀ w, R (g w).val w.val) → ∀ v, R (Equiv.Perm.ofSubtype g v) v)
cycle_cover_prod_preserves_classIn LeanGraph Theory & Graph Algorithms

If every permutation in a list maps each element into its own class (fibre of the quotient map of a setoid), then the product of the list does too.

theorem cycle_cover_prod_preserves_class {V : Type} (s : Setoid V) (l : List (Equiv.Perm V))
    (h : ∀ g ∈ l, ∀ v : V, Quotient.mk s (g v) = Quotient.mk s v) :
    ∀ v : V, Quotient.mk s (l.prod v) = Quotient.mk s v
cycle_cover_restriction_mem_closureIn LeanGraph Theory & Graph Algorithms

The restriction of an element of the cycle-cover group to one mutual-reachability class lies in the cycle-cover group of that class with the restricted relation, provided k maps each class into itself.

theorem cycle_cover_restriction_mem_closure {V : Type} [Fintype V] (R : V → V → Prop)
    (k : Equiv.Perm V) (hk : k ∈ Subgroup.closure {p : Equiv.Perm V | ∀ v, R v (p v)})
    (hcls : ∀ (q : Quotient (cycle_cover_mutual_reach_setoid R)), ∀ x : V,
      (Quotient.mk (cycle_cover_mutual_reach_setoid R) (k x) = q) ↔
        (Quotient.mk (cycle_cover_mutual_reach_setoid R) x = q))
    (q : Quotient (cycle_cover_mutual_reach_setoid R)) :
    k.subtypePerm (hcls q) ∈
      Subgroup.closure {p : Equiv.Perm {v // Quotient.mk (cycle_cover_mutual_reach_setoid R) v = q} |
        ∀ v, R v.val (p v).val}
cycle_cover_sum_sq_le_sq_sumIn LeanGraph Theory & Graph Algorithms

A sum of squares of naturals is at most the square of the sum.

theorem cycle_cover_sum_sq_le_sq_sum {ι : Type} [Fintype ι] (m : ι → ℕ) :
    (∑ i, m i ^ 2) ≤ (∑ i, m i) ^ 2
cycle_graph_adj_signed_stepIn LeanGraph Theory & Graph Algorithms

If a and b are adjacent in C_n (n >= 2) there is an integer δ congruent to b - a mod n with |δ| = 1.

theorem cycle_graph_adj_signed_step (n : ℕ) (hn : 2 ≤ n) {a b : Fin n}
    (h : (SimpleGraph.cycleGraph n).Adj a b) :
    ∃ δ : ℤ, δ ≡ (b : ℤ) - (a : ℤ) [ZMOD (n : ℤ)] ∧ δ.natAbs = 1
cycle_graph_edist_ge_cyclic_distIn LeanGraph Theory & Graph Algorithms

For n >= 3 and vertices u, v of C_n, the extended distance edist u v is at least min(k, n-k) where k = (v - u).val.

theorem cycle_graph_edist_ge_cyclic_dist (n : ℕ) (hn : 3 ≤ n) (u v : Fin n) :
    ((min ((v - u).val) (n - (v - u).val) : ℕ) : ℕ∞) ≤ (SimpleGraph.cycleGraph n).edist u v
cycle_graph_exists_vertex_cyclic_dist_halfIn LeanGraph Theory & Graph Algorithms

For n >= 3 and any vertex u of C_n there is a vertex v with cyclic distance (v - u).val = n/2, i.e. the antipodal vertex.

theorem cycle_graph_exists_vertex_cyclic_dist_half (n : ℕ) (hn : 3 ≤ n) (u : Fin n) :
    ∃ v : Fin n, (v - u).val = n / 2
cycle_graph_fin_sub_int_modEqIn LeanGraph Theory & Graph Algorithms

For a, b : Fin n, the natural number (b - a).val is congruent mod n to the integer b - a.

theorem cycle_graph_fin_sub_int_modEq (n : ℕ) (a b : Fin n) :
    (((b - a).val : ℤ) ≡ (b : ℤ) - (a : ℤ) [ZMOD (n : ℤ)])
cycle_graph_indepNum_eq_radiusIn LeanGraph Theory & Graph Algorithms

For n >= 3 the cycle graph C_n has independence number floor(n/2) and radius floor(n/2).

theorem cycle_graph_indepNum_eq_radius (n : ℕ) (hn : 3 ≤ n) :
    (SimpleGraph.cycleGraph n).indepNum = n / 2 ∧
      (SimpleGraph.cycleGraph n).radius = ((n / 2 : ℕ) : ℕ∞)
cycle_graph_indepNum_geIn LeanGraph Theory & Graph Algorithms

The even vertices {0,2,4,...} form an independent set of size n/2 in C_n.

theorem cycle_graph_indepNum_ge (n : ℕ) (hn : 3 ≤ n) :
    n / 2 ≤ (SimpleGraph.cycleGraph n).indepNum
cycle_graph_indepNum_leIn LeanGraph Theory & Graph Algorithms

Any independent set S of the cycle C_n satisfies 2|S| <= n, hence |S| <= n/2.

theorem cycle_graph_indepNum_le (n : ℕ) (hn : 3 ≤ n) :
    (SimpleGraph.cycleGraph n).indepNum ≤ n / 2
cycle_graph_odd_diamIn LeanGraph Theory & Graph Algorithms

For any natural number m ≥ 1, the diameter of the odd cycle SimpleGraph.cycleGraph (2 * m + 1) equals m.

theorem cycle_graph_odd_diam (m : ℕ) (hm : 1 ≤ m) : (SimpleGraph.cycleGraph (2 * m + 1)).diam = m
cycle_graph_radius_geIn LeanGraph Theory & Graph Algorithms

Every vertex of C_n has a vertex at cyclic distance n/2, so the eccentricity of every vertex and hence the radius is at least n/2.

theorem cycle_graph_radius_ge (n : ℕ) (hn : 3 ≤ n) :
    ((n / 2 : ℕ) : ℕ∞) ≤ (SimpleGraph.cycleGraph n).radius
cycle_graph_radius_leIn LeanGraph Theory & Graph Algorithms

Every vertex of C_n can be reached from 0 in at most n/2 steps, going the shorter way round, so the radius is at most n/2.

theorem cycle_graph_radius_le (n : ℕ) (hn : 3 ≤ n) :
    (SimpleGraph.cycleGraph n).radius ≤ ((n / 2 : ℕ) : ℕ∞)
cycle_graph_walk_displacementIn LeanGraph Theory & Graph Algorithms

For n >= 2 and any walk W from u to v in C_n there is an integer x congruent to v - u mod n with |x| <= W.length.

theorem cycle_graph_walk_displacement (n : ℕ) (hn : 2 ≤ n) :
    ∀ {u v : Fin n} (W : (SimpleGraph.cycleGraph n).Walk u v),
    ∃ x : ℤ, x ≡ (v : ℤ) - (u : ℤ) [ZMOD (n : ℤ)] ∧ x.natAbs ≤ W.length
cycle_product_even_even_not_wcpIn LeanGraph Theory & Graph Algorithms

If m and n are even with m, n ≥ 6, then C_m □ C_n is not well-covered (so it does not have the well-covered powers property): it has two maximal independent sets of different sizes.

theorem cycle_product_even_even_not_wcp (m n : ℕ) (hm : Even m) (hn : Even n) (hm6 : 6 ≤ m) (hn6 : 6 ≤ n) :
    ¬ simple_graph_has_well_covered_powers (SimpleGraph.cycleGraph m □ SimpleGraph.cycleGraph n)
cycle_product_mixed_parity_not_wcpIn LeanGraph Theory & Graph Algorithms

If exactly one of m, n is even (the odd one being ≥ 6 and ≠ 7, hence ≥ 9), then C_m □ C_n is not well-covered, so it does not have the well-covered powers property.

theorem cycle_product_mixed_parity_not_wcp (m n : ℕ) (hm6 : 6 ≤ m) (hn6 : 6 ≤ n) (hm7 : m ≠ 7) (hn7 : n ≠ 7)
    (hpar : (Even m ∧ Odd n) ∨ (Odd m ∧ Even n)) :
    ¬ simple_graph_has_well_covered_powers (SimpleGraph.cycleGraph m □ SimpleGraph.cycleGraph n)
cycle_product_odd_odd_not_wcpIn LeanGraph Theory & Graph Algorithms

If m and n are both odd with m, n ≥ 6 and m, n ≠ 7 (hence m, n ≥ 9), then C_m □ C_n is not well-covered, so it does not have the well-covered powers property.

theorem cycle_product_odd_odd_not_wcp (m n : ℕ) (hm : Odd m) (hn : Odd n) (hm6 : 6 ≤ m) (hn6 : 6 ≤ n) (hm7 : m ≠ 7) (hn7 : n ≠ 7) :
    ¬ simple_graph_has_well_covered_powers (SimpleGraph.cycleGraph m □ SimpleGraph.cycleGraph n)
cycle_with_two_chords_adj_embed_impIn LeanGraph Theory & Graph Algorithms

Let m ≥ 6 and 3 ≤ a ≤ m - 3. If two vertices of the embedded copy of the (m-1)-cycle inside the m-cycle with chords {0, a-1} and {a, m-1} are adjacent, then their preimages are adjacent in the (m-1)-cycle, or they are the pair {0, a-1} realizing the first chord (in either order).

theorem cycle_with_two_chords_adj_embed_imp {m a : ℕ} (hm : 6 ≤ m) (ha : 3 ≤ a) (ham : a ≤ m - 3)
    {p q : Fin (m - 1)}
    (h : (cycle_with_two_chords m a).Adj
      (⟨p.val, Nat.lt_of_lt_of_le p.isLt (Nat.sub_le m 1)⟩ : Fin m)
      (⟨q.val, Nat.lt_of_lt_of_le q.isLt (Nat.sub_le m 1)⟩ : Fin m)) :
    (SimpleGraph.cycleGraph (m - 1)).Adj p q ∨ (p.val = 0 ∧ q.val = a - 1) ∨
      (q.val = 0 ∧ p.val = a - 1)
cycle_with_two_chords_adj_last_embed_impIn LeanGraph Theory & Graph Algorithms

Let m ≥ 6 and 3 ≤ a ≤ m - 3. If the last vertex m - 1 of the m-cycle with chords {0, a-1} and {a, m-1} is adjacent to a vertex of the embedded copy of the (m-1)-cycle with value p.val, then p.val is 0, or m - 2, or a.

theorem cycle_with_two_chords_adj_last_embed_imp {m a : ℕ} (hm : 6 ≤ m) (ha : 3 ≤ a)
    (ham : a ≤ m - 3) {p : Fin (m - 1)}
    (h : (cycle_with_two_chords m a).Adj (⟨m - 1, by omega⟩ : Fin m)
      (⟨p.val, Nat.lt_of_lt_of_le p.isLt (Nat.sub_le m 1)⟩ : Fin m)) :
    p.val = 0 ∨ p.val = m - 2 ∨ p.val = a
cyclic_four_block_coverIn LeanGraph Theory & Graph Algorithms

Step of cyclic_four_block_graph_exists_rich_neighbor_five_coloring: cover.

theorem cyclic_four_block_cover (m : ℕ) (e f : (Fin (2*m+5) × Fin 6))
    (hne : cyclic_four_block_edge m e ≠ cyclic_four_block_edge m f) (ht : cyclic_four_block_touch m e f) :
    f=cyclic_four_block_N m e (⟨0,by decide⟩ : Fin 4) ∨ f=cyclic_four_block_N m e (⟨1,by decide⟩ : Fin 4) ∨ f=cyclic_four_block_N m e (⟨2,by decide⟩ : Fin 4) ∨ f=cyclic_four_block_N m e (⟨3,by decide⟩ : Fin 4)
cyclic_four_block_cover_role0In LeanGraph Theory & Graph Algorithms

Step of cyclic_four_block_graph_exists_rich_neighbor_five_coloring: cover role0.

theorem cyclic_four_block_cover_role0 (m : ℕ) (i : Fin (2*m+5)) (f : Fin (2*m+5) × Fin 6)
    (hne : cyclic_four_block_edge m (i, (⟨0, by decide⟩ : Fin 6)) ≠ cyclic_four_block_edge m f) (ht : cyclic_four_block_touch m (i, (⟨0, by decide⟩ : Fin 6)) f) :
    f=cyclic_four_block_N m (i, (⟨0, by decide⟩ : Fin 6)) (⟨0,by decide⟩ : Fin 4) ∨ f=cyclic_four_block_N m (i, (⟨0, by decide⟩ : Fin 6)) (⟨1,by decide⟩ : Fin 4) ∨ f=cyclic_four_block_N m (i, (⟨0, by decide⟩ : Fin 6)) (⟨2,by decide⟩ : Fin 4) ∨ f=cyclic_four_block_N m (i, (⟨0, by decide⟩ : Fin 6)) (⟨3,by decide⟩ : Fin 4)
cyclic_four_block_cover_role1In LeanGraph Theory & Graph Algorithms

Step of cyclic_four_block_graph_exists_rich_neighbor_five_coloring: cover role1.

theorem cyclic_four_block_cover_role1 (m : ℕ) (i : Fin (2*m+5)) (f : Fin (2*m+5) × Fin 6)
    (hne : cyclic_four_block_edge m (i, (⟨1, by decide⟩ : Fin 6)) ≠ cyclic_four_block_edge m f) (ht : cyclic_four_block_touch m (i, (⟨1, by decide⟩ : Fin 6)) f) :
    f=cyclic_four_block_N m (i, (⟨1, by decide⟩ : Fin 6)) (⟨0,by decide⟩ : Fin 4) ∨ f=cyclic_four_block_N m (i, (⟨1, by decide⟩ : Fin 6)) (⟨1,by decide⟩ : Fin 4) ∨ f=cyclic_four_block_N m (i, (⟨1, by decide⟩ : Fin 6)) (⟨2,by decide⟩ : Fin 4) ∨ f=cyclic_four_block_N m (i, (⟨1, by decide⟩ : Fin 6)) (⟨3,by decide⟩ : Fin 4)
cyclic_four_block_cover_role2In LeanGraph Theory & Graph Algorithms

Step of cyclic_four_block_graph_exists_rich_neighbor_five_coloring: cover role2.

theorem cyclic_four_block_cover_role2 (m : ℕ) (i : Fin (2*m+5)) (f : Fin (2*m+5) × Fin 6)
    (hne : cyclic_four_block_edge m (i, (⟨2, by decide⟩ : Fin 6)) ≠ cyclic_four_block_edge m f) (ht : cyclic_four_block_touch m (i, (⟨2, by decide⟩ : Fin 6)) f) :
    f=cyclic_four_block_N m (i, (⟨2, by decide⟩ : Fin 6)) (⟨0,by decide⟩ : Fin 4) ∨ f=cyclic_four_block_N m (i, (⟨2, by decide⟩ : Fin 6)) (⟨1,by decide⟩ : Fin 4) ∨ f=cyclic_four_block_N m (i, (⟨2, by decide⟩ : Fin 6)) (⟨2,by decide⟩ : Fin 4) ∨ f=cyclic_four_block_N m (i, (⟨2, by decide⟩ : Fin 6)) (⟨3,by decide⟩ : Fin 4)
cyclic_four_block_cover_role3In LeanGraph Theory & Graph Algorithms

Step of cyclic_four_block_graph_exists_rich_neighbor_five_coloring: cover role3.

theorem cyclic_four_block_cover_role3 (m : ℕ) (i : Fin (2*m+5)) (f : Fin (2*m+5) × Fin 6)
    (hne : cyclic_four_block_edge m (i, (⟨3, by decide⟩ : Fin 6)) ≠ cyclic_four_block_edge m f) (ht : cyclic_four_block_touch m (i, (⟨3, by decide⟩ : Fin 6)) f) :
    f=cyclic_four_block_N m (i, (⟨3, by decide⟩ : Fin 6)) (⟨0,by decide⟩ : Fin 4) ∨ f=cyclic_four_block_N m (i, (⟨3, by decide⟩ : Fin 6)) (⟨1,by decide⟩ : Fin 4) ∨ f=cyclic_four_block_N m (i, (⟨3, by decide⟩ : Fin 6)) (⟨2,by decide⟩ : Fin 4) ∨ f=cyclic_four_block_N m (i, (⟨3, by decide⟩ : Fin 6)) (⟨3,by decide⟩ : Fin 4)
cyclic_four_block_cover_role4In LeanGraph Theory & Graph Algorithms

Step of cyclic_four_block_graph_exists_rich_neighbor_five_coloring: cover role4.

theorem cyclic_four_block_cover_role4 (m : ℕ) (i : Fin (2*m+5)) (f : Fin (2*m+5) × Fin 6)
    (hne : cyclic_four_block_edge m (i, (⟨4, by decide⟩ : Fin 6)) ≠ cyclic_four_block_edge m f) (ht : cyclic_four_block_touch m (i, (⟨4, by decide⟩ : Fin 6)) f) :
    f=cyclic_four_block_N m (i, (⟨4, by decide⟩ : Fin 6)) (⟨0,by decide⟩ : Fin 4) ∨ f=cyclic_four_block_N m (i, (⟨4, by decide⟩ : Fin 6)) (⟨1,by decide⟩ : Fin 4) ∨ f=cyclic_four_block_N m (i, (⟨4, by decide⟩ : Fin 6)) (⟨2,by decide⟩ : Fin 4) ∨ f=cyclic_four_block_N m (i, (⟨4, by decide⟩ : Fin 6)) (⟨3,by decide⟩ : Fin 4)
cyclic_four_block_cover_role5In LeanGraph Theory & Graph Algorithms

Step of cyclic_four_block_graph_exists_rich_neighbor_five_coloring: cover role5.

theorem cyclic_four_block_cover_role5 (m : ℕ) (i : Fin (2*m+5)) (f : Fin (2*m+5) × Fin 6)
    (hne : cyclic_four_block_edge m (i, (⟨5, by decide⟩ : Fin 6)) ≠ cyclic_four_block_edge m f) (ht : cyclic_four_block_touch m (i, (⟨5, by decide⟩ : Fin 6)) f) :
    f=cyclic_four_block_N m (i, (⟨5, by decide⟩ : Fin 6)) (⟨0,by decide⟩ : Fin 4) ∨ f=cyclic_four_block_N m (i, (⟨5, by decide⟩ : Fin 6)) (⟨1,by decide⟩ : Fin 4) ∨ f=cyclic_four_block_N m (i, (⟨5, by decide⟩ : Fin 6)) (⟨2,by decide⟩ : Fin 4) ∨ f=cyclic_four_block_N m (i, (⟨5, by decide⟩ : Fin 6)) (⟨3,by decide⟩ : Fin 4)
cyclic_four_block_good_injectiveIn LeanGraph Theory & Graph Algorithms

Step of cyclic_four_block_graph_exists_rich_neighbor_five_coloring: good injective.

theorem cyclic_four_block_good_injective (m : ℕ) (e : (Fin (2*m+5) × Fin 6)) (he : cyclic_four_block_good m e) :
    Function.Injective (fun k => cyclic_four_block_col m (cyclic_four_block_N m e k))
cyclic_four_block_good_injective_role0In LeanGraph Theory & Graph Algorithms

Step of cyclic_four_block_graph_exists_rich_neighbor_five_coloring: good injective role0.

theorem cyclic_four_block_good_injective_role0 (m : ℕ) (i : Fin (2*m+5)) (he : cyclic_four_block_good m (i, (⟨0, by decide⟩ : Fin 6))) :
    Function.Injective (fun k => cyclic_four_block_col m (cyclic_four_block_N m (i, (⟨0, by decide⟩ : Fin 6)) k))
cyclic_four_block_good_injective_role1In LeanGraph Theory & Graph Algorithms

Step of cyclic_four_block_graph_exists_rich_neighbor_five_coloring: good injective role1.

theorem cyclic_four_block_good_injective_role1 (m : ℕ) (i : Fin (2*m+5)) (he : cyclic_four_block_good m (i, (⟨1, by decide⟩ : Fin 6))) :
    Function.Injective (fun k => cyclic_four_block_col m (cyclic_four_block_N m (i, (⟨1, by decide⟩ : Fin 6)) k))
cyclic_four_block_good_injective_role2In LeanGraph Theory & Graph Algorithms

Step of cyclic_four_block_graph_exists_rich_neighbor_five_coloring: good injective role2.

theorem cyclic_four_block_good_injective_role2 (m : ℕ) (i : Fin (2*m+5)) (he : cyclic_four_block_good m (i, (⟨2, by decide⟩ : Fin 6))) :
    Function.Injective (fun k => cyclic_four_block_col m (cyclic_four_block_N m (i, (⟨2, by decide⟩ : Fin 6)) k))
cyclic_four_block_good_injective_role3In LeanGraph Theory & Graph Algorithms

Step of cyclic_four_block_graph_exists_rich_neighbor_five_coloring: good injective role3.

theorem cyclic_four_block_good_injective_role3 (m : ℕ) (i : Fin (2*m+5)) (he : cyclic_four_block_good m (i, (⟨3, by decide⟩ : Fin 6))) :
    Function.Injective (fun k => cyclic_four_block_col m (cyclic_four_block_N m (i, (⟨3, by decide⟩ : Fin 6)) k))
cyclic_ramsey_number_le_of_propertyIn LeanGraph Theory & Graph Algorithms

The cyclic Ramsey number R_cyc(H₁, H₂) is at most N whenever N is positive and satisfies the cyclic Ramsey property for H₁ and H₂.

theorem cyclic_ramsey_number_le_of_property {m n N : ℕ} (H₁ : SimpleGraph (Fin m)) (H₂ : SimpleGraph (Fin n)) (hN : 0 < N) (hprop : cyclic_ramsey_property H₁ H₂ N) : cyclic_ramsey_number H₁ H₂ ≤ N
deficit_change_under_connected_vertex_deletionIn LeanGraph Theory & Graph Algorithms

Let G be a finite connected simple graph on a type V with decidable equality, and let u be a vertex such that the vertex-deleted subgraph G.induce (Set.univ \ {u}) is connected. Then 2 * tau G u ≤ delta G - delta (G.delete u).

theorem deficit_change_under_connected_vertex_deletion {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (hG : G.Connected) (u : V) (hu : (G.induce (Set.univ \ {u})).Connected) : 2 * tau G u ≤ delta G - delta (G.delete u)
degree_list_kempe_diameter_fin_eighteen_k5_sub_edgeIn LeanGraph Theory & Graph Algorithms

For H = K5 minus the edge {3,4}, for every tight list assignment L : Fin 5 → Finset (Fin 18) (|L v| = 4 for v = 0,1,2 and |L v| = 3 for v = 3,4) and every two proper L-colourings α, β, there is a chain of at most 6 L-valid Kempe changes from α to β.

theorem degree_list_kempe_diameter_fin_eighteen_k5_sub_edge : degree_list_kempe_diameter_fin_eighteen five_k5_sub_edge
degree_list_kempe_diameter_fin_eighteen_wheel_fourIn LeanGraph Theory & Graph Algorithms

For H = the 4-wheel (hub 0 of degree 4, rim 1-2-3-4 of degree 3), for every tight list assignment L : Fin 5 → Finset (Fin 18) and every two proper L-colourings α, β, there is a chain of at most 6 L-valid Kempe changes from α to β.

theorem degree_list_kempe_diameter_fin_eighteen_wheel_four : degree_list_kempe_diameter_fin_eighteen five_wheel_four
degree_list_kempe_diameter_fiveIn LeanGraph Theory & Graph Algorithms

Base case n = 5: on any 3-vertex-connected simple graph on 5 vertices other than K₅, any two proper tight degree-list colorings α and β can be transformed into one another by at most 6 L-valid Kempe changes.

theorem degree_list_kempe_diameter_five :
    ∀ (G : SimpleGraph (Fin 5)) [DecidableRel G.Adj],
      simple_graph_three_vertex_connected G →
      G ≠ ⊤ →
      IsEmpty (G ≃g simple_graph_prism 3) →
      ∀ (C : Type) [Fintype C] [DecidableEq C] (L : Fin 5 → Finset C),
        (∀ v, (L v).card = G.degree v) →
        ∀ (α β : G.Coloring C),
          (∀ v, α v ∈ L v) →
          (∀ v, β v ∈ L v) →
          ∃ (k : ℕ), k ≤ 6 ∧
            ∃ (seq : List (G.Coloring C)),
              seq ≠ [] ∧ seq.head? = some α ∧ seq.getLast? = some β ∧
              seq.length - 1 = k ∧
              seq.IsChain (fun c₁ c₂ => (∀ v, c₁ v ∈ L v) ∧ (∀ v, c₂ v ∈ L v) ∧
                ∃ (a b : C) (U : Set (Fin 5)),
                  a ≠ b ∧ U.Nonempty ∧ (∀ v ∈ U, c₁ v = a ∨ c₁ v = b) ∧
                  (G.induce U).Connected ∧
                  (∀ u ∈ U, ∀ v : Fin 5, G.Adj u v → (c₁ v = a ∨ c₁ v = b) → v ∈ U) ∧
                  (∀ v ∈ U, c₂ v = (if c₁ v = a then b else a)) ∧
                  (∀ v ∉ U, c₂ v = c₁ v))
degree_list_kempe_diameter_five_reduce_to_modelsIn LeanGraph Theory & Graph Algorithms

If the Fin-18 Kempe-diameter bound holds for K5-e and for the 4-wheel, then degree_list_kempe_diameter_at_most_six G holds for every 3-vertex-connected G on 5 vertices with G ≠ K5.

theorem degree_list_kempe_diameter_five_reduce_to_models (h₁ : degree_list_kempe_diameter_fin_eighteen five_k5_sub_edge) (h₂ : degree_list_kempe_diameter_fin_eighteen five_wheel_four) (G : SimpleGraph (Fin 5)) [DecidableRel G.Adj] (h3 : simple_graph_three_vertex_connected G) (hne : G ≠ ⊤) (hprism : IsEmpty (G ≃g simple_graph_prism 3)) : degree_list_kempe_diameter_at_most_six G
degree_list_kempe_diameter_of_fin_eighteenIn LeanGraph Theory & Graph Algorithms

If the Kempe-diameter-6 bound holds for the fixed palette Fin 18 for G, and the degree sum of G is at most 18, then it holds for every finite colour type.

theorem degree_list_kempe_diameter_of_fin_eighteen (G : SimpleGraph (Fin 5)) [DecidableRel G.Adj] (hsum : ∑ v, G.degree v ≤ 18) (h : degree_list_kempe_diameter_fin_eighteen G) : degree_list_kempe_diameter_at_most_six G
det_extremal_cubic_bipartite_conn_two_covers_three_connectedIn LeanGraph Theory & Graph Algorithms

Every finite connected cubic bipartite det-extremal graph G with vertex connectivity 2 admits a locally surjective graph homomorphism onto a finite 3-connected cubic bipartite det-extremal graph H.

theorem det_extremal_cubic_bipartite_conn_two_covers_three_connected :
    ∀ {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj],
      G.Connected → G.IsBipartite → G.IsRegularOfDegree 3 →
      ghz_graph_vertex_connectivity G = 2 → is_det_extremal G →
      ∃ (W : Type) (_ : Fintype W) (_ : DecidableEq W) (H : SimpleGraph W) (_ : DecidableRel H.Adj),
        H.Connected ∧ H.IsBipartite ∧ H.IsRegularOfDegree 3 ∧
        3 ≤ ghz_graph_vertex_connectivity H ∧ is_det_extremal H ∧
        ∃ (f : V → W), (∀ {u v}, G.Adj u v → H.Adj (f u) (f v)) ∧
          (∀ u, H.neighborSet (f u) ⊆ f '' G.neighborSet u)
diamond_free_clique_neighbor_card_le_oneIn LeanGraph Theory & Graph Algorithms

In a diamond-free graph, every vertex outside a maximum clique Q of size at least 3 has at most one neighbor in Q.

theorem diamond_free_clique_neighbor_card_le_one {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (h_dfree : is_diamond_free G)
    {Q : Finset V} (hQ : G.IsNClique G.cliqueNum Q) (h3 : 3 ≤ G.cliqueNum)
    {x : V} (hx : x ∉ Q) : (G.neighborFinset x ∩ Q).card ≤ 1
diamond_free_critical_clique_structureIn LeanGraph Theory & Graph Algorithms

Let G be a noncomplete k-vertex-critical diamond-free graph with chromatic number k, maximum degree k, and clique number r at least 4. Then G contains an induced K_s^+ for every 3 ≤ s ≤ r and an induced L_t for every 3 ≤ t ≤ r - 1. Furthermore, if G is L_r-free, then every maximum clique dominates the vertex set of G.

theorem diamond_free_critical_clique_structure
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    {k r : ℕ} (h_noncomplete : G ≠ ⊤)
    (h_crit : is_vertex_critical G k)
    (h_dfree : is_diamond_free G)
    (h_deg : G.maxDegree = k)
    (h_omega : G.cliqueNum = r)
    (h_r : 4 ≤ r) :
    (∀ s, 3 ≤ s → s ≤ r → SimpleGraph.IsIndContained (k_plus_graph s) G) ∧
    (∀ t, 3 ≤ t → t ≤ r - 1 → SimpleGraph.IsIndContained (l_path_graph t) G) ∧
    (¬ SimpleGraph.IsIndContained (l_path_graph r) G →
      ∀ Q : Finset V, G.IsNClique r Q → ∀ v : V, v ∉ Q → ∃ u ∈ Q, G.Adj v u)
diamond_free_critical_dominating_cliqueIn LeanGraph Theory & Graph Algorithms

In a noncomplete k-vertex-critical diamond-free graph with clique number r >= 4, if G is L_r-free, every maximum clique dominates V(G).

theorem diamond_free_critical_dominating_clique
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    {k r : ℕ} (h_noncomplete : G ≠ ⊤)
    (h_crit : is_vertex_critical G k)
    (h_dfree : is_diamond_free G)
    (h_omega : G.cliqueNum = r)
    (h_r : 4 ≤ r)
    (h_not_l : ¬ SimpleGraph.IsIndContained (l_path_graph r) G) :
    ∀ Q : Finset V, G.IsNClique r Q → ∀ v : V, v ∉ Q → ∃ u ∈ Q, G.Adj v u
diamond_free_critical_k_plus_containedIn LeanGraph Theory & Graph Algorithms

In a noncomplete k-vertex-critical diamond-free graph with clique number r >= 4, G contains an induced K_s^+ for every 3 <= s <= r.

theorem diamond_free_critical_k_plus_contained
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    {k r : ℕ} (h_noncomplete : G ≠ ⊤)
    (h_crit : is_vertex_critical G k)
    (h_dfree : is_diamond_free G)
    (h_omega : G.cliqueNum = r)
    (h_r : 4 ≤ r) :
    ∀ s, 3 ≤ s → s ≤ r → SimpleGraph.IsIndContained (k_plus_graph s) G
diamond_free_critical_l_path_containedIn LeanGraph Theory & Graph Algorithms

In a noncomplete k-vertex-critical diamond-free graph with maximum degree k and clique number r >= 4, G contains an induced L_t for every 3 <= t <= r - 1.

theorem diamond_free_critical_l_path_contained
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    {k r : ℕ} (h_noncomplete : G ≠ ⊤)
    (h_crit : is_vertex_critical G k)
    (h_dfree : is_diamond_free G)
    (h_deg : G.maxDegree = k)
    (h_omega : G.cliqueNum = r)
    (h_r : 4 ≤ r) :
    ∀ t, 3 ≤ t → t ≤ r - 1 → SimpleGraph.IsIndContained (l_path_graph t) G
diamond_free_critical_pendant_pairIn LeanGraph Theory & Graph Algorithms

Let G be a noncomplete k-vertex-critical diamond-free graph with clique number r ≥ 4 and Q a maximum clique of size r. Then some q in Q has a neighbour x outside Q, and x has no other neighbour in Q.

theorem diamond_free_critical_pendant_pair {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {k r : ℕ}
    (h_noncomplete : G ≠ ⊤) (h_crit : is_vertex_critical G k) (h_dfree : is_diamond_free G)
    (h_omega : G.cliqueNum = r) (h_r : 4 ≤ r) {Q : Finset V} (hQ : G.IsNClique r Q) :
    ∃ q ∈ Q, ∃ x : V, x ∉ Q ∧ G.Adj x q ∧ ∀ q' ∈ Q, G.Adj x q' → q' = q
diamond_free_critical_second_vertexIn LeanGraph Theory & Graph Algorithms

Let G be diamond-free, Q a maximum clique of size at least 3, q in Q and x outside Q adjacent to q. If deg(x) is at least the clique number of G, then x has a neighbour y outside Q that is not adjacent to q.

theorem diamond_free_critical_second_vertex {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (h_dfree : is_diamond_free G)
    {Q : Finset V} (hQ : G.IsNClique G.cliqueNum Q) (h3 : 3 ≤ G.cliqueNum)
    {q x : V} (hq : q ∈ Q) (hx : x ∉ Q) (hxq : G.Adj x q) (hdeg : G.cliqueNum ≤ G.degree x) :
    ∃ y : V, G.Adj x y ∧ y ∉ Q ∧ ¬ G.Adj y q
diamond_free_neighborSet_transitiveIn LeanGraph Theory & Graph Algorithms

In a diamond-free graph, if u is adjacent to x, y, and z, and x is adjacent to y, and y is adjacent to z with x ≠ z, then x is adjacent to z.

theorem diamond_free_neighborSet_transitive {V : Type*} [DecidableEq V]
    (G : SimpleGraph V) (h_dfree : is_diamond_free G)
    {u x y z : V} (hx : G.Adj u x) (hy : G.Adj u y) (hz : G.Adj u z)
    (hxy : G.Adj x y) (hyz : G.Adj y z) (hxz : x ≠ z) : G.Adj x z
digraph_128_common_predecessor_indegree_imbalanceIn LeanGraph Theory & Graph Algorithms

In a 7-outregular digraph on 128 vertices whose common-predecessor graph is connected and has no independent set of size four, some vertex has indegree at least eight and another has indegree at most six.

theorem digraph_128_common_predecessor_indegree_imbalance
    (D : Digraph (Fin 128)) [DecidableRel D.Adj]
    (hreg : ∀ v, (Finset.univ.filter fun w => D.Adj v w).card = 7)
    (hconn : (digraph_common_predecessor_graph D).Connected)
    (hindep : (digraph_common_predecessor_graph D).IndepSetFree 4) :
    ∃ u v, 8 ≤ (Finset.univ.filter fun w => D.Adj w u).card ∧
      (Finset.univ.filter fun w => D.Adj w v).card ≤ 6
digraph_18_shared_target_forces_two_cyclesIn LeanGraph Theory & Graph Algorithms

The normalized oriented eighteen-vertex shared-target configuration with three designated parents contains two disjoint cycles, assuming the displayed two-cycle criterion.

theorem digraph_18_shared_target_forces_two_cycles
    (D : Digraph (Fin 18)) [DecidableRel D.Adj]
    (hori : ∀ u v, D.Adj u v → ¬ D.Adj v u)
    (hdeg : ∀ v : Fin 18, 5 ≤ v.val →
      (Finset.univ.filter fun w => D.Adj v w).card = 7)
    (hlow : ∀ v : Fin 18, v.val < 5 → D.Adj v 8)
    (hout : ∀ v : Fin 18, 9 ≤ v.val → v.val < 16 → D.Adj 8 v)
    (hparents : ∀ v : Fin 18, 5 ≤ v.val → v.val < 8 → D.Adj v 8)
    (htwo : ∀ T : Finset (Fin 18), T.Nonempty →
      (∀ v ∈ T, 3 ≤ (T.filter fun w => D.Adj v w).card) →
      ∃ c : Fin 2 → Finset (Fin 18), (∀ i, c i ⊆ T ∧ digraph_directed_cycle_on D (c i)) ∧
        Pairwise (fun i j => Disjoint (c i) (c j))) :
    ∃ c : Fin 2 → Finset (Fin 18),
      (∀ i, digraph_directed_cycle_on D (c i)) ∧
        Pairwise (fun i j => Disjoint (c i) (c j))
digraph_18_target_core_intersectionIn LeanGraph Theory & Graph Algorithms

For a strongly connected sink T of the core containing S, every vertex of which has at least two out-neighbours on S, the vertices K lying on every cycle of T satisfy: S ⊆ K, every vertex of T outside K is missed by a cycle of T, |S| ≤ |T \ K|, and |K ∩ P| + |S| ≤ 5.

theorem digraph_18_target_core_intersection
    (D : Digraph (Fin 18)) [DecidableRel D.Adj]
    (hori : ∀ u v, D.Adj u v → ¬ D.Adj v u)
    (T : Finset (Fin 18))
    (hTS : digraph_18_target_low_reaching D ⊆ T)
    (hTH : T ⊆ digraph_18_target_core)
    (hHcore : ∀ C : Finset (Fin 18), C ⊆ digraph_18_target_core → digraph_directed_cycle_on D C →
        digraph_18_target_low_reaching D ⊆ C)
    (hdisj : Disjoint T (digraph_18_target_middle \ digraph_18_target_low_reaching D))
    (hstrong : ∀ u ∈ T, ∀ v ∈ T, ∃ p : List (Fin 18), digraph_is_directed_path D p u v ∧ ∀ z ∈ p, z ∈ T)
    (hdeg2 : ∀ s ∈ digraph_18_target_low_reaching D, 2 ≤ (T.filter fun w => D.Adj s w).card) :
    ∃ K : Finset (Fin 18), K ⊆ T ∧ digraph_18_target_low_reaching D ⊆ K ∧
      (∀ C : Finset (Fin 18), C ⊆ T → digraph_directed_cycle_on D C → K ⊆ C) ∧
      (∀ x ∈ T, x ∉ K → ∃ C : Finset (Fin 18), C ⊆ T ∧ digraph_directed_cycle_on D C ∧ x ∉ C) ∧
      (digraph_18_target_low_reaching D).card ≤ (T \ K).card ∧
      (K ∩ digraph_18_target_parents).card + (digraph_18_target_low_reaching D).card ≤ 5
digraph_18_target_core_setupIn LeanGraph Theory & Graph Algorithms

In the normalized eighteen-vertex shared-target configuration with no two disjoint directed cycles and S nonempty, there is a nonempty sink strong component T of the core P ∪ R ∪ Z such that S ⊆ T, T is disjoint from R \ S, |S| ≤ 5, every cycle inside P ∪ R ∪ Z contains S, and every s ∈ S has at least two out-neighbours in T.

theorem digraph_18_target_core_setup
    (D : Digraph (Fin 18)) [DecidableRel D.Adj]
    (hori : ∀ u v, D.Adj u v → ¬ D.Adj v u)
    (hdeg : ∀ v : Fin 18, 5 ≤ v.val → (Finset.univ.filter fun w => D.Adj v w).card = 7)
    (hlow : ∀ v : Fin 18, v.val < 5 → D.Adj v 8)
    (hout : ∀ v : Fin 18, 9 ≤ v.val → v.val < 16 → D.Adj 8 v)
    (hSne : (digraph_18_target_low_reaching D).Nonempty)
    (hno : ¬ ∃ c : Fin 2 → Finset (Fin 18), (∀ i, digraph_directed_cycle_on D (c i)) ∧
        Pairwise (fun i j => Disjoint (c i) (c j))) :
    ∃ T : Finset (Fin 18), T.Nonempty ∧
      digraph_18_target_low_reaching D ⊆ T ∧
      T ⊆ digraph_18_target_core ∧
      (∀ x ∈ T, ∀ y : Fin 18, y ∈ digraph_18_target_core → D.Adj x y → y ∈ T) ∧
      (∀ u ∈ T, ∀ v ∈ T, ∃ p : List (Fin 18), digraph_is_directed_path D p u v ∧ ∀ z ∈ p, z ∈ T) ∧
      (∀ C : Finset (Fin 18), C ⊆ digraph_18_target_core → digraph_directed_cycle_on D C →
        digraph_18_target_low_reaching D ⊆ C) ∧
      Disjoint T (digraph_18_target_middle \ digraph_18_target_low_reaching D) ∧
      (digraph_18_target_low_reaching D).card ≤ 5 ∧
      (∀ s ∈ digraph_18_target_low_reaching D, 2 ≤ (T.filter fun w => D.Adj s w).card)
digraph_18_target_final_contradictionIn LeanGraph Theory & Graph Algorithms

Assume no two disjoint cycles, let T be a sink strong component of the core with S ⊆ T and every cycle of the core containing S, let r be outside T, and suppose every spare vertex is missed by a cycle of T and T = S ∪ P ∪ Z. If r lies in R \ S and sends an arc to every spare vertex, we get a contradiction.

theorem digraph_18_target_final_contradiction
    (D : Digraph (Fin 18)) [DecidableRel D.Adj]
    (hori : ∀ u v, D.Adj u v → ¬ D.Adj v u)
    (hdeg : ∀ v : Fin 18, 5 ≤ v.val → (Finset.univ.filter fun w => D.Adj v w).card = 7)
    (hlow : ∀ v : Fin 18, v.val < 5 → D.Adj v 8)
    (hout : ∀ v : Fin 18, 9 ≤ v.val → v.val < 16 → D.Adj 8 v)
    (hno : ¬ ∃ c : Fin 2 → Finset (Fin 18), (∀ i, digraph_directed_cycle_on D (c i)) ∧
        Pairwise (fun i j => Disjoint (c i) (c j)))
    (T : Finset (Fin 18)) (r : Fin 18)
    (hTH : T ⊆ digraph_18_target_core)
    (hTsink : ∀ x ∈ T, ∀ y : Fin 18, y ∈ digraph_18_target_core → D.Adj x y → y ∈ T)
    (hTS : digraph_18_target_low_reaching D ⊆ T)
    (hHcore : ∀ C : Finset (Fin 18), C ⊆ digraph_18_target_core → digraph_directed_cycle_on D C →
        digraph_18_target_low_reaching D ⊆ C)
    (hstrong : ∀ u ∈ T, ∀ v ∈ T, ∃ p : List (Fin 18), digraph_is_directed_path D p u v ∧ ∀ z ∈ p, z ∈ T)
    (hsplit : T = digraph_18_target_low_reaching D ∪ digraph_18_target_parents ∪ digraph_18_target_spare)
    (hrR : r ∈ digraph_18_target_middle)
    (hrS : r ∉ digraph_18_target_low_reaching D)
    (hrT : r ∉ T)
    (hrZ : ∀ z ∈ digraph_18_target_spare, D.Adj r z)
    (homit : ∀ z ∈ digraph_18_target_spare, ∃ C : Finset (Fin 18), C ⊆ T ∧ digraph_directed_cycle_on D C ∧ z ∉ C) :
    False
digraph_18_target_low_reaching_nonemptyIn LeanGraph Theory & Graph Algorithms

In the normalized eighteen-vertex shared-target configuration (no digons, seven out-neighbours for every vertex of value at least 5, the shared target 8 receiving from 5,6,7 and sending to 9,…,15), if there are no two disjoint directed cycles then the set S of middle vertices 9,…,15 that reach one of the low vertices 0,…,4 is nonempty.

theorem digraph_18_target_low_reaching_nonempty
    (D : Digraph (Fin 18)) [DecidableRel D.Adj]
    (hori : ∀ u v, D.Adj u v → ¬ D.Adj v u)
    (hdeg : ∀ v : Fin 18, 5 ≤ v.val → (Finset.univ.filter fun w => D.Adj v w).card = 7)
    (hout : ∀ v : Fin 18, 9 ≤ v.val → v.val < 16 → D.Adj 8 v)
    (hparents : ∀ v : Fin 18, 5 ≤ v.val → v.val < 8 → D.Adj v 8)
    (htwo : ∀ T : Finset (Fin 18), T.Nonempty →
      (∀ v ∈ T, 3 ≤ (T.filter fun w => D.Adj v w).card) →
      ∃ c : Fin 2 → Finset (Fin 18), (∀ i, c i ⊆ T ∧ digraph_directed_cycle_on D (c i)) ∧
        Pairwise (fun i j => Disjoint (c i) (c j)))
    (hno : ¬ ∃ c : Fin 2 → Finset (Fin 18), (∀ i, digraph_directed_cycle_on D (c i)) ∧
        Pairwise (fun i j => Disjoint (c i) (c j))) :
    (digraph_18_target_low_reaching D).Nonempty
digraph_18_target_sink_dominatesIn LeanGraph Theory & Graph Algorithms

Given the sink strong component T with S ⊆ T and T disjoint from R \ S, the middle vertices outside S contain a vertex r, outside T, that sends an arc to every vertex of S and of Z; moreover Z ⊆ T and T = S ∪ P ∪ Z.

theorem digraph_18_target_sink_dominates
    (D : Digraph (Fin 18)) [DecidableRel D.Adj]
    (hori : ∀ u v, D.Adj u v → ¬ D.Adj v u)
    (hdeg : ∀ v : Fin 18, 5 ≤ v.val → (Finset.univ.filter fun w => D.Adj v w).card = 7)
    (hout : ∀ v : Fin 18, 9 ≤ v.val → v.val < 16 → D.Adj 8 v)
    (hparents : ∀ v : Fin 18, 5 ≤ v.val → v.val < 8 → D.Adj v 8)
    (hno : ¬ ∃ c : Fin 2 → Finset (Fin 18), (∀ i, digraph_directed_cycle_on D (c i)) ∧
        Pairwise (fun i j => Disjoint (c i) (c j)))
    (hSne : (digraph_18_target_low_reaching D).Nonempty)
    (T K : Finset (Fin 18))
    (hTS : digraph_18_target_low_reaching D ⊆ T)
    (hTH : T ⊆ digraph_18_target_core)
    (hdisj : Disjoint T (digraph_18_target_middle \ digraph_18_target_low_reaching D))
    (hSK : digraph_18_target_low_reaching D ⊆ K)
    (hKT : K ⊆ T)
    (homit : ∀ x ∈ T, x ∉ K → ∃ C : Finset (Fin 18), C ⊆ T ∧ digraph_directed_cycle_on D C ∧ x ∉ C)
    (hSle : (digraph_18_target_low_reaching D).card ≤ (T \ K).card)
    (hbound : (K ∩ digraph_18_target_parents).card + (digraph_18_target_low_reaching D).card ≤ 5) :
    ∃ r : Fin 18, r ∈ digraph_18_target_middle ∧ r ∉ digraph_18_target_low_reaching D ∧ r ∉ T ∧
      (∀ z ∈ digraph_18_target_spare, D.Adj r z) ∧
      digraph_18_target_spare ⊆ T ∧
      (∀ z ∈ digraph_18_target_spare, ∃ C : Finset (Fin 18), C ⊆ T ∧ digraph_directed_cycle_on D C ∧ z ∉ C) ∧
      T = digraph_18_target_low_reaching D ∪ digraph_18_target_parents ∪ digraph_18_target_spare
digraph_alternating_orientation_arborescence_count_eqIn LeanGraph Theory & Graph Algorithms

Any two alternating orientations of a connected simple graph for the same rotation system σ have the same number of spanning arborescences directed towards any root r.

theorem digraph_alternating_orientation_arborescence_count_eq {n : ℕ} (G : SimpleGraph (Fin n))
    [DecidableRel G.Adj] (hG : G.Connected) (σ : Equiv.Perm G.Dart)
    (hσ : simple_graph_is_rotation_system G σ)
    (D₁ D₂ : Digraph (Fin n)) [DecidableRel D₁.Adj] [DecidableRel D₂.Adj]
    (h₁ : digraph_is_alternating_orientation G σ D₁)
    (h₂ : digraph_is_alternating_orientation G σ D₂) (r : Fin n) :
    digraph_arborescence_count_at D₁ r = digraph_arborescence_count_at D₂ r
digraph_arborescence_count_at_eq_det_laplacian_minorIn LeanGraph Theory & Graph Algorithms

The directed matrix-tree theorem: for any loopless digraph D on Fin n and root r, the principal cofactor (determinant of the submatrix deleting row and column r) of the out-degree Laplacian equals the number of spanning arborescences directed towards r.

theorem digraph_arborescence_count_at_eq_det_laplacian_minor {n : ℕ}
    (D : Digraph (Fin n)) [DecidableRel D.Adj] (r : Fin n) (hloop : ∀ v, ¬ D.Adj v v) :
    (Matrix.of fun (i j : {i : Fin n // i ≠ r}) => digraph_out_laplacian D i.val j.val).det =
      (digraph_arborescence_count_at D r : ℝ)
digraph_arborescence_count_at_inst_irrelIn LeanGraph Theory & Graph Algorithms

The number of spanning arborescences of D directed towards r is independent of which DecidableRel D.Adj instance is used to compute it.

theorem digraph_arborescence_count_at_inst_irrel {n : ℕ} (D : Digraph (Fin n))
    (i j : DecidableRel D.Adj) (r : Fin n) :
    @digraph_arborescence_count_at n D i r = @digraph_arborescence_count_at n D j r
digraph_arborescence_count_at_reverse_of_eulerianIn LeanGraph Theory & Graph Algorithms

For an Eulerian digraph D on Fin n, reversing every arc does not change the number of spanning arborescences directed towards r.

theorem digraph_arborescence_count_at_reverse_of_eulerian {n : ℕ} (G : SimpleGraph (Fin n))
    (D : Digraph (Fin n)) [DecidableRel D.Adj]
    (hD : digraph_is_eulerian_orientation G D) (r : Fin n) :
    @digraph_arborescence_count_at n ⟨fun u v => D.Adj v u⟩
      (fun u v => inferInstanceAs (Decidable (D.Adj v u))) r =
    digraph_arborescence_count_at D r
digraph_both_cuts_ge_ceil_div_six_of_indegree_ltIn LeanGraph Theory & Graph Algorithms

Case 2 of the proof of Theorem 1.4: if G is a loopless digraph with m arcs, minimum outdegree at least 2, and every in-degree below m/3 + 1, then some set A has e(A, V∖A) ≥ ⌈m/6⌉ and e(V∖A, A) ≥ ⌈m/6⌉.

theorem digraph_both_cuts_ge_ceil_div_six_of_indegree_lt {V : Type*} [Fintype V]
    [DecidableEq V] (G : Digraph V) [DecidableRel G.Adj] (hloop : ∀ v, ¬ G.Adj v v)
    (hdeg : ∀ v, 2 ≤ (Finset.univ.filter (G.Adj v)).card)
    (hin : ∀ v, ((Finset.univ.filter fun u => G.Adj u v).card : ℚ) <
      (digraph_edge_count G : ℚ) / 3 + 1) :
    ∃ A : Finset V, ⌈(digraph_edge_count G : ℚ) / 6⌉₊ ≤ digraph_cut_count G A Aᶜ ∧
      ⌈(digraph_edge_count G : ℚ) / 6⌉₊ ≤ digraph_cut_count G Aᶜ A
digraph_ckk_subdivision_of_two_paths_and_back_arcIn LeanGraph Theory & Graph Algorithms

If D has digirth at least 2*(k-1)+1 and contains two internally disjoint directed paths from u to v plus an arc from v to u, then D contains a subdivision of C(k,k).

open Classical in
theorem digraph_ckk_subdivision_of_two_paths_and_back_arc
    {V : Type*} (D : Digraph V) (k : ℕ) (hk : 2 ≤ k)
    (hgirth : digraph_has_digirth_ge D (2 * (k - 1) + 1))
    (u v : V) (huv : u ≠ v)
    (p₁ p₂ : List V)
    (hp₁ : digraph_is_directed_path D p₁ u v)
    (hp₂ : digraph_is_directed_path D p₂ u v)
    (hdisj : ∀ w ∈ p₁, w ∈ p₂ → w = u ∨ w = v)
    (hback : D.Adj v u) :
    digraph_has_ckk_subdivision D k
digraph_ckk_subdivision_three_exceptionalNeeds helpGraph Theory & Graph Algorithms

Let k ≥ 2. Every finite loopless directed graph D with minimum out-degree at least 1, at most 3 vertices of out-degree 1, and digirth at least 3*(k-1)+1 contains a subdivision of the two-block cycle C(k,k).

open Classical in
theorem digraph_ckk_subdivision_three_exceptional
    {V : Type*} [Fintype V] (D : Digraph V) [DecidableRel D.Adj]
    (hloop : ∀ v : V, ¬ D.Adj v v)
    (k : ℕ) (hk : 2 ≤ k)
    (hmin : ∀ v : V, 1 ≤ digraph_out_degree D v)
    (hexc : (digraph_exceptional_verts D).card ≤ 3)
    (hgirth : digraph_has_digirth_ge D (3 * (k - 1) + 1)) :
    digraph_has_ckk_subdivision D k
digraph_ckk_subdivision_three_exceptional_nonemptyIn LeanGraph Theory & Graph Algorithms

Let k ≥ 2. Every finite NONEMPTY loopless directed graph D with minimum out-degree at least 1, at most 3 vertices of out-degree 1, and digirth at least 3*(k-1)+1 contains a subdivision of the two-block cycle C(k,k). This is the faithful form of digraph_ckk_subdivision_three_exceptional (which is refuted by the empty digraph, see not_digraph_ckk_subdivision_three_exceptional): arXiv:2611.00720 works throughout with finite nonempty digraphs, and its Problem 4.1 asks for F_3(k), left open there (Theorem 1.1 covers only r ≥ 4).

open Classical in
theorem digraph_ckk_subdivision_three_exceptional_nonempty
    {V : Type*} [Fintype V] [Nonempty V] (D : Digraph V) [DecidableRel D.Adj]
    (hloop : ∀ v : V, ¬ D.Adj v v)
    (k : ℕ) (hk : 2 ≤ k)
    (hmin : ∀ v : V, 1 ≤ digraph_out_degree D v)
    (hexc : (digraph_exceptional_verts D).card ≤ 3)
    (hgirth : digraph_has_digirth_ge D (3 * (k - 1) + 1)) :
    digraph_has_ckk_subdivision D k
digraph_ckk_subdivision_two_exceptionalIn LeanGraph Theory & Graph Algorithms

Let k ≥ 2. Every finite loopless directed graph D with minimum out-degree at least 1, at most 2 vertices of out-degree 1, and digirth at least 2*(k-1)+1 contains a subdivision of the two-block cycle C(k,k).

open Classical in
theorem digraph_ckk_subdivision_two_exceptional
    {V : Type*} [Fintype V] (D : Digraph V) [DecidableRel D.Adj]
    (hloop : ∀ v : V, ¬ D.Adj v v)
    (k : ℕ) (hk : 2 ≤ k)
    (hmin : ∀ v : V, 1 ≤ digraph_out_degree D v)
    (hexc : (digraph_exceptional_verts D).card ≤ 2)
    (hgirth : digraph_has_digirth_ge D (2 * (k - 1) + 1)) :
    digraph_has_ckk_subdivision D k
digraph_ckk_subdivision_two_exceptional_exactIn LeanGraph Theory & Graph Algorithms

Let k ≥ 2. Every finite loopless directed graph D with minimum out-degree at least 1, exactly 2 vertices of out-degree 1, and digirth at least 2*(k-1)+1 contains a subdivision of the two-block cycle C(k,k).

open Classical in
theorem digraph_ckk_subdivision_two_exceptional_exact
    {V : Type*} [Fintype V] (D : Digraph V) [DecidableRel D.Adj]
    (hloop : ∀ v : V, ¬ D.Adj v v)
    (k : ℕ) (hk : 2 ≤ k)
    (hmin : ∀ v : V, 1 ≤ digraph_out_degree D v)
    (hexc : (digraph_exceptional_verts D).card = 2)
    (hgirth : digraph_has_digirth_ge D (2 * (k - 1) + 1)) :
    digraph_has_ckk_subdivision D k
digraph_common_predecessor_degree_le_six_indegreeIn LeanGraph Theory & Graph Algorithms

If every outdegree is at most seven, the degree of a vertex in the common-predecessor graph is at most six times its indegree in the digraph.

theorem digraph_common_predecessor_degree_le_six_indegree
    (α : Type) [Fintype α] [DecidableEq α]
    (D : Digraph α) [DecidableRel D.Adj]
    (hdeg : ∀ v, (Finset.univ.filter fun w => D.Adj v w).card ≤ 7)
    (v : α) :
    (digraph_common_predecessor_graph D).degree v ≤
      6 * (Finset.univ.filter fun w => D.Adj w v).card
digraph_common_predecessor_large_independence_three_indegree_fiveIn LeanGraph Theory & Graph Algorithms

A 7-outregular finite digraph on at least 126 vertices whose common-predecessor graph has independence number at most three has minimum indegree at least five.

theorem digraph_common_predecessor_large_independence_three_indegree_five
    (α : Type) [Fintype α] [DecidableEq α] (D : Digraph α) [DecidableRel D.Adj]
    (hsize : 126 ≤ Fintype.card α)
    (hreg : ∀ v, (Finset.univ.filter fun w => D.Adj v w).card = 7)
    (hindep : (digraph_common_predecessor_graph D).IndepSetFree 4) :
    ∀ v, 5 ≤ (Finset.univ.filter fun w => D.Adj w v).card
digraph_common_predecessor_large_independence_three_indegree_fourIn LeanGraph Theory & Graph Algorithms

A 7-outregular finite digraph on at least 121 vertices whose common-predecessor graph has independence number at most three has minimum indegree at least four.

theorem digraph_common_predecessor_large_independence_three_indegree_four
    (α : Type) [Fintype α] [DecidableEq α] (D : Digraph α) [DecidableRel D.Adj]
    (hsize : 121 ≤ Fintype.card α)
    (hreg : ∀ v, (Finset.univ.filter fun w => D.Adj v w).card = 7)
    (hindep : (digraph_common_predecessor_graph D).IndepSetFree 4) :
    ∀ v, 4 ≤ (Finset.univ.filter fun w => D.Adj w v).card
digraph_cut_imbalance_eq_sum_net_degreeIn LeanGraph Theory & Graph Algorithms

For any finite digraph G and any vertex subset A, the directed cut count e(A, Aᶜ) minus e(Aᶜ, A) in ℚ equals the sum over v ∈ A of the net degree d⁺(v) - d⁻(v).

theorem digraph_cut_imbalance_eq_sum_net_degree {V : Type*} [Fintype V]
    [DecidableEq V] (G : Digraph V) [DecidableRel G.Adj] (A : Finset V) :
    ((digraph_cut_count G A Aᶜ : ℚ) - (digraph_cut_count G Aᶜ A : ℚ)) =
      ∑ v ∈ A, (((Finset.univ.filter (G.Adj v)).card : ℚ) -
        ((Finset.univ.filter (fun u => G.Adj u v)).card : ℚ))
digraph_cyclic_partition_cross_arc_lower_boundIn LeanGraph Theory & Graph Algorithms

Suppose the vertices of a finite digraph of minimum outdegree at least r are partitioned into s cyclic parts, each with at least three vertices sending arcs outside. If there are no s+1 disjoint directed cycles and the robust two-cycle condition holds for induced parts, then at least s(r+1) arcs cross the partition.

theorem digraph_cyclic_partition_cross_arc_lower_bound
    (α : Type) [Fintype α] [DecidableEq α] (D : Digraph α) [DecidableRel D.Adj]
    (r s : ℕ) (hr : 4 ≤ r) (col : α → Fin s)
    (hdeg : ∀ v, r ≤ (Finset.univ.filter fun w => D.Adj v w).card)
    (hrobust : ∀ T : Finset α, T.Nonempty →
      (∀ v ∈ T, 2 ≤ (T.filter fun w => D.Adj v w).card) →
      (T.filter fun v => (T.filter fun w => D.Adj v w).card < 3).card ≤ 2 →
      ∃ c : Fin 2 → Finset α, (∀ i, c i ⊆ T ∧ digraph_directed_cycle_on D (c i)) ∧
        Pairwise (fun i j => Disjoint (c i) (c j)))
    (hcycles : ∀ i, ∃ C : Finset α,
      C ⊆ (Finset.univ.filter fun v => col v = i) ∧ digraph_directed_cycle_on D C)
    (htails : ∀ i, 3 ≤ ((Finset.univ.filter fun v => col v = i).filter fun v =>
      ∃ w, col w ≠ i ∧ D.Adj v w).card)
    (hno : ¬ ∃ c : Fin (s + 1) → Finset α,
      (∀ i, digraph_directed_cycle_on D (c i)) ∧
        Pairwise (fun i j => Disjoint (c i) (c j))) :
    s * (r + 1) ≤ ∑ v : α, (Finset.univ.filter fun w => col w ≠ col v ∧ D.Adj v w).card
digraph_digirth_le_cardIn LeanGraph Theory & Graph Algorithms

If D is a finite nonempty loopless digraph with minimum out-degree at least 1 and digirth at least g, then g ≤ |V|.

theorem digraph_digirth_le_card {V : Type*} [Fintype V] [Nonempty V] (D : Digraph V) [DecidableRel D.Adj]
    (hloop : ∀ v : V, ¬ D.Adj v v) (hmin : ∀ v : V, 1 ≤ digraph_out_degree D v)
    (g : ℕ) (hg : digraph_has_digirth_ge D g) : g ≤ Fintype.card V
digraph_exists_bipartition_weight_discrepancy_and_cut_ge_halfIn LeanGraph Theory & Graph Algorithms

For any finite digraph H and any non-negative vertex weights w bounded by M, there exists a vertex subset S whose weight discrepancy is at most M and whose crossing cut count in H is at least |E(H)|/2.

theorem digraph_exists_bipartition_weight_discrepancy_and_cut_ge_half
    {V : Type*} [Fintype V] [DecidableEq V]
    (H : Digraph V) [DecidableRel H.Adj]
    (w : V → ℚ) (M : ℚ) (hw_nonneg : ∀ v, 0 ≤ w v) (hw_le : ∀ v, w v ≤ M) :
    ∃ S : Finset V,
      |∑ v ∈ S, w v - ∑ v ∈ Sᶜ, w v| ≤ M ∧
      (digraph_edge_count H : ℚ) ≤ 2 * ((digraph_cut_count H S Sᶜ : ℚ) + digraph_cut_count H Sᶜ S)
digraph_exists_directed_cycleIn LeanGraph Theory & Graph Algorithms

Every finite nonempty loopless digraph with minimum out-degree at least 1 contains a directed cycle: a list c of distinct vertices with 2 ≤ c.length forming a directed chain from its head u to its last vertex v, together with the closing arc v → u.

theorem digraph_exists_directed_cycle {V : Type*} [Fintype V] [Nonempty V] (D : Digraph V) [DecidableRel D.Adj]
    (hloop : ∀ v : V, ¬ D.Adj v v) (hmin : ∀ v : V, 1 ≤ digraph_out_degree D v) :
    ∃ c : List V, c.Nodup ∧ 2 ≤ c.length ∧ c.IsChain D.Adj ∧
      ∃ u v : V, c.head? = some u ∧ c.getLast? = some v ∧ D.Adj v u
digraph_exists_min_quasi_kernelIn LeanGraph Theory & Graph Algorithms

Every finite digraph has a quasi-kernel of minimum cardinality: among all quasi-kernels, one has cardinality no larger than any other.

theorem digraph_exists_min_quasi_kernel (α : Type) [Fintype α] [DecidableEq α]
    (D : Digraph α) [DecidableRel D.Adj] :
    ∃ Q : Finset α, digraph_is_quasi_kernel D Q ∧
      ∀ Q' : Finset α, digraph_is_quasi_kernel D Q' → Q.card ≤ Q'.card
digraph_exists_two_partitions_crossing_ge_and_imbalance_leIn LeanGraph Theory & Graph Algorithms

In any finite loopless digraph with minimum outdegree at least 2 and every indegree strictly below m/3 + 1, there exist two vertex subsets A₀ and A₁ with combined crossing cut count at least m and combined cut imbalance at most m/3.

theorem digraph_exists_two_partitions_crossing_ge_and_imbalance_le {V : Type*} [Fintype V]
    [DecidableEq V] (G : Digraph V) [DecidableRel G.Adj] (hloop : ∀ v, ¬ G.Adj v v)
    (hdeg : ∀ v, 2 ≤ (Finset.univ.filter (G.Adj v)).card)
    (hin : ∀ v, ((Finset.univ.filter fun u => G.Adj u v).card : ℚ) <
      (digraph_edge_count G : ℚ) / 3 + 1) :
    ∃ A₀ A₁ : Finset V,
      (digraph_edge_count G : ℚ) ≤
        (digraph_cut_count G A₀ A₀ᶜ : ℚ) + digraph_cut_count G A₀ᶜ A₀ +
        digraph_cut_count G A₁ A₁ᶜ + digraph_cut_count G A₁ᶜ A₁ ∧
      |(digraph_cut_count G A₀ A₀ᶜ : ℚ) - digraph_cut_count G A₀ᶜ A₀| +
        |(digraph_cut_count G A₁ A₁ᶜ : ℚ) - digraph_cut_count G A₁ᶜ A₁| ≤
          (digraph_edge_count G : ℚ) / 3
digraph_flip_by_matrix_addIn LeanGraph Theory & Graph Algorithms

Flipping a digraph successively by two symmetric F₂-matrices P and Q (reversing every arc uv with P_uv = 1, then every arc uv with Q_uv = 1) is the same as flipping it once by P + Q.

theorem digraph_flip_by_matrix_add {V : Type} (D : Digraph V) (P Q : Matrix V V (ZMod 2))
    (hP : P.IsSymm) (hQ : Q.IsSymm) :
    digraph_flip_by_matrix (digraph_flip_by_matrix D P) Q = digraph_flip_by_matrix D (P + Q)
digraph_flip_by_matrix_gram_columnsIn LeanGraph Theory & Graph Algorithms

Flipping a digraph by the Gram matrix S Sᵀ of a matrix S with t columns over F₂ is the same as successively inverting the t vertex sets {v | S v i = 1} (support of the i-th column), in the order i = 0, …, t−1.

theorem digraph_flip_by_matrix_gram_columns {V : Type} [Fintype V] (D : Digraph V) {t : ℕ}
    (S : Matrix V (Fin t) (ZMod 2)) :
    digraph_flip_by_matrix D (S * S.transpose) =
      (List.ofFn fun i : Fin t => {v : V | S v i = 1}).foldl digraph_invert D
digraph_four_strong_semicomplete_multipartite_nonadjacent_different_parts_linkedIn LeanGraph Theory & Graph Algorithms

In a 4-strong semicomplete multipartite digraph on at least 9 vertices, if non-adjacent pairs {s₁, t₁} and {s₂, t₂} lie in distinct independent parts, then unilateral 2-linkage exists.

theorem digraph_four_strong_semicomplete_multipartite_nonadjacent_different_parts_linked
    {V : Type*} [Fintype V] (D : Digraph V)
    (hcard : 9 ≤ Fintype.card V)
    (hstrong : digraph_is_k_strong D 4)
    (hmulti : digraph_is_semicomplete_multipartite D)
    {s₁ t₁ s₂ t₂ : V} (hnodup : [s₁, t₁, s₂, t₂].Nodup)
    (hnonadj1 : ¬ D.Adj s₁ t₁ ∧ ¬ D.Adj t₁ s₁)
    (hnonadj2 : ¬ D.Adj s₂ t₂ ∧ ¬ D.Adj t₂ s₂)
    (hdiff : D.Adj s₁ s₂ ∨ D.Adj s₂ s₁) :
    ∃ (p₁ p₂ : List V),
      (digraph_is_directed_path D p₁ s₁ t₁ ∨ digraph_is_directed_path D p₁ t₁ s₁) ∧
      (digraph_is_directed_path D p₂ s₂ t₂ ∨ digraph_is_directed_path D p₂ t₂ s₂) ∧
      p₁.Disjoint p₂
digraph_four_strong_semicomplete_multipartite_nonadjacent_pairs_linkedIn LeanGraph Theory & Graph Algorithms

Let D be a 4-strong semicomplete multipartite digraph on at least 9 vertices. If s₁, t₁, s₂, t₂ are pairwise distinct vertices such that neither {s₁, t₁} nor {s₂, t₂} has an arc in either direction, then there exist vertex-disjoint directed paths unilaterally linking {s₁, t₁} and {s₂, t₂}.

theorem digraph_four_strong_semicomplete_multipartite_nonadjacent_pairs_linked
    {V : Type*} [Fintype V] (D : Digraph V)
    (hcard : 9 ≤ Fintype.card V)
    (hstrong : digraph_is_k_strong D 4)
    (hmulti : digraph_is_semicomplete_multipartite D)
    {s₁ t₁ s₂ t₂ : V} (hnodup : [s₁, t₁, s₂, t₂].Nodup)
    (hnonadj1 : ¬ D.Adj s₁ t₁ ∧ ¬ D.Adj t₁ s₁)
    (hnonadj2 : ¬ D.Adj s₂ t₂ ∧ ¬ D.Adj t₂ s₂) :
    ∃ (p₁ p₂ : List V),
      (digraph_is_directed_path D p₁ s₁ t₁ ∨ digraph_is_directed_path D p₁ t₁ s₁) ∧
      (digraph_is_directed_path D p₂ s₂ t₂ ∨ digraph_is_directed_path D p₂ t₂ s₂) ∧
      p₁.Disjoint p₂
digraph_four_strong_semicomplete_multipartite_nonadjacent_same_part_linkedIn LeanGraph Theory & Graph Algorithms

In a 4-strong semicomplete multipartite digraph on at least 9 vertices, if non-adjacent pairs {s₁, t₁} and {s₂, t₂} lie in the same independent part, then unilateral 2-linkage exists.

theorem digraph_four_strong_semicomplete_multipartite_nonadjacent_same_part_linked
    {V : Type*} [Fintype V] (D : Digraph V)
    (hcard : 9 ≤ Fintype.card V)
    (hstrong : digraph_is_k_strong D 4)
    (hmulti : digraph_is_semicomplete_multipartite D)
    {s₁ t₁ s₂ t₂ : V} (hnodup : [s₁, t₁, s₂, t₂].Nodup)
    (hnonadj1 : ¬ D.Adj s₁ t₁ ∧ ¬ D.Adj t₁ s₁)
    (hnonadj2 : ¬ D.Adj s₂ t₂ ∧ ¬ D.Adj t₂ s₂)
    (hsame : ¬ D.Adj s₁ s₂ ∧ ¬ D.Adj s₂ s₁) :
    ∃ (p₁ p₂ : List V),
      (digraph_is_directed_path D p₁ s₁ t₁ ∨ digraph_is_directed_path D p₁ t₁ s₁) ∧
      (digraph_is_directed_path D p₂ s₂ t₂ ∨ digraph_is_directed_path D p₂ t₂ s₂) ∧
      p₁.Disjoint p₂
digraph_four_strong_semicomplete_multipartite_same_part_no_router_linkedIn LeanGraph Theory & Graph Algorithms

In a 4-strong semicomplete multipartite digraph on at least 9 vertices, if non-adjacent pairs {s₁, t₁} and {s₂, t₂} lie in the same independent part and neither pair has a 2-step router, then unilateral 2-linkage exists.

theorem digraph_four_strong_semicomplete_multipartite_same_part_no_router_linked
    {V : Type*} [Fintype V] (D : Digraph V)
    (hcard : 9 ≤ Fintype.card V)
    (hstrong : digraph_is_k_strong D 4)
    (hmulti : digraph_is_semicomplete_multipartite D)
    {s₁ t₁ s₂ t₂ : V} (hnodup : [s₁, t₁, s₂, t₂].Nodup)
    (hnonadj1 : ¬ D.Adj s₁ t₁ ∧ ¬ D.Adj t₁ s₁)
    (hnonadj2 : ¬ D.Adj s₂ t₂ ∧ ¬ D.Adj t₂ s₂)
    (hsame : ¬ D.Adj s₁ s₂ ∧ ¬ D.Adj s₂ s₁)
    (hnr1 : ∀ v ∉ [s₁, t₁, s₂, t₂], ¬ ((D.Adj s₁ v ∧ D.Adj v t₁) ∨ (D.Adj t₁ v ∧ D.Adj v s₁)))
    (hnr2 : ∀ v ∉ [s₁, t₁, s₂, t₂], ¬ ((D.Adj s₂ v ∧ D.Adj v t₂) ∨ (D.Adj t₂ v ∧ D.Adj v s₂))) :
    ∃ (p₁ p₂ : List V),
      (digraph_is_directed_path D p₁ s₁ t₁ ∨ digraph_is_directed_path D p₁ t₁ s₁) ∧
      (digraph_is_directed_path D p₂ s₂ t₂ ∨ digraph_is_directed_path D p₂ t₂ s₂) ∧
      p₁.Disjoint p₂
digraph_functional_no_ckk_subdivisionIn LeanGraph Theory & Graph Algorithms

If D is loopless, finite, and every vertex has out-degree exactly 1, then for every k ≥ 2 the digraph D contains no subdivision of C(k,k) (in particular the hypothesis "at most 3 exceptional vertices" in the target cannot be dropped: a directed cycle has arbitrarily large digirth and no C(k,k) subdivision).

theorem digraph_functional_no_ckk_subdivision {V : Type*} [Fintype V] (D : Digraph V) [DecidableRel D.Adj]
    (hloop : ∀ v : V, ¬ D.Adj v v) (hfun : ∀ v : V, digraph_out_degree D v = 1)
    (k : ℕ) (hk : 2 ≤ k) : ¬ digraph_has_ckk_subdivision D k
digraph_has_ckk_subdivision_of_arcs_subsetIn LeanGraph Theory & Graph Algorithms

If every arc of D' is an arc of D and D' contains a subdivision of C(k,k), then D contains a subdivision of C(k,k).

theorem digraph_has_ckk_subdivision_of_arcs_subset {V : Type*} {D D' : Digraph V} {k : ℕ}
    (hle : ∀ a b : V, D'.Adj a b → D.Adj a b) (h : digraph_has_ckk_subdivision D' k) :
    digraph_has_ckk_subdivision D k
digraph_has_digirth_ge_monoIn LeanGraph Theory & Graph Algorithms

Digirth bound is monotonic: if D has digirth at least g and g' ≤ g, then D has digirth at least g'.

theorem digraph_has_digirth_ge_mono {V : Type*} (D : Digraph V) {g g' : ℕ}
    (hg : digraph_has_digirth_ge D g) (hle : g' ≤ g) :
    digraph_has_digirth_ge D g'
digraph_has_digirth_ge_of_arcs_subsetIn LeanGraph Theory & Graph Algorithms

If every arc of D' is an arc of D and D has digirth at least g, then D' has digirth at least g.

theorem digraph_has_digirth_ge_of_arcs_subset {V : Type*} {D D' : Digraph V} {g : ℕ}
    (hle : ∀ a b : V, D'.Adj a b → D.Adj a b) (h : digraph_has_digirth_ge D g) :
    digraph_has_digirth_ge D' g
digraph_invert_eq_flip_by_matrix_indicatorIn LeanGraph Theory & Graph Algorithms

Inverting a vertex set X in a digraph coincides with flipping it by the rank-one matrix (indicator of X)(indicator of X)ᵀ.

theorem digraph_invert_eq_flip_by_matrix_indicator {V : Type} (D : Digraph V) (X : Set V) :
    digraph_invert D X = digraph_flip_by_matrix D
      (Matrix.of fun x y =>
        Set.indicator X (fun _ => (1 : ZMod 2)) x * Set.indicator X (fun _ => (1 : ZMod 2)) y)
digraph_is_directed_path_pair_of_adjIn LeanGraph Theory & Graph Algorithms

If u → v is an arc of D and u ≠ v, then the two-element list [u, v] is a directed path from u to v.

theorem digraph_is_directed_path_pair_of_adj {V : Type*} (D : Digraph V) {u v : V}
    (h : D.Adj u v) (huv : u ≠ v) : digraph_is_directed_path D [u, v] u v
digraph_is_directed_path_triple_of_adjIn LeanGraph Theory & Graph Algorithms

Two consecutive arcs s → a → t, with s, a, t pairwise distinct, make [s, a, t] a directed path from s to t.

theorem digraph_is_directed_path_triple_of_adj {V : Type*} (D : Digraph V) {s a t : V}
    (h₁ : D.Adj s a) (h₂ : D.Adj a t) (hsa : s ≠ a) (hat : a ≠ t) (hst : s ≠ t) :
    digraph_is_directed_path D [s, a, t] s t
digraph_is_quasi_kernel_iffIn LeanGraph Theory & Graph Algorithms

Q is a quasi-kernel of D if and only if Q is independent (no arc between distinct members in either direction) and every vertex is 2-dominated by Q.

theorem digraph_is_quasi_kernel_iff {α : Type*} (D : Digraph α) (Q : Finset α) :
    digraph_is_quasi_kernel D Q ↔
      (∀ u ∈ Q, ∀ v ∈ Q, u ≠ v → ¬ D.Adj u v) ∧ ∀ v, digraph_two_dominated D Q v
digraph_laplacian_decomp_sumIn LeanGraph Theory & Graph Algorithms

The shifted out-degree Laplacian s·L_D + α·J of a loopless digraph D decomposes as ∑_k A_k where each row i of A_k has out-arc contribution s*(e_i - e_k) when k is an out-neighbour, plus α on row k = i.

theorem digraph_laplacian_decomp_sum {n : ℕ} (D : Digraph (Fin n)) [DecidableRel D.Adj] (hloop : ∀ v, ¬ D.Adj v v) (s α : ℝ) : s • digraph_out_laplacian D + α • Matrix.of (fun _ _ : Fin n => (1 : ℝ)) = ∑ k : Fin n, Matrix.of (fun i j : Fin n => (if D.Adj i k then s * ((if i = j then (1 : ℝ) else 0) - (if k = j then 1 else 0)) else 0) + (if k = i then α else 0))
digraph_laplacian_det_smul_add_onesIn LeanGraph Theory & Graph Algorithms

For a loopless digraph D on Fin n with n ≥ 1 and real numbers s and α, det(s·L_D + α·J) = n·α·s^{n-1}·τ(D), where L_D is the out-degree Laplacian, J is the all-ones matrix and τ(D) is the total number of spanning arborescences.

theorem digraph_laplacian_det_smul_add_ones {n : ℕ} (hn : 1 ≤ n) (D : Digraph (Fin n)) [DecidableRel D.Adj] (hloop : ∀ v, ¬ D.Adj v v) (s α : ℝ) : (s • digraph_out_laplacian D + α • Matrix.of (fun _ _ : Fin n => (1 : ℝ))).det = (n : ℝ) * α * s ^ (n - 1) * (digraph_arborescence_count D : ℝ)
digraph_large_common_predecessor_indegree_imbalanceIn LeanGraph Theory & Graph Algorithms

In a 7-outregular digraph on at least 122 vertices whose common-predecessor graph is connected and has no independent set of size four, some vertex has indegree at least eight and another has indegree at most six.

theorem digraph_large_common_predecessor_indegree_imbalance
    (n : ℕ) (hn : 122 ≤ n) (D : Digraph (Fin n)) [DecidableRel D.Adj]
    (hreg : ∀ v, (Finset.univ.filter fun w => D.Adj v w).card = 7)
    (hconn : (digraph_common_predecessor_graph D).Connected)
    (hindep : (digraph_common_predecessor_graph D).IndepSetFree 4) :
    ∃ u v, 8 ≤ (Finset.univ.filter fun w => D.Adj w u).card ∧
      (Finset.univ.filter fun w => D.Adj w v).card ≤ 6
digraph_mem_exceptional_verts_iffIn LeanGraph Theory & Graph Algorithms

A vertex v of a finite digraph D is exceptional (lies in O(D)) if and only if its out-degree is exactly 1.

theorem digraph_mem_exceptional_verts_iff {V : Type*} [Fintype V] (D : Digraph V) [DecidableRel D.Adj]
    (v : V) : v ∈ digraph_exceptional_verts D ↔ digraph_out_degree D v = 1
digraph_min_outdegree_three_two_disjoint_cyclesIn LeanGraph Theory & Graph Algorithms

Every finite nonempty loopless digraph with minimum outdegree at least three contains two vertex-disjoint directed cycles.

theorem digraph_min_outdegree_three_two_disjoint_cycles (α : Type) [Fintype α] [DecidableEq α] [Nonempty α] (D : Digraph α) [DecidableRel D.Adj] (hloop : ∀ v, ¬ D.Adj v v) (hdeg : ∀ v, 3 ≤ (Finset.univ.filter fun w => D.Adj v w).card) : ∃ s : Fin 2 → Finset α, (∀ i, digraph_directed_cycle_on D (s i)) ∧ Pairwise (fun i j => Disjoint (s i) (s j))
digraph_nested_parents_force_overlap_seventyIn LeanGraph Theory & Graph Algorithms

If five distinct vertices form a transitive tournament, all point to q, and at least 8−t other common predecessors point to q and the first t vertices for every 1≤t≤5, then the common-predecessor overlap is at least 70.

theorem digraph_nested_parents_force_overlap_seventy
    (α : Type) [Fintype α] [DecidableEq α]
    (D : Digraph α) [DecidableRel D.Adj]
    (low : Fin 5 → α) (q : α)
    (hinj : Function.Injective low) (hq : ∀ i, low i ≠ q)
    (htrans : ∀ i j : Fin 5, i.val < j.val → D.Adj (low j) (low i))
    (htarget : ∀ i, D.Adj (low i) q)
    (hparents : ∀ t : ℕ, 1 ≤ t → t ≤ 5 →
      8 - t ≤ (Finset.univ.filter fun p : α => p ≠ q ∧
        (∀ i, p ≠ low i) ∧ D.Adj p q ∧
        ∀ i : Fin 5, i.val < t → D.Adj p (low i)).card) :
    70 ≤ (∑ v : α, Nat.choose (Finset.univ.filter fun w => D.Adj v w).card 2) -
      (digraph_common_predecessor_graph D).edgeFinset.card
digraph_oriented_degree_profile_13_has_two_cyclesIn LeanGraph Theory & Graph Algorithms

An oriented 13-vertex digraph with outdegrees 1,2,3,4,5 and eight sevens contains two disjoint cycles, assuming the displayed robust two-cycle criterion.

theorem digraph_oriented_degree_profile_13_has_two_cycles
    (D : Digraph (Fin 13)) [DecidableRel D.Adj]
    (hori : ∀ u v, D.Adj u v → ¬ D.Adj v u)
    (hloop : ∀ u, ¬ D.Adj u u)
    (hdeg : ∀ v, (Finset.univ.filter fun w => D.Adj v w).card =
      if v.val < 5 then v.val + 1 else 7)
    (htwo : ∀ T : Finset (Fin 13), T.Nonempty →
      (∀ v ∈ T, 2 ≤ (T.filter fun w => D.Adj v w).card) →
      (T.filter fun v => (T.filter fun w => D.Adj v w).card < 3).card ≤ 2 →
      ∃ c : Fin 2 → Finset (Fin 13), (∀ i, c i ⊆ T ∧ digraph_directed_cycle_on D (c i)) ∧
        Pairwise (fun i j => Disjoint (c i) (c j))) :
    ∃ c : Fin 2 → Finset (Fin 13),
      (∀ i, digraph_directed_cycle_on D (c i)) ∧ Pairwise (fun i j => Disjoint (c i) (c j))
digraph_oriented_general_cut_boundary_cardIn LeanGraph Theory & Graph Algorithms

In digraph_oriented_general_cut_example d with d ≥ 3, the number of outgoing arcs from B to Bᶜ is Nat.choose d 2 - 1.

open Classical in
theorem digraph_oriented_general_cut_boundary_card (d : ℕ) (hd : 3 ≤ d) :
    let D := digraph_oriented_general_cut_example d
    let B : Finset (Fin (4 * d - 2)) := Finset.univ.filter fun v => v.val < 3 * d - 1
    (∑ v ∈ B, (Bᶜ.filter fun w => D.Adj v w).card) = Nat.choose d 2 - 1
digraph_oriented_general_cut_no_two_cyclesIn LeanGraph Theory & Graph Algorithms

For d ≥ 3, digraph_oriented_general_cut_example d contains no two vertex-disjoint directed cycles.

open Classical in
theorem digraph_oriented_general_cut_no_two_cycles (d : ℕ) (hd : 3 ≤ d) :
    let D := digraph_oriented_general_cut_example d
    ¬ ∃ c : Fin 2 → Finset (Fin (4 * d - 2)),
      (∀ i, digraph_directed_cycle_on D (c i)) ∧ Pairwise (fun i j => Disjoint (c i) (c j))
digraph_oriented_general_cut_orientationIn LeanGraph Theory & Graph Algorithms

For any d ≥ 3, the parametric digraph digraph_oriented_general_cut_example d is oriented.

theorem digraph_oriented_general_cut_orientation (d : ℕ) (hd : 3 ≤ d) (u v : Fin (4 * d - 2)) :
    (digraph_oriented_general_cut_example d).Adj u v → ¬ (digraph_oriented_general_cut_example d).Adj v u
digraph_oriented_general_cut_part_outdegreeIn LeanGraph Theory & Graph Algorithms

In digraph_oriented_general_cut_example d with d ≥ 3, the set B of vertices with index < 3d - 1 has size at least d and every vertex in B has outdegree d.

open Classical in
theorem digraph_oriented_general_cut_part_outdegree (d : ℕ) (hd : 3 ≤ d) :
    let D := digraph_oriented_general_cut_example d
    let B : Finset (Fin (4 * d - 2)) := Finset.univ.filter fun v => v.val < 3 * d - 1
    d ≤ B.card ∧ ∀ v ∈ B, (Finset.univ.filter fun w => D.Adj v w).card = d
digraph_oriented_general_cut_robustIn LeanGraph Theory & Graph Algorithms

In digraph_oriented_general_cut_example d with d ≥ 3, any nonempty induced subset T of minimum outdegree at least 2 contains at least three vertices of induced outdegree 2.

open Classical in
theorem digraph_oriented_general_cut_robust (d : ℕ) (hd : 3 ≤ d) :
    let D := digraph_oriented_general_cut_example d
    ∀ T : Finset (Fin (4 * d - 2)), T.Nonempty →
      (∀ v ∈ T, 2 ≤ (T.filter fun w => D.Adj v w).card) →
      3 ≤ (T.filter fun v => (T.filter fun w => D.Adj v w).card < 3).card
digraph_oriented_general_cut_sharpIn LeanGraph Theory & Graph Algorithms

For each d at least three, the parametric example is oriented, has a d-outregular part of size 3d−1 with choose(d,2)−1 outgoing arcs, has no two disjoint cycles, and satisfies the displayed robust two-cycle premise.

theorem digraph_oriented_general_cut_sharp
    (d : ℕ) (hd : 3 ≤ d) :
    let D := digraph_oriented_general_cut_example d
    let B : Finset (Fin (4 * d - 2)) := Finset.univ.filter fun v => v.val < 3 * d - 1
    (∀ u v, D.Adj u v → ¬ D.Adj v u) ∧ d ≤ B.card ∧
    (∀ v ∈ B, (Finset.univ.filter fun w => D.Adj v w).card = d) ∧
    (∑ v ∈ B, (Bᶜ.filter fun w => D.Adj v w).card) = Nat.choose d 2 - 1 ∧
    (¬ ∃ c : Fin 2 → Finset (Fin (4 * d - 2)),
      (∀ i, digraph_directed_cycle_on D (c i)) ∧ Pairwise (fun i j => Disjoint (c i) (c j))) ∧
    (∀ T : Finset (Fin (4 * d - 2)), T.Nonempty →
      (∀ v ∈ T, 2 ≤ (T.filter fun w => D.Adj v w).card) →
      3 ≤ (T.filter fun v => (T.filter fun w => D.Adj v w).card < 3).card)
digraph_oriented_twenty_profile_nested_parentsIn LeanGraph Theory & Graph Algorithms

Under the displayed two-cycle degree-sequence criteria, an oriented two-cycle-free equality-profile graph whose first five vertices are transitive with common target has at least 8−t high vertices pointing to that target and the first t low vertices, for every 1≤t≤5.

theorem digraph_oriented_twenty_profile_nested_parents
    (n : ℕ) (D : Digraph (Fin n)) [DecidableRel D.Adj]
    (hn : 20 ≤ n)
    (hori : ∀ u v, D.Adj u v → ¬ D.Adj v u)
    (hdeg : ∀ v, (Finset.univ.filter fun w => D.Adj v w).card =
      if v.val < 5 then v.val + 1 else 7)
    (htrans : ∀ u v : Fin n, u.val < 5 → v.val < u.val → D.Adj u v)
    (q : Fin n) (hq : 5 ≤ q.val)
    (hlow : ∀ v : Fin n, v.val < 5 → D.Adj v q)
    (hsequence : ∀ (s : ℕ) (β : Type) [Fintype β] [DecidableEq β] [Nonempty β]
      (E : Digraph β) [DecidableRel E.Adj],
      1 ≤ s → 2 * s + 1 ≤ Fintype.card β →
      (∀ v, ¬ E.Adj v v) →
      (∀ v, 1 ≤ (Finset.univ.filter fun w => E.Adj v w).card) →
      (Finset.univ.filter fun v => (Finset.univ.filter fun w => E.Adj v w).card < s + 1).card ≤ s - 1 →
      (Finset.univ.filter fun v => (Finset.univ.filter fun w => E.Adj v w).card < s + 2).card ≤ 2 * s →
      ∃ c : Fin 2 → Finset β, (∀ i, digraph_directed_cycle_on E (c i)) ∧
        Pairwise (fun i j => Disjoint (c i) (c j)))
    (hno : ¬ ∃ c : Fin 2 → Finset (Fin n),
      (∀ i, digraph_directed_cycle_on D (c i)) ∧
        Pairwise (fun i j => Disjoint (c i) (c j))) :
    ∀ t : ℕ, 1 ≤ t → t ≤ 5 →
      8 - t ≤ (Finset.univ.filter fun p : Fin n => 5 ≤ p.val ∧ D.Adj p q ∧
        ∀ v : Fin n, v.val < t → D.Adj p v).card
digraph_oriented_twenty_profile_one_suppression_reductionIn LeanGraph Theory & Graph Algorithms

Assuming the displayed two-cycle degree-sequence criteria, an oriented two-cycle-free graph with transitive low-degree profile 1,2,3,4,5 followed by sevens has a common target for the five low vertices, at least seven high common predecessors of that target and the first low vertex, and at least twenty vertices.

theorem digraph_oriented_twenty_profile_one_suppression_reduction
    (n : ℕ) (D : Digraph (Fin n)) [DecidableRel D.Adj]
    (hn : 12 ≤ n)
    (hori : ∀ u v, D.Adj u v → ¬ D.Adj v u)
    (hdeg : ∀ v, (Finset.univ.filter fun w => D.Adj v w).card =
      if v.val < 5 then v.val + 1 else 7)
    (htrans : ∀ u v : Fin n, u.val < 5 → v.val < u.val → D.Adj u v)
    (hsequence : ∀ (s : ℕ) (β : Type) [Fintype β] [DecidableEq β] [Nonempty β]
      (E : Digraph β) [DecidableRel E.Adj],
      1 ≤ s → 2 * s + 1 ≤ Fintype.card β →
      (∀ v, ¬ E.Adj v v) → (∀ v, 1 ≤ (Finset.univ.filter fun w => E.Adj v w).card) →
      (Finset.univ.filter fun v => (Finset.univ.filter fun w => E.Adj v w).card < s + 1).card ≤ s - 1 →
      (Finset.univ.filter fun v => (Finset.univ.filter fun w => E.Adj v w).card < s + 2).card ≤ 2 * s →
      ∃ c : Fin 2 → Finset β, (∀ i, digraph_directed_cycle_on E (c i)) ∧ Pairwise (fun i j => Disjoint (c i) (c j)))
    (hno : ¬ ∃ c : Fin 2 → Finset (Fin n), (∀ i, digraph_directed_cycle_on D (c i)) ∧
      Pairwise (fun i j => Disjoint (c i) (c j))) :
    ∃ q : Fin n, 5 ≤ q.val ∧ (∀ v : Fin n, v.val < 5 → D.Adj v q) ∧
      7 ≤ (Finset.univ.filter fun p : Fin n =>
        5 ≤ p.val ∧ D.Adj p q ∧ D.Adj p ⟨0, by omega⟩).card ∧ 20 ≤ n
digraph_oriented_twenty_profile_order_ge_twelveIn LeanGraph Theory & Graph Algorithms

An oriented graph whose first five outdegrees are 1,2,3,4,5 and all remaining outdegrees are seven has at least twelve vertices.

theorem digraph_oriented_twenty_profile_order_ge_twelve
    (n : ℕ) (D : Digraph (Fin n)) [DecidableRel D.Adj] (hn : 5 ≤ n)
    (hori : ∀ u v, D.Adj u v → ¬ D.Adj v u)
    (hdeg : ∀ v, (Finset.univ.filter fun w => D.Adj v w).card =
      if v.val < 5 then v.val + 1 else 7) : 12 ≤ n
digraph_oriented_twenty_profile_seven_parentsIn LeanGraph Theory & Graph Algorithms

Assuming the displayed two-cycle degree-sequence criterion, an oriented two-cycle-free graph with outdegrees 1,2,3,4,5 followed by sevens, whose first five vertices point to a common high target q, has at least seven high common predecessors of the first low vertex and q, and has at least twenty vertices.

theorem digraph_oriented_twenty_profile_seven_parents
    (n : ℕ) (D : Digraph (Fin n)) [DecidableRel D.Adj]
    (hn : 5 ≤ n)
    (hori : ∀ u v, D.Adj u v → ¬ D.Adj v u)
    (hdeg : ∀ v, (Finset.univ.filter fun w => D.Adj v w).card =
      if v.val < 5 then v.val + 1 else 7)
    (q : Fin n) (hq : 5 ≤ q.val)
    (hlow : ∀ v : Fin n, v.val < 5 → D.Adj v q)
    (hsequence : ∀ (β : Type) [Fintype β] [DecidableEq β] [Nonempty β]
      (E : Digraph β) [DecidableRel E.Adj],
      5 ≤ Fintype.card β →
      (∀ v, ¬ E.Adj v v) →
      (∀ v, 1 ≤ (Finset.univ.filter fun w => E.Adj v w).card) →
      (Finset.univ.filter fun v => (Finset.univ.filter fun w => E.Adj v w).card < 6).card ≤ 4 →
      (Finset.univ.filter fun v => (Finset.univ.filter fun w => E.Adj v w).card < 7).card ≤ 10 →
      ∃ c : Fin 2 → Finset β, (∀ i, digraph_directed_cycle_on E (c i)) ∧
        Pairwise (fun i j => Disjoint (c i) (c j)))
    (hno : ¬ ∃ c : Fin 2 → Finset (Fin n),
      (∀ i, digraph_directed_cycle_on D (c i)) ∧
        Pairwise (fun i j => Disjoint (c i) (c j))) :
    7 ≤ (Finset.univ.filter fun p : Fin n =>
      5 ≤ p.val ∧ D.Adj p q ∧ D.Adj p ⟨0, by omega⟩).card ∧ 20 ≤ n
digraph_oriented_twenty_profile_shared_target_lower_boundIn LeanGraph Theory & Graph Algorithms

Under the displayed universal robust two-cycle criterion, an oriented two-cycle-free degree-profile digraph with the first five vertices transitive has a common high outneighbor for those five, at least three high vertices dominating all five and that outneighbor, and at least sixteen vertices.

theorem digraph_oriented_twenty_profile_shared_target_lower_bound
    (n : ℕ) (D : Digraph (Fin n)) [DecidableRel D.Adj]
    (hn : 5 ≤ n)
    (hori : ∀ u v, D.Adj u v → ¬ D.Adj v u)
    (hdeg : ∀ v, (Finset.univ.filter fun w => D.Adj v w).card =
      if v.val < 5 then v.val + 1 else 7)
    (htrans : ∀ u v : Fin n, u.val < 5 → v.val < u.val → D.Adj u v)
    (hrobust_all : ∀ (β : Type) [Fintype β] [DecidableEq β] [Nonempty β]
      (E : Digraph β) [DecidableRel E.Adj],
      (∀ v, ¬ E.Adj v v) →
      (∀ v, 2 ≤ (Finset.univ.filter fun w => E.Adj v w).card) →
      (Finset.univ.filter fun v => (Finset.univ.filter fun w => E.Adj v w).card < 3).card ≤ 2 →
      ∃ c : Fin 2 → Finset β, (∀ i, digraph_directed_cycle_on E (c i)) ∧
        Pairwise (fun i j => Disjoint (c i) (c j)))
    (hno : ¬ ∃ c : Fin 2 → Finset (Fin n),
      (∀ i, digraph_directed_cycle_on D (c i)) ∧
        Pairwise (fun i j => Disjoint (c i) (c j))) :
    ∃ q : Fin n, 5 ≤ q.val ∧
      (∀ v : Fin n, v.val < 5 → D.Adj v q) ∧
      3 ≤ (Finset.univ.filter fun p : Fin n =>
        5 ≤ p.val ∧ D.Adj p q ∧ ∀ v : Fin n, v.val < 5 → D.Adj p v).card ∧
      16 ≤ n
digraph_out_degree_pos_iffIn LeanGraph Theory & Graph Algorithms

A vertex v of a finite digraph D has positive out-degree if and only if it has an out-neighbour.

theorem digraph_out_degree_pos_iff {V : Type*} [Fintype V] (D : Digraph V) [DecidableRel D.Adj]
    (v : V) : 0 < digraph_out_degree D v ↔ ∃ w : V, D.Adj v w
digraph_out_laplacian_transpose_of_eulerianIn LeanGraph Theory & Graph Algorithms

Reversing an Eulerian digraph transposes its out-degree Laplacian matrix.

theorem digraph_out_laplacian_transpose_of_eulerian {n : ℕ} (G : SimpleGraph (Fin n))
    (D : Digraph (Fin n)) [DecidableRel D.Adj]
    (hD : digraph_is_eulerian_orientation G D) :
    @digraph_out_laplacian n ⟨fun u v => D.Adj v u⟩
      (fun u v => inferInstanceAs (Decidable (D.Adj v u))) =
    (digraph_out_laplacian D).transpose
digraph_quasi_kernel_private_witnessIn LeanGraph Theory & Graph Algorithms

If Q is a quasi-kernel of minimum cardinality in a finite digraph, then there is a map f from the members of Q to the vertices such that for every q in Q the vertex f q is 2-dominated by the singleton {q} but not by Q with q removed; any such map is injective, so Q embeds into the vertex set.

theorem digraph_quasi_kernel_private_witness {α : Type} [Fintype α] [DecidableEq α]
    (D : Digraph α) (Q : Finset α) (hQ : digraph_is_quasi_kernel D Q)
    (hmin : ∀ Q' : Finset α, digraph_is_quasi_kernel D Q' → Q.card ≤ Q'.card) :
    ∃ f : {q // q ∈ Q} → α,
      (∀ q, digraph_two_dominated D {q.1} (f q) ∧ ¬ digraph_two_dominated D (Q.erase q.1) (f q)) ∧
      Function.Injective f
digraph_quasi_kernel_self_witness_of_no_outIn LeanGraph Theory & Graph Algorithms

Let Q contain a vertex q with no out-neighbour. Then any map f from the members of Q that assigns to each member x a vertex 2-dominated by {x} but not by Q with x removed must satisfy f q = q.

theorem digraph_quasi_kernel_self_witness_of_no_out {α : Type} [Fintype α] [DecidableEq α]
    (D : Digraph α) (Q : Finset α) {q : α} (hqQ : q ∈ Q) (hq : ∀ y, ¬ D.Adj q y)
    (f : {x // x ∈ Q} → α)
    (hf : ∀ x, digraph_two_dominated D {x.1} (f x) ∧ ¬ digraph_two_dominated D (Q.erase x.1) (f x)) :
    f ⟨q, hqQ⟩ = q
digraph_regular_common_predecessor_card_le_121In LeanGraph Theory & Graph Algorithms

A digraph with indegree and outdegree exactly seven at every vertex has at most 121 vertices if its common-predecessor graph is connected and has no independent set of size four.

theorem digraph_regular_common_predecessor_card_le_121
    (n : ℕ) (D : Digraph (Fin n)) [DecidableRel D.Adj]
    (hout : ∀ v, (Finset.univ.filter fun w => D.Adj v w).card = 7)
    (hin : ∀ v, (Finset.univ.filter fun w => D.Adj w v).card = 7)
    (hconn : (digraph_common_predecessor_graph D).Connected)
    (hindep : (digraph_common_predecessor_graph D).IndepSetFree 4) : n ≤ 121
digraph_semicomplete_multipartite_no_router_in_out_partitionIn LeanGraph Theory & Graph Algorithms

In a semicomplete multipartite digraph, if a non-adjacent pair {s₁, t₁} has no 2-step router, every vertex v outside their independent part is either purely in-directed to both s₁ and t₁ or purely out-directed from both s₁ and t₁.

theorem digraph_semicomplete_multipartite_no_router_in_out_partition
    {V : Type*} [Fintype V] (D : Digraph V)
    (hmulti : digraph_is_semicomplete_multipartite D)
    {s₁ t₁ : V} (hne : s₁ ≠ t₁)
    (hnonadj : ¬ D.Adj s₁ t₁ ∧ ¬ D.Adj t₁ s₁)
    (hnorouter : ∀ v ∉ [s₁, t₁], ¬ ((D.Adj s₁ v ∧ D.Adj v t₁) ∨ (D.Adj t₁ v ∧ D.Adj v s₁)))
    (v : V) (hv : v ≠ s₁ ∧ v ≠ t₁) (hnot_part : D.Adj s₁ v ∨ D.Adj v s₁) :
    (D.Adj s₁ v ∧ D.Adj t₁ v ∧ ¬ D.Adj v s₁ ∧ ¬ D.Adj v t₁) ∨
    (D.Adj v s₁ ∧ D.Adj v t₁ ∧ ¬ D.Adj s₁ v ∧ ¬ D.Adj t₁ v)
digraph_semicomplete_part_short_pathIn LeanGraph Theory & Graph Algorithms

Let W be a vertex set on which D is semicomplete (every two distinct vertices of W are joined by at least one arc). If u, v ∈ W are distinct and both lie outside a finite set T, then some list of at most 2 vertices is a directed path from u to v or from v to u, all of whose vertices avoid T.

theorem digraph_semicomplete_part_short_path {V : Type*} (D : Digraph V) (W : Set V)
    (hsem : ∀ u ∈ W, ∀ v ∈ W, u ≠ v → D.Adj u v ∨ D.Adj v u)
    {u v : V} (hu : u ∈ W) (hv : v ∈ W) (huv : u ≠ v) (T : Finset V)
    (huT : u ∉ T) (hvT : v ∉ T) :
    ∃ p : List V, (digraph_is_directed_path D p u v ∨ digraph_is_directed_path D p v u) ∧
      p.length ≤ 2 ∧ ∀ x ∈ p, x ∉ T
digraph_six_circulant_digirth_ge_fourIn LeanGraph Theory & Graph Algorithms

The digraph digraph_six_circulant has digirth at least 4.

theorem digraph_six_circulant_digirth_ge_four : digraph_has_digirth_ge digraph_six_circulant 4
digraph_six_circulant_has_ckk_subdivision_twoIn LeanGraph Theory & Graph Algorithms

The digraph digraph_six_circulant contains a subdivision of C(2,2): the two internally disjoint paths 0 → 3 → 4 and 0 → 1 → 4.

theorem digraph_six_circulant_has_ckk_subdivision_two :
    digraph_has_ckk_subdivision digraph_six_circulant 2
digraph_six_circulant_three_exceptional_instanceIn LeanGraph Theory & Graph Algorithms

The digraph digraph_six_circulant on six vertices is loopless, has minimum out-degree at least 1, has exactly 3 vertices of out-degree 1 (namely 3, 4, 5), has digirth at least 3*(2-1)+1 = 4, and contains a subdivision of C(2,2). So the hypotheses of the target for k = 2 are satisfiable by a nonempty digraph that also satisfies the conclusion.

theorem digraph_six_circulant_three_exceptional_instance :
    (∀ v : Fin 6, ¬ digraph_six_circulant.Adj v v) ∧
    (∀ v : Fin 6, 1 ≤ digraph_out_degree digraph_six_circulant v) ∧
    (digraph_exceptional_verts digraph_six_circulant).card ≤ 3 ∧
    digraph_has_digirth_ge digraph_six_circulant (3 * (2 - 1) + 1) ∧
    digraph_has_ckk_subdivision digraph_six_circulant 2
digraph_small_quasi_kernel_of_bipartiteIn LeanGraph Theory & Graph Algorithms

Let D be a finite source-free digraph on a vertex set partitioned into two disjoint parts A and B with every arc joining A to B, and (for definiteness) every vertex in A or in B. Then the smaller of A and B is independent and 2-dominates every vertex, so D has a quasi-kernel Q with 2|Q| ≤ |V|.

theorem digraph_small_quasi_kernel_of_bipartite (α : Type) [Fintype α] [DecidableEq α]
    (D : Digraph α) [DecidableRel D.Adj] (hsrc : ∀ v, ∃ u, D.Adj u v)
    (A B : Finset α) (hcover : ∀ v, v ∈ A ∨ v ∈ B) (hdisj : Disjoint A B)
    (hcross : ∀ u v, D.Adj u v → (u ∈ A ∧ v ∈ B) ∨ (u ∈ B ∧ v ∈ A)) :
    ∃ Q : Finset α, digraph_is_quasi_kernel D Q ∧ 2 * Q.card ≤ Fintype.card α
digraph_small_quasi_kernel_of_card_le_twoIn LeanGraph Theory & Graph Algorithms

If a finite loopless digraph has at most two vertices and every vertex has an in-neighbour, then it has a quasi-kernel Q with 2|Q| ≤ |V|.

theorem digraph_small_quasi_kernel_of_card_le_two (α : Type) [Fintype α] [DecidableEq α]
    (D : Digraph α) [DecidableRel D.Adj] (hloop : ∀ v, ¬ D.Adj v v) (hsrc : ∀ v, ∃ u, D.Adj u v)
    (hcard : Fintype.card α ≤ 2) :
    ∃ Q : Finset α, digraph_is_quasi_kernel D Q ∧ 2 * Q.card ≤ Fintype.card α
digraph_suppress_set_to_two_cycles_liftIn LeanGraph Theory & Graph Algorithms

If each suppressed vertex points to q, every pair of vertex-disjoint cycles after suppressing the set into q lifts to a disjoint pair in the original digraph.

theorem digraph_suppress_set_to_two_cycles_lift
    (α : Type) [DecidableEq α] (D : Digraph α) (S : Finset α) (q : α)
    (hq : q ∉ S) (hSq : ∀ x ∈ S, D.Adj x q)
    (c : Fin 2 → Finset {v : α // v ∉ S})
    (hcyc : ∀ i, digraph_directed_cycle_on (digraph_suppress_set_to D S q) (c i))
    (hdis : Pairwise (fun i j => Disjoint (c i) (c j))) :
    ∃ d : Fin 2 → Finset α, (∀ i, digraph_directed_cycle_on D (d i)) ∧
      Pairwise (fun i j => Disjoint (d i) (d j))
digraph_three_boundary_tails_robust_cut_boundIn LeanGraph Theory & Graph Algorithms

A vertex set in a digraph of minimum outdegree r at least four, with three distinct tails of arcs leaving it and no two disjoint internal directed cycles, has at least r+1 leaving arcs, provided the robust two-cycle criterion holds on that set.

theorem digraph_three_boundary_tails_robust_cut_bound
    (α : Type) [Fintype α] [DecidableEq α] (D : Digraph α) [DecidableRel D.Adj]
    (r : ℕ) (hr : 4 ≤ r) (B : Finset α)
    (hdeg : ∀ v ∈ B, r ≤ (Finset.univ.filter fun w => D.Adj v w).card)
    (htails : 3 ≤ (B.filter fun v => ∃ w ∈ Bᶜ, D.Adj v w).card)
    (hrobust : (∀ v ∈ B, 2 ≤ (B.filter fun w => D.Adj v w).card) →
      (B.filter fun v => (B.filter fun w => D.Adj v w).card < 3).card ≤ 2 →
      ∃ c : Fin 2 → Finset α, (∀ i, c i ⊆ B ∧ digraph_directed_cycle_on D (c i)) ∧
        Pairwise (fun i j => Disjoint (c i) (c j)))
    (hno : ¬ ∃ c : Fin 2 → Finset α, (∀ i, c i ⊆ B ∧ digraph_directed_cycle_on D (c i)) ∧
        Pairwise (fun i j => Disjoint (c i) (c j))) :
    r + 1 ≤ ∑ v ∈ B, (Bᶜ.filter fun w => D.Adj v w).card
digraph_three_exceptional_vertex_out_degree_twoIn LeanGraph Theory & Graph Algorithms

Let k ≥ 2. In a finite nonempty loopless digraph D with minimum out-degree at least 1, at most 3 vertices of out-degree 1, and digirth at least 3*(k-1)+1, some vertex has out-degree at least 2.

open Classical in
theorem digraph_three_exceptional_vertex_out_degree_two
    {V : Type*} [Fintype V] [Nonempty V] (D : Digraph V) [DecidableRel D.Adj]
    (hloop : ∀ v : V, ¬ D.Adj v v)
    (k : ℕ) (hk : 2 ≤ k)
    (hmin : ∀ v : V, 1 ≤ digraph_out_degree D v)
    (hexc : (digraph_exceptional_verts D).card ≤ 3)
    (hgirth : digraph_has_digirth_ge D (3 * (k - 1) + 1)) :
    ∃ v : V, 2 ≤ digraph_out_degree D v
digraph_three_strong_card_four_cross_short_pathIn LeanGraph Theory & Graph Algorithms

If D is a 3-strong digraph on exactly 4 vertices, then any two distinct vertices are joined by a directed path with at most 4 vertices (this is the smallest instance of the cross short-path lemma; in fact 3-strongness on 4 vertices forces a bidirected complete digraph).

theorem digraph_three_strong_card_four_cross_short_path {V : Type*} [Fintype V]
    (D : Digraph V) (h3 : digraph_is_k_strong D 3) (hcard : Fintype.card V = 4) {s t : V}
    (hst : s ≠ t) :
    ∃ p : List V,
      (digraph_is_directed_path D p s t ∨ digraph_is_directed_path D p t s) ∧ p.length ≤ 4
digraph_three_strong_co_bipartite_cross_short_pathIn LeanGraph Theory & Graph Algorithms

Let D be a digraph whose vertex set is partitioned into two disjoint sets V₁, V₂, each inducing a semicomplete subdigraph. If D is 3-strong, then for every s ∈ V₁ and t ∈ V₂ with s ≠ t there is a directed path joining s and t in one of the two directions with at most 4 vertices (at most 3 arcs).

theorem digraph_three_strong_co_bipartite_cross_short_path {V : Type*} [Fintype V]
    (D : Digraph V) (V₁ V₂ : Set V) (hcover : ∀ v, v ∈ V₁ ∨ v ∈ V₂) (hdisj : Disjoint V₁ V₂)
    (hsem₁ : ∀ u ∈ V₁, ∀ v ∈ V₁, u ≠ v → D.Adj u v ∨ D.Adj v u)
    (hsem₂ : ∀ u ∈ V₂, ∀ v ∈ V₂, u ≠ v → D.Adj u v ∨ D.Adj v u)
    (h3 : digraph_is_k_strong D 3) {s t : V} (hs : s ∈ V₁) (ht : t ∈ V₂) (hst : s ≠ t) :
    ∃ p : List V,
      (digraph_is_directed_path D p s t ∨ digraph_is_directed_path D p t s) ∧ p.length ≤ 4
digraph_three_strong_co_bipartite_cross_short_path_avoidingIn LeanGraph Theory & Graph Algorithms

Same setting as the previous lemma (D 3-strong, V = V₁ ⊔ V₂ with each part semicomplete), plus a forbidden set A₀ with |A₀| + 4 ≤ |V|. The 3-strongness hypothesis is spelled out for paths avoiding A₀ as well: for every T with |T| < 3 and distinct u, v outside T ∪ A₀ there is a u→v path avoiding T ∪ A₀. Then for s ∈ V₁ and t ∈ V₂ outside A₀ with s ≠ t there is a path joining s and t in one of the two directions with at most 4 vertices, avoiding A₀ entirely.

theorem digraph_three_strong_co_bipartite_cross_short_path_avoiding {V : Type*} [Fintype V]
    (D : Digraph V) (V₁ V₂ : Set V) (hcover : ∀ v, v ∈ V₁ ∨ v ∈ V₂) (hdisj : Disjoint V₁ V₂)
    (hsem₁ : ∀ u ∈ V₁, ∀ v ∈ V₁, u ≠ v → D.Adj u v ∨ D.Adj v u)
    (hsem₂ : ∀ u ∈ V₂, ∀ v ∈ V₂, u ≠ v → D.Adj u v ∨ D.Adj v u)
    (A₀ : Finset V) (hbig : A₀.card + 4 ≤ Fintype.card V)
    (h3 : ∀ (T : Finset V), T.card < 3 → ∀ u v : V, u ∉ T → v ∉ T → u ∉ A₀ → v ∉ A₀ →
      u ≠ v → ∃ p : List V, digraph_is_directed_path D p u v ∧ (∀ x ∈ p, x ∉ T) ∧
        ∀ x ∈ p, x ∉ A₀)
    {s t : V} (hs : s ∈ V₁) (ht : t ∈ V₂) (hsa : s ∉ A₀) (hta : t ∉ A₀) (hst : s ≠ t) :
    ∃ p : List V,
      (digraph_is_directed_path D p s t ∨ digraph_is_directed_path D p t s) ∧
      p.length ≤ 4 ∧ ∀ x ∈ p, x ∉ A₀
digraph_three_strong_co_bipartite_small_part_cross_short_pathIn LeanGraph Theory & Graph Algorithms

Let D be 3-strong with V = V₁ ⊔ V₂, V₂ inducing a semicomplete subdigraph and V₁ having at most three vertices. Then for s ∈ V₁ and t ∈ V₂ with s ≠ t there is a directed path joining s and t in one of the two directions with at most 4 vertices.

theorem digraph_three_strong_co_bipartite_small_part_cross_short_path {V : Type*} [Fintype V]
    (D : Digraph V) (V₁ V₂ : Set V) (hcover : ∀ v, v ∈ V₁ ∨ v ∈ V₂) (hdisj : Disjoint V₁ V₂)
    (hsem₂ : ∀ u ∈ V₂, ∀ v ∈ V₂, u ≠ v → D.Adj u v ∨ D.Adj v u)
    (h3 : digraph_is_k_strong D 3) (hsmall : V₁.ncard ≤ 3) {s t : V} (hs : s ∈ V₁) (ht : t ∈ V₂)
    (hst : s ≠ t) :
    ∃ p : List V,
      (digraph_is_directed_path D p s t ∨ digraph_is_directed_path D p t s) ∧ p.length ≤ 4
digraph_twenty_cut_equality_forces_overlap_seventyIn LeanGraph Theory & Graph Algorithms

In an oriented graph, a seven-outregular two-cycle-free part whose outgoing cut has exactly twenty arcs forces common-predecessor overlap at least seventy, assuming the displayed published cycle and degree-sequence criteria.

theorem digraph_twenty_cut_equality_forces_overlap_seventy
    (α : Type) [Fintype α] [DecidableEq α] (D : Digraph α) [DecidableRel D.Adj]
    (B : Finset α) (hB : 7 ≤ B.card)
    (hori : ∀ u v, D.Adj u v → ¬ D.Adj v u)
    (hdeg : ∀ v ∈ B, (Finset.univ.filter fun w => D.Adj v w).card = 7)
    (hrobust : ∀ T : Finset α, T.Nonempty →
      (∀ v ∈ T, 2 ≤ (T.filter fun w => D.Adj v w).card) →
      (T.filter fun v => (T.filter fun w => D.Adj v w).card < 3).card ≤ 2 →
      ∃ c : Fin 2 → Finset α, (∀ i, c i ⊆ T ∧ digraph_directed_cycle_on D (c i)) ∧
        Pairwise (fun i j => Disjoint (c i) (c j)))
    (hseq1 : (∀ v ∈ B, 2 ≤ (B.filter fun w => D.Adj v w).card) →
      (B.filter fun v => (B.filter fun w => D.Adj v w).card < 4).card ≤ 3 →
      ∃ c : Fin 2 → Finset α, (∀ i, c i ⊆ B ∧ digraph_directed_cycle_on D (c i)) ∧ Pairwise (fun i j => Disjoint (c i) (c j)))
    (hseq2 : (∀ v ∈ B, 1 ≤ (B.filter fun w => D.Adj v w).card) →
      (B.filter fun v => (B.filter fun w => D.Adj v w).card < 3).card ≤ 1 →
      (B.filter fun v => (B.filter fun w => D.Adj v w).card < 4).card ≤ 4 →
      ∃ c : Fin 2 → Finset α, (∀ i, c i ⊆ B ∧ digraph_directed_cycle_on D (c i)) ∧ Pairwise (fun i j => Disjoint (c i) (c j)))
    (hseq3 : (∀ v ∈ B, 1 ≤ (B.filter fun w => D.Adj v w).card) →
      (B.filter fun v => (B.filter fun w => D.Adj v w).card < 4).card ≤ 2 →
      (B.filter fun v => (B.filter fun w => D.Adj v w).card < 5).card ≤ 6 →
      ∃ c : Fin 2 → Finset α, (∀ i, c i ⊆ B ∧ digraph_directed_cycle_on D (c i)) ∧ Pairwise (fun i j => Disjoint (c i) (c j)))
    (hrobust_all : ∀ (β : Type) [Fintype β] [DecidableEq β] [Nonempty β]
      (E : Digraph β) [DecidableRel E.Adj],
      (∀ v, ¬ E.Adj v v) →
      (∀ v, 2 ≤ (Finset.univ.filter fun w => E.Adj v w).card) →
      (Finset.univ.filter fun v => (Finset.univ.filter fun w => E.Adj v w).card < 3).card ≤ 2 →
      ∃ c : Fin 2 → Finset β, (∀ i, digraph_directed_cycle_on E (c i)) ∧ Pairwise (fun i j => Disjoint (c i) (c j)))
    (hsequence_all : ∀ (s : ℕ) (β : Type) [Fintype β] [DecidableEq β] [Nonempty β]
      (E : Digraph β) [DecidableRel E.Adj],
      1 ≤ s → 2 * s + 1 ≤ Fintype.card β →
      (∀ v, ¬ E.Adj v v) → (∀ v, 1 ≤ (Finset.univ.filter fun w => E.Adj v w).card) →
      (Finset.univ.filter fun v => (Finset.univ.filter fun w => E.Adj v w).card < s + 1).card ≤ s - 1 →
      (Finset.univ.filter fun v => (Finset.univ.filter fun w => E.Adj v w).card < s + 2).card ≤ 2 * s →
      ∃ c : Fin 2 → Finset β, (∀ i, digraph_directed_cycle_on E (c i)) ∧ Pairwise (fun i j => Disjoint (c i) (c j)))
    (hno : ¬ ∃ c : Fin 2 → Finset α, (∀ i, c i ⊆ B ∧ digraph_directed_cycle_on D (c i)) ∧ Pairwise (fun i j => Disjoint (c i) (c j)))
    (hcut : (∑ v ∈ B, (Bᶜ.filter fun w => D.Adj v w).card) = 20) :
    70 ≤ (∑ v : α, Nat.choose (Finset.univ.filter fun w => D.Adj v w).card 2) -
      (digraph_common_predecessor_graph D).edgeFinset.card
digraph_two_dominated_monoIn LeanGraph Theory & Graph Algorithms

If a vertex is 2-dominated by S and S is contained in T, then it is 2-dominated by T (the same witness u in S is used).

theorem digraph_two_dominated_mono {α : Type*} (D : Digraph α) {S T : Finset α} (hST : S ⊆ T) {v : α}
    (h : digraph_two_dominated D S v) : digraph_two_dominated D T v
digraph_two_dominated_singleton_of_no_outIn LeanGraph Theory & Graph Algorithms

If q has no out-neighbour in D, then the only vertex 2-dominated by the singleton {q} is q.

theorem digraph_two_dominated_singleton_of_no_out {α : Type*} (D : Digraph α) {q : α}
    (hq : ∀ y, ¬ D.Adj q y) (v : α) : digraph_two_dominated D {q} v ↔ v = q
digraph_two_mul_card_le_add_self_witnessIn LeanGraph Theory & Graph Algorithms

For any finite vertex type α, any finite set Q and any injective f from the members of Q to α, twice the cardinality of Q is at most the cardinality of α plus the number of members q of Q with f q again in Q.

theorem digraph_two_mul_card_le_add_self_witness {α : Type} [Fintype α] [DecidableEq α]
    (Q : Finset α) (f : {q // q ∈ Q} → α) (hinj : Function.Injective f) :
    2 * Q.card ≤ Fintype.card α + (Finset.univ.filter (fun q : {q // q ∈ Q} => f q ∈ Q)).card
digraph_unilaterally_two_linked_of_cross_short_pathIn LeanGraph Theory & Graph Algorithms

Let D be a 5-strong digraph whose vertices are covered by two sets V₁, V₂ each inducing a semicomplete subdigraph. Suppose moreover that for every set A₀ of at most 2 vertices and every s ∈ V₁, t ∈ V₂ outside A₀ with s ≠ t, some path of at most 4 vertices joins s and t in one of the two directions while avoiding A₀. Then D is unilaterally 2-linked.

theorem digraph_unilaterally_two_linked_of_cross_short_path {V : Type*} [Fintype V]
    (D : Digraph V) (hstrong : digraph_is_k_strong D 5)
    (V₁ V₂ : Set V) (hcover : ∀ v, v ∈ V₁ ∨ v ∈ V₂)
    (hsem₁ : ∀ u ∈ V₁, ∀ v ∈ V₁, u ≠ v → D.Adj u v ∨ D.Adj v u)
    (hsem₂ : ∀ u ∈ V₂, ∀ v ∈ V₂, u ≠ v → D.Adj u v ∨ D.Adj v u)
    (hshort : ∀ (A₀ : Finset V), A₀.card ≤ 2 → A₀.card + 4 ≤ Fintype.card V →
      ∀ s t : V, s ∈ V₁ → t ∈ V₂ → s ∉ A₀ → t ∉ A₀ → s ≠ t →
      ∃ p : List V, (digraph_is_directed_path D p s t ∨ digraph_is_directed_path D p t s) ∧
        p.length ≤ 4 ∧ ∀ x ∈ p, x ∉ A₀) :
    digraph_is_unilaterally_two_linked D
dist_common_neighbor_eq_succIn LeanGraph Theory & Graph Algorithms

If d(v,q) = d(v,p) + 2 and z is adjacent to both p and q, then d(v,z) = d(v,p) + 1.

theorem dist_common_neighbor_eq_succ {V : Type*} (G : SimpleGraph V)
    {v p q z : V} (hvq : G.dist v q = G.dist v p + 2)
    (hzp : G.Adj z p) (hzq : G.Adj z q) :
    G.dist v z = G.dist v p + 1
dist_two_graph_adj_iffIn LeanGraph Theory & Graph Algorithms

Two vertices are adjacent in the square of G exactly when they are distinct and are either adjacent in G or have a common neighbour in G; in particular every edge of G is an edge of its square.

theorem dist_two_graph_adj_iff {V : Type} (G : SimpleGraph V) (a b : V) :
    (dist_two_graph G).Adj a b ↔
      a ≠ b ∧ (G.Adj a b ∨ ∃ c, G.Adj a c ∧ G.Adj b c) ∧ (G.Adj a b ∨ ∃ c, G.Adj a c ∧ G.Adj c b)
dist_two_graph_degree_le_fourIn LeanGraph Theory & Graph Algorithms

If every vertex of a finite simple graph G has degree at most 2, then in the graph joining vertices at distance 1 or 2 every vertex has degree at most 4.

theorem dist_two_graph_degree_le_four {V : Type} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hdeg : ∀ v, G.degree v ≤ 2) (v : V) :
    (dist_two_graph G).degree v ≤ 4
distance_hereditary_induceIn LeanGraph Theory & Graph Algorithms

Every induced subgraph of a distance-hereditary graph is distance-hereditary.

theorem distance_hereditary_induce {α : Type*} (F : SimpleGraph α) (hF : is_distance_hereditary F)
    (s : Set α) : is_distance_hereditary (SimpleGraph.induce s F)
distance_hereditary_no_chordless_cycle_ge_fiveIn LeanGraph Theory & Graph Algorithms

A distance-hereditary graph has no chordless cycle of length at least 5.

theorem distance_hereditary_no_chordless_cycle_ge_five {α : Type*} (F : SimpleGraph α)
    (hF : is_distance_hereditary F) {v : α} {c : F.Walk v v}
    (hc : c.IsCycle) (hch : c.IsChordless) : c.length ≤ 4
distance_hereditary_pendant_or_twinIn LeanGraph Theory & Graph Algorithms

Every finite distance-hereditary graph with at least two vertices has a pendant vertex, or a pair of false twins (equal neighbourhoods), or a pair of true twins (neighbourhoods equal after adding the vertex itself).

theorem distance_hereditary_pendant_or_twin {α : Type*} [Fintype α] (F : SimpleGraph α)
    (hF : is_distance_hereditary F) (h2 : 2 ≤ Fintype.card α) :
    (∃ v : α, Nat.card ↥(F.neighborSet v) = 1) ∨
    (∃ u v : α, u ≠ v ∧ F.neighborSet u = F.neighborSet v) ∨
    (∃ u v : α, u ≠ v ∧ F.neighborSet u ∪ {u} = F.neighborSet v ∪ {v})
distance_regular_c_zeroIn LeanGraph Theory & Graph Algorithms

In a distance-regular graph of diameter d > 0 with intersection parameters (b, c), we have c(0) = 1.

theorem distance_regular_c_zero {V : Type*} (G : SimpleGraph V) (d : ℕ)
    (b c : Fin d → ℕ) (hG : is_distance_regular_with G d b c) (hd : 0 < d)
    (u v : V) (h : G.dist u v = 1) : c ⟨0, hd⟩ = 1
distance_regular_card_geodesics_eq_prodIn LeanGraph Theory & Graph Algorithms

In any distance-regular graph G with parameters d, b, c, for every index i : Fin d and any vertices u, v with dist(u, v) = i + 1, the number of geodesics between u and v is equal to the product of c(j) for all j ≤ i.

theorem distance_regular_card_geodesics_eq_prod {V : Type*} [Fintype V]
    (G : SimpleGraph V) (d : ℕ) (b c : Fin d → ℕ)
    (hG : is_distance_regular_with G d b c) (i : Fin d)
    (u v : V) (hdist : G.dist u v = i.val + 1) :
    Nat.card {p : G.Walk u v // is_geodesic p} = ∏ j ∈ Finset.Iic i, c j
dominating_average_star_like_vertex_stability_of_not_star_likeIn LeanGraph Theory & Graph Algorithms

If G has n ≥ 2 vertices, no isolated vertex, and G is not star-like, then 5 d_*(G) ≤ 51 (2n/3 - avd(G)).

theorem dominating_average_star_like_vertex_stability_of_not_star_like {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (hn : 2 ≤ Fintype.card V) (hiso : ∀ w, 0 < G.degree w) (hnot : ¬ simple_graph_is_star_like G) : 5 * (simple_graph_star_like_deletion_number G : ℚ) ≤ 51 * (2 * (Fintype.card V : ℚ) / 3 - simple_graph_avg_dominating_order G)
edge_finset_is_edge_geodesic_transversalIn LeanGraph Theory & Graph Algorithms

In a finite simple graph in which every vertex has a neighbour, the set of all edges is an edge geodesic transversal. In particular a finite edge geodesic transversal exists.

theorem edge_finset_is_edge_geodesic_transversal {V : Type*} [Fintype V] (G : SimpleGraph V)
    [DecidableRel G.Adj] (hne : ∀ v, ∃ w, G.Adj v w) :
    is_edge_geodesic_transversal G G.edgeFinset
edge_geodesic_transversal_bound_of_edge_disjoint_finiteIn LeanGraph Theory & Graph Algorithms

Let G be a connected finite simple graph in which every vertex has a neighbour. If G contains k mutually edge-disjoint maximal geodesics, then the edge geodesic transversal number of G is at least k.

theorem edge_geodesic_transversal_bound_of_edge_disjoint_finite {V : Type*} [Fintype V] (G : SimpleGraph V)
    [DecidableRel G.Adj] (hG : G.Connected) (hne : ∀ v, ∃ w, G.Adj v w) (k : ℕ)
    (h_disj : ∃ (u v : Fin k → V) (P : (i : Fin k) → G.Walk (u i) (v i)),
      (∀ i, is_maximal_geodesic (P i)) ∧
      ∀ (i j : Fin k), i ≠ j → ∀ e ∈ (P i).edges, e ∉ (P j).edges) :
    k ≤ edge_geodesic_transversal_number G
edge_geodesic_transversal_card_ge_of_edge_disjoint_maximal_geodesicsIn LeanGraph Theory & Graph Algorithms

Let G be a simple graph and S a finite edge geodesic transversal of G. If G contains k mutually edge-disjoint maximal geodesics, then S has at least k edges.

theorem edge_geodesic_transversal_card_ge_of_edge_disjoint_maximal_geodesics {V : Type*} (G : SimpleGraph V)
    (k : ℕ) (S : Finset (Sym2 V)) (hS : is_edge_geodesic_transversal G S)
    (h_disj : ∃ (u v : Fin k → V) (P : (i : Fin k) → G.Walk (u i) (v i)),
      (∀ i, is_maximal_geodesic (P i)) ∧
      ∀ (i j : Fin k), i ≠ j → ∀ e ∈ (P i).edges, e ∉ (P j).edges) :
    k ≤ S.card
edge_geodesic_transversal_number_ge_of_edge_disjoint_maximal_geodesicsIn LeanGraph Theory & Graph Algorithms

Let G be a simple graph that admits at least one finite edge geodesic transversal. If G contains k mutually edge-disjoint maximal geodesics, then the edge geodesic transversal number of G is at least k.

theorem edge_geodesic_transversal_number_ge_of_edge_disjoint_maximal_geodesics {V : Type*} (G : SimpleGraph V)
    (k : ℕ) (hT : ∃ S : Finset (Sym2 V), is_edge_geodesic_transversal G S)
    (h_disj : ∃ (u v : Fin k → V) (P : (i : Fin k) → G.Walk (u i) (v i)),
      (∀ i, is_maximal_geodesic (P i)) ∧
      ∀ (i j : Fin k), i ≠ j → ∀ e ∈ (P i).edges, e ∉ (P j).edges) :
    k ≤ edge_geodesic_transversal_number G
edge_hitting_all_shortest_paths_card_geIn LeanGraph Theory & Graph Algorithms

In a connected finite simple graph G, any edge set F that meets every geodesic (shortest path) between every two distinct vertices of a set U with 2 ≤ |U| has at least |U| - 1 edges. This is the pure-graph core (OP-641) of the corona lower bound: the corona target follows from it via the corona bookkeeping lemmas, and conversely it follows from the corona target (take the corona of G and the transversal F together with all pendant edges but one), so it is exactly as hard as the parent node.

theorem edge_hitting_all_shortest_paths_card_ge
    {V : Type*} [Fintype V] (G : SimpleGraph V) (hG : G.Connected)
    (U : Finset V) (hU : 2 ≤ U.card) (F : Finset (Sym2 V))
    (hF : ∀ e ∈ F, e ∈ G.edgeSet)
    (h : ∀ u ∈ U, ∀ v ∈ U, u ≠ v → ∀ p : G.Walk u v,
      p.IsPath → p.length = G.dist u v → ∃ e ∈ F, e ∈ p.edges) :
    U.card - 1 ≤ F.card
edge_hitting_all_shortest_paths_card_ge_of_isTreeIn LeanGraph Theory & Graph Algorithms

The edge-hitting bound holds for trees: if G is a tree and F meets every geodesic between distinct vertices of a set U with 2 ≤ |U|, then |U| - 1 ≤ |F|.

theorem edge_hitting_all_shortest_paths_card_ge_of_isTree
    {V : Type*} [Fintype V] (G : SimpleGraph V) (hG : G.IsTree)
    (U : Finset V) (hU : 2 ≤ U.card) (F : Finset (Sym2 V))
    (hF : ∀ e ∈ F, e ∈ G.edgeSet)
    (h : ∀ u ∈ U, ∀ v ∈ U, u ≠ v → ∀ p : G.Walk u v,
      p.IsPath → p.length = G.dist u v → ∃ e ∈ F, e ∈ p.edges) :
    U.card - 1 ≤ F.card
edge_rotation_quadratic_form_differenceIn LeanGraph Theory & Graph Algorithms

For an edge vw of a finite simple graph X and a vertex u with u ≠ w and u not adjacent to w, the quadratic form of the rotated graph X' = X - vw + uw at any real vector x equals the quadratic form of X at x plus 2(x u - x v)(x w).

attribute [local instance] Classical.propDecidable in
theorem edge_rotation_quadratic_form_difference
    {V : Type*} [Fintype V] [DecidableEq V]
    (X : SimpleGraph V) (u v w : V) (he : X.Adj v w) (huw : ¬ X.Adj u w) (huv : u ≠ w)
    (x : V → ℝ) :
    (∑ i, x i * Matrix.mulVec ((X.deleteEdges {s(v, w)} ⊔
        SimpleGraph.fromEdgeSet {s(u, w)}).adjMatrix ℝ) x i)
      - (∑ i, x i * Matrix.mulVec (X.adjMatrix ℝ) x i)
      = 2 * (x u - x v) * x w
edge_rotation_spectral_radius_gtIn LeanGraph Theory & Graph Algorithms

Let X be a connected simple graph on a finite vertex type V, with edge vw, and let u be a vertex distinct from w and not adjacent to w. If vec is a Perron vector of X with vec v ≤ vec u, then replacing edge vw with uw yields a graph with strictly greater adjacency spectral radius.

theorem edge_rotation_spectral_radius_gt
    {V : Type*} [Fintype V] [DecidableEq V]
    (X : SimpleGraph V) (hX : X.Connected)
    (u v w : V) (he : X.Adj v w) (huw : ¬ X.Adj u w) (huv : u ≠ w)
    (vec : V → ℝ) (hvec : is_perron_vector X vec) (huv_le : vec v ≤ vec u) :
    adjacency_spectral_radius X <
      adjacency_spectral_radius (X.deleteEdges {s(v, w)} ⊔ SimpleGraph.fromEdgeSet {s(u, w)})
edge_rotation_strict_gain_vectorIn LeanGraph Theory & Graph Algorithms

Let X be a finite simple graph with edge vw, u ≠ w a vertex not adjacent to w, and vec a Perron vector of X with vec v ≤ vec u. Then some vector of positive squared length has Rayleigh quotient in the rotated graph X - vw + uw strictly greater than the spectral radius of X.

attribute [local instance] Classical.propDecidable in
theorem edge_rotation_strict_gain_vector
    {V : Type*} [Fintype V] [DecidableEq V]
    (X : SimpleGraph V) (u v w : V) (he : X.Adj v w) (huw : ¬ X.Adj u w) (huv : u ≠ w)
    (vec : V → ℝ) (hvec : is_perron_vector X vec) (hle : vec v ≤ vec u) :
    ∃ x : V → ℝ, 0 < ∑ i, x i ^ 2 ∧
      (adjacency_spectral_radius X).toReal <
        (∑ i, x i * Matrix.mulVec ((X.deleteEdges {s(v, w)} ⊔
          SimpleGraph.fromEdgeSet {s(u, w)}).adjMatrix ℝ) x i) /
          (∑ i, x i ^ 2)
even_degree_edgeFinset_card_le_twoIn LeanGraph Theory & Graph Algorithms

A finite simple graph all of whose vertex degrees are even cannot have exactly one or two edges; if it has at most two edges it is empty.

theorem even_degree_edgeFinset_card_le_two
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (hGeven : ∀ v, Even (G.degree v))
    (hcard : G.edgeFinset.card ≤ 2) :
    G.edgeFinset.card = 0
exists_adj_of_gamma_ve_induce_eq_pend_ve_num_succIn LeanGraph Theory & Graph Algorithms

If gamma_ve(G[A]) = a_C + 1 then v has a neighbour in A (otherwise A ∪ {v} is a disjoint union and a_C = gamma_ve(G[A]), contradicting the strict inequality).

lemma exists_adj_of_gamma_ve_induce_eq_pend_ve_num_succ {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (A : Set V) [Fintype ↥A] (v : V) (hvA : v ∉ A)
    (h : gamma_ve (G.induce A) = pend_ve_num G A v + 1) :
    ∃ x ∈ A, G.Adj v x
exists_claw_free_minimal_3_factor_critical_type_ii_edgeIn LeanGraph Theory & Graph Algorithms

There exists a finite simple graph G in universe u with decidable equality and adjacency, and adjacent vertices u and v of degree at least 5, such that G is claw-free, minimal 3-factor-critical, and uv is a type II edge with parameter 3.

theorem exists_claw_free_minimal_3_factor_critical_type_ii_edge.{u} :
    ∃ (V : Type u) (_ : Fintype V) (_ : DecidableEq V) (G : SimpleGraph V) (_ : DecidableRel G.Adj)
      (u v : V) (he : G.Adj u v) (hu : 5 ≤ G.degree u) (hv : 5 ≤ G.degree v),
      IsClawFree G ∧ is_minimal_k_factor_critical G 3 ∧ is_type_ii_edge G u v 3
exists_diameter_two_four_chromatic_not_mutual_visibility_colorable_threeIn LeanGraph Theory & Graph Algorithms

There is a finite connected simple graph of diameter 2 that is 4-colourable but not 3-colourable and is not mutual-visibility 3-colourable.

theorem exists_diameter_two_four_chromatic_not_mutual_visibility_colorable_three :
    ∃ (V : Type) (_ : Fintype V) (G : SimpleGraph V),
      G.Connected ∧ G.diam = 2 ∧ G.Colorable 4 ∧ ¬ G.Colorable 3 ∧
      ¬ graph_is_mutual_visibility_colorable G 3
exists_diameter_two_mv_chromatic_number_four_of_witnessIn LeanGraph Theory & Graph Algorithms

If there is a finite connected simple graph of diameter 2 that is 4-colourable, not 3-colourable and not mutual-visibility 3-colourable, then there is a finite connected simple graph G of diameter 2 with mutual-visibility chromatic number 4 and chromatic number 4.

theorem exists_diameter_two_mv_chromatic_number_four_of_witness
    (h : ∃ (W : Type) (_ : Fintype W) (H : SimpleGraph W),
      H.Connected ∧ H.diam = 2 ∧ H.Colorable 4 ∧ ¬ H.Colorable 3 ∧
      ¬ graph_is_mutual_visibility_colorable H 3) :
    ∃ (V : Type) (_ : Fintype V) (G : SimpleGraph V) (_ : DecidableRel G.Adj),
      G.Connected ∧ G.diam = 2 ∧
      graph_mutual_visibility_chromatic_number G = 4 ∧ G.chromaticNumber = 4
exists_dist_three_cut_potential_witnessIn LeanGraph Theory & Graph Algorithms

Sharp cut certificate: in the regime |E(X,Xᶜ)| < δ(G) there are vertices x, y with d(x,y) = 3 and a 1-Lipschitz potential f with f(x) − f(y) = 3 whose neighbourhood averages satisfy 3 − A_x + A_y ≤ 2|E(X,Xᶜ)|/δ(G).

theorem exists_dist_three_cut_potential_witness
    {V : Type} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hG : G.Connected) (hd : 3 ≤ G.diam) (X : Finset V)
    (hX1 : X.Nonempty) (hX2 : (Xᶜ : Finset V).Nonempty)
    (hk : (G.edgeFinset.filter (fun e => ∃ u ∈ X, ∃ v ∈ (Xᶜ : Finset V), e = s(u, v))).card
      < G.minDegree) :
    ∃ (x y : V) (f : V → ℝ), G.dist x y = 3 ∧
      (∀ a b : V, f a - f b ≤ (G.dist a b : ℝ)) ∧
      f x - f y = 3 ∧
      (3 - (∑ a ∈ G.neighborFinset x, f a) / (G.degree x : ℝ)
        + (∑ b ∈ G.neighborFinset y, f b) / (G.degree y : ℝ))
        ≤ 2 * ((G.edgeFinset.filter (fun e => ∃ u ∈ X, ∃ v ∈ (Xᶜ : Finset V), e = s(u, v))).card : ℝ) /
            (G.minDegree : ℝ)
exists_dist_three_lly_curvature_le_cutIn LeanGraph Theory & Graph Algorithms

For any finite connected graph G with diameter at least 3 and any non-trivial vertex cut (X, X^c), κ_LLY^(3)(G) ≤ 2 |E(X, X^c)| / (3 δ(G)).

theorem exists_dist_three_lly_curvature_le_cut
    {V : Type} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hG : G.Connected) (hd : 3 ≤ G.diam) (X : Finset V)
    (hX1 : X.Nonempty) (hX2 : (Xᶜ : Finset V).Nonempty) :
    graph_lly_curvature_lower_bound G 3 ≤
      (2 * ((G.edgeFinset.filter (fun e => ∃ u ∈ X, ∃ v ∈ (Xᶜ : Finset V), e = s(u, v))).card : ℝ)) /
        (3 * (G.minDegree : ℝ))
exists_dominated_vertex_of_false_twinsIn LeanGraph Theory & Graph Algorithms

If u and v are distinct vertices in a simple graph with identical open neighbourhoods, then v is dominated by u.

theorem exists_dominated_vertex_of_false_twins {α : Type*} (F : SimpleGraph α) (u v : α)
    (huv : u ≠ v) (h : F.neighborSet u = F.neighborSet v) :
    ∃ u' : α, u' ≠ v ∧ F.neighborSet v ⊆ F.neighborSet u' ∪ {u'}
exists_dominated_vertex_of_pendantIn LeanGraph Theory & Graph Algorithms

If a vertex v in a simple graph F has exactly one neighbour u, then u is distinct from v and the neighbourhood of v is contained in N(u) ∪ {u}.

theorem exists_dominated_vertex_of_pendant {α : Type*} (F : SimpleGraph α) (v : α)
    (hv : Nat.card ↥(F.neighborSet v) = 1) :
    ∃ u : α, u ≠ v ∧ F.neighborSet v ⊆ F.neighborSet u ∪ {u}
exists_dominated_vertex_of_pendant_or_twinIn LeanGraph Theory & Graph Algorithms

If a graph has a pendant vertex, or a pair of false twins, or a pair of true twins, then it has a vertex v dominated by another vertex u, i.e. N(v) ⊆ N(u) ∪ {u} with u ≠ v.

theorem exists_dominated_vertex_of_pendant_or_twin {α : Type*} (F : SimpleGraph α)
    (h : (∃ v : α, Nat.card ↥(F.neighborSet v) = 1) ∨
         (∃ u v : α, u ≠ v ∧ F.neighborSet u = F.neighborSet v) ∨
         (∃ u v : α, u ≠ v ∧ F.neighborSet u ∪ {u} = F.neighborSet v ∪ {v})) :
    ∃ u v : α, u ≠ v ∧ F.neighborSet v ⊆ F.neighborSet u ∪ {u}
exists_index_pend_delta_eq_oneIn LeanGraph Theory & Graph Algorithms

If b_i - a_i ∈ {0,1} for all i and the b_i sum to one more than the a_i, then some b_i exceeds a_i by exactly one.

lemma exists_index_pend_delta_eq_one {ι : Type*} [Fintype ι] (b a : ι → ℕ)
    (hsum : ∑ i, b i = 1 + ∑ i, a i) (hle : ∀ i, a i ≤ b i) (hdelta : ∀ i, b i ≤ a i + 1) :
    ∃ i, b i = a i + 1
exists_pend_ve_num_eq_gamma_ve_add_oneIn LeanGraph Theory & Graph Algorithms

Under the hypotheses gamma_ve(G - v) = gamma_ve(G), gamma_ve(G) = 1 + sum of a_C, and a_C ≤ b_C ≤ a_C + 1 for every component, there is a component C with b_C = a_C + 1.

theorem exists_pend_ve_num_eq_gamma_ve_add_one {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (v : V)
    [Fintype ↥({v}ᶜ : Set V)]
    [∀ C : (G.induce ({v}ᶜ : Set V)).ConnectedComponent, Fintype ↥(ve_comp_part G v C)]
    (hgamma : gamma_ve (G.induce ({v}ᶜ : Set V)) = gamma_ve G)
    (hsum : gamma_ve G = 1 + ∑ C : (G.induce ({v}ᶜ : Set V)).ConnectedComponent,
      pend_ve_num G (ve_comp_part G v C) v)
    (hbound : ∀ C : (G.induce ({v}ᶜ : Set V)).ConnectedComponent,
      gamma_ve (G.induce (ve_comp_part G v C)) ≤ pend_ve_num G (ve_comp_part G v C) v + 1) :
    ∃ C : (G.induce ({v}ᶜ : Set V)).ConnectedComponent,
      gamma_ve (G.induce (ve_comp_part G v C)) = pend_ve_num G (ve_comp_part G v C) v + 1
exists_three_universal_tournament_fourIn LeanGraph Theory & Graph Algorithms

There exists a 3-universal tournament on 4 vertices.

theorem exists_three_universal_tournament_four :
    ∃ (T : Digraph (Fin 4)), digraph_is_tournament T ∧ tournament_is_universal 3 T
exists_unique_ve_comp_partIn LeanGraph Theory & Graph Algorithms

Every vertex different from v lies in exactly one component part of G - v.

lemma exists_unique_ve_comp_part {V : Type*} (G : SimpleGraph V) (v : V) {x : V} (hx : x ≠ v) :
    ∃! C : (G.induce ({v}ᶜ : Set V)).ConnectedComponent, x ∈ ve_comp_part G v C
exists_ve_dominates_inside_card_eq_gamma_ve_induceIn LeanGraph Theory & Graph Algorithms

Every vertex set A has a set S contained in A, ve-dominating all edges of G with both endpoints in A, with |S| = gamma_ve(G[A]).

lemma exists_ve_dominates_inside_card_eq_gamma_ve_induce {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (A : Set V) [Fintype ↥A] :
    ∃ S : Finset V, (S : Set V) ⊆ A ∧ ve_dominates_inside G (S : Set V) A ∧
      S.card = gamma_ve (G.induce A)
exists_ve_dominating_card_eq_gamma_veIn LeanGraph Theory & Graph Algorithms

Every finite simple graph has a vertex-edge dominating set whose cardinality is exactly gamma_ve(G).

lemma exists_ve_dominating_card_eq_gamma_ve {V : Type*} [Fintype V] (G : SimpleGraph V) :
    ∃ S : Finset V, is_ve_dominating G (S : Set V) ∧ S.card = gamma_ve G
exists_ve_dominating_card_eq_gamma_ve_avoidingIn LeanGraph Theory & Graph Algorithms

If gamma_ve(G - v) = gamma_ve(G), the components C of G - v have pendant parameters with gamma_ve(G[C]) = a_C + 1 for one C, and the unique neighbour u in C is as given, then G has a minimum vertex-edge dominating set avoiding v.

theorem exists_ve_dominating_card_eq_gamma_ve_avoiding {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (v : V)
    [Fintype ↥({v}ᶜ : Set V)]
    [∀ C : (G.induce ({v}ᶜ : Set V)).ConnectedComponent, Fintype ↥(ve_comp_part G v C)]
    (hgamma : gamma_ve (G.induce ({v}ᶜ : Set V)) = gamma_ve G)
    (C : (G.induce ({v}ᶜ : Set V)).ConnectedComponent) (u : V)
    (hadj : G.Adj v u) (humem : u ∈ ve_comp_part G v C)
    (huniq : ∀ x : V, x ∈ ve_comp_part G v C → G.Adj v x → x = u)
    (heq : gamma_ve (G.induce (ve_comp_part G v C)) = pend_ve_num G (ve_comp_part G v C) v + 1) :
    ∃ S : Finset V, is_ve_dominating G (S : Set V) ∧ S.card = gamma_ve G ∧ v ∉ S
exposed_singleton_new_pair_is_fortIn LeanGraph Theory & Graph Algorithms

In any finite graph rooted at r, if singleton t is root-exposed, singletons p and q are not, and the pair p,q is root-exposed, then t,p,q form a fort.

theorem exposed_singleton_new_pair_is_fort {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (r t p q : V) (htp : t ≠ p) (htq : t ≠ q) (hpq : p ≠ q) (ht : zero_forcing_root_exposed_fort G r ({t} : Finset V)) (hp : ¬ zero_forcing_root_exposed_fort G r ({p} : Finset V)) (hq : ¬ zero_forcing_root_exposed_fort G r ({q} : Finset V)) (hpair : zero_forcing_root_exposed_fort G r ({p,q} : Finset V)) : simple_graph_is_fort G ({t,p,q} : Set V)
fall_coloring_eq_of_eq_neighborSetIn LeanGraph Theory & Graph Algorithms

In a fall colouring with three colours, two vertices with the same open neighbourhood receive the same colour.

theorem fall_coloring_eq_of_eq_neighborSet {V α : Type*} [Fintype α] (hα : Fintype.card α = 3)
    {G : SimpleGraph V} (c : G.Coloring α)
    (hc : ∀ v, ⇑c '' insert v (G.neighborSet v) = Set.univ)
    {v w : V} (h : G.neighborSet v = G.neighborSet w) : c v = c w
fall_coloring_neighbor_image_eq_complIn LeanGraph Theory & Graph Algorithms

If a proper colouring c of G with a 3-element colour type is a fall colouring (every closed neighbourhood shows all colours), then for every vertex v the colours appearing on the open neighbourhood of v are exactly the colours other than c v.

theorem fall_coloring_neighbor_image_eq_compl {V α : Type*} [Fintype α] (hα : Fintype.card α = 3)
    {G : SimpleGraph V} (c : G.Coloring α)
    (hc : ∀ v, ⇑c '' insert v (G.neighborSet v) = Set.univ) (v : V) :
    ⇑c '' G.neighborSet v = {c v}ᶜ
fin3_eq_of_ne_of_neIn LeanGraph Theory & Graph Algorithms

Two elements of a 3-element set that both avoid two given distinct elements a ≠ b must be equal.

theorem fin3_eq_of_ne_of_ne {a b w w' : Fin 3} (hab : a ≠ b) (h1 : w ≠ a) (h2 : w ≠ b)
    (h3 : w' ≠ a) (h4 : w' ≠ b) : w = w'
fin3_pair_eq_complIn LeanGraph Theory & Graph Algorithms

If a two-element subset {x,y} of a 3-element set is the complement of the singleton {z}, then x ≠ y.

theorem fin3_pair_eq_compl {x y z : Fin 3} (h : ({x, y} : Set (Fin 3)) = {z}ᶜ) : x ≠ y
fin_sub_val_eq_one_iffIn LeanGraph Theory & Graph Algorithms

For n ≥ 2 and a, b : Fin n, the value of the difference a - b is 1 exactly when a.val = b.val + 1, or a.val = 0 and b.val = n - 1 (the wraparound case).

theorem fin_sub_val_eq_one_iff {n : ℕ} (hn : 2 ≤ n) (a b : Fin n) :
    (a - b).val = 1 ↔ a.val = b.val + 1 ∨ (a.val = 0 ∧ b.val = n - 1)
finite_binary_three_packing_exists_line_free_independent_tripleIn LeanGraph Theory & Graph Algorithms

In a finite binary geometry with a maximal 3-packing P having at most 1 singly forced point per line, there exists a 3-point independent set in the conflict graph on the packing support that is line-free and avoids all singly forced points.

theorem finite_binary_three_packing_exists_line_free_independent_triple
    (n : ℕ) (S : Finset (Fin n → ZMod 2))
    (F P : Finset (Finset (Fin n → ZMod 2)))
    (hzero : 0 ∉ S)
    (hF : ∀ t : Finset (Fin n → ZMod 2),
      t ∈ F ↔ t ⊆ S ∧ t.card = 3 ∧ t.sum id = 0)
    (hsub : P ⊆ F) (hPcard : P.card = 3)
    (hpack : (P : Set (Finset (Fin n → ZMod 2))).Pairwise Disjoint)
    (hmaximal : ∀ t ∈ F, ¬ Disjoint (P.biUnion id) t)
    (hforced : ∀ p ∈ P,
      (((F.filter (fun t => (t ∩ P.biUnion id).card = 1)).biUnion id) ∩ p).card ≤ 1) :
    ∃ I : Finset (Fin n → ZMod 2),
      I ⊆ P.biUnion id ∧ I.card = 3 ∧
      (∀ t ∈ F, (t ∩ P.biUnion id).card = 1 → Disjoint I t) ∧
      (∀ x ∈ I, ∀ y ∈ I, x ≠ y → x + y ∉ S \ P.biUnion id) ∧
      (∀ t ∈ F, ¬ t ⊆ I)
finite_binary_three_packing_supported_coverIn LeanGraph Theory & Graph Algorithms

In any finite binary geometry, if three pairwise disjoint lines form a maximal packing and at most one point on each line is singly forced relative to the packing support, there is a six-point cover contained in that support.

theorem finite_binary_three_packing_supported_cover
    (n : ℕ) (S : Finset (Fin n → ZMod 2))
    (F P : Finset (Finset (Fin n → ZMod 2)))
    (hzero : 0 ∉ S)
    (hF : ∀ t : Finset (Fin n → ZMod 2),
      t ∈ F ↔ t ⊆ S ∧ t.card = 3 ∧ t.sum id = 0)
    (hsub : P ⊆ F) (hPcard : P.card = 3)
    (hpack : (P : Set (Finset (Fin n → ZMod 2))).Pairwise Disjoint)
    (hmaximal : ∀ t ∈ F, ¬ Disjoint (P.biUnion id) t)
    (hforced : ∀ p ∈ P,
      (((F.filter (fun t => (t ∩ P.biUnion id).card = 1)).biUnion id) ∩ p).card ≤ 1) :
    ∃ C : Finset (Fin n → ZMod 2), C ⊆ P.biUnion id ∧ C.card ≤ 6 ∧
      ∀ t ∈ F, ¬ Disjoint C t
finite_family_lexicographic_cover_two_private_setsIn LeanGraph Theory & Graph Algorithms

Let H be a cover of a finite set family. If C minimizes cover size and, subject to that, minimizes its number of points outside H, then every point in C outside H is the unique C-point of at least two distinct family members.

theorem finite_family_lexicographic_cover_two_private_sets
    {α : Type*} [DecidableEq α] (F : Finset (Finset α)) (H C : Finset α)
    (hH : ∀ t ∈ F, ¬ Disjoint H t)
    (hC : ∀ t ∈ F, ¬ Disjoint C t)
    (hlex : ∀ D : Finset α, (∀ t ∈ F, ¬ Disjoint D t) →
      C.card ≤ D.card ∧ (D.card = C.card → (C \ H).card ≤ (D \ H).card)) :
    ∀ x ∈ C \ H, ∃ A ∈ F, ∃ B ∈ F,
      A ≠ B ∧ A ∩ C = {x} ∧ B ∩ C = {x}
finite_vertex_set_edge_encoding_cardIn LeanGraph Theory & Graph Algorithms

A finite vertex set of size n spans exactly C(n,2) non-diagonal unordered pairs.

theorem finite_vertex_set_edge_encoding_card {V : Type*} [DecidableEq V] (s : Finset V) :
    (finite_vertex_set_edge_encoding s).card = s.card.choose 2
finset_exists_injective_fin_of_cardIn LeanGraph Theory & Graph Algorithms

Given a finite set Q of vertices, a vertex q in Q, and natural numbers 1 ≤ s ≤ |Q|, there is an injective s-tuple of vertices all drawn from Q whose first entry is q.

theorem finset_exists_injective_fin_of_card {V : Type*} [DecidableEq V] {Q : Finset V} {q : V} (hq : q ∈ Q)
    {s : ℕ} (hs : 0 < s) (hcard : s ≤ Q.card) :
    ∃ f : Fin s → V, Function.Injective f ∧ f ⟨0, hs⟩ = q ∧ ∀ i, f i ∈ Q
finset_prod_Iic_fin_succIn LeanGraph Theory & Graph Algorithms

For c : Fin d → ℕ and indices i, ip : Fin d with i.val = ip.val + 1, the product of c over Iic i equals the product over Iic ip times c i.

theorem finset_prod_Iic_fin_succ {d : ℕ} (c : Fin d → ℕ) (ip i : Fin d)
    (hs : i.val = ip.val + 1) :
    ∏ j ∈ Finset.Iic i, c j = (∏ j ∈ Finset.Iic ip, c j) * c i
finset_sum_desc_factorial_threeIn LeanGraph Theory & Graph Algorithms

For any finite set s and real-valued function X on s, the third falling factorial (sum X)_3 = (sum X)(sum X - 1)(sum X - 2) expands into the sum of (X_b)_3 over s, plus 3 times the sum of (X_a)_2 * X_b over distinct pairs (a,b), plus the sum of X_a * X_b * X_c over distinct triples (a,b,c).

theorem finset_sum_desc_factorial_three {β : Type*} [DecidableEq β] (s : Finset β) (X : β → ℝ) :
  (∑ b ∈ s, X b) * ((∑ b ∈ s, X b) - 1) * ((∑ b ∈ s, X b) - 2) =
    (∑ b ∈ s, X b * (X b - 1) * (X b - 2)) +
    3 * (∑ a ∈ s, ∑ b ∈ s \ {a}, X a * (X a - 1) * X b) +
    (∑ a ∈ s, ∑ b ∈ s \ {a}, ∑ c ∈ (s \ {a}) \ {b}, X a * X b * X c)
finset_sum_iio_castLE_sub_oneIn LeanGraph Theory & Graph Algorithms

For any sequence a, the sum of a(i) - 1 over i < k in Fin m equals the sum of a(i) - 1 over i < j in Fin t when k and j have the same natural number value and m ≤ t.

theorem finset_sum_iio_castLE_sub_one
    (t m : ℕ) (hmt : m ≤ t) (a : Fin t → ℕ) (j : Fin t) (k : Fin m) (hjk : (j : ℕ) = (k : ℕ)) :
    ∑ i ∈ Finset.Iio k, (a (Fin.castLE hmt i) - 1) = ∑ i ∈ Finset.Iio j, (a i - 1)
finset_transversal_number_le_cardIn LeanGraph Theory & Graph Algorithms

For any finite collection C of subsets of a finite set V, the transversal number tau(C) is at most the cardinality of V.

theorem finset_transversal_number_le_card {V : Type*} [Fintype V] [DecidableEq V]
    (C : Finset (Finset V)) :
    finset_transversal_number C ≤ Fintype.card V
forall_power_well_covered_iff_forall_lt_diamIn LeanGraph Theory & Graph Algorithms

For any finite connected graph G, all powers G^d (d ≥ 1) are well-covered if and only if G^d is well-covered for all 1 ≤ d < diam(G).

theorem forall_power_well_covered_iff_forall_lt_diam {V : Type*} [Fintype V] (G : SimpleGraph V) (hconn : G.Connected) : (∀ d : ℕ, 1 ≤ d → simple_graph_is_well_covered (simple_graph_power G d)) ↔ (∀ d : ℕ, 1 ≤ d → d < G.diam → simple_graph_is_well_covered (simple_graph_power G d))
forall_power_well_covered_of_diam_le_oneIn LeanGraph Theory & Graph Algorithms

Every finite connected simple graph of diameter at most 1 has the well-covered powers property (its positive integer powers are complete graphs or trivial, so all maximal independent sets have size 1).

theorem forall_power_well_covered_of_diam_le_one
    {V : Type*} [Fintype V] (G : SimpleGraph V)
    (hG : G.Connected) (hdG : G.diam ≤ 1) :
    simple_graph_has_well_covered_powers G
forest_single_exposure_cross_edges_leIn LeanGraph Theory & Graph Algorithms

In a finite forest G with a root-exposed fort F incident to exactly one edge from r, the number of cross edges between F and Fᶜ is at most 2c - 1, where c is the number of connected components of G[F].

open scoped Classical in
theorem forest_single_exposure_cross_edges_le
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (hG : G.IsAcyclic) (r : V) (F : Finset V) (hr : r ∉ F)
    (hone : (F.filter (fun v => G.Adj r v)).card = 1)
    (hfort : ∀ u : V, u ≠ r → u ∉ F → ∀ w : V, w ∈ F → G.Adj u w → ∃ x : V, x ∈ F ∧ G.Adj u x ∧ x ≠ w) :
    (∑ u ∈ Fᶜ, (F.filter (fun v => G.Adj u v)).card) ≤
      2 * Fintype.card (G.induce (F : Set V)).ConnectedComponent - 1
gamma_ve_eq_one_add_sum_pend_ve_numIn LeanGraph Theory & Graph Algorithms

If v belongs to every minimum vertex-edge dominating set of G, then gamma_ve(G) = 1 + the sum over the connected components C of G - v of a_C.

theorem gamma_ve_eq_one_add_sum_pend_ve_num {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (v : V)
    [Fintype ↥({v}ᶜ : Set V)]
    [∀ C : (G.induce ({v}ᶜ : Set V)).ConnectedComponent, Fintype ↥(ve_comp_part G v C)]
    (hfix : ∀ S : Finset V, is_ve_dominating G (S : Set V) → S.card = gamma_ve G → v ∈ S) :
    gamma_ve G = 1 + ∑ C : (G.induce ({v}ᶜ : Set V)).ConnectedComponent,
      pend_ve_num G (ve_comp_part G v C) v
gamma_ve_induce_eq_sum_of_closed_partitionIn LeanGraph Theory & Graph Algorithms

If A is partitioned into parts P i closed under adjacency of G (no edge inside A leaves its part), then gamma_ve(G[A]) equals the sum over i of gamma_ve(G[P i]).

theorem gamma_ve_induce_eq_sum_of_closed_partition {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) {A : Set V} [Fintype ↥A] {ι : Type*} [Fintype ι] (P : ι → Set V)
    [∀ i, Fintype ↥(P i)]
    (hsub : ∀ i, P i ⊆ A)
    (hcover : ∀ x : V, x ∈ A → ∃! i : ι, x ∈ P i)
    (hclosed : ∀ (i : ι) ⦃x y : V⦄, G.Adj x y → x ∈ A → y ∈ A → (x ∈ P i ↔ y ∈ P i)) :
    gamma_ve (G.induce A) = ∑ i, gamma_ve (G.induce (P i))
gamma_ve_induce_le_card_of_ve_dominates_insideIn LeanGraph Theory & Graph Algorithms

If a finite vertex set S is contained in A and ve-dominates every edge of G with both endpoints in A, then gamma_ve(G[A]) ≤ |S|.

lemma gamma_ve_induce_le_card_of_ve_dominates_inside {V : Type*} [Fintype V] (G : SimpleGraph V)
    (A : Set V) [Fintype ↥A] (S : Finset V) (hSA : (S : Set V) ⊆ A)
    (hdom : ve_dominates_inside G (S : Set V) A) :
    gamma_ve (G.induce A) ≤ S.card
gamma_ve_induce_le_pend_ve_num_add_oneIn LeanGraph Theory & Graph Algorithms

If v has at most one neighbour u in A, then gamma_ve(G[A]) ≤ a_C + 1: restrict a minimum vertex-edge dominating set of A ∪ {v} to A and, if it used v, replace v by u.

lemma gamma_ve_induce_le_pend_ve_num_add_one {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (A : Set V) [Fintype ↥A] (v u : V) (hvA : v ∉ A)
    (huniq : ∀ x : V, x ∈ A → G.Adj v x → x = u) :
    gamma_ve (G.induce A) ≤ pend_ve_num G A v + 1
gamma_ve_le_card_of_ve_dominatingIn LeanGraph Theory & Graph Algorithms

Any vertex-edge dominating set of a finite simple graph has cardinality at least gamma_ve(G).

lemma gamma_ve_le_card_of_ve_dominating {V : Type*} [Fintype V] (G : SimpleGraph V) (S : Finset V)
    (hS : is_ve_dominating G (S : Set V)) : gamma_ve G ≤ S.card
generalized_kneser_chromatic_ge_fourteenIn LeanGraph Theory & Graph Algorithms

For every natural number n ≥ 5, the chromatic number of the generalized Kneser graph KG(2n, n, 3) is at least 14.

theorem generalized_kneser_chromatic_ge_fourteen (n : ℕ) (hn : 5 ≤ n) :
    14 ≤ (generalized_kneser_graph n 3).chromaticNumber
generalized_kneser_four_three_chromatic_ge_fourteenIn LeanGraph Theory & Graph Algorithms

The chromatic number of the generalized Kneser graph KG(8, 4, 3) is at least 14.

theorem generalized_kneser_four_three_chromatic_ge_fourteen :
    14 ≤ (generalized_kneser_graph 4 3).chromaticNumber
generalized_kneser_four_three_chromatic_le_fourteenIn LeanGraph Theory & Graph Algorithms

The chromatic number of the generalized Kneser graph KG(8, 4, 3) is at most 14.

theorem generalized_kneser_four_three_chromatic_le_fourteen :
    (generalized_kneser_graph 4 3).chromaticNumber ≤ 14
generalized_kneser_graph_chromaticNumber_of_leIn LeanGraph Theory & Graph Algorithms

If n ≤ r then the chromatic number of KG(2n, n, r) equals its number of vertices C(2n, n). In particular χ(KG(4,2,3)) = 6 and χ(KG(6,3,3)) = 20, and the chromatic number is finite in this range.

theorem generalized_kneser_graph_chromaticNumber_of_le (n r : ℕ) (h : n ≤ r) :
    (generalized_kneser_graph n r).chromaticNumber = ((2 * n).choose n : ℕ∞)
generalized_kneser_graph_cliqueFree_threeIn LeanGraph Theory & Graph Algorithms

For n ≥ 7 the generalized Kneser graph KG(2n, n, 3) contains no triangle: three vertices would be n-element subsets with pairwise intersections of size at most 2, so their union would have at least 3n - 6 > 2n elements, which is impossible inside Fin (2n).

theorem generalized_kneser_graph_cliqueFree_three (n : ℕ) (hn : 7 ≤ n) :
    (generalized_kneser_graph n 3).CliqueFree 3
generalized_kneser_graph_colorable_iffIn LeanGraph Theory & Graph Algorithms

KG(2n, n, r) admits a proper colouring with k colours if and only if there is a map c from its vertices to Fin k such that any two distinct n-element subsets with the same colour intersect in at least r elements. Equivalently, χ(KG(2n, n, r)) ≤ k iff the vertex set can be partitioned into k r-intersecting families.

theorem generalized_kneser_graph_colorable_iff (n r k : ℕ) :
    (generalized_kneser_graph n r).Colorable k ↔
      ∃ c : {s : Finset (Fin (2 * n)) // s.card = n} → Fin k,
        ∀ a b, a ≠ b → c a = c b → r ≤ (a.1 ∩ b.1).card
generalized_kneser_graph_eq_top_of_leIn LeanGraph Theory & Graph Algorithms

If n ≤ r then the generalized Kneser graph KG(2n, n, r) is the complete graph on its vertex type: two distinct n-element subsets of a 2n-set intersect in at most n - 1 < r elements, so every two distinct vertices are adjacent. In particular KG(2n, n, n) is complete.

theorem generalized_kneser_graph_eq_top_of_le (n r : ℕ) (h : n ≤ r) :
    generalized_kneser_graph n r = ⊤
generalized_kneser_graph_exists_nonadjacentIn LeanGraph Theory & Graph Algorithms

For n ≥ 4 the generalized Kneser graph KG(2n, n, 3) is not complete: there are two distinct vertices that are not adjacent, namely an n-element subset and the n-element subset obtained from it by exchanging one element, whose intersection has n - 1 ≥ 3 elements.

theorem generalized_kneser_graph_exists_nonadjacent (n : ℕ) (hn : 4 ≤ n) :
    ∃ s t : {s : Finset (Fin (2 * n)) // s.card = n},
      s ≠ t ∧ ¬ (generalized_kneser_graph n 3).Adj s t
generalized_kneser_graph_hom_of_leIn LeanGraph Theory & Graph Algorithms

For any natural numbers c, m, n with c + 1 ≤ m and m ≤ n, there exists a graph homomorphism from the generalized Kneser graph KG(2n, n, c + 1) to the generalized Kneser graph KG(2m, m, c + 1).

theorem generalized_kneser_graph_hom_of_le (c : ℕ) {m n : ℕ} (hcm : c + 1 ≤ m) (hmn : m ≤ n) :
    Nonempty (generalized_kneser_graph n (c + 1) →g generalized_kneser_graph m (c + 1))
generalized_kneser_graph_hom_stepIn LeanGraph Theory & Graph Algorithms

For any natural numbers c and k with c + 2 ≤ k, there exists a graph homomorphism from the generalized Kneser graph KG(2k, k, c + 1) to the generalized Kneser graph KG(2(k - 1), k - 1, c + 1).

theorem generalized_kneser_graph_hom_step (c : ℕ) {k : ℕ} (hk : c + 2 ≤ k) :
    Nonempty (generalized_kneser_graph k (c + 1) →g generalized_kneser_graph (k - 1) (c + 1))
generalized_kneser_graph_isIndepSet_iffIn LeanGraph Theory & Graph Algorithms

A set S of vertices of KG(2n, n, r) is independent if and only if any two distinct members of S intersect in at least r elements, i.e. S is an r-intersecting family of n-element subsets of Fin (2n).

theorem generalized_kneser_graph_isIndepSet_iff (n r : ℕ)
    (S : Set {s : Finset (Fin (2 * n)) // s.card = n}) :
    (generalized_kneser_graph n r).IsIndepSet S ↔
      ∀ a ∈ S, ∀ b ∈ S, a ≠ b → r ≤ (a.1 ∩ b.1).card
generalized_kneser_graph_mono_rIn LeanGraph Theory & Graph Algorithms

The generalized Kneser graphs are monotone in the intersection threshold: if r ≤ r' then KG(2n, n, r) is a subgraph of KG(2n, n, r'), because raising the threshold can only turn non-adjacent vertices into adjacent ones.

theorem generalized_kneser_graph_mono_r (n : ℕ) {r r' : ℕ} (h : r ≤ r') :
    generalized_kneser_graph n r ≤ generalized_kneser_graph n r'
geodesic_card_eq_c_mulIn LeanGraph Theory & Graph Algorithms

Let G be distance-regular with parameters d, b, c, let u, v be at distance i + 1, and suppose that every vertex w adjacent to v with dist(u, w) = i carries exactly N geodesics from u. Then the number of geodesics from u to v equals c(i) · N.

theorem geodesic_card_eq_c_mul {V : Type*} [Fintype V] (G : SimpleGraph V) (d : ℕ)
    (b c : Fin d → ℕ) (hG : is_distance_regular_with G d b c) (i : Fin d) (u v : V)
    (hdist : G.dist u v = i.val + 1) (N : ℕ)
    (hN : ∀ w : V, G.Adj v w → G.dist u w = i.val →
      Nat.card {q : G.Walk u w // is_geodesic q} = N) :
    Nat.card {p : G.Walk u v // is_geodesic p} = c i * N
geodesic_count_dist_oneIn LeanGraph Theory & Graph Algorithms

If dist(u, v) = 1 then there is exactly one geodesic from u to v, namely the walk consisting of the single edge uv.

theorem geodesic_count_dist_one {V : Type*} (G : SimpleGraph V) (u v : V)
    (h : G.dist u v = 1) : Nat.card {p : G.Walk u v // is_geodesic p} = 1
geodesic_fiber_card_eqIn LeanGraph Theory & Graph Algorithms

Let u, v be at distance k ≥ 1 and let w be a neighbour of v with dist(u, w) = k − 1. Then the geodesics from u to v whose penultimate vertex is w are in bijection with the geodesics from u to w; in particular the two cardinalities agree.

theorem geodesic_fiber_card_eq {V : Type*} (G : SimpleGraph V) {u v w : V} {k : ℕ}
    (hv : G.dist u v = k) (hk : 1 ≤ k) (hw : G.Adj v w) (hkw : G.dist u w = k - 1) :
    Nat.card {p : G.Walk u v // is_geodesic p ∧ p.penultimate = w}
      = Nat.card {q : G.Walk u w // is_geodesic q}
geodesic_penultimate_adj_distIn LeanGraph Theory & Graph Algorithms

If p is a geodesic walk from u to v in G of length k ≥ 1, then the penultimate vertex of p is adjacent to v and is at distance k − 1 from u.

theorem geodesic_penultimate_adj_dist {V : Type*} (G : SimpleGraph V) {u v : V} {k : ℕ}
    {p : G.Walk u v} (hp : is_geodesic p) (hlen : p.length = k) (hk : 1 ≤ k) :
    G.Adj p.penultimate v ∧ G.dist u p.penultimate = k - 1
ghz_cycle_list_adj_nextIn LeanGraph Theory & Graph Algorithms

In a cycle list, every vertex is adjacent to its cyclic successor.

theorem ghz_cycle_list_adj_next {V : Type*} {G : SimpleGraph V} {l : List V} (hl : ghz_cycle_list G l)
    (i : Fin l.length) :
    G.Adj (l.get i) (l.get ⟨(i.1 + 1) % l.length, Nat.mod_lt _ (by have := i.2; omega)⟩)
ghz_cycle_list_exists_isCycleIn LeanGraph Theory & Graph Algorithms

A cycle list of length n yields a closed walk which is a cycle (Walk.IsCycle) of length n.

theorem ghz_cycle_list_exists_isCycle {V : Type*} [DecidableEq V] {G : SimpleGraph V} {l : List V}
    (h : ghz_cycle_list G l) : ∃ u : V, ∃ p : G.Walk u u, p.IsCycle ∧ p.length = l.length
ghz_cycle_list_not_length_twoIn LeanGraph Theory & Graph Algorithms

The two-element list [0,1] is not a cycle list — a negative witness distinguishing the definition from mere paths.

theorem ghz_cycle_list_not_length_two : ¬ ghz_cycle_list (⊤ : SimpleGraph (Fin 3)) [0,1]
ghz_cycle_list_top_threeIn LeanGraph Theory & Graph Algorithms

The list [0,1,2] is a cycle list of the complete graph on Fin 3 — a positive witness that ghz_cycle_list is inhabited.

theorem ghz_cycle_list_top_three : ghz_cycle_list (⊤ : SimpleGraph (Fin 3)) [0,1,2]
ghz_enat_add_one_le_natIn LeanGraph Theory & Graph Algorithms

For naturals a and b, if a plus one is at most b once both are read as extended naturals, then a plus one is at most b as naturals.

theorem ghz_enat_add_one_le_nat (a b : ℕ) (h : (a : ℕ∞) + 1 ≤ (b : ℕ∞)) : a + 1 ≤ b
ghz_exists_component_outsideIn LeanGraph Theory & Graph Algorithms

For a vertex x off a list l, the vertex set H of the connected component of G − l containing x is a non-empty set of vertices off l, inducing a preconnected subgraph, and closed under neighbours outside l.

theorem ghz_exists_component_outside {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    (l : List V) (x : V) (hx : x ∉ l) :
    ∃ H : Finset V, x ∈ H ∧ Disjoint H l.toFinset ∧ (G.induce ((H : Set V))).Preconnected ∧
      ∀ u ∈ H, ∀ w : V, G.Adj u w → w ∉ l.toFinset → w ∈ H
ghz_exists_cycle_list_of_two_connectedIn LeanGraph Theory & Graph Algorithms

A 2-connected graph on at least three vertices contains a cycle, exhibited as a cycle list.

theorem ghz_exists_cycle_list_of_two_connected {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (hV : 3 ≤ Fintype.card V) (hconn : G.Preconnected)
    (h2 : ∀ v : V, (G.induce ({v}ᶜ : Set V)).Preconnected) :
    ∃ l : List V, ghz_cycle_list G l
ghz_exists_longest_cycle_listIn LeanGraph Theory & Graph Algorithms

If the graph has at least one cycle list, then it has a cycle list of maximum length.

theorem ghz_exists_longest_cycle_list {V : Type*} (G : SimpleGraph V)
    (h : ∃ l : List V, ghz_cycle_list G l) :
    ∃ l : List V, ghz_cycle_list G l ∧ ∀ l' : List V, ghz_cycle_list G l' → l'.length ≤ l.length
ghz_exists_path_through_finsetIn LeanGraph Theory & Graph Algorithms

If H induces a preconnected subgraph, H is disjoint from S, a ∉ H is adjacent to a vertex of H, and b ≠ a is either in H or adjacent to a vertex of H, then there is a path from a to b whose internal vertices lie outside S.

theorem ghz_exists_path_through_finset {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    (H S : Finset V) (hH : (G.induce ((H : Set V))).Preconnected)
    (hHS : Disjoint H S) {a b : V} (ha : a ∉ H) (hab : a ≠ b)
    (haH : ∃ h ∈ H, G.Adj a h) (hbH : b ∈ H ∨ ∃ h ∈ H, G.Adj b h) :
    ∃ Q : G.Walk a b, Q.IsPath ∧ ∀ w ∈ Q.support.tail.dropLast, w ∉ S
ghz_isHamiltonian_of_cycle_lengthIn LeanGraph Theory & Graph Algorithms

If a finite graph has a cycle (Walk.IsCycle closed walk) of length equal to the number of vertices, it is Hamiltonian.

theorem ghz_isHamiltonian_of_cycle_length {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    (h : ∃ u : V, ∃ p : G.Walk u u, p.IsCycle ∧ p.length = Fintype.card V) :
    G.IsHamiltonian
ghz_no_chord_between_nextsIn LeanGraph Theory & Graph Algorithms

Let l be a longest cycle list and Q a path of length at least two between two distinct cycle vertices l[i], l[j] with internal vertices off the cycle. Then the cyclic successors of l[i] and l[j] are not adjacent.

theorem ghz_no_chord_between_nexts {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    {l : List V} (hl : ghz_cycle_list G l)
    (hmax : ∀ l' : List V, ghz_cycle_list G l' → l'.length ≤ l.length)
    (i j : Fin l.length) (hij : i ≠ j)
    (Q : G.Walk (l.get i) (l.get j)) (hQp : Q.IsPath)
    (hQ : ∀ w ∈ Q.support.tail.dropLast, w ∉ l) (hlen : 2 ≤ Q.length) :
    ¬ G.Adj (l.get ⟨(i.1 + 1) % l.length, Nat.mod_lt _ (by have := i.2; omega)⟩)
            (l.get ⟨(j.1 + 1) % l.length, Nat.mod_lt _ (by have := j.2; omega)⟩)
ghz_no_outside_path_to_nextIn LeanGraph Theory & Graph Algorithms

Let l be a longest cycle list of G. If v = l[i] has cyclic successor u and there is a path of length at least two from v to u with all internal vertices off the cycle, then l was not longest.

theorem ghz_no_outside_path_to_next {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    {l : List V} (hl : ghz_cycle_list G l)
    (hmax : ∀ l' : List V, ghz_cycle_list G l' → l'.length ≤ l.length)
    (i : Fin l.length)
    (Q : G.Walk (l.get i) (l.get ⟨(i.1 + 1) % l.length, Nat.mod_lt _ (by have := i.2; omega)⟩))
    (hQp : Q.IsPath) (hQ : ∀ w ∈ Q.support.tail.dropLast, w ∉ l) (hlen : 2 ≤ Q.length) : False
ghz_vertex_connectivity_le_induce_compl_universal_succIn LeanGraph Theory & Graph Algorithms

Deleting a universal vertex lowers the vertex connectivity by at most one: if u is adjacent to every other vertex, then kappa(G) <= kappa(G - u) + 1.

theorem ghz_vertex_connectivity_le_induce_compl_universal_succ {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (u : V) (hu : ∀ w : V, w ≠ u → G.Adj u w) : ghz_graph_vertex_connectivity G ≤ ghz_graph_vertex_connectivity (G.induce {v : V | v ≠ u}) + 1
graceful_supertree_size_bound_via_diamIn LeanGraph Theory & Graph Algorithms

Let V be a finite nonempty type and T a simple graph on V that is a tree with at least 1 edge (1 ≤ Nat.card T.edgeSet). Then the graceful supertree size of T satisfies all three bounds: (1) graceful_supertree_size T ≤ 2 * Nat.card T.edgeSet - T.diam; (2) if 2 ≤ Nat.card T.edgeSet, then graceful_supertree_size T ≤ 2 * Nat.card T.edgeSet - 2; and (3) if T is not a star graph (that is, ¬ ∃ r : V, T = SimpleGraph.starGraph r), then graceful_supertree_size T ≤ 2 * Nat.card T.edgeSet - 3.

theorem graceful_supertree_size_bound_via_diam {V : Type*} [Fintype V] [Nonempty V] (T : SimpleGraph V) (hT : T.IsTree) (hm : 1 ≤ Nat.card T.edgeSet) : graceful_supertree_size T ≤ 2 * Nat.card T.edgeSet - T.diam ∧ (2 ≤ Nat.card T.edgeSet → graceful_supertree_size T ≤ 2 * Nat.card T.edgeSet - 2) ∧ (¬ (∃ r : V, T = SimpleGraph.starGraph r) → graceful_supertree_size T ≤ 2 * Nat.card T.edgeSet - 3)
graph_128_near_extremal_three_coloringIn LeanGraph Theory & Graph Algorithms

Every four-clique-free graph on 128 vertices with at least 5421 edges has a proper three-coloring.

theorem graph_128_near_extremal_three_coloring (G : SimpleGraph (Fin 128)) [DecidableRel G.Adj] (hf : G.CliqueFree 4) (he : 5421 ≤ G.edgeFinset.card) : G.Colorable 3
graph_admits_involutory_weighted_adj_matrix_top_twoIn LeanGraph Theory & Graph Algorithms

The complete graph on 2 vertices (top on Fin 2) admits an involutory weighted adjacency matrix over the rational numbers Q.

theorem graph_admits_involutory_weighted_adj_matrix_top_two :
    graph_admits_involutory_weighted_adj_matrix (⊤ : SimpleGraph (Fin 2)) ℚ
graph_clique_free_near_extremal_coloringIn LeanGraph Theory & Graph Algorithms

For s at least two and n at least 2s+1, an n-vertex graph without an (s+1)-clique is s-colorable if it is within floor(n/s)−2 edges of the maximum for such a graph.

theorem graph_clique_free_near_extremal_coloring
    (n s : ℕ) (hs : 2 ≤ s) (hn : 2 * s + 1 ≤ n)
    (G : SimpleGraph (Fin n)) [DecidableRel G.Adj]
    (hf : G.CliqueFree (s + 1))
    (he : (SimpleGraph.turanGraph n s).edgeFinset.card + 2 ≤ G.edgeFinset.card + n / s) :
    G.Colorable s
graph_color_sets_card_eq_sq_imp_star_complIn LeanGraph Theory & Graph Algorithms

Let G be a noncomplete simple graph on a finite vertex type V with |V| ≥ 2, and let L be an admissible |V|-list assignment realizing exactly |V|^2 distinct color sets. Then all edges of Gᶜ have a common endpoint.

theorem graph_color_sets_card_eq_sq_imp_star_compl {V : Type*} [Fintype V]
    (G : SimpleGraph V) (h_noncomplete : G ≠ ⊤) (hn : 2 ≤ Fintype.card V)
    (L : V → Finset ℕ) (hL : is_admissible_list_assignment G (Fintype.card V) L)
    (hcard : (graph_color_sets G L).card = (Fintype.card V) ^ 2) :
    ∃ c : V, ∀ u v : V, Gᶜ.Adj u v → u = c ∨ v = c
graph_color_sets_card_ge_sq_of_star_complIn LeanGraph Theory & Graph Algorithms

Let G be a noncomplete simple graph on a finite vertex type V with |V| ≥ 2, and let c : V be such that every edge of Gᶜ is incident with c. Then every admissible |V|-list assignment L on G realizes at least |V|^2 distinct color sets.

theorem graph_color_sets_card_ge_sq_of_star_compl {V : Type*} [Fintype V]
    (G : SimpleGraph V) (h_noncomplete : G ≠ ⊤) (hn : 2 ≤ Fintype.card V)
    (c : V) (hc : ∀ u v : V, Gᶜ.Adj u v → u = c ∨ v = c)
    (L : V → Finset ℕ) (hL : is_admissible_list_assignment G (Fintype.card V) L) :
    (Fintype.card V) ^ 2 ≤ (graph_color_sets G L).card
graph_color_sets_mem_iffIn LeanGraph Theory & Graph Algorithms

For a finite vertex type V with a simple graph G and list assignment L, a finset X of natural numbers is a color set of an L-coloring of G (i.e. X ∈ graph_color_sets G L) if and only if there is a map φ : V → ℕ with φ v ∈ L v for every v, φ u ≠ φ v whenever G.Adj u v, and X = φ '' V.

theorem graph_color_sets_mem_iff {V : Type*} [Fintype V]
    (G : SimpleGraph V) (L : V → Finset ℕ) (X : Finset ℕ) :
    X ∈ graph_color_sets G L ↔
      ∃ φ : V → ℕ, (∀ v : V, φ v ∈ L v) ∧
        (∀ u v : V, G.Adj u v → φ u ≠ φ v) ∧ Finset.univ.image φ = X
graph_config_not_stackable_of_le_oneIn LeanGraph Theory & Graph Algorithms

A configuration in which no vertex holds two pebbles (c v ≤ 1 everywhere) and whose support has at least two distinct vertices is not stackable: no pebbling step applies at all, so it can never be consolidated.

theorem graph_config_not_stackable_of_le_one {V : Type*} [DecidableEq V] (G : SimpleGraph V)
    (c : V → ℕ) (hc : ∀ v, c v ≤ 1) (h2 : ∃ a b : V, a ≠ b ∧ 0 < c a ∧ 0 < c b) :
    ¬ graph_config_stackable G c
graph_dismantling_class_cone_zeroIn LeanGraph Theory & Graph Algorithms

Every finite cone belongs to dismantling class 0.

theorem graph_dismantling_class_cone_zero (V : Type) [Fintype V] (G : SimpleGraph V) (hcone : graph_dismantling_class (-1) V G) : graph_dismantling_class 0 V G
graph_dismantling_class_iff_constructorsIn LeanGraph Theory & Graph Algorithms

Membership of G in the dismantling class D_j is exactly a disjunction of the three constructor shapes: j = -1 and G is a non-empty cone; or j >= 0 and G is non-empty with a single vertex; or j >= 0 and there is a vertex v whose open neighbourhood graph N(v) lies in D_{j-1} while G - v still lies in D_j.

theorem graph_dismantling_class_iff_constructors (j : ℤ) (V : Type) (G : SimpleGraph V) :
    graph_dismantling_class j V G ↔
      (j = -1 ∧ Nonempty V ∧ ∃ apex : V, ∀ v : V, v ≠ apex → G.Adj apex v) ∨
      (0 ≤ j ∧ Nonempty V ∧ Subsingleton V) ∨
      (0 ≤ j ∧ ∃ v : V,
        graph_dismantling_class (j - 1) ↥(G.neighborSet v) (SimpleGraph.induce (G.neighborSet v) G) ∧
        graph_dismantling_class j ↥{w : V | w ≠ v} (SimpleGraph.induce {w : V | w ≠ v} G))
graph_dismantling_class_iff_exists_stepIn LeanGraph Theory & Graph Algorithms

If j >= 0 and G has at least two vertices, then G lies in D_j if and only if some vertex v can be deleted first: the open neighbourhood of v lies in D_{j-1} and G - v lies in D_j.

theorem graph_dismantling_class_iff_exists_step (j : ℤ) (hj : 0 ≤ j) (V : Type) [Fintype V]
    (G : SimpleGraph V) (hV : 2 ≤ Fintype.card V) :
    graph_dismantling_class j V G ↔
      ∃ v : V,
        graph_dismantling_class (j - 1) ↥(G.neighborSet v) (SimpleGraph.induce (G.neighborSet v) G) ∧
        graph_dismantling_class j ↥{w : V | w ≠ v} (SimpleGraph.induce {w : V | w ≠ v} G)
graph_dismantling_class_monoIn LeanGraph Theory & Graph Algorithms

The dismantling hierarchy is monotone: for any j ≥ 0, every graph in D_j also belongs to D_{j+1}.

theorem graph_dismantling_class_mono (j : ℤ) (hj : 0 ≤ j) (V : Type) [Fintype V] (G : SimpleGraph V) (h : graph_dismantling_class j V G) : graph_dismantling_class (j + 1) V G
graph_dismantling_class_neg_one_q_zeroIn LeanGraph Theory & Graph Algorithms

If a finite simple graph G belongs to the dismantling class D_{-1}, then its alternating clique count vanishes: q(G) = 0.

theorem graph_dismantling_class_neg_one_q_zero (V : Type) [Fintype V] (G : SimpleGraph V)
    (h : graph_dismantling_class (-1) V G) :
    simple_graph_q G = 0
graph_dismantling_class_no_isolatedIn LeanGraph Theory & Graph Algorithms

For j >= 0, a finite graph on at least two vertices having an isolated vertex belongs to no dismantling class D_j.

theorem graph_dismantling_class_no_isolated (j : ℤ) (hj : 0 ≤ j) (V : Type) [Fintype V]
    (G : SimpleGraph V) (v : V) (hv : G.IsIsolated v) (hcard : 2 ≤ Fintype.card V) :
    ¬ graph_dismantling_class j V G
graph_dismantling_class_nonemptyIn LeanGraph Theory & Graph Algorithms

Every graph in any dismantling class D_j (for any integer j) is non-empty; in particular the empty graph belongs to no class, and the empty vertex set is in no class.

theorem graph_dismantling_class_nonempty (j : ℤ) (V : Type) (G : SimpleGraph V)
    (h : graph_dismantling_class j V G) : Nonempty V
graph_dismantling_class_one_min_orderIn LeanGraph Theory & Graph Algorithms

Every finite simple graph on at most 7 vertices that belongs to dismantling class 1 already belongs to dismantling class 0 (Dochtermann, Joswig, Sanyal 2023: m_1 = 8).

theorem graph_dismantling_class_one_min_order (V : Type) [Fintype V] (G : SimpleGraph V) (hcard : Fintype.card V ≤ 7) (h : graph_dismantling_class 1 V G) : graph_dismantling_class 0 V G
graph_dismantling_class_q_vanishingIn LeanGraph Theory & Graph Algorithms

Let r >= -1 be an integer, and let H be a finite simple graph. If H belongs to the dismantling class D_r, then q(H) = 0.

theorem graph_dismantling_class_q_vanishing (r : ℤ) (hr : -1 ≤ r) (V : Type) [Fintype V]
    (H : SimpleGraph V) (hH : graph_dismantling_class r V H) :
    simple_graph_q H = 0
graph_dismantling_class_strict_one_witness_eightIn LeanGraph Theory & Graph Algorithms

There is a graph on 8 vertices that is strictly 1-dismantlable: it lies in D_1 and not in D_0. This is the graph H_1 of Proposition 7.1 of arXiv:2611.14430, the induced subgraph of the 16-vertex seed A^(4) on the vertex set S_1 = {2,4,5,8,9,10,12,13}; it realises the known minimum m_1 = 8.

theorem graph_dismantling_class_strict_one_witness_eight :
    ∃ G : SimpleGraph (Fin 8), graph_dismantling_class 1 (Fin 8) G ∧ ¬ graph_dismantling_class 0 (Fin 8) G
graph_dismantling_class_strict_two_witness_elevenIn LeanGraph Theory & Graph Algorithms

There is a strictly 2-dismantlable graph on 11 vertices: a graph G on Fin 11 with G in D_2 and not in D_1. (Existence is open; all 10-vertex and smaller cases are eliminated, so 11 is the only remaining order below 12.)

theorem graph_dismantling_class_strict_two_witness_eleven :
    ∃ G : SimpleGraph (Fin 11), graph_dismantling_class 2 (Fin 11) G ∧ ¬ graph_dismantling_class 1 (Fin 11) G
graph_dismantling_class_strict_two_witness_twelveIn LeanGraph Theory & Graph Algorithms

There is a graph on 12 vertices that lies in D_2 and not in D_1. This is the graph H_2 of Proposition 7.1 of arXiv:2611.14430, the induced subgraph of the 16-vertex seed A^(4) on S_2 = {2,3,...,13}. It is the only strict-level-2 example the literature provides, and it certifies m_2 <= 12 — so the target node asks whether it can be beaten below 12.

theorem graph_dismantling_class_strict_two_witness_twelve :
    ∃ G : SimpleGraph (Fin 12), graph_dismantling_class 2 (Fin 12) G ∧ ¬ graph_dismantling_class 1 (Fin 12) G
graph_exists_unstackable_config_of_two_le_of_le_cardIn LeanGraph Theory & Graph Algorithms

For any graph G on a finite vertex set V, and any t with 2 ≤ t ≤ |V|, there is a configuration of exactly t pebbles on G that is not stackable (put one pebble on each of t distinct vertices; no vertex then holds two pebbles, so no move is possible).

theorem graph_exists_unstackable_config_of_two_le_of_le_card {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) {t : ℕ} (h2 : 2 ≤ t) (ht : t ≤ Fintype.card V) :
    ∃ c : V → ℕ, (∑ v, c v) = t ∧ ¬ graph_config_stackable G c
graph_interval_index_le_path_graphIn LeanGraph Theory & Graph Algorithms

For every connected simple graph G on n ≥ 1 vertices, the interval index satisfies Int(G) ≤ (n^3 - n)/6 = Int(P_n), with equality if and only if G ≅ P_n, or n = 4 and G ≅ C_4.

theorem graph_interval_index_le_path_graph {V : Type*} [Fintype V]
    (G : SimpleGraph V) (hG : G.Connected) :
    graph_interval_index G ≤ (Fintype.card V ^ 3 - Fintype.card V) / 6 ∧
    (graph_interval_index G = (Fintype.card V ^ 3 - Fintype.card V) / 6 ↔
      Nonempty (G ≃g SimpleGraph.pathGraph (Fintype.card V)) ∨
      (Fintype.card V = 4 ∧ Nonempty (G ≃g SimpleGraph.cycleGraph 4)))
graph_interval_index_path_graphIn LeanGraph Theory & Graph Algorithms

For every n ≥ 1, the interval index of the path graph P_n equals (n^3 - n) / 6.

theorem graph_interval_index_path_graph (n : ℕ) (hn : 1 ≤ n) :
    graph_interval_index (SimpleGraph.pathGraph n) = (n ^ 3 - n) / 6
graph_interval_index_path_graph_eq_pair_sumIn LeanGraph Theory & Graph Algorithms

The interval index of P_n equals the sum, over ordered pairs a < b of vertices, of the distance b - a.

theorem graph_interval_index_path_graph_eq_pair_sum (n : ℕ) :
    graph_interval_index (SimpleGraph.pathGraph n) =
      ∑ p ∈ (Finset.univ : Finset (Fin n × Fin n)).filter (fun p : Fin n × Fin n => p.1 < p.2),
        (p.2.val - p.1.val)
graph_is_forcing_matching_of_cut_setIn LeanGraph Theory & Graph Algorithms

Let H be a simple graph with a perfect matching M and a matching S ≤ M. Suppose there is a vertex set A such that (i) every H-edge that is not an M-edge crosses the cut A, and (ii) every M-edge that is not an S-edge has both endpoints in A. Then S is a forcing matching of H (that is, M is the unique perfect matching of H containing S).

theorem graph_is_forcing_matching_of_cut_set {V : Type*} (H : SimpleGraph V)
    (M S : H.Subgraph) (A : Set V) (hM : M.IsPerfectMatching) (hS : S ≤ M)
    (hSmat : S.IsMatching)
    (hcross : ∀ ⦃u v : V⦄, H.Adj u v → ¬ M.Adj u v → (u ∈ A ↔ v ∉ A))
    (hmono : ∀ ⦃u v : V⦄, M.Adj u v → ¬ S.Adj u v → u ∈ A ∧ v ∈ A) :
    graph_is_forcing_matching H S
graph_is_mutual_visibility_colorable_iff_forall_common_neighborIn LeanGraph Theory & Graph Algorithms

In a graph in which every two distinct vertices are at distance at most 2, G is mutual-visibility n-colorable if and only if there is a colouring c : V → Fin n such that for every colour i, every two distinct non-adjacent vertices u, v with c u = c v = i have a common neighbour w with c w ≠ i.

theorem graph_is_mutual_visibility_colorable_iff_forall_common_neighbor {V : Type*}
    (G : SimpleGraph V) (h : ∀ u v : V, u ≠ v → G.dist u v ≤ 2) (n : ℕ) :
    graph_is_mutual_visibility_colorable G n ↔
      ∃ c : V → Fin n, ∀ i : Fin n, ∀ u v : V, c u = i → c v = i → u ≠ v → ¬ G.Adj u v →
        ∃ w : V, c w ≠ i ∧ G.Adj u w ∧ G.Adj v w
graph_is_mutual_visibility_colorable_monoIn LeanGraph Theory & Graph Algorithms

If a simple graph is mutual-visibility n-colourable and n ≤ m, then it is mutual-visibility m-colourable.

theorem graph_is_mutual_visibility_colorable_mono {V : Type*} (G : SimpleGraph V) {n m : ℕ}
    (hnm : n ≤ m) (h : graph_is_mutual_visibility_colorable G n) :
    graph_is_mutual_visibility_colorable G m
graph_is_mutual_visibility_colorable_three_of_forall_mem_three_cliquesIn LeanGraph Theory & Graph Algorithms

If the vertex set of a simple graph G is covered by three cliques (equivalently, the complement of G is 3-colourable), then G is mutual-visibility 3-colourable.

theorem graph_is_mutual_visibility_colorable_three_of_forall_mem_three_cliques {V : Type*}
    (G : SimpleGraph V) (C₁ C₂ C₃ : Set V)
    (hcov : ∀ v : V, v ∈ C₁ ∨ v ∈ C₂ ∨ v ∈ C₃)
    (h₁ : G.IsClique C₁) (h₂ : G.IsClique C₂) (h₃ : G.IsClique C₃) :
    graph_is_mutual_visibility_colorable G 3
graph_is_mutual_visibility_set_iff_forall_common_neighborIn LeanGraph Theory & Graph Algorithms

In a graph in which every two distinct vertices are at distance at most 2, a set S of vertices is a mutual-visibility set if and only if every two distinct non-adjacent vertices u, v of S have a common neighbour w that is outside S.

theorem graph_is_mutual_visibility_set_iff_forall_common_neighbor {V : Type*} (G : SimpleGraph V)
    (h : ∀ u v : V, u ≠ v → G.dist u v ≤ 2) (S : Set V) :
    graph_is_mutual_visibility_set G S ↔
      ∀ u ∈ S, ∀ v ∈ S, u ≠ v → ¬ G.Adj u v →
        ∃ w, w ∉ S ∧ G.Adj u w ∧ G.Adj v w
graph_is_mutual_visibility_set_of_isCliqueIn LeanGraph Theory & Graph Algorithms

Every clique of a simple graph is a mutual-visibility set.

theorem graph_is_mutual_visibility_set_of_isClique {V : Type*} (G : SimpleGraph V) {S : Set V}
    (hS : G.IsClique S) : graph_is_mutual_visibility_set G S
graph_min_color_sets_exists_attainingIn LeanGraph Theory & Graph Algorithms

For every simple graph G on a finite vertex type V there is a list assignment L : V → Finset ℕ that is admissible for list size |V| on G and whose number of color sets is exactly graph_min_color_sets G |V|.

theorem graph_min_color_sets_exists_attaining {V : Type*} [Fintype V] (G : SimpleGraph V) :
    ∃ L : V → Finset ℕ, is_admissible_list_assignment G (Fintype.card V) L ∧
      graph_min_color_sets G (Fintype.card V) = (graph_color_sets G L).card
graph_min_color_sets_le_sq_of_star_complIn LeanGraph Theory & Graph Algorithms

Let G be a simple graph on a finite vertex type V and let c : V have the property that every edge of Gᶜ is incident with c (so G − c is a clique). Then graph_min_color_sets G |V| ≤ |V|^2: the assignment giving c the block of colours [n, 2n) and every other vertex the block [0, n) is admissible and has exactly |V|^2 color sets, where n = |V|.

theorem graph_min_color_sets_le_sq_of_star_compl {V : Type*} [Fintype V]
    (G : SimpleGraph V) (c : V) (hc : ∀ u v : V, Gᶜ.Adj u v → u = c ∨ v = c) :
    graph_min_color_sets G (Fintype.card V) ≤ (Fintype.card V) ^ 2
graph_min_forcing_num_le_edgeSet_encardIn LeanGraph Theory & Graph Algorithms

If S is a forcing matching of a simple graph G, then the minimum forcing number of G is at most the extended cardinality of S's edge set.

theorem graph_min_forcing_num_le_edgeSet_encard {V : Type*} {G : SimpleGraph V}
    {S : G.Subgraph} (h : graph_is_forcing_matching G S) :
    graph_min_forcing_num G ≤ S.edgeSet.encard
graph_mutual_visibility_chromatic_number_eq_four_packagingIn LeanGraph Theory & Graph Algorithms

If a finite simple graph G of diameter 2 is 4-colourable but not 3-colourable and is not mutual-visibility 3-colourable, then its chromatic number is 4 and its mutual-visibility chromatic number is 4.

theorem graph_mutual_visibility_chromatic_number_eq_four_packaging {V : Type*} [Fintype V]
    (G : SimpleGraph V) (hdiam : G.diam = 2) (h4 : G.Colorable 4) (h3 : ¬ G.Colorable 3)
    (hmv : ¬ graph_is_mutual_visibility_colorable G 3) :
    graph_mutual_visibility_chromatic_number G = 4 ∧ G.chromaticNumber = 4
graph_mutual_visibility_chromatic_number_le_iffIn LeanGraph Theory & Graph Algorithms

For any simple graph G and natural number n, the mutual-visibility chromatic number of G is at most n if and only if G is mutual-visibility n-colourable.

theorem graph_mutual_visibility_chromatic_number_le_iff {V : Type*} (G : SimpleGraph V) (n : ℕ) :
    graph_mutual_visibility_chromatic_number G ≤ (n : ℕ∞) ↔
      graph_is_mutual_visibility_colorable G n
graph_not_dismantling_class_of_q_ne_zeroIn LeanGraph Theory & Graph Algorithms

Let H be a finite simple graph. If q(H) ≠ 0, then H does not belong to the dismantling class D_r for any integer r >= -1.

theorem graph_not_dismantling_class_of_q_ne_zero (V : Type) [Fintype V]
    (H : SimpleGraph V) (hq : simple_graph_q H ≠ 0) (r : ℤ) (hr : -1 ≤ r) :
    ¬ graph_dismantling_class r V H
graph_pebbling_step_stackableIn LeanGraph Theory & Graph Algorithms

If a configuration c transitions to c' in one pebbling step and c' is stackable, then c is stackable.

theorem graph_pebbling_step_stackable {V : Type*} [DecidableEq V] (G : SimpleGraph V)
    {c c' : V → ℕ} (hstep : graph_pebbling_step G c c') (h : graph_config_stackable G c') :
    graph_config_stackable G c
graph_pebbling_trans_stackableIn LeanGraph Theory & Graph Algorithms

If a configuration c reaches c' via a sequence of pebbling steps and c' is stackable, then c is stackable.

theorem graph_pebbling_trans_stackable {V : Type*} [DecidableEq V] (G : SimpleGraph V)
    {c c' : V → ℕ} (htr : Relation.ReflTransGen (graph_pebbling_step G) c c')
    (h : graph_config_stackable G c') : graph_config_stackable G c
graph_perfect_matching_edgeSet_ncardIn LeanGraph Theory & Graph Algorithms

For a finite simple graph G on V and a perfect matching M of G, the number of edges of M is |V| / 2.

theorem graph_perfect_matching_edgeSet_ncard {V : Type*} [Fintype V] {G : SimpleGraph V}
    {M : G.Subgraph} (hM : M.IsPerfectMatching) : M.edgeSet.ncard = Fintype.card V / 2
graph_power_two_quadratic_form_leIn LeanGraph Theory & Graph Algorithms

For any non-negative vector y on the vertex set of a finite simple graph G, the quadratic form of the adjacency matrix of G^2 at y is at most the squared Euclidean norm of A(G) * y.

attribute [local instance] Classical.propDecidable in
theorem graph_power_two_quadratic_form_le {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (y : V → ℝ) (hy : ∀ i, 0 ≤ y i) :
    ∑ i, y i * Matrix.mulVec ((simple_graph_power G 2).adjMatrix ℝ) y i ≤
      ∑ i, (Matrix.mulVec (G.adjMatrix ℝ) y i) ^ 2
graph_proper_list_coloring_of_degree_ltIn LeanGraph Theory & Graph Algorithms

Greedy list colouring: if every vertex of H has strictly fewer neighbours than the number of colours on its list, then H has a proper colouring which picks at each vertex a colour from that vertex's list.

theorem graph_proper_list_coloring_of_degree_lt {V κ : Type} [Fintype V] [DecidableEq V]
    [DecidableEq κ] (H : SimpleGraph V) [DecidableRel H.Adj] (L : V → Finset κ)
    (h : ∀ v, H.degree v < (L v).card) :
    ∃ f : V → κ, (∀ v, f v ∈ L v) ∧ ∀ ⦃u v : V⦄, H.Adj u v → f u ≠ f v
graph_square_lower_bound_color_sets_iffIn LeanGraph Theory & Graph Algorithms

Let G be a noncomplete simple graph on a finite vertex type V with n = |V| ≥ 2. Then the minimum number of color sets graph_min_color_sets G n over admissible n-list assignments on G equals n^2 if and only if all edges of the complement graph Gᶜ share a common endpoint (there exists c : V such that for every edge uv of Gᶜ, u = c or v = c).

theorem graph_square_lower_bound_color_sets_iff {V : Type*} [Fintype V]
    (G : SimpleGraph V) (h_noncomplete : G ≠ ⊤)
    (hn : 2 ≤ Fintype.card V) :
    graph_min_color_sets G (Fintype.card V) = (Fintype.card V) ^ 2 ↔
      ∃ c : V, ∀ u v : V, Gᶜ.Adj u v → u = c ∨ v = c
graph_stacking_number_eq_tree_estimate_of_all_stackable_of_bad_configsIn LeanGraph Theory & Graph Algorithms

If every configuration of size estim(T) on T is stackable and every size t with 2 ≤ t < estim(T) admits a non-stackable configuration of size t, then stack(T) = estim(T).

theorem graph_stacking_number_eq_tree_estimate_of_all_stackable_of_bad_configs {V : Type*}
    [Fintype V] [DecidableEq V] (T : SimpleGraph V) [DecidableRel T.Adj]
    (hU : ∀ c : V → ℕ, (∑ v, c v) = simple_graph_tree_estimate T → graph_config_stackable T c)
    (hB : ∀ t : ℕ, 2 ≤ t → t < simple_graph_tree_estimate T →
      ∃ c : V → ℕ, (∑ v, c v) = t ∧ ¬ graph_config_stackable T c) :
    graph_stacking_number T = simple_graph_tree_estimate T
greedy_indep_var_complete_split_graph_oneIn LeanGraph Theory & Graph Algorithms

The star on n >= 3 vertices attains the bound: the variance of its random greedy independent set size equals (n-1)(n-2)^2/n^2, which is split_graph_var_bound n 1.

theorem greedy_indep_var_complete_split_graph_one (n : ℕ) (hn : 3 ≤ n) : greedy_indep_var (complete_split_graph n 1) = split_graph_var_bound n 1
greedy_indep_var_congrIn LeanGraph Theory & Graph Algorithms

The random greedy independent set variance is invariant under graph isomorphism.

theorem greedy_indep_var_congr {n : ℕ} (G H : SimpleGraph (Fin n)) (e : G ≃g H) : greedy_indep_var G = greedy_indep_var H
greedy_indep_var_eq_split_graph_max_var_impIn LeanGraph Theory & Graph Algorithms

If the random greedy independent set variance of G attains split_graph_max_var n, then G is isomorphic to complete_split_graph n k for some k in Finset.Ico 1 n attaining split_graph_var_bound n k = split_graph_max_var n.

theorem greedy_indep_var_eq_split_graph_max_var_imp (n : ℕ) (hn : 3 ≤ n) (G : SimpleGraph (Fin n)) (h : greedy_indep_var G = split_graph_max_var n) : ∃ k ∈ Finset.Ico 1 n, split_graph_var_bound n k = split_graph_max_var n ∧ Nonempty (G ≃g complete_split_graph n k)
greedy_indep_var_forest_eq_star_boundIn LeanGraph Theory & Graph Algorithms

For n >= 3, if a forest F on vertex set Fin n has greedy independent set variance exactly (n-1)(n-2)^2/n^2 = split_graph_var_bound n 1, then F is isomorphic to the star complete_split_graph n 1.

theorem greedy_indep_var_forest_eq_star_bound {n : ℕ} (hn : 3 ≤ n) (F : SimpleGraph (Fin n))
    (hF : F.IsAcyclic) (h : greedy_indep_var F = split_graph_var_bound n 1) :
    Nonempty (F ≃g complete_split_graph n 1)
greedy_indep_var_forest_le_star_boundIn LeanGraph Theory & Graph Algorithms

For every n >= 1 and every forest (acyclic simple graph) F on vertex set Fin n, the variance of the random greedy independent set size is at most the star's variance (n-1)(n-2)^2/n^2 = split_graph_var_bound n 1.

theorem greedy_indep_var_forest_le_star_bound {n : ℕ} (hn : 1 ≤ n) (F : SimpleGraph (Fin n))
    (hF : F.IsAcyclic) : greedy_indep_var F ≤ split_graph_var_bound n 1
greedy_indep_var_iso_typesIn LeanGraph Theory & Graph Algorithms

The random greedy independent set variance is invariant under graph isomorphism, even when the two graphs are labelled by different finite types Fin n and Fin m (so that one is a relabelling of the other).

theorem greedy_indep_var_iso_types {n m : ℕ} {G : SimpleGraph (Fin n)} {H : SimpleGraph (Fin m)} (e : G ≃g H) : greedy_indep_var G = greedy_indep_var H
greedy_indep_var_le_split_graph_max_varIn LeanGraph Theory & Graph Algorithms

For every simple graph G on n >= 3 vertices, the random greedy independent set variance is at most split_graph_max_var n.

theorem greedy_indep_var_le_split_graph_max_var (n : ℕ) (hn : 3 ≤ n) (G : SimpleGraph (Fin n)) : greedy_indep_var G ≤ split_graph_max_var n
gt_twenty_four_zero_forcing_poly_not_unimodalIn LeanGraph Theory & Graph Algorithms

The zero forcing polynomial of the graph gt_graph 24 is not unimodal.

theorem gt_twenty_four_zero_forcing_poly_not_unimodal :
    ¬ polynomial_is_unimodal (zero_forcing_poly (gt_graph 24))
gt_vertex_cardIn LeanGraph Theory & Graph Algorithms

The graph G_t has 10 + 3t vertices: |A|=3, |B|=2, |C|=2, |D|=3, |P|=|Q|=|R|=t.

theorem gt_vertex_card (t : ℕ) : Fintype.card (GtVertex t) = 10 + 3 * t
gt_zero_forcing_poly_coeff_complIn LeanGraph Theory & Graph Algorithms

The coefficient of x^{n-c} (where n = 10+3t) in the zero forcing polynomial of G_t is the number of c-element sets T whose complement is a zero forcing set.

theorem gt_zero_forcing_poly_coeff_compl (t c : ℕ) (hc : c ≤ 10 + 3 * t) :
    (zero_forcing_poly (gt_graph t)).coeff (10 + 3 * t - c) =
      {T : Finset (GtVertex t) | T.card = c ∧ is_zero_forcing_set (gt_graph t) ((Finset.univ \ T : Finset (GtVertex t)) : Set (GtVertex t))}.ncard
gt_zero_forcing_poly_not_unimodalIn LeanGraph Theory & Graph Algorithms

For every integer t ≥ 24, the zero forcing polynomial of the graph gt_graph t is not unimodal.

theorem gt_zero_forcing_poly_not_unimodal (t : ℕ) (ht : 24 ≤ t) :
    ¬ polynomial_is_unimodal (zero_forcing_poly (gt_graph t))
gt_zfs_compl_count_fourIn LeanGraph Theory & Graph Algorithms

Exactly 36 + 108t four-element sets T have a zero forcing complement in G_t (for t ≥ 24).

theorem gt_zfs_compl_count_four (t : ℕ) (ht : 24 ≤ t) :
    {T : Finset (GtVertex t) | T.card = 4 ∧
      is_zero_forcing_set (gt_graph t) ((Finset.univ \ T : Finset (GtVertex t)) : Set (GtVertex t))}.ncard
      = 36 + 108 * t
gt_zfs_compl_count_threeIn LeanGraph Theory & Graph Algorithms

Exactly 60 + 99t three-element sets T have a zero forcing complement in G_t (for t ≥ 24).

theorem gt_zfs_compl_count_three (t : ℕ) (ht : 24 ≤ t) :
    {T : Finset (GtVertex t) | T.card = 3 ∧
      is_zero_forcing_set (gt_graph t) ((Finset.univ \ T : Finset (GtVertex t)) : Set (GtVertex t))}.ncard
      = 60 + 99 * t
gt_zfs_compl_count_twoIn LeanGraph Theory & Graph Algorithms

Exactly 37 + 30t + 3t^2 two-element sets T have a zero forcing complement in G_t (for t ≥ 24).

theorem gt_zfs_compl_count_two (t : ℕ) (ht : 24 ≤ t) :
    {T : Finset (GtVertex t) | T.card = 2 ∧
      is_zero_forcing_set (gt_graph t) ((Finset.univ \ T : Finset (GtVertex t)) : Set (GtVertex t))}.ncard
      = 37 + 30 * t + 3 * t ^ 2
hamming_three_exists_blocking_setIn LeanGraph Theory & Graph Algorithms

If a 2 ≤ (a 0 - 1) + (a 1 - 1), then in F = K_{a 0} □ K_{a 1} □ K_{a 2} there are a fibre (over some (x,y) in the first two coordinates) and an independent set T of size (a 0 - 1) + (a 1 - 1) such that every vertex of that fibre is adjacent to a member of T.

theorem hamming_three_exists_blocking_set (a : Fin 3 → ℕ) (h_ge : ∀ i, 2 ≤ a i)
    (h_mono : Monotone a) (hb : a 2 ≤ (a 0 - 1) + (a 1 - 1)) :
    ∃ (x : Fin (a 0)) (y : Fin (a 1)) (T : Finset ((i : Fin 3) → Fin (a i))),
      (cartesian_product_complete_graphs a).IsIndepSet (T : Set _) ∧
      (∀ v : (i : Fin 3) → Fin (a i), v 0 = x → v 1 = y →
        ∃ u ∈ T, (cartesian_product_complete_graphs a).Adj u v) ∧
      T.card = (a 0 - 1) + (a 1 - 1)
hamming_three_fiber_covering_of_boundIn LeanGraph Theory & Graph Algorithms

If 1 + (a 0 - 1) + (a 1 - 1) ≤ a 2, every maximal independent set s of F = K_{a 0} □ K_{a 1} □ K_{a 2} meets every fibre {(x,y,*)} of the first two coordinates.

theorem hamming_three_fiber_covering_of_bound (a : Fin 3 → ℕ) (h_ge : ∀ i, 2 ≤ a i)
    (h_mono : Monotone a) (hb : 1 + (a 0 - 1) + (a 1 - 1) ≤ a 2)
    (s : Finset ((i : Fin 3) → Fin (a i)))
    (hs : Maximal (fun u : Finset ((i : Fin 3) → Fin (a i)) =>
        (cartesian_product_complete_graphs a).IsIndepSet (u : Set _)) s) :
    ∀ (x : Fin (a 0)) (y : Fin (a 1)), ∃ u ∈ s, u 0 = x ∧ u 1 = y
hamming_three_not_well_covered_of_smallIn LeanGraph Theory & Graph Algorithms

If a 2 < 1 + (a 0 - 1) + (a 1 - 1) then F = K_{a 0} □ K_{a 1} □ K_{a 2} is not well-covered (two maximal independent sets of different sizes), hence does not have the well-covered powers property.

theorem hamming_three_not_well_covered_of_small (a : Fin 3 → ℕ) (h_ge : ∀ i, 2 ≤ a i)
    (h_mono : Monotone a) (hb : a 2 < 1 + (a 0 - 1) + (a 1 - 1)) :
    ¬ simple_graph_has_well_covered_powers (cartesian_product_complete_graphs a)
hamming_three_power_ge_three_well_coveredIn LeanGraph Theory & Graph Algorithms

For 2 ≤ a 0, 2 ≤ a 1, 2 ≤ a 2 and d ≥ 3, the d-th power of K_{a 0} □ K_{a 1} □ K_{a 2} is well-covered (indeed it is the complete graph).

theorem hamming_three_power_ge_three_well_covered (a : Fin 3 → ℕ) (h_ge : ∀ i, 2 ≤ a i)
    (d : ℕ) (hd : 3 ≤ d) :
    simple_graph_is_well_covered (simple_graph_power (cartesian_product_complete_graphs a) d)
hamming_three_power_two_well_coveredIn LeanGraph Theory & Graph Algorithms

For 2 ≤ a 0 ≤ a 1 ≤ a 2, every maximal independent set of the square (K_{a 0} □ K_{a 1} □ K_{a 2})^2 has exactly a 0 vertices, so that square is well-covered.

theorem hamming_three_power_two_well_covered (a : Fin 3 → ℕ) (h_ge : ∀ i, 2 ≤ a i)
    (h_mono : Monotone a) :
    simple_graph_is_well_covered (simple_graph_power (cartesian_product_complete_graphs a) 2)
hamming_three_transversal_maximal_indep_setIn LeanGraph Theory & Graph Algorithms

For 2 ≤ a 0 ≤ a 1 ≤ a 2 there is a maximal independent set of F = K_{a 0} □ K_{a 1} □ K_{a 2} of size a 0 * a 1, namely the "diagonal" {(i,j,i+j mod a 2)}.

theorem hamming_three_transversal_maximal_indep_set (a : Fin 3 → ℕ) (h_ge : ∀ i, 2 ≤ a i)
    (h_mono : Monotone a) :
    ∃ s : Finset ((i : Fin 3) → Fin (a i)),
      Maximal (fun u : Finset ((i : Fin 3) → Fin (a i)) =>
        (cartesian_product_complete_graphs a).IsIndepSet (u : Set _)) s ∧
      s.card = a 0 * a 1
hamming_three_wcp_of_boundIn LeanGraph Theory & Graph Algorithms

If 1 + (a 0 - 1) + (a 1 - 1) ≤ a 2 then F = K_{a 0} □ K_{a 1} □ K_{a 2} has the well-covered powers property: every maximal independent set of every positive power has the appropriate size.

theorem hamming_three_wcp_of_bound (a : Fin 3 → ℕ) (h_ge : ∀ i, 2 ≤ a i)
    (h_mono : Monotone a) (hb : 1 + (a 0 - 1) + (a 1 - 1) ≤ a 2) :
    simple_graph_has_well_covered_powers (cartesian_product_complete_graphs a)
has_fall_coloring_of_locally_surjective_homIn LeanGraph Theory & Graph Algorithms

Let G and H be simple graphs on types V and W, and let f : V → W be a graph homomorphism such that for every vertex u of G, H.neighborSet (f u) ⊆ f '' G.neighborSet u. If H admits a fall coloring with colors in α, then G admits a fall coloring with colors in α.

theorem has_fall_coloring_of_locally_surjective_hom {V W α : Type*}
    (G : SimpleGraph V) (H : SimpleGraph W)
    (f : V → W) (hf_hom : ∀ {u v}, G.Adj u v → H.Adj (f u) (f v))
    (hf_surj : ∀ u, H.neighborSet (f u) ⊆ f '' G.neighborSet u)
    (hcol : has_fall_coloring α H) :
    has_fall_coloring α G
has_hole_of_length_at_least_cycle_graph_fiveIn LeanGraph Theory & Graph Algorithms

The cycle on 5 vertices has a hole of length at least 5, so HasHoleOfLengthAtLeast is not vacuous.

theorem has_hole_of_length_at_least_cycle_graph_five :
    HasHoleOfLengthAtLeast (SimpleGraph.cycleGraph 5) 5
has_mad_lt_induceIn LeanGraph Theory & Graph Algorithms

If has_mad_lt G q holds then has_mad_lt (G.induce S) q holds for every set S of vertices.

theorem has_mad_lt_induce {V : Type} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {q : ℚ} (hmad : has_mad_lt G q)
    (S : Set V) [DecidablePred (· ∈ S)] :
    has_mad_lt (G.induce S) q
induced_avg_degree_le_adjacency_spectral_radiusIn LeanGraph Theory & Graph Algorithms

For a finite simple graph G and any vertex set s, the average degree of the induced subgraph G[s] is at most the adjacency spectral radius of G.

attribute [local instance] Classical.propDecidable in
theorem induced_avg_degree_le_adjacency_spectral_radius {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (s : Set V) :
    ENNReal.ofReal ((∑ v : s, ((G.induce s).degree v : ℝ)) / (Fintype.card s : ℝ))
      ≤ adjacency_spectral_radius G
isIndepSet_iff_induce_eq_botIn LeanGraph Theory & Graph Algorithms

The induced subgraph on a subset of vertices is empty (bot) if and only if that subset is an independent set.

theorem isIndepSet_iff_induce_eq_bot {V : Type*} (G : SimpleGraph V) (s : Set V) :
    G.induce s = ⊥ ↔ G.IsIndepSet s
isTree_avoids_geodesic_of_avoids_walkIn LeanGraph Theory & Graph Algorithms

In a tree, if some walk from u to v uses no edge of F, then the geodesic from u to v uses no edge of F either: a tree has a unique path between two vertices, and any F-avoiding walk can be reduced to that path without gaining edges.

theorem isTree_avoids_geodesic_of_avoids_walk
    {V : Type*} (G : SimpleGraph V) (hG : G.IsTree)
    {F : Finset (Sym2 V)} {u v : V} {q : G.Walk u v}
    (hq : ∀ e ∈ q.edges, e ∉ F) :
    ∃ p : G.Walk u v, p.IsPath ∧ p.length = G.dist u v ∧ ∀ e ∈ p.edges, e ∉ F
isTree_lapMatrix_second_eigenvalue_le_card_sub_twoIn LeanGraph Theory & Graph Algorithms

For a tree on n >= 2 vertices, the second largest Laplacian eigenvalue is at most n - 2 (with equality for K_2, K_3 and P_4).

theorem isTree_lapMatrix_second_eigenvalue_le_card_sub_two {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hTree : G.IsTree) (hn : 2 ≤ Fintype.card V) :
    simple_graph_laplacian_second_eigenvalue G ≤ (Fintype.card V : ℝ) - 2
is_caterpillar_iso_of_third_ps_eq_of_card_fourIn LeanGraph Theory & Graph Algorithms

Any two caterpillars on 4 vertices with equal third principal specializations are isomorphic.

theorem is_caterpillar_iso_of_third_ps_eq_of_card_four
    {V₁ V₂ : Type*} [Fintype V₁] [DecidableEq V₁] [Fintype V₂] [DecidableEq V₂]
    (T₁ : SimpleGraph V₁) (T₂ : SimpleGraph V₂)
    [DecidableRel T₁.Adj] [DecidableRel T₂.Adj]
    (hT₁ : is_caterpillar T₁) (hT₂ : is_caterpillar T₂)
    (hcard₁ : Fintype.card V₁ = 4) (hcard₂ : Fintype.card V₂ = 4)
    (heq : third_principal_specialization T₁ = third_principal_specialization T₂) :
    Nonempty (T₁ ≃g T₂)
is_geodesic_card_of_adjIn LeanGraph Theory & Graph Algorithms

For any two adjacent vertices u and v in a simple graph G, the number of geodesics between u and v is exactly 1.

theorem is_geodesic_card_of_adj {V : Type*} (G : SimpleGraph V) {u v : V} (h : G.Adj u v) :
    Nat.card {p : G.Walk u v // is_geodesic p} = 1
is_graph_orientation_looplessIn LeanGraph Theory & Graph Algorithms

An orientation of a simple graph has no self-loops: for any vertex v, ¬ D.Adj v v.

theorem is_graph_orientation_loopless {n : ℕ} (G : SimpleGraph (Fin n)) (D : Digraph (Fin n))
    (hD : is_graph_orientation G D) (v : Fin n) : ¬ D.Adj v v
is_knrs_of_edge_density_boundIn LeanGraph Theory & Graph Algorithms

If for every n &gt; 0 and every graph G on n vertices the homomorphism density satisfies q(F,G) ≥ (2|E(G)|/n²)^(e(F)), then F satisfies the KNRS conjecture.

theorem is_knrs_of_edge_density_bound {α : Type*} [Fintype α] (F : SimpleGraph α)
    (h : ∀ (n : ℕ), 0 < n → ∀ G : SimpleGraph (Fin n),
      (2 * (Nat.card ↑G.edgeSet : ℝ) / (n : ℝ) ^ 2) ^ (Nat.card ↑F.edgeSet) ≤ graph_hom_density F G) :
    is_knrs F
is_knrs_sumIn LeanGraph Theory & Graph Algorithms

If the graphs F and H both satisfy the KNRS conjecture, then so does their disjoint union F ⊔ H.

theorem is_knrs_sum {α β : Type*} [Fintype α] [Fintype β] (F : SimpleGraph α) (H : SimpleGraph β)
    (hF : is_knrs F) (hH : is_knrs H) : is_knrs (SimpleGraph.sum F H)
is_mst_for_of_zero_subgraph_reachableIn LeanGraph Theory & Graph Algorithms

If T is a spanning tree of G and the 0-weight edges of T span all 0-weight edges of G under realization α, then T is a minimum spanning tree for G under α.

open scoped Classical in
theorem is_mst_for_of_zero_subgraph_reachable {V : Type*} [Fintype V]
    (G T : SimpleGraph V) (hTG : T ≤ G) (hT : T.IsTree) (α : G.edgeSet → Bool)
    (hreach : (T ⊓ SimpleGraph.fromEdgeSet {s | ∃ h : s ∈ G.edgeSet, α ⟨s, h⟩ = false}).Reachable =
      (SimpleGraph.fromEdgeSet {s | ∃ h : s ∈ G.edgeSet, α ⟨s, h⟩ = false}).Reachable) :
    is_mst_for G T α
is_spanning_path_graph_connectedIn LeanGraph Theory & Graph Algorithms

A graph on n ≥ 2 vertices whose vertices can be ordered so that exactly consecutive vertices are adjacent is connected.

theorem is_spanning_path_graph_connected {n : ℕ} (hn : 2 ≤ n) {H : SimpleGraph (Fin n)}
    (h : is_spanning_path_graph H) : H.Connected
is_steiner_system_one_one_fin1In LeanGraph Theory & Graph Algorithms

On the type Fin 1, the set containing only the universe Finset.univ is a Steiner system with parameters t = 1 and r = 1.

theorem is_steiner_system_one_one_fin1 :
    is_steiner_system 1 1 ({Finset.univ} : Set (Finset (Fin 1)))
is_strong_odd_coloring_of_dist_two_properIn LeanGraph Theory & Graph Algorithms

If a colouring of G gives distinct colours to any two vertices joined by a walk of length 1 or 2 (equivalently, is a proper colouring of the square of G), then it is a strong odd colouring of G.

theorem is_strong_odd_coloring_of_dist_two_proper {V κ : Type} [Fintype V] [DecidableEq V]
    [DecidableEq κ] (G : SimpleGraph V) [DecidableRel G.Adj] (f : V → κ)
    (hproper : ∀ ⦃u v : V⦄, (dist_two_graph G).Adj u v → f u ≠ f v) :
    is_strong_odd_coloring G f
is_tree_eq_starGraph_of_forall_neighbor_card_le_oneIn LeanGraph Theory & Graph Algorithms

In any tree T on Fin n with 2 ≤ n, if every neighbor of u has degree at most 1, then T is the star graph centered at u.

theorem is_tree_eq_starGraph_of_forall_neighbor_card_le_one (n : ℕ) (hn : 2 ≤ n) (T : SimpleGraph (Fin n)) (hT : T.IsTree) (u : Fin n) (h : ∀ v, T.Adj u v → Nat.card (T.neighborSet v) ≤ 1) : T = SimpleGraph.starGraph u
is_vertex_critical_cliqueNum_add_one_leIn LeanGraph Theory & Graph Algorithms

A noncomplete k-vertex-critical graph has clique number at most k - 1. Indeed, if it had a clique of size k, then since it is k-critical and noncomplete it has more than k vertices, so some vertex v misses that clique; but then G - v still contains a k-clique and hence has chromatic number at least k, contradicting vertex-criticality.

theorem is_vertex_critical_cliqueNum_add_one_le {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {k r : ℕ}
    (h_noncomplete : G ≠ ⊤) (h_crit : is_vertex_critical G k) (h_omega : G.cliqueNum = r) :
    r + 1 ≤ k
is_vertex_critical_connectedIn LeanGraph Theory & Graph Algorithms

A noncomplete k-vertex-critical graph is connected: if G split into two nonempty parts with no edges between them, a (k-1)-colouring of G - v (v in the other part) would colour one part with k-1 colours and a (k-1)-colouring of G - u would colour the other, and together they would (k-1)-colour G.

theorem is_vertex_critical_connected {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {k : ℕ}
    (h_noncomplete : G ≠ ⊤) (h_crit : is_vertex_critical G k) : G.Connected
is_vertex_critical_min_degreeIn LeanGraph Theory & Graph Algorithms

In any k-vertex-critical graph, every vertex has degree at least k - 1.

theorem is_vertex_critical_min_degree {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {k : ℕ} (hcrit : is_vertex_critical G k) (v : V) :
    k - 1 ≤ G.degree v
k99_join_compl_k2_not_isContainedIn LeanGraph Theory & Graph Algorithms

The Petersen graph is not contained as a subgraph in the complete bipartite join graph K_{9,9} ∨ Compl(K_2).

theorem k99_join_compl_k2_not_isContained :
    ¬ SimpleGraph.IsContained petersen_graph k99_join_compl_k2
k99_join_compl_k2_petersen_freeIn LeanGraph Theory & Graph Algorithms

The complete bipartite join graph K_{9,9} ∨ Compl(K_2) contains no subgraph isomorphic to the Petersen graph: there is no injective graph homomorphism from the Petersen graph into K_{9,9} ∨ Compl(K_2).

theorem k99_join_compl_k2_petersen_free :
    IsEmpty (SimpleGraph.Copy petersen_graph k99_join_compl_k2)
k_plus_isIndContained_of_clique_enumIn LeanGraph Theory & Graph Algorithms

Let f : Fin s → V be an injective map whose image is a clique, and let x be a vertex outside the image that is adjacent to f 0 and to no other f i. Then the example graph K_s^+ (the clique K_s plus one pendant vertex attached to a single clique vertex) is induced in G.

theorem k_plus_isIndContained_of_clique_enum {V : Type*} (G : SimpleGraph V) {s : ℕ} (hs : 0 < s)
    {f : Fin s → V} (finj : Function.Injective f)
    (hcl : ∀ i j : Fin s, i ≠ j → G.Adj (f i) (f j))
    {x : V} (hx : ∀ i, x ≠ f i) (hadj : G.Adj x (f ⟨0, hs⟩))
    (huniq : ∀ i : Fin s, G.Adj x (f i) → i = ⟨0, hs⟩) :
    SimpleGraph.IsIndContained (k_plus_graph s) G
kneser_compl_adjIn LeanGraph Theory & Graph Algorithms

Two vertices s and t in the complement of the Kneser graph K(n, k) are adjacent if and only if they are distinct and have nonempty intersection.

theorem kneser_compl_adj (n k : ℕ) (s t : {s : Finset (Fin n) // s.card = k}) :
    (kneser_compl n k).Adj s t ↔ s ≠ t ∧ ¬ Disjoint s.1 t.1
kneser_compl_cov_two_k_two_free_leIn LeanGraph Theory & Graph Algorithms

For integers k ≥ 2 and n ≥ 2k + 1, the complement of the Kneser graph K(n, k) can be covered by n - 2k many 2K₂-free graphs; that is, there exist n - 2k simple graphs G_0, ..., G_{n-2k-1} on the k-element subsets of Fin n, each 2K₂-free, whose union of edge sets is the edge set of the complement of K(n, k).

theorem kneser_compl_cov_two_k_two_free_le (n k : ℕ) (hk : 2 ≤ k) (hn : 2 * k + 1 ≤ n) :
    ∃ G : Fin (n - 2 * k) → SimpleGraph {s : Finset (Fin n) // s.card = k},
      (∀ i, IsTwoKTwoFree (G i)) ∧
      ∀ s t, (kneser_compl n k).Adj s t ↔ ∃ i, (G i).Adj s t
kneser_hom_cycle_reduction_to_cycle_with_chordsIn LeanGraph Theory & Graph Algorithms

Let k ≥ 2, m ≥ 6, and 3 ≤ a ≤ m - 3. For every graph G, there exists a graph homomorphism from the G-stable Kneser graph of the disjoint sum of G and the (m-1)-cycle to the G-stable Kneser graph of the disjoint sum of G and the m-cycle with two chords {1, a} and {a+1, m}.

theorem kneser_hom_cycle_reduction_to_cycle_with_chords
    {V : Type*} (G : SimpleGraph V) (k m a : ℕ)
    (hk : 2 ≤ k) (hm : 6 ≤ m) (ha : 3 ≤ a) (ham : a ≤ m - 3) :
    Nonempty (GStableKneser (G.sum (SimpleGraph.cycleGraph (m - 1))) k →g
              GStableKneser (G.sum (cycle_with_two_chords m a)) k)
knrs_of_card_le_oneIn LeanGraph Theory & Graph Algorithms

Every finite graph on at most one vertex satisfies the KNRS homomorphism density conjecture.

theorem knrs_of_card_le_one {α : Type*} [Fintype α] (F : SimpleGraph α) (h : Fintype.card α ≤ 1) :
    is_knrs F
knrs_of_dominated_vertexIn LeanGraph Theory & Graph Algorithms

If deleting a vertex v yields a graph satisfying the KNRS conjecture, and v is dominated by another vertex u (its neighbourhood is contained in N(u) ∪ {u}), then F itself satisfies the KNRS conjecture.

theorem knrs_of_dominated_vertex {α : Type*} [Fintype α] [DecidableEq α] (F : SimpleGraph α) (v : α)
    (hF' : is_knrs (SimpleGraph.induce {x : α | x ≠ v} F))
    (hdom : ∃ u : α, u ≠ v ∧ F.neighborSet v ⊆ F.neighborSet u ∪ {u}) : is_knrs F
l_path_isIndContained_of_clique_enumIn LeanGraph Theory & Graph Algorithms

Let f : Fin t → V be an injective map whose image is a clique, and let x, y be two vertices outside the image with x adjacent to f 0 and to no other f i, y adjacent to x and to no f i. Then the example graph L_t (the clique K_t with a path of length two attached to a single clique vertex) is induced in G.

theorem l_path_isIndContained_of_clique_enum {V : Type*} (G : SimpleGraph V) {t : ℕ} (ht : 0 < t)
    {f : Fin t → V} (finj : Function.Injective f)
    (hcl : ∀ i j : Fin t, i ≠ j → G.Adj (f i) (f j))
    {x y : V} (hx : ∀ i, x ≠ f i) (hy : ∀ i, y ≠ f i) (hxy : x ≠ y)
    (hxadj : G.Adj x (f ⟨0, ht⟩))
    (hxuniq : ∀ i : Fin t, G.Adj x (f i) → i = ⟨0, ht⟩)
    (hyx : G.Adj y x) (hyq : ∀ i : Fin t, ¬ G.Adj y (f i)) :
    SimpleGraph.IsIndContained (l_path_graph t) G
lapMatrix_commute_scalar_sub_all_onesIn LeanGraph Theory & Graph Algorithms

For any simple graph G and natural number d, the Laplacian matrix L(G) over ℝ commutes with ((d+1)I - J), where J is the all-ones matrix.

open scoped Classical in
theorem lapMatrix_commute_scalar_sub_all_ones
    {V : Type*} [Fintype V] (d : ℕ) (G : SimpleGraph V) :
    Commute (G.lapMatrix ℝ)
      (((d + 1 : ℝ) • (1 : Matrix V V ℝ) - Matrix.of fun (_ _ : V) ↦ (1 : ℝ)))
laplacian_mu1_eq_lapMatrix_eigenvalues0In LeanGraph Theory & Graph Algorithms

For a simple graph G on a nonempty finite vertex type with decidable adjacency, laplacian_mu1 G equals the eigenvalue at index 0 of the Hermitian Laplacian matrix L = D - A of G.

theorem laplacian_mu1_eq_lapMatrix_eigenvalues0 {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (h : 1 ≤ Fintype.card V) :
    laplacian_mu1 G = (SimpleGraph.isHermitian_lapMatrix ℝ G).eigenvalues₀ ⟨0, h⟩
large_cycle_product_not_wcpIn LeanGraph Theory & Graph Algorithms

For m, n ≥ 6 with m, n ≠ 7, the Cartesian product C_m □ C_n does NOT have the well-covered powers property (core of Proposition 5.1 for the case where neither factor is C_3, C_4, C_5 or C_7).

theorem large_cycle_product_not_wcp (m n : ℕ) (hm6 : 6 ≤ m) (hm7 : m ≠ 7) (hn6 : 6 ≤ n) (hn7 : n ≠ 7) :
    ¬ simple_graph_has_well_covered_powers (SimpleGraph.cycleGraph m □ SimpleGraph.cycleGraph n)
leaf_rich_except_zero_forcing_poly_log_concaveIn LeanGraph Theory & Graph Algorithms

For any finite graph in which every vertex away from r is either a leaf attached to a non-leaf different from r or has at least two leaf neighbors different from r, the coefficients of the zero forcing polynomial are log-concave.

theorem leaf_rich_except_zero_forcing_poly_log_concave {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (r : V) (hG : graph_leaf_rich_except G r) : ∀ k : ℕ, (zero_forcing_poly G).coeff k * (zero_forcing_poly G).coeff (k + 2) ≤ (zero_forcing_poly G).coeff (k + 1) * (zero_forcing_poly G).coeff (k + 1)
leaf_rich_exchange_has_candidateIn LeanGraph Theory & Graph Algorithms

For two zero forcing complements A and B with |A| < |B|, there exists an element x ∈ B \ A falling into one of the four insertion cases.

theorem leaf_rich_exchange_has_candidate {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (r : V) (hG : graph_leaf_rich_except G r) (A B : Finset V) (hA : is_zero_forcing_set G ((Finset.univ \ A : Finset V) : Set V)) (hB : is_zero_forcing_set G ((Finset.univ \ B : Finset V) : Set V)) (hcard : A.card < B.card) : ∃ x ∈ B \ A, (x ≠ r ∧ G.degree x ≠ 1) ∨ (r ∉ A ∧ x ≠ r ∧ ∀ b ∈ A, ∀ v : V, G.Adj v x → b ≠ r → G.Adj v b → G.degree b ≠ 1) ∨ (r ∉ A ∧ x = r ∧ ∃ v : V, G.Adj v r ∧ 2 ≤ G.degree v ∧ ∀ a ∈ A, a ≠ r → G.Adj v a → G.degree a ≠ 1) ∨ (x ≠ r ∧ G.degree x = 1 ∧ (∀ b ∈ A, ∀ v : V, G.Adj v x → b ≠ r → G.Adj v b → G.degree b ≠ 1) ∧ ∃ w : V, G.Adj w r ∧ 2 ≤ G.degree w ∧ (∀ a : V, a ≠ r → G.Adj w a → G.degree a = 1 → a ∉ A) ∧ ¬ G.Adj w x)
leaf_rich_insert_leaf_of_not_mem_rIn LeanGraph Theory & Graph Algorithms

When r ∉ A, inserting a leaf x ≠ r into A preserves zero forcing provided A contains no other leaf at x's support.

theorem leaf_rich_insert_leaf_of_not_mem_r {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (r : V) (hG : graph_leaf_rich_except G r) (A : Finset V) (x : V) (hA : is_zero_forcing_set G ((Finset.univ \ A : Finset V) : Set V)) (hrA : r ∉ A) (hxr : x ≠ r) (hleaf : ∀ b ∈ A, ∀ v : V, G.Adj v x → b ≠ r → G.Adj v b → G.degree b ≠ 1) : is_zero_forcing_set G ((Finset.univ \ insert x A : Finset V) : Set V)
leaf_rich_insert_leaf_of_witnessIn LeanGraph Theory & Graph Algorithms

Inserting a leaf x into A preserves zero forcing when A has no other leaf at x's support, provided A possesses a witness support w adjacent to r that is not adjacent to x.

theorem leaf_rich_insert_leaf_of_witness {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (r : V) (hG : graph_leaf_rich_except G r) (A : Finset V) (x : V) (hA : is_zero_forcing_set G ((Finset.univ \ A : Finset V) : Set V)) (hxr : x ≠ r) (hdx : G.degree x = 1) (hleaf : ∀ b ∈ A, ∀ v : V, G.Adj v x → b ≠ r → G.Adj v b → G.degree b ≠ 1) (w : V) (hwr : G.Adj w r) (hwd : 2 ≤ G.degree w) (hw : ∀ a : V, a ≠ r → G.Adj w a → G.degree a = 1 → a ∉ A) (hnot_adj : ¬ G.Adj w x) : is_zero_forcing_set G ((Finset.univ \ insert x A : Finset V) : Set V)
leaf_rich_insert_non_leafIn LeanGraph Theory & Graph Algorithms

Inserting a vertex x ≠ r that is not a leaf into the complement of a zero forcing set preserves the zero forcing property.

theorem leaf_rich_insert_non_leaf {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (r : V) (hG : graph_leaf_rich_except G r) (A : Finset V) (x : V) (hA : is_zero_forcing_set G ((Finset.univ \ A : Finset V) : Set V)) (hxr : x ≠ r) (hdx : G.degree x ≠ 1) : is_zero_forcing_set G ((Finset.univ \ insert x A : Finset V) : Set V)
leaf_rich_insert_rootIn LeanGraph Theory & Graph Algorithms

If r ∉ A and some support v adjacent to r with degree ≥ 2 has no leaves in A, then inserting r into A preserves zero forcing.

theorem leaf_rich_insert_root {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (r : V) (hG : graph_leaf_rich_except G r) (A : Finset V) (hA : is_zero_forcing_set G ((Finset.univ \ A : Finset V) : Set V)) (v : V) (hvr : G.Adj v r) (hvd : 2 ≤ G.degree v) (hvl : ∀ a ∈ A, a ≠ r → G.Adj v a → G.degree a ≠ 1) : is_zero_forcing_set G ((Finset.univ \ insert r A : Finset V) : Set V)
linear_forest_wiener_bound_of_le_threeIn LeanGraph Theory & Graph Algorithms

Every finite connected simple graph G with decidable equality on its vertex type whose maximum order of an induced linear forest is at most 3 satisfies 4 * W(G) ≤ L(G) * n * (n - 1), where W(G) is the Wiener index of G, L(G) is the maximum order of an induced linear forest in G, and n is the number of vertices of G.

theorem linear_forest_wiener_bound_of_le_three {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (hconn : G.Connected) (hL : max_induced_linear_forest G ≤ 3) : 4 * wiener_index G ≤ max_induced_linear_forest G * Fintype.card V * (Fintype.card V - 1)
locally_dense_edge_densityIn LeanGraph Theory & Graph Algorithms

If an N-vertex graph G is (ρ,d)-locally dense with ρ ≤ 1, then G has at least d·N²/2 edges, i.e. d·N² ≤ 2·|E(G)|.

theorem locally_dense_edge_density {β : Type*} [Fintype β] (G : SimpleGraph β) {ρ d : ℝ}
    (hd : is_locally_dense G ρ d) (hρ : ρ ≤ 1) :
    d * (Fintype.card β : ℝ) ^ 2 ≤ 2 * (Nat.card ↑G.edgeSet : ℝ)
loopless_digraph_count_dominatingIn LeanGraph Theory & Graph Algorithms

In any loopless digraph with in- and out-degrees d, a dominating vertex has arcs in both directions to all other vertices, so loopless_digraph_count d equals the count on n vertices with v deleted and degrees reduced by 1.

theorem loopless_digraph_count_dominating (n : ℕ) (d : Fin (n + 1) → ℕ) (v : Fin (n + 1)) (hv : d v = n) : loopless_digraph_count d = loopless_digraph_count (fun w => d (v.succAbove w) - 1)
loopless_digraph_count_isolatedIn LeanGraph Theory & Graph Algorithms

In any loopless digraph with in- and out-degrees d, an isolated vertex has no incident arcs, so loopless_digraph_count d equals the count on n vertices with v deleted.

theorem loopless_digraph_count_isolated (n : ℕ) (d : Fin (n + 1) → ℕ) (v : Fin (n + 1)) (hv : d v = 0) : loopless_digraph_count d = loopless_digraph_count (d ∘ v.succAbove)
loopless_digraph_count_zeroIn LeanGraph Theory & Graph Algorithms

For n = 0, the unique digraph on Fin 0 is loopless and trivially satisfies the degree conditions, so loopless_digraph_count d = 1.

theorem loopless_digraph_count_zero (d : Fin 0 → ℕ) : loopless_digraph_count d = 1
matrix_abs_det_le_sqrt_prod_row_sum_sqIn LeanGraph Theory & Graph Algorithms

Hadamard's determinant inequality: for a real n × n matrix A, |det A| ≤ √(∏_{i=1}^n ∑_j A_ij²), the square root of the product of the squared Euclidean norms of the rows.

theorem matrix_abs_det_le_sqrt_prod_row_sum_sq {n : ℕ} (A : Matrix (Fin n) (Fin n) ℝ) : |A.det| ≤ Real.sqrt (∏ i : Fin n, ∑ j : Fin n, (A i j) ^ 2)
matrix_det_zero_of_row_sum_zeroIn LeanGraph Theory & Graph Algorithms

A real square matrix of size n ≥ 1 whose rows all sum to zero has determinant zero (since the all-ones vector is in its kernel).

theorem matrix_det_zero_of_row_sum_zero {n : ℕ} (hn : 1 ≤ n) (M : Matrix (Fin n) (Fin n) ℝ) (h_row : ∀ i : Fin n, ∑ j : Fin n, M i j = 0) : M.det = 0
matrix_geom_arborescence_detIn LeanGraph Theory & Graph Algorithms

For a self-map f of Fin n with unique fixed point r, the matrix with row r all ones and rows i ≠ r equal to e_i - e_{f i} has determinant n if iterating f from every vertex reaches r, and 0 otherwise.

theorem matrix_geom_arborescence_det {n : ℕ} (hn : 1 ≤ n) (f : Fin n → Fin n) (r : Fin n) (hr : f r = r) (hne : ∀ v : Fin n, v ≠ r → f v ≠ v) : (Matrix.of (fun i j : Fin n => if i = r then (1 : ℝ) else (if i = j then (1 : ℝ) else 0) - (if f i = j then (1 : ℝ) else 0))).det = (n : ℝ) * if (∀ v : Fin n, f^[n] v = r) then (1 : ℝ) else 0
matrix_spectral_radius_eq_toEuclideanCLMIn LeanGraph Theory & Graph Algorithms

The spectral radius of a real square matrix equals the spectral radius of the continuous linear operator on Euclidean space that it induces.

theorem matrix_spectral_radius_eq_toEuclideanCLM {V : Type*} [Fintype V] [DecidableEq V]
    (A : Matrix V V ℝ) :
    spectralRadius ℝ A = spectralRadius ℝ ((Matrix.toEuclideanCLM (𝕜 := ℝ) (n := V)) A)
matrix_spectral_radius_ge_of_eigenvectorIn LeanGraph Theory & Graph Algorithms

If a real square matrix A has a nonzero real eigenvector w for a nonnegative eigenvalue lam, then ofReal lam is at most the spectral radius of A.

theorem matrix_spectral_radius_ge_of_eigenvector {n : Type*} [Fintype n] [DecidableEq n]
    (A : Matrix n n ℝ) (w : n → ℝ) (lam : ℝ) (hlam : 0 ≤ lam) (hw : w ≠ 0)
    (h : A.mulVec w = lam • w) : ENNReal.ofReal lam ≤ spectralRadius ℝ A
matrix_toEuclideanCLM_isSelfAdjoint_of_isSymmIn LeanGraph Theory & Graph Algorithms

If A is a real symmetric matrix, the continuous linear operator on Euclidean space that it induces is self-adjoint.

theorem matrix_toEuclideanCLM_isSelfAdjoint_of_isSymm {V : Type*} [Fintype V] [DecidableEq V]
    (A : Matrix V V ℝ) (hA : A.IsSymm) :
    IsSelfAdjoint (Matrix.toEuclideanCLM (𝕜 := ℝ) A)
max_induced_linear_forest_delete_leIn LeanGraph Theory & Graph Algorithms

For any vertex u in a finite simple graph G with decidable equality on its vertex type, the maximum order of an induced linear forest in G.delete u is at most that in G, max_induced_linear_forest (G.delete u) ≤ max_induced_linear_forest G.

theorem max_induced_linear_forest_delete_le {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (u : V) : max_induced_linear_forest (G.delete u) ≤ max_induced_linear_forest G
max_induced_linear_forest_ge_three_of_not_completeIn LeanGraph Theory & Graph Algorithms

Every finite connected simple graph that is not complete has maximum order of an induced linear forest at least 3.

theorem max_induced_linear_forest_ge_three_of_not_complete {V : Type*} [Fintype V] (G : SimpleGraph V) (hconn : G.Connected) (hnot : G ≠ ⊤) : 3 ≤ max_induced_linear_forest G
mean_order_eq_iff_q_zeroIn LeanGraph Theory & Graph Algorithms

For lambda >= 1 the weighted mean order of G equals that of K_n if and only if Q_G(lambda) vanishes at lambda.

open scoped BigOperators Polynomial Classical in
theorem mean_order_eq_iff_q_zero {V : Type*} [Fintype V] [Nonempty V]
    (G : SimpleGraph V) {lam : ℝ} (hlam : 1 ≤ lam) :
    connected_induced_mean_order G lam = weighted_clique_mean (Fintype.card V) lam ↔
      (conn_set_poly_Q G).eval lam = 0
mean_order_ge_iff_q_nonnegIn LeanGraph Theory & Graph Algorithms

For lambda >= 1 the weighted mean order of G is at least that of K_n if and only if Q_G(lambda) is nonnegative, since the denominator Z_G(lambda)*((1+lambda)^n-1) is positive.

open scoped BigOperators Polynomial Classical in
theorem mean_order_ge_iff_q_nonneg {V : Type*} [Fintype V] [Nonempty V]
    (G : SimpleGraph V) {lam : ℝ} (hlam : 1 ≤ lam) :
    weighted_clique_mean (Fintype.card V) lam ≤ connected_induced_mean_order G lam ↔
      0 ≤ (conn_set_poly_Q G).eval lam
mean_order_sub_clique_meanIn LeanGraph Theory & Graph Algorithms

The lambda-weighted mean order of G minus that of K_n equals lambda times Q_G(lambda), divided by Z_G(lambda) times ((1+lambda)^n - 1).

open scoped BigOperators Polynomial Classical in
theorem mean_order_sub_clique_mean {V : Type*} [Fintype V] (G : SimpleGraph V) (lam : ℝ)
    (hZ : (conn_set_poly G).eval lam ≠ 0) (hD : (1 + lam) ^ Fintype.card V - 1 ≠ 0) :
    connected_induced_mean_order G lam - weighted_clique_mean (Fintype.card V) lam
      = lam * (conn_set_poly_Q G).eval lam
        / ((conn_set_poly G).eval lam * ((1 + lam) ^ Fintype.card V - 1))
minor_bridge_edges_sup_forest_isAcyclicIn LeanGraph Theory & Graph Algorithms

For any partial realization β on a graph G, taking an acyclic subgraph F₀ of the weight-0 edges together with all bridge edges in the minor G_β produces an acyclic graph.

open scoped Classical in
theorem minor_bridge_edges_sup_forest_isAcyclic {V : Type*} [Fintype V]
    (G : SimpleGraph V) (β : G.edgeSet → Option Bool)
    (F₀ : SimpleGraph V)
    (hF₀_le : F₀ ≤ SimpleGraph.fromEdgeSet {s | ∃ h : s ∈ G.edgeSet, β ⟨s, h⟩ = some false})
    (hF₀_ac : F₀.IsAcyclic) :
    (F₀ ⊔ SimpleGraph.fromEdgeSet
      {s | ∃ h : s ∈ G.edgeSet, β ⟨s, h⟩ = none ∧ minor_edge_is_bridge G β ⟨s, h⟩}).IsAcyclic
minor_edges_loop_or_bridge_imp_mst_id_certificateIn LeanGraph Theory & Graph Algorithms

If every unqueried edge of a connected simple graph G on a finite vertex set is either a loop or a bridge in the minor G_β, then β is an MST identification certificate for G.

open scoped Classical in
theorem minor_edges_loop_or_bridge_imp_mst_id_certificate {V : Type*} [Fintype V]
    (G : SimpleGraph V) (hG : G.Connected) (β : G.edgeSet → Option Bool)
    (hall : ∀ (e : G.edgeSet), β e = none →
      minor_edge_is_loop G β e ∨ minor_edge_is_bridge G β e) :
    is_mst_certificate G β
mst_and_dist_bounds_on_optimal_tour_lengthIn LeanGraph Theory & Graph Algorithms

For every finite connected undirected graph G on n ≥ 2 vertices with positive edge weights w, (a) the weight of a minimum spanning tree is at most ((n - 1) / n) times the minimum length of a closed walk visiting all vertices, and (b) the minimum length of a closed walk visiting all vertices is at least twice the shortest-path distance between any two vertices u and v.

theorem mst_and_dist_bounds_on_optimal_tour_length {V : Type*} [Fintype V]
    (G : SimpleGraph V) (hG : G.Connected) (hn : 2 ≤ Fintype.card V)
    (w : Sym2 V → ℝ) (hw : ∀ e ∈ G.edgeSet, 0 < w e) :
    mst_weight G w ≤ ((Fintype.card V - 1 : ℝ) / (Fintype.card V : ℝ)) * optimal_tour_length G w ∧
    ∀ u v : V, 2 * weighted_dist G w u v ≤ optimal_tour_length G w
mst_id_certificate_iff_minor_edges_loop_or_bridgeIn LeanGraph Theory & Graph Algorithms

Let G be a connected simple graph on a finite vertex set and let β : G.edgeSet → Option Bool be a partial realization of edge weights. Then β is an MST identification certificate on graph G if and only if every unqueried edge of the minor G_β (obtained by contracting edges with weight 0 and deleting edges with weight 1) is either a loop or a bridge.

open scoped Classical in
theorem mst_id_certificate_iff_minor_edges_loop_or_bridge {V : Type*} [Fintype V]
    (G : SimpleGraph V) (hG : G.Connected) (β : G.edgeSet → Option Bool) :
    is_mst_certificate G β ↔
      ∀ (e : G.edgeSet), β e = none →
        minor_edge_is_loop G β e ∨ minor_edge_is_bridge G β e
mst_le_factor_optimal_tourIn LeanGraph Theory & Graph Algorithms

In any finite connected simple graph G on n ≥ 2 vertices with positive edge weights w, the weight of a minimum spanning tree is at most ((n - 1) / n) times the minimum length of a closed walk visiting all vertices.

theorem mst_le_factor_optimal_tour {V : Type*} [Fintype V]
    (G : SimpleGraph V) (hG : G.Connected) (hn : 2 ≤ Fintype.card V)
    (w : Sym2 V → ℝ) (hw : ∀ e ∈ G.edgeSet, 0 < w e) :
    mst_weight G w ≤ ((Fintype.card V - 1 : ℝ) / (Fintype.card V : ℝ)) * optimal_tour_length G w
mst_weight_le_of_connected_subgraphIn LeanGraph Theory & Graph Algorithms

In any finite edge-weighted graph G with non-negative edge weights w, the minimum spanning tree weight is bounded above by the total edge weight of any connected spanning subgraph H ≤ G.

theorem mst_weight_le_of_connected_subgraph {V : Type*} [Fintype V]
    (G : SimpleGraph V) (w : Sym2 V → ℝ) (hw : ∀ e ∈ G.edgeSet, 0 ≤ w e)
    (H : SimpleGraph V) (hH : H.Connected) (hHG : H ≤ G) :
    open scoped Classical in
    mst_weight G w ≤ ∑ e ∈ H.edgeFinset, w e
multiflow_unit_reduction_c4In LeanGraph Theory & Graph Algorithms

If capacities u : E → ℝ and demands d : K → ℝ are integral, f is a feasible multiflow, and the total flow on edge e0 is strictly less than u e0, then reducing the capacity of e0 by 1 still satisfies condition (C4) with demands d.

theorem multiflow_unit_reduction_c4
    {V E K : Type*} [Fintype E] [Fintype K] [DecidableEq V] [DecidableEq E]
    (G : DirectedMultigraph V E) (H : DirectedMultigraph V K)
    (u : E → ℝ) (d : K → ℝ) (hu_int : IsIntegralWeight u) (hd_int : IsIntegralWeight d)
    (f : K → E → ℝ) (hfeas : IsFeasibleMultiflow G H u d f)
    (e0 : E) (he0 : (∑ i : K, f i e0) < u e0) :
    SatisfiesC4 G H (fun e => if e = e0 then u e - 1 else u e) d
mutual_visibility_set_card_boundIn LeanGraph Theory & Graph Algorithms

Let G be a d-regular simple graph of girth at least 5 on a finite vertex set V. If S is a finite mutual-visibility set of G, then (2 * d - 1) * S.card ≤ d * Fintype.card V.

theorem mutual_visibility_set_card_bound {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {d : ℕ} (hreg : G.IsRegularOfDegree d)
    (hgirth : 5 ≤ G.girth) {S : Finset V} (hS : is_mutual_visibility_set G (S : Set V)) :
    (2 * d - 1) * S.card ≤ d * Fintype.card V
mutual_visibility_set_max_degree_le_oneIn LeanGraph Theory & Graph Algorithms

Let G be a simple graph of girth at least 5 on a finite vertex set. If S is a finite mutual-visibility set of G, then every vertex in S has at most one neighbor in S.

theorem mutual_visibility_set_max_degree_le_one {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hgirth : 5 ≤ G.girth)
    {S : Finset V} (hS : is_mutual_visibility_set G (S : Set V)) {u : V} (hu : u ∈ S) :
    (G.neighborFinset u ∩ S).card ≤ 1
nat_card_perm_preserving_finsetIn LeanGraph Theory & Graph Algorithms

If s and t are disjoint finsets covering a finite type V, then the number of permutations of V mapping s setwise onto itself is |s|! · |t|!.

theorem nat_card_perm_preserving_finset {V : Type*} [Fintype V] [DecidableEq V]
    (s t : Finset V) (hdisj : Disjoint s t) (huniv : s ∪ t = Finset.univ) :
    Nat.card {σ : Equiv.Perm V // ∀ v : V, (v ∈ s ↔ σ v ∈ s)} = s.card.factorial * t.card.factorial
nat_k_le_one_add_choose_twoIn LeanGraph Theory & Graph Algorithms

For any natural number k, k ≤ 1 + k.choose 2.

theorem nat_k_le_one_add_choose_two (k : ℕ) : k ≤ 1 + k.choose 2
nat_min_cyclic_dist_le_natAbsIn LeanGraph Theory & Graph Algorithms

If an integer x is congruent to k mod n with k < n, then |x| >= min(k, n-k).

theorem nat_min_cyclic_dist_le_natAbs (n k : ℕ) (x : ℤ) (hk : k < n)
    (h : x ≡ (k : ℤ) [ZMOD (n : ℤ)]) : min k (n - k) ≤ x.natAbs
net_graph_claw_freeIn LeanGraph Theory & Graph Algorithms

The net graph is claw-free: its only vertices of degree at least 3 are 0, 4 and 5 (each of degree 3), and each has an adjacent pair among its three neighbours (4-5, 0-5, 0-4 respectively), so no vertex has three pairwise non-adjacent neighbours, i.e. no induced K_{1,3}.

theorem net_graph_claw_free : IsClawFree net_graph
net_graph_connectedIn LeanGraph Theory & Graph Algorithms

The net graph is connected: every vertex reaches 0 (1→4→0, 2→5→0, 3→0, 4→0, 5→0).

theorem net_graph_connected : net_graph.Connected
net_graph_no_dominating_pairIn LeanGraph Theory & Graph Algorithms

The net graph has no dominating pair: every closed neighbourhood has size at most 4, and for every pair {u,v} some vertex is undominated ({0,4} misses 2, {0,5} misses 1, {4,5} misses 3; any pair containing a leaf only covers less).

theorem net_graph_no_dominating_pair : ¬ (∃ u v : ULift (Fin 6), ∀ w : ULift (Fin 6), w = u ∨ w = v ∨ net_graph.Adj u w ∨ net_graph.Adj v w)
net_graph_no_long_cycleIn LeanGraph Theory & Graph Algorithms

The net graph contains no induced cycle of length at least 6: for m > 6 an induced embedding is an injection Fin m → Fin 6 (impossible), and for m = 6 no induced 6-cycle exists because the three leaves have degree 1 while every vertex of C6 has degree 2.

theorem net_graph_no_long_cycle : ∀ (m : ℕ), 6 ≤ m → IsEmpty (SimpleGraph.cycleGraph m ↪g net_graph)
net_graph_no_six_cycleIn LeanGraph Theory & Graph Algorithms

The net graph contains no induced 6-cycle. Every vertex of C6 has two distinct neighbours; an induced embedding preserves this, but the leaves 1, 2, 3 of the net graph have exactly one neighbour each, so the image of the embedding must lie in {0,4,5}, contradicting injectivity of a map from a 6-element set.

theorem net_graph_no_six_cycle : IsEmpty (SimpleGraph.cycleGraph 6 ↪g net_graph)
net_graph_pk_freeIn LeanGraph Theory & Graph Algorithms

The net graph on 6 vertices is P7-free, since an induced P7 needs 7 distinct vertices but the graph has only 6.

theorem net_graph_pk_free : IsPkFree net_graph 7
non_unimodal_connected_and_total_forcing_polynomials_gtIn LeanGraph Theory & Graph Algorithms

For every integer t ≥ 24, the connected forcing polynomial and the total forcing polynomial of gt_graph t are both equal to the zero forcing polynomial of gt_graph t, and neither the connected forcing polynomial nor the total forcing polynomial is unimodal.

theorem non_unimodal_connected_and_total_forcing_polynomials_gt (t : ℕ) (ht : 24 ≤ t) :
    connected_forcing_poly (gt_graph t) = zero_forcing_poly (gt_graph t) ∧
    total_forcing_poly (gt_graph t) = zero_forcing_poly (gt_graph t) ∧
    ¬ polynomial_is_unimodal (connected_forcing_poly (gt_graph t)) ∧
    ¬ polynomial_is_unimodal (total_forcing_poly (gt_graph t))
nonsustainable_tree_has_nonsustainable_successor_closer_to_starIn LeanGraph Theory & Graph Algorithms

Every non-sustainable tree X on Fin n (n ≥ 2) that is not isomorphic to the star completeBipartiteGraph (Fin 1) (Fin (n-1)) has a non-sustainable generalized-tree-shift successor Y whose adjacency spectral radius is strictly larger.

theorem nonsustainable_tree_has_nonsustainable_successor_closer_to_star
    (n : ℕ) (hn : 2 ≤ n) (X : SimpleGraph (Fin n))
    (hX : is_nonsustainable_tree X)
    (hXs : ¬ Nonempty (X ≃g completeBipartiteGraph (Fin 1) (Fin (n - 1)))) :
    ∃ Y : SimpleGraph (Fin n),
      is_nonsustainable_tree Y ∧ is_generalized_tree_shift X Y ∧
      adjacency_spectral_radius X < adjacency_spectral_radius Y
not_diam_le_three_of_forall_power_well_coveredIn LeanGraph Theory & Graph Algorithms

The statement diam_le_three_of_forall_power_well_covered is false: The statement is false. Counterexample: the circulant graph G = C_21(1,7) on V = Z/21Z, with x ~ y iff (y − x) mod 21 ∈ {1, 7, 14, 20} (i.e. y−x = ±1 or ±7). It satisfies all hypotheses of the theorem but has diameter 4 > 3: 1. Connected: the ±1 edges alone make C_21 a spanning cycle. 2. diam(G) = 4: not all vertex pairs are within distance 3, but all are within distance 4; explicitly dist(0,4) = 4. 3. Every power G^d is well-covered (all maximal independent sets of G^d have the same size): - d = 1: every maximal independent set has size 7 (there are 129 of them), - d = 2: every maximal independent set has size 3 (84 of them), - d = 3: every maximal independent set has size 2 (42 of them), - d ≥ 4: G^d is the complete graph K_21 (since diam = 4), whose maximal independent sets are the 21 singletons, all of size 1. So ∀ d ≥ 1, simple_graph_is_well_covered (simple_graph_power G d) holds, while G.diam = 4, contradicting G.diam ≤ 3. This was checked with Lean's own evaluator against the graph's exact combinatorics (experiments 2061 and 2062, recorded in memory): experiment 2061 computed the maximal-independent-set size tallies [(7,129)], [(3,84)], [(2,42)] for d = 1,2,3, and experiment 2062 confirmed all pairs reachable (connected), all pairs within distance 4, and some pair NOT within distance 3. Independent Python/networkx experiments 2019, 2020, 2022, 2023 (also in memory) agree, and experiment 2020 found the whole family C_21(i,7), C_28(i,7,14), etc., as well as the Cartesian products C_7 □ K_m (m ≥ 3, diameter 3+1 = 4) with all powers well-covered. My own exhaustive search for n ≤ 7 (experiments 2055–2058) found no smaller counterexample, which is consistent: the smallest witness genuinely needs 21 vertices.

theorem not_diam_le_three_of_forall_power_well_covered : ¬ (∀ {V : Type} [Fintype V] (G : SimpleGraph V), G.Connected →
      (∀ d : ℕ, 1 ≤ d → simple_graph_is_well_covered (simple_graph_power G d)) → G.diam ≤ 3)
not_digraph_two_cycle_free_degree_profile_transitive_fiveIn LeanGraph Theory & Graph Algorithms

The statement digraph_two_cycle_free_degree_profile_transitive_five is false: The statement is false for n = 5. When n = 5, the degree hypothesis hdeg specifies outdegrees 1, 2, 3, 4, 5 for vertices 0, 1, 2, 3, 4 respectively. Consider the digraph D on Fin 5 with adjacency: - 0 -> {0} - 1 -> {0, 4} - 2 -> {0, 1, 4} - 3 -> {0, 1, 2, 4} - 4 -> {0, 1, 2, 3, 4}. This graph satisfies all hypotheses: 1. hn : 5 ≤ 5 is trivial. 2. hdeg: outdegrees are exactly 1, 2, 3, 4, 5 (all v.val < 5, so the else 7 branch is never reached). 3. htwo: For any nonempty subset T ⊆ Fin 5, T cannot have minimum induced outdegree at least 2. Indeed, vertex 0 only points to 0, so 0 ∉ T. Then 1 only points to 4 in Fin 5 \ {0}, so 1 ∉ T. Then 2 only points to 4 in Fin 5 \ {0, 1}, so 2 ∉ T. Similarly 3 ∉ T and 4 ∉ T. Hence no nonempty T satisfies the premise of htwo, making htwo vacuously true. 4. hno: Any directed cycle of length at least 2 cannot be contained in {0, 1, 2, 3} (since 0 has no outneighbors in {1, 2, 3}, and on {1, 2, 3} the adjacency is strictly decreasing in vertex index, precluding directed cycles). Thus every directed cycle of length ≥ 2 contains vertex 4. Therefore, any two directed cycles intersect at vertex 4 and cannot be disjoint. Hence hno holds. However, the second conclusion conjunct asserts: 3 ≤ (Finset.univ.filter fun u : Fin n => 5 ≤ u.val ∧ ∀ v : Fin n, v.val < 5 → D.Adj u v).card. For n = 5, no vertex u : Fin 5 satisfies 5 ≤ u.val, so this filter is empty, having cardinality 0. The assertion 3 ≤ 0 is false.

theorem not_digraph_two_cycle_free_degree_profile_transitive_five : ¬ (∀ (n : ℕ) (D : Digraph (Fin n)) [DecidableRel D.Adj]
    (hn : 5 ≤ n)
    (hdeg : ∀ v, (Finset.univ.filter fun w => D.Adj v w).card =
      if v.val < 5 then v.val + 1 else 7)
    (htwo : ∀ T : Finset (Fin n), T.Nonempty →
      (∀ v ∈ T, 2 ≤ (T.filter fun w => D.Adj v w).card) →
      (T.filter fun v => (T.filter fun w => D.Adj v w).card < 3).card ≤ 2 →
      ∃ c : Fin 2 → Finset (Fin n), (∀ i, c i ⊆ T ∧ digraph_directed_cycle_on D (c i)) ∧
        Pairwise (fun i j => Disjoint (c i) (c j)))
    (hno : ¬ ∃ c : Fin 2 → Finset (Fin n),
      (∀ i, digraph_directed_cycle_on D (c i)) ∧ Pairwise (fun i j => Disjoint (c i) (c j))), (∀ u v : Fin n, u.val < 5 → v.val < u.val → D.Adj u v) ∧
    3 ≤ (Finset.univ.filter fun u : Fin n =>
      5 ≤ u.val ∧ ∀ v : Fin n, v.val < 5 → D.Adj u v).card)
not_forall_power_well_covered_diam_le_three_and_twin_free_boundedIn LeanGraph Theory & Graph Algorithms

The statement forall_power_well_covered_diam_le_three_and_twin_free_bounded is false: The statement is false. Both conjuncts of the conjunction fail with explicit families of counterexamples: 1. The first conjunct asserts that every finite connected graph G whose powers G^d are all well-covered has diam(G) ≤ 3. Counterexample: The circulant graph C_21(1, 7) on 21 vertices (experiment 2022) is connected and has diameter exactly 4. Its powers G^d have all maximal independent sets of equal cardinality: - d = 1: all maximal independent sets have size 7 - d = 2: all maximal independent sets have size 3 - d = 3: all maximal independent sets have size 2 - d ≥ 4: G^d = K_21, all maximal independent sets have size 1. Thus G^d is well-covered for all d ≥ 1, but diam(G) = 4 > 3. Similarly, the Cartesian products C_7 □ K_m for any m ≥ 3 also have diameter 3 + 1 = 4 and have all powers well-covered (experiment 2023). 2. The second conjunct asserts that there is a uniform bound M on the order of connected, twin-free graphs of diameter 3 with all powers well-covered. Counterexample: The Cartesian product G_m = C_5 □ K_m for m ≥ 3 (experiment 2023): - diam(G_m) = diam(C_5) + diam(K_m) = 2 + 1 = 3. - G_m is twin-free: for any adjacent u, v, N[u] ≠ N[v]. Specifically, if u = (x, i) and v = (x, j) with i ≠ j in K_m, then (x-1, i) ∈ N[u] \ N[v]. If u = (x, i) and v = (x+1, i) along C_5, then (x, j) ∈ N[u] \ N[v] for any j ≠ i (which exists since m ≥ 2). - All powers of G_m are well-covered: for d = 1, every maximal independent set has size 5; for d = 2, size 2; for d ≥ 3, size 1. - |V(G_m)| = 5m, which is unbounded as m → ∞. Hence no finite uniform bound M exists.

theorem not_forall_power_well_covered_diam_le_three_and_twin_free_bounded : ¬ ((∀ {V : Type} [Fintype V] (G : SimpleGraph V), G.Connected →
      (∀ d : ℕ, 1 ≤ d → simple_graph_is_well_covered (simple_graph_power G d)) → G.diam ≤ 3) ∧
    ∃ M : ℕ, ∀ {V : Type} [Fintype V] (G : SimpleGraph V), G.Connected →
      (∀ d : ℕ, 1 ≤ d → simple_graph_is_well_covered (simple_graph_power G d)) → G.diam = 3 →
      (∀ u v : V, G.Adj u v → insert u (G.neighborSet u) ≠ insert v (G.neighborSet v)) →
      Fintype.card V ≤ M)
not_has_hole_of_length_at_least_top_fin_fourIn LeanGraph Theory & Graph Algorithms

The complete graph on 4 vertices has no hole of length at least 5: there are not enough vertices to support an induced cycle on 5 or more vertices.

theorem not_has_hole_of_length_at_least_top_fin_four :
    ¬ HasHoleOfLengthAtLeast (⊤ : SimpleGraph (Fin 4)) 5
not_is_fix_v0_of_neighbors_unreachableIn LeanGraph Theory & Graph Algorithms

If no two distinct neighbors of a vertex v in a finite simple graph G are reachable from each other in the vertex-deleted subgraph G - v, then v does not belong to V_fix^0(G).

lemma not_is_fix_v0_of_neighbors_unreachable {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (v : V)
    (hunreach : ∀ (u w : V) (hu : G.Adj v u) (hw : G.Adj v w), u ≠ w →
      ¬ (G.induce ({v}ᶜ : Set V)).Reachable ⟨u, (G.ne_of_adj hu).symm⟩ ⟨w, (G.ne_of_adj hw).symm⟩) :
    ¬ is_fix_v0 G v
not_proportionally_choosable_of_no_independent_transversalIn LeanGraph Theory & Graph Algorithms

Suppose G is a finite simple graph and for some m ≥ 2 and k ≥ 2, {A_1, ..., A_m} is a partition of V(G) into blocks of size k. If there is no independent set I in G such that |I ∩ A_i| = 1 for each i ∈ [m], then G is not proportionally k-choosable (hence χ_pc(G) > k).

theorem not_proportionally_choosable_of_no_independent_transversal
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    (m k : ℕ) (hm : 2 ≤ m) (hk : 2 ≤ k)
    (A : Fin m → Finset V)
    (hcard : ∀ i, (A i).card = k)
    (hdisj : Pairwise (fun i j => Disjoint (A i) (A j)))
    (hunion : Finset.univ.biUnion A = Finset.univ)
    (hno_indep : ¬ ∃ I : Finset V, G.IsIndepSet (I : Set V) ∧ ∀ i : Fin m, (I ∩ A i).card = 1) :
    ¬ ∀ (α : Type) [Fintype α] [DecidableEq α] (L : V → Finset α),
      (∀ v, (L v).card = k) →
      ∃ f : G.Coloring α,
        (∀ v, f v ∈ L v) ∧
        ∀ c : α,
          let η := (Finset.univ.filter (fun v => c ∈ L v)).card
          let uses := (Finset.univ.filter (fun v => f v = c)).card
          uses = η / k ∨ uses = η ⌈/⌉ k
not_simple_graph_local_avg_dominating_order_eq_one_add_half_leaf_count_add_avg_erase_leaf_neighborsIn LeanGraph Theory & Graph Algorithms

The statement simple_graph_local_avg_dominating_order_eq_one_add_half_leaf_count_add_avg_erase_leaf_neighbors is false: The statement is false as stated. The hypothesis hstem allows z = v, so when v is a leaf whose neighbor y has degree > 1, y's leaf neighbor z can be v itself. In that case, S \ K does not necessarily dominate G - K (e.g. S = {0, 3} in P4 dominates P4, but S \ {0} = {3} does not dominate P4 - {0} = P3). For P4 at an endpoint (v = 0), the LHS avd_0(P4) = 17/6, but the RHS is 1 + 0/2 + avd(P3) = 3, and 17/6 ≠ 3. The hypothesis needs either that v is a stem (e.g., degree v ≥ 2, or simple_graph_leaf_neighbor_count G v ≥ 1, or z ≠ v).

theorem not_simple_graph_local_avg_dominating_order_eq_one_add_half_leaf_count_add_avg_erase_leaf_neighbors : ¬ (∀ {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (v : V)
    (hstem : ∀ y, G.Adj v y → G.degree y ≠ 1 → ∃ z, G.Adj y z ∧ G.degree z = 1), simple_graph_local_avg_dominating_order G v =
      1 + (simple_graph_leaf_neighbor_count G v : ℚ) / 2 +
        simple_graph_avg_dominating_order
          (G.induce ((Finset.univ \ insert v ((G.neighborFinset v).filter
            (fun u => G.degree u = 1)) : Finset V) : Set V)))
not_strictly_dismantlable_of_isEmptyIn LeanGraph Theory & Graph Algorithms

If a vertex type V is empty, then no simple graph G on V is strictly k-dismantlable for any integer k.

theorem not_strictly_dismantlable_of_isEmpty (k : ℤ) (V : Type) [IsEmpty V] (G : SimpleGraph V) : ¬ graph_is_strictly_dismantlable k V G
not_strictly_dismantlable_singleIn LeanGraph Theory & Graph Algorithms

If a vertex type V is nonempty and a subsingleton, then no simple graph G on V is strictly k-dismantlable for any integer k ≥ 1.

theorem not_strictly_dismantlable_single (k : ℤ) (hk : 1 ≤ k) (V : Type) [Nonempty V] [Subsingleton V] (G : SimpleGraph V) : ¬ graph_is_strictly_dismantlable k V G
one_add_pow_card_sub_one_posIn LeanGraph Theory & Graph Algorithms

For a nonempty finite vertex set and any real lambda >= 1, (1+lambda)^n - 1 is strictly positive.

open scoped BigOperators Polynomial Classical in
theorem one_add_pow_card_sub_one_pos {V : Type*} [Fintype V] [Nonempty V]
    {lam : ℝ} (hlam : 1 ≤ lam) : 0 < (1 + lam) ^ Fintype.card V - 1
op1012_one_le_adjacency_spectral_radiusIn LeanGraph Theory & Graph Algorithms

For any connected simple graph G on a finite vertex set with at least 2 vertices, its real adjacency spectral radius is at least 1.

attribute [local instance] Classical.propDecidable in
theorem op1012_one_le_adjacency_spectral_radius
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    (hconn : G.Connected) (hn : 2 ≤ Fintype.card V) :
    1 ≤ (adjacency_spectral_radius G).toReal
op1012_randic_index_eq_quadratic_formIn LeanGraph Theory & Graph Algorithms

The Randić index relates to the quadratic form of the real adjacency matrix: 2 * randic_index G equals the sum over u and v of (1/sqrt(deg u)) * A_{uv} * (1/sqrt(deg v)) (with 0 for isolated vertices).

attribute [local instance] Classical.propDecidable in
theorem op1012_randic_index_eq_quadratic_form
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) :
    2 * randic_index G =
      ∑ u : V, ∑ v : V,
        (if G.degree u = 0 then (0 : ℝ) else 1 / Real.sqrt (G.degree u : ℝ)) *
        (G.adjMatrix ℝ u v) *
        (if G.degree v = 0 then (0 : ℝ) else 1 / Real.sqrt (G.degree v : ℝ))
op1012_randic_le_rank_mul_spectral_radius_of_regularIn LeanGraph Theory & Graph Algorithms

For any connected d-regular simple graph G with d ≥ 1, twice the Randić index is at most the rank of its real adjacency matrix times its spectral radius.

attribute [local instance] Classical.propDecidable in
theorem op1012_randic_le_rank_mul_spectral_radius_of_regular
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    (hconn : G.Connected) (d : ℕ) (hd : 1 ≤ d) (hreg : G.IsRegularOfDegree d) :
    2 * randic_index G ≤ (Matrix.rank (G.adjMatrix ℝ) : ℝ) * (adjacency_spectral_radius G).toReal
op1012_two_le_rank_adjMatrixIn LeanGraph Theory & Graph Algorithms

For any connected simple graph G on a finite vertex set with at least 2 vertices, the matrix rank of its real adjacency matrix is at least 2.

attribute [local instance] Classical.propDecidable in
theorem op1012_two_le_rank_adjMatrix
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    (hconn : G.Connected) (hn : 2 ≤ Fintype.card V) :
    2 ≤ Matrix.rank (G.adjMatrix ℝ)
op1012_two_mul_randic_index_of_regularIn LeanGraph Theory & Graph Algorithms

For any d-regular simple graph G on a finite vertex set V with degree d ≥ 1, twice the Randić index equals the vertex count |V|.

attribute [local instance] Classical.propDecidable in
theorem op1012_two_mul_randic_index_of_regular
    {V : Type*} [Fintype V] (G : SimpleGraph V) (d : ℕ) (hd : 1 ≤ d)
    (hreg : G.IsRegularOfDegree d) :
    2 * randic_index G = Fintype.card V
op1514_strictly_two_dismantlable_not_card_elevenIn LeanGraph Theory & Graph Algorithms

No finite simple graph on 11 vertices is strictly 2-dismantlable (every 11-vertex graph in D_2 already belongs to D_1).

theorem op1514_strictly_two_dismantlable_not_card_eleven (V : Type) [Fintype V] (G : SimpleGraph V) (hcard : Fintype.card V = 11) : ¬ graph_is_strictly_dismantlable 2 V G
op1514_strictly_two_dismantlable_not_card_tenIn LeanGraph Theory & Graph Algorithms

No finite simple graph on 10 vertices is strictly 2-dismantlable (every 10-vertex graph in D_2 already belongs to D_1).

theorem op1514_strictly_two_dismantlable_not_card_ten (V : Type) [Fintype V] (G : SimpleGraph V) (hcard : Fintype.card V = 10) : ¬ graph_is_strictly_dismantlable 2 V G
op1633_witness_bipartiteIn LeanGraph Theory & Graph Algorithms

The witness graph G* is bipartite, with parts {0,1,2,6,7,8} and {3,4,5,9,10,11}.

theorem op1633_witness_bipartite : op1633_witness_graph.IsBipartite
op1633_witness_connectedIn LeanGraph Theory & Graph Algorithms

The witness graph G* is connected.

theorem op1633_witness_connected : op1633_witness_graph.Connected
op1633_witness_connectivityIn LeanGraph Theory & Graph Algorithms

The witness graph G* has vertex connectivity two: no set of at most one vertex disconnects it, and the pair {0,3} does.

theorem op1633_witness_connectivity : ghz_graph_vertex_connectivity op1633_witness_graph = 2
op1633_witness_cut_twoIn LeanGraph Theory & Graph Algorithms

The vertex set {0,3} is a vertex cut of G* of size 2: removing it leaves a disconnected induced subgraph.

theorem op1633_witness_cut_two :
    ¬ (op1633_witness_graph.induce (({0, 3} : Finset (Fin 12)) : Set (Fin 12))ᶜ).Preconnected
op1633_witness_no_fallIn LeanGraph Theory & Graph Algorithms

The witness graph G* does not admit a fall colouring with three colours.

theorem op1633_witness_no_fall : ¬ has_fall_coloring (Fin 3) op1633_witness_graph
op1633_witness_no_fall_copy_oneIn LeanGraph Theory & Graph Algorithms

In any fall 3-colouring of G* the colours satisfy c(3) = c(7) and c(9) = c(1).

theorem op1633_witness_no_fall_copy_one (c : op1633_witness_graph.Coloring (Fin 3))
    (hc : ∀ v, ⇑c '' insert v (op1633_witness_graph.neighborSet v) = Set.univ) :
    c 3 = c 7 ∧ c 9 = c 1
op1633_witness_no_fall_copy_twoIn LeanGraph Theory & Graph Algorithms

In any fall 3-colouring of G* the colours satisfy c(3) = c(9).

theorem op1633_witness_no_fall_copy_two (c : op1633_witness_graph.Coloring (Fin 3))
    (hc : ∀ v, ⇑c '' insert v (op1633_witness_graph.neighborSet v) = Set.univ) :
    c 3 = c 9
op1633_witness_regularIn LeanGraph Theory & Graph Algorithms

The witness graph G* is 3-regular.

theorem op1633_witness_regular : op1633_witness_graph.IsRegularOfDegree 3
op223_adjMatrix_sq_diagIn LeanGraph Theory & Graph Algorithms

The diagonal entry of the square of the adjacency matrix at a vertex is the degree of that vertex: (A^2)_{vv} = deg v.

open scoped Classical in
theorem op223_adjMatrix_sq_diag {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (v : V) :
    (G.adjMatrix ℝ ^ 2) v v = (Nat.card (G.neighborSet v) : ℝ)
op223_adjacency_spectral_radius_isoIn LeanGraph Theory & Graph Algorithms

The adjacency spectral radius is an isomorphism invariant of finite simple graphs: if G and H are isomorphic finite simple graphs then their adjacency spectral radii are equal.

theorem op223_adjacency_spectral_radius_iso {V W : Type*} [Fintype V] [DecidableEq V]
    [Fintype W] [DecidableEq W]
    {G : SimpleGraph V} {H : SimpleGraph W} (e : G ≃g H) :
    adjacency_spectral_radius G = adjacency_spectral_radius H
op223_adjacent_gts_spectral_radius_ltIn LeanGraph Theory & Graph Algorithms

For any tree T on a finite type V and adjacent vertices u, v where v has degree at least 2, shifting the neighbours of v other than u to u strictly increases the adjacency spectral radius.

theorem op223_adjacent_gts_spectral_radius_lt {V : Type*} [Fintype V] [DecidableEq V]
  (T : SimpleGraph V) (hT : T.IsTree) (u v : V) (huv : T.Adj u v)
  (hv : 2 ≤ Nat.card (T.neighborSet v)) :
  adjacency_spectral_radius T < adjacency_spectral_radius (gts_graph T u v u)
op223_example_graph_edge_04_sustainableIn LeanGraph Theory & Graph Algorithms

Edge 0-4 in op223_example_graph is sustainable.

theorem op223_example_graph_edge_04_sustainable : is_sustainable_edge op223_example_graph s(0, 4)
op223_example_graph_edge_07_sustainableIn LeanGraph Theory & Graph Algorithms

Edge 0-7 in op223_example_graph is sustainable.

theorem op223_example_graph_edge_07_sustainable : is_sustainable_edge op223_example_graph s(0, 7)
op223_example_graph_edge_12_sustainableIn LeanGraph Theory & Graph Algorithms

Edge 1-2 in op223_example_graph is sustainable.

theorem op223_example_graph_edge_12_sustainable : is_sustainable_edge op223_example_graph s(1, 2)
op223_example_graph_edge_23_sustainableIn LeanGraph Theory & Graph Algorithms

Edge 2-3 in op223_example_graph is sustainable.

theorem op223_example_graph_edge_23_sustainable : is_sustainable_edge op223_example_graph s(2, 3)
op223_example_graph_edge_45_sustainableIn LeanGraph Theory & Graph Algorithms

Edge 4-5 in op223_example_graph is sustainable.

theorem op223_example_graph_edge_45_sustainable : is_sustainable_edge op223_example_graph s(4, 5)
op223_example_graph_edge_46_sustainableIn LeanGraph Theory & Graph Algorithms

Edge 4-6 in op223_example_graph is sustainable.

theorem op223_example_graph_edge_46_sustainable : is_sustainable_edge op223_example_graph s(4, 6)
op223_example_slide_edge_memIn LeanGraph Theory & Graph Algorithms

The edge {0,7} belongs to the edge set of both slide graphs of the eight-vertex example (the slides at b = 0 and b = 6).

theorem op223_example_slide_edge_mem (b : Fin 8) (hb : b = 0 ∨ b = 6) :
    s(0, 7) ∈ (op223_example_slide b).edgeSet
op223_example_slide_leaf_slide_radius_ltIn LeanGraph Theory & Graph Algorithms

For either slide of the example and any non-edge f such that deleting the edge {0,7} and adding f gives a tree, that tree has adjacency spectral radius strictly less than ofReal 2.

theorem op223_example_slide_leaf_slide_radius_lt (b : Fin 8) (hb : b = 0 ∨ b = 6)
    (f : Sym2 (Fin 8)) (hf : f ∈ (op223_example_slide b)ᶜ.edgeSet)
    (htree : ((op223_example_slide b).deleteEdges {s(0, 7)} ⊔
      SimpleGraph.fromEdgeSet {f}).IsTree) :
    adjacency_spectral_radius ((op223_example_slide b).deleteEdges {s(0, 7)} ⊔
      SimpleGraph.fromEdgeSet {f}) < ENNReal.ofReal 2
op223_example_slide_leaf_swap_radius_ltIn LeanGraph Theory & Graph Algorithms

For each vertex x distinct from 0 and 7, the graph obtained from a slide of the example by deleting the leaf edge {0,7} and adding {7,x} has adjacency spectral radius at most ofReal (199/100), in particular strictly less than ofReal 2.

theorem op223_example_slide_leaf_swap_radius_lt (b : Fin 8) (hb : b = 0 ∨ b = 6)
    (x : Fin 8) (hx0 : x ≠ 0) (hx7 : x ≠ 7) :
    adjacency_spectral_radius ((op223_example_slide b).deleteEdges {s(0, 7)} ⊔
      SimpleGraph.fromEdgeSet {s(7, x)}) ≤ ENNReal.ofReal ((199 : ℝ) / 100)
op223_example_slide_radius_eq_twoIn LeanGraph Theory & Graph Algorithms

Both slide graphs of the example (b = 0 and b = 6) have adjacency spectral radius exactly ofReal 2.

theorem op223_example_slide_radius_eq_two (b : Fin 8) (hb : b = 0 ∨ b = 6) :
    adjacency_spectral_radius (op223_example_slide b) = ENNReal.ofReal 2
op223_example_slide_radius_ge_twoIn LeanGraph Theory & Graph Algorithms

Both slide graphs of the example have adjacency spectral radius at least ofReal 2, witnessed by an explicit nonzero eigenvector for the eigenvalue 2.

theorem op223_example_slide_radius_ge_two (b : Fin 8) (hb : b = 0 ∨ b = 6) :
    ENNReal.ofReal 2 ≤ adjacency_spectral_radius (op223_example_slide b)
op223_example_slide_radius_le_twoIn LeanGraph Theory & Graph Algorithms

Both slide graphs of the example have adjacency spectral radius at most ofReal 2.

theorem op223_example_slide_radius_le_two (b : Fin 8) (hb : b = 0 ∨ b = 6) :
    adjacency_spectral_radius (op223_example_slide b) ≤ ENNReal.ofReal 2
op223_example_slide_swap_is_leaf_edgeIn LeanGraph Theory & Graph Algorithms

If f is a non-edge of a slide graph of the example and replacing the edge {0,7} by f yields a tree, then f is {7,x} for some vertex x which is neither 7 nor 0 and is not already adjacent to 7.

theorem op223_example_slide_swap_is_leaf_edge (b : Fin 8) (hb : b = 0 ∨ b = 6)
    (f : Sym2 (Fin 8)) (hf : f ∈ (op223_example_slide b)ᶜ.edgeSet)
    (htree : ((op223_example_slide b).deleteEdges {s(0, 7)} ⊔
      SimpleGraph.fromEdgeSet {f}).IsTree) :
    ∃ x : Fin 8, x ≠ 0 ∧ x ≠ 7 ∧ f = s(7, x)
op223_is_sustainable_tree_iso_invariantIn LeanGraph Theory & Graph Algorithms

For isomorphic finite simple graphs G and H, G is a sustainable tree if and only if H is.

theorem op223_is_sustainable_tree_iso_invariant {V W : Type*} [Fintype V] [DecidableEq V]
    [Fintype W] [DecidableEq W] {G : SimpleGraph V} {H : SimpleGraph W} (e : G ≃g H) :
    is_sustainable_tree G ↔ is_sustainable_tree H
op223_leaf_slide_radius_ltIn LeanGraph Theory & Graph Algorithms

Let X be a tree, v a leaf reached from a vertex u of degree at least 3 along a path whose interior vertices have degree 2, and b a neighbour of u not adjacent to v, such that the slide Y = X − ub + vb is again a tree. Then the adjacency spectral radius of Y is strictly smaller than that of X.

theorem op223_leaf_slide_radius_lt {V : Type*} [Fintype V] [DecidableEq V]
    (X : SimpleGraph V) (hX : X.IsTree) (u v b : V)
    (huv : u ≠ v) (hub : X.Adj u b) (hvb : ¬ X.Adj v b)
    (hv : Nat.card (X.neighborSet v) = 1)
    (hu : 3 ≤ Nat.card (X.neighborSet u))
    (hpath : ∃ p : X.Walk u v, p.IsPath ∧
      ∀ x ∈ p.support, x ≠ u → x ≠ v → Nat.card (X.neighborSet x) = 2)
    (hYtree : (X.deleteEdges {s(u, b)} ⊔ SimpleGraph.fromEdgeSet {s(v, b)}).IsTree) :
    adjacency_spectral_radius (X.deleteEdges {s(u, b)} ⊔ SimpleGraph.fromEdgeSet {s(v, b)}) <
      adjacency_spectral_radius X
op223_nonneg_matrix_pow_mulVec_leIn LeanGraph Theory & Graph Algorithms

If A is a real nonnegative matrix and d a strictly positive vector whose row sums weighted by d are at most R times d, then every entrywise component of A^k applied to d is at most R^k times the corresponding component of d.

theorem op223_nonneg_matrix_pow_mulVec_le {ι : Type*} [Fintype ι] [DecidableEq ι]
    (A : Matrix ι ι ℝ) (d : ι → ℝ) (hd : ∀ i, 0 < d i) (hA : ∀ i j, 0 ≤ A i j) (R : ℝ)
    (hR : ∀ k, ∑ j, A k j * d j ≤ R * d k) (m : ℕ) :
    ∀ i, (A ^ m).mulVec d i ≤ R ^ m * d i
op223_nonstar_has_adjacent_high_degreeIn LeanGraph Theory & Graph Algorithms

Every tree on Fin n (n ≥ 2) that is not isomorphic to a star has two adjacent vertices each of degree at least 2.

theorem op223_nonstar_has_adjacent_high_degree
  (n : ℕ) (hn : 2 ≤ n) (X : SimpleGraph (Fin n)) (hX : X.IsTree)
  (hXs : ¬ Nonempty (X ≃g completeBipartiteGraph (Fin 1) (Fin (n - 1)))) :
  ∃ u v : Fin n, X.Adj u v ∧ 2 ≤ Nat.card (X.neighborSet u) ∧ 2 ≤ Nat.card (X.neighborSet v)
op223_nonsustainable_adjacent_gts_successorIn LeanGraph Theory & Graph Algorithms

Every non-sustainable tree on Fin n (n ≥ 2) that is not a star has an edge uv with deg v ≥ 2 such that the adjacent generalized tree shift gts_graph X u v u is non-sustainable.

theorem op223_nonsustainable_adjacent_gts_successor
  (n : ℕ) (hn : 2 ≤ n) (X : SimpleGraph (Fin n))
  (hX : is_nonsustainable_tree X)
  (hXs : ¬ Nonempty (X ≃g completeBipartiteGraph (Fin 1) (Fin (n - 1)))) :
  ∃ u v : Fin n, X.Adj u v ∧ 2 ≤ Nat.card (X.neighborSet v) ∧
    is_nonsustainable_tree (gts_graph X u v u)
op223_offchain_neighbour_of_slide_treeIn LeanGraph Theory & Graph Algorithms

Let p be a path from u to v in the tree X whose interior vertices all have degree 2, with u ≠ v. If b is a neighbour of u which is not adjacent to v, and the slide Y = X − ub + vb is again a tree, then b is not a vertex of p.

theorem op223_offchain_neighbour_of_slide_tree {V : Type*} [Fintype V] [DecidableEq V]
    (X : SimpleGraph V) (hX : X.IsTree) (u v b : V) (p : X.Walk u v)
    (huv : u ≠ v) (hp : p.IsPath)
    (hint : ∀ x ∈ p.support, x ≠ u → x ≠ v → Nat.card (X.neighborSet x) = 2)
    (hub : X.Adj u b) (hvb : ¬ X.Adj v b)
    (hYtree : (X.deleteEdges {s(u, b)} ⊔ SimpleGraph.fromEdgeSet {s(v, b)}).IsTree) :
    b ∉ p.support
op223_path_four_radius_le_seventeen_tenthsIn LeanGraph Theory & Graph Algorithms

The adjacency spectral radius of the path on four vertices is at most 17/10.

theorem op223_path_four_radius_le_seventeen_tenths :
    adjacency_spectral_radius (SimpleGraph.pathGraph 4) ≤ ENNReal.ofReal ((17 : ℝ) / 10)
op223_pendant_closed_walk_leIn LeanGraph Theory & Graph Algorithms
open scoped Classical in
theorem op223_pendant_closed_walk_le {V : Type*} [Fintype V] [DecidableEq V]
    (R : SimpleGraph V) (hR : R.IsTree) (u v : V) (huv : u ≠ v)
    (hv : Nat.card (R.neighborSet v) = 1) (hu : 2 ≤ Nat.card (R.neighborSet u))
    (hpath : ∃ p : R.Walk u v, p.IsPath ∧
      ∀ x ∈ p.support, x ≠ u → x ≠ v → Nat.card (R.neighborSet x) = 2) :
    (∀ k : ℕ, (R.adjMatrix ℝ ^ k) v v ≤ (R.adjMatrix ℝ ^ k) u u) ∧
      (R.adjMatrix ℝ ^ 2) v v < (R.adjMatrix ℝ ^ 2) u u
op223_slide_gts_graph_eqIn LeanGraph Theory & Graph Algorithms

Let X be a graph with u adjacent to b, b not adjacent to v, and w the unique neighbour of v in X. Then the single-edge slide Y = X − ub + vb, taken as a generalized tree shift with candidate v and neighbour w, gives back X: gts_graph Y u v w = X.

theorem op223_slide_gts_graph_eq {V : Type*} [Fintype V] [DecidableEq V]
    (X : SimpleGraph V) (u v b w : V)
    (hub : X.Adj u b) (hvb : ¬ X.Adj v b) (hvw : X.Adj v w)
    (hv : Nat.card (X.neighborSet v) = 1) :
    gts_graph (X.deleteEdges {s(u, b)} ⊔ SimpleGraph.fromEdgeSet {s(v, b)}) u v w = X
op223_slide_is_generalized_tree_shift_of_leafIn LeanGraph Theory & Graph Algorithms

Let p be a path from u to v in the graph X whose interior vertices all have degree 2 in X, with u ≠ v and v a leaf of X (degree 1). Let b be a neighbour of u which is not a vertex of p and is not adjacent to v. If the slide Y = X − ub + vb is a tree, then X is obtained from Y by a generalized tree shift, i.e. is_generalized_tree_shift Y X.

theorem op223_slide_is_generalized_tree_shift_of_leaf {V : Type*} [Fintype V] [DecidableEq V]
    (X : SimpleGraph V) (u v b : V) (p : X.Walk u v)
    (huv : u ≠ v) (hp : p.IsPath)
    (hint : ∀ x ∈ p.support, x ≠ u → x ≠ v → Nat.card (X.neighborSet x) = 2)
    (hv : Nat.card (X.neighborSet v) = 1)
    (hub : X.Adj u b) (hvb : ¬ X.Adj v b) (hb : b ∉ p.support)
    (hYtree : (X.deleteEdges {s(u, b)} ⊔ SimpleGraph.fromEdgeSet {s(v, b)}).IsTree) :
    is_generalized_tree_shift (X.deleteEdges {s(u, b)} ⊔ SimpleGraph.fromEdgeSet {s(v, b)}) X
op223_spectral_radius_le_of_weighted_rowsumIn LeanGraph Theory & Graph Algorithms

If A is a real nonnegative matrix with zero diagonal and d a strictly positive weight vector whose weighted row sums (1/d k) * sum_j A k j * d j are all at most R with R >= 0, then the spectral radius of A is at most ofReal R.

theorem op223_spectral_radius_le_of_weighted_rowsum {ι : Type*} [Fintype ι] [DecidableEq ι]
    (A : Matrix ι ι ℝ) (d : ι → ℝ) (hd : ∀ i, 0 < d i)
    (hdiag : ∀ i, A i i = 0) (hA : ∀ i j, 0 ≤ A i j)
    (R : ℝ) (hR : ∀ k, (1 / d k) * ∑ j, A k j * d j ≤ R) :
    spectralRadius ℝ A ≤ ENNReal.ofReal R
op223_sqrt_three_le_star_three_radiusIn LeanGraph Theory & Graph Algorithms

The adjacency spectral radius of the star K_{1,3} is at least sqrt 3.

theorem op223_sqrt_three_le_star_three_radius :
    ENNReal.ofReal (Real.sqrt 3) ≤
      adjacency_spectral_radius (completeBipartiteGraph (Fin 1) (Fin 3))
op223_star_adjacency_spectral_radiusIn LeanGraph Theory & Graph Algorithms

The adjacency spectral radius of the star K_{1,n-1} (as completeBipartiteGraph (Fin 1) (Fin (n-1))) is sqrt(n-1), for n >= 2.

theorem op223_star_adjacency_spectral_radius (n : ℕ) (hn : 2 ≤ n) :
    adjacency_spectral_radius (completeBipartiteGraph (Fin 1) (Fin (n - 1))) =
      ENNReal.ofReal (Real.sqrt ((n : ℝ) - 1))
op223_star_edge_swap_radius_ltIn LeanGraph Theory & Graph Algorithms

If S is a star K_{1,n-1} on n >= 4 vertices, e is an edge of S, f a non-edge of S, and deleting e and adding f yields a tree, then that tree has strictly smaller adjacency spectral radius than S.

theorem op223_star_edge_swap_radius_lt {V : Type*} [Fintype V] [DecidableEq V] (S : SimpleGraph V)
    (n : ℕ) (hn : 4 ≤ n)
    (hS : Nonempty (S ≃g completeBipartiteGraph (Fin 1) (Fin (n - 1))))
    (e : Sym2 V) (he : e ∈ S.edgeSet) (f : Sym2 V) (hf : f ∈ Sᶜ.edgeSet)
    (htree : (S.deleteEdges {e} ⊔ SimpleGraph.fromEdgeSet {f}).IsTree) :
    adjacency_spectral_radius (S.deleteEdges {e} ⊔ SimpleGraph.fromEdgeSet {f}) <
      adjacency_spectral_radius S
op223_star_like_edgeSet_nonemptyIn LeanGraph Theory & Graph Algorithms

A finite simple graph S isomorphic to the star K_{1,n-1} with n >= 4 has at least one edge.

theorem op223_star_like_edgeSet_nonempty {V : Type*} [Fintype V] [DecidableEq V] (S : SimpleGraph V) (n : ℕ)
    (hn : 4 ≤ n) (hS : Nonempty (S ≃g completeBipartiteGraph (Fin 1) (Fin (n - 1)))) :
    ∃ e, e ∈ S.edgeSet
op223_star_like_is_treeIn LeanGraph Theory & Graph Algorithms

Any finite simple graph S isomorphic to the star K_{1,n-1} with n >= 2 is a tree.

theorem op223_star_like_is_tree {V : Type*} [Fintype V] [DecidableEq V] (S : SimpleGraph V) (n : ℕ)
    (hn : 2 ≤ n) (hS : Nonempty (S ≃g completeBipartiteGraph (Fin 1) (Fin (n - 1)))) :
    S.IsTree
op223_star_swap_radius_lt_canonicalIn LeanGraph Theory & Graph Algorithms

At the canonical star K_{1,n-1} with n >= 4, moving leaf b off the centre (Sum.inl 0) and onto a different leaf m (i.e. deleting {centre, b} and adding {b, m}) strictly decreases the adjacency spectral radius.

theorem op223_star_swap_radius_lt_canonical (n : ℕ) (hn : 4 ≤ n) (b m : Fin (n - 1)) (hbm : b ≠ m) :
    adjacency_spectral_radius
      ((completeBipartiteGraph (Fin 1) (Fin (n - 1))).deleteEdges {s(Sum.inl 0, Sum.inr b)} ⊔
        SimpleGraph.fromEdgeSet {s(Sum.inr b, Sum.inr m)}) <
    adjacency_spectral_radius (completeBipartiteGraph (Fin 1) (Fin (n - 1)))
op223_star_swap_structureIn LeanGraph Theory & Graph Algorithms

At the canonical star K_{1,n-1} with n >= 4, if e is an edge and f a non-edge such that deleting e and adding f yields a tree, then e joins the centre to some leaf b and f joins that same leaf b to a different leaf m.

theorem op223_star_swap_structure (n : ℕ) (hn : 4 ≤ n)
    (e f : Sym2 (Fin 1 ⊕ Fin (n - 1)))
    (he : e ∈ (completeBipartiteGraph (Fin 1) (Fin (n - 1))).edgeSet)
    (hf : f ∈ (completeBipartiteGraph (Fin 1) (Fin (n - 1)))ᶜ.edgeSet)
    (htree : ((completeBipartiteGraph (Fin 1) (Fin (n - 1))).deleteEdges {e} ⊔ SimpleGraph.fromEdgeSet {f}).IsTree) :
    ∃ (b m : Fin (n - 1)), b ≠ m ∧ e = s(Sum.inl 0, Sum.inr b) ∧ f = s(Sum.inr b, Sum.inr m)
op223_star_swap_transportIn LeanGraph Theory & Graph Algorithms

Transporting an edge-swap at a star along an isomorphism: if S is isomorphic to the star K_{1,n-1}, and e is an edge, f a non-edge, with S - e + f a tree, then there are an edge e' and non-edge f' of the canonical star such that the canonical swap is again a tree and the swap graphs S - e + f and star - e' + f' are isomorphic.

theorem op223_star_swap_transport {V : Type*} [Fintype V] [DecidableEq V] (S : SimpleGraph V) (n : ℕ)
    (hS : Nonempty (S ≃g completeBipartiteGraph (Fin 1) (Fin (n - 1))))
    (e f : Sym2 V) (he : e ∈ S.edgeSet) (hf : f ∈ Sᶜ.edgeSet)
    (htree : (S.deleteEdges {e} ⊔ SimpleGraph.fromEdgeSet {f}).IsTree) :
    ∃ (e' f' : Sym2 (Fin 1 ⊕ Fin (n - 1))),
      e' ∈ (completeBipartiteGraph (Fin 1) (Fin (n - 1))).edgeSet ∧
      f' ∈ (completeBipartiteGraph (Fin 1) (Fin (n - 1)))ᶜ.edgeSet ∧
      ((completeBipartiteGraph (Fin 1) (Fin (n - 1))).deleteEdges {e'} ⊔
          SimpleGraph.fromEdgeSet {f'}).IsTree ∧
      Nonempty ((S.deleteEdges {e} ⊔ SimpleGraph.fromEdgeSet {f}) ≃g
        ((completeBipartiteGraph (Fin 1) (Fin (n - 1))).deleteEdges {e'} ⊔
          SimpleGraph.fromEdgeSet {f'}))
op223_star_three_not_sustainableIn LeanGraph Theory & Graph Algorithms

Any finite simple graph isomorphic to the star K_{1,3} is not a sustainable tree.

theorem op223_star_three_not_sustainable {V : Type*} [Fintype V] [DecidableEq V]
    (S : SimpleGraph V) (hS : Nonempty (S ≃g completeBipartiteGraph (Fin 1) (Fin 3))) :
    ¬ is_sustainable_tree S
op223_star_three_swap_yields_pathIn LeanGraph Theory & Graph Algorithms

At the canonical star K_{1,3}, if e is an edge and f a non-edge such that deleting e and adding f yields a tree, then the resulting tree is isomorphic to the path graph on four vertices.

theorem op223_star_three_swap_yields_path (e f : Sym2 (Fin 1 ⊕ Fin 3))
    (he : e ∈ (completeBipartiteGraph (Fin 1) (Fin 3)).edgeSet)
    (hf : f ∈ (completeBipartiteGraph (Fin 1) (Fin 3))ᶜ.edgeSet)
    (htree : ((completeBipartiteGraph (Fin 1) (Fin 3)).deleteEdges {e} ⊔
      SimpleGraph.fromEdgeSet {f}).IsTree) :
    Nonempty (((completeBipartiteGraph (Fin 1) (Fin 3)).deleteEdges {e} ⊔
      SimpleGraph.fromEdgeSet {f}) ≃g SimpleGraph.pathGraph 4)
op223_sustainable_slide_predecessorNeeds helpGraph Theory & Graph Algorithms

Let X be a sustainable tree on Fin n, v a leaf reached from a vertex u of degree at least 3 by a path p whose interior vertices have degree 2. Then some neighbour b of u which does not lie on p and is not adjacent to v yields a slide Y = X − ub + vb that is again a sustainable tree.

theorem op223_sustainable_slide_predecessor
    (n : ℕ) (X : SimpleGraph (Fin n)) (hX : is_sustainable_tree X)
    (u v : Fin n) (p : X.Walk u v)
    (huv : u ≠ v) (hp : p.IsPath)
    (hint : ∀ x ∈ p.support, x ≠ u → x ≠ v → Nat.card (X.neighborSet x) = 2)
    (hu : 3 ≤ Nat.card (X.neighborSet u))
    (hv : Nat.card (X.neighborSet v) = 1) :
    ∃ b : Fin n, X.Adj u b ∧ ¬ X.Adj v b ∧ b ∉ p.support ∧
      is_sustainable_tree (X.deleteEdges {s(u, b)} ⊔ SimpleGraph.fromEdgeSet {s(v, b)})
op223_tree_deg_le_two_is_pathIn LeanGraph Theory & Graph Algorithms

A tree on Fin n all of whose vertices have degree at most 2 is isomorphic to the path graph pathGraph n.

theorem op223_tree_deg_le_two_is_path (n : ℕ) (X : SimpleGraph (Fin n)) (hX : X.IsTree)
    (hdeg : ∀ x : Fin n, Nat.card (X.neighborSet x) ≤ 2) :
    Nonempty (X ≃g SimpleGraph.pathGraph n)
op223_tree_pendant_chain_configurationIn LeanGraph Theory & Graph Algorithms

A tree on Fin n that is not isomorphic to the path graph pathGraph n has a vertex u of degree at least 3 and a leaf v (degree 1) such that u and v are joined by a path all of whose interior vertices have degree 2.

theorem op223_tree_pendant_chain_configuration
    (n : ℕ) (X : SimpleGraph (Fin n)) (hX : X.IsTree)
    (hnotpath : ¬ Nonempty (X ≃g SimpleGraph.pathGraph n)) :
    ∃ u v : Fin n, u ≠ v ∧ 3 ≤ Nat.card (X.neighborSet u) ∧
      Nat.card (X.neighborSet v) = 1 ∧
      (∃ p : X.Walk u v, p.IsPath ∧
        ∀ x ∈ p.support, x ≠ u → x ≠ v → Nat.card (X.neighborSet x) = 2)
op223_weighted_pendant_shift_counterexampleIn LeanGraph Theory & Graph Algorithms

There is a nonnegatively weighted finite tree whose unique diagonal-resolvent maximum is lost after the complete adjacent shift toward it, even when the two resolvent parameters satisfy the same pendant-edge secular equation. This refutes a weighted extension of the pendant-edge preservation route, not the unweighted conjecture.

theorem op223_weighted_pendant_shift_counterexample :
  ∃ (n : ℕ) (T : SimpleGraph (Fin n)) (A B : Matrix (Fin n) (Fin n) ℝ)
      (u v x : Fin n) (z₀ z₁ s : ℝ),
    T.IsTree ∧ u ≠ v ∧ x ≠ u ∧
    A.transpose = A ∧ B.transpose = B ∧
    (∀ i j, 0 ≤ A i j ∧ 0 ≤ B i j) ∧
    (∀ i, A i i = 0 ∧ B i i = 0) ∧
    (∀ i j, T.Adj i j ↔ 0 < A i j) ∧ 0 < A u v ∧
    B u v = A u v ∧
    (∀ j, j ≠ u → j ≠ v → B u j = A u j + A v j ∧ B v j = 0) ∧
    (∀ i j, i ≠ u → i ≠ v → j ≠ u → j ≠ v → B i j = A i j) ∧
    0 < z₀ ∧ z₀ < z₁ ∧ 0 < s ∧
    (let M₀ := z₀ • (1 : Matrix (Fin n) (Fin n) ℝ) - A
     let M₁ := z₁ • (1 : Matrix (Fin n) (Fin n) ℝ) - B
     let R₀ := M₀⁻¹
     let R₁ := M₁⁻¹
     M₀.PosDef ∧ M₁.PosDef ∧
     R₀ u u = z₀ / s ∧ R₁ u u = z₁ / s ∧
     (∀ y, y ≠ u → R₀ y y < R₀ u u) ∧ R₁ u u < R₁ x x)
op223_weighted_spectral_radius_boundIn LeanGraph Theory & Graph Algorithms

Collatz–Wielandt / Gershgorin row-sum bound: if A is a real nonnegative matrix with zero diagonal and d is a strictly positive weight vector whose weighted row sums (1/d k) * sum_j A k j * d j are all at most R, then the spectral radius of A is at most R.

theorem op223_weighted_spectral_radius_bound {ι : Type*} [Fintype ι] [DecidableEq ι] [Nonempty ι]
    (A : Matrix ι ι ℝ) (d : ι → ℝ) (hd : ∀ i, 0 < d i)
    (hdiag : ∀ i, A i i = 0) (hA : ∀ i j, 0 ≤ A i j)
    (R : ℝ) (hR : ∀ k, (1 / d k) * ∑ j, A k j * d j ≤ R) :
    spectralRadius ℝ A ≤ ENNReal.ofReal R
op652_divisors_eqIn LeanGraph Theory & Graph Algorithms

1248191226 = 2·3²·37⁵, so its set of positive divisors equals the explicit 36-element Finset op652_divisor_list.

theorem op652_divisors_eq : Nat.divisors 1248191226 = op652_divisor_list
op652_model_cut_obstructionIn LeanGraph Theory & Graph Algorithms

The cut data for the model graph: X = the 12 divisors of 1248191226 divisible by 6, Y = the 11 terms {41,43,47,49,53,55,59,61,65,67,71}; then |X| = 12, |Y| = 11, and exactly 2 edges join X to the complement of Y (both into the term 37).

theorem op652_model_cut_obstruction : ∃ X : Finset ↥op652_divisor_list, ∃ Y : Finset ↥op652_progression_image, X.card = 12 ∧ Y.card = 11 ∧ ((X.product (Finset.univ \ Y)).filter (fun p : ↥op652_divisor_list × ↥op652_progression_image => op652_model_graph.Adj (Sum.inl p.1) (Sum.inr p.2))).card = 2
op652_model_graph_isoIn LeanGraph Theory & Graph Algorithms

The literal graph coprime_divisor_progression_graph 1248191226 37 1 is isomorphic to the model graph on the explicit small carriers.

theorem op652_model_graph_iso : Nonempty (coprime_divisor_progression_graph 1248191226 37 1 ≃g op652_model_graph)
op652_model_min_degreeIn LeanGraph Theory & Graph Algorithms

Every vertex of the 72-vertex model graph has degree at least 5; in fact the minimum degree is exactly 6.

theorem op652_model_min_degree : 5 ≤ op652_model_graph.minDegree
op652_model_not_packingIn LeanGraph Theory & Graph Algorithms

For every k ≥ 3 the model graph does not admit k pairwise edge-disjoint perfect matchings: the cut (X, Y) has only 2 edges while k·(|X| − |Y|) = k ≥ 3.

theorem op652_model_not_packing : ∀ k : ℕ, 3 ≤ k → ¬ simple_graph_has_edge_disjoint_perfect_matchings op652_model_graph k
op652_model_perfect_matchingIn LeanGraph Theory & Graph Algorithms

The model graph has a perfect matching: the 36 explicit pairs (1,72),(6,71),…,(18,37) form a bijection between the divisors and the progression terms with every pair coprime.

theorem op652_model_perfect_matching : ∃ M : op652_model_graph.Subgraph, M.IsPerfectMatching
op652_progression_eqIn LeanGraph Theory & Graph Algorithms

With |D(1248191226)| = 36 and a = 37, b = 1, the literal progression image {37 + 1·t : 0 ≤ t < 36} equals the explicit Finset {37, ..., 72}.

theorem op652_progression_eq : (Finset.range (Nat.divisors 1248191226).card).image (fun t : ℕ => 37 + 1 * (t : ℤ)) = op652_progression_image
op_1258_cyclic_ramsey_property_upperIn LeanGraph Theory & Graph Algorithms

For all k ≥ 1 and l ≥ 3, the cyclic Ramsey property holds for the nested matching NM_{2k} and monotone path MP_l on N = k*l - k + 1 - (if 2 ∣ k then l - 2 else 0) vertices.

theorem op_1258_cyclic_ramsey_property_upper (k l : ℕ) (hk : 1 ≤ k) (hl : 3 ≤ l) :
    cyclic_ramsey_property (nested_matching k) (monotone_path l)
      (k * l - k + 1 - (if 2 ∣ k then l - 2 else 0))
op_1258_cyclic_ramsey_target_posIn LeanGraph Theory & Graph Algorithms

For all integers k ≥ 1 and l ≥ 3, k*l - k + 1 - (if 2 ∣ k then l - 2 else 0) is strictly positive.

theorem op_1258_cyclic_ramsey_target_pos (k l : ℕ) (hk : 1 ≤ k) (hl : 3 ≤ l) :
    0 < k * l - k + 1 - (if 2 ∣ k then l - 2 else 0)
op_1258_cyclic_ramsey_upper_boundIn LeanGraph Theory & Graph Algorithms

For all integers k ≥ 1 and l ≥ 3, the cyclic Ramsey number R_cyc(NM_{2k}, MP_l) is at most k*l - k + 1 - (if 2 ∣ k then l - 2 else 0).

theorem op_1258_cyclic_ramsey_upper_bound (k l : ℕ) (hk : 1 ≤ k) (hl : 3 ≤ l) :
    cyclic_ramsey_number (nested_matching k) (monotone_path l) ≤
      k * l - k + 1 - (if 2 ∣ k then l - 2 else 0)
op_1371_bipartite_color_class_balanceIn LeanGraph Theory & Graph Algorithms

If c : Fin n → Fin 2 is a proper 2-colouring of a simple graph G on Fin n and G has a perfect matching M, then the two colour classes each have exactly n / 2 elements.

theorem op_1371_bipartite_color_class_balance {n : ℕ} (G : SimpleGraph (Fin n))
    (c : Fin n → Fin 2) (hc : ∀ ⦃v w : Fin n⦄, G.Adj v w → c v ≠ c w)
    (M : G.Subgraph) (hM : M.IsPerfectMatching) :
    (Finset.univ.filter (fun v => c v = 0)).card = n / 2 ∧
    (Finset.univ.filter (fun v => c v = 1)).card = n / 2
op_1371_box_path_le_of_evenIn LeanGraph Theory & Graph Algorithms

If G is a bipartite simple graph on Fin n with a perfect matching and k ≥ 2 is even, then the minimum forcing number of G □ P_k is at most (n/2)*((k+1)/2) = nk/4.

theorem op_1371_box_path_le_of_even {n : ℕ} (G : SimpleGraph (Fin n)) (hG : G.IsBipartite) (hM : ∃ M : G.Subgraph, M.IsPerfectMatching) (k : ℕ) (hk : 2 ≤ k) (hke : Even k) : graph_min_forcing_num (G □ SimpleGraph.pathGraph k) ≤ ((n / 2 * ((k + 1) / 2) : ℕ) : ℕ∞)
op_1371_box_path_le_of_oddIn LeanGraph Theory & Graph Algorithms

If G is a bipartite simple graph on Fin n with a perfect matching and k ≥ 2 is odd, then the minimum forcing number of G □ P_k is at most (n/2)*((k+1)/2).

theorem op_1371_box_path_le_of_odd {n : ℕ} (G : SimpleGraph (Fin n)) (hG : G.IsBipartite) (hM : ∃ M : G.Subgraph, M.IsPerfectMatching) (k : ℕ) (hk : 2 ≤ k) (hko : Odd k) : graph_min_forcing_num (G □ SimpleGraph.pathGraph k) ≤ ((n / 2 * ((k + 1) / 2) : ℕ) : ℕ∞)
op_1371_perfect_matching_of_involutoryIn LeanGraph Theory & Graph Algorithms

If a bipartite simple graph on Fin n admits an involutory weighted adjacency matrix over some field, then it has a perfect matching.

theorem op_1371_perfect_matching_of_involutory {n : ℕ} (G : SimpleGraph (Fin n)) (F : Type*) [Field F] (hG : G.IsBipartite) (hA : graph_admits_involutory_weighted_adj_matrix G F) : ∃ M : G.Subgraph, M.IsPerfectMatching
op_1611_not_diam_gt_matching_of_diam_bound_threeIn LeanGraph Theory & Graph Algorithms

If for every finite graph G with maximum degree at most 3 the diameter of the (Δ+2)-recolour graph is at most |V| + matching number, then no Δ ≤ 3 satisfies simple_graph_reconfiguration_diam_gt_matching.

theorem op_1611_not_diam_gt_matching_of_diam_bound_three (hbound : ∀ (V : Type) [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj], G.maxDegree ≤ 3 → (simple_graph_reconfiguration_graph G (G.maxDegree + 2)).diam ≤ (Fintype.card V : ℕ∞) + graph_matching_num G) : ∀ Δ : ℕ, Δ ≤ 3 → ¬ simple_graph_reconfiguration_diam_gt_matching Δ
op_1611_subcubic_reconfiguration_diam_le_card_add_matchingIn LeanGraph Theory & Graph Algorithms

For every finite simple graph G of maximum degree at most 3, the diameter of the (maxDegree+2)-colouring reconfiguration graph is at most |V| plus the matching number of G.

theorem op_1611_subcubic_reconfiguration_diam_le_card_add_matching {V : Type} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (hG : G.maxDegree ≤ 3) : (simple_graph_reconfiguration_graph G (G.maxDegree + 2)).diam ≤ (Fintype.card V : ℕ∞) + graph_matching_num G
op_193_cycle13_parity_from_blocksIn LeanGraph Theory & Graph Algorithms

If the thirteen-cycle same-side noncycle pair parity bound holds for each of the sixteen blocks with first color false, then it holds for every Boolean coloring.

theorem op_193_cycle13_parity_from_blocks
    (h0 : ∀ (a b c d e f g h : Bool), op193Parity13 ![false,false,false,false,false,a,b,c,d,e,f,g,h])
    (h1 : ∀ (a b c d e f g h : Bool), op193Parity13 ![false,false,false,false,true,a,b,c,d,e,f,g,h])
    (h2 : ∀ (a b c d e f g h : Bool), op193Parity13 ![false,false,false,true,false,a,b,c,d,e,f,g,h])
    (h3 : ∀ (a b c d e f g h : Bool), op193Parity13 ![false,false,false,true,true,a,b,c,d,e,f,g,h])
    (h4 : ∀ (a b c d e f g h : Bool), op193Parity13 ![false,false,true,false,false,a,b,c,d,e,f,g,h])
    (h5 : ∀ (a b c d e f g h : Bool), op193Parity13 ![false,false,true,false,true,a,b,c,d,e,f,g,h])
    (h6 : ∀ (a b c d e f g h : Bool), op193Parity13 ![false,false,true,true,false,a,b,c,d,e,f,g,h])
    (h7 : ∀ (a b c d e f g h : Bool), op193Parity13 ![false,false,true,true,true,a,b,c,d,e,f,g,h])
    (h8 : ∀ (a b c d e f g h : Bool), op193Parity13 ![false,true,false,false,false,a,b,c,d,e,f,g,h])
    (h9 : ∀ (a b c d e f g h : Bool), op193Parity13 ![false,true,false,false,true,a,b,c,d,e,f,g,h])
    (h10 : ∀ (a b c d e f g h : Bool), op193Parity13 ![false,true,false,true,false,a,b,c,d,e,f,g,h])
    (h11 : ∀ (a b c d e f g h : Bool), op193Parity13 ![false,true,false,true,true,a,b,c,d,e,f,g,h])
    (h12 : ∀ (a b c d e f g h : Bool), op193Parity13 ![false,true,true,false,false,a,b,c,d,e,f,g,h])
    (h13 : ∀ (a b c d e f g h : Bool), op193Parity13 ![false,true,true,false,true,a,b,c,d,e,f,g,h])
    (h14 : ∀ (a b c d e f g h : Bool), op193Parity13 ![false,true,true,true,false,a,b,c,d,e,f,g,h])
    (h15 : ∀ (a b c d e f g h : Bool), op193Parity13 ![false,true,true,true,true,a,b,c,d,e,f,g,h])
    (F : Fin 13 → Bool) : op193Parity13 F
op_193_cycle14_balanced_case_odd_degreesIn LeanGraph Theory & Graph Algorithms

If a two-colouring of the fourteen-cycle has exactly 7 vertices of one colour and exactly 12 monochromatic cycle edges (i.e. exactly two bichromatic edges), then exactly four vertices have odd degree in the set of same-colour noncycle pairs.

theorem op_193_cycle14_balanced_case_odd_degrees (f : Fin 14 → Bool)
    (hk : ((Finset.univ : Finset (Fin 14)).filter (fun x => f x = true)).card = 7)
    (hM : ((Finset.univ : Finset (Fin 14)).filter (fun i => f i = f (i + 1))).card = 12) :
    let P := ((Finset.univ : Finset (Fin 14)).product Finset.univ).filter
      (fun e => e.1 < e.2 ∧ f e.1 = f e.2 ∧ ¬ (SimpleGraph.cycleGraph 14).Adj e.1 e.2)
    ((Finset.univ : Finset (Fin 14)).filter
      (fun x => Odd (P.filter (fun e => e.1 = x ∨ e.2 = x)).card)).card = 4
op_193_cycle14_monochromatic_edges_leIn LeanGraph Theory & Graph Algorithms

If a two-colouring of the fourteen-cycle uses both colours, then at most 12 of the 14 cycle edges are monochromatic.

theorem op_193_cycle14_monochromatic_edges_le (f : Fin 14 → Bool)
    (htrue : ∃ x, f x = true) (hfalse : ∃ x, f x = false) :
    ((Finset.univ : Finset (Fin 14)).filter (fun i => f i = f (i + 1))).card ≤ 12
op_193_cycle14_same_colour_pair_countIn LeanGraph Theory & Graph Algorithms

For a two-colouring of the fourteen-cycle with k vertices of one colour and M monochromatic cycle edges, twice the number of same-colour noncycle pairs equals k(k-1) + (14-k)(13-k) - 2M.

theorem op_193_cycle14_same_colour_pair_count (f : Fin 14 → Bool) :
    let k := ((Finset.univ : Finset (Fin 14)).filter (fun x => f x = true)).card
    let M := ((Finset.univ : Finset (Fin 14)).filter (fun i => f i = f (i + 1))).card
    2 * (((Finset.univ : Finset (Fin 14)).product Finset.univ).filter
        (fun e => e.1 < e.2 ∧ f e.1 = f e.2 ∧
          ¬ (SimpleGraph.cycleGraph 14).Adj e.1 e.2)).card
      = k * (k - 1) + (14 - k) * (13 - k) - 2 * M
op_193_fourteen_avoidance_graph_edge_countIn LeanGraph Theory & Graph Algorithms

The graph obtained from the complete graph on fourteen vertices by deleting the fourteen cycle edges and every pair that lies inside one of ten sets of size at most three has at least 91 - 14 - 30 = 47 edges.

theorem op_193_fourteen_avoidance_graph_edge_count
    (A : Fin 10 → Finset (Fin 14)) (hA : ∀ j, (A j).card ≤ 3)
    (G : SimpleGraph (Fin 14)) [DecidableRel G.Adj]
    (hG : ∀ x y, G.Adj x y ↔ x ≠ y ∧ ¬ (SimpleGraph.cycleGraph 14).Adj x y ∧
      ∀ j, ¬ (x ∈ A j ∧ y ∈ A j)) : 47 ≤ G.edgeFinset.card
op_193_fourteen_edge_bound_from_odd_cycle_certificateIn LeanGraph Theory & Graph Algorithms

A triangle-free graph on fourteen vertices containing a chordless odd cycle of length at least five has at most 43 edges.

theorem op_193_fourteen_edge_bound_from_odd_cycle_certificate
    (G : SimpleGraph (Fin 14)) [DecidableRel G.Adj]
    (hfree : G.CliqueFree 3)
    {u : Fin 14} {p : G.Walk u u}
    (hcycle : p.IsCycle) (hodd : Odd p.length) (h5 : 5 ≤ p.length) (hchord : p.IsChordless) :
    G.edgeFinset.card ≤ 43
op_193_nine_anchors_capacity_parityIn LeanGraph Theory & Graph Algorithms

Any family of 9 anchors of size at most 3 covering the same-side noncycle pairs P satisfies the capacity-parity inequality 2*E + O <= 54, where E = |P| and O is the number of odd-degree vertices in P.

theorem op_193_nine_anchors_capacity_parity
    (f : Fin 13 → Bool)
    (A : Fin 9 → Finset (Fin 13)) (hA : ∀ j, (A j).card ≤ 3)
    (h_cover : ∀ x y, x < y → f x = f y → ¬ (SimpleGraph.cycleGraph 13).Adj x y →
      ∃ j, x ∈ A j ∧ y ∈ A j) :
    let P := ((Finset.univ : Finset (Fin 13)).product Finset.univ).filter
      (fun e => e.1 < e.2 ∧ f e.1 = f e.2 ∧ ¬ (SimpleGraph.cycleGraph 13).Adj e.1 e.2)
    let E := P.card
    let O := ((Finset.univ : Finset (Fin 13)).filter
      (fun x => Odd (P.filter (fun e => e.1 = x ∨ e.2 = x)).card)).card
    2 * E + O ≤ 54
op_193_ten_anchors_capacity_parityIn LeanGraph Theory & Graph Algorithms

If the same-side noncycle pairs of a two-colouring of the fourteen-cycle are all covered by ten sets of size at most three, then 2*E + O <= 60, where E is the number of those pairs and O the number of vertices of odd degree in that pair set.

theorem op_193_ten_anchors_capacity_parity
    (f : Fin 14 → Bool)
    (A : Fin 10 → Finset (Fin 14)) (hA : ∀ j, (A j).card ≤ 3)
    (h_cover : ∀ x y, x < y → f x = f y → ¬ (SimpleGraph.cycleGraph 14).Adj x y →
      ∃ j, x ∈ A j ∧ y ∈ A j) :
    let P := ((Finset.univ : Finset (Fin 14)).product Finset.univ).filter
      (fun e => e.1 < e.2 ∧ f e.1 = f e.2 ∧ ¬ (SimpleGraph.cycleGraph 14).Adj e.1 e.2)
    let E := P.card
    let O := ((Finset.univ : Finset (Fin 14)).filter
      (fun x => Odd (P.filter (fun e => e.1 = x ∨ e.2 = x)).card)).card
    2 * E + O ≤ 60
op_193_trianglefree_nonbipartite_odd_cycle_certificateIn LeanGraph Theory & Graph Algorithms

A triangle-free non-bipartite graph on fourteen vertices contains a chordless odd cycle of length at least five: there are a vertex u, a closed walk p at u, and p is a cycle, has odd length >= 5 and has no chords.

theorem op_193_trianglefree_nonbipartite_odd_cycle_certificate
    (G : SimpleGraph (Fin 14)) [DecidableRel G.Adj]
    (hfree : G.CliqueFree 3) (hnb : ¬ G.IsBipartite) :
    ∃ (u : Fin 14) (p : G.Walk u u), p.IsCycle ∧ Odd p.length ∧ 5 ≤ p.length ∧ p.IsChordless
op_292_p6_claw_hole_dominatingIn LeanGraph Theory & Graph Algorithms

In a finite connected (P_6, claw)-free graph, every hole of length 5 or 6 is dominating: every vertex is either a vertex of the hole or adjacent to one.

theorem op_292_p6_claw_hole_dominating {V : Type*} [Fintype V] (G : SimpleGraph V)
    (hconn : G.Connected) (hp : IsPkFree G 6) (hclaw : IsClawFree G) {n : ℕ} (hn5 : 5 ≤ n)
    (hn6 : n ≤ 6) (f : SimpleGraph.cycleGraph n ↪g G) (v : V) :
    ∃ i : Fin n, v = f i ∨ G.Adj v (f i)
op_292_p6_claw_no_long_hole_two_copsIn LeanGraph Theory & Graph Algorithms

Every finite connected (P_6, claw)-free graph with no hole of length 5 or more admits a winning strategy for 2 cops.

theorem op_292_p6_claw_no_long_hole_two_cops {V : Type*} [Fintype V] (G : SimpleGraph V)
    (hconn : G.Connected) (hp : IsPkFree G 6) (hclaw : IsClawFree G)
    (hno : ¬ HasHoleOfLengthAtLeast G 5) :
    HasCopWinStrategy G 2
op_292_pk_free_no_long_holeIn LeanGraph Theory & Graph Algorithms

If a graph has no induced path on k ≥ 3 vertices, then it contains no induced cycle of length k+1 or more: the first k vertices of such a hole induce a path on k vertices.

theorem op_292_pk_free_no_long_hole {V : Type*} (G : SimpleGraph V) {k : ℕ} (hk : 3 ≤ k)
    (hp : IsPkFree G k) {n : ℕ} (hn : k + 1 ≤ n) :
    ¬ SimpleGraph.IsIndContained (SimpleGraph.cycleGraph n) G
op_292_two_cops_dominating_holeIn LeanGraph Theory & Graph Algorithms

Let G be a finite (P_6, claw)-free graph containing a dominating induced cycle C of length 5 or 6 (every vertex of G is on C or adjacent to it). Then 2 cops have a winning strategy on G.

theorem op_292_two_cops_dominating_hole {V : Type*} [Fintype V] (G : SimpleGraph V)
    (hclaw : IsClawFree G) (hp : IsPkFree G 6) {n : ℕ} (hn5 : 5 ≤ n) (hn6 : n ≤ 6)
    (f : SimpleGraph.cycleGraph n ↪g G)
    (hdom : ∀ v : V, ∃ i : Fin n, v = f i ∨ G.Adj v (f i)) :
    HasCopWinStrategy G 2
op_599_mean_order_sub_mu_eq_QIn LeanGraph Theory & Graph Algorithms

The difference between the lambda-weighted mean order and the complete graph baseline mu equals lambda * Q_G(lambda) / (Z_G(lambda) * ((1 + lambda)^n - 1)).

open scoped BigOperators Polynomial in
theorem op_599_mean_order_sub_mu_eq_Q
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (lam : ℝ) (hZ : (open scoped Classical in ∑ S ∈ (Finset.univ.filter (fun (S : Finset V) => is_connected_vertex_set G (↑S : Set V))),
      (Polynomial.X : Polynomial ℝ) ^ Finset.card S).eval lam ≠ 0)
    (hK : (1 + lam) ^ (Fintype.card V) - 1 ≠ 0) :
    let Z := open scoped Classical in
      ∑ S ∈ (Finset.univ.filter (fun (S : Finset V) => is_connected_vertex_set G (↑S : Set V))),
        (Polynomial.X : Polynomial ℝ) ^ Finset.card S
    let mu := (Fintype.card V : ℝ) * lam * (1 + lam) ^ (Fintype.card V - 1) / ((1 + lam) ^ (Fintype.card V) - 1)
    let mean_order := lam * (Polynomial.derivative Z).eval lam / Z.eval lam
    let Q := ((Polynomial.X + 1) ^ (Fintype.card V) - 1) * Polynomial.derivative Z -
      Polynomial.C (Fintype.card V : ℝ) * (Polynomial.X + 1) ^ (Fintype.card V - 1) * Z
    mean_order - mu = lam * Q.eval lam / (Z.eval lam * ((1 + lam) ^ (Fintype.card V) - 1))
op_599_q_ge_zero_of_connected_inducedIn LeanGraph Theory & Graph Algorithms

For any connected simple graph on n >= 4 vertices with minimum degree at least 3, and any lambda >= 1, Q_G(lambda) >= 0 with equality iff G is complete.

open scoped BigOperators Polynomial in
theorem op_599_q_ge_zero_of_connected_induced
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (hG : G.Connected)
    (hn : 4 ≤ Fintype.card V)
    (hdeg : ∀ v : V, 3 ≤ G.degree v)
    (lam : ℝ) (hlam : 1 ≤ lam) :
    let Z := open scoped Classical in
      ∑ S ∈ (Finset.univ.filter (fun (S : Finset V) => is_connected_vertex_set G (↑S : Set V))),
        (Polynomial.X : Polynomial ℝ) ^ Finset.card S
    let Q := ((Polynomial.X + 1) ^ (Fintype.card V) - 1) * Polynomial.derivative Z -
      Polynomial.C (Fintype.card V : ℝ) * (Polynomial.X + 1) ^ (Fintype.card V - 1) * Z
    0 ≤ Q.eval lam ∧ (Q.eval lam = 0 ↔ G = ⊤)
op_599_weighted_coreIn LeanGraph Theory & Graph Algorithms

For every finite connected simple graph on n >= 4 vertices with minimum degree at least 3, the defect polynomial Q_G = ((1+X)^n - 1)Z_G' - n(1+X)^(n-1)Z_G is nonnegative on [1,infinity), and for lambda >= 1, Q_G(lambda) = 0 only if G is complete.

open scoped BigOperators Polynomial Classical in
theorem op_599_weighted_core {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hG : G.Connected)
    (hn : 4 ≤ Fintype.card V) (hdeg : ∀ v : V, 3 ≤ G.degree v) :
    (∀ lam : ℝ, 1 ≤ lam → 0 ≤ (conn_set_poly_Q G).eval lam) ∧
    (∀ lam : ℝ, 1 ≤ lam → (conn_set_poly_Q G).eval lam = 0 → G = ⊤)
ordered_ramsey_monotone_cycle_alternating_path_lowerIn LeanGraph Theory & Graph Algorithms

For k ≥ 3 and l ≥ 2, no integer M strictly less than ⌈(k - 1/2)(l - 1)⌉ satisfies the ordered Ramsey property for MC_k and AP_l.

theorem ordered_ramsey_monotone_cycle_alternating_path_lower
    (k l : ℕ) (hk : 3 ≤ k) (hl : 2 ≤ l) :
    ∀ M < ⌈((k : ℝ) - 1 / 2) * ((l : ℝ) - 1)⌉₊,
      ¬ ordered_ramsey_prop (monotone_cycle k) (alternating_path l) M
ordered_ramsey_monotone_cycle_alternating_path_lower_criticalIn LeanGraph Theory & Graph Algorithms

For all k ≥ 3 and l ≥ 2, the ordered Ramsey property for MC_k and AP_l fails at the critical threshold N - 1 = ⌈(k - 1/2)(l - 1)⌉ - 1.

theorem ordered_ramsey_monotone_cycle_alternating_path_lower_critical
    (k l : ℕ) (hk : 3 ≤ k) (hl : 2 ≤ l) :
    ¬ ordered_ramsey_prop (monotone_cycle k) (alternating_path l)
      (⌈((k : ℝ) - 1 / 2) * ((l : ℝ) - 1)⌉₊ - 1)
ordered_ramsey_monotone_cycle_alternating_path_lower_threeIn LeanGraph Theory & Graph Algorithms

For all k ≥ 3, the ordered Ramsey property for MC_k and AP_3 fails for all M < 2k - 1.

theorem ordered_ramsey_monotone_cycle_alternating_path_lower_three
    (k : ℕ) (hk : 3 ≤ k) :
    ∀ M < 2 * k - 1,
      ¬ ordered_ramsey_prop (monotone_cycle k) (alternating_path 3) M
ordered_ramsey_monotone_cycle_alternating_path_upperNeeds helpGraph Theory & Graph Algorithms

For k ≥ 3 and l ≥ 2, every 2-edge coloring of the complete ordered graph on ⌈(k - 1/2)(l - 1)⌉ vertices contains an ordered MC_k in the first colour or an ordered AP_l in the second colour.

theorem ordered_ramsey_monotone_cycle_alternating_path_upper
    (k l : ℕ) (hk : 3 ≤ k) (hl : 2 ≤ l) :
    ordered_ramsey_prop (monotone_cycle k) (alternating_path l)
      ⌈((k : ℝ) - 1 / 2) * ((l : ℝ) - 1)⌉₊
ordered_ramsey_prop_monoIn LeanGraph Theory & Graph Algorithms

The ordered Ramsey property is monotone in the host graph size N: if it holds at M, it holds for all N ≥ M.

theorem ordered_ramsey_prop_mono {α β : Type*} [LinearOrder α] [LinearOrder β]
    (H : SimpleGraph α) (H' : SimpleGraph β) {M N : ℕ}
    (hMN : M ≤ N) (h : ordered_ramsey_prop H H' M) :
    ordered_ramsey_prop H H' N
p7_claw_free_dominating_pair_of_no_holeNeeds helpGraph Theory & Graph Algorithms

Every finite connected (P_7, claw)-free graph with no induced cycle of length at least 6 has a dominating pair of vertices.

theorem p7_claw_free_dominating_pair_of_no_hole {V : Type*} [Fintype V] (G : SimpleGraph V)
    (hconn : G.Connected) (hp : IsPkFree G 7) (hclaw : IsClawFree G)
    (hno_hole : ∀ m ≥ 6, IsEmpty (SimpleGraph.cycleGraph m ↪g G)) :
    ∃ u v : V, ∀ w : V, w = u ∨ w = v ∨ G.Adj u w ∨ G.Adj v w
pathGraph_exists_spanning_pathIn LeanGraph Theory & Graph Algorithms

Every non-empty path graph contains a path whose support contains all vertices.

theorem pathGraph_exists_spanning_path (n : ℕ) (hn : 0 < n) : ∃ (u v : Fin n) (p : (SimpleGraph.pathGraph n).Walk u v), p.IsPath ∧ ∀ w : Fin n, w ∈ p.support
pathGraph_isTreeIn LeanGraph Theory & Graph Algorithms

Every non-empty path graph is a tree.

theorem pathGraph_isTree (n : ℕ) (hn : 0 < n) : (SimpleGraph.pathGraph n).IsTree
pathGraph_zf_set_iffIn LeanGraph Theory & Graph Algorithms

For n ≥ 1 and S a set of vertices of the path P_n (Mathlib's pathGraph n, vertices Fin n with v adjacent to v+1), S is a zero forcing set if and only if S is not an independent set all of whose vertices are interior (i.e. not both 0 < v and v+1 < n).

theorem pathGraph_zf_set_iff (n : ℕ) (hn : 1 ≤ n) (S : Finset (Fin n)) :
    is_zero_forcing_set (SimpleGraph.pathGraph n) (S : Set (Fin n)) ↔
      ¬ ((SimpleGraph.pathGraph n).IsIndepSet (S : Set (Fin n)) ∧
          ∀ v ∈ S, 0 < (v : ℕ) ∧ (v : ℕ) + 1 < n)
path_graph_dist_of_leIn LeanGraph Theory & Graph Algorithms

In the path graph P_n on Fin n, the graph distance from u to v, for u ≤ v, is the difference v - u of the vertex indices.

theorem path_graph_dist_of_le {n : ℕ} (u v : Fin n) (h : u ≤ v) :
    (SimpleGraph.pathGraph n).dist u v = v.val - u.val
path_graph_interval_eq_IccIn LeanGraph Theory & Graph Algorithms

In the path graph P_n on Fin n, for a ≤ b the interval I(a,b) = {w : d(a,w) + d(w,b) = d(a,b)} is exactly Finset.Icc a b, the vertices between a and b.

theorem path_graph_interval_eq_Icc {n : ℕ} (a b : Fin n) (h : a ≤ b) :
    (Finset.univ.filter (fun w : Fin n =>
      (SimpleGraph.pathGraph n).dist a w + (SimpleGraph.pathGraph n).dist w b
        = (SimpleGraph.pathGraph n).dist a b)) = Finset.Icc a b
path_graph_two_elem_set_interval_cardIn LeanGraph Theory & Graph Algorithms

For a < b in Fin n, the number of vertices of P_n lying on every interval I(u,v) with {u,v} the 2-element set {a,b}, minus one, equals b - a.

theorem path_graph_two_elem_set_interval_card {n : ℕ} (a b : Fin n) (hab : a < b) :
    ((Finset.univ.filter (fun w : Fin n => ∀ u ∈ ({a, b} : Finset (Fin n)),
        ∀ v ∈ ({a, b} : Finset (Fin n)), u ≠ v →
          (SimpleGraph.pathGraph n).dist u w + (SimpleGraph.pathGraph n).dist w v
            = (SimpleGraph.pathGraph n).dist u v)).card - 1) = b.val - a.val
path_graph_white_rank_two_and_codim_oneIn LeanGraph Theory & Graph Algorithms

On a path with at least four vertices, every two-element white set is fort-free, and exactly two white sets of size n−1 are fort-free.

theorem path_graph_white_rank_two_and_codim_one (n : ℕ) (hn : 4 ≤ n) : {W : Finset (Fin n) | W.card = 2 ∧ is_zero_forcing_set (SimpleGraph.pathGraph n) ((Finset.univ \ W : Finset (Fin n)) : Set (Fin n))}.ncard = Nat.choose n 2 ∧ {W : Finset (Fin n) | W.card = n - 1 ∧ is_zero_forcing_set (SimpleGraph.pathGraph n) ((Finset.univ \ W : Finset (Fin n)) : Set (Fin n))}.ncard = 2
path_graph_zero_forcing_poly_coeff_succ_leIn LeanGraph Theory & Graph Algorithms

In the zero forcing polynomial of the path graph on n vertices, the coefficient of X^(k+1) is at most the coefficient of X^k whenever k ≥ (n + 1) / 2.

theorem path_graph_zero_forcing_poly_coeff_succ_le (n : ℕ) (k : ℕ)
    (hk : (n + 1) / 2 ≤ k) :
    (zero_forcing_poly (SimpleGraph.pathGraph n)).coeff (k + 1) ≤
      (zero_forcing_poly (SimpleGraph.pathGraph n)).coeff k
path_graph_zero_forcing_set_of_large_cardIn LeanGraph Theory & Graph Algorithms

In the path graph on n vertices (n > 0), any subset S of vertices of cardinality at least (n + 1) / 2 is a zero forcing set.

theorem path_graph_zero_forcing_set_of_large_card (n : ℕ) (hn : 0 < n) (S : Finset (Fin n))
    (hS : (n + 1) / 2 ≤ S.card) :
    is_zero_forcing_set (SimpleGraph.pathGraph n) (S : Set (Fin n))
path_is_caterpillarIn LeanGraph Theory & Graph Algorithms

Every non-empty path graph is a caterpillar.

theorem path_is_caterpillar (n : ℕ) (hn : 0 < n) : is_caterpillar (SimpleGraph.pathGraph n)
pend_ve_num_le_gamma_ve_induceIn LeanGraph Theory & Graph Algorithms

Attaching the single vertex v to A can only make domination harder, so a_C ≤ b_C: any minimum vertex-edge dominating set of G[A] together with v ve-dominates G[A ∪ {v}].

lemma pend_ve_num_le_gamma_ve_induce {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (A : Set V) [Fintype ↥A] (v : V) :
    pend_ve_num G A v ≤ gamma_ve (G.induce A)
perm_decomp_refl_trans_gen_swapsIn LeanGraph Theory & Graph Algorithms

Every permutation k of a finite type V that preserves reachability along a relation R can be factored into at most |V| transpositions between mutually reachable pairs.

theorem perm_decomp_refl_trans_gen_swaps {V : Type*} [Fintype V] [DecidableEq V]
    (R : V → V → Prop) (k : Equiv.Perm V) (hk : ∀ v, Relation.ReflTransGen R v (k v)) :
    ∃ l : List (Equiv.Perm V),
      (∀ p ∈ l, ∃ a b, Relation.ReflTransGen R a b ∧ p = Equiv.swap a b) ∧
        l.length ≤ Fintype.card V ∧ l.prod = k
perron_quadratic_formIn LeanGraph Theory & Graph Algorithms

For a Perron vector vec of a finite simple graph X, the quadratic form of the adjacency matrix at vec equals (spectral radius of X) times the squared length of vec.

attribute [local instance] Classical.propDecidable in
theorem perron_quadratic_form
    {V : Type*} [Fintype V] [DecidableEq V]
    (X : SimpleGraph V) (vec : V → ℝ) (hvec : is_perron_vector X vec) :
    ∑ i, vec i * Matrix.mulVec (X.adjMatrix ℝ) vec i
      = (adjacency_spectral_radius X).toReal * ∑ i, vec i ^ 2
petersen_ramsey_blue_graph_has_no_petersenIn LeanGraph Theory & Graph Algorithms

Lemma 1 of arXiv:2611.09347: the blue graph G_B (the join graph K_{9,9} ∨ K_2ᶜ) contains no subgraph isomorphic to the Petersen graph.

theorem petersen_ramsey_blue_graph_has_no_petersen : ¬ SimpleGraph.IsContained petersen_graph petersen_ramsey_blue_graph
petersen_ramsey_lower_bound_twenty_oneIn LeanGraph Theory & Graph Algorithms

Theorem 1 of arXiv:2611.09347: the diagonal Ramsey number of the Petersen graph satisfies R(P, P) ≥ 21; that is, the 2-coloring of the complete graph K_20 by the red graph G_R and its complement G_Rᶜ contains no monochromatic copy of the Petersen graph.

theorem petersen_ramsey_lower_bound_twenty_one : ¬ SimpleGraph.IsContained petersen_graph petersen_ramsey_red_graph ∧ ¬ SimpleGraph.IsContained petersen_graph petersen_ramsey_red_graphᶜ
petersen_ramsey_red_graph_has_no_petersenIn LeanGraph Theory & Graph Algorithms

The red graph G_R on 20 vertices (a disjoint union of K_9, K_9, and K_2) contains no subgraph isomorphic to the Petersen graph.

theorem petersen_ramsey_red_graph_has_no_petersen : ¬ SimpleGraph.IsContained petersen_graph petersen_ramsey_red_graph
plane_dart_move_reachableIn LeanGraph Theory & Graph Algorithms

In a connected simple graph with a rotation system, any dart can be reached from any other by repeatedly applying the two moves "reverse the dart" (d ↦ d.symm) and "go to the next dart around the head" (d ↦ σ d). Equivalently, the dart graph generated by these two moves is connected.

theorem plane_dart_move_reachable {n : ℕ} (G : SimpleGraph (Fin n)) (hG : G.Connected)
    (σ : Equiv.Perm G.Dart) (hσ : simple_graph_is_rotation_system G σ) (d e : G.Dart) :
    Relation.ReflTransGen (fun a b : G.Dart => b = a.symm ∨ b = σ a) d e
plane_eulerian_orientation_exists_face_heightIn LeanGraph Theory & Graph Algorithms

Every Eulerian orientation D of a connected simple graph with a rotation system σ is induced by a height function: there is y : darts → ℤ, constant on σ-faces and with y d = y d.symm ± 1, such that the arc u → v of D is present exactly when y(u→v) = y(v→u) + 1. (The height-function dictionary: Eulerian orientations of a plane graph are exactly the gradients of integer face potentials.)

theorem plane_eulerian_orientation_exists_face_height {n : ℕ} (G : SimpleGraph (Fin n))
    [DecidableRel G.Adj] (hG : G.Connected) (σ : Equiv.Perm G.Dart)
    (hσ : simple_graph_is_rotation_system G σ) (D : Digraph (Fin n)) [DecidableRel D.Adj]
    (hD : digraph_is_eulerian_orientation G D) :
    ∃ y : G.Dart → ℤ, plane_face_height G σ y ∧
      ∀ u v : Fin n, D.Adj u v ↔ (plane_face_height_orientation G y).Adj u v
plane_face_height_alternating_is_two_valuedIn LeanGraph Theory & Graph Algorithms

Conversely, if the orientation induced by a height function y of a connected graph is alternating for σ, then y takes only two consecutive values. Together with plane_face_height_two_valued_is_alternating this identifies alternating orientations with two-valued height functions.

theorem plane_face_height_alternating_is_two_valued {n : ℕ} (G : SimpleGraph (Fin n))
    (hG : G.Connected) (σ : Equiv.Perm G.Dart) (hσ : simple_graph_is_rotation_system G σ)
    (y : G.Dart → ℤ) (h : plane_face_height G σ y)
    (halt : digraph_is_alternating_orientation G σ (plane_face_height_orientation G y)) :
    ∃ c : ℤ, ∀ d : G.Dart, y d = c ∨ y d = c + 1
plane_face_height_orientation_is_eulerianIn LeanGraph Theory & Graph Algorithms

The orientation induced by any height function of a rotation system is Eulerian: every edge is oriented one way (the two heights across it differ by exactly 1) and at every vertex the out-degree equals the in-degree.

theorem plane_face_height_orientation_is_eulerian {n : ℕ} (G : SimpleGraph (Fin n))
    (σ : Equiv.Perm G.Dart) (hσ : simple_graph_is_rotation_system G σ) (y : G.Dart → ℤ)
    (h : plane_face_height G σ y) :
    @digraph_is_eulerian_orientation n G (plane_face_height_orientation G y) (Classical.decRel _)
plane_face_height_orientation_is_orientationIn LeanGraph Theory & Graph Algorithms

The digraph induced by any height function is an orientation of G in the sense of is_graph_orientation: every edge of G carries exactly one of its two arcs, and no edge carries both.

theorem plane_face_height_orientation_is_orientation {n : ℕ} (G : SimpleGraph (Fin n))
    (σ : Equiv.Perm G.Dart) (y : G.Dart → ℤ) (h : plane_face_height G σ y) :
    is_graph_orientation G (plane_face_height_orientation G y)
plane_face_height_sanityIn LeanGraph Theory & Graph Algorithms

Sanity checks for the height-function predicate: the edgeless graph on one vertex admits a height function (it has no darts, so both conditions are vacuous), while the single edge K₂ admits no height function for the identity rotation system, since there the two darts of the single edge lie on a common face (so must have equal height) and also must differ by exactly 1.

theorem plane_face_height_sanity :
    plane_face_height (⊥ : SimpleGraph (Fin 1)) (Equiv.refl (⊥ : SimpleGraph (Fin 1)).Dart) (fun _ => 0) ∧
      (∀ y : (⊤ : SimpleGraph (Fin 2)).Dart → ℤ,
        ¬ plane_face_height (⊤ : SimpleGraph (Fin 2))
          (Equiv.refl (⊤ : SimpleGraph (Fin 2)).Dart) y)
plane_face_height_strict_descentIn LeanGraph Theory & Graph Algorithms

Height-function form of the crux: in a 3-vertex-connected simple plane graph with all degrees even, a height function y that is not two-valued admits another height function y' whose induced Eulerian orientation has strictly fewer spanning arborescences directed towards r.

theorem plane_face_height_strict_descent {n : ℕ} (G : SimpleGraph (Fin n))
    [DecidableRel G.Adj] (h3 : simple_graph_three_vertex_connected G)
    (heven : ∀ v, Even (G.degree v)) (σ : Equiv.Perm G.Dart)
    (hσ : simple_graph_is_plane_rotation_system G σ) (y : G.Dart → ℤ)
    (hy : plane_face_height G σ y)
    (h2 : ¬ ∃ c : ℤ, ∀ d : G.Dart, y d = c ∨ y d = c + 1) (r : Fin n) :
    ∃ y' : G.Dart → ℤ, plane_face_height G σ y' ∧
      @digraph_arborescence_count_at n (plane_face_height_orientation G y') (Classical.decRel _) r <
        @digraph_arborescence_count_at n (plane_face_height_orientation G y) (Classical.decRel _) r
plane_face_height_symm_eqIn LeanGraph Theory & Graph Algorithms

In a height function y for the rotation system σ, the dart σ d and the reverse dart d.symm always have equal height. (This is the face permutation φ = σ ∘ symm applied to d.symm.)

theorem plane_face_height_symm_eq {V : Type*} (G : SimpleGraph V) (σ : Equiv.Perm G.Dart)
    (y : G.Dart → ℤ) (h : plane_face_height G σ y) (d : G.Dart) :
    y (σ d) = y d.symm
plane_face_height_two_valued_is_alternatingIn LeanGraph Theory & Graph Algorithms

If the height function y takes only the two consecutive values c and c+1, then the orientation it induces is alternating for σ: consecutive darts around every vertex point in opposite directions.

theorem plane_face_height_two_valued_is_alternating {n : ℕ} (G : SimpleGraph (Fin n))
    (σ : Equiv.Perm G.Dart) (y : G.Dart → ℤ) (h : plane_face_height G σ y) (c : ℤ)
    (hc : ∀ d : G.Dart, y d = c ∨ y d = c + 1) :
    digraph_is_alternating_orientation G σ (plane_face_height_orientation G y)
polynomial_is_unimodal_of_halvesIn LeanGraph Theory & Graph Algorithms

A polynomial with coefficients in ℕ is unimodal as soon as its coefficient sequence is weakly increasing up to an index m and weakly decreasing from m onwards (adjacent-step form).

theorem polynomial_is_unimodal_of_halves (p : Polynomial ℕ) (m : ℕ)
    (hlo : ∀ i, i < m → p.coeff i ≤ p.coeff (i + 1))
    (hhi : ∀ j, m ≤ j → p.coeff (j + 1) ≤ p.coeff j) :
    polynomial_is_unimodal p
quadripartite_colour_class_card_le_two_mulIn LeanGraph Theory & Graph Algorithms

In a proper edge-colouring of K_{n,n,n,n} with 3n colours, the set of edges of any fixed colour has at most 2n elements (it is a matching on 4n vertices).

theorem quadripartite_colour_class_card_le_two_mul (n : ℕ)
    (c : (SimpleGraph.completeEquipartiteGraph 4 n).lineGraph.Coloring (Fin (3 * n)))
    (i : Fin (3 * n)) :
    (Finset.univ.filter (fun e : (SimpleGraph.completeEquipartiteGraph 4 n).edgeSet => c e = i)).card ≤ 2 * n
quadripartite_colour_class_perfect_matchingIn LeanGraph Theory & Graph Algorithms

In a proper edge colouring of K_{n,n,n,n} with the 3n colours Fin (3*n), the edges of any fixed colour form a perfect matching: every vertex is an endpoint of exactly one edge of that colour, and there are exactly 2n edges of that colour.

theorem quadripartite_colour_class_perfect_matching (n : ℕ) (hn : 1 ≤ n)
    (c : (SimpleGraph.completeEquipartiteGraph 4 n).lineGraph.Coloring (Fin (3 * n)))
    (i : Fin (3 * n)) :
    (∀ v : Fin 4 × Fin n, ∃! e : (SimpleGraph.completeEquipartiteGraph 4 n).edgeSet,
        c e = i ∧ v ∈ (e : Sym2 (Fin 4 × Fin n))) ∧
      (Finset.univ.filter (fun e : (SimpleGraph.completeEquipartiteGraph 4 n).edgeSet =>
        c e = i)).card = 2 * n
quadripartite_exists_coloring_no_two_n_edge_connecting_coreIn LeanGraph Theory & Graph Algorithms

For n ≥ 4 there is a proper 3n-edge-colouring of K_{n,n,n,n} with no colour-connecting edge set of cardinality exactly 2n.

theorem quadripartite_exists_coloring_no_two_n_edge_connecting_core
    (n : ℕ) (hn : 4 ≤ n) :
    ∃ c : (SimpleGraph.completeEquipartiteGraph 4 n).lineGraph.Coloring (Fin (3 * n)),
      ∀ W : Finset (Sym2 (Fin 4 × Fin n)), W.card = 2 * n →
        ¬ simple_graph_is_color_connecting (SimpleGraph.completeEquipartiteGraph 4 n) c (↑W : Set (Sym2 (Fin 4 × Fin n)))
quadripartite_exists_coloring_no_two_n_edge_connecting_setIn LeanGraph Theory & Graph Algorithms

For n ≥ 4 there is a proper 3n-edge-colouring of K_{n,n,n,n} no set of at most 2n edges of which is colour-connecting; equivalently (with the universal upper bound) a colouring whose wild number is exactly 2n + 1.

theorem quadripartite_exists_coloring_no_two_n_edge_connecting_set (n : ℕ) (hn : 4 ≤ n) :
    ∃ c : (SimpleGraph.completeEquipartiteGraph 4 n).lineGraph.Coloring (Fin (3 * n)),
      ∀ W : Finset (Sym2 (Fin 4 × Fin n)), W.card ≤ 2 * n →
        ¬ simple_graph_is_color_connecting (SimpleGraph.completeEquipartiteGraph 4 n) c ↑W
quadripartite_seal_free_partition_block_boundIn LeanGraph Theory & Graph Algorithms

A seal-free partition of K_{n,n,n,n} under a proper 3n-edge-colouring has at most 2n+1 blocks, so in particular the target's bound 2n-1 is within 2 of the best possible.

theorem quadripartite_seal_free_partition_block_bound (n : ℕ) (hn : 1 ≤ n)
    (c : (SimpleGraph.completeEquipartiteGraph 4 n).lineGraph.Coloring (Fin (3 * n)))
    (q : ℕ) (p : Fin 4 × Fin n → Fin q)
    (hp : simple_graph_is_seal_free_partition (SimpleGraph.completeEquipartiteGraph 4 n) c q p) :
    q ≤ 2 * n + 1
quadripartite_seal_free_partition_existsIn LeanGraph Theory & Graph Algorithms

For n ≥ 4, every proper 3n-edge-colouring of K_{n,n,n,n} admits a seal-free partition into at least 2n − 1 connected blocks.

theorem quadripartite_seal_free_partition_exists (n : ℕ) (hn : 4 ≤ n)
    (c : (SimpleGraph.completeEquipartiteGraph 4 n).lineGraph.Coloring (Fin (3 * n))) :
    ∃ q : ℕ, 2 * n - 1 ≤ q ∧ ∃ p : Fin 4 × Fin n → Fin q,
      simple_graph_is_seal_free_partition (SimpleGraph.completeEquipartiteGraph 4 n) c q p
quadripartite_seal_free_partition_of_three_partIn LeanGraph Theory & Graph Algorithms

Reduction of the four-part target to the three-part one. If the first three parts admit an (n-1)-block partition whose blocks are connected and which every colour class crosses (both conditions stated on the induced subgraph of K_{n,n,n,n}), then the whole four-part graph admits a seal-free partition into 2n-1 blocks, namely those n-1 blocks together with the n vertices of the fourth part as singletons.

theorem quadripartite_seal_free_partition_of_three_part (n : ℕ) (hn : 1 ≤ n)
    (c : (SimpleGraph.completeEquipartiteGraph 4 n).lineGraph.Coloring (Fin (3 * n)))
    (p3 : Fin 4 × Fin n → Fin (n - 1))
    (hblock : ∀ j : Fin (n - 1),
      (SimpleGraph.induce {x : Fin 4 × Fin n | x.1.val < 3 ∧ p3 x = j}
        (SimpleGraph.completeEquipartiteGraph 4 n)).Connected)
    (hcut : ∀ (i : Fin (3 * n)) (T : Finset (Fin (n - 1))), T.Nonempty → T ≠ Finset.univ →
      ∃ (u v : Fin 4 × Fin n) (h : (SimpleGraph.completeEquipartiteGraph 4 n).Adj u v),
        u.1.val < 3 ∧ v.1.val < 3 ∧ p3 u ∈ T ∧ p3 v ∉ T ∧
          c ⟨s(u, v), (SimpleGraph.mem_edgeSet _).mpr h⟩ = i) :
    ∃ q : ℕ, 2 * n - 1 ≤ q ∧ ∃ p : Fin 4 × Fin n → Fin q,
      simple_graph_is_seal_free_partition (SimpleGraph.completeEquipartiteGraph 4 n) c q p
quadripartite_three_part_connecting_partition_existsIn LeanGraph Theory & Graph Algorithms

CRUX (this is the open part). For n ≥ 4, every proper 3n-edge-colouring of K_{n,n,n,n} admits a partition of the first three parts (3n vertices) into n-1 connected blocks such that for every colour i, the colour-i edges inside the first three parts cross every cut between blocks, i.e. each colour class connects the n-1 blocks.

theorem quadripartite_three_part_connecting_partition_exists (n : ℕ) (hn : 4 ≤ n)
    (c : (SimpleGraph.completeEquipartiteGraph 4 n).lineGraph.Coloring (Fin (3 * n))) :
    ∃ p3 : Fin 4 × Fin n → Fin (n - 1),
      (∀ j : Fin (n - 1),
          (SimpleGraph.induce {x : Fin 4 × Fin n | x.1.val < 3 ∧ p3 x = j}
            (SimpleGraph.completeEquipartiteGraph 4 n)).Connected) ∧
        ∀ (i : Fin (3 * n)) (T : Finset (Fin (n - 1))), T.Nonempty → T ≠ Finset.univ →
          ∃ (u v : Fin 4 × Fin n) (h : (SimpleGraph.completeEquipartiteGraph 4 n).Adj u v),
            u.1.val < 3 ∧ v.1.val < 3 ∧ p3 u ∈ T ∧ p3 v ∉ T ∧
              c ⟨s(u, v), (SimpleGraph.mem_edgeSet _).mpr h⟩ = i
quadripartite_three_part_internal_edges_cardIn LeanGraph Theory & Graph Algorithms

In a proper 3n-edge-colouring of K_{n,n,n,n}, exactly n edges of each colour have both endpoints among the first three parts (the other n edges of that colour pair each vertex of the fourth part with a vertex of the first three parts).

theorem quadripartite_three_part_internal_edges_card (n : ℕ) (hn : 1 ≤ n)
    (c : (SimpleGraph.completeEquipartiteGraph 4 n).lineGraph.Coloring (Fin (3 * n)))
    (i : Fin (3 * n)) :
    (Finset.univ.filter (fun e : (SimpleGraph.completeEquipartiteGraph 4 n).edgeSet =>
      c e = i ∧ ∀ v ∈ (e : Sym2 (Fin 4 × Fin n)), v.1.val < 3)).card = n
quadripartite_two_n_colour_class_meets_at_most_oneIn LeanGraph Theory & Graph Algorithms

In any proper edge-colouring of K_{n,n,n,n}, a colour-connecting edge set W of exactly 2n edges meets every colour class in at most one edge; equivalently the colouring is injective on W (W is rainbow).

theorem quadripartite_two_n_colour_class_meets_at_most_one
    (n : ℕ) (hn : 1 ≤ n)
    (c : (SimpleGraph.completeEquipartiteGraph 4 n).lineGraph.Coloring (Fin (3 * n)))
    (W : Finset (Sym2 (Fin 4 × Fin n)))
    (hcard : W.card = 2 * n)
    (hW : simple_graph_is_color_connecting (SimpleGraph.completeEquipartiteGraph 4 n) c (↑W : Set (Sym2 (Fin 4 × Fin n))))
    (i : Fin (3 * n)) :
    (W.filter (fun e => ∃ (he : e ∈ (SimpleGraph.completeEquipartiteGraph 4 n).edgeSet),
        c ⟨e, he⟩ = i)).card ≤ 1
quadripartite_two_n_exclusion_reduces_to_card_two_nIn LeanGraph Theory & Graph Algorithms

If every colour-connecting edge set in K_{n,n,n,n} has at least 2n edges, and some colouring defeats every colour-connecting set of exactly 2n edges, then that colouring defeats every colour-connecting set of at most 2n edges.

theorem quadripartite_two_n_exclusion_reduces_to_card_two_n (n : ℕ)
    (hlb : ∀ (c : (SimpleGraph.completeEquipartiteGraph 4 n).lineGraph.Coloring (Fin (3 * n)))
      (W : Finset (Sym2 (Fin 4 × Fin n))),
      simple_graph_is_color_connecting (SimpleGraph.completeEquipartiteGraph 4 n) c (↑W : Set (Sym2 (Fin 4 × Fin n))) → 2 * n ≤ W.card)
    (hcore : ∃ c : (SimpleGraph.completeEquipartiteGraph 4 n).lineGraph.Coloring (Fin (3 * n)),
      ∀ W : Finset (Sym2 (Fin 4 × Fin n)), W.card = 2 * n →
        ¬ simple_graph_is_color_connecting (SimpleGraph.completeEquipartiteGraph 4 n) c (↑W : Set (Sym2 (Fin 4 × Fin n)))) :
    ∃ c : (SimpleGraph.completeEquipartiteGraph 4 n).lineGraph.Coloring (Fin (3 * n)),
      ∀ W : Finset (Sym2 (Fin 4 × Fin n)), W.card ≤ 2 * n →
        ¬ simple_graph_is_color_connecting (SimpleGraph.completeEquipartiteGraph 4 n) c (↑W : Set (Sym2 (Fin 4 × Fin n)))
quadripartite_wild_number_le_of_seal_free_partitionIn LeanGraph Theory & Graph Algorithms

If a proper 3n-edge-colouring of K_{n,n,n,n} admits a seal-free partition into at least 2n − 1 connected blocks, then its wild number is at most 2n + 1.

theorem quadripartite_wild_number_le_of_seal_free_partition (n : ℕ) (hn : 1 ≤ n)
    (c : (SimpleGraph.completeEquipartiteGraph 4 n).lineGraph.Coloring (Fin (3 * n)))
    (q : ℕ) (hq : 2 * n - 1 ≤ q) (p : Fin 4 × Fin n → Fin q)
    (hp : simple_graph_is_seal_free_partition (SimpleGraph.completeEquipartiteGraph 4 n) c q p) :
    simple_graph_wild_number (SimpleGraph.completeEquipartiteGraph 4 n) c ≤ 2 * n + 1
radial_drift_two_step_telescopeIn LeanGraph Theory & Graph Algorithms

If a sequence of integers satisfies a(i+2) ≤ a(i) − 2c for all i < d, with a(0) ≤ K and a(1) ≤ K − c, then a(i) ≤ K − i·c for every i ≤ d.

theorem radial_drift_two_step_telescope (a : ℕ → ℤ) {K c : ℤ} (d : ℕ)
    (h0 : a 0 ≤ K) (h1 : a 1 ≤ K - c)
    (hstep : ∀ i, i + 2 ≤ d → a (i + 2) ≤ a i - 2 * c) :
    ∀ i, i ≤ d → a i ≤ K - (i : ℤ) * c
radial_sum_eq_level_countsIn LeanGraph Theory & Graph Algorithms

For a vertex v reachable from p, the 'outward Laplacian' of the radial function f = d(v,·) at p equals b − c, where b is the number of neighbours of p one level further from v and c the number of neighbours of p one level closer to v.

theorem radial_sum_eq_level_counts {V : Type*} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj]
    {v p : V} (hvp : G.Reachable v p) :
    ∑ y ∈ G.neighborFinset p, ((G.dist v y : ℤ) - (G.dist v p : ℤ))
      = (((G.neighborFinset p).filter (fun y => G.dist v y = G.dist v p + 1)).card : ℤ)
        - (((G.neighborFinset p).filter (fun y => G.dist v y = G.dist v p - 1)).card : ℤ)
radial_sum_ge_neg_degreeIn LeanGraph Theory & Graph Algorithms

At a vertex p of degree k the radial sum of f = d(v,·) is at least −k, because every summand is at least −1.

theorem radial_sum_ge_neg_degree {V : Type*} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj]
    {k : ℕ} {v p : V} (hdeg : G.degree p = k) :
    -(k : ℤ) ≤ ∑ y ∈ G.neighborFinset p, ((G.dist v y : ℤ) - (G.dist v p : ℤ))
radial_sum_self_eq_degreeIn LeanGraph Theory & Graph Algorithms

At the base point v itself the radial sum equals the degree k, since every neighbour is at distance 1 and v at distance 0.

theorem radial_sum_self_eq_degree {V : Type*} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (v : V) {k : ℕ} (hdeg : G.degree v = k) :
    ∑ y ∈ G.neighborFinset v, ((G.dist v y : ℤ) - (G.dist v v : ℤ)) = (k : ℤ)
radius_independence_connectivity_hamiltonian_radius_oneIn LeanGraph Theory & Graph Algorithms

In the boundary case where G has radius 1, there exists a universal vertex u. The condition alpha(G) + 1 <= kappa(G) guarantees that G is Hamiltonian.

theorem radius_independence_connectivity_hamiltonian_radius_one {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (hV : 3 ≤ Fintype.card V) (hκ : 2 ≤ ghz_graph_vertex_connectivity G) (hrad : G.radius = 1) (hα : (G.indepNum : ℕ∞) + 1 ≤ (ghz_graph_vertex_connectivity G : ℕ∞)) : G.IsHamiltonian
ramsey_r33_triangle_freeIn LeanGraph Theory & Graph Algorithms

Every triangle-free simple graph on 6 vertices has an independent set of size 3 (the R(3,3)=6 theorem for triangle-free graphs).

theorem ramsey_r33_triangle_free
    {α : Type*} [DecidableEq α] (V : Finset α) (hV : V.card = 6)
    (adj : α → α → Prop) [DecidableRel adj]
    (hadj_symm : ∀ x y, adj x y ↔ adj y x)
    (hadj_irrefl : ∀ x, ¬ adj x x)
    (htriangle_free : ∀ x ∈ V, ∀ y ∈ V, ∀ z ∈ V,
      x ≠ y → y ≠ z → z ≠ x → adj x y → adj y z → ¬ adj z x) :
    ∃ I : Finset α, I ⊆ V ∧ I.card = 3 ∧
      ∀ x ∈ I, ∀ y ∈ I, x ≠ y → ¬ adj x y
reflexive_rel_strongly_connected_cycle_cover_quadratic_diameterIn LeanGraph Theory & Graph Algorithms

There is an absolute constant C > 0 such that for every finite type V and every reflexive, strongly connected relation R on V, every element of the subgroup generated by the cycle covers of R is a signed product of at most C·|V|² cycle covers or their inverses.

theorem reflexive_rel_strongly_connected_cycle_cover_quadratic_diameter :
    ∃ C : ℕ, 0 < C ∧ ∀ (V : Type) [Fintype V] [DecidableEq V] (R : V → V → Prop),
      (∀ v, R v v) → (∀ u v : V, Relation.ReflTransGen R u v) →
      ∀ k ∈ Subgroup.closure {p : Equiv.Perm V | ∀ v, R v (p v)},
        ∃ w : List (Equiv.Perm V),
          (∀ p ∈ w, (∀ v, R v (p v)) ∨ (∀ v, R (p v) v)) ∧
            w.length ≤ C * (Fintype.card V) ^ 2 ∧ w.prod = k
reflexive_rel_swap_word_of_refl_trans_genIn LeanGraph Theory & Graph Algorithms

In any reflexive and symmetric relation R on a finite type V, for any pair u, v connected along R, the transposition swap u v can be expressed as a product of at most 2 * |V| cycle covers of R (each an edge transposition swap x y with R x y).

theorem reflexive_rel_swap_word_of_refl_trans_gen {V : Type*} [Fintype V] [DecidableEq V]
    (R : V → V → Prop) (hR : ∀ v, R v v) (hR_symm : ∀ u v, R u v → R v u) {u v : V}
    (h : Relation.ReflTransGen R u v) :
    ∃ w : List (Equiv.Perm V),
      (∀ p ∈ w, ∀ x, R x (p x)) ∧ w.length ≤ 2 * Fintype.card V ∧ w.prod = Equiv.swap u v
reflexive_rel_symmetric_cycle_cover_quadratic_diameterIn LeanGraph Theory & Graph Algorithms

If R is symmetric as well as reflexive, then every element of the subgroup generated by the cycle covers of R has a signed word of length at most C·|V|² (C = 4 suffices): every transposition (u v) with R u v is a cycle cover, and permutations decompose into such transpositions along paths.

theorem reflexive_rel_symmetric_cycle_cover_quadratic_diameter :
    ∃ C : ℕ, 0 < C ∧ ∀ (V : Type) [Fintype V] [DecidableEq V] (R : V → V → Prop),
      (∀ v, R v v) → (∀ u v : V, R u v → R v u) →
      ∀ k ∈ Subgroup.closure {p : Equiv.Perm V | ∀ v, R v (p v)},
        ∃ w : List (Equiv.Perm V),
          (∀ p ∈ w, (∀ v, R v (p v)) ∨ (∀ v, R (p v) v)) ∧
            w.length ≤ C * (Fintype.card V) ^ 2 ∧ w.prod = k
regular_eight_triangle_distinct_witnessIn LeanGraph Theory & Graph Algorithms

There is an explicit edge list on the vertices {0,…,n−1}, with 15 ≤ n ≤ 29, whose graph is 8-regular and has pairwise distinct vertex triangle-degrees. Equivalently: an explicit certificate for the regularity-8 case, which the literature leaves open (regular irregularity witnesses are known only for 9 ≤ r ≤ 29).

theorem regular_eight_triangle_distinct_witness :
    ∃ (n : ℕ) (L : List (Fin n × Fin n)), 15 ≤ n ∧ n ≤ 29 ∧
      (simple_graph_of_edge_list L).IsRegularOfDegree 8 ∧
      simple_graph_is_triangle_distinct (simple_graph_of_edge_list L)
regular_eight_triangle_distinct_witness_fin_nineteenIn LeanGraph Theory & Graph Algorithms

There is an explicit edge list on the 19 vertices {0,…,18} whose graph is 8-regular and has pairwise distinct vertex triangle-degrees. This is the target statement at one pinned order; it implies the parent by instantiation, since 15 ≤ 19 ≤ 29.

theorem regular_eight_triangle_distinct_witness_fin_nineteen :
    ∃ L : List (Fin 19 × Fin 19), (simple_graph_of_edge_list L).IsRegularOfDegree 8 ∧
      simple_graph_is_triangle_distinct (simple_graph_of_edge_list L)
regular_eight_triangle_distinct_witness_fin_twenty_twoIn LeanGraph Theory & Graph Algorithms

There is an explicit edge list on the 22 vertices {0,…,21} whose graph is 8-regular and has pairwise distinct vertex triangle-degrees. This is the target statement at one pinned order; it implies the parent by instantiation, since 15 ≤ 22 ≤ 29.

theorem regular_eight_triangle_distinct_witness_fin_twenty_two :
    ∃ L : List (Fin 22 × Fin 22), (simple_graph_of_edge_list L).IsRegularOfDegree 8 ∧
      simple_graph_is_triangle_distinct (simple_graph_of_edge_list L)
regular_girth_five_mutual_visibility_boundIn LeanGraph Theory & Graph Algorithms

Let G be a d-regular simple graph of order n and girth at least 5 on a finite vertex set V. Then the mutual-visibility number of G satisfies mutual_visibility_number G ≤ (d * Fintype.card V) / (2 * d - 1).

theorem regular_girth_five_mutual_visibility_bound {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {d : ℕ} (hreg : G.IsRegularOfDegree d)
    (hgirth : 5 ≤ G.girth) :
    mutual_visibility_number G ≤ (d * Fintype.card V) / (2 * d - 1)
regular_graph_compl_adj_trace_seq_diff_eq_lap_diff_of_eq_on_ltIn LeanGraph Theory & Graph Algorithms

For two d-regular graphs G and H on a finite vertex set V, if their Laplacian trace sequences agree at all positive integer indices j < k, then the difference of their complement adjacency traces at index k equals the difference of their Laplacian traces at index k.

open scoped Classical in
theorem regular_graph_compl_adj_trace_seq_diff_eq_lap_diff_of_eq_on_lt
    {V : Type*} [Fintype V] (d : ℕ) (G H : SimpleGraph V)
    (hG : G.IsRegularOfDegree d) (hH : H.IsRegularOfDegree d) (k : ℕ+)
    (h : ∀ j < k, graph_lap_trace_seq G j = graph_lap_trace_seq H j) :
    graph_adj_trace_seq Gᶜ k - graph_adj_trace_seq Hᶜ k =
      graph_lap_trace_seq G k - graph_lap_trace_seq H k
regular_graph_lap_trace_minimal_iff_compl_adj_trace_minimalIn LeanGraph Theory & Graph Algorithms

Let d and n be integers such that d ≥ 1 and n ≥ d + 1. A d-regular graph G on a finite vertex set of cardinality n is Laplacian trace-minimal in the class of d-regular graphs on n vertices if and only if its complement Gᶜ is trace-minimal in the class of (n - 1 - d)-regular graphs on n vertices.

open scoped Classical in
theorem regular_graph_lap_trace_minimal_iff_compl_adj_trace_minimal
    {V : Type*} [Fintype V] (d : ℕ) (G : SimpleGraph V)
    (hd : 1 ≤ d) (hn : d + 1 ≤ Fintype.card V) (hreg : G.IsRegularOfDegree d) :
    is_lap_trace_minimal d G ↔ is_adj_trace_minimal (Fintype.card V - 1 - d) Gᶜ
regular_graph_toLex_lap_trace_le_iff_compl_adj_trace_leIn LeanGraph Theory & Graph Algorithms

For any two d-regular graphs G and H on a finite vertex set V, the lexicographic order of their Laplacian trace sequences matches the lexicographic order of the adjacency trace sequences of their complements.

open scoped Classical in
theorem regular_graph_toLex_lap_trace_le_iff_compl_adj_trace_le
    {V : Type*} [Fintype V] (d : ℕ) (G H : SimpleGraph V)
    (hG : G.IsRegularOfDegree d) (hH : H.IsRegularOfDegree d) :
    toLex (graph_lap_trace_seq G) ≤ toLex (graph_lap_trace_seq H) ↔
      toLex (graph_adj_trace_seq Gᶜ) ≤ toLex (graph_adj_trace_seq Hᶜ)
relation_refltransgen_mem_of_step_invariantIn LeanGraph Theory & Graph Algorithms

If a set S contains a and is closed under the relation r, then every point reachable from a by r lies in S.

theorem relation_refltransgen_mem_of_step_invariant {α : Type*} {r : α → α → Prop} {S : Set α} {a : α}
    (ha : a ∈ S) (hstep : ∀ x ∈ S, ∀ y, r x y → y ∈ S) :
    ∀ b : α, Relation.ReflTransGen r a b → b ∈ S
simple_graph_active_edge_matching_le_two_mul_triangle_packingIn LeanGraph Theory & Graph Algorithms

In any finite simple graph, every vertex-disjoint matching of edges that each lie in a triangle has at most twice the triangle packing number.

theorem simple_graph_active_edge_matching_le_two_mul_triangle_packing (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (M : Finset (Sym2 (Fin n))) (hactive : ∀ e ∈ M, e ∈ G.edgeSet ∧ ∃ t : Finset (Fin n), G.IsNClique 3 t ∧ e ∈ finite_vertex_set_edge_encoding t) (hmatching : (M : Set (Sym2 (Fin n))).Pairwise (fun e f => Disjoint e.toFinset f.toFinset)) : M.card ≤ 2 * simple_graph_triangle_packing_number G
simple_graph_avg_connected_induced_order_clique_four_bridge_cliqueIn LeanGraph Theory & Graph Algorithms

For n ≥ 8, A(K_4 –e– K_{n−4}) = (32 + (n+24)2^{n−5} + (n−5)2^{n−3}) / (5·2^{n−4} + 14).

theorem simple_graph_avg_connected_induced_order_clique_four_bridge_clique (n : ℕ) (hn : 8 ≤ n) :
    simple_graph_avg_connected_induced_order (simple_graph_clique_four_bridge_clique n) =
      ((32 + (n + 24) * 2 ^ (n - 5) + (n - 5) * 2 ^ (n - 3) : ℕ) : ℚ) /
        ((5 * 2 ^ (n - 4) + 14 : ℕ) : ℚ)
simple_graph_avg_connected_induced_order_eq_two_side_avgIn LeanGraph Theory & Graph Algorithms

If V is partitioned into A and B (as Finsets) and the only edges between A and B are the bridge uv, then the average order A(G) equals the two-side expression R(G[A], G[B], u, v).

theorem simple_graph_avg_connected_induced_order_eq_two_side_avg {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    {A B : Finset V} (hU : (A : Set V) ∪ (B : Set V) = Set.univ) (hD : Disjoint (A : Set V) (B : Set V))
    {u v : V} (hu : u ∈ A) (hv : v ∈ B) (huv : G.Adj u v)
    (hcross : ∀ x ∈ A, ∀ y ∈ B, G.Adj x y → (x = u ∧ y = v) ∨ (x = v ∧ y = u)) :
    simple_graph_avg_connected_induced_order G =
      simple_graph_two_side_avg (G.induce (A : Set V)) (G.induce (B : Set V)) ⟨u, hu⟩ ⟨v, hv⟩
simple_graph_avg_connected_induced_order_min_of_bridgeIn LeanGraph Theory & Graph Algorithms

For every n ≥ 8, among connected graphs of order n with minimum degree at least 3 and a cut edge, the average order A(G) of connected induced subgraphs is minimised exactly by K_4 joined by one edge to K_{n−4} (unique up to isomorphism).

theorem simple_graph_avg_connected_induced_order_min_of_bridge {V : Type*} [Fintype V]
    [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (hn : 8 ≤ Fintype.card V)
    (hc : G.Connected) (hδ : ∀ v, 3 ≤ G.degree v)
    (hbr : ∃ e ∈ G.edgeSet, G.IsBridge e) :
    simple_graph_avg_connected_induced_order
        (simple_graph_clique_four_bridge_clique (Fintype.card V)) ≤
      simple_graph_avg_connected_induced_order G ∧
    (simple_graph_avg_connected_induced_order G =
        simple_graph_avg_connected_induced_order
          (simple_graph_clique_four_bridge_clique (Fintype.card V)) →
      Nonempty (G ≃g simple_graph_clique_four_bridge_clique (Fintype.card V)))
simple_graph_avg_dominating_order_eq_two_mul_card_div_three_iff_star_likeIn LeanGraph Theory & Graph Algorithms

If G has order n ≥ 2 and no isolated vertices, then avd(G) = 2n/3 if and only if G is star-like (every vertex is a leaf or has 1 or 2 leaf neighbours). The backward direction is what yields the equality half of the target: for star-like G with exactly one leaf neighbour at v the leaf-stripping identity gives avd_v(G) = 3/2 + 2(n-2)/3 = (4n+1)/6.

theorem simple_graph_avg_dominating_order_eq_two_mul_card_div_three_iff_star_like {V : Type*}
    [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (hn : 2 ≤ Fintype.card V) (hiso : ∀ w, 0 < G.degree w) :
    simple_graph_avg_dominating_order G = 2 * (Fintype.card V : ℚ) / 3 ↔
      simple_graph_is_star_like G
simple_graph_avg_dominating_order_equivIn LeanGraph Theory & Graph Algorithms

The global average dominating order is invariant under graph isomorphism.

theorem simple_graph_avg_dominating_order_equiv {V : Type*} {V' : Type*} [Fintype V] [DecidableEq V] [Fintype V'] [DecidableEq V'] (G : SimpleGraph V) [DecidableRel G.Adj] (G' : SimpleGraph V') [DecidableRel G'.Adj] (e : V ≃ V') (he : ∀ u v, G'.Adj (e u) (e v) ↔ G.Adj u v) : simple_graph_avg_dominating_order G' = simple_graph_avg_dominating_order G
simple_graph_avg_dominating_order_le_of_acyclicIn LeanGraph Theory & Graph Algorithms

Beaton--Cameron in the acyclic case: if a finite forest G has no isolated vertex (so every component has at least two vertices), then the average size of its dominating sets is at most 2|V|/3. This is exactly the target statement restricted to acyclic G (δ ≥ 1 already forces |V| ≥ 2 when |V| > 0), so it is an honest special case, not a restatement of the target.

theorem simple_graph_avg_dominating_order_le_of_acyclic {V : Type*} [Fintype V]
    [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (h : G.IsAcyclic)
    (hiso : ∀ w, 0 < G.degree w) :
    simple_graph_avg_dominating_order G ≤ 2 * (Fintype.card V : ℚ) / 3
simple_graph_avg_dominating_order_le_two_mul_card_div_threeIn LeanGraph Theory & Graph Algorithms

If G has order n ≥ 2 and no isolated vertices, then the average size of all dominating sets of G is at most 2n/3. (Beaton--Cameron, quoted as Lemma 5.1 / [5, Theorem 2.10] in arXiv:2610.11446.)

theorem simple_graph_avg_dominating_order_le_two_mul_card_div_three {V : Type*} [Fintype V]
    [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (hn : 2 ≤ Fintype.card V)
    (hiso : ∀ w, 0 < G.degree w) :
    simple_graph_avg_dominating_order G ≤ 2 * (Fintype.card V : ℚ) / 3
simple_graph_avg_dominating_order_sumIn LeanGraph Theory & Graph Algorithms

The average order of the dominating sets is additive over disjoint unions: for graphs G on V and H on W, the graph G ⊔ H on the disjoint vertex type V ⊕ W (Mathlib SimpleGraph.sum, notation ⊕g) satisfies avd(G ⊔ H) = avd(G) + avd(H). A set dominates the disjoint union iff its two halves dominate G and H respectively, so the counting sum factorises and the ratio telescopes.

theorem simple_graph_avg_dominating_order_sum {V W : Type*} [Fintype V] [DecidableEq V]
    [Fintype W] [DecidableEq W] (G : SimpleGraph V) [DecidableRel G.Adj]
    (H : SimpleGraph W) [DecidableRel H.Adj] [DecidableRel (G ⊕g H).Adj] :
    simple_graph_avg_dominating_order (G ⊕g H) =
      simple_graph_avg_dominating_order G + simple_graph_avg_dominating_order H
simple_graph_avoided_edge_book_at_most_two_pages_share_packing_triangleIn LeanGraph Theory & Graph Algorithms

A triangle s that avoids edge e can share an edge with at most two book pages containing e.

open scoped Classical in
theorem simple_graph_avoided_edge_book_at_most_two_pages_share_packing_triangle
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    (e : Sym2 V) (he : e ∈ G.edgeSet)
    (s : Finset V) (hs : G.IsNClique 3 s) (havoid : ¬ (∀ x ∈ e, x ∈ s)) :
    ((Finset.univ : Finset (Finset V)).filter (fun t =>
      G.IsNClique 3 t ∧ (∀ x ∈ e, x ∈ t) ∧ 2 ≤ (s ∩ t).card)).card ≤ 2
simple_graph_avoided_edge_book_average_twoIn LeanGraph Theory & Graph Algorithms

Given a maximum triangle packing that avoids an edge e, there is a nonempty finite collection of maximum triangle packings such that every triangle containing e has average edge overlap at least two with the packings in the collection.

theorem simple_graph_avoided_edge_book_average_two
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    (e : Sym2 V) (he : e ∈ G.edgeSet)
    (Q : Finset (Finset V))
    (hcl : ∀ t ∈ Q, G.IsNClique 3 t)
    (hpair : (Q : Set (Finset V)).Pairwise (fun s t => (s ∩ t).card ≤ 1))
    (hsize : Q.card = simple_graph_triangle_packing_number G)
    (havoid : ∀ t ∈ Q, ¬ (∀ x ∈ e, x ∈ t)) :
    ∃ K : Finset (Finset (Finset V)), K.Nonempty ∧
      (∀ P ∈ K, (∀ t ∈ P, G.IsNClique 3 t) ∧
        (P : Set (Finset V)).Pairwise (fun s t => (s ∩ t).card ≤ 1) ∧
        P.card = simple_graph_triangle_packing_number G) ∧
      (∀ t : Finset V, G.IsNClique 3 t → (∀ x ∈ e, x ∈ t) →
        2 * K.card ≤ ∑ P ∈ K,
          (finite_vertex_set_edge_encoding t ∩
            (P.image finite_vertex_set_edge_encoding).biUnion id).card)
simple_graph_avoided_edge_book_double_hit_page_overlap_ge_twoIn LeanGraph Theory & Graph Algorithms

Any book page t that meets Q in at least two edges retains edge overlap at least two after exchanging any triangle s_del in Q for a book page T containing e.

theorem simple_graph_avoided_edge_book_double_hit_page_overlap_ge_two
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    (e : Sym2 V) (he : e ∈ G.edgeSet)
    (Q : Finset (Finset V))
    (hcl : ∀ t ∈ Q, G.IsNClique 3 t)
    (hpair : (Q : Set (Finset V)).Pairwise (fun s t => (s ∩ t).card ≤ 1))
    (havoid : ∀ t ∈ Q, ¬ (∀ x ∈ e, x ∈ t))
    (s_del T : Finset V) (heT : ∀ x ∈ e, x ∈ T)
    (t : Finset V) (ht : G.IsNClique 3 t) (het : ∀ x ∈ e, x ∈ t)
    (hge2 : 2 ≤ (finite_vertex_set_edge_encoding t ∩
      (Q.image finite_vertex_set_edge_encoding).biUnion id).card) :
    2 ≤ (finite_vertex_set_edge_encoding t ∩
      ((insert T (Q.erase s_del)).image finite_vertex_set_edge_encoding).biUnion id).card
simple_graph_avoided_edge_single_hit_triangle_exchange_injectiveIn LeanGraph Theory & Graph Algorithms

If two triangle packings formed by swapping an edge-avoiding triangle in Q for a book page containing e are equal, then the swapped book pages are identical.

theorem simple_graph_avoided_edge_single_hit_triangle_exchange_injective
    {V : Type*} [DecidableEq V]
    (e : Sym2 V) (Q : Finset (Finset V))
    (havoid : ∀ t ∈ Q, ¬ (∀ x ∈ e, x ∈ t))
    (T1 T2 : Finset V) (he1 : ∀ x ∈ e, x ∈ T1) (he2 : ∀ x ∈ e, x ∈ T2)
    (s1 s2 : Finset V)
    (heq : insert T1 (Q.erase s1) = insert T2 (Q.erase s2)) :
    T1 = T2
simple_graph_avoided_edge_single_hit_triangle_exchange_packingIn LeanGraph Theory & Graph Algorithms

A book page of an edge e that meets a maximum packing Q avoiding e in exactly one edge conflicts with a unique triangle s in Q, and exchanging s for T produces another maximum triangle packing.

theorem simple_graph_avoided_edge_single_hit_triangle_exchange_packing
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    (e : Sym2 V) (he : e ∈ G.edgeSet)
    (Q : Finset (Finset V))
    (hcl : ∀ t ∈ Q, G.IsNClique 3 t)
    (hpair : (Q : Set (Finset V)).Pairwise (fun s t => (s ∩ t).card ≤ 1))
    (hsize : Q.card = simple_graph_triangle_packing_number G)
    (havoid : ∀ t ∈ Q, ¬ (∀ x ∈ e, x ∈ t))
    (T : Finset V) (hT : G.IsNClique 3 T) (heT : ∀ x ∈ e, x ∈ T)
    (hsingle : (finite_vertex_set_edge_encoding T ∩
      (Q.image finite_vertex_set_edge_encoding).biUnion id).card = 1) :
    ∃ s ∈ Q, 2 ≤ (s ∩ T).card ∧
      (∀ s' ∈ Q, 2 ≤ (s' ∩ T).card → s' = s) ∧
      (∀ t ∈ insert T (Q.erase s), G.IsNClique 3 t) ∧
      ((insert T (Q.erase s) : Finset (Finset V)) : Set (Finset V)).Pairwise
        (fun a b => (a ∩ b).card ≤ 1) ∧
      (insert T (Q.erase s)).card = simple_graph_triangle_packing_number G
simple_graph_bridge_side_setsIn LeanGraph Theory & Graph Algorithms

A bridge uv of a connected graph G with min degree ≥ 3 splits G into two Finsets A, B whose induced subgraphs are connected, have at least 4 vertices, every non-endpoint vertex has internal degree ≥ 3 and the endpoint internal degree ≥ 2.

theorem simple_graph_bridge_side_sets {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hc : G.Connected)
    (hδ : ∀ x, 3 ≤ G.degree x) {u v : V} (huv : G.Adj u v) (hb : G.IsBridge s(u, v)) :
    ∃ (A B : Finset V) (hu : u ∈ A) (hv : v ∈ B),
      (A : Set V) ∪ (B : Set V) = Set.univ ∧ Disjoint (A : Set V) (B : Set V) ∧
      (∀ x ∈ A, ∀ y ∈ B, G.Adj x y → (x = u ∧ y = v) ∨ (x = v ∧ y = u)) ∧
      (G.induce (A : Set V)).Connected ∧ (G.induce (B : Set V)).Connected ∧
      4 ≤ A.card ∧ 4 ≤ B.card ∧
      (∀ x : (A : Set V), x ≠ ⟨u, hu⟩ → 3 ≤ (G.induce (A : Set V)).degree x) ∧
      2 ≤ (G.induce (A : Set V)).degree ⟨u, hu⟩ ∧
      (∀ x : (B : Set V), x ≠ ⟨v, hv⟩ → 3 ≤ (G.induce (B : Set V)).degree x) ∧
      2 ≤ (G.induce (B : Set V)).degree ⟨v, hv⟩
simple_graph_card_edgeFinset_ge_of_indepSetFree_threeIn LeanGraph Theory & Graph Algorithms

A finite simple graph with independence number at most two has at least choose(n, 2) - n^2 / 4 edges.

theorem simple_graph_card_edgeFinset_ge_of_indepSetFree_three
    (V : Type) [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (h : G.IndepSetFree 3) :
    (Fintype.card V).choose 2 - (Fintype.card V) ^ 2 / 4 ≤ G.edgeFinset.card
simple_graph_clique_polynomial_delete_vertexIn LeanGraph Theory & Graph Algorithms

For every vertex $v$ of a finite simple graph $H$, the clique polynomial of $H$ satisfies $C_H(z) = C_{H-v}(z) + z C_{H[N_H(v)]}(z)$, where $H-v$ is the induced subgraph on $V(H) \setminus \{v\}$ and $H[N_H(v)]$ is the induced subgraph on the open neighbourhood of $v$.

open scoped Classical in
theorem simple_graph_clique_polynomial_delete_vertex {V : Type*} [Fintype V] (H : SimpleGraph V) (v : V) :
    simple_graph_clique_polynomial H =
      simple_graph_clique_polynomial (H.induce ({v}ᶜ : Set V)) +
        Polynomial.X * simple_graph_clique_polynomial (H.induce (H.neighborSet v))
simple_graph_complete_tip_cycle_packing_two_rim_edges_decreaseIn LeanGraph Theory & Graph Algorithms

Suppose a maximum triangle packing contains an isolated vertex-disjoint cycle block of k at least five triangles, with distinct rim vertices and distinct private tips, and every tip is adjacent to every rim vertex. Then deleting any two different rim edges decreases the triangle-packing number by at least two. Other packed triangles and arbitrary additional graph edges are permitted.

theorem simple_graph_complete_tip_cycle_packing_two_rim_edges_decrease (n k : ℕ) (hk : 5 ≤ k) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (v c : Fin k → Fin n) (hv : Function.Injective v) (hc : Function.Injective c) (hvc : Disjoint (Finset.univ.image v) (Finset.univ.image c)) (hP : ∀ i : Fin k, ({v i, v ⟨(i.val + 1) % k, Nat.mod_lt _ (by omega)⟩, c i} : Finset (Fin n)) ∈ P) (hrest : ∀ t ∈ P, (∀ i : Fin k, t ≠ ({v i, v ⟨(i.val + 1) % k, Nat.mod_lt _ (by omega)⟩, c i} : Finset (Fin n))) → Disjoint t ((Finset.univ.image v) ∪ (Finset.univ.image c))) (hcomplete : ∀ i j : Fin k, G.Adj (c i) (v j)) : let R : Finset (Sym2 (Fin n)) := Finset.univ.image (fun i : Fin k => s(v i, v ⟨(i.val + 1) % k, Nat.mod_lt _ (by omega)⟩)); ∀ e ∈ R, ∀ f ∈ R, e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) + 2 ≤ simple_graph_triangle_packing_number G
simple_graph_complete_triangle_cover_le_two_mul_packingIn LeanGraph Theory & Graph Algorithms

For every complete graph, its triangle cover number is at most twice its triangle packing number.

theorem simple_graph_complete_triangle_cover_le_two_mul_packing (n : ℕ) :
    simple_graph_triangle_cover_number (⊤ : SimpleGraph (Fin n)) ≤
      2 * simple_graph_triangle_packing_number (⊤ : SimpleGraph (Fin n))
simple_graph_cone_fork_plus_center_supported_triangle_coverIn LeanGraph Theory & Graph Algorithms

Consider a cone over 2m paired vertices, with all matching edges present. Suppose the other base edges lie in a triangle-free graph whose edges are contained in one fork per pair together with edges through one extra vertex. Then the m apex triangles over the matching support a triangle cover with at most 2m edges.

theorem simple_graph_cone_fork_plus_center_supported_triangle_cover
    (m : ℕ) (G : SimpleGraph (Option (Fin m × Fin 2)))
    (H : SimpleGraph (Fin m × Fin 2))
    (w : Fin m → Fin m × Fin 2) (z : Fin m × Fin 2)
    (hw : ∀ i, (w i).1 ≠ i)
    (hH : ∀ x y, H.Adj x y →
      (∃ i : Fin m, (x.1 = i ∧ y = w i) ∨ (y.1 = i ∧ x = w i)) ∨ x = z ∨ y = z)
    (htriangle : H.CliqueFree 3)
    (hapex : ∀ x, G.Adj none (some x))
    (hmatching : ∀ i : Fin m, G.Adj (some (i, 0)) (some (i, 1)))
    (hbase : ∀ x y, G.Adj (some x) (some y) →
      H.Adj x y ∨ (x.1 = y.1 ∧ x.2 ≠ y.2)) :
    let P := (Finset.univ : Finset (Fin m)).image (fun i =>
      finite_vertex_set_edge_encoding
        ({none, some (i, 0), some (i, 1)} : Finset (Option (Fin m × Fin 2))))
    let U := P.biUnion id
    ∃ C : Finset (Sym2 (Option (Fin m × Fin 2))), C ⊆ U ∧ C.card ≤ 2 * m ∧
      ∀ t ∈ simple_graph_triangle_edge_family G, (C ∩ t).Nonempty
simple_graph_connected_almost_balanced_edge_bipartitionIn LeanGraph Theory & Graph Algorithms

Every finite connected graph has a partition of its edges into two classes whose incident counts differ by at most one at every vertex, except possibly one vertex where they differ by at most two; a genuine exceptional vertex is needed only for an all-even graph with an odd number of edges.

theorem simple_graph_connected_almost_balanced_edge_bipartition
    (n : ℕ) (H : SimpleGraph (Fin n)) [DecidableRel H.Adj]
    (hconn : H.Connected) :
    ∃ R : Finset (Sym2 (Fin n)), R ⊆ H.edgeFinset ∧
      ∃ X : Finset (Fin n), X.card ≤ 1 ∧
        (X.Nonempty → (∀ v, Even (H.degree v)) ∧ Odd H.edgeFinset.card) ∧
        ∀ v, let a := (H.incidenceFinset v ∩ R).card
          let b := (H.incidenceFinset v \ R).card
          (a ≤ b + 2 ∧ b ≤ a + 2) ∧
          (v ∉ X → a ≤ b + 1 ∧ b ≤ a + 1)
simple_graph_connected_eq_univ_of_neighborhood_closedIn LeanGraph Theory & Graph Algorithms

If a finite set of vertices of a connected simple graph contains a vertex v and is closed under taking neighbours, then it is the whole vertex set.

theorem simple_graph_connected_eq_univ_of_neighborhood_closed {V : Type*} [Fintype V] [DecidableEq V]
    (H : SimpleGraph V) [DecidableRel H.Adj] (hconn : H.Connected) {S : Finset V} {v : V}
    (hv : v ∈ S) (hclosed : ∀ x ∈ S, H.neighborFinset x ⊆ S) : S = Finset.univ
simple_graph_connected_even_degree_almost_balanced_edge_bipartitionIn LeanGraph Theory & Graph Algorithms

Every finite connected simple graph with all even degrees has an edge bipartition into two classes whose incident counts differ by at most one, except possibly one vertex where they differ by at most two (and this exceptional vertex is needed only if the number of edges is odd).

theorem simple_graph_connected_even_degree_almost_balanced_edge_bipartition
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (hconn : G.Connected) (heven : ∀ v, Even (G.degree v)) :
    ∃ R : Finset (Sym2 V), R ⊆ G.edgeFinset ∧
      ∃ X : Finset V, X.card ≤ 1 ∧
        (X.Nonempty → Odd G.edgeFinset.card) ∧
        ∀ v, let a := (G.incidenceFinset v ∩ R).card
          let b := (G.incidenceFinset v \ R).card
          (a ≤ b + 2 ∧ b ≤ a + 2) ∧
          (v ∉ X → a ≤ b + 1 ∧ b ≤ a + 1)
simple_graph_connected_even_degree_exists_eulerian_circuitIn LeanGraph Theory & Graph Algorithms

Every finite connected simple graph where every vertex has even degree admits an Eulerian circuit.

theorem simple_graph_connected_even_degree_exists_eulerian_circuit
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (hconn : G.Connected) (heven : ∀ v, Even (G.degree v)) :
    ∃ (u : V) (p : G.Walk u u), p.IsEulerian
simple_graph_connected_four_regular_codegree_two_card_five_or_sixIn LeanGraph Theory & Graph Algorithms

A connected four-regular finite simple graph in which the endpoints of every edge have at least two common neighbors has five or six vertices.

theorem simple_graph_connected_four_regular_codegree_two_card_five_or_six (n : ℕ) (H : SimpleGraph (Fin n)) [DecidableRel H.Adj] (hconnected : H.Connected) (hregular : ∀ v, H.degree v = 4) (hcodeg : ∀ u v, H.Adj u v → 2 ≤ (H.neighborFinset u ∩ H.neighborFinset v).card) : n = 5 ∨ n = 6
simple_graph_connected_not_isTree_card_le_edge_cardIn LeanGraph Theory & Graph Algorithms

A connected simple graph that is not a tree has at least as many edges as vertices.

theorem simple_graph_connected_not_isTree_card_le_edge_card {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hconn : G.Connected) (hnt : ¬ G.IsTree) :
    Fintype.card V ≤ G.edgeFinset.card
simple_graph_connected_odd_degree_balanced_edge_bipartitionIn LeanGraph Theory & Graph Algorithms

Every finite connected simple graph with at least one vertex of odd degree has a balanced edge bipartition with incident count difference at most one everywhere (with no exceptional vertex needed).

theorem simple_graph_connected_odd_degree_balanced_edge_bipartition
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (hconn : G.Connected) (hodd : ∃ v, Odd (G.degree v)) :
    ∃ R : Finset (Sym2 V), R ⊆ G.edgeFinset ∧
      ∀ v, let a := (G.incidenceFinset v ∩ R).card
        let b := (G.incidenceFinset v \ R).card
        a ≤ b + 1 ∧ b ≤ a + 1
simple_graph_connected_two_regular_iso_cycle_graphIn LeanGraph Theory & Graph Algorithms

Every finite connected simple graph in which every vertex has degree 2 is isomorphic to a cycle graph: there is a bijection of the vertex set with Fin |V| that carries adjacency to adjacency in SimpleGraph.cycleGraph |V|.

theorem simple_graph_connected_two_regular_iso_cycle_graph {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hconn : G.Connected) (hdeg : ∀ v, G.degree v = 2) :
    ∃ e : V ≃ Fin (Fintype.card V),
      ∀ u v, G.Adj u v ↔ (SimpleGraph.cycleGraph (Fintype.card V)).Adj (e u) (e v)
simple_graph_csym_max_nullity_eq_fort_transversal_number_of_all_fortsIn LeanGraph Theory & Graph Algorithms

If the combinatorially symmetric maximum nullity N(G) is at least the transversal number of all forts of G, then N(G) equals the fort transversal number T(G).

theorem simple_graph_csym_max_nullity_eq_fort_transversal_number_of_all_forts
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    (h : finset_transversal_number (open Classical in (Finset.univ : Finset (Finset V)).filter (fun F => simple_graph_is_fort G ↑F)) ≤ simple_graph_csym_max_nullity G) :
    simple_graph_csym_max_nullity G = simple_graph_fort_transversal_number G
simple_graph_cycleGraph_hop_is_rotationIn LeanGraph Theory & Graph Algorithms

On the cycle graph of odd order n, every hop is a rotation: h = finRotate n ^ k for some k.

theorem simple_graph_cycleGraph_hop_is_rotation {n : ℕ} (hn : Odd n) (h : Equiv.Perm (Fin n))
    (hh : simple_graph_is_hop (SimpleGraph.cycleGraph n) h) : ∃ k : ℕ, h = finRotate n ^ k
simple_graph_degree_three_nbrsIn LeanGraph Theory & Graph Algorithms

A vertex u of degree three with a neighbour v has exactly two further neighbours a and b, distinct from each other and from v, and its neighbourhood is {v, a, b}.

theorem simple_graph_degree_three_nbrs {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (u v : V) (huv : G.Adj u v) (hu : G.degree u = 3) :
    ∃ a b : V, a ≠ b ∧ a ≠ v ∧ b ≠ v ∧ G.Adj u a ∧ G.Adj u b ∧
      G.neighborFinset u = {v, a, b}
simple_graph_dense_high_degree_unforced_internal_k4_anchor_counterexampleIn LeanGraph Theory & Graph Algorithms

A four-connected, two-edge-stable graph has 31 vertices, 109 edges, packing number 26, maximum degree at least 16, every edge in at least two triangles, and no one-point triangle-family separator; nevertheless it has a full-support maximum packing with a fully forced K4 face whose internal anchor is contained only in unforced packed triangles. Its average degree exceeds seven.

theorem simple_graph_dense_high_degree_unforced_internal_k4_anchor_counterexample : let P : Finset (Finset (Fin 31)) := {{0,1,5},{0,2,3},{2,6,7},{2,8,9},{3,6,9},{3,7,8},{4,5,9},{5,6,8},{3,10,12},{4,11,12},{10,13,15},{11,14,15},{6,13,16},{7,14,16},{3,17,19},{8,18,19},{17,20,22},{18,21,22},{5,20,23},{7,21,23},{2,24,26},{3,25,26},{24,27,29},{25,28,29},{6,27,30},{8,28,30}}; ∃ (G : SimpleGraph (Fin 31)) (E : Finset (Sym2 (Fin 31))), (↑E : Set (Sym2 (Fin 31))) = G.edgeSet ∧ E.card = 109 ∧ (∀ t ∈ P, G.IsNClique 3 t) ∧ (P : Set (Finset (Fin 31))).Pairwise (fun t u => (t ∩ u).card ≤ 1) ∧ P.card = 26 ∧ P.card = simple_graph_triangle_packing_number G ∧ P.biUnion id = Finset.univ ∧ (∀ e f : Sym2 (Fin 31), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) ∧ (∀ e ∈ G.edgeSet, 2 ≤ ((simple_graph_triangle_edge_family G).filter (fun t => e ∈ t)).card) ∧ (∀ R : Finset (Fin 31), R.card ≤ 3 → (G.induce {v | v ∉ R}).Connected) ∧ (∃ v : Fin 31, ∃ N : Finset (Fin 31), N.card = 16 ∧ ∀ w ∈ N, G.Adj v w) ∧ (∀ e ∈ G.edgeSet, ∀ a ∈ simple_graph_triangle_edge_family G, ∀ b ∈ simple_graph_triangle_edge_family G, Relation.ReflTransGen (fun x y : Finset (Sym2 (Fin 31)) => x ∈ simple_graph_triangle_edge_family G ∧ y ∈ simple_graph_triangle_edge_family G ∧ ¬ Disjoint (x.erase e) (y.erase e)) a b) ∧ G.IsNClique 4 ({1,2,8,9} : Finset (Fin 31)) ∧ ({2,8,9} : Finset (Fin 31)) ∈ P ∧ finite_vertex_set_edge_encoding ({2,8,9} : Finset (Fin 31)) ⊆ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id) ∧ (∃ q ∈ P, (1 : Fin 31) ∈ q) ∧ (∀ q ∈ P, (1 : Fin 31) ∈ q → Disjoint (finite_vertex_set_edge_encoding q) (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id))
simple_graph_diam_two_nut_graph_has_triangle_free_or_subset_nbhNeeds helpGraph Theory & Graph Algorithms

Every finite simple nut graph of diameter 2 has either a triangle-free edge or a pair of vertices with strictly nested neighborhoods.

theorem simple_graph_diam_two_nut_graph_has_triangle_free_or_subset_nbh
    {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hnut : simple_graph_is_nut_graph G) (hdiam : G.diam = 2) :
    (∃ u v : V, G.Adj u v ∧ ∀ w : V, ¬(G.Adj u w ∧ G.Adj v w)) ∨
    (∃ u v : V, G.neighborSet v ⊂ G.neighborSet u)
simple_graph_dominating_sets_monoIn LeanGraph Theory & Graph Algorithms

If H is a spanning subgraph of G on the same vertex set (every edge of H is an edge of G, written H ≤ G), then every dominating set of H is a dominating set of G, i.e. D(H) ⊆ D(G). Adding edges can only enlarge the family of dominating sets.

theorem simple_graph_dominating_sets_mono {V : Type*} [Fintype V] [DecidableEq V]
    {G H : SimpleGraph V} [DecidableRel G.Adj] [DecidableRel H.Adj] (h : H ≤ G) :
    simple_graph_dominating_sets H ⊆ simple_graph_dominating_sets G
simple_graph_domination_number_le_cardIn LeanGraph Theory & Graph Algorithms

If S is a dominating set of G with |S| = k then the domination number of G is at most k.

theorem simple_graph_domination_number_le_card {V : Type*} [Fintype V] (G : SimpleGraph V)
    (S : Finset V) (h : simple_graph_is_dominating G (S : Set V)) :
    simple_graph_domination_number G ≤ S.card
simple_graph_eq_top_of_card_four_min_degree_threeIn LeanGraph Theory & Graph Algorithms

Every finite simple graph on 4 vertices with minimum degree at least 3 is the complete graph.

theorem simple_graph_eq_top_of_card_four_min_degree_three
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (hn : Fintype.card V = 4) (hdeg : ∀ v : V, 3 ≤ G.degree v) :
    G = ⊤
simple_graph_exists_cycle_edge_degree_posIn LeanGraph Theory & Graph Algorithms

If a finite graph G has no isolated vertex and is not acyclic, then some edge uv (lying on a cycle) can be deleted while keeping the minimum degree at least 1: every vertex of G - uv still has positive degree, and the number of edges goes down by exactly one.

theorem simple_graph_exists_cycle_edge_degree_pos {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hiso : ∀ w, 0 < G.degree w)
    (hcyc : ¬ G.IsAcyclic) :
    ∃ u v : V, G.Adj u v ∧ (∀ w, 0 < (G.deleteEdges {s(u, v)}).degree w) ∧
      (G.deleteEdges {s(u, v)}).edgeFinset.card + 1 = G.edgeFinset.card
simple_graph_exists_deletion_edge_not_acyclicIn LeanGraph Theory & Graph Algorithms

If a finite graph G has no isolated vertex and contains a cycle, then some edge uv satisfies: G - uv still has no isolated vertex (every vertex keeps positive degree) and the average dominating-set order does not decrease when the edge is deleted, avd(G) ≤ avd(G - uv). This is the induction step of the edge-count induction.

theorem simple_graph_exists_deletion_edge_not_acyclic {V : Type*} [Fintype V]
    [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (hiso : ∀ w, 0 < G.degree w) (hcyc : ¬ G.IsAcyclic) :
    ∃ u v : V, G.Adj u v ∧ (∀ w, 0 < (G.deleteEdges {s(u, v)}).degree w) ∧
      simple_graph_avg_dominating_order G ≤
        simple_graph_avg_dominating_order (G.deleteEdges {s(u, v)})
simple_graph_exists_even_order_hop_of_not_same_cycleIn LeanGraph Theory & Graph Algorithms

If h is a hop of odd order and uv is an edge whose endpoints lie on different cycles of h, then G has a hop of even order.

theorem simple_graph_exists_even_order_hop_of_not_same_cycle {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (h : Equiv.Perm V) (hh : simple_graph_is_hop G h)
    (hodd : Odd (orderOf h)) {u v : V} (huv : G.Adj u v) (hsame : ¬ h.SameCycle u v) :
    ∃ g : Equiv.Perm V, simple_graph_is_hop G g ∧ Even (orderOf g)
simple_graph_exists_even_order_hop_of_not_traversedIn LeanGraph Theory & Graph Algorithms

If h is a hop of odd order and uv is an edge with h u ≠ v and h v ≠ u, then G admits a hop of even order.

theorem simple_graph_exists_even_order_hop_of_not_traversed {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (h : Equiv.Perm V) (hh : simple_graph_is_hop G h)
    (hodd : Odd (orderOf h)) {u v : V} (huv : G.Adj u v) (hu : h u ≠ v) (hv : h v ≠ u) :
    ∃ g : Equiv.Perm V, simple_graph_is_hop G g ∧ Even (orderOf g)
simple_graph_exists_even_order_hop_of_same_cycleIn LeanGraph Theory & Graph Algorithms

If h is a hop of odd order, uv is an edge traversed by neither direction (h u ≠ v and h v ≠ u), and u and v lie on the same cycle of h, then G has a hop of even order.

theorem simple_graph_exists_even_order_hop_of_same_cycle {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (h : Equiv.Perm V) (hh : simple_graph_is_hop G h)
    (hodd : Odd (orderOf h)) {u v : V} (huv : G.Adj u v) (hsame : h.SameCycle u v)
    (hu : h u ≠ v) (hv : h v ≠ u) :
    ∃ g : Equiv.Perm V, simple_graph_is_hop G g ∧ Even (orderOf g)
simple_graph_exists_hamiltonian_walk_of_isHamiltonianIn LeanGraph Theory & Graph Algorithms

A Hamiltonian graph on at least one vertex has a Hamiltonian path between some pair of vertices.

theorem simple_graph_exists_hamiltonian_walk_of_isHamiltonian {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (hV : Fintype.card V ≠ 1) (h : G.IsHamiltonian) : ∃ a b : V, ∃ p : G.Walk a b, p.IsHamiltonian
simple_graph_exists_max_length_pathIn LeanGraph Theory & Graph Algorithms

In a finite graph with at least one vertex there is a path of maximum length: a path a ~> b such that every path in G is no longer.

theorem simple_graph_exists_max_length_path {V : Type*} [Fintype V] [Nonempty V] (G : SimpleGraph V) : ∃ (a b : V) (p : G.Walk a b), p.IsPath ∧ ∀ (c d : V) (q : G.Walk c d), q.IsPath → q.length ≤ p.length
simple_graph_exists_maximum_triangle_packingIn LeanGraph Theory & Graph Algorithms

Every finite simple graph has a pairwise edge-disjoint triangle packing achieving its triangle packing number.

theorem simple_graph_exists_maximum_triangle_packing
  {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) :
  ∃ T : Finset (Finset V),
    (∀ t ∈ T, G.IsNClique 3 t) ∧
    (T : Set (Finset V)).Pairwise (fun s t => (s ∩ t).card ≤ 1) ∧
    T.card = simple_graph_triangle_packing_number G
simple_graph_exists_spanning_tree_cardIn LeanGraph Theory & Graph Algorithms

Every finite connected simple graph has a spanning tree: a set W of exactly |V| − 1 of its edges whose edge set, viewed as a graph on all of V, is connected.

theorem simple_graph_exists_spanning_tree_card {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (hG : G.Connected) :
    ∃ W : Finset (Sym2 V), (W : Set (Sym2 V)) ⊆ G.edgeSet ∧
      W.card = Fintype.card V - 1 ∧ (SimpleGraph.fromEdgeSet (W : Set (Sym2 V))).Connected
simple_graph_five_packing_min_two_forced_independentIn LeanGraph Theory & Graph Algorithms

In a finite graph where every edge belongs to at least two triangles, let five edge-disjoint triangles form a maximum packing. For any marking of one edge in each packed triangle that includes every singleton-forced edge, the unmarked conflict graph has an independent set of five vertices.

theorem simple_graph_five_packing_min_two_forced_independent
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    (P : Finset (Finset (Sym2 V))) (M : Finset (Sym2 V))
    (hpack : P ⊆ simple_graph_triangle_edge_family G ∧ P.card = 5 ∧
      (P : Set (Finset (Sym2 V))).Pairwise Disjoint)
    (hmax : ∀ Q : Finset (Finset (Sym2 V)),
      Q ⊆ simple_graph_triangle_edge_family G →
      (Q : Set (Finset (Sym2 V))).Pairwise Disjoint → Q.card ≤ 5)
    (hmin : ∀ e ∈ G.edgeSet,
      2 ≤ ((simple_graph_triangle_edge_family G).filter (fun t => e ∈ t)).card)
    (hmark : M ⊆ P.biUnion id ∧ (∀ p ∈ P, (M ∩ p).card = 1) ∧
      ((((simple_graph_triangle_edge_family G).filter
        (fun t => (t ∩ P.biUnion id).card = 1)).biUnion id) ∩ P.biUnion id) ⊆ M) :
    ∃ I : Finset (Sym2 V), I ⊆ P.biUnion id \ M ∧ I.card = 5 ∧
      ∀ t ∈ simple_graph_triangle_edge_family G, (t ∩ I).card = 2 → t ⊆ P.biUnion id
simple_graph_five_packing_min_two_forced_independent_cover_kernelIn LeanGraph Theory & Graph Algorithms

Given a maximum five-triangle packing whose support meets every triangle, a graph in which every edge lies in at least two triangles, and a marking of exactly one edge per packed triangle that includes every singly-supported support edge, there are five support edges outside the marking which do not contain the support-intersection of any single triangle.

theorem simple_graph_five_packing_min_two_forced_independent_cover_kernel
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    (P : Finset (Finset (Sym2 V))) (M : Finset (Sym2 V))
    (hpack : P ⊆ simple_graph_triangle_edge_family G ∧ P.card = 5 ∧
      (P : Set (Finset (Sym2 V))).Pairwise Disjoint)
    (hmeet : ∀ t ∈ simple_graph_triangle_edge_family G, (t ∩ P.biUnion id).Nonempty)
    (hmin : ∀ e ∈ G.edgeSet,
      2 ≤ ((simple_graph_triangle_edge_family G).filter (fun t => e ∈ t)).card)
    (hmark : M ⊆ P.biUnion id ∧ (∀ p ∈ P, (M ∩ p).card = 1) ∧
      ((((simple_graph_triangle_edge_family G).filter
        (fun t => (t ∩ P.biUnion id).card = 1)).biUnion id) ∩ P.biUnion id) ⊆ M) :
    ∃ I : Finset (Sym2 V), I ⊆ P.biUnion id \ M ∧ I.card = 5 ∧
      ∀ t ∈ simple_graph_triangle_edge_family G, ¬ (t ∩ P.biUnion id ⊆ I)
simple_graph_five_packing_min_two_forced_supported_coverIn LeanGraph Theory & Graph Algorithms

In a finite graph where every edge belongs to at least two triangles, let five edge-disjoint triangles form a maximum packing admitting a marking of one edge per packed triangle that includes every singleton-forced edge. Then a triangle cover of at most ten edges lies entirely in the packing support.

theorem simple_graph_five_packing_min_two_forced_supported_cover
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    (P : Finset (Finset (Sym2 V))) (M : Finset (Sym2 V))
    (hpack : P ⊆ simple_graph_triangle_edge_family G ∧ P.card = 5 ∧
      (P : Set (Finset (Sym2 V))).Pairwise Disjoint)
    (hmax : ∀ Q : Finset (Finset (Sym2 V)),
      Q ⊆ simple_graph_triangle_edge_family G →
      (Q : Set (Finset (Sym2 V))).Pairwise Disjoint → Q.card ≤ 5)
    (hmin : ∀ e ∈ G.edgeSet,
      2 ≤ ((simple_graph_triangle_edge_family G).filter (fun t => e ∈ t)).card)
    (hmark : M ⊆ P.biUnion id ∧ (∀ p ∈ P, (M ∩ p).card = 1) ∧
      ((((simple_graph_triangle_edge_family G).filter
        (fun t => (t ∩ P.biUnion id).card = 1)).biUnion id) ∩ P.biUnion id) ⊆ M) :
    ∃ C : Finset (Sym2 V), C ⊆ P.biUnion id ∧ C.card ≤ 10 ∧
      ∀ t ∈ simple_graph_triangle_edge_family G, (C ∩ t).Nonempty
simple_graph_five_packing_support_triangle_meets_supportIn LeanGraph Theory & Graph Algorithms

Every triangle of a graph meets the edge support of any maximum five-triangle packing.

theorem simple_graph_five_packing_support_triangle_meets_support
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    (P : Finset (Finset (Sym2 V)))
    (hpack : P ⊆ simple_graph_triangle_edge_family G ∧ P.card = 5 ∧
      (P : Set (Finset (Sym2 V))).Pairwise Disjoint)
    (hmax : ∀ Q : Finset (Finset (Sym2 V)),
      Q ⊆ simple_graph_triangle_edge_family G →
      (Q : Set (Finset (Sym2 V))).Pairwise Disjoint → Q.card ≤ 5) :
    ∀ t ∈ simple_graph_triangle_edge_family G, (t ∩ P.biUnion id).Nonempty
simple_graph_fixed_two_budget_example_full_supportIn LeanGraph Theory & Graph Algorithms

The displayed maximum packing in the nine-vertex fixed-two-budget counterexample covers every vertex.

theorem simple_graph_fixed_two_budget_example_full_support : In701Budget.P.biUnion id = Finset.univ
simple_graph_fort_transversal_number_le_cardIn LeanGraph Theory & Graph Algorithms

For any finite simple graph G on a finite vertex type V, the fort transversal number T(G) is at most the number of vertices |V|.

theorem simple_graph_fort_transversal_number_le_card
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) :
    simple_graph_fort_transversal_number G ≤ Fintype.card V
simple_graph_four_regular_codeg_mixed_case_falseIn LeanGraph Theory & Graph Algorithms

In a four-regular finite simple graph in which the endpoints of every edge have at least two common neighbours, no vertex v has two neighbours x and y such that x has exactly three and y has exactly two common neighbours with v.

theorem simple_graph_four_regular_codeg_mixed_case_false {V : Type*} [Fintype V] [DecidableEq V]
    (H : SimpleGraph V) [DecidableRel H.Adj] (hreg : ∀ x, H.degree x = 4)
    (hcodeg : ∀ u w, H.Adj u w → 2 ≤ (H.neighborFinset u ∩ H.neighborFinset w).card)
    {v x y : V} (hx : x ∈ H.neighborFinset v) (hcx : (H.neighborFinset v ∩ H.neighborFinset x).card = 3)
    (hy : y ∈ H.neighborFinset v) (hcy : (H.neighborFinset v ∩ H.neighborFinset y).card = 2) : False
simple_graph_four_regular_codeg_three_neighborFinsetIn LeanGraph Theory & Graph Algorithms

If x is a neighbour of v in a four-regular graph and x has three common neighbours with v, then the neighbourhood of x consists exactly of v together with the three neighbours of v different from x.

theorem simple_graph_four_regular_codeg_three_neighborFinset {V : Type*} [Fintype V] [DecidableEq V]
    (H : SimpleGraph V) [DecidableRel H.Adj] (hreg : ∀ x, H.degree x = 4) {v x : V}
    (hx : x ∈ H.neighborFinset v) (hc : (H.neighborFinset v ∩ H.neighborFinset x).card = 3) :
    H.neighborFinset x = insert v ((H.neighborFinset v).erase x)
simple_graph_four_regular_codeg_two_neighborFinsetIn LeanGraph Theory & Graph Algorithms

If x is a neighbour of v in a four-regular graph and x has exactly two common neighbours with v, then x has exactly one further neighbour z outside {v} ∪ N(v), and the neighbourhood of x is {z, v} together with the two common neighbours.

theorem simple_graph_four_regular_codeg_two_neighborFinset {V : Type*} [Fintype V] [DecidableEq V]
    (H : SimpleGraph V) [DecidableRel H.Adj] (hreg : ∀ x, H.degree x = 4) {v x : V}
    (hx : x ∈ H.neighborFinset v) (hc : (H.neighborFinset v ∩ H.neighborFinset x).card = 2) :
    ∃ z : V, z ∉ H.neighborFinset v ∧ z ≠ v ∧
      H.neighborFinset x = insert z (insert v (H.neighborFinset v ∩ H.neighborFinset x))
simple_graph_four_regular_codeg_uniform_dichotomyIn LeanGraph Theory & Graph Algorithms

In a four-regular graph in which the endpoints of every edge have at least two common neighbours, for any vertex v the number of common neighbours of v with its neighbours is either always three or always two.

theorem simple_graph_four_regular_codeg_uniform_dichotomy {V : Type*} [Fintype V] [DecidableEq V]
    (H : SimpleGraph V) [DecidableRel H.Adj] (hreg : ∀ x, H.degree x = 4)
    (hcodeg : ∀ u w, H.Adj u w → 2 ≤ (H.neighborFinset u ∩ H.neighborFinset w).card) (v : V) :
    (∀ x, x ∈ H.neighborFinset v → (H.neighborFinset v ∩ H.neighborFinset x).card = 3) ∨
    (∀ x, x ∈ H.neighborFinset v → (H.neighborFinset v ∩ H.neighborFinset x).card = 2)
simple_graph_four_regular_codeg_uniform_three_card_fiveIn LeanGraph Theory & Graph Algorithms

If every neighbour of a vertex v of a connected four-regular finite simple graph has exactly three common neighbours with v, then the graph has exactly five vertices.

theorem simple_graph_four_regular_codeg_uniform_three_card_five {V : Type*} [Fintype V] [DecidableEq V]
    (H : SimpleGraph V) [DecidableRel H.Adj] (hconn : H.Connected) (hreg : ∀ x, H.degree x = 4) (v : V)
    (hv : ∀ x, x ∈ H.neighborFinset v → (H.neighborFinset v ∩ H.neighborFinset x).card = 3) :
    Fintype.card V = 5
simple_graph_four_regular_codeg_uniform_two_card_sixIn LeanGraph Theory & Graph Algorithms

If every neighbour of a vertex v of a connected four-regular finite simple graph has exactly two common neighbours with v, and every edge has at least two common neighbours, then the graph has exactly six vertices.

theorem simple_graph_four_regular_codeg_uniform_two_card_six {V : Type*} [Fintype V] [DecidableEq V]
    (H : SimpleGraph V) [DecidableRel H.Adj] (hconn : H.Connected) (hreg : ∀ x, H.degree x = 4)
    (hcodeg : ∀ u w, H.Adj u w → 2 ≤ (H.neighborFinset u ∩ H.neighborFinset w).card) (v : V)
    (hv : ∀ x, x ∈ H.neighborFinset v → (H.neighborFinset v ∩ H.neighborFinset x).card = 2) :
    Fintype.card V = 6
simple_graph_four_regular_neighbor_codeg_le_threeIn LeanGraph Theory & Graph Algorithms

In a four-regular simple graph on a finite vertex type, two adjacent vertices have at most three common neighbours.

theorem simple_graph_four_regular_neighbor_codeg_le_three {V : Type*} [Fintype V] [DecidableEq V]
    (H : SimpleGraph V) [DecidableRel H.Adj] (hreg : ∀ x, H.degree x = 4) {v w : V}
    (hw : w ∈ H.neighborFinset v) : (H.neighborFinset w ∩ H.neighborFinset v).card ≤ 3
simple_graph_fully_forced_triangle_unique_k4In LeanGraph Theory & Graph Algorithms

A fully singleton-forced triangle in a maximum triangle packing belongs to a K4 whose remaining three edges avoid the packing, and every singleton witness at one of its edges lies in that same K4.

open scoped Sym2

theorem simple_graph_fully_forced_triangle_unique_k4
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    (P : Finset (Finset (Sym2 V)))
    (hP : P ⊆ simple_graph_triangle_edge_family G)
    (hdisj : (P : Set (Finset (Sym2 V))).Pairwise Disjoint)
    (hmax : ∀ Q : Finset (Finset (Sym2 V)), Q ⊆ simple_graph_triangle_edge_family G →
      (Q : Set (Finset (Sym2 V))).Pairwise Disjoint → Q.card ≤ P.card)
    (a b c : V) (hab : a ≠ b) (hac : a ≠ c) (hbc : b ≠ c)
    (hp : ({s(a,b), s(a,c), s(b,c)} : Finset (Sym2 V)) ∈ P)
    (hforced : ∀ e ∈ ({s(a,b), s(a,c), s(b,c)} : Finset (Sym2 V)),
      ∃ t ∈ simple_graph_triangle_edge_family G, (t ∩ P.biUnion id).card = 1 ∧ e ∈ t) :
    ∃ d : V, d ≠ a ∧ d ≠ b ∧ d ≠ c ∧
      let K : Finset (Sym2 V) := {s(a,b),s(a,c),s(b,c),s(a,d),s(b,d),s(c,d)}
      (↑K : Set (Sym2 V)) ⊆ G.edgeSet ∧
      K ∩ P.biUnion id = ({s(a,b),s(a,c),s(b,c)} : Finset (Sym2 V)) ∧
      ∀ t ∈ simple_graph_triangle_edge_family G,
        (t ∩ P.biUnion id).card = 1 →
        (∃ e ∈ ({s(a,b), s(a,c), s(b,c)} : Finset (Sym2 V)), e ∈ t) → t ⊆ K
simple_graph_good_packing_multi_witness_support_kernelIn LeanGraph Theory & Graph Algorithms

For a good maximum triangle packing P, if an outside vertex spans at least m packed edges, a support-signature-preserving induced subgraph contains P and uses at most 4|P|−m+1 vertices.

theorem simple_graph_good_packing_multi_witness_support_kernel (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hgood : ∀ p ∈ P, (finite_vertex_set_edge_encoding p ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).card ≤ 1) (x : Fin n) (m : ℕ) (hx : x ∉ P.biUnion id) (hm : m ≤ ((P.biUnion finite_vertex_set_edge_encoding).filter (fun e => ∀ v ∈ e, G.Adj x v)).card) : ∃ W : Finset (Fin n), W.card + m ≤ 4 * P.card + 1 ∧ P.biUnion id ⊆ W ∧ ∀ t : Finset (Fin n), G.IsNClique 3 t → ∃ s : Finset (Fin n), G.IsNClique 3 s ∧ s ⊆ W ∧ finite_vertex_set_edge_encoding s ∩ (P.biUnion finite_vertex_set_edge_encoding) = finite_vertex_set_edge_encoding t ∩ (P.biUnion finite_vertex_set_edge_encoding)
simple_graph_good_sunflower_components_supported_coverIn LeanGraph Theory & Graph Algorithms

If a good maximum packing can be partitioned into sunflower families whose vertex supports are pairwise disjoint, the graph has a triangle cover within the packed edges of size at most twice the packing size.

theorem simple_graph_good_sunflower_components_supported_cover (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (B : Finset (Finset (Finset (Fin n)))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hgood : ∀ p ∈ P, (finite_vertex_set_edge_encoding p ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).card ≤ 1) (hpartition : B.biUnion id = P) (hparts : (B : Set (Finset (Finset (Fin n)))).Pairwise (fun A D => Disjoint (A.biUnion id) (D.biUnion id))) (hstar : ∀ A ∈ B, ∃ r, ∀ t ∈ A, r ∈ t) : ∃ C : Finset (Sym2 (Fin n)), C ⊆ P.biUnion finite_vertex_set_edge_encoding ∧ C.card ≤ 2 * P.card ∧ ∀ t : Finset (Fin n), G.IsNClique 3 t → ¬ Disjoint (finite_vertex_set_edge_encoding t) C
simple_graph_good_sunflower_forced_base_half_independence_packedIn LeanGraph Theory & Graph Algorithms

Conjectural sunflower bottleneck: in a good maximum sunflower packing, let F be the singly forced packed edges avoiding the root. After deleting F from the graph on their 2|F| endpoints, there is an independent set of size |F|.

theorem simple_graph_good_sunflower_forced_base_half_independence_packed (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (r : Fin n) (F : Finset (Sym2 (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hroot : ∀ t ∈ P, r ∈ t) (hgood : ∀ p ∈ P, (finite_vertex_set_edge_encoding p ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).card ≤ 1) (hF : F = ((P.biUnion finite_vertex_set_edge_encoding ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).filter (fun e => r ∉ e.toFinset))) : ∃ Z : Finset (Fin n), Z ⊆ F.biUnion Sym2.toFinset ∧ F.card ≤ Z.card ∧ ∀ u ∈ Z, ∀ v ∈ Z, G.Adj u v → s(u,v) ∈ F
simple_graph_good_sunflower_forced_base_subpacking_kernel_packedIn LeanGraph Theory & Graph Algorithms

Given a good maximum sunflower packing, restrict it to its forced bases. There is a spanning subgraph whose maximum packing is exactly this subpacking, whose forced packed edges are exactly those bases, and whose graph on their endpoints is unchanged. It has at most three vertices per forced base plus the root incident to any retained edge.

theorem simple_graph_good_sunflower_forced_base_subpacking_kernel_packed (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P Q : Finset (Finset (Fin n))) (r : Fin n) (F : Finset (Sym2 (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hroot : ∀ t ∈ P, r ∈ t) (hgood : ∀ p ∈ P, (finite_vertex_set_edge_encoding p ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).card ≤ 1) (hF : F = ((P.biUnion finite_vertex_set_edge_encoding ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).filter (fun e => r ∉ e.toFinset))) (hQ : Q = P.filter (fun p => ∃ e ∈ F, e ∈ finite_vertex_set_edge_encoding p)) : ∃ (H : SimpleGraph (Fin n)) (W : Finset (Fin n)), H ≤ G ∧ W.card ≤ 3 * Q.card + 1 ∧ Q.biUnion id ⊆ W ∧ (∀ u v, H.Adj u v → u ∈ W ∧ v ∈ W) ∧ (∀ u ∈ Q.biUnion id, ∀ v ∈ Q.biUnion id, H.Adj u v ↔ G.Adj u v) ∧ (∀ e ∈ P.biUnion finite_vertex_set_edge_encoding, e ∈ H.edgeSet ↔ e ∈ Q.biUnion finite_vertex_set_edge_encoding) ∧ Q.card = simple_graph_triangle_packing_number H ∧ (Q.biUnion finite_vertex_set_edge_encoding ∩ (((simple_graph_triangle_edge_family H).filter (fun t => (t ∩ Q.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)) = F
simple_graph_good_sunflower_packing_supported_coverIn LeanGraph Theory & Graph Algorithms

A graph with a good maximum sunflower triangle packing has a triangle cover within the packed edges of size at most twice the packing size.

theorem simple_graph_good_sunflower_packing_supported_cover (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (r : Fin n) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hroot : ∀ t ∈ P, r ∈ t) (hgood : ∀ p ∈ P, (finite_vertex_set_edge_encoding p ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).card ≤ 1) : ∃ C : Finset (Sym2 (Fin n)), C ⊆ P.biUnion finite_vertex_set_edge_encoding ∧ C.card ≤ 2 * P.card ∧ ∀ t : Finset (Fin n), G.IsNClique 3 t → ¬ Disjoint (finite_vertex_set_edge_encoding t) C
simple_graph_good_sunflower_supported_cover_of_forced_base_independence_packedIn LeanGraph Theory & Graph Algorithms

For a good maximum sunflower packing, suppose the endpoints of its singly forced base edges contain at least as many vertices as there are forced bases, with every edge between those selected vertices itself a forced base. Then the graph has a triangle cover of at most twice the packing size contained in the packed edges.

theorem simple_graph_good_sunflower_supported_cover_of_forced_base_independence_packed (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (r : Fin n) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hroot : ∀ t ∈ P, r ∈ t) (hgood : ∀ p ∈ P, (finite_vertex_set_edge_encoding p ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).card ≤ 1) (F : Finset (Sym2 (Fin n))) (hF : F = ((P.biUnion finite_vertex_set_edge_encoding ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).filter (fun e => r ∉ e.toFinset))) (Z : Finset (Fin n)) (hZsub : Z ⊆ F.biUnion Sym2.toFinset) (hZsize : F.card ≤ Z.card) (hZind : ∀ u ∈ Z, ∀ v ∈ Z, G.Adj u v → s(u,v) ∈ F) : ∃ C : Finset (Sym2 (Fin n)), C ⊆ P.biUnion finite_vertex_set_edge_encoding ∧ C.card ≤ 2 * P.card ∧ ∀ t : Finset (Fin n), G.IsNClique 3 t → ¬ Disjoint (finite_vertex_set_edge_encoding t) C
simple_graph_good_sunflower_three_forced_bases_supported_cover_packedIn LeanGraph Theory & Graph Algorithms

Suppose a maximum triangle packing is a sunflower and each packed triangle has at most one singly supported edge. If at most three singly supported packing edges avoid the common vertex, then the graph has a triangle edge cover of at most twice the packing size contained entirely in the packed edges.

theorem simple_graph_good_sunflower_three_forced_bases_supported_cover_packed (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (r : Fin n) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hroot : ∀ t ∈ P, r ∈ t) (hgood : ∀ p ∈ P, (finite_vertex_set_edge_encoding p ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).card ≤ 1) (hthree : ((P.biUnion finite_vertex_set_edge_encoding ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).filter (fun e => r ∉ e.toFinset)).card ≤ 3) : ∃ C : Finset (Sym2 (Fin n)), C ⊆ P.biUnion finite_vertex_set_edge_encoding ∧ C.card ≤ 2 * P.card ∧ ∀ t : Finset (Fin n), G.IsNClique 3 t → ¬ Disjoint (finite_vertex_set_edge_encoding t) C
simple_graph_has_edge_disjoint_perfect_matchings_isoIn LeanGraph Theory & Graph Algorithms

Having k pairwise edge-disjoint perfect matchings is invariant under graph isomorphism.

theorem simple_graph_has_edge_disjoint_perfect_matchings_iso {V W : Type*} {G : SimpleGraph V} {G' : SimpleGraph W} (e : G ≃g G') (k : ℕ) : simple_graph_has_edge_disjoint_perfect_matchings G k ↔ simple_graph_has_edge_disjoint_perfect_matchings G' k
simple_graph_has_well_covered_powers_boxProd_commIn LeanGraph Theory & Graph Algorithms

The well-covered powers property of Cartesian products of finite graphs is symmetric under swapping factors.

theorem simple_graph_has_well_covered_powers_boxProd_comm
    {V W : Type*} [Fintype V] [Fintype W]
    (G : SimpleGraph V) (H : SimpleGraph W)
    (hprod : simple_graph_has_well_covered_powers (G □ H)) :
    simple_graph_has_well_covered_powers (H □ G)
simple_graph_has_well_covered_powers_of_isoIn LeanGraph Theory & Graph Algorithms

Graph isomorphism preserves the well-covered powers property.

theorem simple_graph_has_well_covered_powers_of_iso {V W : Type*} [Fintype V] [Fintype W]
    {G : SimpleGraph V} {H : SimpleGraph W} (e : G ≃g H) :
    simple_graph_has_well_covered_powers G ↔ simple_graph_has_well_covered_powers H
simple_graph_high_degree_connected_every_max_packing_fully_forced_counterexampleIn LeanGraph Theory & Graph Algorithms

There is a four-connected graph with 52 vertices, 240 edges, packing number 56, a vertex of degree at least eleven and triangle codegrees between two and six, in which every edge is avoided by some maximum packing but every maximum packing contains a fully singleton-forced triangle.

theorem simple_graph_high_degree_connected_every_max_packing_fully_forced_counterexample :
    ∃ (G : SimpleGraph (Fin 52)) (E : Finset (Sym2 (Fin 52))),
      let F := simple_graph_triangle_edge_family G
      (↑E : Set (Sym2 (Fin 52))) = G.edgeSet ∧ E.card = 240 ∧
      (∀ Q : Finset (Finset (Sym2 (Fin 52))), Q ⊆ F →
        (Q : Set (Finset (Sym2 (Fin 52)))).Pairwise Disjoint → Q.card ≤ 56) ∧
      (∀ e ∈ G.edgeSet, ∃ Q : Finset (Finset (Sym2 (Fin 52))),
        Q ⊆ F ∧ Q.card = 56 ∧
        (Q : Set (Finset (Sym2 (Fin 52)))).Pairwise Disjoint ∧ e ∉ Q.biUnion id) ∧
      (∀ e ∈ G.edgeSet, 2 ≤ (F.filter (fun t => e ∈ t)).card ∧
        (F.filter (fun t => e ∈ t)).card ≤ 6) ∧
      (∀ R : Finset (Fin 52), R.card ≤ 3 → (G.induce {v | v ∉ R}).Connected) ∧
      (∃ v : Fin 52, ∃ N : Finset (Fin 52), N.card = 11 ∧ ∀ w ∈ N, G.Adj v w) ∧
      ∀ P : Finset (Finset (Sym2 (Fin 52))),
        P ⊆ F → P.card = 56 →
        (P : Set (Finset (Sym2 (Fin 52)))).Pairwise Disjoint →
        ∃ p ∈ P, p ⊆ ((F.filter (fun t => (t ∩ P.biUnion id).card = 1)).biUnion id)
simple_graph_high_degree_stable_connected_triangle_family_every_packing_fully_forced_counterexampleIn LeanGraph Theory & Graph Algorithms

There is a 4-connected graph on 112 vertices with 432 edges, a vertex of degree at least 18, triangle codegrees from two to fifteen, connected triangle-intersection graph, and packing number 104, in which every edge is avoidable by some maximum packing yet every maximum packing contains a fully singleton-forced triangle.

theorem simple_graph_high_degree_stable_connected_triangle_family_every_packing_fully_forced_counterexample :
    ∃ (G : SimpleGraph (Fin 112)) (E : Finset (Sym2 (Fin 112))),
      let F := simple_graph_triangle_edge_family G
      (↑E : Set (Sym2 (Fin 112))) = G.edgeSet ∧ E.card = 432 ∧
      (∀ Q : Finset (Finset (Sym2 (Fin 112))), Q ⊆ F →
        (Q : Set (Finset (Sym2 (Fin 112)))).Pairwise Disjoint → Q.card ≤ 104) ∧
      (∀ e ∈ G.edgeSet, ∃ Q : Finset (Finset (Sym2 (Fin 112))),
        Q ⊆ F ∧ Q.card = 104 ∧
        (Q : Set (Finset (Sym2 (Fin 112)))).Pairwise Disjoint ∧ e ∉ Q.biUnion id) ∧
      (∀ e ∈ G.edgeSet, 2 ≤ (F.filter (fun t => e ∈ t)).card ∧
        (F.filter (fun t => e ∈ t)).card ≤ 15) ∧
      (∀ R : Finset (Fin 112), R.card ≤ 3 → (G.induce {v | v ∉ R}).Connected) ∧
      (∃ v : Fin 112, ∃ N : Finset (Fin 112), N.card = 18 ∧ ∀ w ∈ N, G.Adj v w) ∧
      (∀ a ∈ F, ∀ b ∈ F, Relation.ReflTransGen
        (fun x y : Finset (Sym2 (Fin 112)) => x ∈ F ∧ y ∈ F ∧ ¬ Disjoint x y) a b) ∧
      ∀ P : Finset (Finset (Sym2 (Fin 112))),
        P ⊆ F → P.card = 104 →
        (P : Set (Finset (Sym2 (Fin 112)))).Pairwise Disjoint →
        ∃ p ∈ P, p ⊆ ((F.filter (fun t => (t ∩ P.biUnion id).card = 1)).biUnion id)
simple_graph_high_degree_stable_connected_triangle_family_every_packing_fully_forced_familyIn LeanGraph Theory & Graph Algorithms

For each odd r at least seven, there is a 4-connected graph on 16r vertices with 48r+96 edges, maximum degree at least 18, triangle codegrees from two to fifteen and connected triangle-intersection graph, with triangle-cover number 16r+48 and packing number 10r+34, such that every edge is avoidable by a maximum packing but every maximum packing has at least 2r−2 fully singleton-forced triangles.

theorem simple_graph_high_degree_stable_connected_triangle_family_every_packing_fully_forced_family
    (r : ℕ) (hr : 7 ≤ r) (hodd : Odd r) :
    ∃ (G : SimpleGraph (Fin (16 * r))) (E : Finset (Sym2 (Fin (16 * r)))),
      let F := simple_graph_triangle_edge_family G
      let k := 10 * r + 34
      (↑E : Set (Sym2 (Fin (16 * r)))) = G.edgeSet ∧ E.card = 48 * r + 96 ∧
      simple_graph_triangle_cover_number G = 16 * r + 48 ∧
      (∀ Q : Finset (Finset (Sym2 (Fin (16 * r)))), Q ⊆ F →
        (Q : Set (Finset (Sym2 (Fin (16 * r))))).Pairwise Disjoint → Q.card ≤ k) ∧
      (∀ e ∈ G.edgeSet, ∃ Q : Finset (Finset (Sym2 (Fin (16 * r)))),
        Q ⊆ F ∧ Q.card = k ∧
        (Q : Set (Finset (Sym2 (Fin (16 * r))))).Pairwise Disjoint ∧ e ∉ Q.biUnion id) ∧
      (∀ e ∈ G.edgeSet, 2 ≤ (F.filter (fun t => e ∈ t)).card ∧
        (F.filter (fun t => e ∈ t)).card ≤ 15) ∧
      (∀ R : Finset (Fin (16 * r)), R.card ≤ 3 → (G.induce {v | v ∉ R}).Connected) ∧
      (∃ v : Fin (16 * r), ∃ N : Finset (Fin (16 * r)), N.card = 18 ∧ ∀ w ∈ N, G.Adj v w) ∧
      (∀ a ∈ F, ∀ b ∈ F, Relation.ReflTransGen
        (fun x y : Finset (Sym2 (Fin (16 * r))) => x ∈ F ∧ y ∈ F ∧ ¬ Disjoint x y) a b) ∧
      ∀ P : Finset (Finset (Sym2 (Fin (16 * r)))),
        P ⊆ F → P.card = k →
        (P : Set (Finset (Sym2 (Fin (16 * r))))).Pairwise Disjoint →
        2 * r - 2 ≤ (P.filter (fun p =>
          p ⊆ ((F.filter (fun t => (t ∩ P.biUnion id).card = 1)).biUnion id))).card
simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexampleIn LeanGraph Theory & Graph Algorithms

There is a stable seven-connected twelve-vertex graph with a vertex of degree eleven, triangle codegree at least four and no one-point triangle-family split, with a maximum packing from which every packing reachable by single-triangle exchanges has a fully singleton-forced triangle, although another maximum packing has none.

theorem simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample :
    ∃ (G : SimpleGraph (Fin 12)) (E : Finset (Sym2 (Fin 12)))
      (P Q : Finset (Finset (Sym2 (Fin 12)))),
      let F := simple_graph_triangle_edge_family G
      let Adj := fun A B : Finset (Finset (Sym2 (Fin 12))) =>
        B ⊆ F ∧ B.card = 16 ∧ (B : Set (Finset (Sym2 (Fin 12)))).Pairwise Disjoint ∧
          (A ∩ B).card = 15
      (↑E : Set (Sym2 (Fin 12))) = G.edgeSet ∧ E.card = 54 ∧
      (∀ R : Finset (Fin 12), R.card ≤ 6 → (G.induce {v | v ∉ R}).Connected) ∧
      (∃ v : Fin 12, ∃ N : Finset (Fin 12), N.card = 11 ∧ ∀ w ∈ N, G.Adj v w) ∧
      (∀ e ∈ G.edgeSet, 4 ≤ (F.filter (fun t => e ∈ t)).card) ∧
      (∀ e ∈ G.edgeSet, ∀ a ∈ F, ∀ b ∈ F,
        Relation.ReflTransGen (fun x y : Finset (Sym2 (Fin 12)) =>
          x ∈ F ∧ y ∈ F ∧ ∃ f ∈ x, f ∈ y ∧ f ≠ e) a b) ∧
      (∀ R : Finset (Finset (Sym2 (Fin 12))), R ⊆ F →
        (R : Set (Finset (Sym2 (Fin 12)))).Pairwise Disjoint → R.card ≤ 16) ∧
      (∀ e ∈ G.edgeSet, ∃ R : Finset (Finset (Sym2 (Fin 12))),
        R ⊆ F ∧ R.card = 16 ∧
        (R : Set (Finset (Sym2 (Fin 12)))).Pairwise Disjoint ∧ e ∉ R.biUnion id) ∧
      P ⊆ F ∧ P.card = 16 ∧ (P : Set (Finset (Sym2 (Fin 12)))).Pairwise Disjoint ∧
      (∀ R, Relation.ReflTransGen Adj P R →
        ∃ r ∈ R, r ⊆ ((F.filter (fun t => (t ∩ R.biUnion id).card = 1)).biUnion id)) ∧
      Q ⊆ F ∧ Q.card = 16 ∧ (Q : Set (Finset (Sym2 (Fin 12)))).Pairwise Disjoint ∧
      ∀ q ∈ Q, ¬ q ⊆ ((F.filter (fun t => (t ∩ Q.biUnion id).card = 1)).biUnion id)
simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_adj_iff_testBitIn LeanGraph Theory & Graph Algorithms

For all vertices a, b, the witness graph has edge ab exactly when bit b is set in the neighbour bitmask of a.

theorem simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_adj_iff_testBit :
    ∀ a b : Fin 12, simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_graph.Adj a b ↔
      (simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_nbr a).testBit b.val
simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_codegreeIn LeanGraph Theory & Graph Algorithms

Each edge of the witness graph is contained in at least four triangles.

theorem simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_codegree :
    ∀ e ∈ simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_graph.edgeSet,
      4 ≤ ((simple_graph_triangle_edge_family
        simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_graph).filter
          (fun t => e ∈ t)).card
simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_edge_avoidableIn LeanGraph Theory & Graph Algorithms

For every edge of the witness graph there is a sixteen-triangle packing none of whose triangles uses that edge.

theorem simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_edge_avoidable :
    ∀ e ∈ simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_graph.edgeSet,
      ∃ R : Finset (Finset (Sym2 (Fin 12))),
        R ⊆ simple_graph_triangle_edge_family simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_graph ∧
        R.card = 16 ∧
        (R : Set (Finset (Sym2 (Fin 12)))).Pairwise Disjoint ∧ e ∉ R.biUnion id
simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_edge_setIn LeanGraph Theory & Graph Algorithms

The listed edge set is the edge set of the witness graph, it has 54 elements, and vertex 10 is adjacent to the other eleven vertices.

theorem simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_edge_set :
    (↑simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_edges : Set (Sym2 (Fin 12))) =
        simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_graph.edgeSet ∧
      simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_edges.card = 54 ∧
      (∃ v : Fin 12, ∃ N : Finset (Fin 12), N.card = 11 ∧
        ∀ w ∈ N, simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_graph.Adj v w)
simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_family_connected_per_edgeIn LeanGraph Theory & Graph Algorithms

For every edge e, any two triangles of the witness graph are joined by a chain of triangles in which consecutive triangles share an edge other than e.

theorem simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_family_connected_per_edge :
    let F := simple_graph_triangle_edge_family simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_graph
    ∀ e ∈ simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_graph.edgeSet,
      ∀ a ∈ F, ∀ b ∈ F,
        Relation.ReflTransGen (fun x y : Finset (Sym2 (Fin 12)) =>
          x ∈ F ∧ y ∈ F ∧ ∃ f ∈ x, f ∈ y ∧ f ≠ e) a b
simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_mem_triIn LeanGraph Theory & Graph Algorithms

Each member t of the triangle edge family of the witness graph is of the form tri a b c where a, b, c are pairwise adjacent vertices.

theorem simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_mem_tri :
    ∀ t ∈ simple_graph_triangle_edge_family simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_graph,
      ∃ a b c : Fin 12,
        t = simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_tri a b c ∧
        simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_graph.Adj a b ∧
        simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_graph.Adj b c ∧
        simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_graph.Adj a c
simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_packing_P_forcingIn LeanGraph Theory & Graph Algorithms

P is a sixteen-triangle packing of the witness graph and, in every maximum packing reachable from P by repeatedly swapping one triangle, some triangle has all three edges lying in no other triangle of the packing.

theorem simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_packing_P_forcing :
    let F := simple_graph_triangle_edge_family simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_graph
    let P := simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_packing_P
    P ⊆ F ∧ P.card = 16 ∧ (P : Set (Finset (Sym2 (Fin 12)))).Pairwise Disjoint ∧
      (∀ R, Relation.ReflTransGen
        (fun A B : Finset (Finset (Sym2 (Fin 12))) =>
          B ⊆ F ∧ B.card = 16 ∧ (B : Set (Finset (Sym2 (Fin 12)))).Pairwise Disjoint ∧ (A ∩ B).card = 15)
        P R →
        ∃ r ∈ R, r ⊆ ((F.filter (fun t => (t ∩ R.biUnion id).card = 1)).biUnion id))
simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_packing_Q_forcingIn LeanGraph Theory & Graph Algorithms

Q is a sixteen-triangle packing of the witness graph, and no triangle of Q has all three of its edges forced (each edge in exactly one triangle of Q).

theorem simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_packing_Q_forcing :
    let F := simple_graph_triangle_edge_family simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_graph
    let Q := simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_packing_Q
    Q ⊆ F ∧ Q.card = 16 ∧ (Q : Set (Finset (Sym2 (Fin 12)))).Pairwise Disjoint ∧
      ∀ q ∈ Q, ¬ q ⊆ ((F.filter (fun t => (t ∩ Q.biUnion id).card = 1)).biUnion id)
simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_packing_upperIn LeanGraph Theory & Graph Algorithms

Any family of pairwise edge-disjoint triangles of the witness graph has at most 16 members.

theorem simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_packing_upper :
    ∀ R : Finset (Finset (Sym2 (Fin 12))),
      R ⊆ simple_graph_triangle_edge_family simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_graph →
      (R : Set (Finset (Sym2 (Fin 12)))).Pairwise Disjoint → R.card ≤ 16
simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_seven_connectedIn LeanGraph Theory & Graph Algorithms

For every set R of at most six vertices, the subgraph induced by the complement of R is connected.

theorem simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_seven_connected :
    ∀ R : Finset (Fin 12), R.card ≤ 6 →
      (simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_graph.induce
        {v | v ∉ R}).Connected
simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_tri_memIn LeanGraph Theory & Graph Algorithms

If a, b, c are pairwise adjacent in the witness graph, then the three-edge set of abc belongs to the triangle edge family.

theorem simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_tri_mem : ∀ a b c : Fin 12,
    simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_graph.Adj a b →
    simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_graph.Adj a c →
    simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_graph.Adj b c →
    simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_tri a b c ∈
      simple_graph_triangle_edge_family simple_graph_high_degree_stable_point_irreducible_forced_exchange_barrier_counterexample_graph
simple_graph_hop_commute_of_two_regular_oddIn LeanGraph Theory & Graph Algorithms

If G is 2-regular with all connected components of odd size, then any two hops of G commute.

theorem simple_graph_hop_commute_of_two_regular_odd {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hd : ∀ v, G.degree v = 2) (hc : ∀ v, Odd (G.connectedComponentMk v).supp.ncard)
    (g h : Equiv.Perm V) (hg : simple_graph_is_hop G g) (hh : simple_graph_is_hop G h) :
    g * h = h * g
simple_graph_hop_orderOf_odd_of_leap_group_card_oddIn LeanGraph Theory & Graph Algorithms

If the leap group of G has odd order, then every hop of G has odd order.

theorem simple_graph_hop_orderOf_odd_of_leap_group_card_odd {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (h : Equiv.Perm V) (hh : simple_graph_is_hop G h)
    (hc : Odd (Nat.card (simple_graph_leap_group G))) : Odd (orderOf h)
simple_graph_hop_orderOf_odd_of_two_regular_oddIn LeanGraph Theory & Graph Algorithms

If G is 2-regular with all connected components of odd size, then every hop of G has odd order.

theorem simple_graph_hop_orderOf_odd_of_two_regular_odd {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hd : ∀ v, G.degree v = 2) (hc : ∀ v, Odd (G.connectedComponentMk v).supp.ncard)
    (h : Equiv.Perm V) (hh : simple_graph_is_hop G h) : Odd (orderOf h)
simple_graph_hypercube_adj_weight_parityIn LeanGraph Theory & Graph Algorithms

Adjacent vertices of the hypercube Q_n have Hamming weights of opposite parity.

theorem simple_graph_hypercube_adj_weight_parity (n : ℕ) {x y : Fin n → Bool}
    (h : (simple_graph_hypercube n).Adj x y) :
    hammingDist x (fun _ => false) % 2 ≠ hammingDist y (fun _ => false) % 2
simple_graph_hypercube_coordinate_flip_memIn LeanGraph Theory & Graph Algorithms

Inverting a single coordinate of Q_n is a hop: every vertex moves to its unique neighbour differing in that coordinate. Hence the coordinate flip lies in the leap group.

theorem simple_graph_hypercube_coordinate_flip_mem (n : ℕ) (i : Fin n) :
    simple_graph_hypercube_coordinate_flip n i ∈
      simple_graph_leap_group (simple_graph_hypercube n)
simple_graph_hypercube_leap_group_card_geIn LeanGraph Theory & Graph Algorithms

The leap group of Q_n has at least 2·((2^(n-1))!)² elements.

theorem simple_graph_hypercube_leap_group_card_ge (n : ℕ) (h1 : 1 ≤ n) :
    2 * ((2 ^ (n - 1)).factorial) ^ 2 ≤ Nat.card (simple_graph_leap_group (simple_graph_hypercube n))
simple_graph_hypercube_leap_group_card_leIn LeanGraph Theory & Graph Algorithms

The leap group of Q_n has at most 2·((2^(n-1))!)² elements.

theorem simple_graph_hypercube_leap_group_card_le (n : ℕ) (h1 : 1 ≤ n) :
    Nat.card (simple_graph_leap_group (simple_graph_hypercube n)) ≤ 2 * ((2 ^ (n - 1)).factorial) ^ 2
simple_graph_hypercube_leap_group_contains_swapsIn LeanGraph Theory & Graph Algorithms

Any transposition of two vertices of the hypercube Q_n whose Hamming weights have the same parity belongs to the leap group of Q_n.

theorem simple_graph_hypercube_leap_group_contains_swaps (n : ℕ) (h1 : 1 ≤ n)
    (x y : Fin n → Bool) (hxy : x ≠ y)
    (hpar : hammingDist x (fun _ => false) % 2 = hammingDist y (fun _ => false) % 2) :
    Equiv.swap x y ∈ simple_graph_leap_group (simple_graph_hypercube n)
simple_graph_hypercube_weight_class_cardIn LeanGraph Theory & Graph Algorithms

For n ≥ 1, the vertices of Q_n whose Hamming weight is congruent to b mod 2 number 2^(n-1): exactly one of each complementary pair x, x-with-coordinate-0-flipped has weight of each parity.

theorem simple_graph_hypercube_weight_class_card (n : ℕ) (hn : 1 ≤ n) (b : ℕ) :
    (Finset.univ.filter
      (fun x : Fin n → Bool => hammingDist x (fun _ => false) % 2 = b % 2)).card = 2 ^ (n - 1)
simple_graph_indepNum_induce_leIn LeanGraph Theory & Graph Algorithms

The independence number of an induced subgraph is at most the independence number of the whole graph.

theorem simple_graph_indepNum_induce_le {V : Type*} [Fintype V] (G : SimpleGraph V) (s : Set V) : (G.induce s).indepNum ≤ G.indepNum
simple_graph_indepNum_le_vertex_connectivity_induce_compl_universalIn LeanGraph Theory & Graph Algorithms

If u is a universal vertex of G and alpha(G) + 1 <= kappa(G), then the graph obtained by deleting u has independence number at most its vertex connectivity, and is preconnected.

theorem simple_graph_indepNum_le_vertex_connectivity_induce_compl_universal {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (u : V) (hu : ∀ w : V, w ≠ u → G.Adj u w) (hκ : 2 ≤ ghz_graph_vertex_connectivity G) (hα : (G.indepNum : ℕ∞) + 1 ≤ (ghz_graph_vertex_connectivity G : ℕ∞)) : (G.induce {v : V | v ≠ u}).indepNum ≤ ghz_graph_vertex_connectivity (G.induce {v : V | v ≠ u}) ∧ (G.induce {v : V | v ≠ u}).Preconnected
simple_graph_indep_free_four_non_neighbor_induce_indep_free_threeIn LeanGraph Theory & Graph Algorithms

In a simple graph with no independent set of size four, the induced subgraph on the non-neighborhood of any vertex has no independent set of size three.

theorem simple_graph_indep_free_four_non_neighbor_induce_indep_free_three
    (V : Type) [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hindep : G.IndepSetFree 4) (v : V) :
    (G.induce {u | u ≠ v ∧ ¬ G.Adj v u}).IndepSetFree 3
simple_graph_indep_set_iff_induce_eq_botIn LeanGraph Theory & Graph Algorithms

A finset L of vertices is independent iff the subgraph induced on L is the empty graph.

open SimpleGraph in
theorem simple_graph_indep_set_iff_induce_eq_bot {V : Type*} [DecidableEq V]
    (G : SimpleGraph V) (L : Finset V) :
    G.IsIndepSet (L : Set V) ↔ G.induce (L : Set V) = ⊥
simple_graph_irreducible_stable_high_degree_every_max_packing_forced_counterexampleIn LeanGraph Theory & Graph Algorithms

There is a four-connected graph on 120 vertices with 456 edges and a vertex of degree at least 18, triangle codegrees between two and fifteen, and triangle packing number 109, such that every graph edge is avoidable by a maximum packing, the triangle family remains connected through shared edges after ignoring any one graph edge, and every maximum packing contains a triangle all of whose edges are singleton-forced.

theorem simple_graph_irreducible_stable_high_degree_every_max_packing_forced_counterexample :
    ∃ (G : SimpleGraph (Fin 120)) (E : Finset (Sym2 (Fin 120))),
      let F := simple_graph_triangle_edge_family G
      (↑E : Set (Sym2 (Fin 120))) = G.edgeSet ∧ E.card = 456 ∧
      (∀ Q : Finset (Finset (Sym2 (Fin 120))), Q ⊆ F →
        (Q : Set (Finset (Sym2 (Fin 120)))).Pairwise Disjoint → Q.card ≤ 109) ∧
      (∀ e ∈ G.edgeSet, ∃ Q : Finset (Finset (Sym2 (Fin 120))),
        Q ⊆ F ∧ Q.card = 109 ∧
        (Q : Set (Finset (Sym2 (Fin 120)))).Pairwise Disjoint ∧ e ∉ Q.biUnion id) ∧
      (∀ e ∈ G.edgeSet, 2 ≤ (F.filter (fun t => e ∈ t)).card ∧
        (F.filter (fun t => e ∈ t)).card ≤ 15) ∧
      (∀ R : Finset (Fin 120), R.card ≤ 3 → (G.induce {v | v ∉ R}).Connected) ∧
      (∃ v : Fin 120, ∃ N : Finset (Fin 120), N.card = 18 ∧ ∀ w ∈ N, G.Adj v w) ∧
      (∀ e ∈ G.edgeSet, ∀ a ∈ F, ∀ b ∈ F, Relation.ReflTransGen
        (fun x y : Finset (Sym2 (Fin 120)) => x ∈ F ∧ y ∈ F ∧
          ¬ Disjoint (x.erase e) (y.erase e)) a b) ∧
      ∀ P : Finset (Finset (Sym2 (Fin 120))),
        P ⊆ F → P.card = 109 →
        (P : Set (Finset (Sym2 (Fin 120)))).Pairwise Disjoint →
        ∃ p ∈ P, p ⊆ ((F.filter (fun t => (t ∩ P.biUnion id).card = 1)).biUnion id)
simple_graph_isAcyclic_card_edgeFinset_add_card_connectedComponentIn LeanGraph Theory & Graph Algorithms

In any finite acyclic simple graph (forest), the number of edges plus the number of connected components equals the number of vertices.

open scoped Classical in
theorem simple_graph_isAcyclic_card_edgeFinset_add_card_connectedComponent
    {V : Type*} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj] (hG : G.IsAcyclic) :
    G.edgeFinset.card + Fintype.card G.ConnectedComponent = Fintype.card V
simple_graph_isHamiltonian_of_chain_listIn LeanGraph Theory & Graph Algorithms

If a repetition-free list of vertices has length equal to the number of vertices and its consecutive vertices are adjacent cyclically (i.e. also the last and the first, encoded as (l ++ l.take 1).IsChain G.Adj), then the graph is Hamiltonian.

theorem simple_graph_isHamiltonian_of_chain_list {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (l : List V) (hne : l ≠ [])
    (hnodup : l.Nodup) (hlen : l.length = Fintype.card V) (hcard : 3 ≤ Fintype.card V)
    (hchain : (l ++ l.take 1).IsChain G.Adj) : G.IsHamiltonian
simple_graph_isHamiltonian_of_cycle_fnIn LeanGraph Theory & Graph Algorithms

If G is a simple graph on a finite vertex type V with at least 3 vertices, and f : Fin n -> V is an injection of length |V| such that consecutive elements (cyclically) are adjacent in G, then G is Hamiltonian.

theorem simple_graph_isHamiltonian_of_cycle_fn {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (n : ℕ) [NeZero n] (hn : n = Fintype.card V) (hn3 : 3 ≤ n)
    (f : Fin n → V) (hinj : Function.Injective f)
    (hadj : ∀ i : Fin n, G.Adj (f i) (f (i + 1))) :
    G.IsHamiltonian
simple_graph_is_cone_of_subsingletonIn LeanGraph Theory & Graph Algorithms

Every simple graph on a nonempty subsingleton vertex type is a cone.

theorem simple_graph_is_cone_of_subsingleton (V : Type*) [Subsingleton V] [Nonempty V] (G : SimpleGraph V) :
    simple_graph_is_cone G
simple_graph_is_cone_open_neighborhood_iff_dominatedIn LeanGraph Theory & Graph Algorithms

In a simple graph $H$, for any vertex $u$, the open neighbourhood subgraph $H[N_H(u)]$ is a cone if and only if $u$ is dominated by another vertex in $H$.

theorem simple_graph_is_cone_open_neighborhood_iff_dominated {V : Type*} (H : SimpleGraph V) (u : V) :
    simple_graph_is_cone (H.induce (H.neighborSet u)) ↔ simple_graph_vertex_dominated H u
simple_graph_is_cone_open_neighborhood_of_dominatedIn LeanGraph Theory & Graph Algorithms

If a vertex $v$ of a simple graph $H$ is dominated by another vertex, then the open neighbourhood graph $H[N_H(v)]$ is a cone.

theorem simple_graph_is_cone_open_neighborhood_of_dominated {V : Type*} (H : SimpleGraph V) (v : V)
    (hdom : simple_graph_vertex_dominated H v) :
    simple_graph_is_cone (H.induce (H.neighborSet v))
simple_graph_is_minimal_k_star_forming_iff_eraseIn LeanGraph Theory & Graph Algorithms

A k-star-forming set S is minimal if and only if S is k-star-forming and, for every u in S, S with u deleted is not k-star-forming.

theorem simple_graph_is_minimal_k_star_forming_iff_erase {V : Type*} [DecidableEq V]
    (G : SimpleGraph V) (k : ℕ) (S : Finset V) :
    simple_graph_is_minimal_k_star_forming G k S ↔
      simple_graph_is_k_star_forming G k S ∧
        ∀ u ∈ S, ¬ simple_graph_is_k_star_forming G k (S.erase u)
simple_graph_is_tree_all_stackable_of_almost_stackedIn LeanGraph Theory & Graph Algorithms

If every almost stacked configuration of size t on a finite tree T is stackable, then every configuration of size t on T is stackable.

theorem simple_graph_is_tree_all_stackable_of_almost_stacked {V : Type*} [Fintype V]
    [DecidableEq V] (T : SimpleGraph V) (hT : T.IsTree) (t : ℕ)
    (h_almost : ∀ c : V → ℕ, (∃ r : V, ∀ v : V, v ≠ r → c v ≤ 1) → ∑ v, c v = t → graph_config_stackable T c) :
    ∀ c : V → ℕ, ∑ v, c v = t → graph_config_stackable T c
simple_graph_is_tree_all_stackable_of_tree_estimateIn LeanGraph Theory & Graph Algorithms

Every configuration of size estim(T) on a finite tree T is stackable.

theorem simple_graph_is_tree_all_stackable_of_tree_estimate {V : Type*} [Fintype V]
    [DecidableEq V] (T : SimpleGraph V) [DecidableRel T.Adj] (hT : T.IsTree) :
    ∀ c : V → ℕ, ∑ v, c v = simple_graph_tree_estimate T → graph_config_stackable T c
simple_graph_is_tree_almost_stacked_stackable_of_tree_estimateIn LeanGraph Theory & Graph Algorithms

Every almost stacked configuration of size estim(T) on a finite tree T is stackable.

theorem simple_graph_is_tree_almost_stacked_stackable_of_tree_estimate {V : Type*} [Fintype V]
    [DecidableEq V] (T : SimpleGraph V) [DecidableRel T.Adj] (hT : T.IsTree) :
    ∀ c : V → ℕ, (∃ r : V, ∀ v : V, v ≠ r → c v ≤ 1) →
      ∑ v, c v = simple_graph_tree_estimate T → graph_config_stackable T c
simple_graph_is_tree_bad_config_of_card_lt_of_lt_tree_estimateIn LeanGraph Theory & Graph Algorithms

For every finite tree T and every size t with 2 ≤ t, Fintype.card V < t and t < estim(T), there is a configuration of exactly t pebbles that cannot be gathered onto any single vertex. This is the hard remainder (t > |V|) of the lower bound stack(T) ≥ estim(T).

theorem simple_graph_is_tree_bad_config_of_card_lt_of_lt_tree_estimate {V : Type*} [Fintype V]
    [DecidableEq V] (T : SimpleGraph V) [DecidableRel T.Adj] (hT : T.IsTree) :
    ∀ t : ℕ, 2 ≤ t → Fintype.card V < t → t < simple_graph_tree_estimate T →
      ∃ c : V → ℕ, (∑ v, c v) = t ∧ ¬ graph_config_stackable T c
simple_graph_is_tree_stacking_number_le_tree_estimateIn LeanGraph Theory & Graph Algorithms

For every finite tree T, stack(T) ≤ estim(T).

theorem simple_graph_is_tree_stacking_number_le_tree_estimate {V : Type*} [Fintype V]
    [DecidableEq V] (T : SimpleGraph V) [DecidableRel T.Adj] (hT : T.IsTree) :
    graph_stacking_number T ≤ simple_graph_tree_estimate T
simple_graph_is_well_covered_of_card_le_and_extensionIn LeanGraph Theory & Graph Algorithms

If every independent set of a finite graph H has at most k vertices, and every independent set with fewer than k vertices can be enlarged by one vertex, then H is well-covered (every maximal independent set has exactly k vertices).

theorem simple_graph_is_well_covered_of_card_le_and_extension {V : Type*} [Fintype V] [DecidableEq V]
    (H : SimpleGraph V) (k : ℕ)
    (hle : ∀ s : Finset V, H.IsIndepSet ↑s → s.card ≤ k)
    (hext : ∀ s : Finset V, H.IsIndepSet ↑s → s.card < k →
      ∃ v : V, v ∉ s ∧ H.IsIndepSet ↑(insert v s)) :
    simple_graph_is_well_covered H
simple_graph_is_well_covered_topIn LeanGraph Theory & Graph Algorithms

The complete graph on a nonempty finite vertex set is well-covered: every maximal independent set has size 1.

theorem simple_graph_is_well_covered_top {V : Type*} [Fintype V] [Nonempty V] : simple_graph_is_well_covered (⊤ : SimpleGraph V)
simple_graph_k16_forbidden_edge_packing_templatesIn LeanGraph Theory & Graph Algorithms

There are thirty-seven edge-disjoint triangles in each of three complete sixteen-vertex graph edge-deletion cases: seven disjoint forbidden edges, six such edges plus a matched-to-unmatched edge, and six plus an edge between unmatched vertices.

open scoped Sym2

theorem simple_graph_k16_forbidden_edge_packing_templates :
    (∃ P : Finset (Finset (Sym2 (Fin 16))),
      P ⊆ simple_graph_triangle_edge_family (⊤ : SimpleGraph (Fin 16)) ∧ P.card = 37 ∧
      (P : Set (Finset (Sym2 (Fin 16)))).Pairwise Disjoint ∧
      Disjoint (P.biUnion id) {s(0, 1), s(2, 3), s(4, 5), s(6, 7), s(8, 9), s(10, 11), s(12, 13)}) ∧
    (∃ P : Finset (Finset (Sym2 (Fin 16))),
      P ⊆ simple_graph_triangle_edge_family (⊤ : SimpleGraph (Fin 16)) ∧ P.card = 37 ∧
      (P : Set (Finset (Sym2 (Fin 16)))).Pairwise Disjoint ∧
      Disjoint (P.biUnion id) {s(0, 1), s(2, 3), s(4, 5), s(6, 7), s(8, 9), s(10, 11), s(0, 12)}) ∧
    (∃ P : Finset (Finset (Sym2 (Fin 16))),
      P ⊆ simple_graph_triangle_edge_family (⊤ : SimpleGraph (Fin 16)) ∧ P.card = 37 ∧
      (P : Set (Finset (Sym2 (Fin 16)))).Pairwise Disjoint ∧
      Disjoint (P.biUnion id) {s(0, 1), s(2, 3), s(4, 5), s(6, 7), s(8, 9), s(10, 11), s(12, 13)})
simple_graph_k16_forbidden_matching_packing_upperIn LeanGraph Theory & Graph Algorithms

A packing of triangles in the complete sixteen-vertex graph that avoids a prescribed perfect matching has at most thirty-six triangles.

open scoped Sym2

theorem simple_graph_k16_forbidden_matching_packing_upper
    (P : Finset (Finset (Sym2 (Fin 16))))
    (hP : P ⊆ simple_graph_triangle_edge_family (⊤ : SimpleGraph (Fin 16)))
    (hdisj : (P : Set (Finset (Sym2 (Fin 16)))).Pairwise Disjoint)
    (havoid : Disjoint (P.biUnion id) {s(0, 1), s(2, 3), s(4, 5), s(6, 7), s(8, 9), s(10, 11), s(12, 13), s(14, 15)}) : P.card ≤ 36
simple_graph_k4_disjoint_eraseIn LeanGraph Theory & Graph Algorithms

For an edge-disjoint triangle packing P containing a 3-element triangle p and a vertex x whose spokes to p are unused in P, the edges spanned by insert x p are disjoint from the edges spanned by P \ {p}.

theorem simple_graph_k4_disjoint_erase {V : Type*} [Fintype V] [DecidableEq V] (P : Finset (Finset V)) (p : Finset V) (hp : p ∈ P) (hp_card : p.card = 3) (x : V) (hdisj : (P : Set (Finset V)).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hfree : ∀ v ∈ p, s(x, v) ∉ P.biUnion finite_vertex_set_edge_encoding) : Disjoint (finite_vertex_set_edge_encoding (insert x p)) ((P.erase p).biUnion finite_vertex_set_edge_encoding)
simple_graph_lapMatrix_trace_eq_two_mul_edge_cardIn LeanGraph Theory & Graph Algorithms

The trace of the Laplacian matrix of a finite simple graph equals twice its number of edges.

theorem simple_graph_lapMatrix_trace_eq_two_mul_edge_card {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] :
    (G.lapMatrix ℝ).trace = 2 * (G.edgeFinset.card : ℝ)
simple_graph_laplacian_matrix_eq_lapMatrixIn LeanGraph Theory & Graph Algorithms

The Laplacian matrix used in this knowledge base is Mathlib's SimpleGraph.lapMatrix ℝ: both are the degree diagonal matrix minus the adjacency matrix.

theorem simple_graph_laplacian_matrix_eq_lapMatrix {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] :
    simple_graph_laplacian_matrix G = G.lapMatrix ℝ
simple_graph_laplacian_second_eigenvalue_le_edge_cardIn LeanGraph Theory & Graph Algorithms

For every finite simple graph G with m edges, the second largest Laplacian eigenvalue mu_2 satisfies mu_2 <= m.

theorem simple_graph_laplacian_second_eigenvalue_le_edge_card {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] :
    simple_graph_laplacian_second_eigenvalue G ≤ (G.edgeFinset.card : ℝ)
simple_graph_le_csym_max_nullity_of_is_csymIn LeanGraph Theory & Graph Algorithms

For any combinatorially symmetric matrix A associated with G, the dimension of the kernel of A is at most the combinatorially symmetric maximum nullity N(G).

theorem simple_graph_le_csym_max_nullity_of_is_csym
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    (A : Matrix V V ℝ) (hA : is_csym_matrix G A) :
    Module.finrank ℝ A.mulVecLin.ker ≤ simple_graph_csym_max_nullity G
simple_graph_le_fort_transversal_number_of_compatibleIn LeanGraph Theory & Graph Algorithms

For any finite simple graph G and any compatible collection C of forts of G, the transversal number tau(C) is at most the fort transversal number T(G).

theorem simple_graph_le_fort_transversal_number_of_compatible
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    (C : Finset (Finset V))
    (hfort : ∀ F ∈ C, simple_graph_is_fort G (F : Set V))
    (hcompat : is_compatible_collection C) :
    finset_transversal_number C ≤ simple_graph_fort_transversal_number G
simple_graph_leap_group_card_ge_of_swaps_and_flip_nonemptyIn LeanGraph Theory & Graph Algorithms

Let (A,B) partition the vertex set of a finite graph G with A nonempty. If every transposition inside A and every transposition inside B is a leap, and some leap τ interchanges A with B, then the leap group of G has at least 2·|A|!·|B|! elements.

theorem simple_graph_leap_group_card_ge_of_swaps_and_flip_nonempty {V : Type*} [Fintype V] [DecidableEq V]
    {G : SimpleGraph V} {A B : Finset V}
    (hdisj : Disjoint A B) (huniv : A ∪ B = Finset.univ) (hAne : A.Nonempty)
    (hA : ∀ u ∈ A, ∀ v ∈ A, u ≠ v → Equiv.swap u v ∈ simple_graph_leap_group G)
    (hB : ∀ u ∈ B, ∀ v ∈ B, u ≠ v → Equiv.swap u v ∈ simple_graph_leap_group G)
    (hflip : ∃ τ ∈ simple_graph_leap_group G, ∀ v : V, (v ∈ A ↔ τ v ∈ B)) :
    2 * A.card.factorial * B.card.factorial ≤ Nat.card (simple_graph_leap_group G)
simple_graph_leap_group_card_le_of_bipartitionIn LeanGraph Theory & Graph Algorithms

If every edge of a finite simple graph G joins the complementary finsets s and t, then the leap group of G has at most 2·|s|!·|t|! elements.

theorem simple_graph_leap_group_card_le_of_bipartition {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (s t : Finset V) (hdisj : Disjoint s t) (huniv : s ∪ t = Finset.univ)
    (hadj : ∀ u v : V, G.Adj u v → (u ∈ s ∧ v ∈ t) ∨ (u ∈ t ∧ v ∈ s)) :
    Nat.card (simple_graph_leap_group G) ≤ 2 * s.card.factorial * t.card.factorial
simple_graph_leap_group_card_odd_iffIn LeanGraph Theory & Graph Algorithms

Let G be a finite simple graph that admits a hop. Then the leap group Λ₁(G) has odd order if and only if G is a disjoint union of cycles of odd length, i.e. G is 2-regular and every connected component has an odd number of vertices.

theorem simple_graph_leap_group_card_odd_iff {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hG : ∃ h, simple_graph_is_hop G h) :
    Odd (Nat.card (simple_graph_leap_group G)) ↔
      (∀ v, G.degree v = 2) ∧ ∀ v, Odd (G.connectedComponentMk v).supp.ncard
simple_graph_leap_group_card_odd_of_commuting_odd_hopsIn LeanGraph Theory & Graph Algorithms

If every hop of G has odd order and any two hops commute, then the leap group of G has odd order.

theorem simple_graph_leap_group_card_odd_of_commuting_odd_hops {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hodd : ∀ h, simple_graph_is_hop G h → Odd (orderOf h))
    (hcomm : ∀ g h, simple_graph_is_hop G g → simple_graph_is_hop G h → g * h = h * g) :
    Odd (Nat.card (simple_graph_leap_group G))
simple_graph_leap_group_card_odd_of_two_regular_oddIn LeanGraph Theory & Graph Algorithms

If G is 2-regular with all connected components of odd size, then the leap group of G has odd order.

theorem simple_graph_leap_group_card_odd_of_two_regular_odd {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hd : ∀ v, G.degree v = 2) (hc : ∀ v, Odd (G.connectedComponentMk v).supp.ncard) :
    Odd (Nat.card (simple_graph_leap_group G))
simple_graph_leap_group_closure_swaps_of_partitionIn LeanGraph Theory & Graph Algorithms

Let (A, B) be a partition of a finite set V. The subgroup generated by the transpositions inside A together with the transpositions inside B is the full symmetric group on A times the full symmetric group on B, i.e. it consists of every permutation of V that maps A onto A.

theorem simple_graph_leap_group_closure_swaps_of_partition {V : Type*} [Fintype V] [DecidableEq V]
    {A B : Finset V} (huniv : A ∪ B = Finset.univ) {σ : Equiv.Perm V}
    (hσ : ∀ v : V, (v ∈ A ↔ σ v ∈ A)) :
    σ ∈ Subgroup.closure ({τ : Equiv.Perm V | ∃ u ∈ A, ∃ v ∈ A, u ≠ v ∧ τ = Equiv.swap u v} ∪
      {τ : Equiv.Perm V | ∃ u ∈ B, ∃ v ∈ B, u ≠ v ∧ τ = Equiv.swap u v})
simple_graph_lex_cover_two_outside_private_triangles_disjointIn LeanGraph Theory & Graph Algorithms

Let H be a triangle edge cover, and let C be a minimum triangle edge cover minimizing its number of edges outside H. Any two distinct edges of C outside H have private triangles that are edge-disjoint from each other.

theorem simple_graph_lex_cover_two_outside_private_triangles_disjoint
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    (H C : Finset (Sym2 V))
    (hHedges : ∀ e ∈ H, e ∈ G.edgeSet) (hCedges : ∀ e ∈ C, e ∈ G.edgeSet)
    (hH : ∀ t : Finset V, G.IsNClique 3 t → ∃ e ∈ H, ∀ x ∈ e, x ∈ t)
    (hC : ∀ t : Finset V, G.IsNClique 3 t → ∃ e ∈ C, ∀ x ∈ e, x ∈ t)
    (hlex : ∀ D : Finset (Sym2 V),
      (∀ e ∈ D, e ∈ G.edgeSet) →
      (∀ t : Finset V, G.IsNClique 3 t → ∃ e ∈ D, ∀ x ∈ e, x ∈ t) →
      C.card ≤ D.card ∧ (D.card = C.card → (C \ H).card ≤ (D \ H).card)) :
    ∀ e ∈ C \ H, ∀ f ∈ C \ H, e ≠ f →
      ∃ t s : Finset V, G.IsNClique 3 t ∧ G.IsNClique 3 s ∧
        (∀ x ∈ e, x ∈ t) ∧ (∀ x ∈ f, x ∈ s) ∧
        (∀ g ∈ C, (∀ x ∈ g, x ∈ t) → g = e) ∧
        (∀ g ∈ C, (∀ x ∈ g, x ∈ s) → g = f) ∧
        (t ∩ s).card ≤ 1
simple_graph_line_graph_degree_four_matching_link_decreasing_pairIn LeanGraph Theory & Graph Algorithms

Let H be a finite simple graph and v a degree-four vertex whose neighborhood induces a matching. In the line graph of H, there are two disjoint edges within the four-clique of root edges incident to v whose deletion strictly decreases the maximum triangle packing number.

theorem simple_graph_line_graph_degree_four_matching_link_decreasing_pair (n : ℕ) (H : SimpleGraph (Fin n)) [DecidableRel H.Adj] (v : Fin n) (hdeg : H.degree v = 4) (hlink : ∀ a b c : Fin n, H.Adj v a → H.Adj v b → H.Adj v c → H.Adj a b → H.Adj a c → b = c) : ∃ e f : Sym2 H.edgeSet, e ∈ H.lineGraph.edgeSet ∧ f ∈ H.lineGraph.edgeSet ∧ (∀ x ∈ e, v ∈ x.val) ∧ (∀ x ∈ f, v ∈ x.val) ∧ (∀ x ∈ e, x ∉ f) ∧ simple_graph_triangle_packing_number (H.lineGraph.deleteEdges {e, f}) < simple_graph_triangle_packing_number H.lineGraph
simple_graph_line_graph_degree_four_weak_link_decreasing_pairIn LeanGraph Theory & Graph Algorithms

Let H be a finite simple graph and v a degree-four vertex with a neighbor having at most one neighbor inside the neighborhood of v. In the line graph of H, there are two disjoint edges within the four-clique of root edges incident to v whose deletion strictly decreases the maximum triangle packing number.

theorem simple_graph_line_graph_degree_four_weak_link_decreasing_pair (n : ℕ) (H : SimpleGraph (Fin n)) [DecidableRel H.Adj] (v : Fin n) (hdeg : H.degree v = 4) (hweak : ∃ a : Fin n, H.Adj v a ∧ ∀ b c : Fin n, H.Adj v b → H.Adj v c → H.Adj a b → H.Adj a c → b = c) : ∃ e f : Sym2 H.edgeSet, e ∈ H.lineGraph.edgeSet ∧ f ∈ H.lineGraph.edgeSet ∧ (∀ x ∈ e, v ∈ x.val) ∧ (∀ x ∈ f, v ∈ x.val) ∧ (∀ x ∈ e, x ∉ f) ∧ simple_graph_triangle_packing_number (H.lineGraph.deleteEdges {e, f}) < simple_graph_triangle_packing_number H.lineGraph
simple_graph_link_min_degree_forces_disjointness_matchingIn LeanGraph Theory & Graph Algorithms

A finite graph with at least five edges and minimum nonzero degree greater than a positive integer r has at least max(2,r+1) disjoint pairs of vertex-disjoint edges, all edge-pair members distinct.

theorem simple_graph_link_min_degree_forces_disjointness_matching (n r : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (hr : 1 ≤ r) (hE : 5 ≤ G.edgeFinset.card) (hdeg : ∀ v : Fin n, (G.neighborFinset v).card = 0 ∨ r < (G.neighborFinset v).card) : ∃ M : Finset (Finset (Sym2 (Fin n))), 2 ≤ M.card ∧ r + 1 ≤ M.card ∧ (∀ p ∈ M, p.card = 2 ∧ p ⊆ G.edgeFinset ∧ (∀ e ∈ p, ∀ f ∈ p, e ≠ f → Disjoint e.toFinset f.toFinset)) ∧ (M : Set (Finset (Sym2 (Fin n)))).Pairwise Disjoint
simple_graph_list_vertex_coloring_maxDegree_two_connectedIn LeanGraph Theory & Graph Algorithms

Let G be a connected finite simple graph with maximum degree at most 2, and let L assign to each vertex a list of at least 2 colours from Fin 5, at least one list having size at least 3. Then G has a proper vertex colouring c with c v in L v for every vertex v.

theorem simple_graph_list_vertex_coloring_maxDegree_two_connected {V : Type*}
    [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (hconn : G.Connected) (hdeg : G.maxDegree ≤ 2) (L : V → Finset (Fin 5))
    (h2 : ∀ v, 2 ≤ (L v).card) (h3 : ∃ v, 3 ≤ (L v).card) :
    ∃ c : G.Coloring (Fin 5), ∀ v, c v ∈ L v
simple_graph_local_avg_dominating_order_eq_one_add_half_leaf_count_add_avg_erase_leaf_neighborsIn LeanGraph Theory & Graph Algorithms

If every neighbour of v is either a leaf or has a leaf neighbour, then avd_v(G) = 1 + l/2 + avd(G - L[v]), where l is the number of leaf neighbours of v and G - L[v] is the graph induced on the vertices different from v and from every leaf neighbour of v. This is identity (6) of the paper in the form avd_v(G) = (1 + l/2) + avd(G - L[v]) (line 532), the exact recurrence behind Theorem 5.2; it is an equality, with no bound on the core average. It generalises the banked one-leaf recursion to all l simultaneously and stops the 'grade' of the problem: everything left is a statement about the global average of the core graph.

theorem simple_graph_local_avg_dominating_order_eq_one_add_half_leaf_count_add_avg_erase_leaf_neighbors
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (v : V)
    (hstem : ∀ y, G.Adj v y → G.degree y ≠ 1 → ∃ z, G.Adj y z ∧ G.degree z = 1) :
    simple_graph_local_avg_dominating_order G v =
      1 + (simple_graph_leaf_neighbor_count G v : ℚ) / 2 +
        simple_graph_avg_dominating_order
          (G.induce ((Finset.univ \ insert v ((G.neighborFinset v).filter
            (fun u => G.degree u = 1)) : Finset V) : Set V))
simple_graph_local_avg_dominating_order_equivIn LeanGraph Theory & Graph Algorithms

The local average dominating order is invariant under graph isomorphism.

theorem simple_graph_local_avg_dominating_order_equiv {V : Type*} {V' : Type*} [Fintype V] [DecidableEq V] [Fintype V'] [DecidableEq V'] (G : SimpleGraph V) [DecidableRel G.Adj] (G' : SimpleGraph V') [DecidableRel G'.Adj] (e : V ≃ V') (he : ∀ u v, G'.Adj (e u) (e v) ↔ G.Adj u v) (v : V) : simple_graph_local_avg_dominating_order G' (e v) = simple_graph_local_avg_dominating_order G v
simple_graph_local_avg_dominating_order_le_four_mul_sub_leaf_count_add_two_of_neighborsIn LeanGraph Theory & Graph Algorithms

If G has no isolated vertices and every neighbour of v is either a leaf or has a leaf neighbour, then avd_v(G) ≤ (4n - l + 2)/6, where l is the number of leaf neighbours of v; in particular avd_v(G) ≤ (4n+1)/6 whenever l ≥ 1. This is the 'all neighbours are leaves or stems' regime of the stem conjecture, and it is the exact place where the global average bound enters.

theorem simple_graph_local_avg_dominating_order_le_four_mul_sub_leaf_count_add_two_of_neighbors
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (hiso : ∀ w, 0 < G.degree w) (v : V)
    (hnbr : ∀ y, G.Adj v y → G.degree y = 1 ∨ ∃ z, G.Adj y z ∧ G.degree z = 1) :
    simple_graph_local_avg_dominating_order G v ≤
      (4 * (Fintype.card V : ℚ) - (simple_graph_leaf_neighbor_count G v : ℚ) + 2) / 6
simple_graph_longest_cycles_card_eqIn LeanGraph Theory & Graph Algorithms

Any two longest cycles of a simple graph have the same number of vertices.

theorem simple_graph_longest_cycles_card_eq {V : Type*} {G : SimpleGraph V} (C D : G.Subgraph) (hC : simple_graph_is_longest_cycle C) (hD : simple_graph_is_longest_cycle D) : C.verts.ncard = D.verts.ncard
simple_graph_maxDegree_two_isCycles_of_not_acyclicIn LeanGraph Theory & Graph Algorithms

Let G be a finite connected simple graph with maximum degree at most 2 that is not acyclic (so it contains a cycle). Then every vertex with at least one neighbour has exactly 2 neighbours (i.e. G is a disjoint union of cycles; being connected, it is a single cycle).

theorem simple_graph_maxDegree_two_isCycles_of_not_acyclic {V : Type*}
    [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (hconn : G.Connected) (hdeg : G.maxDegree ≤ 2) (hacyc : ¬ G.IsAcyclic) :
    G.IsCycles
simple_graph_maxDegree_two_rankingIn LeanGraph Theory & Graph Algorithms

Let G be a connected finite simple graph with maximum degree at most 2, and let b be any vertex. Then there is a ranking pos : V → ℕ of the vertices, injective across every edge (adjacent vertices get different ranks), such that every vertex v has at most one neighbour of strictly smaller rank, with the single exception of v = b, which has at most two.

theorem simple_graph_maxDegree_two_ranking {V : Type*}
    [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hconn : G.Connected) (hdeg : G.maxDegree ≤ 2)
    (b : V) :
    ∃ pos : V → ℕ, (∀ v u, G.Adj v u → pos v ≠ pos u) ∧
      ∀ v, ((G.neighborFinset v).filter (fun u => pos u < pos v)).card ≤ (if v = b then 2 else 1)
simple_graph_maxDegree_two_ranking_of_acyclicIn LeanGraph Theory & Graph Algorithms

Let G be a finite connected acyclic simple graph (a tree) with maximum degree at most 2, and let b be any vertex. Then there is a ranking pos : V → ℕ, injective across every edge, such that every vertex v has at most one neighbour of strictly smaller rank, except v = b which has at most two.

theorem simple_graph_maxDegree_two_ranking_of_acyclic {V : Type*}
    [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (hconn : G.Connected) (hdeg : G.maxDegree ≤ 2) (hacyc : G.IsAcyclic) (b : V) :
    ∃ pos : V → ℕ, (∀ v u, G.Adj v u → pos v ≠ pos u) ∧
      ∀ v, ((G.neighborFinset v).filter (fun u => pos u < pos v)).card ≤ (if v = b then 2 else 1)
simple_graph_maxDegree_two_ranking_of_isCyclesIn LeanGraph Theory & Graph Algorithms

Let G be a finite connected simple graph in which every vertex with a neighbour has exactly 2 neighbours (so G is a single cycle), and let b be any vertex. Then there is a ranking pos : V → ℕ, injective across every edge, such that every vertex v has at most one neighbour of strictly smaller rank, except v = b which has at most two.

theorem simple_graph_maxDegree_two_ranking_of_isCycles {V : Type*}
    [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (hconn : G.Connected) (hcyc : G.IsCycles) (b : V) :
    ∃ pos : V → ℕ, (∀ v u, G.Adj v u → pos v ≠ pos u) ∧
      ∀ v, ((G.neighborFinset v).filter (fun u => pos u < pos v)).card ≤ (if v = b then 2 else 1)
simple_graph_max_three_edge_colorable_deficient_degreeIn LeanGraph Theory & Graph Algorithms

For every natural number n and simple graph H on Fin n with decidable adjacency, let M be a triple of pairwise edge-disjoint matchings in H of maximum total size. Every vertex incident with fewer than three selected edges has at most that many H-neighbors that are also incident with fewer than three selected edges.

theorem simple_graph_max_three_edge_colorable_deficient_degree
    (n : ℕ) (H : SimpleGraph (Fin n)) [DecidableRel H.Adj]
    (M : Fin 3 → Finset (Sym2 (Fin n)))
    (hmatch : ∀ i, M i ⊆ H.edgeFinset ∧
      ∀ e ∈ M i, ∀ f ∈ M i, e ≠ f → ∀ v ∈ e, v ∉ f)
    (hdisj : ∀ i j : Fin 3, i ≠ j → Disjoint (M i) (M j))
    (hmax : ∀ N : Fin 3 → Finset (Sym2 (Fin n)),
      (∀ i, N i ⊆ H.edgeFinset ∧
        ∀ e ∈ N i, ∀ f ∈ N i, e ≠ f → ∀ v ∈ e, v ∉ f) →
      (∀ i j : Fin 3, i ≠ j → Disjoint (N i) (N j)) →
      (N 0).card + (N 1).card + (N 2).card ≤
        (M 0).card + (M 1).card + (M 2).card) :
    let E := M 0 ∪ M 1 ∪ M 2
    ∀ v : Fin n, (E.filter (fun e => v ∈ e)).card < 3 →
      (Finset.univ.filter (fun w => H.Adj v w ∧
        (E.filter (fun e => w ∈ e)).card < 3)).card ≤
        (E.filter (fun e => v ∈ e)).card
simple_graph_maximum_packing_forced_k4_singleton_witness_uniqueIn LeanGraph Theory & Graph Algorithms

For a maximum triangle packing, once a packed face and an unpacked-spoke K4 anchor are fixed, every singleton-witness triangle meeting that face lies in the same four-clique.

theorem simple_graph_maximum_packing_forced_k4_singleton_witness_unique (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (p : Finset (Fin n)) (hp : p ∈ P) (x : Fin n) (hx : x ∉ p) (hk4 : G.IsNClique 4 (insert x p)) (hfree : ∀ v ∈ p, s(x,v) ∉ P.biUnion finite_vertex_set_edge_encoding) (t : Finset (Fin n)) (ht : G.IsNClique 3 t) (hsingle : (finite_vertex_set_edge_encoding t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1) (hmeets : ¬ Disjoint (finite_vertex_set_edge_encoding t) (finite_vertex_set_edge_encoding p)) : t ⊆ insert x p
simple_graph_maximum_packing_private_k4_core_symmetry_blocks_neighborIn LeanGraph Theory & Graph Algorithms

Let a maximum triangle packing contain abc with a and b private, and let abcx be a four-clique with cx unused by the packing. Let y be outside that four-clique and adjacent to a and x. Then there is no permutation fixing a, b and x, carrying c to y, and preserving the graph's adjacencies between vertices outside a and b.

theorem simple_graph_maximum_packing_private_k4_core_symmetry_blocks_neighbor (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (a b c x y : Fin n) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hp : ({a,b,c} : Finset (Fin n)) ∈ P) (hk4 : G.IsNClique 4 ({a,b,c,x} : Finset (Fin n))) (hprivate : ∀ q ∈ P, q ≠ ({a,b,c} : Finset (Fin n)) → a ∉ q ∧ b ∉ q) (hfree : s(c,x) ∉ P.biUnion finite_vertex_set_edge_encoding) (hy : y ∉ ({a,b,c,x} : Finset (Fin n))) (hay : G.Adj a y) (hxy : G.Adj x y) (σ : Equiv.Perm (Fin n)) (hfixa : σ a = a) (hfixb : σ b = b) (hfixx : σ x = x) (hmove : σ c = y) (hcore : ∀ u v : Fin n, u ≠ a → u ≠ b → v ≠ a → v ≠ b → G.Adj u v → G.Adj (σ u) (σ v)) : False
simple_graph_maximum_packing_private_k4_link_edges_packedIn LeanGraph Theory & Graph Algorithms

In a maximum packing, let abc be a packed triangle with a and b private, and let abcx be a four-clique with all three x-spokes unused. Every triangle through a other than the three four-clique triangles through a has its edge opposite a in the packing. The same conclusion holds for b after interchanging a and b.

theorem simple_graph_maximum_packing_private_k4_link_edges_packed (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (a b c x : Fin n) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hp : ({a,b,c} : Finset (Fin n)) ∈ P) (hk4 : G.IsNClique 4 ({a,b,c,x} : Finset (Fin n))) (hprivate : ∀ q ∈ P, q ≠ ({a,b,c} : Finset (Fin n)) → a ∉ q ∧ b ∉ q) (hfree : ∀ v ∈ ({a,b,c} : Finset (Fin n)), s(x,v) ∉ P.biUnion finite_vertex_set_edge_encoding) : ∀ y z : Fin n, G.Adj a y → G.Adj a z → G.Adj y z → ({y,z} : Finset (Fin n)) ≠ {b,c} → ({y,z} : Finset (Fin n)) ≠ {b,x} → ({y,z} : Finset (Fin n)) ≠ {c,x} → s(y,z) ∈ P.biUnion finite_vertex_set_edge_encoding
simple_graph_min_degree_two_edge_count_le_vertices_is_two_regularIn LeanGraph Theory & Graph Algorithms

If a finite simple graph has minimum degree at least two and at most as many edges as vertices, every vertex has degree exactly two.

theorem simple_graph_min_degree_two_edge_count_le_vertices_is_two_regular (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (hmin : ∀ v : Fin n, 2 ≤ (G.neighborFinset v).card) (hedges : G.edgeFinset.card ≤ n) : ∀ v : Fin n, (G.neighborFinset v).card = 2
simple_graph_min_nonzero_degree_two_five_edges_has_two_disjoint_pairsIn LeanGraph Theory & Graph Algorithms

In any finite simple graph with at least five edges and no degree-one vertices, four distinct edges can be chosen as two vertex-disjoint pairs.

theorem simple_graph_min_nonzero_degree_two_five_edges_has_two_disjoint_pairs (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (hE : 5 ≤ G.edgeFinset.card) (hdeg : ∀ v : Fin n, (G.neighborFinset v).card = 0 ∨ 2 ≤ (G.neighborFinset v).card) : ∃ e₁ ∈ G.edgeFinset, ∃ e₂ ∈ G.edgeFinset, ∃ e₃ ∈ G.edgeFinset, ∃ e₄ ∈ G.edgeFinset, ({e₁,e₂,e₃,e₄} : Finset (Sym2 (Fin n))).card = 4 ∧ Disjoint e₁.toFinset e₂.toFinset ∧ Disjoint e₃.toFinset e₄.toFinset
simple_graph_minimal_k_star_forming_exists_private_witnessIn LeanGraph Theory & Graph Algorithms

Let S be a minimal k-star-forming set, k ≥ 1, and u ∈ S a vertex with at least k neighbours in S (so u cannot itself witness the failure of S \ {u} being k-star-forming). Then some vertex z outside S has fewer than k neighbours in S \ {u} and is adjacent to no vertex w of S \ {u} that has at least k - 1 neighbours in S \ {u}.

theorem simple_graph_minimal_k_star_forming_exists_private_witness {V : Type*} [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (k : ℕ) (hk : 1 ≤ k) (S : Finset V)
    (hS : simple_graph_is_minimal_k_star_forming G k S) (u : V) (hu : u ∈ S)
    (hdeg : k ≤ (S.filter (G.Adj u)).card) :
    ∃ z, z ∉ S ∧ ((S.erase u).filter (G.Adj z)).card < k ∧
      ∀ w ∈ S.erase u, G.Adj z w → ((S.erase u).filter (G.Adj w)).card < k - 1
simple_graph_minimum_triangle_cover_outside_maximum_packing_supportIn LeanGraph Theory & Graph Algorithms

There is a seven-vertex graph with triangle packing number five and triangle cover number six, and two graph edges such that no maximum triangle packing uses either edge but every minimum triangle cover uses at least one of them. Thus the union of all maximum packing edges need not contain a minimum triangle cover.

theorem simple_graph_minimum_triangle_cover_outside_maximum_packing_support :
    ∃ (G : SimpleGraph (Fin 7)) (e f : Sym2 (Fin 7)),
      e ∈ G.edgeSet ∧ f ∈ G.edgeSet ∧
      simple_graph_triangle_packing_number G = 5 ∧
      simple_graph_triangle_cover_number G = 6 ∧
      (∀ P : Finset (Finset (Fin 7)),
        (∀ t ∈ P, G.IsNClique 3 t) →
        (P : Set (Finset (Fin 7))).Pairwise (fun s t => (s ∩ t).card ≤ 1) →
        P.card = 5 →
        ∀ t ∈ P, ¬ (∀ x ∈ e, x ∈ t) ∧ ¬ (∀ x ∈ f, x ∈ t)) ∧
      (∀ C : Finset (Sym2 (Fin 7)),
        (∀ g ∈ C, g ∈ G.edgeSet) →
        (∀ t : Finset (Fin 7), G.IsNClique 3 t →
          ∃ g ∈ C, ∀ x ∈ g, x ∈ t) →
        C.card = 6 → e ∈ C ∨ f ∈ C)
simple_graph_no_good_packing_forced_k4_decreasing_pairIn LeanGraph Theory & Graph Algorithms

If every maximum triangle packing has a fully singleton-forced triangle, some maximum packing has such a triangle contained in a four-clique with an opposite pair of edges whose deletion lowers the packing number.

theorem simple_graph_no_good_packing_forced_k4_decreasing_pair
    (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj]
    (hbad : ∀ P : Finset (Finset (Sym2 (Fin n))),
      P ⊆ simple_graph_triangle_edge_family G →
      P.card = simple_graph_triangle_packing_number G →
      (P : Set (Finset (Sym2 (Fin n)))).Pairwise Disjoint →
      ∃ p ∈ P, p ⊆ (((simple_graph_triangle_edge_family G).filter
        (fun t => (t ∩ P.biUnion id).card = 1)).biUnion id)) :
    ∃ (P : Finset (Finset (Sym2 (Fin n)))) (p : Finset (Sym2 (Fin n)))
      (e f : Sym2 (Fin n)) (U : Finset (Fin n)),
      P ⊆ simple_graph_triangle_edge_family G ∧
      P.card = simple_graph_triangle_packing_number G ∧
      (P : Set (Finset (Sym2 (Fin n)))).Pairwise Disjoint ∧
      p ∈ P ∧ p ⊆ (((simple_graph_triangle_edge_family G).filter
        (fun t => (t ∩ P.biUnion id).card = 1)).biUnion id) ∧
      G.IsNClique 4 U ∧
      (∀ q ∈ p, ∀ v ∈ q, v ∈ U) ∧ e ∈ p ∧ f ∈ G.edgeSet ∧
      (∀ v ∈ f, v ∈ U) ∧ (∀ v ∈ e, v ∉ f) ∧
      simple_graph_triangle_packing_number (G.deleteEdges {e, f}) <
        simple_graph_triangle_packing_number G
simple_graph_nonempty_iso_clique_four_bridge_cliqueIn LeanGraph Theory & Graph Algorithms

A graph that is two complete Finset sides joined by the single edge uv, with one side of order 4, is isomorphic to simple_graph_clique_four_bridge_clique (card V).

theorem simple_graph_nonempty_iso_clique_four_bridge_clique {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    {A B : Finset V} (hU : (A : Set V) ∪ (B : Set V) = Set.univ) (hD : Disjoint (A : Set V) (B : Set V))
    {u v : V} (hu : u ∈ A) (hv : v ∈ B) (huv : G.Adj u v)
    (hcross : ∀ x ∈ A, ∀ y ∈ B, G.Adj x y → (x = u ∧ y = v) ∨ (x = v ∧ y = u))
    (hAtop : G.induce (A : Set V) = ⊤) (hBtop : G.induce (B : Set V) = ⊤)
    (hcard : A.card = 4 ∨ B.card = 4) :
    Nonempty (G ≃g simple_graph_clique_four_bridge_clique (Fintype.card V))
simple_graph_normalized_hop_group_quadratic_word_diameterIn LeanGraph Theory & Graph Algorithms

There exists an absolute constant C > 0 such that for every connected finite simple graph G on at least 2 vertices admitting a hop h₀, every element of the normalized subgroup K relative to h₀ has signed normalized word length at most C * |V|² with respect to P ∪ P⁻¹.

theorem simple_graph_normalized_hop_group_quadratic_word_diameter :
    ∃ C : ℕ, 0 < C ∧ ∀ (V : Type) [Fintype V] [DecidableEq V] (G : SimpleGraph V) (h₀ : Equiv.Perm V),
      2 ≤ Fintype.card V → G.Connected → simple_graph_is_hop G h₀ →
      ∀ k ∈ simple_graph_normalized_hop_group G h₀,
        ∃ w : List (Equiv.Perm V),
          (∀ p ∈ w, simple_graph_normalized_hop G h₀ p ∨ simple_graph_normalized_hop G h₀ p⁻¹) ∧
            w.length ≤ C * (Fintype.card V) ^ 2 ∧ w.prod = k
simple_graph_normalized_hop_quadratic_diameter_of_relationIn LeanGraph Theory & Graph Algorithms

The general relation form of the quadratic diameter bound implies the graph form: setting R u v := G.Adj u (h0 v), cycle covers of R are exactly the normalized hops, and inverses of covers are exactly the inverted normalized hops.

theorem simple_graph_normalized_hop_quadratic_diameter_of_relation :
    (∃ C : ℕ, 0 < C ∧ ∀ (W : Type) [Fintype W] [DecidableEq W] (R : W → W → Prop),
      (∀ v, R v v) →
      ∀ k ∈ Subgroup.closure {p : Equiv.Perm W | ∀ v, R v (p v)},
        ∃ w : List (Equiv.Perm W),
          (∀ p ∈ w, (∀ v, R v (p v)) ∨ (∀ v, R (p v) v)) ∧
            w.length ≤ C * (Fintype.card W) ^ 2 ∧ w.prod = k) →
    ∃ C : ℕ, 0 < C ∧ ∀ (V : Type) [Fintype V] [DecidableEq V] (G : SimpleGraph V) (h₀ : Equiv.Perm V),
      2 ≤ Fintype.card V → G.Connected → simple_graph_is_hop G h₀ →
      ∀ k ∈ simple_graph_normalized_hop_group G h₀,
        ∃ w : List (Equiv.Perm V),
          (∀ p ∈ w, simple_graph_normalized_hop G h₀ p ∨ simple_graph_normalized_hop G h₀ p⁻¹) ∧
            w.length ≤ C * (Fintype.card V) ^ 2 ∧ w.prod = k
simple_graph_nu_le_five_nine_seed_two_book_classificationIn LeanGraph Theory & Graph Algorithms

In a finite graph with triangle-packing number at most five containing the specified twenty-edge graph on nine vertices, every triangle lies in the nine-vertex support or consists of an outside vertex and one of the two disjoint support edges 26 and 34.

theorem simple_graph_nu_le_five_nine_seed_two_book_classification (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (f : Fin 9 → Fin n) (hinj : Function.Injective f) (hcontains : ∀ i j : Fin 9, (i,j) ∈ ({(0,1),(0,2),(0,3),(0,4),(1,2),(1,3),(1,6),(2,3),(2,4),(2,6),(2,7),(2,8),(3,4),(3,5),(3,6),(3,7),(4,5),(4,7),(6,7),(6,8)} : Finset (Fin 9 × Fin 9)) → G.Adj (f i) (f j)) (hbound : simple_graph_triangle_packing_number G ≤ 5) : let S := (Finset.univ : Finset (Fin 9)).image f; ∀ t : Finset (Fin n), G.IsNClique 3 t → t ⊆ S ∨ ∃ w, w ∉ S ∧ (t = {f 2,f 6,w} ∨ t = {f 3,f 4,w})
simple_graph_nu_le_five_ten_seed_four_book_classificationIn LeanGraph Theory & Graph Algorithms

In a finite graph with triangle-packing number at most five containing the specified twenty-edge graph on ten vertices, every triangle lies in the ten-vertex support or consists of an outside vertex and one of the support edges 24, 27, 34 or 37.

theorem simple_graph_nu_le_five_ten_seed_four_book_classification (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (f : Fin 10 → Fin n) (hinj : Function.Injective f) (hcontains : ∀ i j : Fin 10, (i,j) ∈ ({(0,1),(0,2),(0,3),(0,4),(1,2),(1,3),(1,7),(2,3),(2,4),(2,6),(2,7),(2,9),(3,4),(3,5),(3,7),(3,8),(4,5),(4,6),(7,8),(7,9)} : Finset (Fin 10 × Fin 10)) → G.Adj (f i) (f j)) (hbound : simple_graph_triangle_packing_number G ≤ 5) : let S := (Finset.univ : Finset (Fin 10)).image f; ∀ t : Finset (Fin n), G.IsNClique 3 t → t ⊆ S ∨ ∃ w, w ∉ S ∧ (t = {f 2,f 4,w} ∨ t = {f 2,f 7,w} ∨ t = {f 3,f 4,w} ∨ t = {f 3,f 7,w})
simple_graph_odd_cycle_linegraph_stable_fully_forced_familyIn LeanGraph Theory & Graph Algorithms

For each odd r at least five, form a 4-regular graph on two r-cycles by joining v_i to v_(i+1), w_i to w_(i+2), and w_i to v_i and v_(i+1). Its line graph has 4r vertices and 12r edges, triangle codegrees two or three, packing number (5r-1)/2, a connected triangle-intersection graph and stable edge deletion; every maximum packing has a fully singleton-forced triangle.

open scoped Sym2

theorem simple_graph_odd_cycle_linegraph_stable_fully_forced_family
    (r : ℕ) [NeZero r] (hr : 5 ≤ r) (hodd : Odd r)
    (H : SimpleGraph (ZMod r × Fin 2)) [DecidableRel H.Adj]
    (hH : ∀ x y, H.Adj x y ↔ x ≠ y ∧ ∃ i : ZMod r,
      s(x, y) = s((i, 0), (i + 1, 0)) ∨
      s(x, y) = s((i, 1), (i + 2, 1)) ∨
      s(x, y) = s((i, 1), (i, 0)) ∨
      s(x, y) = s((i, 1), (i + 1, 0))) :
    let G := H.lineGraph
    let F := simple_graph_triangle_edge_family G
    let k := (5 * r - 1) / 2
    Fintype.card H.edgeSet = 4 * r ∧
    (∃ E : Finset (Sym2 H.edgeSet), (↑E : Set (Sym2 H.edgeSet)) = G.edgeSet ∧ E.card = 12 * r) ∧
    (∃ P : Finset (Finset (Sym2 H.edgeSet)), P ⊆ F ∧ P.card = k ∧
      (P : Set (Finset (Sym2 H.edgeSet))).Pairwise Disjoint) ∧
    (∀ Q : Finset (Finset (Sym2 H.edgeSet)), Q ⊆ F →
      (Q : Set (Finset (Sym2 H.edgeSet))).Pairwise Disjoint → Q.card ≤ k) ∧
    (∀ e ∈ G.edgeSet, ∃ Q : Finset (Finset (Sym2 H.edgeSet)), Q ⊆ F ∧ Q.card = k ∧
      (Q : Set (Finset (Sym2 H.edgeSet))).Pairwise Disjoint ∧ e ∉ Q.biUnion id) ∧
    (∀ e ∈ G.edgeSet, 2 ≤ (F.filter (fun t => e ∈ t)).card ∧ (F.filter (fun t => e ∈ t)).card ≤ 3) ∧
    (∀ a ∈ F, ∀ b ∈ F, Relation.ReflTransGen
      (fun x y : Finset (Sym2 H.edgeSet) => x ∈ F ∧ y ∈ F ∧ ¬ Disjoint x y) a b) ∧
    ∀ P : Finset (Finset (Sym2 H.edgeSet)), P ⊆ F → P.card = k →
      (P : Set (Finset (Sym2 H.edgeSet))).Pairwise Disjoint →
      ∃ p ∈ P, p ⊆ ((F.filter (fun t => (t ∩ P.biUnion id).card = 1)).biUnion id)
simple_graph_opposite_pair_stable_external_k4_attachmentIn LeanGraph Theory & Graph Algorithms

Let P be a maximum edge-disjoint triangle packing containing abc, and let x outside its vertex support complete abc to a four-clique. If deleting the opposite edges ab and cx preserves the packing number, then another triangle of P contains a or b and a vertex y outside abc that is adjacent to x.

theorem simple_graph_opposite_pair_stable_external_k4_attachment (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (a b c x : Fin n) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hp : ({a,b,c} : Finset (Fin n)) ∈ P) (hx : x ∉ P.biUnion id) (hk4 : G.IsNClique 4 ({a,b,c,x} : Finset (Fin n))) (hstable : simple_graph_triangle_packing_number (G.deleteEdges {s(a,b), s(c,x)}) = simple_graph_triangle_packing_number G) : ∃ t ∈ P, t ≠ ({a,b,c} : Finset (Fin n)) ∧ (a ∈ t ∨ b ∈ t) ∧ ∃ y ∈ t, y ∉ ({a,b,c} : Finset (Fin n)) ∧ G.Adj x y
simple_graph_packing_card_le_of_hitting_setIn LeanGraph Theory & Graph Algorithms

A hitting set for a pairwise edge-disjoint family of edge sets has cardinality at least the size of the family.

theorem simple_graph_packing_card_le_of_hitting_set {V : Type*} (S : Finset (Sym2 V)) (R : Finset (Finset (Sym2 V)))
    (hdisj : (R : Set (Finset (Sym2 V))).Pairwise Disjoint)
    (hhit : ∀ t ∈ R, ∃ s ∈ S, s ∈ t) : R.card ≤ S.card
simple_graph_packing_thirteen_stable_seed_good_packingIn LeanGraph Theory & Graph Algorithms

Every stable supergraph of the displayed 18-vertex seed with triangle packing number thirteen has a maximum packing without a fully singleton-forced triangle.

open scoped Sym2

theorem simple_graph_packing_thirteen_stable_seed_good_packing :
    let E₀ : Finset (Sym2 (Fin 18)) := {s(0, 1), s(0, 4), s(0, 6), s(0, 7), s(0, 8), s(0, 11), s(1, 5), s(1, 8), s(1, 11), s(1, 12), s(1, 13), s(1, 14), s(2, 3), s(2, 4), s(2, 5), s(2, 6), s(2, 12), s(2, 15), s(3, 4), s(3, 5), s(3, 11), s(3, 14), s(3, 16), s(4, 5), s(4, 6), s(4, 7), s(5, 13), s(5, 14), s(6, 7), s(6, 12), s(6, 15), s(7, 8), s(7, 9), s(7, 10), s(8, 9), s(8, 10), s(8, 11), s(9, 10), s(9, 12), s(9, 13), s(9, 17), s(10, 15), s(10, 16), s(10, 17), s(11, 14), s(11, 15), s(11, 16), s(12, 13), s(12, 15), s(12, 17), s(13, 14), s(13, 17), s(14, 16), s(15, 16), s(15, 17), s(16, 17)}
    ∀ (G : SimpleGraph (Fin 18)),
      let F := simple_graph_triangle_edge_family G
      (↑E₀ : Set (Sym2 (Fin 18))) ⊆ G.edgeSet →
      (∀ Q : Finset (Finset (Sym2 (Fin 18))), Q ⊆ F →
        (Q : Set (Finset (Sym2 (Fin 18)))).Pairwise Disjoint → Q.card ≤ 13) →
      (∀ e ∈ G.edgeSet, ∃ Q : Finset (Finset (Sym2 (Fin 18))), Q ⊆ F ∧ Q.card = 13 ∧
        (Q : Set (Finset (Sym2 (Fin 18)))).Pairwise Disjoint ∧ e ∉ Q.biUnion id) →
      ∃ P : Finset (Finset (Sym2 (Fin 18))), P ⊆ F ∧ P.card = 13 ∧
        (P : Set (Finset (Sym2 (Fin 18)))).Pairwise Disjoint ∧
        ∀ p ∈ P, ¬ p ⊆ ((F.filter (fun t => (t ∩ P.biUnion id).card = 1)).biUnion id)
simple_graph_pair_stable_active_vertices_four_k_minus_fiveIn LeanGraph Theory & Graph Algorithms

In a two-edge-stable finite graph with triangle packing number k≥5, at most 4k−5 vertices lie in triangles.

theorem simple_graph_pair_stable_active_vertices_four_k_minus_five (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (hk : 5 ≤ simple_graph_triangle_packing_number G) : (((Finset.univ : Finset (Finset (Fin n))).filter (G.IsNClique 3)).biUnion id).card + 5 ≤ 4 * simple_graph_triangle_packing_number G
simple_graph_pair_stable_deficit_one_outside_impossibleIn LeanGraph Theory & Graph Algorithms

A support-maximal maximum packing in a two-edge-stable graph has no active outside vertex in exactly |P|−1 triangles when every active vertex lies in at least |P|−1 triangles.

theorem simple_graph_pair_stable_deficit_one_outside_impossible (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hsupport : ∀ Q : Finset (Finset (Fin n)), (∀ t ∈ Q, G.IsNClique 3 t) → (Q : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1) → Q.card = P.card → (Q.biUnion id).card ≤ (P.biUnion id).card) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (x : Fin n) (hx : x ∉ P.biUnion id) (hactive : ∃ t : Finset (Fin n), G.IsNClique 3 t ∧ x ∈ t) (hlocal : ∀ y : Fin n, (∃ t : Finset (Fin n), G.IsNClique 3 t ∧ y ∈ t) → P.card ≤ (((Finset.univ : Finset (Finset (Fin n))).filter (fun t => G.IsNClique 3 t ∧ y ∈ t)).card) + 1) (hdeficit : (((Finset.univ : Finset (Finset (Fin n))).filter (fun t => G.IsNClique 3 t ∧ x ∈ t)).card) + 1 = P.card) : False
simple_graph_pair_stable_four_cycle_books_twenty_vertex_kernelIn LeanGraph Theory & Graph Algorithms

If every triangle of a two-edge-stable finite graph is either inside S or has one outside vertex and an edge of a four-cycle on S, at most twenty outside vertices can be retained so the induced graph has the same triangle-packing number and remains two-edge-stable.

theorem simple_graph_pair_stable_four_cycle_books_twenty_vertex_kernel (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (S : Finset (Fin n)) (a b c d : Fin n) (habcd : ({a,b,c,d} : Finset (Fin n)).card = 4) (hS : ({a,b,c,d} : Finset (Fin n)) ⊆ S) (hclass : ∀ t : Finset (Fin n), G.IsNClique 3 t → t ⊆ S ∨ ∃ w, w ∉ S ∧ (t = {a,c,w} ∨ t = {a,d,w} ∨ t = {b,c,w} ∨ t = {b,d,w})) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) : ∃ U : Finset (Fin n), Disjoint U S ∧ U.card ≤ 20 ∧ let H := G.induce (↑(S ∪ U) : Set (Fin n)); simple_graph_triangle_packing_number H = simple_graph_triangle_packing_number G ∧ ∀ e f : Sym2 {v : Fin n // v ∈ S ∪ U}, e ∈ H.edgeSet → f ∈ H.edgeSet → e ≠ f → simple_graph_triangle_packing_number (H.deleteEdges {e,f}) = simple_graph_triangle_packing_number H
simple_graph_pair_stable_good_packing_support_four_k_minus_four_kernelIn LeanGraph Theory & Graph Algorithms

If a two-edge-stable graph has a good maximum packing of k≥4 triangles, it has an induced support-signature kernel containing the packing on at most 4k−4 vertices.

theorem simple_graph_pair_stable_good_packing_support_four_k_minus_four_kernel (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hgood : ∀ p ∈ P, (finite_vertex_set_edge_encoding p ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).card ≤ 1) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (hfour : 4 ≤ P.card) : ∃ W : Finset (Fin n), W.card + 4 ≤ 4 * P.card ∧ P.biUnion id ⊆ W ∧ ∀ t : Finset (Fin n), G.IsNClique 3 t → ∃ s : Finset (Fin n), G.IsNClique 3 s ∧ s ⊆ W ∧ finite_vertex_set_edge_encoding s ∩ (P.biUnion finite_vertex_set_edge_encoding) = finite_vertex_set_edge_encoding t ∩ (P.biUnion finite_vertex_set_edge_encoding)
simple_graph_pair_stable_k4_every_face_pair_extends_linkIn LeanGraph Theory & Graph Algorithms

In a two-edge-stable graph, fix a four-clique with a distinguished vertex x. For any two other clique vertices, at least one has a common neighbor with x outside the four-clique. Consequently at least two of the three face vertices have such an external common neighbor.

theorem simple_graph_pair_stable_k4_every_face_pair_extends_link (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (x a b c : Fin n) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (hk4 : G.IsNClique 4 ({x,a,b,c} : Finset (Fin n))) : ∀ u ∈ ({a,b,c} : Finset (Fin n)), ∀ v ∈ ({a,b,c} : Finset (Fin n)), u ≠ v → ∃ y : Fin n, y ∉ ({x,a,b,c} : Finset (Fin n)) ∧ G.Adj x y ∧ (G.Adj u y ∨ G.Adj v y)
simple_graph_pair_stable_k4_forest_forces_another_packing_edgeIn LeanGraph Theory & Graph Algorithms

In a two-edge-stable graph, let a maximum triangle packing have a forest as its vertex-intersection graph. If a packed face belongs to a four-clique whose three anchor spokes are unused, then some different packed triangle has a singleton-forced edge.

theorem simple_graph_pair_stable_k4_forest_forces_another_packing_edge (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (hforest : ∀ F : Finset (Finset (Fin n)), F ⊆ P → F.Nonempty → ∃ t ∈ F, (F.filter (fun u => u ≠ t ∧ ¬ Disjoint u t)).card ≤ 1) (a b c x : Fin n) (hp : ({a,b,c} : Finset (Fin n)) ∈ P) (hk4 : G.IsNClique 4 ({x,a,b,c} : Finset (Fin n))) (hfree : ∀ v ∈ ({a,b,c} : Finset (Fin n)), s(x,v) ∉ P.biUnion finite_vertex_set_edge_encoding) : ∃ q ∈ P, q ≠ ({a,b,c} : Finset (Fin n)) ∧ ¬ Disjoint (finite_vertex_set_edge_encoding q) (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)
simple_graph_pair_stable_large_intersecting_packing_at_most_one_forced_edgeIn LeanGraph Theory & Graph Algorithms

In a pair-stable graph, if a maximum packing has at least eight triangles and every two of its triangles share a vertex, then each packed triangle has at most one singleton-forced edge. Consequently the packing has no fully forced triangle.

theorem simple_graph_pair_stable_large_intersecting_packing_at_most_one_forced_edge (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hinter : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).Nonempty)) (hmax : P.card = simple_graph_triangle_packing_number G) (hlarge : 8 ≤ P.card) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) : ∀ p ∈ P, (finite_vertex_set_edge_encoding p ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).card ≤ 1
simple_graph_pair_stable_link_no_four_cycle_componentIn LeanGraph Theory & Graph Algorithms

In a two-edge-stable graph, the link of a vertex cannot have an induced four-cycle as a connected component, even if other components are present.

theorem simple_graph_pair_stable_link_no_four_cycle_component (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (x : Fin n) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (a b c d : Fin n) (hdist : ({a,b,c,d} : Finset (Fin n)).card = 4) (hcycle : ({s(a,b),s(b,c),s(c,d),s(d,a)} : Finset (Sym2 (Fin n))) ⊆ G.edgeFinset.filter (fun e => ∀ v ∈ e, G.Adj x v)) (hcomponent : ∀ e ∈ G.edgeFinset.filter (fun e => ∀ v ∈ e, G.Adj x v), (a ∈ e ∨ b ∈ e ∨ c ∈ e ∨ d ∈ e) → e ∈ ({s(a,b),s(b,c),s(c,d),s(d,a)} : Finset (Sym2 (Fin n)))) : False
simple_graph_pair_stable_link_no_triangle_componentIn LeanGraph Theory & Graph Algorithms

In a two-edge-stable graph, the link of a vertex cannot have a triangle as a connected component, even if other components are present.

theorem simple_graph_pair_stable_link_no_triangle_component (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (x : Fin n) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (a b c : Fin n) (hdist : ({a,b,c} : Finset (Fin n)).card = 3) (hcycle : ({s(a,b),s(b,c),s(c,a)} : Finset (Sym2 (Fin n))) ⊆ G.edgeFinset.filter (fun e => ∀ v ∈ e, G.Adj x v)) (hcomponent : ∀ e ∈ G.edgeFinset.filter (fun e => ∀ v ∈ e, G.Adj x v), (a ∈ e ∨ b ∈ e ∨ c ∈ e) → e ∈ ({s(a,b),s(b,c),s(c,a)} : Finset (Sym2 (Fin n)))) : False
simple_graph_pair_stable_minimum_outside_link_has_small_degreeIn LeanGraph Theory & Graph Algorithms

Minimize the number of triangles through an active outside vertex over all support-maximal maximum packings of a two-edge-stable graph. The resulting link deficit is at least two, and some nonisolated link vertex has degree at most that deficit.

theorem simple_graph_pair_stable_minimum_outside_link_has_small_degree (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hsupport : ∀ Q : Finset (Finset (Fin n)), (∀ t ∈ Q, G.IsNClique 3 t) → (Q : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1) → Q.card = P.card → (Q.biUnion id).card ≤ (P.biUnion id).card) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (x : Fin n) (hx : x ∉ P.biUnion id) (hactive : ∃ t : Finset (Fin n), G.IsNClique 3 t ∧ x ∈ t) (E : Finset (Sym2 (Fin n))) (hE : E = G.edgeFinset.filter (fun e => ∀ v ∈ e, G.Adj x v)) (r : ℕ) (hr : E.card + r = P.card) (hminimal : ∀ Q : Finset (Finset (Fin n)), (∀ t ∈ Q, G.IsNClique 3 t) → (Q : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1) → Q.card = P.card → (Q.biUnion id).card = (P.biUnion id).card → ∀ y : Fin n, y ∉ Q.biUnion id → (∃ t : Finset (Fin n), G.IsNClique 3 t ∧ y ∈ t) → (((Finset.univ : Finset (Finset (Fin n))).filter (fun t => G.IsNClique 3 t ∧ x ∈ t)).card) ≤ (((Finset.univ : Finset (Finset (Fin n))).filter (fun t => G.IsNClique 3 t ∧ y ∈ t)).card)) : 2 ≤ r ∧ ∃ v : Fin n, 2 ≤ (E.filter (fun e => v ∈ e)).card ∧ (E.filter (fun e => v ∈ e)).card ≤ r
simple_graph_pair_stable_no_good_finite_kernelIn LeanGraph Theory & Graph Algorithms

If a finite simple graph has triangle packing number k, deleting any two edges preserves that number, and every maximum packing contains a triangle all of whose edges are singleton-forced, then an induced subgraph on at most 3k+(k+2)2^(3k) vertices has the same three properties, including packing number k.

theorem simple_graph_pair_stable_no_good_finite_kernel (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → simple_graph_triangle_packing_number (G.deleteEdges {e, f}) = simple_graph_triangle_packing_number G) (hbad : ∀ P : Finset (Finset (Sym2 (Fin n))), P ⊆ simple_graph_triangle_edge_family G → P.card = simple_graph_triangle_packing_number G → (P : Set (Finset (Sym2 (Fin n)))).Pairwise Disjoint → ∃ p ∈ P, p ⊆ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion id).card = 1)).biUnion id)) : ∃ W : Finset (Fin n), W.card ≤ 3 * simple_graph_triangle_packing_number G + (simple_graph_triangle_packing_number G + 2) * 2 ^ (3 * simple_graph_triangle_packing_number G) ∧ let H := G.induce (W : Set (Fin n)); simple_graph_triangle_packing_number H = simple_graph_triangle_packing_number G ∧ (∀ e f : Sym2 {x : Fin n // x ∈ W}, e ∈ H.edgeSet → f ∈ H.edgeSet → simple_graph_triangle_packing_number (H.deleteEdges {e, f}) = simple_graph_triangle_packing_number H) ∧ (∀ P : Finset (Finset (Sym2 {x : Fin n // x ∈ W})), P ⊆ simple_graph_triangle_edge_family H → P.card = simple_graph_triangle_packing_number H → (P : Set (Finset (Sym2 {x : Fin n // x ∈ W}))).Pairwise Disjoint → ∃ p ∈ P, p ⊆ (((simple_graph_triangle_edge_family H).filter (fun t => (t ∩ P.biUnion id).card = 1)).biUnion id))
simple_graph_pair_stable_no_good_sharp_quadratic_kernelIn LeanGraph Theory & Graph Algorithms

If a finite simple graph has triangle packing number k, deleting any two edges preserves that number, and every maximum packing contains a triangle all of whose edges are singleton-forced, then an induced subgraph on at most k²+4k−1 vertices has the same three properties, including packing number k.

theorem simple_graph_pair_stable_no_good_sharp_quadratic_kernel (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → simple_graph_triangle_packing_number (G.deleteEdges {e, f}) = simple_graph_triangle_packing_number G) (hbad : ∀ P : Finset (Finset (Sym2 (Fin n))), P ⊆ simple_graph_triangle_edge_family G → P.card = simple_graph_triangle_packing_number G → (P : Set (Finset (Sym2 (Fin n)))).Pairwise Disjoint → ∃ p ∈ P, p ⊆ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion id).card = 1)).biUnion id)) : ∃ W : Finset (Fin n), W.card + 1 ≤ simple_graph_triangle_packing_number G * simple_graph_triangle_packing_number G + 4 * simple_graph_triangle_packing_number G ∧ let H := G.induce (W : Set (Fin n)); simple_graph_triangle_packing_number H = simple_graph_triangle_packing_number G ∧ (∀ e f : Sym2 {x : Fin n // x ∈ W}, e ∈ H.edgeSet → f ∈ H.edgeSet → simple_graph_triangle_packing_number (H.deleteEdges {e, f}) = simple_graph_triangle_packing_number H) ∧ (∀ P : Finset (Finset (Sym2 {x : Fin n // x ∈ W})), P ⊆ simple_graph_triangle_edge_family H → P.card = simple_graph_triangle_packing_number H → (P : Set (Finset (Sym2 {x : Fin n // x ∈ W}))).Pairwise Disjoint → ∃ p ∈ P, p ⊆ (((simple_graph_triangle_edge_family H).filter (fun t => (t ∩ P.biUnion id).card = 1)).biUnion id))
simple_graph_pair_stable_nu_le_five_excludes_eight_saturated_seedIn LeanGraph Theory & Graph Algorithms

A two-edge-stable graph with triangle-packing number at most five cannot contain the specified twenty-edge graph on eight vertices as a subgraph.

theorem simple_graph_pair_stable_nu_le_five_excludes_eight_saturated_seed (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (f : Fin 8 → Fin n) (hinj : Function.Injective f) (hcontains : ∀ i j : Fin 8, (i,j) ∈ ({(0,1),(0,2),(0,3),(0,4),(1,2),(1,3),(1,6),(2,3),(2,4),(2,5),(2,6),(2,7),(3,4),(3,5),(3,6),(3,7),(4,5),(4,7),(5,6),(6,7)} : Finset (Fin 8 × Fin 8)) → G.Adj (f i) (f j)) (hbound : simple_graph_triangle_packing_number G ≤ 5) (hstable : ∀ e g : Sym2 (Fin n), e ∈ G.edgeSet → g ∈ G.edgeSet → e ≠ g → simple_graph_triangle_packing_number (G.deleteEdges {e,g}) = simple_graph_triangle_packing_number G) : False
simple_graph_pair_stable_outside_general_deficit_low_degree_obstructionIn LeanGraph Theory & Graph Algorithms

If an outside link of a support-maximal maximum packing has positive deficit r and every active vertex lies in at least as many triangles as there are link edges, then some nonisolated link vertex has degree at most r.

theorem simple_graph_pair_stable_outside_general_deficit_low_degree_obstruction (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hsupport : ∀ Q : Finset (Finset (Fin n)), (∀ t ∈ Q, G.IsNClique 3 t) → (Q : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1) → Q.card = P.card → (Q.biUnion id).card ≤ (P.biUnion id).card) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (x : Fin n) (hx : x ∉ P.biUnion id) (hactive : ∃ t : Finset (Fin n), G.IsNClique 3 t ∧ x ∈ t) (E : Finset (Sym2 (Fin n))) (hE : E = G.edgeFinset.filter (fun e => ∀ v ∈ e, G.Adj x v)) (r : ℕ) (hr : E.card + r = P.card) (hlocal : ∀ y : Fin n, (∃ t : Finset (Fin n), G.IsNClique 3 t ∧ y ∈ t) → E.card ≤ (((Finset.univ : Finset (Finset (Fin n))).filter (fun t => G.IsNClique 3 t ∧ y ∈ t)).card)) (hrpos : 1 ≤ r) : ∃ v : Fin n, 1 ≤ (E.filter (fun e => v ∈ e)).card ∧ (E.filter (fun e => v ∈ e)).card ≤ r
simple_graph_pair_stable_outside_general_deficit_obstructionIn LeanGraph Theory & Graph Algorithms

For an outside vertex of a support-maximal maximum packing of a two-edge-stable graph, the following cannot all hold: every active vertex has at least as many triangles as the link has edges, every nonisolated link vertex has degree greater than the packing deficit, and the disjointness graph of link edges has a sufficiently large matching.

theorem simple_graph_pair_stable_outside_general_deficit_obstruction (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hsupport : ∀ Q : Finset (Finset (Fin n)), (∀ t ∈ Q, G.IsNClique 3 t) → (Q : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1) → Q.card = P.card → (Q.biUnion id).card ≤ (P.biUnion id).card) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (x : Fin n) (hx : x ∉ P.biUnion id) (hactive : ∃ t : Finset (Fin n), G.IsNClique 3 t ∧ x ∈ t) (E : Finset (Sym2 (Fin n))) (hE : E = G.edgeFinset.filter (fun e => ∀ v ∈ e, G.Adj x v)) (r : ℕ) (hr : E.card + r = P.card) (hlocal : ∀ y : Fin n, (∃ t : Finset (Fin n), G.IsNClique 3 t ∧ y ∈ t) → E.card ≤ (((Finset.univ : Finset (Finset (Fin n))).filter (fun t => G.IsNClique 3 t ∧ y ∈ t)).card)) (hdeg : ∀ v : Fin n, (E.filter (fun e => v ∈ e)).card = 0 ∨ r < (E.filter (fun e => v ∈ e)).card) (hmatching : ∃ M : Finset (Finset (Sym2 (Fin n))), 2 ≤ M.card ∧ r + 1 ≤ M.card ∧ (∀ p ∈ M, p.card = 2 ∧ p ⊆ E ∧ (∀ e ∈ p, ∀ f ∈ p, e ≠ f → Disjoint e.toFinset f.toFinset)) ∧ (M : Set (Finset (Sym2 (Fin n)))).Pairwise Disjoint) : False
simple_graph_pair_stable_outside_general_deficit_private_tip_obstructionIn LeanGraph Theory & Graph Algorithms

The arbitrary-deficit outside-support obstruction needs the triangle-count lower bound only for private tips of packing triangles that own a link edge.

theorem simple_graph_pair_stable_outside_general_deficit_private_tip_obstruction (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hsupport : ∀ Q : Finset (Finset (Fin n)), (∀ t ∈ Q, G.IsNClique 3 t) → (Q : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1) → Q.card = P.card → (Q.biUnion id).card ≤ (P.biUnion id).card) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (x : Fin n) (hx : x ∉ P.biUnion id) (hactive : ∃ t : Finset (Fin n), G.IsNClique 3 t ∧ x ∈ t) (E : Finset (Sym2 (Fin n))) (hE : E = G.edgeFinset.filter (fun e => ∀ v ∈ e, G.Adj x v)) (r : ℕ) (hr : E.card + r = P.card) (hlocal : ∀ t ∈ P, ∀ c ∈ t, (∀ q ∈ P, q ≠ t → c ∉ q) → (∃ u ∈ t, ∃ v ∈ t, u ≠ v ∧ c ≠ u ∧ c ≠ v ∧ s(u,v) ∈ E) → E.card ≤ (((Finset.univ : Finset (Finset (Fin n))).filter (fun z => G.IsNClique 3 z ∧ c ∈ z)).card)) (hdeg : ∀ v : Fin n, (E.filter (fun e => v ∈ e)).card = 0 ∨ r < (E.filter (fun e => v ∈ e)).card) (hmatching : ∃ M : Finset (Finset (Sym2 (Fin n))), 2 ≤ M.card ∧ r + 1 ≤ M.card ∧ (∀ p ∈ M, p.card = 2 ∧ p ⊆ E ∧ (∀ e ∈ p, ∀ f ∈ p, e ≠ f → Disjoint e.toFinset f.toFinset)) ∧ (M : Set (Finset (Sym2 (Fin n)))).Pairwise Disjoint) : False
simple_graph_pair_stable_outside_link_has_nonuniversal_private_tipIn LeanGraph Theory & Graph Algorithms

If the disjointness graph of an outside link has a matching of size at least the packing deficit (and at least one), some private tip of a link-edge owner misses a link vertex.

theorem simple_graph_pair_stable_outside_link_has_nonuniversal_private_tip (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hsupport : ∀ Q : Finset (Finset (Fin n)), (∀ t ∈ Q, G.IsNClique 3 t) → (Q : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1) → Q.card = P.card → (Q.biUnion id).card ≤ (P.biUnion id).card) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (x : Fin n) (hx : x ∉ P.biUnion id) (hactive : ∃ t : Finset (Fin n), G.IsNClique 3 t ∧ x ∈ t) (E : Finset (Sym2 (Fin n))) (hE : E = G.edgeFinset.filter (fun e => ∀ v ∈ e, G.Adj x v)) (r : ℕ) (hr : E.card + r = P.card) (hmatching : ∃ M : Finset (Finset (Sym2 (Fin n))), 1 ≤ M.card ∧ r ≤ M.card ∧ (∀ p ∈ M, p.card = 2 ∧ p ⊆ E ∧ (∀ e ∈ p, ∀ f ∈ p, e ≠ f → Disjoint e.toFinset f.toFinset)) ∧ (M : Set (Finset (Sym2 (Fin n)))).Pairwise Disjoint) : ∃ t ∈ P, ∃ c ∈ t, (∀ q ∈ P, q ≠ t → c ∉ q) ∧ (∃ u ∈ t, ∃ v ∈ t, u ≠ v ∧ c ≠ u ∧ c ≠ v ∧ s(u,v) ∈ E) ∧ ∃ z : Fin n, (∃ e ∈ E, z ∈ e) ∧ ¬ G.Adj c z
simple_graph_pair_stable_outside_link_support_boundIn LeanGraph Theory & Graph Algorithms

For a support-maximal maximum triangle packing in a two-edge-stable graph, an active outside vertex in m triangles and a packing deficit r yield a support-plus-vertex set of size at most 2m+3r+1.

theorem simple_graph_pair_stable_outside_link_support_bound (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hsupport : ∀ Q : Finset (Finset (Fin n)), (∀ t ∈ Q, G.IsNClique 3 t) → (Q : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1) → Q.card = P.card → (Q.biUnion id).card ≤ (P.biUnion id).card) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (x : Fin n) (hx : x ∉ P.biUnion id) (hactive : ∃ t : Finset (Fin n), G.IsNClique 3 t ∧ x ∈ t) (m r : ℕ) (hm : m = (((Finset.univ : Finset (Finset (Fin n))).filter (fun t => G.IsNClique 3 t ∧ x ∈ t)).card)) (hr : m + r = P.card) : (insert x (P.biUnion id)).card ≤ 2 * m + 3 * r + 1
simple_graph_pair_stable_outside_vertex_link_edge_spoke_exchangeIn LeanGraph Theory & Graph Algorithms

At a vertex outside a maximum packing of a two-edge-stable graph, every link edge yz and every link vertex w admit another link edge meeting yz and avoiding w.

theorem simple_graph_pair_stable_outside_vertex_link_edge_spoke_exchange (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (x : Fin n) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (hx : x ∉ P.biUnion id) (y z w : Fin n) (hy : G.Adj x y) (hz : G.Adj x z) (hyz : G.Adj y z) (hw : G.Adj x w) : ∃ u v, G.Adj x u ∧ G.Adj x v ∧ G.Adj u v ∧ (u = y ∨ u = z ∨ v = y ∨ v = z) ∧ u ≠ w ∧ v ≠ w ∧ s(u,v) ≠ s(y,z)
simple_graph_pair_stable_outside_vertex_link_not_four_cycleIn LeanGraph Theory & Graph Algorithms

The link of an active outside vertex of a two-edge-stable maximum triangle packing cannot be exactly a four-cycle.

theorem simple_graph_pair_stable_outside_vertex_link_not_four_cycle (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (x : Fin n) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (hx : x ∉ P.biUnion id) (a b c d : Fin n) (hdist : ({a,b,c,d} : Finset (Fin n)).card = 4) : ((P.biUnion finite_vertex_set_edge_encoding).filter (fun e => ∀ v ∈ e, G.Adj x v)) ≠ ({s(a,b),s(b,c),s(c,d),s(d,a)} : Finset (Sym2 (Fin n)))
simple_graph_pair_stable_outside_vertex_spans_five_packing_edgesIn LeanGraph Theory & Graph Algorithms

In a two-edge-stable graph, every triangle-active vertex outside a maximum packing spans at least five edges of that packing.

theorem simple_graph_pair_stable_outside_vertex_spans_five_packing_edges (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (x : Fin n) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (hx : x ∉ P.biUnion id) (hactive : ∃ t : Finset (Fin n), G.IsNClique 3 t ∧ x ∈ t) : 5 ≤ ((P.biUnion finite_vertex_set_edge_encoding).filter (fun e => ∀ v ∈ e, G.Adj x v)).card
simple_graph_pair_stable_outside_vertex_spans_three_packing_edgesIn LeanGraph Theory & Graph Algorithms

In a graph whose triangle packing number survives every two-edge deletion, any triangle-active vertex outside a maximum packing spans at least three different edges of that packing.

theorem simple_graph_pair_stable_outside_vertex_spans_three_packing_edges (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (x : Fin n) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (hx : x ∉ P.biUnion id) (hactive : ∃ t : Finset (Fin n), G.IsNClique 3 t ∧ x ∈ t) : 3 ≤ ((P.biUnion finite_vertex_set_edge_encoding).filter (fun e => ∀ v ∈ e, G.Adj x v)).card
simple_graph_pair_stable_packing_le_five_active_vertices_le_three_nuIn LeanGraph Theory & Graph Algorithms

A two-edge-stable graph whose triangle-packing number is at most five has at most three times that number of triangle-active vertices.

theorem simple_graph_pair_stable_packing_le_five_active_vertices_le_three_nu (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (hfive : simple_graph_triangle_packing_number G ≤ 5) : (((Finset.univ : Finset (Finset (Fin n))).filter (G.IsNClique 3)).biUnion id).card ≤ 3 * simple_graph_triangle_packing_number G
simple_graph_pair_stable_private_k4_anchor_neighbor_not_pendantIn LeanGraph Theory & Graph Algorithms

In a two-edge-stable graph, suppose a maximum packing contains abc, a and b are private to it, and abcx is a four-clique whose x-spokes are unused by the packing. If a packed triangle q contains x and an a-neighbor other than x, then q has a vertex other than x that also belongs to another packed triangle.

theorem simple_graph_pair_stable_private_k4_anchor_neighbor_not_pendant (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (a b c x : Fin n) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (hp : ({a,b,c} : Finset (Fin n)) ∈ P) (hk4 : G.IsNClique 4 ({a,b,c,x} : Finset (Fin n))) (hprivate : ∀ q ∈ P, q ≠ ({a,b,c} : Finset (Fin n)) → a ∉ q ∧ b ∉ q) (hfree : ∀ v ∈ ({a,b,c} : Finset (Fin n)), s(x,v) ∉ P.biUnion finite_vertex_set_edge_encoding) : ∀ q ∈ P, x ∈ q → (∃ y ∈ q, y ≠ x ∧ G.Adj a y) → ∃ z ∈ q, z ≠ x ∧ ∃ r ∈ P, r ≠ q ∧ z ∈ r
simple_graph_pair_stable_private_k4_core_stabilizer_not_transitiveIn LeanGraph Theory & Graph Algorithms

A two-edge-stable maximum packing with a four-clique face abc, two private vertices a,b and unused anchor spokes has an additional common neighbor y of a and the anchor x. The vertex y is outside the orbit of c under every core edge-preserving permutation fixing a, b and x. In particular the stabilizer of x in the graph induced outside a,b is not transitive on its neighbors.

theorem simple_graph_pair_stable_private_k4_core_stabilizer_not_transitive (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (a b c x : Fin n) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (hp : ({a,b,c} : Finset (Fin n)) ∈ P) (hk4 : G.IsNClique 4 ({a,b,c,x} : Finset (Fin n))) (hprivate : ∀ q ∈ P, q ≠ ({a,b,c} : Finset (Fin n)) → a ∉ q ∧ b ∉ q) (hfree : ∀ v ∈ ({a,b,c} : Finset (Fin n)), s(x,v) ∉ P.biUnion finite_vertex_set_edge_encoding) : ∃ y : Fin n, y ∉ ({a,b,c,x} : Finset (Fin n)) ∧ G.Adj a y ∧ G.Adj x y ∧ ∀ σ : Equiv.Perm (Fin n), σ a = a → σ b = b → σ x = x → σ c = y → ¬ (∀ u v : Fin n, u ≠ a → u ≠ b → v ≠ a → v ≠ b → G.Adj u v → G.Adj (σ u) (σ v))
simple_graph_pair_stable_saturated_outside_has_low_triangle_private_tipIn LeanGraph Theory & Graph Algorithms

In a two-edge-stable graph, if an active vertex outside a support-maximal maximum packing lies in at least as many triangles as the packing size, then some packed triangle has a private vertex lying in fewer triangles than the packing size.

theorem simple_graph_pair_stable_saturated_outside_has_low_triangle_private_tip (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hsupport : ∀ Q : Finset (Finset (Fin n)), (∀ t ∈ Q, G.IsNClique 3 t) → (Q : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1) → Q.card = P.card → (Q.biUnion id).card ≤ (P.biUnion id).card) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (x : Fin n) (hx : x ∉ P.biUnion id) (hactive : ∃ t : Finset (Fin n), G.IsNClique 3 t ∧ x ∈ t) (hsaturated : P.card ≤ (((Finset.univ : Finset (Finset (Fin n))).filter (fun t => G.IsNClique 3 t ∧ x ∈ t)).card)) : ∃ t ∈ P, ∃ c ∈ t, (∀ q ∈ P, q ≠ t → c ∉ q) ∧ (((Finset.univ : Finset (Finset (Fin n))).filter (fun u => G.IsNClique 3 u ∧ c ∈ u)).card) < P.card
simple_graph_pair_stable_sunflower_packing_at_most_one_forced_edgeIn LeanGraph Theory & Graph Algorithms

In a pair-stable graph, if every triangle of a maximum packing contains one common vertex, then each packed triangle has at most one singleton-forced edge. In particular, that maximum packing contains no fully forced triangle.

theorem simple_graph_pair_stable_sunflower_packing_at_most_one_forced_edge (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (r : Fin n) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hroot : ∀ t ∈ P, r ∈ t) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) : ∀ p ∈ P, (finite_vertex_set_edge_encoding p ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).card ≤ 1
simple_graph_pair_stable_support_max_high_triangle_count_covers_activeIn LeanGraph Theory & Graph Algorithms

Let P be a support-maximal maximum triangle packing in a two-edge-stable graph. If every triangle-active vertex lies in at least |P| triangles, then P covers every triangle-active vertex.

theorem simple_graph_pair_stable_support_max_high_triangle_count_covers_active (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hsupport : ∀ Q : Finset (Finset (Fin n)), (∀ t ∈ Q, G.IsNClique 3 t) → (Q : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1) → Q.card = P.card → (Q.biUnion id).card ≤ (P.biUnion id).card) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (hlocal : ∀ y : Fin n, (∃ t : Finset (Fin n), G.IsNClique 3 t ∧ y ∈ t) → P.card ≤ (((Finset.univ : Finset (Finset (Fin n))).filter (fun t => G.IsNClique 3 t ∧ y ∈ t)).card)) : ∀ x : Fin n, (∃ t : Finset (Fin n), G.IsNClique 3 t ∧ x ∈ t) → x ∈ P.biUnion id
simple_graph_pair_stable_support_max_near_high_triangle_count_covers_activeIn LeanGraph Theory & Graph Algorithms

If every active vertex of a two-edge-stable graph lies in at least |P|−1 triangles, then a support-maximal maximum packing P covers all active vertices.

theorem simple_graph_pair_stable_support_max_near_high_triangle_count_covers_active (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hsupport : ∀ Q : Finset (Finset (Fin n)), (∀ t ∈ Q, G.IsNClique 3 t) → (Q : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1) → Q.card = P.card → (Q.biUnion id).card ≤ (P.biUnion id).card) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (hlocal : ∀ y : Fin n, (∃ t : Finset (Fin n), G.IsNClique 3 t ∧ y ∈ t) → P.card ≤ (((Finset.univ : Finset (Finset (Fin n))).filter (fun t => G.IsNClique 3 t ∧ y ∈ t)).card) + 1) : ∀ x : Fin n, (∃ t : Finset (Fin n), G.IsNClique 3 t ∧ x ∈ t) → x ∈ P.biUnion id
simple_graph_pair_stable_support_max_outside_face_shared_verticesIn LeanGraph Theory & Graph Algorithms

In a support-maximal maximum packing of a two-edge-stable graph, if an outside vertex x forms triangle abx on packed triangle abc, then c is private, x is nonadjacent to c, and the two retained vertices a and b occur in two distinct other packed triangles.

theorem simple_graph_pair_stable_support_max_outside_face_shared_vertices (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hsupport : ∀ Q : Finset (Finset (Fin n)), (∀ t ∈ Q, G.IsNClique 3 t) → (Q : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1) → Q.card = P.card → (Q.biUnion id).card ≤ (P.biUnion id).card) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (a b c x : Fin n) (hp : ({a,b,c} : Finset (Fin n)) ∈ P) (hx : x ∉ P.biUnion id) (hface : G.IsNClique 3 ({a,b,x} : Finset (Fin n))) : (∀ q ∈ P, q ≠ ({a,b,c} : Finset (Fin n)) → c ∉ q) ∧ ¬ G.Adj x c ∧ ∃ qa ∈ P, ∃ qb ∈ P, qa ≠ ({a,b,c} : Finset (Fin n)) ∧ qb ≠ ({a,b,c} : Finset (Fin n)) ∧ qa ≠ qb ∧ a ∈ qa ∧ b ∈ qb
simple_graph_pair_stable_support_max_outside_five_private_nonneighborsIn LeanGraph Theory & Graph Algorithms

For a support-maximal maximum packing in a two-edge-stable graph, each active vertex outside the packing has at least five distinct nonneighbors in the packing support, each private to one packed triangle.

theorem simple_graph_pair_stable_support_max_outside_five_private_nonneighbors (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hsupport : ∀ Q : Finset (Finset (Fin n)), (∀ t ∈ Q, G.IsNClique 3 t) → (Q : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1) → Q.card = P.card → (Q.biUnion id).card ≤ (P.biUnion id).card) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (x : Fin n) (hx : x ∉ P.biUnion id) (hactive : ∃ t : Finset (Fin n), G.IsNClique 3 t ∧ x ∈ t) : 5 ≤ (((P.biUnion id).filter (fun v => ¬ G.Adj x v ∧ ∃ p ∈ P, v ∈ p ∧ ∀ q ∈ P, q ≠ p → v ∉ q)).card)
simple_graph_pair_stable_support_max_outside_has_triple_incidence_neighborIn LeanGraph Theory & Graph Algorithms

In a two-edge-stable graph, any triangle-active vertex outside a support-maximal maximum packing has a neighbor contained in at least three packed triangles. Thus a support-maximal maximum packing in which every graph vertex belongs to at most two packed triangles covers every active vertex.

theorem simple_graph_pair_stable_support_max_outside_has_triple_incidence_neighbor (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hsupport : ∀ Q : Finset (Finset (Fin n)), (∀ t ∈ Q, G.IsNClique 3 t) → (Q : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1) → Q.card = P.card → (Q.biUnion id).card ≤ (P.biUnion id).card) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (x : Fin n) (hx : x ∉ P.biUnion id) (hactive : ∃ t : Finset (Fin n), G.IsNClique 3 t ∧ x ∈ t) : ∃ v : Fin n, G.Adj x v ∧ 3 ≤ (P.filter (fun t => v ∈ t)).card
simple_graph_pair_stable_support_max_outside_support_deficit_fiveIn LeanGraph Theory & Graph Algorithms

For a support-maximal maximum triangle packing of a two-edge-stable graph, the existence of a triangle-active outside vertex forces at least five units of overlap in the packing: its vertex support has size at most three times its size minus five.

theorem simple_graph_pair_stable_support_max_outside_support_deficit_five (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hsupport : ∀ Q : Finset (Finset (Fin n)), (∀ t ∈ Q, G.IsNClique 3 t) → (Q : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1) → Q.card = P.card → (Q.biUnion id).card ≤ (P.biUnion id).card) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (x : Fin n) (hx : x ∉ P.biUnion id) (hactive : ∃ t : Finset (Fin n), G.IsNClique 3 t ∧ x ∈ t) : (P.biUnion id).card + 5 ≤ 3 * P.card
simple_graph_pair_stable_support_max_packing_number_le_five_covers_activeIn LeanGraph Theory & Graph Algorithms

In a two-edge-stable graph with triangle-packing number at most five, every support-maximal maximum triangle packing covers every triangle-active vertex.

theorem simple_graph_pair_stable_support_max_packing_number_le_five_covers_active (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hsupport : ∀ Q : Finset (Finset (Fin n)), (∀ t ∈ Q, G.IsNClique 3 t) → (Q : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1) → Q.card = P.card → (Q.biUnion id).card ≤ (P.biUnion id).card) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (hfive : simple_graph_triangle_packing_number G ≤ 5) : ∀ x : Fin n, (∃ t : Finset (Fin n), G.IsNClique 3 t ∧ x ∈ t) → x ∈ P.biUnion id
simple_graph_pair_stable_support_max_packing_number_le_six_covers_activeIn LeanGraph Theory & Graph Algorithms

In a two-edge-stable graph with triangle-packing number at most six, every support-maximal maximum triangle packing covers every triangle-active vertex.

theorem simple_graph_pair_stable_support_max_packing_number_le_six_covers_active (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hsupport : ∀ Q : Finset (Finset (Fin n)), (∀ t ∈ Q, G.IsNClique 3 t) → (Q : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1) → Q.card = P.card → (Q.biUnion id).card ≤ (P.biUnion id).card) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (hsix : simple_graph_triangle_packing_number G ≤ 6) : ∀ x : Fin n, (∃ t : Finset (Fin n), G.IsNClique 3 t ∧ x ∈ t) → x ∈ P.biUnion id
simple_graph_pair_stable_support_max_private_vertex_no_outside_triangleIn LeanGraph Theory & Graph Algorithms

For a support-maximal maximum packing in a two-edge-stable graph, a private packed vertex cannot share a graph triangle with any outside vertex. Consequently, after removing triangle-inactive edges, outside vertices have neighbors only among vertices shared by at least two packed triangles.

theorem simple_graph_pair_stable_support_max_private_vertex_no_outside_triangle (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hsupport : ∀ Q : Finset (Finset (Fin n)), (∀ t ∈ Q, G.IsNClique 3 t) → (Q : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1) → Q.card = P.card → (Q.biUnion id).card ≤ (P.biUnion id).card) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (x v : Fin n) (p : Finset (Fin n)) (hx : x ∉ P.biUnion id) (hp : p ∈ P) (hv : v ∈ p) (hprivate : ∀ q ∈ P, q ≠ p → v ∉ q) : ¬ ∃ t : Finset (Fin n), G.IsNClique 3 t ∧ x ∈ t ∧ v ∈ t
simple_graph_pair_stable_support_max_pseudoforest_covers_active_verticesIn LeanGraph Theory & Graph Algorithms

In a two-edge-stable finite graph, a maximum triangle packing with maximum vertex support covers all triangle-active vertices if the vertex-intersection graph of the packed triangles is a pseudoforest. The hypothesis counts intersecting unordered pairs in every packed subfamily.

theorem simple_graph_pair_stable_support_max_pseudoforest_covers_active_vertices (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hsupport : ∀ Q : Finset (Finset (Fin n)), (∀ t ∈ Q, G.IsNClique 3 t) → (Q : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1) → Q.card = P.card → (Q.biUnion id).card ≤ (P.biUnion id).card) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (hpseudo : ∀ F : Finset (Finset (Fin n)), F ⊆ P → (F.sym2.filter (fun e => ¬ e.IsDiag ∧ ∃ t ∈ F, ∃ u ∈ F, e = s(t,u) ∧ ¬ Disjoint t u)).card ≤ F.card) : ∀ x : Fin n, (∃ t : Finset (Fin n), G.IsNClique 3 t ∧ x ∈ t) → x ∈ P.biUnion id
simple_graph_pair_stable_support_max_separated_pseudoforest_no_outside_linkIn LeanGraph Theory & Graph Algorithms

In a two-edge-stable graph, no vertex outside a support-maximal maximum triangle packing spans an edge of a packed triangle in a vertex-separated pseudoforest subfamily. The pseudoforest condition counts intersecting unordered pairs in every subfamily.

theorem simple_graph_pair_stable_support_max_separated_pseudoforest_no_outside_link (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hsupport : ∀ Q : Finset (Finset (Fin n)), (∀ t ∈ Q, G.IsNClique 3 t) → (Q : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1) → Q.card = P.card → (Q.biUnion id).card ≤ (P.biUnion id).card) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) (F : Finset (Finset (Fin n))) (hFsub : F ⊆ P) (hsep : ∀ t ∈ F, ∀ q ∈ P, q ∉ F → Disjoint t q) (hpseudo : ∀ A : Finset (Finset (Fin n)), A ⊆ F → (A.sym2.filter (fun e => ¬ e.IsDiag ∧ ∃ t ∈ A, ∃ u ∈ A, e = s(t,u) ∧ ¬ Disjoint t u)).card ≤ A.card) : ∀ x : Fin n, x ∉ P.biUnion id → ∀ t ∈ F, ∀ u ∈ t, ∀ v ∈ t, u ≠ v → G.Adj x u → ¬ G.Adj x v
simple_graph_pair_stable_two_disjoint_books_six_vertex_kernelIn LeanGraph Theory & Graph Algorithms

If every triangle of a two-edge-stable finite graph is either inside a set S or has one outside vertex and one of two vertex-disjoint edges of S, at most six outside vertices can be retained so that the induced graph has the same triangle-packing number and remains two-edge-stable.

theorem simple_graph_pair_stable_two_disjoint_books_six_vertex_kernel (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (S : Finset (Fin n)) (a b c d : Fin n) (habcd : ({a,b,c,d} : Finset (Fin n)).card = 4) (hS : ({a,b,c,d} : Finset (Fin n)) ⊆ S) (hclass : ∀ t : Finset (Fin n), G.IsNClique 3 t → t ⊆ S ∨ ∃ w, w ∉ S ∧ (t = {a,b,w} ∨ t = {c,d,w})) (hstable : ∀ e f : Sym2 (Fin n), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) : ∃ U : Finset (Fin n), Disjoint U S ∧ U.card ≤ 6 ∧ let H := G.induce (↑(S ∪ U) : Set (Fin n)); simple_graph_triangle_packing_number H = simple_graph_triangle_packing_number G ∧ ∀ e f : Sym2 {v : Fin n // v ∈ S ∪ U}, e ∈ H.edgeSet → f ∈ H.edgeSet → e ≠ f → simple_graph_triangle_packing_number (H.deleteEdges {e,f}) = simple_graph_triangle_packing_number H
simple_graph_paired_fork_bij_half_independentIn LeanGraph Theory & Graph Algorithms

In a paired-fork graph on m pairs where the fork map i ↦ (w i).1 is bijective, every vertex z can be avoided by an independent set containing at least m vertices (at least half of the vertices).

theorem simple_graph_paired_fork_bij_half_independent
    (m : ℕ) (G : SimpleGraph (Fin m × Fin 2)) (w : Fin m → Fin m × Fin 2)
    (hw : ∀ i, (w i).1 ≠ i)
    (hG : ∀ x y, G.Adj x y ↔
      ∃ i : Fin m, (x.1 = i ∧ y = w i) ∨ (y.1 = i ∧ x = w i))
    (hbij : Function.Bijective (fun i => (w i).1))
    (z : Fin m × Fin 2) :
    ∃ I : Finset (Fin m × Fin 2),
      m ≤ I.card ∧ z ∉ I ∧ G.IsIndepSet (I : Set (Fin m × Fin 2))
simple_graph_paired_fork_half_independent_avoiding_vertexIn LeanGraph Theory & Graph Algorithms

Partition the vertices of a finite graph into pairs and choose one vertex outside each pair. Join each endpoint of a pair to its chosen vertex and add no other edges. For every vertex z, there is an independent set of at least half the vertices that omits z.

theorem simple_graph_paired_fork_half_independent_avoiding_vertex
    (m : ℕ) (G : SimpleGraph (Fin m × Fin 2)) (w : Fin m → Fin m × Fin 2)
    (hw : ∀ i, (w i).1 ≠ i)
    (hG : ∀ x y, G.Adj x y ↔
      ∃ i : Fin m, (x.1 = i ∧ y = w i) ∨ (y.1 = i ∧ x = w i)) :
    ∀ z : Fin m × Fin 2, ∃ I : Finset (Fin m × Fin 2),
      m ≤ I.card ∧ z ∉ I ∧ G.IsIndepSet (I : Set (Fin m × Fin 2))
simple_graph_paired_fork_half_independent_of_non_surjectiveIn LeanGraph Theory & Graph Algorithms

If the fork map i ↦ (w i).1 on m + 1 pairs is not surjective, then for any vertex z there exists an independent set of size at least m + 1 avoiding z, assuming the induction hypothesis for m pairs.

theorem simple_graph_paired_fork_half_independent_of_non_surjective
    (m : ℕ) (G : SimpleGraph (Fin (m + 1) × Fin 2)) (w : Fin (m + 1) → Fin (m + 1) × Fin 2)
    (hw : ∀ i, (w i).1 ≠ i)
    (hG : ∀ x y, G.Adj x y ↔
      ∃ i : Fin (m + 1), (x.1 = i ∧ y = w i) ∨ (y.1 = i ∧ x = w i))
    (hnonsurj : ¬ Function.Surjective (fun i => (w i).1))
    (ih : ∀ (G' : SimpleGraph (Fin m × Fin 2)) (w' : Fin m → Fin m × Fin 2)
      (hw' : ∀ i, (w' i).1 ≠ i)
      (hG' : ∀ x y, G'.Adj x y ↔ ∃ i : Fin m, (x.1 = i ∧ y = w' i) ∨ (y.1 = i ∧ x = w' i))
      (z' : Fin m × Fin 2),
      ∃ I' : Finset (Fin m × Fin 2), m ≤ I'.card ∧ z' ∉ I' ∧ G'.IsIndepSet (I' : Set (Fin m × Fin 2)))
    (z : Fin (m + 1) × Fin 2) :
    ∃ I : Finset (Fin (m + 1) × Fin 2),
      m + 1 ≤ I.card ∧ z ∉ I ∧ G.IsIndepSet (I : Set (Fin (m + 1) × Fin 2))
simple_graph_paired_fork_one_center_extra_half_independentIn LeanGraph Theory & Graph Algorithms

If a paired-fork graph is augmented by edges all incident to one additional vertex, the resulting graph still has an independent set of at least half its vertices.

theorem simple_graph_paired_fork_one_center_extra_half_independent
    (m : ℕ) (G H : SimpleGraph (Fin m × Fin 2)) (w : Fin m → Fin m × Fin 2)
    (z : Fin m × Fin 2) (hw : ∀ i, (w i).1 ≠ i)
    (hH : ∀ x y, H.Adj x y ↔
      ∃ i : Fin m, (x.1 = i ∧ y = w i) ∨ (y.1 = i ∧ x = w i))
    (hG : ∀ x y, G.Adj x y → H.Adj x y ∨ x = z ∨ y = z) :
    ∃ I : Finset (Fin m × Fin 2), m ≤ I.card ∧ G.IsIndepSet (I : Set (Fin m × Fin 2))
simple_graph_pendant_triple_expand_edge_casesIn LeanGraph Theory & Graph Algorithms

Every edge of the pendant-triple expansion is either the image of an old edge different from uv, or one of the seven new edges u-0, 0-1, 1-2, 2-v, 03, 14, 25.

theorem simple_graph_pendant_triple_expand_edge_cases {V : Type*} (G : SimpleGraph V) (u v : V)
    (E : (simple_graph_pendant_triple_expand G u v).edgeSet) :
    (∃ (e0 : G.edgeSet), (e0 : Sym2 V) ≠ s(u, v) ∧
        (E : Sym2 (V ⊕ Fin 6)) = Sym2.map Sum.inl (e0 : Sym2 V)) ∨
      (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inl u, Sum.inr 0) ∨
      (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 0, Sum.inr 1) ∨
      (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 1, Sum.inr 2) ∨
      (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 2, Sum.inl v) ∨
      (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 0, Sum.inr 3) ∨
      (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 1, Sum.inr 4) ∨
      (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 2, Sum.inr 5)
simple_graph_pendant_triple_expand_internal_adjIn LeanGraph Theory & Graph Algorithms

In the pendant-triple expansion the three new internal path vertices have exactly the expected neighbours: 0 is adjacent to u, 1 and 3; 1 is adjacent to 0, 2 and 4; 2 is adjacent to 1, v and 5.

theorem simple_graph_pendant_triple_expand_internal_adj {V : Type*} (G : SimpleGraph V) (u v : V) :
    (∀ p : V ⊕ Fin 6, (simple_graph_pendant_triple_expand G u v).Adj (Sum.inr 0) p ↔
        p = Sum.inl u ∨ p = Sum.inr 1 ∨ p = Sum.inr 3) ∧
      (∀ p : V ⊕ Fin 6, (simple_graph_pendant_triple_expand G u v).Adj (Sum.inr 1) p ↔
        p = Sum.inr 0 ∨ p = Sum.inr 2 ∨ p = Sum.inr 4) ∧
      (∀ p : V ⊕ Fin 6, (simple_graph_pendant_triple_expand G u v).Adj (Sum.inr 2) p ↔
        p = Sum.inr 1 ∨ p = Sum.inl v ∨ p = Sum.inr 5)
simple_graph_pendant_triple_extend_paletteIn LeanGraph Theory & Graph Algorithms

At a cubic edge uv with edge colouring c, the two further incident edges ua1, ua2 at u and vb1, vb2 at v exist, and with x = c(uv) the colours along the boundary are pairwise distinct, so the subdivide-three palette contract applies and yields colours y, z, A, B, C; moreover if uv is a rich edge then the four boundary colours are pairwise distinct.

theorem simple_graph_pendant_triple_extend_palette {V : Type*}
    [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (u v : V) (huv : G.Adj u v) (hu : G.degree u = 3) (hv : G.degree v = 3)
    (c : G.lineGraph.Coloring (Fin 5)) :
    ∃ (x y z A B C : Fin 5) (a1 a2 b1 b2 : V)
      (h1 : G.Adj u a1) (h2 : G.Adj u a2) (h3 : G.Adj v b1) (h4 : G.Adj v b2),
      x = c ⟨s(u, v), huv⟩ ∧
      G.neighborFinset u = {v, a1, a2} ∧ G.neighborFinset v = {u, b1, b2} ∧
      [x, y, A].Pairwise (· ≠ ·) ∧ [y, z, B].Pairwise (· ≠ ·) ∧
        [z, x, C].Pairwise (· ≠ ·) ∧
      (([c ⟨s(u, a1), h1⟩, c ⟨s(u, a2), h2⟩, y, A].Pairwise (· ≠ ·)) ∨
        ([x, A, z, B].Pairwise (· ≠ ·))) ∧
      (([x, A, z, B].Pairwise (· ≠ ·)) ∨ ([y, B, x, C].Pairwise (· ≠ ·))) ∧
      (([y, B, x, C].Pairwise (· ≠ ·)) ∨
        ([z, C, c ⟨s(v, b1), h3⟩, c ⟨s(v, b2), h4⟩].Pairwise (· ≠ ·))) ∧
      ([c ⟨s(u, a1), h1⟩, c ⟨s(u, a2), h2⟩, c ⟨s(v, b1), h3⟩,
          c ⟨s(v, b2), h4⟩].Pairwise (· ≠ ·) →
        [c ⟨s(u, a1), h1⟩, c ⟨s(u, a2), h2⟩, y, A].Pairwise (· ≠ ·) ∧
          [z, C, c ⟨s(v, b1), h3⟩, c ⟨s(v, b2), h4⟩].Pairwise (· ≠ ·)) ∧
      (simple_graph_edge_is_rich G c ⟨s(u, v), huv⟩ →
        [c ⟨s(u, a1), h1⟩, c ⟨s(u, a2), h2⟩, c ⟨s(v, b1), h3⟩,
          c ⟨s(v, b2), h4⟩].Pairwise (· ≠ ·))
simple_graph_pendant_triple_image_neighborsIn LeanGraph Theory & Graph Algorithms

Let r be an old edge different from uv, and let E be a copy of r in the expansion. Then every edge of the expansion adjacent to E is either the copy of an old edge adjacent to r (and different from uv), or one of the two new end edges u-0 and 2-v (the first only if u lies in r, the second only if v lies in r).

theorem simple_graph_pendant_triple_image_neighbors {V : Type*} (G : SimpleGraph V) (u v : V)
    (r : G.edgeSet) (hr : (r : Sym2 V) ≠ s(u, v))
    (E F : (simple_graph_pendant_triple_expand G u v).edgeSet)
    (hE : (E : Sym2 (V ⊕ Fin 6)) = Sym2.map Sum.inl (r : Sym2 V))
    (hF : (simple_graph_pendant_triple_expand G u v).lineGraph.Adj E F) :
    (∃ (g : G.edgeSet), (g : Sym2 V) ≠ s(u, v) ∧ G.lineGraph.Adj r g ∧
        (F : Sym2 (V ⊕ Fin 6)) = Sym2.map Sum.inl (g : Sym2 V)) ∨
      ((F : Sym2 (V ⊕ Fin 6)) = s(Sum.inl u, Sum.inr 0) ∧ u ∈ (r : Set V)) ∨
      ((F : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 2, Sum.inl v) ∧ v ∈ (r : Set V))
simple_graph_pendant_triple_new_edge_richIn LeanGraph Theory & Graph Algorithms

In the recoloured pendant-triple expansion the three pendant edges 03, 14, 25 are rich. Moreover the path edge u-0 is rich whenever the colours of ua1, ua2, 0-1, 03 are pairwise distinct, the path edge 0-1 whenever those of u-0, 03, 1-2, 14 are, the path edge 1-2 whenever those of 0-1, 14, 2-v, 25 are, and the path edge 2-v whenever those of 1-2, 25, vb1, vb2 are.

theorem simple_graph_pendant_triple_new_edge_rich {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (u v : V) (c : G.lineGraph.Coloring (Fin 5)) (f : Sym2 V → Fin 5)
    (hf : ∀ (e : Sym2 V) (h : e ∈ G.edgeSet), f e = c ⟨e, h⟩)
    (a1 a2 b1 b2 : V) (h1 : G.Adj u a1) (h2 : G.Adj u a2) (h3 : G.Adj v b1) (h4 : G.Adj v b2)
    (y z A B C x : Fin 5) (hnu : G.neighborFinset u = {v, a1, a2})
    (hnv : G.neighborFinset v = {u, b1, b2})
    (hxyA : [x, y, A].Pairwise (· ≠ ·)) (hyzB : [y, z, B].Pairwise (· ≠ ·))
    (hzxC : [z, x, C].Pairwise (· ≠ ·)) :
    (∀ E : (simple_graph_pendant_triple_expand G u v).edgeSet,
        (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 0, Sum.inr 3) →
        simple_graph_edge_is_rich (simple_graph_pendant_triple_expand G u v)
          (simple_graph_pendant_triple_recolor G u v f x y z A B C) E) ∧
      (∀ E : (simple_graph_pendant_triple_expand G u v).edgeSet,
        (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 1, Sum.inr 4) →
        simple_graph_edge_is_rich (simple_graph_pendant_triple_expand G u v)
          (simple_graph_pendant_triple_recolor G u v f x y z A B C) E) ∧
      (∀ E : (simple_graph_pendant_triple_expand G u v).edgeSet,
        (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 2, Sum.inr 5) →
        simple_graph_edge_is_rich (simple_graph_pendant_triple_expand G u v)
          (simple_graph_pendant_triple_recolor G u v f x y z A B C) E) ∧
      (∀ E : (simple_graph_pendant_triple_expand G u v).edgeSet,
        (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inl u, Sum.inr 0) →
        [c ⟨s(u, a1), h1⟩, c ⟨s(u, a2), h2⟩, y, A].Pairwise (· ≠ ·) →
        simple_graph_edge_is_rich (simple_graph_pendant_triple_expand G u v)
          (simple_graph_pendant_triple_recolor G u v f x y z A B C) E) ∧
      (∀ E : (simple_graph_pendant_triple_expand G u v).edgeSet,
        (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 0, Sum.inr 1) →
        [x, A, z, B].Pairwise (· ≠ ·) →
        simple_graph_edge_is_rich (simple_graph_pendant_triple_expand G u v)
          (simple_graph_pendant_triple_recolor G u v f x y z A B C) E) ∧
      (∀ E : (simple_graph_pendant_triple_expand G u v).edgeSet,
        (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 1, Sum.inr 2) →
        [y, B, x, C].Pairwise (· ≠ ·) →
        simple_graph_edge_is_rich (simple_graph_pendant_triple_expand G u v)
          (simple_graph_pendant_triple_recolor G u v f x y z A B C) E) ∧
      (∀ E : (simple_graph_pendant_triple_expand G u v).edgeSet,
        (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 2, Sum.inl v) →
        [z, C, c ⟨s(v, b1), h3⟩, c ⟨s(v, b2), h4⟩].Pairwise (· ≠ ·) →
        simple_graph_edge_is_rich (simple_graph_pendant_triple_expand G u v)
          (simple_graph_pendant_triple_recolor G u v f x y z A B C) E)
simple_graph_pendant_triple_new_edge_rich_neighborIn LeanGraph Theory & Graph Algorithms

In the recoloured triple expansion each of the seven new edges u-0, 0-1, 1-2, 2-v, 03, 14, 25 is adjacent to a rich edge.

theorem simple_graph_pendant_triple_new_edge_rich_neighbor {V : Type*}
    [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (u v : V) (c : G.lineGraph.Coloring (Fin 5)) (f : Sym2 V → Fin 5)
    (hf : ∀ (e : Sym2 V) (h : e ∈ G.edgeSet), f e = c ⟨e, h⟩)
    (a1 a2 b1 b2 : V) (h1 : G.Adj u a1) (h2 : G.Adj u a2) (h3 : G.Adj v b1) (h4 : G.Adj v b2)
    (y z A B C x : Fin 5) (hnu : G.neighborFinset u = {v, a1, a2})
    (hnv : G.neighborFinset v = {u, b1, b2})
    (hxyA : [x, y, A].Pairwise (· ≠ ·)) (hyzB : [y, z, B].Pairwise (· ≠ ·))
    (hzxC : [z, x, C].Pairwise (· ≠ ·))
    (h4a : ([c ⟨s(u, a1), h1⟩, c ⟨s(u, a2), h2⟩, y, A].Pairwise (· ≠ ·)) ∨
      ([x, A, z, B].Pairwise (· ≠ ·)))
    (h5a : ([x, A, z, B].Pairwise (· ≠ ·)) ∨ ([y, B, x, C].Pairwise (· ≠ ·)))
    (h6a : ([y, B, x, C].Pairwise (· ≠ ·)) ∨
      ([z, C, c ⟨s(v, b1), h3⟩, c ⟨s(v, b2), h4⟩].Pairwise (· ≠ ·))) :
    ∀ E : (simple_graph_pendant_triple_expand G u v).edgeSet,
      ((E : Sym2 (V ⊕ Fin 6)) = s(Sum.inl u, Sum.inr 0) ∨
          (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 0, Sum.inr 1) ∨
          (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 1, Sum.inr 2) ∨
          (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 2, Sum.inl v) ∨
          (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 0, Sum.inr 3) ∨
          (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 1, Sum.inr 4) ∨
          (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 2, Sum.inr 5)) →
        ∃ F : (simple_graph_pendant_triple_expand G u v).edgeSet,
          (simple_graph_pendant_triple_expand G u v).lineGraph.Adj E F ∧
            simple_graph_edge_is_rich (simple_graph_pendant_triple_expand G u v)
              (simple_graph_pendant_triple_recolor G u v f x y z A B C) F
simple_graph_pendant_triple_old_edge_richIn LeanGraph Theory & Graph Algorithms

If r is an old edge different from uv which is rich for c, then its copy in the pendant-triple expansion is rich for the recolouring.

theorem simple_graph_pendant_triple_old_edge_rich {V : Type*} (G : SimpleGraph V) (u v : V)
    (huv : G.Adj u v) (c : G.lineGraph.Coloring (Fin 5)) (f : Sym2 V → Fin 5)
    (hf : ∀ (e : Sym2 V) (h : e ∈ G.edgeSet), f e = c ⟨e, h⟩)
    (x y z A B C : Fin 5) (hx : x = c ⟨s(u, v), huv⟩)
    (r : G.edgeSet) (hr : (r : Sym2 V) ≠ s(u, v))
    (E : (simple_graph_pendant_triple_expand G u v).edgeSet)
    (hE : (E : Sym2 (V ⊕ Fin 6)) = Sym2.map Sum.inl (r : Sym2 V))
    (hrich : simple_graph_edge_is_rich G c r) :
    simple_graph_edge_is_rich (simple_graph_pendant_triple_expand G u v)
      (simple_graph_pendant_triple_recolor G u v f x y z A B C) E
simple_graph_pendant_triple_recolor_applyIn LeanGraph Theory & Graph Algorithms

Computation rules for the recolouring of the triple expansion: an edge which is the image of an unordered pair e0 keeps the colour f e0, and the seven new edges u-0, 0-1, 1-2, 2-v, 03, 14, 25 receive x, y, z, x, A, B, C respectively.

theorem simple_graph_pendant_triple_recolor_apply {V : Type*} (G : SimpleGraph V) (u v : V)
    (f : Sym2 V → Fin 5) (x y z A B C : Fin 5) :
    (∀ (E : (simple_graph_pendant_triple_expand G u v).edgeSet) (e0 : Sym2 V),
        (E : Sym2 (V ⊕ Fin 6)) = Sym2.map Sum.inl e0 →
        simple_graph_pendant_triple_recolor G u v f x y z A B C E = f e0) ∧
      (∀ (E : (simple_graph_pendant_triple_expand G u v).edgeSet),
        (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inl u, Sum.inr 0) →
        simple_graph_pendant_triple_recolor G u v f x y z A B C E = x) ∧
      (∀ (E : (simple_graph_pendant_triple_expand G u v).edgeSet),
        (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 0, Sum.inr 1) →
        simple_graph_pendant_triple_recolor G u v f x y z A B C E = y) ∧
      (∀ (E : (simple_graph_pendant_triple_expand G u v).edgeSet),
        (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 1, Sum.inr 2) →
        simple_graph_pendant_triple_recolor G u v f x y z A B C E = z) ∧
      (∀ (E : (simple_graph_pendant_triple_expand G u v).edgeSet),
        (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 2, Sum.inl v) →
        simple_graph_pendant_triple_recolor G u v f x y z A B C E = x) ∧
      (∀ (E : (simple_graph_pendant_triple_expand G u v).edgeSet),
        (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 0, Sum.inr 3) →
        simple_graph_pendant_triple_recolor G u v f x y z A B C E = A) ∧
      (∀ (E : (simple_graph_pendant_triple_expand G u v).edgeSet),
        (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 1, Sum.inr 4) →
        simple_graph_pendant_triple_recolor G u v f x y z A B C E = B) ∧
      (∀ (E : (simple_graph_pendant_triple_expand G u v).edgeSet),
        (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 2, Sum.inr 5) →
        simple_graph_pendant_triple_recolor G u v f x y z A B C E = C)
simple_graph_pendant_triple_recolor_richIn LeanGraph Theory & Graph Algorithms

Given a rich-neighbor 5-edge-colouring of G and the palette data at the cubic edge uv (the two other neighbours at each end, the colours x,y,z,A,B,C and the three disjunctions of the subdivide-three contract, plus the fact that richness of uv forces the four boundary colours to be distinct), the recolouring of the pendant-triple expansion is again a rich-neighbor 5-edge-colouring.

theorem simple_graph_pendant_triple_recolor_rich {V : Type*}
    [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (u v : V) (huv : G.Adj u v) (c : G.lineGraph.Coloring (Fin 5))
    (hc : simple_graph_is_rich_neighbor_coloring G c) (f : Sym2 V → Fin 5)
    (hf : ∀ (e : Sym2 V) (h : e ∈ G.edgeSet), f e = c ⟨e, h⟩)
    (a1 a2 b1 b2 : V) (h1 : G.Adj u a1) (h2 : G.Adj u a2) (h3 : G.Adj v b1) (h4 : G.Adj v b2)
    (y z A B C x : Fin 5) (hx : x = c ⟨s(u, v), huv⟩)
    (hnu : G.neighborFinset u = {v, a1, a2}) (hnv : G.neighborFinset v = {u, b1, b2})
    (hxyA : [x, y, A].Pairwise (· ≠ ·)) (hyzB : [y, z, B].Pairwise (· ≠ ·))
    (hzxC : [z, x, C].Pairwise (· ≠ ·))
    (h4a : ([c ⟨s(u, a1), h1⟩, c ⟨s(u, a2), h2⟩, y, A].Pairwise (· ≠ ·)) ∨
      ([x, A, z, B].Pairwise (· ≠ ·)))
    (h5a : ([x, A, z, B].Pairwise (· ≠ ·)) ∨ ([y, B, x, C].Pairwise (· ≠ ·)))
    (h6a : ([y, B, x, C].Pairwise (· ≠ ·)) ∨
      ([z, C, c ⟨s(v, b1), h3⟩, c ⟨s(v, b2), h4⟩].Pairwise (· ≠ ·)))
    (h7a : [c ⟨s(u, a1), h1⟩, c ⟨s(u, a2), h2⟩, c ⟨s(v, b1), h3⟩,
        c ⟨s(v, b2), h4⟩].Pairwise (· ≠ ·) →
      [c ⟨s(u, a1), h1⟩, c ⟨s(u, a2), h2⟩, y, A].Pairwise (· ≠ ·) ∧
        [z, C, c ⟨s(v, b1), h3⟩, c ⟨s(v, b2), h4⟩].Pairwise (· ≠ ·))
    (h7b : simple_graph_edge_is_rich G c ⟨s(u, v), huv⟩ →
      [c ⟨s(u, a1), h1⟩, c ⟨s(u, a2), h2⟩, c ⟨s(v, b1), h3⟩,
        c ⟨s(v, b2), h4⟩].Pairwise (· ≠ ·)) :
    ∃ cc : (simple_graph_pendant_triple_expand G u v).lineGraph.Coloring (Fin 5),
      simple_graph_is_rich_neighbor_coloring (simple_graph_pendant_triple_expand G u v) cc
simple_graph_pendant_triple_recolor_validIn LeanGraph Theory & Graph Algorithms

The recolouring of the pendant-triple expansion is a proper edge colouring: two distinct edges sharing a vertex never get the same colour, provided the two end edges get the colour x of uv and the three path and pendant colour triples x,y,A; y,z,B; z,x,C are pairwise distinct.

theorem simple_graph_pendant_triple_recolor_valid {V : Type*} (G : SimpleGraph V) (u v : V)
    (huv : G.Adj u v) (c : G.lineGraph.Coloring (Fin 5)) (f : Sym2 V → Fin 5)
    (hf : ∀ (e : Sym2 V) (h : e ∈ G.edgeSet), f e = c ⟨e, h⟩)
    (y z A B C x : Fin 5) (hx : x = c ⟨s(u, v), huv⟩)
    (hxyA : [x, y, A].Pairwise (· ≠ ·)) (hyzB : [y, z, B].Pairwise (· ≠ ·))
    (hzxC : [z, x, C].Pairwise (· ≠ ·)) :
    ∀ E F : (simple_graph_pendant_triple_expand G u v).edgeSet,
      (simple_graph_pendant_triple_expand G u v).lineGraph.Adj E F →
        simple_graph_pendant_triple_recolor G u v f x y z A B C E ≠
          simple_graph_pendant_triple_recolor G u v f x y z A B C F
simple_graph_power_eq_top_of_diam_leIn LeanGraph Theory & Graph Algorithms

For any finite connected graph G and any d ≥ diam(G), the d-th graph power G^d is the complete graph ⊤.

theorem simple_graph_power_eq_top_of_diam_le {V : Type*} [Fintype V] (G : SimpleGraph V) (hconn : G.Connected) (d : ℕ) (hd : G.diam ≤ d) : simple_graph_power G d = ⊤
simple_graph_power_is_well_covered_of_diam_leIn LeanGraph Theory & Graph Algorithms

For any finite connected graph G and any d ≥ diam(G), the power G^d is well-covered (since it is the complete graph).

theorem simple_graph_power_is_well_covered_of_diam_le {V : Type*} [Fintype V] (G : SimpleGraph V) (hconn : G.Connected) (d : ℕ) (hd : G.diam ≤ d) : simple_graph_is_well_covered (simple_graph_power G d)
simple_graph_power_two_opNorm_le_sqIn LeanGraph Theory & Graph Algorithms

The operator norm of the continuous linear map induced by the adjacency matrix of the square of G is at most the square of the operator norm of the continuous linear map induced by the adjacency matrix of G.

attribute [local instance] Classical.propDecidable in
theorem simple_graph_power_two_opNorm_le_sq {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) :
    ‖Matrix.toEuclideanCLM (𝕜 := ℝ) (n := V) ((simple_graph_power G 2).adjMatrix ℝ)‖ ≤
      ‖Matrix.toEuclideanCLM (𝕜 := ℝ) (n := V) (G.adjMatrix ℝ)‖ ^ 2
simple_graph_prism_adj_iffIn LeanGraph Theory & Graph Algorithms

In the prism graph P₁ □ C_n two vertices (a,i) and (b,j) are adjacent exactly when either they sit in the same fibre of the cycle and their fibres differ (a ≠ b, i = j), or they sit in the same layer and are adjacent in C_n (a = b and C_n-adjacent).

theorem simple_graph_prism_adj_iff (n : ℕ) (u v : Fin 2 × Fin n) :
    (simple_graph_prism n).Adj u v ↔
      (u.1 ≠ v.1 ∧ u.2 = v.2) ∨ (u.1 = v.1 ∧ (SimpleGraph.cycleGraph n).Adj u.2 v.2)
simple_graph_prism_even_leap_group_card_geIn LeanGraph Theory & Graph Algorithms

For even n ≥ 3 the leap group of P₁ □ C_n has at least 2·(n!)² elements.

theorem simple_graph_prism_even_leap_group_card_ge (n : ℕ) (h3 : 3 ≤ n) (he : Even n) :
    2 * n.factorial ^ 2 ≤ Nat.card (simple_graph_leap_group (simple_graph_prism n))
simple_graph_prism_even_leap_group_card_leIn LeanGraph Theory & Graph Algorithms

For even n ≥ 3 the leap group of P₁ □ C_n has at most 2·(n!)² elements.

theorem simple_graph_prism_even_leap_group_card_le (n : ℕ) (h3 : 3 ≤ n) (he : Even n) :
    Nat.card (simple_graph_leap_group (simple_graph_prism n)) ≤ 2 * n.factorial ^ 2
simple_graph_prism_even_leap_group_contains_swapsIn LeanGraph Theory & Graph Algorithms

For even n ≥ 3, the transposition of two vertices of P₁ □ C_n lying in the same parity class (a + i ≡ b + j mod 2) belongs to the leap group.

theorem simple_graph_prism_even_leap_group_contains_swaps (n : ℕ) (h3 : 3 ≤ n) (he : Even n)
    (u v : Fin 2 × Fin n) (huv : u ≠ v)
    (hpar : (u.1.val + u.2.val) % 2 = (v.1.val + v.2.val) % 2) :
    Equiv.swap u v ∈ simple_graph_leap_group (simple_graph_prism n)
simple_graph_prism_odd_leap_group_eq_topIn LeanGraph Theory & Graph Algorithms

For odd n ≥ 3, the leap group of the prism graph P₁ □ C_n is the full symmetric group on its 2n vertices.

theorem simple_graph_prism_odd_leap_group_eq_top (n : ℕ) (h3 : 3 ≤ n) (ho : Odd n) :
    simple_graph_leap_group (simple_graph_prism n) = ⊤
simple_graph_prism_parity_class_cardIn LeanGraph Theory & Graph Algorithms

For n > 0, the two classes {(a,i) : a + i ≡ b mod 2} of the prism each have n elements: i ↦ (b mod 2, i) is a bijection onto the b-class.

theorem simple_graph_prism_parity_class_card (n : ℕ) (hn : 0 < n) (b : ℕ) :
    (Finset.univ.filter (fun v : Fin 2 × Fin n => (v.1.val + v.2.val) % 2 = b % 2)).card = n
simple_graph_prism_vertical_flip_memIn LeanGraph Theory & Graph Algorithms

Swapping the two layers of the prism P₁ □ C_n, (a,i) ↦ (1-a,i), is a hop, hence an element of the leap group.

theorem simple_graph_prism_vertical_flip_mem (n : ℕ) :
    Equiv.prodCongr (Equiv.swap (0 : Fin 2) 1) (Equiv.refl (Fin n)) ∈
      simple_graph_leap_group (simple_graph_prism n)
simple_graph_q_delete_vertexIn LeanGraph Theory & Graph Algorithms

For every vertex $v$ of a finite simple graph $H$, the invariant $q(H) = C_H(-1)$ satisfies the recurrence $q(H) = q(H-v) - q(H[N_H(v)])$.

open scoped Classical in
theorem simple_graph_q_delete_vertex {V : Type*} [Fintype V] (H : SimpleGraph V) (v : V) :
    simple_graph_q H =
      simple_graph_q (H.induce ({v}ᶜ : Set V)) -
        simple_graph_q (H.induce (H.neighborSet v))
simple_graph_q_eq_zero_of_stepIn LeanGraph Theory & Graph Algorithms

Let G be a finite simple graph and v a vertex of G. If q vanishes on the open neighbourhood graph of v and on the vertex deletion G - v, then q(G) = 0.

open scoped Classical in
theorem simple_graph_q_eq_zero_of_step (V : Type) [Fintype V] (G : SimpleGraph V) (v : V)
    (h_elig : simple_graph_q (G.induce (G.neighborSet v)) = 0)
    (h_rem : simple_graph_q (G.induce {w : V | w ≠ v}) = 0) :
    simple_graph_q G = 0
simple_graph_q_foldIn LeanGraph Theory & Graph Algorithms

If a vertex $v$ is dominated by another vertex in a finite simple graph $H$, then $q(H) = q(H-v)$.

open scoped Classical in
theorem simple_graph_q_fold {V : Type*} [Fintype V] (H : SimpleGraph V) (v : V)
    (hdom : simple_graph_vertex_dominated H v) :
    simple_graph_q H = simple_graph_q (H.induce ({v}ᶜ : Set V))
simple_graph_q_subsingletonIn LeanGraph Theory & Graph Algorithms

Every simple graph on a nonempty subsingleton vertex type has vanishing alternating clique count: q(G) = 0.

theorem simple_graph_q_subsingleton (V : Type*) [Fintype V] [Subsingleton V] [Nonempty V] (G : SimpleGraph V) :
    simple_graph_q G = 0
simple_graph_reconfiguration_diam_ge_hammingIn LeanGraph Theory & Graph Algorithms

If the reconfiguration graph of k-colourings of a finite graph G has finite diameter, then any two k-colourings differ in at most diam many vertices.

theorem simple_graph_reconfiguration_diam_ge_hamming {V : Type*} [Fintype V] {G : SimpleGraph V} {k : ℕ} (a b : G.Coloring (Fin k)) (h : (simple_graph_reconfiguration_graph G k).ediam ≠ ⊤) : (Finset.univ.filter (fun v => a v ≠ b v)).card ≤ (simple_graph_reconfiguration_graph G k).diam
simple_graph_reconfiguration_edist_ge_hammingIn LeanGraph Theory & Graph Algorithms

For two k-colourings of a finite graph G, the number of vertices where they differ, viewed in ℕ∞, is at most their extended distance in the reconfiguration graph.

theorem simple_graph_reconfiguration_edist_ge_hamming {V : Type*} [Fintype V] {G : SimpleGraph V} {k : ℕ} (a b : G.Coloring (Fin k)) : ((Finset.univ.filter (fun v => a v ≠ b v)).card : ℕ∞) ≤ (simple_graph_reconfiguration_graph G k).edist a b
simple_graph_reconfiguration_graph_adj_iffIn LeanGraph Theory & Graph Algorithms

Two proper k-colourings of G are adjacent in the k-recolour graph exactly when they differ on a unique vertex.

theorem simple_graph_reconfiguration_graph_adj_iff {V : Type*} (G : SimpleGraph V) (k : ℕ) (c₁ c₂ : G.Coloring (Fin k)) : (simple_graph_reconfiguration_graph G k).Adj c₁ c₂ ↔ ∃! v, c₁ v ≠ c₂ v
simple_graph_reconfiguration_walk_hamming_leIn LeanGraph Theory & Graph Algorithms

If two k-colourings of a finite graph G are joined by a walk of length L in the reconfiguration graph, then they differ in at most L vertices.

theorem simple_graph_reconfiguration_walk_hamming_le {V : Type*} [Fintype V] {G : SimpleGraph V} {k : ℕ} : ∀ (a b : G.Coloring (Fin k)) (w : (simple_graph_reconfiguration_graph G k).Walk a b), (Finset.univ.filter (fun v => a v ≠ b v)).card ≤ w.length
simple_graph_rich_neighbor_five_pendant_triple_extendIn LeanGraph Theory & Graph Algorithms

If uv has both endpoints of degree three and G admits a rich-neighbor five-edge-coloring, replacing uv by a four-edge path with one pendant leaf at each new internal vertex preserves existence of such a coloring.

theorem simple_graph_rich_neighbor_five_pendant_triple_extend {V : Type*}
    [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (u v : V) (huv : G.Adj u v) (hu : G.degree u = 3) (hv : G.degree v = 3)
    (hc : ∃ c : G.lineGraph.Coloring (Fin 5), simple_graph_is_rich_neighbor_coloring G c) :
    ∃ c : (simple_graph_pendant_triple_expand G u v).lineGraph.Coloring (Fin 5),
      simple_graph_is_rich_neighbor_coloring (simple_graph_pendant_triple_expand G u v) c
simple_graph_sibling_leaves_is_fortIn LeanGraph Theory & Graph Algorithms

Two leaves sharing a common neighbor in any finite simple graph form a fort of size two.

theorem simple_graph_sibling_leaves_is_fort {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] {a b c : V} (hab : a ≠ b) (ha : G.degree a = 1) (hb : G.degree b = 1) (hac : G.Adj a c) (hbc : G.Adj b c) : simple_graph_is_fort G ({a, b} : Set V)
simple_graph_single_edge_stable_outside_active_vertices_le_packingIn LeanGraph Theory & Graph Algorithms

In a single-edge-stable finite graph, the number of triangle-active vertices outside any maximum triangle packing is at most the packing size.

theorem simple_graph_single_edge_stable_outside_active_vertices_le_packing (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hstable : ∀ e : Sym2 (Fin n), e ∈ G.edgeSet → simple_graph_triangle_packing_number (G.deleteEdges {e}) = simple_graph_triangle_packing_number G) : ((((Finset.univ : Finset (Finset (Fin n))).filter (G.IsNClique 3)).biUnion id) \ P.biUnion id).card ≤ P.card
simple_graph_single_edge_stable_triangle_active_vertices_linear_boundIn LeanGraph Theory & Graph Algorithms

If every single-edge deletion of a finite simple graph preserves its triangle packing number k, at most 4k vertices lie in triangles.

theorem simple_graph_single_edge_stable_triangle_active_vertices_linear_bound (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (hstable : ∀ e : Sym2 (Fin n), e ∈ G.edgeSet → simple_graph_triangle_packing_number (G.deleteEdges {e}) = simple_graph_triangle_packing_number G) : (((Finset.univ : Finset (Finset (Fin n))).filter (G.IsNClique 3)).biUnion id).card ≤ 4 * simple_graph_triangle_packing_number G
simple_graph_single_edge_stable_triangle_active_vertices_quadratic_boundIn LeanGraph Theory & Graph Algorithms

If a finite simple graph has triangle packing number k at least two and every single-edge deletion preserves k, at most k(k+2) vertices lie in triangles.

theorem simple_graph_single_edge_stable_triangle_active_vertices_quadratic_bound (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (hstable : ∀ e : Sym2 (Fin n), e ∈ G.edgeSet → simple_graph_triangle_packing_number (G.deleteEdges {e}) = simple_graph_triangle_packing_number G) (hk : 2 ≤ simple_graph_triangle_packing_number G) : (((Finset.univ : Finset (Finset (Fin n))).filter (G.IsNClique 3)).biUnion id).card ≤ simple_graph_triangle_packing_number G * (simple_graph_triangle_packing_number G + 2)
simple_graph_singleton_witness_disjoint_eraseIn LeanGraph Theory & Graph Algorithms

If a triangle t has exactly one edge in the packing union and meets p in an edge, then its edges are disjoint from all triangles in P \ {p}.

theorem simple_graph_singleton_witness_disjoint_erase {V : Type*} [DecidableEq V] (P : Finset (Finset V)) (p : Finset V) (hp : p ∈ P) (t : Finset V) (hsingle : (finite_vertex_set_edge_encoding t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1) (hmeets : ¬ Disjoint (finite_vertex_set_edge_encoding t) (finite_vertex_set_edge_encoding p)) (hdisj : (P : Set (Finset V)).Pairwise (fun a b => (a ∩ b).card ≤ 1)) : Disjoint (finite_vertex_set_edge_encoding t) ((P.erase p).biUnion finite_vertex_set_edge_encoding)
simple_graph_spanning_path_of_indepNum_le_vertex_connectivityIn LeanGraph Theory & Graph Algorithms

Chvátal–Erdős, path form: a finite preconnected graph with at least one vertex whose independence number is at most its vertex connectivity has a Hamiltonian (spanning) path.

theorem simple_graph_spanning_path_of_indepNum_le_vertex_connectivity {V : Type*} [Fintype V] [DecidableEq V] [Nonempty V] (G : SimpleGraph V) (hconn : G.Preconnected) (hα : G.indepNum ≤ ghz_graph_vertex_connectivity G) : ∃ a b : V, ∃ p : G.Walk a b, p.IsHamiltonian
simple_graph_stable_conflict_independence_apex_edge_countIn LeanGraph Theory & Graph Algorithms

Any family of pairwise edge-disjoint triangles drawn from the 19 triangles has at most six members, and if it has six then one of its members is a leaf triangle, and it covers every apex edge: for every v = 1,...,10 some member contains the edge {0,v}.

theorem simple_graph_stable_conflict_independence_apex_edge_count
    (Q : Finset (Finset (Sym2 (Fin 11))))
    (hQ : Q ⊆ simple_graph_stable_conflict_independence_triangles)
    (hdisj : (Q : Set (Finset (Sym2 (Fin 11)))).Pairwise Disjoint) :
    Q.card ≤ 6 ∧
      (Q.card = 6 → ∃ t ∈ Q,
        (t ∩ simple_graph_stable_conflict_independence_apex_edges).card = 0) ∧
      (Q.card = 6 → ∀ v : Fin 11, v ≠ 0 →
        ∃ t ∈ Q, Sym2.mk (0 : Fin 11) v ∈ t)
simple_graph_stable_conflict_independence_conflict_clauseIn LeanGraph Theory & Graph Algorithms

No five of the ten unmarked apex edges form a conflict-free set: every 5-element set I of apex edges meets one of the 19 triangles in exactly two edges, in a triangle that is not contained in the 15-edge packing support.

theorem simple_graph_stable_conflict_independence_conflict_clause
    (I : Finset (Sym2 (Fin 11)))
    (hI : I ⊆ simple_graph_stable_conflict_independence_apex_edges)
    (hcard : I.card = 5) :
    ∃ t ∈ simple_graph_stable_conflict_independence_triangles,
      (t ∩ I).card = 2 ∧
        ¬ t ⊆ simple_graph_stable_conflict_independence_packing_support
simple_graph_stable_conflict_independence_counterexampleIn LeanGraph Theory & Graph Algorithms

There is an 11-vertex graph with a maximum packing of five edge-disjoint triangles, each graph edge omitted by some maximum packing, and a marking of one edge per packed triangle including every singleton-forced edge, such that the unmarked conflict graph has no independent set of size five.

theorem simple_graph_stable_conflict_independence_counterexample :
    ∃ (G : SimpleGraph (Fin 11))
      (P : Finset (Finset (Sym2 (Fin 11)))) (M : Finset (Sym2 (Fin 11))),
      let F := simple_graph_triangle_edge_family G
      let U := P.biUnion id
      P ⊆ F ∧ P.card = 5 ∧
      (P : Set (Finset (Sym2 (Fin 11)))).Pairwise Disjoint ∧
      (∀ Q : Finset (Finset (Sym2 (Fin 11))),
        Q ⊆ F → (Q : Set (Finset (Sym2 (Fin 11)))).Pairwise Disjoint → Q.card ≤ 5) ∧
      (∀ e ∈ G.edgeSet, ∃ Q : Finset (Finset (Sym2 (Fin 11))),
        Q ⊆ F ∧ Q.card = 5 ∧
        (Q : Set (Finset (Sym2 (Fin 11)))).Pairwise Disjoint ∧ e ∉ Q.biUnion id) ∧
      M ⊆ U ∧ (∀ p ∈ P, (M ∩ p).card = 1) ∧
      (((F.filter (fun t => (t ∩ U).card = 1)).biUnion id) ∩ U) ⊆ M ∧
      (∀ I : Finset (Sym2 (Fin 11)), I ⊆ U \ M → I.card = 5 →
        ∃ t ∈ F, (t ∩ I).card = 2 ∧ ¬ t ⊆ U)
simple_graph_stable_conflict_independence_packing_boundIn LeanGraph Theory & Graph Algorithms

Maximum-packing bound: any family of pairwise edge-disjoint triangles drawn from the 19 triangles of the counterexample graph has at most five members, so the five-triangle packing is maximum and the packing number of the graph is exactly five.

theorem simple_graph_stable_conflict_independence_packing_bound
    (Q : Finset (Finset (Sym2 (Fin 11))))
    (hQ : Q ⊆ simple_graph_stable_conflict_independence_triangles)
    (hdisj : (Q : Set (Finset (Sym2 (Fin 11)))).Pairwise Disjoint) :
    Q.card ≤ 5
simple_graph_stable_conflict_independence_triangle_local_factsIn LeanGraph Theory & Graph Algorithms

Local facts about the 19 triangles: each triangle uses at most two apex edges; the only triangles using no apex edge are the two leaves {1,3,7} and {1,5,7}, which share the edge {1,7}; a triangle containing {0,1} is one of {0,1,3}, {0,1,5}, {0,1,7} (so it contains the matching base edge and the matching apex edge); a triangle containing {0,7} is one of {0,1,7}, {0,3,7}, {0,5,7}; and there are exactly ten apex edges.

theorem simple_graph_stable_conflict_independence_triangle_local_facts :
    (∀ t ∈ simple_graph_stable_conflict_independence_triangles,
      (t ∩ simple_graph_stable_conflict_independence_apex_edges).card ≤ 2) ∧
    (∀ t ∈ simple_graph_stable_conflict_independence_triangles,
      ((t ∩ simple_graph_stable_conflict_independence_apex_edges).card = 0 ↔
        t = simple_graph_stable_conflict_independence_leaf_one ∨
        t = simple_graph_stable_conflict_independence_leaf_two)) ∧
    (∀ t ∈ simple_graph_stable_conflict_independence_triangles,
      Sym2.mk (0 : Fin 11) 1 ∈ t →
        ((Sym2.mk (1 : Fin 11) 3 ∈ t ∧ Sym2.mk (0 : Fin 11) 3 ∈ t) ∨
         (Sym2.mk (1 : Fin 11) 5 ∈ t ∧ Sym2.mk (0 : Fin 11) 5 ∈ t) ∨
         (Sym2.mk (1 : Fin 11) 7 ∈ t ∧ Sym2.mk (0 : Fin 11) 7 ∈ t))) ∧
    (∀ t ∈ simple_graph_stable_conflict_independence_triangles,
      Sym2.mk (0 : Fin 11) 7 ∈ t →
        ((Sym2.mk (1 : Fin 11) 7 ∈ t ∧ Sym2.mk (0 : Fin 11) 1 ∈ t) ∨
         (Sym2.mk (3 : Fin 11) 7 ∈ t ∧ Sym2.mk (0 : Fin 11) 3 ∈ t) ∨
         (Sym2.mk (5 : Fin 11) 7 ∈ t ∧ Sym2.mk (0 : Fin 11) 5 ∈ t))) ∧
    ¬ Disjoint simple_graph_stable_conflict_independence_leaf_one
        simple_graph_stable_conflict_independence_leaf_two ∧
    (simple_graph_stable_conflict_independence_apex_edges).card = 10
simple_graph_stable_connected_triangle_family_every_packing_fully_forced_counterexampleIn LeanGraph Theory & Graph Algorithms

There is a 6-connected 6-regular 20-vertex graph with 60 edges, triangle codegrees two or three, packing number twelve, stable edge deletion, and a connected triangle-intersection graph, such that every maximum packing contains a fully singleton-forced triangle.

theorem simple_graph_stable_connected_triangle_family_every_packing_fully_forced_counterexample :
    ∃ (G : SimpleGraph (Fin 20)) (E : Finset (Sym2 (Fin 20))),
      let F := simple_graph_triangle_edge_family G
      (↑E : Set (Sym2 (Fin 20))) = G.edgeSet ∧ E.card = 60 ∧
      (∀ v : Fin 20, ∃ N : Finset (Fin 20), N.card = 6 ∧ ∀ w, G.Adj v w ↔ w ∈ N) ∧
      (∀ Q : Finset (Finset (Sym2 (Fin 20))), Q ⊆ F →
        (Q : Set (Finset (Sym2 (Fin 20)))).Pairwise Disjoint → Q.card ≤ 12) ∧
      (∀ e ∈ G.edgeSet, ∃ Q : Finset (Finset (Sym2 (Fin 20))),
        Q ⊆ F ∧ Q.card = 12 ∧
        (Q : Set (Finset (Sym2 (Fin 20)))).Pairwise Disjoint ∧ e ∉ Q.biUnion id) ∧
      (∀ e ∈ G.edgeSet, 2 ≤ (F.filter (fun t => e ∈ t)).card ∧
        (F.filter (fun t => e ∈ t)).card ≤ 3) ∧
      (∀ R : Finset (Fin 20), R.card ≤ 5 → (G.induce {v | v ∉ R}).Connected) ∧
      (∀ a ∈ F, ∀ b ∈ F, Relation.ReflTransGen
        (fun x y : Finset (Sym2 (Fin 20)) => x ∈ F ∧ y ∈ F ∧ ¬ Disjoint x y) a b) ∧
      ∀ P : Finset (Finset (Sym2 (Fin 20))),
        P ⊆ F → P.card = 12 →
        (P : Set (Finset (Sym2 (Fin 20)))).Pairwise Disjoint →
        ∃ p ∈ P, p ⊆ ((F.filter (fun t => (t ∩ P.biUnion id).card = 1)).biUnion id)
simple_graph_stable_forced_anchor_max_incidence_counterexampleIn LeanGraph Theory & Graph Algorithms

Even among full-support maximum packings maximizing the sum of squared vertex incidence counts, a two-edge-stable graph can have a fully forced K4 face whose anchor is contained only in unforced packed triangles.

theorem simple_graph_stable_forced_anchor_max_incidence_counterexample : let P : Finset (Finset (Fin 10)) := {{0,1,5},{0,2,3},{2,8,9},{2,6,7},{3,7,8},{5,6,8},{3,6,9},{4,5,9}}; ∃ G : SimpleGraph (Fin 10), (∀ t ∈ P, G.IsNClique 3 t) ∧ (P : Set (Finset (Fin 10))).Pairwise (fun t u => (t ∩ u).card ≤ 1) ∧ P.card = simple_graph_triangle_packing_number G ∧ P.biUnion id = Finset.univ ∧ (∀ Q : Finset (Finset (Fin 10)), (∀ t ∈ Q, G.IsNClique 3 t) → (Q : Set (Finset (Fin 10))).Pairwise (fun t u => (t ∩ u).card ≤ 1) → Q.card = P.card → Q.biUnion id = Finset.univ → (∑ v : Fin 10, ((Q.filter (fun t => v ∈ t)).card)^2) ≤ (∑ v : Fin 10, ((P.filter (fun t => v ∈ t)).card)^2)) ∧ (∀ e f : Sym2 (Fin 10), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) ∧ G.IsNClique 4 ({1,2,8,9} : Finset (Fin 10)) ∧ ({2,8,9} : Finset (Fin 10)) ∈ P ∧ finite_vertex_set_edge_encoding ({2,8,9} : Finset (Fin 10)) ⊆ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id) ∧ (∃ q ∈ P, (1 : Fin 10) ∈ q) ∧ (∀ q ∈ P, (1 : Fin 10) ∈ q → Disjoint (finite_vertex_set_edge_encoding q) (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id))
simple_graph_stable_forced_anchor_three_exchange_barrier_counterexampleIn LeanGraph Theory & Graph Algorithms

In a two-edge-stable graph, a full-support maximum packing maximizing squared incidences can remain bad under every exchange of at most three triangles that preserves full support and does not decrease that score.

theorem simple_graph_stable_forced_anchor_three_exchange_barrier_counterexample : let P : Finset (Finset (Fin 10)) := {{0,2,3},{0,4,5},{1,5,9},{2,6,7},{2,8,9},{3,6,9},{3,7,8},{5,6,8}}; ∃ G : SimpleGraph (Fin 10), (∀ t ∈ P, G.IsNClique 3 t) ∧ (P : Set (Finset (Fin 10))).Pairwise (fun t u => (t ∩ u).card ≤ 1) ∧ P.card = simple_graph_triangle_packing_number G ∧ P.biUnion id = Finset.univ ∧ (∀ Q : Finset (Finset (Fin 10)), (∀ t ∈ Q, G.IsNClique 3 t) → (Q : Set (Finset (Fin 10))).Pairwise (fun t u => (t ∩ u).card ≤ 1) → Q.card = P.card → Q.biUnion id = Finset.univ → (∑ v : Fin 10, ((Q.filter (fun t => v ∈ t)).card)^2) ≤ (∑ v : Fin 10, ((P.filter (fun t => v ∈ t)).card)^2)) ∧ (∀ e f : Sym2 (Fin 10), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) ∧ (∀ Q : Finset (Finset (Fin 10)), (∀ t ∈ Q, G.IsNClique 3 t) → (Q : Set (Finset (Fin 10))).Pairwise (fun t u => (t ∩ u).card ≤ 1) → Q.card = P.card → Q.biUnion id = Finset.univ → (∑ v : Fin 10, ((P.filter (fun t => v ∈ t)).card)^2) ≤ (∑ v : Fin 10, ((Q.filter (fun t => v ∈ t)).card)^2) → (P \ Q).card ≤ 3 → ∃ q ∈ Q, finite_vertex_set_edge_encoding q ⊆ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ Q.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id))
simple_graph_stable_forced_k4_anchor_avoiding_packings_one_clique_one_mixedIn LeanGraph Theory & Graph Algorithms

For a distinct clique edge of {4,5,6,7,8} and a distinct edge leaving the clique, there is a family of eight pairwise edge-disjoint triangles of the witness graph avoiding both edges.

theorem simple_graph_stable_forced_k4_anchor_avoiding_packings_one_clique_one_mixed :
    ∀ e f : Sym2 (Fin 9),
    e ∈ simple_graph_stable_forced_k4_anchor_test_graph.edgeSet →
    f ∈ simple_graph_stable_forced_k4_anchor_test_graph.edgeSet → e ≠ f →
    e ∈ finite_vertex_set_edge_encoding ({4,5,6,7,8} : Finset (Fin 9)) →
    f ∉ finite_vertex_set_edge_encoding ({4,5,6,7,8} : Finset (Fin 9)) →
    ∃ Q : Finset (Finset (Fin 9)),
      (∀ t ∈ Q, simple_graph_stable_forced_k4_anchor_test_graph.IsNClique 3 t) ∧
      (Q : Set (Finset (Fin 9))).Pairwise (fun s t => (s ∩ t).card ≤ 1) ∧
      Q.card = 8 ∧
      ∀ t ∈ Q, e ∉ finite_vertex_set_edge_encoding t ∧ f ∉ finite_vertex_set_edge_encoding t
simple_graph_stable_forced_k4_anchor_avoiding_packings_two_clique_edgesIn LeanGraph Theory & Graph Algorithms

For any two distinct edges of the K5 on {4,5,6,7,8} there is a family of eight pairwise edge-disjoint triangles of the witness graph avoiding both edges.

theorem simple_graph_stable_forced_k4_anchor_avoiding_packings_two_clique_edges :
    ∀ e f : Sym2 (Fin 9),
    e ∈ simple_graph_stable_forced_k4_anchor_test_graph.edgeSet →
    f ∈ simple_graph_stable_forced_k4_anchor_test_graph.edgeSet → e ≠ f →
    e ∈ finite_vertex_set_edge_encoding ({4,5,6,7,8} : Finset (Fin 9)) →
    f ∈ finite_vertex_set_edge_encoding ({4,5,6,7,8} : Finset (Fin 9)) →
    ∃ Q : Finset (Finset (Fin 9)),
      (∀ t ∈ Q, simple_graph_stable_forced_k4_anchor_test_graph.IsNClique 3 t) ∧
      (Q : Set (Finset (Fin 9))).Pairwise (fun s t => (s ∩ t).card ≤ 1) ∧
      Q.card = 8 ∧
      ∀ t ∈ Q, e ∉ finite_vertex_set_edge_encoding t ∧ f ∉ finite_vertex_set_edge_encoding t
simple_graph_stable_forced_k4_anchor_avoiding_packings_two_mixed_edgesIn LeanGraph Theory & Graph Algorithms

For two distinct edges leaving the clique {4,5,6,7,8}, there is a family of eight pairwise edge-disjoint triangles of the witness graph avoiding both edges.

theorem simple_graph_stable_forced_k4_anchor_avoiding_packings_two_mixed_edges :
    ∀ e f : Sym2 (Fin 9),
    e ∈ simple_graph_stable_forced_k4_anchor_test_graph.edgeSet →
    f ∈ simple_graph_stable_forced_k4_anchor_test_graph.edgeSet → e ≠ f →
    e ∉ finite_vertex_set_edge_encoding ({4,5,6,7,8} : Finset (Fin 9)) →
    f ∉ finite_vertex_set_edge_encoding ({4,5,6,7,8} : Finset (Fin 9)) →
    ∃ Q : Finset (Finset (Fin 9)),
      (∀ t ∈ Q, simple_graph_stable_forced_k4_anchor_test_graph.IsNClique 3 t) ∧
      (Q : Set (Finset (Fin 9))).Pairwise (fun s t => (s ∩ t).card ≤ 1) ∧
      Q.card = 8 ∧
      ∀ t ∈ Q, e ∉ finite_vertex_set_edge_encoding t ∧ f ∉ finite_vertex_set_edge_encoding t
simple_graph_stable_forced_k4_anchor_forcingIn LeanGraph Theory & Graph Algorithms

Each of the three edges of {5,7,8} lies in a triangle meeting the packing's edge support in exactly one edge, and every packed triangle containing vertex 1 is edge-disjoint from the union of all such single-hit triangles.

theorem simple_graph_stable_forced_k4_anchor_forcing :
    finite_vertex_set_edge_encoding ({5,7,8} : Finset (Fin 9)) ⊆
      (((simple_graph_triangle_edge_family simple_graph_stable_forced_k4_anchor_test_graph).filter
        (fun t => (t ∩ simple_graph_stable_forced_k4_anchor_pack.biUnion
          finite_vertex_set_edge_encoding).card = 1)).biUnion id) ∧
    (∀ q ∈ simple_graph_stable_forced_k4_anchor_pack, (1 : Fin 9) ∈ q →
      Disjoint (finite_vertex_set_edge_encoding q)
        (((simple_graph_triangle_edge_family simple_graph_stable_forced_k4_anchor_test_graph).filter
          (fun t => (t ∩ simple_graph_stable_forced_k4_anchor_pack.biUnion
            finite_vertex_set_edge_encoding).card = 1)).biUnion id))
simple_graph_stable_forced_k4_anchor_pack_basicIn LeanGraph Theory & Graph Algorithms

The displayed eight triangles are pairwise edge-disjoint triangles of the witness graph, their vertex union is all nine vertices, four of {1,5,7,8} span a clique, {5,7,8} is one of the eight triangles, and the anchor 1 lies in one of them.

theorem simple_graph_stable_forced_k4_anchor_pack_basic :
    (∀ t ∈ simple_graph_stable_forced_k4_anchor_pack, simple_graph_stable_forced_k4_anchor_test_graph.IsNClique 3 t) ∧
    ((simple_graph_stable_forced_k4_anchor_pack : Set (Finset (Fin 9))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) ∧
    simple_graph_stable_forced_k4_anchor_pack.card = 8 ∧
    simple_graph_stable_forced_k4_anchor_pack.biUnion id = Finset.univ ∧
    simple_graph_stable_forced_k4_anchor_test_graph.IsNClique 4 ({1,5,7,8} : Finset (Fin 9)) ∧
    ({5,7,8} : Finset (Fin 9)) ∈ simple_graph_stable_forced_k4_anchor_pack ∧
    (∃ q ∈ simple_graph_stable_forced_k4_anchor_pack, (1 : Fin 9) ∈ q)
simple_graph_stable_forced_k4_anchor_packing_numberIn LeanGraph Theory & Graph Algorithms

The join of K5 on {4,5,6,7,8} with the independent set {0,1,2,3} has triangle packing number 8.

theorem simple_graph_stable_forced_k4_anchor_packing_number : simple_graph_triangle_packing_number simple_graph_stable_forced_k4_anchor_test_graph = 8
simple_graph_stable_forced_k4_anchor_pair_stabilityIn LeanGraph Theory & Graph Algorithms

For any two distinct edges of the witness graph, deleting both leaves triangle packing number 8.

theorem simple_graph_stable_forced_k4_anchor_pair_stability :
    ∀ e f : Sym2 (Fin 9),
    e ∈ simple_graph_stable_forced_k4_anchor_test_graph.edgeSet →
    f ∈ simple_graph_stable_forced_k4_anchor_test_graph.edgeSet → e ≠ f →
    simple_graph_triangle_packing_number
      (simple_graph_stable_forced_k4_anchor_test_graph.deleteEdges {e, f}) =
      simple_graph_triangle_packing_number simple_graph_stable_forced_k4_anchor_test_graph
simple_graph_stable_forced_k4_anchor_unforced_counterexampleIn LeanGraph Theory & Graph Algorithms

There is a two-edge-stable graph and a full-support maximum triangle packing containing a fully singleton-forced packed face with an internal K4 anchor, such that no packed triangle containing that anchor has any singleton-forced edge.

theorem simple_graph_stable_forced_k4_anchor_unforced_counterexample : let P : Finset (Finset (Fin 9)) := {{0,4,5},{3,6,7},{0,6,8},{3,4,8},{1,4,6},{2,4,7},{2,5,6},{5,7,8}}; ∃ G : SimpleGraph (Fin 9), (∀ t ∈ P, G.IsNClique 3 t) ∧ (P : Set (Finset (Fin 9))).Pairwise (fun t u => (t ∩ u).card ≤ 1) ∧ P.card = simple_graph_triangle_packing_number G ∧ P.biUnion id = Finset.univ ∧ (∀ e f : Sym2 (Fin 9), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) ∧ G.IsNClique 4 ({1,5,7,8} : Finset (Fin 9)) ∧ ({5,7,8} : Finset (Fin 9)) ∈ P ∧ finite_vertex_set_edge_encoding ({5,7,8} : Finset (Fin 9)) ⊆ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id) ∧ (∃ q ∈ P, (1 : Fin 9) ∈ q) ∧ (∀ q ∈ P, (1 : Fin 9) ∈ q → Disjoint (finite_vertex_set_edge_encoding q) (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id))
simple_graph_stable_forced_packing_triangle_active_vertices_boundIn LeanGraph Theory & Graph Algorithms

If a finite simple graph has triangle packing number k at least two, every single-edge deletion preserves k, and a maximum packing contains a fully singleton-forced triangle, then at most k²+k+2 vertices lie in triangles.

theorem simple_graph_stable_forced_packing_triangle_active_vertices_bound (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (hstable : ∀ e : Sym2 (Fin n), e ∈ G.edgeSet → simple_graph_triangle_packing_number (G.deleteEdges {e}) = simple_graph_triangle_packing_number G) (hk : 2 ≤ simple_graph_triangle_packing_number G) (P : Finset (Finset (Fin n))) (hcl : ∀ t ∈ P, G.IsNClique 3 t) (hpack : (P : Set (Finset (Fin n))).Pairwise (fun s t => (s ∩ t).card ≤ 1)) (hsize : P.card = simple_graph_triangle_packing_number G) (hforced : ∃ p ∈ P, finite_vertex_set_edge_encoding p ⊆ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ (P.image finite_vertex_set_edge_encoding).biUnion id).card = 1)).biUnion id)) : (((Finset.univ : Finset (Finset (Fin n))).filter (G.IsNClique 3)).biUnion id).card ≤ simple_graph_triangle_packing_number G * simple_graph_triangle_packing_number G + simple_graph_triangle_packing_number G + 2
simple_graph_stable_internal_forced_anchor_active_vertices_boundIn LeanGraph Theory & Graph Algorithms

If every single-edge deletion preserves the maximum triangle packing number k and a maximum packing P contains a triangle abc in a four-clique abcd whose other three edges are unused by P, with d already in P’s vertex union, then at most |V(P)|+k−1 vertices lie in triangles.

open scoped Sym2

theorem simple_graph_stable_internal_forced_anchor_active_vertices_bound (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (hstable : ∀ e : Sym2 (Fin n), e ∈ G.edgeSet → simple_graph_triangle_packing_number (G.deleteEdges {e}) = simple_graph_triangle_packing_number G) (P : Finset (Finset (Fin n))) (hcl : ∀ t ∈ P, G.IsNClique 3 t) (hpack : (P : Set (Finset (Fin n))).Pairwise (fun s t => (s ∩ t).card ≤ 1)) (hsize : P.card = simple_graph_triangle_packing_number G) (a b c d : Fin n) (hp : ({a,b,c} : Finset (Fin n)) ∈ P) (hd : d ∈ P.biUnion id) (hK : G.IsNClique 4 ({a,b,c,d} : Finset (Fin n))) (hfree : ∀ e ∈ ({s(a,d),s(b,d),s(c,d)} : Finset (Sym2 (Fin n))), e ∉ (P.image finite_vertex_set_edge_encoding).biUnion id) : (((Finset.univ : Finset (Finset (Fin n))).filter (G.IsNClique 3)).biUnion id).card + 1 ≤ (P.biUnion id).card + simple_graph_triangle_packing_number G
simple_graph_stable_irreducible_six_chromatic_bipartite_cover_counterexampleIn LeanGraph Theory & Graph Algorithms

There is a six-chromatic 48-vertex 21-connected graph with 543 edges and packing number 67, a vertex of degree 47 and triangle codegrees between three and forty-six, such that every edge is avoidable by a maximum packing, its triangle family remains connected after ignoring any one edge, but every bipartition leaves at least 138 monochromatic edges.

theorem simple_graph_stable_irreducible_six_chromatic_bipartite_cover_counterexample :
    ∃ (G : SimpleGraph (Fin 48)) (E : Finset (Sym2 (Fin 48))),
      let F := simple_graph_triangle_edge_family G
      (↑E : Set (Sym2 (Fin 48))) = G.edgeSet ∧ E.card = 543 ∧
      (¬ G.Colorable 5 ∧ G.Colorable 6) ∧
      (∀ Q : Finset (Finset (Sym2 (Fin 48))), Q ⊆ F →
        (Q : Set (Finset (Sym2 (Fin 48)))).Pairwise Disjoint → Q.card ≤ 67) ∧
      (∀ e ∈ G.edgeSet, ∃ Q : Finset (Finset (Sym2 (Fin 48))),
        Q ⊆ F ∧ Q.card = 67 ∧
        (Q : Set (Finset (Sym2 (Fin 48)))).Pairwise Disjoint ∧ e ∉ Q.biUnion id) ∧
      (∀ e ∈ G.edgeSet, 3 ≤ (F.filter (fun t => e ∈ t)).card ∧
        (F.filter (fun t => e ∈ t)).card ≤ 46) ∧
      (∀ R : Finset (Fin 48), R.card ≤ 20 → (G.induce {v | v ∉ R}).Connected) ∧
      (∃ v : Fin 48, ∃ N : Finset (Fin 48), N.card = 47 ∧ ∀ w ∈ N, G.Adj v w) ∧
      (∀ e ∈ G.edgeSet, ∀ a ∈ F, ∀ b ∈ F, Relation.ReflTransGen
        (fun x y : Finset (Sym2 (Fin 48)) => x ∈ F ∧ y ∈ F ∧
          ¬ Disjoint (x.erase e) (y.erase e)) a b) ∧
      ∀ A : Finset (Fin 48),
        138 ≤ (E.filter (fun e => (∀ v ∈ e, v ∈ A) ∨ (∀ v ∈ e, v ∉ A))).card
simple_graph_stable_maximum_packing_outside_book_cardIn LeanGraph Theory & Graph Algorithms

In a finite simple graph with triangle packing number k at least two, if every single-edge deletion preserves k, then for any maximum packing P and any edge ab of a packed triangle, at most k−1 common neighbors of a and b lie outside the vertex union of P.

theorem simple_graph_stable_maximum_packing_outside_book_card (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (hstable : ∀ e : Sym2 (Fin n), e ∈ G.edgeSet → simple_graph_triangle_packing_number (G.deleteEdges {e}) = simple_graph_triangle_packing_number G) (hk : 2 ≤ simple_graph_triangle_packing_number G) (P : Finset (Finset (Fin n))) (hcl : ∀ t ∈ P, G.IsNClique 3 t) (hpack : (P : Set (Finset (Fin n))).Pairwise (fun s t => (s ∩ t).card ≤ 1)) (hsize : P.card = simple_graph_triangle_packing_number G) (p : Finset (Fin n)) (hp : p ∈ P) (a b : Fin n) (ha : a ∈ p) (hb : b ∈ p) (hab : a ≠ b) : ((Finset.univ : Finset (Fin n)).filter (fun x => x ∉ P.biUnion id ∧ G.Adj a x ∧ G.Adj b x)).card + 1 ≤ simple_graph_triangle_packing_number G
simple_graph_stable_min_two_triangles_odd_conflict_cycle_familyIn LeanGraph Theory & Graph Algorithms

For every odd m at least five there is a graph on 2m+1 vertices with 5m edges, packing number m and covering number m+ceil(m/2), whose every edge is in two to four triangles and is omitted by some maximum triangle packing, which stays connected after deletion of any two vertices, and which has a maximum packing and a forced-respecting marking whose unmarked conflict graph has a cycle of length m.

theorem simple_graph_stable_min_two_triangles_odd_conflict_cycle_family
    (m : ℕ) (hm : 5 ≤ m) (hodd : m % 2 = 1) :
    ∃ (G : SimpleGraph (Fin (2 * m + 1)))
      (E : Finset (Sym2 (Fin (2 * m + 1))))
      (P : Finset (Finset (Sym2 (Fin (2 * m + 1)))))
      (M : Finset (Sym2 (Fin (2 * m + 1)))),
      let F := simple_graph_triangle_edge_family G
      let U := P.biUnion id
      (↑E : Set (Sym2 (Fin (2 * m + 1)))) = G.edgeSet ∧ E.card = 5 * m ∧
      simple_graph_triangle_packing_number G = m ∧
      simple_graph_triangle_cover_number G = m + (m + 1) / 2 ∧
      P ⊆ F ∧ P.card = m ∧
      (P : Set (Finset (Sym2 (Fin (2 * m + 1))))).Pairwise Disjoint ∧
      (∀ e ∈ G.edgeSet, ∃ Q : Finset (Finset (Sym2 (Fin (2 * m + 1)))),
        Q ⊆ F ∧ Q.card = m ∧
        (Q : Set (Finset (Sym2 (Fin (2 * m + 1))))).Pairwise Disjoint ∧ e ∉ Q.biUnion id) ∧
      (∀ e ∈ G.edgeSet, 2 ≤ (F.filter (fun t => e ∈ t)).card ∧
        (F.filter (fun t => e ∈ t)).card ≤ 4) ∧
      (∀ R : Finset (Fin (2 * m + 1)), R.card ≤ 2 → (G.induce {v | v ∉ R}).Connected) ∧
      M ⊆ U ∧ (∀ p ∈ P, (M ∩ p).card = 1) ∧
      (((F.filter (fun t => (t ∩ U).card = 1)).biUnion id) ∩ U) ⊆ M ∧
      ∃ f : Fin m → Sym2 (Fin (2 * m + 1)), Function.Injective f ∧
        (∀ i, f i ∈ U \ M) ∧
        (∀ i : Fin m, ∃ j : Fin m, j.val = (i.val + 1) % m ∧
          ∃ t ∈ F, f i ∈ t ∧ f j ∈ t ∧ ¬ t ⊆ U)
simple_graph_stable_packing_unforced_conflict_odd_cycleIn LeanGraph Theory & Graph Algorithms

A stable seven-vertex graph has a maximum triangle packing and one marked edge per packed triangle, containing every singly forced edge, whose unmarked conflict graph has a five-cycle.

theorem simple_graph_stable_packing_unforced_conflict_odd_cycle :
    ∃ (G : SimpleGraph (Fin 7)) (P : Finset (Finset (Fin 7)))
      (M : Finset (Sym2 (Fin 7))) (a b c d e : Sym2 (Fin 7)),
      simple_graph_triangle_packing_number G = 4 ∧
      (∀ g ∈ G.edgeSet, simple_graph_triangle_packing_number (G.deleteEdges {g}) =
        simple_graph_triangle_packing_number G) ∧
      P.card = 4 ∧ (∀ p ∈ P, G.IsNClique 3 p) ∧
      (P : Set (Finset (Fin 7))).Pairwise (fun x y => (x ∩ y).card ≤ 1) ∧
      M ⊆ (P.image finite_vertex_set_edge_encoding).biUnion id ∧
      (∀ p ∈ P, (finite_vertex_set_edge_encoding p ∩ M).card = 1) ∧
      (∀ t : Finset (Fin 7), G.IsNClique 3 t →
        ∀ g : Sym2 (Fin 7),
          finite_vertex_set_edge_encoding t ∩ ((P.image finite_vertex_set_edge_encoding).biUnion id) = {g} → g ∈ M) ∧
      ({a,b,c,d,e} : Finset (Sym2 (Fin 7))).card = 5 ∧
      (∀ g ∈ ({a,b,c,d,e} : Finset (Sym2 (Fin 7))),
        g ∈ (P.image finite_vertex_set_edge_encoding).biUnion id \ M) ∧
      (∀ q ∈ ({(a,b),(b,c),(c,d),(d,e),(e,a)} : Finset (Sym2 (Fin 7) × Sym2 (Fin 7))),
        ∃ t : Finset (Fin 7), G.IsNClique 3 t ∧
          finite_vertex_set_edge_encoding t ∩ ((P.image finite_vertex_set_edge_encoding).biUnion id) = {q.1,q.2})
simple_graph_stable_point_irreducible_forced_exchange_barrier_counterexampleIn LeanGraph Theory & Graph Algorithms

There is a stable six-connected ten-vertex graph with triangle codegree at least three and no one-point triangle-family split, with a maximum packing from which every packing reachable by single-triangle exchanges has a fully singleton-forced triangle, although another maximum packing has none.

theorem simple_graph_stable_point_irreducible_forced_exchange_barrier_counterexample :
    ∃ (G : SimpleGraph (Fin 10)) (E : Finset (Sym2 (Fin 10)))
      (P Q : Finset (Finset (Sym2 (Fin 10)))),
      let F := simple_graph_triangle_edge_family G
      let Adj := fun A B : Finset (Finset (Sym2 (Fin 10))) =>
        B ⊆ F ∧ B.card = 10 ∧ (B : Set (Finset (Sym2 (Fin 10)))).Pairwise Disjoint ∧
          (A ∩ B).card = 9
      (↑E : Set (Sym2 (Fin 10))) = G.edgeSet ∧ E.card = 35 ∧
      (∀ R : Finset (Fin 10), R.card ≤ 5 → (G.induce {v | v ∉ R}).Connected) ∧
      (∀ e ∈ G.edgeSet, 3 ≤ (F.filter (fun t => e ∈ t)).card) ∧
      (∀ e ∈ G.edgeSet, ∀ a ∈ F, ∀ b ∈ F,
        Relation.ReflTransGen (fun x y : Finset (Sym2 (Fin 10)) =>
          x ∈ F ∧ y ∈ F ∧ ∃ f ∈ x, f ∈ y ∧ f ≠ e) a b) ∧
      (∀ R : Finset (Finset (Sym2 (Fin 10))), R ⊆ F →
        (R : Set (Finset (Sym2 (Fin 10)))).Pairwise Disjoint → R.card ≤ 10) ∧
      (∀ e ∈ G.edgeSet, ∃ R : Finset (Finset (Sym2 (Fin 10))),
        R ⊆ F ∧ R.card = 10 ∧
        (R : Set (Finset (Sym2 (Fin 10)))).Pairwise Disjoint ∧ e ∉ R.biUnion id) ∧
      P ⊆ F ∧ P.card = 10 ∧ (P : Set (Finset (Sym2 (Fin 10)))).Pairwise Disjoint ∧
      (∀ R, Relation.ReflTransGen Adj P R →
        ∃ r ∈ R, r ⊆ ((F.filter (fun t => (t ∩ R.biUnion id).card = 1)).biUnion id)) ∧
      Q ⊆ F ∧ Q.card = 10 ∧ (Q : Set (Finset (Sym2 (Fin 10)))).Pairwise Disjoint ∧
      ∀ q ∈ Q, ¬ q ⊆ ((F.filter (fun t => (t ∩ Q.biUnion id).card = 1)).biUnion id)
simple_graph_stable_point_irreducible_forced_local_minimum_counterexampleIn LeanGraph Theory & Graph Algorithms

There is a three-connected nine-vertex graph with 26 edges, minimum triangle codegree two and no one-point triangle-family split, in which every edge is avoided by a maximum triangle packing, and one maximum seven-packing has a fully singleton-forced triangle that no one-triangle exchange can eliminate, although a different maximum packing has no such triangle.

theorem simple_graph_stable_point_irreducible_forced_local_minimum_counterexample :
    ∃ (G : SimpleGraph (Fin 9)) (E : Finset (Sym2 (Fin 9)))
      (P Q : Finset (Finset (Sym2 (Fin 9)))),
      let F := simple_graph_triangle_edge_family G
      (↑E : Set (Sym2 (Fin 9))) = G.edgeSet ∧ E.card = 26 ∧
      (∀ R : Finset (Fin 9), R.card ≤ 2 → (G.induce {v | v ∉ R}).Connected) ∧
      (∀ e ∈ G.edgeSet, 2 ≤ (F.filter (fun t => e ∈ t)).card) ∧
      (∀ e ∈ G.edgeSet, ∀ a ∈ F, ∀ b ∈ F,
        Relation.ReflTransGen (fun x y : Finset (Sym2 (Fin 9)) =>
          x ∈ F ∧ y ∈ F ∧ ∃ f ∈ x, f ∈ y ∧ f ≠ e) a b) ∧
      (∀ R : Finset (Finset (Sym2 (Fin 9))), R ⊆ F →
        (R : Set (Finset (Sym2 (Fin 9)))).Pairwise Disjoint → R.card ≤ 7) ∧
      (∀ e ∈ G.edgeSet, ∃ R : Finset (Finset (Sym2 (Fin 9))),
        R ⊆ F ∧ R.card = 7 ∧
        (R : Set (Finset (Sym2 (Fin 9)))).Pairwise Disjoint ∧ e ∉ R.biUnion id) ∧
      P ⊆ F ∧ P.card = 7 ∧ (P : Set (Finset (Sym2 (Fin 9)))).Pairwise Disjoint ∧
      (∃ p ∈ P, p ⊆ ((F.filter (fun t => (t ∩ P.biUnion id).card = 1)).biUnion id)) ∧
      (∀ R : Finset (Finset (Sym2 (Fin 9))), R ⊆ F → R.card = 7 →
        (R : Set (Finset (Sym2 (Fin 9)))).Pairwise Disjoint → (P ∩ R).card = 6 →
        ∃ r ∈ R, r ⊆ ((F.filter (fun t => (t ∩ R.biUnion id).card = 1)).biUnion id)) ∧
      Q ⊆ F ∧ Q.card = 7 ∧ (Q : Set (Finset (Sym2 (Fin 9)))).Pairwise Disjoint ∧
      ∀ q ∈ Q, ¬ q ⊆ ((F.filter (fun t => (t ∩ Q.biUnion id).card = 1)).biUnion id)
simple_graph_stable_point_irreducible_forced_local_minimum_counterexample_codegreeIn LeanGraph Theory & Graph Algorithms

Every edge of the witness graph lies in at least two triangles.

theorem simple_graph_stable_point_irreducible_forced_local_minimum_counterexample_codegree : ∀ e ∈ simple_graph_stable_point_irreducible_forced_local_minimum_counterexample_graph.edgeSet, 2 ≤ ((simple_graph_triangle_edge_family simple_graph_stable_point_irreducible_forced_local_minimum_counterexample_graph).filter (fun t => e ∈ t)).card
simple_graph_stable_point_irreducible_forced_local_minimum_counterexample_familyIn LeanGraph Theory & Graph Algorithms

The triangle edge family of the witness graph is exactly the listed 35 three-edge sets.

theorem simple_graph_stable_point_irreducible_forced_local_minimum_counterexample_family : simple_graph_triangle_edge_family simple_graph_stable_point_irreducible_forced_local_minimum_counterexample_graph = simple_graph_stable_point_irreducible_forced_local_minimum_counterexample_triangles
simple_graph_stable_point_irreducible_forced_local_minimum_counterexample_packing_P_exchangeIn LeanGraph Theory & Graph Algorithms

Every maximum seven-packing that differs from P in exactly one triangle still has a fully singleton-forced triangle.

theorem simple_graph_stable_point_irreducible_forced_local_minimum_counterexample_packing_P_exchange : let F := simple_graph_triangle_edge_family simple_graph_stable_point_irreducible_forced_local_minimum_counterexample_graph; let P := simple_graph_stable_point_irreducible_forced_local_minimum_counterexample_packing_P; ∀ R : Finset (Finset (Sym2 (Fin 9))), R ⊆ F → R.card = 7 → (R : Set (Finset (Sym2 (Fin 9)))).Pairwise Disjoint → (P ∩ R).card = 6 → ∃ r ∈ R, r ⊆ ((F.filter (fun t => (t ∩ R.biUnion id).card = 1)).biUnion id)
simple_graph_stable_point_irreducible_forced_local_minimum_counterexample_packing_P_okIn LeanGraph Theory & Graph Algorithms

P is a maximum seven-triangle packing and contains a fully singleton-forced triangle, namely 236.

theorem simple_graph_stable_point_irreducible_forced_local_minimum_counterexample_packing_P_ok : let F := simple_graph_triangle_edge_family simple_graph_stable_point_irreducible_forced_local_minimum_counterexample_graph; let P := simple_graph_stable_point_irreducible_forced_local_minimum_counterexample_packing_P; P ⊆ F ∧ P.card = 7 ∧ (P : Set (Finset (Sym2 (Fin 9)))).Pairwise Disjoint ∧ (∃ p ∈ P, p ⊆ ((F.filter (fun t => (t ∩ P.biUnion id).card = 1)).biUnion id))
simple_graph_stable_point_irreducible_forced_local_minimum_counterexample_packing_Q_okIn LeanGraph Theory & Graph Algorithms

Q is a maximum seven-triangle packing in which no triangle is fully forced.

theorem simple_graph_stable_point_irreducible_forced_local_minimum_counterexample_packing_Q_ok : let F := simple_graph_triangle_edge_family simple_graph_stable_point_irreducible_forced_local_minimum_counterexample_graph; let Q := simple_graph_stable_point_irreducible_forced_local_minimum_counterexample_packing_Q; Q ⊆ F ∧ Q.card = 7 ∧ (Q : Set (Finset (Sym2 (Fin 9)))).Pairwise Disjoint ∧ ∀ q ∈ Q, ¬ q ⊆ ((F.filter (fun t => (t ∩ Q.biUnion id).card = 1)).biUnion id)
simple_graph_subgraphs_inclusion_exclusionIn LeanGraph Theory & Graph Algorithms

For any two subgraphs of a finite graph on n vertices with equal vertex cardinality, the number of vertices in their intersection is at least 2L - n.

theorem simple_graph_subgraphs_inclusion_exclusion {V : Type*} [Fintype V] (G : SimpleGraph V) (C D : G.Subgraph) (h_eq : C.verts.ncard = D.verts.ncard) : 2 * (C.verts.ncard : ℤ) - (Fintype.card V : ℤ) ≤ ((C.verts ∩ D.verts).ncard : ℤ)
simple_graph_sum_degrees_subsetIn LeanGraph Theory & Graph Algorithms

The sum of degrees of vertices in a subset F equals twice the number of edges in G[F] plus the number of edges between F and Fᶜ.

theorem simple_graph_sum_degrees_subset {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (F : Finset V) :
    ∑ v ∈ F, G.degree v = 2 * (G.induce (F : Set V)).edgeFinset.card +
      ∑ u ∈ Fᶜ, (F.filter (fun v => G.Adj u v)).card
simple_graph_sunflower_forced_edge_is_petal_baseIn LeanGraph Theory & Graph Algorithms

A forced packed edge avoiding the root is the base edge (petal minus root) of some packed petal.

theorem simple_graph_sunflower_forced_edge_is_petal_base (n : ℕ) (G : SimpleGraph (Fin n)) (P : Finset (Finset (Fin n))) (r : Fin n) (F : Finset (Sym2 (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hroot : ∀ t ∈ P, r ∈ t) (hFsub : ∀ e ∈ F, e ∈ P.biUnion finite_vertex_set_edge_encoding) (hFr : ∀ e ∈ F, r ∉ e.toFinset) : ∀ e ∈ F, ∃ p ∈ P, e.toFinset = p.erase r
simple_graph_sunflower_forced_set_eq_petal_basesIn LeanGraph Theory & Graph Algorithms

A packed edge is forced (and avoids the root) if and only if it is the base edge, petal minus root, of a retained petal of Q.

theorem simple_graph_sunflower_forced_set_eq_petal_bases (n : ℕ) (G : SimpleGraph (Fin n)) (P Q : Finset (Finset (Fin n))) (r : Fin n) (F : Finset (Sym2 (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hroot : ∀ t ∈ P, r ∈ t) (hF : F = ((P.biUnion finite_vertex_set_edge_encoding ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).filter (fun e => r ∉ e.toFinset))) (hQ : Q = P.filter (fun p => ∃ e ∈ F, e ∈ finite_vertex_set_edge_encoding p)) : ∀ e : Sym2 (Fin n), e ∈ F ↔ ∃ q ∈ Q, e.toFinset = q.erase r
simple_graph_sunflower_kernel_forced_set_subsetIn LeanGraph Theory & Graph Algorithms

Every retained packed edge that is forced again inside the kernel graph is one of the forced bases, i.e. lies in F.

theorem simple_graph_sunflower_kernel_forced_set_subset (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P Q : Finset (Finset (Fin n))) (r : Fin n) (F : Finset (Sym2 (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hroot : ∀ t ∈ P, r ∈ t) (hgood : ∀ p ∈ P, (finite_vertex_set_edge_encoding p ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).card ≤ 1) (hF : F = ((P.biUnion finite_vertex_set_edge_encoding ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).filter (fun e => r ∉ e.toFinset))) (hQ : Q = P.filter (fun p => ∃ e ∈ F, e ∈ finite_vertex_set_edge_encoding p)) : (Q.biUnion finite_vertex_set_edge_encoding ∩ (((simple_graph_triangle_edge_family (simple_graph_sunflower_packing_kernel_graph n G P r Q)).filter (fun t => (t ∩ Q.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)) ⊆ F
simple_graph_sunflower_kernel_forced_set_supersetIn LeanGraph Theory & Graph Algorithms

Each forced base edge is a retained packed edge and is forced again inside the kernel graph.

theorem simple_graph_sunflower_kernel_forced_set_superset (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P Q : Finset (Finset (Fin n))) (r : Fin n) (F : Finset (Sym2 (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hroot : ∀ t ∈ P, r ∈ t) (hgood : ∀ p ∈ P, (finite_vertex_set_edge_encoding p ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).card ≤ 1) (hF : F = ((P.biUnion finite_vertex_set_edge_encoding ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).filter (fun e => r ∉ e.toFinset))) (hQ : Q = P.filter (fun p => ∃ e ∈ F, e ∈ finite_vertex_set_edge_encoding p)) : F ⊆ (Q.biUnion finite_vertex_set_edge_encoding ∩ (((simple_graph_triangle_edge_family (simple_graph_sunflower_packing_kernel_graph n G P r Q)).filter (fun t => (t ∩ Q.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id))
simple_graph_sunflower_kernel_graph_agree_on_supportIn LeanGraph Theory & Graph Algorithms

On the endpoints of the petals of Q, the kernel graph has exactly the edges of G.

theorem simple_graph_sunflower_kernel_graph_agree_on_support (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P Q : Finset (Finset (Fin n))) (r : Fin n) (F : Finset (Sym2 (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hroot : ∀ t ∈ P, r ∈ t) (hF : F = ((P.biUnion finite_vertex_set_edge_encoding ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).filter (fun e => r ∉ e.toFinset))) (hQ : Q = P.filter (fun p => ∃ e ∈ F, e ∈ finite_vertex_set_edge_encoding p)) : ∀ u ∈ Q.biUnion id, ∀ v ∈ Q.biUnion id, (simple_graph_sunflower_packing_kernel_graph n G P r Q).Adj u v ↔ G.Adj u v
simple_graph_sunflower_kernel_graph_leIn LeanGraph Theory & Graph Algorithms

The kernel graph is a subgraph of G.

theorem simple_graph_sunflower_kernel_graph_le (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P Q : Finset (Finset (Fin n))) (r : Fin n) (F : Finset (Sym2 (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hroot : ∀ t ∈ P, r ∈ t) (hF : F = ((P.biUnion finite_vertex_set_edge_encoding ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).filter (fun e => r ∉ e.toFinset))) (hQ : Q = P.filter (fun p => ∃ e ∈ F, e ∈ finite_vertex_set_edge_encoding p)) : simple_graph_sunflower_packing_kernel_graph n G P r Q ≤ G
simple_graph_sunflower_kernel_graph_outside_petals_edge_freeIn LeanGraph Theory & Graph Algorithms

For a packed petal p outside the subpacking Q, no edge of the kernel graph has both endpoints in p.

theorem simple_graph_sunflower_kernel_graph_outside_petals_edge_free (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P Q : Finset (Finset (Fin n))) (r : Fin n) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hroot : ∀ t ∈ P, r ∈ t) : ∀ p ∈ P, p ∉ Q → ∀ u ∈ p, ∀ v ∈ p, ¬ (simple_graph_sunflower_packing_kernel_graph n G P r Q).Adj u v
simple_graph_sunflower_kernel_graph_packed_edgesIn LeanGraph Theory & Graph Algorithms

For a packed edge e, e is an edge of the kernel graph if and only if e is spanned by one of the retained petals of Q.

theorem simple_graph_sunflower_kernel_graph_packed_edges (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P Q : Finset (Finset (Fin n))) (r : Fin n) (F : Finset (Sym2 (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hroot : ∀ t ∈ P, r ∈ t) (hF : F = ((P.biUnion finite_vertex_set_edge_encoding ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).filter (fun e => r ∉ e.toFinset))) (hQ : Q = P.filter (fun p => ∃ e ∈ F, e ∈ finite_vertex_set_edge_encoding p)) : ∀ e ∈ P.biUnion finite_vertex_set_edge_encoding, e ∈ (simple_graph_sunflower_packing_kernel_graph n G P r Q).edgeSet ↔ e ∈ Q.biUnion finite_vertex_set_edge_encoding
simple_graph_sunflower_kernel_packing_number_geIn LeanGraph Theory & Graph Algorithms

The retained petals Q are |Q| edge-disjoint triangles of the kernel graph, so its triangle packing number is at least |Q|.

theorem simple_graph_sunflower_kernel_packing_number_ge (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P Q : Finset (Finset (Fin n))) (r : Fin n) (F : Finset (Sym2 (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hroot : ∀ t ∈ P, r ∈ t) (hF : F = ((P.biUnion finite_vertex_set_edge_encoding ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).filter (fun e => r ∉ e.toFinset))) (hQ : Q = P.filter (fun p => ∃ e ∈ F, e ∈ finite_vertex_set_edge_encoding p)) : Q.card ≤ simple_graph_triangle_packing_number (simple_graph_sunflower_packing_kernel_graph n G P r Q)
simple_graph_sunflower_kernel_packing_number_leIn LeanGraph Theory & Graph Algorithms

The kernel graph has no more than |Q| edge-disjoint triangles, since any family of them together with the discarded packed petals P \ Q is a packing of G of size |T| + |P \ Q| ≤ ν(G) = |P|.

theorem simple_graph_sunflower_kernel_packing_number_le (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P Q : Finset (Finset (Fin n))) (r : Fin n) (F : Finset (Sym2 (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hroot : ∀ t ∈ P, r ∈ t) (hF : F = ((P.biUnion finite_vertex_set_edge_encoding ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).filter (fun e => r ∉ e.toFinset))) (hQ : Q = P.filter (fun p => ∃ e ∈ F, e ∈ finite_vertex_set_edge_encoding p)) : simple_graph_triangle_packing_number (simple_graph_sunflower_packing_kernel_graph n G P r Q) ≤ Q.card
simple_graph_sunflower_kernel_vertices_boundIn LeanGraph Theory & Graph Algorithms

The vertex set W contains all endpoints of the petals of Q and all endpoints of the kernel graph, and has at most three vertices per petal of Q plus one.

theorem simple_graph_sunflower_kernel_vertices_bound (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P Q : Finset (Finset (Fin n))) (r : Fin n) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hroot : ∀ t ∈ P, r ∈ t) : Q.biUnion id ⊆ simple_graph_sunflower_packing_kernel_vertices n G P r Q ∧ (∀ u v, (simple_graph_sunflower_packing_kernel_graph n G P r Q).Adj u v → u ∈ simple_graph_sunflower_packing_kernel_vertices n G P r Q ∧ v ∈ simple_graph_sunflower_packing_kernel_vertices n G P r Q) ∧ (simple_graph_sunflower_packing_kernel_vertices n G P r Q).card ≤ 3 * Q.card + 1
simple_graph_sunflower_packing_witness_specIn LeanGraph Theory & Graph Algorithms

For every petal q of the subpacking Q, the witness vertex lies outside q, q minus the root together with the witness is a triangle, and that triangle meets the packed edge union in exactly one edge.

theorem simple_graph_sunflower_packing_witness_spec (n : ℕ) (G : SimpleGraph (Fin n)) (P Q : Finset (Finset (Fin n))) (r : Fin n) (F : Finset (Sym2 (Fin n))) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hroot : ∀ t ∈ P, r ∈ t) (hF : F = ((P.biUnion finite_vertex_set_edge_encoding ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).filter (fun e => r ∉ e.toFinset))) (hQ : Q = P.filter (fun p => ∃ e ∈ F, e ∈ finite_vertex_set_edge_encoding p)) : ∀ q ∈ Q, simple_graph_sunflower_packing_witness n G P r q ∉ q ∧ G.IsNClique 3 (insert (simple_graph_sunflower_packing_witness n G P r q) (q.erase r)) ∧ (finite_vertex_set_edge_encoding (insert (simple_graph_sunflower_packing_witness n G P r q) (q.erase r)) ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1
simple_graph_sunflower_petal_eq_of_common_nonroot_vertexIn LeanGraph Theory & Graph Algorithms

If a vertex a other than the root lies in a packed petal p and in a petal q of the subpacking, then p = q.

theorem simple_graph_sunflower_petal_eq_of_common_nonroot_vertex (n : ℕ) (G : SimpleGraph (Fin n)) (P Q : Finset (Finset (Fin n))) (r : Fin n) (hQP : Q ⊆ P) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hroot : ∀ t ∈ P, r ∈ t) : ∀ p ∈ P, ∀ q ∈ Q, ∀ a : Fin n, a ∈ p → a ∈ q → a ≠ r → p = q
simple_graph_sunflower_petals_intersect_rootIn LeanGraph Theory & Graph Algorithms

Two distinct packed petals that both contain the common vertex r intersect exactly in {r}.

theorem simple_graph_sunflower_petals_intersect_root (n : ℕ) (G : SimpleGraph (Fin n)) (P : Finset (Finset (Fin n))) (r : Fin n) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hroot : ∀ t ∈ P, r ∈ t) : ∀ p ∈ P, ∀ q ∈ P, p ≠ q → p ∩ q = {r}
simple_graph_three_apex_cover_one_baseIn LeanGraph Theory & Graph Algorithms

The join of a three-vertex clique with any finite graph whose triangles can be covered by one edge satisfies the factor-two triangle cover bound.

theorem simple_graph_three_apex_cover_one_base
    (n : ℕ) (H : SimpleGraph (Fin n)) [DecidableRel H.Adj]
    (hbase : simple_graph_triangle_cover_number H ≤ 1) :
    let G := ((Hᶜ).sum (⊥ : SimpleGraph (Fin 3)))ᶜ
    simple_graph_triangle_cover_number G ≤ 2 * simple_graph_triangle_packing_number G
simple_graph_three_apex_cover_two_baseIn LeanGraph Theory & Graph Algorithms

The join of a three-vertex clique with any finite graph whose triangles can be covered by two edges satisfies the factor-two triangle cover inequality.

theorem simple_graph_three_apex_cover_two_base
    (n : ℕ) (H : SimpleGraph (Fin n)) [DecidableRel H.Adj]
    (hbase : simple_graph_triangle_cover_number H ≤ 2) :
    let G := ((Hᶜ).sum (⊥ : SimpleGraph (Fin 3)))ᶜ
    simple_graph_triangle_cover_number G ≤ 2 * simple_graph_triangle_packing_number G
simple_graph_three_apex_cover_two_base_of_mixed_gapIn LeanGraph Theory & Graph Algorithms

If the three-unit mixed-cover inequality holds for a finite base graph whose triangles can be covered by two edges, then joining that graph to a three-vertex clique satisfies the factor-two triangle-cover bound.

theorem simple_graph_three_apex_cover_two_base_of_mixed_gap
    (n : ℕ) (H : SimpleGraph (Fin n)) [DecidableRel H.Adj]
    (hbase : simple_graph_triangle_cover_number H ≤ 2)
    (hgap : 3 ≤ H.edgeFinset.card →
      ∃ (S : Finset (Fin n)) (M : Fin 3 → Finset (Sym2 (Fin n))),
        (∀ i, M i ⊆ H.edgeFinset ∧
          ∀ e ∈ M i, ∀ f ∈ M i, e ≠ f → ∀ v ∈ e, v ∉ f) ∧
        (∀ i j : Fin 3, i ≠ j → Disjoint (M i) (M j)) ∧
        3 * S.card + (H.edgeFinset.filter (fun e => ∀ v ∈ e, v ∉ S)).card + 3 ≤
          2 * ((M 0).card + (M 1).card + (M 2).card)) :
    let G := ((Hᶜ).sum (⊥ : SimpleGraph (Fin 3)))ᶜ
    simple_graph_triangle_cover_number G ≤ 2 * simple_graph_triangle_packing_number G
simple_graph_three_apex_triangle_cover_number_leIn LeanGraph Theory & Graph Algorithms

In the join of a triangle-free finite graph H and a 3-clique, the triangle cover number is at most three times the size of any vertex set S plus the number of edges outside S plus three.

theorem simple_graph_three_apex_triangle_cover_number_le
    (n : ℕ) (H : SimpleGraph (Fin n)) [DecidableRel H.Adj]
    (htri : H.CliqueFree 3)
    (S : Finset (Fin n)) :
    let G := ((Hᶜ).sum (⊥ : SimpleGraph (Fin 3)))ᶜ
    simple_graph_triangle_cover_number G ≤
      3 * S.card + (H.edgeFinset.filter (fun e => ∀ v ∈ e, v ∉ S)).card + 3
simple_graph_three_apex_triangle_cover_of_mixed_certificateIn LeanGraph Theory & Graph Algorithms

For a triangle-free finite graph with the specified three disjoint matchings and a vertex set whose mixed cover cost is strictly less than twice their combined size, the join of that graph with a three-clique satisfies the factor-two triangle cover inequality.

theorem simple_graph_three_apex_triangle_cover_of_mixed_certificate
    (n : ℕ) (H : SimpleGraph (Fin n)) [DecidableRel H.Adj]
    (htri : H.CliqueFree 3)
    (S : Finset (Fin n)) (M : Fin 3 → Finset (Sym2 (Fin n)))
    (hmatch : ∀ i, M i ⊆ H.edgeFinset ∧
      ∀ e ∈ M i, ∀ f ∈ M i, e ≠ f → ∀ v ∈ e, v ∉ f)
    (hdisj : ∀ i j : Fin 3, i ≠ j → Disjoint (M i) (M j))
    (hsize : 3 * S.card + (H.edgeFinset.filter (fun e => ∀ v ∈ e, v ∉ S)).card + 1 ≤
      2 * ((M 0).card + (M 1).card + (M 2).card)) :
    let G := ((Hᶜ).sum (⊥ : SimpleGraph (Fin 3)))ᶜ
    simple_graph_triangle_cover_number G ≤ 2 * simple_graph_triangle_packing_number G
simple_graph_three_apex_triangle_packing_number_geIn LeanGraph Theory & Graph Algorithms

In the join of any finite graph H and a 3-clique, three pairwise disjoint matchings yield an edge-disjoint triangle packing of size 1 + |M 0| + |M 1| + |M 2|.

theorem simple_graph_three_apex_triangle_packing_number_ge
    (n : ℕ) (H : SimpleGraph (Fin n)) [DecidableRel H.Adj]
    (M : Fin 3 → Finset (Sym2 (Fin n)))
    (hmatch : ∀ i, M i ⊆ H.edgeFinset ∧
      ∀ e ∈ M i, ∀ f ∈ M i, e ≠ f → ∀ v ∈ e, v ∉ f)
    (hdisj : ∀ i j : Fin 3, i ≠ j → Disjoint (M i) (M j)) :
    let G := ((Hᶜ).sum (⊥ : SimpleGraph (Fin 3)))ᶜ
    1 + (M 0).card + (M 1).card + (M 2).card ≤
      simple_graph_triangle_packing_number G
simple_graph_three_matchings_mixed_cover_boundIn LeanGraph Theory & Graph Algorithms

In every finite simple graph with at least one edge, there are three pairwise edge-disjoint matchings and a vertex set S such that three times |S| plus the number of edges with both endpoints outside S is strictly less than twice the combined size of the matchings.

theorem simple_graph_three_matchings_mixed_cover_bound
    (n : ℕ) (H : SimpleGraph (Fin n)) [DecidableRel H.Adj]
    (hne : H.edgeFinset.Nonempty) :
    ∃ (S : Finset (Fin n)) (M : Fin 3 → Finset (Sym2 (Fin n))),
      (∀ i, M i ⊆ H.edgeFinset ∧
        ∀ e ∈ M i, ∀ f ∈ M i, e ≠ f → ∀ v ∈ e, v ∉ f) ∧
      (∀ i j : Fin 3, i ≠ j → Disjoint (M i) (M j)) ∧
      3 * S.card + (H.edgeFinset.filter (fun e => ∀ v ∈ e, v ∉ S)).card + 1 ≤
        2 * ((M 0).card + (M 1).card + (M 2).card)
simple_graph_three_matchings_mixed_cover_gap_threeIn LeanGraph Theory & Graph Algorithms

Every finite simple graph with at least three edges has three edge-disjoint matchings and a vertex set whose three-unit mixed-cover cost is at most twice the combined matching size.

theorem simple_graph_three_matchings_mixed_cover_gap_three
    (n : ℕ) (H : SimpleGraph (Fin n)) [DecidableRel H.Adj]
    (hsize : 3 ≤ H.edgeFinset.card) :
    ∃ (S : Finset (Fin n)) (M : Fin 3 → Finset (Sym2 (Fin n))),
      (∀ i, M i ⊆ H.edgeFinset ∧
        ∀ e ∈ M i, ∀ f ∈ M i, e ≠ f → ∀ v ∈ e, v ∉ f) ∧
      (∀ i j : Fin 3, i ≠ j → Disjoint (M i) (M j)) ∧
      3 * S.card + (H.edgeFinset.filter (fun e => ∀ v ∈ e, v ∉ S)).card + 3 ≤
        2 * ((M 0).card + (M 1).card + (M 2).card)
simple_graph_three_matchings_mixed_cover_gap_twoIn LeanGraph Theory & Graph Algorithms

In a finite simple graph with at least two edges, there exist three edge-disjoint matchings and a vertex set S such that three times its size plus the number of edges outside S plus two does not exceed twice the combined matching size.

theorem simple_graph_three_matchings_mixed_cover_gap_two
    (n : ℕ) (H : SimpleGraph (Fin n)) [DecidableRel H.Adj]
    (hsize : 2 ≤ H.edgeFinset.card) :
    ∃ (S : Finset (Fin n)) (M : Fin 3 → Finset (Sym2 (Fin n))),
      (∀ i, M i ⊆ H.edgeFinset ∧
        ∀ e ∈ M i, ∀ f ∈ M i, e ≠ f → ∀ v ∈ e, v ∉ f) ∧
      (∀ i j : Fin 3, i ≠ j → Disjoint (M i) (M j)) ∧
      3 * S.card + (H.edgeFinset.filter (fun e => ∀ v ∈ e, v ∉ S)).card + 2 ≤
        2 * ((M 0).card + (M 1).card + (M 2).card)
simple_graph_three_separator_common_edge_componentsIn LeanGraph Theory & Graph Algorithms

There exist two simple graphs G1 and G2 on Fin 7 overlapping on the triangle D on {0, 1, 2} such that G1 is supported on {0, 1, 2, 3}, G2 on {0, 1, 2, 4, 5, 6}, their union G is 3-connected, every triangle of G is in G1 or G2, ν(H1) = 0, ν(H2) = 1, ν(G) = 2, τ(G1) ≤ 2, τ(G2) ≤ 2, ν(G1) ≥ 1, ν(G2) ≥ 1, and for each e ∈ D, ν(H1 + e) ≥ 1 and ν(H2 + e) ≥ 1.

theorem simple_graph_three_separator_common_edge_components :
    ∃ G1 G2 : SimpleGraph (Fin 7),
      let D := finite_vertex_set_edge_encoding ({0, 1, 2} : Finset (Fin 7))
      let H1 := G1.deleteEdges (↑D : Set (Sym2 (Fin 7)))
      let H2 := G2.deleteEdges (↑D : Set (Sym2 (Fin 7)))
      let G := G1 ⊔ G2
      (∀ a b, G1.Adj a b → a ∈ ({0, 1, 2, 3} : Finset (Fin 7)) ∧
        b ∈ ({0, 1, 2, 3} : Finset (Fin 7))) ∧
      (∀ a b, G2.Adj a b → a ∈ ({0, 1, 2, 4, 5, 6} : Finset (Fin 7)) ∧
        b ∈ ({0, 1, 2, 4, 5, 6} : Finset (Fin 7))) ∧
      G1.edgeSet ∩ G2.edgeSet = (↑D : Set (Sym2 (Fin 7))) ∧
      (∀ R : Finset (Fin 7), R.card ≤ 2 → (G.induce {v | v ∉ R}).Connected) ∧
      (∀ t : Finset (Fin 7), G.IsNClique 3 t → G1.IsNClique 3 t ∨ G2.IsNClique 3 t) ∧
      simple_graph_triangle_packing_number H1 = 0 ∧
      simple_graph_triangle_packing_number H2 = 1 ∧
      simple_graph_triangle_packing_number G = 2 ∧
      simple_graph_triangle_cover_number G1 ≤ 2 ∧
      simple_graph_triangle_cover_number G2 ≤ 2 ∧
      1 ≤ simple_graph_triangle_packing_number G1 ∧
      1 ≤ simple_graph_triangle_packing_number G2 ∧
      (∀ e ∈ D, 1 ≤ simple_graph_triangle_packing_number (H1 ⊔ SimpleGraph.fromEdgeSet ({e} : Set (Sym2 (Fin 7)))) ∧
                1 ≤ simple_graph_triangle_packing_number (H2 ⊔ SimpleGraph.fromEdgeSet ({e} : Set (Sym2 (Fin 7)))))
simple_graph_three_separator_common_edge_counterexampleIn LeanGraph Theory & Graph Algorithms

There are two graphs whose union is three-connected and whose common edge set is the triangle on vertices 0, 1, 2, such that each graph satisfies the triangle cover-packing inequality and every union triangle lies in one piece, but the common-edge packing-number equality used in the triangle-separator proof fails for all three separator edges, even in its residual case.

theorem simple_graph_three_separator_common_edge_counterexample :
    ∃ G1 G2 : SimpleGraph (Fin 7),
      let D := finite_vertex_set_edge_encoding ({0, 1, 2} : Finset (Fin 7))
      let H1 := G1.deleteEdges (↑D : Set (Sym2 (Fin 7)))
      let H2 := G2.deleteEdges (↑D : Set (Sym2 (Fin 7)))
      let G := G1 ⊔ G2
      (∀ a b, G1.Adj a b → a ∈ ({0, 1, 2, 3} : Finset (Fin 7)) ∧
        b ∈ ({0, 1, 2, 3} : Finset (Fin 7))) ∧
      (∀ a b, G2.Adj a b → a ∈ ({0, 1, 2, 4, 5, 6} : Finset (Fin 7)) ∧
        b ∈ ({0, 1, 2, 4, 5, 6} : Finset (Fin 7))) ∧
      G1.edgeSet ∩ G2.edgeSet = (↑D : Set (Sym2 (Fin 7))) ∧
      (∀ R : Finset (Fin 7), R.card ≤ 2 → (G.induce {v | v ∉ R}).Connected) ∧
      (∀ t : Finset (Fin 7), G.IsNClique 3 t → G1.IsNClique 3 t ∨ G2.IsNClique 3 t) ∧
      simple_graph_triangle_cover_number G1 ≤ 2 * simple_graph_triangle_packing_number G1 ∧
      simple_graph_triangle_cover_number G2 ≤ 2 * simple_graph_triangle_packing_number G2 ∧
      simple_graph_triangle_packing_number G =
        simple_graph_triangle_packing_number H1 + simple_graph_triangle_packing_number H2 + 1 ∧
      (∀ e ∈ D,
        simple_graph_triangle_packing_number G ≠
          simple_graph_triangle_packing_number (H1 ⊔ SimpleGraph.fromEdgeSet ({e} : Set (Sym2 (Fin 7)))) +
          simple_graph_triangle_packing_number (H2 ⊔ SimpleGraph.fromEdgeSet ({e} : Set (Sym2 (Fin 7)))) + 1)
simple_graph_three_vertex_connected_five_classificationIn LeanGraph Theory & Graph Algorithms

Classification: the only 3-vertex-connected simple graphs on 5 vertices other than K5 are, up to isomorphism, K5 minus one edge and the 4-wheel.

theorem simple_graph_three_vertex_connected_five_classification (G : SimpleGraph (Fin 5)) [DecidableRel G.Adj] (h : simple_graph_three_vertex_connected G) (hne : G ≠ ⊤) : Nonempty (G ≃g five_k5_sub_edge) ∨ Nonempty (G ≃g five_wheel_four)
simple_graph_triangle_codegree_eq_common_neighboursIn LeanGraph Theory & Graph Algorithms

For adjacent vertices a and b, the triangles of G containing the edge ab are in bijection with the common neighbours of a and b.

theorem simple_graph_triangle_codegree_eq_common_neighbours {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (a b : V) (hab : G.Adj a b) :
    ((simple_graph_triangle_edge_family G).filter (fun t => Sym2.mk a b ∈ t)).card =
      (G.neighborFinset a ∩ G.neighborFinset b).card
simple_graph_triangle_cover_iff_edge_family_certificateIn LeanGraph Theory & Graph Algorithms

The triangle packing-cover inequality for a finite graph is equivalent to a factor-two disjoint-packing and point-cover certificate for its triangle edge-set family.

theorem simple_graph_triangle_cover_iff_edge_family_certificate
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) :
    (simple_graph_triangle_cover_number G ≤ 2 * simple_graph_triangle_packing_number G) ↔
    ∃ Q : Finset (Finset (Sym2 V)), ∃ C : Finset (Sym2 V),
      Q ⊆ simple_graph_triangle_edge_family G ∧
      (Q : Set (Finset (Sym2 V))).Pairwise Disjoint ∧
      (∀ F ∈ simple_graph_triangle_edge_family G, ¬ Disjoint F C) ∧
      C.card ≤ 2 * Q.card
simple_graph_triangle_cover_mem_of_large_bookIn LeanGraph Theory & Graph Algorithms

If an edge s(u, v) belongs to a book of triangles strictly larger than a cover C, and C covers all of them, then s(u, v) must be in C.

theorem simple_graph_triangle_cover_mem_of_large_book
    {V : Type*} [DecidableEq V] (G : SimpleGraph V) (u v : V) (huv : G.Adj u v)
    (W : Finset V) (hW : ∀ w ∈ W, G.IsNClique 3 ({u, v, w} : Finset V))
    (C : Finset (Sym2 V)) (hC_card : C.card < W.card)
    (hC_cov : ∀ w ∈ W, ∃ e ∈ C, ∀ x ∈ e, x ∈ ({u, v, w} : Finset V)) :
    s(u, v) ∈ C
simple_graph_triangle_cover_number_le_two_mul_packing_number_of_packing_critical_two_leIn LeanGraph Theory & Graph Algorithms

Packing-critical case of Tuza's conjecture: if deleting any single edge of G leaves the triangle packing number unchanged and 2 ≤ ν(G), then τ(G) ≤ 2ν(G).

theorem simple_graph_triangle_cover_number_le_two_mul_packing_number_of_packing_critical_two_le
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    (hν : 2 ≤ simple_graph_triangle_packing_number G)
    (h : ∀ e ∈ G.edgeSet,
      simple_graph_triangle_packing_number (G.deleteEdges {e}) =
        simple_graph_triangle_packing_number G) :
    simple_graph_triangle_cover_number G ≤ 2 * simple_graph_triangle_packing_number G
simple_graph_triangle_cover_of_disjoint_trianglesIn LeanGraph Theory & Graph Algorithms

If all triangles of G are contained in A or in B, and cross-side triangles share at most 1 vertex, then the triangle cover-packing bound τ ≤ 2ν transfers from the induced subgraphs G[A] and G[B] to G.

theorem simple_graph_triangle_cover_of_disjoint_triangles
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (A B : Finset V)
    (hall : ∀ t : Finset V, G.IsNClique 3 t → t ⊆ A ∨ t ⊆ B)
    (hdisj : ∀ t₁ t₂ : Finset V, G.IsNClique 3 t₁ → G.IsNClique 3 t₂ →
      t₁ ⊆ A → t₂ ⊆ B → (t₁ ∩ t₂).card ≤ 1)
    (hA : simple_graph_triangle_cover_number (G.induce (A : Set V)) ≤
      2 * simple_graph_triangle_packing_number (G.induce (A : Set V)))
    (hB : simple_graph_triangle_cover_number (G.induce (B : Set V)) ≤
      2 * simple_graph_triangle_packing_number (G.induce (B : Set V))) :
    simple_graph_triangle_cover_number G ≤ 2 * simple_graph_triangle_packing_number G
simple_graph_triangle_cover_of_near_high_codegree_inductionIn LeanGraph Theory & Graph Algorithms

Given the conjectured inequality for every graph on the same vertices with smaller packing number, it holds for a graph of packing number at least two with an edge of codegree at least twice that number minus one.

theorem simple_graph_triangle_cover_of_near_high_codegree_induction
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (hIH : ∀ H : SimpleGraph V,
      simple_graph_triangle_packing_number H < simple_graph_triangle_packing_number G →
      simple_graph_triangle_cover_number H ≤ 2 * simple_graph_triangle_packing_number H)
    (u v : V) (huv : G.Adj u v)
    (htwo : 2 ≤ simple_graph_triangle_packing_number G)
    (hlarge : 2 * simple_graph_triangle_packing_number G ≤
      ((Finset.univ : Finset V).filter (fun w => G.Adj u w ∧ G.Adj v w)).card + 1) :
    simple_graph_triangle_cover_number G ≤ 2 * simple_graph_triangle_packing_number G
simple_graph_triangle_cover_of_one_edge_gluingIn LeanGraph Theory & Graph Algorithms

If all triangles lie in A or B and triangles across A and B meet only along a single shared edge e, then τ ≤ 2ν holds for G given the factor-two bound on G[A], G[B], (G\e)[A], and (G\e)[B].

theorem simple_graph_triangle_cover_of_one_edge_gluing
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (A B : Finset V)
    (e : Sym2 V) (he : e ∈ G.edgeSet)
    (hall : ∀ t : Finset V, G.IsNClique 3 t → t ⊆ A ∨ t ⊆ B)
    (hshare : ∀ t₁ t₂ : Finset V, G.IsNClique 3 t₁ → G.IsNClique 3 t₂ →
      t₁ ⊆ A → t₂ ⊆ B → 2 ≤ (t₁ ∩ t₂).card → ∀ x ∈ e, x ∈ t₁ ∧ x ∈ t₂)
    (hA : simple_graph_triangle_cover_number (G.induce (A : Set V)) ≤
      2 * simple_graph_triangle_packing_number (G.induce (A : Set V)))
    (hB : simple_graph_triangle_cover_number (G.induce (B : Set V)) ≤
      2 * simple_graph_triangle_packing_number (G.induce (B : Set V)))
    (hA_del : simple_graph_triangle_cover_number ((G.deleteEdges {e}).induce (A : Set V)) ≤
      2 * simple_graph_triangle_packing_number ((G.deleteEdges {e}).induce (A : Set V)))
    (hB_del : simple_graph_triangle_cover_number ((G.deleteEdges {e}).induce (B : Set V)) ≤
      2 * simple_graph_triangle_packing_number ((G.deleteEdges {e}).induce (B : Set V))) :
    simple_graph_triangle_cover_number G ≤ 2 * simple_graph_triangle_packing_number G
simple_graph_triangle_cover_of_stable_near_high_codegreeIn LeanGraph Theory & Graph Algorithms

If deleting an edge preserves triangle packing number at least two and its codegree is at least twice that number minus one, the triangle cover number is at most twice the packing number.

theorem simple_graph_triangle_cover_of_stable_near_high_codegree
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (u v : V) (huv : G.Adj u v)
    (htwo : 2 ≤ simple_graph_triangle_packing_number G)
    (hlarge : 2 * simple_graph_triangle_packing_number G ≤
      ((Finset.univ : Finset V).filter (fun w => G.Adj u w ∧ G.Adj v w)).card + 1)
    (hstable : simple_graph_triangle_packing_number (G.deleteEdges {s(u,v)}) =
      simple_graph_triangle_packing_number G) :
    simple_graph_triangle_cover_number G ≤ 2 * simple_graph_triangle_packing_number G
simple_graph_triangle_cover_of_two_vertex_separator_inductionIn LeanGraph Theory & Graph Algorithms

If two proper vertex sets cover the graph, meet in at most two vertices, and have no edges between their exclusive parts, then the triangle packing-cover inequality follows from the inequality for all smaller finite graphs.

theorem simple_graph_triangle_cover_of_two_vertex_separator_induction
    (V : Type) [Fintype V] [DecidableEq V] (G : SimpleGraph V) (A B : Finset V)
    (hcover : A ∪ B = Finset.univ)
    (hA : A.card < Fintype.card V) (hB : B.card < Fintype.card V)
    (hsep : (A ∩ B).card ≤ 2)
    (hcross : ∀ x ∈ A \ B, ∀ y ∈ B \ A, ¬ G.Adj x y)
    (hind : ∀ (W : Type) [Fintype W] [DecidableEq W], Fintype.card W < Fintype.card V →
      ∀ H : SimpleGraph W,
        simple_graph_triangle_cover_number H ≤ 2 * simple_graph_triangle_packing_number H) :
    simple_graph_triangle_cover_number G ≤ 2 * simple_graph_triangle_packing_number G
simple_graph_triangle_cover_packing_gap_cover_lowerIn LeanGraph Theory & Graph Algorithms

Any set of edges of the witness graph meeting every triangle has at least six elements.

theorem simple_graph_triangle_cover_packing_gap_cover_lower (C : Finset (Sym2 (Fin 7)))
    (hsub : ∀ g ∈ C, g ∈ simple_graph_triangle_cover_packing_gap_witness_graph.edgeSet)
    (hcov : ∀ t : Finset (Fin 7), simple_graph_triangle_cover_packing_gap_witness_graph.IsNClique 3 t →
      ∃ g ∈ C, ∀ x ∈ g, x ∈ t) : 6 ≤ C.card
simple_graph_triangle_cover_packing_gap_cover_meetsIn LeanGraph Theory & Graph Algorithms

A triangle edge cover of the witness graph that avoids both {0,2} and {1,4} has at least seven edges.

theorem simple_graph_triangle_cover_packing_gap_cover_meets (C : Finset (Sym2 (Fin 7)))
    (hsub : ∀ g ∈ C, g ∈ simple_graph_triangle_cover_packing_gap_witness_graph.edgeSet)
    (hcov : ∀ t : Finset (Fin 7), simple_graph_triangle_cover_packing_gap_witness_graph.IsNClique 3 t →
      ∃ g ∈ C, ∀ x ∈ g, x ∈ t)
    (he : Sym2.mk (0 : Fin 7) 2 ∉ C) (hf : Sym2.mk (1 : Fin 7) 4 ∉ C) : 7 ≤ C.card
simple_graph_triangle_cover_packing_gap_cover_upper_boundIn LeanGraph Theory & Graph Algorithms

The six edges {0,2}, {0,3}, {2,3}, {4,5}, {4,6}, {5,6} cover every triangle of the witness graph.

theorem simple_graph_triangle_cover_packing_gap_cover_upper_bound :
    ∃ C : Finset (Sym2 (Fin 7)),
      (∀ g ∈ C, g ∈ simple_graph_triangle_cover_packing_gap_witness_graph.edgeSet) ∧
      (∀ t : Finset (Fin 7), simple_graph_triangle_cover_packing_gap_witness_graph.IsNClique 3 t →
        ∃ g ∈ C, ∀ x ∈ g, x ∈ t) ∧ C.card = 6
simple_graph_triangle_cover_packing_gap_edge_finset_cardIn LeanGraph Theory & Graph Algorithms

The listed edge family of the witness graph has 17 members.

theorem simple_graph_triangle_cover_packing_gap_edge_finset_card :
    simple_graph_triangle_cover_packing_gap_edge_finset.card = 17
simple_graph_triangle_cover_packing_gap_edge_set_eqIn LeanGraph Theory & Graph Algorithms

An unordered pair is an edge of the witness graph iff it is one of the 17 listed edges.

theorem simple_graph_triangle_cover_packing_gap_edge_set_eq (e : Sym2 (Fin 7)) :
    e ∈ simple_graph_triangle_cover_packing_gap_witness_graph.edgeSet ↔
      e ∈ simple_graph_triangle_cover_packing_gap_edge_finset
simple_graph_triangle_cover_packing_gap_packing_avoidsIn LeanGraph Theory & Graph Algorithms

Every size-five triangle packing of the witness graph avoids both {0,2} and {1,4}.

theorem simple_graph_triangle_cover_packing_gap_packing_avoids (P : Finset (Finset (Fin 7)))
    (hcl : ∀ t ∈ P, simple_graph_triangle_cover_packing_gap_witness_graph.IsNClique 3 t)
    (hdis : (P : Set (Finset (Fin 7))).Pairwise (fun s t => (s ∩ t).card ≤ 1))
    (hcard : P.card = 5) :
    ∀ t ∈ P, ¬ (∀ x ∈ Sym2.mk (0 : Fin 7) 2, x ∈ t) ∧
      ¬ (∀ x ∈ Sym2.mk (1 : Fin 7) 4, x ∈ t)
simple_graph_triangle_cover_packing_gap_packing_lowerIn LeanGraph Theory & Graph Algorithms

The five triangles {0,3,6}, {0,4,5}, {1,5,6}, {2,3,5}, {2,4,6} form a triangle packing in the witness graph.

theorem simple_graph_triangle_cover_packing_gap_packing_lower :
    ∃ P : Finset (Finset (Fin 7)),
      (∀ t ∈ P, simple_graph_triangle_cover_packing_gap_witness_graph.IsNClique 3 t) ∧
      (P : Set (Finset (Fin 7))).Pairwise (fun s t => (s ∩ t).card ≤ 1) ∧ P.card = 5
simple_graph_triangle_cover_packing_gap_packing_upperIn LeanGraph Theory & Graph Algorithms

Any set of pairwise edge-disjoint triangles in the witness graph has at most five members.

theorem simple_graph_triangle_cover_packing_gap_packing_upper (P : Finset (Finset (Fin 7)))
    (hcl : ∀ t ∈ P, simple_graph_triangle_cover_packing_gap_witness_graph.IsNClique 3 t)
    (hdis : (P : Set (Finset (Fin 7))).Pairwise (fun s t => (s ∩ t).card ≤ 1)) :
    P.card ≤ 5
simple_graph_triangle_cover_packing_gap_special_edges_memIn LeanGraph Theory & Graph Algorithms

Both {0,2} and {1,4} are edges of the witness graph, while {0,1} is not.

theorem simple_graph_triangle_cover_packing_gap_special_edges_mem :
    Sym2.mk (0 : Fin 7) 2 ∈ simple_graph_triangle_cover_packing_gap_witness_graph.edgeSet ∧
      Sym2.mk (1 : Fin 7) 4 ∈ simple_graph_triangle_cover_packing_gap_witness_graph.edgeSet ∧
      Sym2.mk (0 : Fin 7) 1 ∉ simple_graph_triangle_cover_packing_gap_witness_graph.edgeSet
simple_graph_triangle_cover_packing_gap_triangle_set_eqIn LeanGraph Theory & Graph Algorithms

A three-element vertex set is a triangle of the witness graph iff it is one of the 19 listed triangles.

theorem simple_graph_triangle_cover_packing_gap_triangle_set_eq (t : Finset (Fin 7)) :
    simple_graph_triangle_cover_packing_gap_witness_graph.IsNClique 3 t ↔
      t ∈ simple_graph_triangle_cover_packing_gap_triangle_finset
simple_graph_triangle_free_full_two_extra_forks_half_independentIn LeanGraph Theory & Graph Algorithms

If a triangle-free graph is exactly the union of one paired fork per vertex pair and two additional paired forks, it has an independent set containing at least half of its vertices.

theorem simple_graph_triangle_free_full_two_extra_forks_half_independent
    (m : ℕ) (G : SimpleGraph (Fin m × Fin 2))
    (w : Fin m → Fin m × Fin 2) (i₁ i₂ : Fin m)
    (z₁ z₂ : Fin m × Fin 2)
    (hw : ∀ i, (w i).1 ≠ i) (hz₁ : z₁.1 ≠ i₁) (hz₂ : z₂.1 ≠ i₂)
    (hG : ∀ x y, G.Adj x y ↔
      (∃ i : Fin m, (x.1 = i ∧ y = w i) ∨ (y.1 = i ∧ x = w i)) ∨
      (x.1 = i₁ ∧ y = z₁) ∨ (y.1 = i₁ ∧ x = z₁) ∨
      (x.1 = i₂ ∧ y = z₂) ∨ (y.1 = i₂ ∧ x = z₂))
    (htriangle : G.CliqueFree 3) :
    ∃ I : Finset (Fin m × Fin 2), m ≤ I.card ∧ G.IsIndepSet (I : Set (Fin m × Fin 2))
simple_graph_triangle_packing_cover_bounded_induced_kernelIn LeanGraph Theory & Graph Algorithms

For every finite simple graph and cover budget q, there is an induced subgraph with at most 3 times the triangle packing number times q+1 vertices, preserving the triangle packing number and whether a cover of size at most q exists.

theorem simple_graph_triangle_packing_cover_bounded_induced_kernel
    (n : ℕ) (G : SimpleGraph (Fin n)) (q : ℕ) :
    ∃ S : Finset (Fin n),
      S.card ≤ 3 * simple_graph_triangle_packing_number G * (q + 1) ∧
      simple_graph_triangle_packing_number (G.induce (S : Set (Fin n))) = simple_graph_triangle_packing_number G ∧
      (simple_graph_triangle_cover_number (G.induce (S : Set (Fin n))) ≤ q ↔
        simple_graph_triangle_cover_number G ≤ q)
simple_graph_triangle_packing_decreases_of_pair_hitting_triangle_neighborhoodIn LeanGraph Theory & Graph Algorithms

Let t be a triangle in a finite simple graph and let e and f be edges. If every triangle sharing an edge with t contains e or f, deleting e and f strictly decreases the triangle packing number.

theorem simple_graph_triangle_packing_decreases_of_pair_hitting_triangle_neighborhood {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (t : Finset V) (e f : Sym2 V) (he : e ∈ G.edgeSet) (hf : f ∈ G.edgeSet) (ht : G.IsNClique 3 t) (hhit : ∀ s : Finset V, G.IsNClique 3 s → 2 ≤ (s ∩ t).card → (∀ x ∈ e, x ∈ s) ∨ (∀ x ∈ f, x ∈ s)) : simple_graph_triangle_packing_number (G.deleteEdges {e, f}) < simple_graph_triangle_packing_number G
simple_graph_triangle_packing_neighborhood_type_kernelIn LeanGraph Theory & Graph Algorithms

Retaining a maximum packing support and at most k+2 vertices of each neighborhood type yields an induced subgraph of size at most 3k+(k+2)2^(3k) preserving the packing number, 2-edge deletion packing numbers, and singleton-forcing equivalences.

theorem simple_graph_triangle_packing_neighborhood_type_kernel
  (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] :
  ∃ W : Finset (Fin n),
    W.card ≤ 3 * simple_graph_triangle_packing_number G +
      (simple_graph_triangle_packing_number G + 2) * 2 ^ (3 * simple_graph_triangle_packing_number G) ∧
    let H := G.induce (W : Set (Fin n));
    let emb : Sym2 {x : Fin n // x ∈ W} ↪ Sym2 (Fin n) := (Function.Embedding.subtype (fun x : Fin n => x ∈ W)).sym2Map;
    simple_graph_triangle_packing_number H = simple_graph_triangle_packing_number G ∧
    (∀ e f : Sym2 {x : Fin n // x ∈ W}, e ∈ H.edgeSet → f ∈ H.edgeSet →
      simple_graph_triangle_packing_number (H.deleteEdges {e, f}) =
        simple_graph_triangle_packing_number (G.deleteEdges {emb e, emb f})) ∧
    (∀ P : Finset (Finset (Sym2 {x : Fin n // x ∈ W})),
      P ⊆ simple_graph_triangle_edge_family H →
      P.card = simple_graph_triangle_packing_number H →
      (P : Set (Finset (Sym2 {x : Fin n // x ∈ W}))).Pairwise Disjoint →
      ∀ p ∈ P, (p ⊆ (((simple_graph_triangle_edge_family H).filter (fun t => (t ∩ P.biUnion id).card = 1)).biUnion id) ↔
        p.map emb ⊆ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ (P.image (fun q => q.map emb)).biUnion id).card = 1)).biUnion id)))
simple_graph_triangle_packing_number_delete_edges_eq_of_avoiding_packingsIn LeanGraph Theory & Graph Algorithms

If every edge of G is avoided by some maximum-size triangle packing of G, then deleting any single edge of G preserves the triangle packing number.

theorem simple_graph_triangle_packing_number_delete_edges_eq_of_avoiding_packings
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    (havoid : ∀ e ∈ G.edgeSet, ∃ Q : Finset (Finset V),
      (∀ t ∈ Q, G.IsNClique 3 t) ∧
      (Q : Set (Finset V)).Pairwise (fun s t => (s ∩ t).card ≤ 1) ∧
      Q.card = simple_graph_triangle_packing_number G ∧
      ∀ t ∈ Q, e ∉ finite_vertex_set_edge_encoding t) :
    ∀ e ∈ G.edgeSet,
      simple_graph_triangle_packing_number (G.deleteEdges {e}) =
        simple_graph_triangle_packing_number G
simple_graph_triangle_packing_number_ge_card_of_packingIn LeanGraph Theory & Graph Algorithms

Any explicit family T of triangles of a finite simple graph G that are pairwise edge-disjoint (any two share at most one vertex) has cardinality at most the triangle packing number ν(G).

theorem simple_graph_triangle_packing_number_ge_card_of_packing {V : Type*} [DecidableEq V] [Fintype V]
    (G : SimpleGraph V) (T : Finset (Finset V))
    (htri : ∀ t ∈ T, G.IsNClique 3 t)
    (hpair : (T : Set (Finset V)).Pairwise (fun s t => (s ∩ t).card ≤ 1)) :
    T.card ≤ simple_graph_triangle_packing_number G
simple_graph_triangle_packing_odd_degree_edge_boundIn LeanGraph Theory & Graph Algorithms

For a finite graph, six times its triangle packing number plus the number of odd-degree vertices is at most twice its number of edges.

theorem simple_graph_triangle_packing_odd_degree_edge_bound (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] : 6 * simple_graph_triangle_packing_number G + (((Finset.univ : Finset (Fin n)).filter (fun v => Odd (G.degree v))).card) ≤ 2 * G.edgeFinset.card
simple_graph_triangle_packing_pair_deletion_forcing_quadratic_kernelIn LeanGraph Theory & Graph Algorithms

Every finite simple graph G of triangle packing number k has an induced subgraph H on at most 3k(k+3) vertices with the same packing number, with the same packing number after deleting any specified pair of H-edges in H and G, and such that each triangle of each maximum H-packing is fully singleton-forced in H if and only if it is fully singleton-forced in G relative to the same packing.

theorem simple_graph_triangle_packing_pair_deletion_forcing_quadratic_kernel (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] : ∃ W : Finset (Fin n), W.card ≤ 3 * simple_graph_triangle_packing_number G * (simple_graph_triangle_packing_number G + 3) ∧ let H := G.induce (W : Set (Fin n)); let emb : Sym2 {x : Fin n // x ∈ W} ↪ Sym2 (Fin n) := (Function.Embedding.subtype (fun x : Fin n => x ∈ W)).sym2Map; simple_graph_triangle_packing_number H = simple_graph_triangle_packing_number G ∧ (∀ e f : Sym2 {x : Fin n // x ∈ W}, e ∈ H.edgeSet → f ∈ H.edgeSet → simple_graph_triangle_packing_number (H.deleteEdges {e, f}) = simple_graph_triangle_packing_number (G.deleteEdges {emb e, emb f})) ∧ (∀ P : Finset (Finset (Sym2 {x : Fin n // x ∈ W})), P ⊆ simple_graph_triangle_edge_family H → P.card = simple_graph_triangle_packing_number H → (P : Set (Finset (Sym2 {x : Fin n // x ∈ W}))).Pairwise Disjoint → ∀ p ∈ P, (p ⊆ (((simple_graph_triangle_edge_family H).filter (fun t => (t ∩ P.biUnion id).card = 1)).biUnion id) ↔ p.map emb ⊆ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ (P.image (fun q => q.map emb)).biUnion id).card = 1)).biUnion id)))
simple_graph_triangle_packing_pair_deletion_forcing_sharp_kernelIn LeanGraph Theory & Graph Algorithms

Every finite simple graph G of triangle packing number k has an induced subgraph H on at most k(k+5) vertices with the same packing number, with the same packing number after deleting any specified pair of H-edges in H and G, and such that each triangle of each maximum H-packing is fully singleton-forced in H if and only if it is fully singleton-forced in G relative to the same packing.

theorem simple_graph_triangle_packing_pair_deletion_forcing_sharp_kernel (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] : ∃ W : Finset (Fin n), W.card ≤ simple_graph_triangle_packing_number G * (simple_graph_triangle_packing_number G + 5) ∧ let H := G.induce (W : Set (Fin n)); let emb : Sym2 {x : Fin n // x ∈ W} ↪ Sym2 (Fin n) := (Function.Embedding.subtype (fun x : Fin n => x ∈ W)).sym2Map; simple_graph_triangle_packing_number H = simple_graph_triangle_packing_number G ∧ (∀ e f : Sym2 {x : Fin n // x ∈ W}, e ∈ H.edgeSet → f ∈ H.edgeSet → simple_graph_triangle_packing_number (H.deleteEdges {e, f}) = simple_graph_triangle_packing_number (G.deleteEdges {emb e, emb f})) ∧ (∀ P : Finset (Finset (Sym2 {x : Fin n // x ∈ W})), P ⊆ simple_graph_triangle_edge_family H → P.card = simple_graph_triangle_packing_number H → (P : Set (Finset (Sym2 {x : Fin n // x ∈ W}))).Pairwise Disjoint → ∀ p ∈ P, (p ⊆ (((simple_graph_triangle_edge_family H).filter (fun t => (t ∩ P.biUnion id).card = 1)).biUnion id) ↔ p.map emb ⊆ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ (P.image (fun q => q.map emb)).biUnion id).card = 1)).biUnion id)))
simple_graph_triangle_packing_remap_into_representativesIn LeanGraph Theory & Graph Algorithms

A triangle packing of size at most k can be remapped into a superset W of its support set S, while avoiding at most two specified edges, provided every omitted triangle has a pair of S-vertices with at least k+2 available common neighbors in W outside S and every original triangle has at most one vertex outside S.

theorem simple_graph_triangle_packing_remap_into_representatives {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (S W : Finset V) (hSW : S ⊆ W) (k : ℕ) (D : Finset (Sym2 V)) (hD : D.card ≤ 2) (R : Finset (Finset V)) (hR : ∀ t ∈ R, G.IsNClique 3 t) (hpair : (R : Set (Finset V)).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hcard : R.card ≤ k) (houtside : ∀ t ∈ R, (t \ S).card ≤ 1) (havoid : ∀ t ∈ R, ∀ a ∈ t, ∀ b ∈ t, a ≠ b → s(a,b) ∉ D) (hbooks : ∀ t ∈ R, ¬ t ⊆ W → ∃ a ∈ S, ∃ b ∈ S, a ≠ b ∧ a ∈ t ∧ b ∈ t ∧ k + 2 ≤ ((W \ S).filter (fun y => G.Adj a y ∧ G.Adj b y)).card) : ∃ R' : Finset (Finset V), R'.card = R.card ∧ (∀ t ∈ R', G.IsNClique 3 t ∧ t ⊆ W ∧ ∀ a ∈ t, ∀ b ∈ t, a ≠ b → s(a,b) ∉ D) ∧ (R' : Set (Finset V)).Pairwise (fun t u => (t ∩ u).card ≤ 1)
simple_graph_triangle_singleton_witness_relocateIn LeanGraph Theory & Graph Algorithms

A singleton-forcing triangle outside W can be relocated into W while preserving its exact packed-edge intersection, if it has k+1 retained outside-support common neighbors and the packing uses at most k outside-support vertices.

theorem simple_graph_triangle_singleton_witness_relocate {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (S W : Finset V) (hSW : S ⊆ W) (k : ℕ) (R : Finset (Finset V)) (hcard : R.card ≤ k) (houtside : ∀ t ∈ R, (t \ S).card ≤ 1) (hwithin : R.biUnion id ⊆ W) (a b x : V) (ha : a ∈ S) (hb : b ∈ S) (hab : a ≠ b) (hx : x ∉ W) (htri : G.IsNClique 3 ({a,b,x} : Finset V)) (hsingle : (finite_vertex_set_edge_encoding ({a,b,x} : Finset V) ∩ R.biUnion finite_vertex_set_edge_encoding).card = 1) (hbooks : k + 1 ≤ ((W \ S).filter (fun y => G.Adj a y ∧ G.Adj b y)).card) : ∃ y ∈ W \ S, G.Adj a y ∧ G.Adj b y ∧ finite_vertex_set_edge_encoding ({a,b,y} : Finset V) ∩ R.biUnion finite_vertex_set_edge_encoding = {s(a,b)}
simple_graph_two_edge_stable_five_triangle_outside_packing_exampleIn LeanGraph Theory & Graph Algorithms

There is a ten-vertex two-edge-stable graph of triangle packing number eight, with the specified maximum packing avoiding vertex zero, whose neighborhood is exactly vertices one through five and induces a five-cycle. Consequently that outside vertex spans exactly five packed edges and belongs to exactly five triangles.

theorem simple_graph_two_edge_stable_five_triangle_outside_packing_example : let P : Finset (Finset (Fin 10)) := {{1,2,9},{1,5,8},{2,3,7},{2,6,8},{3,4,6},{3,8,9},{4,5,9},{5,6,7}}; ∃ G : SimpleGraph (Fin 10), (∀ t ∈ P, G.IsNClique 3 t) ∧ (P : Set (Finset (Fin 10))).Pairwise (fun t u => (t ∩ u).card ≤ 1) ∧ P.card = 8 ∧ simple_graph_triangle_packing_number G = 8 ∧ (∀ e f : Sym2 (Fin 10), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) ∧ (0 : Fin 10) ∉ P.biUnion id ∧ (∀ v : Fin 10, G.Adj 0 v ↔ v ∈ ({1,2,3,4,5} : Finset (Fin 10))) ∧ (∀ u ∈ ({1,2,3,4,5} : Finset (Fin 10)), ∀ v ∈ ({1,2,3,4,5} : Finset (Fin 10)), G.Adj u v ↔ s(u,v) ∈ ({s(1,2),s(2,3),s(3,4),s(4,5),s(5,1)} : Finset (Sym2 (Fin 10))))
simple_graph_two_edge_stable_good_packing_five_triangle_outside_exampleIn LeanGraph Theory & Graph Algorithms

There is a ten-vertex two-edge-stable graph with the displayed good maximum eight-triangle packing avoiding a vertex whose link is exactly a five-cycle. Each packed triangle has at most one singleton-forced packed edge.

theorem simple_graph_two_edge_stable_good_packing_five_triangle_outside_example : let P : Finset (Finset (Fin 10)) := {{1,2,9},{1,5,8},{2,3,7},{2,6,8},{3,4,6},{3,8,9},{4,5,9},{5,6,7}}; ∃ G : SimpleGraph (Fin 10), (∀ t ∈ P, G.IsNClique 3 t) ∧ (P : Set (Finset (Fin 10))).Pairwise (fun t u => (t ∩ u).card ≤ 1) ∧ P.card = 8 ∧ simple_graph_triangle_packing_number G = 8 ∧ (∀ p ∈ P, (finite_vertex_set_edge_encoding p ∩ (((simple_graph_triangle_edge_family G).filter (fun t => (t ∩ P.biUnion finite_vertex_set_edge_encoding).card = 1)).biUnion id)).card ≤ 1) ∧ (∀ e f : Sym2 (Fin 10), e ∈ G.edgeSet → f ∈ G.edgeSet → e ≠ f → simple_graph_triangle_packing_number (G.deleteEdges {e,f}) = simple_graph_triangle_packing_number G) ∧ (0 : Fin 10) ∉ P.biUnion id ∧ (∀ v : Fin 10, G.Adj 0 v ↔ v ∈ ({1,2,3,4,5} : Finset (Fin 10))) ∧ (∀ u ∈ ({1,2,3,4,5} : Finset (Fin 10)), ∀ v ∈ ({1,2,3,4,5} : Finset (Fin 10)), G.Adj u v ↔ s(u,v) ∈ ({s(1,2),s(2,3),s(3,4),s(4,5),s(5,1)} : Finset (Sym2 (Fin 10))))
simple_graph_two_edge_stable_single_exchange_trap_counterexampleIn LeanGraph Theory & Graph Algorithms

There is a connected 27-vertex graph with 93 edges, packing number 23, all edge pairs avoidable by maximum packings, at least two triangles per edge, and a vertex of degree at least 20, together with a maximum packing containing a fully forced triangle such that no one-triangle exchange leads to a maximum packing without forced triangles.

theorem simple_graph_two_edge_stable_single_exchange_trap_counterexample :
    ∃ (G : SimpleGraph (Fin 27)) (E : Finset (Sym2 (Fin 27)))
      (P : Finset (Finset (Sym2 (Fin 27)))),
      let F := simple_graph_triangle_edge_family G
      (↑E : Set (Sym2 (Fin 27))) = G.edgeSet ∧ E.card = 93 ∧
      G.Connected ∧
      (∀ Q : Finset (Finset (Sym2 (Fin 27))), Q ⊆ F →
        (Q : Set (Finset (Sym2 (Fin 27)))).Pairwise Disjoint → Q.card ≤ 23) ∧
      P ⊆ F ∧ P.card = 23 ∧
      (P : Set (Finset (Sym2 (Fin 27)))).Pairwise Disjoint ∧
      (∀ e ∈ G.edgeSet, ∀ f ∈ G.edgeSet, e ≠ f →
        ∃ Q : Finset (Finset (Sym2 (Fin 27))), Q ⊆ F ∧ Q.card = 23 ∧
          (Q : Set (Finset (Sym2 (Fin 27)))).Pairwise Disjoint ∧
          e ∉ Q.biUnion id ∧ f ∉ Q.biUnion id) ∧
      (∀ e ∈ G.edgeSet, 2 ≤ (F.filter (fun t => e ∈ t)).card) ∧
      (∃ v : Fin 27, ∃ N : Finset (Fin 27),
        N.card = 20 ∧ ∀ w ∈ N, G.Adj v w) ∧
      (∃ p ∈ P, p ⊆ ((F.filter (fun t => (t ∩ P.biUnion id).card = 1)).biUnion id)) ∧
      ∀ Q : Finset (Finset (Sym2 (Fin 27))), Q ⊆ F → Q.card = 23 →
        (Q : Set (Finset (Sym2 (Fin 27)))).Pairwise Disjoint →
        (P \ Q).card = 1 →
        ∃ q ∈ Q, q ⊆ ((F.filter (fun t => (t ∩ Q.biUnion id).card = 1)).biUnion id)
simple_graph_two_regular_and_odd_components_of_odd_leap_groupIn LeanGraph Theory & Graph Algorithms

If G admits a hop and its leap group has odd order, then G is 2-regular and every connected component has an odd number of vertices.

theorem simple_graph_two_regular_and_odd_components_of_odd_leap_group {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hG : ∃ h, simple_graph_is_hop G h)
    (hc : Odd (Nat.card (simple_graph_leap_group G))) :
    (∀ v, G.degree v = 2) ∧ ∀ v, Odd (G.connectedComponentMk v).supp.ncard
simple_graph_two_regular_and_odd_components_of_traversedIn LeanGraph Theory & Graph Algorithms

If a hop of odd order traverses every edge (for every edge uv, h u = v or h v = u), then G is 2-regular and every connected component has an odd number of vertices.

theorem simple_graph_two_regular_and_odd_components_of_traversed {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (h : Equiv.Perm V) (hh : simple_graph_is_hop G h)
    (hodd : Odd (orderOf h))
    (htrav : ∀ u v, G.Adj u v → h u = v ∨ h v = u) :
    (∀ v, G.degree v = 2) ∧ ∀ v, Odd (G.connectedComponentMk v).supp.ncard
simple_graph_two_side_avg_clique_pair_minIn LeanGraph Theory & Graph Algorithms

For a,b ≥ 4, the two-clique pair value is at least the K4|K_{a+b−4} model value, with equality iff a=4 or b=4.

theorem simple_graph_two_side_avg_clique_pair_min (a b : ℕ) (ha : 4 ≤ a) (hb : 4 ≤ b) :
    (((32 + (a + b + 24) * 2 ^ (a + b - 5) + (a + b - 5) * 2 ^ (a + b - 3) : ℕ) : ℚ)
      / ((5 * 2 ^ (a + b - 4) + 14 : ℕ) : ℚ))
    ≤ (((a * 2 ^ (a - 1) + b * 2 ^ (b - 1)
        + 2 ^ (b - 1) * ((a + 1) * 2 ^ (a - 2))
        + 2 ^ (a - 1) * ((b + 1) * 2 ^ (b - 2)) : ℕ) : ℚ)
      / ((2 ^ a - 1 + (2 ^ b - 1) + 2 ^ (a - 1) * 2 ^ (b - 1) : ℕ) : ℚ)) ∧
    ((((a * 2 ^ (a - 1) + b * 2 ^ (b - 1)
        + 2 ^ (b - 1) * ((a + 1) * 2 ^ (a - 2))
        + 2 ^ (a - 1) * ((b + 1) * 2 ^ (b - 2)) : ℕ) : ℚ)
      / ((2 ^ a - 1 + (2 ^ b - 1) + 2 ^ (a - 1) * 2 ^ (b - 1) : ℕ) : ℚ)) =
      (((32 + (a + b + 24) * 2 ^ (a + b - 5) + (a + b - 5) * 2 ^ (a + b - 3) : ℕ) : ℚ)
      / ((5 * 2 ^ (a + b - 4) + 14 : ℕ) : ℚ))
      → a = 4 ∨ b = 4)
simple_graph_two_side_avg_commIn LeanGraph Theory & Graph Algorithms

The pair value is symmetric in the two sides: R(G,G',u,v) = R(G',G,v,u).

theorem simple_graph_two_side_avg_comm {V W : Type*} [Fintype V] [Fintype W]
    [DecidableEq V] [DecidableEq W]
    (G : SimpleGraph V) (G' : SimpleGraph W) (u : V) (v : W) :
    simple_graph_two_side_avg G G' u v = simple_graph_two_side_avg G' G v u
simple_graph_two_side_avg_ge_topIn LeanGraph Theory & Graph Algorithms

One-sided compression: for a fixed partner H2, replacing one side H1 by the complete graph on the same vertex set does not increase the pair value, and H1 = ⊤ is the unique minimiser.

theorem simple_graph_two_side_avg_ge_top {V W : Type*} [Fintype V] [Fintype W]
    [DecidableEq V] [DecidableEq W]
    (H₁ : SimpleGraph V) [DecidableRel H₁.Adj] (H₂ : SimpleGraph W) [DecidableRel H₂.Adj]
    (u : V) (v : W) (hV : 4 ≤ Fintype.card V) (hW : 4 ≤ Fintype.card W)
    (hc₁ : H₁.Connected) (hc₂ : H₂.Connected)
    (hd₁ : ∀ x, x ≠ u → 3 ≤ H₁.degree x) (hu₁ : 2 ≤ H₁.degree u)
    (hd₂ : ∀ x, x ≠ v → 3 ≤ H₂.degree x) (hu₂ : 2 ≤ H₂.degree v) :
    simple_graph_two_side_avg (⊤ : SimpleGraph V) H₂ u v ≤
      simple_graph_two_side_avg H₁ H₂ u v ∧
    (simple_graph_two_side_avg H₁ H₂ u v = simple_graph_two_side_avg (⊤ : SimpleGraph V) H₂ u v →
      H₁ = ⊤)
simple_graph_two_side_avg_top_closed_formIn LeanGraph Theory & Graph Algorithms

For complete sides, N = 2^m−1, S = m·2^(m−1), P = 2^(m−1), Q = (m+1)·2^(m−2), giving the stated closed form of R(⊤,⊤,u,v) with m=|V| and m'=|W|.

theorem simple_graph_two_side_avg_top_closed_form {V W : Type*} [Fintype V] [Fintype W]
    [DecidableEq V] [DecidableEq W]
    (u : V) (v : W) (hV : 2 ≤ Fintype.card V) (hW : 2 ≤ Fintype.card W) :
    simple_graph_two_side_avg (⊤ : SimpleGraph V) (⊤ : SimpleGraph W) u v =
      (((Fintype.card V * 2 ^ (Fintype.card V - 1) + Fintype.card W * 2 ^ (Fintype.card W - 1)
        + 2 ^ (Fintype.card W - 1) * ((Fintype.card V + 1) * 2 ^ (Fintype.card V - 2))
        + 2 ^ (Fintype.card V - 1) * ((Fintype.card W + 1) * 2 ^ (Fintype.card W - 2)) : ℕ) : ℚ)
      / ((2 ^ Fintype.card V - 1 + (2 ^ Fintype.card W - 1)
        + 2 ^ (Fintype.card V - 1) * 2 ^ (Fintype.card W - 1) : ℕ) : ℚ))
simple_graph_two_side_avg_top_geIn LeanGraph Theory & Graph Algorithms

For two complete sides of orders a, b ≥ 4, the pair value is at least A(K4|K_{a+b−4}), and equality forces one side to have order 4. Here a = |V|, b = |W|.

theorem simple_graph_two_side_avg_top_ge {V W : Type*} [Fintype V] [Fintype W]
    [DecidableEq V] [DecidableEq W]
    (u : V) (v : W) (hV : 4 ≤ Fintype.card V) (hW : 4 ≤ Fintype.card W) :
    simple_graph_avg_connected_induced_order
        (simple_graph_clique_four_bridge_clique (Fintype.card V + Fintype.card W)) ≤
      simple_graph_two_side_avg (⊤ : SimpleGraph V) (⊤ : SimpleGraph W) u v ∧
    (simple_graph_two_side_avg (⊤ : SimpleGraph V) (⊤ : SimpleGraph W) u v =
      simple_graph_avg_connected_induced_order
        (simple_graph_clique_four_bridge_clique (Fintype.card V + Fintype.card W)) →
      Fintype.card V = 4 ∨ Fintype.card W = 4)
simple_graph_universal_vertex_hamiltonian_of_spanning_pathIn LeanGraph Theory & Graph Algorithms

If u is adjacent to every other vertex of G and the graph obtained by deleting u has a Hamiltonian (spanning) path, then G is Hamiltonian.

theorem simple_graph_universal_vertex_hamiltonian_of_spanning_path {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (u : V) (hu : ∀ w : V, w ≠ u → G.Adj u w) (hV : 3 ≤ Fintype.card V) (a b : {v : V // v ≠ u}) (p : (G.induce {v : V | v ≠ u}).Walk a b) (hp : p.IsHamiltonian) : G.IsHamiltonian
simple_graph_upper_k_star_forming_le_k_independence_number_of_minimal_boundIn LeanGraph Theory & Graph Algorithms

If every minimal k-star-forming vertex set of G has cardinality at most β_k(G), then SF_k(G) ≤ β_k(G).

theorem simple_graph_upper_k_star_forming_le_k_independence_number_of_minimal_bound {V : Type*}
    (G : SimpleGraph V) (k : ℕ)
    (h : ∀ S : Finset V, simple_graph_is_minimal_k_star_forming G k S →
      S.card ≤ simple_graph_k_independence_number G k) :
    simple_graph_upper_k_star_forming_number G k ≤ simple_graph_k_independence_number G k
simple_graph_vertex_dominated_of_open_neighborhood_is_coneIn LeanGraph Theory & Graph Algorithms

If the open neighbourhood subgraph $H[N_H(u)]$ of a vertex $u$ in a simple graph $H$ is a cone, then $u$ is dominated by another vertex in $H$.

theorem simple_graph_vertex_dominated_of_open_neighborhood_is_cone {V : Type*} (H : SimpleGraph V) (u : V)
    (hcone : simple_graph_is_cone (H.induce (H.neighborSet u))) :
    simple_graph_vertex_dominated H u
simple_graph_vertex_isolated_packed_k4_decreases_packingIn LeanGraph Theory & Graph Algorithms

If a maximum triangle packing contains abc vertex-disjoint from every other packing triangle, and abcx is a four-clique, then deleting the opposite edges ab and cx decreases the packing number, regardless of whether x belongs to another packing triangle.

theorem simple_graph_vertex_isolated_packed_k4_decreases_packing (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (a b c x : Fin n) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hp : ({a,b,c} : Finset (Fin n)) ∈ P) (hisolated : ∀ t ∈ P, t ≠ ({a,b,c} : Finset (Fin n)) → Disjoint t ({a,b,c} : Finset (Fin n))) (hk4 : G.IsNClique 4 ({a,b,c,x} : Finset (Fin n))) : simple_graph_triangle_packing_number (G.deleteEdges {s(a,b), s(c,x)}) < simple_graph_triangle_packing_number G
simple_graph_walk_isPath_appendIn LeanGraph Theory & Graph Algorithms

If p is a path from a to b, q is a path from b to c, and q's support after its first vertex is disjoint from p's support, then p appended to q is a path.

theorem simple_graph_walk_isPath_append {V : Type*} {G : SimpleGraph V} {a b c : V} (p : G.Walk a b) (q : G.Walk b c) (hp : p.IsPath) (hq : q.IsPath) (hdisj : ∀ x ∈ q.support.tail, x ∉ p.support) : (p.append q).IsPath
simple_graph_walk_isPath_extend_endpointIn LeanGraph Theory & Graph Algorithms

A path from a to b can be extended by one step past b to a vertex w off its support: if w is not on the path and is adjacent to b, then there is a path from a to w of length one more than the given path.

theorem simple_graph_walk_isPath_extend_endpoint {V : Type*} {G : SimpleGraph V} {a b w : V} (p : G.Walk a b) (hp : p.IsPath) (hw : w ∉ p.support) (hadj : G.Adj b w) : ∃ q : G.Walk a w, q.IsPath ∧ q.length = p.length + 1
simple_graph_walk_isPath_max_length_adj_endpoint_mem_supportIn LeanGraph Theory & Graph Algorithms

On a longest path a ~> b, every neighbour of b already lies on the path.

theorem simple_graph_walk_isPath_max_length_adj_endpoint_mem_support {V : Type*} {G : SimpleGraph V} {a b : V} (p : G.Walk a b) (hp : p.IsPath) (hmax : ∀ (c d : V) (q : G.Walk c d), q.IsPath → q.length ≤ p.length) : ∀ w : V, G.Adj b w → w ∈ p.support
sparse_strong_odd_five_list_coloring_stepIn LeanGraph Theory & Graph Algorithms

If every graph on strictly fewer vertices with maximum average degree below 7/3 is strongly odd 5-list-colourable, then so is any graph G with has_mad_lt G (7/3).

theorem sparse_strong_odd_five_list_coloring_step {V : Type} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hIH : ∀ (W : Type) [Fintype W] [DecidableEq W] (G' : SimpleGraph W) [DecidableRel G'.Adj],
        Fintype.card W < Fintype.card V → has_mad_lt G' (7 / 3) → is_strong_odd_list_colorable G' 5)
    (hmad : has_mad_lt G (7 / 3)) :
    is_strong_odd_list_colorable G 5
spectral_extremal_clique_chromatic_one_twoIn LeanGraph Theory & Graph Algorithms

For any real number r ≥ 1, the extremal clique number and chromatic number under adjacency spectral radius constraint r satisfy ω_λ(1, r) = χ_λ(1, r) = 1 + ⌊r⌋ and ω_λ(2, r) = χ_λ(2, r) = 1 + ⌊r²⌋.

theorem spectral_extremal_clique_chromatic_one_two (r : ℝ) (hr : 1 ≤ r) :
    spectral_extremal_clique_num 1 r = 1 + ⌊r⌋₊ ∧
    spectral_extremal_chromatic_number 1 r = 1 + ⌊r⌋₊ ∧
    spectral_extremal_clique_num 2 r = 1 + ⌊r ^ 2⌋₊ ∧
    spectral_extremal_chromatic_number 2 r = 1 + ⌊r ^ 2⌋₊
spectral_moore_degree_sum_le_of_adj_quadform_leIn LeanGraph Theory & Graph Algorithms

Let θ ≥ 1, d0 a natural number and ε > 0. There is N such that every simple graph F on Fin n with n ≥ N, all degrees at most d0, and x ⬝ᵥ (F.adjMatrix ℝ *ᵥ x) ≤ θ * (x ⬝ᵥ x) for every x : Fin n → ℝ with ∑ x = 0, has degree sum ∑ v, F.degree v ≤ n (1 + θ²/4 + ε); that is, the average degree is eventually at most 1 + θ²/4 + ε.

open Classical SimpleGraph Matrix in
theorem spectral_moore_degree_sum_le_of_adj_quadform_le (θ : ℝ) (hθ : 1 ≤ θ) (d0 : ℕ)
    (ε : ℝ) (hε : 0 < ε) :
    ∃ N : ℕ, ∀ (n : ℕ) (F : SimpleGraph (Fin n)), N ≤ n → (∀ v, F.degree v ≤ d0) →
      (∀ x : Fin n → ℝ, ∑ i, x i = 0 → x ⬝ᵥ (F.adjMatrix ℝ *ᵥ x) ≤ θ * (x ⬝ᵥ x)) →
      ∑ v, (F.degree v : ℝ) ≤ n * (1 + θ ^ 2 / 4 + ε)
spectral_moore_exists_seidel_switch_max_degree_leIn LeanGraph Theory & Graph Algorithms

Let θ ≥ 1 and let G be a k-regular finite simple graph on a vertex type V with n = |V| ≥ 2k + 2 vertices and second largest adjacency eigenvalue at most θ. If n > a(a-1)/2 with a = 4θ(θ+1), then some Seidel switching spectral_moore_seidel_switch G X (X : Set V) has every vertex degree at most ⌈θ³ + 3θ²/2 + 3θ/2⌉₊ - 1.

open Classical SimpleGraph in
theorem spectral_moore_exists_seidel_switch_max_degree_le {V : Type*} [Fintype V]
    (G : SimpleGraph V) (k : ℕ) (θ : ℝ) (hθ1 : 1 ≤ θ) (hreg : G.IsRegularOfDegree k)
    (hθ : spectral_moore_second_eigenvalue_le G θ) (hn : 2 * k + 2 ≤ Fintype.card V)
    (hbig : 4 * θ * (θ + 1) * (4 * θ * (θ + 1) - 1) / 2 < Fintype.card V) :
    ∃ X : Set V, ∀ v, (spectral_moore_seidel_switch G X).degree v ≤
      ⌈θ ^ 3 + 3 * θ ^ 2 / 2 + 3 * θ / 2⌉₊ - 1
spectral_moore_psd_of_second_eigenvalue_leIn LeanGraph Theory & Graph Algorithms

Let θ ≥ 1, let G be a k-regular finite simple graph on V with second largest adjacency eigenvalue at most θ and 2k + 2 ≤ |V|, and let α = 1/(2θ+1). Then the matrix I + α(J − I − 2A_G) is positive semidefinite: every x : V → ℝ satisfies 0 ≤ xᵀ(I + α(J − I − 2A_G))x = (1−α)xᵀx + α(∑x)² − 2α xᵀA_Gx.

open Classical SimpleGraph Matrix in
theorem spectral_moore_psd_of_second_eigenvalue_le {V : Type*} [Fintype V]
    (G : SimpleGraph V) (k : ℕ) (θ : ℝ) (hθ : 1 ≤ θ) (hreg : G.IsRegularOfDegree k)
    (hlam : spectral_moore_second_eigenvalue_le G θ) (hn : 2 * k + 2 ≤ Fintype.card V)
    (x : V → ℝ) :
    0 ≤ (1 - (2 * θ + 1)⁻¹) * (x ⬝ᵥ x) + (2 * θ + 1)⁻¹ * (∑ v, x v) ^ 2
        - 2 * (2 * θ + 1)⁻¹ * (x ⬝ᵥ (G.adjMatrix ℝ *ᵥ x))
spectral_moore_quadform_le_add_degree_termIn LeanGraph Theory & Graph Algorithms

Let θ ≥ 1, let F be a simple graph on Fin n (n > 0) with maximum degree at most d0 whose adjacency form satisfies zᵀA_Fz ≤ θ zᵀz on all vectors with coordinate sum zero. Then for every nonnegative unit vector x : Fin n → ℝ supported in a finite set S, the energy xᵀA_Fx exceeds θ by at most 2·d0·|S|/n.

open Classical SimpleGraph Matrix in
theorem spectral_moore_quadform_le_add_degree_term {n : ℕ} (F : SimpleGraph (Fin n))
    (θ : ℝ) (hθ : 1 ≤ θ) (d0 : ℕ) (hdeg : ∀ v, F.degree v ≤ d0)
    (hquad : ∀ z : Fin n → ℝ, ∑ i, z i = 0 → z ⬝ᵥ (F.adjMatrix ℝ *ᵥ z) ≤ θ * (z ⬝ᵥ z))
    (S : Finset (Fin n)) (x : Fin n → ℝ) (hx0 : ∀ v, 0 ≤ x v) (hx1 : x ⬝ᵥ x = 1)
    (hsupp : ∀ v, v ∉ S → x v = 0) (hn : 0 < n) :
    x ⬝ᵥ (F.adjMatrix ℝ *ᵥ x) - 2 * (d0 : ℝ) * (S.card : ℝ) / (n : ℝ) ≤ θ
spectral_radius_eq_nnnorm_toEuclideanCLMIn LeanGraph Theory & Graph Algorithms

The adjacency spectral radius of a finite simple graph G equals the operator norm of the continuous linear map induced by its adjacency matrix on Euclidean space.

attribute [local instance] Classical.propDecidable in
theorem spectral_radius_eq_nnnorm_toEuclideanCLM {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) :
    adjacency_spectral_radius G =
      ‖Matrix.toEuclideanCLM (𝕜 := ℝ) (n := V) (G.adjMatrix ℝ)‖₊
spectral_radius_power_two_le_sqIn LeanGraph Theory & Graph Algorithms

The adjacency spectral radius of the square of a finite simple graph G is at most the square of the adjacency spectral radius of G.

theorem spectral_radius_power_two_le_sq {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) :
    adjacency_spectral_radius (simple_graph_power G 2) ≤ (adjacency_spectral_radius G) ^ 2
spectral_wegner_equality_k_ge_three_le_sqrt_two_add_sqrt_fiveIn LeanGraph Theory & Graph Algorithms

For every natural number k ≥ 3 and real number r such that 1 ≤ r and r ≤ Real.sqrt (2 + Real.sqrt 5), the extremal distance-k clique number spectral_extremal_clique_num k r equals the extremal distance-k chromatic number spectral_extremal_chromatic_number k r.

theorem spectral_wegner_equality_k_ge_three_le_sqrt_two_add_sqrt_five
    (k : ℕ) (hk : 3 ≤ k) (r : ℝ) (hr1 : 1 ≤ r) (hr2 : r ≤ Real.sqrt (2 + Real.sqrt 5)) :
    spectral_extremal_clique_num k r = spectral_extremal_chromatic_number k r
spectral_wegner_equality_k_ge_three_le_three_div_sqrt_twoIn LeanGraph Theory & Graph Algorithms

For every natural number k ≥ 3 and real number r such that 1 ≤ r and r ≤ 3 / Real.sqrt 2, the extremal distance-k clique number spectral_extremal_clique_num k r equals the extremal distance-k chromatic number spectral_extremal_chromatic_number k r.

theorem spectral_wegner_equality_k_ge_three_le_three_div_sqrt_two
    (k : ℕ) (hk : 3 ≤ k) (r : ℝ) (hr1 : 1 ≤ r) (hr2 : r ≤ 3 / Real.sqrt 2) :
    spectral_extremal_clique_num k r = spectral_extremal_chromatic_number k r
spectral_wegner_equality_k_one_le_sqrt_two_add_sqrt_fiveIn LeanGraph Theory & Graph Algorithms

For every real number r such that 1 ≤ r and r ≤ Real.sqrt (2 + Real.sqrt 5), the extremal distance-1 clique number spectral_extremal_clique_num 1 r equals the extremal distance-1 chromatic number spectral_extremal_chromatic_number 1 r.

theorem spectral_wegner_equality_k_one_le_sqrt_two_add_sqrt_five
    (r : ℝ) (hr1 : 1 ≤ r) (hr2 : r ≤ Real.sqrt (2 + Real.sqrt 5)) :
    spectral_extremal_clique_num 1 r = spectral_extremal_chromatic_number 1 r
spectral_wegner_equality_k_two_le_sqrt_two_add_sqrt_fiveIn LeanGraph Theory & Graph Algorithms

For every real number r such that 1 ≤ r and r ≤ Real.sqrt (2 + Real.sqrt 5), the extremal distance-2 clique number spectral_extremal_clique_num 2 r equals the extremal distance-2 chromatic number spectral_extremal_chromatic_number 2 r.

theorem spectral_wegner_equality_k_two_le_sqrt_two_add_sqrt_five
    (r : ℝ) (hr1 : 1 ≤ r) (hr2 : r ≤ Real.sqrt (2 + Real.sqrt 5)) :
    spectral_extremal_clique_num 2 r = spectral_extremal_chromatic_number 2 r
standardized_laplacian_order_four_im_leIn LeanGraph Theory & Graph Algorithms

For any standardized Laplacian matrix L of order 4, the imaginary part of every complex eigenvalue z of L satisfies |Im(z)| ≤ 1/4.

theorem standardized_laplacian_order_four_im_le (L : Matrix (Fin 4) (Fin 4) ℝ)
    (hL : is_standardized_laplacian 4 L)
    (z : ℂ) (hz : z ∈ spectrum ℂ (L.map (algebraMap ℝ ℂ))) :
    |z.im| ≤ (1 : ℝ) / 4
standardized_laplacian_order_four_two_fractional_im_leIn LeanGraph Theory & Graph Algorithms

For an order-4 standardized Laplacian L in which every row has at most two strictly fractional off-diagonal entries, every complex eigenvalue z has |Im z| ≤ 1/4.

theorem standardized_laplacian_order_four_two_fractional_im_le (L : Matrix (Fin 4) (Fin 4) ℝ)
    (hL : is_standardized_laplacian_two_fractional 4 L) (z : ℂ)
    (hz : z ∈ spectrum ℂ (L.map (algebraMap ℝ ℂ))) :
    |z.im| ≤ (1 : ℝ) / 4
star_graph_fin_iso_completeBipartiteGraphIn LeanGraph Theory & Graph Algorithms

For n ≥ 2, the star graph centered at any vertex u of Fin n is isomorphic to the complete bipartite graph completeBipartiteGraph (Fin 1) (Fin (n - 1)).

theorem star_graph_fin_iso_completeBipartiteGraph (n : ℕ) (hn : 2 ≤ n) (u : Fin n) : Nonempty (SimpleGraph.starGraph u ≃g completeBipartiteGraph (Fin 1) (Fin (n - 1)))
star_token_graph_perfect_dominating_set_iff_steiner_systemIn LeanGraph Theory & Graph Algorithms

Let k ≥ 2. The k-token graph of SimpleGraph.starGraph (none : Option (Fin (2 * k - 1))) has a perfect dominating set if and only if there exists a Steiner system on Fin (2 * k - 1) with parameters t = k - 2 and r = k - 1. Moreover, for any such Steiner system S, star_token_steiner_dominating_set S is a perfect dominating set of the k-token graph of SimpleGraph.starGraph (none : Option (Fin (2 * k - 1))) with Set.ncard equal to catalan k.

theorem star_token_graph_perfect_dominating_set_iff_steiner_system (k : ℕ) (hk : 2 ≤ k) :
    ((∃ D : Set { s : Finset (Option (Fin (2 * k - 1))) // s.card = k },
      simple_graph_is_perfect_dominating
        (token_graph (SimpleGraph.starGraph (none : Option (Fin (2 * k - 1)))) k) D) ↔
    (∃ S : Set (Finset (Fin (2 * k - 1))), is_steiner_system (k - 2) (k - 1) S)) ∧
    ∀ S : Set (Finset (Fin (2 * k - 1))), is_steiner_system (k - 2) (k - 1) S →
      simple_graph_is_perfect_dominating
        (token_graph (SimpleGraph.starGraph (none : Option (Fin (2 * k - 1)))) k)
        (star_token_steiner_dominating_set S) ∧
      Set.ncard (star_token_steiner_dominating_set S) = catalan k
star_token_graph_steiner_system_of_perfect_dominatingIn LeanGraph Theory & Graph Algorithms

Let k ≥ 2. If there exists a set D of k-element finsets of Option (Fin (2 * k - 1)) that is a perfect dominating set of the k-token graph of SimpleGraph.starGraph (none : Option (Fin (2 * k - 1))), then there exists a Steiner system S on Fin (2 * k - 1) with parameters t = k - 2 and r = k - 1.

theorem star_token_graph_steiner_system_of_perfect_dominating
    (k : ℕ) (hk : 2 ≤ k)
    (hD : ∃ D : Set { s : Finset (Option (Fin (2 * k - 1))) // s.card = k },
      simple_graph_is_perfect_dominating
        (token_graph (SimpleGraph.starGraph (none : Option (Fin (2 * k - 1)))) k) D) :
    ∃ S : Set (Finset (Fin (2 * k - 1))), is_steiner_system (k - 2) (k - 1) S
star_token_steiner_dominating_set_is_perfect_dominatingIn LeanGraph Theory & Graph Algorithms

Let k ≥ 2. If S is a Steiner system with parameters t = k - 2 and r = k - 1 on Fin (2 * k - 1), then star_token_steiner_dominating_set S is a perfect dominating set of the k-token graph of SimpleGraph.starGraph (none : Option (Fin (2 * k - 1))), and Set.ncard (star_token_steiner_dominating_set S) = catalan k.

theorem star_token_steiner_dominating_set_is_perfect_dominating
    (k : ℕ) (hk : 2 ≤ k) (S : Set (Finset (Fin (2 * k - 1))))
    (hS : is_steiner_system (k - 2) (k - 1) S) :
    simple_graph_is_perfect_dominating
      (token_graph (SimpleGraph.starGraph (none : Option (Fin (2 * k - 1)))) k)
      (star_token_steiner_dominating_set S) ∧
    Set.ncard (star_token_steiner_dominating_set S) = catalan k
star_zero_forcing_poly_eqIn LeanGraph Theory & Graph Algorithms

For m ≥ 2 the zero forcing polynomial of the star K_{1,m} on the vertex set Unit ⊕ Fin m is m·X^{m-1} + (m+1)·X^m + X^{m+1}.

theorem star_zero_forcing_poly_eq (m : ℕ) (hm : 2 ≤ m) :
    zero_forcing_poly (completeBipartiteGraph Unit (Fin m)) =
      Polynomial.C m * Polynomial.X ^ (m - 1) + Polynomial.C (m + 1) * Polynomial.X ^ m +
        Polynomial.X ^ (m + 1)
star_zf_set_iff_leaf_countIn LeanGraph Theory & Graph Algorithms

For m ≥ 2, a set S of vertices of the star K_{1,m} (vertices Unit ⊕ Fin m, centre Sum.inl (), leaves Sum.inr x) is a zero forcing set if and only if S contains all but at most one of the m leaves, i.e. m - 1 ≤ #{x : Fin m | Sum.inr x ∈ S}.

theorem star_zf_set_iff_leaf_count (m : ℕ) (hm : 2 ≤ m) (S : Finset (Unit ⊕ Fin m)) :
    is_zero_forcing_set (completeBipartiteGraph Unit (Fin m)) (S : Set (Unit ⊕ Fin m)) ↔
      m - 1 ≤ (Finset.univ.filter (fun x : Fin m => (Sum.inr x : Unit ⊕ Fin m) ∈ S)).card
strong_odd_coloring_extend_leaf_vertexIn LeanGraph Theory & Graph Algorithms

Let g be a strong odd colouring of G - v and let v have at most one neighbour u, with the closed neighbourhood of v using at most 5 colours from a list L v of size at least 5; then some colour of L v can be inserted at v to give a strong odd colouring of G.

theorem strong_odd_coloring_extend_leaf_vertex {V κ : Type} [Fintype V] [DecidableEq V]
    [DecidableEq κ] (G : SimpleGraph V) [DecidableRel G.Adj] (v : V) (L : V → Finset κ)
    (g : V → κ) (hcard : 5 ≤ (L v).card)
    (hout : is_strong_odd_coloring (G.induce {x | x ≠ v}) (fun x => g x.1))
    (hdeg : G.degree v ≤ 1)
    (hnb : ∀ u ∈ G.neighborFinset v, G.degree u ≤ 4) :
    ∃ c ∈ L v, is_strong_odd_coloring G (Function.update g v c)
strong_odd_list_colorable_of_degree_le_twoIn LeanGraph Theory & Graph Algorithms

If every vertex of a finite simple graph G has degree at most 2, then for every assignment of colour lists of size at least 5, G has a strong odd colouring picking from the lists.

theorem strong_odd_list_colorable_of_degree_le_two {V : Type} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hdeg : ∀ v, G.degree v ≤ 2) :
    is_strong_odd_list_colorable G 5
strongly_regular_dist_eq_two_of_not_adjIn LeanGraph Theory & Graph Algorithms

In a connected, noncomplete strongly regular graph with parameters (n, k, ℓ, μ), any two distinct nonadjacent vertices are at distance 2.

theorem strongly_regular_dist_eq_two_of_not_adj {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {n k ℓ μ : ℕ}
    (hG : G.IsSRGWith n k ℓ μ) (hconn : G.Connected) (hnc : G ≠ ⊤)
    {u v : V} (hne : u ≠ v) (hna : ¬ G.Adj u v) :
    G.dist u v = 2
strongly_regular_geodesic_card_of_not_adjIn LeanGraph Theory & Graph Algorithms

In a connected, noncomplete strongly regular graph with parameters (n, k, ℓ, μ), the number of geodesics between any two distinct nonadjacent vertices is exactly μ.

theorem strongly_regular_geodesic_card_of_not_adj {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {n k ℓ μ : ℕ}
    (hG : G.IsSRGWith n k ℓ μ) (hconn : G.Connected) (hnc : G ≠ ⊤)
    {u v : V} (hne : u ≠ v) (hna : ¬ G.Adj u v) :
    Nat.card {p : G.Walk u v // is_geodesic p} = μ
strongly_regular_is_k_geodetic_iffIn LeanGraph Theory & Graph Algorithms

Let G be a connected, noncomplete strongly regular graph with parameters (n, k, ℓ, μ) on a finite vertex set, and let K ≥ 1 be an integer. Then G is K-geodetic if and only if μ ≤ K.

theorem strongly_regular_is_k_geodetic_iff {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {n k ℓ μ : ℕ}
    (hG : G.IsSRGWith n k ℓ μ) (hconn : G.Connected) (hnc : G ≠ ⊤)
    (K : ℕ) (hK : 1 ≤ K) :
    is_k_geodetic G K ↔ μ ≤ K
strongly_regular_mu_ne_zeroIn LeanGraph Theory & Graph Algorithms

In a connected, noncomplete strongly regular graph with parameters (n, k, ℓ, μ), the parameter μ is nonzero.

theorem strongly_regular_mu_ne_zero {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {n k ℓ μ : ℕ}
    (hG : G.IsSRGWith n k ℓ μ) (hconn : G.Connected) (hnc : G ≠ ⊤) :
    μ ≠ 0
subcubic_induce_V3_le_two_exists_degree_le_twoIn LeanGraph Theory & Graph Algorithms

A nonempty finite graph of maximum degree at most 3 in which the degree-3 vertices induce a subgraph of maximum degree at most 2 has a vertex of degree at most 2 (in particular it is never 3-regular, since then every vertex would be a degree-3 vertex whose induced degree is 3).

theorem subcubic_induce_V3_le_two_exists_degree_le_two
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (hV : Nonempty V)
    (hdeg : G.maxDegree ≤ 3)
    (h3 : (G.induce (simple_graph_V3 G : Set V)).maxDegree ≤ 2) :
    ∃ v : V, G.degree v ≤ 2
subcubic_max_indep_compl_maxDegree_le_twoIn LeanGraph Theory & Graph Algorithms

In any finite graph of maximum degree at most 3, the induced subgraph on the complement of any maximal independent set has maximum degree at most 2.

open SimpleGraph in
open scoped Classical in
theorem subcubic_max_indep_compl_maxDegree_le_two {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hdeg : G.maxDegree ≤ 3) (L : Finset V) (hL : Maximal G.IsIndepSet (L : Set V)) :
    (G.induce (Lᶜ : Set V)).maxDegree ≤ 2
subcubic_max_indep_compl_vertex_has_neighbor_inIn LeanGraph Theory & Graph Algorithms

If L is a maximum independent set, every vertex outside L has a neighbour in L.

open SimpleGraph in
theorem subcubic_max_indep_compl_vertex_has_neighbor_in {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (L : Finset V) (hL : G.IsMaximumIndepSet L) :
    ∀ v : V, v ∉ L → ∃ u ∈ L, G.Adj u v
subcubic_max_indep_compl_vertex_two_outside_neighborsIn LeanGraph Theory & Graph Algorithms

In a subcubic graph, a vertex outside a maximum independent set that is dominated by it has at most two neighbours outside the set.

open SimpleGraph in
theorem subcubic_max_indep_compl_vertex_two_outside_neighbors {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hdeg : G.maxDegree ≤ 3)
    (L : Finset V) (hA : ∀ v : V, v ∉ L → ∃ u ∈ L, G.Adj u v) :
    ∀ v : V, v ∉ L → (G.neighborFinset v \ L).card ≤ 2
subcubic_max_indep_single_swapIn LeanGraph Theory & Graph Algorithms

If a vertex v outside a maximum independent set L has exactly one neighbour u in L, then swapping u for v yields another maximum independent set.

open SimpleGraph in
theorem subcubic_max_indep_single_swap {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (L : Finset V) (hL : G.IsMaximumIndepSet L)
    (v : V) (hv : v ∉ L) (u : V) (hu : u ∈ L)
    (honly : ∀ u' ∈ L, G.Adj u' v → u' = u) :
    G.IsMaximumIndepSet (insert v (L.erase u))
subcubic_minDegree_two_induce_V3_le_two_exists_rich_neighbor_five_coloringIn LeanGraph Theory & Graph Algorithms

Every finite simple graph with minimum degree at least 2, maximum degree at most 3, and induced subgraph on the degree-3 vertices of maximum degree at most 2 (Delta(G[V_3]) <= 2) admits a rich-neighbor 5-edge-colouring. In such a graph every cubic vertex has a degree-2 neighbour, so the cubic-cubic edges form disjoint paths and cycles rather than a matching.

theorem subcubic_minDegree_two_induce_V3_le_two_exists_rich_neighbor_five_coloring {V : Type*}
    [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (hmin : ∀ v, 2 ≤ G.degree v) (hdeg : G.maxDegree ≤ 3)
    (h3 : (G.induce (simple_graph_V3 G : Set V)).maxDegree ≤ 2) :
    ∃ c : G.lineGraph.Coloring (Fin 5), simple_graph_is_rich_neighbor_coloring G c
subcubic_odd_girth_seven_max_indep_improveIn LeanGraph Theory & Graph Algorithms

Every maximum independent set L of a finite subcubic graph of odd girth at least 7 that has a complement component of order at least 6 can be replaced by another maximum independent set L' whose complement components have a strictly smaller sum of squares of orders.

open SimpleGraph in
open scoped Classical in
theorem subcubic_odd_girth_seven_max_indep_improve {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hdeg : G.maxDegree ≤ 3) (hog : simple_graph_odd_girth_ge G 7)
    (L : Finset V) (hL : G.IsMaximumIndepSet L)
    (hbig : ∃ C : (G.induce (Lᶜ : Set V)).ConnectedComponent, 6 ≤ Fintype.card C) :
    ∃ L' : Finset V, G.IsMaximumIndepSet L' ∧
      subcubic_partition_measure G L' < subcubic_partition_measure G L
subcubic_odd_girth_seven_partition_of_isBipartiteIn LeanGraph Theory & Graph Algorithms

Every finite bipartite simple graph admits a partition into an independent set L and R = Lᶜ such that every connected component of G[R] has order at most 5 (in fact at most 1).

open SimpleGraph in
open scoped Classical in
theorem subcubic_odd_girth_seven_partition_of_isBipartite {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hbip : G.IsBipartite) :
    ∃ L : Finset V, G.induce (L : Set V) = ⊥ ∧
      ∀ C : (G.induce (Lᶜ : Set V)).ConnectedComponent, Fintype.card C ≤ 5
subcubic_partition_of_improveIn LeanGraph Theory & Graph Algorithms

If every maximum independent set with a complement component of order at least 6 can be improved (strictly decreasing the sum of squares of complement component orders, while staying a maximum independent set), then G admits a partition into an independent set L whose complement components all have order at most 5.

open SimpleGraph in
open scoped Classical in
theorem subcubic_partition_of_improve {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (himprove : ∀ L : Finset V, G.IsMaximumIndepSet L →
      (∃ C : (G.induce (Lᶜ : Set V)).ConnectedComponent, 6 ≤ Fintype.card C) →
      ∃ L' : Finset V, G.IsMaximumIndepSet L' ∧
        subcubic_partition_measure G L' < subcubic_partition_measure G L) :
    ∃ L : Finset V, G.induce (L : Set V) = ⊥ ∧
      ∀ C : (G.induce (Lᶜ : Set V)).ConnectedComponent, Fintype.card C ≤ 5
subcubic_partition_of_improve_le_sixIn LeanGraph Theory & Graph Algorithms

If every maximum independent set with a complement component of order at least 7 can be strictly improved with respect to subcubic_partition_measure, then G admits an independent set L whose complement components all have order at most 6.

open SimpleGraph in
open scoped Classical in
theorem subcubic_partition_of_improve_le_six {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (himprove : ∀ L : Finset V, G.IsMaximumIndepSet L →
      (∃ C : (G.induce (Lᶜ : Set V)).ConnectedComponent, 7 ≤ open scoped Classical in Fintype.card C) →
      ∃ L' : Finset V, G.IsMaximumIndepSet L' ∧
        subcubic_partition_measure G L' < subcubic_partition_measure G L) :
    ∃ L : Finset V, G.induce (L : Set V) = ⊥ ∧
      ∀ C : (G.induce (Lᶜ : Set V)).ConnectedComponent,
        open scoped Classical in Fintype.card C ≤ 6
subcubic_rich_neighbor_five_degree_two_cubic_neighbor_extensionIn LeanGraph Theory & Graph Algorithms

Let v have degree 2 in a finite graph of maximum degree at most 3, with distinct neighbours u1, u2 at least one of which has degree 3. If the graph obtained by deleting v admits a rich-neighbor 5-edge-colouring, then so does G.

theorem subcubic_rich_neighbor_five_degree_two_cubic_neighbor_extension
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (v u₁ u₂ : V) (hdeg : G.maxDegree ≤ 3) (hv : G.degree v = 2)
    (h₁ : G.Adj v u₁) (h₂ : G.Adj v u₂) (hne : u₁ ≠ u₂)
    (hu : G.degree u₁ = 3 ∨ G.degree u₂ = 3)
    (hc : ∃ c : (G.induce {w : V | w ≠ v}).lineGraph.Coloring (Fin 5),
        simple_graph_is_rich_neighbor_coloring (G.induce {w : V | w ≠ v}) c) :
    ∃ c : G.lineGraph.Coloring (Fin 5), simple_graph_is_rich_neighbor_coloring G c
subcubic_rich_neighbor_five_degree_two_low_degree_neighbors_extensionIn LeanGraph Theory & Graph Algorithms

Let v have degree 2 in a finite graph of maximum degree at most 3, with two distinct neighbours u1, u2 both of degree at most 2. If the graph obtained by deleting v admits a rich-neighbor 5-edge-colouring, then so does G.

theorem subcubic_rich_neighbor_five_degree_two_low_degree_neighbors_extension
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (v u₁ u₂ : V) (hdeg : G.maxDegree ≤ 3) (hv : G.degree v = 2)
    (h₁ : G.Adj v u₁) (h₂ : G.Adj v u₂) (hne : u₁ ≠ u₂)
    (hu₁ : G.degree u₁ ≤ 2) (hu₂ : G.degree u₂ ≤ 2)
    (hc : ∃ c : (G.induce {w : V | w ≠ v}).lineGraph.Coloring (Fin 5),
        simple_graph_is_rich_neighbor_coloring (G.induce {w : V | w ≠ v}) c) :
    ∃ c : G.lineGraph.Coloring (Fin 5), simple_graph_is_rich_neighbor_coloring G c
subcubic_rich_neighbor_five_leaf_cubic_neighbor_extensionIn LeanGraph Theory & Graph Algorithms

Let v be a leaf of a finite graph of maximum degree at most 3 whose unique neighbour u has degree 3. If the graph obtained by deleting v admits a rich-neighbor 5-edge-colouring, then so does G.

theorem subcubic_rich_neighbor_five_leaf_cubic_neighbor_extension
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (v u : V) (hdeg : G.maxDegree ≤ 3) (hvu : G.Adj v u) (hv : G.degree v = 1)
    (hu : G.degree u = 3)
    (hc : ∃ c : (G.induce {w : V | w ≠ v}).lineGraph.Coloring (Fin 5),
        simple_graph_is_rich_neighbor_coloring (G.induce {w : V | w ≠ v}) c) :
    ∃ c : G.lineGraph.Coloring (Fin 5), simple_graph_is_rich_neighbor_coloring G c
subcubic_rich_neighbor_five_leaf_edge_extendIn LeanGraph Theory & Graph Algorithms

Let G be a finite simple graph with maximum degree at most 3, let v be a leaf of G with unique neighbour u (G.Adj v u and G.degree v = 1), and suppose that G with the edge uv deleted admits a rich-neighbor 5-edge-colouring. Then G admits one.

theorem subcubic_rich_neighbor_five_leaf_edge_extend {V : Type*}
    [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (v u : V)
    (hdeg : G.maxDegree ≤ 3) (hvu : G.Adj v u) (hleaf : G.degree v = 1)
    (hc : ∃ c : (G.deleteEdges {s(v, u)}).lineGraph.Coloring (Fin 5),
      simple_graph_is_rich_neighbor_coloring (G.deleteEdges {s(v, u)}) c) :
    ∃ c : G.lineGraph.Coloring (Fin 5), simple_graph_is_rich_neighbor_coloring G c
subcubic_rich_neighbor_five_leaf_low_degree_neighbor_extensionIn LeanGraph Theory & Graph Algorithms

Let v be a leaf of a finite graph of maximum degree at most 3, with unique neighbour u, and suppose u has degree at most 2. If the graph obtained by deleting v admits a rich-neighbor 5-edge-colouring, then so does G.

theorem subcubic_rich_neighbor_five_leaf_low_degree_neighbor_extension
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (v u : V) (hdeg : G.maxDegree ≤ 3) (hvu : G.Adj v u) (hv : G.degree v = 1)
    (hu : G.degree u ≤ 2)
    (hc : ∃ c : (G.induce {w : V | w ≠ v}).lineGraph.Coloring (Fin 5),
        simple_graph_is_rich_neighbor_coloring (G.induce {w : V | w ≠ v}) c) :
    ∃ c : G.lineGraph.Coloring (Fin 5), simple_graph_is_rich_neighbor_coloring G c
subcubic_rich_neighbor_five_of_card_eq_zeroIn LeanGraph Theory & Graph Algorithms

Every finite simple graph on an empty vertex type admits a rich-neighbor 5-edge-coloring.

theorem subcubic_rich_neighbor_five_of_card_eq_zero {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (h0 : Fintype.card V = 0) :
    ∃ c : G.lineGraph.Coloring (Fin 5), simple_graph_is_rich_neighbor_coloring G c
subcubic_rich_neighbor_five_of_vertex_extensionIn LeanGraph Theory & Graph Algorithms

If every finite subcubic graph G with a vertex v of degree at most 2 satisfying: the induced subgraph of G on the vertices other than v admits a rich-neighbor 5-edge-colouring, itself admits one, then every finite graph of maximum degree at most 3 whose degree-3 vertices induce a subgraph of maximum degree at most 2 admits a rich-neighbor 5-edge-colouring.

theorem subcubic_rich_neighbor_five_of_vertex_extension
    (h : ∀ {W : Type*} [Fintype W] [DecidableEq W] (H : SimpleGraph W) [DecidableRel H.Adj] (v : W),
      H.maxDegree ≤ 3 → H.degree v ≤ 2 →
      (∃ c : (H.induce {w : W | w ≠ v}).lineGraph.Coloring (Fin 5),
        simple_graph_is_rich_neighbor_coloring (H.induce {w : W | w ≠ v}) c) →
      ∃ c : H.lineGraph.Coloring (Fin 5), simple_graph_is_rich_neighbor_coloring H c) :
    ∀ {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj],
      G.maxDegree ≤ 3 → (G.induce (simple_graph_V3 G : Set V)).maxDegree ≤ 2 →
      ∃ c : G.lineGraph.Coloring (Fin 5), simple_graph_is_rich_neighbor_coloring G c
subcubic_rich_neighbor_five_vertex_extensionIn LeanGraph Theory & Graph Algorithms

Let G be a finite graph of maximum degree at most 3 and v a vertex of degree at most 2. If the induced subgraph of G on the vertices other than v admits a rich-neighbor 5-edge-colouring, then so does G.

theorem subcubic_rich_neighbor_five_vertex_extension
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (v : V) (hdeg : G.maxDegree ≤ 3) (hv : G.degree v ≤ 2)
    (hc : ∃ c : (G.induce {w : V | w ≠ v}).lineGraph.Coloring (Fin 5),
        simple_graph_is_rich_neighbor_coloring (G.induce {w : V | w ≠ v}) c) :
    ∃ c : G.lineGraph.Coloring (Fin 5), simple_graph_is_rich_neighbor_coloring G c
subcubic_triangle_free_max_indep_improveIn LeanGraph Theory & Graph Algorithms

In any subcubic triangle-free finite simple graph, every maximum independent set with a complement component of order at least 7 can be strictly improved to another maximum independent set with strictly smaller sum-of-squares potential.

open SimpleGraph in
open scoped Classical in
theorem subcubic_triangle_free_max_indep_improve {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hdeg : G.maxDegree ≤ 3) (htri : G.CliqueFree 3)
    (L : Finset V) (hL : G.IsMaximumIndepSet L)
    (hbig : ∃ C : (G.induce (Lᶜ : Set V)).ConnectedComponent,
      7 ≤ open scoped Classical in Fintype.card C) :
    ∃ L' : Finset V, G.IsMaximumIndepSet L' ∧
      subcubic_partition_measure G L' < subcubic_partition_measure G L
sublinear_expansion_arithmetic_boundIn LeanGraph Theory & Graph Algorithms

If e_U = e_S + e_C + b, 2 * e_U = n * d, 2 * e_S ≤ s * (d / log n) * log s, and 2 * e_C ≤ (n - s) * d, then b / s ≥ (d / (2 * log n)) * log (n / s).

theorem sublinear_expansion_arithmetic_bound
    (d n s e_U e_S e_C b : ℝ)
    (hs : 0 < s) (hsn : s ≤ n) (hlog : 0 < Real.log n)
    (he_U : 2 * e_U = n * d)
    (h_sum : e_U = e_S + e_C + b)
    (he_S : 2 * e_S ≤ s * (d / Real.log n) * Real.log s)
    (he_C : 2 * e_C ≤ (n - s) * d) :
    b / s ≥ (d / (2 * Real.log n)) * Real.log (n / s)
sublinear_expansion_max_avg_degree_log_subgraphIn LeanGraph Theory & Graph Algorithms

Let G be a finite simple graph and let U be a vertex subset with |U| ≥ 2 maximizing d(G[U']) / log |U'| over all vertex subsets U' with |U'| ≥ 2. Then for every nonempty subset S ⊆ U, the edge boundary ∂ S in G[U] satisfies |∂ S| / |S| ≥ (d(G[U]) / (2 log |U|)) * log(|U| / |S|).

open scoped Classical in
theorem sublinear_expansion_max_avg_degree_log_subgraph
    {V : Type*} [Fintype V] (G : SimpleGraph V)
    (U : Finset V) (hU : 2 ≤ U.card)
    (hmax : ∀ U' : Finset V, 2 ≤ U'.card →
      graph_average_degree (G.induce (U' : Set V)) / Real.log (U'.card : ℝ) ≤
      graph_average_degree (G.induce (U : Set V)) / Real.log (U.card : ℝ))
    (S : Finset V) (hS_sub : S ⊆ U) (hS_ne : S.Nonempty) :
    ((graph_edge_boundary G U S).card : ℝ) / S.card ≥
      (graph_average_degree (G.induce (U : Set V)) / (2 * Real.log (U.card : ℝ))) *
        Real.log ((U.card : ℝ) / S.card)
sum_filter_card_two_eq_sum_ordered_pairsIn LeanGraph Theory & Graph Algorithms

For any finite linear order V and any function f on finite vertex sets, the sum of f over all 2-element subsets equals the sum of f {a,b} over all ordered pairs a < b.

theorem sum_filter_card_two_eq_sum_ordered_pairs {V : Type*} [Fintype V] [LinearOrder V]
    (f : Finset V → ℕ) :
    (∑ s ∈ (Finset.univ : Finset (Finset V)).filter (fun s : Finset V => s.card = 2), f s)
      = ∑ p ∈ (Finset.univ : Finset (V × V)).filter (fun p : V × V => p.1 < p.2),
          f {p.1, p.2}
sum_fin_pair_lt_sub_eq_sum_choose_twoIn LeanGraph Theory & Graph Algorithms

The sum of b - a over all ordered pairs a < b of vertices of {0,...,n-1} equals the sum of (b+1 choose 2) over b = 0, ..., n-1.

theorem sum_fin_pair_lt_sub_eq_sum_choose_two (n : ℕ) :
    (∑ p ∈ (Finset.univ : Finset (Fin n × Fin n)).filter (fun p : Fin n × Fin n => p.1 < p.2),
        (p.2.val - p.1.val)) = ∑ b ∈ Finset.range n, (b + 1).choose 2
sum_range_sub_eq_choose_twoIn LeanGraph Theory & Graph Algorithms

For every n, the sum of n - i over i = 0, ..., n-1 equals the binomial coefficient (n+1 choose 2).

theorem sum_range_sub_eq_choose_two (n : ℕ) :
    (∑ i ∈ Finset.range n, (n - i)) = (n + 1).choose 2
sum_range_succ_choose_twoIn LeanGraph Theory & Graph Algorithms

The hockey-stick identity for k = 2: the sum of (b+1 choose 2) over b = 0, ..., n-1 equals (n+1 choose 3).

theorem sum_range_succ_choose_two (n : ℕ) :
    (∑ b ∈ Finset.range n, (b + 1).choose 2) = (n + 1).choose 3
supertoken_cycle_arrow_chain_blocksIn LeanGraph Theory & Graph Algorithms

Let r ≥ 1 and let t : ℕ → ℕ (departure times) and f : ℕ → ℤ with f j = ±1 for every j < 2r. Suppose that whenever j < 2r and the arrow target j + f j is again in [0, 2r), the departure time strictly decreases, t (j + f j) < t j. Then at least r of the vertices j ∈ [0, 2r) are "bad", i.e. satisfy (j < r and f j = -1) or (r ≤ j and f j = 1).

theorem supertoken_cycle_arrow_chain_blocks (r : ℕ) (hr : 1 ≤ r)
    (t : ℕ → ℕ) (f : ℕ → ℤ)
    (hf : ∀ j, j < 2 * r → f j = 1 ∨ f j = -1)
    (hdec : ∀ j, j < 2 * r → ∀ j', j' < 2 * r → (j' : ℤ) = (j : ℤ) + f j → t j' < t j) :
    r ≤ ((Finset.range (2 * r)).filter (fun j => (j < r ∧ f j = -1) ∨ (r ≤ j ∧ f j = 1))).card
supertoken_cycle_diameter_upper_bound_gtIn LeanGraph Theory & Graph Algorithms

For any natural numbers m ≥ 1, s ≥ 2, and k with 2 * m * s < k and k < (2 * m + 1) * s, the diameter of the supertoken graph supertoken_graph (SimpleGraph.cycleGraph (2 * m + 1)) k s is at most k * m.

theorem supertoken_cycle_diameter_upper_bound_gt (m s k : ℕ)
    (hm : 1 ≤ m) (hs : 2 ≤ s) (hk_gt : 2 * m * s < k) (hks : k < (2 * m + 1) * s) :
    (supertoken_graph (SimpleGraph.cycleGraph (2 * m + 1)) k s).diam ≤ k * m
supertoken_cycle_diameter_upper_bound_leIn LeanGraph Theory & Graph Algorithms

For any natural numbers m ≥ 1, s ≥ 2, and k with 1 ≤ k, k ≤ 2 * m * s, and k < (2 * m + 1) * s, the diameter of the supertoken graph supertoken_graph (SimpleGraph.cycleGraph (2 * m + 1)) k s is at most k * m + k / (2 * s).

theorem supertoken_cycle_diameter_upper_bound_le (m s k : ℕ)
    (hm : 1 ≤ m) (hs : 2 ≤ s) (hk : 1 ≤ k) (hk_le : k ≤ 2 * m * s) (hks : k < (2 * m + 1) * s) :
    (supertoken_graph (SimpleGraph.cycleGraph (2 * m + 1)) k s).diam ≤ k * m + k / (2 * s)
supertoken_cycle_jammed_edist_geIn LeanGraph Theory & Graph Algorithms

Let m ≥ 1, s ≥ 1, and let x, y be k-token configurations on C_{2m+1} with capacity s such that (i) every token is at cycle-distance exactly m from its target, (ii) the vertices 0, …, 2r-1 each carry exactly s tokens in x, (iii) a token at vertex j < r has target (j+m) mod (2m+1) and a token at vertex r ≤ j < 2r has target (j+m+1) mod (2m+1). Then the extended distance from x to y in the supertoken graph is at least k*m + r: no legal sequence of moves from x to y is shorter than k*m + r.

theorem supertoken_cycle_jammed_edist_ge (m s k r : ℕ) (hm : 1 ≤ m) (hs : 1 ≤ s)
    (x y : {x : Fin k → Fin (2 * m + 1) //
        ∀ v : Fin (2 * m + 1), (Finset.univ.filter (fun i => x i = v)).card ≤ s})
    (hdist : ∀ i : Fin k, (SimpleGraph.cycleGraph (2 * m + 1)).dist (x.1 i) (y.1 i) = m)
    (hfull : ∀ j : ℕ, j < 2 * r → (Finset.univ.filter (fun i => (x.1 i : ℕ) = j)).card = s)
    (hup : ∀ i : Fin k, (x.1 i : ℕ) < r → (y.1 i : ℕ) = ((x.1 i : ℕ) + m) % (2 * m + 1))
    (hdown : ∀ i : Fin k, r ≤ (x.1 i : ℕ) → (x.1 i : ℕ) < 2 * r →
        (y.1 i : ℕ) = ((x.1 i : ℕ) + m + 1) % (2 * m + 1)) :
    ((k * m + r : ℕ) : ℕ∞) ≤ (supertoken_graph (SimpleGraph.cycleGraph (2 * m + 1)) k s).edist x y
supertoken_cycle_jammed_pair_edist_geIn LeanGraph Theory & Graph Algorithms

For m ≥ 1, s ≥ 2, 1 ≤ k ≤ 2*m*s, there exist two k-token configurations on C_{2m+1} (capacity s) whose distance in the supertoken graph is at least k*m + k/(2s).

theorem supertoken_cycle_jammed_pair_edist_ge (m s k : ℕ)
    (hm : 1 ≤ m) (hs : 2 ≤ s) (hk : 1 ≤ k) (hk_le : k ≤ 2 * m * s) :
    ∃ x y : {x : Fin k → Fin (2 * m + 1) //
        ∀ v : Fin (2 * m + 1), (Finset.univ.filter (fun i => x i = v)).card ≤ s},
      ((k * m + k / (2 * s) : ℕ) : ℕ∞) ≤
        (supertoken_graph (SimpleGraph.cycleGraph (2 * m + 1)) k s).edist x y
supertoken_cycle_jammed_pair_existsIn LeanGraph Theory & Graph Algorithms

Let m ≥ 1, s ≥ 1, and let r = k / (2s) with k ≤ 2*m*s. Then there are two k-token configurations x, y on the odd cycle C_{2m+1} with capacity s such that: (i) every token is at cycle-distance exactly m from its target; (ii) each of the vertices 0, 1, …, 2r-1 carries exactly s tokens in x; (iii) a token sitting at vertex j < r has target (j + m) mod (2m+1), and a token sitting at vertex j with r ≤ j < 2r has target (j + m + 1) mod (2m+1), which is m steps down from j. Consequently every token in the block I = [0,2r) has its unique distance-decreasing first step into a vertex of I, which is full at time 0.

theorem supertoken_cycle_jammed_pair_exists (m s k r : ℕ)
    (hm : 1 ≤ m) (hs : 1 ≤ s) (hr : r = k / (2 * s)) (hk : k ≤ 2 * m * s) :
    ∃ x y : {x : Fin k → Fin (2 * m + 1) //
        ∀ v : Fin (2 * m + 1), (Finset.univ.filter (fun i => x i = v)).card ≤ s},
      (∀ i : Fin k, (SimpleGraph.cycleGraph (2 * m + 1)).dist (x.1 i) (y.1 i) = m) ∧
      (∀ j : ℕ, j < 2 * r → (Finset.univ.filter (fun i => (x.1 i : ℕ) = j)).card = s) ∧
      (∀ i : Fin k, (x.1 i : ℕ) < r → (y.1 i : ℕ) = ((x.1 i : ℕ) + m) % (2 * m + 1)) ∧
      (∀ i : Fin k, r ≤ (x.1 i : ℕ) → (x.1 i : ℕ) < 2 * r →
        (y.1 i : ℕ) = ((x.1 i : ℕ) + m + 1) % (2 * m + 1))
supertoken_cycle_three_lower_bound_gtIn LeanGraph Theory & Graph Algorithms

For any natural numbers s ≥ 2 and k with 2 * s < k < 3 * s, the diameter of the supertoken graph supertoken_graph (SimpleGraph.cycleGraph 3) k s on C_3 is at least k.

theorem supertoken_cycle_three_lower_bound_gt (s k : ℕ)
    (hs : 2 ≤ s) (hk_gt : 2 * s < k) (hks : k < 3 * s) :
    k ≤ (supertoken_graph (SimpleGraph.cycleGraph 3) k s).diam
supertoken_cycle_three_lower_bound_leIn LeanGraph Theory & Graph Algorithms

For any natural numbers s ≥ 2 and k with 1 ≤ k ≤ 2 * s, the diameter of the supertoken graph supertoken_graph (SimpleGraph.cycleGraph 3) k s on C_3 is at least k + k / (2 * s).

theorem supertoken_cycle_three_lower_bound_le (s k : ℕ)
    (hs : 2 ≤ s) (hk : 1 ≤ k) (hk_le : k ≤ 2 * s) :
    k + k / (2 * s) ≤ (supertoken_graph (SimpleGraph.cycleGraph 3) k s).diam
supertoken_cycle_three_upper_bound_gtIn LeanGraph Theory & Graph Algorithms

For any natural numbers s ≥ 2 and k with 2 * s < k < 3 * s, the diameter of the supertoken graph supertoken_graph (SimpleGraph.cycleGraph 3) k s on C_3 is at most k.

theorem supertoken_cycle_three_upper_bound_gt (s k : ℕ)
    (hs : 2 ≤ s) (hk_gt : 2 * s < k) (hks : k < 3 * s) :
    (supertoken_graph (SimpleGraph.cycleGraph 3) k s).diam ≤ k
supertoken_cycle_three_upper_bound_leIn LeanGraph Theory & Graph Algorithms

For any natural numbers s ≥ 2 and k with 1 ≤ k ≤ 2 * s and k < 3 * s, the diameter of the supertoken graph supertoken_graph (SimpleGraph.cycleGraph 3) k s on C_3 is at most k + k / (2 * s).

theorem supertoken_cycle_three_upper_bound_le (s k : ℕ)
    (hs : 2 ≤ s) (hk : 1 ≤ k) (hk_le : k ≤ 2 * s) (hks : k < 3 * s) :
    (supertoken_graph (SimpleGraph.cycleGraph 3) k s).diam ≤ k + k / (2 * s)
supertoken_graph_cycle_connectedIn LeanGraph Theory & Graph Algorithms

For m ≥ 1, s ≥ 2 and 1 ≤ k ≤ 2*m*s, the supertoken graph of the cycle C_{2m+1} with k distinguishable tokens and capacity s is connected: any configuration can be transformed into any other by legal moves. (Needed because the diameter of a disconnected graph is 0, so the lower bound would be false without it.)

theorem supertoken_graph_cycle_connected (m s k : ℕ)
    (hm : 1 ≤ m) (hs : 2 ≤ s) (hk : 1 ≤ k) (hk_le : k ≤ 2 * m * s) :
    (supertoken_graph (SimpleGraph.cycleGraph (2 * m + 1)) k s).Connected
supertoken_graph_regular_of_degree_nsIn LeanGraph Theory & Graph Algorithms

Let G be a finite simple graph on vertex type V, and let s be a natural number. At maximum capacity k = |V| * s tokens, the supertoken graph supertoken_graph G (|V| * s) s is 0-regular.

open scoped Classical in
theorem supertoken_graph_regular_of_degree_ns {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (s : ℕ) :
    (supertoken_graph G (Fintype.card V * s) s).IsRegularOfDegree 0
supertoken_graph_regular_of_degree_ns_sub_oneIn LeanGraph Theory & Graph Algorithms

Let G be a finite simple d-regular graph on vertex type V, and let s ≥ 1. For k = |V| * s - 1 tokens, the supertoken graph supertoken_graph G (|V| * s - 1) s is regular of degree s * d.

open scoped Classical in
theorem supertoken_graph_regular_of_degree_ns_sub_one {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (d : ℕ) (hreg : G.IsRegularOfDegree d)
    (s : ℕ) (hs : 1 ≤ s) :
    (supertoken_graph G (Fintype.card V * s - 1) s).IsRegularOfDegree (s * d)
supertoken_graph_regularity_characterizationIn LeanGraph Theory & Graph Algorithms

Let G be a finite simple d-regular graph on a vertex set V of cardinality at least 2, where d ≥ 1. Let s ≥ 2 and 1 ≤ k ≤ |V| * s. Then the supertoken graph supertoken_graph G k s is regular of some degree if and only if k ≤ s or k = |V| * s - 1 or k = |V| * s; furthermore, if k ≤ s then it is regular of degree k * d, if k = |V| * s - 1 then it is regular of degree s * d, and if k = |V| * s then it is regular of degree 0.

open scoped Classical in
theorem supertoken_graph_regularity_characterization {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (d : ℕ) (hd : 1 ≤ d) (hreg : G.IsRegularOfDegree d)
    (hn : 2 ≤ Fintype.card V) (s : ℕ) (hs : 2 ≤ s) (k : ℕ) (hk1 : 1 ≤ k)
    (hk2 : k ≤ Fintype.card V * s) :
    ((∃ r : ℕ, (supertoken_graph G k s).IsRegularOfDegree r) ↔
      k ≤ s ∨ k = Fintype.card V * s - 1 ∨ k = Fintype.card V * s) ∧
    (k ≤ s → (supertoken_graph G k s).IsRegularOfDegree (k * d)) ∧
    (k = Fintype.card V * s - 1 → (supertoken_graph G k s).IsRegularOfDegree (s * d)) ∧
    (k = Fintype.card V * s → (supertoken_graph G k s).IsRegularOfDegree 0)
supertoken_graph_single_token_diamIn LeanGraph Theory & Graph Algorithms

For any simple graph G on vertex type V with decidable equality and any s ≥ 1, the diameter of the supertoken graph supertoken_graph G 1 s with a single token equals the diameter of G.

theorem supertoken_graph_single_token_diam {V : Type*} [DecidableEq V] (G : SimpleGraph V) (s : ℕ) (hs : 1 ≤ s) : (supertoken_graph G 1 s).diam = G.diam
sustainable_tree_has_sustainable_predecessor_closer_to_pathIn LeanGraph Theory & Graph Algorithms

Every sustainable tree X on Fin n (n ≥ 1) that is not isomorphic to the path graph pathGraph n has a sustainable generalized-tree-shift predecessor Y whose adjacency spectral radius is strictly smaller: there are vertices u ≠ v and a path p from u to v in Y through degree-2 interior vertices with X = gts_graph Y u v p.penultimate.

theorem sustainable_tree_has_sustainable_predecessor_closer_to_path
    (n : ℕ) (hn : 1 ≤ n) (X : SimpleGraph (Fin n))
    (hX : is_sustainable_tree X)
    (hXp : ¬ Nonempty (X ≃g SimpleGraph.pathGraph n)) :
    ∃ Y : SimpleGraph (Fin n),
      is_sustainable_tree Y ∧ is_generalized_tree_shift Y X ∧
      adjacency_spectral_radius Y < adjacency_spectral_radius X
symmetric_f2_offdiag_clique_peelIn LeanGraph Theory & Graph Algorithms

Peeling one clique off a symmetric F₂-matrix: if M is symmetric of positive rank over ZMod 2, there exist vectors u, d with rank (M + diagonal d + u uᵀ) ≤ rank M − 1. Equivalently: M agrees off the diagonal with (u uᵀ) + a symmetric matrix of strictly smaller rank. (Only off-diagonal entries matter, so the diagonal Matrix.diagonal d is free.)

theorem symmetric_f2_offdiag_clique_peel {V : Type} [Fintype V] [DecidableEq V]
    (M : Matrix V V (ZMod 2)) (hM : M.IsSymm) (hpos : 0 < M.rank) :
    ∃ (u d : V → ZMod 2),
      (M + Matrix.diagonal d + Matrix.of (fun x y => u x * u y)).rank ≤ M.rank - 1
symmetric_f2_offdiag_gram_le_rank_add_oneIn LeanGraph Theory & Graph Algorithms

For a symmetric matrix M over ZMod 2 of rank r there is a matrix S with at most r + 1 columns whose Gram matrix S Sᵀ agrees with M off the diagonal (diagonal entries of S Sᵀ are unconstrained).

theorem symmetric_f2_offdiag_gram_le_rank_add_one {V : Type} [Fintype V] [DecidableEq V]
    (M : Matrix V V (ZMod 2)) (hM : M.IsSymm) :
    ∃ (t : ℕ) (S : Matrix V (Fin t) (ZMod 2)), t ≤ M.rank + 1 ∧
      ∀ x y : V, x ≠ y → (S * S.transpose) x y = M x y
temporal_path_explore_n_log_n_of_coverageIn LeanGraph Theory & Graph Algorithms

From the coverage crux it follows that there is a constant C such that every temporal graph on n ≥ 2 vertices with spanning-path snapshots can be explored from any start vertex within C·n·log n steps.

theorem temporal_path_explore_n_log_n_of_coverage
    (hcov : ∃ (q B : ℕ), 0 < q ∧ ∀ (n : ℕ), 2 ≤ n → ∀ (G : ℕ → SimpleGraph (Fin n)),
      (∀ t, is_spanning_path_graph (G t)) → ∀ (U : Finset (Fin n)), 2 ≤ U.card →
        ∃ (r : Fin n) (w : ℕ → Fin n) (T : ℕ), w 0 = r ∧ is_temporal_walk G w ∧ T ≤ B * n ∧
          ∃ S : Finset (Fin n), S ⊆ U ∧ U.card ≤ q * S.card ∧ ∀ u ∈ S, ∃ t ≤ T, w t = u) :
    ∃ C : ℝ, ∀ n : ℕ, 2 ≤ n → ∀ G : ℕ → SimpleGraph (Fin n), (∀ t, is_spanning_path_graph (G t)) →
      ∀ s : Fin n, ∃ (w : ℕ → Fin n) (T : ℕ), w 0 = s ∧ is_temporal_walk G w ∧
        temporal_walk_explores_by w T ∧ (T : ℝ) ≤ C * n * Real.log n
temporal_path_free_start_target_coverageIn LeanGraph Theory & Graph Algorithms

OPEN CRUX (the halving step). There are absolute constants q, B > 0 such that for every temporal graph on n ≥ 2 vertices with spanning-path snapshots and every target set U with |U| ≥ 2, some freely chosen start vertex admits a temporal walk of at most B·n steps that visits at least |U|/q vertices of U.

theorem temporal_path_free_start_target_coverage :
    ∃ (q B : ℕ), 0 < q ∧ ∀ (n : ℕ), 2 ≤ n → ∀ (G : ℕ → SimpleGraph (Fin n)),
      (∀ t, is_spanning_path_graph (G t)) → ∀ (U : Finset (Fin n)), 2 ≤ U.card →
        ∃ (r : Fin n) (w : ℕ → Fin n) (T : ℕ), w 0 = r ∧ is_temporal_walk G w ∧ T ≤ B * n ∧
          ∃ S : Finset (Fin n), S ⊆ U ∧ U.card ≤ q * S.card ∧ ∀ u ∈ S, ∃ t ≤ T, w t = u
temporal_path_phase_coverageIn LeanGraph Theory & Graph Algorithms

Given the coverage crux with constants q, B, from any position v at any time t0 a single walk of at most (n−1) + B·n steps visits at least |U|/q vertices of any target set U with |U| ≥ 2.

theorem temporal_path_phase_coverage
    (q B : ℕ) (hq : 0 < q)
    (hcov : ∀ (n : ℕ), 2 ≤ n → ∀ (G : ℕ → SimpleGraph (Fin n)),
      (∀ t, is_spanning_path_graph (G t)) → ∀ (U : Finset (Fin n)), 2 ≤ U.card →
        ∃ (r : Fin n) (w : ℕ → Fin n) (T : ℕ), w 0 = r ∧ is_temporal_walk G w ∧ T ≤ B * n ∧
          ∃ S : Finset (Fin n), S ⊆ U ∧ U.card ≤ q * S.card ∧ ∀ u ∈ S, ∃ t ≤ T, w t = u) :
    ∀ (n : ℕ), 2 ≤ n → ∀ (G : ℕ → SimpleGraph (Fin n)), (∀ t, is_spanning_path_graph (G t)) →
    ∀ (t0 : ℕ) (v : Fin n) (U : Finset (Fin n)), 2 ≤ U.card →
      ∃ (y : ℕ → Fin n), y 0 = v ∧
        (∀ i : ℕ, y (i + 1) = y i ∨ (G (t0 + i)).Adj (y i) (y (i + 1))) ∧
        ∃ S : Finset (Fin n), S ⊆ U ∧ U.card ≤ q * S.card ∧
          ∀ u ∈ S, ∃ t ≤ (n - 1) + B * n, y t = u
temporal_path_phase_iterateIn LeanGraph Theory & Graph Algorithms

Given the coverage crux, after k phases of length P = (n−1) + B·n there is a single temporal walk from s and a residual unvisited set U such that every vertex outside U is visited by time k·P and q^k·|U| ≤ n·(q−1)^k.

theorem temporal_path_phase_iterate
    (q B : ℕ) (hq : 0 < q)
    (hcov : ∀ (n : ℕ), 2 ≤ n → ∀ (G : ℕ → SimpleGraph (Fin n)),
      (∀ t, is_spanning_path_graph (G t)) → ∀ (U : Finset (Fin n)), 2 ≤ U.card →
        ∃ (r : Fin n) (w : ℕ → Fin n) (T : ℕ), w 0 = r ∧ is_temporal_walk G w ∧ T ≤ B * n ∧
          ∃ S : Finset (Fin n), S ⊆ U ∧ U.card ≤ q * S.card ∧ ∀ u ∈ S, ∃ t ≤ T, w t = u) :
    ∀ (n : ℕ), 2 ≤ n → ∀ (G : ℕ → SimpleGraph (Fin n)), (∀ t, is_spanning_path_graph (G t)) →
    ∀ s : Fin n, ∀ k : ℕ,
      ∃ (w : ℕ → Fin n) (U : Finset (Fin n)), w 0 = s ∧ is_temporal_walk G w ∧
        (∀ u : Fin n, u ∉ U → ∃ t ≤ k * ((n - 1) + B * n), w t = u) ∧
        q ^ k * U.card ≤ n * (q - 1) ^ k
temporal_path_reach_withinIn LeanGraph Theory & Graph Algorithms

If every snapshot is a spanning path then an agent that is at vertex v at time t0 can reach any prescribed vertex u within n − 1 steps.

theorem temporal_path_reach_within {n : ℕ} (hn : 2 ≤ n) (G : ℕ → SimpleGraph (Fin n))
    (hG : ∀ t, is_spanning_path_graph (G t)) (t0 : ℕ) (v u : Fin n) :
    ∃ w : ℕ → Fin n, w 0 = v ∧
      (∀ i : ℕ, w (i + 1) = w i ∨ (G (t0 + i)).Adj (w i) (w (i + 1))) ∧
      ∃ j ≤ n - 1, w j = u
temporal_static_path_free_start_coverageIn LeanGraph Theory & Graph Algorithms

Special case of the coverage crux: if the temporal graph is constant (all snapshots equal to one spanning path) then from a freely chosen start a walk of n − 1 steps visits every vertex, so the crux holds there with q = B = 1.

theorem temporal_static_path_free_start_coverage {n : ℕ} (hn : 2 ≤ n) {H : SimpleGraph (Fin n)}
    (hH : is_spanning_path_graph H) (U : Finset (Fin n)) (hU : 2 ≤ U.card) :
    ∃ (r : Fin n) (w : ℕ → Fin n) (T : ℕ), w 0 = r ∧ is_temporal_walk (fun _ : ℕ => H) w ∧
      T ≤ 1 * n ∧ ∃ S : Finset (Fin n), S ⊆ U ∧ U.card ≤ 1 * S.card ∧
        ∀ u ∈ S, ∃ t ≤ T, w t = u
temporal_walk_concatIn LeanGraph Theory & Graph Algorithms

Two temporal walks in the same temporal graph, the second legal from time t0 + a and starting where the first one is at time t0 + a, glue into one temporal walk legal from time t0 that agrees with the second walk from time t0 + a on.

theorem temporal_walk_concat {n : ℕ} (G : ℕ → SimpleGraph (Fin n)) (t0 a : ℕ)
    (u : Fin n) (w₁ w₂ : ℕ → Fin n)
    (h₁0 : w₁ 0 = u)
    (h₁ : ∀ i : ℕ, w₁ (i + 1) = w₁ i ∨ (G (t0 + i)).Adj (w₁ i) (w₁ (i + 1)))
    (h₂0 : w₂ 0 = w₁ a)
    (h₂ : ∀ i : ℕ, w₂ (i + 1) = w₂ i ∨ (G (t0 + a + i)).Adj (w₂ i) (w₂ (i + 1))) :
    ∃ w : ℕ → Fin n, w 0 = u ∧
      (∀ i : ℕ, w (i + 1) = w i ∨ (G (t0 + i)).Adj (w i) (w (i + 1))) ∧
      ∀ i : ℕ, w (a + i) = w₂ i
ten_vertex_exchange_p_trapIn LeanGraph Theory & Graph Algorithms

The displayed P is a ten-packing and every ten-packing reachable from it by single-triangle swaps has a fully singleton-forced triangle.

theorem ten_vertex_exchange_p_trap :
  let F := simple_graph_triangle_edge_family ten_vertex_exchange_graph
  ten_vertex_exchange_packing_p ⊆ F ∧ ten_vertex_exchange_packing_p.card = 10 ∧ (ten_vertex_exchange_packing_p : Set (Finset (Sym2 (Fin 10)))).Pairwise Disjoint ∧
  ∀ R, Relation.ReflTransGen (fun A B : Finset (Finset (Sym2 (Fin 10))) => B ⊆ F ∧ B.card = 10 ∧ (B : Set (Finset (Sym2 (Fin 10)))).Pairwise Disjoint ∧ (A ∩ B).card = 9) ten_vertex_exchange_packing_p R →
    ∃ r ∈ R, r ⊆ ((F.filter (fun t => (t ∩ R.biUnion id).card = 1)).biUnion id)
ten_vertex_exchange_q_goodIn LeanGraph Theory & Graph Algorithms

The displayed Q is a good ten-packing in the actual triangle family.

theorem ten_vertex_exchange_q_good :
  let F := simple_graph_triangle_edge_family ten_vertex_exchange_graph
  ten_vertex_exchange_packing_q ⊆ F ∧ ten_vertex_exchange_packing_q.card = 10 ∧ (ten_vertex_exchange_packing_q : Set (Finset (Sym2 (Fin 10)))).Pairwise Disjoint ∧
    ∀ q ∈ ten_vertex_exchange_packing_q, ¬ q ⊆ ((F.filter (fun t => (t ∩ ten_vertex_exchange_packing_q.biUnion id).card = 1)).biUnion id)
third_principal_specialization_card_four_coeff_ne_zero_implies_degree_threeIn LeanGraph Theory & Graph Algorithms

If the coefficient of q^1 t^2 in the third principal specialization of a 4-vertex tree is nonzero, the tree has a vertex of degree 3.

theorem third_principal_specialization_card_four_coeff_ne_zero_implies_degree_three {V : Type*}
    [Fintype V] [DecidableEq V] (T : SimpleGraph V) [DecidableRel T.Adj]
    (hT : T.IsTree) (hcard : Fintype.card V = 4) :
    MvPolynomial.coeff (Finsupp.single (0 : Fin 2) 1 + Finsupp.single (1 : Fin 2) 2)
      (third_principal_specialization T) ≠ 0 → ∃ v : V, T.degree v = 3
third_principal_specialization_card_four_degree_three_implies_coeff_ne_zeroIn LeanGraph Theory & Graph Algorithms

If a 4-vertex tree has a vertex of degree 3, then the coefficient of q^1 t^2 in its third principal specialization is nonzero.

theorem third_principal_specialization_card_four_degree_three_implies_coeff_ne_zero {V : Type*}
    [Fintype V] [DecidableEq V] (T : SimpleGraph V) [DecidableRel T.Adj]
    (hT : T.IsTree) (hcard : Fintype.card V = 4) :
    (∃ v : V, T.degree v = 3) →
      MvPolynomial.coeff (Finsupp.single (0 : Fin 2) 1 + Finsupp.single (1 : Fin 2) 2)
        (third_principal_specialization T) ≠ 0
third_principal_specialization_card_four_has_degree_three_iffIn LeanGraph Theory & Graph Algorithms

If two trees on 4 vertices have equal third principal specializations, then one has a vertex of degree 3 if and only if the other does.

theorem third_principal_specialization_card_four_has_degree_three_iff
    {V₁ V₂ : Type*} [Fintype V₁] [DecidableEq V₁] [Fintype V₂] [DecidableEq V₂]
    (T₁ : SimpleGraph V₁) (T₂ : SimpleGraph V₂)
    [DecidableRel T₁.Adj] [DecidableRel T₂.Adj]
    (hT₁ : T₁.IsTree) (hT₂ : T₂.IsTree)
    (hcard₁ : Fintype.card V₁ = 4) (hcard₂ : Fintype.card V₂ = 4)
    (heq : third_principal_specialization T₁ = third_principal_specialization T₂) :
    (∃ v : V₁, T₁.degree v = 3) ↔ (∃ v : V₂, T₂.degree v = 3)
third_principal_specialization_coeff_q1t2_eqIn LeanGraph Theory & Graph Algorithms

The coefficient of q^1 t^2 in the third principal specialization of a finite graph equals the number of proper 3-colourings whose colour sum is 1 and which use exactly 2 distinct colours.

theorem third_principal_specialization_coeff_q1t2_eq {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] :
    MvPolynomial.coeff (Finsupp.single (0 : Fin 2) 1 + Finsupp.single (1 : Fin 2) 2)
      (third_principal_specialization G)
    = ∑ c : G.Coloring (Fin 3),
        (if (∑ v, ((c v : Fin 3) : ℕ)) = 1 ∧ (Finset.univ.image c).card = 2
          then (1 : ℤ) else 0)
third_principal_specialization_coeff_q1t2_ne_zero_iff_exists_coloringIn LeanGraph Theory & Graph Algorithms

The coefficient of q^1 t^2 in the third principal specialization of a finite graph is nonzero if and only if the graph has a proper 3-colouring of colour sum 1 using exactly 2 colours.

theorem third_principal_specialization_coeff_q1t2_ne_zero_iff_exists_coloring {V : Type*}
    [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] :
    MvPolynomial.coeff (Finsupp.single (0 : Fin 2) 1 + Finsupp.single (1 : Fin 2) 2)
      (third_principal_specialization G) ≠ 0
    ↔ ∃ c : G.Coloring (Fin 3), (∑ v, ((c v : Fin 3) : ℕ)) = 1 ∧
        (Finset.univ.image c).card = 2
three_connected_plane_eulerian_minimizer_is_alternatingIn LeanGraph Theory & Graph Algorithms

In a 3-vertex-connected simple plane graph G with all degrees even and plane rotation system σ, if an Eulerian orientation D has as many spanning arborescences directed towards r as an alternating orientation D₀, then D is alternating for σ.

theorem three_connected_plane_eulerian_minimizer_is_alternating {n : ℕ}
    (G : SimpleGraph (Fin n)) [DecidableRel G.Adj]
    (h3 : simple_graph_three_vertex_connected G) (heven : ∀ v, Even (G.degree v))
    (σ : Equiv.Perm G.Dart) (hσ : simple_graph_is_plane_rotation_system G σ)
    (D₀ D : Digraph (Fin n)) [DecidableRel D₀.Adj] [DecidableRel D.Adj]
    (hD₀ : digraph_is_alternating_orientation G σ D₀) (hD : digraph_is_eulerian_orientation G D)
    (r : Fin n) (heq : digraph_arborescence_count_at D r = digraph_arborescence_count_at D₀ r) :
    digraph_is_alternating_orientation G σ D
three_connected_plane_eulerian_non_alternating_exists_strictly_improvingIn LeanGraph Theory & Graph Algorithms

In a 3-vertex-connected simple plane graph with all degrees even, every Eulerian orientation that is not alternating for the plane rotation system σ admits another Eulerian orientation with strictly fewer spanning arborescences directed towards r.

theorem three_connected_plane_eulerian_non_alternating_exists_strictly_improving {n : ℕ}
    (G : SimpleGraph (Fin n)) [DecidableRel G.Adj]
    (h3 : simple_graph_three_vertex_connected G) (heven : ∀ v, Even (G.degree v))
    (σ : Equiv.Perm G.Dart) (hσ : simple_graph_is_plane_rotation_system G σ)
    (D : Digraph (Fin n)) [DecidableRel D.Adj] (r : Fin n)
    (hD : digraph_is_eulerian_orientation G D)
    (hna : ¬ digraph_is_alternating_orientation G σ D) :
    ∃ (D' : Digraph (Fin n)) (_ : DecidableRel D'.Adj),
      digraph_is_eulerian_orientation G D' ∧
        digraph_arborescence_count_at D' r < digraph_arborescence_count_at D r
three_token_k2n_adj_left_card_diffIn LeanGraph Theory & Graph Algorithms

In the 3-token graph of K_{2,n}, adjacent 3-subsets differ in the number of elements taken from the part Fin 2 by exactly one. Consequently two vertices of level 1 (one element in Fin 2) are never adjacent, and no vertex of level 0 (all three elements in Fin n) is adjacent to a vertex of level 2 (both elements of Fin 2 plus one b).

theorem three_token_k2n_adj_left_card_diff (n : ℕ) {X Y : Finset (Fin 2 ⊕ Fin n)}
    (hX : X.card = 3) (hY : Y.card = 3)
    (hadj : (token_graph (completeBipartiteGraph (Fin 2) (Fin n)) 3).Adj ⟨X, hX⟩ ⟨Y, hY⟩) :
    (X.filter (fun x => x.isLeft = true)).card + 1 = (Y.filter (fun x => x.isLeft = true)).card ∨
      (Y.filter (fun x => x.isLeft = true)).card + 1 = (X.filter (fun x => x.isLeft = true)).card
three_token_k2n_adj_level2_iffIn LeanGraph Theory & Graph Algorithms

A level-2 vertex of F_3(K_{2,n}), i.e. a token containing both elements of Fin 2 and one b in Fin n, is adjacent exactly to the level-1 vertices (a, {b, q}) with a in Fin 2 and q ≠ b.

theorem three_token_k2n_adj_level2_iff (n : ℕ) (b : Fin n)
    (hb : ({Sum.inl (0 : Fin 2), Sum.inl (1 : Fin 2), Sum.inr b} : Finset (Fin 2 ⊕ Fin n)).card = 3)
    {X : Finset (Fin 2 ⊕ Fin n)} (hX : X.card = 3) :
    (token_graph (completeBipartiteGraph (Fin 2) (Fin n)) 3).Adj ⟨X, hX⟩ ⟨_, hb⟩ ↔
      ∃ (a : Fin 2) (q : Fin n), q ≠ b ∧ X = {Sum.inl a, Sum.inr b, Sum.inr q}
three_token_k2n_adj_triple_iffIn LeanGraph Theory & Graph Algorithms

A level-0 vertex of F_3(K_{2,n}), i.e. a 3-element subset T of the part Fin n, is adjacent exactly to the six level-1 vertices (a, e) with a in Fin 2 and e a 2-element subset of T.

theorem three_token_k2n_adj_triple_iff (n : ℕ) {T : Finset (Fin n)} (hT : T.card = 3)
    (hT' : (T.image Sum.inr).card = 3)
    {X : Finset (Fin 2 ⊕ Fin n)} (hX : X.card = 3) :
    (token_graph (completeBipartiteGraph (Fin 2) (Fin n)) 3).Adj ⟨X, hX⟩ ⟨T.image Sum.inr, hT'⟩ ↔
      ∃ (a : Fin 2) (e : Finset (Fin n)), e.card = 2 ∧ e ⊆ T ∧
        X = insert (Sum.inl a) (e.image Sum.inr)
three_token_k2n_dominating_yields_pair_coverIn LeanGraph Theory & Graph Algorithms

Every dominating set S of F_3(K_{2,n}) (n ≥ 4) yields data (E, dp, U, Z) — the occupied level-1 pairs, the doubly occupied pairs, the occupied level-2 vertices and the occupied B-triples — such that all members of E and of dp are pairs, dp ⊆ E, all members of Z are 3-element sets, (α) every B-triple is in Z or contains a member of E, (β) every b is in U or lies in a member of E, (γ) for every a and every pair e, either (a,e) is in S, or e meets U, or e is contained in a member of Z; and |S| = |E| + |dp| + |U| + |Z|.

theorem three_token_k2n_dominating_yields_pair_cover (n : ℕ) (hn : 4 ≤ n)
    (S : Finset {s : Finset (Fin 2 ⊕ Fin n) // s.card = 3})
    (hS : simple_graph_is_dominating (token_graph (completeBipartiteGraph (Fin 2) (Fin n)) 3)
            (S : Set {s : Finset (Fin 2 ⊕ Fin n) // s.card = 3})) :
    ∃ (E dp : Finset (Finset (Fin n))) (U : Finset (Fin n)) (Z : Finset (Finset (Fin n))),
      (∀ e ∈ E, e.card = 2) ∧ dp ⊆ E ∧ (∀ T ∈ Z, T.card = 3) ∧
      (∀ T : Finset (Fin n), T.card = 3 → T ∈ Z ∨ ∃ e ∈ E, e ⊆ T) ∧
      (∀ b : Fin n, b ∈ U ∨ ∃ e ∈ E, b ∈ e) ∧
      (∀ (a : Fin 2) (e : Finset (Fin n)), e.card = 2 →
        (∃ h : (insert (Sum.inl a) (e.image Sum.inr)).card = 3,
           (⟨insert (Sum.inl a) (e.image Sum.inr), h⟩ : {s : Finset (Fin 2 ⊕ Fin n) // s.card = 3}) ∈ S) ∨
        (∃ b ∈ e, b ∈ U) ∨ (∃ T ∈ Z, e ⊆ T)) ∧
      S.card ≥ E.card + dp.card + U.card + Z.card
three_token_k2n_domination_number_geIn LeanGraph Theory & Graph Algorithms

For every integer n ≥ 4, the domination number of the 3-token graph F_3(K_{2,n}) of the complete bipartite graph K_{2,n} is at least (n + 1)^2 / 4 - 2.

theorem three_token_k2n_domination_number_ge (n : ℕ) (hn : 4 ≤ n) :
    (n + 1)^2 / 4 - 2 ≤ simple_graph_domination_number (token_graph (completeBipartiteGraph (Fin 2) (Fin n)) 3)
three_token_k2n_explicit_family_cardIn LeanGraph Theory & Graph Algorithms

The explicit candidate family has size at most the sum of the two balanced-block pair counts and n minus 2.

theorem three_token_k2n_explicit_family_card (n : ℕ) (hn : 4 ≤ n) : (three_token_k2n_explicit_family n hn).card ≤ (n / 2).choose 2 + (n - n / 2).choose 2 + n - 2
three_token_k2n_explicit_family_layer_0In LeanGraph Theory & Graph Algorithms

Every three-token configuration with 0 vertices in the two-element part lies in or is adjacent to a member of the explicit candidate family.

theorem three_token_k2n_explicit_family_layer_0 (n : ℕ) (hn : 4 ≤ n)
    (z : {s : Finset (Fin 2 ⊕ Fin n) // s.card = 3})
    (hz : three_token_k2n_left_count z = 0) :
    z ∈ three_token_k2n_explicit_family n hn ∨
      ∃ w ∈ three_token_k2n_explicit_family n hn,
        (token_graph (completeBipartiteGraph (Fin 2) (Fin n)) 3).Adj w z
three_token_k2n_explicit_family_layer_1In LeanGraph Theory & Graph Algorithms

Every three-token configuration with 1 vertices in the two-element part lies in or is adjacent to a member of the explicit candidate family.

theorem three_token_k2n_explicit_family_layer_1 (n : ℕ) (hn : 4 ≤ n)
    (z : {s : Finset (Fin 2 ⊕ Fin n) // s.card = 3})
    (hz : three_token_k2n_left_count z = 1) :
    z ∈ three_token_k2n_explicit_family n hn ∨
      ∃ w ∈ three_token_k2n_explicit_family n hn,
        (token_graph (completeBipartiteGraph (Fin 2) (Fin n)) 3).Adj w z
three_token_k2n_explicit_family_layer_2In LeanGraph Theory & Graph Algorithms

Every three-token configuration with 2 vertices in the two-element part lies in or is adjacent to a member of the explicit candidate family.

theorem three_token_k2n_explicit_family_layer_2 (n : ℕ) (hn : 4 ≤ n)
    (z : {s : Finset (Fin 2 ⊕ Fin n) // s.card = 3})
    (hz : three_token_k2n_left_count z = 2) :
    z ∈ three_token_k2n_explicit_family n hn ∨
      ∃ w ∈ three_token_k2n_explicit_family n hn,
        (token_graph (completeBipartiteGraph (Fin 2) (Fin n)) 3).Adj w z
three_token_k2n_four_set_triple_coverIn LeanGraph Theory & Graph Algorithms

If every 2-element subset of a 4-element set Q is contained in some member of a family Z of 3-element sets, then Z has at least three members (two triples cover at most five of the six pairs).

theorem three_token_k2n_four_set_triple_cover (n : ℕ) (Q : Finset (Fin n))
    (Z : Finset (Finset (Fin n))) (hQ : Q.card = 4) (hZ : ∀ T ∈ Z, T.card = 3)
    (hcov : ∀ e, e ⊆ Q → e.card = 2 → ∃ T ∈ Z, e ⊆ T) : 3 ≤ Z.card
three_token_k2n_has_dominating_setIn LeanGraph Theory & Graph Algorithms

For every integer n ≥ 4, the 3-token graph F_3(K_{2,n}) has a dominating set S of cardinality at most (n / 2).choose 2 + (n - n / 2).choose 2 + n - 2.

theorem three_token_k2n_has_dominating_set (n : ℕ) (hn : 4 ≤ n) :
    ∃ S : Finset { s : Finset (Fin 2 ⊕ Fin n) // s.card = 3 },
      simple_graph_is_dominating (token_graph (completeBipartiteGraph (Fin 2) (Fin n)) 3) (S : Set { s : Finset (Fin 2 ⊕ Fin n) // s.card = 3 }) ∧
      S.card ≤ (n / 2).choose 2 + (n - n / 2).choose 2 + n - 2
three_token_k2n_pair_cover_arithmeticIn LeanGraph Theory & Graph Algorithms

Numerical core. Let T(n) = C(n,2) - ⌊n²/4⌋. If q ≤ n, k·⌊n/2⌋ + t ≥ T(n)·⌊n/2⌋, 3s + dp ≥ q(q-1)/2, 2k ≥ q, t ≤ s, dp ≤ k, and (q = 4 implies dp > 0 or s ≥ 3), then k + dp + s ≥ T(n) + q - 2.

theorem three_token_k2n_pair_cover_arithmetic (n q k dp s t : ℕ) (hn : 4 ≤ n) (hq : q ≤ n)
    (hk : k * (n / 2) + t ≥ (n * (n - 1) / 2 - n ^ 2 / 4) * (n / 2))
    (hcover : 3 * s + dp ≥ q * (q - 1) / 2)
    (hkq : 2 * k ≥ q) (hts : t ≤ s) (hdpk : dp ≤ k)
    (hcorner : q = 4 → 0 < dp ∨ 3 ≤ s) :
    k + dp + s ≥ (n * (n - 1) / 2 - n ^ 2 / 4) + q - 2
three_token_star_domination_arithIn LeanGraph Theory & Graph Algorithms

For every integer n ≥ 3, with s = (n+2)/4 and p = n - 2s, the saving s*(p+1) satisfies Nat.choose n 2 - s * (p + 1) ≤ Nat.choose n 2 - (n + 1)^2 / 8 (in fact s*(p+1) = (n+1)^2 / 8).

theorem three_token_star_domination_arith (n : ℕ) (hn : 3 ≤ n) :
    let s := (n + 2) / 4
    let p := n - 2 * s
    Nat.choose n 2 - s * (p + 1) ≤ Nat.choose n 2 - (n + 1)^2 / 8
three_token_star_has_dominating_setIn LeanGraph Theory & Graph Algorithms

For every integer n ≥ 3, with s = (n+2)/4 and p = n - 2s, the 3-token graph of the star graph on Option (Fin n) has a dominating set of cardinality at most Nat.choose n 2 - s * (p + 1).

theorem three_token_star_has_dominating_set (n : ℕ) (hn : 3 ≤ n) :
    let s := (n + 2) / 4
    let p := n - 2 * s
    ∃ S : Finset { s : Finset (Option (Fin n)) // s.card = 3 },
      simple_graph_is_dominating (token_graph (SimpleGraph.starGraph (none : Option (Fin n))) 3) (S : Set _) ∧
      S.card ≤ Nat.choose n 2 - s * (p + 1)
threshold_sequence_delete_dominatingIn LeanGraph Theory & Graph Algorithms

Deleting a dominating vertex from a threshold degree sequence yields a threshold degree sequence on n vertices with degrees decremented by 1.

theorem threshold_sequence_delete_dominating (n : ℕ) (d : Fin (n + 1) → ℕ) (v : Fin (n + 1)) (hv : d v = n) (h : is_threshold_sequence d) : is_threshold_sequence (fun w => d (v.succAbove w) - 1)
threshold_sequence_delete_isolatedIn LeanGraph Theory & Graph Algorithms

Deleting an isolated vertex from a threshold degree sequence yields a threshold degree sequence on n vertices.

theorem threshold_sequence_delete_isolated (n : ℕ) (d : Fin (n + 1) → ℕ) (v : Fin (n + 1)) (hv : d v = 0) (h : is_threshold_sequence d) : is_threshold_sequence (d ∘ v.succAbove)
threshold_sequence_has_isolated_or_dominatingIn LeanGraph Theory & Graph Algorithms

Every threshold degree sequence on n + 1 vertices has an isolated vertex (degree 0) or a dominating vertex (degree n).

theorem threshold_sequence_has_isolated_or_dominating (n : ℕ) (d : Fin (n + 1) → ℕ) (h : is_threshold_sequence d) : ∃ v : Fin (n + 1), d v = 0 ∨ d v = n
top_isTwoKTwoFreeIn LeanGraph Theory & Graph Algorithms

The complete graph on any vertex type is 2K₂-free.

theorem top_isTwoKTwoFree (V : Type*) : IsTwoKTwoFree (⊤ : SimpleGraph V)
tournament_arborescence_hadamard_boundIn LeanGraph Theory & Graph Algorithms

Every tournament T of order n ≥ 2 with outdegrees d_1, ..., d_n satisfies τ(T) ≤ √(∏_{i=1}^n ((2d_i+1)^2 + n)) / (2^{n-1} √(n(n+1))) ≤ (n(n+1)/4)^{(n-1)/2}.

theorem tournament_arborescence_hadamard_bound (n : ℕ) (hn : 2 ≤ n) (T : Digraph (Fin n)) [DecidableRel T.Adj] (hT : digraph_is_tournament T) : (digraph_arborescence_count T : ℝ) ≤ Real.sqrt (∏ i : Fin n, ((2 * (digraph_out_count T i : ℝ) + 1) ^ 2 + (n : ℝ))) / ((2 : ℝ) ^ (n - 1) * Real.sqrt ((n : ℝ) * ((n : ℝ) + 1))) ∧ Real.sqrt (∏ i : Fin n, ((2 * (digraph_out_count T i : ℝ) + 1) ^ 2 + (n : ℝ))) / ((2 : ℝ) ^ (n - 1) * Real.sqrt ((n : ℝ) * ((n : ℝ) + 1))) ≤ (((n : ℝ) * ((n : ℝ) + 1) / 4)) ^ (((n : ℝ) - 1) / 2)
tournament_arborescence_hadamard_firstIn LeanGraph Theory & Graph Algorithms

Every tournament T on Fin n with n ≥ 2 satisfies τ(T) ≤ √(∏_{i=1}^n ((2d_i+1)² + n)) / (2^{n-1} √(n(n+1))), where d_i are the out-degrees.

theorem tournament_arborescence_hadamard_first (n : ℕ) (hn : 2 ≤ n) (T : Digraph (Fin n)) [DecidableRel T.Adj] (hT : digraph_is_tournament T) : (digraph_arborescence_count T : ℝ) ≤ Real.sqrt (∏ i : Fin n, ((2 * (digraph_out_count T i : ℝ) + 1) ^ 2 + (n : ℝ))) / ((2 : ℝ) ^ (n - 1) * Real.sqrt ((n : ℝ) * ((n : ℝ) + 1)))
tournament_arborescence_hadamard_secondIn LeanGraph Theory & Graph Algorithms

For a tournament T on Fin n with n ≥ 2 and out-degrees d_i, √(∏_{i=1}^n ((2d_i+1)² + n)) / (2^{n-1}√(n(n+1))) ≤ (n(n+1)/4)^{(n-1)/2}.

theorem tournament_arborescence_hadamard_second (n : ℕ) (hn : 2 ≤ n) (T : Digraph (Fin n)) [DecidableRel T.Adj] (hT : digraph_is_tournament T) : Real.sqrt (∏ i : Fin n, ((2 * (digraph_out_count T i : ℝ) + 1) ^ 2 + (n : ℝ))) / ((2 : ℝ) ^ (n - 1) * Real.sqrt ((n : ℝ) * ((n : ℝ) + 1))) ≤ (((n : ℝ) * ((n : ℝ) + 1) / 4)) ^ (((n : ℝ) - 1) / 2)
tournament_dijoin_reverse_inversion_number_leIn LeanGraph Theory & Graph Algorithms

For finite tournaments D₁ and D₂, the inversion number of D₁ → D₂ is at most that of D̄₁ → D̄₂. (Conjecture 4.1 half-reduction).

theorem tournament_dijoin_reverse_inversion_number_le
    (V W : Type) [Fintype V] [Fintype W] (D₁ : Digraph V) (D₂ : Digraph W)
    (h₁ : digraph_is_tournament D₁) (h₂ : digraph_is_tournament D₂) :
    digraph_inversion_number (digraph_dijoin D₁ D₂) ≤
      digraph_inversion_number (digraph_dijoin (digraph_reverse D₁) (digraph_reverse D₂))
tournament_hom_injectiveIn LeanGraph Theory & Graph Algorithms

Any adjacency-preserving map between tournaments is automatically injective.

theorem tournament_hom_injective {V W : Type*} (D₁ : Digraph V) (D₂ : Digraph W)
    (h₁ : digraph_is_tournament D₁) (h₂ : digraph_is_tournament D₂)
    (f : V → W) (hf : ∀ u v, D₂.Adj (f u) (f v) ↔ D₁.Adj u v) :
    Function.Injective f
tournament_inversion_number_le_min_rank_add_oneIn LeanGraph Theory & Graph Algorithms

For a finite tournament D: inv(D) ≤ tmr(D) + 1.

theorem tournament_inversion_number_le_min_rank_add_one (V : Type) [Fintype V] (D : Digraph V)
    (h : digraph_is_tournament D) :
    digraph_inversion_number D ≤ tournament_min_rank D + 1
tournament_is_universal_monoIn LeanGraph Theory & Graph Algorithms

If a tournament T is k-universal and m ≤ k, then T is m-universal.

theorem tournament_is_universal_mono {k m : ℕ} {V : Type*} (T : Digraph V)
    (h : tournament_is_universal k T) (hle : m ≤ k) :
    tournament_is_universal m T
tournament_is_universal_mono_succIn LeanGraph Theory & Graph Algorithms

Any (k+1)-universal tournament is also k-universal, by extending an arbitrary k-tournament with a universal sink and restricting the embedding.

theorem tournament_is_universal_mono_succ (k : ℕ) {V : Type*} (T : Digraph V) :
    tournament_is_universal (k + 1) T → tournament_is_universal k T
tournament_is_universal_of_subtournamentIn LeanGraph Theory & Graph Algorithms

If an induced subtournament is k-universal, then the ambient tournament is also k-universal.

theorem tournament_is_universal_of_subtournament (k : ℕ) {V W : Type*} (T_V : Digraph V) (T_W : Digraph W)
    (h_univ : tournament_is_universal k T_V) (g : V ↪ W)
    (hg : ∀ u v, T_W.Adj (g u) (g v) ↔ T_V.Adj u v) :
    tournament_is_universal k T_W
tournament_not_near_regular_exists_improving_tournamentIn LeanGraph Theory & Graph Algorithms

In any tournament on 2m vertices with m ≥ 2 that is not near-regular, there exists another tournament on the same vertex set with strictly more spanning arborescences.

theorem tournament_not_near_regular_exists_improving_tournament (m : ℕ) (hm : 2 ≤ m)
    (T : Digraph (Fin (2 * m))) [DecidableRel T.Adj] (hT : digraph_is_tournament T)
    (hnr : ¬ tournament_is_near_regular m T) :
    ∃ (T' : Digraph (Fin (2 * m))) (_ : DecidableRel T'.Adj),
      digraph_is_tournament T' ∧ digraph_arborescence_count T < digraph_arborescence_count T'
tournament_reverse_arc_arborescence_count_ltIn LeanGraph Theory & Graph Algorithms

If u → v is an arc of a tournament and the out-degree of u exceeds that of v by at least 2, then reversing that single arc strictly increases the number of spanning arborescences.

theorem tournament_reverse_arc_arborescence_count_lt {n : ℕ} (T : Digraph (Fin n)) [DecidableRel T.Adj]
    (hT : digraph_is_tournament T) (u v : Fin n) (huv : T.Adj u v)
    (hdeg : digraph_out_count T v + 2 ≤ digraph_out_count T u) :
    ∃ (T' : Digraph (Fin n)) (_ : DecidableRel T'.Adj),
      digraph_is_tournament T' ∧ digraph_arborescence_count T < digraph_arborescence_count T'
tournament_reverse_arc_arborescence_count_strict_increaseIn LeanGraph Theory & Graph Algorithms

Reversing an arc u → v with out-degree gap at least 2 in a tournament strictly increases the total number of spanning arborescences.

theorem tournament_reverse_arc_arborescence_count_strict_increase {n : ℕ} (T : Digraph (Fin n))
    [DecidableRel T.Adj] (hT : digraph_is_tournament T) (u v : Fin n) (huv : T.Adj u v)
    (hdeg : digraph_out_count T v + 2 ≤ digraph_out_count T u) :
    digraph_arborescence_count T <
      digraph_arborescence_count (digraph_reverse_arc T u v)
tournament_reverse_arc_det_laplacian_diff_posIn LeanGraph Theory & Graph Algorithms

In a tournament T with arc u → v satisfying deg^+(v) + 2 ≤ deg^+(u), the determinant of the shifted out-degree Laplacian 2 L_T + J strictly increases upon reversing the arc u → v.

theorem tournament_reverse_arc_det_laplacian_diff_pos {n : ℕ} (T : Digraph (Fin n))
    [DecidableRel T.Adj] (hT : digraph_is_tournament T) (u v : Fin n) (huv : T.Adj u v)
    (hdeg : digraph_out_count T v + 2 ≤ digraph_out_count T u) :
    ((2 : ℝ) • digraph_out_laplacian T + Matrix.of (fun _ _ : Fin n => (1 : ℝ))).det <
      ((2 : ℝ) • digraph_out_laplacian (digraph_reverse_arc T u v) + Matrix.of (fun _ _ : Fin n => (1 : ℝ))).det
tournament_reverse_arc_through_count_ltIn LeanGraph Theory & Graph Algorithms

If u → v is an arc of a tournament with out-degree gap at least 2 (deg^+(v) + 2 ≤ deg^+(u)), then the total through-count of the reversed arc v → u in reverse(T, u, v) strictly exceeds the through-count of u → v in T.

theorem tournament_reverse_arc_through_count_lt {n : ℕ} (T : Digraph (Fin n))
    [DecidableRel T.Adj] (hT : digraph_is_tournament T) (u v : Fin n) (huv : T.Adj u v)
    (hdeg : digraph_out_count T v + 2 ≤ digraph_out_count T u) :
    digraph_arborescence_count_through T u v <
      digraph_arborescence_count_through (digraph_reverse_arc T u v) v u
tournament_shifted_laplacian_row_sqIn LeanGraph Theory & Graph Algorithms

For a tournament T on Fin n with n ≥ 1 and out-degrees d_i, the squared Euclidean norm of the i-th row of 2·L_T + √((n+1)/n)·J is (2d_i + 1)² + n.

theorem tournament_shifted_laplacian_row_sq {n : ℕ} (hn : 1 ≤ n) (T : Digraph (Fin n)) [DecidableRel T.Adj] (hT : digraph_is_tournament T) (i : Fin n) : ∑ j : Fin n, (((2 : ℝ) • digraph_out_laplacian T + Real.sqrt (((n : ℝ) + 1) / (n : ℝ)) • Matrix.of (fun _ _ : Fin n => (1 : ℝ))) i j) ^ 2 = (2 * (digraph_out_count T i : ℝ) + 1) ^ 2 + (n : ℝ)
tree_card_four_all_edges_incident_of_degree_threeIn LeanGraph Theory & Graph Algorithms

In a tree on 4 vertices, a vertex of degree 3 is incident to every edge.

theorem tree_card_four_all_edges_incident_of_degree_three {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) [DecidableRel T.Adj] (hT : T.IsTree) (hcard : Fintype.card V = 4)
    {v : V} (hv : T.degree v = 3) : ∀ x y : V, T.Adj x y → x = v ∨ y = v
tree_card_four_degree_eq_three_of_all_edges_incidentIn LeanGraph Theory & Graph Algorithms

In a tree on 4 vertices, if every edge is incident to a fixed vertex v, then v has degree 3.

theorem tree_card_four_degree_eq_three_of_all_edges_incident {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) [DecidableRel T.Adj] (hT : T.IsTree) (hcard : Fintype.card V = 4)
    {v : V} (hv : ∀ x y : V, T.Adj x y → x = v ∨ y = v) : T.degree v = 3
tree_card_four_iso_of_degree_le_twoIn LeanGraph Theory & Graph Algorithms

Any two trees on 4 vertices with all degrees at most 2 are isomorphic (both are isomorphic to the path P_4).

theorem tree_card_four_iso_of_degree_le_two {V₁ V₂ : Type*} [Fintype V₁] [DecidableEq V₁] [Fintype V₂] [DecidableEq V₂]
    (T₁ : SimpleGraph V₁) (T₂ : SimpleGraph V₂) [DecidableRel T₁.Adj] [DecidableRel T₂.Adj]
    (hT₁ : T₁.IsTree) (hT₂ : T₂.IsTree) (hcard₁ : Fintype.card V₁ = 4) (hcard₂ : Fintype.card V₂ = 4)
    (hdeg₁ : ∀ v : V₁, T₁.degree v ≤ 2) (hdeg₂ : ∀ v : V₂, T₂.degree v ≤ 2) :
    Nonempty (T₁ ≃g T₂)
tree_diam_ge_three_of_not_starIn LeanGraph Theory & Graph Algorithms

For every finite tree T with at least one edge that is not a star graph, the diameter of T is at least 3.

theorem tree_diam_ge_three_of_not_star {V : Type*} [Fintype V] (T : SimpleGraph V) (hT : T.IsTree) (hm : 1 ≤ Nat.card T.edgeSet) (hstar : ¬ ∃ r : V, T = SimpleGraph.starGraph r) : 3 ≤ T.diam
tree_diam_ge_two_of_card_edge_ge_twoIn LeanGraph Theory & Graph Algorithms

For every finite tree T with at least 2 edges, the diameter of T is at least 2.

theorem tree_diam_ge_two_of_card_edge_ge_two {V : Type*} [Fintype V] (T : SimpleGraph V) (hT : T.IsTree) (hm : 2 ≤ Nat.card T.edgeSet) : 2 ≤ T.diam
tree_edge_not_incident_principal_vertex_sustainableIn LeanGraph Theory & Graph Algorithms

Let T be a tree on a finite vertex type V and let u be a principal vertex of T. If vw is an edge of T not incident to u (u ≠ v and u ≠ w), then there exists x ∈ {v, w} such that the graph obtained by deleting edge vw and adding edge ux is a tree with strictly greater adjacency spectral radius than T.

theorem tree_edge_not_incident_principal_vertex_sustainable
    {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) (hT : T.IsTree)
    (u : V) (hu : is_principal_vertex T u)
    (v w : V) (he : T.Adj v w) (huv : u ≠ v) (huw : u ≠ w) :
    ∃ x : V, (x = v ∨ x = w) ∧
      (T.deleteEdges {s(v, w)} ⊔ SimpleGraph.fromEdgeSet {s(u, x)}).IsTree ∧
      adjacency_spectral_radius T <
        adjacency_spectral_radius (T.deleteEdges {s(v, w)} ⊔ SimpleGraph.fromEdgeSet {s(u, x)})
tree_eq_starGraph_of_isUniversalIn LeanGraph Theory & Graph Algorithms

An acyclic graph with a universal vertex r is equal to the star graph centered at r.

theorem tree_eq_starGraph_of_isUniversal {V : Type*} [DecidableEq V]
    (T : SimpleGraph V) (hT : T.IsAcyclic) (r : V) (hr : T.IsUniversal r) :
    T = SimpleGraph.starGraph r
tree_exists_two_leaves_distinct_neighborsIn LeanGraph Theory & Graph Algorithms

Every finite tree T that is not a star graph has at least two distinct vertices of degree one whose neighbors are distinct.

theorem tree_exists_two_leaves_distinct_neighbors {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) [DecidableRel T.Adj] (hT : T.IsTree)
    (h_not_star : ¬ ∃ r : V, T = SimpleGraph.starGraph r) :
    ∃ u v a b : V, u ≠ v ∧ a ≠ b ∧ T.Adj u a ∧ T.Adj v b ∧ T.degree u = 1 ∧ T.degree v = 1
tree_fort_card_leaves_ge_twoIn LeanGraph Theory & Graph Algorithms

Every fort of a finite tree of order at least 3 contains at least two distinct leaves.

theorem tree_fort_card_leaves_ge_two {V : Type*} [Fintype V] [DecidableEq V] (T : SimpleGraph V) [DecidableRel T.Adj] (hT : T.IsTree) (hcard : 3 ≤ Fintype.card V) (F : Finset V) (hfort : simple_graph_is_fort T (F : Set V)) : ∃ a b : V, a ∈ F ∧ b ∈ F ∧ a ≠ b ∧ T.degree a = 1 ∧ T.degree b = 1
tree_is_starGraph_of_forall_isPath_length_le_twoIn LeanGraph Theory & Graph Algorithms

Every finite tree whose simple paths all have length at most 2 is a star graph.

theorem tree_is_starGraph_of_forall_isPath_length_le_two {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) (hT : T.IsTree)
    (h : ∀ (u v : V) (p : T.Walk u v), p.IsPath → p.length ≤ 2) :
    ∃ r : V, T = SimpleGraph.starGraph r
tree_reachable_from_path_by_shiftsIn LeanGraph Theory & Graph Algorithms

Every tree on Fin n is reachable from a path graph isomorphic to pathGraph n by a sequence of generalized tree shifts.

theorem tree_reachable_from_path_by_shifts (n : ℕ) (T : SimpleGraph (Fin n)) (hT : T.IsTree) :
    ∃ P : SimpleGraph (Fin n), Nonempty (P ≃g SimpleGraph.pathGraph n) ∧
      Relation.ReflTransGen is_generalized_tree_shift P T
tree_three_vertex_fort_shape_of_two_leavesIn LeanGraph Theory & Graph Algorithms

In a finite tree, if F = {a, b, p} is a fort with leaves a, b such that {a, b} is not a fort, then p has degree 2, lies on the path between a and b, and has distance at most 2 from each of a and b.

theorem tree_three_vertex_fort_shape_of_two_leaves {V : Type*} [Fintype V] [DecidableEq V] (T : SimpleGraph V) [DecidableRel T.Adj] (hT : T.IsTree) (a b p : V) (hab : a ≠ b) (hap : a ≠ p) (hbp : b ≠ p) (ha : T.degree a = 1) (hb : T.degree b = 1) (hfort : simple_graph_is_fort T ({a, b, p} : Set V)) (hnot : ¬ simple_graph_is_fort T ({a, b} : Set V)) : T.degree p = 2 ∧ T.dist a p ≤ 2 ∧ T.dist p b ≤ 2 ∧ T.dist a p + T.dist p b = T.dist a b
tree_unexposed_parallel_pair_counterexampleIn LeanGraph Theory & Graph Algorithms

There is a rooted three-vertex path whose unexposed fort-free white sets have permitted singletons a,b,c, but pairs a,b and b,c are excluded while a,c is permitted.

theorem tree_unexposed_parallel_pair_counterexample : ∃ (T : SimpleGraph (Fin 3)) (r a b c : Fin 3), T.IsTree ∧ a ≠ b ∧ b ≠ c ∧ a ≠ c ∧ (let family : Set (Finset (Fin 3)) := {W | is_zero_forcing_set T ((Finset.univ \ W : Finset (Fin 3)) : Set (Fin 3)) ∧ ¬ zero_forcing_root_exposed_fort T r W}; ({a} : Finset (Fin 3)) ∈ family ∧ ({b} : Finset (Fin 3)) ∈ family ∧ ({c} : Finset (Fin 3)) ∈ family ∧ ({a,b} : Finset (Fin 3)) ∉ family ∧ ({b,c} : Finset (Fin 3)) ∉ family ∧ ({a,c} : Finset (Fin 3)) ∈ family)
tree_zero_forcing_poly_top_stepIn LeanGraph Theory & Graph Algorithms

For a finite tree T with n ≥ 2 vertices, the coefficient of X^n in the zero forcing polynomial (equal to 1: only the full vertex set) is at most the coefficient of X^{n-1} (equal to n).

theorem tree_zero_forcing_poly_top_step {V : Type*} [Fintype V]
    (T : SimpleGraph V) (hT : T.IsTree) (hn : 2 ≤ Fintype.card V) :
    (zero_forcing_poly T).coeff (Fintype.card V) ≤ (zero_forcing_poly T).coeff (Fintype.card V - 1)
triangle_packing_card_le_simple_graph_triangle_packing_numberIn LeanGraph Theory & Graph Algorithms

Any explicit pairwise edge-disjoint family of triangles of G is a lower bound for the triangle packing number of G.

theorem triangle_packing_card_le_simple_graph_triangle_packing_number
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (T : Finset (Finset V))
    (hcl : ∀ t ∈ T, G.IsNClique 3 t)
    (hpw : (T : Set (Finset V)).Pairwise (fun s t => (s ∩ t).card ≤ 1)) :
    T.card ≤ simple_graph_triangle_packing_number G
triangle_packing_complement_degree_evenIn LeanGraph Theory & Graph Algorithms

If U is a subset of the edges of G in which every vertex has even degree, and G itself is Eulerian (all degrees even), then deleting U from G yields a graph whose every vertex degree is again even.

theorem triangle_packing_complement_degree_even
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (U : Finset (Sym2 V))
    (hsub : U ⊆ G.edgeFinset)
    (hUeven : ∀ v, Even (sym2_edge_degree U v))
    (hGeven : ∀ v, Even (G.degree v)) :
    ∀ v, Even ((G.deleteEdges (U : Set (Sym2 V))).degree v)
triangle_packing_number_le_four_of_eulerian_seventeenIn LeanGraph Theory & Graph Algorithms

A finite simple graph that is Eulerian (all vertex degrees even) and has exactly 17 edges has triangle packing number at most 4.

theorem triangle_packing_number_le_four_of_eulerian_seventeen
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (hGeven : ∀ v, Even (G.degree v)) (hcard : G.edgeFinset.card = 17) :
    simple_graph_triangle_packing_number G ≤ 4
triangle_packing_union_propertiesIn LeanGraph Theory & Graph Algorithms

For a pairwise edge-disjoint family of triangles of G, the edge set U obtained as the union of their spanned edge pairs is contained in the edge set of G, has cardinality three times the number of triangles, and every vertex has even U-degree.

theorem triangle_packing_union_properties
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (T : Finset (Finset V))
    (hcl : ∀ t ∈ T, G.IsNClique 3 t)
    (hpw : (T : Set (Finset V)).Pairwise (fun s t => (s ∩ t).card ≤ 1)) :
    ((T.image finite_vertex_set_edge_encoding).biUnion id : Finset (Sym2 V)) ⊆ G.edgeFinset ∧
    ((T.image finite_vertex_set_edge_encoding).biUnion id : Finset (Sym2 V)).card = 3 * T.card ∧
    (∀ v, Even (sym2_edge_degree ((T.image finite_vertex_set_edge_encoding).biUnion id) v))
triangle_plane_completion_checkIn LeanGraph Theory & Graph Algorithms

The finite check that every three listed triples whose three pairwise intersections are distinct singletons contain their opposite triple in the list.

def triangle_plane_completion_check : Bool
triangle_plane_obstructionIn LeanGraph Theory & Graph Algorithms

Seven explicit triples on seven points forming a linear degree-three intersecting system.

def triangle_plane_obstruction : List (Finset (Fin 7))
triangle_plane_obstruction_propertiesIn LeanGraph Theory & Graph Algorithms

The seven distinct triples are 3-uniform and pairwise meet in exactly one point; each point lies in three triples; their four-triple completion check is true; no two points cover them, whereas the displayed three points do. Thus closure and maximum degree three alone do not imply that the cover number is at most twice the packing number.

theorem triangle_plane_obstruction_properties :
    triangle_plane_obstruction.Nodup ∧ triangle_plane_obstruction.length = 7 ∧
    triangle_plane_obstruction.all (fun e => decide (e.card = 3)) = true ∧
    triangle_plane_obstruction.all (fun e => triangle_plane_obstruction.all (fun f =>
      decide (e = f ∨ (e ∩ f).card = 1))) = true ∧
    (∀ v : Fin 7, (triangle_plane_obstruction.filter fun e => v ∈ e).length = 3) ∧
    triangle_plane_completion_check = true ∧
    (∀ F : Finset (Fin 7), F.card ≤ 2 →
      (triangle_plane_obstruction.any fun e => decide (Disjoint F e)) = true) ∧
    (let F : Finset (Fin 7) := {0,1,6}
     F.card = 3 ∧ triangle_plane_obstruction.all (fun e => decide (¬ Disjoint F e)) = true)
tuza_iff_tuza_of_edge_count_geIn LeanGraph Theory & Graph Algorithms

Tuza's conjecture holds for all finite graphs if and only if, for every c ≥ 0, it holds for all graphs on n ≥ n₀(c) vertices with at least n²/4 − cn edges.

theorem tuza_iff_tuza_of_edge_count_ge :
    (∀ (n : ℕ) (G : SimpleGraph (Fin n)),
      simple_graph_triangle_cover_number G ≤ 2 * simple_graph_triangle_packing_number G) ↔
    ∀ c : ℝ, 0 ≤ c → ∃ n₀ : ℕ, ∀ (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj],
      n₀ ≤ n → (n : ℝ) ^ 2 / 4 - c * n ≤ G.edgeFinset.card →
        simple_graph_triangle_cover_number G ≤ 2 * simple_graph_triangle_packing_number G
two_connected_indepNum_eq_radius_cycle_card_sub_oneIn LeanGraph Theory & Graph Algorithms

Conjecture: every 2-connected graph on n >= 3 vertices with independence number equal to radius that is not a cycle (some vertex has degree at least 3) contains a cycle of length n-1.

theorem two_connected_indepNum_eq_radius_cycle_card_sub_one {V : Type*} [Fintype V]
    (G : SimpleGraph V) (hn : 3 ≤ Fintype.card V) (hconn : G.Connected)
    (h2 : ∀ v : V, (G.induce ({v}ᶜ : Set V)).Connected)
    (hα : (G.indepNum : ℕ∞) = G.radius)
    (hdeg : ∃ v a b c : V, a ≠ b ∧ a ≠ c ∧ b ≠ c ∧ G.Adj v a ∧ G.Adj v b ∧ G.Adj v c) :
    ∃ (u : V) (p : G.Walk u u), p.IsCycle ∧ p.length + 1 = Fintype.card V
two_connected_indepNum_eq_radius_hamiltonianIn LeanGraph Theory & Graph Algorithms

Every 2-connected graph on at least three vertices whose independence number equals its radius is Hamiltonian.

theorem two_connected_indepNum_eq_radius_hamiltonian {V : Type*} [Fintype V] (G : SimpleGraph V)
    (hn : 3 ≤ Fintype.card V) (hconn : G.Connected)
    (h2 : ∀ v : V, (G.induce ({v}ᶜ : Set V)).Connected)
    (hα : (G.indepNum : ℕ∞) = G.radius) :
    ∃ (u : V) (p : G.Walk u u), p.IsCycle ∧ p.length = Fintype.card V
two_fractional_order_four_charpoly_certificate_H_boundIn LeanGraph Theory & Graph Algorithms

For an order-4 two-fractional standardized Laplacian L with characteristic-polynomial coefficients c1, c2, c3, the combination 4 (c3^2 c2^2 - 4 c2^3 - 4 c3^3 c1 - 27 c1^2 + 18 c1 c2 c3) + (c3^2 - 3 c2 + 1/4)^2 is nonnegative.

theorem two_fractional_order_four_charpoly_certificate_H_bound (L : Matrix (Fin 4) (Fin 4) ℝ)
    (hL : is_standardized_laplacian_two_fractional 4 L) :
    0 ≤ 4 * ((L.charpoly).coeff 3 ^ 2 * (L.charpoly).coeff 2 ^ 2 - 4 * (L.charpoly).coeff 2 ^ 3
          - 4 * (L.charpoly).coeff 3 ^ 3 * (L.charpoly).coeff 1 - 27 * (L.charpoly).coeff 1 ^ 2
          + 18 * (L.charpoly).coeff 1 * (L.charpoly).coeff 2 * (L.charpoly).coeff 3)
        + ((L.charpoly).coeff 3 ^ 2 - 3 * (L.charpoly).coeff 2 + 1 / 4) ^ 2
two_mul_dist_le_optimal_tourIn LeanGraph Theory & Graph Algorithms

In any finite connected simple graph G on n ≥ 2 vertices with positive edge weights w, the minimum length of a closed walk visiting all vertices is at least twice the shortest-path distance between any two vertices u and v.

theorem two_mul_dist_le_optimal_tour {V : Type*} [Fintype V]
    (G : SimpleGraph V) (hG : G.Connected) (hn : 2 ≤ Fintype.card V)
    (w : Sym2 V → ℝ) (hw : ∀ e ∈ G.edgeSet, 0 < w e) (u v : V) :
    2 * weighted_dist G w u v ≤ optimal_tour_length G w
two_token_double_star_domination_numberIn LeanGraph Theory & Graph Algorithms

Let 1 ≤ a ≤ b be integers. Then the domination number of the 2-token graph of the double star S_{a,b} is γ(F_2(S_{a,b})) = 2a + b - 1.

theorem two_token_double_star_domination_number (a b : ℕ) (ha : 1 ≤ a) (hab : a ≤ b) :
    simple_graph_domination_number (token_graph (double_star_graph a b) 2) = 2 * a + b - 1
two_token_double_star_domination_number_geIn LeanGraph Theory & Graph Algorithms

For integers 1 ≤ a ≤ b, the domination number of the 2-token graph of the double star S_{a,b} is at least 2a + b - 1.

theorem two_token_double_star_domination_number_ge (a b : ℕ) (ha : 1 ≤ a) (hab : a ≤ b) :
    2 * a + b - 1 ≤ simple_graph_domination_number (token_graph (double_star_graph a b) 2)
two_token_double_star_domination_number_leIn LeanGraph Theory & Graph Algorithms

For integers 1 ≤ a ≤ b, the domination number of the 2-token graph of the double star S_{a,b} is at most 2a + b - 1.

theorem two_token_double_star_domination_number_le (a b : ℕ) (ha : 1 ≤ a) (hab : a ≤ b) :
    simple_graph_domination_number (token_graph (double_star_graph a b) 2) ≤ 2 * a + b - 1
two_token_k2_nminus2_card_ge_componentsIn LeanGraph Theory & Graph Algorithms

The cardinality of D is at least 1 (the LL vertex) + t (the LR vertices covering distinct right elements) + (n - 2 - t).choose 2 (the RR vertices from uncovered right elements).

theorem two_token_k2_nminus2_card_ge_components (n : ℕ) (hn : 4 ≤ n)
    (D : Finset { s : Finset (Fin 2 ⊕ Fin (n - 2)) // s.card = 2 })
    (hD : simple_graph_is_dominating (token_graph (completeBipartiteGraph (Fin 2) (Fin (n - 2))) 2) (D : Set _))
    (hmem : two_token_kmn_ll_vertex (0 : Fin 2) (1 : Fin 2) (by decide) ∈ D) :
    1 + (two_token_kmn_cr D).card + ((n - 2) - (two_token_kmn_cr D).card).choose 2 ≤ D.card
two_token_k2_nminus2_dominating_set_card_geIn LeanGraph Theory & Graph Algorithms

For every integer n ≥ 4, every dominating set D of the 2-token graph F_2(K_{2,n-2}) of the complete bipartite graph K_{2,n-2} has cardinality at least n - 2.

theorem two_token_k2_nminus2_dominating_set_card_ge (n : ℕ) (hn : 4 ≤ n)
    (D : Finset { s : Finset (Fin 2 ⊕ Fin (n - 2)) // s.card = 2 })
    (hD : simple_graph_is_dominating (token_graph (completeBipartiteGraph (Fin 2) (Fin (n - 2))) 2) (D : Set _)) :
    n - 2 ≤ D.card
two_token_k2_nminus2_dominating_set_card_ge_of_mem_llIn LeanGraph Theory & Graph Algorithms

For every integer n ≥ 4 and every dominating set D of F_2(K_{2,n-2}), if the unique pair of left vertices belongs to D, then D has cardinality at least n - 2.

theorem two_token_k2_nminus2_dominating_set_card_ge_of_mem_ll (n : ℕ) (hn : 4 ≤ n)
    (D : Finset { s : Finset (Fin 2 ⊕ Fin (n - 2)) // s.card = 2 })
    (hD : simple_graph_is_dominating (token_graph (completeBipartiteGraph (Fin 2) (Fin (n - 2))) 2) (D : Set _))
    (hmem : two_token_kmn_ll_vertex (0 : Fin 2) (1 : Fin 2) (by decide) ∈ D) :
    n - 2 ≤ D.card
two_token_k2_nminus2_dominating_set_card_ge_of_not_mem_llIn LeanGraph Theory & Graph Algorithms

For every integer n ≥ 4 and every dominating set D of F_2(K_{2,n-2}), if the unique pair of left vertices does not belong to D, then D has cardinality at least n - 2.

theorem two_token_k2_nminus2_dominating_set_card_ge_of_not_mem_ll (n : ℕ) (hn : 4 ≤ n)
    (D : Finset { s : Finset (Fin 2 ⊕ Fin (n - 2)) // s.card = 2 })
    (hD : simple_graph_is_dominating (token_graph (completeBipartiteGraph (Fin 2) (Fin (n - 2))) 2) (D : Set _))
    (hnot : two_token_kmn_ll_vertex (0 : Fin 2) (1 : Fin 2) (by decide) ∉ D) :
    n - 2 ≤ D.card
two_token_k2_nminus2_domination_numberIn LeanGraph Theory & Graph Algorithms

For every integer n ≥ 4, the domination number of the 2-token graph of the complete bipartite graph K_{2,n-2} is γ(F_2(K_{2,n-2})) = n - 2.

theorem two_token_k2_nminus2_domination_number (n : ℕ) (hn : 4 ≤ n) :
    simple_graph_domination_number (token_graph (completeBipartiteGraph (Fin 2) (Fin (n - 2))) 2) = n - 2
two_token_k2_nminus2_domination_number_geIn LeanGraph Theory & Graph Algorithms

For every integer n ≥ 4, the domination number of the 2-token graph F_2(K_{2,n-2}) of the complete bipartite graph K_{2,n-2} is at least n - 2.

theorem two_token_k2_nminus2_domination_number_ge (n : ℕ) (hn : 4 ≤ n) :
    n - 2 ≤ simple_graph_domination_number (token_graph (completeBipartiteGraph (Fin 2) (Fin (n - 2))) 2)
two_token_k2_nminus2_domination_number_leIn LeanGraph Theory & Graph Algorithms

For every integer n ≥ 4, the domination number of the 2-token graph F_2(K_{2,n-2}) of the complete bipartite graph K_{2,n-2} is at most n - 2.

theorem two_token_k2_nminus2_domination_number_le (n : ℕ) (hn : 4 ≤ n) :
    simple_graph_domination_number (token_graph (completeBipartiteGraph (Fin 2) (Fin (n - 2))) 2) ≤ n - 2
two_token_k2_nminus2_has_dominating_setIn LeanGraph Theory & Graph Algorithms

For every integer n ≥ 4, there exists a dominating set of the 2-token graph F_2(K_{2,n-2}) of cardinality at most n - 2.

theorem two_token_k2_nminus2_has_dominating_set (n : ℕ) (hn : 4 ≤ n) :
    ∃ S : Finset { s : Finset (Fin 2 ⊕ Fin (n - 2)) // s.card = 2 },
      simple_graph_is_dominating (token_graph (completeBipartiteGraph (Fin 2) (Fin (n - 2))) 2) (S : Set _) ∧
      S.card ≤ n - 2
two_token_k2_nminus2_rr_adj_lrIn LeanGraph Theory & Graph Algorithms

Any vertex adjacent to the RR vertex {inr j, inr k} in F_2(K_{2, n-2}) is an LR vertex containing either inr j or inr k.

theorem two_token_k2_nminus2_rr_adj_lr (n : ℕ) (hn : 4 ≤ n)
    (j k : Fin (n - 2)) (hjk : j ≠ k)
    (u : { s : Finset (Fin 2 ⊕ Fin (n - 2)) // s.card = 2 })
    (hadj : (token_graph (completeBipartiteGraph (Fin 2) (Fin (n - 2))) 2).Adj
      u (two_token_kmn_rr_vertex j k hjk)) :
    ∃ a : Fin 2, u.val = {Sum.inl a, Sum.inr j} ∨ u.val = {Sum.inl a, Sum.inr k}
two_token_k2_nminus2_rr_mem_of_not_mem_crIn LeanGraph Theory & Graph Algorithms

If D is a dominating set of F_2(K_{2, n-2}) and distinct right vertices j, k do not appear in the right-projection of the LR part of D, then the RR vertex {inr j, inr k} must belong to D.

theorem two_token_k2_nminus2_rr_mem_of_not_mem_cr (n : ℕ) (hn : 4 ≤ n)
    (D : Finset { s : Finset (Fin 2 ⊕ Fin (n - 2)) // s.card = 2 })
    (hD : simple_graph_is_dominating (token_graph (completeBipartiteGraph (Fin 2) (Fin (n - 2))) 2) (D : Set _))
    (j k : Fin (n - 2)) (hjk : j ≠ k)
    (hj : j ∉ two_token_kmn_cr D) (hk : k ∉ two_token_kmn_cr D) :
    two_token_kmn_rr_vertex j k hjk ∈ D
two_token_kmn_adj_iffIn LeanGraph Theory & Graph Algorithms

Two vertices x,y of F_2(K_{m,n}) are adjacent iff they differ by exactly one element on each side and those two elements lie on opposite sides, i.e. there are u,v with u left, v right, and symmDiff x y = {u,v}.

theorem two_token_kmn_adj_iff {m n : ℕ} (x y : {s : Finset (Fin m ⊕ Fin n) // s.card = 2}) :
    (two_token_kmn m n).Adj x y ↔
      ∃ u v : Fin m ⊕ Fin n, u.isLeft ∧ v.isRight ∧
        symmDiff (x.val : Set (Fin m ⊕ Fin n)) (y.val : Set (Fin m ⊕ Fin n)) = {u, v}
two_token_kmn_arithmetic_baseIn LeanGraph Theory & Graph Algorithms

Any parameters satisfying the reduction's inequality system give a+b+c >= n + floor(m/2) - 1.

theorem two_token_kmn_arithmetic_base (m n a b c α β u v : ℕ)
    (hm : 2 ≤ m) (hmn : m ≤ n)
    (hα : α ≤ m) (hβ : β ≤ n) (hu : u ≤ m) (hv : v ≤ n)
    (hAu : m - α ≥ 2 → u ≤ α) (hBv : n - β ≥ 2 → v ≤ β)
    (ha1 : a ≥ (m - α) * (m - α - 1) / 2 + (α - u + 1) / 2)
    (ha2 : a ≥ (m - u + 1) / 2)
    (hb1 : b ≥ (n - β) * (n - β - 1) / 2 + (β - v + 1) / 2)
    (hb2 : b ≥ (n - v + 1) / 2)
    (hc1 : c ≥ α) (hc2 : c ≥ β)
    (hc3 : c ≥ u * v + (α - u))
    (hc4 : c ≥ u * v + (β - v)) :
    a + b + c ≥ n + m / 2 - 1
two_token_kmn_arithmetic_extraIn LeanGraph Theory & Graph Algorithms

When m is odd, m >= 5 and n != m+1, every admissible parameter tuple gives a+b+c >= n + floor(m/2).

theorem two_token_kmn_arithmetic_extra (m n a b c α β u v : ℕ)
    (hm : 2 ≤ m) (hmn : m ≤ n)
    (hα : α ≤ m) (hβ : β ≤ n) (hu : u ≤ m) (hv : v ≤ n)
    (hAu : m - α ≥ 2 → u ≤ α) (hBv : n - β ≥ 2 → v ≤ β)
    (ha1 : a ≥ (m - α) * (m - α - 1) / 2 + (α - u + 1) / 2)
    (ha2 : a ≥ (m - u + 1) / 2)
    (hb1 : b ≥ (n - β) * (n - β - 1) / 2 + (β - v + 1) / 2)
    (hb2 : b ≥ (n - v + 1) / 2)
    (hc1 : c ≥ α) (hc2 : c ≥ β)
    (hc3 : c ≥ u * v + (α - u))
    (hc4 : c ≥ u * v + (β - v))
    (ho : ¬ Even m) (hm5 : 5 ≤ m) (hne : n ≠ m + 1) :
    a + b + c ≥ n + m / 2
two_token_kmn_dominating_inequalitiesIn LeanGraph Theory & Graph Algorithms

For any dominating set S of F_2(K_{m,n}) there are naturals a,b,c (counts of LL/RR/LR vertices of S), alpha, beta (numbers of left/right vertices used by the LR part) and u, v (numbers of left/right vertices not covered by the LL/RR part) with |S| = a+b+c and the listed numeric inequalities.

theorem two_token_kmn_dominating_inequalities (m n : ℕ) (hm : 2 ≤ m) (hmn : m ≤ n)
    (S : Finset {s : Finset (Fin m ⊕ Fin n) // s.card = 2})
    (hdom : simple_graph_is_dominating (two_token_kmn m n) (S : Set _)) :
    ∃ (a b c α β u v : ℕ),
      S.card = a + b + c ∧ α ≤ m ∧ β ≤ n ∧ u ≤ m ∧ v ≤ n ∧
      (m - α ≥ 2 → u ≤ α) ∧ (n - β ≥ 2 → v ≤ β) ∧
      a ≥ (m - α) * (m - α - 1) / 2 + (α - u + 1) / 2 ∧ a ≥ (m - u + 1) / 2 ∧
      b ≥ (n - β) * (n - β - 1) / 2 + (β - v + 1) / 2 ∧ b ≥ (n - v + 1) / 2 ∧
      c ≥ α ∧ c ≥ β ∧ c ≥ u * v + (α - u) ∧ c ≥ u * v + (β - v)
two_token_kmn_domination_numberIn LeanGraph Theory & Graph Algorithms

Let 2 <= m <= n. The domination number of the 2-token graph F_2(K_{m,n}) is m/2 + n - 1 if m is even; (m-1)/2 + n - 1 if m = 3, or if m is odd, m >= 5, and n = m + 1; and (m-1)/2 + n if m is odd, m >= 5, and n >= m + 2 (or n = m).

theorem two_token_kmn_domination_number (m n : ℕ) (hm : 2 ≤ m) (hmn : m ≤ n) :
    simple_graph_domination_number (two_token_kmn m n) =
      if Even m then m / 2 + n - 1
      else if m = 3 ∨ n = m + 1 then (m - 1) / 2 + n - 1
      else (m - 1) / 2 + n
two_token_kmn_domination_number_ge_evenIn LeanGraph Theory & Graph Algorithms

For even m, every dominating set of F_2(K_{m,n}) has at least m/2 + n - 1 vertices.

theorem two_token_kmn_domination_number_ge_even (m n : ℕ) (hm : 2 ≤ m) (hmn : m ≤ n) (h : Even m) :
    m / 2 + n - 1 ≤ simple_graph_domination_number (two_token_kmn m n)
two_token_kmn_domination_number_ge_oddIn LeanGraph Theory & Graph Algorithms

For odd m, every dominating set has at least (m-1)/2 + n - 1 vertices when m = 3 or n = m+1, and at least (m-1)/2 + n otherwise.

theorem two_token_kmn_domination_number_ge_odd (m n : ℕ) (hm : 2 ≤ m) (hmn : m ≤ n) (h : ¬ Even m) :
    (if m = 3 ∨ n = m + 1 then (m - 1) / 2 + n - 1 else (m - 1) / 2 + n) ≤
      simple_graph_domination_number (two_token_kmn m n)
two_token_kmn_domination_number_le_evenIn LeanGraph Theory & Graph Algorithms

For even m there is a dominating set of F_2(K_{m,n}) with m/2 + n - 1 vertices.

theorem two_token_kmn_domination_number_le_even (m n : ℕ) (hm : 2 ≤ m) (hmn : m ≤ n) (h : Even m) :
    simple_graph_domination_number (two_token_kmn m n) ≤ m / 2 + n - 1
two_token_kmn_domination_number_le_oddIn LeanGraph Theory & Graph Algorithms

For odd m, F_2(K_{m,n}) has a dominating set of size (m-1)/2 + n - 1 when m = 3 or n = m+1, and of size (m-1)/2 + n otherwise.

theorem two_token_kmn_domination_number_le_odd (m n : ℕ) (hm : 2 ≤ m) (hmn : m ≤ n) (h : ¬ Even m) :
    simple_graph_domination_number (two_token_kmn m n) ≤
      (if m = 3 ∨ n = m + 1 then (m - 1) / 2 + n - 1 else (m - 1) / 2 + n)
two_token_kmn_domination_number_le_odd_otherIn LeanGraph Theory & Graph Algorithms

For odd m >= 5 and n != m+1 with m <= n, there is a dominating set of F_2(K_{m,n}) with (m-1)/2 + n vertices.

theorem two_token_kmn_domination_number_le_odd_other (m n : ℕ) (hm : 5 ≤ m) (hmn : m ≤ n) (ho : ¬ Even m) (hne : n ≠ m + 1) :
    simple_graph_domination_number (two_token_kmn m n) ≤ (m - 1) / 2 + n
two_token_kmn_domination_number_le_odd_succIn LeanGraph Theory & Graph Algorithms

For odd m >= 5 there is a dominating set of F_2(K_{m,m+1}) with (m-1)/2 + m vertices.

theorem two_token_kmn_domination_number_le_odd_succ (m n : ℕ) (hm : 5 ≤ m) (ho : ¬ Even m) (h : n = m + 1) :
    simple_graph_domination_number (two_token_kmn m n) ≤ (m - 1) / 2 + n - 1
two_token_kmn_domination_number_le_threeIn LeanGraph Theory & Graph Algorithms

For n >= 3 there is a dominating set of F_2(K_{3,n}) with n vertices.

theorem two_token_kmn_domination_number_le_three (n : ℕ) (hn : 3 ≤ n) :
    simple_graph_domination_number (two_token_kmn 3 n) ≤ n
two_token_kmn_domination_number_two_twoIn LeanGraph Theory & Graph Algorithms

The domination number of F_2(K_{2,2}) is 2, in agreement with the general formula.

theorem two_token_kmn_domination_number_two_two :
    simple_graph_domination_number (two_token_kmn 2 2) = 2
two_token_kmn_ll_card_geIn LeanGraph Theory & Graph Algorithms

If S dominates F_2(K_{m,n}), alpha = #cl S, u = m - #al S, then the number a of LL vertices satisfies a >= C(m-alpha,2) + ceil((alpha-u)/2), provided m - alpha >= 2.

theorem two_token_kmn_ll_card_ge {m n : ℕ}
    (S : Finset {s : Finset (Fin m ⊕ Fin n) // s.card = 2})
    (hdom : simple_graph_is_dominating (two_token_kmn m n) (S : Set _))
    (hα : 2 ≤ m - (two_token_kmn_cl S).card) :
    (m - (two_token_kmn_cl S).card) * (m - (two_token_kmn_cl S).card - 1) / 2 +
      ((two_token_kmn_cl S).card - (m - (two_token_kmn_al S).card) + 1) / 2 ≤
      (S.filter two_token_kmn_ll).card
two_token_kmn_ll_two_mul_card_geIn LeanGraph Theory & Graph Algorithms

Every LL vertex contains exactly two left vertices, so twice the number of LL vertices of S is at least the number m - u of left vertices covered by them: 2a >= m - u.

theorem two_token_kmn_ll_two_mul_card_ge {m n : ℕ}
    (S : Finset {s : Finset (Fin m ⊕ Fin n) // s.card = 2}) :
    2 * (S.filter two_token_kmn_ll).card ≥ m - (m - (two_token_kmn_al S).card)
two_token_kmn_lr_adj_xorIn LeanGraph Theory & Graph Algorithms

Adjacent vertices of F_2(K_{m,n}) differ in type: x is LR iff y is not LR.

theorem two_token_kmn_lr_adj_xor {m n : ℕ} {x y : {s : Finset (Fin m ⊕ Fin n) // s.card = 2}}
    (h : (two_token_kmn m n).Adj x y) : (two_token_kmn_lr x ↔ ¬ two_token_kmn_lr y)
two_token_kmn_lr_card_ge_cl_crIn LeanGraph Theory & Graph Algorithms

The LR part of S has at least alpha = #cl vertices and at least beta = #cr vertices, because each LR vertex has exactly one left and one right element.

theorem two_token_kmn_lr_card_ge_cl_cr {m n : ℕ}
    (S : Finset {s : Finset (Fin m ⊕ Fin n) // s.card = 2}) :
    (two_token_kmn_cl S).card ≤ (S.filter two_token_kmn_lr).card ∧
      (two_token_kmn_cr S).card ≤ (S.filter two_token_kmn_lr).card
two_token_kmn_lr_card_ge_colsIn LeanGraph Theory & Graph Algorithms

If the RR part of S does not cover all of Fin n, then the LR part has at least (n - #br)*(m - #al) + (#cl - (m - #al)) >= (n - #br)*(m - #al) vertices.

theorem two_token_kmn_lr_card_ge_cols {m n : ℕ}
    (S : Finset {s : Finset (Fin m ⊕ Fin n) // s.card = 2})
    (hdom : simple_graph_is_dominating (two_token_kmn m n) (S : Set _))
    (hv : (two_token_kmn_br S).card < n) :
    (n - (two_token_kmn_br S).card) * (m - (two_token_kmn_al S).card) +
      ((two_token_kmn_cl S).card - (m - (two_token_kmn_al S).card)) ≤
      (S.filter two_token_kmn_lr).card
two_token_kmn_lr_card_ge_rowsIn LeanGraph Theory & Graph Algorithms

If the LL part of S does not cover all of Fin m, then the LR part has at least (n - #br)*(m - #al) + (#cr - (n - #br)) vertices.

theorem two_token_kmn_lr_card_ge_rows {m n : ℕ}
    (S : Finset {s : Finset (Fin m ⊕ Fin n) // s.card = 2})
    (hdom : simple_graph_is_dominating (two_token_kmn m n) (S : Set _))
    (hu : (two_token_kmn_al S).card < m) :
    (n - (two_token_kmn_br S).card) * (m - (two_token_kmn_al S).card) +
      ((two_token_kmn_cr S).card - (n - (two_token_kmn_br S).card)) ≤
      (S.filter two_token_kmn_lr).card
two_token_kmn_rows_subset_clIn LeanGraph Theory & Graph Algorithms

If S dominates and not every right vertex is covered by the RR part of S, then every left vertex not covered by the LL part belongs to the LR part's left set.

theorem two_token_kmn_rows_subset_cl {m n : ℕ}
    (S : Finset {s : Finset (Fin m ⊕ Fin n) // s.card = 2})
    (hdom : simple_graph_is_dominating (two_token_kmn m n) (S : Set _))
    (hv : (two_token_kmn_br S).card < n) :
    ∀ x : Fin m, x ∉ two_token_kmn_al S → x ∈ two_token_kmn_cl S
two_token_kmn_rr_card_geIn LeanGraph Theory & Graph Algorithms

If S dominates F_2(K_{m,n}), beta = #cr S and v = n - #br S, then the number b of RR vertices satisfies b >= C(n-beta,2) + ceil((beta-v)/2) provided n - beta >= 2.

theorem two_token_kmn_rr_card_ge {m n : ℕ}
    (S : Finset {s : Finset (Fin m ⊕ Fin n) // s.card = 2})
    (hdom : simple_graph_is_dominating (two_token_kmn m n) (S : Set _))
    (hβ : 2 ≤ n - (two_token_kmn_cr S).card) :
    (n - (two_token_kmn_cr S).card) * (n - (two_token_kmn_cr S).card - 1) / 2 +
      ((two_token_kmn_cr S).card - (n - (two_token_kmn_br S).card) + 1) / 2 ≤
      (S.filter two_token_kmn_rr).card
two_token_kmn_rr_two_mul_card_geIn LeanGraph Theory & Graph Algorithms

Twice the number of RR vertices of S is at least the number n - v of right vertices they cover.

theorem two_token_kmn_rr_two_mul_card_ge {m n : ℕ}
    (S : Finset {s : Finset (Fin m ⊕ Fin n) // s.card = 2}) :
    2 * (S.filter two_token_kmn_rr).card ≥ n - (n - (two_token_kmn_br S).card)
two_token_kmn_type_card_sumIn LeanGraph Theory & Graph Algorithms

Every 2-token vertex is exactly one of LL, LR, RR; hence for any S the counts a (LL), b (RR), c (LR) sum to |S|.

theorem two_token_kmn_type_card_sum {m n : ℕ}
    (S : Finset {s : Finset (Fin m ⊕ Fin n) // s.card = 2}) :
    (S.filter two_token_kmn_ll).card + (S.filter two_token_kmn_rr).card +
      (S.filter two_token_kmn_lr).card = S.card
two_token_kmn_type_inhabitedIn LeanGraph Theory & Graph Algorithms

For m, n >= 2 there exist vertices of F_2(K_{m,n}) of type LL, RR and LR, and adjacent pairs of each admissible cross type.

theorem two_token_kmn_type_inhabited (m n : ℕ) (hm : 2 ≤ m) (hn : 2 ≤ n) :
    (∃ v : {s : Finset (Fin m ⊕ Fin n) // s.card = 2}, two_token_kmn_ll v) ∧
      (∃ v : {s : Finset (Fin m ⊕ Fin n) // s.card = 2}, two_token_kmn_rr v) ∧
      (∃ v : {s : Finset (Fin m ⊕ Fin n) // s.card = 2}, two_token_kmn_lr v)
two_token_kmn_u_le_alphaIn LeanGraph Theory & Graph Algorithms

If m - alpha >= 2 then u <= alpha, i.e. the LL part of a dominating set covers all left vertices outside the LR part's left set.

theorem two_token_kmn_u_le_alpha {m n : ℕ}
    (S : Finset {s : Finset (Fin m ⊕ Fin n) // s.card = 2})
    (hdom : simple_graph_is_dominating (two_token_kmn m n) (S : Set _))
    (hα : 2 ≤ m - (two_token_kmn_cl S).card) :
    m - (two_token_kmn_al S).card ≤ (two_token_kmn_cl S).card
two_token_kmn_uncovered_ll_pair_memIn LeanGraph Theory & Graph Algorithms

If S dominates F_2(K_{m,n}) and neither a nor a' (distinct left vertices) occurs in an LR vertex of S, then {a,a'} itself must belong to S.

theorem two_token_kmn_uncovered_ll_pair_mem {m n : ℕ}
    (S : Finset {s : Finset (Fin m ⊕ Fin n) // s.card = 2})
    (hdom : simple_graph_is_dominating (two_token_kmn m n) (S : Set _))
    (a a' : Fin m) (h : a ≠ a')
    (ha : a ∉ two_token_kmn_cl S) (ha' : a' ∉ two_token_kmn_cl S) :
    two_token_kmn_ll_vertex a a' h ∈ S
two_token_kmn_uncovered_lr_memIn LeanGraph Theory & Graph Algorithms

If S dominates F_2(K_{m,n}), and x is a left vertex not covered by the LL part of S and y a right vertex not covered by the RR part of S, then the LR vertex {x,y} belongs to S.

theorem two_token_kmn_uncovered_lr_mem {m n : ℕ}
    (S : Finset {s : Finset (Fin m ⊕ Fin n) // s.card = 2})
    (hdom : simple_graph_is_dominating (two_token_kmn m n) (S : Set _))
    (x : Fin m) (y : Fin n) (hx : x ∉ two_token_kmn_al S) (hy : y ∉ two_token_kmn_br S) :
    two_token_kmn_lr_vertex x y ∈ S
two_token_kmn_uncovered_rr_pair_memIn LeanGraph Theory & Graph Algorithms

If S dominates F_2(K_{m,n}) and neither b nor b' (distinct right vertices) occurs in an LR vertex of S, then {b,b'} itself must belong to S.

theorem two_token_kmn_uncovered_rr_pair_mem {m n : ℕ}
    (S : Finset {s : Finset (Fin m ⊕ Fin n) // s.card = 2})
    (hdom : simple_graph_is_dominating (two_token_kmn m n) (S : Set _))
    (b b' : Fin n) (h : b ≠ b')
    (hb : b ∉ two_token_kmn_br S) (hb' : b' ∉ two_token_kmn_br S) :
    two_token_kmn_rr_vertex b b' h ∈ S
two_token_kmn_v_le_betaIn LeanGraph Theory & Graph Algorithms

If n - beta >= 2 then v <= beta, i.e. the RR part of a dominating set covers all right vertices outside the LR part's right set.

theorem two_token_kmn_v_le_beta {m n : ℕ}
    (S : Finset {s : Finset (Fin m ⊕ Fin n) // s.card = 2})
    (hdom : simple_graph_is_dominating (two_token_kmn m n) (S : Set _))
    (hβ : 2 ≤ n - (two_token_kmn_cr S).card) :
    n - (two_token_kmn_br S).card ≤ (two_token_kmn_cr S).card
two_token_kmn_witness_evenIn LeanGraph Theory & Graph Algorithms

For even m and 2 <= m <= n, the set consisting of the LL vertices {a_{2i-1},a_{2i}} (i = 1..m/2) together with the LR vertices {a_j,b_j} for j = 1..m-1 and {a_m,b_j} for j = m..n-1 is a dominating set of F_2(K_{m,n}) of size m/2 + n - 1.

theorem two_token_kmn_witness_even (m n : ℕ) (hm : 2 ≤ m) (hmn : m ≤ n) (h : Even m) :
    ∃ S : Finset {s : Finset (Fin m ⊕ Fin n) // s.card = 2},
      simple_graph_is_dominating (two_token_kmn m n) (S : Set _) ∧ S.card = m / 2 + n - 1
two_token_kmn_witness_odd_otherIn LeanGraph Theory & Graph Algorithms

For odd m >= 5 and m <= n with n != m+1, the set of LL vertices {a_{2j-1},a_{2j}} (j = 1..(m-1)/2), LR vertices {a_h,b_h} (h = 1..m-1) and {a_m,b_i} (i = m..n-1), plus {a_{m-1},a_m}, is a dominating set of F_2(K_{m,n}) with (m-1)/2 + n vertices.

theorem two_token_kmn_witness_odd_other (m n : ℕ) (hm : 5 ≤ m) (hmn : m ≤ n) (ho : ¬ Even m) (hne : n ≠ m + 1) :
    ∃ S : Finset {s : Finset (Fin m ⊕ Fin n) // s.card = 2},
      simple_graph_is_dominating (two_token_kmn m n) (S : Set _) ∧
        S.card = (m - 1) / 2 + n
two_token_kmn_witness_odd_succIn LeanGraph Theory & Graph Algorithms

For odd m >= 5, the set {{a_i,b_i} : i = 1..m-1} ∪ {{b_{2j-1},b_{2j}} : j = 1..(m+1)/2} is a dominating set of F_2(K_{m,m+1}) with (m-1)/2 + m vertices.

theorem two_token_kmn_witness_odd_succ (m : ℕ) (hm : 5 ≤ m) (ho : ¬ Even m) :
    ∃ S : Finset {s : Finset (Fin m ⊕ Fin (m + 1)) // s.card = 2},
      simple_graph_is_dominating (two_token_kmn m (m + 1)) (S : Set _) ∧
        S.card = (m - 1) / 2 + (m + 1) - 1
two_token_kmn_witness_threeIn LeanGraph Theory & Graph Algorithms

For n >= 3, the set {{a_1,b_i} : i = 1..n-2} ∪ {{a_2,a_3}, {b_{n-1},b_n}} is a dominating set of F_2(K_{3,n}) with n vertices.

theorem two_token_kmn_witness_three (n : ℕ) (hn : 3 ≤ n) :
    ∃ S : Finset {s : Finset (Fin 3 ⊕ Fin n) // s.card = 2},
      simple_graph_is_dominating (two_token_kmn 3 n) (S : Set _) ∧ S.card = n
type_ii_edge_two_neighbourhoods_eqIn LeanGraph Theory & Graph Algorithms

If uv is a type II edge with parameter 2 in a finite simple graph G and both u and v have degree at least 4, then u and v have the same neighbourhood: there is a 3-element set S, disjoint from {u, v}, with N(u) = {v} ∪ S and N(v) = {u} ∪ S.

theorem type_ii_edge_two_neighbourhoods_eq {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (u v : V) (hu : 4 ≤ G.degree u) (hv : 4 ≤ G.degree v) (h : is_type_ii_edge G u v 2) :
    ∃ S : Finset V, S.card = 3 ∧ u ∉ S ∧ v ∉ S ∧
      (∀ w : V, G.Adj u w ↔ w = v ∨ w ∈ S) ∧
      (∀ w : V, G.Adj v w ↔ w = u ∨ w ∈ S)
unimodal_of_step_monotoneIn LeanGraph Theory & Graph Algorithms

If a polynomial with natural coefficients has weakly increasing consecutive coefficients up to index m and weakly decreasing consecutive coefficients for indices at least m, then it is unimodal.

theorem unimodal_of_step_monotone (p : Polynomial ℕ) (m : ℕ)
    (h_inc : ∀ i < m, p.coeff i ≤ p.coeff (i + 1))
    (h_dec : ∀ i ≥ m, p.coeff (i + 1) ≤ p.coeff i) :
    polynomial_is_unimodal p
ve_comp_part_adj_iffIn LeanGraph Theory & Graph Algorithms

If x and y are adjacent in G, neither is v, and x lies in a component part of G - v, then so does y (and conversely).

lemma ve_comp_part_adj_iff {V : Type*} (G : SimpleGraph V) (v : V)
    (C : (G.induce ({v}ᶜ : Set V)).ConnectedComponent) {x y : V}
    (hx : x ≠ v) (hy : y ≠ v) (hxy : G.Adj x y) :
    (x ∈ ve_comp_part G v C ↔ y ∈ ve_comp_part G v C)
ve_comp_part_subset_complIn LeanGraph Theory & Graph Algorithms

Each component part of G - v is contained in the complement of {v}.

lemma ve_comp_part_subset_compl {V : Type*} (G : SimpleGraph V) (v : V)
    (C : (G.induce ({v}ᶜ : Set V)).ConnectedComponent) :
    ve_comp_part G v C ⊆ ({v}ᶜ : Set V)
ve_comp_part_unique_neighbor_of_unreachableIn LeanGraph Theory & Graph Algorithms

If no two distinct neighbours of v are mutually reachable in G - v, then each component of G - v contains at most one neighbour of v, i.e. the unique-neighbour hypothesis huniq of the pendant dichotomy holds with u = w.

lemma ve_comp_part_unique_neighbor_of_unreachable {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (v : V)
    (hunreach : ∀ (u w : V) (hu : G.Adj v u) (hw : G.Adj v w), u ≠ w →
      ¬ (G.induce ({v}ᶜ : Set V)).Reachable ⟨u, (G.ne_of_adj hu).symm⟩ ⟨w, (G.ne_of_adj hw).symm⟩)
    (C : (G.induce ({v}ᶜ : Set V)).ConnectedComponent) {u w : V}
    (hu : G.Adj v u) (hw : G.Adj v w) (huC : u ∈ ve_comp_part G v C) (hwC : w ∈ ve_comp_part G v C) :
    u = w
ve_dominates_inside_induce_iffIn LeanGraph Theory & Graph Algorithms

For S contained in A, S ve-dominates the induced subgraph G[A] if and only if S ve-dominates all edges of G with both endpoints in A.

lemma ve_dominates_inside_induce_iff {V : Type*} (G : SimpleGraph V) (A : Set V) (S : Set V)
    (hSA : S ⊆ A) :
    is_ve_dominating (G.induce A) {x : ↥A | (x : V) ∈ S} ↔ ve_dominates_inside G S A
walk_getVert_dist_eq_indexIn LeanGraph Theory & Graph Algorithms

If p is a walk from x to y whose length equals d(x,y), then every prefix is a geodesic: d(x, p.getVert i) = i for all i ≤ p.length.

theorem walk_getVert_dist_eq_index {V : Type*} (G : SimpleGraph V) {x y : V} (p : G.Walk x y)
    (hplen : p.length = G.dist x y) {i : ℕ} (hi : i ≤ p.length) :
    G.dist x (p.getVert i) = i
walk_getVert_dist_twoIn LeanGraph Theory & Graph Algorithms

Along a walk whose length equals the distance between its endpoints, vertices at indices i and i+2 are at distance exactly 2.

theorem walk_getVert_dist_two {V : Type*} (G : SimpleGraph V) {x y : V} (p : G.Walk x y)
    (hplen : p.length = G.dist x y) {i : ℕ} (hi : i + 2 ≤ p.length) :
    G.dist (p.getVert i) (p.getVert (i + 2)) = 2
wcp_cartesian_product_four_of_boundsIn LeanGraph Theory & Graph Algorithms

For four complete graphs with sizes 2 ≤ a 0 ≤ a 1 ≤ a 2 ≤ a 3 satisfying 1 + (a 0 - 1) + (a 1 - 1) ≤ a 2 and 1 + (a 0 - 1) + (a 1 - 1) + (a 2 - 1) ≤ a 3, their Cartesian product has the well-covered powers property.

theorem wcp_cartesian_product_four_of_bounds
    (a : Fin 4 → ℕ) (h_ge : ∀ i, 2 ≤ a i) (h_mono : Monotone a)
    (h2 : 1 + (a 0 - 1) + (a 1 - 1) ≤ a 2)
    (h3 : 1 + (a 0 - 1) + (a 1 - 1) + (a 2 - 1) ≤ a 3) :
    simple_graph_has_well_covered_powers (cartesian_product_complete_graphs a)
wcp_cycle_fourIn LeanGraph Theory & Graph Algorithms

The 4-cycle C_4 = K_{2,2} has the well-covered powers property: C_4 is well-covered (its maximal independent sets are the two bipartition classes, of size 2) and every power d ≥ 2 is the complete graph K_4.

theorem wcp_cycle_four : simple_graph_has_well_covered_powers (SimpleGraph.cycleGraph 4)
wcp_cycle_threeIn LeanGraph Theory & Graph Algorithms

The 3-cycle C_3 = K_3 has the well-covered powers property: every positive power is the complete graph K_3, whose maximal independent sets are the singletons.

theorem wcp_cycle_three : simple_graph_has_well_covered_powers (SimpleGraph.cycleGraph 3)
wiener_bound_of_completeIn LeanGraph Theory & Graph Algorithms

Every finite complete simple graph satisfies 4 * W(G) ≤ L(G) * n * (n - 1), where W(G) is the Wiener index and L(G) is the maximum order of an induced linear forest.

theorem wiener_bound_of_complete {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (hG : G = ⊤) : 4 * wiener_index G ≤ max_induced_linear_forest G * Fintype.card V * (Fintype.card V - 1)
wiener_bound_of_max_induced_eq_threeIn LeanGraph Theory & Graph Algorithms

Every finite connected simple graph whose maximum order of an induced linear forest equals 3 satisfies 4 * W(G) ≤ 3 * n * (n - 1).

theorem wiener_bound_of_max_induced_eq_three {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (hconn : G.Connected) (hL : max_induced_linear_forest G = 3) : 4 * wiener_index G ≤ 3 * Fintype.card V * (Fintype.card V - 1)
wiener_index_add_edges_twin_independent_set_of_nonemptyIn LeanGraph Theory & Graph Algorithms

Let G and H be simple graphs on a finite vertex type V, where G is connected. Suppose Z and X are subsets of V such that X is nonempty, Z is an independent set in G, every vertex in Z has open neighborhood X in G, G ≤ H, and every edge of H is in G or has both endpoints in Z. Then the Wiener index of G equals the Wiener index of H plus the number of added edges, wiener_index G = wiener_index H + Nat.card ↑(H.edgeSet \ G.edgeSet).

theorem wiener_index_add_edges_twin_independent_set_of_nonempty
    {V : Type*} [Fintype V]
    (G H : SimpleGraph V) (hGconn : G.Connected)
    (Z X : Set V) (hX : X.Nonempty)
    (hZindep : ∀ u ∈ Z, ∀ v ∈ Z, ¬G.Adj u v)
    (hZneigh : ∀ z ∈ Z, G.neighborSet z = X)
    (hGH_le : G ≤ H)
    (hGH_edges : ∀ u v, H.Adj u v → G.Adj u v ∨ (u ∈ Z ∧ v ∈ Z)) :
    wiener_index G = wiener_index H + Nat.card ↑(H.edgeSet \ G.edgeSet)
wiener_index_delete_ge_subIn LeanGraph Theory & Graph Algorithms

For any vertex u in a finite simple graph G with decidable equality on its vertex type, the Wiener index of G.delete u satisfies (wiener_index G : ℤ) - (graph_vertex_dist_sum G u : ℤ) ≤ (wiener_index (G.delete u) : ℤ).

theorem wiener_index_delete_ge_sub {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (u : V) : (wiener_index G : ℤ) - (graph_vertex_dist_sum G u : ℤ) ≤ (wiener_index (G.delete u) : ℤ)
wiener_index_diff_invariance_twin_independent_setIn LeanGraph Theory & Graph Algorithms

Let G and H be simple graphs on a finite vertex type V with decidable equality, where G is connected. Suppose Z and X are subsets of V such that 2 ≤ Nat.card X, Z is an independent set in G (∀ u ∈ Z, ∀ v ∈ Z, ¬G.Adj u v), every vertex in Z has open neighborhood X in G (∀ z ∈ Z, G.neighborSet z = X), G ≤ H, and every edge of H is in G or has both endpoints in Z (∀ u v, H.Adj u v → G.Adj u v ∨ (u ∈ Z ∧ v ∈ Z)). Then for every vertex x ∉ Z such that the induced subgraph G.induce {x}ᶜ is connected, the difference in the Wiener index upon removing x satisfies (wiener_index H : ℤ) - wiener_index (H.induce {x}ᶜ) = (wiener_index G : ℤ) - wiener_index (G.induce {x}ᶜ).

theorem wiener_index_diff_invariance_twin_independent_set
    {V : Type*} [Fintype V] [DecidableEq V]
    (G H : SimpleGraph V) (hGconn : G.Connected)
    (Z X : Set V) (hXcard : 2 ≤ Nat.card X)
    (hZindep : ∀ u ∈ Z, ∀ v ∈ Z, ¬G.Adj u v)
    (hZneigh : ∀ z ∈ Z, G.neighborSet z = X)
    (hGH_le : G ≤ H)
    (hGH_edges : ∀ u v, H.Adj u v → G.Adj u v ∨ (u ∈ Z ∧ v ∈ Z))
    (x : V) (hxZ : x ∉ Z) (hGxconn : (G.induce {x}ᶜ).Connected) :
    (wiener_index H : ℤ) - wiener_index (H.induce {x}ᶜ) =
      (wiener_index G : ℤ) - wiener_index (G.induce {x}ᶜ)
wiener_index_dist_diff_twin_independent_set_of_nonemptyIn LeanGraph Theory & Graph Algorithms

Let G and H be simple graphs on a finite vertex type V, where G is connected. Suppose Z and X are subsets of V such that X is nonempty, Z is an independent set in G, every vertex in Z has open neighborhood X in G, G ≤ H, and every edge of H is in G or has both endpoints in Z. Then for any two vertices u and v, G.dist u v = H.dist u v + 1 if uv is an added edge in H \ G, and G.dist u v = H.dist u v otherwise.

theorem wiener_index_dist_diff_twin_independent_set_of_nonempty
    {V : Type*} [Fintype V]
    (G H : SimpleGraph V) (hGconn : G.Connected)
    (Z X : Set V) (hX : X.Nonempty)
    (hZindep : ∀ u ∈ Z, ∀ v ∈ Z, ¬G.Adj u v)
    (hZneigh : ∀ z ∈ Z, G.neighborSet z = X)
    (hGH_le : G ≤ H)
    (hGH_edges : ∀ u v, H.Adj u v → G.Adj u v ∨ (u ∈ Z ∧ v ∈ Z))
    (u v : V) :
    (H.Adj u v ∧ ¬G.Adj u v → G.dist u v = H.dist u v + 1) ∧
    (¬(H.Adj u v ∧ ¬G.Adj u v) → G.dist u v = H.dist u v)
wild_color_connecting_no_cut_edges_le_twoIn LeanGraph Theory & Graph Algorithms

In any edge-colored graph with a color-connecting edge set W, if u and v are adjacent and no edge of W crosses between {u, v} and its complement, then the entire vertex set has size at most 2.

theorem wild_color_connecting_no_cut_edges_le_two {V α : Type*} [DecidableEq V]
    (G : SimpleGraph V) (c : G.lineGraph.Coloring α)
    (W : Set (Sym2 V)) (hW : simple_graph_is_color_connecting G c W)
    (u v : V) (huv : G.Adj u v)
    (hWcross : ∀ w ∈ W, ∀ x ∈ ({u, v} : Set V), ∀ y ∉ ({u, v} : Set V), w ≠ s(x, y)) :
    ∀ z : V, z = u ∨ z = v
wild_disjoint_support_pair_sum_identityIn LeanGraph Theory & Graph Algorithms

If W = sum mu(T), Q = sum mu(T)^2, R = sum mu(T)^3, and for each T the sum of mu(U) over disjoint U is K - mu(T), then the double sum sum_T sum_{U disjoint T} mu(T)(mu(T)-1)mu(U) equals (K+1)*Q - K*W - R.

theorem wild_disjoint_support_pair_sum_identity {V : Type*} [DecidableEq V]
    (S : Finset (Finset V)) (μ : Finset V → ℝ) (W Q R K : ℝ)
    (hW : ∑ T ∈ S, μ T = W)
    (hQ : ∑ T ∈ S, (μ T)^2 = Q)
    (hR : ∑ T ∈ S, (μ T)^3 = R)
    (hdisj : ∀ T ∈ S, (∑ U ∈ S.filter (fun U => Disjoint T U), μ U) = K - μ T) :
    (∑ T ∈ S, ∑ U ∈ S.filter (fun U => Disjoint T U), (μ T * (μ T - 1)) * μ U) =
      (K + 1) * Q - K * W - R
wild_extensions_eq_card_pairsIn LeanGraph Theory & Graph Algorithms

The number of (k+2)-subsets extending a closed subset C of size k equals the number of closed 2-subsets in the complement V \ C.

theorem wild_extensions_eq_card_pairs {α : Type*} [DecidableEq α]
    (V C : Finset α) (f : α → α) (hf : Function.Involutive f)
    (hC : C ⊆ V) (hC_closed : ∀ x ∈ C, f x ∈ C)
    (k : ℕ) (hC_card : C.card = k) :
    (((Finset.powersetCard (k + 2) V)).filter fun S => C ⊆ S ∧ ∀ x ∈ S, f x ∈ S).card =
    (((Finset.powersetCard 2 (V \ C))).filter fun P => ∀ x ∈ P, f x ∈ P).card
wild_extensions_eq_oneIn LeanGraph Theory & Graph Algorithms

If C is a closed subset of V of size 6, there is a unique 6-element subset containing C and closed under f, namely C itself.

theorem wild_extensions_eq_one {α : Type*} [DecidableEq α]
    (V C : Finset α) (f : α → α)
    (hC : C ⊆ V) (hC_closed : ∀ x ∈ C, f x ∈ C) (hC_card : C.card = 6) :
    (((Finset.powersetCard 6 V)).filter fun S => C ⊆ S ∧ ∀ x ∈ S, f x ∈ S).card = 1
wild_involution_closed_six_cardIn LeanGraph Theory & Graph Algorithms

For an involution g of a finite linearly ordered set that maps a finite set W into itself with no fixed point in W, the number of g-closed 6-element subsets of W equals choose(number of orbit representatives, 3).

theorem wild_involution_closed_six_card {α : Type*} [DecidableEq α] [LinearOrder α]
    (W : Finset α) (g : α → α) (hg : Function.Involutive g)
    (hW : ∀ x ∈ W, g x ∈ W) (hfree : ∀ x ∈ W, g x ≠ x) :
    ((W.powersetCard 6).filter (fun T => ∀ x ∈ T, g x ∈ T)).card
      = (W.filter (fun x => x < g x)).card.choose 3
wild_involution_pairs_and_evenIn LeanGraph Theory & Graph Algorithms

For any finite set U and fixed-point-free involution f preserving U, the number of f-closed pairs in U is |U|/2, and |U| is even.

theorem wild_involution_pairs_and_even {α : Type*} [DecidableEq α]
    (U : Finset α) (f : α → α) (hf : Function.Involutive f)
    (hU : ∀ x ∈ U, f x ∈ U) (hne : ∀ x ∈ U, f x ≠ x) :
    (((Finset.powersetCard 2 U)).filter fun P => ∀ x ∈ P, f x ∈ P).card = U.card / 2 ∧ U.card % 2 = 0
wild_involution_rep_half_cardIn LeanGraph Theory & Graph Algorithms

For an involution g of a finite linearly ordered set that maps a finite set W into itself with no fixed point in W, twice the number of representatives {x ∈ W : x < g x} equals |W|.

theorem wild_involution_rep_half_card {α : Type*} [DecidableEq α] [LinearOrder α]
    (W : Finset α) (g : α → α) (hg : Function.Involutive g)
    (hW : ∀ x ∈ W, g x ∈ W) (hfree : ∀ x ∈ W, g x ≠ x) :
    2 * (W.filter (fun x => x < g x)).card = W.card
wild_joint_alpha_type_A_eq_oneIn LeanGraph Theory & Graph Algorithms

If the first block is the type-A triple {0,1,2} (contains the isolated vertex 0 and the canonical edge {1,2}), the canonical matching is automatically whole-bad because that block is already a proper closed union of blocks, so the conditional probability is 1.

theorem wild_joint_alpha_type_A_eq_one (q : ℕ) (hq : 3 ≤ q) : wild_joint_alpha q (wild_joint_type_A q hq) = 1
wild_joint_type_weight_one_twoIn LeanGraph Theory & Graph Algorithms

The type-B and type-C weights both equal 3W - Q.

theorem wild_joint_type_weight_one_two (q : ℕ) (A : Fin (3*q) → Fin (3*q) → Fin (3*q)) (hid : ∀ a, A a a = a) (hsym : ∀ a b, A a b = A b a) (hinj : ∀ a, Function.Injective (A a)) : wild_joint_type_weight q A 1 = 3 * wild_joint_witness_mass q - wild_joint_squared_multiplicity q A ∧ wild_joint_type_weight q A 2 = 3 * wild_joint_witness_mass q - wild_joint_squared_multiplicity q A
wild_joint_type_weight_threeIn LeanGraph Theory & Graph Algorithms

The type-D weight equals (n-6)W + Q with n = 3q.

theorem wild_joint_type_weight_three (q : ℕ) (A : Fin (3*q) → Fin (3*q) → Fin (3*q)) (hid : ∀ a, A a a = a) (hsym : ∀ a b, A a b = A b a) (hinj : ∀ a, Function.Injective (A a)) : wild_joint_type_weight q A 3 = ((3*q : ℝ) - 6) * wild_joint_witness_mass q + wild_joint_squared_multiplicity q A
wild_joint_type_weight_zeroIn LeanGraph Theory & Graph Algorithms

The type-A weight equals Q.

theorem wild_joint_type_weight_zero (q : ℕ) (A : Fin (3*q) → Fin (3*q) → Fin (3*q)) (hid : ∀ a, A a a = a) (hsym : ∀ a b, A a b = A b a) (hinj : ∀ a, Function.Injective (A a)) : wild_joint_type_weight q A 0 = wild_joint_squared_multiplicity q A
wild_normalized_array_disjoint_six_seal_mass_boundIn LeanGraph Theory & Graph Algorithms

For a symmetric idempotent row-injective array on n=2m+1 vertices with m>=6 and any fixed six-set S, the total number of pairs (color i, closed six-set T) with T disjoint from S and excluding i is at most n*choose(m-6,3)+21*choose(m-6,2)+21*(m-6)+7. Repeated supports for different colors are counted separately. This is a support incidence bound, not a count of distinct bad colors or a wild-number theorem.

theorem wild_normalized_array_disjoint_six_seal_mass_bound
    (m : ℕ) (hm : 6 ≤ m) (A : Fin (2*m+1) → Fin (2*m+1) → Fin (2*m+1))
    (hdiag : ∀ x, A x x = x) (hsymm : ∀ x y, A x y = A y x)
    (hinj : ∀ x, Function.Injective (A x))
    (S : Finset (Fin (2*m+1))) (hS : S.card = 6) :
    (∑ i : Fin (2*m+1),
      (((univ : Finset (Fin (2*m+1))).powersetCard 6).filter fun T =>
        Disjoint S T ∧ i ∉ T ∧
        ∀ x ∈ T, ∀ y, A x y = i → y ∈ T).card) ≤
      (2*m+1) * (m-6).choose 3 + 21 * (m-6).choose 2 + 21 * (m-6) + 7
wild_normalized_array_six_seal_triple_completion_countIn LeanGraph Theory & Graph Algorithms

For a normalized symmetric idempotent row-injective array on n>=7 vertices, a triple T and a color i outside T, the number of closed six-sets containing T and excluding i is (n-5)/2 when T contains an i-edge, and1 otherwise. This is an exact support-completion count; it says nothing yet about whole partition probabilities.

theorem wild_normalized_array_six_seal_triple_completion_count
    (n : ℕ) (hn : 7 ≤ n) (A : Fin n → Fin n → Fin n)
    (hdiag : ∀ x, A x x = x) (hsymm : ∀ x y, A x y = A y x)
    (hinj : ∀ x, Function.Injective (A x))
    (T : Finset (Fin n)) (hT : T.card = 3) (i : Fin n) (hi : i ∉ T) :
    (((univ : Finset (Fin n)).powersetCard 6).filter fun S =>
      T ⊆ S ∧ i ∉ S ∧ ∀ x ∈ S, ∀ y, A x y = i → y ∈ S).card =
      if ∃ x ∈ T, ∃ y ∈ T, x ≠ y ∧ A x y = i then (n-5)/2 else 1
wild_normalized_array_total_multiplicity_sumIn LeanGraph Theory & Graph Algorithms

For any normalized symmetric idempotent row-injective array A on Fin n, the sum over all 3-element subsets T of the number of pairs z.1 < z.2 with support {z.1, z.2, A z.1 z.2} = T equals choose(n, 2).

theorem wild_normalized_array_total_multiplicity_sum
    (n : ℕ) (hn : 3 ≤ n) (hodd : n % 2 = 1)
    (A : Fin n → Fin n → Fin n)
    (hid : ∀ a, A a a = a) (hsym : ∀ a b, A a b = A b a)
    (hinj : ∀ a, Function.Injective (A a)) :
    (∑ T ∈ (Finset.univ : Finset (Finset (Fin n))).filter (fun T => T.card = 3),
      ((Finset.univ.filter fun z : Fin n × Fin n =>
        z.1 < z.2 ∧ ({z.1, z.2, A z.1 z.2} : Finset (Fin n)) = T).card : ℝ)) =
      (n.choose 2 : ℝ)
wild_number_color_connecting_quadripartite_ge_two_nIn LeanGraph Theory & Graph Algorithms

Every color-connecting set of edges in K_{n,n,n,n} under a proper (3n)-edge coloring has cardinality at least 2n.

theorem wild_number_color_connecting_quadripartite_ge_two_n (n : ℕ) (hn : 1 ≤ n)
    (c : (SimpleGraph.completeEquipartiteGraph 4 n).lineGraph.Coloring (Fin (3 * n)))
    (W : Finset (Sym2 (Fin 4 × Fin n)))
    (hW : simple_graph_is_color_connecting (SimpleGraph.completeEquipartiteGraph 4 n) c ↑W) :
    2 * n ≤ W.card
wild_number_complete_graph_odd_bounded_eqIn LeanGraph Theory & Graph Algorithms

For every odd order 3 ≤ n < 30000001, every minimum proper edge coloring of K_n has wild number floor(4*ceil(n/2)/3).

theorem wild_number_complete_graph_odd_bounded_eq (n k : ℕ) (hn : 3 ≤ n) (hodd : n % 2 = 1) (hlt : n < 30000001)
    (hk : (⊤ : SimpleGraph (Fin n)).lineGraph.chromaticNumber = k)
    (c : (⊤ : SimpleGraph (Fin n)).lineGraph.Coloring (Fin k)) :
    simple_graph_wild_number (⊤ : SimpleGraph (Fin n)) c = 4 * ((n + 1) / 2) / 3
wild_odd_complete_normalized_arrayIn LeanGraph Theory & Graph Algorithms

In every minimum proper edge coloring c of an odd complete graph on n >= 3 vertices, taking the missing-vertex equivalence m : Fin k ≃ Fin n and setting A u u = u and A u w = m(c(uw)) for u ≠ w yields a normalized, symmetric, row-injective array.

theorem wild_odd_complete_normalized_array {n k : ℕ} (hn : 3 ≤ n) (hodd : n % 2 = 1)
    (hk : (⊤ : SimpleGraph (Fin n)).lineGraph.chromaticNumber = k)
    (c : (⊤ : SimpleGraph (Fin n)).lineGraph.Coloring (Fin k)) :
    ∃ (m : Fin k ≃ Fin n) (A : Fin n → Fin n → Fin n),
      (∀ u, A u u = u) ∧
      (∀ u w, A u w = A w u) ∧
      (∀ u, Function.Injective (A u)) ∧
      (∀ u w (h : u ≠ w), A u w = m (c ⟨s(u, w), wild_kn_mem h⟩)) ∧
      (∀ (i : Fin k) (v : Fin n), (∀ w (hvw : v ≠ w), c ⟨s(v, w), wild_kn_mem hvw⟩ ≠ i) ↔ v = m i)
wild_odd_optimal_partition_exists_boundedIn LeanGraph Theory & Graph Algorithms

Conjecture (optimal partition existence on bounded odd orders): for every odd order 3 ≤ n < 30000001 and every minimum proper edge coloring c of K_n, there exists a rooted partition of Fin n into floor(n/3) blocks of size at least 3 such that every color in c crosses every nontrivial block cut.

theorem wild_odd_optimal_partition_exists_bounded (n k : ℕ) (hn : 3 ≤ n) (hodd : n % 2 = 1) (hlt : n < 30000001)
    (hk : (⊤ : SimpleGraph (Fin n)).lineGraph.chromaticNumber = k)
    (c : (⊤ : SimpleGraph (Fin n)).lineGraph.Coloring (Fin k)) :
    ∃ (p : Fin n → Fin (n / 3)) (r : Fin (n / 3) → Fin n),
      (∀ t, p (r t) = t) ∧
      (∀ t, 3 ≤ ((Finset.univ : Finset (Fin n)).filter fun v => p v = t).card) ∧
      (∀ (e : (⊤ : SimpleGraph (Fin n)).edgeSet) (S : Finset (Fin (n / 3))),
        S.Nonempty → S ≠ Finset.univ →
        ∃ (u v : Fin n) (huv : u ≠ v), p u ∈ S ∧ p v ∉ S ∧ c ⟨s(u,v), wild_kn_mem huv⟩ = c e)
wild_odd_optimal_partition_exists_ge_sixIn LeanGraph Theory & Graph Algorithms

Conjecture: for odd orders 6 ≤ n < 30000001, every minimum proper edge coloring of K_n admits a rooted seal-free floor(n/3)-block partition with block sizes at least 3.

theorem wild_odd_optimal_partition_exists_ge_six (n k : ℕ) (hn : 6 ≤ n) (hodd : n % 2 = 1) (hlt : n < 30000001)
    (hk : (⊤ : SimpleGraph (Fin n)).lineGraph.chromaticNumber = k)
    (c : (⊤ : SimpleGraph (Fin n)).lineGraph.Coloring (Fin k)) :
    ∃ (p : Fin n → Fin (n / 3)) (r : Fin (n / 3) → Fin n),
      (∀ t, p (r t) = t) ∧
      (∀ t, 3 ≤ ((Finset.univ : Finset (Fin n)).filter fun v => p v = t).card) ∧
      (∀ (e : (⊤ : SimpleGraph (Fin n)).edgeSet) (S : Finset (Fin (n / 3))),
        S.Nonempty → S ≠ Finset.univ →
        ∃ (u v : Fin n) (huv : u ≠ v), p u ∈ S ∧ p v ∉ S ∧ c ⟨s(u,v), wild_kn_mem huv⟩ = c e)
wild_odd_optimal_partition_exists_n_lt_sixIn LeanGraph Theory & Graph Algorithms

For odd orders n < 6 (n = 3, 5), floor(n/3) = 1, so there are no nontrivial block cuts; any single-block partition into Fin 1 is vacuously seal-free.

theorem wild_odd_optimal_partition_exists_n_lt_six (n k : ℕ) (hn : 3 ≤ n) (hn6 : n < 6)
    (hk : (⊤ : SimpleGraph (Fin n)).lineGraph.chromaticNumber = k)
    (c : (⊤ : SimpleGraph (Fin n)).lineGraph.Coloring (Fin k)) :
    ∃ (p : Fin n → Fin (n / 3)) (r : Fin (n / 3) → Fin n),
      (∀ t, p (r t) = t) ∧
      (∀ t, 3 ≤ ((Finset.univ : Finset (Fin n)).filter fun v => p v = t).card) ∧
      (∀ (e : (⊤ : SimpleGraph (Fin n)).edgeSet) (S : Finset (Fin (n / 3))),
        S.Nonempty → S ≠ Finset.univ →
        ∃ (u v : Fin n) (huv : u ≠ v), p u ∈ S ∧ p v ∉ S ∧ c ⟨s(u,v), wild_kn_mem huv⟩ = c e)
wild_odd_valid_optimal_partition_existsIn LeanGraph Theory & Graph Algorithms

At every odd order n>=9, any minimum proper complete-graph coloring has a rooted floor(n/3)-block partition with each block of size at least three and every proper three-vertex block valid for every color. This proves only nonemptiness of the triple-valid conditioning family, not seal avoidance or a wild-number bound.

theorem wild_odd_valid_optimal_partition_exists {n k : ℕ} (hn : 9≤n)
    (hodd : n%2=1)
    (hk : (⊤ : SimpleGraph (Fin n)).lineGraph.chromaticNumber=k)
    (c : (⊤ : SimpleGraph (Fin n)).lineGraph.Coloring (Fin k)) :
    ∃ (p : Fin n → Fin (n/3)) (root : Fin (n/3) → Fin n),
      (∀ t,p (root t)=t) ∧
      (∀ t,3≤(univ.filter fun v => p v=t).card) ∧
      (∀ t,(univ.filter fun v => p v=t).card=3 →
        (univ.filter fun v => p v=t)≠univ →
        ∀ i,¬w279_closed c i (univ.filter fun v => p v=t))
wild_odd_valid_reservoir_permutation_existsIn LeanGraph Theory & Graph Algorithms

For any normalized symmetric row-injective array on Fin n with n >= 9 odd, there is a permutation sigma whose first m triples are A-valid, where m = n/3 if 3 | n else n/3 - 1.

theorem wild_odd_valid_reservoir_permutation_exists {n : ℕ} (hn : 9 ≤ n) (hodd : n % 2 = 1)
    (A : Fin n → Fin n → Fin n)
    (hdiag : ∀ u, A u u = u) (hsym : ∀ u w, A u w = A w u)
    (hinj : ∀ u, Function.Injective (A u)) :
    let q := n / 3
    let m := if n % 3 = 0 then q else q - 1
    ∃ σ : Equiv.Perm (Fin n), ∀ t : Fin m,
      have h0 : 3 * t.val + 0 < n := by
        have ht := t.isLt
        dsimp [m] at ht
        split_ifs at ht with h <;> omega
      have h1 : 3 * t.val + 1 < n := by
        have ht := t.isLt
        dsimp [m] at ht
        split_ifs at ht with h <;> omega
      have h2 : 3 * t.val + 2 < n := by
        have ht := t.isLt
        dsimp [m] at ht
        split_ifs at ht with h <;> omega
      A (σ ⟨3 * t.val + 0, h0⟩) (σ ⟨3 * t.val + 1, h1⟩) ≠ σ ⟨3 * t.val + 2, h2⟩ ∧
      A (σ ⟨3 * t.val + 0, h0⟩) (σ ⟨3 * t.val + 2, h2⟩) ≠ σ ⟨3 * t.val + 1, h1⟩ ∧
      A (σ ⟨3 * t.val + 1, h1⟩) (σ ⟨3 * t.val + 2, h2⟩) ≠ σ ⟨3 * t.val + 0, h0⟩
wild_odd_valid_triple_not_closedIn LeanGraph Theory & Graph Algorithms

If {x, y, z} is a triple with A x y ≠ z, A x z ≠ y, A y z ≠ x where off-diagonal entries of A record the missing vertex of the edge color, then {x, y, z} is not closed under any color i.

theorem wild_odd_valid_triple_not_closed {n k : ℕ} (hn : 3 ≤ n)
    (c : (⊤ : SimpleGraph (Fin n)).lineGraph.Coloring (Fin k))
    (m : Fin k ≃ Fin n)
    (hm : ∀ (i : Fin k) (v : Fin n), (∀ w (hvw : v ≠ w), c ⟨s(v, w), wild_kn_mem hvw⟩ ≠ i) ↔ v = m i)
    (A : Fin n → Fin n → Fin n)
    (hA : ∀ u w (huw : u ≠ w), A u w = m (c ⟨s(u, w), wild_kn_mem huw⟩))
    (x y z : Fin n) (hxy : x ≠ y) (hxz : x ≠ z) (hyz : y ≠ z)
    (hval : A x y ≠ z ∧ A x z ≠ y ∧ A y z ≠ x)
    (i : Fin k) :
    ¬ w279_closed c i {x, y, z}
wild_one_bad_color_mixed_moment_formula_with_contextIn LeanGraph Theory & Graph Algorithms

For an odd q>=3 and a symmetric idempotent row-injective full array A on n=3q vertices, take the uniform distribution on all vertex permutations and partition consecutive positions into q triples. Let I count colors invalidating a triple block, and D count WHOLE bad colors over all proper block cuts. Put W=n(n-1)/2 and Q=sum of squared unordered witness-support multiplicities (defined as one quarter of the ordered equal-support count). For the fixed matching with isolated vertex0 and pairs(1,2), (3,4),..., let alphaB,alphaC,alphaD be the conditional probabilities of being bad given that the first block is respectively {0,1,3},{1,2,3},{1,3,5}. The proposed exact identity is E[I*D]=q/choose(n,3)*(Q+(3W-Q)*(alphaB+alphaC)+((n-6)*W+Q)*alphaD). The alphas include all bad-color cuts, not just small seals. Their conditioning denominators are explicitly finite cardinalities. This is a statement for agents to prove, not an accepted result.

theorem wild_one_bad_color_mixed_moment_formula_with_context :
  ∀ (q : ℕ) (hq : 3 ≤ q), q%2 = 1 →
    ∀ A : Fin (3*q) → Fin (3*q) → Fin (3*q),
      (∀ a, A a a = a) → (∀ a b, A a b = A b a) →
      (∀ a, Function.Injective (A a)) →
      wild_joint_expected_ID q A =
        ((q : ℝ) / ((3*q).choose 3 : ℝ)) *
          (wild_joint_squared_multiplicity q A +
            (3*wild_joint_witness_mass q-wild_joint_squared_multiplicity q A) *
              (wild_joint_alpha q (wild_joint_type_B q hq) +
                wild_joint_alpha q (wild_joint_type_C q hq)) +
            (((3*q : ℝ)-6)*wild_joint_witness_mass q+
              wild_joint_squared_multiplicity q A) *
              wild_joint_alpha q (wild_joint_type_D q hq))
wild_profile_third_invalid_moment_formula_with_contextIn LeanGraph Theory & Graph Algorithms

For every odd n>=9, normalized symmetric idempotent row-injective array A on Fin n and profile p with every block size at least3, the exact uniform-permutation third falling-factorial moment of the number I of distinct colors invalidating triple blocks equals p1*(R-3Q+2W)+3*p2*((K+1)*Q-K*W-R)+p3*C. Here W=choose(n,2), K=(n^2-10n+27)/2, Q=sum mu(T)^2, R=sum mu(T)^3, C is the weighted ordered sum over three pairwise disjoint triple supports, h counts triple blocks, and pr=(h falling r)/product_{j=0}^{r-1} choose(n-3j,3). The definitions spell out all finite sums and divisions. This counts invalid-triple colors I, not whole bad colors D.

theorem wild_profile_third_invalid_moment_formula_with_context :

  ∀ (n q : ℕ), 9 ≤ n → n%2 = 1 →
    ∀ (A : Fin n → Fin n → Fin n) (p : Fin n → Fin q),
      (∀ a, A a a = a) → (∀ a b, A a b = A b a) →
      (∀ a, Function.Injective (A a)) →
      (∀ b, 3 ≤ (univ.filter fun v => p v = b).card) →
      wild_third_expectation A p = wild_third_prediction A p
wild_seal_choose3_convolution_boundIn LeanGraph Theory & Graph Algorithms

Binomial convolution bound: for natural numbers u_i ≤ 3 with total 21 over 2m+1 indices, ∑ choose(m−6+u_i, 3) is at most (2m+1)·choose(m−6,3) + 21·choose(m−6,2) + 21·(m−6) + 7.

theorem wild_seal_choose3_convolution_bound (m : ℕ) (hm : 6 ≤ m) (u : Fin (2*m+1) → ℕ)
    (hu : ∀ i, u i ≤ 3) (hsum : (∑ i, u i) = 21) :
    (∑ i : Fin (2*m+1), (m-6 + u i).choose 3) ≤
      (2*m+1) * (m-6).choose 3 + 21 * (m-6).choose 2 + 21 * (m-6) + 7
wild_seal_six_orbit_half_cardIn LeanGraph Theory & Graph Algorithms

For an involution g of a finite linearly ordered set with unique fixed point i and a six-set S (with 13 ≤ |α|), twice the number of orbit representatives in univ \ (S ∪ {i} ∪ S.image g) equals |α| − 13 + [i ∈ S] + #{y ∈ S : g y ∈ S}.

theorem wild_seal_six_orbit_half_card {α : Type*} [DecidableEq α] [Fintype α] [LinearOrder α]
    (g : α → α) (hg : Function.Involutive g) (S : Finset α) (hS : S.card = 6) (i : α)
    (hfix : g i = i) (huniq : ∀ x, g x = x → x = i) (hcard : 13 ≤ Fintype.card α) :
    2 * ((Finset.univ \ (S ∪ {i} ∪ S.image g)).filter (fun x => x < g x)).card
      = Fintype.card α - 13 + (if i ∈ S then 1 else 0) + (S.filter (fun y => g y ∈ S)).card
wild_seal_six_orbit_smallIn LeanGraph Theory & Graph Algorithms

For an involution with unique fixed point i and a six-set S, the indicator [i ∈ S] plus the number of y ∈ S with g y ∈ S is at most 6.

theorem wild_seal_six_orbit_small {α : Type*} [DecidableEq α]
    (g : α → α) (hg : Function.Involutive g) (S : Finset α) (hS : S.card = 6) (i : α)
    (hfix : g i = i) (huniq : ∀ x, g x = x → x = i) :
    (if i ∈ S then 1 else 0) + (S.filter (fun y => g y ∈ S)).card ≤ 6
wild_seal_six_partner_row_sumIn LeanGraph Theory & Graph Algorithms

For a row-injective array and a six-set S, summing over colours i the number of y ∈ S whose i-partner lies in S gives 36 (=6·6).

theorem wild_seal_six_partner_row_sum {N : ℕ} (A : Fin N → Fin N → Fin N)
    (hinj : ∀ x, Function.Injective (A x)) (S : Finset (Fin N)) (hS : S.card = 6) :
    (∑ i : Fin N, (S.filter (fun y => wild_six_seal_partner A hinj i y ∈ S)).card) = 36
wild_seal_six_union_cardIn LeanGraph Theory & Graph Algorithms

For an involution g fixing i and a six-set S, the cardinality of S ∪ {i} ∪ S.image g equals 13 − [i ∈ S] − #{y ∈ S : g y ∈ S}.

theorem wild_seal_six_union_card {α : Type*} [DecidableEq α]
    (g : α → α) (hg : Function.Involutive g) (S : Finset α) (hS : S.card = 6) (i : α)
    (hfix : g i = i) :
    (S ∪ {i} ∪ S.image g).card = 13 - (if i ∈ S then 1 else 0) - (S.filter (fun y => g y ∈ S)).card
wild_single_support_desc_three_sum_identityIn LeanGraph Theory & Graph Algorithms

If W = sum mu(T), Q = sum mu(T)^2, and R = sum mu(T)^3 over a finite set S, then sum mu(T)(mu(T)-1)(mu(T)-2) = R - 3Q + 2W.

theorem wild_single_support_desc_three_sum_identity {α : Type*}
    (S : Finset α) (μ : α → ℝ) (W Q R : ℝ)
    (hW : ∑ T ∈ S, μ T = W)
    (hQ : ∑ T ∈ S, (μ T)^2 = Q)
    (hR : ∑ T ∈ S, (μ T)^3 = R) :
    (∑ T ∈ S, μ T * (μ T - 1) * (μ T - 2)) = R - 3 * Q + 2 * W
wild_six_seal_partner_propsIn LeanGraph Theory & Graph Algorithms

For a symmetric idempotent row-injective array, the i-partner map x ↦ partner i x satisfies A x (partner i x) = i, is an involution, and has the unique fixed point i (partner i x = x iff x = i).

theorem wild_six_seal_partner_props {N : ℕ} (A : Fin N → Fin N → Fin N)
    (hdiag : ∀ x, A x x = x) (hsymm : ∀ x y, A x y = A y x)
    (hinj : ∀ x, Function.Injective (A x)) (i : Fin N) :
    (∀ x, A x (wild_six_seal_partner A hinj i x) = i) ∧
    Function.Involutive (wild_six_seal_partner A hinj i) ∧
    (∀ x, wild_six_seal_partner A hinj i x = x ↔ x = i)
wild_six_seal_rep_cardIn LeanGraph Theory & Graph Algorithms

For a symmetric idempotent row-injective array on Fin (2m+1), a six-set S and a colour i, twice the number of orbit representatives equals 2m+1 − 13 + [i ∈ S] + #{y ∈ S : the i-partner of y lies in S}.

theorem wild_six_seal_rep_card (m : ℕ) (hm : 6 ≤ m)
    (A : Fin (2*m+1) → Fin (2*m+1) → Fin (2*m+1))
    (hdiag : ∀ x, A x x = x) (hsymm : ∀ x y, A x y = A y x)
    (hinj : ∀ x, Function.Injective (A x))
    (S : Finset (Fin (2*m+1))) (hS : S.card = 6) (i : Fin (2*m+1)) :
    2 * (wild_six_seal_rep_set A hinj S i).card =
      2*m+1 - 13 + (if i ∈ S then 1 else 0)
        + (S.filter (fun y => wild_six_seal_partner A hinj i y ∈ S)).card
wild_six_seal_rep_leIn LeanGraph Theory & Graph Algorithms

For a symmetric idempotent row-injective array on Fin (2m+1) with m≥6, a six-set S and a colour i, the number of orbit representatives is at most m−3.

theorem wild_six_seal_rep_le (m : ℕ) (hm : 6 ≤ m)
    (A : Fin (2*m+1) → Fin (2*m+1) → Fin (2*m+1))
    (hdiag : ∀ x, A x x = x) (hsymm : ∀ x y, A x y = A y x)
    (hinj : ∀ x, Function.Injective (A x))
    (S : Finset (Fin (2*m+1))) (hS : S.card = 6) (i : Fin (2*m+1)) :
    (wild_six_seal_rep_set A hinj S i).card ≤ m - 3
wild_six_seal_summand_eq_chooseIn LeanGraph Theory & Graph Algorithms

For a symmetric idempotent row-injective array, a six-set S and a colour i, the number of 6-sets disjoint from S, excluding i and closed under all i-edges equals choose(|rep_set i|, 3).

theorem wild_six_seal_summand_eq_choose (m : ℕ)
    (A : Fin (2*m+1) → Fin (2*m+1) → Fin (2*m+1))
    (hdiag : ∀ x, A x x = x) (hsymm : ∀ x y, A x y = A y x)
    (hinj : ∀ x, Function.Injective (A x))
    (S : Finset (Fin (2*m+1))) (hS : S.card = 6) (i : Fin (2*m+1)) :
    (((Finset.univ : Finset (Fin (2*m+1))).powersetCard 6).filter fun T =>
        Disjoint S T ∧ i ∉ T ∧ ∀ x ∈ T, ∀ y, A x y = i → y ∈ T).card
      = (wild_six_seal_rep_set A hinj S i).card.choose 3
wilf_chromatic_le_one_add_induced_avg_degreeIn LeanGraph Theory & Graph Algorithms

If s is a vertex set such that G[s] has the same chromatic number as G and every vertex of G[s] has degree at least χ(G)-1, then χ(G) ≤ 1 + (average degree of G[s]).

attribute [local instance] Classical.propDecidable in
theorem wilf_chromatic_le_one_add_induced_avg_degree {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (s : Set V)
    (h : (G.induce s).chromaticNumber = G.chromaticNumber)
    (hdeg : ∀ v : s, G.chromaticNumber.toNat ≤ (G.induce s).degree v + 1) :
    (G.chromaticNumber : ENNReal) ≤
      1 + ENNReal.ofReal ((∑ v : s, ((G.induce s).degree v : ℝ)) / (Fintype.card s : ℝ))
wilf_chromatic_number_le_one_add_spectral_radiusIn LeanGraph Theory & Graph Algorithms

Wilf's inequality: for any finite simple graph G, the chromatic number of G is at most 1 plus the adjacency spectral radius of G.

theorem wilf_chromatic_number_le_one_add_spectral_radius {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) :
    (G.chromaticNumber : ENNReal) ≤ 1 + adjacency_spectral_radius G
wilf_critical_induced_subgraph_existsIn LeanGraph Theory & Graph Algorithms

Every finite simple graph G has an induced subgraph G[s] with the same chromatic number as G, all of whose vertices have degree at least χ(G) - 1.

attribute [local instance] Classical.propDecidable in
theorem wilf_critical_induced_subgraph_exists {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) :
    ∃ s : Set V, (G.induce s).chromaticNumber = G.chromaticNumber ∧
      ∀ v : s, G.chromaticNumber.toNat ≤ (G.induce s).degree v + 1
zero_demand_has_integral_multiflowIn LeanGraph Theory & Graph Algorithms

For any directed multigraphs G and H and non-negative capacities u, if all demands are zero then there exists an integral multiflow.

theorem zero_demand_has_integral_multiflow
    {V E K : Type*} [Fintype E] [Fintype K] [DecidableEq V]
    (G : DirectedMultigraph V E) (H : DirectedMultigraph V K)
    (u : E → ℝ) (hu_nonneg : ∀ e, 0 ≤ u e) :
    HasIntegralMultiflow G H u (fun _ => 0)
zero_forced_isoIn LeanGraph Theory & Graph Algorithms

Under a graph isomorphism e : G ≃g H, a vertex v is in the zero forcing closure of S in G if and only if e(v) is in the zero forcing closure of e '' S in H.

theorem zero_forced_iso {V : Type*} {W : Type*} (G : SimpleGraph V) (H : SimpleGraph W)
    (e : G ≃g H) (S : Set V) (v : V) :
    ZeroForced G S v ↔ ZeroForced H (e '' S) (e v)
zero_forcing_poly_coeff_card_sub_one_eq_cardIn LeanGraph Theory & Graph Algorithms

Let G be a finite graph on n ≥ 2 vertices with no isolated vertex. Then a set of n-1 vertices is a zero forcing set if and only if it is the complement of a single vertex, so there are exactly n zero forcing sets of size n-1 and the coefficient of X^{n-1} in the zero forcing polynomial is n.

theorem zero_forcing_poly_coeff_card_sub_one_eq_card {V : Type*} [Fintype V]
    (G : SimpleGraph V) (hn : 2 ≤ Fintype.card V) (hiso : ∀ v, ∃ w, G.Adj v w) :
    (zero_forcing_poly G).coeff (Fintype.card V - 1) = Fintype.card V
zero_forcing_poly_isoIn LeanGraph Theory & Graph Algorithms

If two finite simple graphs G and H are isomorphic, then their zero forcing polynomials are equal.

theorem zero_forcing_poly_iso {V : Type*} {W : Type*} [Fintype V] [Fintype W]
    (G : SimpleGraph V) (H : SimpleGraph W) (e : G ≃g H) :
    zero_forcing_poly G = zero_forcing_poly H
zero_forcing_poly_lower_half_monoIn LeanGraph Theory & Graph Algorithms

For every finite simple graph G on n vertices and every i with 2i+1 ≤ n, the coefficient of X^i in the zero forcing polynomial of G is at most the coefficient of X^{i+1}; equivalently, the number of i-element zero forcing sets is at most the number of (i+1)-element zero forcing sets.

theorem zero_forcing_poly_lower_half_mono {V : Type*} [Fintype V] (G : SimpleGraph V)
    (i : ℕ) (hi : 2 * i + 1 ≤ Fintype.card V) :
    (zero_forcing_poly G).coeff i ≤ (zero_forcing_poly G).coeff (i + 1)
alternating_word_insertion_entropy_formulaIn LeanInformation Theory & Coding

For all natural numbers m ≥ 1 and k ≥ 0, the base-2 Shannon entropy of the posterior distribution on transmitted words x : Fin m → Bool given received alternating word alternating_word (m+k) false under k insertions equals Real.logb 2 (Nat.choose (m+k) k) - (1 / Nat.choose (m+k) k) * sum_{t=0}^{k/2} Nat.choose (m+1) (k-2t) * Nat.choose (m+t) t * Real.logb 2 (Nat.choose (m+t) t).

theorem alternating_word_insertion_entropy_formula (m k : ℕ) (hm : 1 ≤ m) :
    shannon_entropy (fun x : Fin m → Bool =>
      (((Finset.univ.filter (fun f : Fin m → Fin (m + k) =>
        StrictMono f ∧ ∀ i, (alternating_word (m + k) false) (f i) = x i)).card : ℝ) /
        ((Nat.choose (m + k) k : ℕ) : ℝ))) / Real.log 2 =
      Real.logb 2 ((m + k).choose k : ℝ) -
        (∑ t ∈ Finset.range (k / 2 + 1),
          ((m + 1).choose (k - 2 * t) : ℝ) *
            (((m + t).choose t : ℝ) * Real.logb 2 ((m + t).choose t : ℝ))) /
          ((m + k).choose k : ℝ)
alternating_word_insertion_histogram_and_entropyIn LeanInformation Theory & Coding

For all natural numbers m ≥ 1 and k ≥ 0, the alternating word of length m + k starting with false satisfies both: (1) for every c > 0, the number of binary words x : Fin m → Bool with exactly c strictly increasing embeddings into the alternating word equals the sum over t from 0 to k / 2 of Nat.choose (m + 1) (k - 2 * t) * (if c = Nat.choose (m + t) t then 1 else 0); and (2) the base-2 Shannon entropy of the posterior distribution on transmitted words x : Fin m → Bool given received alternating word under k insertions equals Real.logb 2 (Nat.choose (m+k) k) - (1 / Nat.choose (m+k) k) * sum_{t=0}^{k/2} Nat.choose (m+1) (k-2t) * Nat.choose (m+t) t * Real.logb 2 (Nat.choose (m+t) t).

theorem alternating_word_insertion_histogram_and_entropy (m k : ℕ) (hm : 1 ≤ m) :
    (∀ c : ℕ, 0 < c →
      (Finset.univ.filter (fun x : Fin m → Bool =>
        (Finset.univ.filter (fun f : Fin m → Fin (m + k) =>
          StrictMono f ∧ ∀ i, (alternating_word (m + k) false) (f i) = x i)).card = c)).card =
      ∑ t ∈ Finset.range (k / 2 + 1),
        (m + 1).choose (k - 2 * t) * (if c = (m + t).choose t then 1 else 0)) ∧
    shannon_entropy (fun x : Fin m → Bool =>
      (((Finset.univ.filter (fun f : Fin m → Fin (m + k) =>
        StrictMono f ∧ ∀ i, (alternating_word (m + k) false) (f i) = x i)).card : ℝ) /
          ((Nat.choose (m + k) k : ℕ) : ℝ))) / Real.log 2 =
      Real.logb 2 ((m + k).choose k : ℝ) -
        (∑ t ∈ Finset.range (k / 2 + 1),
          ((m + 1).choose (k - 2 * t) : ℝ) *
            (((m + t).choose t : ℝ) * Real.logb 2 ((m + t).choose t : ℝ))) /
          ((m + k).choose k : ℝ)
alternating_word_insertion_positive_histogramIn LeanInformation Theory & Coding

For all natural numbers m ≥ 1 and k ≥ 0, and every positive natural number c > 0, the number of binary words x : Fin m → Bool having exactly c strictly increasing embeddings into the alternating word of length m + k starting with false equals the sum over t from 0 to k / 2 of Nat.choose (m + 1) (k - 2 * t) * (if c = Nat.choose (m + t) t then 1 else 0).

theorem alternating_word_insertion_positive_histogram (m k : ℕ) (hm : 1 ≤ m) (c : ℕ) (hc : 0 < c) :
    (Finset.univ.filter (fun x : Fin m → Bool =>
      (Finset.univ.filter (fun f : Fin m → Fin (m + k) =>
        StrictMono f ∧ ∀ i, (alternating_word (m + k) false) (f i) = x i)).card = c)).card =
    ∑ t ∈ Finset.range (k / 2 + 1),
      (m + 1).choose (k - 2 * t) * (if c = (m + t).choose t then 1 else 0)
antipodal_hellinger_cG_necessityIn LeanInformation Theory & Coding

For every ρ with 0 < ρ < 1 and every real c, if c satisfies the dimension-free stability inequality Z_ρ(f) - sqrt(1-ρ²) ≥ c·δ(f) for all n ≥ 1 and all antipodal f, then c ≤ c_G(ρ).

theorem antipodal_hellinger_cG_necessity (ρ : ℝ) (hρ0 : 0 < ρ) (hρ1 : ρ < 1) (c : ℝ)
    (h : ∀ (n : ℕ) (hn : 0 < n) (f : (Fin n → Bool) → ℝ), is_antipodal n f →
      hellinger_Z n ρ f - Real.sqrt (1 - ρ ^ 2) ≥ c * dictator_dist n f) :
    c ≤ c_G ρ
antipodal_hellinger_gaussian_majority_limitIn LeanInformation Theory & Coding

For 0 < ρ < 1 and every ε > 0 there are n ≥ 1 and an antipodal f : (Fin n → Bool) → ℝ with positive dictator distance and Hellinger excess at most (c_G(ρ) + ε) times the dictator distance.

theorem antipodal_hellinger_gaussian_majority_limit (ρ : ℝ) (hρ0 : 0 < ρ) (hρ1 : ρ < 1)
    (ε : ℝ) (hε : 0 < ε) :
    ∃ (n : ℕ) (hn : 0 < n) (f : (Fin n → Bool) → ℝ), is_antipodal n f ∧ 0 < dictator_dist n f ∧
      hellinger_Z n ρ f - Real.sqrt (1 - ρ ^ 2) ≤ (c_G ρ + ε) * dictator_dist n f
antipodal_hellinger_majority_three_necessityIn LeanInformation Theory & Coding

For every ρ with 0 < ρ < 1 and every real c, if c satisfies the dimension-free stability inequality Z_ρ(f) - sqrt(1-ρ²) ≥ c·δ(f) for all n ≥ 1 and all antipodal f, then c ≤ c_3(ρ).

theorem antipodal_hellinger_majority_three_necessity (ρ : ℝ) (hρ0 : 0 < ρ) (hρ1 : ρ < 1) (c : ℝ)
    (h : ∀ (n : ℕ) (hn : 0 < n) (f : (Fin n → Bool) → ℝ), is_antipodal n f →
      hellinger_Z n ρ f - Real.sqrt (1 - ρ ^ 2) ≥ c * dictator_dist n f) :
    c ≤ c_3 ρ
antipodal_hellinger_sharp_stability_bound_c3_regimeIn LeanInformation Theory & Coding

For 0 < ρ < 1 with c_3(ρ) ≤ c_G(ρ), for every n ≥ 1 and every antipodal f : (Fin n → Bool) → ℝ, the Hellinger excess Z_ρ(f) - sqrt(1-ρ²) is at least c_3(ρ) times the dictator distance of f. The extremal case is n = 3 with f = majority_three, where equality holds (excess = c_3(ρ)/4 and δ = 1/4).

theorem antipodal_hellinger_sharp_stability_bound_c3_regime (ρ : ℝ) (hρ0 : 0 < ρ) (hρ1 : ρ < 1)
    (hreg : c_3 ρ ≤ c_G ρ) (n : ℕ) (hn : 0 < n) (f : (Fin n → Bool) → ℝ) (hf : is_antipodal n f) :
    hellinger_Z n ρ f - Real.sqrt (1 - ρ ^ 2) ≥ c_3 ρ * dictator_dist n f
antipodal_hellinger_sharp_stability_bound_cG_regimeIn LeanInformation Theory & Coding

For 0 < ρ < 1 with c_G(ρ) ≤ c_3(ρ), for every n ≥ 1 and every antipodal f : (Fin n → Bool) → ℝ, the Hellinger excess Z_ρ(f) - sqrt(1-ρ²) is at least c_G(ρ) times the dictator distance of f. The extremal family is majority on n bits with n → ∞.

theorem antipodal_hellinger_sharp_stability_bound_cG_regime (ρ : ℝ) (hρ0 : 0 < ρ) (hρ1 : ρ < 1)
    (hreg : c_G ρ ≤ c_3 ρ) (n : ℕ) (hn : 0 < n) (f : (Fin n → Bool) → ℝ) (hf : is_antipodal n f) :
    hellinger_Z n ρ f - Real.sqrt (1 - ρ ^ 2) ≥ c_G ρ * dictator_dist n f
antipodal_hellinger_sharp_stability_min_boundIn LeanInformation Theory & Coding

For 0 < ρ < 1, every n ≥ 1 and every antipodal f, the Hellinger excess Z_ρ(f) - sqrt(1-ρ²) is at least min(c_3(ρ), c_G(ρ)) times the dictator distance of f.

theorem antipodal_hellinger_sharp_stability_min_bound (ρ : ℝ) (hρ0 : 0 < ρ) (hρ1 : ρ < 1) :
    ∀ (n : ℕ), 0 < n → ∀ f : (Fin n → Bool) → ℝ, is_antipodal n f →
      hellinger_Z n ρ f - Real.sqrt (1 - ρ ^ 2) ≥ min (c_3 ρ) (c_G ρ) * dictator_dist n f
biased_bit_zero_advantage_characterizationIn LeanInformation Theory & Coding

Let 1/2 < p < 1 and a = (1 - p) / p. For any probability distribution q on ℤ (with q(s) ≥ 0 for all s and HasSum q 1), the one-guess vulnerability satisfies V_p(q) = p if and only if q(s) ≥ a * q(s - 1) for all s ∈ ℤ, and equivalently, if and only if q is a countable mixture q(s) = ∑_{L ∈ ℤ} w_L * G_L(s) for all s ∈ ℤ with non-negative weights w_L ≥ 0 summing to 1 (HasSum w 1), where G_L is the shifted geometric distribution with parameter a.

theorem biased_bit_zero_advantage_characterization (p : ℝ) (hp : 1 / 2 < p) (hp1 : p < 1)
    (q : ℤ → ℝ) (hq_nonneg : ∀ s, 0 ≤ q s) (hq_sum : HasSum q 1) :
    let a := (1 - p) / p
    (biased_bit_vulnerability p q = p ↔ ∀ s : ℤ, a * q (s - 1) ≤ q s) ∧
    (biased_bit_vulnerability p q = p ↔
      ∃ w : ℤ → ℝ, (∀ L, 0 ≤ w L) ∧ HasSum w 1 ∧
        ∀ s, q s = ∑' L : ℤ, w L * shifted_geometric_distribution a L s)
biased_bit_zero_advantage_iff_ratio_geIn LeanInformation Theory & Coding

Let 1/2 < p < 1 and a = (1 - p) / p. For any probability distribution q on ℤ (with q(s) ≥ 0 for all s and HasSum q 1), the one-guess vulnerability satisfies V_p(q) = p if and only if q(s) ≥ a * q(s - 1) for every s ∈ ℤ.

lemma biased_bit_zero_advantage_iff_ratio_ge (p : ℝ) (hp : 1 / 2 < p) (hp1 : p < 1)
    (q : ℤ → ℝ) (hq_nonneg : ∀ s, 0 ≤ q s) (hq_sum : HasSum q 1) :
    let a := (1 - p) / p
    biased_bit_vulnerability p q = p ↔ ∀ s : ℤ, a * q (s - 1) ≤ q s
binaryEntropy_lt_one_of_lt_halfIn LeanInformation Theory & Coding

The binary entropy is below 1 strictly on [0, 1/2) (its maximum 1 is attained only at 1/2).

theorem binaryEntropy_lt_one_of_lt_half {x : ℝ} (hx0 : 0 ≤ x) (hx : x < 1 / 2) :
    binaryEntropy x < 1
binaryEntropy_strictMonoOn_halfIn LeanInformation Theory & Coding

The binary entropy is strictly increasing on [0, 1/2] (its derivative log2((1-x)/x) is positive there).

theorem binaryEntropy_strictMonoOn_half {x y : ℝ}
    (hx : x ∈ Set.Icc (0 : ℝ) (1 / 2)) (hy : y ∈ Set.Icc (0 : ℝ) (1 / 2)) (hxy : x < y) :
    binaryEntropy x < binaryEntropy y
binary_deletion_collision_two_eq_two_insertion_collisionIn LeanInformation Theory & Coding

For any n ≥ 2 and any binary word w of length n, binary_deletion_collision 2 n w equals two_insertion_collision (n - 2) (fun i => w (Fin.cast (Nat.sub_add_cancel hn) i)).

theorem binary_deletion_collision_two_eq_two_insertion_collision (n : ℕ) (hn : 2 ≤ n) (w : Fin n → Bool) :
    binary_deletion_collision 2 n w =
      two_insertion_collision (n - 2) (fun i => w (Fin.cast (Nat.sub_add_cancel hn) i))
binary_subset_mean_coord_mem_IccIn LeanInformation Theory & Coding

For any natural number n, any finite nonempty subset S of {0, 1}^n (viewed in Fin n → ℝ), and any coordinate k : Fin n, the k-th coordinate of the centroid ((S.card : ℝ)⁻¹ • ∑ s ∈ S, s) lies in the closed interval [0, 1].

theorem binary_subset_mean_coord_mem_Icc (n : ℕ) (S : Finset (Fin n → ℝ))
    (hS : ∀ s ∈ S, ∀ k : Fin n, s k = 0 ∨ s k = 1) (hne : S.Nonempty) (k : Fin n) :
    ((S.card : ℝ)⁻¹ • ∑ s ∈ S, s) k ∈ Set.Icc (0 : ℝ) 1
binary_subset_mean_mem_convex_hullIn LeanInformation Theory & Coding

For any natural number n and any nonempty finite subset S of Fin n → ℝ, the uniform centroid (S.card : ℝ)⁻¹ • ∑ s ∈ S, s belongs to the convex hull convexHull ℝ (S : Set (Fin n → ℝ)).

theorem binary_subset_mean_mem_convex_hull (n : ℕ) (S : Finset (Fin n → ℝ)) (hne : S.Nonempty) :
    ((S.card : ℝ)⁻¹ • ∑ s ∈ S, s) ∈ convexHull ℝ (S : Set (Fin n → ℝ))
bivariate_poisson_pmf_one_oneIn LeanInformation Theory & Coding

The bivariate Poisson PMF at (1, 1) equals Real.exp (-(3/2)) * (3/4).

theorem bivariate_poisson_pmf_one_one :
    bivariate_poisson_pmf 1 1 = Real.exp (-(3 / 2)) * (3 / 4)
bivariate_poisson_pmf_zero_rightIn LeanInformation Theory & Coding

For any natural number a, bivariate_poisson_pmf a 0 simplifies to Real.exp (-(3/2)) * (1/2)^a / a!.

theorem bivariate_poisson_pmf_zero_right (a : ℕ) :
    bivariate_poisson_pmf a 0 = Real.exp (-(3 / 2)) * (1 / 2) ^ a / a.factorial
cliqueNum_categorical_prod_ge_minIn LeanInformation Theory & Coding

The clique number of the categorical product G × H is at least the minimum of the clique numbers of G and H.

theorem cliqueNum_categorical_prod_ge_min {V W : Type*} [Fintype V] [Nonempty V] [Fintype W] [Nonempty W] (G : SimpleGraph V) (H : SimpleGraph W) : min G.cliqueNum H.cliqueNum ≤ (simple_graph_categorical_prod G H).cliqueNum
cliqueNum_le_shannon_or_capacityIn LeanInformation Theory & Coding

The clique number of a finite graph is a lower bound for its Shannon OR-capacity (the n = 1 term of the supremum equals the clique number).

theorem cliqueNum_le_shannon_or_capacity {V : Type*} [Fintype V] [Nonempty V] (G : SimpleGraph V) : (G.cliqueNum : ℝ) ≤ shannon_or_capacity G
code_elimination_projectively_independent_low_weightIn LeanInformation Theory & Coding

Let F be a finite field, and let k, n, d >= 1. Let G be a (k + 1) by n matrix over F. If the set of projective points with codeword Hamming weight at most d - 1 is projectively independent, then there exists a k by (k + 1) matrix U of rank k such that no projective point has codeword Hamming weight at most d - 1 under U * G.

theorem code_elimination_projectively_independent_low_weight
    {F : Type*} [Field F] [Fintype F] [DecidableEq F] {k n d : ℕ}
    (hk : 1 ≤ k) (hn : 1 ≤ n) (hd : 1 ≤ d)
    (G : Matrix (Fin (k + 1)) (Fin n) F)
    (hS : Projectivization.Independent
      ((↑) : { p : Projectivization F (Fin (k + 1) → F) | hammingNorm (Matrix.vecMul p.rep G) ≤ d - 1 } →
        Projectivization F (Fin (k + 1) → F))) :
    ∃ U : Matrix (Fin k) (Fin (k + 1)) F,
      U.rank = k ∧
        { p : Projectivization F (Fin k → F) | hammingNorm (Matrix.vecMul p.rep (U * G)) ≤ d - 1 } = ∅
collision_embedding_pair_count_four_geIn LeanInformation Theory & Coding

Every binary word of length 6 has at least 31 ordered pairs of strictly increasing maps Fin 4 → Fin 6 inducing equal sub-words: 31 ≤ collision_embedding_pair_count 4 w.

theorem collision_embedding_pair_count_four_ge (w : Fin 6 → Bool) :
    31 ≤ collision_embedding_pair_count 4 w
collision_embedding_pair_count_four_witnessIn LeanInformation Theory & Coding

The word 010010 (true exactly at positions 1 and 4) has exactly 31 ordered pairs of strictly increasing maps Fin 4 → Fin 6 inducing equal sub-words: collision_embedding_pair_count 4 (fun i : Fin 6 => i = 1 ∨ i = 4) = 31.

theorem collision_embedding_pair_count_four_witness :
    collision_embedding_pair_count 4 (fun i : Fin 6 => (i : ℕ) = 1 ∨ (i : ℕ) = 4) = 31
cyclic_orbit_coprime_degree_one_of_scalar_equivIn LeanInformation Theory & Coding

Under the forward hypotheses (r ≥ 2, both minimal polynomial degrees ≥ 2r-1, and the spans of powers of y and x equal up to a nonzero scalar), there exist coprime f, g ∈ B[X] with natDegree ≤ r-1, (aeval y g) ≠ 0, (aeval y f) ≠ 0, x = (aeval y f)/(aeval y g) and max (natDegree f) (natDegree g) = 1.

open Pointwise in
theorem cyclic_orbit_coprime_degree_one_of_scalar_equiv
    {B M : Type*} [Field B] [Field M] [Algebra B M] [FiniteDimensional B M]
    {r : ℕ} (hr : 2 ≤ r) {x y : M}
    (hx : 2 * r - 1 ≤ (minpoly B x).natDegree)
    (hy : 2 * r - 1 ≤ (minpoly B y).natDegree)
    (h : ∃ α : M, α ≠ 0 ∧ cyclic_orbit_poly_subspace B r y = α • cyclic_orbit_poly_subspace B r x) :
    ∃ f g : Polynomial B, IsCoprime f g ∧ f.natDegree ≤ r - 1 ∧ g.natDegree ≤ r - 1 ∧
      Polynomial.aeval y f ≠ 0 ∧ Polynomial.aeval y g ≠ 0 ∧
      x = Polynomial.aeval y f / Polynomial.aeval y g ∧ max f.natDegree g.natDegree = 1
cyclic_orbit_fractional_linear_of_coprime_degree_oneIn LeanInformation Theory & Coding

Let x, y ∈ M (M a field extension of B) and let f, g ∈ B[X] be coprime, of natDegree ≤ 1, with max (natDegree f) (natDegree g) ≥ 1, (aeval y f) ≠ 0, (aeval y g) ≠ 0 and x = (aeval y f)/(aeval y g). If (minpoly B x).natDegree ≥ 2, then y = (a x + b)/(c x + d) for some a, b, c, d ∈ B with a*d - b*c ≠ 0.

theorem cyclic_orbit_fractional_linear_of_coprime_degree_one
    {B M : Type*} [Field B] [Field M] [Algebra B M]
    {x y : M} {f g : Polynomial B}
    (hcop : IsCoprime f g) (hf : f.natDegree ≤ 1) (hg : g.natDegree ≤ 1)
    (hmax : 1 ≤ max f.natDegree g.natDegree)
    (hfy : Polynomial.aeval y f ≠ 0) (hgy : Polynomial.aeval y g ≠ 0)
    (hx : x = Polynomial.aeval y f / Polynomial.aeval y g)
    (hx2 : 2 ≤ (minpoly B x).natDegree) :
    ∃ a b c d : B, a * d - b * c ≠ 0 ∧
      y = (algebraMap B M a * x + algebraMap B M b) / (algebraMap B M c * x + algebraMap B M d)
cyclic_orbit_fractional_linear_of_scalar_equivIn LeanInformation Theory & Coding

Let r ≥ 2, x, y ∈ M with both minimal polynomial degrees ≥ 2r-1. If cyclic_orbit_poly_subspace B r y = α • cyclic_orbit_poly_subspace B r x for some α ≠ 0, then there are a, b, c, d ∈ B with a*d - b*c ≠ 0 and y = (ax+b)/(cx+d).

open Pointwise in
theorem cyclic_orbit_fractional_linear_of_scalar_equiv
    {B M : Type*} [Field B] [Field M] [Algebra B M] [FiniteDimensional B M]
    {r : ℕ} (hr : 2 ≤ r) {x y : M}
    (hx : 2 * r - 1 ≤ (minpoly B x).natDegree)
    (hy : 2 * r - 1 ≤ (minpoly B y).natDegree)
    (h : ∃ α : M, α ≠ 0 ∧ cyclic_orbit_poly_subspace B r y = α • cyclic_orbit_poly_subspace B r x) :
    ∃ a b c d : B, a * d - b * c ≠ 0 ∧
      y = (algebraMap B M a * x + algebraMap B M b) / (algebraMap B M c * x + algebraMap B M d)
cyclic_orbit_fractional_rep_of_scalar_equivIn LeanInformation Theory & Coding

Let r ≥ 2, let M be a finite-dimensional extension of B, and let x, y ∈ M satisfy cyclic_orbit_poly_subspace B r y = α • cyclic_orbit_poly_subspace B r x for some α ≠ 0. Then there are polynomials f, g over B with natDegree ≤ r-1, coprime, with (aeval y g) ≠ 0 and x = (aeval y f)/(aeval y g).

open Pointwise in
theorem cyclic_orbit_fractional_rep_of_scalar_equiv
    {B M : Type*} [Field B] [Field M] [Algebra B M] [FiniteDimensional B M]
    {r : ℕ} (hr : 2 ≤ r) {x y : M}
    (h : ∃ α : M, α ≠ 0 ∧ cyclic_orbit_poly_subspace B r y = α • cyclic_orbit_poly_subspace B r x) :
    ∃ f g : Polynomial B, f.natDegree ≤ r - 1 ∧ g.natDegree ≤ r - 1 ∧ IsCoprime f g ∧
      Polynomial.aeval y g ≠ 0 ∧ x = Polynomial.aeval y f / Polynomial.aeval y g
cyclic_orbit_poly_subspace_inf_smul_eq_aeval_smulIn LeanInformation Theory & Coding

Let r ≥ 2, y ∈ M with (minpoly B y).natDegree ≥ 2r-1, f, g ∈ B[X] coprime with natDegree ≤ r-1, (aeval y f) ≠ 0, (aeval y g) ≠ 0 and x = (aeval y f)/(aeval y g). Then cyclic_orbit_poly_subspace B r y ⊓ x • cyclic_orbit_poly_subspace B r y = (aeval y f) • cyclic_orbit_poly_subspace B (r - max (natDegree f) (natDegree g)) y.

open Pointwise in
theorem cyclic_orbit_poly_subspace_inf_smul_eq_aeval_smul
    {B M : Type*} [Field B] [Field M] [Algebra B M] [FiniteDimensional B M]
    {r : ℕ} (hr : 2 ≤ r) {x y : M} (hy : 2 * r - 1 ≤ (minpoly B y).natDegree)
    {f g : Polynomial B} (hcop : IsCoprime f g)
    (hf : f.natDegree ≤ r - 1) (hg : g.natDegree ≤ r - 1)
    (hfy : Polynomial.aeval y f ≠ 0) (hgy : Polynomial.aeval y g ≠ 0)
    (hx : x = Polynomial.aeval y f / Polynomial.aeval y g) :
    cyclic_orbit_poly_subspace B r y ⊓ x • cyclic_orbit_poly_subspace B r y =
      Polynomial.aeval y f • cyclic_orbit_poly_subspace B (r - max f.natDegree g.natDegree) y
cyclic_orbit_poly_subspace_inf_smul_finrank_of_scalar_equivIn LeanInformation Theory & Coding

Let r ≥ 2, x, y ∈ M with (minpoly B x).natDegree ≥ 2r-1, and suppose cyclic_orbit_poly_subspace B r y = α • cyclic_orbit_poly_subspace B r x for some α ≠ 0. Then the B-dimension of cyclic_orbit_poly_subspace B r y ⊓ x • cyclic_orbit_poly_subspace B r y is r-1.

open Pointwise in
theorem cyclic_orbit_poly_subspace_inf_smul_finrank_of_scalar_equiv
    {B M : Type*} [Field B] [Field M] [Algebra B M] [FiniteDimensional B M]
    {r : ℕ} (hr : 2 ≤ r) {x y : M} (hx : 2 * r - 1 ≤ (minpoly B x).natDegree)
    (h : ∃ α : M, α ≠ 0 ∧ cyclic_orbit_poly_subspace B r y = α • cyclic_orbit_poly_subspace B r x) :
    Module.finrank B ↥(cyclic_orbit_poly_subspace B r y ⊓ x • cyclic_orbit_poly_subspace B r y) = r - 1
cyclic_orbit_poly_subspace_scalar_equiv_iffIn LeanInformation Theory & Coding

Given a finite field B, a finite extension field M of B (with [FiniteDimensional B M]), a natural number r with 2 ≤ r, and elements x, y ∈ M with (minpoly B x).natDegree ≥ 2 * r - 1 and (minpoly B y).natDegree ≥ 2 * r - 1, there exists α ∈ M with α ≠ 0 such that cyclic_orbit_poly_subspace B r y = α • cyclic_orbit_poly_subspace B r x if and only if there exist a, b, c, d ∈ B such that a * d - b * c ≠ 0 and y = (algebraMap B M a * x + algebraMap B M b) / (algebraMap B M c * x + algebraMap B M d).

open Pointwise in
theorem cyclic_orbit_poly_subspace_scalar_equiv_iff
    {B M : Type*} [Field B] [Finite B] [Field M] [Algebra B M] [FiniteDimensional B M]
    {r : ℕ} (hr : 2 ≤ r) {x y : M}
    (hx : 2 * r - 1 ≤ (minpoly B x).natDegree)
    (hy : 2 * r - 1 ≤ (minpoly B y).natDegree) :
    (∃ α : M, α ≠ 0 ∧ cyclic_orbit_poly_subspace B r y = α • cyclic_orbit_poly_subspace B r x) ↔
    ∃ a b c d : B, a * d - b * c ≠ 0 ∧
      y = (algebraMap B M a * x + algebraMap B M b) / (algebraMap B M c * x + algebraMap B M d)
cyclic_orbit_poly_subspace_scalar_equiv_of_fractional_linearIn LeanInformation Theory & Coding

Given a finite-dimensional extension M of B, r ≥ 2, x, y ∈ M with (minpoly B x).natDegree ≥ 2r-1 and (minpoly B y).natDegree ≥ 2r-1, and a fractional linear relation y = (ax+b)/(cx+d) with ad - bc ≠ 0 (a,b,c,d ∈ B), there is α ≠ 0 in M with cyclic_orbit_poly_subspace B r y = α • cyclic_orbit_poly_subspace B r x.

open Pointwise in
theorem cyclic_orbit_poly_subspace_scalar_equiv_of_fractional_linear
    {B M : Type*} [Field B] [Field M] [Algebra B M] [FiniteDimensional B M]
    {r : ℕ} (hr : 2 ≤ r) {x y : M}
    (hx : 2 * r - 1 ≤ (minpoly B x).natDegree)
    (hy : 2 * r - 1 ≤ (minpoly B y).natDegree)
    (h : ∃ a b c d : B, a * d - b * c ≠ 0 ∧
      y = (algebraMap B M a * x + algebraMap B M b) / (algebraMap B M c * x + algebraMap B M d)) :
    ∃ α : M, α ≠ 0 ∧ cyclic_orbit_poly_subspace B r y = α • cyclic_orbit_poly_subspace B r x
cyclic_orbit_poly_subspace_smul_finrankIn LeanInformation Theory & Coding

If r ≤ (minpoly B x).natDegree and α ≠ 0 in M, then the B-dimension of α • cyclic_orbit_poly_subspace B r x equals r.

open Pointwise in
theorem cyclic_orbit_poly_subspace_smul_finrank
    {B M : Type*} [Field B] [Field M] [Algebra B M]
    (r : ℕ) {x : M} (h : r ≤ (minpoly B x).natDegree) {α : M} (hα : α ≠ 0) :
    Module.finrank B ↥(α • cyclic_orbit_poly_subspace B r x) = r
descending_band_cost_nonnegIn LeanInformation Theory & Coding

For any integer gap d and natural numbers r, L, descending_band_cost d r L is non-negative.

theorem descending_band_cost_nonneg (d : ℤ) (r L : ℕ) : 0 ≤ descending_band_cost d r L
descending_band_points_mem_zero_oneIn LeanInformation Theory & Coding

For any integer d ≥ 3, the pair (0, 1) belongs to descending_band_points d.

theorem descending_band_points_mem_zero_one (d : ℤ) (hd : 3 ≤ d) : ((0 : ℝ), (1 : ℝ)) ∈ descending_band_points d
descending_band_vulnerability_ge_one_thirdIn LeanInformation Theory & Coding

For any integer gap d and valid parameters 1 ≤ r ≤ L, descending_band_vulnerability d r L is at least 1/3.

theorem descending_band_vulnerability_ge_one_third (d : ℤ) (r L : ℕ) (hr : 1 ≤ r) (hrL : r ≤ L) : 1 / 3 ≤ descending_band_vulnerability d r L
dictator_dist_le_half_of_antipodalIn LeanInformation Theory & Coding

For every n ≥ 1 and every antipodal f, the dictator distance of f is at most 1/2.

theorem dictator_dist_le_half_of_antipodal (n : ℕ) (hn : 0 < n) (f : (Fin n → Bool) → ℝ)
    (hf : is_antipodal n f) : dictator_dist n f ≤ 1 / 2
dictator_dist_nonnegIn LeanInformation Theory & Coding

For every n and every f, the dictator distance of f is nonnegative.

theorem dictator_dist_nonneg (n : ℕ) (f : (Fin n → Bool) → ℝ) : 0 ≤ dictator_dist n f
dictator_dist_odd_majority_signIn LeanInformation Theory & Coding

For every odd n, the dictator distance of the n-bit majority sign is (1/2)^(n-1) times the sum of the binomial coefficients C(n-1,k) for k from (n+1)/2 to n-1; in particular it is positive for n at least 3 and tends to 1/2.

open scoped BigOperators in
theorem dictator_dist_odd_majority_sign (n : ℕ) (hn : Odd n) :
    dictator_dist n (odd_majority_sign n) =
      (1 / 2 : ℝ) ^ (n - 1) * ∑ k ∈ Finset.Icc ((n + 1) / 2) (n - 1), ((n - 1).choose k : ℝ)
dictator_stability_excess_zeroIn LeanInformation Theory & Coding

At a dictator (a 0/1 coordinate indicator) the order-7/8 Tsallis stability excess vanishes identically: E[(T_ρ f)^(7/8)] = h(7/8, ρ). So the target inequality is an equality, not merely an inequality, whenever delta(f) = 0, and any valid constant is automatically <= the (positive) sharp value at non-dictators.

open scoped BigOperators in
theorem dictator_stability_excess_zero (n : ℕ) (ρ : ℝ) (hρ0 : 0 < ρ) (hρ1 : ρ < 1) (hn : 0 < n)
    (i : Fin n) (b : Bool) :
    ((1 / (2 : ℝ) ^ n) * ∑ y : Fin n → Bool,
        (noise_operator n ρ (fun x => if x i = b then (1 : ℝ) else 0) y) ^ (7 / 8 : ℝ))
      - tsallis_h (7 / 8) ρ = 0
dual_melas_joint_pattern_prob_marginal_eqIn LeanInformation Theory & Coding

The two marginal distributions of the dual Melas joint pattern distribution are identical: for any count m, the sum over the second coordinate equals the sum over the first coordinate.

theorem dual_melas_joint_pattern_prob_marginal_eq
    {F : Type*} [Field F] [Algebra (ZMod 2) F] [FiniteDimensional (ZMod 2) F]
    (k : ℕ) (hk : 0 < k) (α c : F) (m : ℕ) :
    ∑ b ∈ Finset.range (2 ^ k), dual_melas_joint_pattern_prob k α c m b =
      ∑ a ∈ Finset.range (2 ^ k), dual_melas_joint_pattern_prob k α c a m
dual_melas_joint_pattern_prob_marginal_sumIn LeanInformation Theory & Coding

Summing the empirical joint pattern probability over the second coordinate b < 2^k yields the empirical single-pattern probability #{w | count(w) = a} / 2^k.

theorem dual_melas_joint_pattern_prob_marginal_sum
    {F : Type*} [Field F] [Algebra (ZMod 2) F] [FiniteDimensional (ZMod 2) F]
    (k : ℕ) (α c : F) (a : ℕ) :
    ∑ b ∈ Finset.range (2 ^ k), dual_melas_joint_pattern_prob k α c a b =
      ((Finset.univ.filter (fun w : Fin k → ZMod 2 =>
        dual_melas_pattern_count k α c w = a)).card : ℝ) / (2 : ℝ) ^ k
dual_melas_joint_pattern_prob_marginal_sum_fstIn LeanInformation Theory & Coding

Summing the empirical joint pattern probability over the first coordinate a < 2^k yields the rotated-pattern empirical probability #{w | count(cyclic_rotate_left k w) = b} / 2^k.

theorem dual_melas_joint_pattern_prob_marginal_sum_fst
    {F : Type*} [Field F] [Algebra (ZMod 2) F] [FiniteDimensional (ZMod 2) F]
    (k : ℕ) (α c : F) (b : ℕ) :
    ∑ a ∈ Finset.range (2 ^ k), dual_melas_joint_pattern_prob k α c a b =
      ((Finset.univ.filter (fun w : Fin k → ZMod 2 =>
        dual_melas_pattern_count k α c (cyclic_rotate_left k w) = b)).card : ℝ) / (2 : ℝ) ^ k
dual_melas_pattern_count_cyclic_rotate_left_card_eqIn LeanInformation Theory & Coding

The number of words w of length k whose cyclic rotation has pattern count b equals the number of words whose pattern count is b.

theorem dual_melas_pattern_count_cyclic_rotate_left_card_eq
    {F : Type*} [Field F] [Algebra (ZMod 2) F] [FiniteDimensional (ZMod 2) F]
    (k : ℕ) (hk : 0 < k) (α c : F) (b : ℕ) :
    (Finset.univ.filter (fun w : Fin k → ZMod 2 =>
      dual_melas_pattern_count k α c (cyclic_rotate_left k w) = b)).card =
    (Finset.univ.filter (fun w : Fin k → ZMod 2 =>
      dual_melas_pattern_count k α c w = b)).card
entropy_upper_bound_binary_subsetIn LeanInformation Theory & Coding

For any natural number n and any finite nonempty subset S ⊆ {0, 1}^n (represented as points in Fin n → ℝ with coordinates in {0, 1}), there exists a point z in the convex hull convexHull ℝ (S : Set (Fin n → ℝ)) such that Real.log (S.card : ℝ) ≤ ∑ k : Fin n, Real.binEntropy (z k).

theorem entropy_upper_bound_binary_subset (n : ℕ) (S : Finset (Fin n → ℝ))
    (hS : ∀ s ∈ S, ∀ k : Fin n, s k = 0 ∨ s k = 1) (hne : S.Nonempty) :
    ∃ z ∈ convexHull ℝ (S : Set (Fin n → ℝ)), Real.log (S.card : ℝ) ≤ ∑ k : Fin n, Real.binEntropy (z k)
entropy_upper_bound_binary_subset_centroidIn LeanInformation Theory & Coding

For any natural number n and any finite nonempty subset S of {0, 1}^n (viewed in Fin n → ℝ), the natural logarithm of the cardinality of S is bounded above by the sum over k : Fin n of the binary entropies Real.binEntropy of the k-th coordinates of the centroid ((S.card : ℝ)⁻¹ • ∑ s ∈ S, s).

theorem entropy_upper_bound_binary_subset_centroid (n : ℕ) (S : Finset (Fin n → ℝ))
    (hS : ∀ s ∈ S, ∀ k : Fin n, s k = 0 ∨ s k = 1) (hne : S.Nonempty) :
    Real.log (S.card : ℝ) ≤ ∑ k : Fin n, Real.binEntropy (((S.card : ℝ)⁻¹ • ∑ s ∈ S, s) k)
exists_is_square_path_coloringIn LeanInformation Theory & Coding

For every q ≥ 3 and every length n there exists a proper colouring of the square of the path on n vertices with colours in Fin q, namely i ↦ i mod 3.

theorem exists_is_square_path_coloring {q : ℕ} (hq : 3 ≤ q) (n : ℕ) :
    ∃ y : Fin n → Fin q, is_square_path_coloring y
exists_longest_word_runIn LeanInformation Theory & Coding

Every word y : Fin n → α with 1 ≤ n has at least one longest run [a, b).

theorem exists_longest_word_run {n : ℕ} {α : Type*} (y : Fin n → α) (hn : 1 ≤ n) :
    ∃ a b : ℕ, is_longest_word_run y a b
fhs_middle_symbol_next_eq_endsIn LeanInformation Theory & Coding

Any symbol at distance at least (s - 1) / 2 from (s - 1) / 2 in Fin s must be 0 or s - 1 for odd s.

theorem fhs_middle_symbol_next_eq_ends (s : ℕ) (h_odd : Odd s)
    (y : Fin s) (hy : ((s - 1) / 2 : ℤ) ≤ |(y : ℤ) - (((s - 1) / 2 : ℕ) : ℤ)|) :
    (y : ℕ) = 0 ∨ (y : ℕ) = s - 1
fhs_min_gap_leIn LeanInformation Theory & Coding

For any frequency hopping sequence X : Fin v → Fin s and any index j : Fin v, the minimum gap of X is at most the consecutive gap |X(j+1) - X(j)| - 1 at position j.

theorem fhs_min_gap_le {v s : ℕ} [NeZero v] (X : Fin v → Fin s) (j : Fin v) :
    fhs_min_gap X ≤ |(X (j + 1) : ℤ) - (X j : ℤ)| - 1
fhs_min_gap_le_half_sub_oneIn LeanInformation Theory & Coding

For any uniform frequency hopping sequence of odd alphabet size s, the minimum gap is at most ((s - 1) / 2) - 1.

theorem fhs_min_gap_le_half_sub_one
    (k s : ℕ) [NeZero (k * s)] (hk : 1 ≤ k) (hs : 1 ≤ s) (h_odd : Odd s)
    (X : Fin (k * s) → Fin s)
    (h_unif : is_uniform_fhs k s X) :
    fhs_min_gap X ≤ ((s - 1) / 2 : ℤ) - 1
fhs_uniform_autocorr_sumIn LeanInformation Theory & Coding

The sum of periodic Hamming autocorrelations over all shifts for a uniform sequence of length k * s over alphabet size s equals k^2 * s.

theorem fhs_uniform_autocorr_sum (k s : ℕ) [NeZero (k * s)]
    (X : Fin (k * s) → Fin s) (h_unif : is_uniform_fhs k s X) :
    Finset.sum Finset.univ (fun τ : Fin (k * s) => fhs_hamming_autocorr X τ) = k ^ 2 * s
full_reed_solomon_large_list_of_primeIn LeanInformation Theory & Coding

For any natural number $m \ge 2$ with $m \equiv 2 \pmod 3$ and any prime $p$ satisfying $p \equiv 2 \pmod 3$, $p \equiv 1 \pmod m$, and $p \ge 3m + 2$, there exists a received word $y : \mathbb{Z}/p\mathbb{Z} \to \mathbb{Z}/p\mathbb{Z}$ and a finite set $S$ of at least $p$ codewords in the full-length Reed-Solomon code over $\mathbb{Z}/p\mathbb{Z}$ of dimension $2(p+m-1)/(3m)$ such that every codeword in $S$ is at Hamming distance exactly $p - (p-1)/m$ from $y$.

theorem full_reed_solomon_large_list_of_prime (m : ℕ) (hm : 2 ≤ m) (hm3 : m % 3 = 2)
    (p : ℕ) [Fact (Nat.Prime p)] (hp3 : p % 3 = 2) (hpm : p % m = 1) (hp_ge : 3 * m + 2 ≤ p) :
    ∃ (y : ZMod p → ZMod p) (S : Finset (ZMod p → ZMod p)),
      p ≤ S.card ∧
      (∀ c ∈ S, c ∈ full_reed_solomon_code (ZMod p) (2 * (p + m - 1) / (3 * m))) ∧
      ∀ c ∈ S, hammingDist c y = p - (p - 1) / m
full_reed_solomon_prime_field_large_listIn LeanInformation Theory & Coding

Let $m \ge 2$ be an integer such that $m \equiv 2 \pmod 3$. Then there exist infinitely many primes $p$ such that the full-length Reed-Solomon code over $\mathbb{F}_p$ of length $n = p$ and dimension $\frac{2(p+m-1)}{3m}$ has a received word $y \in \mathbb{F}_p^n$ at Hamming distance exactly $p - \frac{p-1}{m}$ from at least $n$ distinct codewords.

theorem full_reed_solomon_prime_field_large_list (m : ℕ) (hm : 2 ≤ m) (hm3 : m % 3 = 2) :
    {p : ℕ | ∃ hp : Fact (Nat.Prime p),
      ∃ (y : ZMod p → ZMod p) (S : Finset (ZMod p → ZMod p)),
        p ≤ S.card ∧
        (∀ c ∈ S, c ∈ full_reed_solomon_code (ZMod p) (2 * (p + m - 1) / (3 * m))) ∧
        ∀ c ∈ S, hammingDist c y = p - (p - 1) / m}.Infinite
gapped_three_point_optimal_vulnerability_ge_lower_convex_envelopeIn LeanInformation Theory & Coding

For any d ≥ 3 and c ≥ 0, lower_convex_envelope (descending_band_points d) c is at most the optimal vulnerability against a uniform secret on {0, 1, d}.

theorem gapped_three_point_optimal_vulnerability_ge_lower_convex_envelope (d : ℤ) (hd : 3 ≤ d) (c : ℝ) (hc : 0 ≤ c) : lower_convex_envelope (descending_band_points d) c ≤ gapped_three_point_optimal_vulnerability d c
gapped_three_point_optimal_vulnerability_le_descending_bandIn LeanInformation Theory & Coding

For any integers d, r, L with 1 ≤ r ≤ L, the optimal vulnerability at budget descending_band_cost d r L is at most descending_band_vulnerability d r L.

theorem gapped_three_point_optimal_vulnerability_le_descending_band (d : ℤ) (r L : ℕ) (hr : 1 ≤ r) (hrL : r ≤ L) : gapped_three_point_optimal_vulnerability d (descending_band_cost d r L) ≤ descending_band_vulnerability d r L
gapped_three_point_optimal_vulnerability_le_lower_convex_envelopeIn LeanInformation Theory & Coding

For any d ≥ 3 and c ≥ 0, the optimal vulnerability against a uniform secret on {0, 1, d} is at most lower_convex_envelope (descending_band_points d) c.

theorem gapped_three_point_optimal_vulnerability_le_lower_convex_envelope (d : ℤ) (hd : 3 ≤ d) (c : ℝ) (hc : 0 ≤ c) : gapped_three_point_optimal_vulnerability d c ≤ lower_convex_envelope (descending_band_points d) c
hammingNorm_vecMul_mk_rep_eqIn LeanInformation Theory & Coding

For any nonzero vector w and matrix G over a finite field F, the Hamming weight of the codeword generated by the canonical projective representative of w equals the Hamming weight of w * G.

theorem hammingNorm_vecMul_mk_rep_eq {F : Type*} [Field F] [Fintype F] [DecidableEq F] {m n : ℕ}
    (w : Fin m → F) (hw : w ≠ 0) (G : Matrix (Fin m) (Fin n) F) :
    hammingNorm (Matrix.vecMul (Projectivization.mk F w hw).rep G) =
      hammingNorm (Matrix.vecMul w G)
hellinger_Z_eq_two_sqrt_massesIn LeanInformation Theory & Coding

For rho in (0,1) and an antipodal f on {0,1}^n, the Hellinger affinity equals (1/2^n) sum_y 2 sqrt(p_y q_y), where p_y (resp. q_y) is the total Hellinger-kernel mass K(x,y) = ((1+rho)/2)^(n - d(x,y)) ((1-rho)/2)^(d(x,y)) arriving at y from the level set f = 1 (resp. f = -1).

theorem hellinger_Z_eq_two_sqrt_masses (n : ℕ) (ρ : ℝ) (hρ0 : 0 < ρ) (hρ1 : ρ < 1)
    (f : (Fin n → Bool) → ℝ) (hf : is_antipodal n f) :
    hellinger_Z n ρ f =
      (1 / 2 ^ n) * ∑ y, 2 * Real.sqrt (
        (∑ x, if f x = 1 then ((1 + ρ) / 2) ^ (n - hammingDist x y) * ((1 - ρ) / 2) ^ (hammingDist x y) else 0) *
        (∑ x, if f x = -1 then ((1 + ρ) / 2) ^ (n - hammingDist x y) * ((1 - ρ) / 2) ^ (hammingDist x y) else 0))
hellinger_Z_ge_nuclear_affinityIn LeanInformation Theory & Coding

For every rho in (0, 1), n >= 1, and antipodal Boolean function f on {0,1}^n, the Hellinger affinity Z_rho(f) is lower bounded by (1 / (2 * 2^n)) * ‖G_h - D_f G_h D_f‖_1 where G_h(x, y) = h^(hammingDist(x, y)) and h = sqrt(1 - rho^2).

theorem hellinger_Z_ge_nuclear_affinity (n : ℕ) (ρ : ℝ) (hρ0 : 0 < ρ) (hρ1 : ρ < 1)
    (f : (Fin n → Bool) → ℝ) (hf : is_antipodal n f) :
    hellinger_Z n ρ f ≥
      let G : Matrix (Fin n → Bool) (Fin n → Bool) ℝ := fun x y ↦ (Real.sqrt (1 - ρ ^ 2)) ^ (hammingDist x y)
      (1 / (2 * (2 : ℝ) ^ n)) *
        matrix_nuclear_norm (G - (Matrix.diagonal f) * G * (Matrix.diagonal f))
hellinger_commutator_nuclear_leIn LeanInformation Theory & Coding

For rho in (0,1), the hypercube Gram matrix G(x,y) = h^(d(x,y)) with h = sqrt(1 - rho^2) and an antipodal f on {0,1}^n, the nuclear norm of the commutator G - D_f G D_f is at most 4 sum_y sqrt(p_y q_y), where p_y (resp. q_y) is the total Hellinger-kernel mass arriving at y from the level set f = 1 (resp. f = -1).

theorem hellinger_commutator_nuclear_le (n : ℕ) (ρ : ℝ) (hρ0 : 0 < ρ) (hρ1 : ρ < 1)
    (f : (Fin n → Bool) → ℝ) (hf : is_antipodal n f) :
    let G : Matrix (Fin n → Bool) (Fin n → Bool) ℝ := fun x y ↦ (Real.sqrt (1 - ρ ^ 2)) ^ (hammingDist x y)
    matrix_nuclear_norm (G - (Matrix.diagonal f) * G * (Matrix.diagonal f)) ≤
      4 * ∑ y, Real.sqrt (
        (∑ x, if f x = 1 then ((1 + ρ) / 2) ^ (n - hammingDist x y) * ((1 - ρ) / 2) ^ (hammingDist x y) else 0) *
        (∑ x, if f x = -1 then ((1 + ρ) / 2) ^ (n - hammingDist x y) * ((1 - ρ) / 2) ^ (hammingDist x y) else 0))
hellinger_gram_factorizationIn LeanInformation Theory & Coding

For rho in (0,1), h = sqrt(1 - rho^2) and the tensorised Hellinger kernel K(x,z) = ((1+rho)/2)^(n - d(x,z)) * ((1-rho)/2)^(d(x,z)), the hypercube Gram matrix with entries h^(d(x,y)) is the Gram matrix of the square-root densities: h^(d(x,y)) = sum over z of sqrt(K(x,z)) * sqrt(K(y,z)).

theorem hellinger_gram_factorization (n : ℕ) (ρ : ℝ) (hρ0 : 0 < ρ) (hρ1 : ρ < 1)
    (x y : Fin n → Bool) :
    (Real.sqrt (1 - ρ ^ 2)) ^ (hammingDist x y) =
      ∑ z, Real.sqrt (((1 + ρ) / 2) ^ (n - hammingDist x z) * ((1 - ρ) / 2) ^ (hammingDist x z)) *
        Real.sqrt (((1 + ρ) / 2) ^ (n - hammingDist y z) * ((1 - ρ) / 2) ^ (hammingDist y z))
hellinger_observation_factor_admissibleNeeds helpInformation Theory & Coding

For any natural number m >= 2, the candidate multiplicative constant C_m = ⨆ (k : ℕ) (_ : 2 ≤ k ∧ k ≤ m), hellinger_rare_source_sup k satisfies the m-observation multiplicative subadditivity inequality for Hellinger mutual information.

theorem hellinger_observation_factor_admissible (m : ℕ) (hm : 2 ≤ m) :
    hellinger_observation_factor m (⨆ (k : ℕ) (_ : 2 ≤ k ∧ k ≤ m), hellinger_rare_source_sup k)
hellinger_observation_factor_ge_rare_source_supIn LeanInformation Theory & Coding

Any k-observation multiplicative factor C for Hellinger mutual information with 2 <= k is lower bounded by hellinger_rare_source_sup k, the supremum of the rare-source ratio over u in Set.Ico 0 1.

theorem hellinger_observation_factor_ge_rare_source_sup (k : ℕ) (hk : 2 ≤ k) {C : ℝ}
    (hC : hellinger_observation_factor k C) :
    hellinger_rare_source_sup k ≤ C
hellinger_observation_factor_monoIn LeanInformation Theory & Coding

An m-observation multiplicative subadditivity factor C for Hellinger mutual information is also a valid k-observation factor for any k <= m, obtained by padding with m - k independent uninformative singleton observations.

theorem hellinger_observation_factor_mono {m k : ℕ} (hmk : k ≤ m) {C : ℝ}
    (hC : hellinger_observation_factor m C) :
    hellinger_observation_factor k C
hellinger_observation_factor_sharpIn LeanInformation Theory & Coding

For any natural number m >= 2 and any real factor C satisfying hellinger_observation_factor m C, C is lower bounded by the supremum over 2 <= k <= m of hellinger_rare_source_sup k.

theorem hellinger_observation_factor_sharp (m : ℕ) (hm : 2 ≤ m) (C : ℝ)
    (hC : hellinger_observation_factor m C) :
    (⨆ (k : ℕ) (_ : 2 ≤ k ∧ k ≤ m), hellinger_rare_source_sup k) ≤ C
hellinger_observation_factor_sharp_of_pointwiseIn LeanInformation Theory & Coding

For any natural number m >= 2 and real C, if hellinger_rare_source_sup k <= C for all k with 2 <= k <= m, then the supremum of hellinger_rare_source_sup k over all 2 <= k <= m is at most C.

theorem hellinger_observation_factor_sharp_of_pointwise (m : ℕ) (hm : 2 ≤ m) (C : ℝ)
    (h_pointwise : ∀ k : ℕ, 2 ≤ k ∧ k ≤ m → hellinger_rare_source_sup k ≤ C) :
    (⨆ (k : ℕ) (_ : 2 ≤ k ∧ k ≤ m), hellinger_rare_source_sup k) ≤ C
hellinger_rare_source_ratio_two_zeroIn LeanInformation Theory & Coding

The rare-source Hellinger ratio function hellinger_rare_source_ratio 2 0 evaluates to 3/4.

theorem hellinger_rare_source_ratio_two_zero : hellinger_rare_source_ratio 2 0 = 3 / 4
hellinger_rare_source_sup_two_posIn LeanInformation Theory & Coding

The rare-source Hellinger ratio supremum for k = 2 is non-negative: 0 <= hellinger_rare_source_sup 2.

theorem hellinger_rare_source_sup_two_pos : 0 ≤ hellinger_rare_source_sup 2
is_square_path_coloring_compIn LeanInformation Theory & Coding

An injective relabelling of the alphabet preserves and reflects the property of being a proper colouring of the square of the path.

theorem is_square_path_coloring_comp {n q : ℕ} (σ : Fin q → Fin q) (hσ : Function.Injective σ)
    (y : Fin n → Fin q) :
    is_square_path_coloring (fun i => σ (y i)) ↔ is_square_path_coloring y
is_square_path_coloring_embedding_fiber_card_eqIn LeanInformation Theory & Coding

For q ≥ 3, n ≥ 2, any two proper colorings y₁ and y₂ of the square of P_n have identical embedding fiber sizes for every k: the number of transmitted words x with exactly k embeddings of y₁ equals the number of transmitted words x with exactly k embeddings of y₂.

theorem is_square_path_coloring_embedding_fiber_card_eq (q : ℕ) (hq : 3 ≤ q) (n : ℕ) (hn : 2 ≤ n)
    (y₁ y₂ : Fin n → Fin q) (hy₁ : is_square_path_coloring y₁) (hy₂ : is_square_path_coloring y₂) (k : ℕ) :
  (Finset.univ.filter (fun x : Fin (n + 2) → Fin q =>
    q_ary_subsequence_num_embeddings q n (n + 2) y₁ x = k)).card =
  (Finset.univ.filter (fun x : Fin (n + 2) → Fin q =>
    q_ary_subsequence_num_embeddings q n (n + 2) y₂ x = k)).card
is_square_path_coloring_embeddings_le_fourIn LeanInformation Theory & Coding

For q ≥ 3, n ≥ 2, if y is a proper coloring of the square of P_n, then for any word x of length n + 2, the number of subsequence embeddings of y in x is at most 4.

theorem is_square_path_coloring_embeddings_le_four (q : ℕ) (hq : 3 ≤ q) (n : ℕ) (hn : 2 ≤ n)
    (y : Fin n → Fin q) (hy : is_square_path_coloring y) (x : Fin (n + 2) → Fin q) :
  q_ary_subsequence_num_embeddings q n (n + 2) y x ≤ 4
is_t_spaced_word_const_not_spacedIn LeanInformation Theory & Coding

For any t ≥ 1, n ≥ 2, and q ≥ 1, the constant zero word of length n is not t-spaced.

theorem is_t_spaced_word_const_not_spaced (t q n : ℕ) (ht : 1 ≤ t) (hn : 2 ≤ n) (hq : 1 ≤ q) :
    ¬ is_t_spaced_word t (fun (_ : Fin n) => (⟨0, hq⟩ : Fin q))
is_uniform_fhs_symbol_existsIn LeanInformation Theory & Coding

Every symbol in Fin s occurs at least once in a uniform frequency hopping sequence with frequency k ≥ 1.

theorem is_uniform_fhs_symbol_exists (k s : ℕ) (hk : 1 ≤ k) (X : Fin (k * s) → Fin s)
    (h_unif : is_uniform_fhs k s X) (f : Fin s) : ∃ j, X j = f
is_word_run_nonconstant_ne_wholeIn LeanInformation Theory & Coding

If y is a nonconstant word on Fin n and [a, b) is a run of y, then it is impossible that a = 0 and b = n.

theorem is_word_run_nonconstant_ne_whole {n : ℕ} {α : Type*} (y : Fin n → α)
    (hy : ¬ is_constant_word y) (a b : ℕ) (hr : is_word_run y a b) :
    ¬ (a = 0 ∧ b = n)
jensen_shannon_half_generator_convex_smoothIn LeanInformation Theory & Coding

The generator f_{1/2} is convex on (0, ∞), four times continuously differentiable there, and satisfies f_{1/2}(1) = 0.

theorem jensen_shannon_half_generator_convex_smooth :
    ConvexOn ℝ (Set.Ioi 0) (jensen_shannon_regularized_generator (1 / 2)) ∧
      ContDiffOn ℝ 4 (jensen_shannon_regularized_generator (1 / 2)) (Set.Ioi 0) ∧
      jensen_shannon_regularized_generator (1 / 2) 1 = 0
jensen_shannon_half_weight_closed_formIn LeanInformation Theory & Coding

For f_{1/2}(x) = f_JS(x) + (1/2) x log x and x > 0, the weight is g(x) = x² f_{1/2}''(x) = x − x²/(2(x+1)) and g'(x) = 1 − (x²+2x)/(2(x+1)²).

theorem jensen_shannon_half_weight_closed_form {x : ℝ} (hx : 0 < x) :
    subadditive_f_weight (jensen_shannon_regularized_generator (1 / 2)) x
        = x - x ^ 2 / (2 * (x + 1)) ∧
      deriv (subadditive_f_weight (jensen_shannon_regularized_generator (1 / 2))) x
        = 1 - (x ^ 2 + 2 * x) / (2 * (x + 1) ^ 2)
jensen_shannon_half_weight_deriv2_lt_zeroIn LeanInformation Theory & Coding

For all x > 0, the second derivative of the weight function g(x) = x² f_{1/2}''(x) is strictly negative.

theorem jensen_shannon_half_weight_deriv2_lt_zero {x : ℝ} (hx : 0 < x) :
    deriv (deriv (subadditive_f_weight (jensen_shannon_regularized_generator (1 / 2)))) x < 0
jensen_shannon_half_weight_deriv2_negIn LeanInformation Theory & Coding

For x > 0 the weight g(x) = x² f_{1/2}''(x) has g''(x) = −1/(x+1)³ < 0.

theorem jensen_shannon_half_weight_deriv2_neg {x : ℝ} (hx : 0 < x) :
    deriv (deriv (subadditive_f_weight (jensen_shannon_regularized_generator (1 / 2)))) x
      = -(1 / (x + 1) ^ 3)
jensen_shannon_half_weight_theorem_one_boundIn LeanInformation Theory & Coding

The weight g(x) = x² f_{1/2}''(x) satisfies the Theorem 1 inequality with η = 1/2, ℓ = 1/2: g(x) + 2(g'(x) − 1/2)²/(−g''(x)) ≤ 1 + (x−1)/2 for all x > 0.

theorem jensen_shannon_half_weight_theorem_one_bound {x : ℝ} (hx : 0 < x) :
    subadditive_f_weight (jensen_shannon_regularized_generator (1 / 2)) x +
        2 * (deriv (subadditive_f_weight (jensen_shannon_regularized_generator (1 / 2))) x - 1 / 2) ^ 2 /
          (-deriv (deriv (subadditive_f_weight (jensen_shannon_regularized_generator (1 / 2)))) x)
      ≤ 2 * (1 / 2) + (x - 1) * (1 / 2)
jensen_shannon_regularized_mfi_affineIn LeanInformation Theory & Coding

For every c and every joint law p, Ĩ_{f_c}(p) = Ĩ_{f_JS}(p) + c·Ĩ_g(p) where g(x) = x log x; in particular the subadditivity defect of f_c equals D_0 + c·D_g instancewise.

theorem jensen_shannon_regularized_mfi_affine {X Y : Type*} [Fintype X] [Fintype Y]
    (c : ℝ) (p : X → Y → ℝ) :
    mutual_f_information (jensen_shannon_regularized_generator c) p =
      mutual_f_information jensen_shannon_generator p +
        c * mutual_f_information (fun x => x * Real.log x) p
jensen_shannon_regularized_subadditive_halfIn LeanInformation Theory & Coding

At regularization parameter c = 1/2 the regularized Jensen-Shannon mutual f-information is subadditive under all finite Markov forks Y ← X → Z.

theorem jensen_shannon_regularized_subadditive_half :
    mutual_f_information_subadditive (jensen_shannon_regularized_generator (1 / 2))
jensen_shannon_regularized_subadditive_monoIn LeanInformation Theory & Coding

If the regularized Jensen-Shannon information is subadditive at parameter c, it is subadditive at every c' ≥ c (with c' assumed ≥ 0 so the KL defect is only improved).

theorem jensen_shannon_regularized_subadditive_mono (c c' : ℝ) (hcc' : c ≤ c')
    (h : mutual_f_information_subadditive (jensen_shannon_regularized_generator c)) :
    mutual_f_information_subadditive (jensen_shannon_regularized_generator c')
jensen_shannon_regularized_zero_not_subadditiveIn LeanInformation Theory & Coding

The unregularized Jensen-Shannon mutual f-information is not subadditive, so 0 is not in the subadditivity set S.

theorem jensen_shannon_regularized_zero_not_subadditive :
    ¬ mutual_f_information_subadditive (jensen_shannon_regularized_generator 0)
kl_divergence_finset_nonnegIn LeanInformation Theory & Coding

Gibbs' inequality on a finite set: for probability masses p, q on ι with p absolutely continuous w.r.t. q, Σ_i p(i) log(p(i)/q(i)) ≥ 0.

theorem kl_divergence_finset_nonneg {ι : Type*} [Fintype ι] (p q : ι → ℝ)
    (hp : ∀ i, 0 ≤ p i) (hq : ∀ i, 0 ≤ q i) (hac : ∀ i, q i = 0 → p i = 0)
    (hp1 : ∑ i, p i = 1) (hq1 : ∑ i, q i = 1) :
    0 ≤ ∑ i, p i * Real.log (p i / q i)
kl_markov_fork_defect_eq_mutual_informationIn LeanInformation Theory & Coding

For g(x) = x log x and any p_X, P_{Y|X}, P_{Z|X} (no positivity needed), the subadditivity defect of the g-information satisfies Ĩ_g(X;YZ) − Ĩ_g(X;Y) − Ĩ_g(X;Z) = − Σ_{y,z} q(y,z) log(q(y,z)/(q_Y(y) q_Z(z))) where q(y,z) = Σ_x p_X(x) P_{Y|X}(y|x) P_{Z|X}(z|x), i.e. minus the g-mutual information of the jointly induced (Y,Z) with Z = z, i.e. = −Ĩ_g(Y;Z) evaluated on the joint law q.

theorem kl_markov_fork_defect_eq_mutual_information {X Y Z : Type*} [Fintype X] [Fintype Y]
    [Fintype Z] (pX : X → ℝ) (PY : X → Y → ℝ) (PZ : X → Z → ℝ) :
    mutual_f_information (fun x => x * Real.log x)
        (fun x (yz : Y × Z) => pX x * PY x yz.1 * PZ x yz.2) -
      mutual_f_information (fun x => x * Real.log x) (fun x y => pX x * PY x y) -
      mutual_f_information (fun x => x * Real.log x) (fun x z => pX x * PZ x z) =
    - mutual_f_information (fun x => x * Real.log x)
        (fun y (z : Z) => ∑ x, pX x * PY x y * PZ x z)
majority_three_is_antipodalIn LeanInformation Theory & Coding

majority_three takes values in {-1, 1} and satisfies majority_three (not x) = - majority_three x.

theorem majority_three_is_antipodal : is_antipodal 3 majority_three
matrix_eigenvalues0_eq_of_charpoly_eqIn LeanInformation Theory & Coding

Two real symmetric matrices with the same characteristic polynomial have the same ordered eigenvalue sequence eigenvalues₀.

theorem matrix_eigenvalues0_eq_of_charpoly_eq {V : Type*} [Fintype V] [DecidableEq V]
    {A B : Matrix V V ℝ} (hA : A.IsHermitian) (hB : B.IsHermitian)
    (hc : A.charpoly = B.charpoly) : hA.eigenvalues₀ = hB.eigenvalues₀
matrix_eigenvalues0_le_of_smul_one_sub_posSemidefIn LeanInformation Theory & Coding

If A is a real symmetric matrix and c·I - A is positive semidefinite, then every ordered eigenvalue of A is at most c.

theorem matrix_eigenvalues0_le_of_smul_one_sub_posSemidef {V : Type*} [Fintype V] [DecidableEq V]
    (A : Matrix V V ℝ) (hA : A.IsHermitian) (c : ℝ)
    (h : ((c • (1 : Matrix V V ℝ)) - A).PosSemidef) (j : Fin (Fintype.card V)) :
    hA.eigenvalues₀ j ≤ c
matrix_nuclear_norm_add_leIn LeanInformation Theory & Coding

The nuclear norm is subadditive: ||A + B||_1 <= ||A||_1 + ||B||_1 for square real matrices of the same size.

theorem matrix_nuclear_norm_add_le {ι : Type*} [Fintype ι] [DecidableEq ι] (A B : Matrix ι ι ℝ) :
    matrix_nuclear_norm (A + B) ≤ matrix_nuclear_norm A + matrix_nuclear_norm B
matrix_nuclear_norm_outerIn LeanInformation Theory & Coding

The nuclear norm of the rank-one matrix a b^T is the product of the Euclidean norms of a and b: ||a b^T||_1 = ||a||_2 ||b||_2, i.e. sqrt(sum a_i^2) * sqrt(sum b_j^2).

theorem matrix_nuclear_norm_outer {ι : Type*} [Fintype ι] [DecidableEq ι] (a b : ι → ℝ) :
    matrix_nuclear_norm (Matrix.of fun i j => a i * b j) =
      Real.sqrt (∑ i, a i ^ 2) * Real.sqrt (∑ i, b i ^ 2)
min_binary_deletion_collision_two_eq_min_two_insertion_collisionIn LeanInformation Theory & Coding

For any natural number n with 2 ≤ n, min_binary_deletion_collision 2 n = min_two_insertion_collision n.

theorem min_binary_deletion_collision_two_eq_min_two_insertion_collision (n : ℕ) (hn : 2 ≤ n) :
    min_binary_deletion_collision 2 n = min_two_insertion_collision n
min_two_insertion_collision_ge_defect_envelopeIn LeanInformation Theory & Coding

For every n ≥ 5 and every binary word w of length n (given as a function on Fin (n-2+2), which is the length two_insertion_collision expects), two_insertion_collision (n-2) w ≥ two_insertion_collision_defect_envelope n. Equivalently min_two_insertion_collision n ≥ two_insertion_collision_defect_envelope n. This is the universal lower bound on the excess over n.choose 2 that any proof of the target limit needs.

theorem min_two_insertion_collision_ge_defect_envelope (n : ℕ) (hn : 5 ≤ n)
    (w : Fin (n - 2 + 2) → Bool) :
    two_insertion_collision_defect_envelope n ≤ two_insertion_collision (n - 2) w
min_two_insertion_collision_ge_of_forallIn LeanInformation Theory & Coding

For n ≥ 2, if every binary word w of length n has two_insertion_collision (n - 2) w ≥ two_insertion_collision_defect_envelope n, then min_two_insertion_collision n ≥ two_insertion_collision_defect_envelope n.

theorem min_two_insertion_collision_ge_of_forall (n : ℕ) (hn : 2 ≤ n) (h : ∀ w : Fin (n - 2 + 2) → Bool, two_insertion_collision_defect_envelope n ≤ two_insertion_collision (n - 2) w) : two_insertion_collision_defect_envelope n ≤ min_two_insertion_collision n
min_two_insertion_collision_le_defect_envelopeIn LeanInformation Theory & Coding

For every n ≥ 5 the minimum two-insertion collision sum is at most the defect envelope: min_two_insertion_collision n ≤ two_insertion_collision_defect_envelope n. This is the constructive (upper bound) half of the exact formula op_1003: the balanced block word with block length k ≤ (n-2)/3 - 1 witnesses the cost term.

theorem min_two_insertion_collision_le_defect_envelope (n : ℕ) (hn : 5 ≤ n) :
    min_two_insertion_collision n ≤ two_insertion_collision_defect_envelope n
min_two_insertion_collision_le_of_wordIn LeanInformation Theory & Coding

For any natural number n ≥ 2 and any binary word w of length n, min_two_insertion_collision n is at most two_insertion_collision (n - 2) w.

theorem min_two_insertion_collision_le_of_word (n : ℕ) (hn : 2 ≤ n) (w : Fin (n - 2 + 2) → Bool) : min_two_insertion_collision n ≤ two_insertion_collision (n - 2) w
minpoly_natDegree_ge_of_finrank_adjoin_geIn LeanInformation Theory & Coding

If k ≤ [B(x):B] then k is at most the degree of the minimal polynomial of x over B.

theorem minpoly_natDegree_ge_of_finrank_adjoin_ge
    {B M : Type*} [Field B] [Field M] [Algebra B M] {x : M} {k : ℕ}
    (h : k ≤ Module.finrank B ↥(IntermediateField.adjoin B {x})) :
    k ≤ (minpoly B x).natDegree
mutual_f_information_generator_positive_linearIn LeanInformation Theory & Coding

The mutual f-information is linear in the generator: for constants a, b and generators f, g, Ĩ_{a f + b g}(p) = a Ĩ_f(p) + b Ĩ_g(p) for every joint law p.

theorem mutual_f_information_generator_positive_linear {X Y : Type*} [Fintype X] [Fintype Y]
    (a b : ℝ) (f g : ℝ → ℝ) (p : X → Y → ℝ) :
    mutual_f_information (fun x => a * f x + b * g x) p =
      a * mutual_f_information f p + b * mutual_f_information g p
mutual_f_information_mul_log_eq_klIn LeanInformation Theory & Coding

For any joint law p, Ĩ_g(X;Y) with g(x) = x log x equals the sum Σ_{x,y} p(x,y) log(p(x,y)/(p_X(x) p_Y(y))), i.e. the KL divergence of p from the product of its marginals (with the Lean 0/0 := 0 convention).

theorem mutual_f_information_mul_log_eq_kl {X Y : Type*} [Fintype X] [Fintype Y]
    (p : X → Y → ℝ) :
    mutual_f_information (fun x => x * Real.log x) p =
      ∑ x, ∑ y, p x y * Real.log (p x y / ((∑ y', p x y') * ∑ x', p x' y))
mutual_f_information_mul_log_nonnegIn LeanInformation Theory & Coding

For g(x) = x log x and any nonnegative joint law p summing to 1, Ĩ_g(X;Y) ≥ 0.

theorem mutual_f_information_mul_log_nonneg {X Y : Type*} [Fintype X] [Fintype Y]
    (p : X → Y → ℝ) (hp : ∀ x y, 0 ≤ p x y) (hp1 : ∑ x, ∑ y, p x y = 1) :
    0 ≤ mutual_f_information (fun x => x * Real.log x) p
mutual_f_information_subadditive_full_support_of_theta_concaveIn LeanInformation Theory & Coding

For any generator f with f(1) = 0, if the conditional information functional r ↦ Θ_{p_X, P_{Y|X}}(r) is concave on the open probability simplex for all full-support priors p_X and channels P_Y, then f generates a subadditive mutual f-information on all finite full-support Markov chains Y ← X → Z.

theorem mutual_f_information_subadditive_full_support_of_theta_concave
    (f : ℝ → ℝ) (hf1 : f 1 = 0)
    (hcc : ∀ (X Y : Type) [Fintype X] [Fintype Y]
      (pX : X → ℝ) (PY : X → Y → ℝ),
      (∀ x, 0 < pX x) → (∑ x, pX x = 1) →
      (∀ x y, 0 < PY x y) → (∀ x, ∑ y, PY x y = 1) →
      ConcaveOn ℝ {r : X → ℝ | (∀ x, 0 < r x) ∧ ∑ x, r x = 1} (mutual_f_theta f pX PY)) :
    mutual_f_information_subadditive_full_support f
mutual_f_information_subadditive_mul_logIn LeanInformation Theory & Coding

The generator g(x) = x log x is subadditive: for every finite Markov fork Y ← X → Z, Ĩ_g(X;YZ) ≤ Ĩ_g(X;Y) + Ĩ_g(X;Z).

theorem mutual_f_information_subadditive_mul_log :
    mutual_f_information_subadditive (fun x => x * Real.log x)
mutual_f_information_subadditive_of_full_supportIn LeanInformation Theory & Coding

For any continuous generator f, subadditivity on all full-support finite Markov forks implies subadditivity on all finite Markov forks.

theorem mutual_f_information_subadditive_of_full_support (f : ℝ → ℝ)
    (hf : ContinuousOn f (Set.Ici 0))
    (hfs : mutual_f_information_subadditive_full_support f) :
    mutual_f_information_subadditive f
mutual_f_information_subadditive_threshold_of_closed_upsetIn LeanInformation Theory & Coding

Let S = {c ≥ 0 : Ĩ_{f_c} subadditive}. Suppose 0 ∉ S, 1/2 ∈ S, S is upward closed in c, and each per-instance defect D_c is affine in c. Then S = [c*, ∞) ∩ [0, ∞) with c* = min S ∈ (0, 1/2]: for every c ≥ 0, subadditivity at c is equivalent to c* ≤ c.

theorem mutual_f_information_subadditive_threshold_of_closed_upset
    (hzero : ¬ mutual_f_information_subadditive (jensen_shannon_regularized_generator 0))
    (hhalf : mutual_f_information_subadditive (jensen_shannon_regularized_generator (1 / 2)))
    (hup : ∀ c c' : ℝ, c ≤ c' →
      mutual_f_information_subadditive (jensen_shannon_regularized_generator c) →
        mutual_f_information_subadditive (jensen_shannon_regularized_generator c'))
    (haff : ∀ (c : ℝ) {X Y : Type} [Fintype X] [Fintype Y] (p : X → Y → ℝ),
      mutual_f_information (jensen_shannon_regularized_generator c) p =
        mutual_f_information jensen_shannon_generator p +
          c * mutual_f_information (fun x => x * Real.log x) p) :
    ∃ c_star : ℝ, 0 < c_star ∧ c_star ≤ 1 / 2 ∧
      ∀ c : ℝ, 0 ≤ c →
        (mutual_f_information_subadditive (jensen_shannon_regularized_generator c) ↔ c_star ≤ c)
mutual_f_theta_power_divergence_eq_sum_rpowIn LeanInformation Theory & Coding

For β ∈ (0,1), a full-support prior p_X with Σ p_X = 1, a full-support channel P(x,y) with unit row sums and r on the simplex, the conditional information functional Θ_{p_X,P_{Y|X}}(r) of arXiv:2610.21231 for the power-divergence generator f_β equals (Σ_y (Σ_x r_x P(x,y))^{1−β} · Σ_x p_X(x)^{1−β} P(x,y)^β r_x^β − Σ_x p_X(x)^{1−β} r_x^β) / (β(β−1)): all nested divisions by r, p_X and the conditional marginals collapse into one expression in real powers of linear forms.

theorem mutual_f_theta_power_divergence_eq_sum_rpow {X Y : Type*} [Fintype X] [Fintype Y]
    (β : ℝ) (hβ0 : 0 < β) (hβ1 : β < 1) (pX : X → ℝ) (PY : X → Y → ℝ) (r : X → ℝ)
    (hpX : ∀ x, 0 < pX x) (hpX1 : ∑ x, pX x = 1) (hPY : ∀ x y, 0 < PY x y)
    (hsY : ∀ x, ∑ y, PY x y = 1) (hr : ∀ x, 0 < r x) (hr1 : ∑ x, r x = 1) :
    mutual_f_theta (power_divergence_generator β) pX PY r =
      ((∑ y, (∑ x, r x * PY x y) ^ (1 - β) *
          (∑ x, pX x ^ (1 - β) * PY x y ^ β * r x ^ β)) -
        ∑ x, pX x ^ (1 - β) * r x ^ β) / (β * (β - 1))
mutual_power_divergence_information_eq_add_of_independent_pairIn LeanInformation Theory & Coding

For β ∈ (0,1) and full-support p_X, P(x,y), q(z), if the Markov chain Y ← X → Z has Z independent of X, i.e. the joint law is p(x,y,z) = p_X(x) P(y|x) q(z), then Ĩ_{f_β}(X;YZ) = Ĩ_{f_β}(X;Y) + Ĩ_{f_β}(X;Z), for every β ∈ (0,1). So the subadditivity inequality of the target holds with equality on every channel that does not depend on x.

theorem mutual_power_divergence_information_eq_add_of_independent_pair
    {X Y Z : Type*} [Fintype X] [Fintype Y] [Fintype Z]
    (β : ℝ) (hβ0 : 0 < β) (hβ1 : β < 1) (pX : X → ℝ) (PY : X → Y → ℝ) (q : Z → ℝ)
    (hpX : ∀ x, 0 < pX x) (hpX1 : ∑ x, pX x = 1)
    (hPY : ∀ x y, 0 < PY x y) (hsY : ∀ x, ∑ y, PY x y = 1)
    (hq : ∀ z, 0 < q z) (hq1 : ∑ z, q z = 1) :
    mutual_f_information (power_divergence_generator β)
        (fun x (yz : Y × Z) => pX x * PY x yz.1 * q yz.2) =
      mutual_f_information (power_divergence_generator β) (fun x y => pX x * PY x y) +
        mutual_f_information (power_divergence_generator β) (fun x z => pX x * q z)
nat_cast_mul_log_eq_telescopeIn LeanInformation Theory & Coding

For every natural number e, e log e is the telescoping sum over c = 2, …, e of (c log c - (c-1) log(c-1)); in particular it is a positive combination of the indicators of the events e ≥ c.

theorem nat_cast_mul_log_eq_telescope (e : ℕ) :
    (e : ℝ) * Real.log (e : ℝ) =
      ∑ c ∈ Finset.Icc 2 e,
        ((c : ℝ) * Real.log (c : ℝ) - ((c - 1 : ℕ) : ℝ) * Real.log ((c - 1 : ℕ) : ℝ))
noise_operator_coordinate_indicatorIn LeanInformation Theory & Coding

The noise operator applied to the 0/1 coordinate indicator x ↦ [x i = b] is the constant (1+ρ)/2 on the class y i = b and (1-ρ)/2 on the complementary class.

open scoped BigOperators in
theorem noise_operator_coordinate_indicator (n : ℕ) (ρ : ℝ) (i : Fin n) (b : Bool) (y : Fin n → Bool) :
    noise_operator n ρ (fun x => if x i = b then (1 : ℝ) else 0) y
      = if y i = b then (1 + ρ) / 2 else (1 - ρ) / 2
noise_operator_image_unit_intervalIn LeanInformation Theory & Coding

If f is {0,1}-valued and 0 < ρ < 1, then T_ρ f takes values in [0,1] pointwise: it is a convex combination of the values f x with the probability weights of the noisy channel.

open scoped BigOperators in
theorem noise_operator_image_unit_interval (n : ℕ) (ρ : ℝ) (hρ0 : 0 < ρ) (hρ1 : ρ < 1)
    (f : (Fin n → Bool) → ℝ) (hf : ∀ x, f x = 0 ∨ f x = 1) (y : Fin n → Bool) :
    0 ≤ noise_operator n ρ f y ∧ noise_operator n ρ f y ≤ 1
noise_operator_mean_preservedIn LeanInformation Theory & Coding

For every n, ρ and every f : {0,1}^n → ℝ, the noise operator preserves the mean over the uniform distribution: the average of T_ρ f equals the average of f. Equivalently the rows of the noisy channel form probability distributions.

open scoped BigOperators in
theorem noise_operator_mean_preserved (n : ℕ) (ρ : ℝ) (f : (Fin n → Bool) → ℝ) :
    (1 / (2 : ℝ) ^ n) * ∑ y : Fin n → Bool, noise_operator n ρ f y
      = (1 / (2 : ℝ) ^ n) * ∑ x : Fin n → Bool, f x
noise_operator_weight_factorIn LeanInformation Theory & Coding

For n, ρ and x, y : {0,1}^n, the noisy-channel weight ((1+ρ)/2)^(n - d) * ((1-ρ)/2)^d, where d = hammingDist x y, equals the product over coordinates k of (1+ρ)/2 where x k = y k and (1-ρ)/2 where x k ≠ y k.

open scoped BigOperators in
theorem noise_operator_weight_factor (n : ℕ) (ρ : ℝ) (x y : Fin n → Bool) :
    ((1 + ρ) / 2) ^ (n - hammingDist x y) * ((1 - ρ) / 2) ^ hammingDist x y
      = ∏ k : Fin n, (if x k = y k then (1 + ρ) / 2 else (1 - ρ) / 2)
noise_operator_weight_sumIn LeanInformation Theory & Coding

For n, ρ and any y : {0,1}^n, the noisy-channel transition weights sum to one over all x : {0,1}^n.

open scoped BigOperators in
theorem noise_operator_weight_sum (n : ℕ) (ρ : ℝ) (y : Fin n → Bool) :
    (∑ x : Fin n → Bool,
      ((1 + ρ) / 2) ^ (n - hammingDist x y) * ((1 - ρ) / 2) ^ hammingDist x y) = 1
nonconstant_word_exists_longest_run_and_adjacentIn LeanInformation Theory & Coding

For any nonconstant word y : Fin n → α with 2 ≤ n, there exists a longest run [a, b) of y and an adjacent run [a', b') of y (b' = a or b = a') with a < n.

theorem nonconstant_word_exists_longest_run_and_adjacent {n : ℕ} {α : Type*} (y : Fin n → α)
    (hn : 2 ≤ n) (hy : ¬ is_constant_word y) :
    ∃ (a b : ℕ) (hR : is_longest_word_run y a b) (a' b' : ℕ) (hR' : is_word_run y a' b')
      (hadj : b' = a ∨ b = a'), a < n
nonconstant_word_run_exists_adjacentIn LeanInformation Theory & Coding

For a nonconstant word y : Fin n → α, any run [a, b) of y has an immediately adjacent run [a', b') with b' = a or b = a'.

theorem nonconstant_word_run_exists_adjacent {n : ℕ} {α : Type*} (y : Fin n → α)
    (hy : ¬ is_constant_word y) (a b : ℕ) (hr : is_word_run y a b) :
    ∃ a' b' : ℕ, is_word_run y a' b' ∧ (b' = a ∨ b = a')
odd_majority_sign_is_antipodalIn LeanInformation Theory & Coding

For every odd n, the n-bit majority sign is antipodal: it takes values in {-1, 1} and flipping all input bits negates it.

theorem odd_majority_sign_is_antipodal (n : ℕ) (hn : Odd n) :
    is_antipodal n (odd_majority_sign n)
odd_majority_sign_threeIn LeanInformation Theory & Coding

At n = 3, odd_majority_sign agrees with the already-defined majority_three: both are -1 exactly when at least two of the three bits are true.

theorem odd_majority_sign_three : odd_majority_sign 3 = majority_three
op_1359_lower_bound_ratio_tendstoIn LeanInformation Theory & Coding

For any real constant C, (2√2·n^(3/2) - C·n) / n^(3/2) tends to 2√2 as n tends to infinity.

theorem op_1359_lower_bound_ratio_tendsto (C : ℝ) :
    Filter.Tendsto
      (fun n : ℕ =>
        (2 * Real.sqrt 2 * (n : ℝ) ^ ((3 : ℝ) / 2) - C * (n : ℝ)) /
        ((n : ℝ) ^ ((3 : ℝ) / 2)))
      Filter.atTop
      (nhds (2 * Real.sqrt 2))
op_1359_min_excess_lower_boundIn LeanInformation Theory & Coding

For any alphabet size q ≥ 2, there is a constant C such that for all large n, the minimum q-ary q-deletion excess is at least 2√2·n^(3/2) - C·n.

theorem op_1359_min_excess_lower_bound (q : ℕ) (hq : 2 ≤ q) :
    ∃ C : ℝ, ∀ᶠ (n : ℕ) in Filter.atTop,
      2 * Real.sqrt 2 * (n : ℝ) ^ ((3 : ℝ) / 2) - C * (n : ℝ) ≤
        ((min_q_ary_deletion_collision q q n : ℝ) - (Nat.choose n q : ℝ))
op_1359_min_le_defect_wordIn LeanInformation Theory & Coding

For all q ≥ 2 and n, the minimum q-ary q-deletion collision sum on length n is bounded above by the deletion collision sum of the explicit defect word.

theorem op_1359_min_le_defect_word (q : ℕ) (hq : 2 ≤ q) (n : ℕ) :
    min_q_ary_deletion_collision q q n ≤
      qary_deletion_collision q q n (qary_defect_word q (qary_defect_block_size 0 n) n hq)
op_1534_hinge_equality_iff_constant_wordIn LeanInformation Theory & Coding

For t ≥ 1, q ≥ 2, n ≥ 1, the t-deletion hinge of y equals that of the all-zero word at every threshold r ≥ 1 if and only if y is constant.

theorem op_1534_hinge_equality_iff_constant_word (t : ℕ) (ht : 1 ≤ t) (q : ℕ) (hq : 2 ≤ q) (n : ℕ) (hn : 1 ≤ n) (y : Fin n → Fin q) : ((∀ r : ℕ, 1 ≤ r → qary_multiple_deletion_hinge t q n r y = qary_multiple_deletion_hinge t q n r (qary_all_zero_word q n (by omega))) ↔ is_constant_word y)
op_1534_hinge_le_zero_wordIn LeanInformation Theory & Coding

For t ≥ 1, q ≥ 2, n ≥ 1 and any q-ary word y of length n, at every threshold r ≥ 1 the t-deletion hinge of y is at most that of the all-zero word. This is open; the t = 1 instance is qary_multiple_deletion_hinge_one_le.

theorem op_1534_hinge_le_zero_word (t : ℕ) (ht : 1 ≤ t) (q : ℕ) (hq : 2 ≤ q) (n : ℕ) (hn : 1 ≤ n) (y : Fin n → Fin q) : ∀ r : ℕ, 1 ≤ r → qary_multiple_deletion_hinge t q n r y ≤ qary_multiple_deletion_hinge t q n r (qary_all_zero_word q n (by omega))
op_1537_one_deletion_run_absorptionIn LeanInformation Theory & Coding

For any q ≥ 2, n ≥ 2, and nonconstant word y : Fin n → Fin q, absorbing an adjacent run into a longest run yields a word y' weakly dominating y in one-deletion hinge sum for all r ≥ 1, with strict inequality for some r ≥ 1.

theorem op_1537_one_deletion_run_absorption (q : ℕ) (hq : 2 ≤ q) (n : ℕ) (hn : 2 ≤ n) (y : Fin n → Fin q) (hy : ¬ is_constant_word y) :
    ∃ (a b : ℕ) (hR : is_longest_word_run y a b) (a' b' : ℕ) (hR' : is_word_run y a' b')
      (hadj : b' = a ∨ b = a') (ha : a < n),
      let y' := word_absorb_run y a' b' (y ⟨a, ha⟩);
      (∀ r : ℕ, 1 ≤ r → qary_multiple_deletion_hinge 1 q n r y ≤ qary_multiple_deletion_hinge 1 q n r y') ∧
      (∃ r : ℕ, 1 ≤ r ∧ qary_multiple_deletion_hinge 1 q n r y < qary_multiple_deletion_hinge 1 q n r y')
op_1537_run_absorption_length_twoIn LeanInformation Theory & Coding

For q ≥ 2, t ≥ 1, and any nonconstant word y : Fin 2 → Fin q, absorbing one run into its adjacent longest run produces a constant word y' that satisfies the OP-1537 hinge inequalities.

theorem op_1537_run_absorption_length_two (q : ℕ) (hq : 2 ≤ q) (t : ℕ) (ht : 1 ≤ t) (y : Fin 2 → Fin q) (hy : ¬ is_constant_word y) :
    ∃ (a b : ℕ) (hR : is_longest_word_run y a b) (a' b' : ℕ) (hR' : is_word_run y a' b')
      (hadj : b' = a ∨ b = a') (ha : a < 2),
      let y' := word_absorb_run y a' b' (y ⟨a, ha⟩);
      (∀ r : ℕ, 1 ≤ r → qary_multiple_deletion_hinge t q 2 r y ≤ qary_multiple_deletion_hinge t q 2 r y') ∧
      (∃ r : ℕ, 1 ≤ r ∧ qary_multiple_deletion_hinge t q 2 r y < qary_multiple_deletion_hinge t q 2 r y')
op_491_code_card_two_q_minus_two_neIn LeanInformation Theory & Coding

For every natural number $q \\ge 26$, the maximum size of a $q$-ary $\\{2, 4\\}$-code of length $2q - 2$ does not equal $1 + \\binom{2q - 2}{2}$, witnessed by the code construction $D_{q, 2q-2}$ of size $q(2q - 4)$ from Section 6 of arXiv:2610.30613.

theorem op_491_code_card_two_q_minus_two_ne (q : ℕ) (hq : 26 ≤ q) :
    two_four_code_max_card q (2 * q - 2) ≠ 1 + Nat.choose (2 * q - 2) 2
op_491_stabilizes_ge_two_q_plus_oneIn LeanInformation Theory & Coding

For every natural number $q \\ge 26$ and every length $n \\ge 2q + 1$, the maximum size of a $q$-ary $\\{2, 4\\}$-code of length $n$ equals $1 + \\binom{n}{2}$ (Theorem 1.1 of arXiv:2610.30613).

theorem op_491_stabilizes_ge_two_q_plus_one (q : ℕ) (hq : 26 ≤ q) (n : ℕ) (hn : 2 * q + 1 ≤ n) :
    two_four_code_max_card q n = 1 + Nat.choose n 2
polynomial_aeval_eq_zero_of_natDegree_lt_minpolyIn LeanInformation Theory & Coding

If a polynomial p over B vanishes at x in M and p.natDegree is smaller than (minpoly B x).natDegree, then p = 0.

theorem polynomial_aeval_eq_zero_of_natDegree_lt_minpoly
    {B M : Type*} [Field B] [Field M] [Algebra B M] {x : M} {p : Polynomial B}
    (hp : Polynomial.aeval x p = 0) (h : p.natDegree < (minpoly B x).natDegree) : p = 0
polynomial_finrank_degreeLEIn LeanInformation Theory & Coding

The polynomials over a field of degree at most n form a vector space of dimension n + 1.

theorem polynomial_finrank_degreeLE
    {B : Type*} [Field B] (n : ℕ) :
    Module.finrank B ↥(Polynomial.degreeLE B (n : WithBot ℕ)) = n + 1
polynomial_subspace_coprime_degree_one_of_scalar_multipleIn LeanInformation Theory & Coding

Let r ≥ 2 and let x, y have minimal polynomial degree at least 2r-1 over B. If U_r(y) = α·U_r(x) for some α ≠ 0, then there are coprime f, g in B[X] with natDegree at most 1, max of the two degrees exactly 1, g(y) ≠ 0, and x = f(y)/g(y).

open Pointwise in
theorem polynomial_subspace_coprime_degree_one_of_scalar_multiple
    {B M : Type*} [Field B] [Field M] [Algebra B M]
    {r : ℕ} (hr : 2 ≤ r) {x y : M}
    (hx : 2 * r - 1 ≤ (minpoly B x).natDegree)
    (hy : 2 * r - 1 ≤ (minpoly B y).natDegree)
    (h : ∃ α : M, α ≠ 0 ∧ polynomial_subspace B r y = α • polynomial_subspace B r x) :
    ∃ f g : Polynomial B, IsCoprime f g ∧ f.natDegree ≤ 1 ∧ g.natDegree ≤ 1 ∧
      max f.natDegree g.natDegree = 1 ∧ Polynomial.aeval y g ≠ 0 ∧
      x = Polynomial.aeval y f / Polynomial.aeval y g
polynomial_subspace_eq_degreeLE_map_aevalIn LeanInformation Theory & Coding

U_k(x) is the image of the polynomials of degree at most k-1 under evaluation at x, for k ≥ 1.

theorem polynomial_subspace_eq_degreeLE_map_aeval
    {B M : Type*} [Field B] [Field M] [Algebra B M] {k : ℕ} (hk : 1 ≤ k) (x : M) :
    polynomial_subspace B k x =
      (Polynomial.degreeLE B ((k - 1 : ℕ) : WithBot ℕ)).map (Polynomial.aeval x).toLinearMap
polynomial_subspace_finrank_eq_of_le_minpoly_natDegreeIn LeanInformation Theory & Coding

If r is at most the degree of the minimal polynomial of x over B, then the polynomial subspace U_r(x) has B-dimension exactly r.

theorem polynomial_subspace_finrank_eq_of_le_minpoly_natDegree
    {B M : Type*} [Field B] [Field M] [Algebra B M]
    {r : ℕ} {x : M} (h : r ≤ (minpoly B x).natDegree) :
    Module.finrank B ↥(polynomial_subspace B r x) = r
polynomial_subspace_finrank_inf_smul_selfIn LeanInformation Theory & Coding

If r ≥ 2 and 2r-1 is at most the degree of the minimal polynomial of x over B, then the intersection of U_r(x) with x·U_r(x) has B-dimension r-1.

open Pointwise in
theorem polynomial_subspace_finrank_inf_smul_self
    {B M : Type*} [Field B] [Field M] [Algebra B M]
    {r : ℕ} (hr : 2 ≤ r) {x : M} (hx : 2 * r - 1 ≤ (minpoly B x).natDegree) :
    Module.finrank B ↥(polynomial_subspace B r x ⊓ x • polynomial_subspace B r x) = r - 1
polynomial_subspace_fractional_linear_of_coprime_degree_oneIn LeanInformation Theory & Coding

Let f, g in B[X] be coprime with natDegree at most 1 and max of the degrees exactly 1, let g(y) ≠ 0 and x = f(y)/g(y), and suppose the minimal polynomial of x over B has degree at least 2. Then y = (a x + b)/(c x + d) for some a, b, c, d in B with ad - bc ≠ 0.

theorem polynomial_subspace_fractional_linear_of_coprime_degree_one
    {B M : Type*} [Field B] [Field M] [Algebra B M]
    {x y : M} {f g : Polynomial B}
    (hcop : IsCoprime f g) (hf : f.natDegree ≤ 1) (hg : g.natDegree ≤ 1)
    (hmax : max f.natDegree g.natDegree = 1)
    (hgy : Polynomial.aeval y g ≠ 0)
    (hxy : x = Polynomial.aeval y f / Polynomial.aeval y g)
    (hx : 2 ≤ (minpoly B x).natDegree) :
    ∃ a b c d : B, a * d - b * c ≠ 0 ∧
      y = (algebraMap B M a * x + algebraMap B M b) / (algebraMap B M c * x + algebraMap B M d)
polynomial_subspace_fractional_rep_of_scalar_multipleIn LeanInformation Theory & Coding

If r ≥ 2, 2r-1 ≤ deg minpoly x, and U_r(y) = α·U_r(x) for some α ≠ 0, then there are coprime f, g in B[X] of natDegree at most r-1 with g(y) ≠ 0 and x = f(y)/g(y).

open Pointwise in
theorem polynomial_subspace_fractional_rep_of_scalar_multiple
    {B M : Type*} [Field B] [Field M] [Algebra B M]
    {r : ℕ} (hr : 2 ≤ r) {x y : M}
    (hx : 2 * r - 1 ≤ (minpoly B x).natDegree)
    (h : ∃ α : M, α ≠ 0 ∧ polynomial_subspace B r y = α • polynomial_subspace B r x) :
    ∃ f g : Polynomial B, IsCoprime f g ∧ f.natDegree ≤ r - 1 ∧ g.natDegree ≤ r - 1 ∧
      Polynomial.aeval y g ≠ 0 ∧ x = Polynomial.aeval y f / Polynomial.aeval y g
polynomial_subspace_inf_smul_finrank_of_fractional_repIn LeanInformation Theory & Coding

Let r ≥ 2, 2r-1 ≤ deg(minpoly x), and let f ≠ 0, g be coprime polynomials over B of natDegree at most r-1 with g(x) ≠ 0. Then the B-dimension of U_r(x) ∩ (f(x)/g(x))·U_r(x) is r - max(deg f, deg g).

open Pointwise in
theorem polynomial_subspace_inf_smul_finrank_of_fractional_rep
    {B M : Type*} [Field B] [Field M] [Algebra B M]
    {r : ℕ} (hr : 2 ≤ r) {x : M} (hx : 2 * r - 1 ≤ (minpoly B x).natDegree)
    {f g : Polynomial B} (hf0 : f ≠ 0) (hcop : IsCoprime f g)
    (hf : f.natDegree ≤ r - 1) (hg : g.natDegree ≤ r - 1)
    (hgx : Polynomial.aeval x g ≠ 0) :
    Module.finrank B ↥(polynomial_subspace B r x ⊓
        (Polynomial.aeval x f / Polynomial.aeval x g) • polynomial_subspace B r x) =
      r - max f.natDegree g.natDegree
polynomial_subspace_scalar_multiple_iffIn LeanInformation Theory & Coding

Let B be a field and M an extension field. For r >= 2 and x, y in M with [B(x):B] >= 2r - 1 and [B(y):B] >= 2r - 1, the polynomial subspaces U_r(y) and U_r(x) are scalar multiples of each other if and only if y = (a x + b) / (c x + d) for some a, b, c, d in B with ad - bc != 0.

theorem polynomial_subspace_scalar_multiple_iff
    {B M : Type*} [Field B] [Field M] [Algebra B M]
    (r : ℕ) (hr : 2 ≤ r) (x y : M)
    (hx : 2 * r - 1 ≤ Module.finrank B ↥(IntermediateField.adjoin B {x}))
    (hy : 2 * r - 1 ≤ Module.finrank B ↥(IntermediateField.adjoin B {y})) :
    (∃ (α : M) (_ : α ≠ 0), polynomial_subspace B r y =
      Submodule.map (LinearMap.mulLeft B α) (polynomial_subspace B r x)) ↔
    ∃ (a b c d : B) (_ : a * d - b * c ≠ 0),
      y = (algebraMap B M a * x + algebraMap B M b) /
          (algebraMap B M c * x + algebraMap B M d)
polynomial_subspace_scalar_multiple_of_fractional_linearIn LeanInformation Theory & Coding

Let r ≥ 2 and let x, y have minimal polynomial degree at least 2r-1 over B. If y = (a x + b)/(c x + d) with ad - bc ≠ 0, then there is α ≠ 0 in M with U_r(y) = α·U_r(x).

theorem polynomial_subspace_scalar_multiple_of_fractional_linear
    {B M : Type*} [Field B] [Field M] [Algebra B M]
    {r : ℕ} (hr : 2 ≤ r) {x y : M}
    (hx : 2 * r - 1 ≤ (minpoly B x).natDegree)
    (hy : 2 * r - 1 ≤ (minpoly B y).natDegree)
    (h : ∃ a b c d : B, a * d - b * c ≠ 0 ∧
      y = (algebraMap B M a * x + algebraMap B M b) / (algebraMap B M c * x + algebraMap B M d)) :
    ∃ α : M, α ≠ 0 ∧ polynomial_subspace B r y =
      Submodule.map (LinearMap.mulLeft B α) (polynomial_subspace B r x)
power_divergence_gen_variance_concaveOn_of_golden_ratio_leIn LeanInformation Theory & Coding

For β ∈ [(√5−1)/2, 1), every full-support p_X with Σ p_X = 1 and every u : X → ℝ, the functional q ↦ Σ_x p_X(x)^{1−β} q_x^β (u_x − Σ_x' q_x' u_x')² (the generalized variance Σ_x p_X(x) g(q_x/p_X(x)) (u_x − E_q u)² with g(t) = t^β) is concave on the open probability simplex.

theorem power_divergence_gen_variance_concaveOn_of_golden_ratio_le (β : ℝ) (hβ0 : 0 < β)
    (hβ1 : β < 1) (hγ : (Real.sqrt 5 - 1) / 2 ≤ β) :
    ∀ (X : Type) [Fintype X] (pX u : X → ℝ), (∀ x, 0 < pX x) → (∑ x, pX x = 1) →
      ConcaveOn ℝ {q : X → ℝ | (∀ x, 0 < q x) ∧ ∑ x, q x = 1}
        (subadditive_gen_variance (fun t : ℝ => t ^ β) pX u)
power_divergence_generator_hasDerivAt_factsIn LeanInformation Theory & Coding

For β ∈ (0,1) and u > 0, the power-divergence generator f_β has derivative (u^{β−1} − 1)/(β−1) at u, and that derivative function has derivative u^{β−2} at u. In particular f_β'' = x^{β−2} and x² f_β'' = x^β on (0,∞).

theorem power_divergence_generator_hasDerivAt_facts (β : ℝ) (hβ0 : 0 < β) (hβ1 : β < 1)
    (u : ℝ) (hu : 0 < u) :
    HasDerivAt (power_divergence_generator β) ((u ^ (β - 1) - 1) / (β - 1)) u ∧
      HasDerivAt (fun t : ℝ => (t ^ (β - 1) - 1) / (β - 1)) (u ^ (β - 2)) u
power_divergence_subadditive_of_full_supportIn LeanInformation Theory & Coding

For the power-divergence generator f_β with β in (0, 1), subadditivity on full-support Markov chains implies subadditivity on all finite Markov chains by continuity and dense approximation.

theorem power_divergence_subadditive_of_full_support (β : ℝ) (hβ0 : 0 < β) (hβ1 : β < 1)
    (hfs : mutual_f_information_subadditive_full_support (power_divergence_generator β)) :
    mutual_f_information_subadditive (power_divergence_generator β)
power_divergence_theta_D2_eq_gen_varianceIn LeanInformation Theory & Coding

For β ∈ (0,1), full-support p_X and P, r > 0 and v with Σ v = 0, the explicit second-derivative expression D2 of Θ_{p_X,P_{Y|X}} along the direction v (obtained from the perspective computation with f_β'' = x^{β−2}) equals Σ_y Q_y · V(ry y) − V(r), where Q_y = Σ_x r_x P(x,y), ry y = (r_x P(x,y))/Q_y and V(q) = Σ_x p_X(x)^{1−β} q_x^β (u_x − Σ_x' q_x' u_x')² with u_x = v_x/r_x.

theorem power_divergence_theta_D2_eq_gen_variance {X Y : Type*} [Fintype X] [Fintype Y]
    (β : ℝ) (hβ0 : 0 < β) (hβ1 : β < 1) (pX : X → ℝ) (PY : X → Y → ℝ) (r v : X → ℝ)
    (hpX : ∀ x, 0 < pX x) (hPY : ∀ x y, 0 < PY x y) (hr : ∀ x, 0 < r x)
    (hv : ∑ x, v x = 0) :
    (∑ y, ∑ x, pX x *
        ((v x * PY x y / pX x * (∑ x', r x' * PY x' y) -
              r x * PY x y / pX x * (∑ x', v x' * PY x' y)) ^ 2 *
            (r x * PY x y / pX x / (∑ x', r x' * PY x' y)) ^ (β - 2) /
          (∑ x', r x' * PY x' y) ^ 3) -
      ∑ x, pX x * ((r x / pX x) ^ (β - 2) * (v x / pX x) * (v x / pX x))) =
      (∑ y, (∑ x, r x * PY x y) *
          subadditive_gen_variance (fun t => t ^ β) pX (fun x => v x / r x)
            (fun x => r x * PY x y / (∑ x', r x' * PY x' y))) -
        subadditive_gen_variance (fun t => t ^ β) pX (fun x => v x / r x) r
power_divergence_theta_concaveOn_of_channel_constIn LeanInformation Theory & Coding

For every β ∈ (0,1), full-support p_X with Σ p_X = 1 and q with Σ q = 1, the functional r ↦ Θ_{p_X,q}(r) of the power-divergence generator with the x-independent channel P(x,y) = q(y) is identically zero on the open simplex, hence concave there: a special case of the (open) claim that Θ is concave on the simplex when β ≥ (√5−1)/2, valid here for all β and with equality everywhere.

theorem power_divergence_theta_concaveOn_of_channel_const {X Y : Type*} [Fintype X] [Fintype Y]
    (β : ℝ) (hβ0 : 0 < β) (hβ1 : β < 1) (pX : X → ℝ) (q : Y → ℝ)
    (hpX : ∀ x, 0 < pX x) (hpX1 : ∑ x, pX x = 1) (hq : ∀ y, 0 < q y) (hq1 : ∑ y, q y = 1) :
    ConcaveOn ℝ {r : X → ℝ | (∀ x, 0 < r x) ∧ ∑ x, r x = 1}
      (mutual_f_theta (power_divergence_generator β) pX (fun _ y => q y))
power_divergence_theta_concaveOn_of_gen_variance_concaveIn LeanInformation Theory & Coding

For β ∈ (0,1), suppose that for every full-support p_X and every u the functional q ↦ Σ_x p_X(x) (q_x/p_X(x))^β (u_x − Σ_x' q_x' u_x')² is concave on the open simplex. Then for every finite full-support prior p_X and channel P_{Y|X}, the conditional information functional r ↦ Θ_{p_X,P_{Y|X}}(r) of the power-divergence generator f_β is concave on the open probability simplex.

theorem power_divergence_theta_concaveOn_of_gen_variance_concave (β : ℝ) (hβ0 : 0 < β)
    (hβ1 : β < 1)
    (hV : ∀ (X : Type) [Fintype X] (pX u : X → ℝ), (∀ x, 0 < pX x) → (∑ x, pX x = 1) →
      ConcaveOn ℝ {q : X → ℝ | (∀ x, 0 < q x) ∧ ∑ x, q x = 1}
        (subadditive_gen_variance (fun t : ℝ => t ^ β) pX u)) :
    ∀ (X Y : Type) [Fintype X] [Fintype Y] (pX : X → ℝ) (PY : X → Y → ℝ),
      (∀ x, 0 < pX x) → (∑ x, pX x = 1) → (∀ x y, 0 < PY x y) → (∀ x, ∑ y, PY x y = 1) →
      ConcaveOn ℝ {r : X → ℝ | (∀ x, 0 < r x) ∧ ∑ x, r x = 1}
        (mutual_f_theta (power_divergence_generator β) pX PY)
power_divergence_theta_concave_of_golden_ratio_leIn LeanInformation Theory & Coding

For every exponent β in [(√5 - 1)/2, 1), the functional r ↦ Θ_{p_X, P_{Y|X}}(r) for the power-divergence generator f_β is concave on the open probability simplex for all finite full-support distributions.

theorem power_divergence_theta_concave_of_golden_ratio_le (β : ℝ)
    (hβ : (Real.sqrt 5 - 1) / 2 ≤ β) (hβ1 : β < 1) :
    ∀ (X Y : Type) [Fintype X] [Fintype Y]
      (pX : X → ℝ) (PY : X → Y → ℝ),
      (∀ x, 0 < pX x) → (∑ x, pX x = 1) →
      (∀ x y, 0 < PY x y) → (∀ x, ∑ y, PY x y = 1) →
      ConcaveOn ℝ {r : X → ℝ | (∀ x, 0 < r x) ∧ ∑ x, r x = 1}
        (mutual_f_theta (power_divergence_generator β) pX PY)
prm_ghw_dimension_reduction_geNeeds helpInformation Theory & Coding

Let K be a finite field of order q, let e, m ≥ 1, 0 ≤ t ≤ m - 1. For every 1 ≤ r ≤ k_e(m - t), the r-th generalized Hamming weight of PRM_q(e, m - t) is at most the r-th generalized Hamming weight of PRM_q(e + t(q - 1), m).

theorem prm_ghw_dimension_reduction_ge (K : Type*) [Field K] [Fintype K]
    (e m t : ℕ) (he : 1 ≤ e) (hm : 1 ≤ m) (ht : t ≤ m - 1)
    (r : ℕ) (hr1 : 1 ≤ r) (hr2 : r ≤ prmDim K e (m - t)) :
    prmGHW K e (m - t) r ≤ prmGHW K (e + t * (Fintype.card K - 1)) m r
q_ary_subsequence_num_embeddings_relabelIn LeanInformation Theory & Coding

Relabelling the letters of both words of a subsequence-embedding count by one injective map does not change the count: for σ : Fin q → Fin q injective, the number of embeddings of σ ∘ u in σ ∘ w equals the number of embeddings of u in w.

theorem q_ary_subsequence_num_embeddings_relabel {q m n : ℕ} (σ : Fin q → Fin q)
    (hσ : Function.Injective σ) (u : Fin m → Fin q) (w : Fin n → Fin q) :
    q_ary_subsequence_num_embeddings q m n (fun i => σ (u i)) (fun i => σ (w i)) =
      q_ary_subsequence_num_embeddings q m n u w
q_ary_subsequence_num_embeddings_sumIn LeanInformation Theory & Coding

For a fixed word y of length n over an alphabet of size q > 0, summing the number of embeddings of y in x over all q^(n+2) words x of length n + 2 gives q^2 * C(n+2,2): each strictly monotone map Fin n → Fin (n+2) (there are C(n+2,2) of them) leaves exactly two free positions, hence q^2 words x.

theorem q_ary_subsequence_num_embeddings_sum (q n : ℕ) (hq : 0 < q) (y : Fin n → Fin q) :
    ∑ x : Fin (n + 2) → Fin q, q_ary_subsequence_num_embeddings q n (n + 2) y x =
      q ^ 2 * ((n + 2).choose 2)
qary_defect_block_size_tendstoIn LeanInformation Theory & Coding

For every defect gap d, the normalized defect block size (qary_defect_block_size d n : ℝ) / sqrt(n : ℝ) tends to sqrt(2 / (d + 1 : ℝ)) as n tends to infinity.

theorem qary_defect_block_size_tendsto (d : ℕ) :
  Filter.Tendsto
    (fun n : ℕ => (qary_defect_block_size d n : ℝ) / Real.sqrt (n : ℝ))
    Filter.atTop
    (nhds (Real.sqrt (2 / (d + 1 : ℝ))))
qary_defect_collision_excess_asymptoticIn LeanInformation Theory & Coding

For any alphabet size q ≥ 2 and deletion count k ≥ q with defect d = k - q, and any block size sequence B(n) such that B(n) / sqrt(n) tends to c > 0, the normalized excess collision count of the defect word family tends to (2/c + (d+1)c) / (d+1)!.

theorem qary_defect_collision_excess_asymptotic
  (q k : ℕ) (hq : 2 ≤ q) (hk : q ≤ k)
  (B : ℕ → ℕ) (c : ℝ) (hc : 0 < c)
  (hB : Filter.Tendsto (fun n : ℕ => (B n : ℝ) / Real.sqrt (n : ℝ)) Filter.atTop (nhds c)) :
  let d := k - q
  Filter.Tendsto
    (fun n : ℕ =>
      ((qary_deletion_collision q k n
          (qary_defect_word q (B n) n hq) : ℝ) -
        (Nat.choose n k : ℝ)) /
      ((n : ℝ) ^ ((d : ℝ) + 3 / 2)))
    Filter.atTop
    (nhds ((2 / c + (d + 1 : ℝ) * c) / ((d + 1).factorial : ℝ)))
qary_defect_seq_initialIn LeanInformation Theory & Coding

For every alphabet size q ≥ 2, defect spacing B, and index i in Fin q, the i-th symbol of qary_defect_seq q B hq equals i.

theorem qary_defect_seq_initial (q B : ℕ) (hq : 2 ≤ q) (i : Fin q) : qary_defect_seq q B hq i.1 = i
qary_deletion_collision_ge_chooseIn LeanInformation Theory & Coding

For any alphabet size q, deletion count k ≤ n, and word w of length n over Fin q, the deletion collision sum is bounded below by Nat.choose n k.

theorem qary_deletion_collision_ge_choose (q k n : ℕ) (w : Fin n → Fin q) (hkn : k ≤ n) :
  Nat.choose n k ≤ qary_deletion_collision q k n w
qary_hinge_one_threshold_cardIn LeanInformation Theory & Coding

For a single deletion and any threshold k ≥ 2, the number of words x of length n+1 embedding y at least k times equals the number of maximal runs of y of length at least k-1.

theorem qary_hinge_one_threshold_card (q n k : ℕ) (hk : 2 ≤ k) (y : Fin n → Fin q) : ((Finset.univ : Finset (Fin (n + 1) → Fin q)).filter (fun x => k ≤ q_ary_subsequence_num_embeddings q n (n + 1) y x)).card = qary_run_count_ge y (k - 1)
qary_multiple_deletion_hinge_compIn LeanInformation Theory & Coding

Relabelling the alphabet by a bijection σ : Fin q → Fin q does not change any t-deletion hinge sum.

theorem qary_multiple_deletion_hinge_comp (t q n r : ℕ) (σ : Fin q → Fin q) (hσ : Function.Bijective σ) (y : Fin n → Fin q) : qary_multiple_deletion_hinge t q n r (fun i => σ (y i)) = qary_multiple_deletion_hinge t q n r y
qary_multiple_deletion_hinge_const_eq_zero_wordIn LeanInformation Theory & Coding

Every constant word (fun _ => a) has, at every threshold r, the same t-deletion hinge sum as the all-zero word.

theorem qary_multiple_deletion_hinge_const_eq_zero_word (t q n r : ℕ) (hq : 2 ≤ q) (a : Fin q) : qary_multiple_deletion_hinge t q n r (fun _ => a) = qary_multiple_deletion_hinge t q n r (qary_all_zero_word q n (by omega))
qary_multiple_deletion_hinge_eq_sum_tail_cardIn LeanInformation Theory & Coding

The t-deletion hinge equals the sum over thresholds s = r+1, ..., C(n+t,n) of the number of words x of length n+t in which y embeds at least s times.

theorem qary_multiple_deletion_hinge_eq_sum_tail_card (t q n r : ℕ) (y : Fin n → Fin q) : qary_multiple_deletion_hinge t q n r y = ∑ s ∈ Finset.Icc (r + 1) ((n + t).choose n), ((Finset.univ : Finset (Fin (n + t) → Fin q)).filter (fun x => s ≤ q_ary_subsequence_num_embeddings q n (n + t) y x)).card
qary_multiple_deletion_hinge_one_leIn LeanInformation Theory & Coding

For a single deletion, for every q-ary word y of length n and every r ≥ 1, the one-deletion hinge of y is at most the one-deletion hinge of the all-zero word.

theorem qary_multiple_deletion_hinge_one_le (q n r : ℕ) (hq : 2 ≤ q) (hn : 1 ≤ n) (hr : 1 ≤ r) (y : Fin n → Fin q) : qary_multiple_deletion_hinge 1 q n r y ≤ qary_multiple_deletion_hinge 1 q n r (qary_all_zero_word q n (by omega))
qary_multiple_deletion_total_embeddings_eqIn LeanInformation Theory & Coding

For any q-ary word y : Fin n → Fin q, the sum over all words x : Fin (n + t) → Fin q of the number of embeddings of y into x equals (n + t).choose n * q ^ t.

theorem qary_multiple_deletion_total_embeddings_eq (t q n : ℕ) (y : Fin n → Fin q) :
    ∑ x : Fin (n + t) → Fin q, q_ary_subsequence_num_embeddings q n (n + t) y x = (n + t).choose n * q ^ t
qary_strict_mono_map_cardIn LeanInformation Theory & Coding

The number of strictly increasing maps Fin n → Fin N equals the binomial coefficient C(N, n).

theorem qary_strict_mono_map_card (n N : ℕ) : ((Finset.univ : Finset (Fin n → Fin N)).filter (fun f => StrictMono f)).card = N.choose n
qary_subsequence_num_embeddings_lt_choose_of_not_constantIn LeanInformation Theory & Coding

For t ≥ 1 and a non-constant word y, no word x of length n+t embeds y the maximum possible number C(n+t,n) of times.

theorem qary_subsequence_num_embeddings_lt_choose_of_not_constant (t q n : ℕ) (ht : 1 ≤ t) (hq : 1 ≤ q) (y : Fin n → Fin q) (hy : ¬ is_constant_word y) (x : Fin (n + t) → Fin q) : q_ary_subsequence_num_embeddings q n (n + t) y x < (n + t).choose n
qary_two_deletion_coloring_embeddings_le_fourIn LeanInformation Theory & Coding

If z is a proper colouring of the square of the path, then every q-ary word x of length n + 2 has at most 4 embeddings of z as a subsequence.

theorem qary_two_deletion_coloring_embeddings_le_four {q n : ℕ} (z : Fin n → Fin q)
    (hz : is_square_path_coloring z) (x : Fin (n + 2) → Fin q) :
    q_ary_subsequence_num_embeddings q n (n + 2) z x ≤ 4
qary_two_deletion_embeddings_sumIn LeanInformation Theory & Coding

For any q, n, and any received word y of length n, the sum over all words x of length n + 2 of the number of embeddings of y in x equals q^2 * binom(n + 2, 2).

theorem qary_two_deletion_embeddings_sum (q n : ℕ) (y : Fin n → Fin q) :
  ∑ x : Fin (n + 2) → Fin q, q_ary_subsequence_num_embeddings q n (n + 2) y x =
    q ^ 2 * (n + 2).choose 2
qary_two_deletion_hinge_shift_gap_expansionIn LeanInformation Theory & Coding

For every q-ary word y of length n and every word x of length n + 2, the number of embeddings of y in x equals the number of pairs 0 ≤ p ≤ m ≤ n of gap positions such that x agrees with y shifted by 0 below position p, by 1 on the block from p + 1 to m, and by 2 from m + 2 on; position p and position m + 1 of x are the two free (deleted-and-reinserted) positions.

theorem qary_two_deletion_hinge_shift_gap_expansion
    (q n : ℕ) (y : Fin n → Fin q) (x : Fin (n + 2) → Fin q) :
    q_ary_subsequence_num_embeddings q n (n + 2) y x =
      ((Finset.univ : Finset (Fin (n + 1) × Fin (n + 1))).filter (fun pm =>
          pm.1.val ≤ pm.2.val ∧
          (∀ i : Fin n, i.val < pm.1.val → x ⟨i.val, by have := i.isLt; omega⟩ = y i) ∧
          (∀ i : Fin n, pm.1.val ≤ i.val → i.val < pm.2.val →
            x ⟨i.val + 1, by have := i.isLt; have := pm.2.isLt; omega⟩ = y i) ∧
          (∀ i : Fin n, pm.2.val ≤ i.val →
            x ⟨i.val + 2, by have := i.isLt; have := pm.2.isLt; omega⟩ = y i))).card
qary_two_deletion_hinge_ternary_two_sampleIn LeanInformation Theory & Coding

For the ternary word y = ![0, 1] of length 2, the two-deletion hinge sum qary_two_deletion_hinge 3 2 2 y equals 5 and qary_two_deletion_hinge 3 2 3 y equals 1.

theorem qary_two_deletion_hinge_ternary_two_sample :
    qary_two_deletion_hinge 3 2 2 ![(0 : Fin 3), 1] = 5 ∧
    qary_two_deletion_hinge 3 2 3 ![(0 : Fin 3), 1] = 1
qary_two_deletion_hinge_three_eq_imp_square_path_coloringIn LeanInformation Theory & Coding

For q ≥ 3 and n ≥ 2, if the two-deletion hinge of y at r = 3 equals Nat.choose n 2, then y is a proper colouring of the square of the path. Equivalently, a word with y i = y j for some j = i+1 or j = i+2 has hinge at r = 3 strictly bigger than Nat.choose n 2.

theorem qary_two_deletion_hinge_three_eq_imp_square_path_coloring
    (q : ℕ) (hq : 3 ≤ q) (n : ℕ) (hn : 2 ≤ n) (y : Fin n → Fin q)
    (h : qary_two_deletion_hinge q n 3 y = Nat.choose n 2) :
    is_square_path_coloring y
qary_two_deletion_hinge_three_ge_threshold_four_cardIn LeanInformation Theory & Coding

For every q-ary word y of length n, the number of words x of length n + 2 with at least four embeddings of y is at most the two-deletion hinge of y at r = 3.

theorem qary_two_deletion_hinge_three_ge_threshold_four_card (q n : ℕ) (y : Fin n → Fin q) :
    ((Finset.univ : Finset (Fin (n + 2) → Fin q)).filter (fun x =>
        4 ≤ q_ary_subsequence_num_embeddings q n (n + 2) y x)).card ≤
      qary_two_deletion_hinge q n 3 y
qary_two_deletion_hinge_three_lower_boundIn LeanInformation Theory & Coding

For q ≥ 3 and n ≥ 2, every q-ary word y of length n satisfies qary_two_deletion_hinge q n 3 y ≥ Nat.choose n 2.

theorem qary_two_deletion_hinge_three_lower_bound
    (q : ℕ) (hq : 3 ≤ q) (n : ℕ) (hn : 2 ≤ n) (y : Fin n → Fin q) :
    Nat.choose n 2 ≤ qary_two_deletion_hinge q n 3 y
qary_two_deletion_hinge_two_eq_three_add_threshold_three_cardIn LeanInformation Theory & Coding

For every q-ary word y of length n, the two-deletion hinge at r = 2 equals the hinge at r = 3 plus the number of words x of length n + 2 that embed y at least three times.

theorem qary_two_deletion_hinge_two_eq_three_add_threshold_three_card (q n : ℕ) (y : Fin n → Fin q) :
    qary_two_deletion_hinge q n 2 y = qary_two_deletion_hinge q n 3 y +
      ((Finset.univ : Finset (Fin (n + 2) → Fin q)).filter (fun x =>
        3 ≤ q_ary_subsequence_num_embeddings q n (n + 2) y x)).card
qary_two_deletion_hinge_two_lower_boundIn LeanInformation Theory & Coding

For q ≥ 3 and n ≥ 2, every q-ary word y of length n satisfies qary_two_deletion_hinge q n 2 y ≥ n^2 + n - 1.

theorem qary_two_deletion_hinge_two_lower_bound
    (q : ℕ) (hq : 3 ≤ q) (n : ℕ) (hn : 2 ≤ n) (y : Fin n → Fin q) :
    n ^ 2 + n - 1 ≤ qary_two_deletion_hinge q n 2 y
qary_two_deletion_noncoloring_embedding_ge_twoIn LeanInformation Theory & Coding

If y is not a proper colouring of the square of the path, say y i = y j with j = i+1 or j = i+2, then some word x of length n + 2 has at least two embeddings of y that agree in a way impossible for a colouring: concretely, x = y with the letter at i and at j duplicated... (deliberately stated as a two-element 'collision witness').

theorem qary_two_deletion_noncoloring_embedding_ge_two {q n : ℕ} (hn : 2 ≤ n)
    (y : Fin n → Fin q) (hy : ¬ is_square_path_coloring y) :
    ∃ x : Fin (n + 2) → Fin q, 2 ≤ q_ary_subsequence_num_embeddings q n (n + 2) y x
qary_two_deletion_noncoloring_entropy_ltIn LeanInformation Theory & Coding

Let q ≥ 3, n ≥ 2. If y is not a proper colouring of the square of the path of length n and z is one, then the two-deletion posterior entropy of y is strictly smaller than that of z.

theorem qary_two_deletion_noncoloring_entropy_lt (q : ℕ) (hq : 3 ≤ q) (n : ℕ) (hn : 2 ≤ n)
    {y z : Fin n → Fin q} (hy : ¬ is_square_path_coloring y) (hz : is_square_path_coloring z) :
    shannon_entropy (qary_two_deletion_posterior q n y) <
      shannon_entropy (qary_two_deletion_posterior q n z)
qary_two_deletion_posterior_sum_eq_oneIn LeanInformation Theory & Coding

For q > 0 and every q-ary word y of length n the two-deletion posterior is an honest probability distribution on the q^(n+2) words of length n + 2: the embedding numbers sum to q^2 * C(n+2,2), so the normalised posterior sums to 1.

theorem qary_two_deletion_posterior_sum_eq_one (q n : ℕ) (hq : 0 < q) (y : Fin n → Fin q) :
    ∑ x : Fin (n + 2) → Fin q, qary_two_deletion_posterior q n y x = 1
real_defect_constant_algebraic_identityIn LeanInformation Theory & Coding

For every natural number d, (2 / sqrt(2 / (d + 1)) + (d + 1) * sqrt(2 / (d + 1))) / (d + 1)! = (2 * sqrt(2 * (d + 1))) / (d + 1)!.

theorem real_defect_constant_algebraic_identity (d : ℕ) :
  (2 / Real.sqrt (2 / (d + 1 : ℝ)) + (d + 1 : ℝ) * Real.sqrt (2 / (d + 1 : ℝ))) / ((d + 1).factorial : ℝ) =
  (2 * Real.sqrt (2 * (d + 1 : ℝ))) / ((d + 1).factorial : ℝ)
real_symmetric_zmatrix_row_sum_nonneg_posSemidefIn LeanInformation Theory & Coding

A real symmetric Z-matrix (nonnegative diagonal, nonpositive off-diagonal entries) all of whose row sums are nonnegative is positive semidefinite.

theorem real_symmetric_zmatrix_row_sum_nonneg_posSemidef {V : Type*} [Fintype V] [DecidableEq V]
    (Z : Matrix V V ℝ) (hZsym : Z.IsSymm)
    (hdiag : ∀ i, 0 ≤ Z i i) (hoff : ∀ i j, i ≠ j → Z i j ≤ 0)
    (hrow : ∀ i, 0 ≤ Z.mulVec (fun _ => (1 : ℝ)) i) :
    Z.PosSemidef
rs_cube_image_cardIn LeanInformation Theory & Coding

For prime p ≡ 2 (mod 3) and ζ of order t, the set A_a = {(u+a)^3 - a^3 : u ∈ H} has cardinality t.

theorem rs_cube_image_card (p t : ℕ) [Fact (Nat.Prime p)] {ζ : ZMod p} (ht : 0 < t)
    (hζ : ζ ^ t = 1) (hζ' : ∀ i, 0 < i → i < t → ζ ^ i ≠ 1) (hp3 : p % 3 = 2) (a : ZMod p) :
    (Finset.image (fun u => (u + a) ^ 3 - a ^ 3) (Finset.image (fun i => ζ ^ i) (Finset.range t))).card = t
rs_cube_injective_zmodIn LeanInformation Theory & Coding

For a prime p ≡ 2 (mod 3), the cube map x ↦ x^3 is injective on ZMod p.

theorem rs_cube_injective_zmod (p : ℕ) [Fact (Nat.Prime p)] (hp3 : p % 3 = 2) :
    Function.Injective (fun x : ZMod p => x ^ 3)
rs_cube_poly_hammingDistIn LeanInformation Theory & Coding

For prime p ≡ 2 (mod 3) and ζ of order t, with g_a(X) = X^t - ∏_{u∈H}(X - ((u+a)^3 - a^3)) and y(x) = x^t, the codeword x ↦ eval x g_a is at Hamming distance p - t from y.

theorem rs_cube_poly_hammingDist (p t : ℕ) [Fact (Nat.Prime p)] {ζ : ZMod p} (ht : 0 < t)
    (hζ : ζ ^ t = 1) (hζ' : ∀ i, 0 < i → i < t → ζ ^ i ≠ 1) (hp3 : p % 3 = 2) (a : ZMod p) :
    hammingDist (fun x : ZMod p => Polynomial.eval x (Polynomial.X ^ t - ∏ u ∈ Finset.image (fun i => ζ ^ i) (Finset.range t),
        (Polynomial.X - Polynomial.C ((u + a) ^ 3 - a ^ 3)))) (fun x : ZMod p => x ^ t) = p - t
rs_cube_poly_injectiveIn LeanInformation Theory & Coding

For t ≡ 2 (mod 3), t ≥ 3, and ζ of order t, the map a ↦ ∏_{u∈H}(X - ((u+a)^3 - a^3)) is injective.

theorem rs_cube_poly_injective (p t : ℕ) [Fact (Nat.Prime p)] {ζ : ZMod p} (ht : 3 ≤ t)
    (h3 : t % 3 = 2) (hζ : ζ ^ t = 1) (hζ' : ∀ i, 0 < i → i < t → ζ ^ i ≠ 1) :
    Function.Injective (fun a : ZMod p =>
      ∏ u ∈ Finset.image (fun i => ζ ^ i) (Finset.range t), (Polynomial.X - Polynomial.C ((u + a) ^ 3 - a ^ 3)))
rs_cube_poly_natDegree_ltIn LeanInformation Theory & Coding

For t ≡ 2 (mod 3), t ≥ 3, and ζ of order t, the polynomial X^t - ∏_{u∈H}(X - ((u+a)^3 - a^3)) has natDegree strictly less than t - (t-2)/3.

theorem rs_cube_poly_natDegree_lt (p t : ℕ) [Fact (Nat.Prime p)] {ζ : ZMod p} (ht : 3 ≤ t)
    (h3 : t % 3 = 2) (hζ : ζ ^ t = 1) (hζ' : ∀ i, 0 < i → i < t → ζ ^ i ≠ 1) (a : ZMod p) :
    (Polynomial.X ^ t - ∏ u ∈ Finset.image (fun i => ζ ^ i) (Finset.range t),
        (Polynomial.X - Polynomial.C ((u + a) ^ 3 - a ^ 3))).natDegree < t - (t - 2) / 3
rs_cube_power_sum_topIn LeanInformation Theory & Coding

For t ≡ 2 (mod 3) and t ≥ 3, the ((t-2)/3 + 1)-th power sum of A_a equals t·(t+1)·a.

theorem rs_cube_power_sum_top (p t : ℕ) [Fact (Nat.Prime p)] {ζ : ZMod p} (ht : 3 ≤ t)
    (h3 : t % 3 = 2) (hζ : ζ ^ t = 1) (hζ' : ∀ i, 0 < i → i < t → ζ ^ i ≠ 1) (a : ZMod p) :
    ∑ u ∈ Finset.image (fun i => ζ ^ i) (Finset.range t), ((u + a) ^ 3 - a ^ 3) ^ ((t - 2) / 3 + 1) =
      (t : ZMod p) * ((t : ZMod p) + 1) * a
rs_cube_power_sum_zeroIn LeanInformation Theory & Coding

For 1 ≤ k ≤ (t-2)/3, the k-th power sum of A_a = {(u+a)^3 - a^3 : u ∈ H} vanishes.

theorem rs_cube_power_sum_zero (p t : ℕ) [Fact (Nat.Prime p)] {ζ : ZMod p} (ht : 3 ≤ t)
    (hζ : ζ ^ t = 1) (hζ' : ∀ i, 0 < i → i < t → ζ ^ i ≠ 1) (a : ZMod p) {k : ℕ}
    (hk : 1 ≤ k) (hkt : k ≤ (t - 2) / 3) :
    ∑ u ∈ Finset.image (fun i => ζ ^ i) (Finset.range t), ((u + a) ^ 3 - a ^ 3) ^ k = 0
rs_esymm_eq_zero_of_power_sum_zeroIn LeanInformation Theory & Coding

Over ZMod p with p prime, for a multiset s with q ≤ card s and q < p, if all power sums p_1,…,p_q vanish, then the elementary symmetric functions e_1,…,e_q vanish.

theorem rs_esymm_eq_zero_of_power_sum_zero (p : ℕ) [Fact (Nat.Prime p)] (s : Multiset (ZMod p))
    {q : ℕ} (hqs : q ≤ s.card) (hq : q < p)
    (hpower : ∀ j, 1 ≤ j → j ≤ q → (s.map (fun a => a ^ j)).sum = 0) :
    ∀ j, 1 ≤ j → j ≤ q → s.esymm j = 0
rs_exists_primitive_root_of_dvdIn LeanInformation Theory & Coding

If p is prime and t > 0 divides p-1, then ZMod p has an element ζ of multiplicative order exactly t: ζ^t = 1 and ζ^i ≠ 1 for 0 < i < t.

theorem rs_exists_primitive_root_of_dvd (p t : ℕ) [Fact (Nat.Prime p)] (ht : 0 < t) (hdvd : t ∣ p - 1) :
    ∃ ζ : ZMod p, ζ ^ t = 1 ∧ ∀ i, 0 < i → i < t → ζ ^ i ≠ 1
rs_index_arithmeticIn LeanInformation Theory & Coding

With t = (p-1)/m and the parent's hypotheses m ≥ 2, m ≡ 2 (mod 3), p prime, p ≡ 2 (mod 3), p ≡ 1 (mod m), p ≥ 3m+2: m divides p-1, t ≥ 3, t ≡ 2 (mod 3), and t - (t-2)/3 ≤ 2(p+m-1)/(3m).

theorem rs_index_arithmetic (m p : ℕ) [Fact (Nat.Prime p)] (hm : 2 ≤ m) (hm3 : m % 3 = 2)
    (hp3 : p % 3 = 2) (hpm : p % m = 1) (hp_ge : 3 * m + 2 ≤ p) :
    (p - 1) % m = 0 ∧ 3 ≤ (p - 1) / m ∧ ((p - 1) / m) % 3 = 2 ∧
    (p - 1) / m - ((p - 1) / m - 2) / 3 ≤ 2 * (p + m - 1) / (3 * m)
rs_shift_power_sumIn LeanInformation Theory & Coding

For t ≥ 2, any a, and n ≤ t+1, the shifted power sum over H = {ζ^i : i < t} equals t·a^n + [t ≤ n]·t·C(n,t)·a^(n-t).

theorem rs_shift_power_sum (p t : ℕ) [Fact (Nat.Prime p)] {ζ : ZMod p} (ht : 2 ≤ t)
    (hζ : ζ ^ t = 1) (hζ' : ∀ i, 0 < i → i < t → ζ ^ i ≠ 1) (a : ZMod p) {n : ℕ} (hn : n ≤ t + 1) :
    ∑ u ∈ Finset.image (fun i => ζ ^ i) (Finset.range t), (u + a) ^ n = (t : ZMod p) * a ^ n +
      (if t ≤ n then (t : ZMod p) * (n.choose t : ZMod p) * a ^ (n - t) else 0)
rs_subgroup_cardIn LeanInformation Theory & Coding

If ζ has order exactly t (ζ^t = 1 and ζ^i ≠ 1 for 0 < i < t), then the powers ζ^0, …, ζ^(t-1) are pairwise distinct, so the image finset {ζ^i : i < t} has cardinality t.

theorem rs_subgroup_card (p t : ℕ) [Fact (Nat.Prime p)] {ζ : ZMod p} (ht : 0 < t)
    (hζ : ζ ^ t = 1) (hζ' : ∀ i, 0 < i → i < t → ζ ^ i ≠ 1) :
    (Finset.image (fun i => ζ ^ i) (Finset.range t)).card = t
rs_subgroup_power_sumIn LeanInformation Theory & Coding

For u ranging over the subgroup H = {ζ^i : i < t} of an element ζ of order t, the k-th power sum ∑ u^k (k ≥ 1) equals t if t divides k and 0 otherwise.

theorem rs_subgroup_power_sum (p t : ℕ) [Fact (Nat.Prime p)] {ζ : ZMod p} (ht : 0 < t)
    (hζ : ζ ^ t = 1) (hζ' : ∀ i, 0 < i → i < t → ζ ^ i ≠ 1) (k : ℕ) (hk : 1 ≤ k) :
    ∑ u ∈ Finset.image (fun i => ζ ^ i) (Finset.range t), u ^ k = if t ∣ k then (t : ZMod p) else 0
scalar_quadratic_sampler_integrality_and_smoothnessIn LeanInformation Theory & Coding

Let q ≥ 3 and r ≥ 1 be integers. Let m_j = 1 + (q-1)!(12r(q-1) + j) for 0 ≤ j < q, D = ∏_{j=0}^{q-1} m_j, M = 12r(D/m_0)^2, and S = (12r-1)m_0(D/m_0)^2. For any integer t with 0 ≤ t < M, if A is in [-m_0 t, -m_0 t + S) and B is in [0, D^2) satisfying B ≡ -m_k A (mod m_k^2) for all 0 ≤ k < q, and X_j = t + A/m_j + B/m_j^2: (a) for every 0 ≤ j < q, X_j is an integer in [0, M); and (b) for every 0 ≤ j < q and every integer x with 0 ≤ x < M, the number of values of A in [-m_0 t, -m_0 t + S) yielding X_j = x is at most m_j, and m_j / S ≤ 2 / M.

open scoped Classical in
theorem scalar_quadratic_sampler_integrality_and_smoothness
    (q r : ℕ) (hq : 3 ≤ q) (hr : 1 ≤ r)
    (t : ℤ) :
    let m : ℕ → ℤ := fun j => 1 + (q - 1).factorial * (12 * r * (q - 1) + j)
    let D : ℤ := ∏ j ∈ Finset.range q, m j
    let M : ℤ := 12 * r * (D / m 0) ^ 2
    let S : ℤ := (12 * r - 1) * m 0 * (D / m 0) ^ 2
    let allowed_A : Finset ℤ := Finset.Ico (- m 0 * t) (- m 0 * t + S)
    let X : ℤ → ℤ → ℕ → ℚ := fun A B j => (t : ℚ) + (A : ℚ) / (m j : ℚ) + (B : ℚ) / ((m j : ℚ)^2)
    0 ≤ t ∧ t < M →
    (∀ (A B : ℤ), A ∈ allowed_A → 0 ≤ B → B < D^2 →
       (∀ k < q, B ≡ - m k * A [ZMOD (m k)^2]) →
       ∀ j < q, ∃ z : ℤ, X A B j = (z : ℚ) ∧ 0 ≤ z ∧ z < M) ∧
    (∀ (j : ℕ), j < q → ∀ (x : ℤ), 0 ≤ x → x < M →
       ((allowed_A.filter (fun A => ∃ B : ℤ, 0 ≤ B ∧ B < D^2 ∧
         (∀ k < q, B ≡ - m k * A [ZMOD (m k)^2]) ∧ X A B j = (x : ℚ))).card ≤ m j ∧
        (m j : ℝ) / (S : ℝ) ≤ 2 / (M : ℝ)))
scalar_sampler_fiber_boundIn LeanInformation Theory & Coding

For integers q ≥ 3, r ≥ 1, and 0 ≤ t, for any j < q and any integer x in [0, M), the number of values of A in [-m_0 t, -m_0 t + S) yielding X_j = x is at most m_j.

open scoped Classical in
theorem scalar_sampler_fiber_bound
    (q r : ℕ) (hq : 3 ≤ q) (hr : 1 ≤ r)
    (t : ℤ) (ht : 0 ≤ t) :
    let m : ℕ → ℤ := fun j => 1 + (q - 1).factorial * (12 * r * (q - 1) + j)
    let D : ℤ := ∏ j ∈ Finset.range q, m j
    let M : ℤ := 12 * r * (D / m 0) ^ 2
    let S : ℤ := (12 * r - 1) * m 0 * (D / m 0) ^ 2
    let allowed_A : Finset ℤ := Finset.Ico (- m 0 * t) (- m 0 * t + S)
    let X : ℤ → ℤ → ℕ → ℚ := fun A B j => (t : ℚ) + (A : ℚ) / (m j : ℚ) + (B : ℚ) / ((m j : ℚ)^2)
    ∀ (j : ℕ), j < q → ∀ (x : ℤ), 0 ≤ x → x < M →
      (allowed_A.filter (fun A => ∃ B : ℤ, 0 ≤ B ∧ B < D^2 ∧
        (∀ k < q, B ≡ - m k * A [ZMOD (m k)^2]) ∧ X A B j = (x : ℚ))).card ≤ m j
scalar_sampler_integrality_and_rangeIn LeanInformation Theory & Coding

For integers q ≥ 3, r ≥ 1, and 0 ≤ t < M, any A in [-m_0 t, -m_0 t + S) and B in [0, D^2) satisfying B ≡ -m_k A (mod m_k^2) for all k < q gives an integer X_j = t + A/m_j + B/m_j^2 in [0, M) for every j < q.

theorem scalar_sampler_integrality_and_range
    (q r : ℕ) (hq : 3 ≤ q) (hr : 1 ≤ r)
    (t : ℤ) :
    let m : ℕ → ℤ := fun j => 1 + (q - 1).factorial * (12 * r * (q - 1) + j)
    let D : ℤ := ∏ j ∈ Finset.range q, m j
    let M : ℤ := 12 * r * (D / m 0) ^ 2
    let S : ℤ := (12 * r - 1) * m 0 * (D / m 0) ^ 2
    let allowed_A : Finset ℤ := Finset.Ico (- m 0 * t) (- m 0 * t + S)
    let X : ℤ → ℤ → ℕ → ℚ := fun A B j => (t : ℚ) + (A : ℚ) / (m j : ℚ) + (B : ℚ) / ((m j : ℚ)^2)
    0 ≤ t → t < M →
    ∀ (A B : ℤ), A ∈ allowed_A → 0 ≤ B → B < D^2 →
      (∀ k < q, B ≡ - m k * A [ZMOD (m k)^2]) →
      ∀ j < q, ∃ z : ℤ, X A B j = (z : ℚ) ∧ 0 ≤ z ∧ z < M
shannon_entropy_le_iff_embedding_potential_geIn LeanInformation Theory & Coding

For q > 0 and words y, z of length n, the posterior entropy of y is at most that of z if and only if the embedding potential sum_x e_z(x) log e_z(x) is at most the potential of y. Hence maximising entropy is minimising the potential.

theorem shannon_entropy_le_iff_embedding_potential_ge (q n : ℕ) (hq : 0 < q)
    (y z : Fin n → Fin q) :
    shannon_entropy (qary_two_deletion_posterior q n y) ≤
        shannon_entropy (qary_two_deletion_posterior q n z) ↔
      (∑ x : Fin (n + 2) → Fin q,
          (q_ary_subsequence_num_embeddings q n (n + 2) z x : ℝ) *
            Real.log (q_ary_subsequence_num_embeddings q n (n + 2) z x : ℝ)) ≤
        ∑ x : Fin (n + 2) → Fin q,
          (q_ary_subsequence_num_embeddings q n (n + 2) y x : ℝ) *
            Real.log (q_ary_subsequence_num_embeddings q n (n + 2) y x : ℝ)
shannon_entropy_qary_two_deletion_posterior_eq_log_sub_sumIn LeanInformation Theory & Coding

With D = q^2 * C(n+2,2) and e_x the number of ways to obtain y from x by deleting two positions, the posterior entropy is H(y) = log D - (1/D) * sum_x e_x log e_x.

theorem shannon_entropy_qary_two_deletion_posterior_eq_log_sub_sum (q n : ℕ) (hq : 0 < q)
    (y : Fin n → Fin q) :
    shannon_entropy (qary_two_deletion_posterior q n y) =
      Real.log ((q : ℝ) ^ 2 * ((n + 2).choose 2 : ℝ)) -
        ((q : ℝ) ^ 2 * ((n + 2).choose 2 : ℝ))⁻¹ *
          ∑ x : Fin (n + 2) → Fin q,
            (q_ary_subsequence_num_embeddings q n (n + 2) y x : ℝ) *
              Real.log (q_ary_subsequence_num_embeddings q n (n + 2) y x : ℝ)
shannon_entropy_qary_two_deletion_posterior_eq_sum_fiberIn LeanInformation Theory & Coding

For any alphabet size q, length n, and received word y of length n, the Shannon entropy of the posterior distribution qary_two_deletion_posterior q n y equals the sum over positive embedding counts k ∈ [1, binom(n+2, 2)] of the fiber cardinality times negMulLog(k / (q^2 * binom(n+2, 2))).

theorem shannon_entropy_qary_two_deletion_posterior_eq_sum_fiber (q n : ℕ) (y : Fin n → Fin q) :
  shannon_entropy (qary_two_deletion_posterior q n y) =
    ∑ k ∈ Finset.Icc 1 ((n + 2).choose 2),
      ((Finset.univ.filter (fun x : Fin (n + 2) → Fin q =>
        q_ary_subsequence_num_embeddings q n (n + 2) y x = k)).card : ℝ) *
        Real.negMulLog ((k : ℝ) / ((q : ℝ) ^ 2 * ((n + 2).choose 2 : ℝ)))
shannon_entropy_qary_two_deletion_posterior_relabelIn LeanInformation Theory & Coding

Applying an injective relabelling σ of the alphabet to every letter of y does not change the two-deletion posterior entropy.

theorem shannon_entropy_qary_two_deletion_posterior_relabel {q n : ℕ} (σ : Fin q → Fin q)
    (hσ : Function.Injective σ) (y : Fin n → Fin q) :
    shannon_entropy (qary_two_deletion_posterior q n (fun i => σ (y i))) =
      shannon_entropy (qary_two_deletion_posterior q n y)
shannon_or_capacity_categorical_prod_lower_threeIn LeanInformation Theory & Coding

If min(C_OR G, C_OR H) = 3 then the Shannon OR-capacity of the categorical product G × H is at least 3.

theorem shannon_or_capacity_categorical_prod_lower_three {V W : Type*} [Fintype V] [Nonempty V] [Fintype W] [Nonempty W] (G : SimpleGraph V) (H : SimpleGraph W) (h : min (shannon_or_capacity G) (shannon_or_capacity H) = 3) : 3 ≤ shannon_or_capacity (simple_graph_categorical_prod G H)
shannon_or_capacity_categorical_prod_three_of_cliqueNum_threeIn LeanInformation Theory & Coding

If both factors contain a triangle, then the categorical product contains a triangle (pair the triangles coordinatewise), so its OR-capacity is at least 3.

theorem shannon_or_capacity_categorical_prod_three_of_cliqueNum_three {V W : Type*} [Fintype V] [Nonempty V] [Fintype W] [Nonempty W] (G : SimpleGraph V) (H : SimpleGraph W) (hG : 3 ≤ G.cliqueNum) (hH : 3 ≤ H.cliqueNum) : 3 ≤ shannon_or_capacity (simple_graph_categorical_prod G H)
shannon_or_capacity_extract_or_powerIn LeanInformation Theory & Coding

If C_OR(G) ≥ t then for every eps > 0 there is n ≥ 1 with (t − eps) < omega(G^{∨n})^{1/n}.

theorem shannon_or_capacity_extract_or_power {V : Type*} [Fintype V] [Nonempty V] (G : SimpleGraph V) {t eps : ℝ} (ht : t ≤ shannon_or_capacity G) (heps : 0 < eps) : ∃ n : ℕ, 1 ≤ n ∧ t - eps < ((simple_graph_or_power G n).cliqueNum : ℝ) ^ ((1 : ℝ) / ↑n)
signed_coordinate_dist_nonnegIn LeanInformation Theory & Coding

For every n and every f : {0,1}^n → ℝ, the dictator distance delta(f) is nonnegative.

open scoped BigOperators in
theorem signed_coordinate_dist_nonneg (n : ℕ) (f : (Fin n → Bool) → ℝ) :
    0 ≤ signed_coordinate_dist n f
simple_graph_or_power_cliqueNum_monoIn LeanInformation Theory & Coding

For m ≤ n, the clique number of G^{∨m} is at most the clique number of G^{∨n}.

theorem simple_graph_or_power_cliqueNum_mono {V : Type*} [Fintype V] [Nonempty V] (G : SimpleGraph V) {m n : ℕ} (hmn : m ≤ n) : (simple_graph_or_power G m).cliqueNum ≤ (simple_graph_or_power G n).cliqueNum
simple_graph_or_power_cliqueNum_mul_leIn LeanInformation Theory & Coding

Supermultiplicativity of OR-power clique numbers: concatenating a clique of G^{∨m} and a clique of G^{∨n} gives a clique of G^{∨(m+n)}.

theorem simple_graph_or_power_cliqueNum_mul_le {V : Type*} [Fintype V] (G : SimpleGraph V) (m n : ℕ) : (simple_graph_or_power G m).cliqueNum * (simple_graph_or_power G n).cliqueNum ≤ (simple_graph_or_power G (m + n)).cliqueNum
simple_graph_or_power_one_cliqueNumIn LeanInformation Theory & Coding

The first OR-power G^{∨1} has the same clique number as G.

theorem simple_graph_or_power_one_cliqueNum {V : Type*} [Fintype V] (G : SimpleGraph V) : (simple_graph_or_power G 1).cliqueNum = G.cliqueNum
single_slot_binary_linear_coding_advantageIn LeanInformation Theory & Coding

Normal form of OP-90: there exist a finite vertex set, a finite session type, a capacitated network, unicast sessions and a deterministic causal binary linear code on them with exactly one transmission slot (T = 1) whose rate, the number L of message symbols per session, is strictly greater than every rate supported by fractional multicommodity flow on the same instance. This is the residual open content after normalisation, not a step that is easier than the target: read a T-slot code on capacities c as a one-slot code on capacities T*c (T is the only place the slot count occurs, in cap_le, and flow feasibility is homogeneous of degree one in (f, r, c)), so every T-slot witness yields a one-slot witness, and conversely the target follows from this statement in one line with r := (code.L : ℝ).

theorem single_slot_binary_linear_coding_advantage :
  ∃ (V : Type) (_ : Fintype V) (_ : DecidableEq V)
    (K : Type) (_ : Fintype K) (_ : DecidableEq K)
    (net : CapacitatedNetwork V) (sess : UnicastSessions V K)
    (code : CausalLinearNetworkCode V K (ZMod 2) net sess),
    code.T = 1 ∧
    ∀ r_flow, FlowSupportsRate net sess r_flow → r_flow < (code.L : ℝ)
single_slot_witness_certificateIn LeanInformation Theory & Coding

Search target: there are a finite vertex set, a finite session type, a capacitated network, unicast sessions, a one-slot deterministic causal binary linear code on them, and a rational-valued pseudometric d on the vertices (nonnegative, symmetric, zero on the diagonal, triangle-satisfying) whose two finite sums satisfy sum_{u,v} cap{u,v} d(u,v) < 2 L sum_k d(src k, tgt k) with positive total session length, i.e. an explicit dual certificate that every fractional multicommodity flow rate on the instance is strictly below the code's message dimension L.

theorem single_slot_witness_certificate :
  ∃ (V : Type) (_ : Fintype V) (_ : DecidableEq V)
    (K : Type) (_ : Fintype K) (_ : DecidableEq K)
    (net : CapacitatedNetwork V) (sess : UnicastSessions V K)
    (code : CausalLinearNetworkCode V K (ZMod 2) net sess)
    (d : V → V → ℝ),
    code.T = 1 ∧
    (∀ u v, 0 ≤ d u v) ∧ (∀ u v, d u v = d v u) ∧ (∀ u, d u u = 0) ∧
    (∀ u v w, d u v ≤ d u w + d w v) ∧
    0 < ∑ k, d (sess.src k) (sess.tgt k) ∧
    ∑ u, ∑ v, net.cap s(u, v) * d u v <
      2 * (code.L : ℝ) * (∑ k, d (sess.src k) (sess.tgt k))
square_path_coloring_two_deletion_fiber_four_cardIn LeanInformation Theory & Coding

For q ≥ 3 and n ≥ 2, if y is a proper colouring of the square of the path then exactly Nat.choose n 2 words x of length n + 2 embed y four times, namely the words obtained from y by duplicating two of its letters.

theorem square_path_coloring_two_deletion_fiber_four_card
    (q : ℕ) (hq : 3 ≤ q) (n : ℕ) (hn : 2 ≤ n) (y : Fin n → Fin q)
    (hy : is_square_path_coloring y) :
    ((Finset.univ : Finset (Fin (n + 2) → Fin q)).filter
        (fun x => q_ary_subsequence_num_embeddings q n (n + 2) y x = 4)).card = Nat.choose n 2
square_path_coloring_two_deletion_fiber_three_cardIn LeanInformation Theory & Coding

For q ≥ 3 and n ≥ 2, if y is a proper colouring of the square of the path then exactly 2n - 1 words x of length n + 2 embed y exactly three times: the n words obtained by tripling one letter y_i and the n - 1 words obtained by repeating an adjacent pair y_i y_(i+1) immediately after itself.

theorem square_path_coloring_two_deletion_fiber_three_card
    (q : ℕ) (hq : 3 ≤ q) (n : ℕ) (hn : 2 ≤ n) (y : Fin n → Fin q)
    (hy : is_square_path_coloring y) :
    ((Finset.univ : Finset (Fin (n + 2) → Fin q)).filter
        (fun x => q_ary_subsequence_num_embeddings q n (n + 2) y x = 3)).card = 2 * n - 1
strict_majority_three_is_balancedIn LeanInformation Theory & Coding

The strict majority function on 3 Boolean inputs is a balanced Boolean indicator.

open scoped BigOperators in
theorem strict_majority_three_is_balanced :
    is_balanced_indicator 3 (fun x => if strictMajority 3 x then 1 else 0)
submodule_pointwise_smul_eq_map_mulLeftIn LeanInformation Theory & Coding

For a scalar α in the extension M and a B-subspace S of M, the pointwise multiple α • S equals the image of S under multiplication by α.

open Pointwise in
theorem submodule_pointwise_smul_eq_map_mulLeft
    {B M : Type*} [Field B] [Field M] [Algebra B M] (α : M) (S : Submodule B M) :
    α • S = Submodule.map (LinearMap.mulLeft B α) S
sum_nat_mul_log_eq_tail_sumIn LeanInformation Theory & Coding

For any finite type and any multiplicity function f, the sum of f i log f i equals the sum over c ≥ 2 of the tail weight (c log c - (c-1) log(c-1)) times the number of points with f i ≥ c.

theorem sum_nat_mul_log_eq_tail_sum {ι : Type*} [Fintype ι] (f : ι → ℕ) :
    ∑ i, (f i : ℝ) * Real.log (f i : ℝ) =
      ∑ c ∈ Finset.Icc 2 (Finset.univ.sup f),
        ((c : ℝ) * Real.log (c : ℝ) - ((c - 1 : ℕ) : ℝ) * Real.log ((c - 1 : ℕ) : ℝ)) *
          ((Finset.univ.filter (fun i => c ≤ f i)).card : ℝ)
tail_weight_posIn LeanInformation Theory & Coding

The tail weights c log c - (c-1) log(c-1) are strictly positive for every integer c ≥ 2.

theorem tail_weight_pos (c : ℕ) (hc : 2 ≤ c) :
    0 < (c : ℝ) * Real.log (c : ℝ) - ((c - 1 : ℕ) : ℝ) * Real.log ((c - 1 : ℕ) : ℝ)
three_deletion_alternating_entropy_formulaIn LeanInformation Theory & Coding

For every natural number n with 1 ≤ n, three_deletion_entropy n (alternating_word n false) = Real.logb 2 (8 * ((Nat.choose (n + 3) 3 : ℕ) : ℝ)) - three_deletion_S3 n / (8 * ((Nat.choose (n + 3) 3 : ℕ) : ℝ)).

theorem three_deletion_alternating_entropy_formula (n : ℕ) (hn : 1 ≤ n) :
    three_deletion_entropy n (alternating_word n false) =
      Real.logb 2 (8 * ((n + 3).choose 3 : ℝ)) - three_deletion_S3 n / (8 * ((n + 3).choose 3 : ℝ))
three_deletion_alternating_histogramIn LeanInformation Theory & Coding

For every n ≥ 1 and every k > 0, the number of binary words x of length n + 3 in which the alternating word alternating_word n false has exactly k embeddings is 4 * (if k = 1 then 1 else 0) + 3 * n * (if k = 2 then 1 else 0) + 2 * n * (if k = 3 then 1 else 0) + n ^ 2 * (if k = 4 then 1 else 0) + n * (n - 1) * (if k = 6 then 1 else 0) + Nat.choose n 3 * (if k = 8 then 1 else 0) + n * (if k = 2 * n then 1 else 0) + 2 * (if k = 2 * n + 1 then 1 else 0) + 2 * (if k = n + 1 then 1 else 0).

theorem three_deletion_alternating_histogram (n : ℕ) (hn : 1 ≤ n) (k : ℕ) (hk : 0 < k) :
    (Finset.univ.filter (fun x : Fin (n + 3) → Bool => three_deletion_num_embeddings n (alternating_word n false) x = k)).card =
      4 * (if k = 1 then 1 else 0) +
      3 * n * (if k = 2 then 1 else 0) +
      2 * n * (if k = 3 then 1 else 0) +
      n ^ 2 * (if k = 4 then 1 else 0) +
      n * (n - 1) * (if k = 6 then 1 else 0) +
      n.choose 3 * (if k = 8 then 1 else 0) +
      n * (if k = 2 * n then 1 else 0) +
      2 * (if k = 2 * n + 1 then 1 else 0) +
      2 * (if k = n + 1 then 1 else 0)
three_deletion_alternating_histogram_and_entropyIn LeanInformation Theory & Coding

For every natural number n with 1 ≤ n, the alternating word alternating_word n false satisfies: (1) for every natural number k with 0 < k, the cardinality of (Finset.univ.filter (fun x : Fin (n + 3) → Bool => three_deletion_num_embeddings n (alternating_word n false) x = k)) equals 4 * (if k = 1 then 1 else 0) + 3 * n * (if k = 2 then 1 else 0) + 2 * n * (if k = 3 then 1 else 0) + n ^ 2 * (if k = 4 then 1 else 0) + n * (n - 1) * (if k = 6 then 1 else 0) + Nat.choose n 3 * (if k = 8 then 1 else 0) + n * (if k = 2 * n then 1 else 0) + 2 * (if k = 2 * n + 1 then 1 else 0) + 2 * (if k = n + 1 then 1 else 0); and (2) three_deletion_entropy n (alternating_word n false) = Real.logb 2 (8 * ((Nat.choose (n + 3) 3 : ℕ) : ℝ)) - three_deletion_S3 n / (8 * ((Nat.choose (n + 3) 3 : ℕ) : ℝ)).

theorem three_deletion_alternating_histogram_and_entropy (n : ℕ) (hn : 1 ≤ n) :
    (∀ k : ℕ, 0 < k → (Finset.univ.filter (fun x : Fin (n + 3) → Bool => three_deletion_num_embeddings n (alternating_word n false) x = k)).card =
      4 * (if k = 1 then 1 else 0) +
      3 * n * (if k = 2 then 1 else 0) +
      2 * n * (if k = 3 then 1 else 0) +
      n ^ 2 * (if k = 4 then 1 else 0) +
      n * (n - 1) * (if k = 6 then 1 else 0) +
      n.choose 3 * (if k = 8 then 1 else 0) +
      n * (if k = 2 * n then 1 else 0) +
      2 * (if k = 2 * n + 1 then 1 else 0) +
      2 * (if k = n + 1 then 1 else 0)) ∧
    three_deletion_entropy n (alternating_word n false) =
      Real.logb 2 (8 * ((n + 3).choose 3 : ℝ)) - three_deletion_S3 n / (8 * ((n + 3).choose 3 : ℝ))
tsallis_seven_eighths_sharp_stability_bound_c3_regimeIn LeanInformation Theory & Coding

For 0 < rho < 1 with C_3(rho) <= C_G(rho), natural number n >= 1, and balanced Boolean indicator f, the order-7/8 stability excess is at least C_3(rho) times the dictator distance delta(f).

open scoped BigOperators in
theorem tsallis_seven_eighths_sharp_stability_bound_c3_regime
    (ρ : ℝ) (hρ0 : 0 < ρ) (hρ1 : ρ < 1)
    (hreg : tsallis_c3 ρ ≤ tsallis_cG ρ)
    (n : ℕ) (hn : 0 < n) (f : (Fin n → Bool) → ℝ)
    (hf : is_balanced_indicator n f) :
    ((1 / (2 : ℝ) ^ n) * ∑ x : Fin n → Bool, (noise_operator n ρ f x) ^ (7 / 8 : ℝ)) - tsallis_h (7 / 8) ρ ≥
      tsallis_c3 ρ * signed_coordinate_dist n f
tsallis_seven_eighths_sharp_stability_bound_cG_regimeIn LeanInformation Theory & Coding

For 0 < rho < 1 with C_G(rho) <= C_3(rho), natural number n >= 1, and balanced Boolean indicator f, the order-7/8 stability excess is at least C_G(rho) times the dictator distance delta(f).

open scoped BigOperators in
theorem tsallis_seven_eighths_sharp_stability_bound_cG_regime
    (ρ : ℝ) (hρ0 : 0 < ρ) (hρ1 : ρ < 1)
    (hreg : tsallis_cG ρ ≤ tsallis_c3 ρ)
    (n : ℕ) (hn : 0 < n) (f : (Fin n → Bool) → ℝ)
    (hf : is_balanced_indicator n f) :
    ((1 / (2 : ℝ) ^ n) * ∑ x : Fin n → Bool, (noise_operator n ρ f x) ^ (7 / 8 : ℝ)) - tsallis_h (7 / 8) ρ ≥
      tsallis_cG ρ * signed_coordinate_dist n f
tsallis_seven_eighths_target_n_oneIn LeanInformation Theory & Coding

The target inequality in the smallest dimension n = 1: every balanced {0,1}-valued f on {0,1}^1 is a coordinate indicator, hence signed_coordinate_dist 1 f = 0, and the inequality reduces to the nonnegativity of the excess.

open scoped BigOperators in
theorem tsallis_seven_eighths_target_n_one (ρ : ℝ) (hρ0 : 0 < ρ) (hρ1 : ρ < 1)
    (f : (Fin 1 → Bool) → ℝ) (hf : is_balanced_indicator 1 f) :
    ((1 / (2 : ℝ) ^ 1) * ∑ y : Fin 1 → Bool, (noise_operator 1 ρ f y) ^ (7 / 8 : ℝ)) -
        tsallis_h (7 / 8) ρ ≥
      min (tsallis_c3 ρ) (tsallis_cG ρ) * signed_coordinate_dist 1 f
tsallis_stability_excess_nonnegIn LeanInformation Theory & Coding

Majority-is-stablest baseline at order 7/8: for every balanced {0,1}-valued f on {0,1}^n and 0 < ρ < 1, the concave stability functional dominates h, i.e. E[(T_ρ f)^(7/8)] ≥ h(7/8, ρ). This is the constant term of the target's linear refinement, obtained from Jensen plus the concavity of t ↦ t^(7/8).

open scoped BigOperators in
theorem tsallis_stability_excess_nonneg (n : ℕ) (ρ : ℝ) (hρ0 : 0 < ρ) (hρ1 : ρ < 1) (hn : 0 < n)
    (f : (Fin n → Bool) → ℝ) (hf : is_balanced_indicator n f) :
    0 ≤ ((1 / (2 : ℝ) ^ n) * ∑ x : Fin n → Bool, (noise_operator n ρ f x) ^ (7 / 8 : ℝ)) - tsallis_h (7 / 8) ρ
two_deletion_exists_moment_lt_alternating_momentIn LeanInformation Theory & Coding

For every real order α > 1, there exist a natural number n ≥ 2 and a word w : Fin n → Bool such that the α-moment of the two-deletion embedding counts of w is strictly positive and strictly less than that of alternating_word n false.

theorem two_deletion_exists_moment_lt_alternating_moment (α : ℝ) (hα : 1 < α) : ∃ (n : ℕ) (hn : 2 ≤ n) (w : Fin n → Bool), (0 < ∑ y : Fin (n + 2) → Bool, ((two_deletion_num_embeddings n w y : ℝ)) ^ α) ∧ (∑ y : Fin (n + 2) → Bool, ((two_deletion_num_embeddings n w y : ℝ)) ^ α) < (∑ y : Fin (n + 2) → Bool, ((two_deletion_num_embeddings n (alternating_word n false) y : ℝ)) ^ α)
two_deletion_hinge_values_of_embedding_fibers_le_fourIn LeanInformation Theory & Coding

For q ≥ 3 and n ≥ 2, let y be a q-ary word of length n all of whose embedding counts e(y,x) are at most 4, with exactly Nat.choose n 2 words x having four embeddings and exactly 2n - 1 having three. Then qary_two_deletion_hinge q n 2 y = n^2 + n - 1 and qary_two_deletion_hinge q n 3 y = Nat.choose n 2.

theorem two_deletion_hinge_values_of_embedding_fibers_le_four
    (q : ℕ) (n : ℕ) (y : Fin n → Fin q) (hn : 2 ≤ n)
    (hle : ∀ x : Fin (n + 2) → Fin q, q_ary_subsequence_num_embeddings q n (n + 2) y x ≤ 4)
    (hfour : ((Finset.univ : Finset (Fin (n + 2) → Fin q)).filter
        (fun x => q_ary_subsequence_num_embeddings q n (n + 2) y x = 4)).card = Nat.choose n 2)
    (hthree : ((Finset.univ : Finset (Fin (n + 2) → Fin q)).filter
        (fun x => q_ary_subsequence_num_embeddings q n (n + 2) y x = 3)).card = 2 * n - 1) :
    qary_two_deletion_hinge q n 2 y = n ^ 2 + n - 1 ∧
      qary_two_deletion_hinge q n 3 y = Nat.choose n 2
two_deletion_num_embeddings_alternating_complementIn LeanInformation Theory & Coding

Complementing the transmitted word swaps the two alternating received words: for every y of length n + 2, the number of embeddings of the alternating word starting with true in y equals the number of embeddings of the alternating word starting with false in the bitwise complement of y.

theorem two_deletion_num_embeddings_alternating_complement (n : ℕ) (y : Fin (n + 2) → Bool) : two_deletion_num_embeddings n (alternating_word n true) y = two_deletion_num_embeddings n (alternating_word n false) (fun i => !(y i))
two_deletion_num_embeddings_alternating_histogramIn LeanInformation Theory & Coding

Closed form for the two-deletion embedding histogram of the alternating word: for n ≥ 2 and every k, the number of words y of length n + 2 in which the alternating word starting with false has exactly k embeddings is 3·[k=1] + 2n·[k=2] + n·[k=3] + C(n,2)·[k=4] + [k=n+1]. (The indicators are added, not case-split: the k=3 and k=n+1 terms coincide at n=2 and the k=4 and k=n+1 terms at n=3.)

theorem two_deletion_num_embeddings_alternating_histogram (n : ℕ) (hn : 2 ≤ n) (k : ℕ) : (Finset.univ.filter (fun y : Fin (n + 2) → Bool => two_deletion_num_embeddings n (alternating_word n false) y = k)).card = 3 * (if k = 1 then 1 else 0) + 2 * n * (if k = 2 then 1 else 0) + n * (if k = 3 then 1 else 0) + n.choose 2 * (if k = 4 then 1 else 0) + (if k = n + 1 then 1 else 0)
two_deletion_num_embeddings_rpow_alternating_maxIn LeanInformation Theory & Coding

For 0 < α < 1 and n ≥ 2, the alternating word maximises the α-moment of the two-deletion embedding-count histogram over all words of length n, and equality holds exactly for the two alternating words.

theorem two_deletion_num_embeddings_rpow_alternating_max (α : ℝ) (hα0 : 0 < α) (hα1 : α < 1) (n : ℕ) (hn : 2 ≤ n) (w : Fin n → Bool) : (∑ y : Fin (n + 2) → Bool, ((two_deletion_num_embeddings n w y : ℝ)) ^ α) ≤ (∑ y : Fin (n + 2) → Bool, ((two_deletion_num_embeddings n (alternating_word n false) y : ℝ)) ^ α) ∧ (((∑ y : Fin (n + 2) → Bool, ((two_deletion_num_embeddings n w y : ℝ)) ^ α) = (∑ y : Fin (n + 2) → Bool, ((two_deletion_num_embeddings n (alternating_word n false) y : ℝ)) ^ α)) ↔ is_alternating_word w)
two_deletion_num_embeddings_rpow_eq_alternatingIn LeanInformation Theory & Coding

An alternating word has the same α-moment of its two-deletion embedding-count histogram as the alternating word starting with false, for every real α.

theorem two_deletion_num_embeddings_rpow_eq_alternating (α : ℝ) {n : ℕ} (w : Fin n → Bool) (hw : is_alternating_word w) : (∑ y : Fin (n + 2) → Bool, ((two_deletion_num_embeddings n w y : ℝ)) ^ α) = (∑ y : Fin (n + 2) → Bool, ((two_deletion_num_embeddings n (alternating_word n false) y : ℝ)) ^ α)
two_deletion_num_embeddings_rpow_lt_of_not_alternatingIn LeanInformation Theory & Coding

Sharp strict form of the sub-unit Rényi comparison for two deletions: for 0 < α < 1 and n ≥ 2, every non-alternating word w of length n has strictly smaller α-moment of its two-deletion embedding-count histogram than the alternating word.

theorem two_deletion_num_embeddings_rpow_lt_of_not_alternating (α : ℝ) (hα0 : 0 < α) (hα1 : α < 1) (n : ℕ) (hn : 2 ≤ n) (w : Fin n → Bool) (hw : ¬ is_alternating_word w) : (∑ y : Fin (n + 2) → Bool, ((two_deletion_num_embeddings n w y : ℝ)) ^ α) < (∑ y : Fin (n + 2) → Bool, ((two_deletion_num_embeddings n (alternating_word n false) y : ℝ)) ^ α)
two_deletion_num_embeddings_sumIn LeanInformation Theory & Coding

For every word w of length n, the two-deletion embedding counts over all words y of length n + 2 sum to 4·C(n+2,2): each of the C(n+2,2) choices of the two deleted positions contributes exactly the 4 words obtained by filling those positions with the two free bits.

theorem two_deletion_num_embeddings_sum (n : ℕ) (w : Fin n → Bool) : (∑ y : Fin (n + 2) → Bool, two_deletion_num_embeddings n w y) = 4 * (n + 2).choose 2
two_deletion_posterior_renyi_lt_of_moment_ltIn LeanInformation Theory & Coding

For every real order α > 1, length n ≥ 2, and word w of length n, if the α-moment of the two-deletion embedding counts of w is strictly positive and strictly less than that of the alternating word starting with false, then the Rényi entropy of order α of the two-deletion posterior for the alternating word is strictly less than that for w.

theorem two_deletion_posterior_renyi_lt_of_moment_lt (α : ℝ) (hα : 1 < α) (n : ℕ) (hn : 2 ≤ n) (w : Fin n → Bool) (hpos : 0 < ∑ y : Fin (n + 2) → Bool, ((two_deletion_num_embeddings n w y : ℝ)) ^ α) (hlt : (∑ y : Fin (n + 2) → Bool, ((two_deletion_num_embeddings n w y : ℝ)) ^ α) < ∑ y : Fin (n + 2) → Bool, ((two_deletion_num_embeddings n (alternating_word n false) y : ℝ)) ^ α) : renyi_entropy α (two_deletion_posterior n (alternating_word n false)) < renyi_entropy α (two_deletion_posterior n w)
two_deletion_posterior_renyi_of_num_embeddings_momentsIn LeanInformation Theory & Coding

Analytic bridge: if the α-moment of the two-deletion embedding-count histogram of w is at most that of the alternating word, with equality exactly for alternating words, then the same two conclusions hold for the Rényi entropies of the corresponding two-deletion posteriors, for every 0 < α < 1.

theorem two_deletion_posterior_renyi_of_num_embeddings_moments (α : ℝ) (hα0 : 0 < α) (hα1 : α < 1) (n : ℕ) (hn : 2 ≤ n) (w : Fin n → Bool) (h : (∑ y : Fin (n + 2) → Bool, ((two_deletion_num_embeddings n w y : ℝ)) ^ α) ≤ (∑ y : Fin (n + 2) → Bool, ((two_deletion_num_embeddings n (alternating_word n false) y : ℝ)) ^ α) ∧ (((∑ y : Fin (n + 2) → Bool, ((two_deletion_num_embeddings n w y : ℝ)) ^ α) = (∑ y : Fin (n + 2) → Bool, ((two_deletion_num_embeddings n (alternating_word n false) y : ℝ)) ^ α)) ↔ is_alternating_word w)) : renyi_entropy α (two_deletion_posterior n w) ≤ renyi_entropy α (two_deletion_posterior n (alternating_word n false)) ∧ (renyi_entropy α (two_deletion_posterior n w) = renyi_entropy α (two_deletion_posterior n (alternating_word n false)) ↔ is_alternating_word w)
two_deletion_posterior_sumIn LeanInformation Theory & Coding

For every received word w of length n, the two-deletion posterior two_deletion_posterior n w is a probability distribution on words of length n + 2: its values sum to 1.

theorem two_deletion_posterior_sum (n : ℕ) (w : Fin n → Bool) : (∑ y : Fin (n + 2) → Bool, two_deletion_posterior n w y) = 1
two_deletion_rank_gap_le_twoIn LeanInformation Theory & Coding

Let S, T be the two-element sets of positions deleted from a word of length N, and p a position outside both. The rank of p among the complement of S differs from its rank among the complement of T by at most 2 (in absolute value).

theorem two_deletion_rank_gap_le_two {N : ℕ} (S T : Finset (Fin N)) (hS : S.card = 2)
    (hT : T.card = 2) (p : Fin N) (hpS : p ∉ S) (hpT : p ∉ T) :
    (((Finset.univ \ S).filter (fun q => q < p)).card : ℤ) -
        (((Finset.univ \ T).filter (fun q => q < p)).card : ℤ) ≤ 2
two_four_code_max_card_ne_of_exists_codeIn LeanInformation Theory & Coding

If there exists a $q$-ary $\{2, 4\}$-code $C$ of length $n$ with $|C| > 1 + \binom{n}{2}$, then $A_q(n, \{2, 4\}) \ne 1 + \binom{n}{2}$.

theorem two_four_code_max_card_ne_of_exists_code (q n : ℕ) (C : Finset (Fin n → Fin q))
    (hC_code : is_two_four_code (C : Set (Fin n → Fin q)))
    (hC_card : 1 + Nat.choose n 2 < C.card) :
    two_four_code_max_card q n ≠ 1 + Nat.choose n 2
two_insertion_collision_defect_cost_lower_boundIn LeanInformation Theory & Coding

For n ≥ 20 and every admissible block length k (1 ≤ k ≤ (n-2)/3 - 1), the balanced-block cost is at least 2√2·n^{3/2} - 5n - 15: two_insertion_collision_defect_cost n k + 5n + 15 ≥ 2√2 n^{3/2}. This is the tight direction: the constant 2√2 is exactly the minimum of 2sn + n^2/s over s > 0.

theorem two_insertion_collision_defect_cost_lower_bound (n k : ℕ) (hn : 20 ≤ n) (hk : 1 ≤ k)
    (hK : k ≤ (n - 2) / 3 - 1) :
    2 * Real.sqrt 2 * (n : ℝ) ^ ((3 : ℝ) / 2) ≤
      (two_insertion_collision_defect_cost n k : ℝ) + 5 * (n : ℝ) + 15
two_insertion_collision_defect_cost_valuesIn LeanInformation Theory & Coding

Concrete values of the balanced-block cost: two_insertion_collision_defect_cost 5 1 = 10, and at n = 16 the three admissible block lengths give 136 (k = 1), 132 (k = 2), 148 (k = 3), whose minimum yields two_insertion_collision_defect_envelope 16 = 120 + 132 = 252. The value 132 agrees with the exhaustively computed excess min_two_insertion_collision 16 - 16.choose 2 = 132.

theorem two_insertion_collision_defect_cost_values :
    two_insertion_collision_defect_cost 5 1 = 10 ∧
      two_insertion_collision_defect_cost 16 1 = 136 ∧
      two_insertion_collision_defect_cost 16 2 = 132 ∧
      two_insertion_collision_defect_cost 16 3 = 148 ∧
      two_insertion_collision_defect_envelope 16 = 252
two_insertion_collision_defect_cost_witnessIn LeanInformation Theory & Coding

For every n ≥ 20 there is an admissible block length k (2 ≤ k ≤ (n-2)/3 - 1) whose balanced-block cost is at most 2√2·n^{3/2} + 8n; concretely k = Nat.sqrt (n/2) works. Together with two_insertion_collision_defect_cost_lower_bound this pins the minimum of the cost to 2√2 n^{3/2} + O(n).

theorem two_insertion_collision_defect_cost_witness (n : ℕ) (hn : 20 ≤ n) :
    ∃ k : ℕ, 2 ≤ k ∧ k ≤ (n - 2) / 3 - 1 ∧
      (two_insertion_collision_defect_cost n k : ℝ) ≤
        2 * Real.sqrt 2 * (n : ℝ) ^ ((3 : ℝ) / 2) + 8 * (n : ℝ)
two_insertion_collision_defect_envelope_defect_asymptoticIn LeanInformation Theory & Coding

The excess of the defect envelope over n.choose 2, normalised by n^{3/2}, tends to 2√2: (two_insertion_collision_defect_envelope n - n.choose 2)/n^{3/2} → 2·Real.sqrt 2 as n → ∞. This is the exact analytic form of the target statement, with the minimum over words replaced by the balanced-block envelope.

theorem two_insertion_collision_defect_envelope_defect_asymptotic :
    Filter.Tendsto
      (fun n : ℕ =>
        ((two_insertion_collision_defect_envelope n : ℝ) - (n.choose 2 : ℝ)) / (n : ℝ) ^ ((3 : ℝ) / 2))
      Filter.atTop (nhds (2 * Real.sqrt 2))
two_insertion_collision_defect_envelope_defect_minIn LeanInformation Theory & Coding

For every n, the defect two_insertion_collision_defect_envelope n - n.choose 2 is exactly the minimum of two_insertion_collision_defect_cost n over the admissible block lengths K = {1} ∪ {k : 2 ≤ k ≤ (n-2)/3 - 1}: it is attained at some k ∈ K and is ≤ two_insertion_collision_defect_cost n k for every k ∈ K.

theorem two_insertion_collision_defect_envelope_defect_min (n : ℕ) :
    (∃ k ∈ Insert.insert 1 (Finset.Icc 2 ((n - 2) / 3 - 1)),
        two_insertion_collision_defect_envelope n - n.choose 2 = two_insertion_collision_defect_cost n k) ∧
      (∀ k ∈ Insert.insert 1 (Finset.Icc 2 ((n - 2) / 3 - 1)),
        two_insertion_collision_defect_envelope n - n.choose 2 ≤ two_insertion_collision_defect_cost n k)
two_insertion_collision_eq_collision_embedding_pair_countIn LeanInformation Theory & Coding

The two-insertion collision sum of w equals the number of ordered pairs of strictly increasing embeddings Fin m → Fin (m+2) that read the same sub-word off w: ∑_u (#embeddings giving u)^2 = #{(f,g) : StrictMono f ∧ StrictMono g ∧ ∀ i, w (f i) = w (g i)}.

theorem two_insertion_collision_eq_collision_embedding_pair_count (m : ℕ) (w : Fin (m + 2) → Bool) :
    two_insertion_collision m w = collision_embedding_pair_count m w
uniform_distribution_shannon_entropyIn LeanInformation Theory & Coding

For any finite nonempty set S, the sum over s ∈ S of Real.negMulLog ((S.card : ℝ)⁻¹) equals Real.log (S.card : ℝ).

theorem uniform_distribution_shannon_entropy {α : Type*} (S : Finset α) (hne : S.Nonempty) :
    ∑ _s ∈ S, Real.negMulLog ((S.card : ℝ)⁻¹) = Real.log (S.card : ℝ)
wgfhs_min_gap_bound_s5In LeanInformation Theory & Coding

For alphabet size s = 5, every optimal uniform wide-gap frequency hopping sequence satisfies the min gap bound e <= ((5 - 1) / 2) - 2 = 0.

theorem wgfhs_min_gap_bound_s5
    (k : ℕ) [NeZero (k * 5)] (hk : 4 ≤ k) (hs_le : 5 ≤ k * (k - 1) - 1)
    (X : Fin (k * 5) → Fin 5)
    (h_unif : is_uniform_fhs k 5 X)
    (h_corr : fhs_autocorr_le X k)
    (h_gap : 0 < fhs_min_gap X) :
    fhs_min_gap X ≤ ((5 - 1) / 2 : ℤ) - 2
spr_full_move_survivalIn LeanComputational Learning Theory

Survival rule under full deletion: after the pointer names an empty cell j and the labeler answers with the full deletable set and sign s, a cell i ≠ j holds a plus iff it held a plus before and i < j, and it holds a minus iff it held a minus before and j < i.

theorem spr_full_move_survival {n : ℕ} (b : Fin n → Option Bool) (j : Fin n) (s : Bool)
    (i : Fin n) (hi : i ≠ j) :
    (spr_move b j (spr_full_deletable b j) s i = some true ↔ b i = some true ∧ i < j) ∧
    (spr_move b j (spr_full_deletable b j) s i = some false ↔ b i = some false ∧ j < i)
spr_linear_board_one_two_sharpIn LeanComputational Learning Theory

The k = 1 case of the target: on 1 or 2 cells, spr_opt n t ≤ 1 for all t, and spr_opt n t = 1 iff t ≥ 1.

theorem spr_linear_board_one_two_sharp (n : ℕ) (hn : n = 1 ∨ n = 2)
    (hone : spr_opt n 1 = 1) :
    (∀ t : ℕ, spr_opt n t ≤ 1) ∧
    (∀ t : ℕ, spr_opt n t = 1 ↔ 1 ≤ t)
spr_linear_board_three_four_sharpIn LeanComputational Learning Theory

The k = 2 case of the target: on 3 or 4 cells, spr_opt n t ≤ 2 for all t, and spr_opt n t = 2 iff t ≥ 2.

theorem spr_linear_board_three_four_sharp (n : ℕ) (hn : n = 3 ∨ n = 4)
    (h1 : spr_opt n 1 = 1) (h2 : spr_opt n 2 = 2) :
    (∀ t : ℕ, spr_opt n t ≤ 2) ∧
    (∀ t : ℕ, spr_opt n t = 2 ↔ 2 ≤ t)
spr_opt_horizon_monoIn LeanComputational Learning Theory

The horizon lift of the target: the optimal value never decreases when the horizon grows by one.

theorem spr_opt_horizon_mono (n t : ℕ) : spr_opt n t ≤ spr_opt n (t + 1)
spr_opt_mono_horizon_leIn LeanComputational Learning Theory

spr_opt n · is monotone in the horizon: for t ≤ u, spr_opt n t ≤ spr_opt n u.

theorem spr_opt_mono_horizon_le (n : ℕ) : ∀ t u : ℕ, t ≤ u → spr_opt n t ≤ spr_opt n u
spr_opt_oneIn LeanComputational Learning Theory

With at least one round and at least one cell the pointer can secure exactly one sign: spr_opt n 1 = 1 for n ≥ 1.

theorem spr_opt_one (n : ℕ) (hn : 1 ≤ n) : spr_opt n 1 = 1
spr_opt_quadratic_lowerIn LeanComputational Learning Theory

At the triangular horizon 1 + k(k-1)/2 the pointer can secure k signs on a board of 2k-1 or 2k cells.

theorem spr_opt_quadratic_lower (k : ℕ) (hk : 1 ≤ k) (n : ℕ)
    (hn : n = 2 * k - 1 ∨ n = 2 * k) :
    k ≤ spr_opt n (1 + k * (k - 1) / 2)
spr_opt_quadratic_upperIn LeanComputational Learning Theory

Sharp horizon upper bound, valid for every board size n: if the horizon is below the m-th triangular threshold, the value is at most m - 1. Equivalently spr_opt n t ≤ max{k : 1 + k(k-1)/2 ≤ t}.

theorem spr_opt_quadratic_upper (m n t : ℕ) (hm : 1 ≤ m) (ht : t < 1 + m * (m - 1) / 2) :
    spr_opt n t ≤ m - 1
spr_sorted_full_moveIn LeanComputational Learning Theory

Full deletion preserves sortedness: if the board is sorted, then after any pointer move j and the labeler's full-deletion answer with sign s, the board is still sorted (all pluses left of all minuses).

theorem spr_sorted_full_move {n : ℕ} (b : Fin n → Option Bool) (j : Fin n) (s : Bool)
    (hb : spr_sorted b) : spr_sorted (spr_move b j (spr_full_deletable b j) s)
spr_value_eq_full_deletionIn LeanComputational Learning Theory

Full deletion is an optimal labeler reply: with at least one round left the minimax value is the maximum of the current sign count and the sup over empty cells j of the min over the two signs of the value reached by deleting every deletable sign. Equivalently, the infimum over admissible (R, s) pairs equals the infimum over the two pairs (full deletable set, true) and (full deletable set, false).

theorem spr_value_eq_full_deletion (n r : ℕ) (b : Fin n → Option Bool) :
    spr_value n (r + 1) b = max (spr_sign_count b)
      ((Finset.univ.filter (fun j => b j = none)).sup (fun j =>
        (Finset.univ : Finset Bool).inf' Finset.univ_nonempty
          (fun s => spr_value n r (spr_move b j (spr_full_deletable b j) s))))
op75_compact_network_encoding_boundIn LeanNP-Completeness & Reductions

The length of the binary encoding of the explicit network is at most 2000 times one plus the target encoding length and the sum, over weights, of one plus each weight encoding length.

theorem op75_compact_network_encoding_bound (as : List ℕ) (t : ℕ) : (relu_network3_encode (op75_compact_network as t)).length ≤ 2000 * (1 + (as.map fun a => (relu_encode_nat a).length + 1).sum + (relu_encode_nat t).length)
op75_compact_network_encoding_exactIn LeanNP-Completeness & Reductions

The binary encoding of the explicit network has length 124 plus 511 times the number of weights plus twice the sum of the natural-number encoding lengths of the weights and target.

theorem op75_compact_network_encoding_exact (as : List ℕ) (t : ℕ) : (relu_network3_encode (op75_compact_network as t)).length = 124 + 511 * as.length + 2 * ((as.map fun a => (relu_encode_nat a).length).sum + (relu_encode_nat t).length)
op75_compact_network_lengthIn LeanNP-Completeness & Reductions

The explicit subset-sum network has seven hidden layers per input weight and one final hidden layer.

theorem op75_compact_network_length (as : List ℕ) (t : ℕ) : (op75_compact_network as t).layers.length = 7 * as.length + 1
op75_relu_poly_size_zero_witnessIn LeanNP-Completeness & Reductions

Every rational width-three network that has a real zero on the unit interval has a rational zero whose encoded length is bounded by one polynomial in the network encoding length; this does not by itself construct a polynomial-time verifier.

theorem op75_relu_poly_size_zero_witness : ∃ P : Polynomial ℕ, ∀ net : ReLUNetwork 3, relu_network_has_unit_interval_zero net → ∃ q : ℚ, (q : ℝ) ∈ Set.Icc (0 : ℝ) 1 ∧ evalNetwork net (q : ℝ) = 0 ∧ (relu_encode_rat q).length ≤ P.eval (relu_network3_encode net).length
op75_relu_rational_zero_witnessIn LeanNP-Completeness & Reductions

If a rational-weight feedforward ReLU network has a real zero on the unit interval, it also has a rational zero there. This is an existence lemma only; NP membership additionally requires a polynomial bound on the witness encoding and a polynomial-time verifier.

theorem op75_relu_rational_zero_witness {k : ℕ} (net : ReLUNetwork k) : relu_network_has_unit_interval_zero net → ∃ q : ℚ, (q : ℝ) ∈ Set.Icc (0 : ℝ) 1 ∧ evalNetwork net (q : ℝ) = 0
op75_subset_compiler_polynomial_timeIn LeanNP-Completeness & Reductions

The explicit total subset-sum to network compiler is computed by a finite TM2 in polynomial time.

theorem op75_subset_compiler_polynomial_time : Nonempty (Turing.TM2ComputableInPolyTime (id : List Bool → List Bool) (id : List Bool → List Bool) op75_subset_compiler_function)
op75_subset_encoding_lengthIn LeanNP-Completeness & Reductions

The subset-sum source word length is one plus the sum over weights of one plus the length of the weight encoding, plus the target encoding length.

theorem op75_subset_encoding_length (as : List ℕ) (t : ℕ) : (op75_subset_encoding as t).length = 1 + (as.map fun a => (relu_encode_nat a).length + 1).sum + (relu_encode_nat t).length
colors_used_ge_of_color_classes_le_twoIn LeanOnline Algorithms

For any vertex coloring c : Fin n → ℕ, if every color is assigned to at most two vertices, then the number of distinct colors used by c is at least (n : ℝ) / 2.

theorem colors_used_ge_of_color_classes_le_two {n : ℕ} (c : Fin n → ℕ)
    (h : ∀ col : ℕ, (Finset.univ.filter (fun v => c v = col)).card ≤ 2) :
    (n : ℝ) / 2 ≤ (colorsUsed c : ℝ)
cumulative_empirical_transport_cost_le_two_subset_costIn LeanOnline Algorithms

For every metric space X and every server placement s : Fin n → X, the sum of expected empirical transport costs is bounded by twice the sum of expected subset transport costs: ∑_{t=1}^n f_t ≤ 2 * ∑_{k=1}^n g_k.

theorem cumulative_empirical_transport_cost_le_two_subset_cost
    {X : Type*} [PseudoMetricSpace X] (n : ℕ) (s : Fin n → X) :
    ∑ t ∈ Finset.Icc 1 n, empirical_expected_transport_cost n s t ≤
      2 * ∑ k ∈ Finset.Icc 1 n, subset_expected_transport_cost n s k
cut_requests_sublist_of_circumferenceIn LeanOnline Algorithms

Let V be a type, and let min_cuts_G and min_cuts_H be sets of finite vertex cuts in V satisfying min_cuts_G ⊆ min_cuts_H. Then for every list reqs of cuts whose elements belong to min_cuts_G, every cut in reqs also belongs to min_cuts_H.

theorem cut_requests_sublist_of_circumference {V : Type*}
    (min_cuts_G min_cuts_H : Set (Finset V)) (h_circumference : min_cuts_G ⊆ min_cuts_H)
    (reqs : List (Finset V)) (hreqs : ∀ c ∈ reqs, c ∈ min_cuts_G) :
    ∀ c ∈ reqs, c ∈ min_cuts_H
cycle_gap_merge_lengthIn LeanOnline Algorithms

Merging adjacent gaps at index i in a cycle with at least two gaps reduces the number of gaps by 1.

theorem cycle_gap_merge_length (g : List ℕ) (i : ℕ) (hg : 2 ≤ g.length) :
    (cycle_gap_merge g i).length = g.length - 1
cycle_gap_merge_sumIn LeanOnline Algorithms

Merging adjacent gaps in a cycle preserves the total circumference (the sum of gap lengths).

theorem cycle_gap_merge_sum (g : List ℕ) (i : ℕ) (hg : 2 ≤ g.length) :
    (cycle_gap_merge g i).sum = g.sum
cycle_greedy_gap_rotation_sumIn LeanOnline Algorithms

Summing any function of the left-hand gap of each boundary over all boundaries of a cyclic gap list gives the same total as summing it over the gaps themselves: ∑_{i < g.length} f (g[(i - 1) mod g.length]) = ∑_{i < g.length} f (g[i]).

theorem cycle_greedy_gap_rotation_sum (g : List ℕ) (f : ℕ → ℚ) :
    (∑ i ∈ Finset.range g.length, f (g[(i + g.length - 1) % g.length]?.getD 0)) =
      ∑ i ∈ Finset.range g.length, f (g[i]?.getD 0)
cycle_greedy_mean_defect_recursionIn LeanOnline Algorithms

For a gap configuration of total circumference n with at least two gaps, the mean defect U(g) = 4n·(mean component of the DP at g) - n satisfies U(g) = ∑_i g_i^2 + (1/(2n))·∑_i (g_{i-1} + g_i)·U(merge_i g), where the inner sum runs over the boundaries of the cycle.

theorem cycle_greedy_mean_defect_recursion (n : ℕ) (hn : 0 < n) (g : List ℕ) (hg : 2 ≤ g.length)
    (hsum : g.sum = n) :
    4 * (n : ℚ) * (cycle_greedy_moments n g).1 - (n : ℚ) =
      (∑ i ∈ Finset.range g.length, ((((g[i]?.getD 0 : ℕ)) : ℚ) ^ 2)) +
        (1 / (2 * (n : ℚ))) *
          ∑ i ∈ Finset.range g.length,
            ((((g[(i + g.length - 1) % g.length]?.getD 0 : ℕ)) : ℚ) +
              (((g[i]?.getD 0 : ℕ)) : ℚ)) *
            (4 * (n : ℚ) * (cycle_greedy_moments n (cycle_gap_merge g i)).1 - (n : ℚ))
cycle_greedy_mean_exactIn LeanOnline Algorithms

For every integer n ≥ 2, the expected total greedy assignment cost on an n-cycle equals (n / 4) * S_n.

theorem cycle_greedy_mean_exact (n : ℕ) (hn : 2 ≤ n) :
    cycle_greedy_mean n = (n : ℚ) * cycle_greedy_s n / 4
cycle_greedy_mean_step_expansionIn LeanOnline Algorithms

The mean component of the DP, on a configuration with at least two gaps, equals the sum over all boundaries i of the immediate expected cost (l^2 + r^2)/(8n) at that boundary plus the transition probability (l + r)/(2n) times the mean value of the merged configuration, where l = g[i-1] and r = g[i] are the two adjacent gaps.

theorem cycle_greedy_mean_step_expansion (n : ℕ) (g : List ℕ) (hg : 2 ≤ g.length) :
    (cycle_greedy_moments n g).1 =
      Finset.sum (Finset.range g.length) (fun i =>
        ((((g[(i + g.length - 1) % g.length]?.getD 0 : ℕ)) : ℚ) ^ 2 +
          (((g[i]?.getD 0 : ℕ)) : ℚ) ^ 2) / (8 * (n : ℚ)) +
        ((((g[(i + g.length - 1) % g.length]?.getD 0 : ℕ)) : ℚ) +
          (((g[i]?.getD 0 : ℕ)) : ℚ)) / (2 * (n : ℚ)) *
          (cycle_greedy_moments n (cycle_gap_merge g i)).1)
cycle_greedy_moment_one_structureIn LeanOnline Algorithms

There exist polynomials P and Q over the rationals with deg P ≤ 1 and deg Q ≤ 0 such that for every integer n ≥ 2, the first raw moment of greedy assignment cost satisfies cycle_greedy_raw_moment 1 n = P(n) + Q(n) * cycle_greedy_known_mean n.

theorem cycle_greedy_moment_one_structure :
    ∃ (P Q : Polynomial ℚ),
      P.degree ≤ ((3 * 1 / 2 : ℕ) : WithBot ℕ) ∧
      Q.degree ≤ (((3 * 1 - 3) / 2 : ℕ) : WithBot ℕ) ∧
      ∀ (n : ℕ), 2 ≤ n →
        cycle_greedy_raw_moment 1 n = P.eval (n : ℚ) + Q.eval (n : ℚ) * cycle_greedy_known_mean n
cycle_greedy_moment_two_structureIn LeanOnline Algorithms

There exist polynomials P and Q over the rationals with deg P ≤ 3 and deg Q ≤ 1 such that for every integer n ≥ 2, the second raw moment of greedy assignment cost satisfies cycle_greedy_raw_moment 2 n = P(n) + Q(n) * cycle_greedy_known_mean n.

theorem cycle_greedy_moment_two_structure :
    ∃ (P Q : Polynomial ℚ),
      P.degree ≤ ((3 * 2 / 2 : ℕ) : WithBot ℕ) ∧
      Q.degree ≤ (((3 * 2 - 3) / 2 : ℕ) : WithBot ℕ) ∧
      ∀ (n : ℕ), 2 ≤ n →
        cycle_greedy_raw_moment 2 n = P.eval (n : ℚ) + Q.eval (n : ℚ) * cycle_greedy_known_mean n
cycle_greedy_moments_all_fuel_lengthIn LeanOnline Algorithms

For positive fuel, the all-fuel moment DP returns a list of exactly k_max + 1 entries (slots 0, …, k_max), whatever the circumference and gap configuration.

theorem cycle_greedy_moments_all_fuel_length (fuel k_max n : ℕ) (g : List ℕ) (hf : 1 ≤ fuel) :
    (cycle_greedy_moments_all_fuel fuel k_max n g).length = k_max + 1
cycle_greedy_moments_all_fuel_one_eq_mean_fuelIn LeanOnline Algorithms

For every fuel, circumference and gap configuration, slot 1 (the first raw moment) of the all-fuel moment DP equals the mean component of the two-tuple moment DP at the same fuel.

theorem cycle_greedy_moments_all_fuel_one_eq_mean_fuel (fuel n : ℕ) (g : List ℕ) :
    (cycle_greedy_moments_all_fuel fuel 1 n g).getD 1 0 = (cycle_greedy_moments_fuel fuel n g).1
cycle_greedy_moments_all_fuel_zero_slotIn LeanOnline Algorithms

For positive fuel, slot 0 of the all-fuel moment DP — the total probability mass, i.e. the zeroth raw moment — is pinned to 1 for every circumference and gap configuration.

theorem cycle_greedy_moments_all_fuel_zero_slot (fuel k_max n : ℕ) (g : List ℕ) (hf : 1 ≤ fuel) :
    (cycle_greedy_moments_all_fuel fuel k_max n g).getD 0 0 = 1
cycle_greedy_moments_induction_stepIn LeanOnline Algorithms

For every integer k ≥ 1, assuming all lower raw moments j < k admit rational polynomials P_j, Q_j with deg P_j ≤ ⌊3j/2⌋ and deg Q_j ≤ ⌊(3j-3)/2⌋ satisfying cycle_greedy_raw_moment j n = P_j(n) + Q_j(n) * cycle_greedy_known_mean n for all n ≥ 2, the k-th raw moment also admits polynomials P_k, Q_k with deg P_k ≤ ⌊3k/2⌋ and deg Q_k ≤ ⌊(3k-3)/2⌋ satisfying the same representation.

theorem cycle_greedy_moments_induction_step (k : ℕ) (hk : 1 ≤ k)
    (ih : ∀ (j : ℕ), 1 ≤ j → j < k →
      ∃ (P Q : Polynomial ℚ),
        P.degree ≤ ((3 * j / 2 : ℕ) : WithBot ℕ) ∧
        Q.degree ≤ (((3 * j - 3) / 2 : ℕ) : WithBot ℕ) ∧
        ∀ (n : ℕ), 2 ≤ n →
          cycle_greedy_raw_moment j n = P.eval (n : ℚ) + Q.eval (n : ℚ) * cycle_greedy_known_mean n) :
    ∃ (P Q : Polynomial ℚ),
      P.degree ≤ ((3 * k / 2 : ℕ) : WithBot ℕ) ∧
      Q.degree ≤ (((3 * k - 3) / 2 : ℕ) : WithBot ℕ) ∧
      ∀ (n : ℕ), 2 ≤ n →
        cycle_greedy_raw_moment k n = P.eval (n : ℚ) + Q.eval (n : ℚ) * cycle_greedy_known_mean n
cycle_greedy_moments_terminalIn LeanOnline Algorithms

A gap configuration with at most one gap is terminal: its exact expected cost is g.sum / 4 and its exact second moment is g.sum ^ 2 / 12 (evaluated at the given circumference parameter n, which is irrelevant here).

theorem cycle_greedy_moments_terminal (n : ℕ) (g : List ℕ) (h : g.length ≤ 1) :
    cycle_greedy_moments n g = ((g.sum : ℚ) / 4, (g.sum : ℚ) ^ 2 / 12)
cycle_greedy_moments_two_gapsIn LeanOnline Algorithms

On a cycle of circumference n with exactly two gaps a and b (so a + b = n), the exact expected cost is (a^2 + b^2)/(4n) + n/4 and the exact second moment is (a^3 + b^3)/(12n) + (a^2 + b^2)/8 + n^2/12.

theorem cycle_greedy_moments_two_gaps (n a b : ℕ) (hn : 0 < n) (hab : a + b = n) :
    cycle_greedy_moments n [a, b] =
      (((a : ℚ) ^ 2 + (b : ℚ) ^ 2) / (4 * (n : ℚ)) + (n : ℚ) / 4,
       ((a : ℚ) ^ 3 + (b : ℚ) ^ 3) / (12 * (n : ℚ)) + ((a : ℚ) ^ 2 + (b : ℚ) ^ 2) / 8 +
         (n : ℚ) ^ 2 / 12)
cycle_greedy_moments_unfoldIn LeanOnline Algorithms

One-step unfolding of the moment recursion at fuel equal to the number of gaps: for a gap list of length at least two, cycle_greedy_moments n g is the List.foldl over List.range g.length of the Bellman step in which the recursive value at boundary i is cycle_greedy_moments n (cycle_gap_merge g i) (not a fuel-indexed call).

theorem cycle_greedy_moments_unfold (n : ℕ) (g : List ℕ) (hg : 2 ≤ g.length) :
    cycle_greedy_moments n g =
      (List.range g.length).foldl
        (fun acc i =>
          let l : ℚ := ((g[(i + g.length - 1) % g.length]?.getD 0 : ℕ) : ℚ)
          let r : ℚ := ((g[i]?.getD 0 : ℕ) : ℚ)
          let sub := cycle_greedy_moments n (cycle_gap_merge g i)
          let p : ℚ := (l + r) / (2 * (n : ℚ))
          let c : ℚ := (l ^ 2 + r ^ 2) / (8 * (n : ℚ))
          let d : ℚ := (l ^ 3 + r ^ 3) / (24 * (n : ℚ))
          (acc.1 + c + p * sub.1, acc.2 + d + 2 * c * sub.1 + p * sub.2))
        (0, 0)
cycle_greedy_raw_moment_one_eq_known_meanIn LeanOnline Algorithms

For every integer n ≥ 2, the first raw moment of total greedy assignment cost on an n-cycle satisfies cycle_greedy_raw_moment 1 n = cycle_greedy_known_mean n.

theorem cycle_greedy_raw_moment_one_eq_known_mean (n : ℕ) (hn : 2 ≤ n) :
    cycle_greedy_raw_moment 1 n = cycle_greedy_known_mean n
cycle_greedy_raw_moment_one_eq_meanIn LeanOnline Algorithms

For every natural n, the first raw moment of total greedy assignment cost on an n-cycle equals the mean value cycle_greedy_mean n of the two-tuple moment DP on the uniform configuration.

theorem cycle_greedy_raw_moment_one_eq_mean (n : ℕ) :
    cycle_greedy_raw_moment 1 n = cycle_greedy_mean n
cycle_greedy_raw_moment_two_eq_formulaIn LeanOnline Algorithms

For every integer n ≥ 2, the second raw moment of total greedy assignment cost on an n-cycle satisfies cycle_greedy_raw_moment 2 n = (5 * n^3 + n^2) / 48 - n * cycle_greedy_known_mean n / 6.

theorem cycle_greedy_raw_moment_two_eq_formula (n : ℕ) (hn : 2 ≤ n) :
    cycle_greedy_raw_moment 2 n =
      (5 * (n : ℚ) ^ 3 + (n : ℚ) ^ 2) / 48 - (n : ℚ) * cycle_greedy_known_mean n / 6
cycle_greedy_second_moment_fiveIn LeanOnline Algorithms

For n = 5 the exact rational second moment equals the conjectured closed form; both sides are 1639/150.

theorem cycle_greedy_second_moment_five :
    cycle_greedy_second_moment 5 = cycle_greedy_second_moment_formula 5
cycle_greedy_second_moment_fourIn LeanOnline Algorithms

For n = 4 the exact rational second moment equals the conjectured closed form; both sides are 265/48.

theorem cycle_greedy_second_moment_four :
    cycle_greedy_second_moment 4 = cycle_greedy_second_moment_formula 4
cycle_greedy_second_moment_from_mean_identitiesIn LeanOnline Algorithms

If the exact mean is n·S_n/4 and the second moment satisfies m2 = (5n^3+n^2)/48 - (n/6)·m1, then the second moment equals the conjectured closed form.

theorem cycle_greedy_second_moment_from_mean_identities (n : ℕ) (hn : 2 ≤ n)
    (hmean : cycle_greedy_mean n = (n : ℚ) * cycle_greedy_s n / 4)
    (hred : cycle_greedy_second_moment n =
      (5 * (n : ℚ) ^ 3 + (n : ℚ) ^ 2) / 48 - (n : ℚ) * cycle_greedy_mean n / 6) :
    cycle_greedy_second_moment n = cycle_greedy_second_moment_formula n
cycle_greedy_second_moment_reductionIn LeanOnline Algorithms

For every integer n ≥ 2, the exact rational second moment of the greedy online assignment cost on an n-cycle satisfies the reduction to the mean: E[C_n^2] = (5n^3 + n^2)/48 - (n/6) E[C_n].

theorem cycle_greedy_second_moment_reduction (n : ℕ) (hn : 2 ≤ n) :
    cycle_greedy_second_moment n = (5 * (n : ℚ) ^ 3 + (n : ℚ) ^ 2) / 48 - (n : ℚ) * cycle_greedy_mean n / 6
deterministic_online_coloring_lemma_four_threeIn LeanOnline Algorithms

For every positive integer ℓ and every natural number n ≤ 2 ^ ℓ, and for every deterministic online coloring algorithm A on simple graphs on Fin n that properly colors (2 * ℓ)-colorable graphs, there exists a simple graph G on Fin n with chromatic number at most 2 * ℓ such that A uses at least (n : ℝ) / 2 colors on G.

theorem deterministic_online_coloring_lemma_four_three (ℓ : ℕ) (hℓ : 1 ≤ ℓ)
    (n : ℕ) (hn : n ≤ 2 ^ ℓ)
    (A : SimpleGraph (Fin n) → (Fin n → ℕ))
    (hA : IsOnlineColoringAlg A)
    (hproper : ProperlyColorsKColorable (2 * ℓ) A) :
    ∃ G : SimpleGraph (Fin n),
      G.chromaticNumber ≤ ↑(2 * ℓ) ∧
      (n : ℝ) / 2 ≤ (colorsUsed (A G) : ℝ)
deterministic_online_coloring_lower_boundIn LeanOnline Algorithms

For every natural number n ≥ 2 and every deterministic online coloring algorithm A on simple graphs on Fin n that properly colors (2 * Nat.ceil (Real.log (n : ℝ) / Real.log 2))-colorable graphs, there exists a simple graph G on Fin n whose chromatic number is at most 2 * Nat.ceil (Real.log (n : ℝ) / Real.log 2) such that A uses at least (n : ℝ) / 2 colors on G.

theorem deterministic_online_coloring_lower_bound (n : ℕ) (hn : 2 ≤ n)
    (A : SimpleGraph (Fin n) → (Fin n → ℕ))
    (hA : IsOnlineColoringAlg A)
    (hproper : ProperlyColorsKColorable (2 * Nat.ceil (Real.log (n : ℝ) / Real.log 2)) A) :
    ∃ G : SimpleGraph (Fin n),
      G.chromaticNumber ≤ ↑(2 * Nat.ceil (Real.log (n : ℝ) / Real.log 2)) ∧
      (n : ℝ) / 2 ≤ (colorsUsed (A G) : ℝ)
dp_suffix_val_zero_telescopingIn LeanOnline Algorithms

Given a measure space (Ω, P), n random variables X : Fin n → Ω → ℝ, and rate r : ℝ, the initial DP value dp_suffix_val P n X r 0 equals r * ∑ i : Fin n, ∫ ω, max (X i ω - dp_threshold P n X r i) 0 ∂P.

open MeasureTheory ProbabilityTheory Finset in
theorem dp_suffix_val_zero_telescoping {Ω : Type*} [MeasurableSpace Ω] (P : Measure Ω)
    (n : ℕ) (X : Fin n → Ω → ℝ) (r : ℝ) :
    dp_suffix_val P n X r 0 = r * ∑ i : Fin n, ∫ ω, max (X i ω - dp_threshold P n X r i) 0 ∂P
dp_threshold_le_val_zeroIn LeanOnline Algorithms

For any measure space (Ω, P), random variables X : Fin n → Ω → ℝ, rate r with 0 ≤ r, and index i : Fin n, the threshold dp_threshold P n X r i is at most dp_suffix_val P n X r 0.

open MeasureTheory ProbabilityTheory Finset in
theorem dp_threshold_le_val_zero {Ω : Type*} [MeasurableSpace Ω] (P : Measure Ω)
    (n : ℕ) (X : Fin n → Ω → ℝ) (r : ℝ) (hr : 0 ≤ r) (i : Fin n) :
    dp_threshold P n X r i ≤ dp_suffix_val P n X r 0
drf_prop1_instance_existsIn LeanOnline Algorithms

For every parameter m ≥ 1, there exists a two-resource multidimensional scheduling instance I such that the one-shot DRF completion time is at least drf_prop1_alg 2 m and the offline optimum is positive and at most drf_prop1_opt_bound 2 m.

theorem drf_prop1_instance_exists (m : ℕ) (hm : 1 ≤ m) : ∃ I : MultidimInstance2, drf_prop1_alg 2 m ≤ oneshot_drf_total_completion_time2 I ∧ multidim_opt2 I ≤ drf_prop1_opt_bound 2 m ∧ 0 < multidim_opt2 I
electrical_flow_characterization_and_energy_expansionIn LeanOnline Algorithms

Let d be a symmetric matrix of positive resistances on distinct pairs in Fin k. For every zero-sum vector a, the minimum defining electrical energy E(a) is attained by some feasible flow. A feasible flow F for demand a achieves this minimum energy E(a) if and only if there exist real voltages h : Fin k → ℝ such that d i j * F i j = h i - h j for all i ≠ j. Furthermore, for any such feasible flow F satisfying these voltage equations and any zero-sum vector b, E(a + b) = E(a) + 2 * (∑ i, b i * h i) + E(b).

theorem electrical_flow_characterization_and_energy_expansion
    {k : ℕ} (d : Fin k → Fin k → ℝ)
    (hd_symm : ∀ i j, d i j = d j i)
    (hd_pos : ∀ i j, i ≠ j → 0 < d i j) :
    (∀ a : Fin k → ℝ, (∑ i, a i = 0) →
      ∃ F, is_feasible_flow F a ∧ electrical_flow_energy d F = electrical_energy d a) ∧
    (∀ (a : Fin k → ℝ) (F : Fin k → Fin k → ℝ),
      is_feasible_flow F a →
      ((electrical_flow_energy d F = electrical_energy d a) ↔
        ∃ h : Fin k → ℝ, ∀ i j, i ≠ j → d i j * F i j = h i - h j)) ∧
    (∀ (a b : Fin k → ℝ) (F : Fin k → Fin k → ℝ) (h : Fin k → ℝ),
      (∑ i, a i = 0) → (∑ i, b i = 0) →
      is_feasible_flow F a →
      (∀ i j, i ≠ j → d i j * F i j = h i - h j) →
      electrical_energy d (a + b) =
        electrical_energy d a + 2 * (∑ i, b i * h i) + electrical_energy d b)
electrical_flow_edge_boundIn LeanOnline Algorithms

For any finite index set Fin k with resistances strictly positive on distinct pairs (d i j > 0 for all i ≠ j), any feasible flow F for divergence a (satisfying is_feasible_flow F a) with voltages h satisfying d i j * F i j = h i - h j for all i ≠ j has edge flows bounded by the total positive excess: |F i j| ≤ ∑ l : Fin k, max (a l) 0 for all i, j.

open Finset in
theorem electrical_flow_edge_bound
    {k : ℕ} (d : Fin k → Fin k → ℝ) (F : Fin k → Fin k → ℝ) (h a : Fin k → ℝ)
    (hd_pos : ∀ i j, i ≠ j → 0 < d i j)
    (hF : is_feasible_flow F a)
    (h_volt : ∀ i j, i ≠ j → d i j * F i j = h i - h j)
    (i j : Fin k) :
    |F i j| ≤ ∑ l : Fin k, max (a l) 0
electrical_flow_energy_sum_expansionIn LeanOnline Algorithms

For any skew-symmetric flow F on Fin k satisfying the voltage law d i j * F i j = h i - h j for all i ≠ j and any feasible flow G with divergence b, the electrical energy of F + G equals the energy of F plus 2 * (∑ i, b i * h i) plus the energy of G.

theorem electrical_flow_energy_sum_expansion {k : ℕ} (d : Fin k → Fin k → ℝ)
    (F G : Fin k → Fin k → ℝ) (h b : Fin k → ℝ)
    (hF_skew : ∀ i j, F i j = -F j i)
    (hF_volt : ∀ i j, i ≠ j → d i j * F i j = h i - h j)
    (hG : is_feasible_flow G b) :
    electrical_flow_energy d (fun i j => F i j + G i j) =
      electrical_flow_energy d F + 2 * (∑ i, b i * h i) + electrical_flow_energy d G
electrical_flow_incident_square_sum_boundIn LeanOnline Algorithms

For any finite index set Fin k with resistances strictly positive on distinct pairs (d i j > 0 for all i ≠ j), any feasible flow F for divergence a (satisfying is_feasible_flow F a) with voltages h satisfying d i j * F i j = h i - h j for all i ≠ j satisfies ∑ j with j ≠ i, (F i j)^2 ≤ 2 * (∑ l : Fin k, max (a l) 0)^2 for every vertex i.

open Finset in
theorem electrical_flow_incident_square_sum_bound
    {k : ℕ} (d : Fin k → Fin k → ℝ) (F : Fin k → Fin k → ℝ) (h a : Fin k → ℝ)
    (hd_pos : ∀ i j, i ≠ j → 0 < d i j)
    (hF : is_feasible_flow F a)
    (h_volt : ∀ i j, i ≠ j → d i j * F i j = h i - h j)
    (i : Fin k) :
    ∑ j with j ≠ i, (F i j) ^ 2 ≤ 2 * (∑ l : Fin k, max (a l) 0) ^ 2
electrical_flow_positive_edge_voltage_strict_antiIn LeanOnline Algorithms

For any skew-symmetric flow F on Fin k (F i j = -F j i for all i, j) satisfying the voltage law d i j * F i j = h i - h j for all i ≠ j with resistances strictly positive on distinct pairs (d i j > 0 for all i ≠ j), every edge with strictly positive flow F i j > 0 has strictly decreasing voltage h j < h i.

theorem electrical_flow_positive_edge_voltage_strict_anti
    {k : ℕ} (d : Fin k → Fin k → ℝ) (F : Fin k → Fin k → ℝ) (h : Fin k → ℝ)
    (hF_skew : ∀ i j, F i j = -F j i)
    (hd_pos : ∀ i j, i ≠ j → 0 < d i j)
    (h_volt : ∀ i j, i ≠ j → d i j * F i j = h i - h j)
    (i j : Fin k) (hF_pos : 0 < F i j) :
    h j < h i
electrical_flow_voltage_energy_eqIn LeanOnline Algorithms

If resistances d are nonnegative on pairs with i < j, any feasible flow F for demand a satisfying the voltage law d i j * F i j = h i - h j for all i ≠ j achieves the infimum electrical energy E(a), so electrical_flow_energy d F = electrical_energy d a.

theorem electrical_flow_voltage_energy_eq {k : ℕ} (d : Fin k → Fin k → ℝ)
    (F : Fin k → Fin k → ℝ) (h a : Fin k → ℝ)
    (hd_pos : ∀ i j, i < j → 0 ≤ d i j)
    (hF : is_feasible_flow F a)
    (hF_volt : ∀ i j, i ≠ j → d i j * F i j = h i - h j) :
    electrical_flow_energy d F = electrical_energy d a
electrical_flow_voltage_is_minimizingIn LeanOnline Algorithms

If resistances d are nonnegative on pairs with i < j, any feasible flow F for demand a satisfying the voltage law d i j * F i j = h i - h j for all i ≠ j has electrical energy at most that of any other feasible flow G for demand a.

theorem electrical_flow_voltage_is_minimizing {k : ℕ} (d : Fin k → Fin k → ℝ)
    (F G : Fin k → Fin k → ℝ) (h a : Fin k → ℝ)
    (hd_pos : ∀ i j, i < j → 0 ≤ d i j)
    (hF : is_feasible_flow F a)
    (hF_volt : ∀ i j, i ≠ j → d i j * F i j = h i - h j)
    (hG : is_feasible_flow G a) :
    electrical_flow_energy d F ≤ electrical_flow_energy d G
electrical_flow_voltage_stability_boundIn LeanOnline Algorithms

Let Y = (y_1, ..., y_k) be pairwise distinct points in a metric space (V, d) (with injective y : Fin k → V), let a : Fin k → ℝ be a zero-sum vector (∑ i : Fin k, a i = 0), and let T = ∑_{l=1}^k max(a_l, 0). If F is a feasible flow for excess vector a (is_feasible_flow F a) minimizing electrical energy with respect to metric resistances dist(y_i, y_j) (electrical_flow_energy (fun i j => dist (y i) (y j)) F = electrical_energy (fun i j => dist (y i) (y j)) a), and h : Fin k → ℝ is a voltage vector satisfying dist(y_i, y_j) * F_ij = h_i - h_j for all i ≠ j, then the voltages satisfy |h_i - h_j| ≤ T * dist(y_i, y_j) for all i, j in Fin k.

open Finset in
theorem electrical_flow_voltage_stability_bound
    {V : Type*} [MetricSpace V] {k : ℕ} (y : Fin k → V) (hy : Function.Injective y)
    (a : Fin k → ℝ) (ha_sum : ∑ i : Fin k, a i = 0)
    (F : Fin k → Fin k → ℝ) (hF : is_feasible_flow F a)
    (hF_min : electrical_flow_energy (fun i j => dist (y i) (y j)) F =
      electrical_energy (fun i j => dist (y i) (y j)) a)
    (h : Fin k → ℝ) (h_volt : ∀ i j, i ≠ j → dist (y i) (y j) * F i j = h i - h j)
    (i j : Fin k) :
    |h i - h j| ≤ (∑ l : Fin k, max (a l) 0) * dist (y i) (y j)
electrical_serving_flow_identityIn LeanOnline Algorithms

For any natural number k, occupancy vector q : Fin k → ℤ, target index s : Fin k, and skew-symmetric flow F : Fin k → Fin k → ℝ with net outflow ∑ j, F i j = (q i : ℝ) + (if i = s then 1 else 0) - (1 + 1/k), the weighted sum ∑_{i ≠ s} q_i F_{is} equals (1 + 1/k) * (∑_{i ≠ s} F_{is}) + ∑_{i ≠ s} F_{is}^2 + ∑_{i < j, i ≠ s, j ≠ s} F_{ij} (F_{is} - F_{js}).

open Finset in
theorem electrical_serving_flow_identity
    {k : ℕ} (q : Fin k → ℤ) (s : Fin k)
    (F : Fin k → Fin k → ℝ)
    (hF_skew : ∀ i j, F i j = -F j i)
    (hF_div : ∀ i, ∑ j : Fin k, F i j =
      (q i : ℝ) + (if i = s then 1 else 0) - (1 + 1 / (k : ℝ))) :
    ∑ i with i ≠ s, (q i : ℝ) * F i s =
      (1 + 1 / (k : ℝ)) * (∑ i with i ≠ s, F i s) +
      ∑ i with i ≠ s, (F i s) ^ 2 +
      ∑ i : Fin k, ∑ j with i < j ∧ i ≠ s ∧ j ≠ s, F i j * (F i s - F j s)
electrical_serving_quadratic_boundIn LeanOnline Algorithms

For any real number k ≥ 2 and any real qs with 0 ≤ qs ≤ k, (1 + 1/k) * (1/k - qs) - (1/k - qs)^2 / 2 + k * qs ≥ 1/k.

theorem electrical_serving_quadratic_bound (k : ℝ) (hk : 2 ≤ k) (qs : ℝ)
    (hqs0 : 0 ≤ qs) (hqsk : qs ≤ k) :
    (1 + 1 / k) * (1 / k - qs) - (1 / k - qs) ^ 2 / 2 + k * qs ≥ 1 / k
electrical_serving_weighted_current_boundIn LeanOnline Algorithms

Let k ≥ 2 and let y : Fin k → V be an injection into a metric space (V, dist) defining k pairwise distinct points Y = (y_1, ..., y_k). Let q : Fin k → ℤ be an occupancy vector with 0 ≤ q i for all i and ∑ i, q i = k, and let s : Fin k. Let F : Fin k → Fin k → ℝ be a feasible flow for excess vector a i = (q i : ℝ) + (if i = s then 1 else 0) - (1 + 1/k) that achieves minimum electrical energy electrical_flow_energy (fun i j => dist (y i) (y j)) F = electrical_energy (fun i j => dist (y i) (y j)) a, and let h : Fin k → ℝ be a voltage vector satisfying dist (y i) (y j) * F i j = h i - h j for all i ≠ j. Then ∑ i with i ≠ s, (q i : ℝ) * F i s + (k : ℝ) * (q s : ℝ) ≥ 1 / (k : ℝ).

open Finset in
theorem electrical_serving_weighted_current_bound
    {V : Type*} [MetricSpace V] {k : ℕ} (hk : 2 ≤ k)
    (y : Fin k → V) (hy : Function.Injective y)
    (q : Fin k → ℤ) (hq_nonneg : ∀ i, 0 ≤ q i) (hq_sum : ∑ i : Fin k, q i = (k : ℤ))
    (s : Fin k)
    (F : Fin k → Fin k → ℝ)
    (hF : is_feasible_flow F (fun i => (q i : ℝ) + (if i = s then 1 else 0) - (1 + 1 / (k : ℝ))))
    (hF_min : electrical_flow_energy (fun i j => dist (y i) (y j)) F =
      electrical_energy (fun i j => dist (y i) (y j))
        (fun i => (q i : ℝ) + (if i = s then 1 else 0) - (1 + 1 / (k : ℝ))))
    (h : Fin k → ℝ) (h_volt : ∀ i j, i ≠ j → dist (y i) (y j) * F i j = h i - h j) :
    ∑ i with i ≠ s, (q i : ℝ) * F i s + (k : ℝ) * (q s : ℝ) ≥ 1 / (k : ℝ)
empirical_transport_cost_le_subset_costIn LeanOnline Algorithms

For every server placement s : Fin n → X in a pseudo metric space X and every 1 ≤ t ≤ n, the expected empirical transport cost satisfies f_t ≤ g_t + (1 / t) * ∑_{k = n - t + 1}^n g_k.

theorem empirical_transport_cost_le_subset_cost {X : Type*} [PseudoMetricSpace X]
    (n : ℕ) (s : Fin n → X) (t : ℕ) (ht1 : 1 ≤ t) (htn : t ≤ n) :
    empirical_expected_transport_cost n s t ≤
      subset_expected_transport_cost n s t +
        (1 / (t : ℝ)) * ∑ k ∈ Finset.Icc (n - t + 1) n, subset_expected_transport_cost n s k
forest_carpool_final_discrepancy_fixed_parityIn LeanOnline Algorithms

For a fixed edge sequence and vertex, the final greedy discrepancy has the same parity for every choice of coins.

theorem forest_carpool_final_discrepancy_fixed_parity (n : ℕ)
    (edges : List (Fin n × Fin n)) (v : Fin n)
    (r s : Fin edges.length → Bool) :
  forest_carpool_final_discrepancy n edges r v % 2 =
    forest_carpool_final_discrepancy n edges s v % 2
forest_carpool_final_discrepancy_symmetricIn LeanOnline Algorithms

For every fixed edge sequence and vertex, the finite uniform greedy final discrepancy law is symmetric about zero.

theorem forest_carpool_final_discrepancy_symmetric (n : ℕ)
    (edges : List (Fin n × Fin n)) (v : Fin n) (z : ℤ) :
  (Finset.univ.filter (fun r : Fin edges.length → Bool =>
    forest_carpool_final_discrepancy n edges r v = z)).card =
  (Finset.univ.filter (fun r : Fin edges.length → Bool =>
    forest_carpool_final_discrepancy n edges r v = -z)).card
harmonic_scale_weightIn LeanOnline Algorithms

The harmonic weight sum H(θ) = ∑_{e ∈ E} w_e / down_θ(w_e).

open Classical in
noncomputable def harmonic_scale_weight {α : Type*} (E : Finset α) (w : α → ℝ) (θ : ℝ) : ℝ
le_of_forall_nat_mul_le_mul_addIn LeanOnline Algorithms

For real numbers C, γ, c, if m * C ≤ m * γ + c holds for all natural numbers m, then C ≤ γ.

theorem le_of_forall_nat_mul_le_mul_add (C γ c : ℝ)
    (h : ∀ m : ℕ, (m : ℝ) * C ≤ (m : ℝ) * γ + c) :
    C ≤ γ
linear_probing_noisy_displacements_measurableIn LeanOnline Algorithms

For positive n, the vector of linear probing displacements plus the noise vector is Borel measurable in the home-slot sequence and the noise vector.

theorem linear_probing_noisy_displacements_measurable (n : ℕ) [NeZero n] : Measurable (linear_probing_noisy_displacements n)
machine_load_le_online_makespanIn LeanOnline Algorithms

For every online assignment policy, every finite list of jobs J, and every machine i in Fin 4, the total load assigned to machine i is at most the online makespan achieved by the policy on J.

theorem machine_load_le_online_makespan (policy : List ℝ → ℝ → Fin 4) (J : List ℝ) (i : Fin 4) :
    (∑ k : Fin J.length, if policy (J.take k.1) J[k.1] = i then J[k.1] else 0) ≤
    Finset.univ.sup' Finset.univ_nonempty (fun i' : Fin 4 =>
      ∑ k : Fin J.length, if policy (J.take k.1) J[k.1] = i' then J[k.1] else 0)
multidim_feasible_schedule_exists2In LeanOnline Algorithms

Every two-resource multidimensional scheduling instance admits at least one feasible schedule: running every job at the constant rate min(u_j, 1/(2n)) gives it completion time p_j / min(u_j, 1/(2n)), and the resulting allocation uses at most half of the capacity of each of the two resources.

theorem multidim_feasible_schedule_exists2 (I : MultidimInstance2) : ∃ (x : Fin I.n → ℝ → ℝ) (C : Fin I.n → ℝ), multidim_is_feasible_schedule2 I x C
multidim_opt2_posIn LeanOnline Algorithms

The offline optimal total completion time of every two-resource instance is strictly positive: it is at least the sum over jobs of p_j / u_j, and each of these terms is positive.

theorem multidim_opt2_pos (I : MultidimInstance2) : 0 < multidim_opt2 I
nat_ceil_log_two_ge_oneIn LeanOnline Algorithms

For every natural number n ≥ 2, the ceiling of Real.log (n : ℝ) / Real.log 2 is at least 1.

lemma nat_ceil_log_two_ge_one {n : ℕ} (hn : 2 ≤ n) :
    1 ≤ Nat.ceil (Real.log (n : ℝ) / Real.log 2)
nat_le_two_pow_ceil_log_two_natIn LeanOnline Algorithms

For every natural number n ≥ 2, n is at most 2 ^ (Nat.ceil (Real.log (n : ℝ) / Real.log 2)).

lemma nat_le_two_pow_ceil_log_two_nat {n : ℕ} (hn : 2 ≤ n) :
    n ≤ 2 ^ (Nat.ceil (Real.log (n : ℝ) / Real.log 2))
ocacag_chain_memIn LeanOnline Algorithms

For k ≥ 2 and v ∈ [1, 2^(k-1)], every cut c in the dyadic chain to v contains v (c.1 ≤ v ≤ c.2).

theorem ocacag_chain_mem (k : ℕ) (hk : 2 ≤ k) (v : ℤ) (hv : 1 ≤ v ∧ v ≤ (2 : ℤ) ^ (k - 1)) : ∀ c ∈ ocacagChain k v, c.1 ≤ v ∧ v ≤ c.2
ocacag_chain_validIn LeanOnline Algorithms

For k ≥ 2 and v ∈ [1, 2^(k-1)], every cut c in the dyadic chain to v is valid: 1 ≤ c.1, c.1 ≤ c.2, and c.2 < 2^k.

theorem ocacag_chain_valid (k : ℕ) (hk : 2 ≤ k) (v : ℤ) (hv : 1 ≤ v ∧ v ≤ (2 : ℤ) ^ (k - 1)) : ∀ c ∈ ocacagChain k v, 1 ≤ c.1 ∧ c.1 ≤ c.2 ∧ c.2 < (2 : ℤ) ^ k
ocacag_dyadic_averageIn LeanOnline Algorithms

For every online monotone feasible fractional algorithm Alg, the total of Alg's weight over the 2^(k-1) dyadic chains to the leaves v ∈ [1, 2^(k-1)] is at least ((k-1)/2)·2^(k-1); equivalently the average chain cost is at least (k-1)/2.

theorem ocacag_dyadic_average
    (k : ℕ) (hk : 2 ≤ k) (n : ℕ) (hn : n = 2 ^ k)
    (L : Finset (ℤ × ℤ))
    (hL : ∀ p, p ∈ L ↔ 0 ≤ p.1 ∧ p.1 < p.2 ∧ p.2 < (n : ℤ))
    (Alg : List (ℤ × ℤ) → (ℤ × ℤ → ℝ))
    (h_online : (∀ reqs p, p ∈ L → 0 ≤ Alg reqs p) ∧
      (∀ reqs r p, p ∈ L → Alg reqs p ≤ Alg (reqs ++ [r]) p))
    (h_feasible : ∀ reqs, (∀ c ∈ reqs, 1 ≤ c.1 ∧ c.1 ≤ c.2 ∧ c.2 < (n : ℤ)) →
      ∀ c ∈ reqs, 1 ≤ ∑ p ∈ L.filter (fun p => (c.1 ≤ p.1 ∧ p.1 ≤ c.2) ↔ ¬(c.1 ≤ p.2 ∧ p.2 ≤ c.2)), Alg reqs p) :
    ((k : ℝ) - 1) / 2 * (2 : ℝ) ^ (k - 1) ≤
      ∑ v ∈ Finset.Icc (1 : ℤ) ((2 : ℤ) ^ (k - 1)), ∑ p ∈ L, Alg (ocacagChain k v) p
offline_opt_le_scheduleIn LeanOnline Algorithms

For every finite list of jobs J and every offline assignment σ of jobs to 4 machines, the offline optimum makespan is at most the makespan achieved by σ (the maximum machine load under σ).

theorem offline_opt_le_schedule (J : List ℝ) (σ : Fin J.length → Fin 4) :
    (Finset.univ.inf' Finset.univ_nonempty (fun σ' : Fin J.length → Fin 4 =>
      Finset.univ.sup' Finset.univ_nonempty (fun i : Fin 4 =>
        ∑ k : Fin J.length, if σ' k = i then J[k.1] else 0))) ≤
    (Finset.univ.sup' Finset.univ_nonempty (fun i : Fin 4 =>
      ∑ k : Fin J.length, if σ k = i then J[k.1] else 0))
omsr_deterministic_greedy_existsIn LeanOnline Algorithms

For any resource weights w, there exists a deterministic greedy online policy π that always selects a valid probe sequence and achieves the maximal single-arrival probeValue over all valid probe sequences from available set S.

theorem omsr_deterministic_greedy_exists (n : ℕ) (w : Fin n → ℝ) :
    ∃ π : OMSRArrival n → Finset (Fin n) → List (Fin n),
      (∀ arr S, IsValidProbeSeq arr S (π arr S)) ∧
      (∀ arr S L, IsValidProbeSeq arr S L →
        probeValue arr w (fun _ => 0) S L ≤ probeValue arr w (fun _ => 0) S (π arr S))
omsr_deterministic_policy_embeddingIn LeanOnline Algorithms

For any deterministic policy π valid on all arrivals and states there is a randomized policy R (sample space a point mass) whose expected online value on every arrival list equals the deterministic value of π from the full resource set.

theorem omsr_deterministic_policy_embedding {n : ℕ} (w : Fin n → ℝ) (π : OMSRArrival n → Finset (Fin n) → List (Fin n)) (hπ : ∀ arr S, IsValidProbeSeq arr S (π arr S)) : ∃ R : RandomizedOMSRPolicy n, ∀ arrs : List (OMSRArrival n), expectedOnlineValue w R arrs = onlinePolicyValue w π arrs Finset.univ
omsr_expectedOnlineValue_finite_mixtureIn LeanOnline Algorithms

Any finite family of deterministic valid online policies, averaged uniformly, is realised by a genuinely randomized policy: there is a RandomizedOMSRPolicy whose expected online value on every arrival list equals the average of the deterministic values of the family.

theorem omsr_expectedOnlineValue_finite_mixture {n : ℕ} (w : Fin n → ℝ)
    (ι : Type) [Fintype ι] [Nonempty ι]
    (π : ι → OMSRArrival n → Finset (Fin n) → List (Fin n))
    (hπ : ∀ j arr S, IsValidProbeSeq arr S (π j arr S)) :
    ∃ R : RandomizedOMSRPolicy n,
      ∀ arrs : List (OMSRArrival n),
        expectedOnlineValue w R arrs
          = (∑ j, onlinePolicyValue w (π j) arrs Finset.univ) / (Fintype.card ι)
omsr_expectedOnlineValue_le_sum_weightsIn LeanOnline Algorithms

The expected reward of any randomized online policy is at most the total weight of all resources.

theorem omsr_expectedOnlineValue_le_sum_weights {n : ℕ} (w : Fin n → ℝ) (hw : ∀ i, 0 ≤ w i) (R : RandomizedOMSRPolicy n) (arrs : List (OMSRArrival n)) : expectedOnlineValue w R arrs ≤ ∑ i, w i
omsr_expectedOnlineValue_nilIn LeanOnline Algorithms

The expected reward of any randomized online policy on an empty list of arrivals is 0.

theorem omsr_expectedOnlineValue_nil {n : ℕ} (w : Fin n → ℝ) (R : RandomizedOMSRPolicy n) : expectedOnlineValue w R [] = 0
omsr_expectedOnlineValue_nonnegIn LeanOnline Algorithms

For non-negative weights, the expected online value of any randomized policy on any arrival list is non-negative.

theorem omsr_expectedOnlineValue_nonneg {n : ℕ} (w : Fin n → ℝ) (hw : ∀ i, 0 ≤ w i) (R : RandomizedOMSRPolicy n) (arrs : List (OMSRArrival n)) : 0 ≤ expectedOnlineValue w R arrs
omsr_greedy_half_competitive_of_argmaxIn LeanOnline Algorithms

Any deterministic online policy that achieves maximal single-arrival probeValue on each arrival earns at least half of the offlineOptValue benchmark on every arrival list arrs.

theorem omsr_greedy_half_competitive_of_argmax (n : ℕ) (w : Fin n → ℝ) (hw : ∀ i, 0 ≤ w i)
    (π : OMSRArrival n → Finset (Fin n) → List (Fin n))
    (hπ_valid : ∀ arr S, IsValidProbeSeq arr S (π arr S))
    (hπ_max : ∀ arr S L, IsValidProbeSeq arr S L →
      probeValue arr w (fun _ => 0) S L ≤ probeValue arr w (fun _ => 0) S (π arr S))
    (arrs : List (OMSRArrival n)) :
    offlineOptValue w arrs ≤ 2 * onlinePolicyValue w π arrs Finset.univ
omsr_offlineOptValue_le_sum_weightsIn LeanOnline Algorithms

offlineOptValue is at most the sum of all weights.

theorem omsr_offlineOptValue_le_sum_weights {n : ℕ} (w : Fin n → ℝ) (hw : ∀ i, 0 ≤ w i) (arrs : List (OMSRArrival n)) : offlineOptValue w arrs ≤ ∑ i, w i
omsr_offlineOptValue_nilIn LeanOnline Algorithms

offlineOptValue on the empty arrival list is 0.

theorem omsr_offlineOptValue_nil {n : ℕ} (w : Fin n → ℝ) : offlineOptValue w ([] : List (OMSRArrival n)) = 0
omsr_offlineOptValue_nonnegIn LeanOnline Algorithms

offlineOptValue is non-negative, for arbitrary (not necessarily non-negative) weights.

theorem omsr_offlineOptValue_nonneg {n : ℕ} (w : Fin n → ℝ) (arrs : List (OMSRArrival n)) : 0 ≤ offlineOptValue w arrs
omsr_onlinePolicyValue_consIn LeanOnline Algorithms

The online value of arr :: rest is the probe value of the policy's probe sequence against the arrival, with continuation the online value of the tail.

theorem omsr_onlinePolicyValue_cons {n : ℕ} (w : Fin n → ℝ) (π : OMSRArrival n → Finset (Fin n) → List (Fin n)) (arr : OMSRArrival n) (rest : List (OMSRArrival n)) (S : Finset (Fin n)) : onlinePolicyValue w π (arr :: rest) S = probeValue arr w (fun S' => onlinePolicyValue w π rest S') S (π arr S)
omsr_onlinePolicyValue_le_sum_weightsIn LeanOnline Algorithms

Any deterministic online policy that respects availability and patience on each arrival earns at most the total weight of the currently available resources, on every arrival list.

theorem omsr_onlinePolicyValue_le_sum_weights {n : ℕ} (w : Fin n → ℝ) (hw : ∀ i, 0 ≤ w i) (π : OMSRArrival n → Finset (Fin n) → List (Fin n)) (hπ : ∀ arr S, IsValidProbeSeq arr S (π arr S)) (arrs : List (OMSRArrival n)) (S : Finset (Fin n)) : onlinePolicyValue w π arrs S ≤ ∑ i ∈ S, w i
omsr_onlinePolicyValue_nilIn LeanOnline Algorithms

On no arrivals a deterministic online policy earns nothing.

theorem omsr_onlinePolicyValue_nil {n : ℕ} (w : Fin n → ℝ) (π : OMSRArrival n → Finset (Fin n) → List (Fin n)) (S : Finset (Fin n)) : onlinePolicyValue w π [] S = 0
omsr_onlinePolicyValue_nonnegIn LeanOnline Algorithms

A deterministic online policy's expected reward is non-negative for non-negative weights.

theorem omsr_onlinePolicyValue_nonneg {n : ℕ} (w : Fin n → ℝ) (hw : ∀ i, 0 ≤ w i) (π : OMSRArrival n → Finset (Fin n) → List (Fin n)) (arrs : List (OMSRArrival n)) (S : Finset (Fin n)) : 0 ≤ onlinePolicyValue w π arrs S
omsr_optDP_le_sum_weightsIn LeanOnline Algorithms

For non-negative weights, optDP at any fuel, available set S and arrival state is at most the total weight of S.

theorem omsr_optDP_le_sum_weights {n m : ℕ} (w : Fin n → ℝ) (hw : ∀ i, 0 ≤ w i) (arrs : Fin m → OfflineArrival n) (S : Finset (Fin n)) (fuel : ℕ) : optDP w fuel S arrs ≤ ∑ i ∈ S, w i
omsr_optDP_nonnegIn LeanOnline Algorithms

optDP is non-negative for every fuel, available set and arrival state, with no hypothesis on the weights.

theorem omsr_optDP_nonneg {n m : ℕ} (w : Fin n → ℝ) (fuel : ℕ) (S : Finset (Fin n)) (arrs : Fin m → OfflineArrival n) : 0 ≤ optDP w fuel S arrs
omsr_probeValue_consIn LeanOnline Algorithms

Probing i :: L succeeds with probability arr.prob i, gaining w i and continuing from S.erase i, and otherwise continues along L.

theorem omsr_probeValue_cons {n : ℕ} (arr : OMSRArrival n) (w : Fin n → ℝ) (V : Finset (Fin n) → ℝ) (S : Finset (Fin n)) (i : Fin n) (L : List (Fin n)) : probeValue arr w V S (i :: L) = arr.prob i * (w i + V (S.erase i)) + (1 - arr.prob i) * probeValue arr w V S L
omsr_probeValue_le_sum_weightsIn LeanOnline Algorithms

If the continuation is bounded by the total weight of the available set and the probe sequence only uses available resources, then probeValue is bounded by the total weight of the available set.

theorem omsr_probeValue_le_sum_weights {n : ℕ} (arr : OMSRArrival n) (w : Fin n → ℝ) (V : Finset (Fin n) → ℝ) (hV : ∀ S, V S ≤ ∑ i ∈ S, w i) (S : Finset (Fin n)) (L : List (Fin n)) (hL : ∀ i ∈ L, i ∈ S) : probeValue arr w V S L ≤ ∑ i ∈ S, w i
omsr_probeValue_mono_continuationIn LeanOnline Algorithms

probeValue is monotone in the continuation value function, pointwise.

theorem omsr_probeValue_mono_continuation {n : ℕ} (arr : OMSRArrival n) (w : Fin n → ℝ) (V V' : Finset (Fin n) → ℝ) (h : ∀ S, V S ≤ V' S) (S : Finset (Fin n)) (L : List (Fin n)) : probeValue arr w V S L ≤ probeValue arr w V' S L
omsr_probeValue_nilIn LeanOnline Algorithms

Probing the empty sequence yields the continuation value at the current available set.

theorem omsr_probeValue_nil {n : ℕ} (arr : OMSRArrival n) (w : Fin n → ℝ) (V : Finset (Fin n) → ℝ) (S : Finset (Fin n)) : probeValue arr w V S [] = V S
omsr_probeValue_nonnegIn LeanOnline Algorithms

probeValue is non-negative when the weights are non-negative, the probabilities lie in [0,1] and the continuation is non-negative.

theorem omsr_probeValue_nonneg {n : ℕ} (arr : OMSRArrival n) (w : Fin n → ℝ) (hw : ∀ i, 0 ≤ w i) (V : Finset (Fin n) → ℝ) (hV : ∀ S, 0 ≤ V S) (S : Finset (Fin n)) (L : List (Fin n)) : 0 ≤ probeValue arr w V S L
oneshot_drf_competitive_ratio2_bdd_aboveIn LeanOnline Algorithms

The set of completion time ratios achieved by one-shot DRF over all two-resource instances is bounded above.

theorem oneshot_drf_competitive_ratio2_bdd_above : BddAbove { ρ | ∃ I : MultidimInstance2, ρ = oneshot_drf_total_completion_time2 I / multidim_opt2 I }
online_connectivity_augmentation_reduction_to_cycleIn LeanOnline Algorithms

Let V be a type with decidable equality, L a finite set of candidate links in Sym2 V, w a real cost function on links, and α a real number. Let min_cuts_G and min_cuts_H be sets of cuts (finite subsets of V) satisfying min_cuts_G ⊆ min_cuts_H. If an online algorithm Alg maintaining subsets of L irrevocably (Alg reqs ⊆ L and Alg reqs ⊆ Alg (reqs ++ [r])) is feasible for cut arrivals in min_cuts_H (every cut c in reqs is covered by some e ∈ Alg reqs with ∃ u v, e = s(u, v) ∧ ((u ∈ c ∧ v ∉ c) ∨ (v ∈ c ∧ u ∉ c))) and α-competitive against every offline solution F ⊆ L covering reqs (∑ e ∈ Alg reqs, w e ≤ α * ∑ e ∈ F, w e), then Alg is also an irrevocable online algorithm for cut arrivals in min_cuts_G that is feasible and α-competitive.

open Finset BigOperators in
theorem online_connectivity_augmentation_reduction_to_cycle
    {V : Type*} [DecidableEq V]
    (L : Finset (Sym2 V)) (w : Sym2 V → ℝ) (α : ℝ)
    (min_cuts_G min_cuts_H : Set (Finset V))
    (h_circumference : min_cuts_G ⊆ min_cuts_H)
    (Alg : List (Finset V) → Finset (Sym2 V))
    (h_online : (∀ reqs, Alg reqs ⊆ L) ∧ (∀ reqs r, Alg reqs ⊆ Alg (reqs ++ [r])))
    (h_cycle_feas : ∀ reqs, (∀ c ∈ reqs, c ∈ min_cuts_H) →
      ∀ c ∈ reqs, ∃ e ∈ Alg reqs, ∃ u v, e = s(u, v) ∧ ((u ∈ c ∧ v ∉ c) ∨ (v ∈ c ∧ u ∉ c)))
    (h_cycle_comp : ∀ reqs, (∀ c ∈ reqs, c ∈ min_cuts_H) →
      ∀ F ⊆ L, (∀ c ∈ reqs, ∃ e ∈ F, ∃ u v, e = s(u, v) ∧ ((u ∈ c ∧ v ∉ c) ∨ (v ∈ c ∧ u ∉ c))) →
        ∑ e ∈ Alg reqs, w e ≤ α * ∑ e ∈ F, w e) :
    ((∀ reqs, Alg reqs ⊆ L) ∧ (∀ reqs r, Alg reqs ⊆ Alg (reqs ++ [r]))) ∧
    (∀ reqs, (∀ c ∈ reqs, c ∈ min_cuts_G) →
      ∀ c ∈ reqs, ∃ e ∈ Alg reqs, ∃ u v, e = s(u, v) ∧ ((u ∈ c ∧ v ∉ c) ∨ (v ∈ c ∧ u ∉ c))) ∧
    ∀ reqs, (∀ c ∈ reqs, c ∈ min_cuts_G) →
      ∀ F ⊆ L, (∀ c ∈ reqs, ∃ e ∈ F, ∃ u v, e = s(u, v) ∧ ((u ∈ c ∧ v ∉ c) ∨ (v ∈ c ∧ u ∉ c))) →
        ∑ e ∈ Alg reqs, w e ≤ α * ∑ e ∈ F, w e
online_cycle_augmentation_adversary_cost_geIn LeanOnline Algorithms

Let k ≥ 2 be an integer, n = 2^k, and L the set of all pairs (i, j) of integers with 0 ≤ i < j < n. For every online fractional algorithm Alg for Online Cycle Augmentation on an n-vertex cycle with candidate links L (mapping cut sequences to non-negative link weights, non-decreasing under sequence extensions, such that for every valid cut sequence cuts with 1 ≤ c.1 ≤ c.2 < n each cut c ∈ cuts is fractionally covered by at least 1), there exists a valid sequence of cuts cuts and a link p_opt in L crossing every cut in cuts such that the total fractional cost of Alg on cuts is at least (k - 1) / 2.

open Finset Classical in
theorem online_cycle_augmentation_adversary_cost_ge
    (k : ℕ) (hk : 2 ≤ k) (n : ℕ) (hn : n = 2 ^ k)
    (L : Finset (ℤ × ℤ))
    (hL : ∀ p, p ∈ L ↔ 0 ≤ p.1 ∧ p.1 < p.2 ∧ p.2 < (n : ℤ))
    (Alg : List (ℤ × ℤ) → (ℤ × ℤ → ℝ))
    (h_online : (∀ reqs p, p ∈ L → 0 ≤ Alg reqs p) ∧
      (∀ reqs r p, p ∈ L → Alg reqs p ≤ Alg (reqs ++ [r]) p))
    (h_feasible : ∀ reqs, (∀ c ∈ reqs, 1 ≤ c.1 ∧ c.1 ≤ c.2 ∧ c.2 < (n : ℤ)) →
      ∀ c ∈ reqs, 1 ≤ ∑ p ∈ L.filter (fun p => (c.1 ≤ p.1 ∧ p.1 ≤ c.2) ↔ ¬(c.1 ≤ p.2 ∧ p.2 ≤ c.2)), Alg reqs p) :
    ∃ (cuts : List (ℤ × ℤ)) (p_opt : ℤ × ℤ),
      (∀ c ∈ cuts, 1 ≤ c.1 ∧ c.1 ≤ c.2 ∧ c.2 < (n : ℤ)) ∧
      p_opt ∈ L ∧
      (∀ c ∈ cuts, (c.1 ≤ p_opt.1 ∧ p_opt.1 ≤ c.2) ↔ ¬(c.1 ≤ p_opt.2 ∧ p_opt.2 ≤ c.2)) ∧
      ((k : ℝ) - 1) / 2 ≤ ∑ p ∈ L, Alg cuts p
online_cycle_augmentation_fractional_lower_boundIn LeanOnline Algorithms

Let k ≥ 2 be an integer, n = 2^k, and L the set of all pairs (i, j) of integers with 0 ≤ i < j < n. In the Online Cycle Augmentation Problem on an n-vertex cycle with candidate links L of unit weights under cut arrivals, if an online fractional algorithm Alg achieves a competitive ratio α against the offline optimum (meaning that for every valid cut sequence cuts with 1 ≤ c.1 ≤ c.2 < n and every offline solution F ⊆ L covering all cuts in cuts, the fractional cost of Alg on cuts is at most α times the cardinality of F), then α is at least (k - 1) / 2 = (1/2) * (log_2 n - 1).

open Finset Classical in
theorem online_cycle_augmentation_fractional_lower_bound
    (k : ℕ) (hk : 2 ≤ k) (n : ℕ) (hn : n = 2 ^ k)
    (L : Finset (ℤ × ℤ))
    (hL : ∀ p, p ∈ L ↔ 0 ≤ p.1 ∧ p.1 < p.2 ∧ p.2 < (n : ℤ))
    (Alg : List (ℤ × ℤ) → (ℤ × ℤ → ℝ))
    (h_online : (∀ reqs p, p ∈ L → 0 ≤ Alg reqs p) ∧
      (∀ reqs r p, p ∈ L → Alg reqs p ≤ Alg (reqs ++ [r]) p))
    (h_feasible : ∀ reqs, (∀ c ∈ reqs, 1 ≤ c.1 ∧ c.1 ≤ c.2 ∧ c.2 < (n : ℤ)) →
      ∀ c ∈ reqs, 1 ≤ ∑ p ∈ L.filter (fun p => (c.1 ≤ p.1 ∧ p.1 ≤ c.2) ↔ ¬(c.1 ≤ p.2 ∧ p.2 ≤ c.2)), Alg reqs p)
    (α : ℝ)
    (h_comp : ∀ reqs, (∀ c ∈ reqs, 1 ≤ c.1 ∧ c.1 ≤ c.2 ∧ c.2 < (n : ℤ)) →
      ∀ F ⊆ L, (∀ c ∈ reqs, ∃ p ∈ F, (c.1 ≤ p.1 ∧ p.1 ≤ c.2) ↔ ¬(c.1 ≤ p.2 ∧ p.2 ≤ c.2)) →
        ∑ p ∈ L, Alg reqs p ≤ α * (F.card : ℝ)) :
    ((k : ℝ) - 1) / 2 ≤ α
online_makespan_four_machines_lower_boundIn LeanOnline Algorithms

No deterministic online algorithm for makespan minimization on 4 identical machines achieves a competitive ratio smaller than 14350/8283: for every online policy assigning jobs in Fin 4 given history and every real number c, if the policy is c-competitive (its makespan on any finite sequence of jobs with positive sizes is at most c times the offline optimum makespan), then 14350/8283 ≤ c.

theorem online_makespan_four_machines_lower_bound
    (policy : List ℝ → ℝ → Fin 4) (c : ℝ)
    (hc : ∀ J : List ℝ, (∀ p ∈ J, 0 < p) →
      (Finset.univ.sup' Finset.univ_nonempty (fun i : Fin 4 =>
        ∑ k : Fin J.length, if policy (J.take k.1) J[k.1] = i then J[k.1] else 0)) ≤
      c * (Finset.univ.inf' Finset.univ_nonempty (fun σ : Fin J.length → Fin 4 =>
        Finset.univ.sup' Finset.univ_nonempty (fun i : Fin 4 =>
          ∑ k : Fin J.length, if σ k = i then J[k.1] else 0)))) :
    (14350 / 8283 : ℝ) ≤ c
online_makespan_four_machines_single_branching_lower_boundIn LeanOnline Algorithms

No deterministic online algorithm for makespan minimization on 4 identical machines achieves a competitive ratio smaller than 14383/8304: for every online policy assigning jobs in Fin 4 given history and every real number c, if the policy is c-competitive (its makespan on any finite sequence of jobs with positive sizes is at most c times the offline optimum makespan), then 14383/8304 ≤ c.

theorem online_makespan_four_machines_single_branching_lower_bound
    (policy : List ℝ → ℝ → Fin 4) (c : ℝ)
    (hc : ∀ J : List ℝ, (∀ p ∈ J, 0 < p) →
      (Finset.univ.sup' Finset.univ_nonempty (fun i : Fin 4 =>
        ∑ k : Fin J.length, if policy (J.take k.1) J[k.1] = i then J[k.1] else 0)) ≤
      c * (Finset.univ.inf' Finset.univ_nonempty (fun σ : Fin J.length → Fin 4 =>
        Finset.univ.sup' Finset.univ_nonempty (fun i : Fin 4 =>
          ∑ k : Fin J.length, if σ k = i then J[k.1] else 0)))) :
    (14383 / 8304 : ℝ) ≤ c
op869_color_set_amplificationIn LeanOnline Algorithms

If P and Q each have at least a elements and X has t elements disjoint from P, then P union Q or Q union X has at least a plus ceil(t/2) elements.

theorem op869_color_set_amplification {α : Type} [DecidableEq α] (P Q X : Finset α) (a t : ℕ) :
    a ≤ P.card → a ≤ Q.card → X.card = t → Disjoint X P →
    a + (t + 1) / 2 ≤ (P ∪ Q).card ∨ a + (t + 1) / 2 ≤ (Q ∪ X).card
op869_disjoint_reserved_copiesIn LeanOnline Algorithms

If each of q colors occurs in at least qD copies, one can reserve D copies for each color so that reservations for different colors are disjoint.

theorem op869_disjoint_reserved_copies {α : Type} [DecidableEq α] (q D : ℕ) (S : Fin q → Finset α) :
    (∀ i, q * D ≤ (S i).card) →
    ∃ T : Fin q → Finset α, (∀ i, T i ⊆ S i ∧ (T i).card = D) ∧
      (∀ i j, i ≠ j → Disjoint (T i) (T j))
op869_incidence_degree_countIn LeanOnline Algorithms

For a finite incidence relation in which each element of A is incident with at least d elements of B, and 1 ≤ r ≤ |A|, the incidence count |A|d is at most |B|(r−1) plus (|A|−(r−1)) times the number of elements of B incident with at least r elements of A.

theorem op869_incidence_degree_count {α β : Type} [DecidableEq α] [DecidableEq β] (A : Finset α) (B : Finset β)
    (R : α → β → Prop) [DecidableRel R] (d r : ℕ) :
    1 ≤ r → r ≤ A.card → (∀ a ∈ A, d ≤ (B.filter (R a)).card) →
    A.card * d ≤ B.card * (r - 1) +
      (A.card - (r - 1)) * (B.filter (fun b => r ≤ (A.filter (fun a => R a b)).card)).card
op869_integer_fold_schedule_conditionalIn LeanOnline Algorithms

Assuming the stated fold simulation bound with constant C, the integer schedule m, m squared, up to m to the m forces m to the m colors on any sufficiently large n, with explicit budget F to the m squared and post-degree F to the m, where F is C times K cubed times 2 to the C times (m+1), and K=m to the m.

theorem op869_integer_fold_schedule_conditional (C m : ℕ) (hC : 1 ≤ C) (hm : 2 ≤ m) (hsim : ∀ n q t K D : ℕ, 1 ≤ t → t ≤ q → q ≤ K → 1 ≤ D → op869_bounded_adversary_forces 3 q K D n 0 (fun _ : Fin n => ∅) (fun _ : Fin n => ∅) → ∀ n' D' : ℕ, C * K^2 * q * n * D * 2^(C * ((q + t - 1) / t)) ≤ n' → C * K^2 * q * D * 2^(C * ((q + t - 1) / t)) ≤ D' → op869_bounded_adversary_forces 3 t K D' n' 0 (fun _ : Fin n' => ∅) (fun _ : Fin n' => ∅)) : let K := m^m; let F := C * K^3 * 2^(C * (m+1)); ∀ n : ℕ, F^(m^2) ≤ n → op869_bounded_adversary_forces 3 1 K (F^m) n 0 (fun _ : Fin n => ∅) (fun _ : Fin n => ∅)
op869_integer_fold_stage_budgetIn LeanOnline Algorithms

For an integer m-level fold schedule, each simulation stage fits in the next square-exponent vertex budget and the next power post-degree budget.

theorem op869_integer_fold_stage_budget (C m j : ℕ) (hC : 1 ≤ C) (hm : 2 ≤ m) (hj : j < m) : let K := m^m; let F := C*K^3*2^(C*(m+1)); let t := m^(m-(j+1)); let q := m^(m-j); C*K^2*q*F^(j^2)*F^j*2^(C*((q+t-1)/t)) ≤ F^((j+1)^2) ∧ C*K^2*q*F^j*2^(C*((q+t-1)/t)) ≤ F^(j+1)
op869_orient_three_color_blocksIn LeanOnline Algorithms

For each bipartite block with a three-colored owner and at most one three-colored target of a different color, its two sides can be assigned the two colors different from the owner so that the designated side has the target color when a target exists.

theorem op869_orient_three_color_blocks {V B : Type} (φ : V → Fin 3) (owner : B → V)
    (target : B → Option V) (selected : B → Bool) :
    (∀ b v, target b = some v → φ v ≠ φ (owner b)) →
    ∃ left right : B → Fin 3, ∀ b,
      left b ≠ φ (owner b) ∧ right b ≠ φ (owner b) ∧ left b ≠ right b ∧
      ∀ v, target b = some v → (if selected b then left b else right b) = φ v
op869_repeated_color_incidenceIn LeanOnline Algorithms

Suppose there are KqD copies and fewer than K colors, and every copy contains at least q colors. If 1 ≤ q ≤ K and D ≥ 1, at least q colors occur in at least qD copies each.

theorem op869_repeated_color_incidence {α β : Type} [DecidableEq α] [DecidableEq β] (A : Finset α) (B : Finset β)
    (R : α → β → Prop) [DecidableRel R] (K q D : ℕ) :
    1 ≤ q → q ≤ K → 1 ≤ D → A.card = K * q * D → B.card < K →
    (∀ a ∈ A, q ≤ (B.filter (R a)).card) →
    q ≤ (B.filter (fun b => q * D ≤ (A.filter (fun a => R a b)).card)).card
op869_three_colorable_fold_simulationIn LeanOnline Algorithms

There is an absolute positive integer C such that a q-fold three-colorable bounded adversary forcing K colors on n vertices with post-degree at most D can be simulated by a t-fold adversary, for 1 ≤ t ≤ q ≤ K and D ≥ 1, on any sufficiently large n′ with post-degree bound D′, when n′ and D′ dominate the respective explicit bounds in the Lean statement.

theorem op869_three_colorable_fold_simulation : ∃ C : ℕ, 1 ≤ C ∧ ∀ n q t K D : ℕ,
  1 ≤ t → t ≤ q → q ≤ K → 1 ≤ D →
  op869_bounded_adversary_forces 3 q K D n 0 (fun _ : Fin n => ∅) (fun _ : Fin n => ∅) →
  ∀ n' D' : ℕ,
  C * K^2 * q * n * D * 2^(C * ((q + t - 1) / t)) ≤ n' →
  C * K^2 * q * D * 2^(C * ((q + t - 1) / t)) ≤ D' →
  op869_bounded_adversary_forces 3 t K D' n' 0 (fun _ : Fin n' => ∅) (fun _ : Fin n' => ∅)
op869_two_sided_colors_by_orientationIn LeanOnline Algorithms

If each marked color occurs in at least two distinct copies, the copies can be oriented so at least half the marked colors occur on both sides.

theorem op869_two_sided_colors_by_orientation {γ : Type} [DecidableEq γ] (m : ℕ) (C : Finset γ)
    (R : Fin m → γ → Prop) [DecidableRel R] :
    (∀ c ∈ C, ∃ a b : Fin m, a ≠ b ∧ R a c ∧ R b c) →
    ∃ s : Finset (Fin m), C.card ≤ 2 * (C.filter (fun c =>
      (∃ a : Fin m, a ∈ s ∧ R a c) ∧ (∃ b : Fin m, b ∉ s ∧ R b c))).card
op_902_poly_coins_algorithm_tail_boundIn LeanOnline Algorithms

There exists a randomized online carpooling algorithm with a polynomial coin budget num_coins such that for every natural number n ≥ 2, every valid edge sequence on Fin n of length T ≥ 2, and every threshold D ≥ 300, the uniform probability that the maximum discrepancy across all time steps is at least D is at most 12 * T * exp(-(D/40)^3).

theorem op_902_poly_coins_algorithm_tail_bound :
    ∃ (alg : RandomizedOnlineCarpoolingAlg),
      (∃ (p : Polynomial ℕ), ∀ (n T : ℕ), alg.num_coins n T ≤ Polynomial.eval (n + T) p) ∧
      ∀ (n : ℕ) (hn : 2 ≤ n) (edges : List (Fin n × Fin n))
        (hedges : ValidCarpoolEdgeSequence n edges) (hT : 2 ≤ edges.length)
        (D : ℕ) (hD : 300 ≤ D),
        let T := edges.length
        let K := alg.num_coins n T
        let high_discrepancy := Finset.univ.filter (fun r : Fin K → Bool =>
          D ≤ carpool_max_discrepancy n edges
            (online_carpool_orientations n (alg.orient n T) edges r))
        ((high_discrepancy.card : ℝ) / (2 ^ K : ℝ)) ≤
          12 * (T : ℝ) * Real.exp (-(((D : ℝ) / 40) ^ 3))
op_902_single_edge_tail_boundIn LeanOnline Algorithms

For any randomized online carpooling algorithm alg, on any valid edge sequence on Fin n (n ≥ 2) of length T = 1 and any threshold D ≥ 300, the uniform probability over coin assignments that the maximum carpooling discrepancy is at least D is at most 12 * T * exp(-(D/40)^3).

theorem op_902_single_edge_tail_bound (alg : RandomizedOnlineCarpoolingAlg)
    (n : ℕ) (hn : 2 ≤ n) (edges : List (Fin n × Fin n))
    (hedges : ValidCarpoolEdgeSequence n edges) (hT : edges.length = 1)
    (D : ℕ) (hD : 300 ≤ D) :
    let T := edges.length
    let K := alg.num_coins n T
    let high_discrepancy := Finset.univ.filter (fun r : Fin K → Bool =>
      D ≤ carpool_max_discrepancy n edges
        (online_carpool_orientations n (alg.orient n T) edges r))
    ((high_discrepancy.card : ℝ) / (2 ^ K : ℝ)) ≤
      12 * (T : ℝ) * Real.exp (-(((D : ℝ) / 40) ^ 3))
optimal_timely_bin_count_step_geIn LeanOnline Algorithms

For a non-empty item set I with uniform sizes s ∈ (0, 1] and valid arrival/deadline windows, optimal_timely_bin_count I ≥ 1 + optimal_timely_bin_count (I \ (thrifty_greedy_step I hI).items).

theorem optimal_timely_bin_count_step_ge (I : Finset TimelyItem) (hI : I.Nonempty)
    (h_time : ∀ p ∈ I, p.arrival ≤ p.deadline)
    (h_id : ∀ p ∈ I, ∀ q ∈ I, p.id = q.id → p = q)
    (s : ℝ) (hs : 0 < s ∧ s ≤ 1) (h_size : ∀ p ∈ I, p.size = s) :
    optimal_timely_bin_count I ≥ 1 + optimal_timely_bin_count (I \ (thrifty_greedy_step I hI).items)
pairwise_current_interaction_boundIn LeanOnline Algorithms

Let y : Fin k → V be an injection into a metric space (V, dist) defining pairwise distinct points. If F : Fin k → Fin k → ℝ satisfies Ohm's law dist(y i, y j) * F i j = h i - h j for all i ≠ j with some voltage vector h : Fin k → ℝ, then for any target index s : Fin k and any distinct labels i, j with i ≠ s and j ≠ s, F i j * (F i s - F j s) ≥ - F i s * F j s.

open Finset in
theorem pairwise_current_interaction_bound
    {V : Type*} [MetricSpace V] {k : ℕ} (y : Fin k → V) (hy : Function.Injective y)
    (F : Fin k → Fin k → ℝ)
    (h : Fin k → ℝ) (h_volt : ∀ i j, i ≠ j → dist (y i) (y j) * F i j = h i - h j)
    (s i j : Fin k) (hi : i ≠ s) (hj : j ≠ s) (hij : i ≠ j) :
    F i j * (F i s - F j s) ≥ - F i s * F j s
random_greedy_survival_poly_coeff_succ_nonnegIn LeanOnline Algorithms

Every non-constant coefficient of the random-greedy survival polynomial is non-negative: for every finite simple graph J and vertex subset A, and every n ≥ 1, the coefficient of Y^n in random_greedy_survival_poly J A is at least 0.

theorem random_greedy_survival_poly_coeff_succ_nonneg
    {V : Type*} [Fintype V] [DecidableEq V]
    (J : SimpleGraph V) [DecidableRel J.Adj] (A : Finset V) :
    ∀ n : ℕ, 0 ≤ (random_greedy_survival_poly J A).coeff (n + 1)
random_greedy_survival_poly_coeff_zero_nonnegIn LeanOnline Algorithms

The constant term of the random-greedy survival polynomial of any finite simple graph J at any vertex subset A is non-negative, equivalently the total mass Σ_{e incident to A} ∫_0^1 P(J-e, A ∪ V(e), s) ds of the recursion is at most 1.

theorem random_greedy_survival_poly_coeff_zero_nonneg
    {V : Type*} [Fintype V] [DecidableEq V]
    (J : SimpleGraph V) [DecidableRel J.Adj] (A : Finset V) :
    0 ≤ (random_greedy_survival_poly J A).coeff 0
random_greedy_survival_poly_eval_oneIn LeanOnline Algorithms

For every finite simple graph J and vertex subset A, the random-greedy survival polynomial evaluated at Y = 1 equals 1; equivalently the coefficients of the polynomial sum to 1, i.e. P(J, A, 0) = 1.

theorem random_greedy_survival_poly_eval_one
    {V : Type*} [Fintype V] [DecidableEq V]
    (J : SimpleGraph V) [DecidableRel J.Adj] (A : Finset V) :
    (random_greedy_survival_poly J A).eval 1 = 1
random_greedy_survival_prob_convex_combination_powersIn LeanOnline Algorithms

For every finite simple graph J on a finite vertex type V with decidable equality and decidable adjacency, and every vertex subset A : Finset V, there exist non-negative coefficients c_n ≥ 0 for n : ℕ with c_n = 0 for all sufficiently large n and sum_{n} c_n = 1 such that for all t in [0, 1], the survival probability random_greedy_survival_prob J A t equals sum_{n} c_n * (1 - t)^n.

theorem random_greedy_survival_prob_convex_combination_powers
    {V : Type*} [Fintype V] [DecidableEq V]
    (J : SimpleGraph V) [DecidableRel J.Adj] (A : Finset V) :
    ∃ (c : ℕ → ℝ), (∀ n, 0 ≤ c n) ∧ (∃ N, ∀ n ≥ N, c n = 0) ∧ (∑' n, c n = 1) ∧
      ∀ t ∈ Set.Icc (0 : ℝ) 1,
        random_greedy_survival_prob J A t = ∑' n, c n * (1 - t) ^ n
subsampled_prophet_inequality_ratio_twoIn LeanOnline Algorithms

For any probability measure P on Ω, independent nonnegative integrable random variables X : Fin n → Ω → ℝ, and subsampling rate r with 0 < r and r ≤ 1, the subsampled prophet benchmark satisfies subsampled_prophet_opt P n X r ≤ 2 * dp_suffix_val P n X r 0.

open MeasureTheory ProbabilityTheory Finset in
theorem subsampled_prophet_inequality_ratio_two {Ω : Type*} [MeasurableSpace Ω] (P : Measure Ω)
    [IsProbabilityMeasure P] (n : ℕ) (X : Fin n → Ω → ℝ) (hX_indep : iIndepFun X P)
    (hX_nonneg : ∀ i, 0 ≤ X i) (hX_int : ∀ i, Integrable (X i) P) (r : ℝ) (hr0 : 0 < r)
    (hr1 : r ≤ 1) :
    subsampled_prophet_opt P n X r ≤ 2 * dp_suffix_val P n X r 0
subsampled_prophet_opt_le_single_thresholdIn LeanOnline Algorithms

For any probability measure P on Ω, nonnegative integrable random variables X : Fin n → Ω → ℝ, subsampling rate r with 0 < r and r ≤ 1, and threshold t with 0 ≤ t, subsampled_prophet_opt P n X r ≤ t + r * ∑ i : Fin n, ∫ ω, max (X i ω - t) 0 ∂P.

open MeasureTheory ProbabilityTheory Finset in
theorem subsampled_prophet_opt_le_single_threshold {Ω : Type*} [MeasurableSpace Ω] (P : Measure Ω)
    [IsProbabilityMeasure P] (n : ℕ) (X : Fin n → Ω → ℝ) (hX_nonneg : ∀ i, 0 ≤ X i)
    (hX_int : ∀ i, Integrable (X i) P) (r : ℝ) (hr0 : 0 < r) (hr1 : r ≤ 1) (t : ℝ) (ht : 0 ≤ t) :
    subsampled_prophet_opt P n X r ≤ t + r * ∑ i : Fin n, ∫ ω, max (X i ω - t) 0 ∂P
subset_expected_transport_cost_nonnegIn LeanOnline Algorithms

For every server placement s : Fin n → X in a pseudo metric space X and every k, the expected subset transport cost g_k = subset_expected_transport_cost n s k is nonnegative.

theorem subset_expected_transport_cost_nonneg {X : Type*} [PseudoMetricSpace X]
    (n : ℕ) (s : Fin n → X) (k : ℕ) :
    0 ≤ subset_expected_transport_cost n s k
subset_expected_transport_cost_symmetryIn LeanOnline Algorithms

For every server placement s : Fin n → X in a pseudo metric space X and every 1 ≤ k < n, the expected subset transport costs satisfy the scaling symmetry k * g_k = (n - k) * g_{n - k}.

theorem subset_expected_transport_cost_symmetry {X : Type*} [PseudoMetricSpace X]
    (n : ℕ) (s : Fin n → X) (k : ℕ) (hk1 : 1 ≤ k) (hkn : k < n) :
    (k : ℝ) * subset_expected_transport_cost n s k =
      ((n - k : ℕ) : ℝ) * subset_expected_transport_cost n s (n - k)
subset_expected_transport_cost_topIn LeanOnline Algorithms

For every server placement s : Fin n → X of n ≥ 1 servers in a pseudo metric space X, the expected subset transport cost for k = n vanishes, g_n = 0.

theorem subset_expected_transport_cost_top {X : Type*} [PseudoMetricSpace X]
    (n : ℕ) (s : Fin n → X) (hn : 1 ≤ n) :
    subset_expected_transport_cost n s n = 0
sum_reciprocal_subset_cost_leIn LeanOnline Algorithms

For any natural number n and any sequence g : ℕ → ℝ with g(k) ≥ 0, g(n) = 0, and symmetry k * g(k) = (n - k) * g(n - k) for 1 ≤ k < n, the double sum ∑_{t=1}^n (1/t) ∑_{k=n-t+1}^n g(k) is bounded above by ∑_{k=1}^n g(k).

theorem sum_reciprocal_subset_cost_le (n : ℕ) (g : ℕ → ℝ)
    (hg_nonneg : ∀ k, 0 ≤ g k)
    (hgn : g n = 0)
    (h_symm : ∀ k, 1 ≤ k → k < n → (k : ℝ) * g k = ((n - k : ℕ) : ℝ) * g (n - k)) :
    ∑ t ∈ Finset.Icc 1 n, (1 / (t : ℝ)) * ∑ k ∈ Finset.Icc (n - t + 1) n, g k ≤ ∑ k ∈ Finset.Icc 1 n, g k
threshold_schedule_min_boundIn LeanOnline Algorithms

For every horizon T ≥ 2, nonnegative increments a : Fin (T - 1) → NNReal with P runs (P = rent_or_buy_num_runs T a), every positive reset price K and every schedule rstar that is optimal with hindsight, the total cost of the threshold schedule is at most the minimum of twice the cost of rstar and the cost of rstar plus (2P - 1)K.

theorem threshold_schedule_min_bound (T : ℕ) (hT : 2 ≤ T) (a : Fin (T - 1) → NNReal) (K : ℝ) (hK : 0 < K) (rstar : Fin T → Bool) (_hopt : is_optimal_schedule T a K rstar) : rent_or_buy_cost T a K (threshold_schedule T a K) ≤ min (2 * rent_or_buy_cost T a K rstar) (rent_or_buy_cost T a K rstar + (2 * (rent_or_buy_num_runs T a : ℝ) - 1) * K)
threshold_schedule_two_competitiveIn LeanOnline Algorithms

For every horizon T, nonnegative increments a : Fin (T - 1) → NNReal, every positive reset price K, and every schedule r : Fin T → Bool, the total cost of the threshold schedule is at most twice the total cost of r.

theorem threshold_schedule_two_competitive (T : ℕ) (a : Fin (T - 1) → NNReal) (K : ℝ) (hK : 0 < K) (r : Fin T → Bool) : rent_or_buy_cost T a K (threshold_schedule T a K) ≤ 2 * rent_or_buy_cost T a K r
thrifty_greedy_count_stepIn LeanOnline Algorithms

For a non-empty finite set of timely items I, thrifty_greedy_count I = 1 + thrifty_greedy_count (I \ (thrifty_greedy_step I hI).items).

theorem thrifty_greedy_count_step (I : Finset TimelyItem) (hI : I.Nonempty) :
    thrifty_greedy_count I = 1 + thrifty_greedy_count (I \ (thrifty_greedy_step I hI).items)
thrifty_greedy_is_validIn LeanOnline Algorithms

Under the problem hypotheses (arrival ≤ deadline, uniform sizes s ∈ (0, 1]), the packing produced by Thrifty-Greedy thrifty_greedy I is a valid timely packing is_valid_timely_packing I (thrifty_greedy I).

theorem thrifty_greedy_is_valid (I : Finset TimelyItem)
    (h_time : ∀ p ∈ I, p.arrival ≤ p.deadline)
    (s : ℝ) (hs : 0 < s ∧ s ≤ 1) (h_size : ∀ p ∈ I, p.size = s) :
    is_valid_timely_packing I (thrifty_greedy I)
thrifty_greedy_step_items_card_posIn LeanOnline Algorithms

For any non-empty finite set of timely items I, removing the items of the first bin produced by thrifty_greedy_step I hI strictly decreases the cardinality: (I \ (thrifty_greedy_step I hI).items).card < I.card.

theorem thrifty_greedy_step_items_card_pos (I : Finset TimelyItem) (hI : I.Nonempty) :
    (I \ (thrifty_greedy_step I hI).items).card < I.card
thrifty_greedy_uniform_size_optimalIn LeanOnline Algorithms

In online timely bin packing, let I : Finset TimelyItem be a finite set of items where every item p ∈ I satisfies p.arrival ≤ p.deadline, items have distinct identifiers (∀ p ∈ I, ∀ q ∈ I, p.id = q.id → p = q), and there exists s : ℝ with 0 < s ∧ s ≤ 1 such that every item p ∈ I has identical size p.size = s. Then Thrifty-Greedy achieves the optimal offline number of bins, that is, thrifty_greedy_count I = optimal_timely_bin_count I.

theorem thrifty_greedy_uniform_size_optimal (I : Finset TimelyItem)
    (h_time : ∀ p ∈ I, p.arrival ≤ p.deadline)
    (h_id : ∀ p ∈ I, ∀ q ∈ I, p.id = q.id → p = q)
    (s : ℝ) (hs : 0 < s ∧ s ≤ 1) (h_size : ∀ p ∈ I, p.size = s) :
    thrifty_greedy_count I = optimal_timely_bin_count I
uniform_kserver_det_bool_two_pow_k_competitiveIn LeanOnline Algorithms

There exists a constant C > 0 such that for every k ≥ 1 and initial configuration a on Fin k → Bool, there exists a deterministic online algorithm that is C * 2^k competitive.

theorem uniform_kserver_det_bool_two_pow_k_competitive :
    ∃ C : ℝ, 0 < C ∧
      ∀ (k : ℕ) (_hk : 1 ≤ k) (a : Fin k → Bool),
        ∃ A, uniform_kserver_det_competitive k A a (C * (2 : ℝ)^k)
uniform_kserver_det_competitive_monoIn LeanOnline Algorithms

If an online algorithm A is γ-competitive for generalized k-server with initial configuration a, and γ ≤ γ', then A is also γ'-competitive.

theorem uniform_kserver_det_competitive_mono {k : ℕ} {M : Fin k → Type*} [∀ i, DecidableEq (M i)]
    (A : List (∀ i, M i) → (∀ i, M i)) (a : ∀ i, M i) {γ γ' : ℝ}
    (hγ : γ ≤ γ') (hA : uniform_kserver_det_competitive k A a γ) :
    uniform_kserver_det_competitive k A a γ'
uniform_kserver_det_lower_bound_multiphaseIn LeanOnline Algorithms

For any deterministic online algorithm A serving requests and any initial configuration a on Fin k → ℕ, and any natural number m, there exists a request sequence ρ such that A incurs deterministic cost at least m * (2^k - 1) while the offline optimum cost is at most m.

theorem uniform_kserver_det_lower_bound_multiphase (k : ℕ) (hk : 1 ≤ k)
    (A : List (Fin k → ℕ) → (Fin k → ℕ)) (hA : uniform_kserver_det_alg_serves A)
    (a : Fin k → ℕ) (m : ℕ) :
    ∃ (ρ : List (Fin k → ℕ)),
      m * (2^k - 1) ≤ uniform_kserver_det_cost A a ρ ∧
      uniform_kserver_opt k a ρ ≤ m
uniform_kserver_det_lower_bound_phaseIn LeanOnline Algorithms

For any deterministic online algorithm A serving requests and any initial configuration a on Fin k → ℕ, there exists a request sequence ρ such that A incurs movement cost at least 2^k - 1, and there exists an offline configuration x_star at Hamming distance at most 1 from a that serves every request in ρ.

theorem uniform_kserver_det_lower_bound_phase (k : ℕ) (hk : 1 ≤ k)
    (A : List (Fin k → ℕ) → (Fin k → ℕ)) (hA : uniform_kserver_det_alg_serves A)
    (a : Fin k → ℕ) :
    ∃ (ρ : List (Fin k → ℕ)) (x_star : Fin k → ℕ),
      2^k - 1 ≤ uniform_kserver_offline_cost a (uniform_kserver_det_schedule A ρ) ∧
      (Finset.univ.filter (fun i => a i ≠ x_star i)).card ≤ 1 ∧
      ∀ r ∈ ρ, uniform_kserver_serves x_star r
uniform_kserver_det_reduction_to_boolIn LeanOnline Algorithms

If an O(2^k) competitive deterministic online algorithm exists for all binary hypercube instances, then an O(2^k) competitive deterministic online algorithm exists for all generalized k-server instances on arbitrary uniform metric spaces.

theorem uniform_kserver_det_reduction_to_bool
    (h_bool : ∃ C : ℝ, 0 < C ∧ ∀ (k : ℕ) (_hk : 1 ≤ k) (a : Fin k → Bool),
      ∃ A, uniform_kserver_det_competitive k A a (C * (2 : ℝ)^k)) :
    ∃ C : ℝ, 0 < C ∧ ∀ (k : ℕ) (hk : 1 ≤ k) {M : Fin k → Type*} [∀ i, DecidableEq (M i)] (a : ∀ i, M i),
      ∃ A, uniform_kserver_det_competitive k A a (C * (2 : ℝ)^k)
uniform_kserver_expected_cost_le_logIn LeanOnline Algorithms

The total expected cost of the algorithm on ρ is at most (k+1) times the logarithm of the ratio of the initial total weight to the final total weight.

theorem uniform_kserver_expected_cost_le_log (k : ℕ) (hk : 1 ≤ k)
    {M : Fin k → Type*} [∀ i, DecidableEq (M i)] (a : ∀ i, M i) (ρ : List (∀ i, M i)) :
    uniform_kserver_expected_cost k a ρ ≤
      ((k : ℝ) + 1) *
        (Real.log (uniform_kserver_total_weight (fun₀ | a => (1:ℝ))) -
         Real.log (uniform_kserver_total_weight
           (ρ.foldl (fun φ r => uniform_kserver_weight_update k r φ) (fun₀ | a => (1:ℝ)))))
uniform_kserver_final_arithIn LeanOnline Algorithms

Elementary real arithmetic: if 0 < P, 1 ≤ (2k)^m · P and E ≤ (k+1)(ln 1 − ln P), then E ≤ (k+1)·ln(2k)·m.

theorem uniform_kserver_final_arith (k m : ℕ) (hk : 1 ≤ k) (E P : ℝ) (hP : 0 < P)
    (h1 : E ≤ ((k:ℝ) + 1) * (Real.log 1 - Real.log P))
    (h2 : 1 ≤ (2 * (k : ℝ)) ^ m * P) :
    E ≤ ((k : ℝ) + 1) * Real.log (2 * (k : ℝ)) * (m : ℝ)
uniform_kserver_final_weight_geIn LeanOnline Algorithms

The final total weight is at least (2k) raised to minus the optimal offline cost: (2k)^OPT times the final total weight is at least 1.

theorem uniform_kserver_final_weight_ge (k : ℕ) (hk : 1 ≤ k)
    {M : Fin k → Type*} [∀ i, DecidableEq (M i)] (a : ∀ i, M i) (ρ : List (∀ i, M i)) :
    1 ≤ (2 * (k : ℝ)) ^ (uniform_kserver_opt k a ρ) *
        uniform_kserver_total_weight
          (ρ.foldl (fun φ r => uniform_kserver_weight_update k r φ) (fun₀ | a => (1:ℝ)))
uniform_kserver_hamming_update_selfIn LeanOnline Algorithms

If configuration x disagrees with request r at coordinate i, then flipping coordinate i of x to r i changes x by Hamming distance exactly 1.

theorem uniform_kserver_hamming_update_self {k : ℕ} {M : Fin k → Type*} [∀ i, DecidableEq (M i)]
    (x r : ∀ i, M i) (i : Fin k) (hi : x i ≠ r i) :
    hammingDist x (Function.update x i (r i)) = 1
uniform_kserver_lazify_scheduleIn LeanOnline Algorithms

Any valid offline schedule can be replaced by a lazy valid schedule (same length, no larger offline cost) in which every move is necessary: whenever the configuration changes, the new configuration is obtained by flipping a single coordinate of the old one to the request's value, and the old configuration did not already serve the request.

theorem uniform_kserver_lazify_schedule (k : ℕ) (hk : 1 ≤ k)
    {M : Fin k → Type*} [∀ i, DecidableEq (M i)]
    (a : ∀ i, M i) (ρ : List (∀ i, M i)) (sched : List (∀ i, M i))
    (hs : uniform_kserver_is_schedule ρ sched) :
    ∃ sched' : List (∀ i, M i), uniform_kserver_is_schedule ρ sched' ∧
      uniform_kserver_offline_cost a sched' ≤ uniform_kserver_offline_cost a sched ∧
      ∀ q ∈ List.zip (List.zip (a :: sched') sched') ρ,
        q.1.1 ≠ q.1.2 → (¬ uniform_kserver_serves q.1.1 q.2 ∧ hammingDist q.1.1 q.1.2 = 1)
uniform_kserver_lazy_optimal_scheduleIn LeanOnline Algorithms

There is an optimal offline schedule in which every move is necessary: whenever the configuration changes, the old configuration did not serve the request and the new one is a single-coordinate repair of it.

theorem uniform_kserver_lazy_optimal_schedule (k : ℕ) (hk : 1 ≤ k)
    {M : Fin k → Type*} [∀ i, DecidableEq (M i)] (a : ∀ i, M i) (ρ : List (∀ i, M i)) :
    ∃ sched : List (∀ i, M i), uniform_kserver_is_schedule ρ sched ∧
      uniform_kserver_offline_cost a sched = uniform_kserver_opt k a ρ ∧
      ∀ q ∈ List.zip (List.zip (a :: sched) sched) ρ,
        q.1.1 ≠ q.1.2 → (¬ uniform_kserver_serves q.1.1 q.2 ∧ hammingDist q.1.1 q.1.2 = 1)
uniform_kserver_opt_attainedIn LeanOnline Algorithms

The optimal offline cost is attained: there is a valid schedule whose offline cost equals uniform_kserver_opt k a ρ.

theorem uniform_kserver_opt_attained (k : ℕ) (hk : 1 ≤ k)
    {M : Fin k → Type*} [∀ i, DecidableEq (M i)] (a : ∀ i, M i) (ρ : List (∀ i, M i)) :
    ∃ sched, uniform_kserver_is_schedule ρ sched ∧
      uniform_kserver_offline_cost a sched = uniform_kserver_opt k a ρ
uniform_kserver_opt_le_schedule_costIn LeanOnline Algorithms

For any natural number k, family of types M with decidable equality, initial configuration a, request list ρ, and valid schedule sched for ρ, the optimal offline cost uniform_kserver_opt k a ρ is at most the offline movement cost uniform_kserver_offline_cost a sched.

theorem uniform_kserver_opt_le_schedule_cost {k : ℕ} {M : Fin k → Type*} [∀ i, DecidableEq (M i)]
    (a : ∀ i, M i) (ρ : List (∀ i, M i)) (sched : List (∀ i, M i))
    (hsched : uniform_kserver_is_schedule ρ sched) :
    uniform_kserver_opt k a ρ ≤ uniform_kserver_offline_cost a sched
uniform_kserver_randomized_competitiveIn LeanOnline Algorithms

Let k be a positive integer, let M be a family of uniform metric spaces indexed by Fin k with decidable equality, and let a be an initial configuration. For every finite request sequence ρ, the expected cost uniform_kserver_expected_cost k a ρ of the randomized online algorithm satisfies uniform_kserver_expected_cost k a ρ ≤ (k + 1) * ln(2k) * uniform_kserver_opt k a ρ.

theorem uniform_kserver_randomized_competitive (k : ℕ) (hk : 1 ≤ k)
    {M : Fin k → Type*} [∀ i, DecidableEq (M i)] (a : ∀ i, M i) (ρ : List (∀ i, M i)) :
    uniform_kserver_expected_cost k a ρ ≤
      ((k : ℝ) + 1) * Real.log (2 * (k : ℝ)) * (uniform_kserver_opt k a ρ : ℝ)
uniform_kserver_serves_bool_complIn LeanOnline Algorithms

For the binary family M i = Bool, a configuration x serves a request r if and only if x does not equal the bitwise complement of r.

theorem uniform_kserver_serves_bool_compl {k : ℕ}
    (x r : Fin k → Bool) :
    uniform_kserver_serves x r ↔ x ≠ fun i => !(r i)
uniform_kserver_step_cost_boundIn LeanOnline Algorithms

For a nonnegative weight function φ of positive total weight, the expected movement cost of one algorithm step is at most (k+1) times the decrease in the logarithm of the total weight, 0 ≤ φ and 0 < total φ.

theorem uniform_kserver_step_cost_bound (k : ℕ) (hk : 1 ≤ k)
    {M : Fin k → Type*} [∀ i, DecidableEq (M i)]
    (r : ∀ i, M i) (φ : (∀ i, M i) →₀ ℝ) (hφ : ∀ x, 0 ≤ φ x)
    (hW : 0 < uniform_kserver_total_weight φ) :
    uniform_kserver_step_expected_cost k r
        ((1 / uniform_kserver_total_weight φ) • φ)
        ((1 / uniform_kserver_total_weight (uniform_kserver_weight_update k r φ)) •
          uniform_kserver_weight_update k r φ)
      ≤ ((k : ℝ) + 1) * (Real.log (uniform_kserver_total_weight φ)
          - Real.log (uniform_kserver_total_weight (uniform_kserver_weight_update k r φ)))
uniform_kserver_step_dist_expected_leIn LeanOnline Algorithms

For a probability distribution μ (nonnegative, total mass 1), the expected Hamming distance moved from a configuration x under one algorithm step is 0 if x already serves the request, and at most (k+1)/2 otherwise. (Here ∃ i, x i = r i is uniform_kserver_serves x r unfolded, so the if is decidable.)

theorem uniform_kserver_step_dist_expected_le (k : ℕ) (hk : 1 ≤ k)
    {M : Fin k → Type*} [∀ i, DecidableEq (M i)]
    (r : ∀ i, M i) (μ : (∀ i, M i) →₀ ℝ) (hμ0 : ∀ y, 0 ≤ μ y)
    (hμ1 : μ.sum (fun _ c => c) = 1) (x : ∀ i, M i) :
    (uniform_kserver_step_dist k r μ x).sum (fun y py => py * (hammingDist x y : ℝ))
      ≤ if (∃ i : Fin k, x i = r i) then 0 else ((k : ℝ) + 1) / 2
uniform_kserver_weight_decay_repairIn LeanOnline Algorithms

If every configuration has nonnegative weight, x does not serve the request, and y = Function.update x i (r i) is a repair of x at coordinate i, then y receives at least a 1/(2k) fraction of x's weight. (This is the repaired, correct form of the decay statement: the target must be an actual repair of x, not an arbitrary serving configuration.)

theorem uniform_kserver_weight_decay_repair (k : ℕ) (hk : 1 ≤ k)
    {M : Fin k → Type*} [∀ i, DecidableEq (M i)]
    (r : ∀ i, M i) (φ : (∀ i, M i) →₀ ℝ) (hφ : ∀ x, 0 ≤ φ x) (x : ∀ i, M i) (i : Fin k)
    (hx : ¬ uniform_kserver_serves x r) :
    φ x / (2 * (k:ℝ)) ≤ uniform_kserver_weight_update k r φ (Function.update x i (r i))
uniform_kserver_weight_retainIn LeanOnline Algorithms

If every configuration has nonnegative weight and x serves the request, then x keeps at least all of its weight across the update.

theorem uniform_kserver_weight_retain (k : ℕ) (hk : 1 ≤ k)
    {M : Fin k → Type*} [∀ i, DecidableEq (M i)]
    (r : ∀ i, M i) (φ : (∀ i, M i) →₀ ℝ) (hφ : ∀ x, 0 ≤ φ x) (x : ∀ i, M i)
    (hx : uniform_kserver_serves x r) :
    φ x ≤ uniform_kserver_weight_update k r φ x
uniform_kserver_weight_update_nonnegIn LeanOnline Algorithms

If every configuration has nonnegative weight, then after a weight update every configuration still has nonnegative weight.

theorem uniform_kserver_weight_update_nonneg (k : ℕ) (hk : 1 ≤ k)
    {M : Fin k → Type*} [∀ i, DecidableEq (M i)] (r : ∀ i, M i) (φ : (∀ i, M i) →₀ ℝ)
    (hφ : ∀ x, 0 ≤ φ x) :
    ∀ y, 0 ≤ uniform_kserver_weight_update k r φ y
uniform_kserver_weight_update_totalIn LeanOnline Algorithms

After a weight update, the total weight equals, summed over the old support, the old weight kept in full at configurations that serve the request and halved at configurations that do not. (Here ∃ i, x i = r i is uniform_kserver_serves x r unfolded, written this way so that the if is decidable.)

theorem uniform_kserver_weight_update_total (k : ℕ) (hk : 1 ≤ k)
    {M : Fin k → Type*} [∀ i, DecidableEq (M i)] (r : ∀ i, M i) (φ : (∀ i, M i) →₀ ℝ) :
    uniform_kserver_total_weight (uniform_kserver_weight_update k r φ)
      = ∑ x ∈ φ.support, (if ∃ i : Fin k, x i = r i then φ x else φ x / 2)
cnf_incidence_graph_adj_inl_inrIn LeanProof Complexity

A variable x and a clause C of F are adjacent in the incidence graph iff some literal of C has variable x.

theorem cnf_incidence_graph_adj_inl_inr {V : Type*} [DecidableEq V] (F : Finset (Finset (CnfLit V))) (x : ↥(cnf_vars F)) (C : ↥F) : (cnf_incidence_graph F).Adj (Sum.inl x) (Sum.inr C) ↔ ∃ l ∈ (C : Finset (CnfLit V)), cnf_lit_var l = (x : V)
cnf_incidence_graph_adj_inr_inlIn LeanProof Complexity

A clause C of F and a variable x are adjacent in the incidence graph iff some literal of C has variable x.

theorem cnf_incidence_graph_adj_inr_inl {V : Type*} [DecidableEq V] (F : Finset (Finset (CnfLit V))) (x : ↥(cnf_vars F)) (C : ↥F) : (cnf_incidence_graph F).Adj (Sum.inr C) (Sum.inl x) ↔ ∃ l ∈ (C : Finset (CnfLit V)), cnf_lit_var l = (x : V)
cnf_incidence_treewidth_le_of_clause_subsetIn LeanProof Complexity

If there is an injective map φ from the clauses of F1 to the clauses of F2 such that every clause of F1 is contained in its image and var(F1) ⊆ var(F2), then tw*(F1) <= tw*(F2).

theorem cnf_incidence_treewidth_le_of_clause_subset {V : Type*} [DecidableEq V] {F₁ F₂ : Finset (Finset (CnfLit V))} (φ : ↥F₁ → ↥F₂) (hφ : Function.Injective φ) (hvars : cnf_vars F₁ ⊆ cnf_vars F₂) (hsub : ∀ D : ↥F₁, (D : Finset (CnfLit V)) ⊆ (φ D : Finset (CnfLit V))) : cnf_incidence_treewidth F₁ ≤ cnf_incidence_treewidth F₂
cnf_incidence_treewidth_monoIn LeanProof Complexity

If every clause of F1 is a clause of F2 then tw*(F1) <= tw*(F2).

theorem cnf_incidence_treewidth_mono {V : Type*} [DecidableEq V] {F₁ F₂ : Finset (Finset (CnfLit V))} (h : F₁ ⊆ F₂) : cnf_incidence_treewidth F₁ ≤ cnf_incidence_treewidth F₂
cnf_incidence_treewidth_pos_of_nonempty_clauseIn LeanProof Complexity

If F contains a nonempty clause then tw*(F) >= 1.

theorem cnf_incidence_treewidth_pos_of_nonempty_clause {V : Type*} [DecidableEq V] (F : Finset (Finset (CnfLit V))) {C : Finset (CnfLit V)} (hC : C ∈ F) (hne : C.Nonempty) : 1 ≤ cnf_incidence_treewidth F
cnf_incidence_treewidth_restrict_leIn LeanProof Complexity

tw*(F|x=b) <= tw*(F) for every variable x and value b.

theorem cnf_incidence_treewidth_restrict_le {V : Type*} [DecidableEq V] (F : Finset (Finset (CnfLit V))) (x : V) (b : Bool) : cnf_incidence_treewidth (cnf_restrict F x b) ≤ cnf_incidence_treewidth F
cnf_restrict_memIn LeanProof Complexity

D is a clause of F|x=b iff D = C.erase l for some clause C of F that does not contain the literal satisfied by x = b, where l is the falsified literal.

theorem cnf_restrict_mem {V : Type*} [DecidableEq V] (F : Finset (Finset (CnfLit V))) (x : V) (b : Bool) (D : Finset (CnfLit V)) : D ∈ cnf_restrict F x b ↔ ∃ C ∈ F, (if b then CnfLit.pos x else CnfLit.neg x) ∉ C ∧ C.erase (if b then CnfLit.neg x else CnfLit.pos x) = D
cnf_restrict_unsatIn LeanProof Complexity

If F is unsatisfiable then so is F|x=b, for either value of b.

theorem cnf_restrict_unsat {V : Type*} [DecidableEq V] (F : Finset (Finset (CnfLit V))) (x : V) (b : Bool) (h : ¬ CnfSatisfiable (F.toList.map Finset.toList)) : ¬ CnfSatisfiable ((cnf_restrict F x b).toList.map Finset.toList)
cnf_satisfiable_restrict_impIn LeanProof Complexity

If a truth assignment satisfies F|x=b, then extending it with x = b satisfies every clause of F: clauses containing the literal satisfied by x = b are satisfied at x, while remaining clauses had the falsified literal erased and their satisfaction in F|x=b lifts to F.

theorem cnf_satisfiable_restrict_imp {V : Type*} [DecidableEq V]
    (F : Finset (Finset (CnfLit V))) (x : V) (b : Bool)
    (h : CnfSatisfiable ((cnf_restrict F x b).toList.map Finset.toList)) :
    CnfSatisfiable (F.toList.map Finset.toList)
cnf_vars_restrict_subsetIn LeanProof Complexity

Every variable occurring in the restriction F|x=b occurs in F and is different from x.

theorem cnf_vars_restrict_subset {V : Type*} [DecidableEq V] (F : Finset (Finset (CnfLit V))) (x : V) (b : Bool) : cnf_vars (cnf_restrict F x b) ⊆ (cnf_vars F).erase x
has_tree_decomposition_of_width_le_graph_treewidthIn LeanProof Complexity

Every finite graph has a tree decomposition of width exactly its treewidth (the treewidth is attained).

theorem has_tree_decomposition_of_width_le_graph_treewidth {α : Type*} [Fintype α] (G : SimpleGraph α) : has_tree_decomposition_of_width_le G (graph_treewidth G)
op_983_bdd_bias_proof_is_weighted_subcube_sumIn LeanProof Complexity

Any bounded-bias depth-three AMC proof of size s at shift ε is a representation of the counting function with ε subtracted as a sum of s nonnegatively weighted subcube indicators: the proof's rank-one summands are exactly nonnegative multiples of subcube indicators, so all bounded-bias lower bounds reduce to lower bounds on weighted subcube sums.

open scoped Classical in
theorem op_983_bdd_bias_proof_is_weighted_subcube_sum (n s : ℕ)
    (A : List (List (CnfLit (Fin n)))) (ε : ℝ)
    (h : has_depth_three_amc_bounded_bias_proof n A ε s) :
    is_weighted_subcube_sum (fun τ : Fin n → Bool =>
      ((A.filter (fun t => ∀ l ∈ t, match l with
        | CnfLit.pos v => τ v = true
        | CnfLit.neg v => τ v = false)).length : ℝ) - ε) s
op_983_bdd_bias_rank_one_is_weighted_subcubeIn LeanProof Complexity

Every bounded-bias rank-one product on the n-cube is a nonnegative multiple of the indicator of a single subcube: there are a set S of fixed coordinates, a partial assignment a on them, and a weight w ≥ 0 with R τ = w if τ agrees with a on S and R τ = 0 otherwise.

theorem op_983_bdd_bias_rank_one_is_weighted_subcube {n : ℕ} (R : (Fin n → Bool) → ℝ)
    (hR : is_bounded_bias_rank_one_product R) :
    ∃ (S : Finset (Fin n)) (a : Fin n → Bool) (w : ℝ), 0 ≤ w ∧
      ∀ τ : Fin n → Bool, R τ = if ∀ i ∈ S, τ i = a i then w else 0
op_983_exists_asymptotic_separation_witnessIn LeanProof Complexity

There exists a constant shift ε ∈ (0, 1] and an asymptotic family of DNF formulas admitting polynomial depth-three AMC proofs while requiring superpolynomial bounded-bias depth-three AMC proofs.

theorem op_983_exists_asymptotic_separation_witness :
    ∃ ε : ℝ, 0 < ε ∧ ε ≤ 1 ∧
      ∃ (v : ℕ → ℕ) (hv : ∀ k, k ≤ v k) (A : (k : ℕ) → List (List (CnfLit (Fin (v k))))),
        ∃ c : ℕ, ∃ k₀ : ℕ,
          (∀ k ≥ k₀, ∃ r ≤ (v k) ^ c + c, has_depth_three_amc_proof (v k) (A k) ε r) ∧
          (∀ c' : ℕ, ∃ k₀' : ℕ, ∀ k ≥ k₀', ∀ s : ℕ, has_depth_three_amc_bounded_bias_proof (v k) (A k) ε s → (v k) ^ c' < s)
op_983_family_amc_upper_boundIn LeanProof Complexity

The explicit family A_n admits an arbitrary-bias depth-three AMC proof of size 1 at shift ε = 1: the counting function is 2^|τ| + 1 terms satisfied, so the required target function is τ ↦ 2^(number of true coordinates), which is the single nonnegative rank-one product with one-variable factors 2 on true and 1 on false.

open scoped Classical in
theorem op_983_family_amc_upper_bound (n : ℕ) :
    has_depth_three_amc_proof n (op_983_dnf_family n) 1 1
op_983_family_bdd_bias_lower_boundIn LeanProof Complexity

The lower-bound half of the separation, for the explicit family at shift ε = 1: every bounded-bias depth-three AMC proof of the explicit family A_n has size s ≥ 2^(n-1), because such a proof exactly represents the function τ ↦ 2^(number of true coordinates of τ) as a sum of s nonnegatively weighted subcube indicators.

open scoped Classical in
theorem op_983_family_bdd_bias_lower_bound (n s : ℕ)
    (h : has_depth_three_amc_bounded_bias_proof n (op_983_dnf_family n) 1 s) :
    2 ^ (n - 1) ≤ s
op_983_family_satisfied_termsIn LeanProof Complexity

For the explicit family A_n (all-positive full-subset terms over Fin n, plus one empty term), the number of terms satisfied by a truth assignment τ equals 2^(number of coordinates on which τ is true) + 1: the term for a subset S is satisfied exactly when S is contained in the set of true coordinates of τ, there are 2^|support| such subsets, and the appended empty term is always satisfied.

open scoped Classical in
theorem op_983_family_satisfied_terms (n : ℕ) (τ : Fin n → Bool) :
    ((op_983_dnf_family n).filter (fun t => ∀ l ∈ t, match l with
        | CnfLit.pos v => τ v = true
        | CnfLit.neg v => τ v = false)).length
      = 2 ^ (Finset.univ.filter (fun i => τ i = true)).card + 1
op_983_poly_lt_two_pow_predIn LeanProof Complexity

For every natural number c there is k₀ such that k^c < 2^(k-1) for every k ≥ k₀. This is the elementary asymptotics that turns the exponential bounded-bias lower bound for the family at v k = k into the required superpolynomial statement.

theorem op_983_poly_lt_two_pow_pred (c : ℕ) : ∃ k₀ : ℕ, ∀ k ≥ k₀, k ^ c < 2 ^ (k - 1)
op_983_separation_at_shift_oneIn LeanProof Complexity

The separation is realised concretely at shift ε = 1 with variable count v k = k and the explicit family A k = op_983_dnf_family k: there is a polynomial upper bound on arbitrary-bias depth-three AMC proof size (size 1, hence 1 ≤ k^1 + 1), and every bounded-bias proof of size s satisfies k^c' < s for large k.

theorem op_983_separation_at_shift_one :
    ∃ (v : ℕ → ℕ) (hv : ∀ k, k ≤ v k) (A : (k : ℕ) → List (List (CnfLit (Fin (v k))))),
      (∃ c : ℕ, ∃ k₀ : ℕ, ∀ k ≥ k₀, ∃ r ≤ (v k) ^ c + c,
        has_depth_three_amc_proof (v k) (A k) 1 r) ∧
      (∀ c' : ℕ, ∃ k₀' : ℕ, ∀ k ≥ k₀', ∀ s : ℕ,
        has_depth_three_amc_bounded_bias_proof (v k) (A k) 1 s → (v k) ^ c' < s)
op_983_subcube_sum_lower_boundIn LeanProof Complexity

The combinatorial core of the separation at constant shift: the function τ ↦ 2^(number of true coordinates of τ) cannot be written as a sum of s nonnegatively weighted subcube indicators of the n-cube unless s ≥ 2^(n-1). This is the pure statement behind the bounded-bias lower bound for the explicit family at shift ε = 1 (transfer via op_983_bdd_bias_proof_is_weighted_subcube_sum), with the AMC packaging removed.

theorem op_983_subcube_sum_lower_bound (n s : ℕ)
    (h : is_weighted_subcube_sum (fun τ : Fin n → Bool =>
      (2:ℝ) ^ (Finset.univ.filter (fun i => τ i = true)).card) s) :
    2 ^ (n - 1) ≤ s
op_983_subcube_sum_lower_bound_positiveIn LeanProof Complexity

Special case of the subcube lower bound, for up-set subcubes only: if 2^(number of true coordinates) is a sum of nonnegatively weighted indicators of subcubes that fix coordinates only to true (i.e. each subcube is the set of τ containing a fixed set S), then at least 2^n terms are needed. This is stronger than the bound 2^(n-1) needed for the separating family, and is proved by induction on n using the facet τ(last) = false and the discrete difference between the two facets.

theorem op_983_subcube_sum_lower_bound_positive {ι : Type*} [Fintype ι]
    (n : ℕ) (w : ι → ℝ) (S : ι → Finset (Fin n)) (hw : ∀ j, 0 ≤ w j)
    (h : ∀ τ : Fin n → Bool,
      (2 : ℝ) ^ (Finset.univ.filter (fun i => τ i = true)).card
        = ∑ j, (if ∀ i ∈ S j, τ i = true then w j else 0)) :
    2 ^ n ≤ Fintype.card ι
op_983_subcube_sum_two_pow_witnessIn LeanProof Complexity

The function τ ↦ 2^(number of true coordinates of τ) is a sum of 2^n nonnegative weighted subcube indicators: index the 2^n assignments y of the n-cube, use the fully fixed subcube {y} with weight 2^(number of true coordinates of y). In particular the class of representable functions is nonempty, and 2^n terms suffice.

theorem op_983_subcube_sum_two_pow_witness (n : ℕ) :
    is_weighted_subcube_sum (fun τ : Fin n → Bool =>
      (2:ℝ) ^ (Finset.univ.filter (fun i => τ i = true)).card) (2 ^ n)
resolution_derivation_restrict_liftIn LeanProof Complexity

If π is a resolution derivation from F|x=b, then there is a resolution derivation from F of length at most |π| + 2|F| whose last clause is the last clause of π with the literal falsified by x = b adjoined.

theorem resolution_derivation_restrict_lift {V : Type*} [DecidableEq V] (F : Finset (Finset (CnfLit V))) (x : V) (b : Bool) (π : List (Finset (CnfLit V))) (h : is_resolution_derivation (cnf_restrict F x b) π) : ∃ π' : List (Finset (CnfLit V)), is_resolution_derivation F π' ∧ π'.getLast? = π.getLast?.map (fun D => D ∪ {(if b then CnfLit.neg x else CnfLit.pos x)}) ∧ π'.length ≤ π.length + 2 * F.card
resolution_derivation_weaken_lastIn LeanProof Complexity

If π is a resolution derivation from F with last clause C and C ⊆ C', then π ++ [C'] is a resolution derivation from F.

theorem resolution_derivation_weaken_last {V : Type*} (F : Finset (Finset (CnfLit V))) (π : List (Finset (CnfLit V))) (C C' : Finset (CnfLit V)) (h : is_resolution_derivation F π) (hl : π.getLast? = some C) (hsub : C ⊆ C') : is_resolution_derivation F (π ++ [C'])
resolution_fpt_incidence_treewidth_fixed_kIn LeanProof Complexity

For every k there are constants C, c with c >= 1 such that every unsatisfiable CNF formula F with tw*(F) <= k has a resolution refutation of length at most C*(|var F| + |F|)^c.

theorem resolution_fpt_incidence_treewidth_fixed_k : ∀ k : ℕ, ∃ C c : ℕ, 1 ≤ c ∧ ∀ F : Finset (Finset (CnfLit ℕ)), cnf_incidence_treewidth F ≤ k → ¬ CnfSatisfiable (F.toList.map Finset.toList) → ∃ π, is_resolution_refutation F π ∧ π.length ≤ C * ((cnf_vars F).card + F.card) ^ c
resolution_fpt_incidence_treewidth_of_treewidth_zeroIn LeanProof Complexity

Every unsatisfiable CNF formula of incidence treewidth 0 has a resolution refutation of length 1, so the target holds with g = 1 and c = 1.

theorem resolution_fpt_incidence_treewidth_of_treewidth_zero : ∃ g : ℕ → ℕ, Computable g ∧ ∃ c : ℕ, 1 ≤ c ∧ ∀ F : Finset (Finset (CnfLit ℕ)), cnf_incidence_treewidth F = 0 → ¬ CnfSatisfiable (F.toList.map Finset.toList) → ∃ π, is_resolution_refutation F π ∧ π.length ≤ g (cnf_incidence_treewidth F) * ((cnf_vars F).card + F.card) ^ c
resolution_fpt_two_clauseIn LeanProof Complexity

Every unsatisfiable 2-CNF formula has a resolution refutation of length at most 12*(n+m)^2, so the FPT-in-incidence-treewidth statement holds for 2-CNF with g = 12, c = 2.

theorem resolution_fpt_two_clause : ∃ g : ℕ → ℕ, Computable g ∧ ∃ c : ℕ, 1 ≤ c ∧ ∀ F : Finset (Finset (CnfLit ℕ)), (∀ C ∈ F, C.card ≤ 2) → ¬ CnfSatisfiable (F.toList.map Finset.toList) → ∃ π, is_resolution_refutation F π ∧ π.length ≤ g (cnf_incidence_treewidth F) * ((cnf_vars F).card + F.card) ^ c
resolution_refutation_length_le_two_pow_varsIn LeanProof Complexity

The provable half: every unsatisfiable CNF formula has a resolution refutation of length at most 2^|var F| * (8|F| + 8).

theorem resolution_refutation_length_le_two_pow_vars (F : Finset (Finset (CnfLit ℕ))) (h : ¬ CnfSatisfiable (F.toList.map Finset.toList)) : ∃ π, is_resolution_refutation F π ∧ π.length ≤ 2 ^ (cnf_vars F).card * (8 * F.card + 8)
resolution_refutation_length_two_clauseIn LeanProof Complexity

If every clause of F has at most two literals and F is unsatisfiable, then F has a resolution refutation of length at most 4|var F| + 4|F| + 8.

theorem resolution_refutation_length_two_clause (F : Finset (Finset (CnfLit ℕ))) (h2 : ∀ C ∈ F, C.card ≤ 2) (h : ¬ CnfSatisfiable (F.toList.map Finset.toList)) : ∃ π, is_resolution_refutation F π ∧ π.length ≤ 4 * (cnf_vars F).card + 4 * F.card + 8
resolution_refutation_of_both_restrictionsIn LeanProof Complexity

If both F|x=0 and F|x=1 have resolution refutations of lengths a and b, then F has one of length at most a + b + 2|F| + 1.

theorem resolution_refutation_of_both_restrictions {V : Type*} [DecidableEq V] (F : Finset (Finset (CnfLit V))) (x : V) (π₀ π₁ : List (Finset (CnfLit V))) (h₀ : is_resolution_refutation (cnf_restrict F x false) π₀) (h₁ : is_resolution_refutation (cnf_restrict F x true) π₁) : ∃ π, is_resolution_refutation F π ∧ π.length ≤ π₀.length + π₁.length + 2 * F.card + 1
admissible_block_lengths_stabilizer_campbell_howardIn LeanQuantum Computation

For natural numbers s ≥ 4 and n, there exists an s by n binary matrix S with distinct nonzero columns and rank s satisfying the stabilizer-only Campbell-Howard conditions S1, S2, S3 if and only if there exists a codeword c in the Reed-Muller code RM(s - 4, s) such that the nonzero vectors in the support of c span (Fin s → ZMod 2) and n = boolean_weight c - (c 0).val.

open scoped Classical
open Matrix in
theorem admissible_block_lengths_stabilizer_campbell_howard (s n : ℕ) (hs : 4 ≤ s) :
    (∃ S : Matrix (Fin s) (Fin n) (ZMod 2),
      Function.Injective Sᵀ ∧ (∀ j, Sᵀ j ≠ 0) ∧ S.rank = s ∧ stabilizer_campbell_howard_conditions S) ↔
    ∃ c ∈ reed_muller_code (s - 4) s,
      Submodule.span (ZMod 2) {β : Fin s → ZMod 2 | β ≠ 0 ∧ c β = 1} = ⊤ ∧
      n = boolean_weight c - (c 0).val
almost_quantum_box_star_mem_caqIn LeanQuantum Computation

For every integer N ≥ 2, the binary-outcome bipartite box p* with inputs x, y in {1, ..., N} belongs to the set C_AQ of almost-quantum correlations.

theorem almost_quantum_box_star_mem_caq (N : ℕ) (hN : 2 ≤ N) :
    is_almost_quantum (almost_quantum_box_star N)
almost_quantum_box_star_of_vectorsIn LeanQuantum Computation

Given a real Hilbert space E with a unit state vector psi and vectors a_x, b_y, w_x satisfying the inner product relations of Lemma 3, the bipartite box almost_quantum_box_star N is almost-quantum.

theorem almost_quantum_box_star_of_vectors (N : ℕ)
    (E : Type) [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E]
    (psi : E) (hpsi : ‖psi‖ = 1)
    (a b w : Fin N → E)
    (h_psi_a : ∀ x, inner ℝ psi (a x) = (3 : ℝ) / 17)
    (h_a_a : ∀ x, inner ℝ (a x) (a x) = (3 : ℝ) / 17)
    (h_psi_b : ∀ x, inner ℝ psi (b x) = (3 : ℝ) / 17)
    (h_b_b : ∀ x, inner ℝ (b x) (b x) = (3 : ℝ) / 17)
    (h_psi_w : ∀ x, inner ℝ psi (w x) = (1 : ℝ) / 17)
    (h_w_w : ∀ x, inner ℝ (w x) (w x) = (1 : ℝ) / 17)
    (h_a_w : ∀ x, inner ℝ (a x) (w x) = (1 : ℝ) / 17)
    (h_b_w : ∀ x, inner ℝ (b x) (w x) = (1 : ℝ) / 17)
    (h_a_b_same : ∀ x, inner ℝ (a x) (b x) = (1 : ℝ) / 17)
    (h_a_b_diff : ∀ x y, x ≠ y → inner ℝ (a x) (b y) = 0)
    (h_a_w_diff : ∀ x y, x ≠ y → inner ℝ (a x) (w y) = 0)
    (h_b_w_diff : ∀ x y, x ≠ y → inner ℝ (b x) (w y) = 0) :
    is_almost_quantum (almost_quantum_box_star N)
almost_quantum_box_star_vectors_existIn LeanQuantum Computation

For every natural number N, there exists a real Hilbert space E, a unit vector psi, and vector families a, b, w : Fin N -> E satisfying the inner product identities: <psi, a_x> = ||a_x||^2 = 3/17, <psi, b_x> = ||b_x||^2 = 3/17, <psi, w_x> = ||w_x||^2 = <a_x, w_x> = <b_x, w_x> = <a_x, b_x> = 1/17, and for x != y, <a_x, b_y> = <a_x, w_y> = <b_x, w_y> = 0.

theorem almost_quantum_box_star_vectors_exist (N : ℕ) :
    ∃ (E : Type) (_ : NormedAddCommGroup E) (_ : InnerProductSpace ℝ E) (_ : CompleteSpace E)
      (psi : E) (_ : ‖psi‖ = 1)
      (a b w : Fin N → E),
      (∀ x, inner ℝ psi (a x) = (3 : ℝ) / 17) ∧
      (∀ x, inner ℝ (a x) (a x) = (3 : ℝ) / 17) ∧
      (∀ x, inner ℝ psi (b x) = (3 : ℝ) / 17) ∧
      (∀ x, inner ℝ (b x) (b x) = (3 : ℝ) / 17) ∧
      (∀ x, inner ℝ psi (w x) = (1 : ℝ) / 17) ∧
      (∀ x, inner ℝ (w x) (w x) = (1 : ℝ) / 17) ∧
      (∀ x, inner ℝ (a x) (w x) = (1 : ℝ) / 17) ∧
      (∀ x, inner ℝ (b x) (w x) = (1 : ℝ) / 17) ∧
      (∀ x, inner ℝ (a x) (b x) = (1 : ℝ) / 17) ∧
      (∀ x y, x ≠ y → inner ℝ (a x) (b y) = 0) ∧
      (∀ x y, x ≠ y → inner ℝ (a x) (w y) = 0) ∧
      (∀ x y, x ≠ y → inner ℝ (b x) (w y) = 0)
almost_quantum_zero_error_efficiency_boundIn LeanQuantum Computation

For every integer N ≥ 3, the bipartite box p* belongs to the set of almost-quantum correlations, the optimal zero-error conclusive efficiency η_AQ(N) of one-bit communication for equality satisfies η_AQ(N) ≥ 1/19, and the ratio η_AQ(N) / (1/N) satisfies η_AQ(N) / (1/N) ≥ N/19.

theorem almost_quantum_zero_error_efficiency_bound (N : ℕ) (hN : 3 ≤ N) :
    is_almost_quantum (almost_quantum_box_star N) ∧
    1 / 19 ≤ almost_quantum_efficiency N ∧
    (N : ℝ) / 19 ≤ almost_quantum_efficiency N / (1 / (N : ℝ))
apply_clifford_circuit_bijectiveIn LeanQuantum Computation

Every Clifford circuit permutes the 4^k Pauli labels: each of H, S and CNOT is an involution on PauliLabel k, hence bijective, and a fold-left of bijections is bijective.

theorem apply_clifford_circuit_bijective {k : ℕ} (circ : List (CliffordGate k)) : Function.Bijective (apply_clifford_circuit circ)
bell_network_lambda_commIn LeanQuantum Computation

For any vectors u, v in R^3, bell_network_lambda u v = bell_network_lambda v u.

theorem bell_network_lambda_comm (u v : Fin 3 → ℝ) : bell_network_lambda u v = bell_network_lambda v u
bell_network_lambda_le_criterionIn LeanQuantum Computation

If |u|^2 + |v|^2 <= 2M and M^2 - M(|u|^2+|v|^2) + (u.v)^2 >= 0, then Lambda(u,v) <= M.

theorem bell_network_lambda_le_criterion (u v : Fin 3 → ℝ) (M : ℝ) (h2M : (u ⬝ᵥ u) + (v ⬝ᵥ v) ≤ 2 * M) (hp : 0 ≤ M ^ 2 - M * ((u ⬝ᵥ u) + (v ⬝ᵥ v)) + (u ⬝ᵥ v) ^ 2) : bell_network_lambda u v ≤ M
bell_network_lambda_le_sIn LeanQuantum Computation

For any vectors u, v in R^3, bell_network_lambda u v <= (u . u) + (v . v).

theorem bell_network_lambda_le_s (u v : Fin 3 → ℝ) : bell_network_lambda u v ≤ (u ⬝ᵥ u) + (v ⬝ᵥ v)
bell_network_lambda_selfIn LeanQuantum Computation

For any vector u in R^3, bell_network_lambda u u equals u . u.

theorem bell_network_lambda_self (u : Fin 3 → ℝ) : bell_network_lambda u u = u ⬝ᵥ u
bell_network_lambda_z_axisIn LeanQuantum Computation

If u and v vanish on coordinates 0 and 1, then bell_network_lambda u v <= max (u . u) (v . v).

theorem bell_network_lambda_z_axis (u v : Fin 3 → ℝ) (hu0 : u 0 = 0) (hu1 : u 1 = 0) (hv0 : v 0 = 0) (hv1 : v 1 = 0) : bell_network_lambda u v ≤ max (u ⬝ᵥ u) (v ⬝ᵥ v)
bipartite_locally_encodable_of_support_le_dim_bIn LeanQuantum Computation

A normalized state ϕ on Fin (dA + dA') × Fin dB with support on {0, ..., dB - 1} × Fin dB is locally encodable if universal local encodability holds on both dA × dB and dA' × dB.

theorem bipartite_locally_encodable_of_support_le_dim_b
    (dA dA' dB : ℕ) (hdA : dB ≤ dA) (hdA' : dB ≤ dA')
    (hA : bipartite_universally_locally_encodable dA dB)
    (hA' : bipartite_universally_locally_encodable dA' dB)
    (ϕ : EuclideanSpace ℂ (Fin (dA + dA') × Fin dB))
    (hϕ_norm : ‖ϕ‖ = 1)
    (hϕ_supp : ∀ (i : Fin (dA + dA')) (j : Fin dB), dB ≤ (i : ℕ) → ϕ (i, j) = 0) :
    is_bipartite_locally_encodable ϕ
bipartite_state_support_le_dim_bIn LeanQuantum Computation

Every bipartite state ψ in Fin M × Fin N can be rotated by a unitary matrix u on Fin M such that (u ⊗ 1) ψ vanishes on all coordinates (i, j) with i ≥ N.

theorem bipartite_state_support_le_dim_b (M N : ℕ)
    (ψ : EuclideanSpace ℂ (Fin M × Fin N)) :
    ∃ u : Matrix.unitaryGroup (Fin M) ℂ,
      ∀ (i : Fin M) (j : Fin N), N ≤ (i : ℕ) →
        (Matrix.toEuclideanLin (Matrix.kronecker u.1 (1 : Matrix (Fin N) (Fin N) ℂ)) ψ) (i, j) = 0
bipartite_universal_local_encodability_multipleIn LeanQuantum Computation

Let dA, dB ∈ ℕ with dA ≥ dB ≥ 2. If universal local encodability holds for dA × dB bipartite quantum systems, then for every natural number κ ≥ 1, universal local encodability holds for (κ * dA) × dB bipartite quantum systems.

theorem bipartite_universal_local_encodability_multiple
    (dA dB : ℕ) (hdA : dB ≤ dA) (hdB : 2 ≤ dB)
    (hA : bipartite_universally_locally_encodable dA dB)
    (κ : ℕ) (hκ : 1 ≤ κ) :
    bipartite_universally_locally_encodable (κ * dA) dB
boolean_function_anf_expansionIn LeanQuantum Computation

Every Boolean function f on (ZMod 2)^s equals the sum over all T of the coefficient of T in its algebraic normal form times the monomial indexed by T.

theorem boolean_function_anf_expansion {s : ℕ} (f : (Fin s → ZMod 2) → ZMod 2) :
    f = ∑ T : Finset (Fin s), anf_coeff f T • monomial T
boolean_function_mem_reed_muller_or_shiftIn LeanQuantum Computation

If a Boolean function on (ZMod 2)^s (s at least 4) is orthogonal to every monomial of degree 1 up to 3, then it is a codeword of RM(s-4,s) or the sum of such a codeword with the origin indicator.

theorem boolean_function_mem_reed_muller_or_shift (s : ℕ) (hs : 4 ≤ s)
    (f : (Fin s → ZMod 2) → ZMod 2)
    (h : ∀ U : Finset (Fin s), 0 < U.card → U.card ≤ 3 → boolean_pairing f (monomial U) = 0) :
    ∃ c ∈ reed_muller_code (s - 4) s, f = c ∨ f = c + delta_zero s
boolean_pairing_anf_expansionIn LeanQuantum Computation

The Boolean inner product of f with the monomial indexed by U is the sum over W contained in U of the coefficient of the complement of W in the algebraic normal form of f.

theorem boolean_pairing_anf_expansion {s : ℕ} (f : (Fin s → ZMod 2) → ZMod 2) (U : Finset (Fin s)) :
    boolean_pairing f (monomial U) = ∑ W ∈ U.powerset, anf_coeff f (Wᶜ)
boolean_pairing_monomial_monomialIn LeanQuantum Computation

The Boolean inner product of the monomials indexed by T and W is 1 if T union W is everything and 0 otherwise.

theorem boolean_pairing_monomial_monomial {s : ℕ} (T W : Finset (Fin s)) :
    boolean_pairing (monomial T) (monomial W) = if T ∪ W = Finset.univ then 1 else 0
boolean_pairing_point_delta_monomialIn LeanQuantum Computation

The Boolean inner product of the indicator of a point beta with the monomial indexed by U is the value of that monomial at beta.

theorem boolean_pairing_point_delta_monomial {s : ℕ} (β : Fin s → ZMod 2) (U : Finset (Fin s)) :
    boolean_pairing (point_delta β) (monomial U) = monomial U β
card_full_support_paulisIn LeanQuantum Computation

The number of Pauli labels acting non-trivially on every qubit is 3^k, one of three choices (X, Y, Z) per qubit.

theorem card_full_support_paulis (k : ℕ) : (full_support_paulis k).card = 3 ^ k
clifford_circuit_pauli_massIn LeanQuantum Computation

Conservation of Pauli mass: for every Clifford circuit the total weight-enumerated mass over all 4^k Pauli labels is 6^k, independently of the circuit.

theorem clifford_circuit_pauli_mass (k : ℕ) (circ : List (CliffordGate k)) : ∑ p : PauliLabel k, 3 ^ (k - pauli_size (apply_clifford_circuit circ p)) = 6 ^ k
clifford_circuit_score_append_localIn LeanQuantum Computation

If a gate g preserves the Pauli size (in particular any single-qubit H or S), then appending g to a Clifford circuit does not change its score: score (circ ++ [g]) = score circ.

theorem clifford_circuit_score_append_local {k : ℕ} (circ : List (CliffordGate k)) (g : CliffordGate k)
    (hg : ∀ p : PauliLabel k, pauli_size (apply_clifford_gate g p) = pauli_size p) :
    clifford_circuit_score (circ ++ [g]) = clifford_circuit_score circ
clifford_circuit_score_eq_layercakeIn LeanQuantum Computation

Compression-profile form of the score: score circ = 3^k + sum over j < k of 2*3^(k-1-j)*M_j, where M_j counts the full-support Paulis whose image under circ has size at most j. Since a circuit is a bijection and the all-identity label is not of full support, M_0 = 0 and the profile is nondecreasing in j.

theorem clifford_circuit_score_eq_layercake (k : ℕ) (circ : List (CliffordGate k)) :
    clifford_circuit_score circ = 3 ^ k + ∑ j ∈ Finset.range k, 2 * 3 ^ (k - 1 - j) *
      (Finset.univ.filter (fun p : PauliLabel k => pauli_size p = k ∧ pauli_size (apply_clifford_circuit circ p) ≤ j)).card
clifford_circuit_score_le_five_pow_sub_two_powIn LeanQuantum Computation

Counting bound of arXiv:2610.04621 Section III.1: for every k-qubit Clifford circuit with k at least 1 the score is at most 5^k - 2^k. This already fixes the correct exponential base 5^k; it is not tight (the true maximum is about (3/4)*5^k).

theorem clifford_circuit_score_le_five_pow_sub_two_pow (k : ℕ) (hk : 1 ≤ k) (circ : List (CliffordGate k)) : clifford_circuit_score circ ≤ 5 ^ k - 2 ^ k
clifford_circuit_score_le_two_sided_shadow_optimal_scoreIn LeanQuantum Computation

Upper half of arXiv:2610.04621 Theorem 2 (Section III): for every k at least 1 and every k-qubit Clifford circuit, the score is at most the two-sided shadow optimum s_k, which is (3*5^k + 3^k - 6)/4 for odd k and (3*5^k - 3^k + 2)/4 for even k. Together with the published attainment by the dual-axis rotation circuit this says the maximum score is exactly s_k.

theorem clifford_circuit_score_le_two_sided_shadow_optimal_score (k : ℕ) (hk : 1 ≤ k) (circ : List (CliffordGate k)) : clifford_circuit_score circ ≤ two_sided_shadow_optimal_score k
clifford_circuit_score_prepend_localIn LeanQuantum Computation

If a gate g is a bijection on Pauli labels that preserves the Pauli size (in particular any single-qubit H or S), then prepending g to a Clifford circuit does not change its score: score (g :: circ) = score circ.

theorem clifford_circuit_score_prepend_local {k : ℕ} (circ : List (CliffordGate k)) (g : CliffordGate k)
    (hbij : Function.Bijective (apply_clifford_gate g))
    (hsize : ∀ p : PauliLabel k, pauli_size (apply_clifford_gate g p) = pauli_size p) :
    clifford_circuit_score (g :: circ) = clifford_circuit_score circ
clifford_t_circuit_matrix_appendIn LeanQuantum Computation

The matrix of concatenated Clifford+T circuits is the product of their matrices in reverse order: the gates in gs2 act after gs1.

theorem clifford_t_circuit_matrix_append {N : ℕ} (gs1 gs2 : List (CliffordTGate N)) :
    clifford_t_circuit_matrix (gs1 ++ gs2) = clifford_t_circuit_matrix gs2 * clifford_t_circuit_matrix gs1
clifford_t_circuit_matrix_consIn LeanQuantum Computation

Prepending a gate g to a circuit gs multiplies the gate matrix of g on the right of the circuit matrix of gs.

theorem clifford_t_circuit_matrix_cons {N : ℕ} (g : CliffordTGate N) (gs : List (CliffordTGate N)) :
    clifford_t_circuit_matrix (g :: gs) = clifford_t_circuit_matrix gs * clifford_t_gate_matrix g
clifford_t_circuit_matrix_singletonIn LeanQuantum Computation

A single-gate circuit has the matrix of that gate.

theorem clifford_t_circuit_matrix_singleton {N : ℕ} (g : CliffordTGate N) :
    clifford_t_circuit_matrix [g] = clifford_t_gate_matrix g
clifford_t_circuit_t_count_consIn LeanQuantum Computation

The T-count of g :: gs is the indicator of g being a T gate plus the T-count of gs.

theorem clifford_t_circuit_t_count_cons {N : ℕ} (g : CliffordTGate N) (gs : List (CliffordTGate N)) :
    clifford_t_circuit_t_count (g :: gs) =
      (match g with | CliffordTGate.t _ => 1 | _ => 0) + clifford_t_circuit_t_count gs
closed_network_classical_n_local_boundIn LeanQuantum Computation

Every n-local correlation of the closed network with n independent sources and central nodes without inputs satisfies |I| ^ (1 / n) + |J| ^ (1 / n) ≤ 1, where I = 2^(-n) ∑_y ⟨f₀ ∏_i b^{(i)}_{y_i}⟩ and J = 2^(-n) ∑_y (-1)^(∑_i y_i) ⟨f₁ ∏_i b^{(i)}_{y_i}⟩ for response functions with |f₀|, |f₁| ≤ 1 and dichotomic outcomes |b^{(i)}_{y_i}| ≤ 1.

theorem closed_network_classical_n_local_bound
    (n : ℕ) (hn : 1 ≤ n)
    {Ω : Fin n → Type*} [∀ i, MeasurableSpace (Ω i)]
    (μ : ∀ i, MeasureTheory.Measure (Ω i)) [∀ i, MeasureTheory.IsProbabilityMeasure (μ i)]
    (ϕ₀ ϕ₁ : ((i : Fin n) → Ω i) → ℝ)
    (hϕ₀_bound : ∀ ω, |ϕ₀ ω| ≤ 1)
    (hϕ₁_bound : ∀ ω, |ϕ₁ ω| ≤ 1)
    (hϕ₀_meas : Measurable ϕ₀)
    (hϕ₁_meas : Measurable ϕ₁)
    (β : (i : Fin n) → Fin 2 → Ω i → ℝ)
    (hβ_bound : ∀ i y ω, |β i y ω| ≤ 1)
    (hβ_meas : ∀ i y, Measurable (β i y))
    (I J : ℝ)
    (hI : I = (2 : ℝ) ^ (-(n : ℝ)) * ∑ y : Fin n → Fin 2,
      ∫ ω, ϕ₀ ω * ∏ i : Fin n, β i (y i) (ω i) ∂(MeasureTheory.Measure.pi μ))
    (hJ : J = (2 : ℝ) ^ (-(n : ℝ)) * ∑ y : Fin n → Fin 2,
      ((-1 : ℝ) ^ (∑ i : Fin n, (y i).val)) *
        ∫ ω, ϕ₁ ω * ∏ i : Fin n, β i (y i) (ω i) ∂(MeasureTheory.Measure.pi μ)) :
    |I| ^ (1 / (n : ℝ)) + |J| ^ (1 / (n : ℝ)) ≤ 1
closed_network_integral_prod_piIn LeanQuantum Computation

For any product probability measure μ on Ω = ∏_{i : Fin n} Ω_i and any family of 1D functions f_i : Ω_i → ℝ, the integral of ∏_i f_i(ω_i) with respect to the product measure equals the product ∏_i ∫ f_i dμ_i.

theorem closed_network_integral_prod_pi
    (n : ℕ) {Ω : Fin n → Type*} [∀ i, MeasurableSpace (Ω i)]
    (μ : ∀ i, MeasureTheory.Measure (Ω i)) [∀ i, MeasureTheory.IsProbabilityMeasure (μ i)]
    (f : (i : Fin n) → Ω i → ℝ) :
    ∫ ω, (∏ i : Fin n, f i (ω i)) ∂(MeasureTheory.Measure.pi μ) = ∏ i : Fin n, ∫ x, f i x ∂(μ i)
closed_network_sum_prod_binaryIn LeanQuantum Computation

For any n and any function f : Fin n → Fin 2 → ℝ, the sum over all binary assignments y : Fin n → Fin 2 of ∏_i f(i, y_i) equals ∏_i (f(i, 0) + f(i, 1)).

theorem closed_network_sum_prod_binary
    (n : ℕ) (f : Fin n → Fin 2 → ℝ) :
    ∑ y : Fin n → Fin 2, ∏ i : Fin n, f i (y i) = ∏ i : Fin n, (f i 0 + f i 1)
closed_network_sum_prod_binary_parityIn LeanQuantum Computation

For any n and any function f : Fin n → Fin 2 → ℝ, the sum over all binary assignments y : Fin n → Fin 2 of (-1)^(∑_i y_i) ∏_i f(i, y_i) equals ∏_i (f(i, 0) - f(i, 1)).

theorem closed_network_sum_prod_binary_parity
    (n : ℕ) (f : Fin n → Fin 2 → ℝ) :
    ∑ y : Fin n → Fin 2, ((-1 : ℝ) ^ (∑ i : Fin n, (y i).val)) * ∏ i : Fin n, f i (y i) =
      ∏ i : Fin n, (f i 0 - f i 1)
column_indicator_pairing_monomialIn LeanQuantum Computation

The Boolean inner product of the column indicator of S with the monomial indexed by U is the sum over the columns j of the product of the entries S i j for i in U.

theorem column_indicator_pairing_monomial {s n : ℕ} (S : Matrix (Fin s) (Fin n) (ZMod 2))
    (h_inj : Function.Injective Sᵀ) (U : Finset (Fin s)) :
    boolean_pairing (column_indicator S) (monomial U) = ∑ j, ∏ i ∈ U, S i j
commuting_unitaries_common_eigenbasisIn LeanQuantum Computation

Let U : ι → Matrix.unitaryGroup n ℂ be a finite family of pairwise commuting unitary matrices. Then there is an orthonormal basis ψ of EuclideanSpace ℂ n such that every U i acts on each ψ j as a scalar.

theorem commuting_unitaries_common_eigenbasis {n : Type*} [Fintype n] [DecidableEq n]
    {ι : Type*} [Fintype ι] (U : ι → Matrix.unitaryGroup n ℂ)
    (hcomm : ∀ i j, U i * U j = U j * U i) :
    ∃ ψ : OrthonormalBasis n ℂ (EuclideanSpace ℂ n),
      ∀ i j, ∃ c : ℂ, Matrix.toEuclideanLin (U i : Matrix n n ℂ) (ψ j) = c • ψ j
cubic_hypergraph_magic_mean_eq_dependent_triplesIn LeanQuantum Computation

For n ≥ 3, the arithmetic mean over CubicHypergraph n of 2^n * m_2(ψ_H) equals 1 / (2^n)^2 times the cardinality of the set of linearly dependent triples in ((ZMod 2)^n)^3.

open scoped Classical in
theorem cubic_hypergraph_magic_mean_eq_dependent_triples (n : ℕ) (hn : 3 ≤ n) :
    (1 / (Fintype.card (CubicHypergraph n) : ℝ)) *
      ∑ H : CubicHypergraph n, (2 ^ n : ℝ) * pauliLiouvilleMomentTwo n (hypergraphState n (H.image Subtype.val)) =
        (1 / ((2 ^ n : ℝ) ^ 2)) *
          (((Finset.univ : Finset ((Fin n → ZMod 2) × (Fin n → ZMod 2) × (Fin n → ZMod 2))).filter
            (fun ⟨u, y, z⟩ => ¬ LinearIndependent (ZMod 2) ![u, y, z])).card : ℝ)
cubic_hypergraph_measure_integralIn LeanQuantum Computation

Integration of any real-valued function on CubicHypergraph n against the cubic hypergraph measure equals the arithmetic mean over all cubic hypergraphs.

theorem cubic_hypergraph_measure_integral (n : ℕ) (f : CubicHypergraph n → ℝ) :
    ∫ H, f H ∂(cubicHypergraphMeasure n) = (1 / (Fintype.card (CubicHypergraph n) : ℝ)) * ∑ H, f H
cubic_hypergraph_pauli_fourth_moment_integralIn LeanQuantum Computation

For n ≥ 3, the expectation over the uniform hypergraph measure of ∑_p ‖⟨ψ_H|P_p|ψ_H⟩‖⁴ equals (2^n)^{-3} times the number of tuples satisfying the fourth-moment evenness condition.

theorem cubic_hypergraph_pauli_fourth_moment_integral (n : ℕ) (hn : 3 ≤ n) : ∫ H, (∑ p : PauliString n, ‖inner ℂ (hypergraphState n (H.image Subtype.val)) (pauliOp p (hypergraphState n (H.image Subtype.val)))‖ ^ 4) ∂(cubicHypergraphMeasure n) = (((2:ℝ)^n)⁻¹)^3 * (f2CubicConditionCount n : ℝ)
cyclic_cubic_down_upIn LeanQuantum Computation

cyclic_cubic_down n (cyclic_cubic_up A) = A.

theorem cyclic_cubic_down_up {n : ℕ} (A : Finset (Fin n)) : cyclic_cubic_down n (cyclic_cubic_up A) = A
cyclic_cubic_family_is_parity_reprIn LeanQuantum Computation

For every n ≥ 6, cyclic_cubic_family n is a parity representation of cyclic_cubic_syndrome n.

theorem cyclic_cubic_family_is_parity_repr (n : ℕ) (hn : 6 ≤ n) : is_parity_repr (cyclic_cubic_family n) (cyclic_cubic_syndrome n)
cyclic_cubic_finite_oldIn LeanQuantum Computation

For T ⊆ {0,...,n-1} of size 1..3, the parity of the number of the eight boundary sets that contain T equals the sum (mod 2) of the syndromes of T at levels n and n+1; the syndrome changes between the two levels exactly for T = {0,n-2,n-1} and T = {0,1,n-1}.

theorem cyclic_cubic_finite_old (n : ℕ) (hn : 6 ≤ n) (T : Finset ℕ) (hT : T ⊆ Finset.range n) (h1 : 1 ≤ T.card) (h3 : T.card ≤ 3) : (∑ S ∈ cyclic_cubic_step_old_sets n, (if T ⊆ S then (1 : ZMod 2) else 0)) = (if cyclic_cubic_synd n T then 1 else 0) + (if cyclic_cubic_synd (n + 1) T then 1 else 0)
cyclic_cubic_finite_topIn LeanQuantum Computation

For T ⊆ {0,...,n-1} of size 1..2, the parity of the number of the five boundary sets containing T equals the sum (mod 2) of the syndromes of insert n T at level n+1 and of T at level n.

theorem cyclic_cubic_finite_top (n : ℕ) (hn : 6 ≤ n) (T : Finset ℕ) (hT : T ⊆ Finset.range n) (h1 : 1 ≤ T.card) (h2 : T.card ≤ 2) : (∑ S ∈ cyclic_cubic_step_top_sets n, (if T ⊆ S then (1 : ZMod 2) else 0)) = (if cyclic_cubic_synd (n + 1) (insert n T) then 1 else 0) + (if cyclic_cubic_synd n T then 1 else 0)
cyclic_cubic_moment_base_sixIn LeanQuantum Computation

At n = 6 the Nat-level family represents the cyclic cubic syndrome: for every T ⊆ {0,...,5} of size 1..3, the number of family members containing T is odd exactly when T is a cyclic triple.

theorem cyclic_cubic_moment_base_six : ∀ T ∈ (Finset.range 6).powerset, 1 ≤ T.card → T.card ≤ 3 → (((cyclic_cubic_nat_moment 6 T : ℕ)) : ZMod 2) = (if cyclic_cubic_synd 6 T then 1 else 0)
cyclic_cubic_moment_card_transferIn LeanQuantum Computation

The number of family members containing A equals the number of Nat-level family members containing cyclic_cubic_up A.

theorem cyclic_cubic_moment_card_transfer (n : ℕ) (hn : 6 ≤ n) (A : Finset (Fin n)) : ((cyclic_cubic_family n).filter (fun y => A ⊆ y)).card = cyclic_cubic_nat_moment n (cyclic_cubic_up A)
cyclic_cubic_moment_step_oldIn LeanQuantum Computation

For T ⊆ {0,...,n-1} of size at most 3 the level-(n+1) count of family members containing T differs mod 2 from the level-n count by exactly the eight boundary indicators.

theorem cyclic_cubic_moment_step_old (n : ℕ) (hn : 6 ≤ n) (T : Finset ℕ) (hT : T ⊆ Finset.range n) (h3 : T.card ≤ 3) : ((cyclic_cubic_nat_moment (n + 1) T + cyclic_cubic_nat_moment n T : ℕ) : ZMod 2) = ∑ S ∈ cyclic_cubic_step_old_sets n, if T ⊆ S then (1 : ZMod 2) else 0
cyclic_cubic_moment_step_topIn LeanQuantum Computation

For T ⊆ {0,...,n-1} with at most 2 elements, the level-(n+1) count of family members containing insert n T differs mod 2 from the level-n count of members containing T by exactly the five boundary indicators.

theorem cyclic_cubic_moment_step_top (n : ℕ) (hn : 6 ≤ n) (T : Finset ℕ) (hT : T ⊆ Finset.range n) (h2 : T.card ≤ 2) : ((cyclic_cubic_nat_moment (n + 1) (insert n T) + cyclic_cubic_nat_moment n T : ℕ) : ZMod 2) = ∑ S ∈ cyclic_cubic_step_top_sets n, if T ⊆ S then (1 : ZMod 2) else 0
cyclic_cubic_nat_moment_group_splitIn LeanQuantum Computation

The number of Nat-level family members containing T is the sum of the numbers of group-A, group-B and group-C members containing T (the three groups are pairwise disjoint for n ≥ 6).

theorem cyclic_cubic_nat_moment_group_split (n : ℕ) (hn : 6 ≤ n) (T : Finset ℕ) : cyclic_cubic_nat_moment n T = ((cyclic_cubic_family_nat_A n).filter (fun Y => T ⊆ Y)).card + ((cyclic_cubic_family_nat_B n).filter (fun Y => T ⊆ Y)).card + ((cyclic_cubic_family_nat_C n).filter (fun Y => T ⊆ Y)).card
cyclic_cubic_natfam_cardIn LeanQuantum Computation

For n ≥ 6 the Nat-level cyclic cubic family has 2n+5 members.

theorem cyclic_cubic_natfam_card (n : ℕ) (hn : 6 ≤ n) : (cyclic_cubic_family_nat n).card = 2 * n + 5
cyclic_cubic_natfam_eq_imageIn LeanQuantum Computation

For every n, cyclic_cubic_family n is the image under cyclic_cubic_down n of cyclic_cubic_family_nat n.

theorem cyclic_cubic_natfam_eq_image (n : ℕ) : cyclic_cubic_family n = (cyclic_cubic_family_nat n).image (cyclic_cubic_down n)
cyclic_cubic_natfam_subset_rangeIn LeanQuantum Computation

For n ≥ 6 every member of cyclic_cubic_family_nat n is a subset of {0,1,...,n-1}.

theorem cyclic_cubic_natfam_subset_range (n : ℕ) (hn : 6 ≤ n) : ∀ Y ∈ cyclic_cubic_family_nat n, Y ⊆ Finset.range n
cyclic_cubic_subset_down_iffIn LeanQuantum Computation

A ⊆ cyclic_cubic_down n Y if and only if cyclic_cubic_up A ⊆ Y.

theorem cyclic_cubic_subset_down_iff {n : ℕ} (A : Finset (Fin n)) (Y : Finset ℕ) : A ⊆ cyclic_cubic_down n Y ↔ cyclic_cubic_up A ⊆ Y
cyclic_cubic_synd_card_threeIn LeanQuantum Computation

For n ≥ 6, cyclic_cubic_synd n T can only hold when T has exactly 3 elements; in particular it is false for |T| ≤ 2.

theorem cyclic_cubic_synd_card_three (n : ℕ) (hn : 6 ≤ n) (T : Finset ℕ) (h : cyclic_cubic_synd n T) : T.card = 3
cyclic_cubic_syndrome_eq_syndIn LeanQuantum Computation

For n ≥ 6 and any parity A on n qubits, cyclic_cubic_syndrome n A equals 1 if cyclic_cubic_up A is a cyclic triple and 0 otherwise.

theorem cyclic_cubic_syndrome_eq_synd (n : ℕ) (hn : 6 ≤ n) (A : Finset (Fin n)) : cyclic_cubic_syndrome n A = (if cyclic_cubic_synd n (cyclic_cubic_up A) then 1 else 0)
cyclic_cubic_t_count_lower_boundIn LeanQuantum Computation

For every natural number n ≥ 6, every parity representation S of cyclic_cubic_syndrome n satisfies 2 * n + 5 ≤ S.card.

theorem cyclic_cubic_t_count_lower_bound (n : ℕ) (hn : 6 ≤ n) (S : Finset (Finset (Fin n))) (hS : is_parity_repr S (cyclic_cubic_syndrome n)) : 2 * n + 5 ≤ S.card
cyclic_cubic_t_count_upper_boundIn LeanQuantum Computation

For every natural number n ≥ 6, there exists a parity representation of cyclic_cubic_syndrome n of cardinality 2 * n + 5.

theorem cyclic_cubic_t_count_upper_bound (n : ℕ) (hn : 6 ≤ n) : ∃ S : Finset (Finset (Fin n)), is_parity_repr S (cyclic_cubic_syndrome n) ∧ S.card = 2 * n + 5
cyclic_cubic_up_subset_rangeIn LeanQuantum Computation

For A a parity on n qubits, cyclic_cubic_up A ⊆ {0,...,n-1}.

theorem cyclic_cubic_up_subset_range {n : ℕ} (A : Finset (Fin n)) : cyclic_cubic_up A ⊆ Finset.range n
delta_zero_eq_sum_monomialIn LeanQuantum Computation

The indicator delta_zero s of the origin of (ZMod 2)^s is the sum of all monomials indexed by subsets of Fin s.

theorem delta_zero_eq_sum_monomial (s : ℕ) :
    delta_zero s = ∑ T : Finset (Fin s), monomial T
f2_cubic_condition_count_eq_dependent_triplesIn LeanQuantum Computation

For n ≥ 3, the number of tuples satisfying the fourth-moment evenness condition equals 2^n times the number of linearly dependent ordered triples in ((ZMod 2)^n)^3.

open scoped Classical in
theorem f2_cubic_condition_count_eq_dependent_triples (n : ℕ) (hn : 3 ≤ n) : (f2CubicConditionCount n : ℝ) = (2:ℝ)^n * (((Finset.univ : Finset ((Fin n → ZMod 2) × (Fin n → ZMod 2) × (Fin n → ZMod 2))).filter (fun ⟨u, y, z⟩ => ¬ LinearIndependent (ZMod 2) ![u, y, z])).card : ℝ)
f2_linearly_dependent_triples_cardIn LeanQuantum Computation

For n ≥ 3, the number of triples (u, y, z) in ((ZMod 2)^n)^3 that are linearly dependent over ZMod 2 equals 7 * (2^n)^2 - 14 * 2^n + 8.

open scoped Classical in
theorem f2_linearly_dependent_triples_card (n : ℕ) (hn : 3 ≤ n) :
    ((Finset.univ : Finset ((Fin n → ZMod 2) × (Fin n → ZMod 2) × (Fin n → ZMod 2))).filter
      (fun ⟨u, y, z⟩ => ¬ LinearIndependent (ZMod 2) ![u, y, z])).card =
        7 * (2 ^ n) ^ 2 - 14 * (2 ^ n) + 8
finset_powerset_sums_constantIn LeanQuantum Computation

If a ZMod 2-valued function b on subsets of Fin s has vanishing sum over the powerset of every nonempty set U of size at most 3, then b is constant with value b(empty) on every set of size at most 3.

theorem finset_powerset_sums_constant {s : ℕ} (b : Finset (Fin s) → ZMod 2)
    (h : ∀ U : Finset (Fin s), 0 < U.card → U.card ≤ 3 → ∑ W ∈ U.powerset, b W = 0) :
    ∀ V : Finset (Fin s), V.card ≤ 3 → b V = b ∅
gaussBlochA_transportIn LeanQuantum Computation

Under V = ⊗u_p, the first-qubit Bloch vector becomes a' = C(u₀) a, i.e. a'_i = Σ_j C(u₀)_{ij} a_j.

theorem gaussBlochA_transport
    (V : Matrix.unitaryGroup (Fin 3 → Fin 2) ℂ) (u : ∀ p : Fin 3, Matrix.unitaryGroup (Fin 2) ℂ)
    (hV : V.1 = fun x y => ∏ p, (u p).1 (x p) (y p))
    (ψ : EuclideanSpace ℂ (Fin 3 → Fin 2)) :
    gaussBlochA (Matrix.toEuclideanLin V.1 ψ) =
      fun i => ∑ j, gaussPauliFrame (u 0).1 i j * gaussBlochA ψ j
gaussBlochB_transportIn LeanQuantum Computation

Under V = ⊗u_p, the second-qubit Bloch vector becomes b' = C(u₁) b, i.e. b'_i = Σ_j C(u₁)_{ij} b_j.

theorem gaussBlochB_transport
    (V : Matrix.unitaryGroup (Fin 3 → Fin 2) ℂ) (u : ∀ p : Fin 3, Matrix.unitaryGroup (Fin 2) ℂ)
    (hV : V.1 = fun x y => ∏ p, (u p).1 (x p) (y p))
    (ψ : EuclideanSpace ℂ (Fin 3 → Fin 2)) :
    gaussBlochB (Matrix.toEuclideanLin V.1 ψ) =
      fun i => ∑ j, gaussPauliFrame (u 1).1 i j * gaussBlochB ψ j
gaussCorr_transportIn LeanQuantum Computation

Under V = ⊗u_p, A'_{ij} = Σ_{k,l} C(u₀)_{ik} C(u₁)_{jl} A_{kl}.

theorem gaussCorr_transport
    (V : Matrix.unitaryGroup (Fin 3 → Fin 2) ℂ) (u : ∀ p : Fin 3, Matrix.unitaryGroup (Fin 2) ℂ)
    (hV : V.1 = fun x y => ∏ p, (u p).1 (x p) (y p))
    (ψ : EuclideanSpace ℂ (Fin 3 → Fin 2)) :
    gaussCorr (Matrix.toEuclideanLin V.1 ψ) =
      fun i j => ∑ k, ∑ l, gaussPauliFrame (u 0).1 i k * gaussPauliFrame (u 1).1 j l * gaussCorr ψ k l
gaussInvariant_eq_zero_of_realIn LeanQuantum Computation

If all amplitudes of ψ are real, then gaussInvariant ψ = 0.

theorem gaussInvariant_eq_zero_of_real (ψ : EuclideanSpace ℂ (Fin 3 → Fin 2))
    (hψ : ∀ x, (ψ x).im = 0) : gaussInvariant ψ = 0
gaussInvariant_local_unitary_lawIn LeanQuantum Computation

gaussInvariant(Vψ) = det(C(u₀)) · gaussInvariant(ψ).

theorem gaussInvariant_local_unitary_law
    (V : Matrix.unitaryGroup (Fin 3 → Fin 2) ℂ) (u : ∀ p : Fin 3, Matrix.unitaryGroup (Fin 2) ℂ)
    (hV : V.1 = fun x y => ∏ p, (u p).1 (x p) (y p))
    (ψ : EuclideanSpace ℂ (Fin 3 → Fin 2)) :
    gaussInvariant (Matrix.toEuclideanLin V.1 ψ) =
      (gaussPauliFrame (u 0).1).det * gaussInvariant ψ
gaussInvariant_smul_unitIn LeanQuantum Computation

gaussInvariant (c • ψ) = gaussInvariant ψ for any unit phase c (c·c̄ = 1).

theorem gaussInvariant_smul_unit (c : ℂ) (hc : c * star c = 1)
    (ψ : EuclideanSpace ℂ (Fin 3 → Fin 2)) :
    gaussInvariant (c • ψ) = gaussInvariant ψ
gaussInvariant_witnessIn LeanQuantum Computation

gaussInvariant three_qubit_gaussian_witness = 1/729.

theorem gaussInvariant_witness : gaussInvariant three_qubit_gaussian_witness = 1/729
gaussInvariant_zero_iff_of_local_unitaryIn LeanQuantum Computation

gaussInvariant(Vψ) = 0 iff gaussInvariant(ψ) = 0 for a product local unitary V.

theorem gaussInvariant_zero_iff_of_local_unitary
    (V : Matrix.unitaryGroup (Fin 3 → Fin 2) ℂ) (u : ∀ p : Fin 3, Matrix.unitaryGroup (Fin 2) ℂ)
    (hV : V.1 = fun x y => ∏ p, (u p).1 (x p) (y p))
    (ψ : EuclideanSpace ℂ (Fin 3 → Fin 2)) :
    (gaussInvariant (Matrix.toEuclideanLin V.1 ψ) = 0 ↔ gaussInvariant ψ = 0)
gaussKronFam_mulIn LeanQuantum Computation

The entrywise tensor product is multiplicative: (⊗ A_q)(⊗ B_q) = ⊗ (A_q B_q).

theorem gaussKronFam_mul (A B : Fin 3 → Matrix (Fin 2) (Fin 2) ℂ) :
    gaussKronFam A * gaussKronFam B = gaussKronFam (fun q => A q * B q)
gaussPauliExpect_eq_zero_of_real_of_purelyImagIn LeanQuantum Computation

If ψ is real-valued and every entry of P_p is purely imaginary (zero real part), then ⟨ψ|P_p|ψ⟩ has zero real part.

theorem gaussPauliExpect_eq_zero_of_real_of_purelyImag (ψ : EuclideanSpace ℂ (Fin 3 → Fin 2))
    (hψ : ∀ x, (ψ x).im = 0) (p : PauliString 3)
    (hp : ∀ s t : Fin 3 → Fin 2, (pauliMatrix p s t).re = 0) :
    gaussPauliExpect ψ p = 0
gaussPauliExpect_smul_unitIn LeanQuantum Computation

For any unit complex phase c (c·c̄ = 1), the Pauli expectation is unchanged: ⟨cψ|P|cψ⟩ = ⟨ψ|P|ψ⟩.

theorem gaussPauliExpect_smul_unit (c : ℂ) (hc : c * star c = 1)
    (ψ : EuclideanSpace ℂ (Fin 3 → Fin 2)) (p : PauliString 3) :
    gaussPauliExpect (c • ψ) p = gaussPauliExpect ψ p
gaussPauliFrame_orthogonalIn LeanQuantum Computation

Σ_k C(u)_{ik} C(u)_{jk} = δ_{ij}: the Pauli frame of a unitary is a real orthogonal 3x3 matrix.

theorem gaussPauliFrame_orthogonal (u : Matrix.unitaryGroup (Fin 2) ℂ) :
    (gaussPauliFrame u.1).transpose * gaussPauliFrame u.1 = 1
gaussPauliFrame_reconstructIn LeanQuantum Computation

u^* σ_i u = Σ_j C(u)_{ij} σ_j, where C(u)_{ij} = Re tr(u^* σ_i u σ_j)/2.

theorem gaussPauliFrame_reconstruct (u : Matrix.unitaryGroup (Fin 2) ℂ) (i : Fin 3) :
    (u.1).conjTranspose * (gaussAxis i).toMatrix * u.1 =
      ∑ j, (gaussPauliFrame u.1 i j : ℂ) • (gaussAxis j).toMatrix
ghz_closed_network_sSup_le_of_pointwiseIn LeanQuantum Computation

If the pointwise bound Lambda(tau_{mu nu}, tau_{mu' nu'}) <= 1 + sin^2(2*alpha) holds for all frames and all setting indices, then the supremum of sqrt(Lambda(tau_{mu nu}, tau_{mu' nu'})) over all frames and setting indices is at most sqrt(1 + sin^2(2*alpha)).

theorem ghz_closed_network_sSup_le_of_pointwise (α : ℝ)
    (hpt : ∀ (e f : Matrix (Fin 3) (Fin 3) ℝ), e ∈ Matrix.orthogonalGroup (Fin 3) ℝ →
      f ∈ Matrix.orthogonalGroup (Fin 3) ℝ → ∀ (μ ν μ' ν' : Fin 4),
      bell_network_lambda (ghz_correlation_vector α e f μ ν) (ghz_correlation_vector α e f μ' ν')
        ≤ 1 + Real.sin (2 * α) ^ 2) :
    sSup { Real.sqrt (bell_network_lambda (ghz_correlation_vector α e f μ ν)
        (ghz_correlation_vector α e f μ' ν')) |
      (e ∈ Matrix.orthogonalGroup (Fin 3) ℝ) (f ∈ Matrix.orthogonalGroup (Fin 3) ℝ)
      (μ : Fin 4) (ν : Fin 4) (μ' : Fin 4) (ν' : Fin 4) } ≤ Real.sqrt (1 + Real.sin (2 * α) ^ 2)
ghz_closed_network_set_bddAbove_of_pointwiseIn LeanQuantum Computation

If the pointwise bound Lambda(tau_{mu nu}, tau_{mu' nu'}) <= 1 + sin^2(2*alpha) holds for all frames and all setting indices, then the closed-network value set { sqrt(Lambda(tau_{mu nu}, tau_{mu' nu'})) } is bounded above (by sqrt(1 + sin^2(2*alpha))).

theorem ghz_closed_network_set_bddAbove_of_pointwise (α : ℝ)
    (hpt : ∀ (e f : Matrix (Fin 3) (Fin 3) ℝ), e ∈ Matrix.orthogonalGroup (Fin 3) ℝ →
      f ∈ Matrix.orthogonalGroup (Fin 3) ℝ → ∀ (μ ν μ' ν' : Fin 4),
      bell_network_lambda (ghz_correlation_vector α e f μ ν) (ghz_correlation_vector α e f μ' ν')
        ≤ 1 + Real.sin (2 * α) ^ 2) :
    BddAbove { Real.sqrt (bell_network_lambda (ghz_correlation_vector α e f μ ν)
        (ghz_correlation_vector α e f μ' ν')) |
      (e ∈ Matrix.orthogonalGroup (Fin 3) ℝ) (f ∈ Matrix.orthogonalGroup (Fin 3) ℝ)
      (μ : Fin 4) (ν : Fin 4) (μ' : Fin 4) (ν' : Fin 4) }
ghz_closed_network_value_exact_of_pointwiseIn LeanQuantum Computation

If the pointwise bound Lambda(tau_{mu nu}, tau_{mu' nu'}) <= 1 + sin^2(2*alpha) holds for all frames e, f in O(3) and all setting indices, then the supremum of sqrt(Lambda(tau_{mu nu}, tau_{mu' nu'})) over all frames and setting indices equals sqrt(1 + sin^2(2*alpha)).

theorem ghz_closed_network_value_exact_of_pointwise (α : ℝ)
    (hpt : ∀ (e f : Matrix (Fin 3) (Fin 3) ℝ), e ∈ Matrix.orthogonalGroup (Fin 3) ℝ →
      f ∈ Matrix.orthogonalGroup (Fin 3) ℝ → ∀ (μ ν μ' ν' : Fin 4),
      bell_network_lambda (ghz_correlation_vector α e f μ ν) (ghz_correlation_vector α e f μ' ν')
        ≤ 1 + Real.sin (2 * α) ^ 2) :
    sSup { Real.sqrt (bell_network_lambda (ghz_correlation_vector α e f μ ν)
        (ghz_correlation_vector α e f μ' ν')) |
      (e ∈ Matrix.orthogonalGroup (Fin 3) ℝ) (f ∈ Matrix.orthogonalGroup (Fin 3) ℝ)
      (μ : Fin 4) (ν : Fin 4) (μ' : Fin 4) (ν' : Fin 4) } = Real.sqrt (1 + Real.sin (2 * α) ^ 2)
ghz_closed_network_value_memIn LeanQuantum Computation

For every parameter alpha, the value sqrt(1 + sin^2(2*alpha)) belongs to the closed-network value set, i.e. it is realized as sqrt(Lambda(tau_{mu nu}, tau_{mu' nu'})) for some orthonormal frames e, f in O(3) and some setting indices.

theorem ghz_closed_network_value_mem (α : ℝ) :
    Real.sqrt (1 + Real.sin (2 * α) ^ 2) ∈
      { Real.sqrt (bell_network_lambda (ghz_correlation_vector α e f μ ν)
          (ghz_correlation_vector α e f μ' ν')) |
        (e ∈ Matrix.orthogonalGroup (Fin 3) ℝ) (f ∈ Matrix.orthogonalGroup (Fin 3) ℝ)
        (μ : Fin 4) (ν : Fin 4) (μ' : Fin 4) (ν' : Fin 4) }
ghz_correlation_vector_coords_zero_of_zeroIn LeanQuantum Computation

If mu = 0 or nu = 0, the 0th and 1st coordinates of ghz_correlation_vector vanish.

theorem ghz_correlation_vector_coords_zero_of_zero (α : ℝ) (e f : Matrix (Fin 3) (Fin 3) ℝ) (μ ν : Fin 4) (h : μ = 0 ∨ ν = 0) : ghz_correlation_vector α e f μ ν 0 = 0 ∧ ghz_correlation_vector α e f μ ν 1 = 0
ghz_correlation_vector_lambda_diagIn LeanQuantum Computation

For any single setting (mu, nu), Lambda(tau_{mu nu}, tau_{mu nu}) is at most 1 + sin^2(2alpha).

theorem ghz_correlation_vector_lambda_diag (α : ℝ) (e f : Matrix (Fin 3) (Fin 3) ℝ) (he : e ∈ Matrix.orthogonalGroup (Fin 3) ℝ) (hf : f ∈ Matrix.orthogonalGroup (Fin 3) ℝ) (μ ν : Fin 4) : bell_network_lambda (ghz_correlation_vector α e f μ ν) (ghz_correlation_vector α e f μ ν) ≤ 1 + Real.sin (2 * α) ^ 2
ghz_correlation_vector_lambda_distinct_nonzeroIn LeanQuantum Computation

For distinct nonzero setting pairs, Lambda(tau_{mu nu}, tau_{mu' nu'}) <= 1 + sin^2(2alpha).

theorem ghz_correlation_vector_lambda_distinct_nonzero (α : ℝ) (e f : Matrix (Fin 3) (Fin 3) ℝ) (he : e ∈ Matrix.orthogonalGroup (Fin 3) ℝ) (hf : f ∈ Matrix.orthogonalGroup (Fin 3) ℝ) (μ ν μ' ν' : Fin 4) (hμ : μ ≠ 0) (hν : ν ≠ 0) (hμ' : μ' ≠ 0) (hν' : ν' ≠ 0) (hne : μ ≠ μ' ∨ ν ≠ ν') : bell_network_lambda (ghz_correlation_vector α e f μ ν) (ghz_correlation_vector α e f μ' ν') ≤ 1 + Real.sin (2 * α) ^ 2
ghz_correlation_vector_lambda_zero_nnIn LeanQuantum Computation

When mu = 0 or nu = 0 and mu' != 0 and nu' != 0, Lambda(tau_{mu nu}, tau_{mu' nu'}) <= 1 + sin^2(2*alpha).

theorem ghz_correlation_vector_lambda_zero_nn (α : ℝ) (e f : Matrix (Fin 3) (Fin 3) ℝ) (he : e ∈ Matrix.orthogonalGroup (Fin 3) ℝ) (hf : f ∈ Matrix.orthogonalGroup (Fin 3) ℝ) (μ ν μ' ν' : Fin 4) (hzero : μ = 0 ∨ ν = 0) (hnn : μ' ≠ 0 ∧ ν' ≠ 0) : bell_network_lambda (ghz_correlation_vector α e f μ ν) (ghz_correlation_vector α e f μ' ν') ≤ 1 + Real.sin (2 * α) ^ 2
ghz_correlation_vector_norm_sqIn LeanQuantum Computation

The squared norm of the correlation vector tau_{mu nu} equals sin^2(2alpha) times (a_1^2+a_2^2)(c_1^2+c_2^2) plus the square of its third component cos(2alpha) a_0 c_0 + a_0 c_3 + a_3 c_0 + cos(2alpha) a_3 c_3, where a = ghz_pauli_coeff e mu and c = ghz_pauli_coeff f nu.

theorem ghz_correlation_vector_norm_sq (α : ℝ) (e f : Matrix (Fin 3) (Fin 3) ℝ) (μ ν : Fin 4) : (ghz_correlation_vector α e f μ ν ⬝ᵥ ghz_correlation_vector α e f μ ν) = Real.sin (2 * α) ^ 2 * ((ghz_pauli_coeff e μ 1) ^ 2 + (ghz_pauli_coeff e μ 2) ^ 2) * ((ghz_pauli_coeff f ν 1) ^ 2 + (ghz_pauli_coeff f ν 2) ^ 2) + (Real.cos (2 * α) * ghz_pauli_coeff e μ 0 * ghz_pauli_coeff f ν 0 + ghz_pauli_coeff e μ 0 * ghz_pauli_coeff f ν 3 + ghz_pauli_coeff e μ 3 * ghz_pauli_coeff f ν 0 + Real.cos (2 * α) * ghz_pauli_coeff e μ 3 * ghz_pauli_coeff f ν 3) ^ 2
ghz_correlation_vector_norm_sq_le_oneIn LeanQuantum Computation

The Euclidean norm squared of ghz_correlation_vector alpha e f mu nu is at most 1 for orthogonal matrices e and f.

theorem ghz_correlation_vector_norm_sq_le_one (α : ℝ) (e f : Matrix (Fin 3) (Fin 3) ℝ) (he : e ∈ Matrix.orthogonalGroup (Fin 3) ℝ) (hf : f ∈ Matrix.orthogonalGroup (Fin 3) ℝ) (μ ν : Fin 4) : ghz_correlation_vector α e f μ ν ⬝ᵥ ghz_correlation_vector α e f μ ν ≤ 1
ghz_correlation_vector_norm_sq_of_ne_zeroIn LeanQuantum Computation

If mu and nu are both nonzero, then the squared norm of tau_{mu nu} equals sin^2(2alpha)(1-P)(1-Q) + cos^2(2alpha) P Q, where P = (a_3)^2 and Q = (c_3)^2.

theorem ghz_correlation_vector_norm_sq_of_ne_zero (α : ℝ) (e f : Matrix (Fin 3) (Fin 3) ℝ) (he : e ∈ Matrix.orthogonalGroup (Fin 3) ℝ) (hf : f ∈ Matrix.orthogonalGroup (Fin 3) ℝ) (μ ν : Fin 4) (hμ : μ ≠ 0) (hν : ν ≠ 0) : (ghz_correlation_vector α e f μ ν ⬝ᵥ ghz_correlation_vector α e f μ ν) = Real.sin (2 * α) ^ 2 * (1 - (ghz_pauli_coeff e μ 3) ^ 2) * (1 - (ghz_pauli_coeff f ν 3) ^ 2) + Real.cos (2 * α) ^ 2 * (ghz_pauli_coeff e μ 3) ^ 2 * (ghz_pauli_coeff f ν 3) ^ 2
ghz_correlation_vector_sum_sq_le_of_neIn LeanQuantum Computation

For distinct nonzero settings (mu, nu) != (mu', nu'), the sum of squared norms of the correlation vectors is at most 1 + sin^2(2*alpha).

theorem ghz_correlation_vector_sum_sq_le_of_ne (α : ℝ) (e f : Matrix (Fin 3) (Fin 3) ℝ) (he : e ∈ Matrix.orthogonalGroup (Fin 3) ℝ) (hf : f ∈ Matrix.orthogonalGroup (Fin 3) ℝ) (μ ν μ' ν' : Fin 4) (hμ : μ ≠ 0) (hν : ν ≠ 0) (hμ' : μ' ≠ 0) (hν' : ν' ≠ 0) (hne : μ ≠ μ' ∨ ν ≠ ν') : ghz_correlation_vector α e f μ ν ⬝ᵥ ghz_correlation_vector α e f μ ν + ghz_correlation_vector α e f μ' ν' ⬝ᵥ ghz_correlation_vector α e f μ' ν' ≤ 1 + Real.sin (2 * α) ^ 2
ghz_correlation_vector_third_coord_sq_le_oneIn LeanQuantum Computation

If mu = 0 or nu = 0, then the square of the third component of tau_{mu nu} is at most 1.

theorem ghz_correlation_vector_third_coord_sq_le_one (α : ℝ) (e f : Matrix (Fin 3) (Fin 3) ℝ) (he : e ∈ Matrix.orthogonalGroup (Fin 3) ℝ) (hf : f ∈ Matrix.orthogonalGroup (Fin 3) ℝ) (μ ν : Fin 4) (h : μ = 0 ∨ ν = 0) : (ghz_correlation_vector α e f μ ν 2) ^ 2 ≤ 1
ghz_dim_eight_case_hamiltonianIn LeanQuantum Computation

Let G be a simple graph on 8 vertices with edge colouring c and weights w forming a GHZ graph (is_ghz_graph G c w). Suppose M₀,…,M₃ are perfect matchings of G, each monochromatic with pairwise distinct colours, and suppose SOME pair of them has a union NOT split by any 4-element vertex set (equivalently, that pair's union is an alternating Hamiltonian 8-cycle). Then we reach a contradiction.

theorem ghz_dim_eight_case_hamiltonian {V : Type*} [Fintype V] (G : SimpleGraph V)
    (c : Sym2 V → ℕ) (w : Sym2 V → ℂ) (hV : Fintype.card V = 8)
    (Ms : Fin 4 → Finset (Sym2 V)) (ks : Fin 4 → ℕ)
    (hperf : ∀ i, ghz_is_perfect_matching G (Ms i))
    (hmono : ∀ i, ∀ e ∈ Ms i, c e = ks i)
    (hinj : Function.Injective ks)
    (hham : ∃ i j : Fin 4, i ≠ j ∧ ¬ (∃ A : Finset V, A.card = 4 ∧
        ∀ e : Sym2 V, (e ∈ Ms i ∨ e ∈ Ms j) →
          (∀ v : V, v ∈ e → v ∈ A) ∨ (∀ v : V, v ∈ e → v ∉ A)))
    (hw : is_ghz_graph G c w) : False
ghz_dim_eight_case_two_four_cyclesIn LeanQuantum Computation

Let G be a simple graph on 8 vertices with an edge colouring c and edge weights w forming a GHZ graph (is_ghz_graph G c w). Suppose M₀,…,M₃ are perfect matchings of G, each monochromatic with pairwise distinct colours, and suppose additionally that the union of ANY two of them is split by a 4-element vertex set (equivalently, each pairwise union is two disjoint 4-cycles). Then we reach a contradiction.

theorem ghz_dim_eight_case_two_four_cycles {V : Type*} [Fintype V] (G : SimpleGraph V)
    (c : Sym2 V → ℕ) (w : Sym2 V → ℂ) (hV : Fintype.card V = 8)
    (Ms : Fin 4 → Finset (Sym2 V)) (ks : Fin 4 → ℕ)
    (hperf : ∀ i, ghz_is_perfect_matching G (Ms i))
    (hmono : ∀ i, ∀ e ∈ Ms i, c e = ks i)
    (hinj : Function.Injective ks)
    (hsplit : ∀ i j : Fin 4, i ≠ j → ∃ A : Finset V, A.card = 4 ∧
        ∀ e : Sym2 V, (e ∈ Ms i ∨ e ∈ Ms j) →
          (∀ v : V, v ∈ e → v ∈ A) ∨ (∀ v : V, v ∈ e → v ∉ A))
    (hw : is_ghz_graph G c w) : False
ghz_dim_eight_no_four_monochromatic_coloursIn LeanQuantum Computation

For a simple graph G on 8 vertices and a GHZ structure is_ghz_graph G c w, there do not exist four perfect matchings M₀,…,M₃ of G, each monochromatic with pairwise distinct colours. Equivalently, at most 3 colours admit a monochromatic perfect matching.

theorem ghz_dim_eight_no_four_monochromatic_colours {V : Type*} [Fintype V]
    (G : SimpleGraph V) (hV : Fintype.card V = 8)
    (c : Sym2 V → ℕ) (w : Sym2 V → ℂ) (hw : is_ghz_graph G c w) :
    ¬ ∃ (Ms : Fin 4 → Finset (Sym2 V)) (ks : Fin 4 → ℕ),
      (∀ i, ghz_is_perfect_matching G (Ms i)) ∧
      (∀ i, ∀ e ∈ Ms i, c e = ks i) ∧ Function.Injective ks
ghz_dim_six_three_matchings_transversalIn LeanQuantum Computation

For any simple graph on a 6-vertex set and any three pairwise disjoint perfect matchings M1, M2, M3, there exists a transversal edge triple {e1, e2, e3} with e_i ∈ M_i that forms a perfect matching.

theorem ghz_dim_six_three_matchings_transversal {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (hV : Fintype.card V = 6)
    (M1 M2 M3 : Finset (Sym2 V))
    (hM1 : ghz_is_perfect_matching G M1)
    (hM2 : ghz_is_perfect_matching G M2)
    (hM3 : ghz_is_perfect_matching G M3)
    (h12 : Disjoint M1 M2) (h23 : Disjoint M2 M3) (h13 : Disjoint M1 M3) :
    ∃ e1 ∈ M1, ∃ e2 ∈ M2, ∃ e3 ∈ M3,
      ghz_is_perfect_matching G ({e1, e2, e3} : Finset (Sym2 V))
ghz_lambda_one_z_axis_algebraIn LeanQuantum Computation

With sigma^2 + kappa^2 = 1, t^2 <= 1 and P, Q in [0,1]: (1+sigma^2)^2 - (1+sigma^2)(t^2 + sigma^2 (1-P)(1-Q) + kappa^2 PQ) + t^2 kappa^2 P Q >= 0.

theorem ghz_lambda_one_z_axis_algebra (σ κ t P Q : ℝ) (hσκ : σ ^ 2 + κ ^ 2 = 1) (ht : t ^ 2 ≤ 1) (hP : 0 ≤ P) (hP1 : P ≤ 1) (hQ : 0 ≤ Q) (hQ1 : Q ≤ 1) : 0 ≤ (1 + σ ^ 2) ^ 2 - (1 + σ ^ 2) * (t ^ 2 + (σ ^ 2 * (1 - P) * (1 - Q) + κ ^ 2 * P * Q)) + t ^ 2 * (κ ^ 2 * P * Q)
ghz_matching_index_dim_eight_of_colour_boundIn LeanQuantum Computation

For a simple graph G on 8 vertices, if every GHZ colouring/weight structure (is_ghz_graph G c w) has at most 3 colours that admit a monochromatic perfect matching, then the matching index ghz_matching_index G is at most 3.

theorem ghz_matching_index_dim_eight_of_colour_bound {V : Type*} [Fintype V]
    (G : SimpleGraph V) (hV : Fintype.card V = 8)
    (h : ∀ (c : Sym2 V → ℕ) (w : Sym2 V → ℂ), is_ghz_graph G c w →
      Set.ncard {k : ℕ | ∃ M : Finset (Sym2 V), ghz_is_perfect_matching G M ∧ ∀ e ∈ M, c e = k} ≤ 3) :
    ghz_matching_index G ≤ 3
ghz_pauli_coeff_orthonormalIn LeanQuantum Computation

For an orthonormal frame e of R^3, the four Pauli coefficient vectors ghz_pauli_coeff e mu, mu in {0,1,2,3}, are pairwise orthogonal and each has norm 1: the sum over i of a_i * a'_i is 1 when mu = mu' and 0 otherwise.

theorem ghz_pauli_coeff_orthonormal (e : Matrix (Fin 3) (Fin 3) ℝ) (he : e ∈ Matrix.orthogonalGroup (Fin 3) ℝ) (μ μ' : Fin 4) : (∑ i : Fin 4, ghz_pauli_coeff e μ i * ghz_pauli_coeff e μ' i) = if μ = μ' then 1 else 0
ghz_pauli_coeff_third_sq_add_leIn LeanQuantum Computation

For two distinct nonzero setting indices mu, mu' the third Pauli coefficients of the frame e satisfy (a_3)^2 + (a'_3)^2 <= 1.

theorem ghz_pauli_coeff_third_sq_add_le (e : Matrix (Fin 3) (Fin 3) ℝ) (he : e ∈ Matrix.orthogonalGroup (Fin 3) ℝ) (μ μ' : Fin 4) (hμ : μ ≠ 0) (hμ' : μ' ≠ 0) (hne : μ ≠ μ') : (ghz_pauli_coeff e μ 3) ^ 2 + (ghz_pauli_coeff e μ' 3) ^ 2 ≤ 1
ghz_simple_graph_dim_eightIn LeanQuantum Computation

For any finite type V with Fintype.card V = 8 and any simple graph G on V, the matching index ghz_matching_index G is at most 3.

theorem ghz_simple_graph_dim_eight {V : Type*} [Fintype V] (G : SimpleGraph V)
    (hV : Fintype.card V = 8) : ghz_matching_index G ≤ 3
ghz_simple_graph_dim_sixIn LeanQuantum Computation

For any finite type V with Fintype.card V = 6 and any simple graph G on V, the matching index ghz_matching_index G is at most 2.

theorem ghz_simple_graph_dim_six {V : Type*} [Fintype V] (G : SimpleGraph V)
    (hV : Fintype.card V = 6) : ghz_matching_index G ≤ 2
ghz_simple_graph_dim_six_eightIn LeanQuantum Computation

For any finite type V and any simple graph G on V, if Fintype.card V = 6 then ghz_matching_index G ≤ 2, and if Fintype.card V = 8 then ghz_matching_index G ≤ 3.

theorem ghz_simple_graph_dim_six_eight {V : Type*} [Fintype V] (G : SimpleGraph V) :
    (Fintype.card V = 6 → ghz_matching_index G ≤ 2) ∧
    (Fintype.card V = 8 → ghz_matching_index G ≤ 3)
ghz_three_monochromatic_matchingsIn LeanQuantum Computation

If the number of monochromatic inherited vertex colourings is at least 3, there exist three pairwise disjoint perfect matchings M1, M2, M3 whose edges are uniformly coloured by distinct colours k1, k2, k3.

theorem ghz_three_monochromatic_matchings {V : Type*} [Fintype V] (G : SimpleGraph V)
    (hV : Fintype.card V = 6) (c : Sym2 V → ℕ)
    (h3 : 3 ≤ Set.ncard { vc : V → ℕ |
      (∃ M : Finset (Sym2 V), ghz_is_perfect_matching G M ∧ ∀ e ∈ M, ∀ u : V, u ∈ e → vc u = c e) ∧
      (∃ k : ℕ, ∀ u : V, vc u = k) }) :
    ∃ M1 M2 M3 : Finset (Sym2 V),
      ghz_is_perfect_matching G M1 ∧
      ghz_is_perfect_matching G M2 ∧
      ghz_is_perfect_matching G M3 ∧
      Disjoint M1 M2 ∧ Disjoint M2 M3 ∧ Disjoint M1 M3 ∧
      ∃ k1 k2 k3 : ℕ, k1 ≠ k2 ∧ k2 ≠ k3 ∧ k1 ≠ k3 ∧
        (∀ e ∈ M1, c e = k1) ∧ (∀ e ∈ M2, c e = k2) ∧ (∀ e ∈ M3, c e = k3)
ghz_transversal_contradictionIn LeanQuantum Computation

In a GHZ graph G, there cannot exist a perfect matching {e1, e2, e3} whose edges have pairwise distinct colours, because its induced non-monochromatic vertex colouring has non-zero weight (as this matching is uniquely compatible).

theorem ghz_transversal_contradiction {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (c : Sym2 V → ℕ) (w : Sym2 V → ℂ)
    (hw : is_ghz_graph G c w)
    (e1 e2 e3 : Sym2 V)
    (hM : ghz_is_perfect_matching G ({e1, e2, e3} : Finset (Sym2 V)))
    (h12 : c e1 ≠ c e2) (h23 : c e2 ≠ c e3) (h13 : c e1 ≠ c e3) :
    False
ghz_two_nonzero_constraint_dischargeIn LeanQuantum Computation

For two distinct nonzero setting pairs, the three constraint alternatives needed by the T4-T4 algebraic inequality always hold: either the two e-indices agree and the two f-third-coefficient squares sum to at most 1, or symmetrically, or both sums are at most 1.

theorem ghz_two_nonzero_constraint_discharge (e f : Matrix (Fin 3) (Fin 3) ℝ) (haddE : ∀ μ μ' : Fin 4, μ ≠ 0 → μ' ≠ 0 → μ ≠ μ' → (ghz_pauli_coeff e μ 3) ^ 2 + (ghz_pauli_coeff e μ' 3) ^ 2 ≤ 1) (haddF : ∀ ν ν' : Fin 4, ν ≠ 0 → ν' ≠ 0 → ν ≠ ν' → (ghz_pauli_coeff f ν 3) ^ 2 + (ghz_pauli_coeff f ν' 3) ^ 2 ≤ 1) (μ ν μ' ν' : Fin 4) (hμ : μ ≠ 0) (hν : ν ≠ 0) (hμ' : μ' ≠ 0) (hν' : ν' ≠ 0) (hne : μ ≠ μ' ∨ ν ≠ ν') : ((ghz_pauli_coeff e μ 3) ^ 2 = (ghz_pauli_coeff e μ' 3) ^ 2 ∧ (ghz_pauli_coeff f ν 3) ^ 2 + (ghz_pauli_coeff f ν' 3) ^ 2 ≤ 1) ∨ ((ghz_pauli_coeff f ν 3) ^ 2 = (ghz_pauli_coeff f ν' 3) ^ 2 ∧ (ghz_pauli_coeff e μ 3) ^ 2 + (ghz_pauli_coeff e μ' 3) ^ 2 ≤ 1) ∨ ((ghz_pauli_coeff e μ 3) ^ 2 + (ghz_pauli_coeff e μ' 3) ^ 2 ≤ 1 ∧ (ghz_pauli_coeff f ν 3) ^ 2 + (ghz_pauli_coeff f ν' 3) ^ 2 ≤ 1)
ghz_two_nonzero_sum_sq_algebraIn LeanQuantum Computation

Let a + b = 1 with a, b >= 0 and let P, Q, P', Q' lie in [0,1]. If (P = P' and Q + Q' <= 1) or (Q = Q' and P + P' <= 1) or (P + P' <= 1 and Q + Q' <= 1), then a(1-P)(1-Q) + bPQ + a(1-P')(1-Q') + bP'Q' <= 1 + a.

theorem ghz_two_nonzero_sum_sq_algebra (a b P Q P' Q' : ℝ) (ha : 0 ≤ a) (hb : 0 ≤ b) (hab : a + b = 1) (hP : 0 ≤ P) (hP1 : P ≤ 1) (hQ : 0 ≤ Q) (hQ1 : Q ≤ 1) (hP' : 0 ≤ P') (hP'1 : P' ≤ 1) (hQ' : 0 ≤ Q') (hQ'1 : Q' ≤ 1) (hcase : (P = P' ∧ Q + Q' ≤ 1) ∨ (Q = Q' ∧ P + P' ≤ 1) ∨ (P + P' ≤ 1 ∧ Q + Q' ≤ 1)) : a * (1 - P) * (1 - Q) + b * P * Q + (a * (1 - P') * (1 - Q') + b * P' * Q') ≤ 1 + a
hypergraph_state_pauli_inner_fourthIn LeanQuantum Computation

For a hypergraph state ψ_H = hypergraphState n H and any Pauli string p, ‖⟨ψ_H|P_p|ψ_H⟩‖⁴ = (2^n)^{-4} · (∑_x χ_H(x)·χ_H(x + pauliXSupport p)·(−1)^{∑_i (pauliZSupport p i)·(x i)})⁴.

theorem hypergraph_state_pauli_inner_fourth (n : ℕ) (H : Finset (Finset (Fin n))) (p : PauliString n) : ‖inner ℂ (hypergraphState n H) (pauliOp p (hypergraphState n H))‖ ^ 4 = (((2 : ℝ) ^ n)⁻¹) ^ 4 * (∑ x : Fin n → Fin 2, cubicHypergraphCocycle n H x * cubicHypergraphCocycle n H (x + pauliXSupport p) * (-1 : ℝ) ^ (∑ i : Fin n, (pauliZSupport p i).val * (x i).val)) ^ 4
is_bipartite_locally_encodable_of_local_unitaryIn LeanQuantum Computation

If a bipartite state ψ is locally encodable, then (uA ⊗ uB) ψ is also locally encodable for any unitaries uA and uB.

theorem is_bipartite_locally_encodable_of_local_unitary
    {m n : Type*} [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n]
    (ψ : EuclideanSpace ℂ (m × n)) (hψ : is_bipartite_locally_encodable ψ)
    (uA : Matrix.unitaryGroup m ℂ) (uB : Matrix.unitaryGroup n ℂ) :
    is_bipartite_locally_encodable (Matrix.toEuclideanLin (Matrix.kronecker uA.1 uB.1) ψ)
is_local_unitary_invIn LeanQuantum Computation

The inverse of a local unitary is again a local unitary: invert each local factor.

theorem is_local_unitary_inv {Parties : Type*} [Fintype Parties] [DecidableEq Parties]
    {d : Parties → Type*} [∀ p, Fintype (d p)] [∀ p, DecidableEq (d p)]
    {V : Matrix.unitaryGroup ((p : Parties) → d p) ℂ}
    (hV : is_local_unitary V) : is_local_unitary V⁻¹
is_local_unitary_mulIn LeanQuantum Computation

The product of two local unitaries (tensor products of local unitaries) is again a local unitary: tensor the local factors.

theorem is_local_unitary_mul {Parties : Type*} [Fintype Parties] [DecidableEq Parties]
    {d : Parties → Type*} [∀ p, Fintype (d p)] [∀ p, DecidableEq (d p)]
    {V W : Matrix.unitaryGroup ((p : Parties) → d p) ℂ}
    (hV : is_local_unitary V) (hW : is_local_unitary W) : is_local_unitary (V * W)
is_locally_encodable_of_local_unitaryIn LeanQuantum Computation

If a state ψ is locally encodable and V is a local unitary, then Vψ is locally encodable.

theorem is_locally_encodable_of_local_unitary {Parties : Type*} [Fintype Parties] [DecidableEq Parties]
    {d : Parties → Type*} [∀ p, Fintype (d p)] [∀ p, DecidableEq (d p)]
    {ψ : EuclideanSpace ℂ ((p : Parties) → d p)}
    (hψ : is_locally_encodable ψ)
    (V : Matrix.unitaryGroup ((p : Parties) → d p) ℂ) (hV : is_local_unitary V) :
    is_locally_encodable
      (Matrix.toEuclideanLin (V : Matrix ((p : Parties) → d p) ((p : Parties) → d p) ℂ) ψ)
krawtchouk_zeros_classification_le_fourIn LeanQuantum Computation

For m ≤ 4, positive integers satisfying k + ℓ = m + n - 2 with m ≤ n, k ≤ ℓ and binary Krawtchouk zero krawtchouk (k + ℓ) (m - 1) k = 0 satisfy k = ℓ or belong to the m = 3 family or one of the two m = 4 infinite families (arXiv:2611.08518 Proposition 2.2).

theorem krawtchouk_zeros_classification_le_four
    (m n k ℓ : ℕ)
    (hm : 0 < m) (hn : 0 < n) (hk : 0 < k) (hℓ : 0 < ℓ)
    (hm4 : m ≤ 4)
    (hmn : m ≤ n) (hkℓ : k ≤ ℓ)
    (hsum : k + ℓ = m + n - 2)
    (hpoly : krawtchouk (k + ℓ) (m - 1) k = 0) :
    k = ℓ ∨
    (m = 3 ∧ ∃ t ≥ 2, n = t ^ 2 - 1 ∧ k = t * (t - 1) / 2 ∧ ℓ = t * (t + 1) / 2) ∨
    (m = 4 ∧ ∃ t ≥ 1, n = 3 * t ^ 2 + 2 * t - 1 ∧ k = (3 * t ^ 2 - t) / 2 ∧ ℓ = (3 * t ^ 2 + 5 * t + 2) / 2) ∨
    (m = 4 ∧ ∃ s ≥ 1, n = 3 * s ^ 2 + 4 * s ∧ k = (3 * s ^ 2 + s) / 2 ∧ ℓ = (3 * s ^ 2 + 7 * s + 4) / 2)
lifting_lemma_bipartite_universal_local_encodabilityIn LeanQuantum Computation

Let dA, dA', dB ∈ ℕ with dA, dA' ≥ dB ≥ 2. If universal local encodability holds for both dA × dB and dA' × dB bipartite quantum systems, then it also holds for (dA + dA') × dB bipartite quantum systems.

theorem lifting_lemma_bipartite_universal_local_encodability
    (dA dA' dB : ℕ) (hdA : dB ≤ dA) (hdA' : dB ≤ dA') (hdB : 2 ≤ dB)
    (hA : bipartite_universally_locally_encodable dA dB)
    (hA' : bipartite_universally_locally_encodable dA' dB) :
    bipartite_universally_locally_encodable (dA + dA') dB
local_encoding_via_abelian_traceless_groupIn LeanQuantum Computation

For a finite set of parties with finite dimension types d p, let G be an abelian subgroup of the unitary group Matrix.unitaryGroup ((p : Parties) → d p) ℂ of order equal to the total dimension D = Fintype.card ((p : Parties) → d p), such that every element of G is a tensor product of local unitaries and every non-identity element has Matrix.trace equal to 0. Then there exists an orthonormal basis ψ of EuclideanSpace ℂ ((p : Parties) → d p) that is a common eigenbasis for all elements of G, and for every choice of phase angles θ : ((p : Parties) → d p) → ℝ, the maximally coherent state D^{-1/2} ∑_j exp(i θ_j) ψ_j, as well as every state obtained from it by a local unitary, is locally encodable.

theorem local_encoding_via_abelian_traceless_group {Parties : Type*} [Fintype Parties] [DecidableEq Parties] {d : Parties → Type*} [∀ p, Fintype (d p)] [∀ p, DecidableEq (d p)] (G : Subgroup (Matrix.unitaryGroup ((p : Parties) → d p) ℂ)) (h_lu : ∀ g ∈ G, ∃ u : ∀ p, Matrix.unitaryGroup (d p) ℂ, (g : Matrix.unitaryGroup ((p : Parties) → d p) ℂ).1 = fun x y => ∏ p, (u p).1 (x p) (y p)) (h_comm : ∀ g h : G, g * h = h * g) (h_trace : ∀ g : G, g ≠ 1 → Matrix.trace g.1.1 = 0) (h_card : Nat.card G = Fintype.card ((p : Parties) → d p)) : ∃ ψ : OrthonormalBasis ((p : Parties) → d p) ℂ (EuclideanSpace ℂ ((p : Parties) → d p)), (∀ g : G, ∀ j, ∃ c : ℂ, Matrix.toEuclideanLin g.1.1 (ψ j) = c • ψ j) ∧ ∀ θ : ((p : Parties) → d p) → ℝ, let state : EuclideanSpace ℂ ((p : Parties) → d p) := ((1 / Real.sqrt (Fintype.card ((p : Parties) → d p))) : ℂ) • ∑ j, Complex.exp (Complex.I * (θ j : ℂ)) • ψ j; (∃ B : OrthonormalBasis ((p : Parties) → d p) ℂ (EuclideanSpace ℂ ((p : Parties) → d p)), ∀ j, ∃ V : Matrix.unitaryGroup ((p : Parties) → d p) ℂ, (∃ u : ∀ p, Matrix.unitaryGroup (d p) ℂ, V.1 = fun x y => ∏ p, (u p).1 (x p) (y p)) ∧ B j = Matrix.toEuclideanLin V.1 state) ∧ ∀ φ : EuclideanSpace ℂ ((p : Parties) → d p), (∃ V : Matrix.unitaryGroup ((p : Parties) → d p) ℂ, (∃ u : ∀ p, Matrix.unitaryGroup (d p) ℂ, V.1 = fun x y => ∏ p, (u p).1 (x p) (y p)) ∧ φ = Matrix.toEuclideanLin V.1 state) → (∃ B : OrthonormalBasis ((p : Parties) → d p) ℂ (EuclideanSpace ℂ ((p : Parties) → d p)), ∀ j, ∃ V : Matrix.unitaryGroup ((p : Parties) → d p) ℂ, (∃ u : ∀ p, Matrix.unitaryGroup (d p) ℂ, V.1 = fun x y => ∏ p, (u p).1 (x p) (y p)) ∧ B j = Matrix.toEuclideanLin V.1 φ)
locally_encodable_of_orthonormal_local_translatesIn LeanQuantum Computation

If v is an orthonormal family of states indexed by a finite type of cardinality equal to the dimension, each v i being a local unitary applied to ψ, then ψ is locally encodable.

theorem locally_encodable_of_orthonormal_local_translates {Parties : Type*} [Fintype Parties]
    [DecidableEq Parties] {d : Parties → Type*} [∀ p, Fintype (d p)] [∀ p, DecidableEq (d p)]
    (ψ : EuclideanSpace ℂ ((p : Parties) → d p)) (v : ((p : Parties) → d p) → EuclideanSpace ℂ ((p : Parties) → d p))
    (hv : Orthonormal ℂ v)
    (hcard : Fintype.card ((p : Parties) → d p) = Module.finrank ℂ (EuclideanSpace ℂ ((p : Parties) → d p)))
    (hvψ : ∀ i, ∃ V : Matrix.unitaryGroup ((p : Parties) → d p) ℂ,
      is_local_unitary V ∧ v i = Matrix.toEuclideanLin (V : Matrix ((p : Parties) → d p) ((p : Parties) → d p) ℂ) ψ) :
    is_locally_encodable ψ
magic_rectangle_algebraic_sos_identityIn LeanQuantum Computation

Let A be an ℝ-algebra and let D, C, B : Fin 3 → A satisfy D j ^ 2 = C j ^ 2 = B j ^ 2 = 1 for all j, D 0 * D 1 * D 2 = 1, C 0 * C 1 * C 2 = -1, pairwise commutativity within D and within C, and every D and C commuting with every B. Setting X j = D j + C j, Y j = D j - C j, Z j = X j * B j, V j = X (j + 1) * B (j + 2) + X (j + 2) * B (j + 1), W j = Y (j + 1) * B (j + 2) + Y (j + 2) * B (j + 1), S = ∑ j : Fin 3, X j * B j, r = Real.sqrt 6, and q = 2 * r / 3, then (2 * r) • 1 - S = (5 * r / 64) • (∑ j : Fin 3, (Z j - q • 1) ^ 2) + (r / 12) • (∑ j : Fin 3, (Y j - (1 / r) • V j) ^ 2) + (r / 192) • (∑ j : Fin 3, (X j + q • B j - q • W j) ^ 2).

theorem magic_rectangle_algebraic_sos_identity
    {A : Type*} [Ring A] [Algebra ℝ A]
    (D C B : Fin 3 → A)
    (hD_sq : ∀ j, D j ^ 2 = 1)
    (hC_sq : ∀ j, C j ^ 2 = 1)
    (hB_sq : ∀ j, B j ^ 2 = 1)
    (hD_prod : D 0 * D 1 * D 2 = 1)
    (hC_prod : C 0 * C 1 * C 2 = -1)
    (hD_comm : ∀ j k, D j * D k = D k * D j)
    (hC_comm : ∀ j k, C j * C k = C k * C j)
    (hDB_comm : ∀ j k, D j * B k = B k * D j)
    (hCB_comm : ∀ j k, C j * B k = B k * C j) :
    let X := fun j => D j + C j
    let Y := fun j => D j - C j
    let Z := fun j => X j * B j
    let V := fun j => X (j + 1) * B (j + 2) + X (j + 2) * B (j + 1)
    let W := fun j => Y (j + 1) * B (j + 2) + Y (j + 2) * B (j + 1)
    let S := ∑ j : Fin 3, X j * B j
    let r : ℝ := Real.sqrt 6
    let q : ℝ := 2 * r / 3
    (2 * r) • (1 : A) - S =
      (5 * r / 64) • (∑ j : Fin 3, (Z j - q • 1) ^ 2) +
      (r / 12) • (∑ j : Fin 3, (Y j - (1 / r) • V j) ^ 2) +
      (r / 192) • (∑ j : Fin 3, (X j + q • B j - q • W j) ^ 2)
magic_rectangle_sos_certificateIn LeanQuantum Computation

Let H be a complex Hilbert space and let D, C, B : Fin 3 → (H →L[ℂ] H) be self-adjoint continuous linear operators satisfying D j ^ 2 = 1, C j ^ 2 = 1, and B j ^ 2 = 1 for all j, D 0 * D 1 * D 2 = 1, C 0 * C 1 * C 2 = -1, D j * D k = D k * D j, C j * C k = C k * C j, D j * B k = B k * D j, and C j * B k = B k * C j for all j, k. Setting X j = D j + C j, Y j = D j - C j, Z j = X j * B j, V j = X (j + 1) * B (j + 2) + X (j + 2) * B (j + 1), W j = Y (j + 1) * B (j + 2) + Y (j + 2) * B (j + 1), S = ∑ j : Fin 3, X j * B j, r = Real.sqrt 6, and q = 2 * r / 3, then the exact sum-of-squares certificate identity holds: (2 * r) • 1 - S = (5 * r / 64) • (∑ j : Fin 3, (Z j - q • 1) ^ 2) + (r / 12) • (∑ j : Fin 3, (Y j - (1 / r) • V j) ^ 2) + (r / 192) • (∑ j : Fin 3, (X j + q • B j - q • W j) ^ 2).

theorem magic_rectangle_sos_certificate
    {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
    (D C B : Fin 3 → (H →L[ℂ] H))
    (hD_sa : ∀ j, IsSelfAdjoint (D j))
    (hC_sa : ∀ j, IsSelfAdjoint (C j))
    (hB_sa : ∀ j, IsSelfAdjoint (B j))
    (hD_sq : ∀ j, D j ^ 2 = 1)
    (hC_sq : ∀ j, C j ^ 2 = 1)
    (hB_sq : ∀ j, B j ^ 2 = 1)
    (hD_prod : D 0 * D 1 * D 2 = 1)
    (hC_prod : C 0 * C 1 * C 2 = -1)
    (hD_comm : ∀ j k, D j * D k = D k * D j)
    (hC_comm : ∀ j k, C j * C k = C k * C j)
    (hDB_comm : ∀ j k, D j * B k = B k * D j)
    (hCB_comm : ∀ j k, C j * B k = B k * C j) :
    let X : Fin 3 → (H →L[ℂ] H) := fun j => D j + C j
    let Y : Fin 3 → (H →L[ℂ] H) := fun j => D j - C j
    let Z : Fin 3 → (H →L[ℂ] H) := fun j => X j * B j
    let V : Fin 3 → (H →L[ℂ] H) := fun j => X (j + 1) * B (j + 2) + X (j + 2) * B (j + 1)
    let W : Fin 3 → (H →L[ℂ] H) := fun j => Y (j + 1) * B (j + 2) + Y (j + 2) * B (j + 1)
    let S : H →L[ℂ] H := ∑ j : Fin 3, X j * B j
    let r : ℝ := Real.sqrt 6
    let q : ℝ := 2 * r / 3
    (2 * r) • (1 : H →L[ℂ] H) - S =
      (5 * r / 64) • (∑ j : Fin 3, (Z j - q • 1) ^ 2) +
      (r / 12) • (∑ j : Fin 3, (Y j - (1 / r) • V j) ^ 2) +
      (r / 192) • (∑ j : Fin 3, (X j + q • B j - q • W j) ^ 2)
magic_rectangle_sos_term1In LeanQuantum Computation

Let A be an ℝ-algebra and let D, C, B : Fin 3 → A satisfy B j ^ 2 = 1 for all j, and every D and C commuting with every B. Setting X j = D j + C j, Z j = X j * B j, and S = ∑ j : Fin 3, X j * B j, then for any q : ℝ, ∑ j : Fin 3, (Z j - q • 1) ^ 2 = (∑ j : Fin 3, X j ^ 2) - (2 * q) • S + (3 * q ^ 2) • 1.

theorem magic_rectangle_sos_term1
    {A : Type*} [Ring A] [Algebra ℝ A]
    (D C B : Fin 3 → A)
    (hB_sq : ∀ j, B j ^ 2 = 1)
    (hDB_comm : ∀ j k, D j * B k = B k * D j)
    (hCB_comm : ∀ j k, C j * B k = B k * C j)
    (q : ℝ) :
    let X := fun j => D j + C j
    let Z := fun j => X j * B j
    let S := ∑ j : Fin 3, X j * B j
    ∑ j : Fin 3, (Z j - q • (1 : A)) ^ 2 =
      (∑ j : Fin 3, X j ^ 2) - (2 * q) • S + (3 * q ^ 2) • (1 : A)
magic_rectangle_sos_term2In LeanQuantum Computation

Let A be an ℝ-algebra and let D, C, B : Fin 3 → A satisfy D j ^ 2 = C j ^ 2 = B j ^ 2 = 1 for all j, D 0 * D 1 * D 2 = 1, C 0 * C 1 * C 2 = -1, pairwise commutativity within D and within C, and every D and C commuting with every B. Setting X j = D j + C j, Y j = D j - C j, V j = X (j + 1) * B (j + 2) + X (j + 2) * B (j + 1), and S = ∑ j : Fin 3, X j * B j, then for any r : ℝ, ∑ j : Fin 3, (Y j - (1 / r) • V j) ^ 2 = (∑ j : Fin 3, Y j ^ 2) - (4 / r) • S + ((1 / r) ^ 2) • (∑ j : Fin 3, V j ^ 2).

theorem magic_rectangle_sos_term2
    {A : Type*} [Ring A] [Algebra ℝ A]
    (D C B : Fin 3 → A)
    (hD_sq : ∀ j, D j ^ 2 = 1)
    (hC_sq : ∀ j, C j ^ 2 = 1)
    (hB_sq : ∀ j, B j ^ 2 = 1)
    (hD_prod : D 0 * D 1 * D 2 = 1)
    (hC_prod : C 0 * C 1 * C 2 = -1)
    (hD_comm : ∀ j k, D j * D k = D k * D j)
    (hC_comm : ∀ j k, C j * C k = C k * C j)
    (hDB_comm : ∀ j k, D j * B k = B k * D j)
    (hCB_comm : ∀ j k, C j * B k = B k * C j)
    (r : ℝ) :
    let X := fun j => D j + C j
    let Y := fun j => D j - C j
    let V := fun j => X (j + 1) * B (j + 2) + X (j + 2) * B (j + 1)
    let S := ∑ j : Fin 3, X j * B j
    ∑ j : Fin 3, (Y j - (1 / r) • V j) ^ 2 =
      (∑ j : Fin 3, Y j ^ 2) - (4 / r) • S + ((1 / r) ^ 2) • (∑ j : Fin 3, V j ^ 2)
magic_rectangle_sos_term3In LeanQuantum Computation

Let A be an ℝ-algebra and let D, C, B : Fin 3 → A satisfy D j ^ 2 = C j ^ 2 = B j ^ 2 = 1 for all j, D 0 * D 1 * D 2 = 1, C 0 * C 1 * C 2 = -1, pairwise commutativity within D and within C, and every D and C commuting with every B. Setting X j = D j + C j, Y j = D j - C j, W j = Y (j + 1) * B (j + 2) + Y (j + 2) * B (j + 1), S = ∑ j : Fin 3, X j * B j, and J = ∑ j : Fin 3, Y j * (B (j + 1) * B (j + 2) + B (j + 2) * B (j + 1)), then for any q : ℝ, ∑ j : Fin 3, (X j + q • B j - q • W j) ^ 2 = (∑ j : Fin 3, X j ^ 2) - (2 * q) • S + (3 * q ^ 2) • 1 - (2 * q ^ 2) • J + (q ^ 2) • (∑ j : Fin 3, W j ^ 2).

theorem magic_rectangle_sos_term3
    {A : Type*} [Ring A] [Algebra ℝ A]
    (D C B : Fin 3 → A)
    (hD_sq : ∀ j, D j ^ 2 = 1)
    (hC_sq : ∀ j, C j ^ 2 = 1)
    (hB_sq : ∀ j, B j ^ 2 = 1)
    (hD_prod : D 0 * D 1 * D 2 = 1)
    (hC_prod : C 0 * C 1 * C 2 = -1)
    (hD_comm : ∀ j k, D j * D k = D k * D j)
    (hC_comm : ∀ j k, C j * C k = C k * C j)
    (hDB_comm : ∀ j k, D j * B k = B k * D j)
    (hCB_comm : ∀ j k, C j * B k = B k * C j)
    (q : ℝ) :
    let X := fun j => D j + C j
    let Y := fun j => D j - C j
    let W := fun j => Y (j + 1) * B (j + 2) + Y (j + 2) * B (j + 1)
    let S := ∑ j : Fin 3, X j * B j
    let J := ∑ j : Fin 3, Y j * (B (j + 1) * B (j + 2) + B (j + 2) * B (j + 1))
    ∑ j : Fin 3, (X j + q • B j - q • W j) ^ 2 =
      (∑ j : Fin 3, X j ^ 2) - (2 * q) • S + (3 * q ^ 2) • (1 : A) -
      (2 * q ^ 2) • J + (q ^ 2) • (∑ j : Fin 3, W j ^ 2)
matrix_column_indicator_sumIn LeanQuantum Computation

If the columns of S are distinct then its column indicator is the sum, over the columns, of the indicator of that column.

theorem matrix_column_indicator_sum {s n : ℕ} (S : Matrix (Fin s) (Fin n) (ZMod 2))
    (h_inj : Function.Injective Sᵀ) :
    column_indicator S = ∑ j, point_delta (Sᵀ j)
matrix_trace_eq_sum_eigenIn LeanQuantum Computation

If ψ is an orthonormal basis of EuclideanSpace ℂ ι diagonalizing the operator attached to a complex matrix M with eigenvalues c j (i.e. M · ψ_j = c_j ψ_j), then Matrix.trace M equals the sum of the c j.

theorem matrix_trace_eq_sum_eigen {ι : Type*} [Fintype ι] [DecidableEq ι]
    (ψ : OrthonormalBasis ι ℂ (EuclideanSpace ℂ ι)) (M : Matrix ι ι ℂ) (c : ι → ℂ)
    (h : ∀ j, Matrix.toEuclideanLin M (ψ j) = c j • ψ j) :
    Matrix.trace M = ∑ j, c j
norm_toEuclideanLin_kronecker_unitary_fstIn LeanQuantum Computation

Applying a unitary on the first tensor factor with identity on the second factor preserves the Euclidean norm of a bipartite state.

theorem norm_toEuclideanLin_kronecker_unitary_fst
    {m n : Type*} [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n]
    (uA : Matrix.unitaryGroup m ℂ) (ψ : EuclideanSpace ℂ (m × n)) :
    ‖Matrix.toEuclideanLin (Matrix.kronecker uA.1 (1 : Matrix n n ℂ)) ψ‖ = ‖ψ‖
op_757_all_to_all_cnot_bound_baseIn LeanQuantum Computation

Base case of the CNOT lower bound of OP-757: for k at least 2 a Clifford circuit whose score equals the optimum cannot be built from single-qubit gates alone, i.e. it has at least one CNOT gate.

theorem op_757_all_to_all_cnot_bound_base (k : ℕ) (hk : 2 ≤ k) (circ : List (CliffordGate k))
    (h_opt : clifford_circuit_score circ = two_sided_shadow_optimal_score k) :
    1 ≤ clifford_cnot_count circ
op_757_all_to_all_cnot_lower_bound_threeIn LeanQuantum Computation

The smallest instance of OP-757: every 3-qubit Clifford circuit whose score equals the optimum 99 contains at least 4 = 3*3-5 CNOT gates. Verified by an exhaustive 0-1 BFS over all 1451520 elements of Sp(6,2) (single-qubit gates free, CNOT cost 1): the maximum score with at most 3 CNOTs is 91, and 99 first appears at 4 CNOTs, realised by the explicit circuit already in the knowledge base.

theorem op_757_all_to_all_cnot_lower_bound_three (circ : List (CliffordGate 3))
    (h_opt : clifford_circuit_score circ = two_sided_shadow_optimal_score 3) :
    dual_axis_cnot_bound 3 ≤ clifford_cnot_count circ
open_problem_691In LeanQuantum Computation

For every integer d ≥ 2, there exists a natural number k strictly less than d^2 such that can_certify_noiseless_codes d k holds, meaning that noiseless quantum codes of dimension d can be certified by a family of fewer than d^2 binary measurements.

theorem open_problem_691 (d : ℕ) (hd : 2 ≤ d) : ∃ k < d ^ 2, can_certify_noiseless_codes d k
open_problem_736In LeanQuantum Computation

For every parameter alpha in (0, pi/2), all orthonormal frames e, f in O(3), and all setting indices mu, nu, mu', nu' in {0, 1, 2, 3}, the two-copy closed-network Bell measurement quantity Lambda(tau_{mu nu}, tau_{mu' nu'}) for the generalized GHZ state |GHZ_alpha> is at most 1 + sin^2(2*alpha).

theorem open_problem_736 (α : ℝ) (hα : α ∈ Set.Ioo 0 (Real.pi / 2)) (e f : Matrix (Fin 3) (Fin 3) ℝ) (he : e ∈ Matrix.orthogonalGroup (Fin 3) ℝ) (hf : f ∈ Matrix.orthogonalGroup (Fin 3) ℝ) (μ ν μ' ν' : Fin 4) : bell_network_lambda (ghz_correlation_vector α e f μ ν) (ghz_correlation_vector α e f μ' ν') ≤ 1 + Real.sin (2 * α) ^ 2
orbit_state_orthonormalIn LeanQuantum Computation

Let G be a subgroup of the unitary group on (p : Parties) → d p whose order equals the dimension D, each non-identity element traceless. If ψ is a common orthonormal eigenbasis of G and θ gives phase angles, the states g · D^{-1/2} ∑_j e^{i θ_j} ψ_j for g in G form an orthonormal family.

theorem orbit_state_orthonormal {Parties : Type*} [Fintype Parties] [DecidableEq Parties]
    {d : Parties → Type*} [∀ p, Fintype (d p)] [∀ p, DecidableEq (d p)]
    (G : Subgroup (Matrix.unitaryGroup ((p : Parties) → d p) ℂ))
    (h_trace : ∀ g : G, g ≠ 1 → Matrix.trace (g : Matrix.unitaryGroup ((p : Parties) → d p) ℂ).1 = 0)
    (h_card : Nat.card G = Fintype.card ((p : Parties) → d p))
    (ψ : OrthonormalBasis ((p : Parties) → d p) ℂ (EuclideanSpace ℂ ((p : Parties) → d p)))
    (hψ : ∀ g : G, ∀ j, ∃ c : ℂ,
      Matrix.toEuclideanLin (g : Matrix.unitaryGroup ((p : Parties) → d p) ℂ).1 (ψ j) = c • ψ j)
    (θ : ((p : Parties) → d p) → ℝ) :
    Orthonormal ℂ (fun g : G => Matrix.toEuclideanLin (g : Matrix.unitaryGroup ((p : Parties) → d p) ℂ).1
      ((((1 / Real.sqrt (Fintype.card ((p : Parties) → d p))) : ℝ) : ℂ) •
        ∑ j, Complex.exp (Complex.I * (θ j : ℂ)) • ψ j))
orthonormalBasis_of_orthonormal_card_eqIn LeanQuantum Computation

Let v be an orthonormal family indexed by a finite type ι in a finite-dimensional complex inner product space E, and suppose the cardinality of ι equals the finrank of E. Then there is an orthonormal basis B with B i = v i for all i.

theorem orthonormalBasis_of_orthonormal_card_eq {ι : Type*} [Fintype ι] [DecidableEq ι]
    {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℂ E] [FiniteDimensional ℂ E]
    {v : ι → E} (hv : Orthonormal ℂ v) (hcard : Fintype.card ι = Module.finrank ℂ E) :
    ∃ B : OrthonormalBasis ι ℂ E, ∀ i, B i = v i
pauliMatrix_apply_supportIn LeanQuantum Computation

For a Pauli string p and bit strings i, j : Fin n → Fin 2, the matrix entry (pauliMatrix p) i j equals (∏_k pauliPhase (p k)) · [j = i + pauliXSupport p] · (−1)^{∑_k (pauliZSupport p k)·(i k)}, where [·] is the 0/1 indicator.

theorem pauliMatrix_apply_support (n : ℕ) (p : PauliString n) (i j : Fin n → Fin 2) : (pauliMatrix p) i j = (∏ k, pauliPhase (p k)) * (if j = i + pauliXSupport p then 1 else 0) * ((-1 : ℂ) ^ (∑ k : Fin n, (pauliZSupport p k).val * (i k).val))
pauli_size_apply_clifford_circuit_eq_of_cnot_count_zeroIn LeanQuantum Computation

If a Clifford circuit contains no CNOT gate then every gate in it is single-qubit (H or S), hence preserves the size of every Pauli label.

theorem pauli_size_apply_clifford_circuit_eq_of_cnot_count_zero {k : ℕ} (circ : List (CliffordGate k))
    (h : clifford_cnot_count circ = 0) (p : PauliLabel k) :
    pauli_size (apply_clifford_circuit circ p) = pauli_size p
pauli_size_apply_clifford_circuit_leIn LeanQuantum Computation

Applying a Clifford circuit increases the size of any Pauli label by at most the number of CNOT gates in the circuit.

theorem pauli_size_apply_clifford_circuit_le {k : ℕ} (circ : List (CliffordGate k)) (p : PauliLabel k) : pauli_size (apply_clifford_circuit circ p) ≤ pauli_size p + clifford_cnot_count circ
ppt_qutrit_bell_setting_self_innerIn LeanQuantum Computation

Each of the three projective-setting vectors is normalized: s_j† s_j = 1.

theorem ppt_qutrit_bell_setting_self_inner (j : Fin 3) : star (ppt_qutrit_bell_setting j) ⬝ᵥ ppt_qutrit_bell_setting j = 1
ppt_qutrit_bell_state_posSemidefIn LeanQuantum Computation

The explicit two-qutrit PPT state is positive semidefinite, being a nonnegative combination of the four rank-one projections of its source vectors.

open scoped ComplexOrder in
theorem ppt_qutrit_bell_state_posSemidef : ppt_qutrit_bell_state.PosSemidef
ppt_qutrit_steered_reduced_stateIn LeanQuantum Computation

The reduced state of the explicit PPT two-qutrit state on the second qutrit is the diagonal matrix with entries 3437/6884, 3437/6884, 10/6884.

theorem ppt_qutrit_steered_reduced_state : (fun x y : Fin 3 => ∑ a : Fin 3, ppt_qutrit_bell_state (a, x) (a, y)) = Matrix.diagonal (fun i : Fin 3 => if i = 2 then (10/6884 : ℂ) else (3437/6884 : ℂ))
product_support_fourIn LeanQuantum Computation

For s at least 4 and three pairwise distinct rows l, l', l'' of an s by n binary matrix satisfying S1, S2, S3, the sum over the columns of the product of the three rows is zero.

theorem product_support_four {s n : ℕ} (hs : 4 ≤ s) (S : Matrix (Fin s) (Fin n) (ZMod 2))
    (hch : stabilizer_campbell_howard_conditions S)
    (l l' l'' : Fin s) (hl : l ≠ l') (hl' : l ≠ l'') (hl'' : l' ≠ l'') :
    ∑ j, S l j * S l' j * S l'' j = 0
qubit_posSemidef_diag_zero_imp_offdiag_zeroIn LeanQuantum Computation

If a 2x2 positive semidefinite matrix over C has a zero diagonal entry, its off-diagonal entry is zero.

theorem qubit_posSemidef_diag_zero_imp_offdiag_zero (A : Matrix (Fin 2) (Fin 2) ℂ)
    (hA : open scoped ComplexOrder in A.PosSemidef) (i j : Fin 2) (h : A i i = 0) :
    A i j = 0
qubit_two_measurements_are_effectsIn LeanQuantum Computation

The matrices !![1, 0; 0, 0] and !![1/2, 1/2; 1/2, 1/2] and their complements are positive semidefinite.

theorem qubit_two_measurements_are_effects :
    open scoped ComplexOrder in
    (!![(1 : ℂ), 0; 0, 0]).PosSemidef ∧
    (1 - !![(1 : ℂ), 0; 0, 0]).PosSemidef ∧
    (!![(1/2 : ℂ), 1/2; 1/2, 1/2]).PosSemidef ∧
    (1 - !![(1/2 : ℂ), 1/2; 1/2, 1/2]).PosSemidef
qubit_two_measurements_incompatibleIn LeanQuantum Computation

The binary measurements M0 = |0><0| and M1 = |+><+| have no joint parent POVM on C^2.

theorem qubit_two_measurements_incompatible :
    open scoped ComplexOrder in
    ¬ ∃ G : (Fin 2 → Bool) → Matrix (Fin 2) (Fin 2) ℂ,
      (∀ s, (G s).PosSemidef) ∧
      (∑ s, G s = 1) ∧
      (∑ s, if s 0 then G s else 0) = !![(1 : ℂ), 0; 0, 0] ∧
      (∑ s, if s 1 then G s else 0) = !![(1/2 : ℂ), 1/2; 1/2, 1/2]
range_criterion_subspaces_four_family_oneIn LeanQuantum Computation

For t ≥ 1, range criterion subspaces exist for m = 4, n = 3t^2+2t-1, k = (3t^2-t)/2, ℓ = (3t^2+5t+2)/2.

theorem range_criterion_subspaces_four_family_one (t : ℕ) (ht : 1 ≤ t) :
    has_range_criterion_subspaces 4 (3 * t ^ 2 + 2 * t - 1) ((3 * t ^ 2 - t) / 2) ((3 * t ^ 2 + 5 * t + 2) / 2)
range_criterion_subspaces_four_family_twoIn LeanQuantum Computation

For s ≥ 1, range criterion subspaces exist for m = 4, n = 3s^2+4s, k = (3s^2+s)/2, ℓ = (3s^2+7s+4)/2.

theorem range_criterion_subspaces_four_family_two (s : ℕ) (hs : 1 ≤ s) :
    has_range_criterion_subspaces 4 (3 * s ^ 2 + 4 * s) ((3 * s ^ 2 + s) / 2) ((3 * s ^ 2 + 7 * s + 4) / 2)
range_criterion_subspaces_symmetricIn LeanQuantum Computation

In the symmetric case k = ℓ with 2k = m + n - 2 and vanishing Krawtchouk polynomial krawtchouk (2k) (m-1) k = 0, range criterion subspaces always exist.

theorem range_criterion_subspaces_symmetric
    (m n k : ℕ)
    (hm : 0 < m) (hn : 0 < n) (hk : 0 < k)
    (hmn : m ≤ n)
    (hsum : 2 * k = m + n - 2)
    (hpoly : krawtchouk (2 * k) (m - 1) k = 0) :
    has_range_criterion_subspaces m n k k
rank_lt_two_projection_compress_scalarIn LeanQuantum Computation

Any rank < 2 Hermitian projection P on C^2 compresses any effect M to a scalar multiple c • P with 0 <= c <= 1.

theorem rank_lt_two_projection_compress_scalar (P M : Matrix (Fin 2) (Fin 2) ℂ)
    (hP : P.IsHermitian ∧ P * P = P ∧ P.rank < 2)
    (hM : open scoped ComplexOrder in M.PosSemidef ∧ (1 - M).PosSemidef) :
    ∃ c : ℝ, 0 ≤ c ∧ c ≤ 1 ∧ P * M * P = (c : ℂ) • P
recursive_nae_geometric_split_log_squared_recurrenceIn LeanQuantum Computation

A nonnegative sequence satisfying the displayed recurrence with a fixed factor C at least one and the rounded seven-eighths split is bounded by an exponential of a constant times log squared.

theorem recursive_nae_geometric_split_log_squared_recurrence (u : ℕ → ℝ) (C : ℝ) (hC : 1 ≤ C) (hu : ∀ d, 0 ≤ u d) (hrec : ∀ d : ℕ, 10 ≤ d → u d ≤ C * (d+1 : ℝ) * max 1 (u ((7*d+7)/8))) : ∃ K : ℝ, 0 < K ∧ ∀ d : ℕ, u d ≤ Real.exp (K * (Real.log (d+2 : ℝ))^2)
recursive_nae_paper_composition_recurrenceIn LeanQuantum Computation

There is a universal positive constant C such that, when depth d is split at a positive strictly smaller outer depth k, the exact query complexity is at most C times the sum of the correction cost 2^k 3^(d-k) and the simulation cost k times the exact complexity at depth k times (3/sqrt 2)^(d-k).

theorem recursive_nae_paper_composition_recurrence : ∃ C : ℝ, 0 < C ∧ ∀ d k : ℕ, 1 ≤ k → k < d → (exact_quantum_query_complexity (recursive_nae d) : ℝ) ≤ C * ((2 : ℝ)^k * (3 : ℝ)^(d-k) + (k : ℝ) * (exact_quantum_query_complexity (recursive_nae k) : ℝ) * (3 / Real.sqrt 2)^(d-k))
reed_muller_code_pairing_monomial_zeroIn LeanQuantum Computation

For s at least 4, a codeword of RM(s-4,s) has vanishing Boolean inner product with the monomial indexed by any nonempty set of size at most 3.

theorem reed_muller_code_pairing_monomial_zero (s : ℕ) (hs : 4 ≤ s)
    (c : (Fin s → ZMod 2) → ZMod 2) (hc : c ∈ reed_muller_code (s - 4) s)
    (U : Finset (Fin s)) (hU1 : 0 < U.card) (hU2 : U.card ≤ 3) :
    boolean_pairing c (monomial U) = 0
reed_muller_code_sum_memIn LeanQuantum Computation

Any ZMod 2-linear combination of the monomials indexed by sets of size at most r belongs to the Reed-Muller code RM(r, s).

theorem reed_muller_code_sum_mem (r s : ℕ) (c : Finset (Fin s) → ZMod 2) :
    (∑ T ∈ Finset.univ.filter (fun T => T.card ≤ r), c T • monomial T) ∈ reed_muller_code r s
spin_one_global_compatible_of_leIn LeanQuantum Computation

For any noise parameter t between 0 and sqrt(3)/2, the three noisy Cartesian spin-one measurements admit a joint POVM on C^3.

open scoped ComplexOrder BigOperators Matrix in
theorem spin_one_global_compatible_of_le (t : ℝ) (ht0 : 0 ≤ t) (ht : t ≤ Real.sqrt 3 / 2) :
  let J : Fin 3 → Matrix (Fin 3) (Fin 3) ℂ := ![
    !![0, 0, 0; 0, 0, -Complex.I; 0, Complex.I, 0],
    !![0, 0, Complex.I; 0, 0, 0; -Complex.I, 0, 0],
    !![0, -Complex.I, 0; Complex.I, 0, 0; 0, 0, 0]]
  let M : Fin 3 → Matrix (Fin 3) (Fin 3) ℂ := fun j => (1/2 : ℝ) • (1 + t • J j)
  ∃ G : (Fin 3 → Bool) → Matrix (Fin 3) (Fin 3) ℂ,
    (∀ s, (G s).PosSemidef) ∧ (∑ s, G s = 1) ∧
      ∀ j : Fin 3, (∑ s, if s j then G s else 0) = M j
spin_one_subspace_compatible_boundIn LeanQuantum Computation

For the noisy Cartesian spin-one measurements on the rank-two subspace P, any joint POVM forces the noise parameter t to be at most sqrt(3)/2.

open scoped ComplexOrder BigOperators Matrix in
theorem spin_one_subspace_compatible_bound (t : ℝ) :
  let J : Fin 3 → Matrix (Fin 3) (Fin 3) ℂ := ![
    !![0, 0, 0; 0, 0, -Complex.I; 0, Complex.I, 0],
    !![0, 0, Complex.I; 0, 0, 0; -Complex.I, 0, 0],
    !![0, -Complex.I, 0; Complex.I, 0, 0; 0, 0, 0]]
  let M : Fin 3 → Matrix (Fin 3) (Fin 3) ℂ := fun j => (1/2 : ℝ) • (1 + t • J j)
  let P : Matrix (Fin 3) (Fin 3) ℂ := !![1/2, Complex.I/2, 0; -Complex.I/2, 1/2, 0; 0, 0, 1]
  (∃ G : (Fin 3 → Bool) → Matrix (Fin 3) (Fin 3) ℂ,
    (∀ s, (G s).PosSemidef) ∧ (∑ s, G s = P) ∧
      ∀ j : Fin 3, (∑ s, if s j then G s else 0) = P * M j * P) →
  t ≤ Real.sqrt 3 / 2
spin_one_symmetric_triple_no_subspace_gapIn LeanQuantum Computation

For the three equally noisy Cartesian spin-one binary measurements with parameter between zero and one, global incompatibility forces incompatibility on the displayed rank-two subspace.

theorem spin_one_symmetric_triple_no_subspace_gap (t : ℝ) (ht0 : 0 ≤ t) (ht1 : t ≤ 1) :
  let J : Fin 3 → Matrix (Fin 3) (Fin 3) ℂ := ![
    !![0, 0, 0; 0, 0, -Complex.I; 0, Complex.I, 0],
    !![0, 0, Complex.I; 0, 0, 0; -Complex.I, 0, 0],
    !![0, -Complex.I, 0; Complex.I, 0, 0; 0, 0, 0]]
  let M : Fin 3 → Matrix (Fin 3) (Fin 3) ℂ := fun j => (1/2 : ℝ) • (1 + t • J j)
  let P : Matrix (Fin 3) (Fin 3) ℂ := !![1/2, Complex.I/2, 0; -Complex.I/2, 1/2, 0; 0, 0, 1]
  (¬ ∃ G : (Fin 3 → Bool) → Matrix (Fin 3) (Fin 3) ℂ,
    (∀ s, (G s).PosSemidef) ∧ (∑ s, G s = 1) ∧
      ∀ j : Fin 3, (∑ s, if s j then G s else 0) = M j) →
  ¬ ∃ G : (Fin 3 → Bool) → Matrix (Fin 3) (Fin 3) ℂ,
    (∀ s, (G s).PosSemidef) ∧ (∑ s, G s = P) ∧
      ∀ j : Fin 3, (∑ s, if s j then G s else 0) = P * M j * P
sporadic_krawtchouk_range_criterion_m_ge_fiveIn LeanQuantum Computation

For integers m ≥ 5 and k < ℓ with m ≤ n, k + ℓ = m + n - 2, and krawtchouk (k + ℓ) (m - 1) k = 0, range criterion subspaces exist.

theorem sporadic_krawtchouk_range_criterion_m_ge_five
    (m n k ℓ : ℕ)
    (hm : 5 ≤ m) (hn : 0 < n) (hk : 0 < k) (hℓ : 0 < ℓ)
    (hmn : m ≤ n) (hkℓ : k < ℓ)
    (hsum : k + ℓ = m + n - 2)
    (hpoly : krawtchouk (k + ℓ) (m - 1) k = 0) :
    has_range_criterion_subspaces m n k ℓ
stabilizer_campbell_howard_annihilationIn LeanQuantum Computation

If S satisfies S1, S2, S3 and has distinct columns then the column indicator of S has vanishing Boolean inner product with every monomial indexed by a nonempty set of size at most 3.

theorem stabilizer_campbell_howard_annihilation {s n : ℕ} (S : Matrix (Fin s) (Fin n) (ZMod 2))
    (h_inj : Function.Injective Sᵀ) (hch : stabilizer_campbell_howard_conditions S) :
    ∀ U : Finset (Fin s), 0 < U.card → U.card ≤ 3 →
      boolean_pairing (column_indicator S) (monomial U) = 0
stabilizer_campbell_howard_iff_reed_mullerIn LeanQuantum Computation

For natural numbers s ≥ 4 and n, an s by n binary matrix S with distinct nonzero columns satisfies the stabilizer-only Campbell-Howard conditions S1, S2, S3 if and only if its column indicator is equal to c or c + delta_zero s for some c in the Reed-Muller code RM(s - 4, s).

open scoped Classical
open Matrix in
theorem stabilizer_campbell_howard_iff_reed_muller (s n : ℕ) (hs : 4 ≤ s)
    (S : Matrix (Fin s) (Fin n) (ZMod 2))
    (h_inj : Function.Injective Sᵀ) (h_nz : ∀ j, Sᵀ j ≠ 0) :
    stabilizer_campbell_howard_conditions S ↔
      ∃ c ∈ reed_muller_code (s - 4) s,
        column_indicator S = c ∨ column_indicator S = c + delta_zero s
stabilizer_campbell_howard_of_reed_muller_shiftIn LeanQuantum Computation

If the column indicator of a matrix S with distinct columns is either a codeword c of RM(s-4,s) or c plus the origin indicator, then S satisfies S1, S2 and S3.

theorem stabilizer_campbell_howard_of_reed_muller_shift (s n : ℕ) (hs : 4 ≤ s)
    (S : Matrix (Fin s) (Fin n) (ZMod 2)) (h_inj : Function.Injective Sᵀ)
    (h : ∃ c ∈ reed_muller_code (s - 4) s,
        column_indicator S = c ∨ column_indicator S = c + delta_zero s) :
    stabilizer_campbell_howard_conditions S
star_core_2k_candidate_classificationIn LeanQuantum Computation

For k >= 3, any valid star-core allocation (b, a) at budget 2k satisfying leaf balance a i <= a j + 1 and center dominance b <= a i is either b = 2 with all a i = 2, or b = 1 with exactly one leaf of size 3 and all others of size 2.

theorem star_core_2k_candidate_classification
    (k : ℕ) (hk : 3 ≤ k) (b : ℕ) (a : Fin (k - 1) → ℕ)
    (h_alloc : is_star_core_allocation k (2 * k) b a)
    (h_bal : ∀ i j : Fin (k - 1), a i ≤ a j + 1)
    (h_center : ∀ i : Fin (k - 1), b ≤ a i) :
    (b = 2 ∧ ∀ i : Fin (k - 1), a i = 2) ∨
    (b = 1 ∧ ∃ i : Fin (k - 1), a i = 3 ∧ ∀ j, j ≠ i → a j = 2)
star_core_2k_minimizer_existsIn LeanQuantum Computation

For k >= 3 and n >= 2, there exists a valid allocation (b, a) for budget 2k achieving the minimum star-core exponent among all valid allocations.

theorem star_core_2k_minimizer_exists
    (k n : ℕ) (hk : 3 ≤ k) (hn : 2 ≤ n) :
    ∃ (b : ℕ) (a : Fin (k - 1) → ℕ),
      is_star_core_allocation k (2 * k) b a ∧
      ∀ (b' : ℕ) (a' : Fin (k - 1) → ℕ), is_star_core_allocation k (2 * k) b' a' →
        star_core_exponent k n b a ≤ star_core_exponent k n b' a'
star_core_center_leaf_exchangeIn LeanQuantum Computation

For k >= 3, Q >= k, n >= 2, and any valid star-core allocation (b, a) having a leaf i with a i < b, there exists an allocation (b', a') with is_star_core_allocation k Q b' a' and star_core_exponent k n b' a' < star_core_exponent k n b a.

theorem star_core_center_leaf_exchange
    (k Q n : ℕ) (hk : 3 ≤ k) (hn : 2 ≤ n)
    (b : ℕ) (a : Fin (k - 1) → ℕ) (h_alloc : is_star_core_allocation k Q b a)
    (i : Fin (k - 1)) (h_lt : a i < b) :
    ∃ (b' : ℕ) (a' : Fin (k - 1) → ℕ),
      is_star_core_allocation k Q b' a' ∧
      star_core_exponent k n b' a' < star_core_exponent k n b a
star_core_exponent_b1_one_threeIn LeanQuantum Computation

For k >= 3 and leaf configuration a with a i = 3 and a j = 2 for j != i, the star-core exponent with center 1 is (k - 2) * n^(2k - 2) + n^(2k - 3) + (n^3 - n + 1) * (n^2 - n + 1)^(k - 2).

theorem star_core_exponent_b1_one_three
    (k n : ℕ) (hk : 3 ≤ k) (i : Fin (k - 1))
    (a : Fin (k - 1) → ℕ) (ha_i : a i = 3) (ha_j : ∀ j, j ≠ i → a j = 2) :
    star_core_exponent k n 1 a =
      (k - 2) * n ^ (2 * k - 2) + n ^ (2 * k - 3) + (n ^ 3 - n + 1) * (n ^ 2 - n + 1) ^ (k - 2)
star_core_leaf_exchangeIn LeanQuantum Computation

For k >= 3, Q >= k, n >= 2, and any valid star-core allocation (b, a) having leaves i, j with a j + 2 <= a i, there exists a leaf configuration a' such that (b, a') is valid and star_core_exponent k n b a' < star_core_exponent k n b a.

theorem star_core_leaf_exchange
    (k Q n : ℕ) (hk : 3 ≤ k) (hn : 2 ≤ n)
    (b : ℕ) (a : Fin (k - 1) → ℕ) (h_alloc : is_star_core_allocation k Q b a)
    (i j : Fin (k - 1)) (h_diff : a j + 2 ≤ a i) :
    ∃ a' : Fin (k - 1) → ℕ,
      is_star_core_allocation k Q b a' ∧
      star_core_exponent k n b a' < star_core_exponent k n b a
star_core_regime_2k_compareIn LeanQuantum Computation

For k >= 3 and n >= 2, the cost comparison between Candidate A and Candidate B is determined strictly by the comparison between n^(2k - 5) and (n^2 - n + 1)^(k - 2).

theorem star_core_regime_2k_compare
    (k n : ℕ) (hk : 3 ≤ k) (hn : 2 ≤ n) :
    let A := (k - 1) * n ^ (2 * k - 2) + (n ^ 2 - n + 1) ^ (k - 1)
    let B := (k - 2) * n ^ (2 * k - 2) + n ^ (2 * k - 3) + (n ^ 3 - n + 1) * (n ^ 2 - n + 1) ^ (k - 2)
    (A < B ↔ n ^ (2 * k - 5) < (n ^ 2 - n + 1) ^ (k - 2)) ∧
    (B < A ↔ (n ^ 2 - n + 1) ^ (k - 2) < n ^ (2 * k - 5)) ∧
    (A = B ↔ n ^ (2 * k - 5) = (n ^ 2 - n + 1) ^ (k - 2))
three_qubit_ghz_uniformity_has_positive_local_minimumIn LeanQuantum Computation

For the explicitly displayed three-qubit GHZ-coordinate state, the squared deviation of the eight GHZ probabilities from uniformity has a positive local minimum in the nine-angle local-rotation chart.

theorem three_qubit_ghz_uniformity_has_positive_local_minimum :
    ∃ t : Fin 9 → ℝ, IsLocalMin GhzMinObjective.objective t ∧
      1/100000 < GhzMinObjective.objective t
three_qubit_w_harmonic_probability_identityIn LeanQuantum Computation

For the W state, in right-handed local frames whose three pair correlations vanish, the squared magnitude of the all-raising triple harmonic equals one minus the square of the mean of the three z-components of the axes.

theorem three_qubit_w_harmonic_probability_identity :
let dot := fun (a b : Fin 3 → ℝ) => ∑ i, a i*b i
    let cross := fun (a b : Fin 3 → ℝ) =>
      ![a 1*b 2-a 2*b 1, a 2*b 0-a 0*b 2, a 0*b 1-a 1*b 0]
    let frame := fun (x y a : Fin 3 → ℝ) =>
      dot x x = 1 ∧ dot y y = 1 ∧ dot a a = 1 ∧
      dot x y = 0 ∧ dot x a = 0 ∧ dot y a = 0 ∧ cross x y = a
    let pair := fun (a b : Fin 3 → ℝ) => 2*(a 0*b 0+a 1*b 1)-a 2*b 2
    let z := fun (x y : Fin 3 → ℝ) (i : Fin 3) => (x i : ℂ) + Complex.I * (y i : ℂ)
    let cdot := fun (u v : Fin 3 → ℂ) => ∑ i, u i*v i
    let tri := fun (u v w : Fin 3 → ℂ) =>
      (2/3:ℂ)*(cdot u v*w 2+cdot u w*v 2+cdot v w*u 2)-3*u 2*v 2*w 2
    ∀ x y a X Y b u v c : Fin 3 → ℝ,
      frame x y a → frame X Y b → frame u v c →
      pair a b = 0 → pair a c = 0 → pair b c = 0 →
      Complex.normSq (tri (z x y) (z X Y) (z u v)) =
        1-((a 2+b 2+c 2)/3)^2
three_qubit_w_nonzero_ghz_harmonicIn LeanQuantum Computation

For the W state, any right-handed local frames whose three pair correlations vanish have a nonzero all-raising transverse triple harmonic. This excludes a proposed strengthening of the GHZ-frame construction, not local encodability.

theorem three_qubit_w_nonzero_ghz_harmonic :
let dot := fun (a b : Fin 3 → ℝ) => ∑ i, a i*b i
    let cross := fun (a b : Fin 3 → ℝ) =>
      ![a 1*b 2-a 2*b 1, a 2*b 0-a 0*b 2, a 0*b 1-a 1*b 0]
    let frame := fun (x y a : Fin 3 → ℝ) =>
      dot x x = 1 ∧ dot y y = 1 ∧ dot a a = 1 ∧
      dot x y = 0 ∧ dot x a = 0 ∧ dot y a = 0 ∧ cross x y = a
    let pair := fun (a b : Fin 3 → ℝ) => 2*(a 0*b 0+a 1*b 1)-a 2*b 2
    let z := fun (x y : Fin 3 → ℝ) (i : Fin 3) => (x i : ℂ) + Complex.I * (y i : ℂ)
    let cdot := fun (u v : Fin 3 → ℂ) => ∑ i, u i*v i
    let tri := fun (u v w : Fin 3 → ℂ) =>
      (2/3:ℂ)*(cdot u v*w 2+cdot u w*v 2+cdot v w*u 2)-3*u 2*v 2*w 2
    ∀ x y a X Y b u v c : Fin 3 → ℝ,
      frame x y a → frame X Y b → frame u v c →
      pair a b = 0 → pair a c = 0 → pair b c = 0 →
      Complex.normSq (tri (z x y) (z X Y) (z u v)) > 0
toEuclideanLin_kronecker_unitary_invIn LeanQuantum Computation

Applying (u* ⊗ 1) after (u ⊗ 1) recovers the original bipartite state.

theorem toEuclideanLin_kronecker_unitary_inv
    {m n : Type*} [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n]
    (uA : Matrix.unitaryGroup m ℂ) (ψ : EuclideanSpace ℂ (m × n)) :
    Matrix.toEuclideanLin (Matrix.kronecker (star uA.1) (1 : Matrix n n ℂ))
      (Matrix.toEuclideanLin (Matrix.kronecker uA.1 (1 : Matrix n n ℂ)) ψ) = ψ
unit_vecMulVec_sub_one_posSemidefIn LeanQuantum Computation

For a unit vector v, the complement 1 - v v* of the rank-one projection v v* is positive semidefinite.

open scoped ComplexOrder in
theorem unit_vecMulVec_sub_one_posSemidef {n : Type*} [Fintype n] [DecidableEq n] (v : n → ℂ) (hv : star v ⬝ᵥ v = 1) : (1 - Matrix.vecMulVec v (star v) : Matrix n n ℂ).PosSemidef
unitary_toEuclideanLin_innerIn LeanQuantum Computation

For a unitary matrix A indexed by a finite type n over ℂ and vectors x, y in EuclideanSpace ℂ n, the inner product of Ax and Ay equals the inner product of x and y.

theorem unitary_toEuclideanLin_inner {n : Type*} [Fintype n] [DecidableEq n]
    (A : Matrix.unitaryGroup n ℂ) (x y : EuclideanSpace ℂ n) :
    inner ℂ (Matrix.toEuclideanLin (A : Matrix n n ℂ) x) (Matrix.toEuclideanLin (A : Matrix n n ℂ) y)
      = inner ℂ x y
binary_rank_bound_partial_binary_matrix_completionIn LeanStreaming & Sublinear Algorithms

Every partial binary matrix P with entries in Option (Fin 2) having q ≥ 1 specified entries has a completion into a total binary matrix H with entries in Fin 2 of binary rank at most 3*q^(2/3) + 1.

theorem binary_rank_bound_partial_binary_matrix_completion {n m : ℕ}
    (P : Matrix (Fin n) (Fin m) (Option (Fin 2)))
    (q : ℕ)
    (hq : ((Finset.univ : Finset (Fin n × Fin m)).filter (fun p => (P p.1 p.2).isSome)).card = q)
    (hq1 : 1 ≤ q) :
    ∃ H : Matrix (Fin n) (Fin m) (Fin 2),
      (∀ i j v, P i j = some v → H i j = v) ∧
      (binary_rank H : ℝ) ≤ 3 * (q : ℝ) ^ ((2 : ℝ) / 3) + 1
binary_rank_completion_arithmetic_boundIn LeanStreaming & Sublinear Algorithms

For any integer q ≥ 1, setting u = ⌈q^(1/3)⌉ yields q/u + 1 + √(u*q) ≤ 3*q^(2/3) + 1.

theorem binary_rank_completion_arithmetic_bound (q : ℕ) (hq : 1 ≤ q) :
    let u : ℝ := Nat.ceil ((q : ℝ) ^ ((1 : ℝ) / 3))
    (q : ℝ) / u + 1 + Real.sqrt (u * (q : ℝ)) ≤ 3 * (q : ℝ) ^ ((2 : ℝ) / 3) + 1
binary_rank_le_of_factorizationIn LeanStreaming & Sublinear Algorithms

If a binary matrix H with entries in Fin 2 factors as H.map (·.val) = A.map (·.val) * B.map (·.val) for binary matrices A and B of inner dimension k, then the binary rank of H is at most k.

theorem binary_rank_le_of_factorization {n m k : ℕ} {H : Matrix (Fin n) (Fin m) (Fin 2)}
    (A : Matrix (Fin n) (Fin k) (Fin 2)) (B : Matrix (Fin k) (Fin m) (Fin 2))
    (h : H.map (·.val) = A.map (·.val) * B.map (·.val)) :
    binary_rank H ≤ k
partial_binary_matrix_completion_of_column_removalIn LeanStreaming & Sublinear Algorithms

Let P be an n × m partial binary matrix with entries in Option (Fin 2) and let C : Finset (Fin m) be a finite set of columns. Then P has a completion H : Matrix (Fin n) (Fin m) (Fin 2) agreeing with P on specified entries such that (binary_rank H : ℝ) ≤ (C.card : ℝ) + 1 + Real.sqrt (2 * ((row_conflict_edges P C).card : ℝ)).

theorem partial_binary_matrix_completion_of_column_removal {n m : ℕ}
    (P : Matrix (Fin n) (Fin m) (Option (Fin 2)))
    (C : Finset (Fin m)) :
    ∃ H : Matrix (Fin n) (Fin m) (Fin 2),
      (∀ i j v, P i j = some v → H i j = v) ∧
      (binary_rank H : ℝ) ≤ (C.card : ℝ) + 1 + Real.sqrt (2 * ((row_conflict_edges P C).card : ℝ))