theorem
proved
tactic proof
aggregate_eq_one_iff
show as:
view Lean formalization →
formal statement (Lean)
12theorem aggregate_eq_one_iff {n : ℕ} (α x : Vec n) :
13 aggregate α x = 1 ↔ dot α (logVec x) = 0 := by
proof body
Tactic-mode proof.
14 unfold aggregate
15 constructor
16 · intro h
17 have : Real.exp (dot α (logVec x)) = Real.exp 0 := by simpa using h
18 exact Real.exp_injective this
19 · intro h
20 simp [h]
21
22/-- Zero-cost iff weighted log sum vanishes. -/