Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Aether Catalog definitions — Tropical_TropicalAlgebra_TropicalTrapdoorReversal

Definition
Tropical_TropicalAlgebra_TropicalTrapdoorReversal

by raver1975 · Sep 13, 2026 · Mathlib c5ea003 (Lean v4.30.0)

aether-catalogtropical

Definition bundle for the Aether Catalog module Tropical.TropicalAlgebra.TropicalTrapdoorReversal, transplanted by skeleton subtraction; supplies the types and constants the catalog's theorems import.

Definition code
-- Def bundle generated from Tropical/TropicalAlgebra/TropicalTrapdoorReversal.lean by skeleton subtraction
import Mathlib

/-! # CatalogBuild.Tropical.Cryptography.TropicalTrapdoorReversal

Auto-generated from theorem catalog database.
Domain: Tropical/Cryptography
Declarations: 29
-/

noncomputable section





/-- A tropical half-space constraint -/
inductive TropConstraint where
  | LeShift (i j : ℕ) (c : ℝ) : TropConstraint  -- x_i ≤ x_j + c
  | EqSum (i j : ℕ) (c : ℝ) : TropConstraint     -- x_i + x_j = c
  | EqConst (i : ℕ) (c : ℝ) : TropConstraint      -- x_i = c

/-- Satisfaction of a tropical constraint -/
def satisfiesConstraint (x : ℕ → ℝ) : TropConstraint → Prop
  | .LeShift i j c => x i ≤ x j + c
  | .EqSum i j c => x i + x j = c
  | .EqConst i c => x i = c

/-- A tropical polyhedron is defined by a list of constraints -/
abbrev TropPolyhedron := List TropConstraint

/-- The feasible set of a tropical polyhedron -/
def feasibleSet (poly : TropPolyhedron) : Set (ℕ → ℝ) :=
  {x | ∀ c ∈ poly, satisfiesConstraint x c}



/-- A linearized gate: after fixing selections, each gate is either
"take left", "take right", or "add" -/
inductive LinearizedGate where
  | TakeLeft : LinearizedGate
  | TakeRight : LinearizedGate
  | Add : LinearizedGate

/-- Evaluate a linearized gate -/
def evalLinearized (lg : LinearizedGate) (a b : ℝ) : ℝ :=
  match lg with
  | .TakeLeft => a
  | .TakeRight => b
  | .Add => a + b






/-- A min-gate selection is consistent if the selected value is indeed the minimum -/
def minSelectionConsistent (a b : ℝ) (selectLeft : Bool) : Prop :=
  if selectLeft then a ≤ b else b ≤ a

/-- A max-gate selection is consistent if the selected value is indeed the maximum -/
def maxSelectionConsistent (a b : ℝ) (selectLeft : Bool) : Prop :=
  if selectLeft then b ≤ a else a ≤ b











end

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me