@@ -51,11 +51,11 @@ A term preceded by `←` gets moved to the left, while a term without `←` gets
5151 right, *after* `a`.
5252 However, if the terms matched by `a` and `b` do not overlap, then `move_add [← a, ← b]`
5353 has the same effect as `move_add [b]; move_add [a]`:
54- first, we move `b` to the left, then we move `a` also to the left, *before* `a `.
54+ first, we move `b` to the left, then we move `a` also to the left, *before* `b `.
5555 The behaviour in the situation where `a` and `b` overlap is unspecified: `move_add`
5656 will descend into subexpressions, but the order in which they are visited depends
5757 on which rearrangements have already happened.
58- Also note, though, that `move_add [a, b]` may differ `move_add [a]; move_add [b]`,
58+ Also note, though, that `move_add [a, b]` may differ from `move_add [a]; move_add [b]`,
5959 for instance when `a` and `b` are `DefEq`.
6060
6161* Unification of inputs and repetitions: `move_add [_, ← _, a * _]`
@@ -256,7 +256,7 @@ partial def getAddends (sum : Expr) : MetaM (Array Expr) := do
256256 else return #[sum]
257257
258258/-- Recursively compute the Array of `getAddends` Arrays by recursing into the expression `sum`
259- looking for instance of the operation `op`.
259+ looking for instances of the operation `op`.
260260
261261Possibly returns duplicates!
262262-/
@@ -303,12 +303,12 @@ def permuteExpr (tgt : Expr) (instructions : List (Expr × Bool)) : MetaM Expr :
303303 permTgt := permTgt.replace (if · == old then new else none)
304304 return permTgt
305305
306- /-- `pairUp L R` takes to lists `L R : List Expr` as inputs.
306+ /-- `pairUp L R` takes two lists `L R : List Expr` as inputs.
307307It scans the elements of `L`, looking for a corresponding `DefEq` `Expr`ession in `R`.
308308If it finds one such element `d`, then it sets the element `d : R` aside, removing it from `R`, and
309309it continues with the matching on the remainder of `L` and on `R.erase d`.
310310
311- At the end, it returns the sublist of `R` of the elements that were matched to some element of `R `,
311+ At the end, it returns the sublist of `R` of the elements that were matched to some element of `L `,
312312in the order in which they appeared in `L`,
313313as well as the sublist of `L` of elements that were not matched, also in the order in which they
314314appeared in `L`.
0 commit comments