While this submission is a draft, it cannot be used by other submissions.

Minimum- and maximum-weight multipartite cliques

Lax350013.CliqueOptimization · concepts/Lax350013/CliqueOptimization.lean · lax-350013

definition

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Definition

    For fixed kk, output the vertices of a minimum- or maximum-weight clique with one vertex from each of kk parts of size nn. The encoding contains all k2k^2 blocks; the objective sums only the edges with part indices i<ji<j.

    Concept map
    5 concepts; 1 descendant hidden
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A

    Lean source view on GitHub

    1/-
    2Copyright (c) 2026 Anthropic, PBC. All rights reserved.
    3Released under Apache 2.0 license as described in the file LICENSE.
    4SPDX-License-Identifier: Apache-2.0
    5-/
    6/-
    7Modified for the independent Lax packaging by Édouard Bonnet, 2026.
    8Derived from 3sum-apsp/EndStatement.lean / PaperStatements.lean at upstream commit e1a4e6508154ea59f030480661590a9fe3018011.
    9Changes: Lax module/namespace layout, separated concepts and proofs, archive
    10annotations, and compatibility with the archive Lean/mathlib environment.
    11See NOTICE and README.md in the submission root for provenance and scope.
    12-/
    13
    14import Mathlib.Algebra.MvPolynomial.Basic
    15import Mathlib.Analysis.SpecialFunctions.Log.Base
    16import Mathlib.Analysis.SpecialFunctions.Log.Basic
    17import Mathlib.Analysis.SpecialFunctions.Pow.Real
    18import Mathlib.Combinatorics.SimpleGraph.Basic
    19import Mathlib.Data.Finset.Sort
    20import Mathlib.LinearAlgebra.Matrix.Notation
    21import Mathlib.MeasureTheory.Integral.Bochner.Basic
    22import Mathlib.NumberTheory.PrimeCounting
    23import Mathlib.Probability.Independence.Basic
    24import Mathlib.Tactic.DeriveFintype
    25import Lax350013.ZeroWeightClique
    26
    27/-!
    28---
    29title: Minimum- and maximum-weight multipartite cliques
    30type: definition
    31---
    32For fixed kk, output the vertices of a minimum- or maximum-weight clique with one vertex from each of kk parts of size nn. The encoding contains all k2k^2 blocks; the objective sums only the edges with part indices i<ji<j.
    33-/
    34
    35namespace Lax350013.CliqueOptimization
    36
    37open Finset
    38
    39/-- The total edge weight of the `k`-clique that has the vertex `v p` in part `p` (Corollary 39):
    40the sum, over the pairs of parts `p < q`, of the weight between `v p` and `v q`. -/
    41def cliqueWeight {k n : ℕ} (w : Fin k → Fin k → Fin n → Fin n → ℤ) (v : Fin k → Fin n) : ℤ :=
    42 ∑ p : Fin k, ∑ q ∈ Finset.univ.filter (fun q : Fin k => p < q), w p q (v p) (v q)
    43
    44/-- **Min-Weight `k`-Clique** (Corollary 39): accept, and leave in the `p`-th of the `k`
    45output cells (`p = 0, …, k − 1`) the number, below `n`, of the vertex chosen in part `p`, so that
    46the `k` vertices form a `k`-clique of minimum total edge weight. Every such clique is accepted.
    47
    48NOTE. The parts have at least one vertex: at `n = 0` there is no clique to output. -/
    49def MinKClique (k : ℕ) : Lax350013.PolynomialTime.Problem where
    50 Instance n := {_w : Fin k → Fin k → Fin n → Fin n → ℤ // 1 ≤ n}
    51 input w := (Lax350013.ZeroWeightClique.ZeroWeightKClique k).input w.1
    52 output {n} w out := ∃ v : Fin k → Fin n, (∀ p : Fin k, out p.val = ((v p).val : ℤ)) ∧
    53 ∀ v', cliqueWeight w.1 v ≤ cliqueWeight w.1 v'
    54
    55/-- **Max-Weight `k`-Clique** (Corollary 39): the same with maximum total edge weight. -/
    56def MaxKClique (k : ℕ) : Lax350013.PolynomialTime.Problem where
    57 Instance n := {_w : Fin k → Fin k → Fin n → Fin n → ℤ // 1 ≤ n}
    58 input w := (Lax350013.ZeroWeightClique.ZeroWeightKClique k).input w.1
    59 output {n} w out := ∃ v : Fin k → Fin n, (∀ p : Fin k, out p.val = ((v p).val : ℤ)) ∧
    60 ∀ v', cliqueWeight w.1 v' ≤ cliqueWeight w.1 v
    61
    62end Lax350013.CliqueOptimization
    63

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…