cargo
Rust package manager (36 subcommands).
move-narya-bridge
Observational bridge between Move smart contracts and Narya proof verification.
Full skill instructions
"Observational equality turns axioms into theorems. Bridge types connect worlds."
The Move-Narya Bridge translates Move smart contract invariants into Narya's Higher Observational Type Theory (HOTT) for formal verification. Unlike traditional approaches that require axioms for function extensionality, Narya makes this definitional.
Key Insight: Move's resource type system maps naturally to Narya's linear-like resource tracking, while GF(3) conservation laws become observational equalities.
| Role | Trit | Function |
|---|---|---|
| COORDINATOR | 0 | Bridges Move semantics to Narya verification |
This skill translates Move module specifications into Narya proof obligations, leveraging observational equality for automatic function extensionality.
Bridge : MoveSpec → NaryaTheorem
Verify : NaryaTheorem → Result
Invariant: ∀ spec ∈ MoveSpec: well_typed(spec) ⟹ provable(Bridge(spec))
┌─────────────────────────────────────────────────────────────────┐
│ Level 3: Narya HOTT │
│ - Observational equality (Id types per structure) │
│ - Bridge types for parametricity │
│ - Definitional η-laws │
├─────────────────────────────────────────────────────────────────┤
│ Level 2: Move-Narya Bridge (THIS SKILL) │
│ - Translate Move structs → Narya records │
│ - Translate Move functions → Narya morphisms │
│ - Translate invariants → proof obligations │
├─────────────────────────────────────────────────────────────────┤
│ Level 1: Move Smart Contracts │
│ - Resource types (linear) │
│ - Module specifications │
│ - GF(3) trit annotations │
└─────────────────────────────────────────────────────────────────┘
// Move
struct Trit has store, copy, drop {
value: i8,
}
-- Narya
def Trit : Type := sig (
value : I8
)
-- Observational equality for Trit (automatic!)
-- Id(Trit)(t1, t2) ≡ Id(I8)(t1.value, t2.value)
// Move
public fun add(a: Trit, b: Trit): Trit {
Trit { value: normalize(a.value + b.value) }
}
-- Narya
def add : Trit → Trit → Trit :=
λ a b. (value := normalize (a.value + b.value))
-- Function extensionality is DEFINITIONAL:
-- If ∀ x. f x = g x, then f = g (no axiom needed!)
// Move invariant
// assert!(sum % 3 == 0, E_CONSERVATION_VIOLATED);
-- Narya theorem
def conservation : (trits : List Trit) →
Id(I32)(mod (sum (map value trits)) 3, 0) :=
-- Proof term here
Narya's bridge types provide "baby equality" without full symmetry/transitivity. This maps perfectly to GF(3) role relationships:
-- Bridge type: GENERATOR and VALIDATOR are related through COORDINATOR
def gf3_bridge : Br(Trit) plus minus :=
-- Bridge through ergodic
comp_bridge (bridge_to_ergodic plus) (bridge_from_ergodic minus)
-- The roles are related but not equal
-- This captures the asymmetry of the triad
# 1. Extract Move module specification
just move-spec-extract sources/gf3_move23.move > gf3.spec
# 2. Translate to Narya
just move-narya-translate gf3.spec > gf3.narya
# 3. Type-check in Narya
narya check gf3.narya
# 4. Generate proof obligations
narya holes gf3.narya
# 5. Fill proofs interactively
narya interactive gf3.narya
| Move Concept | Narya Concept | Notes |
|---|---|---|
struct | sig (record) | Direct mapping |
has store | Linear annotation | Resource tracking |
public fun | def with arrow type | Morphism |
assert! | Proof obligation | Must prove |
#[test] | Example checking | Automatic |
| Module | Namespace | Direct |
module plurigrid::gf3 {
struct Trit has store, copy, drop {
value: i8,
}
const MINUS: i8 = -1;
const ERGODIC: i8 = 0;
const PLUS: i8 = 1;
public fun add(a: Trit, b: Trit): Trit {
Trit { value: normalize(a.value + b.value) }
}
public fun is_conserved(trits: &vector<Trit>): bool {
let sum: i32 = 0;
// ... compute sum
sum % 3 == 0
}
}
-- GF(3) Balanced Ternary in Narya HOTT
-- Auto-translated by move-narya-bridge
section GF3
def I8 : Type := -- primitive signed 8-bit
def Trit : Type := sig (
value : I8,
valid : Id(Bool)(and (leq (neg 1) value) (leq value 1), true)
)
def MINUS : Trit := (value := neg 1, valid := refl)
def ERGODIC : Trit := (value := 0, valid := refl)
def PLUS : Trit := (value := 1, valid := refl)
-- Addition with normalization
def normalize : I8 → I8 := λ v.
if (gt v 1) then (sub v 3)
else if (lt v (neg 1)) then (add v 3)
else v
def add : Trit → Trit → Trit := λ a b.
let raw := add_i8 a.value b.value in
(value := normalize raw, valid := normalize_preserves_valid raw)
-- Conservation theorem (PROOF OBLIGATION)
def conservation : (trits : List Trit) →
Id(I32)(mod (sum_trits trits) 3, 0) :=
{? conservation_proof ?} -- Hole to fill
-- Bridge types for role relationships
def generator_validator_bridge : Br(Trit) PLUS MINUS :=
bridge_via ERGODIC
end GF3
| Field | Definition |
|---|---|
before | Move module source |
after | Narya translation + proofs |
delta | Proof obligations (holes) |
birth | Empty module stub |
impact | 1 if all proofs complete |
move-narya-bridge (0) ⊗ move-smith-fuzzer (-1) ⊗ aptos-governance (+1) = 0 ✓
move-narya-bridge (0) ⊗ narya-proofs (-1) ⊗ movemate-launchpad (+1) = 0 ✓
move-narya-bridge (0) ⊗ sheaf-cohomology (-1) ⊗ gf3-conservation (+1) = 0 ✓
-- Agda: Need postulate
postulate
funext : {A : Set} {B : A → Set} {f g : (x : A) → B x}
→ ((x : A) → f x ≡ g x) → f ≡ g
-- Narya: Function extensionality is DEFINITIONAL
-- Id(A → B)(f, g) ≡ (x : A) → Id(B)(f x, g x)
-- So if we prove ∀ x. f x = g x, we immediately have f = g
-- No postulate, no axiom, no appeal to univalence
This matters for GF(3) because:
add(a, b) and add(b, a) are equal if equal pointwise# Translate Move module to Narya
just move-narya MODULE.move
# Check Narya translation
just narya-check MODULE.narya
# List proof obligations (holes)
just narya-holes MODULE.narya
# Interactive proof session
just narya-prove MODULE.narya
# Verify GF(3) conservation in Narya
just narya-verify-gf3 MODULE.narya
| Operation | Expected Time |
|---|---|
| Translation (small module) | < 1s |
| Type checking | < 1s for small proofs |
| Proof search | Seconds to minutes |
| Full verification | Depends on proof complexity |
Narya is research-grade, not production. Use for:
For production verification, consider Lean 4 or Coq after prototyping in Narya.
| Skill | Trit | Role | Color |
|---|---|---|---|
aptos-gf3-society | +1 | GENERATOR | #8A60CB |
move-narya-bridge | 0 | COORDINATOR | #3A86AF |
move-smith-fuzzer | -1 | VALIDATOR | #BDCA5B |
Conservation: +1 + 0 + (-1) = 0
| Move Type | Narya Type | Bridge Pattern |
|---|---|---|
i8 | I8 | Direct mapping |
i32 | I32 | Conservation sums |
Trit | Trit : Type | Structural equality |
vector<Trit> | List Trit | Collection mapping |
datalog-fixpoint — Query coordinationstructured-decomp — Decomposition coordinationacset-taxonomy — Schema coordinationtriadic-skill-orchestrator — Dispatch coordinationPosition: Worker 2, Sweep 1
Hex: #3A86AF
Seed: 4354685564936970510
Skill Name: move-narya-bridge Type: Verification Bridge / Proof Translation Trit: 0 (ERGODIC - COORDINATOR) GF(3): Coordinates between Move execution (+1) and Narya verification (-1)
The interaction IS the skill improving itself.
Every use of this skill is an opportunity for worlding:
Add Interaction Exemplars here as the skill is used.
Rust package manager (36 subcommands).
Translate Figma nodes into production-ready code with 1:1 visual fidelity using the Figma MCP workflow (design context, screenshots, assets, and project-convention translation). Trigger when the user provides Figma URLs or node IDs, or asks to implement designs or components that must match Figma...
**Status**: 🌳 Production Ready (upstream in StringZilla v3+) **Type**: High-Performance String Operations / SIMD-Accelerated Text Processing **Principle**: Zero-copy views, SIMD/SWAR acceleration, deterministic hashing **Frame**: Cross-language interoperability (C, C++, Python, Rust, Go, Swift, ...
Conformal Geometric Algebra (CGA) for circles, spheres, and Möbius transformations
Verifies code implements exactly what documentation specifies for blockchain audits. Use when comparing code against whitepapers, finding gaps between specs and implementation, or performing compliance checks for protocol implementations.
Systems programming and performance optimization using Zig. Provides low-level abstractions, memory-safe compiled code, and performance benchmarking. Use for system-level operations, optimization, and interoperability with C/POSIX APIs.
PayPal MCP server integration for invoices, payments, subscriptions, disputes, and transaction reporting via @paypal/mcp.
Unison language - content-addressed functional programming with abilities for effects, distributed computing, and structural types. Use for pure functional code, effect management, distributed systems, and refactoring-safe codebases.
Google Tasks management via TasksACSet. Transforms task operations into GF(3)-typed Interactions, routes to triadic queues, detects saturation for task-zero-as-condensed-state.
World C Skill
Syrup binary serialization for OCapN/CapTP wire format. Canonical encoding for capability messages.
Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience