feat(binary.lean): add helper theorem for associative functions

This commit is contained in:
Floris van Doorn 2014-10-08 21:45:44 -04:00 committed by Leonardo de Moura
parent 8d376b93cd
commit 57bee2a659

View file

@ -31,4 +31,17 @@ namespace binary
... = a*(c*b) : {H_comm}
... = (a*c)*b : H_assoc⁻¹
end
context
parameter {A : Type}
parameter {f : A → A → A}
hypothesis H_assoc : associative f
infixl `*`:75 := f
theorem assoc4helper (a b c d) : (a*b)*(c*d) = a*((b*c)*d) :=
calc
(a*b)*(c*d) = a*(b*(c*d)) : H_assoc
... = a*((b*c)*d) : {H_assoc⁻¹}
end
end binary