]> matita.cs.unibo.it Git - helm.git/commitdiff
decentralizing core notation
authorFerruccio Guidi <fguidi@maelstrom.helm.cs.unibo.it>
Thu, 29 Mar 2018 22:28:23 +0000 (00:28 +0200)
committerFerruccio Guidi <fguidi@maelstrom.helm.cs.unibo.it>
Thu, 29 Mar 2018 22:28:23 +0000 (00:28 +0200)
centralized core notation (one single file) has two disadvantages:
- when some core notation is added the whole "world" must be recompiled
- unused core notation loaded in the parser gets in the way when defining contrib-specific notation
by defining core notation on a "one notation per file" basis:
+ every contrib file can load just the needed notation
+ sharing is possible as before in that two contrib files can load the same notation file

decentralalization will occur is stages:
this is the first stage meant to solve some issues in
+ lambdadelta (! blocked by fact)
+ certifiedRev (o{} blocked by compose, comprehension, singl, subset)

18 files changed:
matita/matita/lib/arithmetics/factorial.ma
matita/matita/lib/basics/core_notation.ma
matita/matita/lib/basics/core_notation/compose_2.ma [new file with mode: 0644]
matita/matita/lib/basics/core_notation/comprehension_2.ma [new file with mode: 0644]
matita/matita/lib/basics/core_notation/fact_1.ma [new file with mode: 0644]
matita/matita/lib/basics/core_notation/singl_1.ma [new file with mode: 0644]
matita/matita/lib/basics/core_notation/subset_1.ma [new file with mode: 0644]
matita/matita/lib/basics/relations.ma
matita/matita/lib/basics/sets.ma
matita/matita/lib/formal_topology/categories.ma
matita/matita/lib/formal_topology/o-algebra.ma
matita/matita/lib/formal_topology/relations.ma
matita/matita/lib/formal_topology/subsets.ma
matita/matita/lib/hott/Overture.ma
matita/matita/lib/hott/notations.ma
matita/matita/lib/re/reb.ma
matita/matita/lib/turing/wmono.ma
matita/matita/lib/tutorial/chapter6.ma

index fc2320a948cbd324ddfe900db2af3f33837866f7..60519e9829f185f0b614b46923f346156a1ec911 100644 (file)
@@ -10,6 +10,7 @@
       V_______________________________________________________________ *)
 
 include "arithmetics/exp.ma".
+include "basics/core_notation/fact_1.ma".
 
 let rec fact n ≝
   match n with 
index 77e44c201a800dbc3cc26b0a61c26c3b318ad35e..cdc535b81de67c9f0233fe588afcc65ddb98f230 100644 (file)
@@ -229,10 +229,6 @@ for @{ 'divide $a $b }.
 notation "- term 65 a" with precedence 65 
 for @{ 'uminus $a }.
 
-notation "a !"
-  non associative with precedence 80
-for @{ 'fact $a }.
-
 notation "\sqrt a" 
   non associative with precedence 65
 for @{ 'sqrt $a }.
@@ -263,21 +259,10 @@ for @{ 'iff $a $b }.
 
 notation "hvbox(\Omega \sup term 90 A)" non associative with precedence 90
 for @{ 'powerset $A }.
+
 notation > "hvbox(\Omega ^ term 90 A)" non associative with precedence 90
 for @{ 'powerset $A }.
 
-notation < "hvbox({ ident i | term 19 p })" with precedence 90
-for @{ 'subset (\lambda ${ident i} : $nonexistent . $p)}.
-
-notation > "hvbox({ ident i | term 19 p })" with precedence 90
-for @{ 'subset (\lambda ${ident i}. $p)}.
-
-notation < "hvbox({ ident i ∈ term 19 s | term 19 p })" with precedence 90
-for @{ 'comprehension $s (\lambda ${ident i} : $nonexistent . $p)}.
-
-notation > "hvbox({ ident i ∈ term 19 s | term 19 p })" with precedence 90
-for @{ 'comprehension $s (\lambda ${ident i}. $p)}.
-
 notation "hvbox(a break ∈ b)" non associative with precedence 45
 for @{ 'mem $a $b }.
 
@@ -296,8 +281,6 @@ for @{ 'intersects $a $b }. (* \cap *)
 notation "hvbox(a break ∪ b)" left associative with precedence 55
 for @{ 'union $a $b }. (* \cup *)
 
-notation "hvbox({ term 19 a })" with precedence 90 for @{ 'singl $a}.
-
 (* other notations **********************************************************)
 
 notation "hvbox(a break \approx b)" non associative with precedence 45 
@@ -305,10 +288,6 @@ notation "hvbox(a break \approx b)" non associative with precedence 45
         
 notation "hvbox(a break # b)" non associative with precedence 45 
   for @{ 'apart $a $b}.
-    
-notation "hvbox(a break \circ b)" 
-  left associative with precedence 60
-for @{ 'compose $a $b }.
 
 notation < "↓ \ensp a" with precedence 60 for @{ 'downarrow $a }.
 notation > "↓ a" with precedence 60 for @{ 'downarrow $a }.
diff --git a/matita/matita/lib/basics/core_notation/compose_2.ma b/matita/matita/lib/basics/core_notation/compose_2.ma
new file mode 100644 (file)
index 0000000..50938de
--- /dev/null
@@ -0,0 +1,16 @@
+(*
+    ||M||  This file is part of HELM, an Hypertextual, Electronic        
+    ||A||  Library of Mathematics, developed at the Computer Science     
+    ||T||  Department of the University of Bologna, Italy.                     
+    ||I||                                                                 
+    ||T||  
+    ||A||  This file is distributed under the terms of the 
+    \   /  GNU General Public License Version 2        
+     \ /      
+      V_______________________________________________________________ *)
+
+(* Core notation *******************************************************)
+
+notation "hvbox(a break \circ b)" 
+  left associative with precedence 60
+for @{ 'compose $a $b }.
diff --git a/matita/matita/lib/basics/core_notation/comprehension_2.ma b/matita/matita/lib/basics/core_notation/comprehension_2.ma
new file mode 100644 (file)
index 0000000..c58fe4d
--- /dev/null
@@ -0,0 +1,18 @@
+(*
+    ||M||  This file is part of HELM, an Hypertextual, Electronic        
+    ||A||  Library of Mathematics, developed at the Computer Science     
+    ||T||  Department of the University of Bologna, Italy.                     
+    ||I||                                                                 
+    ||T||  
+    ||A||  This file is distributed under the terms of the 
+    \   /  GNU General Public License Version 2        
+     \ /      
+      V_______________________________________________________________ *)
+
+(* Core notation *******************************************************)
+
+notation < "hvbox({ ident i ∈ term 19 s | term 19 p })" with precedence 90
+for @{ 'comprehension $s (\lambda ${ident i} : $nonexistent . $p)}.
+
+notation > "hvbox({ ident i ∈ term 19 s | term 19 p })" with precedence 90
+for @{ 'comprehension $s (\lambda ${ident i}. $p)}.
diff --git a/matita/matita/lib/basics/core_notation/fact_1.ma b/matita/matita/lib/basics/core_notation/fact_1.ma
new file mode 100644 (file)
index 0000000..7deb9a5
--- /dev/null
@@ -0,0 +1,16 @@
+(*
+    ||M||  This file is part of HELM, an Hypertextual, Electronic        
+    ||A||  Library of Mathematics, developed at the Computer Science     
+    ||T||  Department of the University of Bologna, Italy.                     
+    ||I||                                                                 
+    ||T||  
+    ||A||  This file is distributed under the terms of the 
+    \   /  GNU General Public License Version 2        
+     \ /      
+      V_______________________________________________________________ *)
+
+(* Core notation *******************************************************)
+
+notation "a !"
+  non associative with precedence 80
+for @{ 'fact $a }.
diff --git a/matita/matita/lib/basics/core_notation/singl_1.ma b/matita/matita/lib/basics/core_notation/singl_1.ma
new file mode 100644 (file)
index 0000000..95e5733
--- /dev/null
@@ -0,0 +1,14 @@
+(*
+    ||M||  This file is part of HELM, an Hypertextual, Electronic        
+    ||A||  Library of Mathematics, developed at the Computer Science     
+    ||T||  Department of the University of Bologna, Italy.                     
+    ||I||                                                                 
+    ||T||  
+    ||A||  This file is distributed under the terms of the 
+    \   /  GNU General Public License Version 2        
+     \ /      
+      V_______________________________________________________________ *)
+
+(* Core notation *******************************************************)
+
+notation "hvbox({ term 19 a })" with precedence 90 for @{ 'singl $a}.
diff --git a/matita/matita/lib/basics/core_notation/subset_1.ma b/matita/matita/lib/basics/core_notation/subset_1.ma
new file mode 100644 (file)
index 0000000..4fe8662
--- /dev/null
@@ -0,0 +1,18 @@
+(*
+    ||M||  This file is part of HELM, an Hypertextual, Electronic        
+    ||A||  Library of Mathematics, developed at the Computer Science     
+    ||T||  Department of the University of Bologna, Italy.                     
+    ||I||                                                                 
+    ||T||  
+    ||A||  This file is distributed under the terms of the 
+    \   /  GNU General Public License Version 2        
+     \ /      
+      V_______________________________________________________________ *)
+
+(* Core notation *******************************************************)
+
+notation < "hvbox({ ident i | term 19 p })" with precedence 90
+for @{ 'subset (\lambda ${ident i} : $nonexistent . $p)}.
+
+notation > "hvbox({ ident i | term 19 p })" with precedence 90
+for @{ 'subset (\lambda ${ident i}. $p)}.
index fb0423cea315bf5ceda6185c8fe95e3060221a67..24b2c9a9e32b688c05c712cd824a390ba2f65a76 100644 (file)
@@ -10,6 +10,7 @@
       V_______________________________________________________________ *)
 
 include "basics/logic.ma".
+include "basics/core_notation/compose_2.ma".
 
 (********** predicates *********)
 
index cdc6ac9e8e278e19c3d7957bf600f7150ae1d895..2f570c18feb503e1da38186bf9455a8c0b9e1018 100644 (file)
@@ -10,6 +10,7 @@
       V_______________________________________________________________ *)
 
 include "basics/logic.ma".
+include "basics/core_notation/singl_1.ma".
 
 (**** a subset of A is just an object of type A→Prop ****)
 
@@ -116,4 +117,4 @@ qed.
 (* substraction *)
 lemma substract_def:∀U.∀A,B:U→Prop. A-B ≐ A ∩ ¬B.
 #U #A #B #w normalize /2/
-qed.
\ No newline at end of file
+qed.
index 5643e2f6b623b5605aa28cd2b5303038d3e8d89e..02605e4a87da4ab6491c1ff9467311d76db311b5 100644 (file)
@@ -13,6 +13,7 @@
 (**************************************************************************)
 
 include "formal_topology/cprop_connectives.ma".
+include "basics/core_notation/compose_2.ma".
 
 inductive eq (A:Type[0]) (x:A) : A → CProp[0] ≝
     refl: eq A x x.
@@ -525,4 +526,4 @@ notation > "r⎻*" non associative with precedence 90 for @{'OR_f_minus_star $r}
 
 notation "r \sup ⎻" non associative with precedence 90 for @{'OR_f_minus $r}.
 notation > "r⎻" non associative with precedence 90 for @{'OR_f_minus $r}.
-*)
\ No newline at end of file
+*)
index 70473755095490011616866e83c78f411fc36a22..61a784605dfbaec75c5254a6e6fa1463bcc466c0 100644 (file)
@@ -12,6 +12,7 @@
 (*                                                                        *)
 (**************************************************************************)
 
+include "basics/core_notation/comprehension_2.ma".
 include "formal_topology/categories.ma".
 (*
 inductive bool : Type[0] := true : bool | false : bool.
index 2d5d85a6be9a1dc0cca55b46d702694b655712a8..3516999008aa714be19b99bf19b068dc585881dc 100644 (file)
@@ -12,6 +12,7 @@
 (*                                                                        *)
 (**************************************************************************)
 
+include "basics/core_notation/comprehension_2.ma".
 include "formal_topology/subsets.ma".
 (*
 record binary_relation (A,B: SET) : Type[1] ≝
index 5cb8455a07b80d5df624ba5728d0c5792982968d..56c2c895cbb98d2495b099e88c919792481075d2 100644 (file)
@@ -13,6 +13,8 @@
 (**************************************************************************)
 
 include "formal_topology/categories.ma".
+include "basics/core_notation/singl_1.ma".
+include "basics/core_notation/subset_1.ma".
 (*
 record powerset_carrier (A: objs1 SET) : Type[1] ≝ { mem_operator: A ⇒_1 CPROP }.
 interpretation "powerset low" 'powerset A = (powerset_carrier A).
index 3725123cce1e23424349e2f6dd848c6095668663..e02683ffa8650caad5010be9e2904dea502f0c6d 100644 (file)
@@ -1,4 +1,5 @@
 include "hott/types.ma".
+include "basics/core_notation/compose_2.ma".
 
 (* * * Basic definitions of homotopy type theory, particularly the groupoid structure of identity types. *)
 
index 83d3324ae08350be0ed383f90c13a69911a959f3..71d41f73b061d0ef3f982298a0777c5f025cfde8 100644 (file)
@@ -243,10 +243,6 @@ for @{ 'divide $a $b }.
 notation "- term 65 a" with precedence 65 
 for @{ 'uminus $a }.
 
-notation "a !"
-  non associative with precedence 80
-for @{ 'fact $a }.
-
 notation "\sqrt a" 
   non associative with precedence 65
 for @{ 'sqrt $a }.
@@ -277,18 +273,6 @@ for @{ 'powerset $A }.
 notation > "hvbox(\Omega ^ term 90 A)" non associative with precedence 90
 for @{ 'powerset $A }.
 
-notation < "hvbox({ ident i | term 19 p })" with precedence 90
-for @{ 'subset (\lambda ${ident i} : $nonexistent . $p)}.
-
-notation > "hvbox({ ident i | term 19 p })" with precedence 90
-for @{ 'subset (\lambda ${ident i}. $p)}.
-
-notation < "hvbox({ ident i ∈ term 19 s | term 19 p })" with precedence 90
-for @{ 'comprehension $s (\lambda ${ident i} : $nonexistent . $p)}.
-
-notation > "hvbox({ ident i ∈ term 19 s | term 19 p })" with precedence 90
-for @{ 'comprehension $s (\lambda ${ident i}. $p)}.
-
 notation "hvbox(a break ∈ b)" non associative with precedence 45
 for @{ 'mem $a $b }.
 
@@ -307,20 +291,12 @@ for @{ 'intersects $a $b }. (* \cap *)
 notation "hvbox(a break ∪ b)" left associative with precedence 55
 for @{ 'union $a $b }. (* \cup *)
 
-notation "hvbox({ term 19 a })" with precedence 90 for @{ 'singl $a}.
-
 notation "hvbox(a break \approx b)" non associative with precedence 45 
   for @{ 'napart $a $b}.
         
 notation "hvbox(a break # b)" non associative with precedence 45 
   for @{ 'apart $a $b}.
-*)
-    
-notation "hvbox(a break \circ b)" 
-  left associative with precedence 60
-for @{ 'compose $a $b }.
 
-(*
 notation < "↓ \ensp a" with precedence 60 for @{ 'downarrow $a }.
 notation > "↓ a" with precedence 60 for @{ 'downarrow $a }.
 
index 73faed3770c6417cacc6eea1089fcc6fb1007b36..2c5b129d228e7c87bb4d537c39e47a28cb22dab1 100644 (file)
@@ -14,6 +14,7 @@
 
 include "arithmetics/nat.ma".
 include "basics/lists/list.ma".
+include "basics/core_notation/singl_1.ma".
 
 interpretation "iff" 'iff a b = (iff a b).  
 
@@ -778,4 +779,4 @@ ntheorem der1: ∀S,a,e,e',w. der S a e e' → in_l S w e' → in_l S (a::w) e.
      | #x; #y; #z; #w; #a; #b; #c; #d; #K; ncases (?:False); /2/ ]
 ##| #r1; #r2; #r1'; #r2'; #H1; #H2; #H3; #H4; #H5; #H6;
 
-*)
\ No newline at end of file
+*)
index 35c409639a7dfbc60f1a5f43829e7bb73370c2a9..d31ed62f551dabdb8e2963041c664f7b64e30415 100644 (file)
@@ -11,6 +11,7 @@
 
 include "basics/vectors.ma".
 include "basics/finset.ma".
+include "basics/core_notation/compose_2.ma".
 (* include "basics/relations.ma". *)
 
 record tape (sig:FinSet): Type[0] ≝ 
index 38fb54a0c3afa3a96be06c7d31a35285d3a651ff..a5355b5fa990fdea2185197ca25a45553ff5e5d9 100644 (file)
@@ -1,5 +1,6 @@
 
 include "tutorial/chapter5.ma".
+include "basics/core_notation/singl_1.ma".
 
 (*************************** Naive Set Theory *********************************)