(* ========================================================================== *) (* FLYSPECK - BOOK FORMALIZATION *) (* Section: Conclusions *) (* Chapter: Local Fan *) (* Lemma: XBJRPHC, PQCSXWG *) (* Author: John Harrison *) (* Date: 2013-07-02 *) (* ========================================================================== *) (* The continuity of the functions dihV and azim. Removed from project July 22, 2013. All the necessary theorems have been duplicated in flyspeck.ml *) module Xbjrphc = struct (* ========================================================================= *) (* More complex analysis. *) (* ========================================================================= *) needs "Multivariate/flyspeck.ml";; (* ------------------------------------------------------------------------- *) (* Some of the material at the top of the file may be repetitive. It was patched together from various email messages from J.H. to T.H. *) (* ------------------------------------------------------------------------- *) (* let REAL_CONTINUOUS_AT_DIHV = prove (`!v w w1 w2:real^N. ~collinear {v, w, w2} ==> dihV v w w1 real_continuous at w2`, REPEAT STRIP_TAC THEN GEN_REWRITE_TAC LAND_CONV [GSYM ETA_AX] THEN REWRITE_TAC[dihV] THEN CONV_TAC(TOP_DEPTH_CONV let_CONV) THEN GEN_REWRITE_TAC LAND_CONV [GSYM o_DEF] THEN MATCH_MP_TAC REAL_CONTINUOUS_CONTINUOUS_AT_COMPOSE THEN CONJ_TAC THENL [MATCH_MP_TAC CONTINUOUS_SUB THEN CONJ_TAC THEN MATCH_MP_TAC CONTINUOUS_MUL THEN SIMP_TAC[CONTINUOUS_CONST; o_DEF; CONTINUOUS_SUB; CONTINUOUS_AT_ID; CONTINUOUS_AT_LIFT_DOT2]; GEN_REWRITE_TAC LAND_CONV [GSYM ETA_AX] THEN REWRITE_TAC[ARCV_ANGLE; angle] THEN REWRITE_TAC[VECTOR_SUB_RZERO; ETA_AX] THEN MATCH_MP_TAC REAL_CONTINUOUS_WITHIN_VECTOR_ANGLE THEN POP_ASSUM MP_TAC THEN GEOM_ORIGIN_TAC `v:real^N` THEN REWRITE_TAC[VECTOR_SUB_RZERO; CONTRAPOS_THM; VECTOR_SUB_EQ] THEN MAP_EVERY X_GEN_TAC [`z:real^N`; `w:real^N`] THEN ASM_CASES_TAC `w:real^N = vec 0` THEN ASM_REWRITE_TAC[COLLINEAR_LEMMA_ALT] THEN DISCH_THEN(MP_TAC o AP_TERM `(%) (inv((w:real^N) dot w)):real^N->real^N`) THEN ASM_SIMP_TAC[VECTOR_MUL_ASSOC; REAL_MUL_LINV; DOT_EQ_0] THEN MESON_TAC[VECTOR_MUL_LID]]);; *) (* ------------------------------------------------------------------------- *) (* A few general lemmas. *) (* ------------------------------------------------------------------------- *) (* ------------------------------------------------------------------------- *) (* Stronger dihV continuity results. *) (* ------------------------------------------------------------------------- *)let CONTINUOUS_WITHIN_CX_VECTOR_ANGLE_COMPOSE =prove (`!f:real^M->real^N g x s. ~(f x = vec 0) /\ ~(g x = vec 0) /\ f continuous (at x within s) /\ g continuous (at x within s) ==> (\x. Cx(vector_angle (f x) (g x))) continuous (at x within s)`,let REAL_CONTINUOUS_WITHIN_DIHV_COMPOSE =prove (`!f:real^M->real^N g h k x s. ~collinear {f x,g x,h x} /\ ~collinear {f x,g x,k x} /\ f continuous (at x within s) /\ g continuous (at x within s) /\ h continuous (at x within s) /\ k continuous (at x within s) ==> (\x. dihV (f x) (g x) (h x) (k x)) real_continuous (at x within s)`,let REAL_CONTINUOUS_AT_DIHV_COMPOSE =prove (`!f:real^M->real^N g h k x. ~collinear {f x,g x,h x} /\ ~collinear {f x,g x,k x} /\ f continuous (at x) /\ g continuous (at x) /\ h continuous (at x) /\ k continuous (at x) ==> (\x. dihV (f x) (g x) (h x) (k x)) real_continuous (at x)`,let REAL_CONTINUOUS_WITHINREAL_DIHV_COMPOSE =prove (`!f:real->real^N g h k x s. ~collinear {f x,g x,h x} /\ ~collinear {f x,g x,k x} /\ f continuous (atreal x within s) /\ g continuous (atreal x within s) /\ h continuous (atreal x within s) /\ k continuous (atreal x within s) ==> (\x. dihV (f x) (g x) (h x) (k x)) real_continuous (atreal x within s)`,let REAL_CONTINUOUS_ATREAL_DIHV_COMPOSE =prove (`!f:real->real^N g h k x. ~collinear {f x,g x,h x} /\ ~collinear {f x,g x,k x} /\ f continuous (atreal x) /\ g continuous (atreal x) /\ h continuous (atreal x) /\ k continuous (atreal x) ==> (\x. dihV (f x) (g x) (h x) (k x)) real_continuous (atreal x)`,(* ------------------------------------------------------------------------- *) (* Some general lemmas. *) (* ------------------------------------------------------------------------- *)let REAL_CONTINUOUS_AT_AZIM_SHARP =prove (`!v w w1 w2. ~collinear{v,w,w1} /\ ~collinear{v,w,w2} /\ ~(w2 IN aff_ge {v,w} {w1}) ==> (azim v w w1) real_continuous at w2`,let LINEAR_CONTINUOUS_COMPOSE =prove (`!net f:A->real^N g:real^N->real^P. f continuous net /\ linear g ==> (\x. g(f x)) continuous net`,let CONTINUOUS_CROSS =prove (`!net:(A)net f g. f continuous net /\ g continuous net ==> (\x. (f x) cross (g x)) continuous net`,let CONTINUOUS_ON_CROSS =prove (`!f:real^N->real^3 g s. f continuous_on s /\ g continuous_on s ==> (\x. (f x) cross (g x)) continuous_on s`,(* ------------------------------------------------------------------------- *) (* Additional lemmas about aff_ge {vec 0,v} {w}. *) (* ------------------------------------------------------------------------- *) (* ------------------------------------------------------------------------- *) (* Single-variable continuity for azim with slightly sharper hypothesis. *) (* ------------------------------------------------------------------------- *)let CONTINUOUS_WITHIN_CX_VECTOR_ANGLE_COMPOSE =prove (`!f:real^M->real^N g x s. ~(f x = vec 0) /\ ~(g x = vec 0) /\ f continuous (at x within s) /\ g continuous (at x within s) ==> (\x. Cx(vector_angle (f x) (g x))) continuous (at x within s)`,(* ------------------------------------------------------------------------- *) (* General continuity of dihV composed with other functions. *) (* ------------------------------------------------------------------------- *)let REAL_CONTINUOUS_AT_AZIM_SHARP =prove (`!v w w1 w2. ~collinear{v,w,w1} /\ ~(w2 IN aff_ge {v,w} {w1}) ==> (\w2. azim v w w1 w2) real_continuous at w2`,let REAL_CONTINUOUS_WITHIN_DIHV_COMPOSE =prove (`!f:real^M->real^N g h k x s. ~collinear {f x,g x,h x} /\ ~collinear {f x,g x,k x} /\ f continuous (at x within s) /\ g continuous (at x within s) /\ h continuous (at x within s) /\ k continuous (at x within s) ==> (\x. dihV (f x) (g x) (h x) (k x)) real_continuous (at x within s)`,let REAL_CONTINUOUS_AT_DIHV_COMPOSE =prove (`!f:real^M->real^N g h k x. ~collinear {f x,g x,h x} /\ ~collinear {f x,g x,k x} /\ f continuous (at x) /\ g continuous (at x) /\ h continuous (at x) /\ k continuous (at x) ==> (\x. dihV (f x) (g x) (h x) (k x)) real_continuous (at x)`,let REAL_CONTINUOUS_WITHINREAL_DIHV_COMPOSE =prove (`!f:real->real^N g h k x s. ~collinear {f x,g x,h x} /\ ~collinear {f x,g x,k x} /\ f continuous (atreal x within s) /\ g continuous (atreal x within s) /\ h continuous (atreal x within s) /\ k continuous (atreal x within s) ==> (\x. dihV (f x) (g x) (h x) (k x)) real_continuous (atreal x within s)`,(* ------------------------------------------------------------------------- *) (* General continuity of azim composed with other functions. *) (* ------------------------------------------------------------------------- *)let REAL_CONTINUOUS_ATREAL_DIHV_COMPOSE =prove (`!f:real->real^N g h k x. ~collinear {f x,g x,h x} /\ ~collinear {f x,g x,k x} /\ f continuous (atreal x) /\ g continuous (atreal x) /\ h continuous (atreal x) /\ k continuous (atreal x) ==> (\x. dihV (f x) (g x) (h x) (k x)) real_continuous (atreal x)`,let REAL_CONTINUOUS_WITHIN_AZIM_COMPOSE =prove (`!f:real^M->real^3 g h k x s. ~collinear {f x,g x,h x} /\ ~collinear {f x,g x,k x} /\ ~(k x IN aff_ge {f x,g x} {h x}) /\ f continuous (at x within s) /\ g continuous (at x within s) /\ h continuous (at x within s) /\ k continuous (at x within s) ==> (\x. azim (f x) (g x) (h x) (k x)) real_continuous (at x within s)`,let REAL_CONTINUOUS_AT_AZIM_COMPOSE =prove (`!f:real^M->real^3 g h k x. ~collinear {f x,g x,h x} /\ ~collinear {f x,g x,k x} /\ ~(k x IN aff_ge {f x,g x} {h x}) /\ f continuous (at x) /\ g continuous (at x) /\ h continuous (at x) /\ k continuous (at x) ==> (\x. azim (f x) (g x) (h x) (k x)) real_continuous (at x)`,let REAL_CONTINUOUS_WITHINREAL_AZIM_COMPOSE =prove (`!f:real->real^3 g h k x s. ~collinear {f x,g x,h x} /\ ~collinear {f x,g x,k x} /\ ~(k x IN aff_ge {f x,g x} {h x}) /\ f continuous (atreal x within s) /\ g continuous (atreal x within s) /\ h continuous (atreal x within s) /\ k continuous (atreal x within s) ==> (\x. azim (f x) (g x) (h x) (k x)) real_continuous (atreal x within s)`,end;;let REAL_CONTINUOUS_ATREAL_AZIM_COMPOSE =prove (`!f:real->real^3 g h k x. ~collinear {f x,g x,h x} /\ ~collinear {f x,g x,k x} /\ ~(k x IN aff_ge {f x,g x} {h x}) /\ f continuous (atreal x) /\ g continuous (atreal x) /\ h continuous (atreal x) /\ k continuous (atreal x) ==> (\x. azim (f x) (g x) (h x) (k x)) real_continuous (atreal x)`,