From 2c658bc967879902987c8b0bdb6891b44e4fd917 Mon Sep 17 00:00:00 2001 From: Remy Degenne Date: Mon, 23 Nov 2026 09:33:18 +0100 Subject: [PATCH 1/2] fix: rename two lemmas that Tau Ceti v4.37.0-rc1 also declares Tau Ceti v4.37.0-rc1 declares `Finset.measurable_inf'` (new file TauCeti/MeasureTheory/Order/Lattice.lean) and `MeasureTheory.Measure.eq_dirac_of_subsingleton` (TauCeti/MeasureTheory/Measure/Dirac.lean), with the same statements as LML's ForMathlib copies. A project that imports both LML and Tau Ceti, such as LMLExplore, then fails to import them together. LML cannot import Tau Ceti, so its copies are renamed: - `Finset.measurable_inf'` -> `Finset.measurable_inf'''`, since Tau Ceti also has `Finset.measurable_inf''`. `to_dual existing` now names `Finset.measurable_sup'` explicitly, so `to_dual` still translates `measurable_max` into `measurable_min`. - `Measure.eq_dirac_of_subsingleton` -> `Measure.eq_dirac_of_subsingleton'`, and its 3 uses. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0196ftMSzkiTpRgwCeJW1wh6 --- .../ForMathlib/MeasureTheory/Measure/Dirac.lean | 2 +- .../ForMathlib/MeasureTheory/Order/Lattice.lean | 4 ++-- LeanMachineLearning/ForMathlib/Probability/Kernel/Basic.lean | 2 +- LeanMachineLearning/SequentialLearning/StationaryEnv.lean | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/LeanMachineLearning/ForMathlib/MeasureTheory/Measure/Dirac.lean b/LeanMachineLearning/ForMathlib/MeasureTheory/Measure/Dirac.lean index 21547b4b..ea59da74 100644 --- a/LeanMachineLearning/ForMathlib/MeasureTheory/Measure/Dirac.lean +++ b/LeanMachineLearning/ForMathlib/MeasureTheory/Measure/Dirac.lean @@ -18,7 +18,7 @@ On a subsingleton, every probability measure is a Dirac mass. namespace MeasureTheory.Measure /-- On a subsingleton, every probability measure is a Dirac mass. -/ -lemma eq_dirac_of_subsingleton {α : Type*} {mα : MeasurableSpace α} +lemma eq_dirac_of_subsingleton' {α : Type*} {mα : MeasurableSpace α} [Subsingleton α] (μ : Measure α) [IsProbabilityMeasure μ] (x : α) : μ = Measure.dirac x := by ext s hs diff --git a/LeanMachineLearning/ForMathlib/MeasureTheory/Order/Lattice.lean b/LeanMachineLearning/ForMathlib/MeasureTheory/Order/Lattice.lean index 2552702e..9ff167b5 100644 --- a/LeanMachineLearning/ForMathlib/MeasureTheory/Order/Lattice.lean +++ b/LeanMachineLearning/ForMathlib/MeasureTheory/Order/Lattice.lean @@ -21,7 +21,7 @@ variable {α δ : Type*} [MeasurableSpace δ] [SemilatticeInf α] {m : Measurabl attribute [to_dual existing] MeasurableInf₂ /-- Dual version of `Finset.measurable_sup'`. -/ -@[to_dual existing (attr := fun_prop)] -theorem Finset.measurable_inf' {ι : Type*} {s : Finset ι} (hs : s.Nonempty) {f : ι → δ → α} +@[to_dual existing (attr := fun_prop) Finset.measurable_sup'] +theorem Finset.measurable_inf''' {ι : Type*} {s : Finset ι} (hs : s.Nonempty) {f : ι → δ → α} (hf : ∀ n ∈ s, Measurable (f n)) : Measurable (s.inf' hs f) := Finset.inf'_induction hs _ (fun _f hf _g hg => hf.inf hg) fun n hn => hf n hn diff --git a/LeanMachineLearning/ForMathlib/Probability/Kernel/Basic.lean b/LeanMachineLearning/ForMathlib/Probability/Kernel/Basic.lean index 2ed5d225..a7cfc52d 100644 --- a/LeanMachineLearning/ForMathlib/Probability/Kernel/Basic.lean +++ b/LeanMachineLearning/ForMathlib/Probability/Kernel/Basic.lean @@ -31,6 +31,6 @@ lemma eq_const_dirac_of_subsingleton [Subsingleton β] (κ : Kernel α β) [IsMa κ = Kernel.const α (Measure.dirac y) := by ext a : 1 rw [Kernel.const_apply] - exact (κ a).eq_dirac_of_subsingleton y + exact (κ a).eq_dirac_of_subsingleton' y end ProbabilityTheory.Kernel diff --git a/LeanMachineLearning/SequentialLearning/StationaryEnv.lean b/LeanMachineLearning/SequentialLearning/StationaryEnv.lean index c8103ff8..2a36fd0a 100644 --- a/LeanMachineLearning/SequentialLearning/StationaryEnv.lean +++ b/LeanMachineLearning/SequentialLearning/StationaryEnv.lean @@ -471,7 +471,7 @@ instance : (Environment.banditSeq ν).IsOblivious := @[simp] lemma obsLaw_banditSeq (n : ℕ) : (Environment.banditSeq ν).obsLaw n = Measure.dirac () := - Measure.eq_dirac_of_subsingleton _ () + Measure.eq_dirac_of_subsingleton' _ () @[simp] lemma feedbackCondObsAction_banditSeq (n : ℕ) : @@ -522,7 +522,7 @@ instance : (Environment.bandit ν).IsOblivious := @[simp] lemma obsLaw_bandit (n : ℕ) : (Environment.bandit ν).obsLaw n = Measure.dirac () := - Measure.eq_dirac_of_subsingleton _ () + Measure.eq_dirac_of_subsingleton' _ () @[simp] lemma feedbackCondObsAction_bandit (n : ℕ) : From 464ef87265383effbfd1b4afd378c56412876931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Degenne?= Date: Mon, 23 Nov 2026 09:48:03 +0100 Subject: [PATCH 2/2] Apply batched suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Rémy Degenne --- LeanMachineLearning/ForMathlib/MeasureTheory/Measure/Dirac.lean | 1 + LeanMachineLearning/ForMathlib/MeasureTheory/Order/Lattice.lean | 1 + 2 files changed, 2 insertions(+) diff --git a/LeanMachineLearning/ForMathlib/MeasureTheory/Measure/Dirac.lean b/LeanMachineLearning/ForMathlib/MeasureTheory/Measure/Dirac.lean index ea59da74..62d2547b 100644 --- a/LeanMachineLearning/ForMathlib/MeasureTheory/Measure/Dirac.lean +++ b/LeanMachineLearning/ForMathlib/MeasureTheory/Measure/Dirac.lean @@ -18,6 +18,7 @@ On a subsingleton, every probability measure is a Dirac mass. namespace MeasureTheory.Measure /-- On a subsingleton, every probability measure is a Dirac mass. -/ +-- A prime was added to the name for compatibility with Tau Ceti. lemma eq_dirac_of_subsingleton' {α : Type*} {mα : MeasurableSpace α} [Subsingleton α] (μ : Measure α) [IsProbabilityMeasure μ] (x : α) : μ = Measure.dirac x := by diff --git a/LeanMachineLearning/ForMathlib/MeasureTheory/Order/Lattice.lean b/LeanMachineLearning/ForMathlib/MeasureTheory/Order/Lattice.lean index 9ff167b5..abe33fc5 100644 --- a/LeanMachineLearning/ForMathlib/MeasureTheory/Order/Lattice.lean +++ b/LeanMachineLearning/ForMathlib/MeasureTheory/Order/Lattice.lean @@ -21,6 +21,7 @@ variable {α δ : Type*} [MeasurableSpace δ] [SemilatticeInf α] {m : Measurabl attribute [to_dual existing] MeasurableInf₂ /-- Dual version of `Finset.measurable_sup'`. -/ +-- 2 primes were added to the name for compatibility with Tau Ceti. @[to_dual existing (attr := fun_prop) Finset.measurable_sup'] theorem Finset.measurable_inf''' {ι : Type*} {s : Finset ι} (hs : s.Nonempty) {f : ι → δ → α} (hf : ∀ n ∈ s, Measurable (f n)) : Measurable (s.inf' hs f) :=