Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions Mathlib/Algebra/Order/Module/PositiveLinearMap.lean
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,16 @@ def toPositiveLinearMap (f : F) : E₁ →ₚ[R] E₂ :=
instance instCoeToLinearMap : CoeHead F (E₁ →ₚ[R] E₂) where
coe f := toPositiveLinearMap f

/-- A linear map that maps nonnegative elements to nonnegative elements is an order
homomorphism. -/
lemma _root_.OrderHomClass.ofLinear {F' E₁' E₂' : Type*} [FunLike F' E₁' E₂'] [AddCommGroup E₁']
[PartialOrder E₁'] [AddCommGroup E₂'] [PartialOrder E₂'] [Module R E₁'] [Module R E₂']
[LinearMapClass F' R E₁' E₂'] [IsOrderedAddMonoid E₁'] [IsOrderedAddMonoid E₂']
/-- An additive group homomorphism that maps nonnegative elements to nonnegative elements
is an order homomorphism. -/
lemma _root_.OrderHomClass.ofAddMonoidHom {F' E₁' E₂' : Type*} [FunLike F' E₁' E₂'] [AddGroup E₁']
[LE E₁'] [AddRightMono E₁'] [AddGroup E₂'] [LE E₂'] [AddRightMono E₂']
[AddMonoidHomClass F' E₁' E₂']
(h : ∀ f : F', ∀ x, 0 ≤ x → 0 ≤ f x) : OrderHomClass F' E₁' E₂' where
map_rel := by
intro f a b hab
rw [← sub_nonneg] at hab ⊢
have : 0 ≤ f (b - a) := h f (b - a) hab
simpa using this
map_rel f a b hab := by simpa using h f (b - a) (sub_nonneg.mpr hab)

@[deprecated (since := "2025-09-13")] alias _root_.OrderHomClass.ofLinear :=
OrderHomClass.ofAddMonoidHom

end PositiveLinearMapClass

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Analysis/CStarAlgebra/CompletelyPositiveMap.lean
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ open CStarMatrix in
/-- Linear maps which are completely positive are order homomorphisms (i.e., positive maps). -/
lemma _root_.OrderHomClass.of_map_cstarMatrix_nonneg
(h : ∀ (φ : F) (k : ℕ) (M : CStarMatrix (Fin k) (Fin k) A₁), 0 ≤ M → 0 ≤ M.map φ) :
OrderHomClass F A₁ A₂ := .ofLinear <| by
OrderHomClass F A₁ A₂ := .ofAddMonoidHom <| by
intro φ a ha
let Ma := toOneByOne (Fin 1) ℂ A₁ a
have h₁ : 0 ≤ Ma := map_nonneg (toOneByOne (Fin 1) ℂ A₁) ha
Expand Down