isabelle - Can't obtain variable -


i'm trying prove following simple theorem i've come with, that:

a point on boundary iff small enough ball around point contains points both in s , out of s.

below i've managed forward direction i'm stuck on backwards direction.

using same approach fails on last step, goal close not quite there, , i'm not sure here:

lemma frontier_ball: "x ∈ frontier s ⟷   (∃r>0. (∀δ>0. δ<r ⟶ ((ball x δ) ∩ s ≠ {} ∧ (ball x δ) ∩ -s ≠ {})))"   (is "?lhs = ?rhs") proof   {     assume "?lhs"     hence "x ∉ interior s ∧ x ∉ interior (-s)" (auto simp: frontier_def interior_complement)     hence "∀δ>0. ((ball x δ) ∩ s ≠ {} ∧ (ball x δ) ∩ -s ≠ {})" (auto simp: mem_interior)     have "?rhs" (simp add: orderings.no_top_class.gt_ex)   }   {     assume "¬?lhs"     hence "x ∈ interior s ∨ x ∈ interior (-s)" (auto simp: frontier_def interior_complement)     hence "∃δ>0. ball x δ ∩ s = {} ∨ ball x δ ∩ -s = {}" (auto simp: mem_interior)     have "¬?rhs" (simp add: subset_ball)   } qed 

i tried tell isabelle how obtain such delta it's stuck on obtain step:

lemma frontier_ball: "x ∈ frontier s ⟷   (∃r>0. (∀δ>0. δ<r ⟶ ((ball x δ) ∩ s ≠ {} ∧ (ball x δ) ∩ -s ≠ {})))"   (is "?lhs = ?rhs") proof   {     assume "?lhs"     hence "x ∉ interior s ∧ x ∉ interior (-s)" (auto simp: frontier_def interior_complement)     hence "∀δ>0. ((ball x δ) ∩ s ≠ {} ∧ (ball x δ) ∩ -s ≠ {})" (auto simp: mem_interior)     have "?rhs" (simp add: orderings.no_top_class.gt_ex)   }   {     fix r::real     assume "¬?lhs ∧ r>0"     hence "x ∈ interior s ∨ x ∈ interior (-s)" (auto simp: frontier_def interior_complement)     obtain r2 "r2>0" , "ball x r2 ∩ s = {} ∨ ball x r2 ∩ -s = {}" (auto simp: mem_interior)     obtain δ "δ>0 ∧ δ<r ∧ δ<r2" auto    } qed 

any pointers great!

well, can construct such δ. if have r > 0 , r2 > 0 want δ fulfils 0 < δ ≤ r2 , 0 < δ < r, why not use min r2 (r/2)? can define δ , can prove properties want:

    def δ ≡ "min r2 (r/2)"     r2 have δ: "δ > 0" "δ < r" "δ ≤ r2" auto     r2 have δ': "ball x δ ∩ s = {} ∨ ball x r2 ∩ -s = {}" using subset_ball[of δ(3)] auto 

or, bit more direct:

lemma frontier_ball: "(x :: 'a :: {metric_space}) ∈ frontier s ⟷   (∃r>0. (∀δ>0. δ<r ⟶ ((ball x δ) ∩ s ≠ {} ∧ (ball x δ) ∩ -s ≠ {})))"   (is "?lhs = ?rhs") proof -   {     assume "?lhs"     hence "x ∉ interior s ∧ x ∉ interior (-s)" (auto simp: frontier_def interior_complement)     hence "∀δ>0. ((ball x δ) ∩ s ≠ {} ∧ (ball x δ) ∩ -s ≠ {})" (auto simp: mem_interior)     have "?rhs" (simp add: orderings.no_top_class.gt_ex)   }     {     assume lhs: "¬?lhs"     {       fix r :: real assume r: "r > 0"       lhs have "x ∈ interior s ∨ x ∈ interior (-s)"          (auto simp: frontier_def interior_complement)       obtain δ "δ > 0" "ball x δ ∩ s = {} ∨ ball x δ ∩ -s = {}"          (auto simp: mem_interior)       r have "min δ (r/2) > 0" "min δ (r/2) < r"          "ball x (min δ (r/2)) ∩ s = {} ∨ ball x (min δ (r/2)) ∩ -s = {}" using subset_ball auto       hence "∃δ>0. δ < r ∧ (ball x δ ∩ s = {} ∨ ball x δ ∩ -s = {})" blast     }     hence "¬?rhs" blast   }   show ?thesis blast qed 

for record, avoid doing things assume "a ∧ b". assume "a" "b" instead. gives 2 facts can work directly, instead of having them wrapped hol conjunction in 1 fact.


Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -