@@ -313,13 +313,7 @@ HB.instance Definition cmfunQ :=
313313Definition cmfunQ_comp {A B: CMon.type} (f g: hom A B) : hom A B :=
314314 fun x => @mop B (f x) (g x).
315315
316- Definition cmfunQ_zero {A B: CMon.type} : hom A B.
317- destruct B.
318- unfold hom; simpl; intro.
319- destruct class.
320- destruct enriched_cat_case5_isMon_mixin.
321- exact munit0.
322- Defined .
316+ Definition cmfunQ_zero {A B: CMon.type} : hom A B := fun a : A => munit.
323317
324318(* does not work without declaring the Magma wrapper *)
325319HB.instance Definition cmfunQ_isMagma (A B: CMon.type) :
@@ -332,29 +326,19 @@ Obligation 1.
332326unfold associative, mop; simpl; intros.
333327unfold cmfunQ_comp; simpl; intros.
334328eapply functional_extensionality; intro x0.
335- destruct B.
336- destruct class.
337- destruct enriched_cat_case5_isMon_mixin.
338- simpl in *.
339- eapply massoc0; auto.
329+ refine (massoc _ _ _).
340330Qed .
341331Obligation 2.
342332unfold left_id, mop; simpl; intros.
343333unfold cmfunQ_comp, cmfunQ_zero; simpl; intros.
344334eapply functional_extensionality; intro x0.
345- destruct B.
346- destruct class.
347- destruct enriched_cat_case5_isMon_mixin.
348- auto.
335+ refine (mlid _).
349336Qed .
350337Obligation 3.
351338unfold right_id, mop; simpl; intros.
352339unfold cmfunQ_comp, cmfunQ_zero; simpl; intros.
353340eapply functional_extensionality; intro x0.
354- destruct B.
355- destruct class.
356- destruct enriched_cat_case5_isMon_mixin.
357- auto.
341+ refine (mrid _).
358342Qed .
359343
360344Program Definition cmfunQ_isCAlg (A B: CMon.type) :
@@ -363,11 +347,7 @@ Obligation 1.
363347unfold commutative, mop; simpl; intros.
364348unfold cmfunQ_comp; simpl; intros.
365349eapply functional_extensionality; intro x0.
366- destruct B.
367- destruct class.
368- destruct enriched_cat_case5_isCAlg_mixin.
369- simpl in *.
370- eapply acomm0; auto.
350+ refine (acomm _ _).
371351Qed .
372352
373353HB.instance Definition cmfunQ_isMonoid (A B: CMon.type) :
@@ -399,14 +379,7 @@ HB.instance Definition imfunQ :=
399379Definition imfunQ_comp {A B: IMon.type} (f g: hom A B) : hom A B :=
400380 fun x => @mop B (f x) (g x).
401381
402- Definition imfunQ_zero {A B: IMon.type} : hom A B.
403- destruct B.
404- unfold hom; simpl; intro.
405- destruct class.
406- destruct enriched_cat_case1_isIMon_mixin.
407- destruct imon0.
408- exact munit0.
409- Defined .
382+ Definition imfunQ_zero {A B: IMon.type} : hom A B := fun a : A => munit.
410383
411384(* does not work without declaring the Magma wrapper *)
412385HB.instance Definition imfunQ_isMagma (A B: IMon.type) :
@@ -419,32 +392,19 @@ Obligation 1.
419392unfold associative, mop; simpl; intros.
420393unfold imfunQ_comp; simpl; intros.
421394eapply functional_extensionality; intro x0.
422- destruct B.
423- destruct class.
424- destruct enriched_cat_case1_isIMon_mixin.
425- simpl in *.
426- destruct imon0.
427- eapply massoc0; auto.
395+ refine (massoc _ _ _).
428396Qed .
429397Obligation 2.
430398unfold left_id, mop; simpl; intros.
431399unfold imfunQ_comp, imfunQ_zero; simpl; intros.
432400eapply functional_extensionality; intro x0.
433- destruct B.
434- destruct class.
435- destruct enriched_cat_case1_isIMon_mixin.
436- destruct imon0.
437- auto.
401+ refine (mlid _).
438402Qed .
439403Obligation 3.
440404unfold right_id, mop; simpl; intros.
441405unfold imfunQ_comp, imfunQ_zero; simpl; intros.
442406eapply functional_extensionality; intro x0.
443- destruct B.
444- destruct class.
445- destruct enriched_cat_case1_isIMon_mixin.
446- destruct imon0.
447- auto.
407+ refine (mrid _).
448408Qed .
449409
450410Program Definition imfunQ_isIAlg (A B: IMon.type) :
@@ -453,20 +413,7 @@ Obligation 1.
453413unfold idempotent, mop; simpl; intros.
454414unfold imfunQ_comp; simpl; intros.
455415eapply functional_extensionality; intro x0.
456- destruct B.
457- destruct class.
458- destruct enriched_cat_case1_isIMon_mixin.
459- simpl in *.
460- destruct iia0; auto.
461- Qed .
462-
463- Program Definition imfunQ_isIMon (A B: IMon.type) :
464- isIMon (hom A B) := isIMon.Build (hom A B) _ _.
465- Obligation 1.
466- eapply imfunQ_isIAlg.
467- Qed .
468- Obligation 2.
469- eapply imfunQ_isMon.
416+ refine (aidem _).
470417Qed .
471418
472419HB.instance Definition imfunQ_isMonoid (A B: IMon.type) :
@@ -475,9 +422,6 @@ HB.instance Definition imfunQ_isMonoid (A B: IMon.type) :
475422HB.instance Definition imfunQ_isIAlgebra (A B: IMon.type) :
476423 isIAlg (hom A B) := imfunQ_isIAlg A B.
477424
478- HB.instance Definition imfunQ_isIMonoid (A B: IMon.type) :
479- isIMon (hom A B) := imfunQ_isIMon A B.
480-
481425Check IMon.type : IAlg_enriched_quiver.type.
482426
483427(******************************************************** *)
@@ -495,14 +439,7 @@ HB.instance Definition icmfunQ :=
495439Definition icmfunQ_comp {A B: ICMon.type} (f g: hom A B) : hom A B :=
496440 fun x => @mop B (f x) (g x).
497441
498- Definition icmfunQ_zero {A B: ICMon.type} : hom A B.
499- destruct B.
500- unfold hom; simpl; intro.
501- destruct class.
502- destruct enriched_cat_case1_isICMon_mixin.
503- destruct mon0.
504- exact munit0.
505- Defined .
442+ Definition icmfunQ_zero {A B: ICMon.type} : hom A B := fun a : A => munit.
506443
507444(* does not work without declaring the Magma wrapper *)
508445HB.instance Definition icmfunQ_isMagma (A B: ICMon.type) :
@@ -515,32 +452,19 @@ Obligation 1.
515452unfold associative, mop; simpl; intros.
516453unfold icmfunQ_comp; simpl; intros.
517454eapply functional_extensionality; intro x0.
518- destruct B.
519- destruct class.
520- destruct enriched_cat_case1_isICMon_mixin.
521- simpl in *.
522- destruct mon0.
523- eapply massoc0; auto.
455+ refine (massoc _ _ _).
524456Qed .
525457Obligation 2.
526458unfold left_id, mop; simpl; intros.
527459unfold icmfunQ_comp, icmfunQ_zero; simpl; intros.
528460eapply functional_extensionality; intro x0.
529- destruct B.
530- destruct class.
531- destruct enriched_cat_case1_isICMon_mixin.
532- destruct mon0.
533- auto.
461+ refine (mlid _).
534462Qed .
535463Obligation 3.
536464unfold right_id, mop; simpl; intros.
537465unfold icmfunQ_comp, icmfunQ_zero; simpl; intros.
538466eapply functional_extensionality; intro x0.
539- destruct B.
540- destruct class.
541- destruct enriched_cat_case1_isICMon_mixin.
542- destruct mon0.
543- auto.
467+ refine (mrid _).
544468Qed .
545469
546470
0 commit comments