Repository navigation
Conversation
This enables @[to_dual] to automatically translate between atom/coatom and lfp/gfp theorem names, preparing for expanded @[to_dual] coverage in subsequent commits. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Add @[to_dual] to IsLUB.insert, isLUB_pair, IsLeast.unique, IsLeast.isLeast_iff_eq, and IsLUB.unique, auto-generating their duals instead of maintaining hand-written copies. Co-Authored-By: Claude Opus 4.6 <[email protected]>
PR summary 3efa02168fImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
Add @[to_dual] to 15 more theorems in Order.Bounds.Basic, auto-generating their duals instead of maintaining hand-written copies. Covers univ, empty set, bounds, and lt_iff sections. Co-Authored-By: Claude Opus 4.6 <[email protected]>
This PR adds `@[to_dual]` name dictionary entries for atom/coatom and lfp/gfp, and uses `@[to_dual]` to auto-generate dual theorems in `Order.Bounds.Basic`, deleting the hand-written versions. Covers insert/pair/unique theorems (5), plus univ (6), empty set (6), lower/upper bounds (1), and lt_iff theorems (2) — 20 `@[to_dual]` annotations total, deleting 20 hand-written duals. 🤖 Prepared with Claude Code
Add @[to_dual] to 7 more theorems: bddBelow_iff_subset_Ici, IsGreatest.insert, upperBounds_insert, OrderTop.bddAbove, isGreatest_pair, upperBounds_prod, and IsLUB.prod. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
These don't enable any new @[to_dual] annotations in Bounds.Basic (the Heyting pairs have type class issues), but prepare the dictionary for use elsewhere. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
bors r- |
|
Build failed: |
| let ⟨c, hcs, hbc, hca⟩ := h.exists_between hb | ||
| ⟨c, hcs, hbc, hca.lt_of_ne fun hac => h' <| hac ▸ hcs⟩ | ||
|
|
||
| -- These are not `@[to_dual]` because the `And` conjuncts would be in the wrong order. |
There was a problem hiding this comment.
We can leave this for a later PR, but I think what we have been doing in cases like this is just to use to_dual to add those versions of the statements; then we won't be blocked on later declarations. We could even use to_dual none to make the translated versions have non-user-facing names.
There was a problem hiding this comment.
Thanks for the suggestion! to_dual none is a great trick for unblocking downstream declarations. I'll look into this for a follow-up.
There was a problem hiding this comment.
Yes, to_dual none is the correct fix here.
afd8e55 to
50f7448
Compare
Co-Authored-By: Claude Opus 4.6 <[email protected]>
50f7448 to
cf262b1
Compare
|
Thanks! |
This PR adds `@[to_dual]` name dictionary entries for atom/coatom and lfp/gfp, and uses `@[to_dual]` to auto-generate dual theorems in `Order.Bounds.Basic`, deleting the hand-written versions. 27 `@[to_dual]` annotations total, deleting 27 hand-written duals. Remaining pairs not converted: - `bddAbove_insert`/`bddBelow_insert` — needs `directed`/`codirected` dictionary entry, which causes problems elsewhere - `IsLUB.exists_between`/`IsGLB.exists_between` — `@[to_dual]` swaps the `And` conjuncts - Bounded interval theorems (`Icc`, `Ico`, etc.) — arguments swap under duality - DenselyOrdered interval theorems — dual proofs need `simpa [Ioo_toDual]` - `isGreatest_himp`/`isLeast_sdiff` — needs `himp`/`sdiff` dictionary entry 🤖 Prepared with Claude Code
|
Pull request successfully merged into master. Build succeeded: |
This PR adds `@[to_dual]` name dictionary entries for atom/coatom and lfp/gfp, and uses `@[to_dual]` to auto-generate dual theorems in `Order.Bounds.Basic`, deleting the hand-written versions. 27 `@[to_dual]` annotations total, deleting 27 hand-written duals. Remaining pairs not converted: - `bddAbove_insert`/`bddBelow_insert` — needs `directed`/`codirected` dictionary entry, which causes problems elsewhere - `IsLUB.exists_between`/`IsGLB.exists_between` — `@[to_dual]` swaps the `And` conjuncts - Bounded interval theorems (`Icc`, `Ico`, etc.) — arguments swap under duality - DenselyOrdered interval theorems — dual proofs need `simpa [Ioo_toDual]` - `isGreatest_himp`/`isLeast_sdiff` — needs `himp`/`sdiff` dictionary entry 🤖 Prepared with Claude Code
This PR adds `@[to_dual]` annotations to primal theorems in `Mathlib.Order.Bounds.Image`, auto-generating their dual counterparts and deleting the hand-written versions. Covers `MonotoneOn`, `AntitoneOn`, `Monotone`, `Antitone`, `image2`, `IsCofinalFor`, `Prod`, and `Pi` sections. [Diff relative to #35208](kim-em/mathlib4@kim/to-dual-bounds-basic...kim/to-dual-bounds-image) - [x] depends on: #35208 🤖 Prepared with Claude Code
This PR adds `@[to_dual]` name dictionary entries for atom/coatom and lfp/gfp, and uses `@[to_dual]` to auto-generate dual theorems in `Order.Bounds.Basic`, deleting the hand-written versions. 27 `@[to_dual]` annotations total, deleting 27 hand-written duals. Remaining pairs not converted: - `bddAbove_insert`/`bddBelow_insert` — needs `directed`/`codirected` dictionary entry, which causes problems elsewhere - `IsLUB.exists_between`/`IsGLB.exists_between` — `@[to_dual]` swaps the `And` conjuncts - Bounded interval theorems (`Icc`, `Ico`, etc.) — arguments swap under duality - DenselyOrdered interval theorems — dual proofs need `simpa [Ioo_toDual]` - `isGreatest_himp`/`isLeast_sdiff` — needs `himp`/`sdiff` dictionary entry 🤖 Prepared with Claude Code
This PR adds `@[to_dual]` name dictionary entries for atom/coatom and lfp/gfp, and uses `@[to_dual]` to auto-generate dual theorems in `Order.Bounds.Basic`, deleting the hand-written versions. 27 `@[to_dual]` annotations total, deleting 27 hand-written duals. Remaining pairs not converted: - `bddAbove_insert`/`bddBelow_insert` — needs `directed`/`codirected` dictionary entry, which causes problems elsewhere - `IsLUB.exists_between`/`IsGLB.exists_between` — `@[to_dual]` swaps the `And` conjuncts - Bounded interval theorems (`Icc`, `Ico`, etc.) — arguments swap under duality - DenselyOrdered interval theorems — dual proofs need `simpa [Ioo_toDual]` - `isGreatest_himp`/`isLeast_sdiff` — needs `himp`/`sdiff` dictionary entry 🤖 Prepared with Claude Code
This PR adds `@[to_dual]` annotations to primal theorems in `Mathlib.Order.Bounds.Image`, auto-generating their dual counterparts and deleting the hand-written versions. Covers `MonotoneOn`, `AntitoneOn`, `Monotone`, `Antitone`, `image2`, `IsCofinalFor`, `Prod`, and `Pi` sections. [Diff relative to leanprover-community#35208](kim-em/mathlib4@kim/to-dual-bounds-basic...kim/to-dual-bounds-image) - [x] depends on: leanprover-community#35208 🤖 Prepared with Claude Code
This PR adds `@[to_dual]` annotations extensively in `CompleteLattice/Defs.lean` and `CompleteLattice/Basic.lean`, auto-generating many dual theorems and deleting the hand-written versions. - [x] depends on: #35208 🤖 Prepared with Claude Code Co-authored-by: Jovan Gerbscheid <[email protected]>
…unity#35209) This PR adds `@[to_dual]` annotations extensively in `CompleteLattice/Defs.lean` and `CompleteLattice/Basic.lean`, auto-generating many dual theorems and deleting the hand-written versions. - [x] depends on: leanprover-community#35208 🤖 Prepared with Claude Code Co-authored-by: Jovan Gerbscheid <[email protected]>
…munity#40040) This PR adds some `to_dual` tags that weren't added in leanprover-community#35208
This PR adds
@[to_dual]name dictionary entries for atom/coatom and lfp/gfp, and uses@[to_dual]to auto-generate dual theorems inOrder.Bounds.Basic, deleting the hand-written versions.27
@[to_dual]annotations total, deleting 27 hand-written duals.Remaining pairs not converted:
bddAbove_insert/bddBelow_insert— needsdirected/codirecteddictionary entry, which causes problems elsewhereIsLUB.exists_between/IsGLB.exists_between—@[to_dual]swaps theAndconjunctsIcc,Ico, etc.) — arguments swap under dualitysimpa [Ioo_toDual]isGreatest_himp/isLeast_sdiff— needshimp/sdiffdictionary entry🤖 Prepared with Claude Code