Skip to content

Commit 6b8fb6c

Browse files
committed
feat(Data/ENat/Lattice): fill in proof_wanted (#24201)
Fills in two `proof_wanted`s (`ENat.smul_iSup` and `ENat.smul_sSup`).
1 parent 5759c85 commit 6b8fb6c

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

Mathlib/Data/ENat/Lattice.lean

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ This instance is not in `Data.ENat.Basic` to avoid dependency on `Finset`s.
1515
We also restate some lemmas about `WithTop` for `ENat` to have versions that use `Nat.cast` instead
1616
of `WithTop.some`.
1717
18-
## TODO
19-
20-
Currently (2024-Nov-12), `shake` does not check `proof_wanted` and insist that
21-
`Mathlib.Algebra.Group.Action.Defs` should not be imported. Once `shake` is fixed, please remove the
22-
corresponding `noshake.json` entry.
23-
2418
-/
2519

2620
assert_not_exists Field
@@ -238,11 +232,13 @@ lemma iSup_add_iSup_of_monotone {ι : Type*} [Preorder ι] [IsDirected ι (·
238232
(hf : Monotone f) (hg : Monotone g) : iSup f + iSup g = ⨆ a, f a + g a :=
239233
iSup_add_iSup fun i j ↦ (exists_ge_ge i j).imp fun _k ⟨hi, hj⟩ ↦ by gcongr <;> apply_rules
240234

241-
proof_wanted smul_iSup {R} [SMul R ℕ∞] [IsScalarTower R ℕ∞ ℕ∞] (f : ι → ℕ∞) (c : R) :
242-
c • ⨆ i, f i = ⨆ i, c • f i
235+
lemma smul_iSup {R} [SMul R ℕ∞] [IsScalarTower R ℕ∞ ℕ∞] (f : ι → ℕ∞) (c : R) :
236+
c • ⨆ i, f i = ⨆ i, c • f i := by
237+
simpa using mul_iSup (c • 1) f
243238

244-
proof_wanted smul_sSup {R} [SMul R ℕ∞] [IsScalarTower R ℕ∞ ℕ∞] (s : Set ℕ∞) (c : R) :
245-
c • sSup s = ⨆ a ∈ s, c • a
239+
lemma smul_sSup {R} [SMul R ℕ∞] [IsScalarTower R ℕ∞ ℕ∞] (s : Set ℕ∞) (c : R) :
240+
c • sSup s = ⨆ a ∈ s, c • a := by
241+
simp_rw [sSup_eq_iSup, smul_iSup]
246242

247243
lemma sub_iSup [Nonempty ι] (ha : a ≠ ⊤) : a - ⨆ i, f i = ⨅ i, a - f i := by
248244
obtain ⟨i, hi⟩ | h := em (∃ i, a < f i)

scripts/noshake.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,6 @@
442442
"Mathlib.Data.FunLike.Basic": ["Mathlib.Logic.Function.Basic"],
443443
"Mathlib.Data.Finsupp.Notation": ["Mathlib.Data.Finsupp.Single"],
444444
"Mathlib.Data.Finset.Insert": ["Mathlib.Data.Finset.Attr"],
445-
"Mathlib.Data.ENat.Lattice": ["Mathlib.Algebra.Group.Action.Defs"],
446445
"Mathlib.Data.ByteArray": ["Batteries.Data.ByteSubarray"],
447446
"Mathlib.Data.Bool.Basic": ["Batteries.Tactic.Init"],
448447
"Mathlib.Control.Traversable.Instances": ["Mathlib.Control.Applicative"],

0 commit comments

Comments
 (0)