fact
stringlengths
0
6.66k
type
stringclasses
10 values
imports
stringclasses
399 values
filename
stringclasses
465 values
symbolic_name
stringlengths
1
75
index_level
int64
0
7.85k
fullpseudo_fullpartial' : FullPartialOrder Ale Alt. Proof. split; try apply _. intros x y. split. - intros E. split. + apply not_lt_le_flip. apply lt_flip;assumption. + apply pseudo_order_lt_apart. assumption. - intros [? E]. apply not_lt_apart_lt_flip;[|symmetry;trivial]. apply le_iff_not_lt_flip. trivial. Qed.
Lemma
Require Import
Classes\orders\orders.v
fullpseudo_fullpartial'
3,000
`{!TrivialApart A} `{DecidablePaths A} x y : x ≤ y |_| y < x. Proof. destruct (trichotomy (<) x y) as [|[|]]; try auto. - left. apply lt_le;trivial. - left. apply eq_le;trivial. Qed.
Lemma
Require Import
Classes\orders\orders.v
le_or_lt
3,001
`{!TrivialApart A} `{DecidablePaths A} x y : ~(y ≤ x) -> x < y. Proof. intros. destruct (le_or_lt y x); auto. contradiction. Qed.
Lemma
Require Import
Classes\orders\orders.v
not_le_lt_flip
3,002
`{!TrivialApart A} `{forall x y, Decidable (x ≤ y)} : forall x y, Decidable (x < y). Proof. intros. destruct (decide_rel (<=) y x). - right;apply le_not_lt_flip;assumption. - left; apply not_le_lt_flip;assumption. Defined.
Definition
Require Import
Classes\orders\orders.v
lt_dec
3,003
PseudoOrder (<). Proof. split; try apply _. - intros x y [??]. destruct (lt_antisym x y); auto. - intros x y Exy z. destruct (trichotomy (<) x z) as [? | [Exz | Exz]];apply tr; try auto. right. rewrite <-Exz. assumption. - intros x y. transitivity (x <> y);[split;apply trivial_apart|]. split. + destruct (trichotomy (<) x y) as [?|[?|?]]; auto. intros E;contradiction E. + intros [?|?];[apply lt_ne|apply lt_ne_flip];trivial. Qed.
Instance
Require Import
Classes\orders\orders.v
dec_strict_pseudo_order
3,004
Lt A := fun x y => x ≤ y /\ x <> y.
Definition
Require Import
Classes\orders\orders.v
dec_lt
3,005
StrictOrder (<). Proof. split. - apply _. - intros x E. apply lt_correct in E. destruct E as [_ []];trivial. - intros x y z E1 E2. apply lt_correct; apply lt_correct in E1; apply lt_correct in E2. destruct E1 as [E1a E1b],E2 as [E2a E2b]. split. + transitivity y;trivial. + intros E3. destruct E2b. apply (antisymmetry (≤)); trivial. rewrite <-E3. assumption. Qed.
Instance
Require Import
Classes\orders\orders.v
dec_order
3,006
FullPartialOrder (≤) (<). Proof. split;try apply _. intros. transitivity (x <= y /\ x <> y);[| split;intros [? ?];split;trivial;apply trivial_apart;trivial]. apply lt_correct. Qed.
Instance
Require Import
Classes\orders\orders.v
dec_full_partial_order
3,007
PseudoOrder (<) := dec_strict_pseudo_order.
Instance
Require Import
Classes\orders\orders.v
dec_pseudo_order
3,008
FullPseudoOrder (≤) (<). Proof. split; try apply _. intros x y. split. - intros ? E. apply lt_correct in E;destruct E as [? []]. apply (antisymmetry (≤));assumption. - intros E1. destruct (total (≤) x y); trivial. destruct (dec (x = y)) as [E2|E2]. + rewrite E2. apply reflexivity. + destruct E1. apply lt_correct;split;auto. apply symmetric_neq;assumption. Qed.
Instance
Require Import
Classes\orders\orders.v
dec_full_pseudo_order
3,009
`{Lt A} : forall x y z, x < y -> y = z -> x < z. Proof. intros ???? [];trivial. Qed.
Lemma
Require Import
Classes\orders\orders.v
lt_eq_trans
3,010
{x y z : A} : ~ (y < x) -> y < z -> x < z. Proof. intros nltyx ltyz. assert (disj := cotransitive ltyz x). strip_truncations. destruct disj as [ltyx|ltxz]. - destruct (nltyx ltyx). - exact ltxz. Qed.
Lemma
Require Import
Classes\orders\orders.v
nlt_lt_trans
3,011
{x y z : A} : x < y -> ~ (z < y) -> x < z. Proof. intros ltxy nltzy. assert (disj := cotransitive ltxy z). strip_truncations. destruct disj as [ltxz|ltzy]. - exact ltxz. - destruct (nltzy ltzy). Qed.
Lemma
Require Import
Classes\orders\orders.v
lt_nlt_trans
3,012
Transitive (_ : Lt A). Proof. intros x y z ltxy ltyz. assert (ltxyz := cotransitive ltxy z). strip_truncations. destruct ltxyz as [ltxz|ltzy]. - assumption. - destruct (pseudo_order_antisym y z (ltyz , ltzy)). Qed.
Lemma
Require Import
Classes\orders\orders.v
lt_transitive
3,013
SemiRingOrder (≤). Proof. repeat (split; try apply _). - intros x y E. exists (- x + y). rewrite simple_associativity, plus_negate_r, plus_0_l. reflexivity. - intros x y E. rewrite <-(plus_0_l x), <-(plus_0_l y), <-!(plus_negate_l z), <-!simple_associativity. apply (order_preserving _). trivial. Qed.
Lemma
Require Import
Classes\orders\rings.v
from_ring_order
3,014
StrictSemiRingOrder (<). Proof. repeat (split; try apply _). - intros x y E. exists (- x + y). rewrite simple_associativity, plus_negate_r, plus_0_l. reflexivity. - intros x y E. rewrite <-(plus_0_l x), <-(plus_0_l y), <-!(plus_negate_l z), <-!simple_associativity. apply (strictly_order_preserving _). trivial. Qed.
Lemma
Require Import
Classes\orders\rings.v
from_strict_ring_order
3,015
PseudoSemiRingOrder (<). Proof. repeat (split; try apply _). - intros x y E. exists (- x + y). rewrite simple_associativity, plus_negate_r, plus_0_l. reflexivity. - intros x y E. rewrite <-(plus_0_l x), <-(plus_0_l y), <-!(plus_negate_l z), <-!simple_associativity. apply (strictly_order_preserving _). trivial. Qed.
Lemma
Require Import
Classes\orders\rings.v
from_pseudo_ring_order
3,016
FullPseudoSemiRingOrder (≤) (<). Proof. split. - apply _. - apply from_pseudo_ring_order;trivial. - apply le_iff_not_lt_flip;trivial. Qed.
Lemma
Require Import
Classes\orders\rings.v
from_full_pseudo_ring_order
3,017
x y : -y ≤ -x <-> x ≤ y. Proof. assert (forall a b, a ≤ b -> -b ≤ -a). - intros a b E. transitivity (-a + -b + a);[apply eq_le| transitivity (-a + -b + b);[|apply eq_le]]. + rewrite plus_comm, plus_assoc, plus_negate_r, plus_0_l. reflexivity. + apply (order_preserving _). trivial. + rewrite <-plus_assoc, plus_negate_l. apply plus_0_r. - split; intros; auto. rewrite <-(negate_involutive x), <-(negate_involutive y); auto. Qed.
Lemma
Require Import
Classes\orders\rings.v
flip_le_negate
3,018
x : 0 ≤ x <-> -x ≤ 0. Proof. split; intros E. - rewrite <-negate_0. apply flip_le_negate. rewrite !involutive. trivial. - apply flip_le_negate. rewrite negate_0. trivial. Qed.
Lemma
Require Import
Classes\orders\rings.v
flip_nonneg_negate
3,019
x : x ≤ 0 <-> 0 ≤ -x. Proof. pattern x at 1;apply (transport _ (negate_involutive x)). split; intros; apply flip_nonneg_negate;trivial. Qed.
Lemma
Require Import
Classes\orders\rings.v
flip_nonpos_negate
3,020
(x y z : R) : z ≤ y - x <-> z + x ≤ y. Proof. split; intros E. - rewrite plus_comm. rewrite (plus_conjugate_alt y x). apply (order_preserving _). trivial. - rewrite plus_comm. rewrite (plus_conjugate_alt z (- x)), involutive. apply (order_preserving _). trivial. Qed.
Lemma
Require Import
Classes\orders\rings.v
flip_le_minus_r
3,021
(x y z : R) : y - x ≤ z <-> y ≤ z + x. Proof. pattern x at 2;apply (transport _ (negate_involutive x)). split; apply flip_le_minus_r. Qed.
Lemma
Require Import
Classes\orders\rings.v
flip_le_minus_l
3,022
(x y : R) : 0 ≤ y - x <-> x ≤ y. Proof. pattern x at 2;apply (transport _ (plus_0_l x)). apply flip_le_minus_r. Qed.
Lemma
Require Import
Classes\orders\rings.v
flip_nonneg_minus
3,023
(x y : R) : y - x ≤ 0 <-> y ≤ x. Proof. pattern x at 2;apply (transport _ (plus_0_l x)). apply flip_le_minus_l. Qed.
Lemma
Require Import
Classes\orders\rings.v
flip_nonpos_minus
3,024
(x y z : R) : 0 ≤ z -> x ≤ y -> x - z ≤ y. Proof. intros E1 E2. rewrite plus_comm, (plus_conjugate_alt y (- z)), involutive. apply (order_preserving (-(z) +)). transitivity y; trivial. pattern y at 1;apply (transport _ (plus_0_r y)). apply (order_preserving (y +)). trivial. Qed.
Lemma
Require Import
Classes\orders\rings.v
nonneg_minus_compat
3,025
(x y z : R) : 0 ≤ z -> x ≤ y - z -> x ≤ y. Proof. intros E1 E2. transitivity (y - z); trivial. apply nonneg_minus_compat;trivial. apply reflexivity. Qed.
Lemma
Require Import
Classes\orders\rings.v
nonneg_minus_compat_back
3,026
(x : R) : 0 ≤ x -> -x ≤ x. Proof. intros. transitivity 0; trivial. apply flip_nonneg_negate. trivial. Qed.
Lemma
Require Import
Classes\orders\rings.v
between_nonneg
3,027
x y : -y < -x <-> x < y. Proof. assert (forall a b, a < b -> -b < -a). - intros a b E. rewrite (plus_conjugate (-b) (-a)), involutive. apply lt_eq_trans with (-a + -b + b). + apply (strictly_order_preserving _). trivial. + rewrite <-plus_assoc,plus_negate_l, plus_0_r. reflexivity. - split; intros; auto. rewrite <-(negate_involutive x), <-(negate_involutive y); auto. Qed.
Lemma
Require Import
Classes\orders\rings.v
flip_lt_negate
3,028
x y : y < - x -> x < - y. Proof. pattern y at 1. rewrite <- (@involutive _ (-) _ y). apply flip_lt_negate. Qed.
Lemma
Require Import
Classes\orders\rings.v
flip_lt_negate_r
3,029
x y : - x < y -> - y < x. Proof. pattern y at 1. rewrite <- (@involutive _ (-) _ y). apply flip_lt_negate. Qed.
Lemma
Require Import
Classes\orders\rings.v
flip_lt_negate_l
3,030
x : 0 < x <-> -x < 0. Proof. split; intros E. - rewrite <- negate_0. apply flip_lt_negate. rewrite !involutive;trivial. - apply flip_lt_negate. rewrite negate_0. trivial. Qed.
Lemma
Require Import
Classes\orders\rings.v
flip_pos_negate
3,031
x : x < 0 <-> 0 < -x. Proof. pattern x at 1;apply (transport _ (negate_involutive x)). split; intros; apply flip_pos_negate;trivial. Qed.
Lemma
Require Import
Classes\orders\rings.v
flip_neg_negate
3,032
(x y z : R) : z < y - x <-> z + x < y. Proof. split; intros E. - rewrite plus_comm, (plus_conjugate_alt y x). apply (strictly_order_preserving _). trivial. - rewrite plus_comm, (plus_conjugate_alt z (-x)), involutive. apply (strictly_order_preserving _). trivial. Qed.
Lemma
Require Import
Classes\orders\rings.v
flip_lt_minus_r
3,033
(x y z : R) : y - x < z <-> y < z + x. Proof. pattern x at 2;apply (transport _ (negate_involutive x)). split; apply flip_lt_minus_r. Qed.
Lemma
Require Import
Classes\orders\rings.v
flip_lt_minus_l
3,034
(x y : R) : 0 < y - x <-> x < y. Proof. pattern x at 2;apply (transport _ (plus_0_l x)). apply flip_lt_minus_r. Qed.
Lemma
Require Import
Classes\orders\rings.v
flip_pos_minus
3,035
(x y : R) : y - x < 0 <-> y < x. Proof. pattern x at 2;apply (transport _ (plus_0_l x)). apply flip_lt_minus_l. Qed.
Lemma
Require Import
Classes\orders\rings.v
flip_neg_minus
3,036
(x y z : R) : 0 < z -> x < y -> x - z < y. Proof. intros E1 E2. rewrite plus_comm, (plus_conjugate_alt y (-z)), involutive. apply (strictly_order_preserving (-(z) +)). transitivity y; trivial. pattern y at 1;apply (transport _ (plus_0_r y)). apply (strictly_order_preserving (y +)). trivial. Qed.
Lemma
Require Import
Classes\orders\rings.v
pos_minus_compat
3,037
x z : 0 < z <-> x - z < x. Proof. pattern x at 2;apply (transport _ (plus_0_r x)). split; intros. - apply (strictly_order_preserving _), flip_pos_negate; assumption. - apply flip_pos_negate, (strictly_order_reflecting (x+)); assumption. Qed.
Lemma
Require Import
Classes\orders\rings.v
pos_minus_lt_compat_r
3,038
x z : 0 < z <-> - z + x < x. Proof. split; intros ltz. - rewrite (commutativity (-z) x); apply pos_minus_lt_compat_r; assumption. - rewrite (commutativity (-z) x) in ltz. apply (snd (pos_minus_lt_compat_r x z)); assumption. Qed.
Lemma
Require Import
Classes\orders\rings.v
pos_minus_lt_compat_l
3,039
(x : R) : 0 < x -> -x < x. Proof. intros E. transitivity 0; trivial. apply flip_pos_negate. trivial. Qed.
Lemma
Require Import
Classes\orders\rings.v
between_pos
3,040
(z : R) (Pz : 0 < z) : z ≶ 0 := pseudo_order_lt_apart_flip 0 z Pz.
Definition
Require Import
Classes\orders\rings.v
positive_apart_zero
3,041
(z : R) (Nz : z < 0) : z ≶ 0 := pseudo_order_lt_apart z 0 Nz.
Definition
Require Import
Classes\orders\rings.v
negative_apart_zero
3,042
(f : R2 -> R1) `{!IsSemiRingPreserving f} `{!IsInjective f} : (forall x y, x ≤ y <-> f x ≤ f y) -> SemiRingOrder R2le. Proof. intros P. apply (projected_srorder f P). intros x y E. exists (-x + y). rewrite plus_assoc, plus_negate_r, plus_0_l. reflexivity. Qed.
Lemma
Require Import
Classes\orders\rings.v
projected_ring_order
3,043
(forall x, 0 ≤ f x -> 0 ≤ x) -> OrderReflecting f. Proof. intros E. repeat (split; try apply _). intros x y F. apply flip_nonneg_minus, E. rewrite preserves_plus, preserves_negate. apply (flip_nonneg_minus (f x)), F. Qed.
Lemma
Require Import
Classes\orders\rings.v
reflecting_preserves_nonneg
3,044
`{!OrderPreserving f} x : - 1 ≤ x -> - 1 ≤ f x. Proof. intros. rewrite <-(preserves_1 (f:=f)), <-preserves_negate. apply (order_preserving f). trivial. Qed.
Lemma
Require Import
Classes\orders\rings.v
preserves_ge_negate1
3,045
`{!OrderPreserving f} x : x ≤ - 1 -> f x ≤ - 1. Proof. intros. rewrite <-(preserves_1 (f:=f)), <-preserves_negate. apply (order_preserving f). trivial. Qed.
Lemma
Require Import
Classes\orders\rings.v
preserves_le_negate1
3,046
(f : R2 -> R1) `{!IsSemiRingPreserving f} : (forall x y, x < y <-> f x < f y) -> StrictSemiRingOrder R2lt. Proof. intros P. pose proof (projected_strict_order f P). apply from_strict_ring_order. - intros z x y E. apply P. rewrite 2!(preserves_plus (f:=f)). apply (strictly_order_preserving _), P. trivial. - intros x y E1 E2. apply P. rewrite preserves_mult, preserves_0. apply pos_mult_compat; rewrite <-(preserves_0 (f:=f)); apply P; trivial. Qed.
Lemma
Require Import
Classes\orders\rings.v
projected_strict_ring_order
3,047
(f : R2 -> R1) `{!IsSemiRingPreserving f} `{!IsStrongInjective f} : (forall x y, x < y <-> f x < f y) -> PseudoSemiRingOrder R2lt. Proof. intros P. pose proof (projected_pseudo_order f P). pose proof (projected_strict_ring_order f P). apply from_pseudo_ring_order; try apply _. pose proof (@pseudo_order_apart R1 H0 R1lt pseudo_srorder_strict : IsApart R1). pose proof (pseudo_order_apart : IsApart R2). pose proof (strong_injective_mor f). repeat (split; try apply _). intros x₁ y₁ x₂ y₂ E. apply (strong_injective f) in E. rewrite 2!(preserves_mult (f:=f)) in E. apply (merely_destruct (strong_binary_extensionality (.*.) _ _ _ _ E)); intros [?|?];apply tr; [left | right]; apply (strong_extensionality f); trivial. Qed.
Lemma
Require Import
Classes\orders\rings.v
projected_pseudo_ring_order
3,048
(f : R2 -> R1) `{!IsSemiRingPreserving f} `{!IsStrongInjective f} : (forall x y, x ≤ y <-> f x ≤ f y) -> (forall x y, x < y <-> f x < f y) -> FullPseudoSemiRingOrder R2le R2lt. Proof. intros P1 P2. pose proof (projected_full_pseudo_order f P1 P2). pose proof (projected_pseudo_ring_order f P2). split; try apply _. apply le_iff_not_lt_flip. Qed.
Lemma
Require Import
Classes\orders\rings.v
projected_full_pseudo_ring_order
3,049
x z : 0 ≤ z <-> x ≤ x + z. Proof. pattern x at 1. apply (transport _ (plus_0_r x)). split; intros. - apply (order_preserving _). trivial. - apply (order_reflecting (x+)). trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
nonneg_plus_le_compat_r
3,050
x z : 0 ≤ z <-> x ≤ z + x. Proof. rewrite (commutativity (f:=plus)). apply nonneg_plus_le_compat_r. Qed.
Lemma
Require Import
Classes\orders\semirings.v
nonneg_plus_le_compat_l
3,051
x₁ y₁ x₂ y₂ : x₁ ≤ y₁ -> x₂ ≤ y₂ -> x₁ + x₂ ≤ y₁ + y₂. Proof. intros E1 E2. transitivity (y₁ + x₂). - apply (order_preserving (+ x₂));trivial. - apply (order_preserving (y₁ +));trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
plus_le_compat
3,052
x y z : 0 ≤ z -> x ≤ y -> x ≤ y + z. Proof. intros. rewrite <-(plus_0_r x). apply plus_le_compat;trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
plus_le_compat_r
3,053
x y z : 0 ≤ z -> x ≤ y -> x ≤ z + y. Proof. rewrite (commutativity (f:=plus)). apply plus_le_compat_r. Qed.
Lemma
Require Import
Classes\orders\semirings.v
plus_le_compat_l
3,054
x y : x ≤ 0 -> y ≤ 0 -> x + y ≤ 0. Proof. intros. rewrite <-(plus_0_r 0). apply plus_le_compat;trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
nonpos_plus_compat
3,055
(x y : R) : PropHolds (0 ≤ x) -> PropHolds (0 ≤ y) -> PropHolds (0 ≤ x + y). Proof. intros. apply plus_le_compat_l;trivial. Qed.
Instance
Require Import
Classes\orders\semirings.v
nonneg_plus_compat
3,056
{x y} : x ≤ y -> exists z, 0 ≤ z /\ y = x + z. Proof. intros E. destruct (srorder_partial_minus x y E) as [z Ez]. exists z. split; [| trivial]. apply (order_reflecting (x+)). rewrite plus_0_r, <-Ez. trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
decompose_le
3,057
x y z : 0 ≤ z -> y = x + z -> x ≤ y. Proof. intros E1 E2. rewrite E2. apply nonneg_plus_le_compat_r. trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
compose_le
3,058
x₁ y₁ x₂ y₂ : 0 ≤ x₁ -> 0 ≤ x₂ -> x₁ ≤ y₁ -> x₂ ≤ y₂ -> x₁ * x₂ ≤ y₁ * y₂. Proof. intros Ex₁ Ey₁ E1 E2. transitivity (y₁ * x₂). - apply (order_preserving_flip_nonneg (.*.) x₂);trivial. - apply (order_preserving_nonneg (.*.) y₁); [| trivial]. transitivity x₁;trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
mult_le_compat
3,059
x y z : 1 ≤ z -> 0 ≤ y -> x ≤ y -> x ≤ y * z. Proof. intros. transitivity y; [trivial |]. pattern y at 1;apply (transport _ (mult_1_r y)). apply (order_preserving_nonneg (.*.) y);trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
ge_1_mult_le_compat_r
3,060
x y z : 1 ≤ z -> 0 ≤ y -> x ≤ y -> x ≤ z * y. Proof. rewrite (commutativity (f:=mult)). apply ge_1_mult_le_compat_r. Qed.
Lemma
Require Import
Classes\orders\semirings.v
ge_1_mult_le_compat_l
3,061
x y z : z ≤ 0 -> x ≤ y -> z * y ≤ z * x. Proof. intros Ez Exy. destruct (decompose_le Ez) as [a [Ea1 Ea2]], (decompose_le Exy) as [b [Eb1 Eb2]]. rewrite Eb2. apply compose_le with (a * b). - apply nonneg_mult_compat;trivial. - transitivity (z * x + (z + a) * b). + rewrite <-Ea2. rewrite mult_0_l,plus_0_r. reflexivity. + rewrite plus_mult_distr_r,plus_mult_distr_l. apply associativity. Qed.
Lemma
Require Import
Classes\orders\semirings.v
flip_nonpos_mult_l
3,062
x y z : z ≤ 0 -> x ≤ y -> y * z ≤ x * z. Proof. rewrite 2!(commutativity _ z). apply flip_nonpos_mult_l. Qed.
Lemma
Require Import
Classes\orders\semirings.v
flip_nonpos_mult_r
3,063
x y : x ≤ 0 -> y ≤ 0 -> 0 ≤ x * y. Proof. intros. rewrite <-(mult_0_r x). apply flip_nonpos_mult_l;trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
nonpos_mult
3,064
x y : x ≤ 0 -> 0 ≤ y -> x * y ≤ 0. Proof. intros. rewrite <-(mult_0_r x). apply flip_nonpos_mult_l;trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
nonpos_nonneg_mult
3,065
x y : 0 ≤ x -> y ≤ 0 -> x * y ≤ 0. Proof. intros. rewrite (commutativity (f:=mult)). apply nonpos_nonneg_mult;trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
nonneg_nonpos_mult
3,066
x z : 0 < z <-> x < x + z. Proof. pattern x at 1;apply (transport _ (plus_0_r x)). split; intros. - apply (strictly_order_preserving _);trivial. - apply (strictly_order_reflecting (x+));trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
pos_plus_lt_compat_r
3,067
x z : 0 < z -> x < z + x. Proof. rewrite (commutativity (f:=plus)). apply pos_plus_lt_compat_r. Qed.
Lemma
Require Import
Classes\orders\semirings.v
pos_plus_lt_compat_l
3,068
x₁ y₁ x₂ y₂ : x₁ < y₁ -> x₂ < y₂ -> x₁ + x₂ < y₁ + y₂. Proof. intros E1 E2. transitivity (y₁ + x₂). - apply (strictly_order_preserving (+ x₂));trivial. - apply (strictly_order_preserving (y₁ +));trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
plus_lt_compat
3,069
x y z : 0 < z -> x < y -> x < y + z. Proof. intros. rewrite <-(plus_0_r x). apply plus_lt_compat;trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
plus_lt_compat_r
3,070
x y z : 0 < z -> x < y -> x < z + y. Proof. rewrite (commutativity (f:=plus)). apply plus_lt_compat_r. Qed.
Lemma
Require Import
Classes\orders\semirings.v
plus_lt_compat_l
3,071
x y : x < 0 -> y < 0 -> x + y < 0. Proof. intros. rewrite <-(plus_0_r 0). apply plus_lt_compat;trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
neg_plus_compat
3,072
(x y : R) : PropHolds (0 < x) -> PropHolds (0 < y) -> PropHolds (0 < x + y). Proof. intros. apply plus_lt_compat_l;trivial. Qed.
Instance
Require Import
Classes\orders\semirings.v
pos_plus_compat
3,073
x y z : 0 < z -> y = x + z -> x < y. Proof. intros E1 E2. rewrite E2. apply pos_plus_lt_compat_r;trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
compose_lt
3,074
{x y} : x < y -> exists z, 0 < z /\ y = x + z. Proof. intros E. destruct (strict_srorder_partial_minus x y E) as [z Ez]. exists z. split; [| trivial]. apply (strictly_order_reflecting (x+)). rewrite <-Ez, rings.plus_0_r. trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
decompose_lt
3,075
x₁ y₁ x₂ y₂ : 0 < x₁ -> 0 < x₂ -> x₁ < y₁ -> x₂ < y₂ -> x₁ * x₂ < y₁ * y₂. Proof. intros Ex₁ Ey₁ E1 E2. transitivity (y₁ * x₂). - apply (strictly_order_preserving_flip_pos (.*.) x₂);trivial. - apply (strictly_order_preserving_pos (.*.) y₁); [| trivial ]. transitivity x₁;trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
mult_lt_compat
3,076
x y z : 1 < z -> 0 < y -> x < y -> x < y * z. Proof. intros. transitivity y; [ trivial |]. pattern y at 1;apply (transport _ (mult_1_r y)). apply (strictly_order_preserving_pos (.*.) y);trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
gt_1_mult_lt_compat_r
3,077
x y z : 1 < z -> 0 < y -> x < y -> x < z * y. Proof. rewrite (commutativity (f:=mult)). apply gt_1_mult_lt_compat_r. Qed.
Lemma
Require Import
Classes\orders\semirings.v
gt_1_mult_lt_compat_l
3,078
x y z : z < 0 -> x < y -> z * y < z * x. Proof. intros Ez Exy. destruct (decompose_lt Ez) as [a [Ea1 Ea2]], (decompose_lt Exy) as [b [Eb1 Eb2]]. rewrite Eb2. apply compose_lt with (a * b). - apply pos_mult_compat;trivial. - transitivity (z * x + (z + a) * b). + rewrite <-Ea2. rewrite mult_0_l,plus_0_r;reflexivity. + rewrite plus_mult_distr_r,plus_mult_distr_l. apply associativity. Qed.
Lemma
Require Import
Classes\orders\semirings.v
flip_neg_mult_l
3,079
x y z : z < 0 -> x < y -> y * z < x * z. Proof. rewrite 2!(commutativity _ z). apply flip_neg_mult_l. Qed.
Lemma
Require Import
Classes\orders\semirings.v
flip_neg_mult_r
3,080
x y : x < 0 -> y < 0 -> 0 < x * y. Proof. intros. rewrite <-(mult_0_r x). apply flip_neg_mult_l;trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
neg_mult
3,081
x y : 0 < x -> 0 < y -> 0 < x * y. Proof. intros xpos ypos. rewrite <-(mult_0_r x). apply (pos_mult_lt_l); assumption. Qed.
Lemma
Require Import
Classes\orders\semirings.v
pos_mult
3,082
x y : x < 0 -> 0 < y -> x * y < 0. Proof. intros. rewrite <-(mult_0_r x). apply flip_neg_mult_l;trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
neg_pos_mult
3,083
x y : 0 < x -> y < 0 -> x * y < 0. Proof. intros. rewrite (commutativity (f:=mult)). apply neg_pos_mult;trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
pos_neg_mult
3,084
x y : x * y < 0 -> (x < 0 /\ 0 < y) |_| (0 < x /\ y < 0). Proof. intros. assert (0 ≶ x) as Ex;[|assert (apart 0 y) as Ey]. - apply (strong_extensionality (.* y)). rewrite mult_0_l. apply pseudo_order_lt_apart_flip;trivial. - apply (strong_extensionality (x *.)). rewrite mult_0_r. apply pseudo_order_lt_apart_flip;trivial. - apply apart_iff_total_lt in Ex;apply apart_iff_total_lt in Ey. destruct Ex as [Ex|Ex], Ey as [Ey|Ey]; try auto. + destruct (irreflexivity (<) 0). transitivity (x * y); [| trivial]. apply pos_mult_compat;trivial. + destruct (irreflexivity (<) 0). transitivity (x * y); [| trivial]. apply neg_mult;trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
neg_mult_decompose
3,085
x y : 0 < x * y -> (0 < x /\ 0 < y) |_| (x < 0 /\ y < 0). Proof. intros. assert (0 ≶ x /\ apart 0 y) as [Ex Ey];[split|]. - apply (strong_extensionality (.* y)). rewrite mult_0_l. apply pseudo_order_lt_apart;trivial. - apply (strong_extensionality (x *.)). rewrite mult_0_r. apply pseudo_order_lt_apart;trivial. - apply apart_iff_total_lt in Ex;apply apart_iff_total_lt in Ey. destruct Ex as [Ex|Ex], Ey as [Ey|Ey]; try auto. + destruct (irreflexivity (<) 0). transitivity (x * y); [trivial |]. apply pos_neg_mult;trivial. + destruct (irreflexivity (<) 0). transitivity (x * y); [trivial |]. apply neg_pos_mult;trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
pos_mult_decompose
3,086
x : x ≶ 0 -> 0 < x * x. Proof. intros E. apply apart_iff_total_lt in E. destruct E as [E|E]. - destruct (decompose_lt E) as [z [Ez1 Ez2]]. apply compose_lt with (z * z). + apply pos_mult_compat;trivial. + rewrite plus_0_l. apply (left_cancellation (+) (x * z)). rewrite <-plus_mult_distr_r, <-plus_mult_distr_l. rewrite (commutativity (f:=plus) z x), <-!Ez2. rewrite mult_0_l,mult_0_r. reflexivity. - apply pos_mult_compat;trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
square_pos
3,087
x y : 0 < x * y -> 0 < y -> 0 < x. Proof. intros. apply (strictly_order_reflecting (.* y)). rewrite rings.mult_0_l;trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
pos_mult_rev_l
3,088
x y : 0 < x * y -> 0 < x -> 0 < y. Proof. intros. apply pos_mult_rev_l with x. - rewrite (commutativity (f:=mult));trivial. - trivial. Qed.
Lemma
Require Import
Classes\orders\semirings.v
pos_mult_rev_r
3,089
PropHolds (0 < 1). Proof. red. rewrite <-(mult_1_l 1). apply square_pos;trivial. Qed.
Instance
Require Import
Classes\orders\semirings.v
lt_0_1
3,090
PropHolds (0 < 2). Proof. apply _. Qed.
Instance
Require Import
Classes\orders\semirings.v
lt_0_2
3,091
PropHolds (0 < 3). Proof. apply _. Qed.
Instance
Require Import
Classes\orders\semirings.v
lt_0_3
3,092
PropHolds (0 < 4). Proof. apply _. Qed.
Instance
Require Import
Classes\orders\semirings.v
lt_0_4
3,093
1 < 2. Proof. apply pos_plus_lt_compat_r, lt_0_1. Qed.
Lemma
Require Import
Classes\orders\semirings.v
lt_1_2
3,094
1 < 3. Proof. apply pos_plus_lt_compat_r, lt_0_2. Qed.
Lemma
Require Import
Classes\orders\semirings.v
lt_1_3
3,095
1 < 4. Proof. apply pos_plus_lt_compat_r, lt_0_3. Qed.
Lemma
Require Import
Classes\orders\semirings.v
lt_1_4
3,096
2 < 3. Proof. apply (strictly_order_preserving (1+)), lt_1_2. Qed.
Lemma
Require Import
Classes\orders\semirings.v
lt_2_3
3,097
2 < 4. Proof. apply (strictly_order_preserving (1+)), lt_1_3. Qed.
Lemma
Require Import
Classes\orders\semirings.v
lt_2_4
3,098
3 < 4. Proof. apply (strictly_order_preserving (1+)), lt_2_3. Qed.
Lemma
Require Import
Classes\orders\semirings.v
lt_3_4
3,099