Evidence

Show what works, then state the limits

TensorLang is experimental, so this page puts status, examples, benchmarks, evidence artifacts, and verification hooks in one place. The goal is to make capability claims reproducible and caveated.

Honesty

Implementation status

TensorLang is an experimental reference implementation. The point of this section is to be transparent about what exists today versus what is staged research.

Implemented now

  • S-expression source syntax
  • Domains
  • Typed tensors
  • Sparse COO tensor declarations
  • Tensor definitions
  • Static shape and dtype checking
  • Dependency graph and cycle detection
  • Explicit semiring declarations
  • Named-axis einsum
  • Semiring-aware einsum
  • Explicit Bool join and project
  • Embedding/gather and scatter-add primitives
  • Monotone finite Bool fixed-point checking
  • Finite Bool property checking
  • Exhaustive finite-model verification
  • SMT-LIB export hooks
  • Lean theorem-obligation export hooks
  • Semiring-aware optimization
  • Relational algebra lowering
  • Executable in-memory relational backend
  • Executable SQLite reference backend
  • SQL emission and backend comparison
  • Datalog and TypeDB relational text exports
  • Optional numeric backend adapters
  • Optional JAX autodiff graph inspection
  • Generic train-loss graph inspection
  • Finite-difference gradient reference summaries
  • Minimal trainable subset
  • Generic SGD and Adam training updates
  • Capsulang-facing reasoner manifests
  • Dynamic system declarations
  • Continuous-time and discrete-time simulation
  • Euler integration
  • Reservoir-style recurrent examples
  • Trajectory trace output
  • Semantic trace JSONL
  • Backend trace events
  • Proof-of-capability benchmarks
  • Trainable tensor declarations
  • JSON model artifacts
  • Artifact evaluation and KG scoring
  • KG link prediction training demo
  • Semantic trace classifier demo
  • Reservoir readout training demo
  • Structured trainer loss-contract validation
  • Tiny causal language-model training
  • Foundation model artifact save/load and generation
  • Tiny transformer-block causal LM scaffold
  • Tiny transformer manual reverse-mode training
  • Sharded foundation checkpoint manifests
  • Accelerator lowering artifacts
  • Distributed Adam optimizer-state manifests
  • Finite Bool proof certificates
  • Finite Bool proof-calculus reports
  • Bounded improvement protocol declarations
  • Improvement ledger CLI
  • Production transformer pretraining manifests
  • Executable NumPy accelerator runtime
  • Multi-process local foundation training
  • TensorLang theorem-prover CLI
  • Apple Swift reference checker package
  • Lean companion scaffold for the Swift reference
  • Measured-energy probe/harness when hardware counters are available
  • Tensor Logic inspiration/compatibility status report

Explicitly not (yet)

  • A replacement for PyTorch, JAX, or TensorFlow
  • A production GPU compiler
  • A full implementation of Pedro Domingos's Tensor Logic
  • A general Datalog engine
  • A higher-order dependent proof assistant
  • A full Swift port of every Python v2.0 feature
  • A physical analog / neuromorphic hardware runtime
  • Frontier-quality production pretraining inside the reference runtime
  • Multi-node distributed optimizer service
  • Measured energy savings without a hardware counter and baseline
  • A production-ready training system
  • Unrestricted recursive self-improvement or autonomous promotion
Examples

Short reference programs

named-axis numeric einsumtensorlang
(semiring plus-times
  (type F64)
  (zero 0.0)
  (one 1.0)
  (add +)
  (mul *))

(def similarity
  (type F64)
  (shape Doc Doc)
  (expr
    (einsum "Left Feature, Right Feature -> Left Right"
      doc_feature doc_feature)))
property declaration and verificationtensorlang
(property no_self_ancestor
  (forall ((x Person))
    (not (at ancestor x x))))

; CLI:
; tl verify examples/11_properties_family.tl --json
; tl emit-smt examples/11_properties_family.tl
; tl emit-lean examples/11_properties_family.tl
Benchmarks

Local deterministic reports

Benchmark reports measure local wall-clock and CPU time, estimate peak memory with tracemalloc, record correctness metrics, and state clearly that no external LLM call was made.

Demo
Local deterministic?
Counterexamples?
Trainable?
LLM role
Policy closure
yes
yes
no
explain results
Requirement coverage
yes
yes
no
author/refine requirements
Trace root cause
yes
yes
optional
summarize incident
Dynamic anomaly
yes
no
yes
explain anomaly
KG link prediction
yes
no
yes
generate hypotheses
Trace classifier training
yes
no
yes
explain classes
Reservoir readout training
yes
no
yes
summarize signal
Relational policy backend
yes
yes
no
explain backend diff
Relational reachability backend
yes
yes
no
explain closure
Foundation LM
yes
no
yes
compare generated samples
benchmark commandstensorlang
tl benchmark policy-closure --json
tl benchmark requirement-coverage --json
tl benchmark trace-root-cause --json
tl benchmark dynamic-anomaly --json
tl benchmark kg-link-prediction --json
tl benchmark kg-training --json
tl benchmark trace-classifier-training --json
tl benchmark reservoir-readout-training --json
tl benchmark rel-policy-inmem --json
tl benchmark rel-policy-sqlite --json
tl benchmark rel-reachability-inmem --json
tl benchmark rel-reachability-sqlite --json
tl benchmark autodiff-kg-training --json
tl benchmark foundation-lm --json
tl benchmark policy-closure --json --trace-jsonl /tmp/tensorlang-trace.jsonl
v1.2 Evidence Suite

A reproducible proof-of-capability package

TensorLang now bundles its strongest demos into one evidence suite: finite reasoning, requirement coverage, semantic trace root-cause analysis, dynamic anomaly detection, structured training, executable relational backends, and autodiff evidence.

Finite exact reasoning

Policy closure and requirement coverage run as deterministic tensor/relation programs, with finite Boolean verification where applicable.

Structured trace diagnosis

Semantic trace fields become data that can be reasoned over, producing causal paths instead of prose-only log summaries.

Trainable small models

KG, trace-classifier, reservoir-readout, and foundation-LM demos train explicit local models and emit reusable artifacts.

Executable backends

Relational targets can be compared across reference, in-memory, and SQLite backends; autodiff lowering is inspected where available.

Generated evidence

The suite writes evidence.json, evidence_summary.json, EVIDENCE.md, per-case traces, and model artifacts.

Honest boundaries

No LLM calls, no energy measurement claims, and no formal proof claims for learned numeric outputs.

Run the evidence suitetensorlang
tl evidence-cases
tl evidence-suite --out build/evidence --quick --json
tl evidence-suite --out build/evidence --size small
generated artifacts
  • evidence.json — full machine-readable report
  • evidence_summary.json — compact web/dashboard summary
  • EVIDENCE.md — generated human-readable report
  • suite.trace.jsonl and traces/*.jsonl — semantic trace evidence
  • artifacts/*.json — generated model artifacts

The evidence suite does not try to make TensorLang compete with LLMs at language. It demonstrates the complementary cases where explicit local tensor/relation/dynamics programs are more repeatable, checkable, and inspectable than repeated probabilistic text inference.

Verification

A small, honest verification ladder

Verification today is finite-model exhaustive checking with hooks to export obligations. It is not a full proof system, and it is not a substitute for SMT solvers or proof assistants — it is a bridge into them.

  1. step 1
    Declare
    Write a property over Boolean tensors and finite domains.
  2. step 2
    Enumerate
    Exhaustively expand over the finite model.
  3. step 3
    Check
    Evaluate the property against every assignment.
  4. step 4
    Export
    Emit SMT-LIB or Lean obligations for external proof tools.