Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Lean to v4.5.0 #20

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions FormalSystems/Chomsky/Regular/TotalDFA.lean
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ theorem total_del_star_eq {M: TotalDFA α qs} {q: _} {w: _}:
induction w generalizing q
case nil => rfl
case cons _ _ ih =>
simp [del_star', DFA.del_star_curried]
rw [total_del_eq, Option.bind_eq_bind, Option.some_bind]
unfold DFA.del_star_curried
rw [total_del_eq]
apply ih

theorem in_language_iff_del_star_final
Expand Down
10 changes: 5 additions & 5 deletions FormalSystems/Preliminaries/Word.lean
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ instance Word.monoid: CancelMonoid (Word α) where
one := List.nil
one_mul := List.nil_append
mul_one := List.append_nil
mul_left_cancel u v w := List.append_left_cancel
mul_right_cancel u v w := List.append_right_cancel
mul_left_cancel u v w := List.append_cancel_left
mul_right_cancel u v w := List.append_cancel_right

theorem Word.mul_eq_cons { w v : Word α } :
w * v = x :: xs ↔ w = [] ∧ v = x :: xs ∨ ∃ (w': Word _), w = x :: w' ∧ xs = w' * v :=
List.append_eq_cons

def Word.mul_right_cancel {w₁ w₂ t : Word α} (h : w₁ * t = w₂ * t) : w₁ = w₂ :=
List.append_right_cancel h
List.append_cancel_right h

def Word.mul_left_cancel {w₁ w₂ t : Word α} (h : t * w₁ = t * w₂) : w₁ = w₂ :=
List.append_left_cancel h
List.append_cancel_left h

def Nat.fin_mod (n : ℕ) (h: N > 0) : Fin N := ⟨ n % N, Nat.mod_lt n h ⟩

Expand Down Expand Up @@ -112,4 +112,4 @@ instance : GetElem (Word α) ℕ α (λw i ↦ i < w.length) where

@[simp] theorem Word.map_append (f : α → β) :
∀ (u v : Word _), f <$> (u * v) = (f <$> u) * (f <$> v) :=
List.map_append f
List.map_append f
23 changes: 16 additions & 7 deletions lake-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[{"url": "https://github.com/leanprover/std4",
"type": "git",
"subDir": null,
"rev": "af7f36db6e7e9e395710a70635f915e8e3a0e69b",
"rev": "08ec2584b1892869e3a5f4122b029989bcb4ca79",
"name": "std",
"manifestFile": "lake-manifest.json",
"inputRev": "main",
Expand All @@ -13,7 +13,7 @@
{"url": "https://github.com/leanprover-community/quote4",
"type": "git",
"subDir": null,
"rev": "ccba5d35d07a448fab14c0e391c8105df6e2564c",
"rev": "1c88406514a636d241903e2e288d21dc6d861e01",
"name": "Qq",
"manifestFile": "lake-manifest.json",
"inputRev": "master",
Expand All @@ -22,7 +22,7 @@
{"url": "https://github.com/leanprover-community/aesop",
"type": "git",
"subDir": null,
"rev": "646be3a3604d0f2a3c1800cb4279a36493474b18",
"rev": "cebd10ba6d22457e364ba03320cfd9fc7511e520",
"name": "aesop",
"manifestFile": "lake-manifest.json",
"inputRev": "master",
Expand All @@ -31,10 +31,10 @@
{"url": "https://github.com/leanprover-community/ProofWidgets4",
"type": "git",
"subDir": null,
"rev": "909febc72b4f64628f8d35cd0554f8a90b6e0749",
"rev": "8dd18350791c85c0fc9adbd6254c94a81d260d35",
"name": "proofwidgets",
"manifestFile": "lake-manifest.json",
"inputRev": "v0.0.23",
"inputRev": "v0.0.25",
"inherited": true,
"configFile": "lakefile.lean"},
{"url": "https://github.com/leanprover/lean4-cli",
Expand All @@ -46,13 +46,22 @@
"inputRev": "main",
"inherited": true,
"configFile": "lakefile.lean"},
{"url": "https://github.com/leanprover-community/import-graph.git",
"type": "git",
"subDir": null,
"rev": "8079d2d1d0e073bde42eab159c24f4c2d0d3a871",
"name": "importGraph",
"manifestFile": "lake-manifest.json",
"inputRev": "main",
"inherited": true,
"configFile": "lakefile.lean"},
{"url": "https://github.com/leanprover-community/mathlib4",
"type": "git",
"subDir": null,
"rev": "cf8e23a62939ed7cc530fbb68e83539730f32f86",
"rev": "feec58a7ee9185f92abddcf7631643b53181a7d3",
"name": "mathlib",
"manifestFile": "lake-manifest.json",
"inputRev": "v4.4.0",
"inputRev": "v4.5.0",
"inherited": false,
"configFile": "lakefile.lean"}],
"name": "formal_systems",
Expand Down
2 changes: 1 addition & 1 deletion lakefile.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ open Lake DSL
package formal_systems

require mathlib
from git "https://github.com/leanprover-community/mathlib4"@"v4.4.0"
from git "https://github.com/leanprover-community/mathlib4"@"v4.5.0"

@[default_target]
lean_lib FormalSystems
2 changes: 1 addition & 1 deletion lean-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
leanprover/lean4:v4.4.0
leanprover/lean4:v4.5.0