Fin.succSuccAbove_castAdd_natAdd_apply_castAdd
theoremverifiedformalizationimported Lean
Reinserting a left-block survivor a after removing the i-th slot of the left block and the j-th slot of the right block of Fin ((nA + 1) + (nB + 1)), the removal read at the contracted length (nA + nB) + 1 + 1. Unlike succSuccAbove_natAdd_apply_castAdd the two holes straddle the two blocks, so the statement carries the reshaping Fin.casts.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in open Fin in variable {n : ℕ} {c : Fin (n + 1 + 1) → C} in lemma Fin.succSuccAbove_castAdd_natAdd_apply_castAdd {nA nB : ℕ} (i : Fin (nA + 1)) (j : Fin (nB + 1)) (a : Fin nA) : Fin.cast (show (nA + nB) + 1 + 1 = (nA + 1) + (nB + 1) by omega) ((Fin.cast (show (nA + 1) + (nB + 1) = (nA + nB) + 1 + 1 by omega) (Fin.castAdd (nB + 1) i)).succSuccAbove (Fin.cast (show (nA + 1) + (nB + 1) = (nA + nB) + 1 + 1 by omega) (Fin.natAdd (nA + 1) j)) (Fin.castAdd nB a)) = Fin.castAdd (nB + 1) (i.succAbove a)
- Formalizes
- Physlib, `Fin.succSuccAbove_castAdd_natAdd_apply_castAdd`
- 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.Fin.succSuccAbove_castAdd_natAdd_apply_castAdd← Fin.succSuccAbove_castAdd_natAdd_apply_castAdd (Physlib/Relativity/Tensors/Contraction/SuccSuccAbove.lean:238): verbatim
- Verified
- 09 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 12
- Fin.succSuccAbove_monotoneFin.succSuccAbove_monotone
- Fin.snd_ne_succSuccAbove_preFin.snd_ne_succSuccAbove_pre
- Fin.succSuccAboveThe embedding of
Fin nintoFin (n + 1 + 1)which leaves a hole atiandj. - Fin.apply_succSuccAbove_symmFin.apply_succSuccAbove_symm
- Fin.succSuccAbove_eq_iff_eqFin.succSuccAbove_eq_iff_eq
- Fin.succSuccAbove_ne_fstFin.succSuccAbove_ne_fst
- Fin.succSuccAbove_leq_iff_leqFin.succSuccAbove_leq_iff_leq
- Fin.succSuccAbove_valFin.succSuccAbove_val
- Fin.fst_ne_succSuccAbove_preFin.fst_ne_succSuccAbove_pre
- Fin.succSuccAbove_lt_iff_ltFin.succSuccAbove_lt_iff_lt
- Fin.succSuccAbove_ne_sndFin.succSuccAbove_ne_snd
- Fin.succSuccAbove_rangeFin.succSuccAbove_range
- Used by 1
- Fin.succSuccAbove_castAdd_natAdd_apply_natAddReinserting a right-block survivor, the mirror of
Fin.succSuccAbove_castAdd_natAdd_apply_castAdd.
- Fin.succSuccAbove_castAdd_natAdd_apply_natAddReinserting a right-block survivor, the mirror of
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 Fin invariable {n : ℕ} {c : Fin (n + 1 + 1) → C} in/-- Reinserting a left-block survivor `a` after removing the `i`-th slot of the left block and the `j`-th slot of the right block of `Fin ((nA + 1) + (nB + 1))`, the removal read at the contracted length `(nA + nB) + 1 + 1`. Unlike `succSuccAbove_natAdd_apply_castAdd` the two holes straddle the two blocks, so the statement carries the reshaping `Fin.cast`s. -/lemma Fin.succSuccAbove_castAdd_natAdd_apply_castAdd {nA nB : ℕ} (i : Fin (nA + 1)) (j : Fin (nB + 1)) (a : Fin nA) : Fin.cast (show (nA + nB) + 1 + 1 = (nA + 1) + (nB + 1) by omega) ((Fin.cast (show (nA + 1) + (nB + 1) = (nA + nB) + 1 + 1 by omega) (Fin.castAdd (nB + 1) i)).succSuccAbove (Fin.cast (show (nA + 1) + (nB + 1) = (nA + nB) + 1 + 1 by omega) (Fin.natAdd (nA + 1) j)) (Fin.castAdd nB a)) = Fin.castAdd (nB + 1) (i.succAbove a) := by apply Fin.ext simp only [Fin.succSuccAbove_val, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, Fin.succAbove, Fin.lt_def, Fin.val_castSucc, Fin.val_succ, apply_ite Fin.val] split_ifs <;> omega