-interpretation "Ordered Sets le" 'leq a b =
- (cic:/matita/ordered_sets/os_le.con _ a b).
-
-theorem antisimmetric_to_cotransitive_to_transitive:
- ∀C.∀le:relation C. antisimmetric ? le → cotransitive ? le →
- transitive ? le.
- intros;
- unfold transitive;
- intros;
- elim (c ? ? z H1);
- [ assumption
- | rewrite < (H ? ? H2 t);
- assumption
- ].
-qed.
-
-definition is_increasing ≝ λO:ordered_set.λa:nat→O.∀n:nat.a n ≤ a (S n).
-definition is_decreasing ≝ λO:ordered_set.λa:nat→O.∀n:nat.a (S n) ≤ a n.
-
-definition is_upper_bound ≝ λO:ordered_set.λa:nat→O.λu:O.∀n:nat.a n ≤ u.
-definition is_lower_bound ≝ λO:ordered_set.λa:nat→O.λu:O.∀n:nat.u ≤ a n.
-
-record is_sup (O:ordered_set) (a:nat→O) (u:O) : Prop ≝
- { sup_upper_bound: is_upper_bound O a u;
- sup_least_upper_bound: ∀v:O. is_upper_bound O a v → u≤v
- }.
-
-record is_inf (O:ordered_set) (a:nat→O) (u:O) : Prop ≝
- { inf_lower_bound: is_lower_bound O a u;
- inf_greatest_lower_bound: ∀v:O. is_lower_bound O a v → v≤u
- }.
-
-record is_bounded_below (O:ordered_set) (a:nat→O) : Type ≝
- { ib_lower_bound: O;
- ib_lower_bound_is_lower_bound: is_lower_bound ? a ib_lower_bound
- }.
-
-record is_bounded_above (O:ordered_set) (a:nat→O) : Type ≝
- { ib_upper_bound: O;
- ib_upper_bound_is_upper_bound: is_upper_bound ? a ib_upper_bound
- }.
-
-record is_bounded (O:ordered_set) (a:nat→O) : Type ≝
- { ib_bounded_below:> is_bounded_below ? a;
- ib_bounded_above:> is_bounded_above ? a
- }.
-
-record bounded_below_sequence (O:ordered_set) : Type ≝
- { bbs_seq:1> nat→O;
- bbs_is_bounded_below:> is_bounded_below ? bbs_seq
- }.
-
-record bounded_above_sequence (O:ordered_set) : Type ≝
- { bas_seq:1> nat→O;
- bas_is_bounded_above:> is_bounded_above ? bas_seq
- }.
-
-record bounded_sequence (O:ordered_set) : Type ≝
- { bs_seq:1> nat → O;
- bs_is_bounded_below: is_bounded_below ? bs_seq;
- bs_is_bounded_above: is_bounded_above ? bs_seq
- }.
-
-definition bounded_below_sequence_of_bounded_sequence ≝
- λO:ordered_set.λb:bounded_sequence O.
- mk_bounded_below_sequence ? b (bs_is_bounded_below ? b).
-
-coercion cic:/matita/ordered_sets/bounded_below_sequence_of_bounded_sequence.con.
-
-definition bounded_above_sequence_of_bounded_sequence ≝
- λO:ordered_set.λb:bounded_sequence O.
- mk_bounded_above_sequence ? b (bs_is_bounded_above ? b).
-
-coercion cic:/matita/ordered_sets/bounded_above_sequence_of_bounded_sequence.con.
-
-definition lower_bound ≝
- λO:ordered_set.λb:bounded_below_sequence O.
- ib_lower_bound ? b (bbs_is_bounded_below ? b).
-
-lemma lower_bound_is_lower_bound:
- ∀O:ordered_set.∀b:bounded_below_sequence O.
- is_lower_bound ? b (lower_bound ? b).
- intros;
- unfold lower_bound;
- apply ib_lower_bound_is_lower_bound.
-qed.
-
-definition upper_bound ≝
- λO:ordered_set.λb:bounded_above_sequence O.
- ib_upper_bound ? b (bas_is_bounded_above ? b).
-
-lemma upper_bound_is_upper_bound:
- ∀O:ordered_set.∀b:bounded_above_sequence O.
- is_upper_bound ? b (upper_bound ? b).
- intros;
- unfold upper_bound;
- apply ib_upper_bound_is_upper_bound.
-qed.
-
-record is_dedekind_sigma_complete (O:ordered_set) : Type ≝
- { dsc_inf: ∀a:nat→O.∀m:O. is_lower_bound ? a m → ex ? (λs:O.is_inf O a s);
- dsc_inf_proof_irrelevant:
- ∀a:nat→O.∀m,m':O.∀p:is_lower_bound ? a m.∀p':is_lower_bound ? a m'.
- (match dsc_inf a m p with [ ex_intro s _ ⇒ s ]) =
- (match dsc_inf a m' p' with [ ex_intro s' _ ⇒ s' ]);
- dsc_sup: ∀a:nat→O.∀m:O. is_upper_bound ? a m → ex ? (λs:O.is_sup O a s);
- dsc_sup_proof_irrelevant:
- ∀a:nat→O.∀m,m':O.∀p:is_upper_bound ? a m.∀p':is_upper_bound ? a m'.
- (match dsc_sup a m p with [ ex_intro s _ ⇒ s ]) =
- (match dsc_sup a m' p' with [ ex_intro s' _ ⇒ s' ])
- }.
-
-record dedekind_sigma_complete_ordered_set : Type ≝
- { dscos_ordered_set:> ordered_set;
- dscos_dedekind_sigma_complete_properties:>
- is_dedekind_sigma_complete dscos_ordered_set
- }.
-
-definition inf:
- ∀O:dedekind_sigma_complete_ordered_set.
- bounded_below_sequence O → O.
- intros;
- elim
- (dsc_inf O (dscos_dedekind_sigma_complete_properties O) b);
- [ apply a
- | apply (lower_bound ? b)
- | apply lower_bound_is_lower_bound
- ]
-qed.
-
-lemma inf_is_inf:
- ∀O:dedekind_sigma_complete_ordered_set.
- ∀a:bounded_below_sequence O.
- is_inf ? a (inf ? a).
- intros;
- unfold inf;
- simplify;
- elim (dsc_inf O (dscos_dedekind_sigma_complete_properties O) a
-(lower_bound O a) (lower_bound_is_lower_bound O a));
- simplify;
- assumption.
-qed.
-
-lemma inf_proof_irrelevant:
- ∀O:dedekind_sigma_complete_ordered_set.
- ∀a,a':bounded_below_sequence O.
- bbs_seq ? a = bbs_seq ? a' →
- inf ? a = inf ? a'.
- intros 3;
- elim a 0;
- elim a';
- simplify in H;
- generalize in match i1;
- clear i1;
- rewrite > H;
- intro;
- simplify;
- rewrite < (dsc_inf_proof_irrelevant O O f (ib_lower_bound ? f i)
- (ib_lower_bound ? f i2) (ib_lower_bound_is_lower_bound ? f i)
- (ib_lower_bound_is_lower_bound ? f i2));
- reflexivity.