All proofs
Project-declaredLean 4.31.0 · mathlib@fabf563a7c95

Take drop add Cases

Fin.take_drop_addCases'

Plain-language statement

The concatenation of the first m elements and the last n - m elements of a tuple is the same as the original tuple.

Exact Lean statement

theorem take_drop_addCases' (m : ℕ) (h : m ≤ n) (v : (i : Fin n) → α i) :
    Fin.addCases' (take m h v) (drop m h v) =
      fun i =>
        cast (by
          simp only [Fin.cast, append, addCases, castLE, val_castLT, subNat_mk, natAdd_mk,
            addNat_mk, eq_rec_constant, left_eq_dite_iff, not_lt]
          intro hi; rw! [Nat.sub_add_cancel hi]; rfl)
          (v (i.cast (by omega)))

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
theorem take_drop_addCases' (m : ) (h : m  n) (v : (i : Fin n)  α i) :    Fin.addCases' (take m h v) (drop m h v) =      fun i =>        cast (by          simp only [Fin.cast, append, addCases, castLE, val_castLT, subNat_mk, natAdd_mk,            addNat_mk, eq_rec_constant, left_eq_dite_iff, not_lt]          intro hi; rw! [Nat.sub_add_cancel hi]; rfl)          (v (i.cast (by omega))) := by  ext i  simp only [castLE, Fin.cast, val_addNat, addCases', addCases, castAdd_castLT, val_castLT,    take_apply, eq_mpr_eq_cast, cast, subNat_mk, natAdd_mk, drop_apply, addNat_mk, cast_mk]  split  · simp  · have : i.val - m + m = i.val := by omega    rw! [this]    simp only [eqRec_eq_cast]    rw [_root_.cast_cast]
Project
ArkLib
License
Apache-2.0
Commit
fad5cbf80877
Source
ArkLib/Data/Fin/Tuple/TakeDrop.lean:346-362

Reuse this declaration

Bring the exact result into your workflow

The import identifies the source module. Your project still needs the pinned package dependency shown on this page.

What this badge means

This completion status comes from the project or community source. It has not yet been represented here as an independent rebuild and axiom audit.

Continue in this project

Related declarations

Project-declaredLean 4.31.0

Affine gaps lifted to interleaved codes

affine_gaps_lifted_to_interleaved_codes

Project documentation

This lemma proves the final algebraic step in the DG25 Theorem 3.1 proof. It shows that if R > e + 1, then e * (R / (R - 1)) < e + 1. The intuition is that the fraction R / (R - 1) is always greater than 1, but as R gets larger, it gets closer to 1. The hypothesis R > e + 1 provides a strong enough bound to ensure the product e * (fraction) do...

cryptographyproof systemscoding theory

Source project: ArkLib

Person-level attribution pending.

View proof record
Project-declaredLean 4.31.0

Gadget Decompose coeff

ArkLib.Lattices.Ajtai.gadgetDecompose_coeff

Plain-language statement

The k-th coefficient (k < deg φ) of a gadget-decomposition block is exactly the corresponding digit of the corresponding input coefficient.

cryptographyproof systemscoding theory

Source project: ArkLib

Person-level attribution pending.

View proof record
Project-declaredLean 4.31.0

Gadget Decompose lawful

ArkLib.Lattices.Ajtai.gadgetDecompose_lawful

Plain-language statement

The base-b gadget decomposition is a lawful gadget decomposition.

cryptographyproof systemscoding theory

Source project: ArkLib

Person-level attribution pending.

View proof record