set "baseuri" "cic:/matita/PREDICATIVE-TOPOLOGY/class_defs".
-include "../../library/logic/connectives.ma".
+include "logic/connectives.ma".
(* ACZEL CATEGORIES:
- We use typoids with a compatible membership relation
record Class: Type \def {
class:> Type;
cin: class \to Prop;
- cle1: class \to class \to Prop
+ ceq: class \to class \to Prop;
+ cin_repl: \forall c1,c2. cin c1 \to ceq c1 c2 \to cin c2;
+ ceq_repl: \forall c1,c2,d1,d2. cin c1 \to
+ ceq c1 c2 \to ceq c1 d1 \to ceq c2 d2 \to ceq d1 d2;
+ ceq_refl: \forall c. cin c \to ceq c c
}.
-inductive cle (C:Class) (c1:C): C \to Prop \def
- | cle_refl: cin ? c1 \to cle ? c1 c1
- | ceq_sing: \forall c2,c3.
- cle ? c1 c2 \to cin ? c3 \to cle1 ? c2 c3 \to cle ? c1 c3.
+(* external universal quantification *)
+inductive call (C:Class) (P:C \to Prop) : Prop \def
+ | call_intro: (\forall c. cin ? c \to P c) \to call C P.
-inductive ceq (C:Class) (c1:C) (c2:C): Prop \def
- | ceq_intro: cle ? c1 c2 \to cle ? c2 c1 \to ceq ? c1 c2.
+inductive call2 (C1,C2:Class) (P:C1 \to C2 \to Prop) : Prop \def
+ | call2_intro:
+ (\forall c1,c2. cin ? c1 \to cin ? c2 \to P c1 c2) \to call2 C1 C2 P.
+
+(* notations **************************************************************)
+
+(*CSC: the URI must disappear: there is a bug now *)
+interpretation "external for all" 'xforall \eta.x =
+ (cic:/matita/PREDICATIVE-TOPOLOGY/class_defs/call.ind#xpointer(1/1) _ x).
+
+notation > "hvbox(\xforall ident i opt (: ty) break . p)"
+ right associative with precedence 20
+for @{ 'xforall ${default
+ @{\lambda ${ident i} : $ty. $p}
+ @{\lambda ${ident i} . $p}}}.
+
+(*CSC: the URI must disappear: there is a bug now *)
+interpretation "external for all 2" 'xforall2 \eta.x \eta.y =
+ (cic:/matita/PREDICATIVE-TOPOLOGY/class_defs/call2.ind#xpointer(1/1) _ _ x y).
+
+notation > "hvbox(\xforall ident i1 opt (: ty1) ident i2 opt (: ty2) break . p)"
+ right associative with precedence 20
+for @{ 'xforall2 ${default
+ @{\lambda ${ident i1} : $ty1. \lambda ${ident i2} : $ty2. $p}
+ @{\lambda ${ident i1}, ${ident i2}. $p}}}.
set "baseuri" "cic:/matita/PREDICATIVE-TOPOLOGY/class_eq".
-include "class_le.ma".
+include "class_defs.ma".
-theorem ceq_cl: \forall C,c1,c2. ceq ? c1 c2 \to cin C c1 \land cin C c2.
-intros; elim H; clear H.
-lapply cle_cl to H1 using H; clear H1; decompose H;
-lapply cle_cl to H2 using H; clear H2; decompose H.
-auto.
-qed.
-
-theorem ceq_refl: \forall C,c. cin C c \to ceq ? c c.
-intros; apply ceq_intro; auto.
-qed.
+theorem ceq_trans: \forall C. \xforall c1,c2. ceq C c1 c2 \to
+ \xforall c3. ceq ? c2 c3 \to ceq ? c1 c3.
+intros.
-theorem ceq_trans: \forall C,c2,c1,c3.
- ceq C c2 c3 \to ceq ? c1 c2 \to ceq ? c1 c3.
-intros; elim H; elim H1; clear H; clear H1.
+(*
apply ceq_intro; apply cle_trans; [|auto|auto||auto|auto].
qed.
theorem ceq_sym: \forall C,c1,c2. ceq C c1 c2 \to ceq C c2 c1.
intros; elim H; clear H.; auto.
qed.
+*)
\ No newline at end of file
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-set "baseuri" "cic:/matita/PREDICATIVE-TOPOLOGY/class_le".
-
-include "class_defs.ma".
-
-theorem cle_cl: \forall C,c1,c2. cle ? c1 c2 \to cin C c1 \land cin C c2.
-intros; elim H; clear H; clear c2;
- [| decompose H2 ]; auto.
-qed.
-
-theorem cle_trans: \forall C,c1,c2. cle C c1 c2 \to
- \forall c3. cle ? c3 c1 \to cle ? c3 c2.
-intros 4; elim H; clear H; clear c2;
- [| apply ceq_sing; [||| apply H4 ]]; auto.
-qed.