k_submod_join
Join of two assignments x and y in Fin n → Option (Fin k): at each coordinate e, if one is none it takes the other, if both agree it takes that value, and if they conflict it takes none.
Statement
def k_submod_join {n k : ℕ} (x y : Fin n → Option (Fin k)) : Fin n → Option (Fin k)- Defined in
- arXiv:2610.26677, line 98
- Verified
- 21 Oct 2026
- Axioms
- none listed
- Used by 3
- k_submodular_of_monotone_of_orthant_diminishing_returnsA monotone function on assignments Fin n → Option (Fin k) that satisfies orthant diminishing returns is k-submodular.
- is_k_submodularA function f : (Fin n → Option (Fin k)) → ℝ is k-submodular if for all x and y, f (x ⊓ y) + f (x ⊔ y) ≤ f x + f y.
- not_k_submod_hidden_fn_propertiesThe statement
k_submod_hidden_fn_propertiesis false: The definitionis_k_submod_kernellacks a differentiability/continuity…
Read back from the Lean
Definition of k_submod_join, which takes two implicit natural numbers $n$ and $k$, and two functions $x, y : \mathrm{Fin}(n) \to \mathrm{Option}(\mathrm{Fin}(k))$, and returns a function of type $\mathrm{Fin}(n) \to \mathrm{Option}(\mathrm{Fin}(k))$.
For any $e : \mathrm{Fin}(n)$, the result at $e$ is defined by case analysis on the pair $(x(e), y(e))$:
- If $x(e) = \mathrm{none}$, it returns $y(e)$.
- If $y(e) = \mathrm{none}$ (and $x(e) \neq \mathrm{none}$), it returns $x(e)$.
- If $x(e) = \mathrm{some}(i)$ and $y(e) = \mathrm{some}(j)$, it returns $\mathrm{some}(i)$ if $i = j$, and $\mathrm{none}$ if $i \neq j$.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- Coordinatewise join of two assignments Fin n → Option (Fin k). -/ def k_submod_join {n k : ℕ} (x y : Fin n → Option (Fin k)) : Fin n → Option (Fin k) := fun e => match x e, y e with | none, b => b | a, none => a | some i, some j => if i = j then some i else none