File tree Expand file tree Collapse file tree 2 files changed +10
-19
lines changed Expand file tree Collapse file tree 2 files changed +10
-19
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,15 @@ instance instBoundedOrder [NeZero n] : BoundedOrder (Fin n) where
52
52
bot := 0
53
53
bot_le := Fin.zero_le'
54
54
55
+ @[simp, norm_cast]
56
+ theorem coe_max (a b : Fin n) : ↑(max a b) = (max a b : ℕ) := rfl
57
+
58
+ @[simp, norm_cast]
59
+ theorem coe_min (a b : Fin n) : ↑(min a b) = (min a b : ℕ) := rfl
60
+
61
+ @[deprecated (since := "2025-03-01")] alias coe_sup := coe_max
62
+ @[deprecated (since := "2025-03-01")] alias coe_inf := coe_min
63
+
55
64
/- There is a slight asymmetry here, in the sense that `0` is of type `Fin n` when we have
56
65
`[NeZero n]` whereas `last n` is of type `Fin (n + 1)`. To address this properly would
57
66
require a change to std4, defining `NeZero n` and thus re-defining `last n`
Original file line number Diff line number Diff line change @@ -14,25 +14,7 @@ intervals as Finsets and Fintypes.
14
14
15
15
assert_not_exists MonoidWithZero
16
16
17
- namespace Fin
18
-
19
- variable {n : ℕ} (a b : Fin n)
20
-
21
- @[simp, norm_cast]
22
- theorem coe_sup : ↑(a ⊔ b) = (a ⊔ b : ℕ) := rfl
23
-
24
- @[simp, norm_cast]
25
- theorem coe_inf : ↑(a ⊓ b) = (a ⊓ b : ℕ) := rfl
26
-
27
- @[simp, norm_cast]
28
- theorem coe_max : ↑(max a b) = (max a b : ℕ) := rfl
29
-
30
- @[simp, norm_cast]
31
- theorem coe_min : ↑(min a b) = (min a b : ℕ) := rfl
32
-
33
- end Fin
34
-
35
- open Finset Fin Function
17
+ open Finset Function
36
18
37
19
namespace Fin
38
20
You can’t perform that action at this time.
0 commit comments