Ashtadhyayi Algorithm: Module 05
Anuvritti & Adhikara: Managing Global State & Inheritance
पाणिनी ने अष्टाध्यायी को 'Memory Efficient' बनाने के लिए DRY (Don't Repeat Yourself) सिद्धांत का पालन किया। यदि एक शब्द पिछले सूत्र में आ चुका है, तो वह अगले सूत्रों में "Inherit" हो जाता है। इसे 'अनुवृत्ति' कहते हैं।
"प्रत्ययः ॥" (3.1.1)
"परश्च ॥" (3.1.2)
(अब अगले हज़ारों सूत्रों तक 'प्रत्यय' और 'पर' शब्द अपने आप लागू होंगे)
"परश्च ॥" (3.1.2)
(अब अगले हज़ारों सूत्रों तक 'प्रत्यय' और 'पर' शब्द अपने आप लागू होंगे)
Modern Coding
`global_variable = "suffix"``class Child(Parent):`
(Saves memory by reusing definitions)
Panini Logic
अधिकार (Adhikara):A header sutra that governs a whole section.
Python Inheritance Simulation:
# Global Scope Simulation
current_context = {
"adhikara": "PRATYAYA", # Section 3.1.1 onwards
"position": "PARA" # Suffix placement (3.1.2)
}
def apply_sutra(root, new_element):
# The logic 'inherits' context from the Global Adhikara
if current_context["adhikara"] == "PRATYAYA":
if current_context["position"] == "PARA":
return root + new_element # Suffix logic
return new_element + root
# Test: Applying a suffix (Pratyaya)
print(f"Result: {apply_sutra('कृ', 'त')}")
# Output: कृत (Root + Suffix)
Why This Matters for AI?
आज के AI को 'Context Window' की समस्या होती है—वह पुराना डेटा भूल जाता है। पाणिनी की 'अनुवृत्ति' पद्धति एक ऐसी 'Neural Memory' बनाती है जहाँ हर नया नियम पिछले 'Context' के आधार पर खुद को अपडेट करता है। यह Context-Aware Computing का शिखर है।
"ब्रह्मांड में भी 'अधिकार' नियम लागू है। जो गुण 'बीज' (Seed) में है, वही 'वृक्ष' (Tree) में अनुवृत्त होता है।"
