File size: 2,060 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
import Mathlib

namespace OAI

namespace TreeEdit

universe u

/-- A single unit-cost insertion, deletion or substitution, at any position. -/
inductive EditStep {Ξ± : Type u} : List Ξ± β†’ List Ξ± β†’ Prop
  | insert (p q : List Ξ±) (a : Ξ±) : EditStep (p ++ q) (p ++ a :: q)
  | delete (p q : List Ξ±) (a : Ξ±) : EditStep (p ++ a :: q) (p ++ q)
  | substitute (p q : List Ξ±) (a b : Ξ±) : EditStep (p ++ a :: q) (p ++ b :: q)

/-- A script of precisely `n` edits. There is no restriction on its intermediate lengths. -/
inductive EditScript {Ξ± : Type u} : List Ξ± β†’ List Ξ± β†’ β„• β†’ Prop
  | nil (x : List Ξ±) : EditScript x x 0
  | cons {x y z : List Ξ±} {n : β„•} :
      EditStep x y β†’ EditScript y z n β†’ EditScript x z (n + 1)

/-- Ordinary unit-cost edit distance. The set is nonempty (delete then insert). -/
noncomputable def ed {Ξ± : Type u} (x y : List Ξ±) : β„• :=
  sInf {n | EditScript x y n}

/-- The full infinite-dimensional real ℓ₁ space. -/
abbrev RealL1 := lp (fun _ : β„• => ℝ) 1

/-- Product of the two maximal pairwise distance ratios. -/
noncomputable def distortion (W : Finset (List Bool)) (f : W β†’ RealL1) : ℝ :=
  sSup {r : ℝ | βˆƒ x y : W, x β‰  y ∧
      r = dist (f x) (f y) / (ed x.val y.val : ℝ)} *
  sSup {r : ℝ | βˆƒ x y : W, x β‰  y ∧
      r = (ed x.val y.val : ℝ) / dist (f x) (f y)}

/-- Infimum over all injective ℓ₁ maps, used on finite sets with at least two points. -/
noncomputable def c1 (W : Finset (List Bool)) : ℝ :=
  sInf {D : ℝ | βˆƒ f : W β†’ RealL1, Function.Injective f ∧ distortion W f = D}

/-- The binary main endpoint, for every sufficiently large cap (natural logarithms). -/
def BinaryLowerBound : Prop :=
  βˆƒ c : ℝ, 0 < c ∧ βˆƒ dβ‚€ : β„•, βˆ€ d : β„•, dβ‚€ ≀ d β†’
    βˆƒ n : β„•, n ≀ d ∧ βˆƒ W : Finset (List Bool),
      2 ≀ W.card ∧ (βˆ€ w ∈ W, w.length = n) ∧
      Real.exp (c * Real.sqrt (Real.log (d : ℝ) * Real.log (Real.log (d : ℝ)))) ≀ c1 W

theorem binary_torus : BinaryLowerBound := by
  sorry

end TreeEdit

end OAI