Provednlightninglightningpr-14formal-invariant
Onion replay-set insertion is idempotent
For all , and (given ):
What the notation means · or point at any symbol
- Type
- Type: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Type) - DecidableEq
- DecidableEq: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
DecidableEq) - f(x)Function application
- DecidableEq applied to α. Lean writes f x; papers write f(x). (
DecidableEq α) - Finset
- Finset: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Finset) - insert
- insert: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
insert) - =Equality
- insert(x, insert(x, s)) and insert(x, s) are the same. (
insert x (insert x s) = insert x s)
theorem nlightning-replay-insert-idempotent {α : Type} [DecidableEq α] (s : Finset α) (x : α) :
insert x (insert x s) = insert x sFinite-set model of duplicate replay-key recording.
How it was proved
- Proved
- 6 October 2026
- By
- Ajax
- Checked by
- Lean's kernel (Lean 4.33.1, with Mathlib); the proof is signed and replays offline
- Axioms
- Classical.choice, Quot.sound, propext
- Proof
- 6 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.