The removal rule for a prediction already in the list

Lax303562.Removal · concepts/Lax303562/Removal.lean · lax-303562

proven

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Theorem

    The mirror image of the inclusion rule. A prediction already in the list contributes pjp · j to the numerator (probability pp of being matched, IoU jj when it is) and exactly ½½ to the denominator in both cases: removing a matched one turns a true positive into a false negative (net ½−½), removing an unmatched one deletes a false positive (½−½). The score after removal is the exact quotient pqWithoutPredictionpqWithoutPrediction.

    Removing the prediction raises the Panoptic Quality if and only if its contribution is below half the current score. The hypothesis ½<dennfpfn½ < den n fp fn says that something remains after the removal, so the new denominator is positive. The last statement closes the circuit with CandidateCandidate: removing what inclusion added returns the original score.

    Concept map
    2 concepts
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A
    Evidence

    This concept declares 4 statements. Each proof establishes one of them relative to its assumptions.

    1 le_of_above proven

    2 lt_of_below proven

    3 removal_iff proven

    4 removal_inverts_inclusion proven

    Lean source view on GitHub

    1import Lax303562.PanopticQuality
    2
    3/-!
    4---
    5title: The removal rule for a prediction already in the list
    6type: theorem
    7---
    8The mirror image of the inclusion rule. A prediction already in the list
    9contributes `p · j` to the numerator (probability `p` of being matched, IoU `j`
    10when it is) and exactly `½` to the denominator in both cases: removing a matched
    11one turns a true positive into a false negative (net `−½`), removing an unmatched
    12one deletes a false positive (`−½`). The score after removal is the exact
    13quotient `pqWithoutPrediction`.
    14
    15Removing the prediction raises the Panoptic Quality if and only if its
    16contribution is below half the current score. The hypothesis `½ < den n fp fn`
    17says that something remains after the removal, so the new denominator is
    18positive. The last statement closes the circuit with `Candidate`: removing what
    19inclusion added returns the original score.
    20-/
    21
    22namespace Lax303562.Removal
    23
    24open Lax303562.PanopticQuality
    25
    26/-- The Panoptic Quality after removing a prediction that contributed `p · j` to
    27the numerator and `½` to the denominator. -/
    28noncomputable def pqWithoutPrediction (s p j : ℝ) (n fp fn : ℕ) : ℝ :=
    29 (s - p * j) / (den n fp fn - 1 / 2)
    30
    31/-- Removing the prediction raises the score if and only if `p · j < PQ / 2`. -/
    32axiom removal_iff (s p j : ℝ) (n fp fn : ℕ) (hd : 1 / 2 < den n fp fn) :
    33 pq s n fp fn < pqWithoutPrediction s p j n fp fn ↔ p * j < pq s n fp fn / 2
    34
    35/-- Below the threshold, removal raises the score. -/
    36axiom lt_of_below (s p j : ℝ) (n fp fn : ℕ) (hd : 1 / 2 < den n fp fn)
    37 (h : p * j < pq s n fp fn / 2) : pq s n fp fn < pqWithoutPrediction s p j n fp fn
    38
    39/-- At or above the threshold, removal does not raise the score. -/
    40axiom le_of_above (s p j : ℝ) (n fp fn : ℕ) (hd : 1 / 2 < den n fp fn)
    41 (h : pq s n fp fn / 2 ≤ p * j) : pqWithoutPrediction s p j n fp fn ≤ pq s n fp fn
    42
    43/-- Inclusion followed by removal of the same prediction returns the original
    44score. -/
    45axiom removal_inverts_inclusion (s p j : ℝ) (n fp fn : ℕ) :
    46 (s + p * j - p * j) / (den n fp fn + 1 / 2 - 1 / 2) = pq s n fp fn
    47
    48end Lax303562.Removal
    49
    Show ProofShow ProofShow ProofShow Proof
    Builds on
    Used by

    none

    From Mathlib

    none

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…