AFTD Auto-Formalizing Theoretical Domains

ProbabilisticTheory.OrderedVectorSpace.nonneg_add_eq_zero

theoremverifiedformalizationimported Lean

A nonnegative vector that adds with another nonnegative vector to 0 is itself 0: the positive cone meets its negation only at 0.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open ProbabilisticTheory in
variable {E : Type*} [OrderedVectorSpace E] in
lemma ProbabilisticTheory.OrderedVectorSpace.nonneg_add_eq_zero {A B : E} (hA : 0 ≤ A) (hB : 0 ≤ B) (hAB : A + B = 0) : A = 0
Formalizes
Physlib, `ProbabilisticTheory.OrderedVectorSpace.nonneg_add_eq_zero`
Lean proof
By Tom Ole Diem, from github.com/leanprover-community/physlib at e411c6e89692 (Copyright (c) 2026 Tom Ole Diem. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.34.1.
Verified
10 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1

Lean source view module on GitHub

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open ProbabilisticTheory in
variable {E : Type*} [OrderedVectorSpace E] in
/-- A nonnegative vector that adds with another nonnegative vector to `0` is itself `0`: the positive cone meets its negation only at `0`. -/
lemma ProbabilisticTheory.OrderedVectorSpace.nonneg_add_eq_zero {A B : E} (hA : 0 ≤ A) (hB : 0 ≤ B) (hAB : A + B = 0) : A = 0 :=
  le_antisymm (hAB ▸ le_add_of_nonneg_right hB) hA
See it in the graphDiscuss this resultChallenge it