Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

List counts of individually and jointly holdable pairs

Definition
APFPaper1_RegulationCounts

by FiniteUniverse · Nov 13, 2026 · Mathlib 0df444a (Lean v4.33.1)

apfapf-referencesib-v15-2026-11

List counts of individually and jointly holdable pairs. Premises: Classical decisions of supplied existential predicates; repeated list elements count repeatedly. Scope: Counts exact occurrences in supplied list, not distinct disturbances or a probability distribution.

Representation and scope. Counts exact occurrences in supplied list, not distinct disturbances or a probability distribution.

Supplied data or hypotheses. Classical decisions of supplied existential predicates; repeated list elements count repeatedly.

This is conditional reference mathematics. The supplied model and its hypotheses are not adopted Foundation inputs, and this node does not establish K1 or K3 closure.

Definition code
/-
APF Foundation Ledger — definition node DRAFT (session EthanBrooke-01WrrBvu, 2026-11-12; not gated, not reviewed)
name: APFPaper1_RegulationCounts
title: Counts of disturbances at which each mark, or both by one response, can be saved
inputs_revision: 2026-10-04.1
mathlib_rev: 0df444a360eaa60ab8c11dca51a86af692955474
statement: eachCount and bothCount count, over a finite list of disturbances, those at which each of two marks is holdable and those at which the pair is jointly holdable. Moved out of a theorem file on 2026-11-12.
-/
import Definitions.Def_APFPaper1_Regulation
import Mathlib.Data.NNReal.Basic

set_option autoImplicit false
namespace APFPaper1.Regulation

open APFPaper1.Continuation
open Classical

universe uC uF uX uR uM
variable {Context : Type uC} {Frag : Context → Context → Type uF} {Raw : Context → Type uX}
  {R : Context → Type uR} {M : Type uM}
  (step : (g h : Context) → Frag g h → Raw g → Raw h → Prop)
  (resource : (g : Context) → WordFrom Frag g → R g)
  (calibration : (g : Context) → R g → NNReal) (C : Context → NNReal)
  (reads : (h : Context) → Raw h → M → Bool)

/-- Number of listed disturbances against which each mark can be saved. -/
noncomputable def eachCount (g : Context) (xs : List (Raw g)) (m1 m2 : M) : Nat :=
  xs.countP (fun x => decide (Holdable step resource calibration C reads g x m1 ∧
    Holdable step resource calibration C reads g x m2))

/-- Number of listed disturbances against which one response saves both marks. -/
noncomputable def bothCount (g : Context) (xs : List (Raw g)) (m1 m2 : M) : Nat :=
  xs.countP (fun x => decide (JointlyHoldable step resource calibration C reads g x m1 m2))

end APFPaper1.Regulation
Source
Definitions/Def_APFPaper1_RegulationCounts.lean; Sib v15, SHA-256 c2bbac95df1efdc3847f40ce2565a74d63b88ac66638e21c2830e633ecf5a375. ['27-33: eachCount and bothCount', 'Def_Regulation:13-14 binding exposure']
Human review
  • Endorsed by Shuze Chen · Nov 16, 2026

  • Endorsed by FiniteUniverse · Nov 16, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me