Download data/lean/OAI/Geometry/Cannon/Modulus/Quad.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.63 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/Cannon/Modulus/Quad.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/Cannon/Modulus/Quad.lean
-
curl -L -o Quad.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/Cannon/Modulus/Quad.lean
3.63 kB
| import Mathlib | |
| namespace OAI | |
| section | |
| noncomputable section | |
| namespace CannonGeneralizedDisk | |
| open Set Metric | |
| open scoped ComplexConjugate OnePoint | |
| structure Quad where | |
| A : β | |
| b : β | |
| C : β | |
| def Quad.value (q : Quad) (z : β) : β := | |
| q.A*Complex.normSq z-2*(conj q.b*z).re+q.C | |
| def Quad.discr (q : Quad) : β := Complex.normSq q.b-q.A*q.C | |
| def Quad.region (q : Quad) : Set (OnePoint β) := | |
| {p | p.elim (q.A<0) (fun z=>q.value z<0)} | |
| @[simp] lemma Quad.mem_region_coe (q : Quad) (z : β) : | |
| (z : OnePoint β)βq.region β q.value z<0 := Iff.rfl | |
| @[simp] lemma Quad.mem_region_infty (q : Quad) : | |
| ββq.region β q.A<0 := Iff.rfl | |
| lemma Quad.value_inner (q : Quad) (z : β) : | |
| q.value z=q.A*βzβ^2-2*inner β q.b z+q.C := by | |
| simp only [value,Complex.normSq_eq_norm_sq,Complex.inner,mul_comm (conj q.b) z] | |
| def Quad.affine (q : Quad) (a b : β) : Quad := | |
| β¨q.A,(q.A:β)*b+a*q.b, | |
| q.A*Complex.normSq b+2*(conj (a*q.b)*b).re+q.C*Complex.normSq aβ© | |
| def Quad.inv (q : Quad) : Quad := β¨q.C,conj q.b,q.Aβ© | |
| lemma Quad.affine_value (q : Quad) (a b z : β) : | |
| (q.affine a b).value (a*z+b)=Complex.normSq a*q.value z := by | |
| simp only [value,affine,Complex.normSq_apply,Complex.add_re,Complex.add_im, | |
| Complex.mul_re,Complex.mul_im,Complex.conj_re,Complex.conj_im, | |
| Complex.ofReal_re,Complex.ofReal_im] | |
| ring | |
| lemma Quad.affine_discr (q : Quad) (a b : β) : | |
| (q.affine a b).discr=Complex.normSq a*q.discr := by | |
| simp only [discr,affine,Complex.normSq_apply,Complex.add_re,Complex.add_im, | |
| Complex.mul_re,Complex.mul_im,Complex.conj_re,Complex.conj_im, | |
| Complex.ofReal_re,Complex.ofReal_im] | |
| ring | |
| lemma Quad.inv_discr (q : Quad) : q.inv.discr=q.discr := by | |
| simp only [discr,inv,Complex.normSq_conj] | |
| ring | |
| lemma Quad.inv_value (q : Quad) {z : β} (hz : zβ 0) : | |
| q.inv.value zβ»ΒΉ=q.value z/Complex.normSq z := by | |
| have hnorm : Complex.normSq zβ 0:=(Complex.normSq_pos.mpr hz).ne' | |
| change q.C*Complex.normSq zβ»ΒΉ-2*(conj (conj q.b)*zβ»ΒΉ).re+q.A = _ | |
| rw [Complex.normSq_inv] | |
| simp only [value,Complex.mul_re,Complex.conj_re,Complex.conj_im, | |
| Complex.inv_re,Complex.inv_im] | |
| field_simp | |
| ring | |
| lemma Quad.affine_mem_iff (q : Quad) (a b : β) (ha : aβ 0) (z : β) : | |
| (q.affine a b).value (a*z+b)<0 β q.value z<0 := by | |
| rw [affine_value] | |
| simpa only [mul_zero] using | |
| (mul_lt_mul_iff_rightβ (Complex.normSq_pos.mpr ha) : | |
| Complex.normSq a*q.value z<Complex.normSq a*0 β q.value z<0) | |
| lemma Quad.inv_mem_iff (q : Quad) {z : β} (hz : zβ 0) : | |
| q.inv.value zβ»ΒΉ<0 β q.value z<0 := by | |
| rw [inv_value q hz,div_lt_iffβ (Complex.normSq_pos.mpr hz),zero_mul] | |
| def disk (a : β) (r : β) : Quad := β¨1,a,Complex.normSq a-r^2β© | |
| lemma disk_value (a z : β) (r : β) : | |
| (disk a r).value z=dist z a^2-r^2 := by | |
| rw [Quad.value_inner,dist_eq_norm,norm_sub_sq_real] | |
| simp only [disk,one_mul,Complex.normSq_eq_norm_sq] | |
| rw [real_inner_comm a z] | |
| ring | |
| lemma disk_discr (a : β) (r : β) : (disk a r).discr=r^2 := by | |
| simp [disk,Quad.discr] | |
| lemma disk_region (a : β) {r : β} (hr : 0<r) : | |
| (disk a r).region=((β) '' ball a r : Set (OnePoint β)) := by | |
| ext p | |
| induction p using OnePoint.rec with | |
| | infty => simp [disk,Quad.region] | |
| | coe z => | |
| rw [Quad.mem_region_coe,disk_value] | |
| constructor | |
| Β· intro h | |
| exact β¨z,by rw [mem_ball]; nlinarith [dist_nonneg (x:=z) (y:=a)],rflβ© | |
| Β· rintro β¨w,hw,hwzβ© | |
| have he : w=z:=OnePoint.coe_injective hwz | |
| subst w | |
| rw [mem_ball] at hw | |
| nlinarith [dist_nonneg (x:=z) (y:=a)] | |
| end CannonGeneralizedDisk | |
| end | |
| end | |
| end OAI | |