From e65f5b2410330220d2b136f9ba8c4e86bd5a4dfc Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Mon, 7 Sep 2020 08:39:42 -0400 Subject: Don't require inverses for derived functions that happen to be constant --- docs/spec/inferred.html | 13 ++++--------- spec/inferred.md | 9 ++++----- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/docs/spec/inferred.html b/docs/spec/inferred.html index ee325c5b..401a0e60 100644 --- a/docs/spec/inferred.html +++ b/docs/spec/inferred.html @@ -187,7 +187,7 @@

Required modifiers

-

The following cases of Self/Swap must be supported. In the table below, a number (n) in parentheses indicates that the function in question is equivalent to the constant function n˙, and should be inverted accordingly (check that the argument matches n, then return it).

+

The following cases of Self/Swap must be supported.

@@ -204,7 +204,7 @@ - + @@ -214,7 +214,7 @@ - + @@ -239,7 +239,7 @@ - + @@ -255,11 +255,6 @@ - - - - - diff --git a/spec/inferred.md b/spec/inferred.md index 79bbcac3..058710e5 100644 --- a/spec/inferred.md +++ b/spec/inferred.md @@ -66,25 +66,24 @@ Several primitives are easily undone, but doing so is not important for BQN prog ### Required modifiers -The following cases of Self/Swap must be supported. In the table below, a number (n) in parentheses indicates that the function in question is equivalent to the constant function `n˙`, and should be inverted accordingly (check that the argument matches `n`, then return it). +The following cases of Self/Swap must be supported. | Fn | 1 | 2 |------|-------|------- | `+˜` | `÷⟜2` | `+⁼` -| `-˜` | (0) | `+` +| `-˜` | | `+` | `ט` | `√` | `×⁼` -| `÷˜` | (1) | `×` +| `÷˜` | | `×` | `⋆˜` | | `√` | `√˜` | | `÷⋆⁼` | `∧˜` | `√` | `∧⁼` | `∨˜` | `√⌾¬` | `∨⁼` -| `¬˜` | (1) | `+-1˙` +| `¬˜` | | `+-1˙` Inverses of other modifiers and derived functions or modifiers obtained from them are given below. Here the "inverse" of a modifier is another modifier that, if applied to the same operands as the original operator, gives its inverse function. A constant is either a data value or `𝔽˙` for an arbitrary value `𝔽`. | Mod | Inverse | Requirements |---------|----------------------|-------------- -| `˙` | `{𝕗⊢⁼𝕩}` | | `¨` | `{!0<≡𝕩⋄𝕨𝔽⁼¨𝕩}` | | `⌜` | `{!0<≡𝕩⋄ 𝔽⁼⌜𝕩;}` | Monadic case only | `˘` | `{!0<=𝕩⋄𝕨𝔽⁼˘𝕩}` | -- cgit v1.2.3
-˜(0) +
÷˜(1) ×
¬˜(1) +-1˙
˙{𝕗𝕩}
¨ {!0<≡𝕩𝕨𝔽⁼¨𝕩}