Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Example: Theorem Validation Demo

Crate: kwavers
Run: cargo run -p kwavers --example theorem_validation_demo
Source: crates/kwavers/examples/theorem_validation_demo.rs

What This Example Demonstrates

This example runs the theorem-validation machinery over the mathematical claims encoded in kwavers. It generates both a compact pass-rate summary and a more detailed report suitable for inspection or debugging.

ComponentAPIValue
ValidatorTheoremValidatorOwns the validation suite and report-generation helpers
Result typeTheoremValidationCaptures theorem-by-theorem success state and quantitative bounds
Reportinggenerate_validation_reportBuilds a human-readable validation report after the suite runs

Key Code Snippet

let validations = validator.run_comprehensive_validation();

println!("Validated {} mathematical theorems", validations.len());

// Display results
display_validation_results(&validations);

// Generate detailed report
let report = validator.generate_validation_report(&validations);
println!("\n{}", report);

Expected Output (if applicable)

The output includes a theorem-count summary, a passed/failed breakdown, detailed per-theorem lines, and a generated report.

Book Chapter

← Validation and Benchmarking