AFTD Auto-Formalizing Theoretical Domains

Cslib.MachineLearning.PACLearning.hypothesisError_eq_add

theoremverifiedformalizationimported Lean

The total hypothesis error decomposes as the sum of false positive and false negative errors, since h ∆ c = (h \ c) ∪ (c \ h) is a disjoint union.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open MeasureTheory Set in
open scoped ENNReal NNReal in
variable {α : Type*} [MeasurableSpace α] in
theorem Cslib.MachineLearning.PACLearning.hypothesisError_eq_add {P : Measure α} {h c : Set α}
    (hh : MeasurableSet h) (hc : MeasurableSet c) :
    hypothesisError P h c = falsePositiveError P h c + falseNegativeError P h c
Formalizes
CSLib, `Cslib.MachineLearning.PACLearning.hypothesisError_eq_add`
Lean proof
By Samuel Schlesinger, from github.com/leanprover/cslib at 3951377e5a3f (Copyright (c) 2026 Samuel Schlesinger. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.33.0.
Verified
08 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 3

Lean source view module on GitHub

set_option autoImplicit true inset_option relaxedAutoImplicit true inopen MeasureTheory Set inopen scoped ENNReal NNReal invariable {α : Type*} [MeasurableSpace α] in/-- The total hypothesis error decomposes as the sum of false positive and false negative errors, since `h ∆ c = (h \ c) ∪ (c \ h)` is a disjoint union. -/theorem Cslib.MachineLearning.PACLearning.hypothesisError_eq_add {P : Measure α} {h c : Set α}    (hh : MeasurableSet h) (hc : MeasurableSet c) :    hypothesisError P h c = falsePositiveError P h c + falseNegativeError P h c := by  simp only [hypothesisError, falsePositiveError, falseNegativeError, symmDiff_def, sup_eq_union]  exact measure_union disjoint_sdiff_sdiff (hc.diff hh)
See it in the graphDiscuss this resultChallenge it