summaryrefslogtreecommitdiff
path: root/proofs/rust-check/src/bin/f1.rs
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2026-11-10 09:13:35 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2026-11-10 09:13:35 +0100
commit45a4b80a3d44f054a471cd417c7c2698f4770599 (patch)
tree7785b86ed5a6999202c39616936556d8982d49f1 /proofs/rust-check/src/bin/f1.rs
parent0b0663e0c9dc664f35ffead3b395ffd2009fd98c (diff)
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.
Diffstat (limited to 'proofs/rust-check/src/bin/f1.rs')
-rw-r--r--proofs/rust-check/src/bin/f1.rs10
1 files changed, 10 insertions, 0 deletions
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));
+}