Lemmas reproduced from Batteries.
These are the Batteries lemmas the Mathlib-free hex libraries (HexMatrix,
HexRowReduce, HexDeterminant, HexGramSchmidt, HexBerlekamp) relied on but
which are not (yet) in the Lean core library. They are reproduced here, with
names and signatures identical to the Batteries originals, so the Mathlib-free
libraries no longer need to depend on Batteries. Remove each one if it is
migrated up to lean4.
Keeping the signatures identical to Batteries is deliberate: the *Mathlib
bridge libraries pull Batteries in via Mathlib, so both copies coexist there.
Lean accepts duplicate declarations from different modules when their signatures
match (the proofs may differ), so there is no clash. If you change a signature
here it will collide with Batteries in the bridge libraries.
Reproduced from Batteries.Data.List.Lemmas; remove if migrated up to lean4.
Reproduced from Batteries.Data.List.Lemmas; remove if migrated up to lean4.
Reproduced from Batteries.Data.List.Perm; remove if migrated up to lean4.
The Batteries original has no [DecidableEq α]; we match that signature and use
classical in the proof, since core lacks the Subperm API Batteries uses.
A Nodup list contained in another list is no longer than it. Replaces uses
of Batteries' Subperm API (subperm_of_subset/Subperm.length_le), which
core lacks; this name is not from Batteries. Remove in favour of a core lemma if
one is migrated up to lean4.