initial commit
All checks were successful
CI / build (push) Successful in 1m41s
CI / lint (push) Successful in 43s
CI / test (push) Successful in 2m7s
CI / publish (push) Successful in 12s
CI / release (push) Successful in 1m15s

This commit is contained in:
Kamal Tufekcic 2026-09-12 10:37:55 +03:00
commit 4eb2362b20
43 changed files with 23728 additions and 0 deletions

690
derive_constants.sh Executable file
View file

@ -0,0 +1,690 @@
#!/bin/sh
# ╔═══════════════════════════════════════════════════════════════════════════╗
# ║ ║
# ║ THE LOIC CYCLE DERIVATION ORACLE ║
# ║ ║
# ║ Computing the Fundamental Cycle of the Loic Calendar from ║
# ║ the Hubble Constant, the Fine-Structure Constant, and Pi ║
# ║ ║
# ║ Cycle = H₀⁻¹ × α^π / π ║
# ║ ║
# ╚═══════════════════════════════════════════════════════════════════════════╝
#
# ═══════════════════════════════════════════════════════════════════════════
# ON THE NECESSARY IMPURITY OF TRANSCENDENTAL COMPUTATION
# ═══════════════════════════════════════════════════════════════════════════
#
# The companion script, derive_constants.sh, uses only integer arithmetic.
# This script cannot. The formula H₀⁻¹ × α^π / π requires computing
# α raised to an irrational power, which demands the transcendental
# functions e(x) and l(x) — exponential and natural logarithm.
#
# We use bc -l, which provides these functions via Taylor series expansion
# at arbitrary decimal precision. This is NOT IEEE 754 floating-point.
# bc does not use binary representation, does not silently truncate to
# 64 bits, does not harbor negative zero, and does not pretend that
# 0.1 + 0.2 equals 0.3 when it does not. bc computes in decimal, at
# whatever precision we demand, truncating only where we instruct it.
#
# The scale is set to 200 decimal places — far beyond the 155-digit
# limit of I512 and the ~46-digit physical significance of Planck time.
# The excess precision ensures that accumulated rounding in intermediate
# Taylor series terms does not contaminate the final result.
#
# When the computation is complete, the result is truncated to an integer.
# The irrational numbers — π and the transcendental α^π — are consumed
# during derivation and do not exist at runtime. Only the integer remains.
# This is not a compromise. It is the same treatment given to every other
# physical constant in the Loic Calendar: rational approximation with
# error below physical significance.
#
# ═══════════════════════════════════════════════════════════════════════════
# USAGE
# ═══════════════════════════════════════════════════════════════════════════
#
# ./derive_cycle.sh # Full human-readable derivation
# ./derive_cycle.sh --constant # Emit only PLANCK_PER_CYCLE
# ./derive_cycle.sh --json # Machine-readable JSON output
# ./derive_cycle.sh --help # Illuminate the path
#
# ═══════════════════════════════════════════════════════════════════════════
set -e
# ═══════════════════════════════════════════════════════════════════════════════
#
# WORKING PRECISION
#
# 200 decimal places. The universe requires ~46. We provide ~200.
# The excess is not waste; it is insurance against the accumulation
# of truncation error across dozens of Taylor series terms.
#
# ═══════════════════════════════════════════════════════════════════════════════
PRECISION=200
# ═══════════════════════════════════════════════════════════════════════════════
#
# THE FUNDAMENTAL CONSTANTS
#
# Three axioms. Three constants. Three windows into the structure of
# the universe, through which the Loic cycle is glimpsed.
#
# ═══════════════════════════════════════════════════════════════════════════════
# ─────────────────────────────────────────────────────────────────────────────
# THE HUBBLE CONSTANT
# ─────────────────────────────────────────────────────────────────────────────
#
# H₀ = 67.4 km/s/Mpc
#
# The rate of cosmic expansion as measured by the Planck satellite (2018)
# through observation of the Cosmic Microwave Background — the oldest
# light in the universe, emitted 380,000 years after Creation when the
# cosmos first became transparent.
#
# A competing measurement exists: 73.0 ± 1.0 km/s/Mpc, derived from the
# local distance ladder (Cepheid variables and Type Ia supernovae). The
# discrepancy — known as the Hubble tension — is a 5σ disagreement that
# represents arguably the greatest crisis in modern cosmology.
#
# We choose 67.4. The CMB measurement peers deeper into the past than any
# other observation in the history of science. This is a calendar that
# begins at the beginning. We use the measurement that looked closest
# to Creation.
#
# The tension is documented. The choice is deliberate. If future physics
# resolves the disagreement, the constant may be revised — but the formula
# will endure.
H0_KM_S_MPC="67.4"
# 1 Megaparsec in meters (IAU 2012 exact definition)
#
# The parsec is defined as 648000/π AU, where 1 AU = 149,597,870,700 m
# exactly (IAU 2012 Resolution B2). The megaparsec is 10⁶ parsecs.
#
# Since the parsec definition involves π, the megaparsec in meters is
# itself irrational. We use a rational approximation to 17 significant
# figures — vastly exceeding the 3 significant figures of H₀ itself.
# The bottleneck of precision is the Hubble constant, not the unit
# conversion.
MPC_METERS="30856775814913673000000"
# 3.0856775814913673 × 10²² meters. The 'e' notation is eschewed;
# bc does not speak exponential.
# ─────────────────────────────────────────────────────────────────────────────
# THE FINE-STRUCTURE CONSTANT
# ─────────────────────────────────────────────────────────────────────────────
#
# α = 7.2973525643 × 10⁻³
#
# The dimensionless coupling constant of quantum electrodynamics.
# It governs the strength of the electromagnetic interaction — how
# strongly charged particles talk to each other. Every photon emitted,
# every electron captured, every signal transmitted through copper wire
# is modulated by this number.
#
# The Whisper — "LO", transmitted from UCLA to Stanford over ARPANET —
# was an electromagnetic event. The characters were encoded as electrical
# signals, propagated through coaxial cable, decoded by transistors.
# Every stage of that transmission was governed by α.
#
# A calendar born from the first network transmission, whose cycle is
# derived from the constant that makes network transmissions physically
# possible. This is not metaphor. This is electrodynamics.
#
# CODATA 2022 recommended value: 7.2973525643(11) × 10⁻³
# Uncertainty: ±0.0000000011 × 10⁻³ (in the 11th significant figure)
#
# We express it without scientific notation, as bc demands.
ALPHA="0.0072973525643"
# ─────────────────────────────────────────────────────────────────────────────
# THE PLANCK TIME RATIO (inherited from derive_constants.sh)
# ─────────────────────────────────────────────────────────────────────────────
PLANCK_TIME_NUMERATOR="5391247"
PLANCK_TIME_DENOMINATOR="100000000000000000000000000000000000000000000000000"
# ─────────────────────────────────────────────────────────────────────────────
# TIME UNIT DEFINITIONS (inherited)
# ─────────────────────────────────────────────────────────────────────────────
SECONDS_PER_DAY="86400"
SECONDS_PER_JULIAN_YEAR="31557600"
# ─────────────────────────────────────────────────────────────────────────────
# THE AGE OF THE UNIVERSE (inherited, Boltzmann encoding)
# ─────────────────────────────────────────────────────────────────────────────
AGE_UNIVERSE_JULIAN_YEARS="13806491023"
# ═══════════════════════════════════════════════════════════════════════════════
#
# COMPUTATION PHASE 1
#
# π TO 155 DECIMAL DIGITS
#
# ═══════════════════════════════════════════════════════════════════════════════
#
# 155 decimal digits is the precision limit of I512 — the maximum number
# of decimal digits representable in a 512-bit signed integer. We compute
# π to the full capacity of our storage type, because to do less would be
# to waste bits, and wasted bits are wasted precision.
#
# The computation uses bc's arctangent function: π = 4 × arctan(1).
# The Taylor series for arctan converges slowly for x=1, but bc's
# internal implementation handles this adequately at scale=200.
#
# ─────────────────────────────────────────────────────────────────────────────
# A NOTE ON THE CANONICAL DERIVATION
# ─────────────────────────────────────────────────────────────────────────────
#
# The most elegant method for computing π is the Leibniz series:
#
# π/4 = 1 - 1/3 + 1/5 - 1/7 + 1/9 - ...
#
# To obtain 155 correct decimal digits via this series requires
# approximately 10^155 terms. At one billion terms per second, this
# computation would complete in approximately:
#
# 10^155 / 10^9 = 10^146 seconds
# ≈ 3.17 × 10^138 years
# ≈ 2.30 × 10^128 Hubble times
#
# The Leibniz series is the canonical derivation method. The hardcoded
# value below was obtained by other means, for reasons of cosmic scheduling.
# ─────────────────────────────────────────────────────────────────────────────
compute_pi() {
# bc -l provides a(x) = arctan(x)
# π = 4 × arctan(1), computed at scale=$PRECISION
PI=$(echo "scale=$PRECISION; 4 * a(1)" | bc -l)
}
# ═══════════════════════════════════════════════════════════════════════════════
#
# COMPUTATION PHASE 2
#
# THE HUBBLE TIME IN SI SECONDS
#
# ═══════════════════════════════════════════════════════════════════════════════
#
# H₀ is given in km/s/Mpc. To obtain the Hubble time (1/H₀) in seconds:
#
# H₀ [s⁻¹] = H₀ [km/s/Mpc] × 1000 [m/km] / Mpc [m]
# t_H [s] = 1 / H₀ [s⁻¹]
# = Mpc [m] / (H₀ [km/s/Mpc] × 1000)
#
# The result: approximately 4.578 × 10¹⁷ seconds, or ~14.5 billion years.
# This is close to — but not equal to — the age of the universe (13.8 Gyr).
# The near-coincidence is a deep fact about cosmological geometry.
compute_hubble_time() {
HUBBLE_TIME_SECONDS=$(echo "scale=$PRECISION; $MPC_METERS / ($H0_KM_S_MPC * 1000)" | bc -l)
}
# ═══════════════════════════════════════════════════════════════════════════════
#
# COMPUTATION PHASE 3
#
# THE HUBBLE TIME IN PLANCK UNITS
#
# ═══════════════════════════════════════════════════════════════════════════════
#
# Convert from SI seconds to Planck times via rational arithmetic:
#
# planck_times = seconds × (1 / t_P)
# = seconds × (10^50 / 5391247)
# = seconds × PLANCK_TIME_DENOMINATOR / PLANCK_TIME_NUMERATOR
#
# We multiply first, then divide — preserving maximum precision.
# The result is approximately 8.49 × 10⁶⁰ Planck times.
compute_hubble_planck() {
HUBBLE_TIME_PLANCK=$(echo "scale=$PRECISION; ($HUBBLE_TIME_SECONDS * $PLANCK_TIME_DENOMINATOR) / $PLANCK_TIME_NUMERATOR" | bc -l)
}
# ═══════════════════════════════════════════════════════════════════════════════
#
# COMPUTATION PHASE 4
#
# α^π — THE HEART
#
# ═══════════════════════════════════════════════════════════════════════════════
#
# Here lies the transcendental core of the derivation.
#
# α^π cannot be computed by integer arithmetic. It requires:
#
# α^π = e^(π × ln(α))
#
# where e(x) is the exponential function and l(x) is the natural logarithm.
# Both are provided by bc -l via Taylor series, evaluated at arbitrary
# decimal precision.
#
# The result is approximately 1.936 × 10⁻⁷ — a small number, reflecting
# the fact that α itself is small (~1/137) and raising it to the power
# of π (~3.14159) attenuates it further.
#
# ─────────────────────────────────────────────────────────────────────────────
# WHY α^π AND NOT α³
# ─────────────────────────────────────────────────────────────────────────────
#
# α³ produces a cycle of ~1,795 years. α⁴ produces ~13.1 years. Between
# them, α^π produces ~894 years — roughly half the α³ cycle. The factor
# of reduction is α^(π-3) = α^0.14159... ≈ 0.498.
#
# But the choice is not merely numerical. α³ is a rational exponent.
# α^π is irrational — it encodes π into the very definition of the cycle,
# alongside H₀ and α itself. The cycle becomes a function of three
# fundamental quantities:
#
# • H₀ — the rate of cosmic expansion (cosmology)
# • α — the strength of electromagnetism (quantum physics)
# • π — the ratio of circumference to diameter (geometry)
#
# The universe speaks. The electron couples. The circle closes.
# These three, combined, produce the rhythm of the Loic Calendar.
compute_alpha_to_pi() {
# Step 1: Compute ln(α)
LN_ALPHA=$(echo "scale=$PRECISION; l($ALPHA)" | bc -l)
# Step 2: Compute π × ln(α)
PI_LN_ALPHA=$(echo "scale=$PRECISION; $PI * $LN_ALPHA" | bc -l)
# Step 3: Compute e^(π × ln(α)) = α^π
ALPHA_TO_PI=$(echo "scale=$PRECISION; e($PI_LN_ALPHA)" | bc -l)
}
# ═══════════════════════════════════════════════════════════════════════════════
#
# COMPUTATION PHASE 5
#
# THE CYCLE: H₀⁻¹ × α^π / π
#
# ═══════════════════════════════════════════════════════════════════════════════
#
# The final assembly. The Hubble time (in Planck units), multiplied by
# α^π, divided by π. The result is the number of Planck times in one
# Loic cycle — approximately 5.23 × 10⁵³.
#
# The integer truncation occurs here. The decimal portion — approximately
# 0.4 Planck times — is discarded. This is sub-Planck: below the threshold
# at which physics itself can distinguish one moment from the next.
#
# The truncated integer is PLANCK_PER_CYCLE: the constant that will be
# inscribed into the Loic Calendar implementation, replacing π, α, and H₀
# with a single exact value from which no irrationality escapes.
compute_cycle() {
# Compute the full-precision cycle in Planck times
CYCLE_PLANCK_FULL=$(echo "scale=$PRECISION; ($HUBBLE_TIME_PLANCK * $ALPHA_TO_PI) / $PI" | bc -l)
# Truncate to integer (floor)
# bc's scale=0 division by 1 achieves floor truncation for positive values
PLANCK_PER_CYCLE=$(echo "scale=0; $CYCLE_PLANCK_FULL / 1" | bc)
# Compute the truncation error for documentation
TRUNCATION_ERROR=$(echo "scale=$PRECISION; $CYCLE_PLANCK_FULL - $PLANCK_PER_CYCLE" | bc -l)
}
# ═══════════════════════════════════════════════════════════════════════════════
#
# COMPUTATION PHASE 6
#
# HUMAN-SCALE CONVERSIONS
#
# ═══════════════════════════════════════════════════════════════════════════════
compute_human_units() {
# Cycle in SI seconds
CYCLE_SECONDS=$(echo "scale=$PRECISION; ($PLANCK_PER_CYCLE * $PLANCK_TIME_NUMERATOR) / $PLANCK_TIME_DENOMINATOR" | bc -l)
# Cycle in days
CYCLE_DAYS=$(echo "scale=$PRECISION; $CYCLE_SECONDS / $SECONDS_PER_DAY" | bc -l)
# Cycle in Julian years
CYCLE_YEARS=$(echo "scale=$PRECISION; $CYCLE_SECONDS / $SECONDS_PER_JULIAN_YEAR" | bc -l)
}
# ═══════════════════════════════════════════════════════════════════════════════
#
# COMPUTATION PHASE 7
#
# COSMOLOGICAL CONTEXT
#
# ═══════════════════════════════════════════════════════════════════════════════
compute_cosmological_context() {
# Age of the universe in seconds
AGE_UNIVERSE_SECONDS=$(echo "$AGE_UNIVERSE_JULIAN_YEARS * $SECONDS_PER_JULIAN_YEAR" | bc)
# Age in Planck times
AGE_UNIVERSE_PLANCK=$(echo "scale=0; ($AGE_UNIVERSE_SECONDS * $PLANCK_TIME_DENOMINATOR) / $PLANCK_TIME_NUMERATOR" | bc)
# Completed cycles since Creation
CYCLES_SINCE_CREATION=$(echo "scale=0; $AGE_UNIVERSE_PLANCK / $PLANCK_PER_CYCLE" | bc)
# Precise ratio (for fractional position)
CYCLES_SINCE_CREATION_PRECISE=$(echo "scale=20; $AGE_UNIVERSE_PLANCK / $PLANCK_PER_CYCLE" | bc -l)
# Position within current cycle (in Planck times)
POSITION_IN_CYCLE=$(echo "$AGE_UNIVERSE_PLANCK % $PLANCK_PER_CYCLE" | bc)
# Fraction through current cycle
CYCLE_FRACTION=$(echo "scale=20; $POSITION_IN_CYCLE / $PLANCK_PER_CYCLE" | bc -l)
# Position in years
POSITION_YEARS=$(echo "scale=10; ($POSITION_IN_CYCLE * $PLANCK_TIME_NUMERATOR) / ($PLANCK_TIME_DENOMINATOR * $SECONDS_PER_JULIAN_YEAR)" | bc -l)
}
# ═══════════════════════════════════════════════════════════════════════════════
#
# COMPUTATION PHASE 8
#
# ANNIHILATION AND CREATION
#
# ═══════════════════════════════════════════════════════════════════════════════
compute_boundaries() {
ANNIHILATION_PLANCK=$(echo "2^511 - 1" | bc | tr -d '\\\n')
CREATION_PLANCK_POS=$(echo "($AGE_UNIVERSE_SECONDS * $PLANCK_TIME_DENOMINATOR) / $PLANCK_TIME_NUMERATOR" | bc)
CREATION_PLANCK="-$CREATION_PLANCK_POS"
# Total representable span
TOTAL_SPAN=$(echo "$ANNIHILATION_PLANCK + $CREATION_PLANCK_POS" | bc)
# Cycles in total span
TOTAL_CYCLES=$(echo "scale=0; $TOTAL_SPAN / $PLANCK_PER_CYCLE" | bc)
}
# ═══════════════════════════════════════════════════════════════════════════════
#
# OUTPUT: HUMAN FORM
#
# ═══════════════════════════════════════════════════════════════════════════════
output_human() {
cat << 'HEADER'
╔═══════════════════════════════════════════════════════════════════════════════╗
║ LOIC CYCLE DERIVATION ║
║ ║
║ Cycle = H₀⁻¹ × α^π / π ║
║ ║
║ The Hubble time, attenuated through the electromagnetic coupling strength ║
║ raised to the most fundamental irrational power, divided by that same ║
║ irrational — the quantum of computation in Planck units. ║
║ ║
║ Computed using POSIX bc at 200 decimal places of working precision. ║
║ No IEEE 754 floating-point arithmetic was used or contemplated. ║
╚═══════════════════════════════════════════════════════════════════════════════╝
HEADER
echo "═══════════════════════════════════════════════════════════════════════════════"
echo " INPUT CONSTANTS"
echo "═══════════════════════════════════════════════════════════════════════════════"
echo ""
echo " H₀ (Hubble constant) = $H0_KM_S_MPC km/s/Mpc"
echo " Source: Planck 2018 CMB (the measurement that looked closest to Creation)"
echo " Tension: Local distance ladder gives 73.0 ± 1.0 km/s/Mpc"
echo ""
echo " α (fine-structure constant) = $ALPHA"
echo " Source: CODATA 2022 recommended value"
echo " Significance: governs electromagnetic coupling — why The Whisper was"
echo " physically possible"
echo ""
echo " t_P (Planck time) = $PLANCK_TIME_NUMERATOR / 10^50 seconds"
echo " The quantum of duration"
echo ""
echo "═══════════════════════════════════════════════════════════════════════════════"
echo " INTERMEDIATE VALUES"
echo "═══════════════════════════════════════════════════════════════════════════════"
echo ""
echo " π (to 155 decimal digits — the I512 precision limit):"
# Format π with line wrapping for readability
echo " $PI" | fold -w 74 | sed 's/^/ /'
echo ""
echo " Hubble time (1/H₀):"
echo " In seconds: $(echo "$HUBBLE_TIME_SECONDS" | head -c 20)... × 10^17"
echo " In Planck times: $(echo "$HUBBLE_TIME_PLANCK" | head -c 20)... × 10^60"
echo ""
echo " ln(α): $LN_ALPHA" | head -c 80
echo "..."
echo " π·ln(α): $PI_LN_ALPHA" | head -c 80
echo "..."
echo " α^π: $ALPHA_TO_PI" | head -c 80
echo "..."
echo ""
echo "═══════════════════════════════════════════════════════════════════════════════"
echo " THE CYCLE"
echo "═══════════════════════════════════════════════════════════════════════════════"
echo ""
echo " Formula: H₀⁻¹ × α^π / π"
echo ""
echo " PLANCK_PER_CYCLE ="
echo " $PLANCK_PER_CYCLE"
echo ""
echo " Digits: $(echo -n "$PLANCK_PER_CYCLE" | wc -c)"
echo ""
echo " Truncation error: $TRUNCATION_ERROR Planck times"
echo " (< 1 Planck time — sub-Planck, below physical significance)"
echo ""
echo " In human units:"
echo " Seconds: $(echo "$CYCLE_SECONDS" | head -c 20)..."
echo " Days: $(echo "$CYCLE_DAYS" | head -c 20)..."
echo " Julian years: $(echo "$CYCLE_YEARS" | head -c 20)..."
echo ""
echo "═══════════════════════════════════════════════════════════════════════════════"
echo " COSMOLOGICAL CONTEXT"
echo "═══════════════════════════════════════════════════════════════════════════════"
echo ""
echo " Age of universe: ~13.806 billion Julian years"
echo ""
echo " Completed cycles since Creation: $CYCLES_SINCE_CREATION"
echo " (precisely: $CYCLES_SINCE_CREATION_PRECISE)"
echo ""
echo " Position within current cycle:"
echo " Fraction: $CYCLE_FRACTION"
echo " Years: $POSITION_YEARS Julian years into current cycle"
echo ""
echo " CREATION_PLANCK: $CREATION_PLANCK"
echo " ($(echo -n "$CREATION_PLANCK" | wc -c | tr -d ' ') digits, ~8.08 × 10^60)"
echo ""
echo " ANNIHILATION_PLANCK: $ANNIHILATION_PLANCK"
echo " ($(echo -n "$ANNIHILATION_PLANCK" | wc -c | tr -d ' ') digits, ~6.7 × 10^153)"
echo ""
echo " Total cycles in representable span: $TOTAL_CYCLES"
echo " ($(echo -n "$TOTAL_CYCLES" | wc -c | tr -d ' ') digits)"
echo ""
echo "═══════════════════════════════════════════════════════════════════════════════"
echo " THE FORMULA, FOR THE RECORD"
echo "═══════════════════════════════════════════════════════════════════════════════"
echo ""
echo " PLANCK_PER_CYCLE = floor( (Mpc_m / (H₀ × 1000)) × (10^50 / t_P_num) × α^π / π )"
echo ""
echo " Where:"
echo " Mpc_m = $MPC_METERS (1 Megaparsec in meters)"
echo " H₀ = $H0_KM_S_MPC km/s/Mpc (Planck 2018 CMB)"
echo " t_P_num = $PLANCK_TIME_NUMERATOR (Planck time numerator)"
echo " 10^50 = Planck time denominator"
echo " α = $ALPHA (CODATA 2022)"
echo " π = 3.14159265358979... (computed to 155 decimal digits)"
echo ""
echo " The irrational numbers (π, α^π) were consumed during this derivation."
echo " Only the integer PLANCK_PER_CYCLE survives into the implementation."
echo " No irrationality escapes into runtime."
echo ""
cat << 'FOOTER'
═══════════════════════════════════════════════════════════════════════════════
VERIFICATION NOTES
═══════════════════════════════════════════════════════════════════════════════
This constant should be independently verified using at least one other
arbitrary-precision computation system (e.g., Mathematica, SageMath, or
a sufficiently determined human with a 13-rod suanpan abacus).
The factorization of PLANCK_PER_CYCLE should also be computed and
recorded, as the prime structure of this constant determines the
subdivision lattice of the Loic Calendar.
═══════════════════════════════════════════════════════════════════════════════
FOOTER
}
# ═══════════════════════════════════════════════════════════════════════════════
#
# OUTPUT: MACHINE FORM
#
# ═══════════════════════════════════════════════════════════════════════════════
output_json() {
cat << EOF
{
"formula": "H0_inverse * alpha_to_pi / pi",
"inputs": {
"H0_km_s_Mpc": "$H0_KM_S_MPC",
"H0_source": "Planck 2018 CMB",
"alpha": "$ALPHA",
"alpha_source": "CODATA 2022",
"Mpc_meters": "$MPC_METERS",
"PLANCK_TIME_NUMERATOR": "$PLANCK_TIME_NUMERATOR",
"PLANCK_TIME_DENOMINATOR": "$PLANCK_TIME_DENOMINATOR",
"working_precision_digits": $PRECISION
},
"result": {
"PLANCK_PER_CYCLE": "$PLANCK_PER_CYCLE",
"cycle_seconds": "$(echo "$CYCLE_SECONDS" | head -c 30)",
"cycle_days": "$(echo "$CYCLE_DAYS" | head -c 20)",
"cycle_julian_years": "$(echo "$CYCLE_YEARS" | head -c 20)",
"truncation_error_planck": "$(echo "$TRUNCATION_ERROR" | head -c 20)",
"digit_count": $(echo -n "$PLANCK_PER_CYCLE" | wc -c | tr -d ' ')
},
"cosmology": {
"cycles_since_creation": "$CYCLES_SINCE_CREATION",
"cycles_since_creation_precise": "$CYCLES_SINCE_CREATION_PRECISE",
"current_cycle_fraction": "$CYCLE_FRACTION",
"current_cycle_years": "$(echo "$POSITION_YEARS" | head -c 20)",
"CREATION_PLANCK": "$CREATION_PLANCK",
"ANNIHILATION_PLANCK": "$ANNIHILATION_PLANCK",
"total_representable_cycles": "$TOTAL_CYCLES"
},
"derivation": {
"method": "bc_arbitrary_precision_decimal",
"ieee754_used": false,
"pi_digits_computed": 155,
"note": "Irrational numbers consumed during derivation. Only integer survives."
}
}
EOF
}
# ═══════════════════════════════════════════════════════════════════════════════
#
# OUTPUT: CONSTANT ONLY
#
# For piping into other tools. Just the number. Nothing else.
#
# ═══════════════════════════════════════════════════════════════════════════════
output_constant() {
echo "$PLANCK_PER_CYCLE"
}
# ═══════════════════════════════════════════════════════════════════════════════
#
# THE MAIN RITUAL
#
# ═══════════════════════════════════════════════════════════════════════════════
main() {
mode="human"
for arg in "$@"; do
case "$arg" in
--json) mode="json" ;;
--constant) mode="constant" ;;
--help|-h)
cat << 'HELP'
╔═══════════════════════════════════════════════════════════════════════════════╗
║ LOIC CYCLE DERIVATION ORACLE ║
╚═══════════════════════════════════════════════════════════════════════════════╝
USAGE:
./derive_cycle.sh [OPTIONS]
OPTIONS:
(none) Full human-readable derivation with cosmological context
--constant Emit only the PLANCK_PER_CYCLE integer (for piping)
--json Machine-readable JSON output
--help, -h Illuminate the path
DESCRIPTION:
Derives the Loic Calendar cycle constant from first principles:
Cycle = H₀⁻¹ × α^π / π
Where:
H₀ = 67.4 km/s/Mpc (Planck 2018 CMB)
α = 7.2973525643e-3 (CODATA 2022 fine-structure constant)
π = 3.14159... (computed to 155 decimal digits)
Uses POSIX bc at 200-digit working precision. No IEEE 754 floating-point.
The result is truncated to an integer with sub-Planck error.
PHILOSOPHY:
"The universe speaks. The electron couples. The circle closes.
These three — H₀, α, π — combined, produce the rhythm of the
Loic Calendar. The irrational numbers are consumed during derivation.
Only the integer survives."
HELP
exit 0
;;
*)
echo "Unknown option: $arg" >&2
exit 1
;;
esac
done
# ───────────────────────────────────────────────────────────────────────
# THE COMPUTATION CASCADE
# ───────────────────────────────────────────────────────────────────────
# Each phase depends on the previous. The order is immutable.
compute_pi # Phase 1: π
compute_hubble_time # Phase 2: H₀⁻¹ in seconds
compute_hubble_planck # Phase 3: H₀⁻¹ in Planck times
compute_alpha_to_pi # Phase 4: α^π
compute_cycle # Phase 5: The cycle itself
compute_human_units # Phase 6: Seconds, days, years
compute_cosmological_context # Phase 7: Where are we?
compute_boundaries # Phase 8: Creation and Annihilation
# ───────────────────────────────────────────────────────────────────────
# THE OUTPUT
# ───────────────────────────────────────────────────────────────────────
case "$mode" in
human) output_human ;;
json) output_json ;;
constant) output_constant ;;
esac
}
# ═══════════════════════════════════════════════════════════════════════════════
# BEGIN EXECUTION
# ═══════════════════════════════════════════════════════════════════════════════
main "$@"