@@ -543,7 +543,8 @@ instance {n : ℕ} {i : Fin (n + 1)} : Epi (σ i) := by
543
543
-- This was not needed before leanprover/lean4#2644
544
544
dsimp
545
545
rw [Fin.predAbove_below i b (by simpa only [Fin.coe_eq_castSucc] using h)]
546
- simp only [len_mk, Fin.coe_eq_castSucc, Fin.castPred_castSucc]
546
+ simp only [len_mk, Fin.coe_eq_castSucc]
547
+ rfl
547
548
· use b.succ
548
549
-- This was not needed before leanprover/lean4#2644
549
550
dsimp
@@ -623,12 +624,11 @@ theorem eq_σ_comp_of_not_injective' {n : ℕ} {Δ' : SimplexCategory} (θ : mk
623
624
· -- This was not needed before leanprover/lean4#2644
624
625
dsimp
625
626
rw [Fin.predAbove_below i x h']
626
- have eq := Fin.castSucc_castPred (gt_of_gt_of_ge (Fin.castSucc_lt_last i) h')
627
627
dsimp [δ]
628
- erw [Fin.succAbove_below i.succ x.castPred _]
628
+ erw [Fin.succAbove_below _ _ _]
629
629
swap
630
- · rwa [eq, ← Fin.le_castSucc_iff]
631
- rw [eq]
630
+ · exact ( Fin.castSucc_lt_succ_iff.mpr h')
631
+ rfl
632
632
· simp only [not_le] at h'
633
633
let y := x.pred <| by rintro (rfl : x = 0 ); simp at h'
634
634
have hy : x = y.succ := (Fin.succ_pred x _).symm
@@ -673,22 +673,18 @@ theorem eq_σ_comp_of_not_injective {n : ℕ} {Δ' : SimplexCategory} (θ : mk (
673
673
· exfalso
674
674
exact h₂ h'.symm
675
675
rcases hθ₂ with ⟨x, y, ⟨h₁, h₂⟩⟩
676
- let z := x.castPred
677
- use z
678
- rw [← show Fin.castSucc z = x from
679
- Fin.castSucc_castPred (lt_of_lt_of_le h₂ (Fin.le_last y))] at h₁ h₂
676
+ use x.castPred ((Fin.le_last _).trans_lt' h₂).ne
680
677
apply eq_σ_comp_of_not_injective'
681
- rw [Fin.castSucc_lt_iff_succ_le] at h₂
682
678
apply le_antisymm
683
- · exact θ.toOrderHom.monotone (le_of_lt (Fin.castSucc_lt_succ z ))
684
- · rw [h₁]
685
- exact θ.toOrderHom.monotone h₂
679
+ · exact θ.toOrderHom.monotone (le_of_lt (Fin.castSucc_lt_succ _ ))
680
+ · rw [Fin.castSucc_castPred, h₁]
681
+ exact θ.toOrderHom.monotone ((Fin.succ_castPred_le_iff _).mpr h₂)
686
682
#align simplex_category.eq_σ_comp_of_not_injective SimplexCategory.eq_σ_comp_of_not_injective
687
683
688
684
theorem eq_comp_δ_of_not_surjective' {n : ℕ} {Δ : SimplexCategory} (θ : Δ ⟶ mk (n + 1 ))
689
685
(i : Fin (n + 2 )) (hi : ∀ x, θ.toOrderHom x ≠ i) : ∃ θ' : Δ ⟶ mk n, θ = θ' ≫ δ i := by
690
686
by_cases h : i < Fin.last (n + 1 )
691
- · use θ ≫ σ (Fin.castPred i)
687
+ · use θ ≫ σ (Fin.castPred i h.ne )
692
688
ext1
693
689
ext1
694
690
ext1 x
@@ -699,23 +695,18 @@ theorem eq_comp_δ_of_not_surjective' {n : ℕ} {Δ : SimplexCategory} (θ : Δ
699
695
-- This was not needed before leanprover/lean4#2644
700
696
dsimp
701
697
-- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
702
- erw [Fin.predAbove_below (Fin.castPred i) (θ.toOrderHom x)
703
- (by simpa [Fin.castSucc_castPred h] using h')]
698
+ erw [Fin.predAbove_below _ _ (by exact h')]
704
699
dsimp [δ]
705
700
erw [Fin.succAbove_below i]
706
701
swap
707
- · simp only [Fin.lt_iff_val_lt_val, Fin.coe_castSucc]
708
- exact
709
- lt_of_le_of_lt (Fin.coe_castPred_le_self _)
710
- (Fin.lt_iff_val_lt_val.mp ((Ne.le_iff_lt (hi x)).mp h'))
711
- rw [Fin.castSucc_castPred]
712
- apply lt_of_le_of_lt h' h
702
+ · rw [(hi x).le_iff_lt] at h'
703
+ exact h'
704
+ rfl
713
705
· simp only [not_le] at h'
714
706
-- The next three tactics used to be a simp only call before leanprover/lean4#2644
715
707
rw [σ, mkHom, Hom.toOrderHom_mk, OrderHom.coe_mk, OrderHom.coe_mk]
716
708
erw [OrderHom.coe_mk]
717
- erw [Fin.predAbove_above (Fin.castPred i) (θ.toOrderHom x)
718
- (by simpa only [Fin.castSucc_castPred h] using h')]
709
+ erw [Fin.predAbove_above _ _ (by exact h')]
719
710
dsimp [δ]
720
711
rw [Fin.succAbove_above i _]
721
712
-- This was not needed before leanprover/lean4#2644
@@ -725,11 +716,12 @@ theorem eq_comp_δ_of_not_surjective' {n : ℕ} {Δ : SimplexCategory} (θ : Δ
725
716
Nat.le_sub_one_of_lt (Fin.lt_iff_val_lt_val.mp h')
726
717
· obtain rfl := le_antisymm (Fin.le_last i) (not_lt.mp h)
727
718
use θ ≫ σ (Fin.last _)
728
- ext x : 4
719
+ ext x : 3
729
720
dsimp [δ, σ]
730
- dsimp only [Fin.castPred]
731
- rw [Fin.predAbove_last, Fin.succAbove_last, Fin.castSucc_castPred]
732
- exact (Ne.le_iff_lt (hi x)).mp (Fin.le_last _)
721
+ simp_rw [Fin.succAbove_last, Fin.predAbove_last_apply]
722
+ split_ifs with h
723
+ · exact ((hi x) h).elim
724
+ · rfl
733
725
#align simplex_category.eq_comp_δ_of_not_surjective' SimplexCategory.eq_comp_δ_of_not_surjective'
734
726
735
727
theorem eq_comp_δ_of_not_surjective {n : ℕ} {Δ : SimplexCategory} (θ : Δ ⟶ mk (n + 1 ))
0 commit comments