@@ -442,7 +442,11 @@ def succEmb (n : ℕ) : Fin n ↪ Fin (n + 1) where
442
442
inj' := succ_injective _
443
443
444
444
@[simp]
445
- theorem val_succEmb : ⇑(succEmb n) = Fin.succ := rfl
445
+ theorem coe_succEmb : ⇑(succEmb n) = Fin.succ :=
446
+ rfl
447
+
448
+ @[deprecated (since := "2025-04-12")]
449
+ alias val_succEmb := coe_succEmb
446
450
447
451
@[simp]
448
452
theorem exists_succ_eq {x : Fin (n + 1 )} : (∃ y, Fin.succ y = x) ↔ x ≠ 0 :=
@@ -497,7 +501,7 @@ lemma castAdd_injective (m n : ℕ) : Injective (@Fin.castAdd m n) := castLE_inj
497
501
lemma castSucc_injective (n : ℕ) : Injective (@Fin.castSucc n) := castAdd_injective _ _
498
502
499
503
/-- `Fin.castLE` as an `Embedding`, `castLEEmb h i` embeds `i` into a larger `Fin` type. -/
500
- @[simps! apply]
504
+ @[simps apply]
501
505
def castLEEmb (h : n ≤ m) : Fin n ↪ Fin m where
502
506
toFun := castLE h
503
507
inj' := castLE_injective _
@@ -596,15 +600,20 @@ theorem cast_eq_cast (h : n = m) : (Fin.cast h : Fin n → Fin m) = _root_.cast
596
600
597
601
/-- `Fin.castAdd` as an `Embedding`, `castAddEmb m i` embeds `i : Fin n` in `Fin (n+m)`.
598
602
See also `Fin.natAddEmb` and `Fin.addNatEmb`. -/
599
- @[simps! apply]
600
603
def castAddEmb (m) : Fin n ↪ Fin (n + m) := castLEEmb (le_add_right n m)
601
604
605
+ @[simp]
606
+ lemma coe_castAddEmb (m) : (castAddEmb m : Fin n → Fin (n + m)) = castAdd m := rfl
607
+
608
+ lemma castAddEmb_apply (m) (i : Fin n) : castAddEmb m i = castAdd m i := rfl
609
+
602
610
/-- `Fin.castSucc` as an `Embedding`, `castSuccEmb i` embeds `i : Fin n` in `Fin (n+1)`. -/
603
- @[simps! apply]
604
611
def castSuccEmb : Fin n ↪ Fin (n + 1 ) := castAddEmb _
605
612
606
613
@[simp, norm_cast] lemma coe_castSuccEmb : (castSuccEmb : Fin n → Fin (n + 1 )) = Fin.castSucc := rfl
607
614
615
+ lemma castSuccEmb_apply (i : Fin n) : castSuccEmb i = i.castSucc := rfl
616
+
608
617
theorem castSucc_le_succ {n} (i : Fin n) : i.castSucc ≤ i.succ := Nat.le_succ i
609
618
610
619
@[simp] theorem castSucc_le_castSucc_iff {a b : Fin n} : castSucc a ≤ castSucc b ↔ a ≤ b := .rfl
0 commit comments