Skip to content

Commit 5e4aad6

Browse files
committed
fix stage2
1 parent e46a4ca commit 5e4aad6

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/Init/Data/Fin/Lemmas.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ For example, for `x : Fin k` and `n : Nat`,
118118
it causes `x < n` to be elaborated as `x < ↑n` rather than `↑x < n`,
119119
silently introducing wraparound arithmetic.
120120
-/
121-
@[expose]
121+
@[expose, instance_reducible]
122122
def instNatCast (n : Nat) [NeZero n] : NatCast (Fin n) where
123123
natCast a := Fin.ofNat n a
124124

@@ -140,7 +140,7 @@ This is not a global instance, but may be activated locally via `open Fin.IntCas
140140
141141
See the doc-string for `Fin.NatCast.instNatCast` for more details.
142142
-/
143-
@[expose]
143+
@[expose, instance_reducible]
144144
def instIntCast (n : Nat) [NeZero n] : IntCast (Fin n) where
145145
intCast := Fin.intCast
146146

src/Init/Data/Ord/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -616,14 +616,14 @@ end List
616616
Constructs an `BEq` instance from an `Ord` instance that asserts that the result of `compare` is
617617
`Ordering.eq`.
618618
-/
619-
@[expose] def beqOfOrd [Ord α] : BEq α where
619+
@[expose, instance_reducible] def beqOfOrd [Ord α] : BEq α where
620620
beq a b := (compare a b).isEq
621621

622622
/--
623623
Constructs an `LT` instance from an `Ord` instance that asserts that the result of `compare` is
624624
`Ordering.lt`.
625625
-/
626-
@[expose] def ltOfOrd [Ord α] : LT α where
626+
@[expose, instance_reducible] def ltOfOrd [Ord α] : LT α where
627627
lt a b := compare a b = Ordering.lt
628628

629629
@[inline]

src/Init/Data/Order/FactoriesExtra.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public def _root_.DecidableLT.ofOrd (α : Type u) [LE α] [LT α] [Ord α] [Lawf
8282

8383
/--
8484
Creates a `BEq α` instance from an `Ord α` instance. -/
85-
@[inline, expose]
85+
@[inline, expose, instance_reducible]
8686
public def _root_.BEq.ofOrd (α : Type u) [Ord α] :
8787
BEq α where
8888
beq a b := compare a b = .eq

src/Init/Data/UInt/Basic.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ Examples:
373373
* `(if (5 : UInt16) < 5 then "yes" else "no") = "no"`
374374
* `show ¬((7 : UInt16) < 7) by decide`
375375
-/
376-
@[extern "lean_uint16_dec_lt"]
376+
@[extern "lean_uint16_dec_lt", instance_reducible]
377377
def UInt16.decLt (a b : UInt16) : Decidable (a < b) :=
378378
inferInstanceAs (Decidable (a.toBitVec < b.toBitVec))
379379

@@ -390,7 +390,7 @@ Examples:
390390
* `(if (5 : UInt16) ≤ 15 then "yes" else "no") = "yes"`
391391
* `show (7 : UInt16) ≤ 7 by decide`
392392
-/
393-
@[extern "lean_uint16_dec_le"]
393+
@[extern "lean_uint16_dec_le", instance_reducible]
394394
def UInt16.decLe (a b : UInt16) : Decidable (a ≤ b) :=
395395
inferInstanceAs (Decidable (a.toBitVec ≤ b.toBitVec))
396396

@@ -737,7 +737,7 @@ Examples:
737737
* `(if (5 : UInt64) < 5 then "yes" else "no") = "no"`
738738
* `show ¬((7 : UInt64) < 7) by decide`
739739
-/
740-
@[extern "lean_uint64_dec_lt"]
740+
@[extern "lean_uint64_dec_lt", instance_reducible]
741741
def UInt64.decLt (a b : UInt64) : Decidable (a < b) :=
742742
inferInstanceAs (Decidable (a.toBitVec < b.toBitVec))
743743

@@ -753,7 +753,7 @@ Examples:
753753
* `(if (5 : UInt64) ≤ 15 then "yes" else "no") = "yes"`
754754
* `show (7 : UInt64) ≤ 7 by decide`
755755
-/
756-
@[extern "lean_uint64_dec_le"]
756+
@[extern "lean_uint64_dec_le", instance_reducible]
757757
def UInt64.decLe (a b : UInt64) : Decidable (a ≤ b) :=
758758
inferInstanceAs (Decidable (a.toBitVec ≤ b.toBitVec))
759759

0 commit comments

Comments
 (0)