Skip to content

Commit 5aff12a

Browse files
committed
chore(Data/Sign/Defs): remove backward.privateInPublic (leanprover-community#33197)
1 parent e315e52 commit 5aff12a

1 file changed

Lines changed: 7 additions & 25 deletions

File tree

Mathlib/Data/Sign/Defs.lean

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,9 @@ protected inductive LE : SignType → SignType → Prop
7676
instance : LE SignType :=
7777
⟨SignType.LE⟩
7878

79-
instance LE.decidableRel : DecidableRel SignType.LE := fun a b => by
79+
instance : DecidableLE SignType := fun a b => by
8080
cases a <;> cases b <;> first | exact isTrue (by constructor) | exact isFalse (by rintro ⟨_⟩)
8181

82-
set_option backward.privateInPublic true in
83-
private lemma mul_comm : ∀ (a b : SignType), a * b = b * a := by rintro ⟨⟩ ⟨⟩ <;> rfl
84-
set_option backward.privateInPublic true in
85-
private lemma mul_assoc : ∀ (a b c : SignType), (a * b) * c = a * (b * c) := by
86-
rintro ⟨⟩ ⟨⟩ ⟨⟩ <;> rfl
87-
88-
set_option backward.privateInPublic true in
89-
set_option backward.privateInPublic.warn false in
9082
/- We can define a `Field` instance on `SignType`, but it's not mathematically sensible,
9183
so we only define the `CommGroupWithZero`. -/
9284
instance : CommGroupWithZero SignType where
@@ -96,27 +88,17 @@ instance : CommGroupWithZero SignType where
9688
mul_one a := by cases a <;> rfl
9789
one_mul a := by cases a <;> rfl
9890
mul_inv_cancel a ha := by cases a <;> trivial
99-
mul_comm := mul_comm
100-
mul_assoc := mul_assoc
91+
mul_comm := by decide
92+
mul_assoc := by decide
10193
exists_pair_ne := ⟨0, 1, by rintro ⟨_⟩⟩
10294
inv_zero := rfl
10395

104-
set_option backward.privateInPublic true in
105-
private lemma le_antisymm (a b : SignType) (_ : a ≤ b) (_ : b ≤ a) : a = b := by
106-
cases a <;> cases b <;> trivial
107-
108-
set_option backward.privateInPublic true in
109-
private lemma le_trans (a b c : SignType) (_ : a ≤ b) (_ : b ≤ c) : a ≤ c := by
110-
cases a <;> cases b <;> cases c <;> tauto
111-
112-
set_option backward.privateInPublic true in
113-
set_option backward.privateInPublic.warn false in
11496
instance : LinearOrder SignType where
11597
le_refl a := by cases a <;> constructor
116-
le_total a b := by cases a <;> cases b <;> first | left; constructor | right; constructor
117-
le_antisymm := le_antisymm
118-
le_trans := le_trans
119-
toDecidableLE := LE.decidableRel
98+
le_total := by decide
99+
le_antisymm := by decide
100+
le_trans := by decide
101+
toDecidableLE := instDecidableLE
120102

121103
instance : BoundedOrder SignType where
122104
top := 1

0 commit comments

Comments
 (0)