-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Overview
Complete the implementation of CDT property validation methods in src/cdt/triangulation.rs.
Background
The validate_cdt_properties() method currently has skeleton implementations for three critical validation checks that need to be completed:
- Topology validation (
validate_topology()) - Causality constraints (
validate_causality()) - Foliation consistency (
validate_foliation())
Implementation Details
1. Topology Validation (validate_topology())
Current state: Basic Euler characteristic check for 2D triangulations
Needs:
- Boundary detection to determine expected Euler characteristic
- Dimension-specific topology validation (currently only handles 2D)
- Support for different manifold topologies (sphere, torus, etc.)
- Validation of genus consistency
Reference: Lines 212-234 in src/cdt/triangulation.rs
2. Causality Validation (validate_causality())
Current state: Placeholder that always succeeds
Needs:
- Time slice assignment for each vertex
- Edge classification (timelike vs spacelike)
- Verification that timelike edges only connect adjacent time slices
- Detection of closed timelike curves (cycles in the timelike subgraph)
- Validation that causal structure is acyclic
Reference: Lines 236-256 in src/cdt/triangulation.rs
3. Foliation Validation (validate_foliation())
Current state: Placeholder that always succeeds
Needs:
- Vertex time label storage in geometry backend
- Verification that all vertices have valid time labels (0 to time_slices-1)
- Check that each time slice contains at least one vertex
- Validation of spatial topology consistency across slices
- Verification that spatial slices have the same genus
Reference: Lines 258-279 in src/cdt/triangulation.rs
Dependencies
- May require extending the
TriangulationMuttrait to expose time slice information - May need to add vertex attribute storage to backends
- Consider adding a
FoliationInfostructure to track time slice data
Testing Requirements
Each validation method should have:
- Unit tests for valid triangulations
- Unit tests for invalid cases (should return appropriate errors)
- Integration tests with actual CDT moves
- Property-based tests using Kani for formal verification
Related Code
src/cdt/triangulation.rs: Lines 183-204 (main validation method)src/errors.rs: Error types (may need new variants)src/geometry/traits.rs: Trait definitions (may need extensions)
Acceptance Criteria
- All three validation methods have complete implementations
- Appropriate error types are returned for validation failures
- Unit tests cover both valid and invalid cases
- Documentation explains the validation criteria
- Integration tests verify validation works with ergodic moves
- Consider Kani proofs for critical properties