theorem
proved
tactic proof
nonzero_card_three
show as:
view Lean formalization →
formal statement (Lean)
140theorem nonzero_card_three :
141 (Finset.univ.filter (fun v : F2Power 3 => v ≠ 0)).card = 7 := by
proof body
Tactic-mode proof.
142 have h := @nonzero_card 3
143 -- h : … = 2 ^ 3 - 1
144 have h2 : (2 : ℕ) ^ 3 - 1 = 7 := by norm_num
145 rw [h2] at h
146 exact h
147
148/-! ## Hamming weight -/
149
150/-- The Hamming weight of `v`: the number of coordinates equal to
151 `true`. -/