Physlib.List.insertIdx_getElem_fin
theoremverifiedformalizationimported Lean
Physlib.List.insertIdx_getElem_fin
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in open Physlib Physlib.List in open Physlib in variable {n : Nat} in @[simp] lemma Physlib.List.insertIdx_getElem_fin {I : Type} (i : I) : (r : List I) → (k : Fin r.length.succ) → (m : Fin r.length) → (List.insertIdx r k i)[(k.succAbove m).val] = r[m.val]
- Formalizes
- Physlib, `Physlib.List.insertIdx_getElem_fin`
- 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.insertIdx_getElem_fin← Physlib.List.insertIdx_getElem_fin (Physlib/Mathematics/ForMathlib/List/InsertIdx.lean:99): verbatim
- Verified
- 09 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 2
- Physlib.List.insertIdx_length_finPhyslib.List.insertIdx_length_fin
- resolution_refutation_pos_neg_exampleSanity check: the formula consisting of the clauses {x_0} and {not x_0} has the resolution refutation x_0, not x_0, empty clause, of…
- Used by 4
- Physlib.List.get_eq_insertIdx_succAbovePhyslib.List.get_eq_insertIdx_succAbove
- FieldStatistic.ofFinset_insertFieldStatistic.ofFinset_insert
- Physlib.List.insertIdx_eraseIdx_finPhyslib.List.insertIdx_eraseIdx_fin
- FieldStatistic.ofFinset_eraseFieldStatistic.ofFinset_erase
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 inopen Physlib Physlib.List inopen Physlib invariable {n : Nat} in@[simp]lemma Physlib.List.insertIdx_getElem_fin {I : Type} (i : I) : (r : List I) → (k : Fin r.length.succ) → (m : Fin r.length) → (List.insertIdx r k i)[(k.succAbove m).val] = r[m.val] | [], 0, m => by exact Fin.elim0 m | a :: as, 0, m => by simp | a :: as, ⟨n + 1, h⟩, ⟨0, h0⟩ => by simp [Fin.succAbove, Fin.lt_def] | a :: as, ⟨n + 1, h⟩, ⟨m+1, hm⟩ => by simp only [List.insertIdx_succ_cons, List.length_cons, Nat.succ_eq_add_one, List.getElem_cons_succ] conv_rhs => rw [← insertIdx_getElem_fin i as ⟨n, Nat.succ_lt_succ_iff.mp h⟩ ⟨m, Nat.lt_of_succ_lt_succ hm⟩] simp only [Fin.succAbove, Fin.castSucc_mk, Fin.lt_def, add_lt_add_iff_right, Fin.succ_mk, Nat.succ_eq_add_one] split · simp_all only [List.getElem_cons_succ] · simp_all only [List.getElem_cons_succ]