]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/contribs/dama/dama/ordered_uniform.ma
Another bug.
[helm.git] / helm / software / matita / contribs / dama / dama / ordered_uniform.ma
index 7b93454ef848a3831c0d05389cc0896ede5c514c..5d6559d1f301a5ad0c51de2a32a920b18a592cf3 100644 (file)
@@ -34,7 +34,8 @@ coercion ous_unifspace.
 
 record ordered_uniform_space : Type ≝ {
   ous_stuff :> ordered_uniform_space_;
-  ous_convex: ∀U.us_unifbase ous_stuff U → convex ous_stuff U
+  ous_convex_l: ∀U.us_unifbase ous_stuff U → convex (os_l ous_stuff) U;
+  ous_convex_r: ∀U.us_unifbase ous_stuff U → convex (os_r ous_stuff) U
 }.   
 
 definition half_ordered_set_OF_ordered_uniform_space : ordered_uniform_space → half_ordered_set.
@@ -77,20 +78,17 @@ lemma restriction_agreement :
   ∀O:ordered_uniform_space.∀s:‡O.∀P:{[s]} squareO → Prop.∀OP:O squareO → Prop.Prop.
 apply(λO:ordered_uniform_space.λs:‡O.
        λP:{[s]} squareO → Prop. λOP:O squareO → Prop.
-          ∀b:O squareO.∀H1,H2.(P b → OP b) ∧ (OP b → P b));
-[5,7: apply H1|6,8:apply H2]skip;
+          ∀b:{[s]} squareO.(P b → OP b) ∧ (OP b → P b));
 qed.
 
 lemma unrestrict: ∀O:ordered_uniform_space.∀s:‡O.∀U,u.∀x:{[s]} squareO.
   restriction_agreement ? s U u → U x → u x.
-intros 6; cases x (b b1); cases b (w1 H1); cases b1 (w2 H2); clear b b1 x; 
-cases (H 〈w1,w2〉 H1 H2) (L _); intro Uw; apply L; apply Uw;
+intros 6; cases (H x); assumption;
 qed.
 
 lemma restrict: ∀O:ordered_uniform_space.∀s:‡O.∀U,u.∀x:{[s]} squareO.
   restriction_agreement ? s U u → u x → U x.
-intros 5; cases x (b b1); cases b (w1 H1); cases b1 (w2 H2); clear b1 b x;
-intros (Ra uw); cases (Ra 〈w1,w2〉 H1 H2) (_ R); apply R; apply uw;
+intros 6; cases (H x); assumption;
 qed.
 
 lemma invert_restriction_agreement: 
@@ -98,9 +96,9 @@ lemma invert_restriction_agreement:
    ∀U:{[s]} squareO → Prop.∀u:O squareO → Prop.
     restriction_agreement ? s U u →
     restriction_agreement ? s (\inv U) (\inv u).
-intros 8; split; intro;
-[1: apply (unrestrict ???? (segment_square_of_ordered_set_square ?? 〈\snd b,\fst b〉 H2 H1) H H3);
-|2: apply (restrict ???? (segment_square_of_ordered_set_square ?? 〈\snd b,\fst b〉 H2 H1) H H3);]
+intros 6; cases b;
+generalize in match (H 〈h1,h〉); cases h; cases h1; simplify; 
+intro X; cases X; split; assumption; 
 qed. 
 
 lemma bs2_of_bss2: 
@@ -167,57 +165,54 @@ intros (O s); apply mk_ordered_uniform_space;
             |2: apply (restrict O s ??? HuU); apply Hur; 
                 apply (unrestrict O s ??? (invert_restriction_agreement O s ?? HuU) H);]]
     |2: simplify; reflexivity;]
-|2: simplify; unfold convex; intros;
-    cases H (u HU); cases HU (Gu HuU); clear HU H; 
-    
-lemma ls2l: 
-  ∀O:ordered_set.∀s:‡O.∀x,y:os_l (square_ordered_set (segment_ordered_set O s)).
-    le (os_l (square_ordered_set (segment_ordered_set O s))) x y → 
-    \fst x ≤ \fst y.
-intros 4; cases x (a1 a2); cases y (b1 b2); clear x y; 
-intros 2 (H K); apply H; clear H;
-simplify in K:(? ? ? %);
-simplify in K:(? ? % ?);
-whd in ⊢ (? (? (% ?)) ? ?);
-whd in ⊢ (? (? ((λ_:?.? ? ? (? ? (? (% ?)))) ?)) ? ?);
-simplify;
-whd in K:(% ? ? ?);
-simplify in K:(%);
-whd in ⊢ (? (% ?) ? ? ? ?);
-simplify in ⊢ (? (% ?) ? ? ? ?);
-simplify in ⊢ (? % ? ? ? ?);
-simplify in ⊢ (%);
-cases (wloss_prop (os_l (segment_ordered_set O s)));
-rewrite <H in K ⊢ %;
-whd in ⊢ (? % ? ?);
-simplify in ⊢ (%); 
-unfold hos_excess; do 2 rewrite <H; 
-
-SQUARE SEEMS NOT DUAL!
-
-cases a1 (a _); cases a2 (b _);
-cases b1 (c _); cases b2 (d _); clear a1 a2 b1 b2; simplify;
-intros 2 (H K); apply H; clear H; apply K;           
-    
-    lapply (ous_convex ?? Gu p ? H2 y H3) as Cu;
-    [1: apply (unrestrict O s ??? HuU); apply H1;
-    |2: apply (restrict O s ??? HuU Cu);]]
+|2: simplify; unfold convex; intros 3; cases s1; intros;
+    (* TODO: x2sx is for ≰, we need one for ≤ *) 
+    cases H (u HU); cases HU (Gu HuU); clear HU H;
+    lapply depth=0 (ous_convex_l ?? Gu 〈\fst h,\fst h1〉 ???????) as K3;
+    [2: intro; apply H2; apply (x2sx (os_l O) s h h1 H);
+    |3: apply 〈\fst (\fst y),\fst (\snd y)〉;
+    |4: intro; change in H with (\fst (\fst y) ≰ \fst h1); apply H3;
+        apply (x2sx (os_l O) s (\fst y) h1 H);
+    |5: change with (\fst h ≤ \fst (\fst y)); intro; apply H4;
+        apply (x2sx (os_l O) s h (\fst y) H);
+    |6: change with (\fst (\snd y) ≤ \fst h1); intro; apply H5;
+        apply (x2sx (os_l O) s (\snd y) h1 H);
+    |7: change with (\fst (\fst y) ≤ \fst (\snd y)); intro; apply H6;
+        apply (x2sx (os_l O) s (\fst y) (\snd y) H);
+    |8: apply (restrict O s U u y HuU K3);
+    |1: apply (unrestrict O s ?? 〈h,h1〉 HuU H1);]
+|3: simplify; unfold convex; intros 3; cases s1; intros; (* TODO *)
+    cases H (u HU); cases HU (Gu HuU); clear HU H;
+    lapply depth=0 (ous_convex_r ?? Gu 〈\fst h,\fst h1〉 ???????) as K3;
+    [2: intro; apply H2; apply (x2sx (os_r O) s h h1 H);
+    |3: apply 〈\fst (\fst y),\fst (\snd y)〉;
+    |4: intro; (*change in H with (\fst (\fst y) ≱ \fst h1);*) apply H3;
+        apply (x2sx (os_r O) s (\fst y) h1 H);
+    |5: (*change with (\fst h ≥ \fst (\fst y));*) intro; apply H4;
+        apply (x2sx (os_r O) s h (\fst y) H);
+    |6: (*change with (\fst (\snd y) ≤ \fst h1);*) intro; apply H5;
+        apply (x2sx (os_r O) s (\snd y) h1 H);
+    |7: (*change with (\fst (\fst y) ≤ \fst (\snd y));*) intro; apply H6;
+        apply (x2sx (os_r O) s (\fst y) (\snd y) H);
+    |8: apply (restrict O s U u y HuU K3);
+    |1: apply (unrestrict O s ?? 〈h,h1〉 HuU H1);]
+]  
 qed.
 
-interpretation "Ordered uniform space segment" 'segment_set a b = 
- (segment_ordered_uniform_space _ a b).
+interpretation "Ordered uniform space segment" 'segset a = 
+ (segment_ordered_uniform_space _ a).
 
 (* Lemma 3.2 *)
 alias symbol "pi1" = "exT \fst".
 lemma restric_uniform_convergence:
- ∀O:ordered_uniform_space.∀l,u:O.
-  ∀x:{[l,u]}.
-   ∀a:sequence {[l,u]}.
+ ∀O:ordered_uniform_space.∀s:‡O.
+  ∀x:{[s]}.
+   ∀a:sequence {[s]}.
     (⌊n, \fst (a n)⌋ : sequence O) uniform_converges (\fst x) → 
       a uniform_converges x.
-intros 8; cases H1; cases H2; clear H2 H1;
+intros 7; cases H1; cases H2; clear H2 H1;
 cases (H ? H3) (m Hm); exists [apply m]; intros; 
-apply (restrict ? l u ??? H4); apply (Hm ? H1);
+apply (restrict ? s ??? H4); apply (Hm ? H1);
 qed.
 
 definition order_continuity ≝