MindFormal v1.0.0One Mind

MindFormal.Example.LeadConfidence.NativeContact

theorem MindFormal.LeadConfidence.native_pair_contact {N n : ℕ} {T : Type u_1} {Λ : Type u_2} [Fintype T] [Fintype Λ] (G : PhysicalGlobalData N n T Λ) (H : NNReal) (fav riv : Fin N) (a : ℝ) {t : ℝ} {w : Fin N} (read : ∀ t ∈ Set.Icc 0 ↑H, ∀ i ∈ {fav, riv}, 0 ≤ (G.reads.guards false) (G.realPath t) i ↔ a ≤ mindActivity (G.state t) i) (others : ∀ s ∈ Set.Icc 0 t, ∀ i ∉ {fav, riv}, (G.reads.guards false) (G.realPath s) i < 0) (start : ∀ i ∈ {fav, riv}, mindActivity (G.state 0) i < a) (event : ((G.native (↑H) false).search 0).event = some (t, w)) :
w ∈ {fav, riv} ∧ mindActivity (G.state t) w = a ∧ ∀ i ∈ {fav, riv}, mindActivity (G.state t) i ≤ a

At the actual first native answer, common activity qualification gives contact with the bar and leaves the rival below it. Every other output is excluded by its actual guard, and the actual initial release is used.

theorem MindFormal.LeadConfidence.native_lead_faces {xf xr a : ℝ} (contact : xf = a ∨ xr = a) (hf : xf ≤ a) (hr : xr ≤ a) :
max xf xr = a ∧ max xf xr - min xf xr = |xf - xr| ∧ (xf = a → xf - xr ≥ 0) ∧ (xr = a → xf - xr ≤ 0)

The native lead reads the magnitude of correct-minus-wrong activation; its sign distinguishes the winner except for the explicitly retained tie.