AFTD Auto-Formalizing Theoretical Domains

ProbabilisticTheory.OrderUnitSpace.exists_eq_sub_nonneg

theoremverifiedformalizationimported Lean

Every element is a difference of two positive elements.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open ProbabilisticTheory in
variable {E : Type*} [OrderUnitSpace E] in
lemma ProbabilisticTheory.OrderUnitSpace.exists_eq_sub_nonneg (A : E) : ∃ Ap An : E, 0 ≤ Ap ∧ 0 ≤ An ∧ A = Ap - An
Formalizes
Physlib, `ProbabilisticTheory.OrderUnitSpace.exists_eq_sub_nonneg`
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 2

Lean source view module on GitHub

set_option autoImplicit true inset_option relaxedAutoImplicit true inopen ProbabilisticTheory invariable {E : Type*} [OrderUnitSpace E] in/-- Every element is a difference of two positive elements. -/lemma ProbabilisticTheory.OrderUnitSpace.exists_eq_sub_nonneg (A : E) : ∃ Ap An : E, 0 ≤ Ap ∧ 0 ≤ An ∧ A = Ap - An := by  obtain ⟨n, hn⟩ := exists_nsmul_one_le (-A)  refine ⟨A + n • (1 : E), n • (1 : E), ?_, nsmul_nonneg one_nonneg n, ?_⟩  · exact neg_le_iff_add_nonneg'.mp hn  · exact (add_sub_cancel_right A (n • (1 : E))).symm
See it in the graphDiscuss this resultChallenge it