Core library & API for the NKTg Law (Nguyen Khanh Tung). Includes core implementation, REST/gRPC API, and 150+ client wrappers
Features
- This repository presents the complete commercial ecosystem built on the **NKTg Law on Varying Inertia**, including **NKTg AI**, **Programming Cosmic Dynamics**, **NKTgUniversa API**, autonomous vehicle technologies, together with the theoretical foundation of the law and experimental validations conducted using publicly available datasets from **NASA** and the **European Space Agency (ESA)**.
- # ๐ง NKTg AI **NKTg AI** is the flagship commercial product built on the **NKTg Law on Varying Inertia**. Unlike traditional summarization tools or generative AI, it is a deterministic **Language Decoding System** that applies physical algorithms to measure semantic energy and identify the **Core Content**โthe author's original logical genetic code. Designed for organizations, researchers, professionals, and decision-makers, NKTg AI performs all processing locally through WebAssembly, requiring no server, cloud service, external AI model, or remote database, ensuring deterministic results, complete privacy, and offline capability. ๐ **Official Website:** https://nktg.org --- ## ๐ Programming Cosmic Dynamics **Programming Cosmic Dynamics** is a book series by **Nguyen Khanh Tung** based on the **NKTg Law on Varying Inertia**. Available worldwide through major digital publishing platforms. Built across **11 programming languages** โข Tested with real data from the **European Space Agency (ESA)** โข **Error margin: 0.208%**. ### ๐ Where to Get It **- Leanpub** https://leanpub.com/NKTgLaw **- Google Play Books** https://play.google.com/store/books/details?id=CNLKEQAAQBAJ&pli **- Amazon** https://www.amazon.com/dp/B0GTSBBRYR **- Payhip** https://payhip.com/b/fU8Xr **- Gumroad** https://nktglaw.gumroad.com/l/NKTgLaw --- ## ๐ NKTg Autonomous Vehicle Ecosystem An autonomous vehicle platform powered by the **NKTg Law on Varying Inertia**, combining ESP32 hardware, specialized sensors, and a real-time web dashboard. Distributed across multiple repositories, it forms a globally verifiable computational physics platform for autonomous control. ### ๐ Distributed Repository Presence - GitHub: https://github.com/NKTg-Variable-Inertia/programming-cosmic-dynamics-control-system - GitLab: https://gitlab.com/NKTg-Variable-Inertia/programming-cosmic-dynamics-real-time-control - Gitea: https://gitea.com/NKTg-Variable-Inertia/programming-cosmic-dynamics-embedded-systems - Codeberg: https://codeberg.org/NKTg-Variable-Inertia/programming-cosmic-dynamics-vehicle-system - Bitbucket: https://bitbucket.org/nktg-variable-inertia/programming-cosmic-dynamics-motion-control/src/main/ - Launchpad: https://launchpad.net/programming-cosmic-dynamics-dynamic-systems - SourceForge: https://sourceforge.net/projects/cosmic-dynamics-system/ - SourceHut: https://git.sr.ht/~nktg-variable-inertia/programming-cosmic-dynamics-ai-robotics - RocketGit: https://rocketgit.com/user/NKTg-Variable-Inertia/programming-cosmic-dynamics-data-simulation - Framagit: https://framagit.org/NKTg-Variable-Inertia/programming-cosmic-dynamics-control-system - Disroot: https://git.disroot.org/NKTg-Variable-Inertia/programming-cosmic-dynamics-control-engine --- ## ๐ Foundational Law **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](https://doi.org/10.5281/zenodo.15808498) - **Permanent DOI Archive:** All research on the NKTg Law on Varying Inertia is permanently registered and archived via DOI records in DataCite and Crossref, ensuring global traceability, academic verifiability, and long-term preservation. - [ORCID: https://orcid.org/0009-0002-9877-4137](https://orcid.org/0009-0002-9877-4137) - **Blockchain Verification:** NKTg Law is recorded on the Solana blockchain: - Token: NKTg = f(x, v, m) - Symbol: NKTg - Smart Contract: [`Cks3YVsvYDZhyDYy3nd5EaEewjrtFJVitdPUt8HQa3XL`](https://solscan.io/token/Cks3YVsvYDZhyDYy3nd5EaEewjrtFJVitdPUt8HQa3XL) ---
- ## ๐ 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 the Universal Dynamics Ecosystem built on the **NKTg Law on Varying Inertia**, providing a cross-platform and cross-disciplinary framework for modeling variable inertia, dynamic mass interactions, and systemic motion across multiple domains, including: - Planetary dynamics - Orbit navigation - Robotics & control systems - State-reflective AI - Physics simulation By modeling the relationships among position, velocity, and mass variation, the framework is applicable not only in theoretical physics but also in practical engineering and real-world computational systems. ### Key Features - Core libraries implemented in **C++, Rust, and Go** - **REST** and **gRPC** API interfaces - Over **150 programming language** implementations - Consistent mathematical behavior across all supported platforms - Experimental verification using planetary and NASA datasets **Reference DOI:** Long-term preservation and citation for the NKTg Law Core, API, and 150 language implementations. - Zenodo: [10.5281/zenodo.17190536](https://doi.org/10.5281/zenodo.17190536) Detailed experimental datasets and verification results are provided in the **Foundations** section. ### ๐ Multi-Platform Deployment To ensure long-term availability, independent verification, reproducibility, and platform independence, the NKTgUniversa API is continuously distributed across multiple Git hosting platforms. Each repository contains an identical implementation of the NKTg Law, allowing anyone to verify, reproduce, and access the system without relying on a single provider. - GitHub: https://github.com/NKTgLaw/NKTgLaw - GitLab: https://gitlab.com/NKTgLaw/NKTgLaw - Gitea: https://gitea.com/NKTgLaw/NKTgLaw - Codeberg: https://codeberg.org/NKTgLaw/NKTgLaw - Launchpad: https://launchpad.net/nktglaw - SourceForge: https://sourceforge.net/projects/nktglaw/ - Bitbucket: https://bitbucket.org/nktglaw/nktglaw/src/main/ - SourceHut: https://git.sr.ht/~nktglaw/NKTgLaw - RocketGit: https://rocketgit.com/NKTgLaw/NKTgLaw - Framagit: https://framagit.org/NKTgLaw/NKTgLaw - Disroot: https://git.disroot.org/NKTgLaw/NKTgLaw **Reference DOI:** NKTg Law of Varying Inertia: Content Standardized Across the 21 Most Widely Spoken Human Tongues - Zenodo: [10.5281/zenodo.18722425](https://doi.org/10.5281/zenodo.18722425) **Reference DOI:** Publication of Software Description and Algorithm for the NKTg Law of Variable Inertia: Content Standardized Across the 21 Most Widely Spoken Human Tongues - Zenodo: [10.5281/zenodo.18890313](https://doi.org/10.5281/zenodo.18890313) The NKTg Law follows open-source reproducibility principles through transparent, multilingual, and cross-platform implementations. The system has been experimentally verified using publicly available NASA datasets with consistent computational results and is available in more than **150 programming languages**, supporting both **Offline Mode** and **Online Mode**. Through this distributed infrastructure, **NKTgUniversa API** serves as a globally accessible, independently verifiable Universal Dynamics Ecosystem for open science, cross-domain engineering, and reproducible computational physics. --- ## ๐ Documentation Detailed documentation for the **NKTgLaw Library** is maintained in the project wiki: - [API Guide](https://github.com/NKTgLaw/NKTgLaw/wiki/API-Guide) - [Global Physics Standard API](https://github.com/NKTgLaw/NKTgLaw/wiki/Global-Physics-Standard-API) - [Library Structure](https://github.com/NKTgLaw/NKTgLaw/wiki/NKTgLaw-Library-Structure) - [Theory](https://github.com/NKTgLaw/NKTgLaw/wiki/Theory) Visit the wiki for detailed explanations, examples, and API references. --- ## ๐ Foundations The `foundations/` directory contains theoretical materials and supporting documents: - **Reference DOI:** Experimental Verification of the NKTg Law Using NASA Mercury Data in 2025 - Zenodo โ [10.5281/zenodo.18734660](https://doi.org/10.5281/zenodo.18734660) - **Reference DOI:** Experimental Verification of the NKTg Law in Earth Orbit Based on NASAโs 2025 Earth Dataset - Zenodo โ [10.5281/zenodo.18859684](https://doi.org/10.5281/zenodo.18859684) - **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](https://doi.org/10.5281/zenodo.15864091) - **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](https://doi.org/10.5281/zenodo.16023879) - **Reference DOI:** NKTm Unit: Measurement Standard for Varying Inertia in the NKTg Law - Zenodo โ [10.5281/zenodo.17162127](https://doi.org/10.5281/zenodo.18471049) - **Reference DOI:** Compatibility of Classical Physics, Relativity, and Quantum Mechanics with the NKTg Law - Zenodo โ [10.5281/zenodo.18406191](https://doi.org/10.5281/zenodo.18406191) - **Reference DOI:** Variable Inertia From Abstract Concept to the Era of Measuring the Universe - Zenodo โ [10.5281/zenodo.18897940](https://doi.org/10.5281/zenodo.18897940) - 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/](foundations/) --- ## ๐ Examples This repository contains **150 implementations** of the NKTg Law, one for each programming language. - All code snippets are stored in the [`examples/`](./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) **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`](https://github.com/NKTgLaw/NKTgLaw/tree/main/server/server_offline). - For quick integration or remote access, you can use the **online client wrappers** under [`clients/`](https://github.com/NKTgLaw/NKTgLaw/tree/main/clients). ๐ You can also explore the [`examples/`](https://github.com/NKTgLaw/NKTgLaw/tree/main/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](https://github.com/NKTgLaw/NKTgLaw/tree/main/clients) 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](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](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. --- - ๐ Version: v1.0.0 (Stable) - ๐ Status: This version marks the completion of the core NKTg Law implementation, fully optimized for performance and production-ready.
Follow NKTgLaw
Other Useful Business Software
Build Agents and Models on One Platform
Gemini Enterprise Agent Platform is Google Cloud's comprehensive platform for developers to build, scale, govern, and optimize agents and models. Choose from Google's most advanced models and third-party models like Anthropic's Claude Model Family.
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of NKTgLaw!