@@ -132,46 +132,9 @@ Proof.
132
132
now cbn; intuition.
133
133
Defined .
134
134
135
- (* TODO : products of linear orders suck because of constructivity *)
136
-
137
- (*
138
- #[refine]
139
- #[export]
140
- Instance Lin_product (X Y : Lin) : Lin :=
141
- {
142
- pos := Lin_product_Pos X Y
143
- }.
144
- Proof.
145
- intros [x1 y1] [x2 y2]; cbn in *.
146
- destruct (leq_total x1 x2), (leq_total x2 x1), (leq_total y1 y2), (leq_total y2 y1).
147
- all: firstorder.
148
- Abort.
149
-
150
- Definition Lin_outl (X Y : Lin) : ProsHom (Lin_product X Y) X.
151
- Proof.
152
- red. exists fst. destruct 1, H; try rewrite H; lin.
153
- Defined.
154
-
155
- Definition Lin_outr (X Y : Lin) : ProsHom (Lin_product X Y) Y.
156
- Proof.
157
- red. exists snd. lin'. destruct a, a', H, H; cbn in *.
158
- Abort.
159
- *)
160
-
161
- (*
162
- #[refine]
163
- #[export]
164
- TODO: Instance HasProducts_Lin : HasProducts LinCat :=
165
- {
166
- product := Lin_product;
167
- outl := Pros_outl;
168
- outr := Pros_outr;
169
- fpair := @Pros_fpair
170
- }.
171
- Proof.
172
- all: pos'; cat; try rewrite H; try rewrite H0; try destruct (y x); easy.
173
- Defined.
174
- *)
135
+ (** Defining product of linear orders is not possible without LEM and coproducts
136
+ of linear orders don't exist because they are kidn of "connected" and
137
+ coproducts are all about creating objects which are "disconnected". *)
175
138
176
139
#[refine]
177
140
#[export]
@@ -194,37 +157,16 @@ Proof.
194
157
- now intros [x1 | y1] [x2 | y2] [x3 | y3] H12 H23; cbn in *; eauto.
195
158
Defined .
196
159
197
- #[refine]
198
- #[export]
199
- Instance Lin_coproduct (X Y : Lin) : Lin :=
200
- {
201
- pos :=
202
- {|
203
- pros := Lin_Pros_coproduct X Y;
204
- |}
205
- }.
206
- Proof .
207
- all: now intros; repeat (try
208
- match goal with
209
- | p : _ + _ |- _ => destruct p
210
- end;
211
- my_simpl; try f_equal; lin').
212
- Defined .
213
-
214
- Definition Lin_finl (X Y : Lin) : ProsHom X (Lin_coproduct X Y).
215
- Proof .
216
- now exists (CoqSetoid_finl X Y).
217
- Defined .
218
-
219
- Definition Lin_finr (X Y : Lin) : ProsHom Y (Lin_coproduct X Y).
160
+ Lemma no_coproducts_Lin :
161
+ HasCoproducts LinCat -> False.
220
162
Proof .
221
- now exists (CoqSetoid_finr X Y) .
222
- Defined .
223
-
224
- Definition Lin_copair
225
- (A B X : Lin) (f : ProsHom A X) (g : ProsHom B X) : ProsHom (Lin_coproduct A B) X .
226
- Proof .
227
- exists (CoqSetoid_copair f g ).
228
- intros [a1 | b1] [a2 | b2] H; cbn in * .
229
- - now lin .
163
+ intros [? ? ? ? _]; cbn in * .
164
+ specialize (copair _ _ _ (finr Lin_term Lin_term) (finl Lin_term Lin_term)) .
165
+ destruct copair as [[copair Heq] Hleq]; cbn in *.
166
+ destruct (finl Lin_term Lin_term) as [[f Hf1] Hf2]; cbn in *.
167
+ destruct (finr Lin_term Lin_term) as [[g Hg1] Hg2]; cbn in * .
168
+ pose (Hleq1 := Hleq (f tt) (g tt)) .
169
+ pose (Hleq2 := Hleq (g tt) (f tt) ).
170
+ destruct (leq_total (f tt) (g tt)) .
171
+ - specialize (Hleq1 H) .
230
172
Abort .
0 commit comments