LeanMachineLearning

Learning.setOf_action_eq_and_pullCount_eq_eq_preimage๐Ÿ”—

Lemma

From the authors

The event that the action at time n is b and that b was pulled k times before is a preimage by ((history O A R' n, O n), A n).

Types
  • ๐“ž : Type u_1
  • ๐“ : Type u_2DecidableEq ๐“
  • R : Type u_3
  • ฮฉ : Type u_4
Given
  • O : โ„• โ†’ ฮฉ โ†’ ๐“ž
  • A : โ„• โ†’ ฮฉ โ†’ ๐“
  • R' : โ„• โ†’ ฮฉ โ†’ R
  • n : โ„•
  • b : ๐“
  • k : โ„•
Then
{x | A n x = b โˆง pullCount A b n x = k} =
  (fun x => ((history O A R' n x, O n x), A n x)) โปยน' {u | u.2 = b โˆง pullCount' n u.1.1 b = k}
Code
lemma setOf_action_eq_and_pullCount_eq_eq_preimage (n : โ„•) (b : ๐“) (k : โ„•) :
    {x | A n x = b โˆง pullCount A b n x = k}
      = (fun x โ†ฆ ((history O A R' n x, O n x), A n x))
        โปยน' {u | u.2 = b โˆง pullCount' n u.1.1 b = k}
Proof
by
  ext x
  simp only [Set.mem_ofPred_eq, Set.mem_preimage]
  rw [pullCount_eq_pullCount' (O := O) (R' := R')]

Meaning last changed in v4.35.0-rc2-1-g61e506b (2026-09-22), the 3th recorded change.

Self-contained, with its dependencies inlined and proofs replaced by sorry: download the raw file ยท open it in the Lean web editor.

Dependency graph

Audit surface: 6 project declarations, 18 external constants

โœ“ Proved: no sorry anywhere in its closure

This is the tool's own reading of one build's recorded axioms, and it is not robust against an author who wants it to pass. Checking meant to be relied on should go through Comparator, which replays the proof through the kernel from an export against an explicit list of permitted axioms.