binary_entropy_nats
def
The binary entropy function in natural units (nats) is -x ln x - (1 - x) ln (1 - x) with the convention 0 ln 0 = 0.
Statement
noncomputable def binary_entropy_nats (x : ℝ) : ℝ
- Defined in
- Nielsen & Chuang, Quantum Computation and Quantum Information, Section 11.2
- Verified
- 12 Nov 2026
- Axioms
- none listed
- Used by 2
- two_qubit_candidate_fidelity_boundFor ε ≥ 0, two_qubit_candidate_fidelity_bound ε is the infimum over 0 ≤ p, q ≤ 1 of max{ p(1 + 2 sqrt(q(1 - q)))/2, (1 - p)/2 } subject to…
- two_qubit_candidate_fidelity_bound_at_zeroAt adjusted entropy deficit ε = 0, the candidate fidelity bound equals 1.
Read back from the Lean
Defines binary_entropy_nats, a function from ℝ to ℝ, which maps each real number x to Real.negMulLog x + Real.negMulLog (1 - x). In terms of Mathlib's Real.log, this is -x * Real.log x + -(1 - x) * Real.log (1 - x).
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- Binary Shannon entropy in natural units (nats) with the convention 0 ln 0 = 0. -/ noncomputable def binary_entropy_nats (x : ℝ) : ℝ := Real.negMulLog x + Real.negMulLog (1 - x)