Skip to content

Commit 42f89c2

Browse files
committed
Fix grind failures in Automata/NA/Loop.lean
1 parent f1ea3d5 commit 42f89c2

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

Cslib/Computability/Automata/NA/Loop.lean

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,18 @@ theorem loop_language_eq [Inhabited Symbol] (h : ¬ language na = 0) :
193193
obtain ⟨h1, h2⟩ : 0 < xl.length ∧ (ss xl.length).isLeft := by
194194
simp only [mem_singleton_iff] at h_acc
195195
grind
196-
obtain ⟨n, h_n, _, _, h_ωtr'⟩ := loop_run_one_iter h_run h1 h2
196+
obtain ⟨n, h_n, h_take, h_drop, h_ωtr'⟩ := loop_run_one_iter h_run h1 h2
197197
left; refine ⟨xl.take n, ?_, xl.drop n, ?_, ?_⟩
198-
· grind [totalize_language_eq, take_append_of_le_length]
199-
· refine ⟨ss n, by grind, ss xl.length, by grind, ?_⟩
198+
· #adaptation_note
199+
/-- A grind regression found moving to nightly-2026-03-31 (changes from lean#13166) -/
200+
-- The following code doesn't make any sense, but it is the only way I could make
201+
-- the proof go through.
202+
simp (disch := grind) [totalize_language_eq, take_append_of_le_length] at h_take
203+
have := mem_sub_one (l := language na) (xl.take n)
204+
apply this.mpr
205+
simp [language]
206+
grind
207+
· refine ⟨ss n, by aesop, ss xl.length, by grind, ?_⟩
200208
have := LTS.OmegaExecution.extract_mTr h_ωtr' (show 0 ≤ xl.length - n by grind)
201209
have : n + (xl.length - n) = xl.length := by grind
202210
have : ((xl ++ω xs).drop n).extract 0 (xl.length - n) = xl.drop n := by

0 commit comments

Comments
 (0)