This PR renames `instance_reducible` to `implicit_reducible` and adds a new `backward.isDefEq.implicitBump` option to prepare for treating all implicit arguments uniformly during definitional equality checking. ## Changes **Rename `instance_reducible` → `implicit_reducible`:** - Rename `ReducibilityStatus.instanceReducible` constructor to `implicitReducible` - Register new `[implicit_reducible]` attribute, keep `[instance_reducible]` as alias - Rename `isInstanceReducible` → `isImplicitReducible` (with deprecated aliases) - Update all references across src/ and tests/ The rename reflects that this reducibility level is used not just for instances but for any definition that needs unfolding during implicit argument resolution (e.g., `Nat.add`, `Array.size`). **Add `backward.isDefEq.implicitBump` option:** - When `true` (+ `respectTransparency`), bumps transparency to `.instances` for ALL implicit arguments in `isDefEqArgs`, not just instance-implicit ones - Defaults to `false` for staging compatibility — will be flipped to `true` after stage0 update - Adds `// update me!` to `stage0/src/stdlib_flags.h` to trigger CI stage0 update ## Follow-up (after stage0 update) - Flip `backward.isDefEq.implicitBump` default to `true` - Fix resulting test/module failures 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
34 lines
727 B
Text
34 lines
727 B
Text
module
|
|
|
|
/-! Reducibility of instances should default to `[instance_reducible]` but be overridable. -/
|
|
|
|
instance i1 : Inhabited Nat := inferInstance
|
|
|
|
/--
|
|
info: @[implicit_reducible] private def i1 : Inhabited Nat :=
|
|
inferInstance
|
|
-/
|
|
#guard_msgs in
|
|
#print i1
|
|
|
|
@[reducible] instance i2 : Inhabited Nat := inferInstance
|
|
|
|
/--
|
|
info: @[reducible] private def i2 : Inhabited Nat :=
|
|
inferInstance
|
|
-/
|
|
#guard_msgs in
|
|
#print i2
|
|
|
|
/--
|
|
warning: instance `_private.lean.run.instanceReducibility.0.i3` must be marked with `@[reducible]` or `@[implicit_reducible]`
|
|
-/
|
|
#guard_msgs in
|
|
@[irreducible] instance i3 : Inhabited Nat := inferInstance
|
|
|
|
/--
|
|
info: @[irreducible] private def i3 : Inhabited Nat :=
|
|
inferInstance
|
|
-/
|
|
#guard_msgs in
|
|
#print i3
|