cfahlgren1/math / lean /OAI /Analysis /Conductivity /Variational /PhysicalFaceUniqueness.lean
cfahlgren1's picture
download
raw
3.3 kB
import Mathlib
import OAI.Analysis.Conductivity.Flux.PhysicalTensorPatch
namespace OAI
noncomputable section
namespace ScalarConductivity
open Set MeasureTheory Matrix
open scoped Matrix.Norms.Elementwise
lemma squareFace_interior_unique (i k : Fin 4) {a b : ℝ} (ha : |a|<1)
(he : squareFace i a=squareFace k b) : i=k := by
have h0 := congrFun he 0
have h1 := congrFun he 1
have ha₁ := (abs_lt.mp ha).1
have ha₂ := (abs_lt.mp ha).2
fin_cases i <;> fin_cases k <;>
simp [squareFace,squareFaceBase,squareFaceDirection] at h0 h1 ⊢ <;> linarith
lemma sourceCollarPiece_open_unique (i j k l : Fin 4) {x z : Fin 3 → ℝ}
(hx : x∈sourceCollarOpenBox)
(hz : z∈sourceExtendedBox (-(1:ℝ)/100) (1/100))
(he : sourceCollarPiece i j x=sourceCollarPiece k l z) : i=k ∧ j=l := by
obtain ⟨hzt,hza,hzb⟩ := mem_sourceExtendedBox.mp hz
have hx' := sourceCollarOpenBox_subset hx
obtain ⟨hxt,hxa,hxb⟩ := mem_sourceExtendedBox.mp hx'
have hxR : 0<sourceCollarRadius j (x 0) (x 2) :=
(by norm_num : (0:ℝ)<1/50).trans_le (sourceCollarRadius_extended j hxt hxb).1
have hzR : 0<sourceCollarRadius l (z 0) (z 2) :=
(by norm_num : (0:ℝ)<1/50).trans_le (sourceCollarRadius_extended l hzt hzb).1
have hR : sourceCollarRadius j (x 0) (x 2)=sourceCollarRadius l (z 0) (z 2) := by
have hh := congrArg sourceRadial he
rwa [sourceCollarPiece_radial_pos i j hxR.le hxa,
sourceCollarPiece_radial_pos k l hzR.le hza] at hh
have ht : x 0=z 0 := by
have hh := congrArg sourceCollarTime he
rwa [sourceCollarPiece_time_pos i j hxR.le (by linarith [hxt.2]) hxa hxb,
sourceCollarPiece_time_pos k l hzR.le (by linarith [hzt.2]) hza hzb] at hh
constructor
· apply squareFace_interior_unique i k hx.2.1
have hh := congrArg (fun y : Fin 3 → ℝ => ![y 0/sourceLength,y 1]) he
rw [sourceCollarPiece_angular,sourceCollarPiece_angular,←hR] at hh
exact smul_right_injective (Fin 2 → ℝ) hxR.ne' hh
· apply squareFace_interior_unique j l hx.2.2
have hh := congrArg sourceCrossCoordinates he
rw [sourceCollarPiece_cross_pos i j hxR.le hxa,
sourceCollarPiece_cross_pos k l hzR.le hza,←ht] at hh
exact smul_right_injective (Fin 2 → ℝ) (by linarith [hxt.2] : 1-x 0≠0) hh
lemma attachedFaceTensorList_unique (s : Fin 3 → ℝ) (a : ℝ)
(ks : List (Fin 4 × Fin 4)) (i j : Fin 4) {x : Fin 3 → ℝ}
(hx : x∈sourceCollarOpenBox) (hk : (i,j)∈ks) :
attachedFaceTensorList s a ks (sourceCollarPiece i j x)=
attachedPhysicalFlatTensor s a i j (sourceCollarPiece i j x) := by
obtain ⟨k,_,hy,he⟩ := attachedFaceTensorList_local s a ks _
⟨(i,j),hk,⟨x,sourceCollarOpenBox_subset hx,rfl⟩⟩
obtain ⟨z,hz,hze⟩ := hy
obtain ⟨hi,hj⟩ := sourceCollarPiece_open_unique i j k.1 k.2 hx hz hze.symm
simpa only [←hi,←hj] using he
lemma attachedCollarTensor_open (s : Fin 3 → ℝ) (a : ℝ) (i j : Fin 4)
{x : Fin 3 → ℝ} (hx : x∈sourceCollarOpenBox) :
attachedCollarTensor s a (sourceCollarPiece i j x)=
attachedFlatTensor s a i j x := by
rw [attachedCollarTensor,attachedFaceTensorList_unique s a _ i j hx (by simp)]
simp only [attachedPhysicalFlatTensor,sourceCollarInverse_point i j hx]
end ScalarConductivity
end
end OAI

Xet Storage Details

Size:
3.3 kB
·
Xet hash:
efb06ea88f9bf016410459a16548a787bb4afaf214719fe073b9c50af16e016a

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.