rewrite Op Val n y Op rewrite y Val n rewrite Op Op x y y' rewrite[Let] Op Op x y y' Op x y rewrite x rewrite Val n Val n second Op x y y isOp Val n False isOp Op x y True first Val n Val n first Op x y x assrewrite exp rewrite exp rewrite[Let] exp Op x y a1 rewrite[Let][Let] exp Op x y a1 rewrite y rewrite[Let][Let] Op x y opab a1 b1 rewrite[Let][Let][Let] Op x y a1 b1 rewrite y rewrite[Let][Let][Let] exp a1 b1 c1 rewrite Op a1 Op b1 rewrite c1 second 1 Op 2 True 0 isOp 1 assrewrite 1 rewrite 1 rewrite[Let][Let][Let] 4 rewrite[Let] 3 first 1 Val 1 False 0 rewrite[Let][Let] 4 INNERMOST Frederiksen_Glenstrup/assrewrite.tml.trs