With rewriting, I have a concise syntax (for example, no congruence property is called), and I can prove:
-- * is associative *-assoc : β abc β (a * b) * c β‘ a * (b * c) *-assoc zero bc = refl *-assoc (succ a) bc rewrite *+-dist b (a * b) c | *-assoc abc = refl
however my little brain can better analyze this evidence
--written in equational style *-assoc' : β abc β (a * b) * c β‘ a * (b * c) *-assoc' zero bc = refl *-assoc' (succ a) bc = (succ a * b) * c β‘β¨ refl β© (b + a * b) * c β‘β¨ *+-dist b (a * b) c β© b * c + (a * b) * c β‘β¨ cong (Ξ» x -> b * c + x) (*-assoc abc) β© b * c + a * (b * c) β‘β¨ refl β© (succ a) * (b * c) β
but I have to indicate which subterm "transform", causing congruence.
Is there a way to combine rewriting and equational notation to get rid of the mention of congruence?
Thank you in advance
source share