Skip to content

Commit 9774c69

Browse files
authored
feat(Data/ENNReal/Inv): add div_mul_div_cancel
Proves a / b * (b / c) = a / c for b ≠ 0, b ≠ ∞ in ENNReal. Proof via mul_div_assoc and existing div_mul_cancel. AI Disclosure: This PR was developed with assistance from an LLM (Claude, Anthropic) for proof exploration and text drafting. The proof was compiled and verified locally by the contributor, who understands the mathematical content. This lemma is extracted from a larger formalization of information-theoretic bounds (Zenodo DOI: 10.5281/zenodo.19317983).
1 parent b73ba77 commit 9774c69

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Mathlib/Data/ENNReal/Inv.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,11 @@ protected lemma div_mul_cancel' (ha₀ : a = 0 → b = 0) (ha : a = ∞ → b =
169169
protected lemma div_mul_cancel (ha₀ : a ≠ 0) (ha : a ≠ ∞) : b / a * a = b :=
170170
ENNReal.div_mul_cancel' (by simp [ha₀]) (by simp [ha])
171171

172+
/-- Cancels a shared denominator: `a / b * (b / c) = a / c` for `b ≠ 0`, `b ≠ ∞` in `ℝ≥0∞`. -/
173+
protected lemma div_mul_div_cancel (hb₀ : b ≠ 0) (hb : b ≠ ∞) :
174+
a / b * (b / c) = a / c := by
175+
rw [← mul_div_assoc, ENNReal.div_mul_cancel hb₀ hb]
176+
172177
/-- See `ENNReal.mul_div_cancel` for a simpler version assuming `a ≠ 0`, `a ≠ ∞`. -/
173178
protected lemma mul_div_cancel' (ha₀ : a = 0 → b = 0) (ha : a = ∞ → b = 0) : a * (b / a) = b := by
174179
rw [mul_comm, ENNReal.div_mul_cancel' ha₀ ha]

0 commit comments

Comments
 (0)