aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-11-24 10:53:26 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-11-24 10:53:26 -0500
commit82fe2e9e68f9d68694aaa3181c28ad95bf486e25 (patch)
tree9392bf1193f15f2a2f250f760abd2cdca886850b /doc
parentac6ac58f2532ad972ef389347a66bf4b526f6444 (diff)
Clarifications
Diffstat (limited to 'doc')
-rw-r--r--doc/undo.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/undo.md b/doc/undo.md
index 3dded26a..08099e8f 100644
--- a/doc/undo.md
+++ b/doc/undo.md
@@ -23,7 +23,7 @@ If `𝔽` can be inverted exactly, then Undo just does that. However, there are
Γ—Λœ Β―3
Γ—ΛœβΌ Γ—Λœ Β―3 # It's not the same!
-Don't worry, this isn't 'nam. Undo doesn't always satisfy `𝕩 ≑ 𝔽⁼ 𝔽 𝕩`, but it *does* obey `𝕩 ≑ 𝔽 𝔽⁼ 𝕩`. That is, it gives one possible argument that could have been passed to `𝔽`, just not necessarily the one that actually was. BQN is conservative in how it uses this freedom, so that it won't for example make up new elements entirely to find an inverse. It's usually used when there's an obvious or standard way to pick which of the possible values should be returned.
+Don't worry, this isn't 'nam. Undo doesn't always satisfy `𝕩 ≑ 𝔽⁼ 𝔽 𝕩`, but it *does* obey `𝕩 ≑ 𝔽 𝔽⁼ 𝕩`. That is, it gives one possible argument that could have been passed to `𝔽`, just not necessarily the one that actually was. BQN is conservative in how it uses this freedom, so that it won't for example make up new elements entirely to find an inverse: `1βŠΈβ†“` is one function that it could undo but won't. It's usually used when there's an obvious or standard way to pick which of the possible values should be returned.
In a BQN with floating-point numbers, computations are approximate, so the inverse is allowed to be approximate as well (any error should still be very small though).
@@ -35,7 +35,7 @@ For the full list, see [the specification](../spec/inferred.md#undo). An individ
Arithmetic and simple combinators are usually invertible. A compound function that refers to its argument just once, like `6+βŒ½βˆ˜β‰`, can typically be undone, but one that uses the argument in two different ways, such as `⊒+⋆`, probably can't.
-A few notable inverses are the [logarithm](arithmetic.md#basic-arithmetic) `⋆⁼`, [un-Transpose](transpose.md) `⍉⁼`, and [Indices inverse](replicate.md#inverse) `/⁼`. [Enclose](enclose.md) inverse, `<⁼`, is an alternative to [First](pick.md#first) that requires its argument to be a unit.
+A few notable inverses are the [logarithm](arithmetic.md#basic-arithmetic) `⋆⁼`, [un-Transpose](transpose.md) `⍉⁼`, and [Indices inverse](replicate.md#inverse) `/⁼`. [Enclose](enclose.md) inverse, `<⁼`, is an alternative to [First](pick.md#first) that requires its argument to be a unit array.
Structural functions like [Take](take.md) and [shifts](shift.md) that remove elements from `𝕩` can't be inverted, because given the result there's no way to know what the elements should be. However, there are two special cases that have inverses defined despite losing data: these are `⊣⁼` and `k⁼` where `k` is a constant (a data type, or `kΛ™`). For these, `𝕩` is required to [match](match.md) the always returned value `𝕨` or `k`, and this value is also used for the resultβ€”even though any result would be valid, as these functions ignore `𝕩`.