From 45a4b80a3d44f054a471cd417c7c2698f4770599 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Tue, 10 Nov 2026 09:13:35 +0100 Subject: proofs: Lean transcriptions + flaw-finding, with a Rust referee Gipfel.lean verifies the structural invariants (mark_duplicates keeps hill indices stable). GipfelFind.lean hunts flaws: exact Int model for the general fact, Float grid search for concrete IEEE witnesses, every witness re-checked against the real code by rust-check/. Findings: 1 fixed on master (is_visible azimuth wrap), 2 proven benign via project_point (all witnesses NaN via 0*inf; residual near-zero denominators documented), 3 open but cosmetic, 4 already handled by the stitch caller. GipfelMathlib.lean.txt stays an unchecked sketch, kept as .txt so it cannot pass for a verified artifact. Verified from this location: lean checks both files clean, rust-check runs against the workspace gipfel-core via path dependency. --- proofs/rust-check/src/bin/f1.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 proofs/rust-check/src/bin/f1.rs (limited to 'proofs/rust-check/src/bin/f1.rs') diff --git a/proofs/rust-check/src/bin/f1.rs b/proofs/rust-check/src/bin/f1.rs new file mode 100644 index 0000000..5259939 --- /dev/null +++ b/proofs/rust-check/src/bin/f1.rs @@ -0,0 +1,10 @@ +use gipfel_core::panorama::Panorama; +fn main() { + let mut p = Panorama::new(); + p.set_center_angle(400.0); // "bearing + full turn" input slip + println!("az=400°: hill at alph=-180° (220° off, behind) visible? {}", p.is_visible(-std::f64::consts::PI)); + println!("az=NaN: visible? {}", p.is_visible(f64::NAN)); + println!("az=inf: visible? {}", p.is_visible(f64::INFINITY)); + p.set_center_angle(f64::NAN); + println!("center=NaN: everything visible? {}", p.is_visible(0.0)); +} -- cgit v1.2.3