TensorSpecies.Tensor.IsReindexing.append_succSuccAbove_natAdd
theoremverifiedformalizationimported Lean
Removing two entries from the right component of Fin.append c1 c commutes with the append: removing the i-th and j-th entries of c and then appending c1 matches removing the corresponding entries of Fin.append c1 c, via the identity permutation. This is used for the commutation of taking a *product* of tensors with *contraction* of indices.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in open TensorSpecies TensorSpecies.Tensor in open Module in variable {C : Type} in open Fin in lemma TensorSpecies.Tensor.IsReindexing.append_succSuccAbove_natAdd {n n1 : ℕ} {c : Fin (n + 1 + 1) → C} {c1 : Fin n1 → C} (i j : Fin (n + 1 + 1)) : IsReindexing (Fin.append c1 c ∘ (Fin.natAdd n1 i).succSuccAbove (Fin.natAdd n1 j)) (Fin.append c1 (c ∘ i.succSuccAbove j)) id
- Formalizes
- Physlib, `TensorSpecies.Tensor.IsReindexing.append_succSuccAbove_natAdd`
- Lean proof
- By Joseph Tooby-Smith, from github.com/leanprover-community/physlib at
e411c6e89692(Copyright (c) 2025 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.TensorSpecies.Tensor.IsReindexing.append_succSuccAbove_natAdd← TensorSpecies.Tensor.IsReindexing.append_succSuccAbove_natAdd (Physlib/Relativity/Tensors/Reindexing.lean:336): verbatim
- Verified
- 09 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 19
- Fin.succSuccAbove_monotoneFin.succSuccAbove_monotone
- Fin.snd_ne_succSuccAbove_preFin.snd_ne_succSuccAbove_pre
- Fin.succSuccAbove_predPredAboveFin.succSuccAbove_predPredAbove
- Fin.succSuccAboveThe embedding of
Fin nintoFin (n + 1 + 1)which leaves a hole atiandj. - TensorSpecies.Tensor.IsReindexing.on_idTensorSpecies.Tensor.IsReindexing.on_id
- TensorSpecies.Tensor.IsReindexing.inv_perserve_colorTensorSpecies.Tensor.IsReindexing.inv_perserve_color
- Fin.apply_succSuccAbove_symmFin.apply_succSuccAbove_symm
- Fin.succSuccAbove_eq_iff_eqFin.succSuccAbove_eq_iff_eq
- Fin.succSuccAbove_ne_fstFin.succSuccAbove_ne_fst
- Fin.predPredAbove_succSuccAboveFin.predPredAbove_succSuccAbove
- Fin.succSuccAbove_leq_iff_leqFin.succSuccAbove_leq_iff_leq
- Fin.succSuccAbove_comm_natAddFin.succSuccAbove_comm_natAdd
- Fin.fst_ne_succSuccAbove_preFin.fst_ne_succSuccAbove_pre
- Fin.succSuccAbove_lt_iff_ltFin.succSuccAbove_lt_iff_lt
- TensorSpecies.Tensor.IsReindexing.toEquiv_symm_perserve_colorTensorSpecies.Tensor.IsReindexing.toEquiv_symm_perserve_color
- Fin.succSuccAbove_natAdd_apply_castAddFin.succSuccAbove_natAdd_apply_castAdd
- TensorSpecies.Tensor.IsReindexingGiven two lists of indices
c : Fin n → Candc1 : Fin m → Ca mapσ : Fin m → Fin nsatisfies the conditionIsReindexing c c1 σif… - Fin.succSuccAbove_ne_sndFin.succSuccAbove_ne_snd
- Fin.succSuccAbove_rangeFin.succSuccAbove_range
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 TensorSpecies TensorSpecies.Tensor inopen Module invariable {C : Type} inopen Fin in/-- Removing two entries from the right component of `Fin.append c1 c` commutes with the append: removing the `i`-th and `j`-th entries of `c` and then appending `c1` matches removing the corresponding entries of `Fin.append c1 c`, via the identity permutation. This is used for the commutation of taking a *product* of tensors with *contraction* of indices. -/lemma TensorSpecies.Tensor.IsReindexing.append_succSuccAbove_natAdd {n n1 : ℕ} {c : Fin (n + 1 + 1) → C} {c1 : Fin n1 → C} (i j : Fin (n + 1 + 1)) : IsReindexing (Fin.append c1 c ∘ (Fin.natAdd n1 i).succSuccAbove (Fin.natAdd n1 j)) (Fin.append c1 (c ∘ i.succSuccAbove j)) id := by apply And.intro (Function.bijective_id) simp [forall_fin_add, succSuccAbove_comm_natAdd i j, succSuccAbove_natAdd_apply_castAdd i j]