diff --git a/specs/tri/math_verify.t27 b/specs/tri/math_verify.t27 deleted file mode 100644 index da19445239..0000000000 --- a/specs/tri/math_verify.t27 +++ /dev/null @@ -1,51 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -; specs/tri/math_verify.t27 -- the math/physics test-harness core for `tri math-verify`. -; `tri math-verify` checks numeric identities (the sacred physics constants and the -; TRINITY identity phi^2 + 1/phi^2 = 3) and reports pass/fail per suite; --suite all runs -; every check. The command (cli/tri/src/main.rs) prints one line per check and exits. -; ASCII only (L3) -; phi^2 + 1/phi^2 = 3 | TRINITY -; Issue: #11061 - -module TriMathVerify; - -pub const CMD: str = "math-verify"; -pub const SUITE_ALL: str = "all"; - -/// Verify the Pythagorean identity a^2 + b^2 == c^2: 0 when it holds, 1 otherwise. -pub fn verify_pythagorean(a: u64, b: u64, c: u64) -> u8 { - if (a * a + b * b == c * c) { return 0; } - return 1; -} - -/// Verify the TRINITY constant identity: PHI^2 + 1/PHI^2 == 3. -; phi^2 = phi + 1, so PHI^2 + PHI^-2 = (phi+1) + (2-phi) = 3. -pub fn verify_trinity_identity() -> u8 { - // phi^2 = phi + 1, so phi^2 + phi == phi*(phi+1); verified on a small scaled phi. - const phi : u64 = 1_000_000; - let lhs : u64 = phi * phi + phi; - let rhs : u64 = phi * (phi + 1); - if (lhs == rhs) { return 0; } - return 1; -} - -invariant identities_numbered { assert verify_pythagorean(3, 4, 5) == 0 and verify_pythagorean(1, 1, 2) == 1; } - -test pythagorean_holds_for_three_four_five { - assert(verify_pythagorean(3, 4, 5) == 0); - assert(verify_pythagorean(6, 8, 10) == 0); -} - -test pythagorean_refuses_non_triple { - assert(verify_pythagorean(1, 1, 2) == 1); - assert(verify_pythagorean(2, 3, 4) == 1); -} - -test trinity_identity_passes { - assert(verify_trinity_identity() == 0); -} - -// bench: the full --suite all run touches every check once. -bench suite_all_runs_every_check { - assert(verify_pythagorean(3, 4, 5) == 0 and verify_trinity_identity() == 0); -} diff --git a/specs/tri/sync_cmd.t27 b/specs/tri/sync_cmd.t27 deleted file mode 100644 index 6e68dc7a0b..0000000000 --- a/specs/tri/sync_cmd.t27 +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -; specs/tri/sync_cmd.t27 -- the sync core for `tri sync [issues|prs|doc]`. -; `tri sync` is a group: `sync` syncs all GitHub entities to NotebookLM, `sync issues` -; and `sync prs` sync one kind each, `sync doc` syncs documentation. The command -; (cli/tri/src/main.rs) parses the verb and prints; every rule below is decided here. -; ASCII only (L3) -; phi^2 + 1/phi^2 = 3 | TRINITY -; Issue: #11061 - -module TriSyncCmd; - -pub const CMD: str = "sync"; -pub const ISSUES: str = "issues"; -pub const PRS: str = "prs"; -pub const DOC: str = "doc"; - -/// The number of entities a verb would sync; 0 until wired to live backends. -pub fn entity_count(kind: string) -> u64 { - if (kind == ISSUES) { return 0; } - if (kind == PRS) { return 0; } - if (kind == DOC) { return 0; } - return 0; -} - -invariant verbs_known { assert ISSUES == "issues" and PRS == "prs" and DOC == "doc" and CMD == "sync"; } - -test entity_count_knows_each_verb { - assert(entity_count("issues") == 0); - assert(entity_count("prs") == 0); - assert(entity_count("doc") == 0); - assert(entity_count("everything") == 0); -} - -test cmd_constant_is_sync { - assert(CMD == "sync"); -} - -// bench: classifying one verb is constant work. -bench entity_count_is_constant_work { - assert(entity_count("issues") == 0 and entity_count("prs") == 0 and entity_count("doc") == 0); -}