cfahlgren1/math / lean /OAI /Probability /FirstPassage /ContourCounts.lean
cfahlgren1's picture
download
raw
819 Bytes
import OAI.Probability.FirstPassage.Paths
import Mathlib.Data.List.Count
namespace OAI
namespace PlanarFPP
theorem displacement_counts (ds : List Step) :
(displacement ds).1=(ds.count Step.east : ℤ)-ds.count Step.west ∧
(displacement ds).2=(ds.count Step.north : ℤ)-ds.count Step.south ∧
ds.length=ds.count Step.east+ds.count Step.west+ds.count Step.north+ds.count Step.south := by
induction ds with
| nil => simp
| cons d ds ih =>
cases d <;> simp_all [displacement_cons,Step.delta] <;> omega
theorem closed_walk_up_left_count (ds : List Step) (h : displacement ds=0) :
ds.length=2*(ds.count Step.north+ds.count Step.west) := by
obtain ⟨hx,hy,hl⟩ := displacement_counts ds
rw [h] at hx hy
simp only [Prod.fst_zero,Prod.snd_zero] at hx hy
omega
end PlanarFPP
end OAI

Xet Storage Details

Size:
819 Bytes
·
Xet hash:
6189410e0fb3a00ad186563e8f3ba472fc95860e90d761ed742079cfe8d2df2e

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