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

[Merged by Bors] - chore: bump std4 dependency #9426

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions ImportGraph/Main.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Authors: Scott Morrison
-/
import Mathlib.Util.Imports
import Mathlib.Lean.CoreM
import Mathlib.Lean.Data.NameMap
import Mathlib.Lean.IO.Process
import Std.Lean.NameMap
import Std.Lean.IO.Process
import Mathlib.Lean.Name
import Std.Lean.Util.Path
import Cli
Expand Down
7 changes: 0 additions & 7 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1674,7 +1674,6 @@ import Mathlib.Data.List.Sym
import Mathlib.Data.List.TFAE
import Mathlib.Data.List.ToFinsupp
import Mathlib.Data.List.Zip
import Mathlib.Data.MLList.Basic
import Mathlib.Data.MLList.BestFirst
import Mathlib.Data.MLList.Dedup
import Mathlib.Data.MLList.DepthFirst
Expand Down Expand Up @@ -1804,7 +1803,6 @@ import Mathlib.Data.Nat.Totient
import Mathlib.Data.Nat.Units
import Mathlib.Data.Nat.Upto
import Mathlib.Data.Nat.WithBot
import Mathlib.Data.Nondet.Basic
import Mathlib.Data.Num.Basic
import Mathlib.Data.Num.Bitwise
import Mathlib.Data.Num.Lemmas
Expand Down Expand Up @@ -2311,7 +2309,6 @@ import Mathlib.Init.Quot
import Mathlib.Init.Set
import Mathlib.Init.ZeroOne
import Mathlib.Lean.CoreM
import Mathlib.Lean.Data.NameMap
import Mathlib.Lean.Elab.Tactic.Basic
import Mathlib.Lean.Elab.Term
import Mathlib.Lean.EnvExtension
Expand All @@ -2321,7 +2318,6 @@ import Mathlib.Lean.Expr.Basic
import Mathlib.Lean.Expr.ExtraRecognizers
import Mathlib.Lean.Expr.ReplaceRec
import Mathlib.Lean.Expr.Traverse
import Mathlib.Lean.IO.Process
import Mathlib.Lean.Json
import Mathlib.Lean.LocalContext
import Mathlib.Lean.Message
Expand All @@ -2332,7 +2328,6 @@ import Mathlib.Lean.Meta.DiscrTree
import Mathlib.Lean.Meta.Simp
import Mathlib.Lean.Name
import Mathlib.Lean.PrettyPrinter.Delaborator
import Mathlib.Lean.SMap
import Mathlib.Lean.Thunk
import Mathlib.LinearAlgebra.AdicCompletion
import Mathlib.LinearAlgebra.AffineSpace.AffineEquiv
Expand Down Expand Up @@ -3266,7 +3261,6 @@ import Mathlib.Tactic.ApplyFun
import Mathlib.Tactic.ApplyWith
import Mathlib.Tactic.Attr.Core
import Mathlib.Tactic.Attr.Register
import Mathlib.Tactic.Backtrack
import Mathlib.Tactic.Basic
import Mathlib.Tactic.ByContra
import Mathlib.Tactic.CancelDenoms
Expand Down Expand Up @@ -3415,7 +3409,6 @@ import Mathlib.Tactic.SimpRw
import Mathlib.Tactic.Simps.Basic
import Mathlib.Tactic.Simps.NotationClass
import Mathlib.Tactic.SlimCheck
import Mathlib.Tactic.SolveByElim
import Mathlib.Tactic.SplitIfs
import Mathlib.Tactic.Spread
import Mathlib.Tactic.Substs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Authors: Kevin Kappelmann
import Mathlib.Algebra.ContinuedFractions.Computation.CorrectnessTerminating
import Mathlib.Data.Nat.Fib.Basic
import Mathlib.Tactic.Monotonicity
import Mathlib.Tactic.SolveByElim
import Std.Tactic.SolveByElim

#align_import algebra.continued_fractions.computation.approximations from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad"

Expand Down
8 changes: 4 additions & 4 deletions Mathlib/Computability/PartrecCode.lean
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,8 @@ theorem evaln_mono : ∀ {k₁ k₂ c n x}, k₁ ≤ k₂ → x ∈ evaln k₁ c
· exact fun y h₁ h₂ => ⟨y, evaln_mono hl' h₁, hg _ _ h₂⟩
· -- rfind' cf
simp? [Bind.bind] at h ⊢ says
simp only [unpaired, bind, pair_unpair, Option.mem_def, Option.bind_eq_some] at h ⊢
simp only [unpaired, bind, pair_unpair, Option.pure_def, Option.mem_def,
Option.bind_eq_some] at h ⊢
refine' h.imp fun x => And.imp (hf _ _) _
by_cases x0 : x = 0 <;> simp [x0]
exact evaln_mono hl'
Expand Down Expand Up @@ -844,8 +845,7 @@ theorem evaln_sound : ∀ {k c n x}, x ∈ evaln k c n → x ∈ eval c n
rcases h with ⟨m, h₁, h₂⟩
by_cases m0 : m = 0 <;> simp [m0] at h₂
· exact
⟨0, ⟨by simpa [m0] using hf _ _ h₁, fun {m} => (Nat.not_lt_zero _).elim⟩, by
injection h₂ with h₂; simp [h₂]⟩
⟨0, ⟨by simpa [m0] using hf _ _ h₁, fun {m} => (Nat.not_lt_zero _).elim⟩, by simp [h₂]⟩
· have := evaln_sound h₂
simp [eval] at this
rcases this with ⟨y, ⟨hy₁, hy₂⟩, rfl⟩
Expand Down Expand Up @@ -908,7 +908,7 @@ theorem evaln_complete {c n x} : x ∈ eval c n ↔ ∃ k, x ∈ evaln k c n :=
induction' y with y IH generalizing m <;> simp [evaln, Bind.bind]
· simp at hy₁
rcases hf hy₁ with ⟨k, hk⟩
exact ⟨_, Nat.le_of_lt_succ <| evaln_bound hk, _, hk, by simp; rfl
exact ⟨_, Nat.le_of_lt_succ <| evaln_bound hk, _, hk, by simp⟩
· rcases hy₂ (Nat.succ_pos _) with ⟨a, ha, a0⟩
rcases hf ha with ⟨k₁, hk₁⟩
rcases IH m.succ (by simpa [Nat.succ_eq_add_one, add_comm, add_left_comm] using hy₁)
Expand Down
26 changes: 0 additions & 26 deletions Mathlib/Data/MLList/Basic.lean

This file was deleted.

6 changes: 3 additions & 3 deletions Mathlib/Data/Nat/PSub.lean
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ theorem psub_eq_sub {m n} (h : n ≤ m) : psub m n = some (m - n) :=
-- Porting note: we only have the simp lemma `Option.bind_some` which uses `Option.bind` not `>>=`
theorem psub_add (m n k) :
psub m (n + k) = (do psub (← psub m n) k) := by
induction k
simp only [zero_eq, add_zero, psub_zero, Option.bind_eq_bind, Option.bind_some]
simp [*, Nat.add_succ]
induction k with
| zero => simp only [zero_eq, add_zero, psub_zero, Option.bind_eq_bind, Option.bind_some]
| succ n ih => simp only [ih, add_succ, psub_succ, bind_assoc]
#align nat.psub_add Nat.psub_add

/-- Same as `psub`, but with a more efficient implementation. -/
Expand Down
206 changes: 0 additions & 206 deletions Mathlib/Data/Nondet/Basic.lean

This file was deleted.

9 changes: 3 additions & 6 deletions Mathlib/Data/Option/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,15 @@ theorem bind_eq_some' {x : Option α} {f : α → Option β} {b : β} :
by cases x <;> simp
#align option.bind_eq_some' Option.bind_eq_some'

theorem bind_eq_none' {o : Option α} {f : α → Option β} :
o.bind f = none ↔ ∀ b a, a ∈ o → b ∉ f a := by
simp only [eq_none_iff_forall_not_mem, mem_def, bind_eq_some, not_exists, not_and]
#align option.bind_eq_none' Option.bind_eq_none'

theorem joinM_eq_join : joinM = @join α :=
funext fun _ ↦ rfl
#align option.join_eq_join Option.joinM_eq_join

theorem bind_eq_bind {α β : Type u} {f : α → Option β} {x : Option α} : x >>= f = x.bind f :=
theorem bind_eq_bind' {α β : Type u} {f : α → Option β} {x : Option α} : x >>= f = x.bind f :=
rfl
#align option.bind_eq_bind Option.bind_eq_bind
#align option.bind_eq_bind Option.bind_eq_bind'

theorem map_coe {α β} {a : α} {f : α → β} : f <$> (a : Option α) = ↑(f a) :=
rfl
Expand Down Expand Up @@ -328,7 +325,7 @@ theorem getD_default_eq_iget [Inhabited α] (o : Option α) :
@[simp]
theorem guard_eq_some' {p : Prop} [Decidable p] (u) : _root_.guard p = some u ↔ p := by
cases u
by_cases h : p <;> simp [_root_.guard, h]; rfl
by_cases h : p <;> simp [_root_.guard, h]
#align option.guard_eq_some' Option.guard_eq_some'

theorem liftOrGet_choice {f : α → α → α} (h : ∀ a b, f a b = a ∨ f a b = b) :
Expand Down