Skip to content

Commit 1bb3a54

Browse files
kim-emleanprover-community-mathlib4-botchenson2018mathlib4-botleanprover-community-mathlib4-bot
authored
chore: bump toolchain to v4.29.0-rc1 (#344)
Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Chris Henson <chrishenson.net@gmail.com> Co-authored-by: mathlib4-bot <github-mathlib4-bot@leanprover.zulipchat.com> Co-authored-by: leanprover-community-mathlib4-bot <129911861+leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Ching-Tsun Chou <chingtsun.chou@gmail.com> Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com> Co-authored-by: Alexandre Rademaker <arademaker@gmail.com> Co-authored-by: mathlib-nightly-testing[bot] <mathlib-nightly-testing[bot]@users.noreply.github.com> Co-authored-by: mathlib-nightly-testing[bot] <258991302+mathlib-nightly-testing[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b13a672 commit 1bb3a54

File tree

13 files changed

+42
-26
lines changed

13 files changed

+42
-26
lines changed

Cslib/Computability/Automata/DA/Buchi.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ of the language accepted by the same automaton.
2929
theorem buchi_eq_finAcc_omegaLim {da : DA State Symbol} {acc : Set State} :
3030
language (Buchi.mk da acc) = (language (FinAcc.mk da acc))↗ω := by
3131
ext xs
32-
simp
32+
simp +instances
3333

3434
end Cslib.Automata.DA

Cslib/Computability/Automata/NA/BuchiInter.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ lemma inter_freq_comp_acc_freq_acc {xs : ωSequence Symbol} {ss : ωSequence ((
9393
apply leadsTo_cases_or (q := {⟨_, b⟩ | b = false}) <;>
9494
grind [until_frequently_leadsTo_and, univ_inter]
9595

96+
-- TODO: fix proof to work with backward.isDefEq.respectTransparency
97+
set_option backward.isDefEq.respectTransparency false in
9698
/-- The language accepted by the intersection automaton is the intersection of
9799
the languages accepted by the two component automata. -/
98100
@[simp, scoped grind =]

Cslib/Computability/Automata/NA/Loop.lean

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ theorem loop_run_one_iter {xs : ωSequence Symbol} {ss : ωSequence (Unit ⊕ St
9292
exact neq.imp (congrArg List.length)
9393
· grind [loop_run_from_left]
9494

95+
open List in
9596
/-- For any finite word in `language na`, there is a corresponding finite run of `na.loop`. -/
9697
theorem loop_fin_run_exists {xl : List Symbol} (h : xl ∈ language na) :
9798
∃ sl : List (Unit ⊕ State), ∃ _ : sl.length = xl.length + 1,
@@ -103,7 +104,11 @@ theorem loop_fin_run_exists {xl : List Symbol} (h : xl ∈ language na) :
103104
· use [inl ()]
104105
grind
105106
· use [inl ()] ++ (sl.extract 1 xl.length).map inr ++ [inl ()]
106-
grind [FinAcc.loop, → LTS.tr_setImage]
107+
#adaptation_note
108+
/-- This squeeze was required moving to nightly-2026-01-28 -/
109+
grind only [= length_append, = length_cons, = length_nil, = length_map, = List.length_take,
110+
= length_drop, = min_def, = getElem_append, = getElem_cons, = List.take_zero, FinAcc.loop,
111+
= map_nil, = getElem_map, = getElem_take, = getElem_drop]
107112

108113
/-- For any finite word in `language na`, there is a corresponding multistep transition
109114
of `na.loop`. -/

Cslib/Computability/Automata/NA/Pair.lean

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ theorem LTS.pairLang_regular [Finite State] {lts : LTS State Symbol} {s t : Stat
3535
rw [IsRegular.iff_nfa]
3636
use State, inferInstance, (NA.FinAcc.mk ⟨lts, {s}⟩ {t})
3737
ext
38-
simp
38+
simp +instances
3939

4040
/-- `LTS.pairViaLang via s t` is the language of finite words that can take the LTS
4141
from state `s` to state `t` via a state in `via`. -/
@@ -108,8 +108,7 @@ theorem language_eq_fin_iSup_hmul_omegaPow
108108
[Inhabited Symbol] [Finite State] (na : Buchi State Symbol) :
109109
language na = ⨆ s ∈ na.start, ⨆ t ∈ na.accept, (na.pairLang s t) * (na.pairLang t t)^ω := by
110110
ext xs
111-
simp only [Buchi.instωAcceptor, ωAcceptor.mem_language,
112-
ωLanguage.mem_iSup, ωLanguage.mem_hmul, LTS.mem_pairLang]
111+
simp only [ωAcceptor.mem_language, ωLanguage.mem_iSup, ωLanguage.mem_hmul, LTS.mem_pairLang]
113112
constructor
114113
· rintro ⟨ss, h_run, h_inf⟩
115114
obtain ⟨t, h_acc, h_t⟩ := frequently_in_finite_type.mp h_inf

Cslib/Computability/Automata/NA/Sum.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ namespace Buchi
5858

5959
open ωAcceptor
6060

61+
-- TODO: fix proof to work with backward.isDefEq.respectTransparency
62+
set_option backward.isDefEq.respectTransparency false in
6163
/-- The ω-language accepted by the Buchi sum automata is the union of the ω-languages accepted
6264
by its component automata. -/
6365
@[simp]

Cslib/Computability/Automata/NA/Total.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ as long as the accepting states are also lifted in the obvious way. -/
5454
theorem totalize_language_eq {na : FinAcc State Symbol} :
5555
language (FinAcc.mk na.totalize (inl '' na.accept)) = language na := by
5656
ext xl
57-
simp [totalize]
57+
simp +instances [totalize]
5858

5959
end FinAcc
6060

Cslib/Computability/Languages/Language.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,9 @@ theorem reverse_sub (l m : Language α) : (l - m).reverse = l.reverse - m.revers
5454
theorem sub_one_mul : (l - 1) * l = l * l - 1 := by
5555
ext x; constructor
5656
· rintro ⟨u, h_u, v, h_v, rfl⟩
57-
rw [mem_sub, mem_one] at h_u ⊢
5857
constructor
5958
· refine ⟨u, ?_, v, ?_⟩ <;> grind
60-
· grind [append_eq_nil_iff]
59+
· grind [append_eq_nil_iff, mem_one]
6160
· rintro ⟨⟨u, h_u, v, h_v, rfl⟩, h_x⟩
6261
rcases eq_or_ne u [] with (rfl | h_u')
6362
· refine ⟨v, ?_, [], ?_⟩ <;> grind [mem_sub, mem_one]

Cslib/Computability/Languages/OmegaRegularLanguage.lean

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ theorem IsRegular.bot : (⊥ : ωLanguage Symbol).IsRegular := by
8585
accept := ∅ }
8686
use Unit, inferInstance, na
8787
ext xs
88-
simp [na]
88+
simp +instances [na]
8989

9090
/-- The language of all ω-sequences is ω-regular. -/
9191
@[simp]
@@ -96,11 +96,13 @@ theorem IsRegular.top : (⊤ : ωLanguage Symbol).IsRegular := by
9696
accept := univ }
9797
use Unit, inferInstance, na
9898
ext xs
99-
simp only [na, NA.Buchi.instωAcceptor, mem_language, mem_univ, frequently_true_iff_neBot,
100-
atTop_neBot, and_true, mem_top, iff_true]
99+
simp +instances only [na, NA.Buchi.instωAcceptor, mem_language, mem_univ,
100+
frequently_true_iff_neBot, atTop_neBot, and_true, mem_top, iff_true]
101101
use const ()
102102
grind [NA.Run]
103103

104+
-- TODO: fix proof to work with backward.isDefEq.respectTransparency
105+
set_option backward.isDefEq.respectTransparency false in
104106
/-- The union of two ω-regular languages is ω-regular. -/
105107
@[simp]
106108
theorem IsRegular.sup {p1 p2 : ωLanguage Symbol}
@@ -120,6 +122,8 @@ theorem IsRegular.sup {p1 p2 : ωLanguage Symbol}
120122
rw [mem_iUnion, Fin.exists_fin_two]
121123
grind
122124

125+
-- TODO: fix proof to work with backward.isDefEq.respectTransparency
126+
set_option backward.isDefEq.respectTransparency false in
123127
open NA.Buchi in
124128
/-- The intersection of two ω-regular languages is ω-regular. -/
125129
@[simp]
@@ -185,6 +189,8 @@ theorem IsRegular.omegaPow [Inhabited Symbol] {l : Language Symbol}
185189
use Unit ⊕ State, inferInstance, ⟨na.loop, {inl ()}⟩
186190
exact NA.Buchi.loop_language_eq
187191

192+
-- TODO: fix proof to work with backward.isDefEq.respectTransparency
193+
set_option backward.isDefEq.respectTransparency false in
188194
/-- An ω-language is regular iff it is the finite union of ω-languages of the form `L * M^ω`,
189195
where all `L`s and `M`s are regular languages. -/
190196
theorem IsRegular.eq_fin_iSup_hmul_omegaPow [Inhabited Symbol] (p : ωLanguage Symbol) :

Cslib/Computability/Languages/RegularLanguage.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ theorem IsRegular.mul [Inhabited Symbol] {l1 l2 : Language Symbol}
149149
⟨finConcat nfa1 nfa2, inr '' (inl '' nfa2.accept)⟩
150150
exact finConcat_language_eq
151151

152+
-- TODO: fix proof to work with backward.isDefEq.respectTransparency
153+
set_option backward.isDefEq.respectTransparency false in
152154
open NA.FinAcc Sum in
153155
/-- The Kleene star of a regular language is regular. -/
154156
@[simp]

Cslib/Foundations/Lint/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Authors: Chris Henson
77
module
88

99
public import Batteries.Tactic.Lint.Basic
10-
public meta import Lean.Meta.GlobalInstances
10+
public meta import Lean.Meta.Instances
1111

1212
namespace Cslib.Lint
1313

@@ -21,7 +21,7 @@ public meta def topNamespace : Batteries.Tactic.Lint.Linter where
2121
test declName := do
2222
if ← isAutoDecl declName then return none
2323
let env ← getEnv
24-
if isGlobalInstance env declName then return none
24+
if ← isInstanceReducible declName then return none
2525
let nss := env.getNamespaceSet
2626
let top := nss.fold (init := (∅ : NameSet)) fun tot n =>
2727
match n.components with

0 commit comments

Comments
 (0)