]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/library/datatypes/constructors.ma
- transcript: bugfix
[helm.git] / helm / software / matita / library / datatypes / constructors.ma
index 926dd35fcac48eecab79c23ea66dcc24bf75acc1..6e67c039fe78010f3cc04ab0d41ddf2daa9e09b4 100644 (file)
@@ -21,17 +21,9 @@ inductive unit : Set ≝ something: unit.
 inductive Prod (A,B:Type) : Type \def
 pair : A \to B \to Prod A B.
 
-interpretation "Pair construction" 'pair x y =
- (cic:/matita/datatypes/constructors/Prod.ind#xpointer(1/1/1) _ _ x y).
+interpretation "Pair construction" 'pair x y = (pair _ _ x y).
 
-notation "hvbox(\langle x break , y \rangle )" with precedence 89
-for @{ 'pair $x $y}.
-
-interpretation "Product" 'product x y =
- (cic:/matita/datatypes/constructors/Prod.ind#xpointer(1/1) x y).
-
-notation "hvbox(x break \times y)" with precedence 89
-for @{ 'product $x $y}.
+interpretation "Product" 'product x y = (Prod x y).
 
 definition fst \def \lambda A,B:Type.\lambda p: Prod A B.
 match p with
@@ -41,20 +33,15 @@ definition snd \def \lambda A,B:Type.\lambda p: Prod A B.
 match p with
 [(pair a b) \Rightarrow b].
 
-interpretation "First projection" 'fst x =
- (cic:/matita/datatypes/constructors/fst.con _ _ x).
-
-notation "\fst x" with precedence 89
-for @{ 'fst $x}.
-
-interpretation "Second projection" 'snd x =
- (cic:/matita/datatypes/constructors/snd.con _ _ x).
-
-notation "\snd x" with precedence 89
-for @{ 'snd $x}.
+interpretation "pair pi1" 'pi1 = (fst _ _).
+interpretation "pair pi2" 'pi2 = (snd _ _).
+interpretation "pair pi1" 'pi1a x = (fst _ _ x).
+interpretation "pair pi2" 'pi2a x = (snd _ _ x).
+interpretation "pair pi1" 'pi1b x y = (fst _ _ x y).
+interpretation "pair pi2" 'pi2b x y = (snd _ _ x y).
 
 theorem eq_pair_fst_snd: \forall A,B:Type.\forall p:Prod A B.
-p = 〈 (\fst p), (\snd p) 〉.
+p = 〈 \fst p, \snd p 〉.
 intros.elim p.simplify.reflexivity.
 qed.
 
@@ -62,8 +49,7 @@ inductive Sum (A,B:Type) : Type \def
   inl : A \to Sum A B
 | inr : B \to Sum A B.
 
-interpretation "Disjoint union" 'plus A B =
- (cic:/matita/datatypes/constructors/Sum.ind#xpointer(1/1) A B).
+interpretation "Disjoint union" 'plus A B = (Sum A B).
 
 inductive option (A:Type) : Type ≝
    None : option A