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.Cslib.MachineLearning.PACLearning.hypothesisError_eq_add← Cslib.MachineLearning.PACLearning.hypothesisError_eq_add (Cslib/MachineLearning/PACLearning/Defs.lean:499): verbatim
- Verified
- 08 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 3
- Cslib.MachineLearning.PACLearning.falsePositiveErrorThe *false positive error*
P(h \ c)— points classified positive but not in the concept. - Cslib.MachineLearning.PACLearning.falseNegativeErrorThe *false negative error*
P(c \ h)— points in the concept but classified negative. - Cslib.MachineLearning.PACLearning.hypothesisErrorThe *symmetric-difference error* of a hypothesis
hwith respect to a target conceptc(both viewed as subsets ofα) under…
- Cslib.MachineLearning.PACLearning.falsePositiveErrorThe *false positive error*
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
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)