physhorizon 0.19.0__tar.gz

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.
Files changed (126) hide show
  1. physhorizon-0.19.0/LICENSE +202 -0
  2. physhorizon-0.19.0/MANIFEST.in +10 -0
  3. physhorizon-0.19.0/NOTICE +10 -0
  4. physhorizon-0.19.0/PKG-INFO +167 -0
  5. physhorizon-0.19.0/README.md +137 -0
  6. physhorizon-0.19.0/lean/PhysHorizon/ActionAngle.lean +147 -0
  7. physhorizon-0.19.0/lean/PhysHorizon/Analytical.lean +237 -0
  8. physhorizon-0.19.0/lean/PhysHorizon/Approximation.lean +198 -0
  9. physhorizon-0.19.0/lean/PhysHorizon/Audit.lean +48 -0
  10. physhorizon-0.19.0/lean/PhysHorizon/Behavior.lean +63 -0
  11. physhorizon-0.19.0/lean/PhysHorizon/Bodies.lean +287 -0
  12. physhorizon-0.19.0/lean/PhysHorizon/Bridge.lean +39 -0
  13. physhorizon-0.19.0/lean/PhysHorizon/Canonical.lean +511 -0
  14. physhorizon-0.19.0/lean/PhysHorizon/CoarseGraining.lean +242 -0
  15. physhorizon-0.19.0/lean/PhysHorizon/Composition.lean +113 -0
  16. physhorizon-0.19.0/lean/PhysHorizon/ConstrainedFlow.lean +192 -0
  17. physhorizon-0.19.0/lean/PhysHorizon/Continuum.lean +333 -0
  18. physhorizon-0.19.0/lean/PhysHorizon/Contracts.lean +79 -0
  19. physhorizon-0.19.0/lean/PhysHorizon/Coordinates.lean +675 -0
  20. physhorizon-0.19.0/lean/PhysHorizon/Discovery.lean +89 -0
  21. physhorizon-0.19.0/lean/PhysHorizon/Frames.lean +400 -0
  22. physhorizon-0.19.0/lean/PhysHorizon/FreeFall.lean +168 -0
  23. physhorizon-0.19.0/lean/PhysHorizon/Geometry.lean +103 -0
  24. physhorizon-0.19.0/lean/PhysHorizon/HamiltonJacobi.lean +89 -0
  25. physhorizon-0.19.0/lean/PhysHorizon/Impacts.lean +134 -0
  26. physhorizon-0.19.0/lean/PhysHorizon/KeplerTime.lean +273 -0
  27. physhorizon-0.19.0/lean/PhysHorizon/Lagrangian.lean +285 -0
  28. physhorizon-0.19.0/lean/PhysHorizon/Mechanics.lean +224 -0
  29. physhorizon-0.19.0/lean/PhysHorizon/MechanicsInstances.lean +313 -0
  30. physhorizon-0.19.0/lean/PhysHorizon/Mesh.lean +52 -0
  31. physhorizon-0.19.0/lean/PhysHorizon/Modeling.lean +81 -0
  32. physhorizon-0.19.0/lean/PhysHorizon/Newton.lean +129 -0
  33. physhorizon-0.19.0/lean/PhysHorizon/Nonholonomic.lean +422 -0
  34. physhorizon-0.19.0/lean/PhysHorizon/Nonlinear.lean +123 -0
  35. physhorizon-0.19.0/lean/PhysHorizon/OpenSystems.lean +62 -0
  36. physhorizon-0.19.0/lean/PhysHorizon/Orbits.lean +385 -0
  37. physhorizon-0.19.0/lean/PhysHorizon/Oscillations.lean +840 -0
  38. physhorizon-0.19.0/lean/PhysHorizon/PhaseGeometry.lean +222 -0
  39. physhorizon-0.19.0/lean/PhysHorizon/Poisson.lean +116 -0
  40. physhorizon-0.19.0/lean/PhysHorizon/Probability.lean +36 -0
  41. physhorizon-0.19.0/lean/PhysHorizon/Relu.lean +46 -0
  42. physhorizon-0.19.0/lean/PhysHorizon/RigidDynamics.lean +250 -0
  43. physhorizon-0.19.0/lean/PhysHorizon/RigidStability.lean +144 -0
  44. physhorizon-0.19.0/lean/PhysHorizon/Scenario.lean +117 -0
  45. physhorizon-0.19.0/lean/PhysHorizon/Syntax.lean +49 -0
  46. physhorizon-0.19.0/lean/PhysHorizon/TimeCoordinates.lean +215 -0
  47. physhorizon-0.19.0/lean/PhysHorizon/Trajectory.lean +452 -0
  48. physhorizon-0.19.0/lean/PhysHorizon/Typed.lean +92 -0
  49. physhorizon-0.19.0/lean/PhysHorizon/Variational.lean +203 -0
  50. physhorizon-0.19.0/lean/PhysHorizon/WeakComputation.lean +82 -0
  51. physhorizon-0.19.0/lean/PhysHorizon.lean +48 -0
  52. physhorizon-0.19.0/lean/lake-manifest.json +117 -0
  53. physhorizon-0.19.0/lean/lakefile.toml +11 -0
  54. physhorizon-0.19.0/lean/lean-toolchain +1 -0
  55. physhorizon-0.19.0/lean/requirements.lock.json +9 -0
  56. physhorizon-0.19.0/pyproject.toml +43 -0
  57. physhorizon-0.19.0/schemas/bundle.schema.json +48 -0
  58. physhorizon-0.19.0/setup.cfg +4 -0
  59. physhorizon-0.19.0/setup.py +29 -0
  60. physhorizon-0.19.0/src/physhorizon/__init__.py +18 -0
  61. physhorizon-0.19.0/src/physhorizon/__main__.py +3 -0
  62. physhorizon-0.19.0/src/physhorizon/acceptance.py +92 -0
  63. physhorizon-0.19.0/src/physhorizon/assessment.py +57 -0
  64. physhorizon-0.19.0/src/physhorizon/bodies.py +349 -0
  65. physhorizon-0.19.0/src/physhorizon/calculus.py +369 -0
  66. physhorizon-0.19.0/src/physhorizon/canonical.py +74 -0
  67. physhorizon-0.19.0/src/physhorizon/cli.py +177 -0
  68. physhorizon-0.19.0/src/physhorizon/coarse_graining.py +220 -0
  69. physhorizon-0.19.0/src/physhorizon/composition.py +267 -0
  70. physhorizon-0.19.0/src/physhorizon/contracts.py +154 -0
  71. physhorizon-0.19.0/src/physhorizon/discovery.py +336 -0
  72. physhorizon-0.19.0/src/physhorizon/domains.py +57 -0
  73. physhorizon-0.19.0/src/physhorizon/engine.py +187 -0
  74. physhorizon-0.19.0/src/physhorizon/errors.py +16 -0
  75. physhorizon-0.19.0/src/physhorizon/free_fall.py +321 -0
  76. physhorizon-0.19.0/src/physhorizon/geometry.py +265 -0
  77. physhorizon-0.19.0/src/physhorizon/installation.py +151 -0
  78. physhorizon-0.19.0/src/physhorizon/intervals.py +71 -0
  79. physhorizon-0.19.0/src/physhorizon/ir.py +237 -0
  80. physhorizon-0.19.0/src/physhorizon/lean_backend.py +273 -0
  81. physhorizon-0.19.0/src/physhorizon/lean_composition.py +202 -0
  82. physhorizon-0.19.0/src/physhorizon/lean_scalar.py +86 -0
  83. physhorizon-0.19.0/src/physhorizon/learned.py +230 -0
  84. physhorizon-0.19.0/src/physhorizon/library.py +166 -0
  85. physhorizon-0.19.0/src/physhorizon/mechanics_advanced_catalog.py +126 -0
  86. physhorizon-0.19.0/src/physhorizon/mechanics_catalog.py +66 -0
  87. physhorizon-0.19.0/src/physhorizon/mechanics_extended_catalog.py +284 -0
  88. physhorizon-0.19.0/src/physhorizon/mesh.py +341 -0
  89. physhorizon-0.19.0/src/physhorizon/migration.py +28 -0
  90. physhorizon-0.19.0/src/physhorizon/modeling.py +352 -0
  91. physhorizon-0.19.0/src/physhorizon/newton.py +181 -0
  92. physhorizon-0.19.0/src/physhorizon/oscillator.py +217 -0
  93. physhorizon-0.19.0/src/physhorizon/packages.py +79 -0
  94. physhorizon-0.19.0/src/physhorizon/plugins.py +126 -0
  95. physhorizon-0.19.0/src/physhorizon/poisson.py +233 -0
  96. physhorizon-0.19.0/src/physhorizon/polynomial.py +75 -0
  97. physhorizon-0.19.0/src/physhorizon/probability.py +200 -0
  98. physhorizon-0.19.0/src/physhorizon/provenance.py +99 -0
  99. physhorizon-0.19.0/src/physhorizon/quantities.py +155 -0
  100. physhorizon-0.19.0/src/physhorizon/residual.py +143 -0
  101. physhorizon-0.19.0/src/physhorizon/scalar.py +224 -0
  102. physhorizon-0.19.0/src/physhorizon/scenario.py +166 -0
  103. physhorizon-0.19.0/src/physhorizon/textbook_models.py +297 -0
  104. physhorizon-0.19.0/src/physhorizon/theory_catalog.py +165 -0
  105. physhorizon-0.19.0/src/physhorizon/uniform_gravity.py +168 -0
  106. physhorizon-0.19.0/src/physhorizon.egg-info/PKG-INFO +167 -0
  107. physhorizon-0.19.0/src/physhorizon.egg-info/SOURCES.txt +124 -0
  108. physhorizon-0.19.0/src/physhorizon.egg-info/dependency_links.txt +1 -0
  109. physhorizon-0.19.0/src/physhorizon.egg-info/entry_points.txt +2 -0
  110. physhorizon-0.19.0/src/physhorizon.egg-info/requires.txt +8 -0
  111. physhorizon-0.19.0/src/physhorizon.egg-info/top_level.txt +1 -0
  112. physhorizon-0.19.0/tests/test_bodies.py +180 -0
  113. physhorizon-0.19.0/tests/test_coarse_graining.py +123 -0
  114. physhorizon-0.19.0/tests/test_composition.py +215 -0
  115. physhorizon-0.19.0/tests/test_computation_newton.py +232 -0
  116. physhorizon-0.19.0/tests/test_contest_collision.py +153 -0
  117. physhorizon-0.19.0/tests/test_coordinates_constraints.py +225 -0
  118. physhorizon-0.19.0/tests/test_core.py +374 -0
  119. physhorizon-0.19.0/tests/test_foundations.py +330 -0
  120. physhorizon-0.19.0/tests/test_geometry_mesh.py +232 -0
  121. physhorizon-0.19.0/tests/test_installation.py +111 -0
  122. physhorizon-0.19.0/tests/test_lean.py +156 -0
  123. physhorizon-0.19.0/tests/test_mechanics.py +198 -0
  124. physhorizon-0.19.0/tests/test_reuse.py +216 -0
  125. physhorizon-0.19.0/tests/test_semantics.py +348 -0
  126. physhorizon-0.19.0/tests/test_textbooks.py +291 -0
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,10 @@
1
+ include README.md LICENSE NOTICE pyproject.toml setup.py
2
+ include lean/lean-toolchain lean/lakefile.toml lean/lake-manifest.json lean/requirements.lock.json lean/PhysHorizon.lean
3
+ recursive-include lean/PhysHorizon *.lean
4
+ recursive-include schemas *.json
5
+ prune books
6
+ prune .physhorizon
7
+ prune lean/.lake
8
+ prune site
9
+ prune docs/research/data
10
+ global-exclude .DS_Store *.py[cod]
@@ -0,0 +1,10 @@
1
+ PhysHorizon
2
+ Copyright 2026 PhysHorizon contributors
3
+
4
+ Project namespace: scimate-ai/PhysHorizon
5
+
6
+ The Apache-2.0 license covers original project contributions. Lean, Mathlib,
7
+ and other dependencies retain their own licenses and are installed separately.
8
+ Textbook scans, private data, credentials, and local build caches are not part
9
+ of the distribution. No textbook endorsement or license to redistribute a
10
+ textbook is implied.
@@ -0,0 +1,167 @@
1
+ Metadata-Version: 2.4
2
+ Name: physhorizon
3
+ Version: 0.19.0
4
+ Summary: Formal physical modeling, verified horizon links, and composable evidence
5
+ Author: PhysHorizon contributors
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://scimate-ai.github.io/PhysHorizon/
8
+ Project-URL: Documentation, https://scimate-ai.github.io/PhysHorizon/
9
+ Project-URL: Repository, https://github.com/scimate-ai/PhysHorizon
10
+ Project-URL: Issues, https://github.com/scimate-ai/PhysHorizon/issues
11
+ Keywords: physics,formal-verification,lean,scientific-computing,modeling
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3 :: Only
17
+ Classifier: Topic :: Scientific/Engineering :: Physics
18
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
+ Requires-Python: >=3.9
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ License-File: NOTICE
23
+ Provides-Extra: docs
24
+ Requires-Dist: mkdocs<2,>=1.6; extra == "docs"
25
+ Requires-Dist: mkdocs-material<10,>=9.6; extra == "docs"
26
+ Provides-Extra: dev
27
+ Requires-Dist: build<2,>=1.2; extra == "dev"
28
+ Requires-Dist: twine<7,>=6; extra == "dev"
29
+ Dynamic: license-file
30
+
31
+ # PhysHorizon
32
+
33
+ **Physical models with explicit scope. Derivations with checkable evidence.**
34
+
35
+ PhysHorizon is an open-source framework for formal physical modeling, physical
36
+ laws, model relationships, and verified calculations. It connects a structured
37
+ scenario to a chosen **Horizon**: its state space, laws, assumptions, domain, and
38
+ requested observations. Lean checks supported mathematical claims; explicit
39
+ contracts carry approximation and computational error across model boundaries.
40
+
41
+ The project is developed for the **scimate-ai** community. Contributions can be
42
+ small: one definition, one theorem, one model link, one solver adapter, or one
43
+ clear tutorial. A complete textbook is never a prerequisite.
44
+
45
+ > **Release:** [PhysHorizon 0.19.0](https://pypi.org/project/physhorizon/0.19.0/)
46
+ > is available on PyPI. Source code is available at
47
+ > [SciMate-AI/PhysHorizon](https://github.com/SciMate-AI/PhysHorizon).
48
+
49
+ Read the [English tutorials and documentation](https://scimate-ai.github.io/PhysHorizon/).
50
+
51
+ ## Install
52
+
53
+ ```sh
54
+ python -m pip install physhorizon
55
+ physhorizon doctor
56
+ ```
57
+
58
+ Install the current source release:
59
+
60
+ ```sh
61
+ git clone https://github.com/SciMate-AI/PhysHorizon.git
62
+ cd PhysHorizon
63
+ python -m pip install -e .
64
+ physhorizon doctor
65
+ ```
66
+
67
+ Python 3.9 or newer is required. The Python core has no third-party runtime
68
+ dependencies. Formal verification additionally needs the pinned Lean/Mathlib
69
+ project. Install it explicitly:
70
+
71
+ ```sh
72
+ physhorizon setup-lean
73
+ physhorizon doctor
74
+ ```
75
+
76
+ Setup downloads and builds the locked toolchain and dependencies. Evaluation
77
+ never installs software automatically. Without a ready backend, proof-dependent
78
+ results remain pending while independent checks retain their results. See the
79
+ [installation guide](https://scimate-ai.github.io/PhysHorizon/getting-started/installation/) for source,
80
+ wheel, platform, cache, and troubleshooting instructions.
81
+
82
+ ## Your first checked theorem
83
+
84
+ No physical parameter values or tolerance are needed to check a universal
85
+ statement. This example checks that two absolute-error bounds compose by the
86
+ triangle inequality.
87
+
88
+ ```python
89
+ from physhorizon import evaluate, installed_index, replay
90
+
91
+ index = installed_index()
92
+ bundle = index.prepare("core.certified_theorems/scalar_triangle", {})
93
+ assessment = evaluate(bundle)
94
+ print(assessment["overall"])
95
+ print(replay(bundle, assessment)["verdict"])
96
+ ```
97
+
98
+ With the backend ready, assessment and replay pass. A process exit code or
99
+ resource search hit alone is not a mathematical certificate.
100
+
101
+ ```sh
102
+ physhorizon resources "quadratic closure" --kind theorem
103
+ physhorizon describe mechanics.newton_particle/inertial_motion
104
+ ```
105
+
106
+ Continue with [your first theorem](https://scimate-ai.github.io/PhysHorizon/tutorials/first-theorem/),
107
+ [models and Horizons](https://scimate-ai.github.io/PhysHorizon/tutorials/model-and-horizon/), and
108
+ [missing premises](https://scimate-ai.github.io/PhysHorizon/tutorials/reuse/).
109
+
110
+ ## What is implemented
111
+
112
+ - Immutable, content-bound scenarios, model contexts, claims, and evidence DAGs.
113
+ - Exact rational inputs and explicit units; unknown values stay unknown.
114
+ - Multi-step Horizon links with checked domains, observations, and error contracts.
115
+ - Actual Lean type, kernel, and transitive-axiom checks for supported statements.
116
+ - 406 universal theorem templates, including 370 mechanics templates.
117
+ - Newtonian particles, frames, rigid bodies, analytical mechanics, finite-particle
118
+ moment projection, and several exact model builders.
119
+ - Supported Poisson candidates, meshes, residual estimates, and stored ReLU
120
+ candidates with continuous error guarantees.
121
+ - Explicit resource discovery and premise matching for programmatic reuse.
122
+
123
+ These are bounded capabilities. General relativity, all of physics, arbitrary
124
+ natural-language problem solving, and universal solver certification are not
125
+ implemented. PhysHorizon does not include an agent or autonomous planning loop.
126
+
127
+ ## Build with the community
128
+
129
+ Start with [CONTRIBUTING.md](https://github.com/SciMate-AI/PhysHorizon/blob/main/CONTRIBUTING.md), the
130
+ [contribution map](https://scimate-ai.github.io/PhysHorizon/contributing/contribution-map/), and the
131
+ [external extension example](https://github.com/SciMate-AI/PhysHorizon/tree/main/examples/community_package).
132
+ Contribute a reviewable semantic component rather than waiting for an entire
133
+ textbook or discipline to be formalized.
134
+
135
+ The project separates discoverability from proof, source facts from model
136
+ assumptions, and a candidate result from a certified conclusion. Textbook
137
+ citations are optional; input provenance and exact proof-artifact binding are not.
138
+
139
+ ## Develop and test
140
+
141
+ ```sh
142
+ python -m pip install -e '.[dev,docs]'
143
+ python -m unittest discover -s tests -v
144
+ python tools/check_design.py
145
+ python tools/check_release.py
146
+ mkdocs serve
147
+ ```
148
+
149
+ For the actual-backend suite:
150
+
151
+ ```sh
152
+ physhorizon setup-lean
153
+ PHYSHORIZON_REQUIRE_LEAN=1 python -m unittest discover -s tests -v
154
+ python tools/check_lean.py
155
+ ```
156
+
157
+ The [English documentation](https://scimate-ai.github.io/PhysHorizon/) and
158
+ [public architecture guide](https://scimate-ai.github.io/PhysHorizon/reference/architecture/) describe current
159
+ interfaces. Historical specifications remain in [spec.md](https://github.com/SciMate-AI/PhysHorizon/blob/main/spec.md) and
160
+ [architecture.md](https://github.com/SciMate-AI/PhysHorizon/blob/main/architecture.md); progress entries are historical records.
161
+
162
+ ## License and citation
163
+
164
+ Original contributions use [Apache-2.0](https://github.com/SciMate-AI/PhysHorizon/blob/main/LICENSE). Dependencies retain their own
165
+ licenses. Textbook scans and caches are excluded from release artifacts. See
166
+ [NOTICE](https://github.com/SciMate-AI/PhysHorizon/blob/main/NOTICE), [GOVERNANCE.md](https://github.com/SciMate-AI/PhysHorizon/blob/main/GOVERNANCE.md), and [CITATION.cff](https://github.com/SciMate-AI/PhysHorizon/blob/main/CITATION.cff).
167
+ No paper or DOI is claimed before publication.
@@ -0,0 +1,137 @@
1
+ # PhysHorizon
2
+
3
+ **Physical models with explicit scope. Derivations with checkable evidence.**
4
+
5
+ PhysHorizon is an open-source framework for formal physical modeling, physical
6
+ laws, model relationships, and verified calculations. It connects a structured
7
+ scenario to a chosen **Horizon**: its state space, laws, assumptions, domain, and
8
+ requested observations. Lean checks supported mathematical claims; explicit
9
+ contracts carry approximation and computational error across model boundaries.
10
+
11
+ The project is developed for the **scimate-ai** community. Contributions can be
12
+ small: one definition, one theorem, one model link, one solver adapter, or one
13
+ clear tutorial. A complete textbook is never a prerequisite.
14
+
15
+ > **Release:** [PhysHorizon 0.19.0](https://pypi.org/project/physhorizon/0.19.0/)
16
+ > is available on PyPI. Source code is available at
17
+ > [SciMate-AI/PhysHorizon](https://github.com/SciMate-AI/PhysHorizon).
18
+
19
+ Read the [English tutorials and documentation](https://scimate-ai.github.io/PhysHorizon/).
20
+
21
+ ## Install
22
+
23
+ ```sh
24
+ python -m pip install physhorizon
25
+ physhorizon doctor
26
+ ```
27
+
28
+ Install the current source release:
29
+
30
+ ```sh
31
+ git clone https://github.com/SciMate-AI/PhysHorizon.git
32
+ cd PhysHorizon
33
+ python -m pip install -e .
34
+ physhorizon doctor
35
+ ```
36
+
37
+ Python 3.9 or newer is required. The Python core has no third-party runtime
38
+ dependencies. Formal verification additionally needs the pinned Lean/Mathlib
39
+ project. Install it explicitly:
40
+
41
+ ```sh
42
+ physhorizon setup-lean
43
+ physhorizon doctor
44
+ ```
45
+
46
+ Setup downloads and builds the locked toolchain and dependencies. Evaluation
47
+ never installs software automatically. Without a ready backend, proof-dependent
48
+ results remain pending while independent checks retain their results. See the
49
+ [installation guide](https://scimate-ai.github.io/PhysHorizon/getting-started/installation/) for source,
50
+ wheel, platform, cache, and troubleshooting instructions.
51
+
52
+ ## Your first checked theorem
53
+
54
+ No physical parameter values or tolerance are needed to check a universal
55
+ statement. This example checks that two absolute-error bounds compose by the
56
+ triangle inequality.
57
+
58
+ ```python
59
+ from physhorizon import evaluate, installed_index, replay
60
+
61
+ index = installed_index()
62
+ bundle = index.prepare("core.certified_theorems/scalar_triangle", {})
63
+ assessment = evaluate(bundle)
64
+ print(assessment["overall"])
65
+ print(replay(bundle, assessment)["verdict"])
66
+ ```
67
+
68
+ With the backend ready, assessment and replay pass. A process exit code or
69
+ resource search hit alone is not a mathematical certificate.
70
+
71
+ ```sh
72
+ physhorizon resources "quadratic closure" --kind theorem
73
+ physhorizon describe mechanics.newton_particle/inertial_motion
74
+ ```
75
+
76
+ Continue with [your first theorem](https://scimate-ai.github.io/PhysHorizon/tutorials/first-theorem/),
77
+ [models and Horizons](https://scimate-ai.github.io/PhysHorizon/tutorials/model-and-horizon/), and
78
+ [missing premises](https://scimate-ai.github.io/PhysHorizon/tutorials/reuse/).
79
+
80
+ ## What is implemented
81
+
82
+ - Immutable, content-bound scenarios, model contexts, claims, and evidence DAGs.
83
+ - Exact rational inputs and explicit units; unknown values stay unknown.
84
+ - Multi-step Horizon links with checked domains, observations, and error contracts.
85
+ - Actual Lean type, kernel, and transitive-axiom checks for supported statements.
86
+ - 406 universal theorem templates, including 370 mechanics templates.
87
+ - Newtonian particles, frames, rigid bodies, analytical mechanics, finite-particle
88
+ moment projection, and several exact model builders.
89
+ - Supported Poisson candidates, meshes, residual estimates, and stored ReLU
90
+ candidates with continuous error guarantees.
91
+ - Explicit resource discovery and premise matching for programmatic reuse.
92
+
93
+ These are bounded capabilities. General relativity, all of physics, arbitrary
94
+ natural-language problem solving, and universal solver certification are not
95
+ implemented. PhysHorizon does not include an agent or autonomous planning loop.
96
+
97
+ ## Build with the community
98
+
99
+ Start with [CONTRIBUTING.md](https://github.com/SciMate-AI/PhysHorizon/blob/main/CONTRIBUTING.md), the
100
+ [contribution map](https://scimate-ai.github.io/PhysHorizon/contributing/contribution-map/), and the
101
+ [external extension example](https://github.com/SciMate-AI/PhysHorizon/tree/main/examples/community_package).
102
+ Contribute a reviewable semantic component rather than waiting for an entire
103
+ textbook or discipline to be formalized.
104
+
105
+ The project separates discoverability from proof, source facts from model
106
+ assumptions, and a candidate result from a certified conclusion. Textbook
107
+ citations are optional; input provenance and exact proof-artifact binding are not.
108
+
109
+ ## Develop and test
110
+
111
+ ```sh
112
+ python -m pip install -e '.[dev,docs]'
113
+ python -m unittest discover -s tests -v
114
+ python tools/check_design.py
115
+ python tools/check_release.py
116
+ mkdocs serve
117
+ ```
118
+
119
+ For the actual-backend suite:
120
+
121
+ ```sh
122
+ physhorizon setup-lean
123
+ PHYSHORIZON_REQUIRE_LEAN=1 python -m unittest discover -s tests -v
124
+ python tools/check_lean.py
125
+ ```
126
+
127
+ The [English documentation](https://scimate-ai.github.io/PhysHorizon/) and
128
+ [public architecture guide](https://scimate-ai.github.io/PhysHorizon/reference/architecture/) describe current
129
+ interfaces. Historical specifications remain in [spec.md](https://github.com/SciMate-AI/PhysHorizon/blob/main/spec.md) and
130
+ [architecture.md](https://github.com/SciMate-AI/PhysHorizon/blob/main/architecture.md); progress entries are historical records.
131
+
132
+ ## License and citation
133
+
134
+ Original contributions use [Apache-2.0](https://github.com/SciMate-AI/PhysHorizon/blob/main/LICENSE). Dependencies retain their own
135
+ licenses. Textbook scans and caches are excluded from release artifacts. See
136
+ [NOTICE](https://github.com/SciMate-AI/PhysHorizon/blob/main/NOTICE), [GOVERNANCE.md](https://github.com/SciMate-AI/PhysHorizon/blob/main/GOVERNANCE.md), and [CITATION.cff](https://github.com/SciMate-AI/PhysHorizon/blob/main/CITATION.cff).
137
+ No paper or DOI is claimed before publication.
@@ -0,0 +1,147 @@
1
+ module
2
+
3
+ public import PhysHorizon.Canonical
4
+ public import Mathlib.Analysis.SpecialFunctions.Integrals.Basic
5
+ public import Mathlib.Analysis.SpecialFunctions.Sqrt
6
+ set_option autoImplicit false
7
+ set_option maxHeartbeats 2000000
8
+ @[expose] public section
9
+ namespace PhysHorizon.ActionAngle
10
+ noncomputable section
11
+ open PhysHorizon.Newton PhysHorizon.Canonical Matrix
12
+
13
+ def oscillator (m w : ℝ) : Observable 1 where
14
+ value z := (z.2 0)^2/(2*m)+(m*w^2/2)*(z.1 0)^2
15
+ dq z := ![m*w^2*z.1 0]
16
+ dp z := ![z.2 0/m]
17
+ derivative z := by
18
+ have hq := (ContinuousLinearMap.proj (0:Fin 1) : Vec 1 →L[ℝ] ℝ).hasFDerivAt.comp z hasFDerivAt_fst
19
+ have hp := (ContinuousLinearMap.proj (0:Fin 1) : Vec 1 →L[ℝ] ℝ).hasFDerivAt.comp z hasFDerivAt_snd
20
+ convert ((hp.pow 2).mul_const (1/(2*m))).add ((hq.pow 2).const_mul (m*w^2/2)) using 1
21
+ · funext y; dsimp; ring
22
+ · apply ContinuousLinearMap.ext
23
+ intro v
24
+ simp [differential_apply,Fin.sum_univ_succ]
25
+ ring
26
+
27
+ /-- The chart is defined on positive action, with a chosen real angle lift.
28
+ It is locally canonical; the periodic angle is not a global real coordinate. -/
29
+ def chart (scale : ℝ) (z : Phase 1) : Phase 1 :=
30
+ (![Real.sqrt (2*z.2 0)/scale*Real.sin (z.1 0)],
31
+ ![Real.sqrt (2*z.2 0)*scale*Real.cos (z.1 0)])
32
+
33
+ def chartDifferential (scale : ℝ) (z : Phase 1) : Phase 1 →L[ℝ] Phase 1 :=
34
+ ContinuousLinearMap.pi (fun _ : Fin 1 =>
35
+ (Real.sqrt (2*z.2 0)/scale*Real.cos (z.1 0)) •
36
+ ((ContinuousLinearMap.proj (0:Fin 1)).comp (ContinuousLinearMap.fst ℝ (Vec 1) (Vec 1)))+
37
+ (Real.sin (z.1 0)/(scale*Real.sqrt (2*z.2 0))) •
38
+ ((ContinuousLinearMap.proj (0:Fin 1)).comp (ContinuousLinearMap.snd ℝ (Vec 1) (Vec 1)))) |>.prod
39
+ (ContinuousLinearMap.pi (fun _ : Fin 1 =>
40
+ (-Real.sqrt (2*z.2 0)*scale*Real.sin (z.1 0)) •
41
+ ((ContinuousLinearMap.proj (0:Fin 1)).comp (ContinuousLinearMap.fst ℝ (Vec 1) (Vec 1)))+
42
+ (scale*Real.cos (z.1 0)/Real.sqrt (2*z.2 0)) •
43
+ ((ContinuousLinearMap.proj (0:Fin 1)).comp (ContinuousLinearMap.snd ℝ (Vec 1) (Vec 1)))))
44
+
45
+ theorem chart_derivative (scale : ℝ) (z : Phase 1) (positive : 0<z.2 0) :
46
+ HasFDerivAt (chart scale) (chartDifferential scale z) z := by
47
+ have ht := (ContinuousLinearMap.proj (0:Fin 1) : Vec 1 →L[ℝ] ℝ).hasFDerivAt.comp z hasFDerivAt_fst
48
+ have hj := (ContinuousLinearMap.proj (0:Fin 1) : Vec 1 →L[ℝ] ℝ).hasFDerivAt.comp z hasFDerivAt_snd
49
+ have hr := (hj.const_mul 2).sqrt (by positivity : (2:ℝ)*z.2 0 ≠ 0)
50
+ have hq := hasFDerivAt_pi.mpr (fun _ : Fin 1 => (hr.mul_const (1/scale)).mul ht.sin)
51
+ have hp := hasFDerivAt_pi.mpr (fun _ : Fin 1 => (hr.const_mul scale).mul ht.cos)
52
+ convert hq.prodMk hp using 1
53
+ · funext y; apply Prod.ext <;> ext i <;> fin_cases i <;> dsimp [chart] <;> ring
54
+ · apply ContinuousLinearMap.ext
55
+ intro v
56
+ apply Prod.ext <;> ext i <;> fin_cases i <;>
57
+ simp only [chartDifferential,ContinuousLinearMap.prod_apply,ContinuousLinearMap.pi_apply,
58
+ add_apply,smul_apply,ContinuousLinearMap.comp_apply,ContinuousLinearMap.proj_apply,
59
+ ContinuousLinearMap.coe_fst,ContinuousLinearMap.coe_snd,smul_eq_mul,Function.comp_apply] <;> ring
60
+
61
+ theorem chart_symplectic (scale : ℝ) (nonzero : scale ≠ 0) (z : Phase 1)
62
+ (positive : 0<z.2 0) (u v : Phase 1) :
63
+ omega (chartDifferential scale z u) (chartDifferential scale z v)=omega u v := by
64
+ have hr : Real.sqrt (2*z.2 0) ≠ 0 := ne_of_gt (Real.sqrt_pos.mpr (by positivity))
65
+ have trig := Real.sin_sq_add_cos_sq (z.1 0)
66
+ dsimp [omega,chartDifferential,dotProduct]
67
+ simp only [Fin.sum_univ_succ,Fin.sum_univ_zero,add_zero]
68
+ simp only [add_apply,smul_apply,ContinuousLinearMap.comp_apply,
69
+ ContinuousLinearMap.proj_apply,ContinuousLinearMap.coe_fst,ContinuousLinearMap.coe_snd,
70
+ smul_eq_mul,Function.comp_apply]
71
+ change (Real.sqrt (2*z.2 0)/scale*Real.cos (z.1 0)*u.1 0+
72
+ Real.sin (z.1 0)/(scale*Real.sqrt (2*z.2 0))*u.2 0)*
73
+ (-Real.sqrt (2*z.2 0)*scale*Real.sin (z.1 0)*v.1 0+
74
+ scale*Real.cos (z.1 0)/Real.sqrt (2*z.2 0)*v.2 0)-
75
+ (-Real.sqrt (2*z.2 0)*scale*Real.sin (z.1 0)*u.1 0+
76
+ scale*Real.cos (z.1 0)/Real.sqrt (2*z.2 0)*u.2 0)*
77
+ (Real.sqrt (2*z.2 0)/scale*Real.cos (z.1 0)*v.1 0+
78
+ Real.sin (z.1 0)/(scale*Real.sqrt (2*z.2 0))*v.2 0)=_
79
+ field_simp [hr,nonzero]
80
+ <;> linear_combination (u.1 0*v.2 0-u.2 0*v.1 0)*Real.sqrt (2*z.2 0)^2*trig
81
+
82
+ theorem energy_action (m w : ℝ) (positiveM : 0<m) (positiveW : 0<w)
83
+ (z : Phase 1) (positiveJ : 0≤z.2 0) :
84
+ (oscillator m w).value (chart (Real.sqrt (m*w)) z)=w*z.2 0 := by
85
+ have hs := Real.sq_sqrt (mul_nonneg positiveM.le positiveW.le)
86
+ have hr := Real.sq_sqrt (mul_nonneg (by norm_num : (0:ℝ)≤2) positiveJ)
87
+ have hn : Real.sqrt (m*w) ≠ 0 := ne_of_gt (Real.sqrt_pos.mpr (mul_pos positiveM positiveW))
88
+ have trig := Real.sin_sq_add_cos_sq (z.1 0)
89
+ change (Real.sqrt (2*z.2 0)*Real.sqrt (m*w)*Real.cos (z.1 0))^2/(2*m)+
90
+ (m*w^2/2)*(Real.sqrt (2*z.2 0)/Real.sqrt (m*w)*Real.sin (z.1 0))^2=w*z.2 0
91
+ simp only [mul_pow,div_pow,hs,hr]
92
+ field_simp [positiveM.ne',positiveW.ne']
93
+ linear_combination z.2 0*trig
94
+
95
+ /-- The actual time-parameterized oscillator generated by constant action. -/
96
+ def path (m w J phase : ℝ) : Curve 1 where
97
+ point t := chart (Real.sqrt (m*w)) (![phase+w*t],![J])
98
+ tangent t :=
99
+ (![Real.sqrt (2*J)/Real.sqrt (m*w)*w*Real.cos (phase+w*t)],
100
+ ![-Real.sqrt (2*J)*Real.sqrt (m*w)*w*Real.sin (phase+w*t)])
101
+ derivative t := by
102
+ apply HasDerivAt.prodMk <;> apply hasDerivAt_pi.mpr <;> intro i <;> fin_cases i
103
+ · convert (((hasDerivAt_id t).const_mul w).const_add phase).sin.const_mul
104
+ (Real.sqrt (2*J)/Real.sqrt (m*w)) using 1
105
+ · rfl
106
+ · simp; ring
107
+ · convert (((hasDerivAt_id t).const_mul w).const_add phase).cos.const_mul
108
+ (Real.sqrt (2*J)*Real.sqrt (m*w)) using 1
109
+ · rfl
110
+ · simp; ring
111
+
112
+ theorem path_hamilton (m w J phase : ℝ) (positiveM : 0<m) (positiveW : 0<w) :
113
+ HamiltonOn (oscillator m w) (path m w J phase) Set.univ := by
114
+ intro t _
115
+ have hn : Real.sqrt (m*w) ≠ 0 := ne_of_gt (Real.sqrt_pos.mpr (mul_pos positiveM positiveW))
116
+ have hs := Real.sq_sqrt (mul_nonneg positiveM.le positiveW.le)
117
+ apply Prod.ext <;> ext i <;> fin_cases i
118
+ · change Real.sqrt (2*J)/Real.sqrt (m*w)*w*Real.cos (phase+w*t)=
119
+ Real.sqrt (2*J)*Real.sqrt (m*w)*Real.cos (phase+w*t)/m
120
+ field_simp [hn,positiveM.ne']
121
+ rw [hs]
122
+ ring
123
+ · change -Real.sqrt (2*J)*Real.sqrt (m*w)*w*Real.sin (phase+w*t)=
124
+ -(m*w^2*(Real.sqrt (2*J)/Real.sqrt (m*w)*Real.sin (phase+w*t)))
125
+ field_simp [hn]
126
+ rw [hs]
127
+ ring
128
+
129
+ /-- The action really equals (2*pi)^(-1) times the p dq contour integral. -/
130
+ theorem contour_action (scale J : ℝ) (nonzero : scale ≠ 0) (positive : 0≤J) :
131
+ (∫ theta in (0:ℝ)..2*Real.pi,
132
+ (chart scale (![theta],![J])).2 0*
133
+ (Real.sqrt (2*J)/scale*Real.cos theta))=2*Real.pi*J := by
134
+ have hr := Real.sq_sqrt (mul_nonneg (by norm_num : (0:ℝ)≤2) positive)
135
+ have hf (theta : ℝ) : (chart scale (![theta],![J])).2 0*
136
+ (Real.sqrt (2*J)/scale*Real.cos theta)=2*J*(Real.cos theta)^2 := by
137
+ change (Real.sqrt (2*J)*scale*Real.cos theta)*
138
+ (Real.sqrt (2*J)/scale*Real.cos theta)=2*J*(Real.cos theta)^2
139
+ field_simp [nonzero]
140
+ linear_combination (Real.cos theta)^2*hr
141
+ simp_rw [hf]
142
+ rw [intervalIntegral.integral_const_mul,integral_cos_sq]
143
+ simp
144
+ <;> ring
145
+
146
+ end
147
+ end PhysHorizon.ActionAngle