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>
47 lines
2.7 KiB
Text
47 lines
2.7 KiB
Text
FooAC.mk {α : Type} [toFooComm : FooComm α] [toMul : Mul.{0} α]
|
||
(add_assoc :
|
||
∀ (a b c : α),
|
||
@Eq.{1} α
|
||
(@HAdd.hAdd.{0, 0, 0} α α α (@instHAdd.{0} α (@Foo.toAdd α (@FooComm.toFoo α toFooComm)))
|
||
(@HAdd.hAdd.{0, 0, 0} α α α (@instHAdd.{0} α (@Foo.toAdd α (@FooComm.toFoo α toFooComm))) a b) c)
|
||
(@HAdd.hAdd.{0, 0, 0} α α α (@instHAdd.{0} α (@Foo.toAdd α (@FooComm.toFoo α toFooComm))) a
|
||
(@HAdd.hAdd.{0, 0, 0} α α α (@instHAdd.{0} α (@Foo.toAdd α (@FooComm.toFoo α toFooComm))) b c)))
|
||
(mul_assoc :
|
||
∀ (a b c : α),
|
||
@Eq.{1} α
|
||
(@HMul.hMul.{0, 0, 0} α α α (@instHMul.{0} α toMul) (@HMul.hMul.{0, 0, 0} α α α (@instHMul.{0} α toMul) a b) c)
|
||
(@HMul.hMul.{0, 0, 0} α α α (@instHMul.{0} α toMul) a (@HMul.hMul.{0, 0, 0} α α α (@instHMul.{0} α toMul) b c)))
|
||
(mul_comm :
|
||
∀ (a b : α),
|
||
@Eq.{1} α (@HMul.hMul.{0, 0, 0} α α α (@instHMul.{0} α toMul) a b)
|
||
(@HMul.hMul.{0, 0, 0} α α α (@instHMul.{0} α toMul) b a)) :
|
||
FooAC α
|
||
@[implicit_reducible] def FooAC.toFooAssoc : {α : Type} → [self : FooAC α] → FooAssoc α :=
|
||
fun (α : Type) (self : FooAC α) =>
|
||
@FooAssoc.mk α (@FooComm.toFoo α (@FooAC.toFooComm α self)) (@FooAC.toMul α self) (@FooAC.add_assoc α self)
|
||
(@FooAC.mul_assoc α self)
|
||
FooAC'.mk {α : Type} [toFooComm : FooComm α] [toMul : Mul.{0} α]
|
||
(add_assoc :
|
||
∀ (a b c : α),
|
||
@Eq.{1} α
|
||
(@HAdd.hAdd.{0, 0, 0} α α α (@instHAdd.{0} α (@Foo.toAdd α (@FooComm.toFoo α toFooComm)))
|
||
(@HAdd.hAdd.{0, 0, 0} α α α (@instHAdd.{0} α (@Foo.toAdd α (@FooComm.toFoo α toFooComm))) a b) c)
|
||
(@HAdd.hAdd.{0, 0, 0} α α α (@instHAdd.{0} α (@Foo.toAdd α (@FooComm.toFoo α toFooComm))) a
|
||
(@HAdd.hAdd.{0, 0, 0} α α α (@instHAdd.{0} α (@Foo.toAdd α (@FooComm.toFoo α toFooComm))) b c)))
|
||
(mul_assoc :
|
||
∀ (a b c : α),
|
||
@Eq.{1} α
|
||
(@HMul.hMul.{0, 0, 0} α α α (@instHMul.{0} α toMul) (@HMul.hMul.{0, 0, 0} α α α (@instHMul.{0} α toMul) a b) c)
|
||
(@HMul.hMul.{0, 0, 0} α α α (@instHMul.{0} α toMul) a (@HMul.hMul.{0, 0, 0} α α α (@instHMul.{0} α toMul) b c)))
|
||
(one : α)
|
||
(mul_comm :
|
||
∀ (a b : α),
|
||
@Eq.{1} α (@HMul.hMul.{0, 0, 0} α α α (@instHMul.{0} α toMul) a b)
|
||
(@HMul.hMul.{0, 0, 0} α α α (@instHMul.{0} α toMul) b a)) :
|
||
FooAC' α
|
||
@[implicit_reducible] def FooAC'.toFooAssoc' : {α : Type} → [self : FooAC' α] → FooAssoc' α :=
|
||
fun (α : Type) (self : FooAC' α) =>
|
||
@FooAssoc'.mk α
|
||
(@FooAssoc.mk α (@FooComm.toFoo α (@FooAC'.toFooComm α self)) (@FooAC'.toMul α self) (@FooAC'.add_assoc α self)
|
||
(@FooAC'.mul_assoc α self))
|
||
(@FooAC'.one α self)
|