Skip to content

Commit 048b120

Browse files
committed
fix counterexamples
1 parent 94663ee commit 048b120

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

Counterexamples/CanonicallyOrderedCommSemiringTwoMul.lean

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ import Mathlib.Algebra.Order.Monoid.Basic
1111

1212
/-!
1313
14-
A `CanonicallyOrderedCommSemiring` with two different elements `a` and `b` such that
14+
A canonically ordered commutative semiring with two different elements `a` and `b` such that
1515
`a ≠ b` and `2 * a = 2 * b`. Thus, multiplication by a fixed non-zero element of a canonically
1616
ordered semiring need not be injective. In particular, multiplying by a strictly positive element
1717
need not be strictly monotone.
1818
19-
Recall that a `CanonicallyOrderedCommSemiring` is a commutative semiring with a partial ordering
20-
that is "canonical" in the sense that the inequality `a ≤ b` holds if and only if there is a `c`
21-
such that `a + c = b`. There are several compatibility conditions among addition/multiplication
22-
and the order relation. The point of the counterexample is to show that monotonicity of
23-
multiplication cannot be strengthened to **strict** monotonicity.
19+
Recall that a canonically ordered commutative semiring is a commutative semiring with a partial
20+
ordering that is "canonical" in the sense that the inequality `a ≤ b` holds if and only if there is
21+
a `c` such that `a + c = b`. There are several compatibility conditions among
22+
addition/multiplication and the order relation. The point of the counterexample is to show that
23+
monotonicity of multiplication cannot be strengthened to **strict** monotonicity.
2424
2525
Reference:
2626
https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/canonically_ordered.20pathology
@@ -255,14 +255,15 @@ theorem eq_zero_or_eq_zero_of_mul_eq_zero : ∀ a b : L, a * b = 0 → a = 0 ∨
255255
· exact (hb rfl).elim
256256
#align counterexample.ex_L.eq_zero_or_eq_zero_of_mul_eq_zero Counterexample.ExL.eq_zero_or_eq_zero_of_mul_eq_zero
257257

258-
instance can : CanonicallyOrderedCommSemiring L :=
259-
{ (inferInstance : OrderBot L),
260-
(inferInstance :
261-
OrderedCommSemiring L) with
262-
exists_add_of_le := @(exists_add_of_le)
263-
le_self_add := le_self_add
264-
eq_zero_or_eq_zero_of_mul_eq_zero := @(eq_zero_or_eq_zero_of_mul_eq_zero) }
265-
#align counterexample.ex_L.can Counterexample.ExL.can
258+
instance : OrderedCommSemiring L := inferInstance
259+
260+
instance : CanonicallyOrderedAdd L where
261+
exists_add_of_le := @(exists_add_of_le)
262+
le_self_add := le_self_add
263+
le_add_self a b := by rw [add_comm]; exact le_self_add _ _
264+
265+
instance : NoZeroDivisors L where
266+
eq_zero_or_eq_zero_of_mul_eq_zero := @(eq_zero_or_eq_zero_of_mul_eq_zero)
266267

267268
/-- The elements `(1,0)` and `(1,1)` of `L` are different, but their doubles coincide.
268269
-/

0 commit comments

Comments
 (0)