Sum is now in Type.
\lambda M1,M2:CSemiGroup. \lambda x:ProdCSetoid (csg_crr M1) (csg_crr M2).
\lambda y:ProdCSetoid (csg_crr M1) (csg_crr M2).
match x with
- [pairT (x1: (cs_crr (csg_crr M1))) (x2: (cs_crr (csg_crr M2))) \Rightarrow
+ [pair (x1: (cs_crr (csg_crr M1))) (x2: (cs_crr (csg_crr M2))) \Rightarrow
match y with
- [pairT (y1: (cs_crr (csg_crr M1))) (y2: (cs_crr (csg_crr M2))) \Rightarrow
- pairT (cs_crr (csg_crr M1)) (cs_crr (csg_crr M2))
+ [pair (y1: (cs_crr (csg_crr M1))) (y2: (cs_crr (csg_crr M2))) \Rightarrow
+ pair (cs_crr (csg_crr M1)) (cs_crr (csg_crr M2))
(csbf_fun ? ? ? (csg_op M1) x1 y1) (csbf_fun ? ? ? (csg_op M2) x2 y2)]].
lemma dprod_strext: \forall M1,M2:CSemiGroup.
(* -----------------The product of setoids----------------------- *)
-definition prod_ap: \forall A,B : CSetoid.\forall c,d: ProdT A B. Prop \def
-\lambda A,B : CSetoid.\lambda c,d: ProdT A B.
- ((cs_ap A (fstT A B c) (fstT A B d)) \or
- (cs_ap B (sndT A B c) (sndT A B d))).
-
-definition prod_eq: \forall A,B : CSetoid.\forall c,d: ProdT A B. Prop \def
-\lambda A,B : CSetoid.\lambda c,d: ProdT A B.
- ((cs_eq A (fstT A B c) (fstT A B d)) \and
- (cs_eq B (sndT A B c) (sndT A B d))).
+definition prod_ap: \forall A,B : CSetoid.\forall c,d: Prod A B. Prop \def
+\lambda A,B : CSetoid.\lambda c,d: Prod A B.
+ ((cs_ap A (fst A B c) (fst A B d)) \or
+ (cs_ap B (snd A B c) (snd A B d))).
+
+definition prod_eq: \forall A,B : CSetoid.\forall c,d: Prod A B. Prop \def
+\lambda A,B : CSetoid.\lambda c,d: Prod A B.
+ ((cs_eq A (fst A B c) (fst A B d)) \and
+ (cs_eq B (snd A B c) (snd A B d))).
lemma prodcsetoid_is_CSetoid: \forall A,B: CSetoid.
- is_CSetoid (ProdT A B) (prod_eq A B) (prod_ap A B).
+ is_CSetoid (Prod A B) (prod_eq A B) (prod_ap A B).
intros.
apply (mk_is_CSetoid ? (prod_eq A B) (prod_ap A B))
[unfold.
definition ProdCSetoid : \forall A,B: CSetoid. CSetoid \def
\lambda A,B: CSetoid.
- mk_CSetoid (ProdT A B) (prod_eq A B) (prod_ap A B) (prodcsetoid_is_CSetoid A B).
+ mk_CSetoid (Prod A B) (prod_eq A B) (prod_ap A B) (prodcsetoid_is_CSetoid A B).
notation "hvbox(x break \times y)" with precedence 89
for @{ 'product $x $y}.
-definition fst \def \lambda A,B:Set.\lambda p: Prod A B.
+definition fst \def \lambda A,B:Type.\lambda p: Prod A B.
match p with
[(pair a b) \Rightarrow a].
-definition snd \def \lambda A,B:Set.\lambda p: Prod A B.
+definition snd \def \lambda A,B:Type.\lambda p: Prod A B.
match p with
[(pair a b) \Rightarrow b].
notation "\snd x" with precedence 89
for @{ 'snd $x}.
-theorem eq_pair_fst_snd: \forall A,B:Set.\forall p:Prod A B.
+theorem eq_pair_fst_snd: \forall A,B:Type.\forall p:Prod A B.
p = 〈 (\fst p), (\snd p) 〉.
intros.elim p.simplify.reflexivity.
qed.
-inductive Sum (A,B:Set) : Set \def
+inductive Sum (A,B:Type) : Type \def
inl : A \to Sum A B
| inr : B \to Sum A B.
-inductive ProdT (A,B:Type) : Type \def
-pairT : A \to B \to ProdT A B.
-
-definition fstT \def \lambda A,B:Type.\lambda p: ProdT A B.
-match p with
-[(pairT a b) \Rightarrow a].
-
-definition sndT \def \lambda A,B:Type.\lambda p: ProdT A B.
-match p with
-[(pairT a b) \Rightarrow b].
+interpretation "Disjoint union" 'plus A B =
+ (cic:/matita/datatypes/constructors/Sum.ind#xpointer(1/1) A B).
inductive option (A:Type) : Type ≝
None : option A