Skip to content

Commit 2b55904

Browse files
kim-emclaude
andcommitted
chore: add missing docstrings for deleted dual lemmas
Preserve docstrings from csInf_eq_of_forall_ge_of_forall_gt_exists_lt, csInf_lt_of_lt, csInf_eq_csInf_of_forall_exists_le, and ciInf_eq_of_forall_ge_of_forall_gt_exists_lt via @[to_dual /-- ... -/]. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0f55a40 commit 2b55904

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

Mathlib/Order/ConditionallyCompleteLattice/Basic.lean

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,10 @@ theorem notMem_of_lt_csInf {x : α} {s : Set α} (h : x < sInf s) (hs : BddBelow
244244
/-- Introduction rule to prove that `b` is the supremum of `s`: it suffices to check that `b`
245245
is larger than all elements of `s`, and that this is not the case of any `w<b`.
246246
See `sSup_eq_of_forall_le_of_forall_lt_exists_gt` for a version in complete lattices. -/
247-
@[to_dual csInf_eq_of_forall_ge_of_forall_gt_exists_lt]
247+
@[to_dual csInf_eq_of_forall_ge_of_forall_gt_exists_lt
248+
/-- Introduction rule to prove that `b` is the infimum of `s`: it suffices to check that `b`
249+
is smaller than all elements of `s`, and that this is not the case of any `w>b`.
250+
See `sInf_eq_of_forall_ge_of_forall_gt_exists_lt` for a version in complete lattices. -/]
248251
theorem csSup_eq_of_forall_le_of_forall_lt_exists_gt (hs : s.Nonempty) (H : ∀ a ∈ s, a ≤ b)
249252
(H' : ∀ w, w < b → ∃ a ∈ s, w < a) : sSup s = b :=
250253
(eq_of_le_of_not_lt (csSup_le hs H)) fun hb =>
@@ -256,7 +259,12 @@ This is essentially an iff, except that the assumptions for the two implications
256259
slightly different (one needs boundedness above for one direction, nonemptiness and linear
257260
order for the other one), so we formulate separately the two implications, contrary to
258261
the `CompleteLattice` case. -/
259-
@[to_dual csInf_lt_of_lt]
262+
@[to_dual csInf_lt_of_lt
263+
/-- `sInf s < b` when there is an element `a` in `s` with `a < b`, when `s` is bounded below.
264+
This is essentially an iff, except that the assumptions for the two implications are
265+
slightly different (one needs boundedness below for one direction, nonemptiness and linear
266+
order for the other one), so we formulate separately the two implications, contrary to
267+
the `CompleteLattice` case. -/]
260268
theorem lt_csSup_of_lt (hs : BddAbove s) (ha : a ∈ s) (h : b < a) : b < sSup s :=
261269
lt_of_lt_of_le h (le_csSup hs ha)
262270

@@ -425,7 +433,8 @@ lemma ciSup_eq_univ_of_not_bddAbove (hf : ¬BddAbove (range f)) : ⨆ i, f i = s
425433

426434
/-- When every element of a set `s` is bounded by an element of a set `t`, and conversely, then
427435
`s` and `t` have the same supremum. This holds even when the sets may be empty or unbounded. -/
428-
@[to_dual]
436+
@[to_dual /-- When every element of a set `s` is bounded by an element of a set `t`, and conversely, then
437+
`s` and `t` have the same infimum. This holds even when the sets may be empty or unbounded. -/]
429438
theorem csSup_eq_csSup_of_forall_exists_le {s t : Set α}
430439
(hs : ∀ x ∈ s, ∃ y ∈ t, x ≤ y) (ht : ∀ y ∈ t, ∃ x ∈ s, y ≤ x) :
431440
sSup s = sSup t := by

Mathlib/Order/ConditionallyCompleteLattice/Indexed.lean

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,10 @@ theorem cbiInf_eq_of_forall {p : ι → Prop} {f : Subtype p → α} (hp : ∀ i
229229
/-- Introduction rule to prove that `b` is the supremum of `f`: it suffices to check that `b`
230230
is larger than `f i` for all `i`, and that this is not the case of any `w<b`.
231231
See `iSup_eq_of_forall_le_of_forall_lt_exists_gt` for a version in complete lattices. -/
232-
@[to_dual ciInf_eq_of_forall_ge_of_forall_gt_exists_lt]
232+
@[to_dual ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
233+
/-- Introduction rule to prove that `b` is the infimum of `f`: it suffices to check that `b`
234+
is smaller than `f i` for all `i`, and that this is not the case of any `w>b`.
235+
See `iInf_eq_of_forall_ge_of_forall_gt_exists_lt` for a version in complete lattices. -/]
233236
theorem ciSup_eq_of_forall_le_of_forall_lt_exists_gt [Nonempty ι] {f : ι → α} (h₁ : ∀ i, f i ≤ b)
234237
(h₂ : ∀ w, w < b → ∃ i, w < f i) : ⨆ i : ι, f i = b :=
235238
csSup_eq_of_forall_le_of_forall_lt_exists_gt (range_nonempty f) (forall_mem_range.mpr h₁)

0 commit comments

Comments
 (0)