1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
//! # ucal-core — absolute time in Planck ticks
//!
//! An unsigned integer count of Planck-time units since a stipulated datum, and a
//! positional calendar over that integer in base 5. Implements Part A of
//! RFC UCAL-1 for profile `UC-1`.
//!
//! ## What tick 0 is
//!
//! Tick 0 is a **stipulated** datum, conventionally identified with the FLRW t→0
//! limit. It is exact by declaration and unrevisable within a profile. It is not
//! a measurement, not a derivation, and not an observed event (Rule Q, N17).
//!
//! The stipulation is a necessity rather than a shortcut, for three independent
//! reasons, each sufficient:
//!
//! 1. Exactness cannot come from measurement. The published age carries
//! ±0.020 Gyr — about 1.17×10⁵⁸ ticks, 0.145% of the span. A datum inheriting
//! that error bar would make every timestamp uncertain relative to zero.
//! 2. The t→0 limit is not an observable event; it is where the FLRW
//! extrapolation's coordinates degenerate, and classical time is undefined
//! below roughly one tick.
//! 3. The extrapolation is model-dependent. Under inflation the FLRW t→0 limit is
//! not a physical event at all.
//!
//! This puts the datum in ordinary company: TAI's 1958-01-01, the Julian Day
//! epoch, the Unix epoch. The parallel to the SI second is exact — 9 192 631 770
//! caesium cycles was *chosen* to match the ephemeris second, and the definition
//! does not inherit that provenance.
//!
//! What a profile does assert about physics is carried separately, as
//! [`profile::Profile::big_bang_claim`], and no arithmetic can consume it.
//!
//! ## What this crate does not contain
//!
//! Rule A.2: no Earth-derived quantity is referenced, named or defined here. The
//! Julian year, the day, the hour and every civil calendar live outside, in
//! `ucal-civil`. The single exception is the declared bridge constant
//! ([`profile::Bridge`]), which exists precisely so that the boundary is visible.
//!
//! Rule E: no floating-point type appears in any signature, field, constant or
//! intermediate. A CI lint enforces it.
//!
//! ## Layout
//!
//! - [`backend`] — the integer backend and the [`backend::TickInt`] surface.
//! Rule W keeps the domain `[0, 2^512)` on both backends.
//! - [`error`] — Appendix E diagnostics.
//! - [`tier`] — the `5^(5k)` grid (Rule G) and tier naming (Rule N).
//! - [`value`] — [`value::Instant`], [`value::Delta`], [`value::Window`] and the
//! inert [`value::SignedWindow`].
//! - [`codec`] — the two text forms (§6, Rule D) and the Appendix F group codec.
//! - [`ident`] — canonical binary (§7.1) and UCID (§7.2), and the Rule S
//! ordering property both depend on.
//! - [`locale`] — tier-name tables (Appendix D). Names are display-only
//! (Rule N), so adding one cannot change what a value means.
//! - [`num`] — Appendix H: widening `mul_div`, directed `isqrt`, exact rationals,
//! interval arithmetic, continued fractions.
//! - [`profile`] — [`profile::UC1`], the datum, and provenance.
//! - [`qualified`] — [`qualified::Kind`] and the calendar qualifier every local
//! rendering must carry (§6.6, §13.4).
//!
//! Rule S in one sentence: the binary form and UCID sort lexicographically in
//! chronological order; the text forms do not, unless zero-padded to a fixed
//! tier width.
// Rule E: enforced structurally here, and by `cargo run -p xtask -- lint` across
// the workspace. There is no float type in this crate to deny.
extern crate alloc;
pub use ;
pub use ;
/// GE-5: text forms are radix formatting, so they need an allocator. Without
/// one the type system, the arithmetic and the binary codec all remain — only
/// the human-readable rendering goes.
pub use ;
pub use ;
pub use ;
pub use LocaleId;
pub use ;
/// Continued fractions return a `Vec` of terms, so they too need an allocator.
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
/// The RFC revision this crate implements.
pub const RFC: &str = "UCAL-1 final draft, 2026-07-29";
/// Deltas applied against the RFC text; see `spec/SPEC-DELTAS.md`.
pub const SPEC_DELTAS: & = &;