Skip to content

chore: adaptations for lean4#12325 (classDefReducibility)#195

Open
kim-em wants to merge 11 commits intonightly-testing-2026-03-02from
lean-pr-testing-12325
Open

chore: adaptations for lean4#12325 (classDefReducibility)#195
kim-em wants to merge 11 commits intonightly-testing-2026-03-02from
lean-pr-testing-12325

Conversation

@kim-em
Copy link
Copy Markdown

@kim-em kim-em commented Mar 6, 2026

This PR adds @[implicit_reducible] to class-typed defs where safe, and disables the classDefReducibility warning where adding the attribute causes downstream breakage, for leanprover/lean4#12325.

🤖 Prepared with Claude Code

leanprover-community-mathlib4-bot and others added 9 commits February 5, 2026 13:14
Add `@[implicit_reducible]` to class-typed `def`s where safe, and
disable the warning with `set_option warn.classDefReducibility false in`
where adding the attribute causes downstream breakage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The new toolchain version of lean4#12325 exempts `Setoid` from the
classDefReducibility warning, so these suppressions are no longer needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kim-em
Copy link
Copy Markdown
Author

kim-em commented Mar 6, 2026

!radar

@kim-em kim-em changed the base branch from nightly-testing to nightly-testing-2026-03-02 March 6, 2026 00:32
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kim-em
Copy link
Copy Markdown
Author

kim-em commented Mar 6, 2026

!radar

@leanprover-radar
Copy link
Copy Markdown

leanprover-radar commented Mar 6, 2026

Benchmark results for d6d02d2 against 6ef7a9d are in! @kim-em

  • build//instructions: +40.9G (+0.02%)

No significant changes detected.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

set_option backward.isDefEq.respectTransparency false in
/-- Any ring with a `ZMod p`-module structure can be upgraded to a `ZMod p`-algebra. Not an
@[implicit_reducible]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@[implicit_reducible]

variable (K)

/-- `CSA` equipped with Brauer Equivalence is indeed a setoid. -/
@[implicit_reducible]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@[implicit_reducible]

/-- The setoid given by the equivalence relation `Zigzag`. A quotient for this
setoid is a connected component of the category.
-/
@[implicit_reducible]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@[implicit_reducible]


/-- Two vertices are related in the zigzag setoid if there is a
zigzag of arrows from one to the other. -/
@[implicit_reducible]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@[implicit_reducible]

intro i j; obtain ⟨p, _⟩ := h i j; exact ⟨p⟩

/-- Equivalence relation identifying vertices connected by directed paths in both directions. -/
@[implicit_reducible]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@[implicit_reducible]

@@ -471,6 +471,7 @@ end Preconnected

section connectedComponentSetoid
/-- The setoid of connected components of a topological space -/
@[implicit_reducible]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@[implicit_reducible]

@@ -99,6 +99,7 @@ theorem Joined.inv {G : Type*} [Inv G] [TopologicalSpace G] [ContinuousInv G]
variable (X)

/-- The setoid corresponding the equivalence relation of being joined by a continuous path. -/
@[implicit_reducible]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@[implicit_reducible]

@@ -231,6 +231,7 @@ def specializationPreorder : Preorder X :=
lt := fun x y => y ⤳ x ∧ ¬x ⤳ y }

/-- A `setoid` version of `Inseparable`, used to define the `SeparationQuotient`. -/
@[implicit_reducible]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@[implicit_reducible]

@@ -447,6 +447,7 @@ theorem ordConnected_setOf_eball_subset (x : α) (s : Set α) : OrdConnected { r
⟨fun _ _ _ h₁ _ h₂ => (eball_subset_eball h₂.2).trans h₁⟩

/-- Relation “two points are at a finite edistance” is an equivalence relation. -/
@[implicit_reducible]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@[implicit_reducible]

@@ -404,6 +404,7 @@ section
variable (X)

/-- The smallest equivalence relation on a topological space giving a T2 quotient. -/
@[implicit_reducible]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@[implicit_reducible]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants