constraint-theory-distributed 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,96 @@
1
+ """
2
+ constraint_theory_core — unified geometric constraint theory.
3
+
4
+ The one package that brings together:
5
+ - Eisenstein A₂ lattice quantization
6
+ - Deadband temporal funnels
7
+ - Laman rigidity for topology
8
+ - Metronome consensus
9
+ - Holonomy consistency verification
10
+
11
+ All constants derived from first principles. Zero external dependencies.
12
+
13
+ Example
14
+ -------
15
+ >>> from constraint_theory_core import snap, covering_radius, is_safe
16
+ >>> pt, err = snap(0.5, 0.3)
17
+ >>> is_safe(err)
18
+ True
19
+ """
20
+
21
+ from .exercises import (
22
+ generate_exercise,
23
+ )
24
+ from .genre_brain import (
25
+ GenreEpsilons,
26
+ custom_genre,
27
+ get_genre,
28
+ list_genres,
29
+ sweep_genre,
30
+ )
31
+ from .holonomy import (
32
+ cycle_holonomy,
33
+ fault_boundaries,
34
+ isolate_fault,
35
+ soft_verify_consistency,
36
+ verify_consistency,
37
+ )
38
+ from .lattice import (
39
+ COVERING_RADIUS,
40
+ DIRECTION_COUNT,
41
+ DODECET_DIRECTIONS, # noqa: F401 — re-exported for external use
42
+ SAFE_THRESHOLD,
43
+ SQRT_3,
44
+ A2Point,
45
+ covering_radius,
46
+ decode_dodecet,
47
+ encode_dodecet,
48
+ holonomy_product,
49
+ is_consistent,
50
+ is_safe,
51
+ norm_sq,
52
+ snap,
53
+ soft_snap,
54
+ vector48_decode,
55
+ vector48_encode,
56
+ )
57
+ from .metronome import (
58
+ Metronome,
59
+ MetronomeState,
60
+ )
61
+ from .rigidity import (
62
+ algebraic_connectivity,
63
+ henneberg_construct,
64
+ is_laman,
65
+ optimal_coupling,
66
+ soft_rigidity,
67
+ )
68
+ from .temporal import (
69
+ FunnelPhase,
70
+ FunnelResult,
71
+ TemporalAgent,
72
+ )
73
+
74
+ __version__ = "0.1.0"
75
+
76
+ __all__ = [
77
+ # Lattice
78
+ "A2Point", "snap", "soft_snap", "covering_radius", "is_safe", "norm_sq",
79
+ "decode_dodecet", "encode_dodecet", "vector48_encode", "vector48_decode",
80
+ "holonomy_product", "is_consistent",
81
+ "COVERING_RADIUS", "SAFE_THRESHOLD", "SQRT_3", "DIRECTION_COUNT",
82
+ # Temporal
83
+ "TemporalAgent", "FunnelPhase", "FunnelResult",
84
+ # Rigidity
85
+ "is_laman", "henneberg_construct", "algebraic_connectivity", "optimal_coupling", "soft_rigidity",
86
+ # Metronome
87
+ "Metronome", "MetronomeState",
88
+ # Holonomy
89
+ "cycle_holonomy", "verify_consistency", "soft_verify_consistency", "isolate_fault", "fault_boundaries",
90
+ # Genre Brain
91
+ "GenreEpsilons", "get_genre", "list_genres", "custom_genre", "sweep_genre",
92
+ # Exercises
93
+ "generate_exercise",
94
+ # Meta
95
+ "__version__",
96
+ ]
@@ -0,0 +1,27 @@
1
+ """CLI entry-point: ``python -m constraint_theory_core <subcommand>``."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import sys
6
+
7
+
8
+ def main() -> None:
9
+ if len(sys.argv) < 2:
10
+ print("Usage: python -m constraint_theory_core <subcommand> [options]")
11
+ print("Subcommands: exercise")
12
+ sys.exit(1)
13
+
14
+ subcommand = sys.argv[1]
15
+ rest = sys.argv[2:]
16
+
17
+ if subcommand == "exercise":
18
+ from .exercises import _cli_exercise
19
+ _cli_exercise(rest)
20
+ else:
21
+ print(f"Unknown subcommand: {subcommand!r}")
22
+ print("Available: exercise")
23
+ sys.exit(1)
24
+
25
+
26
+ if __name__ == "__main__":
27
+ main()