Math Optimization & Game Theory
Mathematical optimization and strategic interaction theory, applied to reinforcement learning, governance convergence, and multi-agent coordination.
Routing
- USE FOR: Mathematical optimization, game theory, decision theory, mechanism design, multi-objective optimization, convex optimization, and reinforcement learning theory. Use for reasoning about Bellman equations, Nash equilibria, Pareto optimality, gradient methods, linear/convex/integer programming, and optimization-related mathematics. Covers both pure theory and computational methodology.
- DO NOT USE FOR: Lean optimization proofs (use @lean-math-optimization); strategy methodology (use @applied-strategy-analysis); general nonlinear dynamics (use @math-nonlinear-dynamics).
- TRIGGERS: optimization, game theory, decision theory, mechanism design, convex optimization, reinforcement learning.
Workflow
- Classify the problem: convex / nonconvex / combinatorial / game-theoretic / mechanism-design / multi-objective / RL.
- Pick the matching section of the body; identify Mathlib
Convex / Optimization namespaces where applicable.
- Produce the answer (algorithm, equilibrium, mechanism) with assumptions + complexity.
- Hand off: to
@lean-math-optimization for the Lean proof, to @math-nonlinear-dynamics if dynamics dominate, to @lean-zettelkasten.
Recovery & STOP
- STOP if the question is strategy-analysis (not optimisation) — delegate to
@applied-strategy-analysis.
- STOP if a Mathlib pin-verified lemma is required — escalate to
@lean-research.
- STOP if the problem requires empirical RL experiments — escalate to
@research-council.
Handoffs
- Predecessors:
agent:gateway, skill:lean-research.
- Successors:
skill:lean-math-optimization, skill:lean-research, skill:lean-zettelkasten.
Part 1 — Optimization Theory Foundations
1.1 Convex Optimization
| Concept |
Definition |
Common relevance |
| Convex set |
$S$ where $\forall x,y \in S, \lambda x + (1-\lambda)y \in S$ for $\lambda \in [0,1]$ |
Quality gates, stochastic simplexes |
| Convex function |
$f(\lambda x + (1-\lambda)y) \le \lambda f(x) + (1-\lambda)f(y)$ |
Lyapunov candidates |
| Strong convexity |
$f(y) \ge f(x) + \nabla f(x)^T(y-x) + \frac{\mu}{2}|y-x|^2$ |
Convergence rate bounds |
| KKT conditions |
Stationarity + primal/dual feasibility + complementarity |
Constrained governance |
| Duality |
$\min_x \max_\lambda L(x,\lambda)$ |
Trust-safety trade-offs |
1.2 Linear & Integer Programming
- Simplex method: Pivoting through basic feasible solutions
- Interior point: Barrier methods for LP
- Branch & bound: Integer programming via LP relaxation
- Network flows: Min-cost flow, max-flow/min-cut
- Common application: pipeline composition as flow optimization
1.3 Nonlinear Optimization
| Method |
Convergence |
Best For |
| Gradient descent |
$O(1/k)$ |
General smooth |
| Accelerated GD (Nesterov) |
$O(1/k^2)$ |
Smooth convex |
| Newton's method |
Quadratic |
Strongly convex, Hessian available |
| BFGS/L-BFGS |
Super-linear |
Large-scale smooth |
| Proximal gradient |
$O(1/k)$ |
Composite (smooth + nonsmooth) |
| Mirror descent |
$O(1/\sqrt{k})$ |
Simplex constraints |
Part 2 — Game Theory
2.1 Solution Concepts
| Concept |
Definition |
Multi-Agent Relevance |
| Nash equilibrium |
No player can improve by unilateral deviation |
Trust equilibrium in multi-agent |
| Pareto optimality |
No player can improve without harming another |
Governance trade-offs |
| Correlated equilibrium |
Players follow a joint signal device |
Coordinated policy |
| Stackelberg equilibrium |
Leader commits, followers optimize |
Hierarchical governance |
| Evolutionary stable strategy |
Resists invasion by mutant strategies |
Long-term trust stability |
2.2 Game Classes
- Zero-sum: $\sum_i u_i = 0$ — adversarial safety scenarios
- Potential games: $\exists \Phi$ s.t. $\Delta u_i = \Delta \Phi$ — alignment incentives
- Stochastic games: State evolves with actions — MDP foundation
- Mechanism design: Design rules to achieve desired outcomes — governance design
- Cooperative games: Coalition formation, Shapley value — trust allocation
2.3 Nash Existence & Computation
Existence (Nash 1950): Every finite game has at least one mixed-strategy NE.
Computation complexity: Finding NE is PPAD-complete (Daskalakis et al. 2009).
Algorithms:
- Support enumeration (small games)
- Lemke-Howson (bimatrix)
- Homotopy methods
- Learning dynamics (fictitious play, multiplicative weights)
Common formalization: trust dynamics as learning dynamics converging to NE-like fixed points.
Part 3 — Decision Theory
3.1 Expected Utility Theory
- Von Neumann-Morgenstern axioms → utility function
- Risk aversion: concave utility ($u'' < 0$)
- Quality gate thresholds as risk-adjusted decisions
3.2 Multi-Criteria Decision Making
| Method |
Type |
Common use |
| Weighted sum |
Scalarization |
CCV → single quality score |
| Pareto front |
Geometric |
Trade-off visualization |
| TOPSIS |
Distance-based |
Phase classification boundaries |
| AHP |
Hierarchical |
Nested learning level priorities |
| ELECTRE/PROMETHEE |
Outranking |
Governance action ranking |
3.3 Decision Under Uncertainty
- Maximin: Worst-case optimization — safety-critical governance
- Minimax regret: Minimize maximum regret — robust decisions
- Bayesian: Maximize expected utility with priors — adaptive trust
- Info-gap: Robustness to severe uncertainty — unknown-unknown resilience
Part 4 — Reinforcement Learning Theory
4.1 MDP Foundations
| Component |
Formal |
Project Module |
| State space $\mathcal{S}$ |
Finite or compact |
Regime classification |
| Action space $\mathcal{A}$ |
Finite or compact |
Governance actions |
| Transition $P(s' |
s,a)$ |
Stochastic kernel |
| Reward $R(s,a)$ |
Bounded real |
Quality improvement |
| Discount $\gamma$ |
$\in [0,1)$ |
Convergence rate |
4.2 Key Theorems
- Bellman optimality: $V^(s) = \max_a [R(s,a) + \gamma \sum_{s'} P(s'|s,a) V^(s')]$
- Contraction mapping: $|TV - TV'|\infty \le \gamma |V - V'|\infty$
- Policy improvement: $\pi_{k+1}$ greedy w.r.t. $V^{\pi_k}$ ⟹ $V^{\pi_{k+1}} \ge V^{\pi_k}$
- Regret bounds: Policy gradient regret $\tilde{O}(\sqrt{T})$
4.3 Safe RL
- Constrained MDP: $\max_\pi V^\pi$ s.t. $C^\pi \le d$
- Lyapunov-based: Safety via Lyapunov barrier functions
- Shielding: Pre/post-safety filters on actions
- Common use: trust dynamics as safe RL with Lyapunov certification
Part 5 — Multi-Objective Optimization
5.1 Pareto Theory
- Pareto dominance: $x \prec y$ iff $f_i(x) \le f_i(y)$ for all $i$, strict for some
- Pareto front: Set of non-dominated solutions
- Scalarization: $\min_x \sum_i w_i f_i(x)$ recovers Pareto points (for convex)
- $\epsilon$-constraint: $\min f_1$ s.t. $f_j \le \epsilon_j$ for $j \ge 2$
5.2 Multi-Objective Formulation
Governance and safety problems are often inherently multi-objective:
- Maximize quality (CCV scores)
- Minimize risk (safety envelope violations)
- Maximize learning rate (nested learning convergence)
- Minimize computational cost (pipeline efficiency)
Part 6 — Host-Repository Lean Extension Points
Do not assume repository-local Lean modules, tactics, or namespaces exist unless the host repository explicitly provides them. Map local modules by role:
| Local extension point |
Mathematical foundation |
Typical concepts |
| RL/value-function module |
MDP, Bellman, contraction |
value functions, Bellman contraction, greedy values |
| Safety/trust module |
constrained optimization, game theory |
multi-agent trust, safety envelopes |
| Lyapunov/stability module |
Lyapunov optimization, safe RL |
Lyapunov functions, multi-scale energy |
| Tactic-helper module |
general contraction theory |
aligned rewards, hierarchy bounds |
| Stochastic-dynamics module |
stochastic optimization, simplex |
transition steps, balanced starts |
Part 7 — Research Methodology for Optimization
7.1 When to Apply This Skill
- Designing governance objective functions
- Analyzing convergence rates of iterative schemes
- Proving optimality of policy choices
- Designing multi-agent coordination mechanisms
- Analyzing trade-offs in safety vs performance
7.2 Key References
- Boyd & Vandenberghe (2004) — Convex optimization Bible
- Osborne & Rubinstein (1994) — Game theory foundations
- Puterman (2014) — MDP theory and algorithms
- Szepesvári (2010) — RL theory algorithms
- Miettinen (1999) — Nonlinear multi-objective optimization
7.3 Epistemic Mapping Targets
| KK |
KU |
UK/UU to discover |
| Bellman contraction |
Tighter regret bounds |
Novel game formulations for trust |
| Convex quality structure |
Multi-objective Pareto analysis |
Mechanism design for governance |
| Simplex projection |
Mirror descent on constrained probability states |
Stackelberg formulation of hierarchy |
1---2name: math-optimization-game3description: USE FOR: Mathematical optimization, game theory, decision theory, mechanism design, multi-objective optimization, convex optimization, and reinforcement learning theory. Use for reasoning about Bellman equations, Nash equilibria, Pareto optimality, gradient methods, linear/convex/integer programming, and optimization-related mathematics. Covers both pure theory and computational methodology. DO NOT USE FOR: Lean optimization proofs (use @lean-math-optimization); strategy methodology (use @applied-strategy-analysis); general nonlinear dynamics (use @math-nonlinear-dynamics). TRIGGERS: optimization, game theory, decision theory, mechanism design, convex optimization, reinforcement learning.4---567# Math Optimization & Game Theory89Mathematical optimization and strategic interaction theory, applied to reinforcement learning, governance convergence, and multi-agent coordination.1011---1213## Routing1415- **USE FOR:** Mathematical optimization, game theory, decision theory, mechanism design, multi-objective optimization, convex optimization, and reinforcement learning theory. Use for reasoning about Bellman equations, Nash equilibria, Pareto optimality, gradient methods, linear/convex/integer programming, and optimization-related mathematics. Covers both pure theory and computational methodology.16- **DO NOT USE FOR:** Lean optimization proofs (use @lean-math-optimization); strategy methodology (use @applied-strategy-analysis); general nonlinear dynamics (use @math-nonlinear-dynamics).17- **TRIGGERS:** optimization, game theory, decision theory, mechanism design, convex optimization, reinforcement learning.1819## Workflow20211. Classify the problem: convex / nonconvex / combinatorial / game-theoretic / mechanism-design / multi-objective / RL.222. Pick the matching section of the body; identify Mathlib `Convex` / `Optimization` namespaces where applicable.233. Produce the answer (algorithm, equilibrium, mechanism) with assumptions + complexity.244. Hand off: to `@lean-math-optimization` for the Lean proof, to `@math-nonlinear-dynamics` if dynamics dominate, to `@lean-zettelkasten`.2526## Recovery & STOP2728- STOP if the question is strategy-analysis (not optimisation) — delegate to `@applied-strategy-analysis`.29- STOP if a Mathlib pin-verified lemma is required — escalate to `@lean-research`.30- STOP if the problem requires empirical RL experiments — escalate to `@research-council`.3132## Handoffs3334- **Predecessors:** `agent:gateway`, `skill:lean-research`.35- **Successors:** `skill:lean-math-optimization`, `skill:lean-research`, `skill:lean-zettelkasten`.3637---3839## Part 1 — Optimization Theory Foundations4041### 1.1 Convex Optimization4243| Concept | Definition | Common relevance |44|---|---|---|45| Convex set | $S$ where $\forall x,y \in S, \lambda x + (1-\lambda)y \in S$ for $\lambda \in [0,1]$ | Quality gates, stochastic simplexes |46| Convex function | $f(\lambda x + (1-\lambda)y) \le \lambda f(x) + (1-\lambda)f(y)$ | Lyapunov candidates |47| Strong convexity | $f(y) \ge f(x) + \nabla f(x)^T(y-x) + \frac{\mu}{2}\|y-x\|^2$ | Convergence rate bounds |48| KKT conditions | Stationarity + primal/dual feasibility + complementarity | Constrained governance |49| Duality | $\min_x \max_\lambda L(x,\lambda)$ | Trust-safety trade-offs |5051### 1.2 Linear & Integer Programming5253- **Simplex method**: Pivoting through basic feasible solutions54- **Interior point**: Barrier methods for LP55- **Branch & bound**: Integer programming via LP relaxation56- **Network flows**: Min-cost flow, max-flow/min-cut57- **Common application**: pipeline composition as flow optimization5859### 1.3 Nonlinear Optimization6061| Method | Convergence | Best For |62|---|---|---|63| Gradient descent | $O(1/k)$ | General smooth |64| Accelerated GD (Nesterov) | $O(1/k^2)$ | Smooth convex |65| Newton's method | Quadratic | Strongly convex, Hessian available |66| BFGS/L-BFGS | Super-linear | Large-scale smooth |67| Proximal gradient | $O(1/k)$ | Composite (smooth + nonsmooth) |68| Mirror descent | $O(1/\sqrt{k})$ | Simplex constraints |6970---7172## Part 2 — Game Theory7374### 2.1 Solution Concepts7576| Concept | Definition | Multi-Agent Relevance |77|---|---|---|78| Nash equilibrium | No player can improve by unilateral deviation | Trust equilibrium in multi-agent |79| Pareto optimality | No player can improve without harming another | Governance trade-offs |80| Correlated equilibrium | Players follow a joint signal device | Coordinated policy |81| Stackelberg equilibrium | Leader commits, followers optimize | Hierarchical governance |82| Evolutionary stable strategy | Resists invasion by mutant strategies | Long-term trust stability |8384### 2.2 Game Classes8586- **Zero-sum**: $\sum_i u_i = 0$ — adversarial safety scenarios87- **Potential games**: $\exists \Phi$ s.t. $\Delta u_i = \Delta \Phi$ — alignment incentives 88- **Stochastic games**: State evolves with actions — MDP foundation89- **Mechanism design**: Design rules to achieve desired outcomes — governance design90- **Cooperative games**: Coalition formation, Shapley value — trust allocation9192### 2.3 Nash Existence & Computation9394**Existence (Nash 1950):** Every finite game has at least one mixed-strategy NE.9596**Computation complexity:** Finding NE is PPAD-complete (Daskalakis et al. 2009).9798**Algorithms:**99- Support enumeration (small games)100- Lemke-Howson (bimatrix)101- Homotopy methods102- Learning dynamics (fictitious play, multiplicative weights)103104**Common formalization:** trust dynamics as learning dynamics converging to NE-like fixed points.105106---107108## Part 3 — Decision Theory109110### 3.1 Expected Utility Theory111112- Von Neumann-Morgenstern axioms → utility function113- Risk aversion: concave utility ($u'' < 0$)114- Quality gate thresholds as risk-adjusted decisions115116### 3.2 Multi-Criteria Decision Making117118| Method | Type | Common use |119|---|---|---|120| Weighted sum | Scalarization | CCV → single quality score |121| Pareto front | Geometric | Trade-off visualization |122| TOPSIS | Distance-based | Phase classification boundaries |123| AHP | Hierarchical | Nested learning level priorities |124| ELECTRE/PROMETHEE | Outranking | Governance action ranking |125126### 3.3 Decision Under Uncertainty127128- **Maximin**: Worst-case optimization — safety-critical governance129- **Minimax regret**: Minimize maximum regret — robust decisions130- **Bayesian**: Maximize expected utility with priors — adaptive trust131- **Info-gap**: Robustness to severe uncertainty — unknown-unknown resilience132133---134135## Part 4 — Reinforcement Learning Theory136137### 4.1 MDP Foundations138139| Component | Formal | Project Module |140|---|---|---|141| State space $\mathcal{S}$ | Finite or compact | Regime classification |142| Action space $\mathcal{A}$ | Finite or compact | Governance actions |143| Transition $P(s'|s,a)$ | Stochastic kernel | Pipeline dynamics |144| Reward $R(s,a)$ | Bounded real | Quality improvement |145| Discount $\gamma$ | $\in [0,1)$ | Convergence rate |146147### 4.2 Key Theorems148149- **Bellman optimality**: $V^*(s) = \max_a [R(s,a) + \gamma \sum_{s'} P(s'|s,a) V^*(s')]$150- **Contraction mapping**: $\|TV - TV'\|_\infty \le \gamma \|V - V'\|_\infty$151- **Policy improvement**: $\pi_{k+1}$ greedy w.r.t. $V^{\pi_k}$ ⟹ $V^{\pi_{k+1}} \ge V^{\pi_k}$152- **Regret bounds**: Policy gradient regret $\tilde{O}(\sqrt{T})$153154### 4.3 Safe RL155156- **Constrained MDP**: $\max_\pi V^\pi$ s.t. $C^\pi \le d$157- **Lyapunov-based**: Safety via Lyapunov barrier functions158- **Shielding**: Pre/post-safety filters on actions159- **Common use**: trust dynamics as safe RL with Lyapunov certification160161---162163## Part 5 — Multi-Objective Optimization164165### 5.1 Pareto Theory166167- **Pareto dominance**: $x \prec y$ iff $f_i(x) \le f_i(y)$ for all $i$, strict for some168- **Pareto front**: Set of non-dominated solutions169- **Scalarization**: $\min_x \sum_i w_i f_i(x)$ recovers Pareto points (for convex)170- **$\epsilon$-constraint**: $\min f_1$ s.t. $f_j \le \epsilon_j$ for $j \ge 2$171172### 5.2 Multi-Objective Formulation173174Governance and safety problems are often inherently multi-objective:175- Maximize quality (CCV scores)176- Minimize risk (safety envelope violations)177- Maximize learning rate (nested learning convergence)178- Minimize computational cost (pipeline efficiency)179180---181182## Part 6 — Host-Repository Lean Extension Points183184Do not assume repository-local Lean modules, tactics, or namespaces exist unless the host repository explicitly provides them. Map local modules by role:185186| Local extension point | Mathematical foundation | Typical concepts |187|---|---|---|188| RL/value-function module | MDP, Bellman, contraction | value functions, Bellman contraction, greedy values |189| Safety/trust module | constrained optimization, game theory | multi-agent trust, safety envelopes |190| Lyapunov/stability module | Lyapunov optimization, safe RL | Lyapunov functions, multi-scale energy |191| Tactic-helper module | general contraction theory | aligned rewards, hierarchy bounds |192| Stochastic-dynamics module | stochastic optimization, simplex | transition steps, balanced starts |193194---195196## Part 7 — Research Methodology for Optimization197198### 7.1 When to Apply This Skill199200- Designing governance objective functions201- Analyzing convergence rates of iterative schemes202- Proving optimality of policy choices203- Designing multi-agent coordination mechanisms204- Analyzing trade-offs in safety vs performance205206### 7.2 Key References207208- Boyd & Vandenberghe (2004) — Convex optimization Bible209- Osborne & Rubinstein (1994) — Game theory foundations210- Puterman (2014) — MDP theory and algorithms 211- Szepesvári (2010) — RL theory algorithms212- Miettinen (1999) — Nonlinear multi-objective optimization213214### 7.3 Epistemic Mapping Targets215216| KK | KU | UK/UU to discover |217|---|---|---|218| Bellman contraction | Tighter regret bounds | Novel game formulations for trust |219| Convex quality structure | Multi-objective Pareto analysis | Mechanism design for governance |220| Simplex projection | Mirror descent on constrained probability states | Stackelberg formulation of hierarchy |