Skip to content

Commit

Permalink
Merge master into nightly-testing
Browse files Browse the repository at this point in the history
  • Loading branch information
leanprover-community-mathlib4-bot committed Jan 17, 2024
2 parents 96c8c8a + b075cdd commit 6545ff6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Mathlib/Data/Fin/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1555,7 +1555,7 @@ section SuccAbove

/-- `succAbove p i` embeds `Fin n` into `Fin (n + 1)` with a hole around `p`. -/
def succAbove (p : Fin (n + 1)) (i : Fin n) : Fin (n + 1) :=
if i.1 < p.1 then castSucc i else succ i
if castSucc i < p then i.castSucc else i.succ

theorem strictMono_succAbove (p : Fin (n + 1)) : StrictMono (succAbove p) :=
(castSuccEmb : Fin n ↪o _).strictMono.ite (succEmbedding n).strictMono
Expand Down Expand Up @@ -1613,7 +1613,7 @@ theorem succAbove_last_apply (i : Fin n) : succAbove (Fin.last n) i = castSucc i
/-- Embedding `i : Fin n` into `Fin (n + 1)` with a hole around `p : Fin (n + 1)`
embeds `i` by `succ` when the resulting `p < i.succ`. -/
theorem succAbove_above (p : Fin (n + 1)) (i : Fin n) (h : p ≤ castSucc i) :
p.succAbove i = i.succ := by simp [le_iff_val_le_val] at h; simp [succAbove, h.not_lt]
p.succAbove i = i.succ := if_neg h.not_lt
#align fin.succ_above_above Fin.succAbove_above

/-- Embedding `i : Fin n` into `Fin (n + 1)` is always about some hole `p`. -/
Expand Down

0 comments on commit 6545ff6

Please sign in to comment.