Tiny Verified Logic Circuits
Collection
Formally verified threshold logic circuits. Compatible with neuromorphic hardware.
β’
33 items
β’
Updated
Formally verified MOD-6 circuit. Single-layer threshold network computing modulo-6 arithmetic with 100% accuracy.
| Component | Value |
|---|---|
| Inputs | 8 |
| Outputs | 1 |
| Parameters | 9 |
| Weights | [1, 1, 1, 1, 1, -5, 1, 1] |
| Bias | 0 |
| Activation | Heaviside step |
import torch
from safetensors.torch import load_file
weights = load_file('model.safetensors')
def mod6_circuit(bits):
inputs = torch.tensor([float(b) for b in bits])
weighted_sum = (inputs * weights['weight']).sum() + weights['bias']
return weighted_sum.item()
Proven axiom-free via Coq using algebraic correctness of the weight pattern.
Full proof: coq-circuits/Modular/Mod6.v
tiny-mod6-verified/
βββ model.safetensors
βββ model.py
βββ config.json
βββ README.md
MIT