AFTD Auto-Formalizing Theoretical Domains

Fin.succSuccAbove

defimported Lean

The embedding of Fin n into Fin (n + 1 + 1) which leaves a hole at i and j.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
variable {n : ℕ} {c : Fin (n + 1 + 1) → C} in
def Fin.succSuccAbove (i j : Fin (n + 1 + 1)) (m : Fin n) : Fin (n + 1 + 1)
Defined in
Physlib, `Fin.succSuccAbove`
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.
Verified
09 Oct 2026
Axioms
none listed
Used by 37

Lean source view module on GitHub

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
variable {n : ℕ} {c : Fin (n + 1 + 1) → C} in
/-- The embedding of `Fin n` into `Fin (n + 1 + 1)` which leaves a hole at `i` and `j`. -/
def Fin.succSuccAbove (i j : Fin (n + 1 + 1)) (m : Fin n) : Fin (n + 1 + 1) :=
  if m.1 < i.1 ∧ m.1 < j.1 then
    ⟨m, by omega⟩
  else if m.1 + 1 < i.1 ∧ j.1 ≤ m.1 then
    ⟨m + 1, by omega⟩
  else if i.1 ≤ m.1 ∧ m.1 + 1 < j.1 then
    ⟨m + 1, by omega⟩
  else
    ⟨m + 2, by omega⟩
See it in the graphDiscuss this resultChallenge it