Physlib.List.take_insert_gt
theoremverifiedformalizationimported Lean
Physlib.List.take_insert_gt
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in variable {n : Nat} in lemma Physlib.List.take_insert_gt {I : Type} (i : I) : (n m : ℕ) → (h : n < m) → (r : List I) → List.take n (List.insertIdx r m i) = List.take n r
- Formalizes
- Physlib, `Physlib.List.take_insert_gt`
- Lean proof
- By Joseph Tooby-Smith, from github.com/leanprover-community/physlib at
e411c6e89692(Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.34.1.Physlib.List.take_insert_gt← Physlib.List.take_insert_gt (Physlib/Mathematics/ForMathlib/List/InsertIdx.lean:171): verbatim
- Verified
- 09 Oct 2026
- Axioms
propext- Used by 1
- FieldStatistic.ofList_take_insertIdx_gtFieldStatistic.ofList_take_insertIdx_gt
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
set_option autoImplicit true inset_option relaxedAutoImplicit true invariable {n : Nat} inlemma Physlib.List.take_insert_gt {I : Type} (i : I) : (n m : ℕ) → (h : n < m) → (r : List I) → List.take n (List.insertIdx r m i) = List.take n r | 0, 0, _, _ => by simp | 0, m + 1, _, _ => by simp | n+1, m + 1, _, [] => by simp | n+1, m + 1, h, a::as => by simp only [List.insertIdx_succ_cons, List.take_succ_cons, List.cons.injEq, true_and] refine take_insert_gt i n m (Nat.succ_lt_succ_iff.mp h) as