Skip to content

Commit

Permalink
feat: Real.toNNReal_abs (#11606)
Browse files Browse the repository at this point in the history
Partially forward-port leanprover-community/mathlib3#16976

Also fix an unused argument that somehow made it to master, likely from #10661.
  • Loading branch information
YaelDillies committed Mar 23, 2024
1 parent 557de17 commit a0e02a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 0 additions & 4 deletions Mathlib/Analysis/Distribution/SchwartzSpace.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1068,10 +1068,6 @@ def integralCLM : 𝓒(D, V) β†’L[π•œ] V :=
rcases hμ.exists_integrable with ⟨n, h⟩
let m := (n, 0)
use Finset.Iic m, 2 ^ n * ∫ x : D, (1 + β€–xβ€–) ^ (- (n : ℝ)) βˆ‚ΞΌ
have hpos : 0 ≀ ∫ x : D, (1 + β€–xβ€–) ^ (- (n : ℝ)) βˆ‚ΞΌ := by
apply integral_nonneg
intro
positivity
refine ⟨by positivity, fun f ↦ (norm_integral_le_integral_norm f).trans ?_⟩
have h' : βˆ€ x, β€–f xβ€– ≀ (1 + β€–xβ€–) ^ (-(n : ℝ)) *
(2 ^ n * ((Finset.Iic m).sup (fun m' => SchwartzMap.seminorm π•œ m'.1 m'.2) f)) := by
Expand Down
5 changes: 4 additions & 1 deletion Mathlib/Data/Real/NNReal.lean
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Mathlib.Data.Real.Pointwise
import Mathlib.Order.ConditionallyCompleteLattice.Group
import Mathlib.Tactic.GCongr.Core

#align_import data.real.nnreal from "leanprover-community/mathlib"@"de29c328903507bb7aff506af9135f4bdaf1849c"
#align_import data.real.nnreal from "leanprover-community/mathlib"@"b1abe23ae96fef89ad30d9f4362c307f72a55010"

/-!
# Nonnegative real numbers
Expand Down Expand Up @@ -1180,6 +1180,9 @@ theorem coe_toNNReal_le (x : ℝ) : (toNNReal x : ℝ) ≀ |x| :=
max_le (le_abs_self _) (abs_nonneg _)
#align real.coe_to_nnreal_le Real.coe_toNNReal_le

@[simp] lemma toNNReal_abs (x : ℝ) : |x|.toNNReal = nnabs x := NNReal.coe_injective <| by simp
#align real.to_nnreal_abs Real.toNNReal_abs

theorem cast_natAbs_eq_nnabs_cast (n : β„€) : (n.natAbs : ℝβ‰₯0) = nnabs n := by
ext
rw [NNReal.coe_nat_cast, Int.cast_natAbs, Real.coe_nnabs, Int.cast_abs]
Expand Down

0 comments on commit a0e02a9

Please sign in to comment.