The workshop / corpus/OWN_RULES.md
OWN_RULES.md
Last changed by Priya, 28 h ago. “Every corpus case now names who vouches for it: 0 unsorted. reading 1075, team 472, example 0 (no page text here); 205 claimed examples listed in AUTHORITY.md”
What this change did
⋯ - The corpus of 939 that the engine passed entirely: **255** such cases.- - Added since (my day-3 batch, and corpus/holes.jsonl): **185** more. Now: **440 of 1525**.+ - Added since (my day-3 batch, and corpus/holes.jsonl): **185** more. Then **440 of 1525**.+ - 25 Nov: Mara's rulings on UNSURE questions, corpus/settled.jsonl: **22** more. 26 Nov: **10** cases that cite a page but need one of our rules,+ moved out of the unsorted pile (list and reasons in corpus/AUTHORITY.md). Now: **472 of 1547**. The tables below still describe the 255 of the 939. Of the 255: 213 cite a rule of DESIGN.md or a company decision about what a spreadsheet does (operators, coercion, comparison, references,⋯
The whole file
# Cases that rest only on a rule this team wrote (authority: team)
Written by Priya from the `source` and `authority` fields of every case, with `authority()` of tests/run_corpus.py. Nobody here has
run Excel. For these cases we wrote the rule (docs/DESIGN.md, a company decision, a ruling by Mara in the chat, team/INTERFACE.md)
and then the expected result from our own rule: when the engine passes them it agrees with us, which is not the same as agreeing
with a spreadsheet.
- The corpus of 939 that the engine passed entirely: **255** such cases.
- Added since (my day-3 batch, and corpus/holes.jsonl): **185** more. Then **440 of 1525**.
- 25 Nov: Mara's rulings on UNSURE questions, corpus/settled.jsonl: **22** more. 26 Nov: **10** cases that cite a page but need one of our rules,
moved out of the unsorted pile (list and reasons in corpus/AUTHORITY.md). Now: **472 of 1547**. The tables below still describe the 255 of the 939.
Of the 255: 213 cite a rule of DESIGN.md or a company decision about what a spreadsheet does (operators, coercion, comparison, references,
the 1900 date system): most of these are behaviour a published page does describe, but the case cites us, not the page. 26 cite DESIGN §7 or
INTERFACE: choices of ours as a library (recalculation order, a loop raising CircularReference, null clearing a cell) that no spreadsheet
documents, so "conformance" is the wrong word for them. 16 cite a ruling by Mara on a question I could not source: the weakest of all.
## The 255 of the 939
### datetime (19)
| Source written in the case | Cases | Ids |
|---|---:|---|
| DESIGN §9: dates are serial numbers in the 1900 system, serial 60 is the phantom 29 Feb 1900 | 13 | datetime-001 to 008, datetime-010 to 014 |
| DESIGN §9 with the calendar: 36525 days from 1 Jan 1900 plus the phantom day | 1 | datetime-009 |
| DESIGN §9: February 1900 has 29 days here | 1 | datetime-015 |
| Ruling by Mara on corpus/UNSURE.md (team chat): serial 0 is day 0 of January 1900 | 3 | datetime-110 to 112 |
| Ruling by Mara on corpus/UNSURE.md (team chat): serial 1 is a Sunday in the 1900 system, the price of the phantom day | 1 | datetime-113 |
### logical (6)
| Source written in the case | Cases | Ids |
|---|---:|---|
| DESIGN §8: an error in a scalar argument is returned (OR is not lazy) | 1 | logical-044 |
| DESIGN §8: CHOOSE only evaluates the branch it takes | 1 | logical-072 |
| Ruling by Mara on corpus/UNSURE.md (team chat): IF accepts the text TRUE | 1 | logical-075 |
| Ruling by Mara on corpus/UNSURE.md (team chat): AND skips a blank reference | 1 | logical-076 |
| Ruling by Mara on corpus/UNSURE.md (team chat): SWITCH compares like =, without case | 1 | logical-077 |
| Ruling by Mara on corpus/UNSURE.md (team chat): IFS stops at the first TRUE condition | 1 | logical-078 |
### lookup (1)
| Source written in the case | Cases | Ids |
|---|---:|---|
| Ruling by Mara on corpus/UNSURE.md (team chat): for a single row the second argument is the column | 1 | lookup-065 |
### math (7)
| Source written in the case | Cases | Ids |
|---|---:|---|
| DESIGN §8: wrong number of arguments is #VALUE! | 3 | math-152 to 154 |
| Ruling by Mara on corpus/UNSURE.md (team chat): ROUND works on the 15-digit decimal form, half away from zero | 1 | math-155 |
| Company decision: a reference is not a typed value, even a single cell (text and booleans found in a cell are skipped) | 3 | math-156 to 158 |
### operators (144)
| Source written in the case | Cases | Ids |
|---|---:|---|
| DESIGN §5: arithmetic operators and precedence | 29 | operators-001 to 025, operators-027 to 030 |
| DESIGN §5: spaces around operators do not change the result | 1 | operators-026 |
| DESIGN §5 and §4: & before =, so this is 1="1", and comparison never converts | 1 | operators-031 |
| DESIGN §4 and §5: left to right, (3>2)>1 is TRUE>1 and any boolean > any number | 1 | operators-032 |
| DESIGN §4 and §5: left to right, (1<2)<3 is TRUE<3 and any boolean > any number | 1 | operators-033 |
| DESIGN §1: number literals | 4 | operators-034 to 037 |
| DESIGN §1: text literals, a doubled quote is one quote | 3 | operators-038 to 040 |
| DESIGN §2: coercion in operators | 31 | operators-041 to 060, operators-062 to 072 |
| DESIGN §2: empty text is text that does not read as a number (it is not a blank cell) | 1 | operators-061 |
| DESIGN §1: numbers are shown with 15 significant digits | 1 | operators-073 |
| DESIGN §2 and §8: errors in operators | 16 | operators-074 to 082, operators-085 to 091 |
| DESIGN §2: with two errors, the left one | 2 | operators-083 to 084 |
| DESIGN §8: an impossible number is #NUM! (the square root of a negative number, as SQRT documents) | 1 | operators-092 |
| DESIGN §8: a result too large for a number is #NUM! | 1 | operators-093 |
| DESIGN §4: comparison never converts between types; number < text < boolean; text without case | 31 | operators-094 to 122, operators-125 to 126 |
| DESIGN §4: two blanks are equal | 1 | operators-123 |
| DESIGN §1: comparison of numbers rounds to 15 significant digits | 1 | operators-124 |
| DESIGN §6 and §8: function names ignore case; unknown function is #NAME? | 13 | operators-127 to 139 |
| Ruling by Mara on corpus/UNSURE.md (team chat): spaces around the digits are accepted | 1 | operators-140 |
| Ruling by Mara on corpus/UNSURE.md (team chat): a trailing percent sign reads as a number | 1 | operators-141 |
| Ruling by Mara on corpus/UNSURE.md (team chat): an exponent reads as a number | 1 | operators-142 |
| Ruling by Mara on corpus/UNSURE.md (team chat): 15 significant digits | 1 | operators-143 |
| Ruling by Mara on corpus/UNSURE.md (team chat): a doubled percent is accepted | 1 | operators-144 |
### references (74)
| Source written in the case | Cases | Ids |
|---|---:|---|
| DESIGN §6: reference forms; $ changes nothing in evaluation | 15 | references-001 to 009, references-011 to 016 |
| DESIGN §6: B7:A1 is the same range as A1:B7 | 1 | references-010 |
| DESIGN §6: a single reference gives the value of the cell | 6 | references-017 to 020, references-024 to 025 |
| INTERFACE contract 3: {"text": "=x"} is text that begins with = | 1 | references-021 |
| DESIGN §2: a blank cell is 0 in arithmetic | 1 | references-022 |
| DESIGN §2: a blank cell is empty text with & | 1 | references-023 |
| DESIGN §6: rows 1 to 1,048,576 | 1 | references-026 |
| DESIGN §6: columns A to XFD | 1 | references-027 |
| DESIGN §6: columns after Z are AA, AB, ... | 1 | references-028 |
| DESIGN §6 (decision replaced by Mara): beyond the grid it is not a reference but a name nobody defined | 2 | references-029 to 030 |
| DESIGN §6: other sheets; sheet names ignore case; unknown sheet is #REF! | 13 | references-031 to 043 |
| DESIGN §6: a reference without a sheet, written in a cell of Sheet2, is a cell of Sheet2 | 1 | references-044 |
| DESIGN §6: whole columns and whole rows are ranges | 4 | references-045 to 048 |
| DESIGN §7: recalculation, only what depends on a changed cell, in dependency order | 16 | references-049 to 059, references-061 to 065 |
| DESIGN §7 and INTERFACE contract 3: null clears the cell, a blank is 0 in arithmetic | 1 | references-060 |
| DESIGN §7: several cells set before the next read | 1 | references-066 |
| DESIGN §7: a loop raises gridless.CircularReference | 4 | references-067 to 070 |
| DESIGN §7: a cell that depends on a loop cannot be computed either | 1 | references-071 |
| DESIGN §7: 0.1 follows the references that are written, not the ones that are taken | 1 | references-072 |
| DESIGN §7: a loop created by a later set raises; breaking it makes the cells computable again | 1 | references-073 |
| Ruling by Mara on corpus/UNSURE.md (team chat): a loop elsewhere never blocks a cell that does not depend on it | 1 | references-074 |
### statistics (4)
| Source written in the case | Cases | Ids |
|---|---:|---|
| Company decision: a reference is not a typed value, even a single cell (text and booleans found in a cell are skipped) | 4 | statistics-097 to 100 |
## The 185 added since
### context (3)
| Source written in the case | Cases | Ids |
|---|---:|---|
| DESIGN §8: an error in an argument is returned | 3 | context-056 to 058 |
### datetime (46)
| Source written in the case | Cases | Ids |
|---|---:|---|
| DESIGN §9: the 1900 system keeps 29 February 1900 (serial 60), so every day before 1 March 1900 is one less than the calendar count | 35 | datetime-114 to 148 |
| Ruling by Mara on corpus/UNSURE.md (team chat): serial 0 is day 0 of January 1900 | 1 | datetime-149 |
| DESIGN §9 with the ruling on WEEKDAY(1): serial 1 is a Sunday, and the weekday advances by one each serial, phantom day included | 8 | datetime-150 to 157 |
| DESIGN §9 with the ruling on WEEKDAY(1): serial 1 is a Sunday, and the weekday advances by one each serial, phantom day included (1 March 1900 was a Thursday: from here on the weekdays are the real ones) | 1 | datetime-158 |
| DESIGN §9 with the ruling on WEEKDAY(1): serial 1 is a Sunday, and the weekday advances by one each serial, phantom day included (the real 28 February 1900 was a Wednesday; the 1900 system says Tuesday) | 1 | datetime-159 |
### errors (68)
| Source written in the case | Cases | Ids |
|---|---:|---|
| DESIGN §2: an error on either side of an operator wins; with two errors, the left one | 28 | errors-001 to 028 |
| DESIGN §2 with references: the error of the left cell wins | 6 | errors-029 to 034 |
| DESIGN §8: an error in a scalar argument is returned without calling the function, leftmost first | 20 | errors-035 to 054 |
| DESIGN §8: unknown function is #NAME?; with two errors in an operator, the left one | 2 | errors-057 to 058 |
| DESIGN §8: unknown function is #NAME?; with two errors in an operator, the left one (the function cannot be called at all) | 1 | errors-059 |
| DESIGN §6 and §2: a sheet that does not exist is #REF!, and the left error wins | 2 | errors-060 to 061 |
| DESIGN §8: lazy functions only evaluate the branch they take; the error of the condition is returned | 9 | errors-062 to 070 |
### operators (68)
| Source written in the case | Cases | Ids |
|---|---:|---|
| DESIGN §4 (the documented sort order: numbers, then text, then logical values; a comparison never converts) | 44 | operators-145 to 188 |
| DESIGN §4: text compares without case, character by character | 10 | operators-189 to 198 |
| DESIGN §4: a blank cell takes the type of the other side (0, empty text or FALSE) | 10 | operators-199 to 208 |
| DESIGN §2 and §4: an error on either side of a comparison is returned | 4 | operators-214 to 217 |
Shown as text, exactly as the agents wrote it. Nothing here is run.