-
Notifications
You must be signed in to change notification settings - Fork 0
Claude/clone gift framework branch qanyl #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Python Package Restructuring: - constants/ subpackage: algebra.py, topology.py, structural.py, physics.py, cosmology.py - Clean separation of concerns, each file < 150 lines - TCS building blocks (M1_B2, M1_B3, M2_B2, M2_B3) now exported New Modules: - roots.py: E8 root system with 240 actual vectors in R^8 - D8_ROOTS (112), HALF_INTEGER_ROOTS (128) - E8_SIMPLE_ROOTS (Bourbaki convention) - weyl_reflection, is_root, is_in_E8_lattice - E8_CARTAN_MATRIX, root_statistics() - fano.py: Fano plane and G2 cross product - FANO_LINES (7 lines), EPSILON tensor - cross_product(u, v) in R^7 - verify_lagrange_identity() - octonion_multiply_imaginaries() - verify.py: Verification module - verify() - quick check all relations - verify_all() - detailed results - print_verification_report() - visualize.py: Optional visualization (requires matplotlib) - plot_fano() - Fano plane diagram - plot_e8_projection() - E8 roots 2D projection - plot_dynkin_e8() - Dynkin diagram Refactored __init__.py: - 242 lines (was 448) - Clean imports from constants/ - New modules exposed at top level - Backward compatibility maintained Tests: - test_v32_features.py: Comprehensive tests for all new features
- E8 Root System: 240 vectors in R^8, simple roots, Cartan matrix - Fano Plane & G2 Cross Product: octonion multiplication, Lagrange identity - Verification Module: verify(), verify_all(), print_verification_report() - Visualization: plot_fano(), plot_e8_projection(), plot_dynkin_e8()
Add missing exports that broke tests after v3.2 restructuring: - PROVEN_RELATIONS, get_relation, ProvenRelation from relations.py - VISIBLE_DIM, HIDDEN_DIM - ALPHA_SQ_LEPTON_A/B, ALPHA_SQ_UP_A/B, ALPHA_SQ_DOWN_A/B - ALPHA_SUM_A/B, ALPHA_PROD_A/B - DUALITY_GAP_FROM_COLOR Fixes test_relations.py, test_v2_sequences.py, test_yukawa_duality.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on February 1
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| names = list(constants.keys()) | ||
| values = list(constants.values()) | ||
|
|
||
| colors = plt.cm.viridis(np.linspace(0.2, 0.8, len(names))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing numpy availability check causes runtime error
The plot_gift_constants function only calls _check_matplotlib() but then uses np.linspace on line 350 without first verifying numpy is available. If matplotlib is installed but numpy is not, np will be None (set at module level when the import fails), and calling np.linspace will raise an AttributeError. The similar function plot_e8_projection correctly calls both _check_matplotlib() and _check_numpy(), but this function is missing the numpy check.
Restore constants required by test_relations.py and test_topological_extension.py: physics.py: - ALPHA_S_SQ_NUM/DENOM, ALPHA_S_SQUARED_NUM/DEN - ALPHA_INV_ALGEBRAIC, ALPHA_INV_BULK - DELTA_PENTAGONAL_DENOM - THETA_23_NUM/DEN, THETA_12_RATIO_FACTOR - LAMBDA_H_SQ_NUM/DEN - TAU_NUM_VALUE, TAU_DEN_VALUE, TAU_NUM_BASE13, to_base_13() structural.py: - ALPHA_SQ_B_SUM, WEYL_E8_FORMULA - DIM_F4_FROM_STRUCTURE_B, KAPPA_T_INV_FROM_F4 - B2_BASE_DECOMPOSITION, B3_INTERMEDIATE/BASE - H_STAR_INTERMEDIATE/BASE, QUOTIENT_SUM - N_OBSERVABLES, E6_DUAL_OBSERVABLES cosmology.py: - OMEGA_DE_PRODUCT All 25 test failures should now pass.
| ) | ||
| except ImportError: | ||
| fib = lucas = None | ||
| FIBONACCI_GIFT = LUCAS_GIFT = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing fallback assignments for sequences module imports
Medium Severity
When the sequences module fails to import, fibonacci_index and lucas_index are not assigned fallback values in the except block, even though they were part of the import statement. The except block only sets fib, lucas, FIBONACCI_GIFT, and LUCAS_GIFT to None. If the import fails, accessing gift_core.fibonacci_index or gift_core.lucas_index will raise an AttributeError. Compare with the analysis module (lines 205-215) which correctly assigns None to all imported names.
| prime_expression, is_gift_prime, | ||
| ) | ||
| except ImportError: | ||
| TIER1_PRIMES = TIER2_PRIMES = TIER3_PRIMES = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing fallback assignments for primes module imports
Medium Severity
When the primes module fails to import, prime_expression and is_gift_prime are not assigned fallback values in the except block, even though they were part of the import statement. The except block only sets TIER1_PRIMES, TIER2_PRIMES, and TIER3_PRIMES to None. If the import fails, accessing gift_core.prime_expression or gift_core.is_gift_prime will raise an AttributeError.
Note
Major v3.2 release with new algebraic/topological features, module reorg, visualization, and verification.
gift_core.constantspackage split intoalgebra,topology,structural,physics,cosmology; updated__init__.pyexports and legacy aliasesgift_core.rootswith 240 explicitE8_ROOTS,E8_SIMPLE_ROOTS,E8_CARTAN_MATRIX, lattice checks, Weyl reflections, and statsgift_core.fanoprovidingFANO_LINES,epsilon, 7Dcross_product,phi0, octonion multiplication, and property checksgift_core.verifywithverify,verify_all,verify_summary, and formatted reports for certified relationsgift_core.visualize(matplotlib/numpy optional) to plot Fano plane, E8 projections, Dynkin diagram, and constantsM1_*,M2_*) derivingB2,B3,H_STAR; additional derived invariants and identities (e.g., Weyl triple, PSL(2,7))docs/USAGE.mdwith Quick Start, new APIs, verification and visualization examplestests/test_v32_features.pycovering TCS derivations, Weyl/PSL identities, E8 roots, Fano cross product, and verificationWritten by Cursor Bugbot for commit f0842a7. This will update automatically on new commits. Configure here.