Lean4
instance lieRing : LieRing (⨁ i, L i) :=
{
(inferInstance :
AddCommGroup _) with
bracket := zipWith (fun _ => fun x y => ⁅x, y⁆) fun _ => lie_zero 0
add_lie := fun x y z => by
ext
simp only [zipWith_apply, add_apply, add_lie]
lie_add := fun x y z => by
ext
simp only [zipWith_apply, add_apply, lie_add]
lie_self := fun x => by
ext
simp only [zipWith_apply, lie_self, zero_apply]
leibniz_lie := fun x y z => by
ext
simp only [zipWith_apply, add_apply]
apply leibniz_lie }