Skip to content
Draft
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
13 changes: 5 additions & 8 deletions Mathlib/Data/Set/Functor.lean
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ instance : LawfulMonad Set where
variable {β : Set α} {γ : Set β}

theorem mem_coe_of_mem {a : α} (ha : a ∈ β) (ha' : ⟨a, ha⟩ ∈ γ) : a ∈ (γ : Set α) :=
_, ⟨⟨_, rfl⟩, _, ⟨ha', rfl⟩, rfl⟩
⟨a, ha⟩, ha', rfl⟩

theorem coe_subset : (γ : Set α) ⊆ β := by
intro _ ⟨_, ⟨⟨⟨_, ha⟩, rfl⟩, _, ⟨_, rfl⟩, _⟩⟩; convert ha
rintro _ ⟨⟨b, hb⟩, ha, rfl⟩; exact hb

theorem mem_of_mem_coe {a : α} (ha : a ∈ (γ : Set α)) : ⟨a, coe_subset ha⟩ ∈ γ := by
rcases ha with ⟨_, ⟨_, rfl⟩, _, ⟨ha, rfl⟩, _⟩; convert ha
rcases ha with ⟨⟨b, hb⟩, hb', rfl⟩; convert hb'

theorem eq_univ_of_coe_eq (hγ : (γ : Set α) = β) : γ = univ :=
eq_univ_of_forall fun ⟨_, ha⟩ => mem_of_mem_coe <| hγ.symm ▸ ha
Expand All @@ -142,11 +142,8 @@ as was defined in `Data.Set.Notation`. -/

attribute [local instance] Set.monad in
/-- The coercion from `Set.monad` as an instance is equal to the coercion in `Data.Set.Notation`. -/
theorem coe_eq_image_val (t : Set s) :
@Lean.Internal.coeM Set s α _ _ t = Subtype.val '' t := by
change ⋃ (x ∈ t), {x.1} = _
ext
simp
@[simp] theorem coe_eq_image_val (t : Set s) :
@Lean.Internal.coeM Set s α _ Set.monad t = Subtype.val '' t := rfl

variable {β : Set α} {γ : Set β} {a : α}

Expand Down
4 changes: 2 additions & 2 deletions lake-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "9eab46cb0b18faa48a241f2e03f7304d4e19ebe0",
"rev": "5cb2df43d82495e4d0ec1327979545427b57e53c",
"name": "batteries",
"manifestFile": "lake-manifest.json",
"inputRev": "nightly-testing",
"inputRev": "lean-pr-testing-10231",
"inherited": false,
"configFile": "lakefile.toml"},
{"url": "https://github.com/leanprover/lean4-cli",
Expand Down
4 changes: 2 additions & 2 deletions lakefile.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ open Lake DSL
## Mathlib dependencies on upstream projects
-/

require "leanprover-community" / "batteries" @ git "nightly-testing"
require "leanprover-community" / "Qq" @ git "nightly-testing"
require "leanprover-community" / "batteries" @ git "lean-pr-testing-10231"
require "leanprover-community" / "Qq" @ git "master"
require "leanprover-community" / "aesop" @ git "nightly-testing"
require "leanprover-community" / "proofwidgets" @ git "v0.0.83-pre2" -- ProofWidgets should always be pinned to a specific version
with NameMap.empty.insert `errorOnBuild
Expand Down
2 changes: 1 addition & 1 deletion lean-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
leanprover/lean4:nightly-2025-12-01
leanprover/lean4-pr-releases:pr-release-10231-08ee111
Loading