Squares, even and odd elements #
This file proves some general facts about squares, even and odd elements of semirings.
In the implementation, we define is_square
and we let even
be the notion transported by
to_additive
. The definition are therefore as follows:
Odd elements are not unified with a multiplicative notion.
Future work #
- TODO: Try to generalize further the typeclass assumptions on
is_square/even
. For instance, in some cases, there aresemiring
assumptions that I (DT) am not convinced are necessary. - TODO: Consider moving the definition and lemmas about
odd
to a separate file. - TODO: The "old" definition of
even a
asked for the existence of an elementc
such thata = 2 * c
. For this reason, several fixes introduce an extratwo_mul
or← two_mul
. It might be the case that by making a careful choice ofsimp
lemma, this can be avoided.
Alias of is_square_iff_exists_sq
.
Alias of is_square_iff_exists_sq
.
Alias of the forwards direction of even_iff_exists_two_nsmul
.
Alias of the backwards direction of even_iff_exists_two_nsmul
.
theorem
is_square.map
{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[mul_one_class α]
[mul_one_class β]
[monoid_hom_class F α β]
{m : α}
(f : F) :
theorem
even.map
{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[add_zero_class α]
[add_zero_class β]
[add_monoid_hom_class F α β]
{m : α}
(f : F) :
theorem
is_square.mul_is_square
{α : Type u_2}
[comm_monoid α]
{m n : α}
(hm : is_square m)
(hn : is_square n) :
theorem
is_square_op_iff
{α : Type u_2}
[group α]
(a : α) :
is_square (mul_opposite.op a) ↔ is_square a
theorem
is_square.div_is_square
{α : Type u_2}
[comm_group α]
{m n : α}
(hm : is_square m)
(hn : is_square n) :
theorem
even.tsub_even
{α : Type u_2}
[canonically_linear_ordered_add_monoid α]
[has_sub α]
[has_ordered_sub α]
[contravariant_class α α has_add.add has_le.le]
{m n : α}
(hm : even m)
(hn : even n) :
Alias of even_iff_exists_bit0
.
Alias of odd_iff_exists_bit1
.
theorem
even.pow_pos
{R : Type u_4}
[linear_ordered_ring R]
{a : R}
{n : ℕ}
(hn : even n)
(ha : a ≠ 0) :
theorem
odd.pow_nonpos
{R : Type u_4}
[linear_ordered_ring R]
{a : R}
{n : ℕ}
(hn : odd n)
(ha : a ≤ 0) :
theorem
odd.pow_neg
{R : Type u_4}
[linear_ordered_ring R]
{a : R}
{n : ℕ}
(hn : odd n)
(ha : a < 0) :
theorem
even.pow_pos_iff
{R : Type u_4}
[linear_ordered_ring R]
{a : R}
{n : ℕ}
(hn : even n)
(h₀ : 0 < n) :
theorem
odd.strict_mono_pow
{R : Type u_4}
[linear_ordered_ring R]
{n : ℕ}
(hn : odd n) :
strict_mono (λ (a : R), a ^ n)
@[protected]
theorem
even.zpow_pos
{K : Type u_5}
[linear_ordered_field K]
{n : ℤ}
{a : K}
(hn : even n)
(ha : a ≠ 0) :
@[protected]
theorem
odd.zpow_nonneg
{K : Type u_5}
[linear_ordered_field K]
{n : ℤ}
{a : K}
(hn : odd n)
(ha : 0 ≤ a) :
theorem
odd.zpow_pos
{K : Type u_5}
[linear_ordered_field K]
{n : ℤ}
{a : K}
(hn : odd n)
(ha : 0 < a) :
theorem
odd.zpow_nonpos
{K : Type u_5}
[linear_ordered_field K]
{n : ℤ}
{a : K}
(hn : odd n)
(ha : a ≤ 0) :
theorem
odd.zpow_neg
{K : Type u_5}
[linear_ordered_field K]
{n : ℤ}
{a : K}
(hn : odd n)
(ha : a < 0) :