File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -919,7 +919,6 @@ theorem image_iterate_stabilises_lt_card [DecidableEq α] {f : α → α} {s : F
919919 (hs : Set.MapsTo f s s) (hs₀ : s.Nonempty) :
920920 ∃ n < #s, ∀ m, n ≤ m → s.image f^[m] = s.image f^[n] := by
921921 let g (i : ℕ) : Finset α := s.image f^[i]
922- have : g 0 = s := by simp [g]
923922 have (i : ℕ) : 0 < #(g i) := (hs₀.image _).card_pos
924923 let G (i : ℕ) : ℕ := #(g i) - 1
925924 have hg : Antitone g := antitone_nat_of_succ_le <| fun i ↦ by
@@ -931,9 +930,8 @@ theorem image_iterate_stabilises_lt_card [DecidableEq α] {f : α → α} {s : F
931930 exact ⟨fun h ↦ eq_of_subset_of_card_le (hg hij) (by grind), by grind⟩
932931 have hG : Antitone G := fun i j h ↦ by simp only [G]; gcongr #?_ - 1 ; exact hg h
933932 have hG₁ (m : ℕ) : G m = G (m + 1 ) → G (m + 1 ) = G (m + 2 ) := by
934- simp only [G_eq, g, Function.iterate_succ', ← image_image]
935- grind
936- obtain ⟨n, hn, hn'⟩ := Nat.stabilises_of_antitone hG hG₁
933+ grind [=_ image_image, iterate_succ']
934+ rcases Nat.stabilises_of_antitone hG hG₁ with ⟨n, hn, hn'⟩
937935 exact ⟨n, by grind⟩
938936
939937/--
You can’t perform that action at this time.
0 commit comments