TensorSpecies.Tensor.IsReindexing.succAbove_succSuccAbove_comm
theoremverifiedformalizationimported Lean
Removing one entry and then a pair of entries from c in either order gives the same colour list: removing the k-th entry and then the (shifted) i-th and j-th entries matches removing the i-th and j-th entries first and then the (shifted) k-th entry, via the identity permutation. This is used for the commutation of a *contraction* with an *evaluation*.
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 open Fin in lemma TensorSpecies.Tensor.IsReindexing.succAbove_succSuccAbove_comm {n : ℕ} {c : Fin (n + 1 + 1 + 1) → C} (k : Fin (n + 1 + 1 + 1)) (i j : Fin (n + 1 + 1)) (hij : i ≠ j) : let i' := k.succAbove i; let j' := k.succAbove j; have hij' : i' ≠ j' := by simp [i', j', hij]; let k' := predPredAbove i' j' hij' k (by simp [i', j', Ne.symm]); IsReindexing ((c ∘ i'.succSuccAbove j') ∘ k'.succAbove) ((c ∘ k.succAbove) ∘ i.succSuccAbove j) id
- Formalizes
- Physlib, `TensorSpecies.Tensor.IsReindexing.succAbove_succSuccAbove_comm`
- 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.succAbove_succSuccAbove_comm← TensorSpecies.Tensor.IsReindexing.succAbove_succSuccAbove_comm (Physlib/Relativity/Tensors/Reindexing.lean:480): verbatim
- Verified
- 10 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 24
- Fin.predPredAbove_injectiveFin.predPredAbove_injective
- Fin.succSuccAbove_monotoneFin.succSuccAbove_monotone
- TensorSpecies.Tensor.IsReindexing.symmThe inverse of a map satisfying
IsReindexing c c1 σis a reindexing ofc1byc. - Fin.snd_ne_succSuccAbove_preFin.snd_ne_succSuccAbove_pre
- Fin.succSuccAbove_predPredAboveFin.succSuccAbove_predPredAbove
- Fin.predPredAboveThe preimage of
mundersuccSuccAbove i j hijgiven thatmis not equal toiorj. - 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.funPredPredAboveGiven a bijection
Fin (n1 + 1 + 1) → Fin (n + 1 + 1))and a pairi j : Fin (n1 + 1 + 1), then… - 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
- 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
- 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…
- LinearOrder.toTotalPreorderEvery
LinearOrderis aTotalPreorder. - TotalPreorderA total preorder: a preorder where
≤is total (complete). This is weaker thanLinearOrder— it does NOT require antisymmetry or…
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 inopen Fin in/-- Removing one entry and then a pair of entries from `c` in either order gives the same colour list: removing the `k`-th entry and then the (shifted) `i`-th and `j`-th entries matches removing the `i`-th and `j`-th entries first and then the (shifted) `k`-th entry, via the identity permutation. This is used for the commutation of a *contraction* with an *evaluation*. -/lemma TensorSpecies.Tensor.IsReindexing.succAbove_succSuccAbove_comm {n : ℕ} {c : Fin (n + 1 + 1 + 1) → C} (k : Fin (n + 1 + 1 + 1)) (i j : Fin (n + 1 + 1)) (hij : i ≠ j) : let i' := k.succAbove i; let j' := k.succAbove j; have hij' : i' ≠ j' := by simp [i', j', hij]; let k' := predPredAbove i' j' hij' k (by simp [i', j', Ne.symm]); IsReindexing ((c ∘ i'.succSuccAbove j') ∘ k'.succAbove) ((c ∘ k.succAbove) ∘ i.succSuccAbove j) id := by intro i' j' hij' k' refine ⟨Function.bijective_id, fun m => ?_⟩ simp only [id_eq, Function.comp_apply] congr 1 show i'.succSuccAbove j' (k'.succAbove m) = k.succAbove (i.succSuccAbove j m) apply Fin.val_injective simp only [i', j', k', Fin.succSuccAbove, Fin.succAbove, Fin.predPredAbove, lt_def, val_castSucc, val_succ, apply_ite Fin.val, apply_dite Fin.val] grind (splits := 60)