Menu

Tree [471bde] main /
 History

HTTPS access


File Date Author Commit
 .github 2025-10-14 Nguyen Khanh Tung Nguyen Khanh Tung [26229c] Update ci.yml
 api 2025-10-09 Nguyen Khanh Tung Nguyen Khanh Tung [704c96] Update README.md
 benchmarks 2025-10-09 Nguyen Khanh Tung Nguyen Khanh Tung [a3bb0b] Create benchmark.qs
 clients 2025-10-09 Nguyen Khanh Tung Nguyen Khanh Tung [d87a3a] Create NKTgLaw.qproj
 core 2025-10-11 Nguyen Khanh Tung Nguyen Khanh Tung [9b1ffd] Update utils.cpp
 docs 2025-10-09 Nguyen Khanh Tung Nguyen Khanh Tung [ab8f88] Update roadmap.md
 examples 2025-09-28 NKTgLaw NKTgLaw [16f779] Create gleam_snippets.gleam
 foundations 2025-10-03 Nguyen Khanh Tung Nguyen Khanh Tung [821be7] Update Variable Inertia From Abstract Concept t...
 sdk 2025-09-26 NKTgLaw NKTgLaw [566a1d] Create __init__.py
 server 2025-10-12 Nguyen Khanh Tung Nguyen Khanh Tung [e7a403] Update README.md
 tests 2025-10-09 Nguyen Khanh Tung Nguyen Khanh Tung [90f946] Update test_edge.cpp
 tools 2025-10-09 Nguyen Khanh Tung Nguyen Khanh Tung [f43b3e] Update lint.sh
 .gitignore 2025-09-26 NKTgLaw NKTgLaw [6a4a0e] Initial commit
 CHANGELOG.md 2025-10-09 Nguyen Khanh Tung Nguyen Khanh Tung [f849ec] Update CHANGELOG.md
 CITATION.cff 2025-10-10 Nguyen Khanh Tung Nguyen Khanh Tung [9aceb4] Update CITATION.cff
 CMakeLists.txt 2025-10-11 Nguyen Khanh Tung Nguyen Khanh Tung [42902a] Update CMakeLists.txt
 CODE_OF_CONDUCT.md 2025-10-09 Nguyen Khanh Tung Nguyen Khanh Tung [d6db4a] Update CODE_OF_CONDUCT.md
 CONTRIBUTING.md 2025-10-09 Nguyen Khanh Tung Nguyen Khanh Tung [b154d2] Update CONTRIBUTING.md
 FUNDING.yml 2025-09-26 NKTgLaw NKTgLaw [73a41a] Create FUNDING.yml
 LICENSE 2025-09-26 NKTgLaw NKTgLaw [6a4a0e] Initial commit
 LICENSE-commercial.txt 2025-09-27 NKTgLaw NKTgLaw [604fe9] Create LICENSE-commercial.txt
 README.md 2025-11-01 Nguyen Khanh Tung Nguyen Khanh Tung [471bde] Update README.md
 SECURITY.md 2025-10-09 Nguyen Khanh Tung Nguyen Khanh Tung [79fc92] Update SECURITY.md
 nktg_installer.iss 2025-10-11 Nguyen Khanh Tung Nguyen Khanh Tung [ce0c56] Create nktg_installer.iss

Read Me

Core library & API for the NKTg Law (Nguyen Khanh Tung). Includes core implementation, REST/gRPC API, and 150+ client wrappers


📖 Introduction

The NKTg Law on Varying Inertia describes the movement tendency of an object in space depends on the relationship between its position, velocity, and mass.

    NKTg = f(x, v, m)
  • In which:

  • x is the position or displacement of the object relative to the reference point.

  • v is the velocity.

  • m is the mass.

  • The movement tendency of the object is determined by the following basic product quantities:

    NKTg₁ = x × p

    NKTg₂ = (dm/dt) × p
  • In which:

  • p is the linear momentum, calculated by p = m × v.

  • dm/dt is the rate of mass change over time.

  • NKTg₁ is the quantity representing the product of position and momentum.

  • NKTg₂ is the quantity representing the product of mass variation and momentum.

  • The unit of measurement is NKTm, representing a unit of varying inertia.

  • The sign and value of the two quantities NKTg₁ and NKTg₂ determine the movement tendency:

  • If NKTg₁ is positive, the object tends to move away from the stable state.

  • If NKTg₁ is negative, the object tends to move toward the stable state.

  • If NKTg₂ is positive, the mass variation has a supporting effect on the movement.

  • If NKTg₂ is negative, the mass variation has a resisting effect on the movement.

  • The stable state in this law is understood as the state in which the position (x), velocity (v), and mass (m) of the object interact with each other to maintain the movement structure, helping the object avoid losing control and preserving its inherent movement pattern.

  • Reference DOI: These DOIs represent the theoretical foundation and empirical datasets of the NKTg Law on Varying Inertia.

  • Zenodo: 10.5281/zenodo.15808498

  • Figshare: 10.6084/m9.figshare.29481710.v1

📂 Core Components

  • Core library: implementation in C++ / Rust / Go
  • API layer: REST and gRPC interfaces
  • Client wrappers: available for many languages under clients/
  • Standalone implementations: 150 language versions under examples/

🌌 NKTgUniversa API

  • The NKTgUniversa API is formally established as the Universal Dynamics Ecosystem — covering multiple fields, cross-platform, and cross-disciplinary, aimed at modeling variable inertia, dynamic mass interactions, and systemic motion across various domains, applied in the following areas:

  • Planetary dynamics

  • Orbit navigation motion

  • Robotics & control systems

  • State-reflective AI

  • Physics simulation

This framework can reflect any system with state, velocity, and mass variation — so it is not only mathematically correct but also practically applicable in real-world engineering.

👉 This recognition is based on:

  • Completed Core & API Layers: Implemented in C++, Rust, Go, with REST/gRPC interfaces.
  • Cross-language adoption: Over 150 client implementations across major programming languages.
  • The NKTg Law preserves its invariant mathematical structure across more than 150 programming languages, applied throughout all domains of science and life. It requires no differentiation or approximation methods, ensuring that its computational results remain precise, reproducible, and consistent across all environments and implementations.
  • Reference DOI: These DOIs provide long-term preservation and citation access for all 150 language source packages and verified implementations of the NKTgLaw Core & API.
  • Zenodo — 10.5281/zenodo.17190536
  • Figshare — 10.6084/m9.figshare.30195928
  • Experimental verification: Consistent results with planetary and NASA datasets Detailed datasets and DOI references for these verifications are provided in the Foundations section.
  • Multi-Platform Deployment To ensure long-term accessibility, validation, and global interoperability, the API and its repositories are deployed and maintained across 8 major Git platforms:

  • GitHub

  • GitLab
  • Gitea
  • Codeberg
  • Launchpad
  • SourceForge
  • Bitbucket
  • SourceHut

  • Dual-license model: GPL-3.0 (open source) / Commercial license (enterprise-grade).

  • The verification of NKTg Law adheres to open-source reproducibility standards, featuring transparent, multilingual, and cross-platform implementations—accessible anytime, anywhere. It isempirically validated using NASA’s public datasets, producing fully consistent results. Implemented in 150 programming languages, across 8 Git platforms, Offline Mode and Online Mode.

  • This distributed presence establishes NKTgUniversa API as an independent, verifiable, and community-accessible Universal Dynamics Ecosystem, aligned with the principles of open science, cross-domain collaboration, and global reproducibility


📖 Documentation

Detailed documentation for the NKTgLaw Library is maintained in the project wiki:

Visit the wiki for detailed explanations, examples, and API references.


📑 Foundations

The foundations/ directory contains theoretical materials and supporting documents:

  • Reference DOI: Experimental verifications: Summary of Neptune Data Simulated by the NKTg Law Compared to NASA's Published Data (2024)
  • Zenodo — 10.5281/zenodo.15864091
  • Figshare — 10.6084/m9.figshare.29546048

  • Reference DOI: Experimental Verification of the NKT Law: Interpolating the Masses of 8 Planets Using NASA Data as of 30–31/12/2024

  • Zenodo — 10.5281/zenodo.16023879
  • Figshare — 10.6084/m9.figshare.29589431

  • Reference DOI: NKTm Unit: Measurement Standard for Varying Inertia in the NKTg Law

  • Zenodo — 10.5281/zenodo.17162127
  • Figshare — 10.6084/m9.figshare.30166945
  • In NKTg Law, NKTg₁ and NKTg₂ are not independent quantities but two interrelated expressions of a single concept — the generalized variable inertia NKTg.

    • NKTg₁ represents the interaction between position and momentum.
    • NKTg₂ represents the interaction between mass variation and momentum.
    • Both share the same measurement unit NKTm and together describe the complete state of variable inertia within a system.
    • The law emphasizes that NKTg₁ and NKTg₂ are not independent entities, but two aspects of the same physical phenomenon: variable inertia.
    • They express different manifestations of the same underlying essence — the change in the motion tendency of an object system when the factors x, v, and m vary.
  • Wiki.md: consolidated wiki documentation

  • Index.md: structured entry point for foundational texts

👉 Browse the full collection here: foundations/


🌍 Examples

This repository contains 150 implementations of the NKTg Law, one for each programming language.

  • All code snippets are stored in the examples/ directory.
  • Each file is self-contained and demonstrates the calculation of:
p = m * v

NKTg₁ = x * p

NKTg₂ = (dm/dt) * p
  • Default parameters: x=2, v=3, m=5, dm_dt=0.1

👉 Browse the full list here: examples/

Examples include (but are not limited to):

  • High-level: Python, Java, JavaScript, C#, Swift, Kotlin, Go, Rust
  • Scientific: MATLAB, R, Julia, Fortran
  • Functional: Haskell, Scala, Lisp, Scheme, F#
  • Systems: C, C++, Assembly, Ada
  • Web & scripting: PHP, TypeScript, Ruby, Lua, Perl, Bash
  • Database & query: SQL, PL/SQL
  • Specialized: Solidity, VHDL, Verilog, Q#, Scratch, Prolog, COBOL

⚡ Quick Start

  • NKTgLaw supports both offline and online modes.
  • For maximum performance and full precision, we recommend using the offline backend, located at server/server_offline.
  • For quick integration or remote access, you can use the online client wrappers under clients/.

👉 You can also explore the examples/ directory for 150 standalone implementations.

  • Assembly

; Assembly: low-level programming
; x=2, v=3, m=5, dm_dt=0.1
; Calculate p=m*v, NKTg1=x*p, NKTg2=dm_dt*p conceptually
  • Q

// Q#: quantum programming
let x=2.0;
let v=3.0;
let m=5.0;
let dm_dt=0.1;
let p=m*v;
let NKTg1=x*p;
let NKTg2=dm_dt*p;
Message($"p={p} NKTg1={NKTg1} NKTg2={NKTg2}");

👉 Use the provided client wrappers to quickly test the NKTg Law.

  • Python Client

cd clients/python
python NKTgLaw.py

Expected output:

p=15.0, NKTg1=30.0, NKTg2=1.5
  • C++ Client

cd clients/cpp
g++ NKTgLaw.cpp -o nktg_client
./nktg_client

Expected output:

p=15 NKTg1=30 NKTg2=1.5

📜 License

NKTgLaw is available under a dual licensing model:

1. GPL-3.0 License (Open Source)

  • You can use, modify, and redistribute NKTgLaw under the terms of the GPL-3.0 License.
  • This version is free and requires that any derivative works are also released under GPL-3.0.

2. Commercial License (Proprietary)

  • For commercial use without the GPL obligations, a commercial license is required.
  • See LICENSE-commercial.txt for terms and conditions.
  • Contact Nguyen Khanh Tung (traiphieu.com@gmail.com) for licensing and support.

Note: Each user must choose either the GPL license or the Commercial license.
Combining both is not permitted for the same use case.


🌍 Release v0.2.0

MongoDB Logo MongoDB