pith. machine review for the scientific record. sign in
lemma proved term proof

foldl_xor_init

show as:
view Lean formalization →

No prose has been written for this declaration yet. The Lean source and graph data below render without it.

generate prose now

formal statement (Lean)

  60lemma foldl_xor_init {n} (a : Assignment n) (init : Bool) (vs : List (Var n)) :
  61    vs.foldl (fun acc v => Bool.xor acc (a v)) init =
  62    Bool.xor init (vs.foldl (fun acc v => Bool.xor acc (a v)) false) := by

proof body

Term-mode proof.

  63  induction vs generalizing init with
  64  | nil => simp
  65  | cons v vs ih =>
  66    simp only [List.foldl_cons]
  67    rw [ih (Bool.xor init (a v)), ih (Bool.xor false (a v))]
  68    simp only [Bool.false_xor]
  69    rw [Bool.xor_assoc]
  70
  71/-- Parity of cons: XOR of head and tail parity -/

used by (1)

From the project-wide theorem graph. These declarations reference this one in their body.

depends on (13)

Lean names referenced from this declaration's body.