refactor(library/algebra/order.lean): rename a field in an order structure
This commit is contained in:
parent
d8e40d90d6
commit
7a1064b7e8
4 changed files with 19 additions and 19 deletions
|
@ -116,7 +116,7 @@ wf.rec_on x H
|
|||
/- structures with a weak and a strict order -/
|
||||
|
||||
structure order_pair [class] (A : Type) extends weak_order A, has_lt A :=
|
||||
(lt_iff_le_ne : ∀a b, lt a b ↔ (le a b ∧ a ≠ b))
|
||||
(lt_iff_le_and_ne : ∀a b, lt a b ↔ (le a b ∧ a ≠ b))
|
||||
|
||||
section
|
||||
variable [s : order_pair A]
|
||||
|
@ -124,7 +124,7 @@ section
|
|||
include s
|
||||
|
||||
theorem lt_iff_le_and_ne : a < b ↔ (a ≤ b ∧ a ≠ b) :=
|
||||
!order_pair.lt_iff_le_ne
|
||||
!order_pair.lt_iff_le_and_ne
|
||||
|
||||
theorem le_of_lt (H : a < b) : a ≤ b :=
|
||||
and.elim_left (iff.mp lt_iff_le_and_ne H)
|
||||
|
@ -246,7 +246,7 @@ definition strict_order_with_le.to_order_pair [instance] [coercion] [reducible]
|
|||
le_refl := le_refl s,
|
||||
le_trans := le_trans s,
|
||||
le_antisymm := le_antisymm s,
|
||||
lt_iff_le_ne := lt_iff_le_ne s ⦄
|
||||
lt_iff_le_and_ne := lt_iff_le_ne s ⦄
|
||||
|
||||
/- linear orders -/
|
||||
|
||||
|
|
|
@ -229,7 +229,7 @@ section
|
|||
le_trans := @le.trans,
|
||||
le_antisymm := @le.antisymm,
|
||||
lt := lt,
|
||||
lt_iff_le_ne := lt_iff_le_and_ne,
|
||||
lt_iff_le_and_ne := lt_iff_le_and_ne,
|
||||
add_le_add_left := @add_le_add_left,
|
||||
mul_nonneg := @mul_nonneg,
|
||||
mul_pos := @mul_pos,
|
||||
|
|
|
@ -158,7 +158,7 @@ section
|
|||
le_antisymm := @le.antisymm,
|
||||
le_total := @le.total,
|
||||
le_iff_lt_or_eq := @le_iff_lt_or_eq,
|
||||
lt_iff_le_ne := lt_iff_le_and_ne,
|
||||
lt_iff_le_and_ne := lt_iff_le_and_ne,
|
||||
add_le_add_left := @add_le_add_left,
|
||||
le_of_add_le_add_left := @le_of_add_le_add_left,
|
||||
zero_ne_one := ne.symm (succ_ne_zero zero),
|
||||
|
|
|
@ -198,7 +198,7 @@ theorem mul_pos (H1 : a > 0) (H2 : b > 0) : a * b > 0 :=
|
|||
have H : pos (a * b), from pos_mul (!sub_zero ▸ H1) (!sub_zero ▸ H2),
|
||||
!sub_zero⁻¹ ▸ H
|
||||
|
||||
definition has_decidable_lt [instance] : decidable_rel rat.lt :=
|
||||
definition decidable_lt [instance] : decidable_rel rat.lt :=
|
||||
take a b, decidable_pos (b - a)
|
||||
|
||||
section
|
||||
|
@ -212,12 +212,12 @@ section
|
|||
le_trans := @le.trans,
|
||||
le_antisymm := @le.antisymm,
|
||||
le_total := @le.total,
|
||||
lt_iff_le_ne := @lt_iff_le_and_ne,
|
||||
lt_iff_le_and_ne := @lt_iff_le_and_ne,
|
||||
le_iff_lt_or_eq := @le_iff_lt_or_eq,
|
||||
add_le_add_left := @add_le_add_left,
|
||||
mul_nonneg := @mul_nonneg,
|
||||
mul_pos := @mul_pos,
|
||||
decidable_lt := @has_decidable_lt⦄
|
||||
decidable_lt := @decidable_lt⦄
|
||||
|
||||
-- migrate from algebra with rat
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue