A canonically_ordered_comm_semiring
with two different elements a
and b
such that
a ≠ b
and 2 * a = 2 * b
. Thus, multiplication by a fixed non-zero element of a canonically
ordered semiring need not be injective. In particular, multiplying by a strictly positive element
need not be strictly monotone.
Recall that a canonically_ordered_comm_semiring
is a commutative semiring with a partial ordering
that is "canonical" in the sense that the inequality a ≤ b
holds if and only if there is a c
such that a + c = b
. There are several compatibility conditions among addition/multiplication
and the order relation. The point of the counterexample is to show that monotonicity of
multiplication cannot be strengthened to strict monotonicity.
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
Bhavik Mehta's example. There are only the initial definitions, but no proofs. The Type
K
is a canonically ordered commutative semiring with the property that 2 * (1/2) ≤ 2 * 1
, even
though it is not true that 1/2 ≤ 1
, since 1/2
and 1
are not comparable.
Equations
Instances for counterexample.from_Bhavik.K
Equations
- counterexample.from_Bhavik.rat.has_coe = {coe := λ (x : counterexample.from_Bhavik.K), x.val}
Equations
Equations
- counterexample.from_Bhavik.K.preorder = {le := λ (x y : counterexample.from_Bhavik.K), x = y ∨ ↑x + 1 ≤ ↑y, lt := λ (a b : counterexample.from_Bhavik.K), (a = b ∨ ↑a + 1 ≤ ↑b) ∧ ¬(b = a ∨ ↑b + 1 ≤ ↑a), le_refl := counterexample.from_Bhavik.K.preorder._proof_1, le_trans := counterexample.from_Bhavik.K.preorder._proof_2, lt_iff_le_not_le := counterexample.from_Bhavik.K.preorder._proof_3}
The preorder relation on ℕ × ℤ/2ℤ
where we only compare the first coordinate,
except that we leave incomparable each pair of elements with the same first component.
For instance, ∀ α, β ∈ ℤ/2ℤ
, the inequality (1,α) ≤ (2,β)
holds,
whereas, ∀ n ∈ ℤ
, the elements (n,0)
and (n,1)
are incomparable.
Equations
- counterexample.Nxzmod_2.preN2 = {le := λ (x y : ℕ × zmod 2), x = y ∨ x.fst < y.fst, lt := preorder.lt._default (λ (x y : ℕ × zmod 2), x = y ∨ x.fst < y.fst), le_refl := counterexample.Nxzmod_2.preN2._proof_1, le_trans := counterexample.Nxzmod_2.preN2._proof_2, lt_iff_le_not_le := counterexample.Nxzmod_2.preN2._proof_3, le_antisymm := counterexample.Nxzmod_2.preN2._proof_4}
Equations
Equations
- counterexample.Nxzmod_2.csrN2_1 = {add := comm_semiring.add counterexample.Nxzmod_2.csrN2, add_assoc := counterexample.Nxzmod_2.csrN2_1._proof_1, add_left_cancel := counterexample.Nxzmod_2.csrN2_1._proof_2, zero := comm_semiring.zero counterexample.Nxzmod_2.csrN2, zero_add := counterexample.Nxzmod_2.csrN2_1._proof_3, add_zero := counterexample.Nxzmod_2.csrN2_1._proof_4, nsmul := comm_semiring.nsmul counterexample.Nxzmod_2.csrN2, nsmul_zero' := counterexample.Nxzmod_2.csrN2_1._proof_5, nsmul_succ' := counterexample.Nxzmod_2.csrN2_1._proof_6, add_comm := counterexample.Nxzmod_2.csrN2_1._proof_7}
Equations
- counterexample.Nxzmod_2.prod.zero_le_one_class = {zero_le_one := counterexample.Nxzmod_2.prod.zero_le_one_class._proof_1}
Equations
- counterexample.Nxzmod_2.socsN2 = {add := add_cancel_comm_monoid.add counterexample.Nxzmod_2.csrN2_1, add_assoc := counterexample.Nxzmod_2.socsN2._proof_1, zero := add_cancel_comm_monoid.zero counterexample.Nxzmod_2.csrN2_1, zero_add := counterexample.Nxzmod_2.socsN2._proof_2, add_zero := counterexample.Nxzmod_2.socsN2._proof_3, nsmul := add_cancel_comm_monoid.nsmul counterexample.Nxzmod_2.csrN2_1, nsmul_zero' := counterexample.Nxzmod_2.socsN2._proof_4, nsmul_succ' := counterexample.Nxzmod_2.socsN2._proof_5, add_comm := counterexample.Nxzmod_2.socsN2._proof_6, mul := comm_semiring.mul infer_instance, left_distrib := counterexample.Nxzmod_2.socsN2._proof_7, right_distrib := counterexample.Nxzmod_2.socsN2._proof_8, zero_mul := counterexample.Nxzmod_2.socsN2._proof_9, mul_zero := counterexample.Nxzmod_2.socsN2._proof_10, mul_assoc := counterexample.Nxzmod_2.socsN2._proof_11, one := comm_semiring.one infer_instance, one_mul := counterexample.Nxzmod_2.socsN2._proof_12, mul_one := counterexample.Nxzmod_2.socsN2._proof_13, nat_cast := comm_semiring.nat_cast infer_instance, nat_cast_zero := counterexample.Nxzmod_2.socsN2._proof_14, nat_cast_succ := counterexample.Nxzmod_2.socsN2._proof_15, npow := comm_semiring.npow infer_instance, npow_zero' := counterexample.Nxzmod_2.socsN2._proof_16, npow_succ' := counterexample.Nxzmod_2.socsN2._proof_17, le := partial_order.le infer_instance, lt := partial_order.lt infer_instance, le_refl := counterexample.Nxzmod_2.socsN2._proof_18, le_trans := counterexample.Nxzmod_2.socsN2._proof_19, lt_iff_le_not_le := counterexample.Nxzmod_2.socsN2._proof_20, le_antisymm := counterexample.Nxzmod_2.socsN2._proof_21, add_le_add_left := counterexample.Nxzmod_2.add_le_add_left, le_of_add_le_add_left := counterexample.Nxzmod_2.le_of_add_le_add_left, exists_pair_ne := counterexample.Nxzmod_2.socsN2._proof_22, zero_le_one := counterexample.Nxzmod_2.socsN2._proof_23, mul_lt_mul_of_pos_left := counterexample.Nxzmod_2.mul_lt_mul_of_pos_left, mul_lt_mul_of_pos_right := counterexample.Nxzmod_2.mul_lt_mul_of_pos_right, mul_comm := counterexample.Nxzmod_2.socsN2._proof_24}
Initially, L
was defined as the subsemiring closure of (1,0)
.
Equations
- counterexample.ex_L.L = {l // l ≠ (0, 1)}
Instances for counterexample.ex_L.L
The subsemiring corresponding to the elements of L
, used to transfer instances.
Equations
- counterexample.ex_L.L_subsemiring = {carrier := {l : ℕ × zmod 2 | l ≠ (0, 1)}, mul_mem' := counterexample.ex_L.L_subsemiring._proof_1, one_mem' := counterexample.ex_L.L_subsemiring._proof_2, add_mem' := counterexample.ex_L.L_subsemiring._proof_3, zero_mem' := counterexample.ex_L.L_subsemiring._proof_4}
Equations
Equations
Equations
- counterexample.ex_L.can = {add := ordered_comm_semiring.add infer_instance, add_assoc := counterexample.ex_L.can._proof_1, zero := ordered_comm_semiring.zero infer_instance, zero_add := counterexample.ex_L.can._proof_2, add_zero := counterexample.ex_L.can._proof_3, nsmul := ordered_comm_semiring.nsmul infer_instance, nsmul_zero' := counterexample.ex_L.can._proof_4, nsmul_succ' := counterexample.ex_L.can._proof_5, add_comm := counterexample.ex_L.can._proof_6, le := ordered_comm_semiring.le infer_instance, lt := ordered_comm_semiring.lt infer_instance, le_refl := counterexample.ex_L.can._proof_7, le_trans := counterexample.ex_L.can._proof_8, lt_iff_le_not_le := counterexample.ex_L.can._proof_9, le_antisymm := counterexample.ex_L.can._proof_10, add_le_add_left := counterexample.ex_L.can._proof_11, bot := order_bot.bot infer_instance, bot_le := counterexample.ex_L.can._proof_12, exists_add_of_le := counterexample.ex_L.exists_add_of_le, le_self_add := counterexample.ex_L.le_self_add, mul := ordered_comm_semiring.mul infer_instance, left_distrib := counterexample.ex_L.can._proof_13, right_distrib := counterexample.ex_L.can._proof_14, zero_mul := counterexample.ex_L.can._proof_15, mul_zero := counterexample.ex_L.can._proof_16, mul_assoc := counterexample.ex_L.can._proof_17, one := ordered_comm_semiring.one infer_instance, one_mul := counterexample.ex_L.can._proof_18, mul_one := counterexample.ex_L.can._proof_19, nat_cast := ordered_comm_semiring.nat_cast infer_instance, nat_cast_zero := counterexample.ex_L.can._proof_20, nat_cast_succ := counterexample.ex_L.can._proof_21, npow := ordered_comm_semiring.npow infer_instance, npow_zero' := counterexample.ex_L.can._proof_22, npow_succ' := counterexample.ex_L.can._proof_23, mul_comm := counterexample.ex_L.can._proof_24, eq_zero_or_eq_zero_of_mul_eq_zero := counterexample.ex_L.eq_zero_or_eq_zero_of_mul_eq_zero}