feat(binary.lean): add helper theorem for associative functions
This commit is contained in:
parent
8d376b93cd
commit
57bee2a659
1 changed files with 13 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue