File size: 4,209 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | import Mathlib
import OAI.Probability.LatticeSurface.Convexity.KernelRestriction
import OAI.Probability.LatticeSurface.Dynamics.ProjectionTail
import OAI.Probability.LatticeSurface.Dynamics.TwoStageDynamics
namespace OAI
namespace ProjectionComparison
open Set ClusterDisplacement
attribute [local instance] Classical.propDecidable
variable {V E : Type*} [Fintype V] [Fintype E]
noncomputable def meshTail (S : System V E) (bβ bβ hβ hβ : V β β)
(hhβ : hββfeasible S bβ) (hhβ : hββfeasible S bβ)
(increments : β β V β β) (a : β) (n : β) (x : {x // xβS.pins}) : β :=
max (recursion S bβ β¨hβ,hhββ© hβ increments n x-
recursion S bβ β¨hβ,hhββ© hβ increments n x-a) 0
end ProjectionComparison
namespace ProjectionComparison
open Set ClusterDisplacement
attribute [local instance] Classical.propDecidable
variable {V E : Type*} [Fintype V] [Fintype E]
omit [Fintype E] in
lemma recursion_feasible (S : System V E) (b hβ : V β β) (hhβ : hββfeasible S b)
(increments : β β V β β) (n : β) : recursion S b β¨hβ,hhββ© hβ increments nβfeasible S b := by
cases n with
| zero => exact hhβ
| succ n => exact (project_spec S b β¨hβ,hhββ© _).1
lemma mesh_tail_step (S : System V E) (bβ bβ hβ hβ : V β β)
(hhβ : hββfeasible S bβ) (hhβ : hββfeasible S bβ)
(increments : β β V β β) (a : β) (hb : βxβS.pins,bβ x-bβ xβ€a) (n : β) :
β A B : Kernel {x // xβS.pins},Firm A β§ Firm B β§
meshTail S bβ bβ hβ hβ hhβ hhβ increments a (n+1)=
B.apply (A.apply (meshTail S bβ bβ hβ hβ hhβ hhβ increments a n)) := by
classical
let fβ := recursion S bβ β¨hβ,hhββ© hβ increments n
let fβ := recursion S bβ β¨hβ,hhββ© hβ increments n
let vβ : V β β := fun x => fβ x+increments n x
let vβ : V β β := fun x => fβ x+increments n x
let gβ := recursion S bβ β¨hβ,hhββ© hβ increments (n+1)
let gβ := recursion S bβ β¨hβ,hhββ© hβ increments (n+1)
obtain β¨A,hA,r,hr,heβ©:=tail_projection_kernel S bβ bβ vβ vβ gβ gβ a
(project_spec S bβ β¨hβ,hhββ© vβ) (project_spec S bβ β¨hβ,hhββ© vβ) hb
let W : Set V := {x | xβS.pins}
let u : V β β := fun x => max (vβ x-vβ x-a) 0
have hu (x) : u x=max (fβ x-fβ x-a) 0 := by dsimp [u,vβ,vβ];rw [add_sub_add_right_eq_sub]
have hup (x) (hx : xβW) : u x=0 := by
have hp : xβS.pins := Classical.not_not.mp hx
rw [hu]
have hfβ : fβ x=bβ x := (recursion_feasible S bβ hβ hhβ increments n).2 x hp
have hfβ : fβ x=bβ x := (recursion_feasible S bβ hβ hhβ increments n).2 x hp
rw [hfβ,hfβ,max_eq_right (sub_nonpos.mpr (hb x hp))]
refine β¨A.restrict W,Kernel.cutoff (fun x : W => r x) (fun x => hr x),A.restrict_firm hA W,
Kernel.cutoff_firm _ _,?_β©
funext x
rw [Kernel.cutoff_apply]
have harg : meshTail S bβ bβ hβ hβ hhβ hhβ increments a n=(fun x : W => u x) := by
funext x
exact (hu x).symm
rw [harg,Kernel.restrict_apply_of_zero A W u hup]
exact he x
end ProjectionComparison
namespace ProjectionComparison
open Set ClusterDisplacement
attribute [local instance] Classical.propDecidable
variable {V E : Type*} [Fintype V] [Fintype E]
theorem projection_mesh_tail_displacement (S : System V E) (bβ bβ hβ hβ : V β β)
(hhβ : hββfeasible S bβ) (hhβ : hββfeasible S bβ)
(increments : β β V β β) (a : β) (hb : βxβS.pins,bβ x-bβ xβ€a)
(N k : β) (hk : kβ€N) (x : {x // xβS.pins}) :
|meshTail S bβ bβ hβ hβ hhβ hhβ increments a k x-
meshTail S bβ bβ hβ hβ hhβ hhβ increments a 0 x|β€
5*(Fintype.card {x // xβS.pins}+1:β)*Real.sqrt
(energy (meshTail S bβ bβ hβ hβ hhβ hhβ increments a 0)-
energy (meshTail S bβ bβ hβ hβ hhβ hhβ increments a N)) := by
exact two_stage_displacement _ (mesh_tail_step S bβ bβ hβ hβ hhβ hhβ increments a hb) N k hk x
end ProjectionComparison
end OAI
|