Skip to content

feat(ternary): spec-first ternary full adder — arithmetic from XOR + majority - #1772

Merged
gHashTag merged 1 commit into
masterfrom
feat/spec-first-full-adder
Aug 6, 2026
Merged

gHashTag merged 1 commit into
masterfrom
feat/spec-first-full-adder

Conversation

@gHashTag

@gHashTag gHashTag commented Aug 6, 2026

Copy link
Copy Markdown
Owner

specs/ternary/ternary_full_adder.t27, full_adder(a, b, cin): a binary full adder over trit-embedded bits {0→N, 1→P}, built entirely from the spec-first ternary stack:

Closes #1771

Extends the stack from classification into arithmetic — a real datapath building block, composed from already-verified named functions.

Verification

  • typecheck 0 err; icarus-simulate 6/6 test blocks; seal 3 backends MATCH.
  • New tests/ternary_full_adder.rs exhaustively drives all 2^3 = 8 binary inputs vs the arithmetic full-adder truth table = ALL_PASS 8.

🤖 Generated with Claude Code

…ajority)

specs/ternary/ternary_full_adder.t27: full_adder(a,b,cin) -- a binary full
adder over trit-embedded bits {0->N,1->P}, built from the spec-first stack:
sum = a XOR b XOR cin (composed from the 2-layer XOR), carry = majority(a,b,cin)
(a single neuron), output packs sum[1:0]+carry[3:2]. Extends the stack from
classification into arithmetic -- a real datapath building block.

Verified: typecheck 0 err; icarus-simulate 6/6; seal MATCH; new
tests/ternary_full_adder.rs exhaustively drives all 2^3=8 binary inputs vs the
arithmetic truth table = ALL_PASS 8. No compiler change.

Closes #1771

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-06 10:13:51 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 0
PRs with All Checks Green 50
READY 0
FAILING 0
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9393a1c6258f != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@gHashTag
gHashTag merged commit 05a830b into master Aug 6, 2026
18 checks passed
@gHashTag
gHashTag deleted the feat/spec-first-full-adder branch August 6, 2026 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: spec-first ternary full adder — arithmetic composed from XOR + majority

1 participant