Skip to content

Conversation

@gift-framework
Copy link
Owner

@gift-framework gift-framework commented Jan 6, 2026

Note

Major v3.2 release with new algebraic/topological features, module reorg, visualization, and verification.

  • Restructure: New gift_core.constants package split into algebra, topology, structural, physics, cosmology; updated __init__.py exports and legacy aliases
  • E8 Roots: Adds gift_core.roots with 240 explicit E8_ROOTS, E8_SIMPLE_ROOTS, E8_CARTAN_MATRIX, lattice checks, Weyl reflections, and stats
  • Fano/G2: Adds gift_core.fano providing FANO_LINES, epsilon, 7D cross_product, phi0, octonion multiplication, and property checks
  • Verification: New gift_core.verify with verify, verify_all, verify_summary, and formatted reports for certified relations
  • Visualization: New gift_core.visualize (matplotlib/numpy optional) to plot Fano plane, E8 projections, Dynkin diagram, and constants
  • Topology updates: TCS building blocks (M1_*, M2_*) deriving B2, B3, H_STAR; additional derived invariants and identities (e.g., Weyl triple, PSL(2,7))
  • Docs: Expanded docs/USAGE.md with Quick Start, new APIs, verification and visualization examples
  • Tests: New tests/test_v32_features.py covering TCS derivations, Weyl/PSL identities, E8 roots, Fano cross product, and verification

Written by Cursor Bugbot for commit f0842a7. This will update automatically on new commits. Configure here.

claude added 3 commits January 6, 2026 16:36
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
Copy link

@cursor cursor bot left a 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)))
Copy link

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.

Fix in Cursor Fix in Web

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
Copy link

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.

Fix in Cursor Fix in Web

prime_expression, is_gift_prime,
)
except ImportError:
TIER1_PRIMES = TIER2_PRIMES = TIER3_PRIMES = None
Copy link

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.

Fix in Cursor Fix in Web

@gift-framework gift-framework merged commit c956e23 into main Jan 6, 2026
7 checks passed
@gift-framework gift-framework deleted the claude/clone-gift-framework-branch-Qanyl branch January 6, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants